(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2888],{57542:function(e,t,i){"use strict";var r=Object.defineProperty,s=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,o=Object.prototype.hasOwnProperty,n={};((e,t)=>{for(var i in t)r(e,i,{get:t[i],enumerable:!0})})(n,{createBrowserSupabaseClient:()=>C,createMiddlewareSupabaseClient:()=>b,createRouteHandlerSupabaseClient:()=>x,createServerComponentSupabaseClient:()=>S,createServerSupabaseClient:()=>w,logger:()=>y,withApiAuth:()=>f,withMiddlewareAuth:()=>u,withPageAuth:()=>g}),e.exports=((e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let l of a(t))o.call(e,l)||l===i||r(e,l,{get:()=>t[l],enumerable:!(n=s(t,l))||n.enumerable});return e})(r({},"__esModule",{value:!0}),n);var l=i(11744),h=i(82584),d=i(11744),c=class extends Error{constructor(e){super(e),this.name="NoPermissionError"}},u=(e={})=>async t=>{var i;try{let i=h.NextResponse.next(),r=(0,d.createServerSupabaseClient)({supabaseUrl:"https://api.getspine.ai",supabaseKey:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im93bm1rdnlodXlhcmxncnlyYXB6Iiwicm9sZSI6ImFub24iLCJpYXQiOjE2NzgzMjQ4OTIsImV4cCI6MTk5MzkwMDg5Mn0.WJDnEc9J8bVLprb8aKIP2UDCILoxpVVbDUHONpDgiBU",getCookie:e=>(0,d.parseCookies)(t.headers.get("cookie")??"")[e],setCookie(e,t,r){let s=(0,d.serializeCookie)(e,t,{...r,httpOnly:!1});i.headers.append(e,s)},getRequestHeader:e=>t.headers.get(e)??void 0,options:{global:{headers:{"X-Client-Info":"@supabase/auth-helpers-nextjs@0.5.9"}}},cookieOptions:e.cookieOptions}),{data:{session:s},error:a}=await r.auth.getSession();if(a)throw Error(`Authorization error, redirecting to login page: ${a.message}`);if(s){if(e.authGuard&&!await e.authGuard.isPermitted(s.user,r))throw new c("User is not permitted, redirecting")}else throw Error("No auth session, redirecting");return i}catch(a){let{redirectTo:r="/"}=e;a instanceof c&&(null==(i=null==e?void 0:e.authGuard)?void 0:i.redirectTo)&&(r=e.authGuard.redirectTo),a instanceof Error&&console.log(`Could not authenticate request, redirecting to ${r}:`,a);let s=t.nextUrl.clone();return s.pathname=r,s.searchParams.set("redirectedFrom",t.nextUrl.pathname),h.NextResponse.redirect(s)}},p=i(11744);function g({authRequired:e=!0,redirectTo:t="/",getServerSideProps:i,cookieOptions:r={}}={}){return async s=>{try{if(!s.req.cookies)throw new p.CookieNotParsed;let t=(0,p.createServerSupabaseClient)({supabaseUrl:"https://api.getspine.ai",supabaseKey:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im93bm1rdnlodXlhcmxncnlyYXB6Iiwicm9sZSI6ImFub24iLCJpYXQiOjE2NzgzMjQ4OTIsImV4cCI6MTk5MzkwMDg5Mn0.WJDnEc9J8bVLprb8aKIP2UDCILoxpVVbDUHONpDgiBU",getRequestHeader:e=>s.req.headers[e],getCookie:e=>s.req.cookies[e],setCookie(e,t,i){var r;let a=(0,p.filterCookies)((0,p.ensureArray)((null==(r=s.res.getHeader("set-cookie"))?void 0:r.toString())??[]),e),o=(0,p.serializeCookie)(e,t,{...i,httpOnly:!1});s.res.setHeader("set-cookie",[...a,o])},options:{global:{headers:{"X-Client-Info":"@supabase/auth-helpers-nextjs@0.5.9"}}},cookieOptions:r}),{data:{session:a},error:o}=await t.auth.getSession();if(o)throw o;if(e&&!a)throw new p.AuthHelperError("Unauthenticated","unauthenticated");let n={props:{}};if(i)try{n=await i(s,t)}catch(e){n={props:{error:String(e)}}}return{...n,props:{initialSession:a,user:(null==a?void 0:a.user)??null,...n.props}}}catch(i){if(e)return{redirect:{destination:t,permanent:!1}};return{props:{}}}}}var m=i(11744);function f(e,t={}){return async(i,r)=>{try{let s=(0,m.createServerSupabaseClient)({supabaseUrl:"https://api.getspine.ai",supabaseKey:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im93bm1rdnlodXlhcmxncnlyYXB6Iiwicm9sZSI6ImFub24iLCJpYXQiOjE2NzgzMjQ4OTIsImV4cCI6MTk5MzkwMDg5Mn0.WJDnEc9J8bVLprb8aKIP2UDCILoxpVVbDUHONpDgiBU",getCookie:e=>i.cookies[e],setCookie(e,t,i){var s;let a=(0,m.filterCookies)((0,m.ensureArray)((null==(s=r.getHeader("set-cookie"))?void 0:s.toString())??[]),e),o=(0,m.serializeCookie)(e,t,{...i,httpOnly:!1});r.setHeader("set-cookie",[...a,o])},getRequestHeader:e=>{let t=i.headers[e];return"number"==typeof t?String(t):t},options:{global:{headers:{"X-Client-Info":"@supabase/auth-helpers-nextjs@0.5.9"}}},cookieOptions:t.cookieOptions}),{data:{session:a},error:o}=await s.auth.getSession();if(o)throw o;if(!a)throw new m.AuthHelperError("Unauthenticated","unauthenticated");try{await e(i,r,s)}catch(e){r.status(500).json({error:String(e)});return}}catch(e){r.status(401).json({error:"not_authenticated",description:"The user does not have an active session or is not authenticated"});return}}}var v={log:(e,...t)=>{},error:(e,...t)=>{console.error(e,...t)},info:(e,...t)=>{v.log(e,...t)},debug:(e,...t)=>{v.log(e,...t)},warn:(e,...t)=>{}},y=v;function C({supabaseUrl:e="https://api.getspine.ai",supabaseKey:t="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im93bm1rdnlodXlhcmxncnlyYXB6Iiwicm9sZSI6ImFub24iLCJpYXQiOjE2NzgzMjQ4OTIsImV4cCI6MTk5MzkwMDg5Mn0.WJDnEc9J8bVLprb8aKIP2UDCILoxpVVbDUHONpDgiBU",options:i,cookieOptions:r}={}){var s;if(!e||!t)throw Error("either NEXT_PUBLIC_SUPABASE_URL and NEXT_PUBLIC_SUPABASE_ANON_KEY env variables or supabaseUrl and supabaseKey are required!");return(0,l.createBrowserSupabaseClient)({supabaseUrl:e,supabaseKey:t,options:{...i,global:{...null==i?void 0:i.global,headers:{...null==(s=null==i?void 0:i.global)?void 0:s.headers,"X-Client-Info":"@supabase/auth-helpers-nextjs@0.5.9"}}},cookieOptions:r})}function w(e,{supabaseUrl:t="https://api.getspine.ai",supabaseKey:i="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im93bm1rdnlodXlhcmxncnlyYXB6Iiwicm9sZSI6ImFub24iLCJpYXQiOjE2NzgzMjQ4OTIsImV4cCI6MTk5MzkwMDg5Mn0.WJDnEc9J8bVLprb8aKIP2UDCILoxpVVbDUHONpDgiBU",options:r,cookieOptions:s}={}){var a;if(!t||!i)throw Error("either NEXT_PUBLIC_SUPABASE_URL and NEXT_PUBLIC_SUPABASE_ANON_KEY env variables or supabaseUrl and supabaseKey are required!");return(0,l.createServerSupabaseClient)({supabaseUrl:t,supabaseKey:i,getRequestHeader:t=>e.req.headers[t],getCookie:t=>e.req.cookies[t],setCookie(t,i,r){var s;let a=(0,l.filterCookies)((0,l.ensureArray)((null==(s=e.res.getHeader("set-cookie"))?void 0:s.toString())??[]),t),o=(0,l.serializeCookie)(t,i,{...r,httpOnly:!1});e.res.setHeader("set-cookie",[...a,o])},options:{...r,global:{...null==r?void 0:r.global,headers:{...null==(a=null==r?void 0:r.global)?void 0:a.headers,"X-Client-Info":"@supabase/auth-helpers-nextjs@0.5.9"}}},cookieOptions:s})}function b(e,{supabaseUrl:t="https://api.getspine.ai",supabaseKey:i="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im93bm1rdnlodXlhcmxncnlyYXB6Iiwicm9sZSI6ImFub24iLCJpYXQiOjE2NzgzMjQ4OTIsImV4cCI6MTk5MzkwMDg5Mn0.WJDnEc9J8bVLprb8aKIP2UDCILoxpVVbDUHONpDgiBU",options:r,cookieOptions:s}={}){var a;if(!t||!i)throw Error("either NEXT_PUBLIC_SUPABASE_URL and NEXT_PUBLIC_SUPABASE_ANON_KEY env variables or supabaseUrl and supabaseKey are required!");return(0,l.createServerSupabaseClient)({supabaseUrl:t,supabaseKey:i,getCookie:t=>(0,l.parseCookies)(e.req.headers.get("cookie")??"")[t],setCookie(t,i,r){let s=(0,l.serializeCookie)(t,i,{...r,httpOnly:!1});e.req.headers.append("cookie",s),e.res.headers.set("set-cookie",s)},getRequestHeader:t=>e.req.headers.get(t)??void 0,options:{...r,global:{...null==r?void 0:r.global,headers:{...null==(a=null==r?void 0:r.global)?void 0:a.headers,"X-Client-Info":"@supabase/auth-helpers-nextjs@0.5.9"}}},cookieOptions:s})}function S({supabaseUrl:e="https://api.getspine.ai",supabaseKey:t="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im93bm1rdnlodXlhcmxncnlyYXB6Iiwicm9sZSI6ImFub24iLCJpYXQiOjE2NzgzMjQ4OTIsImV4cCI6MTk5MzkwMDg5Mn0.WJDnEc9J8bVLprb8aKIP2UDCILoxpVVbDUHONpDgiBU",headers:i,cookies:r,options:s,cookieOptions:a}){if(!e||!t)throw Error("either NEXT_PUBLIC_SUPABASE_URL and NEXT_PUBLIC_SUPABASE_ANON_KEY env variables or supabaseUrl and supabaseKey are required!");return(0,l.createServerSupabaseClient)({supabaseUrl:e,supabaseKey:t,getRequestHeader:e=>i().get(e),getCookie(e){var t;return null==(t=r().get(e))?void 0:t.value},setCookie(){},options:{...s,global:{...null==s?void 0:s.global,headers:{"X-Client-Info":"@supabase/auth-helpers-nextjs@0.5.9"}}},cookieOptions:a})}var x=S},84053:function(e,t,i){let r,s,a;var o=Object.create,n=Object.defineProperty,l=Object.getOwnPropertyDescriptor,h=Object.getOwnPropertyNames,d=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty,u=(e,t,i,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of h(t))c.call(e,s)||s===i||n(e,s,{get:()=>t[s],enumerable:!(r=l(t,s))||r.enumerable});return e},p={};((e,t)=>{for(var i in t)n(e,i,{get:t[i],enumerable:!0})})(p,{SessionContextProvider:()=>f,useSession:()=>C,useSessionContext:()=>v,useSupabaseClient:()=>y,useUser:()=>w}),e.exports=u(n({},"__esModule",{value:!0}),p);var g=(a=null!=(r=i(67294))?o(d(r)):{},u(!s&&r&&r.__esModule?a:n(a,"default",{value:r,enumerable:!0}),r)),m=(0,g.createContext)({isLoading:!0,session:null,error:null,supabaseClient:{}}),f=({supabaseClient:e,initialSession:t=null,children:i})=>{let[r,s]=(0,g.useState)(t),[a,o]=(0,g.useState)(!t),[n,l]=(0,g.useState)();(0,g.useEffect)(()=>{(async function(){let{data:{session:t},error:i}=await e.auth.getSession();if(i){l(i),o(!1);return}s(t),o(!1)})()},[]),(0,g.useEffect)(()=>{let{data:{subscription:t}}=e.auth.onAuthStateChange((e,t)=>{t&&("SIGNED_IN"===e||"TOKEN_REFRESHED"===e)&&s(t),"SIGNED_OUT"===e&&s(null)});return()=>{t.unsubscribe()}},[]);let h=(0,g.useMemo)(()=>a?{isLoading:!0,session:null,error:null,supabaseClient:e}:n?{isLoading:!1,session:null,error:n,supabaseClient:e}:{isLoading:!1,session:r,error:null,supabaseClient:e},[a,r,n]);return g.default.createElement(m.Provider,{value:h},i)},v=()=>{let e=(0,g.useContext)(m);if(void 0===e)throw Error("useSessionContext must be used within a SessionContextProvider.");return e};function y(){let e=(0,g.useContext)(m);if(void 0===e)throw Error("useSupabaseClient must be used within a SessionContextProvider.");return e.supabaseClient}var C=()=>{let e=(0,g.useContext)(m);if(void 0===e)throw Error("useSession must be used within a SessionContextProvider.");return e.session},w=()=>{var e,t;let i=(0,g.useContext)(m);if(void 0===i)throw Error("useUser must be used within a SessionContextProvider.");return null!=(t=null==(e=i.session)?void 0:e.user)?t:null}},89743:function(e,t,i){"use strict";i.r(t),i.d(t,{Headers:function(){return a},Request:function(){return o},Response:function(){return n},fetch:function(){return s}});var r=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==i.g)return i.g;throw Error("unable to locate global object")}();let s=r.fetch;t.default=r.fetch.bind(r);let a=r.Headers,o=r.Request,n=r.Response},81879:function(e,t,i){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});let s=r(i(89743)),a=r(i(29577));class o{constructor(e){this.shouldThrowOnError=!1,this.method=e.method,this.url=e.url,this.headers=e.headers,this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=e.shouldThrowOnError,this.signal=e.signal,this.isMaybeSingle=e.isMaybeSingle,e.fetch?this.fetch=e.fetch:"undefined"==typeof fetch?this.fetch=s.default:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=Object.assign({},this.headers),this.headers[e]=t,this}then(e,t){void 0===this.schema||(["GET","HEAD"].includes(this.method)?this.headers["Accept-Profile"]=this.schema:this.headers["Content-Profile"]=this.schema),"GET"!==this.method&&"HEAD"!==this.method&&(this.headers["Content-Type"]="application/json");let i=(0,this.fetch)(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async e=>{var t,i,r;let s=null,o=null,n=null,l=e.status,h=e.statusText;if(e.ok){if("HEAD"!==this.method){let t=await e.text();""===t||(o="text/csv"===this.headers.Accept?t:this.headers.Accept&&this.headers.Accept.includes("application/vnd.pgrst.plan+text")?t:JSON.parse(t))}let r=null===(t=this.headers.Prefer)||void 0===t?void 0:t.match(/count=(exact|planned|estimated)/),a=null===(i=e.headers.get("content-range"))||void 0===i?void 0:i.split("/");r&&a&&a.length>1&&(n=parseInt(a[1])),this.isMaybeSingle&&"GET"===this.method&&Array.isArray(o)&&(o.length>1?(s={code:"PGRST116",details:`Results contain ${o.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},o=null,n=null,l=406,h="Not Acceptable"):o=1===o.length?o[0]:null)}else{let t=await e.text();try{s=JSON.parse(t),Array.isArray(s)&&404===e.status&&(o=[],s=null,l=200,h="OK")}catch(i){404===e.status&&""===t?(l=204,h="No Content"):s={message:t}}if(s&&this.isMaybeSingle&&(null===(r=null==s?void 0:s.details)||void 0===r?void 0:r.includes("0 rows"))&&(s=null,l=200,h="OK"),s&&this.shouldThrowOnError)throw new a.default(s)}return{error:s,data:o,count:n,status:l,statusText:h}});return this.shouldThrowOnError||(i=i.catch(e=>{var t,i,r;return{error:{message:`${null!==(t=null==e?void 0:e.name)&&void 0!==t?t:"FetchError"}: ${null==e?void 0:e.message}`,details:`${null!==(i=null==e?void 0:e.stack)&&void 0!==i?i:""}`,hint:"",code:`${null!==(r=null==e?void 0:e.code)&&void 0!==r?r:""}`},data:null,count:null,status:0,statusText:""}})),i.then(e,t)}}t.default=o},40435:function(e,t,i){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});let s=r(i(89527)),a=r(i(28483)),o=i(50862);class n{constructor(e,{headers:t={},schema:i,fetch:r}={}){this.url=e,this.headers=Object.assign(Object.assign({},o.DEFAULT_HEADERS),t),this.schemaName=i,this.fetch=r}from(e){let t=new URL(`${this.url}/${e}`);return new s.default(t,{headers:Object.assign({},this.headers),schema:this.schemaName,fetch:this.fetch})}schema(e){return new n(this.url,{headers:this.headers,schema:e,fetch:this.fetch})}rpc(e,t={},{head:i=!1,get:r=!1,count:s}={}){let o,n;let l=new URL(`${this.url}/rpc/${e}`);i||r?(o=i?"HEAD":"GET",Object.entries(t).filter(([e,t])=>void 0!==t).map(([e,t])=>[e,Array.isArray(t)?`{${t.join(",")}}`:`${t}`]).forEach(([e,t])=>{l.searchParams.append(e,t)})):(o="POST",n=t);let h=Object.assign({},this.headers);return s&&(h.Prefer=`count=${s}`),new a.default({method:o,url:l,headers:h,schema:this.schemaName,body:n,fetch:this.fetch,allowEmpty:!1})}}t.default=n},29577:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class i extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.code=e.code}}t.default=i},28483:function(e,t,i){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});let s=r(i(47486));class a extends s.default{eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(",")}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(",")}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(",")}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(",")}}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}in(e,t){let i=Array.from(new Set(t)).map(e=>"string"==typeof e&&RegExp("[,()]").test(e)?`"${e}"`:`${e}`).join(",");return this.url.searchParams.append(e,`in.(${i})`),this}contains(e,t){return"string"==typeof t?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return"string"==typeof t?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return"string"==typeof t?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{config:i,type:r}={}){let s="";"plain"===r?s="pl":"phrase"===r?s="ph":"websearch"===r&&(s="w");let a=void 0===i?"":`(${i})`;return this.url.searchParams.append(e,`${s}fts${a}.${t}`),this}match(e){return Object.entries(e).forEach(([e,t])=>{this.url.searchParams.append(e,`eq.${t}`)}),this}not(e,t,i){return this.url.searchParams.append(e,`not.${t}.${i}`),this}or(e,{foreignTable:t,referencedTable:i=t}={}){let r=i?`${i}.or`:"or";return this.url.searchParams.append(r,`(${e})`),this}filter(e,t,i){return this.url.searchParams.append(e,`${t}.${i}`),this}}t.default=a},89527:function(e,t,i){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});let s=r(i(28483));class a{constructor(e,{headers:t={},schema:i,fetch:r}){this.url=e,this.headers=t,this.schema=i,this.fetch=r}select(e,{head:t=!1,count:i}={}){let r=!1,a=(null!=e?e:"*").split("").map(e=>/\s/.test(e)&&!r?"":('"'===e&&(r=!r),e)).join("");return this.url.searchParams.set("select",a),i&&(this.headers.Prefer=`count=${i}`),new s.default({method:t?"HEAD":"GET",url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}insert(e,{count:t,defaultToNull:i=!0}={}){let r=[];if(this.headers.Prefer&&r.push(this.headers.Prefer),t&&r.push(`count=${t}`),i||r.push("missing=default"),this.headers.Prefer=r.join(","),Array.isArray(e)){let t=e.reduce((e,t)=>e.concat(Object.keys(t)),[]);if(t.length>0){let e=[...new Set(t)].map(e=>`"${e}"`);this.url.searchParams.set("columns",e.join(","))}}return new s.default({method:"POST",url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:this.fetch,allowEmpty:!1})}upsert(e,{onConflict:t,ignoreDuplicates:i=!1,count:r,defaultToNull:a=!0}={}){let o=[`resolution=${i?"ignore":"merge"}-duplicates`];if(void 0!==t&&this.url.searchParams.set("on_conflict",t),this.headers.Prefer&&o.push(this.headers.Prefer),r&&o.push(`count=${r}`),a||o.push("missing=default"),this.headers.Prefer=o.join(","),Array.isArray(e)){let t=e.reduce((e,t)=>e.concat(Object.keys(t)),[]);if(t.length>0){let e=[...new Set(t)].map(e=>`"${e}"`);this.url.searchParams.set("columns",e.join(","))}}return new s.default({method:"POST",url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:this.fetch,allowEmpty:!1})}update(e,{count:t}={}){let i=[];return this.headers.Prefer&&i.push(this.headers.Prefer),t&&i.push(`count=${t}`),this.headers.Prefer=i.join(","),new s.default({method:"PATCH",url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:this.fetch,allowEmpty:!1})}delete({count:e}={}){let t=[];return e&&t.push(`count=${e}`),this.headers.Prefer&&t.unshift(this.headers.Prefer),this.headers.Prefer=t.join(","),new s.default({method:"DELETE",url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}}t.default=a},47486:function(e,t,i){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});let s=r(i(81879));class a extends s.default{select(e){let t=!1,i=(null!=e?e:"*").split("").map(e=>/\s/.test(e)&&!t?"":('"'===e&&(t=!t),e)).join("");return this.url.searchParams.set("select",i),this.headers.Prefer&&(this.headers.Prefer+=","),this.headers.Prefer+="return=representation",this}order(e,{ascending:t=!0,nullsFirst:i,foreignTable:r,referencedTable:s=r}={}){let a=s?`${s}.order`:"order",o=this.url.searchParams.get(a);return this.url.searchParams.set(a,`${o?`${o},`:""}${e}.${t?"asc":"desc"}${void 0===i?"":i?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:i=t}={}){let r=void 0===i?"limit":`${i}.limit`;return this.url.searchParams.set(r,`${e}`),this}range(e,t,{foreignTable:i,referencedTable:r=i}={}){let s=void 0===r?"offset":`${r}.offset`,a=void 0===r?"limit":`${r}.limit`;return this.url.searchParams.set(s,`${e}`),this.url.searchParams.set(a,`${t-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.Accept="application/vnd.pgrst.object+json",this}maybeSingle(){return"GET"===this.method?this.headers.Accept="application/json":this.headers.Accept="application/vnd.pgrst.object+json",this.isMaybeSingle=!0,this}csv(){return this.headers.Accept="text/csv",this}geojson(){return this.headers.Accept="application/geo+json",this}explain({analyze:e=!1,verbose:t=!1,settings:i=!1,buffers:r=!1,wal:s=!1,format:a="text"}={}){var o;let n=[e?"analyze":null,t?"verbose":null,i?"settings":null,r?"buffers":null,s?"wal":null].filter(Boolean).join("|"),l=null!==(o=this.headers.Accept)&&void 0!==o?o:"application/json";return this.headers.Accept=`application/vnd.pgrst.plan+${a}; for="${l}"; options=${n};`,this}rollback(){var e;return(null!==(e=this.headers.Prefer)&&void 0!==e?e:"").trim().length>0?this.headers.Prefer+=",tx=rollback":this.headers.Prefer="tx=rollback",this}returns(){return this}}t.default=a},50862:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_HEADERS=void 0;let r=i(98771);t.DEFAULT_HEADERS={"X-Client-Info":`postgrest-js/${r.version}`}},50159:function(e,t,i){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.PostgrestBuilder=t.PostgrestTransformBuilder=t.PostgrestFilterBuilder=t.PostgrestQueryBuilder=t.PostgrestClient=void 0;let s=r(i(40435));t.PostgrestClient=s.default;let a=r(i(89527));t.PostgrestQueryBuilder=a.default;let o=r(i(28483));t.PostgrestFilterBuilder=o.default;let n=r(i(47486));t.PostgrestTransformBuilder=n.default;let l=r(i(81879));t.PostgrestBuilder=l.default,t.default={PostgrestClient:s.default,PostgrestQueryBuilder:a.default,PostgrestFilterBuilder:o.default,PostgrestTransformBuilder:n.default,PostgrestBuilder:l.default}},98771:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="0.0.0-automated"},83454:function(e,t,i){"use strict";var r,s;e.exports=(null==(r=i.g.process)?void 0:r.env)&&"object"==typeof(null==(s=i.g.process)?void 0:s.env)?i.g.process:i(77663)},6840:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){return i(94909)}])},25702:function(e,t,i){"use strict";var r=i(85893);t.Z=e=>{let{className:t="",...i}=e;return(0,r.jsx)("img",{src:"/logo.svg",alt:"Spine AI",width:"96",height:"auto",className:"inline-block ".concat(t),...i})}},40934:function(e,t,i){"use strict";i.d(t,{V:function(){return n},e:function(){return l}});var r=i(85893),s=i(67294),a=(e,t,i)=>{let r=(0,s.useRef)(null);return(0,s.useEffect)(()=>{if(i){let i=document.createElement("div");i.className="toast z-50",i.style.background="success"===e?"linear-gradient(0deg, #86b31e 0%, #51b934 100%)":"linear-gradient(0deg, #ec8b6d 0%, #e44b5d 100%)",i.innerHTML=t,r.current=i,document.body.appendChild(r.current),requestAnimationFrame(()=>{var e;null===(e=r.current)||void 0===e||e.classList.add("visible")});let s=setTimeout(()=>{r.current&&(r.current.classList.remove("visible"),setTimeout(()=>{document.body.removeChild(r.current),r.current=null},300))},1e4);return()=>{clearTimeout(s),r.current&&(document.body.removeChild(r.current),r.current=null)}}},[e,t,i]),null};let o=(0,s.createContext)({}),n=e=>{let{children:t}=e,[i,n]=(0,s.useState)({color:"",message:"",isVisible:!1});return a(i.color,i.message,i.isVisible),(0,r.jsx)(o.Provider,{value:{showToast:(e,t)=>{n({color:"",message:"",isVisible:!1}),setTimeout(()=>{n({color:e,message:t,isVisible:!0})},0)}},children:t})},l=()=>(0,s.useContext)(o)},68053:function(e,t,i){"use strict";i.d(t,{J:function(){return r}});let r="production"},71743:function(e,t,i){"use strict";i.d(t,{X:function(){return r}});let r=!1},63895:function(e,t,i){"use strict";i.d(t,{RP:function(){return function e(t,i,r,l=0){return new s.cW((s,h)=>{let d=t[l];if(null===i||"function"!=typeof d)s(i);else{let c=d({...i},r);n.X&&d.id&&null===c&&a.kg.log(`Event processor "${d.id}" dropped event`),(0,o.J8)(c)?c.then(i=>e(t,i,r,l+1).then(s)).then(null,h):e(t,c,r,l+1).then(s).then(null,h)}})}},cc:function(){return h},fH:function(){return l}});var r=i(50304),s=i(71530),a=i(22966),o=i(98035),n=i(71743);function l(){return(0,r.Y)("globalEventProcessors",()=>[])}function h(e){l().push(e)}},41848:function(e,t,i){"use strict";i.d(t,{$e:function(){return g},Tb:function(){return d},cg:function(){return b},eN:function(){return c},nZ:function(){return v},n_:function(){return u},s3:function(){return f},v:function(){return p},yj:function(){return y},yl:function(){return m}});var r=i(22966),s=i(50304),a=i(68053),o=i(71743),n=i(22586),l=i(55274),h=i(95461);function d(e,t){return(0,n.Gd)().captureException(e,(0,h.U0)(t))}function c(e,t){return(0,n.Gd)().captureEvent(e,t)}function u(e,t){(0,n.Gd)().addBreadcrumb(e,t)}function p(e,t){(0,n.Gd)().setContext(e,t)}function g(...e){let t=(0,n.Gd)();if(2===e.length){let[i,r]=e;return i?t.withScope(()=>(t.getStackTop().scope=i,r(i))):t.withScope(r)}return t.withScope(e[0])}async function m(e){let t=f();return t?t.flush(e):(o.X&&r.kg.warn("Cannot flush events. No client defined."),Promise.resolve(!1))}function f(){return(0,n.Gd)().getClient()}function v(){return(0,n.Gd)().getScope()}function y(e){let t=f(),i=(0,n.aF)(),r=v(),{release:o,environment:h=a.J}=t&&t.getOptions()||{},{userAgent:d}=s.GLOBAL_OBJ.navigator||{},c=(0,l.Hv)({release:o,environment:h,user:r.getUser()||i.getUser(),...d&&{userAgent:d},...e}),u=i.getSession();return u&&"ok"===u.status&&(0,l.CT)(u,{status:"exited"}),C(),i.setSession(c),r.setSession(c),c}function C(){let e=(0,n.aF)(),t=v(),i=t.getSession()||e.getSession();i&&(0,l.RJ)(i),w(),e.setSession(),t.setSession()}function w(){let e=(0,n.aF)(),t=v(),i=f(),r=t.getSession()||e.getSession();r&&i&&i.captureSession&&i.captureSession(r)}function b(e=!1){if(e){C();return}w()}},22586:function(e,t,i){"use strict";i.d(t,{Gd:function(){return f},aF:function(){return v},cu:function(){return g}});var r=i(98035),s=i(1740),a=i(15389),o=i(22966),n=i(50304),l=i(68053),h=i(71743),d=i(6348),c=i(55274);let u=parseFloat(i(60424).J);class p{constructor(e,t,i,r=u){let s,a;this._version=r,t?s=t:(s=new d.sX).setClient(e),i?a=i:(a=new d.sX).setClient(e),this._stack=[{scope:s}],e&&this.bindClient(e),this._isolationScope=a}isOlderThan(e){return this._version<e}bindClient(e){let t=this.getStackTop();t.client=e,t.scope.setClient(e),e&&e.setupIntegrations&&e.setupIntegrations()}pushScope(){let e=this.getScope().clone();return this.getStack().push({client:this.getClient(),scope:e}),e}popScope(){return!(this.getStack().length<=1)&&!!this.getStack().pop()}withScope(e){let t;let i=this.pushScope();try{t=e(i)}catch(e){throw this.popScope(),e}return(0,r.J8)(t)?t.then(e=>(this.popScope(),e),e=>{throw this.popScope(),e}):(this.popScope(),t)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(e,t){let i=this._lastEventId=t&&t.event_id?t.event_id:(0,s.DM)(),r=Error("Sentry syntheticException");return this.getScope().captureException(e,{originalException:e,syntheticException:r,...t,event_id:i}),i}captureMessage(e,t,i){let r=this._lastEventId=i&&i.event_id?i.event_id:(0,s.DM)(),a=Error(e);return this.getScope().captureMessage(e,t,{originalException:e,syntheticException:a,...i,event_id:r}),r}captureEvent(e,t){let i=t&&t.event_id?t.event_id:(0,s.DM)();return e.type||(this._lastEventId=i),this.getScope().captureEvent(e,{...t,event_id:i}),i}lastEventId(){return this._lastEventId}addBreadcrumb(e,t){let{scope:i,client:r}=this.getStackTop();if(!r)return;let{beforeBreadcrumb:s=null,maxBreadcrumbs:n=100}=r.getOptions&&r.getOptions()||{};if(n<=0)return;let l={timestamp:(0,a.yW)(),...e},h=s?(0,o.Cf)(()=>s(l,t)):l;null!==h&&(r.emit&&r.emit("beforeAddBreadcrumb",h,t),i.addBreadcrumb(h,n))}setUser(e){this.getScope().setUser(e),this.getIsolationScope().setUser(e)}setTags(e){this.getScope().setTags(e),this.getIsolationScope().setTags(e)}setExtras(e){this.getScope().setExtras(e),this.getIsolationScope().setExtras(e)}setTag(e,t){this.getScope().setTag(e,t),this.getIsolationScope().setTag(e,t)}setExtra(e,t){this.getScope().setExtra(e,t),this.getIsolationScope().setExtra(e,t)}setContext(e,t){this.getScope().setContext(e,t),this.getIsolationScope().setContext(e,t)}configureScope(e){let{scope:t,client:i}=this.getStackTop();i&&e(t)}run(e){let t=m(this);try{e(this)}finally{m(t)}}getIntegration(e){let t=this.getClient();if(!t)return null;try{return t.getIntegration(e)}catch(t){return h.X&&o.kg.warn(`Cannot retrieve integration ${e.id} from the current Hub`),null}}startTransaction(e,t){let i=this._callExtensionMethod("startTransaction",e,t);return h.X&&!i&&(this.getClient()?o.kg.warn(`Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':
Sentry.addTracingExtensions();
Sentry.init({...});
`):o.kg.warn("Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'")),i}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(e=!1){if(e)return this.endSession();this._sendSessionUpdate()}endSession(){let e=this.getStackTop().scope,t=e.getSession();t&&(0,c.RJ)(t),this._sendSessionUpdate(),e.setSession()}startSession(e){let{scope:t,client:i}=this.getStackTop(),{release:r,environment:s=l.J}=i&&i.getOptions()||{},{userAgent:a}=n.GLOBAL_OBJ.navigator||{},o=(0,c.Hv)({release:r,environment:s,user:t.getUser(),...a&&{userAgent:a},...e}),h=t.getSession&&t.getSession();return h&&"ok"===h.status&&(0,c.CT)(h,{status:"exited"}),this.endSession(),t.setSession(o),o}shouldSendDefaultPii(){let e=this.getClient(),t=e&&e.getOptions();return!!(t&&t.sendDefaultPii)}_sendSessionUpdate(){let{scope:e,client:t}=this.getStackTop(),i=e.getSession();i&&t&&t.captureSession&&t.captureSession(i)}_callExtensionMethod(e,...t){let i=g().__SENTRY__;if(i&&i.extensions&&"function"==typeof i.extensions[e])return i.extensions[e].apply(this,t);h.X&&o.kg.warn(`Extension method ${e} couldn't be found, doing nothing.`)}}function g(){return n.GLOBAL_OBJ.__SENTRY__=n.GLOBAL_OBJ.__SENTRY__||{extensions:{},hub:void 0},n.GLOBAL_OBJ}function m(e){let t=g(),i=y(t);return C(t,e),i}function f(){let e=g();if(e.__SENTRY__&&e.__SENTRY__.acs){let t=e.__SENTRY__.acs.getCurrentHub();if(t)return t}return function(e=g()){return(!(e&&e.__SENTRY__&&e.__SENTRY__.hub)||y(e).isOlderThan(u))&&C(e,new p),y(e)}(e)}function v(){return f().getIsolationScope()}function y(e){return(0,n.Y)("hub",()=>new p,e)}function C(e,t){return!!e&&((e.__SENTRY__=e.__SENTRY__||{}).hub=t,!0)}},6348:function(e,t,i){"use strict";let r;i.d(t,{lW:function(){return u},sX:function(){return c}});var s=i(98035),a=i(15389),o=i(1740),n=i(22966),l=i(63895),h=i(55274),d=i(44626);class c{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=p()}static clone(e){return e?e.clone():new c}clone(){let e=new c;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._extra={...this._extra},e._contexts={...this._contexts},e._user=this._user,e._level=this._level,e._span=this._span,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._requestSession=this._requestSession,e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e}setClient(e){this._client=e}getClient(){return this._client}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,segment:void 0,username:void 0},this._session&&(0,h.CT)(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSpan(e){return this._span=e,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){let e=this._span;return e&&e.transaction}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;let t="function"==typeof e?e(this):e;if(t instanceof c){let e=t.getScopeData();this._tags={...this._tags,...e.tags},this._extra={...this._extra,...e.extra},this._contexts={...this._contexts,...e.contexts},e.user&&Object.keys(e.user).length&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint.length&&(this._fingerprint=e.fingerprint),t.getRequestSession()&&(this._requestSession=t.getRequestSession()),e.propagationContext&&(this._propagationContext=e.propagationContext)}else(0,s.PO)(t)&&(this._tags={...this._tags,...e.tags},this._extra={...this._extra,...e.extra},this._contexts={...this._contexts,...e.contexts},e.user&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint&&(this._fingerprint=e.fingerprint),e.requestSession&&(this._requestSession=e.requestSession),e.propagationContext&&(this._propagationContext=e.propagationContext));return this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this._propagationContext=p(),this}addBreadcrumb(e,t){let i="number"==typeof t?t:100;if(i<=0)return this;let r={timestamp:(0,a.yW)(),...e},s=this._breadcrumbs;return s.push(r),this._breadcrumbs=s.length>i?s.slice(-i):s,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}getAttachments(){return this.getScopeData().attachments}clearAttachments(){return this._attachments=[],this}getScopeData(){let{_breadcrumbs:e,_attachments:t,_contexts:i,_tags:r,_extra:s,_user:a,_level:o,_fingerprint:n,_eventProcessors:l,_propagationContext:h,_sdkProcessingMetadata:d,_transactionName:c,_span:u}=this;return{breadcrumbs:e,attachments:t,contexts:i,tags:r,extra:s,user:a,level:o,fingerprint:n||[],eventProcessors:l,propagationContext:h,sdkProcessingMetadata:d,transactionName:c,span:u}}applyToEvent(e,t={},i=[]){(0,d.gi)(e,this.getScopeData());let r=[...i,...(0,l.fH)(),...this._eventProcessors];return(0,l.RP)(r,e,t)}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...e},this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,t){let i=t&&t.event_id?t.event_id:(0,o.DM)();if(!this._client)return n.kg.warn("No client configured on scope - will not capture exception!"),i;let r=Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:r,...t,event_id:i},this),i}captureMessage(e,t,i){let r=i&&i.event_id?i.event_id:(0,o.DM)();if(!this._client)return n.kg.warn("No client configured on scope - will not capture message!"),r;let s=Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:s,...i,event_id:r},this),r}captureEvent(e,t){let i=t&&t.event_id?t.event_id:(0,o.DM)();return this._client?this._client.captureEvent(e,{...t,event_id:i},this):n.kg.warn("No client configured on scope - will not capture event!"),i}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}}function u(){return r||(r=new c),r}function p(){return{traceId:(0,o.DM)(),spanId:(0,o.DM)().substring(16)}}},55274:function(e,t,i){"use strict";i.d(t,{CT:function(){return n},Hv:function(){return o},RJ:function(){return l}});var r=i(15389),s=i(1740),a=i(60195);function o(e){let t=(0,r.ph)(),i={sid:(0,s.DM)(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>(0,a.Jr)({sid:`${i.sid}`,init:i.init,started:new Date(1e3*i.started).toISOString(),timestamp:new Date(1e3*i.timestamp).toISOString(),status:i.status,errors:i.errors,did:"number"==typeof i.did||"string"==typeof i.did?`${i.did}`:void 0,duration:i.duration,abnormal_mechanism:i.abnormal_mechanism,attrs:{release:i.release,environment:i.environment,ip_address:i.ipAddress,user_agent:i.userAgent}})};return e&&n(i,e),i}function n(e,t={}){if(!t.user||(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),e.did||t.did||(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||(0,r.ph)(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:(0,s.DM)()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{let t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}function l(e,t){let i={};t?i={status:t}:"ok"===e.status&&(i={status:"exited"}),n(e,i)}},39150:function(e,t,i){"use strict";i.d(t,{_:function(){return l},j:function(){return h}});var r=i(60195),s=i(68053),a=i(41848),o=i(82303),n=i(56217);function l(e,t,i){let a=t.getOptions(),{publicKey:o}=t.getDsn()||{},{segment:n}=i&&i.getUser()||{},l=(0,r.Jr)({environment:a.environment||s.J,release:a.release,user_segment:n,public_key:o,trace_id:e});return t.emit&&t.emit("createDsc",l),l}function h(e){let t=(0,a.s3)();if(!t)return{};let i=l((0,n.XU)(e).trace_id||"",t,(0,a.nZ)()),r=(0,o.G)(e);if(!r)return i;let s=r&&r._frozenDynamicSamplingContext;if(s)return s;let{sampleRate:h,source:d}=r.metadata;null!=h&&(i.sample_rate=`${h}`);let c=(0,n.XU)(r);return d&&"url"!==d&&(i.transaction=c.description),i.sampled=String((0,n.Tt)(r)),t.emit&&t.emit("createDsc",i),i}},44626:function(e,t,i){"use strict";i.d(t,{gi:function(){return l},yo:function(){return h}});var r=i(60195),s=i(1740),a=i(39150),o=i(82303),n=i(56217);function l(e,t){let{fingerprint:i,span:l,breadcrumbs:h,sdkProcessingMetadata:d}=t;(function(e,t){let{extra:i,tags:s,user:a,contexts:o,level:n,transactionName:l}=t,h=(0,r.Jr)(i);h&&Object.keys(h).length&&(e.extra={...h,...e.extra});let d=(0,r.Jr)(s);d&&Object.keys(d).length&&(e.tags={...d,...e.tags});let c=(0,r.Jr)(a);c&&Object.keys(c).length&&(e.user={...c,...e.user});let u=(0,r.Jr)(o);u&&Object.keys(u).length&&(e.contexts={...u,...e.contexts}),n&&(e.level=n),l&&(e.transaction=l)})(e,t),l&&function(e,t){e.contexts={trace:(0,n.wy)(t),...e.contexts};let i=(0,o.G)(t);if(i){e.sdkProcessingMetadata={dynamicSamplingContext:(0,a.j)(t),...e.sdkProcessingMetadata};let r=(0,n.XU)(i).description;r&&(e.tags={transaction:r,...e.tags})}}(e,l),e.fingerprint=e.fingerprint?(0,s.lE)(e.fingerprint):[],i&&(e.fingerprint=e.fingerprint.concat(i)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint,function(e,t){let i=[...e.breadcrumbs||[],...t];e.breadcrumbs=i.length?i:void 0}(e,h),e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...d}}function h(e,t){let{extra:i,tags:r,user:s,contexts:a,level:o,sdkProcessingMetadata:n,breadcrumbs:l,fingerprint:h,eventProcessors:c,attachments:u,propagationContext:p,transactionName:g,span:m}=t;d(e,"extra",i),d(e,"tags",r),d(e,"user",s),d(e,"contexts",a),d(e,"sdkProcessingMetadata",n),o&&(e.level=o),g&&(e.transactionName=g),m&&(e.span=m),l.length&&(e.breadcrumbs=[...e.breadcrumbs,...l]),h.length&&(e.fingerprint=[...e.fingerprint,...h]),c.length&&(e.eventProcessors=[...e.eventProcessors,...c]),u.length&&(e.attachments=[...e.attachments,...u]),e.propagationContext={...e.propagationContext,...p}}function d(e,t,i){if(i&&Object.keys(i).length)for(let r in e[t]={...e[t]},i)Object.prototype.hasOwnProperty.call(i,r)&&(e[t][r]=i[r])}},82303:function(e,t,i){"use strict";function r(e){return e.transaction}i.d(t,{G:function(){return r}})},95461:function(e,t,i){"use strict";i.d(t,{R:function(){return p},U0:function(){return m}});var r=i(1740),s=i(15389),a=i(37652),o=i(50304),n=i(25256),l=i(68053),h=i(63895),d=i(6348),c=i(44626),u=i(56217);function p(e,t,i,p,m,f){let{normalizeDepth:v=3,normalizeMaxBreadth:y=1e3}=e,C={...t,event_id:t.event_id||i.event_id||(0,r.DM)(),timestamp:t.timestamp||(0,s.yW)()},w=i.integrations||e.integrations.map(e=>e.name);(function(e,t){let{environment:i,release:r,dist:s,maxValueLength:o=250}=t;"environment"in e||(e.environment="environment"in t?i:l.J),void 0===e.release&&void 0!==r&&(e.release=r),void 0===e.dist&&void 0!==s&&(e.dist=s),e.message&&(e.message=(0,a.$G)(e.message,o));let n=e.exception&&e.exception.values&&e.exception.values[0];n&&n.value&&(n.value=(0,a.$G)(n.value,o));let h=e.request;h&&h.url&&(h.url=(0,a.$G)(h.url,o))})(C,e),w.length>0&&(C.sdk=C.sdk||{},C.sdk.integrations=[...C.sdk.integrations||[],...w]),void 0===t.type&&function(e,t){let i;let r=o.GLOBAL_OBJ._sentryDebugIds;if(!r)return;let s=g.get(t);s?i=s:(i=new Map,g.set(t,i));let a=Object.keys(r).reduce((e,s)=>{let a;let o=i.get(s);o?a=o:(a=t(s),i.set(s,a));for(let t=a.length-1;t>=0;t--){let i=a[t];if(i.filename){e[i.filename]=r[s];break}}return e},{});try{e.exception.values.forEach(e=>{e.stacktrace.frames.forEach(e=>{e.filename&&(e.debug_id=a[e.filename])})})}catch(e){}}(C,e.stackParser);let b=function(e,t){if(!t)return e;let i=e?e.clone():new d.sX;return i.update(t),i}(p,i.captureContext);i.mechanism&&(0,r.EG)(C,i.mechanism);let S=m&&m.getEventProcessors?m.getEventProcessors():[],x=(0,d.lW)().getScopeData();if(f){let e=f.getScopeData();(0,c.yo)(x,e)}if(b){let e=b.getScopeData();(0,c.yo)(x,e)}let M=[...i.attachments||[],...x.attachments];M.length&&(i.attachments=M),(0,c.gi)(C,x);let E=[...S,...(0,h.fH)(),...x.eventProcessors];return(0,h.RP)(E,C,i).then(e=>(e&&function(e){let t={};try{e.exception.values.forEach(e=>{e.stacktrace.frames.forEach(e=>{e.debug_id&&(e.abs_path?t[e.abs_path]=e.debug_id:e.filename&&(t[e.filename]=e.debug_id),delete e.debug_id)})})}catch(e){}if(0===Object.keys(t).length)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];let i=e.debug_meta.images;Object.keys(t).forEach(e=>{i.push({type:"sourcemap",code_file:e,debug_id:t[e]})})}(e),"number"==typeof v&&v>0)?function(e,t,i){if(!e)return null;let r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>({...e,...e.data&&{data:(0,n.Fv)(e.data,t,i)}}))},...e.user&&{user:(0,n.Fv)(e.user,t,i)},...e.contexts&&{contexts:(0,n.Fv)(e.contexts,t,i)},...e.extra&&{extra:(0,n.Fv)(e.extra,t,i)}};return e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=(0,n.Fv)(e.contexts.trace.data,t,i))),e.spans&&(r.spans=e.spans.map(e=>{let r=(0,u.XU)(e).data;return r&&(e.data=(0,n.Fv)(r,t,i)),e})),r}(e,v,y):e)}let g=new WeakMap;function m(e){return e?e instanceof d.sX||"function"==typeof e||Object.keys(e).some(e=>f.includes(e))?{captureContext:e}:e:void 0}let f=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"]},56217:function(e,t,i){"use strict";i.d(t,{$k:function(){return d},Hb:function(){return h},Tt:function(){return p},XU:function(){return u},i0:function(){return n},ve:function(){return o},wy:function(){return l}});var r=i(60195),s=i(22714),a=i(15389);let o=0,n=1;function l(e){let{spanId:t,traceId:i}=e.spanContext(),{data:s,op:a,parent_span_id:o,status:n,tags:l,origin:h}=u(e);return(0,r.Jr)({data:s,op:a,parent_span_id:o,span_id:t,status:n,tags:l,trace_id:i,origin:h})}function h(e){let{traceId:t,spanId:i}=e.spanContext(),r=p(e);return(0,s.$p)(t,i,r)}function d(e){return"number"==typeof e?c(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?c(e.getTime()):(0,a.ph)()}function c(e){return e>9999999999?e/1e3:e}function u(e){return"function"==typeof e.getSpanJSON?e.getSpanJSON():"function"==typeof e.toJSON?e.toJSON():{}}function p(e){let{traceFlags:t}=e.spanContext();return!!(t&n)}},60424:function(e,t,i){"use strict";i.d(t,{J:function(){return r}});let r="7.119.0"},49762:function(e,t,i){"use strict";i.d(t,{X:function(){return r}});let r=!1},80209:function(e,t,i){"use strict";let r,s,a,o,n,l,h,d,c,u,p,g,m,f,v,y,C,w,b,S,x,M,E;var D,I,k,T,A,R,L,P,F,N,O={};i.r(O),i.d(O,{FunctionToString:function(){return et},InboundFilters:function(){return en},LinkedErrors:function(){return em}});var B={};i.r(B),i.d(B,{Breadcrumbs:function(){return tm},Dedupe:function(){return tM},GlobalHandlers:function(){return eU},HttpContext:function(){return tb},LinkedErrors:function(){return ty},TryCatch:function(){return eq}});var G=i(60424);function z(e,t,i=[t],r="npm"){let s=e._metadata||{};s.sdk||(s.sdk={name:`sentry.javascript.${t}`,packages:i.map(e=>({name:`${r}:@sentry/${e}`,version:G.J})),version:G.J}),e._metadata=s}var _=i(41848);function V(e){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;let t=(0,_.s3)(),i=e||t&&t.getOptions();return!!i&&(i.enableTracing||"tracesSampleRate"in i||"tracesSampler"in i)}var j=i(60195),H=i(1740),U=i(22966),W=i(71743),$=i(63895),Y=i(22586);let K=[];function Z(e,t){for(let i of t)i&&i.afterAllSetup&&i.afterAllSetup(e)}function q(e,t,i){if(i[t.name]){W.X&&U.kg.log(`Integration skipped because it was already installed: ${t.name}`);return}if(i[t.name]=t,-1===K.indexOf(t.name)&&(t.setupOnce($.cc,Y.Gd),K.push(t.name)),t.setup&&"function"==typeof t.setup&&t.setup(e),e.on&&"function"==typeof t.preprocessEvent){let i=t.preprocessEvent.bind(t);e.on("preprocessEvent",(t,r)=>i(t,r,e))}if(e.addEventProcessor&&"function"==typeof t.processEvent){let i=t.processEvent.bind(t),r=Object.assign((t,r)=>i(t,r,e),{id:t.name});e.addEventProcessor(r)}W.X&&U.kg.log(`Integration installed: ${t.name}`)}function X(e,t){return Object.assign(function(...e){return t(...e)},{id:e})}let Q="FunctionToString",J=new WeakMap,ee=()=>({name:Q,setupOnce(){r=Function.prototype.toString;try{Function.prototype.toString=function(...e){let t=(0,j.HK)(this),i=J.has((0,_.s3)())&&void 0!==t?t:this;return r.apply(i,e)}}catch(e){}},setup(e){J.set(e,!0)}}),et=X(Q,ee);var ei=i(37652);let er=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/],es=[/^.*\/healthcheck$/,/^.*\/healthy$/,/^.*\/live$/,/^.*\/ready$/,/^.*\/heartbeat$/,/^.*\/health$/,/^.*\/healthz$/],ea="InboundFilters",eo=(e={})=>({name:ea,setupOnce(){},processEvent:(t,i,r)=>{var s,a;return((s=function(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:er],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[],...e.disableTransactionDefaults?[]:es],ignoreInternal:void 0===e.ignoreInternal||e.ignoreInternal}}(e,r.getOptions())).ignoreInternal&&function(e){try{return"SentryError"===e.exception.values[0].type}catch(e){}return!1}(t)?(W.X&&U.kg.warn(`Event dropped due to being internal Sentry Error.
Event: ${(0,H.jH)(t)}`),0):(a=s.ignoreErrors,!t.type&&a&&a.length&&(function(e){let t;let i=[];e.message&&i.push(e.message);try{t=e.exception.values[e.exception.values.length-1]}catch(e){}return t&&t.value&&(i.push(t.value),t.type&&i.push(`${t.type}: ${t.value}`)),W.X&&0===i.length&&U.kg.error(`Could not extract message for event ${(0,H.jH)(e)}`),i})(t).some(e=>(0,ei.U0)(e,a)))?(W.X&&U.kg.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
Event: ${(0,H.jH)(t)}`),0):!function(e,t){if("transaction"!==e.type||!t||!t.length)return!1;let i=e.transaction;return!!i&&(0,ei.U0)(i,t)}(t,s.ignoreTransactions)?!function(e,t){if(!t||!t.length)return!1;let i=el(e);return!!i&&(0,ei.U0)(i,t)}(t,s.denyUrls)?function(e,t){if(!t||!t.length)return!0;let i=el(e);return!i||(0,ei.U0)(i,t)}(t,s.allowUrls)||(W.X&&U.kg.warn(`Event dropped due to not being matched by \`allowUrls\` option.
Event: ${(0,H.jH)(t)}.
Url: ${el(t)}`),0):(W.X&&U.kg.warn(`Event dropped due to being matched by \`denyUrls\` option.
Event: ${(0,H.jH)(t)}.
Url: ${el(t)}`),0):(W.X&&U.kg.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
Event: ${(0,H.jH)(t)}`),0))?t:null}}),en=X(ea,eo);function el(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch(e){}return t?function(e=[]){for(let t=e.length-1;t>=0;t--){let i=e[t];if(i&&"<anonymous>"!==i.filename&&"[native code]"!==i.filename)return i.filename||null}return null}(t):null}catch(t){return W.X&&U.kg.error(`Cannot extract url for event ${(0,H.jH)(e)}`),null}}var eh=i(98035);function ed(e,t,i=250,r,s,a,o){if(!a.exception||!a.exception.values||!o||!(0,eh.V9)(o.originalException,Error))return;let n=a.exception.values.length>0?a.exception.values[a.exception.values.length-1]:void 0;n&&(a.exception.values=(function e(t,i,r,s,a,o,n,l){if(o.length>=r+1)return o;let h=[...o];if((0,eh.V9)(s[a],Error)){ec(n,l);let o=t(i,s[a]),d=h.length;eu(o,a,d,l),h=e(t,i,r,s[a],a,[o,...h],o,d)}return Array.isArray(s.errors)&&s.errors.forEach((s,o)=>{if((0,eh.V9)(s,Error)){ec(n,l);let d=t(i,s),c=h.length;eu(d,`errors[${o}]`,c,l),h=e(t,i,r,s,a,[d,...h],d,c)}}),h})(e,t,s,o.originalException,r,a.exception.values,n,0).map(e=>(e.value&&(e.value=(0,ei.$G)(e.value,i)),e)))}function ec(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,..."AggregateError"===e.type&&{is_exception_group:!0},exception_id:t}}function eu(e,t,i,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:i,parent_id:r}}function ep(e,t){let i={type:t.name||t.constructor.name,value:t.message},r=e(t.stack||"",1);return r.length&&(i.stacktrace={frames:r}),i}let eg="LinkedErrors",em=X(eg,(e={})=>{let t=e.limit||5,i=e.key||"cause";return{name:eg,setupOnce(){},preprocessEvent(e,r,s){let a=s.getOptions();ed(ep,a.stackParser,a.maxValueLength,i,t,e,r)}}});var ef=i(50304);let ev=ef.GLOBAL_OBJ,ey=0;function eC(e,t={},i){if("function"!=typeof e)return e;try{let t=e.__sentry_wrapped__;if(t)return t;if((0,j.HK)(e))return e}catch(t){return e}let r=function(){let r=Array.prototype.slice.call(arguments);try{i&&"function"==typeof i&&i.apply(this,arguments);let s=r.map(e=>eC(e,t));return e.apply(this,s)}catch(e){throw ey++,setTimeout(()=>{ey--}),(0,_.$e)(i=>{i.addEventProcessor(e=>(t.mechanism&&((0,H.Db)(e,void 0,void 0),(0,H.EG)(e,t.mechanism)),e.extra={...e.extra,arguments:r},e)),(0,_.Tb)(e)}),e}};try{for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t])}catch(e){}(0,j.$Q)(r,e),(0,j.xp)(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get:()=>e.name})}catch(e){}return r}var ew=i(64842),eb=i(33183);let eS={},ex={};function eM(e,t){eS[e]=eS[e]||[],eS[e].push(t)}function eE(e,t){ex[e]||(t(),ex[e]=!0)}function eD(e,t){let i=e&&eS[e];if(i)for(let r of i)try{r(t)}catch(t){ew.X&&U.kg.error(`Error while triggering instrumentation handler.
Type: ${e}
Name: ${(0,eb.$P)(r)}
Error:`,t)}}let eI=null;function ek(e){let t="error";eM(t,e),eE(t,eT)}function eT(){eI=ef.GLOBAL_OBJ.onerror,ef.GLOBAL_OBJ.onerror=function(e,t,i,r,s){return eD("error",{column:r,error:s,line:i,msg:e,url:t}),!!eI&&!eI.__SENTRY_LOADER__&&eI.apply(this,arguments)},ef.GLOBAL_OBJ.onerror.__SENTRY_INSTRUMENTED__=!0}let eA=null;function eR(e){let t="unhandledrejection";eM(t,e),eE(t,eL)}function eL(){eA=ef.GLOBAL_OBJ.onunhandledrejection,ef.GLOBAL_OBJ.onunhandledrejection=function(e){return eD("unhandledrejection",e),!eA||!!eA.__SENTRY_LOADER__||eA.apply(this,arguments)},ef.GLOBAL_OBJ.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}var eP=i(8686),eF=i(25256),eN=i(71530);function eO(e,t){let i=eG(e,t),r={type:t&&t.name,value:function(e){let t=e&&e.message;return t?t.error&&"string"==typeof t.error.message?t.error.message:t:"No error message"}(t)};return i.length&&(r.stacktrace={frames:i}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function eB(e,t){return{exception:{values:[eO(e,t)]}}}function eG(e,t){let i=t.stacktrace||t.stack||"",r=function(e){if(e){if("number"==typeof e.framesToPop)return e.framesToPop;if(ez.test(e.message))return 1}return 0}(t);try{return e(i,r)}catch(e){}return[]}let ez=/Minified React error #\d+;/i;function e_(e,t,i,r,s){let a;if((0,eh.VW)(t)&&t.error)return eB(e,t.error);if((0,eh.TX)(t)||(0,eh.fm)(t)){if("stack"in t)a=eB(e,t);else{let s=t.name||((0,eh.TX)(t)?"DOMError":"DOMException"),o=t.message?`${s}: ${t.message}`:s;a=eV(e,o,i,r),(0,H.Db)(a,o)}return"code"in t&&(a.tags={...a.tags,"DOMException.code":`${t.code}`}),a}return(0,eh.VZ)(t)?eB(e,t):((0,eh.PO)(t)||(0,eh.cO)(t)?a=function(e,t,i,r){let s=(0,_.s3)(),a=s&&s.getOptions().normalizeDepth,o={exception:{values:[{type:(0,eh.cO)(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:function(e,{isUnhandledRejection:t}){let i=(0,j.zf)(e),r=t?"promise rejection":"exception";if((0,eh.VW)(e))return`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``;if((0,eh.cO)(e)){let t=function(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch(e){}}(e);return`Event \`${t}\` (type=${e.type}) captured as ${r}`}return`Object captured as ${r} with keys: ${i}`}(t,{isUnhandledRejection:r})}]},extra:{__serialized__:(0,eF.Qy)(t,a)}};if(i){let t=eG(e,i);t.length&&(o.exception.values[0].stacktrace={frames:t})}return o}(e,t,i,s):(a=eV(e,t,i,r),(0,H.Db)(a,`${t}`,void 0)),(0,H.EG)(a,{synthetic:!0}),a)}function eV(e,t,i,r){let s={};if(r&&i){let r=eG(e,i);r.length&&(s.exception={values:[{value:t,stacktrace:{frames:r}}]})}if((0,eh.Le)(t)){let{__sentry_template_string__:e,__sentry_template_values__:i}=t;return s.logentry={message:e,params:i},s}return s.message=t,s}let ej="GlobalHandlers",eH=(e={})=>{let t={onerror:!0,onunhandledrejection:!0,...e};return{name:ej,setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&ek(t=>{let{stackParser:i,attachStacktrace:r}=e$();if((0,_.s3)()!==e||ey>0)return;let{msg:s,url:a,line:o,column:n,error:l}=t,h=void 0===l&&(0,eh.HD)(s)?function(e,t,i,r){let s=(0,eh.VW)(e)?e.message:e,a="Error",o=s.match(/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i);return o&&(a=o[1],s=o[2]),eW({exception:{values:[{type:a,value:s}]}},t,i,r)}(s,a,o,n):eW(e_(i,l||s,void 0,r,!1),a,o,n);h.level="error",(0,_.eN)(h,{originalException:l,mechanism:{handled:!1,type:"onerror"}})}),t.onunhandledrejection&&eR(t=>{let{stackParser:i,attachStacktrace:r}=e$();if((0,_.s3)()!==e||ey>0)return;let s=function(e){if((0,eh.pt)(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch(e){}return e}(t),a=(0,eh.pt)(s)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(s)}`}]}}:e_(i,s,void 0,r,!0);a.level="error",(0,_.eN)(a,{originalException:s,mechanism:{handled:!1,type:"onunhandledrejection"}})})}}},eU=X(ej,eH);function eW(e,t,i,r){let s=e.exception=e.exception||{},a=s.values=s.values||[],o=a[0]=a[0]||{},n=o.stacktrace=o.stacktrace||{},l=n.frames=n.frames||[],h=isNaN(parseInt(r,10))?void 0:r,d=isNaN(parseInt(i,10))?void 0:i,c=(0,eh.HD)(t)&&t.length>0?t:(0,eP.l4)();return 0===l.length&&l.push({colno:h,filename:c,function:"?",in_app:!0,lineno:d}),e}function e$(){let e=(0,_.s3)();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}let eY=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],eK="TryCatch",eZ=(e={})=>{let t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:eK,setupOnce(){t.setTimeout&&(0,j.hl)(ev,"setTimeout",eX),t.setInterval&&(0,j.hl)(ev,"setInterval",eX),t.requestAnimationFrame&&(0,j.hl)(ev,"requestAnimationFrame",eQ),t.XMLHttpRequest&&"XMLHttpRequest"in ev&&(0,j.hl)(XMLHttpRequest.prototype,"send",eJ);let e=t.eventTarget;e&&(Array.isArray(e)?e:eY).forEach(e0)}}},eq=X(eK,eZ);function eX(e){return function(...t){let i=t[0];return t[0]=eC(i,{mechanism:{data:{function:(0,eb.$P)(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function eQ(e){return function(t){return e.apply(this,[eC(t,{mechanism:{data:{function:"requestAnimationFrame",handler:(0,eb.$P)(e)},handled:!1,type:"instrument"}})])}}function eJ(e){return function(...t){let i=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(e=>{e in i&&"function"==typeof i[e]&&(0,j.hl)(i,e,function(t){let i={mechanism:{data:{function:e,handler:(0,eb.$P)(t)},handled:!1,type:"instrument"}},r=(0,j.HK)(t);return r&&(i.mechanism.data.handler=(0,eb.$P)(r)),eC(t,i)})}),e.apply(this,t)}}function e0(e){let t=ev[e]&&ev[e].prototype;t&&t.hasOwnProperty&&t.hasOwnProperty("addEventListener")&&((0,j.hl)(t,"addEventListener",function(t){return function(i,r,s){try{"function"==typeof r.handleEvent&&(r.handleEvent=eC(r.handleEvent,{mechanism:{data:{function:"handleEvent",handler:(0,eb.$P)(r),target:e},handled:!1,type:"instrument"}}))}catch(e){}return t.apply(this,[i,eC(r,{mechanism:{data:{function:"addEventListener",handler:(0,eb.$P)(r),target:e},handled:!1,type:"instrument"}}),s])}}),(0,j.hl)(t,"removeEventListener",function(e){return function(t,i,r){try{let s=i&&i.__sentry_wrapped__;s&&e.call(this,t,s,r)}catch(e){}return e.call(this,t,i,r)}}))}function e1(){"console"in ef.GLOBAL_OBJ&&U.RU.forEach(function(e){e in ef.GLOBAL_OBJ.console&&(0,j.hl)(ef.GLOBAL_OBJ.console,e,function(t){return U.LD[e]=t,function(...t){eD("console",{args:t,level:e});let i=U.LD[e];i&&i.apply(ef.GLOBAL_OBJ.console,t)}})})}let e2=ef.GLOBAL_OBJ;function e3(e){eM("dom",e),eE("dom",e4)}function e4(){if(!e2.document)return;let e=eD.bind(null,"dom"),t=e6(e,!0);e2.document.addEventListener("click",t,!1),e2.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(t=>{let i=e2[t]&&e2[t].prototype;i&&i.hasOwnProperty&&i.hasOwnProperty("addEventListener")&&((0,j.hl)(i,"addEventListener",function(t){return function(i,r,s){if("click"===i||"keypress"==i)try{let r=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},a=r[i]=r[i]||{refCount:0};if(!a.handler){let r=e6(e);a.handler=r,t.call(this,i,r,s)}a.refCount++}catch(e){}return t.call(this,i,r,s)}}),(0,j.hl)(i,"removeEventListener",function(e){return function(t,i,r){if("click"===t||"keypress"==t)try{let i=this.__sentry_instrumentation_handlers__||{},s=i[t];s&&(s.refCount--,s.refCount<=0&&(e.call(this,t,s.handler,r),s.handler=void 0,delete i[t]),0===Object.keys(i).length&&delete this.__sentry_instrumentation_handlers__)}catch(e){}return e.call(this,t,i,r)}}))})}function e6(e,t=!1){return i=>{if(!i||i._sentryCaptured)return;let r=function(e){try{return e.target}catch(e){return null}}(i);if("keypress"===i.type&&(!r||!r.tagName||"INPUT"!==r.tagName&&"TEXTAREA"!==r.tagName&&!r.isContentEditable))return;(0,j.xp)(i,"_sentryCaptured",!0),r&&!r._sentryId&&(0,j.xp)(r,"_sentryId",(0,H.DM)());let n="keypress"===i.type?"input":i.type;!function(e){if(e.type!==a)return!1;try{if(!e.target||e.target._sentryId!==o)return!1}catch(e){}return!0}(i)&&(e({event:i,name:n,global:t}),a=i.type,o=r?r._sentryId:void 0),clearTimeout(s),s=e2.setTimeout(()=>{o=void 0,a=void 0},1e3)}}let e5=ef.GLOBAL_OBJ,e8="__sentry_xhr_v3__";function e7(e){eM("xhr",e),eE("xhr",e9)}function e9(){if(!e5.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;(0,j.hl)(e,"open",function(e){return function(...t){let i=Date.now(),r=(0,eh.HD)(t[0])?t[0].toUpperCase():void 0,s=function(e){if((0,eh.HD)(e))return e;try{return e.toString()}catch(e){}}(t[1]);if(!r||!s)return e.apply(this,t);this[e8]={method:r,url:s,request_headers:{}},"POST"===r&&s.match(/sentry_key/)&&(this.__sentry_own_request__=!0);let a=()=>{let e=this[e8];if(e&&4===this.readyState){try{e.status_code=this.status}catch(e){}eD("xhr",{args:[r,s],endTimestamp:Date.now(),startTimestamp:i,xhr:this})}};return"onreadystatechange"in this&&"function"==typeof this.onreadystatechange?(0,j.hl)(this,"onreadystatechange",function(e){return function(...t){return a(),e.apply(this,t)}}):this.addEventListener("readystatechange",a),(0,j.hl)(this,"setRequestHeader",function(e){return function(...t){let[i,r]=t,s=this[e8];return s&&(0,eh.HD)(i)&&(0,eh.HD)(r)&&(s.request_headers[i.toLowerCase()]=r),e.apply(this,t)}}),e.apply(this,t)}}),(0,j.hl)(e,"send",function(e){return function(...t){let i=this[e8];return i&&(void 0!==t[0]&&(i.body=t[0]),eD("xhr",{args:[i.method,i.url],startTimestamp:Date.now(),xhr:this})),e.apply(this,t)}})}let te=(0,ef.R)();function tt(){if(!("fetch"in te))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(e){return!1}}function ti(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function tr(e){let t="fetch";eM(t,e),eE(t,ts)}function ts(){(function(){if("string"==typeof EdgeRuntime)return!0;if(!tt())return!1;if(ti(te.fetch))return!0;let e=!1,t=te.document;if(t&&"function"==typeof t.createElement)try{let i=t.createElement("iframe");i.hidden=!0,t.head.appendChild(i),i.contentWindow&&i.contentWindow.fetch&&(e=ti(i.contentWindow.fetch)),t.head.removeChild(i)}catch(e){ew.X&&U.kg.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return e})()&&(0,j.hl)(ef.GLOBAL_OBJ,"fetch",function(e){return function(...t){let{method:i,url:r}=function(e){if(0===e.length)return{method:"GET",url:""};if(2===e.length){let[t,i]=e;return{url:to(t),method:ta(i,"method")?String(i.method).toUpperCase():"GET"}}let t=e[0];return{url:to(t),method:ta(t,"method")?String(t.method).toUpperCase():"GET"}}(t),s={args:t,fetchData:{method:i,url:r},startTimestamp:Date.now()};return eD("fetch",{...s}),e.apply(ef.GLOBAL_OBJ,t).then(e=>(eD("fetch",{...s,endTimestamp:Date.now(),response:e}),e),e=>{throw eD("fetch",{...s,endTimestamp:Date.now(),error:e}),e})}})}function ta(e,t){return!!e&&"object"==typeof e&&!!e[t]}function to(e){return"string"==typeof e?e:e?ta(e,"url")?e.url:e.toString?e.toString():"":""}let tn=(0,ef.R)(),tl=ef.GLOBAL_OBJ;function th(e){let t="history";eM(t,e),eE(t,td)}function td(){if(!function(){let e=tn.chrome,t=e&&e.app&&e.app.runtime,i="history"in tn&&!!tn.history.pushState&&!!tn.history.replaceState;return!t&&i}())return;let e=tl.onpopstate;function t(e){return function(...t){let i=t.length>2?t[2]:void 0;if(i){let e=n,t=String(i);n=t,eD("history",{from:e,to:t})}return e.apply(this,t)}}tl.onpopstate=function(...t){let i=tl.location.href,r=n;if(n=i,eD("history",{from:r,to:i}),e)try{return e.apply(this,t)}catch(e){}},(0,j.hl)(tl.history,"pushState",t),(0,j.hl)(tl.history,"replaceState",t)}let tc=["fatal","error","warning","log","info","debug"];function tu(e){if(!e)return{};let t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};let i=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:i,hash:r,relative:t[5]+i+r}}let tp="Breadcrumbs",tg=(e={})=>{let t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:tp,setupOnce(){},setup(e){var i;t.console&&function(e){let t="console";eM(t,e),eE(t,e1)}(function(t){var i;if((0,_.s3)()!==e)return;let r={category:"console",data:{arguments:t.args,logger:"console"},level:"warn"===(i=t.level)?"warning":tc.includes(i)?i:"log",message:(0,ei.nK)(t.args," ")};if("assert"===t.level){if(!1!==t.args[0])return;r.message=`Assertion failed: ${(0,ei.nK)(t.args.slice(1)," ")||"console.assert"}`,r.data.arguments=t.args.slice(1)}(0,_.n_)(r,{input:t.args,level:t.level})}),t.dom&&e3((i=t.dom,function(t){let r,s;if((0,_.s3)()!==e)return;let a="object"==typeof i?i.serializeAttribute:void 0,o="object"==typeof i&&"number"==typeof i.maxStringLength?i.maxStringLength:void 0;o&&o>1024&&(o=1024),"string"==typeof a&&(a=[a]);try{let e=t.event,i=e&&e.target?e.target:e;r=(0,eP.Rt)(i,{keyAttrs:a,maxStringLength:o}),s=(0,eP.iY)(i)}catch(e){r="<unknown>"}if(0===r.length)return;let n={category:`ui.${t.name}`,message:r};s&&(n.data={"ui.component_name":s}),(0,_.n_)(n,{event:t.event,name:t.name,global:t.global})})),t.xhr&&e7(function(t){if((0,_.s3)()!==e)return;let{startTimestamp:i,endTimestamp:r}=t,s=t.xhr[e8];if(!i||!r||!s)return;let{method:a,url:o,status_code:n,body:l}=s,h={xhr:t.xhr,input:l,startTimestamp:i,endTimestamp:r};(0,_.n_)({category:"xhr",data:{method:a,url:o,status_code:n},type:"http"},h)}),t.fetch&&tr(function(t){if((0,_.s3)()!==e)return;let{startTimestamp:i,endTimestamp:r}=t;if(!(!r||t.fetchData.url.match(/sentry_key/)&&"POST"===t.fetchData.method)){if(t.error){let e=t.fetchData,s={data:t.error,input:t.args,startTimestamp:i,endTimestamp:r};(0,_.n_)({category:"fetch",data:e,level:"error",type:"http"},s)}else{let e=t.response,s={...t.fetchData,status_code:e&&e.status},a={input:t.args,response:e,startTimestamp:i,endTimestamp:r};(0,_.n_)({category:"fetch",data:s,type:"http"},a)}}}),t.history&&th(function(t){if((0,_.s3)()!==e)return;let i=t.from,r=t.to,s=tu(ev.location.href),a=i?tu(i):void 0,o=tu(r);a&&a.path||(a=s),s.protocol===o.protocol&&s.host===o.host&&(r=o.relative),s.protocol===a.protocol&&s.host===a.host&&(i=a.relative),(0,_.n_)({category:"navigation",data:{from:i,to:r}})}),t.sentry&&e.on&&e.on("beforeSendEvent",function(t){(0,_.s3)()===e&&(0,_.n_)({category:`sentry.${"transaction"===t.type?"transaction":"event"}`,event_id:t.event_id,level:t.level,message:(0,H.jH)(t)},{event:t})})}}},tm=X(tp,tg),tf="LinkedErrors",tv=(e={})=>{let t=e.limit||5,i=e.key||"cause";return{name:tf,setupOnce(){},preprocessEvent(e,r,s){let a=s.getOptions();ed(eO,a.stackParser,a.maxValueLength,i,t,e,r)}}},ty=X(tf,tv),tC="HttpContext",tw=()=>({name:tC,setupOnce(){},preprocessEvent(e){if(!ev.navigator&&!ev.location&&!ev.document)return;let t=e.request&&e.request.url||ev.location&&ev.location.href,{referrer:i}=ev.document||{},{userAgent:r}=ev.navigator||{},s={...e.request&&e.request.headers,...i&&{Referer:i},...r&&{"User-Agent":r}},a={...e.request,...t&&{url:t},headers:s};e.request=a}}),tb=X(tC,tw),tS="Dedupe",tx=()=>{let e;return{name:tS,setupOnce(){},processEvent(t){if(t.type)return t;try{var i;if((i=e)&&(function(e,t){let i=e.message,r=t.message;return!!((i||r)&&(!i||r)&&(i||!r)&&i===r&&tD(e,t)&&tE(e,t))}(t,i)||function(e,t){let i=tI(t),r=tI(e);return!!(i&&r&&i.type===r.type&&i.value===r.value&&tD(e,t)&&tE(e,t))}(t,i)))return null}catch(e){}return e=t}}},tM=X(tS,tx);function tE(e,t){let i=tk(e),r=tk(t);if(!i&&!r)return!0;if(i&&!r||!i&&r||r.length!==i.length)return!1;for(let e=0;e<r.length;e++){let t=r[e],s=i[e];if(t.filename!==s.filename||t.lineno!==s.lineno||t.colno!==s.colno||t.function!==s.function)return!1}return!0}function tD(e,t){let i=e.fingerprint,r=t.fingerprint;if(!i&&!r)return!0;if(i&&!r||!i&&r)return!1;try{return!(i.join("")!==r.join(""))}catch(e){return!1}}function tI(e){return e.exception&&e.exception.values&&e.exception.values[0]}function tk(e){let t=e.exception;if(t)try{return t.values[0].stacktrace.frames}catch(e){}}let tT={};ev.Sentry&&ev.Sentry.Integrations&&(tT=ev.Sentry.Integrations);let tA={...tT,...O,...B},tR=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function tL(e,t=!1){let{host:i,path:r,pass:s,port:a,projectId:o,protocol:n,publicKey:l}=e;return`${n}://${l}${t&&s?`:${s}`:""}@${i}${a?`:${a}`:""}/${r?`${r}/`:r}${o}`}function tP(e){let t=tR.exec(e);if(!t){(0,U.Cf)(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}let[i,r,s="",a,o="",n]=t.slice(1),l="",h=n,d=h.split("/");if(d.length>1&&(l=d.slice(0,-1).join("/"),h=d.pop()),h){let e=h.match(/^\d+/);e&&(h=e[0])}return tF({host:a,pass:s,path:l,projectId:h,port:o,protocol:i,publicKey:r})}function tF(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function tN(e,t=[]){return[e,t]}function tO(e,t){for(let i of e[1]){let e=i[0].type;if(t(i,e))return!0}return!1}function tB(e,t){return(t||new TextEncoder).encode(e)}let tG={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket"};function tz(e){if(!e||!e.sdk)return;let{name:t,version:i}=e.sdk;return{name:t,version:i}}function t_(e,t,i,r){let s=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!i&&r&&{dsn:tL(r)},...s&&{trace:(0,j.Jr)({...s})}}}class tV extends Error{constructor(e,t="warn"){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=t}}var tj=i(55274),tH=i(39150),tU=i(95461);let tW="Not capturing exception because it's already been captured.";class t${constructor(e){if(this._options=e,this._integrations={},this._integrationsInitialized=!1,this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=function(e){let t="string"==typeof e?tP(e):tF(e);if(t&&function(e){if(!ew.X)return!0;let{port:t,projectId:i,protocol:r}=e;return!["protocol","publicKey","host","projectId"].find(t=>!e[t]&&(U.kg.error(`Invalid Sentry Dsn: ${t} missing`),!0))&&(i.match(/^\d+$/)?"http"===r||"https"===r?!(t&&isNaN(parseInt(t,10)))||(U.kg.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):(U.kg.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(U.kg.error(`Invalid Sentry Dsn: Invalid projectId ${i}`),!1))}(t))return t}(e.dsn):W.X&&U.kg.warn("No DSN provided, client will not send events."),this._dsn){let t=function(e,t={}){let i="string"==typeof t?t:t.tunnel,r="string"!=typeof t&&t._metadata?t._metadata.sdk:void 0;return i||`${function(e){let t=e.protocol?`${e.protocol}:`:"",i=e.port?`:${e.port}`:"";return`${t}//${e.host}${i}${e.path?`/${e.path}`:""}/api/`}(e)}${e.projectId}/envelope/?${(0,j._j)({sentry_key:e.publicKey,sentry_version:"7",...r&&{sentry_client:`${r.name}/${r.version}`}})}`}(this._dsn,e);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}}captureException(e,t,i){if((0,H.YO)(e)){W.X&&U.kg.log(tW);return}let r=t&&t.event_id;return this._process(this.eventFromException(e,t).then(e=>this._captureEvent(e,t,i)).then(e=>{r=e})),r}captureMessage(e,t,i,r){let s=i&&i.event_id,a=(0,eh.Le)(e)?e:String(e),o=(0,eh.pt)(e)?this.eventFromMessage(a,t,i):this.eventFromException(e,i);return this._process(o.then(e=>this._captureEvent(e,i,r)).then(e=>{s=e})),s}captureEvent(e,t,i){if(t&&t.originalException&&(0,H.YO)(t.originalException)){W.X&&U.kg.log(tW);return}let r=t&&t.event_id,s=(e.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(e,t,s||i).then(e=>{r=e})),r}captureSession(e){"string"!=typeof e.release?W.X&&U.kg.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),(0,tj.CT)(e,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){let t=this._transport;return t?(this.metricsAggregator&&this.metricsAggregator.flush(),this._isClientDoneProcessing(e).then(i=>t.flush(e).then(e=>i&&e))):(0,eN.WD)(!0)}close(e){return this.flush(e).then(e=>(this.getOptions().enabled=!1,this.metricsAggregator&&this.metricsAggregator.close(),e))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}setupIntegrations(e){(e&&!this._integrationsInitialized||this._isEnabled()&&!this._integrationsInitialized)&&this._setupIntegrations()}init(){this._isEnabled()&&this._setupIntegrations()}getIntegrationById(e){return this.getIntegrationByName(e)}getIntegrationByName(e){return this._integrations[e]}getIntegration(e){try{return this._integrations[e.id]||null}catch(t){return W.X&&U.kg.warn(`Cannot retrieve integration ${e.id} from the current Client`),null}}addIntegration(e){let t=this._integrations[e.name];q(this,e,this._integrations),t||Z(this,[e])}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);let i=function(e,t,i,r){var s;let a=tz(i),o=e.type&&"replay_event"!==e.type?e.type:"event";(s=i&&i.sdk)&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||s.name,e.sdk.version=e.sdk.version||s.version,e.sdk.integrations=[...e.sdk.integrations||[],...s.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...s.packages||[]]);let n=t_(e,a,r,t);return delete e.sdkProcessingMetadata,tN(n,[[{type:o},e]])}(e,this._dsn,this._options._metadata,this._options.tunnel);for(let e of t.attachments||[])i=function(e,t){let[i,r]=e;return[i,[...r,t]]}(i,function(e,t){let i="string"==typeof e.data?tB(e.data,t):e.data;return[(0,j.Jr)({type:"attachment",length:i.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),i]}(e,this._options.transportOptions&&this._options.transportOptions.textEncoder));let r=this._sendEnvelope(i);r&&r.then(t=>this.emit("afterSendEvent",e,t),null)}sendSession(e){let t=function(e,t,i,r){let s=tz(i);return tN({sent_at:new Date().toISOString(),...s&&{sdk:s},...!!r&&t&&{dsn:tL(t)}},["aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()]])}(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(t)}recordDroppedEvent(e,t,i){if(this._options.sendClientReports){let r="number"==typeof i?i:1,s=`${e}:${t}`;W.X&&U.kg.log(`Recording outcome: "${s}"${r>1?` (${r} times)`:""}`),this._outcomes[s]=(this._outcomes[s]||0)+r}}captureAggregateMetrics(e){W.X&&U.kg.log(`Flushing aggregated metrics, number of metrics: ${e.length}`);let t=function(e,t,i,r){let s={sent_at:new Date().toISOString()};return i&&i.sdk&&(s.sdk={name:i.sdk.name,version:i.sdk.version}),r&&t&&(s.dsn=tL(t)),tN(s,[function(e){let t=function(e){let t="";for(let i of e){let e=Object.entries(i.tags),r=e.length>0?`|#${e.map(([e,t])=>`${e}:${t}`).join(",")}`:"";t+=`${i.name}@${i.unit}:${i.metric}|${i.metricType}${r}|T${i.timestamp}
`}return t}(e);return[{type:"statsd",length:t.length},t]}(e)])}(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(t)}on(e,t){this._hooks[e]||(this._hooks[e]=[]),this._hooks[e].push(t)}emit(e,...t){this._hooks[e]&&this._hooks[e].forEach(e=>e(...t))}_setupIntegrations(){let{integrations:e}=this._options;this._integrations=function(e,t){let i={};return t.forEach(t=>{t&&q(e,t,i)}),i}(this,e),Z(this,e),this._integrationsInitialized=!0}_updateSessionFromEvent(e,t){let i=!1,r=!1,s=t.exception&&t.exception.values;if(s)for(let e of(r=!0,s)){let t=e.mechanism;if(t&&!1===t.handled){i=!0;break}}let a="ok"===e.status;(a&&0===e.errors||a&&i)&&((0,tj.CT)(e,{...i&&{status:"crashed"},errors:e.errors||Number(r||i)}),this.captureSession(e))}_isClientDoneProcessing(e){return new eN.cW(t=>{let i=0,r=setInterval(()=>{0==this._numProcessing?(clearInterval(r),t(!0)):(i+=1,e&&i>=e&&(clearInterval(r),t(!1)))},1)})}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._transport}_prepareEvent(e,t,i,r=(0,Y.aF)()){let s=this.getOptions(),a=Object.keys(this._integrations);return!t.integrations&&a.length>0&&(t.integrations=a),this.emit("preprocessEvent",e,t),(0,tU.R)(s,e,t,i,this,r).then(e=>{if(null===e)return e;let t={...r.getPropagationContext(),...i?i.getPropagationContext():void 0};if(!(e.contexts&&e.contexts.trace)&&t){let{traceId:r,spanId:s,parentSpanId:a,dsc:o}=t;e.contexts={trace:{trace_id:r,span_id:s,parent_span_id:a},...e.contexts};let n=o||(0,tH._)(r,this,i);e.sdkProcessingMetadata={dynamicSamplingContext:n,...e.sdkProcessingMetadata}}return e})}_captureEvent(e,t={},i){return this._processEvent(e,t,i).then(e=>e.event_id,e=>{W.X&&("log"===e.logLevel?U.kg.log(e.message):U.kg.warn(e))})}_processEvent(e,t,i){let r=this.getOptions(),{sampleRate:s}=r,a=tK(e),o=tY(e),n=e.type||"error",l=`before send for type \`${n}\``;if(o&&"number"==typeof s&&Math.random()>s)return this.recordDroppedEvent("sample_rate","error",e),(0,eN.$2)(new tV(`Discarding event because it's not included in the random sample (sampling rate = ${s})`,"log"));let h="replay_event"===n?"replay":n,d=(e.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(e,t,i,d).then(i=>{if(null===i)throw this.recordDroppedEvent("event_processor",h,e),new tV("An event processor returned `null`, will not send event.","log");return t.data&&!0===t.data.__sentry__?i:function(e,t){let i=`${t} must return \`null\` or a valid event.`;if((0,eh.J8)(e))return e.then(e=>{if(!(0,eh.PO)(e)&&null!==e)throw new tV(i);return e},e=>{throw new tV(`${t} rejected with ${e}`)});if(!(0,eh.PO)(e)&&null!==e)throw new tV(i);return e}(function(e,t,i){let{beforeSend:r,beforeSendTransaction:s}=e;if(tY(t)&&r)return r(t,i);if(tK(t)&&s){if(t.spans){let e=t.spans.length;t.sdkProcessingMetadata={...t.sdkProcessingMetadata,spanCountBeforeProcessing:e}}return s(t,i)}return t}(r,i,t),l)}).then(r=>{if(null===r){if(this.recordDroppedEvent("before_send",h,e),a){let t=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",t)}throw new tV(`${l} returned \`null\`, will not send event.`,"log")}let s=i&&i.getSession();if(!a&&s&&this._updateSessionFromEvent(s,r),a){let e=(r.sdkProcessingMetadata&&r.sdkProcessingMetadata.spanCountBeforeProcessing||0)-(r.spans?r.spans.length:0);e>0&&this.recordDroppedEvent("before_send","span",e)}let o=r.transaction_info;return a&&o&&r.transaction!==e.transaction&&(r.transaction_info={...o,source:"custom"}),this.sendEvent(r,t),r}).then(null,e=>{if(e instanceof tV)throw e;throw this.captureException(e,{data:{__sentry__:!0},originalException:e}),new tV(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
Reason: ${e}`)})}_process(e){this._numProcessing++,e.then(e=>(this._numProcessing--,e),e=>(this._numProcessing--,e))}_sendEnvelope(e){if(this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport)return this._transport.send(e).then(null,e=>{W.X&&U.kg.error("Error while sending event:",e)});W.X&&U.kg.error("Transport disabled")}_clearOutcomes(){let e=this._outcomes;return this._outcomes={},Object.keys(e).map(t=>{let[i,r]=t.split(":");return{reason:i,category:r,quantity:e[t]}})}}function tY(e){return void 0===e.type}function tK(e){return"transaction"===e.type}var tZ=i(39119),tq=i(15389);class tX extends t${constructor(e){z(e,"browser",["browser"],ev.SENTRY_SDK_SOURCE||(0,tZ.S)()),super(e),e.sendClientReports&&ev.document&&ev.document.addEventListener("visibilitychange",()=>{"hidden"===ev.document.visibilityState&&this._flushOutcomes()})}eventFromException(e,t){return function(e,t,i,r){let s=e_(e,t,i&&i.syntheticException||void 0,r);return(0,H.EG)(s),s.level="error",i&&i.event_id&&(s.event_id=i.event_id),(0,eN.WD)(s)}(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",i){return function(e,t,i="info",r,s){let a=eV(e,t,r&&r.syntheticException||void 0,s);return a.level=i,r&&r.event_id&&(a.event_id=r.event_id),(0,eN.WD)(a)}(this._options.stackParser,e,t,i,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled())return;let t=function(e,{metadata:t,tunnel:i,dsn:r}){return tN({event_id:e.event_id,sent_at:new Date().toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!i&&!!r&&{dsn:tL(r)}},[[{type:"user_report"},e]])}(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(t)}_prepareEvent(e,t,i){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,i)}_flushOutcomes(){var e;let t=this._clearOutcomes();if(0===t.length||!this._dsn)return;let i=tN((e=this._options.tunnel&&tL(this._dsn))?{dsn:e}:{},[[{type:"client_report"},{timestamp:(0,tq.yW)(),discarded_events:t}]]);this._sendEnvelope(i)}}function tQ(e,t,i,r){let s={filename:e,function:t,in_app:!0};return void 0!==i&&(s.lineno=i),void 0!==r&&(s.colno=r),s}let tJ=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,t0=/\((\S*)(?::(\d+))(?::(\d+))\)/,t1=[30,e=>{let t=tJ.exec(e);if(t){if(t[2]&&0===t[2].indexOf("eval")){let e=t0.exec(t[2]);e&&(t[2]=e[1],t[3]=e[2],t[4]=e[3])}let[e,i]=t8(t[1]||"?",t[2]);return tQ(i,e,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}}],t2=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,t3=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,t4=[50,e=>{let t=t2.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){let e=t3.exec(t[3]);e&&(t[1]=t[1]||"eval",t[3]=e[1],t[4]=e[2],t[5]="")}let e=t[3],i=t[1]||"?";return[i,e]=t8(i,e),tQ(e,i,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}],t6=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,t5=(0,eb.pE)(t1,t4,[40,e=>{let t=t6.exec(e);return t?tQ(t[2],t[1]||"?",+t[3],t[4]?+t[4]:void 0):void 0}]),t8=(e,t)=>{let i=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return i||r?[-1!==e.indexOf("@")?e.split("@")[0]:"?",i?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};function t7(e,t,i=Date.now()){return(e[t]||e.all||0)>i}function t9(e,{statusCode:t,headers:i},r=Date.now()){let s={...e},a=i&&i["x-sentry-rate-limits"],o=i&&i["retry-after"];if(a)for(let e of a.trim().split(",")){let[t,i,,,a]=e.split(":",5),o=parseInt(t,10),n=(isNaN(o)?60:o)*1e3;if(i)for(let e of i.split(";"))"metric_bucket"===e?(!a||a.split(";").includes("custom"))&&(s[e]=r+n):s[e]=r+n;else s.all=r+n}else o?s.all=r+function(e,t=Date.now()){let i=parseInt(`${e}`,10);if(!isNaN(i))return 1e3*i;let r=Date.parse(`${e}`);return isNaN(r)?6e4:r-t}(o,r):429===t&&(s.all=r+6e4);return s}function ie(e,t,i=function(e){let t=[];function i(e){return t.splice(t.indexOf(e),1)[0]}return{$:t,add:function(r){if(!(void 0===e||t.length<e))return(0,eN.$2)(new tV("Not adding Promise because buffer limit was reached."));let s=r();return -1===t.indexOf(s)&&t.push(s),s.then(()=>i(s)).then(null,()=>i(s).then(null,()=>{})),s},drain:function(e){return new eN.cW((i,r)=>{let s=t.length;if(!s)return i(!0);let a=setTimeout(()=>{e&&e>0&&i(!1)},e);t.forEach(e=>{(0,eN.WD)(e).then(()=>{--s||(clearTimeout(a),i(!0))},r)})})}}}(e.bufferSize||30)){let r={};function s(s){let a=[];if(tO(s,(t,i)=>{let s=tG[i];if(t7(r,s)){let r=it(t,i);e.recordDroppedEvent("ratelimit_backoff",s,r)}else a.push(t)}),0===a.length)return(0,eN.WD)();let o=tN(s[0],a),n=t=>{tO(o,(i,r)=>{let s=it(i,r);e.recordDroppedEvent(t,tG[r],s)})};return i.add(()=>t({body:function(e,t){let[i,r]=e,s=JSON.stringify(i);function a(e){"string"==typeof s?s="string"==typeof e?s+e:[tB(s,t),e]:s.push("string"==typeof e?tB(e,t):e)}for(let e of r){let[t,i]=e;if(a(`
${JSON.stringify(t)}
`),"string"==typeof i||i instanceof Uint8Array)a(i);else{let e;try{e=JSON.stringify(i)}catch(t){e=JSON.stringify((0,eF.Fv)(i))}a(e)}}return"string"==typeof s?s:function(e){let t=new Uint8Array(e.reduce((e,t)=>e+t.length,0)),i=0;for(let r of e)t.set(r,i),i+=r.length;return t}(s)}(o,e.textEncoder)}).then(e=>(void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&W.X&&U.kg.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=t9(r,e),e),e=>{throw n("network_error"),e})).then(e=>e,e=>{if(e instanceof tV)return W.X&&U.kg.error("Skipped sending event because buffer is full."),n("queue_overflow"),(0,eN.WD)();throw e})}return s.__sentry__baseTransport__=!0,{send:s,flush:e=>i.drain(e)}}function it(e,t){if("event"===t||"transaction"===t)return Array.isArray(e)?e[1]:void 0}function ii(e,t=function(){if(x)return x;if(ti(ev.fetch))return x=ev.fetch.bind(ev);let e=ev.document,t=ev.fetch;if(e&&"function"==typeof e.createElement)try{let i=e.createElement("iframe");i.hidden=!0,e.head.appendChild(i);let r=i.contentWindow;r&&r.fetch&&(t=r.fetch),e.head.removeChild(i)}catch(e){}return x=t.bind(ev)}()){let i=0,r=0;return ie(e,function(s){let a=s.body.length;i+=a,r++;let o={body:s.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:i<=6e4&&r<15,...e.fetchOptions};try{return t(e.url,o).then(e=>(i-=a,r--,{statusCode:e.status,headers:{"x-sentry-rate-limits":e.headers.get("X-Sentry-Rate-Limits"),"retry-after":e.headers.get("Retry-After")}}))}catch(e){return x=void 0,i-=a,r--,(0,eN.$2)(e)}})}function ir(e){return ie(e,function(t){return new eN.cW((i,r)=>{let s=new XMLHttpRequest;for(let t in s.onerror=r,s.onreadystatechange=()=>{4===s.readyState&&i({statusCode:s.status,headers:{"x-sentry-rate-limits":s.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":s.getResponseHeader("Retry-After")}})},s.open("POST",e.url),e.headers)Object.prototype.hasOwnProperty.call(e.headers,t)&&s.setRequestHeader(t,e.headers[t]);s.send(t.body)})})}let is=[eo(),ee(),eZ(),tg(),eH(),tv(),tx(),tw()];var ia=i(83454),io=i(56217);function il(e){let t=l?l.get(e):void 0;if(!t)return;let i={};for(let[,[e,r]]of t)i[e]||(i[e]=[]),i[e].push((0,j.Jr)(r));return i}let ih="sentry.source",id="sentry.sample_rate",ic="sentry.op",iu="sentry.origin";var ip=i(82303);function ig(e,t){e.setTag("http.status_code",String(t)),e.setData("http.response.status_code",t);let i=function(e){if(e<400&&e>=100)return"ok";if(e>=400&&e<500)switch(e){case 401:return"unauthenticated";case 403:return"permission_denied";case 404:return"not_found";case 409:return"already_exists";case 413:return"failed_precondition";case 429:return"resource_exhausted";default:return"invalid_argument"}if(e>=500&&e<600)switch(e){case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline_exceeded";default:return"internal_error"}return"unknown_error"}(t);"unknown_error"!==i&&e.setStatus(i)}(D=P||(P={})).Ok="ok",D.DeadlineExceeded="deadline_exceeded",D.Unauthenticated="unauthenticated",D.PermissionDenied="permission_denied",D.NotFound="not_found",D.ResourceExhausted="resource_exhausted",D.InvalidArgument="invalid_argument",D.Unimplemented="unimplemented",D.Unavailable="unavailable",D.InternalError="internal_error",D.UnknownError="unknown_error",D.Cancelled="cancelled",D.AlreadyExists="already_exists",D.FailedPrecondition="failed_precondition",D.Aborted="aborted",D.OutOfRange="out_of_range",D.DataLoss="data_loss";class im{constructor(e=1e3){this._maxlen=e,this.spans=[]}add(e){this.spans.length>this._maxlen?e.spanRecorder=void 0:this.spans.push(e)}}class iv{constructor(e={}){this._traceId=e.traceId||(0,H.DM)(),this._spanId=e.spanId||(0,H.DM)().substring(16),this._startTime=e.startTimestamp||(0,tq.ph)(),this.tags=e.tags?{...e.tags}:{},this.data=e.data?{...e.data}:{},this.instrumenter=e.instrumenter||"sentry",this._attributes={},this.setAttributes({[iu]:e.origin||"manual",[ic]:e.op,...e.attributes}),this._name=e.name||e.description,e.parentSpanId&&(this._parentSpanId=e.parentSpanId),"sampled"in e&&(this._sampled=e.sampled),e.status&&(this._status=e.status),e.endTimestamp&&(this._endTime=e.endTimestamp),void 0!==e.exclusiveTime&&(this._exclusiveTime=e.exclusiveTime),this._measurements=e.measurements?{...e.measurements}:{}}get name(){return this._name||""}set name(e){this.updateName(e)}get description(){return this._name}set description(e){this._name=e}get traceId(){return this._traceId}set traceId(e){this._traceId=e}get spanId(){return this._spanId}set spanId(e){this._spanId=e}set parentSpanId(e){this._parentSpanId=e}get parentSpanId(){return this._parentSpanId}get sampled(){return this._sampled}set sampled(e){this._sampled=e}get attributes(){return this._attributes}set attributes(e){this._attributes=e}get startTimestamp(){return this._startTime}set startTimestamp(e){this._startTime=e}get endTimestamp(){return this._endTime}set endTimestamp(e){this._endTime=e}get status(){return this._status}set status(e){this._status=e}get op(){return this._attributes[ic]}set op(e){this.setAttribute(ic,e)}get origin(){return this._attributes[iu]}set origin(e){this.setAttribute(iu,e)}spanContext(){let{_spanId:e,_traceId:t,_sampled:i}=this;return{spanId:e,traceId:t,traceFlags:i?io.i0:io.ve}}startChild(e){let t=new iv({...e,parentSpanId:this._spanId,sampled:this._sampled,traceId:this._traceId});t.spanRecorder=this.spanRecorder,t.spanRecorder&&t.spanRecorder.add(t);let i=(0,ip.G)(this);if(t.transaction=i,W.X&&i){let r=e&&e.op||"< unknown op >",s=(0,io.XU)(t).description||"< unknown name >",a=i.spanContext().spanId,o=`[Tracing] Starting '${r}' span on transaction '${s}' (${a}).`;U.kg.log(o),this._logMessage=o}return t}setTag(e,t){return this.tags={...this.tags,[e]:t},this}setData(e,t){return this.data={...this.data,[e]:t},this}setAttribute(e,t){void 0===t?delete this._attributes[e]:this._attributes[e]=t}setAttributes(e){Object.keys(e).forEach(t=>this.setAttribute(t,e[t]))}setStatus(e){return this._status=e,this}setHttpStatus(e){return ig(this,e),this}setName(e){this.updateName(e)}updateName(e){return this._name=e,this}isSuccess(){return"ok"===this._status}finish(e){return this.end(e)}end(e){if(this._endTime)return;let t=(0,ip.G)(this);if(W.X&&t&&t.spanContext().spanId!==this._spanId){let e=this._logMessage;e&&U.kg.log(e.replace("Starting","Finishing"))}this._endTime=(0,io.$k)(e)}toTraceparent(){return(0,io.Hb)(this)}toContext(){return(0,j.Jr)({data:this._getData(),description:this._name,endTimestamp:this._endTime,op:this.op,parentSpanId:this._parentSpanId,sampled:this._sampled,spanId:this._spanId,startTimestamp:this._startTime,status:this._status,tags:this.tags,traceId:this._traceId})}updateWithContext(e){return this.data=e.data||{},this._name=e.name||e.description,this._endTime=e.endTimestamp,this.op=e.op,this._parentSpanId=e.parentSpanId,this._sampled=e.sampled,this._spanId=e.spanId||this._spanId,this._startTime=e.startTimestamp||this._startTime,this._status=e.status,this.tags=e.tags||{},this._traceId=e.traceId||this._traceId,this}getTraceContext(){return(0,io.wy)(this)}getSpanJSON(){return(0,j.Jr)({data:this._getData(),description:this._name,op:this._attributes[ic],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:this._status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[iu],_metrics_summary:il(this),profile_id:this._attributes.profile_id,exclusive_time:this._exclusiveTime,measurements:Object.keys(this._measurements).length>0?this._measurements:void 0})}isRecording(){return!this._endTime&&!!this._sampled}toJSON(){return this.getSpanJSON()}_getData(){let{data:e,_attributes:t}=this,i=Object.keys(e).length>0,r=Object.keys(t).length>0;return i||r?i&&r?{...e,...t}:i?e:t:void 0}}function iy(e){if(!V())return;let t=function(e){if(e.startTime){let t={...e};return t.startTimestamp=(0,io.$k)(e.startTime),delete t.startTime,t}return e}(e),i=(0,Y.Gd)(),r=e.scope?e.scope.getSpan():iC();if(e.onlyIfParent&&!r)return;let s=(e.scope||(0,_.nZ)()).clone();return function(e,{parentSpan:t,spanContext:i,forceTransaction:r,scope:s}){var a;let o;if(!V())return;let n=(0,Y.aF)();if(t&&!r)o=t.startChild(i);else if(t){let r=(0,tH.j)(t),{traceId:s,spanId:a}=t.spanContext(),n=(0,io.Tt)(t);o=e.startTransaction({traceId:s,parentSpanId:a,parentSampled:n,...i,metadata:{dynamicSamplingContext:r,...i.metadata}})}else{let{traceId:t,dsc:r,parentSpanId:a,sampled:l}={...n.getPropagationContext(),...s.getPropagationContext()};o=e.startTransaction({traceId:t,parentSpanId:a,parentSampled:l,...i,metadata:{dynamicSamplingContext:r,...i.metadata}})}return s.setSpan(o),(a=o)&&((0,j.xp)(a,ib,n),(0,j.xp)(a,iw,s)),o}(i,{parentSpan:r,spanContext:t,forceTransaction:e.forceTransaction,scope:s})}function iC(){return(0,_.nZ)().getSpan()}let iw="_sentryScope",ib="_sentryIsolationScope";class iS extends iv{constructor(e,t){super(e),this._contexts={},this._hub=t||(0,Y.Gd)(),this._name=e.name||"",this._metadata={...e.metadata},this._trimEnd=e.trimEnd,this.transaction=this;let i=this._metadata.dynamicSamplingContext;i&&(this._frozenDynamicSamplingContext={...i})}get name(){return this._name}set name(e){this.setName(e)}get metadata(){return{source:"custom",spanMetadata:{},...this._metadata,...this._attributes[ih]&&{source:this._attributes[ih]},...this._attributes[id]&&{sampleRate:this._attributes[id]}}}set metadata(e){this._metadata=e}setName(e,t="custom"){this._name=e,this.setAttribute(ih,t)}updateName(e){return this._name=e,this}initSpanRecorder(e=1e3){this.spanRecorder||(this.spanRecorder=new im(e)),this.spanRecorder.add(this)}setContext(e,t){null===t?delete this._contexts[e]:this._contexts[e]=t}setMeasurement(e,t,i=""){this._measurements[e]={value:t,unit:i}}setMetadata(e){this._metadata={...this._metadata,...e}}end(e){let t=(0,io.$k)(e),i=this._finishTransaction(t);if(i)return this._hub.captureEvent(i)}toContext(){let e=super.toContext();return(0,j.Jr)({...e,name:this._name,trimEnd:this._trimEnd})}updateWithContext(e){return super.updateWithContext(e),this._name=e.name||"",this._trimEnd=e.trimEnd,this}getDynamicSamplingContext(){return(0,tH.j)(this)}setHub(e){this._hub=e}getProfileId(){if(void 0!==this._contexts&&void 0!==this._contexts.profile)return this._contexts.profile.profile_id}_finishTransaction(e){if(void 0!==this._endTime)return;this._name||(W.X&&U.kg.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>"),super.end(e);let t=this._hub.getClient();if(t&&t.emit&&t.emit("finishTransaction",this),!0!==this._sampled){W.X&&U.kg.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),t&&t.recordDroppedEvent("sample_rate","transaction");return}let i=this.spanRecorder?this.spanRecorder.spans.filter(e=>e!==this&&(0,io.XU)(e).timestamp):[];if(this._trimEnd&&i.length>0){let e=i.map(e=>(0,io.XU)(e).timestamp).filter(Boolean);this._endTime=e.reduce((e,t)=>e>t?e:t)}let{scope:r,isolationScope:s}={scope:this[iw],isolationScope:this[ib]},{metadata:a}=this,{source:o}=a,n={contexts:{...this._contexts,trace:(0,io.wy)(this)},spans:i,start_timestamp:this._startTime,tags:this.tags,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{...a,capturedSpanScope:r,capturedSpanIsolationScope:s,...(0,j.Jr)({dynamicSamplingContext:(0,tH.j)(this)})},_metrics_summary:il(this),...o&&{transaction_info:{source:o}}};return Object.keys(this._measurements).length>0&&(W.X&&U.kg.log("[Measurements] Adding measurements to transaction",JSON.stringify(this._measurements,void 0,2)),n.measurements=this._measurements),W.X&&U.kg.log(`[Tracing] Finishing ${this.op} transaction: ${this._name}.`),n}}let ix={idleTimeout:1e3,finalTimeout:3e4,heartbeatInterval:5e3};class iM extends im{constructor(e,t,i,r){super(r),this._pushActivity=e,this._popActivity=t,this.transactionSpanId=i}add(e){if(e.spanContext().spanId!==this.transactionSpanId){let t=e.end;e.end=(...i)=>(this._popActivity(e.spanContext().spanId),t.apply(e,i)),void 0===(0,io.XU)(e).timestamp&&this._pushActivity(e.spanContext().spanId)}super.add(e)}}class iE extends iS{constructor(e,t,i=ix.idleTimeout,r=ix.finalTimeout,s=ix.heartbeatInterval,a=!1,o=!1){super(e,t),this._idleHub=t,this._idleTimeout=i,this._finalTimeout=r,this._heartbeatInterval=s,this._onScope=a,this.activities={},this._heartbeatCounter=0,this._finished=!1,this._idleTimeoutCanceledPermanently=!1,this._beforeFinishCallbacks=[],this._finishReason="externalFinish",this._autoFinishAllowed=!o,a&&(W.X&&U.kg.log(`Setting idle transaction on scope. Span ID: ${this.spanContext().spanId}`),t.getScope().setSpan(this)),o||this._restartIdleTimeout(),setTimeout(()=>{this._finished||(this.setStatus("deadline_exceeded"),this._finishReason="finalTimeout",this.end())},this._finalTimeout)}end(e){let t=(0,io.$k)(e);if(this._finished=!0,this.activities={},"ui.action.click"===this.op&&this.setAttribute("finishReason",this._finishReason),this.spanRecorder){for(let e of(W.X&&U.kg.log("[Tracing] finishing IdleTransaction",new Date(1e3*t).toISOString(),this.op),this._beforeFinishCallbacks))e(this,t);this.spanRecorder.spans=this.spanRecorder.spans.filter(e=>{if(e.spanContext().spanId===this.spanContext().spanId)return!0;!(0,io.XU)(e).timestamp&&(e.setStatus("cancelled"),e.end(t),W.X&&U.kg.log("[Tracing] cancelling span since transaction ended early",JSON.stringify(e,void 0,2)));let{start_timestamp:i,timestamp:r}=(0,io.XU)(e),s=i&&i<t,a=(this._finalTimeout+this._idleTimeout)/1e3,o=r&&i&&r-i<a;if(W.X){let t=JSON.stringify(e,void 0,2);s?o||U.kg.log("[Tracing] discarding Span since it finished after Transaction final timeout",t):U.kg.log("[Tracing] discarding Span since it happened after Transaction was finished",t)}return s&&o}),W.X&&U.kg.log("[Tracing] flushing IdleTransaction")}else W.X&&U.kg.log("[Tracing] No active IdleTransaction");if(this._onScope){let e=this._idleHub.getScope();e.getTransaction()===this&&e.setSpan(void 0)}return super.end(e)}registerBeforeFinishCallback(e){this._beforeFinishCallbacks.push(e)}initSpanRecorder(e){this.spanRecorder||(this.spanRecorder=new iM(e=>{this._finished||this._pushActivity(e)},e=>{this._finished||this._popActivity(e)},this.spanContext().spanId,e),W.X&&U.kg.log("Starting heartbeat"),this._pingHeartbeat()),this.spanRecorder.add(this)}cancelIdleTimeout(e,{restartOnChildSpanChange:t}={restartOnChildSpanChange:!0}){this._idleTimeoutCanceledPermanently=!1===t,this._idleTimeoutID&&(clearTimeout(this._idleTimeoutID),this._idleTimeoutID=void 0,0===Object.keys(this.activities).length&&this._idleTimeoutCanceledPermanently&&(this._finishReason="cancelled",this.end(e)))}setFinishReason(e){this._finishReason=e}sendAutoFinishSignal(){this._autoFinishAllowed||(W.X&&U.kg.log("[Tracing] Received finish signal for idle transaction."),this._restartIdleTimeout(),this._autoFinishAllowed=!0)}_restartIdleTimeout(e){this.cancelIdleTimeout(),this._idleTimeoutID=setTimeout(()=>{this._finished||0!==Object.keys(this.activities).length||(this._finishReason="idleTimeout",this.end(e))},this._idleTimeout)}_pushActivity(e){this.cancelIdleTimeout(void 0,{restartOnChildSpanChange:!this._idleTimeoutCanceledPermanently}),W.X&&U.kg.log(`[Tracing] pushActivity: ${e}`),this.activities[e]=!0,W.X&&U.kg.log("[Tracing] new activities count",Object.keys(this.activities).length)}_popActivity(e){if(this.activities[e]&&(W.X&&U.kg.log(`[Tracing] popActivity ${e}`),delete this.activities[e],W.X&&U.kg.log("[Tracing] new activities count",Object.keys(this.activities).length)),0===Object.keys(this.activities).length){let e=(0,tq.ph)();this._idleTimeoutCanceledPermanently?this._autoFinishAllowed&&(this._finishReason="cancelled",this.end(e)):this._restartIdleTimeout(e+this._idleTimeout/1e3)}}_beat(){if(this._finished)return;let e=Object.keys(this.activities).join("");e===this._prevHeartbeatString?this._heartbeatCounter++:this._heartbeatCounter=1,this._prevHeartbeatString=e,this._heartbeatCounter>=3?this._autoFinishAllowed&&(W.X&&U.kg.log("[Tracing] Transaction finished because of no change for 3 heart beats"),this.setStatus("deadline_exceeded"),this._finishReason="heartbeatFailed",this.end()):this._pingHeartbeat()}_pingHeartbeat(){W.X&&U.kg.log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`),setTimeout(()=>{this._beat()},this._heartbeatInterval)}}function iD(e){return(e||(0,Y.Gd)()).getScope().getTransaction()}let iI=!1;function ik(){let e=iD();if(e){let t="internal_error";W.X&&U.kg.log(`[Tracing] Transaction: ${t} -> Global error occured`),e.setStatus(t)}}function iT(e,t,i){let r;return V(t)?void 0!==e.sampled?e.setAttribute(id,Number(e.sampled)):("function"==typeof t.tracesSampler?(r=t.tracesSampler(i),e.setAttribute(id,Number(r))):void 0!==i.parentSampled?r=i.parentSampled:void 0!==t.tracesSampleRate?(r=t.tracesSampleRate,e.setAttribute(id,Number(r))):(r=1,e.setAttribute(id,r)),iA(r))?r?(e.sampled=Math.random()<r,e.sampled)?W.X&&U.kg.log(`[Tracing] starting ${e.op} transaction - ${(0,io.XU)(e).description}`):W.X&&U.kg.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(r)})`):(W.X&&U.kg.log(`[Tracing] Discarding transaction because ${"function"==typeof t.tracesSampler?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),e.sampled=!1):(W.X&&U.kg.warn("[Tracing] Discarding transaction because of invalid sample rate."),e.sampled=!1):e.sampled=!1,e}function iA(e){return(0,eh.i2)(e)||!("number"==typeof e||"boolean"==typeof e)?(W.X&&U.kg.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`),!1):!(e<0)&&!(e>1)||(W.X&&U.kg.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${e}.`),!1)}function iR(){let e=this.getScope().getSpan();return e?{"sentry-trace":(0,io.Hb)(e)}:{}}function iL(e,t){let i=this.getClient(),r=i&&i.getOptions()||{},s=r.instrumenter||"sentry",a=e.instrumenter||"sentry";s!==a&&(W.X&&U.kg.error(`A transaction was started with instrumenter=\`${a}\`, but the SDK is configured with the \`${s}\` instrumenter.
The transaction will not be sampled. Please use the ${s} instrumentation to start transactions.`),e.sampled=!1);let o=new iS(e,this);return(o=iT(o,r,{name:e.name,parentSampled:e.parentSampled,transactionContext:e,attributes:{...e.data,...e.attributes},...t})).isRecording()&&o.initSpanRecorder(r._experiments&&r._experiments.maxSpans),i&&i.emit&&i.emit("startTransaction",o),o}function iP(e,t,i,r,s,a,o,n=!1){let l=e.getClient(),h=l&&l.getOptions()||{},d=new iE(t,e,i,r,o,s,n);return(d=iT(d,h,{name:t.name,parentSampled:t.parentSampled,transactionContext:t,attributes:{...t.data,...t.attributes},...a})).isRecording()&&d.initSpanRecorder(h._experiments&&h._experiments.maxSpans),l&&l.emit&&l.emit("startTransaction",d),d}function iF(){let e=(0,Y.cu)();e.__SENTRY__&&(e.__SENTRY__.extensions=e.__SENTRY__.extensions||{},e.__SENTRY__.extensions.startTransaction||(e.__SENTRY__.extensions.startTransaction=iL),e.__SENTRY__.extensions.traceHeaders||(e.__SENTRY__.extensions.traceHeaders=iR),iI||(iI=!0,ek(ik),eR(ik)))}ik.tag="sentry_tracingErrorCallback";var iN=i(22714);let iO=ef.GLOBAL_OBJ;function iB(){iO.document&&iO.document.addEventListener("visibilitychange",()=>{let e=iD();if(iO.document.hidden&&e){let{op:t,status:i}=(0,io.XU)(e);i||e.setStatus("cancelled"),e.setTag("visibilitychange","document.hidden"),e.end()}})}let iG=(e,t,i)=>{let r,s;return a=>{t.value>=0&&(a||i)&&((s=t.value-(r||0))||void 0===r)&&(r=t.value,t.delta=s,e(t))}},iz=()=>`v3-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,i_=()=>{let e=iO.performance.timing,t=iO.performance.navigation.type,i={entryType:"navigation",startTime:0,type:2==t?"back_forward":1===t?"reload":"navigate"};for(let t in e)"navigationStart"!==t&&"toJSON"!==t&&(i[t]=Math.max(e[t]-e.navigationStart,0));return i},iV=()=>iO.__WEB_VITALS_POLYFILL__?iO.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||i_()):iO.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],ij=()=>{let e=iV();return e&&e.activationStart||0},iH=(e,t)=>{let i=iV(),r="navigate";return i&&(r=iO.document&&iO.document.prerendering||ij()>0?"prerender":i.type.replace(/_/g,"-")),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:iz(),navigationType:r}},iU=(e,t,i)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){let r=new PerformanceObserver(e=>{t(e.getEntries())});return r.observe(Object.assign({type:e,buffered:!0},i||{})),r}}catch(e){}},iW=(e,t)=>{let i=r=>{("pagehide"===r.type||"hidden"===iO.document.visibilityState)&&(e(r),t&&(removeEventListener("visibilitychange",i,!0),removeEventListener("pagehide",i,!0)))};iO.document&&(addEventListener("visibilitychange",i,!0),addEventListener("pagehide",i,!0))},i$=(e,t={})=>{let i;let r=iH("CLS",0),s=0,a=[],o=e=>{e.forEach(e=>{if(!e.hadRecentInput){let t=a[0],o=a[a.length-1];s&&0!==a.length&&e.startTime-o.startTime<1e3&&e.startTime-t.startTime<5e3?(s+=e.value,a.push(e)):(s=e.value,a=[e]),s>r.value&&(r.value=s,r.entries=a,i&&i())}})},n=iU("layout-shift",o);if(n){i=iG(e,r,t.reportAllChanges);let s=()=>{o(n.takeRecords()),i(!0)};return iW(s),s}},iY=-1,iK=()=>{iO.document&&iO.document.visibilityState&&(iY="hidden"!==iO.document.visibilityState||iO.document.prerendering?1/0:0)},iZ=()=>{iW(({timeStamp:e})=>{iY=e},!0)},iq=()=>(iY<0&&(iK(),iZ()),{get firstHiddenTime(){return iY}}),iX=e=>{let t;let i=iq(),r=iH("FID"),s=e=>{e.startTime<i.firstHiddenTime&&(r.value=e.processingStart-e.startTime,r.entries.push(e),t(!0))},a=e=>{e.forEach(s)},o=iU("first-input",a);t=iG(e,r),o&&iW(()=>{a(o.takeRecords()),o.disconnect()},!0)},iQ=0,iJ=1/0,i0=0,i1=e=>{e.forEach(e=>{e.interactionId&&(iJ=Math.min(iJ,e.interactionId),iQ=(i0=Math.max(i0,e.interactionId))?(i0-iJ)/7+1:0)})},i2=()=>h?iQ:performance.interactionCount||0,i3=()=>{"interactionCount"in performance||h||(h=iU("event",i1,{type:"event",buffered:!0,durationThreshold:0}))},i4=()=>i2(),i6=[],i5={},i8=e=>{let t=i6[i6.length-1],i=i5[e.interactionId];if(i||i6.length<10||e.duration>t.latency){if(i)i.entries.push(e),i.latency=Math.max(i.latency,e.duration);else{let t={id:e.interactionId,latency:e.duration,entries:[e]};i5[t.id]=t,i6.push(t)}i6.sort((e,t)=>t.latency-e.latency),i6.splice(10).forEach(e=>{delete i5[e.id]})}},i7=()=>{let e=Math.min(i6.length-1,Math.floor(i4()/50));return i6[e]},i9=(e,t)=>{let i;t=t||{},i3();let r=iH("INP"),s=e=>{e.forEach(e=>{e.interactionId&&i8(e),"first-input"!==e.entryType||i6.some(t=>t.entries.some(t=>e.duration===t.duration&&e.startTime===t.startTime))||i8(e)});let t=i7();t&&t.latency!==r.value&&(r.value=t.latency,r.entries=t.entries,i())},a=iU("event",s,{durationThreshold:t.durationThreshold||40});i=iG(e,r,t.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),iW(()=>{s(a.takeRecords()),r.value<0&&i4()>0&&(r.value=0,r.entries=[]),i(!0)}))},re={},rt=e=>{let t;let i=iq(),r=iH("LCP"),s=e=>{let s=e[e.length-1];if(s){let e=Math.max(s.startTime-ij(),0);e<i.firstHiddenTime&&(r.value=e,r.entries=[s],t())}},a=iU("largest-contentful-paint",s);if(a){t=iG(e,r);let i=()=>{re[r.id]||(s(a.takeRecords()),a.disconnect(),re[r.id]=!0,t(!0))};return["keydown","click"].forEach(e=>{iO.document&&addEventListener(e,i,{once:!0,capture:!0})}),iW(i,!0),i}},ri=e=>{iO.document&&(iO.document.prerendering?addEventListener("prerenderingchange",()=>ri(e),!0):"complete"!==iO.document.readyState?addEventListener("load",()=>ri(e),!0):setTimeout(e,0))},rr=(e,t)=>{t=t||{};let i=iH("TTFB"),r=iG(e,i,t.reportAllChanges);ri(()=>{let e=iV();if(e){if(i.value=Math.max(e.responseStart-ij(),0),i.value<0||i.value>performance.now())return;i.entries=[e],r(!0)}})},rs={},ra={};function ro(e,t=!1){return rg("lcp",e,rc,u,t)}function rn(e,t){return rm(e,t),ra[e]||(function(e){let t={};"event"===e&&(t.durationThreshold=0),iU(e,t=>{rl(e,{entries:t})},t)}(e),ra[e]=!0),rf(e,t)}function rl(e,t){let i=rs[e];if(i&&i.length)for(let e of i)try{e(t)}catch(e){}}function rh(){return i$(e=>{rl("cls",{metric:e}),d=e},{reportAllChanges:!0})}function rd(){return iX(e=>{rl("fid",{metric:e}),c=e})}function rc(){return rt(e=>{rl("lcp",{metric:e}),u=e})}function ru(){return rr(e=>{rl("ttfb",{metric:e}),p=e})}function rp(){return i9(e=>{rl("inp",{metric:e}),g=e})}function rg(e,t,i,r,s=!1){let a;return rm(e,t),ra[e]||(a=i(),ra[e]=!0),r&&t({metric:r}),rf(e,t,s?a:void 0)}function rm(e,t){rs[e]=rs[e]||[],rs[e].push(t)}function rf(e,t,i){return()=>{i&&i();let r=rs[e];if(!r)return;let s=r.indexOf(t);-1!==s&&r.splice(s,1)}}function rv(e){return[{type:"span"},e]}function ry(e){return"number"==typeof e&&isFinite(e)}function rC(e,{startTimestamp:t,...i}){return t&&e.startTimestamp>t&&(e.startTimestamp=t),e.startChild({startTimestamp:t,...i})}function rw(e){return e/1e3}function rb(){return iO&&iO.addEventListener&&iO.performance}let rS=0,rx={};function rM(){let e=rb();if(e&&tq.Z1){e.mark&&iO.performance.mark("sentry-tracing-init");let t=rg("fid",({metric:e})=>{let t=e.entries[e.entries.length-1];if(!t)return;let i=rw(tq.Z1),r=rw(t.startTime);rx.fid={value:e.value,unit:"millisecond"},rx["mark.fid"]={value:i+r,unit:"second"}},rd,c),i=function(e,t=!1){return rg("cls",e,rh,d,t)}(({metric:e})=>{let t=e.entries[e.entries.length-1];t&&(rx.cls={value:e.value,unit:""},f=t)},!0),r=ro(({metric:e})=>{let t=e.entries[e.entries.length-1];t&&(rx.lcp={value:e.value,unit:"millisecond"},m=t)},!0),s=rg("ttfb",({metric:e})=>{e.entries[e.entries.length-1]&&(rx.ttfb={value:e.value,unit:"millisecond"})},ru,p);return()=>{t(),i(),r(),s()}}return()=>void 0}function rE(){rn("longtask",({entries:e})=>{for(let t of e){let e=iD();if(!e)return;let i=rw(tq.Z1+t.startTime),r=rw(t.duration);e.startChild({description:"Main UI thread blocked",op:"ui.long-task",origin:"auto.ui.browser.metrics",startTimestamp:i,endTimestamp:i+r})}})}function rD(){rn("event",({entries:e})=>{for(let t of e){let e=iD();if(!e)return;if("click"===t.name){let i=rw(tq.Z1+t.startTime),r=rw(t.duration),s={description:(0,eP.Rt)(t.target),op:`ui.interaction.${t.name}`,origin:"auto.ui.browser.metrics",startTimestamp:i,endTimestamp:i+r},a=(0,eP.iY)(t.target);a&&(s.attributes={"ui.component_name":a}),e.startChild(s)}}})}function rI(e,t){if(rb()&&tq.Z1){let i=rg("inp",({metric:i})=>{let r;if(void 0===i.value)return;let s=i.entries.find(e=>e.duration===i.value&&void 0!==rk[e.name]),a=(0,_.s3)();if(!s||!a)return;let o=rk[s.name],n=a.getOptions(),l=rw(tq.Z1+s.startTime),h=rw(i.value),d=void 0!==s.interactionId?e[s.interactionId]:void 0;if(void 0===d)return;let{routeName:c,parentContext:u,activeTransaction:p,user:g,replayId:m}=d,f=void 0!==g?g.email||g.id||g.ip_address:void 0,v=void 0!==p?p.getProfileId():void 0,y=new iv({startTimestamp:l,endTimestamp:l+h,op:`ui.interaction.${o}`,name:(0,eP.Rt)(s.target),attributes:{release:n.release,environment:n.environment,transaction:c,...void 0!==f&&""!==f?{user:f}:{},...void 0!==v?{profile_id:v}:{},...void 0!==m?{replay_id:m}:{}},exclusiveTime:i.value,measurements:{inp:{value:i.value,unit:"millisecond"}}}),C=!!V(n)&&!!iA(r=void 0!==u&&"function"==typeof n.tracesSampler?n.tracesSampler({transactionContext:u,name:u.name,parentSampled:u.parentSampled,attributes:{...u.data,...u.attributes},location:iO.location}):void 0!==u&&void 0!==u.sampled?u.sampled:void 0!==n.tracesSampleRate?n.tracesSampleRate:1)&&(!0===r?t:!1===r?0:r*t);if(C&&Math.random()<C){let e=y?function(e,t){let i={sent_at:new Date().toISOString()};return t&&(i.dsn=tL(t)),tN(i,e.map(rv))}([y],a.getDsn()):void 0,t=a&&a.getTransport();t&&e&&t.send(e).then(null,e=>{});return}},rp,g);return()=>{i()}}return()=>void 0}let rk={click:"click",pointerdown:"click",pointerup:"click",mousedown:"click",mouseup:"click",touchstart:"click",touchend:"click",mouseover:"hover",mouseout:"hover",mouseenter:"hover",mouseleave:"hover",pointerover:"hover",pointerout:"hover",pointerenter:"hover",pointerleave:"hover",dragstart:"drag",dragend:"drag",drag:"drag",dragenter:"drag",dragleave:"drag",dragover:"drag",drop:"drag",keydown:"press",keyup:"press",keypress:"press",input:"press"};function rT(e){let t=rb();if(!t||!iO.performance.getEntries||!tq.Z1)return;let i=rw(tq.Z1),r=t.getEntries(),{op:s,start_timestamp:a}=(0,io.XU)(e);if(r.slice(rS).forEach(t=>{let r=rw(t.startTime),s=rw(t.duration);if("navigation"!==e.op||!a||!(i+r<a))switch(t.entryType){case"navigation":["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{rA(e,t,r,i)}),rA(e,t,"secureConnection",i,"TLS/SSL","connectEnd"),rA(e,t,"fetch",i,"cache","domainLookupStart"),rA(e,t,"domainLookup",i,"DNS"),t.responseEnd&&(rC(e,{op:"browser",origin:"auto.browser.browser.metrics",description:"request",startTimestamp:i+rw(t.requestStart),endTimestamp:i+rw(t.responseEnd)}),rC(e,{op:"browser",origin:"auto.browser.browser.metrics",description:"response",startTimestamp:i+rw(t.responseStart),endTimestamp:i+rw(t.responseEnd)}));break;case"mark":case"paint":case"measure":{(function(e,t,i,r,s){let a=s+i;rC(e,{description:t.name,endTimestamp:a+r,op:t.entryType,origin:"auto.resource.browser.metrics",startTimestamp:a})})(e,t,r,s,i);let a=iq(),o=t.startTime<a.firstHiddenTime;"first-paint"===t.name&&o&&(rx.fp={value:t.startTime,unit:"millisecond"}),"first-contentful-paint"===t.name&&o&&(rx.fcp={value:t.startTime,unit:"millisecond"});break}case"resource":(function(e,t,i,r,s,a){if("xmlhttprequest"===t.initiatorType||"fetch"===t.initiatorType)return;let o=tu(i),n={};rR(n,t,"transferSize","http.response_transfer_size"),rR(n,t,"encodedBodySize","http.response_content_length"),rR(n,t,"decodedBodySize","http.decoded_response_content_length"),"renderBlockingStatus"in t&&(n["resource.render_blocking_status"]=t.renderBlockingStatus),o.protocol&&(n["url.scheme"]=o.protocol.split(":").pop()),o.host&&(n["server.address"]=o.host),n["url.same_origin"]=i.includes(iO.location.origin);let l=a+r;rC(e,{description:i.replace(iO.location.origin,""),endTimestamp:l+s,op:t.initiatorType?`resource.${t.initiatorType}`:"resource.other",origin:"auto.resource.browser.metrics",startTimestamp:l,data:n})})(e,t,t.name,r,s,i)}}),rS=Math.max(r.length-1,0),function(e){let t=iO.navigator;if(!t)return;let i=t.connection;i&&(i.effectiveType&&e.setTag("effectiveConnectionType",i.effectiveType),i.type&&e.setTag("connectionType",i.type),ry(i.rtt)&&(rx["connection.rtt"]={value:i.rtt,unit:"millisecond"})),ry(t.deviceMemory)&&e.setTag("deviceMemory",`${t.deviceMemory} GB`),ry(t.hardwareConcurrency)&&e.setTag("hardwareConcurrency",String(t.hardwareConcurrency))}(e),"pageload"===s){(function(e){let t=iV();if(!t)return;let{responseStart:i,requestStart:r}=t;r<=i&&(e["ttfb.requestTime"]={value:i-r,unit:"millisecond"})})(rx),["fcp","fp","lcp"].forEach(e=>{if(!rx[e]||!a||i>=a)return;let t=Math.abs((i+rw(rx[e].value)-a)*1e3);rx[e].value=t});let t=rx["mark.fid"];t&&rx.fid&&(rC(e,{description:"first input delay",endTimestamp:t.value+rw(rx.fid.value),op:"ui.action",origin:"auto.ui.browser.metrics",startTimestamp:t.value}),delete rx["mark.fid"]),"fcp"in rx||delete rx.cls,Object.keys(rx).forEach(e=>{!function(e,t,i){let r=iD();r&&r.setMeasurement(e,t,i)}(e,rx[e].value,rx[e].unit)}),m&&(m.element&&e.setTag("lcp.element",(0,eP.Rt)(m.element)),m.id&&e.setTag("lcp.id",m.id),m.url&&e.setTag("lcp.url",m.url.trim().slice(0,200)),e.setTag("lcp.size",m.size)),f&&f.sources&&f.sources.forEach((t,i)=>e.setTag(`cls.source.${i+1}`,(0,eP.Rt)(t.node)))}m=void 0,f=void 0,rx={}}function rA(e,t,i,r,s,a){let o=a?t[a]:t[`${i}End`],n=t[`${i}Start`];n&&o&&rC(e,{op:"browser",origin:"auto.browser.browser.metrics",description:s||i,startTimestamp:r+rw(n),endTimestamp:r+rw(o)})}function rR(e,t,i,r){let s=t[i];null!=s&&s<2147483647&&(e[r]=s)}var rL=i(92724);let rP=["localhost",/^\/(?!\/)/],rF={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,tracingOrigins:rP,tracePropagationTargets:rP};function rN(e){let{traceFetch:t,traceXHR:i,tracePropagationTargets:r,tracingOrigins:s,shouldCreateSpanForRequest:a,enableHTTPTimings:o}={traceFetch:rF.traceFetch,traceXHR:rF.traceXHR,...e},n="function"==typeof a?a:e=>!0,l=e=>{var t;return t=r||s,(0,ei.U0)(e,t||rP)},h={};t&&tr(e=>{let t=function(e,t,i,r,s="auto.http.browser"){if(!V()||!e.fetchData)return;let a=t(e.fetchData.url);if(e.endTimestamp&&a){let t=e.fetchData.__span;if(!t)return;let i=r[t];i&&(function(e,t){if(t.response){ig(e,t.response.status);let i=t.response&&t.response.headers&&t.response.headers.get("content-length");if(i){let t=parseInt(i);t>0&&e.setAttribute("http.response_content_length",t)}}else t.error&&e.setStatus("internal_error");e.end()}(i,e),delete r[t]);return}let o=(0,_.nZ)(),n=(0,_.s3)(),{method:l,url:h}=e.fetchData,d=function(e){try{return new URL(e).href}catch(e){return}}(h),c=d?tu(d).host:void 0,u=a?iy({name:`${l} ${h}`,onlyIfParent:!0,attributes:{url:h,type:"fetch","http.method":l,"http.url":d,"server.address":c,[iu]:s},op:"http.client"}):void 0;if(u&&(e.fetchData.__span=u.spanContext().spanId,r[u.spanContext().spanId]=u),i(e.fetchData.url)&&n){let t=e.args[0];e.args[1]=e.args[1]||{};let i=e.args[1];i.headers=function(e,t,i,r,s){let a=s||i.getSpan(),{traceId:o,spanId:n,sampled:l,dsc:h}={...(0,Y.aF)().getPropagationContext(),...i.getPropagationContext()},d=a?(0,io.Hb)(a):(0,iN.$p)(o,n,l),c=(0,rL.IQ)(h||(a?(0,tH.j)(a):(0,tH._)(o,t,i))),u=r.headers||("undefined"!=typeof Request&&(0,eh.V9)(e,Request)?e.headers:void 0);if(!u)return{"sentry-trace":d,baggage:c};if("undefined"!=typeof Headers&&(0,eh.V9)(u,Headers)){let e=new Headers(u);return e.append("sentry-trace",d),c&&e.append(rL.bU,c),e}if(Array.isArray(u)){let e=[...u,["sentry-trace",d]];return c&&e.push([rL.bU,c]),e}{let e="baggage"in u?u.baggage:void 0,t=[];return Array.isArray(e)?t.push(...e):e&&t.push(e),c&&t.push(c),{...u,"sentry-trace":d,baggage:t.length>0?t.join(","):void 0}}}(t,n,o,i,u)}return u}(e,n,l,h);if(t){let i=rG(e.fetchData.url),r=i?tu(i).host:void 0;t.setAttributes({"http.url":i,"server.address":r})}o&&t&&rO(t)}),i&&e7(e=>{let t=function(e,t,i,r){let s=e.xhr,a=s&&s[e8];if(!V()||!s||s.__sentry_own_request__||!a)return;let o=t(a.url);if(e.endTimestamp&&o){let e=s.__sentry_xhr_span_id__;if(!e)return;let t=r[e];t&&void 0!==a.status_code&&(ig(t,a.status_code),t.end(),delete r[e]);return}let n=(0,_.nZ)(),l=(0,Y.aF)(),h=rG(a.url),d=h?tu(h).host:void 0,c=o?iy({name:`${a.method} ${a.url}`,onlyIfParent:!0,attributes:{type:"xhr","http.method":a.method,"http.url":h,url:a.url,"server.address":d,[iu]:"auto.http.browser"},op:"http.client"}):void 0;c&&(s.__sentry_xhr_span_id__=c.spanContext().spanId,r[s.__sentry_xhr_span_id__]=c);let u=(0,_.s3)();if(s.setRequestHeader&&i(a.url)&&u){let{traceId:e,spanId:t,sampled:i,dsc:r}={...l.getPropagationContext(),...n.getPropagationContext()};(function(e,t,i){try{e.setRequestHeader("sentry-trace",t),i&&e.setRequestHeader(rL.bU,i)}catch(e){}})(s,c?(0,io.Hb)(c):(0,iN.$p)(e,t,i),(0,rL.IQ)(r||(c?(0,tH.j)(c):(0,tH._)(e,u,n))))}return c}(e,n,l,h);o&&t&&rO(t)})}function rO(e){let{url:t}=(0,io.XU)(e).data||{};if(!t||"string"!=typeof t)return;let i=rn("resource",({entries:r})=>{r.forEach(r=>{"resource"===r.entryType&&"initiatorType"in r&&"string"==typeof r.nextHopProtocol&&("fetch"===r.initiatorType||"xmlhttprequest"===r.initiatorType)&&r.name.endsWith(t)&&((function(e){let{name:t,version:i}=function(e){let t="unknown",i="unknown",r="";for(let s of e){if("/"===s){[t,i]=e.split("/");break}if(!isNaN(Number(s))){t="h"===r?"http":r,i=e.split(r)[1];break}r+=s}return r===e&&(t=r),{name:t,version:i}}(e.nextHopProtocol),r=[];return(r.push(["network.protocol.version",i],["network.protocol.name",t]),tq.Z1)?[...r,["http.request.redirect_start",rB(e.redirectStart)],["http.request.fetch_start",rB(e.fetchStart)],["http.request.domain_lookup_start",rB(e.domainLookupStart)],["http.request.domain_lookup_end",rB(e.domainLookupEnd)],["http.request.connect_start",rB(e.connectStart)],["http.request.secure_connection_start",rB(e.secureConnectionStart)],["http.request.connection_end",rB(e.connectEnd)],["http.request.request_start",rB(e.requestStart)],["http.request.response_start",rB(e.responseStart)],["http.request.response_end",rB(e.responseEnd)]]:r})(r).forEach(t=>e.setAttribute(...t)),setTimeout(i))})})}function rB(e=0){return((tq.Z1||performance.timeOrigin)+e)/1e3}function rG(e){try{return new URL(e,iO.location.origin).href}catch(e){return}}let rz={...ix,markBackgroundTransactions:!0,routingInstrumentation:function(e,t=!0,i=!0){let r;if(!iO||!iO.location)return;let s=iO.location.href;t&&(r=e({name:iO.location.pathname,startTimestamp:tq.Z1?tq.Z1/1e3:void 0,op:"pageload",origin:"auto.pageload.browser",metadata:{source:"url"}})),i&&th(({to:t,from:i})=>{if(void 0===i&&s&&-1!==s.indexOf(t)){s=void 0;return}i!==t&&(s=void 0,r&&r.end(),r=e({name:iO.location.pathname,op:"navigation",origin:"auto.navigation.browser",metadata:{source:"url"}}))})},startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0,enableLongTask:!0,enableInp:!1,interactionsSampleRate:1,_experiments:{},...rF};class r_{constructor(e){this.name="BrowserTracing",this._hasSetTracePropagationTargets=!1,iF(),this.options={...rz,...e},void 0!==this.options._experiments.enableLongTask&&(this.options.enableLongTask=this.options._experiments.enableLongTask),e&&!e.tracePropagationTargets&&e.tracingOrigins&&(this.options.tracePropagationTargets=e.tracingOrigins),this._collectWebVitals=rM(),this._interactionIdToRouteNameMapping={},this.options.enableInp&&rI(this._interactionIdToRouteNameMapping,this.options.interactionsSampleRate),this.options.enableLongTask&&rE(),this.options._experiments.enableInteractions&&rD(),this._latestRoute={name:void 0,context:void 0}}setupOnce(e,t){this._getCurrentHub=t;let i=t().getClient(),r=i&&i.getOptions(),{routingInstrumentation:s,startTransactionOnLocationChange:a,startTransactionOnPageLoad:o,markBackgroundTransactions:n,traceFetch:l,traceXHR:h,shouldCreateSpanForRequest:d,enableHTTPTimings:c,_experiments:u}=this.options,p=r&&r.tracePropagationTargets||this.options.tracePropagationTargets;s(e=>{let i=this._createRouteTransaction(e);return this.options._experiments.onStartRouteTransaction&&this.options._experiments.onStartRouteTransaction(i,e,t),i},o,a),n&&iB(),u.enableInteractions&&this._registerInteractionListener(),this.options.enableInp&&this._registerInpInteractionListener(),rN({traceFetch:l,traceXHR:h,tracePropagationTargets:p,shouldCreateSpanForRequest:d,enableHTTPTimings:c})}_createRouteTransaction(e){let t;if(!this._getCurrentHub)return;let i=this._getCurrentHub(),{beforeNavigate:r,idleTimeout:s,finalTimeout:a,heartbeatInterval:o}=this.options,n="pageload"===e.op;if(n){let i=n?rV("sentry-trace"):"",r=n?rV("baggage"):void 0,{traceId:s,dsc:a,parentSpanId:o,sampled:l}=(0,iN.pT)(i,r);t={traceId:s,parentSpanId:o,parentSampled:l,...e,metadata:{...e.metadata,dynamicSamplingContext:a},trimEnd:!0}}else t={trimEnd:!0,...e};let l="function"==typeof r?r(t):t,h=void 0===l?{...t,sampled:!1}:l;h.metadata=h.name!==t.name?{...h.metadata,source:"custom"}:h.metadata,this._latestRoute.name=h.name,this._latestRoute.context=h,h.sampled;let{location:d}=iO,c=iP(i,h,s,a,!0,{location:d},o,n);return n&&iO.document&&(iO.document.addEventListener("readystatechange",()=>{["interactive","complete"].includes(iO.document.readyState)&&c.sendAutoFinishSignal()}),["interactive","complete"].includes(iO.document.readyState)&&c.sendAutoFinishSignal()),c.registerBeforeFinishCallback(e=>{this._collectWebVitals(),rT(e)}),c}_registerInteractionListener(){let e;let t=()=>{let{idleTimeout:t,finalTimeout:i,heartbeatInterval:r}=this.options,s=iD();if(s&&s.op&&["navigation","pageload"].includes(s.op)||(e&&(e.setFinishReason("interactionInterrupted"),e.end(),e=void 0),!this._getCurrentHub)||!this._latestRoute.name)return;let a=this._getCurrentHub(),{location:o}=iO;e=iP(a,{name:this._latestRoute.name,op:"ui.action.click",trimEnd:!0,data:{[ih]:this._latestRoute.context?function(e){let t=e.attributes&&e.attributes[ih],i=e.data&&e.data[ih],r=e.metadata&&e.metadata.source;return t||i||r}(this._latestRoute.context):"url"}},t,i,!0,{location:o},r)};["click"].forEach(e=>{iO.document&&addEventListener(e,t,{once:!1,capture:!0})})}_registerInpInteractionListener(){let e=({entries:e})=>{let t=(0,_.s3)(),i=void 0!==t&&void 0!==t.getIntegrationByName?t.getIntegrationByName("Replay"):void 0,r=void 0!==i?i.getReplayId():void 0,s=iD(),a=(0,_.nZ)(),o=void 0!==a?a.getUser():void 0;e.forEach(e=>{if("duration"in e){let t=e.interactionId;if(void 0===t)return;let i=this._interactionIdToRouteNameMapping[t],a=e.duration,n=e.startTime,l=Object.keys(this._interactionIdToRouteNameMapping),h=l.length>0?l.reduce((e,t)=>this._interactionIdToRouteNameMapping[e].duration<this._interactionIdToRouteNameMapping[t].duration?e:t):void 0;if(!("first-input"===e.entryType&&l.map(e=>this._interactionIdToRouteNameMapping[e]).some(e=>e.duration===a&&e.startTime===n))&&t){if(i)i.duration=Math.max(i.duration,a);else if(l.length<10||void 0===h||a>this._interactionIdToRouteNameMapping[h].duration){let e=this._latestRoute.name,i=this._latestRoute.context;e&&i&&(h&&Object.keys(this._interactionIdToRouteNameMapping).length>=10&&delete this._interactionIdToRouteNameMapping[h],this._interactionIdToRouteNameMapping[t]={routeName:e,duration:a,parentContext:i,user:o,activeTransaction:s,replayId:r,startTime:n})}}}})};rn("event",e),rn("first-input",e)}}function rV(e){let t=(0,eP.qT)(`meta[name=${e}]`);return t?t.getAttribute("content"):void 0}let rj={...ix,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableInp:!1,interactionsSampleRate:1,_experiments:{},...rF},rH=(e={})=>{iF(),!e.tracePropagationTargets&&e.tracingOrigins&&(e.tracePropagationTargets=e.tracingOrigins);let t={...rj,...e},i=rM(),r={};t.enableInp&&rI(r,t.interactionsSampleRate),t.enableLongTask&&rE(),t._experiments.enableInteractions&&rD();let s={name:void 0,context:void 0};function a(e){let r;let a=(0,Y.Gd)(),{beforeStartSpan:o,idleTimeout:n,finalTimeout:l,heartbeatInterval:h}=t,d="pageload"===e.op;if(d){let t=d?r$("sentry-trace"):"",i=d?r$("baggage"):void 0,{traceId:s,dsc:a,parentSpanId:o,sampled:n}=(0,iN.pT)(t,i);r={traceId:s,parentSpanId:o,parentSampled:n,...e,metadata:{...e.metadata,dynamicSamplingContext:a},trimEnd:!0}}else r={trimEnd:!0,...e};let c=o?o(r):r;c.metadata=c.name!==r.name?{...c.metadata,source:"custom"}:c.metadata,s.name=c.name,s.context=c,c.sampled;let{location:u}=iO,p=iP(a,c,n,l,!0,{location:u},h,d);return d&&iO.document&&(iO.document.addEventListener("readystatechange",()=>{["interactive","complete"].includes(iO.document.readyState)&&p.sendAutoFinishSignal()}),["interactive","complete"].includes(iO.document.readyState)&&p.sendAutoFinishSignal()),p.registerBeforeFinishCallback(e=>{i(),rT(e)}),p}return{name:"BrowserTracing",setupOnce:()=>{},afterAllSetup(e){let i;let o=e.getOptions(),{markBackgroundSpan:n,traceFetch:l,traceXHR:h,shouldCreateSpanForRequest:d,enableHTTPTimings:c,_experiments:u}=t,p=o&&o.tracePropagationTargets||t.tracePropagationTargets,g=iO.location&&iO.location.href;e.on&&(e.on("startNavigationSpan",e=>{i&&i.end(),i=a({op:"navigation",...e})}),e.on("startPageLoadSpan",e=>{i&&i.end(),i=a({op:"pageload",...e})})),t.instrumentPageLoad&&e.emit&&iO.location&&rU(e,{name:iO.location.pathname,startTimestamp:tq.Z1?tq.Z1/1e3:void 0,origin:"auto.pageload.browser",attributes:{[ih]:"url"}}),t.instrumentNavigation&&e.emit&&iO.location&&th(({to:t,from:i})=>{if(void 0===i&&g&&-1!==g.indexOf(t)){g=void 0;return}i!==t&&(g=void 0,rW(e,{name:iO.location.pathname,origin:"auto.navigation.browser",attributes:{[ih]:"url"}}))}),n&&iB(),u.enableInteractions&&function(e,t){let i;let r=()=>{let{idleTimeout:r,finalTimeout:s,heartbeatInterval:a}=e,o=iD();if(o&&o.op&&["navigation","pageload"].includes(o.op)||(i&&(i.setFinishReason("interactionInterrupted"),i.end(),i=void 0),!t.name))return;let{location:n}=iO,l={name:t.name,op:"ui.action.click",trimEnd:!0,data:{[ih]:t.context?function(e){let t=e.attributes&&e.attributes[ih],i=e.data&&e.data[ih],r=e.metadata&&e.metadata.source;return t||i||r}(t.context):"url"}};i=iP((0,Y.Gd)(),l,r,s,!0,{location:n},a)};["click"].forEach(e=>{iO.document&&addEventListener(e,r,{once:!1,capture:!0})})}(t,s),t.enableInp&&function(e,t){let i=({entries:i})=>{let r=(0,_.s3)(),s=void 0!==r&&void 0!==r.getIntegrationByName?r.getIntegrationByName("Replay"):void 0,a=void 0!==s?s.getReplayId():void 0,o=iD(),n=(0,_.nZ)(),l=void 0!==n?n.getUser():void 0;i.forEach(i=>{if("duration"in i){let r=i.interactionId;if(void 0===r)return;let s=e[r],n=i.duration,h=i.startTime,d=Object.keys(e),c=d.length>0?d.reduce((t,i)=>e[t].duration<e[i].duration?t:i):void 0;if(!("first-input"===i.entryType&&d.map(t=>e[t]).some(e=>e.duration===n&&e.startTime===h))&&r){if(s)s.duration=Math.max(s.duration,n);else if(d.length<10||void 0===c||n>e[c].duration){let i=t.name,s=t.context;i&&s&&(c&&Object.keys(e).length>=10&&delete e[c],e[r]={routeName:i,duration:n,parentContext:s,user:l,activeTransaction:o,replayId:a,startTime:h})}}}})};rn("event",i),rn("first-input",i)}(r,s),rN({traceFetch:l,traceXHR:h,tracePropagationTargets:p,shouldCreateSpanForRequest:d,enableHTTPTimings:c})},options:t}};function rU(e,t){if(!e.emit)return;e.emit("startPageLoadSpan",t);let i=iC();return"pageload"===(i&&(0,io.XU)(i).op)?i:void 0}function rW(e,t){if(!e.emit)return;e.emit("startNavigationSpan",t);let i=iC();return"navigation"===(i&&(0,io.XU)(i).op)?i:void 0}function r$(e){let t=(0,eP.qT)(`meta[name=${e}]`);return t?t.getAttribute("content"):void 0}let rY={"routing.instrumentation":"next-app-router"};var rK=i(11163),rZ=i.n(rK),rq=i(49762);let rX={"routing.instrumentation":"next-pages-router"},rQ=(0,_.s3)();function rJ(e,t=!0,i=!0,r,s){ev.document.getElementById("__NEXT_DATA__")?function(e,t=!0,i=!0,r,s){let{route:a,params:o,sentryTrace:n,baggage:l}=function(){let e;let t=ev.document.getElementById("__NEXT_DATA__");if(t&&t.innerHTML)try{e=JSON.parse(t.innerHTML)}catch(e){rq.X&&U.kg.warn("Could not extract __NEXT_DATA__")}if(!e)return{};let i={},{page:r,query:s,props:a}=e;return i.route=r,i.params=s,a&&a.pageProps&&(i.sentryTrace=a.pageProps._sentryTraceData,i.baggage=a.pageProps._sentryBaggage),i}(),{traceparentData:h,dynamicSamplingContext:d,propagationContext:c}=(0,iN.KA)(n,l);if((0,_.nZ)().setPropagationContext(c),E=a||ev.location.pathname,t){let t={name:E,op:"pageload",origin:"auto.pageload.nextjs.pages_router_instrumentation",tags:rX,startTimestamp:tq.Z1?tq.Z1/1e3:void 0,...o&&rQ&&rQ.getOptions().sendDefaultPii&&{data:o},...h,metadata:{source:a?"route":"url",dynamicSamplingContext:h&&!d?{}:d}};M=e(t),r(t)}i&&rZ().events.on("routeChangeStart",t=>{let i,r;let a=t.split(/[\?#]/,1)[0],o=function(e){let t=(ev.__BUILD_MANIFEST||{}).sortedPages;if(t)return t.find(t=>{let i=function(e){let t=e.split("/"),i="";t[t.length-1].match(/^\[\[\.\.\..+\]\]$/)&&(t.pop(),i="(?:/(.+?))?");let r=t.map(e=>e.replace(/^\[\.\.\..+\]$/,"(.+?)").replace(/^\[.*\]$/,"([^/]+?)")).join("/");return RegExp(`^${r}${i}(?:/)?$`)}(t);return e.match(i)})}(a);o?(i=o,r="route"):(i=a,r="url");let n={...rX,from:E};E=i,M&&M.end();let l={name:i,op:"navigation",origin:"auto.navigation.nextjs.pages_router_instrumentation",tags:n,metadata:{source:r}},h=e(l);if(s(l),h){let e=h.startChild({op:"ui.nextjs.route-change",origin:"auto.ui.nextjs.pages_router_instrumentation",description:"Next.js Route Change"}),t=()=>{e.end(),rZ().events.off("routeChangeComplete",t)};rZ().events.on("routeChangeComplete",t)}})}(e,t,i,r||(()=>void 0),s||(()=>void 0)):function(e,t=!0,i=!0,r,s){let a;let o=ev.location.pathname;if(t){let t={name:o,op:"pageload",origin:"auto.pageload.nextjs.app_router_instrumentation",tags:rY,startTimestamp:tq.Z1?tq.Z1/1e3:void 0,metadata:{source:"url"}};a=e(t),r(t)}i&&tr(t=>{if(void 0!==t.endTimestamp||"GET"!==t.fetchData.method)return;let i=function(e){if(!e[0]||"object"!=typeof e[0]||void 0===e[0].searchParams||!e[1]||"object"!=typeof e[1]||!("headers"in e[1]))return null;try{let t=e[0],i=e[1].headers;if("1"!==i.RSC||"1"===i["Next-Router-Prefetch"])return null;return{targetPathname:t.pathname}}catch(e){return null}}(t.args);if(null===i)return;let r=i.targetPathname,n={...rY,from:o};o=r,a&&a.end();let l={name:r,op:"navigation",origin:"auto.navigation.nextjs.app_router_instrumentation",tags:n,metadata:{source:"url"}};e(l),s(l)})}(e,t,i,r||(()=>void 0),s||(()=>void 0))}class r0 extends r_{constructor(e){super({tracingOrigins:[...rF.tracingOrigins,/^(api\/)/],routingInstrumentation:rJ,...e})}}function r1(e){let t=rH({tracingOrigins:[...rF.tracingOrigins,/^(api\/)/],...e,instrumentNavigation:!1,instrumentPageLoad:!1}),i={...t.options,instrumentPageLoad:!0,instrumentNavigation:!0,...e};return{...t,options:i,afterAllSetup(e){let r=t=>{rU(e,t)},s=t=>{rW(e,t)};rJ(()=>void 0,!1,i.instrumentNavigation,r,s),t.afterAllSetup(e),rJ(()=>void 0,i.instrumentPageLoad,!1,r,s)}}}function r2(e){let t;let i=e[0],r=1;for(;r<e.length;){let s=e[r],a=e[r+1];if(r+=2,("optionalAccess"===s||"optionalCall"===s)&&null==i)return;"access"===s||"optionalAccess"===s?(t=i,i=a(i)):("call"===s||"optionalCall"===s)&&(i=a((...e)=>i.call(t,...e)),t=void 0)}return i}let r3=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function r4(...e){let t="",i=!1;for(let r=e.length-1;r>=-1&&!i;r--){let s=r>=0?e[r]:"/";s&&(t=`${s}/${t}`,i="/"===s.charAt(0))}return t=(function(e,t){let i=0;for(let t=e.length-1;t>=0;t--){let r=e[t];"."===r?e.splice(t,1):".."===r?(e.splice(t,1),i++):i&&(e.splice(t,1),i--)}if(t)for(;i--;i)e.unshift("..");return e})(t.split("/").filter(e=>!!e),!i).join("/"),(i?"/":"")+t||"."}function r6(e){let t=0;for(;t<e.length&&""===e[t];t++);let i=e.length-1;for(;i>=0&&""===e[i];i--);return t>i?[]:e.slice(t,i-t+1)}let r5="RewriteFrames",r8=(e={})=>{let t=e.root,i=e.prefix||"app:///",r=e.iteratee||(e=>{if(!e.filename)return e;let r=/^[a-zA-Z]:\\/.test(e.filename)||e.filename.includes("\\")&&!e.filename.includes("/"),s=/^\//.test(e.filename);if(r||s){let s;let a=r?e.filename.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/"):e.filename,o=t?function(e,t){e=r4(e).slice(1),t=r4(t).slice(1);let i=r6(e.split("/")),r=r6(t.split("/")),s=Math.min(i.length,r.length),a=s;for(let e=0;e<s;e++)if(i[e]!==r[e]){a=e;break}let o=[];for(let e=a;e<i.length;e++)o.push("..");return(o=o.concat(r.slice(a))).join("/")}(t,a):function(e){let t=e.length>1024?`<truncated>${e.slice(-1024)}`:e,i=r3.exec(t);return i?i.slice(1):[]}(a)[2];e.filename=`${i}${o}`}return e});return{name:r5,setupOnce(){},processEvent(e){let t=e;return e.exception&&Array.isArray(e.exception.values)&&(t=function(e){try{return{...e,exception:{...e.exception,values:e.exception.values.map(e=>{var t;return{...e,...e.stacktrace&&{stacktrace:{...t=e.stacktrace,frames:t&&t.frames&&t.frames.map(e=>r(e))}}}})}}}catch(t){return e}}(t)),t}}};X(r5,r8);let r7=ef.GLOBAL_OBJ,r9=e=>{let t=r7.__rewriteFramesAssetPrefixPath__||"";return r8({iteratee:e=>{try{let{origin:i}=new URL(e.filename);e.filename=r2([e,"access",e=>e.filename,"optionalAccess",e=>e.replace,"call",e=>e(i,"app://"),"access",e=>e.replace,"call",e=>e(t,"")])}catch(e){}return e.filename&&e.filename.startsWith("app:///_next")&&(e.filename=decodeURI(e.filename)),e.filename&&e.filename.match(/^app:\/\/\/_next\/static\/chunks\/(main-|main-app-|polyfills-|webpack-|framework-|framework\.)[0-9a-f]+\.js$/)&&(e.in_app=!1),e},...e})},se=ef.GLOBAL_OBJ;function st(e){let t=e.find(e=>"BrowserTracing"===e.name);if(!t)return e;if(t.afterAllSetup&&t.options){let{options:i}=t;e[e.indexOf(t)]=r1(i)}if(!(t instanceof r0)){let i=t.options;delete i.routingInstrumentation,delete i.tracingOrigins,e[e.indexOf(t)]=new r0(i)}return e}function si(e){return"/"===e[e.length-1]?e.slice(0,-1):e}({...tA});var sr=i(56989);function ss(){return"undefined"!=typeof window&&(!(0,sr.KV)()||void 0!==ef.GLOBAL_OBJ.process&&"renderer"===ef.GLOBAL_OBJ.process.type)}let sa=ef.GLOBAL_OBJ,so="sentryReplaySession",sn="Unable to send Replay";function sl(e){let t;let i=e[0],r=1;for(;r<e.length;){let s=e[r],a=e[r+1];if(r+=2,("optionalAccess"===s||"optionalCall"===s)&&null==i)return;"access"===s||"optionalAccess"===s?(t=i,i=a(i)):("call"===s||"optionalCall"===s)&&(i=a((...e)=>i.call(t,...e)),t=void 0)}return i}function sh(e){let t=sl([e,"optionalAccess",e=>e.host]);return sl([t,"optionalAccess",e=>e.shadowRoot])===e}function sd(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function sc(e){try{var t;let i=e.rules||e.cssRules;return i?((t=Array.from(i,su).join("")).includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),t):null}catch(e){return null}}function su(e){let t;if("styleSheet"in e)try{t=sc(e.styleSheet)||function(e){let{cssText:t}=e;if(t.split('"').length<3)return t;let i=["@import",`url(${JSON.stringify(e.href)})`];return""===e.layerName?i.push("layer"):e.layerName&&i.push(`layer(${e.layerName})`),e.supportsText&&i.push(`supports(${e.supportsText})`),e.media.length&&i.push(e.media.mediaText),i.join(" ")+";"}(e)}catch(e){}else if("selectorText"in e&&e.selectorText.includes(":"))return e.cssText.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2");return t||e.cssText}(I=F||(F={}))[I.Document=0]="Document",I[I.DocumentType=1]="DocumentType",I[I.Element=2]="Element",I[I.Text=3]="Text",I[I.CDATA=4]="CDATA",I[I.Comment=5]="Comment";class sp{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(e){var t;return e?(()=>-1,null!=(t=sl([this,"access",e=>e.getMeta,"call",t=>t(e),"optionalAccess",e=>e.id]))?t:-1):-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let i=t.id;this.idNodeMap.set(i,e),this.nodeMetaMap.set(e,t)}replace(e,t){let i=this.getNode(e);if(i){let e=this.nodeMetaMap.get(i);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function sg({maskInputOptions:e,tagName:t,type:i}){return"OPTION"===t&&(t="SELECT"),!!(e[t.toLowerCase()]||i&&e[i]||"password"===i||"INPUT"===t&&!i&&e.text)}function sm({isMasked:e,element:t,value:i,maskInputFn:r}){let s=i||"";return e?(r&&(s=r(s,t)),"*".repeat(s.length)):s}function sf(e){return e.toLowerCase()}function sv(e){return e.toUpperCase()}let sy="__rrweb_original__";function sC(e){let t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?sf(t):null}function sw(e,t,i){return"INPUT"===t&&("radio"===i||"checkbox"===i)?e.getAttribute("value")||"":e.value}let sb=1,sS=RegExp("[^a-z0-9-_:]");function sx(){return sb++}let sM=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,sE=/^(?:[a-z+]+:)?\/\//i,sD=/^www\..*/i,sI=/^(data:)([^,]*),(.*)/i;function sk(e,t){return(e||"").replace(sM,(e,i,r,s,a,o)=>{let n=r||a||o,l=i||s||"";if(!n)return e;if(sE.test(n)||sD.test(n)||sI.test(n))return`url(${l}${n}${l})`;if("/"===n[0])return`url(${l}${(t.indexOf("//")>-1?t.split("/").slice(0,3).join("/"):t.split("/")[0]).split("?")[0]+n}${l})`;let h=t.split("/"),d=n.split("/");for(let e of(h.pop(),d))"."!==e&&(".."===e?h.pop():h.push(e));return`url(${l}${h.join("/")}${l})`})}let sT=/^[^ \t\n\r\u000c]+/,sA=/^[, \t\n\r\u000c]+/;function sR(e,t){if(!t||""===t.trim())return t;let i=e.createElement("a");return i.href=t,i.href}function sL(){let e=document.createElement("a");return e.href="",e.href}function sP(e,t,i,r,s,a){return r?"src"!==i&&("href"!==i||"use"===t&&"#"===r[0])&&("xlink:href"!==i||"#"===r[0])&&("background"!==i||"table"!==t&&"td"!==t&&"th"!==t)?"srcset"===i?function(e,t){if(""===t.trim())return t;let i=0;function r(e){let r;let s=e.exec(t.substring(i));return s?(r=s[0],i+=r.length,r):""}let s=[];for(;r(sA),!(i>=t.length);){let a=r(sT);if(","===a.slice(-1))a=sR(e,a.substring(0,a.length-1)),s.push(a);else{let r="";a=sR(e,a);let o=!1;for(;;){let e=t.charAt(i);if(""===e){s.push((a+r).trim());break}if(o)")"===e&&(o=!1);else{if(","===e){i+=1,s.push((a+r).trim());break}"("===e&&(o=!0)}r+=e,i+=1}}}return s.join(", ")}(e,r):"style"===i?sk(r,sL()):"object"===t&&"data"===i?sR(e,r):"function"==typeof a?a(i,r,s):r:sR(e,r):r}function sF(e,t,i){return("video"===e||"audio"===e)&&"autoplay"===t}function sN(e,t,i=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>i?-1:t(e)?r:sN(e.parentNode,t,i,r+1)}function sO(e,t){return i=>{if(null===i)return!1;try{if(e){if("string"==typeof e){if(i.matches(`.${e}`))return!0}else if(function(e,t){for(let i=e.classList.length;i--;){let r=e.classList[i];if(t.test(r))return!0}return!1}(i,e))return!0}if(t&&i.matches(t))return!0;return!1}catch(e){return!1}}}function sB(e,t,i,r,s,a){try{let o=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(null===o)return!1;if("INPUT"===o.tagName){let e=o.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(e))return!0}let n=-1,l=-1;if(a){if((l=sN(o,sO(r,s)))<0)return!0;n=sN(o,sO(t,i),l>=0?l:1/0)}else{if((n=sN(o,sO(t,i)))<0)return!1;l=sN(o,sO(r,s),n>=0?n:1/0)}return n>=0?!(l>=0)||n<=l:!(l>=0)&&!!a}catch(e){}return!!a}function sG(e){return null==e?"":e.toLowerCase()}function sz(e,t){let i;let{doc:r,mirror:s,blockClass:a,blockSelector:o,unblockSelector:n,maskAllText:l,maskTextClass:h,unmaskTextClass:d,maskTextSelector:c,unmaskTextSelector:u,skipChild:p=!1,inlineStylesheet:g=!0,maskInputOptions:m={},maskAttributeFn:f,maskTextFn:C,maskInputFn:w,slimDOMOptions:b,dataURLOptions:S={},inlineImages:x=!1,recordCanvas:M=!1,onSerialize:E,onIframeLoad:D,iframeLoadTimeout:I=5e3,onStylesheetLoad:k,stylesheetLoadTimeout:T=5e3,keepIframeSrcFn:A=()=>!1,newlyAddedElement:R=!1}=t,{preserveWhiteSpace:L=!0}=t,P=function(e,t){let{doc:i,mirror:r,blockClass:s,blockSelector:a,unblockSelector:o,maskAllText:n,maskAttributeFn:l,maskTextClass:h,unmaskTextClass:d,maskTextSelector:c,unmaskTextSelector:u,inlineStylesheet:p,maskInputOptions:g={},maskTextFn:m,maskInputFn:f,dataURLOptions:C={},inlineImages:w,recordCanvas:b,keepIframeSrcFn:S,newlyAddedElement:x=!1}=t,M=function(e,t){if(!t.hasNode(e))return;let i=t.getId(e);return 1===i?void 0:i}(i,r);switch(e.nodeType){case e.DOCUMENT_NODE:if("CSS1Compat"!==e.compatMode)return{type:F.Document,childNodes:[],compatMode:e.compatMode};return{type:F.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:F.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:M};case e.ELEMENT_NODE:return function(e,t){let i;let{doc:r,blockClass:s,blockSelector:a,unblockSelector:o,inlineStylesheet:n,maskInputOptions:l={},maskAttributeFn:h,maskInputFn:d,dataURLOptions:c={},inlineImages:u,recordCanvas:p,keepIframeSrcFn:g,newlyAddedElement:m=!1,rootId:f,maskAllText:C,maskTextClass:w,unmaskTextClass:b,maskTextSelector:S,unmaskTextSelector:x}=t,M=function(e,t,i,r){try{if(r&&e.matches(r))return!1;if("string"==typeof t){if(e.classList.contains(t))return!0}else for(let i=e.classList.length;i--;){let r=e.classList[i];if(t.test(r))return!0}if(i)return e.matches(i)}catch(e){}return!1}(e,s,a,o),E=function(e){if(e instanceof HTMLFormElement)return"form";let t=sf(e.tagName);return sS.test(t)?"div":t}(e),D={},I=e.attributes.length;for(let t=0;t<I;t++){let i=e.attributes[t];i.name&&!sF(E,i.name,i.value)&&(D[i.name]=sP(r,E,sf(i.name),i.value,e,h))}if("link"===E&&n){let t=Array.from(r.styleSheets).find(t=>t.href===e.href),i=null;t&&(i=sc(t)),i&&(delete D.rel,delete D.href,D._cssText=sk(i,t.href))}if("style"===E&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){let t=sc(e.sheet);t&&(D._cssText=sk(t,sL()))}if("input"===E||"textarea"===E||"select"===E||"option"===E){let t=sC(e),i=sw(e,sv(E),t),r=e.checked;if("submit"!==t&&"button"!==t&&i){let r=sB(e,w,S,b,x,sg({type:t,tagName:sv(E),maskInputOptions:l}));D.value=sm({isMasked:r,element:e,value:i,maskInputFn:d})}r&&(D.checked=r)}if("option"===E&&(e.selected&&!l.select?D.selected=!0:delete D.selected),"canvas"===E&&p){if("2d"===e.__context)!function(e){let t=e.getContext("2d");if(!t)return!0;for(let i=0;i<e.width;i+=50)for(let r=0;r<e.height;r+=50){let s=t.getImageData;if(new Uint32Array((sy in s?s[sy]:s).call(t,i,r,Math.min(50,e.width-i),Math.min(50,e.height-r)).data.buffer).some(e=>0!==e))return!1}return!0}(e)&&(D.rr_dataURL=e.toDataURL(c.type,c.quality));else if(!("__context"in e)){let t=e.toDataURL(c.type,c.quality),i=document.createElement("canvas");i.width=e.width,i.height=e.height,t!==i.toDataURL(c.type,c.quality)&&(D.rr_dataURL=t)}}if("img"===E&&u){v||(y=(v=r.createElement("canvas")).getContext("2d"));let t=e.crossOrigin;e.crossOrigin="anonymous";let i=()=>{e.removeEventListener("load",i);try{v.width=e.naturalWidth,v.height=e.naturalHeight,y.drawImage(e,0,0),D.rr_dataURL=v.toDataURL(c.type,c.quality)}catch(t){console.warn(`Cannot inline img src=${e.currentSrc}! Error: ${t}`)}t?D.crossOrigin=t:e.removeAttribute("crossorigin")};e.complete&&0!==e.naturalWidth?i():e.addEventListener("load",i)}if(("audio"===E||"video"===E)&&(D.rr_mediaState=e.paused?"paused":"played",D.rr_mediaCurrentTime=e.currentTime),!m&&(e.scrollLeft&&(D.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(D.rr_scrollTop=e.scrollTop)),M){let{width:t,height:i}=e.getBoundingClientRect();D={class:D.class,rr_width:`${t}px`,rr_height:`${i}px`}}"iframe"!==E||g(D.src)||(e.contentDocument||(D.rr_src=D.src),delete D.src);try{customElements.get(E)&&(i=!0)}catch(e){}return{type:F.Element,tagName:E,attributes:D,childNodes:[],isSVG:!!("svg"===e.tagName||e.ownerSVGElement)||void 0,needBlock:M,rootId:f,isCustom:i}}(e,{doc:i,blockClass:s,blockSelector:a,unblockSelector:o,inlineStylesheet:p,maskAttributeFn:l,maskInputOptions:g,maskInputFn:f,dataURLOptions:C,inlineImages:w,recordCanvas:b,keepIframeSrcFn:S,newlyAddedElement:x,rootId:M,maskAllText:n,maskTextClass:h,unmaskTextClass:d,maskTextSelector:c,unmaskTextSelector:u});case e.TEXT_NODE:return function(e,t){let{maskAllText:i,maskTextClass:r,unmaskTextClass:s,maskTextSelector:a,unmaskTextSelector:o,maskTextFn:n,maskInputOptions:l,maskInputFn:h,rootId:d}=t,c=e.parentNode&&e.parentNode.tagName,u=e.textContent,p="STYLE"===c||void 0,g="SCRIPT"===c||void 0,m="TEXTAREA"===c||void 0;if(p&&u){try{e.nextSibling||e.previousSibling||sl([e,"access",e=>e.parentNode,"access",e=>e.sheet,"optionalAccess",e=>e.cssRules])&&(u=sc(e.parentNode.sheet))}catch(t){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${t}`,e)}u=sk(u,sL())}g&&(u="SCRIPT_PLACEHOLDER");let f=sB(e,r,a,s,o,i);return p||g||m||!u||!f||(u=n?n(u,e.parentElement):u.replace(/[\S]/g,"*")),m&&u&&(l.textarea||f)&&(u=h?h(u,e.parentNode):u.replace(/[\S]/g,"*")),"OPTION"===c&&u&&(u=sm({isMasked:sB(e,r,a,s,o,sg({type:null,tagName:c,maskInputOptions:l})),element:e,value:u,maskInputFn:h})),{type:F.Text,textContent:u||"",isStyle:p,rootId:d}}(e,{maskAllText:n,maskTextClass:h,unmaskTextClass:d,maskTextSelector:c,unmaskTextSelector:u,maskTextFn:m,maskInputOptions:g,maskInputFn:f,rootId:M});case e.CDATA_SECTION_NODE:return{type:F.CDATA,textContent:"",rootId:M};case e.COMMENT_NODE:return{type:F.Comment,textContent:e.textContent||"",rootId:M};default:return!1}}(e,{doc:r,mirror:s,blockClass:a,blockSelector:o,maskAllText:l,unblockSelector:n,maskTextClass:h,unmaskTextClass:d,maskTextSelector:c,unmaskTextSelector:u,inlineStylesheet:g,maskInputOptions:m,maskAttributeFn:f,maskTextFn:C,maskInputFn:w,dataURLOptions:S,inlineImages:x,recordCanvas:M,keepIframeSrcFn:A,newlyAddedElement:R});if(!P)return console.warn(e,"not serialized"),null;i=s.hasNode(e)?s.getId(e):!function(e,t){if(t.comment&&e.type===F.Comment)return!0;if(e.type===F.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel||"modulepreload"===e.attributes.rel)&&"script"===e.attributes.as||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&e.attributes.href.endsWith(".js"))||t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(sG(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===sG(e.attributes.name)||"icon"===sG(e.attributes.rel)||"apple-touch-icon"===sG(e.attributes.rel)||"shortcut icon"===sG(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&sG(e.attributes.name).match(/^description|keywords$/)||t.headMetaSocial&&(sG(e.attributes.property).match(/^(og|twitter|fb):/)||sG(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===sG(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===sG(e.attributes.name)||"googlebot"===sG(e.attributes.name)||"bingbot"===sG(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;else if(t.headMetaAuthorship&&("author"===sG(e.attributes.name)||"generator"===sG(e.attributes.name)||"framework"===sG(e.attributes.name)||"publisher"===sG(e.attributes.name)||"progid"===sG(e.attributes.name)||sG(e.attributes.property).match(/^article:/)||sG(e.attributes.property).match(/^product:/)))return!0;else if(t.headMetaVerification&&("google-site-verification"===sG(e.attributes.name)||"yandex-verification"===sG(e.attributes.name)||"csrf-token"===sG(e.attributes.name)||"p:domain_verify"===sG(e.attributes.name)||"verify-v1"===sG(e.attributes.name)||"verification"===sG(e.attributes.name)||"shopify-checkout-api-token"===sG(e.attributes.name)))return!0}}return!1}(P,b)&&(L||P.type!==F.Text||P.isStyle||P.textContent.replace(/^\s+|\s+$/gm,"").length)?sx():-2;let N=Object.assign(P,{id:i});if(s.add(e,N),-2===i)return null;E&&E(e);let O=!p;if(N.type===F.Element){O=O&&!N.needBlock,delete N.needBlock;let t=e.shadowRoot;t&&sd(t)&&(N.isShadowHost=!0)}if((N.type===F.Document||N.type===F.Element)&&O){b.headWhitespace&&N.type===F.Element&&"head"===N.tagName&&(L=!1);let t={doc:r,mirror:s,blockClass:a,blockSelector:o,maskAllText:l,unblockSelector:n,maskTextClass:h,unmaskTextClass:d,maskTextSelector:c,unmaskTextSelector:u,skipChild:p,inlineStylesheet:g,maskInputOptions:m,maskAttributeFn:f,maskTextFn:C,maskInputFn:w,slimDOMOptions:b,dataURLOptions:S,inlineImages:x,recordCanvas:M,preserveWhiteSpace:L,onSerialize:E,onIframeLoad:D,iframeLoadTimeout:I,onStylesheetLoad:k,stylesheetLoadTimeout:T,keepIframeSrcFn:A};for(let i of Array.from(e.childNodes)){let e=sz(i,t);e&&N.childNodes.push(e)}if(e.nodeType===e.ELEMENT_NODE&&e.shadowRoot)for(let i of Array.from(e.shadowRoot.childNodes)){let r=sz(i,t);r&&(sd(e.shadowRoot)&&(r.isShadow=!0),N.childNodes.push(r))}}return e.parentNode&&sh(e.parentNode)&&sd(e.parentNode)&&(N.isShadow=!0),N.type===F.Element&&"iframe"===N.tagName&&function(e,t,i){let r;let s=e.contentWindow;if(!s)return;let a=!1;try{r=s.document.readyState}catch(e){return}if("complete"!==r){let r=setTimeout(()=>{a||(t(),a=!0)},i);e.addEventListener("load",()=>{clearTimeout(r),a=!0,t()});return}let o="about:blank";if(s.location.href!==o||e.src===o||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}(e,()=>{let t=e.contentDocument;if(t&&D){let i=sz(t,{doc:t,mirror:s,blockClass:a,blockSelector:o,unblockSelector:n,maskAllText:l,maskTextClass:h,unmaskTextClass:d,maskTextSelector:c,unmaskTextSelector:u,skipChild:!1,inlineStylesheet:g,maskInputOptions:m,maskAttributeFn:f,maskTextFn:C,maskInputFn:w,slimDOMOptions:b,dataURLOptions:S,inlineImages:x,recordCanvas:M,preserveWhiteSpace:L,onSerialize:E,onIframeLoad:D,iframeLoadTimeout:I,onStylesheetLoad:k,stylesheetLoadTimeout:T,keepIframeSrcFn:A});i&&D(e,i)}},I),N.type===F.Element&&"link"===N.tagName&&"stylesheet"===N.attributes.rel&&function(e,t,i){let r,s=!1;try{r=e.sheet}catch(e){return}if(r)return;let a=setTimeout(()=>{s||(t(),s=!0)},i);e.addEventListener("load",()=>{clearTimeout(a),s=!0,t()})}(e,()=>{if(k){let t=sz(e,{doc:r,mirror:s,blockClass:a,blockSelector:o,unblockSelector:n,maskAllText:l,maskTextClass:h,unmaskTextClass:d,maskTextSelector:c,unmaskTextSelector:u,skipChild:!1,inlineStylesheet:g,maskInputOptions:m,maskAttributeFn:f,maskTextFn:C,maskInputFn:w,slimDOMOptions:b,dataURLOptions:S,inlineImages:x,recordCanvas:M,preserveWhiteSpace:L,onSerialize:E,onIframeLoad:D,iframeLoadTimeout:I,onStylesheetLoad:k,stylesheetLoadTimeout:T,keepIframeSrcFn:A});t&&k(e,t)}},T),N}function s_(e){let t;let i=e[0],r=1;for(;r<e.length;){let s=e[r],a=e[r+1];if(r+=2,("optionalAccess"===s||"optionalCall"===s)&&null==i)return;"access"===s||"optionalAccess"===s?(t=i,i=a(i)):("call"===s||"optionalCall"===s)&&(i=a((...e)=>i.call(t,...e)),t=void 0)}return i}function sV(e,t,i=document){let r={capture:!0,passive:!0};return i.addEventListener(e,t,r),()=>i.removeEventListener(e,t,r)}let sj="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.",sH={map:{},getId:()=>(console.error(sj),-1),getNode:()=>(console.error(sj),null),removeNodeFromMap(){console.error(sj)},has:()=>(console.error(sj),!1),reset(){console.error(sj)}};function sU(e,t,i={}){let r=null,s=0;return function(...a){let o=Date.now();s||!1!==i.leading||(s=o);let n=t-(o-s),l=this;n<=0||n>t?(r&&(function(...e){s8("clearTimeout")(...e)}(r),r=null),s=o,e.apply(l,a)):r||!1===i.trailing||(r=s7(()=>{s=!1===i.leading?0:Date.now(),r=null,e.apply(l,a)},n))}}function sW(e,t,i){try{if(!(t in e))return()=>{};let r=e[t],s=i(r);return"function"==typeof s&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=s,()=>{e[t]=r}}catch(e){return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(sH=new Proxy(sH,{get:(e,t,i)=>("map"===t&&console.error(sj),Reflect.get(e,t,i))}));let s$=Date.now;function sY(e){let t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:s_([t,"optionalAccess",e=>e.documentElement,"access",e=>e.scrollLeft])||s_([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.parentElement,"optionalAccess",e=>e.scrollLeft])||s_([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.scrollLeft])||0,top:t.scrollingElement?t.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:s_([t,"optionalAccess",e=>e.documentElement,"access",e=>e.scrollTop])||s_([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.parentElement,"optionalAccess",e=>e.scrollTop])||s_([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.scrollTop])||0}}function sK(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function sZ(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function sq(e){return e?e.nodeType===e.ELEMENT_NODE?e:e.parentElement:null}function sX(e,t,i,r,s){if(!e)return!1;let a=sq(e);if(!a)return!1;let o=sO(t,i);if(!s){let e=r&&a.matches(r);return o(a)&&!e}let n=sN(a,o),l=-1;return!(n<0)&&(r&&(l=sN(a,sO(null,r))),n>-1&&l<0||n<l)}function sQ(e,t){return -2===t.getId(e)}function sJ(e){return!!e.changedTouches}function s0(e,t){return!!("IFRAME"===e.nodeName&&t.getMeta(e))}function s1(e,t){return!!("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function s2(e){return!!s_([e,"optionalAccess",e=>e.shadowRoot])}/[1-9][0-9]{12}/.test(Date.now().toString())||(s$=()=>new Date().getTime());class s3{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(e){var t;return t=this.styleIDMap.get(e),null!=t?t:-1}has(e){return this.styleIDMap.has(e)}add(e,t){let i;return this.has(e)?this.getId(e):(i=void 0===t?this.id++:t,this.styleIDMap.set(e,i),this.idStyleMap.set(i,e),i)}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function s4(e){let t=null;return s_([e,"access",e=>e.getRootNode,"optionalCall",e=>e(),"optionalAccess",e=>e.nodeType])===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function s6(e){let t=e.ownerDocument;return!!t&&(t.contains(e)||function(e){let t=e.ownerDocument;if(!t)return!1;let i=function(e){let t,i=e;for(;t=s4(i);)i=t;return i}(e);return t.contains(i)}(e))}let s5={};function s8(e){let t=s5[e];if(t)return t;let i=window.document,r=window[e];if(i&&"function"==typeof i.createElement)try{let t=i.createElement("iframe");t.hidden=!0,i.head.appendChild(t);let s=t.contentWindow;s&&s[e]&&(r=s[e]),i.head.removeChild(t)}catch(e){}return s5[e]=r.bind(window)}function s7(...e){return s8("setTimeout")(...e)}var s9=((k=s9||{})[k.DomContentLoaded=0]="DomContentLoaded",k[k.Load=1]="Load",k[k.FullSnapshot=2]="FullSnapshot",k[k.IncrementalSnapshot=3]="IncrementalSnapshot",k[k.Meta=4]="Meta",k[k.Custom=5]="Custom",k[k.Plugin=6]="Plugin",k),ae=((T=ae||{})[T.Mutation=0]="Mutation",T[T.MouseMove=1]="MouseMove",T[T.MouseInteraction=2]="MouseInteraction",T[T.Scroll=3]="Scroll",T[T.ViewportResize=4]="ViewportResize",T[T.Input=5]="Input",T[T.TouchMove=6]="TouchMove",T[T.MediaInteraction=7]="MediaInteraction",T[T.StyleSheetRule=8]="StyleSheetRule",T[T.CanvasMutation=9]="CanvasMutation",T[T.Font=10]="Font",T[T.Log=11]="Log",T[T.Drag=12]="Drag",T[T.StyleDeclaration=13]="StyleDeclaration",T[T.Selection=14]="Selection",T[T.AdoptedStyleSheet=15]="AdoptedStyleSheet",T[T.CustomElement=16]="CustomElement",T),at=((A=at||{})[A.MouseUp=0]="MouseUp",A[A.MouseDown=1]="MouseDown",A[A.Click=2]="Click",A[A.ContextMenu=3]="ContextMenu",A[A.DblClick=4]="DblClick",A[A.Focus=5]="Focus",A[A.Blur=6]="Blur",A[A.TouchStart=7]="TouchStart",A[A.TouchMove_Departed=8]="TouchMove_Departed",A[A.TouchEnd=9]="TouchEnd",A[A.TouchCancel=10]="TouchCancel",A),ai=((R=ai||{})[R.Mouse=0]="Mouse",R[R.Pen=1]="Pen",R[R.Touch=2]="Touch",R);class ar{constructor(){this.length=0,this.head=null,this.tail=null}get(e){if(e>=this.length)throw Error("Position outside of list range");let t=this.head;for(let i=0;i<e;i++)t=function(e){let t;let i=e[0],r=1;for(;r<e.length;){let s=e[r],a=e[r+1];if(r+=2,("optionalAccess"===s||"optionalCall"===s)&&null==i)return;"access"===s||"optionalAccess"===s?(t=i,i=a(i)):("call"===s||"optionalCall"===s)&&(i=a((...e)=>i.call(t,...e)),t=void 0)}return i}([t,"optionalAccess",e=>e.next])||null;return t}addNode(e){let t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&"__ln"in e.previousSibling){let i=e.previousSibling.__ln.next;t.next=i,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,i&&(i.previous=t)}else if(e.nextSibling&&"__ln"in e.nextSibling&&e.nextSibling.__ln.previous){let i=e.nextSibling.__ln.previous;t.previous=i,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,i&&(i.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;null===t.next&&(this.tail=t),this.length++}removeNode(e){let t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}let as=(e,t)=>`${e}@${t}`;class aa{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=e=>{e.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;let e=[],t=new Set,i=new ar,r=e=>{let t=e,i=-2;for(;-2===i;)i=(t=t&&t.nextSibling)&&this.mirror.getId(t);return i},s=s=>{if(!s.parentNode||!s6(s))return;let a=sh(s.parentNode)?this.mirror.getId(s4(s)):this.mirror.getId(s.parentNode),o=r(s);if(-1===a||-1===o)return i.addNode(s);let n=sz(s,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:e=>{s0(e,this.mirror)&&this.iframeManager.addIframe(e),s1(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),s2(s)&&this.shadowDomManager.addShadowRoot(s.shadowRoot,this.doc)},onIframeLoad:(e,t)=>{this.iframeManager.attachIframe(e,t),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)}});n&&(e.push({parentId:a,nextId:o,node:n}),t.add(n.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let e of this.movedSet)(!an(this.removes,e,this.mirror)||this.movedSet.has(e.parentNode))&&s(e);for(let e of this.addedSet)al(this.droppedSet,e)||an(this.removes,e,this.mirror)?al(this.movedSet,e)?s(e):this.droppedSet.add(e):s(e);let a=null;for(;i.length;){let e=null;if(a){let t=this.mirror.getId(a.value.parentNode),i=r(a.value);-1!==t&&-1!==i&&(e=a)}if(!e){let t=i.tail;for(;t;){let i=t;if(t=t.previous,i){let t=this.mirror.getId(i.value.parentNode);if(-1===r(i.value))continue;if(-1!==t){e=i;break}{let t=i.value;if(t.parentNode&&t.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let r=t.parentNode.host;if(-1!==this.mirror.getId(r)){e=i;break}}}}}}if(!e){for(;i.head;)i.removeNode(i.head.value);break}a=e.previous,i.removeNode(e.value),s(e.value)}let o={texts:this.texts.map(e=>({id:this.mirror.getId(e.node),value:e.value})).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),attributes:this.attributes.map(e=>{let{attributes:t}=e;if("string"==typeof t.style){let i=JSON.stringify(e.styleDiff),r=JSON.stringify(e._unchangedStyles);i.length<t.style.length&&(i+r).split("var(").length===t.style.split("var(").length&&(t.style=e.styleDiff)}return{id:this.mirror.getId(e.node),attributes:t}}).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),removes:this.removes,adds:e};(o.texts.length||o.attributes.length||o.removes.length||o.adds.length)&&(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(o))},this.processMutation=e=>{if(!sQ(e.target,this.mirror))switch(e.type){case"characterData":{let t=e.target.textContent;sX(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||t===e.oldValue||this.texts.push({value:sB(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&t?this.maskTextFn?this.maskTextFn(t,sq(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{let t=e.target,i=e.attributeName,r=e.target.getAttribute(i);if("value"===i){let i=sC(t),s=t.tagName;r=sw(t,s,i);let a=sg({maskInputOptions:this.maskInputOptions,tagName:s,type:i});r=sm({isMasked:sB(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,a),element:t,value:r,maskInputFn:this.maskInputFn})}if(sX(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||r===e.oldValue)return;let s=this.attributeMap.get(e.target);if("IFRAME"===t.tagName&&"src"===i&&!this.keepIframeSrcFn(r)){if(t.contentDocument)return;i="rr_src"}if(s||(s={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(s),this.attributeMap.set(e.target,s)),"type"===i&&"INPUT"===t.tagName&&"password"===(e.oldValue||"").toLowerCase()&&t.setAttribute("data-rr-is-password","true"),!sF(t.tagName,i)&&(s.attributes[i]=sP(this.doc,sf(t.tagName),sf(i),r,t,this.maskAttributeFn),"style"===i)){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(e){this.unattachedDoc=this.doc}let i=this.unattachedDoc.createElement("span");for(let r of(e.oldValue&&i.setAttribute("style",e.oldValue),Array.from(t.style))){let e=t.style.getPropertyValue(r),a=t.style.getPropertyPriority(r);e!==i.style.getPropertyValue(r)||a!==i.style.getPropertyPriority(r)?""===a?s.styleDiff[r]=e:s.styleDiff[r]=[e,a]:s._unchangedStyles[r]=[e,a]}for(let e of Array.from(i.style))""===t.style.getPropertyValue(e)&&(s.styleDiff[e]=!1)}break}case"childList":if(sX(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{let i=this.mirror.getId(t),r=sh(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);sX(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||sQ(t,this.mirror)||-1===this.mirror.getId(t)||(this.addedSet.has(t)?(ao(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===i||function e(t,i){if(sh(t))return!1;let r=i.getId(t);return!i.has(r)||(!t.parentNode||t.parentNode.nodeType!==t.DOCUMENT_NODE)&&(!t.parentNode||e(t.parentNode,i))}(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[as(i,r)]?ao(this.movedSet,t):this.removes.push({parentId:r,id:i,isShadow:!!(sh(e.target)&&sd(e.target))||void 0})),this.mapRemoves.push(t))})}},this.genAdds=(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(sQ(e,this.mirror))return;this.movedSet.add(e);let i=null;t&&this.mirror.hasNode(t)&&(i=this.mirror.getId(t)),i&&-1!==i&&(this.movedMap[as(this.mirror.getId(e),i)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);!sX(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&(e.childNodes.forEach(e=>this.genAdds(e)),s2(e)&&e.shadowRoot.childNodes.forEach(t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)}))}}}init(e){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function ao(e,t){e.delete(t),t.childNodes.forEach(t=>ao(e,t))}function an(e,t,i){return 0!==e.length&&function e(t,i,r){let{parentNode:s}=i;if(!s)return!1;let a=r.getId(s);return!!t.some(e=>e.id===a)||e(t,s,r)}(e,t,i)}function al(e,t){return 0!==e.size&&function e(t,i){let{parentNode:r}=i;return!!r&&(!!t.has(r)||e(t,r))}(e,t)}let ah=e=>C?(...t)=>{try{return e(...t)}catch(e){if(C&&!0===C(e))return()=>{};throw e}}:e;function ad(e){let t;let i=e[0],r=1;for(;r<e.length;){let s=e[r],a=e[r+1];if(r+=2,("optionalAccess"===s||"optionalCall"===s)&&null==i)return;"access"===s||"optionalAccess"===s?(t=i,i=a(i)):("call"===s||"optionalCall"===s)&&(i=a((...e)=>i.call(t,...e)),t=void 0)}return i}let ac=[];function au(e){try{if("composedPath"in e){let t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch(e){}return e&&e.target}function ap(e,t){let i=new aa;ac.push(i),i.init(e);let r=window.MutationObserver||window.__rrMutationObserver,s=ad([window,"optionalAccess",e=>e.Zone,"optionalAccess",e=>e.__symbol__,"optionalCall",e=>e("MutationObserver")]);s&&window[s]&&(r=window[s]);let a=new r(ah(t=>{e.onMutation&&!1===e.onMutation(t)||i.processMutations.bind(i)(t)}));return a.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),a}function ag({scrollCb:e,doc:t,mirror:i,blockClass:r,blockSelector:s,unblockSelector:a,sampling:o}){return sV("scroll",ah(sU(ah(o=>{let n=au(o);if(!n||sX(n,r,s,a,!0))return;let l=i.getId(n);if(n===t&&t.defaultView){let i=sY(t.defaultView);e({id:l,x:i.left,y:i.top})}else e({id:l,x:n.scrollLeft,y:n.scrollTop})}),o.scroll||100)),t)}let am=["INPUT","TEXTAREA","SELECT"],af=new WeakMap;function av(e){var t;return t=[],ab("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||ab("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||ab("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||ab("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule?t.unshift(Array.from(e.parentRule.cssRules).indexOf(e)):e.parentStyleSheet&&t.unshift(Array.from(e.parentStyleSheet.cssRules).indexOf(e)),t}function ay(e,t,i){let r,s;return e?(e.ownerNode?r=t.getId(e.ownerNode):s=i.getId(e),{styleId:s,id:r}):{}}function aC({mirror:e,stylesheetManager:t},i){let r=null;r="#document"===i.nodeName?e.getId(i):e.getId(i.host);let s="#document"===i.nodeName?ad([i,"access",e=>e.defaultView,"optionalAccess",e=>e.Document]):ad([i,"access",e=>e.ownerDocument,"optionalAccess",e=>e.defaultView,"optionalAccess",e=>e.ShadowRoot]),a=ad([s,"optionalAccess",e=>e.prototype])?Object.getOwnPropertyDescriptor(ad([s,"optionalAccess",e=>e.prototype]),"adoptedStyleSheets"):void 0;return null!==r&&-1!==r&&s&&a?(Object.defineProperty(i,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get(){return ad([a,"access",e=>e.get,"optionalAccess",e=>e.call,"call",e=>e(this)])},set(e){let i=ad([a,"access",e=>e.set,"optionalAccess",e=>e.call,"call",t=>t(this,e)]);if(null!==r&&-1!==r)try{t.adoptStyleSheets(e,r)}catch(e){}return i}}),ah(()=>{Object.defineProperty(i,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get:a.get,set:a.set})})):()=>{}}function aw(e,t={}){let i=e.doc.defaultView;if(!i)return()=>{};let r=ap(e,e.doc),s=function({mousemoveCb:e,sampling:t,doc:i,mirror:r}){let s;if(!1===t.mousemove)return()=>{};let a="number"==typeof t.mousemove?t.mousemove:50,o="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500,n=[],l=sU(ah(t=>{let i=Date.now()-s;e(n.map(e=>(e.timeOffset-=i,e)),t),n=[],s=null}),o),h=ah(sU(ah(e=>{let t=au(e),{clientX:i,clientY:a}=sJ(e)?e.changedTouches[0]:e;s||(s=s$()),n.push({x:i,y:a,id:r.getId(t),timeOffset:s$()-s}),l("undefined"!=typeof DragEvent&&e instanceof DragEvent?ae.Drag:e instanceof MouseEvent?ae.MouseMove:ae.TouchMove)}),a,{trailing:!1})),d=[sV("mousemove",h,i),sV("touchmove",h,i),sV("drag",h,i)];return ah(()=>{d.forEach(e=>e())})}(e),a=function({mouseInteractionCb:e,doc:t,mirror:i,blockClass:r,blockSelector:s,unblockSelector:a,sampling:o}){if(!1===o.mouseInteraction)return()=>{};let n=!0===o.mouseInteraction||void 0===o.mouseInteraction?{}:o.mouseInteraction,l=[],h=null,d=t=>o=>{let n=au(o);if(sX(n,r,s,a,!0))return;let l=null,d=t;if("pointerType"in o){switch(o.pointerType){case"mouse":l=ai.Mouse;break;case"touch":l=ai.Touch;break;case"pen":l=ai.Pen}l===ai.Touch?at[t]===at.MouseDown?d="TouchStart":at[t]===at.MouseUp&&(d="TouchEnd"):ai.Pen}else sJ(o)&&(l=ai.Touch);null!==l?(h=l,(d.startsWith("Touch")&&l===ai.Touch||d.startsWith("Mouse")&&l===ai.Mouse)&&(l=null)):at[t]===at.Click&&(l=h,h=null);let c=sJ(o)?o.changedTouches[0]:o;if(!c)return;let u=i.getId(n),{clientX:p,clientY:g}=c;ah(e)({type:at[d],id:u,x:p,y:g,...null!==l&&{pointerType:l}})};return Object.keys(at).filter(e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==n[e]).forEach(e=>{let i=sf(e),r=d(e);if(window.PointerEvent)switch(at[e]){case at.MouseDown:case at.MouseUp:i=i.replace("mouse","pointer");break;case at.TouchStart:case at.TouchEnd:return}l.push(sV(i,r,t))}),ah(()=>{l.forEach(e=>e())})}(e),o=ag(e),n=function({viewportResizeCb:e},{win:t}){let i=-1,r=-1;return sV("resize",ah(sU(ah(()=>{let t=sK(),s=sZ();(i!==t||r!==s)&&(e({width:Number(s),height:Number(t)}),i=t,r=s)}),200)),t)}(e,{win:i}),l=function({inputCb:e,doc:t,mirror:i,blockClass:r,blockSelector:s,unblockSelector:a,ignoreClass:o,ignoreSelector:n,maskInputOptions:l,maskInputFn:h,sampling:d,userTriggeredOnInput:c,maskTextClass:u,unmaskTextClass:p,maskTextSelector:g,unmaskTextSelector:m}){function f(e){let i=au(e),d=e.isTrusted,f=i&&sv(i.tagName);if("OPTION"===f&&(i=i.parentElement),!i||!f||0>am.indexOf(f)||sX(i,r,s,a,!0))return;let y=i;if(y.classList.contains(o)||n&&y.matches(n))return;let C=sC(i),w=sw(y,f,C),b=!1,S=sg({maskInputOptions:l,tagName:f,type:C}),x=sB(i,u,g,p,m,S);("radio"===C||"checkbox"===C)&&(b=i.checked),w=sm({isMasked:x,element:i,value:w,maskInputFn:h}),v(i,c?{text:w,isChecked:b,userTriggered:d}:{text:w,isChecked:b});let M=i.name;"radio"===C&&M&&b&&t.querySelectorAll(`input[type="radio"][name="${M}"]`).forEach(e=>{if(e!==i){let t=sm({isMasked:x,element:e,value:sw(e,f,C),maskInputFn:h});v(e,c?{text:t,isChecked:!b,userTriggered:!1}:{text:t,isChecked:!b})}})}function v(t,r){let s=af.get(t);if(!s||s.text!==r.text||s.isChecked!==r.isChecked){af.set(t,r);let s=i.getId(t);ah(e)({...r,id:s})}}let y=("last"===d.input?["change"]:["input","change"]).map(e=>sV(e,ah(f),t)),C=t.defaultView;if(!C)return()=>{y.forEach(e=>e())};let w=C.Object.getOwnPropertyDescriptor(C.HTMLInputElement.prototype,"value"),b=[[C.HTMLInputElement.prototype,"value"],[C.HTMLInputElement.prototype,"checked"],[C.HTMLSelectElement.prototype,"value"],[C.HTMLTextAreaElement.prototype,"value"],[C.HTMLSelectElement.prototype,"selectedIndex"],[C.HTMLOptionElement.prototype,"selected"]];return w&&w.set&&y.push(...b.map(e=>(function e(t,i,r,s,a=window){let o=a.Object.getOwnPropertyDescriptor(t,i);return a.Object.defineProperty(t,i,s?r:{set(e){s7(()=>{r.set.call(this,e)},0),o&&o.set&&o.set.call(this,e)}}),()=>e(t,i,o||{},!0)})(e[0],e[1],{set(){ah(f)({target:this,isTrusted:!1})}},!1,C))),ah(()=>{y.forEach(e=>e())})}(e),h=function({mediaInteractionCb:e,blockClass:t,blockSelector:i,unblockSelector:r,mirror:s,sampling:a,doc:o}){let n=ah(o=>sU(ah(a=>{let n=au(a);if(!n||sX(n,t,i,r,!0))return;let{currentTime:l,volume:h,muted:d,playbackRate:c}=n;e({type:o,id:s.getId(n),currentTime:l,volume:h,muted:d,playbackRate:c})}),a.media||500)),l=[sV("play",n(0),o),sV("pause",n(1),o),sV("seeked",n(2),o),sV("volumechange",n(3),o),sV("ratechange",n(4),o)];return ah(()=>{l.forEach(e=>e())})}(e),d=function({styleSheetRuleCb:e,mirror:t,stylesheetManager:i},{win:r}){let s,a;if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};let o=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(o,{apply:ah((r,s,a)=>{let[o,n]=a,{id:l,styleId:h}=ay(s,t,i.styleMirror);return(l&&-1!==l||h&&-1!==h)&&e({id:l,styleId:h,adds:[{rule:o,index:n}]}),r.apply(s,a)})});let n=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(n,{apply:ah((r,s,a)=>{let[o]=a,{id:n,styleId:l}=ay(s,t,i.styleMirror);return(n&&-1!==n||l&&-1!==l)&&e({id:n,styleId:l,removes:[{index:o}]}),r.apply(s,a)})}),r.CSSStyleSheet.prototype.replace&&(s=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(s,{apply:ah((r,s,a)=>{let[o]=a,{id:n,styleId:l}=ay(s,t,i.styleMirror);return(n&&-1!==n||l&&-1!==l)&&e({id:n,styleId:l,replace:o}),r.apply(s,a)})})),r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:ah((r,s,a)=>{let[o]=a,{id:n,styleId:l}=ay(s,t,i.styleMirror);return(n&&-1!==n||l&&-1!==l)&&e({id:n,styleId:l,replaceSync:o}),r.apply(s,a)})}));let l={};aS("CSSGroupingRule")?l.CSSGroupingRule=r.CSSGroupingRule:(aS("CSSMediaRule")&&(l.CSSMediaRule=r.CSSMediaRule),aS("CSSConditionRule")&&(l.CSSConditionRule=r.CSSConditionRule),aS("CSSSupportsRule")&&(l.CSSSupportsRule=r.CSSSupportsRule));let h={};return Object.entries(l).forEach(([r,s])=>{h[r]={insertRule:s.prototype.insertRule,deleteRule:s.prototype.deleteRule},s.prototype.insertRule=new Proxy(h[r].insertRule,{apply:ah((r,s,a)=>{let[o,n]=a,{id:l,styleId:h}=ay(s.parentStyleSheet,t,i.styleMirror);return(l&&-1!==l||h&&-1!==h)&&e({id:l,styleId:h,adds:[{rule:o,index:[...av(s),n||0]}]}),r.apply(s,a)})}),s.prototype.deleteRule=new Proxy(h[r].deleteRule,{apply:ah((r,s,a)=>{let[o]=a,{id:n,styleId:l}=ay(s.parentStyleSheet,t,i.styleMirror);return(n&&-1!==n||l&&-1!==l)&&e({id:n,styleId:l,removes:[{index:[...av(s),o]}]}),r.apply(s,a)})})}),ah(()=>{r.CSSStyleSheet.prototype.insertRule=o,r.CSSStyleSheet.prototype.deleteRule=n,s&&(r.CSSStyleSheet.prototype.replace=s),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(l).forEach(([e,t])=>{t.prototype.insertRule=h[e].insertRule,t.prototype.deleteRule=h[e].deleteRule})})}(e,{win:i}),c=aC(e,e.doc),u=function({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:i,stylesheetManager:r},{win:s}){let a=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(a,{apply:ah((s,o,n)=>{let[l,h,d]=n;if(i.has(l))return a.apply(o,[l,h,d]);let{id:c,styleId:u}=ay(ad([o,"access",e=>e.parentRule,"optionalAccess",e=>e.parentStyleSheet]),t,r.styleMirror);return(c&&-1!==c||u&&-1!==u)&&e({id:c,styleId:u,set:{property:l,value:h,priority:d},index:av(o.parentRule)}),s.apply(o,n)})});let o=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:ah((s,a,n)=>{let[l]=n;if(i.has(l))return o.apply(a,[l]);let{id:h,styleId:d}=ay(ad([a,"access",e=>e.parentRule,"optionalAccess",e=>e.parentStyleSheet]),t,r.styleMirror);return(h&&-1!==h||d&&-1!==d)&&e({id:h,styleId:d,remove:{property:l},index:av(a.parentRule)}),s.apply(a,n)})}),ah(()=>{s.CSSStyleDeclaration.prototype.setProperty=a,s.CSSStyleDeclaration.prototype.removeProperty=o})}(e,{win:i}),p=e.collectFonts?function({fontCb:e,doc:t}){let i=t.defaultView;if(!i)return()=>{};let r=[],s=new WeakMap,a=i.FontFace;i.FontFace=function(e,t,i){let r=new a(e,t,i);return s.set(r,{family:e,buffer:"string"!=typeof t,descriptors:i,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};let o=sW(t.fonts,"add",function(t){return function(i){return s7(ah(()=>{let t=s.get(i);t&&(e(t),s.delete(i))}),0),t.apply(this,[i])}});return r.push(()=>{i.FontFace=a}),r.push(o),ah(()=>{r.forEach(e=>e())})}(e):()=>{},g=function(e){let{doc:t,mirror:i,blockClass:r,blockSelector:s,unblockSelector:a,selectionCb:o}=e,n=!0,l=ah(()=>{let e=t.getSelection();if(!e||n&&ad([e,"optionalAccess",e=>e.isCollapsed]))return;n=e.isCollapsed||!1;let l=[],h=e.rangeCount||0;for(let t=0;t<h;t++){let{startContainer:o,startOffset:n,endContainer:h,endOffset:d}=e.getRangeAt(t);sX(o,r,s,a,!0)||sX(h,r,s,a,!0)||l.push({start:i.getId(o),startOffset:n,end:i.getId(h),endOffset:d})}o({ranges:l})});return l(),sV("selectionchange",l)}(e),m=function({doc:e,customElementCb:t}){let i=e.defaultView;return i&&i.customElements?sW(i.customElements,"define",function(e){return function(i,r,s){try{t({define:{name:i}})}catch(e){}return e.apply(this,[i,r,s])}}):()=>{}}(e),f=[];for(let t of e.plugins)f.push(t.observer(t.callback,i,t.options));return ah(()=>{ac.forEach(e=>e.reset()),r.disconnect(),s(),a(),o(),n(),l(),h(),d(),c(),u(),p(),g(),m(),f.forEach(e=>e())})}function ab(e){return void 0!==window[e]}function aS(e){return!!(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class ax{constructor(e){this.generateIdFn=e,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(e,t,i,r){let s=i||this.getIdToRemoteIdMap(e),a=r||this.getRemoteIdToIdMap(e),o=s.get(t);return o||(o=this.generateIdFn(),s.set(t,o),a.set(o,t)),o}getIds(e,t){let i=this.getIdToRemoteIdMap(e),r=this.getRemoteIdToIdMap(e);return t.map(t=>this.getId(e,t,i,r))}getRemoteId(e,t,i){let r=i||this.getRemoteIdToIdMap(e);return"number"!=typeof t?t:r.get(t)||-1}getRemoteIds(e,t){let i=this.getRemoteIdToIdMap(e);return t.map(t=>this.getRemoteId(e,t,i))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}function aM(e){let t;let i=e[0],r=1;for(;r<e.length;){let s=e[r],a=e[r+1];if(r+=2,("optionalAccess"===s||"optionalCall"===s)&&null==i)return;"access"===s||"optionalAccess"===s?(t=i,i=a(i)):("call"===s||"optionalCall"===s)&&(i=a((...e)=>i.call(t,...e)),t=void 0)}return i}class aE{constructor(){this.crossOriginIframeMirror=new ax(sx),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class aD{constructor(e){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new ax(sx),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new ax(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),aM([this,"access",e=>e.loadListener,"optionalCall",t=>t(e)]),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){if("rrweb"!==e.data.type||e.origin!==e.data.origin||!e.source)return;let t=this.crossOriginIframeMap.get(e.source);if(!t)return;let i=this.transformCrossOriginEvent(t,e.data.event);i&&this.wrappedEmit(i,e.data.isCheckout)}transformCrossOriginEvent(e,t){switch(t.type){case s9.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);let i=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(t.data.node,i),{timestamp:t.timestamp,type:s9.IncrementalSnapshot,data:{source:ae.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case s9.Meta:case s9.Load:case s9.DomContentLoaded:break;case s9.Plugin:return t;case s9.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case s9.IncrementalSnapshot:switch(t.data.source){case ae.Mutation:return t.data.adds.forEach(t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);let i=this.crossOriginIframeRootIdMap.get(e);i&&this.patchRootIdOnNode(t.node,i)}),t.data.removes.forEach(t=>{this.replaceIds(t,e,["parentId","id"])}),t.data.attributes.forEach(t=>{this.replaceIds(t,e,["id"])}),t.data.texts.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case ae.Drag:case ae.TouchMove:case ae.MouseMove:return t.data.positions.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case ae.ViewportResize:return!1;case ae.MediaInteraction:case ae.MouseInteraction:case ae.Scroll:case ae.CanvasMutation:case ae.Input:return this.replaceIds(t.data,e,["id"]),t;case ae.StyleSheetRule:case ae.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case ae.Font:return t;case ae.Selection:return t.data.ranges.forEach(t=>{this.replaceIds(t,e,["start","end"])}),t;case ae.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),aM([t,"access",e=>e.data,"access",e=>e.styles,"optionalAccess",e=>e.forEach,"call",t=>t(t=>{this.replaceStyleIds(t,e,["styleId"])})]),t}}return!1}replace(e,t,i,r){for(let s of r)(Array.isArray(t[s])||"number"==typeof t[s])&&(Array.isArray(t[s])?t[s]=e.getIds(i,t[s]):t[s]=e.getId(i,t[s]));return t}replaceIds(e,t,i){return this.replace(this.crossOriginIframeMirror,e,t,i)}replaceStyleIds(e,t,i){return this.replace(this.crossOriginIframeStyleMirror,e,t,i)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(e=>{this.replaceIdOnNode(e,t)})}patchRootIdOnNode(e,t){e.type===F.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(e=>{this.patchRootIdOnNode(e,t)})}}class aI{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class ak{constructor(e){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!sd(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);let i=ap({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>i.disconnect()),this.restoreHandlers.push(ag({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),s7(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(e.host)),this.restoreHandlers.push(aC({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){e.contentWindow&&e.contentDocument&&this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){let i=this;this.restoreHandlers.push(sW(e.prototype,"attachShadow",function(e){return function(r){let s=e.call(this,r);return this.shadowRoot&&s6(this)&&i.addShadowRoot(this.shadowRoot,t),s}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(e){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}class aT{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}}class aA{constructor(e){this.trackedLinkElements=new WeakSet,this.styleMirror=new s3,this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(0===e.length)return;let i={id:t,styleIds:[]},r=[];for(let t of e){let e;this.styleMirror.has(t)?e=this.styleMirror.getId(t):(e=this.styleMirror.add(t),r.push({styleId:e,rules:Array.from(t.rules||CSSRule,(e,t)=>({rule:su(e),index:t}))})),i.styleIds.push(e)}r.length>0&&(i.styles=r),this.adoptedStyleSheetCb(i)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class aR{constructor(){this.nodeMap=new WeakMap,this.loop=!0,this.periodicallyClear()}periodicallyClear(){!function(...e){s8("requestAnimationFrame")(...e)}(()=>{this.clear(),this.loop&&this.periodicallyClear()})}inOtherBuffer(e,t){let i=this.nodeMap.get(e);return i&&Array.from(i).some(e=>e!==t)}add(e,t){this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}clear(){this.nodeMap=new WeakMap}destroy(){this.loop=!1}}let aL=new sp;function aP(e={}){let t;let{emit:i,checkoutEveryNms:r,checkoutEveryNth:s,blockClass:a="rr-block",blockSelector:o=null,unblockSelector:n=null,ignoreClass:l="rr-ignore",ignoreSelector:h=null,maskAllText:d=!1,maskTextClass:c="rr-mask",unmaskTextClass:u=null,maskTextSelector:p=null,unmaskTextSelector:g=null,inlineStylesheet:m=!0,maskAllInputs:f,maskInputOptions:v,slimDOMOptions:y,maskAttributeFn:S,maskInputFn:x,maskTextFn:M,maxCanvasSize:E=null,packFn:D,sampling:I={},dataURLOptions:k={},mousemoveWait:T,recordCanvas:A=!1,recordCrossOriginIframes:R=!1,recordAfter:L="DOMContentLoaded"===e.recordAfter?e.recordAfter:"load",userTriggeredOnInput:P=!1,collectFonts:F=!1,inlineImages:N=!1,plugins:O,keepIframeSrcFn:B=()=>!1,ignoreCSSAttributes:G=new Set([]),errorHandler:z,onMutation:_,getCanvasManager:V}=e;C=z;let j=!R||window.parent===window,H=!1;if(!j)try{window.parent.document&&(H=!1)}catch(e){H=!0}if(j&&!i)throw Error("emit function is required");void 0!==T&&void 0===I.mousemove&&(I.mousemove=T),aL.reset();let U=!0===f?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:void 0!==v?v:{},W=!0===y||"all"===y?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===y,headMetaDescKeywords:"all"===y}:y||{};!function(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...e)=>{let t=e[0];if(!(0 in e))throw TypeError("1 argument is required");do if(this===t)return!0;while(t=t&&t.parentNode);return!1})}();let $=0,Y=e=>{for(let t of O||[])t.eventProcessor&&(e=t.eventProcessor(e));return D&&!H&&(e=D(e)),e};w=(e,a)=>{if(e.timestamp=s$(),r2([ac,"access",e=>e[0],"optionalAccess",e=>e.isFrozen,"call",e=>e()])&&e.type!==s9.FullSnapshot&&!(e.type===s9.IncrementalSnapshot&&e.data.source===ae.Mutation)&&ac.forEach(e=>e.unfreeze()),j)r2([i,"optionalCall",t=>t(Y(e),a)]);else if(H){let t={type:"rrweb",event:Y(e),origin:window.location.origin,isCheckout:a};window.parent.postMessage(t,"*")}if(e.type===s9.FullSnapshot)t=e,$=0;else if(e.type===s9.IncrementalSnapshot){if(e.data.source===ae.Mutation&&e.data.isAttachIframe)return;$++;let i=s&&$>=s,a=r&&t&&e.timestamp-t.timestamp>r;(i||a)&&ei(!0)}};let K=e=>{w({type:s9.IncrementalSnapshot,data:{source:ae.Mutation,...e}})},Z=e=>w({type:s9.IncrementalSnapshot,data:{source:ae.Scroll,...e}}),q=e=>w({type:s9.IncrementalSnapshot,data:{source:ae.CanvasMutation,...e}}),X=new aA({mutationCb:K,adoptedStyleSheetCb:e=>w({type:s9.IncrementalSnapshot,data:{source:ae.AdoptedStyleSheet,...e}})}),Q="boolean"==typeof __RRWEB_EXCLUDE_IFRAME__&&__RRWEB_EXCLUDE_IFRAME__?new aE:new aD({mirror:aL,mutationCb:K,stylesheetManager:X,recordCrossOriginIframes:R,wrappedEmit:w});for(let e of O||[])e.getMirror&&e.getMirror({nodeMirror:aL,crossOriginIframeMirror:Q.crossOriginIframeMirror,crossOriginIframeStyleMirror:Q.crossOriginIframeStyleMirror});let J=new aR,ee=function(e,t){try{return e?e(t):new aT}catch(e){return console.warn("Unable to initialize CanvasManager"),new aT}}(V,{mirror:aL,win:window,mutationCb:e=>w({type:s9.IncrementalSnapshot,data:{source:ae.CanvasMutation,...e}}),recordCanvas:A,blockClass:a,blockSelector:o,unblockSelector:n,maxCanvasSize:E,sampling:I.canvas,dataURLOptions:k,errorHandler:z}),et="boolean"==typeof __RRWEB_EXCLUDE_SHADOW_DOM__&&__RRWEB_EXCLUDE_SHADOW_DOM__?new aI:new ak({mutationCb:K,scrollCb:Z,bypassOptions:{onMutation:_,blockClass:a,blockSelector:o,unblockSelector:n,maskAllText:d,maskTextClass:c,unmaskTextClass:u,maskTextSelector:p,unmaskTextSelector:g,inlineStylesheet:m,maskInputOptions:U,dataURLOptions:k,maskAttributeFn:S,maskTextFn:M,maskInputFn:x,recordCanvas:A,inlineImages:N,sampling:I,slimDOMOptions:W,iframeManager:Q,stylesheetManager:X,canvasManager:ee,keepIframeSrcFn:B,processedNodeManager:J},mirror:aL}),ei=(e=!1)=>{w({type:s9.Meta,data:{href:window.location.href,width:sZ(),height:sK()}},e),X.reset(),et.init(),ac.forEach(e=>e.lock());let t=function(e,t){let{mirror:i=new sp,blockClass:r="rr-block",blockSelector:s=null,unblockSelector:a=null,maskAllText:o=!1,maskTextClass:n="rr-mask",unmaskTextClass:l=null,maskTextSelector:h=null,unmaskTextSelector:d=null,inlineStylesheet:c=!0,inlineImages:u=!1,recordCanvas:p=!1,maskAllInputs:g=!1,maskAttributeFn:m,maskTextFn:f,maskInputFn:v,slimDOM:y=!1,dataURLOptions:C,preserveWhiteSpace:w,onSerialize:b,onIframeLoad:S,iframeLoadTimeout:x,onStylesheetLoad:M,stylesheetLoadTimeout:E,keepIframeSrcFn:D=()=>!1}=t||{};return sz(e,{doc:e,mirror:i,blockClass:r,blockSelector:s,unblockSelector:a,maskAllText:o,maskTextClass:n,unmaskTextClass:l,maskTextSelector:h,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:c,maskInputOptions:!0===g?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:!1===g?{}:g,maskAttributeFn:m,maskTextFn:f,maskInputFn:v,slimDOMOptions:!0===y||"all"===y?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===y,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===y?{}:y,dataURLOptions:C,inlineImages:u,recordCanvas:p,preserveWhiteSpace:w,onSerialize:b,onIframeLoad:S,iframeLoadTimeout:x,onStylesheetLoad:M,stylesheetLoadTimeout:E,keepIframeSrcFn:D,newlyAddedElement:!1})}(document,{mirror:aL,blockClass:a,blockSelector:o,unblockSelector:n,maskAllText:d,maskTextClass:c,unmaskTextClass:u,maskTextSelector:p,unmaskTextSelector:g,inlineStylesheet:m,maskAllInputs:U,maskAttributeFn:S,maskInputFn:x,maskTextFn:M,slimDOM:W,dataURLOptions:k,recordCanvas:A,inlineImages:N,onSerialize:e=>{s0(e,aL)&&Q.addIframe(e),s1(e,aL)&&X.trackLinkElement(e),s2(e)&&et.addShadowRoot(e.shadowRoot,document)},onIframeLoad:(e,t)=>{Q.attachIframe(e,t),et.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{X.attachLinkElement(e,t)},keepIframeSrcFn:B});if(!t)return console.warn("Failed to snapshot the document");w({type:s9.FullSnapshot,data:{node:t,initialOffset:sY(window)}}),ac.forEach(e=>e.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&X.adoptStyleSheets(document.adoptedStyleSheets,aL.getId(document))};b=ei;try{let e=[],t=e=>ah(aw)({onMutation:_,mutationCb:K,mousemoveCb:(e,t)=>w({type:s9.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>w({type:s9.IncrementalSnapshot,data:{source:ae.MouseInteraction,...e}}),scrollCb:Z,viewportResizeCb:e=>w({type:s9.IncrementalSnapshot,data:{source:ae.ViewportResize,...e}}),inputCb:e=>w({type:s9.IncrementalSnapshot,data:{source:ae.Input,...e}}),mediaInteractionCb:e=>w({type:s9.IncrementalSnapshot,data:{source:ae.MediaInteraction,...e}}),styleSheetRuleCb:e=>w({type:s9.IncrementalSnapshot,data:{source:ae.StyleSheetRule,...e}}),styleDeclarationCb:e=>w({type:s9.IncrementalSnapshot,data:{source:ae.StyleDeclaration,...e}}),canvasMutationCb:q,fontCb:e=>w({type:s9.IncrementalSnapshot,data:{source:ae.Font,...e}}),selectionCb:e=>{w({type:s9.IncrementalSnapshot,data:{source:ae.Selection,...e}})},customElementCb:e=>{w({type:s9.IncrementalSnapshot,data:{source:ae.CustomElement,...e}})},blockClass:a,ignoreClass:l,ignoreSelector:h,maskAllText:d,maskTextClass:c,unmaskTextClass:u,maskTextSelector:p,unmaskTextSelector:g,maskInputOptions:U,inlineStylesheet:m,sampling:I,recordCanvas:A,inlineImages:N,userTriggeredOnInput:P,collectFonts:F,doc:e,maskAttributeFn:S,maskInputFn:x,maskTextFn:M,keepIframeSrcFn:B,blockSelector:o,unblockSelector:n,slimDOMOptions:W,dataURLOptions:k,mirror:aL,iframeManager:Q,stylesheetManager:X,shadowDomManager:et,processedNodeManager:J,canvasManager:ee,ignoreCSSAttributes:G,plugins:r2([O,"optionalAccess",e=>e.filter,"call",e=>e(e=>e.observer),"optionalAccess",e=>e.map,"call",e=>e(e=>({observer:e.observer,options:e.options,callback:t=>w({type:s9.Plugin,data:{plugin:e.name,payload:t}})}))])||[]},{});Q.addLoadListener(i=>{try{e.push(t(i.contentDocument))}catch(e){console.warn(e)}});let i=()=>{ei(),e.push(t(document))};return"interactive"===document.readyState||"complete"===document.readyState?i():(e.push(sV("DOMContentLoaded",()=>{w({type:s9.DomContentLoaded,data:{}}),"DOMContentLoaded"===L&&i()})),e.push(sV("load",()=>{w({type:s9.Load,data:{}}),"load"===L&&i()},window))),()=>{e.forEach(e=>e()),J.destroy(),b=void 0,C=void 0}}catch(e){console.warn(e)}}function aF(e){return e>9999999999?e:1e3*e}function aN(e){return e>9999999999?e/1e3:e}function aO(e,t){"sentry.transaction"!==t.category&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:s9.Custom,timestamp:1e3*(t.timestamp||0),data:{tag:"breadcrumb",payload:(0,eF.Fv)(t,10,1e3)}}),"console"===t.category)))}function aB(e){return e.closest("button,a")||e}function aG(e){let t=az(e);return t&&t instanceof Element?aB(t):t}function az(e){return"object"==typeof e&&e&&"target"in e?e.target:e}aP.mirror=aL,aP.takeFullSnapshot=function(e){if(!b)throw Error("please take full snapshot after start recording");b(e)};class a_{constructor(e,t,i=aO){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=t.timeout/1e3,this._threshold=t.threshold/1e3,this._scollTimeout=t.scrollTimeout/1e3,this._replay=e,this._ignoreSelector=t.ignoreSelector,this._addBreadcrumbEvent=i}addListeners(){var e;let t=(e=()=>{this._lastMutation=aj()},S||(S=[],(0,j.hl)(sa,"open",function(e){return function(...t){if(S)try{S.forEach(e=>e())}catch(e){}return e.apply(sa,t)}})),S.push(e),()=>{let t=S?S.indexOf(e):-1;t>-1&&S.splice(t,1)});this._teardown=()=>{t(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(e,t){var i;if(i=this._ignoreSelector,!aV.includes(t.tagName)||"INPUT"===t.tagName&&!["submit","button"].includes(t.getAttribute("type")||"")||"A"===t.tagName&&(t.hasAttribute("download")||t.hasAttribute("target")&&"_self"!==t.getAttribute("target"))||i&&t.matches(i)||!(e.data&&"number"==typeof e.data.nodeId&&e.timestamp))return;let r={timestamp:aN(e.timestamp),clickBreadcrumb:e,clickCount:0,node:t};this._clicks.some(e=>e.node===r.node&&1>Math.abs(e.timestamp-r.timestamp))||(this._clicks.push(r),1===this._clicks.length&&this._scheduleCheckClicks())}registerMutation(e=Date.now()){this._lastMutation=aN(e)}registerScroll(e=Date.now()){this._lastScroll=aN(e)}registerClick(e){let t=aB(e);this._handleMultiClick(t)}_handleMultiClick(e){this._getClicks(e).forEach(e=>{e.clickCount++})}_getClicks(e){return this._clicks.filter(t=>t.node===e)}_checkClicks(){let e=[],t=aj();for(let i of(this._clicks.forEach(i=>{!i.mutationAfter&&this._lastMutation&&(i.mutationAfter=i.timestamp<=this._lastMutation?this._lastMutation-i.timestamp:void 0),!i.scrollAfter&&this._lastScroll&&(i.scrollAfter=i.timestamp<=this._lastScroll?this._lastScroll-i.timestamp:void 0),i.timestamp+this._timeout<=t&&e.push(i)}),e)){let e=this._clicks.indexOf(i);e>-1&&(this._generateBreadcrumbs(i),this._clicks.splice(e,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(e){let t=this._replay,i=e.scrollAfter&&e.scrollAfter<=this._scollTimeout,r=e.mutationAfter&&e.mutationAfter<=this._threshold,{clickCount:s,clickBreadcrumb:a}=e;if(!i&&!r){let i=1e3*Math.min(e.mutationAfter||this._timeout,this._timeout),r=i<1e3*this._timeout?"mutation":"timeout",o={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.slowClickDetected",data:{...a.data,url:sa.location.href,route:t.getCurrentRoute(),timeAfterClickMs:i,endReason:r,clickCount:s||1}};this._addBreadcrumbEvent(t,o);return}if(s>1){let e={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.multiClick",data:{...a.data,url:sa.location.href,route:t.getCurrentRoute(),clickCount:s,metric:!0}};this._addBreadcrumbEvent(t,e)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=setTimeout(()=>this._checkClicks(),1e3)}}let aV=["A","BUTTON","INPUT"];function aj(){return Date.now()/1e3}function aH(e){return{timestamp:Date.now()/1e3,type:"default",...e}}(L=N||(N={}))[L.Document=0]="Document",L[L.DocumentType=1]="DocumentType",L[L.Element=2]="Element",L[L.Text=3]="Text",L[L.CDATA=4]="CDATA",L[L.Comment=5]="Comment";let aU=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]),aW=e=>t=>{if(!e.isEnabled())return;let i=function(e){let{target:t,message:i}=function(e){let t;let i="click"===e.name,r=null;try{r=i?aG(e.event):az(e.event),t=(0,eP.Rt)(r,{maxStringLength:200})||"<unknown>"}catch(e){t="<unknown>"}return{target:r,message:t}}(e);return aH({category:`ui.${e.name}`,...a$(t,i)})}(t);if(!i)return;let r="click"===t.name,s=r?t.event:void 0;r&&e.clickDetector&&s&&s.target&&!s.altKey&&!s.metaKey&&!s.ctrlKey&&!s.shiftKey&&function(e,t,i){e.handleClick(t,i)}(e.clickDetector,i,aG(t.event)),aO(e,i)};function a$(e,t){let i=aP.mirror.getId(e),r=i&&aP.mirror.getNode(i),s=r&&aP.mirror.getMeta(r),a=s&&s.type===N.Element?s:null;return{message:t,data:a?{nodeId:i,node:{id:i,tagName:a.tagName,textContent:Array.from(a.childNodes).map(e=>e.type===N.Text&&e.textContent).filter(Boolean).map(e=>e.trim()).join(""),attributes:function(e){let t={};for(let i in e)if(aU.has(i)){let r=i;("data-testid"===i||"data-test-id"===i)&&(r="testId"),t[r]=e[i]}return t}(a.attributes)}}:{}}}let aY={resource:function(e){let{entryType:t,initiatorType:i,name:r,responseEnd:s,startTime:a,decodedBodySize:o,encodedBodySize:n,responseStatus:l,transferSize:h}=e;return["fetch","xmlhttprequest"].includes(i)?null:{type:`${t}.${i}`,start:aZ(a),end:aZ(s),name:r,data:{size:h,statusCode:l,decodedBodySize:o,encodedBodySize:n}}},paint:function(e){let{duration:t,entryType:i,name:r,startTime:s}=e,a=aZ(s);return{type:i,name:r,start:a,end:a+t,data:void 0}},navigation:function(e){let{entryType:t,name:i,decodedBodySize:r,duration:s,domComplete:a,encodedBodySize:o,domContentLoadedEventStart:n,domContentLoadedEventEnd:l,domInteractive:h,loadEventStart:d,loadEventEnd:c,redirectCount:u,startTime:p,transferSize:g,type:m}=e;return 0===s?null:{type:`${t}.${m}`,start:aZ(p),end:aZ(a),name:i,data:{size:g,decodedBodySize:r,encodedBodySize:o,duration:s,domInteractive:h,domContentLoadedEventStart:n,domContentLoadedEventEnd:l,loadEventStart:d,loadEventEnd:c,domComplete:a,redirectCount:u}}}};function aK(e){return aY[e.entryType]?aY[e.entryType](e):null}function aZ(e){return((tq.Z1||sa.performance.timeOrigin)+e)/1e3}class aq extends Error{constructor(){super("Event buffer exceeded maximum size of 20000000.")}}class aX{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(e){let t=JSON.stringify(e).length;if(this._totalSize+=t,this._totalSize>2e7)throw new aq;this.events.push(e)}finish(){return new Promise(e=>{let t=this.events;this.clear(),e(JSON.stringify(t))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){let e=this.events.map(e=>e.timestamp).sort()[0];return e?aF(e):null}}class aQ{constructor(e){this._worker=e,this._id=0}ensureReady(){return this._ensureReadyPromise||(this._ensureReadyPromise=new Promise((e,t)=>{this._worker.addEventListener("message",({data:i})=>{i.success?e():t()},{once:!0}),this._worker.addEventListener("error",e=>{t(e)},{once:!0})})),this._ensureReadyPromise}destroy(){this._worker.terminate()}postMessage(e,t){let i=this._getAndIncrementId();return new Promise((r,s)=>{let a=({data:t})=>{if(t.method===e&&t.id===i){if(this._worker.removeEventListener("message",a),!t.success){s(Error("Error in compression worker"));return}r(t.response)}};this._worker.addEventListener("message",a),this._worker.postMessage({id:i,method:e,arg:t})})}_getAndIncrementId(){return this._id++}}class aJ{constructor(e){this._worker=new aQ(e),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(e){let t=aF(e.timestamp);(!this._earliestTimestamp||t<this._earliestTimestamp)&&(this._earliestTimestamp=t);let i=JSON.stringify(e);return(this._totalSize+=i.length,this._totalSize>2e7)?Promise.reject(new aq):this._sendEventToWorker(i)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,e=>{})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(e){return this._worker.postMessage("addEvent",e)}async _finishRequest(){let e=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,e}}class a0{constructor(e){this._fallback=new aX,this._compression=new aJ(e),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(e){this._used.hasCheckout=e}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(e){return this._used.addEvent(e)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(e){return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){let{events:e,hasCheckout:t}=this._fallback,i=[];for(let t of e)i.push(this._compression.addEvent(t));this._compression.hasCheckout=t,this._used=this._compression;try{await Promise.all(i)}catch(e){}}}function a1(){try{return"sessionStorage"in sa&&!!sa.sessionStorage}catch(e){return!1}}function a2(e){return void 0!==e&&Math.random()<e}function a3(e){let t=Date.now(),i=e.id||(0,H.DM)(),r=e.started||t,s=e.lastActivity||t;return{id:i,started:r,lastActivity:s,segmentId:e.segmentId||0,sampled:e.sampled,previousSessionId:e.previousSessionId}}function a4(e){if(a1())try{sa.sessionStorage.setItem(so,JSON.stringify(e))}catch(e){}}function a6({sessionSampleRate:e,allowBuffering:t,stickySession:i=!1},{previousSessionId:r}={}){let s=a3({sampled:a2(e)?"session":!!t&&"buffer",previousSessionId:r});return i&&a4(s),s}function a5(e,t,i=+new Date){return null===e||void 0===t||t<0||0!==t&&e+t<=i}function a8(e,{maxReplayDuration:t,sessionIdleExpire:i,targetTime:r=Date.now()}){return a5(e.started,t,r)||a5(e.lastActivity,i,r)}function a7(e,{sessionIdleExpire:t,maxReplayDuration:i}){return!!a8(e,{sessionIdleExpire:t,maxReplayDuration:i})&&("buffer"!==e.sampled||0!==e.segmentId)}function a9({traceInternals:e,sessionIdleExpire:t,maxReplayDuration:i,previousSessionId:r},s){let a=s.stickySession&&function(e){if(!a1())return null;try{let e=sa.sessionStorage.getItem(so);if(!e)return null;let t=JSON.parse(e);return a3(t)}catch(e){return null}}(0);return a?a7(a,{sessionIdleExpire:t,maxReplayDuration:i})?a6(s,{previousSessionId:a.id}):a:a6(s,{previousSessionId:r})}function oe(e,t,i){return!!oi(e,t)&&(ot(e,t,i),!0)}async function ot(e,t,i){if(!e.eventBuffer)return null;try{i&&"buffer"===e.recordingMode&&e.eventBuffer.clear(),i&&(e.eventBuffer.hasCheckout=!0);let r=e.getOptions(),s=function(e,t){try{if("function"==typeof t&&e.type===s9.Custom)return t(e)}catch(e){return null}return e}(t,r.beforeAddRecordingEvent);if(!s)return;return await e.eventBuffer.addEvent(s)}catch(i){await e.stop({reason:i&&i instanceof aq?"addEventSizeExceeded":"addEvent"});let t=(0,_.s3)();t&&t.recordDroppedEvent("internal_sdk_error","replay")}}function oi(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;let i=aF(t.timestamp);return!(i+e.timeouts.sessionIdlePause<Date.now())&&(!(i>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration)||(e.getOptions()._experiments.traceInternals,!1))}function or(e){return"transaction"===e.type}function os(e){return"feedback"===e.type}function oa(e){let t=function(){let e=(0,_.s3)();if(!e)return!1;let t=e.getTransport();return!!t&&(t.send.__sentry__baseTransport__||!1)}();return(i,r)=>{if(!e.isEnabled()||i.type&&!or(i))return;let s=r&&r.statusCode;if(!t||s&&!(s<200)&&!(s>=300)){if(or(i)){!function(e,t){let i=e.getContext();t.contexts&&t.contexts.trace&&t.contexts.trace.trace_id&&i.traceIds.size<100&&i.traceIds.add(t.contexts.trace.trace_id)}(e,i);return}!function(e,t){let i=e.getContext();if(t.event_id&&i.errorIds.size<100&&i.errorIds.add(t.event_id),"buffer"!==e.recordingMode||!t.tags||!t.tags.replayId)return;let{beforeErrorSampling:r}=e.getOptions();("function"!=typeof r||r(t))&&setTimeout(()=>{e.sendBufferedReplayOrFlush()})}(e,i)}}}function oo(e,t){return t.map(({type:t,start:i,end:r,name:s,data:a})=>{let o=e.throttledAddEvent({type:s9.Custom,timestamp:i,data:{tag:"performanceSpan",payload:{op:t,description:s,startTimestamp:i,endTimestamp:r,data:a}}});return"string"==typeof o?Promise.resolve(null):o})}function on(e,t){e.isEnabled()&&null!==t&&!function(e,t){let i=t&&void 0!==t.getClient?t.getClient():t,r=i&&i.getDsn(),s=i&&i.getOptions().tunnel;return!!r&&e.includes(r.host)||!!s&&si(e)===si(s)}(t.name,(0,_.s3)())&&e.addUpdate(()=>(oo(e,[t]),!0))}function ol(e,t){if(e)try{if("string"==typeof e)return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){let i=of(e);return t.encode(i).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch(e){}}function oh(e){if(!e)return;let t=parseInt(e,10);return isNaN(t)?void 0:t}function od(e){try{if("string"==typeof e)return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[of(e)];if(!e)return[void 0]}catch(e){return[void 0,"BODY_PARSE_ERROR"]}return[void 0,"UNPARSEABLE_BODY_TYPE"]}function oc(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};let i={...e._meta},r=i.warnings||[];return i.warnings=[...r,t],e._meta=i,e}function ou(e,t){if(!t)return null;let{startTimestamp:i,endTimestamp:r,url:s,method:a,statusCode:o,request:n,response:l}=t;return{type:e,start:i/1e3,end:r/1e3,name:s,data:(0,j.Jr)({method:a,statusCode:o,request:n,response:l})}}function op(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function og(e,t,i){if(!t&&0===Object.keys(e).length)return;if(!t)return{headers:e};if(!i)return{headers:e,size:t};let r={headers:e,size:t},{body:s,warnings:a}=function(e){if(!e||"string"!=typeof e)return{body:e};let t=e.length>15e4,i=function(e){let t=e[0],i=e[e.length-1];return"["===t&&"]"===i||"{"===t&&"}"===i}(e);if(t){let t=e.slice(0,15e4);return i?{body:t,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${t}…`,warnings:["TEXT_TRUNCATED"]}}if(i)try{return{body:JSON.parse(e)}}catch(e){}return{body:e}}(i);return r.body=s,a&&a.length>0&&(r._meta={warnings:a}),r}function om(e,t){return Object.keys(e).reduce((i,r)=>{let s=r.toLowerCase();return t.includes(s)&&e[r]&&(i[s]=e[r]),i},{})}function of(e){return new URLSearchParams(e).toString()}function ov(e,t){let i=function(e,t=sa.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(sa.location.origin))return e;let i=new URL(e,t);if(i.origin!==new URL(t).origin)return e;let r=i.href;return!e.endsWith("/")&&r.endsWith("/")?r.slice(0,-1):r}(e);return(0,ei.U0)(i,t)}async function oy(e,t,i){try{let r=await oC(e,t,i),s=ou("resource.fetch",r);on(i.replay,s)}catch(e){}}async function oC(e,t,i){let r=Date.now(),{startTimestamp:s=r,endTimestamp:a=r}=t,{url:o,method:n,status_code:l=0,request_body_size:h,response_body_size:d}=e.data,c=ov(o,i.networkDetailAllowUrls)&&!ov(o,i.networkDetailDenyUrls);return{startTimestamp:s,endTimestamp:a,url:o,method:n,statusCode:l,request:c?function({networkCaptureBodies:e,networkRequestHeaders:t},i,r){let s=i?1===i.length&&"string"!=typeof i[0]?oM(i[0],t):2===i.length?oM(i[1],t):{}:{};if(!e)return og(s,r,void 0);let[a,o]=od(oS(i)),n=og(s,r,a);return o?oc(n,o):n}(i,t.input,h):op(h),response:await ow(c,i,t.response,d)}}async function ow(e,{networkCaptureBodies:t,textEncoder:i,networkResponseHeaders:r},s,a){if(!e&&void 0!==a)return op(a);let o=s?ox(s.headers,r):{};if(!s||!t&&void 0!==a)return og(o,a,void 0);let[n,l]=await ob(s),h=function(e,{networkCaptureBodies:t,textEncoder:i,responseBodySize:r,captureDetails:s,headers:a}){try{let o=e&&e.length&&void 0===r?ol(e,i):r;if(!s)return op(o);if(t)return og(a,o,e);return og(a,o,void 0)}catch(e){return og(a,r,void 0)}}(n,{networkCaptureBodies:t,textEncoder:i,responseBodySize:a,captureDetails:e,headers:o});return l?oc(h,l):h}async function ob(e){let t=function(e){try{return e.clone()}catch(e){}}(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await new Promise((e,i)=>{let r=setTimeout(()=>i(Error("Timeout while trying to read response body")),500);oE(t).then(t=>e(t),e=>i(e)).finally(()=>clearTimeout(r))})]}catch(e){return[void 0,"BODY_PARSE_ERROR"]}}function oS(e=[]){if(2===e.length&&"object"==typeof e[1])return e[1].body}function ox(e,t){let i={};return t.forEach(t=>{e.get(t)&&(i[t]=e.get(t))}),i}function oM(e,t){if(!e)return{};let i=e.headers;return i?i instanceof Headers?ox(i,t):Array.isArray(i)?{}:om(i,t):{}}async function oE(e){return await e.text()}async function oD(e,t,i){try{let r=function(e,t,i){let r=Date.now(),{startTimestamp:s=r,endTimestamp:a=r,input:o,xhr:n}=t,{url:l,method:h,status_code:d=0,request_body_size:c,response_body_size:u}=e.data;if(!l)return null;if(!n||!ov(l,i.networkDetailAllowUrls)||ov(l,i.networkDetailDenyUrls)){let e=op(c);return{startTimestamp:s,endTimestamp:a,url:l,method:h,statusCode:d,request:e,response:op(u)}}let p=n[e8],g=p?om(p.request_headers,i.networkRequestHeaders):{},m=om(function(e){let t=e.getAllResponseHeaders();return t?t.split("\r\n").reduce((e,t)=>{let[i,r]=t.split(": ");return e[i.toLowerCase()]=r,e},{}):{}}(n),i.networkResponseHeaders),[f,v]=i.networkCaptureBodies?od(o):[void 0],[y,C]=i.networkCaptureBodies?function(e){let t=[];try{return[e.responseText]}catch(e){t.push(e)}try{return function(e,t){try{if("string"==typeof e)return[e];if(e instanceof Document)return[e.body.outerHTML];if("json"===t&&e&&"object"==typeof e)return[JSON.stringify(e)];if(!e)return[void 0]}catch(e){return[void 0,"BODY_PARSE_ERROR"]}return[void 0,"UNPARSEABLE_BODY_TYPE"]}(e.response,e.responseType)}catch(e){t.push(e)}return[void 0]}(n):[void 0],w=og(g,c,f),b=og(m,u,y);return{startTimestamp:s,endTimestamp:a,url:l,method:h,statusCode:d,request:v?oc(w,v):w,response:C?oc(b,C):b}}(e,t,i),s=ou("resource.xhr",r);on(i.replay,s)}catch(e){}}let oI=null,ok=e=>t=>{if(!e.isEnabled())return;let i=function(e){let t=e.getLastBreadcrumb&&e.getLastBreadcrumb();return oI!==t&&t?(oI=t,!t.category||["fetch","xhr","sentry.event","sentry.transaction"].includes(t.category)||t.category.startsWith("ui."))?null:"console"===t.category?function(e){let t=e.data&&e.data.arguments;if(!Array.isArray(t)||0===t.length)return aH(e);let i=!1,r=t.map(e=>{if(!e)return e;if("string"==typeof e)return e.length>5e3?(i=!0,`${e.slice(0,5e3)}…`):e;if("object"==typeof e)try{let t=(0,eF.Fv)(e,7);if(JSON.stringify(t).length>5e3)return i=!0,`${JSON.stringify(t,null,2).slice(0,5e3)}…`;return t}catch(e){}return e});return aH({...e,data:{...e.data,arguments:r,...i?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}(t):aH(t):null}(t);i&&aO(e,i)};async function oT(e){try{return Promise.all(oo(e,[function(e){let{jsHeapSizeLimit:t,totalJSHeapSize:i,usedJSHeapSize:r}=e,s=Date.now()/1e3;return{type:"memory",name:"memory",start:s,end:s,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:i,usedJSHeapSize:r}}}}(sa.performance.memory)]))}catch(e){return[]}}async function oA({client:e,scope:t,replayId:i,event:r}){let s={event_id:i,integrations:"object"!=typeof e._integrations||null===e._integrations||Array.isArray(e._integrations)?void 0:Object.keys(e._integrations)};e.emit&&e.emit("preprocessEvent",r,s);let a=await (0,tU.R)(e.getOptions(),r,s,t,e,(0,Y.aF)());if(!a)return null;a.platform=a.platform||"javascript";let o=e.getSdkMetadata&&e.getSdkMetadata(),{name:n,version:l}=o&&o.sdk||{};return a.sdk={...a.sdk,name:n||"sentry.javascript.unknown",version:l||"0.0.0"},a}async function oR({recordingData:e,replayId:t,segmentId:i,eventContext:r,timestamp:s,session:a}){var o;let n;let l=function({recordingData:e,headers:t}){let i;let r=`${JSON.stringify(t)}
`;if("string"==typeof e)i=`${r}${e}`;else{let t=new TextEncoder().encode(r);(i=new Uint8Array(t.length+e.length)).set(t),i.set(e,t.length)}return i}({recordingData:e,headers:{segment_id:i}}),{urls:h,errorIds:d,traceIds:c,initialTimestamp:u}=r,p=(0,_.s3)(),g=(0,_.nZ)(),m=p&&p.getTransport(),f=p&&p.getDsn();if(!p||!m||!f||!a.sampled)return;let v={type:"replay_event",replay_start_timestamp:u/1e3,timestamp:s/1e3,error_ids:d,trace_ids:c,urls:h,replay_id:t,segment_id:i,replay_type:a.sampled},y=await oA({scope:g,client:p,replayId:t,event:v});if(!y){p.recordDroppedEvent("event_processor","replay",v);return}delete y.sdkProcessingMetadata;let C=(o=p.getOptions().tunnel,tN(t_(y,tz(y),o,f),[[{type:"replay_event"},y],[{type:"replay_recording",length:"string"==typeof l?new TextEncoder().encode(l).length:l.length},l]]));try{n=await m.send(C)}catch(t){let e=Error(sn);try{e.cause=t}catch(e){}throw e}if(!n)return n;if("number"==typeof n.statusCode&&(n.statusCode<200||n.statusCode>=300))throw new oL(n.statusCode);let w=t9({},n);if(t7(w,"replay"))throw new oP(w);return n}class oL extends Error{constructor(e){super(`Transport returned status code ${e}`)}}class oP extends Error{constructor(e){super("Rate limit hit"),this.rateLimits=e}}async function oF(e,t={count:0,interval:5e3}){let{recordingData:i,options:r}=e;if(i.length)try{return await oR(e),!0}catch(i){if(i instanceof oL||i instanceof oP)throw i;if((0,_.v)("Replays",{_retryCount:t.count}),t.count>=3){let e=Error(`${sn} - max retries exceeded`);try{e.cause=i}catch(e){}throw e}return t.interval*=++t.count,new Promise((i,r)=>{setTimeout(async()=>{try{await oF(e,t),i(!0)}catch(e){r(e)}},t.interval)})}}let oN="__THROTTLED";class oO{constructor({options:e,recordingOptions:t}){oO.prototype.__init.call(this),oO.prototype.__init2.call(this),oO.prototype.__init3.call(this),oO.prototype.__init4.call(this),oO.prototype.__init5.call(this),oO.prototype.__init6.call(this),this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:3e5,sessionIdleExpire:9e5},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=t,this._options=e,this._debouncedFlush=function(e,t,i){let r,s,a;let o=i&&i.maxWait?Math.max(i.maxWait,t):0;function n(){return l(),r=e()}function l(){void 0!==s&&clearTimeout(s),void 0!==a&&clearTimeout(a),s=a=void 0}function h(){return s&&clearTimeout(s),s=setTimeout(n,t),o&&void 0===a&&(a=setTimeout(n,o)),r}return h.cancel=l,h.flush=function(){return void 0!==s||void 0!==a?n():r},h}(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=function(e,t,i){let r=new Map,s=e=>{let t=e-5;r.forEach((e,i)=>{i<t&&r.delete(i)})},a=()=>[...r.values()].reduce((e,t)=>e+t,0),o=!1;return(...t)=>{let i=Math.floor(Date.now()/1e3);if(s(i),a()>=300){let e=o;return o=!0,e?"__SKIPPED":oN}o=!1;let n=r.get(i)||0;return r.set(i,n+1),e(...t)}}((e,t)=>oi(this,e)?ot(this,e,t):Promise.resolve(null),0,0);let{slowClickTimeout:i,slowClickIgnoreSelectors:r}=this.getOptions(),s=i?{threshold:Math.min(3e3,i),timeout:i,scrollTimeout:300,ignoreSelector:r?r.join(","):""}:void 0;s&&(this.clickDetector=new a_(this,s))}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}initializeSampling(e){let{errorSampleRate:t,sessionSampleRate:i}=this._options;if(!(t<=0)||!(i<=0)){if(this._initializeSessionForSampling(e),!this.session){this._handleException(Error("Unable to initialize and create session"));return}!1!==this.session.sampled&&(this.recordingMode="buffer"===this.session.sampled&&0===this.session.segmentId?"buffer":"session",this.recordingMode,this._options._experiments.traceInternals,this._initializeRecording())}}start(){if(this._isEnabled&&"session"===this.recordingMode)throw Error("Replay recording is already in progress");if(this._isEnabled&&"buffer"===this.recordingMode)throw Error("Replay buffering is in progress, call `flush()` to save the replay");this._options._experiments.traceInternals,this._updateUserActivity();let e=a9({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire,traceInternals:this._options._experiments.traceInternals},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=e,this._initializeRecording()}startBuffering(){if(this._isEnabled)throw Error("Replay recording is already in progress");this._options._experiments.traceInternals;let e=a9({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,traceInternals:this._options._experiments.traceInternals},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=e,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{var e;let t;let i=this._canvas;this._stopRecording=aP({...this._recordingOptions,..."buffer"===this.recordingMode&&{checkoutEveryNms:6e4},emit:(e=this,t=!1,(i,r)=>{if(!e.checkAndHandleExpiredSession())return;let s=r||!t;t=!0,e.clickDetector&&function(e,t){try{if(3!==t.type)return;let{source:i}=t.data;if(i===ae.Mutation&&e.registerMutation(t.timestamp),i===ae.Scroll&&e.registerScroll(t.timestamp),t.data.source===ae.MouseInteraction){let{type:i,id:r}=t.data,s=aP.mirror.getNode(r);s instanceof HTMLElement&&i===at.Click&&e.registerClick(s)}}catch(e){}}(e.clickDetector,i),e.addUpdate(()=>{if("buffer"===e.recordingMode&&s&&e.setInitialState(),!oe(e,i,s))return!0;if(!s)return!1;if(s&&e.session&&0===e.session.segmentId&&oe(e,function(e){let t=e.getOptions();return{type:s9.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:e.isRecordingCanvas(),sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:!!e.eventBuffer&&"worker"===e.eventBuffer.type,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}(e),!1),e.session&&e.session.previousSessionId)return!0;if("buffer"===e.recordingMode&&e.session&&e.eventBuffer){let t=e.eventBuffer.getEarliestTimestamp();t&&(e.getOptions()._experiments.traceInternals,e.session.started=t,e.getOptions().stickySession&&a4(e.session))}return"session"===e.recordingMode&&e.flush(),!0})}),onMutation:this._onMutationHandler,...i?{recordCanvas:i.recordCanvas,getCanvasManager:i.getCanvasManager,sampling:i.sampling,dataURLOptions:i.dataURLOptions}:{}})}catch(e){this._handleException(e)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(e){return this._handleException(e),!1}}async stop({forceFlush:e=!1,reason:t}={}){if(this._isEnabled){this._isEnabled=!1;try{this._options._experiments.traceInternals,this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),e&&await this._flush({force:!0}),this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,function(){if(a1())try{sa.sessionStorage.removeItem(so)}catch(e){}}(),this.session=void 0}catch(e){this._handleException(e)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),this._options._experiments.traceInternals)}resume(){this._isPaused&&this._checkSession()&&(this._isPaused=!1,this.startRecording(),this._options._experiments.traceInternals)}async sendBufferedReplayOrFlush({continueRecording:e=!0}={}){if("session"===this.recordingMode)return this.flushImmediate();let t=Date.now();this._options._experiments.traceInternals,await this.flushImmediate();let i=this.stopRecording();e&&i&&"session"!==this.recordingMode&&(this.recordingMode="session",this.session&&(this._updateUserActivity(t),this._updateSessionActivity(t),this._maybeSaveSession()),this.startRecording())}addUpdate(e){let t=e();"buffer"!==this.recordingMode&&!0!==t&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),!this._stopRecording){if(!this._checkSession())return;this.resume();return}this.checkAndHandleExpiredSession(),this._updateSessionActivity()}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return"buffer"===this.recordingMode?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(){return this.session&&this.session.id}checkAndHandleExpiredSession(){if(this._lastActivity&&a5(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&"session"===this.session.sampled){this.pause();return}return!!this._checkSession()}setInitialState(){let e=`${sa.location.pathname}${sa.location.hash}${sa.location.search}`,t=`${sa.location.origin}${e}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=t,this._context.initialTimestamp=Date.now(),this._context.urls.push(t)}throttledAddEvent(e,t){let i=this._throttledAddEvent(e,t);if(i===oN){let e=aH({category:"replay.throttled"});this.addUpdate(()=>!oe(this,{type:5,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e,metric:!0}}))}return i}getCurrentRoute(){let e=this.lastTransaction||(0,_.nZ)().getTransaction(),t=(e&&(0,io.XU)(e).data||{})[ih];if(e&&t&&["route","custom"].includes(t))return(0,io.XU)(e).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=function({useCompression:e,workerUrl:t}){if(e&&window.Worker){let e=function(e){try{let t=e||("undefined"!=typeof __SENTRY_EXCLUDE_REPLAY_WORKER__&&__SENTRY_EXCLUDE_REPLAY_WORKER__?"":function(){let e=new Blob(['var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),a=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=function(t,e){for(var i=new n(31),a=0;a<31;++a)i[a]=e+=1<<t[a-1];var s=new r(i[30]);for(a=1;a<30;++a)for(var o=i[a];o<i[a+1];++o)s[o]=o-i[a]<<5|a;return{b:i,r:s}},o=s(e,2),f=o.b,h=o.r;f[28]=258,h[258]=28;for(var l=s(i,0).r,u=new n(32768),c=0;c<32768;++c){var v=(43690&c)>>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,a=0,s=new n(r);a<i;++a)t[a]&&++s[t[a]-1];var o,f=new n(r);for(a=1;a<r;++a)f[a]=f[a-1]+s[a-1]<<1;if(e){o=new n(1<<r);var h=15-r;for(a=0;a<i;++a)if(t[a])for(var l=a<<4|t[a],c=r-t[a],v=f[t[a]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>h]=l}else for(o=new n(i),a=0;a<i;++a)t[a]&&(o[a]=u[f[t[a]-1]++]>>15-t[a]);return o},g=new t(288);for(c=0;c<144;++c)g[c]=8;for(c=144;c<256;++c)g[c]=9;for(c=256;c<280;++c)g[c]=7;for(c=280;c<288;++c)g[c]=8;var w=new t(32);for(c=0;c<32;++c)w[c]=5;var p=d(g,9,0),y=d(w,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==r||r<0)&&(r=0),(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},A=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},_=function(r,e){for(var i=[],a=0;a<r.length;++a)r[a]&&i.push({s:a,f:r[a]});var s=i.length,o=i.slice();if(!s)return{t:F,l:0};if(1==s){var f=new t(i[0].s+1);return f[i[0].s]=1,{t:f,l:1}}i.sort((function(t,n){return t.f-n.f})),i.push({s:-1,f:25001});var h=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:h.f+l.f,l:h,r:l};c!=s-1;)h=i[i[u].f<i[v].f?u++:v++],l=i[u!=c&&i[u].f<i[v].f?u++:v++],i[c++]={s:-1,f:h.f+l.f,l:h,r:l};var d=o[0].s;for(a=1;a<s;++a)o[a].s>d&&(d=o[a].s);var g=new n(d+1),w=x(i[c-1],g,0);if(w>e){a=0;var p=0,y=w-e,m=1<<y;for(o.sort((function(t,n){return g[n.s]-g[t.s]||t.f-n.f}));a<s;++a){var b=o[a].s;if(!(g[b]>e))break;p+=m-(1<<w-g[b]),g[b]=e}for(p>>=y;p>0;){var M=o[a].s;g[M]<e?p-=1<<e-g[M]++-1:++a}for(;a>=0&&p;--a){var E=o[a].s;g[E]==e&&(--g[E],++p)}w=e}return{t:new t(g),l:w}},x=function(t,n,r){return-1==t.s?Math.max(x(t.l,n,r+1),x(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,a=t[0],s=1,o=function(t){e[i++]=t},f=1;f<=r;++f)if(t[f]==a&&f!=r)++s;else{if(!a&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(a),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(a);s=1,a=t[f]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e<n.length;++e)r+=t[e]*n[e];return r},k=function(t,n,r){var e=r.length,i=m(n+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var a=0;a<e;++a)t[i+a+4]=r[a];return 8*(i+4+e)},C=function(t,r,s,o,f,h,l,u,c,v,m){z(r,m++,s),++f[256];for(var b=_(f,15),M=b.t,E=b.l,x=_(h,15),C=x.t,U=x.l,F=D(M),I=F.c,S=F.n,L=D(C),O=L.c,j=L.n,q=new n(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=_(q,7),H=G.t,J=G.l,K=19;K>4&&!H[a[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(f,g)+T(h,w)+l,X=T(f,M)+T(h,C)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(C,U,0),R=C;var Y=d(H,J,0);z(r,m,S-257),z(r,m+5,j-1),z(r,m+10,K-4),m+=14;for(B=0;B<K;++B)z(r,m+3*B,H[a[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var nt=31&tt[B];z(r,m,Y[nt]),m+=H[nt],nt>15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=p,P=g,Q=y,R=w;for(B=0;B<u;++B){var rt=o[B];if(rt>255){A(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;A(r,m,Q[et]),m+=R[et],et>3&&(A(r,m,rt>>5&8191),m+=i[et])}else A(r,m,N[rt]),m+=P[rt]}return A(r,m,N[256]),m+P[256]},U=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,a=0|r.length,s=0;s!=a;){for(var o=Math.min(s+2655,a);s<o;++s)i+=e+=r[s];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},L=function(a,s,o,f,u){if(!u&&(u={l:1},s.dictionary)){var c=s.dictionary.subarray(-32768),v=new t(c.length+a.length);v.set(c),v.set(a,c.length),a=v,u.w=c.length}return function(a,s,o,f,u,c){var v=c.z||a.length,d=new t(f+v+5*(1+Math.ceil(v/7e3))+u),g=d.subarray(f,d.length-u),w=c.l,p=7&(c.r||0);if(s){p&&(g[0]=c.r>>3);for(var y=U[s-1],M=y>>13,E=8191&y,z=(1<<o)-1,A=c.p||new n(32768),_=c.h||new n(z+1),x=Math.ceil(o/3),D=2*x,T=function(t){return(a[t]^a[t+1]<<x^a[t+2]<<D)&z},F=new r(25e3),I=new n(288),S=new n(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=_[H];if(A[J]=K,_[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!w)){p=C(a,g,0,F,I,S,O,q,G,j-G,p),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(a[j+Q]==a[j+Q-W]){for(var $=0;$<Z&&a[j+$]==a[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;P<tt;++P){var rt=j-W+P&32767,et=rt-A[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=A[J])&32767}if(R){F[q++]=268435456|h[Q]<<18|l[R];var it=31&h[Q],at=31&l[R];O+=e[it]+i[at],++I[257+it],++S[at],B=j+Q,++L}else F[q++]=a[j],++I[a[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=a[j],++I[a[j]];p=C(a,g,w,F,I,S,O,q,G,j-G,p),w||(c.r=7&p|g[p/8|0]<<3,p-=7,c.h=_,c.p=A,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+w;j+=65535){var st=j+65535;st>=v&&(g[p/8|0]=w,st=v),p=k(g,p+1,a.subarray(j,st))}c.i=v}return b(d,0,f+m(p)+u)}(a,null==s.level?6:s.level,null==s.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(a.length)))):12+s.mem,o,f,u)},O=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},j=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(L(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var a=this.b.length-this.s.z;a&&(this.b.set(n.subarray(0,a),this.s.z),this.s.z=this.b.length,this.p(this.b,!1)),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(a),32768),this.s.z=n.length-a+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n}();function q(t,n){n||(n={});var r=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}}(),e=t.length;r.p(t);var i,a=L(t,n,10+((i=n).filename?i.filename.length+1:0),8),s=a.length;return function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&O(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}}(a,n),O(a,s-8,r.d()),O(a,s-4,e),a}var B=function(){function t(t,n){this.c=S(),this.v=1,j.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),j.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=L(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=S();i.p(n.dictionary),O(t,2,i.d())}}(r,this.o),this.v=0),n&&O(r,r.length-4,this.c.d()),this.ondata(r,n)},t}(),G="undefined"!=typeof TextEncoder&&new TextEncoder,H="undefined"!=typeof TextDecoder&&new TextDecoder;try{H.decode(F,{stream:!0})}catch(t){}var J=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(K(t),this.d=n||!1)},t}();function K(n,r){if(r){for(var e=new t(n.length),i=0;i<n.length;++i)e[i]=n.charCodeAt(i);return e}if(G)return G.encode(n);var a=n.length,s=new t(n.length+(n.length>>1)),o=0,f=function(t){s[o++]=t};for(i=0;i<a;++i){if(o+5>s.length){var h=new t(o+8+(a-i<<1));h.set(s),s=h}var l=n.charCodeAt(i);l<128||r?f(l):l<2048?(f(192|l>>6),f(128|63&l)):l>55295&&l<57344?(f(240|(l=65536+(1047552&l)|1023&n.charCodeAt(++i))>>18),f(128|l>>12&63),f(128|l>>6&63),f(128|63&l)):(f(224|l>>12),f(128|l>>6&63),f(128|63&l))}return b(s,0,o)}const N=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(let r=0,e=t.length;r<e;r++)n+=t[r].length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new B,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new J(((t,n)=>{this.deflate.push(t,n)})),this.stream.push("[")}},P={clear:()=>{N.clear()},addEvent:t=>N.addEvent(t),finish:()=>N.finish(),compress:t=>function(t){return q(K(t))}(t)};addEventListener("message",(function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in P&&"function"==typeof P[n])try{const t=P[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}})),postMessage({id:void 0,method:"init",success:!0,response:void 0});']);return URL.createObjectURL(e)}());if(!t)return;let i=new Worker(t);return new a0(i)}catch(e){}}(t);if(e)return e}return new aX}({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_handleException(e){}_initializeSessionForSampling(e){let t=this._options.errorSampleRate>0,i=a9({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,traceInternals:this._options._experiments.traceInternals,previousSessionId:e},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:t});this.session=i}_checkSession(){if(!this.session)return!1;let e=this.session;return!a7(e,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})||(this._refreshSession(e),!1)}async _refreshSession(e){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(e.id))}_addListeners(){try{sa.document.addEventListener("visibilitychange",this._handleVisibilityChange),sa.addEventListener("blur",this._handleWindowBlur),sa.addEventListener("focus",this._handleWindowFocus),sa.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(function(e){let t=(0,_.nZ)(),i=(0,_.s3)();t.addScopeListener(ok(e)),e3(aW(e)),th(t=>{if(!e.isEnabled())return;let i=function(e){let{from:t,to:i}=e,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:i,data:{previous:t}}}(t);null!==i&&(e.getContext().urls.push(i.name),e.triggerUserActivity(),e.addUpdate(()=>(oo(e,[i]),!1)))}),function(e){let t=(0,_.s3)();try{let i=new TextEncoder,{networkDetailAllowUrls:r,networkDetailDenyUrls:s,networkCaptureBodies:a,networkRequestHeaders:o,networkResponseHeaders:n}=e.getOptions(),l={replay:e,textEncoder:i,networkDetailAllowUrls:r,networkDetailDenyUrls:s,networkCaptureBodies:a,networkRequestHeaders:o,networkResponseHeaders:n};t&&t.on?t.on("beforeAddBreadcrumb",(e,t)=>(function(e,t,i){if(t.data)try{var r,s;"xhr"===t.category&&(r=i)&&r.xhr&&(function(e,t,i){let{xhr:r,input:s}=t;if(!r)return;let a=ol(s,i.textEncoder),o=r.getResponseHeader("content-length")?oh(r.getResponseHeader("content-length")):function(e,t,i){try{let r="json"===t&&e&&"object"==typeof e?JSON.stringify(e):e;return ol(r,i)}catch(e){return}}(r.response,r.responseType,i.textEncoder);void 0!==a&&(e.data.request_body_size=a),void 0!==o&&(e.data.response_body_size=o)}(t,i,e),oD(t,i,e)),"fetch"===t.category&&(s=i)&&s.response&&(function(e,t,i){let{input:r,response:s}=t,a=ol(r?oS(r):void 0,i.textEncoder),o=s?oh(s.headers.get("content-length")):void 0;void 0!==a&&(e.data.request_body_size=a),void 0!==o&&(e.data.response_body_size=o)}(t,i,e),oy(t,i,e))}catch(e){}})(l,e,t)):(tr(t=>{e.isEnabled()&&on(e,function(e){let{startTimestamp:t,endTimestamp:i,fetchData:r,response:s}=e;if(!i)return null;let{method:a,url:o}=r;return{type:"resource.fetch",start:t/1e3,end:i/1e3,name:o,data:{method:a,statusCode:s?s.status:void 0}}}(t))}),e7(t=>{e.isEnabled()&&on(e,function(e){let{startTimestamp:t,endTimestamp:i,xhr:r}=e,s=r[e8];if(!t||!i||!s)return null;let{method:a,url:o,status_code:n}=s;return void 0===o?null:{type:"resource.xhr",name:o,start:t/1e3,end:i/1e3,data:{method:a,statusCode:n}}}(t))}))}catch(e){}}(e);let r=function(e,t=!1){let i=t?oa(e):void 0;return Object.assign((t,r)=>e.isEnabled()?"replay_event"===t.type?(delete t.breadcrumbs,t):(!t.type||or(t)||os(t))&&e.checkAndHandleExpiredSession()?os(t)?(e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),e.triggerUserActivity(),e.addUpdate(()=>!t.timestamp||(e.throttledAddEvent({type:s9.Custom,timestamp:1e3*t.timestamp,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1)),t):!t.type&&t.exception&&t.exception.values&&t.exception.values.length&&r.originalException&&r.originalException.__rrweb__&&!e.getOptions()._experiments.captureExceptions?null:(("buffer"===e.recordingMode&&t.message!==sn&&t.exception&&!t.type&&a2(e.getOptions().errorSampleRate)||"session"===e.recordingMode)&&(t.tags={...t.tags,replayId:e.getSessionId()}),i&&i(t,{statusCode:200}),t):t:t,{id:"Replay"})}(e,!(i&&i.on));i&&i.addEventProcessor?i.addEventProcessor(r):function(e){let t=(0,_.s3)();t&&t.addEventProcessor&&t.addEventProcessor(e)}(r),i&&i.on&&(i.on("beforeSendEvent",t=>{e.isEnabled()&&!t.type&&function(e,t){let i=t.exception&&t.exception.values&&t.exception.values[0].value;"string"==typeof i&&(i.match(/reactjs\.org\/docs\/error-decoder\.html\?invariant=(418|419|422|423|425)/)||i.match(/(does not match server-rendered HTML|Hydration failed because)/i))&&aO(e,aH({category:"replay.hydrate-error"}))}(e,t)}),i.on("afterSendEvent",oa(e)),i.on("createDsc",t=>{let i=e.getSessionId();i&&e.isEnabled()&&"session"===e.recordingMode&&e.checkAndHandleExpiredSession()&&(t.replay_id=i)}),i.on("startTransaction",t=>{e.lastTransaction=t}),i.on("finishTransaction",t=>{e.lastTransaction=t}),i.on("beforeSendFeedback",(t,i)=>{let r=e.getSessionId();i&&i.includeReplay&&e.isEnabled()&&r&&t.contexts&&t.contexts.feedback&&(t.contexts.feedback.replay_id=r)}))}(this),this._hasInitializedCoreListeners=!0)}catch(e){this._handleException(e)}this._performanceCleanupCallback=function(e){function t(t){e.performanceEntries.includes(t)||e.performanceEntries.push(t)}function i({entries:e}){e.forEach(t)}let r=[];return["navigation","paint","resource"].forEach(e=>{r.push(rn(e,i))}),r.push(ro(({metric:t})=>{e.replayPerformanceEntries.push(function(e){let t=e.entries,i=t[t.length-1],r=i?i.element:void 0,s=e.value,a=aZ(s);return{type:"largest-contentful-paint",name:"largest-contentful-paint",start:a,end:a,data:{value:s,size:s,nodeId:r?aP.mirror.getId(r):void 0}}}(t))})),()=>{r.forEach(e=>e())}}(this)}_removeListeners(){try{sa.document.removeEventListener("visibilitychange",this._handleVisibilityChange),sa.removeEventListener("blur",this._handleWindowBlur),sa.removeEventListener("focus",this._handleWindowFocus),sa.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(e){this._handleException(e)}}__init(){this._handleVisibilityChange=()=>{"visible"===sa.document.visibilityState?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()}}__init2(){this._handleWindowBlur=()=>{let e=aH({category:"ui.blur"});this._doChangeToBackgroundTasks(e)}}__init3(){this._handleWindowFocus=()=>{let e=aH({category:"ui.focus"});this._doChangeToForegroundTasks(e)}}__init4(){this._handleKeyboardEvent=e=>{!function(e,t){if(!e.isEnabled())return;e.updateUserActivity();let i=function(e){var t;let{metaKey:i,shiftKey:r,ctrlKey:s,altKey:a,key:o,target:n}=e;if(!n||"INPUT"===(t=n).tagName||"TEXTAREA"===t.tagName||t.isContentEditable||!o)return null;let l=i||s||a,h=1===o.length;if(!l&&h)return null;let d=(0,eP.Rt)(n,{maxStringLength:200})||"<unknown>",c=a$(n,d);return aH({category:"ui.keyDown",message:d,data:{...c.data,metaKey:i,shiftKey:r,ctrlKey:s,altKey:a,key:o}})}(t);i&&aO(e,i)}(this,e)}}_doChangeToBackgroundTasks(e){!this.session||a8(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(e&&this._createCustomBreadcrumb(e),this.conditionalFlush())}_doChangeToForegroundTasks(e){this.session&&this.checkAndHandleExpiredSession()&&e&&this._createCustomBreadcrumb(e)}_updateUserActivity(e=Date.now()){this._lastActivity=e}_updateSessionActivity(e=Date.now()){this.session&&(this.session.lastActivity=e,this._maybeSaveSession())}_createCustomBreadcrumb(e){this.addUpdate(()=>{this.throttledAddEvent({type:s9.Custom,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e}})})}_addPerformanceEntries(){let e=this.performanceEntries.map(aK).filter(Boolean).concat(this.replayPerformanceEntries);return this.performanceEntries=[],this.replayPerformanceEntries=[],Promise.all(oo(this,e))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){let{session:e,eventBuffer:t}=this;if(!e||!t||e.segmentId)return;let i=t.getEarliestTimestamp();i&&i<this._context.initialTimestamp&&(this._context.initialTimestamp=i)}_popEventContext(){let e={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),e}async _runFlush(){let e=this.getSessionId();if(this.session&&this.eventBuffer&&e&&(await this._addPerformanceEntries(),this.eventBuffer&&this.eventBuffer.hasEvents)&&(await oT(this),this.eventBuffer&&e===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();let t=Date.now();if(t-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw Error("Session is too long, not sending replay");let i=this._popEventContext(),r=this.session.segmentId++;this._maybeSaveSession();let s=await this.eventBuffer.finish();await oF({replayId:e,recordingData:s,segmentId:r,eventContext:i,session:this.session,options:this.getOptions(),timestamp:t})}catch(t){this._handleException(t),this.stop({reason:"sendReplay"});let e=(0,_.s3)();e&&e.recordDroppedEvent("send_error","replay")}}__init5(){this._flush=async({force:e=!1}={})=>{if(!this._isEnabled&&!e||!this.checkAndHandleExpiredSession()||!this.session)return;let t=this.session.started,i=Date.now()-t;this._debouncedFlush.cancel();let r=i<this._options.minReplayDuration,s=i>this._options.maxReplayDuration+5e3;if(r||s){this._options._experiments.traceInternals,r&&this._debouncedFlush();return}let a=this.eventBuffer;if(a&&0===this.session.segmentId&&!a.hasCheckout&&this._options._experiments.traceInternals,!this._flushLock){this._flushLock=this._runFlush(),await this._flushLock,this._flushLock=void 0;return}try{await this._flushLock}catch(e){}finally{this._debouncedFlush()}}}_maybeSaveSession(){this.session&&this._options.stickySession&&a4(this.session)}__init6(){this._onMutationHandler=e=>{let t=e.length,i=this._options.mutationLimit,r=this._options.mutationBreadcrumbLimit,s=i&&t>i;if(t>r||s){let e=aH({category:"replay.mutations",data:{count:t,limit:s}});this._createCustomBreadcrumb(e)}return!s||(this.stop({reason:"mutationLimit",forceFlush:"session"===this.recordingMode}),!1)}}}function oB(e,t,i,r){let s=[...e,..."string"==typeof r?r.split(","):[],...t];return void 0!==i&&("string"==typeof i&&s.push(`.${i}`),(0,U.Cf)(()=>{console.warn("[Replay] You are using a deprecated configuration item for privacy. Read the documentation on how to use the new privacy configuration.")})),s.join(",")}let oG='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',oz=["content-length","content-type","accept"],o_=!1;class oV{static __initStatic(){this.id="Replay"}constructor({flushMinDelay:e=5e3,flushMaxDelay:t=5500,minReplayDuration:i=4999,maxReplayDuration:r=36e5,stickySession:s=!0,useCompression:a=!0,workerUrl:o,_experiments:n={},sessionSampleRate:l,errorSampleRate:h,maskAllText:d=!0,maskAllInputs:c=!0,blockAllMedia:u=!0,mutationBreadcrumbLimit:p=750,mutationLimit:g=1e4,slowClickTimeout:m=7e3,slowClickIgnoreSelectors:f=[],networkDetailAllowUrls:v=[],networkDetailDenyUrls:y=[],networkCaptureBodies:C=!0,networkRequestHeaders:w=[],networkResponseHeaders:b=[],mask:S=[],maskAttributes:x=["title","placeholder"],unmask:M=[],block:E=[],unblock:D=[],ignore:I=[],maskFn:k,beforeAddRecordingEvent:T,beforeErrorSampling:A,blockClass:R,blockSelector:L,maskInputOptions:P,maskTextClass:F,maskTextSelector:N,ignoreClass:O}={}){this.name=oV.id;let B=function({mask:e,unmask:t,block:i,unblock:r,ignore:s,blockClass:a,blockSelector:o,maskTextClass:n,maskTextSelector:l,ignoreClass:h}){let d={maskTextSelector:oB(e,[".sentry-mask","[data-sentry-mask]"],n,l),unmaskTextSelector:oB(t,[".sentry-unmask","[data-sentry-unmask]"]),blockSelector:oB(i,[".sentry-block","[data-sentry-block]",'base[href="/"]'],a,o),unblockSelector:oB(r,[".sentry-unblock","[data-sentry-unblock]"]),ignoreSelector:oB(s,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'],h)};return a instanceof RegExp&&(d.blockClass=a),n instanceof RegExp&&(d.maskTextClass=n),d}({mask:S,unmask:M,block:E,unblock:D,ignore:I,blockClass:R,blockSelector:L,maskTextClass:F,maskTextSelector:N,ignoreClass:O});if(this._recordingOptions={maskAllInputs:c,maskAllText:d,maskInputOptions:{...P||{},password:!0},maskTextFn:k,maskInputFn:k,maskAttributeFn:(e,t,i)=>(function({el:e,key:t,maskAttributes:i,maskAllText:r,privacyOptions:s,value:a}){return!r||s.unmaskTextSelector&&e.matches(s.unmaskTextSelector)?a:i.includes(t)||"value"===t&&"INPUT"===e.tagName&&["submit","button"].includes(e.getAttribute("type")||"")?a.replace(/[\S]/g,"*"):a})({maskAttributes:x,maskAllText:d,privacyOptions:B,key:e,value:t,el:i}),...B,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:e=>{try{e.__rrweb__=!0}catch(e){}}},this._initialOptions={flushMinDelay:e,flushMaxDelay:t,minReplayDuration:Math.min(i,15e3),maxReplayDuration:Math.min(r,36e5),stickySession:s,sessionSampleRate:l,errorSampleRate:h,useCompression:a,workerUrl:o,blockAllMedia:u,maskAllInputs:c,maskAllText:d,mutationBreadcrumbLimit:p,mutationLimit:g,slowClickTimeout:m,slowClickIgnoreSelectors:f,networkDetailAllowUrls:v,networkDetailDenyUrls:y,networkCaptureBodies:C,networkRequestHeaders:oj(w),networkResponseHeaders:oj(b),beforeAddRecordingEvent:T,beforeErrorSampling:A,_experiments:n},"number"==typeof l&&(console.warn(`[Replay] You are passing \`sessionSampleRate\` to the Replay integration.
This option is deprecated and will be removed soon.
Instead, configure \`replaysSessionSampleRate\` directly in the SDK init options, e.g.:
Sentry.init({ replaysSessionSampleRate: ${l} })`),this._initialOptions.sessionSampleRate=l),"number"==typeof h&&(console.warn(`[Replay] You are passing \`errorSampleRate\` to the Replay integration.
This option is deprecated and will be removed soon.
Instead, configure \`replaysOnErrorSampleRate\` directly in the SDK init options, e.g.:
Sentry.init({ replaysOnErrorSampleRate: ${h} })`),this._initialOptions.errorSampleRate=h),this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${oG}`:oG),this._isInitialized&&ss())throw Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return o_}set _isInitialized(e){o_=e}setupOnce(){ss()&&(this._setup(),setTimeout(()=>this._initialize()))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:"session"===this._replay.recordingMode}):Promise.resolve()}flush(e){return this._replay&&this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(e):Promise.resolve()}getReplayId(){if(this._replay&&this._replay.isEnabled())return this._replay.getSessionId()}_initialize(){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(),this._replay.initializeSampling())}_setup(){let e=function(e){let t=(0,_.s3)(),i=t&&t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...(0,j.Jr)(e)};return i?(null==e.sessionSampleRate&&null==e.errorSampleRate&&null==i.replaysSessionSampleRate&&null==i.replaysOnErrorSampleRate&&(0,U.Cf)(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),"number"==typeof i.replaysSessionSampleRate&&(r.sessionSampleRate=i.replaysSessionSampleRate),"number"==typeof i.replaysOnErrorSampleRate&&(r.errorSampleRate=i.replaysOnErrorSampleRate)):(0,U.Cf)(()=>{console.warn("SDK client is not available.")}),r}(this._initialOptions);this._replay=new oO({options:e,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(){try{let e=(0,_.s3)().getIntegrationByName("ReplayCanvas");if(!e)return;this._replay._canvas=e.getOptions()}catch(e){}}}function oj(e){return[...oz,...e.map(e=>e.toLowerCase())]}oV.__initStatic();var oH=window;oH.__sentryRewritesTunnelPath__="/monitoring",oH.SENTRY_RELEASE={id:"d39b9313136442604f5e354f2c23a7484aa244c4"},oH.__sentryBasePath=void 0,oH.__rewriteFramesAssetPrefixPath__="",function(e){let t={environment:function(e){let t=e?"production":ia.env.VERCEL_ENV;return t?`vercel-${t}`:void 0}(!0)||"production",defaultIntegrations:function(e){let t=[...is,r9()];return("undefined"==typeof __SENTRY_TRACING__||__SENTRY_TRACING__)&&V(e)&&t.push(r1()),t}(e),...e};(function(e){let{integrations:t}=e;t&&(Array.isArray(t)?e.integrations=st(t):e.integrations=e=>st(t(e)))})(t),function(e){let t=se.__sentryRewritesTunnelPath__;if(t&&e.dsn){let i=tP(e.dsn);if(!i)return;let r=i.host.match(/^o(\d+)\.ingest(?:\.([a-z]{2}))?\.sentry\.io$/);if(r){let s=r[1],a=r[2],o=`${t}?o=${s}&p=${i.projectId}`;a&&(o+=`&r=${a}`),e.tunnel=o,rq.X&&U.kg.info(`Tunneling events to "${o}"`)}else rq.X&&U.kg.warn("Provided DSN is not a Sentry SaaS DSN. Will not tunnel events.")}}(t),z(t,"nextjs",["nextjs","react"]),function(e){let t={...e};z(t,"react"),function(e={}){void 0===e.defaultIntegrations&&(e.defaultIntegrations=[...is]),void 0===e.release&&("string"==typeof __SENTRY_RELEASE__&&(e.release=__SENTRY_RELEASE__),ev.SENTRY_RELEASE&&ev.SENTRY_RELEASE.id&&(e.release=ev.SENTRY_RELEASE.id)),void 0===e.autoSessionTracking&&(e.autoSessionTracking=!0),void 0===e.sendClientReports&&(e.sendClientReports=!0),function(e,t){!0===t.debug&&(W.X?U.kg.enable():(0,U.Cf)(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),(0,_.nZ)().update(t.initialScope);let i=new e(t);(function(e){let t=(0,Y.Gd)().getStackTop();t.client=e,t.scope.setClient(e)})(i),i.init?i.init():i.setupIntegrations&&i.setupIntegrations()}(tX,{...e,stackParser:(0,eb.Sq)(e.stackParser||t5),integrations:function(e){let t=e.defaultIntegrations||[],i=e.integrations;t.forEach(e=>{e.isDefaultInstance=!0});let r=function(e){let t={};return e.forEach(e=>{let{name:i}=e,r=t[i];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[i]=e)}),Object.keys(t).map(e=>t[e])}(Array.isArray(i)?[...t,...i]:"function"==typeof i?(0,H.lE)(i(t)):t),s=function(e,t){for(let i=0;i<e.length;i++)if(!0===t(e[i]))return i;return -1}(r,e=>"Debug"===e.name);if(-1!==s){let[e]=r.splice(s,1);r.push(e)}return r}(e),transport:e.transport||(tt()?ii:ir)}),e.autoSessionTracking&&void 0!==ev.document&&((0,_.yj)({ignoreDuration:!0}),(0,_.cg)(),th(({from:e,to:t})=>{void 0!==e&&e!==t&&((0,_.yj)({ignoreDuration:!0}),(0,_.cg)())}))}(t)}(t);let i=(0,_.nZ)();i.setTag("runtime","browser");let r=e=>"transaction"===e.type&&"/404"===e.transaction?null:e;r.id="NextClient404Filter",i.addEventProcessor(r)}({dsn:"https://0472576597975163b476e59eb9364811@o4506572571672576.ingest.sentry.io/4506583221600256",tracesSampleRate:1,debug:!1,replaysOnErrorSampleRate:1,replaysSessionSampleRate:.1,integrations:[new oV({maskAllText:!0,blockAllMedia:!0})]})},92724:function(e,t,i){"use strict";i.d(t,{EN:function(){return h},IQ:function(){return d},bU:function(){return o}});var r=i(64842),s=i(98035),a=i(22966);let o="baggage",n="sentry-",l=/^sentry-/;function h(e){if(!(0,s.HD)(e)&&!Array.isArray(e))return;let t={};if(Array.isArray(e))t=e.reduce((e,t)=>{let i=c(t);for(let t of Object.keys(i))e[t]=i[t];return e},{});else{if(!e)return;t=c(e)}let i=Object.entries(t).reduce((e,[t,i])=>(t.match(l)&&(e[t.slice(n.length)]=i),e),{});return Object.keys(i).length>0?i:void 0}function d(e){if(e)return function(e){if(0!==Object.keys(e).length)return Object.entries(e).reduce((e,[t,i],s)=>{let o=`${encodeURIComponent(t)}=${encodeURIComponent(i)}`,n=0===s?o:`${e},${o}`;return n.length>8192?(r.X&&a.kg.warn(`Not adding key: ${t} with val: ${i} to baggage header due to exceeding baggage size limits.`),e):n},"")}(Object.entries(e).reduce((e,[t,i])=>(i&&(e[`${n}${t}`]=i),e),{}))}function c(e){return e.split(",").map(e=>e.split("=").map(e=>decodeURIComponent(e.trim()))).reduce((e,[t,i])=>(e[t]=i,e),{})}},8686:function(e,t,i){"use strict";i.d(t,{Rt:function(){return a},iY:function(){return l},l4:function(){return o},qT:function(){return n}});var r=i(98035);let s=(0,i(50304).R)();function a(e,t={}){if(!e)return"<unknown>";try{let i,a=e,o=[],n=0,l=0,h=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||80;for(;a&&n++<5&&(i=function(e,t){let i,a,o,n,l;let h=[];if(!e||!e.tagName)return"";if(s.HTMLElement&&e instanceof HTMLElement&&e.dataset&&e.dataset.sentryComponent)return e.dataset.sentryComponent;h.push(e.tagName.toLowerCase());let d=t&&t.length?t.filter(t=>e.getAttribute(t)).map(t=>[t,e.getAttribute(t)]):null;if(d&&d.length)d.forEach(e=>{h.push(`[${e[0]}="${e[1]}"]`)});else if(e.id&&h.push(`#${e.id}`),(i=e.className)&&(0,r.HD)(i))for(l=0,a=i.split(/\s+/);l<a.length;l++)h.push(`.${a[l]}`);let c=["aria-label","type","name","title","alt"];for(l=0;l<c.length;l++)o=c[l],(n=e.getAttribute(o))&&h.push(`[${o}="${n}"]`);return h.join("")}(a,h),"html"!==i&&(!(n>1)||!(l+3*o.length+i.length>=d)));)o.push(i),l+=i.length,a=a.parentNode;return o.reverse().join(" > ")}catch(e){return"<unknown>"}}function o(){try{return s.document.location.href}catch(e){return""}}function n(e){return s.document&&s.document.querySelector?s.document.querySelector(e):null}function l(e){if(!s.HTMLElement)return null;let t=e;for(let e=0;e<5&&t;e++){if(t instanceof HTMLElement&&t.dataset.sentryComponent)return t.dataset.sentryComponent;t=t.parentNode}return null}},64842:function(e,t,i){"use strict";i.d(t,{X:function(){return r}});let r=!1},39119:function(e,t,i){"use strict";function r(){return"undefined"!=typeof __SENTRY_BROWSER_BUNDLE__&&!!__SENTRY_BROWSER_BUNDLE__}function s(){return"npm"}i.d(t,{S:function(){return s},n:function(){return r}})},98035:function(e,t,i){"use strict";i.d(t,{Cy:function(){return v},HD:function(){return h},J8:function(){return f},Kj:function(){return m},Le:function(){return d},PO:function(){return u},TX:function(){return n},V9:function(){return C},VW:function(){return o},VZ:function(){return s},cO:function(){return p},fm:function(){return l},i2:function(){return y},kK:function(){return g},pt:function(){return c},y1:function(){return w}});let r=Object.prototype.toString;function s(e){switch(r.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return C(e,Error)}}function a(e,t){return r.call(e)===`[object ${t}]`}function o(e){return a(e,"ErrorEvent")}function n(e){return a(e,"DOMError")}function l(e){return a(e,"DOMException")}function h(e){return a(e,"String")}function d(e){return"object"==typeof e&&null!==e&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function c(e){return null===e||d(e)||"object"!=typeof e&&"function"!=typeof e}function u(e){return a(e,"Object")}function p(e){return"undefined"!=typeof Event&&C(e,Event)}function g(e){return"undefined"!=typeof Element&&C(e,Element)}function m(e){return a(e,"RegExp")}function f(e){return!!(e&&e.then&&"function"==typeof e.then)}function v(e){return u(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function y(e){return"number"==typeof e&&e!=e}function C(e,t){try{return e instanceof t}catch(e){return!1}}function w(e){return!!("object"==typeof e&&null!==e&&(e.__isVue||e._isVue))}},22966:function(e,t,i){"use strict";i.d(t,{Cf:function(){return n},LD:function(){return o},RU:function(){return a},kg:function(){return l}});var r=i(64842),s=i(50304);let a=["debug","info","warn","error","log","assert","trace"],o={};function n(e){if(!("console"in s.GLOBAL_OBJ))return e();let t=s.GLOBAL_OBJ.console,i={},r=Object.keys(o);r.forEach(e=>{let r=o[e];i[e]=t[e],t[e]=r});try{return e()}finally{r.forEach(e=>{t[e]=i[e]})}}let l=function(){let e=!1,t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return r.X?a.forEach(i=>{t[i]=(...t)=>{e&&n(()=>{s.GLOBAL_OBJ.console[i](`Sentry Logger [${i}]:`,...t)})}}):a.forEach(e=>{t[e]=()=>void 0}),t}()},1740:function(e,t,i){"use strict";i.d(t,{DM:function(){return a},Db:function(){return l},EG:function(){return h},YO:function(){return d},jH:function(){return n},lE:function(){return c}});var r=i(60195),s=i(50304);function a(){let e=s.GLOBAL_OBJ,t=e.crypto||e.msCrypto,i=()=>16*Math.random();try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(i=()=>{let e=new Uint8Array(1);return t.getRandomValues(e),e[0]})}catch(e){}return"10000000100040008000100000000000".replace(/[018]/g,e=>(e^(15&i())>>e/4).toString(16))}function o(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function n(e){let{message:t,event_id:i}=e;if(t)return t;let r=o(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||i||"<unknown>":i||"<unknown>"}function l(e,t,i){let r=e.exception=e.exception||{},s=r.values=r.values||[],a=s[0]=s[0]||{};a.value||(a.value=t||""),a.type||(a.type=i||"Error")}function h(e,t){let i=o(e);if(!i)return;let r=i.mechanism;if(i.mechanism={type:"generic",handled:!0,...r,...t},t&&"data"in t){let e={...r&&r.data,...t.data};i.mechanism.data=e}}function d(e){if(e&&e.__sentry_captured__)return!0;try{(0,r.xp)(e,"__sentry_captured__",!0)}catch(e){}return!1}function c(e){return Array.isArray(e)?e:[e]}},56989:function(e,t,i){"use strict";i.d(t,{KV:function(){return a}});var r=i(39119);e=i.hmd(e);var s=i(83454);function a(){return!(0,r.n)()&&"[object process]"===Object.prototype.toString.call(void 0!==s?s:0)}},25256:function(e,t,i){"use strict";i.d(t,{Fv:function(){return o},Qy:function(){return function e(t,i=3,r=102400){let s=o(t,i);return~-encodeURI(JSON.stringify(s)).split(/%..|./).length>r?e(t,i-1,r):s}}});var r=i(98035),s=i(60195),a=i(33183);function o(e,t=100,o=Infinity){try{return function e(t,o,n=Infinity,l=Infinity,h=function(){let e="function"==typeof WeakSet,t=e?new WeakSet:[];return[function(i){if(e)return!!t.has(i)||(t.add(i),!1);for(let e=0;e<t.length;e++)if(t[e]===i)return!0;return t.push(i),!1},function(i){if(e)t.delete(i);else for(let e=0;e<t.length;e++)if(t[e]===i){t.splice(e,1);break}}]}()){let[d,c]=h;if(null==o||["number","boolean","string"].includes(typeof o)&&!(0,r.i2)(o))return o;let u=function(e,t){try{if("domain"===e&&t&&"object"==typeof t&&t._events)return"[Domain]";if("domainEmitter"===e)return"[DomainEmitter]";if(void 0!==i.g&&t===i.g)return"[Global]";if("undefined"!=typeof window&&t===window)return"[Window]";if("undefined"!=typeof document&&t===document)return"[Document]";if((0,r.y1)(t))return"[VueViewModel]";if((0,r.Cy)(t))return"[SyntheticEvent]";if("number"==typeof t&&t!=t)return"[NaN]";if("function"==typeof t)return`[Function: ${(0,a.$P)(t)}]`;if("symbol"==typeof t)return`[${String(t)}]`;if("bigint"==typeof t)return`[BigInt: ${String(t)}]`;let s=function(e){let t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}(t);if(/^HTML(\w*)Element$/.test(s))return`[HTMLElement: ${s}]`;return`[object ${s}]`}catch(e){return`**non-serializable** (${e})`}}(t,o);if(!u.startsWith("[object "))return u;if(o.__sentry_skip_normalization__)return o;let p="number"==typeof o.__sentry_override_normalization_depth__?o.__sentry_override_normalization_depth__:n;if(0===p)return u.replace("object ","");if(d(o))return"[Circular ~]";if(o&&"function"==typeof o.toJSON)try{let t=o.toJSON();return e("",t,p-1,l,h)}catch(e){}let g=Array.isArray(o)?[]:{},m=0,f=(0,s.Sh)(o);for(let t in f){if(!Object.prototype.hasOwnProperty.call(f,t))continue;if(m>=l){g[t]="[MaxProperties ~]";break}let i=f[t];g[t]=e(t,i,p-1,l,h),m++}return c(o),g}("",e,t,o)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}},60195:function(e,t,i){"use strict";i.d(t,{$Q:function(){return d},HK:function(){return c},Jr:function(){return v},Sh:function(){return p},_j:function(){return u},hl:function(){return l},xp:function(){return h},zf:function(){return f}});var r=i(8686),s=i(64842),a=i(98035),o=i(22966),n=i(37652);function l(e,t,i){if(!(t in e))return;let r=e[t],s=i(r);"function"==typeof s&&d(s,r),e[t]=s}function h(e,t,i){try{Object.defineProperty(e,t,{value:i,writable:!0,configurable:!0})}catch(i){s.X&&o.kg.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function d(e,t){try{let i=t.prototype||{};e.prototype=t.prototype=i,h(e,"__sentry_original__",t)}catch(e){}}function c(e){return e.__sentry_original__}function u(e){return Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}function p(e){if((0,a.VZ)(e))return{message:e.message,name:e.name,stack:e.stack,...m(e)};if(!(0,a.cO)(e))return e;{let t={type:e.type,target:g(e.target),currentTarget:g(e.currentTarget),...m(e)};return"undefined"!=typeof CustomEvent&&(0,a.V9)(e,CustomEvent)&&(t.detail=e.detail),t}}function g(e){try{return(0,a.kK)(e)?(0,r.Rt)(e):Object.prototype.toString.call(e)}catch(e){return"<unknown>"}}function m(e){if("object"!=typeof e||null===e)return{};{let t={};for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}}function f(e,t=40){let i=Object.keys(p(e));if(i.sort(),!i.length)return"[object has no keys]";if(i[0].length>=t)return(0,n.$G)(i[0],t);for(let e=i.length;e>0;e--){let r=i.slice(0,e).join(", ");if(!(r.length>t)){if(e===i.length)return r;return(0,n.$G)(r,t)}}return""}function v(e){return function e(t,i){if(function(e){if(!(0,a.PO)(e))return!1;try{let t=Object.getPrototypeOf(e).constructor.name;return!t||"Object"===t}catch(e){return!0}}(t)){let r=i.get(t);if(void 0!==r)return r;let s={};for(let r of(i.set(t,s),Object.keys(t)))void 0!==t[r]&&(s[r]=e(t[r],i));return s}if(Array.isArray(t)){let r=i.get(t);if(void 0!==r)return r;let s=[];return i.set(t,s),t.forEach(t=>{s.push(e(t,i))}),s}return t}(e,new Map)}},33183:function(e,t,i){"use strict";i.d(t,{$P:function(){return l},Sq:function(){return o},pE:function(){return a}});let r=/\(error: (.*)\)/,s=/captureMessage|captureException/;function a(...e){let t=e.sort((e,t)=>e[0]-t[0]).map(e=>e[1]);return(e,i=0)=>{let a=[],o=e.split("\n");for(let e=i;e<o.length;e++){let i=o[e];if(i.length>1024)continue;let s=r.test(i)?i.replace(r,"$1"):i;if(!s.match(/\S*Error: /)){for(let e of t){let t=e(s);if(t){a.push(t);break}}if(a.length>=50)break}}return function(e){if(!e.length)return[];let t=Array.from(e);return/sentryWrapped/.test(t[t.length-1].function||"")&&t.pop(),t.reverse(),s.test(t[t.length-1].function||"")&&(t.pop(),s.test(t[t.length-1].function||"")&&t.pop()),t.slice(0,50).map(e=>({...e,filename:e.filename||t[t.length-1].filename,function:e.function||"?"}))}(a)}}function o(e){return Array.isArray(e)?a(...e):e}let n="<anonymous>";function l(e){try{if(!e||"function"!=typeof e)return n;return e.name||n}catch(e){return n}}},37652:function(e,t,i){"use strict";i.d(t,{$G:function(){return s},U0:function(){return o},nK:function(){return a}});var r=i(98035);function s(e,t=0){return"string"!=typeof e||0===t?e:e.length<=t?e:`${e.slice(0,t)}...`}function a(e,t){if(!Array.isArray(e))return"";let i=[];for(let t=0;t<e.length;t++){let s=e[t];try{(0,r.y1)(s)?i.push("[VueViewModel]"):i.push(String(s))}catch(e){i.push("[value cannot be serialized]")}}return i.join(t)}function o(e,t=[],i=!1){return t.some(t=>(function(e,t,i=!1){return!!(0,r.HD)(e)&&((0,r.Kj)(t)?t.test(e):!!(0,r.HD)(t)&&(i?e===t:e.includes(t)))})(e,t,i))}},71530:function(e,t,i){"use strict";i.d(t,{$2:function(){return n},WD:function(){return o},cW:function(){return l}});var r,s,a=i(98035);function o(e){return new l(t=>{t(e)})}function n(e){return new l((t,i)=>{i(e)})}(r=s||(s={}))[r.PENDING=0]="PENDING",r[r.RESOLVED=1]="RESOLVED",r[r.REJECTED=2]="REJECTED";class l{constructor(e){l.prototype.__init.call(this),l.prototype.__init2.call(this),l.prototype.__init3.call(this),l.prototype.__init4.call(this),this._state=s.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(e){this._reject(e)}}then(e,t){return new l((i,r)=>{this._handlers.push([!1,t=>{if(e)try{i(e(t))}catch(e){r(e)}else i(t)},e=>{if(t)try{i(t(e))}catch(e){r(e)}else r(e)}]),this._executeHandlers()})}catch(e){return this.then(e=>e,e)}finally(e){return new l((t,i)=>{let r,s;return this.then(t=>{s=!1,r=t,e&&e()},t=>{s=!0,r=t,e&&e()}).then(()=>{if(s){i(r);return}t(r)})})}__init(){this._resolve=e=>{this._setResult(s.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(s.REJECTED,e)}}__init3(){this._setResult=(e,t)=>{if(this._state===s.PENDING){if((0,a.J8)(t)){t.then(this._resolve,this._reject);return}this._state=e,this._value=t,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===s.PENDING)return;let e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||(this._state===s.RESOLVED&&e[1](this._value),this._state===s.REJECTED&&e[2](this._value),e[0]=!0)})}}}},15389:function(e,t,i){"use strict";i.d(t,{Z1:function(){return o},ph:function(){return a},yW:function(){return s}});var r=i(50304);function s(){return Date.now()/1e3}let a=function(){let{performance:e}=r.GLOBAL_OBJ;if(!e||!e.now)return s;let t=Date.now()-e.now(),i=void 0==e.timeOrigin?t:e.timeOrigin;return()=>(i+e.now())/1e3}(),o=(()=>{let{performance:e}=r.GLOBAL_OBJ;if(!e||!e.now)return;let t=e.now(),i=Date.now(),s=e.timeOrigin?Math.abs(e.timeOrigin+t-i):36e5,a=e.timing&&e.timing.navigationStart,o="number"==typeof a?Math.abs(a+t-i):36e5;return s<36e5||o<36e5?s<=o?e.timeOrigin:a:i})()},22714:function(e,t,i){"use strict";i.d(t,{$p:function(){return h},KA:function(){return n},pT:function(){return l}});var r=i(92724),s=i(1740);let a=RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function o(e){let t;if(!e)return;let i=e.match(a);if(i)return"1"===i[3]?t=!0:"0"===i[3]&&(t=!1),{traceId:i[1],parentSampled:t,parentSpanId:i[2]}}function n(e,t){let i=o(e),a=(0,r.EN)(t),{traceId:n,parentSpanId:l,parentSampled:h}=i||{};return i?{traceparentData:i,dynamicSamplingContext:a||{},propagationContext:{traceId:n||(0,s.DM)(),parentSpanId:l||(0,s.DM)().substring(16),spanId:(0,s.DM)().substring(16),sampled:h,dsc:a||{}}}:{traceparentData:i,dynamicSamplingContext:void 0,propagationContext:{traceId:n||(0,s.DM)(),spanId:(0,s.DM)().substring(16)}}}function l(e,t){let i=o(e),a=(0,r.EN)(t),{traceId:n,parentSpanId:l,parentSampled:h}=i||{};return i?{traceId:n||(0,s.DM)(),parentSpanId:l||(0,s.DM)().substring(16),spanId:(0,s.DM)().substring(16),sampled:h,dsc:a||{}}:{traceId:n||(0,s.DM)(),spanId:(0,s.DM)().substring(16)}}function h(e=(0,s.DM)(),t=(0,s.DM)().substring(16),i){let r="";return void 0!==i&&(r=i?"-1":"-0"),`${e}-${t}${r}`}},50304:function(e,t,i){"use strict";function r(e){return e&&e.Math==Math?e:void 0}i.d(t,{GLOBAL_OBJ:function(){return s},R:function(){return a},Y:function(){return o}});let s="object"==typeof globalThis&&r(globalThis)||"object"==typeof window&&r(window)||"object"==typeof self&&r(self)||"object"==typeof i.g&&r(i.g)||function(){return this}()||{};function a(){return s}function o(e,t,i){let r=i||s,a=r.__SENTRY__=r.__SENTRY__||{};return a[e]||(a[e]=t())}},56101:function(e,t){"use strict";var i,r,s,a;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var i in t)Object.defineProperty(e,i,{enumerable:!0,get:t[i]})}(t,{ACTION_FAST_REFRESH:function(){return c},ACTION_NAVIGATE:function(){return n},ACTION_PREFETCH:function(){return d},ACTION_REFRESH:function(){return o},ACTION_RESTORE:function(){return l},ACTION_SERVER_ACTION:function(){return u},ACTION_SERVER_PATCH:function(){return h},PrefetchCacheEntryStatus:function(){return r},PrefetchKind:function(){return i},isThenable:function(){return p}});let o="refresh",n="navigate",l="restore",h="server-patch",d="prefetch",c="fast-refresh",u="server-action";function p(e){return e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}(s=i||(i={})).AUTO="auto",s.FULL="full",s.TEMPORARY="temporary",(a=r||(r={})).fresh="fresh",a.reusable="reusable",a.expired="expired",a.stale="stale",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},27670:function(e,t,i){"use strict";function r(e,t,i,r){return!1}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDomainLocale",{enumerable:!0,get:function(){return r}}),i(51297),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},24116:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return w}});let r=i(38754),s=i(85893),a=r._(i(67294)),o=i(69975),n=i(92712),l=i(28547),h=i(84350),d=i(38109),c=i(54494),u=i(55716),p=i(388),g=i(27670),m=i(6220),f=i(56101),v=new Set;function y(e,t,i,r,s,a){if(a||(0,n.isLocalURL)(t)){if(!r.bypassPrefetchedCheck){let s=t+"%"+i+"%"+(void 0!==r.locale?r.locale:"locale"in e?e.locale:void 0);if(v.has(s))return;v.add(s)}(async()=>a?e.prefetch(t,s):e.prefetch(t,i,r))().catch(e=>{})}}function C(e){return"string"==typeof e?e:(0,l.formatUrl)(e)}let w=a.default.forwardRef(function(e,t){let i,r;let{href:l,as:v,children:w,prefetch:b=null,passHref:S,replace:x,shallow:M,scroll:E,locale:D,onClick:I,onMouseEnter:k,onTouchStart:T,legacyBehavior:A=!1,...R}=e;i=w,A&&("string"==typeof i||"number"==typeof i)&&(i=(0,s.jsx)("a",{children:i}));let L=a.default.useContext(c.RouterContext),P=a.default.useContext(u.AppRouterContext),F=null!=L?L:P,N=!L,O=!1!==b,B=null===b?f.PrefetchKind.AUTO:f.PrefetchKind.FULL,{href:G,as:z}=a.default.useMemo(()=>{if(!L){let e=C(l);return{href:e,as:v?C(v):e}}let[e,t]=(0,o.resolveHref)(L,l,!0);return{href:e,as:v?(0,o.resolveHref)(L,v):t||e}},[L,l,v]),_=a.default.useRef(G),V=a.default.useRef(z);A&&(r=a.default.Children.only(i));let j=A?r&&"object"==typeof r&&r.ref:t,[H,U,W]=(0,p.useIntersection)({rootMargin:"200px"}),$=a.default.useCallback(e=>{(V.current!==z||_.current!==G)&&(W(),V.current=z,_.current=G),H(e),j&&("function"==typeof j?j(e):"object"==typeof j&&(j.current=e))},[z,j,G,W,H]);a.default.useEffect(()=>{F&&U&&O&&y(F,G,z,{locale:D},{kind:B},N)},[z,G,U,D,O,null==L?void 0:L.locale,F,N,B]);let Y={ref:$,onClick(e){A||"function"!=typeof I||I(e),A&&r.props&&"function"==typeof r.props.onClick&&r.props.onClick(e),F&&!e.defaultPrevented&&function(e,t,i,r,s,o,l,h,d){let{nodeName:c}=e.currentTarget;if("A"===c.toUpperCase()&&(function(e){let t=e.currentTarget.getAttribute("target");return t&&"_self"!==t||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.nativeEvent&&2===e.nativeEvent.which}(e)||!d&&!(0,n.isLocalURL)(i)))return;e.preventDefault();let u=()=>{let e=null==l||l;"beforePopState"in t?t[s?"replace":"push"](i,r,{shallow:o,locale:h,scroll:e}):t[s?"replace":"push"](r||i,{scroll:e})};d?a.default.startTransition(u):u()}(e,F,G,z,x,M,E,D,N)},onMouseEnter(e){A||"function"!=typeof k||k(e),A&&r.props&&"function"==typeof r.props.onMouseEnter&&r.props.onMouseEnter(e),F&&(O||!N)&&y(F,G,z,{locale:D,priority:!0,bypassPrefetchedCheck:!0},{kind:B},N)},onTouchStart:function(e){A||"function"!=typeof T||T(e),A&&r.props&&"function"==typeof r.props.onTouchStart&&r.props.onTouchStart(e),F&&(O||!N)&&y(F,G,z,{locale:D,priority:!0,bypassPrefetchedCheck:!0},{kind:B},N)}};if((0,h.isAbsoluteUrl)(z))Y.href=z;else if(!A||S||"a"===r.type&&!("href"in r.props)){let e=void 0!==D?D:null==L?void 0:L.locale,t=(null==L?void 0:L.isLocaleDomain)&&(0,g.getDomainLocale)(z,e,null==L?void 0:L.locales,null==L?void 0:L.domainLocales);Y.href=t||(0,m.addBasePath)((0,d.addLocale)(z,e,null==L?void 0:L.defaultLocale))}return A?a.default.cloneElement(r,Y):(0,s.jsx)("a",{...R,...Y,children:i})});("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},388:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useIntersection",{enumerable:!0,get:function(){return l}});let r=i(67294),s=i(40460),a="function"==typeof IntersectionObserver,o=new Map,n=[];function l(e){let{rootRef:t,rootMargin:i,disabled:l}=e,h=l||!a,[d,c]=(0,r.useState)(!1),u=(0,r.useRef)(null),p=(0,r.useCallback)(e=>{u.current=e},[]);return(0,r.useEffect)(()=>{if(a){if(h||d)return;let e=u.current;if(e&&e.tagName)return function(e,t,i){let{id:r,observer:s,elements:a}=function(e){let t;let i={root:e.root||null,margin:e.rootMargin||""},r=n.find(e=>e.root===i.root&&e.margin===i.margin);if(r&&(t=o.get(r)))return t;let s=new Map;return t={id:i,observer:new IntersectionObserver(e=>{e.forEach(e=>{let t=s.get(e.target),i=e.isIntersecting||e.intersectionRatio>0;t&&i&&t(i)})},e),elements:s},n.push(i),o.set(i,t),t}(i);return a.set(e,t),s.observe(e),function(){if(a.delete(e),s.unobserve(e),0===a.size){s.disconnect(),o.delete(r);let e=n.findIndex(e=>e.root===r.root&&e.margin===r.margin);e>-1&&n.splice(e,1)}}}(e,e=>e&&c(e),{root:null==t?void 0:t.current,rootMargin:i})}else if(!d){let e=(0,s.requestIdleCallback)(()=>c(!0));return()=>(0,s.cancelIdleCallback)(e)}},[h,i,t,d,u.current]),[p,d,(0,r.useCallback)(()=>{c(!1)},[])]}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},42167:function(e,t){"use strict";function i(e,t){let i;if((null==t?void 0:t.host)&&!Array.isArray(t.host))i=t.host.toString().split(":",1)[0];else{if(!e.hostname)return;i=e.hostname}return i.toLowerCase()}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getHostname",{enumerable:!0,get:function(){return i}})},70410:function(e,t){"use strict";function i(e,t,i){if(e)for(let a of(i&&(i=i.toLowerCase()),e)){var r,s;if(t===(null==(r=a.domain)?void 0:r.split(":",1)[0].toLowerCase())||i===a.defaultLocale.toLowerCase()||(null==(s=a.locales)?void 0:s.some(e=>e.toLowerCase()===i)))return a}}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"detectDomainLocale",{enumerable:!0,get:function(){return i}})},94909:function(e,t,i){"use strict";let r,s;i.r(t),i.d(t,{default:function(){return zP}});var a,o,n,l,h,d,c,u,p,g,m,f,v,y,C,w,b,S,x,M,E,D,I,k,T,A,R,L,P,F,N,O,B,G,z,_,V,j,H,U,W,$,Y,K,Z,q,X,Q,J,ee,et,ei,er,es,ea,eo,en,el,eh={};i.r(eh),i.d(eh,{AG_CHARTS_LOCALE_EN_US:function(){return c9},AgCharts:function(){return D7},AgErrorBarSupportedSeriesTypes:function(){return ue},AgTooltipPositionType:function(){return ui},ICONS_LEGACY:function(){return ut},Marker:function(){return wH},VERSION:function(){return ym},_ModuleSupport:function(){return Iy},_Scale:function(){return Im},_Scene:function(){return It},_Theme:function(){return Ip},_Util:function(){return If},time:function(){return ur}});var ed=i(85893),ec=i(9008),eu=i.n(ec),ep=i(25702);function eg(){return(0,ed.jsx)("footer",{className:"h-full w-full bottom-0 footer",children:(0,ed.jsxs)("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 flex justify-between items-center",children:[(0,ed.jsxs)("div",{children:[(0,ed.jsx)(ep.Z,{}),(0,ed.jsx)("p",{className:"text-sm text-gray-800",children:"\xa9 2023 Spine AI Inc. All rights reserved."})]}),(0,ed.jsx)("div",{className:"flex  items-center",children:(0,ed.jsx)("img",{src:"/backed-by-yc-white.svg",alt:"Backed by Y Combinator",className:"inline-block w-[200px] h-[200px]"})})]})})}var em=i(41664),ef=i.n(em),ev=i(67294);function ey(){return(ey=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var r in i)({}).hasOwnProperty.call(i,r)&&(e[r]=i[r])}return e}).apply(null,arguments)}var eC=function(e){return ev.createElement("svg",ey({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none"},e),j||(j=ev.createElement("path",{fill:"currentColor",d:"M19.665 5.951a1.143 1.143 0 0 0-1.616-1.616L12 10.384l-6.049-6.05a1.143 1.143 0 1 0-1.616 1.617L10.384 12l-6.05 6.049a1.143 1.143 0 0 0 1.617 1.616L12 13.616l6.049 6.05a1.143 1.143 0 0 0 1.616-1.617L13.616 12z"})))};function ew(){return(ew=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var r in i)({}).hasOwnProperty.call(i,r)&&(e[r]=i[r])}return e}).apply(null,arguments)}var eb=function(e){return ev.createElement("svg",ew({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none"},e),H||(H=ev.createElement("path",{stroke:"#33312E",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 12h18M3 6h18M3 18h18"})))};let eS=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2?arguments[2]:void 0;return"small"===e?e=16:"medium"===e?e=20:"large"===e?e=24:"xlarge"===e&&(e=40),{display:t?"flex":"block",width:e,height:e,color:i}},ex=e=>{let{size:t="medium",icon:i,flex:r=!1,color:s}=e;return(0,ed.jsx)(i,{style:eS(t,r,s)})},eM=e=>(0,ed.jsx)(ex,{...e,icon:eC}),eE=e=>(0,ed.jsx)(ex,{...e,icon:eb});var eD=ev.forwardRef((e,t)=>{let{children:i,...r}=e,s=ev.Children.toArray(i),a=s.find(eT);if(a){let e=a.props.children,i=s.map(t=>t!==a?t:ev.Children.count(e)>1?ev.Children.only(null):ev.isValidElement(e)?e.props.children:null);return(0,ed.jsx)(eI,{...r,ref:t,children:ev.isValidElement(e)?ev.cloneElement(e,void 0,i):null})}return(0,ed.jsx)(eI,{...r,ref:t,children:i})});eD.displayName="Slot";var eI=ev.forwardRef((e,t)=>{let{children:i,...r}=e;if(ev.isValidElement(i)){let e,s;let a=(e=Object.getOwnPropertyDescriptor(i.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning?i.ref:(e=Object.getOwnPropertyDescriptor(i,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning?i.props.ref:i.props.ref||i.ref;return ev.cloneElement(i,{...function(e,t){let i={...t};for(let r in t){let s=e[r],a=t[r];/^on[A-Z]/.test(r)?s&&a?i[r]=(...e)=>{a(...e),s(...e)}:s&&(i[r]=s):"style"===r?i[r]={...s,...a}:"className"===r&&(i[r]=[s,a].filter(Boolean).join(" "))}return{...e,...i}}(r,i.props),ref:t?function(...e){return t=>e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}(t,a):a})}return ev.Children.count(i)>1?ev.Children.only(null):null});eI.displayName="SlotClone";var ek=({children:e})=>(0,ed.jsx)(ed.Fragment,{children:e});function eT(e){return ev.isValidElement(e)&&e.type===ek}let eA=e=>"boolean"==typeof e?"".concat(e):0===e?"0":e,eR=function(){for(var e,t,i=0,r="";i<arguments.length;)(e=arguments[i++])&&(t=function e(t){var i,r,s="";if("string"==typeof t||"number"==typeof t)s+=t;else if("object"==typeof t){if(Array.isArray(t))for(i=0;i<t.length;i++)t[i]&&(r=e(t[i]))&&(s&&(s+=" "),s+=r);else for(i in t)t[i]&&(s&&(s+=" "),s+=i)}return s}(e))&&(r&&(r+=" "),r+=t);return r};var eL=i(90512);let eP=e=>{let t=eB(e),{conflictingClassGroups:i,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{let i=e.split("-");return""===i[0]&&1!==i.length&&i.shift(),eF(i,t)||eO(e)},getConflictingClassGroupIds:(e,t)=>{let s=i[e]||[];return t&&r[e]?[...s,...r[e]]:s}}},eF=(e,t)=>{if(0===e.length)return t.classGroupId;let i=e[0],r=t.nextPart.get(i),s=r?eF(e.slice(1),r):void 0;if(s)return s;if(0===t.validators.length)return;let a=e.join("-");return t.validators.find(({validator:e})=>e(a))?.classGroupId},eN=/^\[(.+)\]$/,eO=e=>{if(eN.test(e)){let t=eN.exec(e)[1],i=t?.substring(0,t.indexOf(":"));if(i)return"arbitrary.."+i}},eB=e=>{let{theme:t,prefix:i}=e,r={nextPart:new Map,validators:[]};return eV(Object.entries(e.classGroups),i).forEach(([e,i])=>{eG(i,r,e,t)}),r},eG=(e,t,i,r)=>{e.forEach(e=>{if("string"==typeof e){(""===e?t:ez(t,e)).classGroupId=i;return}if("function"==typeof e){if(e_(e)){eG(e(r),t,i,r);return}t.validators.push({validator:e,classGroupId:i});return}Object.entries(e).forEach(([e,s])=>{eG(s,ez(t,e),i,r)})})},ez=(e,t)=>{let i=e;return t.split("-").forEach(e=>{i.nextPart.has(e)||i.nextPart.set(e,{nextPart:new Map,validators:[]}),i=i.nextPart.get(e)}),i},e_=e=>e.isThemeGetter,eV=(e,t)=>t?e.map(([e,i])=>[e,i.map(e=>"string"==typeof e?t+e:"object"==typeof e?Object.fromEntries(Object.entries(e).map(([e,i])=>[t+e,i])):e)]):e,ej=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,i=new Map,r=new Map,s=(s,a)=>{i.set(s,a),++t>e&&(t=0,r=i,i=new Map)};return{get(e){let t=i.get(e);return void 0!==t?t:void 0!==(t=r.get(e))?(s(e,t),t):void 0},set(e,t){i.has(e)?i.set(e,t):s(e,t)}}},eH=e=>{let{separator:t,experimentalParseClassName:i}=e,r=1===t.length,s=t[0],a=t.length,o=e=>{let i;let o=[],n=0,l=0;for(let h=0;h<e.length;h++){let d=e[h];if(0===n){if(d===s&&(r||e.slice(h,h+a)===t)){o.push(e.slice(l,h)),l=h+a;continue}if("/"===d){i=h;continue}}"["===d?n++:"]"===d&&n--}let h=0===o.length?e:e.substring(l),d=h.startsWith("!"),c=d?h.substring(1):h;return{modifiers:o,hasImportantModifier:d,baseClassName:c,maybePostfixModifierPosition:i&&i>l?i-l:void 0}};return i?e=>i({className:e,parseClassName:o}):o},eU=e=>{if(e.length<=1)return e;let t=[],i=[];return e.forEach(e=>{"["===e[0]?(t.push(...i.sort(),e),i=[]):i.push(e)}),t.push(...i.sort()),t},eW=e=>({cache:ej(e.cacheSize),parseClassName:eH(e),...eP(e)}),e$=/\s+/,eY=(e,t)=>{let{parseClassName:i,getClassGroupId:r,getConflictingClassGroupIds:s}=t,a=[],o=e.trim().split(e$),n="";for(let e=o.length-1;e>=0;e-=1){let t=o[e],{modifiers:l,hasImportantModifier:h,baseClassName:d,maybePostfixModifierPosition:c}=i(t),u=!!c,p=r(u?d.substring(0,c):d);if(!p){if(!u||!(p=r(d))){n=t+(n.length>0?" "+n:n);continue}u=!1}let g=eU(l).join(":"),m=h?g+"!":g,f=m+p;if(a.includes(f))continue;a.push(f);let v=s(p,u);for(let e=0;e<v.length;++e){let t=v[e];a.push(m+t)}n=t+(n.length>0?" "+n:n)}return n};function eK(){let e,t,i=0,r="";for(;i<arguments.length;)(e=arguments[i++])&&(t=eZ(e))&&(r&&(r+=" "),r+=t);return r}let eZ=e=>{let t;if("string"==typeof e)return e;let i="";for(let r=0;r<e.length;r++)e[r]&&(t=eZ(e[r]))&&(i&&(i+=" "),i+=t);return i},eq=e=>{let t=t=>t[e]||[];return t.isThemeGetter=!0,t},eX=/^\[(?:([a-z-]+):)?(.+)\]$/i,eQ=/^\d+\/\d+$/,eJ=new Set(["px","full","screen"]),e0=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,e1=/\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$/,e2=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,e3=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,e4=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,e6=e=>e8(e)||eJ.has(e)||eQ.test(e),e5=e=>td(e,"length",tc),e8=e=>!!e&&!Number.isNaN(Number(e)),e7=e=>td(e,"number",e8),e9=e=>!!e&&Number.isInteger(Number(e)),te=e=>e.endsWith("%")&&e8(e.slice(0,-1)),tt=e=>eX.test(e),ti=e=>e0.test(e),tr=new Set(["length","size","percentage"]),ts=e=>td(e,tr,tu),ta=e=>td(e,"position",tu),to=new Set(["image","url"]),tn=e=>td(e,to,tg),tl=e=>td(e,"",tp),th=()=>!0,td=(e,t,i)=>{let r=eX.exec(e);return!!r&&(r[1]?"string"==typeof t?r[1]===t:t.has(r[1]):i(r[2]))},tc=e=>e1.test(e)&&!e2.test(e),tu=()=>!1,tp=e=>e3.test(e),tg=e=>e4.test(e),tm=function(e,...t){let i,r,s;let a=function(n){return r=(i=eW(t.reduce((e,t)=>t(e),e()))).cache.get,s=i.cache.set,a=o,o(n)};function o(e){let t=r(e);if(t)return t;let a=eY(e,i);return s(e,a),a}return function(){return a(eK.apply(null,arguments))}}(()=>{let e=eq("colors"),t=eq("spacing"),i=eq("blur"),r=eq("brightness"),s=eq("borderColor"),a=eq("borderRadius"),o=eq("borderSpacing"),n=eq("borderWidth"),l=eq("contrast"),h=eq("grayscale"),d=eq("hueRotate"),c=eq("invert"),u=eq("gap"),p=eq("gradientColorStops"),g=eq("gradientColorStopPositions"),m=eq("inset"),f=eq("margin"),v=eq("opacity"),y=eq("padding"),C=eq("saturate"),w=eq("scale"),b=eq("sepia"),S=eq("skew"),x=eq("space"),M=eq("translate"),E=()=>["auto","contain","none"],D=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto",tt,t],k=()=>[tt,t],T=()=>["",e6,e5],A=()=>["auto",e8,tt],R=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],L=()=>["solid","dashed","dotted","double","none"],P=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],F=()=>["start","end","center","between","around","evenly","stretch"],N=()=>["","0",tt],O=()=>["auto","avoid","all","avoid-page","page","left","right","column"],B=()=>[e8,tt];return{cacheSize:500,separator:":",theme:{colors:[th],spacing:[e6,e5],blur:["none","",ti,tt],brightness:B(),borderColor:[e],borderRadius:["none","","full",ti,tt],borderSpacing:k(),borderWidth:T(),contrast:B(),grayscale:N(),hueRotate:B(),invert:N(),gap:k(),gradientColorStops:[e],gradientColorStopPositions:[te,e5],inset:I(),margin:I(),opacity:B(),padding:k(),saturate:B(),scale:B(),sepia:N(),skew:B(),space:k(),translate:k()},classGroups:{aspect:[{aspect:["auto","square","video",tt]}],container:["container"],columns:[{columns:[ti]}],"break-after":[{"break-after":O()}],"break-before":[{"break-before":O()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...R(),tt]}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",e9,tt]}],basis:[{basis:I()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",tt]}],grow:[{grow:N()}],shrink:[{shrink:N()}],order:[{order:["first","last","none",e9,tt]}],"grid-cols":[{"grid-cols":[th]}],"col-start-end":[{col:["auto",{span:["full",e9,tt]},tt]}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":[th]}],"row-start-end":[{row:["auto",{span:[e9,tt]},tt]}],"row-start":[{"row-start":A()}],"row-end":[{"row-end":A()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",tt]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",tt]}],gap:[{gap:[u]}],"gap-x":[{"gap-x":[u]}],"gap-y":[{"gap-y":[u]}],"justify-content":[{justify:["normal",...F()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...F(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...F(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[f]}],mx:[{mx:[f]}],my:[{my:[f]}],ms:[{ms:[f]}],me:[{me:[f]}],mt:[{mt:[f]}],mr:[{mr:[f]}],mb:[{mb:[f]}],ml:[{ml:[f]}],"space-x":[{"space-x":[x]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[x]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",tt,t]}],"min-w":[{"min-w":[tt,t,"min","max","fit"]}],"max-w":[{"max-w":[tt,t,"none","full","min","max","fit","prose",{screen:[ti]},ti]}],h:[{h:[tt,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[tt,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[tt,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[tt,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ti,e5]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",e7]}],"font-family":[{font:[th]}],"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-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",tt]}],"line-clamp":[{"line-clamp":["none",e8,e7]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",e6,tt]}],"list-image":[{"list-image":["none",tt]}],"list-style-type":[{list:["none","disc","decimal",tt]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...L(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",e6,e5]}],"underline-offset":[{"underline-offset":["auto",e6,tt]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",tt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",tt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...R(),ta]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",ts]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},tn]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[g]}],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[n]}],"border-w-x":[{"border-x":[n]}],"border-w-y":[{"border-y":[n]}],"border-w-s":[{"border-s":[n]}],"border-w-e":[{"border-e":[n]}],"border-w-t":[{"border-t":[n]}],"border-w-r":[{"border-r":[n]}],"border-w-b":[{"border-b":[n]}],"border-w-l":[{"border-l":[n]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...L(),"hidden"]}],"divide-x":[{"divide-x":[n]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[n]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:L()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...L()]}],"outline-offset":[{"outline-offset":[e6,tt]}],"outline-w":[{outline:[e6,e5]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:T()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[e6,e5]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ti,tl]}],"shadow-color":[{shadow:[th]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...P(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":P()}],filter:[{filter:["","none"]}],blur:[{blur:[i]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",ti,tt]}],grayscale:[{grayscale:[h]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[c]}],saturate:[{saturate:[C]}],sepia:[{sepia:[b]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[i]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[h]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[c]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[C]}],"backdrop-sepia":[{"backdrop-sepia":[b]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",tt]}],duration:[{duration:B()}],ease:[{ease:["linear","in","out","in-out",tt]}],delay:[{delay:B()}],animate:[{animate:["none","spin","ping","pulse","bounce",tt]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[w]}],"scale-x":[{"scale-x":[w]}],"scale-y":[{"scale-y":[w]}],rotate:[{rotate:[e9,tt]}],"translate-x":[{"translate-x":[M]}],"translate-y":[{"translate-y":[M]}],"skew-x":[{"skew-x":[S]}],"skew-y":[{"skew-y":[S]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",tt]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",tt]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"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",tt]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[e6,e5,e7]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}),tf=(r="inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",s={variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}},e=>{var t;if((null==s?void 0:s.variants)==null)return eR(r,null==e?void 0:e.class,null==e?void 0:e.className);let{variants:i,defaultVariants:a}=s,o=Object.keys(i).map(t=>{let r=null==e?void 0:e[t],s=null==a?void 0:a[t];if(null===r)return null;let o=eA(r)||eA(s);return i[t][o]}),n=e&&Object.entries(e).reduce((e,t)=>{let[i,r]=t;return void 0===r||(e[i]=r),e},{});return eR(r,o,null==s?void 0:null===(t=s.compoundVariants)||void 0===t?void 0:t.reduce((e,t)=>{let{class:i,className:r,...s}=t;return Object.entries(s).every(e=>{let[t,i]=e;return Array.isArray(i)?i.includes({...a,...n}[t]):({...a,...n})[t]===i})?[...e,i,r]:e},[]),null==e?void 0:e.class,null==e?void 0:e.className)});ev.forwardRef((e,t)=>{let{className:i,variant:r,size:s,asChild:a=!1,...o}=e;return(0,ed.jsx)(a?eD:"button",{className:function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return tm((0,eL.W)(t))}(tf({variant:r,size:s,className:i})),ref:t,...o})}).displayName="Button";var tv=i(84053);let ty=(0,ev.createContext)(void 0),tC=e=>{var t;let{session:i,isLoading:r,supabaseClient:s}=(0,tv.useSessionContext)(),a=(0,tv.useUser)(),o=null!==(t=null==i?void 0:i.access_token)&&void 0!==t?t:null,[n,l]=(0,ev.useState)(!1),[h,d]=(0,ev.useState)(null),c=()=>s.from("users").select("*").single();return(0,ev.useEffect)(()=>{!a||n||h?a||r||n||d(null):(l(!0),Promise.allSettled([c()]).then(e=>{let t=e[0];"fulfilled"===t.status&&d(t.value.data),l(!1)}))},[a,r]),(0,ed.jsx)(ty.Provider,{value:{accessToken:o,user:a,userDetails:h,isLoading:r||n},...e})},tw=()=>{let e=(0,ev.useContext)(ty);if(void 0===e)throw Error("useUser must be used within a MyUserContextProvider.");let{user:t,userDetails:i,isLoading:r}=e;return{user:t,userDetails:i,isLoading:r}};var tb=i(11163),tS=()=>{let{user:e}=tw(),t=(0,tb.useRouter)(),[i,r]=(0,ev.useState)(!1),s=(0,ev.useMemo)(()=>!e||t.asPath.startsWith("/copilot/")&&!t.asPath.startsWith("/copilot/new")||t.asPath.startsWith("/spines/"),[t.asPath,e]);return(0,ed.jsx)(ed.Fragment,{children:s&&(0,ed.jsx)("nav",{className:"sticky top-0 z-40 transition-all duration-150",children:(0,ed.jsx)("div",{className:"mx-auto",children:(0,ed.jsxs)("div",{className:"h-[60px] relative flex items-center px-4",children:[(0,ed.jsx)("div",{className:"flex items-center",children:(0,ed.jsx)("button",{className:"md:hidden fixed top-[18px] left-4 z-50 text-xl",onClick:()=>r(!i),children:i?(0,ed.jsx)(eM,{}):(0,ed.jsx)("span",{children:(0,ed.jsx)(eE,{})})})}),(0,ed.jsx)("div",{className:"flex flex-1 justify-end",children:!e&&(0,ed.jsx)(ed.Fragment,{children:(0,ed.jsx)(ef(),{className:tf(),href:"https://www.getspine.ai/talk-to-us",children:"Talk to us"})})})]})})})})};function tx(e){let{children:t,meta:i}=e,{user:r}=tw(),s={title:"Spine",description:"Radically simplify building AI copilots for your products",cardImage:"/spine-clickup-preview.png",...i};return(0,ed.jsxs)(ed.Fragment,{children:[(0,ed.jsxs)(eu(),{children:[(0,ed.jsx)("title",{children:s.title}),(0,ed.jsx)("meta",{name:"robots",content:"follow, index"}),(0,ed.jsx)("link",{href:"/favicon.ico",rel:"shortcut icon"}),(0,ed.jsx)("meta",{content:s.description,name:"description"}),(0,ed.jsx)("meta",{property:"og:url",content:"https://getspine.ai"}),(0,ed.jsx)("meta",{property:"og:type",content:"website"}),(0,ed.jsx)("meta",{property:"og:site_name",content:s.title}),(0,ed.jsx)("meta",{property:"og:description",content:s.description}),(0,ed.jsx)("meta",{property:"og:title",content:s.title}),(0,ed.jsx)("meta",{property:"og:image",content:s.cardImage})]}),(0,ed.jsxs)("div",{className:"flex flex-col",children:[(0,ed.jsx)("div",{className:"flex flex-grow",children:(0,ed.jsxs)("div",{className:"flex flex-col w-full flex-grow",children:[(0,ed.jsx)(tS,{}),(0,ed.jsx)("main",{id:"skip",className:"flex-1 bg-white p-5",children:t})]})}),!r&&(0,ed.jsx)(eg,{})]})]})}var tM=i(40934),tE=i(57542);function tD(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var r in i)e[r]=i[r]}return e}i(74881),i(61610),i(1409),i(96452),i(88112),i(4213),i(75158),i(94180),i(32646),i(58447);var tI=function e(t,i){function r(e,r,s){if("undefined"!=typeof document){"number"==typeof(s=tD({},i,s)).expires&&(s.expires=new Date(Date.now()+864e5*s.expires)),s.expires&&(s.expires=s.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var o in s)s[o]&&(a+="; "+o,!0!==s[o]&&(a+="="+s[o].split(";")[0]));return document.cookie=e+"="+t.write(r,e)+a}}return Object.create({set:r,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var i=document.cookie?document.cookie.split("; "):[],r={},s=0;s<i.length;s++){var a=i[s].split("="),o=a.slice(1).join("=");try{var n=decodeURIComponent(a[0]);if(r[n]=t.read(o,n),e===n)break}catch(e){}}return e?r[e]:r}},remove:function(e,t){r(e,"",tD({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,tD({},this.attributes,t))},withConverter:function(t){return e(tD({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(i)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});let tk=(0,ev.createContext)(void 0),tT=e=>{let{children:t}=e,[i,r]=(0,ev.useState)(()=>{let e={};for(let t in tI.get())e[t]={value:tI.get(t)||"",isEditing:!1};return e});return(0,ed.jsx)(tk.Provider,{value:{spineData:i,setSpineData:(e,t,i,s)=>{let a="".concat(e).concat(t);r(e=>({...e,[a]:{value:i,isEditing:s}})),tI.set(a,i)}},children:t})};var tA=i(44304),tR=class{constructor(){this.allSyncListeners=new Map,this.allAsyncListeners=new Map,this.globalSyncListeners=new Set,this.globalAsyncListeners=new Set,this.asyncFunctionsQueue=[],this.scheduled=!1,this.firedEvents={}}setFrameworkOverrides(e){this.frameworkOverrides=e}getListeners(e,t,i){let r=t?this.allAsyncListeners:this.allSyncListeners,s=r.get(e);return!s&&i&&(s=new Set,r.set(e,s)),s}noRegisteredListenersExist(){return 0===this.allSyncListeners.size&&0===this.allAsyncListeners.size&&0===this.globalSyncListeners.size&&0===this.globalAsyncListeners.size}addEventListener(e,t,i=!1){this.getListeners(e,i,!0).add(t)}removeEventListener(e,t,i=!1){let r=this.getListeners(e,i,!1);r&&(r.delete(t),0===r.size&&(i?this.allAsyncListeners:this.allSyncListeners).delete(e))}addGlobalListener(e,t=!1){(t?this.globalAsyncListeners:this.globalSyncListeners).add(e)}removeGlobalListener(e,t=!1){(t?this.globalAsyncListeners:this.globalSyncListeners).delete(e)}dispatchEvent(e){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){let i=e.type;if(t&&"event"in e){let t=e.event;t instanceof Event&&(e.eventPath=t.composedPath())}let r=this.getListeners(i,t,!1)??new Set,s=new Set(r);s.size>0&&s.forEach(i=>{if(!r.has(i))return;let s=this.frameworkOverrides?()=>this.frameworkOverrides.wrapIncoming(()=>i(e)):()=>i(e);t?this.dispatchAsync(s):s()}),new Set(t?this.globalAsyncListeners:this.globalSyncListeners).forEach(r=>{let s=this.frameworkOverrides?()=>this.frameworkOverrides.wrapIncoming(()=>r(i,e)):()=>r(i,e);t?this.dispatchAsync(s):s()})}dispatchAsync(e){if(this.asyncFunctionsQueue.push(e),!this.scheduled){let e=()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)};this.frameworkOverrides?this.frameworkOverrides.wrapIncoming(e):e(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;let e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[],e.forEach(e=>e())}},tL=((a=tL||{}).CommunityCoreModule="@ag-grid-community/core",a.InfiniteRowModelModule="@ag-grid-community/infinite-row-model",a.ClientSideRowModelModule="@ag-grid-community/client-side-row-model",a.CsvExportModule="@ag-grid-community/csv-export",a.EnterpriseCoreModule="@ag-grid-enterprise/core",a.RowGroupingModule="@ag-grid-enterprise/row-grouping",a.ColumnsToolPanelModule="@ag-grid-enterprise/column-tool-panel",a.FiltersToolPanelModule="@ag-grid-enterprise/filter-tool-panel",a.MenuModule="@ag-grid-enterprise/menu",a.SetFilterModule="@ag-grid-enterprise/set-filter",a.MultiFilterModule="@ag-grid-enterprise/multi-filter",a.StatusBarModule="@ag-grid-enterprise/status-bar",a.SideBarModule="@ag-grid-enterprise/side-bar",a.RangeSelectionModule="@ag-grid-enterprise/range-selection",a.MasterDetailModule="@ag-grid-enterprise/master-detail",a.RichSelectModule="@ag-grid-enterprise/rich-select",a.GridChartsModule="@ag-grid-enterprise/charts",a.ViewportRowModelModule="@ag-grid-enterprise/viewport-row-model",a.ServerSideRowModelModule="@ag-grid-enterprise/server-side-row-model",a.ExcelExportModule="@ag-grid-enterprise/excel-export",a.ClipboardModule="@ag-grid-enterprise/clipboard",a.SparklinesModule="@ag-grid-enterprise/sparklines",a.AdvancedFilterModule="@ag-grid-enterprise/advanced-filter",a.AngularModule="@ag-grid-community/angular",a.ReactModule="@ag-grid-community/react",a.VueModule="@ag-grid-community/vue",a),tP={};function tF(e,t){tP[t]||(e(),tP[t]=!0)}function tN(e,...t){console.log("AG Grid: "+e,...t)}function tO(e,...t){tF(()=>console.warn("AG Grid: "+e,...t),e+t?.join(""))}function tB(e,...t){tF(()=>console.error("AG Grid: "+e,...t),e+t?.join(""))}function tG(e){return!!(e&&e.constructor&&e.call&&e.apply)}var tz=[],t_=!1;function tV(e){tz.push(e),t_||(t_=!0,window.setTimeout(()=>{let e=tz.slice();tz.length=0,t_=!1,e.forEach(e=>e())},0))}function tj(e,t){let i;return function(...r){let s=this;window.clearTimeout(i),i=window.setTimeout(function(){e.apply(s,r)},t)}}function tH(e,t){let i=0;return function(...r){let s=new Date().getTime();s-i<t||(i=s,e.apply(this,r))}}function tU(e,t,i=100,r){let s=new Date().getTime(),a=null,o=!1,n=()=>{let n=new Date().getTime()-s>i;(e()||n)&&(t(),o=!0,null!=a&&(window.clearInterval(a),a=null),n&&r&&tO(r))};n(),o||(a=window.setInterval(n,10))}function tW(...e){return t=>e.reduce((e,t)=>t(e),t)}function t$(e){return null==e||""===e?null:e}function tY(e,t=!1){return null!=e&&(""!==e||t)}function tK(e){return!tY(e)}function tZ(e){return null==e||0===e.length}function tq(e){return null!=e&&"function"==typeof e.toString?e.toString():null}function tX(e){if(void 0===e)return;if(null===e||""===e)return null;if("number"==typeof e)return isNaN(e)?void 0:e;let t=parseInt(e,10);return isNaN(t)?void 0:t}function tQ(e){return void 0===e?void 0:null!==e&&""!==e&&tJ(e)}function tJ(e){return"boolean"==typeof e?e:"string"==typeof e&&("TRUE"===e.toUpperCase()||""==e)}function t0(e,t){return(e?JSON.stringify(e):null)===(t?JSON.stringify(t):null)}function t1(e,t,i=!1){var r,s,a,o;let n=null==e,l=null==t;if(e&&e.toNumber&&(e=e.toNumber()),t&&t.toNumber&&(t=t.toNumber()),n&&l)return 0;if(n)return -1;if(l)return 1;if("string"!=typeof e||!i)return(r=e)>(s=t)?1:r<s?-1:0;try{return e.localeCompare(t)}catch(i){return(a=e)>(o=t)?1:a<o?-1:0}}function t2(e){if(e instanceof Set||e instanceof Map){let t=[];return e.forEach(e=>t.push(e)),t}return Object.values(e)}function t3(e,t){return e.get("rowModelType")===t}function t4(e){return t3(e,"clientSide")}function t6(e){return t3(e,"serverSide")}function t5(e,t){return e.get("domLayout")===t}function t8(e){return void 0!==iR(e)}function t7(e){return!e.get("suppressAsyncEvents")}function t9(e){return"function"==typeof e.get("getRowHeight")}function ie(e,t,i=!1,r){if(null==r&&(r=e.environment.getDefaultRowHeight()),t9(e)){if(i)return{height:r,estimated:!0};let s={node:t,data:t.data},a=e.getCallback("getRowHeight")(s);if(ii(a))return 0===a&&tO("The return of `getRowHeight` cannot be zero. If the intention is to hide rows, use a filter instead."),{height:Math.max(1,a),estimated:!1}}if(t.detail&&e.get("masterDetail"))return function(e){if(e.get("detailRowAutoHeight"))return{height:1,estimated:!1};let t=e.get("detailRowHeight");return ii(t)?{height:t,estimated:!1}:{height:300,estimated:!1}}(e);let s=e.get("rowHeight");return{height:s&&ii(s)?s:r,estimated:!1}}function it(e){let{environment:t}=e,i=e.get("rowHeight");if(!i||tK(i))return t.getDefaultRowHeight();let r=t.refreshRowHeightVariable();return -1!==r?r:(tO("row height must be a number if not using standard row model"),t.getDefaultRowHeight())}function ii(e){return!isNaN(e)&&"number"==typeof e&&isFinite(e)}function ir(e,t,i){let r=t[e.getDomDataKey()];return r?r[i]:void 0}function is(e,t,i,r){let s=e.getDomDataKey(),a=t[s];tK(a)&&(a={},t[s]=a),a[i]=r}function ia(e){let t=null,i=e.get("getDocument");return(i&&tY(i)?t=i():e.eGridDiv&&(t=e.eGridDiv.ownerDocument),t&&tY(t))?t:document}function io(e){return ia(e).defaultView||window}function il(e){return e.eGridDiv.getRootNode()}function ih(e){return il(e).activeElement}function id(e){let t=ia(e),i=ih(e);return null===i||i===t.body}function ic(e){return!e.get("ensureDomOrder")&&e.get("animateRows")}function iu(e){return!(e.get("paginateChildRows")||e.get("groupHideOpenParents")||t5(e,"print"))}function ip(e){let t=e.get("autoGroupColumnDef");return!t?.comparator&&!e.get("treeData")}function ig(e){let t=e.get("groupAggFiltering");return"function"==typeof t?e.getCallback("groupAggFiltering"):!0===t?()=>!0:void 0}function im(e){return e.get("grandTotalRow")||(e.get("groupIncludeTotalFooter")?"bottom":void 0)}function iv(e){let t=e.get("groupTotalRow");if("function"==typeof t)return e.getCallback("groupTotalRow");if(t)return()=>t;let i=e.get("groupIncludeFooter");if("function"==typeof i){let t=e.getCallback("groupIncludeFooter");return e=>t(e)?"bottom":void 0}return()=>i?"bottom":void 0}function iy(e){return e.exists("groupDisplayType")?"multipleColumns"===e.get("groupDisplayType"):e.get("groupHideOpenParents")}function iC(e,t){return!t&&"groupRows"===e.get("groupDisplayType")}function iw(e){let t=e.getCallback("getRowId");return void 0===t?t:e=>{let i=t(e);return"string"!=typeof i&&(tO("The getRowId callback must return a string. The ID ",i," is being cast to a string."),i=String(i)),i}}function ib(e){return(e?.mode!=="cell"&&e?.checkboxes)??!0}function iS(e){return e?.mode==="multiRow"&&(e.headerCheckbox??!0)}function ix(e){return void 0!==e.get("selection")}function iM(e){let t=e.get("selection");return void 0!==t?"cell"===t.mode&&(t.suppressMultiRanges??!1):e.get("suppressMultiRangeSelection")}function iE(e){let t=e.get("selection");return void 0!==t?"cell"===t.mode:e.get("enableRangeSelection")}function iD(e){let t=e.get("selection");return void 0!==t?"cell"===t.mode&&t.handle?.mode==="fill":e.get("enableFillHandle")}function iI(e){let t=e.get("selection");return void 0!==t?"cell"===t.mode&&t.handle?.mode==="fill"?t.handle:void 0:{mode:"fill",setFillValue:e.get("fillOperation"),direction:e.get("fillHandleDirection"),suppressClearOnFillReduction:e.get("suppressClearOnFillReduction")}}function ik(e){let t=e.get("selection");if(!(void 0!==t)){let t=e.get("suppressRowClickSelection"),i=e.get("suppressRowDeselection");return(!t||!i)&&(t?"enableDeselection":!i||"enableSelection")}return t?.mode!=="cell"&&(t?.enableClickSelection??!1)}function iT(e){let t=ik(e);return!0===t||"enableDeselection"===t}function iA(e){let t=e.get("selection");return void 0!==t?"cell"!==t.mode?t.isRowSelectable:void 0:e.get("isRowSelectable")}function iR(e){let t=e.get("selection");if(!(void 0!==t))switch(e.get("rowSelection")){case"multiple":return"multiRow";case"single":return"singleRow";default:return}return"cell"!==t.mode?t.mode:void 0}function iL(e){return"multiRow"===iR(e)}function iP(e){let t=e.get("selection");if(!(void 0!==t)){let t=e.get("groupSelectsChildren"),i=e.get("groupSelectsFiltered");return t&&i?"filteredDescendants":t?"descendants":"self"}return"multiRow"===t.mode?t.groupSelects:void 0}function iF(e){let t=iP(e);return"descendants"===t||"filteredDescendants"===t}function iN(e){return e.isModuleRegistered("@ag-grid-enterprise/set-filter")&&!e.get("suppressSetFilterByDefault")}function iO(e){return null!=e&&e.length>0}function iB(e){if(e&&e.length)return e[e.length-1]}function iG(e,t,i){return null==e&&null==t||null!=e&&null!=t&&e.length===t.length&&e.every((e,r)=>i?i(e,t[r]):t[r]===e)}function iz(e,t){let i=e.indexOf(t);i>=0&&(e[i]=e[e.length-1],e.pop())}function i_(e,t){let i=e.indexOf(t);i>=0&&e.splice(i,1)}function iV(e,t,i){e.splice(i,0,t)}function ij(e,t,i){if(null!=e&&null!=t)for(let r=t.length-1;r>=0;r--)iV(e,t[r],i)}function iH(e,t,i){!function(e,t){for(let i=0;i<t.length;i++)i_(e,t[i])}(e,t),t.slice().reverse().forEach(t=>iV(e,t,i))}function iU(e,t){return e.indexOf(t)>-1}function iW(e){return e?.flatMap(e=>e)??[]}function i$(e,t){null!=t&&null!=e&&t.forEach(t=>e.push(t))}function iY(e,t){if(null!=e)for(let i=e.length-1;i>=0;i--)t(e[i],i)}var iK="__ag_Grid_Stop_Propagation",iZ=["touchstart","touchend","touchmove","touchcancel","scroll"],iq={};function iX(e){e[iK]=!0}function iQ(e){return!0===e[iK]}var iJ=(()=>{let e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return t=>{if("boolean"==typeof iq[t])return iq[t];let i=document.createElement(e[t]||"div");return iq[t="on"+t]=t in i}})();function i0(e,t,i){let r=t;for(;r;){let t=ir(e,r,i);if(t)return t;r=r.parentElement}return null}function i1(e,t){return!!t&&!!e&&(t.path?t.path:t.composedPath?t.composedPath():function(e){let t=[],i=e.target;for(;i;)t.push(i),i=i.parentElement;return t}(t)).indexOf(e)>=0}var i2=class{constructor(){this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.propertyListenerId=0,this.lastChangeSetIdLookup={},this.isAlive=()=>!this.destroyed}preWireBeans(e){this.frameworkOverrides=e.frameworkOverrides,this.stubContext=e.context,this.eventService=e.eventService,this.gos=e.gos,this.localeService=e.localeService}getFrameworkOverrides(){return this.frameworkOverrides}destroy(){for(let e=0;e<this.destroyFunctions.length;e++)this.destroyFunctions[e]();this.destroyFunctions.length=0,this.destroyed=!0,this.dispatchLocalEvent({type:"destroyed"})}addEventListener(e,t,i){this.localEventService||(this.localEventService=new tR),this.localEventService.addEventListener(e,t,i)}removeEventListener(e,t,i){this.localEventService&&this.localEventService.removeEventListener(e,t,i)}dispatchLocalEvent(e){this.localEventService&&this.localEventService.dispatchEvent(e)}addManagedElementListeners(e,t){return this._setupListeners(e,t)}addManagedEventListeners(e){return this._setupListeners(this.eventService,e)}addManagedListeners(e,t){return this._setupListeners(e,t)}_setupListeners(e,t){let i=[];for(let r in t){let s=t[r];s&&i.push(this._setupListener(e,r,s))}return i}_setupListener(e,t,i){if(this.destroyed)return()=>null;e instanceof HTMLElement?function(e,t,i,r){let s=iU(iZ,i);e&&e.addEventListener&&e.addEventListener(t,i,r,s?{passive:!0}:void 0)}(this.getFrameworkOverrides(),e,t,i):e.addEventListener(t,i);let r=()=>(e.removeEventListener(t,i),null);return this.destroyFunctions.push(r),()=>(r(),this.destroyFunctions=this.destroyFunctions.filter(e=>e!==r),null)}setupGridOptionListener(e,t){this.gos.addPropertyEventListener(e,t);let i=()=>(this.gos.removePropertyEventListener(e,t),null);return this.destroyFunctions.push(i),()=>(i(),this.destroyFunctions=this.destroyFunctions.filter(e=>e!==i),null)}addManagedPropertyListener(e,t){return this.destroyed?()=>null:this.setupGridOptionListener(e,t)}addManagedPropertyListeners(e,t){if(this.destroyed)return;let i=e.join("-")+this.propertyListenerId++,r=e=>{if(e.changeSet){if(e.changeSet&&e.changeSet.id===this.lastChangeSetIdLookup[i])return;this.lastChangeSetIdLookup[i]=e.changeSet.id}t({type:"gridPropertyChanged",changeSet:e.changeSet,source:e.source})};e.forEach(e=>this.setupGridOptionListener(e,r))}addDestroyFunc(e){this.isAlive()?this.destroyFunctions.push(e):e()}createManagedBean(e,t){let i=this.createBean(e,t);return this.addDestroyFunc(this.destroyBean.bind(this,e,t)),i}createBean(e,t,i){return(t||this.stubContext).createBean(e,i)}destroyBean(e,t){return(t||this.stubContext).destroyBean(e)}destroyBeans(e,t){return(t||this.stubContext).destroyBeans(e)}};function i3(e){return e instanceof i4}var i4=class extends i2{constructor(e,t,i,r){super(),this.isColumn=!1,this.expandable=!1,this.instanceId=rg++,this.expandableListenerRemoveCallback=null,this.colGroupDef=e,this.groupId=t,this.expanded=!!e&&!!e.openByDefault,this.padding=i,this.level=r}destroy(){this.expandableListenerRemoveCallback&&this.reset(null,void 0),super.destroy()}reset(e,t){this.colGroupDef=e,this.level=t,this.originalParent=null,this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback(),this.children=void 0,this.expandable=void 0}getInstanceId(){return this.instanceId}setOriginalParent(e){this.originalParent=e}getOriginalParent(){return this.originalParent}getLevel(){return this.level}isVisible(){return!!this.children&&this.children.some(e=>e.isVisible())}isPadding(){return this.padding}setExpanded(e){this.expanded=void 0!==e&&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(){let e=[];return this.addLeafColumns(e),e}addLeafColumns(e){this.children&&this.children.forEach(t=>{rm(t)?e.push(t):i3(t)&&t.addLeafColumns(e)})}getColumnGroupShow(){let e=this.colGroupDef;if(e)return e.columnGroupShow}setupExpandable(){this.setExpandable(),this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback();let e=this.onColumnVisibilityChanged.bind(this);this.getLeafColumns().forEach(t=>t.addEventListener("visibleChanged",e)),this.expandableListenerRemoveCallback=()=>{this.getLeafColumns().forEach(t=>t.removeEventListener("visibleChanged",e)),this.expandableListenerRemoveCallback=null}}setExpandable(){if(this.isPadding())return;let e=!1,t=!1,i=!1,r=this.findChildrenRemovingPadding();for(let s=0,a=r.length;s<a;s++){let a=r[s];if(!a.isVisible())continue;let o=a.getColumnGroupShow();"open"===o?(e=!0,i=!0):"closed"===o?(t=!0,i=!0):(e=!0,t=!0)}let s=e&&t&&i;this.expandable!==s&&(this.expandable=s,this.dispatchLocalEvent({type:"expandableChanged"}))}findChildrenRemovingPadding(){let e=[],t=i=>{i.forEach(i=>{i3(i)&&i.isPadding()?t(i.children):e.push(i)})};return t(this.children),e}onColumnVisibilityChanged(){this.setExpandable()}},i6="ag-Grid-ControlsColumn",i5=class extends i2{constructor(){super(...arguments),this.beanName="controlsColService"}createControlsCols(){let e=this.gos.get("selection");if(!e||"cell"===e.mode)return[];let t=ib(e),i=iS(e);if(t||i){let e=this.gos.get("selectionColumnDef"),t={maxWidth:50,resizable:!1,suppressHeaderMenuButton:!0,sortable:!1,suppressMovable:!0,lockPosition:this.gos.get("enableRtl")?"right":"left",comparator(e,t,i,r){let s=i.isSelected(),a=r.isSelected();return s&&a?0:s?1:-1},editable:!1,suppressFillHandle:!0,...e,colId:`${i6}`},i=new rf(t,null,t.colId,!1);return this.createBean(i),[i]}return[]}},i8="ag-Grid-AutoColumn";function i7(e){let t=[],i=e=>{for(let r=0;r<e.length;r++){let s=e[r];rm(s)?t.push(s):i3(s)&&i(s.getChildren())}};return i(e),t}function i9(e){return e.reduce((e,t)=>e+t.getActualWidth(),0)}function re(e,t,i){let r={};if(!t)return;rw(null,t,e=>{r[e.getInstanceId()]=e}),i&&rw(null,i,e=>{r[e.getInstanceId()]=null});let s=Object.values(r).filter(e=>null!=e);e.destroyBeans(s)}function rt(e){return e.getId().startsWith(i8)}function ri(e){return e.getColId().startsWith(i6)}function rr(e){let t=[];return e instanceof Array?e.some(e=>"string"!=typeof e)?tO("if colDef.type is supplied an array it should be of type 'string[]'"):t=e:"string"==typeof e?t=e.split(","):tO("colDef.type should be of type 'string' | 'string[]'"),t}var rs=class{constructor(e){this.frameworkOverrides=e,this.wrappedListeners=new Map,this.wrappedGlobalListeners=new Map}wrap(e){let t=e;return this.frameworkOverrides.shouldWrapOutgoing&&(t=t=>{this.frameworkOverrides.wrapOutgoing(()=>e(t))},this.wrappedListeners.set(e,t)),t}wrapGlobal(e){let t=e;return this.frameworkOverrides.shouldWrapOutgoing&&(t=(t,i)=>{this.frameworkOverrides.wrapOutgoing(()=>e(t,i))},this.wrappedGlobalListeners.set(e,t)),t}unwrap(e){return this.wrappedListeners.get(e)??e}unwrapGlobal(e){return this.wrappedGlobalListeners.get(e)??e}},ra=new Set(["__proto__","constructor","prototype"]);function ro(e,t){if(null!=e){if(Array.isArray(e)){for(let i=0;i<e.length;i++)t(i.toString(),e[i]);return}for(let[i,r]of Object.entries(e))t(i,r)}}function rn(e){let t={},i=Object.keys(e);for(let r=0;r<i.length;r++){if(ra.has(i[r]))continue;let s=i[r],a=e[s];t[s]=a}return t}function rl(e,t){if(!e)return;let i={};return Object.keys(e).forEach(r=>{if(t&&t.indexOf(r)>=0||ra.has(r))return;let s=e[r];ru(s)&&s.constructor===Object?i[r]=rl(s):i[r]=s}),i}function rh(e){if(!e)return[];let t=Object;if("function"==typeof t.values)return t.values(e);let i=[];for(let t in e)e.hasOwnProperty(t)&&e.propertyIsEnumerable(t)&&i.push(e[t]);return i}function rd(e,t,i=!0,r=!1){tY(t)&&ro(t,(t,s)=>{if(ra.has(t))return;let a=e[t];a!==s&&(r&&null==a&&null!=s&&"object"==typeof s&&s.constructor===Object&&(a={},e[t]=a),ru(s)&&ru(a)&&!Array.isArray(a)?rd(a,s,i,r):(i||void 0!==s)&&(e[t]=s))})}function rc(e,t,i){if(!t||!e)return;if(!i)return e[t];let r=t.split("."),s=e;for(let e=0;e<r.length;e++){if(null==s)return;s=s[r[e]]}return s}function ru(e){return"object"==typeof e&&null!==e}var rp={resizable:!0,sortable:!0},rg=0;function rm(e){return e instanceof rf}var rf=class extends i2{constructor(e,t,i,r){super(),this.isColumn=!0,this.instanceId=rg++,this.autoHeaderHeight=null,this.moving=!1,this.menuVisible=!1,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.columnEventService=new tR,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.colDef=e,this.userProvidedColDef=t,this.colId=i,this.primary=r,this.setState(e)}wireBeans(e){this.columnHoverService=e.columnHoverService}getInstanceId(){return this.instanceId}setState(e){void 0!==e.sort?("asc"===e.sort||"desc"===e.sort)&&(this.sort=e.sort):("asc"===e.initialSort||"desc"===e.initialSort)&&(this.sort=e.initialSort);let t=e.sortIndex,i=e.initialSortIndex;void 0!==t?null!==t&&(this.sortIndex=t):null!==i&&(this.sortIndex=i);let r=e.hide,s=e.initialHide;void 0!==r?this.visible=!r:this.visible=!s,void 0!==e.pinned?this.setPinned(e.pinned):this.setPinned(e.initialPinned);let a=e.flex,o=e.initialFlex;void 0!==a?this.flex=a:void 0!==o&&(this.flex=o)}setColDef(e,t,i){this.colDef=e,this.userProvidedColDef=t,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),this.columnEventService.dispatchEvent(this.createColumnEvent("colDefChanged",i))}getUserProvidedColDef(){return this.userProvidedColDef}setParent(e){this.parent=e}getParent(){return this.parent}setOriginalParent(e){this.originalParent=e}getOriginalParent(){return this.originalParent}postConstruct(){this.initMinAndMaxWidths(),this.resetActualWidth("gridInitializing"),this.initDotNotation(),this.initTooltip()}initDotNotation(){let e=this.gos.get("suppressFieldDotNotation");this.fieldContainsDots=tY(this.colDef.field)&&this.colDef.field.indexOf(".")>=0&&!e,this.tooltipFieldContainsDots=tY(this.colDef.tooltipField)&&this.colDef.tooltipField.indexOf(".")>=0&&!e}initMinAndMaxWidths(){let e=this.colDef;this.minWidth=e.minWidth??this.gos.environment.getDefaultColumnMinWidth(),this.maxWidth=e.maxWidth??Number.MAX_SAFE_INTEGER}initTooltip(){this.tooltipEnabled=tY(this.colDef.tooltipField)||tY(this.colDef.tooltipValueGetter)||tY(this.colDef.tooltipComponent)}resetActualWidth(e){let t=this.calculateColInitialWidth(this.colDef);this.setActualWidth(t,e,!0)}calculateColInitialWidth(e){let t=tX(e.width),i=tX(e.initialWidth);return Math.max(Math.min(null!=t?t:null!=i?i:200,this.maxWidth),this.minWidth)}isEmptyGroup(){return!1}isRowGroupDisplayed(e){if(tK(this.colDef)||tK(this.colDef.showRowGroup))return!1;let t=!0===this.colDef.showRowGroup,i=this.colDef.showRowGroup===e;return t||i}isPrimary(){return this.primary}isFilterAllowed(){return!!this.colDef.filter}isFieldContainsDots(){return this.fieldContainsDots}isTooltipEnabled(){return this.tooltipEnabled}isTooltipFieldContainsDots(){return this.tooltipFieldContainsDots}getHighlighted(){return this.highlighted}addEventListener(e,t){this.frameworkOverrides.shouldWrapOutgoing&&!this.frameworkEventListenerService&&(this.columnEventService.setFrameworkOverrides(this.frameworkOverrides),this.frameworkEventListenerService=new rs(this.frameworkOverrides));let i=this.frameworkEventListenerService?.wrap(t)??t;this.columnEventService.addEventListener(e,i)}removeEventListener(e,t){let i=this.frameworkEventListenerService?.unwrap(t)??t;this.columnEventService.removeEventListener(e,i)}createColumnFunctionCallbackParams(e){return this.gos.addGridCommonParams({node:e,data:e.data,column:this,colDef:this.colDef})}isSuppressNavigable(e){if("boolean"==typeof this.colDef.suppressNavigable)return this.colDef.suppressNavigable;if("function"==typeof this.colDef.suppressNavigable){let t=this.createColumnFunctionCallbackParams(e);return(0,this.colDef.suppressNavigable)(t)}return!1}isCellEditable(e){if(e.group){if(this.gos.get("treeData")){if(!e.data&&!this.gos.get("enableGroupEdit"))return!1}else if(!this.gos.get("enableGroupEdit"))return!1}return this.isColumnFunc(e,this.colDef.editable)}isSuppressFillHandle(){return!!this.colDef.suppressFillHandle}isAutoHeight(){return!!this.colDef.autoHeight}isAutoHeaderHeight(){return!!this.colDef.autoHeaderHeight}isRowDrag(e){return this.isColumnFunc(e,this.colDef.rowDrag)}isDndSource(e){return this.isColumnFunc(e,this.colDef.dndSource)}isCellCheckboxSelection(e){let t=this.gos.get("selection");if(!t)return this.isColumnFunc(e,this.colDef.checkboxSelection);{let i=ri(this)&&ib(t);return this.isColumnFunc(e,i)}}isSuppressPaste(e){return this.isColumnFunc(e,this.colDef?this.colDef.suppressPaste:null)}isResizable(){return!!this.getColDefValue("resizable")}getColDefValue(e){return this.colDef[e]??rp[e]}isColumnFunc(e,t){return"boolean"==typeof t?t:"function"==typeof t&&t(this.createColumnFunctionCallbackParams(e))}setHighlighted(e){this.highlighted!==e&&(this.highlighted=e,this.columnEventService.dispatchEvent(this.createColumnEvent("headerHighlightChanged","uiColumnMoved")))}setMoving(e,t){this.moving=e,this.columnEventService.dispatchEvent(this.createColumnEvent("movingChanged",t))}createColumnEvent(e,t){return this.gos.addGridCommonParams({type:e,column:this,columns:[this],source:t})}isMoving(){return this.moving}getSort(){return this.sort}setSort(e,t){this.sort!==e&&(this.sort=e,this.columnEventService.dispatchEvent(this.createColumnEvent("sortChanged",t))),this.dispatchStateUpdatedEvent("sort")}isSortable(){return!!this.getColDefValue("sortable")}isSortAscending(){return"asc"===this.sort}isSortDescending(){return"desc"===this.sort}isSortNone(){return tK(this.sort)}isSorting(){return tY(this.sort)}getSortIndex(){return this.sortIndex}setSortIndex(e){this.sortIndex=e,this.dispatchStateUpdatedEvent("sortIndex")}setMenuVisible(e,t){this.menuVisible!==e&&(this.menuVisible=e,this.columnEventService.dispatchEvent(this.createColumnEvent("menuVisibleChanged",t)))}isMenuVisible(){return this.menuVisible}setAggFunc(e){this.aggFunc=e,this.dispatchStateUpdatedEvent("aggFunc")}getAggFunc(){return this.aggFunc}getLeft(){return this.left}getOldLeft(){return this.oldLeft}getRight(){return this.left+this.actualWidth}setLeft(e,t){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.columnEventService.dispatchEvent(this.createColumnEvent("leftChanged",t)))}isFilterActive(){return this.filterActive}setFilterActive(e,t,i){this.filterActive!==e&&(this.filterActive=e,this.columnEventService.dispatchEvent(this.createColumnEvent("filterActiveChanged",t)));let r=this.createColumnEvent("filterChanged",t);i&&rd(r,i),this.columnEventService.dispatchEvent(r)}isHovered(){return this.columnHoverService.isHovered(this)}setPinned(e){!0===e||"left"===e?this.pinned="left":"right"===e?this.pinned="right":this.pinned=null,this.dispatchStateUpdatedEvent("pinned")}setFirstRightPinned(e,t){this.firstRightPinned!==e&&(this.firstRightPinned=e,this.columnEventService.dispatchEvent(this.createColumnEvent("firstRightPinnedChanged",t)))}setLastLeftPinned(e,t){this.lastLeftPinned!==e&&(this.lastLeftPinned=e,this.columnEventService.dispatchEvent(this.createColumnEvent("lastLeftPinnedChanged",t)))}isFirstRightPinned(){return this.firstRightPinned}isLastLeftPinned(){return this.lastLeftPinned}isPinned(){return"left"===this.pinned||"right"===this.pinned}isPinnedLeft(){return"left"===this.pinned}isPinnedRight(){return"right"===this.pinned}getPinned(){return this.pinned}setVisible(e,t){let i=!0===e;this.visible!==i&&(this.visible=i,this.columnEventService.dispatchEvent(this.createColumnEvent("visibleChanged",t))),this.dispatchStateUpdatedEvent("hide")}isVisible(){return this.visible}isSpanHeaderHeight(){let e=this.getColDef();return!e.suppressSpanHeaderHeight&&!e.autoHeaderHeight}getColumnGroupPaddingInfo(){let e=this.getParent();if(!e||!e.isPadding())return{numberOfParents:0,isSpanningTotal:!1};let t=e.getPaddingLevel()+1,i=!0;for(;e;){if(!e.isPadding()){i=!1;break}e=e.getParent()}return{numberOfParents:t,isSpanningTotal:i}}getColDef(){return this.colDef}getDefinition(){return this.colDef}getColumnGroupShow(){return this.colDef.columnGroupShow}getColId(){return this.colId}getId(){return this.colId}getUniqueId(){return this.colId}getActualWidth(){return this.actualWidth}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){let t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}createBaseColDefParams(e){return this.gos.addGridCommonParams({node:e,data:e.data,colDef:this.colDef,column:this})}getColSpan(e){if(tK(this.colDef.colSpan))return 1;let t=this.createBaseColDefParams(e);return Math.max(this.colDef.colSpan(t),1)}getRowSpan(e){if(tK(this.colDef.rowSpan))return 1;let t=this.createBaseColDefParams(e);return Math.max(this.colDef.rowSpan(t),1)}setActualWidth(e,t,i=!1){e=Math.min(e=Math.max(e,this.minWidth),this.maxWidth),this.actualWidth===e||(this.actualWidth=e,this.flex&&"flex"!==t&&"gridInitializing"!==t&&(this.flex=null),i||this.fireColumnWidthChangedEvent(t)),this.dispatchStateUpdatedEvent("width")}fireColumnWidthChangedEvent(e){this.columnEventService.dispatchEvent(this.createColumnEvent("widthChanged",e))}isGreaterThanMax(e){return e>this.maxWidth}getMinWidth(){return this.minWidth}getMaxWidth(){return this.maxWidth}getFlex(){return this.flex||0}setFlex(e){this.flex!==e&&(this.flex=e),this.dispatchStateUpdatedEvent("flex")}setMinimum(e){this.setActualWidth(this.minWidth,e)}setRowGroupActive(e,t){this.rowGroupActive!==e&&(this.rowGroupActive=e,this.columnEventService.dispatchEvent(this.createColumnEvent("columnRowGroupChanged",t))),this.dispatchStateUpdatedEvent("rowGroup")}isRowGroupActive(){return this.rowGroupActive}setPivotActive(e,t){this.pivotActive!==e&&(this.pivotActive=e,this.columnEventService.dispatchEvent(this.createColumnEvent("columnPivotChanged",t))),this.dispatchStateUpdatedEvent("pivot")}isPivotActive(){return this.pivotActive}isAnyFunctionActive(){return this.isPivotActive()||this.isRowGroupActive()||this.isValueActive()}isAnyFunctionAllowed(){return this.isAllowPivot()||this.isAllowRowGroup()||this.isAllowValue()}setValueActive(e,t){this.aggregationActive!==e&&(this.aggregationActive=e,this.columnEventService.dispatchEvent(this.createColumnEvent("columnValueChanged",t)))}isValueActive(){return this.aggregationActive}isAllowPivot(){return!0===this.colDef.enablePivot}isAllowValue(){return!0===this.colDef.enableValue}isAllowRowGroup(){return!0===this.colDef.enableRowGroup}dispatchStateUpdatedEvent(e){this.columnEventService.dispatchEvent({type:"columnStateUpdated",key:e})}},rv={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}},ry=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;t<e.length;t++)this.existingKeys[e[t]]=!0}getUniqueKey(e,t){e=tq(e);let i=0;for(;;){let r;if(e?(r=e,0!==i&&(r+="_"+i)):t?(r=t,0!==i&&(r+="_"+i)):r=i,!this.existingKeys[r])return this.existingKeys[r]=!0,String(r);i++}}},rC=class extends i2{constructor(){super(...arguments),this.beanName="columnFactory"}wireBeans(e){this.dataTypeService=e.dataTypeService}createColumnTree(e,t,i,r){let s=new ry,{existingCols:a,existingGroups:o,existingColKeys:n}=this.extractExistingTreeData(i);s.addExistingKeys(n);let l=this.recursivelyCreateColumns(e,0,t,a,s,o,r),h=this.findMaxDept(l,0),d=this.balanceColumnTree(l,0,h,s);return rw(null,d,(e,t)=>{i3(e)&&e.setupExpandable(),e.setOriginalParent(t)}),{columnTree:d,treeDept:h}}extractExistingTreeData(e){let t=[],i=[],r=[];return e&&rw(null,e,e=>{i3(e)?i.push(e):(r.push(e.getId()),t.push(e))}),{existingCols:t,existingGroups:i,existingColKeys:r}}balanceTreeForAutoCols(e,t){let i=[],r=this.findDepth(t);return e.forEach(e=>{let t=e;for(let i=r-1;i>=0;i--){let r=new i4(null,`FAKE_PATH_${e.getId()}}_${i}`,!0,i);this.createBean(r),r.setChildren([t]),t.setOriginalParent(r),t=r}0===r&&e.setOriginalParent(null),i.push(t)}),[i,r]}findDepth(e){let t=0,i=e;for(;i&&i[0]&&i3(i[0]);)t++,i=i[0].getChildren();return t}balanceColumnTree(e,t,i,r){let s=[];for(let a=0;a<e.length;a++){let o=e[a];if(i3(o)){let e=this.balanceColumnTree(o.getChildren(),t+1,i,r);o.setChildren(e),s.push(o)}else{let a,n;for(let e=i-1;e>=t;e--){let e=r.getUniqueKey(null,null),i=new i4(this.createMergedColGroupDef(null),e,!0,t);this.createBean(i),n&&n.setChildren([i]),n=i,a||(a=n)}if(a&&n){if(s.push(a),e.some(e=>i3(e))){n.setChildren([o]);continue}n.setChildren(e);break}s.push(o)}}return s}findMaxDept(e,t){let i=t;for(let r=0;r<e.length;r++){let s=e[r];if(i3(s)){let e=this.findMaxDept(s.getChildren(),t+1);i<e&&(i=e)}}return i}recursivelyCreateColumns(e,t,i,r,s,a,o){if(!e)return[];let n=Array(e.length);for(let l=0;l<n.length;l++){let h=e[l];this.isColumnGroup(h)?n[l]=this.createColumnGroup(i,h,t,r,s,a,o):n[l]=this.createColumn(i,h,r,s,o)}return n}createColumnGroup(e,t,i,r,s,a,o){let n=this.createMergedColGroupDef(t),l=s.getUniqueKey(n.groupId||null,null),h=new i4(n,l,!1,i);this.createBean(h);let d=this.findExistingGroup(t,a);d&&a.splice(d.idx,1);let c=d?.group;c&&h.setExpanded(c.isExpanded());let u=this.recursivelyCreateColumns(n.children,i+1,e,r,s,a,o);return h.setChildren(u),h}createMergedColGroupDef(e){let t={};return Object.assign(t,this.gos.get("defaultColGroupDef")),Object.assign(t,e),t}createColumn(e,t,i,r,s){let a=this.findExistingColumn(t,i);a&&i?.splice(a.idx,1);let o=a?.column;if(o){let e=this.addColumnDefaultAndTypes(t,o.getColId());o.setColDef(e,t,s),this.applyColumnState(o,e,s)}else{let i=r.getUniqueKey(t.colId,t.field);o=new rf(this.addColumnDefaultAndTypes(t,i),t,i,e),this.createBean(o)}return this.dataTypeService?.addColumnListeners(o),o}applyColumnState(e,t,i){let r=tX(t.flex);if(void 0!==r&&e.setFlex(r),0>=e.getFlex()){let r=tX(t.width);if(null!=r)e.setActualWidth(r,i);else{let t=e.getActualWidth();e.setActualWidth(t,i)}}void 0!==t.sort&&("asc"==t.sort||"desc"==t.sort?e.setSort(t.sort,i):e.setSort(void 0,i));let s=tX(t.sortIndex);void 0!==s&&e.setSortIndex(s);let a=tQ(t.hide);void 0!==a&&e.setVisible(!a,i),void 0!==t.pinned&&e.setPinned(t.pinned)}findExistingColumn(e,t){if(t)for(let i=0;i<t.length;i++){let r=t[i].getUserProvidedColDef();if(r){if(null!=e.colId){if(t[i].getId()===e.colId)return{idx:i,column:t[i]};continue}if(null!=e.field){if(r.field===e.field)return{idx:i,column:t[i]};continue}if(r===e)return{idx:i,column:t[i]}}}}findExistingGroup(e,t){if(null!=e.groupId)for(let i=0;i<t.length;i++){let r=t[i];if(r.getColGroupDef()&&r.getId()===e.groupId)return{idx:i,group:r}}}addColumnDefaultAndTypes(e,t){let i={};rd(i,this.gos.get("defaultColDef"),!1,!0);let r=this.updateColDefAndGetColumnType(i,e,t);r&&this.assignColumnTypes(r,i),rd(i,e,!1,!0);let s=this.gos.get("autoGroupColumnDef"),a=ip(this.gos);return e.rowGroup&&s&&a&&rd(i,{sort:s.sort,initialSort:s.initialSort},!1,!0),this.dataTypeService?.validateColDef(i),i}updateColDefAndGetColumnType(e,t,i){let r=this.dataTypeService?.updateColDefAndGetColumnType(e,t,i),s=t.type??r??e.type;return e.type=s,s?rr(s):void 0}assignColumnTypes(e,t){if(!e.length)return;let i=Object.assign({},rv);ro(this.gos.get("columnTypes")||{},(e,t)=>{e in i?tO(`the column type '${e}' is a default column type and cannot be overridden.`):(t.type&&tO("Column type definitions 'columnTypes' with a 'type' attribute are not supported because a column type cannot refer to another column type. Only column definitions 'columnDefs' can use the 'type' attribute to refer to a column type."),i[e]=t)}),e.forEach(e=>{let r=i[e.trim()];r?rd(t,r,!1,!0):tO("colDef.type '"+e+"' does not correspond to defined gridOptions.columnTypes")})}isColumnGroup(e){return void 0!==e.children}};function rw(e,t,i){if(t)for(let r=0;r<t.length;r++){let s=t[r];i3(s)&&rw(s,s.getChildren(),i),i(s,e)}}var rb=class extends i2{constructor(){super(...arguments),this.beanName="columnModel",this.pivotMode=!1,this.autoHeightActiveAtLeastOnce=!1,this.ready=!1,this.changeEventsDispatching=!1,this.shouldQueueResizeOperations=!1,this.resizeOperationQueue=[]}wireBeans(e){this.context=e.context,this.ctrlsService=e.ctrlsService,this.columnFactory=e.columnFactory,this.columnSizeService=e.columnSizeService,this.visibleColsService=e.visibleColsService,this.columnViewportService=e.columnViewportService,this.pivotResultColsService=e.pivotResultColsService,this.columnAnimationService=e.columnAnimationService,this.autoColService=e.autoColService,this.controlsColService=e.controlsColService,this.valueCache=e.valueCache,this.columnDefFactory=e.columnDefFactory,this.columnApplyStateService=e.columnApplyStateService,this.columnGroupStateService=e.columnGroupStateService,this.eventDispatcher=e.columnEventDispatcher,this.columnMoveService=e.columnMoveService,this.columnAutosizeService=e.columnAutosizeService,this.funcColsService=e.funcColsService,this.quickFilterService=e.quickFilterService,this.showRowGroupColsService=e.showRowGroupColsService,this.environment=e.environment}postConstruct(){let e=this.gos.get("pivotMode");this.isPivotSettingAllowed(e)&&(this.pivotMode=e),this.addManagedPropertyListeners(["groupDisplayType","treeData","treeDataDisplayType","groupHideOpenParents"],e=>this.refreshAll(rS(e.source))),this.addManagedPropertyListener("selection",e=>{this.onSelectionOptionsChanged(e.currentValue,e.previousValue,rS(e.source))}),this.addManagedPropertyListener("autoGroupColumnDef",e=>this.onAutoGroupColumnDefChanged(rS(e.source))),this.addManagedPropertyListeners(["defaultColDef","defaultColGroupDef","columnTypes","suppressFieldDotNotation"],e=>this.recreateColumnDefs(rS(e.source))),this.addManagedPropertyListener("pivotMode",e=>this.setPivotMode(this.gos.get("pivotMode"),rS(e.source))),this.addManagedEventListeners({firstDataRendered:()=>this.onFirstDataRendered()})}createColsFromColDefs(e){let t=this.colDefs?this.columnApplyStateService.compareColumnStatesAndDispatchEvents(e):void 0;this.valueCache.expire();let i=this.colDefCols?.list,r=this.colDefCols?.tree,s=this.columnFactory.createColumnTree(this.colDefs,!0,r,e);re(this.context,this.colDefCols?.tree,s.columnTree);let a=s.columnTree,o=s.treeDept,n=i7(a),l={};n.forEach(e=>l[e.getId()]=e),this.colDefCols={tree:a,treeDepth:o,list:n,map:l},this.funcColsService.extractCols(e,i),this.ready=!0,this.refreshCols(!0),this.visibleColsService.refresh(e),this.columnViewportService.checkViewportColumns(),this.eventDispatcher.everythingChanged(e),t&&(this.changeEventsDispatching=!0,t(),this.changeEventsDispatching=!1),this.eventDispatcher.newColumnsLoaded(e),"gridInitializing"===e&&this.columnSizeService.applyAutosizeStrategy()}refreshCols(e){var t;if(!this.colDefCols)return;let i=this.cols?.tree;this.saveColOrder(),this.selectCols(),this.createAutoCols(),this.addAutoCols(),this.createControlsCols(),this.addControlsCols();let r=(t=this.gos,this.showingPivotResult?!t.get("enableStrictPivotColumnOrder"):t.get("maintainColumnOrder"));(!e||r)&&this.restoreColOrder(),this.positionLockedCols(),this.showRowGroupColsService?.refresh(),this.quickFilterService?.refreshQuickFilterCols(),this.setColSpanActive(),this.setAutoHeightActive(),this.visibleColsService.clear(),this.columnViewportService.clear(),iG(i,this.cols.tree)||this.eventDispatcher.gridColumns()}selectCols(){let e=this.pivotResultColsService.getPivotResultCols();if(this.showingPivotResult=null!=e,e){let{map:t,list:i,tree:r,treeDepth:s}=e;this.cols={list:i.slice(),map:{...t},tree:r.slice(),treeDepth:s},e.list.some(e=>this.cols?.map[e.getColId()]!==void 0)||(this.lastPivotOrder=null)}else{let{map:e,list:t,tree:i,treeDepth:r}=this.colDefCols;this.cols={list:t.slice(),map:{...e},tree:i.slice(),treeDepth:r}}}getColsToShow(){let e=this.isPivotMode()&&!this.isShowingPivotResult(),t=this.funcColsService.getValueColumns();return this.cols.list.filter(i=>{let r=rt(i);if(!e)return r||i.isVisible();{let e=t&&iU(t,i);return r||e}})}addAutoCols(){null!=this.autoCols&&(this.cols.list=this.autoCols.list.concat(this.cols.list),this.cols.tree=this.autoCols.tree.concat(this.cols.tree),rx(this.cols))}createAutoCols(){let e=iC(this.gos,this.pivotMode),t=this.pivotMode?this.gos.get("pivotSuppressAutoColumn"):this.isSuppressAutoCol(),i=this.funcColsService.getRowGroupColumns(),r=i.length>0||this.gos.get("treeData"),s=()=>{this.autoCols&&(re(this.context,this.autoCols.tree),this.autoCols=null)};if(!r||t||e||!this.autoColService){s();return}let a=this.autoColService.createAutoCols(i)??[],o=iG(a,this.autoCols?.list||null,(e,t)=>e.getColId()===t.getColId()),n=this.cols.treeDepth,l=this.autoCols?this.autoCols.treeDepth:-1;if(o&&l==n)return;s();let[h,d]=this.columnFactory.balanceTreeForAutoCols(a,this.cols?.tree);this.autoCols={list:a,tree:h,treeDepth:d,map:{}};let c=e=>e?[...a,...e.filter(e=>!rt(e))]:null;this.lastOrder=c(this.lastOrder),this.lastPivotOrder=c(this.lastPivotOrder)}createControlsCols(){re(this.context,this.controlsCols?.tree),this.controlsCols=null;let e=this.controlsColService?.createControlsCols()??[],[t,i]=this.columnFactory.balanceTreeForAutoCols(e,this.cols.tree);function r(e,t){let i=ri(e),r=ri(t);return i&&!r?-1:!i&&r?1:0}this.controlsCols={list:e,tree:t,treeDepth:i,map:{}},this.lastOrder?.sort(r),this.lastPivotOrder?.sort(r)}addControlsCols(){null!=this.controlsCols&&(this.cols.list=this.controlsCols.list.concat(this.cols.list),this.cols.tree=this.controlsCols.tree.concat(this.cols.tree),rx(this.cols))}refreshAll(e){this.isReady()&&(this.refreshCols(!1),this.visibleColsService.refresh(e))}setColsVisible(e,t=!1,i){this.columnApplyStateService.applyColumnState({state:e.map(e=>({colId:"string"==typeof e?e:e.getColId(),hide:!t}))},i)}setColsPinned(e,t,i){let r;if(!this.cols||tZ(e))return;if(t5(this.gos,"print")){tO("Changing the column pinning status is not allowed with domLayout='print'");return}this.columnAnimationService.start(),r=!0===t||"left"===t?"left":"right"===t?"right":null;let s=[];e.forEach(e=>{if(!e)return;let t=this.getCol(e);t&&t.getPinned()!==r&&(t.setPinned(r),s.push(t))}),s.length&&(this.visibleColsService.refresh(i),this.eventDispatcher.columnPinned(s,i)),this.columnAnimationService.finish()}setColumnGroupOpened(e,t,i){let r;r=i3(e)?e.getId():e||"",this.columnGroupStateService.setColumnGroupState([{groupId:r,open:t}],i)}getProvidedColGroup(e){let t=null;return rw(null,this.cols?.tree,i=>{i3(i)&&i.getId()===e&&(t=i)}),t}isColGroupLocked(e){let t=this.gos.get("groupLockGroupColumns");return!!e.isRowGroupActive()&&0!==t&&(-1===t||t>this.funcColsService.getRowGroupColumns().findIndex(t=>t.getColId()===e.getColId()))}isSuppressAutoCol(){return"custom"===this.gos.get("groupDisplayType")||"custom"===this.gos.get("treeDataDisplayType")}setAutoHeightActive(){this.autoHeightActive=this.cols.list.some(e=>e.isVisible()&&e.isAutoHeight()),this.autoHeightActive&&(this.autoHeightActiveAtLeastOnce=!0,t4(this.gos)||t6(this.gos)||tO("autoHeight columns only work with Client Side Row Model and Server Side Row Model."))}restoreColOrder(){let e=this.showingPivotResult?this.lastPivotOrder:this.lastOrder;if(!e)return;let t=new Map(e.map((e,t)=>[e,t]));if(!this.cols.list.some(e=>t.has(e)))return;let i=new Map(this.cols.list.map(e=>[e,!0])),r=e.filter(e=>i.has(e)),s=new Map(r.map(e=>[e,!0])),a=this.cols.list.filter(e=>!s.has(e)),o=r.slice();a.forEach(e=>{let t=e.getOriginalParent();if(!t){o.push(e);return}let i=[];for(;!i.length&&t;)t.getLeafColumns().forEach(e=>{let t=o.indexOf(e)>=0,r=0>i.indexOf(e);t&&r&&i.push(e)}),t=t.getOriginalParent();if(!i.length){o.push(e);return}let r=Math.max(...i.map(e=>o.indexOf(e)));iV(o,e,r+1)}),this.cols.list=o}sortColsLikeKeys(e){if(null==this.cols)return;let t=[],i={};e.forEach(e=>{if(i[e])return;let r=this.cols.map[e];r&&(t.push(r),i[e]=!0)});let r=0;if(this.cols.list.forEach(e=>{let s=e.getColId();null==i[s]&&(s.startsWith(i8)?iV(t,e,r++):t.push(e))}),t=this.columnMoveService.placeLockedColumns(t),!this.columnMoveService.doesMovePassMarryChildren(t)){tO("Applying column order broke a group where columns should be married together. Applying new order has been discarded.");return}this.cols.list=t}sortColsLikeCols(e){!e||e.length<=1||e.filter(e=>0>this.cols.list.indexOf(e)).length>0||e.sort((e,t)=>this.cols.list.indexOf(e)-this.cols.list.indexOf(t))}resetColDefIntoCol(e,t){let i=e.getUserProvidedColDef();if(!i)return!1;let r=this.columnFactory.addColumnDefaultAndTypes(i,e.getColId());return e.setColDef(r,i,t),!0}queueResizeOperations(){this.shouldQueueResizeOperations=!0}isShouldQueueResizeOperations(){return this.shouldQueueResizeOperations}processResizeOperations(){this.shouldQueueResizeOperations=!1,this.resizeOperationQueue.forEach(e=>e()),this.resizeOperationQueue=[]}pushResizeOperation(e){this.resizeOperationQueue.push(e)}moveInCols(e,t,i){iH(this.cols?.list,e,t),this.visibleColsService.refresh(i)}positionLockedCols(){this.cols.list=this.columnMoveService.placeLockedColumns(this.cols.list)}saveColOrder(){this.showingPivotResult?this.lastPivotOrder=this.cols?.list:this.lastOrder=this.cols?.list}getColumnDefs(){if(!this.colDefCols)return;let e=this.colDefCols.list.slice();this.showingPivotResult?e.sort((e,t)=>this.lastOrder.indexOf(e)-this.lastOrder.indexOf(t)):this.lastOrder&&e.sort((e,t)=>this.cols.list.indexOf(e)-this.cols.list.indexOf(t));let t=this.funcColsService.getRowGroupColumns(),i=this.funcColsService.getPivotColumns();return this.columnDefFactory.buildColumnDefs(e,t,i)}isShowingPivotResult(){return this.showingPivotResult}isChangeEventsDispatching(){return this.changeEventsDispatching}isColSpanActive(){return this.colSpanActive}isProvidedColGroupsPresent(){return this.colDefCols?.treeDepth>0}setColSpanActive(){this.colSpanActive=this.cols.list.some(e=>null!=e.getColDef().colSpan)}isAutoRowHeightActive(){return this.autoHeightActive}wasAutoRowHeightEverActive(){return this.autoHeightActiveAtLeastOnce}getHeaderRowCount(){return this.cols?this.cols.treeDepth+1:-1}isReady(){return this.ready}isPivotMode(){return this.pivotMode}setPivotMode(e,t){e!==this.pivotMode&&this.isPivotSettingAllowed(this.pivotMode)&&(this.pivotMode=e,this.ready&&(this.refreshCols(!1),this.visibleColsService.refresh(t),this.eventDispatcher.pivotModeChanged()))}isPivotSettingAllowed(e){return!(e&&this.gos.get("treeData"))||(tO("Pivot mode not available with treeData."),!1)}isPivotActive(){let e=this.funcColsService.getPivotColumns();return this.pivotMode&&!tZ(e)}recreateColumnDefs(e){this.cols&&(this.autoCols&&this.autoColService.updateAutoCols(this.autoCols.list,e),this.createColsFromColDefs(e))}setColumnDefs(e,t){this.colDefs=e,this.createColsFromColDefs(t)}destroy(){re(this.context,this.colDefCols?.tree),re(this.context,this.autoCols?.tree),re(this.context,this.controlsCols?.tree),super.destroy()}getColTree(){return this.cols.tree}getColDefColTree(){return this.colDefCols.tree}getColDefCols(){return this.colDefCols?.list?this.colDefCols.list:null}getCols(){return this.cols?.list??[]}getAllCols(){let e=this.pivotResultColsService.getPivotResultCols(),t=e?.list;return[this.colDefCols?.list??[],this.autoCols?.list??[],this.controlsCols?.list??[],t??[]].flat()}getColsForKeys(e){return e?e.map(e=>this.getCol(e)).filter(e=>null!=e):[]}getColDefCol(e){return this.colDefCols?.list?this.getColFromCollection(e,this.colDefCols):null}getCol(e){return null==e?null:this.getColFromCollection(e,this.cols)}getColFromCollection(e,t){if(null==t)return null;let{map:i,list:r}=t;if("string"==typeof e&&i[e])return i[e];for(let t=0;t<r.length;t++)if(rM(r[t],e))return r[t];return this.getAutoCol(e)}getAutoCol(e){return this.autoCols?.list.find(t=>rM(t,e))??null}getAutoCols(){return this.autoCols?.list??null}setColHeaderHeight(e,t){e.setAutoHeaderHeight(t)&&(e.isColumn?this.eventDispatcher.headerHeight(e):this.eventDispatcher.groupHeaderHeight(e))}getGroupRowsHeight(){let e=[];for(let t of this.ctrlsService.getHeaderRowContainerCtrls()){if(!t)continue;let i=t.getGroupRowCount()||0;for(let r=0;r<i;r++){let i=t.getGroupRowCtrlAtIndex(r),s=e[r];if(i){let t=this.getColumnGroupHeaderRowHeight(i);(null==s||t>s)&&(e[r]=t)}}}return e}getColumnGroupHeaderRowHeight(e){let t=this.isPivotMode()?this.getPivotGroupHeaderHeight():this.getGroupHeaderHeight(),i=0;for(let t of e.getHeaderCtrls()){let e=t.getColumn();if(e.isAutoHeaderHeight()){let t=e.getAutoHeaderHeight();null!=t&&t>i&&(i=t)}}return Math.max(t,i)}getColumnHeaderRowHeight(){return Math.max(this.isPivotMode()?this.getPivotHeaderHeight():this.getHeaderHeight(),...this.visibleColsService.getAllCols().filter(e=>e.isAutoHeaderHeight()).map(e=>e.getAutoHeaderHeight()||0))}getHeaderHeight(){return this.gos.get("headerHeight")??this.environment.getDefaultHeaderHeight()}getFloatingFiltersHeight(){return this.gos.get("floatingFiltersHeight")??this.getHeaderHeight()}getGroupHeaderHeight(){return this.gos.get("groupHeaderHeight")??this.getHeaderHeight()}getPivotHeaderHeight(){return this.gos.get("pivotHeaderHeight")??this.getHeaderHeight()}getPivotGroupHeaderHeight(){return this.gos.get("pivotGroupHeaderHeight")??this.getGroupHeaderHeight()}onFirstDataRendered(){let e=this.gos.get("autoSizeStrategy");if(e?.type!=="fitCellContents")return;let{colIds:t,skipHeader:i}=e;setTimeout(()=>{t?this.columnAutosizeService.autoSizeCols({colKeys:t,skipHeader:i,source:"autosizeColumns"}):this.columnAutosizeService.autoSizeAllColumns("autosizeColumns",i)})}onAutoGroupColumnDefChanged(e){this.autoCols&&this.autoColService.updateAutoCols(this.autoCols.list,e)}onSelectionOptionsChanged(e,t,i){let r=t?ib(t):void 0,s=e?ib(e):void 0,a=t?iS(t):void 0,o=e?iS(e):void 0;(r!==s||a!==o)&&this.refreshAll(i)}};function rS(e){return"gridOptionsUpdated"===e?"gridOptionsChanged":e}function rx(e){e.map={},e.list.forEach(t=>e.map[t.getId()]=t)}function rM(e,t){let i=e.getColDef()===t,r=e.getColId()==t;return e===t||i||r}var rE=class extends i2{constructor(){super(...arguments),this.beanName="columnAutosizeService",this.timesDelayed=0}wireBeans(e){this.columnModel=e.columnModel,this.visibleColsService=e.visibleColsService,this.animationFrameService=e.animationFrameService,this.autoWidthCalculator=e.autoWidthCalculator,this.eventDispatcher=e.columnEventDispatcher,this.ctrlsService=e.ctrlsService,this.renderStatusService=e.renderStatusService}autoSizeCols(e){if(this.columnModel.isShouldQueueResizeOperations()){this.columnModel.pushResizeOperation(()=>this.autoSizeCols(e));return}let{colKeys:t,skipHeader:i,skipHeaderGroups:r,stopAtGroup:s,source:a="api"}=e;if(this.animationFrameService.flushAllFrames(),this.timesDelayed<5&&this.renderStatusService&&!this.renderStatusService.areHeaderCellsRendered()){this.timesDelayed++,setTimeout(()=>this.autoSizeCols(e));return}this.timesDelayed=0;let o=[],n=-1,l=null!=i?i:this.gos.get("skipHeaderOnAutoSize"),h=null!=r?r:l;for(;0!==n;){n=0;let e=[];t.forEach(t=>{if(!t)return;let i=this.columnModel.getCol(t);if(!i||o.indexOf(i)>=0)return;let r=this.autoWidthCalculator.getPreferredWidthForColumn(i,l);if(r>0){let e=this.normaliseColumnWidth(i,r);i.setActualWidth(e,a),o.push(i),n++}e.push(i)}),e.length&&this.visibleColsService.refresh(a)}h||this.autoSizeColumnGroupsByColumns(t,a,s),this.eventDispatcher.columnResized(o,!0,"autosizeColumns")}autoSizeColumn(e,t,i){e&&this.autoSizeCols({colKeys:[e],skipHeader:i,skipHeaderGroups:!0,source:t})}autoSizeColumnGroupsByColumns(e,t,i){let r;let s=new Set;for(let a of(this.columnModel.getColsForKeys(e).forEach(e=>{let t=e.getParent();for(;t&&t!=i;)t.isPadding()||s.add(t),t=t.getParent()}),s)){for(let e of this.ctrlsService.getHeaderRowContainerCtrls())if(r=e.getHeaderCtrlForColumn(a))break;r&&r.resizeLeafColumnsToFit(t)}return[]}autoSizeAllColumns(e,t){if(this.columnModel.isShouldQueueResizeOperations()){this.columnModel.pushResizeOperation(()=>this.autoSizeAllColumns(e,t));return}let i=this.visibleColsService.getAllCols();this.autoSizeCols({colKeys:i,skipHeader:t,source:e})}normaliseColumnWidth(e,t){let i=e.getMinWidth();t<i&&(t=i);let r=e.getMaxWidth();return e.isGreaterThanMax(t)&&(t=r),t}},rD=class extends i2{constructor(){super(...arguments),this.beanName="funcColsService",this.rowGroupCols=[],this.valueCols=[],this.pivotCols=[]}wireBeans(e){this.columnModel=e.columnModel,this.eventDispatcher=e.columnEventDispatcher,this.aggFuncService=e.aggFuncService,this.visibleColsService=e.visibleColsService}getModifyColumnsNoEventsCallbacks(){return{addGroupCol:e=>this.rowGroupCols.push(e),removeGroupCol:e=>i_(this.rowGroupCols,e),addPivotCol:e=>this.pivotCols.push(e),removePivotCol:e=>i_(this.pivotCols,e),addValueCol:e=>this.valueCols.push(e),removeValueCol:e=>i_(this.valueCols,e)}}getSourceColumnsForGroupColumn(e){let t=e.getColDef().showRowGroup;if(!t)return null;if(!0===t)return this.rowGroupCols.slice(0);let i=this.columnModel.getColDefCol(t);return i?[i]:null}sortRowGroupColumns(e){this.rowGroupCols.sort(e)}sortPivotColumns(e){this.pivotCols.sort(e)}getValueColumns(){return this.valueCols?this.valueCols:[]}getPivotColumns(){return this.pivotCols?this.pivotCols:[]}getRowGroupColumns(){return this.rowGroupCols?this.rowGroupCols:[]}isRowGroupEmpty(){return tZ(this.rowGroupCols)}setColumnAggFunc(e,t,i){if(!e)return;let r=this.columnModel.getColDefCol(e);r&&(r.setAggFunc(t),this.eventDispatcher.columnChanged("columnValueChanged",[r],i))}setRowGroupColumns(e,t){this.setColList(e,this.rowGroupCols,"columnRowGroupChanged",!0,!0,(e,i)=>this.setRowGroupActive(e,i,t),t)}setRowGroupActive(e,t,i){e!==t.isRowGroupActive()&&(t.setRowGroupActive(e,i),e&&!this.gos.get("suppressRowGroupHidesColumns")&&this.columnModel.setColsVisible([t],!1,i),e||this.gos.get("suppressMakeColumnVisibleAfterUnGroup")||this.columnModel.setColsVisible([t],!0,i))}addRowGroupColumns(e,t){this.updateColList(e,this.rowGroupCols,!0,!0,e=>this.setRowGroupActive(!0,e,t),"columnRowGroupChanged",t)}removeRowGroupColumns(e,t){this.updateColList(e,this.rowGroupCols,!1,!0,e=>this.setRowGroupActive(!1,e,t),"columnRowGroupChanged",t)}addPivotColumns(e,t){this.updateColList(e,this.pivotCols,!0,!1,e=>e.setPivotActive(!0,t),"columnPivotChanged",t)}setPivotColumns(e,t){this.setColList(e,this.pivotCols,"columnPivotChanged",!0,!1,(e,i)=>{i.setPivotActive(e,t)},t)}removePivotColumns(e,t){this.updateColList(e,this.pivotCols,!1,!1,e=>e.setPivotActive(!1,t),"columnPivotChanged",t)}setValueColumns(e,t){this.setColList(e,this.valueCols,"columnValueChanged",!1,!1,(e,i)=>this.setValueActive(e,i,t),t)}setValueActive(e,t,i){if(e!==t.isValueActive()&&(t.setValueActive(e,i),e&&!t.getAggFunc()&&this.aggFuncService)){let e=this.aggFuncService.getDefaultAggFunc(t);t.setAggFunc(e)}}addValueColumns(e,t){this.updateColList(e,this.valueCols,!0,!1,e=>this.setValueActive(!0,e,t),"columnValueChanged",t)}removeValueColumns(e,t){this.updateColList(e,this.valueCols,!1,!1,e=>this.setValueActive(!1,e,t),"columnValueChanged",t)}moveRowGroupColumn(e,t,i){if(this.isRowGroupEmpty())return;let r=this.rowGroupCols[e],s=this.rowGroupCols.slice(e,t);this.rowGroupCols.splice(e,1),this.rowGroupCols.splice(t,0,r),this.eventDispatcher.rowGroupChanged(s,i)}setColList(e,t,i,r,s,a,o){if(tZ(this.columnModel.getCols()))return;let n=new Map;t.forEach((e,t)=>n.set(e,t)),t.length=0,tY(e)&&e.forEach(e=>{let i=this.columnModel.getColDefCol(e);i&&t.push(i)}),t.forEach((e,t)=>{let i=n.get(e);if(void 0===i){n.set(e,0);return}r&&i!==t||n.delete(e)}),(this.columnModel.getColDefCols()||[]).forEach(e=>{a(t.indexOf(e)>=0,e)}),s&&this.columnModel.refreshCols(!1),this.visibleColsService.refresh(o),this.eventDispatcher.columnChanged(i,[...n.keys()],o)}updateColList(e,t,i,r,s,a,o){if(!e||tZ(e))return;let n=!1,l=new Set;e.forEach(e=>{if(!e)return;let r=this.columnModel.getColDefCol(e);if(r){if(l.add(r),i){if(t.indexOf(r)>=0)return;t.push(r)}else{let e=t.indexOf(r);if(e<0)return;for(let i=e+1;i<t.length;i++)l.add(t[i]);i_(t,r)}s(r),n=!0}}),n&&(r&&this.columnModel.refreshCols(!1),this.visibleColsService.refresh(o),this.eventDispatcher.genericColumnEvent(a,Array.from(l),o))}extractCols(e,t){this.extractRowGroupCols(e,t),this.extractPivotCols(e,t),this.extractValueCols(e,t)}extractValueCols(e,t){this.valueCols=this.extractColsCommon(t,this.valueCols,(t,i)=>t.setValueActive(i,e),()=>void 0,()=>void 0,e=>{let t=e.aggFunc;return null===t||""===t?null:void 0!==t?!!t:void 0},e=>null!=e.initialAggFunc&&""!=e.initialAggFunc),this.valueCols.forEach(e=>{let t=e.getColDef();null!=t.aggFunc&&""!=t.aggFunc?e.setAggFunc(t.aggFunc):e.getAggFunc()||e.setAggFunc(t.initialAggFunc)})}extractRowGroupCols(e,t){this.rowGroupCols=this.extractColsCommon(t,this.rowGroupCols,(t,i)=>t.setRowGroupActive(i,e),e=>e.rowGroupIndex,e=>e.initialRowGroupIndex,e=>e.rowGroup,e=>e.initialRowGroup)}extractPivotCols(e,t){this.pivotCols=this.extractColsCommon(t,this.pivotCols,(t,i)=>t.setPivotActive(i,e),e=>e.pivotIndex,e=>e.initialPivotIndex,e=>e.pivot,e=>e.initialPivot)}extractColsCommon(e=[],t=[],i,r,s,a,o){let n=[],l=[];(this.columnModel.getColDefCols()||[]).forEach(i=>{let h=0>e.indexOf(i),d=i.getColDef(),c=tQ(a(d)),u=tQ(o(d)),p=tX(r(d)),g=tX(s(d));(void 0!==c?c:void 0!==p?null!==p&&p>=0:h?void 0!==u?u:void 0!==g&&null!=g&&g>=0:t.indexOf(i)>=0)&&((h?null!=p||null!=g:null!=p)?n.push(i):l.push(i))});let h=e=>{let t=r(e.getColDef()),i=s(e.getColDef());return null!=t?t:i};n.sort((e,t)=>{let i=h(e),r=h(t);return i===r?0:i<r?-1:1});let d=[].concat(n);return t.forEach(e=>{l.indexOf(e)>=0&&d.push(e)}),l.forEach(e=>{0>d.indexOf(e)&&d.push(e)}),t.forEach(e=>{0>d.indexOf(e)&&i(e,!1)}),d.forEach(e=>{0>t.indexOf(e)&&i(e,!0)}),d}generateColumnStateForRowGroupAndPivotIndexes(e,t){let i={},r=(e,t,r,s,a,o)=>{let n=this.columnModel.getColDefCols();if(!t.length||!n)return[];let l=Object.keys(e),h=new Set(l),d=new Set(l),c=new Set(t.map(e=>{let t=e.getColId();return d.delete(t),t}).concat(l)),u=[],p={},g=0;for(let e=0;e<n.length;e++){let t=n[e].getColId();c.has(t)&&(u.push(t),p[t]=g++)}let m=1e3,f=!1,v=0,y=t=>{let i=p[t];for(let t=v;t<i;t++){let i=u[t];d.has(i)&&(e[i][a]=m++,d.delete(i))}v=i};t.forEach(t=>{let n=t.getColId();if(h.has(n))y(n),e[n][a]=m++;else{let l=t.getColDef();(null===l[a]||void 0===l[a]&&null==l[o])&&(f||(l[r]||void 0===l[r]&&l[s]?y(n):(d.forEach(t=>{e[t][a]=m+p[t]}),m+=u.length,f=!0)),i[n]||(i[n]={colId:n}),i[n][a]=m++)}})};return r(e,this.rowGroupCols,"rowGroup","initialRowGroup","rowGroupIndex","initialRowGroupIndex"),r(t,this.pivotCols,"pivot","initialPivot","pivotIndex","initialPivotIndex"),Object.values(i)}},rI=class extends i2{constructor(){super(...arguments),this.beanName="columnApplyStateService"}wireBeans(e){this.columnModel=e.columnModel,this.eventDispatcher=e.columnEventDispatcher,this.sortController=e.sortController,this.columnGetStateService=e.columnGetStateService,this.funcColsService=e.funcColsService,this.visibleColsService=e.visibleColsService,this.columnAnimationService=e.columnAnimationService,this.pivotResultColsService=e.pivotResultColsService}applyColumnState(e,t){let i=this.columnModel.getColDefCols()||[];if(tZ(i))return!1;if(e&&e.state&&!e.state.forEach)return tO("applyColumnState() - the state attribute should be an array, however an array was not found. Please provide an array of items (one for each col you want to change) for state."),!1;let r=this.funcColsService.getModifyColumnsNoEventsCallbacks(),s=(i,s,a)=>{let o=this.compareColumnStatesAndDispatchEvents(t),n=s.slice(),l={},h={},d=[],c=[],u=0,p=this.funcColsService.getRowGroupColumns().slice(),g=this.funcColsService.getPivotColumns().slice();i.forEach(i=>{let s=i.colId||"";if(s.startsWith(i8)){d.push(i),c.push(i);return}let o=a(s);o?(this.syncColumnWithStateItem(o,i,e.defaultState,l,h,!1,t,r),i_(n,o)):(c.push(i),u+=1)});let m=i=>this.syncColumnWithStateItem(i,null,e.defaultState,l,h,!1,t,r);n.forEach(m),this.funcColsService.sortRowGroupColumns(rk.bind(this,l,p)),this.funcColsService.sortPivotColumns(rk.bind(this,h,g)),this.columnModel.refreshCols(!1);let f=(this.columnModel.getAutoCols()||[]).slice();return d.forEach(i=>{let s=this.columnModel.getAutoCol(i.colId);i_(f,s),this.syncColumnWithStateItem(s,i,e.defaultState,null,null,!0,t,r)}),f.forEach(m),this.orderLiveColsLikeState(e),this.visibleColsService.refresh(t),this.eventDispatcher.everythingChanged(t),o(),{unmatchedAndAutoStates:c,unmatchedCount:u}};this.columnAnimationService.start();let{unmatchedAndAutoStates:a,unmatchedCount:o}=s(e.state||[],i,e=>this.columnModel.getColDefCol(e));if(a.length>0||tY(e.defaultState)){let e=this.pivotResultColsService.getPivotResultCols();o=s(a,e?.list||[],e=>this.pivotResultColsService.getPivotResultCol(e)).unmatchedCount}return this.columnAnimationService.finish(),0===o}resetColumnState(e){if(tZ(this.columnModel.getColDefCols()))return;let t=i7(this.columnModel.getColDefColTree()),i=[],r=1e3,s=1e3,a=[],o=this.columnModel.getAutoCols();o&&(a=a.concat(o)),t&&(a=a.concat(t)),a.forEach(e=>{let t=this.getColumnStateFromColDef(e);tK(t.rowGroupIndex)&&t.rowGroup&&(t.rowGroupIndex=r++),tK(t.pivotIndex)&&t.pivot&&(t.pivotIndex=s++),i.push(t)}),this.applyColumnState({state:i,applyOrder:!0},e)}getColumnStateFromColDef(e){let t=(e,t)=>null!=e?e:null!=t?t:null,i=e.getColDef(),r=t(i.sort,i.initialSort),s=t(i.sortIndex,i.initialSortIndex),a=t(i.hide,i.initialHide),o=t(i.pinned,i.initialPinned),n=t(i.width,i.initialWidth),l=t(i.flex,i.initialFlex),h=t(i.rowGroupIndex,i.initialRowGroupIndex),d=t(i.rowGroup,i.initialRowGroup);null==h&&(null==d||!1==d)&&(h=null,d=null);let c=t(i.pivotIndex,i.initialPivotIndex),u=t(i.pivot,i.initialPivot);null==c&&(null==u||!1==u)&&(c=null,u=null);let p=t(i.aggFunc,i.initialAggFunc);return{colId:e.getColId(),sort:r,sortIndex:s,hide:a,pinned:o,width:n,flex:l,rowGroup:d,rowGroupIndex:h,pivot:u,pivotIndex:c,aggFunc:p}}syncColumnWithStateItem(e,t,i,r,s,a,o,n){if(!e)return;let l=(e,r)=>{let s={value1:void 0,value2:void 0},a=!1;return t&&(void 0!==t[e]&&(s.value1=t[e],a=!0),tY(r)&&void 0!==t[r]&&(s.value2=t[r],a=!0)),!a&&i&&(void 0!==i[e]&&(s.value1=i[e]),tY(r)&&void 0!==i[r]&&(s.value2=i[r])),s},h=l("hide").value1;void 0!==h&&e.setVisible(!h,o);let d=l("pinned").value1;void 0!==d&&e.setPinned(d);let c=e.getColDef().minWidth??this.gos.environment.getDefaultColumnMinWidth(),u=l("flex").value1;if(void 0!==u&&e.setFlex(u),null==u){let t=l("width").value1;null!=t&&null!=c&&t>=c&&e.setActualWidth(t,o)}let p=l("sort").value1;void 0!==p&&("desc"===p||"asc"===p?e.setSort(p,o):e.setSort(void 0,o));let g=l("sortIndex").value1;if(void 0!==g&&e.setSortIndex(g),a||!e.isPrimary())return;let m=l("aggFunc").value1;void 0!==m&&("string"==typeof m?(e.setAggFunc(m),e.isValueActive()||(e.setValueActive(!0,o),n.addValueCol(e))):(tY(m)&&tO("stateItem.aggFunc must be a string. if using your own aggregation functions, register the functions first before using them in get/set state. This is because it is intended for the column state to be stored and retrieved as simple JSON."),e.isValueActive()&&(e.setValueActive(!1,o),n.removeValueCol(e))));let{value1:f,value2:v}=l("rowGroup","rowGroupIndex");(void 0!==f||void 0!==v)&&("number"==typeof v||f?(e.isRowGroupActive()||(e.setRowGroupActive(!0,o),n.addGroupCol(e)),r&&"number"==typeof v&&(r[e.getId()]=v)):e.isRowGroupActive()&&(e.setRowGroupActive(!1,o),n.removeGroupCol(e)));let{value1:y,value2:C}=l("pivot","pivotIndex");(void 0!==y||void 0!==C)&&("number"==typeof C||y?(e.isPivotActive()||(e.setPivotActive(!0,o),n.addPivotCol(e)),s&&"number"==typeof C&&(s[e.getId()]=C)):e.isPivotActive()&&(e.setPivotActive(!1,o),n.removePivotCol(e)))}orderLiveColsLikeState(e){if(!e.applyOrder||!e.state)return;let t=[];e.state.forEach(e=>{null!=e.colId&&t.push(e.colId)}),this.columnModel.sortColsLikeKeys(t)}compareColumnStatesAndDispatchEvents(e){let t={rowGroupColumns:this.funcColsService.getRowGroupColumns().slice(),pivotColumns:this.funcColsService.getPivotColumns().slice(),valueColumns:this.funcColsService.getValueColumns().slice()},i=this.columnGetStateService.getColumnState(),r={};return i.forEach(e=>{r[e.colId]=e}),()=>{let s=this.columnModel.getAllCols(),a=(t,i,r,s)=>{if(iG(i.map(s),r.map(s)))return;let a=new Set(i);r.forEach(e=>{a.delete(e)||a.add(e)});let o=[...a];this.eventService.dispatchEvent({type:t,columns:o,column:1===o.length?o[0]:null,source:e})},o=e=>{let t=[];return s.forEach(i=>{let s=r[i.getColId()];s&&e(s,i)&&t.push(i)}),t},n=e=>e.getColId();a("columnRowGroupChanged",t.rowGroupColumns,this.funcColsService.getRowGroupColumns(),n),a("columnPivotChanged",t.pivotColumns,this.funcColsService.getPivotColumns(),n);let l=o((e,t)=>{let i=null!=e.aggFunc,r=i!=t.isValueActive(),s=i&&e.aggFunc!=t.getAggFunc();return r||s});l.length>0&&this.eventDispatcher.columnChanged("columnValueChanged",l,e),this.eventDispatcher.columnResized(o((e,t)=>e.width!=t.getActualWidth()),!0,e),this.eventDispatcher.columnPinned(o((e,t)=>e.pinned!=t.getPinned()),e),this.eventDispatcher.columnVisible(o((e,t)=>e.hide==t.isVisible()),e);let h=o((e,t)=>e.sort!=t.getSort()||e.sortIndex!=t.getSortIndex());h.length>0&&this.sortController.dispatchSortChangedEvents(e,h),this.normaliseColumnMovedEventForColumnState(i,e)}}normaliseColumnMovedEventForColumnState(e,t){let i=this.columnGetStateService.getColumnState(),r={};i.forEach(e=>r[e.colId]=e);let s={};e.forEach(e=>{r[e.colId]&&(s[e.colId]=!0)});let a=e.filter(e=>s[e.colId]),o=i.filter(e=>s[e.colId]),n=[];o.forEach((e,t)=>{let i=a&&a[t];if(i&&i.colId!==e.colId){let e=this.columnModel.getCol(i.colId);e&&n.push(e)}}),n.length&&this.eventDispatcher.columnMoved({movedColumns:n,source:t,finished:!0})}},rk=(e,t,i,r)=>{let s=e[i.getId()],a=e[r.getId()],o=null!=s,n=null!=a;if(o&&n)return s-a;if(o)return -1;if(n)return 1;let l=t.indexOf(i),h=t.indexOf(r),d=l>=0;return d&&h>=0?l-h:d?-1:1},rT=class extends i2{constructor(){super(...arguments),this.beanName="columnMoveService"}wireBeans(e){this.columnModel=e.columnModel,this.columnAnimationService=e.columnAnimationService,this.eventDispatcher=e.columnEventDispatcher}moveColumnByIndex(e,t,i){let r=this.columnModel.getCols();if(!r)return;let s=r[e];this.moveColumns([s],t,i)}moveColumns(e,t,i,r=!0){let s=this.columnModel.getCols();if(!s)return;if(t>s.length-e.length){tO("tried to insert columns in invalid location, toIndex = ",t),tO("remember that you should not count the moving columns when calculating the new index");return}this.columnAnimationService.start();let a=this.columnModel.getColsForKeys(e);this.doesMovePassRules(a,t)&&(this.columnModel.moveInCols(a,t,i),this.eventDispatcher.columnMoved({movedColumns:a,source:i,toIndex:t,finished:r})),this.columnAnimationService.finish()}doesMovePassRules(e,t){let i=this.getProposedColumnOrder(e,t);return this.doesOrderPassRules(i)}doesOrderPassRules(e){return!!(this.doesMovePassMarryChildren(e)&&this.doesMovePassLockedPositions(e))}getProposedColumnOrder(e,t){let i=this.columnModel.getCols().slice();return iH(i,e,t),i}doesMovePassLockedPositions(e){let t=e=>e?"left"===e||!0===e?-1:1:0,i=this.gos.get("enableRtl"),r=i?1:-1,s=!0;return e.forEach(e=>{let a=t(e.getColDef().lockPosition);i?a>r&&(s=!1):a<r&&(s=!1),r=a}),s}doesMovePassMarryChildren(e){let t=!0;return rw(null,this.columnModel.getColTree(),i=>{if(!i3(i))return;let r=i.getColGroupDef();if(!(r&&r.marryChildren))return;let s=[];i.getLeafColumns().forEach(t=>{let i=e.indexOf(t);s.push(i)}),Math.max.apply(Math,s)-Math.min.apply(Math,s)>i.getLeafColumns().length-1&&(t=!1)}),t}placeLockedColumns(e){let t=[],i=[],r=[];return(e.forEach(e=>{let s=e.getColDef().lockPosition;"right"===s?r.push(e):"left"===s||!0===s?t.push(e):i.push(e)}),this.gos.get("enableRtl"))?[...r,...i,...t]:[...t,...i,...r]}},rA=/[&<>"']/g,rR={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function rL(e,t){if(null==e)return null;let i=e.toString().toString();return t?i:i.replace(rA,e=>rR[e])}var rP=class extends i2{constructor(){super(...arguments),this.beanName="columnNameService"}wireBeans(e){this.expressionService=e.expressionService,this.funcColsService=e.funcColsService,this.columnModel=e.columnModel}getDisplayNameForColumn(e,t,i=!1){if(!e)return null;let r=this.getHeaderName(e.getColDef(),e,null,null,t);return i?this.wrapHeaderNameWithAggFunc(e,r):r}getDisplayNameForProvidedColumnGroup(e,t,i){let r=t?t.getColGroupDef():null;return r?this.getHeaderName(r,null,e,t,i):null}getDisplayNameForColumnGroup(e,t){return this.getDisplayNameForProvidedColumnGroup(e,e.getProvidedColumnGroup(),t)}getHeaderName(e,t,i,r,s){let a=e.headerValueGetter;if(a){let o=this.gos.addGridCommonParams({colDef:e,column:t,columnGroup:i,providedColumnGroup:r,location:s});if("function"==typeof a)return a(o);if("string"==typeof a)return this.expressionService.evaluate(a,o);tO("headerValueGetter must be a function or a string")}else if(null!=e.headerName)return e.headerName;else if(e.field){var o;return(o=e.field)&&null!=o?o.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z])([a-z])/g,"$1 $2$3").replace(/\./g," ").split(" ").map(e=>e.substring(0,1).toUpperCase()+(e.length>1?e.substring(1,e.length):"")).join(" "):null}return""}wrapHeaderNameWithAggFunc(e,t){let i;if(this.gos.get("suppressAggFuncInHeader"))return t;let r=e.getColDef().pivotValueColumn,s=tY(r),a=null;if(s){let s=this.funcColsService.getValueColumns(),o=this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&1===s.length,n=void 0!==e.getColDef().pivotTotalColumnIds;if(o&&!n)return t;a=r?r.getAggFunc():null,i=!0}else{let t=e.isValueActive(),r=this.columnModel.isPivotMode()||!this.funcColsService.isRowGroupEmpty();t&&r?(a=e.getAggFunc(),i=!0):i=!1}if(i){let e="string"==typeof a?a:"func",i=this.localeService.getLocaleTextFunc()(e,e);return`${i}(${t})`}return t}},rF=class extends i2{constructor(){super(...arguments),this.beanName="pivotResultColsService"}wireBeans(e){this.context=e.context,this.columnModel=e.columnModel,this.columnFactory=e.columnFactory,this.visibleColsService=e.visibleColsService}destroy(){re(this.context,this.pivotResultCols?.tree),super.destroy()}isPivotResultColsPresent(){return null!=this.pivotResultCols}lookupPivotResultCol(e,t){if(null==this.pivotResultCols)return null;let i=this.columnModel.getColDefCol(t),r=null;return this.pivotResultCols.list.forEach(t=>{let s=t.getColDef().pivotKeys,a=t.getColDef().pivotValueColumn;iG(s,e)&&a===i&&(r=t)}),r}getPivotResultCols(){return this.pivotResultCols}getPivotResultCol(e){return this.pivotResultCols?this.columnModel.getColFromCollection(e,this.pivotResultCols):null}setPivotResultCols(e,t){if(this.columnModel.isReady()&&(null!=e||null!=this.pivotResultCols)){if(e){this.processPivotResultColDef(e);let i=this.columnFactory.createColumnTree(e,!1,this.pivotResultCols?.tree||this.previousPivotResultCols||void 0,t);re(this.context,this.pivotResultCols?.tree,i.columnTree);let r=i.columnTree,s=i.treeDept,a=i7(r);this.pivotResultCols={tree:r,treeDepth:s,list:a,map:{}},this.pivotResultCols.list.forEach(e=>this.pivotResultCols.map[e.getId()]=e);let o=!!this.previousPivotResultCols;this.previousPivotResultCols=null,this.columnModel.refreshCols(!o)}else this.previousPivotResultCols=this.pivotResultCols?this.pivotResultCols.tree:null,this.pivotResultCols=null,this.columnModel.refreshCols(!1);this.visibleColsService.refresh(t)}}processPivotResultColDef(e){let t=this.gos.get("processPivotResultColDef"),i=this.gos.get("processPivotResultColGroupDef");if(!t&&!i)return;let r=e=>{e.forEach(e=>{tY(e.children)?(i&&i(e),r(e.children)):t&&t(e)})};e&&r(e)}},rN=class extends i2{constructor(){super(...arguments),this.beanName="columnSizeService"}wireBeans(e){this.columnModel=e.columnModel,this.columnViewportService=e.columnViewportService,this.eventDispatcher=e.columnEventDispatcher,this.visibleColsService=e.visibleColsService,this.ctrlsService=e.ctrlsService}setColumnWidths(e,t,i,r){let s=[];e.forEach(e=>{let i=this.columnModel.getColDefCol(e.key)||this.columnModel.getCol(e.key);if(i&&(s.push({width:e.newWidth,ratios:[1],columns:[i]}),"shift"===this.gos.get("colResizeDefault")&&(t=!t),t)){let t=this.visibleColsService.getColAfter(i);if(!t)return;let r=i.getActualWidth()-e.newWidth,a=t.getActualWidth()+r;s.push({width:a,ratios:[1],columns:[t]})}}),0!==s.length&&this.resizeColumnSets({resizeSets:s,finished:i,source:r})}resizeColumnSets(e){let{resizeSets:t,finished:i,source:r}=e;if(!(!t||t.every(e=>this.checkMinAndMaxWidthsForSet(e)))){if(i){let e=t&&t.length>0?t[0].columns:null;this.eventDispatcher.columnResized(e,i,r)}return}let s=[],a=[];t.forEach(e=>{let{width:t,columns:i,ratios:o}=e,n={},l={};i.forEach(e=>a.push(e));let h=!0,d=0;for(;h;){if(++d>1e3){tB("infinite loop in resizeColumnSets");break}h=!1;let e=[],r=0,s=t;i.forEach((t,i)=>{if(l[t.getId()])s-=n[t.getId()];else{e.push(t);let s=o[i];r+=s}});let a=1/r;e.forEach((i,r)=>{let d;r===e.length-1?d=s:(d=Math.round(o[r]*t*a),s-=d);let c=i.getMinWidth(),u=i.getMaxWidth();d<c?(d=c,l[i.getId()]=!0,h=!0):u>0&&d>u&&(d=u,l[i.getId()]=!0,h=!0),n[i.getId()]=d})}i.forEach(e=>{let t=n[e.getId()];e.getActualWidth()!==t&&(e.setActualWidth(t,r),s.push(e))})});let o=s.length>0,n=[];o&&(n=this.refreshFlexedColumns({resizingCols:a,skipSetLeft:!0}),this.visibleColsService.setLeftValues(r),this.visibleColsService.updateBodyWidths(),this.columnViewportService.checkViewportColumns());let l=a.concat(n);(o||i)&&this.eventDispatcher.columnResized(l,i,r,n)}checkMinAndMaxWidthsForSet(e){let{columns:t,width:i}=e,r=0,s=0,a=!0;t.forEach(e=>{let t=e.getMinWidth();r+=t||0;let i=e.getMaxWidth();i>0?s+=i:a=!1});let o=i>=r,n=!a||i<=s;return o&&n}refreshFlexedColumns(e={}){let t;let i=e.source?e.source:"flex";if(null!=e.viewportWidth&&(this.flexViewportWidth=e.viewportWidth),!this.flexViewportWidth)return[];let r=this.visibleColsService.getCenterCols(),s=-1;if(e.resizingCols){let t=new Set(e.resizingCols);for(let e=r.length-1;e>=0;e--)if(t.has(r[e])){s=e;break}}let a=0,o=[],n=0,l=0;for(let e=0;e<r.length;e++)r[e].getFlex()&&e>s?(o.push(r[e]),l+=r[e].getFlex(),n+=r[e].getMinWidth()):a+=r[e].getActualWidth();if(!o.length)return[];let h=[];a+n>this.flexViewportWidth&&(o.forEach(e=>e.setActualWidth(e.getMinWidth(),i)),h=o,o=[]);let d=[];e:for(;;){let e=(t=this.flexViewportWidth-a)/l;for(let t=0;t<o.length;t++){let r=o[t],s=e*r.getFlex(),n=0,c=r.getMinWidth(),u=r.getMaxWidth();if(s<c?n=c:s>u&&(n=u),n){r.setActualWidth(n,i),iz(o,r),l-=r.getFlex(),h.push(r),a+=r.getActualWidth();continue e}d[t]=Math.floor(s)}break}let c=t;return o.forEach((e,t)=>{let r=t<o.length-1?Math.min(d[t],c):Math.max(d[t],c);e.setActualWidth(r,i),h.push(e),c-=d[t]}),e.skipSetLeft||this.visibleColsService.setLeftValues(i),e.updateBodyWidths&&this.visibleColsService.updateBodyWidths(),e.fireResizedEvent&&this.eventDispatcher.columnResized(h,!0,i,o),o}sizeColumnsToFit(e,t="sizeColumnsToFit",i,r){if(this.columnModel.isShouldQueueResizeOperations()){this.columnModel.pushResizeOperation(()=>this.sizeColumnsToFit(e,t,i,r));return}let s={};r&&r?.columnLimits?.forEach(({key:e,...t})=>{s["string"==typeof e?e:e.getColId()]=t});let a=this.visibleColsService.getAllCols(),o=e===i9(a);if(e<=0||!a.length||o)return;let n=[],l=[];a.forEach(e=>{!0===e.getColDef().suppressSizeToFit?l.push(e):n.push(e)});let h=n.slice(0),d=!1,c=e=>{i_(n,e),l.push(e)};for(n.forEach(e=>{e.resetActualWidth(t);let i=s?.[e.getId()],a=i?.minWidth??r?.defaultMinWidth,o=i?.maxWidth??r?.defaultMaxWidth,n=e.getActualWidth();"number"==typeof a&&n<a?e.setActualWidth(a,t,!0):"number"==typeof o&&n>o&&e.setActualWidth(o,t,!0)});!d;){d=!0;let i=e-i9(l);if(i<=0)n.forEach(e=>{let i=s?.[e.getId()]?.minWidth??r?.defaultMinWidth;if("number"==typeof i){e.setActualWidth(i,t,!0);return}e.setMinimum(t)});else{let e=i/i9(n),a=i;for(let i=n.length-1;i>=0;i--){let o=n[i],l=s?.[o.getId()],h=l?.minWidth??r?.defaultMinWidth,u=l?.maxWidth??r?.defaultMaxWidth,p=o.getMinWidth(),g=o.getMaxWidth(),m="number"==typeof h&&h>p?h:p,f="number"==typeof u&&u<g?u:g,v=Math.round(o.getActualWidth()*e);v<m?(v=m,c(o),d=!1):v>f?(v=f,c(o),d=!1):0===i&&(v=a),o.setActualWidth(v,t,!0),a-=v}}}h.forEach(e=>{e.fireColumnWidthChangedEvent(t)}),this.visibleColsService.setLeftValues(t),this.visibleColsService.updateBodyWidths(),i||this.eventDispatcher.columnResized(h,!0,t)}applyAutosizeStrategy(){let e=this.gos.get("autoSizeStrategy");if(!e)return;let{type:t}=e;setTimeout(()=>{if("fitGridWidth"===t){let{columnLimits:t,defaultMinWidth:i,defaultMaxWidth:r}=e,s=t?.map(({colId:e,minWidth:t,maxWidth:i})=>({key:e,minWidth:t,maxWidth:i}));this.ctrlsService.getGridBodyCtrl().sizeColumnsToFit({defaultMinWidth:i,defaultMaxWidth:r,columnLimits:s})}else"fitProvidedWidth"===t&&this.sizeColumnsToFit(e.width,"sizeColumnsToFit")})}};function rO(e){return e instanceof rB}var rB=class extends i2{constructor(e,t,i,r){super(),this.isColumn=!1,this.displayedChildren=[],this.autoHeaderHeight=null,this.parent=null,this.groupId=t,this.partId=i,this.providedColumnGroup=e,this.pinned=r}reset(){this.parent=null,this.children=null,this.displayedChildren=null}getParent(){return this.parent}setParent(e){this.parent=e}getUniqueId(){return this.groupId+"_"+this.partId}isEmptyGroup(){return 0===this.displayedChildren.length}isMoving(){let e=this.getProvidedColumnGroup().getLeafColumns();return!!e&&0!==e.length&&e.every(e=>e.isMoving())}checkLeft(){if(this.displayedChildren.forEach(e=>{rO(e)&&e.checkLeft()}),this.displayedChildren.length>0){if(this.gos.get("enableRtl")){let e=iB(this.displayedChildren).getLeft();this.setLeft(e)}else{let e=this.displayedChildren[0].getLeft();this.setLeft(e)}}else this.setLeft(null)}getLeft(){return this.left}getOldLeft(){return this.oldLeft}setLeft(e){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.dispatchLocalEvent({type:"leftChanged"}))}getPinned(){return this.pinned}getGroupId(){return this.groupId}getPartId(){return this.partId}getActualWidth(){let e=0;return this.displayedChildren&&this.displayedChildren.forEach(t=>{e+=t.getActualWidth()}),e}isResizable(){if(!this.displayedChildren)return!1;let e=!1;return this.displayedChildren.forEach(t=>{t.isResizable()&&(e=!0)}),e}getMinWidth(){let e=0;return this.displayedChildren.forEach(t=>{e+=t.getMinWidth()}),e}addChild(e){this.children||(this.children=[]),this.children.push(e)}getDisplayedChildren(){return this.displayedChildren}getLeafColumns(){let e=[];return this.addLeafColumns(e),e}getDisplayedLeafColumns(){let 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){let t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}addDisplayedLeafColumns(e){this.displayedChildren.forEach(t=>{rm(t)?e.push(t):rO(t)&&t.addDisplayedLeafColumns(e)})}addLeafColumns(e){this.children.forEach(t=>{rm(t)?e.push(t):rO(t)&&t.addLeafColumns(e)})}getChildren(){return this.children}getColumnGroupShow(){return this.providedColumnGroup.getColumnGroupShow()}getProvidedColumnGroup(){return this.providedColumnGroup}getPaddingLevel(){let e=this.getParent();return this.isPadding()&&e&&e.isPadding()?1+e.getPaddingLevel():0}calculateDisplayedColumns(){this.displayedChildren=[];let e=this;for(;null!=e&&e.isPadding();)e=e.getParent();if(!(e&&e.getProvidedColumnGroup().isExpandable())){this.displayedChildren=this.children,this.dispatchLocalEvent({type:"displayedChildrenChanged"});return}this.children.forEach(t=>{if(!rO(t)||t.displayedChildren&&t.displayedChildren.length)switch(t.getColumnGroupShow()){case"open":e.getProvidedColumnGroup().isExpanded()&&this.displayedChildren.push(t);break;case"closed":e.getProvidedColumnGroup().isExpanded()||this.displayedChildren.push(t);break;default:this.displayedChildren.push(t)}}),this.dispatchLocalEvent({type:"displayedChildrenChanged"})}},rG=class{constructor(){this.existingIds={}}getInstanceIdForKey(e){let t;let i=this.existingIds[e];return t="number"!=typeof i?0:i+1,this.existingIds[e]=t,t}},rz=class extends i2{constructor(){super(...arguments),this.beanName="visibleColsService",this.colsAndGroupsMap={},this.columnsLeft=[],this.columnsRight=[],this.columnsCenter=[],this.columns=[],this.bodyWidth=0,this.leftWidth=0,this.rightWidth=0,this.bodyWidthDirty=!0}wireBeans(e){this.columnModel=e.columnModel,this.columnSizeService=e.columnSizeService,this.columnViewportService=e.columnViewportService,this.eventDispatcher=e.columnEventDispatcher}refresh(e,t=!1){t||this.buildTrees(),this.updateOpenClosedVisibilityInColumnGroups(),this.columnsLeft=rV(this.treeLeft),this.columnsCenter=rV(this.treeCenter),this.columnsRight=rV(this.treeRight),this.joinColsAriaOrder(),this.joinCols(),this.setLeftValues(e),this.autoHeightCols=this.columns.filter(e=>e.isAutoHeight()),this.columnSizeService.refreshFlexedColumns(),this.updateBodyWidths(),this.columnViewportService.checkViewportColumns(!1),this.setFirstRightAndLastLeftPinned(e),this.eventDispatcher.visibleCols(e)}updateBodyWidths(){let e=i9(this.columnsCenter),t=i9(this.columnsLeft),i=i9(this.columnsRight);this.bodyWidthDirty=this.bodyWidth!==e,(this.bodyWidth!==e||this.leftWidth!==t||this.rightWidth!==i)&&(this.bodyWidth=e,this.leftWidth=t,this.rightWidth=i,this.eventService.dispatchEvent({type:"columnContainerWidthChanged"}),this.eventService.dispatchEvent({type:"displayedColumnsWidthChanged"}))}setLeftValues(e){this.setLeftValuesOfCols(e),this.setLeftValuesOfGroups()}setFirstRightAndLastLeftPinned(e){let t,i;this.gos.get("enableRtl")?(t=this.columnsLeft?this.columnsLeft[0]:null,i=this.columnsRight?iB(this.columnsRight):null):(t=this.columnsLeft?iB(this.columnsLeft):null,i=this.columnsRight?this.columnsRight[0]:null),this.columnModel.getCols().forEach(r=>{r.setLastLeftPinned(r===t,e),r.setFirstRightPinned(r===i,e)})}buildTrees(){let e=this.columnModel.getColsToShow(),t=e.filter(e=>"left"==e.getPinned()),i=e.filter(e=>"right"==e.getPinned()),r=e.filter(e=>"left"!=e.getPinned()&&"right"!=e.getPinned()),s=new rG;this.treeLeft=this.createGroups({columns:t,idCreator:s,pinned:"left",oldDisplayedGroups:this.treeLeft}),this.treeRight=this.createGroups({columns:i,idCreator:s,pinned:"right",oldDisplayedGroups:this.treeRight}),this.treeCenter=this.createGroups({columns:r,idCreator:s,pinned:null,oldDisplayedGroups:this.treeCenter}),this.updateColsAndGroupsMap()}clear(){this.columnsLeft=[],this.columnsRight=[],this.columnsCenter=[],this.columns=[],this.ariaOrderColumns=[]}joinColsAriaOrder(){let e=this.columnModel.getCols(),t=[],i=[],r=[];for(let s of e){let e=s.getPinned();e?!0===e||"left"===e?t.push(s):r.push(s):i.push(s)}this.ariaOrderColumns=t.concat(i).concat(r)}getAriaColIndex(e){let t;return t=rO(e)?e.getLeafColumns()[0]:e,this.ariaOrderColumns.indexOf(t)+1}getAllAutoHeightCols(){return this.autoHeightCols}setLeftValuesOfGroups(){[this.treeLeft,this.treeRight,this.treeCenter].forEach(e=>{e.forEach(e=>{rO(e)&&e.checkLeft()})})}setLeftValuesOfCols(e){if(!this.columnModel.getColDefCols())return;let t=this.columnModel.getCols().slice(0),i=this.gos.get("enableRtl");[this.columnsLeft,this.columnsRight,this.columnsCenter].forEach(r=>{if(i){let t=i9(r);r.forEach(i=>{t-=i.getActualWidth(),i.setLeft(t,e)})}else{let t=0;r.forEach(i=>{i.setLeft(t,e),t+=i.getActualWidth()})}!function(e,t){for(let i=0;i<t.length;i++)iz(e,t[i])}(t,r)}),t.forEach(t=>{t.setLeft(null,e)})}joinCols(){this.gos.get("enableRtl")?this.columns=this.columnsRight.concat(this.columnsCenter).concat(this.columnsLeft):this.columns=this.columnsLeft.concat(this.columnsCenter).concat(this.columnsRight)}getColsCenter(){return this.columnsCenter}getAllTrees(){return this.treeLeft&&this.treeRight&&this.treeCenter?this.treeLeft.concat(this.treeCenter).concat(this.treeRight):null}getTreeLeft(){return this.treeLeft}getTreeRight(){return this.treeRight}getTreeCenter(){return this.treeCenter}getAllCols(){return this.columns}isColDisplayed(e){return this.getAllCols().indexOf(e)>=0}getLeftColsForRow(e){return this.columnModel.isColSpanActive()?this.getColsForRow(e,this.columnsLeft):this.columnsLeft}getRightColsForRow(e){return this.columnModel.isColSpanActive()?this.getColsForRow(e,this.columnsRight):this.columnsRight}getColsForRow(e,t,i,r){let s=[],a=null;for(let o=0;o<t.length;o++){let n;let l=t[o],h=t.length-o,d=Math.min(l.getColSpan(e),h),c=[l];if(d>1){let e=d-1;for(let i=1;i<=e;i++)c.push(t[o+i]);o+=e}i?(n=!1,c.forEach(e=>{i(e)&&(n=!0)})):n=!0,n&&(0===s.length&&a&&r&&r(l)&&s.push(a),s.push(l)),a=l}return s}getBodyContainerWidth(){return this.bodyWidth}getContainerWidth(e){switch(e){case"left":return this.leftWidth;case"right":return this.rightWidth;default:return this.bodyWidth}}getCenterCols(){return this.columnsCenter}getLeftCols(){return this.columnsLeft}getRightCols(){return this.columnsRight}getColBefore(e){let t=this.getAllCols(),i=t.indexOf(e);return i>0?t[i-1]:null}getGroupAtDirection(e,t){let i=e.getProvidedColumnGroup().getLevel()+e.getPaddingLevel(),r=e.getDisplayedLeafColumns(),s="After"===t?iB(r):r[0],a=`getCol${t}`;for(;;){let t=this[a](s);if(!t)return null;let r=this.getColGroupAtLevel(t,i);if(r!==e)return r}}getColGroupAtLevel(e,t){let i=e.getParent();for(;!(i.getProvidedColumnGroup().getLevel()+i.getPaddingLevel()<=t);)i=i.getParent();return i}isPinningLeft(){return this.columnsLeft.length>0}isPinningRight(){return this.columnsRight.length>0}updateColsAndGroupsMap(){this.colsAndGroupsMap={};let e=e=>{this.colsAndGroupsMap[e.getUniqueId()]=e};r_(this.treeCenter,!1,e),r_(this.treeLeft,!1,e),r_(this.treeRight,!1,e)}isVisible(e){return this.colsAndGroupsMap[e.getUniqueId()]===e}updateOpenClosedVisibilityInColumnGroups(){r_(this.getAllTrees(),!1,e=>{rO(e)&&e.calculateDisplayedColumns()})}getFirstColumn(){let e=this.gos.get("enableRtl"),t=["getLeftCols","getCenterCols","getRightCols"];e&&t.reverse();for(let i=0;i<t.length;i++){let r=this[t[i]]();if(r.length)return e?iB(r):r[0]}return null}getColumnGroup(e,t){if(!e)return null;if(rO(e))return e;let i=this.getAllTrees(),r="number"==typeof t,s=null;return r_(i,!1,i=>{rO(i)&&(r?e===i.getGroupId()&&t===i.getPartId():e===i.getGroupId())&&(s=i)}),s}getColAfter(e){let t=this.getAllCols(),i=t.indexOf(e);return i<t.length-1?t[i+1]:null}isBodyWidthDirty(){return this.bodyWidthDirty}setBodyWidthDirty(){this.bodyWidthDirty=!0}getColsLeftWidth(){return i9(this.columnsLeft)}getDisplayedColumnsRightWidth(){return i9(this.columnsRight)}isColAtEdge(e,t){let i;let r=this.getAllCols();if(!r.length)return!1;let s="first"===t;if(rO(e)){let t=e.getDisplayedLeafColumns();if(!t.length)return!1;i=s?t[0]:iB(t)}else i=e;return(s?r[0]:iB(r))===i}createGroups(e){let{columns:t,idCreator:i,pinned:r,oldDisplayedGroups:s,isStandaloneStructure:a}=e,o=this.mapOldGroupsById(s),n=[],l=t;for(;l.length;){let e=l;l=[];let t=0,s=s=>{let h=t;t=s;let d=e[h],c=(rO(d)?d.getProvidedColumnGroup():d).getOriginalParent();if(null==c){for(let t=h;t<s;t++)n.push(e[t]);return}let u=this.createColGroup(c,i,o,r,a);for(let t=h;t<s;t++)u.addChild(e[t]);l.push(u)};for(let i=1;i<e.length;i++){let r=e[i],a=(rO(r)?r.getProvidedColumnGroup():r).getOriginalParent(),o=e[t];a!==(rO(o)?o.getProvidedColumnGroup():o).getOriginalParent()&&s(i)}t<e.length&&s(e.length)}return a||this.setupParentsIntoCols(n,null),n}createColGroup(e,t,i,r,s){let a=e.getGroupId(),o=t.getInstanceIdForKey(a),n=i[a+"_"+o];return n&&n.getProvidedColumnGroup()!==e&&(n=null),tY(n)?n.reset():(n=new rB(e,a,o,r),s||this.createBean(n)),n}mapOldGroupsById(e){let t={},i=e=>{e.forEach(e=>{rO(e)&&(t[e.getUniqueId()]=e,i(e.getChildren()))})};return e&&i(e),t}setupParentsIntoCols(e,t){e.forEach(e=>{e.setParent(t),rO(e)&&this.setupParentsIntoCols(e.getChildren(),e)})}};function r_(e,t,i){if(e)for(let r=0;r<e.length;r++){let s=e[r];rO(s)&&r_(t?s.getDisplayedChildren():s.getChildren(),t,i),i(s)}}function rV(e){let t=[];return r_(e,!0,e=>{rm(e)&&t.push(e)}),t}var rj=["columnEverythingChanged","newColumnsLoaded","columnPivotModeChanged","pivotMaxColumnsExceeded","columnRowGroupChanged","expandOrCollapseAll","columnPivotChanged","gridColumnsChanged","columnValueChanged","columnMoved","columnVisible","columnPinned","columnGroupOpened","columnResized","displayedColumnsChanged","virtualColumnsChanged","columnHeaderMouseOver","columnHeaderMouseLeave","columnHeaderClicked","columnHeaderContextMenu","asyncTransactionsFlushed","rowGroupOpened","rowDataUpdated","pinnedRowDataChanged","rangeSelectionChanged","cellSelectionChanged","chartCreated","chartRangeSelectionChanged","chartOptionsChanged","chartDestroyed","toolPanelVisibleChanged","toolPanelSizeChanged","modelUpdated","cutStart","cutEnd","pasteStart","pasteEnd","fillStart","fillEnd","cellSelectionDeleteStart","cellSelectionDeleteEnd","rangeDeleteStart","rangeDeleteEnd","undoStarted","undoEnded","redoStarted","redoEnded","cellClicked","cellDoubleClicked","cellMouseDown","cellContextMenu","cellValueChanged","cellEditRequest","rowValueChanged","headerFocused","cellFocused","rowSelected","selectionChanged","tooltipShow","tooltipHide","cellKeyDown","cellMouseOver","cellMouseOut","filterChanged","filterModified","filterOpened","advancedFilterBuilderVisibleChanged","sortChanged","virtualRowRemoved","rowClicked","rowDoubleClicked","gridReady","gridPreDestroyed","gridSizeChanged","viewportChanged","firstDataRendered","dragStarted","dragStopped","dragCancelled","rowEditingStarted","rowEditingStopped","cellEditingStarted","cellEditingStopped","bodyScroll","bodyScrollEnd","paginationChanged","componentStateChanged","storeRefreshed","stateUpdated","columnMenuVisibleChanged","contextMenuVisibleChanged","rowDragEnter","rowDragMove","rowDragLeave","rowDragEnd","rowDragCancel"],rH=[...rj,"scrollbarWidthChanged","keyShortcutChangedCellStart","keyShortcutChangedCellEnd","pinnedHeightChanged","cellFocusCleared","fullWidthRowFocused","checkboxChanged","heightScaleChanged","suppressMovableColumns","suppressMenuHide","suppressFieldDotNotation","columnPanelItemDragStart","columnPanelItemDragEnd","bodyHeightChanged","columnContainerWidthChanged","displayedColumnsWidthChanged","scrollVisibilityChanged","scrollGapChanged","columnHoverChanged","flashCells","paginationPixelOffsetChanged","displayedRowsChanged","leftPinnedWidthChanged","rightPinnedWidthChanged","rowContainerHeightChanged","headerHeightChanged","columnGroupHeaderHeightChanged","columnHeaderHeightChanged","gridStylesChanged","storeUpdated","filterDestroyed","rowDataUpdateStarted","rowCountReady","advancedFilterEnabledChanged","dataTypesInferred","fieldValueChanged","fieldPickerValueSelected","richSelectListRowSelected","sideBarUpdated","alignedGridScroll","alignedGridColumn","gridOptionsChanged","chartTitleEdit","recalculateRowBounds","stickyTopOffsetChanged","overlayExclusiveChanged"],rU={enableBrowserTooltips:!0,tooltipTrigger:!0,tooltipMouseTrack:!0,tooltipShowMode:!0,tooltipInteraction:!0,defaultColGroupDef:!0,suppressAutoSize:!0,skipHeaderOnAutoSize:!0,autoSizeStrategy:!0,components:!0,stopEditingWhenCellsLoseFocus:!0,undoRedoCellEditing:!0,undoRedoCellEditingLimit:!0,excelStyles:!0,cacheQuickFilter:!0,advancedFilterModel:!0,customChartThemes:!0,chartThemeOverrides:!0,chartToolPanelsDef:!0,loadingCellRendererSelector:!0,localeText:!0,keepDetailRows:!0,keepDetailRowsCount:!0,detailRowHeight:!0,detailRowAutoHeight:!0,tabIndex:!0,valueCache:!0,valueCacheNeverExpires:!0,enableCellExpressions:!0,suppressTouch:!0,suppressAsyncEvents:!0,suppressBrowserResizeObserver:!0,suppressPropertyNamesCheck:!0,debug:!0,dragAndDropImageComponent:!0,loadingOverlayComponent:!0,suppressLoadingOverlay:!0,noRowsOverlayComponent:!0,paginationPageSizeSelector:!0,paginateChildRows:!0,pivotPanelShow:!0,pivotSuppressAutoColumn:!0,suppressExpandablePivotGroups:!0,aggFuncs:!0,suppressAggFuncInHeader:!0,allowShowChangeAfterFilter:!0,ensureDomOrder:!0,enableRtl:!0,suppressColumnVirtualisation:!0,suppressMaxRenderedRowRestriction:!0,suppressRowVirtualisation:!0,rowDragText:!0,suppressGroupMaintainValueType:!0,groupLockGroupColumns:!0,rowGroupPanelSuppressSort:!0,suppressGroupRowsSticky:!0,rowModelType:!0,cacheOverflowSize:!0,infiniteInitialRowCount:!0,serverSideInitialRowCount:!0,suppressServerSideInfiniteScroll:!0,maxBlocksInCache:!0,maxConcurrentDatasourceRequests:!0,blockLoadDebounceMillis:!0,serverSideOnlyRefreshFilteredGroups:!0,serverSidePivotResultFieldSeparator:!0,viewportRowModelPageSize:!0,viewportRowModelBufferSize:!0,debounceVerticalScrollbar:!0,suppressAnimationFrame:!0,suppressPreventDefaultOnMouseWheel:!0,scrollbarWidth:!0,icons:!0,suppressRowTransform:!0,gridId:!0,enableGroupEdit:!0,initialState:!0,processUnpinnedColumns:!0,createChartContainer:!0,getLocaleText:!0,getRowId:!0,reactiveCustomComponents:!0,columnMenu:!0,suppressSetFilterByDefault:!0},rW=class{};rW.STRING_PROPERTIES=["rowSelection","overlayLoadingTemplate","overlayNoRowsTemplate","gridId","quickFilterText","rowModelType","editType","domLayout","clipboardDelimiter","rowGroupPanelShow","multiSortKey","pivotColumnGroupTotals","pivotRowTotals","pivotPanelShow","fillHandleDirection","groupDisplayType","treeDataDisplayType","colResizeDefault","tooltipTrigger","serverSidePivotResultFieldSeparator","columnMenu","tooltipShowMode","grandTotalRow"],rW.OBJECT_PROPERTIES=["components","rowStyle","context","autoGroupColumnDef","localeText","icons","datasource","dragAndDropImageComponentParams","serverSideDatasource","viewportDatasource","groupRowRendererParams","aggFuncs","fullWidthCellRendererParams","defaultColGroupDef","defaultColDef","defaultCsvExportParams","defaultExcelExportParams","columnTypes","rowClassRules","detailCellRendererParams","loadingCellRendererParams","loadingOverlayComponentParams","noRowsOverlayComponentParams","popupParent","statusBar","sideBar","theme","chartThemeOverrides","customChartThemes","chartToolPanelsDef","dataTypeDefinitions","advancedFilterModel","advancedFilterParent","advancedFilterBuilderParams","initialState","autoSizeStrategy","selection","selectionColumnDef"],rW.ARRAY_PROPERTIES=["sortingOrder","alignedGrids","rowData","columnDefs","excelStyles","pinnedTopRowData","pinnedBottomRowData","chartThemes","rowClass","paginationPageSizeSelector"],rW.NUMBER_PROPERTIES=["rowHeight","detailRowHeight","rowBuffer","headerHeight","groupHeaderHeight","groupLockGroupColumns","floatingFiltersHeight","pivotHeaderHeight","pivotGroupHeaderHeight","groupDefaultExpanded","pivotDefaultExpanded","viewportRowModelPageSize","viewportRowModelBufferSize","autoSizePadding","maxBlocksInCache","maxConcurrentDatasourceRequests","tooltipShowDelay","tooltipHideDelay","cacheOverflowSize","paginationPageSize","cacheBlockSize","infiniteInitialRowCount","serverSideInitialRowCount","scrollbarWidth","asyncTransactionWaitMillis","blockLoadDebounceMillis","keepDetailRowsCount","undoRedoCellEditingLimit","cellFlashDelay","cellFadeDelay","cellFlashDuration","cellFadeDuration","tabIndex","pivotMaxGeneratedColumns"],rW.BOOLEAN_PROPERTIES=["suppressMakeColumnVisibleAfterUnGroup","suppressRowClickSelection","suppressCellFocus","suppressHeaderFocus","suppressHorizontalScroll","groupSelectsChildren","alwaysShowHorizontalScroll","alwaysShowVerticalScroll","debug","enableBrowserTooltips","enableCellExpressions","groupIncludeTotalFooter","groupSuppressBlankHeader","suppressMenuHide","suppressRowDeselection","unSortIcon","suppressMultiSort","alwaysMultiSort","singleClickEdit","suppressLoadingOverlay","suppressNoRowsOverlay","suppressAutoSize","skipHeaderOnAutoSize","suppressColumnMoveAnimation","suppressMoveWhenColumnDragging","suppressMovableColumns","suppressFieldDotNotation","enableRangeSelection","enableRangeHandle","enableFillHandle","suppressClearOnFillReduction","deltaSort","suppressTouch","suppressAsyncEvents","allowContextMenuWithControlKey","suppressContextMenu","enableCellChangeFlash","suppressDragLeaveHidesColumns","suppressRowGroupHidesColumns","suppressMiddleClickScrolls","suppressPreventDefaultOnMouseWheel","suppressCopyRowsToClipboard","copyHeadersToClipboard","copyGroupHeadersToClipboard","pivotMode","suppressAggFuncInHeader","suppressColumnVirtualisation","alwaysAggregateAtRootLevel","suppressFocusAfterRefresh","functionsReadOnly","animateRows","groupSelectsFiltered","groupRemoveSingleChildren","groupRemoveLowestSingleChildren","enableRtl","suppressClickEdit","rowDragEntireRow","rowDragManaged","suppressRowDrag","suppressMoveWhenRowDragging","rowDragMultiRow","enableGroupEdit","embedFullWidthRows","suppressPaginationPanel","groupHideOpenParents","groupAllowUnbalanced","pagination","paginationAutoPageSize","suppressScrollOnNewData","suppressScrollWhenPopupsAreOpen","purgeClosedRowNodes","cacheQuickFilter","includeHiddenColumnsInQuickFilter","ensureDomOrder","accentedSort","suppressChangeDetection","valueCache","valueCacheNeverExpires","aggregateOnlyChangedColumns","suppressAnimationFrame","suppressExcelExport","suppressCsvExport","includeHiddenColumnsInAdvancedFilter","suppressMultiRangeSelection","enterNavigatesVerticallyAfterEdit","enterNavigatesVertically","suppressPropertyNamesCheck","rowMultiSelectWithClick","suppressRowHoverHighlight","suppressRowTransform","suppressClipboardPaste","suppressLastEmptyLineOnPaste","enableCharts","suppressMaintainUnsortedOrder","enableCellTextSelection","suppressBrowserResizeObserver","suppressMaxRenderedRowRestriction","excludeChildrenWhenTreeDataFiltering","tooltipMouseTrack","tooltipInteraction","keepDetailRows","paginateChildRows","preventDefaultOnContextMenu","undoRedoCellEditing","allowDragFromColumnsToolPanel","pivotSuppressAutoColumn","suppressExpandablePivotGroups","debounceVerticalScrollbar","detailRowAutoHeight","serverSideSortAllLevels","serverSideEnableClientSideSort","serverSideOnlyRefreshFilteredGroups","serverSideSortOnServer","serverSideFilterOnServer","suppressAggFilteredOnly","showOpenedGroup","suppressClipboardApi","suppressModelUpdateAfterUpdateTransaction","stopEditingWhenCellsLoseFocus","groupMaintainOrder","columnHoverHighlight","readOnlyEdit","suppressRowVirtualisation","enableCellEditingOnBackspace","resetRowDataOnUpdate","removePivotHeaderRowWhenSingleValueColumn","suppressCopySingleCellRanges","suppressGroupRowsSticky","suppressCutToClipboard","suppressServerSideInfiniteScroll","rowGroupPanelSuppressSort","allowShowChangeAfterFilter","enableAdvancedFilter","masterDetail","treeData","suppressGroupMaintainValueType","reactiveCustomComponents","applyQuickFilterBeforePivotOrAgg","suppressServerSideFullWidthLoadingRow","suppressAdvancedFilterEval","loading","maintainColumnOrder","enableStrictPivotColumnOrder","suppressSetFilterByDefault"],rW.OTHER_PROPERTIES=["suppressStickyTotalRow","loadThemeGoogleFonts"],rW.FUNCTION_PROPERTIES=["doesExternalFilterPass","processPivotResultColDef","processPivotResultColGroupDef","getBusinessKeyForNode","isRowSelectable","rowDragText","groupRowRenderer","dragAndDropImageComponent","fullWidthCellRenderer","loadingCellRenderer","loadingOverlayComponent","noRowsOverlayComponent","detailCellRenderer","quickFilterParser","quickFilterMatcher","getLocaleText","isExternalFilterPresent","getRowHeight","getRowClass","getRowStyle","getContextMenuItems","getMainMenuItems","processRowPostCreate","processCellForClipboard","getGroupRowAgg","isFullWidthRow","sendToClipboard","focusGridInnerElement","navigateToNextHeader","tabToNextHeader","navigateToNextCell","tabToNextCell","processCellFromClipboard","getDocument","postProcessPopup","getChildCount","getDataPath","isRowMaster","postSortRows","processHeaderForClipboard","processUnpinnedColumns","processGroupHeaderForClipboard","paginationNumberFormatter","processDataFromClipboard","getServerSideGroupKey","isServerSideGroup","createChartContainer","getChartToolbarItems","fillOperation","isApplyServerSideTransaction","getServerSideGroupLevelParams","isServerSideGroupOpenByDefault","isGroupOpenByDefault","initialGroupOrderComparator","groupIncludeFooter","loadingCellRendererSelector","getRowId","groupAggFiltering","chartMenuItems","groupTotalRow"],rW.ALL_PROPERTIES=[...rW.ARRAY_PROPERTIES,...rW.OBJECT_PROPERTIES,...rW.STRING_PROPERTIES,...rW.NUMBER_PROPERTIES,...rW.FUNCTION_PROPERTIES,...rW.BOOLEAN_PROPERTIES,...rW.OTHER_PROPERTIES];var r$=class{static getCallbackForEvent(e){return!e||e.length<2?e:"on"+e[0].toUpperCase()+e.substring(1)}};function rY(e,t,i){return i&&e.addDestroyFunc(()=>t.destroyBean(i)),i??e}r$.VUE_OMITTED_PROPERTY="AG-VUE-OMITTED-PROPERTY",r$.PUBLIC_EVENTS=rj,r$.EVENT_CALLBACKS=rH.map(e=>r$.getCallbackForEvent(e)),r$.BOOLEAN_PROPERTIES=rW.BOOLEAN_PROPERTIES,r$.ALL_PROPERTIES=rW.ALL_PROPERTIES,r$.ALL_PROPERTIES_AND_CALLBACKS=[...r$.ALL_PROPERTIES,...r$.EVENT_CALLBACKS],r$.ALL_PROPERTIES_AND_CALLBACKS_SET=new Set(r$.ALL_PROPERTIES_AND_CALLBACKS);var rK=class{constructor(e){this.cssClassStates={},this.getGui=e}addCssClass(e){let t=(e||"").split(" ");if(t.length>1){t.forEach(e=>this.addCssClass(e));return}if(!0!==this.cssClassStates[e]&&e.length){let t=this.getGui();t&&t.classList.add(e),this.cssClassStates[e]=!0}}removeCssClass(e){let t=(e||"").split(" ");if(t.length>1){t.forEach(e=>this.removeCssClass(e));return}if(!1!==this.cssClassStates[e]&&e.length){let t=this.getGui();t&&t.classList.remove(e),this.cssClassStates[e]=!1}}containsCssClass(e){let t=this.getGui();return!!t&&t.classList.contains(e)}addOrRemoveCssClass(e,t){if(e){if(e.indexOf(" ")>=0){let i=(e||"").split(" ");if(i.length>1){i.forEach(e=>this.addOrRemoveCssClass(e,t));return}}if(this.cssClassStates[e]!==t&&e.length){let i=this.getGui();i&&i.classList.toggle(e,t),this.cssClassStates[e]=t}}}};function rZ(e,t,i){null==i||"string"==typeof i&&""==i?rX(e,t):rq(e,t,i)}function rq(e,t,i){e.setAttribute(`aria-${t}`,i.toString())}function rX(e,t){e.removeAttribute(`aria-${t}`)}function rQ(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function rJ(e,t){rZ(e,"label",t)}function r0(e,t){rZ(e,"labelledby",t)}function r1(e,t){rZ(e,"describedby",t)}function r2(e,t){rZ(e,"level",t)}function r3(e,t){rZ(e,"disabled",t)}function r4(e,t){rZ(e,"hidden",t)}function r6(e,t){rZ(e,"activedescendant",t)}function r5(e,t){rq(e,"expanded",t)}function r8(e){rX(e,"expanded")}function r7(e,t){rq(e,"setsize",t)}function r9(e,t){rq(e,"posinset",t)}function se(e,t){rq(e,"rowindex",t)}function st(e,t){rq(e,"colindex",t)}function si(e,t){rq(e,"colspan",t)}function sr(e,t){rZ(e,"selected",t)}function ss(e,t){rZ(e,"controls",t.id),r0(t,e.id)}function sa(e,t){return void 0===t?e("ariaIndeterminate","indeterminate"):!0===t?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}function so(){return void 0===U&&(U=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),U}function sn(){if(void 0===W){if(so()){let e=navigator.userAgent.match(/version\/(\d+)/i);e&&(W=null!=e[1]?parseFloat(e[1]):0)}else W=0}return W}function sl(){if(void 0===$){let e=window;$=!!e.chrome&&(!!e.chrome.webstore||!!e.chrome.runtime)||/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor)}return $}function sh(){return void 0===Y&&(Y=/(firefox)/i.test(navigator.userAgent)),Y}function sd(){return void 0===K&&(K=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),K}function sc(){return void 0===Z&&(Z=/iPad|iPhone|iPod/.test(navigator.platform)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1),Z}function su(){return!so()||sn()>=15}function sp(e){if(!e)return null;let t=e.tabIndex,i=e.getAttribute("tabIndex");return -1!==t||null!==i&&(""!==i||sh())?t.toString():null}function sg(){let e=document.body,t=document.createElement("div");t.style.width=t.style.height="100px",t.style.opacity="0",t.style.overflow="scroll",t.style.msOverflowStyle="scrollbar",t.style.position="absolute",e.appendChild(t);let i=t.offsetWidth-t.clientWidth;0===i&&0===t.clientWidth&&(i=null),t.parentNode&&t.parentNode.removeChild(t),null!=i&&(X=i,q=0===i)}function sm(){return null==q&&sg(),q}function sf(e,t,i){let r=e.parentElement,s=r&&r.firstChild;for(;s;)t&&s.classList.toggle(t,s===e),i&&s.classList.toggle(i,s!==e),s=s.nextSibling}var sv="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function sy(e){let t=Element.prototype.matches||Element.prototype.msMatchesSelector,i=t.call(e,"input, select, button, textarea"),r=t.call(e,sv),s=sN(e);return i&&!r&&s}function sC(e,t,i={}){let{skipAriaHidden:r}=i;e.classList.toggle("ag-hidden",!t),r||r4(e,!t)}function sw(e,t,i={}){let{skipAriaHidden:r}=i;e.classList.toggle("ag-invisible",!t),r||r4(e,!t)}function sb(e,t){let i="disabled",r=t?e=>e.setAttribute(i,""):e=>e.removeAttribute(i);r(e),s$(e.querySelectorAll("input"),e=>r(e))}function sS(e,t,i){let r=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,"number"==typeof i){if(++r>i)break}else if(e===i)break}return!1}function sx(e){let{height:t,width:i,borderTopWidth:r,borderRightWidth:s,borderBottomWidth:a,borderLeftWidth:o,paddingTop:n,paddingRight:l,paddingBottom:h,paddingLeft:d,marginTop:c,marginRight:u,marginBottom:p,marginLeft:g,boxSizing:m}=window.getComputedStyle(e);return{height:parseFloat(t||"0"),width:parseFloat(i||"0"),borderTopWidth:parseFloat(r||"0"),borderRightWidth:parseFloat(s||"0"),borderBottomWidth:parseFloat(a||"0"),borderLeftWidth:parseFloat(o||"0"),paddingTop:parseFloat(n||"0"),paddingRight:parseFloat(l||"0"),paddingBottom:parseFloat(h||"0"),paddingLeft:parseFloat(d||"0"),marginTop:parseFloat(c||"0"),marginRight:parseFloat(u||"0"),marginBottom:parseFloat(p||"0"),marginLeft:parseFloat(g||"0"),boxSizing:m}}function sM(e){let t=sx(e);return"border-box"===t.boxSizing?t.height-t.paddingTop-t.paddingBottom:t.height}function sE(e){let t=sx(e);return"border-box"===t.boxSizing?t.width-t.paddingLeft-t.paddingRight:t.width}function sD(e){let{height:t,marginBottom:i,marginTop:r}=sx(e);return Math.floor(t+i+r)}function sI(e){let{width:t,marginLeft:i,marginRight:r}=sx(e);return Math.floor(t+i+r)}function sk(e){let t=e.getBoundingClientRect(),{borderTopWidth:i,borderLeftWidth:r,borderRightWidth:s,borderBottomWidth:a}=sx(e);return{top:t.top+(i||0),left:t.left+(r||0),right:t.right+(s||0),bottom:t.bottom+(a||0)}}function sT(){if("boolean"==typeof J)return J;let e=document.createElement("div");return e.style.direction="rtl",e.style.width="1px",e.style.height="1px",e.style.position="fixed",e.style.top="0px",e.style.overflow="hidden",e.dir="rtl",e.innerHTML=`<div style="width: 2px">
            <span style="display: inline-block; width: 1px"></span>
            <span style="display: inline-block; width: 1px"></span>
        </div>`,document.body.appendChild(e),e.scrollLeft=1,J=0===Math.floor(e.scrollLeft),document.body.removeChild(e),J}function sA(e,t){let i=e.scrollLeft;return t&&(i=Math.abs(i),sl()&&!sT()&&(i=e.scrollWidth-e.clientWidth-i)),i}function sR(e,t,i){i&&(sT()?t*=-1:(so()||sl())&&(t=e.scrollWidth-e.clientWidth-t)),e.scrollLeft=t}function sL(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)}function sP(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function sF(e){return!!e.offsetParent}function sN(e){return e.checkVisibility?e.checkVisibility({checkVisibilityCSS:!0}):!(!sF(e)||"visible"!==window.getComputedStyle(e).visibility)}function sO(e){let t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function sB(e,t,i){(!i||i.nextSibling!==t)&&(i?i.nextSibling?e.insertBefore(t,i.nextSibling):e.appendChild(t):e.firstChild&&e.firstChild!==t&&e.insertAdjacentElement("afterbegin",t))}function sG(e,t){for(let i=0;i<t.length;i++){let r=t[i],s=e.children[i];s!==r&&e.insertBefore(r,s)}}function sz(e,t){if(t)for(let[i,r]of Object.entries(t)){if(!i||!i.length||null==r)continue;let t=i.replace(/[A-Z]/g,e=>`-${e.toLocaleLowerCase()}`),s=r.toString(),a=s.replace(/\s*!important/g,""),o=a.length!=s.length?"important":void 0;e.style.setProperty(t,a,o)}}function s_(e,t){"flex"===t?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):sV(e,t)}function sV(e,t){t=sH(t),e.style.width=t.toString(),e.style.maxWidth=t.toString(),e.style.minWidth=t.toString()}function sj(e,t){t=sH(t),e.style.height=t.toString(),e.style.maxHeight=t.toString(),e.style.minHeight=t.toString()}function sH(e){return"number"==typeof e?`${e}px`:e}function sU(e){return e instanceof Node||e instanceof HTMLElement}function sW(e,t,i){null==i||""===i?e.removeAttribute(t):e.setAttribute(t,i.toString())}function s$(e,t){if(null!=e)for(let i=0;i<e.length;i++)t(e[i])}function sY(e,t){e.then(e=>{let i=e.getGui();null!=i&&("object"==typeof i?t.appendChild(i):t.innerHTML=i)})}var sK=class{constructor(e=0,t=1){this.nextValue=e,this.step=t}next(){let e=this.nextValue;return this.nextValue+=this.step,e}peek(){return this.nextValue}skip(e){this.nextValue+=e}},sZ=class e extends i2{constructor(e,t,i,r){super(),this.parentComp=e,this.tooltipShowDelayOverride=t,this.tooltipHideDelayOverride=i,this.shouldDisplayTooltip=r,this.interactionEnabled=!1,this.isInteractingWithTooltip=!1,this.state=0,this.tooltipInstanceCount=0,this.tooltipMouseTrack=!1}wireBeans(e){this.popupService=e.popupService,this.userComponentFactory=e.userComponentFactory}postConstruct(){this.gos.get("tooltipInteraction")&&(this.interactionEnabled=!0),this.tooltipTrigger=this.getTooltipTrigger(),this.tooltipMouseTrack=this.gos.get("tooltipMouseTrack");let e=this.parentComp.getGui();0===this.tooltipTrigger&&this.addManagedListeners(e,{mouseenter:this.onMouseEnter.bind(this),mouseleave:this.onMouseLeave.bind(this)}),1===this.tooltipTrigger&&this.addManagedListeners(e,{focusin:this.onFocusIn.bind(this),focusout:this.onFocusOut.bind(this)}),this.addManagedListeners(e,{mousemove:this.onMouseMove.bind(this)}),this.interactionEnabled||this.addManagedListeners(e,{mousedown:this.onMouseDown.bind(this),keydown:this.onKeyDown.bind(this)})}getGridOptionsTooltipDelay(e){let t=this.gos.get(e);return t<0&&tO(`${e} should not be lower than 0`),Math.max(200,t)}getTooltipDelay(e){return"show"===e?this.tooltipShowDelayOverride??this.getGridOptionsTooltipDelay("tooltipShowDelay"):this.tooltipHideDelayOverride??this.getGridOptionsTooltipDelay("tooltipHideDelay")}destroy(){this.setToDoNothing(),super.destroy()}getTooltipTrigger(){let e=this.gos.get("tooltipTrigger");return e&&"hover"!==e?1:0}onMouseEnter(t){this.interactionEnabled&&this.interactiveTooltipTimeoutId&&(this.unlockService(),this.startHideTimeout()),sc()||(e.isLocked?this.showTooltipTimeoutId=window.setTimeout(()=>{this.prepareToShowTooltip(t)},100):this.prepareToShowTooltip(t))}onMouseMove(e){this.lastMouseEvent&&(this.lastMouseEvent=e),this.tooltipMouseTrack&&2===this.state&&this.tooltipComp&&this.positionTooltip()}onMouseDown(){this.setToDoNothing()}onMouseLeave(){this.interactionEnabled?this.lockService():this.setToDoNothing()}onFocusIn(){this.prepareToShowTooltip()}onFocusOut(e){let t=e.relatedTarget,i=this.parentComp.getGui(),r=this.tooltipComp?.getGui();this.isInteractingWithTooltip||i.contains(t)||this.interactionEnabled&&r?.contains(t)||this.setToDoNothing()}onKeyDown(){this.setToDoNothing()}prepareToShowTooltip(t){if(0!=this.state||e.isLocked)return;let i=0;t&&(i=this.isLastTooltipHiddenRecently()?200:this.getTooltipDelay("show")),this.lastMouseEvent=t||null,this.showTooltipTimeoutId=window.setTimeout(this.showTooltip.bind(this),i),this.state=1}isLastTooltipHiddenRecently(){return new Date().getTime()-e.lastTooltipHideTime<1e3}setToDoNothing(e){e||2!==this.state||this.hideTooltip(),this.onBodyScrollEventCallback&&(this.onBodyScrollEventCallback(),this.onBodyScrollEventCallback=void 0),this.onColumnMovedEventCallback&&(this.onColumnMovedEventCallback(),this.onColumnMovedEventCallback=void 0),this.clearTimeouts(),this.state=0,this.lastMouseEvent=null}showTooltip(){let e={...this.parentComp.getTooltipParams()};if(!tY(e.value)||this.shouldDisplayTooltip&&!this.shouldDisplayTooltip()){this.setToDoNothing();return}this.state=2,this.tooltipInstanceCount++;let t=this.newTooltipComponentCallback.bind(this,this.tooltipInstanceCount);this.userComponentFactory.getTooltipCompDetails(e).newAgStackInstance().then(t)}hideTooltip(t){(t||!this.isInteractingWithTooltip)&&(this.tooltipComp&&(this.destroyTooltipComp(),e.lastTooltipHideTime=new Date().getTime()),this.eventService.dispatchEvent({type:"tooltipHide",parentGui:this.parentComp.getGui()}),t&&(this.isInteractingWithTooltip=!1),this.setToDoNothing(!0))}newTooltipComponentCallback(e,t){if(2!==this.state||this.tooltipInstanceCount!==e){this.destroyBean(t);return}let i=t.getGui();this.tooltipComp=t,i.classList.contains("ag-tooltip")||i.classList.add("ag-tooltip-custom"),0===this.tooltipTrigger&&i.classList.add("ag-tooltip-animate"),this.interactionEnabled&&i.classList.add("ag-tooltip-interactive");let r=this.localeService.getLocaleTextFunc(),s=this.popupService.addPopup({eChild:i,ariaLabel:r("ariaLabelTooltip","Tooltip")});if(s&&(this.tooltipPopupDestroyFunc=s.hideFunc),this.positionTooltip(),1===this.tooltipTrigger){let e=()=>this.setToDoNothing();[this.onBodyScrollEventCallback,this.onColumnMovedEventCallback]=this.addManagedEventListeners({bodyScroll:e,columnMoved:e})}this.interactionEnabled&&([this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener]=this.addManagedElementListeners(i,{mouseenter:this.onTooltipMouseEnter.bind(this),mouseleave:this.onTooltipMouseLeave.bind(this)}),1===this.tooltipTrigger&&([this.tooltipFocusInListener,this.tooltipFocusOutListener]=this.addManagedElementListeners(i,{focusin:this.onTooltipFocusIn.bind(this),focusout:this.onTooltipFocusOut.bind(this)}))),this.eventService.dispatchEvent({type:"tooltipShow",tooltipGui:i,parentGui:this.parentComp.getGui()}),this.startHideTimeout()}onTooltipMouseEnter(){this.isInteractingWithTooltip=!0,this.unlockService()}onTooltipMouseLeave(){this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,this.lockService())}onTooltipFocusIn(){this.isInteractingWithTooltip=!0}isTooltipFocused(){let e=this.tooltipComp?.getGui(),t=ih(this.gos);return!!e&&e.contains(t)}onTooltipFocusOut(e){let t=this.parentComp.getGui();this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,t.contains(e.relatedTarget)?this.startHideTimeout():this.hideTooltip())}positionTooltip(){let e={type:"tooltip",ePopup:this.tooltipComp.getGui(),nudgeY:18,skipObserver:this.tooltipMouseTrack};this.lastMouseEvent?this.popupService.positionPopupUnderMouseEvent({...e,mouseEvent:this.lastMouseEvent}):this.popupService.positionPopupByComponent({...e,eventSource:this.parentComp.getGui(),position:"under",keepWithinBounds:!0,nudgeY:5})}destroyTooltipComp(){this.tooltipComp.getGui().classList.add("ag-tooltip-hiding");let e=this.tooltipPopupDestroyFunc,t=this.tooltipComp,i=0===this.tooltipTrigger?1e3:0;window.setTimeout(()=>{e(),this.destroyBean(t)},i),this.clearTooltipListeners(),this.tooltipPopupDestroyFunc=void 0,this.tooltipComp=void 0}clearTooltipListeners(){[this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener,this.tooltipFocusInListener,this.tooltipFocusOutListener].forEach(e=>{e&&e()}),this.tooltipMouseEnterListener=this.tooltipMouseLeaveListener=this.tooltipFocusInListener=this.tooltipFocusOutListener=null}lockService(){e.isLocked=!0,this.interactiveTooltipTimeoutId=window.setTimeout(()=>{this.unlockService(),this.setToDoNothing()},100)}unlockService(){e.isLocked=!1,this.clearInteractiveTimeout()}startHideTimeout(){this.clearHideTimeout(),this.hideTooltipTimeoutId=window.setTimeout(this.hideTooltip.bind(this),this.getTooltipDelay("hide"))}clearShowTimeout(){this.showTooltipTimeoutId&&(window.clearTimeout(this.showTooltipTimeoutId),this.showTooltipTimeoutId=void 0)}clearHideTimeout(){this.hideTooltipTimeoutId&&(window.clearTimeout(this.hideTooltipTimeoutId),this.hideTooltipTimeoutId=void 0)}clearInteractiveTimeout(){this.interactiveTooltipTimeoutId&&(window.clearTimeout(this.interactiveTooltipTimeoutId),this.interactiveTooltipTimeoutId=void 0)}clearTimeouts(){this.clearShowTimeout(),this.clearHideTimeout(),this.clearInteractiveTimeout()}};sZ.isLocked=!1;var sq=class extends i2{constructor(e,t){super(),this.ctrl=e,t&&(this.beans=t)}wireBeans(e){this.beans=e}postConstruct(){this.refreshToolTip()}setBrowserTooltip(e){let t="title",i=this.ctrl.getGui();i&&(null!=e&&""!=e?i.setAttribute(t,e):i.removeAttribute(t))}updateTooltipText(){this.tooltip=this.ctrl.getTooltipValue()}createTooltipFeatureIfNeeded(){null==this.tooltipManager&&(this.tooltipManager=this.createBean(new sZ({getTooltipParams:()=>this.getTooltipParams(),getGui:()=>this.ctrl.getGui()},this.ctrl.getTooltipShowDelayOverride?.(),this.ctrl.getTooltipHideDelayOverride?.(),this.ctrl.shouldDisplayTooltip),this.beans.context))}refreshToolTip(){this.browserTooltips=this.beans.gos.get("enableBrowserTooltips"),this.updateTooltipText(),this.browserTooltips?(this.setBrowserTooltip(this.tooltip),this.tooltipManager&&(this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context))):(this.setBrowserTooltip(null),this.createTooltipFeatureIfNeeded())}getTooltipParams(){let e=this.ctrl,t=e.getColumn?.(),i=e.getColDef?.(),r=e.getRowNode?.();return{location:e.getLocation(),colDef:i,column:t,rowIndex:e.getRowIndex?.(),node:r,data:r?.data,value:this.getTooltipText(),valueFormatted:e.getValueFormatted?.(),hideTooltipCallback:()=>this.tooltipManager?.hideTooltip(!0)}}getTooltipText(){return this.tooltip}destroy(){this.tooltipManager&&(this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context)),super.destroy()}},sX=new sK,sQ=class e extends i2{constructor(e,t){super(),this.suppressDataRefValidation=!1,this.displayed=!0,this.visible=!0,this.compId=sX.next(),this.cssClassManager=new rK(()=>this.eGui),this.componentSelectors=new Map((t??[]).map(e=>[e.selector,e])),e&&this.setTemplate(e)}preWireBeans(e){super.preWireBeans(e)}preConstruct(){this.usingBrowserTooltips=this.gos.get("enableBrowserTooltips"),this.wireTemplate(this.getGui())}wireTemplate(e,t){e&&this.gos&&(this.applyElementsToComponent(e),this.createChildComponentsFromTags(e,t))}getCompId(){return this.compId}getTooltipParams(){return{value:this.tooltipText,location:"UNKNOWN"}}setTooltip(e){let{newTooltipText:t,showDelayOverride:i,hideDelayOverride:r,location:s,shouldDisplayTooltip:a}=e||{};this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature)),this.tooltipText!==t&&(this.tooltipText=t),null!=t&&(this.tooltipFeature=this.createBean(new sq({getTooltipValue:()=>this.tooltipText,getGui:()=>this.getGui(),getLocation:()=>s??"UNKNOWN",getColDef:e?.getColDef,getColumn:e?.getColumn,getTooltipShowDelayOverride:null!=i?()=>i:void 0,getTooltipHideDelayOverride:null!=r?()=>r:void 0,shouldDisplayTooltip:a})))}getDataRefAttribute(e){return e.getAttribute?e.getAttribute("data-ref"):null}applyElementsToComponent(e,t,i,r=null){if(void 0===t&&(t=this.getDataRefAttribute(e)),t){let s=this[t];if(null===s)this[t]=r??e;else{let e=i&&i[t];this.suppressDataRefValidation||e||tO(`Issue with data-ref: ${t} on ${this.constructor.name} with ${s}`)}}}createChildComponentsFromTags(e,t){(function(e){if(null==e)return[];let t=[];return s$(e,e=>t.push(e)),t})(e.childNodes).forEach(i=>{if(!(i instanceof HTMLElement))return;let r=this.createComponentFromElement(i,e=>{e.getGui()&&this.copyAttributesFromNode(i,e.getGui())},t);if(r){if(r.addItems&&i.children.length){this.createChildComponentsFromTags(i,t);let e=Array.prototype.slice.call(i.children);r.addItems(e)}this.swapComponentForNode(r,e,i)}else i.childNodes&&this.createChildComponentsFromTags(i,t)})}createComponentFromElement(t,i,r){let s=t.nodeName,a=this.getDataRefAttribute(t),o=0===s.indexOf("AG-"),n=o?this.componentSelectors.get(s):null,l=null;if(n){e.elementGettingCreated=t;let s=r&&a?r[a]:void 0;(l=new n.component(s)).setParentComponent(this),this.createBean(l,null,i)}else o&&tO(`Missing selector: ${s}`);return this.applyElementsToComponent(t,a,r,l),l}copyAttributesFromNode(e,t){!function(e,t){if(e)for(let i=0;i<e.length;i++){let r=e[i];t(r.name,r.value)}}(e.attributes,(e,i)=>t.setAttribute(e,i))}swapComponentForNode(e,t,i){let r=e.getGui();t.replaceChild(r,i),t.insertBefore(document.createComment(i.nodeName),r),this.addDestroyFunc(this.destroyBean.bind(this,e))}activateTabIndex(e){let t=this.gos.get("tabIndex");e||(e=[]),e.length||e.push(this.getGui()),e.forEach(e=>e.setAttribute("tabindex",t.toString()))}setTemplate(e,t,i){let r=sO(e);this.setTemplateFromElement(r,t,i)}setTemplateFromElement(e,t,i,r=!1){if(this.eGui=e,this.suppressDataRefValidation=r,t)for(let e=0;e<t.length;e++){let i=t[e];this.componentSelectors.set(i.selector,i)}this.wireTemplate(e,i)}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 i=t;return null==e?null:(i||(i=this.eGui),sU(e))?{element:e,parent:i}:{element:e.getGui(),parent:i}}prependChild(e,t){let{element:i,parent:r}=this.getContainerAndElement(e,t)||{};i&&r&&r.insertAdjacentElement("afterbegin",i)}appendChild(e,t){let{element:i,parent:r}=this.getContainerAndElement(e,t)||{};i&&r&&r.appendChild(i)}isDisplayed(){return this.displayed}setVisible(e,t={}){if(e!==this.visible){this.visible=e;let{skipAriaHidden:i}=t;sw(this.eGui,e,{skipAriaHidden:i})}}setDisplayed(e,t={}){if(e!==this.displayed){this.displayed=e;let{skipAriaHidden:i}=t;sC(this.eGui,e,{skipAriaHidden:i});let r={type:"displayChanged",visible:this.displayed};this.dispatchLocalEvent(r)}}destroy(){this.parentComponent&&(this.parentComponent=void 0),this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature)),super.destroy()}addGuiEventListener(e,t,i){this.eGui.addEventListener(e,t,i),this.addDestroyFunc(()=>this.eGui.removeEventListener(e,t))}addCssClass(e){this.cssClassManager.addCssClass(e)}removeCssClass(e){this.cssClassManager.removeCssClass(e)}containsCssClass(e){return this.cssClassManager.containsCssClass(e)}addOrRemoveCssClass(e,t){this.cssClassManager.addOrRemoveCssClass(e,t)}},sJ={columnGroupOpened:"expanded",columnGroupClosed:"contracted",columnSelectClosed:"tree-closed",columnSelectOpen:"tree-open",columnSelectIndeterminate:"tree-indeterminate",columnMovePin:"pin",columnMoveHide:"eye-slash",columnMoveMove:"arrows",columnMoveLeft:"left",columnMoveRight:"right",columnMoveGroup:"group",columnMoveValue:"aggregation",columnMovePivot:"pivot",dropNotAllowed:"not-allowed",groupContracted:"tree-closed",groupExpanded:"tree-open",setFilterGroupClosed:"tree-closed",setFilterGroupOpen:"tree-open",setFilterGroupIndeterminate:"tree-indeterminate",chart:"chart",close:"cross",cancel:"cancel",check:"tick",first:"first",previous:"previous",next:"next",last:"last",linked:"linked",unlinked:"unlinked",colorPicker:"color-picker",groupLoading:"loading",menu:"menu",menuAlt:"menu-alt",filter:"filter",columns:"columns",maximize:"maximize",minimize:"minimize",menuPin:"pin",menuValue:"aggregation",menuAddRowGroup:"group",menuRemoveRowGroup:"group",clipboardCopy:"copy",clipboardCut:"cut",clipboardPaste:"paste",pivotPanel:"pivot",rowGroupPanel:"group",valuePanel:"aggregation",columnDrag:"grip",rowDrag:"grip",save:"save",csvExport:"csv",excelExport:"excel",smallDown:"small-down",smallLeft:"small-left",smallRight:"small-right",smallUp:"small-up",sortAscending:"asc",sortDescending:"desc",sortUnSort:"none",advancedFilterBuilder:"group",advancedFilterBuilderDrag:"grip",advancedFilterBuilderInvalid:"not-allowed",advancedFilterBuilderMoveUp:"up",advancedFilterBuilderMoveDown:"down",advancedFilterBuilderAdd:"plus",advancedFilterBuilderRemove:"minus",chartsMenuEdit:"chart",chartsMenuAdvancedSettings:"settings",chartsMenuAdd:"plus",checkboxChecked:"checkbox-checked",checkboxIndeterminate:"checkbox-indeterminate",checkboxUnchecked:"checkbox-unchecked",radioButtonOn:"radio-button-on",radioButtonOff:"radio-button-off"},s0=(()=>{let e=new Set(Object.values(sJ));return e.add("eye"),e})();function s1(e,t,i){let r=s2(e,t,i);if(r){let{className:e}=r;if("string"==typeof e&&e.indexOf("ag-icon")>-1||"object"==typeof e&&e["ag-icon"])return r}let s=document.createElement("span");return s.appendChild(r),s}function s2(e,t,i,r){let s=null,a=i&&i.getColDef().icons;if(a&&(s=a[e]),t&&!s){let i=t.get("icons");i&&(s=i[e])}if(s){let e;if("function"==typeof s)e=s();else if("string"==typeof s)e=s;else throw Error("icon from grid options needs to be a string or a function");if("string"==typeof e)return sO(e);if(sU(e))return e;tO("iconRenderer should return back a string or a dom object")}else{let t=document.createElement("span"),i=sJ[e]??(s0.has(e)?e:void 0);return i||(r?i=e:(tO(`Did not find icon ${e}`),i="")),t.setAttribute("class",`ag-icon ag-icon-${i}`),t.setAttribute("unselectable","on"),rQ(t,"presentation"),t}}var s3=class extends sQ{constructor(){super(...arguments),this.dragSource=null,this.eIcon=null,this.eLabel=null}postConstruct(){let e=e=>s1(e,this.gos,null);this.dropIconMap={pinned:e("columnMovePin"),hide:e("columnMoveHide"),move:e("columnMoveMove"),left:e("columnMoveLeft"),right:e("columnMoveRight"),group:e("columnMoveGroup"),aggregate:e("columnMoveValue"),pivot:e("columnMovePivot"),notAllowed:e("dropNotAllowed")}}init(e){this.dragSource=e.dragSource,this.setTemplate(`<div class="ag-dnd-ghost ag-unselectable">
                <span data-ref="eIcon" class="ag-dnd-ghost-icon ag-shake-left-to-right"></span>
                <div data-ref="eLabel" class="ag-dnd-ghost-label"></div>
            </div>`)}destroy(){this.dragSource=null,super.destroy()}setIcon(e,t=!1){sL(this.eIcon);let i=null;e||(e=this.dragSource?.getDefaultIconName?this.dragSource?.getDefaultIconName():"notAllowed"),i=this.dropIconMap[e],this.eIcon.classList.toggle("ag-shake-left-to-right",t),!(i===this.dropIconMap.hide&&this.gos.get("suppressDragLeaveHidesColumns"))&&i&&this.eIcon.appendChild(i)}setLabel(e){this.eLabel.textContent=rL(e)}};function s4(e,t,i){return 0!==i&&Math.max(Math.abs(e.clientX-t.clientX),Math.abs(e.clientY-t.clientY))<=i}var s6=class{constructor(e,t=!1){this.DOUBLE_TAP_MILLIS=500,this.destroyFuncs=[],this.touching=!1,this.localEventService=new tR,this.eElement=e,this.preventMouseClick=t;let i=this.onTouchStart.bind(this),r=this.onTouchMove.bind(this),s=this.onTouchEnd.bind(this);this.eElement.addEventListener("touchstart",i,{passive:!0}),this.eElement.addEventListener("touchmove",r,{passive:!0}),this.eElement.addEventListener("touchend",s,{passive:!1}),this.destroyFuncs.push(()=>{this.eElement.removeEventListener("touchstart",i,{passive:!0}),this.eElement.removeEventListener("touchmove",r,{passive:!0}),this.eElement.removeEventListener("touchend",s,{passive:!1})})}getActiveTouch(e){for(let t=0;t<e.length;t++)if(e[t].identifier===this.touchStart.identifier)return e[t];return null}addEventListener(e,t){this.localEventService.addEventListener(e,t)}removeEventListener(e,t){this.localEventService.removeEventListener(e,t)}onTouchStart(e){if(this.touching)return;this.touchStart=e.touches[0],this.touching=!0,this.moved=!1;let t=this.touchStart;window.setTimeout(()=>{let i=this.touchStart===t;if(this.touching&&i&&!this.moved){this.moved=!0;let t={type:"longTap",touchStart:this.touchStart,touchEvent:e};this.localEventService.dispatchEvent(t)}},500)}onTouchMove(e){if(!this.touching)return;let t=this.getActiveTouch(e.touches);t&&(s4(t,this.touchStart,4)||(this.moved=!0))}onTouchEnd(e){if(this.touching){if(!this.moved){let e={type:"tap",touchStart:this.touchStart};this.localEventService.dispatchEvent(e),this.checkForDoubleTap()}this.preventMouseClick&&e.cancelable&&e.preventDefault(),this.touching=!1}}checkForDoubleTap(){let e=new Date().getTime();if(this.lastTapTime&&this.lastTapTime>0){if(e-this.lastTapTime>this.DOUBLE_TAP_MILLIS){let e={type:"doubleTap",touchStart:this.touchStart};this.localEventService.dispatchEvent(e),this.lastTapTime=null}else this.lastTapTime=e}else this.lastTapTime=e}destroy(){this.destroyFuncs.forEach(e=>e())}};function s5(e,t){return`<span data-ref="eSort${e}" class="ag-sort-indicator-icon ag-sort-${t} ag-hidden" aria-hidden="true"></span>`}var s8=`<span class="ag-sort-indicator-container">
        ${s5("Order","order")}
        ${s5("Asc","ascending-icon")}
        ${s5("Desc","descending-icon")}
        ${s5("Mixed","mixed-icon")}
        ${s5("None","none-icon")}
    </span>`,s7=class extends sQ{constructor(e){super(),this.eSortOrder=null,this.eSortAsc=null,this.eSortDesc=null,this.eSortMixed=null,this.eSortNone=null,e||this.setTemplate(s8)}wireBeans(e){this.sortController=e.sortController}attachCustomElements(e,t,i,r,s){this.eSortOrder=e,this.eSortAsc=t,this.eSortDesc=i,this.eSortMixed=r,this.eSortNone=s}setupSort(e,t=!1){if(this.column=e,this.suppressOrder=t,this.setupMultiSortIndicator(),!this.column.isSortable()&&!this.column.getColDef().showRowGroup)return;this.addInIcon("sortAscending",this.eSortAsc,e),this.addInIcon("sortDescending",this.eSortDesc,e),this.addInIcon("sortUnSort",this.eSortNone,e);let i=this.updateIcons.bind(this),r=this.onSortChanged.bind(this);this.addManagedPropertyListener("unSortIcon",i),this.addManagedEventListeners({newColumnsLoaded:i,sortChanged:r,columnRowGroupChanged:r}),this.onSortChanged()}addInIcon(e,t,i){if(null==t)return;let r=s2(e,this.gos,i);r&&t.appendChild(r)}onSortChanged(){this.updateIcons(),this.suppressOrder||this.updateSortOrder()}updateIcons(){let e=this.sortController.getDisplaySortForColumn(this.column);if(this.eSortAsc&&sC(this.eSortAsc,"asc"===e,{skipAriaHidden:!0}),this.eSortDesc&&sC(this.eSortDesc,"desc"===e,{skipAriaHidden:!0}),this.eSortNone){let t=!this.column.getColDef().unSortIcon&&!this.gos.get("unSortIcon");sC(this.eSortNone,!t&&null==e,{skipAriaHidden:!0})}}setupMultiSortIndicator(){this.addInIcon("sortUnSort",this.eSortMixed,this.column);let e=this.column.getColDef().showRowGroup;ip(this.gos)&&e&&(this.addManagedEventListeners({sortChanged:this.updateMultiSortIndicator.bind(this),columnRowGroupChanged:this.updateMultiSortIndicator.bind(this)}),this.updateMultiSortIndicator())}updateMultiSortIndicator(){if(this.eSortMixed){let e="mixed"===this.sortController.getDisplaySortForColumn(this.column);sC(this.eSortMixed,e,{skipAriaHidden:!0})}}updateSortOrder(){if(!this.eSortOrder)return;let e=this.sortController.getColumnsWithSortingOrdered(),t=this.sortController.getDisplaySortIndexForColumn(this.column)??-1,i=e.some(e=>this.sortController.getDisplaySortIndexForColumn(e)??!1);sC(this.eSortOrder,t>=0&&i,{skipAriaHidden:!0}),t>=0?this.eSortOrder.textContent=(t+1).toString():sL(this.eSortOrder)}},s9={selector:"AG-SORT-INDICATOR",component:s7},ae=`<div class="ag-cell-label-container" role="presentation">
        <span data-ref="eMenu" class="ag-header-icon ag-header-cell-menu-button" aria-hidden="true"></span>
        <span data-ref="eFilterButton" class="ag-header-icon ag-header-cell-filter-button" aria-hidden="true"></span>
        <div data-ref="eLabel" class="ag-header-cell-label" role="presentation">
            <span data-ref="eText" class="ag-header-cell-text"></span>
            <span data-ref="eFilter" class="ag-header-icon ag-header-label-icon ag-filter-icon" aria-hidden="true"></span>
            <ag-sort-indicator data-ref="eSortIndicator"></ag-sort-indicator>
        </div>
    </div>`,at=class extends sQ{constructor(){super(...arguments),this.eFilter=null,this.eFilterButton=null,this.eSortIndicator=null,this.eMenu=null,this.eLabel=null,this.eText=null,this.eSortOrder=null,this.eSortAsc=null,this.eSortDesc=null,this.eSortMixed=null,this.eSortNone=null,this.lastMovingChanged=0}wireBeans(e){this.sortController=e.sortController,this.menuService=e.menuService,this.funcColsService=e.funcColsService}destroy(){super.destroy()}refresh(e){let t=this.params;return this.params=e,this.workOutTemplate()==this.currentTemplate&&this.workOutShowMenu()==this.currentShowMenu&&this.workOutSort()==this.currentSort&&this.shouldSuppressMenuHide()==this.currentSuppressMenuHide&&t.enableFilterButton==e.enableFilterButton&&t.enableFilterIcon==e.enableFilterIcon&&(this.setDisplayName(e),!0)}workOutTemplate(){let e=this.params.template??ae;return e&&e.trim?e.trim():e}init(e){this.params=e,this.currentTemplate=this.workOutTemplate(),this.setTemplate(this.currentTemplate,[s9]),this.setupTap(),this.setMenu(),this.setupSort(),this.setupFilterIcon(),this.setupFilterButton(),this.setDisplayName(e)}setDisplayName(e){if(this.currentDisplayName!=e.displayName){this.currentDisplayName=e.displayName;let t=rL(this.currentDisplayName,!0);this.eText&&(this.eText.textContent=t)}}addInIcon(e,t,i){if(null==t)return;let r=s2(e,this.gos,i);r&&t.appendChild(r)}setupTap(){let{gos:e}=this;if(e.get("suppressTouch"))return;let t=new s6(this.getGui(),!0),i=this.shouldSuppressMenuHide(),r=i&&tY(this.eMenu),s=r?new s6(this.eMenu,!0):t;if(this.params.enableMenu&&this.addManagedListeners(s,{[r?"tap":"longTap"]:e=>this.params.showColumnMenuAfterMouseClick(e.touchStart)}),this.params.enableSorting&&this.addManagedListeners(t,{tap:e=>{let t=e.touchStart.target;i&&(this.eMenu?.contains(t)||this.eFilterButton?.contains(t))||this.sortController.progressSort(this.params.column,!1,"uiColumnSorted")}}),this.params.enableFilterButton){let e=new s6(this.eFilterButton,!0);this.addManagedListeners(e,{tap:()=>this.params.showFilter(this.eFilterButton)}),this.addDestroyFunc(()=>e.destroy())}this.addDestroyFunc(()=>t.destroy()),r&&this.addDestroyFunc(()=>s.destroy())}workOutShowMenu(){return this.params.enableMenu&&this.menuService.isHeaderMenuButtonEnabled()}shouldSuppressMenuHide(){return this.menuService.isHeaderMenuButtonAlwaysShowEnabled()}setMenu(){if(!this.eMenu)return;if(this.currentShowMenu=this.workOutShowMenu(),!this.currentShowMenu){sP(this.eMenu),this.eMenu=void 0;return}let e=this.menuService.isLegacyMenuEnabled();this.addInIcon(e?"menu":"menuAlt",this.eMenu,this.params.column),this.eMenu.classList.toggle("ag-header-menu-icon",!e),this.currentSuppressMenuHide=this.shouldSuppressMenuHide(),this.addManagedElementListeners(this.eMenu,{click:()=>this.params.showColumnMenu(this.eMenu)}),this.eMenu.classList.toggle("ag-header-menu-always-show",this.currentSuppressMenuHide)}onMenuKeyboardShortcut(e){let t=this.params.column,i=this.menuService.isLegacyMenuEnabled();if(e&&!i){if(this.menuService.isFilterMenuInHeaderEnabled(t))return this.params.showFilter(this.eFilterButton??this.eMenu??this.getGui()),!0}else if(this.params.enableMenu)return this.params.showColumnMenu(this.eMenu??this.eFilterButton??this.getGui()),!0;return!1}workOutSort(){return this.params.enableSorting}setupSort(){if(this.currentSort=this.params.enableSorting,this.eSortIndicator||(this.eSortIndicator=this.createBean(new s7(!0)),this.eSortIndicator.attachCustomElements(this.eSortOrder,this.eSortAsc,this.eSortDesc,this.eSortMixed,this.eSortNone)),this.eSortIndicator.setupSort(this.params.column),!this.currentSort)return;this.addManagedListeners(this.params.column,{movingChanged:()=>{this.lastMovingChanged=new Date().getTime()}}),this.eLabel&&this.addManagedElementListeners(this.eLabel,{click:e=>{let t=this.params.column.isMoving(),i=new Date().getTime()-this.lastMovingChanged<50;if(!(t||i)){let t="ctrl"===this.gos.get("multiSortKey")?e.ctrlKey||e.metaKey:e.shiftKey;this.params.progressSort(t)}}});let e=()=>{let e=this.params.column.getSort();if(this.addOrRemoveCssClass("ag-header-cell-sorted-asc","asc"===e),this.addOrRemoveCssClass("ag-header-cell-sorted-desc","desc"===e),this.addOrRemoveCssClass("ag-header-cell-sorted-none",!e),this.params.column.getColDef().showRowGroup){let e=this.funcColsService.getSourceColumnsForGroupColumn(this.params.column),t=e?.every(e=>this.params.column.getSort()==e.getSort());this.addOrRemoveCssClass("ag-header-cell-sorted-mixed",!t)}};this.addManagedEventListeners({sortChanged:e,columnRowGroupChanged:e})}setupFilterIcon(){this.eFilter&&this.configureFilter(this.params.enableFilterIcon,this.eFilter,this.onFilterChangedIcon.bind(this))}setupFilterButton(){this.eFilterButton&&(this.configureFilter(this.params.enableFilterButton,this.eFilterButton,this.onFilterChangedButton.bind(this))?this.addManagedElementListeners(this.eFilterButton,{click:()=>this.params.showFilter(this.eFilterButton)}):this.eFilterButton=void 0)}configureFilter(e,t,i){if(!e)return sP(t),!1;let r=this.params.column;return this.addInIcon("filter",t,r),this.addManagedListeners(r,{filterChanged:i}),i(),!0}onFilterChangedIcon(){let e=this.params.column.isFilterActive();sC(this.eFilter,e,{skipAriaHidden:!0})}onFilterChangedButton(){let e=this.params.column.isFilterActive();this.eFilterButton.classList.toggle("ag-filter-active",e)}getAnchorElementForMenu(e){return e?this.eFilterButton??this.eMenu??this.getGui():this.eMenu??this.eFilterButton??this.getGui()}},ai=class extends sQ{constructor(){super(`<div class="ag-header-group-cell-label" role="presentation">
            <span data-ref="agLabel" class="ag-header-group-text" role="presentation"></span>
            <span data-ref="agOpened" class="ag-header-icon ag-header-expand-icon ag-header-expand-icon-expanded"></span>
            <span data-ref="agClosed" class="ag-header-icon ag-header-expand-icon ag-header-expand-icon-collapsed"></span>
        </div>`),this.agOpened=null,this.agClosed=null,this.agLabel=null}wireBeans(e){this.columnModel=e.columnModel}destroy(){super.destroy()}init(e){this.params=e,this.checkWarnings(),this.setupLabel(),this.addGroupExpandIcon(),this.setupExpandIcons()}checkWarnings(){this.params.template&&tO("A template was provided for Header Group Comp - templates are only supported for Header Comps (not groups)")}setupExpandIcons(){this.addInIcon("columnGroupOpened",this.agOpened),this.addInIcon("columnGroupClosed",this.agClosed);let e=e=>{if(iQ(e))return;let t=!this.params.columnGroup.isExpanded();this.columnModel.setColumnGroupOpened(this.params.columnGroup.getProvidedColumnGroup(),t,"uiColumnExpanded")};this.addTouchAndClickListeners(this.agClosed,e),this.addTouchAndClickListeners(this.agOpened,e);let t=e=>{iX(e)};this.addManagedElementListeners(this.agClosed,{dblclick:t}),this.addManagedElementListeners(this.agOpened,{dblclick:t}),this.addManagedElementListeners(this.getGui(),{dblclick:e}),this.updateIconVisibility();let i=this.params.columnGroup.getProvidedColumnGroup(),r=this.updateIconVisibility.bind(this);this.addManagedListeners(i,{expandedChanged:r,expandableChanged:r})}addTouchAndClickListeners(e,t){let i=new s6(e,!0);this.addManagedListeners(i,{tap:t}),this.addDestroyFunc(()=>i.destroy()),this.addManagedElementListeners(e,{click:t})}updateIconVisibility(){if(this.params.columnGroup.isExpandable()){let e=this.params.columnGroup.isExpanded();sC(this.agOpened,e),sC(this.agClosed,!e)}else sC(this.agOpened,!1),sC(this.agClosed,!1)}addInIcon(e,t){let i=s2(e,this.gos,null);i&&t.appendChild(i)}addGroupExpandIcon(){if(!this.params.columnGroup.isExpandable()){sC(this.agOpened,!1),sC(this.agClosed,!1);return}}setupLabel(){let{displayName:e,columnGroup:t}=this.params;if(tY(e)){let t=rL(e,!0);this.agLabel.textContent=t}this.addOrRemoveCssClass("ag-sticky-label",!t.getColGroupDef()?.suppressStickyLabel)}},ar=class extends sQ{constructor(){super(),this.refreshCount=0;let e=document.createElement("span"),t=document.createElement("span");t.setAttribute("class","ag-value-change-delta");let i=document.createElement("span");i.setAttribute("class","ag-value-change-value"),e.appendChild(t),e.appendChild(i),this.setTemplateFromElement(e)}wireBeans(e){this.filterManager=e.filterManager}init(e){this.eValue=this.queryForHtmlElement(".ag-value-change-value"),this.eDelta=this.queryForHtmlElement(".ag-value-change-delta"),this.refresh(e,!0)}showDelta(e,t){let i=Math.abs(t),r=e.formatValue(i),s=tY(r)?r:i,a=t>=0;a?this.eDelta.textContent="↑"+s:this.eDelta.textContent="↓"+s,this.eDelta.classList.toggle("ag-value-change-delta-up",a),this.eDelta.classList.toggle("ag-value-change-delta-down",!a)}setTimerToRemoveDelta(){this.refreshCount++;let e=this.refreshCount;this.getFrameworkOverrides().wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.hideDeltaValue()},2e3)})}hideDeltaValue(){this.eValue.classList.remove("ag-value-change-value-highlight"),sL(this.eDelta)}refresh(e,t=!1){let i=e.value;if(i===this.lastValue||(tY(e.valueFormatted)?this.eValue.textContent=e.valueFormatted:tY(e.value)?this.eValue.textContent=i:sL(this.eValue),this.filterManager?.isSuppressFlashingCellsBecauseFiltering()))return!1;if("number"==typeof i&&"number"==typeof this.lastValue){let t=i-this.lastValue;this.showDelta(e,t)}return this.lastValue&&this.eValue.classList.add("ag-value-change-value-highlight"),t||this.setTimerToRemoveDelta(),this.lastValue=i,!0}},as=class extends sQ{constructor(){super(),this.refreshCount=0;let e=document.createElement("span"),t=document.createElement("span");t.setAttribute("class","ag-value-slide-current"),e.appendChild(t),this.setTemplateFromElement(e),this.eCurrent=this.queryForHtmlElement(".ag-value-slide-current")}wireBeans(e){this.filterManager=e.filterManager}init(e){this.refresh(e,!0)}addSlideAnimation(){this.refreshCount++;let e=this.refreshCount;this.ePrevious&&this.getGui().removeChild(this.ePrevious);let t=document.createElement("span");t.setAttribute("class","ag-value-slide-previous ag-value-slide-out"),this.ePrevious=t,this.ePrevious.textContent=this.eCurrent.textContent,this.getGui().insertBefore(this.ePrevious,this.eCurrent),this.getFrameworkOverrides().wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.ePrevious.classList.add("ag-value-slide-out-end")},50),window.setTimeout(()=>{e===this.refreshCount&&(this.getGui().removeChild(this.ePrevious),this.ePrevious=null)},3e3)})}refresh(e,t=!1){let i=e.value;return tK(i)&&(i=""),!(i===this.lastValue||this.filterManager?.isSuppressFlashingCellsBecauseFiltering())&&(t||this.addSlideAnimation(),this.lastValue=i,tY(e.valueFormatted)?this.eCurrent.textContent=e.valueFormatted:tY(e.value)?this.eCurrent.textContent=i:sL(this.eCurrent),!0)}},aa=class{};aa.BACKSPACE="Backspace",aa.TAB="Tab",aa.ENTER="Enter",aa.ESCAPE="Escape",aa.SPACE=" ",aa.LEFT="ArrowLeft",aa.UP="ArrowUp",aa.RIGHT="ArrowRight",aa.DOWN="ArrowDown",aa.DELETE="Delete",aa.F2="F2",aa.PAGE_UP="PageUp",aa.PAGE_DOWN="PageDown",aa.PAGE_HOME="Home",aa.PAGE_END="End",aa.A="KeyA",aa.C="KeyC",aa.D="KeyD",aa.V="KeyV",aa.X="KeyX",aa.Y="KeyY",aa.Z="KeyZ";var ao=class extends sQ{constructor(e,t,i){super(t,i),this.labelSeparator="",this.labelAlignment="left",this.disabled=!1,this.label="",this.config=e||{}}postConstruct(){this.addCssClass("ag-labeled"),this.eLabel.classList.add("ag-label");let{labelSeparator:e,label:t,labelWidth:i,labelAlignment:r,disabled:s}=this.config;null!=s&&this.setDisabled(s),null!=e&&this.setLabelSeparator(e),null!=t&&this.setLabel(t),null!=i&&this.setLabelWidth(i),this.setLabelAlignment(r||this.labelAlignment),this.refreshLabel()}refreshLabel(){sL(this.eLabel),"string"==typeof this.label?this.eLabel.innerText=this.label+this.labelSeparator:this.label&&this.eLabel.appendChild(this.label),""===this.label?(sC(this.eLabel,!1),rQ(this.eLabel,"presentation")):(sC(this.eLabel,!0),rQ(this.eLabel,null))}setLabelSeparator(e){return this.labelSeparator===e||(this.labelSeparator=e,null!=this.label&&this.refreshLabel()),this}getLabelId(){return this.eLabel.id=this.eLabel.id||`ag-${this.getCompId()}-label`,this.eLabel.id}getLabel(){return this.label}setLabel(e){return this.label===e||(this.label=e,this.refreshLabel()),this}setLabelAlignment(e){let t=this.getGui().classList;return t.toggle("ag-label-align-left","left"===e),t.toggle("ag-label-align-right","right"===e),t.toggle("ag-label-align-top","top"===e),this}setLabelEllipsis(e){return this.eLabel.classList.toggle("ag-label-ellipsis",e),this}setLabelWidth(e){return null==this.label||s_(this.eLabel,e),this}setDisabled(e){e=!!e;let t=this.getGui();return sb(t,e),t.classList.toggle("ag-disabled",e),this.disabled=e,this}isDisabled(){return!!this.disabled}},an=class extends ao{constructor(e,t,i,r){super(e,t,i),this.className=r}postConstruct(){super.postConstruct();let{width:e,value:t,onValueChange:i}=this.config;null!=e&&this.setWidth(e),null!=t&&this.setValue(t),null!=i&&this.onValueChange(i),this.className&&this.addCssClass(this.className),this.refreshAriaLabelledBy()}setLabel(e){return super.setLabel(e),this.refreshAriaLabelledBy(),this}refreshAriaLabelledBy(){let e=this.getAriaElement(),t=this.getLabelId(),i=this.getLabel();null==i||""==i||null!==e.getAttribute("aria-label")?r0(e,""):r0(e,t??"")}setAriaLabel(e){return rJ(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 sV(this.getGui(),e),this}getPreviousValue(){return this.previousValue}getValue(){return this.value}setValue(e,t){return this.value===e||(this.previousValue=this.value,this.value=e,t||this.dispatchLocalEvent({type:"fieldValueChanged"})),this}},al=class extends an{constructor(e,t,i="text",r="input"){super(e,e?.template??`
            <div role="presentation">
                <div data-ref="eLabel" class="ag-input-field-label"></div>
                <div data-ref="eWrapper" class="ag-wrapper ag-input-wrapper" role="presentation">
                    <${r} data-ref="eInput" class="ag-input-field-input"></${r}>
                </div>
            </div>`,[],t),this.inputType=i,this.displayFieldTag=r,this.eLabel=null,this.eWrapper=null,this.eInput=null}postConstruct(){super.postConstruct(),this.setInputType(),this.eLabel.classList.add(`${this.className}-label`),this.eWrapper.classList.add(`${this.className}-input-wrapper`),this.eInput.classList.add(`${this.className}-input`),this.addCssClass("ag-input-field"),this.eInput.id=this.eInput.id||`ag-${this.getCompId()}-input`;let{inputName:e,inputWidth:t}=this.config;null!=e&&this.setInputName(e),null!=t&&this.setInputWidth(t),this.addInputListeners(),this.activateTabIndex([this.eInput])}addInputListeners(){this.addManagedElementListeners(this.eInput,{input:e=>this.setValue(e.target.value)})}setInputType(){"input"===this.displayFieldTag&&this.eInput.setAttribute("type",this.inputType)}getInputElement(){return this.eInput}setInputWidth(e){return s_(this.eWrapper,e),this}setInputName(e){return this.getInputElement().setAttribute("name",e),this}getFocusableElement(){return this.eInput}setMaxLength(e){return this.eInput.maxLength=e,this}setInputPlaceholder(e){return sW(this.eInput,"placeholder",e),this}setInputAriaLabel(e){return rJ(this.eInput,e),this.refreshAriaLabelledBy(),this}setDisabled(e){return sb(this.eInput,e),super.setDisabled(e)}setAutoComplete(e){return!0===e?sW(this.eInput,"autocomplete",null):sW(this.eInput,"autocomplete","string"==typeof e?e:"off"),this}},ah=class extends al{constructor(e,t="ag-checkbox",i="checkbox"){super(e,t,i),this.labelAlignment="right",this.selected=!1,this.readOnly=!1,this.passive=!1}postConstruct(){super.postConstruct();let{readOnly:e,passive:t}=this.config;"boolean"==typeof e&&this.setReadOnly(e),"boolean"==typeof t&&this.setPassive(t)}addInputListeners(){this.addManagedElementListeners(this.eInput,{click:this.onCheckboxClick.bind(this)}),this.addManagedElementListeners(this.eLabel,{click:this.toggle.bind(this)})}getNextValue(){return void 0===this.selected||!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;let 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){return this.getInputElement().name=e,this}isSelected(){return this.selected}setSelected(e,t){this.isSelected()!==e&&(this.previousValue=this.isSelected(),e=this.selected="boolean"==typeof e?e:void 0,this.eInput.checked=e,this.eInput.indeterminate=void 0===e,t||this.dispatchChange(this.selected,this.previousValue))}dispatchChange(e,t,i){this.dispatchLocalEvent({type:"fieldValueChanged",selected:e,previousValue:t,event:i});let r=this.getInputElement();this.eventService.dispatchEvent({type:"checkboxChanged",id:r.id,name:r.name,selected:e,previousValue:t})}onCheckboxClick(e){if(this.passive||this.eInput.disabled)return;let t=this.isSelected(),i=this.selected=e.target.checked;this.refreshSelectedClass(i),this.dispatchChange(i,t,e)}refreshSelectedClass(e){this.eWrapper.classList.toggle("ag-checked",!0===e),this.eWrapper.classList.toggle("ag-indeterminate",null==e)}},ad={selector:"AG-CHECKBOX",component:ah},ac=class extends sQ{constructor(){super(`
            <div class="ag-cell-wrapper ag-checkbox-cell" role="presentation">
                <ag-checkbox role="presentation" data-ref="eCheckbox"></ag-checkbox>
            </div>`,[ad]),this.eCheckbox=null}init(e){this.refresh(e);let t=this.eCheckbox.getInputElement();t.setAttribute("tabindex","-1"),rZ(t,"live","polite"),this.addManagedListeners(t,{click:e=>{if(iX(e),this.eCheckbox.isDisabled())return;let t=this.eCheckbox.getValue();this.onCheckboxChanged(t)},dblclick:e=>{iX(e)}}),this.addManagedElementListeners(this.params.eGridCell,{keydown:e=>{if(e.key===aa.SPACE&&!this.eCheckbox.isDisabled()){this.params.eGridCell===ih(this.gos)&&this.eCheckbox.toggle();let t=this.eCheckbox.getValue();this.onCheckboxChanged(t),e.preventDefault()}}})}refresh(e){return this.params=e,this.updateCheckbox(e),!0}updateCheckbox(e){let t;let i=!0;if(e.node.group&&e.column){if("boolean"==typeof e.value)t=e.value;else{let r=e.column.getColId();r.startsWith(i8)?t=null==e.value||""===e.value?void 0:"true"===e.value:e.node.aggData&&void 0!==e.node.aggData[r]?t=e.value??void 0:i=!1}}else t=e.value??void 0;if(!i){this.eCheckbox.setDisplayed(!1);return}this.eCheckbox.setValue(t);let r=null!=e.disabled?e.disabled:!e.column?.isCellEditable(e.node);this.eCheckbox.setDisabled(r);let s=this.localeService.getLocaleTextFunc(),a=sa(s,t),o=r?a:`${s("ariaToggleCellValue","Press SPACE to toggle cell value")} (${a})`;this.eCheckbox.setInputAriaLabel(o)}onCheckboxChanged(e){let{column:t,node:i,value:r}=this.params;this.eventService.dispatchEvent({type:"cellEditingStarted",column:t,colDef:t?.getColDef(),data:i.data,node:i,rowIndex:i.rowIndex,rowPinned:i.rowPinned,value:r});let s=this.params.node.setDataValue(this.params.column,e,"edit");this.eventService.dispatchEvent({type:"cellEditingStopped",column:t,colDef:t?.getColDef(),data:i.data,node:i,rowIndex:i.rowIndex,rowPinned:i.rowPinned,value:r,oldValue:r,newValue:e,valueChanged:s}),s||this.updateCheckbox(this.params)}},au=class extends sQ{constructor(){super(`<div class="ag-loading">
            <span class="ag-loading-icon" data-ref="eLoadingIcon"></span>
            <span class="ag-loading-text" data-ref="eLoadingText"></span>
        </div>`),this.eLoadingIcon=null,this.eLoadingText=null}init(e){e.node.failedLoad?this.setupFailed():this.setupLoading()}setupFailed(){let e=this.localeService.getLocaleTextFunc();this.eLoadingText.innerText=e("loadingError","ERR")}setupLoading(){let e=s2("groupLoading",this.gos,null);e&&this.eLoadingIcon.appendChild(e);let t=this.localeService.getLocaleTextFunc();this.eLoadingText.innerText=t("loadingOoo","Loading")}refresh(e){return!1}destroy(){super.destroy()}},ap=class extends sQ{constructor(){super('<div class="ag-skeleton-container"></div>')}init(e){let t=`ag-cell-skeleton-renderer-${this.getCompId()}`;this.getGui().setAttribute("id",t),this.addDestroyFunc(()=>r0(e.eParentOfValue)),r0(e.eParentOfValue,t),e.node.failedLoad?this.setupFailed():this.setupLoading(e)}setupFailed(){let e=this.localeService.getLocaleTextFunc();this.getGui().innerText=e("loadingError","ERR");let t=e("ariaSkeletonCellLoadingFailed","Row failed to load");rJ(this.getGui(),t)}setupLoading(e){let t=ia(this.gos).createElement("div");t.classList.add("ag-skeleton-effect");let i=e.node.rowIndex;if(null!=i){let e=75+25*(i%2==0?Math.sin(i):Math.cos(i));t.style.width=`${e}%`}this.getGui().appendChild(t);let r=this.localeService.getLocaleTextFunc()("ariaSkeletonCellLoading","Row data is loading");rJ(this.getGui(),r)}refresh(e){return!1}destroy(){super.destroy()}},ag=class extends sQ{constructor(){super()}destroy(){super.destroy()}},am=class extends ag{init(){let e=t$(this.gos.get("overlayLoadingTemplate")?.trim());if(this.setTemplate(e??'<span aria-live="polite" aria-atomic="true" class="ag-overlay-loading-center"></span>'),!e){let e=this.localeService.getLocaleTextFunc();setTimeout(()=>{this.getGui().textContent=e("loadingOoo","Loading...")})}}},af=class extends ag{init(){let e=t$(this.gos.get("overlayNoRowsTemplate")?.trim());if(this.setTemplate(e??'<span class="ag-overlay-no-rows-center"></span>'),!e){let e=this.localeService.getLocaleTextFunc();setTimeout(()=>{this.getGui().textContent=e("noRowsToShow","No Rows To Show")})}}},av=class extends sQ{isPopup(){return!0}setParentComponent(e){e.addCssClass("ag-has-popup"),super.setParentComponent(e)}destroy(){let e=this.parentComponent;e&&e.isAlive()&&e.getGui().classList.remove("ag-has-popup"),super.destroy()}},ay=class extends av{constructor(){super('<div class="ag-tooltip"></div>')}init(e){let{value:t}=e;this.getGui().textContent=rL(t,!0)}};function aC(e,t,i,r){let s=t.map((t,i)=>({value:t,relevance:function(e,t){let i=e.replace(/\s/g,""),r=t.replace(/\s/g,""),s=0,a=-1;for(let e=0;e<i.length;e++){let t=r.indexOf(i[e],a+1);-1!==t&&(s+=100-100*(a=t)/1e4*100)}return s}(e.toLowerCase(),t.toLocaleLowerCase()),idx:i}));if(s.sort((e,t)=>t.relevance-e.relevance),i&&(s=s.filter(e=>0!==e.relevance)),s.length>0&&r&&r>0){let e=s[0].relevance*r;s=s.filter(t=>e-t.relevance<0)}let a=[],o=[];for(let e of s)a.push(e.value),o.push(e.idx);return{values:a,indices:o}}var aw=class extends i2{constructor(){super(...arguments),this.beanName="userComponentRegistry",this.agGridDefaults={agDragAndDropImage:s3,agColumnHeader:at,agColumnGroupHeader:ai,agSortIndicator:s7,agAnimateShowChangeCellRenderer:ar,agAnimateSlideCellRenderer:as,agLoadingCellRenderer:au,agSkeletonCellRenderer:ap,agCheckboxCellRenderer:ac,agLoadingOverlay:am,agNoRowsOverlay:af,agTooltipComponent:ay},this.agGridDefaultParams={},this.enterpriseAgDefaultCompsModule={agSetColumnFilter:"@ag-grid-enterprise/set-filter",agSetColumnFloatingFilter:"@ag-grid-enterprise/set-filter",agMultiColumnFilter:"@ag-grid-enterprise/multi-filter",agMultiColumnFloatingFilter:"@ag-grid-enterprise/multi-filter",agGroupColumnFilter:"@ag-grid-enterprise/row-grouping",agGroupColumnFloatingFilter:"@ag-grid-enterprise/row-grouping",agGroupCellRenderer:"@ag-grid-enterprise/row-grouping",agGroupRowRenderer:"@ag-grid-enterprise/row-grouping",agRichSelect:"@ag-grid-enterprise/rich-select",agRichSelectCellEditor:"@ag-grid-enterprise/rich-select",agDetailCellRenderer:"@ag-grid-enterprise/master-detail",agSparklineCellRenderer:"@ag-grid-enterprise/sparklines"},this.jsComps={}}postConstruct(){let e=this.gos.get("components");null!=e&&ro(e,(e,t)=>this.registerJsComponent(e,t))}registerDefaultComponent(e,t,i){this.agGridDefaults[e]=t,i&&(this.agGridDefaultParams[e]=i)}registerJsComponent(e,t){this.jsComps[e]=t}retrieve(e,t){let i=(e,t,i)=>({componentFromFramework:t,component:e,params:i}),r=this.getFrameworkOverrides().frameworkComponent(t,this.gos.get("components"));if(null!=r)return i(r,!0);let s=this.jsComps[t];if(s){let e=this.getFrameworkOverrides().isFrameworkComponent(s);return i(s,e)}let a=this.agGridDefaults[t];if(a)return i(a,!1,this.agGridDefaultParams[t]);let o=this.enterpriseAgDefaultCompsModule[t];return o?this.gos.assertModuleRegistered(o,`AG Grid '${e}' component: ${t}`):tF(()=>{this.warnAboutMissingComponent(e,t)},"MissingComp"+t),null}warnAboutMissingComponent(e,t){let i=aC(t,[...Object.keys(this.agGridDefaults).filter(e=>!["agCellEditor","agGroupRowRenderer","agSortIndicator"].includes(e)),...Object.keys(this.jsComps)],!0,.8).values;tO(`Could not find '${t}' component. It was configured as "${e}: '${t}'" but it wasn't found in the list of registered components.`),i.length>0&&tO(`         Did you mean: [${i.slice(0,3)}]?`),tO(`If using a custom component check it has been registered as described in: ${this.getFrameworkOverrides().getDocLink("components/")}`)}},ab=class e{constructor(e){this.status=0,this.resolution=null,this.waiters=[],e(e=>this.onDone(e),e=>this.onReject(e))}static all(t){return t.length?new e(e=>{let i=t.length,r=Array(i);t.forEach((t,s)=>{t.then(t=>{r[s]=t,0==--i&&e(r)})})}):e.resolve()}static resolve(t=null){return new e(e=>e(t))}then(t){return new e(e=>{1===this.status?e(t(this.resolution)):this.waiters.push(i=>e(t(i)))})}onDone(e){this.status=1,this.resolution=e,this.waiters.forEach(t=>t(e))}onReject(e){}},aS={propertyName:"dateComponent",cellRenderer:!1},ax={propertyName:"dragAndDropImageComponent",cellRenderer:!1},aM={propertyName:"headerComponent",cellRenderer:!1},aE={propertyName:"headerGroupComponent",cellRenderer:!1},aD={propertyName:"cellRenderer",cellRenderer:!0},aI={propertyName:"cellRenderer",cellRenderer:!1},ak={propertyName:"loadingCellRenderer",cellRenderer:!0},aT={propertyName:"cellEditor",cellRenderer:!1},aA={propertyName:"innerRenderer",cellRenderer:!0},aR={propertyName:"loadingOverlayComponent",cellRenderer:!1},aL={propertyName:"noRowsOverlayComponent",cellRenderer:!1},aP={propertyName:"tooltipComponent",cellRenderer:!1},aF={propertyName:"filter",cellRenderer:!1},aN={propertyName:"floatingFilterComponent",cellRenderer:!1},aO={propertyName:"toolPanel",cellRenderer:!1},aB={propertyName:"statusPanel",cellRenderer:!1},aG={propertyName:"fullWidthCellRenderer",cellRenderer:!0},az={propertyName:"loadingCellRenderer",cellRenderer:!0},a_={propertyName:"groupRowRenderer",cellRenderer:!0},aV={propertyName:"detailCellRenderer",cellRenderer:!0},aj={propertyName:"menuItem",cellRenderer:!1},aH=class e extends i2{constructor(){super(...arguments),this.beanName="userComponentFactory"}wireBeans(e){this.agComponentUtils=e.agComponentUtils,this.componentMetadataProvider=e.componentMetadataProvider,this.userComponentRegistry=e.userComponentRegistry,this.frameworkComponentWrapper=e.frameworkComponentWrapper,this.gridOptions=e.gridOptions}getDragAndDropImageCompDetails(e){return this.getCompDetails(this.gridOptions,ax,"agDragAndDropImage",e,!0)}getHeaderCompDetails(e,t){return this.getCompDetails(e,aM,"agColumnHeader",t)}getHeaderGroupCompDetails(e){let t=e.columnGroup.getColGroupDef();return this.getCompDetails(t,aE,"agColumnGroupHeader",e)}getFullWidthCellRendererDetails(e){return this.getCompDetails(this.gridOptions,aG,null,e,!0)}getFullWidthLoadingCellRendererDetails(e){return this.getCompDetails(this.gridOptions,az,"agLoadingCellRenderer",e,!0)}getFullWidthGroupCellRendererDetails(e){return this.getCompDetails(this.gridOptions,a_,"agGroupRowRenderer",e,!0)}getFullWidthDetailCellRendererDetails(e){return this.getCompDetails(this.gridOptions,aV,"agDetailCellRenderer",e,!0)}getInnerRendererDetails(e,t){return this.getCompDetails(e,aA,null,t)}getFullWidthGroupRowInnerCellRenderer(e,t){return this.getCompDetails(e,aA,null,t)}getCellRendererDetails(e,t){return this.getCompDetails(e,aD,null,t)}getEditorRendererDetails(e,t){return this.getCompDetails(e,aI,null,t)}getLoadingCellRendererDetails(e,t){return this.getCompDetails(e,ak,"agSkeletonCellRenderer",t,!0)}getCellEditorDetails(e,t){return this.getCompDetails(e,aT,"agCellEditor",t,!0)}getFilterDetails(e,t,i){return this.getCompDetails(e,aF,i,t,!0)}getDateCompDetails(e){return this.getCompDetails(this.gridOptions,aS,"agDateInput",e,!0)}getLoadingOverlayCompDetails(e){return this.getCompDetails(this.gridOptions,aR,"agLoadingOverlay",e,!0)}getNoRowsOverlayCompDetails(e){return this.getCompDetails(this.gridOptions,aL,"agNoRowsOverlay",e,!0)}getTooltipCompDetails(e){return this.getCompDetails(e.colDef,aP,"agTooltipComponent",e,!0)}getSetFilterCellRendererDetails(e,t){return this.getCompDetails(e,aD,null,t)}getFloatingFilterCompDetails(e,t,i){return this.getCompDetails(e,aN,i,t)}getToolPanelCompDetails(e,t){return this.getCompDetails(e,aO,null,t,!0)}getStatusPanelCompDetails(e,t){return this.getCompDetails(e,aB,null,t,!0)}getMenuItemCompDetails(e,t){return this.getCompDetails(e,aj,"agMenuItem",t,!0)}getCompDetails(t,i,r,s,a=!1){let o;let{propertyName:n,cellRenderer:l}=i,{compName:h,jsComp:d,fwComp:c,paramsFromSelector:u,popupFromSelector:p,popupPositionFromSelector:g}=e.getCompKeys(this.frameworkOverrides,t,i,s),m=e=>{let t=this.userComponentRegistry.retrieve(n,e);t&&(d=t.componentFromFramework?void 0:t.component,c=t.componentFromFramework?t.component:void 0,o=t.params)};if(null!=h&&m(h),null==d&&null==c&&null!=r&&m(r),d&&l&&!this.agComponentUtils.doesImplementIComponent(d)&&(d=this.agComponentUtils.adaptFunction(n,d)),!d&&!c){a&&tB(`Could not find component ${h}, did you forget to configure this component?`);return}let f=this.mergeParamsWithApplicationProvidedParams(t,i,s,u,o),v=null==d,y=d||c;return{componentFromFramework:v,componentClass:y,params:f,type:i,popupFromSelector:p,popupPositionFromSelector:g,newAgStackInstance:()=>this.newAgStackInstance(y,v,f,i)}}static getCompKeys(e,t,i,r){let s,a,o,n,l,h;let{propertyName:d}=i;if(t){let i=t[d+"Selector"],c=i?i(r):null,u=t=>{"string"==typeof t?s=t:null!=t&&!0!==t&&(e.isFrameworkComponent(t)?o=t:a=t)};c?(u(c.component),n=c.params,l=c.popup,h=c.popupPosition):u(t[d])}return{compName:s,jsComp:a,fwComp:o,paramsFromSelector:n,popupFromSelector:l,popupPositionFromSelector:h}}newAgStackInstance(e,t,i,r){let s;let a=r.propertyName;if(t){let t=this.componentMetadataProvider.retrieve(a);s=this.frameworkComponentWrapper.wrap(e,t.mandatoryMethodList,t.optionalMethodList,r)}else s=new e;let o=this.initComponent(s,i);return null==o?ab.resolve(s):o.then(()=>s)}mergeParamsWithApplicationProvidedParams(e,t,i,r=null,s){let a=this.gos.getGridCommonParams();rd(a,i),s&&rd(a,s);let o=e&&e[t.propertyName+"Params"];return"function"==typeof o?rd(a,o(i)):"object"==typeof o&&rd(a,o),rd(a,r),a}initComponent(e,t){if(this.createBean(e),null!=e.init)return e.init(t)}};function aU(e){return null!=e&&null!=e.getFrameworkComponentInstance?e.getFrameworkComponentInstance():e}var aW=class e{static register(t){e.__register(t,!0,void 0)}static registerModules(t){e.__registerModules(t,!0,void 0)}static __register(t,i,r){e.runVersionChecks(t),void 0!==r?(e.areGridScopedModules=!0,void 0===e.gridModulesMap[r]&&(e.gridModulesMap[r]={}),e.gridModulesMap[r][t.moduleName]=t):e.globalModulesMap[t.moduleName]=t,e.setModuleBased(i)}static __unRegisterGridModules(t){delete e.gridModulesMap[t]}static __registerModules(t,i,r){e.setModuleBased(i),t&&t.forEach(t=>e.__register(t,i,r))}static isValidModuleVersion(t){let[i,r]=t.version.split(".")||[],[s,a]=e.currentModuleVersion.split(".")||[];return i===s&&r===a}static runVersionChecks(t){e.currentModuleVersion||(e.currentModuleVersion=t.version);let i=e=>`You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. ${e} Please update all modules to the same version.`;if(t.version?e.isValidModuleVersion(t)||tB(i(`'${t.moduleName}' is version ${t.version} but the other modules are version ${e.currentModuleVersion}.`)):tB(i(`'${t.moduleName}' is incompatible.`)),t.validate){let e=t.validate();e.isValid||tB(`${e.message}`)}}static setModuleBased(t){void 0===e.moduleBased?e.moduleBased=t:e.moduleBased!==t&&(tB("AG Grid: You are mixing modules (i.e. @ag-grid-community/core) and packages (ag-grid-community) - you can only use one or the other of these mechanisms."),tB("Please see https://www.ag-grid.com/javascript-grid/modules/ for more information."))}static __setIsBundled(){e.isBundled=!0}static __assertRegistered(t,i,r){let s;if(this.__isRegistered(t,r))return!0;if(e.isBundled)s=`AG Grid: unable to use ${i} as 'ag-grid-enterprise' has not been loaded. Check you are using the Enterprise bundle:
        
        <script src="https://cdn.jsdelivr.net/npm/ag-grid-enterprise@AG_GRID_VERSION/dist/ag-grid-enterprise.min.js"></script>
        
For more info see: https://ag-grid.com/javascript-data-grid/getting-started/#getting-started-with-ag-grid-enterprise`;else if(e.moduleBased||void 0===e.moduleBased){let a=Object.entries(tL).find(([e,i])=>i===t)?.[0];s=`AG Grid: unable to use ${i} as the ${a} is not registered${e.areGridScopedModules?` for gridId: ${r}`:""}. Check if you have registered the module:
           
    import { ModuleRegistry } from '@ag-grid-community/core';
    import { ${a} } from '${t}';
    
    ModuleRegistry.registerModules([ ${a} ]);

For more info see: https://www.ag-grid.com/javascript-grid/modules/`}else s=`AG Grid: unable to use ${i} as package 'ag-grid-enterprise' has not been imported. Check that you have imported the package:
            
    import 'ag-grid-enterprise';`;return tB(s),!1}static __isRegistered(t,i){return!!e.globalModulesMap[t]||!!e.gridModulesMap[i]?.[t]}static __getRegisteredModules(t){return[...t2(e.globalModulesMap),...t2(e.gridModulesMap[t]||{})]}static __getGridRegisteredModules(t){return t2(e.gridModulesMap[t]??{})||[]}static __isPackageBased(){return!e.moduleBased}};aW.globalModulesMap={},aW.gridModulesMap={},aW.areGridScopedModules=!1;var a$=class{constructor(e){if(this.beans={},this.createdBeans=[],this.destroyed=!1,!e||!e.beanClasses)return;this.beanDestroyComparator=e.beanDestroyComparator,this.init(e)}init(e){Object.entries(e.providedBeanInstances).forEach(([e,t])=>{this.beans[e]=t}),e.beanClasses.forEach(e=>{let t=new e;t.beanName?this.beans[t.beanName]=t:console.error(`Bean ${e.name} is missing beanName`),this.createdBeans.push(t)}),e.derivedBeans?.forEach(e=>{let{beanName:t,bean:i}=e(this);this.beans[t]=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){if(!e)throw Error("Can't wire to bean since it is null");return this.initBeans([e],t),e}initBeans(e,t){e.forEach(e=>{e.preWireBeans?.(this.beans),e.wireBeans?.(this.beans)}),e.forEach(e=>e.preConstruct?.()),t&&e.forEach(t),e.forEach(e=>e.postConstruct?.())}getBeans(){return this.beans}getBean(e){return this.beans[e]}destroy(){if(this.destroyed)return;this.destroyed=!0;let e=this.getBeanInstances();this.beanDestroyComparator&&e.sort(this.beanDestroyComparator),this.destroyBeans(e),this.beans={},this.createdBeans=[]}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}},aY=class extends a${init(e){this.gridId=e.gridId,this.beans.context=this,super.init(e)}destroy(){super.destroy(),aW.__unRegisterGridModules(this.gridId)}getGridId(){return this.gridId}},aK=((o=aK||{})[o.SINGLE_SHEET=0]="SINGLE_SHEET",o[o.MULTI_SHEET=1]="MULTI_SHEET",o),aZ=((n=aZ||{})[n.Up=0]="Up",n[n.Down=1]="Down",n),aq=((l=aq||{})[l.Left=0]="Left",l[l.Right=1]="Right",l),aX=((h=aX||{})[h.ToolPanel=0]="ToolPanel",h[h.HeaderCell=1]="HeaderCell",h[h.RowDrag=2]="RowDrag",h[h.ChartPanel=3]="ChartPanel",h[h.AdvancedFilterBuilder=4]="AdvancedFilterBuilder",h),aQ=class extends i2{constructor(){super(...arguments),this.beanName="dragAndDropService",this.dragSourceAndParamsList=[],this.dropTargets=[]}wireBeans(e){this.ctrlsService=e.ctrlsService,this.dragService=e.dragService,this.mouseEventService=e.mouseEventService,this.environment=e.environment,this.userComponentFactory=e.userComponentFactory}addDragSource(e,t=!1){let i={eElement:e.eElement,dragStartPixels:e.dragStartPixels,onDragStart:this.onDragStart.bind(this,e),onDragStop:this.onDragStop.bind(this),onDragging:this.onDragging.bind(this),onDragCancel:this.onDragCancel.bind(this),includeTouch:t};this.dragSourceAndParamsList.push({params:i,dragSource:e}),this.dragService.addDragSource(i)}getDragAndDropImageComponent(){let{dragAndDropImageComp:e}=this;return e&&e.comp?e.comp:null}removeDragSource(e){let t=this.dragSourceAndParamsList.find(t=>t.dragSource===e);t&&(this.dragService.removeDragSource(t.params),i_(this.dragSourceAndParamsList,t))}destroy(){this.dragSourceAndParamsList.forEach(e=>this.dragService.removeDragSource(e.params)),this.dragSourceAndParamsList.length=0,this.dropTargets.length=0,this.clearDragAndDropProperties(),super.destroy()}nudge(){this.dragging&&this.onDragging(this.eventLastTime,!0)}onDragStart(e,t){this.dragging=!0,this.dragSource=e,this.eventLastTime=t,this.dragItem=this.dragSource.getDragItem(),this.dragSource.onDragStarted?.(),this.createDragAndDropImageComponent()}onDragStop(e){if(this.dragSource?.onDragStopped?.(),this.lastDropTarget?.onDragStop){let t=this.createDropTargetEvent(this.lastDropTarget,e,null,null,!1);this.lastDropTarget.onDragStop(t)}this.clearDragAndDropProperties()}onDragCancel(){this.dragSource?.onDragCancelled?.(),this.lastDropTarget?.onDragCancel&&this.lastDropTarget.onDragCancel(this.createDropTargetEvent(this.lastDropTarget,this.eventLastTime,null,null,!1)),this.clearDragAndDropProperties()}clearDragAndDropProperties(){this.eventLastTime=null,this.dragging=!1,this.lastDropTarget=void 0,this.dragItem=null,this.dragSource=null,this.removeDragAndDropImageComponent()}onDragging(e,t=!1){let i=this.getHorizontalDirection(e),r=this.getVerticalDirection(e);this.eventLastTime=e,this.positionDragAndDropImageComp(e);let s=this.dropTargets.filter(t=>this.isMouseOnDropTarget(e,t)),a=this.findCurrentDropTarget(e,s);if(a!==this.lastDropTarget){if(this.leaveLastTargetIfExists(e,i,r,t),null!==this.lastDropTarget&&null===a&&this.dragSource?.onGridExit?.(this.dragItem),null===this.lastDropTarget&&null!==a&&this.dragSource?.onGridEnter?.(this.dragItem),this.enterDragTargetIfExists(a,e,i,r,t),a&&this.dragAndDropImageComp){let{comp:e,promise:t}=this.dragAndDropImageComp;e?e.setIcon(a.getIconName?a.getIconName():null):t.then(e=>{e&&e.setIcon(a.getIconName?a.getIconName():null)})}this.lastDropTarget=a}else if(a&&a.onDragging){let s=this.createDropTargetEvent(a,e,i,r,t);a.onDragging(s)}}getAllContainersFromDropTarget(e){let t=e.getSecondaryContainers?e.getSecondaryContainers():null,i=[[e.getContainer()]];return t?i.concat(t):i}allContainersIntersect(e,t){for(let i of t){let{width:t,height:r,left:s,right:a,top:o,bottom:n}=i.getBoundingClientRect();if(0===t||0===r)return!1;let l=e.clientX>=s&&e.clientX<a,h=e.clientY>=o&&e.clientY<n;if(!l||!h)return!1}return!0}isMouseOnDropTarget(e,t){let i=this.getAllContainersFromDropTarget(t),r=!1;for(let t of i)if(this.allContainersIntersect(e,t)){r=!0;break}let{eElement:s,type:a}=this.dragSource;return(!t.targetContainsSource||!!t.getContainer().contains(s))&&r&&t.isInterestedIn(a,s)}findCurrentDropTarget(e,t){let i=t.length;if(0===i)return null;if(1===i)return t[0];for(let i of il(this.gos).elementsFromPoint(e.clientX,e.clientY))for(let e of t)if(-1!==iW(this.getAllContainersFromDropTarget(e)).indexOf(i))return e;return null}enterDragTargetIfExists(e,t,i,r,s){if(e&&e.onDragEnter){let a=this.createDropTargetEvent(e,t,i,r,s);e.onDragEnter(a)}}leaveLastTargetIfExists(e,t,i,r){if(!this.lastDropTarget)return;if(this.lastDropTarget.onDragLeave){let s=this.createDropTargetEvent(this.lastDropTarget,e,t,i,r);this.lastDropTarget.onDragLeave(s)}let s=this.getDragAndDropImageComponent();s&&s.setIcon(null)}addDropTarget(e){this.dropTargets.push(e)}removeDropTarget(e){this.dropTargets=this.dropTargets.filter(t=>t.getContainer()!==e.getContainer())}hasExternalDropZones(){return this.dropTargets.some(e=>e.external)}findExternalZone(e){return this.dropTargets.filter(e=>e.external).find(t=>t.getContainer()===e.getContainer())||null}isDropZoneWithinThisGrid(e){let t=this.ctrlsService.getGridBodyCtrl().getGui(),{dropZoneTarget:i}=e;return t.contains(i)}getHorizontalDirection(e){let t=this.eventLastTime&&this.eventLastTime.clientX,i=e.clientX;return t===i?null:t>i?0:1}getVerticalDirection(e){let t=this.eventLastTime&&this.eventLastTime.clientY,i=e.clientY;return t===i?null:t>i?0:1}createDropTargetEvent(e,t,i,r,s){let a=e.getContainer(),o=a.getBoundingClientRect(),{dragItem:n,dragSource:l}=this,h=t.clientX-o.left,d=t.clientY-o.top;return this.gos.addGridCommonParams({event:t,x:h,y:d,vDirection:r,hDirection:i,dragSource:l,fromNudge:s,dragItem:n,dropZoneTarget:a})}positionDragAndDropImageComp(e){let t=this.getDragAndDropImageComponent();if(!t)return;let i=t.getGui(),r=i.getBoundingClientRect().height,s=(document.body?.clientWidth??(window.innerHeight||document.documentElement?.clientWidth||-1))-2,a=(document.body?.clientHeight??(window.innerHeight||document.documentElement?.clientHeight||-1))-2;if(!i.offsetParent)return;let o=sk(i.offsetParent),{clientY:n,clientX:l}=e,h=n-o.top-r/2,d=l-o.left-10,c=ia(this.gos),u=c.defaultView||window,p=u.pageYOffset||c.documentElement.scrollTop,g=u.pageXOffset||c.documentElement.scrollLeft;s>0&&d+i.clientWidth>s+g&&(d=s+g-i.clientWidth),d<0&&(d=0),a>0&&h+i.clientHeight>a+p&&(h=a+p-i.clientHeight),h<0&&(h=0),i.style.left=`${d}px`,i.style.top=`${h}px`}removeDragAndDropImageComponent(){if(this.dragAndDropImageComp){let{comp:e}=this.dragAndDropImageComp;if(e){let t=e.getGui();this.dragAndDropImageParent&&this.dragAndDropImageParent.removeChild(t),this.destroyBean(e)}}this.dragAndDropImageComp=null}createDragAndDropImageComponent(){let{dragSource:e}=this;if(!e)return;let t=this.userComponentFactory.getDragAndDropImageCompDetails({dragSource:e}).newAgStackInstance();this.dragAndDropImageComp={promise:t},t.then(e=>{e&&this.isAlive()&&(this.processDragAndDropImageComponent(e),this.dragAndDropImageComp.comp=e)})}processDragAndDropImageComponent(e){let{dragSource:t,mouseEventService:i,environment:r}=this;if(!t)return;let s=e.getGui();s.style.setProperty("position","absolute"),s.style.setProperty("z-index","9999"),i.stampTopLevelGridCompWithGridInstance(s),r.applyThemeClasses(s),e.setIcon(null);let{dragItemName:a}=t;tG(a)&&(a=a()),e.setLabel(a||""),s.style.top="20px",s.style.left="20px";let o=ia(this.gos),n=null,l=null;try{n=o.fullscreenElement}catch(e){}finally{n||(n=il(this.gos));let e=n.querySelector("body");e?l=e:n instanceof ShadowRoot?l=n:n instanceof Document?l=n?.documentElement:l=n}this.dragAndDropImageParent=l,l?l.appendChild(s):tO("Could not find document body, it is needed for drag and drop.")}},aJ=class{constructor(e){this.tickingInterval=null,this.onScrollCallback=null,this.scrollContainer=e.scrollContainer,this.scrollHorizontally=-1!==e.scrollAxis.indexOf("x"),this.scrollVertically=-1!==e.scrollAxis.indexOf("y"),this.scrollByTick=null!=e.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)}check(e,t=!1){let i=t||this.shouldSkipVerticalScroll();if(i&&this.shouldSkipHorizontalScroll())return;let r=this.scrollContainer.getBoundingClientRect(),s=this.scrollByTick;this.tickLeft=e.clientX<r.left+s,this.tickRight=e.clientX>r.right-s,this.tickUp=e.clientY<r.top+s&&!i,this.tickDown=e.clientY>r.bottom-s&&!i,this.tickLeft||this.tickRight||this.tickUp||this.tickDown?this.ensureTickingStarted():this.ensureCleared()}ensureTickingStarted(){null===this.tickingInterval&&(this.tickingInterval=window.setInterval(this.doTick.bind(this),100),this.tickCount=0)}doTick(){this.tickCount++;let e=this.tickCount>20?200:this.tickCount>10?80:40;if(this.scrollVertically){let t=this.getVerticalPosition();this.tickUp&&this.setVerticalPosition(t-e),this.tickDown&&this.setVerticalPosition(t+e)}if(this.scrollHorizontally){let 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)}},a0=((d=a0||{})[d.Above=0]="Above",d[d.Below=1]="Below",d),a1=class extends i2{wireBeans(e){this.dragAndDropService=e.dragAndDropService,this.rowModel=e.rowModel,this.pageBoundsService=e.pageBoundsService,this.focusService=e.focusService,this.sortController=e.sortController,this.filterManager=e.filterManager,this.selectionService=e.selectionService,this.mouseEventService=e.mouseEventService,this.ctrlsService=e.ctrlsService,this.funcColsService=e.funcColsService,this.rangeService=e.rangeService}constructor(e){super(),this.eContainer=e}postConstruct(){t4(this.gos)&&(this.clientSideRowModel=this.rowModel),this.ctrlsService.whenReady(this,e=>{let t=e.gridBodyCtrl;this.autoScrollService=new aJ({scrollContainer:t.getBodyViewportElement(),scrollAxis:"y",getVerticalPosition:()=>t.getScrollFeature().getVScrollPosition().top,setVerticalPosition:e=>t.getScrollFeature().setVerticalScrollPosition(e),onScrollCallback:()=>{this.onDragging(this.lastDraggingEvent)}})})}getContainer(){return this.eContainer}isInterestedIn(e){return 2===e}getIconName(){return this.gos.get("rowDragManaged")&&this.shouldPreventRowMove()?"notAllowed":"move"}shouldPreventRowMove(){return!!(this.funcColsService.getRowGroupColumns().length||this.filterManager?.isAnyFilterPresent()||this.sortController.isSortActive())}getRowNodes(e){if(!this.isFromThisGrid(e))return e.dragItem.rowNodes||[];let t=e.dragItem.rowNode;if(this.gos.get("rowDragMultiRow")){let e=[...this.selectionService.getSelectedNodes()].sort((e,t)=>null==e.rowIndex||null==t.rowIndex?0:this.getRowIndexNumber(e)-this.getRowIndexNumber(t));if(-1!==e.indexOf(t))return e}return[t]}onDragEnter(e){e.dragItem.rowNodes=this.getRowNodes(e),this.dispatchGridEvent("rowDragEnter",e),this.getRowNodes(e).forEach(e=>{e.setDragging(!0)}),this.onEnterOrDragging(e)}onDragging(e){this.onEnterOrDragging(e)}isFromThisGrid(e){let{dragSourceDomDataKey:t}=e.dragSource;return t===this.gos.getDomDataKey()}onEnterOrDragging(e){this.dispatchGridEvent("rowDragMove",e),this.lastDraggingEvent=e;let t=this.mouseEventService.getNormalisedPosition(e).y;this.gos.get("rowDragManaged")&&this.doManagedDrag(e,t),this.autoScrollService.check(e.event)}doManagedDrag(e,t){let i=this.isFromThisGrid(e),r=this.gos.get("rowDragManaged"),s=e.dragItem.rowNodes;!(r&&this.shouldPreventRowMove())&&(this.gos.get("suppressMoveWhenRowDragging")||!i?this.dragAndDropService.isDropZoneWithinThisGrid(e)&&this.clientSideRowModel.highlightRowAtPixel(s[0],t):this.moveRows(s,t))}getRowIndexNumber(e){return parseInt(iB(e.getRowIndexString().split("-")),10)}moveRowAndClearHighlight(e){let t=this.clientSideRowModel.getLastHighlightedRowNode(),i=t&&1===t.highlighted,r=this.mouseEventService.getNormalisedPosition(e).y,s=e.dragItem.rowNodes,a=i?1:0;if(this.isFromThisGrid(e))s.forEach(e=>{e.rowTop<r&&(a-=1)}),this.moveRows(s,r,a);else{let e=iw(this.gos),t=this.clientSideRowModel.getRowIndexAtPixel(r)+1;0===this.clientSideRowModel.getHighlightPosition(r)&&t--,this.clientSideRowModel.updateRowData({add:s.filter(t=>!this.clientSideRowModel.getRowNode(e?.({data:t.data,level:0,rowPinned:t.rowPinned})??t.data.id)).map(e=>e.data),addIndex:t})}this.clearRowHighlight()}clearRowHighlight(){this.clientSideRowModel.highlightRowAtPixel(null)}moveRows(e,t,i=0){this.clientSideRowModel.ensureRowsAtPixel(e,t,i)&&(this.focusService.clearFocusedCell(),this.rangeService?.removeAllCellRanges())}addRowDropZone(e){if(!e.getContainer()){tO("addRowDropZone - A container target needs to be provided");return}if(this.dragAndDropService.findExternalZone(e)){tO("addRowDropZone - target already exists in the list of DropZones. Use `removeRowDropZone` before adding it again.");return}let t={getContainer:e.getContainer};e.fromGrid?t=e:(e.onDragEnter&&(t.onDragEnter=t=>{e.onDragEnter(this.draggingToRowDragEvent("rowDragEnter",t))}),e.onDragLeave&&(t.onDragLeave=t=>{e.onDragLeave(this.draggingToRowDragEvent("rowDragLeave",t))}),e.onDragging&&(t.onDragging=t=>{e.onDragging(this.draggingToRowDragEvent("rowDragMove",t))}),e.onDragStop&&(t.onDragStop=t=>{e.onDragStop(this.draggingToRowDragEvent("rowDragEnd",t))}),e.onDragCancel&&(t.onDragCancel=t=>{e.onDragCancel(this.draggingToRowDragEvent("rowDragCancel",t))}));let i={isInterestedIn:e=>2===e,getIconName:()=>"move",external:!0,...t};this.dragAndDropService.addDropTarget(i),this.addDestroyFunc(()=>this.dragAndDropService.removeDropTarget(i))}getRowDropZone(e){let t=this.getContainer.bind(this),i=this.onDragEnter.bind(this),r=this.onDragLeave.bind(this),s=this.onDragging.bind(this),a=this.onDragStop.bind(this),o=this.onDragCancel.bind(this);return e?{getContainer:t,onDragEnter:e.onDragEnter?t=>{i(t),e.onDragEnter(this.draggingToRowDragEvent("rowDragEnter",t))}:i,onDragLeave:e.onDragLeave?t=>{r(t),e.onDragLeave(this.draggingToRowDragEvent("rowDragLeave",t))}:r,onDragging:e.onDragging?t=>{s(t),e.onDragging(this.draggingToRowDragEvent("rowDragMove",t))}:s,onDragStop:e.onDragStop?t=>{a(t),e.onDragStop(this.draggingToRowDragEvent("rowDragEnd",t))}:a,onDragCancel:e.onDragCancel?t=>{o(t),e.onDragCancel(this.draggingToRowDragEvent("rowDragCancel",t))}:o,fromGrid:!0}:{getContainer:t,onDragEnter:i,onDragLeave:r,onDragging:s,onDragStop:a,onDragCancel:o,fromGrid:!0}}draggingToRowDragEvent(e,t){let i,r;let s=this.mouseEventService.getNormalisedPosition(t).y,a=s>this.pageBoundsService.getCurrentPageHeight(),o=-1;switch(a||(o=this.rowModel.getRowIndexAtPixel(s),i=this.rowModel.getRow(o)),t.vDirection){case 1:r="down";break;case 0:r="up";break;default:r=null}return this.gos.addGridCommonParams({type:e,event:t.event,node:t.dragItem.rowNode,nodes:t.dragItem.rowNodes,overIndex:o,overNode:i,y:s,vDirection:r})}dispatchGridEvent(e,t){let i=this.draggingToRowDragEvent(e,t);this.eventService.dispatchEvent(i)}onDragLeave(e){this.dispatchGridEvent("rowDragLeave",e),this.stopDragging(e),this.gos.get("rowDragManaged")&&this.clearRowHighlight()}onDragStop(e){this.dispatchGridEvent("rowDragEnd",e),this.stopDragging(e),this.gos.get("rowDragManaged")&&(this.gos.get("suppressMoveWhenRowDragging")||!this.isFromThisGrid(e))&&this.dragAndDropService.isDropZoneWithinThisGrid(e)&&this.moveRowAndClearHighlight(e)}onDragCancel(e){this.dispatchGridEvent("rowDragCancel",e),this.stopDragging(e),this.gos.get("rowDragManaged")&&(this.gos.get("suppressMoveWhenRowDragging")||!this.isFromThisGrid(e))&&this.dragAndDropService.isDropZoneWithinThisGrid(e)&&this.clearRowHighlight()}stopDragging(e){this.autoScrollService.ensureCleared(),this.getRowNodes(e).forEach(e=>{e.setDragging(!1)})}},a2=class extends i2{constructor(){super(...arguments),this.beanName="dragService",this.dragEndFunctions=[],this.dragSources=[]}wireBeans(e){this.mouseEventService=e.mouseEventService}destroy(){this.dragSources.forEach(this.removeListener.bind(this)),this.dragSources.length=0,super.destroy()}removeListener(e){let t=e.dragSource.eElement,i=e.mouseDownListener;if(t.removeEventListener("mousedown",i),e.touchEnabled){let i=e.touchStartListener;t.removeEventListener("touchstart",i,{passive:!0})}}removeDragSource(e){let t=this.dragSources.find(t=>t.dragSource===e);t&&(this.removeListener(t),i_(this.dragSources,t))}isDragging(){return this.dragging}addDragSource(e){let t=this.onMouseDown.bind(this,e),{eElement:i,includeTouch:r,stopPropagationForTouch:s}=e;i.addEventListener("mousedown",t);let a=null,o=this.gos.get("suppressTouch");r&&!o&&(a=t=>{sy(t.target)||(s&&t.stopPropagation(),this.onTouchStart(e,t))},i.addEventListener("touchstart",a,{passive:!1})),this.dragSources.push({dragSource:e,mouseDownListener:t,touchStartListener:a,touchEnabled:!!r})}getStartTarget(){return this.startTarget}onTouchStart(e,t){this.currentDragParams=e,this.dragging=!1;let i=t.touches[0];this.touchLastTime=i,this.touchStart=i;let r=t=>this.onTouchUp(t,e.eElement),s=t.target,a=[{target:il(this.gos),type:"touchmove",listener:e=>{e.cancelable&&e.preventDefault()},options:{passive:!1}},{target:s,type:"touchmove",listener:t=>this.onTouchMove(t,e.eElement),options:{passive:!0}},{target:s,type:"touchend",listener:r,options:{passive:!0}},{target:s,type:"touchcancel",listener:r,options:{passive:!0}}];this.addTemporaryEvents(a),0===e.dragStartPixels&&this.onCommonMove(i,this.touchStart,e.eElement)}onMouseDown(e,t){if(e.skipMouseEvent&&e.skipMouseEvent(t)||t._alreadyProcessedByDragService||(t._alreadyProcessedByDragService=!0,0!==t.button))return;this.shouldPreventMouseEvent(t)&&t.preventDefault(),this.currentDragParams=e,this.dragging=!1,this.mouseStartEvent=t,this.startTarget=t.target;let i=il(this.gos),r=[{target:i,type:"mousemove",listener:t=>this.onMouseMove(t,e.eElement)},{target:i,type:"mouseup",listener:t=>this.onMouseUp(t,e.eElement)},{target:i,type:"contextmenu",listener:e=>e.preventDefault()},{target:i,type:"keydown",listener:t=>{t.key===aa.ESCAPE&&this.cancelDrag(e.eElement)}}];this.addTemporaryEvents(r),0===e.dragStartPixels&&this.onMouseMove(t,e.eElement)}addTemporaryEvents(e){e.forEach(e=>{let{target:t,type:i,listener:r,options:s}=e;t.addEventListener(i,r,s)}),this.dragEndFunctions.push(()=>{e.forEach(e=>{let{target:t,type:i,listener:r,options:s}=e;t.removeEventListener(i,r,s)})})}isEventNearStartEvent(e,t){let{dragStartPixels:i}=this.currentDragParams;return s4(e,t,tY(i)?i:4)}getFirstActiveTouch(e){for(let t=0;t<e.length;t++)if(e[t].identifier===this.touchStart.identifier)return e[t];return null}onCommonMove(e,t,i){if(!this.dragging){if(this.isEventNearStartEvent(e,t))return;this.dragging=!0,this.eventService.dispatchEvent({type:"dragStarted",target:i}),this.currentDragParams.onDragStart(t),this.currentDragParams.onDragging(t)}this.currentDragParams.onDragging(e)}onTouchMove(e,t){let i=this.getFirstActiveTouch(e.touches);i&&this.onCommonMove(i,this.touchStart,t)}onMouseMove(e,t){if(so()){let e=ia(this.gos);e.getSelection()?.removeAllRanges()}this.shouldPreventMouseEvent(e)&&e.preventDefault(),this.onCommonMove(e,this.mouseStartEvent,t)}shouldPreventMouseEvent(e){let t=this.gos.get("enableCellTextSelection"),i="mousemove"===e.type;return t&&i&&e.cancelable&&this.mouseEventService.isEventFromThisGrid(e)&&!this.isOverFormFieldElement(e)}isOverFormFieldElement(e){let t=e.target,i=t?.tagName.toLocaleLowerCase();return!!i?.match("^a$|textarea|input|select|button")}onTouchUp(e,t){let i=this.getFirstActiveTouch(e.changedTouches);i||(i=this.touchLastTime),this.onUpCommon(i,t)}onMouseUp(e,t){this.onUpCommon(e,t)}onUpCommon(e,t){this.dragging&&(this.dragging=!1,this.currentDragParams.onDragStop(e),this.eventService.dispatchEvent({type:"dragStopped",target:t})),this.resetDragProperties()}cancelDrag(e){this.eventService.dispatchEvent({type:"dragCancelled",target:e}),this.currentDragParams?.onDragCancel?.(),this.resetDragProperties()}resetDragProperties(){this.mouseStartEvent=null,this.startTarget=null,this.touchStart=null,this.touchLastTime=null,this.currentDragParams=null,this.dragEndFunctions.forEach(e=>e()),this.dragEndFunctions.length=0}},a3=class extends sQ{constructor(e,t,i,r,s,a){super(),this.cellValueFn=e,this.rowNode=t,this.column=i,this.customGui=r,this.dragStartPixels=s,this.suppressVisibilityChange=a,this.dragSource=null}wireBeans(e){this.beans=e}isCustomGui(){return null!=this.customGui}postConstruct(){if(this.customGui?this.setDragElement(this.customGui,this.dragStartPixels):(this.setTemplate('<div class="ag-drag-handle ag-row-drag" aria-hidden="true"></div>'),this.getGui().appendChild(s2("rowDrag",this.gos,null)),this.addDragSource()),this.checkCompatibility(),!this.suppressVisibilityChange){let e=this.gos.get("rowDragManaged")?new a5(this,this.beans,this.rowNode,this.column):new a6(this,this.beans,this.rowNode,this.column);this.createManagedBean(e,this.beans.context)}}setDragElement(e,t){this.setTemplateFromElement(e,void 0,void 0,!0),this.addDragSource(t)}getSelectedNodes(){if(!this.gos.get("rowDragMultiRow"))return[this.rowNode];let e=this.beans.selectionService.getSelectedNodes();return -1!==e.indexOf(this.rowNode)?e:[this.rowNode]}checkCompatibility(){let e=this.gos.get("rowDragManaged");this.gos.get("treeData")&&e&&tO("If using row drag with tree data, you cannot have rowDragManaged=true")}getDragItem(){return{rowNode:this.rowNode,rowNodes:this.getSelectedNodes(),columns:this.column?[this.column]:void 0,defaultTextValue:this.cellValueFn()}}getRowDragText(e){if(e){let t=e.getColDef();if(t.rowDragText)return t.rowDragText}return this.gos.get("rowDragText")}addDragSource(e=4){this.dragSource&&this.removeDragSource();let t=this.getGui();this.gos.get("enableCellTextSelection")&&(this.removeMouseDownListener(),this.mouseDownListener=this.addManagedElementListeners(t,{mousedown:e=>{e?.preventDefault()}})[0]);let i=this.localeService.getLocaleTextFunc();this.dragSource={type:2,eElement:t,dragItemName:()=>{let e=this.getDragItem(),t=e.rowNodes?.length||1,r=this.getRowDragText(this.column);return r?r(e,t):1===t?this.cellValueFn():`${t} ${i("rowDragRows","rows")}`},getDragItem:()=>this.getDragItem(),dragStartPixels:e,dragSourceDomDataKey:this.gos.getDomDataKey()},this.beans.dragAndDropService.addDragSource(this.dragSource,!0)}destroy(){this.removeDragSource(),this.removeMouseDownListener(),super.destroy()}removeDragSource(){this.dragSource&&(this.beans.dragAndDropService.removeDragSource(this.dragSource),this.dragSource=null)}removeMouseDownListener(){this.mouseDownListener&&(this.mouseDownListener(),this.mouseDownListener=void 0)}},a4=class extends i2{constructor(e,t,i){super(),this.parent=e,this.rowNode=t,this.column=i}setDisplayedOrVisible(e){let t={skipAriaHidden:!0};if(e)this.parent.setDisplayed(!1,t);else{let e=!0,i=!1;this.column&&(e=this.column.isRowDrag(this.rowNode)||this.parent.isCustomGui(),i=tG(this.column.getColDef().rowDrag)),i?(this.parent.setDisplayed(!0,t),this.parent.setVisible(e,t)):(this.parent.setDisplayed(e,t),this.parent.setVisible(!0,t))}}},a6=class extends a4{constructor(e,t,i,r){super(e,i,r),this.beans=t}postConstruct(){this.addManagedPropertyListener("suppressRowDrag",this.onSuppressRowDrag.bind(this));let e=this.workOutVisibility.bind(this);this.addManagedListeners(this.rowNode,{dataChanged:e,cellChanged:e}),this.addManagedListeners(this.beans.eventService,{newColumnsLoaded:e}),this.workOutVisibility()}onSuppressRowDrag(){this.workOutVisibility()}workOutVisibility(){let e=this.gos.get("suppressRowDrag");this.setDisplayedOrVisible(e)}},a5=class extends a4{constructor(e,t,i,r){super(e,i,r),this.beans=t}postConstruct(){let e=this.workOutVisibility.bind(this);this.addManagedListeners(this.beans.eventService,{sortChanged:e,filterChanged:e,columnRowGroupChanged:e,newColumnsLoaded:e}),this.addManagedListeners(this.rowNode,{dataChanged:e,cellChanged:e}),this.addManagedPropertyListener("suppressRowDrag",this.onSuppressRowDrag.bind(this)),this.workOutVisibility()}onSuppressRowDrag(){this.workOutVisibility()}workOutVisibility(){let e=this.beans.ctrlsService.getGridBodyCtrl().getRowDragFeature(),t=e&&e.shouldPreventRowMove(),i=this.gos.get("suppressRowDrag"),r=this.beans.dragAndDropService.hasExternalDropZones();this.setDisplayedOrVisible(t&&!r||i)}},a8=new Set(["localEventService","__objectId","sticky","__autoHeights","checkAutoHeightsDebounced"]),a7=class e{constructor(t){this.rowIndex=null,this.key=null,this.sourceRowIndex=-1,this.childrenMapped={},this.treeNode=null,this.treeNodeFlags=0,this.displayed=!1,this.rowTop=null,this.oldRowTop=null,this.selectable=!0,this.__objectId=e.OBJECT_ID_SEQUENCE++,this.__autoHeights={},this.alreadyRendered=!1,this.highlighted=null,this.hovered=!1,this.selected=!1,this.beans=t}setData(e){this.setDataCommon(e,!1)}updateData(e){this.setDataCommon(e,!0)}setDataCommon(e,t){let i=this.data;this.data=e,this.beans.valueCache.onDataChanged(),this.updateDataOnDetailNode(),this.checkRowSelectable(),this.resetQuickFilterAggregateText();let r=this.createDataChangedEvent(e,i,t);this.localEventService?.dispatchEvent(r)}updateDataOnDetailNode(){this.detailNode&&(this.detailNode.data=this.data)}createDataChangedEvent(e,t,i){return{type:"dataChanged",node:this,oldData:t,newData:e,update:i}}getRowIndexString(){return null==this.rowIndex?(tB("Could not find rowIndex, this means tasks are being executed on a rowNode that has been removed from the grid."),null):"top"===this.rowPinned?e.ID_PREFIX_TOP_PINNED+this.rowIndex:"bottom"===this.rowPinned?e.ID_PREFIX_BOTTOM_PINNED+this.rowIndex:this.rowIndex.toString()}createDaemonNode(){let t=new e(this.beans);return t.id=this.id,t.data=this.data,t.__daemon=!0,t.selected=this.selected,t.level=this.level,t}setDataAndId(e,t){let i=tY(this.id)?this.createDaemonNode():null,r=this.data;this.data=e,this.updateDataOnDetailNode(),this.setId(t),this.checkRowSelectable(),this.beans.selectionService.syncInRowNode(this,i);let s=this.createDataChangedEvent(e,r,!1);this.localEventService?.dispatchEvent(s)}checkRowSelectable(){let e=iA(this.beans.gos);this.setRowSelectable(!e||e(this))}setRowSelectable(e,t){if(this.selectable!==e&&(this.selectable=e,this.dispatchRowEvent("selectableChanged"),!t)){if(iF(this.beans.gos)){let e=this.calculateSelectedFromChildren();this.setSelectedParams({newValue:e??!1,source:"selectableChanged"});return}this.isSelected()&&!this.selectable&&this.setSelectedParams({newValue:!1,source:"selectableChanged"})}}setId(t){let i=iw(this.beans.gos);if(i){if(this.data){let t=this.parent?.getRoute()??[];this.id=i({data:this.data,parentKeys:t.length>0?t:void 0,level:this.level,rowPinned:this.rowPinned}),this.id.startsWith(e.ID_PREFIX_ROW_GROUP)&&tB(`Row IDs cannot start with ${e.ID_PREFIX_ROW_GROUP}, this is a reserved prefix for AG Grid's row grouping feature.`)}else this.id=void 0}else this.id=t}setRowTop(e){this.oldRowTop=this.rowTop,this.rowTop!==e&&(this.rowTop=e,this.dispatchRowEvent("topChanged"),this.setDisplayed(null!==e))}clearRowTopAndRowIndex(){this.oldRowTop=null,this.setRowTop(null),this.setRowIndex(null)}setHovered(e){this.hovered=e}isHovered(){return this.hovered}setMaster(e){this.master!==e&&(this.master&&!e&&(this.expanded=!1),this.master=e,this.dispatchRowEvent("masterChanged"))}setGroup(e){this.group!==e&&(this.group&&!e&&(this.expanded=!1),this.group=e,this.updateHasChildren(),this.checkRowSelectable(),this.dispatchRowEvent("groupChanged"))}setRowHeight(e,t=!1){this.rowHeight=e,this.rowHeightEstimated=t,this.dispatchRowEvent("heightChanged")}setRowAutoHeight(e,t){this.__autoHeights||(this.__autoHeights={}),this.__autoHeights[t.getId()]=e,null!=e&&(null==this.checkAutoHeightsDebounced&&(this.checkAutoHeightsDebounced=tj(this.checkAutoHeights.bind(this),1)),this.checkAutoHeightsDebounced())}checkAutoHeights(){let e=!1,t=!0,i=0,r=this.__autoHeights;if(null==r||(this.beans.visibleColsService.getAllAutoHeightCols().forEach(s=>{let a=r[s.getId()];if(null==a){if(this.beans.columnModel.isColSpanActive()){let t=[];switch(s.getPinned()){case"left":t=this.beans.visibleColsService.getLeftColsForRow(this);break;case"right":t=this.beans.visibleColsService.getRightColsForRow(this);break;case null:t=this.beans.columnViewportService.getColsWithinViewport(this)}if(t.includes(s)){e=!0;return}a=-1}else{e=!0;return}}else t=!1;a>i&&(i=a)}),e)||((t||i<10)&&(i=ie(this.beans.gos,this).height),i==this.rowHeight))return;this.setRowHeight(i);let s=this.beans.rowModel;s.onRowHeightChangedDebounced?.()}setExpanded(e,t,i){if(this.expanded===e)return;this.expanded=e,this.dispatchRowEvent("expandedChanged");let r={...this.createGlobalRowEvent("rowGroupOpened"),expanded:e,event:t||null};this.beans.rowNodeEventThrottle.dispatchExpanded(r,i),this.beans.rowRenderer.refreshCells({rowNodes:[this]})}createGlobalRowEvent(e){return this.beans.gos.addGridCommonParams({type:e,node:this,data:this.data,rowIndex:this.rowIndex,rowPinned:this.rowPinned})}setDataValue(e,t,i){let r="string"!=typeof e?e:this.beans.columnModel.getCol(e)??this.beans.columnModel.getColDefCol(e),s=this.beans.valueService.getValueForDisplay(r,this);if(this.beans.gos.get("readOnlyEdit"))return this.beans.eventService.dispatchEvent({type:"cellEditRequest",event:null,rowIndex:this.rowIndex,rowPinned:this.rowPinned,column:r,colDef:r.getColDef(),data:this.data,node:this,oldValue:s,newValue:t,value:t,source:i}),!1;let a=this.beans.valueService.setValue(this,r,t,i);return this.dispatchCellChangedEvent(r,t,s),this.checkRowSelectable(),a}setGroupValue(e,t){let i=this.beans.columnModel.getCol(e);tK(this.groupData)&&(this.groupData={});let r=i.getColId(),s=this.groupData[r];s!==t&&(this.groupData[r]=t,this.dispatchCellChangedEvent(i,t,s))}setAggData(e){let t=this.aggData;if(this.aggData=e,this.localEventService){let i=e=>{let i=this.aggData?this.aggData[e]:void 0,r=t?t[e]:void 0;if(i===r)return;let s=this.beans.columnModel.getCol(e);s&&this.dispatchCellChangedEvent(s,i,r)};for(let e in t)i(e);for(let r in e)t&&r in t||i(r)}}updateHasChildren(){let e=this.group&&!this.footer||this.childrenAfterGroup&&this.childrenAfterGroup.length>0;if(t6(this.beans.gos)){let t=this.beans.gos.get("treeData"),i=this.beans.gos.get("isServerSideGroup");e=!this.stub&&!this.footer&&(t?!!i&&i(this.data):!!this.group)}e!==this.__hasChildren&&(this.__hasChildren=!!e,this.dispatchRowEvent("hasChildrenChanged"))}hasChildren(){return null==this.__hasChildren&&this.updateHasChildren(),this.__hasChildren}dispatchCellChangedEvent(e,t,i){this.localEventService?.dispatchEvent({type:"cellChanged",node:this,column:e,newValue:t,oldValue:i})}resetQuickFilterAggregateText(){this.quickFilterAggregateText=null}isExpandable(){return!this.footer&&(this.beans.columnModel.isPivotMode()?this.hasChildren()&&!this.leafGroup:this.hasChildren()||!!this.master)}isSelected(){return this.footer?this.sibling.isSelected():this.selected}depthFirstSearch(e){this.childrenAfterGroup&&this.childrenAfterGroup.forEach(t=>t.depthFirstSearch(e)),e(this)}calculateSelectedFromChildren(){let e=!1,t=!1;if(!this.childrenAfterGroup?.length)return this.selectable?this.selected:null;for(let i=0;i<this.childrenAfterGroup.length;i++){let r=this.childrenAfterGroup[i],s=r.isSelected();if(!r.selectable){let e=r.calculateSelectedFromChildren();if(null===e)continue;s=e}switch(s){case!0:e=!0;break;case!1:t=!0;break;default:return}}return e&&t?void 0:!!e||!t&&(this.selectable?this.selected:null)}setSelectedInitialValue(e){this.selected=e}dispatchRowEvent(e){this.localEventService?.dispatchEvent({type:e,node:this})}selectThisNode(e,t,i="api"){let r=!this.selectable&&e,s=this.selected===e;if(r||s)return!1;this.selected=e,this.dispatchRowEvent("rowSelected");let a=this.sibling;return a&&a.footer&&a.localEventService&&a.dispatchRowEvent("rowSelected"),this.beans.eventService.dispatchEvent({...this.createGlobalRowEvent("rowSelected"),event:t||null,source:i}),!0}setSelected(e,t=!1,i="api"){if("boolean"==typeof i){tO("since version v30, rowNode.setSelected() property `suppressFinishActions` has been removed, please use `gridApi.setNodesSelected()` for bulk actions, and the event `source` property for ignoring events instead.");return}this.setSelectedParams({newValue:e,clearSelection:t,rangeSelect:!1,source:i})}setSelectedParams(e){return this.rowPinned?(tO("cannot select pinned rows"),0):void 0===this.id?(tO("cannot select node until id for node is known"),0):this.beans.selectionService.setNodesSelected({...e,nodes:[this.footer?this.sibling:this]})}isRowPinned(){return!!this.rowPinned}addEventListener(e,t){this.localEventService||(this.localEventService=new tR),this.beans.frameworkOverrides.shouldWrapOutgoing&&!this.frameworkEventListenerService&&(this.localEventService.setFrameworkOverrides(this.beans.frameworkOverrides),this.frameworkEventListenerService=new rs(this.beans.frameworkOverrides));let i=this.frameworkEventListenerService?.wrap(t)??t;this.localEventService.addEventListener(e,i)}removeEventListener(e,t){if(!this.localEventService)return;let i=this.frameworkEventListenerService?.unwrap(t)??t;this.localEventService.removeEventListener(e,i),this.localEventService.noRegisteredListenersExist()&&(this.localEventService=null)}onMouseEnter(){this.dispatchRowEvent("mouseEnter")}onMouseLeave(){this.dispatchRowEvent("mouseLeave")}isFullWidthCell(){if(tO("since version v32.2.0, rowNode.isFullWidthCell() has been deprecated. Instead check `rowNode.detail` followed by the user provided `isFullWidthRow` grid option."),this.detail)return!0;let e=this.beans.gos.getCallback("isFullWidthRow");return!!e&&e({rowNode:this})}getRoute(){if(-1===this.level)return[];if(null==this.key)return;let e=[],t=this;for(;t&&null!=t.key;)e.push(t.key),t=t.parent;return e.reverse()}createFooter(){if(this.sibling)return;let t=new e(this.beans);Object.keys(this).forEach(e=>{a8.has(e)||(t[e]=this[e])}),t.footer=!0,t.setRowTop(null),t.setRowIndex(null),t.oldRowTop=null,t.id="rowGroupFooter_"+this.id,t.sibling=this,this.sibling=t}destroyFooter(){this.sibling&&(this.sibling.setRowTop(null),this.sibling.setRowIndex(null),this.sibling=void 0)}setFirstChild(e){this.firstChild!==e&&(this.firstChild=e,this.dispatchRowEvent("firstChildChanged"))}setLastChild(e){this.lastChild!==e&&(this.lastChild=e,this.dispatchRowEvent("lastChildChanged"))}setChildIndex(e){this.childIndex!==e&&(this.childIndex=e,this.dispatchRowEvent("childIndexChanged"))}setDisplayed(e){this.displayed!==e&&(this.displayed=e,this.dispatchRowEvent("displayedChanged"))}setDragging(e){this.dragging!==e&&(this.dragging=e,this.dispatchRowEvent("draggingChanged"))}setHighlighted(e){this.highlighted!==e&&(this.highlighted=e,this.dispatchRowEvent("rowHighlightChanged"))}setAllChildrenCount(e){this.allChildrenCount!==e&&(this.allChildrenCount=e,this.dispatchRowEvent("allChildrenCountChanged"))}setRowIndex(e){this.rowIndex!==e&&(this.rowIndex=e,this.dispatchRowEvent("rowIndexChanged"))}setUiLevel(e){this.uiLevel!==e&&(this.uiLevel=e,this.dispatchRowEvent("uiLevelChanged"))}};a7.ID_PREFIX_ROW_GROUP="row-group-",a7.ID_PREFIX_TOP_PINNED="t-",a7.ID_PREFIX_BOTTOM_PINNED="b-",a7.OBJECT_ID_SEQUENCE=0;var a9=class extends i2{constructor(){super(...arguments),this.beanName="filterManager",this.advancedFilterModelUpdateQueue=[]}wireBeans(e){this.columnModel=e.columnModel,this.dataTypeService=e.dataTypeService,this.quickFilterService=e.quickFilterService,this.advancedFilterService=e.advancedFilterService,this.columnFilterService=e.columnFilterService}postConstruct(){let e=this.refreshFiltersForAggregations.bind(this),t=this.updateAdvancedFilterColumns.bind(this);this.addManagedEventListeners({columnValueChanged:e,columnPivotChanged:e,columnPivotModeChanged:e,newColumnsLoaded:t,columnVisible:t,advancedFilterEnabledChanged:({enabled:e})=>this.onAdvancedFilterEnabledChanged(e),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)}),this.externalFilterPresent=this.isExternalFilterPresentCallback(),this.addManagedPropertyListeners(["isExternalFilterPresent","doesExternalFilterPass"],()=>{this.onFilterChanged({source:"api"})}),this.updateAggFiltering(),this.addManagedPropertyListener("groupAggFiltering",()=>{this.updateAggFiltering(),this.onFilterChanged()}),this.addManagedPropertyListener("advancedFilterModel",e=>this.setAdvancedFilterModel(e.currentValue)),this.quickFilterService&&this.addManagedListeners(this.quickFilterService,{quickFilterChanged:()=>this.onFilterChanged({source:"quickFilter"})})}isExternalFilterPresentCallback(){let e=this.gos.getCallback("isExternalFilterPresent");return"function"==typeof e&&e({})}doesExternalFilterPass(e){let t=this.gos.get("doesExternalFilterPass");return"function"==typeof t&&t(e)}setFilterModel(e,t="api"){if(this.isAdvancedFilterEnabled()){this.warnAdvancedFilters();return}this.columnFilterService?.setFilterModel(e,t)}getFilterModel(){return this.columnFilterService?.getFilterModel()??{}}isColumnFilterPresent(){return!!this.columnFilterService?.isColumnFilterPresent()}isAggregateFilterPresent(){return!!this.columnFilterService?.isAggregateFilterPresent()}isExternalFilterPresent(){return this.externalFilterPresent}isChildFilterPresent(){return this.isColumnFilterPresent()||this.isQuickFilterPresent()||this.isExternalFilterPresent()||this.isAdvancedFilterPresent()}isAdvancedFilterPresent(){return this.isAdvancedFilterEnabled()&&this.advancedFilterService.isFilterPresent()}onAdvancedFilterEnabledChanged(e){e?this.columnFilterService?.disableColumnFilters()&&this.onFilterChanged({source:"advancedFilter"}):this.advancedFilterService?.isFilterPresent()&&(this.advancedFilterService.setModel(null),this.onFilterChanged({source:"advancedFilter"}))}isAdvancedFilterEnabled(){return!!this.advancedFilterService?.isEnabled()}isAdvancedFilterHeaderActive(){return this.isAdvancedFilterEnabled()&&this.advancedFilterService.isHeaderActive()}isAnyFilterPresent(){return this.isQuickFilterPresent()||this.isColumnFilterPresent()||this.isAggregateFilterPresent()||this.isExternalFilterPresent()||this.isAdvancedFilterPresent()}resetQuickFilterCache(){this.quickFilterService?.resetQuickFilterCache()}refreshFiltersForAggregations(){ig(this.gos)&&this.onFilterChanged()}onFilterChanged(e={}){let{source:t,additionalEventAttributes:i,columns:r=[]}=e;this.externalFilterPresent=this.isExternalFilterPresentCallback(),(this.columnFilterService?this.columnFilterService.updateBeforeFilterChanged(e):ab.resolve()).then(()=>{let e={source:t,type:"filterChanged",columns:r};i&&rd(e,i),this.eventService.dispatchEvent(e),this.columnFilterService?.updateAfterFilterChanged()})}isSuppressFlashingCellsBecauseFiltering(){return!!this.columnFilterService?.isSuppressFlashingCellsBecauseFiltering()}isQuickFilterPresent(){return!!this.quickFilterService?.isQuickFilterPresent()}updateAggFiltering(){this.aggFiltering=!!ig(this.gos)}isAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&this.shouldApplyQuickFilterAfterAgg()}isNonAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&!this.shouldApplyQuickFilterAfterAgg()}shouldApplyQuickFilterAfterAgg(){return(this.aggFiltering||this.columnModel.isPivotMode())&&!this.gos.get("applyQuickFilterBeforePivotOrAgg")}doesRowPassOtherFilters(e,t){return this.doesRowPassFilter({rowNode:t,filterInstanceToSkip:e})}doesRowPassAggregateFilters(e){return!(this.isAggregateQuickFilterPresent()&&!this.quickFilterService.doesRowPassQuickFilter(e.rowNode)||this.isAggregateFilterPresent()&&!this.columnFilterService.doAggregateFiltersPass(e.rowNode,e.filterInstanceToSkip))}doesRowPassFilter(e){return!(this.isNonAggregateQuickFilterPresent()&&!this.quickFilterService.doesRowPassQuickFilter(e.rowNode)||this.isExternalFilterPresent()&&!this.doesExternalFilterPass(e.rowNode)||this.isColumnFilterPresent()&&!this.columnFilterService.doColumnFiltersPass(e.rowNode,e.filterInstanceToSkip)||this.isAdvancedFilterPresent()&&!this.advancedFilterService.doesFilterPass(e.rowNode))}isFilterActive(e){return!!this.columnFilterService?.isFilterActive(e)}getOrCreateFilterWrapper(e){return this.columnFilterService?.getOrCreateFilterWrapper(e)??null}getDefaultFloatingFilter(e){return this.columnFilterService.getDefaultFloatingFilter(e)}createFilterParams(e,t){return this.columnFilterService.createFilterParams(e,t)}isFilterAllowed(e){return!this.isAdvancedFilterEnabled()&&!!this.columnFilterService?.isFilterAllowed(e)}getFloatingFilterCompDetails(e,t){return this.columnFilterService?.getFloatingFilterCompDetails(e,t)}getCurrentFloatingFilterParentModel(e){return this.columnFilterService?.getCurrentFloatingFilterParentModel(e)}destroyFilter(e,t="api"){this.columnFilterService?.destroyFilter(e,t)}areFilterCompsDifferent(e,t){return!!this.columnFilterService?.areFilterCompsDifferent(e,t)}getAdvancedFilterModel(){return this.isAdvancedFilterEnabled()?this.advancedFilterService.getModel():null}setAdvancedFilterModel(e){if(this.isAdvancedFilterEnabled()){if(this.dataTypeService?.isPendingInference()){this.advancedFilterModelUpdateQueue.push(e);return}this.advancedFilterService.setModel(e??null),this.onFilterChanged({source:"advancedFilter"})}}toggleAdvancedFilterBuilder(e,t){this.isAdvancedFilterEnabled()&&this.advancedFilterService.getCtrl().toggleFilterBuilder({source:t,force:e})}updateAdvancedFilterColumns(){this.isAdvancedFilterEnabled()&&this.advancedFilterService.updateValidity()&&this.onFilterChanged({source:"advancedFilter"})}hasFloatingFilters(){return!this.isAdvancedFilterEnabled()&&!!this.columnFilterService?.hasFloatingFilters()}getFilterInstance(e,t){if(this.isAdvancedFilterEnabled()){this.warnAdvancedFilters();return}return this.columnFilterService?.getFilterInstance(e,t)}getColumnFilterInstance(e){return this.isAdvancedFilterEnabled()?(this.warnAdvancedFilters(),Promise.resolve(void 0)):this.columnFilterService?.getColumnFilterInstance(e)??Promise.resolve(void 0)}warnAdvancedFilters(){tO("Column Filter API methods have been disabled as Advanced Filters are enabled.")}setupAdvancedFilterHeaderComp(e){this.advancedFilterService?.getCtrl().setupHeaderComp(e)}getHeaderRowCount(){return this.isAdvancedFilterHeaderActive()?1:0}getHeaderHeight(){return this.isAdvancedFilterHeaderActive()?this.advancedFilterService.getCtrl().getHeaderHeight():0}processFilterModelUpdateQueue(){this.advancedFilterModelUpdateQueue.forEach(e=>this.setAdvancedFilterModel(e)),this.advancedFilterModelUpdateQueue=[]}getColumnFilterModel(e){return this.columnFilterService?.getColumnFilterModel(e)}setColumnFilterModel(e,t){return this.isAdvancedFilterEnabled()?(this.warnAdvancedFilters(),Promise.resolve()):this.columnFilterService?.setColumnFilterModel(e,t)??Promise.resolve()}setColDefPropertiesForDataType(e,t,i){this.columnFilterService?.setColDefPropertiesForDataType(e,t,i)}},oe=class extends sQ{constructor(e,t){super('<div class="ag-filter"></div>'),this.column=e,this.source=t,this.filterWrapper=null}wireBeans(e){this.filterManager=e.filterManager,this.columnModel=e.columnModel}postConstruct(){this.createFilter(!0),this.addManagedEventListeners({filterDestroyed:this.onFilterDestroyed.bind(this)})}hasFilter(){return!!this.filterWrapper}getFilter(){return this.filterWrapper?.filterPromise??null}afterInit(){return this.filterWrapper?.filterPromise?.then(()=>{})??ab.resolve()}afterGuiAttached(e){this.filterWrapper?.filterPromise?.then(t=>{t?.afterGuiAttached?.(e)})}afterGuiDetached(){this.filterWrapper?.filterPromise?.then(e=>{e?.afterGuiDetached?.()})}createFilter(e){let{column:t,source:i}=this;this.filterWrapper=this.filterManager?.getOrCreateFilterWrapper(t)??null,this.filterWrapper?.filterPromise&&this.filterWrapper.filterPromise.then(r=>{let s=r.getGui();tY(s)||tO(`getGui method from filter returned ${s}; it should be a DOM element.`),this.appendChild(s),e&&this.eventService.dispatchEvent({type:"filterOpened",column:t,source:i,eGui:this.getGui()})})}onFilterDestroyed(e){("api"===e.source||"paramsUpdated"===e.source)&&e.column.getId()===this.column.getId()&&this.columnModel.getColDefCol(this.column)&&(sL(this.getGui()),this.createFilter())}destroy(){this.filterWrapper=null,super.destroy()}},ot="ag-resizer-wrapper",oi=(e,t)=>`<div data-ref="${e}Resizer" class="ag-resizer ag-resizer-${t}"></div>`,or=`<div class="${ot}">
        ${oi("eTopLeft","topLeft")}
        ${oi("eTop","top")}
        ${oi("eTopRight","topRight")}
        ${oi("eRight","right")}
        ${oi("eBottomRight","bottomRight")}
        ${oi("eBottom","bottom")}
        ${oi("eBottomLeft","bottomLeft")}
        ${oi("eLeft","left")}
    </div>`,os=class extends i2{constructor(e,t){super(),this.element=e,this.dragStartPosition={x:0,y:0},this.position={x:0,y:0},this.lastSize={width:-1,height:-1},this.positioned=!1,this.resizersAdded=!1,this.resizeListeners=[],this.boundaryEl=null,this.isResizing=!1,this.isMoving=!1,this.resizable={},this.movable=!1,this.currentResizer=null,this.config=Object.assign({},{popup:!1},t)}wireBeans(e){this.popupService=e.popupService,this.resizeObserverService=e.resizeObserverService,this.dragService=e.dragService}center(){let{clientHeight:e,clientWidth:t}=this.offsetParent,i=t/2-this.getWidth()/2,r=e/2-this.getHeight()/2;this.offsetElement(i,r)}initialisePosition(){if(this.positioned)return;let{centered:e,forcePopupParentAsOffsetParent:t,minWidth:i,width:r,minHeight:s,height:a,x:o,y:n}=this.config;this.offsetParent||this.setOffsetParent();let l=0,h=0,d=sN(this.element);if(d){let e=this.findBoundaryElement(),t=window.getComputedStyle(e);if(null!=t.minWidth){let i=e.offsetWidth-this.element.offsetWidth;h=parseInt(t.minWidth,10)-i}if(null!=t.minHeight){let i=e.offsetHeight-this.element.offsetHeight;l=parseInt(t.minHeight,10)-i}}if(this.minHeight=s||l,this.minWidth=i||h,r&&this.setWidth(r),a&&this.setHeight(a),r&&a||this.refreshSize(),e)this.center();else if(o||n)this.offsetElement(o,n);else if(d&&t){let e=this.boundaryEl,t=!0;if(e||(e=this.findBoundaryElement(),t=!1),e){let i=parseFloat(e.style.top),r=parseFloat(e.style.left);t?this.offsetElement(isNaN(r)?0:r,isNaN(i)?0:i):this.setPosition(r,i)}}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;let i=this.moveElementDragListener||{eElement:t,onDragStart:this.onMoveStart.bind(this),onDragging:this.onMove.bind(this),onDragStop:this.onMoveEnd.bind(this)};e?(this.dragService.addDragSource(i),this.moveElementDragListener=i):(this.dragService.removeDragSource(i),this.moveElementDragListener=void 0)}setResizable(e){if(this.clearResizeListeners(),e?this.addResizers():this.removeResizers(),"boolean"==typeof e){if(!1===e)return;e={topLeft:e,top:e,topRight:e,right:e,bottomRight:e,bottom:e,bottomLeft:e,left:e}}Object.keys(e).forEach(t=>{let i=!!e[t],r=this.getResizerElement(t),s={dragStartPixels:0,eElement:r,onDragStart:e=>this.onResizeStart(e,t),onDragging:this.onResize.bind(this),onDragStop:e=>this.onResizeEnd(e,t)};!i&&(this.isAlive()||i)||(i?(this.dragService.addDragSource(s),this.resizeListeners.push(s),r.style.pointerEvents="all"):r.style.pointerEvents="none",this.resizable[t]=i)})}removeSizeFromEl(){this.element.style.removeProperty("height"),this.element.style.removeProperty("width"),this.element.style.removeProperty("flex")}restoreLastSize(){this.element.style.flex="0 0 auto";let{height:e,width:t}=this.lastSize;-1!==t&&(this.element.style.width=`${t}px`),-1!==e&&(this.element.style.height=`${e}px`)}getHeight(){return this.element.offsetHeight}setHeight(e){let{popup:t}=this.config,i=this.element,r=!1;if("string"==typeof e&&-1!==e.indexOf("%"))sj(i,e),e=sD(i),r=!0;else if(e=Math.max(this.minHeight,e),this.positioned){let t=this.getAvailableHeight();t&&e>t&&(e=t)}this.getHeight()!==e&&(r?(i.style.maxHeight="unset",i.style.minHeight="unset"):t?sj(i,e):(i.style.height=`${e}px`,i.style.flex="0 0 auto",this.lastSize.height="number"==typeof e?e:parseFloat(e)))}getAvailableHeight(){let{popup:e,forcePopupParentAsOffsetParent:t}=this.config;this.positioned||this.initialisePosition();let{clientHeight:i}=this.offsetParent;if(!i)return null;let r=this.element.getBoundingClientRect(),s=this.offsetParent.getBoundingClientRect(),a=e?this.position.y:r.top,o=e?0:s.top,n=0;if(t){let e=this.element.parentElement;if(e){let{bottom:t}=e.getBoundingClientRect();n=t-r.bottom}}return i+o-a-n}getWidth(){return this.element.offsetWidth}setWidth(e){let t=this.element,{popup:i}=this.config,r=!1;if("string"==typeof e&&-1!==e.indexOf("%"))sV(t,e),e=sI(t),r=!0;else if(this.positioned){e=Math.max(this.minWidth,e);let{clientWidth:t}=this.offsetParent,r=i?this.position.x:this.element.getBoundingClientRect().left;t&&e+r>t&&(e=t-r)}this.getWidth()!==e&&(r?(t.style.maxWidth="unset",t.style.minWidth="unset"):this.config.popup?sV(t,e):(t.style.width=`${e}px`,t.style.flex=" unset",this.lastSize.width="number"==typeof e?e:parseFloat(e)))}offsetElement(e=0,t=0){let{forcePopupParentAsOffsetParent:i}=this.config,r=i?this.boundaryEl:this.element;r&&(this.popupService.positionPopup({ePopup:r,keepWithinBounds:!0,skipObserver:this.movable||this.isResizable(),updatePosition:()=>({x:e,y:t})}),this.setPosition(parseFloat(r.style.left),parseFloat(r.style.top)))}constrainSizeToAvailableHeight(e){this.config.forcePopupParentAsOffsetParent&&(e?this.resizeObserverSubscriber=this.resizeObserverService.observeResize(this.popupService.getPopupParent(),()=>{let e=this.getAvailableHeight();this.element.style.setProperty("max-height",`${e}px`)}):(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){let{e:t,isLeft:i,isTop:r,anywhereWithin:s,topBuffer:a}=e,o=t.clientX-this.dragStartPosition.x,n=t.clientY-this.dragStartPosition.y;return{movementX:this.shouldSkipX(t,!!i,!!s,o)?0:o,movementY:this.shouldSkipY(t,!!r,a,n)?0:n}}shouldSkipX(e,t,i,r){let s=this.element.getBoundingClientRect(),a=this.offsetParent.getBoundingClientRect(),o=this.boundaryEl.getBoundingClientRect(),n=this.config.popup?this.position.x:s.left,l=n<=0&&a.left>=e.clientX||a.right<=e.clientX&&a.right<=o.right;return!!l||(l=t?r<0&&e.clientX>n+a.left||r>0&&e.clientX<n+a.left:i?r<0&&e.clientX>o.right||r>0&&e.clientX<n+a.left:r<0&&e.clientX>o.right||r>0&&e.clientX<o.right)}shouldSkipY(e,t,i=0,r){let s=this.element.getBoundingClientRect(),a=this.offsetParent.getBoundingClientRect(),o=this.boundaryEl.getBoundingClientRect(),n=this.config.popup?this.position.y:s.top,l=n<=0&&a.top>=e.clientY||a.bottom<=e.clientY&&a.bottom<=o.bottom;return!!l||(l=t?r<0&&e.clientY>n+a.top+i||r>0&&e.clientY<n+a.top:r<0&&e.clientY>o.bottom||r>0&&e.clientY<o.bottom)}createResizeMap(){let e=this.element;this.resizerMap={topLeft:{element:e.querySelector("[data-ref=eTopLeftResizer]")},top:{element:e.querySelector("[data-ref=eTopResizer]")},topRight:{element:e.querySelector("[data-ref=eTopRightResizer]")},right:{element:e.querySelector("[data-ref=eRightResizer]")},bottomRight:{element:e.querySelector("[data-ref=eBottomRightResizer]")},bottom:{element:e.querySelector("[data-ref=eBottomResizer]")},bottomLeft:{element:e.querySelector("[data-ref=eBottomLeftResizer]")},left:{element:e.querySelector("[data-ref=eLeftResizer]")}}}addResizers(){if(this.resizersAdded)return;let e=this.element;if(!e)return;let t=new DOMParser().parseFromString(or,"text/html").body;e.appendChild(t.firstChild),this.createResizeMap(),this.resizersAdded=!0}removeResizers(){this.resizerMap=void 0;let e=this.element.querySelector(`.${ot}`);e&&this.element.removeChild(e),this.resizersAdded=!1}getResizerElement(e){return this.resizerMap[e].element}onResizeStart(e,t){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.currentResizer={isTop:!!t.match(/top/i),isRight:!!t.match(/right/i),isBottom:!!t.match(/bottom/i),isLeft:!!t.match(/left/i)},this.element.classList.add("ag-resizing"),this.resizerMap[t].element.classList.add("ag-active");let{popup:i,forcePopupParentAsOffsetParent:r}=this.config;i||r||this.applySizeToSiblings(this.currentResizer.isBottom||this.currentResizer.isTop),this.isResizing=!0,this.updateDragStartPosition(e.clientX,e.clientY)}getSiblings(){let e=this.element.parentElement;return e?Array.prototype.slice.call(e.children).filter(e=>!e.classList.contains("ag-hidden")):null}getMinSizeOfSiblings(){let e=this.getSiblings()||[],t=0,i=0;for(let r=0;r<e.length;r++){let s=e[r],a=!!s.style.flex&&"0 0 auto"!==s.style.flex;if(s===this.element)continue;let o=this.minHeight||0,n=this.minWidth||0;if(a){let e=window.getComputedStyle(s);e.minHeight&&(o=parseInt(e.minHeight,10)),e.minWidth&&(n=parseInt(e.minWidth,10))}else o=s.offsetHeight,n=s.offsetWidth;t+=o,i+=n}return{height:t,width:i}}applySizeToSiblings(e){let t=null,i=this.getSiblings();if(i){for(let r=0;r<i.length;r++){let s=i[r];s!==t&&(e?s.style.height=`${s.offsetHeight}px`:s.style.width=`${s.offsetWidth}px`,s.style.flex="0 0 auto",s===this.element&&(t=i[r+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;let{popup:t,forcePopupParentAsOffsetParent:i}=this.config,{isTop:r,isRight:s,isBottom:a,isLeft:o}=this.currentResizer,n=s||o,l=a||r,{movementX:h,movementY:d}=this.calculateMouseMovement({e,isLeft:o,isTop:r}),c=this.position.x,u=this.position.y,p=0,g=0;if(n&&h){let e=o?-1:1,t=this.getWidth(),i=t+h*e,r=!1;o&&(c+(p=t-i)<=0||i<=this.minWidth)&&(r=!0,p=0),r||this.setWidth(i)}if(l&&d){let e=r?-1:1,t=this.getHeight(),i=t+d*e,s=!1;r?(u+(g=t-i)<=0||i<=this.minHeight)&&(s=!0,g=0):!this.config.popup&&!this.config.forcePopupParentAsOffsetParent&&t<i&&this.getMinSizeOfSiblings().height+i>this.element.parentElement.offsetHeight&&(s=!0),s||this.setHeight(i)}this.updateDragStartPosition(e.clientX,e.clientY),((t||i)&&p||g)&&this.offsetElement(c+p,u+g)}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(){let 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){let t;if(!this.isMoving)return;let{x:i,y:r}=this.position;this.config.calculateTopBuffer&&(t=this.config.calculateTopBuffer());let{movementX:s,movementY:a}=this.calculateMouseMovement({e,isTop:!0,anywhereWithin:!0,topBuffer:t});this.offsetElement(i+s,r+a),this.updateDragStartPosition(e.clientX,e.clientY)}onMoveEnd(){this.isMoving=!1,this.boundaryEl=null,this.element.classList.remove("ag-moving")}setOffsetParent(){this.config.forcePopupParentAsOffsetParent?this.offsetParent=this.popupService.getPopupParent():this.offsetParent=this.element.offsetParent}findBoundaryElement(){let e=this.element;for(;e;){if("static"!==window.getComputedStyle(e).position)return e;e=e.parentElement}return this.element}clearResizeListeners(){for(;this.resizeListeners.length;){let e=this.resizeListeners.pop();this.dragService.removeDragSource(e)}}destroy(){super.destroy(),this.moveElementDragListener&&this.dragService.removeDragSource(this.moveElementDragListener),this.constrainSizeToAvailableHeight(!1),this.clearResizeListeners(),this.removeResizers()}},oa=class e extends i2{constructor(e,t={}){super(),this.eFocusableElement=e,this.callbacks=t,this.callbacks={shouldStopEventPropagation:()=>!1,onTabKeyDown:e=>{if(e.defaultPrevented)return;let t=this.focusService.findNextFocusableElement(this.eFocusableElement,!1,e.shiftKey);t&&(t.focus(),e.preventDefault())},...t}}wireBeans(e){this.focusService=e.focusService}postConstruct(){this.eFocusableElement.classList.add(e.FOCUS_MANAGED_CLASS),this.addKeyDownListeners(this.eFocusableElement),this.callbacks.onFocusIn&&this.addManagedElementListeners(this.eFocusableElement,{focusin:this.callbacks.onFocusIn}),this.callbacks.onFocusOut&&this.addManagedElementListeners(this.eFocusableElement,{focusout:this.callbacks.onFocusOut})}addKeyDownListeners(e){this.addManagedElementListeners(e,{keydown:e=>{if(!(e.defaultPrevented||iQ(e))){if(this.callbacks.shouldStopEventPropagation(e)){iX(e);return}e.key===aa.TAB?this.callbacks.onTabKeyDown(e):this.callbacks.handleKeyDown&&this.callbacks.handleKeyDown(e)}}})}};oa.FOCUS_MANAGED_CLASS="ag-focus-managed";var oo={applyFilter:"Apply",clearFilter:"Clear",resetFilter:"Reset",cancelFilter:"Cancel",textFilter:"Text Filter",numberFilter:"Number Filter",dateFilter:"Date Filter",setFilter:"Set Filter",filterOoo:"Filter...",empty:"Choose one",equals:"Equals",notEqual:"Does not equal",lessThan:"Less than",greaterThan:"Greater than",inRange:"Between",inRangeStart:"From",inRangeEnd:"To",lessThanOrEqual:"Less than or equal to",greaterThanOrEqual:"Greater than or equal to",contains:"Contains",notContains:"Does not contain",startsWith:"Begins with",endsWith:"Ends with",blank:"Blank",notBlank:"Not blank",before:"Before",after:"After",andCondition:"AND",orCondition:"OR",dateFormatOoo:"yyyy-mm-dd"};function on(e,t){return ol(e)?(null!=e.debounceMs&&tO("debounceMs is ignored when apply button is present"),0):null!=e.debounceMs?e.debounceMs:t}function ol(e){return!!e.buttons&&e.buttons.indexOf("apply")>=0}var oh=class extends sQ{constructor(e){super(),this.filterNameKey=e,this.applyActive=!1,this.hidePopup=null,this.debouncePending=!1,this.appliedModel=null,this.eFilterBody=null,this.buttonListeners=[]}wireBeans(e){this.rowModel=e.rowModel}postConstruct(){this.resetTemplate(),this.createManagedBean(new oa(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)})),this.positionableFeature=new os(this.getPositionableElement(),{forcePopupParentAsOffsetParent:!0}),this.createBean(this.positionableFeature)}handleKeyDown(e){}getFilterTitle(){return this.translate(this.filterNameKey)}isFilterActive(){return!!this.appliedModel}resetTemplate(e){let t=this.getGui();t&&t.removeEventListener("submit",this.onFormSubmit);let i=`
            <form class="ag-filter-wrapper">
                <div class="ag-filter-body-wrapper ag-${this.getCssIdentifier()}-body-wrapper" data-ref="eFilterBody">
                    ${this.createBodyTemplate()}
                </div>
            </form>`;this.setTemplate(i,this.getAgComponents(),e),(t=this.getGui())&&t.addEventListener("submit",this.onFormSubmit)}isReadOnly(){return!!this.providedFilterParams.readOnly}init(e){this.setParams(e),this.resetUiToDefaults(!0).then(()=>{this.updateUiVisibility(),this.setupOnBtApplyDebounce()})}setParams(e){this.providedFilterParams=e,this.applyActive=ol(e),this.resetButtonsPanel(e)}updateParams(e){this.providedFilterParams=e,this.applyActive=ol(e),this.resetUiToActiveModel(this.getModel(),()=>{this.updateUiVisibility(),this.setupOnBtApplyDebounce()})}resetButtonsPanel(e,t){let{buttons:i,readOnly:r}=t??{},{buttons:s,readOnly:a}=e;if(r===a&&t0(i,s))return;let o=s&&s.length>0&&!this.isReadOnly();if(this.eButtonsPanel?(sL(this.eButtonsPanel),this.buttonListeners.forEach(e=>e()),this.buttonListeners=[]):o&&(this.eButtonsPanel=document.createElement("div"),this.eButtonsPanel.classList.add("ag-filter-apply-panel")),!o){this.eButtonsPanel&&sP(this.eButtonsPanel);return}let n=document.createDocumentFragment(),l=e=>{let t,i;switch(e){case"apply":t=this.translate("applyFilter"),i=e=>this.onBtApply(!1,!1,e);break;case"clear":t=this.translate("clearFilter"),i=()=>this.onBtClear();break;case"reset":t=this.translate("resetFilter"),i=()=>this.onBtReset();break;case"cancel":t=this.translate("cancelFilter"),i=e=>{this.onBtCancel(e)};break;default:tO("Unknown button type specified");return}let r=sO(`<button
                    type="${"apply"===e?"submit":"button"}"
                    data-ref="${e}FilterButton"
                    class="ag-button ag-standard-button ag-filter-apply-panel-button"
                >${t}
                </button>`);this.buttonListeners.push(...this.addManagedElementListeners(r,{click:i})),n.append(r)};s.forEach(e=>l(e)),this.eButtonsPanel.append(n),this.getGui().appendChild(this.eButtonsPanel)}getDefaultDebounceMs(){return 0}setupOnBtApplyDebounce(){let e=on(this.providedFilterParams,this.getDefaultDebounceMs()),t=tj(this.checkApplyDebounce.bind(this),e);this.onBtApplyDebounce=()=>{this.debouncePending=!0,t()}}checkApplyDebounce(){this.debouncePending&&(this.debouncePending=!1,this.onBtApply())}getModel(){return this.appliedModel?this.appliedModel:null}setModel(e){return(null!=e?this.setModelIntoUi(e):this.resetUiToDefaults()).then(()=>{this.updateUiVisibility(),this.applyModel("api")})}onBtCancel(e){this.resetUiToActiveModel(this.getModel(),()=>{this.handleCancelEnd(e)})}handleCancelEnd(e){this.providedFilterParams.closeOnApply&&this.close(e)}resetUiToActiveModel(e,t){let i=()=>{this.onUiChanged(!1,"prevent"),t?.()};null!=e?this.setModelIntoUi(e).then(i):this.resetUiToDefaults().then(i)}onBtClear(){this.resetUiToDefaults().then(()=>this.onUiChanged())}onBtReset(){this.onBtClear(),this.onBtApply()}applyModel(e="api"){let t=this.getModelFromUi();if(!this.isModelValid(t))return!1;let i=this.appliedModel;return this.appliedModel=t,!this.areModelsEqual(i,t)}isModelValid(e){return!0}onFormSubmit(e){e.preventDefault()}onBtApply(e=!1,t=!1,i){i&&i.preventDefault(),this.applyModel(t?"rowDataUpdated":"ui")&&this.providedFilterParams.filterChangedCallback({afterFloatingFilter:e,afterDataChange:t,source:"columnFilter"});let{closeOnApply:r}=this.providedFilterParams;r&&this.applyActive&&!e&&!t&&this.close(i)}onNewRowsLoaded(){}close(e){let t;if(!this.hidePopup)return;let i=e&&e.key;("Enter"===i||"Space"===i)&&(t={keyboardEvent:e}),this.hidePopup(t),this.hidePopup=null}onUiChanged(e=!1,t){if(this.updateUiVisibility(),this.providedFilterParams.filterModifiedCallback(),this.applyActive&&!this.isReadOnly()){let e=this.isModelValid(this.getModelFromUi()),t=this.queryForHtmlElement('[data-ref="applyFilterButton"]');t&&sb(t,!e)}e&&!t||"immediately"===t?this.onBtApply(e):(this.applyActive||t)&&"debounce"!==t||this.onBtApplyDebounce()}afterGuiAttached(e){e&&(this.hidePopup=e.hidePopup),this.refreshFilterResizer(e?.container)}refreshFilterResizer(e){if(!this.positionableFeature||"toolPanel"===e)return;let{positionableFeature:t,gos:i}=this;"floatingFilter"===e||"columnFilter"===e?(t.restoreLastSize(),t.setResizable(i.get("enableRtl")?{bottom:!0,bottomLeft:!0,left:!0}:{bottom:!0,bottomRight:!0,right:!0})):(this.positionableFeature.removeSizeFromEl(),this.positionableFeature.setResizable(!1)),this.positionableFeature.constrainSizeToAvailableHeight(!0)}afterGuiDetached(){this.checkApplyDebounce(),this.positionableFeature&&this.positionableFeature.constrainSizeToAvailableHeight(!1)}refresh(e){let t=this.providedFilterParams;return this.providedFilterParams=e,this.resetButtonsPanel(e,t),!0}destroy(){let e=this.getGui();e&&e.removeEventListener("submit",this.onFormSubmit),this.hidePopup=null,this.positionableFeature&&(this.positionableFeature=this.destroyBean(this.positionableFeature)),this.appliedModel=null,super.destroy()}translate(e){return this.localeService.getLocaleTextFunc()(e,oo[e])}getCellValue(e){return this.providedFilterParams.getValue(e)}getPositionableElement(){return this.eFilterBody}},od=class extends ah{constructor(e){super(e,"ag-radio-button","radio")}isSelected(){return this.eInput.checked}toggle(){!this.eInput.disabled&&(this.isSelected()||this.setValue(!0))}addInputListeners(){super.addInputListeners(),this.addManagedEventListeners({checkboxChanged:this.onChange.bind(this)})}onChange(e){e.selected&&e.name&&this.eInput.name&&this.eInput.name===e.name&&e.id&&this.eInput.id!==e.id&&this.setValue(!1,!0)}},oc=class extends sQ{constructor(e="default",t=!1){super(`<div class="ag-list ag-${e}-list" role="listbox"></div>`),this.cssIdentifier=e,this.unFocusable=t,this.activeClass="ag-active-item",this.options=[],this.itemEls=[]}postConstruct(){let e=this.getGui();this.addManagedElementListeners(e,{mouseleave:()=>this.clearHighlighted()}),this.unFocusable||this.addManagedElementListeners(e,{keydown:this.handleKeyDown.bind(this)})}handleKeyDown(e){let t=e.key;switch(t){case aa.ENTER:if(this.highlightedEl){let e=this.itemEls.indexOf(this.highlightedEl);this.setValueByIndex(e)}else this.setValue(this.getValue());break;case aa.DOWN:case aa.UP:e.preventDefault(),this.navigate(t);break;case aa.PAGE_DOWN:case aa.PAGE_UP:case aa.PAGE_HOME:case aa.PAGE_END:e.preventDefault(),this.navigateToPage(t)}}navigate(e){let t;let i=e===aa.DOWN;if(this.highlightedEl){let e=this.itemEls.indexOf(this.highlightedEl)+(i?1:-1);e=Math.min(Math.max(e,0),this.itemEls.length-1),t=this.itemEls[e]}else t=this.itemEls[i?0:this.itemEls.length-1];this.highlightItem(t)}navigateToPage(e){if(!this.highlightedEl||0===this.itemEls.length)return;let t=this.itemEls.indexOf(this.highlightedEl),i=this.options.length-1,r=this.itemEls[0].clientHeight,s=Math.floor(this.getGui().clientHeight/r),a=-1;e===aa.PAGE_HOME?a=0:e===aa.PAGE_END?a=i:e===aa.PAGE_DOWN?a=Math.min(t+s,i):e===aa.PAGE_UP&&(a=Math.max(t-s,0)),-1!==a&&this.highlightItem(this.itemEls[a])}addOptions(e){return e.forEach(e=>this.addOption(e)),this}addOption(e){let{value:t,text:i}=e,r=i||t;return this.options.push({value:t,text:r}),this.renderOption(t,r),this.updateIndices(),this}clearOptions(){this.options=[],this.reset(!0),this.itemEls.forEach(e=>{sP(e)}),this.itemEls=[]}updateIndices(){let e=this.getGui().querySelectorAll(".ag-list-item");e.forEach((t,i)=>{r9(t,i+1),r7(t,e.length)})}renderOption(e,t){let i=ia(this.gos),r=i.createElement("div");rQ(r,"option"),r.classList.add("ag-list-item",`ag-${this.cssIdentifier}-list-item`);let s=i.createElement("span");r.appendChild(s),s.textContent=t,this.unFocusable||(r.tabIndex=-1),this.itemEls.push(r),this.addManagedListeners(r,{mouseover:()=>this.highlightItem(r),mousedown:t=>{t.preventDefault(),t.stopPropagation(),this.setValue(e)}}),this.createManagedBean(new sq({getTooltipValue:()=>t,getGui:()=>r,getLocation:()=>"UNKNOWN",shouldDisplayTooltip:()=>s.scrollWidth>s.clientWidth})),this.getGui().appendChild(r)}setValue(e,t){if(this.value===e)return this.fireItemSelected(),this;if(null==e)return this.reset(t),this;let i=this.options.findIndex(t=>t.value===e);if(-1!==i){let e=this.options[i];this.value=e.value,this.displayValue=e.text,this.highlightItem(this.itemEls[i]),t||this.fireChangeEvent()}return this}setValueByIndex(e){return this.setValue(this.options[e].value)}getValue(){return this.value}getDisplayValue(){return this.displayValue}refreshHighlighted(){this.clearHighlighted();let e=this.options.findIndex(e=>e.value===this.value);-1!==e&&this.highlightItem(this.itemEls[e])}reset(e){this.value=null,this.displayValue=null,this.clearHighlighted(),e||this.fireChangeEvent()}highlightItem(e){if(!sN(e))return;this.clearHighlighted(),this.highlightedEl=e,this.highlightedEl.classList.add(this.activeClass),sr(this.highlightedEl,!0);let{scrollTop:t,clientHeight:i}=this.getGui(),{offsetTop:r,offsetHeight:s}=e;(r+s>t+i||r<t)&&this.highlightedEl.scrollIntoView({block:"nearest"}),this.unFocusable||this.highlightedEl.focus()}clearHighlighted(){this.highlightedEl&&sN(this.highlightedEl)&&(this.highlightedEl.classList.remove(this.activeClass),sr(this.highlightedEl,!1),this.highlightedEl=null)}fireChangeEvent(){this.dispatchLocalEvent({type:"fieldValueChanged"}),this.fireItemSelected()}fireItemSelected(){this.dispatchLocalEvent({type:"selectedItem"})}},ou=class extends an{constructor(e){if(super(e,e?.template||`
            <div class="ag-picker-field" role="presentation">
                <div data-ref="eLabel"></div>
                <div data-ref="eWrapper" class="ag-wrapper ag-picker-field-wrapper ag-picker-collapsed">
                    <div data-ref="eDisplayField" class="ag-picker-field-display"></div>
                    <div data-ref="eIcon" class="ag-picker-field-icon" aria-hidden="true"></div>
                </div>
            </div>`,e?.agComponents||[],e?.className),this.isPickerDisplayed=!1,this.skipClick=!1,this.pickerGap=4,this.hideCurrentPicker=null,this.eLabel=null,this.eWrapper=null,this.eDisplayField=null,this.eIcon=null,this.ariaRole=e?.ariaRole,this.onPickerFocusIn=this.onPickerFocusIn.bind(this),this.onPickerFocusOut=this.onPickerFocusOut.bind(this),!e)return;let{pickerGap:t,maxPickerHeight:i,variableWidth:r,minPickerWidth:s,maxPickerWidth:a}=e;null!=t&&(this.pickerGap=t),this.variableWidth=!!r,null!=i&&this.setPickerMaxHeight(i),null!=s&&this.setPickerMinWidth(s),null!=a&&this.setPickerMaxWidth(a)}wireBeans(e){this.popupService=e.popupService}postConstruct(){super.postConstruct(),this.setupAria();let e=`ag-${this.getCompId()}-display`;this.eDisplayField.setAttribute("id",e);let t=this.getAriaElement();this.addManagedElementListeners(t,{keydown:this.onKeyDown.bind(this)}),this.addManagedElementListeners(this.eLabel,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)}),this.addManagedElementListeners(this.eWrapper,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)});let{pickerIcon:i,inputWidth:r}=this.config;if(i){let e=s2(i,this.gos);e&&this.eIcon.appendChild(e)}null!=r&&this.setInputWidth(r)}setupAria(){let e=this.getAriaElement();e.setAttribute("tabindex",this.gos.get("tabIndex").toString()),r5(e,!1),this.ariaRole&&rQ(e,this.ariaRole)}onLabelOrWrapperMouseDown(e){if(e){let t=this.getFocusableElement();if(t!==this.eWrapper&&e?.target===t)return;e.preventDefault(),this.getFocusableElement().focus()}if(this.skipClick){this.skipClick=!1;return}this.isDisabled()||(this.isPickerDisplayed?this.hidePicker():this.showPicker())}onKeyDown(e){switch(e.key){case aa.UP:case aa.DOWN:case aa.ENTER:case aa.SPACE:e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case aa.ESCAPE:this.isPickerDisplayed&&(e.preventDefault(),e.stopPropagation(),this.hideCurrentPicker&&this.hideCurrentPicker())}}showPicker(){this.isPickerDisplayed=!0,this.pickerComponent||(this.pickerComponent=this.createPickerComponent());let e=this.pickerComponent.getGui();e.addEventListener("focusin",this.onPickerFocusIn),e.addEventListener("focusout",this.onPickerFocusOut),this.hideCurrentPicker=this.renderAndPositionPicker(),this.toggleExpandedStyles(!0)}renderAndPositionPicker(){let e=this.pickerComponent.getGui();this.gos.get("suppressScrollWhenPopupsAreOpen")||([this.destroyMouseWheelFunc]=this.addManagedEventListeners({bodyScroll:()=>{this.hidePicker()}}));let t=this.localeService.getLocaleTextFunc(),{pickerAriaLabelKey:i,pickerAriaLabelValue:r,modalPicker:s=!0}=this.config,a={modal:s,eChild:e,closeOnEsc:!0,closedCallback:()=>{let e=id(this.gos);this.beforeHidePicker(),e&&this.isAlive()&&this.getFocusableElement().focus()},ariaLabel:t(i,r),anchorToElement:this.eWrapper};e.style.position="absolute";let o=this.popupService.addPopup(a),{maxPickerHeight:n,minPickerWidth:l,maxPickerWidth:h,variableWidth:d}=this;d?(l&&(e.style.minWidth=l),e.style.width=sH(sI(this.eWrapper)),h&&(e.style.maxWidth=h)):s_(e,h??sI(this.eWrapper));let c=n??`${sM(this.popupService.getPopupParent())}px`;return e.style.setProperty("max-height",c),this.alignPickerToComponent(),o.hideFunc}alignPickerToComponent(){if(!this.pickerComponent)return;let{pickerType:e}=this.config,{pickerGap:t}=this,i=this.gos.get("enableRtl")?"right":"left";this.popupService.positionPopupByComponent({type:e,eventSource:this.eWrapper,ePopup:this.pickerComponent.getGui(),position:"under",alignSide:i,keepWithinBounds:!0,nudgeY:t})}beforeHidePicker(){this.destroyMouseWheelFunc&&(this.destroyMouseWheelFunc(),this.destroyMouseWheelFunc=void 0),this.toggleExpandedStyles(!1);let e=this.pickerComponent.getGui();e.removeEventListener("focusin",this.onPickerFocusIn),e.removeEventListener("focusout",this.onPickerFocusOut),this.isPickerDisplayed=!1,this.pickerComponent=void 0,this.hideCurrentPicker=null}toggleExpandedStyles(e){this.isAlive()&&(r5(this.getAriaElement(),e),this.eWrapper.classList.toggle("ag-picker-expanded",e),this.eWrapper.classList.toggle("ag-picker-collapsed",!e))}onPickerFocusIn(){this.togglePickerHasFocus(!0)}onPickerFocusOut(e){this.pickerComponent?.getGui().contains(e.relatedTarget)||this.togglePickerHasFocus(!1)}togglePickerHasFocus(e){this.pickerComponent&&this.eWrapper.classList.toggle("ag-picker-has-focus",e)}hidePicker(){this.hideCurrentPicker&&this.hideCurrentPicker()}setInputWidth(e){return s_(this.eWrapper,e),this}getFocusableElement(){return this.eWrapper}setPickerGap(e){return this.pickerGap=e,this}setPickerMinWidth(e){return"number"==typeof e&&(e=`${e}px`),this.minPickerWidth=null==e?void 0:e,this}setPickerMaxWidth(e){return"number"==typeof e&&(e=`${e}px`),this.maxPickerWidth=null==e?void 0:e,this}setPickerMaxHeight(e){return"number"==typeof e&&(e=`${e}px`),this.maxPickerHeight=null==e?void 0:e,this}destroy(){this.hidePicker(),super.destroy()}},op=class extends ou{constructor(e){super({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"smallDown",ariaRole:"combobox",...e})}postConstruct(){super.postConstruct(),this.createListComponent(),this.eWrapper.tabIndex=this.gos.get("tabIndex");let{options:e,value:t,placeholder:i}=this.config;null!=e&&this.addOptions(e),null!=t&&this.setValue(t,!0),i&&null==t&&(this.eDisplayField.textContent=i),this.addManagedElementListeners(this.eWrapper,{focusout:this.onWrapperFocusOut.bind(this)})}onWrapperFocusOut(e){this.eWrapper.contains(e.relatedTarget)||this.hidePicker()}createListComponent(){this.listComponent=this.createBean(new oc("select",!0)),this.listComponent.setParentComponent(this);let e=this.listComponent.getAriaElement(),t=`ag-select-list-${this.listComponent.getCompId()}`;e.setAttribute("id",t),ss(this.getAriaElement(),e),this.listComponent.addManagedListeners(this.listComponent,{selectedItem:()=>{this.hidePicker(),this.dispatchLocalEvent({type:"selectedItem"})}}),this.listComponent.addManagedListeners(this.listComponent,{fieldValueChanged:()=>{this.listComponent&&(this.setValue(this.listComponent.getValue(),!1,!0),this.hidePicker())}})}createPickerComponent(){return this.listComponent}onKeyDown(e){let{key:t}=e;switch(t===aa.TAB&&this.hidePicker(),t){case aa.ENTER:case aa.UP:case aa.DOWN:case aa.PAGE_UP:case aa.PAGE_DOWN:case aa.PAGE_HOME:case aa.PAGE_END:e.preventDefault(),this.isPickerDisplayed?this.listComponent?.handleKeyDown(e):super.onKeyDown(e);break;case aa.ESCAPE:super.onKeyDown(e);break;case aa.SPACE:this.isPickerDisplayed?e.preventDefault():super.onKeyDown(e)}}showPicker(){this.listComponent&&(super.showPicker(),this.listComponent.refreshHighlighted())}addOptions(e){return e.forEach(e=>this.addOption(e)),this}addOption(e){return this.listComponent.addOption(e),this}clearOptions(){return this.listComponent?.clearOptions(),this}setValue(e,t,i){if(this.value===e||!this.listComponent||(i||this.listComponent.setValue(e,!0),this.listComponent.getValue()===this.getValue()))return this;let r=this.listComponent.getDisplayValue();return null==r&&this.config.placeholder&&(r=this.config.placeholder),this.eDisplayField.textContent=r,this.setTooltip({newTooltipText:r??null,shouldDisplayTooltip:()=>this.eDisplayField.scrollWidth>this.eDisplayField.clientWidth}),super.setValue(e,t)}destroy(){this.listComponent&&(this.listComponent=this.destroyBean(this.listComponent)),super.destroy()}},og={selector:"AG-SELECT",component:op},om=class{constructor(){this.customFilterOptions={}}init(e,t){this.filterOptions=e.filterOptions||t,this.mapCustomOptions(),this.selectDefaultItem(e)}getFilterOptions(){return this.filterOptions}mapCustomOptions(){this.filterOptions&&this.filterOptions.forEach(e=>{if("string"!=typeof e){if(![["displayKey"],["displayName"],["predicate","test"]].every(t=>!!t.some(t=>null!=e[t])||(tO(`ignoring FilterOptionDef as it doesn't contain one of '${t}'`),!1))){this.filterOptions=this.filterOptions.filter(t=>t===e)||[];return}this.customFilterOptions[e.displayKey]=e}})}selectDefaultItem(e){if(e.defaultOption)this.defaultOption=e.defaultOption;else if(this.filterOptions.length>=1){let e=this.filterOptions[0];"string"==typeof e?this.defaultOption=e:e.displayKey?this.defaultOption=e.displayKey:tO("invalid FilterOptionDef supplied as it doesn't contain a 'displayKey'")}else tO("no filter options for filter")}getDefaultOption(){return this.defaultOption}getCustomOption(e){return this.customFilterOptions[e]}},of=class extends oh{constructor(){super(...arguments),this.eTypes=[],this.eJoinOperatorPanels=[],this.eJoinOperatorsAnd=[],this.eJoinOperatorsOr=[],this.eConditionBodies=[],this.listener=()=>this.onUiChanged(),this.lastUiCompletePosition=null,this.joinOperatorId=0}getNumberOfInputs(e){let t=this.optionsFactory.getCustomOption(e);if(t){let{numberOfInputs:e}=t;return null!=e?e:1}return e&&["empty","notBlank","blank"].indexOf(e)>=0?0:"inRange"===e?2:1}onFloatingFilterChanged(e,t){this.setTypeFromFloatingFilter(e),this.setValueFromFloatingFilter(t),this.onUiChanged(!0)}setTypeFromFloatingFilter(e){this.eTypes.forEach((t,i)=>{0===i?t.setValue(e,!0):t.setValue(this.optionsFactory.getDefaultOption(),!0)})}getModelFromUi(){let e=this.getUiCompleteConditions();return 0===e.length?null:this.maxNumConditions>1&&e.length>1?{filterType:this.getFilterType(),operator:this.getJoinOperator(),conditions:e}:e[0]}getConditionTypes(){return this.eTypes.map(e=>e.getValue())}getConditionType(e){return this.eTypes[e].getValue()}getJoinOperator(){return 0===this.eJoinOperatorsOr.length?this.defaultJoinOperator:!0===this.eJoinOperatorsOr[0].getValue()?"OR":"AND"}areModelsEqual(e,t){if(!e&&!t)return!0;if(!e&&t||e&&!t)return!1;let i=!e.operator,r=!t.operator;return(!!i||!r)&&(!i||!!r)&&(i?this.areSimpleModelsEqual(e,t):e.operator===t.operator&&iG(e.conditions,t.conditions,(e,t)=>this.areSimpleModelsEqual(e,t)))}shouldRefresh(e){let t=this.getModel(),i=t?t.conditions??[t]:null,r=e.filterOptions?.map(e=>"string"==typeof e?e:e.displayKey)??this.getDefaultFilterOptions();return!!(!i||i.every(e=>void 0!==r.find(t=>t===e.type)))&&("number"!=typeof e.maxNumConditions||!i||!(i.length>e.maxNumConditions))}refresh(e){return!!(this.shouldRefresh(e)&&super.refresh(e))&&(this.setParams(e),this.removeConditionsAndOperators(0),this.createOption(),this.setModel(this.getModel()),!0)}setModelIntoUi(e){if(e.operator){let t=e.conditions;null==t&&(t=[],tO("Filter model is missing 'conditions'"));let i=this.validateAndUpdateConditions(t),r=this.getNumConditions();if(i<r)this.removeConditionsAndOperators(i);else if(i>r)for(let e=r;e<i;e++)this.createJoinOperatorPanel(),this.createOption();let s="OR"===e.operator;this.eJoinOperatorsAnd.forEach(e=>e.setValue(!s,!0)),this.eJoinOperatorsOr.forEach(e=>e.setValue(s,!0)),t.forEach((e,t)=>{this.eTypes[t].setValue(e.type,!0),this.setConditionIntoUi(e,t)})}else this.getNumConditions()>1&&this.removeConditionsAndOperators(1),this.eTypes[0].setValue(e.type,!0),this.setConditionIntoUi(e,0);return this.lastUiCompletePosition=this.getNumConditions()-1,this.createMissingConditionsAndOperators(),this.onUiChanged(),ab.resolve()}validateAndUpdateConditions(e){let t=e.length;return t>this.maxNumConditions&&(e.splice(this.maxNumConditions),tO('Filter Model contains more conditions than "filterParams.maxNumConditions". Additional conditions have been ignored.'),t=this.maxNumConditions),t}doesFilterPass(e){let t=this.getModel();if(null==t)return!0;let{operator:i}=t,r=[];return i?r.push(...t.conditions??[]):r.push(t),r[i&&"OR"===i?"some":"every"](t=>this.individualConditionPasses(e,t))}setParams(e){super.setParams(e),this.setNumConditions(e),this.defaultJoinOperator=this.getDefaultJoinOperator(e.defaultJoinOperator),this.filterPlaceholder=e.filterPlaceholder,this.optionsFactory=new om,this.optionsFactory.init(e,this.getDefaultFilterOptions()),this.createFilterListOptions(),this.createOption(),this.createMissingConditionsAndOperators(),this.isReadOnly()&&this.eFilterBody.setAttribute("tabindex","-1")}setNumConditions(e){this.maxNumConditions=e.maxNumConditions??2,this.maxNumConditions<1&&(tO('"filterParams.maxNumConditions" must be greater than or equal to zero.'),this.maxNumConditions=1),this.numAlwaysVisibleConditions=e.numAlwaysVisibleConditions??1,this.numAlwaysVisibleConditions<1&&(tO('"filterParams.numAlwaysVisibleConditions" must be greater than or equal to zero.'),this.numAlwaysVisibleConditions=1),this.numAlwaysVisibleConditions>this.maxNumConditions&&(tO('"filterParams.numAlwaysVisibleConditions" cannot be greater than "filterParams.maxNumConditions".'),this.numAlwaysVisibleConditions=this.maxNumConditions)}createOption(){let e=this.createManagedBean(new op);this.eTypes.push(e),e.addCssClass("ag-filter-select"),this.eFilterBody.appendChild(e.getGui());let t=this.createValueElement();this.eConditionBodies.push(t),this.eFilterBody.appendChild(t),this.putOptionsIntoDropdown(e),this.resetType(e);let i=this.getNumConditions()-1;this.forEachPositionInput(i,e=>this.resetInput(e)),this.addChangedListeners(e,i)}createJoinOperatorPanel(){let e=document.createElement("div");this.eJoinOperatorPanels.push(e),e.classList.add("ag-filter-condition");let t=this.createJoinOperator(this.eJoinOperatorsAnd,e,"and"),i=this.createJoinOperator(this.eJoinOperatorsOr,e,"or");this.eFilterBody.appendChild(e);let r=this.eJoinOperatorPanels.length-1,s=this.joinOperatorId++;this.resetJoinOperatorAnd(t,r,s),this.resetJoinOperatorOr(i,r,s),this.isReadOnly()||(t.onValueChange(this.listener),i.onValueChange(this.listener))}createJoinOperator(e,t,i){let r=this.createManagedBean(new od);return e.push(r),r.addCssClass("ag-filter-condition-operator"),r.addCssClass(`ag-filter-condition-operator-${i}`),t.appendChild(r.getGui()),r}getDefaultJoinOperator(e){return"AND"===e||"OR"===e?e:"AND"}createFilterListOptions(){let e=this.optionsFactory.getFilterOptions();this.filterListOptions=e.map(e=>"string"==typeof e?this.createBoilerplateListOption(e):this.createCustomListOption(e))}putOptionsIntoDropdown(e){this.filterListOptions.forEach(t=>{e.addOption(t)}),e.setDisabled(this.filterListOptions.length<=1)}createBoilerplateListOption(e){return{value:e,text:this.translate(e)}}createCustomListOption(e){let{displayKey:t}=e,i=this.optionsFactory.getCustomOption(e.displayKey);return{value:t,text:i?this.localeService.getLocaleTextFunc()(i.displayKey,i.displayName):this.translate(t)}}createBodyTemplate(){return""}getAgComponents(){return[]}getCssIdentifier(){return"simple-filter"}updateUiVisibility(){let e=this.getJoinOperator();this.updateNumConditions(),this.updateConditionStatusesAndValues(this.lastUiCompletePosition,e)}updateNumConditions(){let e=-1,t=!0;for(let i=0;i<this.getNumConditions();i++)this.isConditionUiComplete(i)?e=i:t=!1;if(this.shouldAddNewConditionAtEnd(t))this.createJoinOperatorPanel(),this.createOption();else{let t=this.lastUiCompletePosition??this.getNumConditions()-2;if(e<t){this.removeConditionsAndOperators(t+1);let i=e+1,r=t-i;r>0&&this.removeConditionsAndOperators(i,r),this.createMissingConditionsAndOperators()}}this.lastUiCompletePosition=e}updateConditionStatusesAndValues(e,t){this.eTypes.forEach((t,i)=>{let r=this.isConditionDisabled(i,e);t.setDisabled(r||this.filterListOptions.length<=1),1===i&&(sb(this.eJoinOperatorPanels[0],r),this.eJoinOperatorsAnd[0].setDisabled(r),this.eJoinOperatorsOr[0].setDisabled(r))}),this.eConditionBodies.forEach((e,t)=>{sC(e,this.isConditionBodyVisible(t))});let i=(t??this.getJoinOperator())==="OR";this.eJoinOperatorsAnd.forEach(e=>{e.setValue(!i,!0)}),this.eJoinOperatorsOr.forEach(e=>{e.setValue(i,!0)}),this.forEachInput((t,i,r,s)=>{this.setElementDisplayed(t,i<s),this.setElementDisabled(t,this.isConditionDisabled(r,e))}),this.resetPlaceholder()}shouldAddNewConditionAtEnd(e){return e&&this.getNumConditions()<this.maxNumConditions&&!this.isReadOnly()}removeConditionsAndOperators(e,t){if(e>=this.getNumConditions())return;this.removeComponents(this.eTypes,e,t),this.removeElements(this.eConditionBodies,e,t),this.removeValueElements(e,t);let i=Math.max(e-1,0);this.removeElements(this.eJoinOperatorPanels,i,t),this.removeComponents(this.eJoinOperatorsAnd,i,t),this.removeComponents(this.eJoinOperatorsOr,i,t)}removeElements(e,t,i){this.removeItems(e,t,i).forEach(e=>sP(e))}removeComponents(e,t,i){this.removeItems(e,t,i).forEach(e=>{sP(e.getGui()),this.destroyBean(e)})}removeItems(e,t,i){return null==i?e.splice(t):e.splice(t,i)}afterGuiAttached(e){if(super.afterGuiAttached(e),this.resetPlaceholder(),!e?.suppressFocus){if(this.isReadOnly())this.eFilterBody.focus();else{let e=this.getInputs(0)[0];if(!e)return;e instanceof al&&e.getInputElement().focus()}}}afterGuiDetached(){super.afterGuiDetached();let e=this.getModel();this.resetUiToActiveModel(e);let t=-1,i=-1,r=!1,s=this.getJoinOperator();for(let e=this.getNumConditions()-1;e>=0;e--)if(this.isConditionUiComplete(e))-1===t&&(t=e,i=e);else{let s=e>=this.numAlwaysVisibleConditions&&!this.isConditionUiComplete(e-1),a=e<t;(s||a)&&(this.removeConditionsAndOperators(e,1),r=!0,a&&i--)}let a=!1;this.getNumConditions()<this.numAlwaysVisibleConditions&&(this.createMissingConditionsAndOperators(),a=!0),this.shouldAddNewConditionAtEnd(i===this.getNumConditions()-1)&&(this.createJoinOperatorPanel(),this.createOption(),a=!0),a&&this.updateConditionStatusesAndValues(i,s),r&&this.updateJoinOperatorsDisabled(),this.lastUiCompletePosition=i}getPlaceholderText(e,t){let i=this.translate(e);if(tG(this.filterPlaceholder)){let e=this.filterPlaceholder,r=this.eTypes[t].getValue(),s=this.translate(r);i=e({filterOptionKey:r,filterOption:s,placeholder:i})}else"string"==typeof this.filterPlaceholder&&(i=this.filterPlaceholder);return i}resetPlaceholder(){let e=this.localeService.getLocaleTextFunc();this.forEachInput((t,i,r,s)=>{if(!(t instanceof al))return;let a=0===i&&s>1?e("ariaFilterFromValue","Filter from value"):0===i?e("ariaFilterValue","Filter Value"):e("ariaFilterToValue","Filter to Value");t.setInputPlaceholder(this.getPlaceholderText(0===i&&s>1?"inRangeStart":0===i?"filterOoo":"inRangeEnd",r)),t.setInputAriaLabel(a)})}setElementValue(e,t,i){e instanceof al&&e.setValue(null!=t?String(t):null,!0)}setElementDisplayed(e,t){e instanceof sQ&&sC(e.getGui(),t)}setElementDisabled(e,t){e instanceof sQ&&sb(e.getGui(),t)}attachElementOnChange(e,t){e instanceof al&&e.onValueChange(t)}forEachInput(e){this.getConditionTypes().forEach((t,i)=>{this.forEachPositionTypeInput(i,t,e)})}forEachPositionInput(e,t){let i=this.getConditionType(e);this.forEachPositionTypeInput(e,i,t)}forEachPositionTypeInput(e,t,i){let r=this.getNumberOfInputs(t),s=this.getInputs(e);for(let t=0;t<s.length;t++){let a=s[t];null!=a&&i(a,t,e,r)}}isConditionDisabled(e,t){return!!this.isReadOnly()||0!==e&&e>t+1}isConditionBodyVisible(e){let t=this.getConditionType(e);return this.getNumberOfInputs(t)>0}isConditionUiComplete(e){return!(e>=this.getNumConditions()||"empty"===this.getConditionType(e)||this.getValues(e).some(e=>null==e))}getNumConditions(){return this.eTypes.length}getUiCompleteConditions(){let e=[];for(let t=0;t<this.getNumConditions();t++)this.isConditionUiComplete(t)&&e.push(this.createCondition(t));return e}createMissingConditionsAndOperators(){if(!this.isReadOnly())for(let e=this.getNumConditions();e<this.numAlwaysVisibleConditions;e++)this.createJoinOperatorPanel(),this.createOption()}resetUiToDefaults(e){return this.removeConditionsAndOperators(this.isReadOnly()?1:this.numAlwaysVisibleConditions),this.eTypes.forEach(e=>this.resetType(e)),this.eJoinOperatorsAnd.forEach((e,t)=>this.resetJoinOperatorAnd(e,t,this.joinOperatorId+t)),this.eJoinOperatorsOr.forEach((e,t)=>this.resetJoinOperatorOr(e,t,this.joinOperatorId+t)),this.joinOperatorId++,this.forEachInput(e=>this.resetInput(e)),this.resetPlaceholder(),this.createMissingConditionsAndOperators(),this.lastUiCompletePosition=null,e||this.onUiChanged(),ab.resolve()}resetType(e){let t=this.localeService.getLocaleTextFunc()("ariaFilteringOperator","Filtering operator");e.setValue(this.optionsFactory.getDefaultOption(),!0).setAriaLabel(t).setDisabled(this.isReadOnly()||this.filterListOptions.length<=1)}resetJoinOperatorAnd(e,t,i){this.resetJoinOperator(e,t,this.isDefaultOperator("AND"),this.translate("andCondition"),i)}resetJoinOperatorOr(e,t,i){this.resetJoinOperator(e,t,this.isDefaultOperator("OR"),this.translate("orCondition"),i)}resetJoinOperator(e,t,i,r,s){this.updateJoinOperatorDisabled(e.setValue(i,!0).setName(`ag-simple-filter-and-or-${this.getCompId()}-${s}`).setLabel(r),t)}updateJoinOperatorsDisabled(){this.eJoinOperatorsAnd.forEach((e,t)=>this.updateJoinOperatorDisabled(e,t)),this.eJoinOperatorsOr.forEach((e,t)=>this.updateJoinOperatorDisabled(e,t))}updateJoinOperatorDisabled(e,t){e.setDisabled(this.isReadOnly()||t>0)}resetInput(e){this.setElementValue(e,null),this.setElementDisabled(e,this.isReadOnly())}setConditionIntoUi(e,t){let i=this.mapValuesFromModel(e);this.forEachInput((e,r,s)=>{s===t&&this.setElementValue(e,null!=i[r]?i[r]:null)})}setValueFromFloatingFilter(e){this.forEachInput((t,i,r)=>{this.setElementValue(t,0===i&&0===r?e:null,!0)})}isDefaultOperator(e){return e===this.defaultJoinOperator}addChangedListeners(e,t){this.isReadOnly()||(e.onValueChange(this.listener),this.forEachPositionInput(t,e=>{this.attachElementOnChange(e,this.listener)}))}individualConditionPasses(e,t){let i=this.getCellValue(e.node),r=this.mapValuesFromModel(t),s=this.optionsFactory.getCustomOption(t.type),a=this.evaluateCustomFilter(s,r,i);return null!=a?a:null==i?this.evaluateNullValue(t.type):this.evaluateNonNullValue(r,i,t,e)}evaluateCustomFilter(e,t,i){if(null==e)return;let{predicate:r}=e;if(null!=r&&!t.some(e=>null==e))return r(t,i)}isBlank(e){return null==e||"string"==typeof e&&0===e.trim().length}hasInvalidInputs(){return!1}},ov=class extends of{setParams(e){super.setParams(e),this.scalarFilterParams=e}evaluateNullValue(e){switch(e){case"equals":if(this.scalarFilterParams.includeBlanksInEquals)return!0;break;case"notEqual":if(this.scalarFilterParams.includeBlanksInNotEqual)return!0;break;case"greaterThan":case"greaterThanOrEqual":if(this.scalarFilterParams.includeBlanksInGreaterThan)return!0;break;case"lessThan":case"lessThanOrEqual":if(this.scalarFilterParams.includeBlanksInLessThan)return!0;break;case"inRange":if(this.scalarFilterParams.includeBlanksInRange)return!0;break;case"blank":return!0}return!1}evaluateNonNullValue(e,t,i){let r=this.comparator(),s=null!=e[0]?r(e[0],t):0;switch(i.type){case"equals":return 0===s;case"notEqual":return 0!==s;case"greaterThan":return s>0;case"greaterThanOrEqual":return s>=0;case"lessThan":return s<0;case"lessThanOrEqual":return s<=0;case"inRange":{let i=r(e[1],t);return this.scalarFilterParams.inRangeInclusive?s>=0&&i<=0:s>0&&i<0}case"blank":return this.isBlank(t);case"notBlank":return!this.isBlank(t);default:return tO('Unexpected type of filter "'+i.type+'", it looks like the filter was configured with incorrect Filter Options'),!0}}};function oy(e){return!e.altKey&&!e.ctrlKey&&!e.metaKey&&e.key?.length===1}function oC(e,t,i,r,s){let a=r?r.getColDef().suppressKeyboardEvent:void 0;if(!a)return!1;let o=e.addGridCommonParams({event:t,editing:s,column:r,node:i,data:i.data,colDef:r.getColDef()});return!!(a&&a(o))}var ow=class extends al{constructor(e,t="ag-text-field",i="text"){super(e,t,i)}postConstruct(){super.postConstruct(),this.config.allowedCharPattern&&this.preventDisallowedCharacters()}setValue(e,t){return this.eInput.value!==e&&(this.eInput.value=tY(e)?e:""),super.setValue(e,t)}setStartValue(e){this.setValue(e,!0)}preventDisallowedCharacters(){let e=RegExp(`[${this.config.allowedCharPattern}]`);this.addManagedListeners(this.eInput,{keydown:t=>{oy(t)&&t.key&&!e.test(t.key)&&t.preventDefault()},paste:t=>{let i=t.clipboardData?.getData("text");i&&i.split("").some(t=>!e.test(t))&&t.preventDefault()}})}},ob={selector:"AG-INPUT-TEXT-FIELD",component:ow},oS=class extends ow{constructor(e){super(e,"ag-number-field","number")}postConstruct(){super.postConstruct(),this.addManagedListeners(this.eInput,{blur:()=>{let e=parseFloat(this.eInput.value),t=isNaN(e)?"":this.normalizeValue(e.toString());this.value!==t&&this.setValue(t)},wheel:this.onWheel.bind(this)}),this.eInput.step="any";let{precision:e,min:t,max:i,step:r}=this.config;"number"==typeof e&&this.setPrecision(e),"number"==typeof t&&this.setMin(t),"number"==typeof i&&this.setMax(i),"number"==typeof r&&this.setStep(r)}onWheel(e){ih(this.gos)===this.eInput&&e.preventDefault()}normalizeValue(e){if(""===e)return"";null!=this.precision&&(e=this.adjustPrecision(e));let t=parseFloat(e);return null!=this.min&&t<this.min?e=this.min.toString():null!=this.max&&t>this.max&&(e=this.max.toString()),e}adjustPrecision(e,t){if(null==this.precision)return e;if(t)return parseFloat(parseFloat(e).toFixed(this.precision)).toString();let i=String(e).split(".");if(i.length>1){if(i[1].length<=this.precision)return e;if(this.precision>0)return`${i[0]}.${i[1].slice(0,this.precision)}`}return i[0]}setMin(e){return this.min===e||(this.min=e,sW(this.eInput,"min",e)),this}setMax(e){return this.max===e||(this.max=e,sW(this.eInput,"max",e)),this}setPrecision(e){return this.precision=e,this}setStep(e){return this.step===e||(this.step=e,sW(this.eInput,"step",e)),this}setValue(e,t){return this.setValueOrInputValue(e=>super.setValue(e,t),()=>this,e)}setStartValue(e){return this.setValueOrInputValue(e=>super.setValue(e,!0),e=>{this.eInput.value=e},e)}setValueOrInputValue(e,t,i){if(tY(i)){let r=this.isScientificNotation(i);if(r&&this.eInput.validity.valid)return e(i);if(!r){i=this.adjustPrecision(i);let e=this.normalizeValue(i);r=i!=e}if(r)return t(i)}return e(i)}getValue(){if(!this.eInput.validity.valid)return;let e=this.eInput.value;return this.isScientificNotation(e)?this.adjustPrecision(e,!0):super.getValue()}isScientificNotation(e){return"string"==typeof e&&e.includes("e")}},ox={selector:"AG-INPUT-NUMBER-FIELD",component:oS},oM=["equals","notEqual","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","inRange","blank","notBlank"],oE=class{constructor(e,t,i){this.localeService=e,this.optionsFactory=t,this.valueFormatter=i}getModelAsString(e){if(!e)return null;let t=null!=e.operator,i=this.localeService.getLocaleTextFunc();if(t){let t=(e.conditions??[]).map(e=>this.getModelAsString(e)),r="AND"===e.operator?"andCondition":"orCondition";return t.join(` ${i(r,oo[r])} `)}if("blank"===e.type||"notBlank"===e.type)return i(e.type,e.type);{let t=this.optionsFactory.getCustomOption(e.type),{displayKey:r,displayName:s,numberOfInputs:a}=t||{};return r&&s&&0===a?(i(r,s),s):this.conditionToString(e,t)}}updateParams(e){this.optionsFactory=e.optionsFactory}formatValue(e){return this.valueFormatter?this.valueFormatter(e??null)??"":String(e)}},oD=class extends oE{conditionToString(e,t){let{numberOfInputs:i}=t||{};return"inRange"==e.type||2===i?`${this.formatValue(e.filter)}-${this.formatValue(e.filterTo)}`:null!=e.filter?this.formatValue(e.filter):`${e.type}`}};function oI(e){let{allowedCharPattern:t}=e??{};return t??null}var ok=class extends ov{constructor(){super("numberFilter"),this.eValuesFrom=[],this.eValuesTo=[]}refresh(e){return this.numberFilterParams.allowedCharPattern===e.allowedCharPattern&&super.refresh(e)}mapValuesFromModel(e){let{filter:t,filterTo:i,type:r}=e||{};return[this.processValue(t),this.processValue(i)].slice(0,this.getNumberOfInputs(r))}getDefaultDebounceMs(){return 500}comparator(){return(e,t)=>e===t?0:e<t?1:-1}setParams(e){this.numberFilterParams=e,super.setParams(e),this.filterModelFormatter=new oD(this.localeService,this.optionsFactory,this.numberFilterParams.numberFormatter)}getDefaultFilterOptions(){return oM}setElementValue(e,t,i){let r=!i&&this.numberFilterParams.numberFormatter?this.numberFilterParams.numberFormatter(t??null):t;super.setElementValue(e,r)}createValueElement(){let e=oI(this.numberFilterParams),t=document.createElement("div");return t.classList.add("ag-filter-body"),rQ(t,"presentation"),this.createFromToElement(t,this.eValuesFrom,"from",e),this.createFromToElement(t,this.eValuesTo,"to",e),t}createFromToElement(e,t,i,r){let s=this.createManagedBean(r?new ow({allowedCharPattern:r}):new oS);s.addCssClass(`ag-filter-${i}`),s.addCssClass("ag-filter-filter"),t.push(s),e.appendChild(s.getGui())}removeValueElements(e,t){this.removeComponents(this.eValuesFrom,e,t),this.removeComponents(this.eValuesTo,e,t)}getValues(e){let t=[];return this.forEachPositionInput(e,(e,i,r,s)=>{i<s&&t.push(this.processValue(this.stringToFloat(e.getValue())))}),t}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}getFilterType(){return"number"}processValue(e){return null==e?null:isNaN(e)?null:e}stringToFloat(e){if("number"==typeof e)return e;let t=t$(e);return(null!=t&&""===t.trim()&&(t=null),this.numberFilterParams.numberParser)?this.numberFilterParams.numberParser(t):null==t||"-"===t.trim()?null:parseFloat(t)}createCondition(e){let t=this.getConditionType(e),i={filterType:this.getFilterType(),type:t},r=this.getValues(e);return r.length>0&&(i.filter=r[0]),r.length>1&&(i.filterTo=r[1]),i}getInputs(e){return e>=this.eValuesFrom.length?[null,null]:[this.eValuesFrom[e],this.eValuesTo[e]]}getModelAsString(e){return this.filterModelFormatter.getModelAsString(e)??""}hasInvalidInputs(){let e=!1;return this.forEachInput(t=>{if(!t.getInputElement().validity.valid){e=!0;return}}),e}},oT=["contains","notContains","equals","notEqual","startsWith","endsWith","blank","notBlank"],oA=class extends oE{conditionToString(e,t){let{numberOfInputs:i}=t||{};return"inRange"==e.type||2===i?`${e.filter}-${e.filterTo}`:null!=e.filter?`${e.filter}`:`${e.type}`}};function oR(e){let t=e&&e.trim();return""===t?e:t}var oL=class extends of{constructor(){super("textFilter"),this.defaultFormatter=e=>e,this.defaultLowercaseFormatter=e=>null==e?null:e.toString().toLowerCase(),this.defaultMatcher=({filterOption:e,value:t,filterText:i})=>{if(null==i)return!1;switch(e){case"contains":return t.indexOf(i)>=0;case"notContains":return 0>t.indexOf(i);case"equals":return t===i;case"notEqual":return t!=i;case"startsWith":return 0===t.indexOf(i);case"endsWith":{let e=t.lastIndexOf(i);return e>=0&&e===t.length-i.length}default:return!1}},this.eValuesFrom=[],this.eValuesTo=[]}getDefaultDebounceMs(){return 500}setParams(e){this.textFilterParams=e,super.setParams(e),this.matcher=this.getTextMatcher(),this.formatter=this.textFilterParams.textFormatter||(this.textFilterParams.caseSensitive?this.defaultFormatter:this.defaultLowercaseFormatter),this.filterModelFormatter=new oA(this.localeService,this.optionsFactory)}getTextMatcher(){let e=this.textFilterParams.textCustomComparator;return e?(tO("textCustomComparator is deprecated, use textMatcher instead."),({filterOption:t,value:i,filterText:r})=>e(t,i,r)):this.textFilterParams.textMatcher||this.defaultMatcher}createCondition(e){let t=this.getConditionType(e),i={filterType:this.getFilterType(),type:t},r=this.getValuesWithSideEffects(e,!0);return r.length>0&&(i.filter=r[0]),r.length>1&&(i.filterTo=r[1]),i}getFilterType(){return"text"}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}getInputs(e){return e>=this.eValuesFrom.length?[null,null]:[this.eValuesFrom[e],this.eValuesTo[e]]}getValues(e){return this.getValuesWithSideEffects(e,!1)}getValuesWithSideEffects(e,t){let i=[];return this.forEachPositionInput(e,(e,r,s,a)=>{if(r<a){let r=t$(e.getValue());t&&this.textFilterParams.trimInput&&(r=oR(r)??null,e.setValue(r,!0)),i.push(r)}}),i}getDefaultFilterOptions(){return oT}createValueElement(){let e=document.createElement("div");return e.classList.add("ag-filter-body"),rQ(e,"presentation"),this.createFromToElement(e,this.eValuesFrom,"from"),this.createFromToElement(e,this.eValuesTo,"to"),e}createFromToElement(e,t,i){let r=this.createManagedBean(new ow);r.addCssClass(`ag-filter-${i}`),r.addCssClass("ag-filter-filter"),t.push(r),e.appendChild(r.getGui())}removeValueElements(e,t){this.removeComponents(this.eValuesFrom,e,t),this.removeComponents(this.eValuesTo,e,t)}mapValuesFromModel(e){let{filter:t,filterTo:i,type:r}=e||{};return[t||null,i||null].slice(0,this.getNumberOfInputs(r))}evaluateNullValue(e){return!!e&&["notEqual","notContains","blank"].indexOf(e)>=0}evaluateNonNullValue(e,t,i,r){let s=e.map(e=>this.formatter(e))||[],a=this.formatter(t),{api:o,colDef:n,column:l,context:h,textFormatter:d}=this.textFilterParams;if("blank"===i.type)return this.isBlank(t);if("notBlank"===i.type)return!this.isBlank(t);let c={api:o,colDef:n,column:l,context:h,node:r.node,data:r.data,filterOption:i.type,value:a,textFormatter:d};return s.some(e=>this.matcher({...c,filterText:e}))}getModelAsString(e){return this.filterModelFormatter.getModelAsString(e)??""}};function oP(e){if("number"==typeof e)return e;if("string"==typeof e){let t=parseInt(e);if(isNaN(t))return;return t}}function oF(e,t=Number.MAX_VALUE){return i=>{let r=oP(i);if(null!=r&&!(r<e)&&!(r>t))return r}}function oN(e,t){return e.toString().padStart(t,"0")}function oO(e,t,i){return"number"!=typeof e?"":e.toString().replace(".",i).replace(/(\d)(?=(\d{3})+(?!\d))/g,`$1${t}`)}function oB(e,t=!0,i="-"){if(!e)return null;let r=[e.getFullYear(),e.getMonth()+1,e.getDate()].map(e=>oN(e,2)).join(i);return t&&(r+=" "+[e.getHours(),e.getMinutes(),e.getSeconds()].map(e=>oN(e,2)).join(":")),r}var oG=e=>{if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd"}return"th"};function oz(e,t="YYYY-MM-DD"){let i=oN(e.getFullYear(),4),r=["January","February","March","April","May","June","July","August","September","October","November","December"],s=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],a={YYYY:()=>i.slice(i.length-4,i.length),YY:()=>i.slice(i.length-2,i.length),Y:()=>`${e.getFullYear()}`,MMMM:()=>r[e.getMonth()],MMM:()=>r[e.getMonth()].slice(0,3),MM:()=>oN(e.getMonth()+1,2),Mo:()=>`${e.getMonth()+1}${oG(e.getMonth()+1)}`,M:()=>`${e.getMonth()+1}`,Do:()=>`${e.getDate()}${oG(e.getDate())}`,DD:()=>oN(e.getDate(),2),D:()=>`${e.getDate()}`,dddd:()=>s[e.getDay()],ddd:()=>s[e.getDay()].slice(0,3),dd:()=>s[e.getDay()].slice(0,2),do:()=>`${e.getDay()}${oG(e.getDay())}`,d:()=>`${e.getDay()}`},o=RegExp(Object.keys(a).join("|"),"g");return t.replace(o,e=>e in a?a[e]():e)}function o_(e){if(!e)return null;let[t,i]=e.split(" ");if(!t)return null;let r=t.split("-").map(e=>parseInt(e,10));if(3!==r.filter(e=>!isNaN(e)).length)return null;let[s,a,o]=r,n=new Date(s,a-1,o);if(n.getFullYear()!==s||n.getMonth()!==a-1||n.getDate()!==o)return null;if(!i||"00:00:00"===i)return n;let[l,h,d]=i.split(":").map(e=>parseInt(e,10));return l>=0&&l<24&&n.setHours(l),h>=0&&h<60&&n.setMinutes(h),d>=0&&d<60&&n.setSeconds(d),n}var oV=class{constructor(e,t,i,r,s){this.alive=!0,this.context=e,this.eParent=r,t.getDateCompDetails(i).newAgStackInstance().then(t=>{if(!this.alive){e.destroyBean(t);return}this.dateComp=t,t&&(r.appendChild(t.getGui()),t.afterGuiAttached&&t.afterGuiAttached(),this.tempValue&&t.setDate(this.tempValue),null!=this.disabled&&this.setDateCompDisabled(this.disabled),s?.(this))})}destroy(){this.alive=!1,this.dateComp=this.context.destroyBean(this.dateComp)}getDate(){return this.dateComp?this.dateComp.getDate():this.tempValue}setDate(e){this.dateComp?this.dateComp.setDate(e):this.tempValue=e}setDisabled(e){this.dateComp?this.setDateCompDisabled(e):this.disabled=e}setDisplayed(e){sC(this.eParent,e)}setInputPlaceholder(e){this.dateComp&&this.dateComp.setInputPlaceholder&&this.dateComp.setInputPlaceholder(e)}setInputAriaLabel(e){this.dateComp&&this.dateComp.setInputAriaLabel&&this.dateComp.setInputAriaLabel(e)}afterGuiAttached(e){this.dateComp&&"function"==typeof this.dateComp.afterGuiAttached&&this.dateComp.afterGuiAttached(e)}updateParams(e){let t=!1;this.dateComp?.refresh&&"function"==typeof this.dateComp.refresh&&null!==this.dateComp.refresh(e)&&(t=!0),!t&&this.dateComp?.onParamsUpdated&&"function"==typeof this.dateComp.onParamsUpdated&&null!==this.dateComp.onParamsUpdated(e)&&tO("Custom date component method 'onParamsUpdated' is deprecated. Use 'refresh' instead.")}setDateCompDisabled(e){null!=this.dateComp&&null!=this.dateComp.setDisabled&&this.dateComp.setDisabled(e)}},oj=["equals","notEqual","lessThan","greaterThan","inRange","blank","notBlank"],oH=class extends oE{constructor(e,t,i){super(t,i),this.dateFilterParams=e}conditionToString(e,t){let{type:i}=e,{numberOfInputs:r}=t||{},s=o_(e.dateFrom),a=o_(e.dateTo),o=this.dateFilterParams.inRangeFloatingFilterDateFormat;if("inRange"==i||2===r){let e=null!==s?oz(s,o):"null",t=null!==a?oz(a,o):"null";return`${e}-${t}`}return null!=s?oz(s,o):`${i}`}updateParams(e){super.updateParams(e),this.dateFilterParams=e.dateFilterParams}},oU=1/0,oW=class extends ov{constructor(){super("dateFilter"),this.eConditionPanelsFrom=[],this.eConditionPanelsTo=[],this.dateConditionFromComps=[],this.dateConditionToComps=[],this.minValidYear=1e3,this.maxValidYear=oU,this.minValidDate=null,this.maxValidDate=null}wireBeans(e){super.wireBeans(e),this.context=e.context,this.userComponentFactory=e.userComponentFactory}afterGuiAttached(e){super.afterGuiAttached(e),this.dateConditionFromComps[0].afterGuiAttached(e)}mapValuesFromModel(e){let{dateFrom:t,dateTo:i,type:r}=e||{};return[t&&o_(t)||null,i&&o_(i)||null].slice(0,this.getNumberOfInputs(r))}comparator(){return this.dateFilterParams.comparator?this.dateFilterParams.comparator:this.defaultComparator.bind(this)}defaultComparator(e,t){return null==t||t<e?-1:t>e?1:0}setParams(e){this.dateFilterParams=e,super.setParams(e);let t=(t,i)=>{if(null!=e[t]){if(!isNaN(e[t]))return null==e[t]?i:Number(e[t]);tO(`DateFilter ${t} is not a number`)}return i};this.minValidYear=t("minValidYear",1e3),this.maxValidYear=t("maxValidYear",oU),this.minValidYear>this.maxValidYear&&tO("DateFilter minValidYear should be <= maxValidYear"),e.minValidDate?this.minValidDate=e.minValidDate instanceof Date?e.minValidDate:o_(e.minValidDate):this.minValidDate=null,e.maxValidDate?this.maxValidDate=e.maxValidDate instanceof Date?e.maxValidDate:o_(e.maxValidDate):this.maxValidDate=null,this.minValidDate&&this.maxValidDate&&this.minValidDate>this.maxValidDate&&tO("DateFilter minValidDate should be <= maxValidDate"),this.filterModelFormatter=new oH(this.dateFilterParams,this.localeService,this.optionsFactory)}createDateCompWrapper(e){let t=new oV(this.context,this.userComponentFactory,{onDateChanged:()=>this.onUiChanged(),filterParams:this.dateFilterParams},e);return this.addDestroyFunc(()=>t.destroy()),t}setElementValue(e,t){e.setDate(t)}setElementDisplayed(e,t){e.setDisplayed(t)}setElementDisabled(e,t){e.setDisabled(t)}getDefaultFilterOptions(){return oj}createValueElement(){let e=ia(this.gos).createElement("div");return e.classList.add("ag-filter-body"),this.createFromToElement(e,this.eConditionPanelsFrom,this.dateConditionFromComps,"from"),this.createFromToElement(e,this.eConditionPanelsTo,this.dateConditionToComps,"to"),e}createFromToElement(e,t,i,r){let s=ia(this.gos).createElement("div");s.classList.add(`ag-filter-${r}`),s.classList.add(`ag-filter-date-${r}`),t.push(s),e.appendChild(s),i.push(this.createDateCompWrapper(s))}removeValueElements(e,t){this.removeDateComps(this.dateConditionFromComps,e,t),this.removeDateComps(this.dateConditionToComps,e,t),this.removeItems(this.eConditionPanelsFrom,e,t),this.removeItems(this.eConditionPanelsTo,e,t)}removeDateComps(e,t,i){this.removeItems(e,t,i).forEach(e=>e.destroy())}isValidDateValue(e){if(null===e)return!1;if(this.minValidDate){if(e<this.minValidDate)return!1}else if(e.getUTCFullYear()<this.minValidYear)return!1;if(this.maxValidDate){if(e>this.maxValidDate)return!1}else if(e.getUTCFullYear()>this.maxValidYear)return!1;return!0}isConditionUiComplete(e){if(!super.isConditionUiComplete(e))return!1;let t=!0;return this.forEachInput((i,r,s,a)=>{s===e&&t&&!(r>=a)&&(t=t&&this.isValidDateValue(i.getDate()))}),t}areSimpleModelsEqual(e,t){return e.dateFrom===t.dateFrom&&e.dateTo===t.dateTo&&e.type===t.type}getFilterType(){return"date"}createCondition(e){let t=this.getConditionType(e),i={},r=this.getValues(e);return r.length>0&&(i.dateFrom=oB(r[0])),r.length>1&&(i.dateTo=oB(r[1])),{dateFrom:null,dateTo:null,filterType:this.getFilterType(),type:t,...i}}resetPlaceholder(){let e=this.localeService.getLocaleTextFunc(),t=this.translate("dateFormatOoo"),i=e("ariaFilterValue","Filter Value");this.forEachInput(e=>{e.setInputPlaceholder(t),e.setInputAriaLabel(i)})}getInputs(e){return e>=this.dateConditionFromComps.length?[null,null]:[this.dateConditionFromComps[e],this.dateConditionToComps[e]]}getValues(e){let t=[];return this.forEachPositionInput(e,(e,i,r,s)=>{i<s&&t.push(e.getDate())}),t}translate(e){return"lessThan"===e?super.translate("before"):"greaterThan"===e?super.translate("after"):super.translate(e)}getModelAsString(e){return this.filterModelFormatter.getModelAsString(e)??""}},o$=class extends i2{constructor(e,t,i,r){super(),this.columnOrGroup=e,this.columnOrGroup=e,this.eCell=t,this.ariaEl=this.eCell.querySelector("[role=columnheader]")||this.eCell,this.colsSpanning=r,this.beans=i}setColsSpanning(e){this.colsSpanning=e,this.onLeftChanged()}getColumnOrGroup(){return this.beans.gos.get("enableRtl")&&this.colsSpanning?iB(this.colsSpanning):this.columnOrGroup}postConstruct(){let e=this.onLeftChanged.bind(this);this.addManagedListeners(this.columnOrGroup,{leftChanged:e}),this.setLeftFirstTime(),this.addManagedEventListeners({displayedColumnsWidthChanged:e}),this.addManagedPropertyListener("domLayout",e)}setLeftFirstTime(){let e=this.beans.gos.get("suppressColumnMoveAnimation"),t=tY(this.columnOrGroup.getOldLeft());this.beans.columnAnimationService.isActive()&&t&&!e?this.animateInLeft():this.onLeftChanged()}animateInLeft(){let e=this.getColumnOrGroup(),t=e.getLeft(),i=e.getOldLeft(),r=this.modifyLeftForPrintLayout(e,i),s=this.modifyLeftForPrintLayout(e,t);this.setLeft(r),this.actualLeft=s,this.beans.columnAnimationService.executeNextVMTurn(()=>{this.actualLeft===s&&this.setLeft(s)})}onLeftChanged(){let e=this.getColumnOrGroup(),t=e.getLeft();this.actualLeft=this.modifyLeftForPrintLayout(e,t),this.setLeft(this.actualLeft)}modifyLeftForPrintLayout(e,t){if(!t5(this.beans.gos,"print")||"left"===e.getPinned())return t;let i=this.beans.visibleColsService.getColsLeftWidth();return"right"===e.getPinned()?i+this.beans.visibleColsService.getBodyContainerWidth()+t:i+t}setLeft(e){if(tY(e)&&(this.eCell.style.left=`${e}px`),rO(this.columnOrGroup)){let e=this.columnOrGroup.getLeafColumns();e.length&&e.length>1&&si(this.ariaEl,e.length)}}};function oY(e,t,i,r){return tK(e)?[]:oq(e.headerClass,e,t,i,r)}function oK(e,t,i,r){return tK(e)?[]:oq(e.toolPanelClass,e,t,i,r)}function oZ(e,t,i){e.addOrRemoveCssClass("ag-column-first",i.isColAtEdge(t,"first")),e.addOrRemoveCssClass("ag-column-last",i.isColAtEdge(t,"last"))}function oq(e,t,i,r,s){let a;return tK(e)?[]:"string"==typeof(a="function"==typeof e?e(i.addGridCommonParams({colDef:t,column:r,columnGroup:s})):e)?[a]:Array.isArray(a)?[...a]:[]}var oX=0,oQ=class e extends i2{constructor(e,t,i){super(),this.resizeToggleTimeout=0,this.resizeMultiplier=1,this.resizeFeature=null,this.lastFocusEvent=null,this.dragSource=null,this.columnGroupChild=e,this.parentRowCtrl=i,this.beans=t,this.instanceId=e.getUniqueId()+"-"+oX++}wireBeans(e){this.pinnedWidthService=e.pinnedWidthService,this.focusService=e.focusService,this.userComponentFactory=e.userComponentFactory,this.ctrlsService=e.ctrlsService,this.dragAndDropService=e.dragAndDropService,this.menuService=e.menuService}postConstruct(){let e=this.refreshTabIndex.bind(this);this.addManagedPropertyListeners(["suppressHeaderFocus"],e),this.addManagedEventListeners({overlayExclusiveChanged:e})}shouldStopEventPropagation(e){let{headerRowIndex:t,column:i}=this.focusService.getFocusedHeader();return function(e,t,i,r){let s=r.getDefinition(),a=s&&s.suppressHeaderKeyboardEvent;return!!tY(a)&&!!a(e.addGridCommonParams({colDef:s,column:r,headerRowIndex:i,event:t}))}(this.gos,e,t,i)}getWrapperHasFocus(){return ih(this.gos)===this.eGui}setGui(e,t){this.eGui=e,this.addDomData(t),t.addManagedListeners(this.beans.eventService,{displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this)}),t.addManagedElementListeners(this.eGui,{focus:this.onGuiFocus.bind(this)}),this.onDisplayedColumnsChanged(),this.refreshTabIndex()}onGuiFocus(){this.eventService.dispatchEvent({type:"headerFocused",column:this.column})}setupAutoHeight(e){let t;let{wrapperElement:i,checkMeasuringCallback:r,compBean:s}=e,{animationFrameService:a,resizeObserverService:o,columnModel:n,gos:l}=this.beans,h=e=>{if(!this.isAlive()||!s.isAlive())return;let{paddingTop:t,paddingBottom:r,borderBottomWidth:o,borderTopWidth:d}=sx(this.getGui()),c=i.offsetHeight+(t+r+o+d);if(e<5){let t=ia(l),r=!t||!t.contains(i),s=0==c;if(r||s){a.requestAnimationFrame(()=>h(e+1));return}}n.setColHeaderHeight(this.column,c)},d=!1,c=()=>{let e=this.column.isAutoHeaderHeight();e&&!d&&u(),!e&&d&&p()},u=()=>{d=!0,h(0),this.comp.addOrRemoveCssClass("ag-header-cell-auto-height",!0),t=o.observeResize(i,()=>h(0))},p=()=>{d=!1,t&&t(),this.comp.addOrRemoveCssClass("ag-header-cell-auto-height",!1),t=void 0};c(),s.addDestroyFunc(()=>p()),s.addManagedListeners(this.column,{widthChanged:()=>d&&h(0)}),s.addManagedEventListeners({sortChanged:()=>{d&&window.setTimeout(()=>h(0))}}),r&&r(c)}onDisplayedColumnsChanged(){let{comp:e,column:t,beans:i,eGui:r}=this;e&&t&&r&&(oZ(e,t,i.visibleColsService),st(r,i.visibleColsService.getAriaColIndex(t)))}addResizeAndMoveKeyboardListeners(e){this.resizeFeature&&e.addManagedListeners(this.eGui,{keydown:this.onGuiKeyDown.bind(this),keyup:this.onGuiKeyUp.bind(this)})}refreshTabIndex(){let e=this.focusService.isHeaderFocusSuppressed();this.eGui&&sW(this.eGui,"tabindex",e?null:"-1")}onGuiKeyDown(e){let t=ih(this.gos),i=e.key===aa.LEFT||e.key===aa.RIGHT;if(this.isResizing&&(e.preventDefault(),e.stopImmediatePropagation()),t!==this.eGui||!e.shiftKey&&!e.altKey||((this.isResizing||i)&&(e.preventDefault(),e.stopImmediatePropagation()),!i))return;let r=aq[e.key===aa.LEFT!==this.gos.get("enableRtl")?"Left":"Right"];if(e.altKey){this.isResizing=!0,this.resizeMultiplier+=1;let t=this.getViewportAdjustedResizeDiff(e);this.resizeHeader(t,e.shiftKey),this.resizeFeature?.toggleColumnResizing(!0)}else this.moveHeader(r)}getViewportAdjustedResizeDiff(e){let t=this.getResizeDiff(e);if(this.column.getPinned()){let e=this.pinnedWidthService.getPinnedLeftWidth(),i=this.pinnedWidthService.getPinnedRightWidth(),r=sE(this.ctrlsService.getGridBodyCtrl().getBodyViewportElement())-50;if(e+i+t>r){if(!(r>e+i))return 0;t=r-e-i}}return t}getResizeDiff(e){let t=e.key===aa.LEFT!==this.gos.get("enableRtl"),i=this.column.getPinned(),r=this.gos.get("enableRtl");return i&&r!==("right"===i)&&(t=!t),(t?-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){let t=this.getWrapperHasFocus();switch(e.key){case aa.PAGE_DOWN:case aa.PAGE_UP:case aa.PAGE_HOME:case aa.PAGE_END:t&&e.preventDefault()}}addDomData(t){let i=e.DOM_DATA_KEY_HEADER_CTRL;is(this.gos,this.eGui,i,this),t.addDestroyFunc(()=>is(this.gos,this.eGui,i,null))}getGui(){return this.eGui}focus(e){return!!this.eGui&&(this.lastFocusEvent=e||null,this.eGui.focus(),!0)}getRowIndex(){return this.parentRowCtrl.getRowIndex()}getParentRowCtrl(){return this.parentRowCtrl}getPinned(){return this.parentRowCtrl.getPinned()}getColumnGroupChild(){return this.columnGroupChild}removeDragSource(){this.dragSource&&(this.dragAndDropService.removeDragSource(this.dragSource),this.dragSource=null)}handleContextMenuMouseEvent(e,t,i){let r=e??t;this.gos.get("preventDefaultOnContextMenu")&&r.preventDefault(),this.menuService.isHeaderContextMenuEnabled(i)&&this.menuService.showHeaderContextMenu(i,e,t),this.dispatchColumnMouseEvent("columnHeaderContextMenu",i)}dispatchColumnMouseEvent(e,t){this.eventService.dispatchEvent({type:e,column:t})}clearComponent(){this.removeDragSource(),this.resizeFeature=null,this.comp=null,this.eGui=null}destroy(){super.destroy(),this.column=null,this.lastFocusEvent=null,this.columnGroupChild=null,this.parentRowCtrl=null}};oQ.DOM_DATA_KEY_HEADER_CTRL="headerCtrl";var oJ=oQ,o0=class extends i2{wireBeans(e){this.columnHoverService=e.columnHoverService}constructor(e,t){super(),this.columns=e,this.element=t}postConstruct(){this.gos.get("columnHoverHighlight")&&this.addMouseHoverListeners()}addMouseHoverListeners(){this.addManagedListeners(this.element,{mouseout:this.onMouseOut.bind(this),mouseover:this.onMouseOver.bind(this)})}onMouseOut(){this.columnHoverService.clearMouseOver()}onMouseOver(){this.columnHoverService.setMouseOver(this.columns)}},o1=class extends oJ{constructor(e,t,i){super(e,t,i),this.iconCreated=!1,this.column=e}setComp(e,t,i,r,s){this.comp=e,s=rY(this,this.beans.context,s),this.eButtonShowMainFilter=i,this.eFloatingFilterBody=r,this.setGui(t,s),this.setupActive(),this.setupWidth(s),this.setupLeft(s),this.setupHover(s),this.setupFocus(s),this.setupAria(),this.setupFilterButton(),this.setupUserComp(),this.setupSyncWithFilter(s),this.setupUi(),s.addManagedElementListeners(this.eButtonShowMainFilter,{click:this.showParentFilter.bind(this)}),this.setupFilterChangedListener(s),s.addManagedListeners(this.column,{colDefChanged:()=>this.onColDefChanged(s)}),s.addDestroyFunc(()=>{this.eButtonShowMainFilter=null,this.eFloatingFilterBody=null,this.userCompDetails=null,this.clearComponent()})}resizeHeader(){}moveHeader(){}setupActive(){let e=this.column.getColDef(),t=!!e.filter,i=!!e.floatingFilter;this.active=t&&i}setupUi(){if(this.comp.setButtonWrapperDisplayed(!this.suppressFilterButton&&this.active),this.comp.addOrRemoveBodyCssClass("ag-floating-filter-full-body",this.suppressFilterButton),this.comp.addOrRemoveBodyCssClass("ag-floating-filter-body",!this.suppressFilterButton),!this.active||this.iconCreated)return;let e=s2("filter",this.gos,this.column);e&&(this.iconCreated=!0,this.eButtonShowMainFilter.appendChild(e))}setupFocus(e){e.createManagedBean(new oa(this.eGui,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)}))}setupAria(){let e=this.localeService.getLocaleTextFunc();rJ(this.eButtonShowMainFilter,e("ariaFilterMenuOpen","Open Filter Menu"))}onTabKeyDown(e){if(ih(this.gos)===this.eGui)return;let t=this.focusService.findNextFocusableElement(this.eGui,null,e.shiftKey);if(t){this.beans.headerNavigationService.scrollToColumn(this.column),e.preventDefault(),t.focus();return}let i=this.findNextColumnWithFloatingFilter(e.shiftKey);i&&this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:this.getParentRowCtrl().getRowIndex(),column:i},event:e})&&e.preventDefault()}findNextColumnWithFloatingFilter(e){let t=this.beans.visibleColsService,i=this.column;do if(!(i=e?t.getColBefore(i):t.getColAfter(i)))break;while(!i.getColDef().filter||!i.getColDef().floatingFilter);return i}handleKeyDown(e){super.handleKeyDown(e);let t=this.getWrapperHasFocus();switch(e.key){case aa.UP:case aa.DOWN:t||e.preventDefault();case aa.LEFT:case aa.RIGHT:if(t)return;e.stopPropagation();case aa.ENTER:t&&this.focusService.focusInto(this.eGui)&&e.preventDefault();break;case aa.ESCAPE:t||this.eGui.focus()}}onFocusIn(e){if(this.eGui.contains(e.relatedTarget))return;let t=!!e.relatedTarget&&!e.relatedTarget.classList.contains("ag-floating-filter"),i=!!e.relatedTarget&&sS(e.relatedTarget,"ag-floating-filter");if(t&&i&&e.target===this.eGui){let e=this.lastFocusEvent,t=!!(e&&e.key===aa.TAB);if(e&&t){let t=e.shiftKey;this.focusService.focusInto(this.eGui,t)}}let r=this.getRowIndex();this.beans.focusService.setFocusedHeader(r,this.column)}setupHover(e){e.createManagedBean(new o0([this.column],this.eGui));let t=()=>{if(!this.gos.get("columnHoverHighlight"))return;let e=this.beans.columnHoverService.isHovered(this.column);this.comp.addOrRemoveCssClass("ag-column-hover",e)};e.addManagedEventListeners({columnHoverChanged:t}),t()}setupLeft(e){let t=new o$(this.column,this.eGui,this.beans);e.createManagedBean(t)}setupFilterButton(){this.suppressFilterButton=!this.menuService.isFloatingFilterButtonEnabled(this.column),this.highlightFilterButtonWhenActive=!this.menuService.isLegacyMenuEnabled()}setupUserComp(){if(!this.active)return;let e=this.beans.filterManager?.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter());e&&this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setCompDetails(e)}showParentFilter(){let e=this.suppressFilterButton?this.eFloatingFilterBody:this.eButtonShowMainFilter;this.menuService.showFilterMenu({column:this.column,buttonElement:e,containerType:"floatingFilter",positionBy:"button"})}setupSyncWithFilter(e){if(!this.active)return;let{filterManager:t}=this.beans,i=e=>{if(e?.source==="filterDestroyed"&&!this.isAlive())return;let i=this.comp.getFloatingFilterComp();i&&i.then(i=>{if(i){let r=t?.getCurrentFloatingFilterParentModel(this.column),s=e?{...e,columns:e.columns??[],source:"api"===e.source?"api":"columnFilter"}:null;i.onParentModelChanged(r,s)}})};[this.destroySyncListener]=e.addManagedListeners(this.column,{filterChanged:i}),t?.isFilterActive(this.column)&&i(null)}setupWidth(e){let t=()=>{let e=`${this.column.getActualWidth()}px`;this.comp.setWidth(e)};e.addManagedListeners(this.column,{widthChanged:t}),t()}setupFilterChangedListener(e){this.active&&([this.destroyFilterChangedListener]=e.addManagedListeners(this.column,{filterChanged:this.updateFilterButton.bind(this)}),this.updateFilterButton())}updateFilterButton(){if(!this.suppressFilterButton&&this.comp){let e=!!this.beans.filterManager?.isFilterAllowed(this.column);this.comp.setButtonWrapperDisplayed(e),this.highlightFilterButtonWhenActive&&e&&this.eButtonShowMainFilter.classList.toggle("ag-filter-active",this.column.isFilterActive())}}onColDefChanged(e){let t=this.active;this.setupActive();let i=!t&&this.active;t&&!this.active&&(this.destroySyncListener(),this.destroyFilterChangedListener());let r=this.active?this.beans.filterManager?.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter()):null,s=this.comp.getFloatingFilterComp();s&&r?s.then(t=>{!t||this.beans.filterManager?.areFilterCompsDifferent(this.userCompDetails??null,r)?this.updateCompDetails(e,r,i):this.updateFloatingFilterParams(r)}):this.updateCompDetails(e,r,i)}updateCompDetails(e,t,i){this.isAlive()&&(this.setCompDetails(t),this.setupFilterButton(),this.setupUi(),i&&(this.setupSyncWithFilter(e),this.setupFilterChangedListener(e)))}updateFloatingFilterParams(e){if(!e)return;let t=e.params;this.comp.getFloatingFilterComp()?.then(e=>{let i=!1;e?.refresh&&"function"==typeof e.refresh&&null!==e.refresh(t)&&(i=!0),!i&&e?.onParamsUpdated&&"function"==typeof e.onParamsUpdated&&null!==e.onParamsUpdated(t)&&tO("Custom floating filter method 'onParamsUpdated' is deprecated. Use 'refresh' instead.")})}destroy(){super.destroy(),this.destroySyncListener=null,this.destroyFilterChangedListener=null}},o2="32.2.0";function o3(e,t,i){if(null==t)return null;let r=null,{compName:s,jsComp:a,fwComp:o}=aH.getCompKeys(e,t,aF);return s?r=({set:"agSetColumnFloatingFilter",agSetColumnFilter:"agSetColumnFloatingFilter",multi:"agMultiColumnFloatingFilter",agMultiColumnFilter:"agMultiColumnFloatingFilter",group:"agGroupColumnFloatingFilter",agGroupColumnFilter:"agGroupColumnFloatingFilter",number:"agNumberColumnFloatingFilter",agNumberColumnFilter:"agNumberColumnFloatingFilter",date:"agDateColumnFloatingFilter",agDateColumnFilter:"agDateColumnFloatingFilter",text:"agTextColumnFloatingFilter",agTextColumnFilter:"agTextColumnFloatingFilter"})[s]:null==a&&null==o&&!0===t.filter&&(r=i()),r}var o4={january:"January",february:"February",march:"March",april:"April",may:"May",june:"June",july:"July",august:"August",september:"September",october:"October",november:"November",december:"December"},o6=["january","february","march","april","may","june","july","august","september","october","november","december"],o5=class extends i2{constructor(){super(...arguments),this.beanName="columnFilterService",this.allColumnFilters=new Map,this.allColumnListeners=new Map,this.activeAggregateFilters=[],this.activeColumnFilters=[],this.processingFilterChange=!1,this.filterModelUpdateQueue=[],this.columnFilterModelUpdateQueue=[]}wireBeans(e){this.valueService=e.valueService,this.columnModel=e.columnModel,this.rowModel=e.rowModel,this.userComponentFactory=e.userComponentFactory,this.rowRenderer=e.rowRenderer,this.dataTypeService=e.dataTypeService,this.filterManager=e.filterManager}postConstruct(){this.addManagedEventListeners({gridColumnsChanged:this.onColumnsChanged.bind(this),rowDataUpdated:()=>this.onNewRowsLoaded("rowDataUpdated"),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)}),this.initialFilterModel={...this.gos.get("initialState")?.filter?.filterModel??{}}}setFilterModel(e,t="api"){if(this.dataTypeService?.isPendingInference()){this.filterModelUpdateQueue.push({model:e,source:t});return}let i=[],r=this.getFilterModel(!0);if(e){let t=new Set(Object.keys(e));this.allColumnFilters.forEach((r,s)=>{let a=e[s];i.push(this.setModelOnFilterWrapper(r.filterPromise,a)),t.delete(s)}),t.forEach(t=>{let r=this.columnModel.getColDefCol(t)||this.columnModel.getCol(t);if(!r){tO("setFilterModel() - no column found for colId: "+t);return}if(!r.isFilterAllowed()){tO("setFilterModel() - unable to fully apply model, filtering disabled for colId: "+t);return}let s=this.getOrCreateFilterWrapper(r);if(!s){tO("setFilterModel() - unable to fully apply model, unable to create filter for colId: "+t);return}i.push(this.setModelOnFilterWrapper(s.filterPromise,e[t]))})}else this.allColumnFilters.forEach(e=>{i.push(this.setModelOnFilterWrapper(e.filterPromise,null))});ab.all(i).then(()=>{let e=this.getFilterModel(!0),i=[];this.allColumnFilters.forEach((t,s)=>{t0(r?r[s]:null,e?e[s]:null)||i.push(t.column)}),i.length>0&&this.filterManager?.onFilterChanged({columns:i,source:t})})}setModelOnFilterWrapper(e,t){return new ab(i=>{e.then(e=>{"function"!=typeof e.setModel&&(tO("filter missing setModel method, which is needed for setFilterModel"),i()),(e.setModel(t)||ab.resolve()).then(()=>i())})})}getFilterModel(e){let t={},{allColumnFilters:i,initialFilterModel:r}=this;return i.forEach((e,i)=>{let r=this.getModelFromFilterWrapper(e);tY(r)&&(t[i]=r)}),e||Object.entries(r).forEach(([e,r])=>{tY(r)&&!i.has(e)&&this.columnModel.getCol(e)?.isFilterAllowed()&&(t[e]=r)}),t}getModelFromFilterWrapper(e){let{filter:t}=e;return t?"function"!=typeof t.getModel?(tO("filter API missing getModel method, which is needed for getFilterModel"),null):t.getModel():this.getModelFromInitialState(e.column)}getModelFromInitialState(e){return this.initialFilterModel[e.getColId()]??null}isColumnFilterPresent(){return this.activeColumnFilters.length>0}isAggregateFilterPresent(){return!!this.activeAggregateFilters.length}disableColumnFilters(){return!!this.allColumnFilters.size&&(this.allColumnFilters.forEach(e=>this.disposeFilterWrapper(e,"advancedFilterEnabled")),!0)}doAggregateFiltersPass(e,t){return this.doColumnFiltersPass(e,t,!0)}updateActiveFilters(){let e=e=>!!e&&(e.isFilterActive?e.isFilterActive():(tO("Filter is missing isFilterActive() method"),!1)),t=!!ig(this.gos),i=e=>{if(!e.isPrimary())return!0;let i=!this.columnModel.isPivotActive();return!!e.isValueActive()&&!!i&&(!!this.columnModel.isPivotMode()||t)},r=[],s=[];return this.forEachColumnFilter((t,a)=>{e(t)&&(i(a.column)?r.push(t):s.push(t))}).then(()=>{this.activeAggregateFilters=r,this.activeColumnFilters=s})}updateFilterFlagInColumns(e,t){return this.forEachColumnFilter((i,r)=>r.column.setFilterActive(i.isFilterActive(),e,t))}forEachColumnFilter(e){return ab.all(Array.from(this.allColumnFilters.values()).map(t=>t.filterPromise.then(i=>e(i,t))))}doColumnFiltersPass(e,t,i){let{data:r,aggData:s}=e,a=i?this.activeAggregateFilters:this.activeColumnFilters,o=i?s:r;for(let i=0;i<a.length;i++){let r=a[i];if(null!=r&&r!==t){if("function"!=typeof r.doesFilterPass)throw Error("Filter is missing method doesFilterPass");if(!r.doesFilterPass({node:e,data:o}))return!1}}return!0}callOnFilterChangedOutsideRenderCycle(e){let t=()=>this.filterManager?.onFilterChanged(e);this.rowRenderer.isRefreshInProgress()?setTimeout(t,0):t()}updateBeforeFilterChanged(e={}){let{filterInstance:t,additionalEventAttributes:i}=e;return this.updateDependentFilters(),this.updateActiveFilters().then(()=>this.updateFilterFlagInColumns("filterChanged",i).then(()=>{this.allColumnFilters.forEach(e=>{e.filterPromise&&e.filterPromise.then(e=>{e&&e!==t&&e.onAnyFilterChanged&&e.onAnyFilterChanged()})}),this.processingFilterChange=!0}))}updateAfterFilterChanged(){this.processingFilterChange=!1}isSuppressFlashingCellsBecauseFiltering(){return!this.gos.get("allowShowChangeAfterFilter")&&this.processingFilterChange}onNewRowsLoaded(e){this.forEachColumnFilter(e=>{e.onNewRowsLoaded&&e.onNewRowsLoaded()}).then(()=>this.updateFilterFlagInColumns(e,{afterDataChange:!0})).then(()=>this.updateActiveFilters())}createValueGetter(e){return({node:t})=>this.valueService.getValue(e,t,!0)}createGetValue(e){return(t,i)=>{let r=i?this.columnModel.getCol(i):e;return r?this.valueService.getValue(r,t,!0):void 0}}isFilterActive(e){let{filter:t}=this.cachedFilter(e)??{};return t?t.isFilterActive():null!=this.getModelFromInitialState(e)}getOrCreateFilterWrapper(e){if(!e.isFilterAllowed())return null;let t=this.cachedFilter(e);return t||(t=this.createFilterWrapper(e),this.setColumnFilterWrapper(e,t)),t}cachedFilter(e){return this.allColumnFilters.get(e.getColId())}getDefaultFilter(e){let t;if(iN(this.gos))t="agSetColumnFilter";else{let i=this.dataTypeService?.getBaseDataType(e);t="number"===i?"agNumberColumnFilter":"date"===i||"dateString"===i?"agDateColumnFilter":"agTextColumnFilter"}return t}getDefaultFloatingFilter(e){let t;if(iN(this.gos))t="agSetColumnFloatingFilter";else{let i=this.dataTypeService?.getBaseDataType(e);t="number"===i?"agNumberColumnFloatingFilter":"date"===i||"dateString"===i?"agDateColumnFloatingFilter":"agTextColumnFloatingFilter"}return t}createFilterInstance(e,t){let i;let r=this.getDefaultFilter(e),s=e.getColDef(),a={...this.createFilterParams(e,s),filterModifiedCallback:()=>this.filterModifiedCallbackFactory(i,e)(),filterChangedCallback:t=>this.filterChangedCallbackFactory(i,e)(t),doesRowPassOtherFilter:e=>!this.filterManager||this.filterManager.doesRowPassOtherFilters(i,e)},o=this.userComponentFactory.getFilterDetails(s,a,r);return o?{filterPromise:()=>{let e=o.newAgStackInstance();return null!=e&&e.then(e=>{i=e,t&&(t.filter=e)}),e},compDetails:o}:{filterPromise:null,compDetails:null}}createFilterParams(e,t){return this.gos.addGridCommonParams({column:e,colDef:rn(t),rowModel:this.rowModel,filterChangedCallback:()=>{},filterModifiedCallback:()=>{},valueGetter:this.createValueGetter(e),getValue:this.createGetValue(e),doesRowPassOtherFilter:()=>!0})}createFilterWrapper(e){let t={column:e,filterPromise:null,compiledElement:null,compDetails:null},{filterPromise:i,compDetails:r}=this.createFilterInstance(e,t);return t.filterPromise=i?.()??null,t.compDetails=r,t}onColumnsChanged(){let e=[];this.allColumnFilters.forEach((t,i)=>{let r;(r=t.column.isPrimary()?this.columnModel.getColDefCol(i):this.columnModel.getCol(i))&&r===t.column||(e.push(t.column),this.disposeFilterWrapper(t,"columnChanged"),this.disposeColumnListener(i))});let t=e.every(e=>"agGroupColumnFilter"===e.getColDef().filter);e.length>0&&!t?this.filterManager?.onFilterChanged({columns:e,source:"api"}):this.updateDependentFilters()}updateDependentFilters(){let e=this.columnModel.getAutoCols();e?.forEach(e=>{"agGroupColumnFilter"===e.getColDef().filter&&this.getOrCreateFilterWrapper(e)})}isFilterAllowed(e){if(!e.isFilterAllowed())return!1;let{filter:t}=this.allColumnFilters.get(e.getColId())??{};return!t||"function"!=typeof t?.isFilterAllowed||t.isFilterAllowed()}getFloatingFilterCompDetails(e,t){let i=t=>{let i=this.getOrCreateFilterWrapper(e)?.filterPromise;null!=i&&i.then(e=>{t(aU(e))})},r=e.getColDef(),s={...this.createFilterParams(e,r),filterChangedCallback:()=>i(t=>this.filterChangedCallbackFactory(t,e)())},a=this.userComponentFactory.mergeParamsWithApplicationProvidedParams(r,aF,s),o=o3(this.frameworkOverrides,r,()=>this.getDefaultFloatingFilter(e));return null==o&&(o="agReadOnlyFloatingFilter"),this.userComponentFactory.getFloatingFilterCompDetails(r,{column:e,filterParams:a,currentParentModel:()=>this.getCurrentFloatingFilterParentModel(e),parentFilterInstance:i,showParentFilter:t,suppressFilterButton:!1},o)}getCurrentFloatingFilterParentModel(e){return this.getModelFromFilterWrapper(this.cachedFilter(e)??{column:e})}destroyFilter(e,t="api"){let i=e.getColId(),r=this.allColumnFilters.get(i);this.disposeColumnListener(i),delete this.initialFilterModel[i],r&&(this.disposeFilterWrapper(r,t),this.filterManager?.onFilterChanged({columns:[e],source:"api"}))}disposeColumnListener(e){let t=this.allColumnListeners.get(e);t&&(this.allColumnListeners.delete(e),t())}disposeFilterWrapper(e,t){e.filterPromise.then(i=>{this.destroyBean(i),e.column.setFilterActive(!1,"filterDestroyed"),this.allColumnFilters.delete(e.column.getColId()),this.eventService.dispatchEvent({type:"filterDestroyed",source:t,column:e.column})})}filterModifiedCallbackFactory(e,t){return()=>{this.eventService.dispatchEvent({type:"filterModified",column:t,filterInstance:e})}}filterChangedCallbackFactory(e,t){return i=>{let r=i?.source??"columnFilter";this.callOnFilterChangedOutsideRenderCycle({filter:e,additionalEventAttributes:i,columns:[t],source:r})}}checkDestroyFilter(e){let t=this.allColumnFilters.get(e);if(!t)return;let i=t.column,{compDetails:r}=i.isFilterAllowed()?this.createFilterInstance(i):{compDetails:null};if(this.areFilterCompsDifferent(t.compDetails,r)){this.destroyFilter(i,"paramsUpdated");return}let s=i.getColDef().filterParams;if(!t.filterPromise){this.destroyFilter(i,"paramsUpdated");return}t.filterPromise.then(e=>{!1===(!e?.refresh||e.refresh({...this.createFilterParams(i,i.getColDef()),filterModifiedCallback:this.filterModifiedCallbackFactory(e,i),filterChangedCallback:this.filterChangedCallbackFactory(e,i),doesRowPassOtherFilter:t=>!this.filterManager||this.filterManager.doesRowPassOtherFilters(e,t),...s}))&&this.destroyFilter(i,"paramsUpdated")})}setColumnFilterWrapper(e,t){let i=e.getColId();this.allColumnFilters.set(i,t),this.allColumnListeners.set(i,this.addManagedListeners(e,{colDefChanged:()=>this.checkDestroyFilter(i)})[0])}areFilterCompsDifferent(e,t){if(!t||!e)return!0;let{componentClass:i}=e,{componentClass:r}=t;return!(i===r||i?.render&&r?.render&&i.render===r.render)}hasFloatingFilters(){return this.columnModel.getCols().some(e=>e.getColDef().floatingFilter)}getFilterInstance(e,t){t&&this.getFilterInstanceImpl(e).then(e=>{t(aU(e))})}getColumnFilterInstance(e){return new Promise(t=>{this.getFilterInstanceImpl(e).then(e=>{t(aU(e))})})}getFilterInstanceImpl(e){let t=this.columnModel.getColDefCol(e);return t?this.getOrCreateFilterWrapper(t)?.filterPromise??ab.resolve(null):ab.resolve(void 0)}processFilterModelUpdateQueue(){this.filterModelUpdateQueue.forEach(({model:e,source:t})=>this.setFilterModel(e,t)),this.filterModelUpdateQueue=[],this.columnFilterModelUpdateQueue.forEach(({key:e,model:t,resolve:i})=>{this.setColumnFilterModel(e,t).then(()=>i())}),this.columnFilterModelUpdateQueue=[]}getColumnFilterModel(e){let t=this.getFilterWrapper(e);return t?this.getModelFromFilterWrapper(t):null}setColumnFilterModel(e,t){let i;if(this.dataTypeService?.isPendingInference()){let i=()=>{},r=new Promise(e=>{i=e});return this.columnFilterModelUpdateQueue.push({key:e,model:t,resolve:i}),r}let r=this.columnModel.getColDefCol(e),s=r?this.getOrCreateFilterWrapper(r):null;return s?(i=this.setModelOnFilterWrapper(s.filterPromise,t),new Promise(e=>{i.then(t=>e(t))})):Promise.resolve()}getFilterWrapper(e){let t=this.columnModel.getColDefCol(e);return t?this.cachedFilter(t)??null:null}setColDefPropertiesForDataType(e,t,i){let r=iN(this.gos),s=this.localeService.getLocaleTextFunc(),a=t=>{let{filterParams:i}=e;e.filterParams="object"==typeof i?{...i,...t}:t};switch(t.baseDataType){case"number":r&&a({comparator:(e,t)=>{let i=null==e?0:parseInt(e),r=null==t?0:parseInt(t);return i===r?0:i>r?1:-1}});break;case"boolean":a(r?{valueFormatter:e=>tY(e.value)?s(String(e.value),e.value?"True":"False"):s("blanks","(Blanks)")}:{maxNumConditions:1,debounceMs:0,filterOptions:["empty",{displayKey:"true",displayName:"True",predicate:(e,t)=>t,numberOfInputs:0},{displayKey:"false",displayName:"False",predicate:(e,t)=>!1===t,numberOfInputs:0}]});break;case"date":r&&a({valueFormatter:e=>{let t=i(e);return tY(t)?t:s("blanks","(Blanks)")},treeList:!0,treeListFormatter:(e,t)=>{if(1===t&&null!=e){let t=o6[Number(e)-1];return s(t,o4[t])}return e??s("blanks","(Blanks)")}});break;case"dateString":{let e=t.dateParser;a(r?{valueFormatter:e=>{let t=i(e);return tY(t)?t:s("blanks","(Blanks)")},treeList:!0,treeListPathGetter:t=>{let i=e(t??void 0);return i?[String(i.getFullYear()),String(i.getMonth()+1),String(i.getDate())]:null},treeListFormatter:(e,t)=>{if(1===t&&null!=e){let t=o6[Number(e)-1];return s(t,o4[t])}return e??s("blanks","(Blanks)")}}:{comparator:(t,i)=>{let r=e(i);return null==i||r<t?-1:r>t?1:0}});break}case"object":r?a({valueFormatter:e=>{let t=i(e);return tY(t)?t:s("blanks","(Blanks)")}}):e.filterValueGetter=e=>i({column:e.column,node:e.node,value:this.valueService.getValue(e.column,e.node)})}}destroy(){super.destroy(),this.allColumnFilters.forEach(e=>this.disposeFilterWrapper(e,"gridDestroyed")),this.allColumnListeners.clear()}},o8=class extends sQ{constructor(){super(`
            <div class="ag-floating-filter-input" role="presentation">
                <ag-input-text-field data-ref="eFloatingFilterText"></ag-input-text-field>
            </div>`,[ob]),this.eFloatingFilterText=null}wireBeans(e){this.columnNameService=e.columnNameService}destroy(){super.destroy()}init(e){this.params=e;let t=this.columnNameService.getDisplayNameForColumn(e.column,"header",!0),i=this.localeService.getLocaleTextFunc();this.eFloatingFilterText.setDisabled(!0).setInputAriaLabel(`${t} ${i("ariaFilterInput","Filter Input")}`)}onParentModelChanged(e){if(null==e){this.eFloatingFilterText.setValue("");return}this.params.parentFilterInstance(t=>{if(t.getModelAsString){let i=t.getModelAsString(e);this.eFloatingFilterText.setValue(i)}})}onParamsUpdated(e){this.refresh(e)}refresh(e){this.init(e)}},o7=class extends sQ{wireBeans(e){this.columnNameService=e.columnNameService}getDefaultDebounceMs(){return 0}destroy(){super.destroy()}isEventFromFloatingFilter(e){return e&&e.afterFloatingFilter}isEventFromDataChange(e){return e?.afterDataChange}getLastType(){return this.lastType}isReadOnly(){return this.readOnly}setLastTypeFromModel(e){let t;if(!e){this.lastType=this.optionsFactory.getDefaultOption();return}t=e.operator?e.conditions[0]:e,this.lastType=t.type}canWeEditAfterModelFromParentFilter(e){return e?!e.operator&&this.isTypeEditable(e.type):this.isTypeEditable(this.lastType)}init(e){this.setSimpleParams(e,!1)}setSimpleParams(e,t=!0){this.optionsFactory=new om,this.optionsFactory.init(e.filterParams,this.getDefaultFilterOptions()),t||(this.lastType=this.optionsFactory.getDefaultOption()),this.readOnly=!!e.filterParams.readOnly;let i=this.isTypeEditable(this.optionsFactory.getDefaultOption());this.setEditable(i)}onParamsUpdated(e){this.refresh(e)}refresh(e){this.setSimpleParams(e)}doesFilterHaveSingleInput(e){let{numberOfInputs:t}=this.optionsFactory.getCustomOption(e)||{};return null==t||1==t}isTypeEditable(e){return!!e&&!this.isReadOnly()&&this.doesFilterHaveSingleInput(e)&&0>["inRange","empty","blank","notBlank"].indexOf(e)}getAriaLabel(e){let t=this.columnNameService.getDisplayNameForColumn(e.column,"header",!0),i=this.localeService.getLocaleTextFunc();return`${t} ${i("ariaFilterInput","Filter Input")}`}},o9=class extends o7{constructor(){super(`
            <div class="ag-floating-filter-input" role="presentation">
                <ag-input-text-field data-ref="eReadOnlyText"></ag-input-text-field>
                <div data-ref="eDateWrapper" style="display: flex;"></div>
            </div>`,[ob]),this.eReadOnlyText=null,this.eDateWrapper=null}wireBeans(e){super.wireBeans(e),this.context=e.context,this.userComponentFactory=e.userComponentFactory}getDefaultFilterOptions(){return oj}init(e){super.init(e),this.params=e,this.filterParams=e.filterParams,this.createDateComponent(),this.filterModelFormatter=new oH(this.filterParams,this.localeService,this.optionsFactory);let t=this.localeService.getLocaleTextFunc();this.eReadOnlyText.setDisabled(!0).setInputAriaLabel(t("ariaDateFilterInput","Date Filter Input"))}onParamsUpdated(e){this.refresh(e)}refresh(e){super.refresh(e),this.params=e,this.filterParams=e.filterParams,this.updateDateComponent(),this.filterModelFormatter.updateParams({optionsFactory:this.optionsFactory,dateFilterParams:this.filterParams}),this.updateCompOnModelChange(e.currentParentModel())}updateCompOnModelChange(e){let t=!this.isReadOnly()&&this.canWeEditAfterModelFromParentFilter(e);this.setEditable(t),t?(e?this.dateComp.setDate(o_(e.dateFrom)):this.dateComp.setDate(null),this.eReadOnlyText.setValue("")):(this.eReadOnlyText.setValue(this.filterModelFormatter.getModelAsString(e)),this.dateComp.setDate(null))}setEditable(e){sC(this.eDateWrapper,e),sC(this.eReadOnlyText.getGui(),!e)}onParentModelChanged(e,t){this.isEventFromFloatingFilter(t)||this.isEventFromDataChange(t)||(super.setLastTypeFromModel(e),this.updateCompOnModelChange(e))}onDateChanged(){let e=oB(this.dateComp.getDate());this.params.parentFilterInstance(t=>{if(t){let i=o_(e);t.onFloatingFilterChanged(this.getLastType()||null,i)}})}getDateComponentParams(){let e=on(this.params.filterParams,this.getDefaultDebounceMs());return{onDateChanged:tj(this.onDateChanged.bind(this),e),filterParams:this.params.column.getColDef().filterParams}}createDateComponent(){this.dateComp=new oV(this.context,this.userComponentFactory,this.getDateComponentParams(),this.eDateWrapper,e=>{e.setInputAriaLabel(this.getAriaLabel(this.params))}),this.addDestroyFunc(()=>this.dateComp.destroy())}updateDateComponent(){let e=this.gos.addGridCommonParams(this.getDateComponentParams());this.dateComp.updateParams(e)}getFilterModelFormatter(){return this.filterModelFormatter}},ne=class extends sQ{constructor(){super(`
            <div class="ag-filter-filter">
                <ag-input-text-field class="ag-date-filter" data-ref="eDateInput"></ag-input-text-field>
            </div>`,[ob]),this.eDateInput=null}destroy(){super.destroy()}init(e){this.params=e,this.setParams(e);let t=this.eDateInput.getInputElement();this.addManagedListeners(t,{mouseDown:()=>{this.eDateInput.isDisabled()||this.usingSafariDatePicker||t.focus()},input:e=>{e.target!==ih(this.gos)||this.eDateInput.isDisabled()||this.params.onDateChanged()}})}setParams(e){let t=this.eDateInput.getInputElement(),i=this.shouldUseBrowserDatePicker(e);this.usingSafariDatePicker=i&&so(),t.type=i?"date":"text";let{minValidYear:r,maxValidYear:s,minValidDate:a,maxValidDate:o}=e.filterParams||{};if(a&&r&&tO("DateFilter should not have both minValidDate and minValidYear parameters set at the same time! minValidYear will be ignored."),o&&s&&tO("DateFilter should not have both maxValidDate and maxValidYear parameters set at the same time! maxValidYear will be ignored."),a&&o){let[e,t]=[a,o].map(e=>e instanceof Date?e:o_(e));e&&t&&e.getTime()>t.getTime()&&tO("DateFilter parameter minValidDate should always be lower than or equal to parameter maxValidDate.")}a?a instanceof Date?t.min=oz(a):t.min=a:r&&(t.min=`${r}-01-01`),o?o instanceof Date?t.max=oz(o):t.max=o:s&&(t.max=`${s}-12-31`)}onParamsUpdated(e){this.refresh(e)}refresh(e){this.params=e,this.setParams(e)}getDate(){return o_(this.eDateInput.getValue())}setDate(e){this.eDateInput.setValue(oB(e,!1))}setInputPlaceholder(e){this.eDateInput.setInputPlaceholder(e)}setInputAriaLabel(e){this.eDateInput.setAriaLabel(e)}setDisabled(e){this.eDateInput.setDisabled(e)}afterGuiAttached(e){e&&e.suppressFocus||this.eDateInput.getInputElement().focus()}shouldUseBrowserDatePicker(e){return e.filterParams&&null!=e.filterParams.browserDatePicker?e.filterParams.browserDatePicker:sl()||sh()||so()&&sn()>=14.1}},nt=class extends i2{constructor(e){super(),this.params=e,this.eFloatingFilterTextInput=null,this.valueChangedListener=()=>{}}setupGui(e){this.eFloatingFilterTextInput=this.createManagedBean(new ow(this.params?.config));let t=this.eFloatingFilterTextInput.getGui();e.appendChild(t);let i=e=>this.valueChangedListener(e);this.addManagedListeners(t,{input:i,keydown:i})}setEditable(e){this.eFloatingFilterTextInput.setDisabled(!e)}setAutoComplete(e){this.eFloatingFilterTextInput.setAutoComplete(e)}getValue(){return this.eFloatingFilterTextInput.getValue()}setValue(e,t){this.eFloatingFilterTextInput.setValue(e,t)}setValueChangedListener(e){this.valueChangedListener=e}setParams(e){this.setAriaLabel(e.ariaLabel),void 0!==e.autoComplete&&this.setAutoComplete(e.autoComplete)}setAriaLabel(e){this.eFloatingFilterTextInput.setInputAriaLabel(e)}},ni=class extends o7{constructor(){super(...arguments),this.eFloatingFilterInputContainer=null}postConstruct(){this.setTemplate(`
            <div class="ag-floating-filter-input" role="presentation" data-ref="eFloatingFilterInputContainer"></div>
        `)}getDefaultDebounceMs(){return 500}onParentModelChanged(e,t){this.isEventFromFloatingFilter(t)||this.isEventFromDataChange(t)||(this.setLastTypeFromModel(e),this.setEditable(this.canWeEditAfterModelFromParentFilter(e)),this.floatingFilterInputService.setValue(this.getFilterModelFormatter().getModelAsString(e)))}init(e){this.setupFloatingFilterInputService(e),super.init(e),this.setTextInputParams(e)}setupFloatingFilterInputService(e){this.floatingFilterInputService=this.createFloatingFilterInputService(e),this.floatingFilterInputService.setupGui(this.eFloatingFilterInputContainer)}setTextInputParams(e){this.params=e;let t=e.browserAutoComplete??!1;if(this.floatingFilterInputService.setParams({ariaLabel:this.getAriaLabel(e),autoComplete:t}),this.applyActive=ol(this.params.filterParams),!this.isReadOnly()){let e=on(this.params.filterParams,this.getDefaultDebounceMs()),t=tj(this.syncUpWithParentFilter.bind(this),e);this.floatingFilterInputService.setValueChangedListener(t)}}onParamsUpdated(e){this.refresh(e)}refresh(e){super.refresh(e),this.setTextInputParams(e)}recreateFloatingFilterInputService(e){let t=this.floatingFilterInputService.getValue();sL(this.eFloatingFilterInputContainer),this.destroyBean(this.floatingFilterInputService),this.setupFloatingFilterInputService(e),this.floatingFilterInputService.setValue(t,!0)}syncUpWithParentFilter(e){let t=e.key===aa.ENTER;if(this.applyActive&&!t)return;let i=this.floatingFilterInputService.getValue();this.params.filterParams.trimInput&&(i=oR(i),this.floatingFilterInputService.setValue(i,!0)),this.params.parentFilterInstance(e=>{e&&e.onFloatingFilterChanged(this.getLastType()||null,i||null)})}setEditable(e){this.floatingFilterInputService.setEditable(e)}},nr=class extends i2{constructor(){super(...arguments),this.valueChangedListener=()=>{},this.numberInputActive=!0}setupGui(e){this.eFloatingFilterNumberInput=this.createManagedBean(new oS),this.eFloatingFilterTextInput=this.createManagedBean(new ow),this.eFloatingFilterTextInput.setDisabled(!0);let t=this.eFloatingFilterNumberInput.getGui(),i=this.eFloatingFilterTextInput.getGui();e.appendChild(t),e.appendChild(i),this.setupListeners(t,e=>this.valueChangedListener(e)),this.setupListeners(i,e=>this.valueChangedListener(e))}setEditable(e){this.numberInputActive=e,this.eFloatingFilterNumberInput.setDisplayed(this.numberInputActive),this.eFloatingFilterTextInput.setDisplayed(!this.numberInputActive)}setAutoComplete(e){this.eFloatingFilterNumberInput.setAutoComplete(e),this.eFloatingFilterTextInput.setAutoComplete(e)}getValue(){return this.getActiveInputElement().getValue()}setValue(e,t){this.getActiveInputElement().setValue(e,t)}getActiveInputElement(){return this.numberInputActive?this.eFloatingFilterNumberInput:this.eFloatingFilterTextInput}setValueChangedListener(e){this.valueChangedListener=e}setupListeners(e,t){this.addManagedListeners(e,{input:t,keydown:t})}setParams(e){this.setAriaLabel(e.ariaLabel),void 0!==e.autoComplete&&this.setAutoComplete(e.autoComplete)}setAriaLabel(e){this.eFloatingFilterNumberInput.setInputAriaLabel(e),this.eFloatingFilterTextInput.setInputAriaLabel(e)}},ns=class extends i2{constructor(){super(...arguments),this.beanName="quickFilterService",this.quickFilter=null,this.quickFilterParts=null}wireBeans(e){this.valueService=e.valueService,this.columnModel=e.columnModel,this.rowModel=e.rowModel,this.pivotResultColsService=e.pivotResultColsService}postConstruct(){let e=this.resetQuickFilterCache.bind(this);this.addManagedEventListeners({columnPivotModeChanged:e,newColumnsLoaded:e,columnRowGroupChanged:e,columnVisible:()=>{this.gos.get("includeHiddenColumnsInQuickFilter")||this.resetQuickFilterCache()}}),this.addManagedPropertyListener("quickFilterText",e=>this.setQuickFilter(e.currentValue)),this.addManagedPropertyListeners(["includeHiddenColumnsInQuickFilter","applyQuickFilterBeforePivotOrAgg"],()=>this.onQuickFilterColumnConfigChanged()),this.quickFilter=this.parseQuickFilter(this.gos.get("quickFilterText")),this.parser=this.gos.get("quickFilterParser"),this.matcher=this.gos.get("quickFilterMatcher"),this.setQuickFilterParts(),this.addManagedPropertyListeners(["quickFilterMatcher","quickFilterParser"],()=>this.setQuickFilterParserAndMatcher())}refreshQuickFilterCols(){let e=this.columnModel.isPivotMode(),t=this.columnModel.getAutoCols(),i=this.columnModel.getColDefCols(),r=(e&&!this.gos.get("applyQuickFilterBeforePivotOrAgg")?this.pivotResultColsService.getPivotResultCols()?.list:i)??[];t&&(r=r.concat(t)),this.colsForQuickFilter=this.gos.get("includeHiddenColumnsInQuickFilter")?r:r.filter(e=>e.isVisible()||e.isRowGroupActive())}isQuickFilterPresent(){return null!==this.quickFilter}doesRowPassQuickFilter(e){let t=this.gos.get("cacheQuickFilter");return this.matcher?this.doesRowPassQuickFilterMatcher(t,e):this.quickFilterParts.every(i=>t?this.doesRowPassQuickFilterCache(e,i):this.doesRowPassQuickFilterNoCache(e,i))}resetQuickFilterCache(){this.rowModel.forEachNode(e=>e.quickFilterAggregateText=null)}setQuickFilterParts(){let{quickFilter:e,parser:t}=this;e?this.quickFilterParts=t?t(e):e.split(" "):this.quickFilterParts=null}parseQuickFilter(e){return tY(e)?t4(this.gos)?e.toUpperCase():(tO("Quick filtering only works with the Client-Side Row Model"),null):null}setQuickFilter(e){if(null!=e&&"string"!=typeof e){tO(`Grid option quickFilterText only supports string inputs, received: ${typeof e}`);return}let t=this.parseQuickFilter(e);this.quickFilter!==t&&(this.quickFilter=t,this.setQuickFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged"}))}setQuickFilterParserAndMatcher(){let e=this.gos.get("quickFilterParser"),t=this.gos.get("quickFilterMatcher"),i=e!==this.parser||t!==this.matcher;this.parser=e,this.matcher=t,i&&(this.setQuickFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged"}))}onQuickFilterColumnConfigChanged(){this.refreshQuickFilterCols(),this.resetQuickFilterCache(),this.isQuickFilterPresent()&&this.dispatchLocalEvent({type:"quickFilterChanged"})}doesRowPassQuickFilterNoCache(e,t){return this.colsForQuickFilter.some(i=>{let r=this.getQuickFilterTextForColumn(i,e);return tY(r)&&r.indexOf(t)>=0})}doesRowPassQuickFilterCache(e,t){return this.checkGenerateQuickFilterAggregateText(e),e.quickFilterAggregateText.indexOf(t)>=0}doesRowPassQuickFilterMatcher(e,t){let i;e?(this.checkGenerateQuickFilterAggregateText(t),i=t.quickFilterAggregateText):i=this.getQuickFilterAggregateText(t);let{quickFilterParts:r,matcher:s}=this;return s(r,i)}checkGenerateQuickFilterAggregateText(e){e.quickFilterAggregateText||(e.quickFilterAggregateText=this.getQuickFilterAggregateText(e))}getQuickFilterTextForColumn(e,t){let i=this.valueService.getValue(e,t,!0),r=e.getColDef();if(r.getQuickFilterText){let s=this.gos.addGridCommonParams({value:i,node:t,data:t.data,column:e,colDef:r});i=r.getQuickFilterText(s)}return tY(i)?i.toString().toUpperCase():null}getQuickFilterAggregateText(e){let t=[];return this.colsForQuickFilter.forEach(i=>{let r=this.getQuickFilterTextForColumn(i,e);tY(r)&&t.push(r)}),t.join("\n")}},na={version:o2,moduleName:"@ag-grid-community/filter-core",beans:[a9]},no={version:o2,moduleName:"@ag-grid-community/column-filter",beans:[o5],dependantModules:[na]},nn={version:o2,moduleName:"@ag-grid-community/floating-filter-core",controllers:[{name:"headerFilterCell",classImp:o1}],dependantModules:[no]},nl={version:o2,moduleName:"@ag-grid-community/floating-filter",dependantModules:[nn,no]},nh={version:o2,moduleName:"@ag-grid-community/read-only-floating-filter",userComponents:[{name:"agReadOnlyFloatingFilter",classImp:o8}],dependantModules:[nn]},nd={version:o2,moduleName:"@ag-grid-community/quick-filter-core",beans:[ns],dependantModules:[na]},nc=class extends sQ{constructor(e,t){super(e),this.ctrl=t}getCtrl(){return this.ctrl}},nu=class extends nc{constructor(e){super(`<div class="ag-header-cell ag-floating-filter" role="gridcell">
            <div data-ref="eFloatingFilterBody" role="presentation"></div>
            <div class="ag-floating-filter-button ag-hidden" data-ref="eButtonWrapper" role="presentation">
                <button type="button" class="ag-button ag-floating-filter-button-button" data-ref="eButtonShowMainFilter" tabindex="-1"></button>
            </div>
        </div>`,e),this.eFloatingFilterBody=null,this.eButtonWrapper=null,this.eButtonShowMainFilter=null}postConstruct(){let e=this.getGui();this.ctrl.setComp({addOrRemoveCssClass:(e,t)=>this.addOrRemoveCssClass(e,t),addOrRemoveBodyCssClass:(e,t)=>this.eFloatingFilterBody.classList.toggle(e,t),setButtonWrapperDisplayed:e=>sC(this.eButtonWrapper,e),setCompDetails:e=>this.setCompDetails(e),getFloatingFilterComp:()=>this.compPromise,setWidth:t=>e.style.width=t,setMenuIcon:e=>this.eButtonShowMainFilter.appendChild(e)},e,this.eButtonShowMainFilter,this.eFloatingFilterBody,void 0)}setCompDetails(e){if(!e){this.destroyFloatingFilterComp(),this.compPromise=null;return}this.compPromise=e.newAgStackInstance(),this.compPromise.then(e=>this.afterCompCreated(e))}destroy(){this.destroyFloatingFilterComp(),super.destroy()}destroyFloatingFilterComp(){this.floatingFilterComp&&(this.eFloatingFilterBody.removeChild(this.floatingFilterComp.getGui()),this.floatingFilterComp=this.destroyBean(this.floatingFilterComp))}afterCompCreated(e){if(e){if(!this.isAlive()){this.destroyBean(e);return}this.destroyFloatingFilterComp(),this.floatingFilterComp=e,this.eFloatingFilterBody.appendChild(e.getGui()),e.afterGuiAttached&&e.afterGuiAttached()}}},np=class extends nc{constructor(e){super(`<div class="ag-header-cell" role="columnheader">
            <div data-ref="eResize" class="ag-header-cell-resize" role="presentation"></div>
            <div data-ref="eHeaderCompWrapper" class="ag-header-cell-comp-wrapper" role="presentation"></div>
        </div>`,e),this.eResize=null,this.eHeaderCompWrapper=null,this.headerCompVersion=0,this.column=e.getColumnGroupChild(),this.pinned=e.getPinned()}postConstruct(){var e,t;let i=this.getGui();e="col-id",null!=(t=this.column.getColId())&&""!=t?i.setAttribute(e,t):i.removeAttribute(e),this.ctrl.setComp({setWidth:e=>i.style.width=e,addOrRemoveCssClass:(e,t)=>this.addOrRemoveCssClass(e,t),setAriaSort:e=>e?void rq(i,"sort",e):void rX(i,"sort"),setUserCompDetails:e=>this.setUserCompDetails(e),getUserCompInstance:()=>this.headerComp},this.getGui(),this.eResize,this.eHeaderCompWrapper,void 0);let r=this.ctrl.getSelectAllGui();this.eResize.insertAdjacentElement("afterend",r)}destroy(){this.destroyHeaderComp(),super.destroy()}destroyHeaderComp(){this.headerComp&&(this.eHeaderCompWrapper.removeChild(this.headerCompGui),this.headerComp=this.destroyBean(this.headerComp),this.headerCompGui=void 0)}setUserCompDetails(e){this.headerCompVersion++;let t=this.headerCompVersion;e.newAgStackInstance().then(e=>this.afterCompCreated(t,e))}afterCompCreated(e,t){if(e!=this.headerCompVersion||!this.isAlive()){this.destroyBean(t);return}this.destroyHeaderComp(),this.headerComp=t,this.headerCompGui=t.getGui(),this.eHeaderCompWrapper.appendChild(this.headerCompGui),this.ctrl.setDragSource(this.getGui())}},ng=class extends nc{constructor(e){super(`<div class="ag-header-group-cell" role="columnheader">
            <div data-ref="eHeaderCompWrapper" class="ag-header-cell-comp-wrapper" role="presentation"></div>
            <div data-ref="eResize" class="ag-header-cell-resize" role="presentation"></div>
        </div>`,e),this.eResize=null,this.eHeaderCompWrapper=null}postConstruct(){let e=this.getGui(),t=(t,i)=>void 0!=i?e.setAttribute(t,i):e.removeAttribute(t);e.setAttribute("col-id",this.ctrl.getColId()),this.ctrl.setComp({addOrRemoveCssClass:(e,t)=>this.addOrRemoveCssClass(e,t),setResizableDisplayed:e=>sC(this.eResize,e),setWidth:t=>e.style.width=t,setAriaExpanded:e=>t("aria-expanded",e),setUserCompDetails:e=>this.setUserCompDetails(e),getUserCompInstance:()=>this.headerGroupComp},e,this.eResize,this.eHeaderCompWrapper,void 0)}setUserCompDetails(e){e.newAgStackInstance().then(e=>this.afterHeaderCompCreated(e))}afterHeaderCompCreated(e){let t=()=>this.destroyBean(e);if(!this.isAlive()){t();return}let i=this.getGui(),r=e.getGui();this.eHeaderCompWrapper.appendChild(r),this.addDestroyFunc(t),this.headerGroupComp=e,this.ctrl.setDragSource(i)}},nm=((c=nm||{}).COLUMN_GROUP="group",c.COLUMN="column",c.FLOATING_FILTER="filter",c),nf=class extends sQ{constructor(e){super(),this.headerComps={},this.ctrl=e,this.setTemplate(`<div class="${this.ctrl.getHeaderRowClass()}" role="row"></div>`)}postConstruct(){se(this.getGui(),this.ctrl.getAriaRowIndex()),this.ctrl.setComp({setHeight:e=>this.getGui().style.height=e,setTop:e=>this.getGui().style.top=e,setHeaderCtrls:(e,t)=>this.setHeaderCtrls(e,t),setWidth:e=>this.getGui().style.width=e},void 0)}destroy(){this.setHeaderCtrls([],!1),super.destroy()}setHeaderCtrls(e,t){if(!this.isAlive())return;let i=this.headerComps;if(this.headerComps={},e.forEach(e=>{let t=e.instanceId,r=i[t];delete i[t],null==r&&(r=this.createHeaderComp(e),this.getGui().appendChild(r.getGui())),this.headerComps[t]=r}),ro(i,(e,t)=>{this.getGui().removeChild(t.getGui()),this.destroyBean(t)}),t){let e=rh(this.headerComps);e.sort((e,t)=>e.getCtrl().getColumnGroupChild().getLeft()-t.getCtrl().getColumnGroupChild().getLeft());let t=e.map(e=>e.getGui());sG(this.getGui(),t)}}createHeaderComp(e){let t;switch(this.ctrl.getType()){case"group":t=new ng(e);break;case"filter":t=new nu(e);break;default:t=new np(e)}return this.createBean(t),t.setParentComponent(this),t}},nv=((u=nv||{})[u.UP=0]="UP",u[u.DOWN=1]="DOWN",u[u.LEFT=2]="LEFT",u[u.RIGHT=3]="RIGHT",u),ny=class extends i2{constructor(){super(...arguments),this.beanName="headerNavigationService",this.currentHeaderRowWithoutSpan=-1}wireBeans(e){this.focusService=e.focusService,this.headerPositionUtils=e.headerPositionUtils,this.ctrlsService=e.ctrlsService,this.columnModel=e.columnModel,this.visibleColService=e.visibleColsService}postConstruct(){this.ctrlsService.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl});let e=ia(this.gos);this.addManagedElementListeners(e,{mousedown:()=>this.setCurrentHeaderRowWithoutSpan(-1)})}getHeaderRowCount(){return this.ctrlsService.getHeaderRowContainerCtrl()?.getRowCount()??0}getHeaderPositionForColumn(e,t){let i;if("string"==typeof e?(i=this.columnModel.getCol(e))||(i=this.visibleColService.getColumnGroup(e)):i=e,!i)return null;let r=this.ctrlsService.getHeaderRowContainerCtrl(),s="filter"===iB(r?.getAllCtrls()||[]).getType(),a=this.getHeaderRowCount()-1,o=-1,n=i;for(;n;)o++,n=n.getParent();let l=o;return t&&s&&l===a-1&&l++,-1===l?null:{headerRowIndex:l,column:i}}navigateVertically(e,t,i){if(t||(t=this.focusService.getFocusedHeader()),!t)return!1;let{headerRowIndex:r}=t,s=t.column,a=this.getHeaderRowCount(),{headerRowIndex:o,column:n,headerRowIndexWithoutSpan:l}=0===e?this.headerPositionUtils.getColumnVisibleParent(s,r):this.headerPositionUtils.getColumnVisibleChild(s,r),h=!1;return o<0&&(o=0,n=s,h=!0),o>=a?(o=-1,this.setCurrentHeaderRowWithoutSpan(-1)):void 0!==l&&(this.currentHeaderRowWithoutSpan=l),(!!h||!!n)&&this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:o,column:n},allowUserOverride:!0,event:i})}setCurrentHeaderRowWithoutSpan(e){this.currentHeaderRowWithoutSpan=e}navigateHorizontally(e,t=!1,i){let r,s;let a=this.focusService.getFocusedHeader(),o=this.gos.get("enableRtl");if(-1!==this.currentHeaderRowWithoutSpan?a.headerRowIndex=this.currentHeaderRowWithoutSpan:this.currentHeaderRowWithoutSpan=a.headerRowIndex,s=2===e!==o?"Before":"After",(r=this.headerPositionUtils.findHeader(a,s))||!t)return this.focusService.focusHeaderPosition({headerPosition:r,direction:s,fromTab:t,allowUserOverride:!0,event:i});if(t){let e=this.gos.getCallback("tabToNextHeader");if(e)return this.focusService.focusHeaderPositionFromUserFunc({userFunc:e,headerPosition:r,direction:s})}return this.focusNextHeaderRow(a,s,i)}focusNextHeaderRow(e,t,i){let r;let s=e.headerRowIndex,a=null;if("Before"===t?s>0&&(r=s-1,this.currentHeaderRowWithoutSpan-=1,a=this.headerPositionUtils.findColAtEdgeForHeaderRow(r,"end")):(r=s+1,this.currentHeaderRowWithoutSpan<this.getHeaderRowCount()?this.currentHeaderRowWithoutSpan+=1:this.setCurrentHeaderRowWithoutSpan(-1),a=this.headerPositionUtils.findColAtEdgeForHeaderRow(r,"start")),!a)return!1;let{column:o,headerRowIndex:n}=this.headerPositionUtils.getHeaderIndexToFocus(a.column,a?.headerRowIndex);return this.focusService.focusHeaderPosition({headerPosition:{column:o,headerRowIndex:n},direction:t,fromTab:!0,allowUserOverride:!0,event:i})}scrollToColumn(e,t="After"){let i;if(!e.getPinned()){if(rO(e)){let r=e.getDisplayedLeafColumns();i="Before"===t?iB(r):r[0]}else i=e;this.gridBodyCon.getScrollFeature().ensureColumnVisible(i)}}},nC=class extends i2{wireBeans(e){this.animationFrameService=e.animationFrameService,this.headerNavigationService=e.headerNavigationService,this.focusService=e.focusService,this.columnModel=e.columnModel,this.visibleColsService=e.visibleColsService,this.ctrlsService=e.ctrlsService,this.filterManager=e.filterManager,this.menuService=e.menuService}setComp(e,t,i){this.comp=e,this.eGui=t,this.createManagedBean(new oa(i,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addManagedEventListeners({columnPivotModeChanged:this.onPivotModeChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this)}),this.onPivotModeChanged(),this.setupHeaderHeight();let r=this.onHeaderContextMenu.bind(this);this.addManagedElementListeners(this.eGui,{contextmenu:r}),this.mockContextMenuForIPad(r),this.ctrlsService.register("gridHeaderCtrl",this)}setupHeaderHeight(){let e=this.setHeaderHeight.bind(this);e(),this.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],e),this.addManagedEventListeners({displayedColumnsChanged:e,columnHeaderHeightChanged:e,columnGroupHeaderHeightChanged:()=>this.animationFrameService.requestAnimationFrame(()=>e()),gridStylesChanged:e,advancedFilterEnabledChanged:e})}getHeaderHeight(){return this.headerHeight}setHeaderHeight(){let{columnModel:e}=this,t=0,i=this.columnModel.getGroupRowsHeight().reduce((e,t)=>e+t,0),r=this.columnModel.getColumnHeaderRowHeight();if(this.filterManager?.hasFloatingFilters()&&(t+=e.getFloatingFiltersHeight()),t+=i+r,this.headerHeight===t)return;this.headerHeight=t;let s=`${t+1}px`;this.comp.setHeightAndMinHeight(s),this.eventService.dispatchEvent({type:"headerHeightChanged"})}onPivotModeChanged(){let e=this.columnModel.isPivotMode();this.comp.addOrRemoveCssClass("ag-pivot-on",e),this.comp.addOrRemoveCssClass("ag-pivot-off",!e)}onDisplayedColumnsChanged(){let e=this.visibleColsService.getAllCols().some(e=>e.isSpanHeaderHeight());this.comp.addOrRemoveCssClass("ag-header-allow-overflow",e)}onTabKeyDown(e){let t=this.gos.get("enableRtl"),i=e.shiftKey;(this.headerNavigationService.navigateHorizontally(i!==t?2:3,!0,e)||!i&&this.focusService.focusOverlay(!1)||this.focusService.focusNextGridCoreContainer(i))&&e.preventDefault()}handleKeyDown(e){let t=null;switch(e.key){case aa.LEFT:t=2;case aa.RIGHT:tY(t)||(t=3),this.headerNavigationService.navigateHorizontally(t,!1,e)&&e.preventDefault();break;case aa.UP:t=0;case aa.DOWN:tY(t)||(t=1),this.headerNavigationService.navigateVertically(t,null,e)&&e.preventDefault();break;default:return}}onFocusOut(e){let{relatedTarget:t}=e;!(!t&&this.eGui.contains(ih(this.gos)))&&(this.eGui.contains(t)||this.focusService.clearFocusedHeader())}onHeaderContextMenu(e,t,i){if(!e&&!i||!this.menuService.isHeaderContextMenuEnabled())return;let{target:r}=e??t;(r===this.eGui||r===this.ctrlsService.getHeaderRowContainerCtrl()?.getViewportElement())&&this.menuService.showHeaderContextMenu(void 0,e,i)}mockContextMenuForIPad(e){if(!sc())return;let t=new s6(this.eGui);this.addManagedListeners(t,{longTap:t=>{e(void 0,t.touchStart,t.touchEvent)}}),this.addDestroyFunc(()=>t.destroy())}},nw=class extends i2{constructor(e,t=!1){super(),this.callback=e,this.addSpacer=t}wireBeans(e){this.visibleColsService=e.visibleColsService,this.scrollVisibleService=e.scrollVisibleService}postConstruct(){let 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(){let e;let t=t5(this.gos,"print"),i=this.visibleColsService.getBodyContainerWidth(),r=this.visibleColsService.getColsLeftWidth(),s=this.visibleColsService.getDisplayedColumnsRightWidth();t?e=i+r+s:(e=i,this.addSpacer&&0===(this.gos.get("enableRtl")?r:s)&&this.scrollVisibleService.isVerticalScrollShowing()&&(e+=this.scrollVisibleService.getScrollbarWidth())),this.callback(e)}},nb=class extends i2{constructor(e){super(),this.columnsToAggregate=[],this.columnsToGroup=[],this.columnsToPivot=[],this.pinned=e}wireBeans(e){this.funcColsService=e.funcColsService}onDragEnter(e){if(this.clearColumnsList(),this.gos.get("functionsReadOnly"))return;let t=e.dragItem.columns;t&&t.forEach(e=>{!(!e.isPrimary()||e.isAnyFunctionActive())&&(e.isAllowValue()?this.columnsToAggregate.push(e):e.isAllowRowGroup()?this.columnsToGroup.push(e):e.isAllowPivot()&&this.columnsToPivot.push(e))})}getIconName(){return this.columnsToAggregate.length+this.columnsToGroup.length+this.columnsToPivot.length>0?this.pinned?"pinned":"move":null}onDragLeave(e){this.clearColumnsList()}clearColumnsList(){this.columnsToAggregate.length=0,this.columnsToGroup.length=0,this.columnsToPivot.length=0}onDragging(e){}onDragStop(e){this.columnsToAggregate.length>0&&this.funcColsService.addValueColumns(this.columnsToAggregate,"toolPanelDragAndDrop"),this.columnsToGroup.length>0&&this.funcColsService.addRowGroupColumns(this.columnsToGroup,"toolPanelDragAndDrop"),this.columnsToPivot.length>0&&this.funcColsService.addPivotColumns(this.columnsToPivot,"toolPanelDragAndDrop")}onDragCancel(){this.clearColumnsList()}};function nS(e){let{isFromHeader:t,fromLeft:i,xPosition:r,fromEnter:s,fakeEvent:a,pinned:o,gos:n,columnModel:l,columnMoveService:h,visibleColsService:d}=e,{allMovingColumns:c}=e;if(t){let e=[];c.forEach(t=>{let i=null,r=t.getParent();for(;null!=r&&1===r.getDisplayedLeafColumns().length;)i=r,r=r.getParent();null!=i?(i.getColGroupDef()?.marryChildren?i.getProvidedColumnGroup().getLeafColumns():i.getLeafColumns()).forEach(t=>{e.includes(t)||e.push(t)}):e.includes(t)||e.push(t)}),c=e}let u=c.slice();l.sortColsLikeCols(u);let p=function(e){let t;let{movingCols:i,draggingRight:r,xPosition:s,pinned:a,gos:o,columnModel:n,visibleColsService:l}=e;if(o.get("suppressMovableColumns")||i.some(e=>e.getColDef().suppressMovable))return[];let h=function(e,t){switch(t){case"left":return e.getLeftCols();case"right":return e.getRightCols();default:return e.getCenterCols()}}(l,a),d=n.getCols(),c=h.filter(e=>iU(i,e)),u=h.filter(e=>!iU(i,e)),p=d.filter(e=>!iU(i,e)),g=0,m=s;if(r){let e=0;c.forEach(t=>e+=t.getActualWidth()),m-=e}if(m>0){for(let e=0;e<u.length&&!((m-=u[e].getActualWidth())<0);e++)g++;r&&g++}if(g>0){let e=u[g-1];t=p.indexOf(e)+1}else -1===(t=p.indexOf(u[0]))&&(t=0);let f=[t],v=(e,t)=>e-t;if(r){let e=t+1,i=d.length-1;for(;e<=i;)f.push(e),e++;f.sort(v)}else{let e=t,i=d.length-1,r=d[e];for(;e<=i&&0>h.indexOf(r);)e++,f.push(e),r=d[e];for(e=t-1;e>=0;)f.push(e),e--;f.sort(v).reverse()}return f}({movingCols:u,draggingRight:i,xPosition:r,pinned:o,gos:n,columnModel:l,visibleColsService:d}),g=function(e,t){let i=t.getCols(),r=e.map(e=>i.indexOf(e)).sort((e,t)=>e-t),s=r[0];return iB(r)-s!=r.length-1?null:s}(u,l);if(0===p.length)return;let m=p[0],f=null!==g&&!s;if(t&&(f=null!==g),f&&!a&&(!i&&m>=g||i&&m<=g))return;let v=d.getAllCols(),y=[],C=null;for(let e=0;e<p.length;e++){let t=p[e],i=h.getProposedColumnOrder(u,t);if(!h.doesOrderPassRules(i))continue;let r=i.filter(e=>v.includes(e));if(null===C)C=r;else if(!iG(r,C))break;let s=function(e){function t(e){let t=[],i=e.getOriginalParent();for(;null!=i;)t.push(i),i=i.getOriginalParent();return t}let i=0;for(let r=0;r<e.length-1;r++){let s=t(e[r]),a=t(e[r+1]);[s,a]=s.length>a.length?[s,a]:[a,s],s.forEach(e=>{-1===a.indexOf(e)&&i++})}return i}(i);y.push({move:t,fragCount:s})}if(0===y.length)return;y.sort((e,t)=>e.fragCount-t.fragCount);let w=y[0].move;if(!(w>l.getCols().length-c.length))return{columns:c,toIndex:w}}function nx(e){let{columns:t,toIndex:i}=nS(e)||{},{finished:r,columnMoveService:s}=e;return t&&null!=i?(s.moveColumns(t,i,"uiColumnMoved",r),r?null:{columns:t,toIndex:i}):null}function nM(e){let{pinned:t,fromKeyboard:i,gos:r,ctrlsService:s,useHeaderRow:a,skipScrollPadding:o}=e,n=s.getHeaderRowContainerCtrl(t)?.getViewportElement(),{x:l}=e;return n?(i&&(l-=n.getBoundingClientRect().left),r.get("enableRtl")&&(a&&(n=n.querySelector(".ag-header-row")),l=n.clientWidth-l),null!=t||o||(l+=s.get("center").getCenterViewportScrollLeft()),l):0}function nE(e,t){for(let i of e)i.setMoving(t,"uiColumnMoved")}var nD=class extends i2{constructor(e){super(),this.needToMoveLeft=!1,this.needToMoveRight=!1,this.lastMovedInfo=null,this.pinned=e,this.isCenterContainer=!tY(e)}wireBeans(e){this.columnModel=e.columnModel,this.visibleColsService=e.visibleColsService,this.columnMoveService=e.columnMoveService,this.dragAndDropService=e.dragAndDropService,this.ctrlsService=e.ctrlsService}postConstruct(){this.ctrlsService.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}getIconName(){for(let e of this.lastDraggingEvent?.dragItem.columns??[]){let t=e.getPinned();if(e.getColDef().lockPinned){if(t==this.pinned)return"move";continue}if(t===this.pinned||!this.pinned)return"move";if(!t&&this.pinned)return"pinned"}return"notAllowed"}onDragEnter(e){let t=e.dragItem.columns;if(0===e.dragSource.type)this.setColumnsVisible(t,!0,"uiColumnDragged");else{let i=e.dragItem.visibleState,r=(t||[]).filter(e=>i[e.getId()]);this.setColumnsVisible(r,!0,"uiColumnDragged")}this.gos.get("suppressMoveWhenColumnDragging")||this.attemptToPinColumns(t,this.pinned),this.onDragging(e,!0,!0)}onDragging(e=this.lastDraggingEvent,t=!1,i=!1,r=!1){let s=this.gos.get("suppressMoveWhenColumnDragging");if(r&&!s){this.finishColumnMoving();return}if(this.lastDraggingEvent=e,!e||!r&&tK(e.hDirection))return;let{pinned:a,gos:o,ctrlsService:n}=this,l=nM({x:e.x,pinned:a,gos:o,ctrlsService:n});t||this.checkCenterForScrolling(l),s?this.handleColumnDragWhileSuppressingMovement(e,t,i,l,r):this.handleColumnDragWhileAllowingMovement(e,t,i,l,r)}onDragLeave(){this.ensureIntervalCleared(),this.clearHighlighted(),this.lastMovedInfo=null}onDragStop(){this.onDragging(this.lastDraggingEvent,!1,!0,!0),this.ensureIntervalCleared(),this.lastMovedInfo=null}onDragCancel(){this.clearHighlighted(),this.ensureIntervalCleared(),this.lastMovedInfo=null}setColumnsVisible(e,t,i){if(!e)return;let r=e.filter(e=>!e.getColDef().lockVisible);this.columnModel.setColsVisible(r,t,i)}finishColumnMoving(){if(this.clearHighlighted(),!this.lastMovedInfo)return;let{columns:e,toIndex:t}=this.lastMovedInfo;this.columnMoveService.moveColumns(e,t,"uiColumnMoved",!0)}handleColumnDragWhileSuppressingMovement(e,t,i,r,s){let a=this.getAllMovingColumns(e,!0);if(s){let e=this.isAttemptingToPin(a);e&&this.attemptToPinColumns(a,void 0,!0);let{fromLeft:r,xPosition:s}=this.getNormalisedXPositionInfo(a,e)||{};if(null==r||null==s){this.finishColumnMoving();return}this.moveColumnsAfterHighlight({allMovingColumns:a,xPosition:s,fromEnter:t,fakeEvent:i,fromLeft:r})}else{if(!this.dragAndDropService.isDropZoneWithinThisGrid(e))return;this.highlightHoveredColumn(a,r)}}handleColumnDragWhileAllowingMovement(e,t,i,r,s){let a=this.getAllMovingColumns(e),o=1===this.normaliseDirection(e.hDirection),n=1===e.dragSource.type,l=nx({...this.getMoveColumnParams({allMovingColumns:a,isFromHeader:n,xPosition:r,fromLeft:o,fromEnter:t,fakeEvent:i}),finished:s});l&&(this.lastMovedInfo=l)}getAllMovingColumns(e,t=!1){let i=e.dragSource.getDragItem(),r=null;return(t&&(r=i.columnsInSplit)||(r=i.columns),r)?r.filter(e=>!e.getColDef().lockPinned||e.getPinned()==this.pinned):[]}getMoveColumnParams(e){let{allMovingColumns:t,isFromHeader:i,xPosition:r,fromLeft:s,fromEnter:a,fakeEvent:o}=e,{pinned:n,gos:l,columnModel:h,columnMoveService:d,visibleColsService:c}=this;return{allMovingColumns:t,isFromHeader:i,fromLeft:s,xPosition:r,pinned:n,fromEnter:a,fakeEvent:o,gos:l,columnModel:h,columnMoveService:d,visibleColsService:c}}findFirstAndLastMovingColumns(e){let t,i;let r=e.length;for(let s=0;s<=r;s++){if(!t){let i=e[s];null!=i.getLeft()&&(t=i)}if(!i){let t=e[r-1-s];null!=t.getLeft()&&(i=t)}if(t&&i)break}return{firstMovingCol:t,lastMovingCol:i}}highlightHoveredColumn(e,t){let i;let{gos:r,columnModel:s}=this,a=r.get("enableRtl"),o=s.getCols().filter(e=>e.isVisible()&&e.getPinned()===this.pinned),n=null,l=null,h=null;for(let e of o){if(l=e.getActualWidth(),null!=(n=this.getNormalisedColumnLeft(e,0,a))){let i=n+l;if(n<=t&&i>=t){h=e;break}}n=null,l=null}if(h)-1!==e.indexOf(h)&&(h=null);else{for(let e=o.length-1;e>=0;e--){let t=o[e],i=o[e].getParent();if(!i){h=t;break}let r=i?.getDisplayedLeafColumns();if(r.length){h=iB(r);break}}if(!h)return;n=this.getNormalisedColumnLeft(h,0,a),l=h.getActualWidth()}this.lastHighlightedColumn?.column!==h&&this.clearHighlighted(),null!=h&&null!=n&&null!=l&&(i=t-n<l/2!==a?0:1,h.setHighlighted(i),this.lastHighlightedColumn={column:h,position:i})}getNormalisedXPositionInfo(e,t){let{gos:i,visibleColsService:r}=this,s=i.get("enableRtl"),{firstMovingCol:a,column:o,position:n}=this.getColumnMoveAndTargetInfo(e,t,s);if(!a||!o||null==n)return;let l=r.getAllCols(),h=l.indexOf(a),d=l.indexOf(o),c=0===n!==s,u=h<d||h===d&&!c,p=0;if(c?u&&(p-=1):u||(p+=1),d+p===h)return;let g=l[d+p];if(g)return{fromLeft:u,xPosition:this.getNormalisedColumnLeft(g,20,s)}}getColumnMoveAndTargetInfo(e,t,i){let r=this.lastHighlightedColumn||{},{firstMovingCol:s,lastMovingCol:a}=this.findFirstAndLastMovingColumns(e);if(!s||!a||r.column||!t)return{firstMovingCol:s,...r};let o="left"===this.getPinDirection();return{firstMovingCol:s,position:o?1:0,column:o!==i?s:a}}normaliseDirection(e){if(this.gos.get("enableRtl"))switch(e){case 0:return 1;case 1:return 0}return e}getNormalisedColumnLeft(e,t,i){let{gos:r,ctrlsService:s}=this,a=e.getLeft();if(null==a)return null;let o=e.getActualWidth();return nM({x:i?a+o-t:a+t,pinned:e.getPinned(),useHeaderRow:i,skipScrollPadding:!0,gos:r,ctrlsService:s})}isAttemptingToPin(e){let t=this.needToMoveLeft||this.needToMoveRight,i=this.failedMoveAttempts>7;return t&&i||e.some(e=>e.getPinned()!==this.pinned)}moveColumnsAfterHighlight(e){let{allMovingColumns:t,xPosition:i,fromEnter:r,fakeEvent:s,fromLeft:a}=e,{columns:o,toIndex:n}=nS(this.getMoveColumnParams({allMovingColumns:t,isFromHeader:!0,xPosition:i,fromLeft:a,fromEnter:r,fakeEvent:s}))||{};o&&null!=n&&(this.lastMovedInfo={columns:o,toIndex:n}),this.finishColumnMoving()}clearHighlighted(){this.lastHighlightedColumn&&(this.lastHighlightedColumn.column.setHighlighted(null),this.lastHighlightedColumn=null)}checkCenterForScrolling(e){if(!this.isCenterContainer)return;let t=this.ctrlsService.get("center"),i=t.getCenterViewportScrollLeft(),r=i+t.getCenterWidth();this.gos.get("enableRtl")?(this.needToMoveRight=e<i+50,this.needToMoveLeft=e>r-50):(this.needToMoveLeft=e<i+50,this.needToMoveRight=e>r-50),this.needToMoveLeft||this.needToMoveRight?this.ensureIntervalStarted():this.ensureIntervalCleared()}ensureIntervalStarted(){this.movingIntervalId||(this.intervalCount=0,this.failedMoveAttempts=0,this.movingIntervalId=window.setInterval(this.moveInterval.bind(this),100),this.dragAndDropService.getDragAndDropImageComponent()?.setIcon(this.needToMoveLeft?"left":"right",!0))}ensureIntervalCleared(){this.movingIntervalId&&(window.clearInterval(this.movingIntervalId),this.movingIntervalId=null,this.failedMoveAttempts=0,this.dragAndDropService.getDragAndDropImageComponent()?.setIcon(this.getIconName()))}moveInterval(){let e;this.intervalCount++,(e=10+5*this.intervalCount)>100&&(e=100);let t=null,i=this.gridBodyCon.getScrollFeature();if(this.needToMoveLeft?t=i.scrollHorizontally(-e):this.needToMoveRight&&(t=i.scrollHorizontally(e)),0!==t)this.onDragging(this.lastDraggingEvent),this.failedMoveAttempts=0;else{if(this.failedMoveAttempts++,this.failedMoveAttempts<=8)return;if(this.dragAndDropService.getDragAndDropImageComponent()?.setIcon("pinned"),!this.gos.get("suppressMoveWhenColumnDragging")){let e=this.lastDraggingEvent?.dragItem.columns;this.attemptToPinColumns(e,void 0,!0)}}}getPinDirection(){return this.needToMoveLeft||"left"===this.pinned?"left":this.needToMoveRight||"right"===this.pinned?"right":void 0}attemptToPinColumns(e,t,i=!1){let r=(e||[]).filter(e=>!e.getColDef().lockPinned);return r.length?(i&&(t=this.getPinDirection()),this.columnModel.setColsPinned(r,t,"uiColumnDragged"),i&&this.dragAndDropService.nudge(),r.length):0}destroy(){super.destroy(),this.lastDraggingEvent=null,this.clearHighlighted(),this.lastMovedInfo=null}},nI=class extends i2{wireBeans(e){this.dragAndDropService=e.dragAndDropService,this.columnModel=e.columnModel,this.ctrlsService=e.ctrlsService}constructor(e,t){super(),this.pinned=e,this.eContainer=t}postConstruct(){this.ctrlsService.whenReady(this,e=>{switch(this.pinned){case"left":this.eSecondaryContainers=[[e.gridBodyCtrl.getBodyViewportElement(),e.left.getContainerElement()],[e.bottomLeft.getContainerElement()],[e.topLeft.getContainerElement()]];break;case"right":this.eSecondaryContainers=[[e.gridBodyCtrl.getBodyViewportElement(),e.right.getContainerElement()],[e.bottomRight.getContainerElement()],[e.topRight.getContainerElement()]];break;default:this.eSecondaryContainers=[[e.gridBodyCtrl.getBodyViewportElement(),e.center.getViewportElement()],[e.bottomCenter.getViewportElement()],[e.topCenter.getViewportElement()]]}}),this.moveColumnFeature=this.createManagedBean(new nD(this.pinned)),this.bodyDropPivotTarget=this.createManagedBean(new nb(this.pinned)),this.dragAndDropService.addDropTarget(this),this.addDestroyFunc(()=>this.dragAndDropService.removeDropTarget(this))}isInterestedIn(e){return 1===e||0===e&&this.gos.get("allowDragFromColumnsToolPanel")}getSecondaryContainers(){return this.eSecondaryContainers}getContainer(){return this.eContainer}getIconName(){return this.currentDropListener.getIconName()}isDropColumnInPivotMode(e){return this.columnModel.isPivotMode()&&0===e.dragSource.type}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()}},nk=class extends i2{wireBeans(e){this.horizontalResizeService=e.horizontalResizeService,this.pinnedWidthService=e.pinnedWidthService,this.ctrlsService=e.ctrlsService,this.columnSizeService=e.columnSizeService,this.columnAutosizeService=e.columnAutosizeService}constructor(e,t,i,r,s){super(),this.pinned=e,this.column=t,this.eResize=i,this.comp=r,this.ctrl=s}postConstruct(){let e,t;let i=[],r=()=>{if(sC(this.eResize,e),!e)return;let r=this.horizontalResizeService.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});if(i.push(r),t){let e=this.gos.get("skipHeaderOnAutoSize"),t=()=>{this.columnAutosizeService.autoSizeColumn(this.column,"uiColumnResized",e)};this.eResize.addEventListener("dblclick",t);let r=new s6(this.eResize);r.addEventListener("doubleTap",t),i.push(()=>{this.eResize.removeEventListener("dblclick",t),r.removeEventListener("doubleTap",t),r.destroy()})}},s=()=>{i.forEach(e=>e()),i.length=0},a=()=>{let i=this.column.isResizable(),a=!this.gos.get("suppressAutoSize")&&!this.column.getColDef().suppressAutoSize;(i!==e||a!==t)&&(e=i,t=a,s(),r())};a(),this.addDestroyFunc(s),this.ctrl.setRefreshFunction("resize",a)}onResizing(e,t){let{column:i,lastResizeAmount:r,resizeStartWidth:s}=this,a=this.normaliseResizeAmount(t);if(!(this.column.getPinned()&&this.pinnedWidthService.getPinnedLeftWidth()+this.pinnedWidthService.getPinnedRightWidth()+(a-r)>sE(this.ctrlsService.getGridBodyCtrl().getBodyViewportElement())-50))this.lastResizeAmount=a,this.columnSizeService.setColumnWidths([{key:i,newWidth:s+a}],this.resizeWithShiftKey,e,"uiColumnResized"),e&&this.toggleColumnResizing(!1)}onResizeStart(e){this.resizeStartWidth=this.column.getActualWidth(),this.lastResizeAmount=0,this.resizeWithShiftKey=e,this.toggleColumnResizing(!0)}toggleColumnResizing(e){this.comp.addOrRemoveCssClass("ag-column-resizing",e)}normaliseResizeAmount(e){let t=e,i="left"!==this.pinned,r="right"===this.pinned;return this.gos.get("enableRtl")?i&&(t*=-1):r&&(t*=-1),t}},nT=class extends i2{constructor(e){super(),this.cbSelectAllVisible=!1,this.processingEventFromCheckbox=!1,this.column=e}wireBeans(e){this.rowModel=e.rowModel,this.selectionService=e.selectionService}postConstruct(){this.selectionOptions=this.gos.get("selection"),this.addManagedPropertyListener("selection",e=>this.selectionOptions=e.currentValue)}onSpaceKeyDown(e){let t=this.cbSelectAll;t.isDisplayed()&&!t.getGui().contains(ih(this.gos))&&(e.preventDefault(),t.setValue(!t.getValue()))}getCheckboxGui(){return this.cbSelectAll.getGui()}setComp(e){this.headerCellCtrl=e,this.cbSelectAll=this.createManagedBean(new ah),this.cbSelectAll.addCssClass("ag-header-select-all"),rQ(this.cbSelectAll.getGui(),"presentation"),this.showOrHideSelectAll(),this.addManagedEventListeners({newColumnsLoaded:this.onNewColumnsLoaded.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),selectionChanged:this.onSelectionChanged.bind(this),paginationChanged:this.onSelectionChanged.bind(this),modelUpdated:this.onModelChanged.bind(this)}),this.addManagedListeners(this.cbSelectAll,{fieldValueChanged:this.onCbSelectAll.bind(this)}),r4(this.cbSelectAll.getGui(),!0),this.cbSelectAll.getInputElement().setAttribute("tabindex","-1"),this.refreshSelectAllLabel()}onNewColumnsLoaded(){this.showOrHideSelectAll()}onDisplayedColumnsChanged(){this.isAlive()&&this.showOrHideSelectAll()}showOrHideSelectAll(){this.cbSelectAllVisible=this.isCheckboxSelection(),this.cbSelectAll.setDisplayed(this.cbSelectAllVisible,{skipAriaHidden:!0}),this.cbSelectAllVisible&&(this.checkRightRowModelType("selectAllCheckbox"),this.checkSelectionType("selectAllCheckbox"),this.updateStateOfCheckbox()),this.refreshSelectAllLabel()}onModelChanged(){this.cbSelectAllVisible&&this.updateStateOfCheckbox()}onSelectionChanged(){this.cbSelectAllVisible&&this.updateStateOfCheckbox()}updateStateOfCheckbox(){if(this.processingEventFromCheckbox)return;this.processingEventFromCheckbox=!0;let e=this.selectionService.getSelectAllState(this.isFilteredOnly(),this.isCurrentPageOnly());this.cbSelectAll.setValue(e);let t=this.selectionService.hasNodesToSelect(this.isFilteredOnly(),this.isCurrentPageOnly());this.cbSelectAll.setDisabled(!t),this.refreshSelectAllLabel(),this.processingEventFromCheckbox=!1}refreshSelectAllLabel(){let e=this.localeService.getLocaleTextFunc(),t=this.cbSelectAll.getValue()?e("ariaChecked","checked"):e("ariaUnchecked","unchecked"),i=e("ariaRowSelectAll","Press Space to toggle all rows selection");this.cbSelectAllVisible?this.headerCellCtrl.setAriaDescriptionProperty("selectAll",`${i} (${t})`):this.headerCellCtrl.setAriaDescriptionProperty("selectAll",null),this.cbSelectAll.setInputAriaLabel(`${i} (${t})`),this.headerCellCtrl.announceAriaDescription()}checkSelectionType(e){return!!iL(this.gos)||(tO(`${e} is only available if using 'multiRow' selection mode.`),!1)}checkRightRowModelType(e){return!!(t4(this.gos)||t6(this.gos))||(tO(`${e} is only available if using 'clientSide' or 'serverSide' rowModelType, you are using ${this.rowModel.getType()}.`),!1)}onCbSelectAll(){if(this.processingEventFromCheckbox||!this.cbSelectAllVisible)return;let e=this.cbSelectAll.getValue(),t=this.isFilteredOnly(),i=this.isCurrentPageOnly(),r="uiSelectAll";i?r="uiSelectAllCurrentPage":t&&(r="uiSelectAllFiltered");let s={source:r,justFiltered:t,justCurrentPage:i};e?this.selectionService.selectAllRowNodes(s):this.selectionService.deselectAllRowNodes(s)}isCheckboxSelection(){let e=this.selectionOptions,t=e&&iS(e)&&ri(this.column),i=this.column.getColDef().headerCheckboxSelection;return(!!t||("function"==typeof i?i(this.gos.addGridCommonParams({column:this.column,colDef:this.column.getColDef()})):!!i))&&this.checkRightRowModelType(t?"headerCheckbox":"headerCheckboxSelection")&&this.checkSelectionType(t?"headerCheckbox":"headerCheckboxSelection")}isFilteredOnly(){let e=this.selectionOptions;return void 0!==e?"multiRow"===e.mode&&"filtered"===e.selectAll:!!this.column.getColDef().headerCheckboxSelectionFilteredOnly}isCurrentPageOnly(){let e=this.selectionOptions;return void 0!==e?"multiRow"===e.mode&&"currentPage"===e.selectAll:!!this.column.getColDef().headerCheckboxSelectionCurrentPageOnly}},nA=class extends oJ{constructor(e,t,i){super(e,t,i),this.refreshFunctions={},this.userHeaderClasses=new Set,this.ariaDescriptionProperties=new Map,this.column=e}setComp(e,t,i,r,s){this.comp=e,s=rY(this,this.beans.context,s),this.setGui(t,s),this.updateState(),this.setupWidth(s),this.setupMovingCss(s),this.setupMenuClass(s),this.setupSortableClass(s),this.setupWrapTextClass(),this.refreshSpanHeaderHeight(),this.setupAutoHeight({wrapperElement:r,checkMeasuringCallback:e=>this.setRefreshFunction("measuring",e),compBean:s}),this.addColumnHoverListener(s),this.setupFilterClass(s),this.setupClassesFromColDef(),this.setupTooltip(s),this.addActiveHeaderMouseListeners(s),this.setupSelectAll(s),this.setupUserComp(s),this.refreshAria(),this.resizeFeature=s.createManagedBean(new nk(this.getPinned(),this.column,i,e,this)),s.createManagedBean(new o0([this.column],t)),s.createManagedBean(new o$(this.column,t,this.beans)),s.createManagedBean(new oa(t,{shouldStopEventPropagation:e=>this.shouldStopEventPropagation(e),onTabKeyDown:()=>null,handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addResizeAndMoveKeyboardListeners(s),s.addManagedPropertyListeners(["suppressMovableColumns","suppressMenuHide","suppressAggFuncInHeader"],()=>this.refresh(s)),s.addManagedListeners(this.column,{colDefChanged:()=>this.refresh(s)}),s.addManagedListeners(this.column,{headerHighlightChanged:this.onHeaderHighlightChanged.bind(this)});let a=()=>this.checkDisplayName(s);s.addManagedEventListeners({columnValueChanged:a,columnRowGroupChanged:a,columnPivotChanged:a,headerHeightChanged:this.onHeaderHeightChanged.bind(this)}),s.addDestroyFunc(()=>{this.refreshFunctions={},this.selectAllFeature=null,this.dragSourceElement=void 0,this.userCompDetails=null,this.userHeaderClasses.clear(),this.ariaDescriptionProperties.clear(),this.clearComponent()})}resizeHeader(e,t){if(!this.column.isResizable())return;let i=Math.min(Math.max(this.column.getActualWidth()+e,this.column.getMinWidth()),this.column.getMaxWidth());this.beans.columnSizeService.setColumnWidths([{key:this.column,newWidth:i}],t,!0,"uiColumnResized")}moveHeader(e){let{eGui:t,beans:i,column:r,ctrlsService:s}=this,{gos:a,columnModel:o,columnMoveService:n,visibleColsService:l}=i,h=this.getPinned(),d=t.getBoundingClientRect().left,c=r.getActualWidth(),u=nM({x:0===e!==a.get("enableRtl")?d-20:d+c+20,pinned:h,fromKeyboard:!0,gos:a,ctrlsService:s}),p=this.focusService.getFocusedHeader();nx({allMovingColumns:[r],isFromHeader:!0,fromLeft:1===e,xPosition:u,pinned:h,fromEnter:!1,fakeEvent:!1,gos:a,columnModel:o,columnMoveService:n,visibleColsService:l,finished:!0}),s.getGridBodyCtrl().getScrollFeature().ensureColumnVisible(r,"auto"),(!this.isAlive()||this.beans.gos.get("ensureDomOrder"))&&p&&this.restoreFocus(p)}restoreFocus(e){this.focusService.focusHeaderPosition({headerPosition:{...e,column:this.column}})}setupUserComp(e){let t=this.lookupUserCompDetails(e);this.setCompDetails(t)}setCompDetails(e){this.userCompDetails=e,this.comp.setUserCompDetails(e)}lookupUserCompDetails(e){let t=this.createParams(e),i=this.column.getColDef();return this.userComponentFactory.getHeaderCompDetails(i,t)}createParams(e){return this.gos.addGridCommonParams({column:this.column,displayName:this.displayName,enableSorting:this.column.isSortable(),enableMenu:this.menuEnabled,enableFilterButton:this.openFilterEnabled&&this.menuService.isHeaderFilterButtonEnabled(this.column),enableFilterIcon:!this.openFilterEnabled||this.menuService.isLegacyMenuEnabled(),showColumnMenu:e=>{this.menuService.showColumnMenu({column:this.column,buttonElement:e,positionBy:"button"})},showColumnMenuAfterMouseClick:e=>{this.menuService.showColumnMenu({column:this.column,mouseEvent:e,positionBy:"mouse"})},showFilter:e=>{this.menuService.showFilterMenu({column:this.column,buttonElement:e,containerType:"columnFilter",positionBy:"button"})},progressSort:e=>{this.beans.sortController.progressSort(this.column,!!e,"uiColumnSorted")},setSort:(e,t)=>{this.beans.sortController.setSortForColumn(this.column,e,!!t,"uiColumnSorted")},eGridHeader:this.getGui(),setTooltip:(t,i)=>{this.setupTooltip(e,t,i)}})}setupSelectAll(e){this.selectAllFeature=e.createManagedBean(new nT(this.column)),this.selectAllFeature.setComp(this)}getSelectAllGui(){return this.selectAllFeature.getCheckboxGui()}handleKeyDown(e){super.handleKeyDown(e),e.key===aa.SPACE&&this.selectAllFeature.onSpaceKeyDown(e),e.key===aa.ENTER&&this.onEnterKeyDown(e),e.key===aa.DOWN&&e.altKey&&this.showMenuOnKeyPress(e,!1)}onEnterKeyDown(e){if(e.ctrlKey||e.metaKey)this.showMenuOnKeyPress(e,!0);else if(this.sortable){let t=e.shiftKey;this.beans.sortController.progressSort(this.column,t,"uiColumnSorted")}}showMenuOnKeyPress(e,t){let i=this.comp.getUserCompInstance();i&&i instanceof at&&i.onMenuKeyboardShortcut(t)&&e.preventDefault()}onFocusIn(e){if(!this.getGui().contains(e.relatedTarget)){let e=this.getRowIndex();this.focusService.setFocusedHeader(e,this.column),this.announceAriaDescription()}this.focusService.isKeyboardMode()&&this.setActiveHeader(!0)}onFocusOut(e){this.getGui().contains(e.relatedTarget)||this.setActiveHeader(!1)}setupTooltip(e,t,i){this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature));let r="whenTruncated"===this.gos.get("tooltipShowMode"),s=this.eGui,a=this.column.getColDef();i||!r||a.headerComponent||(i=()=>{let e=s.querySelector(".ag-header-cell-text");return!e||e.scrollWidth>e.clientWidth});let o={getColumn:()=>this.column,getColDef:()=>this.column.getColDef(),getGui:()=>s,getLocation:()=>"header",getTooltipValue:()=>null!=t?t:this.column.getColDef().headerTooltip,shouldDisplayTooltip:i},n=e.createManagedBean(new sq(o));this.setRefreshFunction("tooltip",()=>n.refreshToolTip())}setupClassesFromColDef(){let e=()=>{let e=oY(this.column.getColDef(),this.gos,this.column,null),t=this.userHeaderClasses;this.userHeaderClasses=new Set(e),e.forEach(e=>{t.has(e)?t.delete(e):this.comp.addOrRemoveCssClass(e,!0)}),t.forEach(e=>this.comp.addOrRemoveCssClass(e,!1))};this.setRefreshFunction("headerClasses",e),e()}setDragSource(e){if(this.dragSourceElement=e,this.removeDragSource(),!e||!this.draggable)return;let{column:t,beans:i,displayName:r,dragAndDropService:s,gos:a}=this,{columnModel:o}=i,n=!this.gos.get("suppressDragLeaveHidesColumns"),l=this.dragSource={type:1,eElement:e,getDefaultIconName:()=>n?"hide":"notAllowed",getDragItem:()=>this.createDragItem(t),dragItemName:r,onDragStarted:()=>{n=!a.get("suppressDragLeaveHidesColumns"),nE([t],!0)},onDragStopped:()=>nE([t],!1),onDragCancelled:()=>nE([t],!1),onGridEnter:e=>{if(n){let t=e?.columns?.filter(e=>!e.getColDef().lockVisible)||[];o.setColsVisible(t,!0,"uiColumnMoved")}},onGridExit:e=>{if(n){let t=e?.columns?.filter(e=>!e.getColDef().lockVisible)||[];o.setColsVisible(t,!1,"uiColumnMoved")}}};s.addDragSource(l,!0)}createDragItem(e){let t={};return t[e.getId()]=e.isVisible(),{columns:[e],visibleState:t}}updateState(){this.menuEnabled=this.menuService.isColumnMenuInHeaderEnabled(this.column),this.openFilterEnabled=this.menuService.isFilterMenuInHeaderEnabled(this.column),this.sortable=this.column.isSortable(),this.displayName=this.calculateDisplayName(),this.draggable=this.workOutDraggable()}setRefreshFunction(e,t){this.refreshFunctions[e]=t}refresh(e){this.updateState(),this.refreshHeaderComp(e),this.refreshAria(),Object.values(this.refreshFunctions).forEach(e=>e())}refreshHeaderComp(e){let t=this.lookupUserCompDetails(e);null!=this.comp.getUserCompInstance()&&this.userCompDetails.componentClass==t.componentClass&&this.attemptHeaderCompRefresh(t.params)?this.setDragSource(this.dragSourceElement):this.setCompDetails(t)}attemptHeaderCompRefresh(e){let t=this.comp.getUserCompInstance();return!!t&&!!t.refresh&&t.refresh(e)}calculateDisplayName(){return this.beans.columnNameService.getDisplayNameForColumn(this.column,"header",!0)}checkDisplayName(e){this.displayName!==this.calculateDisplayName()&&this.refresh(e)}workOutDraggable(){let e=this.column.getColDef();return!!(!this.gos.get("suppressMovableColumns")&&!e.suppressMovable&&!e.lockPosition)||!!e.enableRowGroup||!!e.enablePivot}setupWidth(e){let t=()=>{let e=this.column.getActualWidth();this.comp.setWidth(`${e}px`)};e.addManagedListeners(this.column,{widthChanged:t}),t()}setupMovingCss(e){let t=()=>{this.comp.addOrRemoveCssClass("ag-header-cell-moving",this.column.isMoving())};e.addManagedListeners(this.column,{movingChanged:t}),t()}setupMenuClass(e){let t=()=>{this.comp.addOrRemoveCssClass("ag-column-menu-visible",this.column.isMenuVisible())};e.addManagedListeners(this.column,{menuVisibleChanged:t}),t()}setupSortableClass(e){let t=()=>{this.comp.addOrRemoveCssClass("ag-header-cell-sortable",!!this.sortable)};t(),this.setRefreshFunction("updateSortable",t),e.addManagedEventListeners({sortChanged:this.refreshAriaSort.bind(this)})}setupFilterClass(e){let t=()=>{let e=this.column.isFilterActive();this.comp.addOrRemoveCssClass("ag-header-cell-filtered",e),this.refreshAria()};e.addManagedListeners(this.column,{filterActiveChanged:t}),t()}setupWrapTextClass(){let e=()=>{let e=!!this.column.getColDef().wrapHeaderText;this.comp.addOrRemoveCssClass("ag-header-cell-wrap-text",e)};e(),this.setRefreshFunction("wrapText",e)}onHeaderHighlightChanged(){let e=this.column.getHighlighted();this.comp.addOrRemoveCssClass("ag-header-highlight-before",0===e),this.comp.addOrRemoveCssClass("ag-header-highlight-after",1===e)}onDisplayedColumnsChanged(){super.onDisplayedColumnsChanged(),this.isAlive()&&this.onHeaderHeightChanged()}onHeaderHeightChanged(){this.refreshSpanHeaderHeight()}refreshSpanHeaderHeight(){let{eGui:e,column:t,comp:i,beans:r}=this;if(!t.isSpanHeaderHeight()){e.style.removeProperty("top"),e.style.removeProperty("height"),i.addOrRemoveCssClass("ag-header-span-height",!1),i.addOrRemoveCssClass("ag-header-span-total",!1);return}let{numberOfParents:s,isSpanningTotal:a}=this.column.getColumnGroupPaddingInfo();i.addOrRemoveCssClass("ag-header-span-height",s>0);let{columnModel:o}=r,n=o.getColumnHeaderRowHeight();if(0===s){i.addOrRemoveCssClass("ag-header-span-total",!1),e.style.setProperty("top","0px"),e.style.setProperty("height",`${n}px`);return}i.addOrRemoveCssClass("ag-header-span-total",a);let l=this.beans.columnModel.getGroupRowsHeight(),h=0;for(let e=0;e<s;e++)h+=l[l.length-1-e];e.style.setProperty("top",`${-h}px`),e.style.setProperty("height",`${n+h}px`)}refreshAriaSort(){if(this.sortable){let e=this.localeService.getLocaleTextFunc(),t=this.beans.sortController.getDisplaySortForColumn(this.column)||null;this.comp.setAriaSort("asc"===t?"ascending":"desc"===t?"descending":"mixed"===t?"other":"none"),this.setAriaDescriptionProperty("sort",e("ariaSortableColumn","Press ENTER to sort"))}else this.comp.setAriaSort(),this.setAriaDescriptionProperty("sort",null)}refreshAriaMenu(){if(this.menuEnabled){let e=this.localeService.getLocaleTextFunc();this.setAriaDescriptionProperty("menu",e("ariaMenuColumn","Press ALT DOWN to open column menu"))}else this.setAriaDescriptionProperty("menu",null)}refreshAriaFilterButton(){if(this.openFilterEnabled&&!this.menuService.isLegacyMenuEnabled()){let e=this.localeService.getLocaleTextFunc();this.setAriaDescriptionProperty("filterButton",e("ariaFilterColumn","Press CTRL ENTER to open filter"))}else this.setAriaDescriptionProperty("filterButton",null)}refreshAriaFiltered(){let e=this.localeService.getLocaleTextFunc();this.column.isFilterActive()?this.setAriaDescriptionProperty("filter",e("ariaColumnFiltered","Column Filtered")):this.setAriaDescriptionProperty("filter",null)}setAriaDescriptionProperty(e,t){null!=t?this.ariaDescriptionProperties.set(e,t):this.ariaDescriptionProperties.delete(e)}announceAriaDescription(){if(!this.eGui.contains(ih(this.beans.gos)))return;let e=Array.from(this.ariaDescriptionProperties.keys()).sort((e,t)=>"filter"===e?-1:t.charCodeAt(0)-e.charCodeAt(0)).map(e=>this.ariaDescriptionProperties.get(e)).join(". ");this.beans.ariaAnnouncementService.announceValue(e,"columnHeader")}refreshAria(){this.refreshAriaSort(),this.refreshAriaMenu(),this.refreshAriaFilterButton(),this.refreshAriaFiltered()}addColumnHoverListener(e){let t=()=>{if(!this.gos.get("columnHoverHighlight"))return;let e=this.beans.columnHoverService.isHovered(this.column);this.comp.addOrRemoveCssClass("ag-column-hover",e)};e.addManagedEventListeners({columnHoverChanged:t}),t()}getColId(){return this.column.getColId()}addActiveHeaderMouseListeners(e){let t=e=>this.handleMouseOverChange("mouseenter"===e.type);e.addManagedListeners(this.getGui(),{mouseenter:t,mouseleave:t,click:()=>this.dispatchColumnMouseEvent("columnHeaderClicked",this.column),contextmenu:e=>this.handleContextMenuMouseEvent(e,void 0,this.column)})}handleMouseOverChange(e){this.setActiveHeader(e),this.eventService.dispatchEvent({type:e?"columnHeaderMouseOver":"columnHeaderMouseLeave",column:this.column})}setActiveHeader(e){this.comp.addOrRemoveCssClass("ag-header-active",e)}getAnchorElementForMenu(e){let t=this.comp.getUserCompInstance();return t instanceof at?t.getAnchorElementForMenu(e):this.getGui()}destroy(){super.destroy()}},nR=class extends i2{wireBeans(e){this.horizontalResizeService=e.horizontalResizeService,this.autoWidthCalculator=e.autoWidthCalculator,this.visibleColsService=e.visibleColsService,this.columnSizeService=e.columnSizeService,this.columnAutosizeService=e.columnAutosizeService}constructor(e,t,i,r){super(),this.eResize=t,this.comp=e,this.pinned=i,this.columnGroup=r}postConstruct(){if(!this.columnGroup.isResizable()){this.comp.setResizableDisplayed(!1);return}let e=this.horizontalResizeService.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});if(this.addDestroyFunc(e),!this.gos.get("suppressAutoSize")){let e=this.gos.get("skipHeaderOnAutoSize");this.eResize.addEventListener("dblclick",()=>{let t=[];this.columnGroup.getDisplayedLeafColumns().forEach(e=>{e.getColDef().suppressAutoSize||t.push(e.getColId())}),t.length>0&&this.columnAutosizeService.autoSizeCols({colKeys:t,skipHeader:e,stopAtGroup:this.columnGroup,source:"uiColumnResized"}),this.resizeLeafColumnsToFit("uiColumnResized")})}}onResizeStart(e){let t=this.getInitialValues(e);this.storeLocalValues(t),this.toggleColumnResizing(!0)}onResizing(e,t,i="uiColumnResized"){let r=this.normaliseDragChange(t),s=this.resizeStartWidth+r;this.resizeColumnsFromLocalValues(s,i,e)}getInitialValues(e){let t=this.getColumnsToResize(),i=this.getInitialSizeOfColumns(t),r=this.getSizeRatiosOfColumns(t,i),s={columnsToResize:t,resizeStartWidth:i,resizeRatios:r},a=null;if(e&&(a=this.visibleColsService.getGroupAtDirection(this.columnGroup,"After")),a){let e=a.getDisplayedLeafColumns(),t=s.groupAfterColumns=e.filter(e=>e.isResizable()),i=s.groupAfterStartWidth=this.getInitialSizeOfColumns(t);s.groupAfterRatios=this.getSizeRatiosOfColumns(t,i)}else s.groupAfterColumns=void 0,s.groupAfterStartWidth=void 0,s.groupAfterRatios=void 0;return s}storeLocalValues(e){let{columnsToResize:t,resizeStartWidth:i,resizeRatios:r,groupAfterColumns:s,groupAfterStartWidth:a,groupAfterRatios:o}=e;this.resizeCols=t,this.resizeStartWidth=i,this.resizeRatios=r,this.resizeTakeFromCols=s,this.resizeTakeFromStartWidth=a,this.resizeTakeFromRatios=o}clearLocalValues(){this.resizeCols=void 0,this.resizeRatios=void 0,this.resizeTakeFromCols=void 0,this.resizeTakeFromRatios=void 0}resizeLeafColumnsToFit(e){let t=this.autoWidthCalculator.getPreferredWidthForColumnGroup(this.columnGroup),i=this.getInitialValues();t>i.resizeStartWidth&&this.resizeColumns(i,t,e,!0)}resizeColumnsFromLocalValues(e,t,i=!0){if(!this.resizeCols||!this.resizeRatios)return;let r={columnsToResize:this.resizeCols,resizeStartWidth:this.resizeStartWidth,resizeRatios:this.resizeRatios,groupAfterColumns:this.resizeTakeFromCols??void 0,groupAfterStartWidth:this.resizeTakeFromStartWidth??void 0,groupAfterRatios:this.resizeTakeFromRatios??void 0};this.resizeColumns(r,e,t,i)}resizeColumns(e,t,i,r=!0){let{columnsToResize:s,resizeStartWidth:a,resizeRatios:o,groupAfterColumns:n,groupAfterStartWidth:l,groupAfterRatios:h}=e,d=[];if(d.push({columns:s,ratios:o,width:t}),n){let e=t-a;d.push({columns:n,ratios:h,width:l-e})}this.columnSizeService.resizeColumnSets({resizeSets:d,finished:r,source:i}),r&&this.toggleColumnResizing(!1)}toggleColumnResizing(e){this.comp.addOrRemoveCssClass("ag-column-resizing",e)}getColumnsToResize(){return this.columnGroup.getDisplayedLeafColumns().filter(e=>e.isResizable())}getInitialSizeOfColumns(e){return e.reduce((e,t)=>e+t.getActualWidth(),0)}getSizeRatiosOfColumns(e,t){return e.map(e=>e.getActualWidth()/t)}normaliseDragChange(e){let t=e;return this.gos.get("enableRtl")?"left"!==this.pinned&&(t*=-1):"right"===this.pinned&&(t*=-1),t}destroy(){super.destroy(),this.clearLocalValues()}},nL=class extends i2{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();let e=this.onWidthChanged.bind(this);this.columnGroup.getLeafColumns().forEach(t=>{t.addEventListener("widthChanged",e),t.addEventListener("visibleChanged",e),this.removeChildListenersFuncs.push(()=>{t.removeEventListener("widthChanged",e),t.removeEventListener("visibleChanged",e)})})}removeListenersOnChildrenColumns(){this.removeChildListenersFuncs.forEach(e=>e()),this.removeChildListenersFuncs=[]}onDisplayedChildrenChanged(){this.addListenersToChildrenColumns(),this.onWidthChanged()}onWidthChanged(){let e=this.columnGroup.getActualWidth();this.comp.setWidth(`${e}px`),this.comp.addOrRemoveCssClass("ag-hidden",0===e)}},nP=class extends oJ{constructor(e,t,i){super(e,t,i),this.onSuppressColMoveChange=()=>{if(!this.isAlive()||this.isSuppressMoving())this.removeDragSource();else if(!this.dragSource){let e=this.getGui();this.setDragSource(e)}},this.column=e}setComp(e,t,i,r,s){this.comp=e,s=rY(this,this.beans.context,s),this.setGui(t,s),this.displayName=this.beans.columnNameService.getDisplayNameForColumnGroup(this.column,"header"),this.addClasses(),this.setupMovingCss(s),this.setupExpandable(s),this.setupTooltip(s),this.setupAutoHeight({wrapperElement:r,compBean:s}),this.setupUserComp(s),this.addHeaderMouseListeners(s);let a=this.getParentRowCtrl().getPinned(),o=this.column.getProvidedColumnGroup().getLeafColumns();s.createManagedBean(new o0(o,t)),s.createManagedBean(new o$(this.column,t,this.beans)),s.createManagedBean(new nL(e,this.column)),this.resizeFeature=s.createManagedBean(new nR(e,i,a,this.column)),s.createManagedBean(new oa(t,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:()=>void 0,handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)})),this.addHighlightListeners(s,o),s.addManagedPropertyListener("suppressMovableColumns",this.onSuppressColMoveChange),this.addResizeAndMoveKeyboardListeners(s),s.addDestroyFunc(()=>this.clearComponent())}addHighlightListeners(e,t){if(this.beans.gos.get("suppressMoveWhenColumnDragging"))for(let i of t)e.addManagedListeners(i,{headerHighlightChanged:this.onLeafColumnHighlightChanged.bind(this,i)})}onLeafColumnHighlightChanged(e){let t=this.column.getDisplayedLeafColumns(),i=t[0]===e,r=iB(t)===e;if(!i&&!r)return;let s=e.getHighlighted(),a=!!this.getParentRowCtrl().findHeaderCellCtrl(e=>e.getColumnGroupChild().isMoving()),o=!1,n=!1;if(a){let e=this.beans.gos.get("enableRtl"),t=1===s,a=0===s;i&&(e?n=t:o=a),r&&(e?o=a:n=t)}this.comp.addOrRemoveCssClass("ag-header-highlight-before",o),this.comp.addOrRemoveCssClass("ag-header-highlight-after",n)}getColumn(){return this.column}resizeHeader(e,t){if(!this.resizeFeature)return;let i=this.resizeFeature.getInitialValues(t);this.resizeFeature.resizeColumns(i,i.resizeStartWidth+e,"uiColumnResized",!0)}moveHeader(e){let{beans:t,eGui:i,column:r,ctrlsService:s}=this,{gos:a,columnModel:o,columnMoveService:n,visibleColsService:l}=t,h=a.get("enableRtl"),d=0===e,c=this.getPinned(),u=i.getBoundingClientRect(),p=u.left,g=u.width,m=nM({x:d!==h?p-20:p+g+20,pinned:c,fromKeyboard:!0,gos:a,ctrlsService:s}),f=r.getGroupId(),v=this.focusService.getFocusedHeader();nx({allMovingColumns:this.column.getLeafColumns(),isFromHeader:!0,fromLeft:1===e,xPosition:m,pinned:c,fromEnter:!1,fakeEvent:!1,gos:a,columnModel:o,columnMoveService:n,visibleColsService:l,finished:!0});let y=r.getDisplayedLeafColumns(),C=d?y[0]:iB(y);this.ctrlsService.getGridBodyCtrl().getScrollFeature().ensureColumnVisible(C,"auto"),(!this.isAlive()||this.beans.gos.get("ensureDomOrder"))&&v&&this.restoreFocus(f,r,v)}restoreFocus(e,t,i){let r=t.getLeafColumns();if(!r.length)return;let s=r[0].getParent();if(!s)return;let a=this.findGroupWidthId(s,e);a&&this.focusService.focusHeaderPosition({headerPosition:{...i,column:a}})}findGroupWidthId(e,t){for(;e;){if(e.getGroupId()===t)return e;e=e.getParent()}return null}resizeLeafColumnsToFit(e){this.resizeFeature&&this.resizeFeature.resizeLeafColumnsToFit(e)}setupUserComp(e){let t=this.gos.addGridCommonParams({displayName:this.displayName,columnGroup:this.column,setExpanded:e=>{this.beans.columnModel.setColumnGroupOpened(this.column.getProvidedColumnGroup(),e,"gridInitializing")},setTooltip:(t,i)=>{this.setupTooltip(e,t,i)}}),i=this.userComponentFactory.getHeaderGroupCompDetails(t);this.comp.setUserCompDetails(i)}addHeaderMouseListeners(e){let t=e=>this.handleMouseOverChange("mouseenter"===e.type);e.addManagedListeners(this.getGui(),{mouseenter:t,mouseleave:t,click:()=>this.dispatchColumnMouseEvent("columnHeaderClicked",this.column.getProvidedColumnGroup()),contextmenu:e=>this.handleContextMenuMouseEvent(e,void 0,this.column.getProvidedColumnGroup())})}handleMouseOverChange(e){this.eventService.dispatchEvent({type:e?"columnHeaderMouseOver":"columnHeaderMouseLeave",column:this.column.getProvidedColumnGroup()})}setupTooltip(e,t,i){this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature));let r=this.column.getColGroupDef(),s="whenTruncated"===this.gos.get("tooltipShowMode"),a=this.eGui;i||!s||r?.headerGroupComponent||(i=()=>{let e=a.querySelector(".ag-header-group-text");return!e||e.scrollWidth>e.clientWidth});let o={getColumn:()=>this.column,getGui:()=>a,getLocation:()=>"headerGroup",getTooltipValue:()=>t??(r&&r.headerTooltip),shouldDisplayTooltip:i};r&&(o.getColDef=()=>r),e.createManagedBean(new sq(o))}setupExpandable(e){let t=this.column.getProvidedColumnGroup();this.refreshExpanded();let i=this.refreshExpanded.bind(this);e.addManagedListeners(t,{expandedChanged:i,expandableChanged:i})}refreshExpanded(){let{column:e}=this;this.expandable=e.isExpandable();let t=e.isExpanded();this.expandable?this.comp.setAriaExpanded(t?"true":"false"):this.comp.setAriaExpanded(void 0)}getColId(){return this.column.getUniqueId()}addClasses(){let e=this.column.getColGroupDef(),t=oY(e,this.gos,null,this.column);this.column.isPadding()?(t.push("ag-header-group-cell-no-group"),this.column.getLeafColumns().every(e=>e.isSpanHeaderHeight())&&t.push("ag-header-span-height")):(t.push("ag-header-group-cell-with-group"),e?.wrapHeaderText&&t.push("ag-header-cell-wrap-text")),t.forEach(e=>this.comp.addOrRemoveCssClass(e,!0))}setupMovingCss(e){let t=this.column.getProvidedColumnGroup().getLeafColumns(),i=()=>this.comp.addOrRemoveCssClass("ag-header-cell-moving",this.column.isMoving());t.forEach(t=>{e.addManagedListeners(t,{movingChanged:i})}),i()}onFocusIn(e){if(!this.eGui.contains(e.relatedTarget)){let e=this.getRowIndex();this.beans.focusService.setFocusedHeader(e,this.column)}}handleKeyDown(e){super.handleKeyDown(e);let t=this.getWrapperHasFocus();if(this.expandable&&t&&e.key===aa.ENTER){let e=this.column,t=!e.isExpanded();this.beans.columnModel.setColumnGroupOpened(e.getProvidedColumnGroup(),t,"uiColumnExpanded")}}setDragSource(e){if(!this.isAlive()||this.isSuppressMoving()||(this.removeDragSource(),!e))return;let{beans:t,column:i,displayName:r,gos:s,dragAndDropService:a}=this,{columnModel:o}=t,n=i.getProvidedColumnGroup().getLeafColumns(),l=!s.get("suppressDragLeaveHidesColumns"),h=this.dragSource={type:1,eElement:e,getDefaultIconName:()=>l?"hide":"notAllowed",dragItemName:r,getDragItem:()=>this.getDragItemForGroup(i),onDragStarted:()=>{l=!s.get("suppressDragLeaveHidesColumns"),nE(n,!0)},onDragStopped:()=>nE(n,!1),onDragCancelled:()=>nE(n,!1),onGridEnter:e=>{if(l){let{columns:t=[],visibleState:i}=e??{},r=t.filter(e=>!e.getColDef().lockVisible&&(!i||i[e.getColId()]));o.setColsVisible(r,!0,"uiColumnMoved")}},onGridExit:e=>{if(l){let t=e?.columns?.filter(e=>!e.getColDef().lockVisible)||[];o.setColsVisible(t,!1,"uiColumnMoved")}}};a.addDragSource(h,!0)}getDragItemForGroup(e){let t=e.getProvidedColumnGroup().getLeafColumns(),i={};t.forEach(e=>i[e.getId()]=e.isVisible());let r=[];this.beans.visibleColsService.getAllCols().forEach(e=>{t.indexOf(e)>=0&&(r.push(e),i_(t,e))}),t.forEach(e=>r.push(e));let s=[],a=e.getLeafColumns();for(let e of r)-1!==a.indexOf(e)&&s.push(e);return{columns:r,columnsInSplit:s,visibleState:i}}isSuppressMoving(){let e=!1;return this.column.getLeafColumns().forEach(t=>{(t.getColDef().suppressMovable||t.getColDef().lockPosition)&&(e=!0)}),e||this.gos.get("suppressMovableColumns")}destroy(){super.destroy()}},nF=0,nN=class extends i2{constructor(e,t,i){super(),this.instanceId=nF++,this.rowIndex=e,this.pinned=t,this.type=i,this.headerRowClass=`ag-header-row ${"group"==i?"ag-header-row-column-group":"filter"==i?"ag-header-row-column-filter":"ag-header-row-column"}`}wireBeans(e){this.beans=e}postConstruct(){this.isPrintLayout=t5(this.gos,"print"),this.isEnsureDomOrder=this.gos.get("ensureDomOrder")}areCellsRendered(){return!!this.comp&&this.getHeaderCellCtrls().every(e=>null!=e.getGui())}setComp(e,t,i=!0){this.comp=e,t=rY(this,this.beans.context,t),i&&(this.onRowHeightChanged(),this.onVirtualColumnsChanged()),this.setWidth(),this.addEventListeners(t)}getHeaderRowClass(){return this.headerRowClass}getAriaRowIndex(){return this.rowIndex+1}addEventListeners(e){let t=this.onRowHeightChanged.bind(this);e.addManagedEventListeners({columnResized:this.onColumnResized.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),virtualColumnsChanged:e=>this.onVirtualColumnsChanged(e.afterScroll),columnGroupHeaderHeightChanged:t,columnHeaderHeightChanged:t,gridStylesChanged:t,advancedFilterEnabledChanged:t}),e.addManagedPropertyListener("domLayout",this.onDisplayedColumnsChanged.bind(this)),e.addManagedPropertyListener("ensureDomOrder",e=>this.isEnsureDomOrder=e.currentValue),e.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],t)}getHeaderCellCtrl(e){if(this.headerCellCtrls)return t2(this.headerCellCtrls).find(t=>t.getColumnGroupChild()===e)}onDisplayedColumnsChanged(){this.isPrintLayout=t5(this.gos,"print"),this.onVirtualColumnsChanged(),this.setWidth(),this.onRowHeightChanged()}getType(){return this.type}onColumnResized(){this.setWidth()}setWidth(){let e=this.getWidthForRow();this.comp.setWidth(`${e}px`)}getWidthForRow(){let{visibleColsService:e}=this.beans;return this.isPrintLayout?null!=this.pinned?0:e.getContainerWidth("right")+e.getContainerWidth("left")+e.getContainerWidth(null):e.getContainerWidth(this.pinned)}onRowHeightChanged(){let{topOffset:e,rowHeight:t}=this.getTopAndHeight();this.comp.setTop(e+"px"),this.comp.setHeight(t+"px")}getTopAndHeight(){let{columnModel:e,filterManager:t}=this.beans,i=[],r=e.getGroupRowsHeight(),s=e.getColumnHeaderRowHeight();i.push(...r),i.push(s),t?.hasFloatingFilters()&&i.push(e.getFloatingFiltersHeight());let a=0;for(let e=0;e<this.rowIndex;e++)a+=i[e];return{topOffset:a,rowHeight:i[this.rowIndex]}}getPinned(){return this.pinned}getRowIndex(){return this.rowIndex}onVirtualColumnsChanged(e=!1){let t=this.getHeaderCtrls(),i=this.isEnsureDomOrder||this.isPrintLayout;this.comp.setHeaderCtrls(t,i,e)}getHeaderCtrls(){let e=this.headerCellCtrls;for(let t of(this.headerCellCtrls=new Map,this.getColumnsInViewport()))this.recycleAndCreateHeaderCtrls(t,e);let t=e=>{let{focusService:t,visibleColsService:i}=this.beans;return!!t.isHeaderWrapperFocused(e)&&i.isVisible(e.getColumnGroupChild())};if(e)for(let[i,r]of e)t(r)?this.headerCellCtrls.set(i,r):this.destroyBean(r);return this.getHeaderCellCtrls()}getHeaderCellCtrls(){return Array.from(this.headerCellCtrls?.values()??[])}recycleAndCreateHeaderCtrls(e,t){let i;if(!this.headerCellCtrls||e.isEmptyGroup())return;let r=e.getUniqueId();if(t&&(i=t.get(r),t.delete(r)),i&&i.getColumnGroupChild()!=e&&(this.destroyBean(i),i=void 0),null==i)switch(this.type){case"filter":i=this.createBean(this.beans.ctrlsFactory.getInstance("headerFilterCell",e,this.beans,this));break;case"group":i=this.createBean(new nP(e,this.beans,this));break;default:i=this.createBean(new nA(e,this.beans,this))}this.headerCellCtrls.set(r,i)}getColumnsInViewport(){return this.isPrintLayout?this.getColumnsInViewportPrintLayout():this.getColumnsInViewportNormalLayout()}getColumnsInViewportPrintLayout(){if(null!=this.pinned)return[];let e=[],t=this.getActualDepth(),{columnViewportService:i}=this.beans;return["left",null,"right"].forEach(r=>{let s=i.getHeadersToRender(r,t);e=e.concat(s)}),e}getActualDepth(){return"filter"==this.type?this.rowIndex-1:this.rowIndex}getColumnsInViewportNormalLayout(){return this.beans.columnViewportService.getHeadersToRender(this.pinned,this.getActualDepth())}findHeaderCellCtrl(e){if(!this.headerCellCtrls)return;let t=this.getHeaderCellCtrls();return"function"==typeof e?t.find(e):t.find(t=>t.getColumnGroupChild()==e)}focusHeader(e,t){let i=this.findHeaderCellCtrl(e);return!!i&&i.focus(t)}destroy(){this.headerCellCtrls?.forEach(e=>{this.destroyBean(e)}),this.headerCellCtrls=void 0,super.destroy()}},nO=class extends i2{constructor(e){super(),this.hidden=!1,this.includeFloatingFilter=!1,this.groupsRowCtrls=[],this.pinned=e}wireBeans(e){this.ctrlsService=e.ctrlsService,this.scrollVisibleService=e.scrollVisibleService,this.pinnedWidthService=e.pinnedWidthService,this.columnModel=e.columnModel,this.focusService=e.focusService,this.filterManager=e.filterManager}setComp(e,t){this.comp=e,this.eViewport=t,this.setupCenterWidth(),this.setupPinnedWidth(),this.setupDragAndDrop(this.eViewport);let i=this.onDisplayedColumnsChanged.bind(this);this.addManagedEventListeners({gridColumnsChanged:this.onGridColumnsChanged.bind(this),displayedColumnsChanged:i,advancedFilterEnabledChanged:i});let r=`${"string"==typeof this.pinned?this.pinned:"center"}Header`;this.ctrlsService.register(r,this),this.columnModel.isReady()&&this.refresh()}getAllCtrls(){let e=[...this.groupsRowCtrls];return this.columnsRowCtrl&&e.push(this.columnsRowCtrl),this.filtersRowCtrl&&e.push(this.filtersRowCtrl),e}refresh(e=!1){let t=new sK,i=this.focusService.getFocusHeaderToUseAfterRefresh();(()=>{let e=this.columnModel.getHeaderRowCount()-1;this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls);for(let i=0;i<e;i++){let e=this.createBean(new nN(t.next(),this.pinned,"group"));this.groupsRowCtrls.push(e)}})(),(()=>{let i=t.next(),r=!this.hidden&&(null==this.columnsRowCtrl||!e||this.columnsRowCtrl.getRowIndex()!==i);(r||this.hidden)&&(this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl)),r&&(this.columnsRowCtrl=this.createBean(new nN(i,this.pinned,"column")))})(),(()=>{this.includeFloatingFilter=!!this.filterManager?.hasFloatingFilters()&&!this.hidden;let i=()=>{this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl)};if(!this.includeFloatingFilter){i();return}let r=t.next();if(this.filtersRowCtrl){let t=this.filtersRowCtrl.getRowIndex()!==r;(!e||t)&&i()}this.filtersRowCtrl||(this.filtersRowCtrl=this.createBean(new nN(r,this.pinned,"filter")))})();let r=this.getAllCtrls();this.comp.setCtrls(r),this.restoreFocusOnHeader(i)}getHeaderCtrlForColumn(e){if(rm(e))return this.columnsRowCtrl?.getHeaderCellCtrl(e);if(0!==this.groupsRowCtrls.length)for(let t=0;t<this.groupsRowCtrls.length;t++){let i=this.groupsRowCtrls[t].getHeaderCellCtrl(e);if(i)return i}}getHtmlElementForColumnHeader(e){let t=this.getHeaderCtrlForColumn(e);return t?t.getGui():null}getRowType(e){let t=this.getAllCtrls()[e];return t?t.getType():void 0}focusHeader(e,t,i){let r=this.getAllCtrls()[e];return!!r&&r.focusHeader(t,i)}getViewportElement(){return this.eViewport}getGroupRowCount(){return this.groupsRowCtrls.length}getGroupRowCtrlAtIndex(e){return this.groupsRowCtrls[e]}getRowCount(){return this.groupsRowCtrls.length+(this.columnsRowCtrl?1:0)+(this.filtersRowCtrl?1:0)}setHorizontalScroll(e){this.comp.setViewportScrollLeft(e)}onScrollCallback(e){this.addManagedElementListeners(this.getViewportElement(),{scroll:e})}destroy(){this.filtersRowCtrl&&(this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl)),this.columnsRowCtrl&&(this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl)),this.groupsRowCtrls&&this.groupsRowCtrls.length&&(this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls)),super.destroy()}setupDragAndDrop(e){let t=new nI(this.pinned,e);this.createManagedBean(t)}restoreFocusOnHeader(e){if(!e)return;let{column:t}=e;t.getPinned()==this.pinned&&this.focusService.focusHeaderPosition({headerPosition:e})}onGridColumnsChanged(){this.refresh(!0)}onDisplayedColumnsChanged(){let e=this.filterManager?.hasFloatingFilters()&&!this.hidden;this.includeFloatingFilter!==e&&this.refresh(!0)}setupCenterWidth(){null==this.pinned&&this.createManagedBean(new nw(e=>this.comp.setCenterWidth(`${e}px`),!0))}setupPinnedWidth(){if(null==this.pinned)return;let e="left"===this.pinned,t="right"===this.pinned;this.hidden=!0;let i=()=>{let i=e?this.pinnedWidthService.getPinnedLeftWidth():this.pinnedWidthService.getPinnedRightWidth();if(null==i)return;let r=0==i,s=this.hidden!==r,a=this.gos.get("enableRtl"),o=this.scrollVisibleService.getScrollbarWidth(),n=this.scrollVisibleService.isVerticalScrollShowing()&&(a&&e||!a&&t);this.comp.setPinnedContainerWidth(`${n?i+o:i}px`),this.comp.setDisplayed(!r),s&&(this.hidden=r,this.refresh())};this.addManagedEventListeners({leftPinnedWidthChanged:i,rightPinnedWidthChanged:i,scrollVisibilityChanged:i,scrollbarWidthChanged:i})}},nB=`<div class="ag-header-viewport" role="presentation">
        <div class="ag-header-container" data-ref="eCenterContainer" role="rowgroup"></div>
    </div>`,nG=class extends sQ{constructor(e){super(),this.eCenterContainer=null,this.headerRowComps={},this.rowCompsList=[],this.pinned=e}postConstruct(){this.selectAndSetTemplate(),this.createManagedBean(new nO(this.pinned)).setComp({setDisplayed:e=>this.setDisplayed(e),setCtrls:e=>this.setCtrls(e),setCenterWidth:e=>this.eCenterContainer.style.width=e,setViewportScrollLeft:e=>this.getGui().scrollLeft=e,setPinnedContainerWidth:e=>{let t=this.getGui();t.style.width=e,t.style.maxWidth=e,t.style.minWidth=e}},this.getGui())}selectAndSetTemplate(){let e="left"==this.pinned,t="right"==this.pinned;this.setTemplate(e?'<div class="ag-pinned-left-header" role="rowgroup"></div>':t?'<div class="ag-pinned-right-header" role="rowgroup"></div>':nB),this.eRowContainer=null!==this.eCenterContainer?this.eCenterContainer:this.getGui()}destroy(){this.setCtrls([]),super.destroy()}destroyRowComp(e){this.destroyBean(e),this.eRowContainer.removeChild(e.getGui())}setCtrls(e){let t;let i=this.headerRowComps;this.headerRowComps={},this.rowCompsList=[];let r=e=>{let i=e.getGui();i.parentElement!=this.eRowContainer&&this.eRowContainer.appendChild(i),t&&sB(this.eRowContainer,i,t),t=i};e.forEach(e=>{let t=e.instanceId,s=i[t];delete i[t];let a=s||this.createBean(new nf(e));this.headerRowComps[t]=a,this.rowCompsList.push(a),r(a)}),rh(i).forEach(e=>this.destroyRowComp(e))}},nz={selector:"AG-HEADER-ROOT",component:class extends sQ{constructor(){super('<div class="ag-header" role="presentation"/>')}postConstruct(){this.createManagedBean(new nC).setComp({addOrRemoveCssClass:(e,t)=>this.addOrRemoveCssClass(e,t),setHeightAndMinHeight:e=>{this.getGui().style.height=e,this.getGui().style.minHeight=e}},this.getGui(),this.getFocusableElement());let e=e=>{this.createManagedBean(e),this.appendChild(e)};e(new nG("left")),e(new nG(null)),e(new nG("right"))}}},n_=((p=n_||{}).AUTO_HEIGHT="ag-layout-auto-height",p.NORMAL="ag-layout-normal",p.PRINT="ag-layout-print",p),nV=class extends i2{constructor(e){super(),this.view=e}postConstruct(){this.addManagedPropertyListener("domLayout",this.updateLayoutClasses.bind(this)),this.updateLayoutClasses()}updateLayoutClasses(){let e=this.getDomLayout(),t={autoHeight:"autoHeight"===e,normal:"normal"===e,print:"print"===e},i=t.autoHeight?"ag-layout-auto-height":t.print?"ag-layout-print":"ag-layout-normal";this.view.updateLayoutClasses(i,t)}getDomLayout(){let e=this.gos.get("domLayout")??"normal";return -1===["normal","print","autoHeight"].indexOf(e)?(tO(`${e} is not valid for DOM Layout, valid values are 'normal', 'autoHeight', 'print'.`),"normal"):e}},nj={selector:"AG-OVERLAY-WRAPPER",component:class extends sQ{constructor(){super(`
            <div class="ag-overlay" role="presentation">
                <div class="ag-overlay-panel" role="presentation">
                    <div class="ag-overlay-wrapper" data-ref="eOverlayWrapper" role="presentation"></div>
                </div>
            </div>`),this.eOverlayWrapper=null,this.activePromise=null,this.activeOverlay=null,this.updateListenerDestroyFunc=null,this.activeOverlayWrapperCssClass=null,this.elToFocusAfter=null}wireBeans(e){this.overlayService=e.overlayService,this.focusService=e.focusService,this.visibleColsService=e.visibleColsService}handleKeyDown(e){if(!(e.key!==aa.TAB||e.defaultPrevented||iQ(e)||this.focusService.findNextFocusableElement(this.eOverlayWrapper,!1,e.shiftKey)))(e.shiftKey?this.focusService.focusGridView(iB(this.visibleColsService.getAllCols()),!0,!1):this.focusService.focusNextGridCoreContainer(!1))&&e.preventDefault()}updateLayoutClasses(e,t){let i=this.eOverlayWrapper.classList;i.toggle("ag-layout-auto-height",t.autoHeight),i.toggle("ag-layout-normal",t.normal),i.toggle("ag-layout-print",t.print)}postConstruct(){this.createManagedBean(new nV(this)),this.setDisplayed(!1,{skipAriaHidden:!0}),this.overlayService.setOverlayWrapperComp(this),this.addManagedElementListeners(this.getFocusableElement(),{keydown:this.handleKeyDown.bind(this)})}setWrapperTypeClass(e){let t=this.eOverlayWrapper.classList;this.activeOverlayWrapperCssClass&&t.toggle(this.activeOverlayWrapperCssClass,!1),this.activeOverlayWrapperCssClass=e,t.toggle(e,!0)}showOverlay(e,t,i,r){if(this.setWrapperTypeClass(t),this.destroyActiveOverlay(),this.elToFocusAfter=null,this.activePromise=e,e){if(this.setDisplayed(!0,{skipAriaHidden:!0}),i&&this.focusService.isGridFocused()){let e=ih(this.gos);e&&!id(this.gos)&&(this.elToFocusAfter=e)}e.then(t=>{if(this.activePromise!==e){this.activeOverlay!==t&&(this.destroyBean(t),t=null);return}if(this.activePromise=null,!t)return;if(this.activeOverlay!==t&&(this.eOverlayWrapper.appendChild(t.getGui()),this.activeOverlay=t,r)){let e=t;this.updateListenerDestroyFunc=this.addManagedPropertyListener(r,({currentValue:t})=>{e.refresh?.(this.gos.addGridCommonParams({...t??{}}))})}let s=this.focusService;i&&s.isGridFocused()&&s.focusInto(this.eOverlayWrapper)})}}updateOverlayWrapperPaddingTop(e){this.eOverlayWrapper.style.setProperty("padding-top",`${e}px`)}destroyActiveOverlay(){this.activePromise=null;let e=this.activeOverlay;if(!e)return;let t=this.elToFocusAfter;this.activeOverlay=null,this.elToFocusAfter=null,t&&!this.focusService.isGridFocused()&&(t=null);let i=this.updateListenerDestroyFunc;i&&(i(),this.updateListenerDestroyFunc=null),this.destroyBean(e),sL(this.eOverlayWrapper),t?.focus?.({preventScroll:!0})}hideOverlay(){this.destroyActiveOverlay(),this.setDisplayed(!1,{skipAriaHidden:!0})}destroy(){this.elToFocusAfter=null,this.destroyActiveOverlay(),this.overlayService.setOverlayWrapperComp(void 0),super.destroy()}}},nH=class extends sQ{constructor(e,t){super(),this.direction=t,this.eViewport=null,this.eContainer=null,this.hideTimeout=null,this.setTemplate(e)}wireBeans(e){this.animationFrameService=e.animationFrameService}postConstruct(){this.addManagedEventListeners({scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this)}),this.onScrollVisibilityChanged(),this.addOrRemoveCssClass("ag-apple-scrollbar",sd()||sc())}initialiseInvisibleScrollbar(){void 0===this.invisibleScrollbar&&(this.invisibleScrollbar=sm(),this.invisibleScrollbar&&(this.hideAndShowInvisibleScrollAsNeeded(),this.addActiveListenerToggles()))}addActiveListenerToggles(){let e=this.getGui(),t=()=>this.addOrRemoveCssClass("ag-scrollbar-active",!0),i=()=>this.addOrRemoveCssClass("ag-scrollbar-active",!1);this.addManagedListeners(e,{mouseenter:t,mousedown:t,touchstart:t,mouseleave:i,touchend:i})}onScrollVisibilityChanged(){void 0===this.invisibleScrollbar&&this.initialiseInvisibleScrollbar(),this.animationFrameService.requestAnimationFrame(()=>this.setScrollVisible())}hideAndShowInvisibleScrollAsNeeded(){this.addManagedEventListeners({bodyScroll:e=>{e.direction===this.direction&&(null!==this.hideTimeout&&(window.clearTimeout(this.hideTimeout),this.hideTimeout=null),this.addOrRemoveCssClass("ag-scrollbar-scrolling",!0))},bodyScrollEnd:()=>{this.hideTimeout=window.setTimeout(()=>{this.addOrRemoveCssClass("ag-scrollbar-scrolling",!1),this.hideTimeout=null},400)}})}attemptSettingScrollPosition(e){let t=this.getViewportElement();tU(()=>sN(t),()=>this.setScrollPosition(e),100)}getViewportElement(){return this.eViewport}getContainer(){return this.eContainer}onScrollCallback(e){this.addManagedElementListeners(this.getViewportElement(),{scroll:e})}},nU={selector:"AG-FAKE-HORIZONTAL-SCROLL",component:class extends nH{constructor(){super(`<div class="ag-body-horizontal-scroll" aria-hidden="true">
            <div class="ag-horizontal-left-spacer" data-ref="eLeftSpacer"></div>
            <div class="ag-body-horizontal-scroll-viewport" data-ref="eViewport">
                <div class="ag-body-horizontal-scroll-container" data-ref="eContainer"></div>
            </div>
            <div class="ag-horizontal-right-spacer" data-ref="eRightSpacer"></div>
        </div>`,"horizontal"),this.eLeftSpacer=null,this.eRightSpacer=null}wireBeans(e){super.wireBeans(e),this.visibleColsService=e.visibleColsService,this.pinnedRowModel=e.pinnedRowModel,this.ctrlsService=e.ctrlsService,this.scrollVisibleService=e.scrollVisibleService}postConstruct(){super.postConstruct();let e=this.setFakeHScrollSpacerWidths.bind(this);this.addManagedEventListeners({displayedColumnsChanged:e,displayedColumnsWidthChanged:e,pinnedRowDataChanged:this.onPinnedRowDataChanged.bind(this)}),this.addManagedPropertyListener("domLayout",e),this.ctrlsService.register("fakeHScrollComp",this),this.createManagedBean(new nw(e=>this.eContainer.style.width=`${e}px`)),this.addManagedPropertyListeners(["suppressHorizontalScroll"],this.onScrollVisibilityChanged.bind(this))}initialiseInvisibleScrollbar(){void 0===this.invisibleScrollbar&&(this.enableRtl=this.gos.get("enableRtl"),super.initialiseInvisibleScrollbar(),this.invisibleScrollbar&&this.refreshCompBottom())}onPinnedRowDataChanged(){this.refreshCompBottom()}refreshCompBottom(){if(!this.invisibleScrollbar)return;let e=this.pinnedRowModel.getPinnedBottomTotalHeight();this.getGui().style.bottom=`${e}px`}onScrollVisibilityChanged(){super.onScrollVisibilityChanged(),this.setFakeHScrollSpacerWidths()}setFakeHScrollSpacerWidths(){let e=this.scrollVisibleService.isVerticalScrollShowing(),t=this.visibleColsService.getDisplayedColumnsRightWidth(),i=!this.enableRtl&&e,r=this.scrollVisibleService.getScrollbarWidth();i&&(t+=r),sV(this.eRightSpacer,t),this.eRightSpacer.classList.toggle("ag-scroller-corner",t<=r);let s=this.visibleColsService.getColsLeftWidth();this.enableRtl&&e&&(s+=r),sV(this.eLeftSpacer,s),this.eLeftSpacer.classList.toggle("ag-scroller-corner",s<=r)}setScrollVisible(){let e=this.scrollVisibleService.isHorizontalScrollShowing(),t=this.invisibleScrollbar,i=this.gos.get("suppressHorizontalScroll"),r=e&&this.scrollVisibleService.getScrollbarWidth()||0,s=i?0:0===r&&t?16:r;this.addOrRemoveCssClass("ag-scrollbar-invisible",t),sj(this.getGui(),s),sj(this.eViewport,s),sj(this.eContainer,s),this.setDisplayed(e,{skipAriaHidden:!0})}getScrollPosition(){return sA(this.getViewportElement(),this.enableRtl)}setScrollPosition(e){sN(this.getViewportElement())||this.attemptSettingScrollPosition(e),sR(this.getViewportElement(),e,this.enableRtl)}}},nW=class extends i2{wireBeans(e){this.maxDivHeightScaler=e.rowContainerHeightService}constructor(e,t){super(),this.eContainer=e,this.eViewport=t}postConstruct(){this.addManagedEventListeners({rowContainerHeightChanged:this.onHeightChanged.bind(this)})}onHeightChanged(){let e=this.maxDivHeightScaler.getUiContainerHeight(),t=null!=e?`${e}px`:"";this.eContainer.style.height=t,this.eViewport&&(this.eViewport.style.height=t)}},n$={selector:"AG-FAKE-VERTICAL-SCROLL",component:class extends nH{wireBeans(e){super.wireBeans(e),this.ctrlsService=e.ctrlsService,this.scrollVisibleService=e.scrollVisibleService}constructor(){super(`<div class="ag-body-vertical-scroll" aria-hidden="true">
            <div class="ag-body-vertical-scroll-viewport" data-ref="eViewport">
                <div class="ag-body-vertical-scroll-container" data-ref="eContainer"></div>
            </div>
        </div>`,"vertical")}postConstruct(){super.postConstruct(),this.createManagedBean(new nW(this.eContainer)),this.ctrlsService.register("fakeVScrollComp",this),this.addManagedEventListeners({rowContainerHeightChanged:this.onRowContainerHeightChanged.bind(this)})}setScrollVisible(){let e=this.scrollVisibleService.isVerticalScrollShowing(),t=this.invisibleScrollbar,i=e&&this.scrollVisibleService.getScrollbarWidth()||0,r=0===i&&t?16:i;this.addOrRemoveCssClass("ag-scrollbar-invisible",t),sV(this.getGui(),r),sV(this.eViewport,r),sV(this.eContainer,r),this.setDisplayed(e,{skipAriaHidden:!0})}onRowContainerHeightChanged(){let{ctrlsService:e}=this,t=e.getGridBodyCtrl().getBodyViewportElement(),i=this.getScrollPosition(),r=t.scrollTop;i!=r&&this.setScrollPosition(r,!0)}getScrollPosition(){return this.getViewportElement().scrollTop}setScrollPosition(e,t){t||sN(this.getViewportElement())||this.attemptSettingScrollPosition(e),this.getViewportElement().scrollTop=e}}},nY=((g=nY||{}).FakeHScrollbar="fakeHScrollComp",g.Header="centerHeader",g.PinnedTop="topCenter",g.PinnedBottom="bottomCenter",g.StickyTop="stickyTopCenter",g.StickyBottom="stickyBottomCenter",g),nK=class extends i2{constructor(e){super(),this.lastScrollSource=[null,null],this.scrollLeft=-1,this.nextScrollTop=-1,this.scrollTop=-1,this.lastOffsetHeight=-1,this.lastScrollTop=-1,this.eBodyViewport=e,this.resetLastHScrollDebounced=tj(()=>this.lastScrollSource[1]=null,500),this.resetLastVScrollDebounced=tj(()=>this.lastScrollSource[0]=null,500)}wireBeans(e){this.ctrlsService=e.ctrlsService,this.animationFrameService=e.animationFrameService,this.paginationService=e.paginationService,this.pageBoundsService=e.pageBoundsService,this.rowModel=e.rowModel,this.heightScaler=e.rowContainerHeightService,this.rowRenderer=e.rowRenderer,this.columnModel=e.columnModel,this.visibleColsService=e.visibleColsService}postConstruct(){this.enableRtl=this.gos.get("enableRtl"),this.addManagedEventListeners({displayedColumnsWidthChanged:this.onDisplayedColumnsWidthChanged.bind(this)}),this.ctrlsService.whenReady(this,e=>{this.centerRowsCtrl=e.center,this.onDisplayedColumnsWidthChanged(),this.addScrollListener()})}addScrollListener(){this.addHorizontalScrollListeners(),this.addVerticalScrollListeners()}addHorizontalScrollListeners(){for(let e of(this.addManagedElementListeners(this.centerRowsCtrl.getViewportElement(),{scroll:this.onHScroll.bind(this,"Viewport")}),Object.values(nY))){let t=this.ctrlsService.get(e);this.registerScrollPartner(t,this.onHScroll.bind(this,e))}}addVerticalScrollListeners(){let e=this.ctrlsService.get("fakeVScrollComp"),t=this.gos.get("debounceVerticalScrollbar"),i=t?tj(this.onVScroll.bind(this,"Viewport"),100):this.onVScroll.bind(this,"Viewport"),r=t?tj(this.onVScroll.bind(this,"fakeVScrollComp"),100):this.onVScroll.bind(this,"fakeVScrollComp");this.addManagedElementListeners(this.eBodyViewport,{scroll:i}),this.registerScrollPartner(e,r)}registerScrollPartner(e,t){e.onScrollCallback(t)}onDisplayedColumnsWidthChanged(){this.enableRtl&&this.horizontallyScrollHeaderCenterAndFloatingCenter()}horizontallyScrollHeaderCenterAndFloatingCenter(e){null!=this.centerRowsCtrl&&(void 0===e&&(e=this.centerRowsCtrl.getCenterViewportScrollLeft()),this.setScrollLeftForAllContainersExceptCurrent(Math.abs(e)))}setScrollLeftForAllContainersExceptCurrent(e){for(let t of[...Object.values(nY),"Viewport"])this.lastScrollSource[1]!==t&&sR(this.getViewportForSource(t),e,this.enableRtl)}getViewportForSource(e){return"Viewport"===e?this.centerRowsCtrl.getViewportElement():this.ctrlsService.get(e).getViewportElement()}isControllingScroll(e,t){return null==this.lastScrollSource[t]?(0===t?this.lastScrollSource[0]=e:this.lastScrollSource[1]=e,!0):this.lastScrollSource[t]===e}onHScroll(e){if(!this.isControllingScroll(e,1))return;let{scrollLeft:t}=this.centerRowsCtrl.getViewportElement();if(this.shouldBlockScrollUpdate(1,t,!0))return;let i=sA(this.getViewportForSource(e),this.enableRtl);this.doHorizontalScroll(Math.round(i)),this.resetLastHScrollDebounced()}onVScroll(e){let t;this.isControllingScroll(e,0)&&(t="Viewport"===e?this.eBodyViewport.scrollTop:this.ctrlsService.get("fakeVScrollComp").getScrollPosition(),this.shouldBlockScrollUpdate(0,t,!0)||(this.animationFrameService.setScrollTop(t),this.nextScrollTop=t,"Viewport"===e?this.ctrlsService.get("fakeVScrollComp").setScrollPosition(t):this.eBodyViewport.scrollTop=t,this.gos.get("suppressAnimationFrame")?this.scrollGridIfNeeded():this.animationFrameService.schedule(),this.resetLastVScrollDebounced()))}doHorizontalScroll(e){let t=this.ctrlsService.get("fakeHScrollComp").getScrollPosition();(this.scrollLeft!==e||e!==t)&&(this.scrollLeft=e,this.fireScrollEvent(1),this.horizontallyScrollHeaderCenterAndFloatingCenter(e),this.centerRowsCtrl.onHorizontalViewportChanged(!0))}fireScrollEvent(e){let t={type:"bodyScroll",direction:1===e?"horizontal":"vertical",left:this.scrollLeft,top:this.scrollTop};this.eventService.dispatchEvent(t),window.clearTimeout(this.scrollTimer),this.scrollTimer=void 0,this.scrollTimer=window.setTimeout(()=>{this.eventService.dispatchEvent({...t,type:"bodyScrollEnd"})},100)}shouldBlockScrollUpdate(e,t,i=!1){return(!i||!!sc())&&(0===e?this.shouldBlockVerticalScroll(t):this.shouldBlockHorizontalScroll(t))}shouldBlockVerticalScroll(e){let t=sM(this.eBodyViewport),{scrollHeight:i}=this.eBodyViewport;return e<0||e+t>i}shouldBlockHorizontalScroll(e){let t=this.centerRowsCtrl.getCenterWidth(),{scrollWidth:i}=this.centerRowsCtrl.getViewportElement();if(this.enableRtl&&sT()){if(e>0)return!0}else if(e<0)return!0;return Math.abs(e)+t>i}redrawRowsAfterScroll(){this.fireScrollEvent(0)}checkScrollLeft(){this.scrollLeft!==this.centerRowsCtrl.getCenterViewportScrollLeft()&&this.onHScroll("Viewport")}scrollGridIfNeeded(){let e=this.scrollTop!=this.nextScrollTop;return e&&(this.scrollTop=this.nextScrollTop,this.redrawRowsAfterScroll()),e}setHorizontalScrollPosition(e,t=!1){let i=this.centerRowsCtrl.getViewportElement().scrollWidth-this.centerRowsCtrl.getCenterWidth();!t&&this.shouldBlockScrollUpdate(1,e)&&(e=this.enableRtl&&sT()?e>0?0:i:Math.min(Math.max(e,0),i)),sR(this.centerRowsCtrl.getViewportElement(),Math.abs(e),this.enableRtl),this.doHorizontalScroll(e)}setVerticalScrollPosition(e){this.eBodyViewport.scrollTop=e}getVScrollPosition(){return this.lastScrollTop=this.eBodyViewport.scrollTop,this.lastOffsetHeight=this.eBodyViewport.offsetHeight,{top:this.lastScrollTop,bottom:this.lastScrollTop+this.lastOffsetHeight}}getApproximateVScollPosition(){return this.lastScrollTop>=0&&this.lastOffsetHeight>=0?{top:this.scrollTop,bottom:this.scrollTop+this.lastOffsetHeight}:this.getVScrollPosition()}getHScrollPosition(){return this.centerRowsCtrl.getHScrollPosition()}isHorizontalScrollShowing(){return this.centerRowsCtrl.isHorizontalScrollShowing()}scrollHorizontally(e){let t=this.centerRowsCtrl.getViewportElement().scrollLeft;return this.setHorizontalScrollPosition(t+e),this.centerRowsCtrl.getViewportElement().scrollLeft-t}scrollToTop(){this.eBodyViewport.scrollTop=0}ensureNodeVisible(e,t=null){let i=this.rowModel.getRowCount(),r=-1;for(let t=0;t<i;t++){let i=this.rowModel.getRow(t);if("function"==typeof e){if(i&&e(i)){r=t;break}}else if(e===i||e===i.data){r=t;break}}r>=0&&this.ensureIndexVisible(r,t)}ensureIndexVisible(e,t){if(t5(this.gos,"print"))return;let i=this.rowModel.getRowCount();if("number"!=typeof e||e<0||e>=i){tO("Invalid row index for ensureIndexVisible: "+e);return}let r=this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel");this.getFrameworkOverrides().wrapIncoming(()=>{let i;r||this.paginationService?.goToPageWithIndex(e);let s=this.ctrlsService.getGridBodyCtrl(),a=s.getStickyTopHeight(),o=s.getStickyBottomHeight(),n=this.rowModel.getRow(e);do{let e=n.rowTop,r=n.rowHeight,s=this.pageBoundsService.getPixelOffset(),l=n.rowTop-s,h=l+n.rowHeight,d=this.getVScrollPosition(),c=this.heightScaler.getDivStretchOffset(),u=d.top+c,p=d.bottom+c,g=p-u,m=this.heightScaler.getScrollPositionForPixel(l),f=this.heightScaler.getScrollPositionForPixel(h-g),v=Math.min((m+f)/2,l),y=u+a>l,C=p-o<h,w=null;"top"===t?w=m:"bottom"===t?w=f:"middle"===t?w=v:y?w=m-a:C&&(w=f+o),null!==w&&(this.setVerticalScrollPosition(w),this.rowRenderer.redraw({afterScroll:!0})),i=e!==n.rowTop||r!==n.rowHeight}while(i);this.animationFrameService.flushAllFrames()})}ensureColumnVisible(e,t="auto"){let i=this.columnModel.getCol(e);if(!i||i.isPinned()||!this.visibleColsService.isColDisplayed(i))return;let r=this.getPositionedHorizontalScroll(i,t);this.getFrameworkOverrides().wrapIncoming(()=>{null!==r&&this.centerRowsCtrl.setCenterViewportScrollLeft(r),this.centerRowsCtrl.onHorizontalViewportChanged(),this.animationFrameService.flushAllFrames()})}setScrollPosition(e,t){this.getFrameworkOverrides().wrapIncoming(()=>{this.centerRowsCtrl.setCenterViewportScrollLeft(t),this.setVerticalScrollPosition(e),this.rowRenderer.redraw({afterScroll:!0}),this.animationFrameService.flushAllFrames()})}getPositionedHorizontalScroll(e,t){let{columnBeforeStart:i,columnAfterEnd:r}=this.isColumnOutsideViewport(e),s=this.centerRowsCtrl.getCenterWidth()<e.getActualWidth(),a=this.centerRowsCtrl.getCenterWidth(),o=this.enableRtl,n=(o?i:r)||s,l=o?r:i;"auto"!==t&&(n="start"===t,l="end"===t);let h="middle"===t;if(n||l||h){let{colLeft:t,colMiddle:i,colRight:r}=this.getColumnBounds(e);return h?i-a/2:n?o?r:t:o?t-a:r-a}return null}isColumnOutsideViewport(e){let{start:t,end:i}=this.getViewportBounds(),{colLeft:r,colRight:s}=this.getColumnBounds(e),a=this.enableRtl;return{columnBeforeStart:a?t>s:i<s,columnAfterEnd:a?i<r:t>r}}getColumnBounds(e){let t=this.enableRtl,i=this.visibleColsService.getBodyContainerWidth(),r=e.getActualWidth(),s=e.getLeft(),a=t?-1:1,o=t?i-s:s;return{colLeft:o,colMiddle:o+r/2*a,colRight:o+r*a}}getViewportBounds(){let e=this.centerRowsCtrl.getCenterWidth(),t=this.centerRowsCtrl.getCenterViewportScrollLeft();return{start:t,end:e+t,width:e}}},nZ=class extends i2{wireBeans(e){this.ctrlsService=e.ctrlsService,this.pinnedWidthService=e.pinnedWidthService,this.columnModel=e.columnModel,this.visibleColsService=e.visibleColsService,this.columnSizeService=e.columnSizeService,this.scrollVisibleService=e.scrollVisibleService,this.columnViewportService=e.columnViewportService}constructor(e){super(),this.centerContainerCtrl=e}postConstruct(){this.ctrlsService.whenReady(this,e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.listenForResize()}),this.addManagedEventListeners({scrollbarWidthChanged:this.onScrollbarWidthChanged.bind(this)}),this.addManagedPropertyListeners(["alwaysShowHorizontalScroll","alwaysShowVerticalScroll"],()=>{this.checkViewportAndScrolls()})}listenForResize(){let e=()=>this.onCenterViewportResized();this.centerContainerCtrl.registerViewportResizeListener(e),this.gridBodyCtrl.registerBodyViewportResizeListener(e)}onScrollbarWidthChanged(){this.checkViewportAndScrolls()}onCenterViewportResized(){if(this.scrollVisibleService.onCentreViewportResized(),this.centerContainerCtrl.isViewportInTheDOMTree()){this.keepPinnedColumnsNarrowerThanViewport(),this.checkViewportAndScrolls();let e=this.centerContainerCtrl.getCenterWidth();e!==this.centerWidth&&(this.centerWidth=e,this.columnSizeService.refreshFlexedColumns({viewportWidth:this.centerWidth,updateBodyWidths:!0,fireResizedEvent:!0}))}else this.bodyHeight=0}keepPinnedColumnsNarrowerThanViewport(){let e=sE(this.gridBodyCtrl.getBodyViewportElement());if(e<=50)return;let t=this.getPinnedColumnsOverflowingViewport(e-50),i=this.gos.getCallback("processUnpinnedColumns");t.length&&(i&&(t=i({columns:t,viewportWidth:e})),this.columnModel.setColsPinned(t,null,"viewportSizeFeature"))}getPinnedColumnsOverflowingViewport(e){let t=this.pinnedWidthService.getPinnedRightWidth()+this.pinnedWidthService.getPinnedLeftWidth();if(t<e)return[];let i=[...this.visibleColsService.getLeftCols()],r=[...this.visibleColsService.getRightCols()],s=0,a=0,o=[],n=t-0-e;for(;(a<i.length||s<r.length)&&n>0;){if(s<r.length){let e=r[s++];n-=e.getActualWidth(),o.push(e)}if(a<i.length&&n>0){let e=i[a++];n-=e.getActualWidth(),o.push(e)}}return o}checkViewportAndScrolls(){this.updateScrollVisibleService(),this.checkBodyHeight(),this.onHorizontalViewportChanged(),this.gridBodyCtrl.getScrollFeature().checkScrollLeft()}getBodyHeight(){return this.bodyHeight}checkBodyHeight(){let e=sM(this.gridBodyCtrl.getBodyViewportElement());this.bodyHeight!==e&&(this.bodyHeight=e,this.eventService.dispatchEvent({type:"bodyHeightChanged"}))}updateScrollVisibleService(){this.updateScrollVisibleServiceImpl(),setTimeout(this.updateScrollVisibleServiceImpl.bind(this),500)}updateScrollVisibleServiceImpl(){let e={horizontalScrollShowing:this.isHorizontalScrollShowing(),verticalScrollShowing:this.gridBodyCtrl.isVerticalScrollShowing()};this.scrollVisibleService.setScrollsVisible(e)}isHorizontalScrollShowing(){return this.centerContainerCtrl.isHorizontalScrollShowing()}onHorizontalViewportChanged(){let e=this.centerContainerCtrl.getCenterWidth(),t=this.centerContainerCtrl.getViewportScrollLeft();this.columnViewportService.setScrollPosition(e,t)}},nq=class extends i2{wireBeans(e){this.dragService=e.dragService,this.rangeService=e.rangeService}constructor(e){super(),this.eContainer=e}postConstruct(){this.rangeService&&(this.params={eElement:this.eContainer,onDragStart:this.rangeService.onDragStart.bind(this.rangeService),onDragStop:this.rangeService.onDragStop.bind(this.rangeService),onDragging:this.rangeService.onDragging.bind(this.rangeService)},this.addManagedPropertyListeners(["enableRangeSelection","selection"],()=>{iE(this.gos)?this.enableFeature():this.disableFeature()}),this.addDestroyFunc(()=>this.disableFeature()),iE(this.gos)&&this.enableFeature())}enableFeature(){this.dragService.addDragSource(this.params)}disableFeature(){this.dragService.removeDragSource(this.params)}},nX=class extends sQ{constructor(){super(`
            <div class="ag-selection-checkbox" role="presentation">
                <ag-checkbox role="presentation" data-ref="eCheckbox"></ag-checkbox>
            </div>`,[ad]),this.eCheckbox=null}postConstruct(){this.eCheckbox.setPassive(!0)}getCheckboxId(){return this.eCheckbox.getInputElement().id}onDataChanged(){this.onSelectionChanged()}onSelectableChanged(){this.showOrHideSelect()}onSelectionChanged(){let e=this.localeService.getLocaleTextFunc(),t=this.rowNode.isSelected(),i=sa(e,t),[r,s]=this.rowNode.selectable?["ariaRowToggleSelection","Press Space to toggle row selection"]:["ariaRowSelectionDisabled","Row Selection is disabled for this row"],a=e(r,s);this.eCheckbox.setValue(t,!0),this.eCheckbox.setInputAriaLabel(`${a} (${i})`)}onClicked(e,t,i){return this.rowNode.setSelectedParams({newValue:e,rangeSelect:i.shiftKey,groupSelectsFiltered:t,event:i,source:"checkboxSelected"})}init(e){if(this.rowNode=e.rowNode,this.column=e.column,this.overrides=e.overrides,this.onSelectionChanged(),this.addManagedListeners(this.eCheckbox.getInputElement(),{dblclick:e=>iX(e),click:e=>{iX(e);let t="filteredDescendants"===iP(this.gos),i=this.eCheckbox.getValue();this.shouldHandleIndeterminateState(i,t)?0===this.onClicked(!0,t,e||{})&&this.onClicked(!1,t,e):i?this.onClicked(!1,t,e):this.onClicked(!0,t,e||{})}}),this.addManagedListeners(this.rowNode,{rowSelected:this.onSelectionChanged.bind(this),dataChanged:this.onDataChanged.bind(this),selectableChanged:this.onSelectableChanged.bind(this)}),iA(this.gos)||"function"==typeof this.getIsVisible()){let e=this.showOrHideSelect.bind(this);this.addManagedEventListeners({displayedColumnsChanged:e}),this.addManagedListeners(this.rowNode,{dataChanged:e,cellChanged:e}),this.showOrHideSelect()}this.eCheckbox.getInputElement().setAttribute("tabindex","-1")}shouldHandleIndeterminateState(e,t){return t&&(void 0===this.eCheckbox.getPreviousValue()||void 0===e)&&t4(this.gos)}showOrHideSelect(){let e=this.rowNode.selectable,t=this.getIsVisible();if(e){if("function"==typeof t){let i=this.overrides?.callbackParams;if(this.column){let r=this.column.createColumnFunctionCallbackParams(this.rowNode);e=t({...i,...r})}else e=t({...i,node:this.rowNode,data:this.rowNode.data})}else e=t??!1}let i=this.gos.get("selection");if(i?!(i?.mode!=="cell"&&i?.hideDisabledCheckboxes):this.column?.getColDef().showDisabledCheckboxes){this.eCheckbox.setDisabled(!e),this.setVisible(!0),this.setDisplayed(!0);return}if(this.overrides?.removeHidden){this.setDisplayed(e);return}this.setVisible(e)}getIsVisible(){if(this.overrides)return this.overrides.isVisible;let e=this.gos.get("selection");return e?ib(e):this.column?.getColDef()?.checkboxSelection}},nQ=class extends sQ{constructor(e,t,i){super('<div class="ag-drag-handle ag-row-drag" draggable="true"></div>'),this.rowNode=e,this.column=t,this.eCell=i}postConstruct(){this.getGui().appendChild(s2("rowDrag",this.gos,null)),this.addGuiEventListener("mousedown",e=>{e.stopPropagation()}),this.addDragSource(),this.checkVisibility()}addDragSource(){this.addGuiEventListener("dragstart",this.onDragStart.bind(this))}onDragStart(e){let t=this.column.getColDef().dndSourceOnRowDrag;e.dataTransfer.setDragImage(this.eCell,0,0),t?t(this.gos.addGridCommonParams({rowNode:this.rowNode,dragEvent:e})):(()=>{try{let t=JSON.stringify(this.rowNode.data);e.dataTransfer.setData("application/json",t),e.dataTransfer.setData("text/plain",t)}catch(e){}})()}checkVisibility(){let e=this.column.isDndSource(this.rowNode);this.setDisplayed(e)}},nJ=class extends i2{constructor(e,t){super(),this.staticClasses=[],this.cellCtrl=e,this.beans=t,this.column=e.getColumn(),this.rowNode=e.getRowNode()}setComp(e){this.cellComp=e,this.applyUserStyles(),this.applyCellClassRules(),this.applyClassesFromColDef()}applyCellClassRules(){let e=this.column.getColDef(),{cellClassRules:t}=e,i=this.beans.gos.addGridCommonParams({value:this.cellCtrl.getValue(),data:this.rowNode.data,node:this.rowNode,colDef:e,column:this.column,rowIndex:this.rowNode.rowIndex});this.beans.stylingService.processClassRules(t===this.cellClassRules?void 0:this.cellClassRules,t,i,e=>this.cellComp.addOrRemoveCssClass(e,!0),e=>this.cellComp.addOrRemoveCssClass(e,!1)),this.cellClassRules=t}applyUserStyles(){let e;let t=this.column.getColDef();if(t.cellStyle){if("function"==typeof t.cellStyle){let i=this.beans.gos.addGridCommonParams({column:this.column,value:this.cellCtrl.getValue(),colDef:t,data:this.rowNode.data,node:this.rowNode,rowIndex:this.rowNode.rowIndex});e=(0,t.cellStyle)(i)}else e=t.cellStyle;e&&this.cellComp.setUserStyles(e)}}applyClassesFromColDef(){let e=this.column.getColDef(),t=this.beans.gos.addGridCommonParams({value:this.cellCtrl.getValue(),data:this.rowNode.data,node:this.rowNode,column:this.column,colDef:e,rowIndex:this.rowNode.rowIndex});this.staticClasses.length&&this.staticClasses.forEach(e=>this.cellComp.addOrRemoveCssClass(e,!1)),this.staticClasses=this.beans.stylingService.getStaticCellClasses(e,t),this.staticClasses.length&&this.staticClasses.forEach(e=>this.cellComp.addOrRemoveCssClass(e,!0))}destroy(){super.destroy()}},n0=class extends i2{constructor(e,t,i,r,s){super(),this.cellCtrl=e,this.beans=t,this.rowNode=r,this.rowCtrl=s}setComp(e){this.eGui=e}onKeyDown(e){let t=e.key;switch(t){case aa.ENTER:this.onEnterKeyDown(e);break;case aa.F2:this.onF2KeyDown(e);break;case aa.ESCAPE:this.onEscapeKeyDown(e);break;case aa.TAB:this.onTabKeyDown(e);break;case aa.BACKSPACE:case aa.DELETE:this.onBackspaceOrDeleteKeyDown(t,e);break;case aa.DOWN:case aa.UP:case aa.RIGHT:case aa.LEFT:this.onNavigationKeyDown(e,t)}}onNavigationKeyDown(e,t){this.cellCtrl.isEditing()||(e.shiftKey&&this.cellCtrl.isRangeSelectionEnabled()?this.onShiftRangeSelect(e):this.beans.navigationService.navigateToNextCell(e,t,this.cellCtrl.getCellPosition(),!0),e.preventDefault())}onShiftRangeSelect(e){if(!this.beans.rangeService)return;let t=this.beans.rangeService.extendLatestRangeInDirection(e);t&&this.beans.navigationService.ensureCellVisible(t)}onTabKeyDown(e){this.beans.navigationService.onTabKeyDown(this.cellCtrl,e)}onBackspaceOrDeleteKeyDown(e,t){let{cellCtrl:i,beans:r,rowNode:s}=this,{gos:a,rangeService:o,eventService:n}=r;if(!i.isEditing()){if(n.dispatchEvent({type:"keyShortcutChangedCellStart"}),function(e,t=!1){return e===aa.DELETE||!t&&e===aa.BACKSPACE&&sd()}(e,a.get("enableCellEditingOnBackspace"))){if(o&&iE(a))o.clearCellRangeCellValues({dispatchWrapperEvents:!0,wrapperEventSource:"deleteKey"});else if(i.isCellEditable()){let e=i.getColumn(),t=this.beans.valueService.getDeleteValue(e,s);s.setDataValue(e,t,"cellClear")}}else i.startRowOrCellEdit(e,t);n.dispatchEvent({type:"keyShortcutChangedCellEnd"})}}onEnterKeyDown(e){if(this.cellCtrl.isEditing()||this.rowCtrl.isEditing())this.cellCtrl.stopEditingAndFocus(!1,e.shiftKey);else if(this.beans.gos.get("enterNavigatesVertically")){let t=e.shiftKey?aa.UP:aa.DOWN;this.beans.navigationService.navigateToNextCell(null,t,this.cellCtrl.getCellPosition(),!1)}else this.cellCtrl.startRowOrCellEdit(aa.ENTER,e),this.cellCtrl.isEditing()&&e.preventDefault()}onF2KeyDown(e){this.cellCtrl.isEditing()||this.cellCtrl.startRowOrCellEdit(aa.F2,e)}onEscapeKeyDown(e){this.cellCtrl.isEditing()&&(this.cellCtrl.stopRowOrCellEdit(!0),this.cellCtrl.focusCell(!0))}processCharacter(e){if(e.target!==this.eGui||this.cellCtrl.isEditing())return;let t=e.key;" "===t?this.onSpaceKeyDown(e):this.cellCtrl.startRowOrCellEdit(t,e)&&e.preventDefault()}onSpaceKeyDown(e){let{gos:t}=this.beans;if(!this.cellCtrl.isEditing()&&t8(t)){let i=this.rowNode.isSelected(),r="filteredDescendants"===iP(t),s=this.rowNode.setSelectedParams({newValue:!i,rangeSelect:e.shiftKey,groupSelectsFiltered:r,event:e,source:"spaceKey"});void 0===i&&0===s&&this.rowNode.setSelectedParams({newValue:!1,rangeSelect:e.shiftKey,groupSelectsFiltered:r,event:e,source:"spaceKey"})}e.preventDefault()}destroy(){super.destroy()}},n1=class extends i2{constructor(e,t,i){super(),this.cellCtrl=e,this.beans=t,this.column=i}onMouseEvent(e,t){if(!iQ(t))switch(e){case"click":this.onCellClicked(t);break;case"mousedown":case"touchstart":this.onMouseDown(t);break;case"dblclick":this.onCellDoubleClicked(t);break;case"mouseout":this.onMouseOut(t);break;case"mouseover":this.onMouseOver(t)}}onCellClicked(e){if(this.isDoubleClickOnIPad()){this.onCellDoubleClicked(e),e.preventDefault();return}let{eventService:t,rangeService:i,gos:r}=this.beans,s=e.ctrlKey||e.metaKey;i&&s&&i.getCellRangeCount(this.cellCtrl.getCellPosition())>1&&i.intersectLastRange(!0);let a=this.cellCtrl.createEvent(e,"cellClicked");t.dispatchEvent(a);let o=this.column.getColDef();o.onCellClicked&&window.setTimeout(()=>{this.beans.frameworkOverrides.wrapOutgoing(()=>{o.onCellClicked(a)})},0),(r.get("singleClickEdit")||o.singleClickEdit)&&!r.get("suppressClickEdit")&&!(e.shiftKey&&i?.getCellRanges().length!=0)&&this.cellCtrl.startRowOrCellEdit()}isDoubleClickOnIPad(){if(!sc()||iJ("dblclick"))return!1;let e=new Date().getTime(),t=e-this.lastIPadMouseClickEvent<200;return this.lastIPadMouseClickEvent=e,t}onCellDoubleClicked(e){let{column:t,beans:i,cellCtrl:r}=this,{eventService:s,frameworkOverrides:a,gos:o}=i,n=t.getColDef(),l=r.createEvent(e,"cellDoubleClicked");s.dispatchEvent(l),"function"==typeof n.onCellDoubleClicked&&window.setTimeout(()=>{a.wrapOutgoing(()=>{n.onCellDoubleClicked(l)})},0),o.get("singleClickEdit")||o.get("suppressClickEdit")||r.startRowOrCellEdit(null,e)}onMouseDown(e){let{ctrlKey:t,metaKey:i,shiftKey:r}=e,s=e.target,{cellCtrl:a,beans:o}=this,{eventService:n,rangeService:l,focusService:h,gos:d}=o;if(this.isRightClickInExistingRange(e))return;let c=l&&0!=l.getCellRanges().length;if(!r||!c){let t=d.get("enableCellTextSelection")&&e.defaultPrevented,i=(so()||t)&&!a.isEditing()&&!sy(s);a.focusCell(i)}if(r&&c&&!h.isCellFocused(a.getCellPosition())){e.preventDefault();let t=h.getFocusedCell();if(t){let{column:e,rowIndex:i,rowPinned:r}=t,s=o.rowRenderer.getRowByPosition({rowIndex:i,rowPinned:r}),a=s?.getCellCtrl(e);a?.isEditing()&&a.stopEditing(),h.setFocusedCell({column:e,rowIndex:i,rowPinned:r,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}}if(!this.containsWidget(s)){if(l){let e=this.cellCtrl.getCellPosition();r?l.extendLatestRangeToCell(e):l.setRangeToCell(e,t||i)}n.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseDown"))}}isRightClickInExistingRange(e){let{rangeService:t}=this.beans;if(t){let i=t.isCellInAnyRange(this.cellCtrl.getCellPosition()),r=2===e.button||e.ctrlKey&&this.beans.gos.get("allowContextMenuWithControlKey");if(i&&r)return!0}return!1}containsWidget(e){return sS(e,"ag-selection-checkbox",3)}onMouseOut(e){this.mouseStayingInsideCell(e)||(this.beans.eventService.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseOut")),this.beans.columnHoverService.clearMouseOver())}onMouseOver(e){this.mouseStayingInsideCell(e)||(this.beans.eventService.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseOver")),this.beans.columnHoverService.setMouseOver([this.column]))}mouseStayingInsideCell(e){if(!e.target||!e.relatedTarget)return!1;let t=this.cellCtrl.getGui(),i=t.contains(e.target),r=t.contains(e.relatedTarget);return i&&r}destroy(){super.destroy()}},n2=class extends i2{constructor(e,t){super(),this.cellCtrl=e,this.beans=t,this.column=e.getColumn(),this.rowNode=e.getRowNode()}setupRowSpan(){this.rowSpan=this.column.getRowSpan(this.rowNode),this.addManagedListeners(this.beans.eventService,{newColumnsLoaded:()=>this.onNewColumnsLoaded()})}setComp(e){this.eGui=e,this.setupColSpan(),this.setupRowSpan(),this.onLeftChanged(),this.onWidthChanged(),this.applyRowSpan()}onNewColumnsLoaded(){let e=this.column.getRowSpan(this.rowNode);this.rowSpan!==e&&(this.rowSpan=e,this.applyRowSpan(!0))}onDisplayColumnsChanged(){let e=this.getColSpanningList();iG(this.colsSpanning,e)||(this.colsSpanning=e,this.onWidthChanged(),this.onLeftChanged())}setupColSpan(){null!=this.column.getColDef().colSpan&&(this.colsSpanning=this.getColSpanningList(),this.addManagedListeners(this.beans.eventService,{displayedColumnsChanged:this.onDisplayColumnsChanged.bind(this),displayedColumnsWidthChanged:this.onWidthChanged.bind(this)}))}onWidthChanged(){if(!this.eGui)return;let e=this.getCellWidth();this.eGui.style.width=`${e}px`}getCellWidth(){return this.colsSpanning?this.colsSpanning.reduce((e,t)=>e+t.getActualWidth(),0):this.column.getActualWidth()}getColSpanningList(){let e=this.column.getColSpan(this.rowNode),t=[];if(1===e)t.push(this.column);else{let i=this.column,r=this.column.getPinned();for(let s=0;i&&s<e&&(t.push(i),!(!(i=this.beans.visibleColsService.getColAfter(i))||tK(i))&&r===i.getPinned());s++);}return t}onLeftChanged(){if(!this.eGui)return;let e=this.modifyLeftForPrintLayout(this.getCellLeft());this.eGui.style.left=e+"px"}getCellLeft(){return(this.beans.gos.get("enableRtl")&&this.colsSpanning?iB(this.colsSpanning):this.column).getLeft()}modifyLeftForPrintLayout(e){if(!this.cellCtrl.isPrintLayout()||"left"===this.column.getPinned())return e;let t=this.beans.visibleColsService.getColsLeftWidth();return"right"===this.column.getPinned()?t+this.beans.visibleColsService.getBodyContainerWidth()+(e||0):t+(e||0)}applyRowSpan(e){if(1===this.rowSpan&&!e)return;let t=it(this.beans.gos)*this.rowSpan;this.eGui.style.height=`${t}px`,this.eGui.style.zIndex="1"}destroy(){super.destroy()}},n3=((m=n3||{})[m.FILL=0]="FILL",m[m.RANGE=1]="RANGE",m),n4=((f=n4||{})[f.VALUE=0]="VALUE",f[f.DIMENSION=1]="DIMENSION",f),n6="ag-cell-range-selected",n5=class{constructor(e,t){this.beans=e,this.rangeService=e.rangeService,this.selectionHandleFactory=e.selectionHandleFactory,this.cellCtrl=t}setComp(e,t){this.cellComp=e,this.eGui=t,this.onCellSelectionChanged()}onCellSelectionChanged(){this.cellComp&&(this.rangeCount=this.rangeService.getCellRangeCount(this.cellCtrl.getCellPosition()),this.hasChartRange=this.getHasChartRange(),this.cellComp.addOrRemoveCssClass(n6,0!==this.rangeCount),this.cellComp.addOrRemoveCssClass(`${n6}-1`,1===this.rangeCount),this.cellComp.addOrRemoveCssClass(`${n6}-2`,2===this.rangeCount),this.cellComp.addOrRemoveCssClass(`${n6}-3`,3===this.rangeCount),this.cellComp.addOrRemoveCssClass(`${n6}-4`,this.rangeCount>=4),this.cellComp.addOrRemoveCssClass("ag-cell-range-chart",this.hasChartRange),sr(this.eGui,this.rangeCount>0||void 0),this.cellComp.addOrRemoveCssClass("ag-cell-range-single-cell",this.isSingleCell()),this.updateRangeBorders(),this.refreshHandle())}updateRangeBorders(){let e=this.getRangeBorders(),t=this.isSingleCell(),i=!t&&e.top,r=!t&&e.right,s=!t&&e.bottom,a=!t&&e.left;this.cellComp.addOrRemoveCssClass("ag-cell-range-top",i),this.cellComp.addOrRemoveCssClass("ag-cell-range-right",r),this.cellComp.addOrRemoveCssClass("ag-cell-range-bottom",s),this.cellComp.addOrRemoveCssClass("ag-cell-range-left",a)}isSingleCell(){let{rangeService:e}=this.beans;return 1===this.rangeCount&&!!e&&!e.isMoreThanOneCell()}getHasChartRange(){let{rangeService:e}=this.beans;if(!this.rangeCount||!e)return!1;let t=e.getCellRanges();return t.length>0&&t.every(e=>iU([1,0],e.type))}updateRangeBordersIfRangeCount(){this.rangeCount>0&&(this.updateRangeBorders(),this.refreshHandle())}getRangeBorders(){let e,t;let i=this.beans.gos.get("enableRtl"),r=!1,s=!1,a=!1,o=!1,n=this.cellCtrl.getCellPosition().column,l=this.beans.visibleColsService;i?(e=l.getColAfter(n),t=l.getColBefore(n)):(e=l.getColBefore(n),t=l.getColAfter(n));let h=this.rangeService.getCellRanges().filter(e=>this.rangeService.isCellInSpecificRange(this.cellCtrl.getCellPosition(),e));e||(o=!0),t||(s=!0);for(let i=0;i<h.length&&(!r||!s||!a||!o);i++){let n=h[i],l=this.rangeService.getRangeStartRow(n),d=this.rangeService.getRangeEndRow(n);!r&&this.beans.rowPositionUtils.sameRow(l,this.cellCtrl.getCellPosition())&&(r=!0),!a&&this.beans.rowPositionUtils.sameRow(d,this.cellCtrl.getCellPosition())&&(a=!0),!o&&e&&0>n.columns.indexOf(e)&&(o=!0),!s&&t&&0>n.columns.indexOf(t)&&(s=!0)}return{top:r,right:s,bottom:a,left:o}}refreshHandle(){if(this.beans.context.isDestroyed())return;let e=this.shouldHaveSelectionHandle();this.selectionHandle&&!e&&(this.selectionHandle=this.beans.context.destroyBean(this.selectionHandle)),e&&this.addSelectionHandle(),this.cellComp.addOrRemoveCssClass("ag-cell-range-handle",!!this.selectionHandle)}shouldHaveSelectionHandle(){let e=this.beans.gos,t=this.rangeService.getCellRanges(),i=t.length;if(this.rangeCount<1||i<1)return!1;let r=iB(t),s=this.cellCtrl.getCellPosition(),a=iD(e)&&!this.cellCtrl.isSuppressFillHandle(),o=function(e){let t=e.get("selection");return void 0!==t?"cell"===t.mode&&t.handle?.mode==="range":e.get("enableRangeHandle")}(e),n=1===i&&!this.cellCtrl.isEditing()&&(a||o);if(this.hasChartRange){let e=1===t[0].type&&this.rangeService.isCellInSpecificRange(s,t[0]);this.cellComp.addOrRemoveCssClass("ag-cell-range-chart-category",e),n=0===r.type}return n&&null!=r.endRow&&this.rangeService.isContiguousRange(r)&&this.rangeService.isBottomRightCell(r,s)}addSelectionHandle(){let e=iB(this.rangeService.getCellRanges()).type,t=iD(this.beans.gos)&&tK(e)?0:1;this.selectionHandle&&this.selectionHandle.getType()!==t&&(this.selectionHandle=this.beans.context.destroyBean(this.selectionHandle)),this.selectionHandle||(this.selectionHandle=this.selectionHandleFactory.createSelectionHandle(t)),this.selectionHandle.refresh(this.cellCtrl)}destroy(){this.beans.context.destroyBean(this.selectionHandle)}},n8=0,n7=class e extends i2{constructor(e,t,i,r){super(),this.column=e,this.rowNode=t,this.beans=i,this.rowCtrl=r,this.cellRangeFeature=void 0,this.cellPositionFeature=void 0,this.cellCustomStyleFeature=void 0,this.tooltipFeature=void 0,this.cellMouseListenerFeature=void 0,this.cellKeyboardListenerFeature=void 0,this.suppressRefreshCell=!1,this.onCellCompAttachedFuncs=[],this.onCellEditorAttachedFuncs=[],this.instanceId=e.getId()+"-"+n8++,this.colIdSanitised=rL(this.column.getId()),this.createCellPosition(),this.updateAndFormatValue(!1)}shouldRestoreFocus(){return this.beans.focusService.shouldRestoreFocus(this.cellPosition)}onFocusOut(){this.beans.focusService.clearRestoreFocus()}addFeatures(){this.cellPositionFeature=new n2(this,this.beans),this.cellCustomStyleFeature=new nJ(this,this.beans),this.cellMouseListenerFeature=new n1(this,this.beans,this.column),this.cellKeyboardListenerFeature=new n0(this,this.beans,this.column,this.rowNode,this.rowCtrl),this.column.isTooltipEnabled()&&this.enableTooltipFeature(),this.beans.rangeService&&iE(this.beans.gos)&&(this.cellRangeFeature=new n5(this.beans,this))}removeFeatures(){let e=this.beans.context;this.cellPositionFeature=e.destroyBean(this.cellPositionFeature),this.cellCustomStyleFeature=e.destroyBean(this.cellCustomStyleFeature),this.cellMouseListenerFeature=e.destroyBean(this.cellMouseListenerFeature),this.cellKeyboardListenerFeature=e.destroyBean(this.cellKeyboardListenerFeature),this.cellRangeFeature=e.destroyBean(this.cellRangeFeature),this.disableTooltipFeature()}enableTooltipFeature(e,t){let i="whenTruncated"===this.beans.gos.get("tooltipShowMode");t||!i||this.isCellRenderer()||(t=()=>{let e=this.getGui(),t=0===e.children.length?e:e.querySelector(".ag-cell-value");return!t||t.scrollWidth>t.clientWidth});let r={getColumn:()=>this.column,getColDef:()=>this.column.getColDef(),getRowIndex:()=>this.cellPosition.rowIndex,getRowNode:()=>this.rowNode,getGui:()=>this.getGui(),getLocation:()=>"cell",getTooltipValue:null!=e?()=>e:()=>{let e=this.column.getColDef(),t=this.rowNode.data;if(e.tooltipField&&tY(t))return rc(t,e.tooltipField,this.column.isTooltipFieldContainsDots());let i=e.tooltipValueGetter;return i?i(this.beans.gos.addGridCommonParams({location:"cell",colDef:this.column.getColDef(),column:this.column,rowIndex:this.cellPosition.rowIndex,node:this.rowNode,data:this.rowNode.data,value:this.value,valueFormatted:this.valueFormatted})):null},getValueFormatted:()=>this.valueFormatted,shouldDisplayTooltip:t};this.tooltipFeature=new sq(r,this.beans)}disableTooltipFeature(){this.tooltipFeature=this.beans.context.destroyBean(this.tooltipFeature)}setComp(e,t,i,r,s,a){this.cellComp=e,this.eGui=t,this.printLayout=r,a??(a=this),this.addDomData(a),this.addFeatures(),a.addDestroyFunc(()=>this.removeFeatures()),this.onSuppressCellFocusChanged(this.beans.gos.get("suppressCellFocus")),this.onCellFocused(this.focusEventToRestore),this.applyStaticCssClasses(),this.setWrapText(),this.onFirstRightPinnedChanged(),this.onLastLeftPinnedChanged(),this.onColumnHover(),this.setupControlComps(),this.setupAutoHeight(i,a),this.refreshFirstAndLastStyles(),this.refreshAriaColIndex(),this.cellPositionFeature?.setComp(t),this.cellCustomStyleFeature?.setComp(e),this.tooltipFeature?.refreshToolTip(),this.cellKeyboardListenerFeature?.setComp(this.eGui),this.cellRangeFeature&&this.cellRangeFeature.setComp(e,t),s&&this.isCellEditable()?this.startEditing():this.showValue(),this.onCellCompAttachedFuncs.length&&(this.onCellCompAttachedFuncs.forEach(e=>e()),this.onCellCompAttachedFuncs=[])}setupAutoHeight(e,t){if(this.isAutoHeight=this.column.isAutoHeight(),!this.isAutoHeight||!e)return;let i=e.parentElement,r=ie(this.beans.gos,this.rowNode).height,s=a=>{if(this.editing||!this.isAlive()||!t.isAlive())return;let{paddingTop:o,paddingBottom:n,borderBottomWidth:l,borderTopWidth:h}=sx(i),d=e.offsetHeight+(o+n+l+h);if(a<5){let t=ia(this.beans.gos),i=!t||!t.contains(e),r=0==d;if(i||r){window.setTimeout(()=>s(a+1),0);return}}let c=Math.max(d,r);this.rowNode.setRowAutoHeight(c,this.column)},a=()=>s(0);a();let o=this.beans.resizeObserverService.observeResize(e,a);t.addDestroyFunc(()=>{o(),this.rowNode.setRowAutoHeight(void 0,this.column)})}getCellAriaRole(){return this.column.getColDef().cellAriaRole??"gridcell"}isCellRenderer(){let e=this.column.getColDef();return null!=e.cellRenderer||null!=e.cellRendererSelector}getValueToDisplay(){return this.valueFormatted??this.value}showValue(e=!1){let t;let i=this.getValueToDisplay();if(this.rowNode.stub&&this.rowNode.groupData?.[this.column.getId()]==null){let e=this.createCellRendererParams();t=this.beans.userComponentFactory.getLoadingCellRendererDetails(this.column.getColDef(),e)}else if(this.isCellRenderer()){let e=this.createCellRendererParams();t=this.beans.userComponentFactory.getCellRendererDetails(this.column.getColDef(),e)}this.cellComp.setRenderDetails(t,i,e),this.cellRangeFeature?.refreshHandle()}setupControlComps(){let e=this.column.getColDef();this.includeSelection=this.isIncludeControl(this.isCheckboxSelection(e)),this.includeRowDrag=this.isIncludeControl(e.rowDrag),this.includeDndSource=this.isIncludeControl(e.dndSource),this.cellComp.setIncludeSelection(this.includeSelection),this.cellComp.setIncludeDndSource(this.includeDndSource),this.cellComp.setIncludeRowDrag(this.includeRowDrag)}isForceWrapper(){return this.beans.gos.get("enableCellTextSelection")||this.column.isAutoHeight()}isIncludeControl(e){return!(null!=this.rowNode.rowPinned)&&("function"==typeof e||!0===e)}isCheckboxSelection(e){let{selection:t}=this.beans.gridOptions;return e.checkboxSelection||ri(this.column)&&t&&ib(t)}refreshShouldDestroy(){let e=this.column.getColDef(),t=this.includeSelection!=this.isIncludeControl(this.isCheckboxSelection(e)),i=this.includeRowDrag!=this.isIncludeControl(e.rowDrag),r=this.includeDndSource!=this.isIncludeControl(e.dndSource),s=this.isAutoHeight!=this.column.isAutoHeight();return t||i||r||s}startEditing(e=null,t=!1,i=null){let{editService:r}=this.beans;return!this.isCellEditable()||!!this.editing||!r||(this.cellComp?r.startEditing(this,e,t,i):(this.onCellCompAttachedFuncs.push(()=>{this.startEditing(e,t,i)}),!0))}setEditing(e,t){this.editCompDetails=t,this.editing!==e&&(this.editing=e,this.cellRangeFeature?.refreshHandle())}stopRowOrCellEdit(e=!1){"fullRow"===this.beans.gos.get("editType")?this.rowCtrl.stopEditing(e):this.stopEditing(e)}onPopupEditorClosed(){this.editing&&this.stopEditingAndFocus()}stopEditing(e=!1){this.onCellEditorAttachedFuncs=[];let{editService:t}=this.beans;return!!this.editing&&!!t&&t.stopEditing(this,e)}createCellRendererParams(){return this.beans.gos.addGridCommonParams({value:this.value,valueFormatted:this.valueFormatted,getValue:()=>this.beans.valueService.getValueForDisplay(this.column,this.rowNode),setValue:e=>this.beans.valueService.setValue(this.rowNode,this.column,e),formatValue:this.formatValue.bind(this),data:this.rowNode.data,node:this.rowNode,pinned:this.column.getPinned(),colDef:this.column.getColDef(),column:this.column,refreshCell:this.refreshCell.bind(this),eGridCell:this.getGui(),eParentOfValue:this.cellComp.getParentOfValue(),registerRowDragger:(e,t,i,r)=>this.registerRowDragger(e,t,r),setTooltip:(e,t)=>{this.tooltipFeature&&this.disableTooltipFeature(),this.enableTooltipFeature(e,t),this.tooltipFeature?.refreshToolTip()}})}setFocusOutOnEditor(){this.editing&&this.beans.editService?.setFocusOutOnEditor(this)}setFocusInOnEditor(){this.editing&&this.beans.editService?.setFocusInOnEditor(this)}onCellChanged(e){e.column===this.column&&this.refreshCell({})}refreshOrDestroyCell(e){this.refreshShouldDestroy()?this.rowCtrl?.recreateCell(this):this.refreshCell(e)}refreshCell(e){if(this.suppressRefreshCell||this.editing)return;let t=this.column.getColDef(),i=null!=e&&!!e.newData,r=null!=e&&!!e.suppressFlash||!!t.suppressCellFlash,s=null==t.field&&null==t.valueGetter&&null==t.showRowGroup,a=e&&e.forceRefresh||s||i,o=!!this.cellComp,n=this.updateAndFormatValue(o);if(o){if(a||n){this.showValue(i);let e=this.beans.filterManager?.isSuppressFlashingCellsBecauseFiltering();!r&&!e&&(this.beans.gos.get("enableCellChangeFlash")||t.enableCellChangeFlash)&&this.flashCell(),this.cellCustomStyleFeature?.applyUserStyles(),this.cellCustomStyleFeature?.applyClassesFromColDef()}this.tooltipFeature?.refreshToolTip(),this.cellCustomStyleFeature?.applyCellClassRules()}}stopEditingAndFocus(e=!1,t=!1){this.beans.editService?.stopEditingAndFocus(this,e,t)}flashCell(e){let t=e?.flashDuration??e?.flashDelay,i=e?.fadeDuration??e?.fadeDelay;this.animateCell("data-changed",t,i)}animateCell(e,t,i){if(!this.cellComp)return;let{gos:r}=this.beans;if(t||(t=r.get("cellFlashDuration")),0===t)return;tY(i)||(i=r.get("cellFadeDuration"));let s=`ag-cell-${e}`,a=`ag-cell-${e}-animation`;this.cellComp.addOrRemoveCssClass(s,!0),this.cellComp.addOrRemoveCssClass(a,!1),this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{this.isAlive()&&(this.cellComp.addOrRemoveCssClass(s,!1),this.cellComp.addOrRemoveCssClass(a,!0),this.eGui.style.transition=`background-color ${i}ms`,window.setTimeout(()=>{this.isAlive()&&(this.cellComp.addOrRemoveCssClass(a,!1),this.eGui.style.transition="")},i))},t)})}onFlashCells(e){if(!this.cellComp)return;let t=this.beans.cellPositionUtils.createId(this.getCellPosition());e.cells[t]&&this.animateCell("highlight")}isCellEditable(){return this.column.isCellEditable(this.rowNode)}isSuppressFillHandle(){return this.column.isSuppressFillHandle()}formatValue(e){return this.callValueFormatter(e)??e}callValueFormatter(e){return this.beans.valueService.formatValue(this.column,this.rowNode,e)}updateAndFormatValue(e){let t=this.value,i=this.valueFormatted;return this.value=this.beans.valueService.getValueForDisplay(this.column,this.rowNode),this.valueFormatted=this.callValueFormatter(this.value),!e||!this.valuesAreEqual(t,this.value)||this.valueFormatted!=i}valuesAreEqual(e,t){let i=this.column.getColDef();return i.equals?i.equals(e,t):e===t}getComp(){return this.cellComp}getValue(){return this.value}addDomData(t){let i=this.getGui();is(this.beans.gos,i,e.DOM_DATA_KEY_CELL_CTRL,this),t.addDestroyFunc(()=>is(this.beans.gos,i,e.DOM_DATA_KEY_CELL_CTRL,null))}createEvent(e,t){return this.beans.gos.addGridCommonParams({type:t,node:this.rowNode,data:this.rowNode.data,value:this.value,column:this.column,colDef:this.column.getColDef(),rowPinned:this.rowNode.rowPinned,event:e,rowIndex:this.rowNode.rowIndex})}processCharacter(e){this.cellKeyboardListenerFeature?.processCharacter(e)}onKeyDown(e){this.cellKeyboardListenerFeature?.onKeyDown(e)}onMouseEvent(e,t){this.cellMouseListenerFeature?.onMouseEvent(e,t)}getGui(){return this.eGui}getColSpanningList(){return this.cellPositionFeature.getColSpanningList()}onLeftChanged(){this.cellComp&&this.cellPositionFeature?.onLeftChanged()}onDisplayedColumnsChanged(){this.eGui&&(this.refreshAriaColIndex(),this.refreshFirstAndLastStyles())}refreshFirstAndLastStyles(){let{cellComp:e,column:t,beans:i}=this;oZ(e,t,i.visibleColsService)}refreshAriaColIndex(){let e=this.beans.visibleColsService.getAriaColIndex(this.column);st(this.getGui(),e)}isSuppressNavigable(){return this.column.isSuppressNavigable(this.rowNode)}onWidthChanged(){return this.cellPositionFeature?.onWidthChanged()}getColumn(){return this.column}getRowNode(){return this.rowNode}isPrintLayout(){return this.printLayout}getCellPosition(){return this.cellPosition}isEditing(){return this.editing}startRowOrCellEdit(e,t=null){return this.cellComp?"fullRow"===this.beans.gos.get("editType")?this.rowCtrl.startRowEditing(e,this):this.startEditing(e,!0,t):(this.onCellCompAttachedFuncs.push(()=>{this.startRowOrCellEdit(e,t)}),!0)}getRowCtrl(){return this.rowCtrl}getRowPosition(){return{rowIndex:this.cellPosition.rowIndex,rowPinned:this.cellPosition.rowPinned}}updateRangeBordersIfRangeCount(){this.cellComp&&this.cellRangeFeature&&this.cellRangeFeature.updateRangeBordersIfRangeCount()}onCellSelectionChanged(){this.cellComp&&this.cellRangeFeature&&this.cellRangeFeature.onCellSelectionChanged()}isRangeSelectionEnabled(){return null!=this.cellRangeFeature}focusCell(e=!1){this.beans.focusService.setFocusedCell({rowIndex:this.getCellPosition().rowIndex,column:this.column,rowPinned:this.rowNode.rowPinned,forceBrowserFocus:e})}onRowIndexChanged(){this.createCellPosition(),this.onCellFocused(),this.cellRangeFeature&&this.cellRangeFeature.onCellSelectionChanged()}onSuppressCellFocusChanged(e){this.eGui&&sW(this.eGui,"tabindex",e?void 0:-1)}onFirstRightPinnedChanged(){if(!this.cellComp)return;let e=this.column.isFirstRightPinned();this.cellComp.addOrRemoveCssClass("ag-cell-first-right-pinned",e)}onLastLeftPinnedChanged(){if(!this.cellComp)return;let e=this.column.isLastLeftPinned();this.cellComp.addOrRemoveCssClass("ag-cell-last-left-pinned",e)}onCellFocused(e){if(this.beans.focusService.isCellFocusSuppressed())return;let t=this.beans.focusService.isCellFocused(this.cellPosition);if(!this.cellComp){t&&e?.forceBrowserFocus&&(this.focusEventToRestore=e);return}if(this.focusEventToRestore=void 0,this.cellComp.addOrRemoveCssClass("ag-cell-focus",t),t&&e&&e.forceBrowserFocus){let t=this.cellComp.getFocusableElement();if(this.editing){let e=this.beans.focusService.findFocusableElements(t,null,!0);e.length&&(t=e[0])}t.focus({preventScroll:!!e.preventScrollOnBrowserFocus})}let i="fullRow"===this.beans.gos.get("editType");t||i||!this.editing||this.stopRowOrCellEdit(),t&&this.rowCtrl.announceDescription()}createCellPosition(){this.cellPosition={rowIndex:this.rowNode.rowIndex,rowPinned:t$(this.rowNode.rowPinned),column:this.column}}applyStaticCssClasses(){this.cellComp.addOrRemoveCssClass("ag-cell",!0),this.cellComp.addOrRemoveCssClass("ag-cell-not-inline-editing",!0);let e=!0==this.column.isAutoHeight();this.cellComp.addOrRemoveCssClass("ag-cell-auto-height",e),this.cellComp.addOrRemoveCssClass("ag-cell-normal-height",!e)}onColumnHover(){if(!this.cellComp||!this.beans.gos.get("columnHoverHighlight"))return;let e=this.beans.columnHoverService.isHovered(this.column);this.cellComp.addOrRemoveCssClass("ag-column-hover",e)}onColDefChanged(){this.cellComp&&(this.column.isTooltipEnabled()?(this.disableTooltipFeature(),this.enableTooltipFeature()):this.disableTooltipFeature(),this.setWrapText(),this.editing?this.beans.editService?.handleColDefChanged(this):this.refreshOrDestroyCell({forceRefresh:!0,suppressFlash:!0}))}setWrapText(){let e=!0==this.column.getColDef().wrapText;this.cellComp.addOrRemoveCssClass("ag-cell-wrap-text",e)}dispatchCellContextMenuEvent(e){let t=this.column.getColDef(),i=this.createEvent(e,"cellContextMenu");this.beans.eventService.dispatchEvent(i),t.onCellContextMenu&&window.setTimeout(()=>{this.beans.frameworkOverrides.wrapOutgoing(()=>{t.onCellContextMenu(i)})},0)}getCellRenderer(){return this.cellComp?this.cellComp.getCellRenderer():null}getCellEditor(){return this.cellComp?this.cellComp.getCellEditor():null}destroy(){this.onCellCompAttachedFuncs=[],this.onCellEditorAttachedFuncs=[],super.destroy()}createSelectionCheckbox(){let e=new nX;return this.beans.context.createBean(e),e.init({rowNode:this.rowNode,column:this.column}),e}createDndSource(){let e=new nQ(this.rowNode,this.column,this.eGui);return this.beans.context.createBean(e),e}registerRowDragger(e,t,i){if(this.customRowDragComp){this.customRowDragComp.setDragElement(e,t);return}let r=this.createRowDragComp(e,t,i);r&&(this.customRowDragComp=r,this.addDestroyFunc(()=>{this.beans.context.destroyBean(r),this.customRowDragComp=null}))}createRowDragComp(e,t,i){let r=this.beans.gos.get("pagination"),s=this.beans.gos.get("rowDragManaged"),a=t4(this.beans.gos);if(s){if(!a){tO("managed row dragging is only allowed in the Client Side Row Model");return}if(r){tO("managed row dragging is not possible when doing pagination");return}}let o=new a3(()=>this.value,this.rowNode,this.column,e,t,i);return this.beans.context.createBean(o),o}setSuppressRefreshCell(e){this.suppressRefreshCell=e}getEditCompDetails(){return this.editCompDetails}onCellEditorAttached(e){this.onCellEditorAttachedFuncs.push(e)}cellEditorAttached(){this.onCellEditorAttachedFuncs.forEach(e=>e()),this.onCellEditorAttachedFuncs=[]}};n7.DOM_DATA_KEY_CELL_CTRL="cellCtrl";var n9=0,le=class e extends i2{constructor(e,t,i,r,s){super(),this.allRowGuis=[],this.active=!0,this.centerCellCtrls={list:[],map:{}},this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}},this.slideInAnimation={left:!1,center:!1,right:!1,fullWidth:!1},this.fadeInAnimation={left:!1,center:!1,right:!1,fullWidth:!1},this.rowDragComps=[],this.lastMouseDownOnDragger=!1,this.emptyStyle={},this.updateColumnListsPending=!1,this.rowId=null,this.businessKeySanitised=null,this.beans=t,this.gos=t.gos,this.rowNode=e,this.paginationPage=t.paginationService?.getCurrentPage()??0,this.useAnimationFrameForCreate=r,this.printLayout=s,this.suppressRowTransform=this.gos.get("suppressRowTransform"),this.instanceId=e.id+"-"+n9++,this.rowId=rL(e.id),this.initRowBusinessKey(),this.rowFocused=t.focusService.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned),this.rowLevel=t.rowCssClassCalculator.calculateRowLevel(this.rowNode),this.setRowType(),this.setAnimateFlags(i),this.rowStyles=this.processStylesFromGridOptions(),this.addListeners()}initRowBusinessKey(){this.businessKeyForNodeFunc=this.gos.get("getBusinessKeyForNode"),this.updateRowBusinessKey()}updateRowBusinessKey(){if("function"!=typeof this.businessKeyForNodeFunc)return;let e=this.businessKeyForNodeFunc(this.rowNode);this.businessKeySanitised=rL(e)}getRowId(){return this.rowId}getRowStyles(){return this.rowStyles}isSticky(){return this.rowNode.sticky}updateGui(e,t){"left"===e?this.leftGui=t:"right"===e?this.rightGui=t:"fullWidth"===e?this.fullWidthGui=t:this.centerGui=t}setComp(e,t,i,r){let s={rowComp:e,element:t,containerType:i,compBean:r=rY(this,this.beans.context,r)};this.allRowGuis.push(s),this.updateGui(i,s),this.initialiseRowComp(s),"FullWidthLoading"===this.rowType||this.rowNode.rowPinned||this.beans.rowRenderer.dispatchFirstDataRenderedEvent()}unsetComp(e){this.allRowGuis=this.allRowGuis.filter(t=>t.containerType!==e),this.updateGui(e,void 0)}isCacheable(){return"FullWidthDetail"===this.rowType&&this.gos.get("keepDetailRows")}setCached(e){let t=e?"none":"";this.allRowGuis.forEach(e=>e.element.style.display=t)}initialiseRowComp(t){let i=this.gos;this.onSuppressCellFocusChanged(this.beans.gos.get("suppressCellFocus")),this.listenOnDomOrder(t),this.beans.columnModel.wasAutoRowHeightEverActive()&&this.rowNode.checkAutoHeights(),this.onRowHeightChanged(t),this.updateRowIndexes(t),this.setFocusedClasses(t),this.setStylesFromGridOptions(!1,t),t8(i)&&this.rowNode.selectable&&this.onRowSelected(t),this.updateColumnLists(!this.useAnimationFrameForCreate);let r=t.rowComp;this.getInitialRowClasses(t.containerType).forEach(e=>r.addOrRemoveCssClass(e,!0)),this.executeSlideAndFadeAnimations(t),this.rowNode.group&&r5(t.element,!0==this.rowNode.expanded),this.setRowCompRowId(r),this.setRowCompRowBusinessKey(r),is(i,t.element,e.DOM_DATA_KEY_ROW_CTRL,this),t.compBean.addDestroyFunc(()=>is(i,t.element,e.DOM_DATA_KEY_ROW_CTRL,null)),this.useAnimationFrameForCreate?this.beans.animationFrameService.createTask(this.addHoverFunctionality.bind(this,t),this.rowNode.rowIndex,"createTasksP2"):this.addHoverFunctionality(t),this.isFullWidth()&&this.setupFullWidth(t),i.get("rowDragEntireRow")&&this.addRowDraggerToRow(t),this.useAnimationFrameForCreate&&this.beans.animationFrameService.addDestroyTask(()=>{this.isAlive()&&t.rowComp.addOrRemoveCssClass("ag-after-created",!0)}),this.executeProcessRowPostCreateFunc()}setRowCompRowBusinessKey(e){null!=this.businessKeySanitised&&e.setRowBusinessKey(this.businessKeySanitised)}getBusinessKey(){return this.businessKeySanitised}setRowCompRowId(e){this.rowId=rL(this.rowNode.id),null!=this.rowId&&e.setRowId(this.rowId)}executeSlideAndFadeAnimations(e){let{containerType:t}=e;this.slideInAnimation[t]&&(tV(()=>{this.onTopChanged()}),this.slideInAnimation[t]=!1),this.fadeInAnimation[t]&&(tV(()=>{e.rowComp.addOrRemoveCssClass("ag-opacity-zero",!1)}),this.fadeInAnimation[t]=!1)}addRowDraggerToRow(e){if(iE(this.gos)){tO("Setting `rowDragEntireRow: true` in the gridOptions doesn't work with `selection.mode = 'cell'`");return}let t=this.beans.localeService.getLocaleTextFunc(),i=new a3(()=>`1 ${t("rowDragRow","row")}`,this.rowNode,void 0,e.element,void 0,!0),r=this.createBean(i,this.beans.context);this.rowDragComps.push(r),e.compBean.addDestroyFunc(()=>{this.rowDragComps=this.rowDragComps.filter(e=>e!==r),this.destroyBean(r,this.beans.context)})}setupFullWidth(e){let t=this.getPinnedForContainer(e.containerType);if("FullWidthDetail"==this.rowType&&!this.gos.assertModuleRegistered("@ag-grid-enterprise/master-detail","cell renderer 'agDetailCellRenderer' (for master detail)"))return;let i=this.createFullWidthCompDetails(e.element,t);e.rowComp.showFullWidth(i)}isPrintLayout(){return this.printLayout}getFullWidthCellRenderers(){return this.gos.get("embedFullWidthRows")?this.allRowGuis.map(e=>e?.rowComp?.getFullWidthCellRenderer()):[this.fullWidthGui?.rowComp?.getFullWidthCellRenderer()]}getCellElement(e){let t=this.getCellCtrl(e);return t?t.getGui():null}executeProcessRowPostCreateFunc(){let e=this.gos.getCallback("processRowPostCreate");e&&this.areAllContainersReady()&&e({eRow:this.centerGui.element,ePinnedLeftRow:this.leftGui?this.leftGui.element:void 0,ePinnedRightRow:this.rightGui?this.rightGui.element:void 0,node:this.rowNode,rowIndex:this.rowNode.rowIndex,addRenderedRowListener:this.addEventListener.bind(this)})}areAllContainersReady(){let e=!!this.leftGui||!this.beans.visibleColsService.isPinningLeft(),t=!!this.centerGui,i=!!this.rightGui||!this.beans.visibleColsService.isPinningRight();return e&&t&&i}isNodeFullWidthCell(){if(this.rowNode.detail)return!0;let e=this.beans.gos.getCallback("isFullWidthRow");return!!e&&e({rowNode:this.rowNode})}setRowType(){let e=this.rowNode.stub&&!this.gos.get("suppressServerSideFullWidthLoadingRow")&&!this.gos.get("groupHideOpenParents"),t=this.isNodeFullWidthCell(),i=this.gos.get("masterDetail")&&this.rowNode.detail,r=this.beans.columnModel.isPivotMode(),s=!!this.rowNode.group&&!this.rowNode.footer&&iC(this.gos,r);e?this.rowType="FullWidthLoading":i?this.rowType="FullWidthDetail":t?this.rowType="FullWidth":s?this.rowType="FullWidthGroup":this.rowType="Normal"}updateColumnLists(e=!1,t=!1){if(!this.isFullWidth()){if(e||this.gos.get("suppressAnimationFrame")||this.printLayout){this.updateColumnListsImpl(t);return}this.updateColumnListsPending||(this.beans.animationFrameService.createTask(()=>{this.active&&this.updateColumnListsImpl(!0)},this.rowNode.rowIndex,"createTasksP1"),this.updateColumnListsPending=!0)}}createCellCtrls(e,t,i=null){let r={list:[],map:{}},s=(e,t)=>{r.list.push(t),r.map[e]=t};return t.forEach(t=>{let i=t.getInstanceId(),r=e.map[i];r||(r=new n7(t,this.rowNode,this.beans,this)),s(i,r)}),e.list.forEach(e=>{let t=e.getColumn().getInstanceId();if(null==r.map[t]){if(!this.isCellEligibleToBeRemoved(e,i)){s(t,e);return}e.destroy()}}),r}updateColumnListsImpl(e){this.updateColumnListsPending=!1,this.createAllCellCtrls(),this.setCellCtrls(e)}setCellCtrls(e){this.allRowGuis.forEach(t=>{let i=this.getCellCtrlsForContainer(t.containerType);t.rowComp.setCellCtrls(i,e)})}getCellCtrlsForContainer(e){switch(e){case"left":return this.leftCellCtrls.list;case"right":return this.rightCellCtrls.list;case"fullWidth":return[];case"center":return this.centerCellCtrls.list}}createAllCellCtrls(){let e=this.beans.columnViewportService,t=this.beans.visibleColsService;if(this.printLayout)this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,t.getAllCols()),this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}};else{let i=e.getColsWithinViewport(this.rowNode);this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,i);let r=t.getLeftColsForRow(this.rowNode);this.leftCellCtrls=this.createCellCtrls(this.leftCellCtrls,r,"left");let s=t.getRightColsForRow(this.rowNode);this.rightCellCtrls=this.createCellCtrls(this.rightCellCtrls,s,"right")}}isCellEligibleToBeRemoved(e,t){if(e.getColumn().getPinned()!=t)return!0;let i=e.isEditing(),r=this.beans.focusService.isCellFocused(e.getCellPosition());if(i||r){let t=e.getColumn();return!(this.beans.visibleColsService.getAllCols().indexOf(t)>=0)}return!0}getDomOrder(){return this.gos.get("ensureDomOrder")||t5(this.gos,"print")}listenOnDomOrder(e){e.compBean.addManagedPropertyListeners(["domLayout","ensureDomOrder"],()=>{e.rowComp.setDomOrder(this.getDomOrder())})}setAnimateFlags(e){if(this.isSticky()||!e)return;let t=tY(this.rowNode.oldRowTop),i=this.beans.visibleColsService.isPinningLeft(),r=this.beans.visibleColsService.isPinningRight();if(t){if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows")){this.slideInAnimation.fullWidth=!0;return}this.slideInAnimation.center=!0,this.slideInAnimation.left=i,this.slideInAnimation.right=r}else{if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows")){this.fadeInAnimation.fullWidth=!0;return}this.fadeInAnimation.center=!0,this.fadeInAnimation.left=i,this.fadeInAnimation.right=r}}isEditing(){return this.editingRow}isFullWidth(){return"Normal"!==this.rowType}refreshFullWidth(){let e=(e,t)=>!e||e.rowComp.refreshFullWidth(()=>this.createFullWidthCompDetails(e.element,t).params),t=e(this.fullWidthGui,null),i=e(this.centerGui,null),r=e(this.leftGui,"left"),s=e(this.rightGui,"right");return t&&i&&r&&s}addListeners(){this.addManagedListeners(this.rowNode,{heightChanged:()=>this.onRowHeightChanged(),rowSelected:()=>this.onRowSelected(),rowIndexChanged:this.onRowIndexChanged.bind(this),topChanged:this.onTopChanged.bind(this),expandedChanged:this.updateExpandedCss.bind(this),hasChildrenChanged:this.updateExpandedCss.bind(this)}),this.rowNode.detail&&this.addManagedListeners(this.rowNode.parent,{dataChanged:this.onRowNodeDataChanged.bind(this)}),this.addManagedListeners(this.rowNode,{dataChanged:this.onRowNodeDataChanged.bind(this),cellChanged:this.postProcessCss.bind(this),rowHighlightChanged:this.onRowNodeHighlightChanged.bind(this),draggingChanged:this.postProcessRowDragging.bind(this),uiLevelChanged:this.onUiLevelChanged.bind(this)}),this.addManagedListeners(this.beans.eventService,{paginationPixelOffsetChanged:this.onPaginationPixelOffsetChanged.bind(this),heightScaleChanged:this.onTopChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),virtualColumnsChanged:this.onVirtualColumnsChanged.bind(this),cellFocused:this.onCellFocusChanged.bind(this),cellFocusCleared:this.onCellFocusChanged.bind(this),paginationChanged:this.onPaginationChanged.bind(this),modelUpdated:this.refreshFirstAndLastRowStyles.bind(this),columnMoved:()=>this.updateColumnLists()}),this.addDestroyFunc(()=>{this.rowDragComps=this.destroyBeans(this.rowDragComps,this.beans.context),this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature,this.beans.context))}),this.addManagedPropertyListeners(["rowDragEntireRow"],()=>{if(this.gos.get("rowDragEntireRow")){this.allRowGuis.forEach(e=>{this.addRowDraggerToRow(e)});return}this.rowDragComps=this.destroyBeans(this.rowDragComps,this.beans.context)}),this.addListenersForCellComps()}addListenersForCellComps(){this.addManagedListeners(this.rowNode,{rowIndexChanged:()=>{this.getAllCellCtrls().forEach(e=>e.onRowIndexChanged())},cellChanged:e=>{this.getAllCellCtrls().forEach(t=>t.onCellChanged(e))}})}onRowNodeDataChanged(e){if(this.isFullWidth()!==!!this.isNodeFullWidthCell()){this.beans.rowRenderer.redrawRow(this.rowNode);return}if(this.isFullWidth()){this.refreshFullWidth()||this.beans.rowRenderer.redrawRow(this.rowNode);return}this.getAllCellCtrls().forEach(t=>t.refreshCell({suppressFlash:!e.update,newData:!e.update})),this.allRowGuis.forEach(e=>{this.setRowCompRowId(e.rowComp),this.updateRowBusinessKey(),this.setRowCompRowBusinessKey(e.rowComp)}),this.onRowSelected(),this.postProcessCss()}postProcessCss(){this.setStylesFromGridOptions(!0),this.postProcessClassesFromGridOptions(),this.postProcessRowClassRules(),this.postProcessRowDragging()}onRowNodeHighlightChanged(){let e=this.rowNode.highlighted;this.allRowGuis.forEach(t=>{t.rowComp.addOrRemoveCssClass("ag-row-highlight-above",0===e),t.rowComp.addOrRemoveCssClass("ag-row-highlight-below",1===e)})}postProcessRowDragging(){let e=this.rowNode.dragging;this.allRowGuis.forEach(t=>t.rowComp.addOrRemoveCssClass("ag-row-dragging",e))}updateExpandedCss(){let e=this.rowNode.isExpandable(),t=!0==this.rowNode.expanded;this.allRowGuis.forEach(i=>{i.rowComp.addOrRemoveCssClass("ag-row-group",e),i.rowComp.addOrRemoveCssClass("ag-row-group-expanded",e&&t),i.rowComp.addOrRemoveCssClass("ag-row-group-contracted",e&&!t),r5(i.element,e&&t)})}onDisplayedColumnsChanged(){this.updateColumnLists(!0),this.beans.columnModel.wasAutoRowHeightEverActive()&&this.rowNode.checkAutoHeights()}onVirtualColumnsChanged(){this.updateColumnLists(!1,!0)}getRowPosition(){return{rowPinned:t$(this.rowNode.rowPinned),rowIndex:this.rowNode.rowIndex}}findFullWidthRowGui(e){return this.allRowGuis.find(t=>t.element.contains(e))}onKeyboardNavigate(e){let t=this.findFullWidthRowGui(e.target);if((t?t.element:null)!==e.target)return;let i=this.rowNode,r=this.beans.focusService.getFocusedCell(),s={rowIndex:i.rowIndex,rowPinned:i.rowPinned,column:r?.column??this.getColumnForFullWidth(t)};this.beans.navigationService.navigateToNextCell(e,e.key,s,!0),e.preventDefault()}onTabKeyDown(e){if(e.defaultPrevented||iQ(e))return;let t=this.allRowGuis.find(t=>t.element.contains(e.target)),i=t?t.element:null,r=i===e.target,s=ih(this.gos),a=!1;i&&s&&(a=i.contains(s)&&s.classList.contains("ag-cell"));let o=null;r||a||(o=this.beans.focusService.findNextFocusableElement(i,!1,e.shiftKey)),(this.isFullWidth()&&r||!o)&&this.beans.navigationService.onTabKeyDown(this,e)}getFullWidthElement(){return this.fullWidthGui?this.fullWidthGui.element:null}getRowYPosition(){let e=this.allRowGuis.find(e=>sN(e.element))?.element;return e?e.getBoundingClientRect().top:0}onSuppressCellFocusChanged(e){let t=this.isFullWidth()&&e?void 0:-1;this.allRowGuis.forEach(e=>{sW(e.element,"tabindex",t)})}onFullWidthRowFocused(e){let t=this.rowNode,i=!!e&&this.isFullWidth()&&e.rowIndex===t.rowIndex&&e.rowPinned==t.rowPinned,r=this.fullWidthGui?this.fullWidthGui.element:this.centerGui?.element;r&&(r.classList.toggle("ag-full-width-focus",i),i&&e?.forceBrowserFocus&&r.focus({preventScroll:!0}))}recreateCell(e){this.centerCellCtrls=this.removeCellCtrl(this.centerCellCtrls,e),this.leftCellCtrls=this.removeCellCtrl(this.leftCellCtrls,e),this.rightCellCtrls=this.removeCellCtrl(this.rightCellCtrls,e),e.destroy(),this.updateColumnLists()}removeCellCtrl(e,t){let i={list:[],map:{}};return e.list.forEach(e=>{e!==t&&(i.list.push(e),i.map[e.getColumn().getInstanceId()]=e)}),i}onMouseEvent(e,t){switch(e){case"dblclick":this.onRowDblClick(t);break;case"click":this.onRowClick(t);break;case"touchstart":case"mousedown":this.onRowMouseDown(t)}}createRowEvent(e,t){return this.gos.addGridCommonParams({type:e,node:this.rowNode,data:this.rowNode.data,rowIndex:this.rowNode.rowIndex,rowPinned:this.rowNode.rowPinned,event:t})}createRowEventWithSource(e,t){let i=this.createRowEvent(e,t);return i.source=this,i}onRowDblClick(e){iQ(e)||this.beans.eventService.dispatchEvent(this.createRowEventWithSource("rowDoubleClicked",e))}getColumnForFullWidth(e){let{visibleColsService:t}=this.beans;switch(e?.containerType){case"center":return t.getCenterCols()[0];case"left":return t.getLeftCols()[0];case"right":return t.getRightCols()[0];default:return t.getAllCols()[0]}}onRowMouseDown(e){if(this.lastMouseDownOnDragger=sS(e.target,"ag-row-drag",3),!this.isFullWidth())return;let t=this.rowNode;this.beans.rangeService&&this.beans.rangeService.removeAllCellRanges();let i=this.findFullWidthRowGui(e.target),r=i?.element,s=e.target,a=!0;r&&r.contains(s)&&sy(s)&&(a=!1),this.beans.focusService.setFocusedCell({rowIndex:t.rowIndex,column:this.getColumnForFullWidth(i),rowPinned:t.rowPinned,forceBrowserFocus:a})}onRowClick(e){if(iQ(e)||this.lastMouseDownOnDragger)return;let{gos:t}=this;this.beans.eventService.dispatchEvent(this.createRowEventWithSource("rowClicked",e));let i=e.ctrlKey||e.metaKey,r=e.shiftKey,s=this.rowNode.isSelected();if(iF(t)&&this.rowNode.group||this.isRowSelectionBlocked()||!function(e){let t=ik(e);return!0===t||"enableSelection"===t}(t)&&!s||!iT(t)&&s)return;let a=function(e){let t=e.get("selection");return void 0!==t?"multiRow"===t.mode&&(t.enableMultiSelectWithClick??!1):e.get("rowMultiSelectWithClick")}(t),o=iT(t),n="rowClicked";s?a?this.rowNode.setSelectedParams({newValue:!1,event:e,source:n}):i?o&&this.rowNode.setSelectedParams({newValue:!1,event:e,source:n}):this.rowNode.setSelectedParams({newValue:!0,clearSelection:!r,rangeSelect:r,event:e,source:n}):this.rowNode.setSelectedParams({newValue:!0,clearSelection:!a&&!i,rangeSelect:r,event:e,source:n})}isRowSelectionBlocked(){return!this.rowNode.selectable||!!this.rowNode.rowPinned||!t8(this.gos)}setupDetailRowAutoHeight(e){if("FullWidthDetail"!==this.rowType||!this.gos.get("detailRowAutoHeight"))return;let t=()=>{let t=e.clientHeight;null!=t&&t>0&&window.setTimeout(()=>{this.rowNode.setRowHeight(t),(t4(this.gos)||t6(this.gos))&&this.beans.rowModel.onRowHeightChanged()},0)},i=this.beans.resizeObserverService.observeResize(e,t);this.addDestroyFunc(i),t()}createFullWidthCompDetails(e,t){let{gos:i,rowNode:r}=this,s=i.addGridCommonParams({fullWidth:!0,data:r.data,node:r,value:r.key,valueFormatted:r.key,eGridCell:e,eParentOfValue:e,pinned:t,addRenderedRowListener:this.addEventListener.bind(this),registerRowDragger:(e,t,i,r)=>this.addFullWidthRowDragging(e,t,i,r),setTooltip:(e,t)=>this.refreshRowTooltip(e,t)}),a=this.beans.userComponentFactory;switch(this.rowType){case"FullWidthDetail":return a.getFullWidthDetailCellRendererDetails(s);case"FullWidthGroup":return a.getFullWidthGroupCellRendererDetails(s);case"FullWidthLoading":return a.getFullWidthLoadingCellRendererDetails(s);default:return a.getFullWidthCellRendererDetails(s)}}refreshRowTooltip(e,t){this.fullWidthGui&&(this.tooltipFeature&&this.destroyBean(this.tooltipFeature,this.beans.context),this.tooltipFeature=this.createBean(new sq({getGui:()=>this.fullWidthGui.element,getTooltipValue:()=>e,getLocation:()=>"fullWidthRow",shouldDisplayTooltip:t},this.beans)))}addFullWidthRowDragging(e,t,i="",r){if(!this.isFullWidth())return;let s=new a3(()=>i,this.rowNode,void 0,e,t,r);this.createBean(s,this.beans.context),this.addDestroyFunc(()=>{this.destroyBean(s,this.beans.context)})}onUiLevelChanged(){let e=this.beans.rowCssClassCalculator.calculateRowLevel(this.rowNode);if(this.rowLevel!=e){let t="ag-row-level-"+e,i="ag-row-level-"+this.rowLevel;this.allRowGuis.forEach(e=>{e.rowComp.addOrRemoveCssClass(t,!0),e.rowComp.addOrRemoveCssClass(i,!1)})}this.rowLevel=e}isFirstRowOnPage(){return this.rowNode.rowIndex===this.beans.pageBoundsService.getFirstRow()}isLastRowOnPage(){return this.rowNode.rowIndex===this.beans.pageBoundsService.getLastRow()}refreshFirstAndLastRowStyles(){let e=this.isFirstRowOnPage(),t=this.isLastRowOnPage();this.firstRowOnPage!==e&&(this.firstRowOnPage=e,this.allRowGuis.forEach(t=>t.rowComp.addOrRemoveCssClass("ag-row-first",e))),this.lastRowOnPage!==t&&(this.lastRowOnPage=t,this.allRowGuis.forEach(e=>e.rowComp.addOrRemoveCssClass("ag-row-last",t)))}stopEditing(e=!1){this.stoppingRowEdit||this.beans.rowEditService?.stopEditing(this,e)}setInlineEditingCss(){let e=this.editingRow||this.getAllCellCtrls().some(e=>e.isEditing());this.allRowGuis.forEach(t=>{t.rowComp.addOrRemoveCssClass("ag-row-inline-editing",e),t.rowComp.addOrRemoveCssClass("ag-row-not-inline-editing",!e)})}setEditingRow(e){this.editingRow=e}startRowEditing(e=null,t=null,i=null){return!!this.editingRow||(this.beans.rowEditService?.startEditing(this,e,t,i)??!0)}getAllCellCtrls(){return 0===this.leftCellCtrls.list.length&&0===this.rightCellCtrls.list.length?this.centerCellCtrls.list:[...this.centerCellCtrls.list,...this.leftCellCtrls.list,...this.rightCellCtrls.list]}postProcessClassesFromGridOptions(){let e=this.beans.rowCssClassCalculator.processClassesFromGridOptions(this.rowNode);e&&e.length&&e.forEach(e=>{this.allRowGuis.forEach(t=>t.rowComp.addOrRemoveCssClass(e,!0))})}postProcessRowClassRules(){this.beans.rowCssClassCalculator.processRowClassRules(this.rowNode,e=>{this.allRowGuis.forEach(t=>t.rowComp.addOrRemoveCssClass(e,!0))},e=>{this.allRowGuis.forEach(t=>t.rowComp.addOrRemoveCssClass(e,!1))})}setStylesFromGridOptions(e,t){e&&(this.rowStyles=this.processStylesFromGridOptions()),this.forEachGui(t,e=>e.rowComp.setUserStyles(this.rowStyles))}getPinnedForContainer(e){return"left"===e||"right"===e?e:null}getInitialRowClasses(e){let t=this.getPinnedForContainer(e),i={rowNode:this.rowNode,rowFocused:this.rowFocused,fadeRowIn:this.fadeInAnimation[e],rowIsEven:this.rowNode.rowIndex%2==0,rowLevel:this.rowLevel,fullWidthRow:this.isFullWidth(),firstRowOnPage:this.isFirstRowOnPage(),lastRowOnPage:this.isLastRowOnPage(),printLayout:this.printLayout,expandable:this.rowNode.isExpandable(),pinned:t};return this.beans.rowCssClassCalculator.getInitialRowClasses(i)}processStylesFromGridOptions(){let e;let t=this.gos.get("rowStyle");if(t&&"function"==typeof t){tO("rowStyle should be an object of key/value styles, not be a function, use getRowStyle() instead");return}let i=this.gos.getCallback("getRowStyle");return(i&&(e=i({data:this.rowNode.data,node:this.rowNode,rowIndex:this.rowNode.rowIndex})),e||t)?Object.assign({},t,e):this.emptyStyle}onRowSelected(e){let t=!!this.rowNode.isSelected();this.forEachGui(e,e=>{e.rowComp.addOrRemoveCssClass("ag-row-selected",t),sr(e.element,t),e.element.contains(ih(this.gos))&&(e===this.centerGui||e===this.fullWidthGui)&&this.announceDescription()})}announceDescription(){if(this.isRowSelectionBlocked())return;let e=this.rowNode.isSelected();if(e&&!iT(this.gos))return;let t=this.beans.localeService.getLocaleTextFunc()(e?"ariaRowDeselect":"ariaRowSelect",`Press SPACE to ${e?"deselect":"select"} this row.`);this.beans.ariaAnnouncementService.announceValue(t,"rowSelection")}addHoverFunctionality(e){if(!this.active)return;let{element:t,compBean:i}=e,{rowNode:r,beans:s,gos:a}=this;i.addManagedListeners(t,{mouseenter:()=>r.onMouseEnter(),mouseleave:()=>r.onMouseLeave()}),i.addManagedListeners(r,{mouseEnter:()=>{s.dragService.isDragging()||a.get("suppressRowHoverHighlight")||(t.classList.add("ag-row-hover"),r.setHovered(!0))},mouseLeave:()=>{t.classList.remove("ag-row-hover"),r.setHovered(!1)}})}roundRowTopToBounds(e){let t=this.beans.ctrlsService.getGridBodyCtrl().getScrollFeature().getApproximateVScollPosition();return Math.min(Math.max(this.applyPaginationOffset(t.top,!0)-100,e),this.applyPaginationOffset(t.bottom,!0)+100)}getFrameworkOverrides(){return this.beans.frameworkOverrides}forEachGui(e,t){e?t(e):this.allRowGuis.forEach(t)}onRowHeightChanged(e){if(null==this.rowNode.rowHeight)return;let t=this.rowNode.rowHeight,i=this.beans.environment.getDefaultRowHeight(),r=t9(this.gos)?ie(this.gos,this.rowNode).height:void 0,s=r?`${Math.min(i,r)-2}px`:void 0;this.forEachGui(e,e=>{e.element.style.height=`${t}px`,s&&e.element.style.setProperty("--ag-line-height",s)})}addEventListener(e,t){super.addEventListener(e,t)}removeEventListener(e,t){super.removeEventListener(e,t)}destroyFirstPass(e=!1){if(this.active=!1,!e&&ic(this.gos)&&!this.isSticky()){if(null!=this.rowNode.rowTop){let e=this.roundRowTopToBounds(this.rowNode.rowTop);this.setRowTop(e)}else this.allRowGuis.forEach(e=>e.rowComp.addOrRemoveCssClass("ag-opacity-zero",!0))}this.rowNode.setHovered(!1);let t=this.createRowEvent("virtualRowRemoved");this.dispatchLocalEvent(t),this.beans.eventService.dispatchEvent(t),super.destroy()}destroySecondPass(){this.allRowGuis.length=0,this.stopEditing();let e=e=>(e.list.forEach(e=>e.destroy()),{list:[],map:{}});this.centerCellCtrls=e(this.centerCellCtrls),this.leftCellCtrls=e(this.leftCellCtrls),this.rightCellCtrls=e(this.rightCellCtrls)}setFocusedClasses(e){this.forEachGui(e,e=>{e.rowComp.addOrRemoveCssClass("ag-row-focus",this.rowFocused),e.rowComp.addOrRemoveCssClass("ag-row-no-focus",!this.rowFocused)})}onCellFocusChanged(){let e=this.beans.focusService.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned);e!==this.rowFocused&&(this.rowFocused=e,this.setFocusedClasses()),!e&&this.editingRow&&this.stopEditing(!1)}onPaginationChanged(){let e=this.beans.paginationService?.getCurrentPage()??0;this.paginationPage!==e&&(this.paginationPage=e,this.onTopChanged()),this.refreshFirstAndLastRowStyles()}onTopChanged(){this.setRowTop(this.rowNode.rowTop)}onPaginationPixelOffsetChanged(){this.onTopChanged()}applyPaginationOffset(e,t=!1){return this.rowNode.isRowPinned()||this.rowNode.sticky?e:e+this.beans.pageBoundsService.getPixelOffset()*(t?1:-1)}setRowTop(e){if(!this.printLayout&&tY(e)){let t=this.applyPaginationOffset(e),i=this.rowNode.isRowPinned()||this.rowNode.sticky?t:this.beans.rowContainerHeightService.getRealPixelPosition(t),r=`${i}px`;this.setRowTopStyle(r)}}getInitialRowTop(e){return this.suppressRowTransform?this.getInitialRowTopShared(e):void 0}getInitialTransform(e){return this.suppressRowTransform?void 0:`translateY(${this.getInitialRowTopShared(e)})`}getInitialRowTopShared(e){let t;if(this.printLayout)return"";let i=this.rowNode;if(this.isSticky())t=i.stickyRowTop;else{let r=this.slideInAnimation[e]?this.roundRowTopToBounds(i.oldRowTop):i.rowTop,s=this.applyPaginationOffset(r);t=i.isRowPinned()?s:this.beans.rowContainerHeightService.getRealPixelPosition(s)}return t+"px"}setRowTopStyle(e){this.allRowGuis.forEach(t=>this.suppressRowTransform?t.rowComp.setTop(e):t.rowComp.setTransform(`translateY(${e})`))}getRowNode(){return this.rowNode}getCellCtrl(e){let t=null;return this.getAllCellCtrls().forEach(i=>{i.getColumn()==e&&(t=i)}),null!=t||this.getAllCellCtrls().forEach(i=>{i.getColSpanningList().indexOf(e)>=0&&(t=i)}),t}onRowIndexChanged(){null!=this.rowNode.rowIndex&&(this.onCellFocusChanged(),this.updateRowIndexes(),this.postProcessCss())}getRowIndex(){return this.rowNode.getRowIndexString()}updateRowIndexes(e){let t=this.rowNode.getRowIndexString();if(null===t)return;let i=this.beans.headerNavigationService.getHeaderRowCount()+(this.beans.filterManager?.getHeaderRowCount()??0),r=this.rowNode.rowIndex%2==0,s=i+this.rowNode.rowIndex+1;this.forEachGui(e,e=>{e.rowComp.setRowIndex(t),e.rowComp.addOrRemoveCssClass("ag-row-even",r),e.rowComp.addOrRemoveCssClass("ag-row-odd",!r),se(e.element,s)})}setStoppingRowEdit(e){this.stoppingRowEdit=e}};le.DOM_DATA_KEY_ROW_CTRL="renderedRow";var lt=class extends i2{wireBeans(e){this.mouseEventService=e.mouseEventService,this.valueService=e.valueService,this.menuService=e.menuService,this.ctrlsService=e.ctrlsService,this.navigationService=e.navigationService,this.focusService=e.focusService,this.undoRedoService=e.undoRedoService,this.visibleColsService=e.visibleColsService,this.rowModel=e.rowModel,this.pinnedRowModel=e.pinnedRowModel,this.rangeService=e.rangeService,this.clipboardService=e.clipboardService}constructor(e){super(),this.element=e}postConstruct(){this.addKeyboardListeners(),this.addMouseListeners(),this.mockContextMenuForIPad()}addKeyboardListeners(){let e="keydown",t=this.processKeyboardEvent.bind(this,e);this.addManagedElementListeners(this.element,{[e]:t})}addMouseListeners(){["dblclick","contextmenu","mouseover","mouseout","click",iJ("touchstart")?"touchstart":"mousedown"].forEach(e=>{let t=this.processMouseEvent.bind(this,e);this.addManagedElementListeners(this.element,{[e]:t})})}processMouseEvent(e,t){if(!this.mouseEventService.isEventFromThisGrid(t)||iQ(t))return;let i=this.getRowForEvent(t),r=this.mouseEventService.getRenderedCellForEvent(t);"contextmenu"===e?this.handleContextMenuMouseEvent(t,void 0,i,r):(r&&r.onMouseEvent(e,t),i&&i.onMouseEvent(e,t))}mockContextMenuForIPad(){if(!sc())return;let e=new s6(this.element);this.addManagedListeners(e,{longTap:e=>{let t=this.getRowForEvent(e.touchEvent),i=this.mouseEventService.getRenderedCellForEvent(e.touchEvent);this.handleContextMenuMouseEvent(void 0,e.touchEvent,t,i)}}),this.addDestroyFunc(()=>e.destroy())}getRowForEvent(e){let t=e.target;for(;t;){let e=ir(this.gos,t,le.DOM_DATA_KEY_ROW_CTRL);if(e)return e;t=t.parentElement}return null}handleContextMenuMouseEvent(e,t,i,r){let s=i?i.getRowNode():null,a=r?r.getColumn():null,o=null;if(a){let i=e||t;r.dispatchCellContextMenuEvent(i??null),o=this.valueService.getValue(a,s)}let n=this.ctrlsService.getGridBodyCtrl(),l=r?r.getGui():n.getGridBodyElement();this.menuService.showContextMenu({mouseEvent:e,touchEvent:t,rowNode:s,column:a,value:o,anchorToElement:l})}getControlsForEventTarget(e){return{cellCtrl:i0(this.gos,e,n7.DOM_DATA_KEY_CELL_CTRL),rowCtrl:i0(this.gos,e,le.DOM_DATA_KEY_ROW_CTRL)}}processKeyboardEvent(e,t){let{cellCtrl:i,rowCtrl:r}=this.getControlsForEventTarget(t.target);!t.defaultPrevented&&(i?this.processCellKeyboardEvent(i,e,t):r&&r.isFullWidth()&&this.processFullWidthRowKeyboardEvent(r,e,t))}processCellKeyboardEvent(e,t,i){let r=e.getRowNode(),s=e.getColumn(),a=e.isEditing();!oC(this.gos,i,r,s,a)&&"keydown"===t&&(!a&&this.navigationService.handlePageScrollingKey(i)||e.onKeyDown(i),this.doGridOperations(i,e.isEditing()),oy(i)&&e.processCharacter(i)),"keydown"===t&&this.eventService.dispatchEvent(e.createEvent(i,"cellKeyDown"))}processFullWidthRowKeyboardEvent(e,t,i){let r=e.getRowNode(),s=this.focusService.getFocusedCell(),a=s&&s.column;if(!oC(this.gos,i,r,a,!1)){let r=i.key;if("keydown"===t)switch(r){case aa.PAGE_HOME:case aa.PAGE_END:case aa.PAGE_UP:case aa.PAGE_DOWN:this.navigationService.handlePageScrollingKey(i,!0);break;case aa.UP:case aa.DOWN:e.onKeyboardNavigate(i);break;case aa.TAB:e.onTabKeyDown(i)}}"keydown"===t&&this.eventService.dispatchEvent(e.createRowEvent("cellKeyDown",i))}doGridOperations(e,t){if(!e.ctrlKey&&!e.metaKey||t||!this.mouseEventService.isEventFromThisGrid(e))return;let i=function(e){let t;let{keyCode:i}=e;switch(i){case 65:t=aa.A;break;case 67:t=aa.C;break;case 86:t=aa.V;break;case 68:t=aa.D;break;case 90:t=aa.Z;break;case 89:t=aa.Y;break;default:t=e.code}return t}(e);return i===aa.A?this.onCtrlAndA(e):i===aa.C?this.onCtrlAndC(e):i===aa.D?this.onCtrlAndD(e):i===aa.V?this.onCtrlAndV(e):i===aa.X?this.onCtrlAndX(e):i===aa.Y?this.onCtrlAndY():i===aa.Z?this.onCtrlAndZ(e):void 0}onCtrlAndA(e){let{pinnedRowModel:t,rowModel:i,rangeService:r}=this;if(r&&i.isRowsToRender()){let e,s;let[a,o]=[t.isEmpty("top"),t.isEmpty("bottom")];o?(e=null,s=i.getRowCount()-1):(e="bottom",s=t.getPinnedBottomRowCount()-1);let n=this.visibleColsService.getAllCols();if(tZ(n))return;r.setCellRange({rowStartIndex:0,rowStartPinned:a?null:"top",rowEndIndex:s,rowEndPinned:e,columnStart:n[0],columnEnd:iB(n)})}e.preventDefault()}onCtrlAndC(e){if(!this.clipboardService||this.gos.get("enableCellTextSelection"))return;let{cellCtrl:t,rowCtrl:i}=this.getControlsForEventTarget(e.target);t?.isEditing()||i?.isEditing()||(e.preventDefault(),this.clipboardService.copyToClipboard())}onCtrlAndX(e){if(!this.clipboardService||this.gos.get("enableCellTextSelection")||this.gos.get("suppressCutToClipboard"))return;let{cellCtrl:t,rowCtrl:i}=this.getControlsForEventTarget(e.target);t?.isEditing()||i?.isEditing()||(e.preventDefault(),this.clipboardService.cutToClipboard(void 0,"ui"))}onCtrlAndV(e){let{cellCtrl:t,rowCtrl:i}=this.getControlsForEventTarget(e.target);t?.isEditing()||i?.isEditing()||!this.clipboardService||this.gos.get("suppressClipboardPaste")||this.clipboardService.pasteFromClipboard()}onCtrlAndD(e){this.clipboardService&&!this.gos.get("suppressClipboardPaste")&&this.clipboardService.copyRangeDown(),e.preventDefault()}onCtrlAndZ(e){this.gos.get("undoRedoCellEditing")&&this.undoRedoService&&(e.preventDefault(),e.shiftKey?this.undoRedoService.redo("ui"):this.undoRedoService.undo("ui"))}onCtrlAndY(){this.undoRedoService?.redo("ui")}},li=class extends i2{wireBeans(e){this.pinnedWidthService=e.pinnedWidthService}constructor(e){super(),this.element=e}postConstruct(){this.addManagedEventListeners({leftPinnedWidthChanged:this.onPinnedLeftWidthChanged.bind(this)})}onPinnedLeftWidthChanged(){let e=this.pinnedWidthService.getPinnedLeftWidth();sC(this.element,e>0),sV(this.element,e)}getWidth(){return this.pinnedWidthService.getPinnedLeftWidth()}},lr=class extends i2{wireBeans(e){this.pinnedWidthService=e.pinnedWidthService}constructor(e){super(),this.element=e}postConstruct(){this.addManagedEventListeners({rightPinnedWidthChanged:this.onPinnedRightWidthChanged.bind(this)})}onPinnedRightWidthChanged(){let e=this.pinnedWidthService.getPinnedRightWidth();sC(this.element,e>0),sV(this.element,e)}getWidth(){return this.pinnedWidthService.getPinnedRightWidth()}},ls=e=>e.getTopRowCtrls(),la=e=>e.getStickyTopRowCtrls(),lo=e=>e.getStickyBottomRowCtrls(),ln=e=>e.getBottomRowCtrls(),ll=e=>e.getCentreRowCtrls(),lh={center:{type:"center",container:"ag-center-cols-container",viewport:"ag-center-cols-viewport",getRowCtrls:ll},left:{type:"left",container:"ag-pinned-left-cols-container",pinnedType:"left",getRowCtrls:ll},right:{type:"right",container:"ag-pinned-right-cols-container",pinnedType:"right",getRowCtrls:ll},fullWidth:{type:"fullWidth",container:"ag-full-width-container",fullWidth:!0,getRowCtrls:ll},topCenter:{type:"center",container:"ag-floating-top-container",viewport:"ag-floating-top-viewport",getRowCtrls:ls},topLeft:{type:"left",container:"ag-pinned-left-floating-top",pinnedType:"left",getRowCtrls:ls},topRight:{type:"right",container:"ag-pinned-right-floating-top",pinnedType:"right",getRowCtrls:ls},topFullWidth:{type:"fullWidth",container:"ag-floating-top-full-width-container",fullWidth:!0,getRowCtrls:ls},stickyTopCenter:{type:"center",container:"ag-sticky-top-container",viewport:"ag-sticky-top-viewport",getRowCtrls:la},stickyTopLeft:{type:"left",container:"ag-pinned-left-sticky-top",pinnedType:"left",getRowCtrls:la},stickyTopRight:{type:"right",container:"ag-pinned-right-sticky-top",pinnedType:"right",getRowCtrls:la},stickyTopFullWidth:{type:"fullWidth",container:"ag-sticky-top-full-width-container",fullWidth:!0,getRowCtrls:la},stickyBottomCenter:{type:"center",container:"ag-sticky-bottom-container",viewport:"ag-sticky-bottom-viewport",getRowCtrls:lo},stickyBottomLeft:{type:"left",container:"ag-pinned-left-sticky-bottom",pinnedType:"left",getRowCtrls:lo},stickyBottomRight:{type:"right",container:"ag-pinned-right-sticky-bottom",pinnedType:"right",getRowCtrls:lo},stickyBottomFullWidth:{type:"fullWidth",container:"ag-sticky-bottom-full-width-container",fullWidth:!0,getRowCtrls:lo},bottomCenter:{type:"center",container:"ag-floating-bottom-container",viewport:"ag-floating-bottom-viewport",getRowCtrls:ln},bottomLeft:{type:"left",container:"ag-pinned-left-floating-bottom",pinnedType:"left",getRowCtrls:ln},bottomRight:{type:"right",container:"ag-pinned-right-floating-bottom",pinnedType:"right",getRowCtrls:ln},bottomFullWidth:{type:"fullWidth",container:"ag-floating-bottom-full-width-container",fullWidth:!0,getRowCtrls:ln}},ld=["center","left","right","fullWidth"],lc=["stickyTopCenter","stickyBottomCenter","center","topCenter","bottomCenter"],lu=["left","bottomLeft","topLeft","stickyTopLeft","stickyBottomLeft"],lp=["right","bottomRight","topRight","stickyTopRight","stickyBottomRight"],lg=["stickyTopCenter","stickyTopLeft","stickyTopRight"],lm=["stickyBottomCenter","stickyBottomLeft","stickyBottomRight"],lf=[...lg,"stickyTopFullWidth",...lm,"stickyBottomFullWidth"],lv=["topCenter","topLeft","topRight","bottomCenter","bottomLeft","bottomRight","center","left","right",...lg,...lm],ly=class extends i2{constructor(e){super(),this.visible=!0,this.EMPTY_CTRLS=[],this.name=e,this.options=lh[e]}wireBeans(e){this.dragService=e.dragService,this.ctrlsService=e.ctrlsService,this.columnViewportService=e.columnViewportService,this.resizeObserverService=e.resizeObserverService,this.rowRenderer=e.rowRenderer}postConstruct(){this.enableRtl=this.gos.get("enableRtl"),this.forContainers(["center"],()=>{this.viewportSizeFeature=this.createManagedBean(new nZ(this)),this.addManagedEventListeners({stickyTopOffsetChanged:this.onStickyTopOffsetChanged.bind(this)})})}onStickyTopOffsetChanged(e){this.comp.setOffsetTop(`${e.offset}px`)}registerWithCtrlsService(){this.options.fullWidth||this.ctrlsService.register(this.name,this)}forContainers(e,t){e.indexOf(this.name)>=0&&t()}getContainerElement(){return this.eContainer}getViewportSizeFeature(){return this.viewportSizeFeature}setComp(e,t,i){this.comp=e,this.eContainer=t,this.eViewport=i,this.createManagedBean(new lt(this.eContainer)),this.addPreventScrollWhileDragging(),this.listenOnDomOrder();let r=()=>this.onPinnedWidthChanged();this.forContainers(lu,()=>{this.pinnedWidthFeature=this.createManagedBean(new li(this.eContainer)),this.addManagedEventListeners({leftPinnedWidthChanged:r})}),this.forContainers(lp,()=>{this.pinnedWidthFeature=this.createManagedBean(new lr(this.eContainer)),this.addManagedEventListeners({rightPinnedWidthChanged:r})}),this.forContainers(ld,()=>this.createManagedBean(new nW(this.eContainer,"center"===this.name?i:void 0))),this.forContainers(lv,()=>this.createManagedBean(new nq(this.eContainer))),this.forContainers(lc,()=>this.createManagedBean(new nw(e=>this.comp.setContainerWidth(`${e}px`)))),this.visible=this.isContainerVisible(),this.addListeners(),this.registerWithCtrlsService()}onScrollCallback(e){this.addManagedElementListeners(this.getViewportElement(),{scroll:e})}addListeners(){this.addManagedEventListeners({displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),displayedColumnsWidthChanged:this.onDisplayedColumnsWidthChanged.bind(this),displayedRowsChanged:e=>this.onDisplayedRowsChanged(e.afterScroll)}),this.onDisplayedColumnsChanged(),this.onDisplayedColumnsWidthChanged(),this.onDisplayedRowsChanged()}listenOnDomOrder(){if(lf.indexOf(this.name)>=0){this.comp.setDomOrder(!0);return}let e=()=>{let e=this.gos.get("ensureDomOrder"),t=t5(this.gos,"print");this.comp.setDomOrder(e||t)};this.addManagedPropertyListener("domLayout",e),e()}onDisplayedColumnsChanged(){this.forContainers(["center"],()=>this.onHorizontalViewportChanged())}onDisplayedColumnsWidthChanged(){this.forContainers(["center"],()=>this.onHorizontalViewportChanged())}addPreventScrollWhileDragging(){let e=e=>{this.dragService.isDragging()&&e.cancelable&&e.preventDefault()};this.eContainer.addEventListener("touchmove",e,{passive:!1}),this.addDestroyFunc(()=>this.eContainer.removeEventListener("touchmove",e))}onHorizontalViewportChanged(e=!1){let t=this.getCenterWidth(),i=this.getCenterViewportScrollLeft();this.columnViewportService.setScrollPosition(t,i,e)}hasHorizontalScrollGap(){return this.eContainer.clientWidth-this.eViewport.clientWidth<0}hasVerticalScrollGap(){return this.eContainer.clientHeight-this.eViewport.clientHeight<0}getCenterWidth(){return sE(this.eViewport)}getCenterViewportScrollLeft(){return sA(this.eViewport,this.enableRtl)}registerViewportResizeListener(e){let t=this.resizeObserverService.observeResize(this.eViewport,e);this.addDestroyFunc(()=>t())}isViewportInTheDOMTree(){return sF(this.eViewport)}getViewportScrollLeft(){return sA(this.eViewport,this.enableRtl)}isHorizontalScrollShowing(){var e;return this.gos.get("alwaysShowHorizontalScroll")||(e=this.eViewport).clientWidth<e.scrollWidth}getViewportElement(){return this.eViewport}setHorizontalScroll(e){this.comp.setHorizontalScroll(e)}getHScrollPosition(){return{left:this.eViewport.scrollLeft,right:this.eViewport.scrollLeft+this.eViewport.offsetWidth}}setCenterViewportScrollLeft(e){sR(this.eViewport,e,this.enableRtl)}isContainerVisible(){return!(null!=this.options.pinnedType)||!!this.pinnedWidthFeature&&this.pinnedWidthFeature.getWidth()>0}onPinnedWidthChanged(){let e=this.isContainerVisible();this.visible!=e&&(this.visible=e,this.onDisplayedRowsChanged())}onDisplayedRowsChanged(e=!1){let t=this.options.getRowCtrls(this.rowRenderer);if(!this.visible||0===t.length){this.comp.setRowCtrls({rowCtrls:this.EMPTY_CTRLS});return}let i=t5(this.gos,"print"),r=this.gos.get("embedFullWidthRows")||i,s=t.filter(e=>{let t=e.isFullWidth();return this.options.fullWidth?!r&&t:r||!t});this.comp.setRowCtrls({rowCtrls:s,useFlushSync:e})}},lC="ag-force-vertical-scroll",lw=class extends i2{constructor(){super(...arguments),this.stickyTopHeight=0,this.stickyBottomHeight=0}wireBeans(e){this.animationFrameService=e.animationFrameService,this.rowContainerHeightService=e.rowContainerHeightService,this.ctrlsService=e.ctrlsService,this.columnModel=e.columnModel,this.columnSizeService=e.columnSizeService,this.scrollVisibleService=e.scrollVisibleService,this.menuService=e.menuService,this.headerNavigationService=e.headerNavigationService,this.dragAndDropService=e.dragAndDropService,this.pinnedRowModel=e.pinnedRowModel,this.rowRenderer=e.rowRenderer,this.popupService=e.popupService,this.mouseEventService=e.mouseEventService,this.rowModel=e.rowModel,this.filterManager=e.filterManager,this.environment=e.environment}getScrollFeature(){return this.bodyScrollFeature}getBodyViewportElement(){return this.eBodyViewport}setComp(e,t,i,r,s,a,o){this.comp=e,this.eGridBody=t,this.eBodyViewport=i,this.eTop=r,this.eBottom=s,this.eStickyTop=a,this.eStickyBottom=o,this.eCenterColsViewport=i.querySelector(`.${lh.center.viewport}`),this.eFullWidthContainer=i.querySelector(`.${lh.fullWidth.container}`),this.eStickyTopFullWidthContainer=a.querySelector(`.${lh.stickyTopFullWidth.container}`),this.eStickyBottomFullWidthContainer=o.querySelector(`.${lh.stickyBottomFullWidth.container}`),this.setCellTextSelection(this.gos.get("enableCellTextSelection")),this.addManagedPropertyListener("enableCellTextSelection",e=>this.setCellTextSelection(e.currentValue)),this.createManagedBean(new nV(this.comp)),this.bodyScrollFeature=this.createManagedBean(new nK(this.eBodyViewport)),this.addRowDragListener(),this.setupRowAnimationCssClass(),this.addEventListeners(),this.addFocusListeners([r,i,s,a,o]),this.onGridColumnsChanged(),this.addBodyViewportListener(),this.setFloatingHeights(),this.disableBrowserDragging(),this.addStopEditingWhenGridLosesFocus(),this.updateScrollingClasses(),this.filterManager?.setupAdvancedFilterHeaderComp(r),this.ctrlsService.register("gridBodyCtrl",this)}getComp(){return this.comp}addEventListeners(){let e=this.setFloatingHeights.bind(this);this.addManagedEventListeners({gridColumnsChanged:this.onGridColumnsChanged.bind(this),scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this),scrollGapChanged:this.onScrollGapChanged.bind(this),pinnedRowDataChanged:e,pinnedHeightChanged:e,headerHeightChanged:this.onHeaderHeightChanged.bind(this)})}addFocusListeners(e){e.forEach(e=>{this.addManagedElementListeners(e,{focusin:t=>{let{target:i}=t,r=sS(i,"ag-root",e);e.classList.toggle("ag-has-focus",!r)},focusout:t=>{let{target:i,relatedTarget:r}=t,s=e.contains(r),a=sS(r,"ag-root",e);sS(i,"ag-root",e)||s&&!a||e.classList.remove("ag-has-focus")}})})}setColumnMovingCss(e){this.comp.setColumnMovingCss("ag-column-moving",e)}setCellTextSelection(e=!1){this.comp.setCellSelectableCss("ag-selectable",e)}onScrollVisibilityChanged(){let e=this.scrollVisibleService.isVerticalScrollShowing();this.setVerticalScrollPaddingVisible(e),this.setStickyWidth(e),this.setStickyBottomOffsetBottom();let t=e&&this.scrollVisibleService.getScrollbarWidth()||0,i=sm()?16:0,r=`calc(100% + ${t+i}px)`;this.animationFrameService.requestAnimationFrame(()=>this.comp.setBodyViewportWidth(r)),this.updateScrollingClasses()}onScrollGapChanged(){this.updateScrollingClasses()}updateScrollingClasses(){this.eGridBody.classList.toggle("ag-body-vertical-content-no-gap",!this.scrollVisibleService.hasVerticalScrollGap()),this.eGridBody.classList.toggle("ag-body-horizontal-content-no-gap",!this.scrollVisibleService.hasHorizontalScrollGap())}onGridColumnsChanged(){let e=this.columnModel.getCols();this.comp.setColumnCount(e.length)}disableBrowserDragging(){this.addManagedElementListeners(this.eGridBody,{dragstart:e=>{if(e.target instanceof HTMLImageElement)return e.preventDefault(),!1}})}addStopEditingWhenGridLosesFocus(){if(!this.gos.get("stopEditingWhenCellsLoseFocus"))return;let e=e=>{let i=e.relatedTarget;if(null===sp(i)){this.rowRenderer.stopEditing();return}let r=t.some(e=>e.contains(i))&&this.mouseEventService.isElementInThisGrid(i);if(!r){let e=this.popupService;r=e.getActivePopups().some(e=>e.contains(i))||e.isElementWithinCustomPopup(i)}r||this.rowRenderer.stopEditing()},t=[this.eBodyViewport,this.eBottom,this.eTop,this.eStickyTop,this.eStickyBottom];t.forEach(t=>this.addManagedElementListeners(t,{focusout:e}))}updateRowCount(){let e=this.headerNavigationService.getHeaderRowCount()+(this.filterManager?.getHeaderRowCount()??0),t=this.rowModel.isLastRowIndexKnown()?this.rowModel.getRowCount():-1;this.comp.setRowCount(-1===t?-1:e+t)}registerBodyViewportResizeListener(e){this.comp.registerBodyViewportResizeListener(e)}setVerticalScrollPaddingVisible(e){this.comp.setPinnedTopBottomOverflowY(e?"scroll":"hidden")}isVerticalScrollShowing(){var e;let t=this.gos.get("alwaysShowVerticalScroll"),i=t5(this.gos,"normal");return this.comp.setAlwaysVerticalScrollClass(t?lC:null,t),t||i&&(e=this.eBodyViewport).clientHeight<e.scrollHeight}setupRowAnimationCssClass(){let e=this.environment.hasMeasuredSizes(),t=()=>{let t=e&&ic(this.gos)&&!this.rowContainerHeightService.isStretching();this.comp.setRowAnimationCssOnBodyViewport(t?"ag-row-animation":"ag-row-no-animation",t)};t(),this.addManagedEventListeners({heightScaleChanged:t}),this.addManagedPropertyListener("animateRows",t),this.addManagedEventListeners({gridStylesChanged:()=>{!e&&this.environment.hasMeasuredSizes()&&(e=!0,t())}})}getGridBodyElement(){return this.eGridBody}addBodyViewportListener(){let e=this.onBodyViewportContextMenu.bind(this);this.addManagedElementListeners(this.eBodyViewport,{contextmenu:e}),this.mockContextMenuForIPad(e),this.addManagedElementListeners(this.eBodyViewport,{wheel:this.onBodyViewportWheel.bind(this)}),this.addManagedElementListeners(this.eStickyTop,{wheel:this.onStickyWheel.bind(this)}),this.addManagedElementListeners(this.eStickyBottom,{wheel:this.onStickyWheel.bind(this)}),this.addFullWidthContainerWheelListener()}addFullWidthContainerWheelListener(){this.addManagedElementListeners(this.eFullWidthContainer,{wheel:e=>this.onFullWidthContainerWheel(e)})}onFullWidthContainerWheel(e){let{deltaX:t,deltaY:i,shiftKey:r}=e;(r||Math.abs(t)>Math.abs(i))&&this.mouseEventService.isEventFromThisGrid(e)&&this.scrollGridBodyToMatchEvent(e)}onStickyWheel(e){let{deltaX:t,deltaY:i,shiftKey:r}=e,s=r||Math.abs(t)>Math.abs(i),a=e.target;s?(this.eStickyTopFullWidthContainer.contains(a)||this.eStickyBottomFullWidthContainer.contains(a))&&this.scrollGridBodyToMatchEvent(e):(e.preventDefault(),this.scrollVertically(i))}scrollGridBodyToMatchEvent(e){let{deltaX:t,deltaY:i}=e;e.preventDefault(),this.eCenterColsViewport.scrollBy({left:t||i})}onBodyViewportContextMenu(e,t,i){if(!e&&!i)return;this.gos.get("preventDefaultOnContextMenu")&&(e||i).preventDefault();let{target:r}=e||t;(r===this.eBodyViewport||r===this.ctrlsService.get("center").getViewportElement())&&this.menuService.showContextMenu({mouseEvent:e,touchEvent:i,value:null,anchorToElement:this.eGridBody})}mockContextMenuForIPad(e){if(!sc())return;let t=new s6(this.eBodyViewport);this.addManagedListeners(t,{longTap:t=>{e(void 0,t.touchStart,t.touchEvent)}}),this.addDestroyFunc(()=>t.destroy())}onBodyViewportWheel(e){this.gos.get("suppressScrollWhenPopupsAreOpen")&&this.popupService.hasAnchoredPopup()&&e.preventDefault()}getGui(){return this.eGridBody}scrollVertically(e){let t=this.eBodyViewport.scrollTop;return this.bodyScrollFeature.setVerticalScrollPosition(t+e),this.eBodyViewport.scrollTop-t}addRowDragListener(){this.rowDragFeature=this.createManagedBean(new a1(this.eBodyViewport)),this.dragAndDropService.addDropTarget(this.rowDragFeature),this.addDestroyFunc(()=>this.dragAndDropService.removeDropTarget(this.rowDragFeature))}getRowDragFeature(){return this.rowDragFeature}setFloatingHeights(){let{pinnedRowModel:e}=this,t=e.getPinnedTopTotalHeight(),i=e.getPinnedBottomTotalHeight();this.comp.setTopHeight(t),this.comp.setBottomHeight(i),this.comp.setTopDisplay(t?"inherit":"none"),this.comp.setBottomDisplay(i?"inherit":"none"),this.setStickyTopOffsetTop(),this.setStickyBottomOffsetBottom()}setStickyTopHeight(e=0){this.comp.setStickyTopHeight(`${e}px`),this.stickyTopHeight=e}getStickyTopHeight(){return this.stickyTopHeight}setStickyBottomHeight(e=0){this.comp.setStickyBottomHeight(`${e}px`),this.stickyBottomHeight=e}getStickyBottomHeight(){return this.stickyBottomHeight}setStickyWidth(e){if(e){let e=this.scrollVisibleService.getScrollbarWidth();this.comp.setStickyTopWidth(`calc(100% - ${e}px)`),this.comp.setStickyBottomWidth(`calc(100% - ${e}px)`)}else this.comp.setStickyTopWidth("100%"),this.comp.setStickyBottomWidth("100%")}onHeaderHeightChanged(){this.setStickyTopOffsetTop()}setStickyTopOffsetTop(){let e=this.ctrlsService.get("gridHeaderCtrl").getHeaderHeight()+(this.filterManager?.getHeaderHeight()??0),t=this.pinnedRowModel.getPinnedTopTotalHeight(),i=0;e>0&&(i+=e),t>0&&(i+=t),i>0&&(i+=1),this.comp.setStickyTopTop(`${i}px`)}setStickyBottomOffsetBottom(){let e=this.pinnedRowModel.getPinnedBottomTotalHeight(),t=this.scrollVisibleService.isHorizontalScrollShowing()&&this.scrollVisibleService.getScrollbarWidth()||0;this.comp.setStickyBottomBottom(`${e+t}px`)}sizeColumnsToFit(e,t){let i=this.isVerticalScrollShowing()?this.scrollVisibleService.getScrollbarWidth():0,r=sE(this.eGridBody)-i;if(r>0){this.columnSizeService.sizeColumnsToFit(r,"sizeColumnsToFit",!1,e);return}void 0===t?window.setTimeout(()=>{this.sizeColumnsToFit(e,100)},0):100===t?window.setTimeout(()=>{this.sizeColumnsToFit(e,500)},100):500===t?window.setTimeout(()=>{this.sizeColumnsToFit(e,-1)},500):tO("tried to call sizeColumnsToFit() but the grid is coming back with zero width, maybe the grid is not visible yet on the screen?")}addScrollEventListener(e){this.eBodyViewport.addEventListener("scroll",e,{passive:!0})}removeScrollEventListener(e){this.eBodyViewport.removeEventListener("scroll",e)}},lb=class extends sQ{constructor(e,t,i,r,s){super(),this.rendererVersion=0,this.editorVersion=0,this.beans=e,this.column=t.getColumn(),this.rowNode=t.getRowNode(),this.rowCtrl=t.getRowCtrl(),this.eRow=r,this.cellCtrl=t;let a=document.createElement("div");a.setAttribute("comp-id",`${this.getCompId()}`),this.setTemplateFromElement(a);let o=this.getGui();this.forceWrapper=t.isForceWrapper(),this.refreshWrapper(!1),rQ(o,t.getCellAriaRole()),o.setAttribute("col-id",t.colIdSanitised),t.setComp({addOrRemoveCssClass:(e,t)=>this.addOrRemoveCssClass(e,t),setUserStyles:e=>sz(o,e),getFocusableElement:()=>this.getFocusableElement(),setIncludeSelection:e=>this.includeSelection=e,setIncludeRowDrag:e=>this.includeRowDrag=e,setIncludeDndSource:e=>this.includeDndSource=e,setRenderDetails:(e,t,i)=>this.setRenderDetails(e,t,i),setEditDetails:(e,t,i)=>this.setEditDetails(e,t,i),getCellEditor:()=>this.cellEditor||null,getCellRenderer:()=>this.cellRenderer||null,getParentOfValue:()=>this.getParentOfValue()},this.getGui(),this.eCellWrapper,i,s,void 0)}getParentOfValue(){return this.eCellValue?this.eCellValue:this.eCellWrapper?this.eCellWrapper:this.getGui()}setRenderDetails(e,t,i){if(this.cellEditor&&!this.cellEditorPopupWrapper)return;this.firstRender=null==this.firstRender;let r=this.refreshWrapper(!1);this.refreshEditStyles(!1),e?!(i||r)&&this.refreshCellRenderer(e)||(this.destroyRenderer(),this.createCellRendererInstance(e)):(this.destroyRenderer(),this.insertValueWithoutCellRenderer(t))}setEditDetails(e,t,i){e?this.createCellEditorInstance(e,t,i):this.destroyEditor()}removeControls(){this.checkboxSelectionComp=this.beans.context.destroyBean(this.checkboxSelectionComp),this.dndSourceComp=this.beans.context.destroyBean(this.dndSourceComp),this.rowDraggingComp=this.beans.context.destroyBean(this.rowDraggingComp)}refreshWrapper(e){let t=this.includeRowDrag||this.includeDndSource||this.includeSelection,i=t||this.forceWrapper,r=i&&null==this.eCellWrapper;if(r){let e=document.createElement("div");e.setAttribute("role","presentation"),e.setAttribute("class","ag-cell-wrapper"),this.eCellWrapper=e,this.getGui().appendChild(this.eCellWrapper)}let s=!i&&null!=this.eCellWrapper;s&&(sP(this.eCellWrapper),this.eCellWrapper=void 0),this.addOrRemoveCssClass("ag-cell-value",!i);let a=!e&&i,o=a&&null==this.eCellValue;if(o){let e=document.createElement("span");e.setAttribute("role","presentation"),e.setAttribute("class","ag-cell-value"),this.eCellValue=e,this.eCellWrapper.appendChild(this.eCellValue)}let n=!a&&null!=this.eCellValue;n&&(sP(this.eCellValue),this.eCellValue=void 0);let l=r||s||o||n;return l&&this.removeControls(),!e&&t&&this.addControls(),l}addControls(){this.includeRowDrag&&null==this.rowDraggingComp&&(this.rowDraggingComp=this.cellCtrl.createRowDragComp(),this.rowDraggingComp&&this.eCellWrapper.insertBefore(this.rowDraggingComp.getGui(),this.eCellValue)),this.includeDndSource&&null==this.dndSourceComp&&(this.dndSourceComp=this.cellCtrl.createDndSource(),this.eCellWrapper.insertBefore(this.dndSourceComp.getGui(),this.eCellValue)),this.includeSelection&&null==this.checkboxSelectionComp&&(this.checkboxSelectionComp=this.cellCtrl.createSelectionCheckbox(),this.eCellWrapper.insertBefore(this.checkboxSelectionComp.getGui(),this.eCellValue))}createCellEditorInstance(e,t,i){let r=this.editorVersion,s=e.newAgStackInstance();if(null==s)return;let{params:a}=e;s.then(e=>this.afterCellEditorCreated(r,e,a,t,i)),tK(this.cellEditor)&&a.cellStartedEdit&&this.cellCtrl.focusCell(!0)}insertValueWithoutCellRenderer(e){let t=this.getParentOfValue();sL(t);let i=null!=e?rL(e,!0):null;null!=i&&(t.textContent=i)}destroyEditorAndRenderer(){this.destroyRenderer(),this.destroyEditor()}destroyRenderer(){let{context:e}=this.beans;this.cellRenderer=e.destroyBean(this.cellRenderer),sP(this.cellRendererGui),this.cellRendererGui=null,this.rendererVersion++}destroyEditor(){let{context:e}=this.beans;this.hideEditorPopup&&this.hideEditorPopup(),this.hideEditorPopup=void 0,this.cellEditor=e.destroyBean(this.cellEditor),this.cellEditorPopupWrapper=e.destroyBean(this.cellEditorPopupWrapper),sP(this.cellEditorGui),this.cellEditorGui=null,this.editorVersion++}refreshCellRenderer(e){if(null==this.cellRenderer||null==this.cellRenderer.refresh||this.cellRendererClass!==e.componentClass)return!1;let t=this.cellRenderer.refresh(e.params);return!0===t||void 0===t}createCellRendererInstance(e){let t=this.beans.gos.get("suppressAnimationFrame"),i=this.rendererVersion,{componentClass:r}=e,s=()=>{if(this.rendererVersion!==i||!this.isAlive())return;let t=e.newAgStackInstance(),s=this.afterCellRendererCreated.bind(this,i,r);t&&t.then(s)};!t&&this.firstRender?this.beans.animationFrameService.createTask(s,this.rowNode.rowIndex,"createTasksP2"):s()}getCtrl(){return this.cellCtrl}getRowCtrl(){return this.rowCtrl}getCellRenderer(){return this.cellRenderer}getCellEditor(){return this.cellEditor}afterCellRendererCreated(e,t,i){if(!this.isAlive()||e!==this.rendererVersion){this.beans.context.destroyBean(i);return}if(this.cellRenderer=i,this.cellRendererClass=t,this.cellRendererGui=this.cellRenderer.getGui(),null!=this.cellRendererGui){let e=this.getParentOfValue();sL(e),e.appendChild(this.cellRendererGui)}}afterCellEditorCreated(e,t,i,r,s){if(e!==this.editorVersion){this.beans.context.destroyBean(t);return}if(t.isCancelBeforeStart&&t.isCancelBeforeStart()){this.beans.context.destroyBean(t),this.cellCtrl.stopEditing(!0);return}if(!t.getGui){tO(`cellEditor for column ${this.column.getId()} is missing getGui() method`),this.beans.context.destroyBean(t);return}this.cellEditor=t,this.cellEditorGui=t.getGui();let a=r||void 0!==t.isPopup&&t.isPopup();a?this.addPopupCellEditor(i,s):this.addInCellEditor(),this.refreshEditStyles(!0,a),t.afterGuiAttached&&t.afterGuiAttached(),this.cellCtrl.cellEditorAttached()}refreshEditStyles(e,t){this.addOrRemoveCssClass("ag-cell-inline-editing",e&&!t),this.addOrRemoveCssClass("ag-cell-popup-editing",e&&!!t),this.addOrRemoveCssClass("ag-cell-not-inline-editing",!e||!!t),this.rowCtrl?.setInlineEditingCss()}addInCellEditor(){let e=this.getGui();e.contains(ih(this.beans.gos))&&e.focus(),this.destroyRenderer(),this.refreshWrapper(!0),this.clearParentOfValue(),this.cellEditorGui&&this.getParentOfValue().appendChild(this.cellEditorGui)}addPopupCellEditor(e,t){"fullRow"===this.beans.gos.get("editType")&&tO("popup cellEditor does not work with fullRowEdit - you cannot use them both - either turn off fullRowEdit, or stop using popup editors.");let i=this.cellEditor;this.cellEditorPopupWrapper=this.beans.context.createBean(this.beans.editService.createPopupEditorWrapper(e));let r=this.cellEditorPopupWrapper.getGui();this.cellEditorGui&&r.appendChild(this.cellEditorGui);let s=this.beans.popupService,a=this.beans.gos.get("stopEditingWhenCellsLoseFocus"),o=null!=t?t:i.getPopupPosition?.()??"over",n=this.beans.gos.get("enableRtl"),l={ePopup:r,column:this.column,rowNode:this.rowNode,type:"popupCellEditor",eventSource:this.getGui(),position:o,alignSide:n?"right":"left",keepWithinBounds:!0},h=s.positionPopupByComponent.bind(s,l),d=this.beans.localeService.getLocaleTextFunc(),c=s.addPopup({modal:a,eChild:r,closeOnEsc:!0,closedCallback:()=>{this.cellCtrl.onPopupEditorClosed()},anchorToElement:this.getGui(),positionCallback:h,ariaLabel:d("ariaLabelCellEditor","Cell Editor")});c&&(this.hideEditorPopup=c.hideFunc)}detach(){this.eRow.removeChild(this.getGui())}destroy(){this.cellCtrl.stopEditing(),this.destroyEditorAndRenderer(),this.removeControls(),super.destroy()}clearParentOfValue(){let e=this.getGui();e.contains(ih(this.beans.gos))&&su()&&e.focus({preventScroll:!0}),sL(this.getParentOfValue())}},lS=class extends sQ{constructor(e,t,i){super(),this.cellComps={},this.beans=t,this.rowCtrl=e;let r=document.createElement("div");r.setAttribute("comp-id",`${this.getCompId()}`),r.setAttribute("style",this.getInitialStyle(i)),this.setTemplateFromElement(r);let s=this.getGui(),a=s.style;this.domOrder=this.rowCtrl.getDomOrder(),rQ(s,"row"),e.setComp({setDomOrder:e=>this.domOrder=e,setCellCtrls:e=>this.setCellCtrls(e),showFullWidth:e=>this.showFullWidth(e),getFullWidthCellRenderer:()=>this.fullWidthCellRenderer,addOrRemoveCssClass:(e,t)=>this.addOrRemoveCssClass(e,t),setUserStyles:e=>sz(s,e),setTop:e=>a.top=e,setTransform:e=>a.transform=e,setRowIndex:e=>s.setAttribute("row-index",e),setRowId:e=>s.setAttribute("row-id",e),setRowBusinessKey:e=>s.setAttribute("row-business-key",e),refreshFullWidth:e=>this.fullWidthCellRenderer?.refresh?.(e())??!1},this.getGui(),i,void 0),this.addDestroyFunc(()=>{e.unsetComp(i)})}getInitialStyle(e){let t=this.rowCtrl.getInitialTransform(e);return t?`transform: ${t}`:`top: ${this.rowCtrl.getInitialRowTop(e)}`}showFullWidth(e){let t=e.newAgStackInstance();null!=t&&t.then(e=>{if(this.isAlive()){let t=e.getGui();this.getGui().appendChild(t),this.rowCtrl.setupDetailRowAutoHeight(t),this.setFullWidthRowComp(e)}else this.beans.context.destroyBean(e)})}setCellCtrls(e){let t=Object.assign({},this.cellComps);e.forEach(e=>{let i=e.instanceId;null==this.cellComps[i]?this.newCellComp(e):t[i]=null});let i=rh(t).filter(e=>null!=e);this.destroyCells(i),this.ensureDomOrder(e)}ensureDomOrder(e){if(!this.domOrder)return;let t=[];e.forEach(e=>{let i=this.cellComps[e.instanceId];i&&t.push(i.getGui())}),sG(this.getGui(),t)}newCellComp(e){let t=new lb(this.beans,e,this.rowCtrl.isPrintLayout(),this.getGui(),this.rowCtrl.isEditing());this.cellComps[e.instanceId]=t,this.getGui().appendChild(t.getGui())}destroy(){super.destroy(),this.destroyAllCells()}destroyAllCells(){let e=rh(this.cellComps).filter(e=>null!=e);this.destroyCells(e)}setFullWidthRowComp(e){this.fullWidthCellRenderer&&tB("should not be setting fullWidthRowComponent twice"),this.fullWidthCellRenderer=e,this.addDestroyFunc(()=>{this.fullWidthCellRenderer=this.beans.context.destroyBean(this.fullWidthCellRenderer)})}destroyCells(e){e.forEach(e=>{if(!e)return;let t=e.getCtrl().instanceId;this.cellComps[t]===e&&(e.detach(),e.destroy(),this.cellComps[t]=null)})}},lx={selector:"AG-ROW-CONTAINER",component:class extends sQ{constructor(){var e;super(),this.eViewport=null,this.eContainer=null,this.rowComps={},this.name=sQ.elementGettingCreated.getAttribute("name"),this.options=lh[this.name],this.setTemplate("center"===(e=this.options).type?`<div class="${e.viewport}" data-ref="eViewport" role="presentation">
                <div class="${e.container}" data-ref="eContainer"></div>
            </div>`:`<div class="${e.container}" data-ref="eContainer"></div>`)}wireBeans(e){this.beans=e}postConstruct(){this.createManagedBean(new ly(this.name)).setComp({setHorizontalScroll:e=>this.eViewport.scrollLeft=e,setViewportHeight:e=>this.eViewport.style.height=e,setRowCtrls:({rowCtrls:e})=>this.setRowCtrls(e),setDomOrder:e=>{this.domOrder=e},setContainerWidth:e=>this.eContainer.style.width=e,setOffsetTop:e=>this.eContainer.style.transform=`translateY(${e})`},this.eContainer,this.eViewport)}destroy(){this.setRowCtrls([]),super.destroy()}setRowCtrls(e){let t={...this.rowComps};this.rowComps={},this.lastPlacedElement=null,e.forEach(e=>{let i=e.instanceId,r=t[i];if(r)this.rowComps[i]=r,delete t[i],this.ensureDomOrder(r.getGui());else{if(!e.getRowNode().displayed)return;let t=new lS(e,this.beans,this.options.type);this.rowComps[i]=t,this.appendRow(t.getGui())}}),rh(t).forEach(e=>{this.eContainer.removeChild(e.getGui()),e.destroy()}),rQ(this.eContainer,"rowgroup")}appendRow(e){if(this.domOrder){var t,i;t=this.eContainer,(i=this.lastPlacedElement)?i.insertAdjacentElement("afterend",e):t.firstChild?t.insertAdjacentElement("afterbegin",e):t.appendChild(e)}else this.eContainer.appendChild(e);this.lastPlacedElement=e}ensureDomOrder(e){this.domOrder&&(sB(this.eContainer,e,this.lastPlacedElement),this.lastPlacedElement=e)}}};function lM(e){return e.map(e=>`<ag-row-container name="${e}"></ag-row-container>`).join("")}var lE=`<div class="ag-root ag-unselectable" role="treegrid">
        <ag-header-root></ag-header-root>
        <div class="ag-floating-top" data-ref="eTop" role="presentation">
            ${lM(["topLeft","topCenter","topRight","topFullWidth"])}
        </div>
        <div class="ag-body" data-ref="eBody" role="presentation">
            <div class="ag-body-viewport" data-ref="eBodyViewport" role="presentation">
            ${lM(["left","center","right","fullWidth"])}
            </div>
            <ag-fake-vertical-scroll></ag-fake-vertical-scroll>
        </div>
        <div class="ag-sticky-top" data-ref="eStickyTop" role="presentation">
            ${lM(["stickyTopLeft","stickyTopCenter","stickyTopRight","stickyTopFullWidth"])}
        </div>
        <div class="ag-sticky-bottom" data-ref="eStickyBottom" role="presentation">
            ${lM(["stickyBottomLeft","stickyBottomCenter","stickyBottomRight","stickyBottomFullWidth"])}
        </div>
        <div class="ag-floating-bottom" data-ref="eBottom" role="presentation">
            ${lM(["bottomLeft","bottomCenter","bottomRight","bottomFullWidth"])}
        </div>
        <ag-fake-horizontal-scroll></ag-fake-horizontal-scroll>
        <ag-overlay-wrapper></ag-overlay-wrapper>
    </div>`,lD={selector:"AG-GRID-BODY",component:class extends sQ{constructor(){super(lE,[nj,nU,n$,nz,lx]),this.eBodyViewport=null,this.eStickyTop=null,this.eStickyBottom=null,this.eTop=null,this.eBottom=null,this.eBody=null}wireBeans(e){this.resizeObserverService=e.resizeObserverService,this.rangeService=e.rangeService}postConstruct(){let e=(e,t)=>{let i=`${e}px`;t.style.minHeight=i,t.style.height=i};this.ctrl=this.createManagedBean(new lw),this.ctrl.setComp({setRowAnimationCssOnBodyViewport:(e,t)=>this.setRowAnimationCssOnBodyViewport(e,t),setColumnCount:e=>{rq(this.getGui(),"colcount",e)},setRowCount:e=>{rq(this.getGui(),"rowcount",e)},setTopHeight:t=>e(t,this.eTop),setBottomHeight:t=>e(t,this.eBottom),setTopDisplay:e=>this.eTop.style.display=e,setBottomDisplay:e=>this.eBottom.style.display=e,setStickyTopHeight:e=>this.eStickyTop.style.height=e,setStickyTopTop:e=>this.eStickyTop.style.top=e,setStickyTopWidth:e=>this.eStickyTop.style.width=e,setStickyBottomHeight:e=>{this.eStickyBottom.style.height=e,this.eStickyBottom.classList.toggle("ag-hidden","0px"===e)},setStickyBottomBottom:e=>this.eStickyBottom.style.bottom=e,setStickyBottomWidth:e=>this.eStickyBottom.style.width=e,setColumnMovingCss:(e,t)=>this.addOrRemoveCssClass(e,t),updateLayoutClasses:(e,t)=>{[this.eBodyViewport.classList,this.eBody.classList].forEach(e=>{e.toggle("ag-layout-auto-height",t.autoHeight),e.toggle("ag-layout-normal",t.normal),e.toggle("ag-layout-print",t.print)}),this.addOrRemoveCssClass("ag-layout-auto-height",t.autoHeight),this.addOrRemoveCssClass("ag-layout-normal",t.normal),this.addOrRemoveCssClass("ag-layout-print",t.print)},setAlwaysVerticalScrollClass:(e,t)=>this.eBodyViewport.classList.toggle(lC,t),registerBodyViewportResizeListener:e=>{let t=this.resizeObserverService.observeResize(this.eBodyViewport,e);this.addDestroyFunc(()=>t())},setPinnedTopBottomOverflowY:e=>this.eTop.style.overflowY=this.eBottom.style.overflowY=e,setCellSelectableCss:(e,t)=>{[this.eTop,this.eBodyViewport,this.eBottom].forEach(i=>i.classList.toggle(e,t))},setBodyViewportWidth:e=>this.eBodyViewport.style.width=e},this.getGui(),this.eBodyViewport,this.eTop,this.eBottom,this.eStickyTop,this.eStickyBottom),(this.rangeService&&iE(this.gos)||iL(this.gos))&&rq(this.getGui(),"multiselectable",!0)}setRowAnimationCssOnBodyViewport(e,t){let i=this.eBodyViewport.classList;i.toggle("ag-row-animation",t),i.toggle("ag-row-no-animation",!t)}getFloatingTopBottom(){return[this.eTop,this.eBottom]}}},lI=class extends i2{constructor(){super(...arguments),this.beanName="scrollVisibleService"}wireBeans(e){this.ctrlsService=e.ctrlsService,this.columnAnimationService=e.columnAnimationService}postConstruct(){this.getScrollbarWidth(),this.addManagedEventListeners({displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),displayedColumnsWidthChanged:this.onDisplayedColumnsWidthChanged.bind(this)})}onDisplayedColumnsChanged(){this.updateScrollVisible()}onDisplayedColumnsWidthChanged(){this.updateScrollVisible()}onCentreViewportResized(){this.updateScrollGap()}updateScrollVisible(){this.columnAnimationService.isActive()?this.columnAnimationService.executeLaterVMTurn(()=>{this.columnAnimationService.executeLaterVMTurn(()=>this.updateScrollVisibleImpl())}):this.updateScrollVisibleImpl()}updateScrollVisibleImpl(){let e=this.ctrlsService.get("center");if(!e||this.columnAnimationService.isActive())return;let t={horizontalScrollShowing:e.isHorizontalScrollShowing(),verticalScrollShowing:this.isVerticalScrollShowing()};this.setScrollsVisible(t),this.updateScrollGap()}updateScrollGap(){let e=this.ctrlsService.get("center"),t=e.hasHorizontalScrollGap(),i=e.hasVerticalScrollGap();(this.horizontalScrollGap!==t||this.verticalScrollGap!==i)&&(this.horizontalScrollGap=t,this.verticalScrollGap=i,this.eventService.dispatchEvent({type:"scrollGapChanged"}))}setScrollsVisible(e){(this.horizontalScrollShowing!==e.horizontalScrollShowing||this.verticalScrollShowing!==e.verticalScrollShowing)&&(this.horizontalScrollShowing=e.horizontalScrollShowing,this.verticalScrollShowing=e.verticalScrollShowing,this.eventService.dispatchEvent({type:"scrollVisibilityChanged"}))}isHorizontalScrollShowing(){return this.horizontalScrollShowing}isVerticalScrollShowing(){return this.verticalScrollShowing}hasHorizontalScrollGap(){return this.horizontalScrollGap}hasVerticalScrollGap(){return this.verticalScrollGap}getScrollbarWidth(){if(null==this.scrollbarWidth){let e=this.gos.get("scrollbarWidth"),t="number"==typeof e&&e>=0?e:(null==X&&sg(),X);null!=t&&(this.scrollbarWidth=t,this.eventService.dispatchEvent({type:"scrollbarWidthChanged"}))}return this.scrollbarWidth}},lk="__ag_grid_instance",lT=class e extends i2{constructor(){super(...arguments),this.beanName="mouseEventService",this.gridInstanceId=e.gridInstanceSequence.next()}wireBeans(e){this.ctrlsService=e.ctrlsService}stampTopLevelGridCompWithGridInstance(e){e[lk]=this.gridInstanceId}getRenderedCellForEvent(e){return i0(this.gos,e.target,n7.DOM_DATA_KEY_CELL_CTRL)}isEventFromThisGrid(e){return this.isElementInThisGrid(e.target)}isElementInThisGrid(e){let t=e;for(;t;){let e=t[lk];if(tY(e))return e===this.gridInstanceId;t=t.parentElement}return!1}getCellPositionForEvent(e){let t=this.getRenderedCellForEvent(e);return t?t.getCellPosition():null}getNormalisedPosition(e){let t,i;let r=t5(this.gos,"normal");if(null!=e.clientX||null!=e.clientY?(t=e.clientX,i=e.clientY):(t=e.x,i=e.y),r){let e=this.ctrlsService.getGridBodyCtrl(),r=e.getScrollFeature().getVScrollPosition();t+=e.getScrollFeature().getHScrollPosition().left,i+=r.top}return{x:t,y:i}}};lT.gridInstanceSequence=new sK;var lA=class extends i2{constructor(){super(),this.beanName="navigationService",this.onPageDown=tH(this.onPageDown,100),this.onPageUp=tH(this.onPageUp,100)}wireBeans(e){this.mouseEventService=e.mouseEventService,this.pageBoundsService=e.pageBoundsService,this.focusService=e.focusService,this.columnModel=e.columnModel,this.visibleColsService=e.visibleColsService,this.rowModel=e.rowModel,this.ctrlsService=e.ctrlsService,this.rowRenderer=e.rowRenderer,this.headerNavigationService=e.headerNavigationService,this.rowPositionUtils=e.rowPositionUtils,this.cellNavigationService=e.cellNavigationService,this.pinnedRowModel=e.pinnedRowModel,this.scrollVisibleService=e.scrollVisibleService,this.rangeService=e.rangeService}postConstruct(){this.ctrlsService.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}handlePageScrollingKey(e,t=!1){let i=e.key,r=e.altKey,s=e.ctrlKey||e.metaKey,a=!!this.rangeService&&e.shiftKey,o=this.mouseEventService.getCellPositionForEvent(e),n=!1;switch(i){case aa.PAGE_HOME:case aa.PAGE_END:s||r||(this.onHomeOrEndKey(i),n=!0);break;case aa.LEFT:case aa.RIGHT:case aa.UP:case aa.DOWN:if(!o)return!1;!s||r||a||(this.onCtrlUpDownLeftRight(i,o),n=!0);break;case aa.PAGE_DOWN:case aa.PAGE_UP:s||r||(n=this.handlePageUpDown(i,o,t))}return n&&e.preventDefault(),n}handlePageUpDown(e,t,i){return i&&(t=this.focusService.getFocusedCell()),!!t&&(e===aa.PAGE_UP?this.onPageUp(t):this.onPageDown(t),!0)}navigateTo(e){let{scrollIndex:t,scrollType:i,scrollColumn:r,focusIndex:s,focusColumn:a}=e;tY(r)&&!r.isPinned()&&this.gridBodyCon.getScrollFeature().ensureColumnVisible(r),tY(t)&&this.gridBodyCon.getScrollFeature().ensureIndexVisible(t,i),e.isAsync||this.gridBodyCon.getScrollFeature().ensureIndexVisible(s),this.focusService.setFocusedCell({rowIndex:s,column:a,rowPinned:null,forceBrowserFocus:!0}),this.rangeService?.setRangeToCell({rowIndex:s,rowPinned:null,column:a})}onPageDown(e){let t=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition(),i=this.getViewportHeight(),r=this.pageBoundsService.getPixelOffset(),s=t.top+i,a=this.rowModel.getRowIndexAtPixel(s+r);this.columnModel.isAutoRowHeightActive()?this.navigateToNextPageWithAutoHeight(e,a):this.navigateToNextPage(e,a)}onPageUp(e){let t=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition(),i=this.pageBoundsService.getPixelOffset(),r=t.top,s=this.rowModel.getRowIndexAtPixel(r+i);this.columnModel.isAutoRowHeightActive()?this.navigateToNextPageWithAutoHeight(e,s,!0):this.navigateToNextPage(e,s,!0)}navigateToNextPage(e,t,i=!1){let r;let s=this.getViewportHeight(),a=this.pageBoundsService.getFirstRow(),o=this.pageBoundsService.getLastRow(),n=this.pageBoundsService.getPixelOffset(),l=this.rowModel.getRow(e.rowIndex),h=i?l?.rowHeight-s-n:s-n,d=l?.rowTop+h,c=this.rowModel.getRowIndexAtPixel(d+n);c===e.rowIndex&&(t=c=e.rowIndex+(i?-1:1)),i?(r="bottom",c<a&&(c=a),t<a&&(t=a)):(r="top",c>o&&(c=o),t>o&&(t=o)),this.isRowTallerThanView(c)&&(t=c,r="top"),this.navigateTo({scrollIndex:t,scrollType:r,scrollColumn:null,focusIndex:c,focusColumn:e.column})}navigateToNextPageWithAutoHeight(e,t,i=!1){this.navigateTo({scrollIndex:t,scrollType:i?"bottom":"top",scrollColumn:null,focusIndex:t,focusColumn:e.column}),setTimeout(()=>{let r=this.getNextFocusIndexForAutoHeight(e,i);this.navigateTo({scrollIndex:t,scrollType:i?"bottom":"top",scrollColumn:null,focusIndex:r,focusColumn:e.column,isAsync:!0})},50)}getNextFocusIndexForAutoHeight(e,t=!1){let i=t?-1:1,r=this.getViewportHeight(),s=this.pageBoundsService.getLastRow(),a=0,o=e.rowIndex;for(;o>=0&&o<=s;){let e=this.rowModel.getRow(o);if(e){let t=e.rowHeight??0;if(a+t>r)break;a+=t}o+=i}return Math.max(0,Math.min(o,s))}getViewportHeight(){let e=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition(),t=this.scrollVisibleService.getScrollbarWidth(),i=e.bottom-e.top;return this.ctrlsService.get("center").isHorizontalScrollShowing()&&(i-=t),i}isRowTallerThanView(e){let t=this.rowModel.getRow(e);if(!t)return!1;let i=t.rowHeight;return"number"==typeof i&&i>this.getViewportHeight()}onCtrlUpDownLeftRight(e,t){let i=this.cellNavigationService.getNextCellToFocus(e,t,!0),{rowIndex:r}=i,s=i.column;this.navigateTo({scrollIndex:r,scrollType:null,scrollColumn:s,focusIndex:r,focusColumn:s})}onHomeOrEndKey(e){let t=e===aa.PAGE_HOME,i=this.visibleColsService.getAllCols(),r=t?i[0]:iB(i),s=t?this.pageBoundsService.getFirstRow():this.pageBoundsService.getLastRow();this.navigateTo({scrollIndex:s,scrollType:null,scrollColumn:r,focusIndex:s,focusColumn:r})}onTabKeyDown(e,t){let i=t.shiftKey,r=this.tabToNextCellCommon(e,i,t);if(!1!==r){r?t.preventDefault():null===r&&this.focusService.allowFocusForNextGridCoreContainer(i);return}if(i){let{rowIndex:i,rowPinned:r}=e.getRowPosition();(r?0===i:i===this.pageBoundsService.getFirstRow())&&(0===this.gos.get("headerHeight")||this.focusService.isHeaderFocusSuppressed()?this.focusService.focusNextGridCoreContainer(!0,!0):(t.preventDefault(),this.focusService.focusPreviousFromFirstCell(t)))}else e instanceof n7&&e.focusCell(!0),(!i&&this.focusService.focusOverlay(!1)||this.focusService.focusNextGridCoreContainer(i))&&t.preventDefault()}tabToNextCell(e,t){let i=this.focusService.getFocusedCell();if(!i)return!1;let r=this.getCellByPosition(i);return!!(r||(r=this.rowRenderer.getRowByPosition(i))&&r.isFullWidth())&&!!this.tabToNextCellCommon(r,e,t)}tabToNextCellCommon(e,t,i){let r,s=e.isEditing();if(!s&&e instanceof n7){let t=e.getRowCtrl();t&&(s=t.isEditing())}return null===(r=s?"fullRow"===this.gos.get("editType")?this.moveToNextEditingRow(e,t,i):this.moveToNextEditingCell(e,t,i):this.moveToNextCellNotEditing(e,t))?r:r||!!this.focusService.getFocusedHeader()}moveToNextEditingCell(e,t,i=null){let r=e.getCellPosition();e.getGui().focus(),e.stopEditing();let s=this.findNextCellToFocusOn(r,t,!0);return!1===s?null:null!=s&&(s.startEditing(null,!0,i),s.focusCell(!1),!0)}moveToNextEditingRow(e,t,i=null){let r=e.getCellPosition(),s=this.findNextCellToFocusOn(r,t,!0);if(!1===s)return null;if(null==s)return!1;let a=s.getCellPosition(),o=this.isCellEditable(r),n=this.isCellEditable(a),l=a&&r.rowIndex===a.rowIndex&&r.rowPinned===a.rowPinned;return o&&e.setFocusOutOnEditor(),l||(e.getRowCtrl().stopEditing(),s.getRowCtrl().startRowEditing(void 0,void 0,i)),n?(s.setFocusInOnEditor(),s.focusCell()):s.focusCell(!0),!0}moveToNextCellNotEditing(e,t){let i;let r=this.visibleColsService.getAllCols();i=e instanceof le?{...e.getRowPosition(),column:t?r[0]:iB(r)}:e.getCellPosition();let s=this.findNextCellToFocusOn(i,t,!1);if(!1===s)return null;if(s instanceof n7)s.focusCell(!0);else if(s)return this.tryToFocusFullWidthRow(s.getRowPosition(),t);return tY(s)}findNextCellToFocusOn(e,t,i){let r=e;for(;;){e!==r&&(e=r),t||(r=this.getLastCellOfColSpan(r)),r=this.cellNavigationService.getNextTabbedCell(r,t);let s=this.gos.getCallback("tabToNextCell");if(tY(s)){let a=s({backwards:t,editing:i,previousCellPosition:e,nextCellPosition:r||null});if(!0===a||null===a)null===a&&tO("Returning `null` from tabToNextCell is deprecated. Return `true` to stay on the current cell, or `false` to let the browser handle the tab behaviour."),r=e;else{if(!1===a)return!1;r={rowIndex:a.rowIndex,column:a.column,rowPinned:a.rowPinned}}}if(!r)return null;if(r.rowIndex<0){let e=this.headerNavigationService.getHeaderRowCount();return this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:e+r.rowIndex,column:r.column},fromCell:!0}),null}let a="fullRow"===this.gos.get("editType");if(i&&!a&&!this.isCellEditable(r))continue;this.ensureCellVisible(r);let o=this.getCellByPosition(r);if(!o){let e=this.rowRenderer.getRowByPosition(r);if(!e||!e.isFullWidth()||i)continue;return e}if(!o.isSuppressNavigable())return this.rangeService?.setRangeToCell(r),o}}isCellEditable(e){let t=this.lookupRowNodeForCell(e);return!!t&&e.column.isCellEditable(t)}getCellByPosition(e){let t=this.rowRenderer.getRowByPosition(e);return t?t.getCellCtrl(e.column):null}lookupRowNodeForCell(e){return"top"===e.rowPinned?this.pinnedRowModel.getPinnedTopRow(e.rowIndex):"bottom"===e.rowPinned?this.pinnedRowModel.getPinnedBottomRow(e.rowIndex):this.rowModel.getRow(e.rowIndex)}navigateToNextCell(e,t,i,r){let s=i,a=!1;for(;s&&(s===i||!this.isValidNavigateCell(s));)this.gos.get("enableRtl")?t===aa.LEFT&&(s=this.getLastCellOfColSpan(s)):t===aa.RIGHT&&(s=this.getLastCellOfColSpan(s)),a=tK(s=this.cellNavigationService.getNextCellToFocus(t,s));if(a&&e&&e.key===aa.UP&&(s={rowIndex:-1,rowPinned:null,column:i.column}),r){let r=this.gos.getCallback("navigateToNextCell");if(tY(r)){let a=r({key:t,previousCellPosition:i,nextCellPosition:s||null,event:e});s=tY(a)?{rowPinned:a.rowPinned,rowIndex:a.rowIndex,column:a.column}:null}}if(!s)return;if(s.rowIndex<0){let t=this.headerNavigationService.getHeaderRowCount();this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:t+s.rowIndex,column:i.column},event:e||void 0,fromCell:!0});return}let o=this.getNormalisedPosition(s);o?this.focusPosition(o):this.tryToFocusFullWidthRow(s)}getNormalisedPosition(e){this.ensureCellVisible(e);let t=this.getCellByPosition(e);return t?(e=t.getCellPosition(),this.ensureCellVisible(e),e):null}tryToFocusFullWidthRow(e,t){let i=this.visibleColsService.getAllCols(),r=this.rowRenderer.getRowByPosition(e);if(!r||!r.isFullWidth())return!1;let s=this.focusService.getFocusedCell(),a={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column||(t?iB(i):i[0])};this.focusPosition(a);let o=null==t?null!=s&&this.rowPositionUtils.before(a,s):t;return this.eventService.dispatchEvent({type:"fullWidthRowFocused",rowIndex:a.rowIndex,rowPinned:a.rowPinned,column:a.column,isFullWidthCell:!0,fromBelow:o}),!0}focusPosition(e){this.focusService.setFocusedCell({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0}),this.rangeService?.setRangeToCell(e)}isValidNavigateCell(e){return!!this.rowPositionUtils.getRowNode(e)}getLastCellOfColSpan(e){let t=this.getCellByPosition(e);if(!t)return e;let i=t.getColSpanningList();return 1===i.length?e:{rowIndex:e.rowIndex,column:iB(i),rowPinned:e.rowPinned}}ensureCellVisible(e){let t=iu(this.gos),i=this.rowModel.getRow(e.rowIndex);!(t&&i?.sticky)&&tK(e.rowPinned)&&this.gridBodyCon.getScrollFeature().ensureIndexVisible(e.rowIndex),e.column.isPinned()||this.gridBodyCon.getScrollFeature().ensureColumnVisible(e.column)}},lR=class extends i2{constructor(){super(...arguments),this.beanName="horizontalResizeService"}wireBeans(e){this.dragService=e.dragService,this.ctrlsService=e.ctrlsService}addResizeBar(e){let t={dragStartPixels:e.dragStartPixels||0,eElement:e.eResizeBar,onDragStart:this.onDragStart.bind(this,e),onDragStop:this.onDragStop.bind(this,e),onDragging:this.onDragging.bind(this,e),onDragCancel:this.onDragStop.bind(this,e),includeTouch:!0,stopPropagationForTouch:!0};return this.dragService.addDragSource(t),()=>this.dragService.removeDragSource(t)}onDragStart(e,t){this.dragStartX=t.clientX,this.setResizeIcons();let i=t instanceof MouseEvent&&!0===t.shiftKey;e.onResizeStart(i)}setResizeIcons(){let e=this.ctrlsService.get("gridCtrl");e.setResizeCursor(!0),e.disableUserSelect(!0)}onDragStop(e){e.onResizeEnd(this.resizeAmount),this.resetIcons()}resetIcons(){let e=this.ctrlsService.get("gridCtrl");e.setResizeCursor(!1),e.disableUserSelect(!1)}onDragging(e,t){this.resizeAmount=t.clientX-this.dragStartX,e.onResizing(this.resizeAmount)}},lL=class extends i2{constructor(){super(...arguments),this.beanName="filterMenuFactory"}wireBeans(e){this.popupService=e.popupService,this.focusService=e.focusService,this.ctrlsService=e.ctrlsService,this.menuService=e.menuService}hideActiveMenu(){this.hidePopup&&this.hidePopup()}showMenuAfterMouseEvent(e,t,i){this.showPopup(e,r=>{this.popupService.positionPopupUnderMouseEvent({column:e,type:i,mouseEvent:t,ePopup:r})},i,t.target,this.menuService.isLegacyMenuEnabled())}showMenuAfterButtonClick(e,t,i){let r=-1,s="left",a=this.menuService.isLegacyMenuEnabled();!a&&this.gos.get("enableRtl")&&(r=1,s="right");let o=a?void 0:4*r,n=a?void 0:4;this.showPopup(e,r=>{this.popupService.positionPopupByComponent({type:i,eventSource:t,ePopup:r,nudgeX:o,nudgeY:n,alignSide:s,keepWithinBounds:!0,position:"under",column:e})},i,t,a)}showPopup(e,t,i,r,s){let a;let o=e?this.createBean(new oe(e,"COLUMN_MENU")):void 0;if(this.activeMenu=o,!o?.hasFilter()||!e)throw Error("AG Grid - unable to show popup filter, filter instantiation failed");let n=document.createElement("div");rQ(n,"presentation"),n.classList.add("ag-menu"),s||n.classList.add("ag-filter-menu"),[this.tabListener]=this.addManagedElementListeners(n,{keydown:e=>this.trapFocusWithin(e,n)}),n.appendChild(o?.getGui());let l=()=>o?.afterGuiDetached(),h=this.menuService.isColumnMenuAnchoringEnabled()?r??this.ctrlsService.getGridBodyCtrl().getGui():void 0,d=this.localeService.getLocaleTextFunc(),c=s&&"columnFilter"!==i?d("ariaLabelColumnMenu","Column Menu"):d("ariaLabelColumnFilter","Column Filter"),u=this.popupService.addPopup({modal:!0,eChild:n,closeOnEsc:!0,closedCallback:t=>{e.setMenuVisible(!1,"contextMenu");let s=t instanceof KeyboardEvent;if(this.tabListener&&(this.tabListener=this.tabListener()),s&&r&&sN(r)){let e=this.focusService.findTabbableParent(r);e&&e.focus()}l(),this.destroyBean(this.activeMenu),this.dispatchVisibleChangedEvent(!1,i,e)},positionCallback:()=>t(n),anchorToElement:h,ariaLabel:c});u&&(this.hidePopup=a=u.hideFunc),o.afterInit().then(()=>{t(n),o.afterGuiAttached({container:i,hidePopup:a})}),e.setMenuVisible(!0,"contextMenu"),this.dispatchVisibleChangedEvent(!0,i,e)}trapFocusWithin(e,t){e.key!==aa.TAB||e.defaultPrevented||this.focusService.findNextFocusableElement(t,!1,e.shiftKey)||(e.preventDefault(),this.focusService.focusInto(t,e.shiftKey))}dispatchVisibleChangedEvent(e,t,i){this.eventService.dispatchEvent({type:"columnMenuVisibleChanged",visible:e,switchingTab:!1,key:t,column:i??null,columnGroup:null})}isMenuEnabled(e){return e.isFilterAllowed()&&(e.getColDef().menuTabs??["filterMenuTab"]).includes("filterMenuTab")}showMenuAfterContextMenuEvent(){}destroy(){this.destroyBean(this.activeMenu),super.destroy()}},lP=class extends i2{constructor(){super(...arguments),this.beanName="resizeObserverService"}observeResize(e,t){let i=io(this.gos).ResizeObserver,r=i?new i(t):null;return r?.observe(e),()=>r?.disconnect()}},lF=class extends i2{constructor(){super(...arguments),this.beanName="animationFrameService",this.createTasksP1={list:[],sorted:!1},this.createTasksP2={list:[],sorted:!1},this.destroyTasks=[],this.ticking=!1,this.scrollGoingDown=!0,this.lastPage=0,this.lastScrollTop=0,this.taskCount=0,this.cancelledTasks=new Set}wireBeans(e){this.ctrlsService=e.ctrlsService,this.paginationService=e.paginationService}setScrollTop(e){let t=this.gos.get("pagination");if(this.scrollGoingDown=e>=this.lastScrollTop,t&&0===e){let e=this.paginationService?.getCurrentPage()??0;e!==this.lastPage&&(this.lastPage=e,this.scrollGoingDown=!0)}this.lastScrollTop=e}postConstruct(){this.useAnimationFrame=!this.gos.get("suppressAnimationFrame")}isOn(){return this.useAnimationFrame}verifyAnimationFrameOn(e){!1===this.useAnimationFrame&&tO(`AnimationFrameService.${e} called but animation frames are off`)}createTask(e,t,i){this.verifyAnimationFrameOn(i);let r={task:e,index:t,createOrder:++this.taskCount};this.addTaskToList(this[i],r),this.schedule()}cancelTask(e){this.cancelledTasks.add(e)}addTaskToList(e,t){e.list.push(t),e.sorted=!1}sortTaskList(e){if(e.sorted)return;let t=this.scrollGoingDown?1:-1;e.list.sort((e,i)=>e.index!==i.index?t*(i.index-e.index):i.createOrder-e.createOrder),e.sorted=!0}addDestroyTask(e){this.verifyAnimationFrameOn("createTasksP3"),this.destroyTasks.push(e),this.schedule()}executeFrame(e){this.verifyAnimationFrameOn("executeFrame");let t=this.createTasksP1,i=t.list,r=this.createTasksP2,s=r.list,a=this.destroyTasks,o=new Date().getTime(),n=new Date().getTime()-o,l=e<=0,h=this.ctrlsService.getGridBodyCtrl();for(;l||n<e;){if(!h.getScrollFeature().scrollGridIfNeeded()){let e;if(i.length)this.sortTaskList(t),e=i.pop().task;else if(s.length)this.sortTaskList(r),e=s.pop().task;else if(a.length)e=a.pop();else{this.cancelledTasks.clear();break}this.cancelledTasks.has(e)||e()}n=new Date().getTime()-o}i.length||s.length||a.length?this.requestFrame():this.stopTicking()}stopTicking(){this.ticking=!1}flushAllFrames(){this.useAnimationFrame&&this.executeFrame(-1)}schedule(){this.useAnimationFrame&&(this.ticking||(this.ticking=!0,this.requestFrame()))}requestFrame(){let e=this.executeFrame.bind(this,60);this.requestAnimationFrame(e)}requestAnimationFrame(e){let t=io(this.gos);t.requestAnimationFrame?t.requestAnimationFrame(e):t.webkitRequestAnimationFrame?t.webkitRequestAnimationFrame(e):t.setTimeout(e,0)}isQueueEmpty(){return!this.ticking}debounce(e){let t=!1;return()=>{if(!this.isOn()){window.setTimeout(e,0);return}t||(t=!0,this.addDestroyTask(()=>{t=!1,e()}))}}},lN=((v=lN||{}).EVERYTHING="group",v.FILTER="filter",v.SORT="sort",v.MAP="map",v.AGGREGATE="aggregate",v.FILTER_AGGREGATES="filter_aggregates",v.PIVOT="pivot",v.NOTHING="nothing",v),lO=class extends i2{constructor(){super(...arguments),this.beanName="expansionService"}wireBeans(e){this.rowModel=e.rowModel}postConstruct(){this.isClientSideRowModel=t4(this.gos)}expandRows(e){if(!this.isClientSideRowModel)return;let t=new Set(e);this.rowModel.forEachNode(e=>{e.id&&t.has(e.id)&&(e.expanded=!0)}),this.onGroupExpandedOrCollapsed()}getExpandedRows(){let e=[];return this.rowModel.forEachNode(({expanded:t,id:i})=>{t&&i&&e.push(i)}),e}expandAll(e){this.isClientSideRowModel&&this.rowModel.expandOrCollapseAll(e)}setRowNodeExpanded(e,t,i,r){e&&(i&&e.parent&&-1!==e.parent.level&&this.setRowNodeExpanded(e.parent,t,i,r),e.setExpanded(t,void 0,r))}onGroupExpandedOrCollapsed(){this.isClientSideRowModel&&this.rowModel.refreshModel({step:"map"})}},lB=class extends i2{constructor(){super(...arguments),this.beanName="menuService"}wireBeans(e){this.valueService=e.valueService,this.filterMenuFactory=e.filterMenuFactory,this.ctrlsService=e.ctrlsService,this.animationFrameService=e.animationFrameService,this.filterManager=e.filterManager,this.rowRenderer=e.rowRenderer,this.columnChooserFactory=e.columnChooserFactory,this.contextMenuFactory=e.contextMenuFactory,this.enterpriseMenuFactory=e.enterpriseMenuFactory}postConstruct(){this.activeMenuFactory=this.enterpriseMenuFactory??this.filterMenuFactory}showColumnMenu(e){this.showColumnMenuCommon(this.activeMenuFactory,e,"columnMenu")}showFilterMenu(e){let t=this.enterpriseMenuFactory&&this.isLegacyMenuEnabled()?this.enterpriseMenuFactory:this.filterMenuFactory;this.showColumnMenuCommon(t,e,e.containerType,!0)}showHeaderContextMenu(e,t,i){this.activeMenuFactory.showMenuAfterContextMenuEvent(e,t,i)}getContextMenuPosition(e,t){let i=this.getRowCtrl(e),r=this.getCellGui(i,t);if(!r)return i?{x:0,y:i.getRowYPosition()}:{x:0,y:0};let s=r.getBoundingClientRect();return{x:s.x+s.width/2,y:s.y+s.height/2}}showContextMenu(e){let{rowNode:t}=e,i=e.column,{anchorToElement:r,value:s}=e;t&&i&&null==s&&(s=this.valueService.getValueForDisplay(i,t)),null==r&&(r=this.getContextMenuAnchorElement(t,i)),this.contextMenuFactory?.onContextMenu(e.mouseEvent??null,e.touchEvent??null,t??null,i??null,s,r)}showColumnChooser(e){this.columnChooserFactory?.showColumnChooser(e)}hidePopupMenu(){this.contextMenuFactory?.hideActiveMenu(),this.activeMenuFactory.hideActiveMenu()}hideColumnChooser(){this.columnChooserFactory?.hideActiveColumnChooser()}isColumnMenuInHeaderEnabled(e){let{suppressMenu:t,suppressHeaderMenuButton:i}=e.getColDef();return!(i??t)&&this.activeMenuFactory.isMenuEnabled(e)&&(this.isLegacyMenuEnabled()||!!this.enterpriseMenuFactory)}isFilterMenuInHeaderEnabled(e){return!e.getColDef().suppressHeaderFilterButton&&!!this.filterManager?.isFilterAllowed(e)}isHeaderContextMenuEnabled(e){let t=e&&rm(e)?e.getColDef():e?.getColGroupDef();return!t?.suppressHeaderContextMenu&&"new"===this.getColumnMenuType()}isHeaderMenuButtonAlwaysShowEnabled(){return this.isSuppressMenuHide()}isHeaderMenuButtonEnabled(){let e=!this.isSuppressMenuHide();return!(sc()&&e)}isHeaderFilterButtonEnabled(e){return this.isFilterMenuInHeaderEnabled(e)&&!this.isLegacyMenuEnabled()&&!this.isFloatingFilterButtonDisplayed(e)}isFilterMenuItemEnabled(e){return!!this.filterManager?.isFilterAllowed(e)&&!this.isLegacyMenuEnabled()&&!this.isFilterMenuInHeaderEnabled(e)&&!this.isFloatingFilterButtonDisplayed(e)}isColumnMenuAnchoringEnabled(){return!this.isLegacyMenuEnabled()}areAdditionalColumnMenuItemsEnabled(){return"new"===this.getColumnMenuType()}isLegacyMenuEnabled(){return"legacy"===this.getColumnMenuType()}isFloatingFilterButtonEnabled(e){let t=e.getColDef(),i=t.floatingFilterComponentParams?.suppressFilterButton;return null!=i&&tO("As of v31.1, 'colDef.floatingFilterComponentParams.suppressFilterButton' is deprecated. Use 'colDef.suppressFloatingFilterButton' instead."),null==t.suppressFloatingFilterButton?!i:!t.suppressFloatingFilterButton}getColumnMenuType(){return this.gos.get("columnMenu")}isFloatingFilterButtonDisplayed(e){return!!e.getColDef().floatingFilter&&this.isFloatingFilterButtonEnabled(e)}isSuppressMenuHide(){let e=this.gos.get("suppressMenuHide");return this.isLegacyMenuEnabled()?!!this.gos.exists("suppressMenuHide")&&e:e}showColumnMenuCommon(e,t,i,r){let{positionBy:s}=t,a=t.column;if("button"===s){let{buttonElement:s}=t;e.showMenuAfterButtonClick(a,s,i,r)}else if("mouse"===s){let{mouseEvent:s}=t;e.showMenuAfterMouseEvent(a,s,i,r)}else a&&(this.ctrlsService.getGridBodyCtrl().getScrollFeature().ensureColumnVisible(a,"auto"),this.animationFrameService.requestAnimationFrame(()=>{let t=this.ctrlsService.getHeaderRowContainerCtrl(a.getPinned())?.getHeaderCtrlForColumn(a);t&&e.showMenuAfterButtonClick(a,t.getAnchorElementForMenu(r),i,!0)}))}getRowCtrl(e){let{rowIndex:t,rowPinned:i}=e||{};if(null!=t)return this.rowRenderer.getRowByPosition({rowIndex:t,rowPinned:i})||void 0}getCellGui(e,t){if(!e||!t)return;let i=e.getCellCtrl(t);return i?.getGui()||void 0}getContextMenuAnchorElement(e,t){let i=this.ctrlsService.getGridBodyCtrl().getGridBodyElement(),r=this.getRowCtrl(e);return r?this.getCellGui(r,t)||(r.isFullWidth()?r.getFullWidthElement():i):i}},lG={selector:"AG-INPUT-TEXT-AREA",component:class extends al{constructor(e){super(e,"ag-text-area",null,"textarea")}setValue(e,t){let i=super.setValue(e,t);return this.eInput.value=e,i}setCols(e){return this.eInput.cols=e,this}setRows(e){return this.eInput.rows=e,this}}},lz=class extends av{constructor(){super(`<div class="ag-large-text">
        <ag-input-text-area data-ref="eTextArea" class="ag-large-text-input"></ag-input-text-area>
        </div>`,[lG]),this.eTextArea=null}init(e){this.params=e,this.focusAfterAttached=e.cellStartedEdit,this.eTextArea.setMaxLength(e.maxLength||200).setCols(e.cols||60).setRows(e.rows||10),tY(e.value,!0)&&this.eTextArea.setValue(e.value.toString(),!0),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.activateTabIndex()}onKeyDown(e){let t=e.key;(t===aa.LEFT||t===aa.UP||t===aa.RIGHT||t===aa.DOWN||e.shiftKey&&t===aa.ENTER)&&e.stopPropagation()}afterGuiAttached(){let e=this.localeService.getLocaleTextFunc();this.eTextArea.setInputAriaLabel(e("ariaInputEditor","Input Editor")),this.focusAfterAttached&&this.eTextArea.getFocusableElement().focus()}getValue(){let e=this.eTextArea.getValue();return tY(e)||tY(this.params.value)?this.params.parseValue(e):this.params.value}},l_=class extends av{constructor(e){super('<div class="ag-popup-editor" tabindex="-1"/>'),this.params=e}postConstruct(){is(this.gos,this.getGui(),"popupEditorWrapper",!0),this.addKeyDownListener()}addKeyDownListener(){let e=this.getGui(),t=this.params;this.addManagedElementListeners(e,{keydown:e=>{oC(this.gos,e,t.node,t.column,!0)||t.onKeyDown(e)}})}},lV=class extends av{constructor(){super(`<div class="ag-cell-edit-wrapper">
                <ag-select class="ag-cell-editor" data-ref="eSelect"></ag-select>
            </div>`,[og]),this.eSelect=null,this.startedByEnter=!1}wireBeans(e){this.valueService=e.valueService}init(e){this.focusAfterAttached=e.cellStartedEdit;let{eSelect:t,valueService:i,gos:r}=this,{values:s,value:a,eventKey:o}=e;if(tK(s)){tO("no values found for select cellEditor");return}this.startedByEnter=null!=o&&o===aa.ENTER;let n=!1;s.forEach(r=>{let s={value:r},o=i.formatValue(e.column,null,r),l=null!=o;s.text=l?o:r,t.addOption(s),n=n||a===r}),n?t.setValue(e.value,!0):e.values.length&&t.setValue(e.values[0],!0);let{valueListGap:l,valueListMaxWidth:h,valueListMaxHeight:d}=e;null!=l&&t.setPickerGap(l),null!=d&&t.setPickerMaxHeight(d),null!=h&&t.setPickerMaxWidth(h),"fullRow"!==r.get("editType")&&this.addManagedListeners(this.eSelect,{selectedItem:()=>e.stopEditing()})}afterGuiAttached(){this.focusAfterAttached&&this.eSelect.getFocusableElement().focus(),this.startedByEnter&&setTimeout(()=>{this.isAlive()&&this.eSelect.showPicker()})}focusIn(){this.eSelect.getFocusableElement().focus()}getValue(){return this.eSelect.getValue()}isPopup(){return!1}},lj=class extends av{constructor(e){super(`
            <div class="ag-cell-edit-wrapper">
                ${e.getTemplate()}
            </div>`,e.getAgComponents()),this.cellEditorInput=e,this.eInput=null}init(e){let t;this.params=e;let{cellStartedEdit:i,eventKey:r,suppressPreventDefault:s}=e,a=this.eInput;this.cellEditorInput.init(a,e);let o=!0;i?(this.focusAfterAttached=!0,r===aa.BACKSPACE||r===aa.DELETE?t="":r&&1===r.length?s?o=!1:t=r:(t=this.cellEditorInput.getStartValue(),r!==aa.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,t=this.cellEditorInput.getStartValue()),o&&null!=t&&a.setStartValue(t),this.addManagedElementListeners(a.getGui(),{keydown:e=>{let{key:t}=e;(t===aa.PAGE_UP||t===aa.PAGE_DOWN)&&e.preventDefault()}})}afterGuiAttached(){let e=this.localeService.getLocaleTextFunc(),t=this.eInput;if(t.setInputAriaLabel(e("ariaInputEditor","Input Editor")),!this.focusAfterAttached)return;so()||t.getFocusableElement().focus();let i=t.getInputElement();this.highlightAllOnFocus?i.select():this.cellEditorInput.setCaret?.()}focusIn(){let e=this.eInput,t=e.getFocusableElement(),i=e.getInputElement();t.focus(),i.select()}getValue(){return this.cellEditorInput.getValue()}isPopup(){return!1}},lH=class{getTemplate(){return'<ag-input-text-field class="ag-cell-editor" data-ref="eInput"></ag-input-text-field>'}getAgComponents(){return[ob]}init(e,t){this.eInput=e,this.params=t,null!=t.maxLength&&e.setMaxLength(t.maxLength)}getValue(){let e=this.eInput.getValue();return tY(e)||tY(this.params.value)?this.params.parseValue(e):this.params.value}getStartValue(){return this.params.useFormatter||this.params.column.getColDef().refData?this.params.formatValue(this.params.value):this.params.value}setCaret(){let e=this.eInput.getValue(),t=tY(e)&&e.length||0;t&&this.eInput.getInputElement().setSelectionRange(t,t)}},lU=class extends lj{constructor(){super(new lH)}},lW=class{getTemplate(){return'<ag-input-number-field class="ag-cell-editor" data-ref="eInput"></ag-input-number-field>'}getAgComponents(){return[ox]}init(e,t){this.eInput=e,this.params=t,null!=t.max&&e.setMax(t.max),null!=t.min&&e.setMin(t.min),null!=t.precision&&e.setPrecision(t.precision),null!=t.step&&e.setStep(t.step);let i=e.getInputElement();t.preventStepping?e.addManagedElementListeners(i,{keydown:this.preventStepping}):t.showStepperButtons&&i.classList.add("ag-number-field-input-stepper")}preventStepping(e){(e.key===aa.UP||e.key===aa.DOWN)&&e.preventDefault()}getValue(){let e=this.eInput.getValue();if(!tY(e)&&!tY(this.params.value))return this.params.value;let t=this.params.parseValue(e);if(null==t)return t;if("string"==typeof t){if(""===t)return null;t=Number(t)}return isNaN(t)?null:t}getStartValue(){return this.params.value}setCaret(){so()&&this.eInput.getInputElement().focus({preventScroll:!0})}},l$=class extends ow{constructor(e){super(e,"ag-date-field","date")}postConstruct(){super.postConstruct();let e=so();this.addManagedListeners(this.eInput,{wheel:this.onWheel.bind(this),mousedown:()=>{this.isDisabled()||e||this.eInput.focus()}}),this.eInput.step="any"}onWheel(e){ih(this.gos)===this.eInput&&e.preventDefault()}setMin(e){let t=e instanceof Date?oB(e??null,!1)??void 0:e;return this.min===t||(this.min=t,sW(this.eInput,"min",t)),this}setMax(e){let t=e instanceof Date?oB(e??null,!1)??void 0:e;return this.max===t||(this.max=t,sW(this.eInput,"max",t)),this}setStep(e){return this.step===e||(this.step=e,sW(this.eInput,"step",e)),this}getDate(){if(this.eInput.validity.valid)return o_(this.getValue())??void 0}setDate(e,t){this.setValue(oB(e??null,!1),t)}},lY={selector:"AG-INPUT-DATE-FIELD",component:l$},lK=class{getTemplate(){return'<ag-input-date-field class="ag-cell-editor" data-ref="eInput"></ag-input-date-field>'}getAgComponents(){return[lY]}init(e,t){this.eInput=e,this.params=t,null!=t.min&&e.setMin(t.min),null!=t.max&&e.setMax(t.max),null!=t.step&&e.setStep(t.step)}getValue(){let e=this.eInput.getDate();return tY(e)||tY(this.params.value)?e??null:this.params.value}getStartValue(){let{value:e}=this.params;if(e instanceof Date)return oB(e,!1)}},lZ=class{constructor(e){this.getDataTypeService=e}getTemplate(){return'<ag-input-date-field class="ag-cell-editor" data-ref="eInput"></ag-input-date-field>'}getAgComponents(){return[lY]}init(e,t){this.eInput=e,this.params=t,null!=t.min&&e.setMin(t.min),null!=t.max&&e.setMax(t.max),null!=t.step&&e.setStep(t.step)}getValue(){let e=this.formatDate(this.eInput.getDate());return tY(e)||tY(this.params.value)?this.params.parseValue(e??""):this.params.value}getStartValue(){return oB(this.parseDate(this.params.value??void 0)??null,!1)}parseDate(e){let t=this.getDataTypeService();return t?t.getDateParserFunction(this.params.column)(e):o_(e)??void 0}formatDate(e){let t=this.getDataTypeService();return t?t.getDateFormatterFunction(this.params.column)(e):oB(e??null,!1)??void 0}},lq=class{constructor(e){this.cellValueChanges=e}},lX=class extends lq{constructor(e,t,i,r){super(e),this.initialRange=t,this.finalRange=i,this.ranges=r}},lQ=class{constructor(e){this.actionStack=[],this.maxStackSize=e||10,this.actionStack=Array(this.maxStackSize)}pop(){return this.actionStack.pop()}push(e){e.cellValueChanges&&e.cellValueChanges.length>0&&(this.actionStack.length===this.maxStackSize&&this.actionStack.shift(),this.actionStack.push(e))}clear(){this.actionStack=[]}getCurrentStackSize(){return this.actionStack.length}},lJ=class extends i2{constructor(){super(...arguments),this.beanName="undoRedoService",this.cellValueChanges=[],this.activeCellEdit=null,this.activeRowEdit=null,this.isPasting=!1,this.isRangeInAction=!1,this.onCellValueChanged=e=>{let t={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned},i=null!==this.activeCellEdit&&this.cellPositionUtils.equals(this.activeCellEdit,t),r=null!==this.activeRowEdit&&this.rowPositionUtils.sameRow(this.activeRowEdit,t);if(!(i||r||this.isPasting||this.isRangeInAction))return;let{rowPinned:s,rowIndex:a,column:o,oldValue:n,value:l}=e,h={rowPinned:s,rowIndex:a,columnId:o.getColId(),newValue:l,oldValue:n};this.cellValueChanges.push(h)},this.clearStacks=()=>{this.undoStack.clear(),this.redoStack.clear()}}wireBeans(e){this.focusService=e.focusService,this.ctrlsService=e.ctrlsService,this.cellPositionUtils=e.cellPositionUtils,this.rowPositionUtils=e.rowPositionUtils,this.columnModel=e.columnModel,this.rangeService=e.rangeService}postConstruct(){if(!this.gos.get("undoRedoCellEditing"))return;let e=this.gos.get("undoRedoCellEditingLimit");if(e<=0)return;this.undoStack=new lQ(e),this.redoStack=new lQ(e),this.addListeners();let t=this.clearStacks.bind(this);this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this),modelUpdated:e=>{e.keepUndoRedoStack||this.clearStacks()},columnPivotModeChanged:t,newColumnsLoaded:t,columnGroupOpened:t,columnRowGroupChanged:t,columnMoved:t,columnPinned:t,columnVisible:t,rowDragEnd:t}),this.ctrlsService.whenReady(this,e=>{this.gridBodyCtrl=e.gridBodyCtrl})}getCurrentUndoStackSize(){return this.undoStack?this.undoStack.getCurrentStackSize():0}getCurrentRedoStackSize(){return this.redoStack?this.redoStack.getCurrentStackSize():0}undo(e){this.eventService.dispatchEvent({type:"undoStarted",source:e});let t=this.undoRedo(this.undoStack,this.redoStack,"initialRange","oldValue","undo");this.eventService.dispatchEvent({type:"undoEnded",source:e,operationPerformed:t})}redo(e){this.eventService.dispatchEvent({type:"redoStarted",source:e});let t=this.undoRedo(this.redoStack,this.undoStack,"finalRange","newValue","redo");this.eventService.dispatchEvent({type:"redoEnded",source:e,operationPerformed:t})}undoRedo(e,t,i,r,s){if(!e)return!1;let a=e.pop();return!!a&&!!a.cellValueChanges&&(this.processAction(a,e=>e[r],s),a instanceof lX?this.processRange(this.rangeService,a.ranges||[a[i]]):this.processCell(a.cellValueChanges),t.push(a),!0)}processAction(e,t,i){e.cellValueChanges.forEach(e=>{let{rowIndex:r,rowPinned:s,columnId:a}=e,o=this.rowPositionUtils.getRowNode({rowIndex:r,rowPinned:s});o.displayed&&o.setDataValue(a,t(e),i)})}processRange(e,t){let i;e.removeAllCellRanges(!0),t.forEach((r,s)=>{if(!r)return;let a=r.startRow,o=r.endRow;s===t.length-1&&(i={rowPinned:a.rowPinned,rowIndex:a.rowIndex,columnId:r.startColumn.getColId()},this.setLastFocusedCell(i));let n={rowStartIndex:a.rowIndex,rowStartPinned:a.rowPinned,rowEndIndex:o.rowIndex,rowEndPinned:o.rowPinned,columnStart:r.startColumn,columns:r.columns};e.addCellRange(n)})}processCell(e){let t=e[0],{rowIndex:i,rowPinned:r}=t,s=this.rowPositionUtils.getRowNode({rowIndex:i,rowPinned:r}),a={rowPinned:t.rowPinned,rowIndex:s.rowIndex,columnId:t.columnId};this.setLastFocusedCell(a,this.rangeService)}setLastFocusedCell(e,t){let{rowIndex:i,columnId:r,rowPinned:s}=e,a=this.gridBodyCtrl.getScrollFeature(),o=this.columnModel.getCol(r);if(!o)return;a.ensureIndexVisible(i),a.ensureColumnVisible(o);let n={rowIndex:i,column:o,rowPinned:s};this.focusService.setFocusedCell({...n,forceBrowserFocus:!0}),t?.setRangeToCell(n)}addListeners(){this.addManagedEventListeners({rowEditingStarted:e=>{this.activeRowEdit={rowIndex:e.rowIndex,rowPinned:e.rowPinned}},rowEditingStopped:()=>{let e=new lq(this.cellValueChanges);this.pushActionsToUndoStack(e),this.activeRowEdit=null},cellEditingStarted:e=>{this.activeCellEdit={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned}},cellEditingStopped:e=>{if(this.activeCellEdit=null,e.valueChanged&&!this.activeRowEdit&&!this.isPasting&&!this.isRangeInAction){let e=new lq(this.cellValueChanges);this.pushActionsToUndoStack(e)}},pasteStart:()=>{this.isPasting=!0},pasteEnd:()=>{let e=new lq(this.cellValueChanges);this.pushActionsToUndoStack(e),this.isPasting=!1},fillStart:()=>{this.isRangeInAction=!0},fillEnd:e=>{let t=new lX(this.cellValueChanges,e.initialRange,e.finalRange);this.pushActionsToUndoStack(t),this.isRangeInAction=!1},keyShortcutChangedCellStart:()=>{this.isRangeInAction=!0},keyShortcutChangedCellEnd:()=>{let e;e=this.rangeService&&iE(this.gos)?new lX(this.cellValueChanges,void 0,void 0,[...this.rangeService.getCellRanges()]):new lq(this.cellValueChanges),this.pushActionsToUndoStack(e),this.isRangeInAction=!1}})}pushActionsToUndoStack(e){this.undoStack.push(e),this.cellValueChanges=[],this.redoStack.clear()}};function l0(e,t,i="auto"){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsService.getGridBodyCtrl().getScrollFeature().ensureColumnVisible(t,i),"ensureVisible")}function l1(e,t,i){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsService.getGridBodyCtrl().getScrollFeature().ensureIndexVisible(t,i),"ensureVisible")}var l2=class extends i2{constructor(){super(...arguments),this.beanName="editService"}wireBeans(e){this.navigationService=e.navigationService,this.userComponentFactory=e.userComponentFactory,this.valueService=e.valueService}startEditing(e,t=null,i=!1,r=null){let s=this.createCellEditorParams(e,t,i),a=e.getColumn().getColDef(),o=this.userComponentFactory.getCellEditorDetails(a,s),n=o?.popupFromSelector!=null?o.popupFromSelector:!!a.cellEditorPopup,l=o?.popupPositionFromSelector!=null?o.popupPositionFromSelector:a.cellEditorPopupPosition;return e.setEditing(!0,o),e.getComp().setEditDetails(o,n,l,this.gos.get("reactiveCustomComponents")),this.eventService.dispatchEvent(e.createEvent(r,"cellEditingStarted")),!o?.params?.suppressPreventDefault}stopEditing(e,t){let i=e.getComp(),{newValue:r,newValueExists:s}=this.takeValueFromCellEditor(t,i),a=e.getRowNode(),o=e.getColumn(),n=this.valueService.getValueForDisplay(o,a),l=!1;return s&&(l=this.saveNewValue(e,n,r,a,o)),e.setEditing(!1,void 0),i.setEditDetails(),e.updateAndFormatValue(!1),e.refreshCell({forceRefresh:!0,suppressFlash:!0}),this.eventService.dispatchEvent({...e.createEvent(null,"cellEditingStopped"),oldValue:n,newValue:r,valueChanged:l}),l}handleColDefChanged(e){let t=e.getCellEditor();if(t?.refresh){let{eventKey:i,cellStartedEdit:r}=e.getEditCompDetails().params,s=this.createCellEditorParams(e,i,r),a=e.getColumn().getColDef(),o=this.userComponentFactory.getCellEditorDetails(a,s);t.refresh(o.params)}}setFocusOutOnEditor(e){let t=e.getComp().getCellEditor();t&&t.focusOut&&t.focusOut()}setFocusInOnEditor(e){let t=e.getComp(),i=t.getCellEditor();i?.focusIn?i.focusIn():(e.focusCell(!0),e.onCellEditorAttached(()=>t.getCellEditor()?.focusIn?.()))}stopEditingAndFocus(e,t=!1,i=!1){e.stopRowOrCellEdit(),e.focusCell(!0),t||this.navigateAfterEdit(i,e.getCellPosition())}createPopupEditorWrapper(e){return new l_(e)}takeValueFromCellEditor(e,t){let i={newValueExists:!1};if(e)return i;let r=t.getCellEditor();return!r||r.isCancelAfterEnd&&r.isCancelAfterEnd()?i:{newValue:r.getValue(),newValueExists:!0}}saveNewValue(e,t,i,r,s){if(i===t)return!1;e.setSuppressRefreshCell(!0);let a=r.setDataValue(s,i,"edit");return e.setSuppressRefreshCell(!1),a}createCellEditorParams(e,t,i){let r=e.getColumn(),s=e.getRowNode();return this.gos.addGridCommonParams({value:this.valueService.getValueForDisplay(r,s),eventKey:t,column:r,colDef:r.getColDef(),rowIndex:e.getCellPosition().rowIndex,node:s,data:s.data,cellStartedEdit:i,onKeyDown:e.onKeyDown.bind(e),stopEditing:e.stopEditingAndFocus.bind(e),eGridCell:e.getGui(),parseValue:t=>this.valueService.parseValue(r,s,t,e.getValue()),formatValue:e.formatValue.bind(e)})}navigateAfterEdit(e,t){if(this.gos.get("enterNavigatesVerticallyAfterEdit")){let i=e?aa.UP:aa.DOWN;this.navigationService.navigateToNextCell(null,i,t,!1)}}},l3=class extends i2{constructor(){super(...arguments),this.beanName="rowEditService"}startEditing(e,t=null,i=null,r=null){let s=!0;return e.getAllCellCtrls().reduce((e,a)=>{let o=a===i;return o?s=a.startEditing(t,o,r):a.startEditing(null,o,r),!!e||a.isEditing()},!1)&&this.setEditing(e,!0),s}stopEditing(e,t=!1){let i=e.getAllCellCtrls(),r=e.isEditing();e.setStoppingRowEdit(!0);let s=!1;for(let e of i){let i=e.stopEditing(t);r&&!t&&!s&&i&&(s=!0)}s&&this.eventService.dispatchEvent(e.createRowEvent("rowValueChanged")),r&&this.setEditing(e,!1),e.setStoppingRowEdit(!1)}setEditing(e,t){e.setEditingRow(t),e.forEachGui(void 0,e=>e.rowComp.addOrRemoveCssClass("ag-row-editing",t));let i=t?e.createRowEvent("rowEditingStarted"):e.createRowEvent("rowEditingStopped");this.eventService.dispatchEvent(i)}},l4={version:o2,moduleName:"@ag-grid-community/edit-core",beans:[l2]},l6={version:o2,moduleName:"@ag-grid-community/default-editor",userComponents:[{name:"agCellEditor",classImp:lU}],dependantModules:[l4]},l5=class extends i2{constructor(){super(...arguments),this.beanName="autoWidthCalculator"}wireBeans(e){this.rowRenderer=e.rowRenderer,this.ctrlsService=e.ctrlsService}postConstruct(){this.ctrlsService.whenReady(this,e=>{this.centerRowContainerCtrl=e.center})}getPreferredWidthForColumn(e,t){let i=this.getHeaderCellForColumn(e);if(!i)return -1;let r=this.rowRenderer.getAllCellsForColumn(e);return t||r.push(i),this.addElementsToContainerAndGetWidth(r)}getPreferredWidthForColumnGroup(e){let t=this.getHeaderCellForColumn(e);return t?this.addElementsToContainerAndGetWidth([t]):-1}addElementsToContainerAndGetWidth(e){let t=document.createElement("form");t.style.position="fixed";let i=this.centerRowContainerCtrl.getContainerElement();e.forEach(e=>this.cloneItemIntoDummy(e,t)),i.appendChild(t);let r=t.offsetWidth;return i.removeChild(t),r+this.getAutoSizePadding()}getAutoSizePadding(){return this.gos.get("autoSizePadding")}getHeaderCellForColumn(e){let t=null;return this.ctrlsService.getHeaderRowContainerCtrls().forEach(i=>{let r=i.getHtmlElementForColumnHeader(e);null!=r&&(t=r)}),t}cloneItemIntoDummy(e,t){let i=e.cloneNode(!0);i.style.width="",i.style.position="static",i.style.left="";let r=document.createElement("div"),s=r.classList;["ag-header-cell","ag-header-group-cell"].some(e=>i.classList.contains(e))?(s.add("ag-header","ag-header-row"),r.style.position="static"):s.add("ag-row");let a=e.parentElement;for(;a;){if(["ag-header-row","ag-row"].some(e=>a.classList.contains(e))){for(let e=0;e<a.classList.length;e++){let t=a.classList[e];"ag-row-position-absolute"!=t&&s.add(t)}break}a=a.parentElement}r.appendChild(i),t.appendChild(r)}},l8=class extends i2{constructor(e,t){super(),this.createRowCon=e,this.destroyRowCtrls=t,this.stickyTopRowCtrls=[],this.stickyBottomRowCtrls=[],this.extraTopHeight=0,this.extraBottomHeight=0}wireBeans(e){this.rowModel=e.rowModel,this.rowRenderer=e.rowRenderer,this.ctrlsService=e.ctrlsService,this.pageBoundsService=e.pageBoundsService}postConstruct(){this.isClientSide=t4(this.gos),this.ctrlsService.whenReady(this,e=>{this.gridBodyCtrl=e.gridBodyCtrl}),this.resetStickyContainers()}getStickyTopRowCtrls(){return this.stickyTopRowCtrls}getStickyBottomRowCtrls(){return this.stickyBottomRowCtrls}setOffsetTop(e){this.extraTopHeight!==e&&(this.extraTopHeight=e,this.eventService.dispatchEvent({type:"stickyTopOffsetChanged",offset:e}))}setOffsetBottom(e){this.extraBottomHeight!==e&&(this.extraBottomHeight=e)}resetOffsets(){this.setOffsetBottom(0),this.setOffsetTop(0)}getExtraTopHeight(){return this.extraTopHeight}getExtraBottomHeight(){return this.extraBottomHeight}getLastPixelOfGroup(e){return this.isClientSide?this.getClientSideLastPixelOfGroup(e):this.getServerSideLastPixelOfGroup(e)}getFirstPixelOfGroup(e){return e.footer?e.sibling.rowTop+e.sibling.rowHeight-1:e.hasChildren()?e.rowTop-1:0}getServerSideLastPixelOfGroup(e){if(this.isClientSide)throw Error("This func should only be called in server side row model.");if(e.isExpandable()||e.footer){if(e.master)return e.detailNode.rowTop+e.detailNode.rowHeight;if(!e.sibling||1===Math.abs(e.sibling.rowIndex-e.rowIndex)){let t=e.childStore?.getStoreBounds();return e.footer&&(t=e.sibling.childStore?.getStoreBounds()),(t?.heightPx??0)+(t?.topPx??0)}return e.footer?e.rowTop+e.rowHeight:e.sibling.rowTop+e.sibling.rowHeight}return Number.MAX_SAFE_INTEGER}getClientSideLastPixelOfGroup(e){if(!this.isClientSide)throw Error("This func should only be called in client side row model.");if(e.isExpandable()||e.footer){if(e.footer&&0===e.rowIndex)return Number.MAX_SAFE_INTEGER;if(!e.sibling||1===Math.abs(e.sibling.rowIndex-e.rowIndex)){let t=e.footer?e.sibling:e;for(;t.isExpandable()&&t.expanded;)if(t.master)t=t.detailNode;else if(t.childrenAfterSort){if(0===t.childrenAfterSort.length)break;t=iB(t.childrenAfterSort)}return t.rowTop+t.rowHeight}return e.footer?e.rowTop+e.rowHeight:e.sibling.rowTop+e.sibling.rowHeight}return Number.MAX_SAFE_INTEGER}updateStickyRows(e){let t="top"===e,i=0;if(!this.canRowsBeSticky())return this.refreshNodesAndContainerHeight(e,new Set,i);let r=t?this.rowRenderer.getFirstVisibleVerticalPixel()-this.extraTopHeight:this.rowRenderer.getLastVisibleVerticalPixel()-this.extraTopHeight,s=new Set,a=e=>{if(s.add(e),t){let t=this.getLastPixelOfGroup(e),s=r+i+e.rowHeight;t<s?e.stickyRowTop=i+(t-s):e.stickyRowTop=i}else{let t=this.getFirstPixelOfGroup(e),s=r-(i+e.rowHeight);t>s?e.stickyRowTop=i-(t-s):e.stickyRowTop=i}i=0,s.forEach(e=>{let t=e.stickyRowTop+e.rowHeight;i<t&&(i=t)})},o=this.areFooterRowsStickySuppressed(),n=this.gos.get("suppressGroupRowsSticky"),l=t=>{if(!t.displayed)return!1;if(t.footer){if(!0===o||"grand"===o&&-1===t.level||"group"===o&&t.level>-1)return!1;let i=!!t.sibling.rowIndex&&t.sibling.rowIndex+1===t.rowIndex;return("bottom"!==e||!i)&&!s.has(t)}return!!t.isExpandable()&&!0!==n&&"bottom"!==e&&!s.has(t)&&t.expanded};for(let e=0;e<100;e++){let e=r+i;t||(e=r-i);let s=this.rowModel.getRowIndexAtPixel(e),o=this.rowModel.getRow(s);if(null==o)break;let n=this.getStickyAncestors(o).find(e=>(t?e.rowIndex<s:e.rowIndex>s)&&l(e));if(n){a(n);continue}if((t?o.rowTop<e:o.rowTop+o.rowHeight>e)&&l(o)){a(o);continue}break}return t||s.forEach(e=>{e.stickyRowTop=i-(e.stickyRowTop+e.rowHeight)}),this.refreshNodesAndContainerHeight(e,s,i)}areFooterRowsStickySuppressed(){let e=this.gos.get("suppressStickyTotalRow");if(!0===e)return!0;let t=!!this.gos.get("groupIncludeFooter")||"group"===e,i=!!this.gos.get("groupIncludeTotalFooter")||"grand"===e;return!!t&&!!i||(i?"grand":!!t&&"group")}canRowsBeSticky(){let e=iu(this.gos),t=this.areFooterRowsStickySuppressed(),i=this.gos.get("suppressGroupRowsSticky");return e&&(!t||!i)}getStickyAncestors(e){let t=[],i=e.footer?e.sibling:e.parent;for(;i;)i.sibling&&t.push(i.sibling),t.push(i),i=i.parent;return t.reverse()}checkStickyRows(){let e=this.updateStickyRows("top"),t=this.updateStickyRows("bottom");return e||t}destroyStickyCtrls(){this.resetStickyContainers()}resetStickyContainers(){this.refreshNodesAndContainerHeight("top",new Set,0),this.refreshNodesAndContainerHeight("bottom",new Set,0)}refreshStickyNode(e){let t=new Set;if(this.stickyTopRowCtrls.some(t=>t.getRowNode()===e)){for(let i=0;i<this.stickyTopRowCtrls.length;i++){let r=this.stickyTopRowCtrls[i].getRowNode();r!==e&&t.add(r)}this.refreshNodesAndContainerHeight("top",t,this.topContainerHeight)&&this.checkStickyRows();return}for(let i=0;i<this.stickyBottomRowCtrls.length;i++){let r=this.stickyBottomRowCtrls[i].getRowNode();r!==e&&t.add(r)}this.refreshNodesAndContainerHeight("bottom",t,this.bottomContainerHeight)&&this.checkStickyRows()}refreshNodesAndContainerHeight(e,t,i){let r="top"===e,s=r?this.stickyTopRowCtrls:this.stickyBottomRowCtrls,a={},o=[];for(let e=0;e<s.length;e++){let i=s[e].getRowNode();if(!t.has(i)){a[i.id]=s[e],i.sticky=!1;continue}o.push(s[e])}let n=new Set;for(let e=0;e<o.length;e++)n.add(o[e].getRowNode());let l=[];t.forEach(e=>{n.has(e)||(e.sticky=!0,l.push(this.createRowCon(e,!1,!1)))});let h=!!l.length||o.length!==s.length;r?this.topContainerHeight!==i&&(this.topContainerHeight=i,this.gridBodyCtrl.setStickyTopHeight(i),h=!0):this.bottomContainerHeight!==i&&(this.bottomContainerHeight=i,this.gridBodyCtrl.setStickyBottomHeight(i),h=!0),this.destroyRowCtrls(a,!1);let d=[...o,...l];d.sort((e,t)=>t.getRowNode().rowIndex-e.getRowNode().rowIndex),r||d.reverse(),d.forEach(e=>e.setRowTop(e.getRowNode().stickyRowTop));let c=0;return r?(t.forEach(e=>{e.rowIndex<this.pageBoundsService.getFirstRow()&&(c+=e.rowHeight)}),c>this.topContainerHeight&&(c=this.topContainerHeight),this.setOffsetTop(c)):(t.forEach(e=>{e.rowIndex>this.pageBoundsService.getLastRow()&&(c+=e.rowHeight)}),c>this.bottomContainerHeight&&(c=this.bottomContainerHeight),this.setOffsetBottom(c)),!!h&&(r?this.stickyTopRowCtrls=d:this.stickyBottomRowCtrls=d,!0)}ensureRowHeightsValid(){let e=!1,t=t=>{let i=t.getRowNode();if(i.rowHeightEstimated){let t=ie(this.gos,i);i.setRowHeight(t.height),e=!0}};return this.stickyTopRowCtrls.forEach(t),this.stickyBottomRowCtrls.forEach(t),e}},l7=class extends i2{constructor(){super(...arguments),this.beanName="rowRenderer",this.destroyFuncsForColumnListeners=[],this.rowCtrlsByRowIndex={},this.zombieRowCtrls={},this.allRowCtrls=[],this.topRowCtrls=[],this.bottomRowCtrls=[],this.refreshInProgress=!1,this.dataFirstRenderedFired=!1,this.setupRangeSelectionListeners=()=>{let e=()=>{this.getAllCellCtrls().forEach(e=>e.onCellSelectionChanged())},t=()=>{this.getAllCellCtrls().forEach(e=>e.updateRangeBordersIfRangeCount())},i=()=>{this.eventService.addEventListener("cellSelectionChanged",e),this.eventService.addEventListener("columnMoved",t),this.eventService.addEventListener("columnPinned",t),this.eventService.addEventListener("columnVisible",t)},r=()=>{this.eventService.removeEventListener("cellSelectionChanged",e),this.eventService.removeEventListener("columnMoved",t),this.eventService.removeEventListener("columnPinned",t),this.eventService.removeEventListener("columnVisible",t)};this.addDestroyFunc(()=>r()),this.addManagedPropertyListeners(["enableRangeSelection","selection"],()=>{iE(this.gos)?i():r()}),iE(this.gos)&&i()}}wireBeans(e){this.animationFrameService=e.animationFrameService,this.paginationService=e.paginationService,this.pageBoundsService=e.pageBoundsService,this.columnModel=e.columnModel,this.visibleColsService=e.visibleColsService,this.pinnedRowModel=e.pinnedRowModel,this.rowModel=e.rowModel,this.focusService=e.focusService,this.beans=e,this.rowContainerHeightService=e.rowContainerHeightService,this.ctrlsService=e.ctrlsService,this.environment=e.environment}postConstruct(){this.ctrlsService.whenReady(this,e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.initialise()})}initialise(){this.addManagedEventListeners({paginationChanged:this.onPageLoaded.bind(this),pinnedRowDataChanged:this.onPinnedRowDataChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),bodyScroll:this.onBodyScroll.bind(this),bodyHeightChanged:this.redraw.bind(this,{})}),this.addManagedPropertyListeners(["domLayout","embedFullWidthRows"],()=>this.onDomLayoutChanged()),this.addManagedPropertyListeners(["suppressMaxRenderedRowRestriction","rowBuffer"],()=>this.redraw()),this.addManagedPropertyListener("suppressCellFocus",e=>this.onSuppressCellFocusChanged(e.currentValue)),this.addManagedPropertyListeners(["getBusinessKeyForNode","fullWidthCellRenderer","fullWidthCellRendererParams","rowStyle","getRowStyle","rowClass","getRowClass","rowClassRules","suppressStickyTotalRow","groupRowRenderer","groupRowRendererParams","loadingCellRenderer","loadingCellRendererParams","detailCellRenderer","detailCellRendererParams","enableRangeSelection","enableCellTextSelection","selection"],()=>this.redrawRows()),iu(this.gos)&&(t4(this.gos)||t6(this.gos))&&(this.stickyRowFeature=this.createManagedBean(new l8(this.createRowCon.bind(this),this.destroyRowCtrls.bind(this)))),this.registerCellEventListeners(),this.initialiseCache(),this.printLayout=t5(this.gos,"print"),this.embedFullWidthRows=this.printLayout||this.gos.get("embedFullWidthRows"),this.redrawAfterModelUpdate()}initialiseCache(){if(this.gos.get("keepDetailRows")){let e=this.getKeepDetailRowsCount();this.cachedRowCtrls=new l9(null!=e?e:3)}}getKeepDetailRowsCount(){return this.gos.get("keepDetailRowsCount")}getStickyTopRowCtrls(){return this.stickyRowFeature?this.stickyRowFeature.getStickyTopRowCtrls():[]}getStickyBottomRowCtrls(){return this.stickyRowFeature?this.stickyRowFeature.getStickyBottomRowCtrls():[]}updateAllRowCtrls(){let e=rh(this.rowCtrlsByRowIndex),t=rh(this.zombieRowCtrls),i=this.cachedRowCtrls?this.cachedRowCtrls.getEntries():[];t.length>0||i.length>0?this.allRowCtrls=[...e,...t,...i]:this.allRowCtrls=e}onCellFocusChanged(e){this.getAllCellCtrls().forEach(t=>t.onCellFocused(e)),this.getFullWidthRowCtrls().forEach(t=>t.onFullWidthRowFocused(e))}onSuppressCellFocusChanged(e){this.getAllCellCtrls().forEach(t=>t.onSuppressCellFocusChanged(e)),this.getFullWidthRowCtrls().forEach(t=>t.onSuppressCellFocusChanged(e))}registerCellEventListeners(){this.addManagedEventListeners({cellFocused:e=>{this.onCellFocusChanged(e)},cellFocusCleared:()=>this.onCellFocusChanged(),flashCells:e=>{this.getAllCellCtrls().forEach(t=>t.onFlashCells(e))},columnHoverChanged:()=>{this.getAllCellCtrls().forEach(e=>e.onColumnHover())},displayedColumnsChanged:()=>{this.getAllCellCtrls().forEach(e=>e.onDisplayedColumnsChanged())},displayedColumnsWidthChanged:()=>{this.printLayout&&this.getAllCellCtrls().forEach(e=>e.onLeftChanged())}}),this.setupRangeSelectionListeners(),this.refreshListenersToColumnsForCellComps(),this.addManagedEventListeners({gridColumnsChanged:this.refreshListenersToColumnsForCellComps.bind(this)}),this.addDestroyFunc(this.removeGridColumnListeners.bind(this))}removeGridColumnListeners(){this.destroyFuncsForColumnListeners.forEach(e=>e()),this.destroyFuncsForColumnListeners.length=0}refreshListenersToColumnsForCellComps(){this.removeGridColumnListeners(),this.columnModel.getCols().forEach(e=>{let t=t=>{this.getAllCellCtrls().forEach(i=>{i.getColumn()===e&&t(i)})},i=()=>{t(e=>e.onLeftChanged())},r=()=>{t(e=>e.onWidthChanged())},s=()=>{t(e=>e.onFirstRightPinnedChanged())},a=()=>{t(e=>e.onLastLeftPinnedChanged())},o=()=>{t(e=>e.onColDefChanged())};e.addEventListener("leftChanged",i),e.addEventListener("widthChanged",r),e.addEventListener("firstRightPinnedChanged",s),e.addEventListener("lastLeftPinnedChanged",a),e.addEventListener("colDefChanged",o),this.destroyFuncsForColumnListeners.push(()=>{e.removeEventListener("leftChanged",i),e.removeEventListener("widthChanged",r),e.removeEventListener("firstRightPinnedChanged",s),e.removeEventListener("lastLeftPinnedChanged",a),e.removeEventListener("colDefChanged",o)})})}onDomLayoutChanged(){let e=t5(this.gos,"print"),t=e||this.gos.get("embedFullWidthRows"),i=t!==this.embedFullWidthRows||this.printLayout!==e;this.printLayout=e,this.embedFullWidthRows=t,i&&this.redrawAfterModelUpdate({domLayoutChanged:!0})}datasourceChanged(){this.firstRenderedRow=0,this.lastRenderedRow=-1;let e=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(e)}onPageLoaded(e){let t={recycleRows:e.keepRenderedRows,animate:e.animate,newData:e.newData,newPage:e.newPage,onlyBody:!0};this.redrawAfterModelUpdate(t)}getAllCellsForColumn(e){let t=[];return this.getAllRowCtrls().forEach(i=>{let r=i.getCellElement(e);r&&t.push(r)}),t}refreshFloatingRowComps(){this.refreshFloatingRows(this.topRowCtrls,"top"),this.refreshFloatingRows(this.bottomRowCtrls,"bottom")}getTopRowCtrls(){return this.topRowCtrls}getCentreRowCtrls(){return this.allRowCtrls}getBottomRowCtrls(){return this.bottomRowCtrls}refreshFloatingRows(e,t){let{pinnedRowModel:i,beans:r,printLayout:s}=this,a=Object.fromEntries(e.map(e=>[e.getRowNode().id,e]));i.forEachPinnedRow(t,(o,n)=>{let l=e[n];l&&void 0===i.getPinnedRowById(l.getRowNode().id,t)&&(l.destroyFirstPass(),l.destroySecondPass()),o.id in a?(e[n]=a[o.id],delete a[o.id]):e[n]=new le(o,r,!1,!1,s)});let o="top"===t?i.getPinnedTopRowCount():i.getPinnedBottomRowCount();e.length=o}onPinnedRowDataChanged(){this.redrawAfterModelUpdate({recycleRows:!0})}redrawRow(e,t=!1){if(e.sticky)this.stickyRowFeature.refreshStickyNode(e);else if(this.cachedRowCtrls?.has(e)){this.cachedRowCtrls.removeRow(e);return}else{let t=t=>{let i=t[e.rowIndex];i&&i.getRowNode()===e&&(i.destroyFirstPass(),i.destroySecondPass(),t[e.rowIndex]=this.createRowCon(e,!1,!1))};switch(e.rowPinned){case"top":t(this.topRowCtrls);break;case"bottom":t(this.bottomRowCtrls);break;default:t(this.rowCtrlsByRowIndex),this.updateAllRowCtrls()}}t||this.dispatchDisplayedRowsChanged(!1)}redrawRows(e){if(null!=e){e?.forEach(e=>this.redrawRow(e,!0)),this.dispatchDisplayedRowsChanged(!1);return}this.redrawAfterModelUpdate()}getCellToRestoreFocusToAfterRefresh(e){let t=e?.suppressKeepFocus?null:this.focusService.getFocusCellToUseAfterRefresh();if(null==t)return null;let i=ih(this.gos),r=ir(this.gos,i,n7.DOM_DATA_KEY_CELL_CTRL),s=ir(this.gos,i,le.DOM_DATA_KEY_ROW_CTRL);return r||s?t:null}redrawAfterModelUpdate(e={}){this.getLockOnRefresh();let t=this.getCellToRestoreFocusToAfterRefresh(e);this.updateContainerHeights(),this.scrollToTopIfNewData(e);let i=!e.domLayoutChanged&&!!e.recycleRows,r=e.animate&&ic(this.gos),s=i?this.getRowsToRecycle():null;if(i||this.removeAllRowComps(),this.workOutFirstAndLastRowsToRender(),this.stickyRowFeature){this.stickyRowFeature.checkStickyRows();let e=this.stickyRowFeature.getExtraTopHeight()+this.stickyRowFeature.getExtraBottomHeight();e&&this.updateContainerHeights(e)}this.recycleRows(s,r),this.gridBodyCtrl.updateRowCount(),e.onlyBody||this.refreshFloatingRowComps(),this.dispatchDisplayedRowsChanged(),null!=t&&this.restoreFocusedCell(t),this.releaseLockOnRefresh()}scrollToTopIfNewData(e){let t=e.newData||e.newPage,i=this.gos.get("suppressScrollOnNewData");t&&!i&&(this.gridBodyCtrl.getScrollFeature().scrollToTop(),this.stickyRowFeature?.resetOffsets())}updateContainerHeights(e=0){if(this.printLayout){this.rowContainerHeightService.setModelHeight(null);return}let t=this.pageBoundsService.getCurrentPageHeight();0===t&&(t=1),this.rowContainerHeightService.setModelHeight(t+e)}getLockOnRefresh(){if(this.refreshInProgress)throw Error("AG Grid: cannot get grid to draw rows when it is in the middle of drawing rows. Your code probably called a grid API method while the grid was in the render stage. To overcome this, put the API call into a timeout, e.g. instead of api.redrawRows(), call setTimeout(function() { api.redrawRows(); }, 0). To see what part of your code that caused the refresh check this stacktrace.");this.refreshInProgress=!0,this.frameworkOverrides.getLockOnRefresh?.()}releaseLockOnRefresh(){this.refreshInProgress=!1,this.frameworkOverrides.releaseLockOnRefresh?.()}isRefreshInProgress(){return this.refreshInProgress}restoreFocusedCell(e){e&&this.focusService.restoreFocusedCell(e,()=>{this.onCellFocusChanged(this.gos.addGridCommonParams({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,type:"cellFocused"}))})}stopEditing(e=!1){this.getAllRowCtrls().forEach(t=>{t.stopEditing(e)})}getAllCellCtrls(){let e=[],t=this.getAllRowCtrls(),i=t.length;for(let r=0;r<i;r++){let i=t[r].getAllCellCtrls(),s=i.length;for(let t=0;t<s;t++)e.push(i[t])}return e}getAllRowCtrls(){let e=this.stickyRowFeature&&this.stickyRowFeature.getStickyTopRowCtrls()||[],t=this.stickyRowFeature&&this.stickyRowFeature.getStickyBottomRowCtrls()||[],i=[...this.topRowCtrls,...this.bottomRowCtrls,...e,...t];for(let e in this.rowCtrlsByRowIndex)i.push(this.rowCtrlsByRowIndex[e]);return i}addRenderedRowListener(e,t,i){let r=this.rowCtrlsByRowIndex[t];r&&r.addEventListener(e,i)}flashCells(e={}){this.getCellCtrls(e.rowNodes,e.columns).forEach(t=>t.flashCell(e))}refreshCells(e={}){let t={forceRefresh:e.force,newData:!1,suppressFlash:e.suppressFlash};for(let i of this.getCellCtrls(e.rowNodes,e.columns))i.refreshOrDestroyCell(t);this.refreshFullWidth(e.rowNodes)}refreshFullWidth(e){if(!e)return;let t=null;for(let i of(this.stickyRowFeature&&su()&&(t=this.getCellToRestoreFocusToAfterRefresh()||null),this.getRowCtrls(e)))i.isFullWidth()&&(i.refreshFullWidth()||this.redrawRow(i.getRowNode(),!0));this.dispatchDisplayedRowsChanged(!1),t&&this.restoreFocusedCell(t)}getCellRendererInstances(e){let t=this.getCellCtrls(e.rowNodes,e.columns).map(e=>e.getCellRenderer()).filter(e=>null!=e);if(e.columns?.length)return t;let i=[],r=this.mapRowNodes(e.rowNodes);return this.getAllRowCtrls().forEach(e=>{if(r&&!this.isRowInMap(e.getRowNode(),r)||!e.isFullWidth())return;let t=e.getFullWidthCellRenderers();for(let e=0;e<t.length;e++){let r=t[e];null!=r&&i.push(r)}}),[...i,...t]}getCellEditorInstances(e){let t=[];return this.getCellCtrls(e.rowNodes,e.columns).forEach(e=>{let i=e.getCellEditor();i&&t.push(i)}),t}getEditingCells(){let e=[];return this.getAllCellCtrls().forEach(t=>{if(t.isEditing()){let i=t.getCellPosition();e.push(i)}}),e}mapRowNodes(e){if(!e)return;let t={top:{},bottom:{},normal:{}};return e.forEach(e=>{let i=e.id;switch(e.rowPinned){case"top":t.top[i]=e;break;case"bottom":t.bottom[i]=e;break;default:t.normal[i]=e}}),t}isRowInMap(e,t){let i=e.id;switch(e.rowPinned){case"top":return null!=t.top[i];case"bottom":return null!=t.bottom[i];default:return null!=t.normal[i]}}getRowCtrls(e){let t=this.mapRowNodes(e),i=this.getAllRowCtrls();return e&&t?i.filter(e=>{let i=e.getRowNode();return this.isRowInMap(i,t)}):i}getCellCtrls(e,t){let i;tY(t)&&(i={},t.forEach(e=>{let t=this.columnModel.getCol(e);tY(t)&&(i[t.getId()]=!0)}));let r=[];return this.getRowCtrls(e).forEach(e=>{e.getAllCellCtrls().forEach(e=>{let t=e.getColumn().getId();(!i||i[t])&&r.push(e)})}),r}destroy(){this.removeAllRowComps(!0),super.destroy()}removeAllRowComps(e=!1){let t=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(t,e),this.stickyRowFeature&&this.stickyRowFeature.destroyStickyCtrls()}getRowsToRecycle(){let e=[];ro(this.rowCtrlsByRowIndex,(t,i)=>{null==i.getRowNode().id&&e.push(t)}),this.removeRowCtrls(e);let t={};return ro(this.rowCtrlsByRowIndex,(e,i)=>{t[i.getRowNode().id]=i}),this.rowCtrlsByRowIndex={},t}removeRowCtrls(e,t=!1){e.forEach(e=>{let i=this.rowCtrlsByRowIndex[e];i&&(i.destroyFirstPass(t),i.destroySecondPass()),delete this.rowCtrlsByRowIndex[e]})}onBodyScroll(e){"vertical"===e.direction&&this.redraw({afterScroll:!0})}redraw(e={}){let t;let{afterScroll:i}=e;this.stickyRowFeature&&su()&&(t=this.getCellToRestoreFocusToAfterRefresh()||void 0);let r=this.firstRenderedRow,s=this.lastRenderedRow;this.workOutFirstAndLastRowsToRender();let a=!1;if(this.stickyRowFeature){a=this.stickyRowFeature.checkStickyRows();let e=this.stickyRowFeature.getExtraTopHeight()+this.stickyRowFeature.getExtraBottomHeight();e&&this.updateContainerHeights(e)}let o=this.firstRenderedRow!==r||this.lastRenderedRow!==s;if((!i||a||o)&&(this.getLockOnRefresh(),this.recycleRows(null,!1,i),this.releaseLockOnRefresh(),this.dispatchDisplayedRowsChanged(i&&!a),null!=t)){let e=this.getCellToRestoreFocusToAfterRefresh();null!=t&&null==e&&(this.animationFrameService.flushAllFrames(),this.restoreFocusedCell(t))}}removeRowCompsNotToDraw(e,t){let i={};e.forEach(e=>i[e]=!0);let r=Object.keys(this.rowCtrlsByRowIndex).filter(e=>!i[e]);this.removeRowCtrls(r,t)}calculateIndexesToDraw(e){let t=function(e,t){let i=[];for(let r=e;r<=t;r++)i.push(r);return i}(this.firstRenderedRow,this.lastRenderedRow),i=(e,i)=>{let r=i.getRowNode().rowIndex;null!=r&&(r<this.firstRenderedRow||r>this.lastRenderedRow)&&this.doNotUnVirtualiseRow(i)&&t.push(r)};ro(this.rowCtrlsByRowIndex,i),ro(e,i),t.sort((e,t)=>e-t);let r=[];for(let e=0;e<t.length;e++){let i=t[e],s=this.rowModel.getRow(i);s&&!s.sticky&&r.push(i)}return r}recycleRows(e,t=!1,i=!1){let r=this.calculateIndexesToDraw(e);(this.printLayout||i)&&(t=!1),this.removeRowCompsNotToDraw(r,!t);let s=[];r.forEach(r=>{let a=this.createOrUpdateRowCtrl(r,e,t,i);tY(a)&&s.push(a)}),e&&(!i||this.gos.get("suppressAnimationFrame")||this.printLayout?this.destroyRowCtrls(e,t):this.beans.animationFrameService.addDestroyTask(()=>{this.destroyRowCtrls(e,t),this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged()})),this.updateAllRowCtrls()}dispatchDisplayedRowsChanged(e=!1){this.eventService.dispatchEvent({type:"displayedRowsChanged",afterScroll:e})}onDisplayedColumnsChanged(){let e=this.visibleColsService.isPinningLeft(),t=this.visibleColsService.isPinningRight();(this.pinningLeft!==e||t!==this.pinningRight)&&(this.pinningLeft=e,this.pinningRight=t,this.embedFullWidthRows&&this.redrawFullWidthEmbeddedRows())}redrawFullWidthEmbeddedRows(){let e=[];this.getFullWidthRowCtrls().forEach(t=>{let i=t.getRowNode().rowIndex;e.push(i.toString())}),this.refreshFloatingRowComps(),this.removeRowCtrls(e),this.redraw({afterScroll:!0})}getFullWidthRowCtrls(e){let t=this.mapRowNodes(e);return this.getAllRowCtrls().filter(e=>{if(!e.isFullWidth())return!1;let i=e.getRowNode();return!!(null==t||this.isRowInMap(i,t))})}createOrUpdateRowCtrl(e,t,i,r){let s;let a=this.rowCtrlsByRowIndex[e];if(!a&&tY(s=this.rowModel.getRow(e))&&tY(t)&&t[s.id]&&s.alreadyRendered&&(a=t[s.id],t[s.id]=null),!a){if(s||(s=this.rowModel.getRow(e)),!tY(s))return;a=this.createRowCon(s,i,r)}return s&&(s.alreadyRendered=!0),this.rowCtrlsByRowIndex[e]=a,a}destroyRowCtrls(e,t){let i=[];ro(e,(e,r)=>{if(r){if(this.cachedRowCtrls&&r.isCacheable()){this.cachedRowCtrls.addRow(r);return}if(r.destroyFirstPass(!t),t){let e=r.instanceId;this.zombieRowCtrls[e]=r,i.push(()=>{r.destroySecondPass(),delete this.zombieRowCtrls[e]})}else r.destroySecondPass()}}),t&&(i.push(()=>{this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged()}),function(e,t=0){e.length>0&&window.setTimeout(()=>e.forEach(e=>e()),t)}(i,400))}getRowBuffer(){return this.gos.get("rowBuffer")}getRowBufferInPixels(){return this.getRowBuffer()*it(this.gos)}workOutFirstAndLastRowsToRender(){let e,t;if(this.rowContainerHeightService.updateOffset(),this.rowModel.isRowsToRender()){if(this.printLayout)this.environment.refreshRowHeightVariable(),e=this.pageBoundsService.getFirstRow(),t=this.pageBoundsService.getLastRow();else{let i,r;let s=this.getRowBufferInPixels(),a=this.ctrlsService.getGridBodyCtrl(),o=this.gos.get("suppressRowVirtualisation"),n=!1;do{let e=this.pageBoundsService.getPixelOffset(),{pageFirstPixel:t,pageLastPixel:l}=this.pageBoundsService.getCurrentPagePixelRange(),h=this.rowContainerHeightService.getDivStretchOffset(),d=a.getScrollFeature().getVScrollPosition(),c=d.top,u=d.bottom;o?(i=t+h,r=l+h):(i=Math.max(c+e-s,t)+h,r=Math.min(u+e+s,l)+h),this.firstVisibleVPixel=Math.max(c+e,t)+h,this.lastVisibleVPixel=Math.min(u+e,l)+h,n=this.ensureAllRowsInRangeHaveHeightsCalculated(i,r)}while(n);let l=this.rowModel.getRowIndexAtPixel(i),h=this.rowModel.getRowIndexAtPixel(r),d=this.pageBoundsService.getFirstRow(),c=this.pageBoundsService.getLastRow();l<d&&(l=d),h>c&&(h=c),e=l,t=h}}else e=0,t=-1;let i=t5(this.gos,"normal"),r=this.gos.get("suppressMaxRenderedRowRestriction"),s=Math.max(this.getRowBuffer(),500);i&&!r&&t-e>s&&(t=e+s);let a=e!==this.firstRenderedRow,o=t!==this.lastRenderedRow;(a||o)&&(this.firstRenderedRow=e,this.lastRenderedRow=t,this.eventService.dispatchEvent({type:"viewportChanged",firstRow:e,lastRow:t}))}dispatchFirstDataRenderedEvent(){this.dataFirstRenderedFired||(this.dataFirstRenderedFired=!0,window.requestAnimationFrame(()=>{this.beans.eventService.dispatchEvent({type:"firstDataRendered",firstRow:this.firstRenderedRow,lastRow:this.lastRenderedRow})}))}ensureAllRowsInRangeHaveHeightsCalculated(e,t){let i=this.pinnedRowModel?.ensureRowHeightsValid(),r=this.stickyRowFeature?.ensureRowHeightsValid(),s=this.rowModel.ensureRowHeightsValid(e,t,this.pageBoundsService.getFirstRow(),this.pageBoundsService.getLastRow());return(s||r)&&this.eventService.dispatchEvent({type:"recalculateRowBounds"}),(!!r||!!s||!!i)&&(this.updateContainerHeights(),!0)}getFirstVisibleVerticalPixel(){return this.firstVisibleVPixel}getLastVisibleVerticalPixel(){return this.lastVisibleVPixel}getFirstVirtualRenderedRow(){return this.firstRenderedRow}getLastVirtualRenderedRow(){return this.lastRenderedRow}doNotUnVirtualiseRow(e){let t=e.getRowNode(),i=this.focusService.isRowNodeFocused(t),r=e.isEditing(),s=t.detail;return(!!i||!!r||!!s)&&!!this.isRowPresent(t)}isRowPresent(e){return!!this.rowModel.isRowPresent(e)&&(!this.paginationService||this.paginationService.isRowPresent(e))}createRowCon(e,t,i){let r=this.cachedRowCtrls?this.cachedRowCtrls.getRow(e):null;if(r)return r;let s=this.gos.get("suppressAnimationFrame"),a=i&&!s&&!this.printLayout;return new le(e,this.beans,t,a,this.printLayout)}getRenderedNodes(){return Object.values(this.rowCtrlsByRowIndex).map(e=>e.getRowNode())}getRowByPosition(e){let t;let{rowIndex:i}=e;switch(e.rowPinned){case"top":t=this.topRowCtrls[i];break;case"bottom":t=this.bottomRowCtrls[i];break;default:(t=this.rowCtrlsByRowIndex[i])||(t=this.getStickyTopRowCtrls().find(e=>e.getRowNode().rowIndex===i)||null)||(t=this.getStickyBottomRowCtrls().find(e=>e.getRowNode().rowIndex===i)||null)}return t}isRangeInRenderedViewport(e,t){if(null==e||null==t)return!1;let i=e>this.lastRenderedRow;return!(t<this.firstRenderedRow)&&!i}},l9=class{constructor(e){this.entriesMap={},this.entriesList=[],this.maxCount=e}addRow(e){if(this.entriesMap[e.getRowNode().id]=e,this.entriesList.push(e),e.setCached(!0),this.entriesList.length>this.maxCount){let e=this.entriesList[0];e.destroyFirstPass(),e.destroySecondPass(),this.removeFromCache(e)}}getRow(e){if(null==e||null==e.id)return null;let t=this.entriesMap[e.id];return t?(this.removeFromCache(t),t.setCached(!1),t.getRowNode()!=e?null:t):null}has(e){return null!=this.entriesMap[e.id]}removeRow(e){let t=e.id,i=this.entriesMap[t];delete this.entriesMap[t],i_(this.entriesList,i)}removeFromCache(e){let t=e.getRowNode().id;delete this.entriesMap[t],i_(this.entriesList,e)}getEntries(){return this.entriesList}},he=class extends i2{constructor(){super(...arguments),this.beanName="pinnedRowModel",this.nextId=0,this.pinnedTopRows=new ht,this.pinnedBottomRows=new ht}wireBeans(e){this.beans=e}postConstruct(){this.setPinnedRowData(this.gos.get("pinnedTopRowData"),"top"),this.setPinnedRowData(this.gos.get("pinnedBottomRowData"),"bottom"),this.addManagedPropertyListener("pinnedTopRowData",e=>this.setPinnedRowData(e.currentValue,"top")),this.addManagedPropertyListener("pinnedBottomRowData",e=>this.setPinnedRowData(e.currentValue,"bottom")),this.addManagedEventListeners({gridStylesChanged:this.onGridStylesChanges.bind(this)})}isEmpty(e){return("top"===e?this.pinnedTopRows:this.pinnedBottomRows).isEmpty()}isRowsToRender(e){return!this.isEmpty(e)}onGridStylesChanges(e){if(e.rowHeightChanged){let e=e=>{e.setRowHeight(e.rowHeight,!0)};this.pinnedBottomRows.forEach(e),this.pinnedTopRows.forEach(e)}}ensureRowHeightsValid(){let e=!1,t=0,i=i=>{if(i.rowHeightEstimated){let r=ie(this.gos,i);i.setRowTop(t),i.setRowHeight(r.height),t+=r.height,e=!0}};return this.pinnedBottomRows?.forEach(i),t=0,this.pinnedTopRows?.forEach(i),this.eventService.dispatchEvent({type:"pinnedHeightChanged"}),e}setPinnedRowData(e,t){this.updateNodesFromRowData(e,t),this.eventService.dispatchEvent({type:"pinnedRowDataChanged"})}updateNodesFromRowData(e,t){let i="top"===t?this.pinnedTopRows:this.pinnedBottomRows;if(void 0===e){i.clear();return}let r=iw(this.gos),s="top"===t?a7.ID_PREFIX_TOP_PINNED:a7.ID_PREFIX_BOTTOM_PINNED,a=i.getIds(),o=[],n=new Set,l=0,h=-1;for(let d of e){let e=r?.({data:d,level:0,rowPinned:t})??s+this.nextId++;if(n.has(e)){tO("Duplicate ID",e,"found for pinned row with data",d,"When `getRowId` is defined, it must return unique IDs for all pinned rows. Use the `rowPinned` parameter.");continue}h++,n.add(e),o.push(e);let c=i.getById(e);if(void 0!==c)c.data!==d&&c.setData(d),l+=this.setRowTopAndRowIndex(c,l,h),a.delete(e);else{let r=new a7(this.beans);r.id=e,r.data=d,r.rowPinned=t,l+=this.setRowTopAndRowIndex(r,l,h),i.push(r)}}a.forEach(e=>{i.getById(e)?.clearRowTopAndRowIndex()}),i.removeAllById(a),i.setOrder(o)}setRowTopAndRowIndex(e,t,i){return e.setRowTop(t),e.setRowHeight(ie(this.gos,e).height),e.setRowIndex(i),e.rowHeight}getPinnedTopTotalHeight(){return this.getTotalHeight(this.pinnedTopRows)}getPinnedBottomTotalHeight(){return this.getTotalHeight(this.pinnedBottomRows)}getPinnedTopRowCount(){return this.pinnedTopRows.getSize()}getPinnedBottomRowCount(){return this.pinnedBottomRows.getSize()}getPinnedTopRow(e){return this.pinnedTopRows.getByIndex(e)}getPinnedBottomRow(e){return this.pinnedBottomRows.getByIndex(e)}getPinnedRowById(e,t){return"top"===t?this.pinnedTopRows.getById(e):this.pinnedBottomRows.getById(e)}forEachPinnedRow(e,t){return"top"===e?this.pinnedTopRows.forEach(t):this.pinnedBottomRows.forEach(t)}getTotalHeight(e){let t=e.getSize();if(0===t)return 0;let i=e.getByIndex(t-1);return void 0===i?0:i.rowTop+i.rowHeight}},ht=class{constructor(){this.cache={},this.ordering=[]}getById(e){return this.cache[e]}getByIndex(e){let t=this.ordering[e];return this.cache[t]}push(e){this.cache[e.id]=e,this.ordering.push(e.id)}removeAllById(e){for(let t of e)delete this.cache[t];this.ordering=this.ordering.filter(t=>!e.has(t))}setOrder(e){this.ordering=e}forEach(e){this.ordering.forEach((t,i)=>{let r=this.cache[t];r&&e(r,i)})}clear(){this.ordering.length=0,this.cache={}}isEmpty(){return 0===this.ordering.length}getSize(){return this.ordering.length}getIds(){return new Set(this.ordering)}},hi=((y=hi||{}).Applied="Applied",y.StoreNotFound="StoreNotFound",y.StoreLoading="StoreLoading",y.StoreWaitingToLoad="StoreWaitingToLoad",y.StoreLoadingFailed="StoreLoadingFailed",y.StoreWrongType="StoreWrongType",y.Cancelled="Cancelled",y.StoreNotStarted="StoreNotStarted",y),hr=class extends i2{constructor(e){super(),this.state="needsLoading",this.version=0,this.id=e}getId(){return this.id}load(){this.state="loading",this.loadFromDatasource()}getVersion(){return this.version}setStateWaitingToLoad(){this.version++,this.state="needsLoading"}getState(){return this.state}pageLoadFailed(e){this.isRequestMostRecentAndLive(e)&&(this.state="failed",this.processServerFail()),this.dispatchLoadCompleted(!1)}success(e,t){this.successCommon(e,t)}pageLoaded(e,t,i){this.successCommon(e,{rowData:t,rowCount:i})}isRequestMostRecentAndLive(e){let t=e===this.version,i=this.isAlive();return t&&i}successCommon(e,t){this.dispatchLoadCompleted(),this.isRequestMostRecentAndLive(e)&&(this.state="loaded",this.processServerResult(t))}dispatchLoadCompleted(e=!0){this.dispatchLocalEvent({type:"loadComplete",success:e,block:this})}},hs={version:o2,moduleName:"@ag-grid-community/row-node-block",beans:[class extends i2{constructor(){super(...arguments),this.beanName="rowNodeBlockLoader",this.activeBlockLoadsCount=0,this.blocks=[],this.active=!0}wireBeans(e){this.rowModel=e.rowModel}postConstruct(){this.maxConcurrentRequests=this.getMaxConcurrentDatasourceRequests();let e=this.gos.get("blockLoadDebounceMillis");e&&e>0&&(this.checkBlockToLoadDebounce=tj(this.performCheckBlocksToLoad.bind(this),e))}getMaxConcurrentDatasourceRequests(){let e=this.gos.get("maxConcurrentDatasourceRequests");return null==e?2:e<=0?void 0:e}addBlock(e){this.blocks.push(e),e.addEventListener("loadComplete",this.loadComplete.bind(this)),this.checkBlockToLoad()}removeBlock(e){i_(this.blocks,e)}destroy(){super.destroy(),this.active=!1}loadComplete(){this.activeBlockLoadsCount--,this.checkBlockToLoad(),this.dispatchLocalEvent({type:"blockLoaded"}),0==this.activeBlockLoadsCount&&this.dispatchLocalEvent({type:"blockLoaderFinished"})}checkBlockToLoad(){this.checkBlockToLoadDebounce?this.checkBlockToLoadDebounce():this.performCheckBlocksToLoad()}performCheckBlocksToLoad(){if(!this.active)return;if(this.printCacheStatus(),null!=this.maxConcurrentRequests&&this.activeBlockLoadsCount>=this.maxConcurrentRequests){this.gos.get("debug")&&tN("RowNodeBlockLoader - checkBlockToLoad: max loads exceeded");return}let e=this.getAvailableLoadingCount(),t=this.blocks.filter(e=>"needsLoading"===e.getState()).slice(0,e);this.registerLoads(t.length),t.forEach(e=>e.load()),this.printCacheStatus()}getBlockState(){if(t6(this.gos))return this.rowModel.getBlockStates();let e={};return this.blocks.forEach(t=>{let{id:i,state:r}=t.getBlockStateJson();e[i]=r}),e}printCacheStatus(){this.gos.get("debug")&&tN(`RowNodeBlockLoader - printCacheStatus: activePageLoadsCount = ${this.activeBlockLoadsCount}, blocks = ${JSON.stringify(this.getBlockState())}`)}isLoading(){return this.activeBlockLoadsCount>0}registerLoads(e){this.activeBlockLoadsCount+=e}getAvailableLoadingCount(){return void 0!==this.maxConcurrentRequests?this.maxConcurrentRequests-this.activeBlockLoadsCount:void 0}}]},ha=class{constructor(){this.root=null,this.end=null,this.cachedRange=[]}init(e){this.rowModel=e}reset(){this.root=null,this.end=null,this.cachedRange.length=0}setRoot(e){this.root=e,this.end=null,this.cachedRange.length=0}setEndRange(e){this.end=e,this.cachedRange.length=0}getRange(){if(0===this.cachedRange.length){let e=this.getRoot(),t=this.getEnd();if(null==e||null==t)return this.cachedRange;this.cachedRange=this.rowModel.getNodesInRangeForSelection(e,t)}return this.cachedRange}isInRange(e){return null!==this.root&&this.getRange().some(t=>t.id===e.id)}getRoot(){return this.root&&this.root?.key===null&&(this.root=this.rowModel.getRowNode(this.root.id)??null),this.root}getEnd(){return this.end&&this.end?.key===null&&(this.end=this.rowModel.getRowNode(this.end.id)??null),this.end}truncate(e){let t=this.getRange();if(0===t.length)return{keep:[],discard:[]};let i=t[0].id===this.root.id,r=t.findIndex(t=>t.id===e.id);if(!(r>-1))return{keep:t,discard:[]};{let s=t.slice(0,r),a=t.slice(r+1);return this.setEndRange(e),i?{keep:s,discard:a}:{keep:a,discard:s}}}extend(e,t=!1){let i=this.getRoot();if(null==i){let i=this.getRange().slice();return t&&e.depthFirstSearch(e=>!e.group&&i.push(e)),i.push(e),this.setRoot(e),{keep:i,discard:[]}}if(this.rowModel.getNodesInRangeForSelection(i,e).find(e=>e.id===this.end?.id))return this.setEndRange(e),{keep:this.getRange(),discard:[]};{let t=this.getRange().slice();return this.setEndRange(e),{keep:this.getRange(),discard:t}}}},ho=class extends i2{constructor(){super(...arguments),this.beanName="stylingService"}wireBeans(e){this.expressionService=e.expressionService}processAllCellClasses(e,t,i,r){this.processClassRules(void 0,e.cellClassRules,t,i,r),this.processStaticCellClasses(e,t,i)}processClassRules(e,t,i,r,s){if(null==t&&null==e)return;let a={},o={},n=(e,t)=>{e.split(" ").forEach(e=>{""!=e.trim()&&t(e)})};if(t){let e=Object.keys(t);for(let r=0;r<e.length;r++){let s;let l=e[r],h=t[l];"string"==typeof h?s=this.expressionService.evaluate(h,i):"function"==typeof h&&(s=h(i)),n(l,e=>{s?a[e]=!0:o[e]=!0})}}e&&s&&Object.keys(e).forEach(e=>n(e,e=>{a[e]||(o[e]=!0)})),s&&Object.keys(o).forEach(s),Object.keys(a).forEach(r)}getStaticCellClasses(e,t){let i;let{cellClass:r}=e;return r?("string"==typeof(i="function"==typeof r?r(t):r)&&(i=[i]),i||[]):[]}processStaticCellClasses(e,t,i){this.getStaticCellClasses(e,t).forEach(e=>{i(e)})}},hn=class extends ah{constructor(e){super(e,"ag-toggle-button")}setValue(e,t){return super.setValue(e,t),this.addOrRemoveCssClass("ag-selected",this.getValue()),this}},hl={selector:"AG-TOGGLE-BUTTON",component:hn},hh=((C=hh||{}).TAB_GUARD="ag-tab-guard",C.TAB_GUARD_TOP="ag-tab-guard-top",C.TAB_GUARD_BOTTOM="ag-tab-guard-bottom",C),hd=class extends i2{constructor(e){super(),this.skipTabGuardFocus=!1,this.forcingFocusOut=!1,this.allowFocus=!1;let{comp:t,eTopGuard:i,eBottomGuard:r,focusTrapActive:s,forceFocusOutWhenTabGuardsAreEmpty:a,isFocusableContainer:o,focusInnerElement:n,onFocusIn:l,onFocusOut:h,shouldStopEventPropagation:d,onTabKeyDown:c,handleKeyDown:u,eFocusableElement:p}=e;this.comp=t,this.eTopGuard=i,this.eBottomGuard=r,this.providedFocusInnerElement=n,this.eFocusableElement=p,this.focusTrapActive=!!s,this.forceFocusOutWhenTabGuardsAreEmpty=!!a,this.isFocusableContainer=!!o,this.providedFocusIn=l,this.providedFocusOut=h,this.providedShouldStopEventPropagation=d,this.providedOnTabKeyDown=c,this.providedHandleKeyDown=u}wireBeans(e){this.focusService=e.focusService}postConstruct(){this.createManagedBean(new oa(this.eFocusableElement,{shouldStopEventPropagation:()=>this.shouldStopEventPropagation(),onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e),onFocusIn:e=>this.onFocusIn(e),onFocusOut:e=>this.onFocusOut(e)})),this.activateTabGuards(),[this.eTopGuard,this.eBottomGuard].forEach(e=>this.addManagedElementListeners(e,{focus:this.onFocus.bind(this)}))}handleKeyDown(e){this.providedHandleKeyDown&&this.providedHandleKeyDown(e)}tabGuardsAreActive(){return!!this.eTopGuard&&this.eTopGuard.hasAttribute("tabIndex")}shouldStopEventPropagation(){return!!this.providedShouldStopEventPropagation&&this.providedShouldStopEventPropagation()}activateTabGuards(){if(this.forcingFocusOut)return;let 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&&0===this.focusService.findFocusableElements(this.eFocusableElement,".ag-tab-guard").length){this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);return}if(this.isFocusableContainer&&this.eFocusableElement.contains(e.relatedTarget))return;let t=e.target===this.eBottomGuard;this.providedFocusInnerElement?this.providedFocusInnerElement(t):this.focusInnerElement(t)}findNextElementOutsideAndFocus(e){let t,i;let r=ia(this.gos),s=this.focusService.findFocusableElements(r.body,null,!0),a=s.indexOf(e?this.eTopGuard:this.eBottomGuard);if(-1===a)return;e?(t=0,i=a):(t=a+1,i=s.length);let o=s.slice(t,i),n=this.gos.get("tabIndex");o.sort((e,t)=>{let i=parseInt(e.getAttribute("tabindex")||"0"),r=parseInt(t.getAttribute("tabindex")||"0");return r===n?1:i===n?-1:0===i?1:0===r?-1:i-r}),o[e?o.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;let t=this.tabGuardsAreActive();t&&this.deactivateTabGuards();let i=this.getNextFocusableElement(e.shiftKey);t&&setTimeout(()=>this.activateTabGuards(),0),i&&(i.focus(),e.preventDefault())}focusInnerElement(e=!1){let t=this.focusService.findFocusableElements(this.eFocusableElement);this.tabGuardsAreActive()&&(t.splice(0,1),t.splice(t.length-1,1)),t.length&&t[e?t.length-1:0].focus({preventScroll:!0})}getNextFocusableElement(e){return this.focusService.findNextFocusableElement(this.eFocusableElement,!1,e)}forceFocusOutOfContainer(e=!1){if(this.forcingFocusOut)return;let 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}},hc=class extends i2{constructor(e){super(),this.comp=e}initialiseTabGuard(e){this.eTopGuard=this.createTabGuard("top"),this.eBottomGuard=this.createTabGuard("bottom"),this.eFocusableElement=this.comp.getFocusableElement();let{eTopGuard:t,eBottomGuard:i,eFocusableElement:r}=this,s=[t,i];this.addTabGuards(t,i);let{focusTrapActive:a=!1,onFocusIn:o,onFocusOut:n,focusInnerElement:l,handleKeyDown:h,onTabKeyDown:d,shouldStopEventPropagation:c,forceFocusOutWhenTabGuardsAreEmpty:u,isFocusableContainer:p}=e;this.tabGuardCtrl=this.createManagedBean(new hd({comp:{setTabIndex:e=>{s.forEach(t=>null!=e?t.setAttribute("tabindex",e):t.removeAttribute("tabindex"))}},focusTrapActive:a,eTopGuard:t,eBottomGuard:i,eFocusableElement:r,onFocusIn:o,onFocusOut:n,focusInnerElement:l,handleKeyDown:h,onTabKeyDown:d,shouldStopEventPropagation:c,forceFocusOutWhenTabGuardsAreEmpty:u,isFocusableContainer:p}))}getTabGuardCtrl(){return this.tabGuardCtrl}createTabGuard(e){let t=ia(this.gos).createElement("div");return t.classList.add("ag-tab-guard","top"===e?"ag-tab-guard-top":"ag-tab-guard-bottom"),rQ(t,"presentation"),t}addTabGuards(e,t){this.eFocusableElement.insertAdjacentElement("afterbegin",e),this.eFocusableElement.insertAdjacentElement("beforeend",t)}removeAllChildrenExceptTabGuards(){let e=[this.eTopGuard,this.eBottomGuard];sL(this.comp.getFocusableElement()),this.addTabGuards(...e)}forceFocusOutOfContainer(e=!1){this.tabGuardCtrl.forceFocusOutOfContainer(e)}appendChild(e,t,i){sU(t)||(t=t.getGui());let{eBottomGuard:r}=this;r?r.insertAdjacentElement("beforebegin",t):e(t,i)}},hu=class extends sQ{initialiseTabGuard(e){this.tabGuardFeature=this.createManagedBean(new hc(this)),this.tabGuardFeature.initialiseTabGuard(e)}forceFocusOutOfContainer(e=!1){this.tabGuardFeature.forceFocusOutOfContainer(e)}appendChild(e,t){this.tabGuardFeature.appendChild(super.appendChild.bind(this),e,t)}},hp=0,hg=class extends i2{constructor(){super(...arguments),this.beanName="popupService",this.popupList=[]}wireBeans(e){this.ctrlsService=e.ctrlsService,this.resizeObserverService=e.resizeObserverService,this.environment=e.environment}postConstruct(){this.ctrlsService.whenReady(this,e=>{this.gridCtrl=e.gridCtrl}),this.addManagedEventListeners({gridStylesChanged:this.handleThemeChange.bind(this)})}getPopupParent(){return this.gos.get("popupParent")||this.gridCtrl.getGui()}positionPopupForMenu(e){let t;let{eventSource:i,ePopup:r}=e,s=this.getPopupIndex(r);-1!==s&&(this.popupList[s].alignedToElement=i);let a=i.getBoundingClientRect(),o=this.getParentRect(),n=this.keepXYWithinBounds(r,a.top-o.top,0),l=r.clientWidth>0?r.clientWidth:200;r.style.minWidth=`${l}px`;let h=o.right-o.left-l;function d(){return a.right-o.left-2}function c(){return a.left-o.left-l}this.gos.get("enableRtl")?((t=c())<0&&(t=d(),this.setAlignedStyles(r,"left")),t>h&&(t=0,this.setAlignedStyles(r,"right"))):((t=d())>h&&(t=c(),this.setAlignedStyles(r,"right")),t<0&&(t=0,this.setAlignedStyles(r,"left"))),r.style.left=`${t}px`,r.style.top=`${n}px`}positionPopupUnderMouseEvent(e){let{ePopup:t,nudgeX:i,nudgeY:r,skipObserver:s}=e;this.positionPopup({ePopup:t,nudgeX:i,nudgeY:r,keepWithinBounds:!0,skipObserver:s,updatePosition:()=>this.calculatePointerAlign(e.mouseEvent),postProcessCallback:()=>this.callPostProcessPopup(e.type,e.ePopup,null,e.mouseEvent,e.column,e.rowNode)})}calculatePointerAlign(e){let t=this.getParentRect();return{x:e.clientX-t.left,y:e.clientY-t.top}}positionPopupByComponent(e){let{ePopup:t,nudgeX:i,nudgeY:r,keepWithinBounds:s,eventSource:a,alignSide:o="left",position:n="over",column:l,rowNode:h,type:d}=e,c=a.getBoundingClientRect(),u=this.getParentRect(),p=this.getPopupIndex(t);-1!==p&&(this.popupList[p].alignedToElement=a),this.positionPopup({ePopup:t,nudgeX:i,nudgeY:r,keepWithinBounds:s,updatePosition:()=>{let i,s=c.left-u.left;return"right"===o&&(s-=t.offsetWidth-c.width),"over"===n?(i=c.top-u.top,this.setAlignedStyles(t,"over")):(this.setAlignedStyles(t,"under"),i="under"===this.shouldRenderUnderOrAbove(t,c,u,e.nudgeY||0)?c.top-u.top+c.height:c.top-t.offsetHeight-2*(r||0)-u.top),{x:s,y:i}},postProcessCallback:()=>this.callPostProcessPopup(d,t,a,null,l,h)})}shouldRenderUnderOrAbove(e,t,i,r){let s=i.bottom-t.bottom,a=t.top-i.top,o=e.offsetHeight+r;return s>o?"under":a>o||a>s?"above":"under"}setAlignedStyles(e,t){let i=this.getPopupIndex(e);if(-1===i)return;let{alignedToElement:r}=this.popupList[i];r&&(["right","left","over","above","under"].forEach(t=>{r.classList.remove(`ag-has-popup-positioned-${t}`),e.classList.remove(`ag-popup-positioned-${t}`)}),t&&(r.classList.add(`ag-has-popup-positioned-${t}`),e.classList.add(`ag-popup-positioned-${t}`)))}callPostProcessPopup(e,t,i,r,s,a){let o=this.gos.getCallback("postProcessPopup");o&&o({column:s,rowNode:a,ePopup:t,type:e,eventSource:i,mouseEvent:r})}positionPopup(e){let{ePopup:t,keepWithinBounds:i,nudgeX:r,nudgeY:s,skipObserver:a,updatePosition:o}=e,n={width:0,height:0},l=(a=!1)=>{let{x:l,y:h}=o();(!a||t.clientWidth!==n.width||t.clientHeight!==n.height)&&(n.width=t.clientWidth,n.height=t.clientHeight,r&&(l+=r),s&&(h+=s),i&&(l=this.keepXYWithinBounds(t,l,1),h=this.keepXYWithinBounds(t,h,0)),t.style.left=`${l}px`,t.style.top=`${h}px`,e.postProcessCallback&&e.postProcessCallback())};if(l(),!a){let e=this.resizeObserverService.observeResize(t,()=>l(!0));setTimeout(()=>e(),200)}}getActivePopups(){return this.popupList.map(e=>e.element)}getPopupList(){return this.popupList}getParentRect(){let e=ia(this.gos),t=this.getPopupParent();return t===e.body?t=e.documentElement:"static"===getComputedStyle(t).position&&(t=t.offsetParent),sk(t)}keepXYWithinBounds(e,t,i){let r=0===i,s=r?"top":"left",a=ia(this.gos),o=a.documentElement,n=this.getPopupParent(),l=e.getBoundingClientRect(),h=n.getBoundingClientRect(),d=a.documentElement.getBoundingClientRect(),c=n===a.body,u=Math.ceil(l[r?"height":"width"]),p=c?(r?sD:sI)(o)+o[r?"scrollTop":"scrollLeft"]:n[r?"clientHeight":"clientWidth"];return c&&(p-=Math.abs(d[s]-h[s])),Math.min(Math.max(t,0),Math.abs(p-u))}addPopup(e){let t=ia(this.gos),{eChild:i,ariaLabel:r,alwaysOnTop:s,positionCallback:a,anchorToElement:o}=e;if(!t)return tO("could not find the document, document is empty"),{hideFunc:()=>{}};let n=this.getPopupIndex(i);if(-1!==n)return{hideFunc:this.popupList[n].hideFunc};this.initialisePopupPosition(i);let l=this.createPopupWrapper(i,r,!!s),h=this.addEventListenersToPopup({...e,wrapperEl:l});return a&&a(),this.addPopupToPopupList(i,l,h,o),{hideFunc:h}}initialisePopupPosition(e){let t=this.getPopupParent().getBoundingClientRect();tY(e.style.top)||(e.style.top=`${-1*t.top}px`),tY(e.style.left)||(e.style.left=`${-1*t.left}px`)}createPopupWrapper(e,t,i){let r=this.getPopupParent(),s=document.createElement("div");return this.environment.applyThemeClasses(s),s.classList.add("ag-popup"),e.classList.add(this.gos.get("enableRtl")?"ag-rtl":"ag-ltr","ag-popup-child"),e.hasAttribute("role")||rQ(e,"dialog"),rJ(e,t),s.appendChild(e),r.appendChild(s),i?this.setAlwaysOnTop(e,!0):this.bringPopupToFront(e),s}handleThemeChange(e){if(e.themeChanged)for(let e of this.popupList)this.environment.applyThemeClasses(e.wrapper)}addEventListenersToPopup(e){let t=ia(this.gos),i=this.getPopupParent(),{wrapperEl:r,eChild:s,closedCallback:a,afterGuiAttached:o,closeOnEsc:n,modal:l}=e,h=!1,d=e=>{r.contains(ih(this.gos))&&(e.key!==aa.ESCAPE||iQ(e)||p({keyboardEvent:e}))},c=e=>p({mouseEvent:e}),u=e=>p({touchEvent:e}),p=(e={})=>{let{mouseEvent:o,touchEvent:n,keyboardEvent:l,forceHide:p}=e;!p&&(this.isEventFromCurrentPopup({mouseEvent:o,touchEvent:n},s)||h)||(h=!0,i.removeChild(r),t.removeEventListener("keydown",d),t.removeEventListener("mousedown",c),t.removeEventListener("touchstart",u),t.removeEventListener("contextmenu",c),this.eventService.removeEventListener("dragStarted",c),a&&a(o||n||l),this.removePopupFromPopupList(s))};return o&&o({hidePopup:p}),window.setTimeout(()=>{n&&t.addEventListener("keydown",d),l&&(t.addEventListener("mousedown",c),this.eventService.addEventListener("dragStarted",c),t.addEventListener("touchstart",u),t.addEventListener("contextmenu",c))},0),p}addPopupToPopupList(e,t,i,r){this.popupList.push({element:e,wrapper:t,hideFunc:i,instanceId:hp++,isAnchored:!!r}),r&&this.setPopupPositionRelatedToElement(e,r)}getPopupIndex(e){return this.popupList.findIndex(t=>t.element===e)}setPopupPositionRelatedToElement(e,t){let i=this.getPopupIndex(e);if(-1===i)return;let r=this.popupList[i];if(r.stopAnchoringPromise&&r.stopAnchoringPromise.then(e=>e&&e()),r.stopAnchoringPromise=void 0,r.isAnchored=!1,!t)return;let s=this.keepPopupPositionedRelativeTo({element:t,ePopup:e,hidePopup:r.hideFunc});return r.stopAnchoringPromise=s,r.isAnchored=!0,s}removePopupFromPopupList(e){this.setAlignedStyles(e,null),this.setPopupPositionRelatedToElement(e,null),this.popupList=this.popupList.filter(t=>t.element!==e)}keepPopupPositionedRelativeTo(e){let t=this.getPopupParent(),i=t.getBoundingClientRect(),{element:r,ePopup:s}=e,a=r.getBoundingClientRect(),o=e=>parseInt(e.substring(0,e.length-1),10),n=(e,t)=>{let r=i[e]-a[e],n=o(s.style[e]);return{initialDiff:r,lastDiff:r,initial:n,last:n,direction:t}},l=n("top",0),h=n("left",1),d=this.getFrameworkOverrides();return new ab(i=>{d.wrapIncoming(()=>{d.setInterval(()=>{let i=t.getBoundingClientRect(),a=r.getBoundingClientRect();if(0==a.top&&0==a.left&&0==a.height&&0==a.width){e.hidePopup();return}let n=(e,t)=>{let r=o(s.style[t]);e.last!==r&&(e.initial=r,e.last=r);let n=i[t]-a[t];if(n!=e.lastDiff){let i=this.keepXYWithinBounds(s,e.initial+e.initialDiff-n,e.direction);s.style[t]=`${i}px`,e.last=i}e.lastDiff=n};n(l,"top"),n(h,"left")},200).then(e=>{i(()=>{null!=e&&window.clearInterval(e)})})},"popupPositioning")})}hasAnchoredPopup(){return this.popupList.some(e=>e.isAnchored)}isEventFromCurrentPopup(e,t){let{mouseEvent:i,touchEvent:r}=e,s=i||r;if(!s)return!1;let a=this.getPopupIndex(t);if(-1===a)return!1;for(let e=a;e<this.popupList.length;e++)if(i1(this.popupList[e].element,s))return!0;return this.isElementWithinCustomPopup(s.target)}isElementWithinCustomPopup(e){let t=ia(this.gos);for(;e&&e!==t.body;){if(e.classList.contains("ag-custom-component-popup")||null===e.parentElement)return!0;e=e.parentElement}return!1}getWrapper(e){for(;!e.classList.contains("ag-popup")&&e.parentElement;)e=e.parentElement;return e.classList.contains("ag-popup")?e:null}setAlwaysOnTop(e,t){let i=this.getWrapper(e);i&&(i.classList.toggle("ag-always-on-top",!!t),t&&this.bringPopupToFront(i))}bringPopupToFront(e){let t=this.getPopupParent(),i=Array.prototype.slice.call(t.querySelectorAll(".ag-popup")),r=i.length,s=Array.prototype.slice.call(t.querySelectorAll(".ag-popup.ag-always-on-top")),a=s.length,o=this.getWrapper(e);if(!o||r<=1||!t.contains(e))return!1;let n=i.indexOf(o),l=o.querySelectorAll("div"),h=[];l.forEach(e=>{0!==e.scrollTop&&h.push([e,e.scrollTop])});let d=!1;for(a?o.classList.contains("ag-always-on-top")?n!==r-1&&(iB(s).insertAdjacentElement("afterend",o),d=!0):n!==r-a-1&&(s[0].insertAdjacentElement("beforebegin",o),d=!0):n!==r-1&&(iB(i).insertAdjacentElement("afterend",o),d=!0);h.length;){let e=h.pop();e[0].scrollTop=e[1]}return d}},hm=["touchstart","touchend","touchmove","touchcancel"],hf=class{constructor(e="javascript"){this.frameworkName=e,this.renderingEngine="vanilla",this.wrapIncoming=e=>e(),this.wrapOutgoing=e=>e()}setInterval(e,t){return new ab(i=>{i(window.setInterval(e,t))})}addEventListener(e,t,i,r){let s=iU(hm,t);e.addEventListener(t,i,{capture:!!r,passive:s})}get shouldWrapOutgoing(){return!1}frameworkComponent(e){return null}isFrameworkComponent(e){return!1}getDocLink(e){let t="solid"===this.frameworkName?"react":this.frameworkName;return`https://www.ag-grid.com/${t}-data-grid${e?`/${e}`:""}`}},hv=class extends i2{constructor(){super(...arguments),this.beanName="cellNavigationService"}wireBeans(e){this.visibleColsService=e.visibleColsService,this.rowModel=e.rowModel,this.rowRenderer=e.rowRenderer,this.pinnedRowModel=e.pinnedRowModel,this.paginationService=e.paginationService,this.pageBoundsService=e.pageBoundsService}getNextCellToFocus(e,t,i=!1){return i?this.getNextCellToFocusWithCtrlPressed(e,t):this.getNextCellToFocusWithoutCtrlPressed(e,t)}getNextCellToFocusWithCtrlPressed(e,t){let i,r;let s=e===aa.UP,a=e===aa.DOWN,o=e===aa.LEFT;if(s||a)r=s?this.pageBoundsService.getFirstRow():this.pageBoundsService.getLastRow(),i=t.column;else{let e=this.visibleColsService.getAllCols(),s=this.gos.get("enableRtl");r=t.rowIndex,i=o!==s?e[0]:iB(e)}return{rowIndex:r,rowPinned:null,column:i}}getNextCellToFocusWithoutCtrlPressed(e,t){let i=t,r=!1;for(;!r;){switch(e){case aa.UP:i=this.getCellAbove(i);break;case aa.DOWN:i=this.getCellBelow(i);break;case aa.RIGHT:i=this.gos.get("enableRtl")?this.getCellToLeft(i):this.getCellToRight(i);break;case aa.LEFT:i=this.gos.get("enableRtl")?this.getCellToRight(i):this.getCellToLeft(i);break;default:i=null,tO("unknown key for navigation ",e)}r=!i||this.isCellGoodToFocusOn(i)}return i}isCellGoodToFocusOn(e){let t;let i=e.column;switch(e.rowPinned){case"top":t=this.pinnedRowModel.getPinnedTopRow(e.rowIndex);break;case"bottom":t=this.pinnedRowModel.getPinnedBottomRow(e.rowIndex);break;default:t=this.rowModel.getRow(e.rowIndex)}return!!t&&!i.isSuppressNavigable(t)}getCellToLeft(e){if(!e)return null;let t=this.visibleColsService.getColBefore(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getCellToRight(e){if(!e)return null;let t=this.visibleColsService.getColAfter(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getRowBelow(e){let t=e.rowIndex,i=e.rowPinned,r=!1;if(this.isLastRowInContainer(e))switch(i){case"bottom":return null;case"top":if(this.rowModel.isRowsToRender())return{rowIndex:this.pageBoundsService.getFirstRow(),rowPinned:null};if(this.pinnedRowModel.isRowsToRender("bottom"))return{rowIndex:0,rowPinned:"bottom"};return null;default:if(this.pinnedRowModel.isRowsToRender("bottom"))return{rowIndex:0,rowPinned:"bottom"};return null}else i&&(r=!0);let s=this.rowModel.getRow(e.rowIndex);return(r?void 0:this.getNextStickyPosition(s))||{rowIndex:t+1,rowPinned:i}}getNextStickyPosition(e,t){if(!iu(this.gos)||!e||!e.sticky)return;let i=this.rowRenderer.getStickyTopRowCtrls().some(t=>t.getRowNode().rowIndex===e.rowIndex),r=[],s=(r=i?[...this.rowRenderer.getStickyTopRowCtrls()].sort((e,t)=>e.getRowNode().rowIndex-t.getRowNode().rowIndex):[...this.rowRenderer.getStickyBottomRowCtrls()].sort((e,t)=>t.getRowNode().rowIndex-e.getRowNode().rowIndex)).findIndex(t=>t.getRowNode().rowIndex===e.rowIndex),a=r[s+(t?-1:1)];if(a)return{rowIndex:a.getRowNode().rowIndex,rowPinned:null}}getCellBelow(e){if(!e)return null;let t=this.getRowBelow(e);return t?{rowIndex:t.rowIndex,column:e.column,rowPinned:t.rowPinned}:null}isLastRowInContainer(e){let t=e.rowPinned,i=e.rowIndex;return"top"===t?this.pinnedRowModel.getPinnedTopRowCount()-1<=i:"bottom"===t?this.pinnedRowModel.getPinnedBottomRowCount()-1<=i:this.pageBoundsService.getLastRow()<=i}getRowAbove(e){let t=e.rowIndex,i=e.rowPinned,r=i?0===t:t===this.pageBoundsService.getFirstRow(),s=!1;if(r)return"top"===i?null:i&&this.rowModel.isRowsToRender()?this.getLastBodyCell():this.pinnedRowModel.isRowsToRender("top")?this.getLastFloatingTopRow():null;i&&(s=!0);let a=this.rowModel.getRow(e.rowIndex);return(s?void 0:this.getNextStickyPosition(a,!0))||{rowIndex:t-1,rowPinned:i}}getCellAbove(e){if(!e)return null;let t=this.getRowAbove({rowIndex:e.rowIndex,rowPinned:e.rowPinned});return t?{rowIndex:t.rowIndex,column:e.column,rowPinned:t.rowPinned}:null}getLastBodyCell(){return{rowIndex:this.pageBoundsService.getLastRow(),rowPinned:null}}getLastFloatingTopRow(){return{rowIndex:this.pinnedRowModel.getPinnedTopRowCount()-1,rowPinned:"top"}}getNextTabbedCell(e,t){return t?this.getNextTabbedCellBackwards(e):this.getNextTabbedCellForwards(e)}getNextTabbedCellForwards(e){let t=this.visibleColsService.getAllCols(),i=e.rowIndex,r=e.rowPinned,s=this.visibleColsService.getColAfter(e.column);if(!s){s=t[0];let a=this.getRowBelow(e);if(tK(a)||!a.rowPinned&&!(this.paginationService?.isRowInPage(a)??!0))return null;i=a?a.rowIndex:null,r=a?a.rowPinned:null}return{rowIndex:i,column:s,rowPinned:r}}getNextTabbedCellBackwards(e){let t=this.visibleColsService.getAllCols(),i=e.rowIndex,r=e.rowPinned,s=this.visibleColsService.getColBefore(e.column);if(!s){s=iB(t);let a=this.getRowAbove({rowIndex:e.rowIndex,rowPinned:e.rowPinned});if(tK(a)||!a.rowPinned&&!(this.paginationService?.isRowInPage(a)??!0))return null;i=a?a.rowIndex:null,r=a?a.rowPinned:null}return{rowIndex:i,column:s,rowPinned:r}}},hy=(e,t)=>{for(let i in t)t[i]=e;return t},hC={...hy("@ag-grid-community/core",{dispatchEvent:0,destroy:0,getGridId:0,getGridOption:0,isDestroyed:0,setGridOption:0,updateGridOptions:0,getState:0,setNodesSelected:0,selectAll:0,deselectAll:0,selectAllFiltered:0,deselectAllFiltered:0,selectAllOnCurrentPage:0,deselectAllOnCurrentPage:0,getSelectedNodes:0,getSelectedRows:0,redrawRows:0,setRowNodeExpanded:0,getRowNode:0,addRenderedRowListener:0,getRenderedNodes:0,forEachNode:0,getFirstDisplayedRow:0,getFirstDisplayedRowIndex:0,getLastDisplayedRow:0,getLastDisplayedRowIndex:0,getDisplayedRowAtIndex:0,getDisplayedRowCount:0,getModel:0,getVerticalPixelRange:0,getHorizontalPixelRange:0,ensureColumnVisible:0,ensureIndexVisible:0,ensureNodeVisible:0,getFocusedCell:0,clearFocusedCell:0,setFocusedCell:0,tabToNextCell:0,tabToPreviousCell:0,setFocusedHeader:0,addEventListener:0,addGlobalListener:0,removeEventListener:0,removeGlobalListener:0,expireValueCache:0,getValue:0,getCellValue:0,showColumnMenuAfterButtonClick:0,showColumnMenuAfterMouseClick:0,showColumnMenu:0,hidePopupMenu:0,onSortChanged:0,getPinnedTopRowCount:0,getPinnedBottomRowCount:0,getPinnedTopRow:0,getPinnedBottomRow:0,showLoadingOverlay:0,showNoRowsOverlay:0,hideOverlay:0,setGridAriaProperty:0,refreshCells:0,flashCells:0,refreshHeader:0,isAnimationFrameQueueEmpty:0,flushAllAnimationFrames:0,getSizesForCurrentTheme:0,getCellRendererInstances:0,addRowDropZone:0,removeRowDropZone:0,getRowDropZoneParams:0,getColumnDef:0,getColumnDefs:0,sizeColumnsToFit:0,setColumnGroupOpened:0,getColumnGroup:0,getProvidedColumnGroup:0,getDisplayNameForColumn:0,getDisplayNameForColumnGroup:0,getColumn:0,getColumns:0,applyColumnState:0,getColumnState:0,resetColumnState:0,getColumnGroupState:0,setColumnGroupState:0,resetColumnGroupState:0,isPinning:0,isPinningLeft:0,isPinningRight:0,getDisplayedColAfter:0,getDisplayedColBefore:0,setColumnVisible:0,setColumnsVisible:0,setColumnPinned:0,setColumnsPinned:0,getAllGridColumns:0,getDisplayedLeftColumns:0,getDisplayedCenterColumns:0,getDisplayedRightColumns:0,getAllDisplayedColumns:0,getAllDisplayedVirtualColumns:0,moveColumn:0,moveColumnByIndex:0,moveColumns:0,setColumnWidth:0,setColumnWidths:0,getLeftDisplayedColumnGroups:0,getCenterDisplayedColumnGroups:0,getRightDisplayedColumnGroups:0,getAllDisplayedColumnGroups:0,autoSizeColumn:0,autoSizeColumns:0,autoSizeAllColumns:0,undoCellEditing:0,redoCellEditing:0,getCellEditorInstances:0,getEditingCells:0,stopEditing:0,startEditingCell:0,getCurrentUndoSize:0,getCurrentRedoSize:0,isAnyFilterPresent:0,onFilterChanged:0,isColumnFilterPresent:0,getFilterInstance:0,getColumnFilterInstance:0,destroyFilter:0,setFilterModel:0,getFilterModel:0,getColumnFilterModel:0,setColumnFilterModel:0,showColumnFilter:0,isQuickFilterPresent:0,getQuickFilter:0,resetQuickFilter:0,paginationIsLastPageFound:0,paginationGetPageSize:0,paginationGetCurrentPage:0,paginationGetTotalPages:0,paginationGetRowCount:0,paginationGoToNextPage:0,paginationGoToPreviousPage:0,paginationGoToFirstPage:0,paginationGoToLastPage:0,paginationGoToPage:0,expandAll:0,collapseAll:0,onRowHeightChanged:0,setRowCount:0,getCacheBlockState:0,isLastRowIndexKnown:0}),...hy("@ag-grid-community/client-side-row-model",{onGroupExpandedOrCollapsed:0,refreshClientSideRowModel:0,isRowDataEmpty:0,forEachLeafNode:0,forEachNodeAfterFilter:0,forEachNodeAfterFilterAndSort:0,resetRowHeights:0,applyTransaction:0,applyTransactionAsync:0,flushAsyncTransactions:0,getBestCostNodeSelection:0}),...hy("@ag-grid-community/csv-export",{getDataAsCsv:0,exportDataAsCsv:0}),...hy("@ag-grid-community/infinite-row-model",{refreshInfiniteCache:0,purgeInfiniteCache:0,getInfiniteRowCount:0}),...hy("@ag-grid-enterprise/advanced-filter",{getAdvancedFilterModel:0,setAdvancedFilterModel:0,showAdvancedFilterBuilder:0,hideAdvancedFilterBuilder:0}),...hy("@ag-grid-enterprise/charts",{getChartModels:0,getChartRef:0,getChartImageDataURL:0,downloadChart:0,openChartToolPanel:0,closeChartToolPanel:0,createRangeChart:0,createPivotChart:0,createCrossFilterChart:0,updateChart:0,restoreChart:0}),...hy("@ag-grid-enterprise/clipboard",{copyToClipboard:0,cutToClipboard:0,copySelectedRowsToClipboard:0,copySelectedRangeToClipboard:0,copySelectedRangeDown:0,pasteFromClipboard:0}),...hy("@ag-grid-enterprise/excel-export",{getDataAsExcel:0,exportDataAsExcel:0,getSheetDataForExcel:0,getMultipleSheetsAsExcel:0,exportMultipleSheetsAsExcel:0}),...hy("@ag-grid-enterprise/master-detail",{addDetailGridInfo:0,removeDetailGridInfo:0,getDetailGridInfo:0,forEachDetailGridInfo:0}),...hy("@ag-grid-enterprise/menu",{showContextMenu:0,showColumnChooser:0,hideColumnChooser:0}),...hy("@ag-grid-enterprise/range-selection",{getCellRanges:0,addCellRange:0,clearRangeSelection:0,clearCellSelection:0}),...hy("@ag-grid-enterprise/row-grouping",{addAggFunc:0,addAggFuncs:0,clearAggFuncs:0,setColumnAggFunc:0,isPivotMode:0,getPivotResultColumn:0,setValueColumns:0,getValueColumns:0,removeValueColumn:0,removeValueColumns:0,addValueColumn:0,addValueColumns:0,setRowGroupColumns:0,removeRowGroupColumn:0,removeRowGroupColumns:0,addRowGroupColumn:0,addRowGroupColumns:0,getRowGroupColumns:0,moveRowGroupColumn:0,setPivotColumns:0,removePivotColumn:0,removePivotColumns:0,addPivotColumn:0,addPivotColumns:0,getPivotColumns:0,setPivotResultColumns:0,getPivotResultColumns:0}),...hy("@ag-grid-enterprise/server-side-row-model",{getServerSideSelectionState:0,setServerSideSelectionState:0,applyServerSideTransaction:0,applyServerSideTransactionAsync:0,applyServerSideRowData:0,retryServerSideLoads:0,flushServerSideAsyncTransactions:0,refreshServerSide:0,getServerSideGroupLevelState:0}),...hy("@ag-grid-enterprise/side-bar",{isSideBarVisible:0,setSideBarVisible:0,setSideBarPosition:0,openToolPanel:0,closeToolPanel:0,getOpenedToolPanel:0,refreshToolPanel:0,isToolPanelShowing:0,getToolPanelInstance:0,getSideBar:0}),...hy("@ag-grid-enterprise/status-bar",{getStatusPanel:0})},hw={isDestroyed:()=>!0,destroy(){},preConstruct(){},postConstruct(){},preWireBeans(){},wireBeans(){}},hb=(e,t)=>e.eventService.dispatchEvent(t),hS=class{};Reflect.defineProperty(hS,"name",{value:"GridApi"});var hx=class extends i2{constructor(){super(),this.beanName="apiFunctionService",this.api=new hS,this.fns={...hw,dispatchEvent:hb},this.beans=null,this.preDestroyLink="";let{api:e}=this;for(let t in hC)e[t]=this.makeApi(t)[t]}wireBeans(e){this.beans=e}postConstruct(){this.preDestroyLink=this.frameworkOverrides.getDocLink("grid-lifecycle/#grid-pre-destroyed")}addFunction(e,t){let{fns:i,beans:r}=this;i!==hw&&(i[e]=r?.validationService?.validateApiFunction(e,t)??t)}makeApi(e){return{[e]:(...t)=>{let{beans:i,fns:{[e]:r}}=this;return r?r(i,...t):this.apiNotFound(e)}}}apiNotFound(e){let{beans:t,gos:i,preDestroyLink:r}=this;if(t){let t=hC[e];i.assertModuleRegistered(t,`api.${e}`)&&tO(`API function '${e}' not registered to module '${t}'`)}else tO(`Grid API function ${e}() cannot be called as the grid has been destroyed.
Either clear local references to the grid api, when it is destroyed, or check gridApi.isDestroyed() to avoid calling methods against a destroyed grid.
To run logic when the grid is about to be destroyed use the gridPreDestroy event. See: ${r}`)}destroy(){super.destroy(),this.fns=hw,this.beans=null}};function hM(e){return{beanName:"gridApi",bean:e.getBean("apiFunctionService").api}}var hE=class extends i2{constructor(){super(...arguments),this.beanName="columnDefFactory"}buildColumnDefs(e,t,i){let r=[],s={};return e.forEach(e=>{let a=this.createDefFromColumn(e,t,i),o=!0,n=a,l=e.getOriginalParent(),h=null;for(;l;){let e=null;if(l.isPadding()){l=l.getOriginalParent();continue}let t=s[l.getGroupId()];if(t){t.children.push(n),o=!1;break}if((e=this.createDefFromGroup(l))&&(e.children=[n],s[e.groupId]=e,n=e,l=l.getOriginalParent()),null!=l&&h===l){o=!1;break}h=l}o&&r.push(n)}),r}createDefFromGroup(e){let t=rl(e.getColGroupDef(),["children"]);return t&&(t.groupId=e.getGroupId()),t}createDefFromColumn(e,t,i){let r=rl(e.getColDef());return r.colId=e.getColId(),r.width=e.getActualWidth(),r.rowGroup=e.isRowGroupActive(),r.rowGroupIndex=e.isRowGroupActive()?t.indexOf(e):null,r.pivot=e.isPivotActive(),r.pivotIndex=e.isPivotActive()?i.indexOf(e):null,r.aggFunc=e.isValueActive()?e.getAggFunc():null,r.hide=!e.isVisible()||void 0,r.pinned=e.isPinned()?e.getPinned():null,r.sort=e.getSort()?e.getSort():null,r.sortIndex=null!=e.getSortIndex()?e.getSortIndex():null,r}},hD=class extends i2{constructor(){super(...arguments),this.beanName="columnEventDispatcher"}visibleCols(e){this.eventService.dispatchEvent({type:"displayedColumnsChanged",source:e})}gridColumns(){this.eventService.dispatchEvent({type:"gridColumnsChanged"})}headerHeight(e){this.eventService.dispatchEvent({type:"columnHeaderHeightChanged",column:e,columns:[e],source:"autosizeColumnHeaderHeight"})}groupHeaderHeight(e){this.eventService.dispatchEvent({type:"columnGroupHeaderHeightChanged",columnGroup:e,source:"autosizeColumnGroupHeaderHeight"})}groupOpened(e){this.eventService.dispatchEvent({type:"columnGroupOpened",columnGroup:1===e.length?e[0]:void 0,columnGroups:e})}rowGroupChanged(e,t){this.eventService.dispatchEvent({type:"columnRowGroupChanged",columns:e,column:1===e.length?e[0]:null,source:t})}genericColumnEvent(e,t,i){this.eventService.dispatchEvent({type:e,columns:t,column:1===t.length?t[0]:null,source:i})}pivotModeChanged(){this.eventService.dispatchEvent({type:"columnPivotModeChanged"})}virtualColumnsChanged(e){this.eventService.dispatchEvent({type:"virtualColumnsChanged",afterScroll:e})}newColumnsLoaded(e){this.eventService.dispatchEvent({type:"newColumnsLoaded",source:e})}everythingChanged(e){this.eventService.dispatchEvent({type:"columnEverythingChanged",source:e})}columnMoved(e){let{movedColumns:t,source:i,toIndex:r,finished:s}=e;this.eventService.dispatchEvent({type:"columnMoved",columns:t,column:t&&1===t.length?t[0]:null,toIndex:r,finished:s,source:i})}columnPinned(e,t){if(!e.length)return;let i=1===e.length?e[0]:null,r=this.getCommonValue(e,e=>e.getPinned());this.eventService.dispatchEvent({type:"columnPinned",pinned:null!=r?r:null,columns:e,column:i,source:t})}columnVisible(e,t){if(!e.length)return;let i=1===e.length?e[0]:null,r=this.getCommonValue(e,e=>e.isVisible());this.eventService.dispatchEvent({type:"columnVisible",visible:r,columns:e,column:i,source:t})}getCommonValue(e,t){if(!e||0==e.length)return;let i=t(e[0]);for(let r=1;r<e.length;r++)if(i!==t(e[r]))return;return i}columnChanged(e,t,i){this.eventService.dispatchEvent({type:e,columns:t,column:t&&1==t.length?t[0]:null,source:i})}columnResized(e,t,i,r=null){e&&e.length&&this.eventService.dispatchEvent({type:"columnResized",columns:e,column:1===e.length?e[0]:null,flexColumns:r,finished:t,source:i})}},hI=class extends i2{constructor(){super(...arguments),this.beanName="columnGetStateService"}wireBeans(e){this.columnModel=e.columnModel,this.funcColsService=e.funcColsService}getColumnState(){if(tK(this.columnModel.getColDefCols())||!this.columnModel.isAlive())return[];let e=this.columnModel.getAllCols().map(e=>this.createStateItemFromColumn(e));return this.orderColumnStateList(e),e}createStateItemFromColumn(e){let t=this.funcColsService.getRowGroupColumns(),i=this.funcColsService.getPivotColumns(),r=e.isRowGroupActive()?t.indexOf(e):null,s=e.isPivotActive()?i.indexOf(e):null,a=e.isValueActive()?e.getAggFunc():null,o=null!=e.getSort()?e.getSort():null,n=null!=e.getSortIndex()?e.getSortIndex():null,l=null!=e.getFlex()&&e.getFlex()>0?e.getFlex():null;return{colId:e.getColId(),width:e.getActualWidth(),hide:!e.isVisible(),pinned:e.getPinned(),sort:o,sortIndex:n,aggFunc:a,rowGroup:e.isRowGroupActive(),rowGroupIndex:r,pivot:e.isPivotActive(),pivotIndex:s,flex:l}}orderColumnStateList(e){let t=new Map(this.columnModel.getCols().map((e,t)=>[e.getColId(),t]));e.sort((e,i)=>(t.has(e.colId)?t.get(e.colId):-1)-(t.has(i.colId)?t.get(i.colId):-1))}},hk=class extends i2{constructor(){super(...arguments),this.beanName="columnGroupStateService"}wireBeans(e){this.columnModel=e.columnModel,this.columnAnimationService=e.columnAnimationService,this.eventDispatcher=e.columnEventDispatcher,this.visibleColsService=e.visibleColsService}getColumnGroupState(){let e=[];return rw(null,this.columnModel.getColTree(),t=>{i3(t)&&e.push({groupId:t.getGroupId(),open:t.isExpanded()})}),e}resetColumnGroupState(e){let t=this.columnModel.getColDefColTree();if(!t)return;let i=[];rw(null,t,e=>{if(i3(e)){let t=e.getColGroupDef(),r={groupId:e.getGroupId(),open:t?t.openByDefault:void 0};i.push(r)}}),this.setColumnGroupState(i,e)}setColumnGroupState(e,t){if(!this.columnModel.getColTree())return;this.columnAnimationService.start();let i=[];e.forEach(e=>{let t=e.groupId,r=e.open,s=this.columnModel.getProvidedColGroup(t);s&&s.isExpanded()!==r&&(s.setExpanded(r),i.push(s))}),this.visibleColsService.refresh(t,!0),i.length&&this.eventDispatcher.groupOpened(i),this.columnAnimationService.finish()}},hT=class extends i2{constructor(){super(...arguments),this.beanName="columnViewportService",this.colsWithinViewport=[],this.headerColsWithinViewport=[],this.colsWithinViewportHash="",this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={}}wireBeans(e){this.visibleColsService=e.visibleColsService,this.columnModel=e.columnModel,this.eventDispatcher=e.columnEventDispatcher}postConstruct(){this.suppressColumnVirtualisation=this.gos.get("suppressColumnVirtualisation")}setScrollPosition(e,t,i=!1){let r=this.visibleColsService.isBodyWidthDirty();if(e!==this.scrollWidth||t!==this.scrollPosition||r){if(this.scrollWidth=e,this.scrollPosition=t,this.visibleColsService.setBodyWidthDirty(),this.gos.get("enableRtl")){let e=this.visibleColsService.getBodyContainerWidth();this.viewportLeft=e-this.scrollPosition-this.scrollWidth,this.viewportRight=e-this.scrollPosition}else this.viewportLeft=this.scrollPosition,this.viewportRight=this.scrollWidth+this.scrollPosition;this.columnModel.isReady()&&this.checkViewportColumns(i)}}getHeadersToRender(e,t){let i;switch(e){case"left":i=this.rowsOfHeadersToRenderLeft[t];break;case"right":i=this.rowsOfHeadersToRenderRight[t];break;default:i=this.rowsOfHeadersToRenderCenter[t]}return i||[]}extractViewportColumns(){let e=this.visibleColsService.getCenterCols();this.isColumnVirtualisationSuppressed()?(this.colsWithinViewport=e,this.headerColsWithinViewport=e):(this.colsWithinViewport=e.filter(this.isColumnInRowViewport.bind(this)),this.headerColsWithinViewport=e.filter(this.isColumnInHeaderViewport.bind(this)))}isColumnVirtualisationSuppressed(){return this.suppressColumnVirtualisation||0===this.viewportRight}clear(){this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={},this.colsWithinViewportHash=""}isColumnInHeaderViewport(e){return!!(e.isAutoHeaderHeight()||this.isAnyParentAutoHeaderHeight(e))||this.isColumnInRowViewport(e)}isAnyParentAutoHeaderHeight(e){for(;e;){if(e.isAutoHeaderHeight())return!0;e=e.getParent()}return!1}isColumnInRowViewport(e){if(e.isAutoHeight())return!0;let t=e.getLeft()||0,i=t+e.getActualWidth(),r=this.viewportLeft-200,s=this.viewportRight+200;return!(t<r&&i<r)&&!(t>s&&i>s)}getViewportColumns(){let e=this.visibleColsService.getLeftCols(),t=this.visibleColsService.getRightCols();return this.colsWithinViewport.concat(e).concat(t)}getColsWithinViewport(e){if(!this.columnModel.isColSpanActive())return this.colsWithinViewport;let t=this.isColumnVirtualisationSuppressed()?void 0:this.isColumnInRowViewport.bind(this),i=this.visibleColsService.getColsCenter();return this.visibleColsService.getColsForRow(e,i,t,e=>{let t=e.getLeft();return tY(t)&&t>this.viewportLeft})}checkViewportColumns(e=!1){this.extractViewport()&&this.eventDispatcher.virtualColumnsChanged(e)}calculateHeaderRows(){this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={};let e={},t=this.visibleColsService.getLeftCols(),i=this.visibleColsService.getRightCols();this.headerColsWithinViewport.concat(t).concat(i).forEach(t=>e[t.getId()]=!0);let r=(t,i,s)=>{let a=!1;for(let o=0;o<t.length;o++){let n=t[o],l=!1;if(rm(n))l=!0===e[n.getId()];else{let e=n.getDisplayedChildren();e&&(l=r(e,i,s+1))}l&&(a=!0,i[s]||(i[s]=[]),i[s].push(n))}return a};r(this.visibleColsService.getTreeLeft(),this.rowsOfHeadersToRenderLeft,0),r(this.visibleColsService.getTreeRight(),this.rowsOfHeadersToRenderRight,0),r(this.visibleColsService.getTreeCenter(),this.rowsOfHeadersToRenderCenter,0)}extractViewport(){this.extractViewportColumns();let e=this.getViewportColumns().map(e=>`${e.getId()}-${e.getPinned()||"normal"}`).join("#"),t=this.colsWithinViewportHash!==e;return t&&(this.colsWithinViewportHash=e,this.calculateHeaderRows()),t}},hA=class extends i2{constructor(){super(...arguments),this.beanName="agComponentUtils"}wireBeans(e){this.componentMetadataProvider=e.componentMetadataProvider}adaptFunction(e,t){let i=this.componentMetadataProvider.retrieve(e);return i&&i.functionAdapter?i.functionAdapter(t):null}adaptCellRendererFunction(e){class t{refresh(){return!1}getGui(){return this.eGui}init(t){let i=e(t),r=typeof i;if("string"===r||"number"===r||"boolean"===r){this.eGui=sO("<span>"+i+"</span>");return}if(null==i){this.eGui=sO("<span></span>");return}this.eGui=i}}return t}doesImplementIComponent(e){return!!e&&e.prototype&&"getGui"in e.prototype}},hR=class extends i2{constructor(){super(...arguments),this.beanName="componentMetadataProvider"}wireBeans(e){this.agComponentUtils=e.agComponentUtils}postConstruct(){this.componentMetaData={dateComponent:{mandatoryMethodList:["getDate","setDate"],optionalMethodList:["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled","onParamsUpdated","refresh"]},detailCellRenderer:{mandatoryMethodList:[],optionalMethodList:["refresh"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},dragAndDropImageComponent:{mandatoryMethodList:["setIcon","setLabel"],optionalMethodList:[]},headerComponent:{mandatoryMethodList:[],optionalMethodList:["refresh"]},headerGroupComponent:{mandatoryMethodList:[],optionalMethodList:[]},loadingCellRenderer:{mandatoryMethodList:[],optionalMethodList:[],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},loadingOverlayComponent:{mandatoryMethodList:[],optionalMethodList:["refresh"]},noRowsOverlayComponent:{mandatoryMethodList:[],optionalMethodList:["refresh"]},floatingFilterComponent:{mandatoryMethodList:["onParentModelChanged"],optionalMethodList:["afterGuiAttached","onParamsUpdated","refresh"]},cellRenderer:{mandatoryMethodList:[],optionalMethodList:["refresh","afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},cellEditor:{mandatoryMethodList:["getValue"],optionalMethodList:["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached","refresh"]},innerRenderer:{mandatoryMethodList:[],optionalMethodList:["afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},fullWidthCellRenderer:{mandatoryMethodList:[],optionalMethodList:["refresh","afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},groupRowRenderer:{mandatoryMethodList:[],optionalMethodList:["afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},filter:{mandatoryMethodList:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethodList:["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged","onAnyFilterChanged","refresh"]},statusPanel:{mandatoryMethodList:[],optionalMethodList:["refresh"]},toolPanel:{mandatoryMethodList:[],optionalMethodList:["refresh","getState"]},tooltipComponent:{mandatoryMethodList:[],optionalMethodList:[]},menuItem:{mandatoryMethodList:[],optionalMethodList:["setActive","select","setExpanded","configureDefaults"]}}}retrieve(e){return this.componentMetaData[e]}},hL=Object.fromEntries(["rowPositionUtils","cellPositionUtils","headerPositionUtils","paginationAutoPageSizeService","apiFunctionService","gridApi","userComponentRegistry","agComponentUtils","componentMetadataProvider","resizeObserverService","userComponentFactory","rowContainerHeightService","horizontalResizeService","localeService","validationService","pinnedRowModel","dragService","visibleColsService","eventService","gos","popupService","selectionService","columnFilterService","quickFilterService","filterManager","columnModel","headerNavigationService","pageBoundsService","paginationService","pageBoundsListener","rowRenderer","expressionService","columnFactory","alignedGridsService","navigationService","valueCache","valueService","loggerFactory","autoWidthCalculator","filterMenuFactory","dragAndDropService","focusService","mouseEventService","environment","cellNavigationService","stylingService","scrollVisibleService","sortController","columnHoverService","columnAnimationService","selectableService","autoColService","controlsColService","changeDetectionService","animationFrameService","undoRedoService","columnDefFactory","rowCssClassCalculator","rowNodeBlockLoader","rowNodeSorter","ctrlsService","pinnedWidthService","rowNodeEventThrottle","ctrlsFactory","dataTypeService","syncService","overlayService","stateService","expansionService","apiEventService","ariaAnnouncementService","menuService","columnApplyStateService","columnEventDispatcher","columnMoveService","columnAutosizeService","columnGetStateService","columnGroupStateService","columnSizeService","funcColsService","columnNameService","columnViewportService","pivotResultColsService","showRowGroupColsService"].map((e,t)=>[e,t]));function hP(e,t){return((e.beanName?hL[e.beanName]:void 0)??Number.MAX_SAFE_INTEGER)-((t.beanName?hL[t.beanName]:void 0)??Number.MAX_SAFE_INTEGER)}function hF(e,t){return e?.beanName==="gridDestroyService"?-1:0}var hN=class extends i2{constructor(){super(...arguments),this.beanName="ctrlsFactory",this.registry={}}register(e){this.registry[e.name]=e.classImp}getInstance(e,...t){let i=this.registry[e];if(null!=i)return new i(...t)}},hO=class extends i2{constructor(){super(...arguments),this.beanName="ctrlsService",this.params={gridCtrl:void 0,gridBodyCtrl:void 0,center:void 0,left:void 0,right:void 0,bottomCenter:void 0,bottomLeft:void 0,bottomRight:void 0,topCenter:void 0,topLeft:void 0,topRight:void 0,stickyTopCenter:void 0,stickyTopLeft:void 0,stickyTopRight:void 0,stickyBottomCenter:void 0,stickyBottomLeft:void 0,stickyBottomRight:void 0,fakeHScrollComp:void 0,fakeVScrollComp:void 0,gridHeaderCtrl:void 0,centerHeader:void 0,leftHeader:void 0,rightHeader:void 0},this.ready=!1,this.readyCallbacks=[],this.runReadyCallbacksAsync=!1}wireBeans(e){this.runReadyCallbacksAsync=e.frameworkOverrides.runWhenReadyAsync?.()??!1}postConstruct(){this.addEventListener("ready",()=>{this.updateReady(),this.ready&&(this.readyCallbacks.forEach(e=>e(this.params)),this.readyCallbacks.length=0)},this.runReadyCallbacksAsync)}updateReady(){this.ready=Object.values(this.params).every(e=>e?.isAlive()??!1)}whenReady(e,t){this.ready?t(this.params):this.readyCallbacks.push(t),e.addDestroyFunc(()=>{let e=this.readyCallbacks.indexOf(t);e>=0&&this.readyCallbacks.splice(e,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(){let{leftHeader:e,centerHeader:t,rightHeader:i}=this.params;return[e,i,t]}getHeaderRowContainerCtrl(e){let t=this.params;switch(e){case"left":return t.leftHeader;case"right":return t.rightHeader;default:return t.centerHeader}}},hB=class extends i2{constructor(){super(...arguments),this.beanName="cellPositionUtils"}createId(e){let{rowIndex:t,rowPinned:i,column:r}=e;return this.createIdFromValues({rowIndex:t,column:r,rowPinned:i})}createIdFromValues(e){let{rowIndex:t,rowPinned:i,column:r}=e;return`${t}.${null==i?"null":i}.${r.getId()}`}equals(e,t){let i=e.column===t.column,r=e.rowPinned===t.rowPinned,s=e.rowIndex===t.rowIndex;return i&&r&&s}},hG=class extends i2{constructor(){super(...arguments),this.beanName="rowNodeEventThrottle",this.events=[]}wireBeans(e){this.animationFrameService=e.animationFrameService,this.rowModel=e.rowModel}postConstruct(){t4(this.gos)&&(this.clientSideRowModel=this.rowModel)}dispatchExpanded(e,t){if(null==this.clientSideRowModel){this.eventService.dispatchEvent(e);return}this.events.push(e);let i=()=>{this.clientSideRowModel&&this.clientSideRowModel.onRowGroupOpened(),this.events.forEach(e=>this.eventService.dispatchEvent(e)),this.events=[]};t?i():(null==this.dispatchExpandedDebounced&&(this.dispatchExpandedDebounced=this.animationFrameService.debounce(i)),this.dispatchExpandedDebounced())}},hz=class extends i2{constructor(){super(...arguments),this.beanName="rowPositionUtils"}wireBeans(e){this.rowModel=e.rowModel,this.pinnedRowModel=e.pinnedRowModel,this.pageBoundsService=e.pageBoundsService}getFirstRow(){let e,t=0;return this.pinnedRowModel.getPinnedTopRowCount()?e="top":this.rowModel.getRowCount()?(e=null,t=this.pageBoundsService.getFirstRow()):this.pinnedRowModel.getPinnedBottomRowCount()&&(e="bottom"),void 0===e?null:{rowIndex:t,rowPinned:e}}getLastRow(){let e;let t=null,i=this.pinnedRowModel.getPinnedBottomRowCount(),r=this.pinnedRowModel.getPinnedTopRowCount();return i?(t="bottom",e=i-1):this.rowModel.getRowCount()?(t=null,e=this.pageBoundsService.getLastRow()):r&&(t="top",e=r-1),void 0===e?null:{rowIndex:e,rowPinned:t}}getRowNode(e){switch(e.rowPinned){case"top":return this.pinnedRowModel.getPinnedTopRow(e.rowIndex);case"bottom":return this.pinnedRowModel.getPinnedBottomRow(e.rowIndex);default:return this.rowModel.getRow(e.rowIndex)}}sameRow(e,t){return!e&&!t||(!e||!!t)&&(!!e||!t)&&e.rowIndex===t.rowIndex&&e.rowPinned==t.rowPinned}before(e,t){switch(e.rowPinned){case"top":if("top"!==t.rowPinned)return!0;break;case"bottom":if("bottom"!==t.rowPinned)return!1;break;default:if(tY(t.rowPinned))return"top"!==t.rowPinned}return e.rowIndex<t.rowIndex}},h_={cssName:"--ag-row-height",changeKey:"rowHeightChanged",defaultValue:42},hV={cssName:"--ag-header-height",changeKey:"headerHeightChanged",defaultValue:48},hj={cssName:"--ag-list-item-height",changeKey:"listItemHeightChanged",defaultValue:24},hH=class extends i2{constructor(){super(...arguments),this.beanName="environment",this.sizeEls=new Map,this.lastKnownValues=new Map,this.ancestorThemeClasses=[],this.sizesMeasured=!1,this.gridTheme=null}wireBeans(e){this.resizeObserverService=e.resizeObserverService,this.eGridDiv=e.eGridDiv}postConstruct(){this.addManagedPropertyListener("theme",()=>this.handleThemeGridOptionChange()),this.handleThemeGridOptionChange(),this.addDestroyFunc(()=>this.stopUsingTheme()),this.addManagedPropertyListener("rowHeight",()=>this.refreshRowHeightVariable()),this.ancestorThemeClasses=this.readAncestorThemeClasses(),this.setUpThemeClassObservers(),this.getSizeEl(h_),this.getSizeEl(hV),this.getSizeEl(hj)}getDefaultRowHeight(){return this.getCSSVariablePixelValue(h_)}getDefaultHeaderHeight(){return this.getCSSVariablePixelValue(hV)}getDefaultColumnMinWidth(){return Math.min(36,this.getDefaultRowHeight())}getDefaultListItemHeight(){return this.getCSSVariablePixelValue(hj)}hasMeasuredSizes(){return this.sizesMeasured}getGridThemeClass(){return this.gridTheme?.getCssClass()||null}getThemeClasses(){return this.gridTheme?[this.gridTheme.getCssClass()]:this.ancestorThemeClasses}applyThemeClasses(e){let t=this.getThemeClasses();for(let i of Array.from(e.classList))i.startsWith("ag-theme-")&&!t.includes(i)&&e.classList.remove(i);e.classList.add(...t)}refreshRowHeightVariable(){let e=this.eGridDiv.style.getPropertyValue("--ag-line-height").trim(),t=this.gos.get("rowHeight");if(null==t||isNaN(t)||!isFinite(t))return null!==e&&this.eGridDiv.style.setProperty("--ag-line-height",null),-1;let i=`${t}px`;return e!=i?(this.eGridDiv.style.setProperty("--ag-line-height",i),t):""!=e?parseFloat(e):-1}getCSSVariablePixelValue(e){let t=this.lastKnownValues.get(e);if(null!=t)return t;let i=this.measureSizeEl(e);return"detached"===i||"no-styles"===i?e.defaultValue:(this.lastKnownValues.set(e,i),i)}measureSizeEl(e){let t=this.getSizeEl(e);if(null==t.offsetParent)return"detached";let i=t.offsetWidth;return i===hW?"no-styles":(this.sizesMeasured=!0,i)}getSizeEl(e){let t=this.sizeEls.get(e);if(t)return t;let i=this.eMeasurementContainer;i||((i=this.eMeasurementContainer=document.createElement("div")).className="ag-measurement-container",this.gos.get("theme")&&this.applyThemeClasses(i),this.eGridDiv.appendChild(i)),(t=document.createElement("div")).style.width=`var(${e.cssName}, ${hW}px)`,i.appendChild(t),this.sizeEls.set(e,t);let r=this.measureSizeEl(e);"no-styles"===r&&tO(`no value for ${e.cssName}. This usually means that the grid has been initialised before styles have been loaded. The default value of ${e.defaultValue} will be used and updated when styles load.`);let s=this.resizeObserverService.observeResize(t,()=>{let t=this.measureSizeEl(e);"detached"!==t&&"no-styles"!==t&&(this.lastKnownValues.set(e,t),t!==r&&(r=t,this.fireGridStylesChangedEvent(e.changeKey)))});return this.addDestroyFunc(()=>s()),t}fireGridStylesChangedEvent(e){this.eventService.dispatchEvent({type:"gridStylesChanged",[e]:!0})}setUpThemeClassObservers(){let e=new MutationObserver(()=>{let e=this.readAncestorThemeClasses();hU(e,this.ancestorThemeClasses)||(this.ancestorThemeClasses=e,this.fireGridStylesChangedEvent("themeChanged"))}),t=this.eGridDiv;for(;t;)e.observe(t||this.eGridDiv,{attributes:!0,attributeFilter:["class"]}),t=t.parentElement;this.addDestroyFunc(()=>e.disconnect())}readAncestorThemeClasses(){let e=this.eGridDiv,t=[];for(;e;){for(let i of Array.from(e.classList).filter(e=>e.startsWith("ag-theme-")))t.includes(i)||t.unshift(i);e=e.parentElement}return Object.freeze(t)}handleThemeGridOptionChange(){let{gos:e,eMeasurementContainer:t,gridTheme:i}=this,r=e.get("theme")||null;r!==i&&(i?.stopUse(),this.gridTheme=r,r?.startUse({loadThemeGoogleFonts:e.get("loadThemeGoogleFonts"),container:this.eGridDiv}),t&&this.applyThemeClasses(t),this.fireGridStylesChangedEvent("themeChanged"))}stopUsingTheme(){this.gridTheme?.stopUse(),this.gridTheme=null}},hU=(e,t)=>e.length===t.length&&-1===e.findIndex((i,r)=>e[r]!==t[r]),hW=15538,h$=class extends i2{constructor(){super(...arguments),this.beanName="eventService",this.globalEventService=new tR}wireBeans(e){this.globalEventListener=e.globalEventListener,this.globalSyncEventListener=e.globalSyncEventListener}postConstruct(){if(this.globalEventListener){let e=t7(this.gos);this.addGlobalListener(this.globalEventListener,e)}this.globalSyncEventListener&&this.addGlobalListener(this.globalSyncEventListener,!1)}addEventListener(e,t,i){this.globalEventService.addEventListener(e,t,i)}removeEventListener(e,t,i){this.globalEventService.removeEventListener(e,t,i)}addGlobalListener(e,t=!1){this.globalEventService.addGlobalListener(e,t)}removeGlobalListener(e,t=!1){this.globalEventService.removeGlobalListener(e,t)}dispatchLocalEvent(){}dispatchEvent(e){this.globalEventService.dispatchEvent(this.gos.addGridCommonParams(e))}dispatchEventOnce(e){this.globalEventService.dispatchEventOnce(this.gos.addGridCommonParams(e))}},hY=class e extends i2{constructor(){super(...arguments),this.beanName="focusService"}wireBeans(e){this.eGridDiv=e.eGridDiv,this.columnModel=e.columnModel,this.visibleColsService=e.visibleColsService,this.headerNavigationService=e.headerNavigationService,this.headerPositionUtils=e.headerPositionUtils,this.rowRenderer=e.rowRenderer,this.rowPositionUtils=e.rowPositionUtils,this.cellPositionUtils=e.cellPositionUtils,this.navigationService=e.navigationService,this.ctrlsService=e.ctrlsService,this.filterManager=e.filterManager,this.rangeService=e.rangeService,this.advancedFilterService=e.advancedFilterService,this.overlayService=e.overlayService}static addKeyboardModeEvents(t){this.instanceCount>0||(t.addEventListener("keydown",e.toggleKeyboardMode),t.addEventListener("mousedown",e.toggleKeyboardMode))}static removeKeyboardModeEvents(t){this.instanceCount>0||(t.removeEventListener("keydown",e.toggleKeyboardMode),t.removeEventListener("mousedown",e.toggleKeyboardMode))}static toggleKeyboardMode(t){let i=e.keyboardModeActive,r="keydown"===t.type;r&&(t.ctrlKey||t.metaKey||t.altKey)||i===r||(e.keyboardModeActive=r)}postConstruct(){let e=this.clearFocusedCell.bind(this);this.addManagedEventListeners({columnPivotModeChanged:e,newColumnsLoaded:this.onColumnEverythingChanged.bind(this),columnGroupOpened:e,columnRowGroupChanged:e}),this.registerKeyboardFocusEvents(),this.ctrlsService.whenReady(this,e=>{this.gridCtrl=e.gridCtrl})}registerKeyboardFocusEvents(){let t=ia(this.gos);e.addKeyboardModeEvents(t),e.instanceCount++,this.addDestroyFunc(()=>{e.instanceCount--,e.removeKeyboardModeEvents(t)})}onColumnEverythingChanged(){if(!this.focusedCellPosition)return;let e=this.focusedCellPosition.column,t=this.columnModel.getCol(e.getId());e!==t&&this.clearFocusedCell()}isKeyboardMode(){return e.keyboardModeActive}getFocusCellToUseAfterRefresh(){return this.gos.get("suppressFocusAfterRefresh")||!this.focusedCellPosition||this.isDomDataMissingInHierarchy(ih(this.gos),le.DOM_DATA_KEY_ROW_CTRL)?null:this.focusedCellPosition}getFocusHeaderToUseAfterRefresh(){return this.gos.get("suppressFocusAfterRefresh")||!this.focusedHeaderPosition||this.isDomDataMissingInHierarchy(ih(this.gos),oJ.DOM_DATA_KEY_HEADER_CTRL)?null:this.focusedHeaderPosition}isDomDataMissingInHierarchy(e,t){let i=e;for(;i;){if(ir(this.gos,i,t))return!1;i=i.parentNode}return!0}getFocusedCell(){return this.focusedCellPosition}shouldRestoreFocus(e){return!!this.isCellRestoreFocused(e)&&(setTimeout(()=>{this.restoredFocusedCellPosition=null},0),!0)}clearRestoreFocus(){this.restoredFocusedCellPosition=null,this.awaitRestoreFocusedCell=!1}restoreFocusedCell(e,t){this.awaitRestoreFocusedCell=!0,setTimeout(()=>{this.awaitRestoreFocusedCell&&(this.setRestoreFocusedCell(e),t())})}isCellRestoreFocused(e){return null!=this.restoredFocusedCellPosition&&this.cellPositionUtils.equals(e,this.restoredFocusedCellPosition)}setRestoreFocusedCell(e){"react"===this.getFrameworkOverrides().renderingEngine&&(this.restoredFocusedCellPosition=e)}getFocusEventParams(e){let{rowIndex:t,rowPinned:i,column:r}=e,s={rowIndex:t,rowPinned:i,column:r,isFullWidthCell:!1},a=this.rowRenderer.getRowByPosition({rowIndex:t,rowPinned:i});return a&&(s.isFullWidthCell=a.isFullWidth()),s}clearFocusedCell(){if(this.restoredFocusedCellPosition=null,null==this.focusedCellPosition)return;let e=this.getFocusEventParams(this.focusedCellPosition);this.focusedCellPosition=null,this.eventService.dispatchEvent({type:"cellFocusCleared",...e})}setFocusedCell(e){let{column:t,rowIndex:i,rowPinned:r,forceBrowserFocus:s=!1,preventScrollOnBrowserFocus:a=!1}=e,o=this.columnModel.getCol(t);if(!o){this.focusedCellPosition=null;return}this.focusedCellPosition={rowIndex:i,rowPinned:t$(r),column:o},this.eventService.dispatchEvent({type:"cellFocused",...this.getFocusEventParams(this.focusedCellPosition),forceBrowserFocus:s,preventScrollOnBrowserFocus:a})}isCellFocused(e){return null!=this.focusedCellPosition&&this.cellPositionUtils.equals(e,this.focusedCellPosition)}isRowNodeFocused(e){return this.isRowFocused(e.rowIndex,e.rowPinned)}isHeaderWrapperFocused(e){if(null==this.focusedHeaderPosition)return!1;let t=e.getColumnGroupChild(),i=e.getRowIndex(),r=e.getPinned(),{column:s,headerRowIndex:a}=this.focusedHeaderPosition;return t===s&&i===a&&r==s.getPinned()}clearFocusedHeader(){this.focusedHeaderPosition=null}getFocusedHeader(){return this.focusedHeaderPosition}setFocusedHeader(e,t){this.focusedHeaderPosition={headerRowIndex:e,column:t}}isHeaderFocusSuppressed(){return this.gos.get("suppressHeaderFocus")||this.overlayService.isExclusive()}isCellFocusSuppressed(){return this.gos.get("suppressCellFocus")||this.overlayService.isExclusive()}focusHeaderPosition(e){if(this.isHeaderFocusSuppressed())return!1;let{direction:t,fromTab:i,allowUserOverride:r,event:s,fromCell:a,rowWithoutSpanValue:o}=e,{headerPosition:n}=e;if(a&&this.filterManager?.isAdvancedFilterHeaderActive())return this.focusAdvancedFilter(n);if(r){let e=this.getFocusedHeader(),r=this.headerNavigationService.getHeaderRowCount();if(i){let i=this.gos.getCallback("tabToNextHeader");i&&(n=this.getHeaderPositionFromUserFunc({userFunc:i,direction:t,currentPosition:e,headerPosition:n,headerRowCount:r}))}else{let t=this.gos.getCallback("navigateToNextHeader");t&&s&&(n=t({key:s.key,previousHeaderPosition:e,nextHeaderPosition:n,headerRowCount:r,event:s}))}}return!!n&&this.focusProvidedHeaderPosition({headerPosition:n,direction:t,event:s,fromCell:a,rowWithoutSpanValue:o})}focusHeaderPositionFromUserFunc(e){if(this.isHeaderFocusSuppressed())return!1;let{userFunc:t,headerPosition:i,direction:r,event:s}=e,a=this.getFocusedHeader(),o=this.headerNavigationService.getHeaderRowCount(),n=this.getHeaderPositionFromUserFunc({userFunc:t,direction:r,currentPosition:a,headerPosition:i,headerRowCount:o});return!!n&&this.focusProvidedHeaderPosition({headerPosition:n,direction:r,event:s})}getHeaderPositionFromUserFunc(e){let{userFunc:t,direction:i,currentPosition:r,headerPosition:s,headerRowCount:a}=e,o=t({backwards:"Before"===i,previousHeaderPosition:r,nextHeaderPosition:s,headerRowCount:a});return!0===o||null===o?(null===o&&tO("Since v31.3 Returning `null` from tabToNextHeader is deprecated. Return `true` to stay on the current header, or `false` to let the browser handle the tab behaviour."),r):!1===o?null:o}focusProvidedHeaderPosition(e){let{headerPosition:t,direction:i,fromCell:r,rowWithoutSpanValue:s,event:a}=e,{column:o,headerRowIndex:n}=t;if(-1===n)return this.filterManager?.isAdvancedFilterHeaderActive()?this.focusAdvancedFilter(t):this.focusGridView(o);this.headerNavigationService.scrollToColumn(o,i);let l=this.ctrlsService.getHeaderRowContainerCtrl(o.getPinned()),h=l?.focusHeader(t.headerRowIndex,o,a)||!1;return h&&(null!=s||r)&&this.headerNavigationService.setCurrentHeaderRowWithoutSpan(s??-1),h}focusFirstHeader(){if(this.overlayService.isExclusive()&&this.focusOverlay())return!0;let e=this.visibleColsService.getAllCols()[0];if(!e)return!1;e.getParent()&&(e=this.visibleColsService.getColGroupAtLevel(e,0));let t=this.headerPositionUtils.getHeaderIndexToFocus(e,0);return this.focusHeaderPosition({headerPosition:t,rowWithoutSpanValue:0})}focusLastHeader(e){if(this.overlayService.isExclusive()&&this.focusOverlay(!0))return!0;let t=this.headerNavigationService.getHeaderRowCount()-1,i=iB(this.visibleColsService.getAllCols());return this.focusHeaderPosition({headerPosition:{headerRowIndex:t,column:i},rowWithoutSpanValue:-1,event:e})}focusPreviousFromFirstCell(e){return this.filterManager?.isAdvancedFilterHeaderActive()?this.focusAdvancedFilter(null):this.focusLastHeader(e)}isAnyCellFocused(){return!!this.focusedCellPosition}isRowFocused(e,t){return null!=this.focusedCellPosition&&this.focusedCellPosition.rowIndex===e&&this.focusedCellPosition.rowPinned===t$(t)}findFocusableElements(e,t,i=!1){let r=sv;t&&(r+=", "+t),i&&(r+=', [tabindex="-1"]');let s=Array.prototype.slice.apply(e.querySelectorAll("[tabindex], input, select, button, textarea, [href]")).filter(e=>sN(e)),a=Array.prototype.slice.apply(e.querySelectorAll(r));return a.length?s.filter(e=>-1===a.indexOf(e)):s}focusInto(e,t=!1,i=!1){let r=this.findFocusableElements(e,null,i),s=t?iB(r):r[0];return!!s&&(s.focus({preventScroll:!0}),!0)}findFocusableElementBeforeTabGuard(e,t){if(!t)return null;let i=this.findFocusableElements(e),r=i.indexOf(t);if(-1===r)return null;let s=-1;for(let e=r-1;e>=0;e--)if(i[e].classList.contains("ag-tab-guard-top")){s=e;break}return s<=0?null:i[s-1]}findNextFocusableElement(e=this.eGridDiv,t,i){let r=this.findFocusableElements(e,t?':not([tabindex="-1"])':null),s=ih(this.gos),a=(t?r.findIndex(e=>e.contains(s)):r.indexOf(s))+(i?-1:1);return a<0||a>=r.length?null:r[a]}isTargetUnderManagedComponent(e,t){if(!t)return!1;let i=e.querySelectorAll(`.${oa.FOCUS_MANAGED_CLASS}`);if(!i.length)return!1;for(let e=0;e<i.length;e++)if(i[e].contains(t))return!0;return!1}findTabbableParent(e,t=5){let i=0;for(;e&&null===sp(e)&&++i<=t;)e=e.parentElement;return null===sp(e)?null:e}focusOverlay(e){let t=this.overlayService.isVisible()&&this.overlayService.getOverlayWrapper()?.getGui();return!!t&&this.focusInto(t,e)}focusGridViewFailed(e,t){return t&&this.focusOverlay(e)||e&&this.focusLastHeader()}focusGridView(e,t=!1,i=!0){if(this.overlayService.isExclusive())return i&&this.focusOverlay(t);if(this.isCellFocusSuppressed())return t&&!this.isHeaderFocusSuppressed()?this.focusLastHeader():!!(i&&this.focusOverlay(t))||this.focusNextGridCoreContainer(!1);let r=t?this.rowPositionUtils.getLastRow():this.rowPositionUtils.getFirstRow();if(r){let{rowIndex:i,rowPinned:s}=r;if(e??(e=this.getFocusedHeader()?.column),e&&null!=i){if(this.navigationService.ensureCellVisible({rowIndex:i,column:e,rowPinned:s}),t){let e=this.rowRenderer.getRowByPosition(r);if(e?.isFullWidth()&&this.navigationService.tryToFocusFullWidthRow(r,t))return!0}return this.setFocusedCell({rowIndex:i,column:e,rowPinned:t$(s),forceBrowserFocus:!0}),this.rangeService?.setRangeToCell({rowIndex:i,rowPinned:s,column:e}),!0}}return!!(i&&this.focusOverlay(t)||t&&this.focusLastHeader())}isGridFocused(){let e=ih(this.gos);return!!e&&this.eGridDiv.contains(e)}focusNextGridCoreContainer(e,t=!1){return!!(!t&&this.gridCtrl.focusNextInnerContainer(e))||(!t&&(e||this.gridCtrl.isDetailGrid())||this.gridCtrl.forceFocusOutOfContainer(e),!1)}focusAdvancedFilter(e){return this.advancedFilterFocusColumn=e?.column,this.advancedFilterService?.getCtrl().focusHeaderComp()??!1}focusNextFromAdvancedFilter(e,t){let i=(t?void 0:this.advancedFilterFocusColumn)??this.visibleColsService.getAllCols()?.[0];return e?this.focusHeaderPosition({headerPosition:{column:i,headerRowIndex:this.headerNavigationService.getHeaderRowCount()-1}}):this.focusGridView(i)}clearAdvancedFilterColumn(){this.advancedFilterFocusColumn=void 0}addFocusableContainer(e){this.gridCtrl.addFocusableContainer(e)}removeFocusableContainer(e){this.gridCtrl.removeFocusableContainer(e)}focusGridInnerElement(e){return this.gridCtrl.focusInnerElement(e)}allowFocusForNextGridCoreContainer(e){this.gridCtrl.allowFocusForNextCoreContainer(e)}};hY.keyboardModeActive=!1,hY.instanceCount=0;var hK=class extends i2{constructor(){super(...arguments),this.beanName="pinnedWidthService"}wireBeans(e){this.visibleColsService=e.visibleColsService}postConstruct(){let e=this.checkContainerWidths.bind(this);this.addManagedEventListeners({displayedColumnsChanged:e,displayedColumnsWidthChanged:e}),this.addManagedPropertyListener("domLayout",e)}checkContainerWidths(){let e=t5(this.gos,"print"),t=e?0:this.visibleColsService.getColsLeftWidth(),i=e?0:this.visibleColsService.getDisplayedColumnsRightWidth();t!=this.leftWidth&&(this.leftWidth=t,this.eventService.dispatchEvent({type:"leftPinnedWidthChanged"})),i!=this.rightWidth&&(this.rightWidth=i,this.eventService.dispatchEvent({type:"rightPinnedWidthChanged"}))}getPinnedRightWidth(){return this.rightWidth}getPinnedLeftWidth(){return this.leftWidth}},hZ=class extends i2{constructor(){super(...arguments),this.additionalFocusableContainers=new Set}wireBeans(e){this.beans=e,this.focusService=e.focusService,this.visibleColsService=e.visibleColsService}setComp(e,t,i){this.view=e,this.eGridHostDiv=t,this.eGui=i,this.eGui.setAttribute("grid-id",this.beans.context.getGridId());let{dragAndDropService:r,mouseEventService:s,ctrlsService:a,resizeObserverService:o}=this.beans,n={getContainer:()=>this.eGui,isInterestedIn:e=>1===e||0===e,getIconName:()=>"notAllowed"};r.addDropTarget(n),this.addDestroyFunc(()=>r.removeDropTarget(n)),s.stampTopLevelGridCompWithGridInstance(t),this.createManagedBean(new nV(this.view)),this.view.setRtlClass(this.gos.get("enableRtl")?"ag-rtl":"ag-ltr"),this.updateGridThemeClass(),this.addManagedEventListeners({gridStylesChanged:this.handleThemeChange.bind(this)});let l=o.observeResize(this.eGridHostDiv,this.onGridSizeChanged.bind(this));this.addDestroyFunc(()=>l()),a.register("gridCtrl",this)}isDetailGrid(){let e=this.focusService.findTabbableParent(this.getGui());return e?.getAttribute("row-id")?.startsWith("detail")||!1}getOptionalSelectors(){let e=this.beans;return{paginationSelector:e.paginationService?.getPaginationSelector(),gridHeaderDropZonesSelector:e.columnDropZonesService?.getDropZoneSelector(),sideBarSelector:e.sideBarService?.getSideBarSelector(),statusBarSelector:e.statusBarService?.getStatusPanelSelector(),watermarkSelector:e.licenseManager?.getWatermarkSelector()}}onGridSizeChanged(){this.eventService.dispatchEvent({type:"gridSizeChanged",clientWidth:this.eGridHostDiv.clientWidth,clientHeight:this.eGridHostDiv.clientHeight})}destroyGridUi(){this.view.destroyGridUi()}getGui(){return this.eGui}setResizeCursor(e){this.view.setCursor(e?"ew-resize":null)}disableUserSelect(e){this.view.setUserSelect(e?"none":null)}focusNextInnerContainer(e){let t=this.getFocusableContainers(),{indexWithFocus:i,nextIndex:r}=this.getNextFocusableIndex(t,e);if(r<0||r>=t.length)return!1;if(0===r){if(i>0){let e=iB(this.visibleColsService.getAllCols());if(this.focusService.focusGridView(e,!0))return!0}return!1}return this.focusContainer(t[r],e)}focusInnerElement(e){let t=this.gos.getCallback("focusGridInnerElement");if(t&&t({fromBottom:!!e}))return!0;let i=this.getFocusableContainers(),r=this.visibleColsService.getAllCols();if(e){if(i.length>1)return this.focusContainer(iB(i),!0);let e=iB(r);if(this.focusService.focusGridView(e,!0))return!0}if(0===this.gos.get("headerHeight")||this.focusService.isHeaderFocusSuppressed()){if(this.focusService.focusGridView(r[0]))return!0;for(let e=1;e<i.length;e++)if(this.focusService.focusInto(i[e].getGui()))return!0;return!1}return this.focusService.focusFirstHeader()}forceFocusOutOfContainer(e=!1){this.view.forceFocusOutOfContainer(e)}addFocusableContainer(e){this.additionalFocusableContainers.add(e)}removeFocusableContainer(e){this.additionalFocusableContainers.delete(e)}allowFocusForNextCoreContainer(e){let t=this.view.getFocusableContainers(),{nextIndex:i,indexWithFocus:r}=this.getNextFocusableIndex(t,e);if(-1===r||i<0||i>=t.length)return;let s=t[i];s.setAllowFocus?.(!0),setTimeout(()=>{s.setAllowFocus?.(!1)})}getNextFocusableIndex(e,t){let i=ih(this.gos),r=e.findIndex(e=>e.getGui().contains(i));return{indexWithFocus:r,nextIndex:r+(t?-1:1)}}focusContainer(e,t){e.setAllowFocus?.(!0);let i=this.focusService.focusInto(e.getGui(),t);return e.setAllowFocus?.(!1),i}getFocusableContainers(){return[...this.view.getFocusableContainers(),...this.additionalFocusableContainers]}updateGridThemeClass(){let e=this.beans.environment.getGridThemeClass();e&&this.view.setGridThemeClass(e)}handleThemeChange(e){e.themeChanged&&this.updateGridThemeClass()}destroy(){this.additionalFocusableContainers.clear(),super.destroy()}},hq=class extends hu{constructor(e){super(),this.gridBody=null,this.sideBar=null,this.pagination=null,this.rootWrapperBody=null,this.eGridDiv=e}postConstruct(){let e={destroyGridUi:()=>this.destroyBean(this),setRtlClass:e=>this.addCssClass(e),setGridThemeClass:e=>this.addCssClass(e),forceFocusOutOfContainer:this.forceFocusOutOfContainer.bind(this),updateLayoutClasses:this.updateLayoutClasses.bind(this),getFocusableContainers:this.getFocusableContainers.bind(this),setUserSelect:e=>{this.getGui().style.userSelect=null!=e?e:"",this.getGui().style.webkitUserSelect=null!=e?e:""},setCursor:e=>{this.getGui().style.cursor=null!=e?e:""}},t=this.createManagedBean(new hZ),i=t.getOptionalSelectors(),r=this.createTemplate(i),s=[lD,...Object.values(i).filter(e=>!!e)];this.setTemplate(r,s),t.setComp(e,this.eGridDiv,this.getGui()),this.insertGridIntoDom(),this.initialiseTabGuard({onTabKeyDown:()=>void 0,focusInnerElement:e=>t.focusInnerElement(e),forceFocusOutWhenTabGuardsAreEmpty:!0})}insertGridIntoDom(){let e=this.getGui();this.eGridDiv.appendChild(e),this.addDestroyFunc(()=>{this.eGridDiv.removeChild(e),this.gos.get("debug")&&tN("Grid removed from DOM")})}updateLayoutClasses(e,t){let i=this.rootWrapperBody.classList;i.toggle("ag-layout-auto-height",t.autoHeight),i.toggle("ag-layout-normal",t.normal),i.toggle("ag-layout-print",t.print),this.addOrRemoveCssClass("ag-layout-auto-height",t.autoHeight),this.addOrRemoveCssClass("ag-layout-normal",t.normal),this.addOrRemoveCssClass("ag-layout-print",t.print)}createTemplate(e){let t=e.gridHeaderDropZonesSelector?"<ag-grid-header-drop-zones></ag-grid-header-drop-zones>":"",i=e.sideBarSelector?'<ag-side-bar data-ref="sideBar"></ag-side-bar>':"",r=e.statusBarSelector?"<ag-status-bar></ag-status-bar>":"",s=e.watermarkSelector?"<ag-watermark></ag-watermark>":"",a=e.paginationSelector?'<ag-pagination data-ref="pagination"></ag-pagination>':"";return`<div class="ag-root-wrapper" role="presentation">
                ${t}
                <div class="ag-root-wrapper-body" data-ref="rootWrapperBody" role="presentation">
                    <ag-grid-body data-ref="gridBody"></ag-grid-body>
                    ${i}
                </div>
                ${r}
                ${a}
                ${s}
            </div>`}getFocusableElement(){return this.rootWrapperBody}forceFocusOutOfContainer(e=!1){if(!e&&this.pagination?.isDisplayed()){this.pagination.forceFocusOutOfContainer(e);return}super.forceFocusOutOfContainer(e)}getFocusableContainers(){let e=[this.gridBody];return[this.sideBar,this.pagination].forEach(t=>{t&&e.push(t)}),e.filter(e=>sN(e.getGui()))}},hX=class extends i2{constructor(){super(...arguments),this.beanName="alignedGridsService",this.consuming=!1}wireBeans(e){this.columnModel=e.columnModel,this.columnSizeService=e.columnSizeService,this.ctrlsService=e.ctrlsService,this.columnApplyStateService=e.columnApplyStateService}getAlignedGridApis(){let e=this.gos.get("alignedGrids")??[],t="function"==typeof e;"function"==typeof e&&(e=e());let i=()=>`See ${this.getFrameworkOverrides().getDocLink("aligned-grids")}`;return e.map(e=>{if(!e){tB("alignedGrids contains an undefined option."),t||tB(`You may want to configure via a callback to avoid setup race conditions:
                     "alignedGrids: () => [linkedGrid]"`),tB(i());return}return this.isGridApi(e)?e:"current"in e?e.current?.api:(e.api||tB(`alignedGrids - No api found on the linked grid. If you are passing gridOptions to alignedGrids since v31 this is no longer valid. ${i()}`),e.api)}).filter(e=>!!e&&!e.isDestroyed())}isGridApi(e){return!!e&&!!e.dispatchEvent}postConstruct(){let e=this.fireColumnEvent.bind(this);this.addManagedEventListeners({columnMoved:e,columnVisible:e,columnPinned:e,columnGroupOpened:e,columnResized:e,bodyScroll:this.fireScrollEvent.bind(this),alignedGridColumn:({event:e})=>this.onColumnEvent(e),alignedGridScroll:({event:e})=>this.onScrollEvent(e)})}fireEvent(e){this.consuming||this.getAlignedGridApis().forEach(t=>{t.isDestroyed()||t.dispatchEvent(e)})}onEvent(e){this.consuming=!0,e(),this.consuming=!1}fireColumnEvent(e){this.fireEvent({type:"alignedGridColumn",event:e})}fireScrollEvent(e){"horizontal"===e.direction&&this.fireEvent({type:"alignedGridScroll",event:e})}onScrollEvent(e){this.onEvent(()=>{this.ctrlsService.getGridBodyCtrl().getScrollFeature().setHorizontalScrollPosition(e.left,!0)})}extractDataFromEvent(e,t){let i=[];return e.columns?e.columns.forEach(e=>{i.push(t(e))}):e.column&&i.push(t(e.column)),i}getMasterColumns(e){return this.extractDataFromEvent(e,e=>e)}getColumnIds(e){return this.extractDataFromEvent(e,e=>e.getColId())}onColumnEvent(e){this.onEvent(()=>{switch(e.type){case"columnMoved":case"columnVisible":case"columnPinned":case"columnResized":this.processColumnEvent(e);break;case"columnGroupOpened":this.processGroupOpenedEvent(e);break;case"columnPivotChanged":tO("pivoting is not supported with aligned grids. You can only use one of these features at a time in a grid.")}})}processGroupOpenedEvent(e){let{columnModel:t}=this;e.columnGroups.forEach(e=>{let i=null;e&&(i=t.getProvidedColGroup(e.getGroupId())),(!e||i)&&t.setColumnGroupOpened(i,e.isExpanded(),"alignedGridChanged")})}processColumnEvent(e){let t=e.column,i=null;if(t&&(i=this.columnModel.getColDefCol(t.getColId())),t&&!i)return;let r=this.getMasterColumns(e),{columnApplyStateService:s,columnSizeService:a,ctrlsService:o}=this;switch(e.type){case"columnMoved":{let t=e.api.getColumnState().map(e=>({colId:e.colId}));s.applyColumnState({state:t,applyOrder:!0},"alignedGridChanged")}break;case"columnVisible":{let t=e.api.getColumnState().map(e=>({colId:e.colId,hide:e.hide}));s.applyColumnState({state:t},"alignedGridChanged")}break;case"columnPinned":{let t=e.api.getColumnState().map(e=>({colId:e.colId,pinned:e.pinned}));s.applyColumnState({state:t},"alignedGridChanged")}break;case"columnResized":{let t={};r.forEach(e=>{t[e.getId()]={key:e.getColId(),newWidth:e.getActualWidth()}}),e.flexColumns?.forEach(e=>{t[e.getId()]&&delete t[e.getId()]}),a.setColumnWidths(Object.values(t),!1,e.finished,"alignedGridChanged")}}let n=o.getGridBodyCtrl().isVerticalScrollShowing();this.getAlignedGridApis().forEach(e=>{e.setGridOption("alwaysShowVerticalScroll",n)})}},hQ=class extends i2{constructor(){super(...arguments),this.beanName="dataTypeService",this.dataTypeDefinitions={},this.isWaitingForRowData=!1,this.isColumnTypeOverrideInDataTypeDefinitions=!1,this.columnStateUpdatesPendingInference={},this.columnStateUpdateListenerDestroyFuncs=[]}wireBeans(e){this.rowModel=e.rowModel,this.columnModel=e.columnModel,this.funcColsService=e.funcColsService,this.valueService=e.valueService,this.columnApplyStateService=e.columnApplyStateService,this.filterManager=e.filterManager}postConstruct(){this.groupHideOpenParents=this.gos.get("groupHideOpenParents"),this.addManagedPropertyListener("groupHideOpenParents",()=>{this.groupHideOpenParents=this.gos.get("groupHideOpenParents")}),this.processDataTypeDefinitions(),this.addManagedPropertyListener("dataTypeDefinitions",e=>{this.processDataTypeDefinitions(),this.columnModel.recreateColumnDefs(rS(e.source))})}processDataTypeDefinitions(){let e=this.getDefaultDataTypes();this.dataTypeDefinitions={},this.formatValueFuncs={};let t=e=>t=>{let{column:i,node:r,value:s}=t,a=i.getColDef().valueFormatter;return a===e.groupSafeValueFormatter&&(a=e.valueFormatter),this.valueService.formatValue(i,r,s,a)};Object.entries(e).forEach(([e,i])=>{let r={...i,groupSafeValueFormatter:this.createGroupSafeValueFormatter(i)};this.dataTypeDefinitions[e]=r,this.formatValueFuncs[e]=t(r)});let i=this.gos.get("dataTypeDefinitions")??{};this.dataTypeMatchers={},Object.entries(i).forEach(([r,s])=>{let a=this.processDataTypeDefinition(s,i,[r],e);a&&(this.dataTypeDefinitions[r]=a,s.dataTypeMatcher&&(this.dataTypeMatchers[r]=s.dataTypeMatcher),this.formatValueFuncs[r]=t(a))}),this.checkObjectValueHandlers(e),["dateString","text","number","boolean","date"].forEach(t=>{let i=this.dataTypeMatchers[t];i&&delete this.dataTypeMatchers[t],this.dataTypeMatchers[t]=i??e[t].dataTypeMatcher})}mergeDataTypeDefinitions(e,t){let i={...e,...t};return e.columnTypes&&t.columnTypes&&t.appendColumnTypes&&(i.columnTypes=[...rr(e.columnTypes),...rr(t.columnTypes)]),i}processDataTypeDefinition(e,t,i,r){let s;let a=e.extendsDataType;if(e.columnTypes&&(this.isColumnTypeOverrideInDataTypeDefinitions=!0),e.extendsDataType===e.baseDataType){let i=r[a],o=t[a];if(i&&o&&(i=o),!this.validateDataTypeDefinition(e,i,a))return;s=this.mergeDataTypeDefinitions(i,e)}else{if(i.includes(a)){tO('Data type definition hierarchies (via the "extendsDataType" property) cannot contain circular references.');return}let o=t[a];if(!this.validateDataTypeDefinition(e,o,a))return;let n=this.processDataTypeDefinition(o,t,[...i,a],r);if(!n)return;s=this.mergeDataTypeDefinitions(n,e)}return{...s,groupSafeValueFormatter:this.createGroupSafeValueFormatter(s)}}validateDataTypeDefinition(e,t,i){return t?t.baseDataType===e.baseDataType||(tO('The "baseDataType" property of a data type definition must match that of its parent.'),!1):(tO(`The data type definition ${i} does not exist.`),!1)}createGroupSafeValueFormatter(e){if(e.valueFormatter)return t=>{if(t.node?.group){let i=(t.colDef.pivotValueColumn??t.column).getAggFunc();if(i){if("first"===i||"last"===i)return e.valueFormatter(t);if("number"===e.baseDataType&&"count"!==i){if("number"==typeof t.value)return e.valueFormatter(t);if("object"==typeof t.value){if(!t.value)return;if("toNumber"in t.value)return e.valueFormatter({...t,value:t.value.toNumber()});if("value"in t.value)return e.valueFormatter({...t,value:t.value.value})}}return}if((this.gos.get("suppressGroupMaintainValueType")||"groupRows"===this.gos.get("groupDisplayType"))&&!this.gos.get("treeData"))return}else if(this.groupHideOpenParents&&t.column.isRowGroupActive()&&"string"==typeof t.value&&!e.dataTypeMatcher?.(t.value))return;return e.valueFormatter(t)}}updateColDefAndGetColumnType(e,t,i){let{cellDataType:r}=t,{field:s}=t;if(void 0===r&&(r=e.cellDataType),(null==r||!0===r)&&(r=!!this.canInferCellDataType(e,t)&&this.inferCellDataType(s,i)),!r){e.cellDataType=!1;return}let a=this.dataTypeDefinitions[r];if(!a){tO(`Missing data type definition - "${r}"`);return}return e.cellDataType=r,a.groupSafeValueFormatter&&(e.valueFormatter=a.groupSafeValueFormatter),a.valueParser&&(e.valueParser=a.valueParser),a.suppressDefaultProperties||this.setColDefPropertiesForBaseDataType(e,r,a,i),a.columnTypes}addColumnListeners(e){if(!this.isWaitingForRowData)return;let t=this.columnStateUpdatesPendingInference[e.getColId()];if(!t)return;let i=e=>{t.add(e.key)};e.addEventListener("columnStateUpdated",i),this.columnStateUpdateListenerDestroyFuncs.push(()=>e.removeEventListener("columnStateUpdated",i))}canInferCellDataType(e,t){if(!t4(this.gos))return!1;let i={cellRenderer:!0,valueGetter:!0,valueParser:!0,refData:!0};if(this.doColDefPropsPreventInference(t,i))return!1;let r=null===t.type?e.type:t.type;if(r){let e=this.gos.get("columnTypes")??{};if(rr(r).some(t=>{let r=e[t.trim()];return r&&this.doColDefPropsPreventInference(r,i)}))return!1}return!this.doColDefPropsPreventInference(e,i)}doColDefPropsPreventInference(e,t){return[["cellRenderer","agSparklineCellRenderer"],["valueGetter",void 0],["valueParser",void 0],["refData",void 0]].some(([i,r])=>this.doesColDefPropPreventInference(e,t,i,r))}doesColDefPropPreventInference(e,t,i,r){if(!t[i])return!1;let s=e[i];return null===s?(t[i]=!1,!1):void 0===r?!!s:s===r}inferCellDataType(e,t){let i;if(!e)return;let r=this.getInitialData();if(r){let t=e.indexOf(".")>=0&&!this.gos.get("suppressFieldDotNotation");i=rc(r,e,t)}else this.initWaitForRowData(t);if(null==i)return;let[s]=Object.entries(this.dataTypeMatchers).find(([e,t])=>t(i))??["object"];return s}getInitialData(){let e=this.gos.get("rowData");if(e?.length)return e[0];if(this.initialData)return this.initialData;{let e=this.rowModel.getRootNode().allLeafChildren;if(e?.length)return e[0].data}return null}initWaitForRowData(e){if(this.columnStateUpdatesPendingInference[e]=new Set,this.isWaitingForRowData)return;this.isWaitingForRowData=!0;let t=this.isColumnTypeOverrideInDataTypeDefinitions;t&&this.columnModel.queueResizeOperations();let[i]=this.addManagedEventListeners({rowDataUpdateStarted:e=>{let{firstRowData:r}=e;r&&(i?.(),this.isWaitingForRowData=!1,this.processColumnsPendingInference(r,t),this.columnStateUpdatesPendingInference={},t&&this.columnModel.processResizeOperations(),this.eventService.dispatchEvent({type:"dataTypesInferred"}))}})}isPendingInference(){return this.isWaitingForRowData}processColumnsPendingInference(e,t){this.initialData=e;let i=[];this.destroyColumnStateUpdateListeners();let r={},s={};Object.entries(this.columnStateUpdatesPendingInference).forEach(([e,a])=>{let o=this.columnModel.getCol(e);if(!o)return;let n=o.getColDef();if(!this.columnModel.resetColDefIntoCol(o,"cellDataTypeInferred"))return;let l=o.getColDef();if(t&&l.type&&l.type!==n.type){let t=this.getUpdatedColumnState(o,a);t.rowGroup&&null==t.rowGroupIndex&&(r[e]=t),t.pivot&&null==t.pivotIndex&&(s[e]=t),i.push(t)}}),t&&i.push(...this.funcColsService.generateColumnStateForRowGroupAndPivotIndexes(r,s)),i.length&&this.columnApplyStateService.applyColumnState({state:i},"cellDataTypeInferred"),this.initialData=null}getUpdatedColumnState(e,t){let i=this.columnApplyStateService.getColumnStateFromColDef(e);return t.forEach(e=>{delete i[e],"rowGroup"===e?delete i.rowGroupIndex:"pivot"===e&&delete i.pivotIndex}),i}checkObjectValueHandlers(e){let t=this.dataTypeDefinitions.object,i=e.object;this.hasObjectValueParser=t.valueParser!==i.valueParser,this.hasObjectValueFormatter=t.valueFormatter!==i.valueFormatter}getDateStringTypeDefinition(e){return e?this.getDataTypeDefinition(e)??this.dataTypeDefinitions.dateString:this.dataTypeDefinitions.dateString}getDateParserFunction(e){return this.getDateStringTypeDefinition(e).dateParser}getDateFormatterFunction(e){return this.getDateStringTypeDefinition(e).dateFormatter}getDataTypeDefinition(e){let t=e.getColDef();if(t.cellDataType)return this.dataTypeDefinitions[t.cellDataType]}getBaseDataType(e){return this.getDataTypeDefinition(e)?.baseDataType}checkType(e,t){if(null==t)return!0;let i=this.getDataTypeDefinition(e)?.dataTypeMatcher;return!i||i(t)}validateColDef(e){let t=e=>tO(`Cell data type is "object" but no Value ${e} has been provided. Please either provide an object data type definition with a Value ${e}, or set "colDef.value${e}"`);"object"===e.cellDataType&&(e.valueFormatter!==this.dataTypeDefinitions.object.groupSafeValueFormatter||this.hasObjectValueFormatter||t("Formatter"),e.editable&&e.valueParser===this.dataTypeDefinitions.object.valueParser&&!this.hasObjectValueParser&&t("Parser"))}getFormatValue(e){return this.formatValueFuncs[e]}setColDefPropertiesForBaseDataType(e,t,i,r){let s=this.formatValueFuncs[t];switch(i.baseDataType){case"number":e.cellEditor="agNumberCellEditor";break;case"boolean":e.cellEditor="agCheckboxCellEditor",e.cellRenderer="agCheckboxCellRenderer",e.suppressKeyboardEvent=e=>!!e.colDef.editable&&e.event.key===aa.SPACE;break;case"date":e.cellEditor="agDateCellEditor",e.keyCreator=s;break;case"dateString":e.cellEditor="agDateStringCellEditor",e.keyCreator=s;break;case"object":e.cellEditorParams={useFormatter:!0},e.comparator=(e,t)=>{let i=this.columnModel.getColDefCol(r),a=i?.getColDef();if(!i||!a)return 0;let o=null==e?"":s({column:i,node:null,value:e}),n=null==t?"":s({column:i,node:null,value:t});return o===n?0:o>n?1:-1},e.keyCreator=s}this.filterManager?.setColDefPropertiesForDataType(e,i,s)}getDefaultDataTypes(){let e=e=>!!e.match("^\\d{4}-\\d{2}-\\d{2}$"),t=this.localeService.getLocaleTextFunc();return{number:{baseDataType:"number",valueParser:e=>e.newValue?.trim?.()===""?null:Number(e.newValue),valueFormatter:e=>null==e.value?"":"number"!=typeof e.value||isNaN(e.value)?t("invalidNumber","Invalid Number"):String(e.value),dataTypeMatcher:e=>"number"==typeof e},text:{baseDataType:"text",valueParser:e=>""===e.newValue?null:tq(e.newValue),dataTypeMatcher:e=>"string"==typeof e},boolean:{baseDataType:"boolean",valueParser:e=>null==e.newValue?e.newValue:e.newValue?.trim?.()===""?null:"true"===String(e.newValue).toLowerCase(),valueFormatter:e=>null==e.value?"":String(e.value),dataTypeMatcher:e=>"boolean"==typeof e},date:{baseDataType:"date",valueParser:e=>o_(null==e.newValue?null:String(e.newValue)),valueFormatter:e=>null==e.value?"":!(e.value instanceof Date)||isNaN(e.value.getTime())?t("invalidDate","Invalid Date"):oB(e.value,!1)??"",dataTypeMatcher:e=>e instanceof Date},dateString:{baseDataType:"dateString",dateParser:e=>o_(e)??void 0,dateFormatter:e=>oB(e??null,!1)??void 0,valueParser:t=>e(String(t.newValue))?t.newValue:null,valueFormatter:t=>e(String(t.value))?t.value:"",dataTypeMatcher:t=>"string"==typeof t&&e(t)},object:{baseDataType:"object",valueParser:()=>null,valueFormatter:e=>tq(e.value)??""}}}destroyColumnStateUpdateListeners(){this.columnStateUpdateListenerDestroyFuncs.forEach(e=>e()),this.columnStateUpdateListenerDestroyFuncs=[]}destroy(){this.dataTypeDefinitions={},this.dataTypeMatchers={},this.formatValueFuncs={},this.columnStateUpdatesPendingInference={},this.destroyColumnStateUpdateListeners(),super.destroy()}};function hJ(e,t){let{colKey:i,rowNode:r,useFormatter:s}=t,a=e.columnModel.getColDefCol(i)??e.columnModel.getCol(i);if(tK(a))return null;let o=e.valueService.getValueForDisplay(a,r);return s?e.valueService.formatValue(a,r,o)??rL(o,!0):o}function h0(e,t){e.gos.updateGridOptions({options:t})}function h1(e){return e.rowRenderer.getFirstVirtualRenderedRow()}function h2(e){return e.rowRenderer.getLastVirtualRenderedRow()}var h3={version:o2,moduleName:"@ag-grid-community/menu-api",apiFunctions:{showColumnMenuAfterButtonClick:function(e,t,i){let r=e.columnModel.getCol(t);e.menuService.showColumnMenu({column:r,buttonElement:i,positionBy:"button"})},showColumnMenuAfterMouseClick:function(e,t,i){let r=e.columnModel.getCol(t);if(r||(r=e.columnModel.getColDefCol(t)),!r){tB(`column '${t}' not found`);return}e.menuService.showColumnMenu({column:r,mouseEvent:i,positionBy:"mouse"})},showColumnMenu:function(e,t){let i=e.columnModel.getCol(t);if(!i){tB(`column '${t}' not found`);return}e.menuService.showColumnMenu({column:i,positionBy:"auto"})},hidePopupMenu:function(e){e.menuService.hidePopupMenu()}}},h4={version:o2,moduleName:"@ag-grid-community/state-core",beans:[class extends i2{constructor(){super(...arguments),this.beanName="stateService",this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=tj(()=>this.dispatchQueuedStateUpdateEvents(),0),this.onRowGroupOpenedDebounced=tj(()=>this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState()),0),this.onRowSelectedDebounced=tj(()=>{this.staleStateKeys.delete("rowSelection"),this.updateCachedState("rowSelection",this.getRowSelectionState())},0),this.staleStateKeys=new Set}wireBeans(e){this.filterManager=e.filterManager,this.ctrlsService=e.ctrlsService,this.pivotResultColsService=e.pivotResultColsService,this.focusService=e.focusService,this.columnModel=e.columnModel,this.visibleColsService=e.visibleColsService,this.columnGroupStateService=e.columnGroupStateService,this.columnGetStateService=e.columnGetStateService,this.paginationService=e.paginationService,this.selectionService=e.selectionService,this.expansionService=e.expansionService,this.columnAnimationService=e.columnAnimationService,this.columnApplyStateService=e.columnApplyStateService,this.sideBarService=e.sideBarService,this.rangeService=e.rangeService}postConstruct(){this.isClientSideRowModel=t4(this.gos),this.cachedState=this.getInitialState(),this.ctrlsService.whenReady(this,()=>this.suppressEventsAndDispatchInitEvent(()=>this.setupStateOnGridReady()));let[e,t,i]=this.addManagedEventListeners({newColumnsLoaded:({source:t})=>{"gridInitializing"===t&&(e(),this.suppressEventsAndDispatchInitEvent(()=>this.setupStateOnColumnsInitialised()))},rowCountReady:()=>{t?.(),this.suppressEventsAndDispatchInitEvent(()=>this.setupStateOnRowCountReady())},firstDataRendered:()=>{i?.(),this.suppressEventsAndDispatchInitEvent(()=>this.setupStateOnFirstDataRendered())}})}getInitialState(){return function(e){if(e.version||(e.version="32.1.0"),"32.1.0"===e.version){var t;(t=e).cellSelection=function(e,t){if(e&&"object"==typeof e)return e[t]}(t,"rangeSelection"),e=t}return e}(this.gos.get("initialState")??{})}getState(){return this.staleStateKeys.size&&this.refreshStaleState(),this.cachedState}setupStateOnGridReady(){this.updateCachedState("sideBar",this.getSideBarState());let e=()=>this.updateCachedState("sideBar",this.getSideBarState());this.addManagedEventListeners({toolPanelVisibleChanged:e,sideBarUpdated:e})}setupStateOnColumnsInitialised(){let e=this.getInitialState();this.setColumnState(e),this.setColumnGroupState(e),this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","pivot","rowGroup","sort"]),this.updateCachedState("columnGroup",this.getColumnGroupState());let t=e=>()=>this.updateColumnState([e]);this.addManagedEventListeners({columnValueChanged:t("aggregation"),columnMoved:t("columnOrder"),columnPinned:t("columnPinning"),columnResized:t("columnSizing"),columnVisible:t("columnVisibility"),columnPivotChanged:t("pivot"),columnPivotModeChanged:t("pivot"),columnRowGroupChanged:t("rowGroup"),sortChanged:t("sort"),newColumnsLoaded:()=>this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","rowGroup","sort"]),columnGroupOpened:()=>this.updateCachedState("columnGroup",this.getColumnGroupState())})}setupStateOnRowCountReady(){let{filter:e,rowGroupExpansion:t,rowSelection:i,pagination:r}=this.getInitialState(),s=this.gos.get("advancedFilterModel");(e||s)&&this.setFilterState(e,s),t&&this.setRowGroupExpansionState(t),i&&this.setRowSelectionState(i),r&&this.setPaginationState(r),this.updateCachedState("filter",this.getFilterState()),this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState()),this.updateCachedState("rowSelection",this.getRowSelectionState()),this.updateCachedState("pagination",this.getPaginationState());let a=()=>this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState());this.addManagedEventListeners({filterChanged:()=>this.updateCachedState("filter",this.getFilterState()),rowGroupOpened:()=>this.onRowGroupOpenedDebounced(),expandOrCollapseAll:a,columnRowGroupChanged:a,rowDataUpdated:()=>{0!==this.gos.get("groupDefaultExpanded")&&setTimeout(()=>{a()})},selectionChanged:()=>{this.staleStateKeys.add("rowSelection"),this.onRowSelectedDebounced()},paginationChanged:e=>{(e.newPage||e.newPageSize)&&this.updateCachedState("pagination",this.getPaginationState())}})}setupStateOnFirstDataRendered(){let{scroll:e,cellSelection:t,focusedCell:i,columnOrder:r}=this.getInitialState();i&&this.setFocusedCellState(i),t&&this.setCellSelectionState(t),e&&this.setScrollState(e),this.setColumnPivotState(!!r?.orderedColIds),this.updateCachedState("sideBar",this.getSideBarState()),this.updateCachedState("focusedCell",this.getFocusedCellState());let s=this.getRangeSelectionState();this.updateCachedState("rangeSelection",s),this.updateCachedState("cellSelection",s),this.updateCachedState("scroll",this.getScrollState()),this.addManagedEventListeners({cellFocused:()=>this.updateCachedState("focusedCell",this.getFocusedCellState()),cellSelectionChanged:e=>{if(e.finished){let e=this.getRangeSelectionState();this.updateCachedState("rangeSelection",e),this.updateCachedState("cellSelection",e)}},bodyScrollEnd:()=>this.updateCachedState("scroll",this.getScrollState())})}getColumnState(){let e=this.columnModel.isPivotMode(),t=[],i=[],r=[],s=[],a=[],o=[],n=[],l=[],h=[],d=0,c=this.columnGetStateService.getColumnState();for(let e=0;e<c.length;e++){let{colId:u,sort:p,sortIndex:g,rowGroup:m,rowGroupIndex:f,aggFunc:v,pivot:y,pivotIndex:C,pinned:w,hide:b,width:S,flex:x}=c[e];h.push(u),p&&(t[g??d++]={colId:u,sort:p}),m&&(i[f??0]=u),"string"==typeof v&&r.push({colId:u,aggFunc:v}),y&&(s[C??0]=u),w&&("right"===w?o:a).push(u),b&&n.push(u),(x||S)&&l.push({colId:u,flex:x??void 0,width:S})}return{sort:t.length?{sortModel:t}:void 0,rowGroup:i.length?{groupColIds:i}:void 0,aggregation:r.length?{aggregationModel:r}:void 0,pivot:s.length||e?{pivotMode:e,pivotColIds:s}:void 0,columnPinning:a.length||o.length?{leftColIds:a,rightColIds:o}:void 0,columnVisibility:n.length?{hiddenColIds:n}:void 0,columnSizing:l.length?{columnSizingModel:l}:void 0,columnOrder:h.length?{orderedColIds:h}:void 0}}setColumnState(e){let{sort:t,rowGroup:i,aggregation:r,pivot:s,columnPinning:a,columnVisibility:o,columnSizing:n,columnOrder:l,partialColumnState:h}=e,d={},c=e=>{let t=d[e];return t||(t={colId:e},d[e]=t),t},u=h?{}:{sort:null,sortIndex:null,rowGroup:null,rowGroupIndex:null,aggFunc:null,pivot:null,pivotIndex:null,pinned:null,hide:null,flex:null};t&&(t.sortModel.forEach(({colId:e,sort:t},i)=>{let r=c(e);r.sort=t,r.sortIndex=i}),u.sort=null,u.sortIndex=null),i&&(i.groupColIds.forEach((e,t)=>{let i=c(e);i.rowGroup=!0,i.rowGroupIndex=t}),u.rowGroup=null,u.rowGroupIndex=null),r&&(r.aggregationModel.forEach(({colId:e,aggFunc:t})=>{c(e).aggFunc=t}),u.aggFunc=null),s&&(s.pivotColIds.forEach((e,t)=>{let i=c(e);i.pivot=!0,i.pivotIndex=t}),this.gos.updateGridOptions({options:{pivotMode:s.pivotMode},source:"gridInitializing"}),u.pivot=null,u.pivotIndex=null),a&&(a.leftColIds.forEach(e=>{c(e).pinned="left"}),a.rightColIds.forEach(e=>{c(e).pinned="right"}),u.pinned=null),o&&(o.hiddenColIds.forEach(e=>{c(e).hide=!0}),u.hide=null),n&&(n.columnSizingModel.forEach(({colId:e,flex:t,width:i})=>{let r=c(e);r.flex=t??null,r.width=i}),u.flex=null);let p=l?.orderedColIds,g=!!p?.length,m=g?p.map(e=>c(e)):Object.values(d);m.length&&(this.columnStates=m,this.columnApplyStateService.applyColumnState({state:m,applyOrder:g,defaultState:u},"gridInitializing"))}setColumnPivotState(e){let t=this.columnStates;this.columnStates=void 0;let i=this.columnGroupStates;if(this.columnGroupStates=void 0,this.pivotResultColsService.isPivotResultColsPresent()){if(t){let i=[];for(let e of t)this.pivotResultColsService.getPivotResultCol(e.colId)&&i.push(e);this.columnApplyStateService.applyColumnState({state:i,applyOrder:e},"gridInitializing")}i&&this.columnGroupStateService.setColumnGroupState(i,"gridInitializing")}}getColumnGroupState(){let e=this.columnGroupStateService.getColumnGroupState(),t=[];return e.forEach(({groupId:e,open:i})=>{i&&t.push(e)}),t.length?{openColumnGroupIds:t}:void 0}setColumnGroupState(e){if(!Object.prototype.hasOwnProperty.call(e,"columnGroup"))return;let t=new Set(e.columnGroup?.openColumnGroupIds),i=this.columnGroupStateService.getColumnGroupState().map(({groupId:e})=>{let i=t.has(e);return i&&t.delete(e),{groupId:e,open:i}});t.forEach(e=>{i.push({groupId:e,open:!0})}),i.length&&(this.columnGroupStates=i),this.columnGroupStateService.setColumnGroupState(i,"gridInitializing")}getFilterState(){let e=this.filterManager?.getFilterModel();e&&0===Object.keys(e).length&&(e=void 0);let t=this.filterManager?.getAdvancedFilterModel()??void 0;return e||t?{filterModel:e,advancedFilterModel:t}:void 0}setFilterState(e,t){let{filterModel:i,advancedFilterModel:r}=e??{advancedFilterModel:t};i&&this.filterManager?.setFilterModel(i,"columnFilter"),r&&this.filterManager?.setAdvancedFilterModel(r)}getRangeSelectionState(){let e=this.rangeService?.getCellRanges().map(e=>{let{id:t,type:i,startRow:r,endRow:s,columns:a,startColumn:o}=e;return{id:t,type:i,startRow:r,endRow:s,colIds:a.map(e=>e.getColId()),startColId:o.getColId()}});return e?.length?{cellRanges:e}:void 0}setCellSelectionState(e){let{gos:t,rangeService:i,columnModel:r,visibleColsService:s}=this;if(!iE(t)||!i)return;let a=[];if(e.cellRanges.forEach(e=>{let t=[];if(e.colIds.forEach(e=>{let i=r.getCol(e);i&&t.push(i)}),!t.length)return;let i=r.getCol(e.startColId);if(!i){let e=s.getAllCols(),r=new Set(t);i=e.find(e=>r.has(e))}a.push({...e,columns:t,startColumn:i})}),ix(t)&&iM(t)&&a.length>1)return tO("cannot add multiple ranges when `selection.suppressMultiRanges = true`");i.setCellRanges(a)}getScrollState(){if(!this.isClientSideRowModel)return;let e=this.ctrlsService.getGridBodyCtrl()?.getScrollFeature(),{left:t}=e?.getHScrollPosition()??{left:0},{top:i}=e?.getVScrollPosition()??{top:0};return i||t?{top:i,left:t}:void 0}setScrollState(e){if(!this.isClientSideRowModel)return;let{top:t,left:i}=e;this.ctrlsService.getGridBodyCtrl()?.getScrollFeature().setScrollPosition(t,i)}getSideBarState(){return this.sideBarService?.getSideBarComp()?.getState()}getFocusedCellState(){if(!this.isClientSideRowModel)return;let e=this.focusService.getFocusedCell();if(e){let{column:t,rowIndex:i,rowPinned:r}=e;return{colId:t.getColId(),rowIndex:i,rowPinned:r}}}setFocusedCellState(e){if(!this.isClientSideRowModel)return;let{colId:t,rowIndex:i,rowPinned:r}=e;this.focusService.setFocusedCell({column:this.columnModel.getCol(t),rowIndex:i,rowPinned:r,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}getPaginationState(){if(!this.paginationService)return;let e=this.paginationService.getCurrentPage(),t=this.gos.get("paginationAutoPageSize")?void 0:this.paginationService.getPageSize();if(e||t)return{page:e,pageSize:t}}setPaginationState(e){this.paginationService&&(e.pageSize&&!this.gos.get("paginationAutoPageSize")&&this.paginationService.setPageSize(e.pageSize,"initialState"),"number"==typeof e.page&&this.paginationService.setPage(e.page))}getRowSelectionState(){let e=this.selectionService.getSelectionState();return e&&(Array.isArray(e)||!1!==e.selectAll&&!1!==e.selectAllChildren||e?.toggledNodes?.length)?e:void 0}setRowSelectionState(e){this.selectionService.setSelectionState(e,"gridInitializing")}getRowGroupExpansionState(){let e=this.expansionService.getExpandedRows();return e.length?{expandedRowGroupIds:e}:void 0}setRowGroupExpansionState(e){this.expansionService.expandRows(e.expandedRowGroupIds)}updateColumnState(e){let t=this.getColumnState(),i=!1;Object.entries(t).forEach(([e,t])=>{t0(t,this.cachedState[e])||(i=!0)}),this.cachedState={...this.cachedState,...t},i&&this.dispatchStateUpdateEvent(e)}updateCachedState(e,t){let i=this.cachedState[e];this.setCachedStateValue(e,t),t0(t,i)||this.dispatchStateUpdateEvent([e])}setCachedStateValue(e,t){this.cachedState={...this.cachedState,[e]:t}}refreshStaleState(){this.staleStateKeys.forEach(e=>{"rowSelection"===e&&this.setCachedStateValue(e,this.getRowSelectionState())}),this.staleStateKeys.clear()}dispatchStateUpdateEvent(e){this.suppressEvents||(e.forEach(e=>this.queuedUpdateSources.add(e)),this.dispatchStateUpdateEventDebounced())}dispatchQueuedStateUpdateEvents(){let e=Array.from(this.queuedUpdateSources);this.queuedUpdateSources.clear(),this.eventService.dispatchEvent({type:"stateUpdated",sources:e,state:this.cachedState})}suppressEventsAndDispatchInitEvent(e){this.suppressEvents=!0,this.columnAnimationService.setSuppressAnimation(!0),e(),setTimeout(()=>{this.suppressEvents=!1,this.queuedUpdateSources.clear(),this.isAlive()&&(this.columnAnimationService.setSuppressAnimation(!1),this.dispatchStateUpdateEvent(["gridInitializing"]))})}}]},h6=class extends i2{constructor(){super(...arguments),this.beanName="paginationAutoPageSizeService"}wireBeans(e){this.ctrlsService=e.ctrlsService,this.paginationService=e.paginationService}postConstruct(){this.ctrlsService.whenReady(this,e=>{this.centerRowsCtrl=e.center;let t=this.checkPageSize.bind(this);this.addManagedEventListeners({bodyHeightChanged:t,scrollVisibilityChanged:t}),this.addManagedPropertyListener("paginationAutoPageSize",this.onPaginationAutoSizeChanged.bind(this)),this.checkPageSize()})}notActive(){return!this.gos.get("paginationAutoPageSize")||null==this.centerRowsCtrl}onPaginationAutoSizeChanged(){this.notActive()?this.paginationService.unsetAutoCalculatedPageSize():this.checkPageSize()}checkPageSize(){if(this.notActive())return;let e=this.centerRowsCtrl.getViewportSizeFeature().getBodyHeight();if(e>0){let t=()=>{let t=Math.floor(e/Math.max(it(this.gos),1));this.paginationService.setPageSize(t,"autoCalculated")};this.isBodyRendered?tj(()=>t(),50)():(t(),this.isBodyRendered=!0)}else this.isBodyRendered=!1}};function h5(e,t,i){e.addManagedElementListeners(t,{keydown:e=>{if(!e.defaultPrevented&&e.key===aa.TAB){let r=e.shiftKey;!i.findNextFocusableElement(t,!1,r)&&i.focusNextGridCoreContainer(r)&&e.preventDefault()}}})}var h8="paginationPageSizeSelector",h7={selector:"AG-PAGE-SIZE-SELECTOR",component:class extends sQ{constructor(){super('<span class="ag-paging-page-size"></span>'),this.hasEmptyOption=!1,this.handlePageSizeItemSelected=()=>{if(!this.selectPageSizeComp)return;let e=this.selectPageSizeComp.getValue();if(!e)return;let t=Number(e);isNaN(t)||t<1||t===this.paginationService.getPageSize()||(this.paginationService.setPageSize(t,"pageSizeSelector"),this.hasEmptyOption&&this.toggleSelectDisplay(!0),this.selectPageSizeComp.getFocusableElement().focus())}}wireBeans(e){this.paginationService=e.paginationService}postConstruct(){this.addManagedPropertyListener(h8,()=>{this.onPageSizeSelectorValuesChange()}),this.addManagedEventListeners({paginationChanged:e=>this.handlePaginationChanged(e)})}handlePaginationChanged(e){if(!this.selectPageSizeComp||!e?.newPageSize)return;let t=this.paginationService.getPageSize();this.getPageSizeSelectorValues().includes(t)?this.selectPageSizeComp.setValue(t.toString()):this.hasEmptyOption?this.selectPageSizeComp.setValue(""):this.toggleSelectDisplay(!0)}toggleSelectDisplay(e){if(this.selectPageSizeComp&&!e&&this.reset(),e&&(this.reloadPageSizesSelector(),!this.selectPageSizeComp))return}reset(){sL(this.getGui()),this.selectPageSizeComp&&(this.selectPageSizeComp=this.destroyBean(this.selectPageSizeComp))}onPageSizeSelectorValuesChange(){this.selectPageSizeComp&&this.shouldShowPageSizeSelector()&&this.reloadPageSizesSelector()}shouldShowPageSizeSelector(){return this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel")&&!this.gos.get("paginationAutoPageSize")&&!1!==this.gos.get(h8)}reloadPageSizesSelector(){let e=this.getPageSizeSelectorValues(),t=this.paginationService.getPageSize(),i=!t||!e.includes(t);if(i){let i=this.gos.exists("paginationPageSize"),r=!0!==this.gos.get(h8);tO(`'paginationPageSize=${t}'${i?"":" (default value)"}, but ${t} is not included in${r?"":" the default"} paginationPageSizeSelector=[${e.join(", ")}].`),r||tO(`Either set '${h8}' to an array that includes ${t} or to 'false' to disable the page size selector.`),e.unshift("")}let r=String(i?"":t);this.selectPageSizeComp?(iG(this.pageSizeOptions,e)||(this.selectPageSizeComp.clearOptions().addOptions(this.createPageSizeSelectOptions(e)),this.pageSizeOptions=e),this.selectPageSizeComp.setValue(r,!0)):this.createPageSizeSelectorComp(e,r),this.hasEmptyOption=i}createPageSizeSelectOptions(e){return e.map(e=>({value:String(e)}))}createPageSizeSelectorComp(e,t){let i=this.localeService.getLocaleTextFunc(),r=i("pageSizeSelectorLabel","Page Size:"),s=i("ariaPageSizeSelectorLabel","Page Size");this.selectPageSizeComp=this.createManagedBean(new op).addOptions(this.createPageSizeSelectOptions(e)).setValue(t).setAriaLabel(s).setLabel(r).onValueChange(()=>this.handlePageSizeItemSelected()),this.appendChild(this.selectPageSizeComp)}getPageSizeSelectorValues(){let e=this.gos.get(h8);return!Array.isArray(e)||tZ(e)?[20,50,100]:[...e].sort((e,t)=>e-t)}destroy(){this.toggleSelectDisplay(!1),super.destroy()}}},h9={selector:"AG-PAGINATION",component:class extends hu{constructor(){super(),this.btFirst=null,this.btPrevious=null,this.btNext=null,this.btLast=null,this.lbRecordCount=null,this.lbFirstRowOnPage=null,this.lbLastRowOnPage=null,this.lbCurrent=null,this.lbTotal=null,this.pageSizeComp=null,this.previousAndFirstButtonsDisabled=!1,this.nextButtonDisabled=!1,this.lastButtonDisabled=!1,this.areListenersSetup=!1,this.allowFocusInnerElement=!1}wireBeans(e){this.rowModel=e.rowModel,this.paginationService=e.paginationService,this.focusService=e.focusService,this.ariaAnnouncementService=e.ariaAnnouncementService}postConstruct(){let e=this.gos.get("enableRtl");this.setTemplate(this.getTemplate(),[h7]);let{btFirst:t,btPrevious:i,btNext:r,btLast:s}=this;this.activateTabIndex([t,i,r,s]),t.insertAdjacentElement("afterbegin",s2(e?"last":"first",this.gos)),i.insertAdjacentElement("afterbegin",s2(e?"next":"previous",this.gos)),r.insertAdjacentElement("afterbegin",s2(e?"previous":"next",this.gos)),s.insertAdjacentElement("afterbegin",s2(e?"first":"last",this.gos)),this.addManagedPropertyListener("pagination",this.onPaginationChanged.bind(this)),this.addManagedPropertyListener("suppressPaginationPanel",this.onPaginationChanged.bind(this)),this.addManagedPropertyListeners(["paginationPageSizeSelector","paginationAutoPageSize","suppressPaginationPanel"],()=>this.onPageSizeRelatedOptionsChange()),this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector()),this.initialiseTabGuard({onTabKeyDown:()=>{},focusInnerElement:e=>{this.allowFocusInnerElement?this.tabGuardFeature.getTabGuardCtrl().focusInnerElement(e):this.focusService.focusGridInnerElement(e)},forceFocusOutWhenTabGuardsAreEmpty:!0}),this.onPaginationChanged()}setAllowFocus(e){this.allowFocusInnerElement=e}onPaginationChanged(){let e=this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel");this.setDisplayed(e),e&&(this.setupListeners(),this.enableOrDisableButtons(),this.updateLabels(),this.onPageSizeRelatedOptionsChange())}onPageSizeRelatedOptionsChange(){this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector())}setupListeners(){this.areListenersSetup||(this.addManagedEventListeners({paginationChanged:this.onPaginationChanged.bind(this)}),[{el:this.btFirst,fn:this.onBtFirst.bind(this)},{el:this.btPrevious,fn:this.onBtPrevious.bind(this)},{el:this.btNext,fn:this.onBtNext.bind(this)},{el:this.btLast,fn:this.onBtLast.bind(this)}].forEach(e=>{let{el:t,fn:i}=e;this.addManagedListeners(t,{click:i,keydown:e=>{(e.key===aa.ENTER||e.key===aa.SPACE)&&(e.preventDefault(),i())}})}),h5(this,this.getGui(),this.focusService),this.areListenersSetup=!0)}onBtFirst(){this.previousAndFirstButtonsDisabled||this.paginationService.goToFirstPage()}formatNumber(e){let t=this.gos.getCallback("paginationNumberFormatter");if(t)return t({value:e});let i=this.localeService.getLocaleTextFunc();return oO(e,i("thousandSeparator",","),i("decimalSeparator","."))}getTemplate(){let e=this.localeService.getLocaleTextFunc(),t=e("page","Page"),i=e("to","to"),r=e("of","of"),s=e("firstPage","First Page"),a=e("previousPage","Previous Page"),o=e("nextPage","Next Page"),n=e("lastPage","Last Page"),l=this.getCompId();return`<div class="ag-paging-panel ag-unselectable" id="ag-${l}">
                <ag-page-size-selector data-ref="pageSizeComp"></ag-page-size-selector>
                <span class="ag-paging-row-summary-panel">
                    <span id="ag-${l}-first-row" data-ref="lbFirstRowOnPage" class="ag-paging-row-summary-panel-number"></span>
                    <span id="ag-${l}-to">${i}</span>
                    <span id="ag-${l}-last-row" data-ref="lbLastRowOnPage" class="ag-paging-row-summary-panel-number"></span>
                    <span id="ag-${l}-of">${r}</span>
                    <span id="ag-${l}-row-count" data-ref="lbRecordCount" class="ag-paging-row-summary-panel-number"></span>
                </span>
                <span class="ag-paging-page-summary-panel" role="presentation">
                    <div data-ref="btFirst" class="ag-button ag-paging-button" role="button" aria-label="${s}"></div>
                    <div data-ref="btPrevious" class="ag-button ag-paging-button" role="button" aria-label="${a}"></div>
                    <span class="ag-paging-description">
                        <span id="ag-${l}-start-page">${t}</span>
                        <span id="ag-${l}-start-page-number" data-ref="lbCurrent" class="ag-paging-number"></span>
                        <span id="ag-${l}-of-page">${r}</span>
                        <span id="ag-${l}-of-page-number" data-ref="lbTotal" class="ag-paging-number"></span>
                    </span>
                    <div data-ref="btNext" class="ag-button ag-paging-button" role="button" aria-label="${o}"></div>
                    <div data-ref="btLast" class="ag-button ag-paging-button" role="button" aria-label="${n}"></div>
                </span>
            </div>`}onBtNext(){this.nextButtonDisabled||this.paginationService.goToNextPage()}onBtPrevious(){this.previousAndFirstButtonsDisabled||this.paginationService.goToPreviousPage()}onBtLast(){this.lastButtonDisabled||this.paginationService.goToLastPage()}enableOrDisableButtons(){let e=this.paginationService.getCurrentPage(),t=this.rowModel.isLastRowIndexKnown(),i=this.paginationService.getTotalPages();this.previousAndFirstButtonsDisabled=0===e,this.toggleButtonDisabled(this.btFirst,this.previousAndFirstButtonsDisabled),this.toggleButtonDisabled(this.btPrevious,this.previousAndFirstButtonsDisabled);let r=this.isZeroPagesToDisplay();this.nextButtonDisabled=e===i-1||r,this.lastButtonDisabled=!t||r||e===i-1,this.toggleButtonDisabled(this.btNext,this.nextButtonDisabled),this.toggleButtonDisabled(this.btLast,this.lastButtonDisabled)}toggleButtonDisabled(e,t){r3(e,t),e.classList.toggle("ag-disabled",t)}isZeroPagesToDisplay(){let e=this.rowModel.isLastRowIndexKnown(),t=this.paginationService.getTotalPages();return e&&0===t}updateLabels(){let e,t,i,r,s;let a=this.rowModel.isLastRowIndexKnown(),o=this.paginationService.getTotalPages(),n=this.paginationService.getMasterRowCount(),l=a?n:null;if(1===l){let e=this.rowModel.getRow(0);if(e&&e.group&&!(e.groupData||e.aggData)){this.setTotalLabelsToZero();return}}let h=this.paginationService.getCurrentPage(),d=this.paginationService.getPageSize();this.isZeroPagesToDisplay()?e=t=0:(t=(e=d*h+1)+d-1,a&&t>l&&(t=l));let c=e+d-1,u=this.formatNumber(e);this.lbFirstRowOnPage.textContent=u;let p=this.localeService.getLocaleTextFunc();i=!a&&n<c?p("pageLastRowUnknown","?"):this.formatNumber(t),this.lbLastRowOnPage.textContent=i;let g=o>0,m=this.formatNumber(g?h+1:0);if(this.lbCurrent.textContent=m,a)r=this.formatNumber(o),s=this.formatNumber(l);else{let e=p("more","more");r=e,s=e}this.lbTotal.textContent=r,this.lbRecordCount.textContent=s,this.announceAriaStatus(u,i,s,m,r)}announceAriaStatus(e,t,i,r,s){let a=this.localeService.getLocaleTextFunc(),o=a("page","Page"),n=a("to","to"),l=a("of","of"),h=`${e} ${n} ${t} ${l} ${i}`,d=`${o} ${r} ${l} ${s}`;h!==this.ariaRowStatus&&(this.ariaRowStatus=h,this.ariaAnnouncementService.announceValue(h,"paginationRow")),d!==this.ariaPageStatus&&(this.ariaPageStatus=d,this.ariaAnnouncementService.announceValue(d,"paginationPage"))}setTotalLabelsToZero(){let e=this.formatNumber(0);this.lbFirstRowOnPage.textContent=e,this.lbCurrent.textContent=e,this.lbLastRowOnPage.textContent=e,this.lbTotal.textContent=e,this.lbRecordCount.textContent=e,this.announceAriaStatus(e,e,e,e,e)}}},de={version:o2,moduleName:"@ag-grid-community/pagination-core",beans:[class extends i2{constructor(){super(...arguments),this.beanName="paginationService",this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=0,this.masterRowCount=0}wireBeans(e){this.rowModel=e.rowModel,this.pageBoundsService=e.pageBoundsService}postConstruct(){this.active=this.gos.get("pagination"),this.pageSizeFromGridOptions=this.gos.get("paginationPageSize"),this.paginateChildRows=this.isPaginateChildRows(),this.addManagedPropertyListener("pagination",this.onPaginationGridOptionChanged.bind(this)),this.addManagedPropertyListener("paginationPageSize",this.onPageSizeGridOptionChanged.bind(this))}getPaginationSelector(){return h9}isPaginateChildRows(){return!!(this.gos.get("groupRemoveSingleChildren")||this.gos.get("groupRemoveLowestSingleChildren"))||this.gos.get("paginateChildRows")}onPaginationGridOptionChanged(){this.active=this.gos.get("pagination"),this.calculatePages(),this.dispatchPaginationChangedEvent({keepRenderedRows:!0})}onPageSizeGridOptionChanged(){this.setPageSize(this.gos.get("paginationPageSize"),"gridOptions")}goToPage(e){this.active&&this.currentPage!==e&&"number"==typeof this.currentPage&&(this.currentPage=e,this.calculatePages(),this.dispatchPaginationChangedEvent({newPage:!0}))}isRowPresent(e){return e.rowIndex>=this.topDisplayedRowIndex&&e.rowIndex<=this.bottomDisplayedRowIndex}getPageForIndex(e){return Math.floor(e/this.pageSize)}goToPageWithIndex(e){if(!this.active)return;let t=this.getPageForIndex(e);this.goToPage(t)}isRowInPage(e){return!this.active||this.getPageForIndex(e.rowIndex)===this.currentPage}getCurrentPage(){return this.currentPage}goToNextPage(){this.goToPage(this.currentPage+1)}goToPreviousPage(){this.goToPage(this.currentPage-1)}goToFirstPage(){this.goToPage(0)}goToLastPage(){let e=Math.floor(this.rowModel.getRowCount()/this.pageSize);this.goToPage(e)}getPageSize(){return this.pageSize}getTotalPages(){return this.totalPages}setPage(e){this.currentPage=e}get pageSize(){return tY(this.pageSizeAutoCalculated)&&this.gos.get("paginationAutoPageSize")?this.pageSizeAutoCalculated:tY(this.pageSizeFromPageSizeSelector)?this.pageSizeFromPageSizeSelector:tY(this.pageSizeFromInitialState)?this.pageSizeFromInitialState:tY(this.pageSizeFromGridOptions)?this.pageSizeFromGridOptions:this.defaultPageSize}calculatePages(){this.active?this.paginateChildRows?this.calculatePagesAllRows():this.calculatePagesMasterRowsOnly():this.calculatedPagesNotActive(),this.pageBoundsService.calculateBounds(this.topDisplayedRowIndex,this.bottomDisplayedRowIndex)}unsetAutoCalculatedPageSize(){if(void 0===this.pageSizeAutoCalculated)return;let e=this.pageSizeAutoCalculated;this.pageSizeAutoCalculated=void 0,this.pageSize!==e&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0}))}setPageSize(e,t){let i=this.pageSize;switch(t){case"autoCalculated":this.pageSizeAutoCalculated=e;break;case"pageSizeSelector":this.pageSizeFromPageSizeSelector=e,0!==this.currentPage&&this.goToFirstPage();break;case"initialState":this.pageSizeFromInitialState=e;break;case"gridOptions":this.pageSizeFromGridOptions=e,this.pageSizeFromInitialState=void 0,this.pageSizeFromPageSizeSelector=void 0,0!==this.currentPage&&this.goToFirstPage()}i!==this.pageSize&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0,keepRenderedRows:!0}))}setZeroRows(){this.masterRowCount=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=-1,this.currentPage=0,this.totalPages=0}adjustCurrentPageIfInvalid(){this.currentPage>=this.totalPages&&(this.currentPage=this.totalPages-1),(!isFinite(this.currentPage)||isNaN(this.currentPage)||this.currentPage<0)&&(this.currentPage=0)}calculatePagesMasterRowsOnly(){if(this.masterRowCount=this.rowModel.getTopLevelRowCount(),this.masterRowCount<=0){this.setZeroRows();return}let e=this.masterRowCount-1;this.totalPages=Math.floor(e/this.pageSize)+1,this.adjustCurrentPageIfInvalid();let t=this.pageSize*this.currentPage,i=this.pageSize*(this.currentPage+1)-1;if(i>e&&(i=e),this.topDisplayedRowIndex=this.rowModel.getTopLevelRowDisplayedIndex(t),i===e)this.bottomDisplayedRowIndex=this.rowModel.getRowCount()-1;else{let e=this.rowModel.getTopLevelRowDisplayedIndex(i+1);this.bottomDisplayedRowIndex=e-1}}getMasterRowCount(){return this.masterRowCount}calculatePagesAllRows(){if(this.masterRowCount=this.rowModel.getRowCount(),0===this.masterRowCount){this.setZeroRows();return}let e=this.masterRowCount-1;this.totalPages=Math.floor(e/this.pageSize)+1,this.adjustCurrentPageIfInvalid(),this.topDisplayedRowIndex=this.pageSize*this.currentPage,this.bottomDisplayedRowIndex=this.pageSize*(this.currentPage+1)-1,this.bottomDisplayedRowIndex>e&&(this.bottomDisplayedRowIndex=e)}calculatedPagesNotActive(){this.setPageSize(void 0,"autoCalculated"),this.totalPages=1,this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=this.rowModel.getRowCount()-1}dispatchPaginationChangedEvent(e){let{keepRenderedRows:t=!1,newPage:i=!1,newPageSize:r=!1}=e;this.eventService.dispatchEvent({type:"paginationChanged",animate:!1,newData:!1,newPage:i,newPageSize:r,keepRenderedRows:t})}},h6]},dt="clientSide",di="serverSide",dr="infinite",ds={onGroupExpandedOrCollapsed:[dt],refreshClientSideRowModel:[dt],isRowDataEmpty:[dt],forEachLeafNode:[dt],forEachNodeAfterFilter:[dt],forEachNodeAfterFilterAndSort:[dt],resetRowHeights:[dt],applyTransaction:[dt],applyTransactionAsync:[dt],flushAsyncTransactions:[dt],getBestCostNodeSelection:[dt],getServerSideSelectionState:[di],setServerSideSelectionState:[di],applyServerSideTransaction:[di],applyServerSideTransactionAsync:[di],applyServerSideRowData:[di],retryServerSideLoads:[di],flushServerSideAsyncTransactions:[di],refreshServerSide:[di],getServerSideGroupLevelState:[di],refreshInfiniteCache:[dr],purgeInfiniteCache:[dr],getInfiniteRowCount:[dr],isLastRowIndexKnown:[dr,di],expandAll:[dt,di],collapseAll:[dt,di],onRowHeightChanged:[dt,di],setRowCount:[dr,di],getCacheBlockState:[dr,di]},da={getValue:{version:"v31.3",new:"getCellValue"},getFirstDisplayedRow:{version:"v31.1",new:"getFirstDisplayedRowIndex"},getLastDisplayedRow:{version:"v31.1",new:"getLastDisplayedRowIndex"},getModel:{version:"v31.1",message:"Please use the appropriate grid API methods instead."},setColumnVisible:{version:"v31.1",old:"setColumnVisible(key,visible)",new:"setColumnsVisible([key],visible)"},setColumnPinned:{version:"v31.1",old:"setColumnPinned(key,pinned)",new:"setColumnsPinned([key],pinned)"},moveColumn:{version:"v31.1",old:"moveColumn(key, toIndex)",new:"moveColumns([key], toIndex)"},setColumnWidth:{version:"v31.1",old:"setColumnWidth(col, width)",new:"setColumnWidths([{key: col, newWidth: width}])"},autoSizeColumn:{version:"v31.1",old:"autoSizeColumn(key, skipHeader)",new:"autoSizeColumns([key], skipHeader)"},addAggFunc:{version:"v31.1",old:"addAggFunc(key, func)",new:"addAggFuncs({ key: func })"},removeValueColumn:{version:"v31.1",old:"removeValueColumn(colKey)",new:"removeValueColumns([colKey])"},addValueColumn:{version:"v31.1",old:"addValueColumn(colKey)",new:"addValueColumns([colKey])"},removeRowGroupColumn:{version:"v31.1",old:"removeRowGroupColumn(colKey)",new:"removeRowGroupColumns([colKey])"},addRowGroupColumn:{version:"v31.1",old:"addRowGroupColumn(colKey)",new:"addRowGroupColumns([colKey])"},removePivotColumn:{version:"v31.1",old:"removePivotColumn(colKey)",new:"removePivotColumns([colKey])"},addPivotColumn:{version:"v31.1",old:"addPivotColumn(colKey)",new:"addPivotColumns([colKey])"},showColumnMenuAfterButtonClick:{version:"v31.1",message:"Use 'IHeaderParams.showColumnMenu' within a header component, or 'api.showColumnMenu' elsewhere."},showColumnMenuAfterMouseClick:{version:"v31.1",message:"Use 'IHeaderParams.showColumnMenuAfterMouseClick' within a header component, or 'api.showColumnMenu' elsewhere."},getFilterInstance:{version:"v31.1",message:"'getFilterInstance' is deprecated. To get/set individual filter models, use 'getColumnFilterModel' or 'setColumnFilterModel' instead. To get hold of the filter instance, use 'getColumnFilterInstance' which returns the instance asynchronously."},showLoadingOverlay:{version:"v32",message:'`showLoadingOverlay` is deprecated. Use the grid option "loading"=true instead or setGridOption("loading", true).'},clearRangeSelection:{version:"v32.2",message:"Use `clearCellSelection` instead."},getInfiniteRowCount:{version:"v32.2",old:"getInfiniteRowCount()",new:"getDisplayedRowCount()"}},dn=(e,t)=>(t.rowModelType??"clientSide")==="clientSide"?{module:"@ag-grid-enterprise/row-grouping"}:null,dl={objectName:"colDef",allProperties:["headerName","columnGroupShow","headerClass","toolPanelClass","headerValueGetter","pivotKeys","groupId","colId","sort","initialSort","field","type","cellDataType","tooltipComponent","tooltipField","headerTooltip","cellClass","showRowGroup","filter","initialAggFunc","defaultAggFunc","aggFunc","pinned","initialPinned","chartDataType","cellAriaRole","cellEditorPopupPosition","headerGroupComponent","headerGroupComponentParams","cellStyle","cellRenderer","cellRendererParams","cellEditor","cellEditorParams","filterParams","pivotValueColumn","headerComponent","headerComponentParams","floatingFilterComponent","floatingFilterComponentParams","tooltipComponentParams","refData","columnsMenuParams","columnChooserParams","children","sortingOrder","allowedAggFuncs","menuTabs","pivotTotalColumnIds","cellClassRules","icons","sortIndex","initialSortIndex","flex","initialFlex","width","initialWidth","minWidth","maxWidth","rowGroupIndex","initialRowGroupIndex","pivotIndex","initialPivotIndex","suppressCellFlash","suppressColumnsToolPanel","suppressFiltersToolPanel","openByDefault","marryChildren","suppressStickyLabel","hide","initialHide","rowGroup","initialRowGroup","pivot","initialPivot","checkboxSelection","showDisabledCheckboxes","headerCheckboxSelection","headerCheckboxSelectionFilteredOnly","headerCheckboxSelectionCurrentPageOnly","suppressMenu","suppressHeaderMenuButton","suppressMovable","lockPosition","lockVisible","lockPinned","unSortIcon","suppressSizeToFit","suppressAutoSize","enableRowGroup","enablePivot","enableValue","editable","suppressPaste","suppressNavigable","enableCellChangeFlash","rowDrag","dndSource","autoHeight","wrapText","sortable","resizable","singleClickEdit","floatingFilter","cellEditorPopup","suppressFillHandle","wrapHeaderText","autoHeaderHeight","dndSourceOnRowDrag","valueGetter","valueSetter","filterValueGetter","keyCreator","valueFormatter","valueParser","comparator","equals","pivotComparator","suppressKeyboardEvent","suppressHeaderKeyboardEvent","colSpan","rowSpan","getQuickFilterText","onCellValueChanged","onCellClicked","onCellDoubleClicked","onCellContextMenu","rowDragText","tooltipValueGetter","cellRendererSelector","cellEditorSelector","suppressSpanHeaderHeight","useValueFormatterForExport","useValueParserForImport","mainMenuItems","contextMenuItems","suppressFloatingFilterButton","suppressHeaderFilterButton","suppressHeaderContextMenu","loadingCellRenderer","loadingCellRendererParams","loadingCellRendererSelector","context"],docsUrl:"column-properties/",deprecations:{columnsMenuParams:{version:"31.1",message:"Use `columnChooserParams` instead."},suppressMenu:{version:"31.1",message:"Use `suppressHeaderMenuButton` instead."},suppressCellFlash:{version:"31.2",message:"Use `enableCellChangeFlash={false}` in the ColDef"},checkboxSelection:{version:"32.2",message:"Use `selection.checkboxes` in `GridOptions` instead."},headerCheckboxSelection:{version:"32.2",message:"Use `selection.headerCheckbox = true` in `GridOptions` instead."},headerCheckboxSelectionFilteredOnly:{version:"32.2",message:'Use `selection.selectAll = "filtered"` in `GridOptions` instead.'},headerCheckboxSelectionCurrentPageOnly:{version:"32.2",message:'Use `selection.selectAll = "currentPage"` in `GridOptions` instead.'},showDisabledCheckboxes:{version:"32.2",message:"Use `selection.hideDisabledCheckboxes = true` in `GridOptions` instead."}},validations:{enableRowGroup:dn,rowGroup:dn,rowGroupIndex:dn,enablePivot:dn,enableValue:dn,pivot:dn,pivotIndex:dn,aggFunc:dn,cellEditor:e=>"agRichSelect"===e.cellEditor||"agRichSelectCellEditor"===e.cellEditor?{module:"@ag-grid-enterprise/rich-select"}:null,menuTabs:e=>{let t=["columnsMenuTab","generalMenuTab"];return e.menuTabs?.some(e=>t.includes(e))?{module:"@ag-grid-enterprise/menu"}:null},columnsMenuParams:{module:["@ag-grid-enterprise/menu","@ag-grid-enterprise/column-tool-panel"]},columnChooserParams:{module:["@ag-grid-enterprise/menu","@ag-grid-enterprise/column-tool-panel"]},headerCheckboxSelection:{supportedRowModels:["clientSide","serverSide"],validate:(e,{rowSelection:t})=>"multiple"===t?null:"headerCheckboxSelection is only supported with rowSelection=multiple"},headerCheckboxSelectionFilteredOnly:{supportedRowModels:["clientSide"],validate:(e,{rowSelection:t})=>"multiple"===t?null:"headerCheckboxSelectionFilteredOnly is only supported with rowSelection=multiple"},headerCheckboxSelectionCurrentPageOnly:{supportedRowModels:["clientSide"],validate:(e,{rowSelection:t})=>"multiple"===t?null:"headerCheckboxSelectionCurrentPageOnly is only supported with rowSelection=multiple"},children:()=>dl}},dh={objectName:"selection",allProperties:["mode","enableClickSelection","suppressMultiRanges","hideDisabledCheckboxes","checkboxes","headerCheckbox","isRowSelectable","groupSelects","selectAll","enableMultiSelectWithClick","handle","copySelectedRows"],docsUrl:"grid-options/#reference-selection-selection/",deprecations:{},validations:{}},dd=()=>({advancedFilterModel:{version:"31",message:"Use `initialState.filter.advancedFilterModel` instead."},suppressAsyncEvents:{version:"31",message:"Events should be handled asynchronously."},cellFadeDelay:{version:"31.1",renamed:"cellFadeDuration"},cellFlashDelay:{version:"31.1",renamed:"cellFlashDuration"},suppressServerSideInfiniteScroll:{version:"31.1"},serverSideSortOnServer:{version:"31.1"},serverSideFilterOnServer:{version:"31.1"},enableCellChangeFlash:{version:"31.2",message:"Use `enableCellChangeFlash` in the `ColDef` or `defaultColDef` for all columns."},groupIncludeFooter:{version:"31.3",message:"Use `groupTotalRow` instead."},groupIncludeTotalFooter:{version:"31.3",message:"Use `grandTotalRow` instead."},suppressLoadingOverlay:{version:"32",message:"Use `loading`=false instead."},enableFillHandle:{version:"32.2",message:"Use `selection.handle` instead."},enableRangeHandle:{version:"32.2",message:"Use `selection.handle` instead."},enableRangeSelection:{version:"32.2",message:'Use `selection.mode = "cell"` instead.'},rowSelection:{version:"32.2",message:'Use `selection.mode = "singleRow"` or `selection.mode = "multiRow" instead.'},suppressMultiRangeSelection:{version:"32.2",message:"Use `selection.suppressMultiRanges` instead."},suppressClearOnFillReduction:{version:"32.2",message:"Use `selection.handle.suppressClearOnFillReduction` instead."},fillHandleDirection:{version:"32.2",message:"Use `selection.handle.direction` instead."},fillOperation:{version:"32.2",message:"Use `selection.handle.setFillValue` instead."},suppressRowClickSelection:{version:"32.2",message:"Use `selection.enableClickSelection` instead."},suppressRowDeselection:{version:"32.2",message:"Use `selection.suppressDeselection` instead."},rowMultiSelectWithClick:{version:"32.2",message:"Use `selection.enableMultiSelectWithClick` instead."},groupSelectsChildren:{version:"32.2",message:'Use `selection.groupSelects = "descendants"` instead.'},groupSelectsFiltered:{version:"32.2",message:'Use `selection.groupSelects = "filteredDescendants"` instead.'},isRowSelectable:{version:"32.2",message:"Use `selectionOptions.isRowSelectable` instead."},suppressCopySingleCellRanges:{version:"32.2",message:"Use `selection.copySelectedRows` instead."},suppressCopyRowsToClipboard:{version:"32.2",message:"Use `selection.copySelectedRows` instead."},onRangeSelectionChanged:{version:"32.2",message:"Use `onCellSelectionChanged` instead."},onRangeDeleteStart:{version:"32.2",message:"Use `onCellSelectionDeleteStart` instead."},onRangeDeleteEnd:{version:"32.2",message:"Use `onCellSelectionDeleteEnd` instead."},suppressBrowserResizeObserver:{version:"32.2",message:"The grid always uses the browser's ResizeObserver, this grid option has no effect."},onColumnEverythingChanged:{version:"32.2",message:"Either use `onDisplayedColumnsChanged` which is fired at the same time, or use one of the more specific column events."}}),dc={suppressContextMenu:!1,preventDefaultOnContextMenu:!1,allowContextMenuWithControlKey:!1,suppressMenuHide:!0,enableBrowserTooltips:!1,tooltipTrigger:"hover",tooltipShowDelay:2e3,tooltipHideDelay:1e4,tooltipMouseTrack:!1,tooltipShowMode:"standard",tooltipInteraction:!1,copyHeadersToClipboard:!1,copyGroupHeadersToClipboard:!1,clipboardDelimiter:"	",suppressCopyRowsToClipboard:!1,suppressCopySingleCellRanges:!1,suppressLastEmptyLineOnPaste:!1,suppressClipboardPaste:!1,suppressClipboardApi:!1,suppressCutToClipboard:!1,maintainColumnOrder:!1,enableStrictPivotColumnOrder:!1,suppressFieldDotNotation:!1,allowDragFromColumnsToolPanel:!1,suppressMovableColumns:!1,suppressColumnMoveAnimation:!1,suppressMoveWhenColumnDragging:!1,suppressDragLeaveHidesColumns:!1,suppressRowGroupHidesColumns:!1,suppressAutoSize:!1,autoSizePadding:20,skipHeaderOnAutoSize:!1,singleClickEdit:!1,suppressClickEdit:!1,readOnlyEdit:!1,stopEditingWhenCellsLoseFocus:!1,enterNavigatesVertically:!1,enterNavigatesVerticallyAfterEdit:!1,enableCellEditingOnBackspace:!1,undoRedoCellEditing:!1,undoRedoCellEditingLimit:10,suppressCsvExport:!1,suppressExcelExport:!1,cacheQuickFilter:!1,includeHiddenColumnsInQuickFilter:!1,excludeChildrenWhenTreeDataFiltering:!1,enableAdvancedFilter:!1,includeHiddenColumnsInAdvancedFilter:!1,enableCharts:!1,masterDetail:!1,keepDetailRows:!1,keepDetailRowsCount:10,detailRowAutoHeight:!1,tabIndex:0,rowBuffer:10,valueCache:!1,valueCacheNeverExpires:!1,enableCellExpressions:!1,suppressTouch:!1,suppressFocusAfterRefresh:!1,suppressAsyncEvents:!1,suppressBrowserResizeObserver:!1,suppressPropertyNamesCheck:!1,suppressChangeDetection:!1,debug:!1,suppressLoadingOverlay:!1,suppressNoRowsOverlay:!1,pagination:!1,paginationPageSize:100,paginationPageSizeSelector:!0,paginationAutoPageSize:!1,paginateChildRows:!1,suppressPaginationPanel:!1,pivotMode:!1,pivotPanelShow:"never",pivotDefaultExpanded:0,pivotSuppressAutoColumn:!1,suppressExpandablePivotGroups:!1,functionsReadOnly:!1,suppressAggFuncInHeader:!1,alwaysAggregateAtRootLevel:!1,aggregateOnlyChangedColumns:!1,suppressAggFilteredOnly:!1,removePivotHeaderRowWhenSingleValueColumn:!1,animateRows:!0,enableCellChangeFlash:!1,cellFlashDelay:500,cellFlashDuration:500,cellFadeDelay:1e3,cellFadeDuration:1e3,allowShowChangeAfterFilter:!1,domLayout:"normal",ensureDomOrder:!1,enableRtl:!1,suppressColumnVirtualisation:!1,suppressMaxRenderedRowRestriction:!1,suppressRowVirtualisation:!1,rowDragManaged:!1,suppressRowDrag:!1,suppressMoveWhenRowDragging:!1,rowDragEntireRow:!1,rowDragMultiRow:!1,embedFullWidthRows:!1,groupDisplayType:"singleColumn",groupDefaultExpanded:0,groupMaintainOrder:!1,groupSelectsChildren:!1,groupIncludeTotalFooter:!1,groupSuppressBlankHeader:!1,groupSelectsFiltered:!1,showOpenedGroup:!1,groupRemoveSingleChildren:!1,groupRemoveLowestSingleChildren:!1,groupHideOpenParents:!1,groupAllowUnbalanced:!1,rowGroupPanelShow:"never",suppressMakeColumnVisibleAfterUnGroup:!1,treeData:!1,rowGroupPanelSuppressSort:!1,suppressGroupRowsSticky:!1,rowModelType:"clientSide",asyncTransactionWaitMillis:50,suppressModelUpdateAfterUpdateTransaction:!1,cacheOverflowSize:1,infiniteInitialRowCount:1,serverSideInitialRowCount:1,suppressServerSideInfiniteScroll:!1,cacheBlockSize:100,maxBlocksInCache:-1,maxConcurrentDatasourceRequests:2,blockLoadDebounceMillis:0,purgeClosedRowNodes:!1,serverSideSortAllLevels:!1,serverSideOnlyRefreshFilteredGroups:!1,serverSideSortOnServer:!1,serverSideFilterOnServer:!1,serverSidePivotResultFieldSeparator:"_",viewportRowModelPageSize:5,viewportRowModelBufferSize:5,alwaysShowHorizontalScroll:!1,alwaysShowVerticalScroll:!1,debounceVerticalScrollbar:!1,suppressHorizontalScroll:!1,suppressScrollOnNewData:!1,suppressScrollWhenPopupsAreOpen:!1,suppressAnimationFrame:!1,suppressMiddleClickScrolls:!1,suppressPreventDefaultOnMouseWheel:!1,rowMultiSelectWithClick:!1,suppressRowDeselection:!1,suppressRowClickSelection:!1,suppressCellFocus:!1,suppressHeaderFocus:!1,suppressMultiRangeSelection:!1,enableCellTextSelection:!1,enableRangeSelection:!1,enableRangeHandle:!1,enableFillHandle:!1,fillHandleDirection:"xy",suppressClearOnFillReduction:!1,accentedSort:!1,unSortIcon:!1,suppressMultiSort:!1,alwaysMultiSort:!1,suppressMaintainUnsortedOrder:!1,suppressRowHoverHighlight:!1,suppressRowTransform:!1,columnHoverHighlight:!1,deltaSort:!1,enableGroupEdit:!1,suppressGroupMaintainValueType:!1,groupLockGroupColumns:0,serverSideEnableClientSideSort:!1,suppressServerSideFullWidthLoadingRow:!1,pivotMaxGeneratedColumns:-1,columnMenu:"new",reactiveCustomComponents:!0,suppressSetFilterByDefault:!1},du=()=>({sideBar:{module:"@ag-grid-enterprise/side-bar"},statusBar:{module:"@ag-grid-enterprise/status-bar"},enableCharts:{module:"@ag-grid-enterprise/charts"},getMainMenuItems:{module:"@ag-grid-enterprise/menu"},getContextMenuItems:{module:"@ag-grid-enterprise/menu"},allowContextMenuWithControlKey:{module:"@ag-grid-enterprise/menu"},enableAdvancedFilter:{module:"@ag-grid-enterprise/advanced-filter"},treeData:{supportedRowModels:["clientSide","serverSide"],module:"@ag-grid-enterprise/row-grouping",validate:e=>{let t=e.rowModelType??"clientSide";switch(t){case"clientSide":{let i=`treeData requires 'getDataPath' in the ${t} row model.`;return e.getDataPath?null:i}case"serverSide":{let i=`treeData requires 'isServerSideGroup' and 'getServerSideGroupKey' in the ${t} row model.`;return e.isServerSideGroup&&e.getServerSideGroupKey?null:i}}return null}},masterDetail:{module:"@ag-grid-enterprise/master-detail"},enableRangeSelection:{module:"@ag-grid-enterprise/range-selection"},enableRangeHandle:{dependencies:{enableRangeSelection:[!0]}},enableFillHandle:{dependencies:{enableRangeSelection:[!0]}},groupDefaultExpanded:{supportedRowModels:["clientSide"]},groupIncludeFooter:{supportedRowModels:["clientSide","serverSide"],validate:e=>{switch(e.rowModelType??"clientSide"){case"clientSide":break;case"serverSide":return e.suppressServerSideInfiniteScroll?"groupIncludeFooter is not supported alongside suppressServerSideInfiniteScroll":null}return null}},groupHideOpenParents:{supportedRowModels:["clientSide","serverSide"],dependencies:{groupTotalRow:[void 0,"bottom"]}},groupIncludeTotalFooter:{supportedRowModels:["clientSide"]},groupRemoveSingleChildren:{dependencies:{groupHideOpenParents:[void 0,!1],groupRemoveLowestSingleChildren:[void 0,!1]}},groupRemoveLowestSingleChildren:{dependencies:{groupHideOpenParents:[void 0,!1],groupRemoveSingleChildren:[void 0,!1]}},groupSelectsChildren:{dependencies:{rowSelection:["multiple"]}},viewportDatasource:{supportedRowModels:["viewport"],module:"@ag-grid-enterprise/viewport-row-model"},serverSideDatasource:{supportedRowModels:["serverSide"],module:"@ag-grid-enterprise/server-side-row-model"},cacheBlockSize:{supportedRowModels:["serverSide","infinite"]},datasource:{supportedRowModels:["infinite"],module:"@ag-grid-community/infinite-row-model"},rowData:{supportedRowModels:["clientSide"],module:"@ag-grid-community/client-side-row-model"},paginationPageSizeSelector:{validate:e=>{let t=e.paginationPageSizeSelector;return"boolean"==typeof t||null==t?null:t.length?null:`'paginationPageSizeSelector' cannot be an empty array.
                    If you want to hide the page size selector, set paginationPageSizeSelector to false.`}},columnDefs:()=>dl,defaultColDef:()=>dl,defaultColGroupDef:()=>dl,autoGroupColumnDef:()=>dl,selectionColumnDef:()=>dl,selection:()=>dh}),dp=()=>({objectName:"gridOptions",allProperties:[...rW.ALL_PROPERTIES,...r$.EVENT_CALLBACKS],propertyExceptions:["api"],docsUrl:"grid-options/",deprecations:dd(),validations:du()}),dg={version:o2,moduleName:"@ag-grid-community/core-community-features",dependantModules:[{version:o2,moduleName:"@ag-grid-community/core"},{version:o2,moduleName:"@ag-grid-community/core-validations",beans:[class extends i2{constructor(){super(...arguments),this.beanName="validationService"}wireBeans(e){this.beans=e,this.gridOptions=e.gridOptions}postConstruct(){this.processGridOptions(this.gridOptions)}processGridOptions(e){this.processOptions(e,dp())}validateApiFunction(e,t){return function(e,t,i){let r=da[e];if(r){let{version:i,new:s,old:a,message:o}=r,n=a??e;return(...e)=>{let r=s?`Please use ${s} instead. `:"";return tO(`Since ${i} api.${n} is deprecated. ${r}${o??""}`),t.apply(t,e)}}let s=ds[e];return s?(...r)=>{let a=i.rowModel.getType();if(!s.includes(a)){tB(`api.${e} can only be called when gridOptions.rowModelType is ${s.join(" or ")}`);return}return t.apply(t,r)}:t}(e,t,this.beans)}processOptions(e,t){let{validations:i,deprecations:r,allProperties:s,propertyExceptions:a,objectName:o,docsUrl:n}=t;s&&!0!==this.gridOptions.suppressPropertyNamesCheck&&this.checkProperties(e,[...a??[],...Object.keys(r)],s,o,n);let l=new Set;Object.keys(e).forEach(t=>{let s;let a=r[t];if(a){if("renamed"in a){let{renamed:i,version:r}=a;l.add(`As of v${r}, ${String(t)} is deprecated. Please use ${String(i)} instead.`),e[i]=e[t]}else{let{message:e,version:i}=a;l.add(`As of v${i}, ${String(t)} is deprecated. ${e??""}`)}}let o=e[t];if(null==o||!1===o)return;let n=i[t];if(!n)return;if("function"==typeof n){let i=n(e,this.gridOptions);if(!i)return;if("objectName"in i){let r=e[t];if(Array.isArray(r)){r.forEach(e=>{this.processOptions(e,i)});return}this.processOptions(e[t],i);return}s=i}else s=n;let{module:h,dependencies:d,validate:c,supportedRowModels:u}=s;if(u){let e=this.gridOptions.rowModelType??"clientSide";if(!u.includes(e)){l.add(`${String(t)} is not supported with the '${e}' row model.`);return}}if(h){let e=Array.isArray(h)?h:[h],i=!0;if(e.forEach(e=>{this.gos.assertModuleRegistered(e,String(t))||(i=!1,l.add(`${String(t)} is only available when ${e} is loaded.`))}),!i)return}if(d){let i=this.checkForRequiredDependencies(t,d,e);if(i){l.add(i);return}}if(c){let t=c(e,this.gridOptions);if(t){l.add(t);return}}}),l.size>0&&l.forEach(e=>{tO(e)})}checkForRequiredDependencies(e,t,i){let r=Object.entries(t).find(([e,t])=>{let r=i[e];return!t.includes(r)});if(!r)return null;let[s,a]=r;return a.length>1?`'${String(e)}' requires '${s}' to be one of [${a.join(", ")}].`:`'${String(e)}' requires '${s}' to be ${a[0]}.`}checkProperties(e,t,i,r,s){let a=function(e,t,i){let r={},s=e.filter(e=>!t.some(t=>t===e));return s.length>0&&s.forEach(e=>r[e]=aC(e,i).values),r}(Object.getOwnPropertyNames(e),["__ob__","__v_skip","__metadata__",...t,...i],i);if(ro(a,(e,t)=>{let s=`invalid ${r} property '${e}' did you mean any of these: ${t.slice(0,8).join(", ")}.`;i.includes("context")&&(s+=`
If you are trying to annotate ${r} with application data, use the '${r}.context' property instead.`),tO(s)}),Object.keys(a).length>0&&s){let e=this.getFrameworkOverrides().getDocLink(s);tO(`to see all the valid ${r} properties please check: ${e}`)}}}]},{version:o2,moduleName:"@ag-grid-community/editing",dependantModules:[l4,{version:o2,moduleName:"@ag-grid-community/undo-redo-edit",beans:[lJ],dependantModules:[l4]},{version:o2,moduleName:"@ag-grid-community/full-row-edit",beans:[l3],dependantModules:[l4]},{version:o2,moduleName:"@ag-grid-community/all-editors",dependantModules:[l6,{version:o2,moduleName:"@ag-grid-community/data-type-editors",userComponents:[{name:"agTextCellEditor",classImp:lU},{name:"agNumberCellEditor",classImp:class extends lj{constructor(){super(new lW)}},params:{suppressPreventDefault:!0}},{name:"agDateCellEditor",classImp:class extends lj{constructor(){super(new lK)}}},{name:"agDateStringCellEditor",classImp:class extends lj{wireBeans(e){this.dataTypeService=e.dataTypeService}constructor(){super(new lZ(()=>this.dataTypeService))}}},{name:"agCheckboxCellEditor",classImp:class extends av{constructor(){super(`
            <div class="ag-cell-wrapper ag-cell-edit-wrapper ag-checkbox-edit">
                <ag-checkbox role="presentation" data-ref="eCheckbox"></ag-checkbox>
            </div>`,[ad]),this.eCheckbox=null}init(e){this.params=e;let t=e.value??void 0;this.eCheckbox.setValue(t),this.eCheckbox.getInputElement().setAttribute("tabindex","-1"),this.setAriaLabel(t),this.addManagedListeners(this.eCheckbox,{fieldValueChanged:e=>this.setAriaLabel(e.selected)})}getValue(){return this.eCheckbox.getValue()}focusIn(){this.eCheckbox.getFocusableElement().focus()}afterGuiAttached(){this.params.cellStartedEdit&&this.focusIn()}isPopup(){return!1}setAriaLabel(e){let t=this.localeService.getLocaleTextFunc(),i=sa(t,e),r=t("ariaToggleCellValue","Press SPACE to toggle cell value");this.eCheckbox.setInputAriaLabel(`${r} (${i})`)}}}],dependantModules:[l6]},{version:o2,moduleName:"@ag-grid-community/select-editor",userComponents:[{name:"agSelectCellEditor",classImp:lV}],dependantModules:[l4]},{version:o2,moduleName:"@ag-grid-community/large-text-editor",userComponents:[{name:"agLargeTextCellEditor",classImp:lz}],dependantModules:[l4]}]},{version:o2,moduleName:"@ag-grid-community/edit-api",apiFunctions:{undoCellEditing:function(e){e.undoRedoService?.undo("api")},redoCellEditing:function(e){e.undoRedoService?.redo("api")},getCellEditorInstances:function(e,t={}){return e.rowRenderer.getCellEditorInstances(t).map(aU)},getEditingCells:function(e){return e.rowRenderer.getEditingCells()},stopEditing:function(e,t=!1){e.rowRenderer.stopEditing(t)},startEditingCell:function(e,t){let i=e.columnModel.getCol(t.colKey);if(!i){tO(`no column found for ${t.colKey}`);return}let r={rowIndex:t.rowIndex,rowPinned:t.rowPinned||null,column:i};null==t.rowPinned&&l1(e,t.rowIndex),l0(e,t.colKey);let s=e.navigationService.getCellByPosition(r);if(!s)return;let{focusService:a,gos:o}=e,n=o.get("stopEditingWhenCellsLoseFocus")&&(()=>{let e=ih(o),t=s.getGui();return e!==t&&t.contains(e)})();(n||!a.isCellFocused(r))&&a.setFocusedCell({...r,forceBrowserFocus:n,preventScrollOnBrowserFocus:!0}),s.startRowOrCellEdit(t.key)},getCurrentUndoSize:function(e){return e.undoRedoService?.getCurrentUndoStackSize()??0},getCurrentRedoSize:function(e){return e.undoRedoService?.getCurrentRedoStackSize()??0}},dependantModules:[l4]}]},{version:o2,moduleName:"@ag-grid-community/filter",dependantModules:[{version:o2,moduleName:"@ag-grid-community/simple-floating-filter",dependantModules:[{version:o2,moduleName:"@ag-grid-community/simple-filter",dependantModules:[no],userComponents:[{name:"agTextColumnFilter",classImp:oL},{name:"agNumberColumnFilter",classImp:ok},{name:"agDateColumnFilter",classImp:oW},{name:"agDateInput",classImp:ne}]},nn],userComponents:[{name:"agTextColumnFloatingFilter",classImp:class extends ni{init(e){super.init(e),this.filterModelFormatter=new oA(this.localeService,this.optionsFactory)}onParamsUpdated(e){this.refresh(e)}refresh(e){super.refresh(e),this.filterModelFormatter.updateParams({optionsFactory:this.optionsFactory})}getDefaultFilterOptions(){return oT}getFilterModelFormatter(){return this.filterModelFormatter}createFloatingFilterInputService(){return this.createManagedBean(new nt)}}},{name:"agNumberColumnFloatingFilter",classImp:class extends ni{init(e){super.init(e),this.filterModelFormatter=new oD(this.localeService,this.optionsFactory,e.filterParams?.numberFormatter)}onParamsUpdated(e){this.refresh(e)}refresh(e){oI(e.filterParams)!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(e),super.refresh(e),this.filterModelFormatter.updateParams({optionsFactory:this.optionsFactory})}getDefaultFilterOptions(){return oM}getFilterModelFormatter(){return this.filterModelFormatter}createFloatingFilterInputService(e){return(this.allowedCharPattern=oI(e.filterParams),this.allowedCharPattern)?this.createManagedBean(new nt({config:{allowedCharPattern:this.allowedCharPattern}})):this.createManagedBean(new nr)}}},{name:"agDateColumnFloatingFilter",classImp:o9}]},nh,{version:o2,moduleName:"@ag-grid-community/quick-filter",dependantModules:[nd,{version:o2,moduleName:"@ag-grid-community/quick-filter-api",apiFunctions:{isQuickFilterPresent:function(e){return!!e.filterManager?.isQuickFilterPresent()},getQuickFilter:function(e){return e.gos.get("quickFilterText")},resetQuickFilter:function(e){e.filterManager?.resetQuickFilterCache()}},dependantModules:[nd]}]},{version:o2,moduleName:"@ag-grid-community/column-filter-api",apiFunctions:{isColumnFilterPresent:function(e){return!!e.filterManager?.isColumnFilterPresent()||!!e.filterManager?.isAggregateFilterPresent()},getFilterInstance:function(e,t,i){return e.filterManager?.getFilterInstance(t,i)},getColumnFilterInstance:function(e,t){return e.filterManager?.getColumnFilterInstance(t)??Promise.resolve(void 0)},destroyFilter:function(e,t){let i=e.columnModel.getColDefCol(t);if(i)return e.filterManager?.destroyFilter(i,"api")},setFilterModel:function(e,t){e.frameworkOverrides.wrapIncoming(()=>e.filterManager?.setFilterModel(t))},getFilterModel:function(e){return e.filterManager?.getFilterModel()??{}},getColumnFilterModel:function(e,t){return e.filterManager?.getColumnFilterModel(t)??null},setColumnFilterModel:function(e,t,i){return e.filterManager?.setColumnFilterModel(t,i)??Promise.resolve()},showColumnFilter:function(e,t){let i=e.columnModel.getCol(t);if(!i){tB(`column '${t}' not found`);return}e.menuService.showFilterMenu({column:i,containerType:"columnFilter",positionBy:"auto"})}},dependantModules:[no,{version:o2,moduleName:"@ag-grid-community/filter-api",apiFunctions:{isAnyFilterPresent:function(e){return!!e.filterManager?.isAnyFilterPresent()},onFilterChanged:function(e,t="api"){e.filterManager?.onFilterChanged({source:t})}},dependantModules:[na]}]}]},{version:o2,moduleName:"@ag-grid-community/state",dependantModules:[h4,{version:o2,moduleName:"@ag-grid-community/state-api",apiFunctions:{getState:function(e){return e.stateService?.getState()??{}}},dependantModules:[h4]}]},{version:o2,moduleName:"@ag-grid-community/data-type",beans:[hQ]},{version:o2,moduleName:"@ag-grid-community/aligned-grid",beans:[hX]},{version:o2,moduleName:"@ag-grid-community/pagination",dependantModules:[de,{version:o2,moduleName:"@ag-grid-community/pagination-api",dependantModules:[de],apiFunctions:{paginationIsLastPageFound:function(e){return e.rowModel.isLastRowIndexKnown()},paginationGetPageSize:function(e){return e.paginationService?.getPageSize()??100},paginationGetCurrentPage:function(e){return e.paginationService?.getCurrentPage()??0},paginationGetTotalPages:function(e){return e.paginationService?.getTotalPages()??1},paginationGetRowCount:function(e){return e.paginationService?e.paginationService.getMasterRowCount():e.rowModel.getRowCount()},paginationGoToNextPage:function(e){e.paginationService?.goToNextPage()},paginationGoToPreviousPage:function(e){e.paginationService?.goToPreviousPage()},paginationGoToFirstPage:function(e){e.paginationService?.goToFirstPage()},paginationGoToLastPage:function(e){e.paginationService?.goToLastPage()},paginationGoToPage:function(e,t){e.paginationService?.goToPage(t)}}}]},{version:o2,moduleName:"@ag-grid-community/api",dependantModules:[{version:o2,moduleName:"@ag-grid-community/core-api",apiFunctions:{getGridId:function(e){return e.context.getGridId()},destroy:function(e){e.gridDestroyService.destroy()},isDestroyed:function(e){return e.gridDestroyService.isDestroyCalled()},getGridOption:function(e,t){return e.gos.get(t)},setGridOption:function(e,t,i){h0(e,{[t]:i})},updateGridOptions:h0}},{version:o2,moduleName:"@ag-grid-community/pinned-row-api",apiFunctions:{getPinnedTopRowCount:function(e){return e.pinnedRowModel.getPinnedTopRowCount()},getPinnedBottomRowCount:function(e){return e.pinnedRowModel.getPinnedBottomRowCount()},getPinnedTopRow:function(e,t){return e.pinnedRowModel.getPinnedTopRow(t)},getPinnedBottomRow:function(e,t){return e.pinnedRowModel.getPinnedBottomRow(t)}}},{version:o2,moduleName:"@ag-grid-community/row-selection-api",apiFunctions:{setNodesSelected:function(e,t){if(!t.nodes.every(e=>e.rowPinned?(tO("cannot select pinned rows"),!1):void 0!==e.id||(tO("cannot select node until id for node is known"),!1)))return;let{nodes:i,source:r,newValue:s}=t;e.selectionService.setNodesSelected({nodes:i,source:r??"api",newValue:s})},selectAll:function(e,t="apiSelectAll"){e.selectionService.selectAllRowNodes({source:t})},deselectAll:function(e,t="apiSelectAll"){e.selectionService.deselectAllRowNodes({source:t})},selectAllFiltered:function(e,t="apiSelectAllFiltered"){e.selectionService.selectAllRowNodes({source:t,justFiltered:!0})},deselectAllFiltered:function(e,t="apiSelectAllFiltered"){e.selectionService.deselectAllRowNodes({source:t,justFiltered:!0})},selectAllOnCurrentPage:function(e,t="apiSelectAllCurrentPage"){e.selectionService.selectAllRowNodes({source:t,justCurrentPage:!0})},deselectAllOnCurrentPage:function(e,t="apiSelectAllCurrentPage"){e.selectionService.deselectAllRowNodes({source:t,justCurrentPage:!0})},getSelectedNodes:function(e){return e.selectionService.getSelectedNodes()},getSelectedRows:function(e){return e.selectionService.getSelectedRows()}}},{version:o2,moduleName:"@ag-grid-community/column-api",apiFunctions:{getColumnDef:function(e,t){let i=e.columnModel.getColDefCol(t);return i?i.getColDef():null},getColumnDefs:function(e){return e.columnModel.getColumnDefs()},sizeColumnsToFit:function(e,t){"number"==typeof t?e.columnSizeService.sizeColumnsToFit(t,"api"):e.ctrlsService.getGridBodyCtrl().sizeColumnsToFit(t)},setColumnGroupOpened:function(e,t,i){e.columnModel.setColumnGroupOpened(t,i,"api")},getColumnGroup:function(e,t,i){return e.visibleColsService.getColumnGroup(t,i)},getProvidedColumnGroup:function(e,t){return e.columnModel.getProvidedColGroup(t)},getDisplayNameForColumn:function(e,t,i){return e.columnNameService.getDisplayNameForColumn(t,i)||""},getDisplayNameForColumnGroup:function(e,t,i){return e.columnNameService.getDisplayNameForColumnGroup(t,i)||""},getColumn:function(e,t){return e.columnModel.getColDefCol(t)},getColumns:function(e){return e.columnModel.getColDefCols()},applyColumnState:function(e,t){return e.columnApplyStateService.applyColumnState(t,"api")},getColumnState:function(e){return e.columnGetStateService.getColumnState()},resetColumnState:function(e){e.columnApplyStateService.resetColumnState("api")},getColumnGroupState:function(e){return e.columnGroupStateService.getColumnGroupState()},setColumnGroupState:function(e,t){e.columnGroupStateService.setColumnGroupState(t,"api")},resetColumnGroupState:function(e){e.columnGroupStateService.resetColumnGroupState("api")},isPinning:function(e){return e.visibleColsService.isPinningLeft()||e.visibleColsService.isPinningRight()},isPinningLeft:function(e){return e.visibleColsService.isPinningLeft()},isPinningRight:function(e){return e.visibleColsService.isPinningRight()},getDisplayedColAfter:function(e,t){return e.visibleColsService.getColAfter(t)},getDisplayedColBefore:function(e,t){return e.visibleColsService.getColBefore(t)},setColumnVisible:function(e,t,i){e.columnModel.setColsVisible([t],i,"api")},setColumnsVisible:function(e,t,i){e.columnModel.setColsVisible(t,i,"api")},setColumnPinned:function(e,t,i){e.columnModel.setColsPinned([t],i,"api")},setColumnsPinned:function(e,t,i){e.columnModel.setColsPinned(t,i,"api")},getAllGridColumns:function(e){return e.columnModel.getCols()},getDisplayedLeftColumns:function(e){return e.visibleColsService.getLeftCols()},getDisplayedCenterColumns:function(e){return e.visibleColsService.getCenterCols()},getDisplayedRightColumns:function(e){return e.visibleColsService.getRightCols()},getAllDisplayedColumns:function(e){return e.visibleColsService.getAllCols()},getAllDisplayedVirtualColumns:function(e){return e.columnViewportService.getViewportColumns()},moveColumn:function(e,t,i){e.columnMoveService.moveColumns([t],i,"api")},moveColumnByIndex:function(e,t,i){e.columnMoveService.moveColumnByIndex(t,i,"api")},moveColumns:function(e,t,i){e.columnMoveService.moveColumns(t,i,"api")},setColumnWidth:function(e,t,i,r=!0,s="api"){e.columnSizeService.setColumnWidths([{key:t,newWidth:i}],!1,r,s)},setColumnWidths:function(e,t,i=!0,r="api"){e.columnSizeService.setColumnWidths(t,!1,i,r)},getLeftDisplayedColumnGroups:function(e){return e.visibleColsService.getTreeLeft()},getCenterDisplayedColumnGroups:function(e){return e.visibleColsService.getTreeCenter()},getRightDisplayedColumnGroups:function(e){return e.visibleColsService.getTreeRight()},getAllDisplayedColumnGroups:function(e){return e.visibleColsService.getAllTrees()},autoSizeColumn:function(e,t,i){return e.columnAutosizeService.autoSizeCols({colKeys:[t],skipHeader:i,source:"api"})},autoSizeColumns:function(e,t,i){e.columnAutosizeService.autoSizeCols({colKeys:t,skipHeader:i,source:"api"})},autoSizeAllColumns:function(e,t){e.columnAutosizeService.autoSizeAllColumns("api",t)}}},{version:o2,moduleName:"@ag-grid-community/row-api",apiFunctions:{redrawRows:function(e,t={}){let i=t?t.rowNodes:void 0;e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.redrawRows(i))},setRowNodeExpanded:function(e,t,i,r,s){e.expansionService.setRowNodeExpanded(t,i,r,s)},getRowNode:function(e,t){return e.rowModel.getRowNode(t)},addRenderedRowListener:function(e,t,i,r){e.rowRenderer.addRenderedRowListener(t,i,r)},getRenderedNodes:function(e){return e.rowRenderer.getRenderedNodes()},forEachNode:function(e,t,i){e.rowModel.forEachNode(t,i)},getFirstDisplayedRow:function(e){return h1(e)},getFirstDisplayedRowIndex:h1,getLastDisplayedRow:function(e){return h2(e)},getLastDisplayedRowIndex:h2,getDisplayedRowAtIndex:function(e,t){return e.rowModel.getRow(t)},getDisplayedRowCount:function(e){return e.rowModel.getRowCount()},getModel:function(e){return e.rowModel}}},{version:o2,moduleName:"@ag-grid-community/drag-api",apiFunctions:{addRowDropZone:function(e,t){e.ctrlsService.getGridBodyCtrl().getRowDragFeature().addRowDropZone(t)},removeRowDropZone:function(e,t){let i=e.dragAndDropService.findExternalZone(t);i&&e.dragAndDropService.removeDropTarget(i)},getRowDropZoneParams:function(e,t){return e.ctrlsService.getGridBodyCtrl().getRowDragFeature().getRowDropZone(t)}}},{version:o2,moduleName:"@ag-grid-community/scroll-api",apiFunctions:{getVerticalPixelRange:function(e){return e.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition()},getHorizontalPixelRange:function(e){return e.ctrlsService.getGridBodyCtrl().getScrollFeature().getHScrollPosition()},ensureColumnVisible:l0,ensureIndexVisible:l1,ensureNodeVisible:function(e,t,i=null){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsService.getGridBodyCtrl().getScrollFeature().ensureNodeVisible(t,i),"ensureVisible")}}},{version:o2,moduleName:"@ag-grid-community/overlay-api",apiFunctions:{showLoadingOverlay:function(e){e.overlayService.showLoadingOverlay()},showNoRowsOverlay:function(e){e.overlayService.showNoRowsOverlay()},hideOverlay:function(e){e.overlayService.hideOverlay()}}},{version:o2,moduleName:"@ag-grid-community/keyboard-navigation-api",apiFunctions:{getFocusedCell:function(e){return e.focusService.getFocusedCell()},clearFocusedCell:function(e){return e.focusService.clearFocusedCell()},setFocusedCell:function(e,t,i,r){e.focusService.setFocusedCell({rowIndex:t,column:i,rowPinned:r,forceBrowserFocus:!0})},setFocusedHeader:function(e,t,i=!1){let r=e.headerNavigationService.getHeaderPositionForColumn(t,i);r&&e.focusService.focusHeaderPosition({headerPosition:r})},tabToNextCell:function(e,t){return e.navigationService.tabToNextCell(!1,t)},tabToPreviousCell:function(e,t){return e.navigationService.tabToNextCell(!0,t)}}},{version:o2,moduleName:"@ag-grid-community/event-api",apiFunctions:{addEventListener:function(e,t,i){e.apiEventService.addEventListener(t,i)},addGlobalListener:function(e,t){e.apiEventService.addGlobalListener(t)},removeEventListener:function(e,t,i){e.apiEventService.removeEventListener(t,i)},removeGlobalListener:function(e,t){e.apiEventService.removeGlobalListener(t)}}},{version:o2,moduleName:"@ag-grid-community/render-api",apiFunctions:{setGridAriaProperty:function(e,t,i){if(!t)return;let r=e.ctrlsService.getGridBodyCtrl().getGui(),s=`aria-${t}`;null===i?r.removeAttribute(s):r.setAttribute(s,i)},refreshCells:function(e,t={}){e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.refreshCells(t))},flashCells:function(e,t={}){let i=e=>tO(`Since v31.1 api.flashCells parameter '${e}Delay' is deprecated. Please use '${e}Duration' instead.`);tY(t.fadeDelay)&&i("fade"),tY(t.flashDelay)&&i("flash"),e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.flashCells(t))},refreshHeader:function(e){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsService.getHeaderRowContainerCtrls().forEach(e=>e.refresh()))},isAnimationFrameQueueEmpty:function(e){return e.animationFrameService.isQueueEmpty()},flushAllAnimationFrames:function(e){e.animationFrameService.flushAllFrames()},getSizesForCurrentTheme:function(e){return{rowHeight:it(e.gos),headerHeight:e.columnModel.getHeaderHeight()}},getCellRendererInstances:function(e,t={}){return e.rowRenderer.getCellRendererInstances(t).map(aU)}}},{version:o2,moduleName:"@ag-grid-community/cell-api",apiFunctions:{expireValueCache:function(e){e.valueCache.expire()},getValue:function(e,t,i){return hJ(e,{colKey:t,rowNode:i})},getCellValue:hJ}},h3,{version:o2,moduleName:"@ag-grid-community/sort-api",apiFunctions:{onSortChanged:function(e){e.sortController.onSortChanged("api")}}}]}]},dm=class extends i2{constructor(){super(...arguments),this.beanName="gridDestroyService",this.destroyCalled=!1}wireBeans(e){this.beans=e}destroy(){this.destroyCalled||(this.eventService.dispatchEvent({type:"gridPreDestroyed",state:this.beans.stateService?.getState()??{}}),this.destroyCalled=!0,this.beans.ctrlsService.get("gridCtrl")?.destroyGridUi(),this.beans.context.destroy(),super.destroy())}isDestroyCalled(){return this.destroyCalled}},df=new Set(["gridPreDestroyed","fillStart","pasteStart"]),dv=e=>"checkboxSelected"===e||"rowClicked"===e||"spaceKey"===e||"uiSelectAll"===e||"uiSelectAllCurrentPage"===e||"uiSelectAllFiltered"===e,dy=new Map([...rW.BOOLEAN_PROPERTIES.map(e=>[e,tJ]),...rW.NUMBER_PROPERTIES.map(e=>[e,oP]),["groupAggFiltering",e=>"function"==typeof e?e:tJ(e)],["pageSize",oF(1)],["autoSizePadding",oF(0)],["keepDetailRowsCount",oF(1)],["rowBuffer",oF(0)],["infiniteInitialRowCount",oF(1)],["cacheOverflowSize",oF(1)],["cacheBlockSize",oF(1)],["serverSideInitialRowCount",oF(1)],["viewportRowModelPageSize",oF(1)],["viewportRowModelBufferSize",oF(0)]]);function dC(e,t){let i=dy.get(e);return i?i(t):t}var dw=class e extends i2{constructor(){super(...arguments),this.beanName="gos",this.domDataKey="__AG_"+Math.random().toString(),this.propertyEventService=new tR,this.globalEventHandlerFactory=e=>(t,i)=>{if(!this.isAlive())return;let r=df.has(t);if(r&&!e||!r&&e)return;let s=r$.getCallbackForEvent(t),a=this.gridOptions[s];"function"==typeof a&&this.frameworkOverrides.wrapOutgoing(()=>{a(i)})}}wireBeans(e){this.gridOptions=e.gridOptions,this.eGridDiv=e.eGridDiv,this.validationService=e.validationService,this.environment=e.environment,this.api=e.gridApi,this.gridId=e.context.getGridId()}get gridOptionsContext(){return this.gridOptions.context}postConstruct(){let e=!this.get("suppressAsyncEvents");this.eventService.addGlobalListener(this.globalEventHandlerFactory().bind(this),e),this.eventService.addGlobalListener(this.globalEventHandlerFactory(!0).bind(this),!1),this.propertyEventService.setFrameworkOverrides(this.frameworkOverrides),this.addManagedEventListeners({gridOptionsChanged:({options:e})=>{this.updateGridOptions({options:e,force:!0,source:"gridOptionsUpdated"})}})}get(e){return this.gridOptions[e]??dc[e]}getCallback(e){return this.mergeGridCommonParams(this.gridOptions[e])}exists(e){return tY(this.gridOptions[e])}mergeGridCommonParams(e){return e?t=>(t.api=this.api,t.context=this.gridOptionsContext,e(t)):e}updateGridOptions({options:t,force:i,source:r="api"}){let s={id:e.changeSetId++,properties:[]},a=[];Object.entries(t).forEach(([e,t])=>{"api"===r&&rU[e]&&tO(`${e} is an initial property and cannot be updated.`);let o=dC(e,t),n=i||"object"==typeof o&&"api"===r,l=this.gridOptions[e];(n||l!==o)&&(this.gridOptions[e]=o,a.push({type:e,currentValue:o,previousValue:l,changeSet:s,source:r}))}),this.validationService?.processGridOptions(this.gridOptions),s.properties=a.map(e=>e.type),a.forEach(e=>{this.gridOptions.debug&&tN(`Updated property ${e.type} from`,e.previousValue," to ",e.currentValue),this.propertyEventService.dispatchEvent(e)})}addPropertyEventListener(e,t){this.propertyEventService.addEventListener(e,t)}removePropertyEventListener(e,t){this.propertyEventService.removeEventListener(e,t)}getDomDataKey(){return this.domDataKey}getGridCommonParams(){return{api:this.api,context:this.gridOptionsContext}}addGridCommonParams(e){return e.api=this.api,e.context=this.gridOptionsContext,e}assertModuleRegistered(e,t){return aW.__assertRegistered(e,t,this.gridId)}isModuleRegistered(e){return aW.__isRegistered(e,this.gridId)}};dw.changeSetId=0;var db=class extends i2{constructor(){super(...arguments),this.beanName="headerPositionUtils"}wireBeans(e){this.visibleColsService=e.visibleColsService,this.ctrlsService=e.ctrlsService}findHeader(e,t){let i,r;if(rO(e.column)?i=this.visibleColsService.getGroupAtDirection(e.column,t):(r=`getCol${t}`,i=this.visibleColsService[r](e.column)),!i)return;let{headerRowIndex:s}=e;if("filter"!==this.getHeaderRowType(s)){let e=[i];for(;i.getParent();)e.push(i=i.getParent());i=e[e.length-1-s]}let{column:a,headerRowIndex:o}=this.getHeaderIndexToFocus(i,s);return{column:a,headerRowIndex:o}}getHeaderIndexToFocus(e,t){let i;if(rO(e)&&this.isAnyChildSpanningHeaderHeight(e)&&e.isPadding()){let r=i=e.getLeafColumns()[0];for(;r!==e;)t++,r=r.getParent()}return{column:i||e,headerRowIndex:t}}isAnyChildSpanningHeaderHeight(e){return!!e&&e.getLeafColumns().some(e=>e.isSpanHeaderHeight())}getColumnVisibleParent(e,t){let i=this.getHeaderRowType(t),r="filter"===i?e:e.getParent(),s=t-1,a=s;if("column"===i&&this.isAnyChildSpanningHeaderHeight(e.getParent())){for(;r&&r.isPadding();)r=r.getParent(),s--;a=s,s<0&&(r=e,s=t,a=void 0)}return{column:r,headerRowIndex:s,headerRowIndexWithoutSpan:a}}getColumnVisibleChild(e,t,i="After"){let r=this.getHeaderRowType(t),s=e,a=t+1,o=a;if("group"===r){let t=e.getDisplayedLeafColumns(),r="After"===i?t[0]:iB(t),o=[],n=r;for(;n.getParent()!==e;)n=n.getParent(),o.push(n);if(s=r,r.isSpanHeaderHeight())for(let e=o.length-1;e>=0;e--){let t=o[e];if(!t.isPadding()){s=t;break}a++}else(s=iB(o))||(s=r)}return{column:s,headerRowIndex:a,headerRowIndexWithoutSpan:o}}getHeaderRowType(e){let t=this.ctrlsService.getHeaderRowContainerCtrl();if(t)return t.getRowType(e)}findColAtEdgeForHeaderRow(e,t){let i=this.visibleColsService.getAllCols(),r=i["start"===t?0:i.length-1];if(!r)return;let s=this.ctrlsService.getHeaderRowContainerCtrl(r.getPinned()),a=s?.getRowType(e);if("group"==a){let t=this.visibleColsService.getColGroupAtLevel(r,e);return{headerRowIndex:e,column:t}}return{headerRowIndex:null==a?-1:e,column:r}}},dS=class extends i2{constructor(){super(...arguments),this.beanName="localeService"}getLocaleTextFunc(){let e=this.gos.getCallback("getLocaleText");if(e)return(t,i,r)=>e({key:t,defaultValue:i,variableValues:r});let t=this.gos.get("localeText");return(e,i,r)=>{let s=t&&t[e];if(s&&r&&r.length){let e=0;for(;!(e>=r.length)&&-1!==s.indexOf("${variable}");)s=s.replace("${variable}",r[e++])}return s??i}}},dx=class extends i2{constructor(){super(...arguments),this.beanName="apiEventService",this.syncEventListeners=new Map,this.asyncEventListeners=new Map,this.syncGlobalEventListeners=new Set,this.globalEventListenerPairs=new Map}postConstruct(){this.frameworkEventWrappingService=new rs(this.getFrameworkOverrides())}addEventListener(e,t){let i=this.frameworkEventWrappingService.wrap(t),r=t7(this.gos)&&!df.has(e),s=r?this.asyncEventListeners:this.syncEventListeners;s.has(e)||s.set(e,new Set),s.get(e).add(i),this.eventService.addEventListener(e,i,r)}removeEventListener(e,t){let i=this.frameworkEventWrappingService.unwrap(t),r=this.asyncEventListeners.get(e),s=!!r?.delete(i);s||this.syncEventListeners.get(e)?.delete(i),this.eventService.removeEventListener(e,i,s)}addGlobalListener(e){let t=this.frameworkEventWrappingService.wrapGlobal(e);if(t7(this.gos)){let i=(e,i)=>{df.has(e)&&t(e,i)},r=(e,i)=>{df.has(e)||t(e,i)};this.globalEventListenerPairs.set(e,{syncListener:i,asyncListener:r}),this.eventService.addGlobalListener(i,!1),this.eventService.addGlobalListener(r,!0)}else this.syncGlobalEventListeners.add(t),this.eventService.addGlobalListener(t,!1)}removeGlobalListener(e){let t=this.frameworkEventWrappingService.unwrapGlobal(e);if(this.globalEventListenerPairs.has(t)){let{syncListener:i,asyncListener:r}=this.globalEventListenerPairs.get(t);this.eventService.removeGlobalListener(i,!1),this.eventService.removeGlobalListener(r,!0),this.globalEventListenerPairs.delete(e)}else this.syncGlobalEventListeners.delete(t),this.eventService.removeGlobalListener(t,!1)}destroyEventListeners(e,t){e.forEach((e,i)=>{e.forEach(e=>this.eventService.removeEventListener(i,e,t)),e.clear()}),e.clear()}destroyGlobalListeners(e,t){e.forEach(e=>this.eventService.removeGlobalListener(e,t)),e.clear()}destroy(){super.destroy(),this.destroyEventListeners(this.syncEventListeners,!1),this.destroyEventListeners(this.asyncEventListeners,!0),this.destroyGlobalListeners(this.syncGlobalEventListeners,!1),this.globalEventListenerPairs.forEach(({syncListener:e,asyncListener:t})=>{this.eventService.removeGlobalListener(e,!1),this.eventService.removeGlobalListener(t,!0)}),this.globalEventListenerPairs.clear()}},dM=class extends i2{constructor(){super(...arguments),this.beanName="pageBoundsListener"}wireBeans(e){this.rowModel=e.rowModel,this.paginationService=e.paginationService,this.pageBoundsService=e.pageBoundsService}postConstruct(){this.addManagedEventListeners({modelUpdated:this.onModelUpdated.bind(this),recalculateRowBounds:this.calculatePages.bind(this)}),this.onModelUpdated()}onModelUpdated(e){this.calculatePages(),this.eventService.dispatchEvent({type:"paginationChanged",animate:e?.animate??!1,newData:e?.newData??!1,newPage:e?.newPage??!1,newPageSize:e?.newPageSize??!1,keepRenderedRows:e?.keepRenderedRows??!1})}calculatePages(){this.paginationService?this.paginationService.calculatePages():this.pageBoundsService.calculateBounds(0,this.rowModel.getRowCount()-1)}},dE=class extends i2{constructor(){super(...arguments),this.beanName="pageBoundsService",this.pixelOffset=0}wireBeans(e){this.rowModel=e.rowModel}getFirstRow(){return this.topRowBounds?this.topRowBounds.rowIndex:-1}getLastRow(){return this.bottomRowBounds?this.bottomRowBounds.rowIndex:-1}getCurrentPageHeight(){return tK(this.topRowBounds)||tK(this.bottomRowBounds)?0:Math.max(this.bottomRowBounds.rowTop+this.bottomRowBounds.rowHeight-this.topRowBounds.rowTop,0)}getCurrentPagePixelRange(){return{pageFirstPixel:this.topRowBounds?this.topRowBounds.rowTop:0,pageLastPixel:this.bottomRowBounds?this.bottomRowBounds.rowTop+this.bottomRowBounds.rowHeight:0}}calculateBounds(e,t){this.topRowBounds=this.rowModel.getRowBounds(e),this.topRowBounds&&(this.topRowBounds.rowIndex=e),this.bottomRowBounds=this.rowModel.getRowBounds(t),this.bottomRowBounds&&(this.bottomRowBounds.rowIndex=t),this.calculatePixelOffset()}getPixelOffset(){return this.pixelOffset}calculatePixelOffset(){let e=tY(this.topRowBounds)?this.topRowBounds.rowTop:0;this.pixelOffset!==e&&(this.pixelOffset=e,this.eventService.dispatchEvent({type:"paginationPixelOffsetChanged"}))}},dD=class extends i2{constructor(){super(),this.beanName="ariaAnnouncementService",this.descriptionContainer=null,this.pendingAnnouncements=new Map,this.updateAnnouncement=tj(this.updateAnnouncement.bind(this),200)}wireBeans(e){this.eGridDiv=e.eGridDiv}postConstruct(){let e=ia(this.gos),t=this.descriptionContainer=e.createElement("div");t.classList.add("ag-aria-description-container"),rZ(t,"live","polite"),rZ(t,"relevant","additions text"),rZ(t,"atomic",!0),this.eGridDiv.appendChild(t)}announceValue(e,t){this.pendingAnnouncements.set(t,e),this.updateAnnouncement()}updateAnnouncement(){if(!this.descriptionContainer)return;let e=Array.from(this.pendingAnnouncements.values()).join(". ");this.pendingAnnouncements.clear(),this.descriptionContainer.textContent="",setTimeout(()=>{this.isAlive()&&this.descriptionContainer&&(this.descriptionContainer.textContent=e)},50)}destroy(){super.destroy();let{descriptionContainer:e}=this;e&&(sL(e),e.parentElement&&e.parentElement.removeChild(e)),this.descriptionContainer=null,this.eGridDiv=null,this.pendingAnnouncements.clear()}},dI=class extends i2{constructor(){super(...arguments),this.beanName="columnAnimationService",this.executeNextFuncs=[],this.executeLaterFuncs=[],this.active=!1,this.activeNext=!1,this.suppressAnimation=!1,this.animationThreadCount=0}wireBeans(e){this.ctrlsService=e.ctrlsService}postConstruct(){this.ctrlsService.whenReady(this,e=>this.gridBodyCtrl=e.gridBodyCtrl)}isActive(){return this.active&&!this.suppressAnimation}setSuppressAnimation(e){this.suppressAnimation=e}start(){this.active||this.gos.get("suppressColumnMoveAnimation")||this.gos.get("enableRtl")||(this.ensureAnimationCssClassPresent(),this.active=!0,this.activeNext=!0)}finish(){this.active&&this.flush(()=>this.activeNext=!1,()=>this.active=!1)}executeNextVMTurn(e){this.activeNext?this.executeNextFuncs.push(e):e()}executeLaterVMTurn(e){this.active?this.executeLaterFuncs.push(e):e()}ensureAnimationCssClassPresent(){this.animationThreadCount++;let e=this.animationThreadCount;this.gridBodyCtrl.setColumnMovingCss(!0),this.executeLaterFuncs.push(()=>{this.animationThreadCount===e&&this.gridBodyCtrl.setColumnMovingCss(!1)})}flush(e,t){if(0===this.executeNextFuncs.length&&0===this.executeLaterFuncs.length){e(),t();return}let i=e=>{for(;e.length;){let t=e.pop();t&&t()}};this.getFrameworkOverrides().wrapIncoming(()=>{window.setTimeout(()=>{e(),i(this.executeNextFuncs)},0),window.setTimeout(()=>{t(),i(this.executeLaterFuncs)},200)})}},dk=class extends i2{constructor(){super(...arguments),this.beanName="columnHoverService"}setMouseOver(e){this.updateState(e)}clearMouseOver(){this.updateState(null)}isHovered(e){return!!this.selectedColumns&&this.selectedColumns.indexOf(e)>=0}updateState(e){this.selectedColumns=e,this.eventService.dispatchEvent({type:"columnHoverChanged"})}},dT=class extends i2{constructor(){super(...arguments),this.beanName="overlayService",this.state=0,this.showInitialOverlay=!0,this.wrapperPadding=0}wireBeans(e){this.userComponentFactory=e.userComponentFactory,this.rowModel=e.rowModel,this.columnModel=e.columnModel,this.ctrlsService=e.ctrlsService}postConstruct(){this.isClientSide=t4(this.gos);let e=()=>this.updateOverlayVisibility();this.addManagedEventListeners({newColumnsLoaded:e,rowDataUpdated:e,gridSizeChanged:this.onGridSizeChanged.bind(this),rowCountReady:()=>{this.showInitialOverlay=!1,this.updateOverlayVisibility()}}),this.addManagedPropertyListener("loading",e)}setOverlayWrapperComp(e){this.overlayWrapperComp=e,this.updateOverlayVisibility()}isVisible(){return 0!==this.state&&!!this.overlayWrapperComp}isExclusive(){return 1===this.state&&!!this.overlayWrapperComp}getOverlayWrapper(){return this.overlayWrapperComp}showLoadingOverlay(){this.showInitialOverlay=!1;let e=this.gos.get("loading");!e&&(void 0!==e||this.gos.get("suppressLoadingOverlay"))||this.doShowLoadingOverlay()}showNoRowsOverlay(){this.showInitialOverlay=!1,this.gos.get("loading")||this.gos.get("suppressNoRowsOverlay")||this.doShowNoRowsOverlay()}hideOverlay(){if(this.showInitialOverlay=!1,this.gos.get("loading")){tO("Since v32, `api.hideOverlay()` does not hide the loading overlay when `loading=true`. Set `loading=false` instead.");return}this.doHideOverlay()}updateOverlayVisibility(){if(!this.overlayWrapperComp){this.state=0;return}let e=this.gos.get("loading");this.showInitialOverlay&&void 0===e&&!this.gos.get("suppressLoadingOverlay")&&(e=!this.gos.get("columnDefs")||!this.columnModel.isReady()||!this.gos.get("rowData")&&this.isClientSide),e?1!==this.state&&this.doShowLoadingOverlay():(this.showInitialOverlay=!1,this.rowModel.isEmpty()&&!this.gos.get("suppressNoRowsOverlay")&&this.isClientSide?2!==this.state&&this.doShowNoRowsOverlay():0!==this.state&&this.doHideOverlay())}doShowLoadingOverlay(){this.overlayWrapperComp&&(this.state=1,this.showOverlay(this.userComponentFactory.getLoadingOverlayCompDetails({}),"ag-overlay-loading-wrapper","loadingOverlayComponentParams"),this.updateExclusive())}doShowNoRowsOverlay(){this.overlayWrapperComp&&(this.state=2,this.showOverlay(this.userComponentFactory.getNoRowsOverlayCompDetails({}),"ag-overlay-no-rows-wrapper","noRowsOverlayComponentParams"),this.updateExclusive())}doHideOverlay(){this.overlayWrapperComp&&(this.state=0,this.overlayWrapperComp.hideOverlay(),this.updateExclusive())}showOverlay(e,t,i){let r=e.newAgStackInstance();this.overlayWrapperComp?.showOverlay(r,t,this.isExclusive(),i),this.refreshWrapperPadding()}updateExclusive(){let e=this.exclusive;this.exclusive=this.isExclusive(),this.exclusive!==e&&this.eventService.dispatchEvent({type:"overlayExclusiveChanged"})}onGridSizeChanged(){this.refreshWrapperPadding()}refreshWrapperPadding(){if(!this.overlayWrapperComp)return;let e=0;if(2===this.state){let t=this.ctrlsService.get("gridHeaderCtrl");e=t?.getHeaderHeight()||0}else 0!==this.wrapperPadding&&(e=0);this.wrapperPadding!==e&&(this.wrapperPadding=e,this.overlayWrapperComp.updateOverlayWrapperPaddingTop(e))}},dA=class extends i2{constructor(){super(...arguments),this.beanName="rowCssClassCalculator"}wireBeans(e){this.stylingService=e.stylingService}getInitialRowClasses(e){let t=[];return tY(e.extraCssClass)&&t.push(e.extraCssClass),t.push("ag-row"),t.push(e.rowFocused?"ag-row-focus":"ag-row-no-focus"),e.fadeRowIn&&t.push("ag-opacity-zero"),t.push(e.rowIsEven?"ag-row-even":"ag-row-odd"),e.rowNode.isRowPinned()&&t.push("ag-row-pinned"),e.rowNode.isSelected()&&t.push("ag-row-selected"),e.rowNode.footer&&t.push("ag-row-footer"),t.push("ag-row-level-"+e.rowLevel),e.rowNode.stub&&t.push("ag-row-loading"),e.fullWidthRow&&t.push("ag-full-width-row"),e.expandable&&(t.push("ag-row-group"),t.push(e.rowNode.expanded?"ag-row-group-expanded":"ag-row-group-contracted")),e.rowNode.dragging&&t.push("ag-row-dragging"),i$(t,this.processClassesFromGridOptions(e.rowNode)),i$(t,this.preProcessRowClassRules(e.rowNode)),t.push(e.printLayout?"ag-row-position-relative":"ag-row-position-absolute"),e.firstRowOnPage&&t.push("ag-row-first"),e.lastRowOnPage&&t.push("ag-row-last"),e.fullWidthRow&&("left"===e.pinned&&t.push("ag-cell-last-left-pinned"),"right"===e.pinned&&t.push("ag-cell-first-right-pinned")),t}processClassesFromGridOptions(e){let t=[],i=e=>{"string"==typeof e?t.push(e):Array.isArray(e)&&e.forEach(e=>t.push(e))},r=this.gos.get("rowClass");if(r){if("function"==typeof r)return tO("rowClass should not be a function, please use getRowClass instead"),[];i(r)}let s=this.gos.getCallback("getRowClass");return s&&i(s({data:e.data,node:e,rowIndex:e.rowIndex})),t}preProcessRowClassRules(e){let t=[];return this.processRowClassRules(e,e=>{t.push(e)},()=>{}),t}processRowClassRules(e,t,i){let r=this.gos.addGridCommonParams({data:e.data,node:e,rowIndex:e.rowIndex});this.stylingService.processClassRules(void 0,this.gos.get("rowClassRules"),r,t,i)}calculateRowLevel(e){return e.group?e.level:e.parent?e.parent.level+1:0}},dR=class extends i2{constructor(){super(...arguments),this.beanName="rowContainerHeightService",this.scrollY=0,this.uiBodyHeight=0}wireBeans(e){this.ctrlsService=e.ctrlsService}postConstruct(){this.addManagedEventListeners({bodyHeightChanged:this.updateOffset.bind(this)}),this.maxDivHeight=function(){if(void 0!==Q)return Q;if(!document.body)return -1;let e=1e6,t=sh()?6e6:1e9,i=document.createElement("div");for(document.body.appendChild(i);;){let r=2*e;if(i.style.height=r+"px",r>t||i.clientHeight!==r)break;e=r}return document.body.removeChild(i),Q=e,e}(),this.gos.get("debug")&&tN("RowContainerHeightService - maxDivHeight = "+this.maxDivHeight)}isStretching(){return this.stretching}getDivStretchOffset(){return this.divStretchOffset}updateOffset(){if(!this.stretching)return;let e=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition().top,t=this.getUiBodyHeight();(e!==this.scrollY||t!==this.uiBodyHeight)&&(this.scrollY=e,this.uiBodyHeight=t,this.calculateOffset())}calculateOffset(){this.setUiContainerHeight(this.maxDivHeight),this.pixelsToShave=this.modelHeight-this.uiContainerHeight,this.maxScrollY=this.uiContainerHeight-this.uiBodyHeight;let e=this.scrollY/this.maxScrollY,t=e*this.pixelsToShave;this.gos.get("debug")&&tN(`RowContainerHeightService - Div Stretch Offset = ${t} (${this.pixelsToShave} * ${e})`),this.setDivStretchOffset(t)}setUiContainerHeight(e){e!==this.uiContainerHeight&&(this.uiContainerHeight=e,this.eventService.dispatchEvent({type:"rowContainerHeightChanged"}))}clearOffset(){this.setUiContainerHeight(this.modelHeight),this.pixelsToShave=0,this.setDivStretchOffset(0)}setDivStretchOffset(e){let t="number"==typeof e?Math.floor(e):null;this.divStretchOffset!==t&&(this.divStretchOffset=t,this.eventService.dispatchEvent({type:"heightScaleChanged"}))}setModelHeight(e){this.modelHeight=e,this.stretching=null!=e&&this.maxDivHeight>0&&e>this.maxDivHeight,this.stretching?this.calculateOffset():this.clearOffset()}getUiContainerHeight(){return this.uiContainerHeight}getRealPixelPosition(e){return e-this.divStretchOffset}getUiBodyHeight(){let e=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition();return e.bottom-e.top}getScrollPositionForPixel(e){if(this.pixelsToShave<=0)return e;let t=this.modelHeight-this.getUiBodyHeight();return this.maxScrollY*(e/t)}},dL=class extends i2{constructor(){super(...arguments),this.beanName="rowNodeSorter"}wireBeans(e){this.valueService=e.valueService,this.columnModel=e.columnModel,this.showRowGroupColsService=e.showRowGroupColsService}postConstruct(){this.isAccentedSort=this.gos.get("accentedSort"),this.primaryColumnsSortGroups=ip(this.gos),this.addManagedPropertyListener("accentedSort",e=>this.isAccentedSort=e.currentValue),this.addManagedPropertyListener("autoGroupColumnDef",()=>this.primaryColumnsSortGroups=ip(this.gos))}doFullSort(e,t){let i=e.map((e,t)=>({currentPos:t,rowNode:e}));return i.sort(this.compareRowNodes.bind(this,t)),i.map(e=>e.rowNode)}compareRowNodes(e,t,i){let r=t.rowNode,s=i.rowNode;for(let t=0,i=e.length;t<i;t++){let i;let a=e[t],o="desc"===a.sort,n=this.getValue(r,a.column),l=this.getValue(s,a.column),h=this.getComparator(a,r);if(!isNaN(i=h?h(n,l,r,s,o):t1(n,l,this.isAccentedSort))&&0!==i)return"asc"===a.sort?i:-1*i}return t.currentPos-i.currentPos}getComparator(e,t){let i=e.column,r=i.getColDef().comparator;if(null!=r)return r;if(!i.getColDef().showRowGroup)return;let s=!t.group&&i.getColDef().field;if(!s)return;let a=this.columnModel.getColDefCol(s);if(a)return a.getColDef().comparator}getValue(e,t){if(!this.primaryColumnsSortGroups)return this.valueService.getValue(t,e,!1,!1);if(e.rowGroupColumn===t){if(iC(this.gos,this.columnModel.isPivotActive())){let i=e.allLeafChildren?.[0];return i?this.valueService.getValue(t,i,!1,!1):void 0}let i=this.showRowGroupColsService?.getShowRowGroupCol(t.getId());if(!i)return;return e.groupData?.[i.getId()]}if(!e.group||!t.getColDef().showRowGroup)return this.valueService.getValue(t,e,!1,!1)}},dP=class{constructor(e,t){this.active=!0,this.nodeIdsToColumns={},this.mapToItems={},this.keepingColumns=e,this.pathRoot={rowNode:t,children:null},this.mapToItems[t.id]=this.pathRoot}setInactive(){this.active=!1}isActive(){return this.active}depthFirstSearchChangedPath(e,t){if(e.children)for(let i=0;i<e.children.length;i++)this.depthFirstSearchChangedPath(e.children[i],t);t(e.rowNode)}depthFirstSearchEverything(e,t,i){if(e.childrenAfterGroup)for(let r=0;r<e.childrenAfterGroup.length;r++){let s=e.childrenAfterGroup[r];s.childrenAfterGroup?this.depthFirstSearchEverything(e.childrenAfterGroup[r],t,i):i&&t(s)}t(e)}forEachChangedNodeDepthFirst(e,t=!1,i=!1){this.active&&!i?this.depthFirstSearchChangedPath(this.pathRoot,e):this.depthFirstSearchEverything(this.pathRoot.rowNode,e,t)}executeFromRootNode(e){e(this.pathRoot.rowNode)}createPathItems(e){let t=e,i=0;for(;!this.mapToItems[t.id];){let e={rowNode:t,children:null};this.mapToItems[t.id]=e,i++,t=t.parent}return i}populateColumnsMap(e,t){if(!this.keepingColumns||!t)return;let i=e;for(;i;)this.nodeIdsToColumns[i.id]||(this.nodeIdsToColumns[i.id]={}),t.forEach(e=>this.nodeIdsToColumns[i.id][e.getId()]=!0),i=i.parent}linkPathItems(e,t){let i=e;for(let e=0;e<t;e++){let e=this.mapToItems[i.id],t=this.mapToItems[i.parent.id];t.children||(t.children=[]),t.children.push(e),i=i.parent}}addParentNode(e,t){if(!e||e.isRowPinned())return;let i=this.createPathItems(e);this.linkPathItems(e,i),this.populateColumnsMap(e,t)}canSkip(e){return this.active&&!this.mapToItems[e.id]}getValueColumnsForNode(e,t){if(!this.keepingColumns)return t;let i=this.nodeIdsToColumns[e.id];return t.filter(e=>i[e.getId()])}getNotValueColumnsForNode(e,t){if(!this.keepingColumns)return null;let i=this.nodeIdsToColumns[e.id];return t.filter(e=>!i[e.getId()])}},dF=class extends i2{constructor(){super(...arguments),this.beanName="selectionService",this.selectedNodes=new Map,this.selectionCtx=new ha,this.rowSelectionMode=void 0}wireBeans(e){this.rowModel=e.rowModel,this.pageBoundsService=e.pageBoundsService}postConstruct(){let{gos:e,rowModel:t,onRowSelected:i}=this;this.selectionCtx.init(t),this.rowSelectionMode=iR(e),this.groupSelectsChildren=iF(e),this.addManagedPropertyListeners(["groupSelectsChildren","rowSelection","selection"],()=>{let t=iF(e),i=iR(e);(t!==this.groupSelectsChildren||i!==this.rowSelectionMode)&&(this.groupSelectsChildren=t,this.rowSelectionMode=i,this.deselectAllRowNodes({source:"api"}))}),this.addManagedEventListeners({rowSelected:i.bind(this)})}destroy(){super.destroy(),this.resetNodes(),this.selectionCtx.reset()}isMultiSelect(){return"multiRow"===this.rowSelectionMode}overrideSelectionValue(e,t){if(!dv(t))return e;let i=this.selectionCtx.getRoot();return!i||(i.isSelected()??!1)}setNodesSelected(e){let{newValue:t,clearSelection:i,suppressFinishActions:r,rangeSelect:s,nodes:a,event:o,source:n}=e;if(0===a.length)return 0;if(a.length>1&&!this.isMultiSelect())return tO("cannot multi select unless selection mode is 'multiRow'"),0;let l=this.groupSelectsChildren&&!0===e.groupSelectsFiltered,h=a.map(e=>e.footer?e.sibling:e);if(s){if(h.length>1)return tO("cannot range select while selecting multiple rows"),0;let e=h[0],i=this.overrideSelectionValue(t,n);if(this.isMultiSelect()){if(this.selectionCtx.isInRange(e)){let t=this.selectionCtx.truncate(e);return i&&this.selectRange(t.discard,!1,n),this.selectRange(t.keep,i,n)}if(this.selectionCtx.getRoot()!==e){let t=this.selectionCtx.extend(e,this.groupSelectsChildren);return i&&this.selectRange(t.discard,!1,n),this.selectRange(t.keep,i,n)}}}r||this.selectionCtx.setRoot(h[0]);let d=0;for(let e=0;e<h.length;e++){let i=h[e];!(l&&i.group)&&i.selectThisNode(t,o,n)&&d++,this.groupSelectsChildren&&i.childrenAfterGroup?.length&&(d+=this.selectChildren(i,t,l,n))}return!r&&(t&&(i||!this.isMultiSelect())&&(d+=this.clearOtherNodes(h[0],n)),d>0&&(this.updateGroupsFromChildrenSelections(n),this.dispatchSelectionChanged(n))),d}selectRange(e,t,i){let r=0;return e.forEach(e=>{(!e.group||!this.groupSelectsChildren)&&e.selectThisNode(t,void 0,i)&&r++}),r>0&&(this.updateGroupsFromChildrenSelections(i),this.dispatchSelectionChanged(i)),r}selectChildren(e,t,i,r){let s=i?e.childrenAfterAggFilter:e.childrenAfterGroup;return tK(s)?0:this.setNodesSelected({newValue:t,clearSelection:!1,suppressFinishActions:!0,groupSelectsFiltered:i,source:r,nodes:s})}getSelectedNodes(){let e=[];return this.selectedNodes.forEach(t=>{t&&e.push(t)}),e}getSelectedRows(){let e=[];return this.selectedNodes.forEach(t=>{t&&t.data&&e.push(t.data)}),e}getSelectionCount(){return this.selectedNodes.size}filterFromSelection(e){let t=new Map;this.selectedNodes.forEach((i,r)=>{i&&e(i)&&t.set(r,i)}),this.selectedNodes=t}updateGroupsFromChildrenSelections(e,t){if(!this.groupSelectsChildren||!t4(this.gos))return!1;let i=this.rowModel.getRootNode();t||(t=new dP(!0,i)).setInactive();let r=!1;return t.forEachChangedNodeDepthFirst(t=>{if(t!==i){let i=t.calculateSelectedFromChildren();r=t.selectThisNode(null!==i&&i,void 0,e)||r}}),r}clearOtherNodes(e,t){let i=new Map,r=0;return this.selectedNodes.forEach(s=>{if(s&&s.id!==e.id){let e=this.selectedNodes.get(s.id);r+=e.setSelectedParams({newValue:!1,clearSelection:!1,suppressFinishActions:!0,source:t}),this.groupSelectsChildren&&s.parent&&i.set(s.parent.id,s.parent)}}),i.forEach(e=>{let i=e.calculateSelectedFromChildren();e.selectThisNode(null!==i&&i,void 0,t)}),r}onRowSelected(e){let t=e.node;this.groupSelectsChildren&&t.group||(t.isSelected()?this.selectedNodes.set(t.id,t):this.selectedNodes.delete(t.id))}syncInRowNode(e,t){this.syncInOldRowNode(e,t),this.syncInNewRowNode(e)}syncInOldRowNode(e,t){if(tY(t)&&e.id!==t.id&&t){let i=t.id;this.selectedNodes.get(i)==e&&this.selectedNodes.set(t.id,t)}}syncInNewRowNode(e){this.selectedNodes.has(e.id)?(e.setSelectedInitialValue(!0),this.selectedNodes.set(e.id,e)):e.setSelectedInitialValue(!1)}reset(e){let t=this.getSelectionCount();this.resetNodes(),t&&this.dispatchSelectionChanged(e)}resetNodes(){this.selectedNodes?.clear()}getBestCostNodeSelection(){if(!t4(this.gos))return;let e=this.rowModel.getTopLevelNodes();if(null===e)return;let t=[];return!function e(i){for(let r=0,s=i.length;r<s;r++){let s=i[r];s.isSelected()?t.push(s):s.group&&s.children&&e(s.children)}}(e),t}isEmpty(){let e=0;return this.selectedNodes.forEach(t=>{t&&e++}),0===e}deselectAllRowNodes(e){let t=e=>e.selectThisNode(!1,void 0,r),i=t4(this.gos),{source:r,justFiltered:s,justCurrentPage:a}=e;if(a||s){if(!i){tB("selecting just filtered only works when gridOptions.rowModelType='clientSide'");return}this.getNodesToSelect(s,a).forEach(t)}else this.selectedNodes.forEach(e=>{e&&t(e)}),this.reset(r);this.selectionCtx.reset(),i&&this.groupSelectsChildren&&this.updateGroupsFromChildrenSelections(r),this.dispatchSelectionChanged(r)}getSelectedCounts(e,t){let i=0,r=0;return this.getNodesToSelect(e,t).forEach(e=>{(!this.groupSelectsChildren||!e.group)&&(e.isSelected()?i++:e.selectable&&r++)}),{selectedCount:i,notSelectedCount:r}}getSelectAllState(e,t){let{selectedCount:i,notSelectedCount:r}=this.getSelectedCounts(e,t);return(0!==i||0!==r)&&(i>0&&r>0?null:i>0)}hasNodesToSelect(e=!1,t=!1){return this.getNodesToSelect(e,t).filter(e=>e.selectable).length>0}getNodesToSelect(e=!1,t=!1){this.validateSelectAllType();let i=[];if(t)return this.forEachNodeOnPage(e=>{if(!e.group){i.push(e);return}if(!e.expanded){let t=e=>{i.push(e),e.childrenAfterFilter?.length&&e.childrenAfterFilter.forEach(t)};t(e);return}this.groupSelectsChildren||i.push(e)}),i;let r=this.rowModel;return e?r.forEachNodeAfterFilter(e=>{i.push(e)}):r.forEachNode(e=>{i.push(e)}),i}forEachNodeOnPage(e){let t=this.pageBoundsService.getFirstRow(),i=this.pageBoundsService.getLastRow();for(let r=t;r<=i;r++){let t=this.rowModel.getRow(r);t&&e(t)}}selectAllRowNodes(e){if(ix(this.gos)&&!iL(this.gos))return tO("cannot multi select unless selection mode is 'multiRow'");this.validateSelectAllType();let{source:t,justFiltered:i,justCurrentPage:r}=e,s=this.getNodesToSelect(i,r);s.forEach(e=>e.selectThisNode(!0,void 0,t)),this.selectionCtx.setRoot(s[0]??null),this.selectionCtx.setEndRange(iB(s)??null),t4(this.gos)&&this.groupSelectsChildren&&this.updateGroupsFromChildrenSelections(t),this.dispatchSelectionChanged(t)}getSelectionState(){let e=[];return this.selectedNodes.forEach(t=>{t?.id&&e.push(t.id)}),e.length?e:null}setSelectionState(e,t){if(!Array.isArray(e))return tB("Invalid selection state. When using client-side row model, the state must conform to `string[]`.");let i=new Set(e),r=[];this.rowModel.forEachNode(e=>{i.has(e.id)&&r.push(e)}),this.setNodesSelected({newValue:!0,nodes:r,source:t})}dispatchSelectionChanged(e){this.eventService.dispatchEvent({type:"selectionChanged",source:e})}validateSelectAllType(){if(!t4(this.gos))throw Error(`selectAll only available when rowModelType='clientSide', ie not ${this.rowModel.getType()}`)}},dN=class extends i2{constructor(){super(...arguments),this.beanName="selectableService"}wireBeans(e){this.rowModel=e.rowModel,this.selectionService=e.selectionService}postConstruct(){this.addManagedPropertyListener("isRowSelectable",()=>this.updateSelectable())}updateSelectableAfterGrouping(){this.updateSelectable(!0)}updateSelectable(e=!1){let{gos:t}=this,i=void 0!==iR(t),r=iA(t);if(!i||!r)return;let s=iF(t),a=t4(t)&&s,o=[],n=t=>{if(e&&!t.group)return;if(a&&t.group){let e=t.childrenAfterGroup.some(e=>!0===e.selectable);t.setRowSelectable(e,!0);return}let i=r?.(t)??!0;t.setRowSelectable(i,!0),!i&&t.isSelected()&&o.push(t)};a?new dP(!1,this.rowModel.getRootNode()).forEachChangedNodeDepthFirst(n,!0,!0):this.rowModel.forEachNode(n),o.length&&this.selectionService.setNodesSelected({nodes:o,newValue:!1,source:"selectableChanged"}),a&&this.selectionService instanceof dF&&this.selectionService.updateGroupsFromChildrenSelections("selectableChanged")}},dO=["asc","desc",null],dB=class extends i2{constructor(){super(...arguments),this.beanName="sortController"}wireBeans(e){this.columnModel=e.columnModel,this.funcColsService=e.funcColsService,this.showRowGroupColsService=e.showRowGroupColsService}progressSort(e,t,i){let r=this.getNextSortDirection(e);this.setSortForColumn(e,r,t,i)}setSortForColumn(e,t,i,r){"asc"!==t&&"desc"!==t&&(t=null);let s=ip(this.gos),a=[e];if(s&&e.getColDef().showRowGroup){let t=this.funcColsService.getSourceColumnsForGroupColumn(e),i=t?.filter(e=>e.isSortable());i&&(a=[e,...i])}a.forEach(e=>e.setSort(t,r));let o=(i||this.gos.get("alwaysMultiSort"))&&!this.gos.get("suppressMultiSort"),n=[];if(!o){let e=this.clearSortBarTheseColumns(a,r);n.push(...e)}this.updateSortIndex(e),n.push(...a),this.dispatchSortChangedEvents(r,n)}updateSortIndex(e){let t=ip(this.gos),i=this.showRowGroupColsService?.getShowRowGroupCol(e.getId()),r=t&&i||e,s=this.getColumnsWithSortingOrdered();this.columnModel.getAllCols().forEach(e=>e.setSortIndex(null));let a=s.filter(e=>(!t||!e.getColDef().showRowGroup)&&e!==r);(r.getSort()?[...a,r]:a).forEach((e,t)=>{e.setSortIndex(t)})}onSortChanged(e,t){this.dispatchSortChangedEvents(e,t)}isSortActive(){let e=this.columnModel.getAllCols().filter(e=>!!e.getSort());return e&&e.length>0}dispatchSortChangedEvents(e,t){let i={type:"sortChanged",source:e};t&&(i.columns=t),this.eventService.dispatchEvent(i)}clearSortBarTheseColumns(e,t){let i=[];return this.columnModel.getAllCols().forEach(r=>{e.includes(r)||(r.getSort()&&i.push(r),r.setSort(void 0,t))}),i}getNextSortDirection(e){let t,i;if(!Array.isArray(t=e.getColDef().sortingOrder?e.getColDef().sortingOrder:this.gos.get("sortingOrder")?this.gos.get("sortingOrder"):dO)||t.length<=0)return tO(`sortingOrder must be an array with at least one element, currently it's ${t}`),null;let r=t.indexOf(e.getSort()),s=r==t.length-1;return(i=r<0||s?t[0]:t[r+1],0>dO.indexOf(i))?(tO("invalid sort type ",i),null):i}getIndexedSortMap(){let e=this.columnModel.getAllCols().filter(e=>!!e.getSort());if(this.columnModel.isPivotMode()){let t=ip(this.gos);e=e.filter(e=>{let i=!!e.getAggFunc(),r=!e.isPrimary(),s=t?this.showRowGroupColsService?.getShowRowGroupCol(e.getId()):e.getColDef().showRowGroup;return i||r||s})}let t=this.funcColsService.getRowGroupColumns().filter(e=>!!e.getSort()),i={};e.forEach((e,t)=>i[e.getId()]=t),e.sort((e,t)=>{let r=e.getSortIndex(),s=t.getSortIndex();return null!=r&&null!=s?r-s:null==r&&null==s?i[e.getId()]>i[t.getId()]?1:-1:null==s?-1:1});let r=ip(this.gos)&&!!t.length;r&&(e=[...new Set(e.map(e=>this.showRowGroupColsService?.getShowRowGroupCol(e.getId())??e))]);let s=new Map;return e.forEach((e,t)=>s.set(e,t)),r&&t.forEach(e=>{let t=this.showRowGroupColsService.getShowRowGroupCol(e.getId());s.set(e,s.get(t))}),s}getColumnsWithSortingOrdered(){return[...this.getIndexedSortMap().entries()].sort(([e,t],[i,r])=>t-r).map(([e])=>e)}getSortModel(){return this.getColumnsWithSortingOrdered().filter(e=>e.getSort()).map(e=>({sort:e.getSort(),colId:e.getId()}))}getSortOptions(){return this.getColumnsWithSortingOrdered().filter(e=>e.getSort()).map(e=>({sort:e.getSort(),column:e}))}canColumnDisplayMixedSort(e){let t=ip(this.gos),i=!!e.getColDef().showRowGroup;return t&&i}getDisplaySortForColumn(e){let t=this.funcColsService.getSourceColumnsForGroupColumn(e);if(!this.canColumnDisplayMixedSort(e)||!t?.length)return e.getSort();let i=null!=e.getColDef().field||e.getColDef().valueGetter?[e,...t]:t,r=i[0].getSort();return i.every(e=>e.getSort()==r)?r:"mixed"}getDisplaySortIndexForColumn(e){return this.getIndexedSortMap().get(e)}},dG=class extends i2{constructor(){super(...arguments),this.beanName="syncService",this.waitingForColumns=!1}wireBeans(e){this.ctrlsService=e.ctrlsService,this.columnModel=e.columnModel,this.rowModel=e.rowModel}postConstruct(){this.addManagedPropertyListener("columnDefs",e=>this.setColumnDefs(e))}start(){this.ctrlsService.whenReady(this,()=>{let e=this.gos.get("columnDefs");e?this.setColumnsAndData(e):this.waitingForColumns=!0,this.gridReady()})}setColumnsAndData(e){this.columnModel.setColumnDefs(e??[],"gridInitializing"),this.rowModel.start()}gridReady(){this.eventService.dispatchEvent({type:"gridReady"});let e=this.gos.isModuleRegistered("@ag-grid-enterprise/core");this.gos.get("debug")&&tN(`initialised successfully, enterprise = ${e}`)}setColumnDefs(e){let t=this.gos.get("columnDefs");if(t){if(this.waitingForColumns){this.waitingForColumns=!1,this.setColumnsAndData(t);return}this.columnModel.setColumnDefs(t,rS(e.source))}}},dz=class extends i2{constructor(){super(...arguments),this.beanName="changeDetectionService"}wireBeans(e){this.rowModel=e.rowModel,this.rowRenderer=e.rowRenderer}postConstruct(){t4(this.gos)&&(this.clientSideRowModel=this.rowModel),this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this)})}onCellValueChanged(e){"paste"!==e.source&&this.doChangeDetection(e.node,e.column)}doChangeDetection(e,t){if(this.gos.get("suppressChangeDetection"))return;let i=[e];if(this.clientSideRowModel&&!e.isRowPinned()){let r=new dP(this.gos.get("aggregateOnlyChangedColumns"),this.clientSideRowModel.getRootNode());r.addParentNode(e.parent,[t]),this.clientSideRowModel.doAggregate(r),r.forEachChangedNodeDepthFirst(e=>{i.push(e)})}this.rowRenderer.refreshCells({rowNodes:i})}},d_=class extends i2{constructor(){super(...arguments),this.beanName="expressionService",this.expressionToFunctionCache={}}evaluate(e,t){if("string"==typeof e)return this.evaluateExpression(e,t);tB("value should be either a string or a function",e)}evaluateExpression(e,t){try{return this.createExpressionFunction(e)(t.value,t.context,t.oldValue,t.newValue,t.value,t.node,t.data,t.colDef,t.rowIndex,t.api,t.getValue,t.column,t.columnGroup)}catch(i){return tN("Processing of the expression failed"),tN("Expression = ",e),tN("Params = ",t),tN("Exception = ",i),null}}createExpressionFunction(e){if(this.expressionToFunctionCache[e])return this.expressionToFunctionCache[e];let t=Function("x, ctx, oldValue, newValue, value, node, data, colDef, rowIndex, api, getValue, column, columnGroup",this.createFunctionBody(e));return this.expressionToFunctionCache[e]=t,t}createFunctionBody(e){return e.indexOf("return")>=0?e:"return "+e+";"}},dV=class extends i2{constructor(){super(...arguments),this.beanName="valueCache",this.cacheVersion=0}postConstruct(){this.active=this.gos.get("valueCache"),this.neverExpires=this.gos.get("valueCacheNeverExpires")}onDataChanged(){this.neverExpires||this.expire()}expire(){this.cacheVersion++}setValue(e,t,i){this.active&&(e.__cacheVersion!==this.cacheVersion&&(e.__cacheVersion=this.cacheVersion,e.__cacheData={}),e.__cacheData[t]=i)}getValue(e,t){if(this.active&&e.__cacheVersion===this.cacheVersion)return e.__cacheData[t]}},dj=class extends i2{constructor(){super(...arguments),this.beanName="valueService",this.initialised=!1,this.isSsrm=!1}wireBeans(e){this.expressionService=e.expressionService,this.columnModel=e.columnModel,this.valueCache=e.valueCache,this.dataTypeService=e.dataTypeService}postConstruct(){this.initialised||this.init()}init(){this.isSsrm=t6(this.gos),this.cellExpressions=this.gos.get("enableCellExpressions"),this.isTreeData=this.gos.get("treeData"),this.initialised=!0;let e=e=>this.callColumnCellValueChangedHandler(e),t=t7(this.gos);this.eventService.addEventListener("cellValueChanged",e,t),this.addDestroyFunc(()=>this.eventService.removeEventListener("cellValueChanged",e,t)),this.addManagedPropertyListener("treeData",e=>this.isTreeData=e.currentValue)}getValueForDisplay(e,t){let i=t.leafGroup&&this.columnModel.isPivotMode(),r=t.group&&t.expanded&&!t.footer&&!i,s=this.gos.get("groupSuppressBlankHeader");if(!r||s)return this.getValue(e,t);let a=!1,o=this.gos.get("groupTotalRow")??this.gos.get("groupIncludeFooter");a="function"!=typeof o?!!o:!!(this.gos.getCallback("groupTotalRow")??this.gos.getCallback("groupIncludeFooter"))({node:this});let n=r&&a;return this.getValue(e,t,!1,n)}getValue(e,t,i=!1,r=!1){let s;if(this.initialised||this.init(),!t)return;let a=e.getColDef(),o=a.field,n=e.getColId(),l=t.data,h=t.groupData&&void 0!==t.groupData[n],d=!r&&t.aggData&&void 0!==t.aggData[n],c=this.isSsrm&&r&&!!e.getColDef().aggFunc,u=this.isSsrm&&t.footer&&t.field&&(!0===e.getColDef().showRowGroup||e.getColDef().showRowGroup===t.field);if(i&&a.filterValueGetter?s=this.executeFilterValueGetter(a.filterValueGetter,l,e,t):this.isTreeData&&d?s=t.aggData[n]:this.isTreeData&&a.valueGetter?s=this.executeValueGetter(a.valueGetter,l,e,t):this.isTreeData&&o&&l?s=rc(l,o,e.isFieldContainsDots()):h?s=t.groupData[n]:d?s=t.aggData[n]:a.valueGetter?s=this.executeValueGetter(a.valueGetter,l,e,t):u?s=rc(l,t.field,e.isFieldContainsDots()):o&&l&&!c&&(s=rc(l,o,e.isFieldContainsDots())),this.cellExpressions&&"string"==typeof s&&0===s.indexOf("=")){let i=s.substring(1);s=this.executeValueGetter(i,l,e,t)}if(null==s){let i=this.getOpenedGroup(t,e);if(null!=i)return i}return s}parseValue(e,t,i,r){let s=e.getColDef(),a=s.valueParser;if(tY(a)){let o=this.gos.addGridCommonParams({node:t,data:t?.data,oldValue:r,newValue:i,colDef:s,column:e});return"function"==typeof a?a(o):this.expressionService.evaluate(a,o)}return i}getDeleteValue(e,t){return tY(e.getColDef().valueParser)?this.parseValue(e,t,"",this.getValueForDisplay(e,t))??null:null}formatValue(e,t,i,r,s=!0){let a,o=null,n=e.getColDef();if(r?a=r:s&&(a=n.valueFormatter),a){let r=this.gos.addGridCommonParams({value:i,node:t,data:t?t.data:null,colDef:n,column:e});o="function"==typeof a?a(r):this.expressionService.evaluate(a,r)}else if(n.refData)return n.refData[i]||"";return null==o&&Array.isArray(i)&&(o=i.join(", ")),o}getOpenedGroup(e,t){if(!this.gos.get("showOpenedGroup")||!t.getColDef().showRowGroup)return;let i=t.getColDef().showRowGroup,r=e.parent;for(;null!=r;){if(r.rowGroupColumn&&(!0===i||i===r.rowGroupColumn.getColId()))return r.key;r=r.parent}}setValue(e,t,i,r){let s;let a=this.columnModel.getColDefCol(t);if(!e||!a)return!1;tK(e.data)&&(e.data={});let{field:o,valueSetter:n}=a.getColDef();if(tK(o)&&tK(n))return tO("you need either field or valueSetter set on colDef for editing to work"),!1;if(this.dataTypeService&&!this.dataTypeService.checkType(a,i))return tO("Data type of the new value does not match the cell data type of the column"),!1;let l=this.gos.addGridCommonParams({node:e,data:e.data,oldValue:this.getValue(a,e),newValue:i,colDef:a.getColDef(),column:a});if(l.newValue=i,void 0===(s=tY(n)?"function"==typeof n?n(l):this.expressionService.evaluate(n,l):this.setValueUsingField(e.data,o,i,a.isFieldContainsDots()))&&(s=!0),!s)return!1;e.resetQuickFilterAggregateText(),this.valueCache.onDataChanged();let h=this.getValue(a,e);return this.eventService.dispatchEvent({type:"cellValueChanged",event:null,rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:l.column,colDef:l.colDef,data:e.data,node:e,oldValue:l.oldValue,newValue:h,value:h,source:r}),!0}callColumnCellValueChangedHandler(e){let t=e.colDef.onCellValueChanged;"function"==typeof t&&this.getFrameworkOverrides().wrapOutgoing(()=>{t({node:e.node,data:e.data,oldValue:e.oldValue,newValue:e.newValue,colDef:e.colDef,column:e.column,api:e.api,context:e.context})})}setValueUsingField(e,t,i,r){if(!t)return!1;let s=!1;if(r){let r=t.split("."),a=e;for(;r.length>0&&a;){let e=r.shift();0===r.length?(s=a[e]===i)||(a[e]=i):a=a[e]}}else(s=e[t]===i)||(e[t]=i);return!s}executeFilterValueGetter(e,t,i,r){let s=this.gos.addGridCommonParams({data:t,node:r,column:i,colDef:i.getColDef(),getValue:this.getValueCallback.bind(this,r)});return"function"==typeof e?e(s):this.expressionService.evaluate(e,s)}executeValueGetter(e,t,i,r){let s;let a=i.getColId(),o=this.valueCache.getValue(r,a);if(void 0!==o)return o;let n=this.gos.addGridCommonParams({data:t,node:r,column:i,colDef:i.getColDef(),getValue:this.getValueCallback.bind(this,r)});return s="function"==typeof e?e(n):this.expressionService.evaluate(e,n),this.valueCache.setValue(r,a,s),s}getValueCallback(e,t){let i=this.columnModel.getColDefCol(t);return i?this.getValue(i,e):null}getKeyForNode(e,t){let i=this.getValue(e,t),r=e.getColDef().keyCreator,s=i;return r&&(s=r(this.gos.addGridCommonParams({value:i,colDef:e.getColDef(),column:e,node:t,data:t.data}))),"string"==typeof s||null==s||"[object Object]"===(s=String(s))&&tO("a column you are grouping or pivoting by has objects as values. If you want to group by complex objects then either a) use a colDef.keyCreator (se AG Grid docs) or b) to toString() on the object to return a key"),s}},dH=class e{static applyGlobalGridOptions(t){if(!e.gridOptions)return t;let i={};return rd(i,e.gridOptions,!0,!0),"deep"===e.mergeStrategy?rd(i,t,!0,!0):i={...i,...t},e.gridOptions.context&&(i.context=e.gridOptions.context),t.context&&("deep"===e.mergeStrategy&&i.context&&rd(t.context,i.context,!0,!0),i.context=t.context),i}};dH.gridOptions=void 0,dH.mergeStrategy="shallow";var dU=1,dW=class{create(e,t,i,r,s){let a=function(e){let t={};return Object.entries(e).forEach(([e,i])=>{let r=dC(e,i);t[e]=r}),t}(dH.applyGlobalGridOptions(t)),o=a.gridId??String(dU++),n=this.getRegisteredModules(s,o),l=this.createBeansList(a.rowModelType,n,o),h=this.createProvidedBeans(e,a,s);if(!l){tB("Failed to create grid.");return}let d=new aY({providedBeanInstances:h,beanClasses:l,gridId:o,beanInitComparator:hP,beanDestroyComparator:hF,derivedBeans:[hM]});return this.registerModuleUserComponents(d,n),this.registerControllers(d,n),this.registerModuleApiFunctions(d,n),i(d),d.getBean("syncService").start(),r&&r(d),d.getBean("gridApi")}registerControllers(e,t){let i=e.getBean("ctrlsFactory");t.forEach(e=>{e.controllers&&e.controllers.forEach(e=>i.register(e))})}getRegisteredModules(e,t){let i=e?e.modules:null,r=aW.__getRegisteredModules(t),s=[],a={},o=(e,t,i)=>{a[t.moduleName]||(a[t.moduleName]=!0,s.push(t),aW.__register(t,e,i)),t.dependantModules&&t.dependantModules.forEach(t=>o(e,t,i))};return o(!!i?.length||!aW.__isPackageBased(),dg,void 0),i&&i.forEach(e=>o(!0,e,t)),r&&r.forEach(e=>o(!aW.__isPackageBased(),e,void 0)),s}registerModuleUserComponents(e,t){let i=this.extractModuleEntity(t,e=>e.userComponents?e.userComponents:[]),r=e.getBean("userComponentRegistry");i.forEach(({name:e,classImp:t,params:i})=>{r.registerDefaultComponent(e,t,i)})}registerModuleApiFunctions(e,t){let i=e.getBean("apiFunctionService");t.forEach(e=>{let t=e.apiFunctions;t&&Object.keys(t).forEach(e=>{i?.addFunction(e,t[e])})})}createProvidedBeans(e,t,i){let r=i?i.frameworkOverrides:null;tK(r)&&(r=new hf);let s={gridOptions:t,eGridDiv:e,globalEventListener:i?i.globalEventListener:null,globalSyncEventListener:i?i.globalSyncEventListener:null,frameworkOverrides:r};return i&&i.providedBeanInstances&&Object.assign(s,i.providedBeanInstances),s}createBeansList(e="clientSide",t,i){let r=t.filter(t=>!t.rowModel||t.rowModel===e),s={clientSide:"@ag-grid-community/client-side-row-model",infinite:"@ag-grid-community/infinite-row-model",serverSide:"@ag-grid-enterprise/server-side-row-model",viewport:"@ag-grid-enterprise/viewport-row-model"};if(!s[e]){tB("Could not find row model for rowModelType = ",e);return}if(!aW.__assertRegistered(s[e],`rowModelType = '${e}'`,i))return;let a=[hz,hB,db,dm,hx,aw,hA,hR,lP,aH,dR,lR,dS,he,a2,rz,h$,dw,hg,dF,rb,ny,dE,dM,l7,d_,rC,lA,dV,dj,l5,lL,aQ,hY,lT,hH,hv,ho,lI,dB,dk,dI,dN,dz,lF,hE,dA,dL,hO,hK,hG,hN,dG,dT,lO,dx,dD,lB,rI,hD,rT,rE,hI,hk,rN,rD,rP,hT,rF,i5];a.push(...this.extractModuleEntity(r,e=>e.beans?e.beans:[]));let o=[];return a.forEach(e=>{0>o.indexOf(e)&&o.push(e)}),o}extractModuleEntity(e,t){return[].concat(...e.map(t))}},d$=class extends i2{constructor(){super(...arguments),this.beanName="rowModelHelperService"}wireBeans(e){this.rowModel=e.rowModel}postConstruct(){let e=this.rowModel;switch(e.getType()){case"clientSide":this.clientSideRowModel=e;break;case"infinite":this.infiniteRowModel=e;break;case"serverSide":this.serverSideRowModel=e}}getClientSideRowModel(){return this.clientSideRowModel}getInfiniteRowModel(){return this.infiniteRowModel}getServerSideRowModel(){return this.serverSideRowModel}},dY={version:o2,moduleName:"@ag-grid-community/csrm-ssrm-shared-api",apiFunctions:{expandAll:function(e){e.expansionService.expandAll(!0)},collapseAll:function(e){e.expansionService.expandAll(!1)},onRowHeightChanged:function(e){let t=e.rowModelHelperService?.getClientSideRowModel(),i=e.rowModelHelperService?.getServerSideRowModel();t?t.onRowHeightChanged():i&&i.onRowHeightChanged()}}},dK={version:o2,moduleName:"@ag-grid-community/ssrm-infinite-shared-api",apiFunctions:{setRowCount:function(e,t,i){let r=e.rowModelHelperService?.getServerSideRowModel();if(r){if(e.funcColsService.isRowGroupEmpty()){r.setRowCount(t,i);return}tB("setRowCount cannot be used while using row grouping.");return}let s=e.rowModelHelperService?.getInfiniteRowModel();if(s){s.setRowCount(t,i);return}},getCacheBlockState:function(e){return e.rowNodeBlockLoader?.getBlockState()??{}},isLastRowIndexKnown:function(e){return e.rowModel.isLastRowIndexKnown()}}},dZ=class{};dZ.CHART_TYPE_TO_SERIES_TYPE={column:"bar",groupedColumn:"bar",stackedColumn:"bar",normalizedColumn:"bar",bar:"bar",groupedBar:"bar",stackedBar:"bar",normalizedBar:"bar",line:"line",scatter:"scatter",bubble:"bubble",pie:"pie",donut:"donut",doughnut:"donut",area:"area",stackedArea:"area",normalizedArea:"area",histogram:"histogram",radarLine:"radar-line",radarArea:"radar-area",nightingale:"nightingale",radialColumn:"radial-column",radialBar:"radial-bar",sunburst:"sunburst",rangeBar:"range-bar",rangeArea:"range-area",boxPlot:"box-plot",treemap:"treemap",heatmap:"heatmap",waterfall:"waterfall"},dZ.COMBO_CHART_TYPES=["columnLineCombo","areaColumnCombo","customCombo"],dZ.SERIES_GROUP_TYPES=["grouped","stacked","normalized"];var dq=((w=dq||{}).InsideBase="insideBase",w.InsideEnd="insideEnd",w.Center="center",w.OutsideEnd="outsideEnd",w),dX="undefined"==typeof global?{}:global;dX.HTMLElement="undefined"==typeof HTMLElement?{}:HTMLElement,dX.HTMLButtonElement="undefined"==typeof HTMLButtonElement?{}:HTMLButtonElement,dX.HTMLSelectElement="undefined"==typeof HTMLSelectElement?{}:HTMLSelectElement,dX.HTMLInputElement="undefined"==typeof HTMLInputElement?{}:HTMLInputElement,dX.Node="undefined"==typeof Node?{}:Node,dX.MouseEvent="undefined"==typeof MouseEvent?{}:MouseEvent;var dQ=class{constructor(e,t,i,r,s,a){this.nextId=0,this.rowCountReady=!1,this.allNodesMap={},this.rootNode=e,this.gos=t,this.eventService=i,this.funcColsService=r,this.beans=a,this.selectionService=s,this.rootNode.group=!0,this.rootNode.level=-1,this.rootNode.id="ROOT_NODE_ID",this.rootNode.allLeafChildren=[],this.rootNode.childrenAfterGroup=[],this.rootNode.childrenAfterSort=[],this.rootNode.childrenAfterAggFilter=[],this.rootNode.childrenAfterFilter=[]}getCopyOfNodesMap(){return rn(this.allNodesMap)}getRowNode(e){return this.allNodesMap[e]}setRowData(e){if("string"==typeof e){tO("rowData must be an array.");return}this.rowCountReady=!0,this.dispatchRowDataUpdateStartedEvent(e);let t=this.rootNode,i=this.rootNode.sibling;t.childrenAfterFilter=null,t.childrenAfterGroup=null,t.childrenAfterAggFilter=null,t.childrenAfterSort=null,t.childrenMapped=null,t.updateHasChildren(),this.nextId=0,this.allNodesMap={},e?t.allLeafChildren=e.map((e,t)=>this.createNode(e,this.rootNode,0,t)):(t.allLeafChildren=[],t.childrenAfterGroup=[]),i&&(i.childrenAfterFilter=t.childrenAfterFilter,i.childrenAfterGroup=t.childrenAfterGroup,i.childrenAfterAggFilter=t.childrenAfterAggFilter,i.childrenAfterSort=t.childrenAfterSort,i.childrenMapped=t.childrenMapped,i.allLeafChildren=t.allLeafChildren)}updateRowData(e){this.rowCountReady=!0,this.dispatchRowDataUpdateStartedEvent(e.add);let t={rowNodeTransaction:{remove:[],update:[],add:[]},rowsInserted:!1},i=[];return this.executeRemove(e,t,i),this.executeUpdate(e,t,i),this.executeAdd(e,t),this.updateSelection(i,"rowDataChanged"),t}updateRowOrderFromRowData(e){let t=this.rootNode.allLeafChildren,i=t?.length??0,r=new Map,s=-1,a=-1;for(let o=0;o<i;++o){let i=t[o],n=i.data;n!==e[o]&&(a<0&&(s=o),a=o,r.set(n,i))}if(s<0)return!1;for(let i=s;i<=a;++i){let s=r.get(e[i]);void 0!==s&&(t[i]=s,s.sourceRowIndex=i)}return!0}isRowCountReady(){return this.rowCountReady}dispatchRowDataUpdateStartedEvent(e){this.eventService.dispatchEvent({type:"rowDataUpdateStarted",firstRowData:e?.length?e[0]:null})}updateSelection(e,t){let i=e.length>0;i&&this.selectionService.setNodesSelected({newValue:!1,nodes:e,suppressFinishActions:!0,source:t}),this.selectionService.updateGroupsFromChildrenSelections(t),i&&this.eventService.dispatchEvent({type:"selectionChanged",source:t})}executeAdd(e,t){let i=e.add;if(tZ(i))return;let r=this.rootNode.allLeafChildren,s=r.length;if("number"==typeof e.addIndex&&(s=this.sanitizeAddIndex(e.addIndex))>0&&this.gos.get("treeData"))for(let e=0;e<r.length;e++){let t=r[e];if(t?.rowIndex==s-1){s=e+1;break}}let a=i.map((e,t)=>this.createNode(e,this.rootNode,0,s+t));if(s<r.length){let e=r.slice(0,s),i=r.slice(s,r.length),o=e.length+a.length;for(let e=0,t=i.length;e<t;++e)i[e].sourceRowIndex=o+e;this.rootNode.allLeafChildren=[...e,...a,...i],t.rowsInserted=!0}else this.rootNode.allLeafChildren=r.concat(a);let o=this.rootNode.sibling;o&&(o.allLeafChildren=r),t.rowNodeTransaction.add=a}sanitizeAddIndex(e){let t=this.rootNode.allLeafChildren?.length??0;return e<0||e>=t||Number.isNaN(e)?t:Math.ceil(e)}executeRemove(e,{rowNodeTransaction:t},i){let{remove:r}=e;if(tZ(r))return;let s={};r.forEach(e=>{let r=this.lookupRowNode(e);r&&(r.isSelected()&&i.push(r),r.clearRowTopAndRowIndex(),s[r.id]=!0,delete this.allNodesMap[r.id],t.remove.push(r))}),this.rootNode.allLeafChildren=this.rootNode.allLeafChildren?.filter(e=>!s[e.id])??null,this.rootNode.allLeafChildren?.forEach((e,t)=>{e.sourceRowIndex=t});let a=this.rootNode.sibling;a&&(a.allLeafChildren=this.rootNode.allLeafChildren)}executeUpdate(e,{rowNodeTransaction:t},i){let{update:r}=e;tZ(r)||r.forEach(e=>{let r=this.lookupRowNode(e);r&&(r.updateData(e),!r.selectable&&r.isSelected()&&i.push(r),this.setMasterForRow(r,e,0,!1),t.update.push(r))})}lookupRowNode(e){let t;let i=iw(this.gos);if(i){let r=i({data:e,level:0});if(!(t=this.allNodesMap[r]))return tB(`could not find row id=${r}, data item was not found for this id`),null}else if(!(t=this.rootNode.allLeafChildren?.find(t=>t.data===e)))return tB("could not find data item as object was not found",e),tB("Consider using getRowId to help the Grid find matching row data"),null;return t||null}createNode(e,t,i,r){let s=new a7(this.beans);return s.sourceRowIndex=r,s.group=!1,this.setMasterForRow(s,e,i,!0),t&&(s.parent=t),s.level=i,s.setDataAndId(e,this.nextId.toString()),this.allNodesMap[s.id]&&tO(`duplicate node id '${s.id}' detected from getRowId callback, this could cause issues in your grid.`),this.allNodesMap[s.id]=s,this.nextId++,s}setMasterForRow(e,t,i,r){if(this.gos.get("treeData"))e.setMaster(!1),r&&(e.expanded=!1);else{if(this.gos.get("masterDetail")){let i=this.gos.get("isRowMaster");i?e.setMaster(i(t)):e.setMaster(!0)}else e.setMaster(!1);if(r){let t=this.funcColsService.getRowGroupColumns(),r=t?t.length:0;e.expanded=!!e.master&&this.isExpanded(i+r)}}}isExpanded(e){let t=this.gos.get("groupDefaultExpanded");return -1===t||e<t}},dJ=class extends i2{constructor(){super(...arguments),this.beanName="rowModel",this.onRowHeightChanged_debounced=tj(this.onRowHeightChanged.bind(this),100),this.rowsToDisplay=[],this.hasStarted=!1,this.shouldSkipSettingDataOnStart=!1,this.isRefreshingModel=!1,this.rowCountReady=!1}wireBeans(e){this.beans=e,this.columnModel=e.columnModel,this.funcColsService=e.funcColsService,this.selectionService=e.selectionService,this.valueCache=e.valueCache,this.environment=e.environment,this.filterStage=e.filterStage,this.sortStage=e.sortStage,this.flattenStage=e.flattenStage,this.groupStage=e.groupStage,this.aggregationStage=e.aggregationStage,this.pivotStage=e.pivotStage,this.filterAggregatesStage=e.filterAggregatesStage}postConstruct(){let e=this.refreshModel.bind(this,{step:"group"}),t=!this.gos.get("suppressAnimationFrame"),i=this.refreshModel.bind(this,{step:"group",afterColumnsChanged:!0,keepRenderedRows:!0,animate:t});this.addManagedEventListeners({newColumnsLoaded:i,columnRowGroupChanged:e,columnValueChanged:this.onValueChanged.bind(this),columnPivotChanged:this.refreshModel.bind(this,{step:"pivot"}),filterChanged:this.onFilterChanged.bind(this),sortChanged:this.onSortChanged.bind(this),columnPivotModeChanged:e,gridStylesChanged:this.onGridStylesChanges.bind(this),gridReady:this.onGridReady.bind(this)}),this.addPropertyListeners(),this.rootNode=new a7(this.beans),this.nodeManager=new dQ(this.rootNode,this.gos,this.eventService,this.funcColsService,this.selectionService,this.beans)}addPropertyListeners(){let e=new Set(["treeData","masterDetail"]),t=new Set(["groupDefaultExpanded","groupAllowUnbalanced","initialGroupOrderComparator","groupHideOpenParents","groupDisplayType"]),i=new Set(["excludeChildrenWhenTreeDataFiltering"]),r=new Set(["removePivotHeaderRowWhenSingleValueColumn","pivotRowTotals","pivotColumnGroupTotals","suppressExpandablePivotGroups"]),s=new Set(["getGroupRowAgg","alwaysAggregateAtRootLevel","groupIncludeTotalFooter","suppressAggFilteredOnly","grandTotalRow"]),a=new Set(["postSortRows","groupDisplayType","accentedSort"]),o=new Set([]),n=new Set(["groupRemoveSingleChildren","groupRemoveLowestSingleChildren","groupIncludeFooter","groupTotalRow"]),l=[...e,...t,...i,...r,...r,...s,...a,...o,...n];this.addManagedPropertyListeners(l,l=>{let h=l.changeSet?.properties;if(!h)return;let d=e=>h.some(t=>e.has(t));if(d(e)){this.setRowData(this.rootNode.allLeafChildren.map(e=>e.data));return}if(d(t)){this.refreshModel({step:"group"});return}if(d(i)){this.refreshModel({step:"filter"});return}if(d(r)){this.refreshModel({step:"pivot"});return}if(d(s)){this.refreshModel({step:"aggregate"});return}if(d(a)){this.refreshModel({step:"sort"});return}if(d(o)){this.refreshModel({step:"filter_aggregates"});return}d(n)&&this.refreshModel({step:"map"})}),this.addManagedPropertyListener("rowHeight",()=>this.resetRowHeights())}start(){this.hasStarted=!0,this.shouldSkipSettingDataOnStart?this.dispatchUpdateEventsAndRefresh():this.setInitialData()}setInitialData(){let e=this.gos.get("rowData");e&&(this.shouldSkipSettingDataOnStart=!0,this.setRowData(e))}ensureRowHeightsValid(e,t,i,r){let s;let a=!1;do{s=!1;let o=this.getRowIndexAtPixel(e),n=this.getRowIndexAtPixel(t),l=Math.max(o,i),h=Math.min(n,r);for(let e=l;e<=h;e++){let t=this.getRow(e);if(t.rowHeightEstimated){let e=ie(this.gos,t);t.setRowHeight(e.height),s=!0,a=!0}}s&&this.setRowTopAndRowIndex()}while(s);return a}setRowTopAndRowIndex(){let e=this.environment.getDefaultRowHeight(),t=0,i=new Set,r=t5(this.gos,"normal");for(let s=0;s<this.rowsToDisplay.length;s++){let a=this.rowsToDisplay[s];if(null!=a.id&&i.add(a.id),null==a.rowHeight){let t=ie(this.gos,a,r,e);a.setRowHeight(t.height,t.estimated)}a.setRowTop(t),a.setRowIndex(s),t+=a.rowHeight}return i}clearRowTopAndRowIndex(e,t){let i=e.isActive(),r=e=>{e&&null!=e.id&&!t.has(e.id)&&e.clearRowTopAndRowIndex()},s=e=>{if(r(e),r(e.detailNode),r(e.sibling),e.hasChildren()&&e.childrenAfterGroup){let t=-1==e.level;(!i||t||e.expanded)&&e.childrenAfterGroup.forEach(s)}};s(this.rootNode)}ensureRowsAtPixel(e,t,i=0){let r=this.getRowIndexAtPixel(t),s=this.getRow(r),a=!this.gos.get("suppressAnimationFrame");if(s===e[0])return!1;let o=this.rootNode.allLeafChildren;return e.forEach(e=>{i_(o,e)}),e.forEach((e,t)=>{iV(o,e,Math.max(r+i,0)+t)}),e.forEach((e,t)=>{e.sourceRowIndex=t}),this.refreshModel({step:"group",keepRenderedRows:!0,keepEditingRows:!0,animate:a,rowNodesOrderChanged:!0}),!0}highlightRowAtPixel(e,t){let i=null!=t?this.getRowIndexAtPixel(t):null,r=null!=i?this.getRow(i):null;if(!r||!e||r===e||null==t){this.lastHighlightedRow&&(this.lastHighlightedRow.setHighlighted(null),this.lastHighlightedRow=null);return}let s=this.getHighlightPosition(t,r);this.lastHighlightedRow&&this.lastHighlightedRow!==r&&(this.lastHighlightedRow.setHighlighted(null),this.lastHighlightedRow=null),r.setHighlighted(s),this.lastHighlightedRow=r}getHighlightPosition(e,t){if(!t){let i=this.getRowIndexAtPixel(e);if(!(t=this.getRow(i||0)))return 1}let{rowTop:i,rowHeight:r}=t;return e-i<r/2?0:1}getLastHighlightedRowNode(){return this.lastHighlightedRow}isLastRowIndexKnown(){return!0}getRowCount(){return this.rowsToDisplay?this.rowsToDisplay.length:0}getTopLevelRowCount(){if(0===this.rowsToDisplay.length)return 0;if(this.rowsToDisplay&&this.rowsToDisplay[0]===this.rootNode)return 1;let e=this.rootNode.childrenAfterAggFilter,t=this.rootNode.sibling?1:0;return(e?e.length:0)+t}getTopLevelRowDisplayedIndex(e){if(this.rowsToDisplay&&this.rowsToDisplay[0]===this.rootNode)return e;let t=e;if(this.rowsToDisplay[0].footer){if(0===e)return 0;t-=1}let i=this.rowsToDisplay[this.rowsToDisplay.length-1],r=t>=this.rootNode.childrenAfterSort.length;if(i.footer&&r)return i.rowIndex;let s=this.rootNode.childrenAfterSort[t];if(this.gos.get("groupHideOpenParents"))for(;s.expanded&&s.childrenAfterSort&&s.childrenAfterSort.length>0;)s=s.childrenAfterSort[0];return s.rowIndex}getRowBounds(e){if(tK(this.rowsToDisplay))return null;let t=this.rowsToDisplay[e];return t?{rowTop:t.rowTop,rowHeight:t.rowHeight}:null}onRowGroupOpened(){let e=ic(this.gos);this.refreshModel({step:"map",keepRenderedRows:!0,animate:e})}onFilterChanged(e){if(e.afterDataChange)return;let t=ic(this.gos),i=0===e.columns.length||e.columns.some(e=>e.isPrimary());this.refreshModel({step:i?"filter":"filter_aggregates",keepRenderedRows:!0,animate:t})}onSortChanged(){let e=ic(this.gos);this.refreshModel({step:"sort",keepRenderedRows:!0,animate:e,keepEditingRows:!0})}getType(){return"clientSide"}onValueChanged(){this.columnModel.isPivotActive()?this.refreshModel({step:"pivot"}):this.refreshModel({step:"aggregate"})}createChangePath(e){let t=tZ(e),i=new dP(!1,this.rootNode);return t&&i.setInactive(),i}isSuppressModelUpdateAfterUpdateTransaction(e){if(!this.gos.get("suppressModelUpdateAfterUpdateTransaction")||null==e.rowNodeTransactions)return!1;let t=e.rowNodeTransactions.filter(e=>null!=e.add&&e.add.length>0||null!=e.remove&&e.remove.length>0);return null==t||0==t.length}buildRefreshModelParams(e){let t="group",i={everything:"group",group:"group",filter:"filter",map:"map",aggregate:"aggregate",sort:"sort",pivot:"pivot"};if(tY(e)&&(t=i[e]),tK(t)){tB(`invalid step ${e}, available steps are ${Object.keys(i).join(", ")}`);return}return{step:t,keepRenderedRows:!0,keepEditingRows:!0,animate:!this.gos.get("suppressAnimationFrame")}}refreshModel(e){if(!this.hasStarted||this.isRefreshingModel||this.columnModel.isChangeEventsDispatching())return;let t="object"==typeof e&&"step"in e?e:this.buildRefreshModelParams(e);if(!t||this.isSuppressModelUpdateAfterUpdateTransaction(t))return;let i=this.createChangePath(t.rowNodeTransactions);switch(this.isRefreshingModel=!0,t.step){case"group":this.doRowGrouping(t.rowNodeTransactions,i,!!t.rowNodesOrderChanged,!!t.afterColumnsChanged);case"filter":this.doFilter(i);case"pivot":this.doPivot(i);case"aggregate":this.doAggregate(i);case"filter_aggregates":this.doFilterAggregates(i);case"sort":this.doSort(t.rowNodeTransactions,i);case"map":this.doRowsToDisplay()}let r=this.setRowTopAndRowIndex();this.clearRowTopAndRowIndex(i,r),this.isRefreshingModel=!1,this.eventService.dispatchEvent({type:"modelUpdated",animate:t.animate,keepRenderedRows:t.keepRenderedRows,newData:t.newData,newPage:!1,keepUndoRedoStack:t.keepUndoRedoStack})}isEmpty(){let e=tK(this.rootNode.allLeafChildren)||0===this.rootNode.allLeafChildren.length;return tK(this.rootNode)||e||!this.columnModel.isReady()}isRowsToRender(){return tY(this.rowsToDisplay)&&this.rowsToDisplay.length>0}getNodesInRangeForSelection(e,t){let i=!1,r=!1,s=[],a=iF(this.gos);return this.forEachNodeAfterFilterAndSort(o=>{if(!r){if(i&&(o===t||o===e)&&(r=!0,o.group&&a)){s.push(...o.allLeafChildren);return}if(!i){if(o!==t&&o!==e)return;i=!0}if(!o.group||!a){s.push(o);return}}}),s}setDatasource(e){tB("should never call setDatasource on clientSideRowController")}getTopLevelNodes(){return this.rootNode?this.rootNode.childrenAfterGroup:null}getRootNode(){return this.rootNode}getRow(e){return this.rowsToDisplay[e]}isRowPresent(e){return this.rowsToDisplay.indexOf(e)>=0}getRowIndexAtPixel(e){if(this.isEmpty()||0===this.rowsToDisplay.length)return -1;let t=0,i=this.rowsToDisplay.length-1;if(e<=0)return 0;if(iB(this.rowsToDisplay).rowTop<=e)return this.rowsToDisplay.length-1;let r=-1,s=-1;for(;;){let a=Math.floor((t+i)/2),o=this.rowsToDisplay[a];if(this.isRowInPixel(o,e)||(o.rowTop<e?t=a+1:o.rowTop>e&&(i=a-1),r===t&&s===i))return a;r=t,s=i}}isRowInPixel(e,t){let i=e.rowTop,r=e.rowTop+e.rowHeight;return i<=t&&r>t}forEachLeafNode(e){this.rootNode.allLeafChildren&&this.rootNode.allLeafChildren.forEach((t,i)=>e(t,i))}forEachNode(e,t=!1){this.recursivelyWalkNodesAndCallback({nodes:[...this.rootNode.childrenAfterGroup||[]],callback:e,recursionType:0,index:0,includeFooterNodes:t})}forEachNodeAfterFilter(e,t=!1){this.recursivelyWalkNodesAndCallback({nodes:[...this.rootNode.childrenAfterAggFilter||[]],callback:e,recursionType:1,index:0,includeFooterNodes:t})}forEachNodeAfterFilterAndSort(e,t=!1){this.recursivelyWalkNodesAndCallback({nodes:[...this.rootNode.childrenAfterSort||[]],callback:e,recursionType:2,index:0,includeFooterNodes:t})}forEachPivotNode(e,t=!1){this.recursivelyWalkNodesAndCallback({nodes:[this.rootNode],callback:e,recursionType:3,index:0,includeFooterNodes:t})}recursivelyWalkNodesAndCallback(e){let{nodes:t,callback:i,recursionType:r,includeFooterNodes:s}=e,{index:a}=e,o=e=>{let r=t[0]?.parent;if(!r)return;let o=s&&im(this.gos),n=iv(this.gos),l=s&&n({node:r});if(r===this.rootNode){o===e&&(r.createFooter(),i(r.sibling,a++));return}l===e&&(r.createFooter(),i(r.sibling,a++))};o("top");for(let e=0;e<t.length;e++){let o=t[e];if(i(o,a++),o.hasChildren()&&!o.footer){let e=null;switch(r){case 0:e=o.childrenAfterGroup;break;case 1:e=o.childrenAfterAggFilter;break;case 2:e=o.childrenAfterSort;break;case 3:e=o.leafGroup?null:o.childrenAfterSort}e&&(a=this.recursivelyWalkNodesAndCallback({nodes:[...e],callback:i,recursionType:r,index:a,includeFooterNodes:s}))}}return o("bottom"),a}doAggregate(e){this.aggregationStage?.execute({rowNode:this.rootNode,changedPath:e})}doFilterAggregates(e){this.filterAggregatesStage?this.filterAggregatesStage.execute({rowNode:this.rootNode,changedPath:e}):this.rootNode.childrenAfterAggFilter=this.rootNode.childrenAfterFilter}expandOrCollapseAll(e){let t=this.gos.get("treeData"),i=this.columnModel.isPivotActive(),r=s=>{s&&s.forEach(s=>{let a=()=>{s.expanded=e,r(s.childrenAfterGroup)};if(t){tY(s.childrenAfterGroup)&&a();return}if(i){s.leafGroup||a();return}s.group&&a()})};this.rootNode&&r(this.rootNode.childrenAfterGroup),this.refreshModel({step:"map"}),this.eventService.dispatchEvent({type:"expandOrCollapseAll",source:e?"expandAll":"collapseAll"})}doSort(e,t){this.sortStage.execute({rowNode:this.rootNode,rowNodeTransactions:e,changedPath:t})}doRowGrouping(e,t,i,r){if(this.groupStage)e?this.groupStage.execute({rowNode:this.rootNode,rowNodeTransactions:e,rowNodesOrderChanged:i,changedPath:t}):this.groupStage.execute({rowNode:this.rootNode,changedPath:t,afterColumnsChanged:r}),iF(this.gos)&&this.selectionService.updateGroupsFromChildrenSelections("rowGroupChanged",t)&&this.eventService.dispatchEvent({type:"selectionChanged",source:"rowGroupChanged"});else{let e=this.rootNode,t=e.sibling;e.childrenAfterGroup=e.allLeafChildren,t&&(t.childrenAfterGroup=e.childrenAfterGroup),this.rootNode.updateHasChildren()}this.nodeManager.isRowCountReady()&&(this.rowCountReady=!0,this.eventService.dispatchEventOnce({type:"rowCountReady"}))}doFilter(e){this.filterStage.execute({rowNode:this.rootNode,changedPath:e})}doPivot(e){this.pivotStage?.execute({rowNode:this.rootNode,changedPath:e})}getNodeManager(){return this.nodeManager}getRowNode(e){if("string"==typeof e&&0==e.indexOf(a7.ID_PREFIX_ROW_GROUP)){let t;return this.forEachNode(i=>{i.id===e&&(t=i)}),t}return this.nodeManager.getRowNode(e)}setRowData(e){this.selectionService.reset("rowDataChanged"),this.nodeManager.setRowData(e),this.hasStarted&&this.dispatchUpdateEventsAndRefresh()}dispatchUpdateEventsAndRefresh(){this.eventService.dispatchEvent({type:"rowDataUpdated"}),this.refreshModel({step:"group",newData:!0})}batchUpdateRowData(e,t){if(null==this.applyAsyncTransactionsTimeout){this.rowDataTransactionBatch=[];let e=this.gos.get("asyncTransactionWaitMillis");this.applyAsyncTransactionsTimeout=window.setTimeout(()=>{this.isAlive()&&this.executeBatchUpdateRowData()},e)}this.rowDataTransactionBatch.push({rowDataTransaction:e,callback:t})}flushAsyncTransactions(){null!=this.applyAsyncTransactionsTimeout&&(clearTimeout(this.applyAsyncTransactionsTimeout),this.executeBatchUpdateRowData())}executeBatchUpdateRowData(){this.valueCache.onDataChanged();let e=[],t=[],i=!1;this.rowDataTransactionBatch?.forEach(r=>{let{rowNodeTransaction:s,rowsInserted:a}=this.nodeManager.updateRowData(r.rowDataTransaction);a&&(i=!0),t.push(s),r.callback&&e.push(r.callback.bind(null,s))}),this.commonUpdateRowData(t,i),e.length>0&&window.setTimeout(()=>{e.forEach(e=>e())},0),t.length>0&&this.eventService.dispatchEvent({type:"asyncTransactionsFlushed",results:t}),this.rowDataTransactionBatch=null,this.applyAsyncTransactionsTimeout=void 0}updateRowData(e){this.valueCache.onDataChanged();let{rowNodeTransaction:t,rowsInserted:i}=this.nodeManager.updateRowData(e);return this.commonUpdateRowData([t],i),t}afterImmutableDataChange(e,t){this.commonUpdateRowData([e],t)}commonUpdateRowData(e,t){if(!this.hasStarted)return;let i=!this.gos.get("suppressAnimationFrame");this.eventService.dispatchEvent({type:"rowDataUpdated"}),this.refreshModel({step:"group",rowNodeTransactions:e,rowNodesOrderChanged:t,keepRenderedRows:!0,keepEditingRows:!0,animate:i})}doRowsToDisplay(){this.rowsToDisplay=this.flattenStage.execute({rowNode:this.rootNode})}onRowHeightChanged(){this.refreshModel({step:"map",keepRenderedRows:!0,keepEditingRows:!0,keepUndoRedoStack:!0})}onRowHeightChangedDebounced(){this.onRowHeightChanged_debounced()}resetRowHeights(){let e=this.resetRowHeightsForAllRowNodes();this.rootNode.setRowHeight(this.rootNode.rowHeight,!0),this.rootNode.sibling&&this.rootNode.sibling.setRowHeight(this.rootNode.sibling.rowHeight,!0),e&&this.onRowHeightChanged()}resetRowHeightsForAllRowNodes(){let e=!1;return this.forEachNode(t=>{t.setRowHeight(t.rowHeight,!0);let i=t.detailNode;i&&i.setRowHeight(i.rowHeight,!0),t.sibling&&t.sibling.setRowHeight(t.sibling.rowHeight,!0),e=!0}),e}onGridStylesChanges(e){e.rowHeightChanged&&!this.columnModel.isAutoRowHeightActive()&&this.resetRowHeights()}onGridReady(){this.hasStarted||this.setInitialData()}isRowDataLoaded(){return this.rowCountReady}},d0=class extends i2{constructor(){super(...arguments),this.beanName="filterStage"}wireBeans(e){this.filterManager=e.filterManager}execute(e){let{changedPath:t}=e;this.filter(t)}filter(e){let t=!!this.filterManager?.isChildFilterPresent();this.filterNodes(t,e)}filterNodes(e,t){let i=(t,i)=>{t.hasChildren()&&e&&!i?t.childrenAfterFilter=t.childrenAfterGroup.filter(e=>{let t=e.childrenAfterFilter&&e.childrenAfterFilter.length>0,i=e.data&&this.filterManager.doesRowPassFilter({rowNode:e});return t||i}):t.childrenAfterFilter=t.childrenAfterGroup,t.sibling&&(t.sibling.childrenAfterFilter=t.childrenAfterFilter)};if(this.doingTreeDataFiltering()){let e=(t,r)=>{if(t.childrenAfterGroup)for(let s=0;s<t.childrenAfterGroup.length;s++){let a=t.childrenAfterGroup[s],o=r||this.filterManager.doesRowPassFilter({rowNode:a});a.childrenAfterGroup?e(t.childrenAfterGroup[s],o):i(a,o)}i(t,r)};t.executeFromRootNode(t=>e(t,!1))}else t.forEachChangedNodeDepthFirst(e=>i(e,!1),!0)}doingTreeDataFiltering(){return this.gos.get("treeData")&&!this.gos.get("excludeChildrenWhenTreeDataFiltering")}},d1=class extends i2{constructor(){super(...arguments),this.beanName="flattenStage"}wireBeans(e){this.beans=e,this.columnModel=e.columnModel}execute(e){let t=e.rowNode,i=[],r=this.columnModel.isPivotMode(),s=r&&t.leafGroup,a=s?[t]:t.childrenAfterSort,o=this.getFlattenDetails();this.recursivelyAddToRowsToDisplay(o,a,i,r,0);let n=i.length>0;if(!s&&n&&o.grandTotalRow){t.createFooter();let e="top"===o.grandTotalRow;this.addRowNodeToRowsToDisplay(o,t.sibling,i,0,e)}return i}getFlattenDetails(){let e=this.gos.get("groupRemoveSingleChildren");return{groupRemoveLowestSingleChildren:!e&&this.gos.get("groupRemoveLowestSingleChildren"),groupRemoveSingleChildren:e,isGroupMultiAutoColumn:iy(this.gos),hideOpenParents:this.gos.get("groupHideOpenParents"),grandTotalRow:im(this.gos),groupTotalRow:iv(this.gos)}}recursivelyAddToRowsToDisplay(e,t,i,r,s){if(!tZ(t))for(let a=0;a<t.length;a++){let o=t[a],n=o.hasChildren(),l=r&&!n,h=e.groupRemoveSingleChildren&&n&&1===o.childrenAfterGroup.length,d=e.groupRemoveLowestSingleChildren&&n&&o.leafGroup&&1===o.childrenAfterGroup.length,c=r&&o.leafGroup,u=e.hideOpenParents&&o.expanded&&!o.master&&!c;if(l||u||h||d||this.addRowNodeToRowsToDisplay(e,o,i,s),!r||!o.leafGroup){if(n){let t=h||d;if(o.expanded||t){let a=e.groupTotalRow({node:o});a||o.destroyFooter();let n=t?s:s+1;"top"===a&&(o.createFooter(),this.addRowNodeToRowsToDisplay(e,o.sibling,i,n)),this.recursivelyAddToRowsToDisplay(e,o.childrenAfterSort,i,r,n),"bottom"===a&&(o.createFooter(),this.addRowNodeToRowsToDisplay(e,o.sibling,i,n))}}else if(o.master&&o.expanded){let t=this.createDetailNode(o);this.addRowNodeToRowsToDisplay(e,t,i,s)}}}}addRowNodeToRowsToDisplay(e,t,i,r,s){s?i.unshift(t):i.push(t),t.setUiLevel(e.isGroupMultiAutoColumn?0:r)}createDetailNode(e){if(tY(e.detailNode))return e.detailNode;let t=new a7(this.beans);return t.detail=!0,t.selectable=!1,t.parent=e,tY(e.id)&&(t.id="detail_"+e.id),t.data=e.data,t.level=e.level+1,e.detailNode=t,t}},d2=class extends i2{constructor(){super(...arguments),this.beanName="immutableService"}wireBeans(e){this.rowModel=e.rowModel,this.selectionService=e.selectionService}postConstruct(){t4(this.gos)&&(this.clientSideRowModel=this.rowModel,this.addManagedPropertyListener("rowData",()=>this.onRowDataUpdated()))}isActive(){let e=this.gos.exists("getRowId");return!this.gos.get("resetRowDataOnUpdate")&&e}setRowData(e){let t=this.createTransactionForRowData(e);if(!t)return;let i=this.clientSideRowModel.getNodeManager(),{rowNodeTransaction:r,rowsInserted:s}=i.updateRowData(t),a=!1;this.gos.get("suppressMaintainUnsortedOrder")||(a=i.updateRowOrderFromRowData(e)),this.clientSideRowModel.afterImmutableDataChange(r,a||s)}createTransactionForRowData(e){if(!t4(this.gos))return tB("ImmutableService only works with ClientSideRowModel"),null;let t=iw(this.gos);if(null==t)return tB("ImmutableService requires getRowId() callback to be implemented, your row data needs IDs!"),null;let i=this.clientSideRowModel.getNodeManager().getCopyOfNodesMap(),r=[],s=[],a=[];return tY(e)&&e.forEach(e=>{let r=t({data:e,level:0}),o=i[r];o?(o.data!==e&&s.push(e),i[r]=void 0):a.push(e)}),ro(i,(e,t)=>{t&&r.push(t.data)}),{remove:r,update:s,add:a}}onRowDataUpdated(){let e=this.gos.get("rowData");e&&(this.isActive()?this.setRowData(e):(this.selectionService.reset("rowDataChanged"),this.clientSideRowModel.setRowData(e)))}},d3=class extends i2{constructor(){super(...arguments),this.beanName="sortService"}wireBeans(e){this.columnModel=e.columnModel,this.funcColsService=e.funcColsService,this.rowNodeSorter=e.rowNodeSorter,this.showRowGroupColsService=e.showRowGroupColsService}sort(e,t,i,r,s,a){let o=this.gos.get("groupMaintainOrder"),n=this.columnModel.getCols().some(e=>e.isRowGroupActive()),l={};i&&r&&(l=this.calculateDirtyNodes(r));let h=this.columnModel.isPivotMode(),d=this.gos.getCallback("postSortRows");s&&s.forEachChangedNodeDepthFirst(r=>{this.pullDownGroupDataForHideOpenParents(r.childrenAfterAggFilter,!0);let c=h&&r.leafGroup;if(o&&n&&!r.leafGroup&&!a){let e=this.funcColsService.getRowGroupColumns()?.[r.level+1],t=e?.getSort()===null,i=r.childrenAfterAggFilter.slice(0);if(r.childrenAfterSort&&!t){let e={};r.childrenAfterSort.forEach((t,i)=>{e[t.id]=i}),i.sort((t,i)=>(e[t.id]??0)-(e[i.id]??0))}r.childrenAfterSort=i}else!t||c?r.childrenAfterSort=r.childrenAfterAggFilter.slice(0):i?r.childrenAfterSort=this.doDeltaSort(r,l,s,e):r.childrenAfterSort=this.rowNodeSorter.doFullSort(r.childrenAfterAggFilter,e);r.sibling&&(r.sibling.childrenAfterSort=r.childrenAfterSort),this.updateChildIndexes(r),d&&d({nodes:r.childrenAfterSort})}),this.updateGroupDataForHideOpenParents(s)}calculateDirtyNodes(e){let t={},i=e=>{e&&e.forEach(e=>t[e.id]=!0)};return e&&e.forEach(e=>{i(e.add),i(e.update),i(e.remove)}),t}doDeltaSort(e,t,i,r){let s=e.childrenAfterAggFilter,a=e.childrenAfterSort;if(!a)return this.rowNodeSorter.doFullSort(s,r);let o={},n=[];s.forEach(e=>{t[e.id]||!i.canSkip(e)?n.push(e):o[e.id]=!0});let l=a.filter(e=>o[e.id]),h=(e,t)=>({currentPos:t,rowNode:e}),d=n.map(h).sort((e,t)=>this.rowNodeSorter.compareRowNodes(r,e,t));return this.mergeSortedArrays(r,d,l.map(h)).map(({rowNode:e})=>e)}mergeSortedArrays(e,t,i){let r=[],s=0,a=0;for(;s<t.length&&a<i.length;)0>this.rowNodeSorter.compareRowNodes(e,t[s],i[a])?r.push(t[s++]):r.push(i[a++]);for(;s<t.length;)r.push(t[s++]);for(;a<i.length;)r.push(i[a++]);return r}updateChildIndexes(e){if(tK(e.childrenAfterSort))return;let t=e.childrenAfterSort;for(let i=0;i<t.length;i++){let r=t[i],s=0===i,a=i===e.childrenAfterSort.length-1;r.setFirstChild(s),r.setLastChild(a),r.setChildIndex(i)}}updateGroupDataForHideOpenParents(e){if(!this.gos.get("groupHideOpenParents"))return;if(this.gos.get("treeData"))return tO("The property hideOpenParents dose not work with Tree Data. This is because Tree Data has values at the group level, it doesn't make sense to hide them."),!1;let t=e=>{this.pullDownGroupDataForHideOpenParents(e.childrenAfterSort,!1),e.childrenAfterSort.forEach(e=>{e.hasChildren()&&t(e)})};e&&e.executeFromRootNode(e=>t(e))}pullDownGroupDataForHideOpenParents(e,t){!this.gos.get("groupHideOpenParents")||tK(e)||e.forEach(e=>{(this.showRowGroupColsService?.getShowRowGroupCols()??[]).forEach(i=>{let r=i.getColDef().showRowGroup;if("string"!=typeof r){tB("groupHideOpenParents only works when specifying specific columns for colDef.showRowGroup");return}let s=this.columnModel.getColDefCol(r);if(s!==e.rowGroupColumn){if(t)e.setGroupValue(i.getId(),void 0);else{let t=this.getFirstChildOfFirstChild(e,s);t&&e.setGroupValue(i.getId(),t.key)}}})})}getFirstChildOfFirstChild(e,t){let i=e;for(;i;){let e=i.parent;if(e&&i.firstChild){if(e.rowGroupColumn===t)return e}else break;i=e}return null}},d4=class extends i2{constructor(){super(...arguments),this.beanName="sortStage"}wireBeans(e){this.sortService=e.sortService,this.sortController=e.sortController}execute(e){let t=this.sortController.getSortOptions(),i=tY(t)&&t.length>0,r=i&&tY(e.rowNodeTransactions)&&this.gos.get("deltaSort"),s=t.some(e=>ip(this.gos)?e.column.isPrimary()&&e.column.isRowGroupActive():!!e.column.getColDef().showRowGroup);this.sortService.sort(t,i,r,e.rowNodeTransactions,e.changedPath,s)}},d6="32.2.0",d5={version:d6,moduleName:"@ag-grid-community/client-side-row-model-core",rowModel:"clientSide",beans:[dJ,d0,d4,d1,d3,d2]},d8={version:d6,moduleName:"@ag-grid-community/client-side-row-model",dependantModules:[d5,{version:d6,moduleName:"@ag-grid-community/client-side-row-model-api",beans:[d$],apiFunctions:{onGroupExpandedOrCollapsed:function(e){e.expansionService.onGroupExpandedOrCollapsed()},refreshClientSideRowModel:function(e,t){e.rowModelHelperService?.getClientSideRowModel()?.refreshModel(t)},isRowDataEmpty:function(e){return e.rowModelHelperService?.getClientSideRowModel()?.isEmpty()??!0},forEachLeafNode:function(e,t){e.rowModelHelperService?.getClientSideRowModel()?.forEachLeafNode(t)},forEachNodeAfterFilter:function(e,t){e.rowModelHelperService?.getClientSideRowModel()?.forEachNodeAfterFilter(t)},forEachNodeAfterFilterAndSort:function(e,t){e.rowModelHelperService?.getClientSideRowModel()?.forEachNodeAfterFilterAndSort(t)},resetRowHeights:function(e){if(e.columnModel.isAutoRowHeightActive()){tO("calling gridApi.resetRowHeights() makes no sense when using Auto Row Height.");return}e.rowModelHelperService?.getClientSideRowModel()?.resetRowHeights()},applyTransaction:function(e,t){return e.frameworkOverrides.wrapIncoming(()=>e.rowModelHelperService?.getClientSideRowModel()?.updateRowData(t))},applyTransactionAsync:function(e,t,i){e.frameworkOverrides.wrapIncoming(()=>e.rowModelHelperService?.getClientSideRowModel()?.batchUpdateRowData(t,i))},flushAsyncTransactions:function(e){e.frameworkOverrides.wrapIncoming(()=>e.rowModelHelperService?.getClientSideRowModel()?.flushAsyncTransactions())},getBestCostNodeSelection:function(e){return e.selectionService.getBestCostNodeSelection()}},dependantModules:[d5,dY]}]},d7=class extends i2{setBeans(e){this.beans=e}getFileName(e){let t=this.getDefaultFileExtension();return null!=e&&e.length||(e=this.getDefaultFileName()),-1===e.indexOf(".")?`${e}.${t}`:e}getData(e){let t=this.createSerializingSession(e);return this.beans.gridSerializer.serialize(t,e)}getDefaultFileName(){return`export.${this.getDefaultFileExtension()}`}},d9=class{constructor(e){this.groupColumns=[];let{columnModel:t,funcColsService:i,columnNameService:r,valueService:s,gos:a,processCellCallback:o,processHeaderCallback:n,processGroupHeaderCallback:l,processRowGroupCallback:h}=e;this.columnModel=t,this.funcColsService=i,this.columnNameService=r,this.valueService=s,this.gos=a,this.processCellCallback=o,this.processHeaderCallback=n,this.processGroupHeaderCallback=l,this.processRowGroupCallback=h}prepare(e){this.groupColumns=e.filter(e=>!!e.getColDef().showRowGroup)}extractHeaderValue(e){return this.getHeaderName(this.processHeaderCallback,e)??""}extractRowCellValue(e,t,i,r,s){let a=(!this.gos.get("groupHideOpenParents")||s.footer)&&this.shouldRenderGroupSummaryCell(s,e,t)?this.createValueForGroupNode(e,s):this.valueService.getValue(e,s);return this.processCell({accumulatedRowIndex:i,rowNode:s,column:e,value:a,processCellCallback:this.processCellCallback,type:r})}shouldRenderGroupSummaryCell(e,t,i){if(!(e&&e.group))return!1;if(-1!==this.groupColumns.indexOf(t)){if(e.groupData?.[t.getId()]!=null||t6(this.gos)&&e.group)return!0;if(e.footer&&-1===e.level){let e=t.getColDef();return null==e||!0===e.showRowGroup||e.showRowGroup===this.funcColsService.getRowGroupColumns()[0].getId()}}let r=iC(this.gos,this.columnModel.isPivotMode());return 0===i&&r}getHeaderName(e,t){return e?e(this.gos.addGridCommonParams({column:t})):this.columnNameService.getDisplayNameForColumn(t,"csv",!0)}createValueForGroupNode(e,t){if(this.processRowGroupCallback)return this.processRowGroupCallback(this.gos.addGridCommonParams({column:e,node:t}));let i=this.gos.get("treeData"),r=this.gos.get("suppressGroupMaintainValueType"),s=t=>{if(i||r)return t.key;let s=t.groupData?.[e.getId()];return s&&t.rowGroupColumn&&!1!==t.rowGroupColumn.getColDef().useValueFormatterForExport?this.valueService.formatValue(t.rowGroupColumn,t,s)??s:s},a=t.footer,o=[s(t)];if(!iy(this.gos))for(;t.parent;)o.push(s(t=t.parent));let n=o.reverse().join(" -> ");return a?`Total ${n}`:n}processCell(e){let{accumulatedRowIndex:t,rowNode:i,column:r,value:s,processCellCallback:a,type:o}=e;return a?{value:a(this.gos.addGridCommonParams({accumulatedRowIndex:t,column:r,node:i,value:s,type:o,parseValue:e=>this.valueService.parseValue(r,i,e,this.valueService.getValue(r,i)),formatValue:e=>this.valueService.formatValue(r,i,e)??e}))??""}:!1!==r.getColDef().useValueFormatterForExport?{value:s??"",valueFormatted:this.valueService.formatValue(r,i,s)}:{value:s??""}}},ce=class{static download(e,t){let i=document.defaultView||window;if(!i){tO("There is no `window` associated with the current `document`");return}let r=document.createElement("a"),s=i.URL.createObjectURL(t);r.setAttribute("href",s),r.setAttribute("download",e),r.style.display="none",document.body.appendChild(r),r.dispatchEvent(new MouseEvent("click",{bubbles:!1,cancelable:!0,view:i})),document.body.removeChild(r),i.setTimeout(()=>{i.URL.revokeObjectURL(s)},0)}},ct=class extends d9{constructor(e){super(e),this.isFirstLine=!0,this.result="";let{suppressQuotes:t,columnSeparator:i}=e;this.suppressQuotes=t,this.columnSeparator=i}addCustomContent(e){e&&("string"==typeof e?(/^\s*\n/.test(e)||this.beginNewLine(),e=e.replace(/\r?\n/g,"\r\n"),this.result+=e):e.forEach(e=>{this.beginNewLine(),e.forEach((e,t)=>{0!==t&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(e.data.value||""),e.mergeAcross&&this.appendEmptyCells(e.mergeAcross)})}))}onNewHeaderGroupingRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderGroupingRowColumn.bind(this)}}onNewHeaderGroupingRowColumn(e,t,i,r){0!=i&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(t),this.appendEmptyCells(r)}appendEmptyCells(e){for(let t=1;t<=e;t++)this.result+=this.columnSeparator+this.putInQuotes("")}onNewHeaderRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderRowColumn.bind(this)}}onNewHeaderRowColumn(e,t){0!=t&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(this.extractHeaderValue(e))}onNewBodyRow(){return this.beginNewLine(),{onColumn:this.onNewBodyRowColumn.bind(this)}}onNewBodyRowColumn(e,t,i){0!=t&&(this.result+=this.columnSeparator);let r=this.extractRowCellValue(e,t,t,"csv",i);this.result+=this.putInQuotes(r.valueFormatted??r.value)}putInQuotes(e){let t;return this.suppressQuotes?e:null==e?'""':("string"==typeof e?t=e:"function"==typeof e.toString?t=e.toString():(tO("unknown value type during csv conversion"),t=""),'"'+t.replace(/"/g,'""')+'"')}parse(){return this.result}beginNewLine(){this.isFirstLine||(this.result+="\r\n"),this.isFirstLine=!1}},ci=class extends d7{constructor(){super(...arguments),this.beanName="csvCreator"}wireBeans(e){this.columnModel=e.columnModel,this.columnNameService=e.columnNameService,this.funcColsService=e.funcColsService,this.valueService=e.valueService,this.gridSerializer=e.gridSerializer}postConstruct(){this.setBeans({gridSerializer:this.gridSerializer,gos:this.gos})}getMergedParams(e){return Object.assign({},this.gos.get("defaultCsvExportParams"),e)}export(e){if(this.isExportSuppressed()){tO("Export cancelled. Export is not allowed as per your configuration.");return}let t=this.getMergedParams(e),i=new Blob(["\uFEFF",this.getData(t)],{type:"text/plain"}),r="function"==typeof t.fileName?t.fileName(this.gos.getGridCommonParams()):t.fileName;ce.download(this.getFileName(r),i)}exportDataAsCsv(e){this.export(e)}getDataAsCsv(e,t=!1){let i=t?Object.assign({},e):this.getMergedParams(e);return this.getData(i)}getDefaultFileExtension(){return"csv"}createSerializingSession(e){let{columnModel:t,columnNameService:i,funcColsService:r,valueService:s,gos:a}=this,{processCellCallback:o,processHeaderCallback:n,processGroupHeaderCallback:l,processRowGroupCallback:h,suppressQuotes:d,columnSeparator:c}=e;return new ct({columnModel:t,columnNameService:i,funcColsService:r,valueService:s,gos:a,processCellCallback:o||void 0,processHeaderCallback:n||void 0,processGroupHeaderCallback:l||void 0,processRowGroupCallback:h||void 0,suppressQuotes:d||!1,columnSeparator:c||","})}isExportSuppressed(){return this.gos.get("suppressCsvExport")}},cr=((b=cr||{})[b.HEADER_GROUPING=0]="HEADER_GROUPING",b[b.HEADER=1]="HEADER",b[b.BODY=2]="BODY",b),cs=class extends i2{constructor(){super(...arguments),this.beanName="gridSerializer"}wireBeans(e){this.visibleColsService=e.visibleColsService,this.columnModel=e.columnModel,this.columnNameService=e.columnNameService,this.rowModel=e.rowModel,this.pinnedRowModel=e.pinnedRowModel,this.selectionService=e.selectionService,this.rowNodeSorter=e.rowNodeSorter,this.sortController=e.sortController}serialize(e,t={}){let{allColumns:i,columnKeys:r,skipRowGroups:s}=t,a=this.getColumnsToExport(i,s,r);return tW(this.prepareSession(a),this.prependContent(t),this.exportColumnGroups(t,a),this.exportHeaders(t,a),this.processPinnedTopRows(t,a),this.processRows(t,a),this.processPinnedBottomRows(t,a),this.appendContent(t))(e).parse()}processRow(e,t,i,r){let s=t.shouldRowBeSkipped||(()=>!1),a=this.gos.get("groupRemoveSingleChildren"),o=this.gos.get("groupRemoveLowestSingleChildren"),n=null!=t.rowPositions||!!t.onlySelected,l=this.gos.get("groupHideOpenParents")&&!n,h=this.columnModel.isPivotMode()?r.leafGroup:!r.group,d=!!r.footer,c=o&&r.leafGroup,u=1===r.allChildrenCount&&r.childrenAfterGroup?.length===1&&(a||c);if(!h&&!d&&(t.skipRowGroups||u||l)||t.onlySelected&&!r.isSelected()||t.skipPinnedTop&&"top"===r.rowPinned||t.skipPinnedBottom&&"bottom"===r.rowPinned||-1===r.level&&!h&&!d||s(this.gos.addGridCommonParams({node:r})))return;let p=e.onNewBodyRow(r);if(i.forEach((e,t)=>{p.onColumn(e,t,r)}),t.getCustomContentBelowRow){let i=t.getCustomContentBelowRow(this.gos.addGridCommonParams({node:r}));i&&e.addCustomContent(i)}}appendContent(e){return t=>{let i=e.appendContent;return i&&t.addCustomContent(i),t}}prependContent(e){return t=>{let i=e.prependContent;return i&&t.addCustomContent(i),t}}prepareSession(e){return t=>(t.prepare(e),t)}exportColumnGroups(e,t){return i=>{if(!e.skipColumnGroupHeaders){let r=new rG,s=this.visibleColsService.createGroups({columns:t,idCreator:r,pinned:null,isStandaloneStructure:!0});this.recursivelyAddHeaderGroups(s,i,e.processGroupHeaderCallback)}return i}}exportHeaders(e,t){return i=>{if(!e.skipColumnHeaders){let e=i.onNewHeaderRow();t.forEach((t,i)=>{e.onColumn(t,i,void 0)})}return i}}processPinnedTopRows(e,t){return i=>{let r=this.processRow.bind(this,i,e,t);return e.rowPositions?e.rowPositions.filter(e=>"top"===e.rowPinned).sort((e,t)=>e.rowIndex-t.rowIndex).map(e=>this.pinnedRowModel.getPinnedTopRow(e.rowIndex)).forEach(r):this.pinnedRowModel.forEachPinnedRow("top",r),i}}processRows(e,t){return i=>{let r=this.rowModel,s=t4(this.gos),a=t6(this.gos),o=!s&&e.onlySelected,n=this.processRow.bind(this,i,e,t),{exportedRows:l="filteredAndSorted"}=e;if(e.rowPositions)e.rowPositions.filter(e=>null==e.rowPinned).sort((e,t)=>e.rowIndex-t.rowIndex).map(e=>r.getRow(e.rowIndex)).forEach(n);else if(this.columnModel.isPivotMode())s?r.forEachPivotNode(n,!0):a?r.forEachNodeAfterFilterAndSort(n,!0):r.forEachNode(n);else if(e.onlySelectedAllPages||o){let e=this.selectionService.getSelectedNodes();this.replicateSortedOrder(e),e.forEach(n)}else"all"===l?r.forEachNode(n):s?r.forEachNodeAfterFilterAndSort(n,!0):a?r.forEachNodeAfterFilterAndSort(n,!0):r.forEachNode(n);return i}}replicateSortedOrder(e){let t=this.sortController.getSortOptions(),i=(e,r)=>null!=e.rowIndex&&null!=r.rowIndex?e.rowIndex-r.rowIndex:e.level===r.level?e.parent?.id===r.parent?.id?this.rowNodeSorter.compareRowNodes(t,{rowNode:e,currentPos:e.rowIndex??-1},{rowNode:r,currentPos:r.rowIndex??-1}):i(e.parent,r.parent):e.level>r.level?i(e.parent,r):i(e,r.parent);e.sort(i)}processPinnedBottomRows(e,t){return i=>{let r=this.processRow.bind(this,i,e,t);return e.rowPositions?e.rowPositions.filter(e=>"bottom"===e.rowPinned).sort((e,t)=>e.rowIndex-t.rowIndex).map(e=>this.pinnedRowModel.getPinnedBottomRow(e.rowIndex)).forEach(r):this.pinnedRowModel.forEachPinnedRow("bottom",r),i}}getColumnsToExport(e=!1,t=!1,i){let r=this.columnModel.isPivotMode();if(i&&i.length)return this.columnModel.getColsForKeys(i);let s=this.gos.get("treeData"),a=[];return a=e&&!r?this.columnModel.getCols():this.visibleColsService.getAllCols(),t&&!s&&(a=a.filter(e=>rt(e)||ri(e))),a}recursivelyAddHeaderGroups(e,t,i){let r=[];e.forEach(e=>{e.getChildren&&e.getChildren().forEach(e=>r.push(e))}),e.length>0&&rO(e[0])&&this.doAddHeaderHeader(t,e,i),r&&r.length>0&&this.recursivelyAddHeaderGroups(r,t,i)}doAddHeaderHeader(e,t,i){let r=e.onNewHeaderGroupingRow(),s=0;t.forEach(e=>{let t;t=i?i(this.gos.addGridCommonParams({columnGroup:e})):this.columnNameService.getDisplayNameForColumnGroup(e,"header");let a=e.getLeafColumns().reduce((e,t,i,r)=>{let s=iB(e);return"open"===t.getColumnGroupShow()?s&&null==s[1]||(s=[i],e.push(s)):s&&null==s[1]&&(s[1]=i-1),i===r.length-1&&s&&null==s[1]&&(s[1]=i),e},[]);r.onColumn(e,t||"",s++,e.getLeafColumns().length-1,a)})}},ca="32.2.0",co={version:ca,moduleName:"@ag-grid-community/csv-export-core",beans:[ci,cs]},cn={version:ca,moduleName:"@ag-grid-community/csv-export",dependantModules:[co,{version:ca,moduleName:"@ag-grid-community/csv-export-api",apiFunctions:{getDataAsCsv:function(e,t){return e.csvCreator?.getDataAsCsv(t)},exportDataAsCsv:function(e,t){e.csvCreator?.exportDataAsCsv(t)}},dependantModules:[co]}]};function cl(e,t,i){if(!t&&""!==t&&0!==t)return"";let r=t;return"boolean"==typeof t&&i&&(r=i(t)),` ${e}="${r}"`}var ch=class{static createHeader(e={}){let t=["version"];e.version||(e.version="1.0"),e.encoding&&t.push("encoding"),e.standalone&&t.push("standalone");let i=t.map(t=>`${t}="${e[t]}"`).join(" ");return`<?xml ${i} ?>`}static createXml(e,t){let i="";e.properties&&(e.properties.prefixedAttributes&&e.properties.prefixedAttributes.forEach(e=>{Object.keys(e.map).forEach(r=>{i+=cl(e.prefix+r,e.map[r],t)})}),e.properties.rawMap&&Object.keys(e.properties.rawMap).forEach(r=>{i+=cl(r,e.properties.rawMap[r],t)}));let r="<"+e.name+i;return e.children||null!=e.textNode?null!=e.textNode?r+">"+e.textNode+"</"+e.name+">\r\n":(r+=">\r\n",e.children&&e.children.forEach(e=>{r+=this.createXml(e,t)}),r+"</"+e.name+">\r\n"):r+"/>\r\n"}},cd=async e=>{let t=0,i=[],r=new WritableStream({write:e=>{i.push(e),t+=e.length}}),s=new ReadableStream({start:t=>{let i=new FileReader;i.onload=e=>{e.target?.result&&t.enqueue(e.target.result),t.close()},i.readAsArrayBuffer(e)}}),a=new window.CompressionStream("deflate-raw");return await s.pipeThrough(a).pipeTo(r),{size:t,content:new Blob(i)}},cc=async e=>{let t=new Blob([e]),{size:i,content:r}=await cd(t);return{size:i,content:new Uint8Array(await r.arrayBuffer())}},cu=e=>{let t=e.getHours();return t<<=6,t|=e.getMinutes(),t<<=5,t|=e.getSeconds()/2},cp=e=>{let t=e.getFullYear()-1980;return t<<=4,t|=e.getMonth()+1,t<<=5,t|=e.getDate()};function cg(e,t){let i="";for(let r=0;r<t;r++)i+=String.fromCharCode(255&e),e>>>=8;return i}var cm=e=>{if(!e.length)return 0;let t=-1,i=0;for(let r=0;r<e.length;r++)i=cv[(t^e[r])&255],t=t>>>8^i;return -1^t},cf=e=>e.length?"string"==typeof e?cm(new TextEncoder().encode(e)):cm(e):0,cv=new Uint32Array([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]),cy=(e,t,i,r,s,a)=>{let{content:o,path:n,created:l}=e,h=cu(l),d=cp(l),c=cf(s),u=void 0!==a?a:r,p=function(e){let t=String.fromCharCode;function i(e,i){return t(e>>i&63|128)}let r=function(e){let t,i;let r=[];if(!e)return[];let s=e.length,a=0;for(;a<s;)(t=e.charCodeAt(a++))>=55296&&t<=56319&&a<s?(64512&(i=e.charCodeAt(a++)))==56320?r.push(((1023&t)<<10)+(1023&i)+65536):(r.push(t),a--):r.push(t);return r}(e),s=r.length,a=-1,o="";for(;++a<s;)o+=function(e){if((4294967168&e)==0)return t(e);let r="";return(4294965248&e)==0?r=t(e>>6&31|192):(4294901760&e)==0?(function(e){if(e>=55296&&e<=57343)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value")}(e),r=t(e>>12&15|224)+i(e,6)):(4292870144&e)==0&&(r=t(e>>18&7|240)+i(e,12)+i(e,6)),r+=t(63&e|128)}(r[a]);return o}(n),g=p!==n,m="";if(g){let e=cg(1,1)+cg(cf(p),4)+p;m="up"+cg(e.length,2)+e}let f="\x14\0"+(g?"\0\b":"\0\0")+cg(t?8:0,2)+cg(h,2)+cg(d,2)+cg(u?c:0,4)+cg(a??r,4)+cg(r,4)+cg(p.length,2)+cg(m.length,2),v="PK\x03\x04"+f+p+m,y="PK\x01\x02\x14\0"+f+"\0\0\0\0\0\0"+(o?"\0\0\0\0":"\x10\0\0\0")+cg(i,4)+p+m;return{localFileHeader:Uint8Array.from(v,e=>e.charCodeAt(0)),centralDirectoryHeader:Uint8Array.from(y,e=>e.charCodeAt(0))}},cC=e=>{let t;if("string"==typeof e){let i=atob(e.split(";base64,")[1]);t=Uint8Array.from(i,e=>e.charCodeAt(0))}else t=e;return{size:t.length,content:t}},cw=async(e,t)=>{let i,r;let{content:s}=e,{size:a,content:o}=s?cC(s):{size:0,content:Uint8Array.from([])},n=!1;if("file"===e.type&&o&&a>0){let e=await cc(o);i=e.content,r=e.size,n=!0}return{...cy(e,n,t,a,o,r),content:i||o,isCompressed:n}},cb=(e,t)=>{let{content:i}=e,{content:r}=i?cC(i):{content:Uint8Array.from([])};return{...cy(e,!1,t,r.length,r,void 0),content:r,isCompressed:!1}},cS=(e,t,i)=>{let r="PK\x05\x06\0\0\0\0"+cg(e,2)+cg(e,2)+cg(t,4)+cg(i,4)+"\0\0";return Uint8Array.from(r,e=>e.charCodeAt(0))},cx=class{static addFolders(e){e.forEach(this.addFolder.bind(this))}static addFolder(e){this.folders.push({path:e,created:new Date,isBase64:!1,type:"folder"})}static addFile(e,t,i=!1){this.files.push({path:e,created:new Date,content:i?t:new TextEncoder().encode(t),isBase64:i,type:"file"})}static async getZipFile(e="application/zip"){let t=await this.buildCompressedFileStream();return this.clearStream(),new Blob([t],{type:e})}static getUncompressedZipFile(e="application/zip"){let t=this.buildFileStream();return this.clearStream(),new Blob([t],{type:e})}static clearStream(){this.folders=[],this.files=[]}static packageFiles(e){let t=0,i=0;for(let r of e){let{localFileHeader:e,centralDirectoryHeader:s,content:a}=r;t+=e.length+a.length,i+=s.length}let r=new Uint8Array(t),s=new Uint8Array(i),a=0,o=0;for(let t of e){let{localFileHeader:e,centralDirectoryHeader:i,content:n}=t;r.set(e,a),a+=e.length,r.set(n,a),a+=n.length,s.set(i,o),o+=i.length}let n=cS(e.length,i,t),l=new Uint8Array(r.length+s.length+n.length);return l.set(r),l.set(s,r.length),l.set(n,r.length+s.length),l}static async buildCompressedFileStream(){let e=[...this.folders,...this.files],t=[],i=0;for(let r of e){let e=await cw(r,i),{localFileHeader:s,content:a}=e;t.push(e),i+=s.length+a.length}return this.packageFiles(t)}static buildFileStream(){let e=[...this.folders,...this.files],t=[],i=0;for(let r of e){let e=cb(r,i),{localFileHeader:s,content:a}=e;t.push(e),i+=s.length+a.length}return this.packageFiles(t)}};cx.folders=[],cx.files=[];var cM=class extends hr{wireBeans(e){this.beans=e}constructor(e,t,i){super(e),this.parentCache=t,this.params=i,this.startRow=e*i.blockSize,this.endRow=this.startRow+i.blockSize}postConstruct(){this.createRowNodes()}getBlockStateJson(){return{id:""+this.getId(),state:{blockNumber:this.getId(),startRow:this.getStartRow(),endRow:this.getEndRow(),pageStatus:this.getState()}}}setDataAndId(e,t,i){tY(t)?e.setDataAndId(t,i.toString()):e.setDataAndId(void 0,void 0)}loadFromDatasource(){let e=this.createLoadParams();if(tK(this.params.datasource.getRows)){tO("datasource is missing getRows method");return}window.setTimeout(()=>{this.params.datasource.getRows(e)},0)}processServerFail(){}createLoadParams(){return{startRow:this.getStartRow(),endRow:this.getEndRow(),successCallback:this.pageLoaded.bind(this,this.getVersion()),failCallback:this.pageLoadFailed.bind(this,this.getVersion()),sortModel:this.params.sortModel,filterModel:this.params.filterModel,context:this.gos.getGridCommonParams().context}}forEachNode(e,t,i){this.rowNodes.forEach((r,s)=>{this.startRow+s<i&&e(r,t.next())})}getLastAccessed(){return this.lastAccessed}getRow(e,t=!1){t||(this.lastAccessed=this.params.lastAccessedSequence.next());let i=e-this.startRow;return this.rowNodes[i]}getStartRow(){return this.startRow}getEndRow(){return this.endRow}createRowNodes(){this.rowNodes=[];for(let e=0;e<this.params.blockSize;e++){let t=this.startRow+e,i=new a7(this.beans);i.setRowHeight(this.params.rowHeight),i.uiLevel=0,i.setRowIndex(t),i.setRowTop(this.params.rowHeight*t),this.rowNodes.push(i)}}processServerResult(e){this.rowNodes.forEach((t,i)=>{let r=e.rowData?e.rowData[i]:void 0;!t.id&&t.alreadyRendered&&r&&(this.rowNodes[i]=new a7(this.beans),this.rowNodes[i].setRowIndex(t.rowIndex),this.rowNodes[i].setRowTop(t.rowTop),this.rowNodes[i].setRowHeight(t.rowHeight),t.clearRowTopAndRowIndex()),this.setDataAndId(this.rowNodes[i],r,this.startRow+i)});let t=null!=e.rowCount&&e.rowCount>=0?e.rowCount:void 0;this.parentCache.pageLoaded(this,t)}destroy(){this.rowNodes.forEach(e=>{e.clearRowTopAndRowIndex()}),super.destroy()}},cE=class extends i2{constructor(e){super(),this.lastRowIndexKnown=!1,this.blocks={},this.blockCount=0,this.rowCount=e.initialRowCount,this.params=e}wireBeans(e){this.rowRenderer=e.rowRenderer,this.focusService=e.focusService}getRow(e,t=!1){let i=Math.floor(e/this.params.blockSize),r=this.blocks[i];if(!r){if(t)return;r=this.createBlock(i)}return r.getRow(e)}createBlock(e){let t=this.createBean(new cM(e,this,this.params));return this.blocks[t.getId()]=t,this.blockCount++,this.purgeBlocksIfNeeded(t),this.params.rowNodeBlockLoader.addBlock(t),t}refreshCache(){if(0==this.blockCount){this.purgeCache();return}this.getBlocksInOrder().forEach(e=>e.setStateWaitingToLoad()),this.params.rowNodeBlockLoader.checkBlockToLoad()}destroy(){this.getBlocksInOrder().forEach(e=>this.destroyBlock(e)),super.destroy()}getRowCount(){return this.rowCount}isLastRowIndexKnown(){return this.lastRowIndexKnown}pageLoaded(e,t){this.isAlive()&&(this.gos.get("debug")&&tN(`InfiniteCache - onPageLoaded: page = ${e.getId()}, lastRow = ${t}`),this.checkRowCount(e,t),this.onCacheUpdated())}purgeBlocksIfNeeded(e){let t=this.getBlocksInOrder().filter(t=>t!=e);t.sort((e,t)=>t.getLastAccessed()-e.getLastAccessed());let i=this.params.maxBlocksInCache>0,r=i?this.params.maxBlocksInCache-1:null;t.forEach((e,t)=>{("needsLoading"===e.getState()&&t>=1||i&&t>=r)&&!(this.isBlockCurrentlyDisplayed(e)||this.isBlockFocused(e))&&this.removeBlockFromCache(e)})}isBlockFocused(e){let t=this.focusService.getFocusCellToUseAfterRefresh();if(!t||null!=t.rowPinned)return!1;let i=e.getStartRow(),r=e.getEndRow();return t.rowIndex>=i&&t.rowIndex<r}isBlockCurrentlyDisplayed(e){let t=e.getStartRow(),i=e.getEndRow()-1;return this.rowRenderer.isRangeInRenderedViewport(t,i)}removeBlockFromCache(e){e&&this.destroyBlock(e)}checkRowCount(e,t){if("number"==typeof t&&t>=0)this.rowCount=t,this.lastRowIndexKnown=!0;else if(!this.lastRowIndexKnown){let t=(e.getId()+1)*this.params.blockSize+this.params.overflowSize;this.rowCount<t&&(this.rowCount=t)}}setRowCount(e,t){this.rowCount=e,tY(t)&&(this.lastRowIndexKnown=t),!this.lastRowIndexKnown&&this.rowCount%this.params.blockSize==0&&this.rowCount++,this.onCacheUpdated()}forEachNodeDeep(e){let t=new sK;this.getBlocksInOrder().forEach(i=>i.forEachNode(e,t,this.rowCount))}getBlocksInOrder(){return rh(this.blocks).sort((e,t)=>e.getId()-t.getId())}destroyBlock(e){delete this.blocks[e.getId()],this.destroyBean(e),this.blockCount--,this.params.rowNodeBlockLoader.removeBlock(e)}onCacheUpdated(){this.isAlive()&&(this.destroyAllBlocksPastVirtualRowCount(),this.eventService.dispatchEvent({type:"storeUpdated"}))}destroyAllBlocksPastVirtualRowCount(){let e=[];this.getBlocksInOrder().forEach(t=>{t.getId()*this.params.blockSize>=this.rowCount&&e.push(t)}),e.length>0&&e.forEach(e=>this.destroyBlock(e))}purgeCache(){this.getBlocksInOrder().forEach(e=>this.removeBlockFromCache(e)),this.lastRowIndexKnown=!1,0===this.rowCount&&(this.rowCount=this.params.initialRowCount),this.onCacheUpdated()}getRowNodesInRange(e,t){let i=[],r=-1,s=!1,a=new sK,o=!1;return this.getBlocksInOrder().forEach(n=>{if(!o){if(s&&r+1!==n.getId()){o=!0;return}r=n.getId(),n.forEachNode(r=>{let a=r===e||r===t;(s||a)&&i.push(r),a&&(s=!s)},a,this.rowCount)}}),o||s?[]:i}},cD=class extends i2{constructor(){super(...arguments),this.beanName="rowModel"}wireBeans(e){this.filterManager=e.filterManager,this.sortController=e.sortController,this.selectionService=e.selectionService,this.rowRenderer=e.rowRenderer,this.rowNodeBlockLoader=e.rowNodeBlockLoader}getRowBounds(e){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*e}}ensureRowHeightsValid(){return!1}postConstruct(){"infinite"===this.gos.get("rowModelType")&&(this.rowHeight=it(this.gos),this.addEventListeners(),this.addDestroyFunc(()=>this.destroyCache()),this.verifyProps())}verifyProps(){this.gos.exists("initialGroupOrderComparator")&&tO("initialGroupOrderComparator cannot be used with Infinite Row Model as sorting is done on the server side")}start(){this.setDatasource(this.gos.get("datasource"))}destroy(){this.destroyDatasource(),super.destroy()}destroyDatasource(){this.datasource&&(this.destroyBean(this.datasource),this.rowRenderer.datasourceChanged(),this.datasource=null)}addEventListeners(){this.addManagedEventListeners({filterChanged:this.onFilterChanged.bind(this),sortChanged:this.onSortChanged.bind(this),newColumnsLoaded:this.onColumnEverything.bind(this),storeUpdated:this.onCacheUpdated.bind(this)}),this.addManagedPropertyListener("datasource",()=>this.setDatasource(this.gos.get("datasource"))),this.addManagedPropertyListener("cacheBlockSize",()=>this.resetCache()),this.addManagedPropertyListener("rowHeight",()=>{this.rowHeight=it(this.gos),this.cacheParams.rowHeight=this.rowHeight,this.updateRowHeights()})}onFilterChanged(){this.reset()}onSortChanged(){this.reset()}onColumnEverything(){(!this.cacheParams||this.isSortModelDifferent())&&this.reset()}isSortModelDifferent(){return!t0(this.cacheParams.sortModel,this.sortController.getSortModel())}getType(){return"infinite"}setDatasource(e){this.destroyDatasource(),this.datasource=e,e&&this.reset()}isEmpty(){return!this.infiniteCache}isRowsToRender(){return!!this.infiniteCache}getNodesInRangeForSelection(e,t){return this.infiniteCache?this.infiniteCache.getRowNodesInRange(e,t):[]}reset(){this.datasource&&(null!=iw(this.gos)||this.selectionService.reset("rowDataChanged"),this.resetCache())}dispatchModelUpdatedEvent(){this.eventService.dispatchEvent({type:"modelUpdated",newPage:!1,newPageSize:!1,newData:!1,keepRenderedRows:!0,animate:!1})}resetCache(){this.destroyCache(),this.cacheParams={datasource:this.datasource,filterModel:this.filterManager?.getFilterModel()??{},sortModel:this.sortController.getSortModel(),rowNodeBlockLoader:this.rowNodeBlockLoader,initialRowCount:this.gos.get("infiniteInitialRowCount"),maxBlocksInCache:this.gos.get("maxBlocksInCache"),rowHeight:it(this.gos),overflowSize:this.gos.get("cacheOverflowSize"),blockSize:this.gos.get("cacheBlockSize"),lastAccessedSequence:new sK},this.infiniteCache=this.createBean(new cE(this.cacheParams)),this.eventService.dispatchEventOnce({type:"rowCountReady"}),this.dispatchModelUpdatedEvent()}updateRowHeights(){this.forEachNode(e=>{e.setRowHeight(this.rowHeight),e.setRowTop(this.rowHeight*e.rowIndex)}),this.dispatchModelUpdatedEvent()}destroyCache(){this.infiniteCache&&(this.infiniteCache=this.destroyBean(this.infiniteCache))}onCacheUpdated(){this.dispatchModelUpdatedEvent()}getRow(e){if(!(!this.infiniteCache||e>=this.infiniteCache.getRowCount()))return this.infiniteCache.getRow(e)}getRowNode(e){let t;return this.forEachNode(i=>{i.id===e&&(t=i)}),t}forEachNode(e){this.infiniteCache&&this.infiniteCache.forEachNodeDeep(e)}getTopLevelRowCount(){return this.getRowCount()}getTopLevelRowDisplayedIndex(e){return e}getRowIndexAtPixel(e){if(0!==this.rowHeight){let t=Math.floor(e/this.rowHeight),i=this.getRowCount()-1;return t>i?i:t}return 0}getRowCount(){return this.infiniteCache?this.infiniteCache.getRowCount():0}isRowPresent(e){return!!this.getRowNode(e.id)}refreshCache(){this.infiniteCache&&this.infiniteCache.refreshCache()}purgeCache(){this.infiniteCache&&this.infiniteCache.purgeCache()}isLastRowIndexKnown(){return!!this.infiniteCache&&this.infiniteCache.isLastRowIndexKnown()}setRowCount(e,t){this.infiniteCache&&this.infiniteCache.setRowCount(e,t)}},cI="32.2.0",ck={version:cI,moduleName:"@ag-grid-community/infinite-row-model-core",rowModel:"infinite",beans:[cD],dependantModules:[hs]},cT={version:cI,moduleName:"@ag-grid-community/infinite-row-model",dependantModules:[ck,{version:cI,moduleName:"@ag-grid-community/infinite-row-model-api",beans:[d$],apiFunctions:{refreshInfiniteCache:function(e){e.rowModelHelperService?.getInfiniteRowModel()?.refreshCache()},purgeInfiniteCache:function(e){e.rowModelHelperService?.getInfiniteRowModel()?.purgeCache()},getInfiniteRowCount:function(e){return e.rowModelHelperService?.getInfiniteRowModel()?.getRowCount()}},dependantModules:[ck,dK]}]},cA=0,cR=class e{constructor(e,t,i={},r=[]){this.feature=e,this.variant=t,this.defaults=i,this.css=r}get id(){return this.feature?`${this.feature}/${this.variant}`:this.variant}withParams(t){let i={...this.defaults};for(let[e,r]of Object.entries(t))null!=r&&(i[e]=r);return new e(this.feature,this.variant,i,this.css)}withAdditionalParams(e){return this.withParams(e)}withCSS(t){return new e(this.feature,this.variant,this.defaults,this.css.concat(t))}},cL=':where([class^=ag-]){box-sizing:border-box;outline:none;&:after,&:before,&:focus,&:focus-within{box-sizing:border-box;outline:none}&:where(button){background:none;border:none;color:inherit;cursor:pointer;font-family:inherit;font-size:inherit;line-height:inherit;margin:0;padding:0}&:where(button){font-weight:inherit}&::-ms-clear{display:none}}.ag-aria-description-container{border:0;z-index:9999;clip:rect(1px,1px,1px,1px);height:1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.ag-hidden{display:none!important}.ag-invisible{visibility:hidden!important}.ag-unselectable{-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-selectable{-webkit-user-select:text;-moz-user-select:text;user-select:text}.ag-tab-guard{display:block;height:0;position:absolute;width:0}.ag-virtual-list-viewport .ag-tab-guard{position:sticky}.ag-tab-guard-top{top:1px}.ag-tab-guard-bottom{bottom:1px}.ag-shake-left-to-right{animation-direction:alternate;animation-duration:.2s;animation-iteration-count:infinite;animation-name:ag-shake-left-to-right}@keyframes ag-shake-left-to-right{0%{padding-left:6px;padding-right:2px}to{padding-left:2px;padding-right:6px}}.ag-watermark{bottom:20px;color:#9b9b9b;opacity:.7;position:absolute;right:25px;transition:opacity 1s ease-out 3s;&:before{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMDkiIGhlaWdodD0iMzYiIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAyMDkgMzYiPjxwYXRoIGZpbGw9IiM5QjlCOUIiIGQ9Ik0xOTIuOTkzIDIzLjY1OHYtNy45NDZoLTEzLjU0MWwtNy45NDcgNy45NDZ6TTIwOC4yNSAzLjk1aC0xNi45NzRsLTguMDEgNy45NDdoMjQuOTg0ek0xNjMuNjIyIDMxLjYwNWw0LjA2OS00LjA2OWgxMy43MzJ2Ny45NDdoLTE3LjgwMXoiLz48cGF0aCBmaWxsPSIjOUI5QjlCIiBkPSJNMTY2LjYxIDE5Ljc4aDguNzczbDguMDEtNy45NDZIMTY2LjYxek0xNTcuMDExIDMxLjYwNWg2LjYxMWw3Ljg4My03Ljk0N2gtMTQuNDk0ek0xOTEuMjc2IDMuOTVsLTQuMDY4IDQuMDdIMTYxLjI3Vi4wNzJoMzAuMDA2ek0yMC44NCAzMC4yMDZIOC4zNzhsLTIuMTYyIDUuMzRILjc1TDEyLjI1NyA4LjU5Mmg0Ljc2OEwyOC41MyAzNS41NDZoLTUuNTN6bS0xLjcxNy00LjI2TDE0LjYwOSAxNC45NWwtNC41MTQgMTAuOTk4ek0xMDQuNDM3IDE4LjUwOWMxLjU4OS0yLjM1MiA1LjU5NC0yLjYwNyA3LjI0Ny0yLjYwN3Y0LjU3OGMtMi4wMzQgMC00LjA2OS4wNjMtNS4yNzcuOTUzLTEuMjA3Ljg5LTEuODQzIDIuMDk4LTEuODQzIDMuNTZ2MTAuNTUzaC00Ljk1OVYxNS45MDJoNC43Njh6TTExOS4zNzYgMTUuOTAyaC00Ljk1OHYxOS42NDRoNC45NTh6TTExOS4zNzYgNy4xM2gtNC45NTh2NS44NDhoNC45NTh6TTE0My45NzkgNy4xM3YyOC40MTZoLTQuNzY4bC0uMTI3LTIuOTg4YTguMyA4LjMgMCAwIDEtMi42NyAyLjQ4Yy0xLjA4MS41NzItMi40MTYuODktMy45NDIuODktMS4zMzUgMC0yLjYwNi0uMjU1LTMuNjg3LS43LTEuMTQ0LS41MDgtMi4xNjItMS4xNDQtMi45ODgtMi4wMzRhOS42IDkuNiAwIDAgMS0xLjk3MS0zLjE3OWMtLjUwOC0xLjIwNy0uNjk5LTIuNjA2LS42OTktNC4xMzJzLjI1NC0yLjkyNC42OTktNC4xOTZjLjUwOS0xLjI3MSAxLjE0NS0yLjM1MiAxLjk3MS0zLjI0MnMxLjg0NC0xLjU4OSAyLjk4OC0yLjA5OCAyLjM1Mi0uNzYzIDMuNjg3LS43NjNjMS41MjYgMCAyLjc5Ny4yNTUgMy44NzguODI3czEuOTcxIDEuMzM1IDIuNjcgMi40MTZWNy4xOTNoNC45NTl6bS0xMC40MjYgMjQuNTM4YzEuNjUzIDAgMi45MjQtLjU3MiAzLjk0MS0xLjY1M3MxLjUyNi0yLjU0MyAxLjUyNi00LjMyMy0uNTA5LTMuMTc4LTEuNTI2LTQuMzIyYy0xLjAxNy0xLjA4MS0yLjI4OC0xLjY1My0zLjk0MS0xLjY1My0xLjU5IDAtMi45MjUuNTcyLTMuODc4IDEuNjUzLTEuMDE3IDEuMDgtMS41MjYgMi41NDMtMS41MjYgNC4zMjIgMCAxLjc4LjUwOSAzLjE4IDEuNTI2IDQuMjYgMS4wMTcgMS4xNDQgMi4yODggMS43MTYgMy44NzggMS43MTZNNTcuMjAyIDIwLjM1M0g0NC45MzN2NC4yNTloNi45OTNjLS4xOSAyLjE2MS0xLjAxNyAzLjgxNC0yLjQxNiA1LjE1LTEuMzk4IDEuMjctMy4xNzggMS45MDYtNS40NjcgMS45MDYtMS4yNzEgMC0yLjQ4LS4yNTQtMy40OTYtLjY5OWE3IDcgMCAwIDEtMi43MzQtMS45N2MtLjc2My0uODI3LTEuMzM1LTEuODQ0LTEuNzgtMy4wNTJzLS42MzYtMi40OC0uNjM2LTMuOTQyLjE5LTIuNzMzLjYzNi0zLjk0MWMuMzgxLTEuMjA4IDEuMDE3LTIuMTYyIDEuNzgtMy4wNTIuNzYzLS44MjYgMS42NTMtMS40NjIgMi43MzMtMS45N2E5LjEgOS4xIDAgMCAxIDMuNTYtLjdxNC4wMDUgMCA2LjEwMyAxLjkwN2wzLjMwNi0zLjMwNWMtMi40OC0xLjkwNy01LjY1OC0yLjkyNS05LjQwOS0yLjkyNS0yLjA5NyAwLTQuMDA0LjMxOC01LjcyMSAxLjAxOC0xLjcxNi42OTktMy4xNzkgMS41ODktNC4zODYgMi43OTdBMTIuMSAxMi4xIDAgMCAwIDMxLjIgMTYuMjJjLS42MzUgMS43MTctLjk1MyAzLjYyNC0uOTUzIDUuNjU4cy4zMTggMy45NDIgMS4wMTcgNS42NThjLjcgMS43MTcgMS41OSAzLjE3OSAyLjc5NyA0LjM4N2ExMi4xIDEyLjEgMCAwIDAgNC4zODcgMi43OTdjMS43MTYuNyAzLjYyMyAxLjAxNyA1LjY1NyAxLjAxNyAyLjAzNSAwIDMuODc4LS4zMTggNS41MzEtMS4wMTcgMS42NTMtLjcgMy4wNTItMS41OSA0LjE5Ni0yLjc5N3ExLjcxNi0xLjgxMiAyLjY3LTQuMzg3Yy42MzYtMS43MTYuOTU0LTMuNjIzLjk1NC01LjY1OHYtLjgyNmMtLjE5MS0uMTI3LS4yNTUtLjQ0NS0uMjU1LS43TTk1Ljk4MiAyMC4zNTNoLTEyLjI3djQuMjU5aDYuOTkzYy0uMTkgMi4xNjEtMS4wMTcgMy44MTQtMi40MTYgNS4xNS0xLjM5OCAxLjI3LTMuMTc4IDEuOTA2LTUuNDY3IDEuOTA2LTEuMjcxIDAtMi40OC0uMjU0LTMuNDk2LS42OTlhNyA3IDAgMCAxLTIuNzM0LTEuOTdjLS43NjMtLjgyNy0xLjMzNS0xLjg0NC0xLjc4LTMuMDUycy0uNjM2LTIuNDgtLjYzNi0zLjk0Mi4xOS0yLjczMy42MzYtMy45NDFjLjM4MS0xLjIwOCAxLjAxNy0yLjE2MiAxLjc4LTMuMDUyLjc2My0uODI2IDEuNjUzLTEuNDYyIDIuNzM0LTEuOTdhOS4xIDkuMSAwIDAgMSAzLjU2LS43cTQuMDA1IDAgNi4xMDMgMS45MDdsMy4zMDUtMy4zMDVjLTIuNDc5LTEuOTA3LTUuNjU4LTIuOTI1LTkuNDA4LTIuOTI1LTIuMDk4IDAtNC4wMDUuMzE4LTUuNzIyIDEuMDE4LTEuNzE2LjY5OS0zLjE3OCAxLjU4OS00LjM4NiAyLjc5N2ExMi4xIDEyLjEgMCAwIDAtMi43OTcgNC4zODZjLS42MzYgMS43MTctLjk1NCAzLjYyNC0uOTU0IDUuNjU4cy4zMTggMy45NDIgMS4wMTcgNS42NThjLjcgMS43MTcgMS41OSAzLjE3OSAyLjc5NyA0LjM4N2ExMi4xIDEyLjEgMCAwIDAgNC4zODcgMi43OTdjMS43MTYuNyAzLjYyMyAxLjAxNyA1LjY1OCAxLjAxNyAyLjAzNCAwIDMuODc4LS4zMTggNS41My0xLjAxNyAxLjY1My0uNyAzLjA1Mi0xLjU5IDQuMTk2LTIuNzk3cTEuNzE4LTEuODEyIDIuNjctNC4zODdjLjYzNi0xLjcxNi45NTQtMy42MjMuOTU0LTUuNjU4di0uODI2Yy0uMTktLjEyNy0uMjU1LS40NDUtLjI1NS0uNyIvPjwvc3ZnPg==);background-repeat:no-repeat;background-size:170px 40px;content:"";display:block;height:40px;width:170px}}.ag-watermark-text{font-family:Impact,sans-serif;font-size:19px;font-weight:700;opacity:.5}.ag-ltr .ag-watermark-text{padding-left:.7rem}.ag-rtl .ag-watermark-text{padding-right:.7rem}.ag-body-horizontal-scroll-viewport,.ag-body-vertical-scroll-viewport,.ag-body-viewport,.ag-center-cols-viewport,.ag-floating-bottom-viewport,.ag-floating-top-viewport,.ag-header-viewport,.ag-sticky-bottom-viewport,.ag-sticky-top-viewport,.ag-virtual-list-viewport{flex:1 1 auto;height:100%;min-width:0;overflow:hidden;position:relative}.ag-body-viewport,.ag-center-cols-viewport,.ag-floating-bottom-viewport,.ag-floating-top-viewport,.ag-header-viewport,.ag-sticky-bottom-viewport,.ag-sticky-top-viewport{overflow-x:auto;-ms-overflow-style:none!important;scrollbar-width:none!important;&::-webkit-scrollbar{display:none!important}}.ag-body-viewport{display:flex;overflow-x:hidden;&.ag-layout-normal{overflow-y:auto;-webkit-overflow-scrolling:touch}}.ag-sticky-bottom-container,.ag-sticky-top-container{min-height:1px}.ag-center-cols-viewport{min-height:100%;width:100%}.ag-body-horizontal-scroll-viewport{overflow-x:scroll}.ag-body-vertical-scroll-viewport{overflow-y:scroll}.ag-virtual-list-viewport{overflow:auto;width:100%}.ag-body-container,.ag-body-horizontal-scroll-container,.ag-body-vertical-scroll-container,.ag-center-cols-container,.ag-floating-bottom-container,.ag-floating-bottom-full-width-container,.ag-floating-top-container,.ag-full-width-container,.ag-header-container,.ag-pinned-left-cols-container,.ag-pinned-right-cols-container,.ag-sticky-bottom-container,.ag-sticky-top-container,.ag-virtual-list-container{position:relative}.ag-floating-bottom-container,.ag-floating-top-container,.ag-header-container,.ag-sticky-bottom-container,.ag-sticky-top-container{height:100%;white-space:nowrap}.ag-center-cols-container,.ag-pinned-right-cols-container{display:block}.ag-body-horizontal-scroll-container{height:100%}.ag-body-vertical-scroll-container{width:100%}.ag-floating-bottom-full-width-container,.ag-floating-top-full-width-container,.ag-full-width-container,.ag-sticky-bottom-full-width-container,.ag-sticky-top-full-width-container{pointer-events:none;position:absolute;top:0}.ag-ltr .ag-floating-bottom-full-width-container,.ag-ltr .ag-floating-top-full-width-container,.ag-ltr .ag-full-width-container,.ag-ltr .ag-sticky-bottom-full-width-container,.ag-ltr .ag-sticky-top-full-width-container{left:0}.ag-rtl .ag-floating-bottom-full-width-container,.ag-rtl .ag-floating-top-full-width-container,.ag-rtl .ag-full-width-container,.ag-rtl .ag-sticky-bottom-full-width-container,.ag-rtl .ag-sticky-top-full-width-container{right:0}.ag-full-width-container{width:100%}.ag-floating-bottom-full-width-container,.ag-floating-top-full-width-container{display:inline-block;height:100%;overflow:hidden;width:100%}.ag-virtual-list-container{overflow:hidden}.ag-body{display:flex;flex:1 1 auto;flex-direction:row!important;min-height:0;position:relative}.ag-body-horizontal-scroll,.ag-body-vertical-scroll{display:flex;min-height:0;min-width:0;position:relative;&.ag-scrollbar-invisible{bottom:0;position:absolute;&.ag-apple-scrollbar{opacity:0;transition:opacity .4s;visibility:hidden;&.ag-scrollbar-active,&.ag-scrollbar-scrolling{opacity:1;visibility:visible}}}}.ag-body-horizontal-scroll{width:100%;&.ag-scrollbar-invisible{left:0;right:0}}.ag-body-vertical-scroll{height:100%;&.ag-scrollbar-invisible{top:0;z-index:10}}.ag-ltr .ag-body-vertical-scroll{&.ag-scrollbar-invisible{right:0}}.ag-rtl .ag-body-vertical-scroll{&.ag-scrollbar-invisible{left:0}}.ag-force-vertical-scroll{overflow-y:scroll!important}.ag-horizontal-left-spacer,.ag-horizontal-right-spacer{height:100%;min-width:0;overflow-x:scroll;&.ag-scroller-corner{overflow-x:hidden}}.ag-ltr .ag-column-moving{.ag-cell,.ag-header-cell{transition:left .2s}.ag-header-group-cell{transition:left .2s,width .2s}}.ag-rtl .ag-column-moving{.ag-cell,.ag-header-cell{transition:right .2s}.ag-header-group-cell{transition:right .2s,width .2s}}.ag-row-animation .ag-row{transition:transform .4s,top .4s,opacity .2s}.ag-row-animation .ag-row.ag-after-created{transition:transform .4s,top .4s,height .4s,opacity .2s}.ag-row-no-animation .ag-row{transition:none}.ag-row-loading{align-items:center;display:flex}.ag-row-position-absolute{position:absolute}.ag-row-position-relative{position:relative}.ag-full-width-row{overflow:hidden;pointer-events:all}.ag-row-inline-editing{z-index:1}.ag-row-dragging{z-index:2}.ag-stub-cell{align-items:center;display:flex}.ag-cell{display:inline-block;height:100%;position:absolute;white-space:nowrap}.ag-cell-value{flex:1 1 auto}.ag-cell-value,.ag-group-value{overflow:hidden;text-overflow:ellipsis}.ag-cell-wrap-text{white-space:normal;word-break:break-word}.ag-sparkline-wrapper{height:100%;left:0;position:absolute;top:0;width:100%}.ag-full-width-row .ag-cell-wrapper.ag-row-group{align-items:center;height:100%}.ag-cell .ag-icon{display:inline-block;vertical-align:middle}.ag-floating-top{border-bottom:var(--ag-pinned-row-border);display:flex;overflow:hidden;position:relative;white-space:nowrap;width:100%}.ag-pinned-left-floating-top,.ag-pinned-right-floating-top{display:inline-block;min-width:0;overflow:hidden;position:relative}.ag-floating-bottom{border-top:var(--ag-pinned-row-border);display:flex;overflow:hidden;position:relative;white-space:nowrap;width:100%}.ag-pinned-left-floating-bottom,.ag-pinned-right-floating-bottom{display:inline-block;min-width:0;overflow:hidden;position:relative}.ag-sticky-bottom,.ag-sticky-top{background-color:var(--ag-background-color);display:flex;height:0;overflow:hidden;position:absolute;width:100%}.ag-pinned-left-sticky-top,.ag-pinned-right-sticky-top{height:100%;overflow:hidden;position:relative}.ag-sticky-bottom-full-width-container,.ag-sticky-top-full-width-container{height:100%;overflow:hidden;width:100%}.ag-value-slide-out{opacity:1}.ag-ltr .ag-value-slide-out{margin-right:5px;transition:opacity 3s,margin-right 3s}.ag-rtl .ag-value-slide-out{margin-left:5px;transition:opacity 3s,margin-left 3s}:is(.ag-ltr,.ag-rtl) .ag-value-slide-out{transition-timing-function:linear}.ag-value-slide-out-end{opacity:0}.ag-ltr .ag-value-slide-out-end{margin-right:10px}.ag-rtl .ag-value-slide-out-end{margin-left:10px}.ag-opacity-zero{opacity:0!important}.ag-details-row{width:100%}.ag-details-row-fixed-height{height:100%}.ag-details-grid{width:100%}.ag-details-grid-fixed-height{height:100%}.ag-cell-label-container{align-items:center;display:flex;flex-direction:row-reverse;height:100%;justify-content:space-between;width:100%}.ag-right-aligned-header{.ag-cell-label-container{flex-direction:row}.ag-header-cell-text{text-align:end}}.ag-column-group-icons{display:block;>*{cursor:pointer}}.ag-pill-select{display:flex;flex-direction:column;.ag-column-drop-list{padding:0}.ag-select{padding-top:var(--ag-spacing)}.ag-picker-field-wrapper{background-color:transparent;border:0}.ag-picker-field-display{cursor:pointer}}.ag-ltr{direction:ltr;.ag-body,.ag-body-horizontal-scroll,.ag-body-viewport,.ag-floating-bottom,.ag-floating-top,.ag-header,.ag-sticky-bottom,.ag-sticky-top{flex-direction:row}}.ag-rtl{direction:rtl;.ag-body,.ag-body-horizontal-scroll,.ag-body-viewport,.ag-floating-bottom,.ag-floating-top,.ag-header,.ag-sticky-bottom,.ag-sticky-top{flex-direction:row-reverse}.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{display:block}}.ag-rtl{.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{transform:rotate(180deg)}}.ag-rtl{.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{transform:rotate(-180deg)}}.ag-measurement-container{overflow:hidden;visibility:hidden;width:0;& div{position:absolute}}.ag-group{position:relative;width:100%}.ag-group-title-bar{align-items:center;display:flex;padding:var(--ag-spacing)}.ag-group-title{display:inline;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-group-title-bar .ag-group-title{cursor:default}.ag-group-toolbar{align-items:center;display:flex;padding:var(--ag-spacing)}.ag-group-container{display:flex}.ag-disabled .ag-group-container{pointer-events:none}.ag-disabled-group-container,.ag-disabled-group-title-bar{opacity:.5}.ag-group-container-horizontal{flex-direction:row;flex-wrap:wrap}.ag-group-container-vertical{flex-direction:column}.ag-group-title-bar-icon{cursor:pointer;flex:none}.ag-ltr .ag-group-title-bar-icon{margin-right:var(--ag-spacing)}.ag-rtl .ag-group-title-bar-icon{margin-left:var(--ag-spacing)}.ag-group-item-alignment-stretch .ag-group-item{align-items:stretch}.ag-group-item-alignment-start .ag-group-item{align-items:flex-start}.ag-group-item-alignment-end .ag-group-item{align-items:flex-end}.ag-popup-child{top:0;z-index:5;&:where(:not(.ag-tooltip-custom)){box-shadow:var(--ag-popup-shadow)}}.ag-popup-editor{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-large-text-input{display:block}.ag-rtl{text-align:right}.ag-ltr .ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-left:var(--ag-row-group-indent-size)}.ag-rtl .ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-right:var(--ag-row-group-indent-size)}.ag-ltr .ag-row-group-leaf-indent{margin-left:calc(var(--ag-cell-widget-spacing) + var(--ag-icon-size))}.ag-rtl .ag-row-group-leaf-indent{margin-right:calc(var(--ag-cell-widget-spacing) + var(--ag-icon-size))}.ag-value-change-delta{padding:0 2px}.ag-value-change-delta-up{color:var(--ag-value-change-delta-up-color)}.ag-value-change-delta-down{color:var(--ag-value-change-delta-down-color)}.ag-value-change-value{background-color:transparent;border-radius:1px;padding-left:1px;padding-right:1px;transition:background-color 1s}.ag-value-change-value-highlight{background-color:var(--ag-value-change-value-highlight-background-color);transition:background-color .1s}.ag-cell-data-changed{background-color:var(--ag-value-change-value-highlight-background-color)!important}.ag-cell-data-changed-animation{background-color:transparent}.ag-cell-highlight{background-color:var(--ag-range-selection-highlight-color)!important}.ag-row{background-color:var(--ag-background-color);border-bottom:var(--ag-row-border);color:var(--ag-cell-text-color);font-size:var(--ag-data-font-size);height:var(--ag-row-height);white-space:nowrap;width:100%;--ag-internal-content-line-height:min(calc(var(--ag-row-height) - 1px),var(--ag-line-height,1000px))}:where(.ag-body-vertical-content-no-gap) .ag-row-last{border-bottom-color:transparent}.ag-sticky-bottom{border-top:var(--ag-row-border);box-sizing:content-box!important;display:none}.ag-group-contracted,.ag-group-expanded{cursor:pointer}.ag-cell,.ag-full-width-row .ag-cell-wrapper.ag-row-group{border:1px solid transparent;line-height:var(--ag-internal-content-line-height)}.ag-ltr .ag-cell{border-right:var(--ag-column-border)}.ag-rtl .ag-cell{border-left:var(--ag-column-border)}.ag-ltr :where(.ag-body-horizontal-content-no-gap) .ag-column-last{border-right-color:transparent}.ag-rtl :where(.ag-body-horizontal-content-no-gap) .ag-column-last{border-left-color:transparent}.ag-cell-wrapper{align-items:center;display:flex;&.ag-row-group{align-items:flex-start}>:not(.ag-cell-value):not(.ag-group-value){align-items:center;display:flex;height:var(--ag-internal-content-line-height)}}.ag-ltr .ag-cell-wrapper{padding-left:calc(var(--ag-indentation-level)*var(--ag-row-group-indent-size))}.ag-rtl .ag-cell-wrapper{padding-right:calc(var(--ag-indentation-level)*var(--ag-row-group-indent-size))}.ag-ltr .ag-row>.ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-rtl .ag-row>.ag-cell-wrapper.ag-row-group{padding-right:calc(var(--ag-cell-horizontal-padding) + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-ltr .ag-group-contracted,.ag-ltr .ag-group-expanded,.ag-ltr .ag-row-drag,.ag-ltr .ag-selection-checkbox{margin-right:var(--ag-cell-widget-spacing)}.ag-rtl .ag-group-contracted,.ag-rtl .ag-group-expanded,.ag-rtl .ag-row-drag,.ag-rtl .ag-selection-checkbox{margin-left:var(--ag-cell-widget-spacing)}.ag-ltr .ag-group-child-count{margin-left:3px}.ag-rtl .ag-group-child-count{margin-right:3px}.ag-row-highlight-above:after,.ag-row-highlight-below:after{background-color:var(--ag-range-selection-border-color);content:"";height:1px;position:absolute;width:calc(100% - 1px)}.ag-ltr .ag-row-highlight-above:after,.ag-ltr .ag-row-highlight-below:after{left:1px}.ag-rtl .ag-row-highlight-above:after,.ag-rtl .ag-row-highlight-below:after{right:1px}.ag-row-highlight-above:after{top:-1px}.ag-row-highlight-above.ag-row-first:after{top:0}.ag-row-highlight-below:after{bottom:0}.ag-row-odd{background-color:var(--ag-odd-row-background-color)}.ag-row-selected:before{background-color:var(--ag-selected-row-background-color);content:"";display:block;inset:0;pointer-events:none;position:absolute}.ag-row-hover.ag-full-width-row.ag-row-group:before,.ag-row-hover:not(.ag-full-width-row):before{background-color:var(--ag-row-hover-color);content:"";display:block;inset:0;pointer-events:none;position:absolute}.ag-row-hover.ag-row-selected:before{background-color:var(--ag-row-hover-color);background-image:linear-gradient(var(--ag-selected-row-background-color),var(--ag-selected-row-background-color))}.ag-row-hover.ag-full-width-row.ag-row-group>*{position:relative}.ag-column-hover{background-color:var(--ag-column-hover-color)}.ag-right-aligned-cell{font-variant-numeric:tabular-nums}.ag-ltr .ag-right-aligned-cell{text-align:right}.ag-rtl .ag-right-aligned-cell{text-align:left}.ag-right-aligned-cell .ag-cell-value,.ag-right-aligned-cell .ag-group-value{margin-left:auto}.ag-cell:not(.ag-cell-inline-editing),.ag-full-width-row .ag-cell-wrapper.ag-row-group{-webkit-font-smoothing:subpixel-antialiased}.ag-ltr .ag-cell:not(.ag-cell-inline-editing),.ag-ltr .ag-full-width-row .ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px + var(--ag-row-group-indent-size)*var(--ag-indentation-level));padding-right:calc(var(--ag-cell-horizontal-padding) - 1px)}.ag-rtl .ag-cell:not(.ag-cell-inline-editing),.ag-rtl .ag-full-width-row .ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px);padding-right:calc(var(--ag-cell-horizontal-padding) - 1px + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-row>.ag-cell-wrapper{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px);padding-right:calc(var(--ag-cell-horizontal-padding) - 1px)}.ag-row-dragging{cursor:move;opacity:.5}.ag-details-row{background-color:var(--ag-background-color);padding:calc(var(--ag-spacing)*3.5)}.ag-layout-auto-height,.ag-layout-print{.ag-center-cols-container,.ag-center-cols-viewport{min-height:150px}}.ag-overlay-loading-wrapper{background-color:var(--ag-modal-overlay-background-color)}.ag-skeleton-container{align-content:center;height:100%;width:100%}.ag-skeleton-effect{animation:ag-skeleton-loading 1.5s ease-in-out .5s infinite;background-color:var(--ag-row-loading-skeleton-effect-color);border-radius:.25rem;height:1em;width:100%}.ag-ltr .ag-right-aligned-cell .ag-skeleton-effect{margin-left:auto}.ag-rtl .ag-right-aligned-cell .ag-skeleton-effect{margin-right:auto}@keyframes ag-skeleton-loading{0%{opacity:1}50%{opacity:.4}to{opacity:1}}.ag-loading{align-items:center;display:flex;height:100%}.ag-ltr .ag-loading{padding-left:var(--ag-cell-horizontal-padding)}.ag-rtl .ag-loading{padding-right:var(--ag-cell-horizontal-padding)}.ag-ltr .ag-loading-icon{padding-right:var(--ag-cell-widget-spacing)}.ag-rtl .ag-loading-icon{padding-left:var(--ag-cell-widget-spacing)}.ag-icon-loading{animation-duration:1s;animation-iteration-count:infinite;animation-name:spin;animation-timing-function:linear}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.ag-details-row{padding:calc(var(--ag-spacing)*3.75)}.ag-pinned-left-header,.ag-pinned-right-header{display:inline-block;overflow:hidden;position:relative}.ag-body-horizontal-scroll:not(.ag-scrollbar-invisible){.ag-horizontal-left-spacer:not(.ag-scroller-corner){border-right:var(--ag-pinned-column-border)}.ag-horizontal-right-spacer:not(.ag-scroller-corner){border-left:var(--ag-pinned-column-border)}}.ag-pinned-right-header{border-left:var(--ag-pinned-column-border)}.ag-pinned-left-header{border-right:var(--ag-pinned-column-border)}.ag-cell.ag-cell-first-right-pinned:not(.ag-cell-range-left):not(.ag-cell-range-single-cell){border-left:var(--ag-pinned-column-border)}.ag-cell.ag-cell-last-left-pinned:not(.ag-cell-range-right):not(.ag-cell-range-single-cell){border-right:var(--ag-pinned-column-border)}.ag-pinned-left-header .ag-header-cell-resize:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}.ag-pinned-right-header .ag-header-cell-resize:after{left:50%}.ag-pinned-left-header,.ag-pinned-right-header{height:100%}.ag-pinned-left-header .ag-header-cell-resize{right:-3px}.ag-pinned-right-header .ag-header-cell-resize{left:-3px}.ag-body-viewport:not(.ag-has-focus) .ag-cell-range-single-cell:not(.ag-cell-inline-editing),.ag-cell-range-selected:not(.ag-cell-focus){background-color:var(--ag-range-selection-background-color);&.ag-cell-range-chart{background-color:var(--ag-range-selection-chart-background-color)!important;&.ag-cell-range-chart-category{background-color:var(--ag-range-selection-chart-category-background-color)!important}}}.ag-cell-range-selected-1:not(.ag-cell-focus),.ag-root:not(.ag-context-menu-open) .ag-body-viewport:not(.ag-has-focus) .ag-cell-range-selected-1:not(.ag-cell-inline-editing){background-color:var(--ag-range-selection-background-color)}.ag-cell-range-selected-2:not(.ag-cell-focus){background-image:linear-gradient(var(--ag-range-selection-background-color),var(--ag-range-selection-background-color))}.ag-cell-range-selected-3:not(.ag-cell-focus){background-image:linear-gradient(var(--ag-range-selection-background-color),var(--ag-range-selection-background-color)),linear-gradient(var(--ag-range-selection-background-color),var(--ag-range-selection-background-color))}.ag-cell-range-selected-4:not(.ag-cell-focus){background-image:linear-gradient(var(--ag-range-selection-background-color),var(--ag-range-selection-background-color)),linear-gradient(var(--ag-range-selection-background-color),var(--ag-range-selection-background-color)),linear-gradient(var(--ag-range-selection-background-color),var(--ag-range-selection-background-color))}.ag-cell.ag-cell-range-selected:not(.ag-cell-range-single-cell){&.ag-cell-range-top{border-top-color:var(--ag-range-selection-border-color);border-top-style:var(--ag-range-selection-border-style)}&.ag-cell-range-right{border-right-color:var(--ag-range-selection-border-color);border-right-style:var(--ag-range-selection-border-style)}&.ag-cell-range-bottom{border-bottom-color:var(--ag-range-selection-border-color);border-bottom-style:var(--ag-range-selection-border-style)}&.ag-cell-range-left{border-left-color:var(--ag-range-selection-border-color);border-left-style:var(--ag-range-selection-border-style)}}.ag-ltr,.ag-rtl{.ag-cell-focus:not(.ag-cell-range-selected):focus-within,.ag-cell-range-single-cell,.ag-cell-range-single-cell.ag-cell-range-handle,.ag-context-menu-open .ag-cell-focus:not(.ag-cell-range-selected),.ag-full-width-row.ag-row-focus:focus .ag-cell-wrapper.ag-row-group{border:1px solid;border-color:var(--ag-range-selection-border-color);border-style:var(--ag-range-selection-border-style);outline:initial}}.ag-cell.ag-selection-fill-top,.ag-cell.ag-selection-fill-top.ag-cell-range-selected{border-top:1px dashed;border-top-color:var(--ag-range-selection-border-color)}.ag-ltr .ag-cell.ag-selection-fill-right,.ag-ltr .ag-cell.ag-selection-fill-right.ag-cell-range-selected{border-right:1px dashed var(--ag-range-selection-border-color)!important}.ag-rtl .ag-cell.ag-selection-fill-right,.ag-rtl .ag-cell.ag-selection-fill-right.ag-cell-range-selected{border-left:1px dashed var(--ag-range-selection-border-color)!important}.ag-cell.ag-selection-fill-bottom,.ag-cell.ag-selection-fill-bottom.ag-cell-range-selected{border-bottom:1px dashed;border-bottom-color:var(--ag-range-selection-border-color)}.ag-ltr .ag-cell.ag-selection-fill-left,.ag-ltr .ag-cell.ag-selection-fill-left.ag-cell-range-selected{border-left:1px dashed var(--ag-range-selection-border-color)!important}.ag-rtl .ag-cell.ag-selection-fill-left,.ag-rtl .ag-cell.ag-selection-fill-left.ag-cell-range-selected{border-right:1px dashed var(--ag-range-selection-border-color)!important}.ag-fill-handle,.ag-range-handle{background-color:var(--ag-range-selection-border-color);bottom:-1px;height:6px;position:absolute;width:6px}.ag-ltr .ag-fill-handle,.ag-ltr .ag-range-handle{right:-1px}.ag-rtl .ag-fill-handle,.ag-rtl .ag-range-handle{left:-1px}.ag-fill-handle{cursor:cell}.ag-ltr .ag-range-handle{cursor:nwse-resize}.ag-rtl .ag-range-handle{cursor:nesw-resize}.ag-cell-inline-editing{border:var(--ag-input-focus-border)!important}.ag-input-wrapper,.ag-picker-field-wrapper{align-items:center;display:flex;flex:1 1 auto;line-height:normal;position:relative}.ag-input-field{align-items:center;display:flex;flex-direction:row}.ag-input-field-input{flex:1 1 auto}.ag-floating-filter-input .ag-input-field-input[type=date]{width:1px}.ag-input-field-input{min-width:0;width:100%}.ag-column-select-header-filter-wrapper,.ag-filter-filter,.ag-filter-toolpanel-search,.ag-mini-filter{.ag-input-wrapper:before{background-color:currentColor;content:"";display:block;height:12px;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS41Ij48cGF0aCBkPSJNNS4zIDlhMy43IDMuNyAwIDEgMCAwLTcuNSAzLjcgMy43IDAgMCAwIDAgNy41Wk0xMC41IDEwLjUgOC4zIDguMiIvPjwvc3ZnPg==");mask-image:url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS41Ij48cGF0aCBkPSJNNS4zIDlhMy43IDMuNyAwIDEgMCAwLTcuNSAzLjcgMy43IDAgMCAwIDAgNy41Wk0xMC41IDEwLjUgOC4zIDguMiIvPjwvc3ZnPg==");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;opacity:50%;position:absolute;width:12px}}.ag-ltr .ag-column-select-header-filter-wrapper,.ag-ltr .ag-filter-filter,.ag-ltr .ag-filter-toolpanel-search,.ag-ltr .ag-mini-filter{.ag-input-wrapper:before{margin-left:var(--ag-spacing)}& input.ag-number-field-input,& input.ag-text-field-input{padding-left:calc(var(--ag-spacing)*1.5 + 12px)}}.ag-rtl .ag-column-select-header-filter-wrapper,.ag-rtl .ag-filter-filter,.ag-rtl .ag-filter-toolpanel-search,.ag-rtl .ag-mini-filter{.ag-input-wrapper:before{margin-right:var(--ag-spacing)}& input.ag-number-field-input,& input.ag-text-field-input{padding-right:calc(var(--ag-spacing)*1.5 + 12px)}}.ag-advanced-filter-header{align-items:center;background-color:var(--ag-header-background-color);border-bottom:var(--ag-header-row-border);display:flex;padding-left:var(--ag-cell-horizontal-padding);padding-right:var(--ag-cell-horizontal-padding);position:relative}.ag-advanced-filter{align-items:center;display:flex;width:100%}.ag-advanced-filter-apply-button,.ag-advanced-filter-builder-button{line-height:normal;white-space:nowrap}.ag-ltr .ag-advanced-filter-apply-button,.ag-ltr .ag-advanced-filter-builder-button{margin-left:calc(var(--ag-spacing)*2)}.ag-rtl .ag-advanced-filter-apply-button,.ag-rtl .ag-advanced-filter-builder-button{margin-right:calc(var(--ag-spacing)*2)}.ag-advanced-filter-builder-button{align-items:center;background-color:unset;border:0;display:flex;font-size:var(--ag-font-size);font-weight:600;padding:var(--ag-spacing);&:hover:not(:disabled){background-color:var(--ag-row-hover-color)}&:not(:disabled){cursor:pointer}}.ag-ltr .ag-advanced-filter-builder-button-label{margin-left:var(--ag-spacing)}.ag-rtl .ag-advanced-filter-builder-button-label{margin-right:var(--ag-spacing)}.ag-advanced-filter-builder{display:flex;flex-direction:column;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:100%}.ag-advanced-filter-builder-list{flex:1;overflow:auto}.ag-advanced-filter-builder-button-panel{border-top:var(--ag-advanced-filter-builder-button-bar-border);display:flex;justify-content:flex-end;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}.ag-ltr .ag-advanced-filter-builder .ag-advanced-filter-builder-button-panel{.ag-advanced-filter-builder-apply-button,.ag-advanced-filter-builder-cancel-button{margin-left:calc(var(--ag-spacing)*2)}}.ag-rtl .ag-advanced-filter-builder .ag-advanced-filter-builder-button-panel{.ag-advanced-filter-builder-apply-button,.ag-advanced-filter-builder-cancel-button{margin-right:calc(var(--ag-spacing)*2)}}.ag-advanced-filter-builder-item-wrapper{align-items:center;display:flex;flex:1 1 auto;justify-content:space-between;overflow:hidden}.ag-ltr .ag-advanced-filter-builder-item-wrapper{padding-left:calc(var(--ag-icon-size)/2);padding-right:var(--ag-icon-size)}.ag-rtl .ag-advanced-filter-builder-item-wrapper{padding-left:var(--ag-icon-size);padding-right:calc(var(--ag-icon-size)/2)}.ag-virtual-list-viewport .ag-advanced-filter-builder-item-wrapper .ag-tab-guard{position:absolute}.ag-advanced-filter-builder-item-tree-lines>*{width:var(--ag-advanced-filter-builder-indent-size)}.ag-advanced-filter-builder-item-tree-lines .ag-advanced-filter-builder-item-tree-line-root{width:var(--ag-icon-size);&:before{height:50%;top:50%}}.ag-advanced-filter-builder-item-tree-line-horizontal,.ag-advanced-filter-builder-item-tree-line-vertical,.ag-advanced-filter-builder-item-tree-line-vertical-bottom,.ag-advanced-filter-builder-item-tree-line-vertical-top{align-items:center;display:flex;height:100%;position:relative;&:after,&:before{content:"";height:100%;position:absolute}}.ag-advanced-filter-builder-item-tree-line-horizontal:after{border-bottom:1px solid var(--ag-border-color);height:50%;top:0;width:calc(var(--ag-advanced-filter-builder-indent-size) - var(--ag-icon-size))}.ag-ltr .ag-advanced-filter-builder-item-tree-line-horizontal:after{left:calc(var(--ag-icon-size)/2)}.ag-rtl .ag-advanced-filter-builder-item-tree-line-horizontal:after{right:calc(var(--ag-icon-size)/2)}.ag-advanced-filter-builder-item-tree-line-vertical:before{top:0;width:calc(var(--ag-advanced-filter-builder-indent-size) - var(--ag-icon-size)/2)}.ag-ltr .ag-advanced-filter-builder-item-tree-line-vertical:before{border-left:1px solid var(--ag-border-color);left:calc(var(--ag-icon-size)/2)}.ag-rtl .ag-advanced-filter-builder-item-tree-line-vertical:before{border-right:1px solid var(--ag-border-color);right:calc(var(--ag-icon-size)/2)}.ag-advanced-filter-builder-item-tree-line-vertical-top:before{height:50%;top:0;width:calc(var(--ag-advanced-filter-builder-indent-size) - var(--ag-icon-size)/2)}.ag-ltr .ag-advanced-filter-builder-item-tree-line-vertical-top:before{border-left:1px solid var(--ag-border-color);left:calc(var(--ag-icon-size)/2)}.ag-rtl .ag-advanced-filter-builder-item-tree-line-vertical-top:before{border-right:1px solid var(--ag-border-color);right:calc(var(--ag-icon-size)/2)}.ag-advanced-filter-builder-item-tree-line-vertical-bottom:before{height:calc(50% - var(--ag-icon-size)*1.5/2);top:calc(50% + var(--ag-icon-size)*1.5/2);width:calc(var(--ag-icon-size)/2)}.ag-ltr .ag-advanced-filter-builder-item-tree-line-vertical-bottom:before{border-left:1px solid var(--ag-border-color);left:calc(var(--ag-icon-size)/2)}.ag-rtl .ag-advanced-filter-builder-item-tree-line-vertical-bottom:before{border-right:1px solid var(--ag-border-color);right:calc(var(--ag-icon-size)/2)}.ag-advanced-filter-builder-item-condition{padding-bottom:var(--ag-spacing);padding-top:var(--ag-spacing)}.ag-advanced-filter-builder-item,.ag-advanced-filter-builder-item-buttons,.ag-advanced-filter-builder-item-condition,.ag-advanced-filter-builder-item-tree-lines,.ag-advanced-filter-builder-pill,.ag-advanced-filter-builder-pill-wrapper{align-items:center;display:flex;height:100%}.ag-advanced-filter-builder-pill-wrapper{margin:0 var(--ag-spacing)}.ag-advanced-filter-builder-pill{border-radius:var(--ag-border-radius);min-height:calc(100% - var(--ag-spacing)*3);min-width:calc(var(--ag-spacing)*2);padding:var(--ag-spacing) calc(var(--ag-spacing)*2);position:relative;.ag-advanced-filter-builder-value-number{font-family:monospace;font-weight:700}.ag-advanced-filter-builder-value-empty{color:var(--ag-subtle-text-color)}}.ag-ltr .ag-advanced-filter-builder-pill{.ag-picker-field-display{margin-right:var(--ag-spacing)}}.ag-rtl .ag-advanced-filter-builder-pill{.ag-picker-field-display{margin-left:var(--ag-spacing)}}.ag-advanced-filter-builder-item-button,.ag-advanced-filter-builder-pill{&:focus-visible{shadow:var(--ag-focus-shadow)}}.ag-advanced-filter-builder-pill-display{font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-advanced-filter-builder-join-pill{background-color:var(--ag-advanced-filter-builder-join-pill-color);cursor:pointer}.ag-advanced-filter-builder-column-pill{background-color:var(--ag-advanced-filter-builder-column-pill-color);cursor:pointer}.ag-advanced-filter-builder-option-pill{background-color:var(--ag-advanced-filter-builder-option-pill-color);cursor:pointer}.ag-advanced-filter-builder-value-pill{background-color:var(--ag-advanced-filter-builder-value-pill-color);cursor:text;max-width:140px;.ag-advanced-filter-builder-pill-display{display:block}}.ag-advanced-filter-builder-item-buttons>*{margin:0 calc(var(--ag-spacing)*.5)}.ag-advanced-filter-builder-item-button{color:var(--ag-subtle-text-color);cursor:pointer;position:relative}.ag-advanced-filter-builder-item-button-disabled{cursor:default;opacity:.5}.ag-advanced-filter-builder-virtual-list-container{top:var(--ag-spacing)}.ag-advanced-filter-builder-virtual-list-item{cursor:default;display:flex;height:var(--ag-list-item-height);&:hover{background-color:var(--ag-row-hover-color);.ag-advanced-filter-builder-item-button{opacity:100%}}}.ag-advanced-filter-builder-validation .ag-advanced-filter-builder-invalid,.ag-advanced-filter-builder-virtual-list-item-highlight .ag-advanced-filter-builder-item-button:focus-visible{opacity:100%}.ag-advanced-filter-builder-invalid{color:var(--ag-invalid-color);cursor:default;margin:0 var(--ag-spacing)}.ag-cell-inline-editing{border-radius:var(--ag-border-radius);padding:0;z-index:1;.ag-cell-edit-wrapper,.ag-cell-editor,.ag-cell-editor .ag-wrapper,.ag-cell-editor input,.ag-cell-wrapper{height:100%;line-height:normal;width:100%}}.ag-autocomplete-list-popup,.ag-popup-editor .ag-large-text{background-color:var(--ag-background-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);padding:0}.ag-large-text-input{height:auto;padding:var(--ag-cell-horizontal-padding)}.ag-rtl .ag-large-text-input textarea{resize:none}.ag-checkbox-edit{padding-left:var(--ag-cell-horizontal-padding);padding-right:var(--ag-cell-horizontal-padding)}.ag-chart{display:flex;height:100%;position:relative;width:100%}.ag-chart-components-wrapper{display:flex}.ag-chart-canvas-wrapper,.ag-chart-components-wrapper{flex:1 1 auto;position:relative}.ag-chart-menu{display:flex;flex-direction:column;position:absolute;top:16px}.ag-ltr .ag-chart-menu{right:20px}.ag-rtl .ag-chart-menu{left:20px}.ag-chart-docked-container{min-width:var(--ag-chart-menu-panel-width);position:relative}.ag-chart-menu-hidden~.ag-chart-docked-container{display:none}.ag-chart-tabbed-menu{display:flex;flex-direction:column;height:100%;overflow:hidden;width:100%}.ag-chart-tabbed-menu-header{cursor:default;flex:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-chart-tabbed-menu-body{align-items:stretch;display:flex;flex:1 1 auto;overflow:hidden}.ag-chart-tab{overflow:hidden;overflow-y:auto;width:100%}.ag-chart-settings{overflow-x:hidden}.ag-chart-settings-wrapper{display:flex;flex-direction:column;height:100%;overflow:hidden;position:relative;width:100%}.ag-chart-settings-nav-bar{align-items:center;display:flex;height:30px;padding:0 10px;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:100%}.ag-chart-settings-card-selector{align-items:center;display:flex;flex:1 1 auto;height:100%;justify-content:space-around;padding:0 10px}.ag-chart-settings-card-item{background-color:var(--ag-foreground-color);border-radius:4px;cursor:pointer;height:10px;height:8px;position:relative;width:10px;width:8px;&.ag-not-selected{opacity:.2}&:before{background-color:transparent;content:" ";display:block;height:20px;left:50%;margin-left:-10px;margin-top:-10px;position:absolute;top:50%;width:20px}&.ag-selected{background-color:var(--ag-accent-color)}}.ag-chart-settings-next,.ag-chart-settings-prev{flex:none;position:relative;&:focus-within{border-radius:1px;box-shadow:var(--ag-focus-shadow)}}.ag-chart-settings-next-button,.ag-chart-settings-prev-button{cursor:pointer;height:100%;left:0;opacity:0;position:absolute;top:0;width:100%}.ag-chart-settings-mini-charts-container{flex:1 1 auto;overflow-x:hidden;overflow-y:auto;position:relative}.ag-chart-settings-mini-wrapper{display:flex;flex-direction:column;left:0;min-height:100%;overflow:hidden;position:absolute;top:0;width:100%;&.ag-animating{transition:left .3s;transition-timing-function:ease-in-out}}.ag-chart-mini-thumbnail{cursor:pointer}.ag-chart-mini-thumbnail-canvas{display:block}.ag-chart-advanced-settings-wrapper,.ag-chart-data-wrapper,.ag-chart-format-wrapper{display:flex;flex-direction:column;padding-bottom:16px;position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-chart-advanced-settings-wrapper,.ag-chart-data-wrapper{height:100%;overflow-y:auto}.ag-chart-advanced-settings{background-color:var(--ag-chrome-background-color)}.ag-chart-advanced-settings,.ag-chart-advanced-settings-wrapper{width:100%}.ag-chart-advanced-settings-wrapper{padding-bottom:0}.ag-chart-advanced-settings-section,.ag-chart-data-section,.ag-chart-format-section{display:flex;margin:0}.ag-chart-advanced-settings-section{border-bottom:1px solid var(--ag-border-color)}.ag-chart-empty-text{align-items:center;background-color:var(--ag-background-color);display:flex;height:100%;justify-content:center;top:0;width:100%}.ag-chart .ag-chart-menu{display:none}.ag-chart-menu-hidden:hover .ag-chart-menu{display:block}.ag-chart{.ag-chart-menu-wrapper{.ag-chart-menu{display:flex;flex-direction:row;gap:20px;top:8px;width:auto}}}.ag-ltr .ag-chart{.ag-chart-menu-wrapper{.ag-chart-menu{justify-content:right;right:calc(var(--ag-cell-horizontal-padding) + var(--ag-spacing) - 4px)}}}.ag-rtl .ag-chart{.ag-chart-menu-wrapper{.ag-chart-menu{justify-content:left;left:calc(var(--ag-cell-horizontal-padding) + var(--ag-spacing) - 4px)}}}.ag-charts-font-size-color{align-self:stretch;display:flex;justify-content:space-between}.ag-charts-data-group-item{position:relative}.ag-charts-data-group-item:not(:last-child){margin-bottom:var(--ag-spacing)}.ag-chart-menu{background:var(--ag-background-color);border-radius:var(--ag-border-radius)}.ag-chart-menu-icon{border-radius:var(--ag-border-radius);cursor:pointer;margin:2px 0;opacity:.5;opacity:.8;&:hover{opacity:1}}.ag-chart-menu-toolbar-button{background-color:unset;border:0;border-radius:1px;padding:0 2px}.ag-chart-mini-thumbnail{border:1px solid var(--ag-border-color);border-radius:5px;&.ag-selected{border-color:var(--ag-accent-color);border-width:2px}&:focus-visible{border-color:var(--ag-accent-color);box-shadow:var(--ag-focus-shadow)}}.ag-chart-data-column-drag-handle{margin-left:var(--ag-spacing)}.ag-charts-data-group-title-bar,.ag-charts-format-top-level-group-title-bar,.ag-charts-settings-group-title-bar{position:relative}.ag-charts-advanced-settings-top-level-group-title-bar{background-color:unset;position:relative}.ag-charts-advanced-settings-top-level-group-title-bar:focus-visible,.ag-charts-data-group-title-bar:focus-visible,.ag-charts-format-top-level-group-title-bar:focus-visible,.ag-charts-settings-group-title-bar:focus-visible{box-shadow:inset var(--ag-focus-shadow)}.ag-charts-data-group-container{padding:calc(var(--ag-widget-container-vertical-padding)*.5) var(--ag-widget-container-horizontal-padding);.ag-charts-data-group-item:not(.ag-charts-format-sub-level-group):not(.ag-pill-select):not(.ag-select){height:var(--ag-list-item-height)}.ag-charts-data-group-item.ag-picker-field{margin-top:var(--ag-spacing)}}.ag-charts-advanced-settings-top-level-group-container,.ag-charts-format-top-level-group-container{margin-left:calc(var(--ag-spacing)*2);padding:var(--ag-spacing)}.ag-charts-advanced-settings-top-level-group-item,.ag-charts-format-top-level-group-item{margin:var(--ag-spacing) 0}.ag-charts-format-sub-level-group-container{display:flex;flex-direction:column;gap:var(--ag-widget-vertical-spacing);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}.ag-charts-settings-group-container{display:grid;grid-template-columns:60px 1fr 60px 1fr 60px;padding:var(--ag-spacing);row-gap:8px;.ag-chart-mini-thumbnail:nth-child(3n+1){grid-column:1}.ag-chart-mini-thumbnail:nth-child(3n+2){grid-column:3}.ag-chart-mini-thumbnail:nth-child(3n+3){grid-column:5}}.ag-chart-data-section,.ag-chart-format-section{display:flex;margin:0}.ag-chart-menu-panel{background-color:var(--ag-chrome-background-color)}.ag-ltr .ag-chart-menu-panel{border-left:1px solid var(--ag-border-color)}.ag-rtl .ag-chart-menu-panel{border-right:1px solid var(--ag-border-color)}.ag-chart-tabbed-menu-body{position:relative;&:after{background:linear-gradient(var(--ag-background-color),transparent);content:"";display:block;height:16px;left:0;position:absolute;right:0;top:0}}.ag-charts-data-group-title-bar,.ag-charts-format-top-level-group-title-bar,.ag-charts-settings-group-container,.ag-charts-settings-group-title-bar{border-top:none;font-weight:500;padding:0 calc(var(--ag-spacing)*1.5)}.ag-chart-settings-nav-bar{border-top:1px solid var(--ag-border-color)}.ag-charts-format-sub-level-group-title-bar{background:none;font-weight:500}.ag-chart-data-section,.ag-chart-format-section{.ag-label:not(.ag-group-title-bar){color:var(--ag-chart-menu-label-color)}.ag-label-align-top .ag-label{margin-bottom:var(--ag-widget-vertical-spacing);margin-top:calc(var(--ag-widget-vertical-spacing)*.5)}.ag-slider.ag-label-align-top .ag-label{margin-bottom:0}& label{display:inline-block}}.ag-chart-data-wrapper,.ag-chart-format-wrapper,.ag-charts-data-group-container,.ag-charts-data-group-title-bar,.ag-charts-format-sub-level-group,.ag-charts-format-sub-level-group-container,.ag-charts-format-sub-level-group-container>*,.ag-charts-format-sub-level-group-item:last-child,.ag-charts-format-sub-level-group-title-bar,.ag-charts-format-top-level-group,.ag-charts-format-top-level-group .ag-charts-format-top-level-group-container,.ag-charts-format-top-level-group-item,.ag-charts-format-top-level-group-title-bar,.ag-charts-settings-group-container,.ag-charts-settings-group-title-bar{margin:0;padding:0}.ag-charts-data-group,.ag-charts-format-top-level-group{border-top:1px solid var(--ag-border-color)}.ag-charts-data-group-title-bar,.ag-charts-format-top-level-group-title-bar,.ag-charts-settings-group-title-bar{padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}.ag-charts-data-group .ag-charts-data-group-container,.ag-charts-format-top-level-group .ag-charts-format-top-level-group-container,.ag-charts-settings-group .ag-charts-settings-group-container{padding:0 var(--ag-widget-container-horizontal-padding)}.ag-charts-format-sub-level-group-title-bar{padding:var(--ag-widget-vertical-spacing) 0}.ag-charts-format-sub-level-group-container{padding-bottom:var(--ag-widget-container-vertical-padding);padding-top:var(--ag-widget-vertical-spacing)}.ag-charts-format-sub-level-group-container>*,.ag-charts-format-sub-level-no-header-group-container>*,.ag-charts-format-top-level-group-container>*{margin-bottom:var(--ag-widget-vertical-spacing)}.ag-chart-advanced-settings-section,.ag-chart-settings-mini-wrapper,.ag-charts-data-group-item{padding-bottom:var(--ag-widget-container-vertical-padding)}.ag-chart-advanced-settings-section{padding-top:var(--ag-widget-container-vertical-padding)}.ag-charts-advanced-settings-top-level-group{.ag-charts-advanced-settings-top-level-group-container,.ag-charts-advanced-settings-top-level-group-title-bar{padding:0 var(--ag-widget-container-horizontal-padding)}}.ag-charts-advanced-settings-top-level-group-container{margin:0}.ag-charts-advanced-settings-top-level-group-item{margin-bottom:0;margin-top:calc(var(--ag-widget-vertical-spacing)*2)}.ag-chart-menu{--ag-icon-size:20px;background-color:color-mix(in srgb,transparent,var(--ag-background-color) 30%);padding:4px 2px}.ag-chart-settings-card-item.ag-not-selected:hover{opacity:.35}.ag-column-drop{align-items:center;display:inline-flex;overflow:auto;position:relative;width:100%}.ag-column-drop-cell,.ag-column-drop-list{align-items:center;display:flex}.ag-column-drop-cell{gap:var(--ag-spacing);position:relative}.ag-column-drop-cell-text{flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-column-drop-vertical{align-items:stretch;display:flex;flex-direction:column;overflow:hidden}.ag-column-drop-vertical-title-bar{align-items:center;display:flex;flex:none}.ag-column-drop-vertical-list{align-items:stretch;flex-direction:column;flex-grow:1;overflow-x:auto;position:relative;>*{flex:none}}.ag-column-drop-empty .ag-column-drop-vertical-list{overflow:hidden}.ag-column-drop-vertical-empty-message{display:block}.ag-column-drop.ag-column-drop-horizontal{overflow:hidden;white-space:nowrap}.ag-column-drop-cell-button{cursor:pointer}.ag-column-drop-wrapper{display:flex}.ag-column-drop-horizontal-half-width{width:50%!important}.ag-column-drop-cell{background:var(--ag-column-drop-cell-background-color);border:var(--ag-column-drop-cell-border);border-radius:500px;padding:calc(var(--ag-spacing)*.5);&:focus-visible{box-shadow:var(--ag-focus-shadow)}}.ag-ltr .ag-column-drop-cell{padding-left:calc(var(--ag-spacing)*.75)}.ag-rtl .ag-column-drop-cell{padding-right:calc(var(--ag-spacing)*.75)}.ag-column-drop-cell-button{min-width:calc(var(--ag-spacing)*4)}.ag-column-drop-cell-ghost{opacity:.5}.ag-column-drop-horizontal{gap:var(--ag-cell-widget-spacing);height:var(--ag-header-height)}.ag-ltr .ag-column-drop-horizontal{padding-left:var(--ag-cell-horizontal-padding)}.ag-rtl .ag-column-drop-horizontal{padding-right:var(--ag-cell-horizontal-padding)}.ag-column-drop-horizontal-list{gap:var(--ag-cell-widget-spacing)}.ag-column-drop-vertical-list{padding-bottom:var(--ag-spacing);padding-left:var(--ag-spacing);padding-right:var(--ag-spacing)}.ag-column-drop-vertical-cell{margin-top:var(--ag-spacing)}.ag-ltr .ag-column-drop-vertical-icon{margin-right:var(--ag-widget-horizontal-spacing)}.ag-rtl .ag-column-drop-vertical-icon{margin-left:var(--ag-widget-horizontal-spacing)}.ag-column-drop-vertical-empty-message{bottom:0;left:0;margin-top:var(--ag-spacing);overflow:hidden;position:absolute;right:0;top:0}.ag-select-agg-func-popup{background:var(--ag-background-color);border:1px solid var(--ag-border-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);height:calc(var(--ag-spacing)*5*3.5);padding:0;position:absolute}.ag-select-agg-func-virtual-list-item{cursor:default;&:hover{background-color:var(--ag-selected-row-background-color)}&:focus-visible{shadow:var(--ag-focus-shadow)}}.ag-ltr .ag-select-agg-func-virtual-list-item{padding-left:calc(var(--ag-spacing)*2)}.ag-rtl .ag-select-agg-func-virtual-list-item{padding-right:calc(var(--ag-spacing)*2)}.ag-sort-indicator-container{display:contents}.ag-ltr .ag-sort-indicator-icon{padding-left:var(--ag-spacing)}.ag-rtl .ag-sort-indicator-icon{padding-right:var(--ag-spacing)}.ag-column-drop-horizontal{background-color:var(--ag-header-background-color);border-bottom:var(--ag-header-row-border)}.ag-ltr .ag-column-drop-horizontal-half-width:not(:last-child){border-right:var(--ag-column-border)}.ag-rtl .ag-column-drop-horizontal-half-width:not(:last-child){border-left:var(--ag-column-border)}.ag-column-drop-cell-button{min-width:0;opacity:.75;&:hover{opacity:1}}.ag-column-drop-vertical{min-height:75px}.ag-column-drop-vertical-title-bar{padding:var(--ag-widget-container-vertical-padding) calc(var(--ag-spacing)*2) 0}.ag-column-drop-vertical-empty-message{align-items:center;border:1px dashed;border-color:var(--ag-border-color);display:flex;justify-content:center;margin:calc(var(--ag-spacing)*1.5) calc(var(--ag-spacing)*2);padding:calc(var(--ag-spacing)*2)}.ag-column-select{display:flex;flex:3 1 0px;flex-direction:column;overflow:hidden;position:relative}.ag-column-select-header{flex:none;height:var(--ag-header-height);padding-left:var(--ag-widget-container-horizontal-padding);padding-right:var(--ag-widget-container-horizontal-padding)}.ag-column-select-column,.ag-column-select-column-group,.ag-column-select-header{align-items:center;display:flex;gap:var(--ag-widget-horizontal-spacing);position:relative}.ag-column-select-column,.ag-column-select-column-group{height:100%}.ag-column-select-virtual-list-item:focus-visible{box-shadow:inset var(--ag-focus-shadow)}.ag-column-select-header-icon{border-radius:var(--ag-border-radius);cursor:pointer;height:var(--ag-icon-size);position:relative;width:var(--ag-icon-size);&:focus-visible{box-shadow:var(--ag-focus-shadow)}}.ag-column-select-header-filter-wrapper{flex:1 1 auto}.ag-column-select-header-filter{width:100%}.ag-column-select-list{flex:1 1 0px;overflow:hidden}.ag-ltr .ag-column-select-column,.ag-ltr .ag-column-select-column-group{padding-left:calc(var(--ag-indentation-level)*var(--ag-column-select-indent-size))}.ag-rtl .ag-column-select-column,.ag-rtl .ag-column-select-column-group{padding-right:calc(var(--ag-indentation-level)*var(--ag-column-select-indent-size))}.ag-ltr .ag-column-select-add-group-indent{margin-left:calc(var(--ag-icon-size) + var(--ag-spacing)*1.5)}.ag-rtl .ag-column-select-add-group-indent{margin-right:calc(var(--ag-icon-size) + var(--ag-spacing)*1.5)}.ag-column-select-column,.ag-column-select-column-group{&:not(:last-child){margin-bottom:var(--ag-widget-vertical-spacing)}}.ag-column-select-column-group-readonly,.ag-column-select-column-readonly{opacity:.5;pointer-events:none}.ag-column-select-virtual-list-viewport{padding:calc(var(--ag-widget-container-vertical-padding)*.5) 0}.ag-column-select-virtual-list-item{padding:0 var(--ag-widget-container-horizontal-padding)}.ag-column-select-column-label{flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-column-select-checkbox{display:flex}.ag-set-filter{--ag-indentation-level:0}.ag-set-filter-item{align-items:center;display:flex;height:100%}.ag-set-filter-item-checkbox{display:flex;height:100%;width:100%}.ag-set-filter-group-icons{display:block;>*{cursor:pointer}}.ag-filter-body-wrapper{display:flex;flex-direction:column}.ag-filter-filter{flex:1 1 0px}.ag-filter-condition{display:flex;justify-content:center}.ag-floating-filter-body{display:flex;flex:1 1 auto;height:100%;position:relative}.ag-floating-filter-full-body{align-items:center;display:flex;flex:1 1 auto;height:100%;overflow:hidden;width:100%}.ag-floating-filter-full-body>div{flex:1 1 auto}.ag-floating-filter-input{align-items:center;display:flex;width:100%;>*{flex:1 1 auto}}.ag-floating-filter-button{display:flex;flex:none}.ag-set-floating-filter-input input[disabled]{pointer-events:none}.ag-floating-filter-button-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:none;height:var(--ag-icon-size);width:var(--ag-icon-size)}.ag-filter-loading{height:100%;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);position:absolute;width:100%;z-index:1}.ag-column-panel{display:flex;flex:1 1 auto;flex-direction:column;overflow:hidden}.ag-pivot-mode-panel{display:flex;height:var(--ag-header-height)}.ag-pivot-mode-select{align-items:center;display:flex}.ag-ltr .ag-pivot-mode-select{margin-left:var(--ag-widget-container-horizontal-padding)}.ag-rtl .ag-pivot-mode-select{margin-right:var(--ag-widget-container-horizontal-padding)}.ag-column-panel-column-select{border-bottom:var(--ag-tool-panel-separator-border);border-top:var(--ag-tool-panel-separator-border)}:where(.ag-column-panel) .ag-column-drop-vertical{flex:1 1 0px;min-height:50px;&:where(:not(.ag-last-column-drop)){border-bottom:var(--ag-tool-panel-separator-border)}}.ag-dnd-ghost{align-items:center;background-color:var(--ag-drag-and-drop-image-background-color);border:var(--ag-drag-and-drop-image-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-drag-and-drop-image-shadow);color:var(--ag-text-color);cursor:move;font-weight:500;gap:var(--ag-cell-widget-spacing);height:var(--ag-header-height);max-width:200px;padding-left:var(--ag-cell-horizontal-padding);padding-right:var(--ag-cell-horizontal-padding);text-overflow:ellipsis;transform:translateY(calc(var(--ag-spacing)*2))}.ag-dnd-ghost,.ag-header{display:flex;overflow:hidden;white-space:nowrap}.ag-header{background-color:var(--ag-header-background-color);border-bottom:var(--ag-header-row-border);color:var(--ag-header-text-color);font-family:var(--ag-header-font-family);font-size:var(--ag-header-font-size);font-weight:var(--ag-header-font-weight);width:100%}.ag-header-row{height:var(--ag-header-height);position:absolute}.ag-header-row:not(:first-child){.ag-header-cell:not(.ag-header-span-height.ag-header-span-total),.ag-header-group-cell.ag-header-group-cell-with-group{border-top:var(--ag-header-row-border)}}.ag-header-row:not(.ag-header-row-column-group){overflow:hidden}.ag-header.ag-header-allow-overflow .ag-header-row{overflow:visible}.ag-header-cell,.ag-header-group-cell{align-items:center;display:inline-flex;gap:var(--ag-cell-widget-spacing);height:100%;overflow:hidden;padding:0 var(--ag-cell-horizontal-padding);position:absolute}@property --ag-internal-moving-color{syntax:"<color>";inherits:false;initial-value:transparent}@property --ag-internal-hover-color{syntax:"<color>";inherits:false;initial-value:transparent}.ag-header-cell:not(.ag-floating-filter),.ag-header-group-cell{&:before{background-image:linear-gradient(var(--ag-internal-hover-color),var(--ag-internal-hover-color)),linear-gradient(var(--ag-internal-moving-color),var(--ag-internal-moving-color));content:"";inset:0;position:absolute;--ag-internal-moving-color:transparent;--ag-internal-hover-color:transparent;transition:--ag-internal-moving-color var(--ag-header-cell-background-transition-duration),--ag-internal-hover-color var(--ag-header-cell-background-transition-duration)}&:hover:before{--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}&.ag-header-cell-moving:before{--ag-internal-moving-color:var(--ag-header-cell-moving-background-color);--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}}:where(.ag-header-cell:not(.ag-floating-filter) *,.ag-header-group-cell *){position:relative;z-index:1}.ag-header-cell-filter-button,.ag-header-cell.ag-header-active .ag-header-cell-menu-button{opacity:1}.ag-header-cell-menu-button:not(.ag-header-menu-always-show){opacity:0;transition:opacity .2s}.ag-header-cell-label,.ag-header-group-cell-label{align-items:center;align-self:stretch;display:flex;flex:1 1 auto;gap:var(--ag-spacing);padding:5px 0}.ag-header-cell-label{overflow:hidden;text-overflow:ellipsis}.ag-header-group-cell-label.ag-sticky-label{flex:none;max-width:100%;position:sticky}.ag-ltr .ag-header-group-cell-label.ag-sticky-label{left:var(--ag-cell-horizontal-padding)}.ag-rtl .ag-header-group-cell-label.ag-sticky-label{right:var(--ag-cell-horizontal-padding)}.ag-header-cell-text,.ag-header-group-text{overflow:hidden;text-overflow:ellipsis}.ag-header-cell-text{word-break:break-word}.ag-header-group-cell .ag-header-cell-comp-wrapper{display:flex}.ag-header-cell:not(.ag-header-cell-auto-height) .ag-header-cell-comp-wrapper{align-items:center;display:flex;height:100%}.ag-header-cell-comp-wrapper{width:100%}.ag-header-cell-wrap-text .ag-header-cell-comp-wrapper{white-space:normal}.ag-right-aligned-header .ag-header-cell-label{flex-direction:row-reverse}.ag-floating-filter-button-button,.ag-header-cell-filter-button,.ag-header-cell-menu-button,.ag-header-cell-sortable .ag-header-cell-label,.ag-header-expand-icon,.ag-panel-title-bar-button{cursor:pointer}.ag-advanced-filter-header-cell,.ag-header-cell,.ag-header-group-cell{&:focus-visible{box-shadow:inset var(--ag-focus-shadow)}}.ag-header-cell:after,.ag-header-group-cell:not(.ag-header-span-height.ag-header-group-cell-no-group):after{content:"";height:var(--ag-header-column-border-height);position:absolute;top:calc(50% - var(--ag-header-column-border-height)*.5);z-index:1}.ag-ltr .ag-header-cell:after,.ag-ltr .ag-header-group-cell:not(.ag-header-span-height.ag-header-group-cell-no-group):after{border-right:var(--ag-header-column-border);right:0}.ag-rtl .ag-header-cell:after,.ag-rtl .ag-header-group-cell:not(.ag-header-span-height.ag-header-group-cell-no-group):after{border-left:var(--ag-header-column-border);left:0}.ag-header-highlight-after:after,.ag-header-highlight-before:after{background-color:var(--ag-accent-color);content:"";height:100%;position:absolute;width:1px}.ag-ltr .ag-header-highlight-before:after{left:0}.ag-ltr .ag-header-highlight-after:after,.ag-rtl .ag-header-highlight-before:after{right:0}.ag-rtl .ag-header-highlight-after:after{left:0}.ag-ltr .ag-pinned-left-header .ag-header-highlight-after:after{right:1px}.ag-rtl .ag-pinned-left-header .ag-header-highlight-after:after{left:1px}.ag-header-cell-resize{align-items:center;cursor:ew-resize;display:flex;height:100%;position:absolute;top:0;width:8px;z-index:2;&:after{background-color:var(--ag-header-column-resize-handle-color);content:"";height:var(--ag-header-column-resize-handle-height);position:absolute;top:calc(50% - var(--ag-header-column-resize-handle-height)*.5);width:var(--ag-header-column-resize-handle-width);z-index:1}}.ag-ltr .ag-header-cell-resize{right:-3px;&:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}}.ag-rtl .ag-header-cell-resize{left:-3px;&:after{right:calc(50% - var(--ag-header-column-resize-handle-width))}}.ag-header-cell.ag-header-span-height .ag-header-cell-resize:after{height:calc(100% - var(--ag-spacing)*4);top:calc(var(--ag-spacing)*2)}.ag-header-group-cell-no-group.ag-header-span-height .ag-header-cell-resize{display:none}.ag-menu{background-color:var(--ag-menu-background-color);border:var(--ag-menu-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-menu-shadow);color:var(--ag-menu-text-color);max-height:100%;min-width:180px;overflow-y:auto;position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-menu-list{cursor:default;display:table;padding:var(--ag-spacing) 0;width:100%}.ag-menu-option,.ag-menu-separator{display:table-row}.ag-menu-option-part,.ag-menu-separator-part{display:table-cell;vertical-align:middle}.ag-menu-option-text{white-space:nowrap}.ag-menu-option-custom{display:contents}.ag-compact-menu-option{display:flex;flex-wrap:nowrap;width:100%}.ag-compact-menu-option-text{flex:1 1 auto;white-space:nowrap}.ag-menu-separator{height:calc(var(--ag-spacing)*2 + 1px)}.ag-menu-separator-part:after{border-top:1px solid var(--ag-menu-separator-color);content:"";display:block}.ag-compact-menu-option-active,.ag-menu-option-active{background-color:var(--ag-row-hover-color)}.ag-compact-menu-option-part,.ag-menu-option-part{line-height:var(--ag-icon-size);padding:calc(var(--ag-spacing) + 2px) 0}.ag-compact-menu-option-disabled,.ag-menu-option-disabled{cursor:not-allowed;opacity:.5}.ag-compact-menu-option-icon,.ag-menu-option-icon{width:var(--ag-icon-size)}.ag-ltr .ag-compact-menu-option-icon,.ag-ltr .ag-menu-option-icon{padding-left:calc(var(--ag-spacing)*2)}.ag-rtl .ag-compact-menu-option-icon,.ag-rtl .ag-menu-option-icon{padding-right:calc(var(--ag-spacing)*2)}.ag-compact-menu-option-text,.ag-menu-option-text{padding-left:calc(var(--ag-spacing)*2);padding-right:calc(var(--ag-spacing)*2)}.ag-ltr .ag-compact-menu-option-shortcut,.ag-ltr .ag-menu-option-shortcut{padding-right:var(--ag-spacing)}.ag-rtl .ag-compact-menu-option-shortcut,.ag-rtl .ag-menu-option-shortcut{padding-left:var(--ag-spacing)}.ag-ltr .ag-compact-menu-option-popup-pointer,.ag-ltr .ag-menu-option-popup-pointer{padding-right:var(--ag-spacing)}.ag-rtl .ag-compact-menu-option-popup-pointer,.ag-rtl .ag-menu-option-popup-pointer{padding-left:var(--ag-spacing)}.ag-menu-column-select-wrapper{height:265px;overflow:auto;.ag-column-select{height:100%}}.ag-menu.ag-tabs{min-width:290px}.ag-filter-separator{border-top:1px solid var(--menu-separator-color)}.ag-filter-select .ag-picker-field-wrapper{width:0}.ag-filter-condition-operator{height:17px}.ag-ltr .ag-filter-condition-operator-or{margin-left:calc(var(--ag-spacing)*2)}.ag-rtl .ag-filter-condition-operator-or{margin-right:calc(var(--ag-spacing)*2)}.ag-set-filter-select-all{padding-top:var(--ag-widget-container-vertical-padding)}.ag-filter-no-matches,.ag-set-filter-list{height:calc(var(--ag-list-item-height)*6)}.ag-filter-no-matches{padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}.ag-set-filter-tree-list{height:calc(var(--ag-list-item-height)*10)}.ag-set-filter-filter{margin-left:var(--ag-widget-container-horizontal-padding);margin-right:var(--ag-widget-container-horizontal-padding);margin-top:var(--ag-widget-container-vertical-padding)}.ag-filter-to{margin-top:var(--ag-widget-vertical-spacing)}.ag-mini-filter{margin:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}.ag-ltr .ag-set-filter-item{padding-left:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}.ag-rtl .ag-set-filter-item{padding-right:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}.ag-ltr .ag-set-filter-add-group-indent{margin-left:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}.ag-rtl .ag-set-filter-add-group-indent{margin-right:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}.ag-ltr .ag-set-filter-group-icons{margin-right:var(--ag-widget-container-horizontal-padding)}.ag-rtl .ag-set-filter-group-icons{margin-left:var(--ag-widget-container-horizontal-padding)}.ag-filter-menu .ag-set-filter-list{min-width:200px}.ag-filter-virtual-list-item:focus-visible{box-shadow:inset var(--ag-focus-shadow)}.ag-filter-apply-panel{display:flex;justify-content:flex-end;overflow:hidden;padding:var(--ag-widget-vertical-spacing) var(--ag-widget-container-horizontal-padding) var(--ag-widget-container-vertical-padding)}.ag-filter-apply-panel-button{line-height:1.5}.ag-ltr .ag-filter-apply-panel-button{margin-left:calc(var(--ag-spacing)*2)}.ag-rtl .ag-filter-apply-panel-button{margin-right:calc(var(--ag-spacing)*2)}.ag-simple-filter-body-wrapper{display:flex;flex-direction:column;min-height:calc(var(--ag-list-item-height) + var(--ag-widget-container-vertical-padding) + var(--ag-widget-vertical-spacing));overflow-y:auto;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);padding-bottom:calc(var(--ag-widget-container-vertical-padding) - var(--ag-widget-vertical-spacing));&>*{margin-bottom:var(--ag-widget-vertical-spacing)}.ag-resizer-wrapper{margin:0}}.ag-multi-filter-menu-item{margin:var(--ag-spacing) 0}.ag-multi-filter-group-title-bar{background-color:transparent;color:var(--ag-header-text-color);font-weight:500;padding:calc(var(--ag-spacing)*1.5) var(--ag-spacing);&:focus-visible{box-shadow:var(--ag-focus-shadow)}}.ag-group-filter-field-select-wrapper{display:flex;flex-direction:column;gap:var(--ag-widget-vertical-spacing);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}.ag-menu-option{cursor:pointer;font-weight:500}.ag-ltr .ag-menu-option-popup-pointer .ag-icon{text-align:right}.ag-rtl .ag-menu-option-popup-pointer .ag-icon{text-align:left}.ag-panel{background-color:var(--ag-panel-background-color);display:flex;flex-direction:column;overflow:hidden;position:relative}.ag-dialog{border:var(--ag-dialog-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dialog-shadow);position:absolute}.ag-panel-title-bar{align-items:center;background-color:var(--ag-panel-title-bar-background-color);border-bottom:var(--ag-panel-title-bar-border);color:var(--ag-header-text-color);cursor:default;display:flex;flex:none;height:var(--ag-header-height);padding:var(--ag-spacing) var(--ag-cell-horizontal-padding)}.ag-ltr .ag-panel-title-bar-button{margin-left:calc(var(--ag-spacing)*2);margin-right:var(--ag-spacing)}.ag-rtl .ag-panel-title-bar-button{margin-left:var(--ag-spacing);margin-right:calc(var(--ag-spacing)*2)}.ag-panel-title-bar-title{color:var(--ag-header-text-color);flex:1 1 auto;font-weight:500}.ag-panel-title-bar-buttons{display:flex}.ag-panel-title-bar-button{cursor:pointer}.ag-panel-content-wrapper{display:flex;flex:1 1 auto;overflow:hidden;position:relative}.ag-resizer{pointer-events:none;position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;z-index:1;&.ag-resizer-topLeft{height:5px;left:0;top:0;width:5px}&.ag-resizer-top{cursor:ns-resize;height:5px;left:5px;right:5px;top:0}&.ag-resizer-topRight{height:5px;right:0;top:0;width:5px}&.ag-resizer-right{bottom:5px;cursor:ew-resize;right:0;top:5px;width:5px}&.ag-resizer-bottomRight{bottom:0;height:5px;right:0;width:5px}&.ag-resizer-bottom{bottom:0;cursor:ns-resize;height:5px;left:5px;right:5px}&.ag-resizer-bottomLeft{bottom:0;height:5px;left:0;width:5px}&.ag-resizer-left{bottom:5px;cursor:ew-resize;left:0;top:5px;width:5px}}.ag-ltr .ag-resizer{&.ag-resizer-topLeft{cursor:nwse-resize}&.ag-resizer-topRight{cursor:nesw-resize}&.ag-resizer-bottomRight{cursor:nwse-resize}&.ag-resizer-bottomLeft{cursor:nesw-resize}}.ag-rtl .ag-resizer{&.ag-resizer-topLeft{cursor:nesw-resize}&.ag-resizer-topRight{cursor:nwse-resize}&.ag-resizer-bottomRight{cursor:nesw-resize}&.ag-resizer-bottomLeft{cursor:nwse-resize}}.ag-dragging-fill-handle .ag-dialog,.ag-dragging-range-handle .ag-dialog{opacity:.7;pointer-events:none}.ag-layout-print{&.ag-body{display:block;height:unset}&.ag-root-wrapper{display:inline-block}.ag-body-horizontal-scroll,.ag-body-vertical-scroll{display:none}&.ag-force-vertical-scroll{overflow-y:visible!important}}@media print{.ag-root-wrapper.ag-layout-print{display:table;.ag-body-horizontal-scroll-viewport,.ag-body-viewport,.ag-center-cols-container,.ag-center-cols-viewport,.ag-root,.ag-root-wrapper-body,.ag-virtual-list-viewport{display:block!important;height:auto!important;overflow:hidden!important}.ag-cell,.ag-row{-moz-column-break-inside:avoid;break-inside:avoid}}}.ag-select{align-items:center;display:flex;flex-direction:row;.ag-picker-field-wrapper{cursor:default}&.ag-disabled .ag-picker-field-wrapper:focus{box-shadow:none}&:not(.ag-cell-editor,.ag-label-align-top){min-height:var(--ag-list-item-height)}.ag-picker-field-display{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-picker-field-icon{align-items:center;display:flex}&.ag-disabled{opacity:.5}}.ag-ltr .ag-select{.ag-picker-field-wrapper{padding-left:calc(var(--ag-cell-horizontal-padding)/2);padding-right:var(--ag-spacing)}}.ag-rtl .ag-select{.ag-picker-field-wrapper{padding-left:var(--ag-spacing);padding-right:calc(var(--ag-cell-horizontal-padding)/2)}}.ag-rich-select{cursor:default;height:100%}.ag-rich-select-value{align-items:center;background-color:var(--ag-input-background-color);display:flex;height:100%;padding:var(--ag-spacing);.ag-picker-field-display{overflow:hidden;text-overflow:ellipsis;&.ag-display-as-placeholder{opacity:.5}}}.ag-rich-select-list{background-color:var(--ag-input-background-color);border:var(--ag-input-border);border-radius:var(--ag-input-border-radius);box-shadow:var(--ag-dropdown-shadow);height:auto;position:relative;width:100%;.ag-loading-text{padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}}.ag-rich-select-row{align-items:center;display:flex;flex:1 1 auto;height:100%;overflow:hidden;padding:0 var(--ag-spacing);white-space:nowrap}.ag-rich-select-row-selected{background-color:var(--ag-selected-row-background-color)}.ag-rich-select-row-highlighted,.ag-rich-select-row:hover{background-image:linear-gradient(var(--ag-row-hover-color),var(--ag-row-hover-color))}.ag-rich-select-row-text-highlight{font-weight:700}.ag-rich-select-field-input{flex:1 1 auto;.ag-input-field-input{border:none!important;box-shadow:none!important;padding:0!important;text-overflow:ellipsis;&::-moz-placeholder{opacity:.8}&::placeholder{opacity:.8}}}.ag-ltr .ag-rich-select-field-input{left:var(--ag-spacing)}.ag-rtl .ag-rich-select-field-input{right:var(--ag-spacing)}.ag-popup-editor .ag-rich-select-value{height:var(--ag-row-height);min-width:200px}.ag-rich-select-virtual-list-item{cursor:default;height:var(--ag-list-item-height)}.ag-pill-container{display:flex;flex-wrap:nowrap;gap:.25rem}.ag-pill{align-items:center;background:var(--ag-select-cell-background-color);border:var(--ag-select-cell-border);border-radius:var(--ag-border-radius);display:flex;padding:0 .25rem;white-space:nowrap;&:focus-visible{box-shadow:var(--ag-focus-shadow)}}.ag-pill .ag-pill-button{border:none;padding:0;&:hover{color:var(--ag-accent-color);cursor:pointer}}.ag-ltr .ag-pill .ag-pill-button{margin-left:var(--ag-spacing)}.ag-rtl .ag-pill .ag-pill-button{margin-right:var(--ag-spacing)}ag-grid,ag-grid-angular{display:block}.ag-dnd-ghost,.ag-popup,.ag-root-wrapper{cursor:default;line-height:normal;white-space:normal;-webkit-font-smoothing:antialiased;background-color:var(--ag-background-color);color:var(--ag-text-color);color-scheme:var(--ag-browser-color-scheme);font-family:var(--ag-font-family);font-size:var(--ag-font-size);--ag-indentation-level:0}.ag-root-wrapper{border:var(--ag-wrapper-border);border-radius:var(--ag-wrapper-border-radius);display:flex;flex-direction:column;overflow:hidden;position:relative;&.ag-layout-normal{height:100%}}.ag-root-wrapper-body{display:flex;flex-direction:row;&.ag-layout-normal{flex:1 1 auto;height:0;min-height:0}}.ag-root{display:flex;flex-direction:column;position:relative;&.ag-layout-auto-height,&.ag-layout-normal{flex:1 1 auto;overflow:hidden;width:0}&.ag-layout-normal{height:100%}}.ag-tool-panel-wrapper{cursor:default;display:flex;overflow-x:hidden;overflow-y:auto;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:var(--ag-side-bar-panel-width)}.ag-select-agg-func-item{align-items:center;display:flex;flex:1 1 auto;flex-direction:row;flex-wrap:nowrap;height:100%;overflow:hidden;position:relative;text-overflow:ellipsis;white-space:nowrap;>*{flex:none}}.ag-tool-panel-horizontal-resize{cursor:ew-resize;height:100%;position:absolute;top:0;width:5px;z-index:1}.ag-ltr .ag-side-bar-left .ag-tool-panel-horizontal-resize{right:-3px}.ag-ltr .ag-side-bar-right .ag-tool-panel-horizontal-resize,.ag-rtl .ag-side-bar-left .ag-tool-panel-horizontal-resize{left:-3px}.ag-rtl .ag-side-bar-right .ag-tool-panel-horizontal-resize{right:-3px}.ag-side-bar{background-color:var(--ag-side-bar-background-color);display:flex;flex-direction:row-reverse;position:relative}.ag-side-bar-left{flex-direction:row;order:-1}.ag-side-buttons{position:relative;width:calc(var(--ag-icon-size) + var(--ag-spacing)*2)}.ag-side-button{&.ag-selected{background-color:var(--ag-background-color);border-bottom:1px solid var(--ag-border-color);&:not(:first-of-type){border-top:1px solid var(--ag-border-color)}}}.ag-side-button-button{align-items:center;cursor:pointer;display:flex;flex-direction:column;gap:var(--ag-spacing);padding:calc(var(--ag-spacing)*3) 0;position:relative;white-space:nowrap;width:100%;&:focus{box-shadow:none}}.ag-side-button-button:focus-visible{box-shadow:inset var(--ag-focus-shadow)}.ag-side-button-label{writing-mode:vertical-lr}@media (max-resolution:1.5x){.ag-side-button-label{font-family:"Segoe UI",var(--ag-font-family)}.ag-ltr .ag-side-button-label{transform:rotate(.05deg)}.ag-rtl .ag-side-button-label{transform:rotate(-.05deg)}}.ag-ltr .ag-side-bar-left,.ag-rtl .ag-side-bar-right{border-right:var(--ag-side-panel-border);.ag-tool-panel-wrapper{border-left:var(--ag-side-panel-border)}}.ag-ltr .ag-side-bar-right,.ag-rtl .ag-side-bar-left{border-left:var(--ag-side-panel-border);.ag-tool-panel-wrapper{border-right:var(--ag-side-panel-border)}}.ag-ltr .ag-chart-menu-panel{border-left:var(--ag-side-panel-border)}.ag-rtl .ag-chart-menu-panel{border-right:var(--ag-side-panel-border)}.ag-button{border-radius:0}.ag-standard-button{-moz-appearance:none;appearance:none;-webkit-appearance:none;background-color:var(--ag-background-color);border:var(--ag-input-border);border-radius:var(--ag-border-radius);cursor:pointer;font-family:inherit;padding:var(--ag-spacing) calc(var(--ag-spacing)*2);&:hover{background-color:var(--ag-row-hover-color)}&:active{border-color:var(--ag-accent-color)}&:disabled{background-color:var(--ag-input-disabled-background-color);border:var(--ag-input-disabled-border);color:var(--ag-input-disabled-text-color)}}:where(input[class^=ag-][type=button],button[class^=ag-]):focus-visible{box-shadow:var(--ag-focus-shadow)}.ag-drag-handle{color:var(--ag-drag-handle-color);cursor:grab}.ag-list-item,.ag-virtual-list-item{height:var(--ag-list-item-height)}.ag-virtual-list-item{position:absolute;width:100%}.ag-select-list{background-color:var(--ag-background-color);border:var(--ag-input-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);overflow-x:hidden;overflow-y:auto}.ag-list-item{align-items:center;display:flex;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;&.ag-active-item{background-color:var(--ag-row-hover-color)}}.ag-select-list-item{cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;& span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}.ag-ltr .ag-select-list-item{padding-left:calc(var(--ag-cell-horizontal-padding)/2)}.ag-rtl .ag-select-list-item{padding-right:calc(var(--ag-cell-horizontal-padding)/2)}.ag-list-item-hovered:after{background-color:var(--ag-accent-color);content:"";height:1px;left:0;position:absolute;right:0}.ag-item-highlight-top:after{top:0}.ag-item-highlight-bottom:after{bottom:0}.ag-range-field{align-items:center;display:flex;.ag-input-wrapper{height:100%}}& input[class^=ag-][type=range]{-webkit-appearance:none;background:none;height:100%;overflow:visible;padding:0;width:100%;&::-webkit-slider-runnable-track{background-color:var(--ag-border-color);border-radius:1.5px;height:3px;margin:0;padding:0;width:100%}&::-moz-range-track{background-color:var(--ag-border-color);border-radius:1.5px;height:3px;margin:0;padding:0;width:100%}&::-webkit-slider-thumb{-webkit-appearance:none;background-color:var(--ag-background-color);border:1px solid var(--ag-border-color);border-radius:100%;height:var(--ag-icon-size);margin:0;padding:0;transform:translateY(calc(var(--ag-icon-size)*-.5 + 1.5px));width:var(--ag-icon-size)}&::-moz-ag-range-thumb{-webkit-appearance:none;background-color:var(--ag-background-color);border:1px solid var(--ag-border-color);border-radius:100%;height:var(--ag-icon-size);margin:0;padding:0;transform:translateY(calc(var(--ag-icon-size)*-.5 + 1.5px));width:var(--ag-icon-size)}&:focus{&::-webkit-slider-thumb{border-color:var(--ag-accent-color);box-shadow:var(--ag-focus-shadow)}&::-moz-ag-range-thumb{border-color:var(--ag-accent-color);box-shadow:var(--ag-focus-shadow)}}&:active{&::-webkit-slider-runnable-track{background-color:var(--ag-accent-color)}&::-moz-ag-range-track{background-color:var(--ag-accent-color)}}&:disabled{opacity:.5}}.ag-toggle-button{flex:none;min-width:unset;width:unset}.ag-toggle-button-input-wrapper{background-color:var(--ag-toggle-button-off-background-color);border:solid var(--ag-toggle-button-border-width) var(--ag-toggle-button-off-border-color);border-radius:calc(var(--ag-toggle-button-height)*.5);flex:none;height:var(--ag-toggle-button-height);max-width:var(--ag-toggle-button-width);min-width:var(--ag-toggle-button-width);position:relative;& input{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:100%;opacity:0;width:100%}&:before{background-color:var(--ag-toggle-button-switch-background-color);border:var(--ag-toggle-button-border-width) solid var(--ag-toggle-button-switch-border-color);border-radius:100%;content:"";display:block;height:var(--ag-toggle-button-height);pointer-events:none;position:absolute;top:calc(0px - var(--ag-toggle-button-border-width));width:var(--ag-toggle-button-height)}&.ag-checked{background-color:var(--ag-toggle-button-on-background-color);border-color:var(--ag-toggle-button-on-border-color);&:before{border-color:var(--ag-toggle-button-on-border-color)}}&:focus-within{box-shadow:var(--ag-focus-shadow)}&.ag-disabled{opacity:.5}}.ag-ltr .ag-toggle-button-input-wrapper{&:before{left:calc(0px - var(--ag-toggle-button-border-width));transition:left .1s}&.ag-checked{&:before{left:calc(100% - var(--ag-toggle-button-height) + var(--ag-toggle-button-border-width))}}}.ag-rtl .ag-toggle-button-input-wrapper{&:before{right:calc(0px - var(--ag-toggle-button-border-width));transition:right .1s}&.ag-checked{&:before{right:calc(100% - var(--ag-toggle-button-height) + var(--ag-toggle-button-border-width))}}}.ag-autocomplete{align-items:center;display:flex;width:100%;>*{flex:1 1 auto}}.ag-autocomplete-list-popup{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-autocomplete-list{height:calc(var(--ag-row-height)*6.5);min-width:200px;position:relative;width:100%}.ag-autocomplete-virtual-list-item{cursor:default;display:flex;height:var(--ag-list-item-height);&:focus-visible:after{content:none}&:hover{background-color:var(--ag-row-hover-color)}}.ag-autocomplete-row{align-items:center;display:flex;flex:1 1 auto;overflow:hidden}.ag-autocomplete-row-label{margin:0 var(--ag-widget-container-horizontal-padding);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-autocomplete-row-selected{background-color:var(--ag-selected-row-background-color)}.ag-tooltip{background-color:var(--ag-tooltip-background-color);border:var(--ag-tooltip-border);border-radius:var(--ag-border-radius);color:var(--ag-tooltip-text-color);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);white-space:normal}.ag-tooltip,.ag-tooltip-custom{position:absolute;z-index:99999}.ag-tooltip-custom:not(.ag-tooltip-interactive),.ag-tooltip:not(.ag-tooltip-interactive){pointer-events:none}.ag-tooltip-custom.ag-tooltip-animate,.ag-tooltip.ag-tooltip-animate{transition:opacity 1s;&.ag-tooltip-hiding{opacity:0}}.ag-angle-select{align-items:center;display:flex}.ag-angle-select-wrapper{display:flex}.ag-angle-select-parent-circle{display:block;position:relative}.ag-angle-select-child-circle{position:absolute}.ag-slider-wrapper{display:flex;.ag-input-field{flex:1 1 auto}}.ag-picker-field-display{flex:1 1 auto}.ag-picker-field{align-items:center;display:flex}.ag-picker-field-icon{border:0;cursor:pointer;display:flex;margin:0;padding:0}.ag-color-panel{display:flex;flex-direction:column;text-align:center;width:100%}.ag-spectrum-color{cursor:default;flex:1 1 auto;overflow:visible;position:relative}.ag-spectrum-fill{inset:0;position:absolute}.ag-spectrum-val{cursor:pointer}.ag-spectrum-dragger{cursor:pointer;pointer-events:none;position:absolute}.ag-spectrum-alpha,.ag-spectrum-hue{cursor:default}.ag-spectrum-hue-background{background:linear-gradient(270deg,red 3%,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red);height:100%;width:100%}.ag-spectrum-alpha-background{background:linear-gradient(to right,var(--ag-internal-spectrum-alpha-color-from),var(--ag-internal-spectrum-alpha-color-to)),url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="4" height="4"><rect x="0" y="0" width="4" height="4" fill="%23fff"/><path d="M0 0H2V4H4V2H0Z" fill="%23b2b2b2"/></svg>\') 0 0 /4px 4px;height:100%;width:100%}.ag-spectrum-tool{cursor:pointer;position:relative}.ag-spectrum-slider{pointer-events:none;position:absolute}.ag-spectrum-alpha .ag-spectrum-slider{background:linear-gradient(to bottom,var(--ag-internal-spectrum-alpha-color),var(--ag-internal-spectrum-alpha-color)) var(--ag-background-color)}.ag-recent-colors{display:flex;gap:6px;margin-top:10px}.ag-recent-color{cursor:pointer}.ag-angle-select[disabled]{opacity:.5;pointer-events:none}.ag-ltr .ag-angle-select-field,.ag-ltr .ag-slider-field{margin-right:calc(var(--ag-spacing)*2)}.ag-rtl .ag-angle-select-field,.ag-rtl .ag-slider-field{margin-left:calc(var(--ag-spacing)*2)}.ag-angle-select-parent-circle{background-color:var(--ag-background-color);border:1px solid;border-color:var(--ag-border-color);border-radius:12px;height:24px;width:24px}.ag-angle-select-child-circle{background-color:var(--ag-foreground-color);border-radius:3px;height:6px;left:12px;margin-left:-3px;margin-top:-4px;top:4px;width:6px}.ag-picker-field-wrapper{background-color:var(--ag-background-color);border:var(--ag-input-border);border-radius:5px;min-height:max(var(--ag-list-item-height),calc(var(--ag-spacing)*4));overflow:hidden;&:disabled{opacity:.5}&.ag-picker-has-focus,&:focus-within{border:var(--ag-input-focus-border);box-shadow:var(--ag-focus-shadow)}}.ag-picker-field-button{background-color:var(--ag-background-color)}.ag-dialog.ag-color-dialog{border-radius:5px}.ag-color-picker{.ag-picker-field-wrapper{padding-left:var(--ag-spacing);padding-right:var(--ag-spacing)}.ag-picker-field-display{align-items:center;display:flex;flex-direction:row;min-height:var(--ag-list-item-height)}}.ag-ltr .ag-color-picker-color,.ag-ltr .ag-color-picker-value{margin-right:var(--ag-spacing)}.ag-rtl .ag-color-picker-color,.ag-rtl .ag-color-picker-value{margin-left:var(--ag-spacing)}.ag-color-panel{padding:var(--ag-spacing)}.ag-spectrum-tools{padding-bottom:0;padding-left:0;padding-right:0}.ag-spectrum-tool{height:12px}.ag-spectrum-alpha-background,.ag-spectrum-hue-background{border-radius:12px}.ag-spectrum-slider{border:3px solid #f8f8f8;border-radius:18px;height:18px;margin-top:-15px;width:18px}.ag-recent-colors{margin-bottom:2px;margin-left:var(--ag-spacing);margin-right:var(--ag-spacing)}.ag-color-input-color,.ag-color-picker-color,.ag-recent-color{border-radius:4px}.ag-recent-color{border:1px solid var(--ag-border-color)}.ag-spectrum-sat{background-image:linear-gradient(90deg,#fff,hsla(20,42%,65%,0))}.ag-spectrum-val{background-image:linear-gradient(0deg,#000,hsla(20,42%,65%,0))}.ag-spectrum-dragger{background:#000;border:3px solid #fff;border-radius:18px;box-shadow:0 0 2px 0 rgba(0,0,0,.24);height:18px;width:18px}.ag-spectrum-alpha-background,.ag-spectrum-hue-background{border-radius:2px}.ag-spectrum-tool{border-radius:2px;height:11px;margin-bottom:10px}.ag-spectrum-slider{border:2px solid #fff;border-radius:13px;box-shadow:0 1px 4px 0 rgba(0,0,0,.37);height:13px;margin-top:-12px;width:13px}.ag-recent-color,.ag-spectrum-color,.ag-spectrum-slider{&:focus-visible:not(:disabled):not([readonly]){box-shadow:var(--ag-focus-shadow)}}.ag-color-input{.ag-color-input-color{position:absolute}}.ag-ltr .ag-color-input{& input[class^=ag-][type=text].ag-input-field-input{padding-left:calc(var(--ag-icon-size) + var(--ag-spacing)*2)}.ag-color-input-color{margin-left:var(--ag-spacing)}}.ag-rtl .ag-color-input{& input[class^=ag-][type=text].ag-input-field-input{padding-right:calc(var(--ag-icon-size) + var(--ag-spacing)*2)}.ag-color-input-color{margin-right:var(--ag-spacing)}}.ag-color-input-color,.ag-color-picker-color{border:1px solid var(--ag-border-color);border-radius:2px;height:var(--ag-icon-size);width:var(--ag-icon-size)}.ag-pill-select{.ag-picker-field-display{font-weight:500}.ag-picker-field-display,.ag-picker-field-icon .ag-icon{color:var(--ag-chart-menu-label-color)}}.ag-filter-toolpanel{flex:1 1 0px;min-width:0}.ag-filter-toolpanel-header{position:relative}.ag-filter-toolpanel-header,.ag-filter-toolpanel-search{align-items:center;display:flex;>*{align-items:center;display:flex}}.ag-filter-toolpanel-header{height:calc(var(--ag-spacing)*6);&:focus-visible{border-radius:var(--ag-border-radius);box-shadow:inset var(--ag-focus-shadow)}}.ag-filter-toolpanel-header,.ag-filter-toolpanel-search{padding:0 var(--ag-spacing)}.ag-filter-toolpanel-group:not(.ag-has-filter)>.ag-group-title-bar .ag-filter-toolpanel-group-instance-header-icon{display:none}.ag-filter-toolpanel-group-level-0-header{height:calc(var(--ag-spacing)*8)}.ag-filter-toolpanel-group-item{margin-bottom:calc(var(--ag-spacing)*.5);margin-top:calc(var(--ag-spacing)*.5)}.ag-filter-toolpanel-search{margin-bottom:var(--ag-spacing);margin-top:var(--ag-widget-container-vertical-padding)}.ag-filter-toolpanel-search-input{flex-grow:1;height:calc(var(--ag-spacing)*4)}.ag-ltr .ag-filter-toolpanel-group-title-bar-icon{margin-right:var(--ag-spacing)}.ag-rtl .ag-filter-toolpanel-group-title-bar-icon{margin-left:var(--ag-spacing)}.ag-filter-toolpanel-expand{cursor:pointer}.ag-ltr .ag-filter-toolpanel-expand{margin-right:var(--ag-spacing)}.ag-rtl .ag-filter-toolpanel-expand{margin-left:var(--ag-spacing)}.ag-ltr .ag-filter-toolpanel-group-title-bar,.ag-ltr .ag-filter-toolpanel-instance-header{padding-left:calc(var(--ag-spacing) + var(--ag-filter-tool-panel-group-indent)*var(--ag-indentation-level))}.ag-rtl .ag-filter-toolpanel-group-title-bar,.ag-rtl .ag-filter-toolpanel-instance-header{padding-right:calc(var(--ag-spacing) + var(--ag-filter-tool-panel-group-indent)*var(--ag-indentation-level))}.ag-ltr .ag-filter-toolpanel-instance-body{margin-left:var(--ag-filter-tool-panel-group-indent)}.ag-rtl .ag-filter-toolpanel-instance-body{margin-right:var(--ag-filter-tool-panel-group-indent)}.ag-ltr .ag-filter-toolpanel-group-instance-header-icon,.ag-ltr .ag-filter-toolpanel-instance-header-icon{margin-left:var(--ag-spacing)}.ag-rtl .ag-filter-toolpanel-group-instance-header-icon,.ag-rtl .ag-filter-toolpanel-instance-header-icon{margin-right:var(--ag-spacing)}.ag-filter-toolpanel-instance-filter{background-color:var(--ag-chrome-background-color)}.ag-filter-toolpanel-group-level-0{border-top:none}.ag-filter-toolpanel-header{height:auto;padding-bottom:var(--ag-spacing);padding-top:var(--ag-spacing)}.ag-filter-toolpanel-group-item{margin:0}.ag-filter-toolpanel-header,.ag-filter-toolpanel-search{color:var(--ag-header-text-color);font-weight:500}.ag-paging-panel{align-items:center;border-top:var(--ag-footer-row-border);display:flex;gap:calc(var(--ag-spacing)*4);height:max(var(--ag-row-height),22px);justify-content:flex-end;padding:0 var(--ag-cell-horizontal-padding)}.ag-paging-page-size .ag-wrapper{min-width:50px}.ag-paging-page-summary-panel{align-items:center;display:flex;gap:var(--ag-cell-widget-spacing);.ag-disabled &{pointer-events:none}}.ag-paging-button{cursor:pointer;position:relative;&:focus-visible{box-shadow:var(--ag-focus-shadow)}&.ag-disabled{cursor:default;opacity:.5}}.ag-paging-number,.ag-paging-row-summary-panel-number{font-weight:500}.ag-status-bar{border-top:var(--ag-footer-row-border);display:flex;justify-content:space-between;line-height:1.5;overflow:hidden;padding-left:calc(var(--ag-spacing)*4);padding-right:calc(var(--ag-spacing)*4)}.ag-status-panel{display:inline-flex}.ag-status-name-value{white-space:nowrap}.ag-status-bar-center,.ag-status-bar-left,.ag-status-bar-right{display:inline-flex}.ag-status-bar-center{text-align:center}.ag-status-name-value{margin-left:var(--ag-spacing);margin-right:var(--ag-spacing);padding-bottom:var(--ag-widget-container-vertical-padding);padding-top:var(--ag-widget-container-vertical-padding)}.ag-status-name-value-value{font-weight:500}.ag-overlay{inset:0;pointer-events:none;position:absolute;z-index:2}.ag-overlay-panel,.ag-overlay-wrapper{display:flex;height:100%;width:100%}.ag-overlay-wrapper{align-items:center;flex:none;justify-content:center;text-align:center}.ag-overlay-loading-wrapper{pointer-events:all}.ag-overlay-loading-center{background:var(--ag-background-color);border:1px solid var(--ag-border-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-popup-shadow);padding:var(--ag-spacing)}.ag-icon{display:block;height:var(--ag-icon-size);position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:var(--ag-icon-size)}.ag-column-select-column-group-readonly,.ag-disabled,[disabled]{.ag-icon{opacity:.5}}.ag-column-select-column-readonly .ag-icon-grip,.ag-column-select-column-readonly.ag-icon-grip{opacity:.35}.ag-chart-menu-icon,.ag-chart-settings-next,.ag-chart-settings-prev,.ag-column-group-icons,.ag-column-select-header-icon,.ag-filter-toolpanel-expand,.ag-floating-filter-button-button,.ag-group-contracted .ag-icon,.ag-group-expanded .ag-icon,.ag-group-title-bar-icon,.ag-header-cell-filter-button,.ag-header-cell-menu-button,.ag-header-expand-icon,.ag-panel-title-bar-button,.ag-panel-title-bar-button-icon,.ag-set-filter-group-icons{&:hover{background-color:var(--ag-icon-button-hover-color);border-radius:1px;box-shadow:0 0 0 4px var(--ag-icon-button-hover-color)}}.ag-filter-active{--ag-icon-button-hover-color:color-mix(in srgb,transparent,var(--ag-accent-color) 28%);background-color:color-mix(in srgb,transparent,var(--ag-accent-color) 14%);border-radius:1px;box-shadow:0 0 0 4px color-mix(in srgb,transparent,var(--ag-accent-color) 14%);position:relative;&:after{background-color:var(--ag-accent-color);border-radius:50%;content:"";height:6px;position:absolute;top:-1px;width:6px}.ag-icon-filter{clip-path:path("M8,0C8,4.415 11.585,8 16,8L16,16L0,16L0,0L8,0Z")}}.ag-ltr .ag-filter-active{&:after{right:-1px}}.ag-rtl .ag-filter-active{&:after{left:-1px}}.ag-label-align-right{.ag-label{order:1}>*{flex:none}}.ag-label-align-top{align-items:flex-start;flex-direction:column;>*{align-self:stretch}}.ag-label-ellipsis{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-label{white-space:nowrap}.ag-ltr .ag-label{margin-right:var(--ag-spacing)}.ag-rtl .ag-label{margin-left:var(--ag-spacing)}.ag-label-align-top .ag-label{margin-bottom:calc(var(--ag-spacing)*.5)}.ag-ltr .ag-label-align-right .ag-label{margin-left:var(--ag-spacing)}.ag-rtl .ag-label-align-right .ag-label{margin-right:var(--ag-spacing)}',cP={backgroundColor:"#FFF",foregroundColor:"#181d1f",textColor:{ref:"foregroundColor"},accentColor:"#2196f3",invalidColor:"#e02525",borderColor:{ref:"foregroundColor",mix:.15},wrapperBorder:!0,rowBorder:!0,browserColorScheme:"light",headerRowBorder:{ref:"rowBorder"},footerRowBorder:{ref:"rowBorder"},columnBorder:{style:"solid",width:1,color:"transparent"},headerColumnBorder:!1,headerColumnBorderHeight:"100%",pinnedColumnBorder:!0,pinnedRowBorder:!0,sidePanelBorder:!0,fontFamily:["-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue","sans-serif"],chromeBackgroundColor:{ref:"foregroundColor",mix:.02,onto:"backgroundColor"},headerBackgroundColor:{ref:"chromeBackgroundColor"},headerFontFamily:{ref:"fontFamily"},headerFontWeight:500,headerFontSize:{ref:"fontSize"},dataFontSize:{ref:"fontSize"},headerTextColor:{ref:"textColor"},headerCellHoverBackgroundColor:"transparent",headerCellMovingBackgroundColor:{ref:"backgroundColor"},headerCellBackgroundTransitionDuration:"0.2s",cellTextColor:{ref:"textColor"},subtleTextColor:{ref:"textColor",mix:.5},rangeSelectionBorderStyle:"solid",rangeSelectionBorderColor:{ref:"accentColor"},rangeSelectionBackgroundColor:{ref:"accentColor",mix:.2},rangeSelectionChartBackgroundColor:"#0058FF1A",rangeSelectionChartCategoryBackgroundColor:"#00FF841A",rangeSelectionHighlightColor:{ref:"accentColor",mix:.5},rowHoverColor:{ref:"accentColor",mix:.08},columnHoverColor:{ref:"accentColor",mix:.05},selectedRowBackgroundColor:{ref:"accentColor",mix:.12},modalOverlayBackgroundColor:{ref:"backgroundColor",mix:.66},oddRowBackgroundColor:{ref:"backgroundColor"},borderRadius:4,wrapperBorderRadius:8,cellHorizontalPadding:{calc:"spacing * 2 * cellHorizontalPaddingScale"},cellWidgetSpacing:{calc:"spacing * 1.5"},cellHorizontalPaddingScale:1,rowGroupIndentSize:{calc:"cellWidgetSpacing + iconSize"},valueChangeDeltaUpColor:"#43a047",valueChangeDeltaDownColor:"#e53935",valueChangeValueHighlightBackgroundColor:"#16a08580",spacing:8,fontSize:14,rowHeight:{calc:"max(iconSize, dataFontSize) + spacing * 3.25 * rowVerticalPaddingScale"},rowVerticalPaddingScale:1,headerHeight:{calc:"max(iconSize, dataFontSize) + spacing * 4 * headerVerticalPaddingScale"},headerVerticalPaddingScale:1,popupShadow:{radius:16,color:"#00000026"},dropdownShadow:{radius:4,spread:1,offsetY:1,color:"#babfc766"},dragAndDropImageBackgroundColor:{ref:"backgroundColor"},dragAndDropImageBorder:!0,dragAndDropImageShadow:{ref:"popupShadow"},dragHandleColor:{ref:"foregroundColor",mix:.7},focusShadow:{spread:3,color:{ref:"accentColor",mix:.5}},sideBarPanelWidth:250,sideBarBackgroundColor:{ref:"chromeBackgroundColor"},headerColumnResizeHandleHeight:"30%",headerColumnResizeHandleWidth:2,headerColumnResizeHandleColor:{ref:"borderColor"},widgetContainerHorizontalPadding:{calc:"spacing * 1.5"},widgetContainerVerticalPadding:{calc:"spacing * 1.5"},widgetHorizontalSpacing:{calc:"spacing * 1.5"},widgetVerticalSpacing:{ref:"spacing"},listItemHeight:{calc:"iconSize + widgetVerticalSpacing"},iconSize:16,toggleButtonWidth:28,toggleButtonHeight:18,toggleButtonBorderWidth:2,toggleButtonOnBorderColor:{ref:"accentColor"},toggleButtonOnBackgroundColor:{ref:"accentColor"},toggleButtonOffBorderColor:{ref:"foregroundColor",mix:.3,onto:"backgroundColor"},toggleButtonOffBackgroundColor:{ref:"foregroundColor",mix:.3,onto:"backgroundColor"},toggleButtonSwitchBorderColor:{ref:"toggleButtonOffBorderColor"},toggleButtonSwitchBackgroundColor:{ref:"backgroundColor"},menuBorder:{color:{ref:"foregroundColor",mix:.2}},menuBackgroundColor:{ref:"foregroundColor",mix:.03,onto:"backgroundColor"},menuTextColor:{ref:"foregroundColor",mix:.95,onto:"backgroundColor"},menuShadow:{ref:"popupShadow"},menuSeparatorColor:{ref:"borderColor"},setFilterIndentSize:{ref:"iconSize"},chartMenuPanelWidth:260,chartMenuLabelColor:{ref:"foregroundColor",mix:.8},iconButtonHoverColor:{ref:"foregroundColor",mix:.1},dialogShadow:{ref:"popupShadow"},dialogBorder:{color:{ref:"foregroundColor",mix:.2}},panelBackgroundColor:{ref:"backgroundColor"},panelTitleBarBackgroundColor:{ref:"headerBackgroundColor"},panelTitleBarBorder:!0,columnSelectIndentSize:{ref:"iconSize"},toolPanelSeparatorBorder:!0,tooltipBackgroundColor:{ref:"chromeBackgroundColor"},tooltipTextColor:{ref:"textColor"},tooltipBorder:!0,columnDropCellBackgroundColor:{ref:"foregroundColor",mix:.07},columnDropCellBorder:{color:{ref:"foregroundColor",mix:.13}},selectCellBackgroundColor:{ref:"foregroundColor",mix:.07},selectCellBorder:{color:{ref:"foregroundColor",mix:.13}},advancedFilterBuilderButtonBarBorder:!0,advancedFilterBuilderIndentSize:{calc:"spacing * 2 + iconSize"},advancedFilterBuilderJoinPillColor:"#f08e8d",advancedFilterBuilderColumnPillColor:"#a6e194",advancedFilterBuilderOptionPillColor:"#f3c08b",advancedFilterBuilderValuePillColor:"#85c0e4",filterToolPanelGroupIndent:{ref:"spacing"},iconButtonHoverBackgroundColor:{ref:"foregroundColor",mix:.1},rowLoadingSkeletonEffectColor:"rgba(66, 66, 66, 0.2)"},cF=e=>e.replace(/[A-Z]/g,e=>`-${e}`).toLowerCase(),cN=e=>`--ag-${cF(e)}`,cO=e=>`var(${cN(e)})`,cB=(e,t,i)=>Math.max(t,Math.min(i,e)),cG=(e=>{let t=new Map;return i=>(t.has(i)||t.set(i,e(i)),t.get(i))})(e=>{if(/Color$/.test(e))return"color";if(/Scale?$/.test(e))return"scale";if("spacing"===e||/(Padding|Spacing|Size|Width|Height|Radius|Indent|Start|End|Top|Bottom|Horizontal|Vertical)$/.test(e))return"length";if(/Border$/.test(e))return"border";if(/BorderStyle$/.test(e))return"borderStyle";if(/Shadow$/.test(e))return"shadow";if(/Image$/.test(e))return"image";if(/Family$/.test(e))return"fontFamily";if(/Weight$/.test(e))return"fontWeight";if(/Duration$/.test(e))return"duration";if(/ColorScheme$/.test(e))return"colorScheme";throw Error(`"${e}" is not a valid theme parameter.`)}),cz=e=>"string"==typeof e?e:"number"==typeof e&&String(e),c_=e=>{if("string"==typeof e)return e;if("ref"in e){let t=cO(e.ref);if(null==e.mix)return t;let i=e.onto?"var(--ag-background-color)":"transparent";return`color-mix(in srgb, ${i}, ${t} ${cB(100*e.mix,0,100)}%)`}return!1},cV=e=>{if("string"==typeof e)return e;if("number"==typeof e)return`${e}px`;if("calc"in e){let t=e.calc.replace(/ ?[*/+] ?/g," $& ");return`calc(${t.replace(/(?<!(\w|--[\w-]*))([a-z][a-z0-9]*\b)(?!\s*\()/gi,e=>` ${cO(e)} `)})`}return"ref"in e&&cO(e.ref)},cj=e=>"string"==typeof e?e:"googleFont"in e?cj(e.googleFont):"ref"in e?cO(e.ref):!!Array.isArray(e)&&e.map(e=>("object"==typeof e&&"googleFont"in e&&(e=e.googleFont),/^[\w-]+$/.test(e)?e:JSON.stringify(e))).join(", "),cH=e=>"string"==typeof e?e:"url"in e?`url(${JSON.stringify(e.url)})`:"svg"in e?cH({url:`data:image/svg+xml,${encodeURIComponent(e.svg)}`}):"ref"in e&&cO(e.ref),cU={color:c_,colorScheme:cz,length:cV,scale:cz,border:(e,t)=>"string"==typeof e?e:!0===e?"solid 1px var(--ag-border-color)":!1===e?"columnBorder"===t?"solid 1px transparent":"none":"ref"in e?cO(e.ref):cz(e.style??"solid")+" "+cV(e.width??1)+" "+c_(e.color??{ref:"borderColor"}),borderStyle:cz,shadow:e=>"string"==typeof e?e:!1===e?"none":"ref"in e?cO(e.ref):[cV(e.offsetX??0),cV(e.offsetY??0),cV(e.radius??0),cV(e.spread??0),c_(e.color??{ref:"foregroundColor"})].join(" "),image:cH,fontFamily:cj,fontWeight:cz,duration:(e,t)=>"string"==typeof e?e:"number"==typeof e?(e>50&&tB(`Numeric value ${e} passed to ${t} param will be interpreted as ${e} seconds. If this is intentional use "${e}s" to silence this warning.`),`${e}s`):"ref"in e&&cO(e.ref)},cW=(e,t)=>cU[cG(e)](t,e),c$="object"!=typeof window||!window||"object"!=typeof document||window.document!==document,cY=0,cK=!1,cZ=e=>{let t="",i="";for(let[r,s]of Object.entries(e.getParams())){let e=cW(r,s);if(!1===e)tB(`Invalid value for param ${r} - ${c3(s)}`);else{let s=cN(r),a=s.replace("--ag-","--ag-inherited-");t+=`	${s}: var(${a}, ${e});
`,i+=`	${a}: var(${s});
`}}let r=`:where(.${e.getCssClass()})`,s=`${r} {
${t}}
`;return{css:s+=`:has(> ${r}):not(${r}) {
${i}}
`,id:"variables"}},cq=e=>Array.from(new Set(Object.values(e.getParams()).flat().map(e=>e?.googleFont).filter(e=>"string"==typeof e))).sort(),cX=async({root:e,part:t,scope:i,css:r})=>{let s=`:scope > style[data-ag-part="${t}"]`;i&&(s+=`[data-ag-scope="${i}"]`);let a=e.querySelector(s);if(!a){(a=document.createElement("style")).dataset.agPart=t,i&&(a.dataset.agScope=i);let r=e.querySelectorAll(":scope > style[data-ag-part]"),s=r[r.length-1];s?s.insertAdjacentElement("afterend",a):e.firstElementChild?e.firstElementChild.insertAdjacentElement("beforebegin",a):e.appendChild(a)}if(a._agTextContent!==r)return a.textContent=r,a._agTextContent=r,c2(a)},cQ=(e,t)=>{for(let i of Array.from(t.querySelectorAll(`:scope > style[data-ag-scope="${e}"]`)))i.remove()},cJ=new Set,c0=async e=>{if(!cJ.has(e))return cJ.add(e),cX({css:`@import url('https://${c1}/css2?family=${encodeURIComponent(e)}:wght@100;200;300;400;500;600;700;800;900&display=swap');
`,part:`googleFont:${e}`,root:document.head})},c1="fonts.googleapis.com",c2=e=>new Promise(t=>{let i=()=>{e.removeEventListener("load",i),t()};e.addEventListener("load",i)}),c3=e=>null==e?String(e):`${typeof e} ${e}`,c4={aggregation:'<path d="M18 7V4H6l6 8-6 8h12v-3"/>',arrows:'<polyline points="5 9 2 12 5 15"/><polyline points="9 5 12 2 15 5"/><polyline points="15 19 12 22 9 19"/><polyline points="19 9 22 12 19 15"/><line x1="2" x2="22" y1="12" y2="12"/><line x1="12" x2="12" y1="2" y2="22"/>',asc:'<path d="m5 12 7-7 7 7"/><path d="M12 19V5"/>',cancel:'<circle cx="12" cy="12" r="10"/><path d="m15 9-6 6"/><path d="m9 9 6 6"/>',chart:'<line x1="18" x2="18" y1="20" y2="10"/><line x1="12" x2="12" y1="20" y2="4"/><line x1="6" x2="6" y1="20" y2="14"/>',"color-picker":'<path d="m19 11-8-8-8.6 8.6a2 2 0 0 0 0 2.8l5.2 5.2c.8.8 2 .8 2.8 0L19 11Z"/><path d="m5 2 5 5"/><path d="M2 13h15"/><path d="M22 20a2 2 0 1 1-4 0c0-1.6 1.7-2.4 2-4 .3 1.6 2 2.4 2 4Z"/>',columns:'<path d="M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18"/>',contracted:'<path d="m9 18 6-6-6-6"/>',copy:'<rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/>',cross:'<path d="M18 6 6 18"/><path d="m6 6 12 12"/>',csv:'<path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/><polyline points="14 2 14 8 20 8"/><path d="M8 13h2"/><path d="M8 17h2"/><path d="M14 13h2"/><path d="M14 17h2"/>',cut:'<circle cx="6" cy="6" r="3"/><path d="M8.12 8.12 12 12"/><path d="M20 4 8.12 15.88"/><circle cx="6" cy="18" r="3"/><path d="M14.8 14.8 20 20"/>',desc:'<path d="M12 5v14"/><path d="m19 12-7 7-7-7"/>',down:'<path d="M12 5v14"/><path d="m19 12-7 7-7-7"/>',excel:'<path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/><polyline points="14 2 14 8 20 8"/><path d="M8 13h2"/><path d="M8 17h2"/><path d="M14 13h2"/><path d="M14 17h2"/>',expanded:'<path d="m15 18-6-6 6-6"/>',"eye-slash":'<path d="M9.88 9.88a3 3 0 1 0 4.24 4.24"/><path d="M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68"/><path d="M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61"/><line x1="2" x2="22" y1="2" y2="22"/>',eye:'<path d="M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"/><circle cx="12" cy="12" r="3"/>',filter:'<path d="M3 6h18"/><path d="M7 12h10"/><path d="M10 18h4"/>',first:'<path d="m17 18-6-6 6-6"/><path d="M7 6v12"/>',group:'<path d="M16 12H3"/><path d="M16 18H3"/><path d="M10 6H3"/><path d="M21 18V8a2 2 0 0 0-2-2h-5"/><path d="m16 8-2-2 2-2"/>',last:'<path d="m7 18 6-6-6-6"/><path d="M17 6v12"/>',left:'<path d="m12 19-7-7 7-7"/><path d="M19 12H5"/>',linked:'<path d="M9 17H7A5 5 0 0 1 7 7h2"/><path d="M15 7h2a5 5 0 1 1 0 10h-2"/><line x1="8" x2="16" y1="12" y2="12"/>',loading:'<line x1="12" x2="12" y1="2" y2="6"/><line x1="12" x2="12" y1="18" y2="22"/><line x1="4.93" x2="7.76" y1="4.93" y2="7.76"/><line x1="16.24" x2="19.07" y1="16.24" y2="19.07"/><line x1="2" x2="6" y1="12" y2="12"/><line x1="18" x2="22" y1="12" y2="12"/><line x1="4.93" x2="7.76" y1="19.07" y2="16.24"/><line x1="16.24" x2="19.07" y1="7.76" y2="4.93"/>',maximize:'<polyline points="15 3 21 3 21 9"/><polyline points="9 21 3 21 3 15"/><line x1="21" x2="14" y1="3" y2="10"/><line x1="3" x2="10" y1="21" y2="14"/>',menu:'<line x1="4" x2="20" y1="12" y2="12"/><line x1="4" x2="20" y1="6" y2="6"/><line x1="4" x2="20" y1="18" y2="18"/>',"menu-alt":'<circle cx="12" cy="5" r="0.75" fill="#D9D9D9"/><circle cx="12" cy="12" r="0.75" fill="#D9D9D9"/><circle cx="12" cy="19" r="0.75" fill="#D9D9D9"/>',minimize:'<polyline points="4 14 10 14 10 20"/><polyline points="20 10 14 10 14 4"/><line x1="14" x2="21" y1="10" y2="3"/><line x1="3" x2="10" y1="21" y2="14"/>',minus:'<circle cx="12" cy="12" r="10"/><path d="M8 12h8"/>',next:'<path d="m9 18 6-6-6-6"/>',none:'<path d="m7 15 5 5 5-5"/><path d="m7 9 5-5 5 5"/>',"not-allowed":'<circle cx="12" cy="12" r="10"/><path d="m4.9 4.9 14.2 14.2"/>',paste:'<path d="M15 2H9a1 1 0 0 0-1 1v2c0 .6.4 1 1 1h6c.6 0 1-.4 1-1V3c0-.6-.4-1-1-1Z"/><path d="M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2M16 4h2a2 2 0 0 1 2 2v2M11 14h10"/><path d="m17 10 4 4-4 4"/>',pin:'<line x1="12" x2="12" y1="17" y2="22"/><path d="M5 17h14v-1.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V6h1a2 2 0 0 0 0-4H8a2 2 0 0 0 0 4h1v4.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24Z"/>',pivot:'<path d="M15 3v18"/><rect width="18" height="18" x="3" y="3" rx="2"/><path d="M21 9H3"/><path d="M21 15H3"/>',plus:'<circle cx="12" cy="12" r="10"/><path d="M8 12h8"/><path d="M12 8v8"/>',previous:'<path d="m15 18-6-6 6-6"/>',right:'<path d="M5 12h14"/><path d="m12 5 7 7-7 7"/>',save:'<path d="M12 17V3"/><path d="m6 11 6 6 6-6"/><path d="M19 21H5"/>',"small-down":'<path d="m6 9 6 6 6-6"/>',"small-left":'<path d="m15 18-6-6 6-6"/>',"small-right":'<path d="m9 18 6-6-6-6"/>',"small-up":'<path d="m18 15-6-6-6 6"/>',tick:'<path d="M20 6 9 17l-5-5"/>',"tree-closed":'<path d="m9 18 6-6-6-6"/>',"tree-indeterminate":'<path d="M5 12h14"/>',"tree-open":'<path d="m6 9 6 6 6-6"/>',unlinked:'<path d="M9 17H7A5 5 0 0 1 7 7"/><path d="M15 7h2a5 5 0 0 1 4 8"/><line x1="8" x2="12" y1="12" y2="12"/><line x1="2" x2="22" y1="2" y2="22"/>',up:'<path d="m5 12 7-7 7 7"/><path d="M12 19V5"/>',grip:'<circle cx="5" cy="8" r="0.5"/><circle cx="12" cy="8" r="0.5"/><circle cx="19" cy="8" r="0.5"/><circle cx="5" cy="16" r="0.5"/><circle cx="12" cy="16" r="0.5"/><circle cx="19" cy="16" r="0.5"/><g stroke="none" fill="currentColor"><circle cx="5" cy="8" r="1"/><circle cx="12" cy="8" r="1"/><circle cx="19" cy="8" r="1"/><circle cx="5" cy="16" r="1"/><circle cx="12" cy="16" r="1"/><circle cx="19" cy="16" r="1"/></g>',settings:'<path d="M20 7h-9"/><path d="M14 17H5"/><circle cx="17" cy="17" r="3"/><circle cx="7" cy="7" r="3"/>'};aW.__registerModules([dg,d8,cT,cn],!1,void 0);var c6=Object.defineProperty,c5=Object.getOwnPropertyDescriptor,c8=(e,t)=>{for(var i in t)c6(e,i,{get:t[i],enumerable:!0})},c7=(e,t,i,r)=>{for(var s,a=r>1?void 0:r?c5(t,i):t,o=e.length-1;o>=0;o--)(s=e[o])&&(a=(r?s(t,i,a):s(a))||a);return r&&a&&c6(t,i,a),a},c9={ariaAnnounceHoverDatum:"${datum}",ariaAnnounceChart:"chart, ${seriesCount}[number] series",ariaAnnounceHierarchyChart:"hierarchy chart, ${caption}",ariaAnnounceGaugeChart:"gauge chart, ${caption}",ariaAnnounceHierarchyDatum:"level ${level}[number], ${count}[number] children, ${description}",ariaAnnounceFlowProportionLink:"link ${index} of ${count}, from ${from} to ${to}, ${sizeName} ${size}",ariaAnnounceFlowProportionNode:"node ${index} of ${count}, ${description}",ariaDescriptionLegendItem:"Press Space or Enter to toggle visibility",ariaLabelAnnotationOptionsToolbar:"Annotation Options",ariaLabelAnnotationSettingsDialog:"Annotation Settings",ariaLabelColorPicker:"Color picker",ariaLabelFinancialCharts:"Financial Charts",ariaLabelLegend:"Legend",ariaLabelLegendPagination:"Legend Pagination",ariaLabelLegendPagePrevious:"Previous Legend Page",ariaLabelLegendPageNext:"Next Legend Page",ariaLabelLegendItem:"${label}, Legend item ${index}[number] of ${count}[number]",ariaLabelLegendItemUnknown:"Unknown legend item",ariaLabelNavigator:"Navigator",ariaLabelNavigatorRange:"Range",ariaLabelNavigatorMinimum:"Minimum",ariaLabelNavigatorMaximum:"Maximum",ariaLabelRangesToolbar:"Ranges",ariaLabelSettingsTabBar:"Settings",ariaLabelZoomToolbar:"Zoom",ariaValuePanRange:"${min}[percent] to ${max}[percent]",iconAltTextLineStyleSolid:"Solid",iconAltTextLineStyleDashed:"Long-dashed",iconAltTextLineStyleDotted:"Short-dashed",iconAltTextPositionTop:"Top",iconAltTextPositionCenter:"Center",iconAltTextPositionBottom:"Bottom",iconAltTextAlignLeft:"Left",iconAltTextAlignCenter:"Center",iconAltTextAlignRight:"Right",iconAltTextClose:"Close",overlayLoadingData:"Loading data...",overlayNoData:"No data to display",overlayNoVisibleSeries:"No visible series",toolbarSeriesTypeDropdown:"Chart Type",toolbarSeriesTypeOHLC:"OHLC",toolbarSeriesTypeHLC:"HLC",toolbarSeriesTypeHighLow:"High Low",toolbarSeriesTypeCandles:"Candles",toolbarSeriesTypeHollowCandles:"Hollow Candles",toolbarSeriesTypeLine:"Line",toolbarSeriesTypeLineWithMarkers:"Line with Markers",toolbarSeriesTypeStepLine:"Step Line",toolbarAnnotationsTrendLine:"Trend Line",toolbarAnnotationsHorizontalLine:"Horizontal Line",toolbarAnnotationsVerticalLine:"Vertical Line",toolbarAnnotationsParallelChannel:"Parallel Channel",toolbarAnnotationsDisjointChannel:"Disjoint Channel",toolbarAnnotationsClearAll:"Clear All",toolbarAnnotationsColor:"Color",toolbarAnnotationsFillColor:"Fill Color",toolbarAnnotationsLineColor:"Line Color",toolbarAnnotationsLineStyle:"Line Style",toolbarAnnotationsLineStrokeWidth:"Line Stroke Width",toolbarAnnotationsSettings:"Settings",toolbarAnnotationsTextColor:"Text Color",toolbarAnnotationsTextSize:"Text Size",toolbarAnnotationsLock:"Lock",toolbarAnnotationsUnlock:"Unlock",toolbarAnnotationsDelete:"Delete",toolbarAnnotationsDragHandle:"Drag Toolbar",toolbarAnnotationsLineAnnotations:"Trend Lines",toolbarAnnotationsTextAnnotations:"Text Annotations",toolbarAnnotationsShapeAnnotations:"Shapes",toolbarAnnotationsCallout:"Callout",toolbarAnnotationsComment:"Comment",toolbarAnnotationsNote:"Note",toolbarAnnotationsText:"Text",toolbarAnnotationsArrow:"Arrow",toolbarAnnotationsArrowUp:"Arrow Up",toolbarAnnotationsArrowDown:"Arrow Down",toolbarRange1Month:"1M",toolbarRange1MonthAria:"1 month",toolbarRange3Months:"3M",toolbarRange3MonthsAria:"3 months",toolbarRange6Months:"6M",toolbarRange6MonthsAria:"6 months",toolbarRangeYearToDate:"YTD",toolbarRangeYearToDateAria:"Year to date",toolbarRange1Year:"1Y",toolbarRange1YearAria:"1 year",toolbarRangeAll:"All",toolbarRangeAllAria:"All",toolbarZoomZoomOut:"Zoom out",toolbarZoomZoomIn:"Zoom in",toolbarZoomPanLeft:"Pan left",toolbarZoomPanRight:"Pan right",toolbarZoomPanStart:"Pan to the start",toolbarZoomPanEnd:"Pan to the end",toolbarZoomReset:"Reset the zoom",contextMenuDownload:"Download",contextMenuToggleSeriesVisibility:"Toggle Visibility",contextMenuToggleOtherSeries:"Toggle Other Series",contextMenuZoomToCursor:"Zoom to here",contextMenuPanToCursor:"Pan to here",dialogHeaderChannel:"Channel",dialogHeaderLine:"Line",dialogHeaderText:"Text",dialogInputAlign:"Align",dialogInputColorPicker:"Color",dialogInputColorPickerAltText:"Text Color",dialogInputExtendChannelStart:"Extend channel start",dialogInputExtendChannelEnd:"Extend channel end",dialogInputExtendLineStart:"Extend line start",dialogInputExtendLineEnd:"Extend line end",dialogInputFontSize:"Size",dialogInputFontSizeAltText:"Font Size",dialogInputLineStyle:"Dash",dialogInputPosition:"Position",dialogInputStrokeWidth:"Weight",dialogInputStrokeWidthAltText:"Line Weight",inputTextareaPlaceholder:"Add Text"},ue=["bar","line","scatter"],ut=["delete-legacy","disjoint-channel","disjoint-channel-legacy","horizontal-line-legacy","line-color-legacy","lock","lock-legacy","pan-end-legacy","pan-left-legacy","pan-right-legacy","pan-start-legacy","parallel-channel","parallel-channel-legacy","reset-legacy","trend-line","trend-line-legacy","unlock","unlock-legacy","vertical-line","vertical-line-legacy","zoom-in-legacy","zoom-in-alt","zoom-in-alt-legacy","zoom-out-legacy","zoom-out-alt","zoom-out-alt-legacy"],ui=((S=ui||{}).POINTER="pointer",S.NODE="node",S.TOP="top",S.RIGHT="right",S.BOTTOM="bottom",S.LEFT="left",S.TOP_LEFT="top-left",S.TOP_RIGHT="top-right",S.BOTTOM_RIGHT="bottom-right",S.BOTTOM_LEFT="bottom-left",S),ur={};c8(ur,{TimeInterval:()=>uh,day:()=>uy,friday:()=>uE,hour:()=>uv,millisecond:()=>uc,minute:()=>um,monday:()=>ub,month:()=>uI,saturday:()=>uD,second:()=>up,sunday:()=>uw,thursday:()=>uM,tuesday:()=>uS,utcDay:()=>uR,utcHour:()=>uA,utcMinute:()=>uT,utcMonth:()=>uL,utcYear:()=>uP,wednesday:()=>ux,year:()=>uk});var us=new Map;function ua(e,t){us.has(t)||(us.set(t,!0),e())}function uo(e){return e}function un(e,t=0,i){let r,s;let{leading:a=!0,trailing:o=!0}=i??{},n=!1;function l(){o&&s?(r=setTimeout(l,t),e(...s)):n=!1,s=null}return Object.assign(function(...i){n?s=i:(n=!0,r=setTimeout(l,t),a?e(...i):s=i)},{cancel(){clearTimeout(r),n=!1,s=null}})}ua.clear=()=>us.clear();var ul={log(...e){console.log(...e)},warn(e,...t){console.warn(`AG Charts - ${e}`,...t)},error(e,...t){"object"==typeof e?console.error("AG Charts error",e,...t):console.error(`AG Charts - ${e}`,...t)},table(...e){console.table(...e)},warnOnce(e,...t){ua(()=>ul.warn(e,...t),`Logger.warn: ${e}`)},errorOnce(e,...t){ua(()=>ul.error(e,...t),`Logger.error: ${e}`)}},uh=class{constructor(e,t,i){this._encode=e,this._decode=t,this._rangeCallback=i}floor(e){let t=new Date(e),i=this._encode(t);return this._decode(i)}ceil(e){let t=new Date(Number(e)-1),i=this._encode(t);return this._decode(i+1)}range(e,t,i){let r=this._rangeCallback?.(e,t),s=this._encode(i?this.floor(e):this.ceil(e)),a=this._encode(i?this.ceil(t):this.floor(t));if(a<s)return[];let o=[];for(let e=s;e<=a;e++){let t=this._decode(e);o.push(t)}return r?.(),o}},ud=class extends uh{getOffset(e,t){return Math.floor("number"==typeof e||e instanceof Date?this._encode(new Date(e)):0)%t}every(e,t){let i,r=0,s=e;s!==(e=Math.max(1,Math.round(e)))&&ul.warnOnce(`interval step of [${s}] rounded to [${e}].`);let{snapTo:a="start"}=t??{};if("string"==typeof a){let t=r;i=(i,s)=>(r=this.getOffset("start"===a?i:s,e),()=>r=t)}else"number"==typeof a?r=this.getOffset(new Date(a),e):a instanceof Date&&(r=this.getOffset(a,e));return new uh(t=>Math.floor((this._encode(t)-r)/e),t=>this._decode(t*e+r),i)}},uc=new ud(function(e){return e.getTime()},function(e){return new Date(e)});new Date(0).getFullYear();var uu=6e4*new Date().getTimezoneOffset(),up=new ud(function(e){return Math.floor((e.getTime()-uu)/1e3)},function(e){return new Date(uu+1e3*e)}),ug=6e4*new Date().getTimezoneOffset(),um=new ud(function(e){return Math.floor((e.getTime()-ug)/6e4)},function(e){return new Date(ug+6e4*e)}),uf=6e4*new Date().getTimezoneOffset(),uv=new ud(function(e){return Math.floor((e.getTime()-uf)/36e5)},function(e){return new Date(uf+36e5*e)}),uy=new ud(function(e){let t=6e4*e.getTimezoneOffset();return Math.floor((e.getTime()-t)/864e5)},function(e){let t=new Date(1970,0,1);return t.setDate(t.getDate()+e),t});function uC(e){let t=(7+e-4)%7;return new ud(function(e){let i=6e4*e.getTimezoneOffset();return Math.floor((e.getTime()-i)/6048e5-t/7)},function(e){let i=new Date(1970,0,1);return i.setDate(i.getDate()+7*e+t),i})}var uw=uC(0),ub=uC(1),uS=uC(2),ux=uC(3),uM=uC(4),uE=uC(5),uD=uC(6),uI=new ud(function(e){return 12*e.getFullYear()+e.getMonth()},function(e){let t=Math.floor(e/12);return new Date(t,e-12*t,1)}),uk=new ud(function(e){return e.getFullYear()},function(e){let t=new Date;return t.setFullYear(e),t.setMonth(0,1),t.setHours(0,0,0,0),t}),uT=new ud(function(e){return Math.floor(e.getTime()/6e4)},function(e){return new Date(6e4*e)}),uA=new ud(function(e){return Math.floor(e.getTime()/36e5)},function(e){return new Date(36e5*e)}),uR=new ud(function(e){return Math.floor(e.getTime()/864e5)},function(e){let t=new Date(0);return t.setUTCDate(t.getUTCDate()+e),t.setUTCHours(0,0,0,0),t}),uL=new ud(function(e){return 12*e.getUTCFullYear()+e.getUTCMonth()},function(e){let t=Math.floor(e/12);return new Date(Date.UTC(t,e-12*t,1))}),uP=new ud(function(e){return e.getUTCFullYear()},function(e){let t=new Date;return t.setUTCFullYear(e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0),t}),uF={};c8(uF,{NODE_UPDATE_STATE_TO_PHASE_MAPPING:()=>p1,fromToMotion:()=>p2,staticFromToMotion:()=>p3});var uN=new Map;function uO(){uN.clear()}function uB(e){let t=e.constructor,i=Object.hasOwn(t,"className")?t.className:t.name;if(!i)throw Error(`The ${t} is missing the 'className' property.`);let r=(uN.get(i)??0)+1;return uN.set(i,r),`${i}-${r}`}function uG(){return URL.createObjectURL(new Blob).split("/").at(-1)}function*uz(...e){for(let t of e)yield*t}function u_(e){return null!=e&&"object"==typeof e&&Symbol.iterator in e?e:[e]}var uV=Symbol("interpolate"),uj=e=>null!=e[uV];function uH(e,t,i,r=1/0){let s={nearest:void 0,distanceSquared:r};for(let r of i){let i=r.distanceSquared(e,t);if(0===i)return{nearest:r,distanceSquared:0};i<s.distanceSquared&&(s.nearest=r,s.distanceSquared=i)}return s}function uU(e,t,i,r=1/0){let{x:s=e,y:a=t}=i.transformPoint?.(e,t)??{},o={nearest:void 0,distanceSquared:r};for(let e of i.children){let{nearest:t,distanceSquared:i}=e.nearestSquared(s,a,o.distanceSquared);if(0===i)return{nearest:t,distanceSquared:i};i<o.distanceSquared&&(o.nearest=t,o.distanceSquared=i)}return o}function uW(e,t,i){return Math.min(i,Math.max(e,t))}function u$(e,t){let[i,r]=uY(t);return uW(i,e,r)}function uY(e){if(0===e.length)return[];let t=[1/0,-1/0];for(let i of e)i<t[0]&&(t[0]=i),i>t[1]&&(t[1]=i);return t}function uK(e){let[t,i]=uY(e);return i-t}function uZ(e,t,i=1e-10){return Math.abs(e-t)<i}function uq(e){return -1===Math.sign(e)||Object.is(e,-0)}function uX(e,t=2){let i=10**t;return Math.round(e*i)/i}function uQ(e,t=2){let i=Math.floor(Math.log(Math.abs(e))/Math.LN10);return i>=0||!isFinite(i)?e.toFixed(t):e.toFixed(Math.abs(i)-1+t)}function uJ(e,t){return Math.floor(e%t+(e<0?t:0))}function u0(e){if(Math.floor(e)===e)return 0;let t=String(e),i=0;if(e<1e-6||e>=1e21){let e;[t,e]=t.split("e"),null!=e&&(i=Number(e))}return Math.max((t.split(".")[1]?.length??0)-i,0)}function u1(e,t){return t=t??navigator.language,new Intl.NumberFormat(t,{style:"percent"}).format(e)}function u2(e,t){return u1(e/100,t)}var u3=class e{constructor(e,t,i,r){this.x=e,this.y=t,this.width=i,this.height=r}static fromDOMRect({x:t,y:i,width:r,height:s}){return new e(t,i,r,s)}toDOMRect(){return{x:this.x,y:this.y,width:this.width,height:this.height,top:this.y,left:this.x,right:this.x+this.width,bottom:this.y+this.height,toJSON:()=>({})}}clone(){let{x:t,y:i,width:r,height:s}=this;return new e(t,i,r,s)}equals(e){return this.x===e.x&&this.y===e.y&&this.width===e.width&&this.height===e.height}containsPoint(e,t){return e>=this.x&&e<=this.x+this.width&&t>=this.y&&t<=this.y+this.height}intersection(t){if(!this.collidesBBox(t))return;let i=uW(t.x,this.x,t.x+t.width),r=uW(t.y,this.y,t.y+t.height);return new e(i,r,uW(t.x,this.x+this.width,t.x+t.width)-i,uW(t.y,this.y+this.height,t.y+t.height)-r)}collidesBBox(e){return this.x<e.x+e.width&&this.x+this.width>e.x&&this.y<e.y+e.height&&this.y+this.height>e.y}computeCenter(){return{x:this.x+this.width/2,y:this.y+this.height/2}}isFinite(){return Number.isFinite(this.x)&&Number.isFinite(this.y)&&Number.isFinite(this.width)&&Number.isFinite(this.height)}distanceSquared(e,t){if(this.containsPoint(e,t))return 0;let i=e-uW(this.x,e,this.x+this.width),r=t-uW(this.y,t,this.y+this.height);return i*i+r*r}static nearestBox(e,t,i){return uH(e,t,i)}clip(e){if(void 0===e)return this;let t=Math.max(this.x,e.x),i=Math.max(this.y,e.y),r=Math.min(this.x+this.width,e.x+e.width),s=Math.min(this.y+this.height,e.y+e.height);return this.x=t,this.y=i,this.width=Math.max(0,r-t),this.height=Math.max(0,s-i),this}shrink(e,t){let i=(e,t)=>{switch(e){case"top":this.y+=t;case"bottom":this.height-=t;break;case"left":this.x+=t;case"right":this.width-=t;break;case"vertical":this.y+=t,this.height-=2*t;break;case"horizontal":this.x+=t,this.width-=2*t;break;case void 0:this.x+=t,this.width-=2*t,this.y+=t,this.height-=2*t}};return"number"==typeof e?i(t,e):"object"==typeof e&&Object.entries(e).forEach(([e,t])=>i(e,t)),this}grow(e,t){if("number"==typeof e)this.shrink(-e,t);else{let t={...e};for(let e in t)t[e]*=-1;this.shrink(t)}return this}translate(e,t){return this.x+=e,this.y+=t,this}combine(e){let{x:t,y:i,width:r,height:s}=this;this.x=Math.min(t,e.x),this.y=Math.min(i,e.y),this.width=Math.max(t+r,e.x+e.width)-this.x,this.height=Math.max(i+s,e.y+e.height)-this.y}static merge(t){let i=1/0,r=1/0,s=-1/0,a=-1/0;for(let e of t)e.x<i&&(i=e.x),e.y<r&&(r=e.y),e.x+e.width>s&&(s=e.x+e.width),e.y+e.height>a&&(a=e.y+e.height);return new e(i,r,s-i,a-r)}[uV](t,i){return new e(this.x*(1-i)+t.x*i,this.y*(1-i)+t.y*i,this.width*(1-i)+t.width*i,this.height*(1-i)+t.height*i)}};u3.zero=Object.freeze(new u3(0,0,0,0)),u3.NaN=Object.freeze(new u3(NaN,NaN,NaN,NaN));var u4=((x=u4||{})[x.NONE=0]="NONE",x[x.TRIVIAL=1]="TRIVIAL",x[x.MINOR=2]="MINOR",x[x.MAJOR=3]="MAJOR",x);function u6(e){return function(t,i){let r=`__${i}`;t[i]||function(e,t,i,r){let s;let{redraw:a=1,type:o="normal",changeCb:n,convertor:l,checkDirtyOnAssignment:h=!1}=r??{},d={redraw:a,type:o,changeCb:n,checkDirtyOnAssignment:h,convertor:l};switch(o){case"normal":s=function(e,t){let{redraw:i=1,changeCb:r}=t;return function(t){return t!==this[e]?(this[e]=t,this.markDirty(this,i),r?.(this),t):u5}}(i,d);break;case"transform":s=function(e,t){let{redraw:i=1}=t;return function(t){return t!==this[e]?(this[e]=t,this.markDirtyTransform(i),t):u5}}(i,d);break;case"path":s=function(e,t){let{redraw:i=1}=t;return function(t){return t!==this[e]?(this[e]=t,this._dirtyPath||(this._dirtyPath=!0,this.markDirty(this,i)),t):u5}}(i,d)}Object.defineProperty(e,t,{set:s=function(e,t){let{checkDirtyOnAssignment:i}=t;return i?function(t){let i=e.call(this,t);return i!==u5&&null!=t&&t._dirty>0&&this.markDirty(t,t._dirty),i}:e}(function(e,t){let{changeCb:i}=t;return i?function(t){let r=e.call(this,t);return r!==u5&&i.call(this,this),r}:e}(function(e,t){let{convertor:i}=t;return i?function(t){e.call(this,i(t))}:e}(s,d),d),d),get:function(){return this[i]},enumerable:!0,configurable:!0})}(t,i,r,e)}}var u5=Symbol("no-change"),u8=class{constructor(){this._dirty=3}markDirty(e,t=1){this._dirty<t&&(this._dirty=t)}markClean(e){this._dirty=0}isDirty(){return this._dirty>0}},u7=((M=u7||{})[M.All=0]="All",M[M.None=1]="None",M),u9=class e extends u8{constructor({isVirtual:t,tag:i,zIndex:r,name:s}={}){super(),this.serialNumber=e._nextSerialNumber++,this.id=uB(this),this.isContainerNode=!1,this._virtualChildren=[],this._children=[],this.childSet={},this._childNodeCounts={groups:0,nonGroups:0},this.visible=!0,this.dirtyZIndex=!1,this.zIndex=0,this.zIndexSubOrder=void 0,this.pointerEvents=0,this.name=s,this.isVirtual=t??!1,this.tag=i??NaN,this.zIndex=r??0}get datum(){return this._datum??this._parent?.datum}get previousDatum(){return this._previousDatum}set datum(e){this._datum!==e&&(this._previousDatum=this._datum),this._datum=e}_setLayerManager(e){for(let t of(this._layerManager=e,this._debug=e?.debug,this._children))t._setLayerManager(e);for(let t of this._virtualChildren)t._setLayerManager(e)}get layerManager(){return this._layerManager}*ancestors(){let e=this;for(;e=e.parent;)yield e}*traverseUp(){yield this,yield*this.ancestors()}get parent(){return this._parent}get children(){return this._virtualChildren.length?this._children.concat(this._virtualChildren.flatMap(e=>e.children)):this._children}get virtualChildren(){return this._virtualChildren}hasVirtualChildren(){return this._virtualChildren.length>0}setProperties(e,t){if(t)for(let i of t)this[i]=e[i];else Object.assign(this,e);return this}append(e){for(let t of e=u_(e)){if(t.parent)throw Error(`${t} already belongs to another parent: ${t.parent}.`);if(t.layerManager)throw Error(`${t} already belongs to a scene: ${t.layerManager}.`);if(this.childSet[t.id])throw Error(`Duplicate ${t.constructor.name} node: ${t}`);t.isVirtual?this._virtualChildren.push(t):this._children.push(t),this.childSet[t.id]=!0,t._parent=this,t._setLayerManager(this.layerManager)}this.cachedBBox=void 0,this.dirtyZIndex=!0,this.markDirty(this,3)}appendChild(e){return this.append(e),e}removeChild(e){let t=()=>{throw Error("The node to be removed is not a child of this node.")};if(e.parent!==this&&t(),e.isVirtual){let i=this._virtualChildren.indexOf(e);i<0&&t(),this._virtualChildren.splice(i,1)}else{let i=this._children.indexOf(e);i<0&&t(),this._children.splice(i,1)}return delete this.childSet[e.id],e._parent=void 0,e._setLayerManager(),this.cachedBBox=void 0,this.dirtyZIndex=!0,this.markDirty(e,3),e}clear(){for(let e of uz(this._virtualChildren,this._children))e._parent=void 0,e._setLayerManager();this.cachedBBox=void 0,this._virtualChildren.length=0,this._children.length=0,this.childSet={}}destroy(){this.parent?.removeChild(this)}containsPoint(e,t){return!1}pickNode(e,t,i=!1){if(!this.visible||1===this.pointerEvents||!this.containsPoint(e,t))return;let{children:r}=this;if(r.length>1e3)for(let i=r.length-1;i>=0;i--){let s=r[i],a=s.containsPoint(e,t)?s.pickNode(e,t):void 0;if(a)return a}else if(r.length)for(let i=r.length-1;i>=0;i--){let s=r[i].pickNode(e,t);if(s)return s}else if(!this.isContainerNode)return this}getBBox(){return null==this.cachedBBox&&(this.cachedBBox=Object.freeze(this.computeBBox())),this.cachedBBox}computeBBox(){}preRender(){for(let e of(this._childNodeCounts.groups=0,this._childNodeCounts.nonGroups=1,this.children)){let t=e.preRender();this._childNodeCounts.groups+=t.groups,this._childNodeCounts.nonGroups+=t.nonGroups}return this._childNodeCounts}render(e){let{stats:t}=e;if(this._dirty=0,e.debugNodeSearch){let t=this.name??this.id;e.debugNodeSearch.some(e=>"string"==typeof e?e===t:e.test(t))&&(e.debugNodes[this.name??this.id]=this)}t&&t.nodesRendered++}markDirty(e,t=1,i=t){let r=this._dirty,s=r>t||r===t&&t===i;(null!=this.cachedBBox||!s)&&(this.cachedBBox=void 0,this._dirty=Math.max(r,t),this.parent?this.parent.markDirty(this,i):this.layerManager&&this.layerManager.markDirty())}get dirty(){return this._dirty}markClean(e){let{force:t=!1,recursive:i=!0}=e??{};if(0!==this._dirty||t){if(this._dirty=0,!1!==i)for(let e of this._virtualChildren)e.markClean({force:t});if(!0===i)for(let e of this._children)e.markClean({force:t})}}onVisibleChange(){}get nodeCount(){let e=1,t=this._dirty>=0?1:0,i=this.visible?1:0,r=r=>{let{count:s,visibleCount:a,dirtyCount:o}=r.nodeCount;e+=s,i+=a,t+=o};for(let e of this._children)r(e);for(let e of this._virtualChildren)r(e);return{count:e,visibleCount:i,dirtyCount:t}}onZIndexChange(){this.parent&&(this.parent.dirtyZIndex=!0)}};u9._nextSerialNumber=0,c7([u6({redraw:3,changeCb:e=>e.onVisibleChange()})],u9.prototype,"visible",2),c7([u6({redraw:1,changeCb:e=>e.onZIndexChange()})],u9.prototype,"zIndex",2),c7([u6({redraw:1,changeCb:e=>e.onZIndexChange()})],u9.prototype,"zIndexSubOrder",2);var pe=u9,pt=(e,t,i)=>e*(1-i)+t*i,pi=e=>{let t=Math.abs(e);return t<=.04045?e/12.92:(e<0?-1:1)*((t+.055)/1.055)**2.4},pr=e=>{let t=Math.abs(e);return t>.0031308?(e<0?-1:1)*(1.055*t**(1/2.4)-.055):12.92*e},ps=class e{constructor(e,t,i,r=1){this.r=uW(0,e||0,1),this.g=uW(0,t||0,1),this.b=uW(0,i||0,1),this.a=uW(0,r||0,1)}static validColorString(t){return t.indexOf("#")>=0?!!e.parseHex(t):t.indexOf("rgb")>=0?!!e.stringToRgba(t):!!e.nameToHex[t.toLowerCase()]}static fromString(t){if(t.indexOf("#")>=0)return e.fromHexString(t);let i=e.nameToHex[t.toLowerCase()];if(i)return e.fromHexString(i);if(t.indexOf("rgb")>=0)return e.fromRgbaString(t);throw Error(`Invalid color string: '${t}'`)}static parseHex(e){let t;switch((e=e.replace(/ /g,"").slice(1)).length){case 6:case 8:t=[];for(let i=0;i<e.length;i+=2)t.push(parseInt(`${e[i]}${e[i+1]}`,16));break;case 3:case 4:t=e.split("").map(e=>parseInt(e,16)).map(e=>e+16*e)}if(t?.length>=3&&t.every(e=>e>=0))return 3===t.length&&t.push(255),t}static fromHexString(t){let i=e.parseHex(t);if(i){let[t,r,s,a]=i;return new e(t/255,r/255,s/255,a/255)}throw Error(`Malformed hexadecimal color string: '${t}'`)}static stringToRgba(e){let t=-1,i=-1;for(let r=0;r<e.length;r++){let s=e[r];if(-1===t&&"("===s)t=r;else if(")"===s){i=r;break}}if(-1===t||-1===i)return;let r=e.substring(t+1,i).split(","),s=[];for(let e=0;e<r.length;e++){let t=r[e],i=parseFloat(t);if(!Number.isFinite(i))return;i=t.indexOf("%")>=0?uW(0,i,100)/100:3===e?uW(0,i,1):uW(0,i,255)/255,s.push(i)}return s}static fromRgbaString(t){let i=e.stringToRgba(t);if(i){if(3===i.length)return new e(i[0],i[1],i[2]);if(4===i.length)return new e(i[0],i[1],i[2],i[3])}throw Error(`Malformed rgb/rgba color string: '${t}'`)}static fromArray(t){if(4===t.length)return new e(t[0],t[1],t[2],t[3]);if(3===t.length)return new e(t[0],t[1],t[2]);throw Error("The given array should contain 3 or 4 color components (numbers).")}static fromHSB(t,i,r,s=1){let a=e.HSBtoRGB(t,i,r);return new e(a[0],a[1],a[2],s)}static fromHSL(t,i,r,s=1){let a=e.HSLtoRGB(t,i,r);return new e(a[0],a[1],a[2],s)}static fromOKLCH(t,i,r,s=1){let a=e.OKLCHtoRGB(t,i,r);return new e(a[0],a[1],a[2],s)}static padHex(e){return 1===e.length?"0"+e:e}toHexString(){let t="#"+e.padHex(Math.round(255*this.r).toString(16))+e.padHex(Math.round(255*this.g).toString(16))+e.padHex(Math.round(255*this.b).toString(16));return this.a<1&&(t+=e.padHex(Math.round(255*this.a).toString(16))),t}toRgbaString(e=3){let t=[Math.round(255*this.r),Math.round(255*this.g),Math.round(255*this.b)],i=Math.pow(10,e);return 1!==this.a?(t.push(Math.round(this.a*i)/i),`rgba(${t.join(", ")})`):`rgb(${t.join(", ")})`}toString(){return 1===this.a?this.toHexString():this.toRgbaString()}toHSB(){return e.RGBtoHSB(this.r,this.g,this.b)}static RGBtoOKLCH(e,t,i){let r=pi(e),s=pi(t),a=pi(i),o=Math.cbrt(.4122214708*r+.5363325363*s+.0514459929*a),n=Math.cbrt(.2119034982*r+.6806995451*s+.1073969566*a),l=Math.cbrt(.0883024619*r+.2817188376*s+.6299787005*a),h=1.9779984951*o-2.428592205*n+.4505937099*l,d=.0259040371*o+.7827717662*n-.808675766*l,c=180*Math.atan2(d,h)/Math.PI;return[.2104542553*o+.793617785*n-.0040720468*l,Math.hypot(h,d),c>=0?c:c+360]}static OKLCHtoRGB(e,t,i){let r=t*Math.cos(i*Math.PI/180),s=t*Math.sin(i*Math.PI/180),a=(e+.3963377774*r+.2158037573*s)**3,o=(e-.1055613458*r-.0638541728*s)**3,n=(e-.0894841775*r-1.291485548*s)**3;return[pr(4.0767416621*a-3.3077115913*o+.2309699292*n),pr(-1.2684380046*a+2.6097574011*o-.3413193965*n),pr(-.0041960863*a-.7034186147*o+1.707614701*n)]}static RGBtoHSL(e,t,i){let r,s;let a=Math.min(e,t,i),o=Math.max(e,t,i),n=(o+a)/2;if(o===a)r=0,s=0;else{let l=o-a;s=n>.5?l/(2-o-a):l/(o+a),r=(o===e?(t-i)/l+(t<i?6:0):o===t?(i-e)/l+2:(e-t)/l+4)*60}return[r,s,n]}static HSLtoRGB(e,t,i){if(e=(e%360+360)%360,0===t)return[i,i,i];let r=i<.5?i*(1+t):i+t-i*t,s=2*i-r;function a(e){return(e<0&&(e+=1),e>1&&(e-=1),e<1/6)?s+(r-s)*6*e:e<.5?r:e<2/3?s+(r-s)*(2/3-e)*6:s}return[a(e/360+1/3),a(e/360),a(e/360-1/3)]}static RGBtoHSB(e,t,i){let r=Math.min(e,t,i),s=Math.max(e,t,i),a=0;if(r!==s){let o=s-r,n=(s-e)/o,l=(s-t)/o,h=(s-i)/o;(a=(e===s?h-l:t===s?2+n-h:4+l-n)/6)<0&&(a+=1)}return[360*a,0===s?0:(s-r)/s,s]}static HSBtoRGB(e,t,i){e=(e%360+360)%360/360;let r=0,s=0,a=0;if(0===t)r=s=a=i;else{let o=(e-Math.floor(e))*6,n=o-Math.floor(o),l=i*(1-t),h=i*(1-t*n),d=i*(1-t*(1-n));switch(o>>0){case 0:r=i,s=d,a=l;break;case 1:r=h,s=i,a=l;break;case 2:r=l,s=i,a=d;break;case 3:r=l,s=h,a=i;break;case 4:r=d,s=l,a=i;break;case 5:r=i,s=l,a=h}}return[r,s,a]}static mix(t,i,r){return new e(pt(t.r,i.r,r),pt(t.g,i.g,r),pt(t.b,i.b,r),pt(t.a,i.a,r))}};function pa(e,t){return i=>Number(e)*(1-i)+Number(t)*i}function po(e,t){if("string"==typeof e)try{e=ps.fromString(e)}catch(t){e=ps.fromArray([0,0,0])}if("string"==typeof t)try{t=ps.fromString(t)}catch(e){t=ps.fromArray([0,0,0])}return i=>ps.mix(e,t,i).toRgbaString()}ps.nameToHex={__proto__:null,aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aqua:"#00FFFF",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blue:"#0000FF",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgreen:"#006400",darkgrey:"#A9A9A9",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",fuchsia:"#FF00FF",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",gray:"#808080",green:"#008000",greenyellow:"#ADFF2F",grey:"#808080",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgray:"#D3D3D3",lightgreen:"#90EE90",lightgrey:"#D3D3D3",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",lime:"#00FF00",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",maroon:"#800000",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",navy:"#000080",oldlace:"#FDF5E6",olive:"#808000",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",purple:"#800080",rebeccapurple:"#663399",red:"#FF0000",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",silver:"#C0C0C0",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",teal:"#008080",thistle:"#D8BFD8",tomato:"#FF6347",transparent:"#00000000",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",white:"#FFFFFF",whitesmoke:"#F5F5F5",yellow:"#FFFF00",yellowgreen:"#9ACD32"};var pn=Symbol("BREAK"),pl="__decorator_config";function ph(e,t){null==Object.getOwnPropertyDescriptor(e,pl)&&Object.defineProperty(e,pl,{value:{}});let i=e[pl],r=t.toString();if(void 0!==i[r])return i[r];let s=new WeakMap;i[r]={setters:[],getters:[],observers:[],valuesMap:s};let a=Object.getOwnPropertyDescriptor(e,t),o=a?.set,n=a?.get;return Object.defineProperty(e,t,{set:function(e){let a;let{setters:l,observers:h}=i[r];for(let i of(l.some(e=>e.length>2)&&(a=n?n.call(this):s.get(this)),l))if((e=i(this,t,e,a))===pn)return;for(let t of(o?o.call(this,e):s.set(this,e),h))t(this,e,a)},get:function(){let e=n?n.call(this):s.get(this);for(let s of i[r].getters)if((e=s(this,t,e))===pn)return;return e},enumerable:!0,configurable:!1}),i[r]}function pd(e,t,i){return(r,s)=>{let a=ph(r,s);a.setters.push(e),t&&a.getters.unshift(t),i&&Object.assign(a,i)}}function pc(e){return void 0!==e&&pl in e}function pu(e){let t=new Set;for(;pc(e);)t.add(e?.[pl]),e=Object.getPrototypeOf(e);return Array.from(t).flatMap(e=>Object.keys(e))}function pp(e){return pu(e).reduce((t,i)=>(t[i]=e[i]??null,t),{})}function pg(e){return null!=e}function pm(e){return Array.isArray(e)}function pf(e){return"boolean"==typeof e}function pv(e){return e instanceof Date}function py(e){return pv(e)&&!isNaN(Number(e))}function pC(e){return e instanceof RegExp}function pw(e){return"function"==typeof e}function pb(e){return"object"==typeof e&&null!==e&&!pm(e)}function pS(e){return pm(e)||px(e)}function px(e){return"object"==typeof e&&null!==e&&Object.getPrototypeOf(e)===Object.prototype}function pM(e){return"string"==typeof e}function pE(e){return"number"==typeof e}function pD(e){return Number.isFinite(e)}function pI(e){return"undefined"!=typeof window&&e instanceof HTMLElement}function pk(e,t){return pM(t)&&Object.keys(e).includes(t)}function pT(e,t){return Object.values(e).includes(t)}function pA(e){return"symbol"==typeof e}function pR(e,t,i){for(let i in t)if(!(i in e))return!1;for(let r in e)if(!(r in t)||!i(e[r],t[r]))return!1;return!0}function pL(...e){return pP(...e.reverse())}function pP(...e){let t={};for(let i of e)if(pb(i))for(let e of pc(i)?pu(i):Object.keys(i))px(t[e])&&px(i[e])?t[e]=pP(t[e],i[e]):t[e]??(t[e]=i[e]);return t}function pF(e,...t){return t&&pm(e)?e.map(e=>pP(e,...t)):e}function pN(e,t){return Object.entries(e).reduce((i,[r,s])=>(i[r]=t(s,r,e),i),{})}function pO(e,t){let i={...e};for(let e of t)delete i[e];return i}function pB(e,t){return(pm(t)?t:t.split(".")).reduce((e,t)=>e[t],e)}var pG=new Set(["__proto__","constructor","prototype"]);function pz(e,t,i){let r=pm(t)?t.slice():t.split("."),s=r.pop();if(r.some(e=>pG.has(e)))return;let a=r.reduce((e,t)=>e[t],e);return a[s]=i,a[s]}function p_(e,t,i){if(void 0===i)return t;for(let r of e){let e=i[r];void 0!==e&&(t[r]=e)}return t}var pV={};c8(pV,{easeIn:()=>pH,easeInOut:()=>pW,easeInOutQuad:()=>pK,easeInQuad:()=>p$,easeOut:()=>pU,easeOutQuad:()=>pY,inverseEaseOut:()=>pZ,linear:()=>pj});var pj=e=>e,pH=e=>1-Math.cos(e*Math.PI/2),pU=e=>Math.sin(e*Math.PI/2),pW=e=>-(Math.cos(e*Math.PI)-1)/2,p$=e=>e*e,pY=e=>1-(1-e)**2,pK=e=>e<.5?2*e*e:1-(-2*e+2)**2/2,pZ=e=>2*Math.asin(e)/Math.PI,pq=["initial","remove","update","add","trailing","end","none"],pX={initial:{animationDuration:1,animationDelay:0},add:{animationDuration:.25,animationDelay:.75},remove:{animationDuration:.25,animationDelay:0},update:{animationDuration:.5,animationDelay:.25},trailing:{animationDuration:.2,animationDelay:1,skipIfNoEarlierAnimations:!0},end:{animationDelay:1.2,animationDuration:0,skipIfNoEarlierAnimations:!0},none:{animationDuration:0,animationDelay:0}},pQ=((E=pQ||{}).Loop="loop",E.Reverse="reverse",E);function pJ(e){return e.every(e=>e instanceof pe)?{nodes:e,selections:[]}:{nodes:[],selections:e}}var p0=class{constructor(e){this.isComplete=!1,this.elapsed=0,this.iteration=0,this.isPlaying=!1,this.isReverse=!1,this.id=e.id,this.groupId=e.groupId,this.autoplay=e.autoplay??!0,this.ease=e.ease??pj,this.phase=e.phase;let t=e.duration??pX[this.phase].animationDuration;this.duration=t*e.defaultDuration,this.delay=(e.delay??0)*e.defaultDuration,this.onComplete=e.onComplete,this.onPlay=e.onPlay,this.onStop=e.onStop,this.onUpdate=e.onUpdate,this.interpolate=this.createInterpolator(e.from,e.to),this.from=e.from,!0===e.skip&&(this.onUpdate?.(e.to,!1,this),this.onStop?.(this),this.onComplete?.(this),this.isComplete=!0),!1!==e.collapsable&&(this.duration=this.checkCollapse(e,this.duration))}checkCollapse(e,t){return!function e(t,i){return t===i||(Array.isArray(t)&&Array.isArray(i)?t.length===i.length&&t.every((t,r)=>e(t,i[r])):uj(t)&&uj(i)?t.equals(i):!!(px(t)&&px(i))&&pR(t,i,e))}(e.from,e.to)?t:0}play(e=!1){!this.isPlaying&&!this.isComplete&&(this.isPlaying=!0,this.onPlay?.(this),this.autoplay&&(this.autoplay=!1,e&&this.onUpdate?.(this.from,!0,this)))}pause(){this.isPlaying=!1}stop(){this.isPlaying=!1,this.isComplete||(this.isComplete=!0,this.onStop?.(this))}update(e){if(this.isComplete)return e;!this.isPlaying&&this.autoplay&&this.play(!0);let t=this.elapsed;if(this.elapsed+=e,this.delay>this.elapsed)return 0;let i=this.interpolate(this.isReverse?1-this.delta:this.delta);this.onUpdate?.(i,!1,this);let r=this.delay+this.duration;return this.elapsed>=r?(this.stop(),this.isComplete=!0,this.onComplete?.(this),e-(r-t)):0}get delta(){return this.ease(uW(0,(this.elapsed-this.delay)/this.duration,1))}createInterpolator(e,t){if("object"!=typeof t||uj(t))return this.interpolateValue(e,t);let i=[];for(let r in t){let s=this.interpolateValue(e[r],t[r]);null!=s&&i.push([r,s])}return e=>{let t={};for(let[r,s]of i)t[r]=s(e);return t}}interpolateValue(e,t){if(null!=e&&null!=t){if(uj(e))return i=>e[uV](t,i);try{switch(typeof e){case"number":return pa(e,t);case"string":return po(e,t);case"boolean":if(e===t)return()=>e}}catch(e){}throw Error(`Unable to interpolate values: ${e}, ${t}`)}}},p1={added:"add",updated:"update",removed:"remove",unknown:"initial","no-op":"none"};function p2(e,t,i,r,s,a,o){let{fromFn:n,toFn:l,applyFn:h=(e,t)=>e.setProperties(t)}=s,{nodes:d,selections:c}=pJ(r),u=(r,s)=>{let d;let c=0,u=0;for(let p of s){let g=r[c]===p,m={last:u>=s.length-1,lastLive:c>=r.length-1,prev:s[u-1],prevFromProps:d,prevLive:r[c-1],next:s[u+1],nextLive:r[c+(g?1:0)]},f=`${e}_${t}_${p.id}`;i.stopByAnimationId(f);let v="unknown";g?a&&o&&(v=function(e,t,i,r){let s=i(e,t);return r.added.has(s)?"added":r.removed.has(s)?"removed":"updated"}(p,p.datum,a,o)):v="removed";let{phase:y,start:C,finish:w,delay:b,duration:S,...x}=n(p,p.datum,v,m),{phase:M,start:E,finish:D,delay:I,duration:k,...T}=l(p,p.datum,v,m),A=null==w;i.animate({id:f,groupId:e,phase:y??M??"update",duration:S??k,delay:b??I,from:x,to:T,ease:pU,collapsable:A,onPlay:()=>{h(p,{...C,...E,...x})},onUpdate(e){h(p,e)},onStop:()=>{h(p,{...C,...E,...x,...T,...w,...D})}}),g&&c++,u++,d=x}},p=0;for(let r of c){let s=r.nodes();u(s.filter(e=>!r.isGarbage(e)),s),i.animate({id:`${e}_${t}_selection_${p}`,groupId:e,phase:"end",from:0,to:1,ease:pU,onStop(){r.cleanup()}}),p++}u(d,d)}function p3(e,t,i,r,s,a,o){let{nodes:n,selections:l}=pJ(r),{start:h,finish:d,phase:c}=o;i.animate({id:`${e}_${t}`,groupId:e,phase:c??"update",from:s,to:a,ease:pU,onPlay:()=>{if(h){for(let e of n)e.setProperties(h);for(let e of l)for(let t of e.nodes())t.setProperties(h)}},onUpdate(e){for(let t of n)t.setProperties(e);for(let t of l)for(let i of t.nodes())i.setProperties(e)},onStop:()=>{for(let e of n)e.setProperties({...a,...d});for(let e of l){for(let t of e.nodes())t.setProperties({...a,...d});e.cleanup()}}})}var p4=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],p6=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],p5=["January","February","March","April","May","June","July","August","September","October","November","December"],p8=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function p7(e,t=new Date(e.getFullYear(),0,1)){let i=e.getTimezoneOffset()-t.getTimezoneOffset();return Math.floor((e.getTime()-t.getTime()+6e4*i)/(36e5*24))}function p9(e,t){let i=new Date(e.getFullYear(),0,1).getDay(),r=new Date(e.getFullYear(),0,(t-i+7)%7+1);return r<=e?Math.floor(p7(e,r)/7)+1:0}var ge={a:e=>p6[e.getDay()],A:e=>p4[e.getDay()],b:e=>p8[e.getMonth()],B:e=>p5[e.getMonth()],c:"%x, %X",d:(e,t)=>gi(e.getDate(),2,t??"0"),e:"%_d",f:(e,t)=>gi(1e3*e.getMilliseconds(),6,t??"0"),H:(e,t)=>gi(e.getHours(),2,t??"0"),I:(e,t)=>{let i=e.getHours()%12;return 0===i?"12":gi(i,2,t??"0")},j:(e,t)=>gi(p7(e)+1,3,t??"0"),m:(e,t)=>gi(e.getMonth()+1,2,t??"0"),M:(e,t)=>gi(e.getMinutes(),2,t??"0"),L:(e,t)=>gi(e.getMilliseconds(),3,t??"0"),p:e=>12>e.getHours()?"AM":"PM",Q:e=>String(e.getTime()),s:e=>String(Math.floor(e.getTime()/1e3)),S:(e,t)=>gi(e.getSeconds(),2,t??"0"),u:e=>{let t=e.getDay();return t<1&&(t+=7),String(t%7)},U:(e,t)=>gi(p9(e,0),2,t??"0"),V:(e,t)=>gi(function e(t,i=t.getFullYear()){let r=new Date(i,0,1).getDay(),s=new Date(i,0,(4-r+7)%7-3+1);return s<=t?Math.floor(p7(t,s)/7)+1:e(t,i-1)}(e),2,t??"0"),w:(e,t)=>gi(e.getDay(),2,t??"0"),W:(e,t)=>gi(p9(e,1),2,t??"0"),x:"%-m/%-d/%Y",X:"%-I:%M:%S %p",y:(e,t)=>gi(e.getFullYear()%100,2,t??"0"),Y:(e,t)=>gi(e.getFullYear(),4,t??"0"),Z:e=>(function(e){let t=e.getTimezoneOffset(),i=Math.abs(t);return`${t>0?"-":"+"}${gi(Math.floor(i/60),2,"0")}${gi(Math.floor(i%60),2,"0")}`})(e),"%":()=>"%"},gt={_:" ",0:"0","-":""};function gi(e,t,i){let r=String(Math.floor(e));return r.length>=t?r:`${i.repeat(t-r.length)}${r}`}function gr(e){let t=[];for(;e.length>0;){let i=e.indexOf("%");if(0!==i){let r=i>0?e.substring(0,i):e;t.push(r)}if(i<0)break;let r=gt[e[i+1]];null!=r&&i++;let s=e[i+1],a=ge[s];if("function"==typeof a)t.push([a,r]);else if("string"==typeof a){let e=gr(a);t.push([e,r])}else t.push(`${r??""}${s}`);e=e.substring(i+2)}return e=>{let i="number"==typeof e?new Date(e):e;return t.map(e=>"string"==typeof e?e:e[0](i,e[1])).join("")}}function gs(e){return e instanceof Date?e.getTime():e}function ga(e,t,i){let r=gr(go(e,t,i));return e=>r(e)}function go(e=[],t=e,i=0){var r;let s=1/0;for(let t=1;t<e.length;t++)s=Math.min(s,Math.abs(e[t]-e[t-1]));let a=new Date(t[0]).getFullYear(),o=new Date(t.at(-1)).getFullYear();return function(e,t,i){let r=gs(i[0]),s=Math.abs(gs(i.at(-1))-r),a=[["hour",216e5,12096e5,3,"%I %p"],["hour",6e4,216e5,3,"%I:%M"],["second",1e3,216e5,1,":%S"],["ms",0,216e5,0,".%L"],["am/pm",6e4,216e5,3,"%p"]," ",["day",864e5,6048e5,4,"%a"],["month",0===s?0:6048e5,314496e5,5,"%b %d"],["month",3024e6,31536e7,6,"%B"]," ",["year",t||7===e?0:31536e6,1/0,7,"%Y"]].filter(t=>{if("string"==typeof t)return!0;let[i,r,a,o]=t;return o>=e&&r<=s&&s<a}).reduce((e,t)=>("string"==typeof t?e.result.push(t):e.used.has(t[0])||(e.result.push(t),e.used.add(t[0])),e),{result:[],used:new Set}).result,o=a.findIndex(e=>"string"!=typeof e),n=a.length-[...a].reverse().findIndex(e=>"string"!=typeof e);return a.slice(o,n).map(e=>"string"==typeof e?e:e[4]).join("").replaceAll(/\s+/g," ").trim()}(Math.max((isFinite(s)?function(e,t){if(e<1e3)return 0;if(e<6e4)return 1;if(e<36e5)return 2;if(e<864e5)return 3;if(e<6048e5)return 4;if(e<24192e5||e<26784e5&&function(e){let t=new Date(e[0]).getMonth();for(let i=1;i<e.length;i++){let r=new Date(e[i]).getMonth();if(t===r)return!0;t=r}return!1}(t))return 5;if(e<31536e6)return 6;return 7}(s,e):(r=e[0],up.floor(r)<r?0:um.floor(r)<r?1:uv.floor(r)<r?2:uy.floor(r)<r?3:uI.floor(r)<r?uw.floor(r)<r?4:5:uk.floor(r)<r?6:7))-i,0),o-a>0,e)}var gn=(e,t)=>{let i=Symbol(String(t));e[i]=void 0,Object.defineProperty(e,t,{get(){return this[i]},set(e){this[i]!==e&&(this[i]=e,this.invalid=!0)},enumerable:!0,configurable:!1})},gl=class e{constructor(){this.type="band",this.invalid=!0,this.range=[0,1],this.round=!1,this.interval=void 0,this.index=new Map,this.ordinalRange=[],this._domain=[],this._bandwidth=1,this._step=1,this._inset=1,this._rawBandwidth=1,this._paddingInner=0,this._paddingOuter=0}static is(t){return t instanceof e}refresh(){this.invalid&&(this.invalid=!1,this.update(),this.invalid&&ul.warnOnce("Expected update to not invalidate scale"))}set domain(e){for(let t of(this.index=new Map,this.invalid=!0,this._domain=[],e)){let e=gs(t);void 0===this.getIndex(e)&&this.index.set(e,this._domain.push(t)-1)}}get domain(){return this._domain}getDomain(){return this._domain}ticks(){return this.refresh(),this._domain}convert(e){this.refresh();let t=this.getIndex(e);return null==t?NaN:this.ordinalRange[t]??NaN}invert(e){this.refresh();let t=this.ordinalRange.findIndex(t=>t===e);return this.domain[t]}invertNearest(e){this.refresh();let t=-1,i=1/0,r=this.ordinalRange.findIndex((r,s)=>{if(r===e)return!0;let a=Math.abs(e-r);return a<i&&(i=a,t=s),!1});return this.domain[r]??this.domain[t]}get bandwidth(){return this.refresh(),this._bandwidth}get step(){return this.refresh(),this._step}get inset(){return this.refresh(),this._inset}get rawBandwidth(){return this.refresh(),this._rawBandwidth}set padding(e){e=uW(0,e,1),this._paddingInner=e,this._paddingOuter=e}get padding(){return this._paddingInner}set paddingInner(e){this._paddingInner=uW(0,e,1)}get paddingInner(){return this._paddingInner}set paddingOuter(e){this._paddingOuter=uW(0,e,1)}get paddingOuter(){return this._paddingOuter}update(){let e,t,i;let r=this._domain.length;if(0===r)return;let[s,a]=this.range,{_paddingInner:o}=this,{_paddingOuter:n,round:l}=this,h=a-s;1===r?(o=0,e=h*(1-2*n),t=l?Math.round(e):e,i=h*n):(e=h/Math.max(1,r-o+2*n),i=s+(h-(t=l?Math.floor(e):e)*(r-o))/2);let d=t*(1-o);l&&(i=Math.round(i),d=Math.round(d)),this._step=t,this._inset=i,this._bandwidth=d,this._rawBandwidth=e*(1-o),this.ordinalRange=this._domain.map((e,r)=>i+t*r)}getIndex(e){return this.index.get(e instanceof Date?e.getTime():e)}};c7([gn],gl.prototype,"range",2),c7([gn],gl.prototype,"round",2),c7([gn],gl.prototype,"interval",2);var gh=gl,gd=class{set(e){let{className:t=this.constructor.name}=this.constructor;if("object"!=typeof e)return ul.warn(`unable to set ${t} - expecting a properties object`),this;let i=new Set(Object.keys(e));for(let t of pu(this))if(i.has(t)){let r=e[t];if(gu(this[t])){if(this[t]instanceof gc){let e=this[t].reset(r);null!=e?this[t]=e:ul.warn(`unable to set [${t}] - expecting a properties array`)}else this[t].set(r)}else this[t]=r;i.delete(t)}for(let e of i)ul.warn(`unable to set [${e}] in ${t} - property is unknown`);return this}isValid(e){return pu(this).every(t=>{let{optional:i}=function(e,t){let i=t.toString();for(;pc(e);){let t=e[pl];if(Object.hasOwn(t,i))return t[i];e=Object.getPrototypeOf(e)}}(this,t),r=!0===i||void 0!==this[t];return r||ul.warnOnce(`${e??""}[${t}] is required.`),r})}toJson(){return pu(this).reduce((e,t)=>{let i=this[t];return e[t]=gu(i)?i.toJson():i,e},{})}},gc=class e extends Array{constructor(e,...t){super(t.length),Object.defineProperty(this,"itemFactory",{value:e?.prototype?.constructor?.name?t=>new e().set(t):e,enumerable:!1,configurable:!1}),this.set(t)}set(e){if(pm(e)){this.length=e.length;for(let t=0;t<e.length;t++)this[t]=this.itemFactory(e[t])}return this}reset(t){if(Array.isArray(t))return new e(this.itemFactory,...t)}toJson(){return this.map(e=>e?.toJson?.()??e)}};function gu(e){return e instanceof gd||e instanceof gc}function gp(e,t={}){let{optional:i=!1,property:r}=t;return pd((s,a,o)=>{let n={...t,target:s,property:a};if(i&&void 0===o||e(o,n))return gu(s[a])&&!gu(o)?(s[a].set(o),s[a]):o;let l=r??String(a).replace(/^_*/,""),h=s.constructor.className??s.constructor.name.replace(/Properties$/,""),d=me(o);if(null!=d&&d.length>50){let e=d.length-50;d=d.slice(0,50)+`... (+${e} characters)`}return ul.warn(`Property [${l}] of [${h}] cannot be set to [${d}]${e.message?`; expecting ${g7(e,n)}`:""}, ignoring.`),pn},void 0,{optional:i})}var gg=(...e)=>{let t=[];return g8((i,r)=>(t.length=0,e.every(e=>{let s=e(i,r);return s||t.push(g7(e,r)),s})),()=>t.filter(Boolean).join(" AND "))},gm=(...e)=>g8((t,i)=>e.some(e=>e(t,i)),t=>e.map(e=>g7(e,t)).filter(Boolean).join(" OR ")),gf=g9(g8((e,t)=>gu(e)||pb(e)&&gu(t.target[t.property]),"a properties object")),gv=g9(g8(e=>pb(e),"an object")),gy=g8(pf,"a boolean"),gC=g8(pw,"a function"),gw=g8(pM,"a string"),gb=Object.assign(g8(pD,"a number"),{restrict({min:e,max:t}={}){let i=["a number"],r=pE(e),s=pE(t);return r&&s?i.push(`between ${e} and ${t} inclusive`):r?i.push(`greater than or equal to ${e}`):s&&i.push(`less than or equal to ${t}`),g8(i=>pD(i)&&(!r||i>=e)&&(!s||i<=t),i.join(" "))}}),gS=g8(e=>pE(e)&&!isNaN(e),"a real number"),gx=g8(e=>pE(e)&&isNaN(e),"NaN"),gM=gb.restrict({min:0}),gE=gb.restrict({min:0,max:1}),gD=gb.restrict({min:-360,max:360}),gI=gm(gb,gx),gk=Object.assign(g8(pm,"an array"),{restrict({length:e,minLength:t}={}){let i="an array";return pE(t)&&t>0?i="a non-empty array":pE(e)&&(i=`an array of length ${e}`),g8(i=>pm(i)&&(!pE(e)||i.length===e)&&(!pE(t)||i.length>=t),i)}}),gT=(e,t)=>g8((t,i)=>pm(t)&&t.every(t=>e(t,i)),e=>{let i=g7(gk,e)??"";return t?`${i} of ${t}`:i}),gA=e=>pD(e)||py(e),gR=e=>g8((t,i)=>!gA(t)||!gA(i.target[e])||t<i.target[e],`to be less than ${e}`),gL=e=>g8((t,i)=>!gA(t)||!gA(i.target[e])||t>i.target[e],`to be greater than ${e}`),gP=g8(py,"Date object"),gF=gm(gP,gM),gN="A color string can be in one of the following formats to be valid: #rgb, #rrggbb, rgb(r, g, b), rgba(r, g, b, a) or a CSS color name such as 'white', 'orange', 'cyan', etc",gO=g8(e=>pM(e)&&ps.validColorString(e),`color String. ${gN}`),gB=g8(gT(gO),`color strings. ${gN}`),gG=gT(gy,"boolean values"),gz=gT(gb,"numbers"),g_=gT(gw,"strings"),gV=g8(gT(gP),"Date objects"),gj=g8(gT(gf),"objects"),gH=g4(["butt","round","square"],"a line cap"),gU=g4(["round","bevel","miter"],"a line join"),gW=g4(["solid","dashed","dotted"],"a line style"),g$=g8(gT(gM),"numbers specifying the length in pixels of alternating dashes and gaps, for example, [6, 3] means dashes with a length of 6 pixels with gaps between of 3 pixels."),gY=g4(["top","right","bottom","left"],"a position"),gK=g4(["normal","italic","oblique"],"a font style"),gZ=gm(g4(["normal","bold","bolder","lighter"],"a font weight"),gb.restrict({min:1,max:1e3})),gq=g4(["never","always","hyphenate","on-space"],"a text wrap strategy"),gX=g4(["left","center","right"],"a text align"),gQ=g4(["top","middle","bottom"],"a vertical align"),gJ=g4(["ellipsis","hide"],"an overflow strategy"),g0=g4(["horizontal","vertical"],"a direction"),g1=g4(["inside","outside"],"a placement"),g2=gm(g4(["exact","nearest"],"interaction range"),gb),g3=g4(["top","bottom","left","right"]);function g4(e,t="a"){return g8(t=>e.includes(t),`${t} keyword such as ${function(e){let t=e.map(e=>`'${e}'`);if(1===t.length)return t[0];let i=t.pop();return`${t.join(", ")} or ${i}`}(e)}`)}var g6=gm(gg(gb.restrict({min:1}),gR("maxSpacing")),gx),g5=gm(gg(gb.restrict({min:1}),gL("minSpacing")),gx);function g8(e,t){return e.message=t,e}function g7(e,t){return pw(e.message)?e.message(t):e.message}function g9(e){return Object.assign(e,{restrict:t=>g8(e=>e instanceof t,i=>g7(e,i)??`an instance of ${t.name}`)})}function me(e){if("number"==typeof e){if(isNaN(e))return"NaN";if(e===1/0)return"Infinity";if(e===-1/0)return"-Infinity"}return JSON.stringify(e)}var mt=((D=mt||{}).X="x",D.Y="y",D),mi=class{constructor(){this.moduleMap=new Map}*modules(){for(let e of this.moduleMap.values())yield e.moduleInstance}addModule(e,t){if(this.moduleMap.has(e.optionsKey))throw Error(`AG Charts - module already initialised: ${e.optionsKey}`);this.moduleMap.set(e.optionsKey,{module:e,moduleInstance:t(e)})}removeModule(e){let t=pM(e)?e:e.optionsKey;this.moduleMap.get(t)?.moduleInstance.destroy(),this.moduleMap.delete(t)}getModule(e){return this.moduleMap.get(pM(e)?e:e.optionsKey)?.moduleInstance}isEnabled(e){return this.moduleMap.has(pM(e)?e:e.optionsKey)}mapModules(e){return Array.from(this.moduleMap.values(),(t,i)=>e(t.moduleInstance,i))}destroy(){for(let e of this.moduleMap.keys())this.moduleMap.get(e)?.moduleInstance.destroy();this.moduleMap.clear()}},mr={};function ms(e,t){let{nodes:i,selections:r}=pJ(e);for(let e of r){for(let i of e.nodes()){let e=t(i,i.datum);i.setProperties(e)}e.cleanup()}for(let e of i){let i=t(e,e.datum);e.setProperties(i)}}c8(mr,{resetMotion:()=>ms});var ma=class e{constructor(t,i){this.invalid=!0,this.nice=!1,this.interval=void 0,this.tickCount=e.defaultTickCount,this.minTickCount=0,this.maxTickCount=1/0,this.niceDomain=[],this.defaultClampMode="raw",this.domain=t,this.range=i}static is(t){return t instanceof e}transform(e){return e}transformInvert(e){return e}calcBandwidth(e=1){let t=this.getDomain(),i=this.getPixelRange(),r=Math.min(Math.abs(t[1]-t[0])/e+1,Math.floor(i));return i/Math.max(1,r)}getDomain(){return this.nice&&(this.refresh(),this.niceDomain.length)?this.niceDomain:this.domain}convert(e,t){let i=t?.clampMode??this.defaultClampMode;if(!this.domain||this.domain.length<2)return NaN;this.refresh();let r=this.getDomain().map(e=>this.transform(e)),[s,a]=r,{range:o}=this,[n,l]=o;if(e=this.transform(e),"clamped"===i){let[t,i]=uY(r.map(Number));if(Number(e)<t)return n;if(Number(e)>i)return l}return s===a?(n+l)/2:e===s?n:e===a?l:n+(Number(e)-Number(s))/(Number(a)-Number(s))*(l-n)}invert(e){let t;this.refresh();let[i,r]=this.getDomain().map(e=>this.transform(e)),{range:s}=this,[a,o]=s,n=a>o;return e<(n?o:a)?n?r:i:e>(n?a:o)?n?i:r:(t=a===o?this.toDomain((Number(i)+Number(r))/2):this.toDomain(Number(i)+(e-a)/(o-a)*(Number(r)-Number(i))),this.transformInvert(t))}refresh(){this.invalid&&(this.invalid=!1,this.update(),this.invalid&&ul.warnOnce("Expected update to not invalidate scale"))}getPixelRange(){let[e,t]=this.range;return Math.abs(t-e)}};ma.defaultTickCount=5,ma.defaultMaxTickCount=6,c7([gn],ma.prototype,"domain",2),c7([gn],ma.prototype,"range",2),c7([gn],ma.prototype,"nice",2),c7([gn],ma.prototype,"interval",2),c7([gn],ma.prototype,"tickCount",2),c7([gn],ma.prototype,"minTickCount",2),c7([gn],ma.prototype,"maxTickCount",2);var mo=ma;function mn(e){let t,i;let r=md.exec(e);r&&([,t,e,i]=r);let s=mh.exec(e);if(!s)throw Error(`The number formatter is invalid: ${e}`);let[,a,o,n,l,h,d,c,u,p,g]=s;return{fill:a,align:o,sign:n,symbol:l,zero:h,width:parseInt(d),comma:c,precision:parseInt(u),trim:!!p,type:g,prefix:t,suffix:i}}function ml(e){let t,i;let r="string"==typeof e?mn(e):e,{fill:s,align:a,sign:o="-",symbol:n,zero:l,width:h,comma:d,type:c,prefix:u="",suffix:p="",precision:g}=r,{trim:m}=r,f=null==g||isNaN(g);if(c){if(c in mu&&c in mc)t=f?mc[c]:mu[c];else if(c in mu)t=mu[c];else if(c in mc)t=mc[c];else throw Error(`The number formatter type is invalid: ${c}`)}else t=mu.g,m=!0;return i=null==g||f?c?6:12:g,e=>{let r=t(e,i);return m&&(r=r.replace(/\.0+$/,"").replace(/(\.[1-9])0+$/,"$1")),d&&(r=function(e,t){let i=e.indexOf(".");i<0&&(i=e.length);let r=e.substring(0,i).split(""),s=e.substring(i);for(let e=r.length-3;e>0;e-=3)r.splice(e,0,t);return`${r.join("")}${s}`}(r,d)),r=function(e,t,i=""){return"("===i?e>=0?t:`(${t})`:`${e>=0?"+"===i?"+":"":"−"}${t}`}(e,r,o),n&&"#"!==n&&(r=`${n}${r}`),"#"===n&&"x"===c&&(r=`0x${r}`),"s"===c&&(r=`${r}${mp[mm(e)]}`),("%"===c||"p"===c)&&(r=`${r}%`),null==h||isNaN(h)||(r=function(e,t,i=" ",r=">"){let s=e;if(">"!==r&&r){if("<"===r)s=s.padEnd(t,i);else if("^"===r){let e=Math.max(0,t-s.length),r=Math.ceil(e/2),a=Math.floor(e/2);s=(s=s.padStart(r+s.length,i)).padEnd(a+s.length,i)}}else s=s.padStart(t,i);return s}(r,h,s??l,a)),r=`${u}${r}${p}`}}var mh=/^(?:(.)?([<>=^]))?([+\-( ])?([$€£¥₣₹#])?(0)?(\d+)?(,)?(?:\.(\d+))?(~)?([%a-z])?$/i,md=/^((?:[^#]|#[^{])*)#{([^}]+)}(.*)$/,mc={b:e=>mg(e).toString(2),c:e=>String.fromCharCode(e),d:e=>Math.round(Math.abs(e)).toFixed(0),o:e=>mg(e).toString(8),x:e=>mg(e).toString(16),X:e=>mc.x(e).toUpperCase(),n:e=>mc.d(e),"%":e=>`${mg(100*e).toFixed(0)}`},mu={e:(e,t)=>Math.abs(e).toExponential(t),E:(e,t)=>mu.e(e,t).toUpperCase(),f:(e,t)=>Math.abs(e).toFixed(t),F:(e,t)=>mu.f(e,t).toUpperCase(),g:(e,t)=>{if(0===e)return"0";let i=Math.abs(e),r=Math.floor(Math.log10(i));return r>=-4&&r<t?i.toFixed(t-1-r):i.toExponential(t-1)},G:(e,t)=>mu.g(e,t).toUpperCase(),n:(e,t)=>mu.g(e,t),p:(e,t)=>mu.r(100*e,t),r:(e,t)=>{if(0===e)return"0";let i=Math.abs(e),r=Math.floor(Math.log10(i))-(t-1);if(r<=0)return i.toFixed(-r);let s=10**r;return(Math.round(i/s)*s).toFixed()},s:(e,t)=>{let i=mm(e);return mu.r(e/10**i,t)},"%":(e,t)=>mu.f(100*e,t)},mp={[-24]:"y",[-21]:"z",[-18]:"a",[-15]:"f",[-12]:"p",[-9]:"n",[-6]:"\xb5",[-3]:"m",0:"",3:"k",6:"M",9:"G",12:"T",15:"P",18:"E",21:"Z",24:"Y"};function mg(e){return Math.floor(Math.abs(e))}function mm(e){return uW(-24,e?3*Math.floor(Math.log10(Math.abs(e))/3):0,24)}var mf=(e,t,i)=>({duration:t*i,timeInterval:e,step:i}),mv=[mf(up,1e3,1),mf(up,1e3,5),mf(up,1e3,15),mf(up,1e3,30),mf(um,6e4,1),mf(um,6e4,5),mf(um,6e4,15),mf(um,6e4,30),mf(uv,36e5,1),mf(uv,36e5,3),mf(uv,36e5,6),mf(uv,36e5,12),mf(uy,864e5,1),mf(uy,864e5,2),mf(uw,6048e5,1),mf(uw,6048e5,2),mf(uw,6048e5,3),mf(uI,2592e6,1),mf(uI,2592e6,2),mf(uI,2592e6,3),mf(uI,2592e6,4),mf(uI,2592e6,6),mf(uk,31536e6,1)],my=[1,2,5,10];function mC(e,t){return Math.abs(Math.round(e)-e)<t}function mw(e,t,i,r,s){if(i<2)return[e,t];let a=mS(e,t,i,r,s);return Number.isFinite(a)?(mC(e/a,1e-12)||(e=Math.ceil(e/a)*a),mC(t/a,1e-12)||(t=Math.floor(t/a)*a),mE(e,t,a)):[]}function mb(e,t,i,r,s,a){let o=a??Math.abs(t-e)/Math.max(i,1),n=0;for(let e of mv){if(o<=e.duration)break;n++}if(0===n){let a=Math.max(mS(e,t,i,r,s),1);return uc.every(a)}if(n===mv.length){let o=null==a?mS(e/31536e6,t/31536e6,i,r,s):1;return uk.every(o)}let l=mv[n-1],h=mv[n],{timeInterval:d,step:c}=o-l.duration<h.duration-o?l:h;return d.every(c)}function mS(e,t,i,r=0,s=1/0){if(e===t)return uW(1,r,s);if(i<1)return NaN;let a=Math.abs(t-e),o=10**Math.floor(Math.log10(a/i)),n=NaN,l=1/0,h=!1;for(let e of my){let t=Math.ceil(a/(e*o)),d=t>=r&&t<=s;if(h&&!d)continue;let c=Math.abs(t-i);(l>c||h!==d)&&(h||(h=d),l=c,n=e)}return n*o}function mx(e){for(let t=e.length-1;t>=0;t-=1)if("0"!==e[t])return t+1;return 0}function mM(e,t){let i=mn(t??",f");(null==i.precision||isNaN(i.precision))&&(!i.type||"eEFgGnprs".includes(i.type)?i.precision=Math.max(...e.map(e=>{if(!Number.isFinite(e))return 0;let[t,r]=e.toExponential((i.type?6:12)-1).split(/\.|e/g);return("1"!==t&&"-1"!==t?1:0)+mx(r)+1})):"f%".includes(i.type)&&(i.precision=Math.max(...e.map(e=>{if(!Number.isFinite(e)||0===e)return 0;let t=Math.floor(Math.log10(Math.abs(e))),r=i.type?6:12;return Math.max(0,mx(e.toExponential(r-1).split(/\.|e/g)[1])-t)}))));let r=ml(i);return e=>r(Number(e))}function mE(e,t,i){if(!Number.isFinite(i)||i<=0)return[];let r=10**u0(i),s=Math.min(e,t),a=Math.max(e,t),o=[];for(let e=0;;e+=1){let t=Math.round((s+i*e)*r)/r;if(t<=a)o.push(t);else break}return o}function mD(e,t){return e>=t&&(ul.warnOnce("the configured interval results in more than 1 item per pixel, ignoring. Supply a larger interval or omit this configuration"),!0)}var mI=class e extends mo{constructor(){super([1,10],[0,1]),this.type="log",this.base=10,this.baseLog=uo,this.basePow=uo,this.log=e=>Math.min(...this.domain)>=0?this.baseLog(e):-this.baseLog(-e),this.pow=e=>Math.min(...this.domain)>=0?this.basePow(e):-this.basePow(-e),this.defaultClampMode="clamped"}toDomain(e){return e}transform(e){return Math.min(...this.domain)>=0?Math.log(e):-Math.log(-e)}transformInvert(e){return Math.min(...this.domain)>=0?Math.exp(e):-Math.exp(-e)}refresh(){this.base<=0&&(this.base=0,ul.warnOnce("expecting a finite Number greater than to 0")),super.refresh()}update(){this.domain&&!(this.domain.length<2)&&(this.baseLog=e.getBaseLogMethod(this.base),this.basePow=e.getBasePowerMethod(this.base),this.nice&&this.updateNiceDomain())}updateNiceDomain(){let[e,t]=this.domain,i=e>t?Math.ceil:Math.floor,r=e>t?Math.floor:Math.ceil,s=this.pow(i(this.log(e))),a=this.pow(r(this.log(t)));this.niceDomain=[s,a]}ticks(){let e=this.tickCount??10;if(!this.domain||this.domain.length<2||e<1)return[];this.refresh();let t=this.base,[i,r]=this.getDomain(),s=Math.min(i,r),a=Math.max(i,r),o=this.log(s),n=this.log(a);if(this.interval){let e=Math.min(Math.abs(this.interval),Math.abs(n-o)),t=mE(o,n,e).map(this.pow).filter(e=>e>=s&&e<=a);if(!mD(t.length,this.getPixelRange()))return t}let l=n-o>=e;if(t%1!=0||l)return mw(o,n,Math.min(n-o,e)).map(this.pow);let h=[],d=s>0;o=Math.floor(o)-1,n=Math.round(n)+1;let c=uK(this.range)/e,u=1/0;for(let e=o;e<=n;e++){let i=this.convert(this.pow(e+1));for(let r=1;r<t;r++){let o=d?r:t-r+1,n=this.pow(e)*o,l=this.convert(n),p=Math.abs(u-l),g=Math.abs(l-i),m=p>=c&&g>=c;n>=s&&n<=a&&(1===r||m||0===h.length)&&(h.push(n),u=l)}}return h}tickFormat({count:e,ticks:t,specifier:i}){return e!==1/0&&null==t&&this.ticks(),i??(i=10===this.base?".0e":","),pM(i)?ml(i):i}static getBaseLogMethod(e){switch(e){case 10:return Math.log10;case Math.E:return Math.log;case 2:return Math.log2;default:let t=Math.log(e);return e=>Math.log(e)/t}}static getBasePowerMethod(e){switch(e){case 10:return e=>e>=0?10**e:1/10**-e;case Math.E:return Math.exp;default:return t=>e**t}}};function mk(e){if(0===e.length)return null;let t=1/0,i=-1/0;for(let r of e)r instanceof Date&&(r=r.getTime()),"number"==typeof r&&(r<t&&(t=r),r>i&&(i=r));let r=[t,i];return r.every(isFinite)?r:null}function mT(e,t,i){let r=!1;return e.length>2&&(e=mk(e)??[NaN,NaN]),isNaN(t)||(r||(r=t>e[0]),e=[t,e[1]]),isNaN(i)||(r||(r=i<e[1]),e=[e[0],i]),e[0]>e[1]&&(e=[]),{extent:e,clipped:r}}function mA(e,t){if(null==e||null==t||e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(Array.isArray(e[i])&&Array.isArray(t[i])){if(!mA(e[i],t[i]))return!1}else if(e[i]!==t[i])return!1;return!0}function mR(e){return void 0===e?[]:Array.isArray(e)?e:[e]}function mL(e){return Array.from(new Set(e))}function mP(e,t){return e.reduce((e,i)=>{let r=t(i);return e[r]??(e[r]=[]),e[r].push(i),e},{})}function mF(e,t,i=0){if(0===e.length)return[];let r=[];for(let s=0;s<t;s++)r.push(e.at((s+i)%e.length));return r}c7([gn],mI.prototype,"base",2);var mN=class e extends mo{constructor(){super([],[0,1]),this.type="time"}toDomain(e){return new Date(e)}convert(e,t){return super.convert(new Date(e),t)}invert(e){return new Date(super.invert(e))}ticks(){if(!this.domain||this.domain.length<2)return[];this.refresh();let{interval:t,nice:i,tickCount:r,minTickCount:s,maxTickCount:a}=this,[o,n]=uY(this.getDomain().map(gs));return null!=t?e.getTicksForInterval({start:o,stop:n,interval:t,availableRange:this.getPixelRange()})??e.getDefaultTicks({start:o,stop:n,tickCount:r,minTickCount:s,maxTickCount:a}):i&&2===r?this.niceDomain:i&&1===r?this.niceDomain.slice(0,1):e.getDefaultTicks({start:o,stop:n,tickCount:r,minTickCount:s,maxTickCount:a})}static getDefaultTicks({start:e,stop:t,tickCount:i,minTickCount:r,maxTickCount:s}){let a=mb(e,t,i,r,s);return a?a.range(new Date(e),new Date(t)):[]}static getTicksForInterval({start:e,stop:t,interval:i,availableRange:r}){if(!i)return[];if(i instanceof uh){let s=i.range(new Date(e),new Date(t));if(mD(s.length,r))return;return s}let s=Math.abs(i);if(mD((t-e)/s,r))return;let a=mv.findLast(e=>s%e.duration==0);if(a)return a.timeInterval.every(s/(a.duration/a.step)).range(new Date(e),new Date(t));let o=new Date(e),n=new Date(t),l=[];for(;o<=n;)l.push(o),(o=new Date(o)).setMilliseconds(o.getMilliseconds()+s);return l}tickFormat({ticks:e,domain:t,specifier:i,formatOffset:r}){return null==i?ga(e,t,r):gr(i)}update(){this.domain&&!(this.domain.length<2)&&this.nice&&this.updateNiceDomain()}updateNiceDomain(){let[e,t]=this.domain;for(let i=0;i<4;i++){this.updateNiceDomainIteration(e,t);let[i,r]=this.niceDomain;if(gs(e)===gs(i)&&gs(t)===gs(r))break;e=i,t=r}}updateNiceDomainIteration(e,t){let i;let r=Math.min(gs(e),gs(t)),s=Math.max(gs(e),gs(t)),a=e>t,{interval:o}=this;if(o instanceof uh)i=o;else{let e="number"==typeof o?(s-r)/Math.max(o,1):this.tickCount;i=mb(r,s,e,this.minTickCount,this.maxTickCount)}if(i){let e=i.range(new Date(r),new Date(s),!0),t=a?[...e].reverse():e,o=t[0],n=t.at(-1);this.niceDomain=[o,n]}}};function mO(e,t){return e-t}var mB=class e extends gh{constructor(){super(...arguments),this.type="ordinal-time",this.tickCount=mo.defaultTickCount,this.minTickCount=0,this.maxTickCount=1/0,this.interval=void 0,this._domain=[],this.timestamps=[],this.sortedTimestamps=[],this.visibleRange=[0,1]}static is(t){return t instanceof e}setVisibleRange(e){this.visibleRange=e}set domain(e){if(this.invalid=!0,0===e.length){this._domain=[];return}this._domain=e,this.timestamps=mL(e.map(gs)),this.sortedTimestamps=this.timestamps.slice().sort(mO)}get domain(){return this._domain}ticks(){let e;this.refresh();let[t,i]=[this.timestamps[0],this.timestamps.at(-1)],r=Math.min(t,i),s=Math.max(t,i);if(null==this.interval)e=this.getDefaultTicks(this.maxTickCount,t>i);else{let[t,i]=this.range,a=Math.abs(i-t);e=mN.getTicksForInterval({start:r,stop:s,interval:this.interval,availableRange:a})??[]}let a=new Set;return e.filter(e=>{let t=this.convert(e);return!(isNaN(t)||a.has(t))&&(a.add(t),!0)})}getDefaultTicks(e,t){let i=[],r=this.timestamps.length,s=Math.ceil(r*(this.visibleRange[1]-this.visibleRange[0])/e),a=Math.floor(s/2);for(let[e,o]of this.timestamps.entries())s>0&&(e+a)%s||(t?i.push(new Date(this.timestamps[r-e-1])):i.push(new Date(o)));return i}convert(e){this.refresh();let t=Number(e);if(t<this.sortedTimestamps[0])return NaN;let i=this.findInterval(t);return this.timestamps[0]!==this.sortedTimestamps[0]&&(i=this.timestamps.length-i-1),this.ordinalRange[i]??NaN}findInterval(e){let{sortedTimestamps:t}=this,i=0,r=t.length-1;for(;i<=r;){let s=Math.floor((i+r)/2);if(t[s]===e)return s;t[s]<e?i=s+1:r=s-1}return i}tickFormat({ticks:e,domain:t,specifier:i}){return null==i?ga(e,t):gr(i)}invert(e){this.refresh();let t=this.ordinalRange.findIndex(t=>e<=t);return this.domain[t]}invertNearest(e){return new Date(super.invertNearest(e))}};function mG(e,t){return"number"==typeof e&&"number"==typeof t?e-t:"string"==typeof e&&"string"==typeof t?e.localeCompare(t):null==e&&null==t?0:null==e?-1:null==t?1:String(e).localeCompare(String(t))}function mz(e){return"function"==typeof e?e():e}function m_(e,t,i){for(let r in e){let s=i(mz(e[r]),mz(t[r]));if(0!==s)return s}return 0}c7([gn],mB.prototype,"tickCount",2),c7([gn],mB.prototype,"minTickCount",2),c7([gn],mB.prototype,"maxTickCount",2),c7([gn],mB.prototype,"interval",2);var mV=Object.freeze([1,0,0,1,0,0]);function mj(e,t,i=1e-8){return e===t||Math.abs(t-e)<i}var mH=class e{get e(){return[...this.elements]}constructor(e=[...mV]){this.elements=e}setElements(e){let t=this.elements;return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],this}get identity(){let e=this.elements;return mj(e[0],1)&&mj(e[1],0)&&mj(e[2],0)&&mj(e[3],1)&&mj(e[4],0)&&mj(e[5],0)}AxB(e,t,i){let r=e[0]*t[0]+e[2]*t[1],s=e[1]*t[0]+e[3]*t[1],a=e[0]*t[2]+e[2]*t[3],o=e[1]*t[2]+e[3]*t[3],n=e[0]*t[4]+e[2]*t[5]+e[4],l=e[1]*t[4]+e[3]*t[5]+e[5];(i=i??e)[0]=r,i[1]=s,i[2]=a,i[3]=o,i[4]=n,i[5]=l}multiplySelf(e){return this.AxB(this.elements,e.elements),this}multiply(t){let i=Array(6);return t instanceof e?this.AxB(this.elements,t.elements,i):this.AxB(this.elements,[t.a,t.b,t.c,t.d,t.e,t.f],i),new e(i)}preMultiplySelf(e){return this.AxB(e.elements,this.elements,this.elements),this}inverse(){let t=this.elements,i=t[0],r=t[1],s=t[2],a=t[3],o=t[4],n=t[5],l=1/(i*a-r*s);return i*=l,r*=l,s*=l,new e([a*=l,-r,-s,i,s*n-a*o,r*o-i*n])}inverseTo(e){let t=this.elements,i=t[0],r=t[1],s=t[2],a=t[3],o=t[4],n=t[5],l=1/(i*a-r*s);return i*=l,r*=l,s*=l,a*=l,e.setElements([a,-r,-s,i,s*n-a*o,r*o-i*n]),this}invertSelf(){let e=this.elements,t=e[0],i=e[1],r=e[2],s=e[3],a=e[4],o=e[5],n=1/(t*s-i*r);return t*=n,i*=n,r*=n,s*=n,e[0]=s,e[1]=-i,e[2]=-r,e[3]=t,e[4]=r*o-s*a,e[5]=i*a-t*o,this}transformPoint(e,t){let i=this.elements;return{x:e*i[0]+t*i[2]+i[4],y:e*i[1]+t*i[3]+i[5]}}transformBBox(e,t){let i=this.elements,r=i[0],s=i[1],a=i[2],o=i[3],n=.5*e.width,l=.5*e.height,h=e.x+n,d=e.y+l,c=Math.abs(n*r)+Math.abs(l*a),u=Math.abs(n*s)+Math.abs(l*o);return t??(t=new u3(0,0,0,0)),t.x=h*r+d*a+i[4]-c,t.y=h*s+d*o+i[5]-u,t.width=c+c,t.height=u+u,t}toContext(e){if(this.identity)return;let t=this.elements;e.transform(t[0],t[1],t[2],t[3],t[4],t[5])}static flyweight(t){return e.instance.setElements(t.elements)}static updateTransformMatrix(e,t,i,r,s,a,o){let n,l,h,d;1===t&&1===i?(n=0,l=0):(n=o?.scalingCenterX??0,l=o?.scalingCenterY??0);let c=Math.cos(r),u=Math.sin(r);0===r?(h=0,d=0):(h=o?.rotationCenterX??0,d=o?.rotationCenterY??0);let p=n*(1-t)-h,g=l*(1-i)-d;return e.setElements([c*t,u*t,-u*i,c*i,c*p-u*g+h+s,u*p+c*g+d+a]),e}static fromContext(t){let i=t.getTransform();return new e([i.a,i.b,i.c,i.d,i.e,i.f])}};function mU(e){return!0===e.constructor[mW]}mH.instance=new mH;var mW=Symbol("isMatrixTransform");function m$(e){var t;let i=e;if(!0===e[mW])return e;let r=Symbol("matrix_combined_transform");class s extends i{constructor(){super(...arguments),this[t]=new mH,this._dirtyTransform=!0}markDirtyTransform(){this._dirtyTransform=!0,super.markDirty(this,3)}updateMatrix(e){}computeTransformMatrix(){this._dirtyTransform&&(this[r].setElements(mV),this.updateMatrix(this[r]),this._dirtyTransform=!1)}toParent(e){return(this.computeTransformMatrix(),this[r].identity)?e.clone():this[r].transformBBox(e)}toParentPoint(e,t){return(this.computeTransformMatrix(),this[r].identity)?{x:e,y:t}:this[r].transformPoint(e,t)}fromParent(e){return(this.computeTransformMatrix(),this[r].identity)?e.clone():this[r].inverse().transformBBox(e)}fromParentPoint(e,t){return(this.computeTransformMatrix(),this[r].identity)?{x:e,y:t}:this[r].inverse().transformPoint(e,t)}computeBBox(){let e=super.computeBBox();return e?this.toParent(e):e}pickNode(e,t,i=!1){return i||({x:e,y:t}=this.fromParentPoint(e,t)),super.pickNode(e,t)}render(e){this._dirtyTransform&&(this.computeTransformMatrix(),e.forceRender||(e={...e,forceRender:"dirtyTransform"}));let t=this[r],i=!1;t.identity||(e.ctx.save(),i=!0,t.toContext(e.ctx)),super.render(e),i&&e.ctx.restore()}}return t=r,s[mW]=!0,s}function mY(e){var t;let i=e,r=Symbol("matrix_rotation");class s extends m$(i){constructor(){super(...arguments),this[t]=new mH,this.rotationCenterX=null,this.rotationCenterY=null,this.rotation=0}updateMatrix(e){super.updateMatrix(e);let{rotation:t,rotationCenterX:i,rotationCenterY:s}=this;0!==t&&(mH.updateTransformMatrix(this[r],1,1,t,0,0,{rotationCenterX:i,rotationCenterY:s}),e.multiplySelf(this[r]))}}return t=r,c7([u6({type:"transform"})],s.prototype,"rotationCenterX",2),c7([u6({type:"transform"})],s.prototype,"rotationCenterY",2),c7([u6({type:"transform"})],s.prototype,"rotation",2),s}function mK(e){var t;let i=e,r=Symbol("matrix_scale");class s extends m$(i){constructor(){super(...arguments),this[t]=new mH,this.scalingX=1,this.scalingY=1,this.scalingCenterX=null,this.scalingCenterY=null}updateMatrix(e){super.updateMatrix(e);let{scalingX:t,scalingY:i,scalingCenterX:s,scalingCenterY:a}=this;(1!==t||1!==i)&&(mH.updateTransformMatrix(this[r],t,i,0,0,0,{scalingCenterX:s,scalingCenterY:a}),e.multiplySelf(this[r]))}}return t=r,c7([u6({type:"transform"})],s.prototype,"scalingX",2),c7([u6({type:"transform"})],s.prototype,"scalingY",2),c7([u6({type:"transform"})],s.prototype,"scalingCenterX",2),c7([u6({type:"transform"})],s.prototype,"scalingCenterY",2),s}function mZ(e){var t;let i=e,r=Symbol("matrix_translation");class s extends m$(i){constructor(){super(...arguments),this[t]=new mH,this.translationX=0,this.translationY=0}updateMatrix(e){super.updateMatrix(e);let{translationX:t,translationY:i}=this;(0!==t||0!==i)&&(mH.updateTransformMatrix(this[r],1,1,0,t,i),e.multiplySelf(this[r]))}}return t=r,c7([u6({type:"transform"})],s.prototype,"translationX",2),c7([u6({type:"transform"})],s.prototype,"translationY",2),s}var mq=class{static fromCanvas(e,t){let i=[];for(let t of e.ancestors())mU(t)&&i.unshift(t);for(let e of i)t=e.fromParent(t);return mU(e)&&(t=e.fromParent(t)),t}static toCanvas(e,t){for(let i of(null==t?t=e.getBBox():mU(e)&&(t=e.toParent(t)),e.ancestors()))mU(i)&&(t=i.toParent(t));return t}static fromCanvasPoint(e,t,i){let r=[];for(let t of e.ancestors())mU(t)&&r.unshift(t);for(let e of r)({x:t,y:i}=e.fromParentPoint(t,i));return mU(e)&&({x:t,y:i}=e.fromParentPoint(t,i)),{x:t,y:i}}static toCanvasPoint(e,t,i){for(let r of(mU(e)&&({x:t,y:i}=e.toParentPoint(t,i)),e.ancestors()))mU(r)&&({x:t,y:i}=r.toParentPoint(t,i));return{x:t,y:i}}},mX=class e extends pe{constructor(e){super({isVirtual:e?.isVirtual,name:e?.name}),this.opts=e,this.opacity=1,this.lastBBox=void 0;let{zIndex:t,zIndexSubOrder:i}=e??{};this.isContainerNode=!0,void 0!==t&&(this.zIndex=t),void 0!==i&&(this.zIndexSubOrder=i)}static is(t){return t instanceof e}onZIndexChange(){super.onZIndexChange(),this.layer&&this._layerManager?.moveLayer(this.layer,this.zIndex,this.zIndexSubOrder)}isLayer(){return null!=this.layer}_setLayerManager(e){if(this._layerManager&&this.layer&&(this._layerManager.removeLayer(this.layer),this.layer=void 0),this.layer)throw Error("AG Charts - unable to deregister scene rendering layer!");super._setLayerManager(e)}initialiseLayer(){!this.layer&&this._layerManager&&this.opts?.layer===!0&&(this.layer=this._layerManager.addLayer({name:this.name,zIndex:this.zIndex,zIndexSubOrder:this.zIndexSubOrder,getComputedOpacity:()=>this.getComputedOpacity(),getVisibility:()=>this.getVisibility()}))}getComputedOpacity(){let t=1;for(let i of this.traverseUp())i instanceof e&&(t*=i.opacity);return t}getVisibility(){for(let e of this.traverseUp())if(!e.visible)return!1;return!0}onVisibleChange(){this.layer&&(this.layer.enabled=this.visible)}markDirty(e,t=1){if(this.isVirtual){super.markDirty(e,t);return}let i=t;(t<2||null!=this.layer)&&(i=1),super.markDirty(e,t,i)}containsPoint(e,t){return!0}computeBBox(){return e.computeChildrenBBox(this.children)}preRender(){let e=super.preRender();return e.groups+=1,e.nonGroups-=1,this.opts?.layer!==!0||(null==this.layer&&e.nonGroups>0&&this.initialiseLayer(),this.opts?.nonEmptyChildDerivedZIndex&&e.nonGroups>0&&this.deriveZIndexFromChildren()),e}deriveZIndexFromChildren(){let e=this.children.filter(e=>e._childNodeCounts.nonGroups>0);this.sortChildren(e);let t=e.at(-1);this.zIndex=t?.zIndex??-1/0,this.zIndexSubOrder=t?.zIndexSubOrder}render(e){let{opts:{name:t}={},_debug:i}=this,{dirty:r,dirtyZIndex:s,layer:a,children:o,clipRect:n}=this,{ctx:l,forceRender:h,clipBBox:d}=e,{resized:c,stats:u}=e,p=r>=2||s||c,g=p,m=!1;for(let e of o)if(g||(g=null==e.layerManager&&e.dirty>=1),m||(m=null!=e.layerManager&&e.dirty>=1),g)break;if(t&&i?.({name:t,group:this,isDirty:p,isChildDirty:g,renderCtx:e,forceRender:h}),a){let e=this.getBBox();void 0!==this.lastBBox&&this.lastBBox.equals(e)||(h="dirtyTransform",this.lastBBox=e)}if(!p&&!g&&!m&&!h){t&&u&&i?.({name:t,result:"skipping",renderCtx:e,counts:this.nodeCount,group:this}),a&&u&&(u.layersSkipped++,u.nodesSkipped+=this.nodeCount.count),this.markClean({recursive:!1});return}let f=this.visible;if(a){let r=l.getTransform();if((l=a.context).save(),l.setTransform(a.pixelRatio,0,0,a.pixelRatio,0,0),"dirtyTransform"!==h&&(h=g||s),h&&a.clear(),d){let{width:r,height:s,x:a,y:o}=d;i?.(()=>({name:t,clipBBox:d,ctxTransform:l.getTransform(),renderCtx:e,group:this})),l.beginPath(),l.rect(a,o,r,s),l.clip()}l.setTransform(r)}else l.globalAlpha*=this.opacity;if(n){let{x:r,y:s,width:a,height:o}=n;l.save(),i?.(()=>({name:t,clipRect:n,ctxTransform:l.getTransform(),renderCtx:e,group:this})),l.beginPath(),l.rect(r,s,a,o),l.clip(),d=mq.toCanvas(this,n)}let v=this.hasVirtualChildren();s?(this.sortChildren(o),"dirtyTransform"!==h&&(h=!0)):v&&this.sortChildren(o);let y=h!==e.forceRender||d!==e.clipBBox||l!==e.ctx?{...e,ctx:l,forceRender:h,clipBBox:d}:e,C=0;for(let e of o){if(!e.visible||!f){e.markClean(),u&&(C+=e.nodeCount.count);continue}if(!h&&0===e.dirty){u&&(C+=e.nodeCount.count);continue}l.save(),e.render(y),l.restore()}if(u&&(u.nodesSkipped+=C),super.render(e),n&&l.restore(),v)for(let e of this.virtualChildren)e.markClean({recursive:"virtual"});a&&(u&&u.layersRendered++,l.restore(),h&&a.snapshot(),a.context.verifyDepthZero?.()),t&&u&&i?.({name:t,result:"rendered",skipped:C,renderCtx:e,counts:this.nodeCount,group:this})}sortChildren(e){this.dirtyZIndex=!1,e.sort((e,t)=>m_([e.zIndex,...e.zIndexSubOrder??[void 0,void 0],e.serialNumber],[t.zIndex,...t.zIndexSubOrder??[void 0,void 0],t.serialNumber],mG))}static computeChildrenBBox(e,t){let i=1/0,r=-1/0,s=1/0,a=-1/0,o=t?.skipInvisible??!0;for(let t of e){if(o&&!t.visible)continue;let e=t.getBBox();if(!e)continue;let{x:n,y:l,width:h,height:d}=e;n<i&&(i=n),l<s&&(s=l),n+h>r&&(r=n+h),l+d>a&&(a=l+d)}return new u3(i,s,r-i,a-s)}setClipRect(e){this.clipRect=e}setClipRectInGroupCoordinateSpace(e){this.clipRect=e?mq.fromCanvas(this,e):void 0}};mX.className="Group",c7([u6({redraw:3,convertor:e=>uW(0,e,1)})],mX.prototype,"opacity",2);var mQ=mX,mJ=class extends mK(mQ){},m0=class extends mY(mQ){},m1=class extends mZ(mQ){},m2=class extends mY(mZ(mQ)){},m3={};function m4(e){return e?m3.document?.[e]:m3.document}function m6(e){return e?m3.window?.[e]:m3.window}function m5(e,t,i){let r=m4().createElement(e);if("object"==typeof t&&(i=t,t=void 0),t)for(let e of t.split(" "))r.classList.add(e);return i&&Object.assign(r.style,i),r}function m8(e,t){return m4().createElementNS(e,t)}function m7(e,t){let{body:i}=m4(),r=m5("a",{display:"none"});r.href=e,r.download=t,i.appendChild(r),r.click(),setTimeout(()=>i.removeChild(r))}function m9(e){m3.document=e}function fe(e){m3.window=e}function ft(e,t){e&&(e.style.width=`${t.width}px`,e.style.height=`${t.height}px`,e.style.left=`${t.x}px`,e.style.top=`${t.y}px`)}function fi(e){if(e.focus(),e.lastChild?.textContent==null)return;let t=m4().createRange();t.setStart(e.lastChild,e.lastChild.textContent.length),t.setEnd(e.lastChild,e.lastChild.textContent.length);let i=m6().getSelection();i?.removeAllRanges(),i?.addRange(t)}"undefined"!=typeof window?m3.window=window:"undefined"!=typeof global&&(m3.window=global.window),"undefined"!=typeof document?m3.document=document:"undefined"!=typeof global&&(m3.document=global.document);var fr=0;function fs(e){return`${e??"ag-charts-element"}-${fr++}`}var fa=Date.now(),fo=()=>{let e=Date.now()-fa;if(e>2e3){let t=(Math.floor(e/100)/10).toFixed(1);ul.log(`**** ${t}s since last log message ****`)}fa=Date.now()},fn={create:(...e)=>Object.assign((...t)=>{fn.check(...e)&&("function"==typeof t[0]&&(t=mR(t[0]())),fo(),ul.log(...t))},{check:()=>fn.check(...e)}),check:(...e)=>(0===e.length&&e.push(!0),mR(m6("agChartsDebug")).some(t=>e.includes(t)))},fl=class e{constructor(e,t,i=!0){this.parentNode=e,this.autoCleanup=i,this.garbageBin=new Set,this._nodesMap=new Map,this._nodes=[],this.data=[],this.debug=fn.create(!0,"scene","scene:selections"),this.nodeFactory=Object.prototype.isPrototypeOf.call(pe,t)?()=>new t:t}static select(t,i,r=!0){return new e(t,i,r)}static selectAll(e,t){let i=[],r=e=>{t(e)&&i.push(e),e.children.forEach(r)};return r(e),i}static selectByClass(t,i,...r){return e.selectAll(t,e=>e instanceof i||r.some(t=>e instanceof t))}static selectByTag(t,i){return e.selectAll(t,e=>e.tag===i)}createNode(e,t,i){let r=this.nodeFactory(e);return r.datum=e,t?.(r),null==i?this._nodes.push(r):this._nodes.splice(i,0,r),this.parentNode.appendChild(r),r}update(e,t,i){if(this.garbageBin.size>0&&this.debug(`Selection - update() called with pending garbage: ${e}`),i){let r=new Map(e.map((e,t)=>[i(e),[e,t]]));for(let[e,t]of this._nodesMap.entries())if(r.has(t)){let[i]=r.get(t);e.datum=i,this.garbageBin.delete(e),r.delete(t)}else this.garbageBin.add(e);for(let[e,[i,s]]of r.entries())this._nodesMap.set(this.createNode(i,t,s),e)}else{let i=Math.max(e.length,this.data.length);for(let r=0;r<i;r++)r>=e.length?this.garbageBin.add(this._nodes[r]):r>=this._nodes.length?this.createNode(e[r],t):(this._nodes[r].datum=e[r],this.garbageBin.delete(this._nodes[r]))}return this.data=e.slice(),this.autoCleanup&&this.cleanup(),this}cleanup(){return 0===this.garbageBin.size||(this._nodes=this._nodes.filter(e=>!this.garbageBin.has(e)||(this._nodesMap.delete(e),this.garbageBin.delete(e),e.destroy(),!1))),this}clear(){return this.update([]),this}isGarbage(e){return this.garbageBin.has(e)}hasGarbage(){return this.garbageBin.size>0}each(e){for(let t of this._nodes.entries())e(t[1],t[1].datum,t[0]);return this}*[Symbol.iterator](){for(let e=0;e<this._nodes.length;e++){let t=this._nodes[e],i=this._nodes[e].datum;yield{node:t,datum:i,index:e}}}select(t){return e.selectAll(this.parentNode,t)}selectByClass(t){return e.selectByClass(this.parentNode,t)}selectByTag(t){return e.selectByTag(this.parentNode,t)}nodes(){return this._nodes}at(e){return this._nodes.at(e)}},fh=2*Math.PI;function fd(e){return e%=fh,e+=fh,e%=fh}function fc(e){return e%=fh,(e+=fh)!==fh&&(e%=fh),e}function fu(e){return(e%=fh)<-Math.PI?e+=fh:e>=Math.PI&&(e-=fh),e}function fp(e,t,i){let r=fd(e),s=fd(t),a=fd(i);return s<a?s<=r&&r<=a:!(s>a)||s<=r||r<=a}function fg(e){return e/180*Math.PI}function fm(e){return e/Math.PI*180}function ff(e,t,i){i&&([e,t]=[t,e]);let r=fd(e);return(fd(t)+fh-r)%fh}function fv(e,t){return e=fd(e),(t=fd(t))-e+(e>t?2*Math.PI:0)}function fy(e,t,i,r){return{x:e+i*Math.cos(r),y:t+i*Math.sin(r)}}function fC(e,t){return 1e-6>fv(e,t)?t:fd(e-t)+t}function fw(e,t,i=0){let r=Math.abs(t-e)>=2*Math.PI?2*Math.PI:fd(t-e);return t=(e=fC(e,i))+r,{startAngle:e,endAngle:t}}function fb(e,t,i,r){let s=e-i,a=t-r;return s*s+a*a}function fS(e,t,i,r,s,a,o){if(i===s&&r===a)return Math.min(o,fb(e,t,i,r));let n=s-i,l=a-r,h=Math.max(0,Math.min(1,((e-i)*n+(t-r)*l)/(n*n+l*l)));return Math.min(o,fb(e,t,i+h*n,r+h*l))}var fx=e=>{let t=ps.fromString(e),[i,r,s]=ps.RGBtoOKLCH(t.r,t.g,t.b);return{l:i,c:r,h:s,a:t.a}},fM=e=>e.c<1e-6||e.l<1e-6||e.l>.999999,fE=(e,t,i)=>{let r;if(i=uW(0,i,1),fM(e))r=t.h;else if(fM(t))r=e.h;else{let s=e.h,a=t.h,o=t.h-e.h;o>180?a-=360:o<-180&&(a+=360),r=s*(1-i)+a*i}let s=e.c*(1-i)+t.c*i,a=e.l*(1-i)+t.l*i,o=e.a*(1-i)+t.a*i;return ps.fromOKLCH(a,s,r,o)},fD=class{constructor(){this.type="color",this.invalid=!0,this.domain=[0,1],this.range=["red","blue"],this.parsedRange=this.range.map(fx)}update(){let{domain:e,range:t}=this;e.length<2&&(ul.warnOnce("`colorDomain` should have at least 2 values."),0===e.length?e.push(0,1):1===e.length&&e.push(e[0]+1));for(let t=1;t<e.length;t++)if(e[t-1]>=e[t]){ul.warnOnce("`colorDomain` values should be supplied in ascending order."),e.sort((e,t)=>e-t);break}if(t.length<e.length)for(let i=t.length;i<e.length;i++)t.push(t.length>0?t[0]:"black");this.parsedRange=this.range.map(fx)}convert(e){let t,i;this.refresh();let{domain:r,range:s,parsedRange:a}=this,o=r[0],n=r.at(-1),l=s[0],h=s[s.length-1];if(e<=o)return l;if(e>=n)return h;if(2===r.length){let r=(e-o)/(n-o),a=1/(s.length-1);t=s.length<=2?0:Math.min(Math.floor(r*(s.length-1)),s.length-2),i=(r-t*a)/a}else{for(t=0;t<r.length-2&&!(e<r[t+1]);t++);let s=r[t];i=(e-s)/(r[t+1]-s)}return fE(a[t],a[t+1],i).toRgbaString()}refresh(){this.invalid&&(this.invalid=!1,this.update(),this.invalid&&ul.warnOnce("Expected update to not invalidate scale"))}};c7([gn],fD.prototype,"domain",2),c7([gn],fD.prototype,"range",2);var fI=class{constructor(e,t=[],i){this.colorSpace=e,this.stops=t,this.bbox=i,this._cache=void 0}createGradient(e,t){let i=this.bbox??t;if(null!=this._cache&&this._cache.ctx===e&&this._cache.bbox.equals(i))return this._cache.gradient;let{stops:r,colorSpace:s}=this;if(0===r.length)return;if(1===r.length)return r[0].color;let a=this.createCanvasGradient(e,i);if(null==a)return;let o="oklch"===s,n=r[0];a.addColorStop(n.offset,n.color);for(let e=1;e<r.length;e+=1){let t=r[e];if(o){let e=new fD;e.domain=[n.offset,t.offset],e.range=[n.color,t.color];for(let i=n.offset+.05;i<t.offset;i+=.05)a.addColorStop(i,e.convert(i))}a.addColorStop(t.offset,t.color),n=t}return"createPattern"in a&&(a=a.createPattern()),this._cache={ctx:e,bbox:i,gradient:a},a}},fk=class extends fI{constructor(e,t,i=0,r){super(e,t,r),this.angle=i}createCanvasGradient(e,t){let{angle:i}=this,r=fd(fg(i+90)),s=Math.cos(r),a=Math.sin(r),o=t.width,n=t.height,l=t.x+.5*o,h=t.y+.5*n,d=Math.sqrt(n*n+o*o)/2*Math.abs(Math.cos((r<Math.PI/2?r:r<Math.PI?Math.PI-r:r<1.5*Math.PI?r-Math.PI:2*Math.PI-r)-Math.atan2(n,o)));return e.createLinearGradient(l+s*d,h+a*d,l-s*d,h-a*d)}},fT=/^linear-gradient\((-?[\d.]+)deg,(.*?)\)$/i,fA=class e extends pe{constructor(){super(...arguments),this.fillOpacity=1,this.strokeOpacity=1,this.fill=e.defaultStyles.fill,this.stroke=e.defaultStyles.stroke,this.strokeWidth=e.defaultStyles.strokeWidth,this.lineDash=e.defaultStyles.lineDash,this.lineDashOffset=e.defaultStyles.lineDashOffset,this.lineCap=e.defaultStyles.lineCap,this.lineJoin=e.defaultStyles.lineJoin,this.miterLimit=void 0,this.opacity=e.defaultStyles.opacity,this.fillShadow=e.defaultStyles.fillShadow}restoreOwnStyles(){let{defaultStyles:e}=this.constructor;Object.assign(this,e)}onFillChange(){let e;let{fill:t}=this;if(t instanceof fI)this.gradient=t;else if(t?.startsWith("linear-gradient")&&(e=fT.exec(t))){let t;let i=parseFloat(e[1]),r=[],s=e[2],a=/(#[0-9a-f]+)|(rgba?\(.+?\))|([a-z]+)/gi;for(;t=a.exec(s);)r.push(t[0]);this.gradient=new fk("rgb",r.map((e,t)=>({color:e,offset:t/(r.length-1)})),i)}else this.gradient=void 0}align(e,t){let i=this.layerManager?.canvas?.pixelRatio??1,r=Math.round(e*i)/i;return null==t?r:0===t?0:t<1?Math.ceil(t*i)/i:Math.round((t+e)*i)/i-r}fillStroke(e,t){this.renderFill(e,t),this.renderStroke(e,t)}renderFill(e,t){if(this.fill){let{globalAlpha:i}=e;this.applyFill(e),this.applyFillAlpha(e),this.applyShadow(e),this.executeFill(e,t),e.globalAlpha=i}e.shadowColor="rgba(0, 0, 0, 0)"}executeFill(e,t){t?e.fill(t):e.fill()}applyFill(e){e.fillStyle=this.gradient?.createGradient(e,this.getBBox())??("string"==typeof this.fill?this.fill:void 0)??"black"}applyFillAlpha(e){e.globalAlpha*=this.opacity*this.fillOpacity}applyShadow(e){let t=this.layerManager?.canvas.pixelRatio??1,i=this.fillShadow;i?.enabled&&(e.shadowColor=i.color,e.shadowOffsetX=i.xOffset*t,e.shadowOffsetY=i.yOffset*t,e.shadowBlur=i.blur*t)}renderStroke(e,t){if(this.stroke&&this.strokeWidth){let{globalAlpha:i}=e;e.strokeStyle=this.stroke,e.globalAlpha*=this.opacity*this.strokeOpacity,e.lineWidth=this.strokeWidth,this.lineDash&&e.setLineDash(this.lineDash),this.lineDashOffset&&(e.lineDashOffset=this.lineDashOffset),this.lineCap&&(e.lineCap=this.lineCap),this.lineJoin&&(e.lineJoin=this.lineJoin),null!=this.miterLimit&&(e.miterLimit=this.miterLimit),this.executeStroke(e,t),e.globalAlpha=i}}executeStroke(e,t){t?e.stroke(t):e.stroke()}containsPoint(e,t){return this.isPointInPath(e,t)}};fA.defaultStyles={fill:"black",stroke:void 0,strokeWidth:0,lineDash:void 0,lineDashOffset:0,lineCap:void 0,lineJoin:void 0,opacity:1,fillShadow:void 0},c7([u6({redraw:2})],fA.prototype,"fillOpacity",2),c7([u6({redraw:2})],fA.prototype,"strokeOpacity",2),c7([u6({redraw:2,changeCb:e=>e.onFillChange()})],fA.prototype,"fill",2),c7([u6({redraw:2})],fA.prototype,"stroke",2),c7([u6({redraw:2})],fA.prototype,"strokeWidth",2),c7([u6({redraw:2})],fA.prototype,"lineDash",2),c7([u6({redraw:2})],fA.prototype,"lineDashOffset",2),c7([u6({redraw:2})],fA.prototype,"lineCap",2),c7([u6({redraw:2})],fA.prototype,"lineJoin",2),c7([u6({redraw:2})],fA.prototype,"miterLimit",2),c7([u6({redraw:2,convertor:e=>uW(0,e,1)})],fA.prototype,"opacity",2),c7([u6({redraw:2,checkDirtyOnAssignment:!0})],fA.prototype,"fillShadow",2);var fR=fA,fL=class extends fR{constructor(e={}){super(e),this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.restoreOwnStyles()}set x(e){this.x1=e,this.x2=e}set y(e){this.y1=e,this.y2=e}computeBBox(){return new u3(Math.min(this.x1,this.x2),Math.min(this.y1,this.y2),Math.abs(this.x2-this.x1),Math.abs(this.y2-this.y1))}isPointInPath(e,t){return(this.x1===this.x2||this.y1===this.y2)&&this.getBBox().clone().grow(this.strokeWidth/2).containsPoint(e,t)}distanceSquared(e,t){let{x1:i,y1:r,x2:s,y2:a}=this;return fS(e,t,i,r,s,a,1/0)}render(e){let{ctx:t,forceRender:i,stats:r,devicePixelRatio:s}=e;if(0===this.dirty&&!i){r&&(r.nodesSkipped+=this.nodeCount.count);return}let{x1:a,y1:o,x2:n,y2:l}=this;if(a===n){let{strokeWidth:e}=this,t=Math.round(a*s)/s+Math.trunc(e*s)%2/(2*s);a=t,n=t}else if(o===l){let{strokeWidth:e}=this,t=Math.round(o*s)/s+Math.trunc(e*s)%2/(2*s);o=t,l=t}t.beginPath(),t.moveTo(a,o),t.lineTo(n,l),this.fillStroke(t),this.fillShadow?.markClean(),super.render(e)}};fL.className="Line",fL.defaultStyles=Object.assign({},fR.defaultStyles,{fill:void 0,strokeWidth:1}),c7([u6({redraw:3})],fL.prototype,"x1",2),c7([u6({redraw:3})],fL.prototype,"y1",2),c7([u6({redraw:3})],fL.prototype,"x2",2),c7([u6({redraw:3})],fL.prototype,"y2",2);var fP=class{constructor(e=5){this.maxCacheSize=e,this.store=new Map}get(e){if(!this.store.has(e))return;let t=this.store.get(e);return this.store.delete(e),this.store.set(e,t),t}has(e){return this.store.has(e)}set(e,t){if(this.store.set(e,t),this.store.size>this.maxCacheSize){let e=this.store.keys(),t=this.store.size-this.maxCacheSize;for(;t>0;){let i=e.next();i.done||this.store.delete(i.value),t--}}return t}clear(){this.store.clear()}},fF=class{static measureText(e,t){return this.getMeasurer(t).measureText(e)}static measureLines(e,t){return this.getMeasurer(t).measureLines(e)}static getMeasurer(e){let t="string"==typeof e.font?e.font:fO.toFontString(e.font),i=`${t}-${e.textAlign??"start"}-${e.textBaseline??"alphabetic"}`;return this.instanceMap.get(i)??this.createFontMeasurer(t,e,i)}static createFontMeasurer(e,t,i){let r=function(e=0,t=0){return new OffscreenCanvas(e,t).getContext("2d")}();r.font=e,r.textAlign=t.textAlign??"start",r.textBaseline=t.textBaseline??"alphabetic";let s=new fN(r,t);return this.instanceMap.set(i,s),s}};fF.instanceMap=new fP(10);var fN=class{constructor(e,t){this.ctx=e,this.measureMap=new fP(100),t.textAlign&&(e.textAlign=t.textAlign),t.textBaseline&&(e.textBaseline=t.textBaseline),e.font="string"==typeof t.font?t.font:fO.toFontString(t.font),this.textMeasurer=new fB(e=>this.cachedCtxMeasureText(e),t.textBaseline??"alphabetic")}textWidth(e,t){return this.textMeasurer.textWidth(e,t)}measureText(e){return this.textMeasurer.measureText(e)}measureLines(e){return this.textMeasurer.measureLines(e)}cachedCtxMeasureText(e){if(!this.measureMap.has(e)){let t=this.ctx.measureText(e);this.measureMap.set(e,{actualBoundingBoxAscent:t.actualBoundingBoxAscent,emHeightAscent:t.emHeightAscent,emHeightDescent:t.emHeightDescent,actualBoundingBoxDescent:t.actualBoundingBoxDescent,actualBoundingBoxLeft:t.actualBoundingBoxLeft,actualBoundingBoxRight:t.actualBoundingBoxRight,alphabeticBaseline:t.alphabeticBaseline,fontBoundingBoxAscent:t.fontBoundingBoxAscent,fontBoundingBoxDescent:t.fontBoundingBoxDescent,hangingBaseline:t.hangingBaseline,ideographicBaseline:t.ideographicBaseline,width:t.width})}return this.measureMap.get(e)}},fO=class{static toFontString({fontSize:e=10,fontStyle:t,fontWeight:i,fontFamily:r,lineHeight:s}){let a="";return t&&(a+=`${t} `),i&&(a+=`${i} `),a+=`${e}px`,s&&(a+=`/${s}px`),(a+=` ${r}`).trim()}static getLineHeight(e){return Math.ceil(e*this.defaultLineHeight)}static getVerticalModifier(e){switch(e){case"hanging":case"top":return 0;case"middle":return .5;default:return 1}}};fO.EllipsisChar="…",fO.defaultLineHeight=1.15,fO.lineSplitter=/\r?\n/g;var fB=class{constructor(e,t="alphabetic"){this.measureTextFn=e,this.textBaseline=t,this.charMap=new Map}getMetrics(e){let t=this.measureTextFn(e);return t.fontBoundingBoxAscent??(t.fontBoundingBoxAscent=t.emHeightAscent),t.fontBoundingBoxDescent??(t.fontBoundingBoxDescent=t.emHeightDescent),{width:t.width,height:t.actualBoundingBoxAscent+t.actualBoundingBoxDescent,lineHeight:t.fontBoundingBoxAscent+t.fontBoundingBoxDescent,offsetTop:t.actualBoundingBoxAscent,offsetLeft:t.actualBoundingBoxLeft}}getMultilineMetrics(e){let t=0,i=0,r=0,s=0,a=0,o=fO.getVerticalModifier(this.textBaseline),n=[],l=0,h=e.length;for(let o of e){let e=this.measureTextFn(o);e.fontBoundingBoxAscent??(e.fontBoundingBoxAscent=e.emHeightAscent),e.fontBoundingBoxDescent??(e.fontBoundingBoxDescent=e.emHeightDescent),t<e.width&&(t=e.width),s<e.actualBoundingBoxLeft&&(s=e.actualBoundingBoxLeft),0===l?(i+=e.actualBoundingBoxAscent,r+=e.actualBoundingBoxAscent):a+=e.fontBoundingBoxAscent,l===h-1?i+=e.actualBoundingBoxDescent:a+=e.fontBoundingBoxDescent,n.push({text:o,width:e.width,height:e.actualBoundingBoxAscent+e.actualBoundingBoxDescent,lineHeight:e.fontBoundingBoxAscent+e.fontBoundingBoxDescent,offsetTop:e.actualBoundingBoxAscent,offsetLeft:e.actualBoundingBoxLeft}),l++}return{width:t,height:i+=a,offsetTop:r+=a*o,offsetLeft:s,lineMetrics:n}}textWidth(e,t){if(t){let t=0;for(let i=0;i<e.length;i++)t+=this.textWidth(e.charAt(i));return t}return e.length>1?this.measureTextFn(e).width:this.charMap.get(e)??this.charWidth(e)}measureText(e){return this.getMetrics(e)}measureLines(e){let t="string"==typeof e?e.split(fO.lineSplitter):e;return this.getMultilineMetrics(t)}charWidth(e){let{width:t}=this.measureTextFn(e);return this.charMap.set(e,t),t}},fG=class e extends fR{constructor(){super(...arguments),this.x=0,this.y=0,this.lines=[],this.text=void 0,this.fontSize=10,this.fontFamily="sans-serif",this.textAlign=e.defaultStyles.textAlign,this.textBaseline=e.defaultStyles.textBaseline}onTextChange(){this.lines=this.text?.split("\n").map(e=>e.trim())??[]}static computeBBox(e,t,i,r){let{offsetTop:s,offsetLeft:a,width:o,height:n}=fF.measureLines(e,r);return new u3(t-a,i-s,o,n)}computeBBox(){let{x:t,y:i,lines:r,textBaseline:s,textAlign:a}=this;return e.computeBBox(r,t,i,{font:this,textBaseline:s,textAlign:a})}isPointInPath(e,t){let i=this.getBBox();return!!i&&i.containsPoint(e,t)}render(e){let{ctx:t,forceRender:i,stats:r}=e;if(0===this.dirty&&!i||!this.lines.length||!this.layerManager){r&&(r.nodesSkipped+=this.nodeCount.count);return}let{fill:s,stroke:a,strokeWidth:o}=this,{pixelRatio:n}=this.layerManager.canvas;if(t.font=fO.toFontString(this),t.textAlign=this.textAlign,t.textBaseline=this.textBaseline,s){this.applyFill(t),t.globalAlpha*=this.opacity*this.fillOpacity;let{fillShadow:e}=this;e?.enabled&&(t.shadowColor=e.color,t.shadowOffsetX=e.xOffset*n,t.shadowOffsetY=e.yOffset*n,t.shadowBlur=e.blur*n),this.renderLines((e,i,r)=>t.fillText(e,i,r))}if(a&&o){t.strokeStyle=a,t.lineWidth=o,t.globalAlpha*=this.opacity*this.strokeOpacity;let{lineDash:e,lineDashOffset:i,lineCap:r,lineJoin:s}=this;e&&t.setLineDash(e),i&&(t.lineDashOffset=i),r&&(t.lineCap=r),s&&(t.lineJoin=s),this.renderLines((e,i,r)=>t.strokeText(e,i,r))}super.render(e)}renderLines(e){let{lines:t,x:i,y:r}=this,s=this.lineHeight??fO.getLineHeight(this.fontSize),a=(s-s*t.length)*fO.getVerticalModifier(this.textBaseline);for(let o of t)e(o,i,r+a),a+=s}setFont(e){this.fontFamily=e.fontFamily,this.fontSize=e.fontSize,this.fontStyle=e.fontStyle,this.fontWeight=e.fontWeight}setAlign(e){this.textAlign=e.textAlign,this.textBaseline=e.textBaseline}};fG.className="Text",fG.defaultLineHeightRatio=1.15,fG.defaultStyles=Object.assign({},fR.defaultStyles,{textAlign:"start",fontStyle:void 0,fontWeight:void 0,fontSize:10,fontFamily:"sans-serif",textBaseline:"alphabetic"}),c7([u6({redraw:3})],fG.prototype,"x",2),c7([u6({redraw:3})],fG.prototype,"y",2),c7([u6({redraw:3,changeCb:e=>e.onTextChange()})],fG.prototype,"text",2),c7([u6()],fG.prototype,"fontStyle",2),c7([u6()],fG.prototype,"fontWeight",2),c7([u6()],fG.prototype,"fontSize",2),c7([u6()],fG.prototype,"fontFamily",2),c7([u6({redraw:3})],fG.prototype,"textAlign",2),c7([u6({redraw:3})],fG.prototype,"textBaseline",2),c7([u6({redraw:3})],fG.prototype,"lineHeight",2);var fz=fG,f_=class extends mY(fz){},fV=class extends mY(mZ(fz)){};function fj(e,t,i,r,s){let a=e.x+e.width>t&&e.x<t+r,o=e.y+e.height>i&&e.y<i+s;return a&&o}var fH={top:{x:0,y:-1},bottom:{x:0,y:1},left:{x:-1,y:0},right:{x:1,y:0},"top-left":{x:-1,y:-1},"top-right":{x:1,y:-1},"bottom-left":{x:-1,y:1},"bottom-right":{x:1,y:1}};function fU(e,t){return e.length===t.length&&e.every((e,i)=>Number(e)===Number(t[i]))}var fW="class-instance";function f$(e,t,i){if(pm(t)){if(!pm(e)||e.length!==t.length||t.some((t,i)=>null!=f$(e[i],t)))return t}else if(px(t)){if(!px(e))return t;let r={};for(let s of new Set([...Object.keys(e),...Object.keys(t)]))if(!(e[s]===t[s]||i?.includes(s))){if(typeof e[s]==typeof t[s]){let i=f$(e[s],t[s]);null!==i&&(r[s]=i)}else r[s]=t[s]}return Object.keys(r).length?r:null}else if(e!==t)return t;return null}function fY(e,t){return pm(e)?e.map(e=>fY(e,t)):px(e)?pN(e,(e,i)=>t?.shallow?.includes(i)?fK(e):fY(e,t)):e instanceof Map?new Map(fY(Array.from(e))):fK(e)}function fK(e){return pm(e)?[...e]:px(e)?{...e}:pv(e)?new Date(e):pC(e)?new RegExp(e.source,e.flags):e}function fZ(e,t,i,...r){if(pm(e))t(e,...r),e.forEach((e,s)=>{fZ(e,t,i,...fX(r,s))});else if(px(e))for(let s of(t(e,...r),Object.keys(e))){if(i?.skip?.includes(s))continue;let a=e[s];(pm(a)||px(a))&&fZ(a,t,i,...fX(r,s))}}function fq(e,t,i={}){let{path:r,matcherPath:s=r?.replace(/(\[[0-9+]+])/i,"[]"),skip:a=[]}=i;if(null==e)throw Error(`AG Charts - target is uninitialised: ${r??"<root>"}`);if(null==t)return e;if(gu(e))return e.set(t);let o=fQ(e);for(let n in t){if(pG.has(n))continue;let l=`${s?s+".":""}${n}`;if(a.includes(l))continue;let h=t[n],d=`${r?r+".":""}${n}`,c=e.constructor,u=e[n];try{let t=fQ(u),r=fQ(h);if(o===fW&&!(n in e)){ul.warn(`unable to set [${d}] in ${c?.name} - property is unknown`);continue}if(null!=t&&null!=r&&r!==t&&(t!==fW||"object"!==r)){ul.warn(`unable to set [${d}] in ${c?.name} - can't apply type of [${r}], allowed types are: [${t}]`);continue}gu(u)?e[n].set(h):"object"===r?(null==u&&(e[n]={}),fq(u??e[n],h,{...i,path:d,matcherPath:l})):e[n]=h}catch(e){ul.warn(`unable to set [${d}] in [${c?.name}]; nested error is: ${e.message}`)}}return e}function fX(e,t){return e.map(e=>e?.[t])}function fQ(e){return null==e?null:pI(e)||pv(e)?"primitive":pm(e)?"array":pb(e)?px(e)?"object":fW:pw(e)?"function":"primitive"}function fJ(e,t){let i=pm(e)?e:e.split(".");if(1===i.length){let[e]=i;return pd((t,i,r)=>t[e]=r,t=>t[e],t)}return pd((e,t,r)=>pz(e,i,r),e=>pB(e,i),t)}function f0(e){return pd((t,i,r)=>t[e]=r)}function f1(e,t){return pd((i,r,s)=>i[e][t??r]=s)}function f2(e){let{newValue:t,oldValue:i,changeValue:r}=e;return pd((e,s,a,o)=>(a!==o&&(void 0!==o&&i?.call(e,o),void 0!==a&&t?.call(e,a),r?.call(e,a,o)),a))}function f3(e){return(t,i)=>{ph(t,i).observers.push(e)}}var f4="color: green",f6="color: grey",f5=class e{constructor(e,t,i){this.defaultState=e,this.states=t,this.enterEach=i,this.debug=fn.create(!0,"animation"),this.state=e,this.debug(`%c${this.constructor.name} | init -> ${e}`,f4)}transition(t,i){if(!this.transitionChild(t,i)||this.state===e.child||this.state===e.parent)return;let r=this.state,s=this.states[this.state],a=s[t],o=`%c${this.constructor.name} | ${this.state} -> ${t} ->`;if(Array.isArray(a))a=a.find(e=>{if(!e.guard)return!0;let t=e.guard(i);return t||this.debug(`${o} ${e.target} (guarded)`,f6),t});else if("object"==typeof a&&!(a instanceof e)&&a.guard&&!a.guard(i)){this.debug(`${o} ${a.target} (guarded)`,f6);return}if(!a){this.debug(`${o} ${this.state}`,f6);return}let n=this.getDestinationState(a),l=n===this.state?void 0:s.onExit;this.debug(`${o} ${n}`,f4),this.state=n,"function"==typeof a?a(i):"object"!=typeof a||a instanceof e||a.action?.(i),l?.(),this.enterEach?.(r,n),n!==r&&n!==e.child&&n!==e.parent&&this.states[n].onEnter?.(r,i)}transitionAsync(e,t){setTimeout(()=>{this.transition(e,t)},0)}is(t){return this.state===e.child&&this.childState?this.childState.is(t):this.state===t}resetHierarchy(){this.debug(`%c${this.constructor.name} | ${this.state} -> [resetHierarchy] -> ${this.defaultState}`,"color: green"),this.state=this.defaultState}transitionChild(t,i){return this.state!==e.child||!this.childState||(this.childState.transition(t,i),!this.childState.is(e.parent)||(this.debug(`%c${this.constructor.name} | ${this.state} -> ${t} -> ${this.defaultState}`,f4),this.state=this.defaultState,this.states[this.state].onEnter?.(),this.childState.resetHierarchy(),!1))}getDestinationState(t){let i=this.state;return"string"==typeof t?i=t:t instanceof e?(this.childState=t,i=e.child):"object"==typeof t&&(t.target instanceof e?(this.childState=t.target,i=e.child):null!=t.target&&(i=t.target)),i}};f5.child="__child",f5.parent="__parent";var f8=class{static wrapText(e,t){return this.wrapLines(e,t).join("\n")}static wrapLines(e,t){let i=this.textWrap(e,t);return"hide"===t.overflow&&i.some(e=>e.endsWith(fO.EllipsisChar))?[]:i}static appendEllipsis(e){return e.replace(/[.,]{1,5}$/,"")+fO.EllipsisChar}static truncateLine(e,t,i,r){let s=t.textWidth(fO.EllipsisChar),a=0,o=0;for(;o<e.length;o++){let r=t.textWidth(e.charAt(o));if(a+r>i)break;a+=r}if(e.length===o&&(!r||a+s<=i))return r?e+fO.EllipsisChar:e;for(e=e.slice(0,o).trimEnd();e.length&&t.textWidth(e)+s>i;)e=e.slice(0,-1).trimEnd();return e+fO.EllipsisChar}static textWrap(e,t){let i=e.split(fO.lineSplitter),r=fF.getMeasurer(t);if("never"===t.textWrap)return i.map(e=>this.truncateLine(e.trimEnd(),r,t.maxWidth));let s=[],a="hyphenate"===t.textWrap,o=null==t.textWrap||"on-space"===t.textWrap;for(let e of i){if(""===(e=e.trimEnd())){s.push(e);continue}for(let i=0,n=0,l=0;i<e.length;i++){let h=e.charAt(i);if(n+=r.textWidth(h)," "===h&&(l=i),n>t.maxWidth){if(0===i)break;let h=r.textWidth(e.slice(0,i+1));if(h<=t.maxWidth){n=h;continue}if(l){let a=this.getWordAt(e,l+1),h=r.textWidth(a);if(h<=t.maxWidth){s.push(e.slice(0,l).trimEnd()),e=e.slice(l).trimStart(),i=-1,n=0,l=0;continue}o&&h>t.maxWidth&&s.push(e.slice(0,l).trimEnd(),this.truncateLine(e.slice(l).trimStart(),r,t.maxWidth,!0))}else o&&s.push(this.truncateLine(e,r,t.maxWidth,!0));if(o){e="";break}let d=a?"-":"",c=e.slice(0,i).trim();for(;c.length&&r.textWidth(c+d)>t.maxWidth;)c=c.slice(0,-1).trimEnd();if(s.push(c+d),!c.length){e="";break}e=e.slice(c.length).trimStart(),i=-1,n=0,l=0}}e&&s.push(e)}return this.avoidOrphans(s,r,t),this.clipLines(s,r,t)}static getWordAt(e,t){let i=e.indexOf(" ",t);return -1===i?e.slice(t):e.slice(t,i)}static clipLines(e,t,i){if(!i.maxHeight)return e;let{height:r,lineMetrics:s}=t.measureLines(e);if(r<=i.maxHeight)return e;for(let r=0,a=0;r<s.length;r++){let{lineHeight:o}=s[r];if((a+=o)>i.maxHeight){if("hide"===i.overflow)return[];let s=e.slice(0,r||1),a=s.pop();return s.concat(this.truncateLine(a,t,i.maxWidth,!0))}}return e}static avoidOrphans(e,t,i){if(!1===i.avoidOrphans||e.length<2)return;let{length:r}=e,s=e[r-1],a=e[r-2];if(a.length<s.length)return;let o=a.lastIndexOf(" ");if(-1===o||o===a.indexOf(" ")||s.includes(" "))return;let n=a.slice(o+1);t.textWidth(s+n)<=i.maxWidth&&(e[r-2]=a.slice(0,o),e[r-1]=n+" "+s)}};function f7(e,t,i){void 0===i||""===i?e?.removeAttribute(t):e?.setAttribute(t,i.toString())}function f9(e,t){let i;if(null!=t)for(i in t)"class"!==i&&f7(e,i,t[i])}function ve(e,t,i,r){let{top:s,right:a,bottom:o,left:n,width:l,height:h}=r;return null!=n?null!=l?a=i.width-n+l:null!=a&&(l=i.width-n-a):null!=a&&null!=l&&(n=i.width-a-l),null!=s?null!=h?o=i.height-s-h:null!=o&&(h=i.height-o-s):null!=o&&null!=h&&(s=i.height-o-h),null==l?null==h?(l=e,h=t):l=Math.ceil(e*h/t):null==h&&(h=Math.ceil(t*l/e)),null==n&&(n=null==a?Math.floor((i.width-l)/2):i.width-a-l),null==s&&(s=null==o?Math.floor((i.height-h)/2):i.height-h-o),{x:n,y:s,width:l,height:h}}var vt="ag-chart-tooltip",vi="ag-chart-dark-tooltip",vr={html:"",ariaLabel:""};function vs(e,t){if("string"==typeof e)return{html:e,ariaLabel:e};let{content:i=t?.content??"",title:r=t?.title,color:s=t?.color??"white",backgroundColor:a=t?.backgroundColor??"#888"}=e,o=r?`<div class="${vt}-title"
        style="color: ${s}; background-color: ${a}">${r}</div>`:"",n=r?`${r}: `:"",l=i?`<div class="${vt}-content">${i}</div>`:"";return{html:`${o}${l}`,ariaLabel:function(e){let t=(e,t,i)=>0===t||"."!==i[t-1]?". ":" ";return e.replace(/<br\s*\/?>/g,t).replace(/<\/p\s+>/g,t).replace(/<\/li\s*>/g,t).replace(/<[^<>]+>/g,"").replace(/\n+/g," ").replace(/\s+/g," ")}(`${n}${i}`)}}var va=class extends gd{constructor(){super(...arguments),this.type="pointer",this.xOffset=0,this.yOffset=0}};c7([gp(g4(["pointer","node","top","right","bottom","left","top-left","top-right","bottom-right","bottom-left"],"a position type"))],va.prototype,"type",2),c7([gp(gb)],va.prototype,"xOffset",2),c7([gp(gb)],va.prototype,"yOffset",2);var vo=class extends gd{constructor(){super(),this.enabled=!0,this.delay=0,this.range=void 0,this.wrapping="hyphenate",this.position=new va,this.darkTheme=!1,this.bounds="extended",this.enableInteraction=!1,this.lastVisibilityChange=Date.now(),this.wrapTypes=["always","hyphenate","on-space","never"],this.showTimeout=0,this._showArrow=!0}get interactive(){return this.enableInteraction}setup(e){this.element=e.addChild("canvas-overlay",vt),this.element.classList.add(vt),f7(this.element,"aria-hidden",!0)}destroy(e){e.removeChild("canvas-overlay",vt)}isVisible(){return!this.element?.classList.contains(vt+"-hidden")}show(e,t,i,r,s=!1){let{element:a}=this,o=a?.getBoundingClientRect();if(null!=r&&null!=a)a.innerHTML=r.html;else if(!a?.innerHTML){this.toggle(!1);return}let n=i.position?.type??this.position.type,l=i.position?.xOffset??0,h=i.position?.yOffset??0,d=this.getTooltipBounds({positionType:n,meta:i,yOffset:h,xOffset:l,canvasRect:t}),c={x:e.x-t.x,y:e.y-t.y,width:e.width,height:e.height},u=ve(a.clientWidth,a.clientHeight,c,d),p=c.x,g=c.y,m=c.width-a.clientWidth-1+p,f=c.height-a.clientHeight+g,v=uW(p,u.x,m),y=uW(g,u.y,f),C=!1;if(null!=o){let e=c.width-o.width-1+p,t=c.height-o.height+g;C=e>m||t>f}let w=v!==u.x||y!==u.y,b=i.showArrow??this.showArrow??(("node"===n||"pointer"===n)&&!w&&!l&&!h);this.updateShowArrow(b),C&&(a.style.transition="none"),a.style.transform=`translate(${Math.round(v)}px, ${Math.round(y)}px)`,C&&(a.style.transition=""),a.style.pointerEvents=i.enableInteraction?"auto":"none",a.setAttribute("data-pointer-capture","retain"),this.enableInteraction=i.enableInteraction??!1,this.delay>0&&!s?(this.toggle(!1),this.showTimeout=setTimeout(()=>{this.toggle(!0)},this.delay)):this.toggle(!0)}toggle(e){if(!this.element)return;let{classList:t}=this.element,i=(e,i)=>t.toggle(`${vt}-${e}`,i),r=this.isVisible(),s=1/0;if(e||clearTimeout(this.showTimeout),r!==e){let e=Date.now();s=e-this.lastVisibilityChange,this.lastVisibilityChange=e}let a=!r&&e&&s>100;for(let r of(s>5&&i("no-animation",a),i("no-interaction",!this.enableInteraction),i("hidden",!e),i("arrow",this._showArrow),t.toggle(vi,this.darkTheme),this.wrapTypes))t.toggle(`${vt}-wrap-${r}`,r===this.wrapping)}updateShowArrow(e){this._showArrow=e}getTooltipBounds(e){if(!this.element)return{};let{positionType:t,meta:i,yOffset:r,xOffset:s,canvasRect:a}=e,{clientWidth:o,clientHeight:n}=this.element,l={width:o,height:n};switch(t){case"node":case"pointer":return l.top=i.offsetY+r-n-8,l.left=i.offsetX+s-o/2,l;case"top":return l.top=r,l.left=a.width/2-o/2+s,l;case"right":return l.top=a.height/2-n/2+r,l.left=a.width-o/2+s,l;case"left":return l.top=a.height/2-n/2+r,l.left=s,l;case"bottom":return l.top=a.height-n+r,l.left=a.width/2-o/2+s,l;case"top-left":return l.top=r,l.left=s,l;case"top-right":return l.top=r,l.left=a.width-o+s,l;case"bottom-right":return l.top=a.height-n+r,l.left=a.width-o+s,l;case"bottom-left":return l.top=a.height-n+r,l.left=s,l}}};c7([gp(gy)],vo.prototype,"enabled",2),c7([gp(gy,{optional:!0})],vo.prototype,"showArrow",2),c7([f3((e,t,i)=>{t&&e.element?.classList.add(t),i&&e.element?.classList.remove(i)}),gp(gw,{optional:!0})],vo.prototype,"class",2),c7([gp(gM)],vo.prototype,"delay",2),c7([gp(g2,{optional:!0})],vo.prototype,"range",2),c7([gp(gq)],vo.prototype,"wrapping",2),c7([gp(gf)],vo.prototype,"position",2),c7([gp(gy)],vo.prototype,"darkTheme",2),c7([gp(g4(["extended","canvas"]))],vo.prototype,"bounds",2);var vn=class extends gd{constructor(){super(...arguments),this.id=uB(this),this.node=new f_({zIndex:1}).setProperties({textAlign:"center",pointerEvents:1}),this.enabled=!1,this.textAlign="center",this.fontSize=10,this.fontFamily="sans-serif",this.wrapping="always",this.padding=0,this.layoutStyle="block",this.truncated=!1}registerInteraction(e){let{regionManager:t,proxyInteractionService:i,layoutManager:r}=e,s=t.getRegion("root");return function(...e){return()=>{for(let t of e)t()}}(r.addListener("layout:complete",()=>this.updateA11yText(i)),s.addListener("hover",t=>this.handleMouseMove(e,t)),s.addListener("leave",t=>this.handleMouseLeave(e,t)))}computeTextWrap(e,t){let{text:i,padding:r,wrapping:s}=this,a=Math.min(this.maxWidth??1/0,e)-2*r,o=this.maxHeight??t-2*r;if(!isFinite(a)&&!isFinite(o)){this.node.text=i;return}let n=f8.wrapText(i??"",{maxWidth:a,maxHeight:o,font:this,textWrap:s});this.node.text=n,this.truncated=n.includes(fO.EllipsisChar)}updateA11yText(e){if(this.enabled&&this.text){let t=mq.toCanvas(this.node);if(t){let{id:i}=this;this.proxyText??(this.proxyText=e.createProxyElement({type:"text",id:i,parent:"canvas-proxy"})),this.proxyText.textContent=this.text,this.proxyText.updateBounds(t)}}else this.proxyText?.remove(),this.proxyText=void 0}handleMouseMove(e,t){if(void 0!==t&&this.enabled&&this.node.visible&&this.truncated){let{offsetX:i,offsetY:r}=t;e.tooltipManager.updateTooltip(this.id,{offsetX:i,offsetY:r,lastPointerEvent:t,showArrow:!1},vs({content:this.text}))}}handleMouseLeave(e,t){e.tooltipManager.removeTooltip(this.id)}};vn.SMALL_PADDING=10,vn.LARGE_PADDING=20,c7([gp(gy),f1("node","visible")],vn.prototype,"enabled",2),c7([gp(gw,{optional:!0}),f1("node")],vn.prototype,"text",2),c7([gp(gX,{optional:!0}),f1("node")],vn.prototype,"textAlign",2),c7([gp(gK,{optional:!0}),f1("node")],vn.prototype,"fontStyle",2),c7([gp(gZ,{optional:!0}),f1("node")],vn.prototype,"fontWeight",2),c7([gp(gM),f1("node")],vn.prototype,"fontSize",2),c7([gp(gw),f1("node")],vn.prototype,"fontFamily",2),c7([gp(gO,{optional:!0}),f1("node","fill")],vn.prototype,"color",2),c7([gp(gM,{optional:!0})],vn.prototype,"spacing",2),c7([gp(gM,{optional:!0})],vn.prototype,"maxWidth",2),c7([gp(gM,{optional:!0})],vn.prototype,"maxHeight",2),c7([gp(gq)],vn.prototype,"wrapping",2),c7([gp(gM)],vn.prototype,"padding",2),c7([gp(gw)],vn.prototype,"layoutStyle",2);var vl=class extends fR{constructor(e={}){super(e),this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.startLine=!1,this.endLine=!1,this.isRange=!1,this.restoreOwnStyles()}computeBBox(){return new u3(this.x1,this.y1,this.x2-this.x1,this.y2-this.y1)}isPointInPath(e,t){return!1}render(e){let{ctx:t,forceRender:i,stats:r}=e;if(0===this.dirty&&!i){r&&(r.nodesSkipped+=this.nodeCount.count);return}let{x1:s,y1:a,x2:o,y2:n}=this;s=this.align(s),a=this.align(a),o=this.align(o),n=this.align(n);let{fill:l,opacity:h,isRange:d}=this;if(d&&l){let{fillOpacity:e}=this;this.applyFill(t),t.globalAlpha=h*e,t.beginPath(),t.moveTo(s,a),t.lineTo(o,a),t.lineTo(o,n),t.lineTo(s,n),t.closePath(),t.fill()}let{stroke:c,strokeWidth:u,startLine:p,endLine:g}=this;if((p||g)&&c&&u){let{strokeOpacity:e,lineDash:i,lineDashOffset:r,lineCap:l,lineJoin:d}=this;t.strokeStyle=c,t.globalAlpha=h*e,t.lineWidth=u,i&&t.setLineDash(i),r&&(t.lineDashOffset=r),l&&(t.lineCap=l),d&&(t.lineJoin=d),t.beginPath(),p&&(t.moveTo(s,a),t.lineTo(o,a)),g&&(t.moveTo(o,n),t.lineTo(s,n)),t.stroke()}this.fillShadow?.markClean(),super.render(e)}};vl.className="Range",vl.defaultStyles={...fR.defaultStyles,strokeWidth:1},c7([u6({redraw:2})],vl.prototype,"x1",2),c7([u6({redraw:2})],vl.prototype,"y1",2),c7([u6({redraw:2})],vl.prototype,"x2",2),c7([u6({redraw:2})],vl.prototype,"y2",2),c7([u6({redraw:2})],vl.prototype,"startLine",2),c7([u6({redraw:2})],vl.prototype,"endLine",2),c7([u6({redraw:2})],vl.prototype,"isRange",2);var vh=class extends gd{constructor(){super(...arguments),this.enabled=!0,this.fontSize=12,this.fontFamily="Verdana, sans-serif"}getFont(){return fO.toFontString(this)}};function vd(e){let{parallelFlipRotation:t=0,regularFlipRotation:i=0}=e,r=e.rotation?fd(fg(e.rotation)):0,s=!r&&t>=0&&t<=Math.PI?-1:1,a=!r&&i>=0&&i<=Math.PI?-1:1,o=0;return e.parallel?o=s*Math.PI/2:-1===a&&(o=Math.PI),{configuredRotation:r,defaultRotation:o,parallelFlipFlag:s,regularFlipFlag:a}}function vc(e,t,i,r,s){let a=t>0&&t<=Math.PI,o=i>0&&i<=Math.PI;if(e){if(!t&&!i)return"center";if(r*(a||o?-1:1)==-1)return"end"}else if(r*s==-1)return"end";return"start"}c7([gp(gy)],vh.prototype,"enabled",2),c7([gp(gO,{optional:!0})],vh.prototype,"color",2),c7([gp(gK,{optional:!0})],vh.prototype,"fontStyle",2),c7([gp(gZ,{optional:!0})],vh.prototype,"fontWeight",2),c7([gp(gM)],vh.prototype,"fontSize",2),c7([gp(gw)],vh.prototype,"fontFamily",2),c7([gp(gC,{optional:!0})],vh.prototype,"formatter",2);var vu=((I=vu||{})[I.SERIES_BACKGROUND_ZINDEX=0]="SERIES_BACKGROUND_ZINDEX",I[I.AXIS_GRID_ZINDEX=1]="AXIS_GRID_ZINDEX",I[I.AXIS_ZINDEX=2]="AXIS_ZINDEX",I[I.SERIES_CROSSLINE_RANGE_ZINDEX=3]="SERIES_CROSSLINE_RANGE_ZINDEX",I[I.SERIES_LAYER_ZINDEX=4]="SERIES_LAYER_ZINDEX",I[I.SERIES_HIGHLIGHT_ZINDEX=5]="SERIES_HIGHLIGHT_ZINDEX",I[I.AXIS_FOREGROUND_ZINDEX=6]="AXIS_FOREGROUND_ZINDEX",I[I.SERIES_CROSSHAIR_ZINDEX=7]="SERIES_CROSSHAIR_ZINDEX",I[I.CHART_OVERLAY_ZINDEX=8]="CHART_OVERLAY_ZINDEX",I[I.SERIES_LABEL_ZINDEX=9]="SERIES_LABEL_ZINDEX",I[I.SERIES_CROSSLINE_LINE_ZINDEX=10]="SERIES_CROSSLINE_LINE_ZINDEX",I[I.SERIES_ANNOTATION_ZINDEX=11]="SERIES_ANNOTATION_ZINDEX",I[I.CHART_ANNOTATION_ZINDEX=12]="CHART_ANNOTATION_ZINDEX",I[I.CHART_ANNOTATION_FOCUSED_ZINDEX=13]="CHART_ANNOTATION_FOCUSED_ZINDEX",I[I.LEGEND_ZINDEX=14]="LEGEND_ZINDEX",I[I.NAVIGATOR_ZINDEX=15]="NAVIGATOR_ZINDEX",I[I.FOREGROUND_ZINDEX=16]="FOREGROUND_ZINDEX",I);function vp(e){return null!=e&&Object.hasOwn(e,"toString")&&pM(e.toString())}function vg(e){return null!=e&&Object.hasOwn(e,"valueOf")&&pD(e.valueOf())}function vm(e){return pD(e)||py(e)||vg(e)}function vf(e,t){return null!=e&&(!t||vm(e))}function vv(e){return vp(e)&&Object.hasOwn(e,"id")?e.id:e}var vy=e=>"value"===e?g8((e,t)=>"line"===t.target.type,e=>"range"===e.target.type?"crossLine type 'range' to have a 'range' property instead of 'value'":"crossLine property 'type' to be 'line'"):g8((e,t)=>"range"===t.target.type,e=>"line"===e.target.type?"crossLine type 'line' to have a 'value' property instead of 'range'":"crossLine property 'type' to be 'range'"),vC=(e,t,i,r,s)=>{let a="line"===e&&void 0!==t,o="range"===e&&void 0!==i;if(!a&&!o)return!0;let[n,l]=i??[t,void 0],h=mo.is(r)||mB.is(r),d=vf(n,h)&&!isNaN(r.convert(n)),c=vf(l,h)&&!isNaN(r.convert(l));if(a&&d||o&&d&&c)return s?.()??!0;let u=["Expecting crossLine"];return o?(d||u.push(`range start ${me(n)}`),c||u.push(`${d?"":"and "}range end ${me(l)}`)):u.push(`value ${me(n)}`),u.push("to match the axis scale domain."),ul.warnOnce(u.join(" ")),!1},vw={top:{xTranslationDirection:0,yTranslationDirection:-1},bottom:{xTranslationDirection:0,yTranslationDirection:1},left:{xTranslationDirection:-1,yTranslationDirection:0},right:{xTranslationDirection:1,yTranslationDirection:0},topLeft:{xTranslationDirection:1,yTranslationDirection:-1},topRight:{xTranslationDirection:-1,yTranslationDirection:-1},bottomLeft:{xTranslationDirection:1,yTranslationDirection:1},bottomRight:{xTranslationDirection:-1,yTranslationDirection:1},inside:{xTranslationDirection:0,yTranslationDirection:0},insideLeft:{xTranslationDirection:1,yTranslationDirection:0},insideRight:{xTranslationDirection:-1,yTranslationDirection:0},insideTop:{xTranslationDirection:0,yTranslationDirection:1},insideBottom:{xTranslationDirection:0,yTranslationDirection:-1},insideTopLeft:{xTranslationDirection:1,yTranslationDirection:1},insideBottomLeft:{xTranslationDirection:1,yTranslationDirection:-1},insideTopRight:{xTranslationDirection:-1,yTranslationDirection:1},insideBottomRight:{xTranslationDirection:-1,yTranslationDirection:-1}},vb={top:{xTranslationDirection:1,yTranslationDirection:0},bottom:{xTranslationDirection:-1,yTranslationDirection:0},left:{xTranslationDirection:0,yTranslationDirection:-1},right:{xTranslationDirection:0,yTranslationDirection:1},topLeft:{xTranslationDirection:-1,yTranslationDirection:-1},topRight:{xTranslationDirection:-1,yTranslationDirection:1},bottomLeft:{xTranslationDirection:1,yTranslationDirection:-1},bottomRight:{xTranslationDirection:1,yTranslationDirection:1},inside:{xTranslationDirection:0,yTranslationDirection:0},insideLeft:{xTranslationDirection:0,yTranslationDirection:1},insideRight:{xTranslationDirection:0,yTranslationDirection:-1},insideTop:{xTranslationDirection:-1,yTranslationDirection:0},insideBottom:{xTranslationDirection:1,yTranslationDirection:0},insideTopLeft:{xTranslationDirection:-1,yTranslationDirection:1},insideBottomLeft:{xTranslationDirection:1,yTranslationDirection:1},insideTopRight:{xTranslationDirection:-1,yTranslationDirection:-1},insideBottomRight:{xTranslationDirection:1,yTranslationDirection:-1}};function vS({yDirection:e,padding:t=0,position:i="top",bbox:r}){let{xTranslationDirection:s,yTranslationDirection:a}=(e?vw:vb)[i];return{xTranslation:s*(t+r.width/2),yTranslation:a*(t+r.height/2)}}function vx({yDirection:e,bbox:t,padding:i=0,position:r="top"}){let s={};return r.startsWith("inside")||("top"!==r||e?"bottom"!==r||e?"left"===r&&e?s.left=i+t.width:"right"===r&&e&&(s.right=i+t.width):s.bottom=i+t.height:s.top=i+t.height),s}var vM=({yDirection:e,xEnd:t,yStart:i,yEnd:r})=>e?{x:t/2,y:i}:{x:t,y:isNaN(r)?i:(i+r)/2},vE=({yDirection:e,xStart:t,xEnd:i,yStart:r,yEnd:s})=>e?{x:t,y:isNaN(s)?r:(r+s)/2}:{x:i/2,y:r},vD=({yDirection:e,xEnd:t,yStart:i,yEnd:r})=>e?{x:t,y:isNaN(r)?i:(i+r)/2}:{x:t/2,y:isNaN(r)?i:r},vI=({yDirection:e,xStart:t,xEnd:i,yStart:r,yEnd:s})=>e?{x:i/2,y:isNaN(s)?r:s}:{x:t,y:isNaN(s)?r:(r+s)/2},vk=({yDirection:e,xStart:t,xEnd:i,yStart:r})=>e?{x:t/2,y:r}:{x:i,y:r},vT=({yDirection:e,xStart:t,yStart:i,yEnd:r})=>e?{x:t,y:isNaN(r)?i:r}:{x:t,y:i},vA=({yDirection:e,xEnd:t,yStart:i,yEnd:r})=>e?{x:t,y:i}:{x:t,y:isNaN(r)?i:r},vR=({yDirection:e,xStart:t,xEnd:i,yStart:r,yEnd:s})=>e?{x:i,y:isNaN(s)?r:s}:{x:t,y:isNaN(s)?r:s},vL={top:{c:vM},bottom:{c:vI},left:{c:vE},right:{c:vD},topLeft:{c:vk},topRight:{c:vA},bottomLeft:{c:vT},bottomRight:{c:vR},inside:{c:({xEnd:e,yStart:t,yEnd:i})=>({x:e/2,y:isNaN(i)?t:(t+i)/2})},insideLeft:{c:vE},insideRight:{c:vD},insideTop:{c:vM},insideBottom:{c:vI},insideTopLeft:{c:vk},insideBottomLeft:{c:vT},insideTopRight:{c:vA},insideBottomRight:{c:vR}},vP=g4(["top","left","right","bottom","topLeft","topRight","bottomLeft","bottomRight","inside","insideLeft","insideRight","insideTop","insideBottom","insideTopLeft","insideBottomLeft","insideTopRight","insideBottomRight"],"crossLine label position"),vF=class extends gd{constructor(){super(...arguments),this.fontSize=14,this.fontFamily="Verdana, sans-serif",this.padding=5,this.color="rgba(87, 87, 87, 1)"}};c7([gp(gy,{optional:!0})],vF.prototype,"enabled",2),c7([gp(gw,{optional:!0})],vF.prototype,"text",2),c7([gp(gK,{optional:!0})],vF.prototype,"fontStyle",2),c7([gp(gZ,{optional:!0})],vF.prototype,"fontWeight",2),c7([gp(gM)],vF.prototype,"fontSize",2),c7([gp(gw)],vF.prototype,"fontFamily",2),c7([gp(gb)],vF.prototype,"padding",2),c7([gp(gO,{optional:!0})],vF.prototype,"color",2),c7([gp(vP,{optional:!0})],vF.prototype,"position",2),c7([gp(gD,{optional:!0})],vF.prototype,"rotation",2),c7([gp(gy,{optional:!0})],vF.prototype,"parallel",2);var vN=class e extends gd{constructor(){super(),this.id=uB(this),this.label=new vF,this.scale=void 0,this.clippedRange=[-1/0,1/0],this.gridLength=0,this.sideFlag=-1,this.parallelFlipRotation=0,this.regularFlipRotation=0,this.direction="x",this.group=new mQ({name:`${this.id}`,layer:!0,zIndex:e.LINE_LAYER_ZINDEX}),this.labelGroup=new mQ({name:`${this.id}`,layer:!0,zIndex:e.LABEL_LAYER_ZINDEX}),this.crossLineRange=new vl,this.crossLineLabel=new fV,this.labelPoint=void 0,this.data=[],this.startLine=!1,this.endLine=!1,this.isRange=!1,this.group.append(this.crossLineRange),this.labelGroup.append(this.crossLineLabel),this.crossLineRange.pointerEvents=1}update(e){let{enabled:t,data:i,type:r,value:s,range:a,scale:o}=this;if(!r||!o||!t||!e||!vC(r,s,a,o)||0===i.length){this.group.visible=!1,this.labelGroup.visible=!1;return}this.group.visible=e,this.labelGroup.visible=e,this.group.zIndex=this.getZIndex(this.isRange),this.updateNodes()}calculateLayout(e,t){if(!e)return;let{scale:i,gridLength:r,sideFlag:s,direction:a,label:{position:o="top"},clippedRange:n,strokeWidth:l=0}=this;if(this.data=[],!i)return;let h=i.bandwidth??0,d=i.step??0,c=(t?-1:1)*(i instanceof gh?(d-h)/2:0),[u,p]=[0,s*r],[g,m]=this.getRange(),f=void 0===m&&mB.is(i)?h/2+c:0,[v,y]=[Number(i.convert(g,{clampMode:"clamped"}))-c+f,i.convert(m,{clampMode:"clamped"})+h+c];v=u$(v,n),y=u$(y,n),[g,m]=[Number(i.convert(g))+f,i.convert(m)+h];let C=(g===v||m===y||v!==y)&&Math.abs(y-v)>0;if(C&&v>y&&([v,y]=[y,v],[g,m]=[m,g]),g-c>=v&&(g-=c),m+c<=y&&(m+=c),this.isRange=C,this.startLine=l>0&&g>=v&&g<=v+c,this.endLine=l>0&&m>=y-h-c&&m<=y,(C||this.startLine||this.endLine)&&(this.data=[v,y],this.label.enabled)){let{c:e=vM}=vL[o]??{},{x:t,y:i}=e({yDirection:"y"===a,xStart:u,xEnd:p,yStart:v,yEnd:y});this.labelPoint={x:t,y:i}}}updateNodes(){this.updateRangeNode(),this.label.enabled&&(this.updateLabel(),this.positionLabel())}updateRangeNode(){let{crossLineRange:e,sideFlag:t,gridLength:i,data:r,startLine:s,endLine:a,isRange:o,fill:n,fillOpacity:l,stroke:h,strokeWidth:d,lineDash:c}=this;e.x1=0,e.x2=t*i,e.y1=r[0],e.y2=r[1],e.startLine=s,e.endLine=a,e.isRange=o,e.fill=n,e.fillOpacity=l??1,e.stroke=h,e.strokeWidth=d??1,e.strokeOpacity=this.strokeOpacity??1,e.lineDash=c}updateLabel(){let{crossLineLabel:e,label:t}=this;t.text&&(e.fontStyle=t.fontStyle,e.fontWeight=t.fontWeight,e.fontSize=t.fontSize,e.fontFamily=t.fontFamily,e.fill=t.color,e.text=t.text)}positionLabel(){let{crossLineLabel:e,labelPoint:{x:t,y:i}={},label:{parallel:r,rotation:s,position:a="top",padding:o=0},direction:n,parallelFlipRotation:l,regularFlipRotation:h}=this;if(void 0===t||void 0===i)return;let{defaultRotation:d,configuredRotation:c}=vd({rotation:s,parallel:r,regularFlipRotation:h,parallelFlipRotation:l});e.rotation=d+c,e.textBaseline="middle",e.textAlign="center";let u=e.getBBox();if(!u)return;let{xTranslation:p,yTranslation:g}=vS({yDirection:"y"===n,padding:o,position:a,bbox:u});e.translationX=t+p,e.translationY=i+g}getZIndex(t=!1){return t?e.RANGE_LAYER_ZINDEX:e.LINE_LAYER_ZINDEX}getRange(){let{value:e,range:t,scale:i}=this,r=mo.is(i)||mB.is(i),s=t?.[0]??e,a=t?.[1];return r||void 0!==a||(a=s),r&&s===a&&(a=void 0),[s,a]}computeLabelBBox(){let{label:e}=this;if(!e.enabled)return;let t=new fV;t.fontFamily=e.fontFamily,t.fontSize=e.fontSize,t.fontStyle=e.fontStyle,t.fontWeight=e.fontWeight,t.text=e.text;let{labelPoint:{x:i,y:r}={},label:{parallel:s,rotation:a,position:o="top",padding:n=0},direction:l,parallelFlipRotation:h,regularFlipRotation:d}=this;if(void 0===i||void 0===r)return;let{configuredRotation:c}=vd({rotation:a,parallel:s,regularFlipRotation:d,parallelFlipRotation:h});t.rotation=c,t.textBaseline="middle",t.textAlign="center";let u=t.getBBox();if(!u)return;let{xTranslation:p,yTranslation:g}=vS({yDirection:"y"===l,padding:n,position:o,bbox:u});return t.x=i+p,t.y=r+g,t.getBBox()}calculatePadding(e){let{isRange:t,startLine:i,endLine:r,direction:s,label:{padding:a=0,position:o="top"}}=this;if(!t&&!i&&!r)return;let n=this.computeLabelBBox();if(n?.x==null||n?.y==null)return;let l=vx({yDirection:"y"===s,padding:a,position:o,bbox:n});e.left=Math.max(e.left??0,l.left??0),e.right=Math.max(e.right??0,l.right??0),e.top=Math.max(e.top??0,l.top??0),e.bottom=Math.max(e.bottom??0,l.bottom??0)}};vN.LINE_LAYER_ZINDEX=10,vN.RANGE_LAYER_ZINDEX=3,vN.LABEL_LAYER_ZINDEX=9,vN.className="CrossLine",c7([gp(gy,{optional:!0})],vN.prototype,"enabled",2),c7([gp(g4(["range","line"],"a crossLine type"),{optional:!0})],vN.prototype,"type",2),c7([gp(gg(vy("range"),gk.restrict({length:2})),{optional:!0})],vN.prototype,"range",2),c7([gp(vy("value"),{optional:!0})],vN.prototype,"value",2),c7([gp(gO,{optional:!0})],vN.prototype,"fill",2),c7([gp(gE,{optional:!0})],vN.prototype,"fillOpacity",2),c7([gp(gO,{optional:!0})],vN.prototype,"stroke",2),c7([gp(gb,{optional:!0})],vN.prototype,"strokeWidth",2),c7([gp(gE,{optional:!0})],vN.prototype,"strokeOpacity",2),c7([gp(g$,{optional:!0})],vN.prototype,"lineDash",2),c7([gp(gf)],vN.prototype,"label",2);var vO=["stroke","lineDash"],vB=gT(e=>pb(e)&&Object.keys(e).every(e=>vO.includes(e)),"objects with gridline style properties such as 'stroke' or 'lineDash'"),vG=class{constructor(){this.enabled=!0,this.width=1,this.style=[{stroke:void 0,lineDash:[]}]}};function vz(e,t=[void 0]){return pd((i,r,s)=>t.includes(s)?pw(e)?e(s):e:s)}c7([gp(gy)],vG.prototype,"enabled",2),c7([gp(gM)],vG.prototype,"width",2),c7([gp(vB)],vG.prototype,"style",2);var v_=g8(e=>pD(e)&&e>0||e instanceof uh,"a non-zero positive Number value or, for a time axis, a Time Interval such as 'agCharts.time.month'"),vV=class extends gd{constructor(){super(...arguments),this.minSpacing=NaN,this.maxSpacing=NaN}};c7([gp(v_,{optional:!0})],vV.prototype,"step",2),c7([gp(gk,{optional:!0})],vV.prototype,"values",2),c7([gp(g6),vz(NaN)],vV.prototype,"minSpacing",2),c7([gp(g5),vz(NaN)],vV.prototype,"maxSpacing",2);var vj=class extends gd{constructor(){super(...arguments),this.enabled=!0,this.fontSize=12,this.fontFamily="Verdana, sans-serif",this.padding=5,this.minSpacing=NaN,this.color="#575757",this.avoidCollisions=!0,this.mirrored=!1,this.parallel=!1}getSideFlag(){return this.mirrored?1:-1}};c7([gp(gy)],vj.prototype,"enabled",2),c7([gp(gK,{optional:!0})],vj.prototype,"fontStyle",2),c7([gp(gZ,{optional:!0})],vj.prototype,"fontWeight",2),c7([gp(gb.restrict({min:1}))],vj.prototype,"fontSize",2),c7([gp(gw)],vj.prototype,"fontFamily",2),c7([gp(gM)],vj.prototype,"padding",2),c7([gp(gI),vz(NaN)],vj.prototype,"minSpacing",2),c7([gp(gO,{optional:!0})],vj.prototype,"color",2),c7([gp(gD,{optional:!0})],vj.prototype,"rotation",2),c7([gp(gy)],vj.prototype,"avoidCollisions",2),c7([gp(gy)],vj.prototype,"mirrored",2),c7([gp(gy)],vj.prototype,"parallel",2),c7([gp(gC,{optional:!0})],vj.prototype,"formatter",2),c7([gp(gw,{optional:!0})],vj.prototype,"format",2);var vH=class{constructor(){this.enabled=!0,this.width=1,this.stroke=void 0}};c7([gp(gy)],vH.prototype,"enabled",2),c7([gp(gM)],vH.prototype,"width",2),c7([gp(gO,{optional:!0})],vH.prototype,"stroke",2);var vU=class extends gd{constructor(){super(...arguments),this.enabled=!0,this.width=1,this.size=6}};c7([gp(gy)],vU.prototype,"enabled",2),c7([gp(gM)],vU.prototype,"width",2),c7([gp(gM)],vU.prototype,"size",2),c7([gp(gO,{optional:!0})],vU.prototype,"stroke",2);var vW=class extends gd{constructor(){super(...arguments),this.caption=new vn,this.enabled=!1,this.spacing=vn.SMALL_PADDING,this.fontSize=10,this.fontFamily="sans-serif",this.wrapping="always"}};function v$(e){let[t,i]=uY(e.range),r=Math.floor(t),s=Math.ceil(i);return{min:r,max:s,visible:r!==s}}c7([gp(gy)],vW.prototype,"enabled",2),c7([gp(gw,{optional:!0})],vW.prototype,"text",2),c7([gp(gM,{optional:!0})],vW.prototype,"spacing",2),c7([gp(gK,{optional:!0})],vW.prototype,"fontStyle",2),c7([gp(gZ,{optional:!0})],vW.prototype,"fontWeight",2),c7([gp(gM)],vW.prototype,"fontSize",2),c7([gp(gw)],vW.prototype,"fontFamily",2),c7([gp(gO,{optional:!0})],vW.prototype,"color",2),c7([gp(gq)],vW.prototype,"wrapping",2),c7([gp(gC,{optional:!0})],vW.prototype,"formatter",2);var vY=2*Math.PI,vK=vY/2;function vZ(e){let t=(t,i)=>{let[r=e.min,s=e.max]=uY(i??[]);return t<r||t>s};return{tick:{fromFn(e,i,r){let s=e.y1+e.translationY,a=e.opacity;return("added"===r||t(e.datum.translationY,e.datum.range))&&(s=i.translationY,a=0),{y:0,translationY:s,opacity:a,phase:p1[r]}},toFn(e,t,i){let r=t.translationY,s=1;return"removed"===i&&(s=0),{y:0,translationY:r,opacity:s,finish:{y:r,translationY:0}}},applyFn(e,i){e.setProperties(i),e.visible=!t(e.y)}},line:{fromFn:(e,t)=>({...e.previousDatum??t,phase:p1.updated}),toFn:(e,t)=>({...t})},label:{fromFn(e,i,r){let s=e.previousDatum??i,a=s.x,o=s.y,n=s.rotationCenterX,l=Math.round(e.translationY),h=s.rotation,d=e.opacity;return"removed"===r||t(s.y,s.range)?h=i.rotation:("added"===r||t(e.datum.y,e.datum.range))&&(l=Math.round(s.translationY),d=0,h=i.rotation),{x:a,y:o,rotationCenterX:n,translationY:l,rotation:h,opacity:d,phase:p1[r]}},toFn(e,t,i){let r=t.x,s=t.y,a=t.rotationCenterX,o=Math.round(t.translationY),n=0,l=1;if("added"===i)l=1,n=t.rotation;else if("removed"===i)l=0,n=t.rotation;else{var h,d;h=e.previousDatum?.rotation??t.rotation,n=Math.abs((d=t.rotation)-h)<vK?d:h>d?d+vY:d-vY}return{x:r,y:s,rotationCenterX:a,translationY:o,rotation:n,opacity:l,finish:{rotation:t.rotation}}}},group:{fromFn(e,t){let{rotation:i,translationX:r,translationY:s}=e;return{rotation:i,translationX:r,translationY:s,phase:p1.updated}},toFn(e,t){let{rotation:i,translationX:r,translationY:s}=t;return{rotation:i,translationX:r,translationY:s}}}}}function vq(){return(e,t)=>({rotation:t.rotation,rotationCenterX:t.rotationCenterX,rotationCenterY:t.rotationCenterY,translationX:t.translationX,translationY:t.translationY})}function vX(e){let{visible:t,min:i,max:r}=e;return(e,s)=>{let a=s.translationY;return{y:a,translationY:0,opacity:1,visible:t&&a>=i&&a<=r}}}function vQ(){return(e,t)=>({x:t.x,y:t.y,translationY:t.translationY,rotation:t.rotation,rotationCenterX:t.rotationCenterX})}function vJ(){return(e,t)=>({...t})}var v0=class extends mZ(fL){},v1=class e{constructor(t,i){let r;this.moduleCtx=t,this.scale=i,this.id=uB(this),this.nice=!0,this.reverse=!1,this.keys=[],this.interval=new vV,this.dataDomain={domain:[],clipped:!1},this.layoutConstraints={stacked:!0,align:"start",width:100,unit:"percent"},this.boundSeries=[],this.includeInvisibleDomains=!1,this.interactionEnabled=!0,this.axisGroup=new m2({name:`${this.id}-axis`,zIndex:2}),this.lineNode=this.axisGroup.appendChild(new v0({name:`${this.id}-Axis-line`})),this.tickLineGroup=this.axisGroup.appendChild(new mQ({name:`${this.id}-Axis-tick-lines`,zIndex:2})),this.tickLabelGroup=this.axisGroup.appendChild(new mQ({name:`${this.id}-Axis-tick-labels`,zIndex:2})),this.crossLineGroup=new m2({name:`${this.id}-CrossLines`}),this.labelGroup=new mQ({name:`${this.id}-Labels`,zIndex:11}),this.gridGroup=new m2({name:`${this.id}-Axis-grid`}),this.gridLineGroup=this.gridGroup.appendChild(new mQ({name:`${this.id}-gridLines`,zIndex:1})),this.tickLineGroupSelection=fl.select(this.tickLineGroup,v0,!1),this.tickLabelGroupSelection=fl.select(this.tickLabelGroup,fV,!1),this.gridLineGroupSelection=fl.select(this.gridLineGroup,v0,!1),this._crossLines=[],this.line=new vH,this.tick=new vU,this.gridLine=new vG,this.label=this.createLabel(),this.defaultTickMinSpacing=e.defaultTickMinSpacing,this.translation={x:0,y:0},this.rotation=0,this.layout={label:{fractionDigits:0,padding:this.label.padding,format:this.label.format}},this.destroyFns=[],this.range=[0,1],this.visibleRange=[0,1],this.title=new vW,this.gridLength=0,this.gridPadding=0,this.seriesAreaPadding=0,this.tickGenerationResult=void 0,this.moduleMap=new mi,this.range=this.scale.range.slice(),this.crossLines.forEach(e=>this.initCrossLine(e)),this.destroyFns.push(this.title.caption.registerInteraction(this.moduleCtx)),this.title.caption.node.rotation=-Math.PI/2,this.axisGroup.appendChild(this.title.caption.node),this.animationManager=t.animationManager,this.animationState=new f5("empty",{empty:{update:{target:"ready",action:()=>this.resetSelectionNodes()},reset:"empty"},ready:{update:e=>this.animateReadyUpdate(e),resize:()=>this.resetSelectionNodes(),reset:"empty"}}),this._crossLines=[],this.destroyFns.push(t.layoutManager.addListener("layout:complete",e=>{null!=r&&null!=f$(e.chart,r)&&this.animationState.transition("resize"),r={...e.chart}}))}get type(){return this.constructor.type??""}set crossLines(e){let{CrossLineConstructor:t}=this.constructor;this._crossLines.forEach(e=>this.detachCrossLine(e)),this._crossLines=e.map(e=>{let i=new t;return i.set(e),i}),this._crossLines.forEach(e=>{this.attachCrossLine(e),this.initCrossLine(e)})}get crossLines(){return this._crossLines}resetAnimation(e){"initial"===e&&this.animationState.transition("reset")}attachCrossLine(e){this.crossLineGroup.appendChild(e.group),this.crossLineGroup.appendChild(e.labelGroup)}detachCrossLine(e){this.crossLineGroup.removeChild(e.group),this.crossLineGroup.removeChild(e.labelGroup)}destroy(){this.moduleMap.destroy(),this.destroyFns.forEach(e=>e())}updateRange(){let{range:e,visibleRange:t,scale:i}=this,r=(e[1]-e[0])/(t[1]-t[0]),s=r*t[0],a=e[0]-s;i.setVisibleRange?.(t),i.range=[a,a+r],this.crossLines.forEach(t=>{t.clippedRange=[e[0],e[1]]})}setCrossLinesVisible(e){this.crossLineGroup.visible=e}attachAxis(e,t){t.appendChild(this.gridGroup),e.appendChild(this.axisGroup),e.appendChild(this.crossLineGroup),e.appendChild(this.labelGroup)}attachLabel(e){this.labelGroup.append(e)}detachAxis(e,t){t.removeChild(this.gridGroup),e.removeChild(this.axisGroup),e.removeChild(this.crossLineGroup),e.removeChild(this.labelGroup)}inRange(e,t=0){let[i,r]=uY(this.range);return e>=i-t&&e<=r+t}onFormatChange(e,t,i,r){let{scale:s}=this,a=s instanceof mI,o=e=>a?String:i=>"number"==typeof i?i.toFixed(t+e):String(i);if(r&&s&&s.tickFormat)try{let t=s.tickFormat({ticks:e,specifier:r});this.labelFormatter=t,this.datumFormatter=t}catch(e){this.labelFormatter=o(0),this.datumFormatter=o(1),ul.warnOnce(`the axis label format string ${r} is invalid. No formatting will be applied`)}else this.labelFormatter=o(0),this.datumFormatter=o(1)}setTickInterval(e){this.scale.interval=this.interval?.step??e}onGridLengthChange(e,t){t^e&&this.onGridVisibilityChange(),this.crossLines.forEach(e=>this.initCrossLine(e))}onGridVisibilityChange(){this.gridLineGroupSelection.clear()}createLabel(){return new vj}update(e=!0){if(!this.tickGenerationResult)return;let{rotation:t,parallelFlipRotation:i,regularFlipRotation:r}=this.calculateRotations(),s=this.label.getSideFlag();this.updatePosition();let a=this.getAxisLineCoordinates(),{tickData:o,combinedRotation:n,textBaseline:l,textAlign:h,primaryTickCount:d}=this.tickGenerationResult,c=this.tickLabelGroupSelection.nodes().map(e=>e.datum.tickId);if(this.updateSelections(a,o.ticks,{combinedRotation:n,textAlign:h,textBaseline:l,range:this.scale.range}),!e||this.animationManager.isSkipped())this.resetSelectionNodes();else{let e=this.calculateUpdateDiff(c,o);this.animationState.transition("update",e)}return this.updateAxisLine(),this.updateLabels(),this.updateVisibility(),this.updateGridLines(s),this.updateTickLines(),this.updateTitle({anyTickVisible:o.ticks.length>0}),this.updateCrossLines({rotation:t,parallelFlipRotation:i,regularFlipRotation:r}),this.updateLayoutState(o.fractionDigits),d}getAxisLineCoordinates(){let[e,t]=uY(this.range);return{x:0,y1:e,y2:t}}getTickLineCoordinates(e){let t=this.label.getSideFlag()*this.getTickSize(),i=Math.min(0,t),r=i+Math.abs(t);return{x1:i,x2:r,y:e.translationY}}getTickLabelProps(e,t){let{label:i}=this,{combinedRotation:r,textBaseline:s,textAlign:a,range:o}=t,n=e.tickLabel,l=i.getSideFlag()*(this.getTickSize()+i.padding+this.seriesAreaPadding);return{tickId:e.tickId,translationY:e.translationY,fill:i.color,fontFamily:i.fontFamily,fontSize:i.fontSize,fontStyle:i.fontStyle,fontWeight:i.fontWeight,rotation:r,rotationCenterX:l,text:n,textAlign:a,textBaseline:s,visible:""!==n&&null!=n,x:l,y:0,range:o}}getTickSize(){return this.tick.enabled?this.tick.size:6}setTitleProps(e,t){let{title:i}=this;if(!i.enabled){e.enabled=!1,e.node.visible=!1;return}e.color=i.color,e.fontFamily=i.fontFamily,e.fontSize=i.fontSize,e.fontStyle=i.fontStyle,e.fontWeight=i.fontWeight,e.enabled=i.enabled,e.wrapping=i.wrapping;let r=e.node,s=(i.spacing??0)+t.spacing,a=this.label.getSideFlag(),o=fd(this.rotation),n=-1===a&&o>Math.PI&&o<2*Math.PI?-1:1,l=n*a*Math.PI/2,{range:h}=this,d=Math.floor(n*a*(h[0]+h[1])/2),c=-1===a?Math.floor(-(n*s)):Math.floor(-s),{callbackCache:u}=this.moduleCtx,{formatter:p=e=>e.defaultValue}=i,g=u.call(p,this.getTitleFormatterParams());r.setProperties({visible:!0,text:g,textBaseline:1===n?"bottom":"top",x:d,y:c,rotation:l})}calculateLayout(e){let{rotation:t,parallelFlipRotation:i,regularFlipRotation:r}=this.calculateRotations(),s=this.label.getSideFlag(),a=s*(this.getTickSize()+this.label.padding+this.seriesAreaPadding);this.updateScale(),this.tickGenerationResult=this.generateTicks({primaryTickCount:e,parallelFlipRotation:i,regularFlipRotation:r,labelX:a,sideFlag:s});let{tickData:o,combinedRotation:n,textBaseline:l,textAlign:h,...d}=this.tickGenerationResult;this.updateLayoutState(o.fractionDigits);let c=[],{x:u,y1:p,y2:g}=this.getAxisLineCoordinates(),m=new u3(u+Math.min(s*this.seriesAreaPadding,0),p,this.seriesAreaPadding,g-p);if(c.push(m),this.tick.enabled&&o.ticks.forEach(e=>{let{x1:t,x2:i,y:r}=this.getTickLineCoordinates(e),s=new u3(t,r,i-t,0);c.push(s)}),this.label.enabled){let e=new fV;o.ticks.forEach(t=>{let i=this.getTickLabelProps(t,{combinedRotation:n,textAlign:h,textBaseline:l,range:this.scale.range});if(!i.visible)return;e.setProperties({...i,translationY:Math.round(t.translationY)});let r=e.getBBox();r&&c.push(r)})}if(this.title?.enabled){let e=new vn,t=u3.merge(c).width;this.setTitleProps(e,{spacing:t});let i=e.node.getBBox();i&&c.push(i)}let f=u3.merge(c),v=this.getTransformBox(f),y=this.isAnySeriesActive();return this.crossLines.forEach(e=>{var a;e.sideFlag=-s,e.direction=t===-Math.PI/2?"x":"y",e instanceof vN&&((a=e.label).parallel??(a.parallel=this.label.parallel)),e.parallelFlipRotation=i,e.regularFlipRotation=r,e.calculateLayout?.(y,this.reverse)}),{primaryTickCount:d.primaryTickCount,bbox:v}}updateLayoutState(e){this.layout.label={fractionDigits:e,padding:this.label.padding,format:this.label.format}}getTransformBox(e){let t=new mH,{rotation:i,translationX:r,translationY:s,rotationCenterX:a,rotationCenterY:o}=this.getAxisTransform();return mH.updateTransformMatrix(t,1,1,i,r,s,{scalingCenterX:0,scalingCenterY:0,rotationCenterX:a,rotationCenterY:o}),t.transformBBox(e)}setDomain(e){this.dataDomain=this.normaliseDataDomain(e),this.reverse&&this.dataDomain.domain.reverse(),this.scale.domain=this.dataDomain.domain}updateScale(){this.updateRange(),this.calculateDomain(),this.setTickInterval(this.interval.step);let{scale:e,nice:t}=this;mo.is(e)&&(e.nice=t,e.update())}calculateRotations(){let e=fg(this.rotation),t=fd(e),i=fd(e-Math.PI/2);return{rotation:e,parallelFlipRotation:t,regularFlipRotation:i}}generateTicks({primaryTickCount:e,parallelFlipRotation:t,regularFlipRotation:i,labelX:r,sideFlag:s}){var a;let{scale:o,interval:{minSpacing:n,maxSpacing:l},label:{parallel:h,rotation:d,fontFamily:c,fontSize:u,fontStyle:p,fontWeight:g}}=this,m=void 0!==e,{defaultRotation:f,configuredRotation:v,parallelFlipFlag:y,regularFlipFlag:C}=vd({rotation:d,parallel:h,regularFlipRotation:i,parallelFlipRotation:t}),w=v+f,b=new mH,{maxTickCount:S}=this.estimateTickCount({minSpacing:n,maxSpacing:l}),x=!(mo.is(o)||mB.is(o))||isNaN(S)?10:S,M=vc(h,v,0,s,C),E=h&&!v?s*y==-1?"hanging":"bottom":"middle",D=fO.toFontString({fontFamily:c,fontSize:u,fontStyle:p,fontWeight:g}),I=fF.getMeasurer({font:D}),k={fontFamily:c,fontSize:u,fontStyle:p,fontWeight:g,textBaseline:E,textAlign:M},T={rawTicks:[],fractionDigits:0,ticks:[],labelCount:0},A=0,R=0,L=!0,P=[],F=!1;for(;L&&A<=x&&!F;)for(let t of(R=0,M=vc(h,v,0,s,C),this.getTickStrategies({secondaryAxis:m,index:A}))){({tickData:T,index:A,autoRotation:R,terminate:F}=t({index:A,tickData:T,textProps:k,labelOverlap:L,terminate:F,primaryTickCount:e}));let i=0!==v||0!==R,o=w+R,n=isNaN(a=this.label.minSpacing)?i?0:10:a;mH.updateTransformMatrix(b,1,1,o,0,0),M=vc(h,v,R,s,C),P=this.createLabelData(T.ticks,r,b,I),L=!!this.label.avoidCollisions&&function(e,t=0){let i=[];for(let r=0;r<e.length;r++){let s=e[r],{point:{x:a,y:o},label:{text:n}}=s,{width:l,height:h}=s.label;if(l+=t,h+=t,i.some(e=>fj(e,a,o,l,h)))return!0;i.push({index:r,text:n,x:a,y:o,width:l,height:h,datum:s})}return!1}(P,n)}let N=f+v+R;return!m&&T.rawTicks.length>0&&(e=T.rawTicks.length),{tickData:T,primaryTickCount:e,combinedRotation:N,textBaseline:E,textAlign:M,labelData:P}}getTickStrategies({index:e,secondaryAxis:t}){let i;let{scale:r,label:s}=this,{minSpacing:a}=this.interval,o=mo.is(r)||mB.is(r),n=s.enabled&&s.avoidCollisions,l=!0===s.autoRotate&&void 0===s.rotation,h=[];return i=this.interval.values?3:t?1:!o&&0!==e&&n?2:0,h.push(({index:e,tickData:t,primaryTickCount:r,terminate:s})=>this.createTickData(i,e,t,s,r)),o||isNaN(a)||h.push(({index:e,tickData:t,primaryTickCount:i,terminate:r})=>this.createTickData(2,e,t,r,i)),n&&l&&h.push(({index:e,tickData:t,labelOverlap:i,terminate:r})=>({index:e,tickData:t,autoRotation:this.getAutoRotation(i),terminate:r})),h}createTickData(e,t,i,r,s){let{scale:a}=this,{step:o,values:n,minSpacing:l,maxSpacing:h}=this.interval,{maxTickCount:d,minTickCount:c,defaultTickCount:u}=this.estimateTickCount({minSpacing:l,maxSpacing:h}),p=mo.is(a)||mB.is(a),g=!p||isNaN(d)?10:d,m=p?Math.max(u-t,c):d,f=void 0===o&&void 0===n&&m>c&&(p||2===e),v=!0;for(;v&&t<=g;){let r=i.rawTicks;m=p?Math.max(u-t,c):d;let{rawTicks:a,fractionDigits:o,ticks:n,labelCount:l}=this.getTicks({tickGenerationType:e,previousTicks:r,tickCount:m,minTickCount:c,maxTickCount:d,primaryTickCount:s});i.rawTicks=a,i.fractionDigits=o,i.ticks=n,i.labelCount=l,v=!!f&&fU(a,r),t++}return r||(r=void 0!==o||void 0!==n),{tickData:i,index:t,autoRotation:0,terminate:r}}createLabelData(e,t,i,r){let s=[];for(let{tickLabel:a,translationY:o}of e){if(!a)continue;let{width:e,height:n}=r.measureLines(a),l=function(e,t,i){let{x:r,y:s,width:a,height:o}=t,n=new u3(r,s,0,0);i.transformBBox(n,t);let{x:l,y:h}=t;return{point:{x:l,y:h},label:{text:e,width:a,height:o}}}(a,new u3(t,o,e,n),i);s.push(l)}return s}getAutoRotation(e){return e?fd(fg(this.label.autoRotateAngle??0)):0}getTicks({tickGenerationType:e,previousTicks:t,tickCount:i,minTickCount:r,maxTickCount:s,primaryTickCount:a}){let o;let{range:n,scale:l,visibleRange:h}=this;switch(e){case 3:if(o=this.interval.values,mo.is(l)){let[e,t]=uY(l.getDomain().map(Number));o=o.filter(i=>i>=e&&i<=t).sort((e,t)=>e-t)}break;case 1:o=mo.is(l)?this.updateSecondaryAxisTicks(a):this.createTicks(i,r,s);break;case 2:o=this.filterTicks(t,i);break;default:o=this.createTicks(i,r,s)}let d=o.reduce((e,t)=>Math.max(e,"number"==typeof t?u0(t):0),0),c=(l.bandwidth??0)/2,u=[],p=0,g=new Map,m=Math.max(0,Math.floor(h[0]*o.length)),f=Math.min(o.length,Math.ceil(h[1]*o.length)),v=o.slice(m,f);this.onFormatChange(v,d,o,this.label.format);for(let e=0;e<v.length;e++){let t=v[e],i=l.convert(t)+c;if(n.length>0&&!this.inRange(i,.001))continue;let r=this.formatTick(t,d,m+e),s=r;if(g.has(s)){let e=g.get(s);g.set(s,e+1),s=`${s}_${e}`}else g.set(s,1);u.push({tick:t,tickId:s,tickLabel:r,translationY:Math.floor(i)}),""!==r&&null!=r&&p++}return{rawTicks:o,fractionDigits:d,ticks:u,labelCount:p}}filterTicks(e,t){let{minSpacing:i,maxSpacing:r}=this.interval,s=isNaN(i)&&isNaN(r)?2:Math.ceil(e.length/t);return e.filter((e,t)=>t%s==0)}createTicks(e,t,i){let{scale:r}=this;return e&&(mo.is(r)||mB.is(r))&&("number"==typeof e?(r.tickCount=e,r.minTickCount=t??0,r.maxTickCount=i??1/0):r instanceof mN&&this.setTickInterval(e)),r.ticks?.()??[]}estimateTickCount({minSpacing:e,maxSpacing:t}){if(!this.label.avoidCollisions)return{minTickCount:mo.defaultMaxTickCount,maxTickCount:mo.defaultMaxTickCount,defaultTickCount:mo.defaultMaxTickCount};let i=this.calculateRangeWithBleed(),r=Math.max(this.defaultTickMinSpacing,i/mo.defaultMaxTickCount),s=!isNaN(t);isNaN(e)&&(e=r),isNaN(t)&&(t=i),e>t&&(e===r?e=t:t=e),s&&(s=2<r);let a=uW(1,Math.floor(i/e),s?Math.min(Math.floor(i/2),100):100),o=Math.min(a,Math.ceil(i/t)),n=uW(o,mo.defaultTickCount,a);return{minTickCount:o,maxTickCount:a,defaultTickCount:n}}updateVisibility(){this.moduleCtx.animationManager.isSkipped()&&this.resetSelectionNodes(),this.tickLineGroup.visible=this.tick.enabled,this.gridLineGroup.visible=this.gridLine.enabled,this.tickLabelGroup.visible=this.label.enabled}updateCrossLines({rotation:e,parallelFlipRotation:t,regularFlipRotation:i}){let r=this.label.getSideFlag(),s=this.isAnySeriesActive();this.crossLines.forEach(a=>{var o;a.sideFlag=-r,a.direction=e===-Math.PI/2?"x":"y",a instanceof vN&&((o=a.label).parallel??(o.parallel=this.label.parallel)),a.parallelFlipRotation=t,a.regularFlipRotation=i,a.update(s)})}updateTickLines(){let{tick:e,label:t}=this,i=t.getSideFlag();this.tickLineGroupSelection.each(t=>{t.strokeWidth=e.width,t.stroke=e.stroke,t.x1=i*this.getTickSize(),t.x2=0})}calculateAvailableRange(){return uK(this.range)}calculateRangeWithBleed(){let e=1/uK(this.visibleRange);return uX(this.calculateAvailableRange()*e,2)}calculateDomain(){let e=this.boundSeries.filter(e=>this.includeInvisibleDomains||e.isEnabled()).flatMap(e=>e.getDomain(this.direction));this.setDomain(e)}getAxisTransform(){return{rotation:fg(this.rotation),rotationCenterX:0,rotationCenterY:0,translationX:Math.floor(this.translation.x),translationY:Math.floor(this.translation.y)}}updatePosition(){let{crossLineGroup:e,axisGroup:t,gridGroup:i,translation:r,gridLineGroupSelection:s,gridPadding:a,gridLength:o}=this,{rotation:n}=this.calculateRotations(),l=this.label.getSideFlag(),h=Math.floor(r.x),d=Math.floor(r.y);e.setProperties({rotation:n,translationX:h,translationY:d}),i.setProperties({rotation:n,translationX:h,translationY:d}),t.datum=this.getAxisTransform(),s.each(e=>{e.x1=a,e.x2=-l*o+a})}updateSecondaryAxisTicks(e){throw Error("AG Charts - unexpected call to updateSecondaryAxisTicks() - check axes configuration.")}updateSelections(e,t,i){this.lineNode.datum=e,this.gridLineGroupSelection.update(this.gridLength?t:[],e=>e.append(new fL),e=>e.tickId),this.tickLineGroupSelection.update(t,e=>e.appendChild(new fL),e=>e.tickId),this.tickLabelGroupSelection.update(t.map(e=>this.getTickLabelProps(e,i)),e=>e.appendChild(new f_),e=>e.tickId)}updateAxisLine(){let{enabled:e,stroke:t,width:i}=this.line;this.lineNode.setProperties({stroke:t,strokeWidth:e?i:0})}updateGridLines(e){let{gridLine:{style:t,width:i},gridPadding:r,gridLength:s}=this;0!==s&&0!==t.length&&this.gridLineGroupSelection.each((a,o,n)=>{let{stroke:l,lineDash:h}=t[n%t.length];a.setProperties({x1:r,x2:-e*s+r,fill:void 0,stroke:l,strokeWidth:i,lineDash:h})})}updateLabels(){this.label.enabled&&this.tickLabelGroupSelection.each((e,t)=>{e.setProperties(t,["fill","fontFamily","fontSize","fontStyle","fontWeight","text","textAlign","textBaseline"])})}updateTitle(e){let{title:t,lineNode:i,tickLineGroup:r,tickLabelGroup:s}=this,a=0;t.enabled&&e.anyTickVisible&&(a+=mQ.computeChildrenBBox([r,s,i]).width+(this.tickLabelGroup.visible?0:this.seriesAreaPadding)),this.setTitleProps(t.caption,{spacing:a})}formatTick(e,t,i){return String(this.getFormatter(i,!0)(e,t))}formatDatum(e){return String(this.getFormatter()(e))}getFormatter(e=0,t){let{label:i,labelFormatter:r,datumFormatter:s,moduleCtx:{callbackCache:a}}=this;return i.formatter?(t,r)=>a.call(i.formatter,{value:t,index:e,fractionDigits:r})??t:!t&&s?e=>a.call(s,e)??String(e):r?e=>a.call(r,e)??String(e):e=>String(e)}getBBox(){return this.axisGroup.getBBox()}getRegionNode(){return this.axisGroup}initCrossLine(e){e.scale=this.scale,e.gridLength=this.gridLength}isAnySeriesActive(){return this.boundSeries.some(e=>this.includeInvisibleDomains||e.isEnabled())}clipTickLines(e,t,i,r){this.tickLineGroup.setClipRectInGroupCoordinateSpace(new u3(e,t,i,r))}clipGrid(e,t,i,r){this.gridGroup.setClipRectInGroupCoordinateSpace(new u3(e,t,i,r))}getTitleFormatterParams(){let e=this.boundSeries.reduce((e,t)=>{let i=t.getKeys(this.direction),r=t.getNames(this.direction);for(let t=0;t<i.length;t++)e.push({key:i[t],name:r[t]});return e},[]);return{direction:this.direction,boundSeries:e,defaultValue:this.title?.text}}normaliseDataDomain(e){return{domain:[...e],clipped:!1}}getLayoutState(){return{id:this.id,rect:this.getBBox(),gridPadding:this.gridPadding,seriesAreaPadding:this.seriesAreaPadding,tickSize:this.getTickSize(),direction:this.direction,domain:this.dataDomain.domain,scale:this.scale,...this.layout}}getModuleMap(){return this.moduleMap}createModuleContext(){return this.axisContext??(this.axisContext=this.createAxisContext()),{...this.moduleCtx,parent:this.axisContext}}createAxisContext(){let{scale:e}=this;return{axisId:this.id,direction:this.direction,continuous:mo.is(e)||mB.is(e),keys:()=>this.boundSeries.flatMap(e=>e.getKeys(this.direction)),seriesKeyProperties:()=>this.boundSeries.reduce((e,t)=>(t.getKeyProperties(this.direction).forEach(t=>{0>e.indexOf(t)&&e.push(t)}),e),[]),scaleValueFormatter:e=>this.getScaleValueFormatter(e),scaleBandwidth:()=>e.bandwidth??0,scaleDomain:()=>e.getDomain?.(),scaleConvert:t=>e.convert(t),scaleInvert:mB.is(e)?t=>e.invertNearest?.(t):t=>e.invert?.(t),scaleInvertNearest:t=>e.invertNearest?.(t),attachLabel:e=>this.attachLabel(e),inRange:(e,t)=>this.inRange(e,t)}}getScaleValueFormatter(e){let{scale:t}=this;if(e&&t&&t.tickFormat)try{return t.tickFormat({specifier:e})}catch(t){ul.warnOnce(`the format string ${e} is invalid, ignoring.`)}return this.getFormatter()}animateReadyUpdate(e){let{animationManager:t}=this.moduleCtx,i=vZ(v$(this));p2(this.id,"axis-group",t,[this.axisGroup],i.group),p2(this.id,"line",t,[this.lineNode],i.line),p2(this.id,"line-paths",t,[this.gridLineGroupSelection,this.tickLineGroupSelection],i.tick,(e,t)=>t.tickId,e),p2(this.id,"tick-labels",t,[this.tickLabelGroupSelection],i.label,(e,t)=>t.tickId,e)}resetSelectionNodes(){let{gridLineGroupSelection:e,tickLineGroupSelection:t,tickLabelGroupSelection:i,lineNode:r}=this,s=v$(this);ms([this.axisGroup],vq()),ms([e,t],vX(s)),ms([i],vQ()),ms([r],vJ())}calculateUpdateDiff(e,t){let i=new Set,r=new Set,s={},a=Math.max(e.length,t.ticks.length);for(let o=0;o<a;o++){let a=t.ticks[o],n=e[o],l=a?.tickId;s[l??n]=a,n!==l&&(r.has(l)?r.delete(l):l&&i.add(l),i.has(n)?i.delete(n):n&&r.add(n))}return{changed:i.size>0||r.size>0,added:i,removed:r}}isReversed(){return this.reverse}};v1.defaultTickMinSpacing=50,v1.CrossLineConstructor=vN,c7([gp(gy)],v1.prototype,"nice",2),c7([gp(gy)],v1.prototype,"reverse",2),c7([gp(g_)],v1.prototype,"keys",2),c7([gp(gf)],v1.prototype,"interval",2),c7([gp(gf)],v1.prototype,"title",2),c7([f3((e,t,i)=>e.onGridLengthChange(t,i))],v1.prototype,"gridLength",2);var v2=v1,v3=class extends vj{constructor(){super(...arguments),this.autoRotateAngle=335}};c7([gp(gy,{optional:!0})],v3.prototype,"autoRotate",2),c7([gp(gD)],v3.prototype,"autoRotateAngle",2);var v4=class e extends v2{constructor(){super(...arguments),this.thickness=0}static is(t){return t instanceof e}get direction(){return"top"===this.position||"bottom"===this.position?"x":"y"}updateDirection(){switch(this.position){case"top":this.rotation=-90,this.label.mirrored=!0,this.label.parallel=!0;break;case"right":this.rotation=0,this.label.mirrored=!0,this.label.parallel=!1;break;case"bottom":this.rotation=-90,this.label.mirrored=!1,this.label.parallel=!0;break;case"left":this.rotation=0,this.label.mirrored=!1,this.label.parallel=!1}this.axisContext&&(this.axisContext.position=this.position,this.axisContext.direction=this.direction)}update(e){return this.updateDirection(),super.update(e)}calculateLayout(e){return this.updateDirection(),super.calculateLayout(e)}createAxisContext(){return{...super.createAxisContext(),position:this.position}}createLabel(){return new v3}};c7([gp(gM)],v4.prototype,"thickness",2),c7([gp(gY)],v4.prototype,"position",2);var v6=v4,v5=class e extends v6{constructor(e,t=new gh){super(e,t),this.groupPaddingInner=.1,this.includeInvisibleDomains=!0}static is(t){return t instanceof e}normaliseDataDomain(e){let t=[],i=new Set;for(let r of e){let e=r instanceof Date?r.getTime():r;i.has(e)||(i.add(e),t.push(r))}return{domain:t,clipped:!1}}calculateDomain(){let{paddingInner:e,paddingOuter:t}=this;if(!pD(e)||!pD(t)){let i=this.reduceBandScalePadding();e??(e=i.inner),t??(t=i.outer)}return this.scale.paddingInner=e??0,this.scale.paddingOuter=t??0,super.calculateDomain()}reduceBandScalePadding(){return this.boundSeries.reduce((e,t)=>{let i=t.getBandScalePadding?.();return i&&(e.inner>i.inner&&(e.inner=i.inner),e.outer<i.outer&&(e.outer=i.outer)),e},{inner:1/0,outer:-1/0})}};v5.className="CategoryAxis",v5.type="category",c7([gp(gE)],v5.prototype,"groupPaddingInner",2),c7([gp(gE,{optional:!0})],v5.prototype,"paddingInner",2),c7([gp(gE,{optional:!0})],v5.prototype,"paddingOuter",2);var v8=class{constructor(e="",t,i=0){this.x=0,this.y=0,this.subtreeLeft=NaN,this.subtreeRight=NaN,this.screenX=0,this.screenY=0,this.children=[],this.leafCount=0,this.prelim=0,this.mod=0,this.ancestor=this,this.change=0,this.shift=0,this.label=e,this.parent=t,this.depth=t?t.depth+1:0,this.number=i}getLeftSibling(){return this.number>0&&this.parent?this.parent.children[this.number-1]:void 0}getLeftmostSibling(){return this.number>0&&this.parent?this.parent.children[0]:void 0}nextLeft(){return this.children?this.children[0]:this.thread}nextRight(){return this.children?this.children[this.children.length-1]:this.thread}getSiblings(){return this.parent?this.parent.children.filter((e,t)=>t!==this.number):[]}},v7=class{constructor(){this.top=1/0,this.right=-1/0,this.bottom=-1/0,this.left=1/0}update(e,t){let{x:i,y:r}=t(e);i>this.right&&(this.right=i),i<this.left&&(this.left=i),r>this.bottom&&(this.bottom=r),r<this.top&&(this.top=r)}},v9=class{constructor(){this.dimensions=new v7,this.leafCount=0,this.nodes=[],this.leafNodes=[],this.nonLeafNodes=[],this.depth=0}update(e){this.dimensions.update(e,e=>({x:e.x,y:e.y})),e.children.length?this.nonLeafNodes.push(e):(this.leafCount++,this.leafNodes.push(e)),e.depth>this.depth&&(this.depth=e.depth),this.nodes.push(e)}resize(e,t,i=0,r=0,s=!1){let a=this.leafCount-1,o=this.depth,n=this.dimensions,l=1,h=1;if(e>0&&a){let t=(n.right-n.left)/a;l=e/a/t,s&&(l=-l)}if(t>0&&o){let e=(n.bottom-n.top)/o;h=t/o/e}let d=new v7;this.nodes.forEach(e=>{e.screenX=e.x*l,e.screenY=e.y*h,d.update(e,e=>({x:e.screenX,y:e.screenY}))});let c=-d.left,u=-d.top;this.nodes.forEach(e=>{e.screenX+=c+i,e.screenY+=u+r})}},ye=class extends vj{constructor(){super(...arguments),this.grid=!1}};c7([gp(gy)],ye.prototype,"grid",2);var yt=class extends v6{constructor(e){let t=new gh;t.paddingOuter=.1,t.paddingInner=2*t.paddingOuter,super(e,t),this.tickScale=new gh,this.line=new vH,this.label=new ye,this.labelColor="rgba(87, 87, 87, 1)",this.includeInvisibleDomains=!0;let{tickLineGroup:i,tickLabelGroup:r,gridLineGroup:s,tickScale:a}=this;a.paddingInner=1,a.paddingOuter=0,this.gridLineSelection=fl.select(s,fL),this.axisLineSelection=fl.select(i,fL),this.separatorSelection=fl.select(i,fL),this.labelSelection=fl.select(r,fV),this.lineNode.visible=!1}updateRange(){let{range:e,visibleRange:t,scale:i}=this,r=(e[1]-e[0])/(t[1]-t[0]),s=r*t[0],a=e[0]-s;this.tickScale.range=i.range=[a,a+r],this.resizeTickTree()}resizeTickTree(){let e=this.scale,t=e.domain.length?[e.convert(e.domain[0]),e.convert(e.domain[e.domain.length-1])]:e.range,i=this.tickTreeLayout,r=this.lineHeight;i&&i.resize(Math.abs(t[1]-t[0]),i.depth*r,(Math.min(t[0],t[1])||0)+(e.bandwidth??0)/2,-i.depth*r,t[1]-t[0]<0)}get lineHeight(){return 1.5*this.label.fontSize}onGridVisibilityChange(){this.gridLineSelection.clear(),this.labelSelection.clear()}calculateDomain(){let{direction:e}=this,t=null,i=this.boundSeries.filter(e=>e.visible).flatMap(i=>{if("y"===e||t)return i.getDomain(e);if(null===t){let r=i.getDomain(e);return t=pE(r[0]),r}return[]});this.setDomain(mk(i)??mL(i));let{domain:r}=this.dataDomain;this.tickTreeLayout=function(e){let t=new v9;return function e(t,i){let r=t.children;if(r.length){let s=r[0];r.forEach(t=>{e(t,i),s=function(e,t,i){let r=e.getLeftSibling();if(r){let o=e,n=e,l=r,h=n.getLeftmostSibling(),d=n.mod,c=o.mod,u=l.mod,p=h.mod;for(;l.nextRight()&&n.nextLeft();){l=l.nextRight(),n=n.nextLeft(),h=h.nextLeft(),(o=o.nextRight()).ancestor=e;let r=l.prelim+u-(n.prelim+d)+i;if(r>0){var s,a;(function(e,t,i){let r=i/(t.number-e.number);t.change-=r,t.shift+=i,e.change+=r,t.prelim+=i,t.mod+=i})((s=l,a=t,e.getSiblings().indexOf(s.ancestor)>=0?s.ancestor:a),e,r),d+=r,c+=r}u+=l.mod,d+=n.mod,p+=h.mod,c+=o.mod}l.nextRight()&&!o.nextRight()?(o.thread=l.nextRight(),o.mod+=u-c):(n.nextLeft()&&!h.nextLeft()&&(h.thread=n.nextLeft(),h.mod+=d-p),t=e)}return t}(t,s,i)}),function(e){let t=e.children;if(t){let e=0,i=0;for(let r=t.length-1;r>=0;r--){let s=t[r];s.prelim+=e,s.mod+=e,i+=s.change,e+=s.shift+i}}}(t);let a=(r[0].prelim+r.at(-1).prelim)/2,o=t.getLeftSibling();o?(t.prelim=o.prelim+i,t.mod=t.prelim-a):t.prelim=a}else{let e=t.getLeftSibling();t.prelim=e?e.prelim+i:0}}(e,1),function e(t,i,r){t.x=t.prelim+i,t.y=t.depth,r.update(t),t.children.forEach(s=>e(s,i+t.mod,r))}(e,-e.prelim,t),function e(t){let i=t.children,r=0;i.forEach(t=>{e(t),t.children.length?r+=t.leafCount:r++}),t.leafCount=r,i.length?(t.subtreeLeft=i[0].subtreeLeft,t.subtreeRight=i[t.children.length-1].subtreeRight,t.x=(t.subtreeLeft+t.subtreeRight)/2):(t.subtreeLeft=t.x,t.subtreeRight=t.x)}(e),t}(function(e,t=!0){let i=new v8,r=0;return t&&e.forEach(e=>r=Math.max(r,e.labels.length)),e.forEach(e=>{if(t)for(;e.labels.length<r;)e.labels.unshift("");(function(e,t){let i=t.labels.slice().reverse(),r=i.length-1;i.forEach((t,i)=>{let s=e.children,a=s.find(e=>e.label===t),o=i!==r;if(a&&o)e=a;else{let i=new v8(t,e);i.number=s.length,s.push(i),o&&(e=i)}})})(i,e)}),i}(r)),this.tickScale.domain=r.concat(""),this.resizeTickTree()}update(){this.computedLayout&&(this.updatePosition(),this.updateTitleCaption(),this.updateCategoryLabels(),this.updateSeparators(),this.updateAxisLines(),this.updateCategoryGridLines(),this.resetSelectionNodes())}updateTitleCaption(){this.title.caption.node.visible=!1}updateCategoryLabels(){if(!this.computedLayout)return;let{tickLabelLayout:e}=this.computedLayout;this.labelSelection.update(e).each((e,t)=>{e.setProperties(t)})}updateSeparators(){if(!this.computedLayout)return;let{separatorLayout:e}=this.computedLayout,{range:t}=this;this.separatorSelection.update(e).each((e,i)=>{e.x1=i.x1,e.x2=i.x2,e.y1=i.y,e.y2=i.y,e.visible=this.tick.enabled&&i.y>=t[0]-1e-7&&i.y<=t[1]+1e-7,e.stroke=this.tick.stroke,e.fill=void 0,e.strokeWidth=1})}updateAxisLines(){if(!this.computedLayout)return;let{axisLineLayout:e}=this.computedLayout;this.axisLineSelection.update(e).each((e,t)=>{e.setProperties({...t,stroke:this.line.stroke,strokeWidth:this.line.width}),e.x1=t.x,e.x2=t.x,e.y1=t.y1,e.y2=t.y2,e.strokeWidth=this.line.width,e.stroke=this.line.stroke})}updateCategoryGridLines(){let{gridLength:e,gridLine:t,label:i,range:r,tickScale:s}=this,a=s.ticks(),o=i.getSideFlag(),n=this.gridLineSelection.update(e?a:[]);if(e){let{width:i,style:a}=t,l=a.length;n.each((n,h,d)=>{let c=Math.round(s.convert(h));n.x1=0,n.x2=-o*e,n.y1=c,n.y2=c,n.visible=t.enabled&&c>=r[0]&&c<=r[1];let{stroke:u,lineDash:p}=a[d%l];n.stroke=u,n.strokeWidth=i,n.lineDash=p,n.fill=void 0})}}computeLayout(){this.updateDirection(),this.calculateDomain(),this.updateRange();let{scale:e,label:t,label:{parallel:i},moduleCtx:{callbackCache:r},range:s,title:a,title:{formatter:o=e=>e.defaultValue}={}}=this,n=e.range[0],l=e.range[1],h=Math.abs(l-n)/e.domain.length||0,d=Math.ceil(t.fontSize/h),c=fg(this.rotation),u=1e-8>Math.abs(Math.cos(c)),p=t.getSideFlag(),g=this.lineHeight,m=this.tickTreeLayout,f=e.ticks(),v=m?m.nodes:[],y=!!m&&m.depth>1,{defaultRotation:C,configuredRotation:w,parallelFlipFlag:b}=vd({rotation:t.rotation,parallel:i,regularFlipRotation:fd(c-Math.PI/2),parallelFlipRotation:fd(c)}),S=[],x=e=>({fill:e.fill,fontFamily:e.fontFamily,fontSize:e.fontSize,fontStyle:e.fontStyle,fontWeight:e.fontWeight,rotation:e.rotation,rotationCenterX:e.rotationCenterX,rotationCenterY:e.rotationCenterY,text:e.text,textAlign:e.textAlign,textBaseline:e.textBaseline,translationX:e.translationX,translationY:e.translationY,visible:e.visible,x:e.x,y:e.y}),M=new Map,E=0,D=new fV,I=(e,i)=>{if(D.setProperties({fill:t.color,fontFamily:t.fontFamily,fontSize:t.fontSize,fontStyle:t.fontStyle,fontWeight:t.fontWeight,textAlign:"center",textBaseline:-1===b?"bottom":"hanging",translationX:e.screenY-.25*t.fontSize,translationY:e.screenX}),0===i){if(!(a?.enabled&&f.length>0))return!1;let i=r.call(o,this.getTitleFormatterParams());D.setProperties({fill:a.color,fontFamily:a.fontFamily,fontSize:a.fontSize,fontStyle:a.fontStyle,fontWeight:a.fontWeight,text:i,textBaseline:"hanging",translationX:e.screenY-.25*t.fontSize,translationY:e.screenX})}else{if(i%d!=0||!(e.screenX>=s[0]&&e.screenX<=s[1]))return!1;t.formatter?D.text=r.call(t.formatter,{value:String(e.label),index:i})??String(e.label):D.text=String(e.label)}return!0};v.forEach((e,t)=>{if(!I(e,t))return;let i=D.getBBox();i&&(M.set(t,i),!e.children.length&&i.width>E&&(E=i.width))});let k=p*t.padding,T=this.label.grid,A=[];v.forEach((e,t)=>{let i,r=I(e,t);D.x=k,D.rotationCenterX=k;let s=!e.children.length;if(s)D.rotation=w,D.textAlign="end",D.textBaseline="middle";else{D.translationX-=E-g+this.label.padding;let i=e.leafCount*h,s=M.get(t);s&&s.width>i?(r=!1,M.delete(t)):u?D.rotation=C:D.rotation=-Math.PI/2}if(e.parent&&y){let t=s?e.screenX-h/2:e.screenX-e.leafCount*h/2;if(s)(e.number!==e.children.length-1||T)&&A.push({y:t,x1:0,x2:-E-2*this.label.padding});else{let i=-E-2*this.label.padding+e.screenY;A.push({y:t,x1:i+g,x2:i})}}if(r){let e=mq.toCanvas(D);e&&M.set(t,e),i={...x(D),visible:r}}else M.delete(t),i={visible:r};S.push(i)});let R=0;A.forEach(e=>R=Math.min(R,e.x2)),A.push({y:Math.max(n,l),x1:0,x2:R});let L=[],P=[];A.forEach(e=>{if(e.y>=s[0]-1e-7&&e.y<=s[1]+1e-7){let{x1:t,x2:i,y:r}=e,s=new u3(Math.min(t,i),r,Math.abs(t-i),0);P.push(s),L.push({x1:t,x2:i,y:r})}});let F=[],N=[],O=m?m.depth+1:1;for(let e=0;e<O;e++){let t=f.length>0&&(0===e||T&&y),i=e>0?-E-2*this.label.padding-(e-1)*g:0,r=new u3(i,Math.min(...s),0,Math.abs(s[1]-s[0]));N.push(r),F.push({x:i,y1:s[0],y2:s[1],visible:t})}let B=u3.merge([...M.values(),...P,...N]);return{bbox:this.getTransformBox(B),tickLabelLayout:S,separatorLayout:L,axisLineLayout:F}}calculateLayout(){let{axisLineLayout:e,separatorLayout:t,tickLabelLayout:i,bbox:r}=this.computeLayout();return this.computedLayout={axisLineLayout:e,separatorLayout:t,tickLabelLayout:i},{bbox:r,primaryTickCount:void 0}}};yt.className="GroupedCategoryAxis",yt.type="grouped-category",c7([gp(gO,{optional:!0})],yt.prototype,"labelColor",2);var yi=class{constructor(){this.destroyFns=[]}destroy(){for(let e of this.destroyFns)e()}},yr=class{constructor(){this.modules=[],this.dependencies=new Map,this.dependents=new Map}register(...e){for(let t of e){this.registerDependencies(t);let e=this.modules.find(e=>t.type===e.type&&t.optionsKey===e.optionsKey&&t.identifier===e.identifier);if(e){if("enterprise"===t.packageType&&"community"===e.packageType){let i=this.modules.indexOf(e);this.modules.splice(i,1,t)}}else this.modules.push(t)}}hasEnterpriseModules(){return this.modules.some(e=>"enterprise"===e.packageType)}*byType(...e){let{dependents:t}=this,i=new Set,r=0,s=this.modules.filter(t=>e.includes(t.type));do{for(let e of s)if(!(i.has(e.optionsKey)||t.has(e.optionsKey)))for(let[r,s]of(yield e,i.add(e.optionsKey),t.entries()))s.delete(e.optionsKey),0===s.size&&t.delete(r);r++}while(i.size<s.length&&r<3);if(t.size>0)throw Error(`Could not resolve module dependencies: [${[...t.keys()]}]`)}registerDependencies(e){if(null!=e.dependencies&&0!==e.dependencies.length){for(let t of e.dependencies){let i=this.dependencies.get(t)??new Set;i.add(e.optionsKey),this.dependencies.set(t,i)}this.dependents.set(e.optionsKey,new Set(e.dependencies))}}},ys=new yr,ya=class{constructor(){this.available=!0,this.acquireQueue=[]}acquire(e){return new Promise(t=>{this.acquireQueue.push([e,t]),this.available&&this.dispatchNext().catch(e=>ul.errorOnce(e))})}async acquireImmediately(e){return!!this.available&&(await this.acquire(e),!0)}async waitForClearAcquireQueue(){return this.acquire(async()=>void 0)}async dispatchNext(){this.available=!1;let[e,t]=this.acquireQueue.shift()??[];for(;e;){try{await e(),t?.()}catch(e){ul.error("mutex callback error",e),t?.()}[e,t]=this.acquireQueue.shift()??[]}this.available=!0}},yo=class{constructor(){this.eventListeners=new Map}addEventListener(e,t){if("function"!=typeof t)throw Error("AG Charts - listener must be a Function");let i=this.eventListeners.get(e);i?i.add(t):this.eventListeners.set(e,new Set([t]))}removeEventListener(e,t){this.eventListeners.get(e)?.delete(t),0===this.eventListeners.size&&this.eventListeners.delete(e)}hasEventListener(e){return this.eventListeners.has(e)}clearEventListeners(){this.eventListeners.clear()}fireEvent(e){this.eventListeners.get(e.type)?.forEach(t=>t(e))}},yn=class extends gd{constructor(e=0,t=e,i=e,r=t){super(),this.top=e,this.right=t,this.bottom=i,this.left=r}};function yl(e){return yh((e,t)=>m6().requestAnimationFrame(e),e)}function yh(e,t){let i,r,s=0,a=!1,o=()=>a,n=()=>{a=!1,r?.(),r=void 0,i=void 0,s>0&&e(l)},l=()=>{let e=s;s=0,a=!0;let i=t({count:e});if(!i){n();return}i.then(n,n)};return{schedule(t){0!==s||o()||e(l,t),s++},async await(){if(o())for(null==i&&(i=new Promise(e=>{r=e}));o();)await i}}}c7([gp(gM)],yn.prototype,"top",2),c7([gp(gM)],yn.prototype,"right",2),c7([gp(gM)],yn.prototype,"bottom",2),c7([gp(gM)],yn.prototype,"left",2);var yd=class{constructor(){this.events=new Map}on(e,t){return this.events.has(e)||this.events.set(e,new Set),this.events.get(e)?.add(t),()=>this.off(e,t)}off(e,t){let i=this.events.get(e);i&&(i.delete(t),0===i.size&&this.events.delete(e))}emit(e,t){this.events.get(e)?.forEach(e=>e(t))}clear(e){e?this.events.delete(e):this.events.clear()}},yc=((k=yc||{})[k.Caption=0]="Caption",k[k.Legend=1]="Legend",k[k.Toolbar=2]="Toolbar",k[k.Navigator=3]="Navigator",k[k.Overlay=4]="Overlay",k),yu=class{constructor(){this.events=new yd,this.elements=new Map}addListener(e,t){return this.events.on(e,t)}registerElement(e,t){return this.elements.has(e)?this.elements.get(e).add(t):this.elements.set(e,new Set([t])),()=>this.elements.get(e)?.delete(t)}createContext(e,t){let i=new yp(e,t);for(let e of Object.values(yc))"number"==typeof e&&this.elements.get(e)?.forEach(e=>e(i));return i}emitLayoutComplete(e,t){let i="layout:complete",{width:r,height:s}=e;this.events.emit(i,{type:i,axes:t.axes??[],chart:{width:r,height:s},clipSeries:t.clipSeries??!1,series:t.series})}},yp=class{constructor(e,t){this.width=e,this.height=t,this.layoutBox=new u3(0,0,e,t)}},yg=class{constructor(){this.title=new vn,this.subtitle=new vn,this.footnote=new vn}positionCaptions(e){let{title:t,subtitle:i,footnote:r}=this,s=e.layoutBox.height/10;if(t.enabled){let{spacing:r=i.enabled?vn.SMALL_PADDING:vn.LARGE_PADDING}=t;this.positionCaption("top",t,e.layoutBox,s),this.shrinkLayoutByCaption("top",t,e.layoutBox,r)}i.enabled&&(this.positionCaption("top",i,e.layoutBox,s),this.shrinkLayoutByCaption("top",i,e.layoutBox,i.spacing)),r.enabled&&(this.positionCaption("bottom",r,e.layoutBox,s),this.shrinkLayoutByCaption("bottom",r,e.layoutBox,r.spacing))}positionAbsoluteCaptions(e){let{title:t,subtitle:i,footnote:r}=this,{rect:s}=e.series;for(let e of[t,i,r])if("overlay"===e.layoutStyle){if("left"===e.textAlign)e.node.x=s.x+e.padding;else if("right"===e.textAlign){let t=e.node.getBBox();e.node.x=s.x+s.width-t.width-e.padding}}}computeX(e,t){return"left"===e?t.x:"right"===e?t.x+t.width:t.x+t.width/2}positionCaption(e,t,i,r){let s=Math.max(fO.getLineHeight(t.fontSize),r);t.node.x=this.computeX(t.textAlign,i)+t.padding,t.node.y=i.y+("top"===e?0:i.height)+t.padding,t.node.textBaseline=e,t.computeTextWrap(i.width,s)}shrinkLayoutByCaption(e,t,i,r=0){if("block"===t.layoutStyle){let s=t.node.getBBox();i.shrink("top"===e?Math.ceil(s.y-i.y+s.height+r):Math.ceil(i.y+i.height-s.y+r),e)}}};c7([gp(gf)],yg.prototype,"title",2),c7([gp(gf)],yg.prototype,"subtitle",2),c7([gp(gf)],yg.prototype,"footnote",2);var ym="10.2.0",yf=Symbol("previous-memento-not-found"),yv=class{constructor(e){this.history=[],this.historyIndex=-1,this.originators=new Map,this.clearState=new Map,this.maxHistoryLength=100,this.debug=fn.create(!0,"history"),e.addEventListener("keydown",this.onKeyDown.bind(this))}addMementoOriginator(e){this.originators.set(e.mementoOriginatorKey,e),this.clearState.set(e.mementoOriginatorKey,e.createMemento()),this.debugEvent("History add originator:",e.mementoOriginatorKey)}clear(){for(let[e,t]of(this.debug("History clear:",Object.keys(this.originators)),this.history=[],this.historyIndex=-1,this.originators.entries()))this.clearState.set(e,t.createMemento())}record(e,...t){this.historyIndex<this.history.length-1&&(this.history=this.history.slice(0,this.historyIndex+1)),this.history.length>this.maxHistoryLength&&(this.history=this.history.slice(-this.maxHistoryLength));let i=new Map;for(let e of t){if(!this.originators.has(e.mementoOriginatorKey))throw Error(`Originator [${e.mementoOriginatorKey}] has not been added to the HistoryManager.`);i.set(e.mementoOriginatorKey,e.createMemento())}this.history.push({label:e,mementos:i}),this.historyIndex=this.history.length-1,this.debugEvent(`History record: [${e}]`)}undo(){let e=this.history[this.historyIndex];if(e){for(let t of e.mementos.keys()){let e=this.findPreviousMemento(t);if(e===yf)throw Error(`Could not find previous memento for [${t}].`);this.restoreMemento(t,e)}this.historyIndex-=1,this.debugEvent(`History undo: [${e.label}]`)}}redo(){let e=this.history[this.historyIndex+1];if(e){for(let[t,i]of e.mementos.entries())this.restoreMemento(t,i);this.historyIndex+=1,this.debugEvent(`History redo: [${e.label}]`)}}onKeyDown(e){let t=e.ctrlKey||e.metaKey;t&&("y"===e.key||"z"===e.key&&e.shiftKey)?this.redo():t&&"z"===e.key&&this.undo()}findPreviousMemento(e){for(let t=this.historyIndex-1;t>=0;t--)if(this.history[t].mementos.has(e))return this.history[t].mementos.get(e);return this.clearState.has(e)?this.clearState.get(e):yf}restoreMemento(e,t){this.originators.get(e)?.restoreMemento(ym,ym,t)}debugEvent(...e){this.debug(...e,this.history.map((e,t)=>t===this.historyIndex?`** ${e.label} **`:e.label))}},yy=class{constructor(e){this.version=e.split("-")[0]}save(...e){let t={version:this.version};for(let i of Object.values(e))t[i.mementoOriginatorKey]=this.encode(i,i.createMemento());return t}restore(e,...t){if("object"!=typeof e){ul.warnOnce(`Could not restore data of type [${typeof e}], expecting an object, ignoring.`);return}if(null==e){ul.warnOnce("Could not restore data of type [null], expecting an object, ignoring.");return}if(!("version"in e)||"string"!=typeof e.version){ul.warnOnce("Could not restore data, missing [version] string in object, ignoring.");return}for(let i of t){if(!(i.mementoOriginatorKey in e))continue;let t=this.decode(i,e[i.mementoOriginatorKey]);if(!i.guardMemento(t)){ul.warnOnce(`Could not restore [${i.mementoOriginatorKey}] data, value was invalid, ignoring.`,t);return}i.restoreMemento(this.version,e.version,t)}}encode(e,t){try{return JSON.parse(JSON.stringify(t,this.encodeTypes))}catch(t){throw Error(`Failed to encode [${e.mementoOriginatorKey}] value [${t}].`,{cause:t})}}decode(e,t){try{return JSON.parse(JSON.stringify(t),this.decodeTypes)}catch(t){throw Error(`Failed to decode [${e.mementoOriginatorKey}] value [${t}].`,{cause:t})}}encodeTypes(e,t){return pv(this[e])?{__type:"date",value:String(this[e])}:t}decodeTypes(e,t){return pb(this[e])&&"__type"in this[e]&&"date"===this[e].__type?new Date(this[e].value):t}},yC=class{constructor(){this.caretaker=new yy(ym),this.state=new Map}setState(e,t){null!=f$(this.state.get(e.mementoOriginatorKey),t)&&(this.state.set(e.mementoOriginatorKey,t),this.restoreState(e))}restoreState(e){let{caretaker:t,state:i}=this;if(!i.has(e.mementoOriginatorKey))return;let r=i.get(e.mementoOriginatorKey);t.restore({version:t.version,[e.mementoOriginatorKey]:r},e)}},yw=class{constructor(){this.registeredListeners=new Map}addListener(e,t){let i={symbol:Symbol(e),handler:t};return this.registeredListeners.has(e)?this.registeredListeners.get(e).push(i):this.registeredListeners.set(e,[i]),()=>this.removeListener(i.symbol)}removeListener(e){for(let[t,i]of this.registeredListeners.entries()){let r=i.findIndex(t=>t.symbol===e);if(r>=0){i.splice(r,1),0===i.length&&this.registeredListeners.delete(t);break}}}dispatch(e,...t){for(let i of this.getListenersByType(e))try{i.handler(...t)}catch(e){ul.errorOnce(e)}}dispatchWrapHandlers(e,t,...i){for(let r of this.getListenersByType(e))try{t(r.handler,...i)}catch(e){ul.errorOnce(e)}}getListenersByType(e){return this.registeredListeners.get(e)??[]}destroy(){this.registeredListeners.clear()}},yb=class{constructor(){this.listeners=new yw,this.destroyFns=[]}addListener(e,t){return this.listeners.addListener(e,t)}destroy(){this.listeners.destroy(),this.destroyFns.forEach(e=>e())}},yS=class{constructor(){if(this.elements=new Map,this.documentReady=!1,this.queuedObserveRequests=[],this.onLoad=()=>{this.documentReady=!0,this.queuedObserveRequests.forEach(([e,t])=>this.observe(e,t)),this.queuedObserveRequests=[]},"undefined"==typeof ResizeObserver)return;this.resizeObserver=new ResizeObserver(e=>{for(let{target:t,contentRect:{width:i,height:r}}of e){let e=this.elements.get(t);this.checkSize(e,t,i,r)}}),this.documentReady="complete"===m4("readyState"),this.documentReady||m6()?.addEventListener("load",this.onLoad)}destroy(){m6()?.removeEventListener("load",this.onLoad),this.resizeObserver?.disconnect(),this.resizeObserver=null}checkSize(e,t,i,r){e&&(i!==e.size?.width||r!==e.size?.height)&&(e.size={width:i,height:r},e.cb(e.size,t))}observe(e,t){if(!this.documentReady){this.queuedObserveRequests.push([e,t]);return}this.elements.has(e)?this.removeFromQueue(e):this.resizeObserver?.observe(e),this.elements.set(e,{cb:t})}unobserve(e){this.resizeObserver?.unobserve(e),this.elements.delete(e),this.removeFromQueue(e),this.elements.size||this.destroy()}removeFromQueue(e){this.queuedObserveRequests=this.queuedObserveRequests.filter(([t])=>t!==e)}},yx="canvas-center",yM=["styles",yx,"canvas","canvas-proxy","canvas-overlay"],yE=new Map([["styles",{childElementType:"style"}],["canvas",{childElementType:"canvas",eventTypes:["focus","blur"]}],["canvas-proxy",{childElementType:"div"}],["canvas-overlay",{childElementType:"div"}],[yx,{childElementType:"div"}]]),yD={x:0,y:0,width:0,height:0,top:0,bottom:0,left:0,right:0,toJSON:()=>yD},yI=class extends yb{constructor(e){super(),this.styles=new Map,this.container=void 0,this.containerSize=void 0,this.sizeMonitor=new yS;let t=m5("div");t.innerHTML='<div role="presentation" class="ag-charts-wrapper ag-charts-styles" data-ag-charts><div role="presentation" class="ag-charts-canvas-center"><div role="figure" class="ag-charts-canvas-container"><div role="presentation" class="ag-charts-canvas"></div><div role="presentation" class="ag-charts-canvas-proxy"></div><div role="presentation" class="ag-charts-canvas-overlay"></div></div></div></div>',this.element=t.children.item(0),this.rootElements=yM.reduce((e,t)=>{let i=`ag-charts-${t}`,r=this.element.classList.contains(i)?this.element:this.element.querySelector(`.${i}`);if(!r)throw Error(`AG Charts - unable to find DOM element ${i}`);return e[t]={element:r,children:new Map,listeners:[]},e},{});let i=!1;this.observer=function(e,t){if("undefined"==typeof IntersectionObserver)return;let i=new IntersectionObserver(i=>{for(let r of i)r.target===e&&t(r.intersectionRatio)},{root:e});return i.observe(e),i}(this.element,e=>{0!==e||i||this.listeners.dispatch("hidden",{type:"hidden"}),i=0===e}),this.setSizeOptions(),this.addStyles("ag-charts-community",'.ag-charts-wrapper,.ag-charts-wrapper:focus,.ag-charts-wrapper:after,.ag-charts-wrapper:before,.ag-charts-wrapper *,.ag-charts-wrapper *:focus,.ag-charts-wrapper *:after,.ag-charts-wrapper *:before{box-sizing:border-box;outline:none}.ag-charts-wrapper{position:relative}.ag-charts-canvas-center{width:100%;height:100%;position:absolute;touch-action:auto;display:flex;align-items:var(--ag-charts-align);justify-content:var(--ag-charts-justify)}.ag-charts-canvas-container,.ag-charts-canvas{position:relative}.ag-charts-canvas-container>*,.ag-charts-canvas>*{display:block}.ag-charts-canvas-proxy{position:absolute;top:0;left:0;opacity:0;pointer-events:none}.ag-charts-tab-guard{width:0;height:0;opacity:0}.ag-charts-canvas-overlay{pointer-events:none;position:absolute;inset:0}.ag-charts-canvas-overlay>*{position:absolute;pointer-events:auto}.ag-charts-theme-default,.ag-charts-theme-default-dark{--ag-charts-active-color: var(--ag-active-color, #2196f3);--ag-charts-background-color: var(--ag-background-color, #fff);--ag-charts-foreground-color: var(--ag-foreground-color, #181d1f);--ag-charts-border-color: var(--ag-border-color, #dddddd);--ag-charts-hover-color: color-mix(in srgb, var(--ag-charts-background-color), var(--ag-charts-active-color) 12%);--ag-charts-font-family: "Verdana", sans-serif;--ag-charts-font-size: var(--ag-font-size, 14px);--ag-charts-size: var(--ag-grid-size, 8px);--ag-charts-border: var(--ag-charts-border-color) var(--ag-borders, solid 1px);--ag-charts-border-critical: var(--ag-borders-critical, solid 1px);--ag-charts-layer-ui-overlay: 5;--ag-charts-layer-tooltip: 4;--ag-charts-layer-toolbar: 3;--ag-charts-layer-crosshair: 2;--ag-charts-layer-annotations: 1;--ag-charts-align: center;--ag-charts-justify: center;--ag-charts-axis-label-background-color: #474747;--ag-charts-axis-label-color: #ffffff;--ag-charts-toolbar-foreground-color: var(--ag-header-foreground-color, var(--ag-charts-foreground-color));--ag-charts-toolbar-background-color: var( --ag-header-background-color, color-mix(in srgb, var(--ag-charts-background-color), var(--ag-charts-foreground-color) 2%) );--ag-charts-toolbar-size: 34px;--ag-charts-toolbar-size-small: 24px;--ag-charts-toolbar-border: var(--ag-charts-border-critical, solid 1px) var(--ag-charts-border-color);--ag-charts-toolbar-hover-color: color-mix( in srgb, var(--ag-charts-background-color), var(--ag-charts-active-color) 12% );--ag-charts-toolbar-focus-color: var(--ag-charts-active-color);--ag-charts-toolbar-active-background-color: var(--ag-charts-toolbar-hover-color);--ag-charts-toolbar-active-color: var(--ag-charts-active-color);--ag-charts-toolbar-disabled-foreground-color: var( --ag-disabled-foreground-color, color-mix(in srgb, transparent, var(--ag-charts-toolbar-foreground-color) 50%) );--ag-charts-toolbar-disabled-background-color: color-mix( in srgb, var(--ag-charts-toolbar-background-color), var(--ag-charts-toolbar-foreground-color) 6% );--ag-charts-toolbar-gap: var(--ag-charts-size);--ag-charts-toolbar-font-size: 13px;--ag-charts-toolbar-font-size-small: 12px;--ag-charts-toolbar-button-padding: 6px;--ag-charts-toolbar-button-padding-small: 1px;--ag-charts-popover-background-color: var(--ag-charts-toolbar-background-color);--ag-charts-popover-foreground-color: var(--ag-charts-toolbar-foreground-color);--ag-charts-popover-border: var(--ag-charts-toolbar-border);--ag-charts-popover-border-radius: var(--ag-border-radius, 4px);--ag-charts-popover-active-color: var(--ag-charts-toolbar-active-color);--ag-charts-popover-hover-color: var(--ag-charts-toolbar-hover-color);--ag-charts-popover-active-background-color: var(--ag-charts-toolbar-active-background-color);--ag-charts-popover-font-size: 14px;--ag-charts-popover-font-size-small: var(--ag-charts-toolbar-font-size-small);--ag-charts-dialog-input-group-label-color: color-mix(in srgb, transparent, var(--ag-charts-foreground-color) 55%);--ag-charts-dialog-tab-color--inactive: color-mix(in srgb, transparent, var(--ag-charts-foreground-color) 55%);--ag-charts-button-radius: var(--ag-border-radius, 4px);--ag-charts-focus-border-color: var(--ag-input-focus-border-color, var(--ag-charts-active-color));--ag-charts-focus-border: solid 1px var(--ag-charts-focus-border-color);--ag-charts-focus-border-shadow: var( --ag-input-focus-box-shadow, 0 0 0 3px color-mix(in srgb, transparent, var(--ag-input-focus-border-color, var(--ag-charts-active-color)) 20%) );--ag-charts-focus-box-shadow: var(--box-shadow), 0 0 0 2px #fff8, var(--ag-charts-focus-border-shadow);--ag-charts-icon-font-family: "agChartsDefault";--ag-charts-icon-font-weight: normal;--ag-charts-icon-font-color: color-mix(in srgb, transparent, var(--ag-charts-foreground-color), 90%);--ag-charts-icon-size: 20px;--ag-charts-input-background-color: var(--ag-charts-background-color);--ag-charts-input-background-color--hover: var(--ag-charts-hover-color);--ag-charts-input-background-color--active: var(--ag-charts-hover-color);--ag-charts-input-border-color: var(--ag-charts-border-color);--ag-charts-input-border-color--active: var(--ag-charts-active-color);--ag-charts-input-border-radius: var(--ag-border-radius, 4px);--ag-charts-input-color--active: var(--ag-charts-active-color);--ag-charts-input-focus-outline: var(--ag-charts-focus-border);--ag-charts-input-focus-box-shadow: var(--ag-charts-focus-border-shadow);--ag-charts-input-font-family: var(--ag-charts-font-family);--ag-charts-input-font-size: var(--ag-charts-font-size);--ag-charts-input-padding: 8px;--ag-charts-input-padding-large: 10px;--ag-charts-input-placeholder-color: #888888;--ag-charts-input-spacing: 8px;--ag-charts-input-transition-duration: .25s;--ag-charts-input-transition-duration--fast: .1s;--ag-charts-input-transition-timing-function: ease-out;--ag-charts-input-checkbox-background-color: #babbbc;--ag-charts-input-checkbox-background-color--checked: var(--ag-charts-active-color)}.ag-charts-theme-default-dark{--ag-charts-background-color: var(--ag-background-color, color-mix(in srgb, #fff, #182230 97%));--ag-charts-foreground-color: var(--ag-foreground-color, #fff);--ag-charts-border-color: var(--ag-border-color, rgba(255, 255, 255, .16));--ag-charts-hover-color: color-mix(in srgb, var(--ag-charts-background-color), var(--ag-charts-active-color) 18%);--ag-charts-axis-label-background-color: #9caebb;--ag-charts-axis-label-color: #000000;--ag-charts-toolbar-background-color: var(--ag-header-background-color, color-mix(in srgb, #fff, #182230 93%));--ag-charts-toolbar-hover-color: color-mix( in srgb, var(--ag-charts-background-color), var(--ag-charts-active-color) 18% );--ag-charts-dialog-input-group-label-text-color: #ffffff;--ag-charts-focus-border-shadow: var( --ag-input-focus-box-shadow, 0 0 0 3px color-mix(in srgb, transparent, var(--ag-input-focus-border-color, var(--ag-charts-active-color)) 20%) );--ag-charts-input-placeholder-color: #aaaaaa}.ag-charts-icon{display:block;width:var(--ag-charts-icon-size);height:var(--ag-charts-icon-size);speak:none;speak:never;mask:var(--icon) center / contain no-repeat;background-color:currentColor;transition:background-color .25s ease-in-out}.ag-charts-icon-align-center{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDAwIiBkPSJNNyAxMGg2djFIN3pNNCA3aDEydjFINHptMSA2aDEwdjFINXoiLz48L3N2Zz4=)}.ag-charts-icon-align-left{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDAwIiBkPSJNNCAxMGg2djFINHptMC0zaDEydjFINHptMCA2aDEwdjFINHoiLz48L3N2Zz4=)}.ag-charts-icon-align-right{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDAwIiBkPSJNMTAgMTBoNnYxaC02ek00IDdoMTJ2MUg0em0yIDZoMTB2MUg2eiIvPjwvc3ZnPg==)}.ag-charts-icon-arrow-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTE1LjI5MyA0LjVIMTIuNXYtMUgxN3Y0aC0xVjUuMjA3bC05LjY0NiA5LjY0Ny0uNzA4LS43MDh6IiBmaWxsPSIjMDAwIi8+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik03IDE2YTIuNSAyLjUgMCAxIDEtNSAwIDIuNSAyLjUgMCAwIDEgNSAwbS0yLjUgMS41YTEuNSAxLjUgMCAxIDAgMC0zIDEuNSAxLjUgMCAwIDAgMCAzIiBmaWxsPSIjMDAwIi8+PC9zdmc+)}.ag-charts-icon-arrow-down-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik02IDhMMS41IDhMMTAgMThMMTguNSA4TDE0IDhMMTQgM0w2IDNMNiA4Wk03IDRMNyA5SDMuNjYyNDRMMTAgMTYuNDU2TDE2LjMzNzYgOUwxMyA5TDEzIDRMNyA0WiIgZmlsbD0iYmxhY2siLz4KPC9zdmc+Cg==)}.ag-charts-icon-arrow-up-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNCAxMkgxOC41TDEwIDJMMS41IDEySDZMNi4wMDAwMiAxN0gxNFYxMlpNMTMgMTZWMTFIMTYuMzM3NkwxMCAzLjU0NDA1TDMuNjYyNDQgMTFIN0w3LjAwMDAyIDE2SDEzWiIgZmlsbD0iYmxhY2siLz4KPC9zdmc+Cg==)}.ag-charts-icon-callout-annotation{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMyA0LjVBMS41IDEuNSAwIDAgMSA0LjUgM2gxMUExLjUgMS41IDAgMCAxIDE3IDQuNXY4YTEuNSAxLjUgMCAwIDEtMS41IDEuNWgtNC41MTRhMjYgMjYgMCAwIDAtMi4wMTcgMS41NGwtLjMxNC4yNmMtLjU1LjQ1Ny0xLjExNS45MjYtMS43NiAxLjQtLjY2OS40OTEtMS41NjItLjAxMi0xLjU2Mi0uOFYxNEg0LjVBMS41IDEuNSAwIDAgMSAzIDEyLjV6TTQuNSA0YS41LjUgMCAwIDAtLjUuNXY4YS41LjUgMCAwIDAgLjUuNWgxLjgzM3YzLjM3MmEzNiAzNiAwIDAgMCAxLjY3OC0xLjMzOGwuMzItLjI2NWEyNiAyNiAwIDAgMSAyLjIyNS0xLjY4NWwuMTI2LS4wODRIMTUuNWEuNS41IDAgMCAwIC41LS41di04YS41LjUgMCAwIDAtLjUtLjV6IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-candlestick-series{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNyAxdjNoMnYxMkg3djNINnYtM0g0VjRoMlYxek01IDVoM3YxMEg1ek0xMSAxNFY2aDJWMy4yNWgxVjZoMnY4aC0ydjIuNzVoLTFWMTR6bTEtN2gzdjZoLTN6IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-close{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJtNSA1IDEwIDEwTTUgMTUgMTUgNSIgc3Ryb2tlPSIjMDAwIi8+PC9zdmc+)}.ag-charts-icon-comment-annotation{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNy41MTMgMy45OTVhNi41IDYuNSAwIDAgMSA2LjA5OCAxMS40MWMtLjU4OC4zOTMtMS4yMTcuNTM2LTEuODI5LjU4NWExMyAxMyAwIDAgMS0xLjI3LjAxN0EyNyAyNyAwIDAgMCAxMCAxNkg0LjVhLjUuNSAwIDAgMS0uNS0uNVYxMHEwLS4yNDctLjAwNy0uNTEzYy0uMDA4LS40MTYtLjAxNi0uODU3LjAxNy0xLjI2OS4wNS0uNjEyLjE5Mi0xLjI0LjU4NS0xLjgzYTYuNSA2LjUgMCAwIDEgMi45MTgtMi4zOTNtMy41Ni42MWE1LjUgNS41IDAgMCAwLTUuNjQ2IDIuMzRjLS4yNjYuMzk3LS4zNzkuODQyLS40MiAxLjM1NC0uMDMuMzYtLjAyMi43MTgtLjAxNSAxLjEwOFE1IDkuNjg5IDUgMTB2NWg1cS4zMTEuMDAxLjU5My4wMDhjLjM5LjAwNy43NDcuMDE1IDEuMTA4LS4wMTUuNTEyLS4wNDEuOTU3LS4xNTQgMS4zNTUtLjQyYTUuNSA1LjUgMCAwIDAtMS45ODMtOS45NjciIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-crosshair-add-line{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZD0iTTEwIDUuNWEuNS41IDAgMCAxIC41LjV2My41aDMuODc1YS41LjUgMCAwIDEgMCAxSDEwLjV2NC4yNWEuNS41IDAgMSAxLTEgMFYxMC41SDUuNjI1YS41LjUgMCAxIDEgMC0xSDkuNVY2YS41LjUgMCAwIDEgLjUtLjUiLz48L3N2Zz4=)}.ag-charts-icon-delete{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZD0iTTguNDk2IDguOTk2QS41LjUgMCAwIDEgOSA5LjQ5MnY0YS41LjUgMCAxIDEtMSAuMDA4di00YS41LjUgMCAwIDEgLjQ5Ni0uNTA0TTEyIDkuNWEuNS41IDAgMCAwLTEgMHY0YS41LjUgMCAwIDAgMSAweiIvPjxwYXRoIGZpbGw9IiMxMzE3MjIiIGZpbGwtcnVsZT0iZXZlbm9kZCIgZD0iTTYgNVYzLjVBMi41IDIuNSAwIDAgMSA4LjUgMWgzQTIuNSAyLjUgMCAwIDEgMTQgMy41VjVoMi44MzNhLjUuNSAwIDAgMSAwIDFIMTV2MTAuMjVjMCAuNDE1LS4wNjYuODYzLS4zIDEuMjIxLS4yNTcuMzk0LS42NzIuNjEyLTEuMi42MTJoLTdjLS41MjggMC0uOTQzLS4yMTgtMS4yLS42MTItLjIzNC0uMzU4LS4zLS44MDYtLjMtMS4yMjFWNkgzLjMzM2EuNS41IDAgMCAxIDAtMXptMS0xLjVBMS41IDEuNSAwIDAgMSA4LjUgMmgzQTEuNSAxLjUgMCAwIDEgMTMgMy41VjVIN3pNNiAxNi4yNVY2aDh2MTAuMjVjMCAuMzM1LS4wNTkuNTU0LS4xMzguNjc1LS4wNTUuMDg1LS4xNC4xNTgtLjM2Mi4xNThoLTdjLS4yMjIgMC0uMzA3LS4wNzMtLjM2Mi0uMTU4LS4wOC0uMTIxLS4xMzgtLjM0LS4xMzgtLjY3NSIgY2xpcC1ydWxlPSJldmVub2RkIi8+PC9zdmc+)}.ag-charts-icon-disjoint-channel,.ag-charts-icon-disjoint-channel-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTkuMDI4IDE3LjQ2YTIuMjUgMi4yNSAwIDAgMC00LjA5Mi0xLjg1bC05LjUxMS0yLjM3OGEyLjI1IDIuMjUgMCAxIDAtLjIyNS45NzRsOS40NzUgMi4zNjlhMi4yNTEgMi4yNTEgMCAwIDAgNC4zNTMuODg2bS0xLjY2Mi0xLjk2NWExLjI1IDEuMjUgMCAxIDEtLjg4NSAyLjMzOCAxLjI1IDEuMjUgMCAwIDEgLjg4NS0yLjMzOE00LjM0MyAxMy42NjlhMS4yNSAxLjI1IDAgMSAwLTIuMzM4LS44ODUgMS4yNSAxLjI1IDAgMCAwIDIuMzM4Ljg4NU0zLjk3IDguNzY5YTIuMjUgMi4yNSAwIDAgMCAxLjQ1NS0yLjExbDkuNTExLTIuMzc4YTIuMjUgMi4yNSAwIDEgMC0uMjYtLjk2NUw1LjIgNS42ODVhMi4yNSAyLjI1IDAgMSAwLTEuMjMgMy4wODRtLjM3My0yLjU0N2ExLjI1IDEuMjUgMCAxIDEtMi4zMzguODg1IDEuMjUgMS4yNSAwIDAgMSAyLjMzOC0uODg1bTEzLjc1LTMuNDM4YTEuMjUgMS4yNSAwIDEgMS0yLjMzOC44ODUgMS4yNSAxLjI1IDAgMCAxIDIuMzM4LS44ODUiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-drag-handle{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48Y2lyY2xlIGN4PSI1Ljc1IiBjeT0iNy43NSIgcj0iLjc1IiBmaWxsPSIjMDAwIiBmaWxsLW9wYWNpdHk9Ii41Ii8+PGNpcmNsZSBjeD0iOS43NSIgY3k9IjcuNzUiIHI9Ii43NSIgZmlsbD0iIzAwMCIgZmlsbC1vcGFjaXR5PSIuNSIvPjxjaXJjbGUgY3g9IjEzLjc1IiBjeT0iNy43NSIgcj0iLjc1IiBmaWxsPSIjMDAwIiBmaWxsLW9wYWNpdHk9Ii41Ii8+PGNpcmNsZSBjeD0iMTMuNzUiIGN5PSIxMS43NSIgcj0iLjc1IiBmaWxsPSIjMDAwIiBmaWxsLW9wYWNpdHk9Ii41Ii8+PGNpcmNsZSBjeD0iOS43NSIgY3k9IjExLjc1IiByPSIuNzUiIGZpbGw9IiMwMDAiIGZpbGwtb3BhY2l0eT0iLjUiLz48Y2lyY2xlIGN4PSI1Ljc1IiBjeT0iMTEuNzUiIHI9Ii43NSIgZmlsbD0iIzAwMCIgZmlsbC1vcGFjaXR5PSIuNSIvPjwvc3ZnPg==)}.ag-charts-icon-hollow-candlestick-series{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1vcGFjaXR5PSIuMTUiIGQ9Ik01IDVoM3YxMEg1eiIvPjxwYXRoIGZpbGw9IiMxMzE3MjIiIGZpbGwtcnVsZT0iZXZlbm9kZCIgZD0iTTcgMXYzaDJ2MTJIN3YzSDZ2LTNINFY0aDJWMXpNNSA1aDN2MTBINXptNyAyaDN2NmgtM3ptLTEgN1Y2aDJWMy4yNWgxVjZoMnY4aC0ydjIuNzVoLTFWMTR6IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-horizontal-line,.ag-charts-icon-horizontal-line-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNLjUgOS41aDcuMzA2YTIuMjUgMi4yNSAwIDAgMSA0LjM4OCAwSDE5LjV2MWgtNy4zMDZhMi4yNSAyLjI1IDAgMCAxLTQuMzg4IDBILjV6bTkuNSAxLjc1YTEuMjUgMS4yNSAwIDEgMCAwLTIuNSAxLjI1IDEuMjUgMCAwIDAgMCAyLjUiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-line-color{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTQuMjQyIDIuNzIyYy0uNjEyIDAtMS4yLjI0My0xLjYzMi42NzVsLTEuMzQzIDEuMzQ0YS41LjUgMCAwIDAtLjExMi4xMTJMNC4wNSAxMS45NTljLS4yMDcuMjA3LS4zNi40Ni0uNDQ2Ljc0di4wMDFsLS42OSAyLjc2N3YuMDAyYS44Mi44MiAwIDAgMCAxLjAyMiAxLjAyMWguMDAybDIuNjM0LS44MjJjLjI4LS4wODUuNTM0LS4yMzcuNzQtLjQ0M2w3LjEwNy03LjEwOGEuNS41IDAgMCAwIC4xMTItLjExMmwxLjM0My0xLjM0M2EyLjMwOCAyLjMwOCAwIDAgMC0xLjYzMi0zLjk0TTE0LjEyMiA3bDEuMDQ0LTEuMDQ1YTEuMzA4IDEuMzA4IDAgMSAwLTEuODQ5LTEuODVMMTIuMjcxIDUuMTV6bS0yLjU1OC0xLjE0Mi02LjgwNyA2LjgwOWEuOC44IDAgMCAwLS4xOTYuMzI1bC0uNzUgMi40NjggMi40Ny0uNzQ5YS44LjggMCAwIDAgLjMyNS0uMTk0bDYuODA4LTYuODF6IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-line-series{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJtMTcuMzYyIDQuODczLTQuNTk0IDYuNjU0LTQuODUtMy4zMTctNC4yNTEgNi45NzctLjg1NC0uNTJMNy42MTIgNi43OWw0Ljg5OSAzLjM1IDQuMDI4LTUuODM2eiIgY2xpcC1ydWxlPSJldmVub2RkIi8+PC9zdmc+)}.ag-charts-icon-line-style-dashed{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDAwIiBkPSJNMiA5aDR2MUgyem0xMiAwaDR2MWgtNHpNOCA5aDR2MUg4eiIvPjwvc3ZnPg==)}.ag-charts-icon-line-style-dotted{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48Y2lyY2xlIGN4PSIyLjUiIGN5PSI5LjUiIHI9Ii41IiBmaWxsPSIjMDAwIi8+PGNpcmNsZSBjeD0iNC41IiBjeT0iOS41IiByPSIuNSIgZmlsbD0iIzAwMCIvPjxjaXJjbGUgY3g9IjYuNSIgY3k9IjkuNSIgcj0iLjUiIGZpbGw9IiMwMDAiLz48Y2lyY2xlIGN4PSI4LjUiIGN5PSI5LjUiIHI9Ii41IiBmaWxsPSIjMDAwIi8+PGNpcmNsZSBjeD0iMTAuNSIgY3k9IjkuNSIgcj0iLjUiIGZpbGw9IiMwMDAiLz48Y2lyY2xlIGN4PSIxMi41IiBjeT0iOS41IiByPSIuNSIgZmlsbD0iIzAwMCIvPjxjaXJjbGUgY3g9IjE0LjUiIGN5PSI5LjUiIHI9Ii41IiBmaWxsPSIjMDAwIi8+PGNpcmNsZSBjeD0iMTYuNSIgY3k9IjkuNSIgcj0iLjUiIGZpbGw9IiMwMDAiLz48L3N2Zz4=)}.ag-charts-icon-line-style-solid{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDAwIiBkPSJNMiA5aDE2djFIMnoiLz48L3N2Zz4=)}.ag-charts-icon-line-with-markers-series{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJtMTguMTk4IDQuODg4LTMuNTU2IDQuOTE4YTIuMjUgMi4yNSAwIDEgMS0zLjg2Ni43NWwtMS40MzItLjlhMi4yNCAyLjI0IDAgMCAxLTIuMDA5LjQzNWwtMy44MjggNi40MjgtLjg2LS41MTJMNi40NSA5LjYyM2EyLjI1IDIuMjUgMCAxIDEgMy41MS0uNzYxbDEuMzI5LjgzNWEyLjI0IDIuMjQgMCAwIDEgMi41NTctLjQ5N2wzLjU0Mi00Ljg5OHptLTQuOTYgNS4xNTNhMS4yNSAxLjI1IDAgMSAwLS42NCAyLjQxOSAxLjI1IDEuMjUgMCAwIDAgLjY0LTIuNDE5TTkuMSA4LjMyMXEuMDY2LS4xOTIuMDY3LS40MDRhMS4yNSAxLjI1IDAgMSAwLS4wNjcuNDA0IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-lock,.ag-charts-icon-locked{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTAuMjA3IDMuNzY0YTIuODk0IDIuODk0IDAgMCAwLTIuODk1IDIuODk0VjloNS43ODlWNi42NThhMi44OTQgMi44OTQgMCAwIDAtMi44OTUtMi44OTRNMTQuMSA5VjYuNjU4YTMuODk0IDMuODk0IDAgMSAwLTcuNzg5IDB2Mi4zNDlBMi41IDIuNSAwIDAgMCA0IDExLjV2M0EyLjUgMi41IDAgMCAwIDYuNSAxN2g4YTIuNSAyLjUgMCAwIDAgMi41LTIuNXYtM0EyLjUgMi41IDAgMCAwIDE0LjUgOXpNNi41IDEwQTEuNSAxLjUgMCAwIDAgNSAxMS41djNBMS41IDEuNSAwIDAgMCA2LjUgMTZoOGExLjUgMS41IDAgMCAwIDEuNS0xLjV2LTNhMS41IDEuNSAwIDAgMC0xLjUtMS41eiIgY2xpcC1ydWxlPSJldmVub2RkIi8+PC9zdmc+)}.ag-charts-icon-note-annotation{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMyA0LjVBMS41IDEuNSAwIDAgMSA0LjUgM2gxMUExLjUgMS41IDAgMCAxIDE3IDQuNXY4YTEuNSAxLjUgMCAwIDEtMS41IDEuNWgtMy4yMWwtMS40NjkgMi41N2ExIDEgMCAwIDEtMS42ODIuMDg1TDcuMjQzIDE0SDQuNUExLjUgMS41IDAgMCAxIDMgMTIuNXpNNC41IDRhLjUuNSAwIDAgMC0uNS41djhhLjUuNSAwIDAgMCAuNS41aDMuMjU3bDIuMTk2IDMuMDc0TDExLjcxIDEzaDMuNzlhLjUuNSAwIDAgMCAuNS0uNXYtOGEuNS41IDAgMCAwLS41LS41eiIgY2xpcC1ydWxlPSJldmVub2RkIi8+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNi41IDYuNUEuNS41IDAgMCAxIDcgNmg2YS41LjUgMCAwIDEgMCAxSDdhLjUuNSAwIDAgMS0uNS0uNU02LjUgOS41QS41LjUgMCAwIDEgNyA5aDZhLjUuNSAwIDAgMSAwIDFIN2EuNS41IDAgMCAxLS41LS41IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-ohlc-series{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZD0iTTEzIDExaC0zdi0xaDNWM2gxdjJoNHYxaC00djExaC0xek02IDE3di0yaDN2LTFINlY0SDV2MUgydjFoM3YxMXoiLz48L3N2Zz4=)}.ag-charts-icon-fill-color{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJtOC4wNzEgNC4wNi0uOTI0LS45MjQuNzA3LS43MDcgNy4yODggNy4yODgtNC45NSA0Ljk1YTMuNSAzLjUgMCAwIDEtNC45NSAwbC0xLjQxNC0xLjQxNGEzLjUgMy41IDAgMCAxIDAtNC45NXptLjcwNy43MDhMNC41MzYgOS4wMWEyLjUgMi41IDAgMCAwIDAgMy41MzZMNS45NSAxMy45NmEyLjUgMi41IDAgMCAwIDMuNTM1IDBsNC4yNDMtNC4yNDN6bTYuOSA3LjIwMi0uMzQ1LjM2My0uMzQ0LS4zNjNhLjUuNSAwIDAgMSAuNjg4IDBtLS4zNDUgMS4wOGE4IDggMCAwIDAtLjI4LjMyMyA0LjMgNC4zIDAgMCAwLS40MDkuNTgyYy0uMTEzLjIwMS0uMTQ0LjMyNi0uMTQ0LjM3OGEuODMzLjgzMyAwIDAgMCAxLjY2NyAwYzAtLjA1Mi0uMDMxLS4xNzctLjE0NC0uMzc4YTQuMyA0LjMgMCAwIDAtLjQxLS41ODIgOCA4IDAgMCAwLS4yOC0uMzIybS0uMzQ0LTEuMDguMzQ0LjM2My4zNDQtLjM2My4wMDIuMDAyLjAwNC4wMDQuMDEzLjAxMmE2IDYgMCAwIDEgLjIwNi4yMDhjLjEzMS4xMzYuMzA4LjMyNy40ODUuNTQ1LjE3Ni4yMTUuMzYzLjQ2Ny41MDcuNzI0LjEzNy4yNDMuMjczLjU1My4yNzMuODY4YTEuODMzIDEuODMzIDAgMSAxLTMuNjY3IDBjMC0uMzE1LjEzNi0uNjI1LjI3My0uODY4LjE0NC0uMjU3LjMzLS41MDkuNTA3LS43MjRhOSA5IDAgMCAxIC42NDUtLjcwOGwuMDQ2LS4wNDUuMDEzLS4wMTIuMDA0LS4wMDR6IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-pan-end{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZD0ibTYuNjQ2IDEzLjgxMy0uMzUzLjM1NC43MDcuNzA3LjM1NC0uMzU0ek0xMS4xNjYgMTBsLjM1NC4zNTQuMzU0LS4zNTQtLjM1NC0uMzU0ek03LjM1NSA1LjQ4IDcgNS4xMjZsLS43MDcuNzA3LjM1My4zNTR6bTAgOS4wNCA0LjE2Ni00LjE2Ni0uNzA3LS43MDgtNC4xNjcgNC4xNjd6bTQuMTY2LTQuODc0TDcuMzU0IDUuNDhsLS43MDguNzA3IDQuMTY3IDQuMTY3ek0xMy4wODMgNXYxMGgxVjV6Ii8+PC9zdmc+)}.ag-charts-icon-pan-left{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTIuNzkgNS44MzMgOC42MjUgMTBsNC4xNjYgNC4xNjctLjcwNy43MDdMNy4yMSAxMGw0Ljg3My00Ljg3NHoiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-pan-right{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNy4yMSAxNC4xNjcgMTEuMzc2IDEwIDcuMjEgNS44MzNsLjcwNy0uNzA3TDEyLjc5IDEwbC00Ljg3MyA0Ljg3NHoiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-pan-start{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZD0iTTYgNXYxMGgxVjV6TTkuNjI0IDEwbDQuMTY2LTQuMTY3LS43MDctLjcwN0w4LjIxIDEwbDQuODc0IDQuODc0LjcwNy0uNzA3eiIvPjwvc3ZnPg==)}.ag-charts-icon-parallel-channel,.ag-charts-icon-parallel-channel-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTcuNzIgNS4zMzFBMi4yNSAyLjI1IDAgMSAwIDE0LjcwNSAzLjZsLTkuNDkgNC41NjJhMi4yNSAyLjI1IDAgMSAwIC4yMDkgMS4wMWw5LjY2Mi00LjY0NmEyLjI1IDIuMjUgMCAwIDAgMi42MzQuODA1bS4zNzMtMi41NDdhMS4yNSAxLjI1IDAgMSAxLTIuMzM4Ljg4NSAxLjI1IDEuMjUgMCAwIDEgMi4zMzgtLjg4NU00LjM0MyA4LjY3YTEuMjUgMS4yNSAwIDEgMS0yLjMzOC44ODUgMS4yNSAxLjI1IDAgMCAxIDIuMzM4LS44ODVNNS4zMDcgMTYuNzI4YTIuMjUgMi4yNSAwIDEgMS0uNTI1LS44NThsOS45MjMtNC43N2EyLjI1IDIuMjUgMCAxIDEgLjM4MS45MjZ6bS0uOTY0LjI3NGExLjI1IDEuMjUgMCAxIDEtMi4zMzguODg1IDEuMjUgMS4yNSAwIDAgMSAyLjMzOC0uODg1bTEzLjAyMy01LjEwNmExLjI1IDEuMjUgMCAxIDAtLjg4NS0yLjMzOSAxLjI1IDEuMjUgMCAwIDAgLjg4NSAyLjMzOSIgY2xpcC1ydWxlPSJldmVub2RkIi8+PC9zdmc+)}.ag-charts-icon-position-bottom{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDAwIiBmaWxsLW9wYWNpdHk9Ii4yNSIgZD0iTTMgMTBoMTR2MUgzem0zLTNoOHYxSDZ6Ii8+PHBhdGggZmlsbD0iIzAwMCIgZD0iTTYgMTNoOHYxSDZ6Ii8+PC9zdmc+)}.ag-charts-icon-position-center{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDAwIiBkPSJNMyAxMGgxNHYxSDN6Ii8+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1vcGFjaXR5PSIuMjUiIGQ9Ik02IDdoOHYxSDZ6bTAgNmg4djFINnoiLz48L3N2Zz4=)}.ag-charts-icon-position-top{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDAwIiBmaWxsLW9wYWNpdHk9Ii4yNSIgZD0iTTMgMTBoMTR2MUgzeiIvPjxwYXRoIGZpbGw9IiMwMDAiIGQ9Ik02IDdoOHYxSDZ6Ii8+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1vcGFjaXR5PSIuMjUiIGQ9Ik02IDEzaDh2MUg2eiIvPjwvc3ZnPg==)}.ag-charts-icon-price-label-annotation{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNC41IDNBMS41IDEuNSAwIDAgMCAzIDQuNVYxM2ExLjUgMS41IDAgMCAwIDEuNSAxLjVoLjgzM3YuMDU3Yy4yNDItLjI5OS41OTctLjUwMyAxLS41NDhWMTMuNUg0LjVBLjUuNSAwIDAgMSA0IDEzVjQuNWEuNS41IDAgMCAxIC41LS41aDExYS41LjUgMCAwIDEgLjUuNXY4YS41LjUgMCAwIDEtLjUuNWgtNC44MThsLS4xMjYuMDg0YTI2IDI2IDAgMCAwLTIuMjI1IDEuNjg1bC0uMzIuMjY1LS4wNjguMDU2YTEuNSAxLjUgMCAwIDEtMi42MDkgMS4zNTRjLjAzMy43NjMuOTA1IDEuMjM4IDEuNTYuNzU2LjY0Ni0uNDc0IDEuMjEtLjk0MyAxLjc2MS0xLjRsLjMxMy0uMjZBMjYgMjYgMCAwIDEgMTAuOTg2IDE0SDE1LjVhMS41IDEuNSAwIDAgMCAxLjUtMS41di04QTEuNSAxLjUgMCAwIDAgMTUuNSAzeiIgY2xpcC1ydWxlPSJldmVub2RkIi8+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNOC43MTYgMTQuODE1YTIuMjUgMi4yNSAwIDEgMS00LjIxIDEuNTkzIDIuMjUgMi4yNSAwIDAgMSA0LjIxLTEuNTkzbS0xLjY2MiAxLjk2NmExLjI1IDEuMjUgMCAxIDAtLjg4NS0yLjMzOSAxLjI1IDEuMjUgMCAwIDAgLjg4NSAyLjMzOSIgY2xpcC1ydWxlPSJldmVub2RkIi8+PC9zdmc+)}.ag-charts-icon-reset{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTIuMDQgNC40NDVhNS44MSA1LjgxIDAgMCAwLTcuMjU3IDIuNDUzLjUuNSAwIDAgMS0uODY1LS41MDJBNi44MSA2LjgxIDAgMSAxIDMgOS44MTNhLjUuNSAwIDAgMSAxIDAgNS44MSA1LjgxIDAgMSAwIDguMDQtNS4zNjgiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjxwYXRoIGZpbGw9IiMwMDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIgZD0iTTQuMjg5IDMuMDAyYS41LjUgMCAwIDEgLjUuNXYyLjY1NWgyLjY1NWEuNS41IDAgMCAxIDAgMUg0LjI5YS41LjUgMCAwIDEtLjUtLjVWMy41MDJhLjUuNSAwIDAgMSAuNS0uNSIgY2xpcC1ydWxlPSJldmVub2RkIi8+PC9zdmc+)}.ag-charts-icon-settings{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTAuMTgzIDEuNjY3aC0uMzY2QTEuNjY3IDEuNjY3IDAgMCAwIDguMTUgMy4zMzN2LjE1YTEuNjcgMS42NyAwIDAgMS0uODMzIDEuNDQybC0uMzU5LjIwOGExLjY3IDEuNjcgMCAwIDEtMS42NjYgMGwtLjEyNS0uMDY2YTEuNjY3IDEuNjY3IDAgMCAwLTIuMjc1LjYwOGwtLjE4NC4zMTdhMS42NjcgMS42NjcgMCAwIDAgLjYwOSAyLjI3NWwuMTI1LjA4M2ExLjY3IDEuNjcgMCAwIDEgLjgzMyAxLjQzM3YuNDI1YTEuNjcgMS42NyAwIDAgMS0uODMzIDEuNDVsLS4xMjUuMDc1YTEuNjY3IDEuNjY3IDAgMCAwLS42MDkgMi4yNzVsLjE4NC4zMTdhMS42NjcgMS42NjcgMCAwIDAgMi4yNzUuNjA4bC4xMjUtLjA2NmExLjY3IDEuNjcgMCAwIDEgMS42NjYgMGwuMzU5LjIwOGExLjY3IDEuNjcgMCAwIDEgLjgzMyAxLjQ0MnYuMTVhMS42NjYgMS42NjYgMCAwIDAgMS42NjcgMS42NjZoLjM2NmExLjY2NiAxLjY2NiAwIDAgMCAxLjY2Ny0xLjY2NnYtLjE1YTEuNjcgMS42NyAwIDAgMSAuODMzLTEuNDQybC4zNTktLjIwOGExLjY3IDEuNjcgMCAwIDEgMS42NjYgMGwuMTI1LjA2NmExLjY2NyAxLjY2NyAwIDAgMCAyLjI3NS0uNjA4bC4xODQtLjMyNWExLjY2NyAxLjY2NyAwIDAgMC0uNjA5LTIuMjc1bC0uMTI1LS4wNjdhMS42NyAxLjY3IDAgMCAxLS44MzMtMS40NXYtLjQxNmExLjY3IDEuNjcgMCAwIDEgLjgzMy0xLjQ1bC4xMjUtLjA3NWExLjY2NyAxLjY2NyAwIDAgMCAuNjA5LTIuMjc1bC0uMTg0LS4zMTdhMS42NjcgMS42NjcgMCAwIDAtMi4yNzUtLjYwOGwtLjEyNS4wNjZhMS42NyAxLjY3IDAgMCAxLTEuNjY2IDBsLS4zNTktLjIwOGExLjY3IDEuNjcgMCAwIDEtLjgzMy0xLjQ0MnYtLjE1YTEuNjY3IDEuNjY3IDAgMCAwLTEuNjY3LTEuNjY2IiBzdHJva2U9IiMwMDAiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjxwYXRoIGQ9Ik0xMCAxMi41YTIuNSAyLjUgMCAxIDAgMC01IDIuNSAyLjUgMCAwIDAgMCA1IiBzdHJva2U9IiMwMDAiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjwvc3ZnPg==)}.ag-charts-icon-step-line-series{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzE4MUQxRiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNiA0aDV2OGgzVjhoNXYxaC00djRoLTVWNUg3djEwSDJ2LTFoNHoiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-text-annotation{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik00IDRIMTZWN0gxNVY1SDEwLjVWMTVIMTRWMTZINlYxNUg5LjVWNUg1VjdINFY0WiIgZmlsbD0iYmxhY2siLz4KPC9zdmc+Cg==)}.ag-charts-icon-trend-line,.ag-charts-icon-trend-line-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNS4zMTQgMTAuOTM4YTIuMjUgMi4yNSAwIDEgMSAuMDEtMWg5LjM1MmEyLjI1IDIuMjUgMCAxIDEgLjAxIDF6bS0yLjE4OS43MjlhMS4yNSAxLjI1IDAgMSAwIDAtMi41IDEuMjUgMS4yNSAwIDAgMCAwIDIuNW0xMy43NSAwYTEuMjUgMS4yNSAwIDEgMCAwLTIuNSAxLjI1IDEuMjUgMCAwIDAgMCAyLjUiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-unlock,.ag-charts-icon-unlocked{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTAuNjUxIDMuNWEyLjg5NCAyLjg5NCAwIDAgMC0yLjg5NCAyLjg5NFY5SDE0LjVhMi41IDIuNSAwIDAgMSAyLjUgMi41djNhMi41IDIuNSAwIDAgMS0yLjUgMi41aC04QTIuNSAyLjUgMCAwIDEgNCAxNC41di0zQTIuNSAyLjUgMCAwIDEgNi41IDloLjI1N1Y2LjM5NGEzLjg5NCAzLjg5NCAwIDEgMSA3Ljc4OSAwIC41LjUgMCAwIDEtMSAwQTIuODk0IDIuODk0IDAgMCAwIDEwLjY1IDMuNU02LjUgMTBBMS41IDEuNSAwIDAgMCA1IDExLjV2M0ExLjUgMS41IDAgMCAwIDYuNSAxNmg4YTEuNSAxLjUgMCAwIDAgMS41LTEuNXYtM2ExLjUgMS41IDAgMCAwLTEuNS0xLjV6IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-vertical-line,.ag-charts-icon-vertical-line-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTAuNSA3LjgwNmEyLjI1IDIuMjUgMCAwIDEgMCA0LjM4OFYxOS41aC0xdi03LjMwNmEyLjI1IDIuMjUgMCAwIDEgMC00LjM4OFYuNWgxem0tLjUuOTQ0YTEuMjUgMS4yNSAwIDEgMSAwIDIuNSAxLjI1IDEuMjUgMCAwIDEgMC0yLjUiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-zoom-in{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZD0iTTEwIDUuNWEuNS41IDAgMCAxIC41LjV2My41aDMuODc1YS41LjUgMCAwIDEgMCAxSDEwLjV2NC4yNWEuNS41IDAgMSAxLTEgMFYxMC41SDUuNjI1YS41LjUgMCAxIDEgMC0xSDkuNVY2YS41LjUgMCAwIDEgLjUtLjUiLz48L3N2Zz4=)}.ag-charts-icon-zoom-out{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNS41IDEwYS41LjUgMCAwIDEgLjUtLjVoOGEuNS41IDAgMCAxIDAgMUg2YS41LjUgMCAwIDEtLjUtLjUiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-high-low-series{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNyA0aDJ2MTJINFY0aDNNNSA1aDN2MTBINXpNMTEgMTRWNmg1djhoLTVtMS03aDN2NmgtM3oiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-hlc-series{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJtMTguMTYzIDEuODM3LTUuMzM0IDExLjYyMUw2Ljk1NyA4LjEybC00LjE5OSA5LjYyMi0uOTE2LS40IDQuNzU2LTEwLjlMMTIuNDkgMTEuOCAxNy4yNTQgMS40MnoiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjxwYXRoIGZpbGw9IiMwMDAiIGZpbGwtb3BhY2l0eT0iLjQiIGZpbGwtcnVsZT0iZXZlbm9kZCIgZD0iTTUuODI1IDIuNzA0LjU1IDEzLjc4NWwuOTAyLjQzIDQuNzI0LTkuOTE5IDYuMDM0IDUuMDI5IDMuMjU1LTguMTQtLjkyOC0uMzctMi43NDUgNi44NnptNy44NTIgMTQuNjM2IDUuNzgtMTMuMTM5LS45MTUtLjQwMi01LjIxOSAxMS44Ni02LjAwNS01LjUwNC0zLjI3OCA3LjY0OC45Mi4zOTQgMi43MjItNi4zNTJ6IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-zoom-in-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik04Ljc1IDQuNWEuNzUuNzUgMCAwIDAtMS41IDB2Mi43NUg0LjVhLjc1Ljc1IDAgMCAwIDAgMS41aDIuNzV2Mi43NWEuNzUuNzUgMCAwIDAgMS41IDBWOC43NWgyLjc1YS43NS43NSAwIDAgMCAwLTEuNUg4Ljc1VjQuNVoiIGZpbGw9IiMwMDAiLz48L3N2Zz4=)}.ag-charts-icon-zoom-out-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0zLjc1IDhhLjc1Ljc1IDAgMCAxIC43NS0uNzVoN2EuNzUuNzUgMCAwIDEgMCAxLjVoLTdBLjc1Ljc1IDAgMCAxIDMuNzUgOFoiIGZpbGw9IiMwMDAiLz48L3N2Zz4=)}.ag-charts-icon-zoom-in-alt,.ag-charts-icon-zoom-in-alt-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJsdWNpZGUgbHVjaWRlLXpvb20taW4iPjxjaXJjbGUgY3g9IjExIiBjeT0iMTEiIHI9IjgiLz48bGluZSB4MT0iMjEiIHgyPSIxNi42NSIgeTE9IjIxIiB5Mj0iMTYuNjUiLz48bGluZSB4MT0iMTEiIHgyPSIxMSIgeTE9IjgiIHkyPSIxNCIvPjxsaW5lIHgxPSI4IiB4Mj0iMTQiIHkxPSIxMSIgeTI9IjExIi8+PC9zdmc+)}.ag-charts-icon-zoom-out-alt,.ag-charts-icon-zoom-out-alt-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJsdWNpZGUgbHVjaWRlLXpvb20tb3V0Ij48Y2lyY2xlIGN4PSIxMSIgY3k9IjExIiByPSI4Ii8+PGxpbmUgeDE9IjIxIiB4Mj0iMTYuNjUiIHkxPSIyMSIgeTI9IjE2LjY1Ii8+PGxpbmUgeDE9IjgiIHgyPSIxNCIgeTE9IjExIiB5Mj0iMTEiLz48L3N2Zz4=)}.ag-charts-icon-reset-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik00LjQxMiA0LjA1OCAyLjc1IDIuMzk2VjYuNzVoLjc0NGEuNzYuNzYgMCAwIDAgLjAxMiAwaDMuNTk4TDUuNDc4IDUuMTI1YTQuMTI1IDQuMTI1IDAgMCAxIDIuNTIzLS44NzUgMy43NSAzLjc1IDAgMSAxLTMuMTE5IDUuODMzLjc1Ljc1IDAgMCAwLTEuMjQ3LjgzNEE1LjI1IDUuMjUgMCAxIDAgOCAyLjc1aC0uMDAzYTUuNjI1IDUuNjI1IDAgMCAwLTMuNTg1IDEuMzA4WiIgZmlsbD0iIzAwMCIvPjwvc3ZnPg==)}.ag-charts-icon-pan-left-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xMC4wMyA0LjQ3YS43NS43NSAwIDAgMSAwIDEuMDZMNy41NiA4bDIuNDcgMi40N2EuNzUuNzUgMCAxIDEtMS4wNiAxLjA2bC0zLTNhLjc1Ljc1IDAgMCAxIDAtMS4wNmwzLTNhLjc1Ljc1IDAgMCAxIDEuMDYgMFoiIGZpbGw9IiMwMDAiLz48L3N2Zz4=)}.ag-charts-icon-pan-right-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik01Ljk3IDExLjUzYS43NS43NSAwIDAgMSAwLTEuMDZMOC40NCA4IDUuOTcgNS41M2EuNzUuNzUgMCAwIDEgMS4wNi0xLjA2bDMgM2EuNzUuNzUgMCAwIDEgMCAxLjA2bC0zIDNhLjc1Ljc1IDAgMCAxLTEuMDYgMFoiIGZpbGw9IiMwMDAiLz48L3N2Zz4=)}.ag-charts-icon-pan-start-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJsdWNpZGUgbHVjaWRlLWNoZXZyb24tZmlyc3QiPjxwYXRoIGQ9Im0xNyAxOC02LTYgNi02Ii8+PHBhdGggZD0iTTcgNnYxMiIvPjwvc3ZnPg==)}.ag-charts-icon-pan-end-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJsdWNpZGUgbHVjaWRlLWNoZXZyb24tbGFzdCI+PHBhdGggZD0ibTcgMTggNi02LTYtNiIvPjxwYXRoIGQ9Ik0xNyA2djEyIi8+PC9zdmc+)}.ag-charts-icon-trend-line-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGNpcmNsZSBjeD0iMi41IiBjeT0iOCIgcj0iMS43NSIgc3Ryb2tlPSIjMDAwIiBzdHJva2Utd2lkdGg9IjEuNSIvPjxjaXJjbGUgY3g9IjEzLjUiIGN5PSI4IiByPSIxLjc1IiBzdHJva2U9IiMwMDAiIHN0cm9rZS13aWR0aD0iMS41Ii8+PHBhdGggc3Ryb2tlPSIjMDAwIiBzdHJva2Utd2lkdGg9IjEuNSIgZD0iTTQgOGg4Ii8+PC9zdmc+)}.ag-charts-icon-horizontal-line-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xMC4zODYgOC43NWEyLjUwMSAyLjUwMSAwIDAgMS00Ljc3MiAwSC43NWEuNzUuNzUgMCAwIDEgMC0xLjVoNC44NjRhMi41MDEgMi41MDEgMCAwIDEgNC43NzIgMGg0Ljg2NGEuNzUuNzUgMCAwIDEgMCAxLjVoLTQuODY0Wk05IDhhMSAxIDAgMSAxLTIgMCAxIDEgMCAwIDEgMiAwWiIgZmlsbD0iIzAwMCIvPjwvc3ZnPg==)}.ag-charts-icon-vertical-line-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik04Ljc1IDUuNjE0YTIuNTAxIDIuNTAxIDAgMCAxIDAgNC43NzJ2NC44NjRhLjc1Ljc1IDAgMCAxLTEuNSAwdi00Ljg2NGEyLjUwMSAyLjUwMSAwIDAgMSAwLTQuNzcyVi43NWEuNzUuNzUgMCAwIDEgMS41IDB2NC44NjRaTTggN2ExIDEgMCAxIDEgMCAyIDEgMSAwIDAgMSAwLTJaIiBmaWxsPSIjMDAwIi8+PC9zdmc+)}.ag-charts-icon-parallel-channel-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC40MjQgNC45MmEyLjUgMi41IDAgMSAwLTMuMzc3LTIuMTRsLTYuNjMgMi45YTIuNTAxIDIuNTAxIDAgMSAwIC42MDcgMS4zNzJsNi41ODUtMi44OGEyLjUwMSAyLjUwMSAwIDAgMCAyLjgxNS43NDhabS4wNS0yLjY5M2ExIDEgMCAxIDEtMS44Ny43MDggMSAxIDAgMCAxIDEuODctLjcwOFptLTExIDQuNzVhMSAxIDAgMSAxLTEuODcuNzA4IDEgMSAwIDAgMSAxLjg3LS43MDhabTEuNTUgNi4wNzVhMi41MDEgMi41MDEgMCAxIDEtLjYwNy0xLjM3Mmw2LjYzLTIuOWEyLjUwMSAyLjUwMSAwIDEgMSAuNTYyIDEuMzkxbC02LjU4NSAyLjg4Wm0tMS41NS0uMDc1YTEgMSAwIDEgMS0xLjg3LjcwOCAxIDEgMCAwIDEgMS44Ny0uNzA4Wm0xMC40Mi0zLjQ2YTEgMSAwIDEgMC0uNzA5LTEuODcgMSAxIDAgMCAwIC43MDggMS44N1oiIGZpbGw9IiMwMDAiLz48L3N2Zz4=)}.ag-charts-icon-disjoint-channel-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC40MjQgNC45MmEyLjUgMi41IDAgMSAwLTMuMzgzLTIuNDUzTDQuNjkgNC4wNTVhMi41IDIuNSAwIDEgMCAuMzQ0IDEuNDZsNi4zOTItMS41OThhMi41MDEgMi41MDEgMCAwIDAgMyAxLjAwM1ptLjA1LTIuNjkzYTEgMSAwIDEgMS0xLjg3LjcwOCAxIDEgMCAwIDEgMS44Ny0uNzA4Wm0tMTEgMi43NWExIDEgMCAxIDEtMS44Ny43MDggMSAxIDAgMCAxIDEuODctLjcwOFptMS41NiA1LjQyYTIuNSAyLjUgMCAxIDAtLjM0NSAxLjQ2MWw2LjM1MiAxLjU4OGEyLjUgMi41IDAgMSAwIC4zODQtMS40NWwtNi4zOTItMS41OThabS0xLjU2LjUzOGExIDEgMCAxIDAtMS44Ny0uNzA4IDEgMSAwIDAgMCAxLjg3LjcwOFptMTAuNDIgMS40NjFhMSAxIDAgMSAxLS43MDkgMS44NyAxIDEgMCAwIDEgLjcwOC0xLjg3WiIgZmlsbD0iIzAwMCIvPjwvc3ZnPg==)}.ag-charts-icon-line-color-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgY2xpcC1wYXRoPSJ1cmwoI2EpIj48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEyLjc4OC41ODNhMi42MyAyLjYzIDAgMCAwLTEuODYuNzdMOS41NDQgMi43MzhhLjc1Ny43NTcgMCAwIDAtLjE0LjE0TDIuMDMyIDEwLjI1di4wMDFjLS4yNDIuMjQxLS40Mi41MzgtLjUyLjg2NGwtLjAwMi4wMDItLjg4IDIuOTAyLS4wMDEuMDAzYTEuMDgzIDEuMDgzIDAgMCAwIDEuMzUgMS4zNDdoLjAwMWwyLjkwMi0uODhoLjAwMWMuMzI2LS4xLjYyMy0uMjc3Ljg2NS0uNTE4di0uMDAxbDcuMzc1LTcuMzc2YS43NjMuNzYzIDAgMCAwIC4xMzktLjEzOWwxLjM4NC0xLjM4NEEyLjYzIDIuNjMgMCAwIDAgMTIuNzg4LjU4M1ptLS4xMjYgNC4zNTIuOTI0LS45MjRhMS4xMyAxLjEzIDAgMCAwLTEuNTk3LTEuNTk3bC0uOTI0LjkyNCAxLjU5NyAxLjU5N1ptLTIuNjU3LS41MzYtNi45MTMgNi45MTRIMy4wOWEuNTgzLjU4MyAwIDAgMC0uMTQ2LjI0MmwtLjY1MyAyLjE1MyAyLjE1NS0uNjU0YS41ODMuNTgzIDAgMCAwIC4yNDEtLjE0NGw2LjkxNC02LjkxNC0xLjU5Ny0xLjU5N1oiIGZpbGw9IiMwMDAiLz48L2c+PGRlZnM+PGNsaXBQYXRoIGlkPSJhIj48cGF0aCBmaWxsPSIjZmZmIiBkPSJNMCAwaDE2djE2SDB6Ii8+PC9jbGlwUGF0aD48L2RlZnM+PC9zdmc+)}.ag-charts-icon-delete-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik02LjA4MyAyLjY2N2MwLS4wOS4wNTMtLjI0Mi4xOTctLjM4Ny4xNDUtLjE0NC4yOTctLjE5Ny4zODctLjE5N2gyLjY2N2MuMDg5IDAgLjI0MS4wNTMuMzg2LjE5Ny4xNDUuMTQ1LjE5Ny4yOTcuMTk3LjM4N3YuNTgzSDYuMDg0di0uNTgzWk01LjMzIDQuNzVIMTEuOTE3djguNTgzYzAgLjA5LS4wNTIuMjQyLS4xOTcuMzg3LS4xNDUuMTQ0LS4yOTcuMTk3LS4zODYuMTk3SDQuNjY3Yy0uMDkgMC0uMjQyLS4wNTMtLjM4Ny0uMTk3LS4xNDQtLjE0NS0uMTk3LS4yOTctLjE5Ny0uMzg3VjQuNzVINS4zM1ptLS43NDUtMS41di0uNTgzYzAtLjU3OC4yOC0xLjA5Mi42MzYtMS40NDcuMzU1LS4zNTYuODctLjYzNyAxLjQ0Ny0uNjM3aDIuNjY3Yy41NzcgMCAxLjA5MS4yODEgMS40NDcuNjM3LjM1NS4zNTUuNjM2Ljg3LjYzNiAxLjQ0N3YuNTgzSDE0YS43NS43NSAwIDAgMSAwIDEuNWgtLjU4M3Y4LjU4M2MwIC41NzgtLjI4MSAxLjA5Mi0uNjM2IDEuNDQ3LS4zNTYuMzU2LS44Ny42MzctMS40NDcuNjM3SDQuNjY3Yy0uNTc3IDAtMS4wOTItLjI4MS0xLjQ0Ny0uNjM3LS4zNTUtLjM1NS0uNjM3LS44Ny0uNjM3LTEuNDQ3VjQuNzVIMmEuNzUuNzUgMCAwIDEgMC0xLjVoMi41ODNabTIuMDgzIDMuMzMzYS43NS43NSAwIDAgMSAuNzUuNzV2NGEuNzUuNzUgMCAxIDEtMS41IDB2LTRhLjc1Ljc1IDAgMCAxIC43NS0uNzVabTMuNDE3Ljc1YS43NS43NSAwIDAgMC0xLjUgMHY0YS43NS43NSAwIDEgMCAxLjUgMHYtNFoiIGZpbGw9IiMwMDAiLz48L3N2Zz4=)}.ag-charts-icon-lock-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik02LjE3MyAyLjg0YTIuNTgzIDIuNTgzIDAgMCAxIDQuNDEgMS44Mjd2MS45MTZINS40MTZWNC42NjdjMC0uNjg1LjI3My0xLjM0My43NTctMS44MjdaTTMuOTE3IDYuNTgzVjQuNjY3YTQuMDgzIDQuMDgzIDAgMCAxIDguMTY2IDB2MS45MTZoLjU4NGMxLjE1IDAgMi4wODMuOTMzIDIuMDgzIDIuMDg0djQuNjY2YzAgMS4xNS0uOTMzIDIuMDg0LTIuMDgzIDIuMDg0SDMuMzMzYTIuMDgzIDIuMDgzIDAgMCAxLTIuMDgzLTIuMDg0VjguNjY3YzAtMS4xNTEuOTMzLTIuMDg0IDIuMDgzLTIuMDg0aC41ODNabTcuNDE2IDEuNWgtOGEuNTgzLjU4MyAwIDAgMC0uNTgzLjU4NHY0LjY2NmMwIC4zMjIuMjYxLjU4NC41ODMuNTg0aDkuMzM0YS41ODMuNTgzIDAgMCAwIC41ODMtLjU4NFY4LjY2N2EuNTgzLjU4MyAwIDAgMC0uNTgzLS41ODRoLTEuMzM0WiIgZmlsbD0iIzAwMCIvPjwvc3ZnPg==)}.ag-charts-icon-unlock-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik02LjkyMyAyLjg0YTIuNTgzIDIuNTgzIDAgMCAxIDMuNjUzIDAgMyAzIDAgMCAxIC41Ny43OThjLjEzNC4yNzguMTcuNDc0LjE3LjU0NWEuNzUuNzUgMCAwIDAgMS41IDBjMC0uMzgxLS4xMzItLjgwOS0uMzItMS4xOThhNC41MDEgNC41MDEgMCAwIDAtLjg1OS0xLjIwNiA0LjA4MyA0LjA4MyAwIDAgMC02Ljk3IDIuODg4djEuOTE2aC0uNTg0QzIuOTMzIDYuNTgzIDIgNy41MTYgMiA4LjY2N3Y0LjY2NmMwIDEuMTUuOTMzIDIuMDg0IDIuMDgzIDIuMDg0aDkuMzM0YzEuMTUgMCAyLjA4My0uOTMzIDIuMDgzLTIuMDg0VjguNjY3YzAtMS4xNTEtLjkzMy0yLjA4NC0yLjA4My0yLjA4NGgtNy4yNVY0LjY2N2MwLS42ODUuMjcyLTEuMzQzLjc1Ni0xLjgyN1pNNS40MTcgOC4wODNINC4wODJhLjU4My41ODMgMCAwIDAtLjU4My41ODR2NC42NjZjMCAuMzIyLjI2MS41ODQuNTgzLjU4NGg5LjMzNGEuNTgzLjU4MyAwIDAgMCAuNTgzLS41ODRWOC42NjdhLjU4My41ODMgMCAwIDAtLjU4My0uNTg0aC04WiIgZmlsbD0iIzAwMCIvPjwvc3ZnPg==)}.ag-charts-icon-plus-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJsdWNpZGUgbHVjaWRlLXBsdXMiPjxwYXRoIGQ9Ik01IDEyaDE0Ii8+PHBhdGggZD0iTTEyIDV2MTQiLz48L3N2Zz4=)}.ag-charts-icon-crossline-add-line-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNOC43NSA0LjVhLjc1Ljc1IDAgMCAwLTEuNSAwdjIuNzVINC41YS43NS43NSAwIDAgMCAwIDEuNWgyLjc1djIuNzVhLjc1Ljc1IDAgMCAwIDEuNSAwVjguNzVoMi43NWEuNzUuNzUgMCAwIDAgMC0xLjVIOC43NXoiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-input{--input-layer-active: 1;--input-layer-focus: 2;color:inherit;font-family:var(--ag-charts-input-font-family);font-size:var(--ag-charts-input-font-size);transition-duration:var(--ag-charts-input-transition-duration);transition-property:none;transition-timing-function:var(--ag-charts-input-transition-timing-function)}.ag-charts-input:focus-visible{outline:var(--ag-charts-input-focus-outline);box-shadow:var(--ag-charts-input-focus-box-shadow);z-index:var(--input-layer-focus)}.ag-charts-button{background:var(--ag-charts-input-background-color);border:1px solid var(--ag-charts-input-border-color);border-radius:var(--ag-charts-input-border-radius);cursor:pointer;padding:var(--ag-charts-input-padding);transition-property:background,border-color}.ag-charts-button:hover{background:var(--ag-charts-input-background-color--hover)}.ag-charts-button:has(.ag-charts-icon){padding:2px}.ag-charts-checkbox{appearance:none;background:var(--ag-charts-input-checkbox-background-color);border-radius:9px;cursor:pointer;height:18px;margin:0;transition-duration:var(--ag-charts-input-transition-duration--fast);transition-property:margin;width:29px}.ag-charts-checkbox:before{display:block;background:var(--ag-charts-input-background-color);border-radius:7px;content:" ";height:14px;margin:2px;transition-duration:var(--ag-charts-input-transition-duration--fast);transition-property:margin;transition-timing-function:var(--ag-charts-input-transition-easing);width:14px}.ag-charts-checkbox:checked{background:var(--ag-charts-input-checkbox-background-color--checked)}.ag-charts-checkbox:checked:before{margin-left:13px}.ag-charts-select{background:var(--ag-charts-input-background-color);border:1px solid var(--ag-charts-input-border-color);border-radius:var(--ag-charts-input-border-radius);padding:3px 2px 4px;font-size:inherit}.ag-charts-textarea{--line-height: 1.38;background:var(--ag-charts-input-background-color);border:1px solid var(--ag-charts-input-border-color);border-radius:var(--ag-charts-input-border-radius);line-height:var(--line-height);font-family:var(--ag-charts-input-font-family);font-size:var(--ag-charts-input-font-size);padding:var(--ag-charts-input-padding-large) var(--ag-charts-input-padding)}.ag-charts-textarea[placeholder]:empty:before{color:var(--ag-charts-input-placeholder);content:attr(placeholder)}.ag-charts-focus.ag-charts-focus__indicator{position:absolute;display:block;pointer-events:none;user-select:none;width:100%;height:100%}.ag-charts-focus.ag-charts-focus__indicator>div{position:absolute;outline:var(--ag-charts-focus-border);outline-width:2px;box-shadow:var(--ag-charts-focus-border-shadow)}.ag-charts-focus.ag-charts-focus__indicator>svg{width:100%;height:100%;fill:none;stroke:var(--ag-charts-focus-border-color);stroke-width:2px}.ag-charts-focus--hidden{visibility:hidden}.ag-charts-toolbar{align-items:center;background:none;border:none;display:flex;flex-wrap:nowrap;opacity:1;position:absolute;transform:translateY(0);transition:opacity .2s ease-in-out,transform .2s ease-in-out}.ag-charts-toolbar--hidden,.ag-charts-toolbar--prevent-flash{visibility:hidden}.ag-charts-toolbar--floating-hidden{opacity:0;transition:opacity .4s ease-in-out}.ag-charts-toolbar--small{--ag-charts-toolbar-size: var(--ag-charts-toolbar-size-small);--ag-charts-toolbar-font-size: var(--ag-charts-toolbar-font-size-small);--ag-charts-toolbar-button-padding: var(--ag-charts-toolbar-button-padding-small)}.ag-charts-toolbar--top,.ag-charts-toolbar--bottom{flex-direction:row;width:100%}.ag-charts-toolbar--left,.ag-charts-toolbar--right{flex-direction:column}.ag-charts-toolbar--floating,.ag-charts-toolbar--floating-top,.ag-charts-toolbar--floating-bottom{background:none;border:none;flex-direction:row;pointer-events:none;width:100%}.ag-charts-toolbar--floating{padding:0;width:auto;z-index:var(--ag-charts-layer-toolbar)}.ag-charts-toolbar--floating-top{height:calc(var(--ag-charts-toolbar-size) + 10px);padding-top:10px}.ag-charts-toolbar--floating-bottom{height:calc(var(--ag-charts-toolbar-size) + 10px);padding-bottom:10px;overflow:hidden}.ag-charts-toolbar__align{display:flex;flex-direction:inherit;flex-wrap:inherit;gap:var(--ag-charts-toolbar-gap);max-width:100%;width:100%}.ag-charts-toolbar__align--start{justify-content:start}.ag-charts-toolbar__align--center{justify-content:center}.ag-charts-toolbar__align--end{justify-content:end}.ag-charts-toolbar__align--center,.ag-charts-toolbar__align--end{margin-left:auto}.ag-charts-toolbar--left .ag-charts-toolbar__align--center,.ag-charts-toolbar--left .ag-charts-toolbar__align--end,.ag-charts-toolbar--right .ag-charts-toolbar__align--center,.ag-charts-toolbar--right .ag-charts-toolbar__align--end{margin-left:0;margin-top:auto}.ag-charts-toolbar--floating-top .ag-charts-toolbar__align,.ag-charts-toolbar--floating-bottom .ag-charts-toolbar__align{transition:transform .4s ease-in-out;width:auto}.ag-charts-toolbar__section{display:inherit;flex-direction:inherit;flex-wrap:inherit;justify-content:inherit;max-width:inherit;width:inherit}.ag-charts-toolbar__button{align-items:center;background:var(--ag-charts-toolbar-background-color);border:var(--ag-charts-toolbar-border);color:var(--ag-charts-toolbar-foreground-color);display:flex;font:var(--ag-charts-toolbar-font-size) var(--ag-charts-font-family);justify-content:center;margin:0 0 0 -1px;min-height:var(--ag-charts-toolbar-size);min-width:var(--ag-charts-toolbar-size);padding:var(--ag-charts-toolbar-button-padding);pointer-events:all;position:relative;white-space:nowrap;--stroke-width-color: var(--ag-charts-toolbar-foreground-color)}.ag-charts-toolbar__button--drag-handle{min-width:24px;padding-left:0;padding-right:0}.ag-charts-toolbar__button--with-transition{transition:background-color .25s ease-in-out,border-color .25s ease-in-out,color .25s ease-in-out}.ag-charts-toolbar__button[data-toolbar-group=ranges]{padding:var(--ag-charts-toolbar-button-padding) calc(var(--ag-charts-toolbar-button-padding) * 1.5)}.ag-charts-toolbar--top,.ag-charts-toolbar--bottom,.ag-charts-toolbar--floating,.ag-charts-toolbar--floating-top,.ag-charts-toolbar--floating-bottom{.ag-charts-toolbar__button--first{border-bottom-left-radius:var(--ag-charts-button-radius);border-top-left-radius:var(--ag-charts-button-radius);margin:0}.ag-charts-toolbar__button--last{border-bottom-right-radius:var(--ag-charts-button-radius);border-top-right-radius:var(--ag-charts-button-radius)}}.ag-charts-toolbar--left,.ag-charts-toolbar--right{.ag-charts-toolbar__button{border-radius:0;margin:-1px 0 0;max-width:100%}.ag-charts-toolbar__button--first{border-top-left-radius:var(--ag-charts-button-radius);border-top-right-radius:var(--ag-charts-button-radius);margin:0}.ag-charts-toolbar__button--last{border-bottom-left-radius:var(--ag-charts-button-radius);border-bottom-right-radius:var(--ag-charts-button-radius)}}.ag-charts-toolbar__button--hidden-value,.ag-charts-toolbar__button--hidden-toggled{display:none}.ag-charts-toolbar__button:hover:not([aria-disabled=true],.ag-charts-toolbar__button--drag-handle){background:var(--ag-charts-toolbar-hover-color);z-index:1}.ag-charts-toolbar__button:focus-visible{outline:var(--ag-charts-focus-border);box-shadow:var(--ag-charts-focus-border-shadow);z-index:calc(var(--ag-charts-layer-ui-overlay) + 1)}.ag-charts-toolbar__button.ag-charts-toolbar__button--active{background:var(--ag-charts-toolbar-active-background-color);border-color:var(--ag-charts-toolbar-active-color);color:var(--ag-charts-toolbar-active-color);z-index:2;--stroke-width-color: var(--ag-charts-toolbar-active-color)}.ag-charts-toolbar__button[aria-disabled=true]{background:var(--ag-charts-toolbar-disabled-background-color);color:var(--ag-charts-toolbar-disabled-foreground-color)}.ag-charts-toolbar__button:not([aria-disabled=true]){cursor:pointer}.ag-charts-toolbar__button.ag-charts-toolbar__button--drag-handle{cursor:grab}.ag-charts-toolbar__button.ag-charts-toolbar__button--dragging{cursor:grabbing}.ag-charts-toolbar__button--fill-visible:after{content:"";display:block;position:absolute;bottom:3px;left:5px;right:5px;height:4px;border-radius:99px;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--ag-charts-foreground-color) 10%,transparent);background:var(--fill)}.ag-charts-toolbar__button--fill-visible[aria-disabled=true]:after{filter:grayscale(1);opacity:.5}.ag-charts-toolbar__button--stroke-width-visible:before{content:"";height:min(var(--strokeWidth),20px);width:12px;background:var(--stroke-width-color);margin-right:var(--ag-charts-toolbar-button-padding)}.ag-charts-toolbar__button--stroke-width-visible[aria-disabled=true]:before{filter:grayscale(1);opacity:.5}.ag-charts-toolbar__icon+.ag-charts-toolbar__label{margin-left:var(--ag-charts-toolbar-gap)}.ag-charts-toolbar__icon,.ag-charts-toolbar__label{pointer-events:none}.ag-chart-overlay{color:#181d1f;pointer-events:none}.ag-chart-overlay.ag-chart-dark-overlay{color:#fff}.ag-chart-overlay--loading{color:#8c8c8c}.ag-chart-overlay__loading-background{background:#fff;pointer-events:none}.ag-chart-overlay.ag-chart-dark-overlay .ag-chart-overlay__loading-background{background:#192232}.ag-chart-tooltip{transition:transform .1s ease;width:max-content;z-index:99999;font:12px Verdana,sans-serif;color:#464646;box-shadow:0 4px 8px #00000014}.ag-chart-tooltip-wrap-always{overflow-wrap:break-word;word-break:break-word;hyphens:none}.ag-chart-tooltip-wrap-hyphenate{overflow-wrap:break-word;word-break:break-word;hyphens:auto}.ag-chart-tooltip-wrap-on-space{overflow-wrap:normal;word-break:normal}.ag-chart-tooltip-wrap-never{white-space:pre;text-overflow:ellipsis}.ag-chart-tooltip-no-interaction{pointer-events:none;user-select:none}.ag-chart-tooltip-no-animation{transition:none!important}.ag-chart-tooltip-hidden{visibility:hidden}.ag-chart-tooltip-title{overflow:hidden;position:relative;padding:8px 14px;border-top-left-radius:2px;border-top-right-radius:2px;color:#fff;background-color:#888;z-index:1;text-overflow:inherit}.ag-chart-tooltip-title:only-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.ag-chart-tooltip-content{overflow:hidden;padding:6px 14px;line-height:1.7em;background:#fff;border-bottom-left-radius:2px;border-bottom-right-radius:2px;border:1px solid rgba(0,0,0,.15);text-overflow:inherit}.ag-chart-tooltip-arrow:before{content:"";position:absolute;top:100%;left:50%;transform:translate(-50%);border:5px solid #d9d9d9;border-left-color:transparent;border-right-color:transparent;border-bottom-color:transparent;width:0;height:0;margin:0 auto}.ag-chart-tooltip-arrow:after{content:"";position:absolute;top:calc(100% - 1px);left:50%;transform:translate(-50%);border:5px solid white;border-left-color:transparent;border-right-color:transparent;border-bottom-color:transparent;width:0;height:0;margin:0 auto}\n'),e&&this.setContainer(e)}destroy(){super.destroy(),this.observer?.unobserve(this.element),this.container&&this.sizeMonitor.unobserve(this.container),Object.values(this.rootElements).forEach(e=>{e.children.forEach(e=>e.remove()),e.element.remove()}),this.element.remove()}setSizeOptions(e=300,t=300,i,r){let{style:s}=this.element;s.width=`${i??e}px`,s.height=`${r??t}px`}updateContainerSize(){let{style:e}=this.rootElements[yx].element;e.width=`${this.containerSize?.width??0}px`,e.height=`${this.containerSize?.height??0}px`}setContainer(e){if(e!==this.container){if(this.container&&(this.container.removeChild(this.element),this.sizeMonitor.unobserve(this.container)),!(null!=this.getShadowDocumentRoot(e)))for(let e of this.rootElements.styles.children.keys())this.removeChild("styles",e);for(let[t,i]of(this.container=e,this.styles))this.addStyles(t,i);e.appendChild(this.element),this.sizeMonitor.observe(e,e=>{this.containerSize=e,this.updateContainerSize(),this.listeners.dispatch("resize",{type:"resize"})}),this.listeners.dispatch("container-changed",{type:"container-changed"})}}setThemeClass(e){this.element.classList.forEach(t=>{t.startsWith("ag-charts-theme-")&&t!==e&&this.element.classList.remove(t)}),this.element.classList.add(e)}setTabIndex(e){let t=this.rootElements.canvas.element.querySelector("canvas");t&&(t.tabIndex=e)}addEventListenerOnElement(e,t,i,r){let{element:s}=this.rootElements[e];return s.addEventListener(t,i,r),()=>{s.removeEventListener(t,i,r)}}addEventListener(e,t,i){this.element.addEventListener(e,t,i),yE.forEach((r,s)=>{if(!r.eventTypes?.includes(e))return;let a=this.rootElements[s];a.listeners.push([e,t,i]),a.children.forEach(i=>{i.addEventListener(e,t)})})}removeEventListener(e,t,i){this.element.removeEventListener(e,t,i),yE.forEach((r,s)=>{if(!r.eventTypes?.includes(e))return;let a=this.rootElements[s];a.listeners=a.listeners.filter(([i,r])=>i!==e&&r!==t),a.children.forEach(r=>{r.removeEventListener(e,t,i)})})}getBoundingClientRect(){return this.rootElements.canvas.element.getBoundingClientRect()}getOverlayClientRect(){let e=m6(),t=new u3(0,0,e.innerWidth,e.innerHeight),i=this.getRawOverlayClientRect(),r=u3.fromDOMRect(i??this.getBoundingClientRect());return t.intersection(r)?.toDOMRect()??yD}getRawOverlayClientRect(){let e=this.element;for(;null!=e;){let t=e.computedStyleMap?.(),i=t?.get("overflow-x")?.toString(),r=t?.get("overflow-y")?.toString();if(null!=i&&"visible"!==i||r&&"visible"!==r)return e.getBoundingClientRect();e=e.parentElement}let t=this.getShadowDocumentRoot();if(t)return t.getBoundingClientRect()}getShadowDocumentRoot(e=this.container){let t=e?.ownerDocument?.body??m4("body");for(;null!=e&&e!==t;){if(e.parentNode instanceof DocumentFragment)return e;e=e.parentNode}}getChildBoundingClientRect(e){let{children:t}=this.rootElements[e],i=[];for(let e of t.values())i.push(u3.fromDOMRect(e.getBoundingClientRect()));return u3.merge(i)}calculateCanvasPosition(e){let t=0,{x:i=0,y:r=0}=this.getChildBoundingClientRect("canvas")??{},s=e.getBoundingClientRect();return{x:s.x-i,y:s.y-r}}isManagedChildDOMElement(e,t,i){let{children:r}=this.rootElements[t],s=r?.get(i);return null!=s&&e.contains(s)}isEventOverElement(e){let t=e.target;return null!=t&&this.element.contains(t)}addStyles(e,t){let i;if(this.styles.set(e,t),null==this.container)return;let r="data-ag-charts";if(null!=this.getShadowDocumentRoot())i=this.addChild("styles",e);else{let t=m4("head");for(let i of t.children)if(i.getAttribute(r)===e)return;i=m5("style"),t.appendChild(i)}i.getAttribute(r)!==e&&(i.setAttribute(r,e),i.innerHTML=t)}removeStyles(e){this.removeChild("styles",e)}updateCursor(e){this.element.style.cursor=e}getCursor(){return this.element.style.cursor}addChild(e,t,i){let{element:r,children:s,listeners:a}=this.rootElements[e];if(!s)throw Error("AG Charts - unable to create DOM elements after destroy()");if(s.has(t))return s.get(t);let{childElementType:o="div"}=yE.get(e)??{};if(i&&i.tagName.toLowerCase()!==o.toLowerCase())throw Error("AG Charts - mismatching DOM element type");let n=i??m5(o);for(let[e,t,i]of a)n.addEventListener(e,t,i);return s.set(t,n),r?.appendChild(n),n}removeChild(e,t){let{children:i}=this.rootElements[e];i&&(i.get(t)?.remove(),i.delete(t))}incrementDataCounter(e){let{dataset:t}=this.element;t[e]??(t[e]="0"),t[e]=String(Number(t[e])+1)}getIconClassNames(e){return`ag-charts-icon ag-charts-icon-${e}`}};function yk(e,t,i,r,s,a,o,n){let l=(i-e)*(n-a)-(r-t)*(o-s);if(0===l)return 0;let h=((o-s)*(t-a)-(e-s)*(n-a))/l,d=((i-e)*(t-a)-(r-t)*(e-s))/l;return h>=0&&h<=1&&d>=0&&d<=1?1:0}function yT(e,t,i,r){return[-e+3*t-3*i+r,3*e-6*t+3*i,-3*e+3*t,e]}function yA(e,t,i,r,s,a,o,n,l,h){if(isNaN(e)||isNaN(t))return 0;a&&([s,r]=[r,s]);let d=(h-n)/(l-o),c=n-d*o,u=Math.pow(d,2)+1,p=2*(d*(c-t)-e),g=Math.pow(p,2)-4*u*(Math.pow(e,2)+Math.pow(c-t,2)-Math.pow(i,2));if(g<0)return 0;let m=0;return[(-p+Math.sqrt(g))/2/u,(-p-Math.sqrt(g))/2/u].forEach(i=>{i>=Math.min(o,l)&&i<=Math.max(o,l)&&fp(Math.atan2(d*i+c-t,i-e),r,s)&&m++}),m}function yR(e,t,i,r,s){return(1-s)**3*e+3*(1-s)**2*s*t+3*(1-s)*s**2*i+s**3*r}function yL(e,t,i,r,s){if(s<=Math.min(e,r))return e<r?0:1;if(s>=Math.max(e,r))return e<r?1:0;let a=0,o=1,n=NaN;for(let l=0;l<12;l+=1)yR(e,t,i,r,n=(a+o)/2)<s?a=n:o=n;return n}function yP(e,t,i,r,s,a,o,n,l){let h=(1-l)*e+l*i,d=(1-l)*t+l*r,c=(1-l)*i+l*s,u=(1-l)*r+l*a,p=(1-l)*s+l*o,g=(1-l)*a+l*n,m=(1-l)*h+l*c,f=(1-l)*d+l*u,v=(1-l)*c+l*p,y=(1-l)*u+l*g,C=(1-l)*m+l*v,w=(1-l)*f+l*y;return[[{x:e,y:t},{x:h,y:d},{x:m,y:f},{x:C,y:w}],[{x:C,y:w},{x:v,y:y},{x:p,y:g},{x:o,y:n}]]}function yF(e,t,i,r){let s=-e+3*t-3*i+r,a=3*e-6*t+3*i,o=-3*e+3*t;if(0===s){if(0!==a){let e=-o/a;if(e>0&&e<1)return[e]}return[]}let n=a*a-4*s*o;if(n>=0){let e=Math.sqrt(n);return[(-a+e)/(2*s),(-a-e)/(2*s)].filter(e=>e>0&&e<1)}return[]}function yN(e,t,i,r,s,a,o,n){return[...yF(e,i,s,o),...yF(t,r,a,n)]}var yO=class{constructor(){this.path2d=new Path2D,this.previousCommands=[],this.previousParams=[],this.previousClosedPath=!1,this.commands=[],this.params=[],this.openedPath=!1,this.closedPath=!1}isDirty(){return this.closedPath!==this.previousClosedPath||this.previousCommands.length!==this.commands.length||this.previousParams.length!==this.params.length||this.previousCommands.toString()!==this.commands.toString()||this.previousParams.toString()!==this.params.toString()}getPath2D(){return this.path2d}moveTo(e,t){this.openedPath=!0,this.path2d.moveTo(e,t),this.commands.push(0),this.params.push(e,t)}lineTo(e,t){this.openedPath?(this.path2d.lineTo(e,t),this.commands.push(1),this.params.push(e,t)):this.moveTo(e,t)}rect(e,t,i,r){this.moveTo(e,t),this.lineTo(e+i,t),this.lineTo(e+i,t+r),this.lineTo(e,t+r),this.closePath()}roundRect(e,t,i,r,s){s=Math.min(s,i/2,r/2),this.moveTo(e,t+s),this.arc(e+s,t+s,s,Math.PI,1.5*Math.PI),this.lineTo(e+s,t),this.lineTo(e+i-s,t),this.arc(e+i-s,t+s,s,1.5*Math.PI,2*Math.PI),this.lineTo(e+i,t+s),this.lineTo(e+i,t+r-s),this.arc(e+i-s,t+r-s,s,0,Math.PI/2),this.lineTo(e+i-s,t+r),this.lineTo(e+s,t+r),this.arc(e+ +s,t+r-s,s,Math.PI/2,Math.PI),this.lineTo(e,t+r-s),this.closePath()}arc(e,t,i,r,s,a){this.openedPath=!0,this.path2d.arc(e,t,i,r,s,a),this.commands.push(2),this.params.push(e,t,i,r,s,a?1:0)}cubicCurveTo(e,t,i,r,s,a){this.openedPath||this.moveTo(e,t),this.path2d.bezierCurveTo(e,t,i,r,s,a),this.commands.push(3),this.params.push(e,t,i,r,s,a)}closePath(){this.openedPath&&(this.path2d.closePath(),this.commands.push(4),this.openedPath=!1,this.closedPath=!0)}clear(e){e&&(this.previousCommands=this.commands,this.previousParams=this.params,this.previousClosedPath=this.closedPath),this.path2d=new Path2D,this.openedPath=!1,this.closedPath=!1,this.commands=[],this.params=[]}isPointInPath(e,t){let i=this.commands,r=this.params,s=i.length,a=NaN,o=NaN,n=0,l=0,h=0;for(let d=0,c=0;d<s;d++)switch(i[d]){case 0:h+=yk(a,o,n,l,-1e4,-1e4,e,t),a=n=r[c++],o=l=r[c++];break;case 1:h+=yk(n,l,r[c++],r[c++],-1e4,-1e4,e,t),n=r[c-2],l=r[c-1];break;case 3:h+=function(e,t,i,r,s,a,o,n,l,h,d,c){let u=0,p=-1e4-c,g=d- -1e4,m=yT(e,i,s,o),f=yT(t,r,a,n),v=p*m[0]+g*f[0];for(let e of function(e,t,i,r){if(0===e)return function(e,t,i){if(0===e)return function(e,t){let i=-t/e;return 0!==e&&i>=0&&i<=1?[i]:[]}(t,i);let r=t*t-4*e*i,s=[];if(0===r){let i=-t/(2*e);i>=0&&i<=1&&s.push(i)}else if(r>0){let i=Math.sqrt(r),a=(-t-i)/(2*e),o=(-t+i)/(2*e);a>=0&&a<=1&&s.push(a),o>=0&&o<=1&&s.push(o)}return s}(t,i,r);let s=t/e,a=i/e,o=(3*a-s*s)/9,n=(9*s*a-r/e*27-2*s*s*s)/54,l=o*o*o+n*n,h=1/3,d=[];if(l>=0){let e=Math.sqrt(l),t=Math.sign(n+e)*Math.pow(Math.abs(n+e),h),i=Math.sign(n-e)*Math.pow(Math.abs(n-e),h),r=Math.abs(Math.sqrt(3)*(t-i)/2),a=-h*s+(t+i);if(a>=0&&a<=1&&d.push(a),0===r){let e=-h*s-(t+i)/2;e>=0&&e<=1&&d.push(e)}}else{let e=Math.acos(n/Math.sqrt(-o*o*o)),t=h*s,i=2*Math.sqrt(-o),r=i*Math.cos(h*e)-t,a=i*Math.cos(h*(e+2*Math.PI))-t,l=i*Math.cos(h*(e+4*Math.PI))-t;r>=0&&r<=1&&d.push(r),a>=0&&a<=1&&d.push(a),l>=0&&l<=1&&d.push(l)}return d}(v,p*m[1]+g*f[1],p*m[2]+g*f[2],p*m[3]+g*f[3]+(-1e4*(c- -1e4)- -1e4*(d- -1e4)))){let t;let i=e*e,r=e*i,s=m[0]*r+m[1]*i+m[2]*e+m[3],a=f[0]*r+f[1]*i+f[2]*e+f[3];(t=l===d?(a-h)/(c-h):(s-l)/(d-l))>=0&&t<=1&&u++}return u}(n,l,r[c++],r[c++],r[c++],r[c++],r[c++],r[c++],-1e4,-1e4,e,t),n=r[c-2],l=r[c-1];break;case 2:{let i=r[c++],s=r[c++],o=r[c++],d=r[c++],u=r[c++];h+=yA(i,s,o,d,u,!!r[c++],-1e4,-1e4,e,t),isNaN(a)||(h+=yk(n,l,i+Math.cos(d)*o,s+Math.sin(d)*o,-1e4,-1e4,e,t)),n=i+Math.cos(u)*o,l=s+Math.sin(u)*o;break}case 4:h+=yk(a,o,n,l,-1e4,-1e4,e,t)}return h%2==1}distanceSquared(e,t){let i=1/0,r=this.commands,s=this.params,a=r.length,o=NaN,n=NaN,l=0,h=0;for(let d=0,c=0;d<a;d++)switch(r[d]){case 0:l=o=s[c++],h=n=s[c++];break;case 1:i=fS(e,t,l,h,s[c++],s[c++],i);break;case 3:ul.error("Command.Curve distanceSquare not implemented");break;case 2:{let r=s[c++],a=s[c++],o=s[c++],n=s[c++],d=s[c++],u=r+Math.cos(n)*o,p=a+Math.sin(n)*o,g=!!s[c++];i=fS(e,t,l,h,u,p,i),i=function(e,t,i,r,s,a,o,n,l){if(n&&([o,a]=[a,o]),!fp(Math.atan2(t-r,e-i),a,o)){let o=i+Math.cos(a)*s,n=r+Math.sin(a)*s,h=i+Math.cos(a)*s,d=r+Math.sin(a)*s;return Math.min(l,fb(e,t,o,n),fb(e,t,h,d))}let h=s-Math.sqrt(fb(e,t,i,r));return Math.min(l,h*h)}(e,t,r,a,o,n,d,g,i),l=r+Math.cos(d)*o,h=a+Math.sin(d)*o;break}case 4:i=fS(e,t,l,h,o,n,i)}return i}getPoints(){let{commands:e,params:t}=this,i=[],r=0;for(let s=0;s<e.length;s++)switch(e[s]){case 0:case 1:i.push({x:t[r++],y:t[r++]});break;case 3:r+=4,i.push({x:t[r++],y:t[r++]});break;case 2:i.push({x:t[r++],y:t[r++]}),r+=4}return i}computeSVGDataPath(e){let t=[],{commands:i,params:r}=this,s=(i,...r)=>{t.push(i);for(let i=0;i<r.length;i+=2){let{x:s,y:a}=e(r[i],r[i+1]);t.push(s,a)}},a=0;for(let e=0;e<i.length;e++)switch(i[e]){case 0:s("M",r[a++],r[a++]);break;case 1:s("L",r[a++],r[a++]);break;case 3:s("C",r[a++],r[a++],r[a++],r[a++],r[a++],r[a++]);break;case 2:{let e=r[a++],i=r[a++],o=r[a++],n=r[a++],l=r[a++],h=r[a++]?-1:1,d=fd((l-n)*h)*h,c=Math.max(Math.abs(d)/(Math.PI/2)|0,1),u=d/c,p=4/3*Math.tan(u/4);s(0===t.length?"M":"L",e+Math.cos(n)*o,i+Math.sin(n)*o);for(let t=0;t<c;t+=1){let r=n+u*(t+0),a=n+u*(t+1),l=o*Math.sin(r),h=o*Math.cos(r),d=o*Math.sin(a),c=o*Math.cos(a);s("C",e+h-p*l,i+l+p*h,e+c+p*d,i+d-p*c,e+c,i+d)}break}case 4:t.push("Z")}return t.join(" ")}computeBBox(){let{commands:e,params:t}=this,[i,r,s,a]=[1/0,1/0,-1/0,-1/0],[o,n]=[NaN,NaN],[l,h]=[NaN,NaN],d=(e,t,l)=>{i=Math.min(t,i),r=Math.min(e,r),s=Math.max(e,s),a=Math.max(t,a),l&&([o,n]=[e,t])},c=0;for(let i=0;i<e.length;i++)switch(e[i]){case 0:d(t[c++],t[c++],!0),[l,h]=[o,n];break;case 1:d(t[c++],t[c++],!0);break;case 3:let r=t[c++],s=t[c++],a=t[c++],u=t[c++],p=t[c++],g=t[c++];d(p,g,!0),yN(o,n,r,s,a,u,p,g).forEach(e=>{d(yR(o,r,a,p,e),yR(n,s,u,g,e))});break;case 2:{let e=t[c++],i=t[c++],r=t[c++],s=fd(t[c++]),a=fd(t[c++]);t[c++]&&([s,a]=[a,s]);let o=(t,s)=>{d(e+r*Math.cos(t),i+r*Math.sin(t),s)};for(let e of(o(s),o(a,!0),[0,Math.PI/2,Math.PI,3*Math.PI/2]))(s<a&&s<=e&&e<=a||s>a&&(s<=e||e<=a))&&o(e);break}case 4:[o,n]=[l,h]}return new u3(r,i,s-r,a-i)}};function yB(e){let{redraw:t=3,changeCb:i,convertor:r}=e??{};return u6({redraw:t,type:"path",convertor:r,changeCb:i})}var yG=class extends fR{constructor(){super(...arguments),this.path=new yO,this._clipX=NaN,this._clipY=NaN,this._dirtyPath=!0}set clipX(e){this._clipX=e,this.dirtyPath=!0}set clipY(e){this._clipY=e,this.dirtyPath=!0}set dirtyPath(e){this._dirtyPath!==e&&(this._dirtyPath=e,e&&this.markDirty(this,3))}get dirtyPath(){return this._dirtyPath}checkPathDirty(){this._dirtyPath||(this.dirtyPath=this.path.isDirty()||(this.fillShadow?.isDirty()??!1)||(this._clipPath?.isDirty()??!1))}isPointInPath(e,t){return this.path.closedPath&&this.path.isPointInPath(e,t)}distanceSquared(e,t){return this.distanceSquaredTransformedPoint(e,t)}computeSVGDataPath(e){return this.dirtyPath&&(this.updatePath(),this.dirtyPath=!1),this.path.computeSVGDataPath(e)}distanceSquaredTransformedPoint(e,t){return this.path.closedPath&&this.path.isPointInPath(e,t)?0:this.path.distanceSquared(e,t)}isDirtyPath(){return!1}updatePath(){}render(e){let{ctx:t,forceRender:i,stats:r}=e;if(0===this.dirty&&!i){r&&(r.nodesSkipped+=this.nodeCount.count);return}if((this.dirtyPath||this.isDirtyPath())&&(this.updatePath(),this.dirtyPath=!1),isNaN(this._clipX)||isNaN(this._clipY)||null==this.clipMode)this.drawPath(t);else{t.save();let e=this.strokeWidth/2;if(this._clipPath??(this._clipPath=new yO),this._clipPath.clear(),this._clipPath.rect(-e,-e,this._clipX+e,this._clipY+e+e),"normal"===this.clipMode&&t.clip(this._clipPath?.getPath2D()),this._clipX>0&&this._clipY>0&&this.drawPath(t),"punch-out"===this.clipMode){t.clip(this._clipPath?.getPath2D());let{x:e=-1e4,y:i=-1e4,width:r=2e4,height:s=2e4}=this.getBBox()??{};t.clearRect(e,i,r,s)}t.restore()}this.fillShadow?.markClean(),super.render(e)}drawPath(e){this.fillStroke(e,this.path.getPath2D())}};yG.className="Path",c7([yB()],yG.prototype,"clipMode",2),c7([yB()],yG.prototype,"clipX",1),c7([yB()],yG.prototype,"clipY",1);var yz={};c8(yz,{block:()=>y_,elements:()=>yV,modifiers:()=>yj});var y_="ag-charts-focus",yV={indicator:"ag-charts-focus__indicator",svg:"ag-charts-focus__svg"},yj={hidden:"ag-charts-focus--hidden"},yH=class{constructor(e){this.domManager=e;let{block:t,elements:i,modifiers:r}=yz;this.div=m4().createElement("div"),this.svg=m4().createElementNS("http://www.w3.org/2000/svg","svg"),this.path=m4().createElementNS("http://www.w3.org/2000/svg","path"),this.svg.append(this.path),this.element=e.addChild("canvas-overlay",t),this.element.classList.add(t,i.indicator,r.hidden),this.element.ariaHidden="true",this.element.append(this.svg)}destroy(){this.domManager.removeStyles(y_),this.domManager.removeChild("canvas-overlay",y_)}updateBounds(e){void 0===e?this.element.classList.add(yj.hidden):e instanceof yG?(this.path.setAttribute("d",e.computeSVGDataPath((t,i)=>mq.toCanvasPoint(e,t,i))),this.show(this.svg)):(ft(this.div,e),this.show(this.div))}show(e){this.element.classList.remove(yj.hidden),this.element.innerHTML="",this.element.append(e)}isShown(){return!this.element.classList.contains(yj.hidden)}guessDevice(e){let t=function(e){if(e.target instanceof HTMLElement&&"tabindex"in e.target.attributes)return e.target}(e);if(void 0!==t){let e=getComputedStyle(t);if(this.isShown()||"none"!==e.outlineStyle&&"0px"!==e.outlineWidth)return{type:"keyboard",lastFocus:t}}return{type:"mouse",lastFocus:t}}},yU=class{set textContent(e){this.textElement.textContent=e;let t=this.textElement,i=t.getBBox?.();i&&this.svgElement.setAttribute("viewBox",`${i.x} ${i.y} ${i.width} ${i.height}`)}get textContent(){return this.textElement.textContent}constructor(){this.textElement=m8("http://www.w3.org/2000/svg","text"),this.textElement.role="presentation",this.svgElement=m8("http://www.w3.org/2000/svg","svg"),this.svgElement.appendChild(this.textElement),this.svgElement.style.width="100%",this.svgElement.style.opacity="0",this.svgElement.role="presentation",this.boundedContainer=m5("div"),this.boundedContainer.appendChild(this.svgElement),this.boundedContainer.role="presentation"}remove(){this.boundedContainer.remove()}getContainer(){return this.boundedContainer}updateBounds(e){ft(this.boundedContainer,e)}};function yW(e,t){return t.params?.type===e}function y$(e){let t={params:e,result:void 0};return t.result=function(e){if("button"===e)return m5("button");if("slider"===e)return m5("input");if(["toolbar","group","list"].includes(e))return m5("div");if("text"===e)return new yU;if("listswitch"===e)return{button:m5("button"),listitem:m5("div")};throw Error("AG Charts - error allocating meta")}(t.params.type),t}var yY=class{constructor(e,t,i,r){this.localeManager=t,this.domManager=i,this.focusIndicator=r,this.debugShowDOMProxies=fn.check("showDOMProxies"),this.destroyFns=[],this.destroyFns.push(e.addListener("update-complete",()=>this.update()))}destroy(){this.destroyFns.forEach(e=>e())}update(){this.focusable&&this.focusIndicator.updateBounds(this.focusable.toCanvasBBox())}addLocalisation(e){e(),this.destroyFns.push(this.localeManager.addListener("locale-changed",e))}createProxyContainer(e){let{params:t,result:i}=y$(e);return this.domManager.addChild("canvas-overlay",t.id,i),i.classList.add(...t.classList),i.style.pointerEvents="none",i.role=t.type,"ariaOrientation"in t&&(i.ariaOrientation=t.ariaOrientation),"boolean"==typeof t.ariaHidden&&(i.ariaHidden=t.ariaHidden.toString()),this.addLocalisation(()=>{i.ariaLabel=this.localeManager.t(t.ariaLabel.id,t.ariaLabel.params)}),i}createProxyElement(e){let t=y$(e);if(yW("button",t)){let{params:e,result:i}=t;if(this.initInteract(e,i),"string"==typeof e.textContent)i.textContent=e.textContent;else{let{textContent:t}=e;this.addLocalisation(()=>{i.textContent=this.localeManager.t(t.id,t.params)})}this.setParent(e,i)}if(yW("slider",t)){let{params:e,result:i}=t;this.initInteract(e,i),i.type="range",i.role="presentation",i.style.margin="0px",i.ariaOrientation=e.ariaOrientation,this.addLocalisation(()=>{i.ariaLabel=this.localeManager.t(e.ariaLabel.id,e.ariaLabel.params)}),this.setParent(e,i)}if(yW("text",t)){let{params:e,result:i}=t;this.initElement(e,i.getContainer()),this.setParent(e,i.getContainer())}if(yW("listswitch",t)){let{params:e,result:{button:i,listitem:r}}=t;this.initInteract(e,i),i.style.width="100%",i.style.height="100%",i.textContent=e.textContent,i.role="switch",i.ariaChecked=e.ariaChecked.toString(),i.setAttribute("aria-describedby",e.ariaDescribedBy),r.role="listitem",r.style.position="absolute",r.replaceChildren(i),this.setParent(e,r)}return t.result}initElement(e,t){let{id:i}=e;t.id=i,t.style.pointerEvents="none",t.style.opacity=this.debugShowDOMProxies?"0.25":"0",t.style.position="absolute",t.style.overflow="hidden"}initInteract(e,t){let{focusable:i,onclick:r,onchange:s,onfocus:a,onblur:o,tabIndex:n}=e;this.initElement(e,t),void 0!==n&&(t.tabIndex=n),t.addEventListener("focus",e=>{this.focusable=i,t.style.setProperty("pointerEvents",null),this.focusIndicator.updateBounds(i.toCanvasBBox())}),t.addEventListener("blur",e=>{this.focusable=void 0,t.style.pointerEvents="none",this.focusIndicator.updateBounds(void 0)}),r&&t.addEventListener("click",r),a&&t.addEventListener("focus",a),o&&t.addEventListener("blur",o),s&&t.addEventListener("change",s)}setParent(e,t){let{id:i,parent:r}=e;"string"==typeof r?this.domManager.addChild(r,i,t):r.appendChild(t)}},yK=/\$\{(\w+)}(?:\[(\w+)])?/gi,yZ={number:new Intl.NumberFormat("en-US"),percent:new Intl.NumberFormat("en-US",{style:"percent"}),date:new Intl.DateTimeFormat("en-US",{dateStyle:"full"}),time:new Intl.DateTimeFormat("en-US",{timeStyle:"full"}),datetime:new Intl.DateTimeFormat("en-US",{dateStyle:"full",timeStyle:"full"})},yq=({defaultValue:e,variables:t})=>e?.replaceAll(yK,(e,i,r)=>{let s=t[i],a=null!=r?yZ[r]:null;return(null!=r&&null==a&&ul.warnOnce(`Format style [${r}] is not supported`),null!=a)?a.format(s):"number"==typeof s?yZ.number.format(s):s instanceof Date?yZ.datetime.format(s):String(s)}),yX=class extends yw{constructor(){super(...arguments),this.localeText=void 0,this.getLocaleText=void 0}setLocaleText(e){this.localeText!==e&&(this.localeText=e,this.dispatch("locale-changed"))}setLocaleTextFormatter(e){this.getLocaleText=e,this.getLocaleText!==e&&(this.getLocaleText=e,this.dispatch("locale-changed"))}t(e,t={}){let{localeText:i=c9,getLocaleText:r}=this,s=i[e];return r?.({key:e,defaultValue:s,variables:t})??yq({key:e,defaultValue:s,variables:t})??e}},yQ=class e{constructor(t){this.enabled=!0,this.width=600,this.height=300;let{width:i,height:r,pixelRatio:s,canvasElement:a,willReadFrequently:o=!1}=t;this.pixelRatio=!function(){if("undefined"==typeof navigator)return!1;let e=navigator.userAgent.match(/\(iPhone; CPU iPhone OS (\d+_\d+_\d+) like Mac OS X\)/);if(null==e)return!1;let[t,i]=e[1].split("_").map(Number);return t<16||16===t&&i<6}()?s??m6("devicePixelRatio"):1,this.element=a??m5("canvas"),this.element.style.display="block",this.element.style.width=(i??this.width)+"px",this.element.style.height=(r??this.height)+"px",this.element.width=Math.round((i??this.width)*this.pixelRatio),this.element.height=Math.round((r??this.height)*this.pixelRatio),this.context=this.element.getContext("2d",{willReadFrequently:o}),this.onEnabledChange(),this.resize(i??0,r??0),e.debugContext(this.context)}static is(t){return t instanceof e}drawImage(e,t=0,i=0){return e.drawImage(this.context.canvas,t,i)}toDataURL(e){return this.element.toDataURL(e)}resize(e,t){if(!(e>0&&t>0))return;let{element:i,context:r,pixelRatio:s}=this;i.width=Math.round(e*s),i.height=Math.round(t*s),r.setTransform(s,0,0,s,0,0),i.style.width=e+"px",i.style.height=t+"px",this.width=e,this.height=t}snapshot(){}clear(){this.context.save(),this.context.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0),this.context.clearRect(0,0,this.width,this.height),this.context.restore()}destroy(){this.element.remove(),this.element.width=0,this.element.height=0,this.context.clearRect(0,0,0,0),Object.freeze(this)}onEnabledChange(){this.element&&(this.element.style.display=this.enabled?"":"none")}static debugContext(e){if(fn.check("canvas")){let t=e.save.bind(e),i=e.restore.bind(e),r=0;Object.assign(e,{save(){t(),r++},restore(){if(0===r)throw Error("AG Charts - Unable to restore() past depth 0");i(),r--},verifyDepthZero(){if(0!==r)throw Error(`AG Charts - Save/restore depth is non-zero: ${r}`)}})}}};c7([f3(e=>e.onEnabledChange())],yQ.prototype,"enabled",2);var yJ=class e{constructor(e,t){this.canvas=e,this.markDirty=t,this.debug=fn.create(!0,"scene"),this.layersMap=new Map,this.nextZIndex=0,this.nextLayerId=0}static sortLayers(e,t){return m_([e.zIndex,...e.zIndexSubOrder??[void 0,void 0],e.id],[t.zIndex,...t.zIndexSubOrder??[void 0,void 0],t.id],mG)}get size(){return this.layersMap.size}forEach(t){Array.from(this.layersMap.values()).sort(e.sortLayers).forEach(t)}resize(e,t){this.canvas.resize(e,t),this.layersMap.forEach(({canvas:i})=>i.resize(e,t))}addLayer(e){let{width:t,height:i,pixelRatio:r}=this.canvas,{zIndex:s=this.nextZIndex++,name:a,zIndexSubOrder:o,getComputedOpacity:n,getVisibility:l}=e,h=new yQ({width:t,height:i,pixelRatio:r}),d={id:this.nextLayerId++,name:a,canvas:h,zIndex:s,zIndexSubOrder:o,getComputedOpacity:n,getVisibility:l};return s>=this.nextZIndex&&(this.nextZIndex=s+1),this.layersMap.set(h,d),this.debug("Scene.addLayer() - layers",this.layersMap),d.canvas}removeLayer(e){this.layersMap.has(e)&&(this.layersMap.delete(e),e.destroy(),this.markDirty(),this.debug("Scene.removeLayer() -  layers",this.layersMap))}moveLayer(e,t,i){let r=this.layersMap.get(e);r&&(r.zIndex=t,r.zIndexSubOrder=i,this.markDirty(),this.debug("Scene.moveLayer() -  layers",this.layersMap))}clear(){this.layersMap.clear()}};function y0(e,t,i,r,s={},a=u3.zero){if(!fn.check("scene:stats","scene:stats:verbose"))return;let{layersRendered:o=0,layersSkipped:n=0,nodesRendered:l=0,nodesSkipped:h=0}=r??{},d=performance.now(),{start:c,...u}=t,p=Object.entries(u).map(([e,t])=>y3(e,t)).filter(e=>null!=e).join(" + "),g=Object.entries(s).map(([e,t])=>`${e}: ${t}`).join(" ; "),m=fn.check("scene:stats:verbose"),f=[`${y3("⏱️",c,d)} (${p})`,`${g}`,`Layers: ${m?y2(o,n):e.size}`,m?`Nodes: ${y2(l,h)}`:null].filter(pM),v=new fB(e=>i.measureText(e)),y=new Map(f.map(e=>[e,v.measureLines(e)])),C=Math.max(...Array.from(y.values(),e=>e.width)),w=function(e,t){let i=0;for(let r of e)i+=t(r);return i}(y.values(),e=>e.height);i.save(),i.fillStyle="white",i.fillRect(0,0,C,w),i.fillStyle="black";let b=0;for(let[e,t]of y.entries())b+=t.height,i.fillText(e,2+a.x,b);i.restore()}function y1(e){return fn.check(!0,"scene")?{node:e,name:e.name??e.id,dirty:u4[e.dirty],...e.parent?.isVirtual?{virtualParentDirty:u4[e.parent.dirty],virtualParent:e.parent}:{},...e.children.map(e=>y1(e)).reduce((e,t)=>{let{name:i}=t,{node:{visible:r,opacity:s,zIndex:a,zIndexSubOrder:o,translationX:n,translationY:l,rotation:h,scalingX:d,scalingY:c},node:u,virtualParent:p}=t;(!r||s<=0)&&(i=`(${i})`),u instanceof mQ&&u.isLayer()&&(i=`*${i}*`);let g=[`${i??"<unknown>"}`,`z: ${a}`,o&&`zo: ${o.map(e=>"function"==typeof e?`${e()} (fn)`:e).join(" / ")}`,p&&"(virtual parent)",n&&`x: ${n}`,l&&`y: ${l}`,h&&`r: ${h}`,null!=d&&1!==d&&`sx: ${d}`,null!=c&&1!==c&&`sy: ${c}`].filter(e=>!!e).join(" "),m=g,f=1;for(;null!=e[m]&&f<100;)m=`${g} (${f++})`;return e[m]=t,e},{})}:{}}function y2(e,t){let i=e+t;return`${e} / ${i} (${Math.round(100*e/i)}%)`}function y3(e,t,i){return`${e}: ${Math.round(100*(null!=i?i-t:t))/100}ms`}var y4=class{constructor(e){this.debug=fn.create(!0,"scene"),this.id=uB(this),this.root=null,this.pendingSize=null,this.isDirty=!1,this.canvas=new yQ(e),this.layersManager=new yJ(this.canvas,()=>{this.isDirty=!0})}get width(){return this.pendingSize?.[0]??this.canvas.width}get height(){return this.pendingSize?.[1]??this.canvas.height}setContainer(e){let{element:t}=this.canvas;return t.parentElement?.removeChild(t),e.appendChild(t),this}setRoot(e){return this.root===e||(this.isDirty=!0,this.root?._setLayerManager(),this.root=e,e&&(e.visible=!0,e._setLayerManager(this.layersManager))),this}attachNode(e){return this.appendChild(e),()=>this.removeChild(e)}appendChild(e){return this.root?.appendChild(e),this}removeChild(e){return this.root?.removeChild(e),this}download(e,t){m7(this.canvas.toDataURL(t),e?.trim()??"image")}getDataURL(e){return this.canvas.toDataURL(e)}resize(e,t){return e=Math.round(e),t=Math.round(t),e>0&&t>0&&(e!==this.width||t!==this.height)&&(this.pendingSize=[e,t],this.isDirty=!0,!0)}async render(e){let{debugSplitTimes:t={start:performance.now()},extraDebugStats:i,seriesRect:r}=e??{},{canvas:s,canvas:{context:a}={},root:o,pendingSize:n}=this;if(!a)return;let l=performance.now();if(n&&(this.layersManager.resize(...n),this.pendingSize=null),o&&!o.visible){this.isDirty=!1;return}if(o&&!this.isDirty){this.debug.check()&&this.debug("Scene.render() - no-op",{redrawType:u4[o.dirty],tree:y1(o)}),y0(this.layersManager,t,a,void 0,i,r);return}let h={ctx:a,devicePixelRatio:this.canvas.pixelRatio??1,forceRender:!0,resized:!!n,debugNodes:{}};fn.check("scene:stats:verbose")&&(h.stats={layersRendered:0,layersSkipped:0,nodesRendered:0,nodesSkipped:0}),function(e){let t=mR(m6("agChartsSceneDebug")),i=[];for(let e of t)"layout"===e?i.push("seriesRoot","legend","root",/.*Axis-\d+-axis.*/):i.push(e);e.debugNodeSearch=i}(h);let d=!1;if((!o||o.dirty>=1)&&(d=!0,s.clear()),o&&fn.check("scene:dirtyTree")){let{dirtyTree:e,paths:t}=function e(t){if(0===t.dirty)return{dirtyTree:{},paths:[]};let i=t.children.map(t=>e(t)).filter(e=>e.paths.length>0),r=mQ.is(t)?t.name??t.id:t.id,s=i.length?i.flatMap(e=>e.paths).map(e=>`${r}.${e}`):[r];return{dirtyTree:{name:r,node:t,dirty:u4[t.dirty],...i.map(e=>e.dirtyTree).filter(e=>null!=e.dirty).reduce((e,t)=>(e[t.name??"<unknown>"]=t,e),{})},paths:s}}(o);fn.create("scene:dirtyTree")("Scene.render() - dirtyTree",{dirtyTree:e,paths:t})}if(o&&d&&(this.debug("Scene.render() - before",{redrawType:u4[o.dirty],canvasCleared:d,tree:y1(o)}),o.visible&&(o.preRender(),a.save(),o.render(h),a.restore())),t["✍️"]=performance.now()-l,this.layersManager.size&&d){let e=performance.now();a.save(),a.resetTransform(),this.layersManager.forEach(e=>{e.canvas.enabled&&e.getVisibility()&&(a.globalAlpha=e.getComputedOpacity(),e.canvas.drawImage(a))}),a.restore(),t["⛙"]=performance.now()-e}a.verifyDepthZero?.(),this.isDirty=!1,y0(this.layersManager,t,a,h.stats,i,r),function(e,t){for(let[i,r]of(e.save(),Object.entries(t))){let t=mq.toCanvas(r);if(!t){ul.log(`Scene.render() - no bbox for debugged node [${i}].`);continue}e.globalAlpha=.8,e.strokeStyle="red",e.lineWidth=1,e.strokeRect(t.x,t.y,t.width,t.height),e.fillStyle="red",e.strokeStyle="white",e.font="16px sans-serif",e.textBaseline="top",e.textAlign="left",e.lineWidth=2,e.strokeText(i,t.x,t.y,t.width),e.fillText(i,t.x,t.y,t.width)}e.restore()}(a,h.debugNodes),o&&this.debug.check()&&this.debug("Scene.render() - after",{redrawType:u4[o.dirty],tree:y1(o),canvasCleared:d})}strip(){let{context:e,pixelRatio:t}=this.canvas;e.setTransform(t,0,0,t,0,0),this.layersManager.clear(),this.setRoot(null),this.isDirty=!1}destroy(){this.strip(),this.canvas.destroy(),Object.assign(this,{canvas:void 0})}};y4.className="Scene";var y6=class{constructor(){this.cache=new WeakMap}call(e,...t){let i;let r=this.cache.get(e);try{i=JSON.stringify(t)}catch(i){return this.invoke(e,t,r)}return(null==r&&(r=new Map,this.cache.set(e,r)),r.has(i))?r.get(i):this.invoke(e,t,r,i)}invoke(e,t,i,r){try{let s=e(...t);return i&&null!=r&&i.set(r,s),s}catch(e){ul.warnOnce("User callback errored, ignoring",e);return}}invalidateCache(){this.cache=new WeakMap}},y5=class extends yb{constructor(e){super(),this.annotationRoot=e,this.mementoOriginatorKey="annotations",this.annotations=[]}createMemento(){return this.annotations}guardMemento(e){return pm(e)}restoreMemento(e,t,i){this.annotations=this.cleanData(i).map(e=>{let t=this.getAnnotationTypeStyles(e.type);return pP(e,t)}),this.listeners.dispatch("restore-annotations",{type:"restore-annotations",annotations:this.annotations})}updateData(e){this.annotations=this.cleanData(e??[])}attachNode(e){return this.annotationRoot.append(e),()=>(this.annotationRoot?.removeChild(e),this)}setAnnotationStyles(e){this.styles=e}getAnnotationTypeStyles(e){return this.styles?.[e]}cleanData(e){for(let t of e)"textAlign"in t&&delete t.textAlign;return e}},y8=class{constructor(e){this.sceneRoot=e,this.axes=new Map,this.axisGridGroup=new mQ({name:"Axes-Grids",layer:!0,zIndex:1}),this.axisGroup=new mQ({name:"Axes",layer:!0,zIndex:2}),this.sceneRoot.appendChild(this.axisGroup),this.sceneRoot.appendChild(this.axisGridGroup)}updateAxes(e,t){for(let i of e)t.includes(i)||(i.detachAxis(this.axisGroup,this.axisGridGroup),i.destroy());for(let i of t)e?.includes(i)||i.attachAxis(this.axisGroup,this.axisGridGroup);for(let e of(this.axes.clear(),t)){let t=e.createAxisContext();this.axes.has(t.direction)?this.axes.get(t.direction)?.push(t):this.axes.set(t.direction,[t])}}getAxisContext(e){return this.axes.get(e)??[]}destroy(){this.axes.clear(),this.sceneRoot.removeChild(this.axisGroup),this.sceneRoot.removeChild(this.axisGridGroup)}},y7=class extends yw{constructor(e){super(),this.animationManager=e,this.dispatchOnlyLatest=!0,this.dispatchThrottle=0,this.requestThrottle=300,this.isLoadingInitialData=!1,this.isLoadingData=!1,this.freshRequests=[],this.requestCounter=0,this.debug=fn.create(!0,"data-model","data-source"),this.throttledFetch=this.createThrottledFetch(this.requestThrottle),this.throttledDispatch=this.createThrottledDispatch(this.dispatchThrottle)}updateCallback(e){"function"==typeof e&&(this.debug("DataService - updated data source callback"),this.dataSourceCallback=e,this.isLoadingInitialData=!0,this.animationManager.skip(),this.dispatch("data-source-change"))}clearCallback(){this.dataSourceCallback=void 0}load(e){this.isLoadingData=!0,this.throttledFetch(e)}isLazy(){return null!=this.dataSourceCallback}isLoading(){return this.isLazy()&&(this.isLoadingInitialData||this.isLoadingData)}createThrottledFetch(e){return un(e=>this.fetch(e),e,{leading:!1,trailing:!0})}createThrottledDispatch(e){return un((e,t)=>{this.debug(`DataService - dispatching 'data-load' | ${e}`),this.dispatch("data-load",{type:"data-load",data:t})},e,{leading:!0,trailing:!0})}async fetch(e){let t;if(!this.dataSourceCallback)throw Error("DataService - [dataSource.getData] callback not initialised");let i=performance.now(),r=this.requestCounter++;this.debug(`DataService - requesting | ${r}`),this.freshRequests.push(r);try{t=await this.dataSourceCallback(e),this.debug(`DataService - response | ${performance.now()-i}ms | ${r}`)}catch(e){this.debug(`DataService - request failed | ${r}`),ul.errorOnce(`DataService - request failed | [${e}]`)}this.isLoadingInitialData=!1;let s=this.freshRequests.findIndex(e=>e===r);if(-1===s||this.dispatchOnlyLatest&&s!==this.freshRequests.length-1){this.debug(`DataService - discarding stale request | ${r}`);return}this.freshRequests=this.freshRequests.slice(s+1),0===this.freshRequests.length&&(this.isLoadingData=!1),Array.isArray(t)?this.throttledDispatch(r,t):this.dispatch("data-error")}};c7([f2({newValue(e){this.throttledDispatch=this.createThrottledDispatch(e)}})],y7.prototype,"dispatchThrottle",2),c7([f2({newValue(e){this.throttledFetch=this.createThrottledFetch(e)}})],y7.prototype,"requestThrottle",2);var y9=class{constructor(e){this.maxAnimationTime=e,this.debug=fn.create(!0,"animation"),this.controllers=new Map,this.stoppedCbs=new Set,this.currentPhase=0,this.phases=new Map(pq.map(e=>[e,[]])),this.skipAnimations=!1,this.animationTimeConsumed=0,this.isReady=!1}get size(){return this.controllers.size}get consumedTimeMs(){return this.animationTimeConsumed}isActive(){return this.controllers.size>0}getActiveControllers(){return this.phases.get(pq[this.currentPhase])??[]}checkOverlappingId(e){null!=e&&this.controllers.has(e)&&(this.controllers.get(e).stop(),this.debug(`Skipping animation batch due to update of existing animation: ${e}`),this.skip())}addAnimation(e){if(!e.isComplete){if(pq.indexOf(e.phase)<this.currentPhase){this.debug("Skipping animation due to being for an earlier phase",e.id),e.stop();return}this.controllers.set(e.id,e),this.phases.get(e.phase)?.push(e)}}removeAnimation(e){this.controllers.delete(e.id);let t=this.phases.get(e.phase),i=t?.indexOf(e);null!=i&&i>=0&&t?.splice(i,1)}progress(e){if(!this.isReady)return;let t=0===e?.01:e,i=()=>{let e=pq[this.currentPhase];return{phaseControllers:[...this.getActiveControllers()],phase:e,phaseMeta:pX[e]}},{phase:r,phaseControllers:s,phaseMeta:a}=i(),o=()=>null==pq[this.currentPhase],n=()=>{for({phase:r,phaseControllers:s,phaseMeta:a}=i();!o()&&0===s.length;)this.currentPhase++,({phase:r,phaseControllers:s,phaseMeta:a}=i()),this.debug(`AnimationBatch - phase changing to ${r}`,{unusedTime:t},s)},l=this.controllers.size;this.debug(`AnimationBatch - ${e}ms; phase ${r} with ${s?.length} of ${l}`);do{let e=t,i=a.skipIfNoEarlierAnimations&&0===this.animationTimeConsumed,r=0;for(let a of s)i?a.stop():t=Math.min(a.update(e),t),a.isComplete&&(r++,this.removeAnimation(a));this.animationTimeConsumed+=e-t,this.debug(`AnimationBatch - updated ${s.length} controllers; ${r} completed`),this.debug(`AnimationBatch - animationTimeConsumed: ${this.animationTimeConsumed}`),n()}while(t>0&&!o());this.animationTimeConsumed>this.maxAnimationTime&&(this.debug("Animation batch exceeded max animation time, skipping",[...this.controllers]),this.stop())}ready(){if(this.isReady)return;this.isReady=!0,this.debug(`AnimationBatch - ready; skipped: ${this.skipAnimations}`,[...this.controllers]);let e=!0;for(let[,t]of this.controllers)if(t.duration>0&&!0!==pX[t.phase].skipIfNoEarlierAnimations){e=!1;break}if(!e)for(let[,e]of this.controllers)e.autoplay&&e.play(!0)}skip(e=!0){if(!1===this.skipAnimations&&!0===e){for(let e of this.controllers.values())e.stop();this.controllers.clear()}this.skipAnimations=e}play(){for(let e of this.controllers.values())e.play()}pause(){for(let e of this.controllers.values())e.pause()}stop(){for(let e of this.controllers.values())try{e.stop(),this.removeAnimation(e)}catch(e){ul.error("Error during animation stop",e)}this.dispatchStopped()}stopByAnimationId(e){if(null!=e&&this.controllers.has(e)){let t=this.controllers.get(e);t&&(t.stop(),this.removeAnimation(t))}}stopByAnimationGroupId(e){for(let t of this.controllers.values())t.groupId===e&&this.stopByAnimationId(t.id)}dispatchStopped(){this.stoppedCbs.forEach(e=>e()),this.stoppedCbs.clear()}isSkipped(){return this.skipAnimations}destroy(){this.stop(),this.controllers.clear()}},Ce=((T=Ce||{})[T.Default=16]="Default",T[T.ZoomDrag=8]="ZoomDrag",T[T.Annotations=4]="Annotations",T[T.ContextMenu=2]="ContextMenu",T[T.Animation=1]="Animation",T[T.All=31]="All",T),Ct=class extends yb{addListener(e,t,i=16){return super.addListener(e,e=>{this.getState()&i&&t(e)})}};function Ci(e){let t={...e,preventDefault(){t.sourceEvent?.preventDefault()}};return t}function Cr(e,t){e.dispatchWrapHandlers(t.type,(e,t)=>e(t),Ci(t))}var Cs=["click","dblclick","contextmenu","hover","drag-start","drag","drag-end","leave","enter","page-left","wheel"],Ca=["blur","focus"],Co=["keydown","keyup"],Cn=["mousemove","mouseup"],Cl=["pagehide","mousemove","mouseup"],Ch=["click","dblclick","contextmenu","mousedown","mouseleave","mouseenter","touchstart","touchmove","touchend","touchcancel","wheel","blur","focus","keydown","keyup"],Cd=((A=Cd||{}).Retain="retain",A.Exclusive="exclusive",A),Cc=new Set(Object.values(Cd)),Cu=class e extends Ct{constructor(e,t){for(let i of(super(),this.keyboardOptions=e,this.domManager=t,this.debug=fn.create(!0,"interaction"),this.eventHandler=e=>this.processEvent(e),this.overlayEventHandler=e=>this.processCanvasOverlayEvent(e),this.mouseDown=!1,this.touchDown=!1,this.pointerCaptureCanvasElement=void 0,this.clickHistory=[{offsetX:NaN,offsetY:NaN,type:"mousedown"}],this.dblclickHistory=[{offsetX:NaN,offsetY:NaN,type:"mousedown"},{offsetX:NaN,offsetY:NaN,type:"mouseup"},{offsetX:NaN,offsetY:NaN,type:"mousedown"}],this.stateQueue=17,this.rootElement=this.domManager.getShadowDocumentRoot(),Ch))i.startsWith("touch")||"wheel"===i?this.domManager.addEventListener(i,this.eventHandler,{passive:!1}):this.domManager.addEventListener(i,this.eventHandler);for(let e of Cl)m6().addEventListener(e,this.eventHandler);this.destroyFns.push(this.domManager.addEventListenerOnElement("canvas-overlay","mouseover",this.overlayEventHandler),this.domManager.addEventListenerOnElement("canvas-overlay","mouseout",this.overlayEventHandler)),this.containerChanged(!0),this.domManager.addListener("container-changed",()=>this.containerChanged())}containerChanged(e=!1){let t=this.domManager.getShadowDocumentRoot();if(e||t!==this.rootElement){for(let e of Cn)this.rootElement?.removeEventListener(e,this.eventHandler);for(let e of(this.rootElement=t,this.debug("[InteractionManager] Switching rootElement to:",this.rootElement),Cn))this.rootElement?.addEventListener(e,this.eventHandler)}}destroy(){for(let e of(super.destroy(),Cl))m6().removeEventListener(e,this.eventHandler);for(let e of Cn)this.rootElement?.removeEventListener(e,this.eventHandler);for(let e of Ch)this.domManager.removeEventListener(e,this.eventHandler);this.domManager.removeStyles("interactionManager")}pushState(e){this.stateQueue|=e}popState(e){this.stateQueue&=~e}getState(){return this.stateQueue&-this.stateQueue}processCanvasOverlayEvent(e){let t=this.calculateCoordinates(e);if(null==t)return;let i=e.target,r=null;for(;null!=i;)if(null==(r=i.getAttribute("data-pointer-capture")))i=i.parentElement;else break;if(null==i||null==r||!Cc.has(r))return;let s="mouseover"===e.type,a=s?i:void 0;if(this.pointerCaptureCanvasElement!==a&&(this.pointerCaptureCanvasElement=a,"exclusive"===r)){let i=this.buildPointerEvent({type:s?"leave":"enter",event:e,...t});this.debug("Dispatching canvas overlay event",i,this.getState()),Cr(this.listeners,i)}}processEvent(e){this.debug("Received raw event",e);let t=this.decideInteractionEventTypes(e),i=e.target;if("click"===e.type&&i?.ariaDisabled==="true"){e.preventDefault();return}this.ignoreEvent(t,i)||null==t||this.dispatchEvent(e,t).catch(e=>ul.errorOnce(e))}ignoreEvent(e,t){if("contextmenu"===e)return!1;let i=["button","input"];return[t?.tagName?.toLowerCase(),t?.role].some(e=>i.includes(e))}async dispatchEvent(e,t){if(Cs.includes(t)){this.dispatchPointerEvent(e,t);return}let{relatedElement:i,targetElement:r}=this.extractElements(e);Ca.includes(t)?this.dispatchTypedEvent(this.listeners,{type:t,sourceEvent:e,relatedElement:i,targetElement:r}):Co.includes(t)&&this.dispatchTypedEvent(this.listeners,{type:t,sourceEvent:e,relatedElement:i,targetElement:r})}dispatchTypedEvent(e,t){let i=Ci(t);this.debug("Dispatching typed event",i,this.getState()),e.dispatchWrapHandlers(t.type,(e,t)=>e(t),i)}extractElements(e){let t,i;return"relatedTarget"in e&&e.relatedTarget instanceof HTMLElement&&(t=e.relatedTarget),"target"in e&&e.target instanceof HTMLElement&&(i=e.target),{relatedElement:t,targetElement:i}}dispatchPointerEvent(e,t){let i=this.calculateCoordinates(e);if(null==i)return;let r=this.buildPointerEvent({type:t,event:e,...i});this.debug("Dispatching pointer event",r,this.getState()),Cr(this.listeners,r)}getEventHTMLTarget(e){return e.target instanceof HTMLElement?e.target:e.currentTarget instanceof HTMLElement?e.currentTarget:void 0}recordDown(e){e instanceof MouseEvent&&(p_(["offsetX","offsetY"],this.clickHistory[0],e),p_(["offsetX","offsetY"],this.dblclickHistory[2],this.dblclickHistory[0]),p_(["offsetX","offsetY"],this.dblclickHistory[0],e)),this.dragStartElement=this.getEventHTMLTarget(e)}recordUp(e){e instanceof MouseEvent&&p_(["offsetX","offsetY"],this.dblclickHistory[1],e),this.dragStartElement=void 0}decideInteractionEventTypes(e){let t="drag-start";if(this.pointerCaptureCanvasElement?.isConnected===!1&&(this.pointerCaptureCanvasElement=void 0),null==this.pointerCaptureCanvasElement)switch(e.type){case"blur":case"focus":case"keydown":case"keyup":return this.keyboardOptions.enabled?e.type:void 0;case"click":case"dblclick":case"contextmenu":case"wheel":return e.type;case"mousedown":if(!this.isEventOverElement(e))return;return this.mouseDown=!0,this.recordDown(e),t;case"touchstart":if(!this.isEventOverElement(e))return;return this.touchDown=!0,this.recordDown(e),t;case"touchmove":case"mousemove":if(!this.mouseDown&&!this.touchDown&&!this.isEventOverElement(e))return;return this.mouseDown||this.touchDown?"drag":"hover";case"mouseup":if(!this.mouseDown&&!this.isEventOverElement(e))return;return this.mouseDown=!1,this.recordUp(e),"drag-end";case"touchend":if(!this.touchDown&&!this.isEventOverElement(e))return;return this.touchDown=!1,this.recordUp(e),"drag-end";case"mouseleave":case"touchcancel":return"leave";case"mouseenter":return"enter";case"pagehide":return"page-left"}}isEventOverElement(e){return this.domManager.isEventOverElement(e)}calculateCoordinates(t){if(t instanceof MouseEvent)return this.getMouseEventCoords(t);if("undefined"!=typeof TouchEvent&&t instanceof TouchEvent){let{clientX:i,clientY:r,pageX:s,pageY:a}=t.touches[0]??t.changedTouches[0];return{...e.NULL_COORDS,clientX:i,clientY:r,pageX:s,pageY:a}}if(t instanceof PageTransitionEvent){if(t.persisted)return;return e.NULL_COORDS}}getMouseEventCoords(e){let{clientX:t,clientY:i,pageX:r,pageY:s}=e,{offsetX:a,offsetY:o}=e,n=this.getEventHTMLTarget(e),{x:l=0,y:h=0}=n?this.domManager.calculateCanvasPosition(n):{};if(null!=this.dragStartElement&&e.target!==this.dragStartElement){let e=this.domManager.calculateCanvasPosition(this.dragStartElement);a-=e.x-l,o-=e.y-h}else a+=l,o+=h;return{clientX:t,clientY:i,pageX:r,pageY:s,offsetX:a,offsetY:o}}isWheelEvent(e){return"wheel"===e.type}buildPointerEvent(e){let{type:t,event:i,clientX:r,clientY:s}=e,{offsetX:a,offsetY:o,pageX:n,pageY:l}=e;if(!pD(a)||!pD(o)){let e=this.domManager.getBoundingClientRect();a=r-e.left,o=s-e.top}if(!pD(n)||!pD(l)){let e=this.rootElement?.getBoundingClientRect();n=r-(e?.left??0),l=s-(e?.top??0)}let[h,d]=[NaN,NaN];if(this.isWheelEvent(i)){let e=0===i.deltaMode?.01:1;h=i.deltaX*e,d=i.deltaY*e}let c=[];"click"===i.type?c=this.clickHistory:"dblclick"===i.type&&(c=this.dblclickHistory);let{relatedElement:u,targetElement:p}=this.extractElements(i),g={type:t,offsetX:a,offsetY:o,pageX:n,pageY:l,deltaX:h,deltaY:d,button:"button"in i?Number(i.button):0,pointerHistory:c,sourceEvent:i,relatedElement:u,targetElement:p};return this.debug("InteractionManager - builtEvent: ",g,this.getState()),g}};function Cp(e){return null==e||!isNaN(e)&&e>=0&&e<=2}Cu.NULL_COORDS={clientX:-1/0,clientY:-1/0,pageX:-1/0,pageY:-1/0,offsetX:-1/0,offsetY:-1/0};var Cg=class{constructor(e,t){this.interactionManager=e,this.chartUpdateMutex=t,this.defaultDuration=1e3,this.batch=new y9(1.5*this.defaultDuration),this.debug=fn.create(!0,"animation"),this.events=new yd,this.rafAvailable="undefined"!=typeof requestAnimationFrame,this.isPlaying=!0,this.requestId=null,this.skipAnimations=!0,this.currentAnonymousAnimationId=0}addListener(e,t){return this.events.on(e,t)}animate({...e}){let t=this.batch;try{t.checkOverlappingId(e.id)}catch(e){this.failsafeOnError(e);return}let{id:i}=e;null==i&&(i=`__${this.currentAnonymousAnimationId}`,this.currentAnonymousAnimationId+=1);let r=this.isSkipped()||"none"===e.phase;r&&this.debug("AnimationManager - skipping animation");let{delay:s,duration:a}=e;if(!Cp(s))throw Error(`Animation delay of ${s} is unsupported (${i})`);if(!Cp(a))throw Error(`Animation duration of ${a} is unsupported (${i})`);let o=new p0({...e,id:i,skip:r,autoplay:!!this.isPlaying&&e.autoplay,phase:e.phase,defaultDuration:this.defaultDuration});if(!this.forceTimeJump(o,this.defaultDuration))return this.batch.addAnimation(o),o}play(){if(!this.isPlaying){this.isPlaying=!0,this.debug("AnimationManager.play()");try{this.batch.play()}catch(e){this.failsafeOnError(e)}this.requestAnimation()}}pause(){if(this.isPlaying){this.isPlaying=!1,this.cancelAnimation(),this.debug("AnimationManager.pause()");try{this.batch.pause()}catch(e){this.failsafeOnError(e)}}}stop(){this.isPlaying=!1,this.cancelAnimation(),this.debug("AnimationManager.stop()"),this.batch.stop()}stopByAnimationId(e){try{this.batch.stopByAnimationId(e)}catch(e){this.failsafeOnError(e)}}stopByAnimationGroupId(e){try{this.batch.stopByAnimationGroupId(e)}catch(e){this.failsafeOnError(e)}}reset(){this.isPlaying?(this.stop(),this.play()):this.stop()}skip(e=!0){this.skipAnimations=e}isSkipped(){return!this.rafAvailable||this.skipAnimations||this.batch.isSkipped()}isActive(){return this.isPlaying&&this.batch.isActive()}skipCurrentBatch(){this.debug.check()&&this.debug("AnimationManager - skipCurrentBatch()",{stack:Error().stack}),this.batch.skip()}isSkippingFrames(){return!0}scheduleAnimationFrame(e){this.requestId=m6().requestAnimationFrame(e)}forceTimeJump(e,t){return!1}requestAnimation(){let e;if(!this.rafAvailable||!this.batch.isActive()||null!==this.requestId)return;let t=async i=>{let r=async()=>{let t=i-(e??i);e=i,this.debug("AnimationManager - onAnimationFrame()",{controllersCount:this.batch.size,deltaTime:t}),this.interactionManager.pushState(1);try{this.batch.progress(t)}catch(e){this.failsafeOnError(e)}this.events.emit("animation-frame",{type:"animation-frame",deltaMs:t})};this.isSkippingFrames()?await this.chartUpdateMutex.acquireImmediately(r):await this.chartUpdateMutex.acquire(r),this.batch.isActive()?this.scheduleAnimationFrame(t):(this.batch.stop(),this.events.emit("animation-stop",{type:"animation-stop",deltaMs:this.batch.consumedTimeMs}))};this.events.emit("animation-start",{type:"animation-start",deltaMs:0}),this.scheduleAnimationFrame(t)}cancelAnimation(){null!==this.requestId&&(cancelAnimationFrame(this.requestId),this.requestId=null,this.startBatch())}failsafeOnError(e,t=!0){ul.error("Error during animation, skipping animations",e),t&&this.cancelAnimation()}startBatch(e){this.debug(`AnimationManager - startBatch() with skipAnimations=${e}.`),this.reset(),this.batch.destroy(),this.batch=new y9(1.5*this.defaultDuration),!0===e&&this.batch.skip()}endBatch(){this.batch.isActive()?(this.batch.ready(),this.requestAnimation()):(this.interactionManager.popState(1),this.batch.isSkipped()&&this.batch.skip(!1))}onBatchStop(e){this.batch.stoppedCbs.add(e)}destroy(){this.stop(),this.events.clear()}},Cm=class e{constructor(t,i,r){this.localeManager=t,this.domManager=i,this.layoutManager=r,this.debug=fn.create(!0,"aria"),this.destroyFns=[],this.liveElem=e.createAnnouncer(),this.domManager.addChild("canvas-proxy","ag-charts-canvas-proxy",this.liveElem),this.destroyFns.push(this.layoutManager.addListener("layout:complete",e=>this.onResize(e)),()=>this.domManager.removeChild("canvas-proxy","ag-charts-canvas-proxy"))}static createAnnouncer(){let e=m4().createElement("div");return e.classList.add("ag-charts-aria-announcer"),f7(e,"role","status"),f7(e,"aria-live","assertive"),e}destroy(){this.destroyFns.forEach(e=>e())}onResize(e){this.liveElem.style.width=`${e.chart.width}px`,this.liveElem.style.height=`${e.chart.height}px`}clear(){this.liveElem.textContent="\xa0"}announceValue(e,t){let{localeManager:i,liveElem:r}=this,s=i.t(e,t);this.debug(`AriaAnnouncementService - announceValue: ${s}`),this.clear(),setTimeout(()=>r.innerText=s,16)}},Cf=class extends yb{legendItemClick(e,t,i,r){this.listeners.dispatch("legend-item-click",{type:"legend-item-click",series:e,itemId:t,enabled:i,legendItemName:r})}legendItemDoubleClick(e,t,i,r,s){this.listeners.dispatch("legend-item-double-click",{type:"legend-item-double-click",series:e,itemId:t,enabled:i,legendItemName:s,numVisibleItems:r})}axisHover(e,t){this.listeners.dispatch("axis-hover",{type:"axis-hover",axisId:e,direction:t})}},Cv=class e{constructor(e){this.defaultActions=[],this.disabledActions=new Set,this.hiddenActions=new Set,this.listeners=new yw;let{Default:t,ContextMenu:i}=Ce;this.destroyFns=[e.listenAll("contextmenu",e=>this.onContextMenu(e),t|i)]}destroy(){this.destroyFns.forEach(e=>e())}onContextMenu(t){"all"===e.toContextType(t.region)&&this.dispatchContext("all",t,{})}static toContextType(e){return"legend"===e||"series"===e?e:"all"}static check(e,t){return t.type===e}static checkCallback(e,t,i){return e===t}dispatchContext(e,t,i,r){let{sourceEvent:s}=t,a=r?.x??t.offsetX,o=r?.y??t.offsetY;this.listeners.dispatch("",Ci({type:e,x:a,y:o,context:i,sourceEvent:s}))}addListener(e){return this.listeners.addListener("",e)}filterActions(e){return this.defaultActions.filter(t=>t.id&&!this.hiddenActions.has(t.id)&&["all",e].includes(t.type))}registerDefaultAction(e){let t=null!=e.id&&!this.defaultActions.some(({id:t})=>t===e.id);return t&&this.defaultActions.push(e),()=>{let i=t?this.defaultActions.findIndex(({id:t})=>t===e.id):-1;-1!==i&&this.defaultActions.splice(i,1)}}enableAction(e){this.disabledActions.delete(e)}disableAction(e){this.disabledActions.add(e)}setActionVisiblity(e,t){t?this.hiddenActions.delete(e):this.hiddenActions.add(e)}isDisabled(e){return this.disabledActions.has(e)}},Cy=class extends Map{constructor(e,t){super(),this.defaultValue=e,this.defaultState=t}set(e,t){return this.delete(e),void 0!==t&&super.set(e,t),this}stateId(){return Array.from(this.keys()).pop()??this.defaultState}stateValue(){return Array.from(this.values()).pop()??this.defaultValue}},CC=((R=CC||{}).Auto="auto",R.Default="default",R.Grab="grab",R.Grabbing="grabbing",R.Move="move",R.NotAllowed="not-allowed",R.Pointer="pointer",R.EWResize="ew-resize",R.NSResize="ns-resize",R.ZoomIn="zoom-in",R.ZoomOut="zoom-out",R),Cw=class{constructor(e){this.domManager=e,this.stateTracker=new Cy("default")}updateCursor(e,t){this.stateTracker.set(e,t),this.domManager.updateCursor(this.stateTracker.stateValue())}getCursor(){return this.domManager.getCursor()}};function Cb(e,t){return Math.sqrt(function(e,t){let i=e.screenX-t.screenX,r=e.screenY-t.screenY;return i*i+r*r}(e,t))}var CS=class extends yb{constructor(e){super(),this.domManager=e,this.touchstart=e=>this.onTouchStart(e),this.touchmove=e=>this.onTouchMove(e),this.touchend=e=>this.onTouchEnd(e),this.touchcancel=e=>this.onTouchCancel(e),this.pinch={finger1:{identifier:NaN,screenX:NaN,screenY:NaN},finger2:{identifier:NaN,screenX:NaN,screenY:NaN},origin:{x:NaN,y:NaN},distance:NaN,status:0},this.domManager.addEventListener("touchstart",this.touchstart,{passive:!0}),this.domManager.addEventListener("touchmove",this.touchmove,{passive:!1}),this.domManager.addEventListener("touchend",this.touchend),this.domManager.addEventListener("touchcancel",this.touchcancel)}destroy(){this.domManager.removeEventListener("touchstart",this.touchstart),this.domManager.removeEventListener("touchmove",this.touchmove),this.domManager.removeEventListener("touchend",this.touchend),this.domManager.removeEventListener("touchcancel",this.touchcancel)}findPinchTouches(e){let{touches:t}=e,{finger1:i,finger2:r}=this.pinch;if(0!==this.pinch.status&&2===t.length){if(t[0].identifier===i.identifier&&t[1].identifier===r.identifier)return[t[0],t[1]];if(t[0].identifier===r.identifier&&t[1].identifier===i.identifier)return[t[1],t[0]]}}copyTouchData(e){let t=["identifier","screenX","screenY"];p_(t,this.pinch.finger1,e.touches[0]),p_(t,this.pinch.finger2,e.touches[1]),this.pinch.distance=Cb(this.pinch.finger1,this.pinch.finger2)}dispatchPinchEvent(e,t,i){let{finger1:r,finger2:s,origin:a}=this.pinch;this.listeners.dispatch(e,Ci({sourceEvent:i,type:e,finger1:r,finger2:s,deltaDistance:t,origin:a}))}onTouchStart(e){this.stopPinchTracking(e);let{pinch:t}=this;2===e.touches.length&&(t.status=1,this.copyTouchData(e),t.origin.x=(e.touches[0].clientX+e.touches[1].clientX)/2,t.origin.y=(e.touches[0].clientY+e.touches[1].clientY)/2)}onTouchMove(e){let t=this.findPinchTouches(e);if(void 0!==t){let[i,r]=t,{pinch:s}=this,a=Cb(i,r),o=a-s.distance;1===s.status?Math.abs(o)>1&&(s.status=2,this.copyTouchData(e),this.dispatchPinchEvent("pinch-start",0,e)):2===s.status?(s.distance=a,this.copyTouchData(e),this.dispatchPinchEvent("pinch-move",o,e)):ul.error(`unexpected pinch.status: ${s.status}`)}}onTouchEnd(e){this.stopPinchTracking(e)}onTouchCancel(e){this.stopPinchTracking(e)}stopPinchTracking(e){let{pinch:t}=this;2===t.status&&this.dispatchPinchEvent("pinch-end",0,e),this.pinch.status=0}},Cx=class extends yb{constructor(){super(...arguments),this.highlightStates=new Cy}updateHighlight(e,t){let{activeHighlight:i}=this;this.highlightStates.set(e,t),this.activeHighlight=this.highlightStates.stateValue(),this.isEqual(this.activeHighlight,i)||this.listeners.dispatch("highlight-change",{type:"highlight-change",currentHighlight:this.activeHighlight,previousHighlight:i,callerId:e})}getActiveHighlight(){return this.activeHighlight}isEqual(e,t){return e===t||null!=e&&null!=t&&e?.series===t?.series&&e?.itemId===t?.itemId&&e?.datum===t?.datum}},CM=class extends Ct{constructor(e){super(),this.interactionManager=e,this.hasBrowserFocus=!1,this.isMouseBlurred=!1,this.isClicking=!1,this.destroyFns.push(e.addListener("drag-start",e=>this.onClickStart(e),31),e.addListener("click",e=>this.onClickStop(e),31),e.addListener("drag-end",e=>this.onClickStop(e),31),e.addListener("contextmenu",e=>this.onClickStop(e),31),e.addListener("wheel",e=>this.mouseBlur(e)),e.addListener("hover",e=>this.mouseBlur(e)),e.addListener("drag",e=>this.mouseBlur(e)),e.addListener("blur",e=>this.onBlur(e),31),e.addListener("focus",e=>this.onFocus(e),31),e.addListener("keydown",e=>this.onKeyDown(e),31))}getState(){return this.interactionManager.getState()}destroy(){super.destroy()}onClickStart(e){this.isClicking=!0,this.mouseBlur(e)}onClickStop(e){this.mouseBlur(e),this.isClicking=!1}mouseBlur(e){this.hasBrowserFocus&&!this.isMouseBlurred&&(this.dispatch("blur",0,e),this.isMouseBlurred=!0)}onBlur(e){this.hasBrowserFocus=!1,this.isMouseBlurred=!1,this.dispatch("blur",0,e)}onFocus(e){if(this.hasBrowserFocus=!0,this.isClicking){this.isMouseBlurred=!0;return}this.dispatch("focus",0,e)}onKeyDown(e){if(!this.hasBrowserFocus)return;this.isMouseBlurred=!1;let{code:t,altKey:i,shiftKey:r,metaKey:s,ctrlKey:a}=e.sourceEvent;if(!i&&!r&&!s&&!a){switch(t){case"ArrowDown":return this.dispatch("nav-vert",1,e);case"ArrowUp":return this.dispatch("nav-vert",-1,e);case"ArrowLeft":return this.dispatch("nav-hori",-1,e);case"ArrowRight":return this.dispatch("nav-hori",1,e);case"ZoomIn":case"Add":return this.dispatch("nav-zoom",1,e);case"ZoomOut":case"Substract":return this.dispatch("nav-zoom",-1,e);case"Space":case"Enter":return this.dispatch("submit",0,e);case"Escape":return this.dispatch("cancel",0,e);case"Backspace":case"Delete":return this.dispatch("delete",0,e)}switch(e.sourceEvent.key){case"+":return this.dispatch("nav-zoom",1,e);case"-":return this.dispatch("nav-zoom",-1,e)}}}dispatch(e,t,i){Cr(this.listeners,{type:e,delta:t,sourceEvent:i})}},CE=((L=CE||{}).TITLE="title",L.SUBTITLE="subtitle",L.FOOTNOTE="footnote",L.LEGEND="legend",L.NAVIGATOR="navigator",L.PAGINATION="pagination",L.ROOT="root",L.SERIES="series",L.HORIZONTAL_AXES="horizontal-axes",L.VERTICAL_AXES="vertical-axes",L.TOOLBAR="toolbar",L),CD=class{constructor(e,t){this.node=e,this.overrideId=t}get id(){return this.overrideId??this.node.id}get visible(){return this.node.visible}toCanvasBBox(){return mq.toCanvas(this.node)}fromCanvasPoint(e,t){return mq.fromCanvasPoint(this.node,e,t)}},CI=class extends CD{constructor(e,t,i){super(e,i),this.bboxFn=t}toCanvasBBox(){return this.bboxFn()}},Ck=class extends yw{};function CT(e,t,i,r,s=16){return e?.addListener(i,e=>{t.getState()&s&&r(e)})??(()=>{})}function CA(e){return e instanceof pe?new CD(e):e instanceof CD?e:new CD(e.node,e.id)}var CR=class{constructor(e,t){this.interactionManager=e,this.focusIndicator=t,this.debug=fn.create(!0,"region"),this.isDragging=!1,this.leftCanvas=!1,this.regions=new Map,this.destroyFns=[],this.allRegionsListeners=new Ck,this.destroyFns.push(...Cs.map(t=>e.addListener(t,this.processPointerEvent.bind(this),31)))}destroy(){for(let e of(this.destroyFns.forEach(e=>e()),this.current=void 0,this.regions.values()))e.listeners.destroy();this.focusIndicator.destroy(),this.regions.clear()}addRegion(e,...t){if(this.regions.has(e))throw Error(`AG Charts - Region: ${e} already exists`);let i={properties:{name:e,bboxproviders:t.map(CA)},listeners:new Ck};return this.regions.set(e,i),this.makeObserver(i)}updateRegion(e,...t){let i=this.regions.get(e);if(i)i.properties.bboxproviders=t.map(CA);else throw Error("AG Charts - unknown region: "+e)}getRegion(e){return this.makeObserver(this.regions.get(e))}listenAll(e,t,i=16){return CT(this.allRegionsListeners,this.interactionManager,e,t,i)}makeObserver(e){let{interactionManager:t}=this;class i{addListener(i,r,s=16){return CT(e?.listeners,t,i,r,s)}}return new i}checkPointerHistory(e,t){for(let i of t.pointerHistory){let{region:t}=this.pickRegion(i.offsetX,i.offsetY)??{};if(e.properties.name!==t?.properties.name)return!1}return!0}dispatch(e,t){if(null==e)return;let i=e.region.properties.bboxproviders[0],r=0,s=0;if("offsetX"in t&&"offsetY"in t)({x:r,y:s}=i.fromCanvasPoint(t.offsetX,t.offsetY));else{let e=i.toCanvasBBox();r=e.width/2,s=e.height/2}let a=Ci({...t,region:e.region.properties.name,bboxProviderId:e.bboxProvider?.id,regionOffsetX:r,regionOffsetY:s});this.debug("Dispatching region event: ",a),this.allRegionsListeners.dispatch(a.type,a),e.region.listeners.dispatch(a.type,a)}handleDragging(e){let{current:t}=this;switch(e.type){case"drag-start":this.isDragging=!0,this.leftCanvas=!1;break;case"leave":return this.leftCanvas=!0,this.isDragging;case"enter":return this.leftCanvas=!1,this.isDragging;case"drag":if(this.isDragging)return this.dispatch(t,e),!0;break;case"drag-end":if(this.isDragging)return this.isDragging=!1,this.dispatch(t,e),this.leftCanvas&&this.dispatch(t,{...e,type:"leave"}),!0}return!1}processPointerEvent(e){if(this.handleDragging(e))return;let{current:t}=this;if("leave"===e.type){this.dispatch(t,{...e,type:"leave"}),this.current=void 0;return}let i=this.pickRegion(e.offsetX,e.offsetY),r=i?.region;void 0!==t&&r?.properties.name!==t.region.properties.name&&this.dispatch(t,{...e,type:"leave"}),void 0!==r&&r.properties.name!==t?.region.properties.name&&this.dispatch(i,{...e,type:"enter"}),void 0!==r&&this.checkPointerHistory(r,e)&&this.dispatch(i,e),this.current=i}pickRegion(e,t){let i,r,s=1/0;for(let a of this.regions.values())for(let o of a.properties.bboxproviders){if(!1===o.visible)continue;let n=o.toCanvasBBox(),l=n.width*n.height;l<s&&n.containsPoint(e,t)&&(s=l,i=a,r=o)}return i?{region:i,bboxProvider:r}:void 0}},CL=["start","center","end"],CP=["seriesType","annotations","annotationOptions","ranges","zoom"],CF={seriesType:0,annotations:1,annotationOptions:2,ranges:3,zoom:4},CN=((P=CN||{}).Top="top",P.Left="left",P.Right="right",P.Bottom="bottom",P.Floating="floating",P.FloatingTop="floating-top",P.FloatingBottom="floating-bottom",P),CO=Object.values(CN);function CB(e){return["floating-top","floating-bottom"].includes(e)}var CG=class extends yb{static isGroup(e,t){return t.group===e}static isChildElement(e,t){for(let i of CO)if(e.isManagedChildDOMElement(t,"canvas-overlay",`toolbar-${i}`))return!0;return!1}pressButton(e,t,i,r,s){this.listeners.dispatch("button-pressed",{type:"button-pressed",group:e,id:t,value:i,rect:r,sourceEvent:s})}cancel(e){this.listeners.dispatch("cancelled",{type:"cancelled",group:e})}toggleButton(e,t,i){let{active:r=!1,enabled:s=!0,visible:a=!0,checked:o=!1}=i;this.listeners.dispatch("button-toggled",{type:"button-toggled",group:e,id:t,active:r,enabled:s,visible:a,checked:o})}updateButton(e,t,i){this.listeners.dispatch("button-updated",{type:"button-updated",group:e,id:t,...i})}toggleGroup(e,t,i){let{active:r,visible:s}=i;this.listeners.dispatch("group-toggled",{type:"group-toggled",caller:e,group:t,active:r,visible:s})}updateGroup(e){this.listeners.dispatch("group-updated",{type:"group-updated",group:e})}groupMoved(e){this.listeners.dispatch("group-moved",{type:"group-moved",group:e})}changeFloatingAnchor(e,t){this.listeners.dispatch("floating-anchor-changed",{type:"floating-anchor-changed",group:e,anchor:t})}buttonMoved(e,t,i,r){this.listeners.dispatch("button-moved",{type:"button-moved",group:e,value:t,rect:i,groupRect:r})}proxyGroupOptions(e,t,i){this.listeners.dispatch("proxy-group-options",{type:"proxy-group-options",caller:e,group:t,options:i})}},Cz=class{constructor(e,t){this.domManager=e,this.tooltip=t,this.stateTracker=new Cy,this.suppressState=new Cy(!1),this.appliedState=null,t.setup(e),e.addListener("hidden",()=>this.tooltip.toggle(!1))}updateTooltip(e,t,i){this.tooltip.enabled&&(i??(i=this.stateTracker.get(e)?.content),this.stateTracker.set(e,{content:i,meta:t}),this.applyStates())}removeTooltip(e){this.tooltip.enabled&&(this.stateTracker.delete(e),this.applyStates())}suppressTooltip(e){this.suppressState.set(e,!0)}unsuppressTooltip(e){this.suppressState.delete(e)}getTooltipMeta(e){return this.stateTracker.get(e)?.meta}destroy(){this.domManager.removeStyles("tooltip")}applyStates(){let e=this.stateTracker.stateId(),t=e?this.stateTracker.get(e):null;if(this.suppressState.stateValue()||t?.meta==null||t?.content==null){this.appliedState=null,this.tooltip.toggle(!1);return}let i=this.domManager.getBoundingClientRect(),r="extended"===this.tooltip.bounds?this.domManager.getOverlayClientRect():i;if(this.appliedState?.content===t?.content){let e=this.tooltip.isVisible();this.tooltip.show(r,i,t?.meta,null,e)}else this.tooltip.show(r,i,t?.meta,t?.content);this.appliedState=t}static makeTooltipMeta(e,t){let{offsetX:i,offsetY:r}=e,{tooltip:s}=t.series.properties,a={offsetX:i,offsetY:r,enableInteraction:s.interaction?.enabled??!1,lastPointerEvent:{type:e.type,offsetX:i,offsetY:r},showArrow:s.showArrow,position:{type:s.position.type,xOffset:s.position.xOffset,yOffset:s.position.yOffset}},o=t.yBar?.upperPoint??t.midPoint??t.series.datumMidPoint?.(t);if("node"===s.position.type&&o){let{x:e,y:i}=o,r=mq.toCanvasPoint(t.series.contentGroup,e,i);return{...a,offsetX:Math.round(r.x),offsetY:Math.round(r.y)}}return a}},C_=class extends yb{constructor(){super(...arguments),this.mementoOriginatorKey="zoom",this.axisZoomManagers=new Map,this.state=new Cy(void 0,"initial"),this.rejectCallbacks=new Map}addLayoutListeners(e){this.destroyFns.push(e.addListener("layout:complete",e=>{this.axes=e.axes}))}createMemento(){let e=this.getDefinedZoom();return{rangeX:this.getRangeDirection(e,"x"),rangeY:this.getRangeDirection(e,"y"),ratioX:{start:e.x.min,end:e.x.max},ratioY:{start:e.y.min,end:e.y.max}}}guardMemento(e){return pb(e)&&(null!=e.ratioX||null!=e.ratioY||null!=e.rangeX||null!=e.rangeY)}restoreMemento(e,t,i){this.listeners.dispatch("restore-zoom",{...i,type:"restore-zoom"})}updateAxes(e){let t=new Map(e.map(e=>[e.id,this.axisZoomManagers.get(e.id)]));for(let i of(this.axisZoomManagers.clear(),e))this.axisZoomManagers.set(i.id,t.get(i.id)??new CV(i));this.state.size>0&&e.length>0&&this.updateZoom(this.state.stateId(),this.state.stateValue())}updateZoom(e,t,i=!0,r){if(r&&this.rejectCallbacks.set(e,r),0===this.axisZoomManagers.size){let s=this.state.stateId();"initial"===s||s===e||i?(this.state.set(e,t),s!==e&&this.rejectCallbacks.get(s)?.(e)):r?.(s);return}this.state.set(e,t),this.axisZoomManagers.forEach(i=>{i.updateZoom(e,t?.[i.getDirection()])}),this.applyChanges(e)}updateAxisZoom(e,t,i){this.axisZoomManagers.get(t)?.updateZoom(e,i),this.applyChanges(e)}fireZoomPanStartEvent(e){this.listeners.dispatch("zoom-pan-start",{type:"zoom-pan-start",callerId:e})}getZoom(){let e,t;if(this.axisZoomManagers.forEach(i=>{"x"===i.getDirection()?e??(e=i.getZoom()):"y"===i.getDirection()&&(t??(t=i.getZoom()))}),e||t)return{x:e,y:t}}getAxisZoom(e){return this.axisZoomManagers.get(e)?.getZoom()??{min:0,max:1}}getAxisZooms(){let e={};for(let[t,i]of this.axisZoomManagers.entries())e[t]={direction:i.getDirection(),zoom:i.getZoom()};return e}applyChanges(e){if(!Array.from(this.axisZoomManagers.values(),e=>e.applyChanges()).some(Boolean))return;let t={};for(let[e,i]of this.axisZoomManagers.entries())t[e]=i.getZoom();this.listeners.dispatch("zoom-change",{type:"zoom-change",...this.getZoom(),axes:t,callerId:e})}getRangeDirection(e,t){for(let i of this.axes??[]){let r,s;if(i.direction!==t)continue;let a=i.scale.getDomain?.(),o=i.scale.convert?.(a?.at(0)),n=i.scale.convert?.(a?.at(-1));if(!pD(o)||!pD(n))return;if(o<=n){let a=n-o;r=i.scale.invert?.(0),s=i.scale.invert?.(o+a*e[t].max)}else{let a=o-n;r=i.scale.invert?.(o-a*e[t].min),s=i.scale.invert?.(0)}return{start:r,end:s}}}getDefinedZoom(){let e=this.getZoom();return{x:{min:e?.x?.min??0,max:e?.x?.max??1},y:{min:e?.y?.min??0,max:e?.y?.max??1}}}},CV=class{constructor(e){this.axis=e;let[t=0,i=1]=e.visibleRange;this.state=new Cy({min:t,max:i}),this.currentZoom=this.state.stateValue()}getDirection(){return this.axis.direction}updateZoom(e,t){this.state.set(e,t)}getZoom(){return fY(this.state.stateValue())}applyChanges(){let e=this.currentZoom;return this.currentZoom=this.state.stateValue(),e.min!==this.currentZoom.min||e.max!==this.currentZoom.max}},Cj=class{constructor(){this.groups={}}registerSeries({id:e,seriesGrouping:t,visible:i,type:r}){var s;t&&((s=this.groups)[r]??(s[r]={}),this.groups[r][e]={grouping:t,visible:i})}deregisterSeries({id:e,type:t}){this.groups[t]&&delete this.groups[t][e],this.groups[t]&&0===Object.keys(this.groups[t]).length&&delete this.groups[t]}getVisiblePeerGroupIndex({type:e,seriesGrouping:t,visible:i}){if(!t)return{visibleGroupCount:i?1:0,visibleSameStackCount:i?1:0,index:0};let r=new Set,s=new Set;for(let i of Object.values(this.groups[e]??{}))i.visible&&(r.add(i.grouping.groupIndex),i.grouping.groupIndex===t.groupIndex&&s.add(i.grouping.stackIndex));let a=Array.from(r);return a.sort((e,t)=>e-t),{visibleGroupCount:a.length,visibleSameStackCount:s.size,index:a.indexOf(t.groupIndex)}}},CH=((F=CH||{})[F.FULL=0]="FULL",F[F.UPDATE_DATA=1]="UPDATE_DATA",F[F.PROCESS_DATA=2]="PROCESS_DATA",F[F.PERFORM_LAYOUT=3]="PERFORM_LAYOUT",F[F.SERIES_UPDATE=4]="SERIES_UPDATE",F[F.PRE_SCENE_RENDER=5]="PRE_SCENE_RENDER",F[F.SCENE_RENDER=6]="SCENE_RENDER",F[F.NONE=7]="NONE",F),CU=class extends yw{constructor(e){super(),this.updateCallback=e}update(e=0,t){this.updateCallback(e,t)}dispatchUpdateComplete(e){this.dispatch("update-complete",{type:"update-complete",minRect:e?.minRect,minVisibleRect:e?.minVisibleRect})}dispatchPreDomUpdate(){this.dispatch("pre-dom-update",{type:"pre-dom-update"})}dispatchPreSceneRender(e){this.dispatch("pre-scene-render",{type:"pre-scene-render",...e})}},CW=class{constructor(e,t){this.callbackCache=new y6,this.chartEventManager=new Cf,this.highlightManager=new Cx,this.layoutManager=new yu,this.localeManager=new yX,this.seriesStateManager=new Cj,this.stateManager=new yC,this.toolbarManager=new CG,this.zoomManager=new C_;let{scene:i,root:r,syncManager:s,container:a,updateCallback:o,updateMutex:n,pixelRatio:l}=t;this.chartService=e,this.syncManager=s,this.domManager=new yI(a);let h=this.domManager.addChild("canvas","scene-canvas",i?.canvas.element);this.scene=i??new y4({pixelRatio:l,canvasElement:h}),this.scene.setRoot(r),this.axisManager=new y8(r),this.annotationManager=new y5(e.annotationRoot),this.cursorManager=new Cw(this.domManager),this.interactionManager=new Cu(e.keyboard,this.domManager),this.keyNavManager=new CM(this.interactionManager),this.focusIndicator=new yH(this.domManager),this.regionManager=new CR(this.interactionManager,this.focusIndicator),this.contextMenuRegistry=new Cv(this.regionManager),this.gestureDetector=new CS(this.domManager),this.ariaAnnouncementService=new Cm(this.localeManager,this.domManager,this.layoutManager),this.updateService=new CU(o),this.proxyInteractionService=new yY(this.updateService,this.localeManager,this.domManager,this.focusIndicator),this.historyManager=new yv(this.domManager),this.animationManager=new Cg(this.interactionManager,n),this.dataService=new y7(this.animationManager),this.tooltipManager=new Cz(this.domManager,e.tooltip),this.zoomManager.addLayoutListeners(this.layoutManager)}destroy(){this.animationManager.destroy(),this.ariaAnnouncementService.destroy(),this.axisManager.destroy(),this.callbackCache.invalidateCache(),this.chartEventManager.destroy(),this.contextMenuRegistry.destroy(),this.domManager.destroy(),this.focusIndicator.destroy(),this.highlightManager.destroy(),this.interactionManager.destroy(),this.keyNavManager.destroy(),this.proxyInteractionService.destroy(),this.regionManager.destroy(),this.syncManager.destroy(),this.tooltipManager.destroy(),this.zoomManager.destroy()}},C$=class extends gd{constructor(){super(...arguments),this.range="tooltip"}};c7([gp(g4(["tooltip","node"],"a range"))],C$.prototype,"range",2);var CY=class e{constructor(){this.domain=new Set}static is(t){return t instanceof e}extend(e){this.domain.add(e)}getDomain(){return Array.from(this.domain)}},CK=class e{constructor(){this.domain=[1/0,-1/0]}static is(t){return t instanceof e}static extendDomain(e,t=[1/0,-1/0]){for(let i of e)"number"==typeof i&&(t[0]>i&&(t[0]=i),t[1]<i&&(t[1]=i));return t}extend(e){this.domain[0]>e&&(this.domain[0]=e),this.domain[1]<e&&(this.domain[1]=e)}getDomain(){return[...this.domain]}};function CZ(e){if(null==e)return[];let[t,i]=e.map(Number);return 0===t&&0===i?[0,1]:pD(t)&&pD(i)?[t,i]:[]}function Cq(e,t){return t?.get(e.id)??0}var CX=Symbol("invalid");function CQ(e){let t;let i=[],r=0,s=/((?:(?:^|\.)\s*\w+|\[\s*(?:'(?:[^']|\\')*'|"(?:[^"]|\\")*"|-?\d+)\s*\])\s*)/g;for(;t=s.exec(e);){if(t.index!==r)return;r=t.index+t[0].length;let e=t[1].trim();if(e.startsWith("."))i.push(e.slice(1).trim());else if(e.startsWith("[")){let t=e.slice(1,-1).trim();t.startsWith("'")?i.push(t.slice(1,-1).replace(/\\'/g,"'")):t.startsWith('"')?i.push(t.slice(1,-1).replace(/\\"/g,'"')):i.push(t)}else i.push(e)}if(r===e.length)return i}var CJ=class{constructor(e,t="standalone"){this.opts=e,this.mode=t,this.debug=fn.create(!0,"data-model"),this.scopeCache=new Map,this.keys=[],this.values=[],this.aggregates=[],this.groupProcessors=[],this.propertyProcessors=[],this.reducers=[],this.processors=[];let i=!0;for(let t of e.props){if("key"===t.type&&!i)throw Error("AG Charts - internal config error: keys must come before values.");"value"===t.type&&i&&(i=!1)}let r=({matchGroupIds:e=[]})=>{for(let t of e)if(this.values.every(e=>e.groupId!==t))throw Error(`AG Charts - internal config error: matchGroupIds properties must match defined groups (${t}).`)};for(let t of e.props)switch(t.type){case"key":this.keys.push({...t,index:this.keys.length,missing:new Map});break;case"value":if(null==t.property)throw Error(`AG Charts - internal config error: no properties specified for value definitions: ${JSON.stringify(t)}`);this.values.push({...t,index:this.values.length,missing:new Map});break;case"aggregate":r(t),this.aggregates.push({...t,index:this.aggregates.length});break;case"group-value-processor":r(t),this.groupProcessors.push({...t,index:this.groupProcessors.length});break;case"property-value-processor":this.propertyProcessors.push({...t,index:this.propertyProcessors.length});break;case"reducer":this.reducers.push({...t,index:this.reducers.length});break;case"processor":this.processors.push({...t,index:this.processors.length})}}resolveProcessedDataDefById(e,t){let i=this.scopeCache.get(e.id)?.get(t);if(!i)throw Error(`AG Charts - didn't find property definition for [${t}, ${e.id}]`);return{index:i.index,def:i}}resolveProcessedDataIndexById(e,t){return this.resolveProcessedDataDefById(e,t).index}resolveProcessedDataDefsByIds(e,t){return t.map(t=>[t,this.resolveProcessedDataDefById(e,t)])}resolveProcessedDataDefsValues(e,{keys:t,values:i}){let r={};for(let[s,{index:a,def:o}]of e){let e="key"===o.type?t:i;r[s]=e[a]}return r}getDomain(e,t,i="value",r){let s=this.getDomainsByType(i,r);return s?.[this.resolveProcessedDataIndexById(e,t)]??[]}getDomainsByType(e,t){switch(e){case"key":return t.domain.keys;case"value":return t.domain.values;case"aggregate":return t.domain.aggValues;case"group-value-processor":return t.domain.groups;default:return null}}processData(e,t){let{opts:{groupByKeys:i,groupByFn:r},aggregates:s,groupProcessors:a,reducers:o,processors:n,propertyProcessors:l}=this,h=performance.now();if(i&&0===this.keys.length)return;let d=this.extractData(e,t);if(i?d=this.groupData(d):r&&(d=this.groupData(d,r(d))),a.length>0&&this.postProcessGroups(d),s.length>0&&this.aggregateData(d),l.length>0&&this.postProcessProperties(d),o.length>0&&this.reduceData(d),n.length>0&&this.postProcessData(d),e.length>0){for(let t of uz(this.keys,this.values))for(let[i,r]of t.missing)if(r>=e.length){let e=null==i?"":` for ${i}`;ul.warnOnce(`the key '${t.property}' was not found in any data element${e}.`)}}let c=performance.now();for(let e of(d.time=c-h,this.debug.check()&&function(e){let t=(e,t)=>{t.length>0&&(ul.log(`DataModel.processData() - ${e}`),ul.table(t))};ul.log("DataModel.processData() - processedData",e),t("Key Domains",e.domain.keys),t("Group Domains",e.domain.groups??[]),t("Value Domains",e.domain.values),t("Aggregate Domains",e.domain.aggValues??[]),t("Values","grouped"===e.type?e.data.reduce((e,t)=>{let i=t.keys??[],r=t.aggValues??[],s=t.keys.map(()=>void 0),a=r?.map(()=>void 0);return e.push(...t.values.map((e,t)=>[...0===t?i:s,...e??[],...0==t?r:a])),e},[]):e.data.reduce((e,t)=>{let i=t.aggValues??[];return e.push([...t.keys,...t.values,...i]),e},[]))}(d),this.scopeCache.clear(),uz(this.keys,this.values,this.aggregates)))if(e.idsMap)for(let[t,i]of e.idsMap)for(let r of i)if(this.scopeCache.has(t)){if(this.scopeCache.get(t)?.has(r))throw Error("duplicate definition ids on the same scope are not allowed.");this.scopeCache.get(t).set(r,e)}else this.scopeCache.set(t,new Map([[r,e]]));return d}valueGroupIdxLookup({matchGroupIds:e}){let t=[];for(let[i,r]of this.values.entries())(!e||r.groupId&&e.includes(r.groupId))&&t.push(i);return t}valueIdxLookup(e,t){let i=null==e||0===e.length,r="string"==typeof t?t:t.id,s=t=>{if(t.idsMap){for(let[i,s]of t.idsMap)if(e?.includes(i)&&s.has(r))return!0}return!1},a=this.values.findIndex(t=>(null==t.scopes||i&&!t.scopes.length||t.scopes.some(t=>e?.includes(t)))&&(t.property===r||t.id===r||s(t)));if(-1===a)throw Error(`AG Charts - configuration error, unknown property ${JSON.stringify(t)} in scope(s) ${JSON.stringify(e)}`);return a}extractData(e,t){let{dataDomain:i,processValue:r,scopes:s,allScopesHaveSameDefs:a}=this.initDataDomainProcessor(),o=new Map(t?.map(e=>[e.id,e])),{keys:n,values:l}=this,h=Array(e.length),d=0,c=0;for(let[t,i]of e.entries()){let e,u;let p={},g=s.size>0?new Set(s):void 0,m=Array(n.length),f=0;for(let t of n){if((e=r(t,i,e))===CX)break;m&&(m[f++]=e)}if(e===CX)continue;let v=l.length>0?Array(l.length):void 0;for(let[e,n]of l.entries()){for(let a of n.scopes??s){let s=o.get(a);if((u=r(n,s?.data[t]??i,u,a))!==CX&&v){if(null!=s&&!1!==n.includeProperty){let e=n.includeProperty&&null!=n.id?n.id:n.property;p[a]??(p[a]={}),p[a][e]=u}v[e]=u}}if(u===CX){if(a)break;for(let e of n.scopes??s)g?.delete(e);if(g?.size===0)break}}if(u===CX&&a||g?.size===0)continue;let y={datum:{...i,...p},keys:m,values:v};!a&&g&&g.size<s.size&&(c++,y.validScopes=new Set(g)),h[d++]=y}h.length=d;let u=e=>{let t=i.get(e),r=t.getDomain();return CK.is(t)&&r[0]>r[1]?[]:r};return{type:"ungrouped",input:{count:e.length},data:h,domain:{keys:n.map(u),values:l.map(u)},defs:{allScopesHaveSameDefs:a,keys:n,values:l},partialValidDataCount:c,time:0}}groupData(e,t){let i=new Map;for(let r of e.data){let{keys:e,values:s,datum:a,validScopes:o}=r,n=t?.(r)??e,l=n.map(e=>pb(e)?JSON.stringify(e):e).join("-");if(i.has(l)){let e=i.get(l);if(e.values.push(s),e.datum.push(a),null!=o&&null!=e.validScopes)for(let t of e.validScopes)o.has(t)||e.validScopes.delete(t)}else i.set(l,{keys:n,values:[s],datum:[a],validScopes:o})}let r=Array(i.size),s=Array(i.size),a=0;for(let{keys:e,values:t,datum:o,validScopes:n}of i.values())n?.size!==0&&(s[a]=e,r[a++]={keys:e,values:t,datum:o,validScopes:n});return{...e,type:"grouped",data:r,domain:{...e.domain,groups:s}}}aggregateData(e){let t="ungrouped"===e.type;for(let[i,r]of(e.domain.aggValues=[],this.aggregates.entries())){let s=this.valueGroupIdxLookup(r),a=[1/0,-1/0];for(let o of e.data){if(o.aggValues??(o.aggValues=Array(this.aggregates.length)),o.validScopes)continue;let e=t?[o.values]:o.values,n=r.groupAggregateFunction?.()??[1/0,-1/0];for(let t of e){let e=s.map(e=>t[e]),i=r.aggregateFunction(e,o.keys);i&&(n=r.groupAggregateFunction?.(i,n)??CK.extendDomain(i,n))}let l=(r.finalFunction?.(n)??n).map(e=>Number.isInteger(e)?e:Math.abs(e)>1e4?Math.trunc(e):Math.round(1e4*e)/1e4);o.aggValues[i]=l,CK.extendDomain(l,a)}e.domain.aggValues.push(a)}}postProcessGroups(e){let{groupProcessors:t}=this,i=new Set,r=new Map,s=new Map,a=new Map;for(let e of t){let t=this.valueGroupIdxLookup(e);for(let o of(s.set(e,t),a.set(e,e.adjust()),t)){let e="category"===this.values[o].valueType;i.add(o),r.set(o,e?new CY:new CK)}}let o=e=>{for(let t of i)r.get(t)?.extend(e[t])};for(let i of e.data){for(let r of t){if(i.validScopes)continue;let t=s.get(r)??[],o=a.get(r)?.();if(o){if("grouped"===e.type)for(let e of i.values)e&&o(e,t);else i.values&&o(i.values,t)}}if("grouped"===e.type)for(let e of i.values)o(e);else o(i.values)}for(let[t,i]of r)e.domain.values[t]=i.getDomain()}postProcessProperties(e){for(let{adjust:t,property:i,scopes:r}of this.propertyProcessors)t()(e,this.valueIdxLookup(r,i))}reduceData(e){for(let t of(e.reduced??(e.reduced={}),this.reducers)){let i=t.reducer(),r=t.initialValue;for(let s of e.data)(!s.validScopes||t.scopes?.some(e=>s.validScopes?.has(e)))&&(r=i(r,s));e.reduced[t.property]=r}}postProcessData(e){for(let t of(e.reduced??(e.reduced={}),this.processors))e.reduced[t.property]=t.calculate(e)}initDataDomainProcessor(){let{keys:e,values:t}=this,i=new Set;for(let e of t)if(e.scopes)for(let t of e.scopes)i.add(t);let r=new Map,s=new Map,a=!0,o=()=>{for(let s of uz(e,t))"category"===s.valueType?r.set(s,new CY):(r.set(s,new CK),a&&(a=(s.scopes??[]).length===i.size))};o();let n=this.buildAccessors(uz(e,t));return{dataDomain:r,processValue:(e,t,i,a)=>{let l,h;if(n.has(e.property)){try{h=n.get(e.property)(t)}catch(e){}l=null!=h}else h=(l=e.property in t)?t[e.property]:e.missingValue;null!=e.forceValue&&(h=l&&uq(h)?-1*e.forceValue:e.forceValue,l=!0);let d="missingValue"in e;if(!l&&!d){let t=e.missing.get(a)??0;e.missing.set(a,t+1)}if(r.has(e)||o(),l&&e.validation?.(h,t)===!1){if(!("invalidValue"in e))return"integrated"!==this.mode&&ul.warnOnce(`invalid value of type [${typeof h}] for [${e.scopes} / ${e.id}] ignored:`,`[${h}]`),CX;h=e.invalidValue}return e.processor&&(s.has(e)||s.set(e,e.processor()),h=s.get(e)?.(h,i===CX?void 0:i)),r.get(e)?.extend(h),h},initDataDomain:o,scopes:i,allScopesHaveSameDefs:a}}buildAccessors(e){let t=new Map;if("integrated"===this.mode)return t;for(let i of e){if(!(i.property.includes(".")||i.property.includes("[")))continue;let e=CQ(i.property);if(null==e){ul.warnOnce("Invalid property path [%s]",i.property);continue}let r=function(e){return t=>{let i=t;for(let t of e)i=i[t];return i}}(e);t.set(i.property,r)}return t}},C0=class e{constructor(e){this.mode=e,this.debug=fn.create(!0,"data-model"),this.requested=[],this.status="setup"}async request(e,t,i){if("setup"!==this.status)throw Error("AG Charts - data request after data setup phase.");return new Promise((r,s)=>{this.requested.push({id:e,opts:i,data:t,resolve:r,reject:s})})}execute(){if("setup"!==this.status)throw Error("AG Charts - data request after data setup phase.");this.status="executed",this.debug("DataController.execute() - requested",this.requested);let e=this.validateRequests(this.requested);this.debug("DataController.execute() - validated",e);let t=this.mergeRequested(e);this.debug("DataController.execute() - merged",t),this.debug.check()&&(m6().processedData=[]);let i=this.requested.map(({id:e})=>e),r=this.hasMultipleDataSources(e);for(let{opts:s,data:a,resolves:o,rejects:n,ids:l}of t)try{let t=new CJ(s,this.mode),h=t.processData(a,e);this.debug.check()&&m6("processedData").push(h),h?.partialValidDataCount===0?o.forEach((e,s)=>e({dataModel:t,processedData:this.processScopedData(l[s],h,i,r)})):h?this.splitResult(t,h,l,o):n.forEach(e=>e(Error("AG Charts - no processed data generated")))}catch(e){n.forEach(t=>t(e))}}hasMultipleDataSources(e){if(e.length){let[{data:t},...i]=e;return i.some(e=>t!==e.data)}return!1}processScopedData(e,t,i,r){let s=t=>{if(Array.isArray(t))return t.map(s);let a=r?{...t,...t[e]}:t;for(let e of i)delete a[e];return a},a=t=>Array.isArray(t)?t.map(a):t?.[e]??t;return{...t,data:t.data.map(e=>({...e,datum:s(e.datum),values:r?e.values?.map(a):e.values}))}}validateRequests(e){let t=[];for(let[i,r]of e.entries())i>0&&r.data.length!==e[0].data.length&&!1===r.opts.groupByData?r.reject(Error("all series[].data arrays must be of the same length and have matching keys.")):t.push(r);return t}mergeRequested(t){let i=[];for(let r of t){let t=i.find(e.groupMatch(r));t?t.push(r):i.push([r])}return i.map(e.mergeRequests)}splitResult(e,t,i,r){for(let s=0;s<i.length;s++){let a=i[s];(0,r[s])({dataModel:e,processedData:{...t,data:t.data.filter(({validScopes:e})=>e?.has(a)??!0)}})}}static groupMatch({data:e,opts:t}){function i(e){return e.filter(e=>"key"===e.type).map(e=>e.property).join(";")}return([r])=>(!1===t.groupByData||r.data===e)&&r.opts.groupByKeys===t.groupByKeys&&r.opts.groupByFn===t.groupByFn&&i(r.opts.props)===i(t.props)}static mergeRequests(t){return t.reduce((t,{id:i,data:r,resolve:s,reject:a,opts:{props:o,...n}})=>{for(let l of(t.ids.push(i),t.rejects.push(a),t.resolves.push(s),t.data??(t.data=r),t.opts??(t.opts={...n,props:[]}),o)){let r={...l,scopes:[i]};e.createIdsMap(i,r);let s=t.opts.props.find(t=>t.type===r.type&&e.deepEqual(t,r));if(!s){t.opts.props.push(r);continue}s.scopes??(s.scopes=[]),s.scopes.push(...r.scopes??[]),("key"===s.type||"value"===s.type)&&r.idsMap?.size&&e.mergeIdsMap(r.idsMap,s.idsMap)}return t},{ids:[],rejects:[],resolves:[],data:null,opts:null})}static mergeIdsMap(e,t){for(let[i,r]of e){let e=t.get(i);if(null!=e)for(let t of r)e.add(t);else t.set(i,new Set(r))}}static createIdsMap(e,t){null!=t.id&&(t.idsMap??(t.idsMap=new Map),t.idsMap.has(e)?t.idsMap.get(e).add(t.id):t.idsMap.set(e,new Set([t.id])))}static deepEqual(t,i){if(t===i)return!0;if(t&&i&&"object"==typeof t&&"object"==typeof i){let r,s;if(t.constructor!==i.constructor)return!1;if(Array.isArray(t)){if((s=t.length)!==i.length)return!1;for(r=s-1;r>=0;r--)if(!e.deepEqual(t[r],i[r]))return!1;return!0}let a=Object.keys(t);if((s=a.length)!==Object.keys(i).length)return!1;for(r=s-1;r>=0;r--){let s=a[r];if(!e.skipKeys.has(s)&&(!Object.hasOwn(i,s)||!e.deepEqual(t[s],i[s])))return!1}return!0}return!1}};C0.skipKeys=new Set(["id","idsMap","type","scopes"]);var C1=new class{constructor(){this.axesMap=new Map,this.hidden=new Set,this.themeTemplates=new Map}register(e,t){this.axesMap.set(e,t.moduleFactory),t.themeTemplate&&this.setThemeTemplate(e,t.themeTemplate),t.hidden&&this.hidden.add(e)}create(e,t){let i=this.axesMap.get(e);if(i)return i(t);throw Error(`AG Charts - unknown axis type: ${e}`)}has(e){return this.axesMap.has(e)}keys(){return this.axesMap.keys()}publicKeys(){return[...this.keys()].filter(e=>!this.hidden.has(e))}setThemeTemplate(e,t){return this.themeTemplates.set(e,t),this}getThemeTemplate(e){return this.themeTemplates.get(e)}},C2=[{type:"root",optionsKey:"animation",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","gauge"]},{type:"root",optionsKey:"annotations",chartTypes:["cartesian"]},{type:"root",optionsKey:"background",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","gauge"],optionsInnerKey:"image"},{type:"root",optionsKey:"foreground",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","gauge"],optionsInnerKey:"image"},{type:"root",optionsKey:"chartToolbar",chartTypes:["cartesian"]},{type:"root",optionsKey:"contextMenu",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","gauge"]},{type:"root",optionsKey:"statusBar",chartTypes:["cartesian"],identifier:"status-bar"},{type:"root",optionsKey:"dataSource",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","gauge"]},{type:"root",optionsKey:"sync",chartTypes:["cartesian"]},{type:"root",optionsKey:"zoom",chartTypes:["cartesian","topology"]},{type:"legend",optionsKey:"gradientLegend",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","gauge"],identifier:"gradient"},{type:"root",optionsKey:"navigator",chartTypes:["cartesian"],optionsInnerKey:"miniChart"},{type:"axis",optionsKey:"axes[]",chartTypes:["polar"],identifier:"angle-category"},{type:"axis",optionsKey:"axes[]",chartTypes:["polar"],identifier:"angle-number"},{type:"axis",optionsKey:"axes[]",chartTypes:["polar"],identifier:"radius-category"},{type:"axis",optionsKey:"axes[]",chartTypes:["polar"],identifier:"radius-number"},{type:"axis",optionsKey:"axes[]",chartTypes:["cartesian"],identifier:"ordinal-time"},{type:"axis-option",optionsKey:"crosshair",chartTypes:["cartesian"]},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"box-plot"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"candlestick"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"ohlc"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"bullet"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"heatmap"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"range-area"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"range-bar"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"waterfall"},{type:"series",optionsKey:"series[]",chartTypes:["polar"],identifier:"nightingale"},{type:"series",optionsKey:"series[]",chartTypes:["polar"],identifier:"radar-area"},{type:"series",optionsKey:"series[]",chartTypes:["polar"],identifier:"radar-line"},{type:"series",optionsKey:"series[]",chartTypes:["polar"],identifier:"radial-bar"},{type:"series",optionsKey:"series[]",chartTypes:["polar"],identifier:"radial-column"},{type:"series",optionsKey:"series[]",chartTypes:["hierarchy"],identifier:"sunburst"},{type:"series",optionsKey:"series[]",chartTypes:["hierarchy"],identifier:"treemap"},{type:"series",optionsKey:"series[]",chartTypes:["topology"],identifier:"map-shape"},{type:"series",optionsKey:"series[]",chartTypes:["topology"],identifier:"map-line"},{type:"series",optionsKey:"series[]",chartTypes:["topology"],identifier:"map-marker"},{type:"series",optionsKey:"series[]",chartTypes:["topology"],identifier:"map-shape-background"},{type:"series",optionsKey:"series[]",chartTypes:["topology"],identifier:"map-line-background"},{type:"series",optionsKey:"series[]",chartTypes:["flow-proportion"],identifier:"chord"},{type:"series",optionsKey:"series[]",chartTypes:["flow-proportion"],identifier:"sankey"},{type:"series",optionsKey:"series[]",chartTypes:["gauge"],identifier:"linear-gauge"},{type:"series",optionsKey:"series[]",chartTypes:["gauge"],identifier:"radial-gauge"},{type:"series-option",optionsKey:"errorBar",chartTypes:["cartesian"],identifier:"error-bars"}];function C3(e){return C2.find(t=>"series"===t.type&&t.identifier===e)?.chartTypes}var C4=new class{constructor(){this.legendMap=new Map,this.themeTemplates=new Map}register(e,{optionsKey:t,moduleFactory:i,themeTemplate:r}){this.legendMap.set(e,{optionsKey:t,moduleFactory:i}),this.themeTemplates.set(t,r)}create(e,t){let i=this.legendMap.get(e)?.moduleFactory;if(i)return i(t);throw Error(`AG Charts - unknown legend type: ${e}`)}getThemeTemplates(){return Object.fromEntries(this.themeTemplates)}getKeys(){return Array.from(this.legendMap.entries()).reduce((e,[t,i])=>(e[t]=i.optionsKey,e),{})}},C6=class extends Map{get(e){return super.get(e)??"unknown"}isCartesian(e){return"cartesian"===this.get(e)}isPolar(e){return"polar"===this.get(e)}isHierarchy(e){return"hierarchy"===this.get(e)}isTopology(e){return"topology"===this.get(e)}isFlowProportion(e){return"flow-proportion"===this.get(e)}isGauge(e){return"gauge"===this.get(e)}get seriesTypes(){return Array.from(this.keys())}get cartesianTypes(){return this.seriesTypes.filter(e=>this.isCartesian(e))}get polarTypes(){return this.seriesTypes.filter(e=>this.isPolar(e))}get hierarchyTypes(){return this.seriesTypes.filter(e=>this.isHierarchy(e))}get topologyTypes(){return this.seriesTypes.filter(e=>this.isTopology(e))}get flowProportionTypes(){return this.seriesTypes.filter(e=>this.isFlowProportion(e))}get gaugeTypes(){return this.seriesTypes.filter(e=>this.isGauge(e))}},C5=class extends Map{set(e,t){return super.set(e,pP(t,this.get(e)))}},C8=new C6,C7=new C6,C9=new C5,we=new class{constructor(){this.seriesMap=new Map,this.themeTemplates=new Map}register(e,{chartTypes:[t],moduleFactory:i,tooltipDefaults:r,defaultAxes:s,themeTemplate:a,paletteFactory:o,solo:n,stackable:l,groupable:h,stackedByDefault:d,swapDefaultAxesCondition:c,hidden:u}){this.setThemeTemplate(e,a),this.seriesMap.set(e,{moduleFactory:i,tooltipDefaults:r,defaultAxes:s,paletteFactory:o,solo:n,stackable:l,groupable:h,stackedByDefault:d,swapDefaultAxesCondition:c}),C8.set(e,t),u||C7.set(e,t)}create(e,t){let i=this.seriesMap.get(e)?.moduleFactory;if(i)return i(t);throw Error(`AG Charts - unknown series type: ${e}`)}cloneDefaultAxes(e){let t=this.seriesMap.get(e)?.defaultAxes;return t?{axes:fY(t)}:null}setThemeTemplate(e,t){let i=this.themeTemplates.get(e);this.themeTemplates.set(e,pP(t,i))}getThemeTemplate(e){return this.themeTemplates.get(e)}getPaletteFactory(e){return this.seriesMap.get(e)?.paletteFactory}getTooltipDefauls(e){return this.seriesMap.get(e)?.tooltipDefaults}isSolo(e){return this.seriesMap.get(e)?.solo??!1}isGroupable(e){return this.seriesMap.get(e)?.groupable??!1}isStackable(e){return this.seriesMap.get(e)?.stackable??!1}isStackedByDefault(e){return this.seriesMap.get(e)?.stackedByDefault??!1}isDefaultAxisSwapNeeded(e){let t;for(let i of e.series??[]){let{type:e="line"}=i,r=this.seriesMap.get(e)?.swapDefaultAxesCondition?.(i);if(null!=r){if(null!=t&&t!=r)throw Error("AG Charts - The provided series have incompatible directions");t=r}}return t}},wt=class e extends yb{constructor(e){super(),this.chart=e}subscribe(t=e.DEFAULT_GROUP){let i=this.get(t);return i||(i=new Set,e.chartsGroups.set(t,i)),i.add(this.chart),this}unsubscribe(t=e.DEFAULT_GROUP){return this.get(t)?.delete(this.chart),this}getChart(){return this.chart}getGroup(t=e.DEFAULT_GROUP){let i=this.get(t);return i?Array.from(i):[]}getGroupSiblings(t=e.DEFAULT_GROUP){return this.getGroup(t).filter(e=>e!==this.chart)}get(t){return e.chartsGroups.get(t)}};wt.chartsGroups=new Map,wt.DEFAULT_GROUP=Symbol("sync-group-default");var wi=class extends gd{constructor(){super(...arguments),this.enabled=!1}};c7([gp(gy)],wi.prototype,"enabled",2),c7([gp(gb)],wi.prototype,"tabIndex",2);var wr=["top","right","bottom","left"],ws=["direction","xKey","yKey","sizeKey","angleKey","radiusKey","normalizedTo"];function wa(e){return e.series?.[0]?.type??"line"}function wo(e){let t=wa(e);return null==t||("cartesian"===t?(ul.warnOnce(`type '${t}' is deprecated, use a series type instead`),!0):C8.isCartesian(t)||"cartesian"===C3(t)?.find(e=>"cartesian"===e))}function wn(e){let t=wa(e);return null!=t&&("polar"===t?(ul.warnOnce(`type '${t}' is deprecated, use a series type instead`),!0):C8.isPolar(t)||"polar"===C3(t)?.find(e=>"polar"===e))}function wl(e){let t=wa(e);return null!=t&&("hierarchy"===t?(ul.warnOnce(`type '${t}' is deprecated, use a series type instead`),!0):C8.isHierarchy(t)||"hierarchy"===C3(t)?.find(e=>"hierarchy"===e))}function wh(e){let t=wa(e);return null!=t&&("topology"===t?(ul.warnOnce(`type '${t}' is deprecated, use a series type instead`),!0):C8.isTopology(t)||"topology"===C3(t)?.find(e=>"topology"===e))}function wd(e){let t=wa(e);return null!=t&&("flow-proportion"===t?(ul.warnOnce(`type '${t}' is deprecated, use a series type instead`),!0):C8.isFlowProportion(t)||"flow-proportion"===C3(t)?.find(e=>"flow-proportion"===e))}function wc(e){let t=wa(e);return null!=t&&("gauge"===t?(ul.warnOnce(`type '${t}' is deprecated, use a series type instead`),!0):C8.isGauge(t)||"gauge"===C3(t)?.find(e=>"gauge"===e))}var wu=class extends mi{applyOptions(e){for(let t of this.moduleMap.values())t.module.optionsKey in e&&gu(t.moduleInstance)&&t.moduleInstance.set(e[t.module.optionsKey])}*legends(){for(let{module:e,moduleInstance:t}of this.moduleMap.values())"legend"===e.type&&(yield{legendType:e.identifier,legend:t})}},wp="ag-chart-overlay",wg="ag-chart-dark-overlay",wm=class extends gd{constructor(e,t){super(),this.className=e,this.defaultMessageId=t}getText(e){return e.t(this.text??this.defaultMessageId)}getElement(e,t,i){if(this.content?.remove(),this.focusBox=i,this.renderer){let e=this.renderer();if(e instanceof HTMLElement)this.content=e;else{let t=m5("div");t.innerHTML=e,this.content=t.firstElementChild}}else{let i=m5("div",{display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",height:"100%",margin:"8px",font:"12px Verdana, sans-serif"});i.innerText=this.getText(t),this.content=i,e?.animate({from:0,to:1,id:"overlay",phase:"add",groupId:"opacity",onUpdate(e){i.style.opacity=String(e)},onStop(){i.style.opacity="1"}})}return this.content}removeElement(e=()=>this.content?.remove(),t){if(this.content){if(t){let{content:i}=this;t.animate({from:1,to:0,phase:"remove",id:"overlay",groupId:"opacity",onUpdate(e){i.style.opacity=String(e)},onStop(){e?.()}})}else e?.();this.content=void 0,this.focusBox=void 0}}};c7([gp(gw,{optional:!0})],wm.prototype,"text",2),c7([gp(gC,{optional:!0})],wm.prototype,"renderer",2);var wf=class extends gd{constructor(){super(...arguments),this.darkTheme=!1,this.loading=new wm("ag-chart-loading-overlay","overlayLoadingData"),this.noData=new wm("ag-chart-no-data-overlay","overlayNoData"),this.noVisibleSeries=new wm("ag-chart-no-visible-series","overlayNoVisibleSeries")}getFocusInfo(e){for(let t of[this.loading,this.noData,this.noVisibleSeries])if(void 0!==t.focusBox)return{text:t.getText(e),rect:t.focusBox}}destroy(){this.loading.removeElement(),this.noData.removeElement(),this.noVisibleSeries.removeElement()}};c7([gp(gy)],wf.prototype,"darkTheme",2),c7([gp(gf)],wf.prototype,"loading",2),c7([gp(gf)],wf.prototype,"noData",2),c7([gp(gf)],wf.prototype,"noVisibleSeries",2);var wv=((N=wv||{})[N.EXACT_SHAPE_MATCH=0]="EXACT_SHAPE_MATCH",N[N.NEAREST_BY_MAIN_AXIS_FIRST=1]="NEAREST_BY_MAIN_AXIS_FIRST",N[N.NEAREST_BY_MAIN_CATEGORY_AXIS_FIRST=2]="NEAREST_BY_MAIN_CATEGORY_AXIS_FIRST",N[N.NEAREST_NODE=3]="NEAREST_NODE",N),wy=class{constructor(e,t,{datum:i},r){this.type=e,this.event=t,this.datum=i,this.seriesId=r.id}},wC=class{constructor(e,t,i){this.series=e,this.seriesGrouping=t,this.oldGrouping=i,this.type="groupingChanged"}},ww=class extends yo{constructor(e){super(),this.destroyFns=[],this.seriesGrouping=void 0,this.NodeEvent=wy,this.internalId=uB(this),this.rootGroup=new mQ({name:"seriesRoot",isVirtual:!0}),this.axes={x:void 0,y:void 0},this.directions=["x","y"],this.nodeDataRefresh=!0,this.moduleMap=new mi,this._declarationOrder=-1,this.seriesListeners=new yw,this._pickNodeCache=new fP;let{moduleCtx:t,pickModes:i=[1],directionKeys:r={},directionNames:s={},contentGroupVirtual:a=!0,canHaveAxes:o=!1}=e;this.ctx=t,this.directionKeys=r,this.directionNames=s,this.canHaveAxes=o,this.contentGroup=this.rootGroup.appendChild(new m1({name:`${this.internalId}-content`,isVirtual:a,zIndex:4,zIndexSubOrder:this.getGroupZIndexSubOrder("data")})),this.highlightGroup=new m1({name:`${this.internalId}-highlight`,isVirtual:a,zIndex:4,zIndexSubOrder:this.getGroupZIndexSubOrder("highlight")}),this.highlightNode=this.highlightGroup.appendChild(new mQ({name:"highlightNode",zIndex:0})),this.highlightLabel=this.highlightGroup.appendChild(new mQ({name:"highlightLabel",zIndex:10})),this.pickModes=i,this.labelGroup=this.rootGroup.appendChild(new m1({name:`${this.internalId}-series-labels`,zIndex:9})),this.annotationGroup=new mQ({name:`${this.id}-annotation`,isVirtual:a,zIndex:4,zIndexSubOrder:this.getGroupZIndexSubOrder("annotation")})}get id(){return this.properties?.id??this.internalId}get type(){return this.constructor.type??""}get data(){return this._data??this._chartData}set visible(e){this.properties.visible=e,this.visibleMaybeChanged()}get visible(){return this.properties.visible}get hasData(){return null!=this.data&&this.data.length>0}get tooltipEnabled(){return this.properties.tooltip?.enabled??!1}onDataChange(){this.nodeDataRefresh=!0,this._pickNodeCache.clear()}setOptionsData(e){this._data=e,this.onDataChange()}setChartData(e){this._chartData=e,this.data===e&&this.onDataChange()}onSeriesGroupingChange(e,t){let{internalId:i,type:r,visible:s}=this;e&&this.ctx.seriesStateManager.deregisterSeries({id:i,type:r}),t&&this.ctx.seriesStateManager.registerSeries({id:i,type:r,visible:s,seriesGrouping:t}),this.fireEvent(new wC(this,t,e))}getBandScalePadding(){return{inner:1,outer:0}}getGroupZIndexSubOrder(e,t=0){let i=0;switch(e){case"data":case"paths":break;case"labels":i+=2e4;break;case"marker":i+=1e4;break;case"highlight":t+=15e3;break;case"annotation":i+=15e3}return[()=>this._declarationOrder+i,t]}addListener(e,t){return this.seriesListeners.addListener(e,t)}dispatch(e,t){this.seriesListeners.dispatch(e,t)}addChartEventListeners(){}destroy(){this.destroyFns.forEach(e=>e()),this.destroyFns=[],this.ctx.seriesStateManager.deregisterSeries(this)}getDirectionValues(e,t){let i=this.resolveKeyDirection(e),r=t?.[i],s=[];if(!r)return s;let a=(...e)=>{for(let t of e)Array.isArray(t)?a(...t):"object"==typeof t?a(...Object.values(t)):s.push(t)};return a(...r.map(e=>this.properties[e])),s}getKeys(e){return this.getDirectionValues(e,this.directionKeys)}getKeyProperties(e){return this.directionKeys[this.resolveKeyDirection(e)]??[]}getNames(e){return this.getDirectionValues(e,this.directionNames)}resolveKeyDirection(e){return e}getDomain(e){let t=this.getSeriesDomain(e),i=this.moduleMap.mapModules(t=>t.getDomain(e));return t.concat(i.flat())}markNodeDataDirty(){this.nodeDataRefresh=!0,this._pickNodeCache.clear(),this.visibleMaybeChanged()}visibleMaybeChanged(){this.ctx.seriesStateManager.registerSeries(this)}getOpacity(){let{dimOpacity:e=1,enabled:t=!0}=this.properties.highlightStyle.series;if(!t||1===e)return 1;switch(this.isItemIdHighlighted()){case 0:case 1:return 1;default:return e}}getStrokeWidth(e){let{strokeWidth:t,enabled:i=!0}=this.properties.highlightStyle.series;if(!i||void 0===t)return e;switch(this.isItemIdHighlighted()){case 1:return t;case 0:case 2:return e}}isItemIdHighlighted(){let e=this.ctx.highlightManager?.getActiveHighlight()?.series;return null==e?0:e!==this?2:1}getModuleTooltipParams(){return this.moduleMap.mapModules(e=>e.getTooltipParams()).reduce((e,t)=>Object.assign(e,t),{})}pickNode(e,t,i=!1){let{pickModes:r,visible:s,rootGroup:a}=this;if(!s||!a.visible||"highlight"===t&&!this.properties.highlight.enabled||"highlight-tooltip"===t&&!this.properties.highlight.enabled||"highlight"===t&&!this.properties.highlight.enabled)return;let o=1/0;if("tooltip"===t||"highlight-tooltip"===t){let{tooltip:e}=this.properties;o="number"==typeof e.range?e.range:1/0,i||(i="exact"===e.range)}else if("event"===t){let{nodeClickRange:e}=this.properties;o="number"==typeof e?e:1/0,i||(i="exact"===e)}let n=r.filter(e=>!i||0===e),{x:l,y:h}=e,d=JSON.stringify({x:l,y:h,maxDistance:o,selectedPickModes:n});if(this._pickNodeCache.has(d))return this._pickNodeCache.get(d);for(let t of n){let i;switch(t){case 0:i=this.pickNodeExactShape(e);break;case 1:case 2:i=this.pickNodeMainAxisFirst(e,2===t);break;case 3:i=this.pickNodeClosestDatum(e)}if(i&&i.distance<=o)return this._pickNodeCache.set(d,{pickMode:t,match:i.datum,distance:i.distance})}return this._pickNodeCache.set(d,void 0)}pickNodeExactShape(e){let t=this.contentGroup.pickNode(e.x,e.y);if(t&&!0!==t.datum.missing)return{datum:t.datum,distance:0}}pickNodeClosestDatum(e){throw Error("AG Charts - Series.pickNodeClosestDatum() not implemented")}pickNodeNearestDistantObject(e,t){let i=uH(e.x,e.y,t);if(void 0!==i.nearest&&!0!==i.nearest.datum.missing)return{datum:i.nearest.datum,distance:Math.sqrt(i.distanceSquared)}}pickNodeMainAxisFirst(e,t){throw Error("AG Charts - Series.pickNodeMainAxisFirst() not implemented")}fireNodeClickEvent(e,t){this.fireEvent(new this.NodeEvent("nodeClick",e,t,this))}fireNodeDoubleClickEvent(e,t){this.fireEvent(new this.NodeEvent("nodeDoubleClick",e,t,this))}createNodeContextMenuActionEvent(e,t){return new this.NodeEvent("nodeContextMenuAction",e,t,this)}toggleSeriesItem(e,t){this.visible=t,this.nodeDataRefresh=!0,this._pickNodeCache.clear(),this.dispatch("visibility-changed",{itemId:e,enabled:t})}isEnabled(){return this.visible}getModuleMap(){return this.moduleMap}createModuleContext(){return{...this.ctx,series:this}}getLabelText(e,t,i=String){return e.formatter?this.ctx.callbackCache.call(e.formatter,{seriesId:this.id,...t})??i(t.value):i(t.value)}getMarkerStyle(e,t,i=e.getStyle()){let r=pP({size:t.datum.point?.size??0},i);return e.itemStyler?pP(this.ctx.callbackCache.call(e.itemStyler,{seriesId:this.id,...r,...t,datum:t.datum.datum}),r):r}updateMarkerStyle(e,t,i,r=t.getStyle(),{applyTranslation:s=!0,selected:a=!0}={}){let{point:o}=i.datum,n=this.getMarkerStyle(t,i,r),l=this.visible&&n.size>0&&o&&!isNaN(o.x)&&!isNaN(o.y);if(s?e.setProperties({visible:l,...n,translationX:o?.x,translationY:o?.y}):e.setProperties({visible:l,...n}),a||(e.fillOpacity*=.25,e.strokeOpacity*=.125),"function"==typeof t.shape&&!e.dirtyPath){e.path.clear(!0),e.updatePath(),e.checkPathDirty();let t=e.getBBox();if(void 0!==o&&t.isFinite()){let e=t.computeCenter(),[i,r]=["x","y"].map(t=>(n.strokeWidth??0)+Math.abs(e[t]-o[t])),s=Math.max(t.width+i,t.height+r);o.focusSize=s}}}getMinRects(e,t){}get nodeDataDependencies(){return this._nodeDataDependencies??{seriesRectWidth:NaN,seriesRectHeight:NaN}}checkResize(e){let{width:t,height:i}=e??{width:NaN,height:NaN},r=e?{seriesRectWidth:t,seriesRectHeight:i}:void 0,s=null!=f$(this.nodeDataDependencies,r);return s&&(this._nodeDataDependencies=r,this.markNodeDataDirty()),s}pickFocus(e){}};function wb({defs:e,values:t,xAxis:i,yAxis:r}){if(!(i&&r))throw Error("Axes must be defined");let s={};for(let[a,{def:o}]of e)if(Object.hasOwn(t,a)){let{scale:e}="key"===o.type?i:r;s[a]=Math.round(e.convert(t[a]))}return s}function wS(e,t,i,r){let s;for(let a of[...e].reverse()){if(!a.visible||!a.rootGroup.visible)continue;let{match:e,distance:o}=a.pickNode(t,i,r)??{};if(e&&null!=o&&((!s||s.distance>o)&&(s={series:a,distance:o,datum:e}),0===o))break}return s}ww.highlightedZIndex=1e12,c7([f2({changeValue:function(e,t){this.onSeriesGroupingChange(t,e)}})],ww.prototype,"seriesGrouping",2);var wx=class extends yb{constructor(e,t,i){super(),this.id=e,this.chart=t,this.ctx=i,this.series=[];let r=this.ctx.regionManager.getRegion("series"),s=this.ctx.regionManager.getRegion("horizontal-axes"),a=this.ctx.regionManager.getRegion("vertical-axes");this.destroyFns.push(this.ctx.regionManager.listenAll("click",e=>this.onClick(e)),this.ctx.regionManager.listenAll("dblclick",e=>this.onClick(e)),this.ctx.layoutManager.addListener("layout:complete",e=>this.layoutComplete(e)),r.addListener("hover",e=>this.onHover(e)),r.addListener("leave",()=>this.onLeave()),s.addListener("leave",()=>this.onLeave()),a.addListener("leave",()=>this.onLeave()))}seriesChanged(e){this.series=e}dataChanged(){}preSceneRender(){}update(e,t){this.ctx.updateService.update(e,t)}layoutComplete(e){this.seriesRect=e.series.paddedRect}onLeave(){this.ctx.cursorManager.updateCursor(this.id)}onHover({regionOffsetX:e,regionOffsetY:t}){let i=wS(this.series,{x:e,y:t},"event");i?.series.hasEventListener("nodeClick")||i?.series.hasEventListener("nodeDoubleClick")?this.ctx.cursorManager.updateCursor(this.id,"pointer"):this.ctx.cursorManager.updateCursor(this.id)}onClick(e){if(this.seriesRect?.containsPoint(e.offsetX,e.offsetY)&&this.checkSeriesNodeClick(e)){this.update(4),e.preventDefault();return}let t={type:"click"===e.type?"click":"doubleClick",event:e.sourceEvent};this.chart.fireEvent(t)}checkSeriesNodeClick(e){let t={x:e.regionOffsetX,y:e.regionOffsetY};"series"!==e.region&&(t=mq.fromCanvasPoint(this.chart.seriesRoot,e.offsetX,e.offsetY));let i=wS(this.series,t,"event");return null!=i&&("click"===e.type?(i.series.fireNodeClickEvent(e.sourceEvent,i.datum),!0):"dblclick"===e.type&&(e.preventZoomDblClick=0===i.distance,i.series.fireNodeDoubleClickEvent(e.sourceEvent,i.datum),!0))}};function wM(e,t){!function(e,t){let{bounds:i,showFocusBox:r}=t;r&&e?.updateBounds(i)}(e,t);let{x:i,y:r}=function(e){if(null!=e)return e instanceof u3?e.computeCenter():mq.toCanvas(e).computeCenter()}(t.bounds)??{};if(void 0!==i&&void 0!==r)return{type:"keyboard",offsetX:i,offsetY:r}}var wE=class extends yb{constructor(e,t,i,r,s){super(),this.id=e,this.chart=t,this.ctx=i,this.chartType=r,this.overlays=s,this.series=[],this.focus={hasFocus:!1,series:void 0,seriesIndex:0,datumIndex:0,datum:void 0},this.destroyFns.push(this.ctx.layoutManager.addListener("layout:complete",e=>this.layoutComplete(e)),this.ctx.animationManager.addListener("animation-start",()=>this.onAnimationStart()),this.ctx.keyNavManager.addListener("blur",()=>this.onBlur()),this.ctx.keyNavManager.addListener("focus",e=>this.onFocus(e)),this.ctx.keyNavManager.addListener("nav-vert",e=>this.onNavVert(e)),this.ctx.keyNavManager.addListener("nav-hori",e=>this.onNavHori(e)),this.ctx.keyNavManager.addListener("submit",e=>this.onSubmit(e)),this.ctx.zoomManager.addListener("zoom-change",()=>{this.ctx.focusIndicator.updateBounds(void 0)}))}seriesChanged(e){let t=e.map((e,t)=>({series:e,index:t})).sort((e,t)=>{let i=e.series.properties.focusPriority??1/0,r=t.series.properties.focusPriority??1/0;return(i===r&&([i,r]=[e.index,t.index]),i<r)?-1:i>r?1:0});this.series=t.map(e=>e.series),this.onBlur()}dataChanged(){this.ctx.focusIndicator.updateBounds(void 0)}preSceneRender(){this.refreshFocus()}layoutComplete(e){this.seriesRect=e.series.rect}refreshFocus(){this.focus.hasFocus&&this.handleSeriesFocus(0,0)}onFocus(e){this.handleFocus(0,0),e.preventDefault(),this.focus.hasFocus=!0}onNavVert(e){this.focus.seriesIndex+=e.delta,this.handleFocus(e.delta,0),e.preventDefault()}onNavHori(e){this.focus.datumIndex+=e.delta,this.handleFocus(0,e.delta),e.preventDefault()}onAnimationStart(){this.focus.hasFocus&&this.onBlur()}onBlur(){this.ctx.focusIndicator.updateBounds(void 0),this.focus.hasFocus=!1}handleFocus(e,t){this.focus.hasFocus=!0;let i=this.overlays.getFocusInfo(this.ctx.localeManager);null==i?this.handleSeriesFocus(e,t):(this.ctx.focusIndicator.updateBounds(i.rect),this.ctx.ariaAnnouncementService.clear())}handleSeriesFocus(e,t){if("hierarchy"===this.chartType){this.handleHierarchySeriesFocus(e,t);return}let{focus:i,seriesRect:r,series:s}=this,a=s.filter(e=>e.visible);if(0===a.length)return;i.seriesIndex=uW(0,i.seriesIndex,a.length-1),i.series=a[i.seriesIndex];let{datumIndex:o,seriesIndex:n}=i,l=i.series.pickFocus({datumIndex:o,datumIndexDelta:t,otherIndex:n,otherIndexDelta:e,seriesRect:r});this.updatePickedFocus(l)}handleHierarchySeriesFocus(e,t){this.focus.series=this.series[0];let{focus:{series:i,seriesIndex:r,datumIndex:s},seriesRect:a}=this;if(void 0===i)return;let o=i.pickFocus({datumIndex:s,datumIndexDelta:t,otherIndex:r,otherIndexDelta:e,seriesRect:a});this.updatePickedFocus(o)}updatePickedFocus(e){let{focus:t}=this;if(void 0===e||void 0===t.series)return;let{datum:i,datumIndex:r}=e;t.datumIndex=r,t.datum=i;let s=wM(this.ctx.focusIndicator,e);if(void 0!==s){let e=t.series.getTooltipHtml(i),r=Cz.makeTooltipMeta(s,i),a=this.getDatumAriaText(i,e);this.ctx.highlightManager.updateHighlight(this.id,i),this.ctx.tooltipManager.updateTooltip(this.id,r,e),this.ctx.ariaAnnouncementService.announceValue("ariaAnnounceHoverDatum",{datum:a})}}onSubmit(e){let{series:t,datum:i}=this.focus,r=e.sourceEvent.sourceEvent;void 0!==t&&void 0!==i?t.fireNodeClickEvent(r,i):this.chart.fireEvent({type:"click",event:r}),e.preventDefault()}getDatumAriaText(e,t){let i=t.ariaLabel;return e.series.getDatumAriaText?.(e,i)??i}},wD=class extends yb{constructor(e,t,i,r){super(),this.id=e,this.chart=t,this.ctx=i,this.highlight=r,this.series=[],this.hoverScheduler=yl(()=>{if(this.pendingHoverEvent){if(this.chart.performUpdateType<=4){this.hoverScheduler.schedule();return}this.handleHover(!1)}});let s=this.ctx.regionManager.getRegion("series"),a=this.ctx.regionManager.getRegion("horizontal-axes"),o=this.ctx.regionManager.getRegion("vertical-axes");this.destroyFns.push(this.ctx.layoutManager.addListener("layout:complete",e=>this.layoutComplete(e)),this.ctx.highlightManager.addListener("highlight-change",e=>this.changeHighlightDatum(e)),s.addListener("hover",e=>this.onHover(e),20),s.addListener("drag",e=>this.onHover(e),20),a.addListener("hover",e=>this.onHover(e)),o.addListener("hover",e=>this.onHover(e)),this.ctx.domManager.addListener("resize",()=>this.clearHighlight()),s.addListener("leave",()=>this.clearHighlight(),20),this.ctx.keyNavManager.addListener("blur",()=>this.clearHighlight()),this.ctx.animationManager.addListener("animation-start",()=>this.clearHighlight()),this.ctx.zoomManager.addListener("zoom-pan-start",()=>this.clearHighlight()),this.ctx.zoomManager.addListener("zoom-change",()=>this.clearHighlight()))}seriesChanged(e){this.series=e}dataChanged(){this.stashedHoverEvent??(this.stashedHoverEvent=this.appliedHoverEvent),this.clearHighlight()}preSceneRender(){null!=this.stashedHoverEvent&&(this.pendingHoverEvent=this.stashedHoverEvent,this.stashedHoverEvent=void 0,this.handleHover(!0))}update(e,t){this.ctx.updateService.update(e,t)}layoutComplete(e){this.hoverRect=e.series.paddedRect}clearHighlight(){this.pendingHoverEvent=void 0,this.appliedHoverEvent=void 0,this.ctx.highlightManager.updateHighlight(this.id)}onHover(e){this.pendingHoverEvent=e,this.hoverScheduler.schedule()}handleHover(e){this.appliedHoverEvent=this.pendingHoverEvent,this.pendingHoverEvent=void 0;let t=this.appliedHoverEvent;if(!t)return;let i=this.ctx.interactionManager.getState();if(16!==i&&4!==i)return;let{offsetX:r,offsetY:s}=t;if(e?this.ctx.animationManager.isActive():!this.hoverRect?.containsPoint(r,s)){this.clearHighlight();return}let a={x:t.regionOffsetX,y:t.regionOffsetY};"series"!==t.region&&(a=mq.fromCanvasPoint(this.chart.seriesRoot,r,s));let{range:o}=this.highlight,n=wS(this.series,a,"tooltip"===o?"highlight-tooltip":"highlight");if(n){this.ctx.highlightManager.updateHighlight(this.id,n.datum);return}this.ctx.highlightManager.updateHighlight(this.id)}changeHighlightDatum(e){let t=new Set,{series:i,datum:r}=e.currentHighlight??{},{series:s,datum:a}=e.previousHighlight??{};s&&t.add(s),i&&t.add(i),s?.properties.cursor&&a&&this.ctx.cursorManager.updateCursor(s.id),i?.properties.cursor&&i?.properties.cursor!=="default"&&r&&this.ctx.cursorManager.updateCursor(i.id,i.properties.cursor),null==i||null==s?this.update(4):this.update(4,{seriesToUpdate:t})}},wI=class extends yb{constructor(e,t,i,r){super(),this.id=e,this.chart=t,this.ctx=i,this.tooltip=r,this.series=[],this.hoverRect=u3.zero,this.hoverScheduler=yl(()=>{if(this.lastHover){if(this.chart.performUpdateType<=4){this.hoverScheduler.schedule();return}this.handleHover(this.lastHover,!1)}});let s=this.ctx.regionManager.getRegion("series"),a=this.ctx.regionManager.getRegion("horizontal-axes"),o=this.ctx.regionManager.getRegion("vertical-axes");this.destroyFns.push(this.ctx.layoutManager.addListener("layout:complete",e=>this.layoutComplete(e)),s.addListener("hover",e=>this.onHover(e),20),a.addListener("hover",e=>this.onHover(e)),o.addListener("hover",e=>this.onHover(e)),s.addListener("leave",()=>this.clearTooltip()),s.addListener("contextmenu",()=>this.clearTooltip(),31),a.addListener("leave",()=>this.clearTooltip()),o.addListener("leave",()=>this.clearTooltip()),this.ctx.keyNavManager.addListener("blur",()=>this.clearTooltip()),this.ctx.animationManager.addListener("animation-start",()=>this.clearTooltip()),this.ctx.domManager.addListener("resize",()=>this.clearTooltip()),this.ctx.zoomManager.addListener("zoom-pan-start",()=>this.clearTooltip()),this.ctx.zoomManager.addListener("zoom-change",()=>this.clearTooltip()))}seriesChanged(e){this.series=e}dataChanged(){this.ctx.tooltipManager.removeTooltip(this.id)}preSceneRender(){null!=this.lastHover&&this.handleHover(this.lastHover,!0)}layoutComplete(e){this.hoverRect=e.series.paddedRect}onHover(e){this.lastHover=e,this.hoverScheduler.schedule()}clearTooltip(){this.ctx.tooltipManager.removeTooltip(this.id),this.lastHover=void 0}handleHover(e,t){let i=this.ctx.interactionManager.getState();if(16!==i&&4!==i)return;let{offsetX:r,offsetY:s,targetElement:a,regionOffsetX:o,regionOffsetY:n}=e;if(t?this.ctx.animationManager.isActive():!this.hoverRect?.containsPoint(r,s)){this.clearTooltip();return}if(a&&this.tooltip.interactive&&this.ctx.domManager.isManagedChildDOMElement(a,"canvas-overlay",vt))return;let l={x:o,y:n};"series"!==e.region&&(l=mq.fromCanvasPoint(this.chart.seriesRoot,r,s));let h=wS(this.series,l,"tooltip");if(!h){this.clearTooltip();return}let d=h.series.getTooltipHtml(h.datum);if(this.tooltip.enabled&&h.series.tooltipEnabled&&null!=d){let t=Cz.makeTooltipMeta(e,h.datum);this.ctx.tooltipManager.updateTooltip(this.id,t,d)}}},wk=class extends yb{constructor(e,t,i,r,s,a){super(),this.ctx=t,this.id=uB(this),this.series=[],this.subManagers=[new wE(this.id,e,t,i,a),new wD(this.id,e,t,s),new wI(this.id,e,t,r),new wx(this.id,e,t)];let o=this.ctx.regionManager.getRegion("series");this.destroyFns.push(()=>this.subManagers.forEach(e=>e.destroy()),o.addListener("contextmenu",e=>this.onContextMenu(e),31),this.ctx.updateService.addListener("pre-scene-render",()=>this.preSceneRender()),this.ctx.layoutManager.addListener("layout:complete",e=>this.layoutComplete(e)))}dataChanged(){for(let e of this.subManagers)e.dataChanged?.()}preSceneRender(){for(let e of this.subManagers)e.preSceneRender?.()}seriesChanged(e){for(let t of(this.series=e,this.subManagers))t.seriesChanged([...e])}layoutComplete(e){this.seriesRect=e.series.rect}onContextMenu(e){let t,i;let{Default:r,ContextMenu:s}=Ce;if("keyboard"===this.ctx.focusIndicator.guessDevice(e.sourceEvent).type)(t=this.ctx.highlightManager.getActiveHighlight())&&this.seriesRect&&t.midPoint&&(i={x:this.seriesRect.x+t.midPoint.x,y:this.seriesRect.y+t.midPoint.y});else if(this.ctx.interactionManager.getState()&(r|s)){let i=wS(this.series,{x:e.regionOffsetX,y:e.regionOffsetY},"context-menu");i&&(this.ctx.highlightManager.updateHighlight(this.id),t=i.datum)}this.ctx.contextMenuRegistry.dispatchContext("series",e,{pickedNode:t},i)}},wT=class{constructor(e,t,i){this.seriesRoot=e,this.highlightRoot=t,this.annotationRoot=i,this.groups={},this.series={},this.expectedSeriesCount=1,this.mode="normal"}setSeriesCount(e){this.expectedSeriesCount=e}requestGroup(e){var t,i;let{internalId:r,type:s,rootGroup:a,highlightGroup:o,annotationGroup:n,seriesGrouping:l}=e,{groupIndex:h=r}=l??{};if(null!=this.series[r])throw Error(`AG Charts - series already has an allocated layer: ${this.series[r]}`);0===Object.keys(this.series).length&&(this.mode=this.expectedSeriesCount>=30?"aggressive-grouping":"normal"),(t=this.groups)[s]??(t[s]={});let d=this.lookupIdx(h),c=this.groups[s][d];return c||(c=(i=this.groups[s])[d]??(i[d]={type:s,id:d,seriesIds:[],group:this.seriesRoot.appendChild(new mQ({name:`${s}-content`,layer:!0,zIndex:4,zIndexSubOrder:e.getGroupZIndexSubOrder("data")})),highlight:this.highlightRoot.appendChild(new mQ({name:`${s}-highlight`,zIndex:4,zIndexSubOrder:e.getGroupZIndexSubOrder("highlight")})),annotation:this.annotationRoot.appendChild(new mQ({name:`${s}-annotation`,zIndex:4,zIndexSubOrder:e.getGroupZIndexSubOrder("annotation")}))})),this.series[r]={layerState:c,seriesConfig:e},c.seriesIds.push(r),c.group.appendChild(a),c.highlight.appendChild(o),c.annotation.appendChild(n),c.group}changeGroup(e){let{internalId:t,seriesGrouping:i,type:r,rootGroup:s,highlightGroup:a,annotationGroup:o,oldGrouping:n}=e,{groupIndex:l=t}=i??{};this.groups[r]?.[l]?.seriesIds.includes(t)||(null!=this.series[t]&&this.releaseGroup({internalId:t,seriesGrouping:n,type:r,rootGroup:s,highlightGroup:a,annotationGroup:o}),this.requestGroup(e))}releaseGroup(e){let{internalId:t,rootGroup:i,highlightGroup:r,annotationGroup:s,type:a}=e;if(null==this.series[t])throw Error(`AG Charts - series doesn't have an allocated layer: ${t}`);let o=this.series[t]?.layerState;if(o&&(o.seriesIds=o.seriesIds.filter(e=>e!==t),o.group.removeChild(i),o.highlight.removeChild(r),o.annotation.removeChild(s)),o?.seriesIds.length===0)this.seriesRoot.removeChild(o.group),this.highlightRoot.removeChild(o.highlight),this.annotationRoot.removeChild(o.annotation),delete this.groups[o.type][o.id],delete this.groups[a][t];else if(o?.seriesIds.length>0){let e=this.series[o?.seriesIds?.[0]]?.seriesConfig;o.group.zIndexSubOrder=e?.getGroupZIndexSubOrder("data"),o.highlight.zIndexSubOrder=e?.getGroupZIndexSubOrder("highlight"),o.annotation.zIndexSubOrder=e?.getGroupZIndexSubOrder("annotation")}delete this.series[t]}lookupIdx(e){return"normal"===this.mode?e:"string"!=typeof e||(e=Number(e.split("-").at(-1)))?Math.floor(30*uW(0,e/this.expectedSeriesCount,1)):0}destroy(){for(let e of Object.values(this.groups))for(let t of Object.values(e))this.seriesRoot.removeChild(t.group),this.highlightRoot.removeChild(t.highlight),this.annotationRoot.removeChild(t.annotation);this.groups={},this.series={}}},wA=class{constructor(e,t,i,r){this.chart=e,this.dataService=t,this.updateService=i,this.zoomManager=r,this.dirtyZoom=!1,this.dirtyDataSource=!1,this.lastAxisZooms=new Map,this.destroyFns=[],this.destroyFns.push(this.dataService.addListener("data-source-change",()=>this.onDataSourceChange()),this.dataService.addListener("data-load",()=>this.onDataLoad()),this.dataService.addListener("data-error",()=>this.onDataError()),this.updateService.addListener("update-complete",()=>this.onUpdateComplete()),this.zoomManager.addListener("zoom-change",()=>this.onZoomChange()))}destroy(){this.destroyFns.forEach(e=>e())}onDataLoad(){this.updateService.update(1)}onDataError(){this.updateService.update(3)}onDataSourceChange(){this.dirtyDataSource=!0}onUpdateComplete(){(this.dirtyZoom||this.dirtyDataSource)&&this.updateWindow().catch(e=>ul.errorOnce(e))}onZoomChange(){this.dirtyZoom=!0}async updateWindow(){let e;if(!this.dataService.isLazy())return;let t=this.getValidAxis(),i=!0;if(t){let r=this.zoomManager.getAxisZoom(t.id);e=this.getAxisWindow(t,r),i=this.shouldRefresh(t,r)}this.dirtyZoom=!1,this.dirtyDataSource=!1,i&&this.dataService.load({windowStart:e?.min,windowEnd:e?.max})}getValidAxis(){return this.chart.axes.find(e=>"time"===e.type)}shouldRefresh(e,t){if(this.dirtyDataSource)return!0;if(!this.dirtyZoom)return!1;let i=this.lastAxisZooms.get(e.id);return(!i||t.min!==i.min||t.max!==i.max)&&(this.lastAxisZooms.set(e.id,t),!0)}getAxisWindow(e,t){let i=e.scale.getDomain?.();if(!t||!i||0===i.length||isNaN(Number(i[0])))return;let r=Number(i[1])-Number(i[0]);return{min:new Date(Number(i[0])+r*t.min),max:new Date(Number(i[0])+r*t.max)}}},wR=class{constructor(e,t,i,r,s,a,o){this.chartLike=e,this.overlays=t,this.dataService=i,this.layoutManager=r,this.localeManager=s,this.animationManager=a,this.domManager=o,this.destroyFns=[],this.overlayElem=this.domManager.addChild("canvas-overlay","overlay"),this.overlayElem.role="status",this.overlayElem.ariaAtomic="false",this.overlayElem.ariaLive="polite",this.overlayElem.classList.toggle(wp),this.destroyFns.push(this.layoutManager.addListener("layout:complete",e=>this.onLayoutComplete(e)))}destroy(){this.destroyFns.forEach(e=>e()),this.domManager.removeStyles("overlays"),this.domManager.removeChild("canvas-overlay","overlay")}onLayoutComplete({series:{rect:e}}){let t=this.dataService.isLoading(),i=this.chartLike.series.some(e=>e.hasData),r=this.chartLike.series.some(e=>e.visible);this.overlays.darkTheme?this.overlayElem.classList.add(wg):this.overlayElem.classList.remove(wg),this.overlayElem.style.left=`${e.x}px`,this.overlayElem.style.top=`${e.y}px`,this.overlayElem.style.width=`${e.width}px`,this.overlayElem.style.height=`${e.height}px`;let s=!t&&!i,a=i&&!r;this.toggleOverlay(this.overlays.loading,e,t),this.toggleOverlay(this.overlays.noData,e,s),this.toggleOverlay(this.overlays.noVisibleSeries,e,a);let o=t||s||a;f7(this.overlayElem,"aria-hidden",!o)}toggleOverlay(e,t,i){if(i){let i=e.getElement(this.animationManager,this.localeManager,t);this.overlayElem.appendChild(i)}else e.removeElement(()=>{this.overlayElem.innerText="\xa0"},this.animationManager)}},wL=fn.create(!0,"opts"),wP=class extends gd{constructor(){super(...arguments),this.padding=new yn(0)}};c7([gp(gy,{optional:!0})],wP.prototype,"clip",2),c7([gp(gf)],wP.prototype,"padding",2);var wF=class e extends yo{constructor(e,t){var i;super(),this.id=uB(this),this.seriesRoot=new m1({name:`${this.id}-series-root`}),this.highlightRoot=new m1({name:`${this.id}-highlight-root`,layer:!0,zIndex:5,nonEmptyChildDerivedZIndex:!0}),this.annotationRoot=new m1({name:`${this.id}-annotation-root`,layer:!0,zIndex:11}),this.debug=fn.create(),this.extraDebugStats={},this.data=[],this._firstAutoSize=!0,this.padding=new yn(20),this.seriesArea=new wP,this.keyboard=new wi,this.mode="standalone",this.chartCaptions=new yg,this.destroyed=!1,this._skipSync=!1,this._destroyFns=[],this.chartAnimationPhase="initial",this.modulesManager=new wu,this.processors=[],this.queuedUserOptions=[],this._pendingFactoryUpdatesCount=0,this._performUpdateNoRenderCount=0,this._performUpdateSkipAnimations=!1,this.performUpdateType=7,this.updateShortcutCount=0,this.seriesToUpdate=new Set,this.updateMutex=new ya,this.updateRequestors={},this.performUpdateTrigger=yh((e,t=0)=>setTimeout(e,t),async({count:e})=>{this.destroyed||this.updateMutex.acquire(async()=>{try{await this.performUpdate(e)}catch(e){ul.error("update error",e)}}).catch(e=>ul.errorOnce(e))}),this._performUpdateSplits={},this.axes=[],this.series=[],this.onSeriesNodeClick=e=>{this.fireEvent({...e,type:"seriesNodeClick"})},this.onSeriesNodeDoubleClick=e=>{this.fireEvent({...e,type:"seriesNodeDoubleClick"})},this.seriesGroupingChanged=e=>{if(!(e instanceof wC))return;let{series:t,seriesGrouping:i,oldGrouping:r}=e;null!=t.rootGroup.parent&&this.seriesLayerManager.changeGroup({internalId:t.internalId,type:t.type,rootGroup:t.rootGroup,highlightGroup:t.highlightGroup,annotationGroup:t.annotationGroup,getGroupZIndexSubOrder:e=>t.getGroupZIndexSubOrder(e),seriesGrouping:i,oldGrouping:r})},this.dataProcessListeners=new Set,this.chartOptions=e;let r=t?.scene,s=t?.container??e.processedOptions.container??void 0,a=new mQ({name:"root"}),o=new mQ({name:"titles",layer:!0,zIndex:9});a.visible=!1,a.append(o),a.append(this.seriesRoot),a.append(this.highlightRoot),a.append(this.annotationRoot),o.append(this.title.node),o.append(this.subtitle.node),o.append(this.footnote.node),this.tooltip=new vo,this.seriesLayerManager=new wT(this.seriesRoot,this.highlightRoot,this.annotationRoot);let n=this.ctx=new CW(this,{scene:r,root:a,container:s,syncManager:new wt(this),pixelRatio:e.specialOverrides.overrideDevicePixelRatio,updateCallback:(e=0,t)=>this.update(e,t),updateMutex:this.updateMutex});this._destroyFns.push(n.domManager.addListener("resize",()=>this.parentResize(n.domManager.containerSize))),this.overlays=new wf,(i=this.overlays.loading).renderer??(i.renderer=()=>(function(e,t){let{animationDuration:i}=pX.add,r=m5("div",`${wp}--loading`,{display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column",height:"100%",boxSizing:"border-box",font:"13px Verdana, sans-serif",userSelect:"none",animation:`ag-charts-loading ${i*t}ms linear 50ms both`}),s=m5("span",{width:"45px",height:"40px",backgroundImage:"linear-gradient(#0000 calc(1 * 100% / 6), #ccc 0 calc(3 * 100% / 6), #0000 0), linear-gradient(#0000 calc(2 * 100% / 6), #ccc 0 calc(4 * 100% / 6), #0000 0), linear-gradient(#0000 calc(3 * 100% / 6), #ccc 0 calc(5 * 100% / 6), #0000 0)",backgroundSize:"10px 400%",backgroundRepeat:"no-repeat",animation:"ag-charts-loading-matrix 1s infinite linear"}),a=m5("p",{marginTop:"1em"});a.innerText=e;let o=m5("div",`${wp}__loading-background`,{position:"absolute",inset:"0",opacity:"0.5",zIndex:"-1"}),n=m5("style");return n.innerText="@keyframes ag-charts-loading { from { opacity: 0 } to { opacity: 1 } } @keyframes ag-charts-loading-matrix { 0% { background-position: 0% 0%, 50% 0%, 100% 0%; } 100% { background-position: 0% 100%, 50% 100%, 100% 100%; } }",r.replaceChildren(n,s,a,o),r})(this.overlays.loading.getText(n.localeManager),n.animationManager.defaultDuration)),this.processors=[new wA(this,n.dataService,n.updateService,n.zoomManager),new wR(this,this.overlays,n.dataService,n.layoutManager,n.localeManager,n.animationManager,n.domManager)],this.highlight=new C$,this.container=s;let l=this.getModuleContext();n.regionManager.addRegion("series",this.seriesRoot,new CI(this.seriesRoot,()=>this.seriesRect??u3.zero),this.ctx.axisManager.axisGridGroup),n.regionManager.addRegion("horizontal-axes"),n.regionManager.addRegion("vertical-axes");let h=this;this.seriesAreaManager=new wk({fireEvent:this.fireEvent.bind(h),get performUpdateType(){return h.performUpdateType},seriesRoot:this.seriesRoot},n,this.getChartType(),this.tooltip,this.highlight,this.overlays),n.regionManager.addRegion("root",a),this._destroyFns.push(n.layoutManager.registerElement(0,e=>{e.layoutBox.shrink(this.padding.toJson()),this.chartCaptions.positionCaptions(e)}),n.layoutManager.addListener("layout:complete",e=>this.chartCaptions.positionAbsoluteCaptions(e)),n.dataService.addListener("data-load",e=>{this.data=e.data}),this.title.registerInteraction(l),this.subtitle.registerInteraction(l),this.footnote.registerInteraction(l),n.interactionManager.addListener("page-left",()=>this.destroy()),n.animationManager.addListener("animation-frame",()=>{this.update(6)}),n.zoomManager.addListener("zoom-change",()=>{this.series.map(e=>e.animationState?.transition("updateData"));let e="initial"!==this.chartAnimationPhase;this.update(3,{forceNodeDataRefresh:!0,skipAnimations:e})})),this.parentResize(n.domManager.containerSize)}static getInstance(t){return e.chartsInstances.get(t)}get canvasElement(){return this.ctx.scene.canvas.element}download(e,t){this.ctx.scene.download(e,t)}getCanvasDataURL(e){return this.ctx.scene.getDataURL(e)}getOptions(){return this.queuedUserOptions.at(-1)??this.chartOptions.userOptions}getModuleContext(){return this.ctx}getCaptionText(){return[this.title,this.subtitle,this.footnote].filter(e=>e.enabled&&e.text).map(e=>e.text).join(". ")}getAriaLabel(){return this.ctx.localeManager.t("ariaAnnounceChart",{seriesCount:this.series.length})}resetAnimations(){for(let e of(this.chartAnimationPhase="initial",this.series))e.resetAnimation(this.chartAnimationPhase);for(let e of this.axes)e.resetAnimation(this.chartAnimationPhase);this.animationRect=void 0,this.ctx.animationManager.reset()}skipAnimations(){this.ctx.animationManager.skipCurrentBatch(),this._performUpdateSkipAnimations=!0}destroy(e){let t;if(this.destroyed)return;let i=e?.keepTransferableResources;return this.performUpdateType=7,this._destroyFns.forEach(e=>e()),this.processors.forEach(e=>e.destroy()),this.tooltip.destroy(this.ctx.domManager),this.overlays.destroy(),this.modulesManager.destroy(),i?(this.ctx.scene.strip(),t={container:this.container,scene:this.ctx.scene}):(this.ctx.scene.destroy(),this.container=void 0),this.destroySeries(this.series),this.seriesLayerManager.destroy(),this.axes.forEach(e=>e.destroy()),this.axes=[],this.animationRect=void 0,this.ctx.destroy(),this.destroyed=!0,Object.freeze(this),t}requestFactoryUpdate(e){this.destroyed||(this._pendingFactoryUpdatesCount++,this.updateMutex.acquire(async()=>{!this.destroyed&&(await e(this),!this.destroyed&&this._pendingFactoryUpdatesCount--)}).catch(e=>ul.errorOnce(e)))}update(e=0,t){let{forceNodeDataRefresh:i=!1,skipAnimations:r,seriesToUpdate:s=this.series,newAnimationBatch:a}=t??{};for(let e of(i&&this.series.forEach(e=>e.markNodeDataDirty()),s))this.seriesToUpdate.add(e);if(r&&(this.ctx.animationManager.skipCurrentBatch(),this._performUpdateSkipAnimations=!0),a&&this.ctx.animationManager.isActive()&&(this._performUpdateSkipAnimations=!0),this._skipSync=t?.skipSync??!1,this.debug.check()){let t=Error().stack??"<unknown>";t=t.replace(/\([^)]*/g,""),this.updateRequestors[t]=e}e<this.performUpdateType&&(this.performUpdateType=e,this.performUpdateTrigger.schedule(t?.backOffMs))}async performUpdate(e){let{performUpdateType:t,extraDebugStats:i,_performUpdateSplits:r,ctx:s}=this,a=[...this.seriesToUpdate];this.performUpdateType=7,this.seriesToUpdate.clear(),0===this.updateShortcutCount&&t<6&&(s.animationManager.startBatch(this._performUpdateSkipAnimations),s.animationManager.onBatchStop(()=>this.chartAnimationPhase="ready")),this.debug("Chart.performUpdate() - start",CH[t]);let o=performance.now();r.start??(r.start=o);let n=e=>{r[e]??(r[e]=0),r[e]+=performance.now()-o,o=performance.now()},l=!1;switch(t){case 0:this.ctx.updateService.dispatchPreDomUpdate(),this.updateDOM();case 1:await this.updateData(),n("⬇️");case 2:await this.processData(),this.seriesAreaManager.dataChanged(),n("\uD83C\uDFED");case 3:if(this.checkUpdateShortcut(3))break;if(!this.checkFirstAutoSize(a)){l=!0;break}await this.processLayout(),n("⌖");case 4:if(this.checkUpdateShortcut(4))break;let{seriesRect:h}=this;await Promise.all(a.map(e=>e.update({seriesRect:h}))),n("\uD83E\uDD14"),this.updateAriaLabels();case 5:if(this.checkUpdateShortcut(5))break;s.updateService.dispatchPreSceneRender(this.getMinRects()),n("↖");case 6:if(this.checkUpdateShortcut(6))break;for(let e in s.animationManager.endBatch(),i.updateShortcutCount=this.updateShortcutCount,await s.scene.render({debugSplitTimes:r,extraDebugStats:i,seriesRect:this.seriesRect}),this.extraDebugStats={},r)delete r[e];this.ctx.domManager.incrementDataCounter("sceneRenders");case 7:this.updateShortcutCount=0,this.updateRequestors={},this._performUpdateSkipAnimations=!1,s.animationManager.endBatch()}l||s.updateService.dispatchUpdateComplete(this.getMinRects());let d=performance.now();this.debug("Chart.performUpdate() - end",{chart:this,durationMs:Math.round((d-r.start)*100)/100,count:e,performUpdateType:CH[t]})}updateThemeClassName(){let{theme:e}=this.chartOptions.processedOptions,t="ag-charts-theme-",i=[`${t}default`,`${t}default-dark`],r=i[0],s=!1;"string"==typeof e?(r=e.replace("ag-",t),s=e.includes("-dark")):"string"==typeof e?.baseTheme&&(r=e.baseTheme.replace("ag-",t),s=e.baseTheme.includes("-dark")),i.includes(r)||(r=s?i[1]:i[0]),this.ctx.domManager.setThemeClass(r)}updateDOM(){this.updateThemeClassName();let{enabled:e,tabIndex:t}=this.keyboard;this.ctx.domManager.setTabIndex(e?t??0:-1)}updateAriaLabels(){f7(this.ctx.scene.canvas.element,"role","img"),f7(this.ctx.scene.canvas.element,"aria-label",this.getAriaLabel())}checkUpdateShortcut(e){return this.updateShortcutCount>3?(ul.warn("exceeded the maximum number of simultaneous updates (4), discarding changes and rendering",this.updateRequestors),!1):this.performUpdateType<=e&&(this.updateShortcutCount++,!0)}checkFirstAutoSize(e){if(null!=this.width&&null!=this.height);else if(!this._lastAutoSize){let t=this._performUpdateNoRenderCount++,i=(t+1)**2*40;if(t<8)return this.update(3,{seriesToUpdate:e,backOffMs:i}),this.debug("Chart.checkFirstAutoSize() - backing off until first size update",i),!1;this.debug("Chart.checkFirstAutoSize() - timeout for first size update.")}return this._performUpdateNoRenderCount=0,!0}onAxisChange(e,t){(null!=t||0!==e.length)&&this.ctx.axisManager.updateAxes(t??[],e)}onSeriesChange(e,t){let i=t?.filter(t=>!e.includes(t))??[];for(let r of(this.destroySeries(i),this.seriesLayerManager?.setSeriesCount(e.length),e)){if(t?.includes(r))continue;null==r.rootGroup.parent&&this.seriesLayerManager.requestGroup(r);let e=this;r.chart={get mode(){return e.mode},get isMiniChart(){return!1},get seriesRect(){return e.seriesRect},placeLabels:t=>e.placeLabels(t)},r.resetAnimation(this.chartAnimationPhase),this.addSeriesListeners(r),r.addChartEventListeners()}this.seriesAreaManager?.seriesChanged(e)}destroySeries(e){e?.forEach(e=>{e.removeEventListener("nodeClick",this.onSeriesNodeClick),e.removeEventListener("nodeDoubleClick",this.onSeriesNodeDoubleClick),e.removeEventListener("groupingChanged",this.seriesGroupingChanged),e.destroy(),this.seriesLayerManager.releaseGroup(e),e.chart=void 0})}addSeriesListeners(e){this.hasEventListener("seriesNodeClick")&&e.addEventListener("nodeClick",this.onSeriesNodeClick),this.hasEventListener("seriesNodeDoubleClick")&&e.addEventListener("nodeDoubleClick",this.onSeriesNodeDoubleClick),e.addEventListener("groupingChanged",this.seriesGroupingChanged)}assignSeriesToAxes(){for(let e of this.axes)e.boundSeries=this.series.filter(t=>t.axes[e.direction]===e)}assignAxesToSeries(){let e=mP(this.axes,e=>e.direction);this.series.forEach(t=>{t.directions.forEach(i=>{let r=e[i];if(!r){ul.warnOnce(`no available axis for direction [${i}]; check series and axes configuration.`);return}let s=t.getKeys(i),a=r.find(e=>!e.keys.length||s.some(t=>e.keys.includes(t)));if(!a){ul.warnOnce(`no matching axis for direction [${i}] and keys [${s}]; check series and axes configuration.`);return}t.axes[i]=a})})}parentResize(e){if(null==e||null!=this.width&&null!=this.height)return;let{width:t,height:i}=e;if(t=Math.floor(t),i=Math.floor(i),0===t&&0===i)return;let[r=0,s=0]=this._lastAutoSize??[];(r!==t||s!==i)&&(this._lastAutoSize=[t,i],this.resize("SizeMonitor",{}))}resize(e,t){let{scene:i,animationManager:r}=this.ctx,{inWidth:s,inHeight:a,inMinWidth:o,inMinHeight:n}=t;this.ctx.domManager.setSizeOptions(o??this.minWidth,n??this.minHeight,s??this.width,a??this.height);let l=s??this.width??this._lastAutoSize?.[0],h=a??this.height??this._lastAutoSize?.[1];if(this.debug(`Chart.resize() from ${e}`,{width:l,height:h,stack:Error().stack}),null!=l&&null!=h&&pD(l)&&pD(h)&&i.resize(l,h)){r.reset();let e=!0;(null==this.width||null==this.height)&&this._firstAutoSize&&(e=!1,this._firstAutoSize=!1),this.update(3,{forceNodeDataRefresh:!0,skipAnimations:e})}}async updateData(){this.series.forEach(e=>e.setChartData(this.data));let e=this.modulesManager.mapModules(e=>e.updateData?.(this.data));await Promise.all(e)}async processData(){if(this.series.some(e=>e.canHaveAxes)){this.assignAxesToSeries();let e=this.modulesManager.getModule("sync");e?.enabled?e.syncAxes(this._skipSync):this.assignSeriesToAxes()}let e=new C0(this.mode),t=this.series.map(t=>t.processData(e)),i=this.modulesManager.mapModules(t=>t.processData?.(e));for(let{legendType:r,legend:s}of(e.execute(),await Promise.all([...t,...i]),this.modulesManager.legends()))s.data=this.getLegendData(r,"integrated"!==this.mode);this.dataProcessListeners.forEach(e=>e()),this.dataProcessListeners.clear()}placeLabels(e){let t=[],i=[];for(let e of this.series){var r;if(!e.visible)continue;let s=e.getLabelData();null!=(r=s?.[0])&&"object"==typeof r.point&&"object"==typeof r.label&&(i.push(s),t.push(e))}let{seriesRect:s}=this,{top:a,right:o,bottom:n,left:l}=this.seriesArea.padding;return new Map((s&&i.length>0?function(e,t,i=5){let r=[];e=e.map(e=>e.slice().sort((e,t)=>t.point.size-e.point.size));for(let s=0;s<e.length;s++){let a=r[s]=[],o=e[s];if(o?.length&&o[0].label)for(let s=0,n=o.length;s<n;s++){let n=o[s],{point:l,label:h,marker:d}=n,{text:c,width:u,height:p}=h,g=.5*l.size,m=0,f=0;if(g>0&&null!=n.placement){let e=fH[n.placement];m=(.5*u+g+i)*e.x,f=(.5*p+g+i)*e.y}let v=l.x-.5*u+m-((d?.center.x??.5)-.5)*l.size,y=l.y-.5*p+f-((d?.center.y??.5)-.5)*l.size;!(!t||v+u<t.x+t.width&&v>t.x&&y>t.y&&y+p<t.y+t.height)||e.some(e=>e.some(e=>(function(e,t,i,r,s,a){if(0===e.size)return!1;let o=e.x,n=e.y;null!=t&&(o-=(t.x-.5)*e.size,n-=(t.y-.5)*e.size);let l=o;o<i?l=i:o>i+s&&(l=i+s);let h=n;n<r?h=r:n>r+a&&(h=r+a);let d=o-l,c=n-h;return Math.sqrt(d*d+c*c)<=.5*e.size})(e.point,e.marker?.center,v,y,u,p)))||r.some(e=>e.some(e=>fj(e,v,y,u,p)))||a.push({index:s,text:c,x:v,y,width:u,height:p,datum:n})}}return r}(i,{x:-l,y:-a,width:s.width+l+o,height:s.height+a+n},e):[]).map((e,i)=>[t[i],e]))}getLegendData(e,t){var i;let r=this.series.filter(e=>e.properties.showInLegend).flatMap(t=>t.getLegendData(e));if(t&&r.every(e=>"category"===e.legendType)){let e={},t=new Map(this.series.map(e=>[e.id,e.type]));for(let{seriesId:s,symbols:[{marker:a}],label:o}of r){if(null==a.fill)continue;let r=t.get(s),n=e[r]??(e[r]={});n[i=o.text]??(n[i]=a.fill),n[o.text]!==a.fill&&ul.warnOnce(`legend item '${o.text}' has multiple fill colors, this may cause unexpected behaviour.`)}}return r}async processLayout(){let e=this.animationRect,{width:t,height:i}=this.ctx.scene,r=this.ctx.layoutManager.createContext(t,i);await this.performLayout(r),e&&!this.animationRect?.equals(e)&&this.ctx.animationManager.skipCurrentBatch(),this.debug("Chart.performUpdate() - seriesRect",this.seriesRect)}async waitForUpdate(e=1e4,t=!1){let i=performance.now();for(this._pendingFactoryUpdatesCount>0&&await this.updateMutex.waitForClearAcquireQueue();7!==this.performUpdateType;){if(performance.now()-i>e){let i=`Chart.waitForUpdate() timeout of ${e} reached - first chart update taking too long.`;if(t)throw Error(i);ul.warnOnce(i)}await new Promise(e=>{setTimeout(()=>e(void 0),50)})}await this.updateMutex.waitForClearAcquireQueue()}waitForDataProcess(e){return new Promise(t=>{this.dataProcessListeners.add(t),pE(e)&&setTimeout(()=>{this.dataProcessListeners.has(t)&&(this.dataProcessListeners.delete(t),t())},e)})}getMinRects(){let{width:e,height:t}=this.ctx.scene,i=this.series.map(i=>i.getMinRects(e,t)).filter(pg);if(0===i.length)return;let r=0,s=0,a=0,o=0;for(let{minRect:e,minVisibleRect:t}of i)r=Math.max(r,e.width),s=Math.max(s,e.height),a=Math.max(a,t.width),o=Math.max(o,t.height);let n=new u3(0,0,r,s),l=n.clone();return a>0&&o>0&&(l=new u3(0,0,a,o)),{minRect:n,minVisibleRect:l}}filterMiniChartSeries(e){return e?.filter(e=>!1!==e.showInMiniChart)}applyOptions(e){let t=e!==this.chartOptions?this.chartOptions.processedOptions:{},i=e.processedOptions,r=e.diffOptions(t);if(null==r)return;wL("Chart.applyOptions() - applying delta",r);let s=this.applyModules(i);r.listeners&&this.registerListeners(this,r.listeners),fq(this,r,{skip:["type","data","series","listeners","preset","theme","legend.listeners","navigator.miniChart.series","navigator.miniChart.label","locale.localeText","axes","topology","nodes","initialState"]});let a=!1,o="no-op";null!=r.series&&(o=this.applySeries(this,r.series,t?.series),a=!0),"replaced"===o&&this.resetAnimations(),this.applyAxes(this,i,t,o,[],!0)&&(a=!0),r.data&&(this.data=r.data),r.legend?.listeners&&this.modulesManager.isEnabled("legend")&&Object.assign(this.legend.listeners,r.legend.listeners),r.locale?.localeText&&(this.modulesManager.getModule("locale").localeText=r.locale?.localeText),this.chartOptions=e;let n=this.modulesManager.getModule("navigator"),l=this.modulesManager.getModule("zoom");n?.enabled||l?.enabled||this.ctx.zoomManager.updateZoom("chart");let h=n?.miniChart,d=i.navigator?.miniChart?.series??i.series;h?.enabled===!0&&null!=d?this.applyMiniChartOptions(h,d,i,t):h?.enabled===!1&&(h.series=[],h.axes=[]),this.ctx.annotationManager.setAnnotationStyles(e.annotationThemes),a||(a=this.shouldForceNodeDataRefresh(r,o));let c=a||s?0:3;this.maybeResetAnimations(o),wL("Chart.applyOptions() - update type",CH[c],{seriesStatus:o,forceNodeDataRefresh:a}),this.update(c,{forceNodeDataRefresh:a,newAnimationBatch:!0}),(r.initialState||r.theme)&&this.applyInitialState(e.userOptions.initialState)}applyInitialState(e){let{ctx:{annotationManager:t,historyManager:i,stateManager:r}}=this;if(e?.annotations!=null){let i=e.annotations.map(e=>{let i=t.getAnnotationTypeStyles(e.type);return pP(e,i)});r.setState(t,i)}null!=e&&i.clear()}maybeResetAnimations(e){if("standalone"===this.mode)switch(e){case"series-grouping-change":case"replaced":this.resetAnimations()}}shouldForceNodeDataRefresh(e,t){let i=!!e.data||"data-change"===t||"replaced"===t,r=Object.values(C4.getKeys()).some(t=>null!=e[t]),s=null!=e.title&&null!=e.subtitle;return i||r||s}applyMiniChartOptions(e,t,i,r){let s=r?.navigator?.miniChart?.series??r?.series,a=this.applySeries(e,this.filterMiniChartSeries(t),this.filterMiniChartSeries(s));for(let t of(this.applyAxes(e,i,r,a,["axes[].tick","axes[].thickness","axes[].title","axes[].crosshair","axes[].gridLine","axes[].label"]),e.series))t.properties.id=void 0;let o=e.axes,n=o.find(e=>"x"===e.direction);for(let e of o)e.gridLine.enabled=!1,e.label.enabled=e===n,e.tick.enabled=!1,e.interactionEnabled=!1;if(null!=n){let e=i.navigator?.miniChart,t=e?.label,r=e?.label?.interval;n.line.enabled=!1,n.label.set(pO(t,["interval","rotation","minSpacing","autoRotate","autoRotateAngle"])),n.tick.set(pO(r,["enabled","width","size","color","interval","step"]));let s=r?.step;null!=s&&(n.interval.step=s)}}applyModules(e){let{type:t}=this.constructor,i=!1;for(let r of ys.byType("root","legend")){let s=null!=e[r.optionsKey]&&r.chartTypes.includes(t);s!==this.modulesManager.isEnabled(r)&&(s?(this.modulesManager.addModule(r,e=>e.moduleFactory(this.getModuleContext())),"legend"===r.type&&this.modulesManager.getModule(r)?.attachLegend(this.ctx.scene),this[r.optionsKey]=this.modulesManager.getModule(r)):(this.modulesManager.removeModule(r),delete this[r.optionsKey]),i=!0)}return i}applySeries(e,t,i){if(!t)return"no-change";let r=function(e,t,i){let r=(e,t,i)=>{let r=[e];for(let e of ws)e in t&&null!=t[e]&&r.push(`${e}=${t[e]}`);return i?.seriesGrouping&&r.push(`seriesGrouping.groupId=${i?.seriesGrouping.groupId}`),r.join(";")},s=new Map,a=0;for(let t of e){let e=r(t.type,t.properties,i?.[a]);s.has(e)||s.set(e,[]),s.get(e)?.push([t,a++])}let o=new Map;for(let e of t){let t=r(e.type,e,e);o.has(t)||o.set(t,[]),o.get(t)?.push(e)}if(![...s.keys()].some(e=>o.has(e)))return{status:"no-overlap",oldKeys:s.keys(),newKeys:o.keys()};let n=[],l=-1;for(let[e,t]of o.entries())for(let r of t){l++;let t=s.get(e);if(null==t||t.length<1){n.push({opts:r,idx:l,status:"add"}),s.delete(e);continue}let[a,o]=t.shift(),h=f$(i?.[o]??{},r??{}),{groupIndex:d,stackIndex:c}=h?.seriesGrouping??{};null!=d||null!=c?n.push({opts:r,series:a,diff:h,idx:o,status:"series-grouping"}):h?n.push({opts:r,series:a,diff:h,idx:o,status:"update"}):n.push({opts:r,series:a,idx:o,status:"no-op"}),0===t.length&&s.delete(e)}for(let e of s.values())for(let[t,i]of e)n.push({series:t,idx:i,status:"remove"});return{status:"overlap",changes:n}}(e.series,t,i);if("no-overlap"===r.status)return wL(`Chart.applySeries() - creating new series instances, status: ${r.status}`,r),e.series=t.map(e=>this.createSeries(e)),"replaced";wL("Chart.applySeries() - matchResult",r);let s=[],a=!1,o=!1,n=!1;for(let e of r.changes)switch(o||(o="series-grouping"===e.status),a||(a=e.diff?.data!=null),n||(n="no-op"!==e.status),e.status){case"add":{let t=this.createSeries(e.opts);s.push(t),wL("Chart.applySeries() - created new series",t);break}case"remove":wL(`Chart.applySeries() - removing series at previous idx ${e.idx}`,e.series);break;case"no-op":s.push(e.series),wL(`Chart.applySeries() - no change to series at previous idx ${e.idx}`,e.series);break;default:{let{series:t,diff:i,idx:r}=e;wL(`Chart.applySeries() - applying series diff previous idx ${r}`,i,t),this.applySeriesValues(t,i),t.markNodeDataDirty(),s.push(t)}}for(let e=0;e<s.length;e++)s[e]._declarationOrder=e;return(wL("Chart.applySeries() - final series instances",s),e.series=s,o)?"series-grouping-change":a?"data-change":n?"updated":"no-op"}applyAxes(e,t,i,r,s=[],a=!1){if(!("axes"in t)||!t.axes)return!1;s=["axes[].type",...s];let{axes:o}=t;if("replaced"!==r&&e.axes.length===o.length&&e.axes.every((e,t)=>e.type===o[t].type)&&wo(i))return e.axes.forEach((e,t)=>{let r=f$(i.axes?.[t]??{},o[t]);wL(`Chart.applyAxes() - applying axis diff idx ${t}`,r),fq(e,r,{path:`axes[${t}]`,skip:s})}),!0;wL(`Chart.applyAxes() - creating new axes instances; seriesStatus: ${r}`),e.axes=this.createAxis(o,s);let n={x:[],y:[]};return e.axes.forEach(e=>n[e.direction].push({id:e.id,node:e.getRegionNode()})),a&&(this.ctx.regionManager.updateRegion("horizontal-axes",...n.x),this.ctx.regionManager.updateRegion("vertical-axes",...n.y)),!0}createSeries(e){let t=we.create(e.type,this.getModuleContext());return this.applySeriesOptionModules(t,e),this.applySeriesValues(t,e),t}applySeriesOptionModules(e,t){let i=e.createModuleContext(),r=e.getModuleMap();for(let s of ys.byType("series-option"))s.optionsKey in t&&s.seriesTypes.includes(e.type)&&r.addModule(s,e=>e.moduleFactory(i))}applySeriesValues(e,t){let i=e.getModuleMap(),{type:r,data:s,listeners:a,seriesGrouping:o,showInMiniChart:n,...l}=t;for(let e of C2)if("series-option"===e.type&&e.optionsKey in l){let t=i.getModule(e.optionsKey);if(t){let i=l[e.optionsKey];delete l[e.optionsKey],t.properties.set(i)}}e.properties.set(l),"data"in t&&e.setOptionsData(s),a&&this.registerListeners(e,a),"seriesGrouping"in t&&(null==o?e.seriesGrouping=void 0:e.seriesGrouping={...e.seriesGrouping,...o})}createAxis(e,t){let i=[],r=this.getModuleContext();for(let s=0;s<e.length;s++){let a=e[s],o=C1.create(a.type,r);this.applyAxisModules(o,a),fq(o,a,{path:`axes[${s}]`,skip:t}),i.push(o)}return!function(e){let t=[],i=[],r=[...wr];for(let r of e)if(r instanceof v6){var s;"string"==typeof(s=r.position)&&wr.includes(s)?i.push(r.position):t.push(r)}for(let e of t){let t;do t=r.pop();while(t&&i.includes(t));if(null==t)break;e.position=t}}(i),i}applyAxisModules(e,t){let i=e.createModuleContext(),r=e.getModuleMap();for(let s of ys.byType("axis-option")){let a=null!=t[s.optionsKey];a!==r.isEnabled(s)&&(a?(r.addModule(s,e=>e.moduleFactory(i)),e[s.optionsKey]=r.getModule(s)):(r.removeModule(s),delete e[s.optionsKey]))}}registerListeners(e,t){for(let[i,r]of(e.clearEventListeners(),Object.entries(t)))pw(r)&&e.addEventListener(i,r)}};wF.chartsInstances=new WeakMap,c7([f2({newValue(e){this.destroyed||(this.ctx.domManager.setContainer(e),wF.chartsInstances.set(e,this))},oldValue(e){wF.chartsInstances.delete(e)}})],wF.prototype,"container",2),c7([f2({newValue(e){this.resize("width option",{inWidth:e})}})],wF.prototype,"width",2),c7([f2({newValue(e){this.resize("height option",{inHeight:e})}})],wF.prototype,"height",2),c7([f2({newValue(e){this.resize("minWidth option",{inMinWidth:e})}})],wF.prototype,"minWidth",2),c7([f2({newValue(e){this.resize("minHeight option",{inMinHeight:e})}})],wF.prototype,"minHeight",2),c7([gp(gf)],wF.prototype,"padding",2),c7([gp(gf)],wF.prototype,"seriesArea",2),c7([gp(gf)],wF.prototype,"keyboard",2),c7([gp(g4(["standalone","integrated"],"a chart mode"))],wF.prototype,"mode",2),c7([fJ("chartCaptions.title")],wF.prototype,"title",2),c7([fJ("chartCaptions.subtitle")],wF.prototype,"subtitle",2),c7([fJ("chartCaptions.footnote")],wF.prototype,"footnote",2),c7([f2({changeValue(e,t){this.onAxisChange(e,t)}})],wF.prototype,"axes",2),c7([f2({changeValue(e,t){this.onSeriesChange(e,t)}})],wF.prototype,"series",2);var wN=wF,wO=class{constructor(e,t,i){this.root=new wz(e,t,i)}clear(e){this.root.clear(e)}addValue(e,t){this.root.addElem({hitTester:e,value:t,distanceSquared:(t,i)=>e.distanceSquared(t,i)})}find(e,t){let i={best:{nearest:void 0,distanceSquared:1/0}};return this.root.find(e,t,i),i.best}},wB=class{constructor(e,t,i,r){this.nw=e,this.ne=t,this.sw=i,this.se=r}addElem(e){this.nw.addElem(e),this.ne.addElem(e),this.sw.addElem(e),this.se.addElem(e)}find(e,t,i){this.nw.find(e,t,i),this.ne.find(e,t,i),this.sw.find(e,t,i),this.se.find(e,t,i)}},wG=class{constructor(e,t,i){this.capacity=e,this.maxdepth=t,this.boundary=i??u3.NaN,this.elems=[],this.subdivisions=void 0}clear(e){this.elems.length=0,this.boundary=e,this.subdivisions=void 0}addElem(e){this.addCondition(e)&&(void 0===this.subdivisions?0===this.maxdepth||this.elems.length<this.capacity?this.elems.push(e):this.subdivide(e):this.subdivisions.addElem(e))}find(e,t,i){this.findCondition(e,t,i)&&(void 0===this.subdivisions?this.findAction(e,t,i):this.subdivisions.find(e,t,i))}subdivide(e){for(let e of(this.subdivisions=this.makeSubdivisions(),this.elems))this.subdivisions.addElem(e);this.subdivisions.addElem(e),this.elems.length=0}makeSubdivisions(){let{x:e,y:t,width:i,height:r}=this.boundary,{capacity:s}=this,a=this.maxdepth-1,o=i/2,n=r/2,l=new u3(e,t,o,n),h=new u3(e+o,t,o,n),d=new u3(e,t+n,o,n),c=new u3(e+o,t+n,o,n);return new wB(this.child(s,a,l),this.child(s,a,h),this.child(s,a,d),this.child(s,a,c))}},wz=class e extends wG{addCondition(e){let{x:t,y:i}=e.hitTester.midPoint;return this.boundary.containsPoint(t,i)}findCondition(e,t,i){let{best:r}=i;return 0!==r.distanceSquared&&this.boundary.distanceSquared(e,t)<r.distanceSquared}findAction(e,t,i){let r=uH(e,t,this.elems,i.best.distanceSquared);void 0!==r.nearest&&r.distanceSquared<i.best.distanceSquared&&(i.best=r)}child(t,i,r){return new e(t,i,r)}},w_=["ArrowDown","ArrowUp","Circle","Cross","Diamond","Heart","MapPin","Plus","Square","Star","Triangle"],wV=Object.freeze({x:.5,y:.5}),wj=class extends yG{constructor(){super(...arguments),this.x=0,this.y=0,this.size=12}isBuiltIn(){return w_.includes(this.constructor.className??"")}computeBBox(){if(!this.isBuiltIn())return this.path.computeBBox();let{x:e,y:t,size:i}=this,{center:r}=this.constructor;return new u3(e-i*r.x,t-i*r.y,i,i)}applyPath(e,t){let{path:i}=this,{x:r,y:s}=this;for(let{x:a,y:o,t:n}of(i.clear(),t))r+=a*e,s+=o*e,"move"===n?i.moveTo(r,s):i.lineTo(r,s);i.closePath()}executeFill(e,t){if(t)return super.executeFill(e,t)}executeStroke(e,t){if(t)return super.executeStroke(e,t)}};c7([yB()],wj.prototype,"x",2),c7([yB()],wj.prototype,"y",2),c7([yB({convertor:Math.abs})],wj.prototype,"size",2);var wH=class extends mY(mK(mZ(wj))){};wH.center=wV;var wU=class extends wH{updatePath(){let{x:e,y:t,path:i,size:r}=this;i.clear(),i.arc(e,t,r/2,0,2*Math.PI),i.closePath()}};wU.className="Circle";var wW=class e extends wH{updatePath(){let t=this.size/4.2;super.applyPath(t,e.moves)}};wW.className="Cross",wW.moves=[{x:-1,y:0,t:"move"},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1},{x:1,y:1},{x:-1,y:1},{x:-1,y:-1},{x:-1,y:1},{x:-1,y:-1}];var w$=class e extends wH{updatePath(){let t=this.size/2;super.applyPath(t,e.moves)}};w$.className="Diamond",w$.moves=[{x:0,y:-1,t:"move"},{x:1,y:1},{x:-1,y:1},{x:-1,y:-1},{x:1,y:-1}];var wY=class extends wH{rad(e){return e/180*Math.PI}updatePath(){let{x:e,path:t,size:i,rad:r}=this,s=i/4,a=this.y+s/2;t.clear(),t.arc(e-s,a-s,s,r(130),r(330)),t.arc(e+s,a-s,s,r(220),r(50)),t.lineTo(e,a+s),t.closePath()}};wY.className="Heart";var wK=class extends wH{updatePath(){let{path:e,x:t,y:i}=this,r=this.size;e.clear(),e.moveTo(t+-.34375*r,i+-.65625*r),e.cubicCurveTo(t+-.34375*r,i+-.848509*r,t+-.192259*r,i+-1*r,t+0*r,i+-1*r),e.cubicCurveTo(t+.19225899999999996*r,i+-1*r,t+.34375*r,i+-.848509*r,t+.34375*r,i+-.65625*r),e.cubicCurveTo(t+.34375*r,i+-.506176*r,t+.284625*r,i+-.39981900000000004*r,t+.21646100000000001*r,i+-.30460699999999996*r),e.cubicCurveTo(t+.199009*r,i+-.280231*r,t+.18127099999999996*r,i+-.256896*r,t+.16378499999999996*r,i+-.23389499999999996*r),e.cubicCurveTo(t+.11189300000000002*r,i+-.16563300000000003*r,t+.06222799999999995*r,i+-.10030099999999997*r,t+.028896000000000033*r,i+-.019352000000000036*r),e.cubicCurveTo(t+.024074999999999958*r,i+-.007642000000000038*r,t+.01266299999999998*r,i+0*r,t+0*r,i+0*r),e.cubicCurveTo(t+-.01266299999999998*r,i+0*r,t+-.024075000000000013*r,i+-.007642000000000038*r,t+-.028895999999999977*r,i+-.019352000000000036*r),e.cubicCurveTo(t+-.01266299999999998*r,i+0*r,t+-.024075000000000013*r,i+-.007642000000000038*r,t+-.028895999999999977*r,i+-.019352000000000036*r),e.cubicCurveTo(t+-.062228000000000006*r,i+-.10030099999999997*r,t+-.11189300000000002*r,i+-.16563300000000003*r,t+-.16378500000000001*r,i+-.23389499999999996*r),e.cubicCurveTo(t+-.18127100000000002*r,i+-.256896*r,t+-.199009*r,i+-.280231*r,t+-.21646100000000001*r,i+-.30460699999999996*r),e.cubicCurveTo(t+-.284625*r,i+-.39981900000000004*r,t+-.34375*r,i+-.506176*r,t+-.34375*r,i+-.65625*r),e.closePath()}};wK.className="MapPin",wK.center={x:.5,y:1};var wZ=class e extends wH{updatePath(){let t=this.size/3;super.applyPath(t,e.moves)}};wZ.className="Plus",wZ.moves=[{x:-.5,y:-.5,t:"move"},{x:0,y:-1},{x:1,y:0},{x:0,y:1},{x:1,y:0},{x:0,y:1},{x:-1,y:0},{x:0,y:1},{x:-1,y:0},{x:0,y:-1},{x:-1,y:0},{x:0,y:-1}];var wq=class extends wH{updatePath(){let{path:e,x:t,y:i}=this,r=this.size/2;e.clear(),e.moveTo(this.align(t-r),this.align(i-r)),e.lineTo(this.align(t+r),this.align(i-r)),e.lineTo(this.align(t+r),this.align(i+r)),e.lineTo(this.align(t-r),this.align(i+r)),e.closePath()}};wq.className="Square";var wX=class extends wH{updatePath(){let{x:e,y:t,path:i,size:r}=this,s=r/2,a=Math.PI/2;i.clear();for(let o=0;o<10;o++){let n=o%2==0?r:s,l=o*Math.PI/5-a,h=e+Math.cos(l)*n,d=t+Math.sin(l)*n;i.lineTo(h,d)}i.closePath()}};wX.className="Star";var wQ=class e extends wH{updatePath(){let t=1.1*this.size;super.applyPath(t,e.moves)}};wQ.className="Triangle",wQ.moves=[{x:0,y:-.48,t:"move"},{x:.5,y:.87},{x:-1,y:0}];var wJ={circle:wU,cross:wW,diamond:w$,heart:wY,pin:wK,plus:wZ,square:wq,star:wX,triangle:wQ},w0=Object.keys(wJ);function w1(e){return"string"==typeof e&&w0.includes(e)}function w2(e=wq){return w1(e)?wJ[e]:"function"==typeof e?e:wq}var w3=class extends ww{constructor(){super(...arguments),this.showFocusBox=!0}getScaleInformation({xScale:e,yScale:t}){return{isContinuousX:mo.is(e),isContinuousY:mo.is(t),xScaleType:e?.type,yScaleType:t?.type}}getModulePropertyDefinitions(){let e=this.axes.x?.scale,t=this.axes.y?.scale;return this.moduleMap.mapModules(i=>i.getPropertyDefinitions(this.getScaleInformation({xScale:e,yScale:t}))).flat()}async requestDataModel(e,t,i){i.props.push(...this.getModulePropertyDefinitions());let{dataModel:r,processedData:s}=await e.request(this.id,t??[],i);return this.dataModel=r,this.processedData=s,this.dispatch("data-processed",{dataModel:r,processedData:s}),{dataModel:r,processedData:s}}isProcessedDataAnimatable(){let e=this.processedData?.reduced?.animationValidation;if(!e)return!0;let{orderedKeys:t,uniqueKeys:i}=e;return t&&i}checkProcessedDataAnimatable(){this.isProcessedDataAnimatable()||this.ctx.animationManager.skipCurrentBatch()}pickFocus(e){let t=this.getNodeData();if(void 0===t||0===t.length)return;let i=this.computeFocusDatumIndex(e,t);if(void 0===i)return;let{showFocusBox:r}=this,s=t[i],a={...e,datumIndex:i},o=this.computeFocusBounds(a);if(void 0!==o)return{bounds:o,showFocusBox:r,datum:s,datumIndex:i}}computeFocusDatumIndex(e,t){let i;let r=e=>{let{missing:i=!1,enabled:r=!0,focusable:s=!0}=t[e];return!i&&r&&s},s=e=>{for(;e>=0&&!r(e);)e--;return -1===e?void 0:e},a=e=>{for(;e<t.length&&!r(e);)e++;return e===t.length?void 0:e},o=uW(0,e.datumIndex,t.length-1);return void 0!==(i=e.datumIndexDelta<0?s(o):e.datumIndexDelta>0?a(o):a(o)??s(o))?i:0!==e.datumIndexDelta?e.datumIndex-e.datumIndexDelta:void 0}},w4=class extends gd{constructor(){super(...arguments),this.fill="rgba(255,255,255, 0.33)",this.stroke="rgba(0, 0, 0, 0.4)",this.strokeWidth=2}};c7([gp(gO,{optional:!0})],w4.prototype,"fill",2),c7([gp(gE,{optional:!0})],w4.prototype,"fillOpacity",2),c7([gp(gO,{optional:!0})],w4.prototype,"stroke",2),c7([gp(gM,{optional:!0})],w4.prototype,"strokeWidth",2),c7([gp(gE,{optional:!0})],w4.prototype,"strokeOpacity",2),c7([gp(g$,{optional:!0})],w4.prototype,"lineDash",2),c7([gp(gM,{optional:!0})],w4.prototype,"lineDashOffset",2);var w6=class extends gd{};c7([gp(gM,{optional:!0})],w6.prototype,"strokeWidth",2),c7([gp(gE,{optional:!0})],w6.prototype,"dimOpacity",2),c7([gp(gy,{optional:!0})],w6.prototype,"enabled",2);var w5=class extends gd{constructor(){super(...arguments),this.color="black"}};c7([gp(gO,{optional:!0})],w5.prototype,"color",2);var w8=class extends gd{constructor(){super(...arguments),this.enabled=!0}};c7([gp(gy,{optional:!0})],w8.prototype,"enabled",2);var w7=class extends gd{constructor(){super(...arguments),this.item=new w4,this.series=new w6,this.text=new w5}};c7([gp(gf)],w7.prototype,"item",2),c7([gp(gf)],w7.prototype,"series",2),c7([gp(gf)],w7.prototype,"text",2);var w9=class extends gd{constructor(){super(...arguments),this.visible=!0,this.focusPriority=1/0,this.showInLegend=!0,this.cursor="default",this.nodeClickRange="exact",this.highlight=new w8,this.highlightStyle=new w7}};c7([gp(gw,{optional:!0})],w9.prototype,"id",2),c7([gp(gy)],w9.prototype,"visible",2),c7([gp(gS,{optional:!0})],w9.prototype,"focusPriority",2),c7([gp(gy)],w9.prototype,"showInLegend",2),c7([gp(gw)],w9.prototype,"cursor",2),c7([gp(g2)],w9.prototype,"nodeClickRange",2),c7([gp(gf)],w9.prototype,"highlight",2),c7([gp(gf)],w9.prototype,"highlightStyle",2);var be={x:["xKey"],y:["yKey"]},bt={x:["xName"],y:["yName"]},bi=class extends wy{constructor(e,t,i,r){super(e,t,i,r),this.xKey=r.properties.xKey,this.yKey=r.properties.yKey}},br=class extends w9{constructor(){super(...arguments),this.pickOutsideVisibleMinorAxis=!1}};c7([gp(gw,{optional:!0})],br.prototype,"legendItemName",2),c7([gp(gy,{optional:!0})],br.prototype,"pickOutsideVisibleMinorAxis",2);var bs=class extends w3{constructor({pathsPerSeries:e=["path"],hasMarkers:t=!1,hasHighlightedLabels:i=!1,pathsZIndexSubOrderOffset:r=[],datumSelectionGarbageCollection:s=!0,markerSelectionGarbageCollection:a=!0,animationAlwaysUpdateSelections:o=!1,animationResetFns:n,directionKeys:l,directionNames:h,...d}){if(super({directionKeys:l,directionNames:h,canHaveAxes:!0,...d}),this.NodeEvent=bi,this.dataNodeGroup=this.contentGroup.appendChild(new mQ({name:`${this.id}-series-dataNodes`,zIndex:4,zIndexSubOrder:this.getGroupZIndexSubOrder("data")})),this.markerGroup=this.contentGroup.appendChild(new mQ({name:`${this.id}-series-markers`,zIndex:4,zIndexSubOrder:this.getGroupZIndexSubOrder("marker")})),this.labelGroup=this.contentGroup.appendChild(new m1({name:`${this.id}-series-labels`,zIndex:9,zIndexSubOrder:this.getGroupZIndexSubOrder("labels")})),this.labelSelection=fl.select(this.labelGroup,fz),this.highlightSelection=fl.select(this.highlightNode,()=>this.opts.hasMarkers?this.markerFactory():this.nodeFactory()),this.highlightLabelSelection=fl.select(this.highlightLabel,fz),this.annotationSelections=new Set,this.minRectsCache={dirtyNodeData:!0},this.debug=fn.create(),!l||!h)throw Error(`Unable to initialise series type ${this.type}`);this.opts={pathsPerSeries:e,hasMarkers:t,hasHighlightedLabels:i,pathsZIndexSubOrderOffset:r,directionKeys:l,directionNames:h,animationResetFns:n,animationAlwaysUpdateSelections:o,datumSelectionGarbageCollection:s,markerSelectionGarbageCollection:a},this.paths=[];for(let t=0;t<e.length;t++)this.paths[t]=new yG({name:`${this.id}-${e[t]}`}),this.paths[t].zIndex=4,this.paths[t].zIndexSubOrder=this.getGroupZIndexSubOrder("paths",t),this.contentGroup.appendChild(this.paths[t]);this.datumSelection=fl.select(this.dataNodeGroup,()=>this.nodeFactory(),s),this.markerSelection=fl.select(this.markerGroup,()=>this.markerFactory(),a),this.animationState=new f5("empty",{empty:{update:{target:"ready",action:e=>this.animateEmptyUpdateReady(e)},reset:"empty",skip:"ready",disable:"disabled"},ready:{updateData:"waiting",clear:"clearing",highlight:e=>this.animateReadyHighlight(e),highlightMarkers:e=>this.animateReadyHighlightMarkers(e),resize:e=>this.animateReadyResize(e),reset:"empty",skip:"ready",disable:"disabled"},waiting:{update:{target:"ready",action:e=>{this.ctx.animationManager.isSkipped()?this.resetAllAnimation(e):this.animateWaitingUpdateReady(e)}},reset:"empty",skip:"ready",disable:"disabled"},disabled:{update:e=>this.resetAllAnimation(e),reset:"empty"},clearing:{update:{target:"empty",action:e=>this.animateClearingUpdateEmpty(e)},reset:"empty",skip:"ready"}},()=>this.checkProcessedDataAnimatable())}get contextNodeData(){return this._contextNodeData}getNodeData(){return this.contextNodeData?.nodeData}resetAnimation(e){"initial"===e?this.animationState.transition("reset"):"ready"===e?this.animationState.transition("skip"):"disabled"===e&&this.animationState.transition("disable")}addChartEventListeners(){this.destroyFns.push(this.ctx.chartEventManager.addListener("legend-item-click",e=>this.onLegendItemClick(e)),this.ctx.chartEventManager.addListener("legend-item-double-click",e=>this.onLegendItemDoubleClick(e)))}destroy(){super.destroy(),this._contextNodeData=void 0}async update({seriesRect:e}){let{visible:t,_contextNodeData:i}=this,r=this.ctx.highlightManager?.getActiveHighlight()?.series===this,s=this.checkResize(e),a=await this.updateHighlightSelection(r);await this.updateSelections(t),await this.updateNodes(a,r,t);let o=this.getAnimationData(e,i);o&&(s&&this.animationState.transition("resize",o),this.animationState.transition("update",o))}async updateSelections(e){var t;let i=!this.opts.animationAlwaysUpdateSelections&&this.ctx.animationManager.isSkipped();if((e||!i)&&(this.nodeDataRefresh||this.isPathOrSelectionDirty())){if(this.nodeDataRefresh){this.nodeDataRefresh=!1,this.debug("CartesianSeries.updateSelections() - calling createNodeData() for",this.id),this.markQuadtreeDirty(),this._contextNodeData=await this.createNodeData();let e=this.isProcessedDataAnimatable();this._contextNodeData&&((t=this._contextNodeData).animationValid??(t.animationValid=e)),this.minRectsCache.dirtyNodeData=!0;let{dataModel:i,processedData:r}=this;void 0!==i&&void 0!==r&&this.dispatch("data-update",{dataModel:i,processedData:r})}await this.updateSeriesSelections()}}async updateSeriesSelections(e){let{datumSelection:t,labelSelection:i,markerSelection:r,paths:s}=this,a=this._contextNodeData;if(!a)return;let{nodeData:o,labelData:n,itemId:l}=a;await this.updatePaths({seriesHighlighted:e,itemId:l,contextData:a,paths:s}),this.datumSelection=await this.updateDatumSelection({nodeData:o,datumSelection:t}),this.labelSelection=await this.updateLabelSelection({labelData:n,labelSelection:i}),this.opts.hasMarkers&&(this.markerSelection=await this.updateMarkerSelection({nodeData:o,markerSelection:r}))}markerFactory(){return new(w2())}getGroupZIndexSubOrder(e,t=0){let i=super.getGroupZIndexSubOrder(e,t);if("paths"===e){let[e]=i,r=this.opts.pathsZIndexSubOrderOffset[t]??0;i[0]=pw(e)?()=>Number(e())+r:Number(e)+r}return i}async updateNodes(e,t,i){let{highlightSelection:r,highlightLabelSelection:s,opts:{hasMarkers:a,hasHighlightedLabels:o}}=this,n=!this.ctx.animationManager.isSkipped(),l=this.visible&&null!=this._contextNodeData&&i;this.rootGroup.visible=n||l,this.contentGroup.visible=n||l,this.highlightGroup.visible=(n||l)&&t;let h=this.getOpacity();a?(await this.updateMarkerNodes({markerSelection:r,isHighlight:!0}),this.animationState.transition("highlightMarkers",r)):(await this.updateDatumNodes({datumSelection:r,isHighlight:!0}),this.animationState.transition("highlight",r)),o&&await this.updateLabelNodes({labelSelection:s});let{dataNodeGroup:d,markerGroup:c,datumSelection:u,labelSelection:p,markerSelection:g,paths:m,labelGroup:f}=this,{itemId:v}=this.contextNodeData??{};d.opacity=h,d.visible=n||l,f.visible=l,a&&(c.opacity=h,c.zIndex=d.zIndex>=4?d.zIndex:d.zIndex+1,c.visible=l),f&&(f.opacity=h),await this.updatePathNodes({seriesHighlighted:t,itemId:v,paths:m,opacity:h,visible:l,animationEnabled:n}),d.visible&&(await this.updateDatumNodes({datumSelection:u,highlightedItems:e,isHighlight:!1}),await this.updateLabelNodes({labelSelection:p}),a&&await this.updateMarkerNodes({markerSelection:g,isHighlight:!1}))}getHighlightLabelData(e,t){let i=e.filter(e=>e.datum===t.datum&&e.itemId===t.itemId);return 0===i.length?void 0:i}getHighlightData(e,t){return t?[t]:void 0}async updateHighlightSelection(e){let t,i;let{highlightSelection:r,highlightLabelSelection:s,_contextNodeData:a}=this;if(!a)return;let o=this.ctx.highlightManager?.getActiveHighlight(),n=e&&o?.datum?o:void 0;if(null!=n){let e=this.isLabelEnabled(),{labelData:r,nodeData:s}=a;i=this.getHighlightData(s,n),t=e?this.getHighlightLabelData(r,n):void 0}return this.highlightSelection=await this.updateHighlightSelectionItem({items:i,highlightSelection:r}),this.highlightLabelSelection=await this.updateHighlightSelectionLabel({items:t,highlightLabelSelection:s}),i}markQuadtreeDirty(){this.quadtree=void 0}*datumNodesIter(){for(let{node:e}of this.datumSelection)!0!==e.datum.missing&&(yield e)}getQuadTree(){if(void 0===this.quadtree){let{width:e,height:t}=this.ctx.scene.canvas,i=new u3(0,0,e,t);this.quadtree=new wO(100,10,i),this.initQuadTree(this.quadtree)}return this.quadtree}initQuadTree(e){}pickNodeExactShape(e){let t;let i=super.pickNodeExactShape(e);if(i)return i;let{x:r,y:s}=e,{opts:{hasMarkers:a}}=this,{dataNodeGroup:o,markerGroup:n}=this;if((t=o.pickNode(r,s))||!a||(t=n?.pickNode(r,s)),t&&!0!==t.datum.missing)return{datum:t.datum,distance:0};for(let t of this.moduleMap.modules()){let{datum:i}=t.pickNodeExact(e)??{};if(null!=i&&i?.missing!==!0)return{datum:i,distance:0}}}pickNodeClosestDatum(e){let t;let{x:i,y:r}=e,{axes:s,_contextNodeData:a}=this;if(!a)return;let o=s.x,n=s.y,l={x:i,y:r},h=1/0;for(let e of a.nodeData){let{point:{x:i=NaN,y:r=NaN}={}}=e;if(isNaN(i)||isNaN(r)||!(o?.inRange(i)&&n?.inRange(r)))continue;let s=Math.max((l.x-i)**2+(l.y-r)**2,0);s<h&&(h=s,t=e)}for(let i of this.moduleMap.modules()){let r=i.pickNodeNearest(e);if(void 0!==r&&r.distanceSquared<h){h=r.distanceSquared,t=r.datum;break}}if(t){let e=Math.max(Math.sqrt(h)-(t.point?.size??0),0);return{datum:t,distance:e}}}pickNodeMainAxisFirst(e,t){let i;let{x:r,y:s}=e,{axes:a,_contextNodeData:o}=this,{pickOutsideVisibleMinorAxis:n}=this.properties;if(!o)return;let l=a.x,h=a.y,d=[l,h].filter(v5.is).map(e=>e.direction);if(t&&0===d.length)return;let[c="x"]=d,u=[r,s];"x"!==c&&u.reverse();let p=[1/0,1/0];for(let e of o.nodeData){let{x:t=NaN,y:r=NaN}=e.point??e.midPoint??{};if(isNaN(t)||isNaN(r)||!0===e.missing)continue;let s=[l?.inRange(t),h?.inRange(r)];if("x"!==c&&s.reverse(),!s[0]||!n&&!s[1])continue;let a=[t,r];"x"!==c&&a.reverse();let o=!0;for(let e=0;e<a.length;e++){let t=Math.abs(a[e]-u[e]);if(t>p[e]){o=!1;break}t<p[e]&&(p[e]=t,p.fill(1/0,e+1,p.length))}o&&(i=e)}if(i){let t=Math.max(p[0]**2+p[1]**2-(i.point?.size??0),0);for(let r of this.moduleMap.modules()){let s=r.pickNodeMainAxisFirst(e);if(void 0!==s&&s.distanceSquared<t){i=s.datum,t=s.distanceSquared;break}}return{datum:i,distance:Math.sqrt(t)}}}onLegendItemClick(e){let{legendItemName:t}=this.properties,{enabled:i,itemId:r,series:s}=e,a=null!=t&&t===e.legendItemName;(s.id===this.id||a)&&this.toggleSeriesItem(r,i)}onLegendItemDoubleClick(e){let{enabled:t,itemId:i,series:r,numVisibleItems:s}=e,{legendItemName:a}=this.properties,o=null!=a&&a===e.legendItemName;r.id===this.id||o?this.toggleSeriesItem(i,!0):t&&1===s?this.toggleSeriesItem(i,!0):this.toggleSeriesItem(i,!1)}isPathOrSelectionDirty(){return!1}getLabelData(){return[]}shouldFlipXY(){return!1}getMinRects(e,t){let{dirtyNodeData:i,sizeCache:r,minRect:s,minVisibleRect:a}=this.minRectsCache,o=JSON.stringify({width:e,height:t});if(!(o!==r)&&!i&&s&&a)return{minRect:s,minVisibleRect:a};let n=this.computeMinRects(e,t);return this.minRectsCache={dirtyNodeData:!1,sizeCache:o,minRect:n?.minRect,minVisibleRect:n?.minVisibleRect},n}computeMinRects(e,t){let i,r,s,a;let o=this._contextNodeData;if(!o?.nodeData.length)return;let{nodeData:n}=o,l=Array(n.length),h=Array(n.length);for(let[e,{midPoint:t}]of n.entries())l[e]=t?.x??0,h[e]=t?.y??0;l.sort((e,t)=>e-t),h.sort((e,t)=>e-t);let d=0,c=0;for(let o=1;o<n.length;o++)l[o]>=0&&(i??(i=o)),l[o]>e&&(r??(r=o)),h[o]>=0&&(s??(s=o)),h[o]>t&&(a??(a=o)),d=Math.max(d,l[o]-l[o-1]),c=Math.max(c,h[o]-h[o-1]);r??(r=n.length),a??(a=n.length);let u=null!=i&&null!=r?l.slice(i,r):[],p=null!=s&&null!=a?h.slice(s,a):[],g=0,m=0;for(let e=1;e<Math.max(u.length,p.length);e++){let t=u[e],i=u[e-1],r=p[e],s=p[e-1];null!=t&&null!=i&&(g=Math.max(g,t-i)),null!=r&&null!=s&&(m=Math.max(m,r-s))}return{minRect:new u3(0,0,d,c),minVisibleRect:new u3(0,0,g,m)}}updateHighlightSelectionItem(e){let{opts:{hasMarkers:t}}=this,{items:i,highlightSelection:r}=e,s=i??[];return t?this.updateMarkerSelection({nodeData:s,markerSelection:r}):this.updateDatumSelection({nodeData:s,datumSelection:r})}updateHighlightSelectionLabel(e){return this.updateLabelSelection({labelData:e.items??[],labelSelection:e.highlightLabelSelection})}async updateDatumSelection(e){return e.datumSelection}async updateDatumNodes(e){}async updateMarkerSelection(e){return e.markerSelection}async updateMarkerNodes(e){}async updatePaths(e){e.paths.forEach(e=>e.visible=!1)}async updatePathNodes(e){let{paths:t,opacity:i,visible:r}=e;for(let e of t)e.opacity=i,e.visible=r}resetPathAnimation(e){let{path:t}=this.opts?.animationResetFns??{};t&&e.paths.forEach(e=>{ms([e],t)})}resetDatumAnimation(e){let{datum:t}=this.opts?.animationResetFns??{};t&&ms([e.datumSelection],t)}resetLabelAnimation(e){let{label:t}=this.opts?.animationResetFns??{};t&&ms([e.labelSelection],t)}resetMarkerAnimation(e){let{marker:t}=this.opts?.animationResetFns??{};t&&this.opts.hasMarkers&&ms([e.markerSelection],t)}resetAllAnimation(e){this.ctx.animationManager.stopByAnimationGroupId(this.id),this.resetPathAnimation(e),this.resetDatumAnimation(e),this.resetLabelAnimation(e),this.resetMarkerAnimation(e),e.contextData?.animationValid===!1&&this.ctx.animationManager.skipCurrentBatch()}animateEmptyUpdateReady(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(e)}animateWaitingUpdateReady(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(e)}animateReadyHighlight(e){let{datum:t}=this.opts?.animationResetFns??{};t&&ms([e],t)}animateReadyHighlightMarkers(e){let{marker:t}=this.opts?.animationResetFns??{};t&&ms([e],t)}animateReadyResize(e){this.resetAllAnimation(e)}animateClearingUpdateEmpty(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(e)}animationTransitionClear(){let e=this.getAnimationData();e&&this.animationState.transition("clear",e)}getAnimationData(e,t){let{_contextNodeData:i}=this;if(i)return{datumSelection:this.datumSelection,markerSelection:this.markerSelection,labelSelection:this.labelSelection,annotationSelections:[...this.annotationSelections],contextData:i,previousContextData:t,paths:this.paths,seriesRect:e}}calculateScaling(){let e={};for(let t of Object.values(mt)){let i=this.axes[t];if(i){if(i.scale instanceof mI){let{range:r,domain:s}=i.scale;e[t]={type:"log",convert:e=>i.scale.convert(e),domain:[s[0],s[1]],range:[r[0],r[1]]}}else if(i.scale instanceof mo){let{range:r}=i.scale,s=i.scale.getDomain();e[t]={type:"continuous",domain:[s[0],s[1]],range:[r[0],r[1]]}}else if(i.scale){let{domain:r}=i.scale;e[t]={type:"category",domain:r,range:r.map(e=>i.scale.convert(e))}}}}return e}},ba=["top","right","bottom","left"],bo=class extends wN{constructor(e,t){super(e,t),this.paired=!0,this.firstSeriesTranslation=!0,this.lastUpdateClipRect=void 0,this._lastCrossLineIds=void 0,this._lastAxisAreaWidths=new Map,this._lastClipSeries=!1,this._lastVisibility={crossLines:!0,series:!0}}onAxisChange(e,t){super.onAxisChange(e,t),this.ctx?.zoomManager.updateAxes(e)}destroySeries(e){super.destroySeries(e),this.firstSeriesTranslation=!0}getChartType(){return"cartesian"}setRootClipRects(e){let{seriesRoot:t,annotationRoot:i,highlightRoot:r}=this;t.setClipRectInGroupCoordinateSpace(e),r.setClipRectInGroupCoordinateSpace(e),i.setClipRectInGroupCoordinateSpace(e)}performLayout(e){let{firstSeriesTranslation:t,seriesRoot:i,annotationRoot:r,highlightRoot:s}=this,{animationRect:a,seriesRect:o,visibility:n,clipSeries:l}=this.updateAxes(e.layoutBox);this.seriesRoot.visible=n.series,this.seriesRect=o,this.animationRect=a;let{x:h,y:d}=o;if(t){for(let e of[i,r,s])e.translationX=Math.floor(h),e.translationY=Math.floor(d);this.firstSeriesTranslation=!1}else{let{translationX:e,translationY:t}=i;p3(this.id,"seriesRect",this.ctx.animationManager,[i,s,r],{translationX:e,translationY:t},{translationX:Math.floor(h),translationY:Math.floor(d)},{phase:"update"})}let c=o.clone().grow(this.seriesArea.padding),u=this.seriesArea.clip||l?c:void 0,{lastUpdateClipRect:p}=this;this.lastUpdateClipRect=u,this.ctx.animationManager.isActive()&&null!=p?this.ctx.animationManager.animate({id:this.id,groupId:"clip-rect",phase:"update",from:p,to:c,onUpdate:e=>this.setRootClipRects(e),onComplete:()=>this.setRootClipRects(u)}):this.setRootClipRects(u),this.ctx.layoutManager.emitLayoutComplete(e,{axes:this.axes.map(e=>e.getLayoutState()),series:{rect:o,paddedRect:c,visible:n.series,shouldFlipXY:this.shouldFlipXY()},clipSeries:l})}updateAxes(e){let t,i,r;let s=this.axes.flatMap(e=>e.crossLines??[]).map(e=>e.id);null!=this._lastCrossLineIds&&this._lastCrossLineIds.length===s.length&&this._lastCrossLineIds.every((e,t)=>s[t]===e)?(t=new Map(this._lastAxisAreaWidths.entries()),i=this._lastClipSeries,r={...this._lastVisibility}):(t=new Map,i=!1,r={crossLines:!0,series:!0},this._lastCrossLineIds=s);let a=new Set(this.axes.map(e=>e.position));for(let e of t.keys())a.has(e)||t.delete(e);let o=(e,s,a)=>{if([...e.keys()].some(e=>!t.has(e))||r.crossLines!==a.crossLines||r.series!==a.series||i!==s)return!1;for(let[i,r]of t.entries()){let t=e.get(i);if((null!=r||null!=t)&&r!==t)return!1}return!0},n=e=>{for(let[t,i]of e.entries()){if(i&&Math.abs(i)===1/0){e.set(t,0);continue}e.set(t,null!=i?Math.ceil(i):i)}return e},l=new Map,h={},d=!1,c=this.seriesRect?.clone(),u=0;do{t=new Map(l.entries()),i=d,Object.assign(r,h);let s=this.updateAxesPass(t,e.clone(),c);if(l=n(s.axisAreaWidths),h=s.visibility,d=s.clipSeries,{seriesRect:c}=s,u++>10){ul.warn("unable to find stable axis layout.");break}}while(!o(l,d,h));return this.axes.forEach(e=>{e.update()}),this.axes.forEach(t=>{if(t.setCrossLinesVisible(r.crossLines),c)switch(t.clipGrid(c.x,c.y,c.width+5,c.height+5),t.position){case"left":case"right":t.clipTickLines(e.x,c.y,e.width+5,c.height+5);break;case"top":case"bottom":t.clipTickLines(c.x,e.y,c.width+5,e.height+5)}}),this._lastAxisAreaWidths=t,this._lastVisibility=r,this._lastClipSeries=i,{seriesRect:c,animationRect:e,visibility:r,clipSeries:i}}updateAxesPass(e,t,i){let r=new Map,s=new Map,a={series:!0,crossLines:!0},o=!1,n={},l=this.applySeriesPadding(t),h=i?this.buildCrossLinePadding(e):{},d=this.buildAxisBound(l,e,h,a),c=this.buildSeriesRect(d,e);for(let e of this.axes){let{position:t="left"}=e,{clipSeries:i,axisThickness:a}=this.calculateAxisDimensions({axis:e,seriesRect:c,primaryTickCounts:n,clipSeries:o});r.set(e.id,a),s.has(t)||s.set(t,[]),s.get(t)?.push(e),o=o||i}let u=new Map,p=new Map;for(let[e,t]of s.entries())u.set(e,this.calculateAxisArea(t,r,p));for(let[e,t]of s.entries())this.positionAxes({axes:t,position:e,axisWidths:r,axisOffsets:p,axisAreaWidths:u,axisBound:d,seriesRect:c});return{clipSeries:o,seriesRect:c,axisAreaWidths:u,visibility:a}}buildCrossLinePadding(e){let t={};for(let[i,r=0]of(this.axes.forEach(e=>{e.crossLines?.forEach(e=>{e.calculatePadding?.(t)})}),Object.entries(t)))t[i]=Math.max(r-(e.get(i)??0),0);return t}applySeriesPadding(e){let t=e.clone();return ba.forEach(e=>{let i=this.seriesArea.padding[e],r=this.axes.findLast(t=>t.position===e);r?r.seriesAreaPadding=i:t.shrink(i,e)}),t}buildAxisBound(e,t,i,r){let s=e.clone(),{top:a=0,right:o=0,bottom:n=0,left:l=0}=i,h=l+o,d=a+n,c=(t.get("left")??0)+(t.get("right")??0)+h,u=(t.get("top")??0)+(t.get("bottom")??0)+d;return s.width<=c||s.height<=u?(r.crossLines=!1,r.series=!1):(s.x+=l,s.y+=a,s.width-=h,s.height-=d),s}buildSeriesRect(e,t){let i=e.clone();return i.x+=t.get("left")??0,i.y+=t.get("top")??0,i.width-=(t.get("left")??0)+(t.get("right")??0),i.height-=(t.get("top")??0)+(t.get("bottom")??0),i.width=Math.max(0,i.width),i.height=Math.max(0,i.height),i}clampToOutsideSeriesRect(e,t,i,r){let{x:s,y:a,width:o,height:n}=e,l=[s,a,s+o,a+n][("x"===i?0:1)+(1===r?0:2)];return(1===r?Math.min:Math.max)(t,l)}calculateAxisDimensions(e){let{axis:t,seriesRect:i,primaryTickCounts:r}=e,{clipSeries:s}=e,{position:a="left",direction:o}=t;this.sizeAxis(t,i,a);let n=t.calculateLayout(t.nice?r[o]:void 0);return r[o]??(r[o]=n.primaryTickCount),s||(s=t.dataDomain.clipped||t.visibleRange[0]>0||t.visibleRange[1]<1),{clipSeries:s,axisThickness:Math.ceil(null!=t.thickness&&t.thickness>0?t.thickness:"y"===o?n.bbox.width:n.bbox.height)}}sizeAxis(e,t,i){let r=e instanceof v5||e instanceof yt,s="left"===i||"right"===i,{min:a,max:o}=this.ctx.zoomManager.getAxisZoom(e.id),{width:n,height:l}=t,h=s?l:n,d=0,c=h,{width:u,unit:p,align:g}=e.layoutConstraints;c="px"===p?d+u:c*u/100,"end"===g&&(d=h-(c-d),c=h),r&&s?[a,o]=[1-o,1-a]:s&&([d,c]=[c,d]),e.range=[d,c],e.visibleRange=[a,o],e.gridLength=s?n:l}calculateAxisArea(e,t,i){let r=0,s=0;for(let a of e){i.set(a.id,s);let e=t.get(a.id)??0;r=Math.max(r,s+e),a.layoutConstraints.stacked&&(s+=e+15)}return r}positionAxes(e){let{axes:t,axisBound:i,axisWidths:r,axisOffsets:s,axisAreaWidths:a,seriesRect:o,position:n}=e,l=a.get(n)??0,h="x",d="y",c=1,u=0;for(let e of(("top"===n||"bottom"===n)&&(h="y",d="x",u+=1),u+=i[h],("right"===n||"bottom"===n)&&(c=-1,u+="x"===h?i.width:i.height),t)){let t=a.get("x"===d?"left":"top")??0;e.translation[d]=i[d]+t;let n=r.get(e.id)??0,p=s.get(e.id)??0;e.translation[h]=this.clampToOutsideSeriesRect(o,u+c*(p+n),h,c),e.gridPadding=l-p-n,e.updatePosition()}}shouldFlipXY(){return this.series.every(e=>e instanceof bs&&e.shouldFlipXY())}};bo.className="CartesianChart",bo.type="cartesian";var bn=class e{constructor(e,t,i){this.factoryApi=t,this.licenseManager=i,this.chart=e}static isInstance(t){return t instanceof e||t.constructor?.name==="AgChartInstanceProxy"&&null!=t.chart||null!=t.chart&&this.validateImplementation(t)}static validateImplementation(e){let t=Object.keys(Object.getPrototypeOf(e)??{});return["getOptions","destroy"].every(e=>t.includes(e))}async update(e){this.factoryApi.createOrUpdate(e,this),await this.chart.waitForUpdate()}async updateDelta(e){this.factoryApi.updateUserDelta(this,e),await this.chart.waitForUpdate()}getOptions(){let e=fY(this.chart.getOptions());for(let t in e)t.startsWith("_")&&delete e[t];return e}waitForUpdate(){return this.chart.waitForUpdate()}async download(e){let t=await this.prepareResizedChart(this,e);try{t.chart.download(e?.fileName,e?.fileFormat)}finally{t.destroy()}}async getImageDataURL(e){let t=await this.prepareResizedChart(this,e);try{return t.chart.getCanvasDataURL(e?.fileFormat)}finally{t.destroy()}}getState(){let{factoryApi:{caretaker:e},chart:{ctx:{annotationManager:t}}}=this;return e.save(t)}async setState(e){let{factoryApi:{caretaker:t},chart:{ctx:{annotationManager:i}}}=this;t.restore(e,i),await this.chart.waitForUpdate()}resetAnimations(){this.chart.resetAnimations()}skipAnimations(){this.chart.skipAnimations()}destroy(){this.chart.publicApi=void 0,this.chart.destroy()}async prepareResizedChart(e,t={}){let{chart:i}=e,r=t.width??i.width??i.ctx.scene.canvas.width,s=t.height??i.height??i.ctx.scene.canvas.height,a=e.getState(),o=ys.hasEnterpriseModules(),n={},l=i.chartOptions.getOptions();o&&(n.animation={enabled:!1},wo(l)&&(n.toolbar={enabled:!1}),this.licenseManager?.isDisplayWatermark()&&(n.foreground={text:this.licenseManager.getWatermarkMessage(),image:{url:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjU4IiBoZWlnaHQ9IjQwIiB2aWV3Qm94PSIwIDAgMjU4IDQwIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBkPSJNMjUuNzc5IDI4LjY1N0gxMy4zNTlMMTEuMTczIDM0LjAxMkg1LjY3Mjk3TDE3LjE4MiA3LjA1OTk5SDIxLjk1M0wzMy40NjIgMzQuMDEySDI3Ljk2MkwyNS43NzYgMjguNjU3SDI1Ljc3OVpNMjQuMDY4IDI0LjM5N0wxOS41ODggMTMuNDM0TDE1LjEwNyAyNC4zOTdIMjQuMDY4Wk02Mi4wOTIgMTguODIzSDQ5LjgxN1YyMy4wODZINTYuNzc1QzU2LjU1NSAyNS4yMjIgNTUuNzU1IDI2LjkyNyA1NC4zNzIgMjguMjAyQzUyLjk4OSAyOS40NzYgNTEuMTY2IDMwLjExNSA0OC45MDkgMzAuMTE1QzQ3LjYyMiAzMC4xMTUgNDYuNDUgMjkuODg1IDQ1LjM5MyAyOS40MjNDNDQuMzU4MyAyOC45NzgxIDQzLjQzMjYgMjguMzEzOCA0Mi42OCAyNy40NzZDNDEuOTI3IDI2LjYzOSA0MS4zNDQgMjUuNjMxIDQwLjkzMSAyNC40NTNDNDAuNTE5IDIzLjI3NSA0MC4zMTEgMjEuOTcgNDAuMzExIDIwLjUzN0M0MC4zMTEgMTkuMTA1IDQwLjUxNiAxNy44IDQwLjkzMSAxNi42MjFDNDEuMzQ0IDE1LjQ0MyA0MS45MjcgMTQuNDM2IDQyLjY4IDEzLjU5OEM0My40Mzc2IDEyLjc1NzcgNDQuMzY5NiAxMi4wOTMyIDQ1LjQxMSAxMS42NTFDNDYuNDc4IDExLjE4OSA0Ny42NTYgMTAuOTYgNDguOTQ2IDEwLjk2QzUxLjYxMiAxMC45NiA1My42MzcgMTEuNjAyIDU1LjAyIDEyLjg4NUw1OC4zIDkuNjA0OTlDNTUuODE3IDcuNjY5OTkgNTIuNjc2IDYuNjk5OTkgNDguODcyIDYuNjk5OTlDNDYuNzYgNi42OTk5OSA0NC44NTMgNy4wMzQ5OSA0My4xNTQgNy43MDA5OUM0MS40NTUgOC4zNjc5OSAzOS45OTggOS4zMDM5OSAzOC43ODMgMTAuNTA0QzM3LjU2NyAxMS43MDcgMzYuNjM0IDEzLjE1OCAzNS45NzcgMTQuODU3QzM1LjMxOSAxNi41NTYgMzQuOTk0IDE4LjQ1MSAzNC45OTQgMjAuNTRDMzQuOTk0IDIyLjYzIDM1LjMyOSAyNC40OTQgMzUuOTk1IDI2LjIwNUMzNi42NjIgMjcuOTE2IDM3LjYwNSAyOS4zNzQgMzguODE3IDMwLjU3N0M0MC4wMzIgMzEuNzggNDEuNDg2IDMyLjcxMyA0My4xODggMzMuMzgzQzQ0Ljg4OCAzNC4wNDkgNDYuNzgyIDM0LjM4NCA0OC44NzIgMzQuMzg0QzUwLjk2MSAzNC4zODQgNTIuNzUgMzQuMDQ5IDU0LjM5IDMzLjM4M0M1Ni4wMzEgMzIuNzE2IDU3LjQyNiAzMS43OCA1OC41NzkgMzAuNTc3QzU5LjczMyAyOS4zNzQgNjAuNjE5IDI3LjkxNiA2MS4yMzkgMjYuMjA1QzYxLjg2IDI0LjQ5NCA2Mi4xNyAyMi42MDUgNjIuMTcgMjAuNTRDNjIuMTY5NiAxOS45Njg4IDYyLjE0NDUgMTkuMzk4IDYyLjA5NSAxOC44MjlMNjIuMDkyIDE4LjgyM1pNMTUxLjgxIDE2Ljk4MUMxNTMuNDEgMTQuNjA5IDE1Ny40MTkgMTQuMzU4IDE1OS4wMjIgMTQuMzU4VjE4LjkxQzE1Ni45NTcgMTguOTEgMTU0Ljk4NSAxOC45OTYgMTUzLjc1NyAxOS44OTJDMTUyLjUyOSAyMC43OTIgMTUxLjkxOSAyMS45ODIgMTUxLjkxOSAyMy40NjRWMzMuOTlIMTQ2Ljk2NFYxNC4zNThIMTUxLjczNkwxNTEuODEgMTYuOTgxWk0xNDMuMDExIDE0LjM2MVYzNC4wMzFIMTM4LjI0TDEzOC4xMzEgMzEuMDQ1QzEzNy40NjYgMzIuMDc2IDEzNi41NTEgMzIuOTIxOSAxMzUuNDcxIDMzLjUwNEMxMzQuMzc2IDM0LjA5OSAxMzMuMDY4IDM0LjM5NiAxMzEuNTM2IDM0LjM5NkMxMzAuMiAzNC4zOTYgMTI4Ljk2MyAzNC4xNTIgMTI3LjgyMiAzMy42NjhDMTI2LjcgMzMuMTk2NCAxMjUuNjg5IDMyLjQ5NSAxMjQuODU1IDMxLjYwOUMxMjQuMDE4IDMwLjcyMiAxMjMuMzU0IDI5LjY2MiAxMjIuODcxIDI4LjQyMkMxMjIuMzg0IDI3LjE4NSAxMjIuMTQyIDI1LjgxMSAxMjIuMTQyIDI0LjMwNEMxMjIuMTQyIDIyLjc5OCAxMjIuMzg0IDIxLjM3OCAxMjIuODcxIDIwLjExNkMxMjMuMzU3IDE4Ljg1NCAxMjQuMDE4IDE3Ljc3MiAxMjQuODU1IDE2Ljg3M0MxMjUuNjg4IDE1Ljk3NjQgMTI2LjY5OCAxNS4yNjM2IDEyNy44MjIgMTQuNzhDMTI4Ljk2MyAxNC4yODEgMTMwLjIwMyAxNC4wMzMgMTMxLjUzNiAxNC4wMzNDMTMzLjA0MyAxNC4wMzMgMTM0LjMzIDE0LjMxOCAxMzUuMzk3IDE0Ljg4OEMxMzYuNDYyIDE1LjQ1ODkgMTM3LjM3NSAxNi4yNzggMTM4LjA1NyAxNy4yNzZWMTQuMzYxSDE0My4wMTFaTTEzMi42MzEgMzAuMTMzQzEzNC4yNTYgMzAuMTMzIDEzNS41NjcgMjkuNTk0IDEzNi41NjUgMjguNTEyQzEzNy41NjEgMjcuNDMgMTM4LjA2IDI1Ljk5MSAxMzguMDYgMjQuMTk2QzEzOC4wNiAyMi40MDEgMTM3LjU2MSAyMC45OSAxMzYuNTY1IDE5Ljg5OUMxMzUuNTcgMTguODA3IDEzNC4yNTkgMTguMjU4IDEzMi42MzEgMTguMjU4QzEzMS4wMDMgMTguMjU4IDEyOS43MjkgMTguODA0IDEyOC43MzQgMTkuODk5QzEyNy43MzggMjAuOTkzIDEyNy4yMzkgMjIuNDM4IDEyNy4yMzkgMjQuMjMzQzEyNy4yMzkgMjYuMDI4IDEyNy43MzUgMjcuNDMzIDEyOC43MzQgMjguNTE1QzEyOS43MjkgMjkuNTk0IDEzMS4wMjggMzAuMTM2IDEzMi42MzEgMzAuMTM2VjMwLjEzM1pNOTMuNjk4IDI3Ljg3NkM5My41Nzk1IDI4LjAwMjUgOTMuNDU2NCAyOC4xMjQ2IDkzLjMyOSAyOC4yNDJDOTEuOTQ3IDI5LjUxNiA5MC4xMjMgMzAuMTU1IDg3Ljg2NiAzMC4xNTVDODYuNTggMzAuMTU1IDg1LjQwOCAyOS45MjYgODQuMzUgMjkuNDY0QzgzLjMxNTUgMjkuMDE4OSA4Mi4zODk4IDI4LjM1NDYgODEuNjM3IDI3LjUxN0M4MC44ODQgMjYuNjc5IDgwLjMwMSAyNS42NzIgNzkuODg5IDI0LjQ5NEM3OS40NzYgMjMuMzE1IDc5LjI2OSAyMi4wMSA3OS4yNjkgMjAuNTc4Qzc5LjI2OSAxOS4xNDUgNzkuNDczIDE3Ljg0IDc5Ljg4OSAxNi42NjJDODAuMzAxIDE1LjQ4NCA4MC44ODQgMTQuNDc2IDgxLjYzNyAxMy42MzlDODIuMzk0OSAxMi43OTg3IDgzLjMyNzMgMTIuMTM0MiA4NC4zNjkgMTEuNjkyQzg1LjQzNiAxMS4yMyA4Ni42MTQgMTEgODcuOTAzIDExQzkwLjU3IDExIDkyLjU5NSAxMS42NDIgOTMuOTc3IDEyLjkyNkw5Ny4yNTggOS42NDQ5OUM5NC43NzQgNy43MTA5OSA5MS42MzMgNi43Mzk5OSA4Ny44MjkgNi43Mzk5OUM4NS43MTggNi43Mzk5OSA4My44MTEgNy4wNzQ5OSA4Mi4xMTIgNy43NDE5OUM4MC40MTMgOC40MDc5OSA3OC45NTYgOS4zNDQ5OSA3Ny43NCAxMC41NDVDNzYuNTI1IDExLjc0NyA3NS41OTIgMTMuMTk5IDc0LjkzNCAxNC44OThDNzQuMjc3IDE2LjU5NyA3My45NTEgMTguNDkxIDczLjk1MSAyMC41ODFDNzMuOTUxIDIyLjY3IDc0LjI4NiAyNC41MzQgNzQuOTUzIDI2LjI0NUM3NS42MTkgMjcuOTU3IDc2LjU2MiAyOS40MTQgNzcuNzc0IDMwLjYxN0M3OC45OSAzMS44MiA4MC40NDQgMzIuNzUzIDgyLjE0NiAzMy40MjNDODMuODQ1IDM0LjA5IDg1LjczOSAzNC40MjQgODcuODI5IDM0LjQyNEM4OS45MTkgMzQuNDI0IDkxLjcwOCAzNC4wOSA5My4zNDggMzMuNDIzQzk0LjcxOCAzMi44NjUgOTUuOTE4IDMyLjEyMSA5Ni45NDggMzEuMTkxQzk3LjE0OSAzMS4wMDggOTcuMzQ4IDMwLjgxNSA5Ny41MzcgMzAuNjJMOTMuNzAxIDI3Ljg4NUw5My42OTggMjcuODc2Wk0xMTAuODAyIDE0LjAxNUMxMDkuMTk5IDE0LjAxNSAxMDYuODM2IDE0LjQ3MSAxMDUuNjExIDE2LjE1OEwxMDUuNTM3IDYuMDE1OTlIMTAwLjc2NVYzMy45MzlIMTA1LjcyVjIyLjY0MUMxMDUuNzcxIDIxLjQ2MDcgMTA2LjI4OCAyMC4zNDg4IDEwNy4xNTcgMTkuNTQ4OUMxMDguMDI3IDE4Ljc0OTEgMTA5LjE3OCAxOC4zMjY2IDExMC4zNTggMTguMzc0QzExMy4zOTcgMTguMzc0IDExNC4yNjggMjEuMTU5IDExNC4yNjggMjIuNjQxVjMzLjkzOUgxMTkuMjIzVjIxLjA1OUMxMTkuMjIzIDIxLjA1OSAxMTkuMTQyIDE0LjAxNSAxMTAuODAyIDE0LjAxNVpNMTczLjc2MyAxNC4zNThIMTY5Ljk5OVY4LjcxNDk5SDE2NS4wNDhWMTQuMzU4SDE2MS4yODRWMTguOTE2SDE2NS4wNDhWMzQuMDAzSDE2OS45OTlWMTguOTE2SDE3My43NjNWMTQuMzU4Wk0xOTAuNzg3IDI1LjI2MkMxOTAuMTI5IDI0LjUwMTQgMTg5LjMwNyAyMy44OTk0IDE4OC4zODQgMjMuNTAxQzE4Ny40ODggMjMuMTE3IDE4Ni4zMzEgMjIuNzMyIDE4NC45NDggMjIuMzY0QzE4NC4xNjUgMjIuMTQzOSAxODMuMzkgMjEuODk3OCAxODIuNjIzIDIxLjYyNkMxODIuMTYzIDIxLjQ2MjEgMTgxLjc0MSAyMS4yMDY2IDE4MS4zODMgMjAuODc1QzE4MS4yMzUgMjAuNzQyMSAxODEuMTE4IDIwLjU3ODkgMTgxLjAzOSAyMC4zOTY0QzE4MC45NjEgMjAuMjE0IDE4MC45MjIgMjAuMDE2NiAxODAuOTI3IDE5LjgxOEMxODAuOTI3IDE5LjI3MiAxODEuMTU2IDE4Ljg0NCAxODEuNjI1IDE4LjUxQzE4Mi4xMjEgMTguMTU2IDE4Mi44NjIgMTcuOTc2IDE4My44MjYgMTcuOTc2QzE4NC43OSAxNy45NzYgMTg1LjU4NyAxOC4yMDkgMTg2LjE0OCAxOC42NjhDMTg2LjcwNiAxOS4xMjQgMTg3LjAwNyAxOS43MjUgMTg3LjA3MiAyMC41TDE4Ny4wOTQgMjAuNzgySDE5MS42MzNMMTkxLjYxNyAyMC40NkMxOTEuNTIxIDE4LjQ4NSAxOTAuNzcxIDE2LjkgMTg5LjM4NSAxNS43NUMxODguMDEyIDE0LjYxMiAxODYuMTg1IDE0LjAzMyAxODMuOTYyIDE0LjAzM0MxODIuNDc3IDE0LjAzMyAxODEuMTQxIDE0LjI4NyAxNzkuOTk0IDE0Ljc4NkMxNzguODMxIDE1LjI5MSAxNzcuOTI2IDE1Ljk5NSAxNzcuMjk2IDE2Ljg4MkMxNzYuNjczIDE3Ljc0NTUgMTc2LjMzOCAxOC43ODQgMTc2LjM0MSAxOS44NDlDMTc2LjM0MSAyMS4xNjcgMTc2LjY5OCAyMi4yNDkgMTc3LjM5OSAyMy4wNjRDMTc4LjA2IDIzLjg0MzIgMTc4Ljg5OCAyNC40NTM0IDE3OS44NDIgMjQuODQ0QzE4MC43NDQgMjUuMjE2IDE4MS45MjggMjUuNjA3IDE4My4zNjEgMjZDMTg0LjgwNiAyNi40MSAxODUuODcyIDI2Ljc4NSAxODYuNTMgMjcuMTIzQzE4Ny4xIDI3LjQxNCAxODcuMzc5IDI3Ljg0NSAxODcuMzc5IDI4LjQ0NEMxODcuMzc5IDI5LjA0MiAxODcuMTIyIDI5LjQ2NyAxODYuNTk1IDI5LjgzOUMxODYuMDQzIDMwLjIyNiAxODUuMjM3IDMwLjQyNSAxODQuMjAxIDMwLjQyNUMxODMuMTY2IDMwLjQyNSAxODIuMzk0IDMwLjE3NCAxODEuNzQ5IDI5LjY3NEMxODEuMTEzIDI5LjE4MSAxODAuNzcyIDI4LjU4OSAxODAuNzEgMjcuODY0TDE4MC42ODUgMjcuNTgySDE3Ni4wMTNMMTc2LjAyNSAyNy45MDFDMTc2LjA2NyAyOS4wOTU1IDE3Ni40NzIgMzAuMjQ4NyAxNzcuMTg4IDMxLjIwNkMxNzcuOTA3IDMyLjE4IDE3OC44OTMgMzIuOTU4IDE4MC4xMTggMzMuNTE5QzE4MS4zMzYgMzQuMDc3IDE4Mi43MzIgMzQuMzYyIDE4NC4yNjYgMzQuMzYyQzE4NS44MDEgMzQuMzYyIDE4Ny4xMDkgMzQuMTA4IDE4OC4yMzggMzMuNjA5QzE4OS4zNzYgMzMuMTA0IDE5MC4yNzIgMzIuMzk0IDE5MC45MDEgMzEuNDk0QzE5MS41MzQgMzAuNTkyIDE5MS44NTMgMjkuNTU0IDE5MS44NTMgMjguNDAzQzE5MS44MjggMjcuMTEgMTkxLjQ2NiAyNi4wNTMgMTkwLjc3NyAyNS4yNjJIMTkwLjc4N1oiIGZpbGw9IiM5QjlCOUIiLz4KPHBhdGggZD0iTTI0MS45ODIgMjUuNjU4MlYxNy43MTE3SDIyOC40NDFMMjIwLjQ5NCAyNS42NTgySDI0MS45ODJaIiBmaWxsPSIjOUI5QjlCIi8+CjxwYXRoIGQ9Ik0yNTcuMjM5IDUuOTUwODFIMjQwLjI2NUwyMzIuMjU1IDEzLjg5NzNIMjU3LjIzOVY1Ljk1MDgxWiIgZmlsbD0iIzlCOUI5QiIvPgo8cGF0aCBkPSJNMjEyLjYxMSAzMy42MDQ4TDIxNi42OCAyOS41MzYxSDIzMC40MTJWMzcuNDgyN0gyMTIuNjExVjMzLjYwNDhaIiBmaWxsPSIjOUI5QjlCIi8+CjxwYXRoIGQ9Ik0yMTUuNTk5IDIxLjc4MDNIMjI0LjM3MkwyMzIuMzgyIDEzLjgzMzdIMjE1LjU5OVYyMS43ODAzWiIgZmlsbD0iIzlCOUI5QiIvPgo8cGF0aCBkPSJNMjA2IDMzLjYwNDdIMjEyLjYxMUwyMjAuNDk0IDI1LjY1ODJIMjA2VjMzLjYwNDdaIiBmaWxsPSIjOUI5QjlCIi8+CjxwYXRoIGQ9Ik0yNDAuMjY1IDUuOTUwODFMMjM2LjE5NyAxMC4wMTk0SDIxMC4yNTlWMi4wNzI4OEgyNDAuMjY1VjUuOTUwODFaIiBmaWxsPSIjOUI5QjlCIi8+Cjwvc3ZnPgo=",width:170,height:25,right:25,bottom:50,opacity:.7}}));let h={container:document.createElement("div"),width:r,height:s};null!=t.width&&null!=t.height&&(h.overrideDevicePixelRatio=1);let d=pP(h,n,l),c=await this.factoryApi.createOrUpdate(d);return await c.setState(a),c.chart.ctx.zoomManager.updateZoom("chartProxy",i.ctx.zoomManager.getZoom()),i.series.forEach((e,t)=>{e.visible||(c.chart.series[t].visible=!1)}),c.chart.update(0,{forceNodeDataRefresh:!0}),await c.waitForUpdate(),c}};bn.chartInstances=new WeakMap,c7([f2({oldValue(e){e.destroyed||(e.publicApi=void 0),bn.chartInstances.delete(e)},newValue(e){e.publicApi=this,bn.chartInstances.set(e,this)}})],bn.prototype,"chart",2);var bl=class extends yi{constructor(e){super(),this.ctx=e,this.localeText=void 0}};c7([f3(e=>{e.ctx.localeManager.setLocaleText(e.localeText)}),gp(gv,{optional:!0})],bl.prototype,"localeText",2),c7([f3(e=>{e.ctx.localeManager.setLocaleTextFormatter(e.getLocaleText)}),gp(gC,{optional:!0})],bl.prototype,"getLocaleText",2);var bh={type:"root",optionsKey:"locale",packageType:"community",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","gauge"],moduleFactory:e=>new bl(e)},bd=class extends mo{constructor(){super([0,1],[0,1]),this.type="number"}toDomain(e){return e}ticks(){let e=this.tickCount??mo.defaultTickCount;if(!this.domain||this.domain.length<2||e<1||!this.domain.every(isFinite))return[];this.refresh();let[t,i]=this.getDomain();if(this.interval){let e=Math.abs(this.interval);if(!mD((i-t)/e,this.getPixelRange()))return mE(t,i,e)}return mw(t,i,e,this.minTickCount,this.maxTickCount)}update(){this.domain&&!(this.domain.length<2)&&this.nice&&this.updateNiceDomain()}getTickStep(e,t){return this.interval??mS(e,t,this.tickCount,this.minTickCount,this.maxTickCount)}updateNiceDomain(){let e=this.tickCount;if(e<1){this.niceDomain=[...this.domain];return}let[t,i]=this.domain;if(1===e)[t,i]=function(e,t){let i=Math.abs(t-e),r=10**Math.floor(Math.log10(i)),s=1/0,a=[e,t];for(let o of my){let n=o*r,l=Math.floor(e/n)*n,h=Math.ceil(t/n)*n,d=1-i/Math.abs(h-l);s>d&&(s=d,a=[l,h])}return a}(t,i);else{let e=t>i?Math.ceil:Math.floor,r=i<t?Math.floor:Math.ceil;for(let s=0;s<4;s++){let s=t,a=i,o=this.getTickStep(t,i),[n,l]=this.domain;if(o>=1)t=e(n/o)*o,i=r(l/o)*o;else{let s=1/o;t=e(n*s)/s,i=r(l*s)/s}if(t===s&&i===a)break}}this.niceDomain=[t,i]}tickFormat({ticks:e,specifier:t}){return mM(e??this.ticks(),t)}},bc=class extends v6{constructor(e,t=new bd){super(e,t),this.min=NaN,this.max=NaN}normaliseDataDomain(e){let{min:t,max:i}=this,{extent:r,clipped:s}=mT(e,t,i);return{domain:r,clipped:s}}updateSecondaryAxisTicks(e){if(null==this.dataDomain)throw Error("AG Charts - dataDomain not calculated, cannot perform tick calculation.");if(0===this.dataDomain.domain.length)return[];let{domain:t,ticks:i}=function(e,t,i){var r;let[s,a]=uY(e),o=(r=s=function(e,t,i){let r=Math.pow(10,Math.floor(Math.log10(Math.abs(t-e)/(i-1))));return Math.floor(e/r)*r}(Math.floor(s),a,t),function(e){let t=Math.pow(10,Math.floor(Math.log10(e))),i=e/t*10;return i>0&&i<=1?t/10:i>1&&i<=2?2*t/10:i>1&&i<=5?5*t/10:i>5&&i<=10?10*t/10:i>10&&i<=20?20*t/10:i>20&&i<=40?40*t/10:i>40&&i<=50?50*t/10:i>50&&i<=100?100*t/10:i}((a-r)/(t-1)));return a=s+(t-1)*o,{domain:i?[a,s]:[s,a],ticks:function(e,t,i){let r=Math.floor(Math.log10(t)),s=Math.pow(10,t>0&&t<1?Math.abs(r):0),a=[];for(let r=0;r<i;r++){let i=e+t*r;a[r]=Math.round(i*s)/s}return a}(s,o,t)}}(this.dataDomain.domain,e??0,this.reverse);return this.scale.nice=!1,this.scale.domain=t,this.scale.update(),i}};bc.className="NumberAxis",bc.type="number",c7([gp(gg(gI,gR("max"))),vz(NaN)],bc.prototype,"min",2),c7([gp(gg(gI,gL("min"))),vz(NaN)],bc.prototype,"max",2);var bu=g8(e=>pE(e)&&0!==e,"a non-zero number"),bp=class extends bc{constructor(e){super(e,new mI),this.min=NaN,this.max=NaN}normaliseDataDomain(e){let{min:t,max:i}=this,{extent:r,clipped:s}=mT(e,t,i),a=r[0]>r[1],o=r[0]<0&&r[1]>0,n=0===r[0]&&0===r[1];return(a||o||n)&&(o?ul.warn("the data domain crosses zero, the chart data cannot be rendered. See log axis documentation for more information."):n&&ul.warn("the data domain has 0 extent, no data is rendered.")),0===r[0]&&(r[0]=1),0===r[1]&&(r[1]=-1),{domain:r,clipped:s}}set base(e){this.scale.base=e}get base(){return this.scale.base}};bp.className="LogAxis",bp.type="log",c7([gp(gg(gI,bu,gR("max"))),vz(NaN)],bp.prototype,"min",2),c7([gp(gg(gI,bu,gL("min"))),vz(NaN)],bp.prototype,"max",2);var bg=class extends v6{constructor(e){super(e,new mN),this.min=void 0,this.max=void 0}normaliseDataDomain(e){let{min:t,max:i}=this,r=!1;return"number"==typeof t&&(t=new Date(t)),"number"==typeof i&&(i=new Date(i)),e.length>2&&(e=mk(e)?.map(e=>new Date(e))??[]),t instanceof Date&&(r||(r=t>e[0]),e=[t,e[1]]),i instanceof Date&&(r||(r=i<e[1]),e=[e[0],i]),e[0]>e[1]&&(e=[]),{domain:e,clipped:r}}onFormatChange(e,t,i,r){r?super.onFormatChange(e,t,i,r):(this.labelFormatter=this.scale.tickFormat({ticks:e,domain:i}),this.datumFormatter=this.scale.tickFormat({ticks:e,domain:i,formatOffset:1}))}};bg.className="TimeAxis",bg.type="time",c7([gp(gg(gF,gR("max")),{optional:!0})],bg.prototype,"min",2),c7([gp(gg(gF,gL("min")),{optional:!0})],bg.prototype,"max",2);var bm=(e,{x0:t,y0:i,x1:r,y1:s,cx:a,cy:o},n,l)=>{if(l&&e.moveTo(t,i),t!==r||i!==s){let l=Math.atan2(i-o,t-a),h=Math.atan2(s-o,r-a);e.arc(a,o,n,l,h)}else e.lineTo(t,i)},bf=(e,t,i,r,s)=>{let a=!1,o=!1,n=r-Math.sqrt(Math.max(s**2-i**2,0)),l=0,h=0,d=i-Math.sqrt(Math.max(s**2-r**2,0));return n>e?(a=!0,n=e,l=i-Math.sqrt(Math.max(s**2-(r-e)**2))):n<1e-6&&(n=0),d>t?(o=!0,h=r-Math.sqrt(Math.max(s**2-(i-t)**2)),d=t):d<1e-6&&(d=0),{leading0:n,leading1:l,trailing0:h,trailing1:d,leadingClipped:a,trailingClipped:o}},bv=(e,t,i,r,s,a,o)=>{let n,l,h,d,{topLeft:c,topRight:u,bottomRight:p,bottomLeft:g}=a,m=Math.max(c+g,u+p),f=Math.max(c+u,g+p);if(m<=0&&f<=0){null==o?e.rect(t,i,r,s):e.rect(o.x,o.y,o.width,o.height);return}if(null==o&&c===u&&c===p&&c===g){e.roundRect(t,i,r,s,c);return}if(r<0&&(t+=r,r=Math.abs(r)),s<0&&(i+=s,s=Math.abs(s)),r<=0||s<=0)return;if(null==o)o=new u3(t,i,r,s);else{let e=Math.max(t,o.x),a=Math.min(t+r,o.x+o.width),n=Math.max(i,o.y);o=new u3(e,n,a-e,Math.min(i+s,o.y+o.height)-n)}let v=Math.max(m/s,f/r,1);v>1&&(c/=v,u/=v,p/=v,g/=v);let y=!0,C=!0,w=!0,b=!0;{let e=bf(o.height,o.width,Math.max(t+c-o.x,0),Math.max(i+c-o.y,0),c);e.leadingClipped&&(b=!1),e.trailingClipped&&(C=!1);let r=Math.max(o.x+e.leading1,o.x),s=Math.max(o.y+e.leading0,o.y),a=Math.max(o.x+e.trailing1,o.x);n={x0:r,y0:s,x1:a,y1:Math.max(o.y+e.trailing0,o.y),cx:t+c,cy:i+c}}if(C){let e=bf(o.width,o.height,Math.max(i+u-o.y,0),Math.max(o.x+o.width-(t+r-u),0),u);e.leadingClipped&&(y=!1),e.trailingClipped&&(w=!1);let s=Math.min(o.x+o.width-e.leading0,o.x+o.width),a=Math.max(o.y+e.leading1,o.y),n=Math.min(o.x+o.width-e.trailing0,o.x+o.width);l={x0:s,y0:a,x1:n,y1:Math.max(o.y+e.trailing1,o.y),cx:t+r-u,cy:i+u}}if(w){let e=bf(o.height,o.width,Math.max(o.x+o.width-(t+r-p),0),Math.max(o.y+o.height-(i+s-p),0),p);e.leadingClipped&&(C=!1),e.trailingClipped&&(b=!1);let a=Math.min(o.x+o.width-e.leading1,o.x+o.width),n=Math.min(o.y+o.height-e.leading0,o.y+o.height),l=Math.min(o.x+o.width-e.trailing1,o.x+o.width);h={x0:a,y0:n,x1:l,y1:Math.min(o.y+o.height-e.trailing0,o.y+o.height),cx:t+r-p,cy:i+s-p}}if(b){let e=bf(o.width,o.height,Math.max(o.y+o.height-(i+s-g),0),Math.max(t+g-o.x,0),g);e.leadingClipped&&(w=!1),e.trailingClipped&&(y=!1);let r=Math.max(o.x+e.leading0,o.x),a=Math.min(o.y+o.height-e.leading1,o.y+o.height),n=Math.max(o.x+e.trailing0,o.x);d={x0:r,y0:a,x1:n,y1:Math.min(o.y+o.height-e.trailing1,o.y+o.height),cx:t+g,cy:i+s-g}}let S=!1;y&&null!=n&&(bm(e,n,c,!S),S||(S=!0)),C&&null!=l&&(bm(e,l,u,!S),S||(S=!0)),w&&null!=h&&(bm(e,h,p,!S),S||(S=!0)),b&&null!=d&&(bm(e,d,g,!S),S||(S=!0)),e.closePath()},by=class extends yG{constructor(){super(...arguments),this.borderPath=new yO,this.x=0,this.y=0,this.width=10,this.height=10,this.topLeftCornerRadius=0,this.topRightCornerRadius=0,this.bottomRightCornerRadius=0,this.bottomLeftCornerRadius=0,this.clipBBox=void 0,this.crisp=!1,this.lastUpdatePathStrokeWidth=fR.defaultStyles.strokeWidth,this.effectiveStrokeWidth=fR.defaultStyles.strokeWidth,this.hittester=super.isPointInPath,this.distanceCalculator=super.distanceSquaredTransformedPoint,this.microPixelEffectOpacity=1}set cornerRadius(e){this.topLeftCornerRadius=e,this.topRightCornerRadius=e,this.bottomRightCornerRadius=e,this.bottomLeftCornerRadius=e}isDirtyPath(){return this.lastUpdatePathStrokeWidth!==this.strokeWidth||!!(this.path.isDirty()||this.borderPath.isDirty())}updatePath(){let{path:e,borderPath:t,crisp:i,topLeftCornerRadius:r,topRightCornerRadius:s,bottomRightCornerRadius:a,bottomLeftCornerRadius:o}=this,{x:n,y:l,width:h,height:d,strokeWidth:c,clipBBox:u}=this,p=1/(this.layerManager?.canvas.pixelRatio??1),g=1;if(e.clear(!0),t.clear(!0),i&&(h<=p&&(g*=h/p),d<=p&&(g*=d/p),h=this.align(n,h),d=this.align(l,d),n=this.align(n),l=this.align(l),u=null!=u?new u3(this.align(u.x),this.align(u.y),this.align(u.x,u.width),this.align(u.y,u.height)):void 0),c){if(h<p){let e=n+p/2;t.moveTo(e,l),t.lineTo(e,l+d),c=p,this.borderClipPath=void 0}else if(d<p){let e=l+p/2;t.moveTo(n,e),t.lineTo(n+h,e),c=p,this.borderClipPath=void 0}else if(c<h&&c<d){let i=c/2;n+=i,l+=i,h-=c,d-=c;let p=u?.clone().shrink(i),g={topLeft:r>0?r-c:0,topRight:s>0?s-c:0,bottomRight:a>0?a-c:0,bottomLeft:o>0?o-c:0};this.borderClipPath=void 0,h>0&&d>0&&(null==p||p?.width>0&&p?.height>0)&&(bv(e,n,l,h,d,g,p),bv(t,n,l,h,d,g,p))}else this.borderClipPath=this.borderClipPath??new yO,this.borderClipPath.clear(!0),this.borderClipPath.rect(n,l,h,d),t.rect(n,l,h,d)}else this.borderClipPath=void 0,bv(e,n,l,h,d,{topLeft:r,topRight:s,bottomRight:a,bottomLeft:o},u);if([r,s,a,o].every(e=>0===e)){let e=this.getBBox();this.hittester=e.containsPoint.bind(e),this.distanceSquared=(e,t)=>this.getBBox().distanceSquared(e,t)}else this.hittester=super.isPointInPath,this.distanceCalculator=super.distanceSquaredTransformedPoint;this.effectiveStrokeWidth=c,this.lastUpdatePathStrokeWidth=c,this.microPixelEffectOpacity=g}computeBBox(){let{x:e,y:t,width:i,height:r,clipBBox:s}=this;return s?.clone()??new u3(e,t,i,r)}isPointInPath(e,t){return this.hittester(e,t)}get midPoint(){return{x:this.x+this.width/2,y:this.y+this.height/2}}distanceSquared(e,t){return this.distanceCalculator(e,t)}applyFillAlpha(e){let{fillOpacity:t,microPixelEffectOpacity:i,opacity:r}=this;e.globalAlpha*=r*t*i}renderStroke(e){let{stroke:t,effectiveStrokeWidth:i}=this;if(t&&i){let{globalAlpha:r}=e,{strokeOpacity:s,lineDash:a,lineDashOffset:o,lineCap:n,lineJoin:l,borderPath:h,borderClipPath:d,opacity:c,microPixelEffectOpacity:u}=this;d&&e.clip(d.getPath2D()),e.strokeStyle=t,e.globalAlpha*=c*s*u,e.lineWidth=i,a&&e.setLineDash(a),o&&(e.lineDashOffset=o),n&&(e.lineCap=n),l&&(e.lineJoin=l),e.stroke(h.getPath2D()),e.globalAlpha=r}}};by.className="Rect",c7([yB()],by.prototype,"x",2),c7([yB()],by.prototype,"y",2),c7([yB()],by.prototype,"width",2),c7([yB()],by.prototype,"height",2),c7([yB()],by.prototype,"topLeftCornerRadius",2),c7([yB()],by.prototype,"topRightCornerRadius",2),c7([yB()],by.prototype,"bottomRightCornerRadius",2),c7([yB()],by.prototype,"bottomLeftCornerRadius",2),c7([yB()],by.prototype,"clipBBox",2),c7([yB()],by.prototype,"crisp",2);var bC=class extends yi{constructor(e,t=0,i=!1){super(),this.zIndex=t,this.layer=i,this.rectNode=new by,this.textNode=new fz,this.fill="white",this.node=new mQ({name:"background",zIndex:this.zIndex,layer:this.layer}),this.node.append([this.rectNode,this.textNode]),this.visible=!0,this.destroyFns.push(e.scene.attachNode(this.node),e.layoutManager.addListener("layout:complete",e=>this.onLayoutComplete(e)))}onLayoutComplete(e){let{width:t,height:i}=e.chart;this.rectNode.width=t,this.rectNode.height=i}};c7([gp(gy),f1("node","visible")],bC.prototype,"visible",2),c7([gp(gO,{optional:!0}),f1("rectNode","fill")],bC.prototype,"fill",2),c7([gp(gf,{optional:!0})],bC.prototype,"image",2),c7([gp(gw,{optional:!0}),f1("textNode")],bC.prototype,"text",2);var bw={type:"root",optionsKey:"background",packageType:"community",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","gauge"],moduleFactory:e=>new bC(e)},bb=class{constructor(){this.offscreenCanvas=new OffscreenCanvas(1,1);let e=this.offscreenCanvas.getContext("2d");if(null==e)throw TypeError("AG Charts - invalid 2d context");this.renderCtx={ctx:e,devicePixelRatio:1,forceRender:!0,resized:!1,debugNodes:{}}}resize({spritePixelRatio:e,spriteWidth:t,spriteHeight:i}){this.offscreenCanvas.width=Math.max(t,0)*e,this.offscreenCanvas.height=Math.max(i,0)*e}renderSprite(e,t){e=u_(e);let{renderCtx:i,renderCtx:{ctx:r},offscreenCanvas:s}=this,{scale:a=1,translateX:o=0,translateY:n=0}=t??{};for(let t of(r.resetTransform(),r.clearRect(0,0,s.width,s.height),r.save(),r.beginPath(),r.setTransform(a,0,0,a,o,n),e))t.render(i);return r.closePath(),r.restore(),s.transferToImageBitmap()}};function bS(e,t,i,r){t.addEventListener(i,r);let s=()=>t.removeEventListener(i,r);return e.push(s),s}function bx(e,t,i){bS(e,t,"keydown",e=>{"Escape"===e.key&&i(e)})}function bM(e,t,...i){return!(e.shiftKey||e.altKey||e.ctrlKey||e.metaKey)&&(e.key===t||i.some(t=>e.key===t))}function bE(e,t,i,r){i&&bS(e,t,"keydown",e=>{bM(e,r)&&i.focus()})}var bD={horizontal:{nextKey:"ArrowRight",prevKey:"ArrowLeft"},vertical:{nextKey:"ArrowDown",prevKey:"ArrowUp"}};function bI(e){return e.toolbar.role="toolbar",e.toolbar.ariaOrientation=e.orientation,e.toolbar.ariaHidden=(0===e.buttons.length).toString(),bk(e)}function bk(e){let{orientation:t,buttons:i,wrapAround:r=!1,onEscape:s,onFocus:a,onBlur:o}=e,{nextKey:n,prevKey:l}=bD[t],h=e=>{e.target&&"tabIndex"in e.target&&(i.forEach(e=>e.tabIndex=-1),e.target.tabIndex=0)},[d,c]=r?[i.length,i.length]:[0,1/0],u=[];for(let e=0;e<i.length;e++){let t=i[(d+e-1)%c],r=i[e],p=i[(d+e+1)%c];bS(u,r,"focus",h),a&&bS(u,r,"focus",a),o&&bS(u,r,"blur",o),s&&bx(u,r,s),function(e,t,i,r,s,a){bE(e,t,s,a),bE(e,t,i,r),bS(e,t,"keydown",e=>{bM(e,r,a)&&e.preventDefault()})}(u,r,t,l,p,n),r.tabIndex=0===e?0:-1}return u}var bT=class{constructor(e,t,i){this.lastFocus=t,this.closeCallback=i,this.destroyFns=[],this.destroyFns.push(function(e,t,i){let r=bS(e,window,"mousedown",e=>{[0,2].includes(e.button)&&!function(e,t){if(t.target instanceof Element){let{x:i,y:r,width:s,height:a}=e.getBoundingClientRect(),{clientX:o,clientY:n}=t;return o>=i&&n>=r&&o<=i+s&&n<=r+a}return!1}(t,e)&&(i(),r())});return r}(this.destroyFns,e,()=>this.close()))}close(){this.destroyFns.forEach(e=>e()),this.destroyFns.length=0,this.closeCallback(),this.finishClosing()}finishClosing(){this.destroyFns.forEach(e=>e()),this.destroyFns.length=0,f7(this.lastFocus,"aria-expanded",!1),this.lastFocus?.focus(),this.lastFocus=void 0}};function bA(e){let{device:t,orientation:i,menu:r,buttons:s,closeCallback:a,autoCloseOnBlur:o=!1,skipMouseFocusRestore:n=!1}=e,{nextKey:l,prevKey:h}=bD[i];f7(t.lastFocus,"aria-expanded",!0);let d=new bT(r,"keyboard"!==t.type&&n?void 0:t.lastFocus,a),c=()=>d.close(),{destroyFns:u}=d;if(r.role="menu",r.ariaOrientation=i,bk({orientation:i,buttons:s,onEscape:c,wrapAround:!0}),r.tabIndex=-1,bx(u,r,c),bS(u,r,"keydown",e=>{e.target===r&&(e.key===l||e.key===h)&&(e.preventDefault(),s[0]?.focus())}),o){let e=e=>{s.includes(e.relatedTarget)||c()};for(let t of s)bS(u,t,"blur",e)}return"keyboard"===t.type?s[0]?.focus():r.focus(),d}function bR(e,t){return i=>{if("true"===e.ariaDisabled)return i.preventDefault();t(i)}}function bL(e){return"button"in e?0===e.button:!e.altKey&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&["Enter","Space"].includes(e.code)}var bP=class extends pe{constructor(e){super(),this.sourceImage=e,this.x=0,this.y=0,this.width=0,this.height=0,this.opacity=1}updateBitmap(e,t,i,r){this.sourceImage=e,this.width=e.width/t,this.height=e.height/t,this.x=i/t,this.y=r/t,this.markDirty(this,3)}render(e){let{ctx:t,forceRender:i,stats:r}=e;if(0===this.dirty&&!i){r&&r.nodesSkipped++;return}let s=this.sourceImage;s&&(t.globalAlpha=this.opacity,t.drawImage(s,0,0,s.width,s.height,this.x,this.y,this.width,this.height),super.render(e))}};c7([u6({redraw:3})],bP.prototype,"x",2),c7([u6({redraw:3})],bP.prototype,"y",2),c7([u6({redraw:3})],bP.prototype,"width",2),c7([u6({redraw:3})],bP.prototype,"height",2),c7([u6({redraw:3})],bP.prototype,"opacity",2);var bF=class extends mZ(mQ){constructor(){super({name:"markerLabelGroup"}),this.label=new fz,this.symbolsGroup=new mQ({name:"legend-markerLabel-symbols"}),this.bitmap=new bP,this.bitmapDirty=!0,this.enabled=!0,this.pageIndex=NaN,this._markers=[],this._lines=[];let{markers:e,label:t,lines:i}=this;t.textBaseline="middle",t.fontSize=12,t.fontFamily="Verdana, sans-serif",t.fill="black",t.y=1,this.updateSymbols(e,i),this.append([this.symbolsGroup,t])}destroy(){super.destroy(),this.proxyButton?.button.remove(),this.proxyButton?.listitem.remove()}get markers(){return this._markers}get lines(){return this._lines}updateSymbols(e,t){mA(this._markers,e)&&mA(this._lines,t)||(this.bitmapDirty=!0,this._markers=e,this._lines=t,this.symbolsGroup.clear(),this.symbolsGroup.append([this.bitmap,...e,...t]))}setEnabled(e){this.enabled=e,this.refreshVisibilities()}refreshVisibilities(){let e=this.enabled?1:.5;this.label.opacity=e,this.opacity=e,this.bitmap.opacity=e,this.setBitmapVisibility(!this.enabled)}setBitmapVisibility(e){let{lines:t,markers:i}=this;[t,i].forEach(t=>t.forEach(t=>t.visible=!e)),this.bitmap.visible=e}update(e,{spriteAAPadding:t,spritePixelRatio:i},r){let{markers:s,lines:a}=this,o=0,n=0,l=0;for(let e=0;e<Math.max(s.length,a.length);e++){let{length:t,spacing:i,isCustomMarker:h}=r[e]??0,d=s[e],c=a[e],u=d?.size??0,p=1/0,g=1/0,m=1/0,f=1/0,v=1/0;if(d){let e=d.constructor.center,i=(u+d.strokeWidth)/2;h?(d.x=0,d.y=0,d.translationX=(e.x-.5)*u+t/2+l,d.translationY=(e.y-.5)*u,f=d.translationY-i,v=d.translationX-i):(d.x=(e.x-.5)*u+t/2+l,d.y=(e.y-.5)*u,f=d.y-i,v=d.x-i)}c&&(c.x1=l,c.x2=l+t,c.y1=0,c.y2=0,c.markDirty(this,3),p=-c.strokeWidth/2,g=c.x1,m=c.x2),l+=i+Math.max(t,u),o=Math.min(o,g,m,v),n=Math.min(n,p,f)}let h=r.at(-1),d=this.lines.at(-1),c=this.markers.at(-1),u=d?d.x2:-1/0,p=(c?.x??0)+(c?.size??0)/2;if(this.label.x=Math.max(u,p)+(h?.spacing??0),this.bitmapDirty){this.setBitmapVisibility(!1);let r=(t+o)*i,s=(t-n)*i,a=e.renderSprite(this.symbolsGroup,{scale:i,translateX:Math.floor(r),translateY:Math.floor(s)});this.bitmap.updateBitmap(a,i,Math.ceil(-r),Math.ceil(-s)),this.bitmapDirty=!1,this.refreshVisibilities()}if(r.length<2)return;let g=this.symbolsGroup.getBBox(),m=Math.max(c?.size??0,h?.length??0),f=new u3(g.x+m/2,g.y,m,g.height);this.symbolsGroup.setClipRectInGroupCoordinateSpace(f)}computeBBox(){let{label:e,lines:t,markers:i}=this;return this.toParent(mQ.computeChildrenBBox(uz([e],t,i),{skipInvisible:!1}))}};bF.className="MarkerLabel",c7([f1("label")],bF.prototype,"text",2),c7([f1("label")],bF.prototype,"fontStyle",2),c7([f1("label")],bF.prototype,"fontWeight",2),c7([f1("label")],bF.prototype,"fontSize",2),c7([f1("label")],bF.prototype,"fontFamily",2),c7([f1("label","fill")],bF.prototype,"color",2);var bN=class extends gd{constructor(){super(...arguments),this.color="black",this.fontStyle=void 0,this.fontWeight=void 0,this.fontSize=12,this.fontFamily="Verdana, sans-serif"}};c7([gp(gO)],bN.prototype,"color",2),c7([gp(gK,{optional:!0})],bN.prototype,"fontStyle",2),c7([gp(gZ,{optional:!0})],bN.prototype,"fontWeight",2),c7([gp(gM)],bN.prototype,"fontSize",2),c7([gp(gw)],bN.prototype,"fontFamily",2);var bO=class extends gd{constructor(){super(...arguments),this.size=15,this.fill=void 0,this.fillOpacity=void 0,this.stroke=void 0,this.strokeWidth=1,this.strokeOpacity=1}};c7([gp(gM)],bO.prototype,"size",2),c7([gp(gO,{optional:!0})],bO.prototype,"fill",2),c7([gp(gE,{optional:!0})],bO.prototype,"fillOpacity",2),c7([gp(gO,{optional:!0})],bO.prototype,"stroke",2),c7([gp(gM)],bO.prototype,"strokeWidth",2),c7([gp(gE)],bO.prototype,"strokeOpacity",2);var bB=class extends gd{constructor(e){super(),this.parent=e,this.shape=wQ,this.size=15,this.padding=8}};c7([f2({changeValue(){this.parent.marker===this&&this.parent.onMarkerShapeChange()}})],bB.prototype,"shape",2),c7([gp(gM)],bB.prototype,"size",2),c7([gp(gM)],bB.prototype,"padding",2);var bG=class extends gd{constructor(e,t,i,r){super(),this.chartUpdateCallback=e,this.pageUpdateCallback=t,this.regionManager=i,this.cursorManager=r,this.id=uB(this),this.marker=new bB(this),this.activeStyle=new bO,this.inactiveStyle=new bO,this.highlightStyle=new bO,this.label=new bN,this.group=new m1({name:"pagination"}),this.labelNode=new fz,this.destroyFns=[],this.totalPages=0,this.currentPage=0,this.translationX=0,this.translationY=0,this.nextButtonDisabled=!1,this.previousButtonDisabled=!1,this._visible=!0,this._enabled=!0,this._orientation="vertical",this._nextButton=new wQ,this._previousButton=new wQ,this.labelNode.setProperties({textBaseline:"middle",fontSize:12,fontFamily:"Verdana, sans-serif",fill:"black",y:1}),this.group.append([this.nextButton,this.previousButton,this.labelNode]);let s=this.regionManager.addRegion("pagination",this.group);this.destroyFns.push(s.addListener("click",e=>this.onPaginationClick(e)),s.addListener("hover",e=>this.onPaginationMouseMove(e))),this.update(),this.updateMarkers()}destroy(){this.destroyFns.forEach(e=>e())}set visible(e){this._visible=e,this.updateGroupVisibility()}get visible(){return this._visible}set enabled(e){this._enabled=e,this.updateGroupVisibility()}get enabled(){return this._enabled}updateGroupVisibility(){this.group.visible=this.enabled&&this.visible}set orientation(e){(this._orientation=e,"horizontal"===e)?(this.previousButton.rotation=-Math.PI/2,this.nextButton.rotation=Math.PI/2):(this.previousButton.rotation=0,this.nextButton.rotation=Math.PI)}get orientation(){return this._orientation}set nextButton(e){this._nextButton!==e&&(this.group.removeChild(this._nextButton),this._nextButton=e,this.group.appendChild(e))}get nextButton(){return this._nextButton}set previousButton(e){this._previousButton!==e&&(this.group.removeChild(this._previousButton),this._previousButton=e,this.group.appendChild(e))}get previousButton(){return this._previousButton}update(){this.updateLabel(),this.updatePositions(),this.enableOrDisableButtons()}updatePositions(){this.group.translationX=this.translationX,this.group.translationY=this.translationY,this.updateLabelPosition(),this.updateNextButtonPosition()}updateLabelPosition(){let{size:e,padding:t}=this.marker;this.nextButton.size=e,this.previousButton.size=e,this.labelNode.x=e/2+t}updateNextButtonPosition(){let e=this.labelNode.getBBox();this.nextButton.translationX=e.width+(this.marker.size/2+this.marker.padding)*2}updateLabel(){let{currentPage:e,totalPages:t,labelNode:i,label:{color:r,fontStyle:s,fontWeight:a,fontSize:o,fontFamily:n}}=this;i.text=`${e+1} / ${t}`,i.fill=r,i.fontStyle=s,i.fontWeight=a,i.fontSize=o,i.fontFamily=n}updateMarkers(){let{nextButton:e,previousButton:t,nextButtonDisabled:i,previousButtonDisabled:r,activeStyle:s,inactiveStyle:a,highlightStyle:o,highlightActive:n}=this,l=(e,t)=>t?a:e===n?o:s;this.updateMarker(e,l("next",i)),this.updateMarker(t,l("previous",r))}updateMarker(e,t){let{size:i}=this.marker;e.size=i,e.fill=t.fill,e.fillOpacity=t.fillOpacity??1,e.stroke=t.stroke,e.strokeWidth=t.strokeWidth,e.strokeOpacity=t.strokeOpacity}enableOrDisableButtons(){let{currentPage:e,totalPages:t}=this,i=0===t;this.nextButtonDisabled=e===t-1||i,this.previousButtonDisabled=0===e||i}clickNext(){this.incrementPage(),this.onPaginationChanged()}clickPrevious(){this.decrementPage(),this.onPaginationChanged()}setPage(e){e=uW(0,e,this.totalPages-1),this.currentPage!==e&&(this.currentPage=e,this.onPaginationChanged())}onPaginationClick(e){let{regionOffsetX:t,regionOffsetY:i}=e;e.preventDefault();let r=this.group.pickNode(t,i,!0);r!==this.nextButton||this.nextButtonDisabled?r!==this.previousButton||this.previousButtonDisabled||this.clickPrevious():this.clickNext()}onPaginationMouseMove(e){let{regionOffsetX:t,regionOffsetY:i}=e,r=this.group.pickNode(t,i,!0);r!==this.nextButton||this.nextButtonDisabled?r!==this.previousButton||this.previousButtonDisabled?(this.cursorManager.updateCursor(this.id),this.highlightActive=void 0):(this.cursorManager.updateCursor(this.id,"pointer"),this.highlightActive="previous"):(this.cursorManager.updateCursor(this.id,"pointer"),this.highlightActive="next"),this.updateMarkers(),this.chartUpdateCallback(6)}onPaginationChanged(){this.pageUpdateCallback(this.currentPage)}incrementPage(){this.currentPage=Math.min(this.currentPage+1,this.totalPages-1)}decrementPage(){this.currentPage=Math.max(this.currentPage-1,0)}onMarkerShapeChange(){let e=mY(w2(this.marker.shape||wQ));this.previousButton=new e,this.nextButton=new e,this.updatePositions(),this.updateMarkers(),this.chartUpdateCallback(6)}attachPagination(e){e.append(this.group)}getBBox(){return this.group.getBBox()}computeCSSBounds(){return{prev:mq.toCanvas(this.previousButton),next:mq.toCanvas(this.nextButton)}}};bG.className="Pagination",c7([gp(gf)],bG.prototype,"marker",2),c7([gp(gf)],bG.prototype,"activeStyle",2),c7([gp(gf)],bG.prototype,"inactiveStyle",2),c7([gp(gf)],bG.prototype,"highlightStyle",2),c7([gp(gf)],bG.prototype,"label",2);var bz=class extends gd{constructor(){super(...arguments),this.maxLength=void 0,this.color="black",this.fontStyle=void 0,this.fontWeight=void 0,this.fontSize=12,this.fontFamily="Verdana, sans-serif"}};c7([gp(gM,{optional:!0})],bz.prototype,"maxLength",2),c7([gp(gO)],bz.prototype,"color",2),c7([gp(gK,{optional:!0})],bz.prototype,"fontStyle",2),c7([gp(gZ,{optional:!0})],bz.prototype,"fontWeight",2),c7([gp(gM)],bz.prototype,"fontSize",2),c7([gp(gw)],bz.prototype,"fontFamily",2),c7([gp(gC,{optional:!0})],bz.prototype,"formatter",2);var b_=class extends gd{constructor(){super(...arguments),this.size=15,this.padding=8}};c7([f3(e=>e.parent?.onMarkerShapeChange())],b_.prototype,"shape",2),c7([gp(gM)],b_.prototype,"size",2),c7([gp(gM)],b_.prototype,"padding",2),c7([gp(gM,{optional:!0})],b_.prototype,"strokeWidth",2),c7([gp(gy)],b_.prototype,"enabled",2);var bV=class extends gd{};c7([gp(gM,{optional:!0})],bV.prototype,"strokeWidth",2),c7([gp(gM,{optional:!0})],bV.prototype,"length",2);var bj=class extends gd{constructor(){super(...arguments),this.paddingX=16,this.paddingY=8,this.showSeriesStroke=!1,this.marker=new b_,this.label=new bz,this.line=new bV}};c7([gp(gM,{optional:!0})],bj.prototype,"maxWidth",2),c7([gp(gM)],bj.prototype,"paddingX",2),c7([gp(gM)],bj.prototype,"paddingY",2),c7([gp(gy)],bj.prototype,"showSeriesStroke",2),c7([gp(gf)],bj.prototype,"marker",2),c7([gp(gf)],bj.prototype,"label",2),c7([gp(gf)],bj.prototype,"line",2);var bH=class extends gd{};c7([gp(gC,{optional:!0})],bH.prototype,"legendItemClick",2),c7([gp(gC,{optional:!0})],bH.prototype,"legendItemDoubleClick",2);var bU="legend-visibility",bW="legend-other-series",b$=class extends gd{constructor(e){super(),this.ctx=e,this.id=uB(this),this.group=new m1({name:"legend",layer:!0,zIndex:14}),this.itemSelection=fl.select(this.group,bF),this.spriteRenderer=new bb,this.oldSize=[0,0],this.pages=[],this.maxPageSize=[0,0],this.paginationTrackingIndex=0,this.truncatedItems=new Set,this._data=[],this._symbolsDirty=!0,this.toggleSeries=!0,this.item=new bj,this.listeners=new bH,this.enabled=!0,this.position="bottom",this.spacing=20,this.destroyFns=[],this.size=[0,0],this._visible=!0,this.item.marker.parent=this,this.pagination=new bG(t=>e.updateService.update(t),e=>this.updatePageNumber(e),e.regionManager,e.cursorManager),this.pagination.attachPagination(this.group),this.destroyFns.push(e.contextMenuRegistry.registerDefaultAction({id:bU,type:"legend",label:"contextMenuToggleSeriesVisibility",action:e=>this.contextToggleVisibility(e)}),e.contextMenuRegistry.registerDefaultAction({id:bW,type:"legend",label:"contextMenuToggleOtherSeries",action:e=>this.contextToggleOtherSeries(e)}));let{Default:t,Animation:i,ContextMenu:r}=Ce,s=t|i,a=e.regionManager.addRegion("legend",this.group);this.destroyFns.push(a.addListener("contextmenu",e=>this.checkContextClick(e),t|i|r),a.addListener("click",e=>this.checkLegendClick(e),s),a.addListener("dblclick",e=>this.checkLegendDoubleClick(e),s),a.addListener("hover",e=>this.handleLegendMouseMove(e),s),a.addListener("leave",()=>this.handleLegendMouseExit(),s),a.addListener("enter",e=>this.handleLegendMouseEnter(e),s),e.layoutManager.registerElement(1,e=>this.positionLegend(e)),e.localeManager.addListener("locale-changed",()=>this.onLocaleChanged()),()=>this.group.parent?.removeChild(this.group)),this.proxyLegendToolbar=this.ctx.proxyInteractionService.createProxyContainer({type:"list",id:`${this.id}-toolbar`,classList:["ag-charts-proxy-legend-toolbar"],ariaLabel:{id:"ariaLabelLegend"},ariaHidden:!0}),this.proxyLegendPagination=this.ctx.proxyInteractionService.createProxyContainer({type:"group",id:`${this.id}-pagination`,classList:["ag-charts-proxy-legend-pagination"],ariaLabel:{id:"ariaLabelLegendPagination"},ariaOrientation:"horizontal",ariaHidden:!0}),this.proxyLegendItemDescription=m5("p"),this.proxyLegendItemDescription.style.display="none",this.proxyLegendItemDescription.id=`${this.id}-ariaDescription`,this.proxyLegendItemDescription.textContent=this.getItemAriaDescription(),this.proxyLegendToolbar.append(this.proxyLegendItemDescription)}set data(e){this._data=e,this._symbolsDirty=!0,this.updateGroupVisibility()}get data(){return this._data}destroy(){this.ctx.domManager.removeChild("canvas-overlay",`${this.id}-toolbar`),this.ctx.domManager.removeChild("canvas-overlay",`${this.id}-pagination`),this.destroyFns.forEach(e=>e()),this.pagination.destroy(),this.itemSelection.clear()}initLegendItemToolbar(){this.itemSelection.each((e,t,i)=>{e.proxyButton??(e.proxyButton=this.ctx.proxyInteractionService.createProxyElement({type:"listswitch",id:`ag-charts-legend-item-${i}`,textContent:this.getItemAriaText(i),ariaChecked:!!e.datum.enabled,ariaDescribedBy:this.proxyLegendItemDescription.id,parent:this.proxyLegendToolbar,focusable:new CD(e),onclick:()=>{this.doClick(e.datum,e.proxyButton?.button)},onblur:()=>this.handleLegendMouseExit(),onfocus:()=>{let t=mq.toCanvas(e),i=wM(this.ctx.focusIndicator,{bounds:t,showFocusBox:!0});this.doHover(i,e.datum),this.pagination.setPage(e.pageIndex)}}))});let e=this.itemSelection.nodes().map(e=>e.proxyButton?.button).filter(e=>!!e);bk({orientation:this.getOrientation(),buttons:e}),this.proxyLegendToolbar.ariaHidden=(0===e.length).toString()}onMarkerShapeChange(){this.itemSelection.clear(),this.group.markDirty(this.group,2)}getOrientation(){if(void 0!==this.orientation)return this.orientation;switch(this.position){case"right":case"left":return"vertical";case"bottom":case"top":return"horizontal"}}set visible(e){this._visible=e,this.updateGroupVisibility()}get visible(){return this._visible}updateGroupVisibility(){this.group.visible=this.enabled&&this.visible&&this.data.length>0}attachLegend(e){e.appendChild(this.group)}getItemLabel(e){let{ctx:{callbackCache:t}}=this,{formatter:i}=this.item.label;return i?t.call(i,{itemId:e.itemId,value:e.label.text,seriesId:e.seriesId}):e.label.text}calcLayout(e,t){let{paddingX:i,paddingY:r,label:s,maxWidth:a,label:{maxLength:o=1/0,fontStyle:n,fontWeight:l,fontSize:h,fontFamily:d}}=this.item,c=[...this.data];this.reverseOrder&&c.reverse();let u=0===this.itemSelection.nodes().length;this.itemSelection.update(c),u&&this.initLegendItemToolbar();let p=[],g=fO.toFontString(s),m=a??.8*e,f=this.calculateSpriteDimensions();if(this.spriteRenderer.resize(f),this.itemSelection.each((e,t)=>{e.fontStyle=n,e.fontWeight=l,e.fontSize=h,e.fontFamily=d;let i=this.updateMarkerLabel(e,t,f),r=t.itemId??t.id,s=(this.getItemLabel(t)??"<unknown>").replace(/\r?\n/g," ");e.text=this.truncate(s,o,m,i,g,r),p.push(e.getBBox())}),this._symbolsDirty=!1,e=Math.max(1,e),t=Math.max(1,t),!isFinite(e))return{};let v=this.size,y=this.oldSize;v[0]=e,v[1]=t,(v[0]!==y[0]||v[1]!==y[1])&&(y[0]=v[0],y[1]=v[1]);let{pages:C,maxPageHeight:w,maxPageWidth:b}=this.updatePagination(p,e,t),S=this.pages;this.pages=C,this.maxPageSize=[b-i,w-r];let x=this.pagination.currentPage,M=this.pages[x];return this.pages.length<1||!M?this.visible=!1:(this.visible=!0,this.updatePositions(x),this.update()),{oldPages:S}}isCustomMarker(e,t){return e&&void 0!==t&&"string"!=typeof t}calcSymbolsEnabled(e){let{showSeriesStroke:t,marker:i}=this.item,r=!!i.enabled||!t||(e.marker.enabled??!0),s=!!(e.line&&t),a=this.isCustomMarker(r,e.marker.shape);return{markerEnabled:r,lineEnabled:s,isCustomMarker:a}}calcSymbolsLengths(e){let t;let{marker:i,line:r}=this.item,{markerEnabled:s,lineEnabled:a}=this.calcSymbolsEnabled(e),{strokeWidth:o}=this.getMarkerStyles(e),{strokeWidth:n}=a?this.getLineStyles(e):{strokeWidth:0},{shape:l}=e.marker;if(this.isCustomMarker(s,l)){let e=new l;e.updatePath();let i=e.getBBox();t=Math.max(i.width,i.height)}return{markerLength:s?i.size:0,markerStrokeWidth:o,lineLength:a?r.length??25:0,lineStrokeWidth:n,customMarkerSize:t}}calculateSpriteDimensions(){let e=0,t=0,i=0,r=0;return this.itemSelection.each((s,a)=>{a.symbols.forEach(s=>{let{markerLength:a,markerStrokeWidth:o,lineLength:n,lineStrokeWidth:l,customMarkerSize:h=-1/0}=this.calcSymbolsLengths(s),d=a+o;r=Math.max(r,n,h,a),t=Math.max(t,n,h,d),i=Math.max(i,l,d),e=Math.max(e,o+.5)})}),t+=2*e,i+=2*e,{spritePixelRatio:m6().devicePixelRatio,spriteAAPadding:e,spriteWidth:t,spriteHeight:i,markerWidth:r}}updateMarkerLabel(e,t,i){let{marker:r,paddingX:s}=this.item,{markerWidth:a}=i,o=[],n=s;if(this._symbolsDirty){let i=[],s=[];t.symbols.forEach(e=>{let{shape:t=e.marker.shape}=r,a=w2(t);s.push(new fL),i.push(new a)}),e.updateSymbols(i,s)}return t.symbols.forEach((t,i)=>{let s=t.marker.padding??r.padding,{markerEnabled:l,lineEnabled:h,isCustomMarker:d}=this.calcSymbolsEnabled(t);e.markers[i].size=l||!h?r.size:0,o.push({length:a,spacing:s,isCustomMarker:d}),(l||h)&&(n+=s+a);let c=e.markers[i],u=e.lines[i];if(c){let{strokeWidth:e,fill:i,stroke:r,fillOpacity:s,strokeOpacity:a}=this.getMarkerStyles(t);c.fill=i,c.stroke=r,c.strokeWidth=e,c.fillOpacity=s,c.strokeOpacity=a}if(u){let e=this.getLineStyles(t);u.stroke=e.stroke,u.strokeOpacity=e.strokeOpacity,u.strokeWidth=e.strokeWidth,u.lineDash=e.lineDash}}),e.update(this.spriteRenderer,i,o),n}truncate(e,t,i,r,s,a){let o=!1;e.length>t&&(e=e.substring(0,t),o=!0);let n=fF.getMeasurer({font:s}),l=f8.truncateLine(e,n,i-r,o);return l.endsWith(fO.EllipsisChar)?this.truncatedItems.add(a):this.truncatedItems.delete(a),l}updatePagination(e,t,i){let r=this.getOrientation(),s=Math.min(this.paginationTrackingIndex,e.length);this.pagination.orientation=r,this.pagination.translationX=0,this.pagination.translationY=0;let{pages:a,maxPageHeight:o,maxPageWidth:n,paginationBBox:l,paginationVertical:h}=this.calculatePagination(e,t,i),d=a.findIndex(e=>e.endIndex>=s);this.pagination.currentPage=uW(0,d,a.length-1);let{paddingX:c,paddingY:u}=this.item,p=o-u,g=0,m=-l.y-this.item.marker.size/2;h?m+=p+8:(g+=-l.x+(n-c)+8,m+=(p-l.height)/2),this.pagination.translationX=g,this.pagination.translationY=m,this.pagination.update(),this.pagination.updateMarkers();let f=0;return this.itemSelection.each((e,t,i)=>{i>(a[f]?.endIndex??1/0)&&f++,e.pageIndex=f}),{maxPageHeight:o,maxPageWidth:n,pages:a}}updateItemProxyButtons(){this.itemSelection.each(e=>ft(e.proxyButton?.listitem,mq.toCanvas(e)))}updatePaginationProxyButtons(e){this.proxyLegendPagination.style.display=this.pagination.visible?"absolute":"none";let t=(e?.length??this.pages.length)>1,i=this.pages.length>1;t!==i&&(i?(this.proxyPrevButton=this.ctx.proxyInteractionService.createProxyElement({type:"button",id:`${this.id}-prev-page`,textContent:{id:"ariaLabelLegendPagePrevious"},tabIndex:0,parent:this.proxyLegendPagination,focusable:new CD(this.pagination.previousButton),onclick:()=>this.pagination.clickPrevious()}),this.proxyNextButton??(this.proxyNextButton=this.ctx.proxyInteractionService.createProxyElement({type:"button",id:`${this.id}-next-page`,textContent:{id:"ariaLabelLegendPageNext"},tabIndex:0,parent:this.proxyLegendPagination,focusable:new CD(this.pagination.nextButton),onclick:()=>this.pagination.clickNext()})),this.proxyLegendPagination.ariaHidden="false"):(this.proxyNextButton?.remove(),this.proxyPrevButton?.remove(),[this.proxyNextButton,this.proxyPrevButton]=[void 0,void 0],this.proxyLegendPagination.ariaHidden="true"));let{prev:r,next:s}=this.pagination.computeCSSBounds();ft(this.proxyPrevButton,r),ft(this.proxyNextButton,s)}calculatePagination(e,t,i){let{paddingX:r,paddingY:s}=this.item,a=this.getOrientation(),o=["left","right"].includes(this.position),n=this.pagination.getBBox(),l=new u3(0,0,0,0),h=[],d=0,c=0,u=0,p=e=>e.width===n.width&&e.height===n.height,g=void 0!==this.maxWidth&&void 0!==this.maxHeight;do{if(u++>10){ul.warn("unable to find stable legend layout.");break}n=l;let p=t-(o?0:n.width),m=function({orientation:e,bboxes:t,maxHeight:i,maxWidth:r,itemPaddingY:s=0,itemPaddingX:a=0,forceResult:o=!1}){let n="horizontal"===e,l={max:n?r:i,fn:n?e=>e.width:e=>e.height,padding:n?a:s},h={max:n?i:r,fn:n?e=>e.height:e=>e.width,padding:n?s:a},d=0,c=[];for(;d<t.length;){let e=function(e,t,i,r,s){let a=function(e,t){let i=e.length,r=0;for(let s=0;s<i;s++)if((r+=t.fn(e[s])+t.padding)>t.max){if(i/s<2)return Math.ceil(i/2);return s}return i}(e,i);if(a<1){if(!s)return;a=1}let o=a;for(;o>=1;){let a=function(e,t,i,r,s,a){let o=[],n=0,l=0,h=[],d=[];for(let c=0;c<e.length;c++){let u=(c+i)%i;0===u&&(n+=l,l=0,h.length>0&&o.push(h),h=[]);let p=r.fn(e[c])+r.padding;d[u]=Math.max(d[u]??0,p);let g=n+(l=Math.max(l,s.fn(e[c])+s.padding)),m=!a||o.length>0;if(g>s.max&&m){h=[];break}if(d.reduce((e,t)=>e+t,0)>r.max&&!a){if(d.length<i)return d.length;return}h.push(c+t)}return h.length>0&&o.push(h),o.length>0?o:void 0}(e,t,o,i,r,s);if(null==a&&o<=1)return;if(null==a){o--;continue}if("number"==typeof a){if(a<=1)return;o=a<o&&a>1?a:o,o--;continue}return{processedBBoxCount:a.length*a[0].length,pageIndices:a}}}(t.slice(d),d,l,h,o);if(!e)return;d+=e.processedBBoxCount,c.push(e.pageIndices)}return function(e,t,i,r,s){let a=0,o=0;return{pages:e.map(e=>{"horizontal"===t&&(e=function(e){let t=[];for(let i of e[0])t.push([]);return e.forEach((e,i)=>{e.forEach((e,r)=>{t[r][i]=e})}),t}(e));let n=0,l=e.map(e=>{let t=e.map(e=>(n=Math.max(e,n),i[e])),a=0,o=0;return t.forEach(e=>{a+=e.height+r,o=Math.max(o,e.width+s)}),{indices:e,bboxes:t,columnHeight:Math.ceil(a),columnWidth:Math.ceil(o)}}),h=0,d=0;return l.forEach(e=>{h+=e.columnWidth,d=Math.max(d,e.columnHeight)}),a=Math.max(h,a),o=Math.max(d,o),{columns:l,startIndex:e[0][0],endIndex:n,pageWidth:h,pageHeight:d}}),maxPageWidth:a,maxPageHeight:o}}(c,e,t,s,a)}({orientation:a,bboxes:e,maxHeight:i-(o?n.height:0),maxWidth:p,itemPaddingY:s,itemPaddingX:r,forceResult:g});h=m?.pages??[],d=m?.maxPageWidth??0,c=m?.maxPageHeight??0;let f=h.length;if(this.pagination.visible=f>1,this.pagination.totalPages=f,this.pagination.update(),this.pagination.updateMarkers(),l=this.pagination.getBBox(),!this.pagination.visible)break}while(!p(l));return{maxPageWidth:d,maxPageHeight:c,pages:h,paginationBBox:l,paginationVertical:o}}updatePositions(e=0){let{item:{paddingY:t},itemSelection:i,pages:r}=this;if(r.length<1||!r[e])return;let{columns:s,startIndex:a,endIndex:o}=r[e],n=0,l=0,h=s.length,d=s[0].indices.length,c="horizontal"===this.getOrientation(),u=s[0].bboxes[0].height+t,p=[];i.each((e,t,i)=>{let r,g;if(i<a||i>o){e.visible=!1;return}let m=i-a;c?(r=m%h,g=Math.floor(m/h)):(r=Math.floor(m/d),g=m%d),e.visible=!0;let f=s[r];f&&(l=Math.floor(u*g),n=Math.floor(p[g]??0),p[g]=(p[g]??0)+f.columnWidth,e.translationX=n,e.translationY=l)}),this.updateItemProxyButtons()}updatePageNumber(e){let{pages:t}=this,{startIndex:i,endIndex:r}=t[e];0===i?this.paginationTrackingIndex=0:e===t.length-1?this.paginationTrackingIndex=r:this.paginationTrackingIndex=Math.floor((i+r)/2),this.pagination.update(),this.pagination.updateMarkers(),this.updatePositions(e),this.ctx.updateService.update(6)}update(){let{label:{color:e}}=this.item;this.itemSelection.each((t,i)=>{t.setEnabled(i.enabled),t.color=e}),this.updateContextMenu()}updateContextMenu(){let{toggleSeries:e}=this;this.ctx.contextMenuRegistry.setActionVisiblity(bU,e),this.ctx.contextMenuRegistry.setActionVisiblity(bW,e)}getLineStyles(e){let{stroke:t,strokeOpacity:i=1,strokeWidth:r,lineDash:s}=e.line??{},a=Math.min(2,r??1);return{stroke:t,strokeOpacity:i,strokeWidth:this.item.line.strokeWidth??a,lineDash:s}}getMarkerStyles(e){let{fill:t,stroke:i,strokeOpacity:r=1,fillOpacity:s=1,strokeWidth:a}=e.marker,o=Math.min(2,a??1);return{fill:t,stroke:i,strokeOpacity:r,fillOpacity:s,strokeWidth:this.item.marker.strokeWidth??o}}getDatumForPoint(e,t){let i=[],r={dist:1/0,datum:void 0};for(let s of this.group.children){if(!s.visible||!(s instanceof bF))continue;let a=s.getBBox().clone();if(a.grow(this.item.paddingX/2,"horizontal"),a.grow(this.item.paddingY/2,"vertical"),a.containsPoint(e,t))return s.datum;let o=e-a.x-this.item.paddingX/2,n=t-a.y-this.item.paddingY/2,l=o**2+n**2;o>=0&&n>=0&&l<r.dist&&(r.dist=l,r.datum=s.datum),i.push(a)}if(u3.merge(i).containsPoint(e,t))return r.datum}computePagedBBox(){let e=mQ.computeChildrenBBox(this.group.children);if(this.pages.length<=1)return e;let[t,i]=this.maxPageSize;return(e=e.clone()).height=Math.max(i,e.height),e.width=Math.max(t,e.width),e}contextToggleVisibility(e){let t=this.data.find(t=>t.itemId===e.itemId);this.doClick(t)}contextToggleOtherSeries(e){let t=this.data.find(t=>t.itemId===e.itemId);this.doDoubleClick(t)}checkContextClick(e){let t=this.getDatumForPoint(e.regionOffsetX,e.regionOffsetY);this.preventHidingAll&&this.contextMenuDatum?.enabled&&1>=this.getVisibleItemCount()?this.ctx.contextMenuRegistry.disableAction(bU):this.ctx.contextMenuRegistry.enableAction(bU),this.ctx.contextMenuRegistry.dispatchContext("legend",e,{legendItem:t})}checkLegendClick(e){let t=this.getDatumForPoint(e.regionOffsetX,e.regionOffsetY);this.doClick(t)&&e.preventDefault()}getVisibleItemCount(){return this.ctx.chartService.series.flatMap(e=>e.getLegendData("category")).filter(e=>e.enabled).length}doClick(e,t){let{listeners:{legendItemClick:i},ctx:{chartService:r,highlightManager:s},preventHidingAll:a,toggleSeries:o}=this;if(!e)return!1;let{id:n,itemId:l,enabled:h}=e,d=r.series.find(e=>e.id===n);if(!d)return!1;let c=h;return o&&(c=!h,a&&!c&&2>this.getVisibleItemCount()&&(c=!0),t??(t=this.itemSelection.select(t=>t.datum===e)[0]?.proxyButton?.button),t&&(t.ariaChecked=c.toString()),this.ctx.chartEventManager.legendItemClick(d,l,c,e.legendItemName)),c?s.updateHighlight(this.id,{series:d,itemId:l,datum:void 0}):s.updateHighlight(this.id),this.ctx.updateService.update(2,{forceNodeDataRefresh:!0}),i?.({type:"click",enabled:c,itemId:l,seriesId:d.id}),!0}checkLegendDoubleClick(e){let t=this.getDatumForPoint(e.regionOffsetX,e.regionOffsetY);this.doDoubleClick(t)&&e.preventDefault()}doDoubleClick(e){let{listeners:{legendItemDoubleClick:t},ctx:{chartService:i},toggleSeries:r}=this;if("integrated"===i.mode||!e)return!1;let{id:s,itemId:a,seriesId:o}=e,n=i.series.find(e=>e.id===s);if(!n)return!1;if(r){let e=i.series.flatMap(e=>e.getLegendData("category")),t=e.filter(e=>e.enabled).length,r=e.find(e=>e.itemId===a&&e.seriesId===o);this.ctx.chartEventManager.legendItemDoubleClick(n,a,r?.enabled??!1,t,r?.legendItemName)}return this.ctx.updateService.update(2,{forceNodeDataRefresh:!0}),t?.({type:"dblclick",enabled:!0,itemId:a,seriesId:n.id}),!0}handleLegendMouseMove(e){if(!this.enabled)return;e.preventDefault();let{regionOffsetX:t,regionOffsetY:i}=e,r=this.getDatumForPoint(t,i);this.doHover(e,r)}doHover(e,t){let{toggleSeries:i,listeners:r}=this;if(void 0===e||void 0===t){this.ctx.cursorManager.updateCursor(this.id),this.updateHighlight();return}let s=t?this.ctx.chartService.series.find(e=>e.id===t?.id):void 0;if(t&&this.truncatedItems.has(t.itemId??t.id)){let{offsetX:i,offsetY:r}=e;this.ctx.tooltipManager.updateTooltip(this.id,{offsetX:i,offsetY:r,lastPointerEvent:e,showArrow:!1},vs({content:this.getItemLabel(t)}))}else this.ctx.tooltipManager.removeTooltip(this.id);(i||null!=r.legendItemClick||null!=r.legendItemDoubleClick)&&this.ctx.cursorManager.updateCursor(this.id,"pointer"),t?.enabled&&s?this.updateHighlight({series:s,itemId:t?.itemId,datum:void 0}):this.updateHighlight()}handleLegendMouseExit(){this.ctx.cursorManager.updateCursor(this.id),this.ctx.tooltipManager.removeTooltip(this.id),this.updateHighlight()}updateHighlight(e){let t=this.ctx.interactionManager.getState();16===t?this.ctx.highlightManager.updateHighlight(this.id,e):1===t&&(this.pendingHighlightDatum=e,this.ctx.animationManager.onBatchStop(()=>{this.ctx.highlightManager.updateHighlight(this.id,this.pendingHighlightDatum)}))}handleLegendMouseEnter(e){let{enabled:t,toggleSeries:i,listeners:{legendItemClick:r,legendItemDoubleClick:s}}=this,a=this.getDatumForPoint(e.regionOffsetX,e.regionOffsetY);t&&void 0!==a&&(i||null!=r||null!=s)&&this.ctx.cursorManager.updateCursor(this.id,"pointer")}onLocaleChanged(){this.itemSelection.each(({proxyButton:e},t,i)=>{e?.button!=null&&(e.button.textContent=this.getItemAriaText(i))}),this.proxyLegendItemDescription.textContent=this.getItemAriaDescription()}getItemAriaText(e){let t=this.data[e],i=t&&this.getItemLabel(t),r=this.ctx.localeManager;if(e>=0&&i){let t=this.data.length;return r.t("ariaLabelLegendItem",{label:i,index:e+1,count:t})}return r.t("ariaLabelLegendItemUnknown")}getItemAriaDescription(){return this.ctx.localeManager.t("ariaDescriptionLegendItem")}positionLegend(e){if(!this.enabled||!this.data.length)return;let{layoutBox:t}=e,{x:i,y:r,width:s,height:a}=t,[o,n]=this.calculateLegendDimensions(t),{oldPages:l}=this.calcLayout(o,n),h=this.computePagedBBox(),d=()=>{switch(this.position){case"top":case"left":return 0;case"bottom":return a-h.height;default:return s-h.width}};if(this.visible){let e,o;let n=this.spacing;switch(this.position){case"top":case"bottom":e=(s-h.width)/2,o=d(),t.shrink(h.height+n,this.position);break;default:e=d(),o=(a-h.height)/2,t.shrink(h.width+n,this.position)}this.group.translationX=Math.floor(i+e-h.x),this.group.translationY=Math.floor(r+o-h.y),this.proxyLegendToolbar.style.removeProperty("display"),this.proxyLegendToolbar.ariaOrientation=this.getOrientation()}else this.proxyLegendToolbar.style.display="none";this.updateItemProxyButtons(),this.updatePaginationProxyButtons(l)}calculateLegendDimensions(e){let t,i;let{width:r,height:s}=e,a=r/s;switch(this.position){case"top":case"bottom":let o=a<1?Math.min(.5,1/a*.2):.2;t=this.maxWidth?Math.min(this.maxWidth,r):r,i=this.maxHeight?Math.min(this.maxHeight,s):Math.round(s*o);break;default:let n=a>1?Math.min(.5,.25*a):.25;t=this.maxWidth?Math.min(this.maxWidth,r):Math.round(r*n),i=this.maxHeight?Math.min(this.maxHeight,s):s}return[t,i]}};b$.className="Legend",c7([gp(gy)],b$.prototype,"toggleSeries",2),c7([gp(gf)],b$.prototype,"pagination",2),c7([gp(gf)],b$.prototype,"item",2),c7([gp(gf)],b$.prototype,"listeners",2),c7([f3(e=>e.updateGroupVisibility()),gp(gy)],b$.prototype,"enabled",2),c7([gp(gY)],b$.prototype,"position",2),c7([gp(gM,{optional:!0})],b$.prototype,"maxWidth",2),c7([gp(gM,{optional:!0})],b$.prototype,"maxHeight",2),c7([gp(gy,{optional:!0})],b$.prototype,"reverseOrder",2),c7([gp(g4(["horizontal","vertical"],"an orientation"),{optional:!0})],b$.prototype,"orientation",2),c7([gp(gy,{optional:!0})],b$.prototype,"preventHidingAll",2),c7([gp(gM)],b$.prototype,"spacing",2);var bY={type:"legend",optionsKey:"legend",identifier:"category",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","gauge"],moduleFactory:e=>new b$(e),packageType:"community"},bK=class extends yG{constructor(){super(...arguments),this.zIndex=3,this.centerX=0,this.centerY=0,this.width=8,this.height=16,this.gripLineGap=2,this.gripLineLength=8}setCenter(e,t){this.dirtyPath=!0,this.centerX=e,this.centerY=t}static align(e,t,i,r,s,a,o,n){let l=e.strokeWidth/2,h=e.align(i+s*o)+l,d=h+e.align(i+s*o,s*(n-o))-2*l,c=e.align(r+a/2)+l;e.setCenter(h,c),t.setCenter(d,c)}computeBBox(){let{centerX:e,centerY:t,width:i,height:r}=this;return new u3(e-i/2,t-r/2,i,r)}isPointInPath(e,t){return this.getBBox().containsPoint(e,t)}updatePath(){let{centerX:e,centerY:t,path:i,strokeWidth:r,gripLineGap:s,gripLineLength:a}=this,o=this.layerManager?.canvas?.pixelRatio??1;i.clear();let n=Math.floor(this.width/2*o)/o,l=Math.floor(this.height/2*o)/o;i.moveTo(e-n,t-l),i.lineTo(e+n,t-l),i.lineTo(e+n,t+l),i.lineTo(e-n,t+l),i.closePath();let h=Math.floor((s+r)/2*o)/o,d=Math.floor(a/2*o)/o;i.moveTo(e-h,t-d),i.lineTo(e-h,t+d),i.moveTo(e+h,t-d),i.lineTo(e+h,t+d)}};bK.className="RangeHandle",c7([gp(gM),u6({redraw:3,type:"path"})],bK.prototype,"width",2),c7([gp(gM),u6({redraw:3,type:"path"})],bK.prototype,"height",2),c7([gp(gM),u6({redraw:3,type:"path"})],bK.prototype,"gripLineGap",2),c7([gp(gM),u6({redraw:3,type:"path"})],bK.prototype,"gripLineLength",2);var bZ=class extends yG{constructor(){super(...arguments),this.zIndex=2,this.x=0,this.y=0,this.width=200,this.height=30,this.min=0,this.max=1}layout(e,t,i,r){this.x=e,this.y=t,this.width=i,this.height=r,this.dirtyPath=!0}update(e,t){this.min=isNaN(e)?this.min:e,this.max=isNaN(t)?this.max:t,this.dirtyPath=!0}computeBBox(){let{x:e,y:t,width:i,height:r}=this;return new u3(e,t,i,r)}computeVisibleRangeBBox(){let{x:e,y:t,width:i,height:r,min:s,max:a}=this,o=e+i*s;return new u3(o,t,e+i*a-o,r)}updatePath(){let{path:e,x:t,y:i,width:r,height:s,min:a,max:o,strokeWidth:n}=this,l=n/2;e.clear();let h=this.align(t)+l,d=this.align(i)+l,c=h+this.align(t,r)-2*l,u=d+this.align(i,s)-2*l;e.moveTo(h,d),e.lineTo(c,d),e.lineTo(c,u),e.lineTo(h,u),e.closePath();let p=this.align(t+r*a)+l,g=p+this.align(t+r*a,r*(o-a))-2*l;e.moveTo(p,d),e.lineTo(p,u),e.lineTo(g,u),e.lineTo(g,d),e.closePath()}};bZ.className="RangeMask";var bq=class extends mQ{constructor(e){super({name:"rangeSelectorGroup",layer:!0,zIndex:15}),this.x=0,this.y=0,this.width=200,this.height=30,this.lOffset=0,this.rOffset=0,this.isContainerNode=!0,this.background=new m1({name:"navigator-background"}),this.background.zIndex=1,this.appendChild(this.background),this.append(e)}layout(e,t,i,r,s,a){this.x=e,this.y=t,this.width=i,this.height=r,this.lOffset=s,this.rOffset=a,this.background.translationX=e,this.background.translationY=t}updateBackground(e,t){null!=e&&this.background.removeChild(e),null!=t&&this.background.appendChild(t)}computeBBox(){let{x:e,y:t,width:i,height:r,lOffset:s,rOffset:a}=this;return new u3(e-s,t,i+(s+a),r)}},bX=class extends yi{constructor(e){super(),this.ctx=e,this.miniChart=void 0,this.enabled=!1,this.mask=new bZ,this.minHandle=new bK,this.maxHandle=new bK,this.maskVisibleRange={id:"navigator-mask-visible-range",getBBox:()=>this.mask.computeVisibleRangeBBox(),toCanvasBBox:()=>this.mask.computeVisibleRangeBBox(),fromCanvasPoint:(e,t)=>({x:e,y:t})},this.height=30,this.spacing=10,this.x=0,this.y=0,this.width=0,this.rangeSelector=new bq([this.mask,this.minHandle,this.maxHandle]),this._min=0,this._max=1,this.minRange=.001;let t=e.regionManager.addRegion("navigator",this.rangeSelector);this.destroyFns.push(e.scene.attachNode(this.rangeSelector),t.addListener("hover",e=>this.onHover(e),25),t.addListener("drag-start",e=>this.onDragStart(e),25),t.addListener("drag",e=>this.onDrag(e),25),t.addListener("drag-end",()=>this.onDragEnd(),25),t.addListener("leave",e=>this.onLeave(e),25),this.ctx.localeManager.addListener("locale-changed",()=>this.updateZoom()),this.ctx.layoutManager.registerElement(3,e=>this.onLayoutStart(e)),this.ctx.layoutManager.addListener("layout:complete",e=>this.onLayoutComplete(e)),e.zoomManager.addListener("zoom-change",e=>this.onZoomChange(e))),this.proxyNavigatorToolbar=this.ctx.proxyInteractionService.createProxyContainer({type:"toolbar",id:"navigator-toolbar",classList:["ag-charts-proxy-navigator-toolbar"],ariaOrientation:"vertical",ariaLabel:{id:"ariaLabelNavigator"}}),this.updateGroupVisibility(),this.proxyNavigatorElements=[this.ctx.proxyInteractionService.createProxyElement({type:"slider",id:"ag-charts-navigator-min",ariaLabel:{id:"ariaLabelNavigatorMinimum"},ariaOrientation:"horizontal",parent:this.proxyNavigatorToolbar,focusable:new CD(this.minHandle),onchange:e=>this.onMinSliderChange(e)}),this.ctx.proxyInteractionService.createProxyElement({type:"slider",id:"ag-charts-navigator-pan",ariaLabel:{id:"ariaLabelNavigatorRange"},ariaOrientation:"horizontal",parent:this.proxyNavigatorToolbar,focusable:this.maskVisibleRange,onchange:e=>this.onPanSliderChange(e)}),this.ctx.proxyInteractionService.createProxyElement({type:"slider",id:"ag-charts-navigator-max",ariaLabel:{id:"ariaLabelNavigatorMaximum"},ariaOrientation:"horizontal",parent:this.proxyNavigatorToolbar,focusable:new CD(this.maxHandle),onchange:e=>this.onMaxSliderChange(e)})],bI({orientation:"vertical",toolbar:this.proxyNavigatorToolbar,buttons:this.proxyNavigatorElements}),this.destroyFns.push(()=>{this.proxyNavigatorElements.forEach(e=>e.remove()),this.proxyNavigatorToolbar.remove()})}updateBackground(e,t){this.rangeSelector?.updateBackground(e,t)}updateGroupVisibility(){let{enabled:e}=this;null!=this.rangeSelector&&e!==this.rangeSelector.visible&&(this.rangeSelector.visible=e,this.proxyNavigatorToolbar.ariaHidden=(!e).toString(),e?this.updateZoom():this.ctx.zoomManager.updateZoom("navigator"))}onLayoutStart(e){if(this.enabled){let{layoutBox:t}=e,i=this.height+this.spacing;t.shrink(i,"bottom"),this.y=t.y+t.height+this.spacing}else this.y=0}onLayoutComplete(e){let{x:t,width:i}=e.series.rect;if(this.enabled){let{y:e,height:r}=this;this.layoutNodes(t,e,i,r),ft(this.proxyNavigatorToolbar,{x:t,y:e,width:i,height:r}),this.proxyNavigatorToolbar.style.removeProperty("display")}else this.proxyNavigatorToolbar.style.display="none";this.x=t,this.width=i}onHover(e){if(!this.enabled)return;let{mask:t,minHandle:i,maxHandle:r}=this,{regionOffsetX:s,regionOffsetY:a}=e;i.containsPoint(s,a)||r.containsPoint(s,a)?this.ctx.cursorManager.updateCursor("navigator","ew-resize"):t.computeVisibleRangeBBox().containsPoint(s,a)?this.ctx.cursorManager.updateCursor("navigator","grab"):this.ctx.cursorManager.updateCursor("navigator")}onDragStart(e){if(!this.enabled)return;let{mask:t,minHandle:i,maxHandle:r,x:s,width:a,_min:o}=this,{regionOffsetX:n,regionOffsetY:l}=e;i.zIndex<r.zIndex?r.containsPoint(n,l)?this.dragging="max":i.containsPoint(n,l)&&(this.dragging="min"):i.containsPoint(n,l)?this.dragging="min":r.containsPoint(n,l)&&(this.dragging="max"),null==this.dragging&&t.computeVisibleRangeBBox().containsPoint(n,l)&&(this.dragging="pan",this.panStart=(n-s)/a-o),null!=this.dragging&&this.ctx.zoomManager.fireZoomPanStartEvent("navigator")}onDrag(e){if(!this.enabled||null==this.dragging)return;let{dragging:t,minRange:i,panStart:r,x:s,width:a}=this,{_min:o,_max:n}=this,{regionOffsetX:l}=e,h=(l-s)/a;if("min"===t)o=uW(0,h,n-i);else if("max"===t)n=uW(o+i,h,1);else if("pan"===t&&null!=r){let e=n-o;n=(o=uW(0,h-r,1-e))+e}this._min=o,this._max=n,this.updateZoom()}onDragEnd(){this.dragging=void 0}onLeave(e){this.ctx.cursorManager.updateCursor("navigator")}onZoomChange(e){let{x:t}=e;t&&(this._min=t.min,this._max=t.max,this.updateNodes(t.min,t.max),this.setPanSliderValue(t.min,t.max),this.setSliderRatio(this.proxyNavigatorElements[0],t.min),this.setSliderRatio(this.proxyNavigatorElements[2],t.max))}onPanSliderChange(e){let t=this.getSliderRatio(this.proxyNavigatorElements[1]),i=this._max-this._min;this._min=uW(0,t,1-i),this._max=this._min+i,this.updateZoom()}onMinSliderChange(e){let t=this.proxyNavigatorElements[0];this._min=this.setSliderRatioClamped(t,0,this._max-this.minRange),this.updateZoom()}onMaxSliderChange(e){let t=this.proxyNavigatorElements[2];this._max=this.setSliderRatioClamped(t,this._min+this.minRange,1),this.updateZoom()}setPanSliderValue(e,t){this.proxyNavigatorElements[1].value=`${Math.round(100*e)}`,this.proxyNavigatorElements[1].ariaValueText=this.ctx.localeManager.t("ariaValuePanRange",{min:e,max:t})}setSliderRatioClamped(e,t,i){let r=this.getSliderRatio(e),s=uW(t,r,i);return s!==r&&this.setSliderRatio(e,s),s}setSliderRatio(e,t){let i=Math.round(100*t);e.value=`${i}`,e.ariaValueText=u2(i)}getSliderRatio(e){return parseFloat(e.value)/100}layoutNodes(e,t,i,r){let{rangeSelector:s,mask:a,minHandle:o,maxHandle:n,_min:l,_max:h}=this;s.layout(e,t,i,r,o.width/2,n.width/2),a.layout(e,t,i,r),bK.align(o,n,e,t,i,r,l,h),l+(h-l)/2<.5?(o.zIndex=3,n.zIndex=4):(o.zIndex=4,n.zIndex=3),[o,this.maskVisibleRange,n].forEach((i,r)=>{let s=i.getBBox(),a={x:s.x-e,y:s.y-t,height:s.height,width:s.width};ft(this.proxyNavigatorElements[r],a)})}updateNodes(e,t){this.mask.update(e,t)}updateZoom(){if(!this.enabled)return;let{_min:e,_max:t}=this;if(null!=e&&null!=t)return this.ctx.zoomManager.updateZoom("navigator",{x:{min:e,max:t}},!1,e=>{(null!=this.min||null!=this.max)&&ul.warnOnce(`Could not apply [navigator.min] or [navigator.max] as [${e}] has modified the initial zoom state.`)})}};c7([gp(gf,{optional:!0})],bX.prototype,"miniChart",2),c7([gp(gy),f3(e=>e.updateGroupVisibility())],bX.prototype,"enabled",2),c7([gp(gM)],bX.prototype,"height",2),c7([gp(gM)],bX.prototype,"spacing",2),c7([f2({newValue(e){this._min=e,this.updateZoom()}}),gp(gg(gE,gR("max")),{optional:!0})],bX.prototype,"min",2),c7([f2({newValue(e){this._max=e,this.updateZoom()}}),gp(gg(gE,gL("min")),{optional:!0})],bX.prototype,"max",2);var bQ={type:"root",optionsKey:"navigator",packageType:"community",chartTypes:["cartesian"],moduleFactory:e=>new bX(e),themeTemplate:{navigator:{enabled:!1,height:30,mask:{fill:"#999999",stroke:"#999999",strokeWidth:1,fillOpacity:.2},minHandle:{fill:"#f2f2f2",stroke:"#999999",strokeWidth:1,width:9,height:16,gripLineGap:1,gripLineLength:8},maxHandle:{fill:"#f2f2f2",stroke:"#999999",strokeWidth:1,width:9,height:16,gripLineGap:1,gripLineLength:8}}}};function bJ({takeColors:e}){let{fills:[t],strokes:[i]}=e(1);return{fill:t,stroke:i}}function b0(e){return{marker:bJ(e)}}var b1=((O=b1||{})[O.SMALL=12]="SMALL",O[O.MEDIUM=13]="MEDIUM",O[O.LARGE=17]="LARGE",O),b2=((B=b2||{}).NORMAL="normal",B.BOLD="bold",B.BOLDER="bolder",B.LIGHTER="lighter",B),b3=((G=b3||{}).TOP="top",G.RIGHT="right",G.BOTTOM="bottom",G.LEFT="left",G),b4=((z=b4||{}).CATEGORY="category",z.ORDINAL_TIME="ordinal-time",z.NUMBER="number",z.TIME="time",z.LOG="log",z),b6=((_=b6||{}).ANGLE_CATEGORY="angle-category",_.ANGLE_NUMBER="angle-number",_.RADIUS_CATEGORY="radius-category",_.RADIUS_NUMBER="radius-number",_),b5=((V=b5||{}).CIRCLE="circle",V.POLYGON="polygon",V),b8=Symbol("is-dark-theme"),b7=Symbol("default-font"),b9=Symbol("default-label-colour"),Se=Symbol("default-inverted-label-colour"),St=Symbol("default-inside-series-label-colour"),Si=Symbol("default-muted-label-colour"),Sr=Symbol("default-axis-grid-colour"),Ss=Symbol("default-axis-line-colour"),Sa=Symbol("default-cross-lines-colour"),So=Symbol("default-background-colour"),Sn=Symbol("default-shadow-colour"),Sl=Symbol("default-colours"),Sh=Symbol("default-padding"),Sd=Symbol("default-caption-layout-style"),Sc=Symbol("default-caption-alignment"),Su=Symbol("palette-up-stroke"),Sp=Symbol("palette-down-stroke"),Sg=Symbol("palette-up-fill"),Sm=Symbol("palette-down-fill"),Sf=Symbol("palette-neutral-stroke"),Sv=Symbol("palette-neutral-fill"),Sy=Symbol("palette-alt-up-stroke"),SC=Symbol("palette-alt-down-stroke"),Sw=Symbol("palette-alt-up-fill"),Sb=Symbol("palette-alt-down-fill"),SS=Symbol("palette-gray-fill"),Sx=Symbol("palette-gray-stroke"),SM=Symbol("default-polar-series-stroke"),SE=Symbol("default-diverging-series-colour-range"),SD=Symbol("default-gauge-series-colour-range"),SI=Symbol("default-hierarchy-fills"),Sk=Symbol("default-hierarchy-strokes"),ST=Symbol("default-annotation-stroke"),SA=Symbol("default-text-annotation-color"),SR=Symbol("default-annotation-background-fill"),SL=Symbol("default-annotation-handle-fill"),SP=Symbol("default-textbox-fill"),SF=Symbol("default-textbox-stroke"),SN=Symbol("default-textbox-color"),SO=Symbol("default-toolbar-position"),SB=Symbol("default-gridline-enabled");function SG(e,t,i,r,s){let{addPhaseFn:a,updatePhaseFn:o,removePhaseFn:n}=s,l=(r,s,a)=>{i.animate({id:`${e}_${t}_${s.id}_${r}`,groupId:e,from:0,to:1,ease:pU,collapsable:!1,onUpdate(e,t){t&&"removed"!==r||(s.path.clear(!0),a(e,s),s.checkPathDirty())},onStop(){"added"===r&&(s.path.clear(!0),a(1,s),s.checkPathDirty())},phase:p1[r]})};for(let e of r)i.isSkipped()||(l("removed",e,n),l("updated",e,o)),l("added",e,a)}var Sz=null;function S_(e){return null==e?void 0:""===e?"":(Sz??(Sz=m5("div")),Sz.textContent=String(e),Sz.innerHTML)}var SV=new WeakMap;function Sj(e,t){let i=JSON.stringify(e,null,0);return SV.has(t)||SV.set(t,new Map),SV.get(t)?.has(i)||SV.get(t)?.set(i,t(e)),SV.get(t)?.get(i)}function SH(e,t=[0,0]){for(let i of e)"number"==typeof i&&(i<0&&(t[0]+=i),i>0&&(t[1]+=i));return t}function SU(e,t){return{id:e,matchGroupIds:[t],type:"aggregate",aggregateFunction:e=>SH(e)}}function SW(e,t){return{id:e,type:"aggregate",matchGroupIds:t?[t]:void 0,aggregateFunction:e=>SH(e),groupAggregateFunction:(e,t=[0,0])=>(t[0]+=e?.[0]??0,t[1]+=e?.[1]??0,t)}}function S$(e,t){return{id:e,matchGroupIds:[t],type:"aggregate",aggregateFunction:e=>CK.extendDomain(e)}}function SY(e){return{id:e,type:"aggregate",aggregateFunction:()=>[0,1],groupAggregateFunction:(e,t=[0,0])=>(t[0]+=e?.[0]??0,t[1]+=e?.[1]??0,t)}}function SK(e,t){return{id:e,matchGroupIds:t?[t]:void 0,type:"aggregate",aggregateFunction:e=>SH(e),groupAggregateFunction:(e,t=[0,0,-1])=>(t[0]+=e?.[0]??0,t[1]+=e?.[1]??0,t[2]++,t),finalFunction:(e=[0,0,0])=>{let t=e[0]+e[1];return t>=0?[0,t/e[2]]:[t/e[2],0]}}}function SZ(e,t,i){let r={id:e,matchGroupIds:i?[i]:void 0,type:"aggregate",aggregateFunction:(e,i=[])=>{let r=i[1]-i[0];return t.aggregateFunction(e).map(e=>e/r)}};return t.groupAggregateFunction&&(r.groupAggregateFunction=t.groupAggregateFunction),r}function Sq(e){return()=>{let t=0;return i=>pD(i)?t+=e?Math.max(0,i):i:i}}function SX(){return()=>{let e=0;return t=>{if(!pD(t))return t;let i=e;return e+=t,i}}}function SQ(e){return null!=e&&vm(e)}function SJ(e){return null!=e}function S0(e){switch(e){case"number":case"log":case"ordinal-time":case"time":case"color":return SQ;default:return SJ}}function S1(e){switch(e){case"number":case"log":case"time":case"color":return"range";default:return"category"}}function S2(e,t,i={}){return{property:e,type:"key",valueType:S1(t),validation:S0(t),...i}}function S3(e,t,i={}){return{property:e,type:"value",valueType:S1(t),validation:S0(t),...i}}function S4(e,t={}){let{min:i=-1/0,max:r=1/0,...s}=t;return{type:"value",property:e,valueType:"range",validation:SQ,processor:()=>e=>pD(e)?uW(i,e,r):e,...s}}function S6(e,t,i={}){let{onlyPositive:r,...s}=i;return{...S3(e,t,s),processor:Sq(r)}}function S5(e,t,i={}){return{...S3(e,t,i),processor:SX()}}function S8(e,t,i="current",r,s){return[S3(e,s,r),xh(r.groupId,t,i,r.separateNegative),...null!=r.rangeId?[S$(r.rangeId,r.groupId)]:[]]}function S7(e,t,i){return[S3(e,t,i),xc(i.groupId)]}var S9={type:"reducer",property:"smallestKeyInterval",initialValue:1/0,reducer:()=>{let e=NaN;return(t=1/0,i)=>{let r=i.keys[0],s=Math.abs(r-e);return(e=r,!isNaN(s)&&s>0&&s<t)?s:t}}},xe={type:"reducer",property:"largestKeyInterval",initialValue:-1/0,reducer:()=>{let e=NaN;return(t=-1/0,i)=>{let r=i.keys[0],s=Math.abs(r-e);return(e=r,!isNaN(s)&&s>0&&s>t)?s:t}}},xt={type:"processor",property:"sortedGroupDomain",calculate:({domain:{groups:e}})=>e?.slice().sort((e,t)=>{for(let i=0;i<e.length;i++){let r=e[i]-t[i];if(0!==r)return r}return 0})};function xi({normaliseTo:e,mode:t}){let i=(t,i)=>{let r=t*e/i;return r>=0?Math.min(e,r):Math.max(-e,r)};return()=>()=>(e,r)=>{let s=[0,0];for(let i of r){let r=e[i],a="number"==typeof r?r:Math.max(...r),o=a<0?0:1;"sum"===t?s[o]+=a:0===o?s[o]=Math.min(s[o],a):s[o]=Math.max(s[o],a)}let a=Math.max(Math.abs(s[0]),s[1]);for(let t of r){let r=e[t];e[t]="number"==typeof r?i(r,a):r.map(e=>i(e,a))}}}function xr(e,t,i="sum"){return{type:"group-value-processor",matchGroupIds:e,adjust:Sj({normaliseTo:t,mode:i},xi)}}function xs({normaliseTo:e,zeroDomain:t,rangeMin:i,rangeMax:r}){let s=e[1]-e[0],a=(i,r,a)=>{let o=e[0]+(i-r)/a*s;return 0===a?t:o>=e[1]?e[1]:o<e[0]?e[0]:o};return()=>(t,s)=>{let[o,n]=t.domain.values[s];null!=i&&(o=i),null!=r&&(n=r);let l=n-o;for(let i of(t.domain.values[s]=[e[0],e[1]],t.data)){let e=i.values;for(let i of("ungrouped"===t.type&&(e=[e]),e))i[s]=a(i[s],o,l)}}}function xa(e,t,i,r,s){return{type:"property-value-processor",property:e,adjust:Sj({normaliseTo:t,rangeMin:r,rangeMax:s,zeroDomain:i},xs)}}function xo(e){return{type:"processor",property:"animationValidation",calculate(t){let{keys:i,values:r}=t.defs,{input:s,data:a}=t,o=!0,n=!0,l=[];for(let t=0;t<r.length;t++)e?.includes(r[t].id)&&l.push([t,r[t]]);let h=(e,i,r)=>{if("category"===i.valueType){let i=t.domain[r][e];o&&(o=i.length===s.count);return}let l=a[0]?.[r][e];for(let t=1;(o||n)&&t<a.length;t++){let i=a[t][r][e];n&&(n=l<=i),o&&(o=l!==i),l=i}};for(let e=0;(o||n)&&e<i.length;e++)h(e,i[e],"keys");for(let e=0;(o||n)&&e<l.length;e++){let[t,i]=l[e];h(t,i,"values")}return{uniqueKeys:o,orderedKeys:n}}}}function xn({mode:e,separateNegative:t}){return()=>()=>(i,r)=>{let s=[0,0];for(let a of r){let r=i[a],o=uq(r)&&t?0:1;pD(r)&&("normal"===e&&(s[o]+=r),i[a]=s[o],"trailing"===e&&(s[o]+=r))}}}function xl({mode:e,sum:t}){return()=>{let i=[],r=!0;return()=>(s,a)=>{let o=0;for(let n of a){let a=s[n],l=r&&"current"===t?0:i[n];i[n]=a;let h="current"===t?a:l;if(!pD(a)||!pD(l)){s[n]=o;continue}"normal"===e&&(o+=h),s[n]=o,"trailing"===e&&(o+=h)}r=!1}}}function xh(e,t,i,r=!1){return{type:"group-value-processor",matchGroupIds:[e],adjust:t.startsWith("window")?Sj({mode:t.endsWith("-trailing")?"trailing":"normal",sum:i},xl):Sj({mode:t,separateNegative:r},xn)}}function xd(){return()=>(e,t)=>{let i=new Float64Array(32),r=0;for(let s of t){let t=e[s];i[r]=Number.isFinite(t)?t:NaN,r+=1,e[s]=i.subarray(0,r)}}}function xc(e){return{type:"group-value-processor",matchGroupIds:[e],adjust:xd}}function xu(e,t=!0){return{type:"processor",property:"diff",calculate:i=>{let r=new Map,s=new Map,a=new Map,o=new Map,n=Math.max(e.data.length,i.data.length);for(let l=0;l<n;l++){let n=e.data[l],h=i.data[l],d=n?xp(n.keys):"",c=h?xp(h.keys):"";if(h&&n&&d===c){mA(n.values,h.values)||a.set(c,h);continue}o.has(c)?((t||!mA(o.get(c).values,h.values))&&(a.set(c,h),r.set(c,h)),o.delete(c)):h&&s.set(c,h),s.has(d)?((t||!mA(s.get(d).values,n.values))&&(a.set(d,n),r.set(d,n)),s.delete(d)):n&&(a.delete(d),o.set(d,n))}return{changed:s.size>0||a.size>0||o.size>0,added:s,updated:a,removed:o,moved:r}}}}function xp(e,...t){let i;return("string"==typeof(i=pm(e)?e.map(e=>vv(e)).join("___"):vv(e))||"number"==typeof i||"boolean"==typeof i||i instanceof Date)&&t.length>0&&(i+=`___${t.join("___")}`),i}function xg({id:e},t,i,...r){p3(e,t,i,r,{opacity:0},{opacity:1},{phase:"trailing"})}function xm({id:e},t,i,...r){p3(e,t,i,r,{opacity:1},{opacity:0},{phase:"remove"})}function xf(e){return{opacity:1}}var xv=class extends gd{constructor(){super(...arguments),this._dirty=3}markDirty(e,t=1){this._dirty<t&&(this._dirty=t)}markClean(e){this._dirty=0}isDirty(){return this._dirty>0}},xy=class extends xv{constructor(){super(...arguments),this.enabled=!0,this.color="rgba(0, 0, 0, 0.5)",this.xOffset=0,this.yOffset=0,this.blur=5}};c7([gp(gy),u6({redraw:3})],xy.prototype,"enabled",2),c7([gp(gO),u6({redraw:3})],xy.prototype,"color",2),c7([gp(gb),u6({redraw:3})],xy.prototype,"xOffset",2),c7([gp(gb),u6({redraw:3})],xy.prototype,"yOffset",2),c7([gp(gM),u6({redraw:3})],xy.prototype,"blur",2);var xC=g8(e=>w1(e)||"function"==typeof e&&Object.create(e.prototype) instanceof wH,"a marker shape keyword such as 'circle', 'diamond' or 'square' or an object extending the Marker class"),xw=class extends xv{constructor(){super(...arguments),this.enabled=!0,this.shape=wU,this.size=6,this.fillOpacity=1,this.strokeWidth=1,this.strokeOpacity=1}getStyle(){let{size:e,shape:t,fill:i,fillOpacity:r,stroke:s,strokeWidth:a,strokeOpacity:o}=this;return{size:e,shape:t,fill:i,fillOpacity:r,stroke:s,strokeWidth:a,strokeOpacity:o}}getDiameter(){return this.size+this.strokeWidth}};c7([gp(gy),u6({redraw:3})],xw.prototype,"enabled",2),c7([gp(xC),u6({redraw:3})],xw.prototype,"shape",2),c7([gp(gM),u6({redraw:3})],xw.prototype,"size",2),c7([gp(gO,{optional:!0}),u6({redraw:3})],xw.prototype,"fill",2),c7([gp(gE),u6({redraw:3})],xw.prototype,"fillOpacity",2),c7([gp(gO,{optional:!0}),u6({redraw:3})],xw.prototype,"stroke",2),c7([gp(gM),u6({redraw:3})],xw.prototype,"strokeWidth",2),c7([gp(gE),u6({redraw:3})],xw.prototype,"strokeOpacity",2),c7([gp(gC,{optional:!0}),u6({redraw:3})],xw.prototype,"itemStyler",2);var xb=class extends gd{constructor(){super(...arguments),this.enabled=!1}};c7([gp(gy)],xb.prototype,"enabled",2);var xS=class extends gd{constructor(){super(...arguments),this.enabled=!0,this.interaction=new xb,this.position=new va,this.range=void 0}toTooltipHtml(e,t){return this.renderer?vs(this.renderer(t),e):vs(e)}};c7([gp(gy)],xS.prototype,"enabled",2),c7([gp(gy,{optional:!0})],xS.prototype,"showArrow",2),c7([gp(gC,{optional:!0})],xS.prototype,"renderer",2),c7([gp(gf)],xS.prototype,"interaction",2),c7([gp(gf)],xS.prototype,"position",2),c7([gp(g2,{optional:!0})],xS.prototype,"range",2);var xx=g4(["linear","smooth","step"],"a line style"),xM=g4(["start","middle","end"]),xE=class extends gd{constructor(){super(...arguments),this.type="linear",this.tension=1,this.position="end"}};c7([gp(xx)],xE.prototype,"type",2),c7([gp(gE)],xE.prototype,"tension",2),c7([gp(xM)],xE.prototype,"position",2);var xD=class extends br{constructor(){super(...arguments),this.xName=void 0,this.fill="#c16068",this.fillOpacity=1,this.stroke="#874349",this.strokeWidth=2,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.interpolation=new xE,this.shadow=new xy,this.marker=new xw,this.label=new vh,this.tooltip=new xS,this.connectMissingData=!1}};function xI(e){switch(e.type){case"linear":case"step":return[{x:e.x0,y:e.y0},{x:e.x1,y:e.y1}];case"cubic":return[{x:e.cp0x,y:e.cp0y},{x:e.cp3x,y:e.cp3y}]}}function xk(e,t,i){let[r,s]=xI(e),a=s.x!==r.x?(i.x-t.x)/(s.x-r.x):0,o=s.y!==r.y?(i.y-t.y)/(s.y-r.y):0;switch(e.type){case"linear":return{type:"linear",moveTo:e.moveTo,x0:t.x,y0:t.y,x1:i.x,y1:i.y};case"cubic":return{type:"cubic",moveTo:e.moveTo,cp0x:t.x,cp0y:t.y,cp1x:i.x-(e.cp2x-r.x)*a,cp1y:i.y-(e.cp2y-r.y)*o,cp2x:i.x-(e.cp1x-r.x)*a,cp2y:i.y-(e.cp1y-r.y)*o,cp3x:i.x,cp3y:i.y};case"step":return{type:"step",moveTo:e.moveTo,x0:t.x,y0:t.y,x1:i.x,y1:i.y,stepX:i.x-(e.stepX-r.x)*a}}}function xT(e,t,i){let{moveTo:r}=e,[s,a]=function(e){let t=xI(e);return t[0].x>t[1].x&&t.reverse(),t}(e),{x:o,y:n}=s,{x:l,y:h}=a;if(i<o)return xk(e,s,s);if(t>l)return xk(e,a,a);switch(e.type){case"linear":{let e=n===h?void 0:(h-n)/(l-o),s=null==e?n:e*(t-o)+n,a=null==e?n:e*(i-o)+n;return{type:"linear",moveTo:r,x0:t,y0:s,x1:i,y1:a}}case"step":if(i<=e.stepX){let s=e.y0;return{type:"step",moveTo:r,x0:t,y0:s,x1:i,y1:s,stepX:i}}if(t>=e.stepX){let s=e.y1;return{type:"step",moveTo:r,x0:t,y0:s,x1:i,y1:s,stepX:t}}{let{y0:s,y1:a,stepX:o}=e;return{type:"step",moveTo:r,x0:t,y0:s,x1:i,y1:a,stepX:o}}case"cubic":{let s=yL(e.cp0x,e.cp1x,e.cp2x,e.cp3x,t),[a,o]=yP(e.cp0x,e.cp0y,e.cp1x,e.cp1y,e.cp2x,e.cp2y,e.cp3x,e.cp3y,s),n=yL(o[0].x,o[1].x,o[2].x,o[3].x,i);return[o,a]=yP(o[0].x,o[0].y,o[1].x,o[1].y,o[2].x,o[2].y,o[3].x,o[3].y,n),{type:"cubic",moveTo:r,cp0x:o[0].x,cp0y:o[0].y,cp1x:o[1].x,cp1y:o[1].y,cp2x:o[2].x,cp2y:o[2].y,cp3x:o[3].x,cp3y:o[3].y}}}}c7([gp(gw)],xD.prototype,"xKey",2),c7([gp(gw,{optional:!0})],xD.prototype,"xName",2),c7([gp(gw)],xD.prototype,"yKey",2),c7([gp(gw,{optional:!0})],xD.prototype,"yName",2),c7([gp(gw,{optional:!0})],xD.prototype,"yFilterKey",2),c7([gp(gM,{optional:!0})],xD.prototype,"normalizedTo",2),c7([gp(gO)],xD.prototype,"fill",2),c7([gp(gE)],xD.prototype,"fillOpacity",2),c7([gp(gO)],xD.prototype,"stroke",2),c7([gp(gM)],xD.prototype,"strokeWidth",2),c7([gp(gE)],xD.prototype,"strokeOpacity",2),c7([gp(g$)],xD.prototype,"lineDash",2),c7([gp(gM)],xD.prototype,"lineDashOffset",2),c7([gp(gf)],xD.prototype,"interpolation",2),c7([gp(gf)],xD.prototype,"shadow",2),c7([gp(gf)],xD.prototype,"marker",2),c7([gp(gf)],xD.prototype,"label",2),c7([gp(gf)],xD.prototype,"tooltip",2),c7([gp(gy)],xD.prototype,"connectMissingData",2);var xA={start:0,middle:.5,end:1};function xR(e,t){return"linear"===e.type?function(e,t){let{x0:i,y0:r,x1:s,y1:a}=e,o=(a-r)/(s-i)*(t-i)+r;return{leftCp1x:i,leftCp1y:r,leftCp2x:t,leftCp2y:o,stepX:t,stepY0:o,stepY1:o,rightCp1x:t,rightCp1y:o,rightCp2x:s,rightCp2y:a}}(e,t):"cubic"===e.type?function(e,t){let{cp0x:i,cp0y:r,cp1x:s,cp1y:a,cp2x:o,cp2y:n,cp3x:l,cp3y:h}=e,d=yL(i,s,o,l,t),[c,u]=yP(i,r,s,a,o,n,l,h,d),p=c[3].y;return{leftCp1x:c[1].x,leftCp1y:c[1].y,leftCp2x:c[2].x,leftCp2y:c[2].y,stepX:t,stepY0:p,stepY1:p,rightCp1x:u[1].x,rightCp1y:u[1].y,rightCp2x:u[2].x,rightCp2y:u[2].y}}(e,t):function(e){let{x0:t,y0:i,x1:r,y1:s,stepX:a}=e;return{leftCp1x:(t+a)/2,leftCp1y:i,leftCp2x:(t+a)/2,leftCp2y:i,stepX:a,stepY0:i,stepY1:s,rightCp1x:(a+r)/2,rightCp1y:s,rightCp2x:(a+r)/2,rightCp2y:s}}(e)}function xL(e,t,i,r,s,a,o){switch(t){case 1:o?e.moveTo(s,a):e.moveTo(i,r);break;case 2:o?e.lineTo(s,a):e.lineTo(i,r)}}function xP(e,t,i,r,s,a){a?e.lineTo(t,i):e.lineTo(r,s)}function xF(e,t,i,r,s,a,o,n,l,h){h?e.cubicCurveTo(a,o,r,s,t,i):e.cubicCurveTo(r,s,a,o,n,l)}function xN(e,t,i,r,s,a,o){o?(e.lineTo(a,s),e.lineTo(a,i),e.lineTo(t,i)):(e.lineTo(a,i),e.lineTo(a,s),e.lineTo(r,s))}function xO(e,t,i,r){let[s,a]=xI(t);switch(xL(e,i,s.x,s.y,a.x,a.y,r),t.type){case"linear":xP(e,t.x0,t.y0,t.x1,t.y1,r);break;case"cubic":xF(e,t.cp0x,t.cp0y,t.cp1x,t.cp1y,t.cp2x,t.cp2y,t.cp3x,t.cp3y,r);break;case"step":xN(e,t.x0,t.y0,t.x1,t.y1,t.stepX,r)}}function xB(e,t,i,r,s,a){var o,n,l,h,d,c,u,p,g,m,f,v,y,C,w,b,S,x,M,E;let[D,I]=xI(t),[k,T]=xI(i),A=(o=D.x,(k.x-o)*r+o),R=(n=D.y,(k.y-n)*r+n),L=(l=I.x,(T.x-l)*r+l),P=(h=I.y,(T.y-h)*r+h);if(xL(e,s,A,R,L,P,a),"cubic"===t.type&&"cubic"===i.type){let s=(d=t.cp1x,(i.cp1x-d)*r+d);xF(e,A,R,s,(c=t.cp1y,(i.cp1y-c)*r+c),(u=t.cp2x,(i.cp2x-u)*r+u),(p=t.cp2y,(i.cp2y-p)*r+p),L,P,a)}else if("step"===t.type&&"step"===i.type)xN(e,A,R,L,P,(g=t.stepX,(i.stepX-g)*r+g),a);else if("linear"===t.type&&"linear"===i.type)xP(e,A,R,L,P,a);else{let s;s="step"===t.type?t.stepX:"step"===i.type?i.stepX:(A+L)/2;let o=xR(t,s),n=xR(i,s),l=(m=o.leftCp1x,(n.leftCp1x-m)*r+m),h=(f=o.leftCp1y,(n.leftCp1y-f)*r+f),d=(v=o.leftCp2x,(n.leftCp2x-v)*r+v),c=(y=o.leftCp2y,(n.leftCp2y-y)*r+y),u=(C=o.stepX,(n.stepX-C)*r+C),p=(w=o.stepY0,(n.stepY0-w)*r+w),g=(b=o.stepY1,(n.stepY1-b)*r+b),D=(S=o.rightCp1x,(n.rightCp1x-S)*r+S),I=(x=o.rightCp1y,(n.rightCp1y-x)*r+x),k=(M=o.rightCp2x,(n.rightCp2x-M)*r+M),T=(E=o.rightCp2y,(n.rightCp2y-E)*r+E);a?(e.cubicCurveTo(k,T,D,I,u,g),e.lineTo(u,p),e.cubicCurveTo(d,c,l,h,A,R)):(e.cubicCurveTo(l,h,d,c,u,p),e.lineTo(u,g),e.cubicCurveTo(D,I,k,T,L,P))}}function xG({id:e},t,i,...r){p3(e,"markers",t,r,{opacity:0},{opacity:1},{phase:i?p1[i]:"trailing"}),r.forEach(e=>e.cleanup())}function xz({id:e},t,...i){p3(e,"markers",t,i,{scalingX:0,scalingY:0},{scalingX:1,scalingY:1},{phase:"initial"}),i.forEach(e=>e.cleanup())}function x_({id:e,nodeDataDependencies:t},i,...r){let s=t.seriesRectWidth;p2(e,"markers",i,r,{fromFn:(e,t)=>{let i=uW(0,pZ((t.midPoint?.x??s)/s),1);return isNaN(i)&&(i=0),{scalingX:0,scalingY:0,delay:i,duration:.2,phase:"initial"}},toFn:()=>({scalingX:1,scalingY:1})})}function xV(e){return{opacity:1,scalingX:1,scalingY:1}}function xj(e,t){return{translationX:t.point?.x??NaN,translationY:t.point?.y??NaN}}function xH(e,t){let i=(t,i)=>{let r=e[i][t];return Array.isArray(r)?r[0]:r},r=t=>{let{xValue:r}=t;return e.moved[r]?{point:i(r,"moved"),status:"updated"}:e.removed[r]?{point:i(r,"removed"),status:"removed"}:e.added[r]?{point:i(r,"added"),status:"added"}:{status:"unknown"}};return{fromFn:(e,i)=>{let{status:s,point:a}=r(i);if("unknown"===s)return{opacity:0};let o={translationX:a?.from?.x??e.translationX,translationY:a?.from?.y??e.translationY,opacity:e.opacity,phase:p1[s]};return"added"===t?{...o,opacity:0,translationX:a?.to?.x,translationY:a?.to?.y,phase:p1.added}:("added"===s&&(o.opacity=0),o)},toFn:(e,i)=>{let{status:s,point:a}=r(i);if("unknown"===s)return{opacity:0};let o={translationX:i.point.x,translationY:i.point.y,opacity:1,phase:p1[s]};return"removed"===s||"removed"===t?{...o,translationX:a?.to?.x,translationY:a?.to?.y,opacity:0,phase:p1.removed}:o}}}function xU(e,{datumIndex:t}){let i=e.getNodeData();if(void 0===i)return;let r=i[t],{point:s}=r;if(null==r||null==s)return;let a=s.focusSize??e.getFormattedMarkerStyle(r).size,o=a/2,n=r.point.x-o,l=r.point.y-o;return mq.toCanvas(e.contentGroup,new u3(n,l,a,a))}function xW(e){return e.reduce(({min:e,max:t},i)=>((null==e||e.point.x>i.point.x)&&(e=i),(null==t||t.point.x<i.point.x)&&(t=i),{min:e,max:t}),{})}function x$(e,t,i){let r=(t.y-e.y)/(t.x-e.x),s=(i-e.x)*r+e.y;return{x:i,y:s}}function xY(e,t,i,r){let s=-1,a=0,o=[];for(;a<e.length;){if(e[a].change===t){o.push(e[a]),a++;continue}if(e[a].change===i){a++;continue}o.length>0&&(r(o,s,a),o.length=0),s=a,a++}o.length>0&&r(o,s,a)}function xK(e,t){xY(e,"out","in",(i,r,s)=>{-1===r&&e[s]?i.forEach(t=>t.to=e[s].from):s===e.length&&e[r]?i.forEach(t=>t.to=e[r].from):"intersect"===t&&e[r]?.from&&e[s]?.from?i.forEach(t=>t.to=x$(e[r].from,e[s].from,t.from.x)):i.forEach(e=>e.to=e.from)}),xY(e,"in","out",(i,r,s)=>{-1===r&&e[s]?i.forEach(t=>t.from=e[s].to):s===e.length&&e[r]?i.forEach(t=>t.from=e[r].to):"intersect"===t&&e[r]?.to&&e[s]?.to?i.forEach(t=>t.from=x$(e[r].to,e[s].to,t.to.x)):i.forEach(e=>e.from=e.to)})}function xZ(e,t,i){let r=isNaN(e.x)?t.x:e.x,s=isNaN(e.y)?t.y:e.y,a=t.x-e.x,o=t.y-e.y;return{x:r+(isNaN(a)?0:a*i),y:s+(isNaN(o)?0:o*i)}}var xq={start:0,middle:.5,end:1};function xX(e,t,i,r=!1){let{path:s}=t;i?.type==="smooth"?function(e,t,i,r){let s=Array.isArray(t)?t:Array.from(t);if(0===s.length||(r?e.lineTo(s[0].x,s[0].y):e.moveTo(s[0].x,s[0].y),s.length<=1))return;let a=s.map((e,t)=>{let i=0===t?e:s[t-1],r=t===s.length-1?e:s[t+1],a=0===t||t===s.length-1;if(Math.sign(i.y-e.y)===Math.sign(r.y-e.y))return 0;if(!a){let t=Math.abs(i.y-r.y),s=Math.abs(e.y-i.y)/t,a=Math.abs(e.y-r.y)/t;if(s<=.05||1-s<=.05||a<=.05||1-a<=.05)return 0}return(r.y-i.y)/(r.x-i.x)});0===a[1]&&(a[0]*=2),0===a[a.length-2]&&(a[a.length-1]*=2);for(let t=1;t<s.length;t+=1){let r=s[t-1],o=a[t-1],n=s[t],l=a[t],h=n.x-r.x,d=n.y-r.y,c=h*i/3,u=h*o*i/3,p=h*i/3,g=h*l*i/3;0===l&&Math.abs(u)>Math.abs(d)&&(c*=Math.abs(d/u),u=Math.sign(u)*Math.abs(d)),0===o&&Math.abs(g)>Math.abs(d)&&(p*=Math.abs(d/g),g=Math.sign(g)*Math.abs(d)),e.cubicCurveTo(r.x+c,r.y+u,n.x-p,n.y-g,n.x,n.y)}}(s,e,i.tension??1,r):i?.type==="step"?function(e,t,i,r){let s;for(let a of t){if(null!=s){let t=s.x<a.x?i:1-i,r=(a.x-s.x)*t+s.x;e.lineTo(r,s?.y??a.y),e.lineTo(r,a.y),e.lineTo(a.x,a.y)}else r?e.lineTo(a.x,a.y):e.moveTo(a.x,a.y);s=a}}(s,e,xq[i.position??"end"],r):function(e,t,i){let r=i;for(let{x:i,y:s}of t)r?e.lineTo(i,s):(e.moveTo(i,s),r=!0)}(s,e,r)}function xQ(e,t){let i,r;let s=[],a=()=>{null!=r&&(s.push(r),r=void 0)};for(let s of e){let{from:e,to:o}=s,n=t[s.change];if(null==n||null==e||null==o)continue;let l=xZ(e,o,n);if(!1===s.moveTo)r??(r=[]),r.push(l);else if(!0!==s.moveTo&&i){if(i){let{x:e,y:t}=xZ(i,l,"in"===s.moveTo?n:1-n);r??(r=[]),r.push({x:e,y:t}),a(),r=[l]}}else a(),r=[l];i=l}return a(),s}function xJ(e,t,i,r){xQ(e,t).forEach(e=>{xX(e,i,r)})}function x0({id:e,visible:t,nodeDataDependencies:i},r,...s){let{seriesRectWidth:a,seriesRectHeight:o}=i;p3(e,"path_properties",r,s,{clipX:0},{clipX:a},{phase:"initial",start:{clipMode:"normal",clipY:o,visible:t},finish:{clipMode:void 0,visible:t}})}function x1({id:e},t,i,r="add",...s){p3(e,t,i,s,{opacity:0},{opacity:1},{phase:r})}function x2({id:e},t,i,...r){p3(e,t,i,r,{opacity:1},{opacity:0},{phase:"remove"})}function x3(e){return t=>({visible:e.getVisible(),opacity:e.getOpacity(),clipScalingX:1,clipMode:void 0})}function x4({nodeDataDependencies:e},t){let i=e=>isFinite(e)?e:0;t.clipX=i(e.seriesRectWidth),t.clipY=i(e.seriesRectHeight)}function x6(e){return"continuous"===e.type||"log"===e.type}function x5(e){return"category"===e.type}function x8(e,t){return e.domain.length===t.domain.length&&e.range.length===t.range.length&&e.domain.every((e,i)=>e===t.domain[i])&&e.range.every((e,i)=>e===t.range[i])}function x7(e,t){return void 0===e||void 0===t?void 0!==e||void 0!==t:x6(e)&&x6(t)?e.type===t.type&&x8(e,t):!!(x5(e)&&x5(t))&&x8(e,t)}function x9(e){return!!(null!=e&&e.range.every(e=>Number.isFinite(e)))&&("category"===e.type?e.domain.every(e=>null!=e):e.domain.every(e=>Number.isFinite(e)||e instanceof Date))}function*Me(e){let t=-1,i=0;for(let{point:r}of e){if(r.moveTo){let e=t>=0?{start:t,end:i}:void 0;i=t=i,void 0!==e&&(yield e)}i+=1}-1!==t&&(yield{start:t,end:i})}function*Mt(e,{start:t,end:i}){for(let r=t;r<i;r+=1)yield e[r].point}function*Mi(e,{start:t,end:i}){for(let r=i-1;r>=t;r-=1)yield e[r].point}function Mr(e,t){if(!t)return NaN;if(e instanceof Date&&(e=e.getTime()),"continuous"===t.type&&"number"==typeof e)return(e-t.domain[0])/(t.domain[1]-t.domain[0])*(t.range[1]-t.range[0])+t.range[0];if("log"===t.type&&"number"==typeof e)return t.convert(e);let i=t.domain.findIndex(t=>t===e);if(i>=0)return t.range[i];let r=t.domain.findIndex(t=>{var i;return null!=(i=e)&&null!=t&&"object"==typeof i&&"object"==typeof t&&("id"in i&&"id"in t?i.id===t.id:i.toString()===t.toString())});return r>=0?t.range[r]:NaN}function Ms(e=!1,t=!1){return e===t?!!e:e?"in":"out"}function Ma(e,t,i={}){let{backfillSplitMode:r="intersect"}=i,s=[],a={added:{},moved:{},removed:{}},o=(e,t,i,r="move")=>{e&&(isNaN(e.point.x)||isNaN(e.point.y))&&(e=t);let o={from:e?.point,to:t?.point,moveTo:Ms(e?.point.moveTo,t?.point.moveTo),change:r};"move"===r?(a.moved[i]=o,c++,u++):"in"===r?(a.added[i]=o,u++):"out"===r&&(a.removed[i]=o,c++),s.push(o)},{min:n,max:l}=xW(t.nodeData),{min:h,max:d}=xW(e.nodeData),c=0,u=0;for(;c<t.nodeData.length||u<e.nodeData.length;){let i=t.nodeData[c],r=e.nodeData[u],s=i?Mr(i.xValue??NaN,e.scales.x):void 0,a=r?Mr(r.xValue??NaN,t.scales.x):void 0,p=void 0;if(null!=s&&function(e,t){let i=Number(e),r=Number(t);return isNaN(i)||isNaN(r)?e===t:.25>Math.abs(r-i)}(s,r?.point.x))o(i,r,r.xValue,"move");else if(null!=s&&s<(h?.point.x??-1/0))o(i,p,i.xValue,"out");else if(null!=s&&s>(d?.point.x??1/0))o(i,p,i.xValue,"out");else if(null!=a&&a<(n?.point.x??-1/0))o(p,r,r.xValue,"in");else if(null!=a&&a>(l?.point.x??1/0))o(p,r,r.xValue,"in");else if(null!=s&&s<r?.point.x)o(i,p,i.xValue,"out");else if(null!=a&&a<i?.point.x)o(p,r,r.xValue,"in");else if(i)o(i,p,i.xValue,"out");else if(r)o(p,r,r.xValue,"in");else throw Error("Unable to process points")}return xK(s,r),{result:s,resultMap:a}}function Mo(e,t,i,r={}){let s,a;let{backfillSplitMode:o="intersect",multiDatum:n=!1}=r,l=[],h={added:{},moved:{},removed:{}},d={added:{},moved:{},removed:{}},c={in:"added",move:"moved",out:"removed"},u=(e,t)=>{var i;let r=c[t.change];n?((i=d[r])[e]??(i[e]=[]),d[r][e].push(t)):h[r][e]=t,s=t,a=vv(e)},p=0,g=0,m=!1;for(;p<t.nodeData.length||g<e.nodeData.length;){let r;let o=t.nodeData[p],h=e.nodeData[g],d=vv(o?.xValue),c=vv(h?.xValue);if(d===c)r={change:"move",moveTo:Ms(o.point.moveTo??!1,h.point.moveTo),from:o.point,to:h.point},u(o?.xValue,r),p++,g++;else if(i?.removed.has(String(d)))r={change:"out",moveTo:o.point.moveTo??!1,from:o.point},u(o?.xValue,r),p++;else if(i?.added.has(String(c)))r={change:"in",moveTo:h.point.moveTo??!1,to:h.point},u(h?.xValue,r),g++;else if(n&&s&&a===d)r={...s},u(o?.xValue,r),p++;else if(n&&s&&a===c)r={...s},u(h?.xValue,r),g++;else{m=!0;break}l.push(r)}let f=-1/0;return(m||(m=l.some(e=>{let{change:t,to:{x:i=-1/0}={}}=e;if("out"===t)return;let r=i<f;return f=i,r})),m)?{result:void 0,resultMap:void 0}:(xK(l,o),{result:l,resultMap:n?d:h})}function Mn(e,t,i){let r="updated";if(!t.visible&&e.visible)r="added";else if(t.visible&&!e.visible)r="removed";else for(let e=0;e<i.length&&"move"===i[e].change&&i[e].from?.x===i[e].to?.x&&i[e].from?.y===i[e].to?.y;e++)if(e===i.length-1)return"no-op";return r}function Ml(e,t){let i="none"===t?"updated":e,r={fromFn:t=>{let r;return r="removed"===e?{finish:{visible:!1}}:"added"===e?{start:{visible:!0}}:{},{phase:p1[i],...r}},toFn:e=>({phase:p1[i]})};return"fade"===t?{fromFn:t=>({opacity:"added"===e?0:t.opacity,...r.fromFn(t)}),toFn:t=>({opacity:"removed"===e?0:1,...r.toFn(t)})}:r}function Mh(e,t,i,r,s,a){let o=Mn(e,t,i),n=Ml(o,r);return{status:o,path:{addPhaseFn:(e,t)=>{a(i,{move:1,in:e},t,s)},updatePhaseFn:(e,t)=>{a(i,{move:e},t,s)},removePhaseFn:(e,t)=>{a(i,{move:0,out:e},t,s)}},pathProperties:n}}function Md(e,t,i,r){let s=e.scales.x?.type==="category";if(s!==(t.scales.x?.type==="category")||!x9(e.scales.x)||!x9(t.scales.x))return;let{result:a,resultMap:o}=s?Mo(e,t,i):Ma(e,t),n="updated";if(t.visible&&!e.visible?n="removed":!t.visible&&e.visible&&(n="added"),void 0===a||void 0===o)return;let l=(i?.changed??!0)||!x7(e.scales.x,t.scales.x)||!x7(e.scales.y,t.scales.y)||"updated"!==n,h=Mh(e,t,a,"fade",r,xJ),d=xH(o,n);return{...h,marker:d,hasMotion:l}}function Mc(e){return vv(e).valueOf()}function Mu({data:e},t){return e.map((e,i)=>({xValue0Index:t.indexOf(Mc(e.xValue0)),xValue1Index:t.indexOf(Mc(e.xValue1)),datumIndex:i}))}function Mp(e,t,i){if(i.xValue1Index===i.xValue0Index+1)return e;let r=xI(e),s=(r[1].x-r[0].x)/(i.xValue1Index-i.xValue0Index),a=r[0].x+(t-i.xValue0Index)*s;return xT(e,a,a+s)}function Mg(e,t){let[i,r]=xI(e),s=Mr(0,t.scales.y);return xk(e,{x:i.x,y:s},{x:r.x,y:s})}function Mm(e,t,i,r,s){let a,o;if(r.xValue0Index>=s.xValue1Index){let e=i.findLast(e=>e.xValue1Index<=s.xValue1Index)?.datumIndex,r=null!=e?t.data[e]:void 0;a=r?.xValue1,o=r?.yValue1}else if(r.xValue0Index<=s.xValue0Index){let e=i.find(e=>e.xValue0Index>=s.xValue0Index)?.datumIndex,r=null!=e?t.data[e]:void 0;a=r?.xValue0,o=r?.yValue0}if(null==a||null==o)return Mg(e,t);let n={x:Mr(a,t.scales.x),y:Mr(o,t.scales.y)};return xk(e,n,n)}function Mf(e,t){let i=Mc(e.xValue0),r=Mc(e.xValue1);return t?.find(e=>Mc(e.xValue0)===i&&Mc(e.xValue1)===r)?.span}function Mv(e,t,i,r,s,a){let o=e.data[i.datumIndex],n=o.span,l=Mf(o,r);if(null!=l)a.removed.push({from:l,to:l}),a.moved.push({from:l,to:n}),a.added.push({from:n,to:n});else{let r=Mm(n,e,t,i,s);a.added.push({from:r,to:n})}}function My(e,t,i,r,s,a){let o=e.data[i.datumIndex],n=o.span,l=Mf(o,r);if(null!=l)a.removed.push({from:n,to:n}),a.moved.push({from:n,to:l}),a.added.push({from:l,to:l});else{let r=Mm(n,e,t,i,s);a.removed.push({from:n,to:r})}}function MC(e,t,i,r,s){let a=t[s.xValue0Index],o=i.data.find(e=>Mc(e.xValue0)===a),n=t[s.xValue1Index],l=i.data.find(e=>Mc(e.xValue1)===n);if(null==o||null==l)return;let[{x:h},{x:d}]=xI(e),c=Mr(o.xValue0,i.scales.x),u=Mr(o.yValue0,i.scales.y),p=Mr(l.xValue1,i.scales.x),g=Mr(l.yValue1,i.scales.y),m=r.data[s.datumIndex].span;return xT(m=xk(m,{x:c,y:u},{x:p,y:g}),h,d)}function Mw(e,t){let i={removed:[],moved:[],added:[]},r=function(e,t){let i=new Set;for(let{xValue0:t,xValue1:r}of e.data){let e=Mc(t),s=Mc(r);i.add(e).add(s)}let r=Array.from(i).sort((t,i)=>Mr(t,e.scales.x)-Mr(i,e.scales.x)),s=[];for(let{xValue0:e,xValue1:r}of t.data){let t=Mc(e),a=Mc(r);i.has(t)||(i.add(t),s.push(t)),i.has(a)||(i.add(a),s.push(a))}s.sort((e,i)=>Mr(e,t.scales.x)-Mr(i,t.scales.x));let a=0;for(let e of s){for(let i=r.length;i>a;i-=1)if(Mr(e,t.scales.x)>Mr(r[i],t.scales.x)){a=i+1;break}r.splice(a,0,e),a+=1}if(!function(e,t){let i=-1/0;for(let r of e){let e=Mr(r,t.scales.x);if(Number.isFinite(e)){if(e<i)return!1;i=e}}return!0}(r,t))return;let o=Mu(t,r),n=Mu(e,r);return{axisValues:r,oldDataAxisIndices:o,newDataAxisIndices:n}}(e,t);return null==r?function(e,t,i){for(let e of t.data){let r=e.span,s=Mf(e,t.zeroData)??Mg(r,t);i.removed.push({from:r,to:s})}for(let t of e.data){let r=t.span,s=Mf(t,e.zeroData)??Mg(r,e);i.added.push({from:s,to:r})}}(e,t,i):function(e,t,i,r){let{axisValues:s,oldDataAxisIndices:a,newDataAxisIndices:o}=e,n={xValue0Index:Math.max(a.at(0)?.xValue0Index??-1/0,o.at(0)?.xValue0Index??-1/0),xValue1Index:Math.min(a.at(-1)?.xValue1Index??1/0,o.at(-1)?.xValue1Index??1/0)};for(let e=0;e<s.length-1;e+=1)!function(e,t,i,r,s,a,o,n){let l;let h=r+1,d=a.find(e=>e.xValue0Index<=r&&e.xValue1Index>=h),c=s.find(e=>e.xValue0Index<=r&&e.xValue1Index>=h),u=t.zeroData,p=e.zeroData;if(null==d&&null!=c){Mv(e,s,c,u,o,n);return}if(null!=d&&null==c){My(t,a,d,p,o,n);return}if(null==d||null==c)return;l=d.xValue0Index===c.xValue0Index&&d.xValue1Index===c.xValue1Index?0:d.xValue0Index<=c.xValue0Index&&d.xValue1Index>=c.xValue1Index?-1:d.xValue0Index>=c.xValue0Index&&d.xValue1Index<=c.xValue1Index?1:0;let g=Mp(t.data[d.datumIndex].span,r,d),m=Mp(e.data[c.datumIndex].span,r,c);if(1===l){let r=MC(g,i,t,e,c);null!=r?(n.removed.push({from:g,to:r}),n.moved.push({from:r,to:m}),n.added.push({from:m,to:m})):My(t,a,d,p,o,n)}else if(-1===l){let r=MC(m,i,e,t,d);null!=r?(n.removed.push({from:g,to:g}),n.moved.push({from:g,to:r}),n.added.push({from:r,to:m})):Mv(e,s,c,u,o,n)}else n.removed.push({from:g,to:g}),n.moved.push({from:g,to:m}),n.added.push({from:m,to:m})}(t,i,s,e,o,a,n,r)}(r,e,t,i),i}function Mb(e,t,i,r){for(let s=0;s<i.length;s+=1){let a=i[s],o=r[s];xB(t.path,a.from,a.to,e,1,!1),xB(t.path,o.from,o.to,e,2,!0),t.path.closePath()}}function MS(e,t,i){for(let r of i)xB(t.path,r.from,r.to,e,1,!1)}function Mx(e,t){if(e.scales.x?.type==="category"!=(t.scales.x?.type==="category")||!x9(e.scales.x)||!x9(t.scales.x))return;let i="updated";t.visible&&!e.visible?i="removed":!t.visible&&e.visible&&(i="added");let r=Mw({scales:e.scales,data:e.fillData.spans,visible:e.visible},{scales:t.scales,data:t.fillData.spans,visible:t.visible}),s=Mw({scales:e.scales,data:e.fillData.phantomSpans,visible:e.visible},{scales:t.scales,data:t.fillData.phantomSpans,visible:t.visible}),a=Mw({scales:e.scales,data:e.strokeData.spans,visible:e.visible,zeroData:e.fillData.phantomSpans},{scales:t.scales,data:t.strokeData.spans,visible:t.visible,zeroData:t.fillData.phantomSpans}),o="none",n=function(e,t,i,r){let s=Ml(e,r);return{status:e,path:{addPhaseFn:(e,r)=>Mb(e,r,t.added,i.added),updatePhaseFn:(e,r)=>Mb(e,r,t.moved,i.moved),removePhaseFn:(e,r)=>Mb(e,r,t.removed,i.removed)},pathProperties:s}}(i,r,s,o),l=function(e,t,i){let r=Ml(e,i);return{status:e,path:{addPhaseFn:(e,i)=>MS(e,i,t.added),updatePhaseFn:(e,i)=>MS(e,i,t.moved),removePhaseFn:(e,i)=>MS(e,i,t.removed)},pathProperties:r}}(i,a,o);return{status:i,fill:n,stroke:l}}var MM=class extends bs{constructor(e){super({moduleCtx:e,directionKeys:be,directionNames:bt,pathsPerSeries:["fill","stroke"],pathsZIndexSubOrderOffset:[0,1e3],hasMarkers:!0,markerSelectionGarbageCollection:!1,pickModes:[1,0],animationResetFns:{path:x3({getVisible:()=>this.visible,getOpacity:()=>this.getOpacity()}),label:xf,marker:(e,t)=>({...xV(e),...xj(e,t)})}}),this.properties=new xD}async processData(e){if(null==this.data||!this.properties.isValid())return;let{data:t,visible:i,seriesGrouping:{groupIndex:r=this.id,stackCount:s=1}={}}=this,{xKey:a,yKey:o,yFilterKey:n,connectMissingData:l,normalizedTo:h}=this.properties,d=!this.ctx.animationManager.isSkipped(),c=this.axes.x?.scale,u=this.axes.y?.scale,{xScaleType:p,yScaleType:g}=this.getScaleInformation({xScale:c,yScale:u}),m={value:`area-stack-${r}-yValue`,values:`area-stack-${r}-yValues`,stack:`area-stack-${r}-yValue-stack`,marker:`area-stack-${r}-yValues-marker`},f=[];pg(h)&&f.push(xr(Object.values(m),h,"range")),d&&f.push(xo());let v={invalidValue:null};l&&s>1&&(v.invalidValue=0),i||(v.forceValue=0),await this.requestDataModel(e,t,{props:[S2(a,p,{id:"xValue"}),S3(o,g,{id:"yValueRaw",...v}),...null!=n?[S3(n,g,{id:"yFilterRaw"})]:[],...S7(o,g,{id:"yValueStack",...v,groupId:m.stack}),S3(o,g,{id:"yValue",...v,groupId:m.value}),...S8(o,"window","current",{id:"yValueEnd",...v,groupId:m.values},g),...S8(o,"normal","current",{id:"yValueCumulative",...v,groupId:m.marker},g),...f],groupByKeys:!0,groupByData:!1}),this.animationState.transition("updateData")}getSeriesDomain(e){let{processedData:t,dataModel:i,axes:r}=this;if(!t||!i||0===t.data.length)return[];let s=r.y,a=i.resolveProcessedDataDefById(this,"xValue"),o=i.getDomain(this,"xValue","key",t),n=i.getDomain(this,"yValueEnd","value",t);return"x"===e?a?.def.type==="key"&&"category"===a.def.valueType?o:CZ(mk(o)):s instanceof bp||s instanceof bg?CZ(n):CZ([n[0]>0?0:n[0],n[1]<0?0:n[1]])}async createNodeData(){let{axes:e,data:t,processedData:{data:i}={},dataModel:r}=this,s=e.x,a=e.y;if(!s||!a||!t||!r||!this.properties.isValid())return;let{yKey:o,xKey:n,yFilterKey:l,marker:h,label:d,fill:c,stroke:u,connectMissingData:p}=this.properties,{scale:g}=s,{scale:m}=a,{isContinuousY:f}=this.getScaleInformation({xScale:g,yScale:m}),v=(g.bandwidth??0)/2,y=r.resolveProcessedDataDefsByIds(this,["yValueEnd","yValueRaw","yValueCumulative"]),C=null!=l?r.resolveProcessedDataIndexById(this,"yFilterRaw"):void 0,w=r.resolveProcessedDataIndexById(this,"yValueStack"),b=(e,t,i)=>{let r;return(pg(this.properties.normalizedTo)?f&&vm(i):!isNaN(i))&&(r=t),{x:g.convert(e)+v,y:m.convert(r),size:h.size}},S=[],x=[],{visibleSameStackCount:M}=this.ctx.seriesStateManager.getVisiblePeerGroupIndex(this),E=-1,D=!1;i?.forEach(e=>{let{keys:t,keys:[i],datum:s,values:a}=e;a.forEach((e,a)=>{E++;let l=s[a],{yValueRaw:p,yValueCumulative:g,yValueEnd:m}=r.resolveProcessedDataDefsValues(y,{keys:t,values:e}),f=Number.isFinite(p),v=b(i,+g,p),w=null!=C?e[C]===p:void 0;if(!1===w&&(D=!0),f&&h&&x.push({index:E,series:this,itemId:o,datum:l,midPoint:{x:v.x,y:v.y},cumulativeValue:m,yValue:p,xValue:i,yKey:o,xKey:n,point:v,fill:h.fill??c,stroke:h.stroke??u,strokeWidth:h.strokeWidth??this.getStrokeWidth(this.properties.strokeWidth),selected:w}),f&&d){let e=this.getLabelText(d,{value:p,datum:l,xKey:n,yKey:o,xName:this.properties.xName,yName:this.properties.yName},e=>pD(e)?e.toFixed(2):String(e));S.push({index:E,series:this,itemId:o,datum:l,x:v.x,y:v.y,label:e?{text:e,fontStyle:d.fontStyle,fontWeight:d.fontWeight,fontSize:d.fontSize,fontFamily:d.fontFamily,textAlign:"center",textBaseline:"bottom",fill:d.color}:void 0})}})});let{interpolation:I}=this.properties,k=e=>{let t;let i=e.map(e=>e.point);switch(I.type){case"linear":t=function(e){let t=[],i=0,r=NaN,s=NaN;for(let{x:a,y:o}of e){if(i>0){let e=1===i;t.push({type:"linear",moveTo:e,x0:r,y0:s,x1:a,y1:o})}i+=1,r=a,s=o}return t}(i);break;case"smooth":t=function(e,t){let i=Array.isArray(e)?e:Array.from(e);if(i.length<=1)return[];let r=i.map((e,t)=>{let r=0===t?e:i[t-1],s=t===i.length-1?e:i[t+1],a=0===t||t===i.length-1;if(Math.sign(r.y-e.y)===Math.sign(s.y-e.y))return 0;if(!a){let t=Math.abs(r.y-s.y),i=Math.abs(e.y-r.y)/t,a=Math.abs(e.y-s.y)/t;if(i<=.05||1-i<=.05||a<=.05||1-a<=.05)return 0}return(s.y-r.y)/(s.x-r.x)});0===r[1]&&(r[0]*=2),0===r[r.length-2]&&(r[r.length-1]*=2);let s=[];for(let e=1;e<i.length;e+=1){let a=i[e-1],o=r[e-1],n=i[e],l=r[e],h=n.x-a.x,d=n.y-a.y,c=h*t/3,u=h*o*t/3,p=h*t/3,g=h*l*t/3;0===l&&Math.abs(u)>Math.abs(d)&&(c*=Math.abs(d/u),u=Math.sign(u)*Math.abs(d)),0===o&&Math.abs(g)>Math.abs(d)&&(p*=Math.abs(d/g),g=Math.sign(g)*Math.abs(d)),s.push({type:"cubic",moveTo:1===e,cp0x:a.x,cp0y:a.y,cp1x:a.x+c,cp1y:a.y+u,cp2x:n.x-p,cp2y:n.y-g,cp3x:n.x,cp3y:n.y})}return s}(i,I.tension);break;case"step":t=function(e,t){let i=[],r=0,s=NaN,a=NaN,o="number"==typeof t?t:xA[t];for(let{x:t,y:n}of e){if(r>0){let e=1===r,l=s+(t-s)*o;i.push({type:"step",moveTo:e,x0:s,y0:a,x1:t,y1:n,stepX:l})}r+=1,s=t,a=n}return i}(i,I.position)}return t.map((t,i)=>({span:t,xValue0:e[i].xDatum,yValue0:e[i].yDatum,xValue1:e[i+1].xDatum,yValue1:e[i+1].yDatum}))},T=e=>e.flatMap(e=>Array.isArray(e)?k(e):Array(e.skip).fill(null)),A=i?.flatMap(e=>{let{keys:[t],values:i}=e;return i.map(e=>({xDatum:t,values:e}))}),R=(e,t)=>({point:{x:g.convert(e)+v,y:m.convert(t)},xDatum:e,yDatum:t}),L=e=>{let t=[];if(null==A)return[];for(let i=0;i<A.length;i+=1){let{xDatum:r,values:s}=A[i],a=s[w],o=Number.isFinite(a[e]);if(p&&!o)continue;let n=A[i-1]?.values[w],l=A[i+1]?.values[w],h=0,d=0;for(let t=0;t<=e;t+=1){let e=a[t];if(Number.isFinite(e)){let i=null==n||Number.isFinite(n[t]),r=null==l||Number.isFinite(l[t]);i&&(h+=e),r&&(d+=e)}}let c=t[t.length-1];if(p||h===d&&o){let e=R(r,Math.max(h,d));Array.isArray(c)?c.push(e):(null!=c&&(c.skip+=1),t.push([e]))}else if(!o&&Array.isArray(c)&&1===c.length)t[t.length-1]={skip:1};else{let e=R(r,h),i=R(r,d);Array.isArray(c)?c.push(e):null!=c&&(c.skip+=1),t.push(o?[i]:{skip:0})}}return T(t)},P=this.seriesGrouping?.stackIndex??0,F=()=>null==A?[]:k(A.map(({xDatum:e,values:t})=>{let i=t[w][P];if(!p||Number.isFinite(i))return R(e,0)}).filter(e=>null!=e)),N=L(P),O=N.map(()=>null);for(let e=P-1;e>=-1;e-=1){let t;for(let i=0;i<O.length;i+=1)null==O[i]&&(t??(t=-1!==e?L(e):F()),O[i]=t[i])}return{itemId:o,fillData:{itemId:o,spans:N.map((e,t)=>e??O[t]),phantomSpans:O},strokeData:{itemId:o,spans:N.filter(e=>null!=e)},labelData:S,nodeData:x,scales:this.calculateScaling(),visible:this.visible,stackVisible:M>0,crossFiltering:D}}isPathOrSelectionDirty(){return this.properties.marker.isDirty()}markerFactory(){let{shape:e}=this.properties.marker;return new(w2(e))}async updatePathNodes(e){let{opacity:t,visible:i,animationEnabled:r}=e,[s,a]=e.paths,o=this.contextNodeData?.crossFiltering===!0,n=this.getStrokeWidth(this.properties.strokeWidth);a.setProperties({fill:void 0,lineJoin:a.lineCap="round",pointerEvents:1,stroke:this.properties.stroke,strokeWidth:n,strokeOpacity:this.properties.strokeOpacity*(o?.25:1),lineDash:this.properties.lineDash,lineDashOffset:this.properties.lineDashOffset,opacity:t,visible:i||r}),s.setProperties({stroke:void 0,lineJoin:"round",pointerEvents:1,fill:this.properties.fill,fillOpacity:this.properties.fillOpacity*(o?.125:1),fillShadow:this.properties.shadow,opacity:t,visible:i||r}),x4(this,a),x4(this,s)}async updatePaths(e){this.updateAreaPaths(e.paths,e.contextData)}updateAreaPaths(e,t){for(let i of e)i.visible=t.visible;if(t.visible)this.updateFillPath(e,t),this.updateStrokePath(e,t);else for(let t of e)t.path.clear(),t.checkPathDirty()}updateFillPath(e,t){let{spans:i,phantomSpans:r}=t.fillData,[s]=e,{path:a}=s;a.clear(!0);for(let e=0;e<i.length;e+=1){let{span:t}=i[e],s=r[e].span;xO(a,t,1,!1),xO(a,s,2,!0),a.closePath()}s.checkPathDirty()}updateStrokePath(e,t){let{spans:i}=t.strokeData,[,r]=e,{path:s}=r;for(let{span:e}of(s.clear(!0),i))xO(s,e,1,!1);r.checkPathDirty()}async updateMarkerSelection(e){let{nodeData:t,markerSelection:i}=e,r=this.properties.marker.enabled||this.contextNodeData?.crossFiltering===!0;return this.properties.marker.isDirty()&&(i.clear(),i.cleanup()),i.update(r?t:[])}async updateMarkerNodes(e){let{markerSelection:t,isHighlight:i}=e,{xKey:r,yKey:s,marker:a,fill:o,stroke:n,strokeWidth:l,fillOpacity:h,strokeOpacity:d,highlightStyle:c}=this.properties,u=pP(i&&c.item,a.getStyle(),{fill:o,stroke:n,strokeWidth:l,fillOpacity:h,strokeOpacity:d});t.each((e,t)=>{this.updateMarkerStyle(e,a,{datum:t,highlighted:i,xKey:r,yKey:s},u,{selected:t.selected})}),i||this.properties.marker.markClean()}async updateLabelSelection(e){let{labelData:t,labelSelection:i}=e;return i.update(t)}async updateLabelNodes(e){let{labelSelection:t}=e,{enabled:i,fontStyle:r,fontWeight:s,fontSize:a,fontFamily:o,color:n}=this.properties.label;t.each((e,t)=>{let{x:l,y:h,label:d}=t;d&&i&&this.visible?(e.fontStyle=r,e.fontWeight=s,e.fontSize=a,e.fontFamily=o,e.textAlign=d.textAlign,e.textBaseline=d.textBaseline,e.text=d.text,e.x=l,e.y=h-10,e.fill=n,e.visible=!0):e.visible=!1})}getTooltipHtml(e){let{id:t,axes:i,dataModel:r}=this,{xKey:s,xName:a,yName:o,tooltip:n,marker:l}=this.properties,{yKey:h,xValue:d,yValue:c,datum:u,itemId:p}=e,g=i.x,m=i.y;if(!this.properties.isValid()||!(g&&m&&pD(c))||!r)return vr;let f=g.formatDatum(d),v=m.formatDatum(c),y=S_(o),C=S_(f+": "+v),w=pP({fill:this.properties.fill},l.getStyle(),{stroke:this.properties.stroke,strokeWidth:this.properties.strokeWidth}),{fill:b}=this.getMarkerStyle(l,{datum:e,xKey:s,yKey:h,highlighted:!1},w);return n.toTooltipHtml({title:y,content:C,backgroundColor:b},{datum:u,itemId:p,xKey:s,xName:a,yKey:h,yName:o,color:b,title:y,seriesId:t})}getLegendData(e){if(!this.data?.length||!this.properties.isValid()||!this.properties.showInLegend||"category"!==e)return[];let{yKey:t,yName:i,fill:r,stroke:s,fillOpacity:a,strokeOpacity:o,strokeWidth:n,lineDash:l,marker:h,visible:d,legendItemName:c}=this.properties,u=!h.enabled||void 0===h.fill;return[{legendType:e,id:this.id,itemId:t,seriesId:this.id,enabled:d,label:{text:c??i??t},symbols:[{marker:{shape:h.shape,fill:u?r:h.fill,fillOpacity:u?a:h.fillOpacity,stroke:h.stroke??s,strokeOpacity:h.strokeOpacity??o,strokeWidth:h.strokeWidth??0,enabled:h.enabled||n<=0},line:{stroke:s,strokeOpacity:o,strokeWidth:n,lineDash:l}}],legendItemName:c}]}animateEmptyUpdateReady(e){let{markerSelection:t,labelSelection:i,contextData:r,paths:s}=e,{animationManager:a}=this.ctx;this.updateAreaPaths(s,r),x0(this,a,...s),ms([t],xj),x_(this,a,t),xg(this,"labels",a,i)}animateReadyResize(e){let{contextData:t,paths:i}=e;this.updateAreaPaths(i,t),super.animateReadyResize(e)}animateWaitingUpdateReady(e){let{animationManager:t}=this.ctx,{markerSelection:i,labelSelection:r,contextData:s,paths:a,previousContextData:o}=e,[n,l]=a;if(null==n&&null==l)return;this.resetMarkerAnimation(e),this.resetLabelAnimation(e);let h=()=>{this.resetPathAnimation(e),this.updateAreaPaths(a,s)},d=()=>{t.skipCurrentBatch(),h()};if(null==s||null==o){h(),xG(this,t,"added",i),x1(this,"fill_path_properties",t,"add",n),x1(this,"stroke_path_properties",t,"add",l),xg(this,"labels",t,r);return}if(s.crossFiltering!==o.crossFiltering){d();return}let c=Mx(s,o);if(void 0===c){d();return}"no-op"!==c.status&&(xG(this,t,void 0,i),p2(this.id,"fill_path_properties",t,[n],c.fill.pathProperties),SG(this.id,"fill_path_update",t,[n],c.fill.path),p2(this.id,"stroke_path_properties",t,[l],c.stroke.pathProperties),SG(this.id,"stroke_path_update",t,[l],c.stroke.path),xg(this,"labels",t,r),this.ctx.animationManager.animate({id:this.id,groupId:"reset_after_animation",phase:"trailing",from:{},to:{},onComplete:()=>this.updateAreaPaths(a,s)}))}isLabelEnabled(){return this.properties.label.enabled}nodeFactory(){return new mQ}getFormattedMarkerStyle(e){let{xKey:t,yKey:i}=e;return this.getMarkerStyle(this.properties.marker,{datum:e,xKey:t,yKey:i,highlighted:!0})}computeFocusBounds(e){return xU(this,e)}};MM.className="AreaSeries",MM.type="area";var ME={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["cartesian"],identifier:"area",moduleFactory:e=>new MM(e),stackable:!0,tooltipDefaults:{range:"nearest"},defaultAxes:[{type:"number",position:"left"},{type:"category",position:"bottom"}],themeTemplate:{series:{nodeClickRange:"nearest",tooltip:{position:{type:"node"}},fillOpacity:.8,strokeOpacity:1,strokeWidth:0,lineDash:[0],lineDashOffset:0,shadow:{enabled:!1,color:Sn,xOffset:3,yOffset:3,blur:5},interpolation:{type:"linear",tension:1,position:"end"},marker:{enabled:!1,shape:"circle",size:7,strokeWidth:0},label:{enabled:!1,fontSize:12,fontFamily:b7,color:b9}}},paletteFactory:e=>{let{marker:t}=b0(e);return{fill:t.fill,stroke:t.stroke,marker:t}}};function*MD(e){for(let t of e.children)yield t}function MI(e,t){for(let i of t){let t=i.datum;void 0===t?ul.error("undefined datum"):e.addValue(i,t)}}function Mk(e,t){let{x:i,y:r}=t,{nearest:s,distanceSquared:a}=e.getQuadTree().find(i,r);if(void 0!==s)return{datum:s.value,distance:Math.sqrt(a)}}var MT=class extends br{constructor(){super(...arguments),this.direction="vertical"}};c7([gp(g0)],MT.prototype,"direction",2);var MA=class extends bs{constructor(){super(...arguments),this.groupScale=new gh,this.smallestDataInterval=void 0,this.largestDataInterval=void 0}padBandExtent(e,t){let i=pD(this.smallestDataInterval)?this.smallestDataInterval*("boolean"==typeof t?1:.5):0,r=mk(e)??[NaN,NaN];return"boolean"==typeof t?r[t?0:1]-=(t?1:-1)*i:(r[0]-=i,r[1]+=i),CZ(r)}getBandScalePadding(){return{inner:.3,outer:.15}}shouldFlipXY(){return!this.isVertical()}isVertical(){return"vertical"===this.properties.direction}getBarDirection(){return this.shouldFlipXY()?"x":"y"}getCategoryDirection(){return this.shouldFlipXY()?"y":"x"}getValueAxis(){let e=this.getBarDirection();return this.axes[e]}getCategoryAxis(){let e=this.getCategoryDirection();return this.axes[e]}getBandwidth(e){return mo.is(e.scale)?e.scale.calcBandwidth(this.smallestDataInterval):e.scale.bandwidth}updateGroupScale(e){let t=[],{groupScale:i}=this,r=this.getBandwidth(e),{index:s,visibleGroupCount:a}=this.ctx.seriesStateManager.getVisiblePeerGroupIndex(this);for(let e=0;e<a;e++)t.push(String(e));return i.domain=t,i.range=[0,r??0],e instanceof v5?i.paddingInner=e.groupPaddingInner:e instanceof yt?i.padding=.1:i.padding=0,i.round=0!==i.padding,{barWidth:i.bandwidth>=1?i.bandwidth:i.rawBandwidth,groupIndex:s}}resolveKeyDirection(e){return"x"===this.getBarDirection()?"x"===e?"y":"x":e}initQuadTree(e){MI(e,this.datumNodesIter())}pickNodeClosestDatum(e){return Mk(this,e)}},MR=class extends vh{constructor(){super(...arguments),this.placement="inside"}};c7([gp(g1)],MR.prototype,"placement",2);var ML=class extends MT{constructor(){super(...arguments),this.fill="#c16068",this.fillOpacity=1,this.stroke="#874349",this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.cornerRadius=0,this.crisp=void 0,this.shadow=new xy,this.label=new MR,this.tooltip=new xS}};function MP(e,t){e.crisp=t.crisp??!0,e.fill=t.fill,e.stroke=t.stroke,e.strokeWidth=t.strokeWidth,e.fillOpacity=t.fillOpacity,e.strokeOpacity=t.strokeOpacity,e.lineDash=t.lineDash,e.lineDashOffset=t.lineDashOffset,e.fillShadow=t.fillShadow,e.topLeftCornerRadius=!1!==t.topLeftCornerRadius?t.cornerRadius??0:0,e.topRightCornerRadius=!1!==t.topRightCornerRadius?t.cornerRadius??0:0,e.bottomRightCornerRadius=!1!==t.bottomRightCornerRadius?t.cornerRadius??0:0,e.bottomLeftCornerRadius=!1!==t.bottomLeftCornerRadius?t.cornerRadius??0:0,e.visible=t.visible??!0}function MF({datum:e,isHighlighted:t,style:i,highlightStyle:r,itemStyler:s,seriesId:a,ctx:{callbackCache:o},...n}){let l;let{fill:h,fillOpacity:d,stroke:c,strokeWidth:u,strokeOpacity:p,lineDash:g,lineDashOffset:m,cornerRadius:f=0}=pP(t&&r,i);return s&&(l=o.call(s,{datum:e.datum,xKey:e.xKey,fill:h,fillOpacity:d,stroke:c,strokeWidth:u,strokeOpacity:p,lineDash:g,lineDashOffset:m,cornerRadius:f,highlighted:t,seriesId:a,...n})),{fill:l?.fill??h,fillOpacity:l?.fillOpacity??d,stroke:l?.stroke??c,strokeWidth:l?.strokeWidth??u,strokeOpacity:l?.strokeOpacity??p,lineDash:l?.lineDash??g,lineDashOffset:l?.lineDashOffset??m,cornerRadius:l?.cornerRadius??f,topLeftCornerRadius:i.topLeftCornerRadius,topRightCornerRadius:i.topRightCornerRadius,bottomRightCornerRadius:i.bottomRightCornerRadius,bottomLeftCornerRadius:i.bottomLeftCornerRadius,fillShadow:i.fillShadow}}function MN(e,t,i,r){if(null!=t){let[e,i]=t;if(0!==e||1!==i)return!1}if(mo.is(e)){let t=e.calcBandwidth(r)-e.calcBandwidth(i);if(t>0&&t<1)return!1}return!0}c7([gp(gw)],ML.prototype,"xKey",2),c7([gp(gw,{optional:!0})],ML.prototype,"xName",2),c7([gp(gw)],ML.prototype,"yKey",2),c7([gp(gw,{optional:!0})],ML.prototype,"yName",2),c7([gp(gw,{optional:!0})],ML.prototype,"yFilterKey",2),c7([gp(gw,{optional:!0})],ML.prototype,"stackGroup",2),c7([gp(gb,{optional:!0})],ML.prototype,"normalizedTo",2),c7([gp(gO)],ML.prototype,"fill",2),c7([gp(gE)],ML.prototype,"fillOpacity",2),c7([gp(gO)],ML.prototype,"stroke",2),c7([gp(gM)],ML.prototype,"strokeWidth",2),c7([gp(gE)],ML.prototype,"strokeOpacity",2),c7([gp(g$)],ML.prototype,"lineDash",2),c7([gp(gM)],ML.prototype,"lineDashOffset",2),c7([gp(gM)],ML.prototype,"cornerRadius",2),c7([gp(gy,{optional:!0})],ML.prototype,"crisp",2),c7([gp(gC,{optional:!0})],ML.prototype,"itemStyler",2),c7([gp(gf,{optional:!0})],ML.prototype,"shadow",2),c7([gp(gf)],ML.prototype,"label",2),c7([gp(gf)],ML.prototype,"tooltip",2);var MO=e=>uq(e.yValue??0);function MB(e,t,i){let{startingX:r,startingY:s}=function(e,t){let i=t[e?"y":"x"],r=1/0,s=0;return i&&(e?s=i.scale.convert(mo.is(i.scale)?0:Math.max(...i.range)):r=i.scale.convert(mo.is(i.scale)?0:Math.min(...i.range))),{startingX:r,startingY:s}}(e,t);return{isVertical:e,calculate:(t,i)=>{let a,o=e?t.x:r,n=e?s:t.y,l=e?t.width:0,h=e?0:t.height,{opacity:d}=t;return i&&(isNaN(o)||isNaN(n))&&({x:o,y:n}=i,l=e?i.width:0,h=e?0:i.height,e&&!MO(i)?n+=i.height:!e&&MO(i)&&(o+=i.width)),a=null==t.clipBBox?void 0:MO(t)?e?new u3(o,n-h,l,h):new u3(o-l,n,l,h):new u3(o,n,l,h),{x:o,y:n,width:l,height:h,clipBBox:a,opacity:d}},mode:i}}function MG(e,t){return{isVertical:e,calculate:t=>({x:e?t.x:t.x+t.width/2,y:e?t.y+t.height/2:t.y,width:e?t.width:0,height:e?0:t.height,clipBBox:t.clipBBox,opacity:t.opacity}),mode:t}}function Mz(e){let t=e=>null==e||isNaN(e.x)||isNaN(e.y);return{toFn:(i,r,s)=>"removed"===s&&null==i.datum&&"fade"===e.mode?{...M_(i,r),opacity:0}:"removed"===s||t(r)?e.calculate(r,i.previousDatum):{x:r.x,y:r.y,width:r.width,height:r.height,clipBBox:r.clipBBox,opacity:r.opacity},fromFn:(i,r,s)=>{let a;"updated"===s&&t(r)?s="removed":"updated"===s&&t(i.previousDatum)&&(s="added"),a="added"===s&&null==i.previousDatum&&"fade"===e.mode?{...M_(i,r),opacity:0}:"unknown"===s||"added"===s?e.calculate(r,i.previousDatum):{x:i.x,y:i.y,width:i.width,height:i.height,clipBBox:i.clipBBox,opacity:i.opacity};let o=p1[s];return{...a,phase:o}}}}function M_(e,{x:t,y:i,width:r,height:s,clipBBox:a,opacity:o}){return{x:t,y:i,width:r,height:s,clipBBox:a,opacity:o}}function MV(e,t,i){if(void 0===e)return;let{x:r,y:s,width:a,height:o}=e;return mq.toCanvas(t,new u3(r,s,a,o)).clip(i)}function Mj(e,t,i){if(t.enabled&&i){let{x:r,y:s,text:a,textAlign:o,textBaseline:n}=i,{color:l,fontStyle:h,fontWeight:d,fontSize:c,fontFamily:u}=t;e.setProperties({visible:!0,x:r,y:s,text:a,fill:l,fontStyle:h,fontWeight:d,fontSize:c,fontFamily:u,textAlign:o,textBaseline:n})}else e.visible=!1}function MH({isPositive:e,isVertical:t,placement:i,padding:r=0,rect:s}){let a=s.x+s.width/2,o=s.y+s.height/2,n="center",l="middle";switch(i){case"start":t?(o=e?s.y+s.height+r:s.y-r,l=e?"top":"bottom"):(a=e?s.x-r:s.x+s.width+r,n=e?"start":"end");break;case"outside":case"end":t?(o=e?s.y-r:s.y+s.height+r,l=e?"bottom":"top"):(a=e?s.x+s.width+r:s.x-r,n=e?"start":"end")}return{x:a,y:o,textAlign:n,textBaseline:l}}var MU=class extends MA{constructor(e){super({moduleCtx:e,directionKeys:be,directionNames:bt,pickModes:[3,0],pathsPerSeries:[],hasHighlightedLabels:!0,datumSelectionGarbageCollection:!1,animationAlwaysUpdateSelections:!0,animationResetFns:{datum:M_,label:xf}}),this.properties=new ML}crossFilteringEnabled(){return null!=this.properties.yFilterKey&&(null==this.seriesGrouping||0===this.seriesGrouping.stackIndex)}async processData(e){if(!this.properties.isValid()||!this.data)return;let{seriesGrouping:{groupIndex:t=this.id}={},data:i=[]}=this,{xKey:r,yKey:s,yFilterKey:a,normalizedTo:o}=this.properties,n=!this.ctx.animationManager.isSkipped(),l=this.getCategoryAxis()?.scale,h=this.getValueAxis()?.scale,{isContinuousX:d,xScaleType:c,yScaleType:u}=this.getScaleInformation({xScale:l,yScale:h}),p=`bar-stack-${t}-yValues`,g=`${p}-trailing`,m=[];pD(o)&&m.push(xr([p,g],Math.abs(o),"range")),n&&this.processedData&&m.push(xu(this.processedData)),n&&m.push(xo());let f=this.visible?{}:{forceValue:0},{processedData:v}=await this.requestDataModel(e,i,{props:[S2(r,c,{id:"xValue"}),S3(s,u,{id:"yValue-raw",invalidValue:null,...f}),...this.crossFilteringEnabled()?[S3(a,u,{id:"yFilterValue",invalidValue:null,...f})]:[],...S8(s,"normal","current",{id:"yValue-end",rangeId:"yValue-range",invalidValue:null,missingValue:0,groupId:p,separateNegative:!0,...f},u),...S8(s,"trailing","current",{id:"yValue-start",invalidValue:null,missingValue:0,groupId:g,separateNegative:!0,...f},u),...d?[S9,xe]:[],...m],groupByKeys:!0,groupByData:!1});this.smallestDataInterval=v.reduced?.smallestKeyInterval,this.largestDataInterval=v.reduced?.largestKeyInterval,this.animationState.transition("updateData")}getSeriesDomain(e){let{processedData:t,dataModel:i}=this;if(!i||!t?.data.length)return[];let r=i.resolveProcessedDataDefById(this,"xValue"),s=i.getDomain(this,"xValue","key",t),a=i.getDomain(this,"yValue-end","value",t),o=this.crossFilteringEnabled()?i.getDomain(this,"yFilterValue","value",t):void 0;return(null!=o&&(a=[Math.min(a[0],o[0]),Math.max(a[1],o[1])]),e===this.getCategoryDirection())?r?.def.type==="key"&&"category"===r.def.valueType?s:this.padBandExtent(s):this.getValueAxis() instanceof bp?CZ(a):CZ([Math.min(0,a[0]),Math.max(0,a[1])])}async createNodeData(){let{dataModel:e}=this,t=this.getCategoryAxis(),i=this.getValueAxis();if(!e||!t||!i||!this.properties.isValid())return;let r=t.scale,s=i.scale,{xKey:a,yKey:o,xName:n,yName:l,fill:h,stroke:d,strokeWidth:c,cornerRadius:u,legendItemName:p,label:g}=this.properties,m=i.isReversed(),{barWidth:f,groupIndex:v}=this.updateGroupScale(t),y=mo.is(r)?-.5*f:0,C=e.resolveProcessedDataIndexById(this,"xValue"),w=e.resolveProcessedDataIndexById(this,"yValue-raw"),b=this.crossFilteringEnabled()?e.resolveProcessedDataIndexById(this,"yFilterValue"):void 0,S=e.resolveProcessedDataIndexById(this,"yValue-start"),x=e.resolveProcessedDataIndexById(this,"yValue-end"),M=e.resolveProcessedDataIndexById(this,"yValue-range"),E=!this.ctx.animationManager.isSkipped(),D=({datum:e,valueIndex:t,xValue:i,yValue:n,cumulativeValue:l,phantom:p,currY:C,prevY:w,isPositive:b,yRange:S,labelText:x,crossScale:M=1})=>{let E=r.convert(i),D=b!==m,k=E+I.convert(String(v))+y,T=s.convert(C),A=s.convert(w),R="x"===this.getBarDirection(),L=s.convert(S),P=s.convert(0),F=.5*f*(1-M),N={x:R?Math.min(T,A):k+F,y:R?k+F:Math.min(T,A),width:R?Math.abs(A-T):f*M,height:R?f*M:Math.abs(A-T)},O=new u3(N.x,N.y,N.width,N.height),B={x:R?Math.min(P,L):k+F,y:R?k+F:Math.min(P,L),width:R?Math.abs(P-L):f*M,height:R?f*M:Math.abs(P-L)},{fontStyle:G,fontWeight:z,fontSize:_,fontFamily:V,color:j,placement:H}=g,U=this.shouldFlipXY()?N.height:N.width;return{series:this,itemId:p?xp(o,p):o,datum:e,valueIndex:t,cumulativeValue:l,phantom:p,xValue:i,yValue:n,yKey:o,xKey:a,capDefaults:{lengthRatioMultiplier:U,lengthMax:U},x:B.x,y:B.y,width:B.width,height:B.height,midPoint:{x:N.x+N.width/2,y:N.y+N.height/2},fill:h,stroke:d,opacity:1,strokeWidth:c,cornerRadius:u,topLeftCornerRadius:R!==D,topRightCornerRadius:D,bottomRightCornerRadius:R===D,bottomLeftCornerRadius:!D,clipBBox:O,label:null!=x?{text:x,fill:j,fontStyle:G,fontWeight:z,fontSize:_,fontFamily:V,...MH({isPositive:b,isVertical:!R,placement:H,rect:N})}:void 0,missing:null==n,focusable:!p}},{groupScale:I,processedData:k}=this,T=[],A=[],R=[];return k?.data.forEach(({keys:e,datum:t,values:i,aggValues:r})=>{i.forEach((i,s)=>{let h=e[C],d=i[w],c=Number(i[S]),u=null!=b?Number(i[b]):void 0,g=Number(i[x]),m=d>=0&&!Object.is(d,-0),f=r?.[M][m?1:0]??0;if(!Number.isFinite(g)||null!=u&&!Number.isFinite(u))return;let v=null!=d?this.getLabelText(this.properties.label,{datum:t[s],value:u??d,xKey:a,yKey:o,xName:n,yName:l,legendItemName:p},e=>pD(e)?e.toFixed(2):String(e)):void 0,y=null!=u&&u>d,E=D({datum:t[s],valueIndex:s,xValue:h,yValue:u??d,cumulativeValue:u??g,phantom:!1,currY:null!=u?c+u:g,prevY:c,isPositive:m,yRange:Math.max(c+(u??-1/0),f),labelText:v,crossScale:y?.6:void 0});if(A.push(E),R.push(E),null!=u){let e=D({datum:t[s],valueIndex:s,xValue:h,yValue:u,cumulativeValue:u,phantom:!0,currY:g,prevY:c,isPositive:m,yRange:f,labelText:void 0,crossScale:void 0});T.push(e)}})}),{itemId:o,nodeData:T.length>0?[...T,...A]:A,labelData:R,scales:this.calculateScaling(),visible:this.visible||E}}nodeFactory(){return new by}getHighlightData(e,t){let i=e.find(e=>e.datum===t.datum&&!e.phantom);return null!=i?[i]:void 0}async updateDatumSelection(e){return e.datumSelection.update(e.nodeData,void 0,e=>xp(e.xValue,e.valueIndex,e.phantom))}async updateDatumNodes(e){if(!this.properties.isValid())return;let{yKey:t,stackGroup:i,fill:r,fillOpacity:s,stroke:a,strokeWidth:o,strokeOpacity:n,lineDash:l,lineDashOffset:h,itemStyler:d,shadow:c,highlightStyle:{item:u}}=this.properties,p=this.axes.x,g=this.properties.crisp??MN(p?.scale,p?.visibleRange,this.smallestDataInterval,this.largestDataInterval),m="x"===this.getCategoryDirection(),f={fill:r,stroke:a,lineDash:l,lineDashOffset:h,fillShadow:c,strokeWidth:this.getStrokeWidth(o),fillOpacity:0,strokeOpacity:0},v={datum:void 0,ctx:this.ctx,seriesId:this.id,isHighlighted:e.isHighlight,highlightStyle:u,yKey:t,style:f,itemStyler:d,stackGroup:i};e.datumSelection.each((e,t)=>{f.fillOpacity=s*(t.phantom?.2:1),f.strokeOpacity=n*(t.phantom?.2:1),f.cornerRadius=t.cornerRadius,f.topLeftCornerRadius=t.topLeftCornerRadius,f.topRightCornerRadius=t.topRightCornerRadius,f.bottomRightCornerRadius=t.bottomRightCornerRadius,f.bottomLeftCornerRadius=t.bottomLeftCornerRadius;let i=m?(t.clipBBox?.width??t.width)>0:(t.clipBBox?.height??t.height)>0;v.datum=t;let r=MF(v);r.crisp=g,r.visible=i,MP(e,r)})}async updateLabelSelection(e){let t=this.isLabelEnabled()?e.labelData:[];return e.labelSelection.update(t,e=>{e.pointerEvents=1})}async updateLabelNodes(e){e.labelSelection.each((e,t)=>{Mj(e,this.properties.label,t.label)})}getTooltipHtml(e){let t;let{id:i,processedData:r,ctx:{callbackCache:s}}=this,a=this.getCategoryAxis(),o=this.getValueAxis();if(!r||!this.properties.isValid()||!a||!o)return vr;let{xKey:n,yKey:l,xName:h,yName:d,fill:c,stroke:u,strokeWidth:p,tooltip:g,itemStyler:m,stackGroup:f,legendItemName:v}=this.properties,{xValue:y,yValue:C,datum:w,itemId:b}=e,S=a.formatDatum(y),x=o.formatDatum(C),M=S_(d),E=S_(S+": "+x);m&&(t=s.call(m,{seriesId:i,datum:w,xKey:n,yKey:l,stackGroup:f,fill:c,stroke:u,strokeWidth:this.getStrokeWidth(p),highlighted:!1,cornerRadius:this.properties.cornerRadius,fillOpacity:this.properties.fillOpacity,strokeOpacity:this.properties.strokeOpacity,lineDash:this.properties.lineDash??[],lineDashOffset:this.properties.lineDashOffset}));let D=t?.fill??c;return g.toTooltipHtml({title:M,content:E,backgroundColor:D},{seriesId:i,itemId:b,datum:w,xKey:n,yKey:l,xName:h,yName:d,stackGroup:f,title:M,color:D,legendItemName:v,...this.getModuleTooltipParams()})}getLegendData(e){let{showInLegend:t}=this.properties;if("category"!==e||!this.data?.length||!this.properties.isValid()||!t)return[];let{yKey:i,yName:r,fill:s,stroke:a,strokeWidth:o,fillOpacity:n,strokeOpacity:l,legendItemName:h,visible:d}=this.properties;return[{legendType:"category",id:this.id,itemId:i,seriesId:this.id,enabled:d,label:{text:h??r??i},symbols:[{marker:{fill:s,fillOpacity:n,stroke:a,strokeWidth:o,strokeOpacity:l}}],legendItemName:h}]}animateEmptyUpdateReady({datumSelection:e,labelSelection:t,annotationSelections:i}){let r=Mz(MB(this.isVertical(),this.axes,"normal"));p2(this.id,"nodes",this.ctx.animationManager,[e],r),xg(this,"labels",this.ctx.animationManager,t),xg(this,"annotations",this.ctx.animationManager,...i)}animateWaitingUpdateReady(e){let{datumSelection:t,labelSelection:i,annotationSelections:r,previousContextData:s}=e;this.ctx.animationManager.stopByAnimationGroupId(this.id);let a=this.processedData?.reduced?.diff,o=Mz(MB(this.isVertical(),this.axes,null==s?"fade":"normal"));p2(this.id,"nodes",this.ctx.animationManager,[t],o,(e,t)=>xp(t.xValue,t.valueIndex,t.phantom),a),(a?.changed??!0)&&(xg(this,"labels",this.ctx.animationManager,i),xg(this,"annotations",this.ctx.animationManager,...r))}isLabelEnabled(){return this.properties.label.enabled}computeFocusBounds({datumIndex:e,seriesRect:t}){return MV(this.contextNodeData?.nodeData[e].clipBBox,this.contentGroup,t)}};MU.className="BarSeries",MU.type="bar";var MW={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["cartesian"],identifier:"bar",moduleFactory:e=>new MU(e),stackable:!0,groupable:!0,tooltipDefaults:{range:"exact"},defaultAxes:[{type:"number",position:"left"},{type:"category",position:"bottom"}],swapDefaultAxesCondition:e=>e?.direction==="horizontal",themeTemplate:{series:{direction:"vertical",fillOpacity:1,strokeWidth:0,lineDash:[0],lineDashOffset:0,label:{enabled:!1,fontWeight:"normal",fontSize:12,fontFamily:b7,color:St,placement:"inside"},shadow:{enabled:!1,color:Sn,xOffset:3,yOffset:3,blur:5},errorBar:{cap:{lengthRatio:.3}}}},paletteFactory:bJ},M$=class extends xw{constructor(){super(...arguments),this.maxSize=30}};c7([gp(gM),u6({redraw:3})],M$.prototype,"maxSize",2),c7([gp(gz,{optional:!0}),u6({redraw:3})],M$.prototype,"domain",2);var MY=class extends vh{constructor(){super(...arguments),this.placement="top"}};c7([gp(g3)],MY.prototype,"placement",2);var MK=class extends br{constructor(){super(...arguments),this.colorRange=["#ffff00","#00ff00","#0000ff"],this.label=new MY,this.tooltip=new xS,this.marker=new M$}};c7([gp(gw)],MK.prototype,"xKey",2),c7([gp(gw)],MK.prototype,"yKey",2),c7([gp(gw)],MK.prototype,"sizeKey",2),c7([gp(gw,{optional:!0})],MK.prototype,"labelKey",2),c7([gp(gw,{optional:!0})],MK.prototype,"colorKey",2),c7([gp(gw,{optional:!0})],MK.prototype,"xFilterKey",2),c7([gp(gw,{optional:!0})],MK.prototype,"yFilterKey",2),c7([gp(gw,{optional:!0})],MK.prototype,"sizeFilterKey",2),c7([gp(gw,{optional:!0})],MK.prototype,"xName",2),c7([gp(gw,{optional:!0})],MK.prototype,"yName",2),c7([gp(gw,{optional:!0})],MK.prototype,"sizeName",2),c7([gp(gw,{optional:!0})],MK.prototype,"labelName",2),c7([gp(gw,{optional:!0})],MK.prototype,"colorName",2),c7([gp(gz,{optional:!0})],MK.prototype,"colorDomain",2),c7([gp(gB)],MK.prototype,"colorRange",2),c7([gp(gw,{optional:!0})],MK.prototype,"title",2),c7([fJ("marker.shape")],MK.prototype,"shape",2),c7([fJ("marker.size")],MK.prototype,"size",2),c7([fJ("marker.maxSize")],MK.prototype,"maxSize",2),c7([fJ("marker.domain",{optional:!0})],MK.prototype,"domain",2),c7([fJ("marker.fill",{optional:!0})],MK.prototype,"fill",2),c7([fJ("marker.fillOpacity")],MK.prototype,"fillOpacity",2),c7([fJ("marker.stroke",{optional:!0})],MK.prototype,"stroke",2),c7([fJ("marker.strokeWidth")],MK.prototype,"strokeWidth",2),c7([fJ("marker.strokeOpacity")],MK.prototype,"strokeOpacity",2),c7([fJ("marker.itemStyler",{optional:!0})],MK.prototype,"itemStyler",2),c7([gp(gf)],MK.prototype,"label",2),c7([gp(gf)],MK.prototype,"tooltip",2);var MZ=class extends bi{constructor(e,t,i,r){super(e,t,i,r),this.sizeKey=r.properties.sizeKey}},Mq=class extends bs{constructor(e){super({moduleCtx:e,directionKeys:be,directionNames:bt,pickModes:[2,3,0],pathsPerSeries:[],hasMarkers:!0,markerSelectionGarbageCollection:!1,animationResetFns:{label:xf,marker:xV}}),this.NodeEvent=MZ,this.properties=new MK,this.sizeScale=new bd,this.colorScale=new fD}async processData(e){if(!this.properties.isValid()||null==this.data||!this.visible)return;let t=this.axes.x?.scale,i=this.axes.y?.scale,{xScaleType:r,yScaleType:s}=this.getScaleInformation({xScale:t,yScale:i}),a=this.colorScale.type,o=this.sizeScale.type,{xKey:n,yKey:l,sizeKey:h,xFilterKey:d,yFilterKey:c,sizeFilterKey:u,labelKey:p,colorDomain:g,colorRange:m,colorKey:f,marker:v}=this.properties,{dataModel:y,processedData:C}=await this.requestDataModel(e,this.data,{props:[S2(n,r,{id:"xKey-raw"}),S2(l,s,{id:"yKey-raw"}),...p?[S2(p,"band",{id:"labelKey-raw"})]:[],S3(n,r,{id:"xValue"}),S3(l,s,{id:"yValue"}),...null!=d?[S3(d,r,{id:"xFilterValue"})]:[],...null!=c?[S3(c,s,{id:"yFilterValue"})]:[],...null!=u?[S3(u,o,{id:"sizeFilterValue"})]:[],S3(h,o,{id:"sizeValue"}),...f?[S3(f,a,{id:"colorValue"})]:[],...p?[S3(p,"band",{id:"labelValue"})]:[]]}),w=y.resolveProcessedDataIndexById(this,"sizeValue"),b=C.domain.values[w]??[];if(this.sizeScale.domain=v.domain?v.domain:b,f){let e=y.resolveProcessedDataIndexById(this,"colorValue");this.colorScale.domain=g??C.domain.values[e]??[],this.colorScale.range=m,this.colorScale.update()}this.animationState.transition("updateData")}getSeriesDomain(e){let{dataModel:t,processedData:i}=this;if(!i||!t)return[];let r="x"===e?"xValue":"yValue",s=t.resolveProcessedDataDefById(this,r),a=t.getDomain(this,r,"value",i);return s?.def.type==="value"&&s?.def.valueType==="category"?a:CZ(mk(a))}async createNodeData(){let{axes:e,dataModel:t,processedData:i,colorScale:r,sizeScale:s}=this,{xKey:a,yKey:o,sizeKey:n,xFilterKey:l,yFilterKey:h,sizeFilterKey:d,labelKey:c,xName:u,yName:p,sizeName:g,labelName:m,label:f,colorKey:v,marker:y,visible:C}=this.properties,w=w2(y.shape),{placement:b}=f,S=e.x,x=e.y;if(!(t&&i&&C&&S&&x))return;let M=t.resolveProcessedDataIndexById(this,"xValue"),E=t.resolveProcessedDataIndexById(this,"yValue"),D=null!=n?t.resolveProcessedDataIndexById(this,"sizeValue"):void 0,I=null!=v?t.resolveProcessedDataIndexById(this,"colorValue"):-1,k=null!=c?t.resolveProcessedDataIndexById(this,"labelValue"):-1,T=null!=l?t.resolveProcessedDataIndexById(this,"xFilterValue"):void 0,A=null!=h?t.resolveProcessedDataIndexById(this,"yFilterValue"):void 0,R=null!=d?t.resolveProcessedDataIndexById(this,"sizeFilterValue"):void 0,L=S.scale,P=x.scale,F=(L.bandwidth??0)/2,N=(P.bandwidth??0)/2,O=[];s.range=[y.size,y.maxSize];let B=f.getFont(),G=fF.getMeasurer({font:B});for(let{values:e,datum:t}of i.data??[]){let i;let l=e[M],h=e[E],d=null!=D?e[D]:void 0,C=L.convert(l)+F,S=P.convert(h)+N;null!=T&&null!=A&&(i=e[T]===l&&e[A]===h,null!=R&&i&&(i=e[R]===d));let x=this.getLabelText(f,{value:c?e[k]:h,datum:t,xKey:a,yKey:o,sizeKey:n,labelKey:c,xName:u,yName:p,sizeName:g,labelName:m}),B=G.measureText(String(x)),z=d?s.convert(d):y.size,_=v?r.convert(e[I]):void 0;O.push({series:this,itemId:o,yKey:o,xKey:a,datum:t,xValue:l,yValue:h,sizeValue:d,point:{x:C,y:S,size:z},midPoint:{x:C,y:S},fill:_,label:{text:x,...B},marker:w,placement:b,selected:i})}return{itemId:o,nodeData:O,labelData:O,scales:this.calculateScaling(),visible:this.visible}}isPathOrSelectionDirty(){return this.properties.marker.isDirty()}getLabelData(){return this.contextNodeData?.labelData??[]}markerFactory(){let{shape:e}=this.properties.marker;return new(w2(e))}async updateMarkerSelection(e){let{nodeData:t,markerSelection:i}=e;this.properties.marker.isDirty()&&(i.clear(),i.cleanup());let r=this.properties.marker.enabled?t:[];return i.update(r,void 0,e=>xp([e.xValue,e.yValue,e.label.text]))}async updateMarkerNodes(e){let{markerSelection:t,isHighlight:i}=e,{xKey:r,yKey:s,sizeKey:a,labelKey:o,marker:n}=this.properties,{size:l,shape:h,fill:d,fillOpacity:c,stroke:u,strokeWidth:p,strokeOpacity:g}=pP(i&&this.properties.highlightStyle.item,n.getStyle()),m={size:l,shape:h,fill:d,fillOpacity:c,stroke:u,strokeWidth:p,strokeOpacity:g};this.sizeScale.range=[n.size,n.maxSize],t.each((e,t)=>{this.updateMarkerStyle(e,n,{datum:t,highlighted:i,xKey:r,yKey:s,sizeKey:a,labelKey:o},m,{selected:t.selected})}),i||this.properties.marker.markClean()}async updateLabelSelection(e){let t=this.properties.label.enabled?this.chart?.placeLabels().get(this)??[]:[];return e.labelSelection.update(t.map(e=>({...e.datum,point:{x:e.x,y:e.y,size:e.datum.point.size}})))}async updateLabelNodes(e){let{label:t}=this.properties;e.labelSelection.each((e,i)=>{e.text=i.label.text,e.fill=t.color,e.x=i.point?.x??0,e.y=i.point?.y??0,e.fontStyle=t.fontStyle,e.fontWeight=t.fontWeight,e.fontSize=t.fontSize,e.fontFamily=t.fontFamily,e.textAlign="left",e.textBaseline="top"})}getTooltipHtml(e){let t=this.axes.x,i=this.axes.y;if(!this.properties.isValid()||!t||!i)return vr;let{xKey:r,yKey:s,sizeKey:a,labelKey:o,xName:n,yName:l,sizeName:h,labelName:d,marker:c,tooltip:u}=this.properties,p=this.properties.title??l,g=pP({fill:e.fill,strokeWidth:this.getStrokeWidth(c.strokeWidth)},c.getStyle()),{fill:m="gray"}=this.getMarkerStyle(c,{datum:e,highlighted:!1,xKey:r,yKey:s,sizeKey:a,labelKey:o},g),{datum:f,xValue:v,yValue:y,sizeValue:C,label:{text:w},itemId:b}=e,S=S_(t.formatDatum(v)),x=S_(i.formatDatum(y)),M=`<b>${S_(n??r)}</b>: ${S}<br><b>${S_(l??s)}</b>: ${x}`;return a&&(M+=`<br><b>${S_(h??a)}</b>: ${S_(String(C))}`),o&&(M=`<b>${S_(d??o)}</b>: ${S_(w)}<br>`+M),u.toTooltipHtml({title:p,content:M,backgroundColor:m},{datum:f,itemId:b,xKey:r,xName:n,yKey:s,yName:l,sizeKey:a,sizeName:h,labelKey:o,labelName:d,title:p,color:m,seriesId:this.id})}getLegendData(){if(!this.data?.length||!this.properties.isValid())return[];let{yKey:e,yName:t,title:i,marker:r,visible:s}=this.properties,{shape:a,fill:o,stroke:n,fillOpacity:l,strokeOpacity:h,strokeWidth:d}=r;return[{legendType:"category",id:this.id,itemId:e,seriesId:this.id,enabled:s,label:{text:i??t??e},symbols:[{marker:{shape:a,fill:o??"rgba(0, 0, 0, 0)",stroke:n??"rgba(0, 0, 0, 0)",fillOpacity:l??1,strokeOpacity:h??1,strokeWidth:d??0}}]}]}animateEmptyUpdateReady({markerSelection:e,labelSelection:t}){xz(this,this.ctx.animationManager,e),xg(this,"labels",this.ctx.animationManager,t)}isLabelEnabled(){return this.properties.label.enabled}nodeFactory(){return new mQ}getFormattedMarkerStyle(e){let{xKey:t,yKey:i,sizeKey:r,labelKey:s}=this.properties;return this.getMarkerStyle(this.properties.marker,{datum:e,xKey:t,yKey:i,sizeKey:r,labelKey:s,highlighted:!1})}computeFocusBounds(e){return xU(this,e)}};Mq.className="BubbleSeries",Mq.type="bubble";var MX={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["cartesian"],identifier:"bubble",moduleFactory:e=>new Mq(e),tooltipDefaults:{range:"nearest"},defaultAxes:[{type:"number",position:"bottom"},{type:"number",position:"left"}],themeTemplate:{series:{shape:"circle",size:7,maxSize:30,fillOpacity:.8,tooltip:{position:{type:"node"}},label:{enabled:!1,fontSize:12,fontFamily:b7,color:b9}}},paletteFactory:bJ},MQ=class extends br{constructor(){super(...arguments),this.fillOpacity=1,this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.cornerRadius=0,this.areaPlot=!1,this.aggregation="sum",this.shadow=new xy,this.label=new vh,this.tooltip=new xS}};c7([gp(gw)],MQ.prototype,"xKey",2),c7([gp(gw,{optional:!0})],MQ.prototype,"yKey",2),c7([gp(gw,{optional:!0})],MQ.prototype,"xName",2),c7([gp(gw,{optional:!0})],MQ.prototype,"yName",2),c7([gp(gO,{optional:!0})],MQ.prototype,"fill",2),c7([gp(gE)],MQ.prototype,"fillOpacity",2),c7([gp(gO,{optional:!0})],MQ.prototype,"stroke",2),c7([gp(gM)],MQ.prototype,"strokeWidth",2),c7([gp(gE)],MQ.prototype,"strokeOpacity",2),c7([gp(g$)],MQ.prototype,"lineDash",2),c7([gp(gM)],MQ.prototype,"lineDashOffset",2),c7([gp(gM)],MQ.prototype,"cornerRadius",2),c7([gp(gy)],MQ.prototype,"areaPlot",2),c7([gp(gk,{optional:!0})],MQ.prototype,"bins",2),c7([gp(g4(["count","sum","mean"],"a histogram aggregation"))],MQ.prototype,"aggregation",2),c7([gp(gM,{optional:!0})],MQ.prototype,"binCount",2),c7([gp(gf)],MQ.prototype,"shadow",2),c7([gp(gf)],MQ.prototype,"label",2),c7([gp(gf)],MQ.prototype,"tooltip",2);var MJ=class extends bs{constructor(e){super({moduleCtx:e,directionKeys:be,directionNames:bt,pickModes:[3,0],datumSelectionGarbageCollection:!1,animationResetFns:{datum:M_,label:xf}}),this.properties=new MQ,this.calculatedBins=[]}deriveBins(e){let t=mw(e[0],e[1],10),i=mS(e[0],e[1],10),[r]=t;return[[r-i,r],...t.map(e=>[e,e+i])]}calculateNiceBins(e,t){let i=Math.floor(e[0]),r=e[1],s=t||1,{start:a,binSize:o}=this.calculateNiceStart(i,r,s);return this.getBins(a,r,o,s)}getBins(e,t,i,r){let s=[],a=this.calculatePrecision(i);for(let o=0;o<r;o++){let n=Math.round((e+o*i)*a)/a,l=Math.round((e+(o+1)*i)*a)/a;o===r-1&&(l=Math.max(l,t)),s[o]=[n,l]}return s}calculatePrecision(e){let t=10;if(isFinite(e)&&e>0)for(;e<1;)t*=10,e*=10;return t}calculateNiceStart(e,t,i){let r=Math.abs(t-e)/i,s=Math.pow(10,Math.floor(Math.log10(r)));return{start:Math.floor(e/s)*s,binSize:r}}async processData(e){this.visible||(this.processedData=void 0,this.animationState.transition("updateData"));let{xKey:t,yKey:i,areaPlot:r,aggregation:s}=this.properties,a=this.axes.x?.scale,o=this.axes.y?.scale,{xScaleType:n,yScaleType:l}=this.getScaleInformation({yScale:o,xScale:a}),h=[S2(t,n),xt];if(i){let e=SY("groupAgg");"count"===s||("sum"===s?e=SW("groupAgg"):"mean"===s&&(e=SK("groupAgg"))),r&&(e=SZ("groupAgg",e)),h.push(S3(i,l,{invalidValue:void 0}),e)}else{let e=SY("groupAgg");r&&(e=SZ("groupAgg",e)),h.push(e)}!this.ctx.animationManager.isSkipped()&&this.processedData&&h.push(xu(this.processedData,!1)),await this.requestDataModel(e,this.data,{props:h,groupByFn:e=>{let t=CZ(e.domain.keys[0]);if(0===t.length)return e.domain.groups=[],()=>[];let i=pE(this.properties.binCount)?this.calculateNiceBins(t,this.properties.binCount):this.properties.bins??this.deriveBins(t),r=i.length;return this.calculatedBins=[...i],e=>{let t=e.keys[0];for(let e=0;e<r;e++){let s=i[e];if(t>=s[0]&&t<s[1]||e===r-1&&t<=s[1])return s}return[]}}}),this.animationState.transition("updateData")}getSeriesDomain(e){let{processedData:t,dataModel:i}=this;if(!t||!i||!this.calculatedBins.length)return[];let r=i.getDomain(this,"groupAgg","aggregate",t),s=this.calculatedBins?.[0][0],a=this.calculatedBins?.[(this.calculatedBins?.length??0)-1][1];return"x"===e?CZ([s,a]):CZ(r)}async createNodeData(){let{id:e,axes:t,processedData:i,ctx:{callbackCache:r}}=this,s=t.x,a=t.y;if(!s||!a)return;let{scale:o}=s,{scale:n}=a,{xKey:l,yKey:h,xName:d,yName:c,fill:u,stroke:p,strokeWidth:g,cornerRadius:m}=this.properties,{formatter:f=e=>String(e.value),fontStyle:v,fontWeight:y,fontSize:C,fontFamily:w,color:b}=this.properties.label,S=[],x={itemId:this.properties.yKey??this.id,nodeData:S,labelData:S,scales:this.calculateScaling(),animationValid:!0,visible:this.visible};return this.visible&&i&&"grouped"===i.type&&(i.data.forEach(t=>{let i;let{aggValues:[[s,x]]=[[0,0]],datum:M,datum:{length:E},keys:D,keys:[I,k]}=t,T=o.convert(I),A=o.convert(k),R=s+x,L=n.convert(0),P=n.convert(R),F=Math.abs(A-T),N=Math.abs(P-L),O=Math.min(T,A),B=Math.min(L,P);0!==R&&(i={text:r.call(f,{value:R,datum:M,seriesId:e,xKey:l,yKey:h,xName:d,yName:c})??String(R),fontStyle:v,fontWeight:y,fontSize:C,fontFamily:w,fill:b,x:O+F/2,y:B+N/2});let G=a.isReversed();S.push({series:this,datum:M,aggregatedValue:R,frequency:E,domain:D,yKey:h,xKey:l,x:O,y:B,xValue:T,yValue:P,width:F,height:N,midPoint:{x:O+F/2,y:B+N/2},fill:u,stroke:p,cornerRadius:m,topLeftCornerRadius:!G,topRightCornerRadius:!G,bottomRightCornerRadius:G,bottomLeftCornerRadius:G,opacity:1,strokeWidth:g,label:i})}),S.sort((e,t)=>e.x-t.x)),x}nodeFactory(){return new by}async updateDatumSelection(e){let{nodeData:t,datumSelection:i}=e;return i.update(t,e=>{e.crisp=!0},e=>e.domain.join("_"))}async updateDatumNodes(e){let{isHighlight:t}=e,{fillOpacity:i,strokeOpacity:r,lineDash:s,lineDashOffset:a,shadow:o,highlightStyle:{item:{fill:n,fillOpacity:l=i,stroke:h,strokeWidth:d}}}=this.properties;e.datumSelection.each((e,c,u)=>{let{cornerRadius:p,topLeftCornerRadius:g,topRightCornerRadius:m,bottomRightCornerRadius:f,bottomLeftCornerRadius:v}=c,y=t&&void 0!==d?d:c.strokeWidth;e.fill=(t?n:void 0)??c.fill,e.stroke=(t?h:void 0)??c.stroke,e.fillOpacity=t?l:i,e.strokeOpacity=r,e.strokeWidth=y,e.lineDash=s,e.lineDashOffset=a,e.topLeftCornerRadius=g?p:0,e.topRightCornerRadius=m?p:0,e.bottomRightCornerRadius=f?p:0,e.bottomLeftCornerRadius=v?p:0,e.fillShadow=o,e.zIndex=t?ww.highlightedZIndex:u,e.visible=c.height>0})}async updateLabelSelection(e){let{labelData:t,labelSelection:i}=e;return i.update(t,e=>{e.pointerEvents=1,e.textAlign="center",e.textBaseline="middle"})}async updateLabelNodes(e){let t=this.isLabelEnabled();e.labelSelection.each((e,i)=>{let r=i.label;r&&t?(e.text=r.text,e.x=r.x,e.y=r.y,e.fontStyle=r.fontStyle,e.fontWeight=r.fontWeight,e.fontSize=r.fontSize,e.fontFamily=r.fontFamily,e.fill=r.fill,e.visible=!0):e.visible=!1})}initQuadTree(e){MI(e,MD(this.contentGroup.children[0]))}pickNodeClosestDatum(e){return Mk(this,e)}getTooltipHtml(e){let t=this.axes.x,i=this.axes.y;if(!this.properties.isValid()||!t||!i)return vr;let{xKey:r,yKey:s,xName:a,yName:o,fill:n,aggregation:l,tooltip:h}=this.properties,{aggregatedValue:d,frequency:c,domain:[u,p],itemId:g}=e,m=`${S_(a??r)}: ${t.formatDatum(u)} - ${t.formatDatum(p)}`,f=s?`<b>${S_(o??s)} (${l})</b>: ${i.formatDatum(d)}<br>`:"",v={title:m,backgroundColor:n,content:f+=`<b>Frequency</b>: ${c}`};return h.toTooltipHtml(v,{datum:{data:e.datum,aggregatedValue:e.aggregatedValue,domain:e.domain,frequency:e.frequency},itemId:g,xKey:r,xName:a,yKey:s,yName:o,color:n,title:m,seriesId:this.id})}getLegendData(e){if(!this.data?.length||"category"!==e)return[];let{xKey:t,yName:i,fill:r,fillOpacity:s,stroke:a,strokeWidth:o,strokeOpacity:n,visible:l}=this.properties;return[{legendType:"category",id:this.id,itemId:t,seriesId:this.id,enabled:l,label:{text:i??t??"Frequency"},symbols:[{marker:{fill:r??"rgba(0, 0, 0, 0)",stroke:a??"rgba(0, 0, 0, 0)",fillOpacity:s,strokeOpacity:n,strokeWidth:o}}]}]}animateEmptyUpdateReady({datumSelection:e,labelSelection:t}){let i=Mz(MB(!0,this.axes,"normal"));p2(this.id,"datums",this.ctx.animationManager,[e],i),xg(this,"labels",this.ctx.animationManager,t)}animateWaitingUpdateReady(e){let t=this.processedData?.reduced?.diff,i=Mz(MB(!0,this.axes,"normal"));p2(this.id,"datums",this.ctx.animationManager,[e.datumSelection],i,(e,t)=>xp(t.domain),t),xg(this,"labels",this.ctx.animationManager,e.labelSelection)}isLabelEnabled(){return this.properties.label.enabled}computeFocusBounds({datumIndex:e,seriesRect:t}){return MV(this.contextNodeData?.nodeData[e],this.contentGroup,t)}};MJ.className="HistogramSeries",MJ.type="histogram";var M0={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["cartesian"],identifier:"histogram",moduleFactory:e=>new MJ(e),tooltipDefaults:{range:"exact"},defaultAxes:[{type:"number",position:"bottom"},{type:"number",position:"left"}],themeTemplate:{series:{strokeWidth:1,fillOpacity:1,strokeOpacity:1,lineDash:[0],lineDashOffset:0,label:{enabled:!1,fontSize:12,fontFamily:b7,color:St},shadow:{enabled:!1,color:Sn,xOffset:3,yOffset:3,blur:5}}},paletteFactory:({takeColors:e})=>{let{fills:[t],strokes:[i]}=e(1);return{fill:t,stroke:i}}},M1=class extends br{constructor(){super(...arguments),this.stroke="#874349",this.strokeWidth=2,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.interpolation=new xE,this.marker=new xw,this.label=new vh,this.tooltip=new xS,this.connectMissingData=!1}};c7([gp(gw)],M1.prototype,"xKey",2),c7([gp(gw)],M1.prototype,"yKey",2),c7([gp(gw,{optional:!0})],M1.prototype,"xName",2),c7([gp(gw,{optional:!0})],M1.prototype,"yName",2),c7([gp(gw,{optional:!0})],M1.prototype,"yFilterKey",2),c7([gp(gw,{optional:!0})],M1.prototype,"stackGroup",2),c7([gp(gM,{optional:!0})],M1.prototype,"normalizedTo",2),c7([gp(gw,{optional:!0})],M1.prototype,"title",2),c7([gp(gO)],M1.prototype,"stroke",2),c7([gp(gM)],M1.prototype,"strokeWidth",2),c7([gp(gE)],M1.prototype,"strokeOpacity",2),c7([gp(g$)],M1.prototype,"lineDash",2),c7([gp(gM)],M1.prototype,"lineDashOffset",2),c7([gp(gf)],M1.prototype,"interpolation",2),c7([gp(gf)],M1.prototype,"marker",2),c7([gp(gf)],M1.prototype,"label",2),c7([gp(gf)],M1.prototype,"tooltip",2),c7([gp(gy)],M1.prototype,"connectMissingData",2);var M2=class extends bs{constructor(e){super({moduleCtx:e,directionKeys:be,directionNames:bt,hasMarkers:!0,pickModes:[2,3,0],markerSelectionGarbageCollection:!1,animationResetFns:{path:x3({getVisible:()=>this.visible,getOpacity:()=>this.getOpacity()}),label:xf,marker:(e,t)=>({...xV(e),...xj(e,t)})}}),this.properties=new M1}async processData(e){if(null==this.data||!this.properties.isValid())return;let{data:t,visible:i,seriesGrouping:{groupIndex:r=this.id,stackCount:s=1}={}}=this,{xKey:a,yKey:o,yFilterKey:n,connectMissingData:l,normalizedTo:h}=this.properties,d=!this.ctx.animationManager.isSkipped(),c=this.axes.x?.scale,u=this.axes.y?.scale,{isContinuousX:p,xScaleType:g,yScaleType:m}=this.getScaleInformation({xScale:c,yScale:u}),f={invalidValue:null};l&&s>1&&(f.invalidValue=0),i||(f.forceValue=0);let v=[];if(p||v.push(S2(a,g,{id:"xKey"})),v.push(S3(a,g,{id:"xValue"}),S3(o,m,{id:"yValueRaw",...f,invalidValue:void 0})),null!=n&&v.push(S3(n,m,{id:"yFilterRaw"})),s>1){let e=[`line-stack-${r}-yValues`,`line-stack-${r}-yValues-trailing`,`line-stack-${r}-yValues-marker`];v.push(...S8(o,"window","current",{id:"yValueEnd",...f,groupId:e[0]},m),...S8(o,"window-trailing","current",{id:"yValueStart",...f,groupId:e[1]},m),...S8(o,"normal","current",{id:"yValueCumulative",...f,groupId:e[2]},m)),pg(h)&&v.push(xr([e[0],e[1],e[2]],h,"range"))}d&&(v.push(xo(p?["xValue"]:void 0)),this.processedData&&v.push(xu(this.processedData))),await this.requestDataModel(e,t,{props:v}),this.animationState.transition("updateData")}getSeriesDomain(e){let{dataModel:t,processedData:i}=this;if(!t||!i?.data.length)return[];let r=t.resolveProcessedDataDefById(this,"xValue");if("x"!==e)return CZ((this.seriesGrouping?.stackCount??1)>1?t.getDomain(this,"yValueEnd","value",i):t.getDomain(this,"yValueRaw","value",i));{let e=t.getDomain(this,"xValue","value",i);return r?.def.type==="value"&&"category"===r.def.valueType?e:CZ(mk(e))}}async createNodeData(){let{processedData:e,dataModel:t,axes:i}=this,r=i.x,s=i.y;if(!e||!t||!r||!s)return;let{xKey:a,yKey:o,yFilterKey:n,xName:l,yName:h,marker:d,label:c,connectMissingData:u,legendItemName:p}=this.properties,g=(this.seriesGrouping?.stackCount??1)>1,m=r.scale,f=s.scale,v=(m.bandwidth??0)/2,y=(f.bandwidth??0)/2,C=[],w=d.enabled?d.size:0,b=t.resolveProcessedDataIndexById(this,"xValue"),S=t.resolveProcessedDataIndexById(this,"yValueRaw"),x=null!=n?t.resolveProcessedDataIndexById(this,"yFilterRaw"):void 0,M=g?t.resolveProcessedDataIndexById(this,"yValueCumulative"):S,E=g?t.resolveProcessedDataIndexById(this,"yValueEnd"):void 0,D=!0,I=!1;return e.data?.forEach(({datum:e,values:t})=>{let i=t[b],r=t[S],s=t[M],n=null!=E?t[E]:void 0;if(null==r){D||(D=!u);return}let d=m.convert(i)+v;if(isNaN(d)){D||(D=!u);return}let g=f.convert(s)+y,k=null!=x?t[x]===r:void 0;!1===k&&(I=!0);let T=this.getLabelText(c,{value:r,datum:e,xKey:a,yKey:o,xName:l,yName:h,legendItemName:p},e=>pD(e)?e.toFixed(2):String(e));C.push({series:this,datum:e,yKey:o,xKey:a,point:{x:d,y:g,moveTo:D,size:w},midPoint:{x:d,y:g},cumulativeValue:n,yValue:r,xValue:i,capDefaults:{lengthRatioMultiplier:this.properties.marker.getDiameter(),lengthMax:1/0},label:T?{text:T,fontStyle:c.fontStyle,fontWeight:c.fontWeight,fontSize:c.fontSize,fontFamily:c.fontFamily,textAlign:"center",textBaseline:"bottom",fill:c.color}:void 0,selected:k}),D=!1}),{itemId:o,nodeData:C,labelData:C,scales:this.calculateScaling(),visible:this.visible,crossFiltering:I}}isPathOrSelectionDirty(){return this.properties.marker.isDirty()}markerFactory(){let{shape:e}=this.properties.marker;return new(w2(e))}async updatePathNodes(e){let{paths:[t],opacity:i,visible:r,animationEnabled:s}=e,a=this.contextNodeData?.crossFiltering===!0;t.setProperties({fill:void 0,lineJoin:"round",pointerEvents:1,opacity:i,stroke:this.properties.stroke,strokeWidth:this.getStrokeWidth(this.properties.strokeWidth),strokeOpacity:this.properties.strokeOpacity*(a?.25:1),lineDash:this.properties.lineDash,lineDashOffset:this.properties.lineDashOffset}),s||(t.visible=r),x4(this,t)}async updateMarkerSelection(e){let{nodeData:t}=e,{markerSelection:i}=e;return t=this.properties.marker.enabled||this.contextNodeData?.crossFiltering===!0?t:[],this.properties.marker.isDirty()&&(i.clear(),i.cleanup()),i.update(t,void 0,e=>xp(e.xValue))}async updateMarkerNodes(e){let{markerSelection:t,isHighlight:i}=e,{xKey:r,yKey:s,stroke:a,strokeWidth:o,strokeOpacity:n,marker:l,highlightStyle:h}=this.properties,d=pP(i&&h.item,l.getStyle(),{stroke:a,strokeWidth:o,strokeOpacity:n}),c=this.ctx.animationManager.isSkipped();t.each((e,t)=>{this.updateMarkerStyle(e,l,{datum:t,highlighted:i,xKey:r,yKey:s},d,{applyTranslation:c,selected:t.selected})}),i||l.markClean()}async updateLabelSelection(e){return e.labelSelection.update(this.isLabelEnabled()?e.labelData:[])}async updateLabelNodes(e){let{enabled:t,fontStyle:i,fontWeight:r,fontSize:s,fontFamily:a,color:o}=this.properties.label;e.labelSelection.each((e,n)=>{let{point:l,label:h}=n;n&&h&&t?(e.fontStyle=i,e.fontWeight=r,e.fontSize=s,e.fontFamily=a,e.textAlign=h.textAlign,e.textBaseline=h.textBaseline,e.text=h.text,e.x=l.x,e.y=l.y-10,e.fill=o,e.visible=!0):e.visible=!1})}getTooltipHtml(e){let t=this.axes.x,i=this.axes.y;if(!this.properties.isValid()||!t||!i)return vr;let{xKey:r,yKey:s,xName:a,yName:o,strokeWidth:n,marker:l,tooltip:h}=this.properties,{datum:d,xValue:c,yValue:u,itemId:p}=e,g=t.formatDatum(c),m=i.formatDatum(u),f=S_(this.properties.title??o),v=S_(g+": "+m),y=pP({fill:l.stroke},l.getStyle(),{strokeWidth:n}),{fill:C}=this.getMarkerStyle(l,{datum:e,xKey:r,yKey:s,highlighted:!1},y);return h.toTooltipHtml({title:f,content:v,backgroundColor:C},{datum:d,itemId:p,xKey:r,xName:a,yKey:s,yName:o,title:f,color:C,seriesId:this.id,...this.getModuleTooltipParams()})}getLegendData(e){if(!(this.data?.length&&this.properties.isValid()&&"category"===e))return[];let{yKey:t,yName:i,stroke:r,strokeOpacity:s,strokeWidth:a,lineDash:o,title:n,marker:l,visible:h,legendItemName:d}=this.properties,c="rgba(0, 0, 0, 0)";return[{legendType:"category",id:this.id,itemId:t,legendItemName:d,seriesId:this.id,enabled:h,label:{text:d??n??i??t},symbols:[{marker:{shape:l.shape,fill:l.fill??c,stroke:l.stroke??r??c,fillOpacity:l.fillOpacity??1,strokeOpacity:l.strokeOpacity??s??1,strokeWidth:l.strokeWidth??0,enabled:l.enabled},line:{stroke:r??c,strokeOpacity:s,strokeWidth:a,lineDash:o}}]}]}async updatePaths(e){this.updateLinePaths(e.paths,e.contextData)}updateLinePaths(e,t){let{interpolation:i}=this.properties,{nodeData:r}=t,[s]=e;for(let e of(s.path.clear(!0),Me(r)))xX(Mt(r,e),s,i);s.checkPathDirty()}animateEmptyUpdateReady(e){let{markerSelection:t,labelSelection:i,annotationSelections:r,contextData:s,paths:a}=e,{animationManager:o}=this.ctx;this.updateLinePaths(a,s),x0(this,o,...a),ms([t],xj),x_(this,o,t),xg(this,"labels",o,i),xg(this,"annotations",o,...r)}animateReadyResize(e){let{contextData:t,paths:i}=e;this.updateLinePaths(i,t),super.animateReadyResize(e)}animateWaitingUpdateReady(e){let t;let{animationManager:i}=this.ctx,{markerSelection:r,labelSelection:s,annotationSelections:a,contextData:o,paths:n,previousContextData:l}=e,[h]=n;this.resetMarkerAnimation(e),this.resetLabelAnimation(e);let d=()=>{this.resetPathAnimation(e),this.updateLinePaths(n,o)},c=()=>{i.skipCurrentBatch(),d()};if(null==o||null==l){d(),xG(this,i,"added",r),x1(this,"path_properties",i,"add",h),xg(this,"labels",i,s),xg(this,"annotations",i,...a);return}if(o.crossFiltering!==l.crossFiltering){c();return}try{t=Md(o,l,this.processedData?.reduced?.diff,this.properties.interpolation)}catch{t=void 0}if(void 0===t){c();return}"no-op"!==t.status&&(xG(this,i,void 0,r),p2(this.id,"path_properties",i,[h],t.pathProperties),"added"===t.status?this.updateLinePaths(n,o):"removed"===t.status?this.updateLinePaths(n,l):SG(this.id,"path_update",i,[h],t.path),t.hasMotion&&(xg(this,"labels",i,s),xg(this,"annotations",i,...a)))}isLabelEnabled(){return this.properties.label.enabled}getBandScalePadding(){return{inner:1,outer:.1}}nodeFactory(){return new mQ}getFormattedMarkerStyle(e){let{xKey:t,yKey:i}=this.properties;return this.getMarkerStyle(this.properties.marker,{datum:e,xKey:t,yKey:i,highlighted:!0})}computeFocusBounds(e){return xU(this,e)}};M2.className="LineSeries",M2.type="line";var M3={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["cartesian"],identifier:"line",moduleFactory:e=>new M2(e),stackable:!0,tooltipDefaults:{range:"nearest"},defaultAxes:[{type:"number",position:"left"},{type:"category",position:"bottom"}],themeTemplate:{series:{tooltip:{position:{type:"node"}},strokeWidth:2,strokeOpacity:1,lineDash:[0],lineDashOffset:0,interpolation:{type:"linear",tension:1,position:"end"},marker:{shape:"circle",size:7,strokeWidth:0},label:{enabled:!1,fontSize:12,fontFamily:b7,color:b9},errorBar:{cap:{lengthRatio:1}}}},paletteFactory:e=>{let{marker:t}=b0(e);return{stroke:t.fill,marker:t}}},M4=class extends vh{constructor(){super(...arguments),this.placement="top"}};c7([gp(g3)],M4.prototype,"placement",2);var M6=class extends br{constructor(){super(...arguments),this.colorRange=["#ffff00","#00ff00","#0000ff"],this.label=new M4,this.tooltip=new xS,this.marker=new xw}};c7([gp(gw)],M6.prototype,"xKey",2),c7([gp(gw)],M6.prototype,"yKey",2),c7([gp(gw,{optional:!0})],M6.prototype,"labelKey",2),c7([gp(gw,{optional:!0})],M6.prototype,"colorKey",2),c7([gp(gw,{optional:!0})],M6.prototype,"xFilterKey",2),c7([gp(gw,{optional:!0})],M6.prototype,"yFilterKey",2),c7([gp(gw,{optional:!0})],M6.prototype,"xName",2),c7([gp(gw,{optional:!0})],M6.prototype,"yName",2),c7([gp(gw,{optional:!0})],M6.prototype,"labelName",2),c7([gp(gw,{optional:!0})],M6.prototype,"colorName",2),c7([gp(gz,{optional:!0})],M6.prototype,"colorDomain",2),c7([gp(gB)],M6.prototype,"colorRange",2),c7([gp(gw,{optional:!0})],M6.prototype,"title",2),c7([fJ("marker.shape")],M6.prototype,"shape",2),c7([fJ("marker.size")],M6.prototype,"size",2),c7([fJ("marker.fill")],M6.prototype,"fill",2),c7([fJ("marker.fillOpacity")],M6.prototype,"fillOpacity",2),c7([fJ("marker.stroke")],M6.prototype,"stroke",2),c7([fJ("marker.strokeWidth")],M6.prototype,"strokeWidth",2),c7([fJ("marker.strokeOpacity")],M6.prototype,"strokeOpacity",2),c7([fJ("marker.itemStyler",{optional:!0})],M6.prototype,"itemStyler",2),c7([gp(gf)],M6.prototype,"label",2),c7([gp(gf)],M6.prototype,"tooltip",2);var M5=class extends bs{constructor(e){super({moduleCtx:e,directionKeys:be,directionNames:bt,pickModes:[2,3,0],pathsPerSeries:[],hasMarkers:!0,markerSelectionGarbageCollection:!1,animationResetFns:{marker:xV,label:xf}}),this.properties=new M6,this.colorScale=new fD}async processData(e){if(!this.properties.isValid()||null==this.data||!this.visible)return;let t=this.axes.x?.scale,i=this.axes.y?.scale,{xScaleType:r,yScaleType:s}=this.getScaleInformation({xScale:t,yScale:i}),a=this.colorScale.type,{xKey:o,yKey:n,xFilterKey:l,yFilterKey:h,labelKey:d,colorKey:c,colorDomain:u,colorRange:p}=this.properties,{dataModel:g,processedData:m}=await this.requestDataModel(e,this.data,{props:[S2(o,r,{id:"xKey-raw"}),S2(n,s,{id:"yKey-raw"}),...d?[S2(d,"band",{id:"labelKey-raw"})]:[],S3(o,r,{id:"xValue"}),S3(n,s,{id:"yValue"}),...null!=l?[S3(l,r,{id:"xFilterValue"})]:[],...null!=h?[S3(h,s,{id:"yFilterValue"})]:[],...c?[S3(c,a,{id:"colorValue"})]:[],...d?[S3(d,"band",{id:"labelValue"})]:[]]});if(c){let e=g.resolveProcessedDataIndexById(this,"colorValue");this.colorScale.domain=u??m.domain.values[e]??[],this.colorScale.range=p,this.colorScale.update()}this.animationState.transition("updateData")}getSeriesDomain(e){let{dataModel:t,processedData:i}=this;if(!i||!t)return[];let r="x"===e?"xValue":"yValue",s=t.resolveProcessedDataDefById(this,r),a=t.getDomain(this,r,"value",i);return s?.def.type==="value"&&s?.def.valueType==="category"?a:CZ(mk(a))}async createNodeData(){let{axes:e,dataModel:t,processedData:i,colorScale:r}=this,{xKey:s,yKey:a,xFilterKey:o,yFilterKey:n,labelKey:l,colorKey:h,xName:d,yName:c,labelName:u,marker:p,label:g,visible:m}=this.properties,{placement:f}=g,v=w2(p.shape),y=e.x,C=e.y;if(!(t&&i&&m&&y&&C))return;let w=t.resolveProcessedDataIndexById(this,"xValue"),b=t.resolveProcessedDataIndexById(this,"yValue"),S=null!=h?t.resolveProcessedDataIndexById(this,"colorValue"):-1,x=null!=l?t.resolveProcessedDataIndexById(this,"labelValue"):-1,M=null!=o?t.resolveProcessedDataIndexById(this,"xFilterValue"):void 0,E=null!=n?t.resolveProcessedDataIndexById(this,"yFilterValue"):void 0,D=y.scale,I=C.scale,k=(D.bandwidth??0)/2,T=(I.bandwidth??0)/2,A=[],R=g.getFont(),L=fF.getMeasurer({font:R});for(let{values:e,datum:t}of i.data??[]){let i=e[w],o=e[b],n=D.convert(i)+k,m=I.convert(o)+T,y=null!=M&&null!=E?e[M]===i&&e[E]===o:void 0,C=this.getLabelText(g,{value:l?e[x]:o,datum:t,xKey:s,yKey:a,labelKey:l,xName:d,yName:c,labelName:u}),R=L.measureText(C),P=h?r.convert(e[S]):void 0;A.push({series:this,itemId:a,yKey:a,xKey:s,datum:t,xValue:i,yValue:o,capDefaults:{lengthRatioMultiplier:p.getDiameter(),lengthMax:1/0},point:{x:n,y:m,size:p.size},midPoint:{x:n,y:m},fill:P,label:{text:C,...R},marker:v,placement:f,selected:y})}return{itemId:a,nodeData:A,labelData:A,scales:this.calculateScaling(),visible:this.visible}}isPathOrSelectionDirty(){return this.properties.marker.isDirty()}getLabelData(){return this.contextNodeData?.labelData??[]}markerFactory(){let{shape:e}=this.properties.marker;return new(w2(e))}async updateMarkerSelection(e){let{nodeData:t,markerSelection:i}=e;return this.properties.marker.isDirty()&&(i.clear(),i.cleanup()),i.update(this.properties.marker.enabled?t:[])}async updateMarkerNodes(e){let{markerSelection:t,isHighlight:i}=e,{xKey:r,yKey:s,labelKey:a,marker:o,highlightStyle:n}=this.properties,l=pP(i&&n.item,o.getStyle());t.each((e,t)=>{this.updateMarkerStyle(e,o,{datum:t,highlighted:i,xKey:r,yKey:s,labelKey:a},l,{selected:t.selected})}),i||o.markClean()}async updateLabelSelection(e){let t=this.isLabelEnabled()?this.chart?.placeLabels().get(this)??[]:[];return e.labelSelection.update(t.map(({datum:e,x:t,y:i})=>({...e,point:{x:t,y:i,size:e.point.size},placement:"top"})),e=>{e.pointerEvents=1})}async updateLabelNodes(e){let{label:t}=this.properties;e.labelSelection.each((e,i)=>{e.text=i.label.text,e.fill=t.color,e.x=i.point?.x??0,e.y=i.point?.y??0,e.fontStyle=t.fontStyle,e.fontWeight=t.fontWeight,e.fontSize=t.fontSize,e.fontFamily=t.fontFamily,e.textAlign="left",e.textBaseline="top"})}getTooltipHtml(e){let t=this.axes.x,i=this.axes.y;if(!this.properties.isValid()||!t||!i)return vr;let{xKey:r,yKey:s,labelKey:a,xName:o,yName:n,labelName:l,title:h=n,marker:d,tooltip:c}=this.properties,{datum:u,xValue:p,yValue:g,label:m,itemId:f}=e,v=pP({fill:e.fill,strokeWidth:this.getStrokeWidth(d.strokeWidth)},d.getStyle()),{fill:y="gray"}=this.getMarkerStyle(d,{datum:e,highlighted:!1,xKey:r,yKey:s,labelKey:a},v),C=S_(t.formatDatum(p)),w=S_(i.formatDatum(g)),b=`<b>${S_(o??r)}</b>: ${C}<br><b>${S_(n??s)}</b>: ${w}`;return a&&(b=`<b>${S_(l??a)}</b>: ${S_(m.text)}<br>`+b),c.toTooltipHtml({title:h,content:b,backgroundColor:y},{datum:u,itemId:f,xKey:r,xName:o,yKey:s,yName:n,labelKey:a,labelName:l,title:h,color:y,seriesId:this.id,...this.getModuleTooltipParams()})}getLegendData(e){let{yKey:t,yName:i,title:r,marker:s,visible:a}=this.properties,{fill:o,stroke:n,fillOpacity:l,strokeOpacity:h,strokeWidth:d}=s;return this.data?.length&&this.properties.isValid()&&"category"===e?[{legendType:"category",id:this.id,itemId:t,seriesId:this.id,enabled:a,label:{text:r??i??t},symbols:[{marker:{shape:s.shape,fill:s.fill??o??"rgba(0, 0, 0, 0)",stroke:s.stroke??n??"rgba(0, 0, 0, 0)",fillOpacity:l??1,strokeOpacity:h??1,strokeWidth:d??0}}]}]:[]}animateEmptyUpdateReady(e){let{markerSelection:t,labelSelection:i,annotationSelections:r}=e;xz(this,this.ctx.animationManager,t),xg(this,"labels",this.ctx.animationManager,i),xg(this,"annotations",this.ctx.animationManager,...r)}isLabelEnabled(){return this.properties.label.enabled}nodeFactory(){return new mQ}getFormattedMarkerStyle(e){let{xKey:t,yKey:i,labelKey:r}=this.properties;return this.getMarkerStyle(this.properties.marker,{datum:e,xKey:t,yKey:i,labelKey:r,highlighted:!0})}computeFocusBounds(e){return xU(this,e)}};M5.className="ScatterSeries",M5.type="scatter";var M8={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["cartesian"],identifier:"scatter",moduleFactory:e=>new M5(e),tooltipDefaults:{range:"nearest"},defaultAxes:[{type:"number",position:"bottom"},{type:"number",position:"left"}],themeTemplate:{series:{shape:"circle",size:7,fillOpacity:.8,tooltip:{position:{type:"node"}},label:{enabled:!1,fontSize:12,fontFamily:b7,color:b9},errorBar:{cap:{lengthRatio:1}}}},paletteFactory:bJ},M7=class e{constructor(e,t,i,r){this.startAngle=e,this.endAngle=t,this.innerRadius=i,this.outerRadius=r}clone(){let{startAngle:t,endAngle:i,innerRadius:r,outerRadius:s}=this;return new e(t,i,r,s)}equals(e){return this.startAngle===e.startAngle&&this.endAngle===e.endAngle&&this.innerRadius===e.innerRadius&&this.outerRadius===e.outerRadius}[uV](t,i){return new e(this.startAngle*(1-i)+t.startAngle*i,this.endAngle*(1-i)+t.endAngle*i,this.innerRadius*(1-i)+t.innerRadius*i,this.outerRadius*(1-i)+t.outerRadius*i)}};function M9({startAngle:e,endAngle:t,innerRadius:i,outerRadius:r}){let s=1/0,a=1/0,o=-1/0,n=-1/0,l=(e,t)=>{s=Math.min(e,s),a=Math.min(t,a),o=Math.max(e,o),n=Math.max(t,n)};return l(i*Math.cos(e),i*Math.sin(e)),l(i*Math.cos(t),i*Math.sin(t)),l(r*Math.cos(e),r*Math.sin(e)),l(r*Math.cos(t),r*Math.sin(t)),fp(0,e,t)&&l(r,0),fp(.5*Math.PI,e,t)&&l(0,r),fp(Math.PI,e,t)&&l(-r,0),fp(1.5*Math.PI,e,t)&&l(0,-r),new u3(s,a,o-s,n-a)}function Ee(e,t,i){let r=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),{innerRadius:s,outerRadius:a}=i;if(i.startAngle===i.endAngle||r<Math.min(s,a)||r>Math.max(s,a))return!1;let o=fu(i.startAngle),n=fu(i.endAngle),l=Math.atan2(t,e);return o<n?l<=n&&l>=o:l<=n&&l>=-Math.PI||l>=o&&l<=Math.PI}function Et(e,t){let{startAngle:i,endAngle:r,innerRadius:s,outerRadius:a}=t,o={x:a*Math.cos(i),y:a*Math.sin(i)},n={x:a*Math.cos(r),y:a*Math.sin(r)},l=0===s?{x:0,y:0}:{x:s*Math.cos(i),y:s*Math.sin(i)},h=0===s?{x:0,y:0}:{x:s*Math.cos(r),y:s*Math.sin(r)};return yk(e.start.x,e.start.y,e.end.x,e.end.y,o.x,o.y,l.x,l.y)||yk(e.start.x,e.start.y,e.end.x,e.end.y,n.x,n.y,h.x,h.y)||yA(0,0,a,i,r,!0,e.start.x,e.start.y,e.end.x,e.end.y)}function Ei(e,t){let i={x:e.x,y:e.y},r={x:e.x+e.width,y:e.y},s={x:e.x,y:e.y+e.height},a={x:e.x+e.width,y:e.y+e.height};return Et({start:i,end:r},t)||Et({start:s,end:a},t)}function Er(e,t,i,r){if(0===i&&0===r)return 0;if(Math.asin(Math.abs(1*i)/(e+1*i))+Math.asin(Math.abs(1*r)/(e+1*r))-t<0)return 1;let s=0,a=1;for(let o=0;o<8;o+=1){let o=(s+a)/2;Math.asin(Math.abs(o*i)/(e+o*i))+Math.asin(Math.abs(o*r)/(e+o*r))-t<0?s=o:a=o}return s}function Es(e,t){return 1e-6>fv(e,t)?t:fd(e-t)+t}function Ea(e,t,i=0){let r=Math.abs(t-e)>=2*Math.PI?2*Math.PI:fd(t-e);return t=(e=Es(e,i))+r,{startAngle:e,endAngle:t}}function Eo(e,t,i,r,s,a){let o=Math.sin(a),n=Math.cos(a),l=e**2+t**2-i**2,h=NaN,d=NaN,c=NaN,u=NaN;if(n>.5){let i=o/n,r=1+i**2,s=-2*(e+t*i),a=s**2-4*r*l;if(a<0)return;let p=(-s+Math.sqrt(a))/(2*r),g=(-s-Math.sqrt(a))/(2*r);h=p,d=p*i,c=g,u=g*i}else{let i=n/o,r=1+i**2,s=-2*(t+e*i),a=s**2-4*r*l;if(a<0)return;let p=(-s+Math.sqrt(a))/(2*r),g=(-s-Math.sqrt(a))/(2*r);h=p*i,d=p,c=g*i,u=g}let p=h*n+d*o,g=c*n+u*o,m=p>0?Es(Math.atan2(d-t,h-e),r):NaN,f=g>0?Es(Math.atan2(u-t,c-e),r):NaN;return m>=r&&m<=s?m:f>=r&&f<=s?f:void 0}function En(e,t,i,r,s,a){let o=Math.hypot(e,t),n=Math.atan2(t,e),l=Math.acos(-(o-(o**2-i**2+a**2)/(2*o))/i),h=Es(n+l,r),d=Es(n-l,r);return h>=r&&h<=s?h:d>=r&&d<=s?d:void 0}var El=class{constructor(e,t,i,r,s){this.cx=e,this.cy=t,this.r=i,this.a0=r,this.a1=s,this.a0>=this.a1&&(this.a0=NaN,this.a1=NaN)}isValid(){return Number.isFinite(this.a0)&&Number.isFinite(this.a1)}pointAt(e){return{x:this.cx+this.r*Math.cos(e),y:this.cy+this.r*Math.sin(e)}}clipStart(e){null!=e&&this.isValid()&&!(e<this.a0)&&(this.a0=e,(Number.isNaN(e)||this.a0>=this.a1)&&(this.a0=NaN,this.a1=NaN))}clipEnd(e){null!=e&&this.isValid()&&!(e>this.a1)&&(this.a1=e,(Number.isNaN(e)||this.a0>=this.a1)&&(this.a0=NaN,this.a1=NaN))}},Eh=class extends yG{constructor(){super(...arguments),this.centerX=0,this.centerY=0,this.innerRadius=10,this.outerRadius=20,this.startAngle=0,this.endAngle=2*Math.PI,this.clipSector=void 0,this.concentricEdgeInset=0,this.radialEdgeInset=0,this.startOuterCornerRadius=0,this.endOuterCornerRadius=0,this.startInnerCornerRadius=0,this.endInnerCornerRadius=0}set inset(e){this.concentricEdgeInset=e,this.radialEdgeInset=e}set cornerRadius(e){this.startOuterCornerRadius=e,this.endOuterCornerRadius=e,this.startInnerCornerRadius=e,this.endInnerCornerRadius=e}computeBBox(){return M9(this).translate(this.centerX,this.centerY)}normalizedRadii(){let{concentricEdgeInset:e}=this,{innerRadius:t,outerRadius:i}=this;return{innerRadius:t=t>0?t+e:0,outerRadius:i=Math.max(i-e,0)}}normalizedClipSector(){let{clipSector:e}=this;if(null==e)return;let{startAngle:t,endAngle:i}=Ea(this.startAngle,this.endAngle),{innerRadius:r,outerRadius:s}=this.normalizedRadii(),a=Ea(e.startAngle,e.endAngle,t);return new M7(Math.max(t,a.startAngle),Math.min(i,a.endAngle),Math.max(r,e.innerRadius),Math.min(s,e.outerRadius))}getAngleOffset(e){return e>0?this.radialEdgeInset/e:0}arc(e,t,i,r,s,a,o,n){if(e<=0)return;let{startAngle:l,endAngle:h}=Ea(this.startAngle,this.endAngle),{innerRadius:d,outerRadius:c}=this.normalizedRadii(),u=this.normalizedClipSector();if(n&&d<=0)return;let p=n?this.getAngleOffset(d+e):this.getAngleOffset(c-e),g=o?l+p+t:h-p-t,m=n?d+e:c-e,f=m*Math.cos(g),v=m*Math.sin(g);if(null!=u&&(!o&&!(g>=l-1e-6&&g<=u.endAngle-1e-6)||o&&!(g>=u.startAngle+1e-6&&g<=h-1e-6)||n&&!(m>=u.innerRadius-1e-6)||!n&&!(m<=u.outerRadius+1e-6)))return;let y=new El(f,v,e,i,r);if(null!=u){let t,h;if(n?(y.clipStart(Eo(f,v,e,i,r,u.endAngle)),y.clipEnd(Eo(f,v,e,i,r,u.startAngle))):(y.clipStart(Eo(f,v,e,i,r,u.startAngle)),y.clipEnd(Eo(f,v,e,i,r,u.endAngle))),o?(t=En(f,v,e,i,r,u.innerRadius),h=En(f,v,e,i,r,u.outerRadius)):(t=En(f,v,e,i,r,u.outerRadius),h=En(f,v,e,i,r,u.innerRadius)),y.clipStart(t),y.clipEnd(h),null!=t){let{x:e,y:i}=y.pointAt(t),r=Es(Math.atan2(i,e),l);o?a?.clipStart(r):s.clipEnd(r)}if(null!=h){let{x:e,y:t}=y.pointAt(h),i=Es(Math.atan2(t,e),l);o?s.clipStart(i):a?.clipEnd(i)}}if(null!=u){let{x:e,y:t}=y.pointAt((y.a0+y.a1)/2);if(!Ee(e,t,u))return}let{x:C,y:w}=y.pointAt(o===n?y.a0:y.a1),b=Es(Math.atan2(w,C),l),S=n?a:s;return o?S?.clipStart(b):S?.clipEnd(b),y}updatePath(){let{path:e,centerX:t,centerY:i,concentricEdgeInset:r,radialEdgeInset:s}=this,{startOuterCornerRadius:a,endOuterCornerRadius:o,startInnerCornerRadius:n,endInnerCornerRadius:l}=this,{startAngle:h,endAngle:d}=Ea(this.startAngle,this.endAngle),{innerRadius:c,outerRadius:u}=this.normalizedRadii(),p=this.normalizedClipSector(),g=d-h,m=g>=2*Math.PI-1e-6;if(e.clear(),0===c&&0===u||c>u||(p?.startAngle??h)===(p?.endAngle??d))return;if(m&&null==this.clipSector&&0===a&&0===o&&0===n&&0===l){e.moveTo(t+u*Math.cos(h),i+u*Math.sin(h)),e.arc(t,i,u,h,d),c>r&&(e.moveTo(t+c*Math.cos(d),i+c*Math.sin(d)),e.arc(t,i,c,d,h,!0)),e.closePath();return}if(null==this.clipSector&&1e-6>Math.abs(c-u)){e.arc(t,i,u,h,d,!1),e.arc(t,i,u,d,h,!0),e.closePath();return}let f=this.getAngleOffset(c),v=this.getAngleOffset(u);if(g<2*v)return;let y=(p?.innerRadius??c)>r,C=c<r||g<2*f,w=u-c,b=Math.max(a,n,o,l),S=b>0?Math.min(w/b,1):1;a*=S,o*=S,n*=S,l*=S;let x=Er(u,g-2*v,-a,-o);if(a*=x,o*=x,!C&&y){let e=Er(c,g-2*f,n,l);n*=e,l*=e}else n=0,l=0;let M=Math.max(a+n,o+l),E=M>0?Math.min(w/M,1):1;a*=E,o*=E,n*=E,l*=E;let D=0,I=0,k=a/(u-a),T=o/(u-o);k>=0&&k<.999999?D=Math.asin(k):a=Math.min(u/(1/Math.sin(D=g/2)+1),a),T>=0&&T<.999999?I=Math.asin(T):o=Math.min(u/(1/Math.sin(I=g/2)+1),o);let A=Math.asin(n/(c+n)),R=Math.asin(l/(c+l)),L=p?.outerRadius??u,P=this.getAngleOffset(L),F=new El(0,0,L,h+P,d-P),N=p?.innerRadius??c,O=this.getAngleOffset(N),B=y?new El(0,0,N,h+O,d-O):void 0;null!=p&&(F.clipStart(p.startAngle),F.clipEnd(p.endAngle),B?.clipStart(p.startAngle),B?.clipEnd(p.endAngle));let G=this.arc(a,D,h-.5*Math.PI,h+D,F,B,!0,!1),z=this.arc(o,I,d-I,d+.5*Math.PI,F,B,!1,!1),_=this.arc(l,R,d+.5*Math.PI,d+Math.PI-R,F,B,!1,!0),V=this.arc(n,A,h+Math.PI+A,h+1.5*Math.PI,F,B,!0,!0);if(C){let r;let a=g<.5*Math.PI?s*(1+Math.cos(g))/Math.sin(g):NaN;r=Math.max(r=a>0&&a<u?Math.max(Math.hypot(s,a),c):s,c);let o=h+.5*g;e.moveTo(t+r*Math.cos(o),i+r*Math.sin(o))}else if(V?.isValid()===!0||B?.isValid()===!0);else{let r=h+g/2,s=c*Math.cos(r),a=c*Math.sin(r);e.moveTo(t+s,i+a)}if(G?.isValid()===!0){let{cx:r,cy:s,r:a,a0:o,a1:n}=G;e.arc(t+r,i+s,a,o,n)}if(F.isValid()){let{r,a0:s,a1:a}=F;e.arc(t,i,r,s,a)}if(z?.isValid()===!0){let{cx:r,cy:s,r:a,a0:o,a1:n}=z;e.arc(t+r,i+s,a,o,n)}if(!C){if(_?.isValid()===!0){let{cx:r,cy:s,r:a,a0:o,a1:n}=_;e.arc(t+r,i+s,a,o,n)}if(B?.isValid()===!0){let{r,a0:s,a1:a}=B;e.arc(t,i,r,a,s,!0)}if(V?.isValid()===!0){let{cx:r,cy:s,r:a,a0:o,a1:n}=V;e.arc(t+r,i+s,a,o,n)}}e.closePath()}isPointInPath(e,t){let{startAngle:i,endAngle:r,innerRadius:s,outerRadius:a}=this.clipSector??this;return Ee(e-this.centerX,t-this.centerY,{startAngle:i,endAngle:r,innerRadius:Math.min(s,a),outerRadius:Math.max(s,a)})}};Eh.className="Sector",c7([yB()],Eh.prototype,"centerX",2),c7([yB()],Eh.prototype,"centerY",2),c7([yB()],Eh.prototype,"innerRadius",2),c7([yB()],Eh.prototype,"outerRadius",2),c7([yB()],Eh.prototype,"startAngle",2),c7([yB()],Eh.prototype,"endAngle",2),c7([yB()],Eh.prototype,"clipSector",2),c7([yB()],Eh.prototype,"concentricEdgeInset",2),c7([yB()],Eh.prototype,"radialEdgeInset",2),c7([yB()],Eh.prototype,"startOuterCornerRadius",2),c7([yB()],Eh.prototype,"endOuterCornerRadius",2),c7([yB()],Eh.prototype,"startInnerCornerRadius",2),c7([yB()],Eh.prototype,"endInnerCornerRadius",2);var Ed={BLUE:"#5090dc",ORANGE:"#ffa03a",GREEN:"#459d55",CYAN:"#34bfe1",YELLOW:"#e1cc00",VIOLET:"#9669cb",GRAY:"#b5b5b5",MAGENTA:"#bd5aa7",BROWN:"#8a6224",RED:"#ef5452"},Ec={BLUE:"#2b5c95",ORANGE:"#cc6f10",GREEN:"#1e652e",CYAN:"#18859e",YELLOW:"#a69400",VIOLET:"#603c88",GRAY:"#575757",MAGENTA:"#7d2f6d",BROWN:"#4f3508",RED:"#a82529"},Eu=class extends vn{constructor(){super(...arguments),this.showInLegend=!1}};c7([gp(gy)],Eu.prototype,"showInLegend",2);var Ep=class extends vh{constructor(){super(...arguments),this.spacing=2}set(e,t){return super.set(e)}};c7([gp(gw)],Ep.prototype,"text",2),c7([gp(gb)],Ep.prototype,"spacing",2);var Eg=class extends gd{constructor(){super(...arguments),this.fill="transparent",this.fillOpacity=1}};c7([gp(gO)],Eg.prototype,"fill",2),c7([gp(gE)],Eg.prototype,"fillOpacity",2);var Em=class extends vh{constructor(){super(...arguments),this.offset=3,this.minAngle=0,this.minSpacing=4,this.maxCollisionOffset=50,this.avoidCollisions=!0}};c7([gp(gM)],Em.prototype,"offset",2),c7([gp(gD)],Em.prototype,"minAngle",2),c7([gp(gM)],Em.prototype,"minSpacing",2),c7([gp(gM)],Em.prototype,"maxCollisionOffset",2),c7([gp(gy)],Em.prototype,"avoidCollisions",2);var Ef=class extends vh{constructor(){super(...arguments),this.positionOffset=0,this.positionRatio=.5}};c7([gp(gb)],Ef.prototype,"positionOffset",2),c7([gp(gE)],Ef.prototype,"positionRatio",2);var Ev=class extends gd{constructor(){super(...arguments),this.length=10,this.strokeWidth=1}};c7([gp(gB,{optional:!0})],Ev.prototype,"colors",2),c7([gp(gM)],Ev.prototype,"length",2),c7([gp(gM)],Ev.prototype,"strokeWidth",2);var Ey=class extends w9{constructor(){super(...arguments),this.fills=Object.values(Ed),this.strokes=Object.values(Ec),this.fillOpacity=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.cornerRadius=0,this.rotation=0,this.outerRadiusOffset=0,this.outerRadiusRatio=1,this.strokeWidth=1,this.sectorSpacing=0,this.innerLabels=new gc(Ep),this.title=new Eu,this.innerCircle=new Eg,this.shadow=new xy,this.calloutLabel=new Em,this.sectorLabel=new Ef,this.calloutLine=new Ev,this.tooltip=new xS}isValid(){let e=super.isValid();return null==this.innerRadiusRatio&&null==this.innerRadiusOffset?(ul.warnOnce("Either an [innerRadiusRatio] or an [innerRadiusOffset] must be set to render a donut series."),!1):e}};function EC(e,t,i,r){let s=[i.convert(0),i.convert(1)],a=[r.convert(0),r.convert(1)],o=-(Math.PI/2)+fg(t),n=e?"initial":"update",l=({radius:e})=>({innerRadius:s[0],outerRadius:s[0]+(s[1]-s[0])*e}),h=({radius:e})=>({innerRadius:a[0],outerRadius:a[0]+(a[1]-a[0])*e});return{nodes:{toFn:(e,t,i,{prevLive:r})=>{let{startAngle:s,endAngle:a,innerRadius:n,outerRadius:h}=t,{stroke:d,fill:c}=t.sectorFormat;if("removed"===i&&r?(s=r.datum?.endAngle,a=r.datum?.endAngle):"removed"!==i||r||(s=o,a=o),"removed"===i){let e=l(t);n=e.innerRadius,h=e.outerRadius}return{startAngle:s,endAngle:a,outerRadius:h,innerRadius:n,stroke:d,fill:c}},fromFn:(t,i,r,{prevFromProps:s})=>{let{startAngle:a,endAngle:l,innerRadius:d,outerRadius:c}=t,{fill:u,stroke:p}=i.sectorFormat;if("unknown"!==r&&("added"!==r||s)?"added"===r&&s&&(a=s.endAngle??o,l=s.endAngle??o,d=s.innerRadius??i.innerRadius,c=s.outerRadius??i.outerRadius):(a=o,l=o,d=i.innerRadius,c=i.outerRadius),"added"===r&&!e){let e=h(i);d=e.innerRadius,c=e.outerRadius}return"updated"===r&&(u=t.fill??u,p=t.stroke??p),{startAngle:a,endAngle:l,innerRadius:d,outerRadius:c,fill:u,stroke:p,phase:n}}},innerCircle:{fromFn:(e,t)=>({size:e.previousDatum?.radius??e.size??0,phase:n}),toFn:(e,t)=>({size:t.radius??0})}}}function Ew(e,t){return{startAngle:t.startAngle,endAngle:t.endAngle,innerRadius:t.innerRadius,outerRadius:t.outerRadius,fill:t.sectorFormat.fill,stroke:t.sectorFormat.stroke}}function Eb(e,t){let i=t.y-e.centerY,r=t.x-e.centerX,s=Math.atan2(i,r);for(let t of e.getItemNodes())if(!0!==t.datum.missing&&fp(s,t.startAngle,t.endAngle)){let e=Math.sqrt(r*r+i*i),s=0;return e<t.innerRadius?s=t.innerRadius-e:e>t.outerRadius&&(s=e-t.outerRadius),{datum:t.datum,distance:s}}}c7([gp(gw)],Ey.prototype,"angleKey",2),c7([gp(gw,{optional:!0})],Ey.prototype,"angleName",2),c7([gp(gw,{optional:!0})],Ey.prototype,"angleFilterKey",2),c7([gp(gw,{optional:!0})],Ey.prototype,"radiusKey",2),c7([gp(gw,{optional:!0})],Ey.prototype,"radiusName",2),c7([gp(gM,{optional:!0})],Ey.prototype,"radiusMin",2),c7([gp(gM,{optional:!0})],Ey.prototype,"radiusMax",2),c7([gp(gw,{optional:!0})],Ey.prototype,"calloutLabelKey",2),c7([gp(gw,{optional:!0})],Ey.prototype,"calloutLabelName",2),c7([gp(gw,{optional:!0})],Ey.prototype,"sectorLabelKey",2),c7([gp(gw,{optional:!0})],Ey.prototype,"sectorLabelName",2),c7([gp(gw,{optional:!0})],Ey.prototype,"legendItemKey",2),c7([gp(gB)],Ey.prototype,"fills",2),c7([gp(gB)],Ey.prototype,"strokes",2),c7([gp(gE)],Ey.prototype,"fillOpacity",2),c7([gp(gE)],Ey.prototype,"strokeOpacity",2),c7([gp(g$)],Ey.prototype,"lineDash",2),c7([gp(gM)],Ey.prototype,"lineDashOffset",2),c7([gp(gM)],Ey.prototype,"cornerRadius",2),c7([gp(gC,{optional:!0})],Ey.prototype,"itemStyler",2),c7([gp(gD)],Ey.prototype,"rotation",2),c7([gp(gb)],Ey.prototype,"outerRadiusOffset",2),c7([gp(gE)],Ey.prototype,"outerRadiusRatio",2),c7([gp(gb,{optional:!0})],Ey.prototype,"innerRadiusOffset",2),c7([gp(gE,{optional:!0})],Ey.prototype,"innerRadiusRatio",2),c7([gp(gM)],Ey.prototype,"strokeWidth",2),c7([gp(gb)],Ey.prototype,"sectorSpacing",2),c7([gp(gj)],Ey.prototype,"innerLabels",2),c7([gp(gf)],Ey.prototype,"title",2),c7([gp(gf)],Ey.prototype,"innerCircle",2),c7([gp(gf)],Ey.prototype,"shadow",2),c7([gp(gf)],Ey.prototype,"calloutLabel",2),c7([gp(gf)],Ey.prototype,"sectorLabel",2),c7([gp(gf)],Ey.prototype,"calloutLine",2),c7([gp(gf)],Ey.prototype,"tooltip",2);var ES=class extends w3{constructor({useLabelLayer:e=!1,pickModes:t=[3,0],canHaveAxes:i=!1,animationResetFns:r,...s}){super({...s,useLabelLayer:e,pickModes:t,contentGroupVirtual:!1,directionKeys:{x:["angleKey"],y:["radiusKey"]},directionNames:{x:["angleName"],y:["radiusName"]},canHaveAxes:i}),this.itemGroup=this.contentGroup.appendChild(new mQ),this.nodeData=[],this.itemSelection=fl.select(this.itemGroup,()=>this.nodeFactory(),!1),this.labelSelection=fl.select(this.labelGroup,()=>this.labelFactory(),!1),this.highlightSelection=fl.select(this.highlightGroup,()=>this.nodeFactory()),this.highlightLabelSelection=fl.select(this.highlightLabel,()=>this.labelFactory()),this.centerX=0,this.centerY=0,this.radius=0,this.itemGroup.zIndexSubOrder=[()=>this._declarationOrder,1],this.animationResetFns=r,this.animationState=new f5("empty",{empty:{update:{target:"ready",action:e=>this.animateEmptyUpdateReady(e)},reset:"empty",skip:"ready"},ready:{updateData:"waiting",clear:"clearing",highlight:e=>this.animateReadyHighlight(e),highlightMarkers:e=>this.animateReadyHighlightMarkers(e),resize:e=>this.animateReadyResize(e),reset:"empty",skip:"ready"},waiting:{update:{target:"ready",action:e=>this.animateWaitingUpdateReady(e)},reset:"empty",skip:"ready"},clearing:{update:{target:"empty",action:e=>this.animateClearingUpdateEmpty(e)},reset:"empty",skip:"ready"}},()=>this.checkProcessedDataAnimatable())}getItemNodes(){return this.itemGroup.children}getNodeData(){return this.nodeData}resetAnimation(e){"initial"===e?this.animationState.transition("reset"):"ready"===e&&this.animationState.transition("skip")}labelFactory(){let e=new fz;return e.pointerEvents=1,e}getInnerRadius(){return 0}getLabelData(){return[]}computeLabelsBBox(e,t){return null}resetAllAnimation(){let{item:e,label:t}=this.animationResetFns??{};this.ctx.animationManager.stopByAnimationGroupId(this.id),e&&ms([this.itemSelection,this.highlightSelection],e),t&&ms([this.labelSelection,this.highlightLabelSelection],t),this.itemSelection.cleanup(),this.labelSelection.cleanup(),this.highlightSelection.cleanup(),this.highlightLabelSelection.cleanup()}animateEmptyUpdateReady(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation()}animateWaitingUpdateReady(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation()}animateReadyHighlight(e){let{item:t,label:i}=this.animationResetFns??{};t&&ms([this.highlightSelection],t),i&&ms([this.highlightLabelSelection],i)}animateReadyHighlightMarkers(e){}animateReadyResize(e){this.resetAllAnimation()}animateClearingUpdateEmpty(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation()}animationTransitionClear(){this.animationState.transition("clear",this.getAnimationData())}getAnimationData(e){return{seriesRect:e}}computeFocusBounds(e){let t=this.getNodeData()?.[e.datumIndex];if(void 0!==t)return this.itemSelection.select(e=>e instanceof yG&&e.datum===t)[0]}},Ex=class extends wy{constructor(e,t,i,r){super(e,t,i,r),this.angleKey=r.properties.angleKey,this.radiusKey=r.properties.radiusKey,this.calloutLabelKey=r.properties.calloutLabelKey,this.sectorLabelKey=r.properties.sectorLabelKey}},EM=class extends ES{constructor(e){super({moduleCtx:e,pickModes:[3,0],useLabelLayer:!0,animationResetFns:{item:Ew,label:xf}}),this.properties=new Ey,this.phantomNodeData=void 0,this.previousRadiusScale=new bd,this.radiusScale=new bd,this.phantomGroup=this.contentGroup.appendChild(new mQ),this.phantomSelection=fl.select(this.phantomGroup,()=>this.nodeFactory(),!1),this.calloutLabelGroup=this.contentGroup.appendChild(new mQ({name:"pieCalloutLabels"})),this.calloutLabelSelection=new fl(this.calloutLabelGroup,mQ),this.backgroundGroup=this.rootGroup.appendChild(new m1({name:`${this.id}-background`,layer:!0,zIndex:0})),this.zerosumRingsGroup=this.backgroundGroup.appendChild(new mQ({name:`${this.id}-zerosumRings`})),this.zerosumOuterRing=this.zerosumRingsGroup.appendChild(new wU),this.zerosumInnerRing=this.zerosumRingsGroup.appendChild(new wU),this.innerLabelsGroup=this.contentGroup.appendChild(new mQ({name:"innerLabels"})),this.innerCircleGroup=this.backgroundGroup.appendChild(new mQ({name:`${this.id}-innerCircle`})),this.innerLabelsSelection=fl.select(this.innerLabelsGroup,fz),this.innerCircleSelection=fl.select(this.innerCircleGroup,wU),this.seriesItemEnabled=[],this.surroundingRadius=void 0,this.NodeEvent=Ex,this.angleScale=new bd,this.angleScale.domain=[0,1],this.angleScale.range=[-Math.PI,Math.PI].map(e=>e+Math.PI/2),this.phantomGroup.opacity=.2,this.phantomGroup.zIndexSubOrder=[()=>this._declarationOrder,0]}get calloutNodeData(){return this.phantomNodeData??this.nodeData}addChartEventListeners(){this.destroyFns.push(this.ctx.chartEventManager?.addListener("legend-item-click",e=>this.onLegendItemClick(e)))}get visible(){return super.visible&&(0===this.seriesItemEnabled.length||this.seriesItemEnabled.some(e=>e))}nodeFactory(){return new Eh}getSeriesDomain(e){return"x"===e?this.angleScale.domain:this.radiusScale.domain}async processData(e){if(null==this.data||!this.properties.isValid())return;let{data:t}=this,{visible:i,seriesItemEnabled:r}=this,{angleKey:s,angleFilterKey:a,radiusKey:o,calloutLabelKey:n,sectorLabelKey:l,legendItemKey:h}=this.properties,d=!this.ctx.animationManager.isSkipped(),c=[],u=[];h?c.push(S2(h,"band",{id:"legendItemKey"})):n?c.push(S2(n,"band",{id:"calloutLabelKey"})):l&&c.push(S2(l,"band",{id:"sectorLabelKey"}));let p=this.radiusScale.type,g=this.radiusScale.type;for(let m of(o&&u.push(S4(o,{id:"radiusValue",min:this.properties.radiusMin??0,max:this.properties.radiusMax}),S3(o,p,{id:"radiusRaw"}),xa("radiusValue",[0,1],1,this.properties.radiusMin??0,this.properties.radiusMax)),n&&u.push(S3(n,"band",{id:"calloutLabelValue"})),l&&u.push(S3(l,"band",{id:"sectorLabelValue"})),h&&u.push(S3(h,"band",{id:"legendItemValue"})),a&&u.push(S6(a,g,{id:"angleFilterValue",onlyPositive:!0}),S3(a,g,{id:"angleFilterRaw"}),xa("angleFilterValue",[0,1],0,0)),d&&this.processedData&&c.length>0&&u.push(xu(this.processedData)),u.push(xo()),t=t.map((e,t)=>i&&r[t]?e:{...e,[s]:0}),await this.requestDataModel(e,t,{props:[...c,S6(s,g,{id:"angleValue",onlyPositive:!0}),S3(s,g,{id:"angleRaw"}),xa("angleValue",[0,1],0,0),...u]}),this.processedData?.defs?.values??[])){let{id:e,missing:t,property:i}=m,r=Cq(this,t);"angleRaw"!==e&&r>0&&ul.warnOnce(`no value was found for the key '${String(i)}' on ${r} data element${r>1?"s":""}`)}this.animationState.transition("updateData")}async maybeRefreshNodeData(){if(!this.nodeDataRefresh)return;let{nodeData:e=[],phantomNodeData:t}=await this.createNodeData()??{};this.nodeData=e,this.phantomNodeData=t,this.nodeDataRefresh=!1}getProcessedDataIndexes(e){let t=e.resolveProcessedDataIndexById(this,"angleValue"),i=e.resolveProcessedDataIndexById(this,"angleRaw"),r=null!=this.properties.angleFilterKey?e.resolveProcessedDataIndexById(this,"angleFilterValue"):void 0,s=null!=this.properties.angleFilterKey?e.resolveProcessedDataIndexById(this,"angleFilterRaw"):void 0,a=this.properties.radiusKey?e.resolveProcessedDataIndexById(this,"radiusValue"):void 0,o=this.properties.radiusKey?e.resolveProcessedDataIndexById(this,"radiusRaw"):void 0;return{angleIdx:t,angleRawIdx:i,angleFilterIdx:r,angleFilterRawIdx:s,radiusIdx:a,radiusRawIdx:o,calloutLabelIdx:this.properties.calloutLabelKey?e.resolveProcessedDataIndexById(this,"calloutLabelValue"):void 0,sectorLabelIdx:this.properties.sectorLabelKey?e.resolveProcessedDataIndexById(this,"sectorLabelValue"):void 0,legendItemIdx:this.properties.legendItemKey?e.resolveProcessedDataIndexById(this,"legendItemValue"):void 0}}async createNodeData(){let{id:e,processedData:t,dataModel:i,angleScale:r}=this,{rotation:s,innerRadiusRatio:a}=this.properties;if(!this.properties.isValid())return this.zerosumOuterRing.visible=!0,this.zerosumInnerRing.visible=!0,{itemId:e,nodeData:[],labelData:[]};if(!t||!i||"ungrouped"!==t.type)return;let{angleIdx:o,angleRawIdx:n,angleFilterIdx:l,angleFilterRawIdx:h,radiusIdx:d,radiusRawIdx:c,calloutLabelIdx:u,sectorLabelIdx:p,legendItemIdx:g}=this.getProcessedDataIndexes(i),m=null!=h&&t.data.some(({values:e})=>e[h]>e[n]),f=0,v=0,y=[],C=null!=h?[]:void 0;return t.data.forEach((e,t)=>{let{datum:i,values:a}=e,w=m?a[l]:a[o],b=null==h||m?1:Math.sqrt(a[h]/a[n]),S=r.convert(f)+fg(s);f=w,v+=w;let x=r.convert(f)+fg(s),M=Math.abs(x-S),E=S+M/2,D=a[n],I=(null!=d?a[d]??1:1)*b,k=null!=c?a[c]:void 0,T=null!=g?a[g]:void 0,A=this.getLabels(i,E,M,!0,null!=u?a[u]:void 0,null!=p?a[p]:void 0,T),R=this.getSectorFormat(i,t,!1),L={itemId:t,series:this,datum:i,index:t,angleValue:D,midAngle:E,midCos:Math.cos(E),midSin:Math.sin(E),startAngle:S,endAngle:x,radius:I,innerRadius:Math.max(this.radiusScale.convert(0),0),outerRadius:Math.max(this.radiusScale.convert(I),0),sectorFormat:R,radiusValue:k,legendItemValue:T,enabled:this.seriesItemEnabled[t],focusable:!0,...A};y.push(L),null!=C&&C.push({...L,radius:1,innerRadius:Math.max(this.radiusScale.convert(0),0),outerRadius:Math.max(this.radiusScale.convert(1),0),focusable:!1})}),this.zerosumOuterRing.visible=0===v,this.zerosumInnerRing.visible=0===v&&null!=a&&1!==a&&a>0,{itemId:e,nodeData:y,labelData:y,phantomNodeData:C}}getLabels(e,t,i,r,s,a,o){let{calloutLabel:n,sectorLabel:l,legendItemKey:h}=this.properties,d=!r||n.enabled?this.properties.calloutLabelKey:void 0,c=!r||l.enabled?this.properties.sectorLabelKey:void 0;if(!d&&!c&&!h)return{};let u={datum:e,angleKey:this.properties.angleKey,angleName:this.properties.angleName,radiusKey:this.properties.radiusKey,radiusName:this.properties.radiusName,calloutLabelKey:this.properties.calloutLabelKey,calloutLabelName:this.properties.calloutLabelName,sectorLabelKey:this.properties.sectorLabelKey,sectorLabelName:this.properties.sectorLabelName,legendItemKey:this.properties.legendItemKey},p={};return d&&i>fg(n.minAngle)&&(p.calloutLabel={...this.getTextAlignment(t),text:this.getLabelText(n,{...u,value:s}),hidden:!1,collisionTextAlign:void 0,collisionOffsetY:0,box:void 0}),c&&(p.sectorLabel={text:this.getLabelText(l,{...u,value:a})}),null!=h&&null!=o&&(p.legendItem={key:h,text:o}),p}getTextAlignment(e){let t=[{textAlign:"center",textBaseline:"bottom"},{textAlign:"left",textBaseline:"middle"},{textAlign:"center",textBaseline:"hanging"},{textAlign:"right",textBaseline:"middle"}],i=uJ(Math.floor((fu(e)- -.75*Math.PI)/(Math.PI/2)),t.length);return t[i]}getSectorFormat(e,t,i){let r;let{callbackCache:s}=this.ctx,{angleKey:a,radiusKey:o,calloutLabelKey:n,sectorLabelKey:l,legendItemKey:h,fills:d,strokes:c,itemStyler:u}=this.properties,p=c[t%c.length],{fill:g,fillOpacity:m,stroke:f,strokeWidth:v,strokeOpacity:y,lineDash:C,lineDashOffset:w,cornerRadius:b}=pP(i&&this.properties.highlightStyle.item,{fill:d.length>0?d[t%d.length]:void 0,stroke:p,strokeWidth:this.getStrokeWidth(this.properties.strokeWidth),strokeOpacity:this.getOpacity()},this.properties);return u&&(r=s.call(u,{datum:e,angleKey:a,radiusKey:o,calloutLabelKey:n,sectorLabelKey:l,legendItemKey:h,fill:g,fillOpacity:m,stroke:f,strokeWidth:v,strokeOpacity:y,lineDash:C,lineDashOffset:w,cornerRadius:b,highlighted:i,seriesId:this.id})),{fill:r?.fill??g,fillOpacity:r?.fillOpacity??m,stroke:r?.stroke??f,strokeWidth:r?.strokeWidth??v,strokeOpacity:r?.strokeOpacity??y,lineDash:r?.lineDash??C,lineDashOffset:r?.lineDashOffset??w,cornerRadius:r?.cornerRadius??b}}getInnerRadius(){let{radius:e}=this,{innerRadiusRatio:t=1,innerRadiusOffset:i=0}=this.properties,r=e*t+i;return r===e||r<0?0:r}getOuterRadius(){let{outerRadiusRatio:e,outerRadiusOffset:t}=this.properties;return Math.max(this.radius*e+t,0)}updateRadiusScale(e){let t=[this.getInnerRadius(),this.getOuterRadius()];this.radiusScale.range=t,e&&(this.previousRadiusScale.range=t);let i=e=>({...e,innerRadius:Math.max(this.radiusScale.convert(0),0),outerRadius:Math.max(this.radiusScale.convert(e.radius),0)});this.nodeData=this.nodeData.map(i),this.phantomNodeData=this.phantomNodeData?.map(i)}getTitleTranslationY(){let e=Math.max(0,this.radiusScale.range[1]);if(0===e)return NaN;let t=this.properties.title?.spacing??0,i=Math.max(0,-e);return-e-(2+t)-i}async update({seriesRect:e}){let{title:t}=this.properties,i={seriesRectWidth:e?.width,seriesRectHeight:e?.height},r=null!=f$(this.nodeDataDependencies,i);if(r&&(this._nodeDataDependencies=i),await this.maybeRefreshNodeData(),this.updateTitleNodes(),this.updateRadiusScale(r),this.contentGroup.translationX=this.centerX,this.contentGroup.translationY=this.centerY,this.highlightGroup.translationX=this.centerX,this.highlightGroup.translationY=this.centerY,this.backgroundGroup.translationX=this.centerX,this.backgroundGroup.translationY=this.centerY,this.labelGroup&&(this.labelGroup.translationX=this.centerX,this.labelGroup.translationY=this.centerY),t){let e=this.getTitleTranslationY(),i=t.node.getBBox();t.node.visible=t.enabled&&isFinite(e)&&!this.bboxIntersectsSurroundingSeries(i,0,e),t.node.y=isFinite(e)?e:0}for(let e of[this.zerosumInnerRing,this.zerosumOuterRing])e.fillOpacity=0,e.stroke=this.properties.calloutLabel.color,e.strokeWidth=1,e.strokeOpacity=1;this.updateNodeMidPoint(),await this.updateSelections(),await this.updateNodes(e)}updateTitleNodes(){let{oldTitle:e}=this,{title:t}=this.properties;e!==t&&(e&&this.labelGroup?.removeChild(e.node),t&&(t.node.textBaseline="bottom",this.labelGroup?.appendChild(t.node)),this.oldTitle=t)}updateNodeMidPoint(){let e=e=>{let t=e.innerRadius+(e.outerRadius-e.innerRadius)/2;e.midPoint={x:e.midCos*Math.max(0,t),y:e.midSin*Math.max(0,t)}};this.nodeData.forEach(e),this.phantomNodeData?.forEach(e)}async updateSelections(){await this.updateGroupSelection(),this.updateInnerCircleSelection()}async updateGroupSelection(){let{itemSelection:e,highlightSelection:t,phantomSelection:i,highlightLabelSelection:r,calloutLabelSelection:s,labelSelection:a,innerLabelsSelection:o}=this,n=this.nodeData.map(e=>({...e,sectorFormat:{...e.sectorFormat}})),l=(e,t)=>{e.update(t,void 0,e=>this.getDatumId(e)),this.ctx.animationManager.isSkipped()&&e.cleanup()};l(e,this.nodeData),l(t,n),l(i,this.phantomNodeData??[]),s.update(this.calloutNodeData,e=>{let t=new fL;t.tag=0,t.pointerEvents=1,e.appendChild(t);let i=new fz;i.tag=1,i.pointerEvents=1,e.appendChild(i)}),a.update(this.nodeData),r.update(n),o.update(this.properties.innerLabels,e=>{e.pointerEvents=1})}updateInnerCircleSelection(){let{innerCircle:e}=this.properties,t=0,i=this.getInnerRadius();i>0&&(t=Math.ceil(2*Math.min(i,this.getOuterRadius())+1));let r=e?[{radius:t}]:[];this.innerCircleSelection.update(r)}async updateNodes(e){let t=this.ctx.highlightManager.getActiveHighlight(),i=this.visible&&this.seriesItemEnabled.indexOf(!0)>=0;this.rootGroup.visible=i,this.backgroundGroup.visible=i,this.contentGroup.visible=i,this.highlightGroup.visible=i&&t?.series===this,this.highlightLabel.visible=i&&t?.series===this,this.labelGroup&&(this.labelGroup.visible=i),this.contentGroup.opacity=this.getOpacity(),this.innerCircleSelection.each((e,{radius:t})=>{e.setProperties({fill:this.properties.innerCircle?.fill,opacity:this.properties.innerCircle?.fillOpacity,size:t})});let r=this.ctx.animationManager.isSkipped(),s=(e,t,i,s)=>{let a=this.getSectorFormat(t.datum,t.itemId,s);t.sectorFormat.fill=a.fill,t.sectorFormat.stroke=a.stroke,r&&(e.startAngle=t.startAngle,e.endAngle=t.endAngle,e.innerRadius=t.innerRadius,e.outerRadius=t.outerRadius),(s||r)&&(e.fill=a.fill,e.stroke=a.stroke),e.strokeWidth=a.strokeWidth,e.fillOpacity=a.fillOpacity,e.strokeOpacity=a.strokeOpacity,e.lineDash=a.lineDash,e.lineDashOffset=a.lineDashOffset,e.cornerRadius=a.cornerRadius,e.fillShadow=this.properties.shadow;let o=Math.max((this.properties.sectorSpacing+(null!=a.stroke?a.strokeWidth:0))/2,0);e.inset=o,e.lineJoin=this.properties.sectorSpacing>=0||o>0?"miter":"round"};this.itemSelection.each((e,t,i)=>s(e,t,i,!1)),this.highlightSelection.each((e,i,r)=>{i.itemId===t?.itemId?(e.visible=!0,s(e,i,r,!0)):e.visible=!1}),this.phantomSelection.each((e,t,i)=>s(e,t,i,!1)),this.updateCalloutLineNodes(),this.updateCalloutLabelNodes(e),this.updateSectorLabelNodes(),this.updateInnerLabelNodes(),this.updateZerosumRings(),this.animationState.transition("update")}updateCalloutLineNodes(){let{calloutLine:e}=this.properties,t=e.length,i=e.strokeWidth,r=e.colors??this.properties.strokes,{offset:s}=this.properties.calloutLabel;this.calloutLabelSelection.selectByTag(0).forEach((e,a)=>{let o=e.datum,{calloutLabel:n,outerRadius:l}=o;if(n?.text&&!n.hidden&&0!==l){e.visible=!0,e.strokeWidth=i,e.stroke=r[a%r.length],e.fill=void 0;let h=o.midCos*l,d=o.midSin*l,c=o.midCos*(l+t),u=o.midSin*(l+t);if((n.collisionTextAlign??0!==n.collisionOffsetY)&&null!=n.box){let e=n.box,t=c,i=u;c<e.x?t=e.x:c>e.x+e.width&&(t=e.x+e.width),u<e.y?i=e.y:u>e.y+e.height&&(i=e.y+e.height);let r=t-c,a=i-u,o=Math.sqrt(Math.pow(r,2)+Math.pow(a,2)),l=o-s;l>0&&(c+=r*l/o,u+=a*l/o)}e.x1=h,e.y1=d,e.x2=c,e.y2=u}else e.visible=!1})}getLabelOverflow(e,t,i){let r=i.x-this.centerX,s=i.x+i.width-this.centerX,a=i.y-this.centerY,o=i.y+i.height-this.centerY,n=1;t.x+1<r?n=(t.x+t.width-r)/t.width:t.x+t.width-1>s&&(n=(s-t.x)/t.width);let l=t.y+1<a||t.y+t.height-1>o;return{textLength:1===n?e.length:Math.floor(e.length*n)-1,hasVerticalOverflow:l,hasSurroundingSeriesOverflow:this.bboxIntersectsSurroundingSeries(t)}}bboxIntersectsSurroundingSeries(e,t=0,i=0){let{surroundingRadius:r}=this;if(null==r)return!1;let s=[{x:e.x+t,y:e.y+i},{x:e.x+e.width+t,y:e.y+i},{x:e.x+e.width+t,y:e.y+e.height+i},{x:e.x+t,y:e.y+e.height+i}],a=r**2;return s.some(e=>e.x**2+e.y**2>a)}computeCalloutLabelCollisionOffsets(){let{radiusScale:e}=this,{calloutLabel:t,calloutLine:i}=this.properties,{offset:r,minSpacing:s}=t,a=e.convert(0),o=e=>!e.calloutLabel||0===e.outerRadius,n=this.calloutNodeData,l=n.filter(e=>!o(e));if(l.forEach(e=>{let t=e.calloutLabel;null!=t&&(t.hidden=!1,t.collisionTextAlign=void 0,t.collisionOffsetY=0)}),l.length<=1)return;let h=l.filter(e=>e.midCos<0).sort((e,t)=>e.midSin-t.midSin),d=l.filter(e=>e.midCos>=0).sort((e,t)=>e.midSin-t.midSin),c=l.filter(e=>e.midSin<0&&e.calloutLabel?.textAlign==="center").sort((e,t)=>e.midCos-t.midCos),u=l.filter(e=>e.midSin>=0&&e.calloutLabel?.textAlign==="center").sort((e,t)=>e.midCos-t.midCos),p=e=>{let t=e.calloutLabel;if(null==t)return u3.zero.clone();let s=e.outerRadius+i.length+r,a=e.midCos*s,o=e.midSin*s+t.collisionOffsetY,n=t.collisionTextAlign??t.textAlign,l=t.textBaseline;return fz.computeBBox(t.text,a,o,{font:this.properties.calloutLabel,textAlign:n,textBaseline:l})},g=(e,t,i)=>{let r=p(e).grow(s/2),a=p(t).grow(s/2);if(r.x<a.x+a.width&&r.x+r.width>a.x&&("to-top"===i?r.y<a.y+a.height:r.y+r.height>a.y)){let e="to-top"===i?r.y-a.y-a.height:r.y+r.height-a.y;t.calloutLabel.collisionOffsetY=e}},m=e=>{let t=e.slice().sort((e,t)=>Math.abs(e.midSin)-Math.abs(t.midSin))[0],i=e.indexOf(t);for(let t=i-1;t>=0;t--)g(e[t+1],e[t],"to-top");for(let t=i+1;t<e.length;t++)g(e[t-1],e[t],"to-bottom")},f=e=>{let t=l.some(e=>0!==e.calloutLabel.collisionOffsetY),i=e.map(e=>p(e)),r=i.map(e=>e.clone().grow(s/2)),o=!1;for(let t=0;t<r.length&&!o;t++){let i=r[t];for(let s=t+1;s<e.length;s++){let e=r[s];if(i.collidesBBox(e)){o=!0;break}}}let h=n.map(e=>{let{startAngle:t,endAngle:i,outerRadius:r}=e;return{startAngle:t,endAngle:i,innerRadius:a,outerRadius:r}}),d=i.some(e=>h.some(t=>Ei(e,t)));(o||t||d)&&e.filter(e=>"center"===e.calloutLabel.textAlign).forEach(e=>{let t=e.calloutLabel;e.midCos<0?t.collisionTextAlign="right":e.midCos>0?t.collisionTextAlign="left":t.collisionTextAlign="center"})};m(h),m(d),f(c),f(u)}updateCalloutLabelNodes(e){let{radiusScale:t}=this,{calloutLabel:i,calloutLine:r}=this.properties,s=r.length,{offset:a,color:o}=i,n=new fz;this.calloutLabelSelection.selectByTag(1).forEach(r=>{let{datum:l}=r,h=l.calloutLabel,d=Math.max(0,t.convert(l.radius));if(!h?.text||0===d||h.hidden){r.visible=!1;return}let c=d+s+a,u=l.midCos*c,p=l.midSin*c+h.collisionOffsetY,g={textAlign:h.collisionTextAlign??h.textAlign,textBaseline:h.textBaseline};n.text=h.text,n.x=u,n.y=p,n.setFont(this.properties.calloutLabel),n.setAlign(g);let m=n.getBBox(),f=h.text,v=!0;if(i.avoidCollisions){let{textLength:t,hasVerticalOverflow:i}=this.getLabelOverflow(h.text,m,e);f=h.text.length===t?h.text:`${h.text.substring(0,t)}\u2026`,v=!i}r.text=f,r.x=u,r.y=p,r.setFont(this.properties.calloutLabel),r.setAlign(g),r.fill=o,r.visible=v})}async computeLabelsBBox(e,t){let i;let{calloutLabel:r,calloutLine:s}=this.properties,a=s.length,{offset:o,maxCollisionOffset:n,minSpacing:l}=r;if(!r.avoidCollisions)return null;await this.maybeRefreshNodeData(),this.updateRadiusScale(!1),this.computeCalloutLabelCollisionOffsets();let h=[],d=new fz,{title:c}=this.properties;if(c?.text&&c.enabled){let e=this.getTitleTranslationY();isFinite(e)&&(d.text=c.text,d.x=0,d.y=e,d.setFont(c),d.setAlign({textBaseline:"bottom",textAlign:"center"}),i=d.getBBox(),h.push(i))}return(this.calloutNodeData.forEach(r=>{let s=r.calloutLabel;if(!s||0===r.outerRadius)return null;let c=r.outerRadius+a+o,u=r.midCos*c,p=r.midSin*c+s.collisionOffsetY;d.text=s.text,d.x=u,d.y=p,d.setFont(this.properties.calloutLabel),d.setAlign({textAlign:s.collisionTextAlign??s.textAlign,textBaseline:s.textBaseline});let g=d.getBBox();if(s.box=g,Math.abs(s.collisionOffsetY)>n){s.hidden=!0;return}if(i){let e=t.y-this.centerY,r=new u3(i.x-l,e,i.width+2*l,i.y+i.height+l-e);if(g.collidesBBox(r)){s.hidden=!0;return}}if(e.hideWhenNecessary){let{textLength:e,hasVerticalOverflow:i,hasSurroundingSeriesOverflow:r}=this.getLabelOverflow(s.text,g,t),a=s.text.length>2&&e<2;if(i||a||r){s.hidden=!0;return}}s.hidden=!1,h.push(g)}),0===h.length)?null:u3.merge(h)}updateSectorLabelNodes(){let{radiusScale:e}=this,t=e.convert(0),{fontSize:i,fontStyle:r,fontWeight:s,fontFamily:a,positionOffset:o,positionRatio:n,color:l}=this.properties.sectorLabel,h=(e,h)=>{let{sectorLabel:d,outerRadius:c}=h,u=!1;if(d&&0!==c){let p=t*(1-n)+c*n+o;e.fill=l,e.fontStyle=r,e.fontWeight=s,e.fontSize=i,e.fontFamily=a,e.text=d.text,e.x=h.midCos*p,e.y=h.midSin*p,e.textAlign="center",e.textBaseline="middle";let g=e.getBBox(),m=[[g.x,g.y],[g.x+g.width,g.y],[g.x+g.width,g.y+g.height],[g.x,g.y+g.height]],{startAngle:f,endAngle:v}=h,y={startAngle:f,endAngle:v,innerRadius:t,outerRadius:c};m.every(([e,t])=>Ee(e,t,y))&&(u=!0)}e.visible=u};this.labelSelection.each(h),this.highlightLabelSelection.each(h)}updateInnerLabelNodes(){let e=[],t=[];this.innerLabelsSelection.each((i,r)=>{let{fontStyle:s,fontWeight:a,fontSize:o,fontFamily:n,color:l}=r;i.fontStyle=s,i.fontWeight=a,i.fontSize=o,i.fontFamily=n,i.text=r.text,i.x=0,i.y=0,i.fill=l,i.textAlign="center",i.textBaseline="alphabetic",e.push(i.getBBox()),t.push(r.spacing)});let i=e=>0===e?0:t[e],r=e=>e===t.length-1?0:t[e],s=e.reduce((e,t,s)=>e+t.height+i(s)+r(s),0),a=Math.max(...e.map(e=>e.width)),o=this.getInnerRadius(),n=Math.sqrt(Math.pow(a/2,2)+Math.pow(s/2,2))<=(o>0?o:this.getOuterRadius()),l=[];for(let t=0,a=-s/2;t<e.length;t++){let s=e[t].height+a+i(t);l.push(s),a=s+r(t)}this.innerLabelsSelection.each((e,t,i)=>{e.y=l[i],e.visible=n})}updateZerosumRings(){this.zerosumOuterRing.size=2*this.getOuterRadius(),this.zerosumInnerRing.size=2*this.getInnerRadius()}getDatumLegendName(e){let{angleKey:t,calloutLabelKey:i,sectorLabelKey:r,legendItemKey:s}=this.properties,{sectorLabel:a,calloutLabel:o,legendItem:n}=e;return s&&void 0!==n?n.text:i&&i!==t&&o?.text!==void 0?o.text:r&&r!==t&&a?.text!==void 0?a.text:void 0}pickNodeClosestDatum(e){return Eb(this,e)}getTooltipHtml(e){if(!this.properties.isValid())return vr;let{datum:t,angleValue:i,sectorFormat:{fill:r},itemId:s}=e,a=S_(this.properties.title?.text),o=pD(i)?uQ(i):String(i),n=this.getDatumLegendName(e);return this.properties.tooltip.toTooltipHtml({title:a??n,content:a&&n?`${n}: ${o}`:o,backgroundColor:r},{datum:t,itemId:s,title:a,color:r,seriesId:this.id,angleKey:this.properties.angleKey,angleName:this.properties.angleName,radiusKey:this.properties.radiusKey,radiusName:this.properties.radiusName,calloutLabelKey:this.properties.calloutLabelKey,calloutLabelName:this.properties.calloutLabelName,sectorLabelKey:this.properties.sectorLabelKey,sectorLabelName:this.properties.sectorLabelName,legendItemKey:this.properties.legendItemKey})}getLegendData(e){let{visible:t,processedData:i,dataModel:r}=this;if(!r||!i?.data.length||!this.properties.isValid()||"category"!==e)return[];let{angleKey:s,calloutLabelKey:a,sectorLabelKey:o,legendItemKey:n}=this.properties;if(!n&&(!a||a===s)&&(!o||o===s))return[];let{calloutLabelIdx:l,sectorLabelIdx:h,legendItemIdx:d}=this.getProcessedDataIndexes(r),c=this.properties.title?.showInLegend&&this.properties.title.text,u=[];for(let e=0;e<i.data.length;e++){let{datum:r,values:p}=i.data[e],g=[];c&&g.push(c);let m=this.getLabels(r,2*Math.PI,2*Math.PI,!1,null!=l?p[l]:void 0,null!=h?p[h]:void 0,null!=d?p[d]:void 0);if(n&&void 0!==m.legendItem?g.push(m.legendItem.text):a&&a!==s&&m.calloutLabel?.text!==void 0?g.push(m.calloutLabel?.text):o&&o!==s&&m.sectorLabel?.text!==void 0&&g.push(m.sectorLabel?.text),0===g.length)continue;let f=this.getSectorFormat(r,e,!1);u.push({legendType:"category",id:this.id,itemId:e,seriesId:this.id,enabled:t&&this.seriesItemEnabled[e],label:{text:g.join(" - ")},symbols:[{marker:{fill:f.fill,stroke:f.stroke,fillOpacity:this.properties.fillOpacity,strokeOpacity:this.properties.strokeOpacity,strokeWidth:this.properties.strokeWidth}}],legendItemName:null!=n?r[n]:void 0})}return u}onLegendItemClick(e){let{enabled:t,itemId:i,series:r,legendItemName:s}=e;r.id===this.id?this.toggleSeriesItem(i,t):null!=s&&this.toggleOtherSeriesItems(s,t)}toggleSeriesItem(e,t){this.seriesItemEnabled[e]=t,this.nodeData[e]&&(this.nodeData[e].enabled=t),this.nodeDataRefresh=!0}toggleOtherSeriesItems(e,t){if(!this.properties.legendItemKey||!this.dataModel)return;let i=this.dataModel.resolveProcessedDataIndexById(this,"legendItemValue");this.processedData?.data.forEach(({values:r},s)=>{r[i]===e&&this.toggleSeriesItem(s,t)})}animateEmptyUpdateReady(e){let{animationManager:t}=this.ctx,i=EC(!0,this.properties.rotation,this.radiusScale,this.previousRadiusScale);p2(this.id,"nodes",t,[this.itemSelection,this.highlightSelection,this.phantomSelection],i.nodes,(e,t)=>this.getDatumId(t)),p2(this.id,"innerCircle",t,[this.innerCircleSelection],i.innerCircle),xg(this,"callout",t,this.calloutLabelSelection),xg(this,"sector",t,this.labelSelection),xg(this,"highlight",t,this.highlightLabelSelection),xg(this,"inner",t,this.innerLabelsSelection),this.previousRadiusScale.range=this.radiusScale.range}animateWaitingUpdateReady(){let{itemSelection:e,highlightSelection:t,phantomSelection:i,processedData:r,radiusScale:s,previousRadiusScale:a}=this,{animationManager:o}=this.ctx,n=r?.reduced?.diff;this.ctx.animationManager.stopByAnimationGroupId(this.id);let l=(n?.moved.size??0)===0,h=(r?.defs.keys.length??0)>0,d=r?.reduced?.animationValidation?.uniqueKeys??!0;l&&h&&d||this.ctx.animationManager.skipCurrentBatch();let c=EC(!1,this.properties.rotation,s,a);p2(this.id,"nodes",o,[e,t,i],c.nodes,(e,t)=>this.getDatumId(t),n),p2(this.id,"innerCircle",o,[this.innerCircleSelection],c.innerCircle),xg(this,"callout",this.ctx.animationManager,this.calloutLabelSelection),xg(this,"sector",this.ctx.animationManager,this.labelSelection),xg(this,"highlight",this.ctx.animationManager,this.highlightLabelSelection),xg(this,"inner",this.ctx.animationManager,this.innerLabelsSelection),this.previousRadiusScale.range=this.radiusScale.range}animateClearingUpdateEmpty(){let{itemSelection:e,highlightSelection:t,phantomSelection:i,radiusScale:r,previousRadiusScale:s}=this,{animationManager:a}=this.ctx,o=EC(!1,this.properties.rotation,r,s);p2(this.id,"nodes",a,[e,t,i],o.nodes,(e,t)=>this.getDatumId(t)),p2(this.id,"innerCircle",a,[this.innerCircleSelection],o.innerCircle),xm(this,"callout",this.ctx.animationManager,this.calloutLabelSelection),xm(this,"sector",this.ctx.animationManager,this.labelSelection),xm(this,"highlight",this.ctx.animationManager,this.highlightLabelSelection),xm(this,"inner",this.ctx.animationManager,this.innerLabelsSelection),this.previousRadiusScale.range=this.radiusScale.range}getDatumIdFromData(e){let{calloutLabelKey:t,sectorLabelKey:i,legendItemKey:r}=this.properties;if(this.processedData?.reduced?.animationValidation?.uniqueKeys){if(r)return e[r];if(t)return e[t];if(i)return e[i]}}getDatumId(e){let{index:t}=e,i=this.getDatumIdFromData(e.datum);return null!=i?String(i):`${t}`}onDataChange(){let{data:e,seriesItemEnabled:t}=this;this.seriesItemEnabled=e?.map((e,i)=>t[i]??!0)??[]}};EM.className="DonutSeries",EM.type="donut";var EE=({takeColors:e,colorsCount:t})=>{let{fills:i,strokes:r}=e(t);return{fills:i,strokes:r,calloutLine:{colors:r}}},ED={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["polar"],identifier:"donut",moduleFactory:e=>new EM(e),tooltipDefaults:{range:"exact"},themeTemplate:{series:{title:{enabled:!0,fontWeight:"normal",fontSize:14,fontFamily:b7,color:Si,spacing:5},calloutLabel:{enabled:!0,fontSize:12,fontFamily:b7,color:b9,offset:3,minAngle:0},sectorLabel:{enabled:!0,fontWeight:"normal",fontSize:12,fontFamily:b7,color:St,positionOffset:0,positionRatio:.5},calloutLine:{length:10,strokeWidth:2},fillOpacity:1,strokeOpacity:1,strokeWidth:0,lineDash:[0],lineDashOffset:0,rotation:0,sectorSpacing:1,shadow:{enabled:!1,color:Sn,xOffset:3,yOffset:3,blur:5},innerLabels:{fontSize:12,fontFamily:b7,color:b9,spacing:2}}},paletteFactory:EE},EI=class extends vn{constructor(){super(...arguments),this.showInLegend=!1}};c7([gp(gy)],EI.prototype,"showInLegend",2);var Ek=class extends vh{constructor(){super(...arguments),this.offset=3,this.minAngle=0,this.minSpacing=4,this.maxCollisionOffset=50,this.avoidCollisions=!0}};c7([gp(gM)],Ek.prototype,"offset",2),c7([gp(gD)],Ek.prototype,"minAngle",2),c7([gp(gM)],Ek.prototype,"minSpacing",2),c7([gp(gM)],Ek.prototype,"maxCollisionOffset",2),c7([gp(gy)],Ek.prototype,"avoidCollisions",2);var ET=class extends vh{constructor(){super(...arguments),this.positionOffset=0,this.positionRatio=.5}};c7([gp(gb)],ET.prototype,"positionOffset",2),c7([gp(gE)],ET.prototype,"positionRatio",2);var EA=class extends gd{constructor(){super(...arguments),this.length=10,this.strokeWidth=1}};c7([gp(gB,{optional:!0})],EA.prototype,"colors",2),c7([gp(gM)],EA.prototype,"length",2),c7([gp(gM)],EA.prototype,"strokeWidth",2);var ER=class extends w9{constructor(){super(...arguments),this.fills=Object.values(Ed),this.strokes=Object.values(Ec),this.fillOpacity=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.cornerRadius=0,this.rotation=0,this.outerRadiusOffset=0,this.outerRadiusRatio=1,this.strokeWidth=1,this.sectorSpacing=0,this.title=new EI,this.shadow=new xy,this.calloutLabel=new Ek,this.sectorLabel=new ET,this.calloutLine=new EA,this.tooltip=new xS}};c7([gp(gw)],ER.prototype,"angleKey",2),c7([gp(gw,{optional:!0})],ER.prototype,"angleName",2),c7([gp(gw,{optional:!0})],ER.prototype,"angleFilterKey",2),c7([gp(gw,{optional:!0})],ER.prototype,"radiusKey",2),c7([gp(gw,{optional:!0})],ER.prototype,"radiusName",2),c7([gp(gM,{optional:!0})],ER.prototype,"radiusMin",2),c7([gp(gM,{optional:!0})],ER.prototype,"radiusMax",2),c7([gp(gw,{optional:!0})],ER.prototype,"calloutLabelKey",2),c7([gp(gw,{optional:!0})],ER.prototype,"calloutLabelName",2),c7([gp(gw,{optional:!0})],ER.prototype,"sectorLabelKey",2),c7([gp(gw,{optional:!0})],ER.prototype,"sectorLabelName",2),c7([gp(gw,{optional:!0})],ER.prototype,"legendItemKey",2),c7([gp(gB)],ER.prototype,"fills",2),c7([gp(gB)],ER.prototype,"strokes",2),c7([gp(gE)],ER.prototype,"fillOpacity",2),c7([gp(gE)],ER.prototype,"strokeOpacity",2),c7([gp(g$)],ER.prototype,"lineDash",2),c7([gp(gM)],ER.prototype,"lineDashOffset",2),c7([gp(gM)],ER.prototype,"cornerRadius",2),c7([gp(gC,{optional:!0})],ER.prototype,"itemStyler",2),c7([gp(gD)],ER.prototype,"rotation",2),c7([gp(gb)],ER.prototype,"outerRadiusOffset",2),c7([gp(gE)],ER.prototype,"outerRadiusRatio",2),c7([gp(gM)],ER.prototype,"strokeWidth",2),c7([gp(gb)],ER.prototype,"sectorSpacing",2),c7([gp(gf)],ER.prototype,"title",2),c7([gp(gf)],ER.prototype,"shadow",2),c7([gp(gf)],ER.prototype,"calloutLabel",2),c7([gp(gf)],ER.prototype,"sectorLabel",2),c7([gp(gf)],ER.prototype,"calloutLine",2),c7([gp(gf)],ER.prototype,"tooltip",2);var EL=class extends wy{constructor(e,t,i,r){super(e,t,i,r),this.angleKey=r.properties.angleKey,this.radiusKey=r.properties.radiusKey,this.calloutLabelKey=r.properties.calloutLabelKey,this.sectorLabelKey=r.properties.sectorLabelKey}},EP=class extends ES{constructor(e){super({moduleCtx:e,pickModes:[3,0],useLabelLayer:!0,animationResetFns:{item:Ew,label:xf}}),this.properties=new ER,this.phantomNodeData=void 0,this.previousRadiusScale=new bd,this.radiusScale=new bd,this.phantomGroup=this.contentGroup.appendChild(new mQ),this.phantomSelection=fl.select(this.phantomGroup,()=>this.nodeFactory(),!1),this.calloutLabelGroup=this.contentGroup.appendChild(new mQ({name:"pieCalloutLabels"})),this.calloutLabelSelection=new fl(this.calloutLabelGroup,mQ),this.backgroundGroup=this.rootGroup.appendChild(new m1({name:`${this.id}-background`,layer:!0,zIndex:0})),this.zerosumRingsGroup=this.backgroundGroup.appendChild(new mQ({name:`${this.id}-zerosumRings`})),this.zerosumOuterRing=this.zerosumRingsGroup.appendChild(new wU),this.seriesItemEnabled=[],this.surroundingRadius=void 0,this.NodeEvent=EL,this.angleScale=new bd,this.angleScale.domain=[0,1],this.angleScale.range=[-Math.PI,Math.PI].map(e=>e+Math.PI/2),this.phantomGroup.opacity=.2,this.phantomGroup.zIndexSubOrder=[()=>this._declarationOrder,0]}get calloutNodeData(){return this.phantomNodeData??this.nodeData}addChartEventListeners(){this.destroyFns.push(this.ctx.chartEventManager?.addListener("legend-item-click",e=>this.onLegendItemClick(e)))}get visible(){return super.visible&&(0===this.seriesItemEnabled.length||this.seriesItemEnabled.some(e=>e))}nodeFactory(){let e=new Eh;return e.miterLimit=1e9,e}getSeriesDomain(e){return"x"===e?this.angleScale.domain:this.radiusScale.domain}async processData(e){if(null==this.data||!this.properties.isValid())return;let{data:t}=this,{visible:i,seriesItemEnabled:r}=this,{angleKey:s,angleFilterKey:a,radiusKey:o,calloutLabelKey:n,sectorLabelKey:l,legendItemKey:h}=this.properties,d=!this.ctx.animationManager.isSkipped(),c=[],u=[];h?c.push(S2(h,"band",{id:"legendItemKey"})):n?c.push(S2(n,"band",{id:"calloutLabelKey"})):l&&c.push(S2(l,"band",{id:"sectorLabelKey"}));let p=this.radiusScale.type,g=this.radiusScale.type;for(let m of(o&&u.push(S4(o,{id:"radiusValue",min:this.properties.radiusMin??0,max:this.properties.radiusMax}),S3(o,p,{id:"radiusRaw"}),xa("radiusValue",[0,1],1,this.properties.radiusMin??0,this.properties.radiusMax)),n&&u.push(S3(n,"band",{id:"calloutLabelValue"})),l&&u.push(S3(l,"band",{id:"sectorLabelValue"})),h&&u.push(S3(h,"band",{id:"legendItemValue"})),a&&u.push(S6(a,g,{id:"angleFilterValue",onlyPositive:!0}),S3(a,g,{id:"angleFilterRaw"}),xa("angleFilterValue",[0,1],0,0)),d&&this.processedData?.reduced?.animationValidation?.uniqueKeys&&c.length>0&&u.push(xu(this.processedData)),u.push(xo()),t=t.map((e,t)=>i&&r[t]?e:{...e,[s]:0}),await this.requestDataModel(e,t,{props:[...c,S6(s,g,{id:"angleValue",onlyPositive:!0}),S3(s,g,{id:"angleRaw"}),xa("angleValue",[0,1],0,0),...u]}),this.processedData?.defs?.values??[])){let{id:e,missing:t,property:i}=m,r=Cq(this,t);"angleRaw"!==e&&r>0&&ul.warnOnce(`no value was found for the key '${String(i)}' on ${r} data element${r>1?"s":""}`)}this.animationState.transition("updateData")}async maybeRefreshNodeData(){if(!this.nodeDataRefresh)return;let{nodeData:e=[],phantomNodeData:t}=await this.createNodeData()??{};this.nodeData=e,this.phantomNodeData=t,this.nodeDataRefresh=!1}getProcessedDataIndexes(e){let t=e.resolveProcessedDataIndexById(this,"angleValue"),i=e.resolveProcessedDataIndexById(this,"angleRaw"),r=null!=this.properties.angleFilterKey?e.resolveProcessedDataIndexById(this,"angleFilterValue"):void 0,s=null!=this.properties.angleFilterKey?e.resolveProcessedDataIndexById(this,"angleFilterRaw"):void 0,a=this.properties.radiusKey?e.resolveProcessedDataIndexById(this,"radiusValue"):void 0,o=this.properties.radiusKey?e.resolveProcessedDataIndexById(this,"radiusRaw"):void 0;return{angleIdx:t,angleRawIdx:i,angleFilterIdx:r,angleFilterRawIdx:s,radiusIdx:a,radiusRawIdx:o,calloutLabelIdx:this.properties.calloutLabelKey?e.resolveProcessedDataIndexById(this,"calloutLabelValue"):void 0,sectorLabelIdx:this.properties.sectorLabelKey?e.resolveProcessedDataIndexById(this,"sectorLabelValue"):void 0,legendItemIdx:this.properties.legendItemKey?e.resolveProcessedDataIndexById(this,"legendItemValue"):void 0}}async createNodeData(){let{id:e,processedData:t,dataModel:i,angleScale:r}=this,{rotation:s}=this.properties;if(!t||!i||"ungrouped"!==t.type)return;let{angleIdx:a,angleRawIdx:o,angleFilterIdx:n,angleFilterRawIdx:l,radiusIdx:h,radiusRawIdx:d,calloutLabelIdx:c,sectorLabelIdx:u,legendItemIdx:p}=this.getProcessedDataIndexes(i),g=null!=l&&t.data.some(({values:e})=>e[l]>e[o]),m=0,f=0,v=[],y=null!=l?[]:void 0;return t.data.forEach((e,t)=>{let{datum:i,values:C}=e,w=g?C[n]:C[a],b=null==l||g?1:Math.sqrt(C[l]/C[o]),S=r.convert(m)+fg(s);m=w,f+=w;let x=r.convert(m)+fg(s),M=Math.abs(x-S),E=S+M/2,D=C[o],I=(null!=h?C[h]??1:1)*b,k=null!=d?C[d]:void 0,T=null!=p?C[p]:void 0,A=this.getLabels(i,E,M,!0,null!=c?C[c]:void 0,null!=u?C[u]:void 0,T),R=this.getSectorFormat(i,t,!1),L={itemId:t,series:this,datum:i,index:t,angleValue:D,midAngle:E,midCos:Math.cos(E),midSin:Math.sin(E),startAngle:S,endAngle:x,radius:I,innerRadius:Math.max(this.radiusScale.convert(0),0),outerRadius:Math.max(this.radiusScale.convert(I),0),sectorFormat:R,radiusValue:k,legendItemValue:T,enabled:this.seriesItemEnabled[t],...A};v.push(L),null!=y&&y.push({...L,radius:1,innerRadius:Math.max(this.radiusScale.convert(0),0),outerRadius:Math.max(this.radiusScale.convert(1),0)})}),this.zerosumOuterRing.visible=0===f,{itemId:e,nodeData:v,labelData:v,phantomNodeData:y}}getLabels(e,t,i,r,s,a,o){let{calloutLabel:n,sectorLabel:l,legendItemKey:h}=this.properties,d=!r||n.enabled?this.properties.calloutLabelKey:void 0,c=!r||l.enabled?this.properties.sectorLabelKey:void 0;if(!d&&!c&&!h)return{};let u={datum:e,angleKey:this.properties.angleKey,angleName:this.properties.angleName,radiusKey:this.properties.radiusKey,radiusName:this.properties.radiusName,calloutLabelKey:this.properties.calloutLabelKey,calloutLabelName:this.properties.calloutLabelName,sectorLabelKey:this.properties.sectorLabelKey,sectorLabelName:this.properties.sectorLabelName,legendItemKey:this.properties.legendItemKey},p={};return d&&i>fg(n.minAngle)&&(p.calloutLabel={...this.getTextAlignment(t),text:this.getLabelText(n,{...u,value:s}),hidden:!1,collisionTextAlign:void 0,collisionOffsetY:0,box:void 0}),c&&(p.sectorLabel={text:this.getLabelText(l,{...u,value:a})}),null!=h&&null!=o&&(p.legendItem={key:h,text:o}),p}getTextAlignment(e){let t=[{textAlign:"center",textBaseline:"bottom"},{textAlign:"left",textBaseline:"middle"},{textAlign:"center",textBaseline:"hanging"},{textAlign:"right",textBaseline:"middle"}],i=uJ(Math.floor((fu(e)- -.75*Math.PI)/(Math.PI/2)),t.length);return t[i]}getSectorFormat(e,t,i){let r;let{callbackCache:s}=this.ctx,{angleKey:a,radiusKey:o,calloutLabelKey:n,sectorLabelKey:l,legendItemKey:h,fills:d,strokes:c,itemStyler:u}=this.properties,p=c[t%c.length],{fill:g,fillOpacity:m,stroke:f,strokeWidth:v,strokeOpacity:y,lineDash:C,lineDashOffset:w,cornerRadius:b}=pP(i&&this.properties.highlightStyle.item,{fill:d.length>0?d[t%d.length]:void 0,stroke:p,strokeWidth:this.getStrokeWidth(this.properties.strokeWidth),strokeOpacity:this.getOpacity()},this.properties);return u&&(r=s.call(u,{datum:e,angleKey:a,radiusKey:o,calloutLabelKey:n,sectorLabelKey:l,legendItemKey:h,fill:g,strokeOpacity:y,stroke:f,strokeWidth:v,fillOpacity:m,lineDash:C,lineDashOffset:w,cornerRadius:b,highlighted:i,seriesId:this.id})),{fill:r?.fill??g,fillOpacity:r?.fillOpacity??m,stroke:r?.stroke??f,strokeWidth:r?.strokeWidth??v,strokeOpacity:r?.strokeOpacity??y,lineDash:r?.lineDash??C,lineDashOffset:r?.lineDashOffset??w,cornerRadius:r?.cornerRadius??b}}getOuterRadius(){return Math.max(this.radius*this.properties.outerRadiusRatio+this.properties.outerRadiusOffset,0)}updateRadiusScale(e){let t=[0,this.getOuterRadius()];this.radiusScale.range=t,e&&(this.previousRadiusScale.range=t);let i=e=>({...e,innerRadius:Math.max(this.radiusScale.convert(0),0),outerRadius:Math.max(this.radiusScale.convert(e.radius),0)});this.nodeData=this.nodeData.map(i),this.phantomNodeData=this.phantomNodeData?.map(i)}getTitleTranslationY(){let e=Math.max(0,this.radiusScale.range[1]);if(0===e)return NaN;let t=this.properties.title?.spacing??0,i=Math.max(0,-e);return-e-(2+t)-i}async update({seriesRect:e}){let{title:t}=this.properties,i={seriesRectWidth:e?.width,seriesRectHeight:e?.height},r=null!=f$(this.nodeDataDependencies,i);if(r&&(this._nodeDataDependencies=i),await this.maybeRefreshNodeData(),this.updateTitleNodes(),this.updateRadiusScale(r),this.contentGroup.translationX=this.centerX,this.contentGroup.translationY=this.centerY,this.highlightGroup.translationX=this.centerX,this.highlightGroup.translationY=this.centerY,this.backgroundGroup.translationX=this.centerX,this.backgroundGroup.translationY=this.centerY,this.labelGroup&&(this.labelGroup.translationX=this.centerX,this.labelGroup.translationY=this.centerY),t){let e=this.getTitleTranslationY(),i=t.node.getBBox();t.node.visible=t.enabled&&isFinite(e)&&!this.bboxIntersectsSurroundingSeries(i,0,e),t.node.y=isFinite(e)?e:0}this.zerosumOuterRing.fillOpacity=0,this.zerosumOuterRing.stroke=this.properties.calloutLabel.color,this.zerosumOuterRing.strokeWidth=1,this.zerosumOuterRing.strokeOpacity=1,this.updateNodeMidPoint(),await this.updateSelections(),await this.updateNodes(e)}updateTitleNodes(){let{oldTitle:e}=this,{title:t}=this.properties;e!==t&&(e&&this.labelGroup?.removeChild(e.node),t&&(t.node.textBaseline="bottom",this.labelGroup?.appendChild(t.node)),this.oldTitle=t)}updateNodeMidPoint(){let e=e=>{let t=e.innerRadius+(e.outerRadius-e.innerRadius)/2;e.midPoint={x:e.midCos*Math.max(0,t),y:e.midSin*Math.max(0,t)}};this.nodeData.forEach(e),this.phantomNodeData?.forEach(e)}async updateSelections(){await this.updateGroupSelection()}async updateGroupSelection(){let{itemSelection:e,highlightSelection:t,phantomSelection:i,highlightLabelSelection:r,calloutLabelSelection:s,labelSelection:a}=this,o=this.nodeData.map(e=>({...e,sectorFormat:{...e.sectorFormat}})),n=(e,t)=>{e.update(t,void 0,e=>this.getDatumId(e)),this.ctx.animationManager.isSkipped()&&e.cleanup()};n(e,this.nodeData),n(t,o),n(i,this.phantomNodeData??[]),s.update(this.calloutNodeData,e=>{let t=new fL;t.tag=0,t.pointerEvents=1,e.appendChild(t);let i=new fz;i.tag=1,i.pointerEvents=1,e.appendChild(i)}),a.update(this.nodeData),r.update(o)}async updateNodes(e){let t=this.ctx.highlightManager.getActiveHighlight(),i=this.visible&&this.seriesItemEnabled.indexOf(!0)>=0;this.rootGroup.visible=i,this.backgroundGroup.visible=i,this.contentGroup.visible=i,this.highlightGroup.visible=i&&t?.series===this,this.highlightLabel.visible=i&&t?.series===this,this.labelGroup&&(this.labelGroup.visible=i),this.contentGroup.opacity=this.getOpacity();let r=this.ctx.animationManager.isSkipped(),s=(e,t,i,s)=>{let a=this.getSectorFormat(t.datum,t.itemId,s);t.sectorFormat.fill=a.fill,t.sectorFormat.stroke=a.stroke,r&&(e.startAngle=t.startAngle,e.endAngle=t.endAngle,e.innerRadius=t.innerRadius,e.outerRadius=t.outerRadius),(s||r)&&(e.fill=a.fill,e.stroke=a.stroke),e.strokeWidth=a.strokeWidth,e.fillOpacity=a.fillOpacity,e.strokeOpacity=a.strokeOpacity,e.lineDash=a.lineDash,e.lineDashOffset=a.lineDashOffset,e.cornerRadius=a.cornerRadius,e.fillShadow=this.properties.shadow;let o=Math.max((this.properties.sectorSpacing+(null!=a.stroke?a.strokeWidth:0))/2,0);e.inset=o,e.lineJoin=this.properties.sectorSpacing>=0||o>0?"miter":"round"};this.itemSelection.each((e,t,i)=>s(e,t,i,!1)),this.highlightSelection.each((e,i,r)=>{s(e,i,r,!0),i.itemId===t?.itemId?(e.visible=!0,s(e,i,r,!0)):e.visible=!1}),this.phantomSelection.each((e,t,i)=>s(e,t,i,!1)),this.updateCalloutLineNodes(),this.updateCalloutLabelNodes(e),this.updateSectorLabelNodes(),this.updateZerosumRings(),this.animationState.transition("update")}updateCalloutLineNodes(){let{calloutLine:e}=this.properties,t=e.length,i=e.strokeWidth,r=e.colors??this.properties.strokes,{offset:s}=this.properties.calloutLabel;this.calloutLabelSelection.selectByTag(0).forEach((e,a)=>{let o=e.datum,{calloutLabel:n,outerRadius:l}=o;if(n?.text&&!n.hidden&&0!==l){e.visible=!0,e.strokeWidth=i,e.stroke=r[a%r.length],e.fill=void 0;let h=o.midCos*l,d=o.midSin*l,c=o.midCos*(l+t),u=o.midSin*(l+t);if((n.collisionTextAlign??0!==n.collisionOffsetY)&&null!=n.box){let e=n.box,t=c,i=u;c<e.x?t=e.x:c>e.x+e.width&&(t=e.x+e.width),u<e.y?i=e.y:u>e.y+e.height&&(i=e.y+e.height);let r=t-c,a=i-u,o=Math.sqrt(Math.pow(r,2)+Math.pow(a,2)),l=o-s;l>0&&(c+=r*l/o,u+=a*l/o)}e.x1=h,e.y1=d,e.x2=c,e.y2=u}else e.visible=!1})}getLabelOverflow(e,t,i){let r=i.x-this.centerX,s=i.x+i.width-this.centerX,a=i.y-this.centerY,o=i.y+i.height-this.centerY,n=1;t.x+1<r?n=(t.x+t.width-r)/t.width:t.x+t.width-1>s&&(n=(s-t.x)/t.width);let l=t.y+1<a||t.y+t.height-1>o;return{textLength:1===n?e.length:Math.floor(e.length*n)-1,hasVerticalOverflow:l,hasSurroundingSeriesOverflow:this.bboxIntersectsSurroundingSeries(t)}}bboxIntersectsSurroundingSeries(e,t=0,i=0){let{surroundingRadius:r}=this;if(null==r)return!1;let s=[{x:e.x+t,y:e.y+i},{x:e.x+e.width+t,y:e.y+i},{x:e.x+e.width+t,y:e.y+e.height+i},{x:e.x+t,y:e.y+e.height+i}],a=r**2;return s.some(e=>e.x**2+e.y**2>a)}computeCalloutLabelCollisionOffsets(){let{radiusScale:e}=this,{calloutLabel:t,calloutLine:i}=this.properties,{offset:r,minSpacing:s}=t,a=e.convert(0),o=e=>!e.calloutLabel||0===e.outerRadius,n=this.calloutNodeData,l=n.filter(e=>!o(e));if(l.forEach(e=>{let t=e.calloutLabel;null!=t&&(t.hidden=!1,t.collisionTextAlign=void 0,t.collisionOffsetY=0)}),l.length<=1)return;let h=l.filter(e=>e.midCos<0).sort((e,t)=>e.midSin-t.midSin),d=l.filter(e=>e.midCos>=0).sort((e,t)=>e.midSin-t.midSin),c=l.filter(e=>e.midSin<0&&e.calloutLabel?.textAlign==="center").sort((e,t)=>e.midCos-t.midCos),u=l.filter(e=>e.midSin>=0&&e.calloutLabel?.textAlign==="center").sort((e,t)=>e.midCos-t.midCos),p=e=>{let t=e.calloutLabel;if(null==t)return u3.zero.clone();let s=e.outerRadius+i.length+r,a=e.midCos*s,o=e.midSin*s+t.collisionOffsetY,n=t.collisionTextAlign??t.textAlign,l=t.textBaseline;return fz.computeBBox(t.text,a,o,{font:this.properties.calloutLabel,textAlign:n,textBaseline:l})},g=(e,t,i)=>{let r=p(e).grow(s/2),a=p(t).grow(s/2);if(r.x<a.x+a.width&&r.x+r.width>a.x&&("to-top"===i?r.y<a.y+a.height:r.y+r.height>a.y)){let e="to-top"===i?r.y-a.y-a.height:r.y+r.height-a.y;t.calloutLabel.collisionOffsetY=e}},m=e=>{let t=e.slice().sort((e,t)=>Math.abs(e.midSin)-Math.abs(t.midSin))[0],i=e.indexOf(t);for(let t=i-1;t>=0;t--)g(e[t+1],e[t],"to-top");for(let t=i+1;t<e.length;t++)g(e[t-1],e[t],"to-bottom")},f=e=>{let t=l.some(e=>0!==e.calloutLabel.collisionOffsetY),i=e.map(e=>p(e)),r=i.map(e=>e.clone().grow(s/2)),o=!1;for(let t=0;t<r.length&&!o;t++){let i=r[t];for(let s=t+1;s<e.length;s++){let e=r[s];if(i.collidesBBox(e)){o=!0;break}}}let h=n.map(e=>{let{startAngle:t,endAngle:i,outerRadius:r}=e;return{startAngle:t,endAngle:i,innerRadius:a,outerRadius:r}}),d=i.some(e=>h.some(t=>Ei(e,t)));(o||t||d)&&e.filter(e=>"center"===e.calloutLabel.textAlign).forEach(e=>{let t=e.calloutLabel;e.midCos<0?t.collisionTextAlign="right":e.midCos>0?t.collisionTextAlign="left":t.collisionTextAlign="center"})};m(h),m(d),f(c),f(u)}updateCalloutLabelNodes(e){let{radiusScale:t}=this,{calloutLabel:i,calloutLine:r}=this.properties,s=r.length,{offset:a,color:o}=i,n=new fz;this.calloutLabelSelection.selectByTag(1).forEach(r=>{let{datum:l}=r,h=l.calloutLabel,d=Math.max(0,t.convert(l.radius));if(!h?.text||0===d||h.hidden){r.visible=!1;return}let c=d+s+a,u=l.midCos*c,p=l.midSin*c+h.collisionOffsetY,g={textAlign:h.collisionTextAlign??h.textAlign,textBaseline:h.textBaseline};n.text=h.text,n.x=u,n.y=p,n.setFont(this.properties.calloutLabel),n.setAlign(g);let m=n.getBBox(),f=h.text,v=!0;if(i.avoidCollisions){let{textLength:t,hasVerticalOverflow:i}=this.getLabelOverflow(h.text,m,e);f=h.text.length===t?h.text:`${h.text.substring(0,t)}\u2026`,v=!i}r.text=f,r.x=u,r.y=p,r.setFont(this.properties.calloutLabel),r.setAlign(g),r.fill=o,r.visible=v})}async computeLabelsBBox(e,t){let i;let{calloutLabel:r,calloutLine:s}=this.properties,a=s.length,{offset:o,maxCollisionOffset:n,minSpacing:l}=r;if(!r.avoidCollisions)return null;await this.maybeRefreshNodeData(),this.updateRadiusScale(!1),this.computeCalloutLabelCollisionOffsets();let h=[],d=new fz,{title:c}=this.properties;if(c?.text&&c.enabled){let e=this.getTitleTranslationY();isFinite(e)&&(d.text=c.text,d.x=0,d.y=e,d.setFont(c),d.setAlign({textBaseline:"bottom",textAlign:"center"}),i=d.getBBox(),h.push(i))}return(this.calloutNodeData.forEach(r=>{let s=r.calloutLabel;if(!s||0===r.outerRadius)return null;let c=r.outerRadius+a+o,u=r.midCos*c,p=r.midSin*c+s.collisionOffsetY;d.text=s.text,d.x=u,d.y=p,d.setFont(this.properties.calloutLabel),d.setAlign({textAlign:s.collisionTextAlign??s.textAlign,textBaseline:s.textBaseline});let g=d.getBBox();if(s.box=g,Math.abs(s.collisionOffsetY)>n){s.hidden=!0;return}if(i){let e=t.y-this.centerY,r=new u3(i.x-l,e,i.width+2*l,i.y+i.height+l-e);if(g.collidesBBox(r)){s.hidden=!0;return}}if(e.hideWhenNecessary){let{textLength:e,hasVerticalOverflow:i,hasSurroundingSeriesOverflow:r}=this.getLabelOverflow(s.text,g,t),a=s.text.length>2&&e<2;if(i||a||r){s.hidden=!0;return}}s.hidden=!1,h.push(g)}),0===h.length)?null:u3.merge(h)}updateSectorLabelNodes(){let{radiusScale:e}=this,t=e.convert(0),{fontSize:i,fontStyle:r,fontWeight:s,fontFamily:a,positionOffset:o,positionRatio:n,color:l}=this.properties.sectorLabel,h=t>0,d=1===this.seriesItemEnabled.filter(Boolean).length,c=(e,c)=>{let{sectorLabel:u,outerRadius:p,startAngle:g,endAngle:m}=c,f=!1;if(u&&0!==p){let v=t*(1-n)+p*n+o;e.fill=l,e.fontStyle=r,e.fontWeight=s,e.fontSize=i,e.fontFamily=a,e.text=u.text,!h&&d?(e.x=0,e.y=0):(e.x=c.midCos*v,e.y=c.midSin*v),e.textAlign="center",e.textBaseline="middle";let y=e.getBBox(),C=[[y.x,y.y],[y.x+y.width,y.y],[y.x+y.width,y.y+y.height],[y.x,y.y+y.height]],w={startAngle:g,endAngle:m,innerRadius:t,outerRadius:p};C.every(([e,t])=>Ee(e,t,w))&&(f=!0)}e.visible=f};this.labelSelection.each(c),this.highlightLabelSelection.each(c)}updateZerosumRings(){this.zerosumOuterRing.size=2*this.getOuterRadius()}getDatumLegendName(e){let{angleKey:t,calloutLabelKey:i,sectorLabelKey:r,legendItemKey:s}=this.properties,{sectorLabel:a,calloutLabel:o,legendItem:n}=e;return s&&void 0!==n?n.text:i&&i!==t&&o?.text!==void 0?o.text:r&&r!==t&&a?.text!==void 0?a.text:void 0}pickNodeClosestDatum(e){return Eb(this,e)}getTooltipHtml(e){if(!this.properties.isValid())return vr;let{datum:t,angleValue:i,sectorFormat:{fill:r},itemId:s}=e,a=S_(this.properties.title?.text),o=pD(i)?uQ(i):String(i),n=this.getDatumLegendName(e);return this.properties.tooltip.toTooltipHtml({title:a??n,content:a&&n?`${n}: ${o}`:o,backgroundColor:r},{datum:t,itemId:s,title:a,color:r,seriesId:this.id,angleKey:this.properties.angleKey,angleName:this.properties.angleName,radiusKey:this.properties.radiusKey,radiusName:this.properties.radiusName,calloutLabelKey:this.properties.calloutLabelKey,calloutLabelName:this.properties.calloutLabelName,sectorLabelKey:this.properties.sectorLabelKey,sectorLabelName:this.properties.sectorLabelName,legendItemKey:this.properties.legendItemKey})}getLegendData(e){let{visible:t,processedData:i,dataModel:r}=this;if(!r||!i?.data.length||"category"!==e)return[];let{angleKey:s,calloutLabelKey:a,sectorLabelKey:o,legendItemKey:n}=this.properties;if(!n&&(!a||a===s)&&(!o||o===s))return[];let{calloutLabelIdx:l,sectorLabelIdx:h,legendItemIdx:d}=this.getProcessedDataIndexes(r),c=this.properties.title?.showInLegend&&this.properties.title.text,u=[];for(let e=0;e<i.data.length;e++){let{datum:r,values:p}=i.data[e],g=[];c&&g.push(c);let m=this.getLabels(r,2*Math.PI,2*Math.PI,!1,null!=l?p[l]:void 0,null!=h?p[h]:void 0,null!=d?p[d]:void 0);if(n&&void 0!==m.legendItem?g.push(m.legendItem.text):a&&a!==s&&m.calloutLabel?.text!==void 0?g.push(m.calloutLabel?.text):o&&o!==s&&m.sectorLabel?.text!==void 0&&g.push(m.sectorLabel?.text),0===g.length)continue;let f=this.getSectorFormat(r,e,!1);u.push({legendType:"category",id:this.id,itemId:e,seriesId:this.id,enabled:t&&this.seriesItemEnabled[e],label:{text:g.join(" - ")},symbols:[{marker:{fill:f.fill,stroke:f.stroke,fillOpacity:this.properties.fillOpacity,strokeOpacity:this.properties.strokeOpacity,strokeWidth:this.properties.strokeWidth}}],legendItemName:null!=n?r[n]:void 0})}return u}onLegendItemClick(e){let{enabled:t,itemId:i,series:r,legendItemName:s}=e;r.id===this.id?this.toggleSeriesItem(i,t):null!=s&&this.toggleOtherSeriesItems(s,t)}toggleSeriesItem(e,t){this.seriesItemEnabled[e]=t,this.nodeData[e]&&(this.nodeData[e].enabled=t),this.nodeDataRefresh=!0}toggleOtherSeriesItems(e,t){if(!this.properties.legendItemKey||!this.dataModel)return;let i=this.dataModel.resolveProcessedDataIndexById(this,"legendItemValue");this.processedData?.data.forEach(({values:r},s)=>{r[i]===e&&this.toggleSeriesItem(s,t)})}animateEmptyUpdateReady(e){let{animationManager:t}=this.ctx,i=EC(!0,this.properties.rotation,this.radiusScale,this.previousRadiusScale);p2(this.id,"nodes",t,[this.itemSelection,this.highlightSelection,this.phantomSelection],i.nodes,(e,t)=>this.getDatumId(t)),xg(this,"callout",t,this.calloutLabelSelection),xg(this,"sector",t,this.labelSelection),xg(this,"highlight",t,this.highlightLabelSelection),this.previousRadiusScale.range=this.radiusScale.range}animateWaitingUpdateReady(){let{itemSelection:e,highlightSelection:t,phantomSelection:i,processedData:r,radiusScale:s,previousRadiusScale:a}=this,{animationManager:o}=this.ctx,n=r?.reduced?.diff;this.ctx.animationManager.stopByAnimationGroupId(this.id);let l=(n?.moved.size??0)===0,h=(r?.defs.keys.length??0)>0,d=r?.reduced?.animationValidation?.uniqueKeys??!0;l&&h&&d||this.ctx.animationManager.skipCurrentBatch();let c=EC(!1,this.properties.rotation,s,a);p2(this.id,"nodes",o,[e,t,i],c.nodes,(e,t)=>this.getDatumId(t),n),xg(this,"callout",this.ctx.animationManager,this.calloutLabelSelection),xg(this,"sector",this.ctx.animationManager,this.labelSelection),xg(this,"highlight",this.ctx.animationManager,this.highlightLabelSelection),this.previousRadiusScale.range=this.radiusScale.range}animateClearingUpdateEmpty(){let{itemSelection:e,highlightSelection:t,phantomSelection:i,radiusScale:r,previousRadiusScale:s}=this,{animationManager:a}=this.ctx,o=EC(!1,this.properties.rotation,r,s);p2(this.id,"nodes",a,[e,t,i],o.nodes,(e,t)=>this.getDatumId(t)),xm(this,"callout",this.ctx.animationManager,this.calloutLabelSelection),xm(this,"sector",this.ctx.animationManager,this.labelSelection),xm(this,"highlight",this.ctx.animationManager,this.highlightLabelSelection),this.previousRadiusScale.range=this.radiusScale.range}getDatumIdFromData(e){let{calloutLabelKey:t,sectorLabelKey:i,legendItemKey:r}=this.properties;if(this.processedData?.reduced?.animationValidation?.uniqueKeys){if(r)return e[r];if(t)return e[t];if(i)return e[i]}}getDatumId(e){let{index:t}=e,i=this.getDatumIdFromData(e.datum);return null!=i?String(i):`${t}`}onDataChange(){let{data:e,seriesItemEnabled:t}=this;this.seriesItemEnabled=e?.map((e,i)=>t[i]??!0)??[]}};EP.className="PieSeries",EP.type="pie";var EF={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["polar"],identifier:"pie",moduleFactory:e=>new EP(e),tooltipDefaults:{range:"exact"},themeTemplate:{series:{title:{enabled:!0,fontWeight:"normal",fontSize:14,fontFamily:b7,color:Si,spacing:5},calloutLabel:{enabled:!0,fontSize:12,fontFamily:b7,color:b9,offset:3,minAngle:0},sectorLabel:{enabled:!0,fontWeight:"normal",fontSize:12,fontFamily:b7,color:St,positionOffset:0,positionRatio:.5},calloutLine:{length:10,strokeWidth:2},fillOpacity:1,strokeOpacity:1,strokeWidth:0,lineDash:[0],lineDashOffset:0,rotation:0,sectorSpacing:1,shadow:{enabled:!1,color:Sn,xOffset:3,yOffset:3,blur:5}}},paletteFactory:EE},EN={add:function(e,t){return"number"==typeof t?{x:e.x+t,y:e.y+t}:{x:e.x+t.x,y:e.y+t.y}},angle:function(e,t=EG()){return Math.atan2(e.y,e.x)-Math.atan2(t.y,t.x)},apply:function(e,t){return e.x=t.x,e.y=t.y,e},equal:function(e,t){return e.x===t.x&&e.y===t.y},distance:function(e,t){let i=EO(e,t);return Math.sqrt(i.x*i.x+i.y*i.y)},distanceSquared:function(e,t){let i=EO(e,t);return i.x*i.x+i.y*i.y},from:function(e,t){if("number"==typeof e)return{x:e,y:t};if("regionOffsetX"in e)return{x:e.regionOffsetX,y:e.regionOffsetY};if("offsetWidth"in e)return{x:e.offsetWidth,y:e.offsetHeight};if("width"in e)return{x:e.width,y:e.height};if("x1"in e)return[{x:e.x1,y:e.y1},{x:e.x2,y:e.y2}];throw Error(`Values can not be converted into a vector: [${e}] [${t}]`)},gradient:function(e,t,i){let r=t.x-e.x;return(null==i?t.y-e.y:i-t.y-(i-e.y))/r},intercept:function(e,t,i){return(null==i?e.y:i-e.y)-t*e.x},intersectAtX:function(e,t,i=0,r){let s=e===1/0?1/0:e*i+t;return{x:i,y:null==r?s:r-s}},intersectAtY:function(e,t,i=0,r){return{x:e===1/0?1/0:(i-t)/e,y:null==r?i:r-i}},length:EB,lengthSquared:function(e){return e.x*e.x+e.y*e.y},multiply:function(e,t){return"number"==typeof t?{x:e.x*t,y:e.y*t}:{x:e.x*t.x,y:e.y*t.y}},normalized:function(e){let t=EB(e);return{x:e.x/t,y:e.y/t}},origin:EG,required:function(e){return{x:e?.x??0,y:e?.y??0}},rotate:function(e,t,i=EG()){let r=EB(e);return{x:i.x+r*Math.cos(t),y:i.y+r*Math.sin(t)}},sub:EO};function EO(e,t){return"number"==typeof t?{x:e.x-t,y:e.y-t}:{x:e.x-t.x,y:e.y-t.y}}function EB(e){return Math.sqrt(e.x*e.x+e.y*e.y)}function EG(){return{x:0,y:0}}var Ez=class extends gd{constructor(e,t){super(),this.onChange=e,this.onButtonsChange=t,this.align="start",this.position="top",this.size="normal",this.buttonOverrides=new Map}buttonConfigurations(){let e=[...this.buttons??[]];return this.draggable&&e.unshift({icon:"drag-handle",tooltip:"toolbarAnnotationsDragHandle",value:"drag",id:"drag"}),e?.map(e=>{let t=e.id??e.value,i=this.buttonOverrides.get(t);return null!=i?{...e,...i}:e})??[]}buttonsChanged(e){this.onButtonsChange(this.buttonConfigurations(),e)}overrideButtonConfiguration(e,t){let i=this.buttonOverrides.get(e);for(let r in null==i&&(i=Object.create(null),this.buttonOverrides.set(e,i)),t){let e=t[r];null==e?delete i[r]:i[r]=e}this.buttonsChanged(!0)}};c7([f3(e=>{e.onChange(e.enabled)}),gp(gy)],Ez.prototype,"enabled",2),c7([f3(e=>{e.onChange(e.enabled)}),gp(g4([...CL]),{optional:!0})],Ez.prototype,"align",2),c7([f3(e=>{e.onChange(e.enabled)}),gp(g4(CO),{optional:!0})],Ez.prototype,"position",2),c7([gp(gy)],Ez.prototype,"draggable",2),c7([f3(e=>{e.onChange(e.enabled)}),gp(g4(["small","normal"]),{optional:!0})],Ez.prototype,"size",2),c7([f3(e=>{for(let t of e.buttons??[])null!=t.icon&&ut.includes(t.icon)&&ul.warnOnce(`Icon '${t.icon}' is deprecated, use another icon instead.`),"toolbarAnnotationsColor"===t.ariaLabel&&ul.warnOnce(`Aria label '${t.ariaLabel}' is deprecated, use 'toolbarAnnotationsLineColor' instead.`);e.buttonsChanged(!1)}),gp(gk,{optional:!0})],Ez.prototype,"buttons",2);var E_="ag-charts-toolbar",EV={align:"ag-charts-toolbar__align",section:"ag-charts-toolbar__section",button:"ag-charts-toolbar__button",icon:"ag-charts-toolbar__icon",label:"ag-charts-toolbar__label"},Ej={top:"ag-charts-toolbar--top",right:"ag-charts-toolbar--right",bottom:"ag-charts-toolbar--bottom",left:"ag-charts-toolbar--left",floating:"ag-charts-toolbar--floating","floating-top":"ag-charts-toolbar--floating-top","floating-bottom":"ag-charts-toolbar--floating-bottom",small:"ag-charts-toolbar--small",normal:"ag-charts-toolbar--normal",hidden:"ag-charts-toolbar--hidden",preventFlash:"ag-charts-toolbar--prevent-flash",floatingHidden:"ag-charts-toolbar--floating-hidden",align:{start:"ag-charts-toolbar__align--start",center:"ag-charts-toolbar__align--center",end:"ag-charts-toolbar__align--end"},button:{first:"ag-charts-toolbar__button--first",last:"ag-charts-toolbar__button--last",active:"ag-charts-toolbar__button--active",hiddenValue:"ag-charts-toolbar__button--hidden-value",hiddenToggled:"ag-charts-toolbar__button--hidden-toggled",fillVisible:"ag-charts-toolbar__button--fill-visible",strokeWidthVisible:"ag-charts-toolbar__button--stroke-width-visible",withTransition:"ag-charts-toolbar__button--with-transition",dragHandle:"ag-charts-toolbar__button--drag-handle",dragging:"ag-charts-toolbar__button--dragging"}},EH=class extends yi{constructor(e){for(let t of(super(),this.ctx=e,this.enabled=!0,this.seriesType=new Ez(this.onGroupChanged.bind(this,"seriesType"),this.onGroupButtonsChanged.bind(this,"seriesType")),this.annotations=new Ez(this.onGroupChanged.bind(this,"annotations"),this.onGroupButtonsChanged.bind(this,"annotations")),this.annotationOptions=new Ez(this.onGroupChanged.bind(this,"annotationOptions"),this.onGroupButtonsChanged.bind(this,"annotationOptions")),this.ranges=new Ez(this.onGroupChanged.bind(this,"ranges"),this.onGroupButtonsChanged.bind(this,"ranges")),this.zoom=new Ez(this.onGroupChanged.bind(this,"zoom"),this.onGroupButtonsChanged.bind(this,"zoom")),this.dragState={client:{x:0,y:0},position:{x:0,y:0},detached:!1},this.horizontalSpacing=10,this.verticalSpacing=10,this.floatingDetectionRange=38,this.positions={top:new Set,left:new Set,right:new Set,bottom:new Set,floating:new Set,"floating-top":new Set,"floating-bottom":new Set},this.positionAlignments={top:{},left:{},right:{},bottom:{},floating:{},"floating-top":{},"floating-bottom":{}},this.groupCallers={seriesType:new Set,annotations:new Set,annotationOptions:new Set,ranges:new Set,zoom:new Set},this.groupButtons={seriesType:[],annotations:[],annotationOptions:[],ranges:[],zoom:[]},this.ariaToolbars=[{groups:["seriesType","annotations"],destroyFns:[],resetListeners:()=>{}},{groups:["annotationOptions"],destroyFns:[],resetListeners:()=>{}},{groups:["ranges"],destroyFns:[],resetListeners:()=>{}},{groups:["zoom"],destroyFns:[],resetListeners:()=>{}}],this.pendingButtonToggledEvents=[],this.groupProxied=new Map,this.hasNewLocale=!0,this.elements={},CO))this.elements[t]=e.domManager.addChild("canvas-overlay",`toolbar-${t}`),this.elements[t].role="presentation",this.renderToolbar(t);this.toggleVisibilities(),this.destroyFns.push(e.interactionManager.addListener("hover",this.onHover.bind(this),31),e.interactionManager.addListener("leave",this.onLeave.bind(this),31),e.toolbarManager.addListener("button-toggled",this.onButtonToggled.bind(this)),e.toolbarManager.addListener("button-updated",this.onButtonUpdated.bind(this)),e.toolbarManager.addListener("group-toggled",this.onGroupToggled.bind(this)),e.toolbarManager.addListener("group-updated",this.onGroupUpdated.bind(this)),e.toolbarManager.addListener("floating-anchor-changed",this.onFloatingAnchorChanged.bind(this)),e.toolbarManager.addListener("proxy-group-options",this.onProxyGroupOptions.bind(this)),e.layoutManager.registerElement(2,this.onLayoutStart.bind(this)),e.layoutManager.addListener("layout:complete",this.onLayoutComplete.bind(this)),e.updateService.addListener("pre-dom-update",this.onPreDomUpdate.bind(this)),e.updateService.addListener("update-complete",this.onUpdateComplete.bind(this)),e.localeManager.addListener("locale-changed",()=>{this.hasNewLocale=!0}),()=>this.destroyElements())}destroyElements(){for(let e of(this.ctx.domManager.removeStyles(E_),Object.keys(this.elements)))this.ctx.domManager.removeChild("canvas-overlay",`toolbar-${e}`)}onHover(e){let{enabled:t,elements:i,floatingDetectionRange:r,ctx:{scene:s}}=this,{offsetY:a,sourceEvent:{target:o}}=e,{FloatingBottom:n,FloatingTop:l}=CN;if(!t)return;let h=i[n],d=i[l],c=a>h.offsetTop-r&&a<s.canvas.element.offsetHeight||o===h,u=d.offsetTop+d.offsetHeight+r;this.translateFloatingElements(n,c),this.translateFloatingElements(l,a>0&&a<u||o===d)}onLeave(e){let{enabled:t,ctx:{scene:i}}=this,{relatedElement:r,targetElement:s}=e,{FloatingBottom:a,FloatingTop:o}=CN;t&&s===i.canvas.element&&(CP.some(e=>this.groupButtons[e].some(e=>e===r))||(this.translateFloatingElements(a,!1),this.translateFloatingElements(o,!1)))}onGroupChanged(e){null==this[e]||this.groupProxied.has(e)||(this.createGroup(e),this.toggleVisibilities())}onGroupButtonsChanged(e,t,i){if(!(!this.enabled||this.groupProxied.has(e))){if(i)for(let t of this[e].buttonConfigurations())this.refreshButtonContent(e,t);else this.createGroupButtons(e,t);this.toggleVisibilities()}}onLayoutComplete(e){for(let e of CO)this.elements[e].classList.remove(Ej.preventFlash);this.enabled&&this.refreshInnerLayout(e.series.rect)}toggleButtonsClass(e,t){for(let i of Object.values(this.groupButtons).flat())i.classList.toggle(e,t)}onPreDomUpdate(){this.toggleButtonsClass(Ej.button.withTransition,!1)}onUpdateComplete(){this.toggleButtonsClass(Ej.button.withTransition,!0)}onButtonUpdated(e){let{type:t,group:i,id:r,...s}=e;this[i].overrideButtonConfiguration(r,{...s})}setButtonActive(e,t){e.classList.toggle(Ej.button.active,t)}setButtonChecked(e,t){"switch"===e.role&&(e.ariaChecked=t.toString())}setButtonGroupFirstLast(e){let t=Array.from(e.childNodes??[]),i=(e,t,i)=>{let r=!t.classList.contains(Ej.button.hiddenToggled);return t.classList.toggle(i,r&&e),!r&&e};t.reduce((e,t)=>i(e,t,Ej.button.first),!0),t.reduceRight((e,t)=>i(e,t,Ej.button.last),!0)}onButtonToggled(e){let{group:t,id:i,active:r,enabled:s,visible:a,checked:o}=e;if(0===this.groupButtons[t].length){this.pendingButtonToggledEvents.push(e);return}let n=this.groupButtons[t].find(e=>e.dataset.toolbarId===`${i}`);null!=n&&(n.ariaDisabled=`${!s}`,n.classList.toggle(Ej.button.hiddenToggled,!a),this.setButtonActive(n,r),this.setButtonChecked(n,o),this.setButtonGroupFirstLast(n.parentNode))}onGroupToggled(e){let{caller:t,group:i,active:r,visible:s}=e;this.toggleGroup(t,i,r,s),this.toggleVisibilities()}onGroupUpdated(e){let{group:t}=e;for(let e of this.ariaToolbars)if(e.groups.includes(t)){e.resetListeners();return}}onFloatingAnchorChanged(e){let{elements:t,positions:i,horizontalSpacing:r,verticalSpacing:s}=this,{group:a,anchor:o}=e,n=t.floating;if(this.dragState.detached||n.classList.contains(Ej.hidden)||(this.dragState.detached=!1,!i.floating.has(a)))return;let l=o.position??"above",{offsetWidth:h,offsetHeight:d}=n,c=o.y-d-s,u=o.x-h/2;"below"===l?c=o.y+s:"right"===l?(c=o.y-d/2,u=o.x+r):"above-left"===l&&(u=o.x);let p=new u3(u,c,h,d);this.positionGroup(n,a,p)}positionGroup(e,t,i){let{ctx:{domManager:r}}=this,s=r.getBoundingClientRect();i.x=uW(0,i.x,s.width-i.width),i.y=uW(0,i.y,s.height-i.height);let a=`${Math.floor(i.x)}px`,o=`${Math.floor(i.y)}px`;(e.style.getPropertyValue("left")!==a||e.style.getPropertyValue("top")!==o)&&(e.style.setProperty("left",a),e.style.setProperty("top",o),this.onGroupMoved(t,i))}onGroupMoved(e,t){let{groupButtons:i,ctx:{toolbarManager:r}}=this;for(let s of i[e]){if(s.classList.contains(Ej.button.hiddenToggled))continue;let i=s.offsetParent;r.buttonMoved(e,s.dataset.toolbarId,new u3(s.offsetLeft+(i?.offsetLeft??0),s.offsetTop+(i?.offsetTop??0),s.offsetWidth,s.offsetHeight),t)}}buttonRect(e,t=this.ctx.domManager.getBoundingClientRect()){let i=e.getBoundingClientRect();return new u3(i.left-t.left,i.top-t.top,i.width,i.height)}onProxyGroupOptions(e){if(!this.enabled)return;let{caller:t,group:i,options:r}=e;this.groupProxied.set(i,r),this[i].set(r),this.toggleGroup(t,i,void 0,r.enabled),this.createGroup(i,r.enabled,r.position),r.enabled&&this.createGroupButtons(i,r.buttons)}createGroup(e,t,i){for(let r of(t??(t=this[e].enabled),i??(i=this[e].position),CO))t&&i===r?this.positions[r].add(e):this.positions[r].delete(e)}createGroupButtons(e,t=[]){let i,r;for(let t of this.groupButtons[e])t.remove();if(this.groupButtons[e]=[],0===t.length)return;let{align:s,position:a}=this[e],o=this.positionAlignments[a][s];if(!o)return;let n=t=>{let i=Array.from(o.children),r="data-group",s="data-section",a=i.find(i=>i.getAttribute(r)===e&&i.getAttribute(s)===(t??""));if(!a){(a=m5("div")).role="presentation",a.setAttribute(r,e),a.setAttribute(s,t??"");let n=CF[e],l=i.find(e=>CF[e.getAttribute(r)]>n);null!=l?o.insertBefore(a,l):o.appendChild(a),this.destroyFns.push(()=>a.remove())}return a.classList.add(EV.section,Ej[this[e].size]),a},l=t.at(0)?.section,h=n(l);for(let i of t){l!==i.section&&(this.setButtonGroupFirstLast(h),h=n(i.section)),l=i.section;let t=this.createButtonElement(e,i);h.appendChild(t),this.groupButtons[e].push(t)}this.setButtonGroupFirstLast(h),CB(a)&&(i=()=>this.translateFloatingElements(a,!0),r=()=>this.translateFloatingElements(a,!1)),this.createAriaToolbar(e,o,i,r,()=>{this.ctx.toolbarManager.cancel(e)})}createAriaToolbar(e,t,i,r,s){let a=this.computeAriaOrientation(this[e].position),o=this.getAriaToolbar(e);o.resetListeners=()=>{let e=o.groups.map(e=>this.groupButtons[e]).flat().filter(e=>!e.classList.contains(Ej.button.hiddenToggled)&&!e.classList.contains(Ej.button.dragHandle));o.destroyFns.forEach(e=>e()),o.destroyFns=bI({orientation:a,toolbar:t,buttons:e,onEscape:s,onFocus:i,onBlur:r})},o.resetListeners(),this.updateToolbarAriaLabel(e,t)}computeAriaOrientation(e){return({top:"horizontal",right:"vertical",bottom:"horizontal",left:"vertical",floating:"horizontal","floating-top":"horizontal","floating-bottom":"horizontal"})[e]}toggleGroup(e,t,i,r){if(!0===r?this.groupCallers[t].add(e):!1===r&&this.groupCallers[t].delete(e),null!=i)for(let e of this.groupButtons[t])this.setButtonActive(e,i)}processPendingEvents(){for(let e of(this.pendingButtonToggledEvents??[]).slice())this.onButtonToggled(e);this.pendingButtonToggledEvents=[]}onLayoutStart(e){this.enabled&&(this.refreshOuterLayout(e.layoutBox),this.refreshLocale())}refreshOuterLayout(e){let{elements:t,horizontalSpacing:i,verticalSpacing:r}=this;t.top.classList.contains(Ej.hidden)||e.shrink(t.top.offsetHeight+r,"top"),t.right.classList.contains(Ej.hidden)||e.shrink(t.right.offsetWidth+i,"right"),t.bottom.classList.contains(Ej.hidden)||(e.shrink(t.bottom.offsetHeight+r,"bottom"),t.bottom.style.top=`${e.y+e.height+r}px`),t.left.classList.contains(Ej.hidden)||e.shrink(t.left.offsetWidth+i,"left")}refreshLocale(){let{hasNewLocale:e}=this;if(e){for(let e of CP){for(let t of this[e].buttonConfigurations())this.refreshButtonContent(e,t);this.updateToolbarAriaLabel(e)}this.hasNewLocale=!1}}refreshInnerLayout(e){let{elements:t,verticalSpacing:i}=this,{FloatingBottom:r,FloatingTop:s}=CN;t.top.style.top=`${e.y-t.top.offsetHeight-i}px`,t.top.style.left=`${e.x}px`,t.top.style.width=`${e.width}px`,t.bottom.style.left=`${e.x}px`,t.bottom.style.width=`${e.width}px`,t.right.style.top=`${e.y}px`,t.right.style.right="0px",t.right.style.height=`${e.height}px`,t.left.style.top=`${e.y}px`,t.left.style.left="0px",t.left.style.height=`${e.height}px`,t[s].style.top=`${e.y}px`,t[r].style.top=`${e.y+e.height-t[r].offsetHeight}px`}refreshButtonContent(e,t){let i=this.buttonId(t),r=this.groupProxied.get(e)?.buttons?.find(e=>this.buttonId(e)===i)??t,s=this.groupButtons[e].find(e=>e.getAttribute("data-toolbar-id")===i);null!=s&&this.updateButton(s,r)}toggleVisibilities(){if(null==this.elements)return;let e=e=>this[e].enabled&&this.groupCallers[e].size>0,t=e=>t=>{let i=this.buttonId(t);return null==i||i===e.dataset.toolbarId};for(let t of CO){let i=this.enabled&&Array.from(this.positions[t].values()).some(e);"floating"!==t||i||(this.dragState.detached=!1),this.elements[t].classList.toggle(Ej.hidden,!i)}for(let i of CP){if(null==this[i])continue;let r=e(i);for(let e of this.groupButtons[i]){let s=r&&this[i].buttonConfigurations().some(t(e));e.classList.toggle(Ej.button.hiddenValue,!s)}}}translateFloatingElements(e,t){let{elements:i,verticalSpacing:r,positionAlignments:s}=this,a=i[e],o=Object.values(s[e]);a.classList.toggle(Ej.floatingHidden,!t);let n="floating-bottom"===e?1:-1;for(let e of o)e.style.transform=t&&""!==e.style.transform?"translateY(0)":`translateY(${(a.offsetHeight+r)*n}px)`}renderToolbar(e="top"){let t=this.elements[e];for(let i of(t.classList.add(E_,Ej[e],Ej.preventFlash),CB(e)&&t.classList.add(Ej.floatingHidden),CL)){let r=m5("div");r.role="presentation",r.classList.add(EV.align,Ej.align[i]),r.dataset.pointerCapture="exclusive",t.appendChild(r),this.positionAlignments[e][i]=r}}createButtonElement(e,t){let i=m5("button");return i.classList.add(EV.button),i.dataset.toolbarGroup=e,f7(i,"tabindex",-1),t.haspopup&&f9(i,{"aria-haspopup":!0,"aria-expanded":!1}),i.dataset.toolbarId=this.buttonId(t),i.addEventListener("click",bR(i,r=>this.onButtonPress(r,i,e,t.id,t.value))),"drag"===t.value&&(i.addEventListener("mousedown",bR(i,t=>this.onDragStart(t,i,e))),i.classList.add(Ej.button.dragHandle)),"switch"===t.role&&f9(i,{role:t.role,"aria-checked":!1}),this.updateButton(i,t),this.destroyFns.push(()=>i.remove()),i}getAriaToolbar(e){for(let t of this.ariaToolbars)if(t.groups.includes(e))return t;throw Error(`AG Charts - cannot find aria-toolbar of '${e}'`)}updateToolbarAriaLabel(e,t){if(!t){let{align:i,position:r}=this[e];if(!(t=this.positionAlignments[r][i]))return}t.ariaLabel=this.ctx.localeManager.t({seriesType:"ariaLabelFinancialCharts",annotations:"ariaLabelFinancialCharts",annotationOptions:"ariaLabelAnnotationOptionsToolbar",ranges:"ariaLabelRangesToolbar",zoom:"ariaLabelZoomToolbar"}[e])}expandButtonConfig(e,t){return"switch"!==t.role||"true"!==e.ariaChecked||void 0===t.checkedOverrides?t:{icon:t.checkedOverrides.icon??t.icon,label:t.checkedOverrides.label??t.label,ariaLabel:t.checkedOverrides.ariaLabel??t.ariaLabel,tooltip:t.checkedOverrides.tooltip??t.tooltip}}updateButton(e,t){let{domManager:i,localeManager:r}=this.ctx,{icon:s,label:a,ariaLabel:o,tooltip:n}=this.expandButtonConfig(e,t);n&&(e.title=r.t(n));let l="";if(null!=s&&(l=`<span class="${i.getIconClassNames(s)} ${EV.icon}"></span>`),null!=a){let e=r.t(a);l=`${l}<span class="${EV.label}">${e}</span>`}e.innerHTML=l,e.classList.toggle(Ej.button.fillVisible,null!=t.fill),e.style.setProperty("--fill",t.fill??null);let h=null!=t.strokeWidth;e.classList.toggle(Ej.button.strokeWidthVisible,h),e.style.setProperty("--strokeWidth",h?`${t.strokeWidth}px`:null),f7(e,"aria-label",o?this.ctx.localeManager.t(o):void 0)}onButtonPress(e,t,i,r,s){this.ctx.toolbarManager.pressButton(i,this.buttonId({id:r,value:s}),s,this.buttonRect(t),e)}onDragStart(e,t,i){let r=this.elements.floating;e.preventDefault(),e.stopPropagation(),this.dragState={client:EN.from(e.clientX,e.clientY),position:EN.from(Number(r.style.getPropertyValue("left").replace("px","")),Number(r.style.getPropertyValue("top").replace("px",""))),detached:!0},t.classList.toggle(Ej.button.dragging,!0);let s=e=>this.onDrag(e,i),a=m6();a.addEventListener("mousemove",s),a.addEventListener("mouseup",()=>{t.classList.toggle(Ej.button.dragging,!1),a.removeEventListener("mousemove",s)},{once:!0}),this.ctx.toolbarManager.groupMoved(i)}onDrag(e,t){let{elements:i,dragState:r}=this,s=i.floating,{offsetWidth:a,offsetHeight:o}=s,n=EN.sub(EN.from(e.clientX,e.clientY),r.client),l=EN.add(r.position,n),h=new u3(l.x,l.y,a,o);this.positionGroup(s,t,h)}buttonId(e){let{id:t,value:i,label:r}=e;return null!=t?t:null!=i&&"object"!=typeof i?String(i):r??""}};c7([f3(e=>{e.processPendingEvents(),e.toggleVisibilities()}),gp(gy)],EH.prototype,"enabled",2);var EU={type:"root",optionsKey:"toolbar",packageType:"community",chartTypes:["cartesian"],moduleFactory:e=>new EH(e),themeTemplate:{toolbar:{enabled:!0,seriesType:{enabled:!1,position:"left",align:"start",buttons:[{tooltip:"toolbarSeriesTypeDropdown",value:"type",haspopup:!0}]},annotations:{enabled:!0,position:"left",align:"start",buttons:[{icon:"trend-line-drawing",tooltip:"toolbarAnnotationsLineAnnotations",value:"line-menu",section:"line-annotations",haspopup:!0},{icon:"text-annotation",tooltip:"toolbarAnnotationsTextAnnotations",value:"text-menu",section:"text-annotations",haspopup:!0},{icon:"arrow-drawing",tooltip:"toolbarAnnotationsShapeAnnotations",value:"shape-menu",section:"shape-annotations",haspopup:!0},{icon:"delete",tooltip:"toolbarAnnotationsClearAll",value:"clear",section:"tools"}]},annotationOptions:{enabled:!0,position:"floating",align:"start",draggable:!0,buttons:[{icon:"text-annotation",tooltip:"toolbarAnnotationsTextColor",value:"text-color",haspopup:!0},{icon:"line-color",tooltip:"toolbarAnnotationsLineColor",value:"line-color",haspopup:!0},{icon:"fill-color",tooltip:"toolbarAnnotationsFillColor",value:"fill-color",haspopup:!0},{tooltip:"toolbarAnnotationsTextSize",value:"text-size",haspopup:!0},{tooltip:"toolbarAnnotationsLineStrokeWidth",value:"line-stroke-width",haspopup:!0},{icon:"line-style-solid",tooltip:"toolbarAnnotationsLineStyle",value:"line-style-type",haspopup:!0},{icon:"settings",tooltip:"toolbarAnnotationsSettings",value:"settings",haspopup:!0},{role:"switch",icon:"unlocked",tooltip:"toolbarAnnotationsLock",ariaLabel:"toolbarAnnotationsLock",checkedOverrides:{icon:"locked",tooltip:"toolbarAnnotationsUnlock"},value:"lock"},{icon:"delete",tooltip:"toolbarAnnotationsDelete",value:"delete"}]},ranges:{enabled:!1,position:SO,align:"start",buttons:[{label:"toolbarRange1Month",ariaLabel:"toolbarRange1MonthAria",value:2592e6},{label:"toolbarRange3Months",ariaLabel:"toolbarRange3MonthsAria",value:7776e6},{label:"toolbarRange6Months",ariaLabel:"toolbarRange6MonthsAria",value:15552e6},{label:"toolbarRangeYearToDate",ariaLabel:"toolbarRangeYearToDateAria",value:(e,t)=>[new Date(`${new Date(t).getFullYear()}-01-01`).getTime(),t],id:"year-to-date"},{label:"toolbarRange1Year",ariaLabel:"toolbarRange1YearAria",value:31536e6},{label:"toolbarRangeAll",ariaLabel:"toolbarRangeAllAria",value:(e,t)=>[e,t],id:"all"}]},zoom:{enabled:!0,position:"top",align:"end",buttons:[{icon:"zoom-out",tooltip:"toolbarZoomZoomOut",value:"zoom-out"},{icon:"zoom-in",tooltip:"toolbarZoomZoomIn",value:"zoom-in"},{icon:"pan-left",tooltip:"toolbarZoomPanLeft",value:"pan-left"},{icon:"pan-right",tooltip:"toolbarZoomPanRight",value:"pan-right"},{icon:"pan-start",tooltip:"toolbarZoomPanStart",value:"pan-start"},{icon:"pan-end",tooltip:"toolbarZoomPanEnd",value:"pan-end"},{icon:"reset",tooltip:"toolbarZoomReset",value:"reset"}]}}}},EW=class extends wN{getChartType(){return"flow-proportion"}async updateData(){await super.updateData();let{nodes:e}=this.getOptions();this.series.forEach(t=>{("sankey"===t.type||"chord"===t.type)&&t.setChartNodes(e)})}performLayout(e){let{seriesRoot:t,annotationRoot:i,highlightRoot:r}=this,{layoutBox:s}=e,a=s.clone();for(let e of(s.shrink(this.seriesArea.padding.toJson()),this.seriesRect=s,this.animationRect=s,t.visible=this.series.some(e=>e.visible),[t,i,r]))e.translationX=Math.floor(s.x),e.translationY=Math.floor(s.y),e.setClipRectInGroupCoordinateSpace(a.clone());this.ctx.layoutManager.emitLayoutComplete(e,{series:{visible:t.visible,rect:a,paddedRect:s}})}};EW.className="FlowProportionChart",EW.type="flow-proportion";var E$=class extends v2{constructor(){super(...arguments),this.shape="polygon",this.innerRadiusRatio=0,this.defaultTickMinSpacing=20}computeLabelsBBox(e,t){return null}computeRange(){}getAxisLinePoints(){}};c7([gp(g4(["polygon","circle"],"a polar axis shape"))],E$.prototype,"shape",2),c7([gp(gE)],E$.prototype,"innerRadiusRatio",2);var EY=class extends wN{getChartType(){return"gauge"}updateRadialGauge(e,t){let i,r;let s=this.axes.find(e=>"x"===e.direction);if(!(s instanceof E$))return;s.computeRange();let a=e.x,o=a+e.width,n=e.y,l=n+e.height,[h,d]=s.range,c=fc(d-h)>Math.PI,u=c||fp(1.5*Math.PI,h,d),p=c||fp(0*Math.PI,h,d),g=c||fp(.5*Math.PI,h,d),m=c||fp(1*Math.PI,h,d);i=m&&!p?"right":!m&&p?"left":"center",r=u&&!g?"bottom":!u&&g?"top":"middle";let f=M9({startAngle:h,endAngle:d,innerRadius:0,outerRadius:.5}),v=-(2*(f.x+f.width/2)),y=-(2*(f.y+f.height/2)),{minimumRadius:C=0,maximumRadius:w}=t,b=Math.max(.5*Math.min(e.width/f.width,e.height/f.height),0),S=Math.min(w??1/0,Math.max(b,C??0));for(let t=0;t<8;t+=1){let i=S<=C||7===t,r=e.x+e.width/2+v*S,h=e.y+e.height/2+y*S;s.translation.x=r,s.translation.y=h,s.gridLength=S,s.calculateLayout();let d=s.computeLabelsBBox({hideWhenNecessary:i},e);if(i)break;let c=0;if(null!=d){let e=d.x+r,t=e+d.width,i=d.y+h,s=i+d.height;c=Math.max(n-i,a-e,s-l,t-o,0)}if(c>0)S=Math.max(S-c,C);else break}s.translation.x=e.x+e.width/2+v*S,s.translation.y=e.y+e.height/2+y*S,t.centerX=e.width/2+v*S,t.centerY=e.height/2+y*S,t.radius=S,t.textAlign=i,t.verticalAlign=r,(0===S||S>b)&&ul.warnOnce("There was insufficient space to display the Radial Gauge.")}updateLinearGauge(e,t){let i=this.axes.find(e=>"x"===e.direction),r=this.axes.find(e=>"y"===e.direction);if(!(i instanceof v6)||!(r instanceof v6))return e;let{horizontal:s,thickness:a}=t,o=Math.max(s?e.width:a,0),n=Math.max(s?a:e.height,0),l=e.x+(e.width-o)/2,h=e.y+(e.height-n)/2;i.range=[0,o],i.gridLength=o,i.calculateLayout(),i.translation.x=l,i.translation.y=h+("bottom"===i.position?a:0),r.range=[0,n],r.gridLength=n,r.calculateLayout(),r.translation.x=l+("right"===r.position?a:0),r.translation.y=h,t.originX=l-e.x,t.originY=h-e.y,(0===o||0===n)&&ul.warnOnce("There was insufficient space to display the Linear Gauge.")}performLayout(e){let{seriesRoot:t,annotationRoot:i,highlightRoot:r,series:s,seriesArea:a}=this,{layoutBox:o}=e,n=o.clone();o.shrink(a.padding.toJson());let l=this.series[0];for(let e of("radial-gauge"===l.type?this.updateRadialGauge(o,l):"linear-gauge"===l.type&&this.updateLinearGauge(o,l),this.axes.forEach(e=>e.update()),this.seriesRect=n.clone().translate(n.x-o.x,n.y-o.y),this.animationRect=o,t.visible=s.some(e=>e.visible),[t,i,r]))e.translationX=Math.floor(o.x),e.translationY=Math.floor(o.y);this.ctx.layoutManager.emitLayoutComplete(e,{series:{visible:t.visible,rect:n,paddedRect:o}})}getAriaLabel(){let e=[],t=this.getCaptionText();for(let i of(0!==t.length&&e.push(t),this.series))e.push(i.getCaptionText());let i=e.join(". ");return this.ctx.localeManager.t("ariaAnnounceGaugeChart",{caption:i})}};EY.className="GaugeChart",EY.type="gauge";var EK=class extends wN{constructor(e,t){super(e,t)}getChartType(){return"hierarchy"}performLayout(e){let{seriesRoot:t,annotationRoot:i,highlightRoot:r}=this,{layoutBox:s}=e,a=s.clone();for(let e of(s.shrink(this.seriesArea.padding.toJson()),this.seriesRect=s,this.animationRect=s,[t,i,r]))e.translationX=Math.floor(s.x),e.translationY=Math.floor(s.y);t.visible=this.series[0].visible,t.setClipRectInGroupCoordinateSpace(s.clone()),this.ctx.layoutManager.emitLayoutComplete(e,{series:{visible:!0,rect:a,paddedRect:s}})}getAriaLabel(){let e=this.getCaptionText();return this.ctx.localeManager.t("ariaAnnounceHierarchyChart",{caption:e})}};EK.className="HierarchyChart",EK.type="hierarchy";var EZ=class extends wN{constructor(e,t){super(e,t),this.padding=new yn(40),this.ctx.axisManager.axisGroup.zIndex=6}getChartType(){return"polar"}async performLayout(e){let{layoutBox:t}=e,i=t.clone();t.shrink(this.seriesArea.padding.toJson()),this.seriesRect=t,this.animationRect=t,await this.computeCircle(t),this.axes.forEach(e=>e.update()),this.ctx.layoutManager.emitLayoutComplete(e,{series:{visible:!0,rect:i,paddedRect:t}})}updateAxes(e,t,i){let r=this.axes.find(e=>"x"===e.direction),s=this.axes.find(e=>"y"===e.direction);if(!(r instanceof E$)||!(s instanceof E$))return;let a=r.scale,o=s.innerRadiusRatio;r.innerRadiusRatio=o,r.computeRange(),r.gridLength=i,s.gridAngles=a.ticks?.().map(e=>a.convert(e)),s.gridRange=r.range,s.range=[i,i*o],[r,s].forEach(i=>{i.translation.x=e,i.translation.y=t,i.calculateLayout()})}async computeCircle(e){let t=this.series.filter(Eq),i=this.axes.filter(EX),r=(e,i,r)=>{this.updateAxes(e,i,r),t.forEach(t=>{t.centerX=e,t.centerY=i,t.radius=r});let s=t.filter(e=>"donut"===e.type||"pie"===e.type);if(s.length>1){let e=s.map(e=>{let t=e.getInnerRadius();return{series:e,innerRadius:t}}).sort((e,t)=>e.innerRadius-t.innerRadius);e.at(-1).series.surroundingRadius=void 0;for(let t=0;t<e.length-1;t++)e[t].series.surroundingRadius=e[t+1].innerRadius}},s=e.x+e.width/2,a=e.y+e.height/2,o=Math.max(0,Math.min(e.width,e.height)/2),n=o;r(s,a,n);let l=async({hideWhenNecessary:l=!1}={})=>{let h=[];for(let r of uz(i,t)){let t=await r.computeLabelsBBox({hideWhenNecessary:l},e);t&&h.push(t)}if(0===h.length){r(s,a,o);return}let d=u3.merge(h),c=this.refineCircle(d,n,e);r(c.centerX,c.centerY,c.radius),n=c.radius};for(let r of(await l(),await l(),await l(),await l({hideWhenNecessary:!0}),await l({hideWhenNecessary:!0}),uz(i,t)))await r.computeLabelsBBox({hideWhenNecessary:!0},e);return{radius:n,centerX:s,centerY:a}}refineCircle(e,t,i){let r=Math.max(0,-t-e.x),s=Math.max(0,-t-e.y),a=Math.max(0,e.x+e.width-t),o=Math.max(0,e.y+e.height-t);r=a=Math.max(r,a),s=o=Math.max(s,o);let n=Math.min(i.width-r-a,i.height-s-o)/2,l=Math.min(.5*i.width/2,.5*i.height/2);if(n<l){let e=r+a,t=s+o;if(2*(n=l)+t>i.height){let e=i.height-2*n;2*Math.min(s,o)>e?(s=e/2,o=e/2):s>o?s=e-o:o=e-s}if(2*n+e>i.width){let e=i.width-2*n;2*Math.min(r,a)>e?(r=e/2,a=e/2):r>a?r=e-a:a=e-r}}let h=r+2*n+a,d=s+2*n+o;return{centerX:i.x+(i.width-h)/2+r+n,centerY:i.y+(i.height-d)/2+s+n,radius:n}}};function Eq(e){return e instanceof ES}function EX(e){return e instanceof E$}EZ.className="PolarChart",EZ.type="polar";var EQ=Math.PI/180,EJ=e=>e*EQ,E0=e=>-Math.log(Math.tan(.25*Math.PI+e*EQ*.5)),E1=e=>e/EQ,E2=e=>(Math.atan(Math.exp(-e))-.25*Math.PI)/(.5*EQ),E3=class e{constructor(t,i){this.domain=t,this.range=i,this.type="mercator",this.bounds=e.bounds(t)}static bounds(e){let[[t,i],[r,s]]=e,a=EJ(t),o=E0(i),n=EJ(r),l=E0(s);return new u3(Math.min(a,n),Math.min(o,l),Math.abs(n-a),Math.abs(l-o))}static fixedScale(){return new e([[E1(0),E2(0)],[E1(1),E2(1)]],[[0,0],[1,1]])}convert([e,t]){let[[i,r],[s,a]]=this.range,o=(s-i)/this.bounds.width,n=(a-r)/this.bounds.height;return[(EJ(e)-this.bounds.x)*o+i,(E0(t)-this.bounds.y)*n+r]}invert([e,t]){let[[i,r],[s,a]]=this.range,o=(s-i)/this.bounds.width,n=(a-r)/this.bounds.height;return[E1((e-i)/o+this.bounds.x),E2((t-r)/n+this.bounds.y)]}};function E4(e){return"map-shape"===e.type||"map-line"===e.type||"map-marker"===e.type||"map-shape-background"===e.type||"map-line-background"===e.type}var E6=class extends wN{constructor(e,t){super(e,t),this.xAxis=new bc(this.getModuleContext()),this.xAxis.position="bottom",this.yAxis=new bc(this.getModuleContext()),this.yAxis.position="left",this.ctx.zoomManager.updateAxes([this.xAxis,this.yAxis])}getChartType(){return"topology"}async updateData(){await super.updateData();let{topology:e}=this.getOptions();this.series.forEach(t=>{E4(t)&&t.setChartTopology(e)})}performLayout(e){let t;let{seriesRoot:i,annotationRoot:r,highlightRoot:s}=this,{layoutBox:a}=e,o=a.clone();a.shrink(this.seriesArea.padding.toJson()),this.seriesRect=a,this.animationRect=a;let n=this.series.filter(E4),l=n.reduce((e,t)=>{if(!t.visible)return e;let i=t.topologyBounds;return null==i?e:null==e?i:(e.merge(i),e)},void 0);if(null!=l){let{lon0:e,lat0:i,lon1:r,lat1:s}=l,o=[[e,i],[r,s]],n=E3.bounds(o),{width:h,height:d}=a,c=Math.min(h/n.width,d/n.height),u=n.width*c,p=n.height*c,g=(h-u)/2,m=(d-p)/2,f=this.ctx.zoomManager.getAxisZoom(this.xAxis.id),v=this.ctx.zoomManager.getAxisZoom(this.yAxis.id),y=(g+u-g)/(f.max-f.min),C=g-y*f.min,w=(m+p-m)/(1-v.min-(1-v.max)),b=m-w*(1-v.max);t=new E3(o,[[C,b],[C+y,b+w]])}n.forEach(e=>{e.scale=t});let h=this.series.some(e=>e.visible);for(let e of(i.visible=h,[i,r,s]))e.translationX=Math.floor(a.x),e.translationY=Math.floor(a.y),e.setClipRectInGroupCoordinateSpace(a.clone());this.ctx.layoutManager.emitLayoutComplete(e,{series:{visible:h,rect:o,paddedRect:a}})}};E6.className="TopologyChart",E6.type="topology";var E5={isEnterprise:!1},E8=Symbol("IGNORED_PROP");function E7(e,t){let i={};for(let r in t){let s=t[r];s!==E8&&Object.hasOwn(e,r)&&(i[r]=s)}return i}function E9(e,t){if(pb(e))return t(e)}var De=["ohlc","line","step-line","hlc","high-low","candlestick","hollow-candlestick"],Dt="range-area";function Di(e,t){return{fill:E9(t,t=>t.overrides?.[e]?.series?.fill),stroke:E9(t,t=>t.overrides?.[e]?.series?.stroke)}}var Dr={"price-volume":function(e,t){let{xKey:i,dateKey:r=i??"date",highKey:s="high",openKey:a="open",lowKey:o="low",closeKey:n="close",volumeKey:l="volume",chartType:h="candlestick",navigator:d=!1,volume:c=!0,rangeToolbar:u,rangeButtons:p=u??!0,statusBar:g=!0,annotations:m,toolbar:f=m??!0,zoom:v=!0,theme:y,data:C,...w}=e;null!=i&&ul.warnOnce("Property [xKey] is deprecated, use [dateKey] instead."),null!=u&&ul.warnOnce("Property [rangeToolbar] is deprecated, use [rangeButtons] instead."),null!=m&&ul.warnOnce("Property [annotations] is deprecated, use [toolbar] instead.");let b=function(e,t,i,r,s,a,o){t===Dt&&(ul.warnOnce(`type '${t}' is deprecated, use 'hlc' chart type instead`),t="hlc");let n={xKey:i,openKey:a,closeKey:o,highKey:r,lowKey:s},l={xKey:i,yKey:o},h={pickOutsideVisibleMinorAxis:!0};switch(t??"candlestick"){case"ohlc":return[{type:"ohlc",focusPriority:0,...h,...n}];case"line":return[{type:"line",focusPriority:0,...h,...l,stroke:E9(e,e=>e.overrides?.line?.series?.stroke)??Sf,marker:E9(e,e=>e.overrides?.line?.series?.marker)??{enabled:!1}}];case"step-line":return[{type:"line",focusPriority:0,...h,...l,stroke:E9(e,e=>e.overrides?.line?.series?.stroke)??Sf,interpolation:E9(e,e=>e.overrides?.line?.series?.interpolation)??{type:"step"},marker:E9(e,e=>e.overrides?.line?.series?.marker)??{enabled:!1}}];case"hlc":let d=Di(Dt,e);return[{type:Dt,focusPriority:0,...h,xKey:i,yHighKey:r,yLowKey:o,fill:d.fill??Sg,stroke:d.stroke??Su,fillOpacity:E9(e,e=>e.overrides?.["range-area"]?.series?.fillOpacity)??.3,strokeWidth:E9(e,e=>e.overrides?.["range-area"]?.series?.strokeWidth)??2},{type:Dt,focusPriority:0,...h,xKey:i,yHighKey:o,yLowKey:s,fill:d.fill??Sm,stroke:d.stroke??Sp,fillOpacity:E9(e,e=>e.overrides?.["range-area"]?.series?.fillOpacity)??.3,strokeWidth:E9(e,e=>e.overrides?.["range-area"]?.series?.strokeWidth)??2},{type:"line",...h,...l,stroke:E9(e,e=>e.overrides?.line?.series?.stroke)??Sx,strokeWidth:E9(e,e=>e.overrides?.line?.series?.strokeWidth)??2,marker:E9(e,e=>e.overrides?.line?.series?.marker)??{enabled:!1}}];case"high-low":let c=Di("range-bar",e);return[{type:"range-bar",focusPriority:0,...h,xKey:i,yHighKey:r,yLowKey:s,fill:c.fill??Sv,stroke:c.stroke??Sf,tooltip:{range:"nearest"}}];case"candlestick":return[{type:"candlestick",focusPriority:0,...h,...n}];case"hollow-candlestick":let u=E9(e,e=>e.overrides?.candlestick?.series?.item);return[{type:"candlestick",focusPriority:0,...h,...n,item:{up:{fill:u?.up?.fill??"transparent"}}}];default:return ul.warnOnce(`unknown chart type: ${t}; expected one of: ${De.join(", ")}`),[{type:"candlestick",focusPriority:0,...h,...n}]}}(y,h,r,s,o,a,n),S=function(e,t,i,r,s,a){if(!s)return[];let o=E9(e,e=>e.overrides?.bar?.series?.fill);return[{type:"bar",xKey:"date",yKey:a,focusPriority:1,tooltip:{enabled:!1},highlight:{enabled:!1},fillOpacity:E9(e,e=>e.overrides?.bar?.series?.fillOpacity)??.5,...o?{fill:o}:{itemStyler({datum:e}){let{up:s,down:a}=t().palette;return{fill:e[i]<e[r]?s?.fill:a?.fill}}}}]}(y,t,a,n,c,l),x=c?{miniChart:{enabled:d,series:[{type:"line",xKey:r,yKey:l,marker:{enabled:!1}}]}}:null,M={navigator:{enabled:d,...x}},E=g?{statusBar:{enabled:!0,data:C,highKey:s,openKey:a,lowKey:o,closeKey:n,volumeKey:c?l:void 0}}:null,D=c?[{type:"number",position:"left",keys:[l],label:{enabled:!1},crosshair:{enabled:!1},gridLine:{enabled:!1},nice:!1,layoutConstraints:{stacked:!1,width:20,unit:"percentage",align:"end"}}]:[];return{theme:{baseTheme:"string"==typeof y?y:"ag-financial",...pP("object"==typeof y?y:null,{overrides:{common:{title:{padding:4},padding:{top:6,right:8,bottom:5}}}})},animation:{enabled:!1},legend:{enabled:!1},series:[...S,...b],axes:[{type:"number",position:"right",keys:[a,n,s,o],interval:{maxSpacing:E9(y,e=>e.overrides?.common?.axes?.number?.interval?.maxSpacing)??45},label:{format:E9(y,e=>e.overrides?.common?.axes?.number?.label?.format)??".2f"},crosshair:{enabled:!0,snap:!1},layoutConstraints:{stacked:!1,width:100,unit:"percentage",align:"start"}},...D,{type:"ordinal-time",position:"bottom",line:{enabled:!1},label:{enabled:!0},crosshair:{enabled:!0}}],annotations:{enabled:f},tooltip:{enabled:!1},data:C,...M,...E,zoom:{enabled:v,enableIndependentAxes:!0},chartToolbar:{enabled:!0},toolbar:{seriesType:{enabled:f},annotationOptions:{enabled:f},annotations:{enabled:f},ranges:{enabled:p}},...w}},gauge:function(e){if("radial-gauge"===e.type)return function(e){let{animation:t,background:i,container:r,contextMenu:s,footnote:a,height:o,listeners:n,locale:l,minHeight:h,minWidth:d,padding:c,subtitle:u,theme:p,title:g,width:m,type:f,cursor:v,nodeClickRange:y,tooltip:C,value:w,scale:b={},startAngle:S,endAngle:x,highlightStyle:M,segmentation:E,bar:D,needle:I,targets:k,outerRadius:T,innerRadius:A,outerRadiusRatio:R,innerRadiusRatio:L,cornerRadius:P,cornerMode:F,label:N,secondaryLabel:O,spacing:B,...G}=e,{fills:z,fillMode:_,fill:V,fillOpacity:j,stroke:H,strokeWidth:U,strokeOpacity:W,lineDash:$,lineDashOffset:Y,min:K=0,max:Z=1,interval:q={},label:X={},...Q}=b,J=E7(e,{animation:t,background:i,container:r,contextMenu:s,footnote:a,height:o,listeners:n,locale:l,minHeight:h,minWidth:d,padding:c,subtitle:u,theme:p,title:g,width:m}),ee=E7(b,{fills:z,fillMode:_,fill:V,fillOpacity:j,stroke:H,strokeWidth:U,strokeOpacity:W,lineDash:$,lineDashOffset:Y}),et=E7(e,{startAngle:E8,endAngle:E8,needle:null!=I?{enabled:!0,...I}:E8,scale:ee,type:f,cursor:v,nodeClickRange:y,listeners:n,tooltip:C,value:w,highlightStyle:M,segmentation:E,bar:D,targets:k,outerRadius:T,innerRadius:A,outerRadiusRatio:R,innerRadiusRatio:L,cornerRadius:P,cornerMode:F,label:N,secondaryLabel:O,spacing:B,...G});return{...J,series:[et],axes:[{type:"angle-number",min:K??0,max:Z??1,startAngle:S??270,endAngle:x??450,interval:q??{},label:X??{},nice:!1,line:{enabled:!1}},{type:"radius-number"}]}}(e);if("linear-gauge"===e.type)return function(e){let t,i;let{animation:r,background:s,container:a,contextMenu:o,footnote:n,height:l,listeners:h,locale:d,minHeight:c,minWidth:u,padding:p,subtitle:g,theme:m,title:f,width:v,type:y,cursor:C,nodeClickRange:w,tooltip:b,value:S,scale:x={},direction:M="vertical",thickness:E,highlightStyle:D,segmentation:I,bar:k,targets:T,target:A,cornerRadius:R,cornerMode:L,...P}=e,{fills:F,fillMode:N,fill:O,fillOpacity:B,stroke:G,strokeWidth:z,strokeOpacity:_,lineDash:V,lineDashOffset:j,min:H=0,max:U=1,interval:W={},label:$={},...Y}=x,K=E7(e,{animation:r,background:s,container:a,contextMenu:o,footnote:n,height:l,listeners:h,locale:d,minHeight:c,minWidth:u,padding:p,subtitle:g,theme:m,title:f,width:v}),Z=E7(x,{fills:F,fillMode:N,fill:O,fillOpacity:B,stroke:G,strokeWidth:z,strokeOpacity:_,lineDash:V,lineDashOffset:j}),q=E7(e,{scale:Z,type:y,cursor:C,nodeClickRange:w,listeners:h,tooltip:b,value:S,direction:M,thickness:E,highlightStyle:D,segmentation:I,bar:k,targets:T,target:A,cornerRadius:R,cornerMode:L,...P}),{placement:X,...Q}=$,J="horizontal"===M;J?(t="before"===X?"top":"bottom",i="left"):(t="after"===X?"right":"left",i="bottom");let ee={type:"number",position:t,min:H,max:U,reverse:!J,interval:W,label:Q,nice:!1,line:{enabled:!1},gridLine:{enabled:!1}},et={type:"number",position:i,min:0,max:1,line:{enabled:!1},label:{enabled:!1},gridLine:{enabled:!1}};return{...K,series:[q],axes:J?[ee,et]:[et,ee]}}(e);let{animation:t,background:i,container:r,contextMenu:s,footnote:a,height:o,listeners:n,locale:l,minHeight:h,minWidth:d,padding:c,subtitle:u,theme:p,title:g,width:m}=e;return E7(e,{animation:t,background:i,container:r,contextMenu:s,footnote:a,height:o,listeners:n,locale:l,minHeight:h,minWidth:d,padding:c,subtitle:u,theme:p,title:g,width:m})}};function Ds(e,t){let i=[],r=wc(e),s=C8.get(wa(e));for(let{type:t,chartTypes:r,optionsKey:a,optionsInnerKey:o,identifier:n}of C2)if("unknown"===s||r.includes(s)){if("root"===t||"legend"===t){let t=e[a];if(null==t)continue;o?t[o]&&(i.push(`${a}.${o}`),delete t[o]):(i.push(a),delete e[a])}else if("axis"===t){if(!("axes"in e)||!e.axes?.some(e=>e.type===n))continue;i.push(`axis[type=${n}]`),e.axes=e.axes.filter(e=>e.type!==n)}else if("axis-option"===t){if(!("axes"in e)||!e.axes?.some(e=>e[a]))continue;i.push(`axis.${a}`),e.axes.forEach(e=>{e[a]&&delete e[a]})}else if("series"===t){if(!e.series?.some(e=>e.type===n))continue;i.push(`series[type=${n}]`),e.series=e.series.filter(e=>e.type!==n)}else if("series-option"===t){if(!e.series?.some(e=>e[a]))continue;i.push(`series.${a}`),e.series.forEach(e=>{e[a]&&delete e[a]})}}if(i.length&&!t){r&&(i=["AgCharts.createGauge"]);let t="ag-charts-enterprise",s="https://ag-grid.com/charts/javascript/installation/";"integrated"===e.mode&&(t="ag-grid-charts-enterprise' or 'ag-grid-enterprise/charts-enterprise",s="https://www.ag-grid.com/javascript-data-grid/integrated-charts-installation/"),ul.warnOnce([`unable to use these enterprise features as '${t}' has not been loaded:`,"",...i,"",`See: ${s}`].join("\n"))}}var Da=Symbol("description"),Do=Symbol("required");function Dn(e,t,i){let r=pM(i)?i:i[Da],s=r?`; expecting ${r}`:"",a=e?`Option \`${e}\``:"Value";return`${a} cannot be set to \`${function(e,t=1/0){switch(typeof e){case"undefined":return"undefined";case"number":if(isNaN(e))return"NaN";if(e===1/0)return"Infinity";if(e===-1/0)return"-Infinity";default:if((e=JSON.stringify(e)).length>t)return`${e.slice(0,t)}... (+${e.length-t} characters)`;return e}}(t)}\`${s}, ignoring.`}function Dl(e,t){return Object.assign(t=>e(t),{[Da]:t})}Dl(pm,"an array"),Dl(pf,"a boolean"),Dl(pw,"a function"),Dl(pD,"a number");var Dh=Dl(pb,"an object"),Dd=Dl(pM,"a string"),Dc=(e,t=!0)=>Dl(i=>pD(i)&&(i>e||t&&i===e),`a number greater than ${t?"or equal to ":""}${e}`),Du=(e,t)=>Dl(i=>pD(i)&&i>=e&&i<=t,`a number between ${e} and ${t} inclusive`);Dc(0),Dc(1),Du(0,1),Du(0,360);var Dp=(e,t)=>Dl(t=>pm(t)&&t.every(e),t??`${e[Da]} array`);function Dg(e){return e?.up||e?.down||e?.neutral?"user-full":e?.fills||e?.strokes?"user-indexed":"inbuilt"}var Dm="white",Df={get cartesian(){return{seriesTypes:C8.cartesianTypes,commonOptions:["zoom","navigator"]}},get polar(){return{seriesTypes:C8.polarTypes,commonOptions:[]}},get hierarchy(){return{seriesTypes:C8.hierarchyTypes,commonOptions:[]}},get topology(){return{seriesTypes:C8.topologyTypes,commonOptions:[]}},get"flow-proportion"(){return{seriesTypes:C8.flowProportionTypes,commonOptions:[]}},get gauge(){return{seriesTypes:C8.gaugeTypes,commonOptions:[]}}},Dv=Object.values(Df).reduce((e,{commonOptions:t})=>e.concat(t),[]),Dy=class e{static getAxisDefaults(e){return pP(e,{title:{enabled:!1,text:"Axis Title",spacing:25,fontWeight:"normal",fontSize:13,fontFamily:b7,color:b9},label:{fontSize:12,fontFamily:b7,padding:5,color:b9,avoidCollisions:!0},line:{enabled:!0,width:1,stroke:Ss},tick:{enabled:!1,width:1,stroke:Ss},gridLine:{enabled:!0,style:[{stroke:Sr,lineDash:[]}]},crossLines:{enabled:!1,fill:Sa,stroke:Sa,fillOpacity:.1,strokeWidth:1,label:{enabled:!1,fontSize:12,fontFamily:b7,padding:5,color:b9}},crosshair:{enabled:!0}})}getChartDefaults(){return{minHeight:300,minWidth:300,background:{visible:!0,fill:So},padding:{top:Sh,right:Sh,bottom:Sh,left:Sh},keyboard:{enabled:!0},title:{enabled:!1,text:"Title",fontWeight:"normal",fontSize:17,fontFamily:b7,color:b9,wrapping:"hyphenate",layoutStyle:Sd,textAlign:Sc},subtitle:{enabled:!1,text:"Subtitle",spacing:20,fontSize:13,fontFamily:b7,color:Si,wrapping:"hyphenate",layoutStyle:Sd,textAlign:Sc},footnote:{enabled:!1,text:"Footnote",spacing:20,fontSize:13,fontFamily:b7,color:"rgb(140, 140, 140)",wrapping:"hyphenate",layoutStyle:Sd,textAlign:Sc},legend:{position:"bottom",spacing:30,listeners:{},toggleSeries:!0,item:{paddingX:16,paddingY:8,marker:{size:15,padding:8},showSeriesStroke:!0,label:{color:b9,fontSize:12,fontFamily:b7}},reverseOrder:!1,pagination:{marker:{size:12},activeStyle:{fill:b9},inactiveStyle:{fill:Si},highlightStyle:{fill:b9},label:{color:b9}}},tooltip:{enabled:!0,darkTheme:b8,delay:0},overlays:{darkTheme:b8},listeners:{}}}constructor(e={}){let{overrides:t,palette:i}=fY(e),r=this.createChartConfigPerChartType(this.getDefaults());t&&this.mergeOverrides(r,t);let{fills:s,strokes:a,...o}=this.getDefaultColors();this.palette=pP(i,{fills:Object.values(s),strokes:Object.values(a),...o}),this.paletteType=Dg(i),this.config=Object.freeze(this.templateTheme(r))}mergeOverrides(e,t){for(let{seriesTypes:i,commonOptions:r}of Object.values(Df)){let s={...t.common};for(let e of Dv)r.includes(e)||delete s[e];if(s)for(let t of i)e[t]=pP(s,e[t])}C8.seriesTypes.forEach(i=>{t[i]&&(e[i]=pP(t[i],e[i]))})}createChartConfigPerChartType(e){for(let[t,{seriesTypes:i}]of Object.entries(Df)){let r=C9.get(t);for(let t of i)e[t]||(e[t]=fY(r))}return e}getDefaults(){let t=(t,i)=>{let r={},s={axes:{},...C4.getThemeTemplates(),...this.getChartDefaults(),...C9.get(t)};for(let t of i){r[t]=pP(we.getThemeTemplate(t),r[t]??fY(s));let{axes:i}=r[t];for(let t of C1.keys())i[t]=pP(i[t],C1.getThemeTemplate(t),e.cartesianAxisDefault[t])}return r};return pP(t("cartesian",C8.cartesianTypes),t("polar",C8.polarTypes),t("hierarchy",C8.hierarchyTypes),t("topology",C8.topologyTypes),t("flow-proportion",C8.flowProportionTypes),t("gauge",C8.gaugeTypes))}templateTheme(e){let t=fY(e),i=this.getTemplateParameters();return fZ(t,e=>{if(pm(e))for(let t=0;t<e.length;t++){let r=e[t];i.has(r)&&(e[t]=i.get(r))}else for(let[t,r]of Object.entries(e))i.has(r)&&(e[t]=i.get(r))}),fY(t)}getDefaultColors(){return{fills:Ed,strokes:Ec,up:{fill:Ed.GREEN,stroke:Ec.GREEN},down:{fill:Ed.RED,stroke:Ec.RED},neutral:{fill:Ed.GRAY,stroke:Ec.GRAY},altUp:{fill:Ed.BLUE,stroke:Ec.BLUE},altDown:{fill:Ed.ORANGE,stroke:Ec.ORANGE},altNeutral:{fill:Ed.GRAY,stroke:Ec.GRAY}}}getTemplateParameters(){let e=new Map;e.set(b8,!1),e.set(b7,"Verdana, sans-serif"),e.set(b9,"rgb(70, 70, 70)"),e.set(Se,"white"),e.set(Si,"rgb(140, 140, 140)"),e.set(Sr,"rgb(224,234,241)"),e.set(Ss,"rgb(195, 195, 195)"),e.set(Sa,"rgb(70, 70, 70)"),e.set(St,Dm),e.set(So,Dm),e.set(Sn,"rgba(0, 0, 0, 0.5)"),e.set(SE,[Ed.ORANGE,Ed.YELLOW,Ed.GREEN]),e.set(SD,[Ed.GREEN,Ed.YELLOW,Ed.RED]),e.set(Sh,20),e.set(Sd,"block"),e.set(Sc,"center"),e.set(SI,["#ffffff","#e0e5ea","#c1ccd5","#a3b4c1","#859cad"]),e.set(Sk,["#ffffff","#c5cbd1","#a4b1bd","#8498a9","#648096"]),e.set(SM,Dm),e.set(ST,Ed.BLUE),e.set(SA,Ed.BLUE),e.set(SR,Ed.BLUE),e.set(SL,Dm),e.set(SP,"#fafafa"),e.set(SF,"#dddddd"),e.set(SN,"#000000"),e.set(SO,"top"),e.set(SB,!1);let t=this.getDefaultColors();return e.set(Su,this.palette.up?.stroke??t.up.stroke),e.set(Sg,this.palette.up?.fill??t.up.fill),e.set(Sp,this.palette.down?.stroke??t.down.stroke),e.set(Sm,this.palette.down?.fill??t.down.fill),e.set(Sf,this.palette.neutral?.stroke??t.neutral.stroke),e.set(Sv,this.palette.neutral?.fill??t.neutral.fill),e.set(Sy,this.palette.altUp?.stroke??t.up.stroke),e.set(Sw,this.palette.altUp?.fill??t.up.fill),e.set(SC,this.palette.altDown?.stroke??t.down.stroke),e.set(Sb,this.palette.altDown?.fill??t.down.fill),e.set(SS,this.palette.altNeutral?.fill??t.altNeutral.fill),e.set(Sx,this.palette.altNeutral?.stroke??t.altNeutral.stroke),e}};Dy.cartesianAxisDefault={number:Dy.getAxisDefaults({line:{enabled:!1}}),log:Dy.getAxisDefaults({base:10,line:{enabled:!1},interval:{minSpacing:NaN}}),category:Dy.getAxisDefaults({groupPaddingInner:.1,label:{autoRotate:!0},gridLine:{enabled:SB},crosshair:{enabled:!1}}),time:Dy.getAxisDefaults({gridLine:{enabled:SB}}),"ordinal-time":Dy.getAxisDefaults({groupPaddingInner:0,label:{autoRotate:!1},gridLine:{enabled:SB}}),"angle-category":Dy.getAxisDefaults({gridLine:{enabled:SB}}),"angle-number":Dy.getAxisDefaults({gridLine:{enabled:SB}}),"radius-category":Dy.getAxisDefaults({line:{enabled:!1}}),"radius-number":Dy.getAxisDefaults({line:{enabled:!1}}),"grouped-category":Dy.getAxisDefaults({tick:{enabled:!0}})};var DC=Dy,Dw="#192232",Db={BLUE:"#5090dc",ORANGE:"#ffa03a",GREEN:"#459d55",CYAN:"#34bfe1",YELLOW:"#e1cc00",VIOLET:"#9669cb",GRAY:"#b5b5b5",MAGENTA:"#bd5aa7",BROWN:"#8a6224",RED:"#ef5452"},DS={BLUE:"#74a8e6",ORANGE:"#ffbe70",GREEN:"#6cb176",CYAN:"#75d4ef",YELLOW:"#f6e559",VIOLET:"#aa86d8",GRAY:"#a1a1a1",MAGENTA:"#ce7ab9",BROWN:"#997b52",RED:"#ff7872"},Dx=class extends DC{getDefaultColors(){return{fills:Db,strokes:DS,up:{fill:Db.GREEN,stroke:DS.GREEN},down:{fill:Db.RED,stroke:DS.RED},neutral:{fill:Db.GRAY,stroke:DS.GRAY},altUp:{fill:Db.BLUE,stroke:DS.BLUE},altDown:{fill:Db.ORANGE,stroke:DS.ORANGE},altNeutral:{fill:Db.GRAY,stroke:DS.GRAY}}}getTemplateParameters(){let e=super.getTemplateParameters();return e.set(b8,!0),e.set(SM,Dw),e.set(b9,"white"),e.set(Si,"#7D91A0"),e.set(Sr,"#545A6E"),e.set(Sa,"white"),e.set(SE,[Db.ORANGE,Db.YELLOW,Db.GREEN]),e.set(SD,[Db.GREEN,Db.YELLOW,Db.RED]),e.set(SI,["#192834","#253746","#324859","#3f596c","#4d6a80"]),e.set(Sk,["#192834","#3b5164","#496275","#577287","#668399"]),e.set(So,Dw),e.set(St,Dw),e.set(ST,Db.BLUE),e.set(SA,"white"),e.set(SR,Db.BLUE),e.set(SL,Dw),e.set(SP,"#28313e"),e.set(SF,"#4b525d"),e.set(SN,"#ffffff"),e}constructor(e){super(e)}},DM={GREEN:"#089981",RED:"#F23645",BLUE:"#5090dc",GRAY:"#A9A9A9"},DE={GREEN:"#089981",RED:"#F23645",BLUE:"#5090dc",GRAY:"#909090"},DD=class extends Dx{getDefaultColors(){return{fills:{...DM},strokes:{...DE},up:{fill:DM.GREEN,stroke:DE.GREEN},down:{fill:DM.RED,stroke:DE.RED},neutral:{fill:DM.BLUE,stroke:DE.BLUE},altUp:{fill:DM.GREEN,stroke:DE.GREEN},altDown:{fill:DM.RED,stroke:DE.RED},altNeutral:{fill:DM.GRAY,stroke:DE.GRAY}}}getTemplateParameters(){let e=super.getTemplateParameters();return e.set(SE,[DM.GREEN,DM.BLUE,DM.RED]),e.set(ST,DM.BLUE),e.set(SR,DM.BLUE),e.set(Sr,"#343A4E"),e.set(Sh,0),e.set(Sd,"overlay"),e.set(Sc,"left"),e.set(SO,"bottom"),e.set(SB,!0),e}},DI={GREEN:"#089981",RED:"#F23645",BLUE:"#5090dc",GRAY:"#A9A9A9"},Dk={GREEN:"#089981",RED:"#F23645",BLUE:"#5090dc",GRAY:"#909090"},DT=class extends DC{getDefaultColors(){return{fills:{...DI},strokes:{...Dk},up:{fill:DI.GREEN,stroke:Dk.GREEN},down:{fill:DI.RED,stroke:Dk.RED},neutral:{fill:DI.BLUE,stroke:Dk.BLUE},altUp:{fill:DI.GREEN,stroke:Dk.GREEN},altDown:{fill:DI.RED,stroke:Dk.RED},altNeutral:{fill:DI.GRAY,stroke:Dk.GRAY}}}getTemplateParameters(){let e=super.getTemplateParameters();return e.set(SE,[DI.GREEN,DI.BLUE,DI.RED]),e.set(ST,DI.BLUE),e.set(SR,DI.BLUE),e.set(Sr,"#F2F3F3"),e.set(Sh,0),e.set(Sd,"overlay"),e.set(Sc,"left"),e.set(SO,"bottom"),e.set(SB,!0),e}},DA={BLUE:"#2196F3",ORANGE:"#FF9800",GREEN:"#4CAF50",CYAN:"#00BCD4",YELLOW:"#FFEB3B",VIOLET:"#7E57C2",GRAY:"#9E9E9E",MAGENTA:"#F06292",BROWN:"#795548",RED:"#F44336"},DR={BLUE:"#90CAF9",ORANGE:"#FFCC80",GREEN:"#A5D6A7",CYAN:"#80DEEA",YELLOW:"#FFF9C4",VIOLET:"#B39DDB",GRAY:"#E0E0E0",MAGENTA:"#F48FB1",BROWN:"#A1887F",RED:"#EF9A9A"},DL=class extends Dx{getDefaultColors(){return{fills:DA,strokes:DR,up:{fill:DA.GREEN,stroke:DR.GREEN},down:{fill:DA.RED,stroke:DR.RED},neutral:{fill:DA.GRAY,stroke:DR.GRAY},altUp:{fill:DA.BLUE,stroke:DR.BLUE},altDown:{fill:DA.RED,stroke:DR.RED},altNeutral:{fill:DA.GRAY,stroke:DR.GRAY}}}getTemplateParameters(){let e=super.getTemplateParameters();return e.set(SE,[DA.ORANGE,DA.YELLOW,DA.GREEN]),e.set(SD,[DA.GREEN,DA.YELLOW,DA.RED]),e.set(ST,DA.BLUE),e.set(SR,DA.BLUE),e}},DP={BLUE:"#2196F3",ORANGE:"#FF9800",GREEN:"#4CAF50",CYAN:"#00BCD4",YELLOW:"#FFEB3B",VIOLET:"#7E57C2",GRAY:"#9E9E9E",MAGENTA:"#F06292",BROWN:"#795548",RED:"#F44336"},DF={BLUE:"#1565C0",ORANGE:"#E65100",GREEN:"#2E7D32",CYAN:"#00838F",YELLOW:"#F9A825",VIOLET:"#4527A0",GRAY:"#616161",MAGENTA:"#C2185B",BROWN:"#4E342E",RED:"#B71C1C"},DN=class extends DC{getDefaultColors(){return{fills:DP,strokes:DF,up:{fill:DP.GREEN,stroke:DF.GREEN},down:{fill:DP.RED,stroke:DF.RED},neutral:{fill:DP.GRAY,stroke:DF.GRAY},altUp:{fill:DP.BLUE,stroke:DF.BLUE},altDown:{fill:DP.RED,stroke:DF.RED},altNeutral:{fill:DP.GRAY,stroke:DF.GRAY}}}getTemplateParameters(){let e=super.getTemplateParameters();return e.set(SE,[DP.ORANGE,DP.YELLOW,DP.GREEN]),e.set(SD,[DP.GREEN,DP.YELLOW,DP.RED]),e.set(ST,DP.BLUE),e.set(SR,DP.BLUE),e}},DO={BLUE:"#436ff4",PURPLE:"#9a7bff",MAGENTA:"#d165d2",PINK:"#f0598b",RED:"#f47348",ORANGE:"#f2a602",YELLOW:"#e9e201",GREEN:"#21b448",CYAN:"#00b9a2",MODERATE_BLUE:"#00aee4",GRAY:"#bbbbbb"},DB={BLUE:"#6698ff",PURPLE:"#c0a3ff",MAGENTA:"#fc8dfc",PINK:"#ff82b1",RED:"#ff9b70",ORANGE:"#ffcf4e",YELLOW:"#ffff58",GREEN:"#58dd70",CYAN:"#51e2c9",MODERATE_BLUE:"#4fd7ff",GRAY:"#eeeeee"},DG=class extends Dx{getDefaultColors(){return{fills:DO,strokes:DB,up:{fill:DO.GREEN,stroke:DB.GREEN},down:{fill:DO.RED,stroke:DB.RED},neutral:{fill:DO.GRAY,stroke:DB.GRAY},altUp:{fill:DO.BLUE,stroke:DB.BLUE},altDown:{fill:DO.RED,stroke:DB.RED},altNeutral:{fill:DO.GRAY,stroke:DB.GRAY}}}getTemplateParameters(){let e=super.getTemplateParameters();return e.set(SE,[DO.BLUE,DO.RED]),e.set(SD,[DO.BLUE,DO.RED]),e.set(ST,DO.BLUE),e.set(SR,DO.BLUE),e}},Dz={BLUE:"#436ff4",PURPLE:"#9a7bff",MAGENTA:"#d165d2",PINK:"#f0598b",RED:"#f47348",ORANGE:"#f2a602",YELLOW:"#e9e201",GREEN:"#21b448",CYAN:"#00b9a2",MODERATE_BLUE:"#00aee4",GRAY:"#bbbbbb"},D_={BLUE:"#2346c9",PURPLE:"#7653d4",MAGENTA:"#a73da9",PINK:"#c32d66",RED:"#c84b1c",ORANGE:"#c87f00",YELLOW:"#c1b900",GREEN:"#008c1c",CYAN:"#00927c",MODERATE_BLUE:"#0087bb",GRAY:"#888888"},DV=class extends DC{getDefaultColors(){return{fills:Dz,strokes:D_,up:{fill:Dz.GREEN,stroke:D_.GREEN},down:{fill:Dz.RED,stroke:D_.RED},neutral:{fill:Dz.GRAY,stroke:D_.GRAY},altUp:{fill:Dz.BLUE,stroke:D_.BLUE},altDown:{fill:Dz.RED,stroke:D_.RED},altNeutral:{fill:Dz.GRAY,stroke:D_.GRAY}}}getTemplateParameters(){let e=super.getTemplateParameters();return e.set(SE,[Dz.BLUE,Dz.RED]),e.set(SD,[Dz.BLUE,Dz.RED]),e.set(ST,Dz.BLUE),e.set(SR,Dz.BLUE),e}},Dj={BLUE:"#4472C4",ORANGE:"#ED7D31",GRAY:"#A5A5A5",YELLOW:"#FFC000",MODERATE_BLUE:"#5B9BD5",GREEN:"#70AD47",DARK_GRAY:"#7B7B7B",DARK_BLUE:"#264478",VERY_DARK_GRAY:"#636363",DARK_YELLOW:"#997300"},DH={BLUE:"#6899ee",ORANGE:"#ffa55d",GRAY:"#cdcdcd",YELLOW:"#ffea53",MODERATE_BLUE:"#82c3ff",GREEN:"#96d56f",DARK_GRAY:"#a1a1a1",DARK_BLUE:"#47689f",VERY_DARK_GRAY:"#878787",DARK_YELLOW:"#c0993d"},DU=class extends Dx{getDefaultColors(){return{fills:{...Dj,RED:Dj.ORANGE},strokes:{...DH,RED:DH.ORANGE},up:{fill:Dj.GREEN,stroke:DH.GREEN},down:{fill:Dj.ORANGE,stroke:DH.ORANGE},neutral:{fill:Dj.GRAY,stroke:DH.GRAY},altUp:{fill:Dj.BLUE,stroke:DH.BLUE},altDown:{fill:Dj.ORANGE,stroke:DH.ORANGE},altNeutral:{fill:Dj.GRAY,stroke:DH.GRAY}}}getTemplateParameters(){let e=super.getTemplateParameters();return e.set(SE,[Dj.ORANGE,Dj.YELLOW,Dj.GREEN]),e.set(SD,[Dj.GREEN,Dj.YELLOW,Dj.ORANGE]),e.set(ST,Dj.BLUE),e.set(SR,Dj.BLUE),e}},DW={BLUE:"#5281d5",ORANGE:"#ff8d44",GRAY:"#b5b5b5",YELLOW:"#ffd02f",MODERATE_BLUE:"#6aabe6",GREEN:"#7fbd57",DARK_GRAY:"#8a8a8a",DARK_BLUE:"#335287",VERY_DARK_GRAY:"#717171",DARK_YELLOW:"#a98220"},D$={BLUE:"#214d9b",ORANGE:"#c25600",GRAY:"#7f7f7f",YELLOW:"#d59800",MODERATE_BLUE:"#3575ac",GREEN:"#4b861a",DARK_GRAY:"#575757",DARK_BLUE:"#062253",VERY_DARK_GRAY:"#414141",DARK_YELLOW:"#734f00"},DY=class extends DC{getDefaultColors(){return{fills:{...DW,RED:DW.ORANGE},strokes:{...D$,RED:D$.ORANGE},up:{fill:DW.GREEN,stroke:D$.GREEN},down:{fill:DW.ORANGE,stroke:D$.ORANGE},neutral:{fill:D$.GRAY,stroke:D$.GRAY},altUp:{fill:DW.BLUE,stroke:D$.BLUE},altDown:{fill:DW.ORANGE,stroke:D$.ORANGE},altNeutral:{fill:DW.GRAY,stroke:D$.GRAY}}}getTemplateParameters(){let e=super.getTemplateParameters();return e.set(SE,[DW.ORANGE,DW.YELLOW,DW.GREEN]),e.set(SD,[DW.GREEN,DW.YELLOW,DW.ORANGE]),e.set(ST,DW.BLUE),e.set(SR,DW.BLUE),e}},DK={BLUE:"#0083ff",ORANGE:"#ff6600",GREEN:"#00af00",CYAN:"#00ccff",YELLOW:"#f7c700",VIOLET:"#ac26ff",GRAY:"#a7a7b7",MAGENTA:"#e800c5",BROWN:"#b54300",RED:"#ff0000"},DZ={BLUE:"#67b7ff",ORANGE:"#ffc24d",GREEN:"#5cc86f",CYAN:"#54ebff",VIOLET:"#fff653",YELLOW:"#c18aff",GRAY:"#aeaeae",MAGENTA:"#f078d4",BROWN:"#ba8438",RED:"#ff726e"},Dq=class extends Dx{getDefaultColors(){return{fills:DK,strokes:DZ,up:{fill:DK.GREEN,stroke:DZ.GREEN},down:{fill:DK.RED,stroke:DZ.RED},neutral:{fill:DK.GRAY,stroke:DZ.GRAY},altUp:{fill:DK.BLUE,stroke:DZ.BLUE},altDown:{fill:DK.ORANGE,stroke:DZ.ORANGE},altNeutral:{fill:DK.GRAY,stroke:DZ.GRAY}}}getTemplateParameters(){let e=super.getTemplateParameters();return e.set(SE,[DK.ORANGE,DK.YELLOW,DK.GREEN]),e.set(SD,[DK.GREEN,DK.YELLOW,DK.RED]),e.set(ST,DK.BLUE),e.set(SR,DK.BLUE),e}},DX={BLUE:"#0083ff",ORANGE:"#ff6600",GREEN:"#00af00",CYAN:"#00ccff",YELLOW:"#f7c700",VIOLET:"#ac26ff",GRAY:"#a7a7b7",MAGENTA:"#e800c5",BROWN:"#b54300",RED:"#ff0000"},DQ={BLUE:"#0f68c0",ORANGE:"#d47100",GREEN:"#007922",CYAN:"#009ac2",VIOLET:"#bca400",YELLOW:"#753cac",GRAY:"#646464",MAGENTA:"#9b2685",BROWN:"#6c3b00",RED:"#cb0021"},DJ=class extends DC{getDefaultColors(){return{fills:DX,strokes:DQ,up:{fill:DX.GREEN,stroke:DQ.GREEN},down:{fill:DX.RED,stroke:DQ.RED},neutral:{fill:DX.GRAY,stroke:DQ.GRAY},altUp:{fill:DX.BLUE,stroke:DQ.BLUE},altDown:{fill:DX.ORANGE,stroke:DQ.ORANGE},altNeutral:{fill:DX.GRAY,stroke:DQ.GRAY}}}getTemplateParameters(){let e=super.getTemplateParameters();return e.set(SE,[DX.ORANGE,DX.YELLOW,DX.GREEN]),e.set(SD,[DX.GREEN,DX.YELLOW,DX.RED]),e.set(ST,DX.BLUE),e.set(SR,DX.BLUE),e}},D0=()=>new DC,D1={"ag-default-dark":()=>new Dx,"ag-sheets-dark":()=>new DU,"ag-polychroma-dark":()=>new DG,"ag-vivid-dark":()=>new Dq,"ag-material-dark":()=>new DL,"ag-financial-dark":()=>new DD,null:D0,undefined:D0,"ag-default":D0,"ag-sheets":()=>new DY,"ag-polychroma":()=>new DV,"ag-vivid":()=>new DJ,"ag-material":()=>new DN,"ag-financial":()=>new DT};function D2(e){if(e instanceof DC)return e;if(null==e||"string"==typeof e){let t=D1[e];return t?t():(ul.warnOnce(`the theme [${e}] is invalid, using [ag-default] instead.`),D0())}if(function(e,t,i){let{errors:r}=function e(t,i,r=""){if(!pb(t))return{valid:null,errors:[{path:r,value:t,message:Dn(r,t,"an object")}]};let s=new Set(Object.keys(t)),a=[],o={};function n(e){return pm(i)?`${r}[${e}]`:r?`${r}.${e}`:e}for(let[l,h]of Object.entries(i)){s.delete(l);let i=t[l];if(h[Do]||void 0!==i){if(pw(h))h(i)?o[l]=i:a.push({key:l,path:r,value:i,message:Dn(n(l),i,h)});else{let t=e(i,h,n(l));o[l]=t.valid,a.push(...t.errors)}}}for(let e of s)a.push({key:e,path:r,unknown:!0,message:`Unknown option \`${n(e)}\`, ignoring.`});return{valid:o,errors:a}}(e,t,i);for(let{message:e}of r)ul.warn(e);return 0===r.length}(e,D3,"theme")){let t=function(e){let t,i=e,r=[];for(;"object"==typeof i;)t??(t=i.palette),i.overrides&&r.push(i.overrides),i=i.baseTheme;return{baseTheme:i,overrides:pP(...r),palette:t}}(e);return new(t.baseTheme?D2(t.baseTheme):D0()).constructor(t)}return D0()}var D3={baseTheme:((...e)=>Dl(t=>e.some(e=>e(t)),e.map(e=>e[Da]).filter(Boolean).join(" or ")))(Dd,Dh),overrides:Dh,palette:{fills:Dp(Dd),strokes:Dp(Dd),up:{fill:Dd,stroke:Dd},down:{fill:Dd,stroke:Dd},neutral:{fill:Dd,stroke:Dd}}},D4=new Set(["map-shape-background","map-line-background"]),D6=class{constructor(e,t){var i;this.debug=fn.create(!0,"opts"),this.presetType=t?.presetType;let r={shallow:["data"]};e=fY(e,r);let s=fY(e,r);if(null!=this.presetType){let e=Dr[this.presetType]?.(s,()=>this.activeTheme)??s;this.debug(">>> AgCharts.createOrUpdate() - applying preset",s,e),s=e}E5.isEnterprise||Ds(s),this.activeTheme=D2(s.theme),this.presetType&&(s=this.activeTheme.templateTheme(s)),this.sanityCheckAndCleanup(s),this.defaultAxes=this.getDefaultAxes(s),this.specialOverrides=this.specialOverridesDefaults({...t});let a=this.optionsType(s),{axes:o={},annotations:{axesButtons:n=null,...l}={},series:h,...d}=this.getSeriesThemeConfig(a);this.userOptions=e,this.processedOptions=fY(pP(s,null!=n?{annotations:{axesButtons:n}}:{},d,this.defaultAxes),r),this.processAxesOptions(this.processedOptions,o),this.processSeriesOptions(this.processedOptions),this.processMiniChartSeriesOptions(this.processedOptions),this.annotationThemes=l,(wo(this.processedOptions)||function(e){let t=wa(e);return wn(e)&&"pie"!==t&&"donut"!==t}(this.processedOptions))&&this.processedOptions.legend?.enabled==null&&((i=this.processedOptions).legend??(i.legend={}),this.processedOptions.legend.enabled=this.processedOptions.series.length>1),this.enableConfiguredOptions(this.processedOptions),E5.isEnterprise||Ds(this.processedOptions,!0)}getOptions(){return this.processedOptions??{}}diffOptions(e){return f$(e,this.processedOptions)}getSeriesThemeConfig(e){let t=fY(this.activeTheme?.config[e]??{});return this.removeLeftoverSymbols(t),t}getDefaultAxes(e){let t=this.optionsType(e),i=we.cloneDefaultAxes(t);return we.isDefaultAxisSwapNeeded(e)&&this.swapAxesPosition(i),i}optionsType(e){return e.series?.[0]?.type??"line"}sanityCheckAndCleanup(e){this.deprecationWarnings(e),this.axesTypeIntegrity(e),this.seriesTypeIntegrity(e),this.soloSeriesIntegrity(e),this.removeDisabledOptions(e),this.removeLeftoverSymbols(e),e.series?.some(e=>"bullet"===e.type)&&null!=e.sync&&!1!==e.sync.enabled&&(ul.warnOnce("bullet series cannot be synced, disabling synchronization."),delete e.sync)}swapAxesPosition(e){if(wo(e)){let[t,i]=e.axes??[];e.axes=[{...t,position:i.position},{...i,position:t.position}]}}processAxesOptions(e,t){"axes"in e&&(e.axes=e.axes.map(e=>{let{crossLines:i,...r}=pP(t[e.type]?.[e.position],t[e.type]);e.crossLines&&(e.crossLines=pF(e.crossLines,i));let s=r.gridLine?.style;e.gridLine?.style&&s?.length&&(e.gridLine.style=e.gridLine.style.map((e,t)=>null!=e.stroke||null!=e.lineDash?pP(e,s.at(t%s.length)):e));let{top:a,right:o,bottom:n,left:l,...h}=pP(e,r);return h}))}processSeriesOptions(e){let t=this.getDefaultSeriesType(e),i=this.getTooltipPositionDefaults(e),r=pb(e.theme)?Dg(e.theme?.palette):"inbuilt",s={colourIndex:0,userPalette:r},a=e.series?.map(a=>{a.type??(a.type=t);let{innerLabels:o,...n}=this.getSeriesThemeConfig(a.type).series??{},l=D4.has(a.type)?{colourIndex:0,userPalette:r}:s,h=this.getSeriesPalette(a.type,l),d=this.getTooltipRangeDefaults(e,a.type),c=pP(this.getSeriesGroupingOptions(a),a,i,d,n,h,{visible:!0});return c.innerLabels&&(c.innerLabels=pF(c.innerLabels,o)),this.activeTheme.templateTheme(c)});e.series=this.setSeriesGroupingOptions(a??[])}processMiniChartSeriesOptions(e){let t=e.navigator?.miniChart?.series;if(null==t)return;let i={colourIndex:0,userPalette:pb(e.theme)?Dg(e.theme.palette):"inbuilt"};t=t.map(e=>{e.type??(e.type="line");let{innerLabels:t,...r}=this.getSeriesThemeConfig(e.type).series??{},s=pP(this.getSeriesGroupingOptions(e),e,r,this.getSeriesPalette(e.type,i));return this.activeTheme.templateTheme(s)}),e.navigator.miniChart.series=this.setSeriesGroupingOptions(t)}getSeriesPalette(e,t){let i=we.getPaletteFactory(e),{colourIndex:r,userPalette:s}=t,{fills:a=[],strokes:o=[]}=this.activeTheme.palette;return i?.({userPalette:s,colorsCount:Math.max(a.length,o.length),themeTemplateParameters:this.activeTheme.getTemplateParameters(),palette:this.activeTheme.palette,takeColors:e=>(t.colourIndex+=e,{fills:mF(a,e,r),strokes:mF(o,e,r)})})}getSeriesGroupingOptions(e){let t=we.isGroupable(e.type),i=we.isStackable(e.type),r=we.isStackedByDefault(e.type);e.grouped&&!t&&ul.warnOnce(`unsupported grouping of series type "${e.type}".`),(e.stacked||e.stackGroup)&&!i&&ul.warnOnce(`unsupported stacking of series type "${e.type}".`);let{grouped:s,stacked:a}=e;return a??(a=(r||null!=e.stackGroup)&&!(t&&s)),s??(s=!0),{stacked:i&&a,grouped:t&&s&&!(i&&a)}}setSeriesGroupingOptions(e){let t=this.getSeriesGrouping(e);this.debug("setSeriesGroupingOptions() - series grouping: ",t);let i={},r=t.reduce((e,t)=>{var i;return"default"===t.groupType||(e[i=t.seriesType]??(e[i]=0),e[t.seriesType]+="stack"===t.groupType?1:t.series.length),e},{});return t.flatMap(e=>{var t;switch(i[t=e.seriesType]??(i[t]=0),e.groupType){case"stack":{let t=i[e.seriesType]++;return e.series.map((i,s)=>Object.assign(i,{seriesGrouping:{groupId:e.groupId,groupIndex:t,groupCount:r[e.seriesType],stackIndex:s,stackCount:e.series.length}}))}case"group":return e.series.map(t=>Object.assign(t,{seriesGrouping:{groupId:e.groupId,groupIndex:i[e.seriesType]++,groupCount:r[e.seriesType],stackIndex:0,stackCount:0}}))}return e.series}).map(({stacked:e,grouped:t,...i})=>i)}getSeriesGroupId(e){return[e.type,e.xKey,e.stacked?e.stackGroup??"stacked":"grouped"].filter(Boolean).join("-")}getSeriesGrouping(e){let t=new Map;return e.reduce((e,i)=>{let r=i.type;if(i.stacked||i.grouped){let s=this.getSeriesGroupId(i);if(!t.has(s)){let a={groupType:i.stacked?"stack":"group",seriesType:r,series:[],groupId:s};t.set(s,a),e.push(a)}t.get(s).series.push(i)}else e.push({groupType:"default",seriesType:r,series:[i],groupId:"__default__"});return e},[])}getDefaultSeriesType(e){if(wo(e))return"line";if(wn(e))return"pie";if(wl(e))return"treemap";if(wh(e))return"map-shape";if(wd(e))return"sankey";if(wc(e))return"radial-gauge";throw Error("Invalid chart options type detected.")}getTooltipPositionDefaults(e){let t=e.tooltip?.position;if(!px(t))return;let{type:i,xOffset:r,yOffset:s}=t,a={};return pM(i)&&pT(ui,i)&&(a.type=i),pD(r)&&(a.xOffset=r),pD(s)&&(a.yOffset=s),{tooltip:{position:a}}}getTooltipRangeDefaults(e,t){return{tooltip:{range:e.tooltip?.range??we.getTooltipDefauls(t)?.range}}}deprecationWarnings(e){Object.entries({yKeys:"yKey",yNames:"yName"}).forEach(([t,i])=>{e.series?.some(e=>null!=e[t])&&ul.warnOnce(`Property [series.${t}] is deprecated, please use [series.${i}] and multiple series instead.`)})}axesTypeIntegrity(e){if("axes"in e){for(let{type:t}of e.axes??[])if(!(null!=t&&C1.has(t))){delete e.axes;let i=C1.publicKeys().join(", ");ul.warnOnce(`unknown axis type: ${t}; expected one of: ${i}`)}}}seriesTypeIntegrity(e){e.series=e.series?.filter(({type:e})=>{if(null==e||null!=e&&C8.has(e)||C2.some(t=>"series"===t.type&&t.identifier===e))return!0;ul.warnOnce(`unknown series type: ${e}; expected one of: ${C7.seriesTypes.join(", ")}`)})}soloSeriesIntegrity(e){let t=e.series;if(t&&t.length>1&&t.some(e=>we.isSolo(e.type))){let i=this.optionsType(e);if(we.isSolo(i))ul.warn(`series[0] of type '${i}' is incompatible with other series types. Only processing series[0]`),e.series=t.slice(0,1);else{let{solo:i,nonSolo:r}=mP(t,e=>we.isSolo(e.type)?"solo":"nonSolo"),s=mL(i.map(e=>e.type)).join(", ");ul.warn(`Unable to mix these series types with the lead series type: ${s}`),e.series=r}}}enableConfiguredOptions(e){fZ(this.userOptions,(e,t)=>{t&&"enabled"in t&&!t._enabledFromTheme&&null==e.enabled&&(t.enabled=!0)},{skip:["data","theme"]},e),fZ(e,e=>{null!=e._enabledFromTheme&&delete e._enabledFromTheme},{skip:["data","theme"]})}removeDisabledOptions(e){fZ(e,e=>{"enabled"in e&&!1===e.enabled&&Object.keys(e).forEach(t=>{"enabled"!==t&&delete e[t]})},{skip:["data","theme"]})}removeLeftoverSymbols(e){fZ(e,e=>{if(e&&pb(e))for(let[t,i]of Object.entries(e))pA(i)&&delete e[t]},{skip:["data"]})}specialOverridesDefaults(e){if(null!=e.window?fe(e.window):"undefined"!=typeof window?e.window=window:"undefined"!=typeof global&&(e.window=global.window),null!=e.document?m9(e.document):"undefined"!=typeof document?e.document=document:"undefined"!=typeof global&&(e.document=global.document),null==e.window)throw Error("AG Charts - unable to resolve global window");if(null==e.document)throw Error("AG Charts - unable to resolve global document");return e}},D5=fn.create(!0,"opts");function D8(e){if("radial-gauge"===e.type||"linear-gauge"===e.type)return"gauge";if(wo(e))return"cartesian";if(wn(e))return"polar";if(wl(e))return"hierarchy";if(wh(e))return"topology";if(wd(e))return"flow-proportion";if(wc(e))return"gauge";throw Error(`AG Chart - unknown type of chart for options with type: ${e.type}`)}var D7=class{static licenseCheck(e){this.licenseChecked||(this.licenseManager=E5.licenseManager?.(e),this.licenseManager?.setLicenseKey(this.licenseKey,this.gridContext),this.licenseManager?.validateLicense(),this.licenseChecked=!0)}static setLicenseKey(e){this.licenseKey=e}static setGridContext(e){this.gridContext=e}static getLicenseDetails(e){return E5.licenseManager?.({}).getLicenseDetails(e)}static getInstance(e){return Ie.getInstance(e)}static create(e){this.licenseCheck(e);let t=Ie.createOrUpdate(e,void 0,this.licenseManager,null!=E5.styles?[["ag-charts-enterprise",E5.styles]]:[]);return this.licenseManager?.isDisplayWatermark()&&this.licenseManager&&E5.injectWatermark?.(t.chart.ctx.domManager,this.licenseManager.getWatermarkMessage()),t}static createFinancialChart(e){return this.create({presetType:"price-volume",...e})}static createGauge(e){return this.create({presetType:"gauge",...e})}};D7.licenseChecked=!1,D7.gridContext=!1;var D9=class e{static getInstance(e){let t=wN.getInstance(e);return t?bn.chartInstances.get(t):void 0}static initialiseModules(){e.initialised||(!function(){for(let e of(ys.register(bw,bY,bh,bQ,EU,ME,MW,MX,M3,M8,ED,EF,M0),[bc,v5,bg,yt,bp]))C1.register(e.type,{moduleFactory:t=>new e(t),hidden:e===yt})}(),function(){for(let e of ys.modules){if("enterprise"===e.packageType&&!function(e){if("enterprise"!==e.packageType)throw Error("AG Charts - internal configuration error, only enterprise modules need verification.");let t=C2.find(t=>t.type===e.type&&t.optionsKey===e.optionsKey&&t.identifier===e.identifier&&e.chartTypes.every(e=>t.chartTypes.includes(e)));return t&&(t.useCount??(t.useCount=0),t.useCount++),null!=t}(e)&&ul.errorOnce("Unexpected enterprise module registered: "+e.identifier),"root"===e.type&&e.themeTemplate)for(let t of e.chartTypes)C9.set(t,e.themeTemplate);if("series"===e.type){if(e.chartTypes.length>1)throw Error(`AG Charts - Module definition error: ${e.identifier}`);we.register(e.identifier,e)}if("series-option"===e.type&&e.themeTemplate)for(let t of e.seriesTypes)we.setThemeTemplate(t,e.themeTemplate);if("axis-option"===e.type&&e.themeTemplate)for(let t of e.axisTypes){let i=C1.getThemeTemplate(t),r=pP(e.themeTemplate,i);C1.setThemeTemplate(t,r)}"axis"===e.type&&C1.register(e.identifier,e),"legend"===e.type&&C4.register(e.identifier,e)}if(ys.hasEnterpriseModules()){let e=C2.filter(({useCount:e})=>null==e||0===e);e.length>0&&ul.errorOnce("Enterprise modules expected but not registered: ",e)}}(),e.initialised=!0)}static createOrUpdate(t,i,r,s){e.initialiseModules(),D5(">>> AgCharts.createOrUpdate() user options",t);let{presetType:a=i?.chart.chartOptions.presetType,...o}=t,n=o;D7.optionsMutationFn&&(n=D7.optionsMutationFn(n,a),D5(">>> AgCharts.createOrUpdate() MUTATED user options",t));let{overrideDevicePixelRatio:l,document:h,window:d,...c}=n,u=new D6(c,{presetType:a,document:h,window:d,overrideDevicePixelRatio:l}),p=i?.chart;return(null==p||D8(c)!==D8(p?.chartOptions.processedOptions))&&(p=e.createChartInstance(u,p),s?.forEach(([e,t])=>{p?.ctx.domManager.addStyles(e,t)})),null==i?i=new bn(p,e.callbackApi,r):i.chart=p,D5.check()&&"undefined"!=typeof window&&(window.agChartInstances??(window.agChartInstances={}),window.agChartInstances[p.id]=p),p.queuedUserOptions.push(c),p.requestFactoryUpdate(e=>{e.applyOptions(u);let t=e.queuedUserOptions.indexOf(c)+1;e.queuedUserOptions.splice(0,t)}),i}static updateUserDelta(t,i){fZ(i=fY(i,{shallow:["data"]}),e=>{if("object"==typeof e)for(let[t,i]of Object.entries(e))void 0===i&&Object.assign(e,{[t]:Symbol("UNSET")})},{skip:["data"]});let{chart:r}=t,s=r.getOptions(),a=pP(i,s);D5(">>> AgCharts.updateUserDelta() user delta",i),D5("AgCharts.updateUserDelta() - base options",s),e.createOrUpdate(a,t)}static createChartInstance(t,i){let r=i?.destroy({keepTransferableResources:!0});return new(e.getChartByOptions(t.processedOptions))(t,r)}static getChartByOptions(e){if(wo(e))return bo;if(wl(e))return EK;if(wn(e))return EZ;if(wh(e))return E6;if(wd(e))return EW;if(wc(e))return EY;throw Error("AG Charts - couldn't apply configuration, check options are correctly structured and series types are specified")}};D9.caretaker=new yy(ym),D9.initialised=!1,D9.callbackApi={caretaker:D9.caretaker,createOrUpdate:(e,t)=>D9.createOrUpdate(e,t),updateUserDelta:(e,t)=>D9.updateUserDelta(e,t)};var Ie=D9,It={};c8(It,{Arc:()=>Ii,ArrowDown:()=>Id,ArrowUp:()=>Ih,BBox:()=>u3,BandScale:()=>gh,Caption:()=>vn,ChangeDetectableProperties:()=>xv,Circle:()=>wU,ConicGradient:()=>Ir,ContinuousScale:()=>mo,Diamond:()=>w$,DropShadow:()=>xy,ExtendedPath2D:()=>yO,Gradient:()=>fI,Group:()=>mQ,HdpiCanvas:()=>yQ,Image:()=>bP,Label:()=>vh,Line:()=>fL,LinearGradient:()=>fk,LinearScale:()=>bd,Marker:()=>wH,Node:()=>pe,OrdinalTimeScale:()=>mB,Path:()=>yG,PointerEvents:()=>u7,RadialColumnShape:()=>Ia,Rect:()=>by,RedrawType:()=>u4,Rotatable:()=>mY,RotatableGroup:()=>m0,RotatableText:()=>f_,Scalable:()=>mK,ScalableGroup:()=>mJ,Scene:()=>y4,SceneChangeDetection:()=>u6,ScenePathChangeDetection:()=>yB,Sector:()=>Eh,SectorBox:()=>M7,Selection:()=>fl,Shape:()=>fR,Square:()=>wq,SvgPath:()=>In,Text:()=>fz,Tooltip:()=>vo,Transformable:()=>mq,TransformableText:()=>fV,Translatable:()=>mZ,TranslatableGroup:()=>m1,Triangle:()=>wQ,calculateDerivativeExtrema:()=>yF,calculateDerivativeExtremaXY:()=>yN,drawCorner:()=>bm,easing:()=>pV,evaluateBezier:()=>yR,getFont:()=>Iu,getMarker:()=>w2,getRadialColumnWidth:()=>Io,motion:()=>Ic,sectorBox:()=>M9,solveBezier:()=>yL,splitBezier:()=>yP,toRadians:()=>fg,toTooltipHtml:()=>vs});var Ii=class extends yG{constructor(){super(),this.centerX=0,this.centerY=0,this.radius=10,this.startAngle=0,this.endAngle=2*Math.PI,this.counterClockwise=!1,this.type=0,this.restoreOwnStyles()}get fullPie(){return uZ(fd(this.startAngle),fd(this.endAngle))}updatePath(){let e=this.path;e.clear(),e.arc(this.centerX,this.centerY,this.radius,this.startAngle,this.endAngle,this.counterClockwise),1===this.type?e.closePath():2!==this.type||this.fullPie||(e.lineTo(this.centerX,this.centerY),e.closePath())}computeBBox(){return new u3(this.centerX-this.radius,this.centerY-this.radius,2*this.radius,2*this.radius)}isPointInPath(e,t){let i=this.getBBox();return 0!==this.type&&i.containsPoint(e,t)&&this.path.isPointInPath(e,t)}};Ii.className="Arc",Ii.defaultStyles=Object.assign({},fR.defaultStyles,{lineWidth:1,fillStyle:null}),c7([yB()],Ii.prototype,"centerX",2),c7([yB()],Ii.prototype,"centerY",2),c7([yB()],Ii.prototype,"radius",2),c7([yB()],Ii.prototype,"startAngle",2),c7([yB()],Ii.prototype,"endAngle",2),c7([yB()],Ii.prototype,"counterClockwise",2),c7([yB()],Ii.prototype,"type",2);var Ir=class extends fI{constructor(e,t,i=0,r){super(e,t,r),this.angle=i}createCanvasGradient(e,t){let{colorSpace:i,stops:r,angle:s}=this,a=fd(fg(s+90));if(!("createConicGradient"in e))return new fk(i,r,s).createCanvasGradient(e,t);let o=t.x+.5*t.width,n=t.y+.5*t.height;return e.createConicGradient(a,o,n)}};function Is(e,t,i){let r=Math.sqrt(e**2+t**2),s=Math.atan2(t,e)+i;return{x:Math.cos(s)*r,y:Math.sin(s)*r}}var Ia=class extends yG{constructor(){super(...arguments),this.isBeveled=!0,this.columnWidth=0,this.startAngle=0,this.endAngle=0,this.outerRadius=0,this.innerRadius=0,this.axisInnerRadius=0,this.axisOuterRadius=0,this.isRadiusAxisReversed=!1}set cornerRadius(e){}computeBBox(){let{innerRadius:e,outerRadius:t,columnWidth:i}=this,r=this.getRotation(),s=-i/2,a=i/2,o=-t,n=-e,l=1/0,h=1/0,d=-1/0,c=-1/0;for(let e=0;e<4;e+=1){let{x:t,y:i}=Is(e%2==0?s:a,e<2?o:n,r);l=Math.min(t,l),h=Math.min(i,h),d=Math.max(t,d),c=Math.max(i,c)}return new u3(l,h,d-l,c-h)}getRotation(){let{startAngle:e,endAngle:t}=this,i=fv(e,t);return fd(e+i/2+Math.PI/2)}updatePath(){let{isBeveled:e}=this;e?this.updateBeveledPath():this.updateRectangularPath(),this.checkPathDirty()}updateRectangularPath(){let{columnWidth:e,innerRadius:t,outerRadius:i,path:r}=this,s=-e/2,a=e/2,o=-i,n=-t,l=this.getRotation(),h=[[s,n],[s,o],[a,o],[a,n]].map(([e,t])=>Is(e,t,l));r.clear(!0),r.moveTo(h[0].x,h[0].y),r.lineTo(h[1].x,h[1].y),r.lineTo(h[2].x,h[2].y),r.lineTo(h[3].x,h[3].y),r.closePath()}updateBeveledPath(){let{columnWidth:e,path:t,outerRadius:i,innerRadius:r,axisInnerRadius:s,axisOuterRadius:a,isRadiusAxisReversed:o}=this,n=uZ(r,s),l=Math.asin(e/2/r),h=this.getRotation(),d=(e,t)=>Is(e,t,h),c=(e,t)=>Math.sqrt(e**2+t**2),u=(e,t)=>t>e?0:Math.sqrt(e**2-t**2),p=(e,t,i)=>i?e<t:e>t,g=n&&!isNaN(l)&&l<Math.PI/6,m=-e/2,f=e/2,v=-i,y=-r*(g?Math.cos(l):1),C=p(a,c(r,e/2),!o);if(C){let e=u(a,r);m=-e,f=e}t.clear(!0);let w=d(m,y);t.moveTo(w.x,w.y);let b=uZ(r,i),S=p(a,c(i,e/2),!o);if(b&&g)t.arc(0,0,r,fd(-l-Math.PI/2)+h,fd(l-Math.PI/2)+h,!1);else if(S){let r=-u(a,e/2),s=u(a,i);if(!C){let e=d(m,r);t.lineTo(e.x,e.y)}if(t.arc(0,0,a,Math.atan2(r,m)+h,Math.atan2(v,-s)+h,!1),!uZ(s,0)){let e=d(s,v);t.lineTo(e.x,e.y)}t.arc(0,0,a,Math.atan2(v,s)+h,Math.atan2(r,f)+h,!1)}else{let e=d(m,v),i=d(f,v);t.lineTo(e.x,e.y),t.lineTo(i.x,i.y)}let x=d(f,y);if(t.lineTo(x.x,x.y),g)t.arc(0,0,r,fd(l-Math.PI/2)+h,fd(-l-Math.PI/2)+h,!0);else{let e=d(m,y);t.lineTo(e.x,e.y)}t.closePath()}};function Io(e,t,i,r,s){let a=fv(e,t),o=a*(1-r)/2;if(e+=o,t-=o,a<.001)return 2*i*s;if(a>=2*Math.PI){let i=e+a/2;e=i-Math.PI,t=i+Math.PI}let n=i*Math.cos(e),l=i*Math.sin(e),h=Math.floor(Math.sqrt((n-i*Math.cos(t))**2+(l-i*Math.sin(t))**2));return Math.max(1,Math.min(2*i*s,h))}Ia.className="RadialColumnShape",c7([yB()],Ia.prototype,"isBeveled",2),c7([yB()],Ia.prototype,"columnWidth",2),c7([yB()],Ia.prototype,"startAngle",2),c7([yB()],Ia.prototype,"endAngle",2),c7([yB()],Ia.prototype,"outerRadius",2),c7([yB()],Ia.prototype,"innerRadius",2),c7([yB()],Ia.prototype,"axisInnerRadius",2),c7([yB()],Ia.prototype,"axisOuterRadius",2),c7([yB()],Ia.prototype,"isRadiusAxisReversed",2);var In=class extends yG{constructor(e=""){super(),this.x=0,this.y=0,this.commands=[],this._d="",this.d=e}get d(){return this._d}set d(e){if(e!==this._d){for(let[t,i,r]of(this._d=e,this.commands.length=0,e.matchAll(/([A-Z])([0-9. ]*)/g))){let e=r.split(/\s+/g).map(Number);this.commands.push([i,e])}this.checkPathDirty()}}updatePath(){let{path:e,x:t,y:i}=this;e.clear();let r=t,s=i;for(let[a,o]of this.commands)switch(a){case"M":e.moveTo(t+o[0],i+o[1]),r=t+o[0];break;case"C":e.cubicCurveTo(t+o[0],i+o[1],t+o[2],i+o[3],t+o[4],i+o[5]),r=t+o[4],s=i+o[5];break;case"H":e.lineTo(t+o[0],s),r=i+o[0];break;case"L":e.lineTo(t+o[0],i+o[1]),r=t+o[0],s=i+o[1];break;case"V":e.lineTo(r,i+o[0]),s=i+o[0];break;case"Z":e.closePath();break;default:throw Error(`Could not translate command '${a}' with '${o.join(" ")}'`)}e.closePath()}};c7([yB()],In.prototype,"x",2),c7([yB()],In.prototype,"y",2);var Il=class e extends wH{updatePath(){let t=this.size/2;super.applyPath(t,e.moves)}};Il.className="ArrowUp",Il.moves=[{x:0,y:0,t:"move"},{x:1,y:1.2},{x:-.5,y:0},{x:0,y:.8},{x:-1,y:0},{x:0,y:-.8},{x:-.5,y:0}];var Ih=Il,Id=class extends wH{updatePath(){let e=this.size/2;super.applyPath(e,Ih.moves.map(e=>({x:-1*e.x,y:-1*e.y})))}};Id.className="ArrowDown";var Ic={...uF,...mr},Iu=fO.toFontString,Ip={};c8(Ip,{CARTESIAN_AXIS_TYPE:()=>b4,ChartTheme:()=>DC,DEFAULT_ANNOTATION_BACKGROUND_FILL:()=>SR,DEFAULT_ANNOTATION_COLOR:()=>ST,DEFAULT_ANNOTATION_HANDLE_FILL:()=>SL,DEFAULT_AXIS_GRID_COLOUR:()=>Sr,DEFAULT_AXIS_LINE_COLOUR:()=>Ss,DEFAULT_BACKGROUND_COLOUR:()=>So,DEFAULT_CAPTION_ALIGNMENT:()=>Sc,DEFAULT_CAPTION_LAYOUT_STYLE:()=>Sd,DEFAULT_COLOURS:()=>Sl,DEFAULT_CROSS_LINES_COLOUR:()=>Sa,DEFAULT_DIVERGING_SERIES_COLOUR_RANGE:()=>SE,DEFAULT_FONT_FAMILY:()=>b7,DEFAULT_GAUGE_SERIES_COLOUR_RANGE:()=>SD,DEFAULT_GRIDLINE_ENABLED:()=>SB,DEFAULT_HIERARCHY_FILLS:()=>SI,DEFAULT_HIERARCHY_STROKES:()=>Sk,DEFAULT_INSIDE_SERIES_LABEL_COLOUR:()=>St,DEFAULT_INVERTED_LABEL_COLOUR:()=>Se,DEFAULT_LABEL_COLOUR:()=>b9,DEFAULT_MUTED_LABEL_COLOUR:()=>Si,DEFAULT_PADDING:()=>Sh,DEFAULT_POLAR_SERIES_STROKE:()=>SM,DEFAULT_SHADOW_COLOUR:()=>Sn,DEFAULT_TEXTBOX_COLOR:()=>SN,DEFAULT_TEXTBOX_FILL:()=>SP,DEFAULT_TEXTBOX_STROKE:()=>SF,DEFAULT_TEXT_ANNOTATION_COLOR:()=>SA,DEFAULT_TOOLBAR_POSITION:()=>SO,FONT_SIZE:()=>b1,FONT_WEIGHT:()=>b2,IS_DARK_THEME:()=>b8,PALETTE_ALT_DOWN_FILL:()=>Sb,PALETTE_ALT_DOWN_STROKE:()=>SC,PALETTE_ALT_NEUTRAL_FILL:()=>SS,PALETTE_ALT_NEUTRAL_STROKE:()=>Sx,PALETTE_ALT_UP_FILL:()=>Sw,PALETTE_ALT_UP_STROKE:()=>Sy,PALETTE_DOWN_FILL:()=>Sm,PALETTE_DOWN_STROKE:()=>Sp,PALETTE_NEUTRAL_FILL:()=>Sv,PALETTE_NEUTRAL_STROKE:()=>Sf,PALETTE_UP_FILL:()=>Sg,PALETTE_UP_STROKE:()=>Su,POLAR_AXIS_SHAPE:()=>b5,POLAR_AXIS_TYPE:()=>b6,POSITION:()=>b3,getChartTheme:()=>D2,markerPaletteFactory:()=>b0,singleSeriesPaletteFactory:()=>bJ,themes:()=>Ig});var Ig=pN(D1,e=>e?.()),Im={};c8(Im,{BandScale:()=>gh,ColorScale:()=>fD,ContinuousScale:()=>mo,Invalidating:()=>gn,LinearScale:()=>bd,OrdinalTimeScale:()=>mB,TimeScale:()=>mN});var If={};function Iv(e,t){let i={};if(Array.isArray(t))for(let r=0;r<e.length;r++)i[`${e[r]}`]=t[r];else for(let r=0;r<e.length;r++)i[`${e[r]}`]=t;return i}c8(If,{Color:()=>ps,Debug:()=>fn,Logger:()=>ul,Padding:()=>yn,TimeInterval:()=>uh,Vec2:()=>EN,angleBetween:()=>fv,angleDiff:()=>ff,areArrayNumbersEqual:()=>fU,checkDatum:()=>vf,clamp:()=>uW,clampArray:()=>u$,clockwiseAngle:()=>fC,clockwiseAngles:()=>fw,countFractionDigits:()=>u0,createId:()=>uB,day:()=>uy,deepClone:()=>fY,displacePointFromVector:()=>fy,extent:()=>mk,findMinMax:()=>uY,findRangeExtent:()=>uK,formatNormalizedPercentage:()=>u1,formatPercentage:()=>u2,friday:()=>uE,hour:()=>uv,interpolateColor:()=>po,interpolateNumber:()=>pa,isBetweenAngles:()=>fp,isContinuous:()=>vm,isDate:()=>py,isDenseInterval:()=>mD,isEqual:()=>uZ,isNegative:()=>uq,isNumber:()=>pD,isNumberEqual:()=>uZ,isNumberObject:()=>vg,isString:()=>pM,isStringObject:()=>vp,jsonApply:()=>fq,jsonDiff:()=>f$,jsonWalk:()=>fZ,millisecond:()=>uc,minute:()=>um,mod:()=>uJ,monday:()=>ub,month:()=>uI,normalisedExtentWithMetadata:()=>mT,normalizeAngle180:()=>fu,normalizeAngle360:()=>fd,normalizeAngle360Inclusive:()=>fc,range:()=>mE,resetIds:()=>uO,round:()=>uX,sanitizeHtml:()=>S_,saturday:()=>uD,second:()=>up,setAttribute:()=>f7,setAttributes:()=>f9,shallowClone:()=>fK,sunday:()=>uw,thursday:()=>uM,tickFormat:()=>mM,tickStep:()=>mS,ticks:()=>mw,toDegrees:()=>fm,toFixed:()=>uQ,toRadians:()=>fg,transformIntegratedCategoryValue:()=>vv,tuesday:()=>uS,utcDay:()=>uR,utcHour:()=>uA,utcMinute:()=>uT,utcMonth:()=>uL,utcYear:()=>uP,uuid:()=>uG,wednesday:()=>ux,year:()=>uk,zipObject:()=>Iv});var Iy={};function IC(){return(e,t)=>{let i=[`Property [${e}] is deprecated.`,t].filter(Boolean).join(" ");ul.warnOnce(i)}}function Iw(e,t){let i=IC(),r=t?.default;return pd((t,s,a)=>(a!==r&&i(s.toString(),e),a))}function Ib(e,t){let i=IC();return pd((r,s,a)=>(a!==r[e]&&(i(s.toString(),`Use [${e}] instead.`),pz(r,e,t?t(a):a)),pn),(t,r)=>(i(r.toString(),`Use [${e}] instead.`),pB(t,e)))}function IS(e,t,i){let r;if(!(e>t)){for(;t>=e;){let s=Math.floor((t+e)/2),a=i(s);null==a?t=s-1:(r=a,e=s+1)}return r}}c8(Iy,{AND:()=>gg,ARRAY:()=>gk,ARRAY_OF:()=>gT,AbstractBarSeries:()=>MA,AbstractBarSeriesProperties:()=>MT,ActionOnSet:()=>f2,Animation:()=>p0,AnimationManager:()=>Cg,Axis:()=>v2,AxisInterval:()=>vV,AxisLabel:()=>vj,AxisTick:()=>vU,AxisTicks:()=>IT,BOOLEAN:()=>gy,BOOLEAN_ARRAY:()=>gG,Background:()=>bC,BackgroundModule:()=>bw,BaseModuleInstance:()=>yi,BaseProperties:()=>gd,COLOR_STRING:()=>gO,COLOR_STRING_ARRAY:()=>gB,CachedTextMeasurer:()=>fN,CachedTextMeasurerPool:()=>fF,CartesianAxis:()=>v6,CartesianSeries:()=>bs,CartesianSeriesNodeEvent:()=>bi,CartesianSeriesProperties:()=>br,CategoryAxis:()=>v5,ChartAxisDirection:()=>mt,ChartEventManager:()=>Cf,ChartOptions:()=>D6,ChartUpdateType:()=>CH,ContextMenuRegistry:()=>Cv,Cursor:()=>CC,CursorManager:()=>Cw,DATE:()=>gP,DATE_ARRAY:()=>gV,DATE_OR_DATETIME_MS:()=>gF,DEFAULT_CARTESIAN_DIRECTION_KEYS:()=>be,DEFAULT_CARTESIAN_DIRECTION_NAMES:()=>bt,DEFAULT_TOOLTIP_CLASS:()=>vt,DEFAULT_TOOLTIP_DARK_CLASS:()=>vi,DEGREE:()=>gD,DIRECTION:()=>g0,DOMManager:()=>yI,DataController:()=>C0,DataModel:()=>CJ,DataModelSeries:()=>w3,DataService:()=>y7,Default:()=>vz,Deprecated:()=>Iw,DeprecatedAndRenamedTo:()=>Ib,EMPTY_TOOLTIP_CONTENT:()=>vr,FONT_STYLE:()=>gK,FONT_WEIGHT:()=>gZ,FUNCTION:()=>gC,GREATER_THAN:()=>gL,GestureDetector:()=>CS,GroupedCategoryAxis:()=>yt,HierarchyNode:()=>IM,HierarchySeries:()=>IE,HierarchySeriesProperties:()=>ID,HighlightManager:()=>Cx,HighlightProperties:()=>w8,HighlightStyle:()=>w7,INTERACTION_RANGE:()=>g2,INTERPOLATION_STEP_POSITION:()=>xM,INTERPOLATION_TYPE:()=>xx,InteractionManager:()=>Cu,InteractionState:()=>Ce,InterpolationProperties:()=>xE,KeyNavManager:()=>CM,LABEL_PLACEMENT:()=>g3,LARGEST_KEY_INTERVAL:()=>xe,LESS_THAN:()=>gR,LINE_CAP:()=>gH,LINE_DASH:()=>g$,LINE_JOIN:()=>gU,LINE_STYLE:()=>gW,Layers:()=>vu,LayoutElement:()=>yc,LayoutManager:()=>yu,LonLatBBox:()=>II,MARKER_SHAPE:()=>xC,MATCHING_CROSSLINE_TYPE:()=>vy,MAX_SPACING:()=>g5,MIN_SPACING:()=>g6,MercatorScale:()=>E3,ModuleRegistry:()=>yr,Motion:()=>pV,NAN:()=>gx,NODE_UPDATE_STATE_TO_PHASE_MAPPING:()=>p1,NUMBER:()=>gb,NUMBER_ARRAY:()=>gz,NUMBER_OR_NAN:()=>gI,Navigator:()=>bX,NavigatorModule:()=>bQ,NodeRegionBBoxProvider:()=>CD,OBJECT:()=>gf,OBJECT_ARRAY:()=>gj,OR:()=>gm,OVERFLOW_STRATEGY:()=>gJ,ObserveChanges:()=>f3,PHASE_METADATA:()=>pX,PHASE_ORDER:()=>pq,PLACEMENT:()=>g1,PLAIN_OBJECT:()=>gv,POINTER_INTERACTION_TYPES:()=>Cs,POSITION:()=>gY,POSITION_TOP_COORDINATES:()=>vM,POSITIVE_NUMBER:()=>gM,PolarAxis:()=>E$,PolarSeries:()=>ES,PropertiesArray:()=>gc,ProxyOnWrite:()=>f0,ProxyProperty:()=>fJ,ProxyPropertyOnWrite:()=>f1,QUICK_TRANSITION:()=>.2,RATIO:()=>gE,REAL_NUMBER:()=>gS,REGIONS:()=>CE,RegionManager:()=>CR,RepeatType:()=>pQ,SKIP_JS_BUILTINS:()=>pG,SMALLEST_KEY_INTERVAL:()=>S9,SORT_DOMAIN_GROUPS:()=>xt,STRING:()=>gw,STRING_ARRAY:()=>g_,Series:()=>ww,SeriesGroupingChangedEvent:()=>wC,SeriesItemHighlightStyle:()=>w4,SeriesMarker:()=>xw,SeriesNodeEvent:()=>wy,SeriesNodePickMode:()=>wv,SeriesProperties:()=>w9,SeriesTooltip:()=>xS,SimpleRegionBBoxProvider:()=>CI,SimpleTextMeasurer:()=>fB,StateMachine:()=>f5,TEXT_ALIGN:()=>gX,TEXT_WRAP:()=>gq,TICK_INTERVAL:()=>v_,TOOLBAR_ALIGNMENTS:()=>CL,TOOLBAR_GROUPS:()=>CP,TOOLBAR_GROUP_ORDERING:()=>CF,TOOLBAR_POSITIONS:()=>CO,TextUtils:()=>fO,TextWrapper:()=>f8,ToolbarManager:()=>CG,ToolbarPosition:()=>CN,Tooltip:()=>vo,TooltipManager:()=>Cz,TooltipPosition:()=>va,UNION:()=>g4,UpdateService:()=>CU,VERTICAL_ALIGN:()=>gQ,Validate:()=>gp,ZoomManager:()=>C_,__FORCE_MODULE_DETECTION:()=>IA,accumulateGroup:()=>xh,accumulateStack:()=>xc,accumulatedValue:()=>Sq,accumulativeValueProperty:()=>S6,addHitTestersToQuadtree:()=>MI,adjustLabelPlacement:()=>MH,animationValidation:()=>xo,area:()=>SZ,arraysEqual:()=>mA,backfillPathPointData:()=>xK,buildFormatter:()=>gr,buildResetPathFn:()=>x3,calculateDefaultTimeTickFormat:()=>go,calculateLabelChartPadding:()=>vx,calculateLabelTranslation:()=>vS,calculatePlacement:()=>ve,checkCrisp:()=>MN,childrenIter:()=>MD,circularSliceArray:()=>mF,clamp:()=>uW,clampArray:()=>u$,collapsedStartingBarPosition:()=>MB,computeBarFocusBounds:()=>MV,computeMarkerFocusBounds:()=>xU,convertValuesToScaleByDefs:()=>wb,countFractionDigits:()=>u0,createButton:()=>IR,createCheckbox:()=>IL,createDatumId:()=>xp,createDeprecationWarning:()=>IC,createElement:()=>m5,createElementId:()=>fs,createElementNS:()=>m8,createIcon:()=>IN,createSelect:()=>IP,createTextArea:()=>IF,dateToNumber:()=>gs,deconstructSelectionsOrNodes:()=>pJ,deepClone:()=>fY,deepMerge:()=>pL,defaultTimeTickFormat:()=>ga,determinePathStatus:()=>Mn,diff:()=>xu,downloadUrl:()=>m7,enterpriseModule:()=>E5,extent:()=>mk,extractDecoratedProperties:()=>pp,findMaxValue:()=>IS,findMinMax:()=>uY,findQuadtreeMatch:()=>Mk,findRangeExtent:()=>uK,fixNumericExtent:()=>CZ,focusCursorAtEnd:()=>fi,formatNormalizedPercentage:()=>u1,formatPercentage:()=>u2,fromToMotion:()=>p2,getDocument:()=>m4,getMissCount:()=>Cq,getPath:()=>pB,getPathComponents:()=>CQ,getRectConfig:()=>MF,getWindow:()=>m6,groupAccumulativeValueProperty:()=>S8,groupAverage:()=>SK,groupBy:()=>mP,groupCount:()=>SY,groupStackValueProperty:()=>S7,groupSum:()=>SW,initMenuKeyNav:()=>bA,initRovingTabIndex:()=>bk,initToolbarKeyNav:()=>bI,isAnimatingFloatingPosition:()=>CB,isArray:()=>pm,isBoolean:()=>pf,isButtonClickEvent:()=>bL,isDate:()=>pv,isDecoratedObject:()=>pc,isDefined:()=>pg,isEnumKey:()=>pk,isEnumValue:()=>pT,isEqual:()=>uZ,isFiniteNumber:()=>pD,isFunction:()=>pw,isHtmlElement:()=>pI,isNegative:()=>uq,isNumber:()=>pE,isObject:()=>pb,isObjectLike:()=>pS,isPlainObject:()=>px,isProperties:()=>gu,isRegExp:()=>pC,isString:()=>pM,isSymbol:()=>pA,isValidDate:()=>py,jsonApply:()=>fq,jsonDiff:()=>f$,jsonWalk:()=>fZ,keyProperty:()=>S2,labelDirectionHandling:()=>vL,listDecoratedProperties:()=>pu,makeAccessibleClickListener:()=>bR,mapValues:()=>pN,markerFadeInAnimation:()=>xG,markerPaletteFactory:()=>b0,markerScaleInAnimation:()=>xz,markerSwipeScaleInAnimation:()=>x_,mergeArrayDefaults:()=>pF,mergeDefaults:()=>pP,midpointStartingBarPosition:()=>MG,minMax:()=>xW,mod:()=>uJ,moduleRegistry:()=>ys,nearestSquared:()=>uH,nearestSquaredInContainer:()=>uU,normaliseGroupTo:()=>xr,normalisePropertyTo:()=>xa,normalisedExtentWithMetadata:()=>mT,objectEqualWith:()=>pR,pairCategoryData:()=>Mo,pairContinuousData:()=>Ma,partialAssign:()=>p_,pathFadeInAnimation:()=>x1,pathFadeOutAnimation:()=>x2,pathRangePoints:()=>Mt,pathRangePointsReverse:()=>Mi,pathRanges:()=>Me,pathSwipeInAnimation:()=>x0,pickByMatchingAngle:()=>Eb,pickNode:()=>wS,plotPath:()=>xX,predicateWithMessage:()=>g8,prepareAreaPathAnimation:()=>Mx,prepareAxisAnimationContext:()=>v$,prepareAxisAnimationFunctions:()=>vZ,prepareBarAnimationFunctions:()=>Mz,prepareLinePathAnimation:()=>Md,prepareLinePathAnimationFns:()=>Mh,prepareLinePathPropertyAnimation:()=>Ml,prepareMarkerAnimation:()=>xH,preparePieSeriesAnimationFunctions:()=>EC,range:()=>S$,rangedValueProperty:()=>S4,renderPartialPath:()=>xJ,resetAxisGroupFn:()=>vq,resetAxisLabelSelectionFn:()=>vQ,resetAxisLineSelectionFn:()=>vJ,resetAxisSelectionFn:()=>vX,resetBarSelectionsFn:()=>M_,resetIds:()=>uO,resetLabelFn:()=>xf,resetMarkerFn:()=>xV,resetMarkerPositionFn:()=>xj,resetMotion:()=>ms,resetPieSelectionsFn:()=>Ew,round:()=>uX,scale:()=>Mr,seriesLabelFadeInAnimation:()=>xg,seriesLabelFadeOutAnimation:()=>xm,setDocument:()=>m9,setElementBBox:()=>ft,setPath:()=>pz,setWindow:()=>fe,shallowClone:()=>fK,singleSeriesPaletteFactory:()=>bJ,splitPairData:()=>xQ,staticFromToMotion:()=>p3,stringify:()=>me,sum:()=>SU,sumValues:()=>SH,toArray:()=>mR,toFixed:()=>uQ,toTooltipHtml:()=>vs,trailingAccumulatedValue:()=>SX,trailingAccumulatedValueProperty:()=>S5,unique:()=>mL,updateClipPath:()=>x4,updateLabelNode:()=>Mj,updateRect:()=>MP,validateCrossLineValues:()=>vC,valueProperty:()=>S3,without:()=>pO});var Ix=class e{constructor(e,t,i,r,s,a,o,n,l,h,d){this.series=e,this.index=t,this.datum=i,this.size=r,this.colorValue=s,this.fill=a,this.stroke=o,this.sumSize=n,this.depth=l,this.parent=h,this.children=d,this.midPoint={x:0,y:0}}contains(e){let t=e;for(;null!=t&&t.index>=this.index;){if(t===this)return!0;t=t.parent}return!1}walk(t,i=e.Walk.PreOrder){i===e.Walk.PreOrder&&t(this),this.children.forEach(e=>{e.walk(t,i)}),i===e.Walk.PostOrder&&t(this)}*[Symbol.iterator](){for(let e of(yield this,this.children))yield*e}};Ix.Walk={PreOrder:0,PostOrder:1};var IM=Ix,IE=class extends ww{constructor(e){super({moduleCtx:e,pickModes:[3,0],contentGroupVirtual:!1}),this.rootNode=new IM(this,0,void 0,0,void 0,void 0,void 0,0,void 0,void 0,[]),this.colorDomain=[0,0],this.maxDepth=0,this.focusPath=[],this.animationState=new f5("empty",{empty:{update:{target:"ready",action:e=>this.animateEmptyUpdateReady(e)},reset:"empty",skip:"ready"},ready:{updateData:"waiting",clear:"clearing",highlight:e=>this.animateReadyHighlight(e),resize:e=>this.animateReadyResize(e),reset:"empty",skip:"ready"},waiting:{update:{target:"ready",action:e=>this.animateWaitingUpdateReady(e)},reset:"empty",skip:"ready"},clearing:{update:{target:"empty",action:e=>this.animateClearingUpdateEmpty(e)},reset:"empty",skip:"ready"}},()=>this.checkProcessedDataAnimatable())}resetAnimation(e){"initial"===e?this.animationState.transition("reset"):"ready"===e&&this.animationState.transition("skip")}async processData(){let e;let{childrenKey:t,sizeKey:i,colorKey:r,fills:s,strokes:a,colorRange:o}=this.properties,n=0,l=()=>n+=1,h=0,d=1/0,c=-1/0,u=Array((this.data?.length??0)+1).fill(void 0),p=(e,s)=>{let a=l(),o=null!=s.depth?s.depth+1:0,n=null!=t?e[t]:void 0,p=null==n||0===n.length,m=null!=i?e[i]:void 0,f=m=Number.isFinite(m)?Math.max(m,0):p?1:0;h=Math.max(h,o);let v=null!=r?e[r]:void 0;return"number"==typeof v&&(u[a]=v,d=Math.min(d,v),c=Math.max(c,v)),g(new IM(this,a,e,m,v,void 0,void 0,f,o,s,[]),n)},g=(e,t)=>(t?.forEach(t=>{let i=p(t,e);e.children.push(i),e.sumSize+=i.sumSize}),e),m=g(new IM(this,0,void 0,0,void 0,void 0,void 0,0,void 0,void 0,[]),this.data),f=[d,c];null!=o&&Number.isFinite(d)&&Number.isFinite(c)&&((e=new fD).domain=f,e.range=o,e.update()),m.children.forEach((t,i)=>{t.walk(t=>{let r;let o=u[t.index];null!=o&&(r=e?.convert(o)),r??(r=s?.[i%s.length]),t.fill=r,t.stroke=null==e?a?.[i%a.length]:"rgba(0, 0, 0, 0.2)"})}),this.rootNode=m,this.maxDepth=h,this.colorDomain=f,this.focusPath=[{nodeDatum:this.rootNode,childIndex:0}]}async update({seriesRect:e}){await this.updateSelections(),await this.updateNodes();let t=this.getAnimationData();this.checkResize(e)&&this.animationState.transition("resize",t),this.animationState.transition("update",t)}resetAllAnimation(e){let t=this.animationResetFns?.datum;this.ctx.animationManager.stopByAnimationGroupId(this.id),null!=t&&ms(e.datumSelections,t)}animateEmptyUpdateReady(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(e)}animateWaitingUpdateReady(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(e)}animateReadyHighlight(e){let t=this.animationResetFns?.datum;null!=t&&ms([e],t)}animateReadyResize(e){this.resetAllAnimation(e)}animateClearingUpdateEmpty(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(e)}animationTransitionClear(){this.animationState.transition("clear",this.getAnimationData())}getAnimationData(){return{datumSelections:[this.groupSelection]}}isProcessedDataAnimatable(){return!0}checkProcessedDataAnimatable(){this.isProcessedDataAnimatable()||this.ctx.animationManager.skipCurrentBatch()}getLabelData(){return[]}getSeriesDomain(){return[NaN,NaN]}getLegendData(e){let{colorKey:t,colorName:i,colorRange:r,visible:s}=this.properties;return"gradient"===e&&null!=t&&null!=r?[{legendType:"gradient",enabled:s,seriesId:this.id,colorName:i,colorRange:r,colorDomain:this.colorDomain}]:[]}getDatumIdFromData(e){return`${e.index}`}getDatumId(e){return this.getDatumIdFromData(e)}pickFocus(e){if(0===this.rootNode.children.length)return;0===this.focusPath.length&&ul.error("this.focusPath should not be empty");let{datumIndexDelta:t,otherIndexDelta:i}=e,{focusPath:r}=this,s=r.length-2;if(0!==i||1===r.length){let e=Math.max(0,s+i);if(void 0!==r[e+1])return r.length=e+2,this.computeFocusOutputs(r[e+1]);{let t=r[r.length-1];for(;t.nodeDatum.children.length>0&&(t.nodeDatum.depth??-1)<e;){let e={nodeDatum:t.nodeDatum.children[0],childIndex:0};r.push(e),t=e}return this.computeFocusOutputs(t)}}if(0===t)return this.computeFocusOutputs(r[r.length-1]);{let e=r[s+1].childIndex+t,i=r[s].nodeDatum,a=i?.children?.length;if(void 0!==a){let t=uW(0,e,a-1),o={nodeDatum:i.children[t],childIndex:t};return r[s+1]=o,r.length=s+2,this.computeFocusOutputs(o)}}}getDatumAriaText(e,t){if(!(e instanceof IM)){ul.error(`datum is not HierarchyNode: ${e}`);return}return this.ctx.localeManager.t("ariaAnnounceHierarchyDatum",{level:(e.depth??-1)+1,count:e.children.length,description:t})}computeFocusOutputs({nodeDatum:e,childIndex:t}){let i=this.computeFocusBounds(e);if(i)return{datum:e,datumIndex:t,otherIndex:e.depth,bounds:i,showFocusBox:!0}}},ID=class extends w9{constructor(){super(...arguments),this.childrenKey="children",this.fills=Object.values(Ed),this.strokes=Object.values(Ec)}};c7([gp(gw)],ID.prototype,"childrenKey",2),c7([gp(gw,{optional:!0})],ID.prototype,"sizeKey",2),c7([gp(gw,{optional:!0})],ID.prototype,"colorKey",2),c7([gp(gw,{optional:!0})],ID.prototype,"colorName",2),c7([gp(gB)],ID.prototype,"fills",2),c7([gp(gB)],ID.prototype,"strokes",2),c7([gp(gB,{optional:!0})],ID.prototype,"colorRange",2);var II=class{constructor(e,t,i,r){this.lon0=e,this.lat0=t,this.lon1=i,this.lat1=r}merge(e){this.lon0=Math.min(this.lon0,e.lon0),this.lat0=Math.min(this.lat0,e.lat0),this.lon1=Math.max(this.lon1,e.lon1),this.lat1=Math.max(this.lat1,e.lat1)}},Ik=class e{constructor(){this.id=uB(this),this.axisGroup=new m1({name:`${this.id}-AxisTicks`,zIndex:2}),this.labelSelection=fl.select(this.axisGroup,fz,!1),this.interval=new vV,this.label=new vj,this.scale=new bd,this.position="bottom",this.translationX=0,this.translationY=0,this.padding=0}attachAxis(e){e.appendChild(this.axisGroup)}calculateLayout(){this.scale.interval=this.interval.step;let e=[],t=this.generateTicks(),{translationX:i,translationY:r}=this;return this.labelSelection.update(t.ticks.map(e=>this.createLabelDatum(e)),e=>e.appendChild(new fz),e=>e.tickId),this.labelSelection.each((t,i)=>{t.setProperties(i),i.visible&&e.push(t.getBBox())}),this.axisGroup.setProperties({translationX:i,translationY:r}),u3.merge(e)}getLabelParams(e){let{padding:t}=this,{translate:i}=e;switch(this.position){case"top":case"bottom":return{x:i,y:t,textAlign:"center",textBaseline:"top"};case"left":case"right":return{x:t,y:i,textAlign:"start",textBaseline:"middle"}}}inRange(e,t=.001){let[i,r]=uY(this.scale.range);return e>=i-t&&e<=r+t}createLabelDatum(e){let{x:t,y:i,textBaseline:r,textAlign:s}=this.getLabelParams(e);return{visible:!!e.tickLabel,tickId:e.tickId,fill:this.label.color,fontFamily:this.label.fontFamily,fontSize:this.label.fontSize,fontStyle:this.label.fontStyle,fontWeight:this.label.fontWeight,rotation:0,rotationCenterX:0,text:e.tickLabel,textAlign:s,textBaseline:r,x:t,y:i}}generateTicks(){let{minSpacing:t,maxSpacing:i}=this.interval,{maxTickCount:r,minTickCount:s,tickCount:a}=function(e,t,i,r,s){s=Math.max(s,e/(r+1)),isNaN(t)&&(t=s),isNaN(i)&&(i=e),t>i&&(t===s?t=i:i=t);let a=uW(1,Math.floor(e/t),Math.min(Math.floor(e),100)),o=Math.min(a,Math.ceil(e/i)),n=uW(o,r,a);return{minTickCount:o,maxTickCount:a,tickCount:n}}(uX(uK(this.scale.range),2),t,i,e.DefaultTickCount,e.DefaultMinSpacing);a&&(this.scale.tickCount=a,this.scale.minTickCount=s,this.scale.maxTickCount=r);let o=this.getTicksData();if("bottom"===this.position||"top"===this.position){let e=fF.getMeasurer({font:this.label}),t=this.scale.getDomain(),i=t[0]>t[1]?-1:1,r=-1/0*i;o.ticks=o.ticks.filter(t=>Math.sign(t.translate-r)===i&&(r=t.translate+e.textWidth(t.tickLabel,!0)*i,!0))}return o}getTicksData(){let e=[],t=this.scale.ticks(),i=t.reduce((e,t)=>Math.max(e,"number"==typeof t?u0(t):0),0),r=function(){let e=new Map;return t=>{let i=e.get(t);return i?(e.set(t,i+1),`${t}${i}`):(e.set(t,1),t)}}(),s=this.label.format?this.scale.tickFormat({ticks:t,specifier:this.label.format}):e=>pE(e)?e.toFixed(i):String(e);for(let a=0;a<t.length;a++){let o=t[a],n=this.scale.convert(o);if(!this.inRange(n))continue;let l=this.label.formatter?.({value:o,index:a,fractionDigits:i})??s(o),h=r(l);e.push({tick:o,tickId:h,tickLabel:l,translate:n})}return{rawTicks:t,fractionDigits:i,ticks:e}}};Ik.DefaultTickCount=5,Ik.DefaultMinSpacing=50;var IT=Ik,IA=0;function IR(e,t){let i=m5("button",IO("ag-charts-input ag-charts-button",t));return void 0!==e.label?i.append(e.label):(i.append(IN(e.icon)),i.ariaLabel=e.altText),i.addEventListener("click",e.onPress),f9(i,t),i}function IL(e,t){let i=m5("input",IO("ag-charts-input ag-charts-checkbox",t));return i.type="checkbox",i.checked=e.checked,i.addEventListener("change",t=>e.onChange(i.checked,t)),i.addEventListener("keydown",e=>{bL(e)&&(e.preventDefault(),i.click())}),f9(i,t),i}function IP(e,t){let i=m5("select",IO("ag-charts-input ag-charts-select",t));return i.append(...e.options.map(e=>{let t=m5("option");return t.value=e.value,t.textContent=e.label,t})),i.value=e.value,i.addEventListener("change",t=>e.onChange(i.value,t)),f9(i,t),i}function IF(e,t){let i=m5("textarea",IO("ag-charts-input ag-charts-textarea",t));return i.value=e.value,i.addEventListener("input",t=>e.onChange(i.value,t)),f9(i,t),i}function IN(e){let t=m5("span",`ag-charts-icon ag-charts-icon-${e}`);return f7(t,"aria-hidden",!0),t}function IO(e,t){return null==t?e:`${e} ${t.class}`}var IB=Object.defineProperty,IG=Object.getOwnPropertyDescriptor,Iz=Object.getOwnPropertyNames,I_=Object.prototype.hasOwnProperty,IV=(e,t)=>{for(var i in t)IB(e,i,{get:t[i],enumerable:!0})},Ij=(e,t,i,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of Iz(t))I_.call(e,s)||s===i||IB(e,s,{get:()=>t[s],enumerable:!(r=IG(t,s))||r.enumerable});return e},IH=(e,t,i)=>(Ij(e,t,"default"),i&&Ij(i,t,"default")),IU={};IV(IU,{AdvancedFilterModule:()=>kJ,AgDialog:()=>ks,AgGroupComponent:()=>IQ,AgGroupComponentSelector:()=>I1,AgMenuItemComponent:()=>kn,AgMenuItemRenderer:()=>Iq,AgMenuList:()=>ka,AgMenuPanel:()=>ko,AgPanel:()=>kr,AgPrimaryCols:()=>PK,AgRichSelect:()=>I9,ClipboardModule:()=>LL,ColumnsToolPanelModule:()=>PQ,EnterpriseCoreModule:()=>IX,ExcelExportModule:()=>Oa,FiltersToolPanelModule:()=>Oc,GridChartsModule:()=>LS,GroupCellRenderer:()=>kp,GroupCellRendererCtrl:()=>kc,LicenseManager:()=>IZ,MasterDetailModule:()=>OC,MenuModule:()=>OV,MultiFilter:()=>Oj,MultiFilterModule:()=>O$,PillDragComp:()=>ke,PillDropZonePanel:()=>kt,PivotDropZonePanel:()=>LY,RangeSelectionModule:()=>Te,RichSelectModule:()=>OK,RowGroupDropZonePanel:()=>LK,RowGroupingModule:()=>Pw,ServerSideRowModelModule:()=>Bh,SetFilter:()=>Bb,SetFilterModule:()=>Bk,SideBarModule:()=>Pz,SparklinesModule:()=>GC,StatusBarModule:()=>GL,TabbedLayout:()=>kd,ToolPanelColDefService:()=>PM,ValuesDropZonePanel:()=>Pb,ViewportRowModelModule:()=>GF,VirtualList:()=>I6,VirtualListDragFeature:()=>kh,agCharts:()=>Lx,checkboxStyleDefault:()=>zs,colorSchemeDark:()=>zl,colorSchemeDarkBlue:()=>zd,colorSchemeDarkWarm:()=>zh,colorSchemeLight:()=>za,colorSchemeLightCold:()=>zn,colorSchemeLightWarm:()=>zo,createPart:()=>GB,createTheme:()=>G0,exportMultipleSheetsAsExcel:()=>N9,getMultipleSheetsAsExcel:()=>N7,getParamType:()=>GW,iconSetAlpine:()=>zc,iconSetMaterial:()=>zu,iconSetQuartz:()=>zf,iconSetQuartzBold:()=>zC,iconSetQuartzLight:()=>zv,iconSetQuartzRegular:()=>zy,inputStyleBase:()=>zw,inputStyleBordered:()=>zb,inputStyleUnderlined:()=>zS,paramValueToCss:()=>GQ,tabStyleAlpine:()=>zD,tabStyleBase:()=>zx,tabStyleMaterial:()=>zE,tabStyleQuartz:()=>zM,tabStyleRolodex:()=>zI,themeAlpine:()=>zA,themeBalham:()=>zR,themeQuartz:()=>zT});var IW=class{constructor(){this.ieCompatibility=!1}init(){this.ieCompatibility="5d41402abc4b2a76b9719d911017c592"!=this.md5("hello")}md5cycle(e,t){let i=e[0],r=e[1],s=e[2],a=e[3];i=this.ff(i,r,s,a,t[0],7,-680876936),a=this.ff(a,i,r,s,t[1],12,-389564586),s=this.ff(s,a,i,r,t[2],17,606105819),r=this.ff(r,s,a,i,t[3],22,-1044525330),i=this.ff(i,r,s,a,t[4],7,-176418897),a=this.ff(a,i,r,s,t[5],12,1200080426),s=this.ff(s,a,i,r,t[6],17,-1473231341),r=this.ff(r,s,a,i,t[7],22,-45705983),i=this.ff(i,r,s,a,t[8],7,1770035416),a=this.ff(a,i,r,s,t[9],12,-1958414417),s=this.ff(s,a,i,r,t[10],17,-42063),r=this.ff(r,s,a,i,t[11],22,-1990404162),i=this.ff(i,r,s,a,t[12],7,1804603682),a=this.ff(a,i,r,s,t[13],12,-40341101),s=this.ff(s,a,i,r,t[14],17,-1502002290),r=this.ff(r,s,a,i,t[15],22,1236535329),i=this.gg(i,r,s,a,t[1],5,-165796510),a=this.gg(a,i,r,s,t[6],9,-1069501632),s=this.gg(s,a,i,r,t[11],14,643717713),r=this.gg(r,s,a,i,t[0],20,-373897302),i=this.gg(i,r,s,a,t[5],5,-701558691),a=this.gg(a,i,r,s,t[10],9,38016083),s=this.gg(s,a,i,r,t[15],14,-660478335),r=this.gg(r,s,a,i,t[4],20,-405537848),i=this.gg(i,r,s,a,t[9],5,568446438),a=this.gg(a,i,r,s,t[14],9,-1019803690),s=this.gg(s,a,i,r,t[3],14,-187363961),r=this.gg(r,s,a,i,t[8],20,1163531501),i=this.gg(i,r,s,a,t[13],5,-1444681467),a=this.gg(a,i,r,s,t[2],9,-51403784),s=this.gg(s,a,i,r,t[7],14,1735328473),r=this.gg(r,s,a,i,t[12],20,-1926607734),i=this.hh(i,r,s,a,t[5],4,-378558),a=this.hh(a,i,r,s,t[8],11,-2022574463),s=this.hh(s,a,i,r,t[11],16,1839030562),r=this.hh(r,s,a,i,t[14],23,-35309556),i=this.hh(i,r,s,a,t[1],4,-1530992060),a=this.hh(a,i,r,s,t[4],11,1272893353),s=this.hh(s,a,i,r,t[7],16,-155497632),r=this.hh(r,s,a,i,t[10],23,-1094730640),i=this.hh(i,r,s,a,t[13],4,681279174),a=this.hh(a,i,r,s,t[0],11,-358537222),s=this.hh(s,a,i,r,t[3],16,-722521979),r=this.hh(r,s,a,i,t[6],23,76029189),i=this.hh(i,r,s,a,t[9],4,-640364487),a=this.hh(a,i,r,s,t[12],11,-421815835),s=this.hh(s,a,i,r,t[15],16,530742520),r=this.hh(r,s,a,i,t[2],23,-995338651),i=this.ii(i,r,s,a,t[0],6,-198630844),a=this.ii(a,i,r,s,t[7],10,1126891415),s=this.ii(s,a,i,r,t[14],15,-1416354905),r=this.ii(r,s,a,i,t[5],21,-57434055),i=this.ii(i,r,s,a,t[12],6,1700485571),a=this.ii(a,i,r,s,t[3],10,-1894986606),s=this.ii(s,a,i,r,t[10],15,-1051523),r=this.ii(r,s,a,i,t[1],21,-2054922799),i=this.ii(i,r,s,a,t[8],6,1873313359),a=this.ii(a,i,r,s,t[15],10,-30611744),s=this.ii(s,a,i,r,t[6],15,-1560198380),r=this.ii(r,s,a,i,t[13],21,1309151649),i=this.ii(i,r,s,a,t[4],6,-145523070),a=this.ii(a,i,r,s,t[11],10,-1120210379),s=this.ii(s,a,i,r,t[2],15,718787259),r=this.ii(r,s,a,i,t[9],21,-343485551),e[0]=this.add32(i,e[0]),e[1]=this.add32(r,e[1]),e[2]=this.add32(s,e[2]),e[3]=this.add32(a,e[3])}cmn(e,t,i,r,s,a){return t=this.add32(this.add32(t,e),this.add32(r,a)),this.add32(t<<s|t>>>32-s,i)}ff(e,t,i,r,s,a,o){return this.cmn(t&i|~t&r,e,t,s,a,o)}gg(e,t,i,r,s,a,o){return this.cmn(t&r|i&~r,e,t,s,a,o)}hh(e,t,i,r,s,a,o){return this.cmn(t^i^r,e,t,s,a,o)}ii(e,t,i,r,s,a,o){return this.cmn(i^(t|~r),e,t,s,a,o)}md51(e){let t;let i=e.length,r=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=e.length;t+=64)this.md5cycle(r,this.md5blk(e.substring(t-64,t)));e=e.substring(t-64);let s=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<e.length;t++)s[t>>2]|=e.charCodeAt(t)<<(t%4<<3);if(s[t>>2]|=128<<(t%4<<3),t>55)for(this.md5cycle(r,s),t=0;t<16;t++)s[t]=0;return s[14]=8*i,this.md5cycle(r,s),r}md5blk(e){let t=[];for(let i=0;i<64;i+=4)t[i>>2]=e.charCodeAt(i)+(e.charCodeAt(i+1)<<8)+(e.charCodeAt(i+2)<<16)+(e.charCodeAt(i+3)<<24);return t}rhex(e){let t="0123456789abcdef".split(""),i="",r=0;for(;r<4;r++)i+=t[e>>8*r+4&15]+t[e>>8*r&15];return i}hex(e){for(let t=0;t<e.length;t++)e[t]=this.rhex(e[t]);return e.join("")}md5(e){return this.hex(this.md51(e))}add32(e,t){return this.ieCompatibility?this.add32Compat(e,t):this.add32Std(e,t)}add32Std(e,t){return e+t&4294967295}add32Compat(e,t){let i=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(i>>16)<<16|65535&i}},I$={"01":"GRID","02":"CHARTS","0102":"BOTH"},IY=class e{constructor(e){this.watermarkMessage=void 0,this.totalMessageLength=124,this.document=e,this.md5=new IW,this.md5.init()}validateLicense(){let t=this.getLicenseDetails(e.licenseKey),i=`AG Grid ${"BOTH"===t.currentLicenseType?"and AG Charts ":""}Enterprise`,r=void 0===t.suppliedLicenseType?"":`AG ${"BOTH"===t.suppliedLicenseType?"Grid and AG Charts":"GRID"===t.suppliedLicenseType?"Grid":"Charts"} Enterprise`;if(t.missing)(!this.isWebsiteUrl()||this.isForceWatermark())&&this.outputMissingLicenseKey(i);else if(t.expired){let s=e.getGridReleaseDate(),a=e.formatDate(s);this.outputExpiredKey(t.expiry,a,i,r)}else t.valid?t.isTrial&&t.trialExpired&&this.outputExpiredTrialKey(t.expiry,i,r):this.outputInvalidLicenseKey(!!t.incorrectLicenseType,i,r)}static extractExpiry(t){let i=t.substring(t.lastIndexOf("_")+1,t.length);return new Date(parseInt(e.decode(i),10))}static extractLicenseComponents(t){let i=t.replace(/[\u200B-\u200D\uFEFF]/g,"");if(i=i.replace(/\r?\n|\r/g,""),t.length<=32)return{md5:null,license:t,version:null,isTrial:null};let r=i.length-32,s=i.substring(r),a=i.substring(0,r),[o,n,l]=e.extractBracketedInformation(i);return{md5:s,license:a,version:o,isTrial:n,type:l}}getLicenseDetails(t){let i,r,s;let a=e.chartsLicenseManager?"BOTH":"GRID";if(tZ(t))return{licenseKey:t,valid:!1,missing:!0,currentLicenseType:a};let o=e.getGridReleaseDate(),{md5:n,license:l,version:h,isTrial:d,type:c}=e.extractLicenseComponents(t),u=n===this.md5.md5(l)&&-1===t.indexOf("For_Trialing_ag-Grid_Only"),p=null,g=!1;function m(){let e=new Date;i=p<e,r=void 0}if(u&&(u=!isNaN((p=e.extractExpiry(l)).getTime())))switch(r=o>p,h){case"legacy":case"2":d&&m();break;case"3":tZ(c)?u=!1:(s=c,c!==I$["01"]&&c!==I$["0102"]||"BOTH"===a&&"BOTH"!==s?(u=!1,g=!0):d&&m())}return u?{licenseKey:t,valid:u,expiry:e.formatDate(p),expired:r,version:h,isTrial:d,trialExpired:i,incorrectLicenseType:g,currentLicenseType:a,suppliedLicenseType:s}:{licenseKey:t,valid:u,incorrectLicenseType:g,currentLicenseType:a,suppliedLicenseType:s}}isDisplayWatermark(){return this.isForceWatermark()||!this.isLocalhost()&&!this.isWebsiteUrl()&&!tZ(this.watermarkMessage)}getWatermarkMessage(){return this.watermarkMessage||""}getHostname(){let{hostname:e=""}=(this.document.defaultView||window).location;return e}isForceWatermark(){let{pathname:e}=(this.document.defaultView||window).location;return!!e&&-1!==e.indexOf("forceWatermark")}isWebsiteUrl(){return null!==this.getHostname().match(/^((?:[\w-]+\.)?ag-grid\.com)$/)}isLocalhost(){return null!==this.getHostname().match(/^(?:127\.0\.0\.1|localhost)$/)}static formatDate(e){return e.getDate()+" "+["January","February","March","April","May","June","July","August","September","October","November","December"][e.getMonth()]+" "+e.getFullYear()}static getGridReleaseDate(){return new Date(parseInt(e.decode(e.RELEASE_INFORMATION),10))}static decode(t){let i,r,s,a,o,n,l;let h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",d="",c=0,u=t.replace(/[^A-Za-z0-9+/=]/g,"");for(;c<u.length;)a=h.indexOf(u.charAt(c++)),o=h.indexOf(u.charAt(c++)),n=h.indexOf(u.charAt(c++)),l=h.indexOf(u.charAt(c++)),i=a<<2|o>>4,r=(15&o)<<4|n>>2,s=(3&n)<<6|l,d+=String.fromCharCode(i),64!=n&&(d+=String.fromCharCode(r)),64!=l&&(d+=String.fromCharCode(s));return e.utf8_decode(d)}static utf8_decode(e){e=e.replace(/rn/g,"n");let t="";for(let i=0;i<e.length;i++){let r=e.charCodeAt(i);r<128?t+=String.fromCharCode(r):r>127&&r<2048?t+=String.fromCharCode(r>>6|192)+String.fromCharCode(63&r|128):t+=String.fromCharCode(r>>12|224)+String.fromCharCode(r>>6&63|128)+String.fromCharCode(63&r|128)}return t}static setChartsLicenseManager(e){this.chartsLicenseManager=e}static setLicenseKey(e){this.licenseKey=e,this.chartsLicenseManager&&this.chartsLicenseManager.setLicenseKey(e,!0)}static extractBracketedInformation(e){if(!e.includes("["))return["legacy",!1,void 0];let t=e.match(/\[(.*?)\]/g).map(e=>e.replace("[","").replace("]",""));if(!t||0===t.length)return["legacy",!1,void 0];let i=1===t.filter(e=>"TRIAL"===e).length,r=t.filter(e=>0===e.indexOf("v"))[0];return[r?r.replace("v",""):"legacy",i,I$[t.filter(e=>I$[e])[0]]]}centerPadAndOutput(e){let t=this.totalMessageLength-e.length;console.error(e.padStart(t/2+e.length,"*").padEnd(this.totalMessageLength,"*"))}padAndOutput(e,t="*",i=""){console.error(e.padEnd(this.totalMessageLength-i.length,t)+i)}outputInvalidLicenseKey(e,t,i){e?(this.centerPadAndOutput(""),this.centerPadAndOutput(` ${t} License `),this.centerPadAndOutput(" Incompatible License Key "),this.padAndOutput(`* Your license key is for ${i} only and does not cover you for ${t}.`," ","*")):(this.centerPadAndOutput(""),this.centerPadAndOutput(` ${t} License `),this.centerPadAndOutput(" Invalid License Key "),this.padAndOutput("* Your license key is not valid."," ","*")),this.padAndOutput("* To troubleshoot your license key visit https://ag-grid.com/licensing/."," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput(""),this.watermarkMessage="Invalid License"}outputExpiredTrialKey(e,t,i){this.centerPadAndOutput(""),this.centerPadAndOutput(` ${t} License `),this.centerPadAndOutput(" Trial Period Expired. "),this.padAndOutput(`* Your trial only license for ${i} expired on ${e}.`," ","*"),this.padAndOutput("* Please email info@ag-grid.com to purchase a license."," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput(""),this.watermarkMessage="Trial Period Expired"}outputMissingLicenseKey(e){this.centerPadAndOutput(""),this.centerPadAndOutput(` ${e} License `),this.centerPadAndOutput(" License Key Not Found "),this.padAndOutput(`* All ${e} features are unlocked for trial.`," ","*"),this.padAndOutput("* If you want to hide the watermark please email info@ag-grid.com for a trial license key."," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput(""),this.watermarkMessage="For Trial Use Only"}outputExpiredKey(e,t,i,r){this.centerPadAndOutput(""),this.centerPadAndOutput(` ${i} License `),this.centerPadAndOutput(" Incompatible Software Version "),this.padAndOutput(`* Your license key works with versions of ${r} released before ${e}.`," ","*"),this.padAndOutput(`* The version you are trying to use was released on ${t}.`," ","*"),this.padAndOutput("* Please contact info@ag-grid.com to renew your license key."," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput(""),this.watermarkMessage="License Expired"}};IY.RELEASE_INFORMATION="MTcyNjQ3MTQ2NjA5Nw==";var IK={selector:"AG-WATERMARK",component:class extends sQ{constructor(){super(`<div class="ag-watermark">
                <div data-ref="eLicenseTextRef" class="ag-watermark-text"></div>
            </div>`),this.eLicenseTextRef=null}wireBeans(e){this.licenseManager=e.licenseManager}postConstruct(){let e=this.shouldDisplayWatermark();this.setDisplayed(e),e&&(this.eLicenseTextRef.innerText=this.licenseManager.getWatermarkMessage(),window.setTimeout(()=>this.addCssClass("ag-opacity-zero"),0),window.setTimeout(()=>this.setDisplayed(!1),5e3))}shouldDisplayWatermark(){return this.licenseManager.isDisplayWatermark()}}},IZ=class extends i2{constructor(){super(...arguments),this.beanName="licenseManager"}postConstruct(){this.validateLicense()}validateLicense(){this.licenseManager=new IY(ia(this.gos)),this.licenseManager.validateLicense()}static getLicenseDetails(e){return new IY(null).getLicenseDetails(e)}getWatermarkSelector(){return IK}isDisplayWatermark(){return this.licenseManager.isDisplayWatermark()}getWatermarkMessage(){return this.licenseManager.getWatermarkMessage()}static setLicenseKey(e){IY.setLicenseKey(e)}static setChartsLicenseManager(e){IY.setChartsLicenseManager(e)}},Iq=class extends sQ{constructor(){super(),this.setTemplate("<div></div>")}init(e){this.params=e,this.cssClassPrefix=this.params.cssClassPrefix??"ag-menu-option",this.addIcon(),this.addName(),this.addShortcut(),this.addSubMenu()}configureDefaults(){return!0}addIcon(){if(this.params.isCompact)return;let e=sO(`<span data-ref="eIcon" class="${this.getClassName("part")} ${this.getClassName("icon")}" role="presentation"></span>`),{checked:t,icon:i}=this.params;t?e.appendChild(s2("check",this.gos)):i&&(sU(i)?e.appendChild(i):"string"==typeof i?e.innerHTML=i:tO("menu item icon must be DOM node or string")),this.getGui().appendChild(e)}addName(){let e=sO(`<span data-ref="eName" class="${this.getClassName("part")} ${this.getClassName("text")}">${this.params.name||""}</span>`);this.getGui().appendChild(e)}addShortcut(){if(this.params.isCompact)return;let e=sO(`<span data-ref="eShortcut" class="${this.getClassName("part")} ${this.getClassName("shortcut")}">${this.params.shortcut||""}</span>`);this.getGui().appendChild(e)}addSubMenu(){let e=sO(`<span data-ref="ePopupPointer" class="${this.getClassName("part")} ${this.getClassName("popup-pointer")}"></span>`),t=this.getGui();if(this.params.subMenu){let i=this.gos.get("enableRtl")?"smallLeft":"smallRight";r5(t,!1),e.appendChild(s2(i,this.gos))}t.appendChild(e)}getClassName(e){return`${this.cssClassPrefix}-${e}`}destroy(){super.destroy()}},IX={version:"32.2.0",moduleName:tL.EnterpriseCoreModule,beans:[IZ],userComponents:[{name:"agMenuItem",classImp:Iq}]},IQ=class extends sQ{constructor(e={}){super(function(e){let t=e.cssIdentifier||"default",i=e.direction||"vertical";return`
        <div class="ag-group ag-${t}-group" role="presentation">
            <div data-ref="eToolbar" class="ag-group-toolbar ag-${t}-group-toolbar">
                <ag-checkbox data-ref="cbGroupEnabled"></ag-checkbox>
            </div>
            <div data-ref="eContainer" class="ag-group-container ag-group-container-${i} ag-${t}-group-container"></div>
        </div>
    `}(e),[ad]),this.params=e,this.suppressEnabledCheckbox=!0,this.suppressToggleExpandOnEnableChange=!1,this.eToolbar=null,this.cbGroupEnabled=null,this.eContainer=null;let{enabled:t,items:i,suppressEnabledCheckbox:r,expanded:s,suppressToggleExpandOnEnableChange:a,useToggle:o}=e;this.cssIdentifier=e.cssIdentifier||"default",this.enabled=null==t||t,this.items=i||[],this.useToggle=o??!1,this.alignItems=e.alignItems||"center",this.expanded=null==s||s,null!=r&&(this.suppressEnabledCheckbox=r),null!=a&&(this.suppressToggleExpandOnEnableChange=a)}postConstruct(){if(this.setupTitleBar(),this.items.length){let e=this.items;this.items=[],this.addItems(e)}let e=this.localeService.getLocaleTextFunc();this.cbGroupEnabled.setLabel(e("enabled","Enabled")),this.enabled&&this.setEnabled(this.enabled,void 0,!0),this.setAlignItems(this.alignItems);let{onEnableChange:t,onExpandedChange:i,suppressOpenCloseIcons:r}=this.params;this.hideEnabledCheckbox(this.suppressEnabledCheckbox),this.hideOpenCloseIcons(r??!1),this.refreshChildDisplay(),sC(this.eContainer,this.expanded),this.cbGroupEnabled.onValueChange(e=>{this.setEnabled(e,!0,this.suppressToggleExpandOnEnableChange),this.dispatchEnableChangeEvent(e)}),null!=t&&this.onEnableChange(t),null!=i&&this.onExpandedChange(i)}refreshChildDisplay(){sC(this.eToolbar,this.expanded&&!this.suppressEnabledCheckbox),this.eTitleBar?.refreshOnExpand(this.expanded)}isExpanded(){return this.expanded}setAlignItems(e){this.alignItems!==e&&this.removeCssClass(`ag-group-item-alignment-${this.alignItems}`),this.alignItems=e;let t=`ag-group-item-alignment-${this.alignItems}`;return this.addCssClass(t),this}toggleGroupExpand(e,t){if(this.eTitleBar?.isSuppressCollapse()&&!this.useToggle)e=!0,t=!0;else if(e=null!=e?e:!this.expanded,this.expanded===e)return this;return this.expanded=e,this.refreshChildDisplay(),sC(this.eContainer,e),t||this.dispatchLocalEvent({type:e?"expanded":"collapsed"}),this}addItems(e){e.forEach(e=>this.addItem(e))}prependItem(e){this.insertItem(e,!0)}addItem(e){this.insertItem(e,!1)}insertItem(e,t){let i=this.eContainer,r=e instanceof sQ?e.getGui():e;r.classList.add("ag-group-item",`ag-${this.cssIdentifier}-group-item`),t?(i.insertAdjacentElement("afterbegin",r),this.items.unshift(r)):(i.appendChild(r),this.items.push(r))}hideItem(e,t){sC(this.items[t],!e)}getItemIndex(e){let t=e instanceof sQ?e.getGui():e;return this.items.indexOf(t)}setTitle(e){return this.eTitleBar?.setTitle(e),this}addTitleBarWidget(e){return this.eTitleBar?.addWidget(e),this}addCssClassToTitleBar(e){this.eTitleBar?.addCssClass(e)}dispatchEnableChangeEvent(e){this.dispatchLocalEvent({type:"enableChange",enabled:e})}setEnabled(e,t,i){return this.enabled=e,this.refreshDisabledStyles(),i||this.toggleGroupExpand(e),t||(this.cbGroupEnabled.setValue(e),this.eToggle?.setValue(e)),this}isEnabled(){return this.enabled}onEnableChange(e){return this.addManagedListeners(this,{enableChange:t=>e(t.enabled)}),this}onExpandedChange(e){return this.addManagedListeners(this,{expanded:()=>e(!0),collapsed:()=>e(!1)}),this}hideEnabledCheckbox(e){return this.suppressEnabledCheckbox=e,this.refreshChildDisplay(),this.refreshDisabledStyles(),this}hideOpenCloseIcons(e){return this.eTitleBar?.hideOpenCloseIcons(e),this}refreshDisabledStyles(){let e=!this.enabled;this.eContainer.classList.toggle("ag-disabled",e),this.eTitleBar?.refreshDisabledStyles(this.suppressEnabledCheckbox&&e),this.eContainer.classList.toggle("ag-disabled-group-container",e)}setupTitleBar(){let e=this.useToggle?this.createToggleTitleBar():this.createDefaultTitleBar();this.eToolbar.insertAdjacentElement("beforebegin",e.getGui())}createDefaultTitleBar(){let e=this.createManagedBean(new I0(this.params));return this.eTitleBar=e,e.refreshOnExpand(this.expanded),this.addManagedListeners(e,{expandedChanged:e=>this.toggleGroupExpand(e.expanded)}),e}createToggleTitleBar(){let e=this.createManagedBean(new hn({value:this.enabled,label:this.params.title,labelAlignment:"left",labelWidth:"flex",onValueChange:e=>{this.setEnabled(e,!0),this.dispatchEnableChangeEvent(e)}}));return e.addCssClass("ag-group-title-bar"),e.addCssClass(`ag-${this.params.cssIdentifier??"default"}-group-title-bar ag-unselectable`),this.eToggle=e,this.toggleGroupExpand(this.enabled),e}},IJ="ag-disabled-group-title-bar",I0=class extends sQ{constructor(e={}){super(function(e){let t=e.cssIdentifier??"default",i=e.suppressKeyboardNavigation?"presentation":"role";return`
        <div class="ag-group-title-bar ag-${t}-group-title-bar ag-unselectable" role="${i}">
            <span class="ag-group-title-bar-icon ag-${t}-group-title-bar-icon" data-ref="eGroupOpenedIcon" role="presentation"></span>
            <span class="ag-group-title-bar-icon ag-${t}-group-title-bar-icon" data-ref="eGroupClosedIcon" role="presentation"></span>
            <span data-ref="eTitle" class="ag-group-title ag-${t}-group-title"></span>
        </div>
    `}(e)),this.suppressOpenCloseIcons=!1,this.suppressKeyboardNavigation=!1,this.eGroupOpenedIcon=null,this.eGroupClosedIcon=null,this.eTitle=null;let{title:t,suppressOpenCloseIcons:i,suppressKeyboardNavigation:r}=e;t&&t.length>0&&(this.title=t),null!=i&&(this.suppressOpenCloseIcons=i),this.suppressKeyboardNavigation=r??!1}postConstruct(){this.setTitle(this.title),this.hideOpenCloseIcons(this.suppressOpenCloseIcons),this.setupExpandContract()}setupExpandContract(){this.eGroupClosedIcon.appendChild(s1("columnSelectClosed",this.gos,null)),this.eGroupOpenedIcon.appendChild(s1("columnSelectOpen",this.gos,null)),this.addManagedElementListeners(this.getGui(),{click:()=>this.dispatchExpandChanged(),keydown:e=>{switch(e.key){case aa.ENTER:case aa.SPACE:e.preventDefault(),this.dispatchExpandChanged();break;case aa.RIGHT:case aa.LEFT:e.preventDefault(),this.dispatchExpandChanged(e.key===aa.RIGHT)}}})}refreshOnExpand(e){this.refreshAriaStatus(e),this.refreshOpenCloseIcons(e)}refreshAriaStatus(e){this.suppressOpenCloseIcons||r5(this.getGui(),e)}refreshOpenCloseIcons(e){let t=!this.suppressOpenCloseIcons;sC(this.eGroupOpenedIcon,t&&e),sC(this.eGroupClosedIcon,t&&!e)}isSuppressCollapse(){return this.suppressOpenCloseIcons}dispatchExpandChanged(e){this.dispatchLocalEvent({type:"expandedChanged",expanded:e})}setTitle(e){let t=this.getGui(),i=!!e&&e.length>0;e=i?e:void 0,this.eTitle.textContent=e??"",sC(t,i),e!==this.title&&(this.title=e);let r=t.classList.contains(IJ);return this.refreshDisabledStyles(r),this}addWidget(e){return this.getGui().appendChild(e),this}hideOpenCloseIcons(e){return this.suppressOpenCloseIcons=e,e&&this.dispatchExpandChanged(!0),this}refreshDisabledStyles(e){let t=this.getGui();e?(t.classList.add(IJ),t.removeAttribute("tabindex")):(t.classList.remove(IJ),"string"!=typeof this.title||this.suppressKeyboardNavigation?t.removeAttribute("tabindex"):t.setAttribute("tabindex","0"))}},I1={selector:"AG-GROUP-COMPONENT",component:IQ},I2=class extends sQ{constructor(e){super(`
            <div class="ag-pill" role="option">
                <span class="ag-pill-text" data-ref="eText"></span>
                <span class="ag-button ag-pill-button" data-ref="eButton" role="presentation"></span>
            </div>
        `),this.config=e,this.eText=null,this.eButton=null}postConstruct(){let{config:e,eButton:t}=this,{onKeyDown:i,onButtonClick:r}=e;this.getGui().setAttribute("tabindex",String(this.gos.get("tabIndex"))),this.addGuiEventListener("focus",()=>{this.eButton.focus()}),i&&this.addGuiEventListener("keydown",i),r&&this.addManagedElementListeners(t,{click:r})}toggleCloseButtonClass(e,t){this.eButton.classList.toggle(e,t)}setText(e){this.eText.textContent=e}getText(){return this.eText.textContent}},I3=class extends sQ{constructor(){super(`
            <div class="ag-pill-container" role="listbox"></div>
            `),this.pills=[]}wireBeans(e){this.focusService=e.focusService}init(e){this.params=e,this.refresh()}refresh(){this.clearPills();let{params:e,onPillKeyDown:t}=this,i=e.getValue();if(!Array.isArray(i))return;let r=i.length;for(let s=0;s<r;s++){let a=i[s],o=this.createBean(new I2({onButtonClick:()=>this.onPillButtonClick(o),onKeyDown:t.bind(this)})),n=o.getGui();r9(n,s+1),r7(n,r),e.onPillMouseDown&&o.addGuiEventListener("mousedown",e.onPillMouseDown),e.announceItemFocus&&o.addGuiEventListener("focus",e.announceItemFocus),o.setText(a),o.toggleCloseButtonClass("ag-icon-cancel",!0),this.appendChild(n),this.pills.push(o)}}onNavigationKeyDown(e){let{key:t}=e;if(!this.pills.length||t!==aa.LEFT&&t!==aa.RIGHT)return;e.preventDefault();let i=ih(this.gos),r=this.getGui(),{params:s,focusService:a}=this;if(r.contains(i)){let e=a.findNextFocusableElement(r,!1,t===aa.LEFT);e?e.focus():s.eWrapper&&s.eWrapper.focus()}else{let e=a.findFocusableElements(r);e.length>0&&e[t===aa.RIGHT?0:e.length-1].focus()}}clearPills(){let e=this.getGui();e.contains(ih(this.gos))&&this.params.eWrapper&&this.params.eWrapper.focus(),sL(e),this.destroyBeans(this.pills),this.pills=[]}onPillButtonClick(e){this.deletePill(e)}onPillKeyDown(e){let t=e.key;if(t!==aa.DELETE&&t!==aa.BACKSPACE)return;e.preventDefault();let i=ia(this.gos),r=this.pills.findIndex(e=>e.getGui().contains(i.activeElement));if(-1===r)return;let s=this.pills[r];s&&this.deletePill(s,r)}deletePill(e,t){let i=e.getText(),r=(this.params.getValue()||[]).filter(e=>e!==i);if(this.params.setValue(r),!r.length&&this.params.eWrapper)this.params.eWrapper.focus();else if(null!=t){let e=this.pills[Math.min(t,this.pills.length-1)];e&&e.getFocusableElement().focus()}}destroy(){this.clearPills(),super.destroy()}},I4=class extends sQ{constructor(e){super('<div class="ag-rich-select-row" role="presentation"></div>'),this.params=e}wireBeans(e){this.userComponentFactory=e.userComponentFactory}setState(e){let t="",{params:i}=this;i.valueFormatter&&(t=i.valueFormatter(e)),this.populateWithRenderer(e,t)||this.populateWithoutRenderer(e,t),this.value=e}highlightString(e){let{parsedValue:t}=this;if(this.params.cellRenderer||!tY(t))return;let i=tY(e);if(i){let r=t?.toLocaleLowerCase().indexOf(e.toLocaleLowerCase());if(r>=0){let i=r+e.length,s=rL(t.slice(0,r),!0),a=rL(t.slice(r,i),!0),o=rL(t.slice(i));this.renderValueWithoutRenderer(`${s}<span class="ag-rich-select-row-text-highlight">${a}</span>${o}`)}else i=!1}i||this.renderValueWithoutRenderer(t)}updateSelected(e){sr(this.getGui().parentElement,e),this.addOrRemoveCssClass("ag-rich-select-row-selected",e)}getValue(){return this.value}toggleHighlighted(e){this.addOrRemoveCssClass("ag-rich-select-row-highlighted",e)}populateWithoutRenderer(e,t){let i=ia(this.gos),r=this.getGui(),s=i.createElement("span");s.style.overflow="hidden",s.style.textOverflow="ellipsis";let a=rL(tY(t)?t:e,!0);this.parsedValue=tY(a)?a:null,r.appendChild(s),this.renderValueWithoutRenderer(a),this.setTooltip({newTooltipText:this.parsedValue,shouldDisplayTooltip:()=>s.scrollWidth>s.clientWidth})}renderValueWithoutRenderer(e){let t=this.getGui().querySelector("span");t&&(t.innerHTML=tY(e)?e:"&nbsp;")}populateWithRenderer(e,t){let i,r;if(this.params.cellRenderer){let i=this.getParentComponent()?.getParentComponent();r=this.userComponentFactory.getEditorRendererDetails(this.params,{value:e,valueFormatted:t,getValue:()=>i?.getValue(),setValue:e=>{i?.setValue(e,!0)},setTooltip:(e,t)=>{this.setTooltip({newTooltipText:e,shouldDisplayTooltip:t})}})}return r&&(i=r.newAgStackInstance()),i&&sY(i,this.getGui()),!!i&&(i.then(e=>{this.addDestroyFunc(()=>{this.destroyBean(e)})}),!0)}},I6=class extends hu{constructor(e){var t;super((t=e?.cssIdentifier||"default",`<div class="ag-virtual-list-viewport ag-${t}-virtual-list-viewport" role="presentation">
            <div class="ag-virtual-list-container ag-${t}-virtual-list-container" data-ref="eContainer"></div>
        </div>`)),this.renderedRows=new Map,this.rowHeight=20,this.pageSize=-1,this.isScrolling=!1,this.isHeightFromTheme=!0,this.eContainer=null,this.awaitStableCallbacks=[];let{cssIdentifier:i="default",ariaRole:r="listbox",listName:s}=e||{};this.cssIdentifier=i,this.ariaRole=r,this.listName=s}wireBeans(e){this.resizeObserverService=e.resizeObserverService,this.animationFrameService=e.animationFrameService,this.environment=e.environment}postConstruct(){this.addScrollListener(),this.rowHeight=this.getItemHeight(),this.addResizeObserver(),this.initialiseTabGuard({onFocusIn:e=>this.onFocusIn(e),onFocusOut:e=>this.onFocusOut(e),focusInnerElement:e=>this.focusInnerElement(e),onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e)}),this.setAriaProperties(),this.addManagedEventListeners({gridStylesChanged:this.onGridStylesChanged.bind(this)})}onGridStylesChanged(e){e.listItemHeightChanged&&(this.rowHeight=this.getItemHeight(),this.refresh())}setAriaProperties(){let e=this.localeService.getLocaleTextFunc()("ariaDefaultListName",this.listName||"List"),t=this.eContainer;rQ(t,this.ariaRole),rJ(t,e)}addResizeObserver(){let e=this.resizeObserverService.observeResize(this.getGui(),()=>this.animationFrameService.requestAnimationFrame(()=>this.drawVirtualRows()));this.addDestroyFunc(e)}focusInnerElement(e){this.focusRow(e?this.model.getRowCount()-1:0)}onFocusIn(e){let t=e.target;t.classList.contains("ag-virtual-list-item")&&(this.lastFocusedRowIndex=parseInt(t.getAttribute("aria-posinset"),10)-1)}onFocusOut(e){this.getFocusableElement().contains(e.relatedTarget)||(this.lastFocusedRowIndex=null)}handleKeyDown(e){switch(e.key){case aa.UP:case aa.DOWN:this.navigate(e.key===aa.UP)&&e.preventDefault();break;case aa.PAGE_HOME:case aa.PAGE_END:case aa.PAGE_UP:case aa.PAGE_DOWN:null!==this.navigateToPage(e.key)&&e.preventDefault()}}onTabKeyDown(e){iX(e),this.forceFocusOutOfContainer(e.shiftKey)}navigate(e){if(null==this.lastFocusedRowIndex)return!1;let t=this.lastFocusedRowIndex+(e?-1:1);return!(t<0||t>=this.model.getRowCount())&&(this.focusRow(t),!0)}navigateToPage(e,t="focused"){let i=!1;"focused"===t&&(t=this.getLastFocusedRow(),i=!0);let r=this.model.getRowCount()-1,s=-1;return(e===aa.PAGE_HOME?s=0:e===aa.PAGE_END?s=r:e===aa.PAGE_DOWN?s=Math.min(t+this.pageSize,r):e===aa.PAGE_UP&&(s=Math.max(t-this.pageSize,0)),-1===s)?null:(i?this.focusRow(s):this.ensureIndexVisible(s),s)}getLastFocusedRow(){return this.lastFocusedRowIndex}focusRow(e){this.isScrolling||(this.isScrolling=!0,this.ensureIndexVisible(e),this.animationFrameService.requestAnimationFrame(()=>{if(this.isScrolling=!1,!this.isAlive())return;let t=this.renderedRows.get(e);t&&t.eDiv.focus()}))}getComponentAt(e){let t=this.renderedRows.get(e);return t&&t.rowComponent}forEachRenderedRow(e){this.renderedRows.forEach((t,i)=>e(t.rowComponent,i))}getItemHeight(){return this.isHeightFromTheme?this.environment.getDefaultListItemHeight():this.rowHeight}ensureIndexVisible(e,t=!0){let i=this.model.getRowCount();if("number"!=typeof e||e<0||e>=i)return tO("invalid row index for ensureIndexVisible: ",e),!1;let r=e*this.rowHeight,s=r+this.rowHeight,a=this.getGui(),o=a.scrollTop,n=a.offsetHeight,l=t?0:this.rowHeight;return o>r+l?(a.scrollTop=r,!0):o+n<s-l&&(a.scrollTop=s-n,!0)}setComponentCreator(e){this.componentCreator=e}setComponentUpdater(e){this.componentUpdater=e}getRowHeight(){return this.rowHeight}getScrollTop(){return this.getGui().scrollTop}setRowHeight(e){this.isHeightFromTheme=!1,this.rowHeight=e,this.refresh()}refresh(e){if(null==this.model||!this.isAlive())return;let t=this.model.getRowCount();this.eContainer.style.height=`${t*this.rowHeight}px`,this.awaitStable(()=>{this.isAlive()&&(this.canSoftRefresh(e)?this.drawVirtualRows(!0):(this.clearVirtualRows(),this.drawVirtualRows()))})}awaitStable(e){if(this.awaitStableCallbacks.push(e),this.awaitStableCallbacks.length>1)return;let t=this.model.getRowCount();tU(()=>this.eContainer.clientHeight>=t*this.rowHeight,()=>{let e=this.awaitStableCallbacks;this.awaitStableCallbacks=[],e.forEach(e=>e())})}canSoftRefresh(e){return!!(e&&this.renderedRows.size&&"function"==typeof this.model.areRowsEqual&&this.componentUpdater)}clearVirtualRows(){this.renderedRows.forEach((e,t)=>this.removeRow(t))}drawVirtualRows(e){if(!this.isAlive()||!this.model)return;let t=this.getGui(),i=t.scrollTop,r=i+t.offsetHeight,s=Math.floor(i/this.rowHeight),a=Math.floor(r/this.rowHeight);this.pageSize=Math.floor((r-i)/this.rowHeight),this.ensureRowsRendered(s,a,e)}ensureRowsRendered(e,t,i){this.renderedRows.forEach((i,r)=>{(r<e||r>t)&&r!==this.lastFocusedRowIndex&&this.removeRow(r)}),i&&this.refreshRows();for(let i=e;i<=t;i++)!this.renderedRows.has(i)&&i<this.model.getRowCount()&&this.insertRow(i)}insertRow(e){let t=this.model.getRow(e),i=document.createElement("div");i.classList.add("ag-virtual-list-item",`ag-${this.cssIdentifier}-virtual-list-item`),rQ(i,"tree"===this.ariaRole?"treeitem":"option"),r7(i,this.model.getRowCount()),r9(i,e+1),i.setAttribute("tabindex","-1"),i.style.height=`${this.rowHeight}px`,i.style.top=`${this.rowHeight*e}px`;let r=this.componentCreator(t,i);r.addGuiEventListener("focusin",()=>this.lastFocusedRowIndex=e),i.appendChild(r.getGui()),this.renderedRows.has(e-1)?this.renderedRows.get(e-1).eDiv.insertAdjacentElement("afterend",i):this.renderedRows.has(e+1)?this.renderedRows.get(e+1).eDiv.insertAdjacentElement("beforebegin",i):this.eContainer.appendChild(i),this.renderedRows.set(e,{rowComponent:r,eDiv:i,value:t})}removeRow(e){let t=this.renderedRows.get(e);this.eContainer.removeChild(t.eDiv),this.destroyBean(t.rowComponent),this.renderedRows.delete(e)}refreshRows(){let e=this.model.getRowCount();this.renderedRows.forEach((t,i)=>{if(i>=e)this.removeRow(i);else{let e=this.model.getRow(i);this.model.areRowsEqual?.(t.value,e)?this.componentUpdater(e,t.rowComponent):this.removeRow(i)}})}addScrollListener(){this.addGuiEventListener("scroll",()=>this.drawVirtualRows(),{passive:!0})}setModel(e){this.model=e}getAriaElement(){return this.eContainer}destroy(){this.isAlive()&&(this.clearVirtualRows(),this.awaitStableCallbacks.length=0,super.destroy())}},I5="ag-rich-select-list",I8="ag-rich-select-row",I7=class extends I6{constructor(e,t,i){super({cssIdentifier:"rich-select"}),this.params=e,this.richSelectWrapper=t,this.getSearchString=i,this.lastRowHovered=-1,this.selectedItems=new Set,this.params=e,this.setComponentCreator(this.createRowComponent.bind(this)),this.setComponentUpdater(()=>{})}postConstruct(){super.postConstruct(),this.createLoadingElement();let{cellRowHeight:e,pickerAriaLabelKey:t,pickerAriaLabelValue:i}=this.params;e&&this.setRowHeight(e);let r=this.getGui(),s=this.getAriaElement();this.addManagedListeners(r,{mousemove:this.onMouseMove.bind(this),mouseout:this.onMouseOut.bind(this),mousedown:this.onMouseDown.bind(this),click:this.onClick.bind(this)}),r.classList.add(I5);let a=`${I5}-${this.getCompId()}`;s.setAttribute("id",a),rJ(s,this.localeService.getLocaleTextFunc()(t,i)),ss(this.richSelectWrapper,s)}navigateToPage(e){let t=super.navigateToPage(e,this.lastRowHovered);return null!=t&&this.animationFrameService.requestAnimationFrame(()=>{if(!this.isAlive())return null;this.highlightIndex(t)}),t}drawVirtualRows(e){super.drawVirtualRows(e),this.refreshSelectedItems()}highlightFilterMatch(e){this.forEachRenderedRow(t=>{t.highlightString(e)})}onNavigationKeyDown(e,t){this.animationFrameService.requestAnimationFrame(()=>{if(!this.currentList||!this.isAlive())return;let i=this.currentList.length,r=this.lastRowHovered,s=e===aa.DOWN?1:-1,a=Math.min(Math.max(-1===r?0:r+s,0),i-1);this.highlightIndex(a),t()})}selectValue(e){if(!this.currentList)return this.eLoading&&this.appendChild(this.eLoading),!1;if(this.eLoading?.offsetParent&&this.eLoading.parentElement?.removeChild(this.eLoading),null==e)return!1;let t=this.getIndicesForValues(e),i=t.length>0;return i&&(this.refresh(),this.ensureIndexVisible(t[0]),this.refresh(!0)),this.selectListItems(Array.isArray(e)?e:[e]),i}selectListItems(e,t=!1){t||this.selectedItems.clear();for(let t=0;t<e.length;t++){let i=e[t];this.selectedItems.has(i)||this.selectedItems.add(i)}this.refreshSelectedItems()}getCurrentList(){return this.currentList}setCurrentList(e){this.currentList=e,this.setModel({getRowCount:()=>e.length,getRow:t=>e[t],areRowsEqual:(e,t)=>e===t})}getSelectedItems(){return this.selectedItems}getLastItemHovered(){return this.currentList[this.lastRowHovered]}highlightIndex(e,t){this.currentList&&(e<0||e>=this.currentList.length?this.lastRowHovered=-1:(this.lastRowHovered=e,this.ensureIndexVisible(e,!t)&&!t&&this.refresh(!0)),this.forEachRenderedRow((t,i)=>{let r=e===i;if(t.toggleHighlighted(r),r){let e=`${I8}-${t.getCompId()}`;r6(this.richSelectWrapper,e),this.richSelectWrapper.setAttribute("data-active-option",e)}}))}getIndicesForValues(e){let{currentList:t}=this;if(!t||0===t.length||null==e||(Array.isArray(e)||(e=[e]),0===e.length))return[];let i=[];for(let r=0;r<e.length;r++){let s=t.indexOf(e[r]);s>=0&&i.push(s)}return i}toggleListItemSelection(e){this.selectedItems.has(e)?this.selectedItems.delete(e):this.selectedItems.add(e),this.refreshSelectedItems(),this.dispatchValueSelected()}refreshSelectedItems(){this.forEachRenderedRow(e=>{let t=this.selectedItems.has(e.getValue());e.updateSelected(t)})}createLoadingElement(){let e=ia(this.gos),t=this.localeService.getLocaleTextFunc(),i=e.createElement("div");i.classList.add("ag-loading-text"),i.innerText=t("loadingOoo","Loading..."),this.eLoading=i}createRowComponent(e,t){let i=new I4(this.params);t.setAttribute("id",`${I8}-${i.getCompId()}`),i.setParentComponent(this),this.createBean(i),i.setState(e);let{highlightMatch:r,searchType:s="fuzzy"}=this.params;return r&&"fuzzy"!==s&&i.highlightString(this.getSearchString()),i}getRowForMouseEvent(e){let t=this.getGui().getBoundingClientRect(),i=this.getScrollTop();return Math.floor((e.clientY-t.top+i)/this.getRowHeight())}onMouseMove(e){let t=this.getRowForMouseEvent(e);-1!==t&&t!=this.lastRowHovered&&(this.lastRowHovered=t,this.highlightIndex(t,!0))}onMouseDown(e){e.preventDefault()}onMouseOut(e){this.getGui().contains(e.relatedTarget)||this.highlightIndex(-1)}onClick(e){let{multiSelect:t}=this.params;if(!this.currentList)return;let i=this.getRowForMouseEvent(e),r=this.currentList[i];t?this.toggleListItemSelection(r):(this.selectListItems([r]),this.dispatchValueSelected())}dispatchValueSelected(){this.dispatchLocalEvent({type:"richSelectListRowSelected",fromEnterKey:!1,value:this.selectedItems})}destroy(){super.destroy(),this.eLoading=void 0}},I9=class extends ou{constructor(e){super({pickerAriaLabelKey:"ariaLabelRichSelectField",pickerAriaLabelValue:"Rich Select Field",pickerType:"ag-list",className:"ag-rich-select",pickerIcon:"smallDown",ariaRole:"combobox",template:e?.template??`
            <div class="ag-picker-field" role="presentation">
                <div data-ref="eLabel"></div>
                <div data-ref="eWrapper" class="ag-wrapper ag-picker-field-wrapper ag-rich-select-value ag-picker-collapsed">
                    <span data-ref="eDisplayField" class="ag-picker-field-display"></span>
                    <ag-input-text-field data-ref="eInput" class="ag-rich-select-field-input"></ag-input-text-field>
                    <span data-ref="eDeselect" class="ag-rich-select-deselect-button ag-picker-field-icon" role="presentation"></span>
                    <span data-ref="eIcon" class="ag-picker-field-icon" aria-hidden="true"></span>
                </div>
            </div>`,agComponents:[ob],modalPicker:!1,...e,maxPickerHeight:e?.maxPickerHeight??"calc(var(--ag-row-height) * 6.5)"}),this.searchString="",this.searchStringCreator=null,this.eInput=null,this.eDeselect=null,this.skipWrapperAnnouncement=!1;let{value:t,valueList:i,searchStringCreator:r}=e||{};void 0!==t&&(this.value=t),null!=i&&(this.values=i),r&&(this.searchStringCreator=r)}wireBeans(e){super.wireBeans(e),this.userComponentFactory=e.userComponentFactory,this.ariaAnnouncementService=e.ariaAnnouncementService}postConstruct(){super.postConstruct(),this.createListComponent(),this.eDeselect.appendChild(s2("cancel",this.gos));let{allowTyping:e,placeholder:t,suppressDeselectAll:i}=this.config;this.eDeselect.classList.add("ag-hidden"),e?(this.eInput.setAutoComplete(!1).setInputPlaceholder(t),this.eDisplayField.classList.add("ag-hidden")):this.eInput.setDisplayed(!1),this.setupAriaProperties();let{searchDebounceDelay:r=300}=this.config;this.clearSearchString=tj(this.clearSearchString,r),this.renderSelectedValue(),e&&this.eInput.onValueChange(e=>this.searchTextFromString(e)),this.addManagedElementListeners(this.eWrapper,{focus:this.onWrapperFocus.bind(this)}),this.addManagedElementListeners(this.eWrapper,{focusout:this.onWrapperFocusOut.bind(this)}),i||this.addManagedElementListeners(this.eDeselect,{mousedown:this.onDeselectAllMouseDown.bind(this),click:this.onDeselectAllClick.bind(this)})}setupAriaProperties(){let{eWrapper:e,gos:t,localeService:i}=this;e.tabIndex=t.get("tabIndex");let r=i.getLocaleTextFunc();this.ariaDeleteSelection=r("ariaLabelRichSelectDeleteSelection","Press DELETE to deselect item"),this.ariaDeselectAllItems=r("ariaLabelRichSelectDeselectAllItems","Press DELETE to deselect all items"),this.ariaToggleSelection=r("ariaLabelRichSelectToggleSelection","Press SPACE to toggle selection")}createListComponent(){this.listComponent=this.createBean(new I7(this.config,this.eWrapper,()=>this.searchString)),this.listComponent.setParentComponent(this),this.addManagedListeners(this.listComponent,{richSelectListRowSelected:e=>{this.onListValueSelected(e.value,e.fromEnterKey)}})}renderSelectedValue(){let e,t;let{value:i,eDisplayField:r,config:s}=this,{allowTyping:a,cellRenderer:o,initialInputValue:n,multiSelect:l,suppressDeselectAll:h,suppressMultiSelectPillRenderer:d}=s,c=this.config.valueFormatter?this.config.valueFormatter(i):i;if(a){this.eInput.setValue(n??c);return}if(l&&!h){let e=null==i||Array.isArray(i)&&0===i.length;this.eDeselect.classList.toggle("ag-hidden",e)}if(l&&!d){this.createOrUpdatePillContainer(r);return}if(o&&(e=this.userComponentFactory.getEditorRendererDetails(s,{value:i,valueFormatted:c,getValue:()=>this.getValue(),setValue:e=>{this.setValue(e,!0)},setTooltip:(e,t)=>{this.setTooltip({newTooltipText:e,shouldDisplayTooltip:t})}})),e&&(t=e.newAgStackInstance()),t)sL(r),sY(t,r),t.then(e=>{this.addDestroyFunc(()=>this.destroyBean(e))});else{if(tY(this.value))r.innerText=c,r.classList.remove("ag-display-as-placeholder");else{let{placeholder:e}=s;tY(e)?(r.innerHTML=`${rL(e)}`,r.classList.add("ag-display-as-placeholder")):sL(r)}this.setTooltip({newTooltipText:c??null,shouldDisplayTooltip:()=>this.eDisplayField.scrollWidth>this.eDisplayField.clientWidth})}}createPickerComponent(){let{values:e}=this;return e&&this.setValueList({valueList:e}),this.listComponent}setSearchStringCreator(e){this.searchStringCreator=e}setValueList(e){let{valueList:t,refresh:i}=e;this.listComponent&&this.listComponent.getCurrentList()!==t&&(this.listComponent.setCurrentList(t),i&&(this.values?this.listComponent.refresh(!0):(this.values=t,this.isPickerDisplayed&&!this.listComponent.selectValue(this.value)&&this.listComponent.refresh()),this.alignPickerToComponent()))}showPicker(){super.showPicker();let{listComponent:e,value:t}=this;if(!e)return;let i=null;null!=this.value&&(e.selectValue(this.value),i=e.getIndicesForValues(Array.isArray(t)?t:[t])[0]),null!=i?e.highlightIndex(i):e.refresh(),this.displayOrHidePicker()}beforeHidePicker(){super.beforeHidePicker()}createOrUpdatePillContainer(e){if(!this.pillContainer){let t=this.pillContainer=this.createBean(new I3);this.addDestroyFunc(()=>{this.destroyBean(this.pillContainer),this.pillContainer=null}),sL(e),e.appendChild(t.getGui()),t.init({eWrapper:this.eWrapper,onPillMouseDown:e=>{e.stopImmediatePropagation()},announceItemFocus:()=>{this.announceAriaValue(this.ariaDeleteSelection)},getValue:()=>this.getValue(),setValue:e=>this.setValue(e,!0)})}this.doWhileBlockingAnnouncement(()=>this.pillContainer?.refresh())}doWhileBlockingAnnouncement(e){this.skipWrapperAnnouncement=!0,e(),this.skipWrapperAnnouncement=!1}onWrapperFocus(){let{eInput:e,config:t}=this,{allowTyping:i,multiSelect:r,suppressDeselectAll:s}=t;if(i){let t=e.getFocusableElement();t.focus(),t.select()}else!r||s||this.skipWrapperAnnouncement||this.announceAriaValue(this.ariaDeselectAllItems)}onWrapperFocusOut(e){this.eWrapper.contains(e.relatedTarget)||this.hidePicker()}onDeselectAllMouseDown(e){e.stopImmediatePropagation()}onDeselectAllClick(){this.setValue([],!0)}buildSearchStringFromKeyboardEvent(e){let{key:t}=e;if(t===aa.BACKSPACE)this.searchString=this.searchString.slice(0,-1),t="";else if(!oy(e))return;e.preventDefault(),this.searchTextFromCharacter(t)}searchTextFromCharacter(e){this.searchString+=e,this.runSearch(),this.clearSearchString()}searchTextFromString(e){null==e&&(e=""),this.searchString=e,this.runSearch()}buildSearchStrings(e){let t;let{valueFormatter:i=e=>e}=this.config;return"number"==typeof e[0]||"string"==typeof e[0]?t=e.map(e=>i(e)):"object"==typeof e[0]&&this.searchStringCreator&&(t=this.searchStringCreator(e)),t}filterListModel(e){let{filterList:t}=this.config;t&&this.setValueList({valueList:e,refresh:!0})}runSearch(){if(!this.listComponent)return;let{values:e}=this,t=this.buildSearchStrings(e);if(!t){this.listComponent.highlightIndex(-1);return}let{suggestions:i,filteredValues:r}=this.getSuggestionsAndFilteredValues(this.searchString,t),{filterList:s,highlightMatch:a,searchType:o="fuzzy"}=this.config,n=r.length,l=!!(s&&""!==this.searchString);if(this.filterListModel(l?r:e),i.length){let e=l?0:t.indexOf(i[0]);this.listComponent?.highlightIndex(e)}else if(this.listComponent?.highlightIndex(-1),!l||n)this.listComponent?.ensureIndexVisible(0);else if(l){this.getAriaElement().removeAttribute("data-active-option");let e=this.listComponent?.getAriaElement();e&&r6(e,null)}a&&"fuzzy"!==o&&this.listComponent?.highlightFilterMatch(this.searchString),this.displayOrHidePicker()}getSuggestionsAndFilteredValues(e,t){let i=[],r=[];if(!e.length)return{suggestions:i,filteredValues:r};let{searchType:s="fuzzy",filterList:a}=this.config;if("fuzzy"===s){let s=aC(e,t,!0);i=s.values;let o=s.indices;if(a&&o.length)for(let e=0;e<o.length;e++)r.push(this.values[o[e]])}else i=t.filter((e,t)=>{let i=e.toLocaleLowerCase(),o=this.searchString.toLocaleLowerCase(),n="match"===s?i.startsWith(o):-1!==i.indexOf(o);return a&&n&&r.push(this.values[t]),n});return{suggestions:i,filteredValues:r}}displayOrHidePicker(){if(!this.listComponent)return;let e=this.listComponent.getGui(),t=this.listComponent.getCurrentList(),i=!!t&&0===t.length;e.classList.toggle("ag-hidden",i)}clearSearchString(){this.searchString=""}setValue(e,t,i,r){if(this.value===e)return this;let s=Array.isArray(e);if(null!=e){if(!s){let t=this.listComponent?.getCurrentList();if(-1===(t?t.indexOf(e):-1))return this}i||this.listComponent?.selectValue(e)}return super.setValue(e,t),r||this.renderSelectedValue(),this}onNavigationKeyDown(e,t,i){e.preventDefault();let r=t===aa.DOWN;if(!this.isPickerDisplayed&&r){this.showPicker();return}this.listComponent?.onNavigationKeyDown(t,i)}onEnterKeyDown(e){if(this.isPickerDisplayed&&(e.preventDefault(),this.listComponent?.getCurrentList())){let e=this.listComponent.getLastItemHovered();this.config.multiSelect||!e?this.dispatchPickerEventAndHidePicker(this.value,!0):this.onListValueSelected(new Set([e]),!0)}}onDeleteKeyDown(e){let{eWrapper:t,gos:i}=this;ih(i)===t&&(e.preventDefault(),this.setValue([],!0))}onTabKeyDown(){let{config:e,isPickerDisplayed:t,listComponent:i}=this,{multiSelect:r}=e;if(t&&i){if(r){let e=this.getValueFromSet(i.getSelectedItems());e&&this.setValue(e,!1,!0,!0)}else this.setValue(i.getLastItemHovered(),!1,!0);this.hidePicker()}}getValueFromSet(e){let{multiSelect:t}=this.config,i=null;for(let r of e){if(1===e.size&&!t){i=r;break}i||(i=[]),i.push(r)}return Array.isArray(i)&&i.sort(),i}onListValueSelected(e,t){let i=this.getValueFromSet(e);this.setValue(i,!1,!0),this.config.multiSelect||this.dispatchPickerEventAndHidePicker(i,t)}dispatchPickerEventAndHidePicker(e,t){this.dispatchLocalEvent({type:"fieldPickerValueSelected",fromEnterKey:t,value:e}),this.hidePicker()}getFocusableElement(){let{allowTyping:e}=this.config;return e?this.eInput.getFocusableElement():super.getFocusableElement()}onKeyDown(e){let{key:t}=e,{isPickerDisplayed:i,config:r,listComponent:s,pickerComponent:a}=this,{allowTyping:o,multiSelect:n,suppressDeselectAll:l}=r;switch(t){case aa.LEFT:case aa.RIGHT:(!o||this.pillContainer)&&(e.preventDefault(),this.pillContainer&&(this.listComponent?.highlightIndex(-1),this.pillContainer.onNavigationKeyDown(e)));break;case aa.PAGE_HOME:case aa.PAGE_END:if(o){e.preventDefault();let i=this.eInput.getInputElement(),r=t===aa.PAGE_HOME?0:i.value.length;i.setSelectionRange(r,r);break}case aa.PAGE_UP:case aa.PAGE_DOWN:e.preventDefault(),a&&s?.navigateToPage(t);break;case aa.DOWN:case aa.UP:this.onNavigationKeyDown(e,t,()=>{n&&(this.doWhileBlockingAnnouncement(()=>this.eWrapper.focus()),this.announceAriaValue(this.ariaToggleSelection))});break;case aa.ESCAPE:i&&(sN(this.listComponent.getGui())&&(e.preventDefault(),iX(e)),this.hidePicker());break;case aa.ENTER:this.onEnterKeyDown(e);break;case aa.SPACE:if(i&&n&&s){e.preventDefault();let t=s.getLastItemHovered();t&&s.toggleListItemSelection(t)}break;case aa.TAB:this.onTabKeyDown();break;case aa.DELETE:n&&!l&&this.onDeleteKeyDown(e);break;default:o||this.buildSearchStringFromKeyboardEvent(e)}}announceAriaValue(e){this.ariaAnnouncementService.announceValue(e,"richSelect")}destroy(){this.listComponent&&(this.listComponent=this.destroyBean(this.listComponent)),super.destroy()}},ke=class extends sQ{constructor(e,t,i,r,s){super(),this.dragSourceDropTarget=e,this.ghost=t,this.horizontal=i,this.template=r,this.agComponents=s,this.eText=null,this.eDragHandle=null,this.eButton=null}wireBeans(e){this.dragAndDropService=e.dragAndDropService}postConstruct(){this.setTemplate(this.template??`
            <span role="option">
              <span data-ref="eDragHandle" class="ag-drag-handle ag-column-drop-cell-drag-handle" role="presentation"></span>
              <span data-ref="eText" class="ag-column-drop-cell-text" aria-hidden="true"></span>
              <span data-ref="eButton" class="ag-column-drop-cell-button" role="presentation"></span>
            </span>`,this.agComponents);let e=this.getGui();this.addElementClasses(e),this.addElementClasses(this.eDragHandle,"drag-handle"),this.addElementClasses(this.eText,"text"),this.addElementClasses(this.eButton,"button"),this.eDragHandle.appendChild(s2("columnDrag",this.gos)),this.eButton.appendChild(s2("cancel",this.gos)),this.setupComponents(),!this.ghost&&this.isDraggable()&&this.addDragSource(),this.setupAria(),this.setupTooltip(),this.activateTabIndex(),this.refreshDraggable()}isDraggable(){return!0}refreshDraggable(){this.eDragHandle.classList.toggle("ag-column-select-column-readonly",!this.isDraggable())}setupAria(){let e=this.localeService.getLocaleTextFunc(),t=[this.getAriaDisplayName()];this.addAdditionalAriaInstructions(t,e),rJ(this.getGui(),t.join(". "))}addAdditionalAriaInstructions(e,t){if(this.isRemovable()){let i=t("ariaDropZoneColumnComponentDescription","Press DELETE to remove");e.push(i)}}setupTooltip(){let e=()=>{let e=this.getTooltip();this.setTooltip({newTooltipText:e})};e(),this.addManagedEventListeners({newColumnsLoaded:e})}getDragSourceId(){}getDefaultIconName(){return"notAllowed"}addDragSource(){let{dragAndDropService:e,eDragHandle:t}=this,i=this.createGetDragItem(),r=this.getDefaultIconName(),s={type:this.getDragSourceType(),sourceId:this.getDragSourceId(),eElement:t,getDefaultIconName:()=>r,getDragItem:i,dragItemName:this.getDisplayName()};e.addDragSource(s,!0),this.addDestroyFunc(()=>e.removeDragSource(s))}setupComponents(){this.setTextValue(),this.setupRemove(),this.ghost&&this.addCssClass("ag-column-drop-cell-ghost")}isRemovable(){return!0}refreshRemove(){sC(this.eButton,this.isRemovable())}setupRemove(){this.refreshRemove();let e={type:"columnRemove"};this.addGuiEventListener("keydown",e=>this.onKeyDown(e)),this.addManagedElementListeners(this.eButton,{click:t=>{this.dispatchLocalEvent(e),t.stopPropagation()}});let t=new s6(this.eButton);this.addManagedListeners(t,{tap:()=>this.dispatchLocalEvent(e)}),this.addDestroyFunc(t.destroy.bind(t))}onKeyDown(e){e.key===aa.DELETE&&this.isRemovable()&&(e.preventDefault(),this.dispatchLocalEvent({type:"columnRemove"}))}getDisplayValue(){return this.getDisplayName()}setTextValue(){let e=rL(this.getDisplayValue());this.eText.innerHTML=e}addElementClasses(e,t){t=t?`-${t}`:"";let i=this.horizontal?"horizontal":"vertical";e.classList.add(`ag-column-drop-cell${t}`,`ag-column-drop-${i}-cell${t}`)}destroy(){super.destroy(),this.dragSourceDropTarget=null}},kt=class extends sQ{constructor(e){super('<div class="ag-unselectable" role="presentation"></div>'),this.horizontal=e,this.state="notDragging",this.guiDestroyFunctions=[],this.childPillComponents=[],this.resizeEnabled=!1,this.addElementClasses(this.getGui()),this.ePillDropList=document.createElement("div"),this.addElementClasses(this.ePillDropList,"list"),rQ(this.ePillDropList,"listbox")}wireBeans(e){this.focusService=e.focusService,this.dragAndDropService=e.dragAndDropService}isHorizontal(){return this.horizontal}toggleResizable(e){this.positionableFeature.setResizable(!!e&&{bottom:!0}),this.resizeEnabled=e}isSourceEventFromTarget(e){let{dropZoneTarget:t,dragSource:i}=e;return t.contains(i.eElement)}destroy(){this.destroyGui(),super.destroy()}destroyGui(){this.guiDestroyFunctions.forEach(e=>e()),this.guiDestroyFunctions.length=0,this.childPillComponents.length=0,sL(this.getGui()),sL(this.ePillDropList)}init(e){this.params=e??{},this.createManagedBean(new oa(this.getFocusableElement(),{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.onKeyDown.bind(this)})),this.setupDropTarget(),this.positionableFeature=new os(this.getGui()),this.createManagedBean(this.positionableFeature),this.refreshGui(),rJ(this.ePillDropList,this.getAriaLabel())}onTabKeyDown(e){let t=this.focusService.findFocusableElements(this.getFocusableElement(),null,!0),i=t.length;if(0===i)return;let{shiftKey:r}=e,s=ih(this.gos),a=s===t[0],o=s===iB(t);1===i||a&&r||o&&!r||t[r?0:i-1].focus()}onKeyDown(e){let{key:t}=e,i=!this.horizontal,r=t===aa.DOWN,s=t===aa.UP;if(!i){let e=this.gos.get("enableRtl");r=!e&&t===aa.RIGHT||e&&t===aa.LEFT,s=!e&&t===aa.LEFT||e&&t===aa.RIGHT}if(!r&&!s)return;let a=this.focusService.findNextFocusableElement(this.getFocusableElement(),!1,s);a&&(e.preventDefault(),a.focus())}addElementClasses(e,t){t=t?`-${t}`:"";let i=this.horizontal?"horizontal":"vertical";e.classList.add(`ag-column-drop${t}`,`ag-column-drop-${i}${t}`)}setupDropTarget(){this.dropTarget={getContainer:this.getGui.bind(this),getIconName:this.getIconName.bind(this),onDragging:this.onDragging.bind(this),onDragEnter:this.onDragEnter.bind(this),onDragLeave:this.onDragLeave.bind(this),onDragStop:this.onDragStop.bind(this),onDragCancel:this.onDragCancel.bind(this),isInterestedIn:this.isInterestedIn.bind(this)},this.dragAndDropService.addDropTarget(this.dropTarget)}minimumAllowedNewInsertIndex(){return 0}checkInsertIndex(e){let t=this.getNewInsertIndex(e);if(t<0)return!1;let i=Math.max(this.minimumAllowedNewInsertIndex(),t),r=i!==this.insertIndex;return r&&(this.insertIndex=i),r}getNewInsertIndex(e){let t=e.event,i=this.horizontal?t.clientX:t.clientY,r=this.childPillComponents.map(e=>e.getGui().getBoundingClientRect()),s=r.findIndex(e=>this.horizontal?e.right>i&&e.left<i:e.top<i&&e.bottom>i);if(-1===s){let e=this.gos.get("enableRtl");return r.every(e=>i>(this.horizontal?e.right:e.bottom))?e&&this.horizontal?0:this.childPillComponents.length:r.every(e=>i<(this.horizontal?e.left:e.top))?e&&this.horizontal?this.childPillComponents.length:0:this.insertIndex}return this.insertIndex<=s?s+1:s}checkDragStartedBySelf(e){"notDragging"===this.state&&(this.state="rearrangeItems",this.potentialDndItems=this.getItems(e.dragSource.getDragItem()),this.refreshGui(),this.checkInsertIndex(e),this.refreshGui())}onDragging(e){this.checkDragStartedBySelf(e),this.checkInsertIndex(e)&&this.refreshGui()}handleDragEnterEnd(e){}onDragEnter(e){let t=this.getItems(e.dragSource.getDragItem());this.state="newItemsIn";let i=t.filter(t=>this.isItemDroppable(t,e)),r=i.every(e=>-1!==this.childPillComponents.map(e=>e.getItem()).indexOf(e));if(0!==i.length){if(this.potentialDndItems=i,r){this.state="notDragging";return}this.handleDragEnterEnd(e),this.checkInsertIndex(e),this.refreshGui()}}isPotentialDndItems(){return iO(this.potentialDndItems)}handleDragLeaveEnd(e){}onDragLeave(e){if("rearrangeItems"===this.state){let t=this.getItems(e.dragSource.getDragItem());this.removeItems(t)}this.isPotentialDndItems()&&(this.handleDragLeaveEnd(e),this.potentialDndItems=[],this.refreshGui()),this.state="notDragging"}onDragCancel(e){this.isPotentialDndItems()&&("newItemsIn"===this.state&&this.handleDragLeaveEnd(e),this.potentialDndItems=[],this.refreshGui()),this.state="notDragging"}onDragStop(){this.isPotentialDndItems()&&("newItemsIn"===this.state?this.addItems(this.potentialDndItems):this.rearrangeItems(this.potentialDndItems),this.potentialDndItems=[],this.refreshGui()),this.state="notDragging"}removeItems(e){let t=this.getExistingItems().filter(t=>!iU(e,t));this.updateItems(t)}addItems(e){if(!e)return;let t=this.getExistingItems().slice(),i=e.filter(e=>0>t.indexOf(e));ij(t,i,this.insertIndex),this.updateItems(t)}addItem(e){this.insertIndex=this.getExistingItems().length,this.addItems([e]),this.refreshGui()}rearrangeItems(e){let t=this.getNonGhostItems().slice();return ij(t,e,this.insertIndex),!iG(t,this.getExistingItems())&&(this.updateItems(t),!0)}refreshGui(){let e=this.ePillDropList.scrollTop,t=this.resizeEnabled,i=this.getFocusedItem(),r=this.focusService.findNextFocusableElement();r||(r=this.focusService.findNextFocusableElement(void 0,!1,!0)),this.toggleResizable(!1),this.destroyGui(),this.addIconAndTitleToGui(),this.addEmptyMessageToGui(),this.addItemsToGui(),this.isHorizontal()||(this.ePillDropList.scrollTop=e),t&&this.toggleResizable(t),this.focusService.isKeyboardMode()&&this.restoreFocus(i,r)}getFocusedItem(){let e=this.getGui(),t=ih(this.gos);return e.contains(t)?Array.from(e.querySelectorAll(".ag-column-drop-cell")).indexOf(t):-1}restoreFocus(e,t){let i=Array.from(this.getGui().querySelectorAll(".ag-column-drop-cell"));if(-1===e)return;0===i.length&&t.focus();let r=Math.min(i.length-1,e),s=i[r];s&&s.focus()}focusList(e){let t=e?this.childPillComponents.length-1:0;this.restoreFocus(t,this.getFocusableElement())}getNonGhostItems(){let e=this.getExistingItems();return this.isPotentialDndItems()?e.filter(e=>!iU(this.potentialDndItems,e)):e}addItemsToGui(){let e=this.getNonGhostItems().map(e=>this.createItemComponent(e,!1));if(this.isPotentialDndItems()){let t=this.potentialDndItems.map(e=>this.createItemComponent(e,!0));this.insertIndex>=e.length?e.push(...t):e.splice(this.insertIndex,0,...t)}this.appendChild(this.ePillDropList),e.forEach((e,t)=>{t>0&&this.addArrow(this.ePillDropList),this.ePillDropList.appendChild(e.getGui())}),this.addAriaLabelsToComponents()}addAriaLabelsToComponents(){this.childPillComponents.forEach((e,t)=>{let i=e.getGui();r9(i,t+1),r7(i,this.childPillComponents.length)})}createItemComponent(e,t){let i=this.createPillComponent(e,this.dropTarget,t,this.horizontal);return i.addEventListener("columnRemove",this.removeItems.bind(this,[e])),this.createBean(i),this.guiDestroyFunctions.push(()=>this.destroyBean(i)),t||this.childPillComponents.push(i),i}addIconAndTitleToGui(){let{title:e,icon:t}=this.params;if(!e||!t)return;let i=document.createElement("div");if(r4(i,!0),this.addElementClasses(i,"title-bar"),this.addElementClasses(t,"icon"),this.addOrRemoveCssClass("ag-column-drop-empty",this.isExistingItemsEmpty()),i.appendChild(t),!this.horizontal){let t=document.createElement("span");this.addElementClasses(t,"title"),t.innerHTML=e,i.appendChild(t)}this.appendChild(i)}isExistingItemsEmpty(){return 0===this.getExistingItems().length}addEmptyMessageToGui(){let{emptyMessage:e}=this.params;if(!e||!this.isExistingItemsEmpty()||this.isPotentialDndItems())return;let t=document.createElement("span");t.innerHTML=e,this.addElementClasses(t,"empty-message"),this.ePillDropList.appendChild(t)}addArrow(e){if(this.horizontal){let t=s2(this.gos.get("enableRtl")?"smallLeft":"smallRight",this.gos);this.addElementClasses(t,"cell-separator"),e.appendChild(t)}}},ki=class e extends sQ{constructor(e){super(function(e){let t=e.cssIdentifier||"default";return`<div class="ag-panel ag-${t}-panel" tabindex="-1">
        <div data-ref="eTitleBar" class="ag-panel-title-bar ag-${t}-panel-title-bar ag-unselectable">
            <span data-ref="eTitle" class="ag-panel-title-bar-title ag-${t}-panel-title-bar-title"></span>
            <div data-ref="eTitleBarButtons" class="ag-panel-title-bar-buttons ag-${t}-panel-title-bar-buttons"></div>
        </div>
        <div data-ref="eContentWrapper" class="ag-panel-content-wrapper ag-${t}-panel-content-wrapper"></div>
    </div>`}(e)),this.config=e,this.closable=!0,this.eContentWrapper=null,this.eTitleBar=null,this.eTitleBarButtons=null,this.eTitle=null}postConstruct(){let{component:e,closable:t,hideTitleBar:i,title:r,minWidth:s=250,width:a,minHeight:o=250,height:n,centered:l,popup:h,x:d,y:c}=this.config;this.positionableFeature=new os(this.getGui(),{minWidth:s,width:a,minHeight:o,height:n,centered:l,x:d,y:c,popup:h,calculateTopBuffer:()=>this.positionableFeature.getHeight()-this.getBodyHeight()}),this.createManagedBean(this.positionableFeature);let u=this.getGui();e&&this.setBodyComponent(e),i?sC(this.eTitleBar,!1):(r&&this.setTitle(r),this.setClosable(null!=t?t:this.closable)),this.addManagedElementListeners(this.eTitleBar,{mousedown:e=>{if(u.contains(e.relatedTarget)||u.contains(ih(this.gos))||this.eTitleBarButtons.contains(e.target)){e.preventDefault();return}let t=this.eContentWrapper.querySelector("button, [href], input, select, textarea, [tabindex]");t&&t.focus()}}),h&&this.positionableFeature.isPositioned()||(this.renderComponent&&this.renderComponent(),this.positionableFeature.initialisePosition(),this.eContentWrapper.style.height="0")}renderComponent(){let e=this.getGui();e.focus(),this.close=()=>{e.parentElement.removeChild(e),this.destroy()}}getHeight(){return this.positionableFeature.getHeight()}setHeight(e){this.positionableFeature.setHeight(e)}getWidth(){return this.positionableFeature.getWidth()}setWidth(e){this.positionableFeature.setWidth(e)}setClosable(t){if(t!==this.closable&&(this.closable=t),t){let t=this.closeButtonComp=new sQ(e.CLOSE_BTN_TEMPLATE);this.createBean(t);let i=t.getGui(),r=s2("close",this.gos);r.classList.add("ag-panel-title-bar-button-icon"),i.appendChild(r),this.addTitleBarButton(t),t.addManagedElementListeners(i,{click:this.onBtClose.bind(this)})}else if(this.closeButtonComp){let e=this.closeButtonComp.getGui();e.parentElement.removeChild(e),this.closeButtonComp=this.destroyBean(this.closeButtonComp)}}setBodyComponent(e){e.setParentComponent(this),this.eContentWrapper.appendChild(e.getGui())}addTitleBarButton(e,t){let i=this.eTitleBarButtons,r=i.children,s=r.length;null==t&&(t=s),t=Math.max(0,Math.min(t,s)),e.addCssClass("ag-panel-title-bar-button");let a=e.getGui();0===t?i.insertAdjacentElement("afterbegin",a):t===s?i.insertAdjacentElement("beforeend",a):r[t-1].insertAdjacentElement("afterend",a),e.setParentComponent(this)}getBodyHeight(){return sM(this.eContentWrapper)}getBodyWidth(){return sE(this.eContentWrapper)}setTitle(e){this.eTitle.innerText=e}onBtClose(){this.close()}destroy(){this.closeButtonComp&&(this.closeButtonComp=this.destroyBean(this.closeButtonComp));let e=this.getGui();e&&sN(e)&&this.close(),super.destroy()}};ki.CLOSE_BTN_TEMPLATE='<div class="ag-button"></div>';var kr=ki,ks=class extends kr{constructor(e){super({...e,popup:!0}),this.isMaximizable=!1,this.isMaximized=!1,this.maximizeListeners=[],this.resizeListenerDestroy=null,this.lastPosition={x:0,y:0,width:0,height:0}}wireBeans(e){this.popupService=e.popupService,this.focusService=e.focusService}postConstruct(){let e=this.getGui(),{movable:t,resizable:i,maximizable:r,modal:s,postProcessPopupParams:a}=this.config;if(this.addCssClass("ag-dialog"),super.postConstruct(),a){let{type:t,eventSource:i,column:r,mouseEvent:s,rowNode:o}=a;this.popupService.callPostProcessPopup(t,e,i,s,r,o)}if(this.tabGuardFeature=this.createManagedBean(new hc(this)),this.tabGuardFeature.initialiseTabGuard({isFocusableContainer:!0,onFocusIn:()=>{let{activeElement:t}=ia(this.gos);this.popupService.bringPopupToFront(e)&&!id(this.gos)&&t?.focus?.()},onTabKeyDown:t=>{if(s)return;let i=t.shiftKey,r=this.focusService.findNextFocusableElement(e,!1,i);(!r||this.tabGuardFeature.getTabGuardCtrl().isTabGuard(r))&&this.focusService.focusNextGridCoreContainer(i)&&t.preventDefault()}}),t&&this.setMovable(t),r&&this.setMaximizable(r),i&&this.setResizable(i),!this.config.modal){let{focusService:e}=this;e.addFocusableContainer(this),this.addDestroyFunc(()=>e.removeFocusableContainer(this))}}setAllowFocus(e){this.tabGuardFeature.getTabGuardCtrl().setAllowFocus(e)}renderComponent(){let e=this.getGui(),{alwaysOnTop:t,modal:i,title:r,afterGuiAttached:s}=this.config,a=this.localeService.getLocaleTextFunc(),o=this.popupService.addPopup({modal:i,eChild:e,closeOnEsc:!0,closedCallback:this.onClosed.bind(this),alwaysOnTop:t,ariaLabel:r||a("ariaLabelDialog","Dialog"),afterGuiAttached:s});o&&(this.close=o.hideFunc)}onClosed(e){this.destroy(),this.config.closedCallback?.(e)}toggleMaximize(){let e=this.positionableFeature.getPosition();if(this.isMaximized){let{x:e,y:t,width:i,height:r}=this.lastPosition;this.setWidth(i),this.setHeight(r),this.positionableFeature.offsetElement(e,t)}else this.lastPosition.width=this.getWidth(),this.lastPosition.height=this.getHeight(),this.lastPosition.x=e.x,this.lastPosition.y=e.y,this.positionableFeature.offsetElement(0,0),this.setHeight("100%"),this.setWidth("100%");this.isMaximized=!this.isMaximized,this.refreshMaximizeIcon()}refreshMaximizeIcon(){sC(this.maximizeIcon,!this.isMaximized),sC(this.minimizeIcon,this.isMaximized)}clearMaximizebleListeners(){this.maximizeListeners.length&&(this.maximizeListeners.forEach(e=>e()),this.maximizeListeners.length=0),this.resizeListenerDestroy&&(this.resizeListenerDestroy(),this.resizeListenerDestroy=null)}destroy(){this.maximizeButtonComp=this.destroyBean(this.maximizeButtonComp),this.clearMaximizebleListeners(),super.destroy()}setResizable(e){this.positionableFeature.setResizable(e)}setMovable(e){this.positionableFeature.setMovable(e,this.eTitleBar)}setMaximizable(e){if(!e){this.clearMaximizebleListeners(),this.maximizeButtonComp&&(this.destroyBean(this.maximizeButtonComp),this.maximizeButtonComp=this.maximizeIcon=this.minimizeIcon=void 0);return}let t=this.eTitleBar;if(!t||e===this.isMaximizable)return;let i=this.buildMaximizeAndMinimizeElements();this.refreshMaximizeIcon(),i.addManagedElementListeners(i.getGui(),{click:this.toggleMaximize.bind(this)}),this.addTitleBarButton(i,0),this.maximizeListeners.push(...this.addManagedElementListeners(t,{dblclick:this.toggleMaximize.bind(this)})),[this.resizeListenerDestroy]=this.addManagedListeners(this.positionableFeature,{resize:()=>{this.isMaximized=!1,this.refreshMaximizeIcon()}})}buildMaximizeAndMinimizeElements(){let e=this.maximizeButtonComp=this.createBean(new sQ('<div class="ag-dialog-button"></span>')),t=e.getGui();return this.maximizeIcon=s2("maximize",this.gos),t.appendChild(this.maximizeIcon),this.maximizeIcon.classList.add("ag-panel-title-bar-button-icon"),this.minimizeIcon=s2("minimize",this.gos),t.appendChild(this.minimizeIcon),this.minimizeIcon.classList.add("ag-panel-title-bar-button-icon"),e}},ka=class extends hu{constructor(e=0,t){super('<div class="ag-menu-list" role="tree"></div>'),this.level=e,this.menuItems=[],this.params=t??{column:null,node:null,value:null}}postConstruct(){this.initialiseTabGuard({onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e),onFocusIn:e=>this.handleFocusIn(e),onFocusOut:e=>this.handleFocusOut(e)})}onTabKeyDown(e){let t=this.getParentComponent(),i=t&&t.getGui();i&&i.classList.contains("ag-focus-managed")||e.preventDefault(),e.shiftKey&&this.closeIfIsChild(e)}handleKeyDown(e){switch(e.key){case aa.UP:case aa.RIGHT:case aa.DOWN:case aa.LEFT:e.preventDefault(),this.handleNavKey(e.key);break;case aa.ESCAPE:this.closeIfIsChild()&&iX(e)}}handleFocusIn(e){let t=e.relatedTarget;!this.tabGuardFeature.getTabGuardCtrl().isTabGuard(t)&&(this.getGui().contains(t)||this.activeMenuItem?.getSubMenuGui()?.contains(t))||(this.activeMenuItem?this.activeMenuItem.activate():this.activateFirstItem())}handleFocusOut(e){let t=e.relatedTarget;!(!this.activeMenuItem||this.getGui().contains(t)||this.activeMenuItem.getSubMenuGui()?.contains(t))&&(this.activeMenuItem.isSubMenuOpening()||this.activeMenuItem.deactivate())}clearActiveItem(){this.activeMenuItem&&(this.activeMenuItem.deactivate(),this.activeMenuItem=null)}addMenuItems(e){null!=e&&ab.all(e.map(e=>"separator"===e?ab.resolve({eGui:this.createSeparator()}):"string"==typeof e?(tO(`unrecognised menu item ${e}`),ab.resolve({eGui:null})):this.addItem(e))).then(e=>{(e??[]).forEach(e=>{e?.eGui&&(this.appendChild(e.eGui),e.comp&&this.menuItems.push(e.comp))})})}addItem(e){let t=this.createManagedBean(new kn);return t.init({menuItemDef:e,isAnotherSubMenuOpen:()=>this.menuItems.some(e=>e.isSubMenuOpen()),level:this.level,contextParams:this.params}).then(()=>(t.setParentComponent(this),this.addManagedListeners(t,{closeMenu:e=>{this.dispatchLocalEvent(e)},menuItemActivated:e=>{this.activeMenuItem&&this.activeMenuItem!==e.menuItem&&this.activeMenuItem.deactivate(),this.activeMenuItem=e.menuItem}}),{comp:t,eGui:t.getGui()}))}activateFirstItem(){let e=this.menuItems.filter(e=>!e.isDisabled())[0];e&&e.activate()}createSeparator(){return sO(`
            <div class="ag-menu-separator" aria-hidden="true">
                <div class="ag-menu-separator-part"></div>
                <div class="ag-menu-separator-part"></div>
                <div class="ag-menu-separator-part"></div>
                <div class="ag-menu-separator-part"></div>
            </div>`)}handleNavKey(e){switch(e){case aa.UP:case aa.DOWN:{let t=this.findNextItem(e===aa.UP);t&&t!==this.activeMenuItem&&t.activate();return}}e===(this.gos.get("enableRtl")?aa.RIGHT:aa.LEFT)?this.closeIfIsChild():this.openChild()}closeIfIsChild(e){let t=this.getParentComponent();return!!t&&t instanceof kn&&(e&&e.preventDefault(),t.closeSubMenu(),t.getGui().focus(),!0)}openChild(){this.activeMenuItem&&this.activeMenuItem.openSubMenu(!0)}findNextItem(e){let t;let i=this.menuItems.filter(e=>!e.isDisabled());if(!i.length)return;if(!this.activeMenuItem)return e?iB(i):i[0];e&&i.reverse();let r=!1;for(let e=0;e<i.length;e++){let s=i[e];if(!r){s===this.activeMenuItem&&(r=!0);continue}t=s;break}return r&&!t?i[0]:t||this.activeMenuItem}destroy(){this.clearActiveItem(),super.destroy()}},ko=class extends hu{constructor(e){super(),this.setTemplateFromElement(e.getGui(),void 0,void 0,!0)}postConstruct(){this.initialiseTabGuard({onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e)})}handleKeyDown(e){e.key===aa.ESCAPE&&this.closePanel()}onTabKeyDown(e){e.defaultPrevented||(this.closePanel(),e.preventDefault())}closePanel(){let e=this.parentComponent;e.closeSubMenu(),setTimeout(()=>e.getGui().focus(),0)}},kn=class extends i2{constructor(){super(...arguments),this.ACTIVATION_DELAY=80,this.isActive=!1,this.subMenuIsOpen=!1,this.subMenuIsOpening=!1,this.suppressRootStyles=!0,this.suppressAria=!0,this.suppressFocus=!0}wireBeans(e){this.popupService=e.popupService,this.userComponentFactory=e.userComponentFactory}init(e){let{menuItemDef:t,isAnotherSubMenuOpen:i,level:r,childComponent:s,contextParams:a}=e;return this.params=e.menuItemDef,this.level=r,this.isAnotherSubMenuOpen=i,this.childComponent=s,this.contextParams=a,this.cssClassPrefix=this.params.menuItemParams?.cssClassPrefix??"ag-menu-option",this.userComponentFactory.getMenuItemCompDetails(this.params,{...t,level:r,isAnotherSubMenuOpen:i,openSubMenu:e=>this.openSubMenu(e),closeSubMenu:()=>this.closeSubMenu(),closeMenu:e=>this.closeMenu(e),updateTooltip:(e,t)=>this.refreshTooltip(e,t),onItemActivated:()=>this.onItemActivated()}).newAgStackInstance().then(e=>{this.menuItemComp=e;let t=e.configureDefaults?.();t&&this.configureDefaults(!0===t?void 0:t)})}addListeners(e,t){t?.suppressClick||this.addManagedElementListeners(e,{click:e=>this.onItemSelected(e)}),t?.suppressKeyboardSelect||this.addManagedElementListeners(e,{keydown:e=>{(e.key===aa.ENTER||e.key===aa.SPACE)&&(e.preventDefault(),this.onItemSelected(e))}}),t?.suppressMouseDown||this.addManagedElementListeners(e,{mousedown:e=>{e.stopPropagation(),e.preventDefault()}}),t?.suppressMouseOver||this.addManagedElementListeners(e,{mouseenter:()=>this.onMouseEnter(),mouseleave:()=>this.onMouseLeave()})}isDisabled(){return!!this.params.disabled}openSubMenu(e=!1,t){let i;if(this.closeSubMenu(),!this.params.subMenu)return;this.subMenuIsOpening=!0;let r=sO('<div class="ag-menu" role="presentation"></div>');this.eSubMenuGui=r;let s=()=>{this.subMenuIsOpening=!1};if(this.childComponent){let e=this.createBean(new ko(this.childComponent));e.setParentComponent(this);let t=e.getGui(),a="mouseenter",o=()=>this.cancelDeactivate();t.addEventListener(a,o),i=()=>t.removeEventListener(a,o),r.appendChild(t),this.childComponent.afterGuiAttached&&(s=()=>{this.childComponent.afterGuiAttached(),this.subMenuIsOpening=!1})}else if(this.params.subMenu){let t=this.createBean(new ka(this.level+1,this.contextParams));t.setParentComponent(this),t.addMenuItems(this.params.subMenu),r.appendChild(t.getGui()),this.addManagedListeners(t,{closeMenu:e=>this.dispatchLocalEvent(e)}),t.addGuiEventListener("mouseenter",()=>this.cancelDeactivate()),i=()=>this.destroyBean(t),e&&(s=()=>{t.activateFirstItem(),this.subMenuIsOpening=!1})}let{popupService:a}=this,o=this.localeService.getLocaleTextFunc(),n=a.addPopup({modal:!0,eChild:r,positionCallback:()=>{let e=this.eGui;a.positionPopupForMenu({eventSource:e,ePopup:r});let{column:i,node:s}=this.contextParams;a.callPostProcessPopup("subMenu",r,e,t instanceof MouseEvent?t:void 0,i,s)},anchorToElement:this.eGui,ariaLabel:o("ariaLabelSubMenu","SubMenu"),afterGuiAttached:s});this.subMenuIsOpen=!0,this.setAriaExpanded(!0),this.hideSubMenu=()=>{n&&n.hideFunc(),this.subMenuIsOpen=!1,this.setAriaExpanded(!1),i(),this.menuItemComp.setExpanded?.(!1),this.eSubMenuGui=void 0},this.menuItemComp.setExpanded?.(!0)}setAriaExpanded(e){this.suppressAria||r5(this.eGui,e)}closeSubMenu(){this.hideSubMenu&&(this.hideSubMenu(),this.hideSubMenu=null,this.setAriaExpanded(!1))}isSubMenuOpen(){return this.subMenuIsOpen}isSubMenuOpening(){return this.subMenuIsOpening}activate(e){this.cancelActivate(),this.params.disabled||(this.isActive=!0,this.suppressRootStyles||this.eGui.classList.add(`${this.cssClassPrefix}-active`),this.menuItemComp.setActive?.(!0),this.suppressFocus||this.eGui.focus({preventScroll:!0}),e&&this.params.subMenu&&window.setTimeout(()=>{this.isAlive()&&this.isActive&&this.openSubMenu()},300),this.onItemActivated())}deactivate(){this.cancelDeactivate(),this.suppressRootStyles||this.eGui.classList.remove(`${this.cssClassPrefix}-active`),this.menuItemComp.setActive?.(!1),this.isActive=!1,this.subMenuIsOpen&&this.hideSubMenu()}getGui(){return this.menuItemComp.getGui()}getParentComponent(){return this.parentComponent}setParentComponent(e){this.parentComponent=e}getSubMenuGui(){return this.eSubMenuGui}onItemSelected(e){this.menuItemComp.select?.(),this.params.action?this.getFrameworkOverrides().wrapOutgoing(()=>this.params.action(this.gos.addGridCommonParams({...this.contextParams}))):this.openSubMenu(e&&"keydown"===e.type,e),this.params.subMenu&&!this.params.action||this.params.suppressCloseOnSelect||this.closeMenu(e)}closeMenu(e){let t={type:"closeMenu"};e&&(e instanceof MouseEvent?t.mouseEvent=e:t.keyboardEvent=e),this.dispatchLocalEvent(t)}onItemActivated(){this.dispatchLocalEvent({type:"menuItemActivated",menuItem:this})}cancelActivate(){this.activateTimeoutId&&(window.clearTimeout(this.activateTimeoutId),this.activateTimeoutId=0)}cancelDeactivate(){this.deactivateTimeoutId&&(window.clearTimeout(this.deactivateTimeoutId),this.deactivateTimeoutId=0)}onMouseEnter(){this.cancelDeactivate(),this.isAnotherSubMenuOpen()?this.activateTimeoutId=window.setTimeout(()=>this.activate(!0),this.ACTIVATION_DELAY):this.activate(!0)}onMouseLeave(){this.cancelActivate(),this.isSubMenuOpen()?this.deactivateTimeoutId=window.setTimeout(()=>this.deactivate(),this.ACTIVATION_DELAY):this.deactivate()}configureDefaults(e){if(!this.menuItemComp){setTimeout(()=>this.configureDefaults(e));return}let t=this.menuItemComp.getGui(),i=this.menuItemComp.getRootElement?.();i&&(e?.suppressRootStyles||t.classList.add("ag-menu-option-custom"),t=i),this.eGui=t,this.suppressRootStyles=!!e?.suppressRootStyles,!this.suppressRootStyles&&(t.classList.add(this.cssClassPrefix),this.params.cssClasses?.forEach(e=>t.classList.add(e)),this.params.disabled&&t.classList.add(`${this.cssClassPrefix}-disabled`)),e?.suppressTooltip||this.refreshTooltip(this.params.tooltip),this.suppressAria=!!e?.suppressAria,!this.suppressAria&&(rQ(t,"treeitem"),r2(t,this.level+1),this.params.disabled&&r3(t,!0)),e?.suppressTabIndex||t.setAttribute("tabindex","-1"),this.params.disabled||this.addListeners(t,e),this.suppressFocus=!!e?.suppressFocus}refreshTooltip(e,t){this.tooltip=e,this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature)),e&&this.menuItemComp&&(this.tooltipFeature=this.createBean(new sq({getGui:()=>this.getGui(),getTooltipValue:()=>this.tooltip,getLocation:()=>"menu",shouldDisplayTooltip:t})))}destroy(){this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature)),this.menuItemComp?.destroy?.(),super.destroy()}},kl="ag-list-item-hovered",kh=class extends i2{constructor(e,t,i){super(),this.comp=e,this.virtualList=t,this.params=i,this.currentDragValue=null,this.lastHoveredListItem=null}wireBeans(e){this.dragAndDropService=e.dragAndDropService}postConstruct(){this.addManagedListeners(this.params.eventSource,{[this.params.listItemDragStartEvent]:this.listItemDragStart.bind(this),[this.params.listItemDragEndEvent]:this.listItemDragEnd.bind(this)}),this.createDropTarget(),this.createAutoScrollService()}listItemDragStart(e){this.currentDragValue=this.params.getCurrentDragValue(e),this.moveBlocked=this.params.isMoveBlocked(this.currentDragValue)}listItemDragEnd(){window.setTimeout(()=>{this.currentDragValue=null,this.moveBlocked=!1},10)}createDropTarget(){this.dragAndDropService.addDropTarget({isInterestedIn:e=>e===this.params.dragSourceType,getIconName:()=>this.moveBlocked?"pinned":"move",getContainer:()=>this.comp.getGui(),onDragging:e=>this.onDragging(e),onDragStop:()=>this.onDragStop(),onDragLeave:()=>this.onDragLeave(),onDragCancel:()=>this.onDragCancel()})}createAutoScrollService(){let e=this.virtualList.getGui();this.autoScrollService=new aJ({scrollContainer:e,scrollAxis:"y",getVerticalPosition:()=>e.scrollTop,setVerticalPosition:t=>e.scrollTop=t})}onDragging(e){if(!this.currentDragValue||this.moveBlocked)return;let t=this.getListDragItem(e),i=this.virtualList.getComponentAt(t.rowIndex);if(!i)return;let r=i.getGui().parentElement;this.lastHoveredListItem&&this.lastHoveredListItem.rowIndex===t.rowIndex&&this.lastHoveredListItem.position===t.position||(this.autoScrollService.check(e.event),this.clearHoveredItems(),this.lastHoveredListItem=t,sf(r,kl),sf(r,`ag-item-highlight-${t.position}`))}getListDragItem(e){let t=this.virtualList.getGui(),i=parseFloat(window.getComputedStyle(t).paddingTop),r=this.virtualList.getRowHeight(),s=this.virtualList.getScrollTop(),a=Math.max(0,(e.y-i+s)/r),o=this.params.getNumRows(this.comp)-1,n=0|Math.min(o,a);return{rowIndex:n,position:Math.round(a)>a||a>o?"bottom":"top",component:this.virtualList.getComponentAt(n)}}onDragStop(){this.moveBlocked||(this.params.moveItem(this.currentDragValue,this.lastHoveredListItem),this.clearDragProperties())}onDragCancel(){this.clearDragProperties()}onDragLeave(){this.clearDragProperties()}clearDragProperties(){this.clearHoveredItems(),this.autoScrollService.ensureCleared()}clearHoveredItems(){this.virtualList.getGui().querySelectorAll(`.${kl}`).forEach(e=>{[kl,"ag-item-highlight-top","ag-item-highlight-bottom"].forEach(t=>{e.classList.remove(t)})}),this.lastHoveredListItem=null}},kd=class extends hu{constructor(e){var t;super((t=e.cssClass,`<div class="ag-tabs ${t}">
        <div data-ref="eHeader"></div>
        <div data-ref="eBody" role="presentation" class="ag-tabs-body ${t?`${t}-body`:""}"></div>
    </div>`)),this.eHeader=null,this.eBody=null,this.items=[],this.tabbedItemScrollMap=new Map,this.params=e}wireBeans(e){this.focusService=e.focusService}postConstruct(){this.setupHeader(),this.params.items&&this.params.items.forEach(e=>this.addItem(e)),this.initialiseTabGuard({onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),focusInnerElement:this.focusInnerElement.bind(this),focusTrapActive:!0}),this.addDestroyFunc(()=>this.activeItem?.tabbedItem?.afterDetachedCallback?.())}setupHeader(){let{enableCloseButton:e,cssClass:t}=this.params,i=(e,i)=>{e.classList.add(`ag-tabs-${i}`),t&&e.classList.add(`${t}-${i}`)};e?(this.setupCloseButton(i),this.eTabHeader=ia(this.gos).createElement("div"),i(this.eHeader,"header-wrapper"),rQ(this.eHeader,"presentation"),this.eHeader.appendChild(this.eTabHeader)):this.eTabHeader=this.eHeader,rQ(this.eTabHeader,"tablist"),i(this.eTabHeader,"header")}setupCloseButton(e){let t=ia(this.gos),i=t.createElement("button");e(i,"close-button");let r=s2("close",this.gos,void 0,!0);rJ(i,this.params.closeButtonAriaLabel),i.appendChild(r),this.addManagedElementListeners(i,{click:()=>this.params.onCloseClicked?.()});let s=t.createElement("div");e(s,"close-button-wrapper"),rQ(s,"presentation"),s.appendChild(i),this.eHeader.appendChild(s),this.eCloseButton=i}handleKeyDown(e){switch(e.key){case aa.RIGHT:case aa.LEFT:{if(!this.eTabHeader.contains(ih(this.gos)))return;let t=e.key===aa.RIGHT,i=this.gos.get("enableRtl"),r=this.items.indexOf(this.activeItem),s=t!==i?Math.min(r+1,this.items.length-1):Math.max(r-1,0);if(r===s)return;e.preventDefault();let a=this.items[s];this.showItemWrapper(a),a.eHeaderButton.focus();break}case aa.UP:case aa.DOWN:e.stopPropagation()}}onTabKeyDown(e){if(e.defaultPrevented)return;let{focusService:t,eHeader:i,eBody:r,activeItem:s,params:a}=this,{suppressTrapFocus:o,enableCloseButton:n}=a,l=ih(this.gos),h=e.target,d=e.shiftKey;if(i.contains(l)){e.preventDefault(),n&&d&&!this.eCloseButton?.contains(l)?this.eCloseButton?.focus():o&&d?this.focusService.findFocusableElementBeforeTabGuard(ia(this.gos).body,h)?.focus():this.focusBody(e.shiftKey);return}let c=null;if(!t.isTargetUnderManagedComponent(r,h)||(d&&(c=this.focusService.findFocusableElementBeforeTabGuard(r,h)),c||o||(c=s.eHeaderButton)),!c&&r.contains(l)&&!(c=t.findNextFocusableElement(r,!1,d))){o&&!d?this.forceFocusOutOfContainer(d):n&&!d?(e.preventDefault(),this.eCloseButton?.focus()):(e.preventDefault(),this.focusHeader());return}c&&(e.preventDefault(),c.focus())}focusInnerElement(e){e?this.focusBody(!0):this.focusHeader()}focusHeader(e){this.activeItem.eHeaderButton.focus({preventScroll:e})}focusBody(e){this.focusService.focusInto(this.eBody,e)}setAfterAttachedParams(e){this.afterAttachedParams=e}showFirstItem(){this.items.length>0&&this.showItemWrapper(this.items[0])}addItem(e){let t=document.createElement("span");rQ(t,"tab"),t.setAttribute("tabindex","-1"),t.appendChild(e.title),t.classList.add("ag-tab"),this.eTabHeader.appendChild(t),rJ(t,e.titleLabel);let i={tabbedItem:e,eHeaderButton:t};this.items.push(i),t.addEventListener("click",this.showItemWrapper.bind(this,i))}showItem(e){let t=this.items.find(t=>t.tabbedItem===e);t&&this.showItemWrapper(t)}showItemWrapper(e){let{tabbedItem:t,eHeaderButton:i}=e;if(this.params.onItemClicked?.({item:t}),this.activeItem===e){this.params.onActiveItemClicked?.();return}this.lastScrollListener&&(this.lastScrollListener=this.lastScrollListener()),sL(this.eBody),t.bodyPromise.then(e=>{this.eBody.appendChild(e);let i=!this.focusService.isKeyboardMode();if(this.params.suppressFocusBodyOnOpen||this.focusService.focusInto(this.eBody,!1,i),t.afterAttachedCallback&&t.afterAttachedCallback(this.afterAttachedParams),this.params.keepScrollPosition){let i=t.getScrollableContainer&&t.getScrollableContainer()||e;[this.lastScrollListener]=this.addManagedElementListeners(i,{scroll:()=>{this.tabbedItemScrollMap.set(t.name,i.scrollTop)}});let r=this.tabbedItemScrollMap.get(t.name);void 0!==r&&setTimeout(()=>{i.scrollTop=r},0)}}),this.activeItem&&(this.activeItem.eHeaderButton.classList.remove("ag-tab-selected"),this.activeItem.tabbedItem.afterDetachedCallback?.()),i.classList.add("ag-tab-selected"),this.activeItem=e}},kc=class extends i2{wireBeans(e){this.expressionService=e.expressionService,this.valueService=e.valueService,this.columnModel=e.columnModel,this.visibleColsService=e.visibleColsService,this.userComponentFactory=e.userComponentFactory,this.ctrlsService=e.ctrlsService,this.funcColsService=e.funcColsService}init(e,t,i,r,s,a,o){this.params=o,this.eGui=t,this.eCheckbox=i,this.eExpanded=r,this.eContracted=s,this.comp=e,this.compClass=a;let{node:n,colDef:l}=o,h=this.isTopLevelFooter();if(!(!h&&(this.isEmbeddedRowMismatch()||n.footer&&this.gos.get("groupHideOpenParents")&&(l&&l.showRowGroup)!==(n.rowGroupColumn&&n.rowGroupColumn.getColId())))){if(this.setupShowingValueForOpenedParent(),this.findDisplayedGroupNode(),!h){let e=o.node.footer&&o.node.rowGroupIndex===this.funcColsService.getRowGroupColumns().findIndex(e=>e.getColId()===o.colDef?.showRowGroup),t="multipleColumns"!=this.gos.get("groupDisplayType")||this.gos.get("treeData")||this.gos.get("showOpenedGroup")&&!o.node.footer&&(!o.node.group||null!=o.node.rowGroupIndex&&o.node.rowGroupIndex>this.funcColsService.getRowGroupColumns().findIndex(e=>e.getColId()===o.colDef?.showRowGroup)),i=!n.group&&(this.params.colDef?.field||this.params.colDef?.valueGetter),r=this.isExpandable(),s=this.columnModel.isPivotMode()&&n.leafGroup&&n.rowGroupColumn?.getColId()===o.column?.getColDef().showRowGroup;if(!this.showingValueForOpenedParent&&!r&&!i&&!t&&!e&&!s)return}this.addExpandAndContract(),this.addFullWidthRowDraggerIfNeeded(),this.addCheckboxIfNeeded(),this.addValueElement(),this.setupIndent(),this.refreshAriaExpanded()}}getCellAriaRole(){let e=this.params.colDef?.cellAriaRole,t=this.params.column?.getColDef().cellAriaRole;return e||t||"gridcell"}destroy(){super.destroy(),this.expandListener=null}refreshAriaExpanded(){let{node:e,eGridCell:t}=this.params;if(this.expandListener&&(this.expandListener=this.expandListener()),!this.isExpandable()){r8(t);return}let i=()=>{r5(t,this.showingValueForOpenedParent||!!e.expanded)};[this.expandListener]=this.addManagedListeners(e,{expandedChanged:i})||null,i()}isTopLevelFooter(){if(!im(this.gos)||null!=this.params.value||-1!=this.params.node.level)return!1;let e=this.params.colDef;if(null==e||!0===e.showRowGroup)return!0;let t=this.funcColsService.getRowGroupColumns();return!t||0===t.length||t[0].getId()===e.showRowGroup}isEmbeddedRowMismatch(){if(!this.params.fullWidth||!this.gos.get("embedFullWidthRows"))return!1;let e="left"===this.params.pinned,t="right"===this.params.pinned,i=!e&&!t;return this.gos.get("enableRtl")?this.visibleColsService.isPinningLeft()?!t:!i:this.visibleColsService.isPinningLeft()?!e:!i}findDisplayedGroupNode(){let e=this.params.column,t=this.params.node;if(this.showingValueForOpenedParent){let i=t.parent;for(;null!=i;){if(i.rowGroupColumn&&e.isRowGroupDisplayed(i.rowGroupColumn.getId())){this.displayedGroupNode=i;break}i=i.parent}}tK(this.displayedGroupNode)&&(this.displayedGroupNode=t)}setupShowingValueForOpenedParent(){let e=this.params.node,t=this.params.column;if(!this.gos.get("groupHideOpenParents")||!e.groupData){this.showingValueForOpenedParent=!1;return}if(null!=e.rowGroupColumn){let i=e.rowGroupColumn.getId();if(t.isRowGroupDisplayed(i)){this.showingValueForOpenedParent=!1;return}}let i=null!=e.groupData[t.getId()];this.showingValueForOpenedParent=i}addValueElement(){this.displayedGroupNode.footer?this.addFooterValue():(this.addGroupValue(),this.addChildCount())}addGroupValue(){let e=this.adjustParamsWithDetailsFromRelatedColumn(),t=this.getInnerCompDetails(e),{valueFormatted:i,value:r}=e,s=i;if(null==s){let e=this.displayedGroupNode.rowGroupColumn&&this.params.column?.isRowGroupDisplayed(this.displayedGroupNode.rowGroupColumn.getId());s=""===this.displayedGroupNode.key&&this.displayedGroupNode.group&&e?this.localeService.getLocaleTextFunc()("blanks","(Blanks)"):r??null}this.comp.setInnerRenderer(t,s)}adjustParamsWithDetailsFromRelatedColumn(){let e=this.displayedGroupNode.rowGroupColumn,t=this.params.column;if(!e||null!=t&&!t.isRowGroupDisplayed(e.getId()))return this.params;let i=this.params,{value:r,node:s}=this.params,a=this.valueService.formatValue(e,s,r);return{...i,valueFormatted:a}}addFooterValue(){let e=this.params.totalValueGetter;if(!e){let t=this.params.footerValueGetter;t&&(e=t,tO("As of v31.3, footerValueGetter is deprecated. Use `totalValueGetter` instead."))}let t="";if(e){let i=rn(this.params);i.value=this.params.value,"function"==typeof e?t=e(i):"string"==typeof e?t=this.expressionService.evaluate(e,i):tO("footerValueGetter should be either a function or a string (expression)")}else t=this.localeService.getLocaleTextFunc()("footerTotal","Total")+" "+(null!=this.params.value?this.params.value:"");let i=this.getInnerCompDetails(this.params);this.comp.setInnerRenderer(i,t)}getInnerCompDetails(e){if(e.fullWidth)return this.userComponentFactory.getFullWidthGroupRowInnerCellRenderer(this.gos.get("groupRowRendererParams"),e);let t=this.userComponentFactory.getInnerRendererDetails(e,e);if(t&&!(t&&t.componentClass==this.compClass))return t;let i=this.displayedGroupNode.rowGroupColumn,r=i?i.getColDef():void 0;if(!r)return;let s=this.userComponentFactory.getCellRendererDetails(r,e);return s&&!(s&&s.componentClass==this.compClass)?s:s&&s.componentClass==this.compClass&&r.cellRendererParams&&r.cellRendererParams.innerRenderer?this.userComponentFactory.getInnerRendererDetails(r.cellRendererParams,e):void 0}addChildCount(){this.params.suppressCount||(this.addManagedListeners(this.displayedGroupNode,{allChildrenCountChanged:this.updateChildCount.bind(this)}),this.updateChildCount())}updateChildCount(){let e=this.displayedGroupNode.allChildrenCount,t=this.isShowRowGroupForThisRow()&&null!=e&&e>=0?`(${e})`:"";this.comp.setChildCount(t)}isShowRowGroupForThisRow(){if(this.gos.get("treeData"))return!0;let e=this.displayedGroupNode.rowGroupColumn;if(!e)return!1;let t=this.params.column;return null==t||t.isRowGroupDisplayed(e.getId())}addExpandAndContract(){let e=this.params,t=(e,t)=>{let i=s2(e,this.gos,null);i&&(t.appendChild(i),this.addDestroyFunc(()=>t.removeChild(i)))};t("groupExpanded",this.eExpanded),t("groupContracted",this.eContracted);let i=e.eGridCell;!(this.params.column?.isCellEditable(e.node)&&this.gos.get("enableGroupEdit"))&&this.isExpandable()&&!e.suppressDoubleClickExpand&&this.addManagedListeners(i,{dblclick:this.onCellDblClicked.bind(this)}),this.addManagedListeners(this.eExpanded,{click:this.onExpandClicked.bind(this)}),this.addManagedListeners(this.eContracted,{click:this.onExpandClicked.bind(this)}),this.addManagedListeners(i,{keydown:this.onKeyDown.bind(this)}),this.addManagedListeners(e.node,{expandedChanged:this.showExpandAndContractIcons.bind(this)}),this.showExpandAndContractIcons();let r=this.onRowNodeIsExpandableChanged.bind(this);this.addManagedListeners(this.displayedGroupNode,{allChildrenCountChanged:r,masterChanged:r,groupChanged:r,hasChildrenChanged:r})}onExpandClicked(e){iQ(e)||(iX(e),this.onExpandOrContract(e))}onExpandOrContract(e){let t=this.displayedGroupNode,i=!t.expanded;!i&&t.sticky&&this.scrollToStickyNode(t),t.setExpanded(i,e)}scrollToStickyNode(e){this.ctrlsService.getGridBodyCtrl().getScrollFeature().setVerticalScrollPosition(e.rowTop-e.stickyRowTop)}isExpandable(){if(this.showingValueForOpenedParent)return!0;let e=this.displayedGroupNode,t=this.columnModel.isPivotMode()&&e.leafGroup;if(!(e.isExpandable()&&!e.footer&&!t))return!1;let i=this.params.column;return null==i||"string"!=typeof i.getColDef().showRowGroup||this.isShowRowGroupForThisRow()}showExpandAndContractIcons(){let{params:e,displayedGroupNode:t,columnModel:i}=this,{node:r}=e,s=this.isExpandable();if(s){let e=!!this.showingValueForOpenedParent||r.expanded;this.comp.setExpandedDisplayed(e),this.comp.setContractedDisplayed(!e)}else this.comp.setExpandedDisplayed(!1),this.comp.setContractedDisplayed(!1);let a=i.isPivotMode(),o=a&&t.leafGroup,n=s&&!o,l=r.footer&&-1===r.level;this.comp.addOrRemoveCssClass("ag-cell-expandable",n),this.comp.addOrRemoveCssClass("ag-row-group",n),a?this.comp.addOrRemoveCssClass("ag-pivot-leaf-group",!!o):l||this.comp.addOrRemoveCssClass("ag-row-group-leaf-indent",!n)}onRowNodeIsExpandableChanged(){this.showExpandAndContractIcons(),this.setIndent(),this.refreshAriaExpanded()}setupIndent(){let e=this.params.node;this.params.suppressPadding||(this.addManagedListeners(e,{uiLevelChanged:this.setIndent.bind(this)}),this.setIndent())}setIndent(){if(this.gos.get("groupHideOpenParents"))return;let e=this.params,t=e.node,i=!!e.colDef,r=this.gos.get("treeData"),s=!i||r||!0===e.colDef.showRowGroup?t.uiLevel:0;this.indentClass&&this.comp.addOrRemoveCssClass(this.indentClass,!1),this.indentClass="ag-row-group-indent-"+s,this.comp.addOrRemoveCssClass(this.indentClass,!0),this.eGui.style.setProperty("--ag-indentation-level",String(s))}addFullWidthRowDraggerIfNeeded(){if(!this.params.fullWidth||!this.params.rowDrag)return;let e=new a3(()=>this.params.value,this.params.node);this.createManagedBean(e),this.eGui.insertAdjacentElement("afterbegin",e.getGui())}isUserWantsSelected(){let e=this.params.checkbox;return"function"==typeof e||!0===e}addCheckboxIfNeeded(){let e=this.displayedGroupNode,t=this.isUserWantsSelected()&&!e.footer&&!e.rowPinned&&!e.detail;if(t){let e=new nX;this.createBean(e),e.init({rowNode:this.params.node,column:this.params.column,overrides:{isVisible:this.params.checkbox,callbackParams:this.params,removeHidden:!0}}),this.eCheckbox.appendChild(e.getGui()),this.addDestroyFunc(()=>{this.eCheckbox.removeChild(e.getGui()),this.destroyBean(e)})}this.comp.setCheckboxVisible(t)}onKeyDown(e){e.key!==aa.ENTER||this.params.suppressEnterExpand||this.params.column&&this.params.column.isCellEditable(this.params.node)||this.onExpandOrContract(e)}onCellDblClicked(e){!iQ(e)&&(i1(this.eExpanded,e)||i1(this.eContracted,e)||this.onExpandOrContract(e))}},ku=`<span class="ag-cell-wrapper">
        <span class="ag-group-expanded" data-ref="eExpanded"></span>
        <span class="ag-group-contracted" data-ref="eContracted"></span>
        <span class="ag-group-checkbox ag-invisible" data-ref="eCheckbox"></span>
        <span class="ag-group-value" data-ref="eValue"></span>
        <span class="ag-group-child-count" data-ref="eChildCount"></span>
    </span>`,kp=class extends sQ{constructor(){super(ku),this.eExpanded=null,this.eContracted=null,this.eCheckbox=null,this.eValue=null,this.eChildCount=null}init(e){let t=this.createManagedBean(new kc),i=!e.colDef,r=this.getGui();t.init({setInnerRenderer:(e,t)=>this.setRenderDetails(e,t),setChildCount:e=>this.eChildCount.textContent=e,addOrRemoveCssClass:(e,t)=>this.addOrRemoveCssClass(e,t),setContractedDisplayed:e=>sC(this.eContracted,e),setExpandedDisplayed:e=>sC(this.eExpanded,e),setCheckboxVisible:e=>this.eCheckbox.classList.toggle("ag-invisible",!e)},r,this.eCheckbox,this.eExpanded,this.eContracted,this.constructor,e),i&&rQ(r,t.getCellAriaRole())}setRenderDetails(e,t){if(e){let t=e.newAgStackInstance();null!=t&&t.then(e=>{if(!e)return;let t=()=>this.destroyBean(e);this.isAlive()?(this.eValue.appendChild(e.getGui()),this.addDestroyFunc(t)):t()})}else this.eValue.innerText=t}destroy(){this.destroyBean(this.innerCellRenderer),super.destroy()}refresh(){return!1}},kg={ariaAdvancedFilterBuilderItem:e=>`${e[0]}. Level ${e[1]}. Press ENTER to edit`,ariaAdvancedFilterBuilderItemValidation:e=>`${e[0]}. Level ${e[1]}. ${e[2]} Press ENTER to edit`,ariaAdvancedFilterBuilderList:"Advanced Filter Builder List",ariaAdvancedFilterBuilderFilterItem:"Filter Condition",ariaAdvancedFilterBuilderGroupItem:"Filter Group",ariaAdvancedFilterBuilderColumn:"Column",ariaAdvancedFilterBuilderOption:"Option",ariaAdvancedFilterBuilderValue:"Value",ariaAdvancedFilterBuilderJoinOperator:"Join Operator",ariaAdvancedFilterInput:"Advanced Filter Input",ariaLabelAdvancedFilterAutocomplete:"Advanced Filter Autocomplete",advancedFilterContains:"contains",advancedFilterNotContains:"does not contain",advancedFilterTextEquals:"equals",advancedFilterTextNotEqual:"does not equal",advancedFilterStartsWith:"begins with",advancedFilterEndsWith:"ends with",advancedFilterBlank:"is blank",advancedFilterNotBlank:"is not blank",advancedFilterEquals:"=",advancedFilterNotEqual:"!=",advancedFilterGreaterThan:">",advancedFilterGreaterThanOrEqual:">=",advancedFilterLessThan:"<",advancedFilterLessThanOrEqual:"<=",advancedFilterTrue:"is true",advancedFilterFalse:"is false",advancedFilterAnd:"AND",advancedFilterOr:"OR",advancedFilterApply:"Apply",advancedFilterBuilder:"Builder",advancedFilterValidationMissingColumn:"Column is missing",advancedFilterValidationMissingOption:"Option is missing",advancedFilterValidationMissingValue:"Value is missing",advancedFilterValidationInvalidColumn:"Column not found",advancedFilterValidationInvalidOption:"Option not found",advancedFilterValidationMissingQuote:"Value is missing an end quote",advancedFilterValidationNotANumber:"Value is not a number",advancedFilterValidationInvalidDate:"Value is not a valid date",advancedFilterValidationMissingCondition:"Condition is missing",advancedFilterValidationJoinOperatorMismatch:"Join operators within a condition must be the same",advancedFilterValidationInvalidJoinOperator:"Join operator not found",advancedFilterValidationMissingEndBracket:"Missing end bracket",advancedFilterValidationExtraEndBracket:"Too many end brackets",advancedFilterValidationMessage:e=>`Expression has an error. ${e[0]} - ${e[1]}.`,advancedFilterValidationMessageAtEnd:e=>`Expression has an error. ${e[0]} at end of expression.`,advancedFilterBuilderTitle:"Advanced Filter",advancedFilterBuilderApply:"Apply",advancedFilterBuilderCancel:"Cancel",advancedFilterBuilderAddButtonTooltip:"Add Filter or Group",advancedFilterBuilderRemoveButtonTooltip:"Remove",advancedFilterBuilderMoveUpButtonTooltip:"Move Up",advancedFilterBuilderMoveDownButtonTooltip:"Move Down",advancedFilterBuilderAddJoin:"Add Group",advancedFilterBuilderAddCondition:"Add Filter",advancedFilterBuilderSelectColumn:"Select a column",advancedFilterBuilderSelectOption:"Select an option",advancedFilterBuilderEnterValue:"Enter a value...",advancedFilterBuilderValidationAlreadyApplied:"Current filter already applied.",advancedFilterBuilderValidationIncomplete:"Not all conditions are complete.",advancedFilterBuilderValidationSelectColumn:"Must select a column.",advancedFilterBuilderValidationSelectOption:"Must select an option.",advancedFilterBuilderValidationEnterValue:"Must enter a value."};function km(e,t,i){if(!e)return"";let r=i-t;return r?e.slice(0,e.length-r):e}function kf(e,t,i,r,s,a,o){let n=i+(!e.length||o?0:1),l=0;return s&&(" "===e[n]?l=1:(r+=" ",a&&(r+='"'))),{updatedValue:e.slice(0,t)+r+e.slice(n),updatedPosition:t+r.length+l}}function kv(e,t,i,r){let s=t,a=!1;for(;s<e.length;){let t=e[s];if("("===t){r&&" "===e[s-1]?a=!0:s-=1;break}if(" "===t||i&&")"===t){s-=1;break}s++}return{endPosition:s,isEmpty:a}}function ky(e,t,i,r){i!==t&&(e.expression=kf(e.expression,r-t.length+1,r,i).updatedValue)}var kC=class{constructor(e,t){this.params=e,this.startPosition=t,this.type="column",this.valid=!0,this.hasStartChar=!1,this.hasEndChar=!1,this.colName=""}parse(e,t){if(e!==kS.COL_START_CHAR||this.colName){if(e===kS.COL_END_CHAR&&this.hasStartChar){if(this.parseColumn(!1,t))return this.hasEndChar=!0,!1;this.colName+=e}else this.colName+=e}else this.hasStartChar=!0}getDisplayValue(){return(this.hasStartChar?kS.COL_START_CHAR:"")+this.colName+(this.hasEndChar?kS.COL_END_CHAR:"")}getColId(){return this.colId}complete(e){this.parseColumn(!0,e)}getValidationError(){return this.valid?null:{message:this.params.advancedFilterExpressionService.translate("advancedFilterValidationInvalidColumn"),startPosition:this.startPosition,endPosition:this.endPosition??this.params.expression.length-1}}parseColumn(e,t){this.endPosition=t;let i=this.params.advancedFilterExpressionService.getColId(this.colName);return i&&this.hasStartChar&&(this.colId=i.colId,ky(this.params,this.colName,i.columnName,t-1),this.colName=i.columnName,this.column=this.params.columnModel.getColDefCol(this.colId),this.column)?(this.baseCellDataType=this.params.dataTypeService?.getBaseDataType(this.column)??"text",!0):(e&&(this.valid=!1),this.baseCellDataType="text",!1)}},kw=class{constructor(e,t,i){this.params=e,this.startPosition=t,this.baseCellDataType=i,this.type="operator",this.valid=!0,this.expectedNumOperands=0,this.operator=""}parse(e,t){if(" "===e||")"===e){if(this.parseOperator(!1,t-1))return!0;this.operator+=e}else this.operator+=e}complete(e){this.parseOperator(!0,e)}getValidationError(){return this.valid?null:{message:this.params.advancedFilterExpressionService.translate("advancedFilterValidationInvalidOption"),startPosition:this.startPosition,endPosition:this.endPosition??this.params.expression.length-1}}getDisplayValue(){return this.operator}getOperatorKey(){return this.parsedOperator}parseOperator(e,t){let i=this.params.advancedFilterExpressionService.getDataTypeExpressionOperator(this.baseCellDataType),r=i.findOperator(this.operator);if(this.endPosition=t,r){this.parsedOperator=r;let e=i.operators[r];this.expectedNumOperands=e.numOperands;let s=e.displayValue;return ky(this.params,this.operator,s,t),this.operator=s,!0}return(e||null!==r)&&(this.valid=!1),!1}},kb=class{constructor(e,t,i,r){this.params=e,this.startPosition=t,this.baseCellDataType=i,this.column=r,this.type="operand",this.valid=!0,this.operand="",this.validationMessage=null}parse(e,t){if(" "===e){if(!this.quotes)return this.parseOperand(!1,t),!0;this.operand+=e}else if(")"===e){if("number"===this.baseCellDataType||!this.quotes)return this.parseOperand(!1,t-1),!0;this.operand+=e}else if(this.operand||this.quotes||"'"!==e&&'"'!==e){if(this.quotes&&e===this.quotes)return this.parseOperand(!1,t),!1;this.operand+=e}else this.quotes=e}complete(e){this.parseOperand(!0,e)}getValidationError(){return this.validationMessage?{message:this.validationMessage,startPosition:this.startPosition,endPosition:this.endPosition??this.params.expression.length-1}:null}getRawValue(){return this.operand}getModelValue(){return this.modelValue}parseOperand(e,t){let{advancedFilterExpressionService:i}=this.params;if(this.endPosition=t,this.modelValue=this.operand,e&&this.quotes)this.valid=!1,this.validationMessage=i.translate("advancedFilterValidationMissingQuote");else if(""===this.modelValue)this.valid=!1,this.validationMessage=i.translate("advancedFilterValidationMissingValue");else{let e=i.getOperandModelValue(this.operand,this.baseCellDataType,this.column);switch(null!=e&&(this.modelValue=e),this.baseCellDataType){case"number":(this.quotes||isNaN(this.modelValue))&&(this.valid=!1,this.validationMessage=i.translate("advancedFilterValidationNotANumber"));break;case"date":case"dateString":null==e&&(this.valid=!1,this.validationMessage=i.translate("advancedFilterValidationInvalidDate"))}}}},kS=class{constructor(e,t){this.params=e,this.startPosition=t,this.isAwaiting=!0}parseExpression(){let e=this.startPosition,{expression:t}=this.params;for(;e<t.length;){let i=t[e];if(" "===i&&this.isAwaiting);else{if(this.isAwaiting=!1,!this.parser){let t;this.columnParser?this.operatorParser?(this.operandParser=new kb(this.params,e,this.columnParser.baseCellDataType,this.columnParser.column),t=this.operandParser):(this.operatorParser=new kw(this.params,e,this.columnParser.baseCellDataType),t=this.operatorParser):(this.columnParser=new kC(this.params,e),t=this.columnParser),this.parser=t}let t=this.parser.parse(i,e);if(null!=t){if(this.isComplete())return this.returnEndPosition(t?e-1:e,!0);this.parser=void 0,this.isAwaiting=!0}}e++}return this.parser?.complete?.(e-1),this.returnEndPosition(e)}isValid(){return this.isComplete()&&this.columnParser.valid&&this.operatorParser.valid&&(!this.operandParser||this.operandParser.valid)}getValidationError(){let e;let t=this.columnParser?.getValidationError()??this.operatorParser?.getValidationError()??this.operandParser?.getValidationError();if(t)return t;let i=this.params.expression.length;return(this.columnParser?this.operatorParser?this.operatorParser.expectedNumOperands&&!this.operandParser&&(e="advancedFilterValidationMissingValue"):e="advancedFilterValidationMissingOption":e="advancedFilterValidationMissingColumn",e)?{message:this.params.advancedFilterExpressionService.translate(e),startPosition:i,endPosition:i}:null}getFunctionString(e){return this.getFunctionCommon(e,(e,t,i,r)=>{let s=i.replace(/(['"])/,"\\$1"),a=null==e?"":`, params.operands[${e}]`;return`params.operators[${t}].evaluator(expressionProxy.getValue('${s}', node), node, params.evaluatorParams[${r}]${a})`})}getFunctionParsed(e){return this.getFunctionCommon(e,(e,t,i,r)=>(s,a,o)=>o.operators[t].evaluator(s.getValue(i,a),a,o.evaluatorParams[r],null==e?void 0:o.operands[e]))}getAutocompleteListParams(e){return this.isColumnPosition(e)?this.getColumnAutocompleteListParams(e):this.isOperatorPosition(e)?this.getOperatorAutocompleteListParams(e):this.isBeyondEndPosition(e)?void 0:{enabled:!1}}updateExpression(e,t,i){let{expression:r}=this.params;if(this.isColumnPosition(e))return kf(this.params.expression,this.startPosition,this.columnParser?.getColId()?this.columnParser.endPosition:kv(r,e).endPosition,this.params.advancedFilterExpressionService.getColumnValue(t),!0);if(this.isOperatorPosition(e)){let s;let a=this.getBaseCellDataTypeFromOperatorAutocompleteType(i),o=this.hasOperand(a,t.key),n=o&&this.doesOperandNeedQuotes(a);if(this.operatorParser?.startPosition!=null&&e<this.operatorParser.startPosition)s=kf(r,e,e,t.displayValue??t.key,o,n);else{let i;let a=!1;if(this.operatorParser?.getOperatorKey())i=this.operatorParser.endPosition;else{let{endPosition:t,isEmpty:s}=kv(r,e,!0,!0);i=t,a=s}s=kf(r,function(e,t,i){let r=t;for(;r<i&&" "===e[r];)r++;return r}(r,this.columnParser.endPosition+1,i),i,t.displayValue??t.key,o,n,a)}return{...s,hideAutocomplete:!o}}return null}getModel(){let e=this.columnParser.getColId(),t={filterType:this.columnParser.baseCellDataType,colId:e,type:this.operatorParser.getOperatorKey()};return this.operatorParser.expectedNumOperands&&(t.filter=this.operandParser.getModelValue()),t}getFunctionCommon(e,t){let i=this.columnParser.getColId(),r=this.operatorParser?.getOperatorKey(),{operators:s,evaluatorParams:a,operands:o}=e,n=this.params.advancedFilterExpressionService.getExpressionOperator(this.columnParser.baseCellDataType,r),l=this.addToListAndGetIndex(s,n),h=this.params.advancedFilterExpressionService.getExpressionEvaluatorParams(i),d=this.addToListAndGetIndex(a,h);return t(this.operatorParser?.expectedNumOperands===0?void 0:this.addToListAndGetIndex(o,this.getOperandValue()),l,i,d)}getOperandValue(){let e=this.operandParser.getRawValue(),{baseCellDataType:t,column:i}=this.columnParser;switch(t){case"number":e=Number(e);break;case"date":case"dateString":e=this.params.valueService.parseValue(i,null,e,void 0)}if("dateString"===t){let{dataTypeService:t}=this.params;return t?t.getDateParserFunction(i)(e):e}return e}isComplete(){return!!(this.operatorParser&&(!this.operatorParser.expectedNumOperands||this.operatorParser.expectedNumOperands&&this.operandParser))}isColumnPosition(e){return!this.columnParser||null==this.columnParser.endPosition||e<=this.columnParser.endPosition+1}isOperatorPosition(e){return!this.operatorParser||null==this.operatorParser.endPosition||e<=this.operatorParser.endPosition+1}isBeyondEndPosition(e){return this.isComplete()&&null!=this.endPosition&&e>this.endPosition+1&&this.endPosition+1<this.params.expression.length}returnEndPosition(e,t){return this.endPosition=t?e:e-1,e}getColumnAutocompleteListParams(e){return this.params.advancedFilterExpressionService.generateAutocompleteListParams(this.params.advancedFilterExpressionService.getColumnAutocompleteEntries(),"column",this.getColumnSearchString(e))}getColumnSearchString(e){let t=this.columnParser?.getDisplayValue()??"",i=km(t,e,this.columnParser?.endPosition==null?this.params.expression.length:this.columnParser.endPosition+1),r=this.columnParser?.hasStartChar&&i.length>0,s=this.columnParser?.hasEndChar&&i.length===t.length+2;return r?i.slice(1,s?-1:void 0):i}getOperatorAutocompleteListParams(e){let t=this.columnParser?.column;if(!t)return{enabled:!1};let i=this.columnParser.baseCellDataType,r=this.operatorParser?.startPosition!=null&&e<this.operatorParser.startPosition?"":km(this.operatorParser?.getDisplayValue()??"",e,this.operatorParser?.endPosition==null?this.params.expression.length:this.operatorParser.endPosition+1);return this.params.advancedFilterExpressionService.generateAutocompleteListParams(this.params.advancedFilterExpressionService.getOperatorAutocompleteEntries(t,i),`operator-${i}`,r)}getBaseCellDataTypeFromOperatorAutocompleteType(e){return e?.replace("operator-","")}hasOperand(e,t){return!e||!t||(this.params.advancedFilterExpressionService.getExpressionOperator(e,t)?.numOperands??0)>0}doesOperandNeedQuotes(e){return"number"!==e}addToListAndGetIndex(e,t){let i=e.length;return e.push(t),i}};function kx(e,t,i){let r=!1,s=e.toLocaleLowerCase(),a=s+" ",o=Object.entries(t).find(([,e])=>{let t=i(e).toLocaleLowerCase();return t.startsWith(a)&&(r=!0),t===s});return o?o[0]:r?null:void 0}function kM(e,t){return(t??Object.keys(e)).map(t=>({key:t,displayValue:e[t].displayValue}))}kS.COL_START_CHAR="[",kS.COL_END_CHAR="]";var kE=class{constructor(e){this.params=e,this.initOperators()}getEntries(e){return kM(this.operators,e)}findOperator(e){return kx(e,this.operators,({displayValue:e})=>e)}initOperators(){let{translate:e}=this.params;this.operators={contains:{displayValue:e("advancedFilterContains"),evaluator:(e,t,i,r)=>this.evaluateExpression(e,t,i,r,!1,(e,t)=>e.includes(t)),numOperands:1},notContains:{displayValue:e("advancedFilterNotContains"),evaluator:(e,t,i,r)=>this.evaluateExpression(e,t,i,r,!0,(e,t)=>!e.includes(t)),numOperands:1},equals:{displayValue:e("advancedFilterTextEquals"),evaluator:(e,t,i,r)=>this.evaluateExpression(e,t,i,r,!1,(e,t)=>e===t),numOperands:1},notEqual:{displayValue:e("advancedFilterTextNotEqual"),evaluator:(e,t,i,r)=>this.evaluateExpression(e,t,i,r,!0,(e,t)=>e!=t),numOperands:1},startsWith:{displayValue:e("advancedFilterStartsWith"),evaluator:(e,t,i,r)=>this.evaluateExpression(e,t,i,r,!1,(e,t)=>e.startsWith(t)),numOperands:1},endsWith:{displayValue:e("advancedFilterEndsWith"),evaluator:(e,t,i,r)=>this.evaluateExpression(e,t,i,r,!1,(e,t)=>e.endsWith(t)),numOperands:1},blank:{displayValue:e("advancedFilterBlank"),evaluator:e=>null==e||"string"==typeof e&&0===e.trim().length,numOperands:0},notBlank:{displayValue:e("advancedFilterNotBlank"),evaluator:e=>null!=e&&("string"!=typeof e||e.trim().length>0),numOperands:0}}}evaluateExpression(e,t,i,r,s,a){return null==e?s:i.caseSensitive?a(i.valueConverter(e,t),r):a(i.valueConverter(e,t).toLocaleLowerCase(),r.toLocaleLowerCase())}},kD=class{constructor(e){this.params=e,this.initOperators()}getEntries(e){return kM(this.operators,e)}findOperator(e){return kx(e,this.operators,({displayValue:e})=>e)}initOperators(){let{translate:e,equals:t}=this.params;this.operators={equals:{displayValue:e("advancedFilterEquals"),evaluator:(e,i,r,s)=>this.evaluateSingleOperandExpression(e,i,r,s,!!r.includeBlanksInEquals,t),numOperands:1},notEqual:{displayValue:e("advancedFilterNotEqual"),evaluator:(e,i,r,s)=>this.evaluateSingleOperandExpression(e,i,r,s,!!r.includeBlanksInEquals,(e,i)=>!t(e,i)),numOperands:1},greaterThan:{displayValue:e("advancedFilterGreaterThan"),evaluator:(e,t,i,r)=>this.evaluateSingleOperandExpression(e,t,i,r,!!i.includeBlanksInGreaterThan,(e,t)=>e>t),numOperands:1},greaterThanOrEqual:{displayValue:e("advancedFilterGreaterThanOrEqual"),evaluator:(e,t,i,r)=>this.evaluateSingleOperandExpression(e,t,i,r,!!i.includeBlanksInGreaterThan,(e,t)=>e>=t),numOperands:1},lessThan:{displayValue:e("advancedFilterLessThan"),evaluator:(e,t,i,r)=>this.evaluateSingleOperandExpression(e,t,i,r,!!i.includeBlanksInLessThan,(e,t)=>e<t),numOperands:1},lessThanOrEqual:{displayValue:e("advancedFilterLessThanOrEqual"),evaluator:(e,t,i,r)=>this.evaluateSingleOperandExpression(e,t,i,r,!!i.includeBlanksInLessThan,(e,t)=>e<=t),numOperands:1},blank:{displayValue:e("advancedFilterBlank"),evaluator:e=>null==e,numOperands:0},notBlank:{displayValue:e("advancedFilterNotBlank"),evaluator:e=>null!=e,numOperands:0}}}evaluateSingleOperandExpression(e,t,i,r,s,a){return null==e?s:a(i.valueConverter(e,t),r)}},kI=class{constructor(e){this.params=e,this.initOperators()}getEntries(e){return kM(this.operators,e)}findOperator(e){return kx(e,this.operators,({displayValue:e})=>e)}initOperators(){let{translate:e}=this.params;this.operators={true:{displayValue:e("advancedFilterTrue"),evaluator:e=>!!e,numOperands:0},false:{displayValue:e("advancedFilterFalse"),evaluator:e=>!1===e,numOperands:0},blank:{displayValue:e("advancedFilterBlank"),evaluator:e=>null==e,numOperands:0},notBlank:{displayValue:e("advancedFilterNotBlank"),evaluator:e=>null!=e,numOperands:0}}}},kk=class extends i2{constructor(){super(...arguments),this.beanName="advancedFilterExpressionService",this.columnNameToIdMap={},this.columnAutocompleteEntries=null,this.expressionEvaluatorParams={}}wireBeans(e){this.valueService=e.valueService,this.columnModel=e.columnModel,this.columnNameService=e.columnNameService,this.dataTypeService=e.dataTypeService}postConstruct(){this.expressionJoinOperators=this.generateExpressionJoinOperators(),this.expressionOperators=this.generateExpressionOperators()}parseJoinOperator(e){let{type:t}=e;return this.expressionJoinOperators[t]??t}getColumnDisplayValue(e){let t;let{colId:i}=e,r=this.getColumnAutocompleteEntries().find(({key:e})=>e===i);return r?(t=r.displayValue,this.columnNameToIdMap[t.toLocaleUpperCase()]={colId:i,columnName:t}):t=i,t}getOperatorDisplayValue(e){return this.getExpressionOperator(e.filterType,e.type)?.displayValue??e.type}getOperandModelValue(e,t,i){switch(t){case"number":return tY(e)?Number(e):null;case"date":return oB(this.valueService.parseValue(i,null,e,void 0),!1);case"dateString":{let t=this.valueService.parseValue(i,null,e,void 0);return this.dataTypeService?oB(this.dataTypeService.getDateParserFunction(i)(t)??null,!1):t}}return e}getOperandDisplayValue(e,t){let{colId:i,filter:r}=e,s=this.columnModel.getColDefCol(i),a="";if(null!=r){let i;switch(e.filterType){case"number":i=tq(r)??"";break;case"date":{let e=o_(r);i=s?this.valueService.formatValue(s,null,e):null;break}case"dateString":{let e;if(this.dataTypeService){let t=o_(r);e=s?this.dataTypeService?.getDateFormatterFunction(s)(t??void 0):null}else e=r;i=s?this.valueService.formatValue(s,null,e):null}}"number"===e.filterType||(i=i??tq(r)??"",t||(i=`"${i}"`)),a=t?i:` ${i}`}return a}parseColumnFilterModel(e){let t=this.getColumnDisplayValue(e)??"",i=this.getOperatorDisplayValue(e)??"",r=this.getOperandDisplayValue(e);return`[${t}] ${i}${r}`}updateAutocompleteCache(e,t){if("column"===t){let{key:t,displayValue:i}=e;this.columnNameToIdMap[e.displayValue.toLocaleUpperCase()]={colId:t,columnName:i}}}translate(e,t){let i=kg[e];return"function"==typeof i&&(i=i(t)),this.localeService.getLocaleTextFunc()(e,i,t)}generateAutocompleteListParams(e,t,i){return{enabled:!0,type:t,searchString:i,entries:e}}getColumnAutocompleteEntries(){if(this.columnAutocompleteEntries)return this.columnAutocompleteEntries;let e=this.columnModel.getColDefCols()??[],t=[],i=this.gos.get("includeHiddenColumnsInAdvancedFilter");return e.forEach(e=>{e.getColDef().filter&&(i||e.isVisible()||e.isRowGroupActive())&&t.push({key:e.getColId(),displayValue:this.columnNameService.getDisplayNameForColumn(e,"advancedFilter")})}),t.sort((e,t)=>{let i=e.displayValue??"",r=t.displayValue??"";return i<r?-1:r>i?1:0}),t}getOperatorAutocompleteEntries(e,t){let i=this.getActiveOperators(e);return this.getDataTypeExpressionOperator(t).getEntries(i)}getJoinOperatorAutocompleteEntries(){return Object.entries(this.expressionJoinOperators).map(([e,t])=>({key:e,displayValue:t}))}getDefaultAutocompleteListParams(e){return this.generateAutocompleteListParams(this.getColumnAutocompleteEntries(),"column",e)}getDataTypeExpressionOperator(e){return this.expressionOperators[e]}getExpressionOperator(e,t){return this.getDataTypeExpressionOperator(e)?.operators?.[t]}getExpressionJoinOperators(){return this.expressionJoinOperators}getColId(e){let t=e.toLocaleUpperCase(),i=this.columnNameToIdMap[t];if(i)return i;let r=this.getColumnAutocompleteEntries().find(({displayValue:e})=>e.toLocaleUpperCase()===t);if(r){let{key:e,displayValue:i}=r,s={colId:e,columnName:i};return this.columnNameToIdMap[t]=s,s}return null}getExpressionEvaluatorParams(e){let t=this.expressionEvaluatorParams[e];if(t)return t;let i=this.columnModel.getColDefCol(e);if(!i)return{valueConverter:e=>e};switch(this.dataTypeService?.getBaseDataType(i)){case"dateString":t={valueConverter:this.dataTypeService?.getDateParserFunction(i)??(e=>e)};break;case"object":t=i.getColDef().filterValueGetter?{valueConverter:e=>e}:{valueConverter:(e,t)=>this.valueService.formatValue(i,t,e)??("function"==typeof e.toString?e.toString():"")};break;case"text":case void 0:t={valueConverter:e=>tq(e)};break;default:t={valueConverter:e=>e}}let{filterParams:r}=i.getColDef();return r&&["caseSensitive","includeBlanksInEquals","includeBlanksInLessThan","includeBlanksInGreaterThan"].forEach(e=>{let i=r[e];i&&(t[e]=i)}),this.expressionEvaluatorParams[e]=t,t}getColumnDetails(e){let t=this.columnModel.getColDefCol(e)??void 0,i=(t?this.dataTypeService?.getBaseDataType(t):void 0)??"text";return{column:t,baseCellDataType:i}}generateExpressionOperators(){let e=(e,t)=>this.translate(e,t);return{text:new kE({translate:e}),boolean:new kI({translate:e}),object:new kE({translate:e}),number:new kD({translate:e,equals:(e,t)=>e===t}),date:new kD({translate:e,equals:(e,t)=>e.getTime()===t.getTime()}),dateString:new kD({translate:e,equals:(e,t)=>e.getTime()===t.getTime()})}}getColumnValue({displayValue:e}){return`${kS.COL_START_CHAR}${e}${kS.COL_END_CHAR}`}generateExpressionJoinOperators(){return{AND:this.translate("advancedFilterAnd"),OR:this.translate("advancedFilterOr")}}getActiveOperators(e){let t=e.getColDef().filterParams?.filterOptions;if(t)return t.every(e=>"string"==typeof e)?t:void 0}resetColumnCaches(){this.columnAutocompleteEntries=null,this.columnNameToIdMap={},this.expressionEvaluatorParams={}}},kT=class extends sQ{constructor(){super(`
        <div class="ag-autocomplete-row" role="presentation">
            <div class="ag-autocomplete-row-label"></div>
        </div>`),this.hasHighlighting=!1}setState(e,t){this.value=e,this.render(),this.updateSelected(t)}updateSelected(e){this.addOrRemoveCssClass("ag-autocomplete-row-selected",e)}setSearchString(e){let t=!1;if(tY(e)){let i=this.value?.toLocaleLowerCase().indexOf(e.toLocaleLowerCase());if(i>=0){t=!0,this.hasHighlighting=!0;let r=i+e.length,s=rL(this.value.slice(0,i)),a=rL(this.value.slice(i,r)),o=rL(this.value.slice(r));this.getGui().lastElementChild.innerHTML=`${s}<b>${a}</b>${o}`}}!t&&this.hasHighlighting&&(this.hasHighlighting=!1,this.render())}render(){this.getGui().lastElementChild.innerHTML=rL(this.value)??"&nbsp;"}},kA=class extends av{constructor(e){super(`<div class="ag-autocomplete-list-popup">
            <div data-ref="eList" class="ag-autocomplete-list"></div>
        <div>`),this.params=e,this.eList=null,this.searchString=""}destroy(){super.destroy()}postConstruct(){this.autocompleteEntries=this.params.autocompleteEntries,this.virtualList=this.createManagedBean(new I6({cssIdentifier:"autocomplete"})),this.virtualList.setComponentCreator(this.createRowComponent.bind(this)),this.eList.appendChild(this.virtualList.getGui()),this.virtualList.setModel({getRowCount:()=>this.autocompleteEntries.length,getRow:e=>this.autocompleteEntries[e]});let e=this.virtualList.getGui();this.addManagedListeners(e,{click:()=>this.params.onConfirmed(),mousemove:this.onMouseMove.bind(this),mousedown:e=>e.preventDefault()}),this.setSelectedValue(0)}onNavigationKeyDown(e,t){e.preventDefault();let i=this.autocompleteEntries.indexOf(this.selectedValue),r=t===aa.UP?i-1:i+1;this.checkSetSelectedValue(r)}setSearch(e){this.searchString=e,tY(e)?this.runSearch():(this.autocompleteEntries=this.params.autocompleteEntries,this.virtualList.refresh(),this.checkSetSelectedValue(0)),this.updateSearchInList()}runContainsSearch(e,t){let i;let r=!1,s=e.toLocaleLowerCase(),a=t.filter(e=>{let t=e.toLocaleLowerCase().indexOf(s),a=0===t,o=t>=0;return o&&(!i||!r&&a||r===a&&e.length<i.length)&&(i=e,r=a),o});return!i&&a.length&&(i=a[0]),{topMatch:i,allMatches:a}}runSearch(){let e,t;let{autocompleteEntries:i}=this.params,r=i.map(e=>e.displayValue??e.key);if(this.params.useFuzzySearch)t=(e=aC(this.searchString,r,!0).values).length?e[0]:void 0;else{let i=this.runContainsSearch(this.searchString,r);e=i.allMatches,t=i.topMatch}let s=i.filter(({key:t,displayValue:i})=>e.includes(i??t));if(!s.length&&this.selectedValue&&this.params?.forceLastSelection?.(this.selectedValue,this.searchString)&&(s=[this.selectedValue]),this.autocompleteEntries=s,this.virtualList.refresh(),!t)return;let a=e.indexOf(t);this.checkSetSelectedValue(a)}updateSearchInList(){this.virtualList.forEachRenderedRow(e=>e.setSearchString(this.searchString))}checkSetSelectedValue(e){e>=0&&e<this.autocompleteEntries.length&&this.setSelectedValue(e)}setSelectedValue(e){let t=this.autocompleteEntries[e];this.selectedValue!==t&&(this.selectedValue=t,this.virtualList.ensureIndexVisible(e),this.virtualList.forEachRenderedRow((t,i)=>{t.updateSelected(e===i)}))}createRowComponent(e){let t=new kT;return this.createBean(t),t.setState(e.displayValue??e.key,e===this.selectedValue),t}onMouseMove(e){let t=this.virtualList.getGui().getBoundingClientRect(),i=this.virtualList.getScrollTop(),r=Math.floor((e.clientY-t.top+i)/this.virtualList.getRowHeight());this.checkSetSelectedValue(r)}afterGuiAttached(){this.virtualList.refresh()}getSelectedValue(){return this.autocompleteEntries.length?this.selectedValue??null:null}},kR={selector:"AG-AUTOCOMPLETE",component:class extends sQ{constructor(){super(`
            <div class="ag-autocomplete" role="presentation">
                <ag-input-text-field data-ref="eAutocompleteInput"></ag-input-text-field>
            </div>`,[ob]),this.eAutocompleteInput=null,this.isListOpen=!1,this.lastPosition=0,this.valid=!0}wireBeans(e){this.popupService=e.popupService}postConstruct(){this.eAutocompleteInput.onValueChange(e=>this.onValueChanged(e)),this.eAutocompleteInput.getInputElement().setAttribute("autocomplete","off"),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.addGuiEventListener("click",this.updatePositionAndList.bind(this)),this.addDestroyFunc(()=>{this.destroyBean(this.autocompleteList)}),this.addGuiEventListener("focusout",()=>this.onFocusOut())}onValueChanged(e){let t=t$(e);this.updateValue(t),this.updateAutocompleteList(t)}updateValue(e){this.updateLastPosition(),this.dispatchLocalEvent({type:"eventValueChanged",value:e}),this.validate(e)}updateAutocompleteList(e){let t=this.listGenerator?.(e,this.lastPosition)??{enabled:!1};if((!t.type||t.type!==this.autocompleteListParams?.type)&&this.isListOpen&&this.closeList(),this.autocompleteListParams=t,this.autocompleteListParams?.enabled){this.isListOpen||this.openList();let{searchString:e}=this.autocompleteListParams;this.autocompleteList.setSearch(e??"")}else this.isListOpen&&this.closeList()}onKeyDown(e){let t=e.key;switch(this.updateLastPosition(),t){case aa.ENTER:this.onEnterKeyDown(e);break;case aa.TAB:this.onTabKeyDown(e);break;case aa.DOWN:case aa.UP:this.onUpDownKeyDown(e,t);break;case aa.LEFT:case aa.RIGHT:case aa.PAGE_HOME:case aa.PAGE_END:setTimeout(()=>{this.updatePositionAndList()});break;case aa.ESCAPE:this.onEscapeKeyDown(e);break;case aa.SPACE:e.ctrlKey&&!this.isListOpen&&(e.preventDefault(),this.forceOpenList())}}confirmSelection(){let e=this.autocompleteList?.getSelectedValue();e&&(this.closeList(),this.dispatchLocalEvent({type:"eventOptionSelected",value:this.getValue(),position:this.lastPosition,updateEntry:e,autocompleteType:this.autocompleteListParams.type}))}onTabKeyDown(e){this.isListOpen&&(e.preventDefault(),e.stopPropagation(),this.confirmSelection())}onEnterKeyDown(e){e.preventDefault(),this.isListOpen?this.confirmSelection():this.onCompleted()}onUpDownKeyDown(e,t){e.preventDefault(),this.isListOpen?this.autocompleteList?.onNavigationKeyDown(e,t):this.forceOpenList()}onEscapeKeyDown(e){this.isListOpen&&(e.preventDefault(),e.stopPropagation(),this.closeList(),this.setCaret(this.lastPosition,!0))}onFocusOut(){this.isListOpen&&this.closeList()}updatePositionAndList(){this.updateLastPosition(),this.updateAutocompleteList(this.eAutocompleteInput.getValue()??null)}setCaret(e,t){t&&id(this.gos)&&this.eAutocompleteInput.getFocusableElement().focus();let i=this.eAutocompleteInput.getInputElement();i.setSelectionRange(e,e),e===i.value.length&&(i.scrollLeft=i.scrollWidth)}forceOpenList(){this.onValueChanged(this.eAutocompleteInput.getValue())}updateLastPosition(){this.lastPosition=this.eAutocompleteInput.getInputElement().selectionStart??0}validate(e){this.validator&&(this.validationMessage=this.validator(e),this.eAutocompleteInput.getInputElement().setCustomValidity(this.validationMessage??""),this.valid=!this.validationMessage,this.dispatchLocalEvent({type:"eventValidChanged",isValid:this.valid,validationMessage:this.validationMessage}))}openList(){this.isListOpen=!0,this.autocompleteList=this.createBean(new kA({autocompleteEntries:this.autocompleteListParams.entries,onConfirmed:()=>this.confirmSelection(),forceLastSelection:this.forceLastSelection}));let e=this.autocompleteList.getGui(),t={ePopup:e,type:"autocomplete",eventSource:this.getGui(),position:"under",alignSide:this.gos.get("enableRtl")?"right":"left",keepWithinBounds:!0},i=this.popupService.addPopup({eChild:e,anchorToElement:this.getGui(),positionCallback:()=>this.popupService.positionPopupByComponent(t),ariaLabel:this.listAriaLabel});this.hidePopup=i.hideFunc,this.autocompleteList.afterGuiAttached()}closeList(){this.isListOpen=!1,this.hidePopup(),this.destroyBean(this.autocompleteList),this.autocompleteList=null}onCompleted(){this.isListOpen&&this.closeList(),this.dispatchLocalEvent({type:"eventValueConfirmed",value:this.getValue(),isValid:this.isValid()})}getValue(){return t$(this.eAutocompleteInput.getValue())}setInputPlaceholder(e){return this.eAutocompleteInput.setInputPlaceholder(e),this}setInputAriaLabel(e){return this.eAutocompleteInput.setInputAriaLabel(e),this}setListAriaLabel(e){return this.listAriaLabel=e,this}setListGenerator(e){return this.listGenerator=e,this}setValidator(e){return this.validator=e,this}isValid(){return this.valid}setValue(e){let{value:t,position:i,silent:r,updateListOnlyIfOpen:s,restoreFocus:a}=e;this.eAutocompleteInput.setValue(t,!0),this.setCaret(i??this.lastPosition,a),r||this.updateValue(t),(!s||this.isListOpen)&&this.updateAutocompleteList(t)}setForceLastSelection(e){return this.forceLastSelection=e,this}setInputDisabled(e){return this.eAutocompleteInput.setDisabled(e),this}}},kL=class extends sQ{constructor(){super(`
            <div class="ag-advanced-filter" role="presentation" tabindex="-1">
                <ag-autocomplete data-ref="eAutocomplete"></ag-autocomplete>
                <button class="ag-button ag-standard-button ag-advanced-filter-apply-button" data-ref="eApplyFilterButton"></button>
                <button class="ag-advanced-filter-builder-button" data-ref="eBuilderFilterButton">
                    <span data-ref="eBuilderFilterButtonIcon" aria-hidden="true"></span>
                    <span class="ag-advanced-filter-builder-button-label" data-ref="eBuilderFilterButtonLabel"></span>
                </button>
            </div>`,[kR]),this.eAutocomplete=null,this.eApplyFilterButton=null,this.eBuilderFilterButton=null,this.eBuilderFilterButtonIcon=null,this.eBuilderFilterButtonLabel=null,this.expressionParser=null,this.isApplyDisabled=!0,this.builderOpen=!1}wireBeans(e){this.advancedFilterExpressionService=e.advancedFilterExpressionService,this.advancedFilterService=e.advancedFilterService,this.filterManager=e.filterManager}postConstruct(){this.eAutocomplete.setListGenerator((e,t)=>this.generateAutocompleteListParams(t)).setValidator(()=>this.validateValue()).setForceLastSelection((e,t)=>this.forceLastSelection(e,t)).setInputAriaLabel(this.advancedFilterExpressionService.translate("ariaAdvancedFilterInput")).setListAriaLabel(this.advancedFilterExpressionService.translate("ariaLabelAdvancedFilterAutocomplete")),this.refresh(),this.addManagedListeners(this.eAutocomplete,{eventValueChanged:({value:e})=>this.onValueChanged(e),eventValueConfirmed:({isValid:e})=>this.onValueConfirmed(e),eventOptionSelected:({position:e,updateEntry:t,autocompleteType:i})=>this.onOptionSelected(e,t,i),eventValidChanged:({isValid:e,validationMessage:t})=>this.onValidChanged(e,t)}),this.setupApplyButton(),this.setupBuilderButton()}refresh(){let e=this.advancedFilterService.getExpressionDisplayValue();this.eAutocomplete.setValue({value:e??"",position:e?.length,updateListOnlyIfOpen:!0})}setInputDisabled(e){this.eAutocomplete.setInputDisabled(e),sb(this.eApplyFilterButton,e||this.isApplyDisabled)}getTooltipParams(){let e=super.getTooltipParams();return e.location="advancedFilter",e}setupApplyButton(){this.eApplyFilterButton.innerText=this.advancedFilterExpressionService.translate("advancedFilterApply"),this.activateTabIndex([this.eApplyFilterButton]),this.addManagedElementListeners(this.eApplyFilterButton,{click:()=>this.onValueConfirmed(this.eAutocomplete.isValid())}),sb(this.eApplyFilterButton,this.isApplyDisabled)}setupBuilderButton(){this.eBuilderFilterButtonIcon.appendChild(s2("advancedFilterBuilder",this.gos)),this.eBuilderFilterButtonLabel.innerText=this.advancedFilterExpressionService.translate("advancedFilterBuilder"),this.activateTabIndex([this.eBuilderFilterButton]),this.addManagedElementListeners(this.eBuilderFilterButton,{click:()=>this.openBuilder()}),this.addManagedListeners(this.advancedFilterService.getCtrl(),{advancedFilterBuilderClosed:()=>this.closeBuilder()})}onValueChanged(e){e=t$(e),this.advancedFilterService.setExpressionDisplayValue(e),this.expressionParser=this.advancedFilterService.createExpressionParser(e);let t=this.expressionParser?.parseExpression();t&&t!==e&&this.eAutocomplete.setValue({value:t,silent:!0,restoreFocus:!0})}onValueConfirmed(e){e&&!this.isApplyDisabled&&(sb(this.eApplyFilterButton,!0),this.advancedFilterService.applyExpression(),this.filterManager?.onFilterChanged({source:"advancedFilter"}))}onOptionSelected(e,t,i){let{updatedValue:r,updatedPosition:s,hideAutocomplete:a}=this.updateExpression(e,t,i);this.eAutocomplete.setValue({value:r,position:s,updateListOnlyIfOpen:a,restoreFocus:!0})}validateValue(){return this.expressionParser?.isValid()?null:this.expressionParser?.getValidationMessage()??null}onValidChanged(e,t){this.isApplyDisabled=!e||this.advancedFilterService.isCurrentExpressionApplied(),sb(this.eApplyFilterButton,this.isApplyDisabled),this.setTooltip({newTooltipText:t,showDelayOverride:1e3})}generateAutocompleteListParams(e){return this.expressionParser?this.expressionParser.getAutocompleteListParams(e):this.advancedFilterExpressionService.getDefaultAutocompleteListParams("")}updateExpression(e,t,i){return this.advancedFilterExpressionService.updateAutocompleteCache(t,i),this.expressionParser?.updateExpression(e,t,i)??this.advancedFilterService.getDefaultExpression(t)}forceLastSelection({key:e,displayValue:t},i){return!!i.toLocaleLowerCase().match(`^${(t??e).toLocaleLowerCase()}\\s*$`)}openBuilder(){this.builderOpen||(this.builderOpen=!0,sb(this.eBuilderFilterButton,!0),this.advancedFilterService.getCtrl().toggleFilterBuilder({source:"ui",eventSource:this.eBuilderFilterButton}))}closeBuilder(){this.builderOpen&&(this.builderOpen=!1,sb(this.eBuilderFilterButton,!1),this.eBuilderFilterButton.focus())}},kP=class extends sQ{constructor(e){super(`
            <div class="ag-advanced-filter-header" role="row">
            </div>`),this.enabled=e}wireBeans(e){this.columnModel=e.columnModel,this.focusService=e.focusService,this.headerNavigationService=e.headerNavigationService}postConstruct(){this.setupAdvancedFilter(this.enabled),this.addDestroyFunc(()=>this.destroyBean(this.eAdvancedFilter));let e=()=>{this.enabled&&this.setEnabledHeight()};this.addManagedEventListeners({gridColumnsChanged:()=>this.onGridColumnsChanged(),columnHeaderHeightChanged:e,gridStylesChanged:e}),this.addManagedPropertyListener("headerHeight",e),this.addManagedPropertyListener("floatingFiltersHeight",e),this.addGuiEventListener("keydown",e=>this.onKeyDown(e)),this.addGuiEventListener("focusout",e=>{this.getFocusableElement().contains(e.relatedTarget)||this.focusService.clearAdvancedFilterColumn()})}getFocusableElement(){return this.eAdvancedFilter?.getGui()??this.getGui()}setEnabled(e){e!==this.enabled&&this.setupAdvancedFilter(e)}refresh(){this.eAdvancedFilter?.refresh()}getHeight(){return this.height}setInputDisabled(e){this.eAdvancedFilter?.setInputDisabled(e)}setupAdvancedFilter(e){let t=this.getGui();if(e){this.eAdvancedFilter=this.createBean(new kL);let e=this.eAdvancedFilter.getGui();this.eAdvancedFilter.addCssClass("ag-advanced-filter-header-cell"),this.setEnabledHeight(),this.setAriaRowIndex(),rQ(e,"gridcell"),st(e,1),this.setAriaColumnCount(e),t.appendChild(e)}else sL(t),this.destroyBean(this.eAdvancedFilter),this.height=0;sC(t,e),this.enabled=e}setEnabledHeight(){let e=this.getGui();this.height=this.columnModel.getFloatingFiltersHeight();let t=`${this.height}px`;e.style.height=t,e.style.minHeight=t}setAriaColumnCount(e){si(e,this.columnModel.getCols().length)}setAriaRowIndex(){se(this.getGui(),this.headerNavigationService.getHeaderRowCount())}onGridColumnsChanged(){this.eAdvancedFilter&&(this.setAriaColumnCount(this.eAdvancedFilter.getGui()),this.setAriaRowIndex())}onKeyDown(e){switch(e.key){case aa.ENTER:this.hasFocus()&&this.focusService.focusInto(this.getFocusableElement())&&e.preventDefault();break;case aa.ESCAPE:this.hasFocus()||this.getFocusableElement().focus();break;case aa.UP:this.navigateUpDown(!0,e);break;case aa.DOWN:this.navigateUpDown(!1,e);break;case aa.TAB:if(this.hasFocus())this.navigateLeftRight(e);else{let t=this.focusService.findNextFocusableElement(this.getFocusableElement(),null,e.shiftKey);t?(e.preventDefault(),t.focus()):this.navigateLeftRight(e)}}}navigateUpDown(e,t){this.hasFocus()&&this.focusService.focusNextFromAdvancedFilter(e)&&t.preventDefault()}navigateLeftRight(e){(e.shiftKey?this.focusService.focusLastHeader():this.focusService.focusNextFromAdvancedFilter(!1,!0))&&e.preventDefault()}hasFocus(){return ih(this.gos)===this.getFocusableElement()}},kF=class extends i2{constructor(e,t){super(),this.comp=e,this.virtualList=t}postConstruct(){this.createManagedBean(new kh(this.comp,this.virtualList,{dragSourceType:aX.AdvancedFilterBuilder,listItemDragStartEvent:"advancedFilterBuilderDragStarted",listItemDragEndEvent:"advancedFilterBuilderDragEnded",eventSource:this,getCurrentDragValue:e=>this.getCurrentDragValue(e),isMoveBlocked:()=>!1,getNumRows:e=>e.getNumItems(),moveItem:(e,t)=>this.moveItem(e,t)}))}getCurrentDragValue(e){return e.item}moveItem(e,t){this.comp.moveItem(e,t)}},kN=class extends I9{constructor(e){super({...e,template:`
                <div class="ag-picker-field" role="presentation">
                    <div data-ref="eLabel"></div>
                    <div data-ref="eWrapper" class="ag-wrapper ag-picker-collapsed">
                        <div data-ref="eDisplayField" class="ag-picker-field-display"></div>
                        <ag-input-text-field data-ref="eInput" class="ag-rich-select-field-input"></ag-input-text-field>
                        <span data-ref="eDeselect" class="ag-rich-select-deselect-button ag-picker-field-icon" role="presentation"></span>
                        <div data-ref="eIcon" class="ag-picker-field-icon" aria-hidden="true"></div>
                    </div>
                </div>`,agComponents:[ob]}),this.params=e}showPicker(){setTimeout(()=>super.showPicker())}hidePicker(){setTimeout(()=>super.hidePicker())}postConstruct(){super.postConstruct();let{wrapperClassName:e,ariaLabel:t}=this.params;sC(this.eDisplayField,!1),e&&this.eWrapper.classList.add(e),r0(this.eWrapper,""),rJ(this.eWrapper,t)}onEnterKeyDown(e){iX(e),this.isPickerDisplayed?super.onEnterKeyDown(e):(e.preventDefault(),this.showPicker())}},kO=class extends i2{constructor(e,t,i){super(),this.eGui=e,this.focusWrapper=t,this.eFocusableComp=i}postConstruct(){this.addManagedElementListeners(this.eGui,{keydown:e=>{switch(e.key){case aa.TAB:e.defaultPrevented||iX(e);break;case aa.UP:case aa.DOWN:iX(e);break;case aa.ESCAPE:if(iQ(e))return;this.eGui.contains(ih(this.gos))&&(e.preventDefault(),iX(e),this.focusWrapper.focus())}}});let e="ag-advanced-filter-builder-virtual-list-item-highlight";this.addManagedListeners(this.focusWrapper,{keydown:e=>{e.key!==aa.ENTER||iQ(e)||ih(this.gos)!==this.focusWrapper||(e.preventDefault(),iX(e),this.eFocusableComp.getFocusableElement().focus())},focusin:()=>{this.focusWrapper.classList.add(e)},focusout:t=>{this.focusWrapper.contains(t.relatedTarget)||this.focusWrapper.classList.remove(e)}})}};function kB(e,t){return{pickerAriaLabelKey:"ariaLabelAdvancedFilterBuilderAddField",pickerAriaLabelValue:"Advanced Filter Builder Add Field",pickerType:"ag-list",valueList:[{key:"condition",displayValue:e("advancedFilterBuilderAddCondition")},{key:"join",displayValue:e("advancedFilterBuilderAddJoin")}],valueFormatter:e=>null==e?null:e.displayValue??e.key,pickerIcon:"advancedFilterBuilderAdd",maxPickerWidth:`${t??120}px`,wrapperClassName:"ag-advanced-filter-builder-item-button",ariaLabel:e("advancedFilterBuilderAddButtonTooltip")}}var kG=class extends sQ{constructor(e,t){super(`
            <div class="ag-advanced-filter-builder-item-wrapper" role="presentation">
                <div data-ref="eItem" class="ag-advanced-filter-builder-item" role="presentation">
                    <div class="ag-advanced-filter-builder-item-tree-lines" aria-hidden="true">
                        <div class="ag-advanced-filter-builder-item-tree-line-vertical-top ag-advanced-filter-builder-item-tree-line-horizontal"></div>
                    </div>
                </div>
            </div>
        `),this.item=e,this.focusWrapper=t,this.eItem=null}wireBeans(e){this.advancedFilterExpressionService=e.advancedFilterExpressionService}postConstruct(){r2(this.focusWrapper,2);let e=kB(e=>this.advancedFilterExpressionService.translate(e),this.gos.get("advancedFilterBuilderParams")?.addSelectWidth),t=this.createManagedBean(new kN(e));this.addManagedListeners(t,{fieldPickerValueSelected:({value:e})=>{this.dispatchLocalEvent({type:"advancedFilterBuilderAdded",item:this.item,isJoin:"join"===e.key})}}),this.eItem.appendChild(t.getGui()),this.createManagedBean(new sq({getGui:()=>t.getGui(),getLocation:()=>"advancedFilter",getTooltipValue:()=>this.advancedFilterExpressionService.translate("advancedFilterBuilderAddButtonTooltip")})),this.createManagedBean(new kO(this.getGui(),this.focusWrapper,t)),rJ(this.focusWrapper,this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderItem",[this.advancedFilterExpressionService.translate("advancedFilterBuilderAddButtonTooltip"),`${this.item.level+1}`]))}afterAdd(){}},kz=class extends sQ{constructor(){super(`
            <div class="ag-advanced-filter-builder-item-condition" role="presentation"></div>
        `),this.validationMessage=null}wireBeans(e){this.advancedFilterExpressionService=e.advancedFilterExpressionService}init(e){let{item:t,createPill:i}=e;this.item=t,this.createPill=i,this.filterModel=t.filterModel,this.setupColumnCondition(this.filterModel),this.validate(),this.addDestroyFunc(()=>this.destroyBeans([this.eColumnPill,this.eOperatorPill,this.eOperandPill]))}getDragName(){return this.filterModel.colId?this.advancedFilterExpressionService.parseColumnFilterModel(this.filterModel):this.getDefaultColumnDisplayValue()}getAriaLabel(){return`${this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderFilterItem")} ${this.getDragName()}`}getValidationMessage(){return this.validationMessage}getFocusableElement(){return this.eColumnPill.getFocusableElement()}setupColumnCondition(e){let t=this.advancedFilterExpressionService.getColumnDetails(e.colId);this.baseCellDataType=t.baseCellDataType,this.column=t.column,this.numOperands=this.getNumOperands(this.getOperatorKey()),this.eColumnPill=this.createPill({key:this.getColumnKey(),displayValue:this.getColumnDisplayValue()??this.getDefaultColumnDisplayValue(),cssClass:"ag-advanced-filter-builder-column-pill",isSelect:!0,getEditorParams:()=>({values:this.advancedFilterExpressionService.getColumnAutocompleteEntries()}),update:e=>this.setColumnKey(e),pickerAriaLabelKey:"ariaLabelAdvancedFilterBuilderColumnSelectField",pickerAriaLabelValue:"Advanced Filter Builder Column Select Field",ariaLabel:this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderColumn")}),this.getGui().appendChild(this.eColumnPill.getGui()),tY(this.getColumnKey())&&(this.createOperatorPill(),this.hasOperand()&&this.createOperandPill())}createOperatorPill(){this.eOperatorPill=this.createPill({key:this.getOperatorKey(),displayValue:this.getOperatorDisplayValue()??this.getDefaultOptionSelectValue(),cssClass:"ag-advanced-filter-builder-option-pill",isSelect:!0,getEditorParams:()=>({values:this.getOperatorAutocompleteEntries()}),update:e=>this.setOperatorKey(e),pickerAriaLabelKey:"ariaLabelAdvancedFilterBuilderOptionSelectField",pickerAriaLabelValue:"Advanced Filter Builder Option Select Field",ariaLabel:this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderOption")}),this.eColumnPill.getGui().insertAdjacentElement("afterend",this.eOperatorPill.getGui())}createOperandPill(){let e=this.getOperandDisplayValue()??"";this.eOperandPill=this.createPill({key:e,displayValue:e,baseCellDataType:this.baseCellDataType,cssClass:"ag-advanced-filter-builder-value-pill",isSelect:!1,update:e=>this.setOperand(e),ariaLabel:this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderValue")}),this.getGui().appendChild(this.eOperandPill.getGui())}getColumnKey(){return this.filterModel.colId}getColumnDisplayValue(){return this.advancedFilterExpressionService.getColumnDisplayValue(this.filterModel)}getOperatorKey(){return this.filterModel.type}getOperatorDisplayValue(){return this.advancedFilterExpressionService.getOperatorDisplayValue(this.filterModel)}getOperandDisplayValue(){return this.advancedFilterExpressionService.getOperandDisplayValue(this.filterModel,!0)}hasOperand(){return this.numOperands>0}getOperatorAutocompleteEntries(){return this.column?this.advancedFilterExpressionService.getOperatorAutocompleteEntries(this.column,this.baseCellDataType):[]}setColumnKey(e){this.eOperatorPill||this.createOperatorPill();let t=this.advancedFilterExpressionService.getColumnDetails(e);this.column=t.column;let i=t.baseCellDataType;this.baseCellDataType!==i&&(this.baseCellDataType=i,this.setOperatorKey(void 0),this.eOperatorPill&&(sP(this.eOperatorPill.getGui()),this.destroyBean(this.eOperatorPill),this.createOperatorPill()),this.validate()),this.filterModel.colId=e,this.filterModel.filterType=this.baseCellDataType}setOperatorKey(e){let t=this.getNumOperands(e);t!==this.numOperands&&(this.numOperands=t,0===t?this.destroyOperandPill():(this.createOperandPill(),"number"!==this.baseCellDataType&&this.setOperand(""))),this.filterModel.type=e,this.validate()}setOperand(e){let t=e;this.column&&(t=this.advancedFilterExpressionService.getOperandModelValue(e,this.baseCellDataType,this.column)??""),this.filterModel.filter=t,this.validate()}getNumOperands(e){return this.advancedFilterExpressionService.getExpressionOperator(this.baseCellDataType,e)?.numOperands??0}destroyOperandPill(){delete this.filterModel.filter,this.getGui().removeChild(this.eOperandPill.getGui()),this.destroyBean(this.eOperandPill),this.eOperandPill=void 0}validate(){let e=null;tY(this.getColumnKey())?tY(this.getOperatorKey())?this.numOperands>0&&!tY(this.getOperandDisplayValue())&&(e=this.advancedFilterExpressionService.translate("advancedFilterBuilderValidationEnterValue")):e=this.advancedFilterExpressionService.translate("advancedFilterBuilderValidationSelectOption"):e=this.advancedFilterExpressionService.translate("advancedFilterBuilderValidationSelectColumn"),this.item.valid=!e,e!==this.validationMessage&&(this.validationMessage=e,this.dispatchLocalEvent({type:"advancedFilterBuilderValidChanged"}))}getDefaultColumnDisplayValue(){return this.advancedFilterExpressionService.translate("advancedFilterBuilderSelectColumn")}getDefaultOptionSelectValue(){return this.advancedFilterExpressionService.translate("advancedFilterBuilderSelectOption")}},k_=class extends sQ{constructor(e){super(`
            <div class="ag-advanced-filter-builder-pill-wrapper" role="presentation">
                <div data-ref="ePill" class="ag-advanced-filter-builder-pill" role="button">
                    <span data-ref="eLabel" class="ag-advanced-filter-builder-pill-display"></span>
                </div>
            </div>
        `),this.params=e,this.ePill=null,this.eLabel=null,this.value=e.value}wireBeans(e){this.advancedFilterExpressionService=e.advancedFilterExpressionService}postConstruct(){let{cssClass:e,ariaLabel:t}=this.params;this.ePill.classList.add(e),this.activateTabIndex([this.ePill]),this.eLabel.id=`${this.getCompId()}`,r1(this.ePill,this.eLabel.id),rJ(this.ePill,t),this.renderValue(),this.addManagedListeners(this.ePill,{click:e=>{e.preventDefault(),this.showEditor()},keydown:e=>{e.key===aa.ENTER&&(e.preventDefault(),iX(e),this.showEditor())}}),this.addDestroyFunc(()=>this.destroyBean(this.eEditor))}getFocusableElement(){return this.ePill}showEditor(){if(this.eEditor)return;sC(this.ePill,!1),this.eEditor=this.createEditorComp(this.params.type),this.eEditor.setValue(this.value);let e=this.eEditor.getGui();this.eEditor.addManagedElementListeners(e,{keydown:e=>{switch(e.key){case aa.ENTER:e.preventDefault(),iX(e),this.updateValue(!0);break;case aa.ESCAPE:e.preventDefault(),iX(e),this.hideEditor(!0)}},focusout:()=>this.updateValue(!1)}),this.getGui().appendChild(e),this.eEditor.getFocusableElement().focus()}createEditorComp(e){let t;switch(e){case"text":t=new ow;break;case"number":t=new oS;break;case"date":t=new l$}return this.createBean(t)}hideEditor(e){let{eEditor:t}=this;t&&(this.eEditor=void 0,this.getGui().removeChild(t.getGui()),this.destroyBean(t),sC(this.ePill,!0),e&&this.ePill.focus())}renderValue(){let e;this.eLabel.classList.remove("ag-advanced-filter-builder-value-empty","ag-advanced-filter-builder-value-number","ag-advanced-filter-builder-value-text"),tY(this.value)?"number"===this.params.type?(e=this.value,this.eLabel.classList.add("ag-advanced-filter-builder-value-number")):(e=`"${this.value}"`,this.eLabel.classList.add("ag-advanced-filter-builder-value-text")):(e=this.advancedFilterExpressionService.translate("advancedFilterBuilderEnterValue"),this.eLabel.classList.add("ag-advanced-filter-builder-value-empty")),this.eLabel.innerText=e}updateValue(e){if(!this.eEditor)return;let t=this.eEditor.getValue()??"";this.dispatchLocalEvent({type:"fieldValueChanged",value:t}),this.value=t,this.renderValue(),this.hideEditor(e)}},kV=class extends sQ{wireBeans(e){this.advancedFilterExpressionService=e.advancedFilterExpressionService}constructor(){super(`
            <div class="ag-advanced-filter-builder-item-condition" role="presentation"></div>
        `)}init(e){let{item:t,createPill:i}=e,r=t.filterModel;this.filterModel=r,this.ePill=i({key:r.type,displayValue:this.advancedFilterExpressionService.parseJoinOperator(r),cssClass:"ag-advanced-filter-builder-join-pill",isSelect:!0,getEditorParams:()=>({values:this.advancedFilterExpressionService.getJoinOperatorAutocompleteEntries()}),update:e=>r.type=e,pickerAriaLabelKey:"ariaLabelAdvancedFilterBuilderJoinSelectField",pickerAriaLabelValue:"Advanced Filter Builder Join Operator Select Field",ariaLabel:this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderJoinOperator")}),this.getGui().appendChild(this.ePill.getGui()),this.addDestroyFunc(()=>this.destroyBean(this.ePill))}getDragName(){return this.advancedFilterExpressionService.parseJoinOperator(this.filterModel)}getAriaLabel(){return`${this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderGroupItem")} ${this.getDragName()}`}getValidationMessage(){return null}getFocusableElement(){return this.ePill.getFocusableElement()}},kj=class extends I9{constructor(e){super({...e,template:`
                <div class="ag-picker-field ag-advanced-filter-builder-pill-wrapper" role="presentation">
                    <div data-ref="eLabel"></div>
                    <div data-ref="eWrapper" class="ag-wrapper ag-advanced-filter-builder-pill ag-picker-collapsed">
                        <div data-ref="eDisplayField" class="ag-picker-field-display ag-advanced-filter-builder-pill-display"></div>
                        <ag-input-text-field data-ref="eInput" class="ag-rich-select-field-input"></ag-input-text-field>
                        <span data-ref="eDeselect" class="ag-rich-select-deselect-button ag-picker-field-icon" role="presentation"></span>
                        <div data-ref="eIcon" class="ag-picker-field-icon" aria-hidden="true"></div>
                    </div>
                </div>`,agComponents:[ob]}),this.params=e}getFocusableElement(){return this.eWrapper}showPicker(){setTimeout(()=>super.showPicker())}hidePicker(){setTimeout(()=>super.hidePicker())}postConstruct(){super.postConstruct();let{wrapperClassName:e,ariaLabel:t}=this.params;this.eWrapper.classList.add(e),r0(this.eWrapper,""),rJ(this.eWrapper,t)}createPickerComponent(){if(!this.values){let{values:e}=this.params.getEditorParams();this.values=e;let t=this.value.key,i=e.find(e=>e.key===t)??{key:t,displayValue:this.value.displayValue};this.value=i}return super.createPickerComponent()}onEnterKeyDown(e){iX(e),this.isPickerDisplayed?super.onEnterKeyDown(e):(e.preventDefault(),this.showPicker())}},kH=class extends hu{constructor(e,t,i){super(`
            <div class="ag-advanced-filter-builder-item-wrapper" role="presentation">
                <div class="ag-advanced-filter-builder-item" role="presentation">
                    <div data-ref="eTreeLines" class="ag-advanced-filter-builder-item-tree-lines" aria-hidden="true"></div>
                    <span data-ref="eDragHandle" class="ag-drag-handle" aria-hidden="true"></span>
                    <span data-ref="eValidation" class="ag-advanced-filter-builder-item-button ag-advanced-filter-builder-invalid" aria-hidden="true"></span>
                </div>
                <div data-ref="eButtons" class="ag-advanced-filter-builder-item-buttons">
                    <span data-ref="eMoveUpButton" class="ag-advanced-filter-builder-item-button" role="button"></span>
                    <span data-ref="eMoveDownButton" class="ag-advanced-filter-builder-item-button" role="button"></span>
                    <div data-ref="eAddButton" role="presentation"></div>
                    <span data-ref="eRemoveButton" class="ag-advanced-filter-builder-item-button" role="button"></span>
                </div>
            </div>
        `),this.item=e,this.dragFeature=t,this.focusWrapper=i,this.eTreeLines=null,this.eDragHandle=null,this.eButtons=null,this.eValidation=null,this.eMoveUpButton=null,this.eMoveDownButton=null,this.eAddButton=null,this.eRemoveButton=null,this.moveUpDisabled=!1,this.moveDownDisabled=!1}wireBeans(e){this.dragAndDropService=e.dragAndDropService,this.advancedFilterExpressionService=e.advancedFilterExpressionService}postConstruct(){let{filterModel:e,level:t,showMove:i}=this.item,r="join"===e.filterType;if(this.ePillWrapper=this.createManagedBean(r?new kV:new kz),this.ePillWrapper.init({item:this.item,createPill:e=>this.createPill(e)}),this.eDragHandle.insertAdjacentElement("afterend",this.ePillWrapper.getGui()),0===t){let e=document.createElement("div");e.classList.add("ag-advanced-filter-builder-item-tree-line-vertical-bottom"),e.classList.add("ag-advanced-filter-builder-item-tree-line-root"),this.eTreeLines.appendChild(e),sC(this.eDragHandle,!1),sC(this.eButtons,!1),r5(this.focusWrapper,!0)}else this.setupTreeLines(t),this.eDragHandle.appendChild(s2("advancedFilterBuilderDrag",this.gos)),this.setupValidation(),this.setupMoveButtons(i),this.setupAddButton(),this.setupRemoveButton(),this.setupDragging(),this.updateAriaExpanded();r2(this.focusWrapper,t+1),this.initialiseTabGuard({}),this.createManagedBean(new kO(this.getGui(),this.focusWrapper,this.ePillWrapper)),this.updateAriaLabel(),this.addManagedListeners(this.ePillWrapper,{advancedFilterBuilderValueChanged:()=>this.dispatchLocalEvent({type:"advancedFilterBuilderValueChanged"}),advancedFilterBuilderValidChanged:()=>this.updateValidity()})}setState(e){let{level:t}=this.item;if(0===t)return;let{showMove:i}=this.item,{disableMoveUp:r,disableMoveDown:s,treeLines:a,showStartTreeLine:o}=e;this.updateTreeLines(a,o),this.updateAriaExpanded(),i&&(this.moveUpDisabled=!!r,this.moveDownDisabled=!!s,this.eMoveUpButton.classList.toggle("ag-advanced-filter-builder-item-button-disabled",r),this.eMoveDownButton.classList.toggle("ag-advanced-filter-builder-item-button-disabled",s),r3(this.eMoveUpButton,!!r),r3(this.eMoveDownButton,!!s),this.moveUpTooltipFeature.refreshToolTip(),this.moveDownTooltipFeature.refreshToolTip())}focusMoveButton(e){(e?this.eMoveUpButton:this.eMoveDownButton).focus()}afterAdd(){this.ePillWrapper.getFocusableElement().focus()}setupTreeLines(e){for(let t=0;t<e;t++){let e=document.createElement("div");this.eTreeLines.appendChild(e)}}updateTreeLines(e,t){let i=e.length-1,{children:r}=this.eTreeLines;for(let t=0;t<i;t++){let i=r.item(t);i&&i.classList.toggle("ag-advanced-filter-builder-item-tree-line-vertical",!e[t])}let s=r.item(i);if(s){s.classList.add("ag-advanced-filter-builder-item-tree-line-horizontal");let t=e[i];s.classList.toggle("ag-advanced-filter-builder-item-tree-line-vertical-top",t),s.classList.toggle("ag-advanced-filter-builder-item-tree-line-vertical",!t)}this.eDragHandle.classList.toggle("ag-advanced-filter-builder-item-tree-line-vertical-bottom",t)}setupValidation(){this.eValidation.appendChild(s2("advancedFilterBuilderInvalid",this.gos)),this.validationTooltipFeature=this.createManagedBean(new sq({getGui:()=>this.eValidation,getLocation:()=>"advancedFilter",getTooltipValue:()=>this.ePillWrapper.getValidationMessage(),getTooltipShowDelayOverride:()=>1e3})),this.updateValidity()}setupAddButton(){let e=kB(e=>this.advancedFilterExpressionService.translate(e),this.gos.get("advancedFilterBuilderParams")?.addSelectWidth),t=this.createManagedBean(new kN(e));this.addManagedListeners(t,{fieldPickerValueSelected:({value:e})=>this.dispatchLocalEvent({type:"advancedFilterBuilderAdded",item:this.item,isJoin:"join"===e.key})}),this.eAddButton.appendChild(t.getGui()),this.createManagedBean(new sq({getGui:()=>this.eAddButton,getLocation:()=>"advancedFilter",getTooltipValue:()=>this.advancedFilterExpressionService.translate("advancedFilterBuilderAddButtonTooltip")}))}setupRemoveButton(){this.eRemoveButton.appendChild(s2("advancedFilterBuilderRemove",this.gos)),this.addManagedListeners(this.eRemoveButton,{click:()=>this.removeItem(),keydown:e=>{e.key===aa.ENTER&&(e.preventDefault(),iX(e),this.removeItem())}}),this.createManagedBean(new sq({getGui:()=>this.eRemoveButton,getLocation:()=>"advancedFilter",getTooltipValue:()=>this.advancedFilterExpressionService.translate("advancedFilterBuilderRemoveButtonTooltip")})),rJ(this.eRemoveButton,this.advancedFilterExpressionService.translate("advancedFilterBuilderRemoveButtonTooltip")),this.activateTabIndex([this.eRemoveButton])}setupMoveButtons(e){e?(this.eMoveUpButton.appendChild(s2("advancedFilterBuilderMoveUp",this.gos)),this.addManagedListeners(this.eMoveUpButton,{click:()=>this.moveItem(!0),keydown:e=>{e.key===aa.ENTER&&(e.preventDefault(),iX(e),this.moveItem(!0))}}),this.moveUpTooltipFeature=this.createManagedBean(new sq({getGui:()=>this.eMoveUpButton,getLocation:()=>"advancedFilter",getTooltipValue:()=>this.moveUpDisabled?null:this.advancedFilterExpressionService.translate("advancedFilterBuilderMoveUpButtonTooltip")})),rJ(this.eMoveUpButton,this.advancedFilterExpressionService.translate("advancedFilterBuilderMoveUpButtonTooltip")),this.eMoveDownButton.appendChild(s2("advancedFilterBuilderMoveDown",this.gos)),this.addManagedListeners(this.eMoveDownButton,{click:()=>this.moveItem(!1),keydown:e=>{e.key===aa.ENTER&&(e.preventDefault(),iX(e),this.moveItem(!1))}}),this.moveDownTooltipFeature=this.createManagedBean(new sq({getGui:()=>this.eMoveDownButton,getLocation:()=>"advancedFilter",getTooltipValue:()=>this.moveDownDisabled?null:this.advancedFilterExpressionService.translate("advancedFilterBuilderMoveDownButtonTooltip")})),rJ(this.eMoveDownButton,this.advancedFilterExpressionService.translate("advancedFilterBuilderMoveDownButtonTooltip")),this.activateTabIndex([this.eMoveUpButton,this.eMoveDownButton])):(sC(this.eMoveUpButton,!1),sC(this.eMoveDownButton,!1))}updateValidity(){sw(this.eValidation,!this.item.valid),this.validationTooltipFeature.refreshToolTip(),this.updateAriaLabel()}createPill(e){let{key:t,displayValue:i,cssClass:r,update:s,ariaLabel:a}=e,o=e=>{null!=e&&(s(e),this.dispatchLocalEvent({type:"advancedFilterBuilderValueChanged"}))};if(e.isSelect){let{getEditorParams:s,pickerAriaLabelKey:n,pickerAriaLabelValue:l}=e,h=this.gos.get("advancedFilterBuilderParams"),d=`${h?.pillSelectMinWidth??140}px`,c=`${h?.pillSelectMaxWidth??200}px`,u=this.createBean(new kj({pickerAriaLabelKey:n,pickerAriaLabelValue:l,pickerType:"ag-list",value:{key:t,displayValue:i},valueFormatter:e=>null==e?null:e.displayValue??e.key,variableWidth:!0,minPickerWidth:d,maxPickerWidth:c,getEditorParams:s,wrapperClassName:r,ariaLabel:a}));return this.addManagedListeners(u,{fieldPickerValueSelected:({value:e})=>o(e?.key)}),u}{let t=this.createBean(new k_({value:i,cssClass:r,type:this.getInputType(e.baseCellDataType),ariaLabel:a}));return this.addManagedListeners(t,{fieldValueChanged:({value:e})=>o(e)}),t}}getInputType(e){switch(e){case"text":case"object":case"boolean":return"text";case"number":return"number";case"date":case"dateString":return"date"}}setupDragging(){let e={type:aX.AdvancedFilterBuilder,eElement:this.eDragHandle,dragItemName:()=>this.ePillWrapper.getDragName(),getDefaultIconName:()=>"notAllowed",getDragItem:()=>({}),onDragStarted:()=>this.dragFeature.dispatchLocalEvent({type:"advancedFilterBuilderDragStarted",item:this.item}),onDragStopped:()=>this.dragFeature.dispatchLocalEvent({type:"advancedFilterBuilderDragEnded"})};this.dragAndDropService.addDragSource(e,!0),this.addDestroyFunc(()=>this.dragAndDropService.removeDragSource(e))}updateAriaLabel(){let e;let t=this.ePillWrapper.getAriaLabel(),i=`${this.item.level+1}`,r=this.ePillWrapper.getValidationMessage();e=r?this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderItemValidation",[t,i,r]):this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderItem",[t,i]),rJ(this.focusWrapper,e)}updateAriaExpanded(){r8(this.focusWrapper);let{filterModel:e}=this.item;e?.filterType==="join"&&e.conditions.length&&r5(this.focusWrapper,!0)}removeItem(){this.dispatchLocalEvent({type:"advancedFilterBuilderRemoved",item:this.item})}moveItem(e){this.dispatchLocalEvent({type:"advancedFilterBuilderMoved",item:this.item,backwards:e})}},kU=class extends sQ{constructor(){super(`
            <div role="presentation" class="ag-advanced-filter-builder" tabindex="-1">
                <div role="presentation" class="ag-advanced-filter-builder-list" data-ref="eList"></div>
                <div role="presentation" class="ag-advanced-filter-builder-button-panel">
                    <button class="ag-button ag-standard-button ag-advanced-filter-builder-apply-button" data-ref="eApplyFilterButton"></button>
                    <button class="ag-button ag-standard-button ag-advanced-filter-builder-cancel-button" data-ref="eCancelFilterButton"></button>
                </div>
            </div>`),this.eList=null,this.eApplyFilterButton=null,this.eCancelFilterButton=null,this.validationMessage=null}wireBeans(e){this.filterManager=e.filterManager,this.advancedFilterService=e.advancedFilterService,this.advancedFilterExpressionService=e.advancedFilterExpressionService}postConstruct(){let{showMoveButtons:e}=this.gos.get("advancedFilterBuilderParams")??{};this.showMove=!!e,this.addManagedPropertyListener("advancedFilterBuilderParams",({currentValue:e})=>{this.showMove=!!e?.showMoveButtons,this.refreshList(!1)}),this.filterModel=this.setupFilterModel(),this.setupVirtualList(),this.dragFeature=this.createManagedBean(new kF(this,this.virtualList)),this.setupButtons()}refresh(){let e=this.virtualList.getLastFocusedRow();this.setupFilterModel(),this.validateItems(),this.refreshList(!1),null!=e&&(this.virtualList.getComponentAt(e)||(e=0),this.virtualList.focusRow(e))}getNumItems(){return this.items.length}moveItem(e,t){t&&e&&this.moveItemToIndex(e,t.rowIndex,t.position)}afterGuiAttached(){this.virtualList.awaitStable(()=>this.virtualList.focusRow(0))}setupVirtualList(){this.virtualList=this.createManagedBean(new I6({cssIdentifier:"advanced-filter-builder",ariaRole:"tree",listName:this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderList")})),this.virtualList.setComponentCreator(this.createItemComponent.bind(this)),this.virtualList.setComponentUpdater(this.updateItemComponent.bind(this)),this.virtualList.setRowHeight(40),this.eList.appendChild(this.virtualList.getGui()),this.virtualList.setModel({getRowCount:()=>this.items.length,getRow:e=>this.items[e],areRowsEqual:(e,t)=>e===t}),this.buildList(),this.virtualList.refresh()}setupButtons(){this.eApplyFilterButton.innerText=this.advancedFilterExpressionService.translate("advancedFilterBuilderApply"),this.activateTabIndex([this.eApplyFilterButton]),this.addManagedElementListeners(this.eApplyFilterButton,{click:()=>{this.advancedFilterService.setModel(this.filterModel),this.filterManager?.onFilterChanged({source:"advancedFilter"}),this.close()}}),this.validationTooltipFeature=this.createManagedBean(new sq({getGui:()=>this.eApplyFilterButton,getLocation:()=>"advancedFilter",getTooltipValue:()=>this.validationMessage,getTooltipShowDelayOverride:()=>1e3})),this.validate();let e=e=>this.addOrRemoveCssClass("ag-advanced-filter-builder-validation",e);this.addManagedListeners(this.eApplyFilterButton,{mouseenter:()=>e(!0),mouseleave:()=>e(!1)}),this.eCancelFilterButton.innerText=this.advancedFilterExpressionService.translate("advancedFilterBuilderCancel"),this.activateTabIndex([this.eCancelFilterButton]),this.addManagedElementListeners(this.eCancelFilterButton,{click:()=>this.close()})}removeItemFromParent(e){let t=e.parent.conditions.indexOf(e.filterModel);return e.parent.conditions.splice(t,1),t}moveItemToIndex(e,t,i){let r;let s=this.items[t],a=s.filterModel?.filterType==="join"&&"bottom"===i,o=a?s.filterModel:s.parent;!o||this.isChildOrSelf(o,e.filterModel)||s===e||(this.removeItemFromParent(e),a?r=0:-1===(r=o.conditions.indexOf(s.filterModel))?r=o.conditions.length:"bottom"===i&&(r+=1),o.conditions.splice(r,0,e.filterModel),this.refreshList(!1))}isChildOrSelf(e,t){return e===t||"join"===t.filterType&&t.conditions.some(t=>this.isChildOrSelf(e,t))}setupFilterModel(){let e=this.formatFilterModel(this.advancedFilterService.getModel());return this.stringifiedModel=JSON.stringify(e),e}formatFilterModel(e){return"join"!==(e=e??{filterType:"join",type:"AND",conditions:[]}).filterType&&(e={filterType:"join",type:"AND",conditions:[e]}),e}buildList(){let e=(t,i,r,s)=>{i.push({filterModel:t,level:r,parent:s,valid:!0,showMove:this.showMove}),"join"===t.filterType&&(t.conditions.forEach(s=>e(s,i,r+1,t)),0===r&&i.push({filterModel:null,level:r+1,parent:t,valid:!0}))};this.items=[],e(this.filterModel,this.items,0)}refreshList(e){if(!e){let e=[];this.items.forEach(t=>{t.valid||e.push(t.filterModel)}),this.buildList(),e.length&&this.items.forEach(t=>{t.filterModel&&e.includes(t.filterModel)&&(t.valid=!1)})}this.virtualList.refresh(e),this.validate()}updateItemComponent(e,t){let i=this.items.indexOf(e),r=(e,t)=>{let i=this.items.find(t=>t.filterModel===e),s=i?.parent;if(s){let{conditions:i}=s;r(s,t),t.push(i[i.length-1]===e)}},s=[],{filterModel:a}=e;a&&(r(a,s),s[0]=!1);let o=a?.filterType==="join"&&!!a.conditions.length;t.setState({disableMoveUp:1===i,disableMoveDown:!this.canMoveDown(e,i),treeLines:s,showStartTreeLine:o})}createItemComponent(e,t){let i=this.createBean(e.filterModel?new kH(e,this.dragFeature,t):new kG(e,t));return i.addManagedListeners(i,{advancedFilterBuilderRemoved:({item:e})=>this.removeItem(e),advancedFilterBuilderValueChanged:()=>this.validate(),advancedFilterBuilderAdded:({item:e,isJoin:t})=>this.addItem(e,t),advancedFilterBuilderMoved:({item:e,backwards:t})=>this.moveItemUpDown(e,t)}),i instanceof kH&&this.updateItemComponent(e,i),i}addItem(e,t){let{parent:i,level:r,filterModel:s}=e,a=s?.filterType==="join",o=t?{filterType:"join",type:"AND",conditions:[]}:{},n=a?s:i,l=a?0:n.conditions.indexOf(s);l>=0?(a||(l+=1),n.conditions.splice(l,0,o)):n.conditions.push(o);let h=this.items.indexOf(e),d=h>=0;if(d){e.filterModel&&h++;let i=[{filterModel:o,level:a?r+1:r,parent:n,valid:t,showMove:this.showMove}];this.items.splice(h,0,...i)}this.refreshList(d),d&&this.virtualList.getComponentAt(h)?.afterAdd()}removeItem(e){let t=e.parent,{filterModel:i}=e,r=t.conditions.indexOf(i);t.conditions.splice(r,1);let s=e.filterModel?.filterType==="join",a=this.items.indexOf(e),o=!s&&a>=0;o&&this.items.splice(a,1),this.refreshList(o),a>=0&&this.virtualList.focusRow(a)}moveItemUpDown(e,t){let i=this.items.indexOf(e),r=t?i-1:i+1;if(0===r||!t&&!this.canMoveDown(e,i))return;let s=this.items[r],a=this.removeItemFromParent(e),{level:o,filterModel:n,parent:l}=e,{level:h,filterModel:d,parent:c}=s;if(t){if(h===o&&"join"===d.filterType)d.conditions.push(n);else if(h<=o){let e=c.conditions.indexOf(d);c.conditions.splice(e,0,n)}else l.conditions[a-1].conditions.push(n)}else if(h===o){if("join"===d.filterType)d.conditions.splice(0,0,n);else{let e=c.conditions.indexOf(d);c.conditions.splice(e+1,0,n)}}else if(a<l.conditions.length)l.conditions.splice(a+1,0,n);else{let e=this.items.find(e=>e.filterModel===l),t=e.parent.conditions.indexOf(e.filterModel)+1;e.parent.conditions.splice(t,0,n)}this.refreshList(!1);let u=this.items.findIndex(({filterModel:e})=>e===n);if(u>=0){let e=this.virtualList.getComponentAt(u);e instanceof kH&&e.focusMoveButton(t)}}canMoveDown(e,t){return!(1===e.level&&t===this.items.length-2||1===e.level&&e.parent.conditions[e.parent.conditions.length-1]===e.filterModel)}close(){this.advancedFilterService.getCtrl().toggleFilterBuilder({source:"ui"})}validate(){let e=!this.items.every(({valid:e})=>e);e?this.validationMessage=this.advancedFilterExpressionService.translate("advancedFilterBuilderValidationIncomplete"):(e=JSON.stringify(this.filterModel)===this.stringifiedModel)?this.validationMessage=this.advancedFilterExpressionService.translate("advancedFilterBuilderValidationAlreadyApplied"):this.validationMessage=null,sb(this.eApplyFilterButton,e),this.validationTooltipFeature.refreshToolTip()}validateItems(){let e=e=>{e.type=void 0},t=e=>{delete e.filter};this.items.forEach(i=>{if(!i.valid||!i.filterModel||"join"===i.filterModel.filterType)return;let{filterModel:r}=i,{colId:s}=r,a=this.advancedFilterExpressionService.getColumnAutocompleteEntries().find(({key:e})=>e===s),o=this.advancedFilterExpressionService.getColumnDetails(r.colId);if(!a||!o.column){i.valid=!1,r.colId=void 0,e(r),t(r);return}let n=this.advancedFilterExpressionService.getDataTypeExpressionOperator(o.baseCellDataType).operators[r.type];if(!n){i.valid=!1,e(r),t(r);return}if(n.numOperands>0&&!tY(r.filter)){i.valid=!1;return}})}},kW=class extends i2{constructor(e){super(),this.enabled=e}wireBeans(e){this.ctrlsService=e.ctrlsService,this.popupService=e.popupService,this.advancedFilterExpressionService=e.advancedFilterExpressionService,this.environment=e.environment}postConstruct(){this.hasAdvancedFilterParent=!!this.gos.get("advancedFilterParent"),this.ctrlsService.whenReady(this,()=>this.setAdvancedFilterComp()),this.addManagedEventListeners({advancedFilterEnabledChanged:({enabled:e})=>this.onEnabledChanged(e)}),this.addManagedPropertyListener("advancedFilterParent",()=>this.updateComps()),this.addDestroyFunc(()=>{this.destroyAdvancedFilterComp(),this.destroyBean(this.eBuilderComp),this.eBuilderDialog&&this.eBuilderDialog.isAlive()&&this.destroyBean(this.eBuilderDialog)})}setupHeaderComp(e){this.eHeaderComp&&(this.eHeaderComp?.getGui().remove(),this.destroyBean(this.eHeaderComp)),this.eHeaderComp=this.createManagedBean(new kP(this.enabled&&!this.hasAdvancedFilterParent)),e.insertAdjacentElement("beforebegin",this.eHeaderComp.getGui())}focusHeaderComp(){return!!this.eHeaderComp&&(this.eHeaderComp.getFocusableElement().focus(),!0)}refreshComp(){this.eFilterComp?.refresh(),this.eHeaderComp?.refresh()}refreshBuilderComp(){this.eBuilderComp?.refresh()}getHeaderHeight(){return this.eHeaderComp?.getHeight()??0}setInputDisabled(e){this.eFilterComp?.setInputDisabled(e),this.eHeaderComp?.setInputDisabled(e)}toggleFilterBuilder(e){let{source:t,force:i,eventSource:r}=e;if(i&&this.eBuilderDialog||!1===i&&!this.eBuilderDialog)return;if(this.eBuilderDialog){this.builderDestroySource=t,this.destroyBean(this.eBuilderDialog);return}this.setInputDisabled(!0);let{width:s,height:a,minWidth:o}=this.getBuilderDialogSize();this.eBuilderComp=this.createBean(new kU),this.eBuilderDialog=this.createBean(new ks({title:this.advancedFilterExpressionService.translate("advancedFilterBuilderTitle"),component:this.eBuilderComp,width:s,height:a,resizable:!0,movable:!0,maximizable:!0,centered:!0,closable:!0,minWidth:o,afterGuiAttached:()=>this.eBuilderComp?.afterGuiAttached(),postProcessPopupParams:{type:"advancedFilterBuilder",eventSource:r}})),this.dispatchFilterBuilderVisibleChangedEvent(t,!0),this.eBuilderDialog.addEventListener("destroyed",()=>{this.destroyBean(this.eBuilderComp),this.eBuilderComp=void 0,this.eBuilderDialog=void 0,this.setInputDisabled(!1),this.dispatchLocalEvent({type:"advancedFilterBuilderClosed"}),this.dispatchFilterBuilderVisibleChangedEvent(this.builderDestroySource??"ui",!1),this.builderDestroySource=void 0})}dispatchFilterBuilderVisibleChangedEvent(e,t){this.eventService.dispatchEvent({type:"advancedFilterBuilderVisibleChanged",source:e,visible:t})}getBuilderDialogSize(){let e=this.gos.get("advancedFilterBuilderParams")?.minWidth??500,t=this.popupService.getPopupParent();return{width:Math.min(Math.max(600,e),Math.round(sI(t))-2),height:Math.min(600,Math.round(.75*sD(t))-2),minWidth:e}}onEnabledChanged(e){this.enabled=e,this.updateComps()}updateComps(){this.setAdvancedFilterComp(),this.setHeaderCompEnabled(),this.eventService.dispatchEvent({type:"headerHeightChanged"})}setAdvancedFilterComp(){if(this.destroyAdvancedFilterComp(),!this.enabled)return;let e=this.gos.get("advancedFilterParent");if(this.hasAdvancedFilterParent=!!e,e){let t=this.createBean(new kL),i=t.getGui();this.environment.applyThemeClasses(i),i.classList.add(this.gos.get("enableRtl")?"ag-rtl":"ag-ltr"),e.appendChild(i),this.eFilterComp=t}}setHeaderCompEnabled(){this.eHeaderComp?.setEnabled(this.enabled&&!this.hasAdvancedFilterParent)}destroyAdvancedFilterComp(){this.eFilterComp&&(sP(this.eFilterComp.getGui()),this.destroyBean(this.eFilterComp))}},k$=class{constructor(e){this.params=e,this.operators=[],this.operatorStartPositions=[],this.operatorEndPositions=[],this.activeOperator=0,this.validationError=null}parseExpression(e){this.operators.push(""),this.operatorStartPositions.push(e),this.operatorEndPositions.push(void 0);let{expression:t}=this.params;for(;e<t.length;){let i=t[e];if(" "===i){if(this.parseOperator(e-1))return this.activeOperator++,e-1;this.operators[this.activeOperator]+=i}else this.operators[this.activeOperator]+=i;e++}return this.parseOperator(e-1),e}isValid(){return!this.validationError&&(!this.operators.length||!!this.parsedOperator)}getValidationError(){return this.validationError}getFunction(){return"OR"===this.parsedOperator?"||":"&&"}getModel(){return"OR"===this.parsedOperator?"OR":"AND"}getAutocompleteListParams(e,t){let i;if(null==t)i="";else{let r=this.operators[t],s=this.operatorEndPositions[t];i=km(r,e,null==s?this.params.expression.length:s+1)}let r=this.params.advancedFilterExpressionService.getJoinOperatorAutocompleteEntries();return(t||null==t&&this.activeOperator)&&(r=r.filter(({key:e})=>e===this.parsedOperator)),this.params.advancedFilterExpressionService.generateAutocompleteListParams(r,"join",i)}updateExpression(e,t,i){let{expression:r}=this.params,s=t.displayValue??t.key;if(0===i)for(let e=this.operatorEndPositions.length-1;e>0;e--){let t=this.operatorEndPositions[e];null!=t&&(r=kf(r,this.operatorStartPositions[e],t,s).updatedValue)}let a=this.operatorStartPositions.length>i?this.operatorStartPositions[i]:e,o=(this.operatorEndPositions.length>i?this.operatorEndPositions[i]:void 0)??kv(r,e,!0).endPosition;return kf(r,a,o,s,!0)}getNumOperators(){return this.operators.length}getLastOperatorEndPosition(){return this.operatorEndPositions[this.operatorEndPositions.length-1]}parseOperator(e){let t=this.operators.length>this.activeOperator?this.operators[this.activeOperator]:"",i=this.params.advancedFilterExpressionService.getExpressionJoinOperators(),r=kx(t,i,e=>e);if(r){this.operatorEndPositions[this.activeOperator]=e;let s=i[r];if(this.activeOperator){if(r!==this.parsedOperator)return this.validationError||(this.validationError={message:this.params.advancedFilterExpressionService.translate("advancedFilterValidationJoinOperatorMismatch"),startPosition:e-t.length+1,endPosition:e}),!1}else this.parsedOperator=r;return t!==s&&(ky(this.params,t,s,e),this.operators[this.activeOperator]=s),!0}return null!==r&&(this.validationError||(this.validationError={message:this.params.advancedFilterExpressionService.translate("advancedFilterValidationInvalidJoinOperator"),startPosition:e-t.length+1,endPosition:e}),!0)}},kY=class e{constructor(e,t){this.params=e,this.startPosition=t,this.expectingExpression=!0,this.expectingOperator=!1,this.expressionParsers=[],this.operatorParser=new k$(this.params),this.missingEndBracket=!1,this.extraEndBracket=!1}parseExpression(){let t=this.startPosition,{expression:i}=this.params;for(;t<i.length;){let r=i[t];if("("!==r||this.expectingOperator){if(")"===r)return this.endPosition=t-1,0===this.startPosition&&(this.extraEndBracket=!0),t;if(" "===r);else if(this.expectingExpression){let e=new kS(this.params,t);t=e.parseExpression(),this.expressionParsers.push(e),this.expectingExpression=!1,this.expectingOperator=!0}else this.expectingOperator&&(t=this.operatorParser.parseExpression(t),this.expectingOperator=!1,this.expectingExpression=!0)}else{let i=new e(this.params,t+1);t=i.parseExpression(),this.expressionParsers.push(i),this.expectingExpression=!1,this.expectingOperator=!0}t++}return this.startPosition>0&&(this.missingEndBracket=!0),t}isValid(){return!this.missingEndBracket&&!this.extraEndBracket&&this.expressionParsers.length===this.operatorParser.getNumOperators()+1&&this.operatorParser.isValid()&&this.expressionParsers.every(e=>e.isValid())}getValidationError(){let e;let t=this.operatorParser.getValidationError();for(let e=0;e<this.expressionParsers.length;e++){let i=this.expressionParsers[e].getValidationError();if(i)return t&&t.startPosition<i.startPosition?t:i}return t||(this.extraEndBracket?{message:this.params.advancedFilterExpressionService.translate("advancedFilterValidationExtraEndBracket"),startPosition:this.endPosition+1,endPosition:this.endPosition+1}:(this.expressionParsers.length===this.operatorParser.getNumOperators()?e="advancedFilterValidationMissingCondition":this.missingEndBracket&&(e="advancedFilterValidationMissingEndBracket"),e)?{message:this.params.advancedFilterExpressionService.translate(e),startPosition:this.params.expression.length,endPosition:this.params.expression.length}:null)}getFunctionString(e){let t=this.expressionParsers.length>1,i=this.expressionParsers.map(t=>t.getFunctionString(e)).join(` ${this.operatorParser.getFunction()} `);return t?`(${i})`:i}getFunctionParsed(e){let t=this.operatorParser.getFunction(),i=this.expressionParsers.map(t=>t.getFunctionParsed(e)),r="&&"===t?"every":"some";return(e,t,s)=>i[r](i=>i(e,t,s))}getAutocompleteListParams(e){if(null!=this.endPosition&&e>this.endPosition+1)return;if(!this.expressionParsers.length)return this.getColumnAutocompleteListParams();let t=this.getExpressionParserIndex(e);if(null==t)return"("===this.params.expression[e]?{enabled:!1}:this.getColumnAutocompleteListParams();let i=this.expressionParsers[t].getAutocompleteListParams(e);if(!i){if(t<this.expressionParsers.length-1)return this.operatorParser.getAutocompleteListParams(e,t);if(this.expressionParsers.length===this.operatorParser.getNumOperators()){let t=this.operatorParser.getLastOperatorEndPosition();return null==t||e<=t+1?this.operatorParser.getAutocompleteListParams(e,this.operatorParser.getNumOperators()-1):this.getColumnAutocompleteListParams()}return")"===this.params.expression[e-1]?{enabled:!1}:this.operatorParser.getAutocompleteListParams(e)}return i}updateExpression(e,t,i){let r=this.params.expression,s=this.getExpressionParserIndex(e);if(null==s){let e="column"===i?this.params.advancedFilterExpressionService.getColumnValue(t):t.displayValue??t.key;return kf(r,this.startPosition,this.startPosition,e,!0)}let a=this.expressionParsers[s].updateExpression(e,t,i);return null==a?"column"===i?kf(r,e,r.length-1,this.params.advancedFilterExpressionService.getColumnValue(t),!0):null!=this.endPosition&&e>this.endPosition+1?null:this.operatorParser.updateExpression(e,t,s):a}getModel(){return this.expressionParsers.length>1?{filterType:"join",type:this.operatorParser.getModel(),conditions:this.expressionParsers.map(e=>e.getModel())}:this.expressionParsers[0].getModel()}getColumnAutocompleteListParams(){return this.params.advancedFilterExpressionService.generateAutocompleteListParams(this.params.advancedFilterExpressionService.getColumnAutocompleteEntries(),"column","")}getExpressionParserIndex(e){let t;for(let i=0;i<this.expressionParsers.length&&!(this.expressionParsers[i].startPosition>e);i++)t=i;return t}},kK=class{constructor(e){this.params=e,this.valid=!1}parseExpression(){this.joinExpressionParser=new kY(this.params,0);let e=this.joinExpressionParser.parseExpression();return this.valid=e>=this.params.expression.length-1&&this.joinExpressionParser.isValid(),this.params.expression}isValid(){return this.valid}getValidationMessage(){let e=this.joinExpressionParser.getValidationError();if(!e)return null;let{message:t,startPosition:i,endPosition:r}=e;return i<this.params.expression.length?this.params.advancedFilterExpressionService.translate("advancedFilterValidationMessage",[t,this.params.expression.slice(i,r+1).trim()]):this.params.advancedFilterExpressionService.translate("advancedFilterValidationMessageAtEnd",[t])}getFunctionString(){let e=this.createFunctionParams();return{functionString:`return ${this.joinExpressionParser.getFunctionString(e)};`,params:e}}getFunctionParsed(){let e=this.createFunctionParams();return{expressionFunction:this.joinExpressionParser.getFunctionParsed(e),params:e}}getAutocompleteListParams(e){return this.joinExpressionParser.getAutocompleteListParams(e)??{enabled:!1}}updateExpression(e,t,i){return this.joinExpressionParser.updateExpression(e,t,i)}getModel(){return this.isValid()?this.joinExpressionParser.getModel():null}createFunctionParams(){return{operands:[],operators:[],evaluatorParams:[]}}},kZ=class extends i2{constructor(){super(...arguments),this.beanName="advancedFilterService",this.appliedExpression=null,this.expression=null,this.isValid=!0}wireBeans(e){this.valueService=e.valueService,this.columnModel=e.columnModel,this.dataTypeService=e.dataTypeService,this.advancedFilterExpressionService=e.advancedFilterExpressionService}postConstruct(){this.setEnabled(this.gos.get("enableAdvancedFilter"),!0),this.ctrl=this.createManagedBean(new kW(this.enabled)),this.expressionProxy={getValue:(e,t)=>{let i=this.columnModel.getColDefCol(e);return i?this.valueService.getValue(i,t,!0):void 0}},this.addManagedPropertyListener("enableAdvancedFilter",e=>this.setEnabled(!!e.currentValue)),this.addManagedEventListeners({newColumnsLoaded:e=>this.onNewColumnsLoaded(e)}),this.addManagedPropertyListener("includeHiddenColumnsInAdvancedFilter",()=>this.updateValidity())}isEnabled(){return this.enabled}isFilterPresent(){return!!this.expressionFunction}doesFilterPass(e){return this.expressionFunction(this.expressionProxy,e,this.expressionParams)}getModel(){let e=this.createExpressionParser(this.appliedExpression);return e?.parseExpression(),e?.getModel()??null}setModel(e){let t=(e,i)=>{if("join"!==e.filterType)return this.advancedFilterExpressionService.parseColumnFilterModel(e);{let r=this.advancedFilterExpressionService.parseJoinOperator(e),s=e.conditions.map(e=>t(e)).filter(e=>tY(e)).join(` ${r} `);return i||e.conditions.length<=1?s:`(${s})`}},i=e?t(e,!0):null;this.setExpressionDisplayValue(i),this.applyExpression(),this.ctrl.refreshComp(),this.ctrl.refreshBuilderComp()}getExpressionDisplayValue(){return this.expression}setExpressionDisplayValue(e){this.expression=e}isCurrentExpressionApplied(){return this.appliedExpression===this.expression}createExpressionParser(e){return e?new kK({expression:e,columnModel:this.columnModel,dataTypeService:this.dataTypeService,valueService:this.valueService,advancedFilterExpressionService:this.advancedFilterExpressionService}):null}getDefaultExpression(e){let t=this.advancedFilterExpressionService.getColumnValue(e)+" ";return{updatedValue:t,updatedPosition:t.length}}isHeaderActive(){return!this.gos.get("advancedFilterParent")}getCtrl(){return this.ctrl}setEnabled(e,t){let i=this.enabled,r=t4(this.gos)||t6(this.gos);e&&!r&&tO("Advanced Filter is only supported with the Client-Side Row Model or Server-Side Row Model."),this.enabled=e&&r,t||this.enabled===i||this.eventService.dispatchEvent({type:"advancedFilterEnabledChanged",enabled:this.enabled})}applyExpression(){let e=this.createExpressionParser(this.expression);e?.parseExpression(),this.applyExpressionFromParser(e)}applyExpressionFromParser(e){if(this.isValid=!e||e.isValid(),!e||!this.isValid){this.expressionFunction=null,this.expressionParams=null,this.appliedExpression=null;return}let{expressionFunction:t,params:i}=this.getFunction(e);this.expressionFunction=t,this.expressionParams=i,this.appliedExpression=this.expression}getFunction(e){if(this.gos.get("suppressAdvancedFilterEval"))return e.getFunctionParsed();{let{functionString:t,params:i}=e.getFunctionString();return{expressionFunction:Function("expressionProxy","node","params",t),params:i}}}updateValidity(){this.advancedFilterExpressionService.resetColumnCaches();let e=this.createExpressionParser(this.expression);e?.parseExpression();let t=(!e||e.isValid())!==this.isValid;return this.applyExpressionFromParser(e),this.ctrl.refreshComp(),this.ctrl.refreshBuilderComp(),t}onNewColumnsLoaded(e){if("gridInitializing"!==e.source||!this.dataTypeService?.isPendingInference())return;this.ctrl.setInputDisabled(!0);let[t]=this.addManagedEventListeners({dataTypesInferred:()=>{t?.(),this.ctrl.setInputDisabled(!1)}})}},kq="32.2.0",kX={version:kq,moduleName:`${tL.AdvancedFilterModule}-core`,beans:[kZ,kk],dependantModules:[IX,na]},kQ={version:kq,moduleName:`${tL.AdvancedFilterModule}-api`,apiFunctions:{getAdvancedFilterModel:function(e){return e.filterManager?.getAdvancedFilterModel()??null},setAdvancedFilterModel:function(e,t){e.filterManager?.setAdvancedFilterModel(t)},showAdvancedFilterBuilder:function(e){e.filterManager?.toggleAdvancedFilterBuilder(!0,"api")},hideAdvancedFilterBuilder:function(e){e.filterManager?.toggleAdvancedFilterBuilder(!1,"api")}},dependantModules:[kX]},kJ={version:kq,moduleName:tL.AdvancedFilterModule,dependantModules:[kX,kQ]},k0={};function k1(e){e.rangeService?.removeAllCellRanges()}IV(k0,{GridChartsModule:()=>LS,agCharts:()=>Lx});var k2=class extends i2{constructor(){super(...arguments),this.beanName="rangeService",this.cellRanges=[],this.bodyScrollListener=this.onBodyScroll.bind(this),this.dragging=!1,this.intersectionRange=!1}wireBeans(e){this.rowModel=e.rowModel,this.dragService=e.dragService,this.columnModel=e.columnModel,this.visibleColsService=e.visibleColsService,this.cellNavigationService=e.cellNavigationService,this.pinnedRowModel=e.pinnedRowModel,this.rowPositionUtils=e.rowPositionUtils,this.cellPositionUtils=e.cellPositionUtils,this.ctrlsService=e.ctrlsService,this.valueService=e.valueService}postConstruct(){let e=this.onColumnsChanged.bind(this),t=()=>this.removeAllCellRanges(),i=this.refreshLastRangeStart.bind(this);this.addManagedEventListeners({newColumnsLoaded:e,columnVisible:e,columnValueChanged:e,columnPivotModeChanged:t,columnRowGroupChanged:t,columnPivotChanged:t,columnGroupOpened:i,columnMoved:i,columnPinned:i}),this.ctrlsService.whenReady(this,e=>{let t=e.gridBodyCtrl;this.autoScrollService=new aJ({scrollContainer:t.getBodyViewportElement(),scrollAxis:"xy",getVerticalPosition:()=>t.getScrollFeature().getVScrollPosition().top,setVerticalPosition:e=>t.getScrollFeature().setVerticalScrollPosition(e),getHorizontalPosition:()=>t.getScrollFeature().getHScrollPosition().left,setHorizontalPosition:e=>t.getScrollFeature().setHorizontalScrollPosition(e),shouldSkipVerticalScroll:()=>!t5(this.gos,"normal"),shouldSkipHorizontalScroll:()=>!t.getScrollFeature().isHorizontalScrollShowing()})})}onColumnsChanged(){this.refreshLastRangeStart();let e=this.visibleColsService.getAllCols();this.cellRanges.forEach(t=>{let i=t.columns;t.columns=t.columns.filter(t=>t.isVisible()&&-1!==e.indexOf(t)),iG(i,t.columns)||this.dispatchChangedEvent(!1,!0,t.id)});let t=this.cellRanges.length;this.cellRanges=this.cellRanges.filter(e=>e.columns.length>0),t>this.cellRanges.length&&this.dispatchChangedEvent(!1,!0)}refreshLastRangeStart(){let e=iB(this.cellRanges);e&&this.refreshRangeStart(e)}isContiguousRange(e){let t=e.columns;if(!t.length)return!1;let i=this.visibleColsService.getAllCols(),r=t.map(e=>i.indexOf(e)).sort((e,t)=>e-t);return iB(r)-r[0]+1===t.length}getRangeStartRow(e){return e.startRow&&e.endRow?this.rowPositionUtils.before(e.startRow,e.endRow)?e.startRow:e.endRow:{rowIndex:0,rowPinned:this.pinnedRowModel.getPinnedTopRowCount()>0?"top":null}}getRangeEndRow(e){if(e.startRow&&e.endRow)return this.rowPositionUtils.before(e.startRow,e.endRow)?e.endRow:e.startRow;let t=this.pinnedRowModel.getPinnedBottomRowCount();return t>0?{rowIndex:t-1,rowPinned:"bottom"}:{rowIndex:this.rowModel.getRowCount()-1,rowPinned:null}}setRangeToCell(e,t=!1){if(!iE(this.gos))return;let i=this.calculateColumnsBetween(e.column,e.column);if(!i)return;(iM(this.gos)||!t||tK(this.cellRanges))&&this.removeAllCellRanges(!0);let r={rowIndex:e.rowIndex,rowPinned:e.rowPinned},s={startRow:r,endRow:r,columns:i,startColumn:e.column};this.cellRanges.push(s),this.setNewestRangeStartCell(e),this.onDragStop(),this.dispatchChangedEvent(!0,!0)}extendLatestRangeToCell(e){if(this.isEmpty()||!this.newestRangeStartCell)return;let t=iB(this.cellRanges);this.updateRangeEnd(t,e)}updateRangeEnd(e,t,i=!1){let r=t.column,s=this.calculateColumnsBetween(e.startColumn,r);!(!s||this.isLastCellOfRange(e,t))&&(e.columns=s,e.endRow={rowIndex:t.rowIndex,rowPinned:t.rowPinned},i||this.dispatchChangedEvent(!0,!0,e.id))}refreshRangeStart(e){let{startColumn:t,columns:i}=e,r=(t,i)=>{let r=e.columns.filter(e=>e!==t);t?(e.startColumn=t,e.columns=i?[t,...r]:[...r,t]):e.columns=r},{left:s,right:a}=this.getRangeEdgeColumns(e);if(t===i[0]&&t!==s){r(s,!0);return}if(t===iB(i)&&t===a){r(a,!1);return}}getRangeEdgeColumns(e){let t=this.visibleColsService.getAllCols(),i=e.columns.map(e=>t.indexOf(e)).filter(e=>e>-1).sort((e,t)=>e-t);return{left:t[i[0]],right:t[iB(i)]}}extendLatestRangeInDirection(e){if(this.isEmpty()||!this.newestRangeStartCell)return;let t=e.key,i=e.ctrlKey||e.metaKey,r=iB(this.cellRanges),s=this.newestRangeStartCell,a=r.columns[0],o=iB(r.columns),n=r.endRow.rowIndex,l=r.endRow.rowPinned,h=s.column===a?o:a,d=this.cellNavigationService.getNextCellToFocus(t,{column:h,rowIndex:n,rowPinned:l},i);if(d)return this.setCellRange({rowStartIndex:s.rowIndex,rowStartPinned:s.rowPinned,rowEndIndex:d.rowIndex,rowEndPinned:d.rowPinned,columnStart:s.column,columnEnd:d.column}),d}setCellRange(e){iE(this.gos)&&(this.removeAllCellRanges(!0),this.addCellRange(e))}setCellRanges(e){iG(this.cellRanges,e)||(this.removeAllCellRanges(!0),e.forEach(e=>{e.columns&&e.startRow&&this.setNewestRangeStartCell({rowIndex:e.startRow.rowIndex,rowPinned:e.startRow.rowPinned,column:e.columns[0]}),this.cellRanges.push(e)}),this.dispatchChangedEvent(!1,!0))}setNewestRangeStartCell(e){this.newestRangeStartCell=e}clearCellRangeCellValues(e){let{cellRanges:t}=e,{cellEventSource:i="rangeService",dispatchWrapperEvents:r,wrapperEventSource:s="deleteKey"}=e;r&&(this.eventService.dispatchEvent({type:"cellSelectionDeleteStart",source:s}),this.eventService.dispatchEvent({type:"rangeDeleteStart",source:s})),t||(t=this.cellRanges),t.forEach(e=>{this.forEachRowInRange(e,t=>{let r=this.rowPositionUtils.getRowNode(t);if(r)for(let t=0;t<e.columns.length;t++){let s=this.columnModel.getCol(e.columns[t]);if(!s||!s.isCellEditable(r))continue;let a=this.valueService.getDeleteValue(s,r);r.setDataValue(s,a,i)}})}),r&&(this.eventService.dispatchEvent({type:"cellSelectionDeleteEnd",source:s}),this.eventService.dispatchEvent({type:"rangeDeleteEnd",source:s}))}createCellRangeFromCellRangeParams(e){return this.createPartialCellRangeFromRangeParams(e,!1)}createPartialCellRangeFromRangeParams(e,t){let i;let r=!1;if(e.columns)i=e.columns.map(e=>this.columnModel.getCol(e)).filter(e=>e);else{let t=this.columnModel.getCol(e.columnStart),s=this.columnModel.getCol(e.columnEnd);if(!t||!s)return;(i=this.calculateColumnsBetween(t,s))&&i.length&&(r=i[0]!==t)}if(i&&(t||0!==i.length))return{startRow:null!=e.rowStartIndex?{rowIndex:e.rowStartIndex,rowPinned:e.rowStartPinned||null}:void 0,endRow:null!=e.rowEndIndex?{rowIndex:e.rowEndIndex,rowPinned:e.rowEndPinned||null}:void 0,columns:i,startColumn:r?iB(i):i[0]}}addCellRange(e){let t=this.gos;if(!iE(t))return;if(ix(t)&&iM(t)&&this.cellRanges.length>0)return tO("cannot add multiple ranges when `selection.suppressMultiRanges = true`");let i=this.createCellRangeFromCellRangeParams(e);i&&(i.startRow&&this.setNewestRangeStartCell({rowIndex:i.startRow.rowIndex,rowPinned:i.startRow.rowPinned,column:i.startColumn}),this.cellRanges.push(i),this.dispatchChangedEvent(!1,!0,i.id))}getCellRanges(){return this.cellRanges}isEmpty(){return 0===this.cellRanges.length}isMoreThanOneCell(){let e=this.cellRanges.length;if(0===e)return!1;if(e>1)return!0;let t=this.cellRanges[0],i=this.getRangeStartRow(t),r=this.getRangeEndRow(t);return i.rowPinned!==r.rowPinned||i.rowIndex!==r.rowIndex||1!==t.columns.length}areAllRangesAbleToMerge(){let e;let t=new Map;if(this.cellRanges.length<=1)return!0;for(let i of(this.cellRanges.forEach(e=>{this.forEachRowInRange(e,i=>{let r=`${i.rowPinned||"normal"}_${i.rowIndex}`,s=t.get(r),a=e.columns.map(e=>e.getId());if(s){let e=a.filter(e=>-1===s.indexOf(e));s.push(...e)}else t.set(r,a)})}),t.values())){let t=i.sort().join();if(void 0===e){e=t;continue}if(e!==t)return!1}return!0}forEachRowInRange(e,t){let i=this.getRangeStartRow(e),r=this.getRangeEndRow(e),s=i;for(;s&&(t(s),!this.rowPositionUtils.sameRow(s,r));)s=this.cellNavigationService.getRowBelow(s)}removeAllCellRanges(e){!this.isEmpty()&&(this.onDragStop(),this.cellRanges.length=0,e||this.dispatchChangedEvent(!1,!0))}onBodyScroll(){this.dragging&&this.lastMouseEvent&&this.onDragging(this.lastMouseEvent)}isCellInAnyRange(e){return this.getCellRangeCount(e)>0}isCellInSpecificRange(e,t){let i=null!==t.columns&&iU(t.columns,e.column),r=this.isRowInRange(e.rowIndex,e.rowPinned,t);return i&&r}isLastCellOfRange(e,t){let{startRow:i,endRow:r}=e,s=this.rowPositionUtils.before(i,r)?r:i,a=t.rowIndex===s.rowIndex&&t.rowPinned===s.rowPinned,o=e.columns[0],n=iB(e.columns),l=e.startColumn===o?n:o;return t.column===l&&a}isBottomRightCell(e,t){let i=this.visibleColsService.getAllCols(),r=e.columns.map(e=>i.indexOf(e)).sort((e,t)=>e-t),{startRow:s,endRow:a}=e,o=this.rowPositionUtils.before(s,a)?a:s,n=i.indexOf(t.column)===iB(r),l=t.rowIndex===o.rowIndex&&t$(t.rowPinned)===t$(o.rowPinned);return n&&l}getCellRangeCount(e){return this.isEmpty()?0:this.cellRanges.filter(t=>this.isCellInSpecificRange(e,t)).length}isRowInRange(e,t,i){let r=this.getRangeStartRow(i),s=this.getRangeEndRow(i),a={rowIndex:e,rowPinned:t||null},o=a.rowIndex===r.rowIndex&&a.rowPinned==r.rowPinned,n=a.rowIndex===s.rowIndex&&a.rowPinned==s.rowPinned;if(o||n)return!0;let l=!this.rowPositionUtils.before(a,r),h=this.rowPositionUtils.before(a,s);return l&&h}getDraggingRange(){return this.draggingRange}onDragStart(e){if(!iE(this.gos))return;let{ctrlKey:t,metaKey:i,shiftKey:r}=e,s=!iM(this.gos)&&(t||i),a=r&&iO(this.cellRanges);!s&&(!a||tY(iB(this.cellRanges).type))&&this.removeAllCellRanges(!0);let o=this.dragService.getStartTarget();if(o&&this.updateValuesOnMove(o),this.lastCellHovered){if(this.dragging=!0,this.lastMouseEvent=e,this.intersectionRange=s&&this.getCellRangeCount(this.lastCellHovered)>1,a||this.setNewestRangeStartCell(this.lastCellHovered),this.cellRanges.length>0)this.draggingRange=iB(this.cellRanges);else{let e={rowIndex:this.lastCellHovered.rowIndex,rowPinned:this.lastCellHovered.rowPinned};this.draggingRange={startRow:e,endRow:e,columns:[this.lastCellHovered.column],startColumn:this.newestRangeStartCell.column},this.cellRanges.push(this.draggingRange)}this.ctrlsService.getGridBodyCtrl().addScrollEventListener(this.bodyScrollListener),this.dispatchChangedEvent(!0,!1,this.draggingRange.id)}}intersectLastRange(e){if(e&&this.dragging||iM(this.gos)||this.isEmpty())return;let t=this.rowPositionUtils,i=iB(this.cellRanges),r=this.getRangeStartRow(i),s=this.getRangeEndRow(i),a=[];this.cellRanges.slice(0,-1).forEach(e=>{let o=this.getRangeStartRow(e),n=this.getRangeEndRow(e),l=e.columns,h=l.filter(e=>-1===i.columns.indexOf(e));if(h.length===l.length||t.before(s,o)||t.before(n,r)){a.push(e);return}let d=a.length;if(t.before(o,r)){let e={columns:[...l],startColumn:i.startColumn,startRow:{...o},endRow:this.cellNavigationService.getRowAbove(r)};a.push(e)}if(h.length>0){let e={columns:h,startColumn:iU(h,i.startColumn)?i.startColumn:h[0],startRow:this.rowMax([{...r},{...o}]),endRow:this.rowMin([{...s},{...n}])};a.push(e)}t.before(s,n)&&a.push({columns:[...l],startColumn:i.startColumn,startRow:this.cellNavigationService.getRowBelow(s),endRow:{...n}}),a.length-d==1&&(a[a.length-1].id=e.id)}),this.cellRanges=a,e&&this.dispatchChangedEvent(!1,!0)}rowMax(e){let t;return e.forEach(e=>{(void 0===t||this.rowPositionUtils.before(t,e))&&(t=e)}),t}rowMin(e){let t;return e.forEach(e=>{(void 0===t||this.rowPositionUtils.before(e,t))&&(t=e)}),t}updateValuesOnMove(e){let t=i0(this.gos,e,n7.DOM_DATA_KEY_CELL_CTRL),i=t?.getCellPosition();if(this.cellHasChanged=!1,!(!i||this.lastCellHovered&&this.cellPositionUtils.equals(i,this.lastCellHovered))){if(t?.isEditing()){this.dragService.cancelDrag(e);return}this.lastCellHovered&&(this.cellHasChanged=!0),this.lastCellHovered=i}}onDragging(e){let t;if(!this.dragging||!e)return;this.updateValuesOnMove(e.target),this.lastMouseEvent=e;let i=this.lastCellHovered,r=i&&"top"===i.rowPinned&&"top"===this.newestRangeStartCell.rowPinned||(t="bottom",i&&i.rowPinned===t&&this.newestRangeStartCell.rowPinned===t);if(this.autoScrollService.check(e,r),!this.cellHasChanged)return;let s=this.calculateColumnsBetween(this.newestRangeStartCell.column,i.column);s&&(this.draggingRange.endRow={rowIndex:i.rowIndex,rowPinned:i.rowPinned},this.draggingRange.columns=s,this.dispatchChangedEvent(!1,!1,this.draggingRange.id))}onDragStop(){if(!this.dragging)return;let{id:e}=this.draggingRange;this.autoScrollService.ensureCleared(),this.ctrlsService.getGridBodyCtrl().removeScrollEventListener(this.bodyScrollListener),this.lastMouseEvent=null,this.dragging=!1,this.draggingRange=void 0,this.lastCellHovered=void 0,this.intersectionRange&&(this.intersectionRange=!1,this.intersectLastRange()),this.dispatchChangedEvent(!1,!0,e)}dispatchChangedEvent(e,t,i){this.eventService.dispatchEvent({type:"cellSelectionChanged",started:e,finished:t,id:i}),this.eventService.dispatchEvent({type:"rangeSelectionChanged",started:e,finished:t,id:i})}calculateColumnsBetween(e,t){let i=this.visibleColsService.getAllCols(),r=e===t,s=i.indexOf(e),a=e=>tO(`column ${e.getId()} is not visible`);if(s<0){a(e);return}let o=r?s:i.indexOf(t);if(o<0){a(t);return}if(r)return[e];let n=Math.min(s,o),l=n===s?o:s,h=[];for(let e=n;e<=l;e++)h.push(i[e]);return h}},k3=class extends sQ{constructor(){super(...arguments),this.changedCalculatedValues=!1,this.dragging=!1,this.shouldDestroyOnEndDragging=!1}wireBeans(e){this.dragService=e.dragService,this.rangeService=e.rangeService,this.mouseEventService=e.mouseEventService,this.rowPositionUtils=e.rowPositionUtils,this.cellPositionUtils=e.cellPositionUtils,this.ctrlsService=e.ctrlsService}postConstruct(){this.dragService.addDragSource({dragStartPixels:0,eElement:this.getGui(),onDragStart:this.onDragStart.bind(this),onDragging:e=>{this.dragging=!0,this.rangeService.autoScrollService.check(e),this.changedCalculatedValues&&(this.onDrag(e),this.changedCalculatedValues=!1)},onDragStop:e=>{this.dragging=!1,this.onDragEnd(e),this.clearDragProperties(),this.shouldDestroyOnEndDragging&&this.destroy()},onDragCancel:()=>{this.dragging=!1,this.onDragCancel(),this.clearDragProperties()}}),this.addManagedElementListeners(this.getGui(),{mousedown:this.preventRangeExtension.bind(this)})}isDragging(){return this.dragging}getCellCtrl(){return this.cellCtrl}setCellCtrl(e){this.cellCtrl=e}getCellRange(){return this.cellRange}setCellRange(e){this.cellRange=e}getRangeStartRow(){return this.rangeStartRow}setRangeStartRow(e){this.rangeStartRow=e}getRangeEndRow(){return this.rangeEndRow}setRangeEndRow(e){this.rangeEndRow=e}getLastCellHovered(){return this.lastCellHovered}preventRangeExtension(e){e.stopPropagation()}onDragStart(e){[this.cellHoverListener]=this.addManagedElementListeners(this.ctrlsService.get("gridCtrl").getGui(),{mousemove:this.updateValuesOnMove.bind(this)}),document.body.classList.add(this.getDraggingCssClass())}getDraggingCssClass(){return`ag-dragging-${this.type===n3.FILL?"fill":"range"}-handle`}updateValuesOnMove(e){let t=this.mouseEventService.getCellPositionForEvent(e);!t||this.lastCellHovered&&this.cellPositionUtils.equals(t,this.lastCellHovered)||(this.lastCellHovered=t,this.changedCalculatedValues=!0)}clearDragProperties(){this.clearValues(),this.rangeService.autoScrollService.ensureCleared(),document.body.classList.remove(this.getDraggingCssClass())}getType(){return this.type}refresh(e){let t=this.getCellCtrl(),i=this.getGui(),r=iB(this.rangeService.getCellRanges()),s=r.startRow,a=r.endRow;if(s&&a&&(this.rowPositionUtils.before(a,s)?(this.setRangeStartRow(a),this.setRangeEndRow(s)):(this.setRangeStartRow(s),this.setRangeEndRow(a))),t!==e||!sN(i)){this.setCellCtrl(e);let t=e.getComp().getParentOfValue();t&&t.appendChild(i)}this.setCellRange(r)}clearValues(){this.lastCellHovered=void 0,this.removeListeners()}removeListeners(){this.cellHoverListener&&(this.cellHoverListener(),this.cellHoverListener=void 0)}destroy(){if(!this.shouldDestroyOnEndDragging&&this.isDragging()){sC(this.getGui(),!1),this.shouldDestroyOnEndDragging=!0;return}this.shouldDestroyOnEndDragging=!1,super.destroy(),this.removeListeners();let e=this.getGui();e.parentElement&&e.parentElement.removeChild(e)}},k4=class extends k3{constructor(){super('<div class="ag-fill-handle"></div>'),this.markedCells=[],this.cellValues=[],this.isUp=!1,this.isLeft=!1,this.isReduce=!1,this.type=n3.FILL}wireBeans(e){super.wireBeans(e),this.valueService=e.valueService,this.navigationService=e.navigationService,this.cellNavigationService=e.cellNavigationService,this.visibleColsService=e.visibleColsService}updateValuesOnMove(e){let t;super.updateValuesOnMove(e),this.initialXY||(this.initialXY=this.mouseEventService.getNormalisedPosition(e));let{x:i,y:r}=this.initialXY,{x:s,y:a}=this.mouseEventService.getNormalisedPosition(e),o=Math.abs(i-s),n=Math.abs(r-a),l=this.getFillHandleDirection();(t="xy"===l?o>n?"x":"y":l)!==this.dragAxis&&(this.dragAxis=t,this.changedCalculatedValues=!0)}onDrag(e){if(!this.initialPosition){let e=this.getCellCtrl();if(!e)return;this.initialPosition=e.getCellPosition()}let t=this.getLastCellHovered();t&&this.markPathFrom(this.initialPosition,t)}onDragEnd(e){let t;if(this.initialXY=null,!this.markedCells.length)return;let i="x"===this.dragAxis,r=this.getCellRange(),s=r.columns.length,a=this.getRangeStartRow(),o=this.getRangeEndRow();if(this.isUp||this.isLeft){let e=i?a:this.lastCellMarked;t=this.rangeService.createCellRangeFromCellRangeParams({rowStartIndex:e.rowIndex,rowStartPinned:e.rowPinned,columnStart:i?this.lastCellMarked.column:r.columns[0],rowEndIndex:o.rowIndex,rowEndPinned:o.rowPinned,columnEnd:r.columns[s-1]})}else t=this.rangeService.createCellRangeFromCellRangeParams({rowStartIndex:a.rowIndex,rowStartPinned:a.rowPinned,columnStart:r.columns[0],rowEndIndex:i?o.rowIndex:this.lastCellMarked.rowIndex,rowEndPinned:i?o.rowPinned:this.lastCellMarked.rowPinned,columnEnd:i?this.lastCellMarked.column:r.columns[s-1]});t&&(this.eventService.dispatchEvent({type:"fillStart"}),this.handleValueChanged(r,t,e),this.rangeService.setCellRanges([t]),this.eventService.dispatchEvent({type:"fillEnd",initialRange:r,finalRange:t}))}onDragCancel(){this.initialXY=null,this.markedCells.length&&this.clearMarkedPath()}getFillHandleDirection(){let e=iI(this.gos)?.direction;return e?"x"!==e&&"y"!==e&&"xy"!==e?(tO("valid values for fillHandleDirection are 'x', 'y' and 'xy'. Default to 'xy'."),"xy"):e:"xy"}handleValueChanged(e,t,i){let r=this.rangeService.getRangeEndRow(e),s=this.rangeService.getRangeStartRow(e),a=this.rangeService.getRangeEndRow(t),o=this.rangeService.getRangeStartRow(t),n="y"===this.dragAxis;if(this.isReduce&&!iI(this.gos)?.suppressClearOnFillReduction){let i=n?e.columns:e.columns.filter(e=>0>t.columns.indexOf(e)),s=n?this.cellNavigationService.getRowBelow(a):o;s&&this.clearCellsInRange(s,r,i);return}let l=[],h=[],d=[],c=[],u=!0,p=0,g=()=>{l.length=0,h.length=0,d.length=0,c.length=0,p=0},m=(t,i)=>{let h=this.isUp?r:s,d=!1;for(n&&(u=!0,g());!d&&h;){let c=this.rowPositionUtils.getRowNode(h);if(!c)break;n&&t?f(l,t,c,()=>!this.rowPositionUtils.sameRow(h,this.isUp?s:r)):i&&(u=!0,g(),i.forEach(t=>f(l,t,c,()=>t!==(this.isLeft?e.columns[0]:iB(e.columns))))),d=this.rowPositionUtils.sameRow(h,this.isUp?o:a),h=this.isUp?this.cellNavigationService.getRowAbove(h):this.cellNavigationService.getRowBelow(h)}},f=(e,t,r,s)=>{let a;let o=!1;if(u)a=this.valueService.getValue(t,r),h.push(a),d.push(this.valueService.getValue(t,r,void 0,!0)),c.push(this.valueService.formatValue(t,r,a)),u=s();else{let{value:s,fromUserFunction:n,sourceCol:l,sourceRowNode:u}=this.processValues({event:i,values:e,initialValues:h,initialNonAggregatedValues:d,initialFormattedValues:c,col:t,rowNode:r,idx:p++});if(a=s,t.isCellEditable(r)){let e=this.valueService.getValue(t,r);n||(l&&l.getColDef()?.useValueFormatterForExport!==!1&&(a=this.valueService.formatValue(l,u,a)??a),!1!==t.getColDef().useValueParserForImport&&(a=this.valueService.parseValue(t,r,l?a:tq(a),e))),n&&e===a?o=!0:r.setDataValue(t,a,"rangeService")}}o||e.push({value:a,column:t,rowNode:r})};n?e.columns.forEach(e=>{m(e)}):m(void 0,this.isLeft?[...t.columns].reverse():t.columns)}clearCellsInRange(e,t,i){let r={startRow:e,endRow:t,columns:i,startColumn:i[0]};this.rangeService.clearCellRangeCellValues({cellRanges:[r]})}processValues(e){let t;let{event:i,values:r,initialValues:s,initialNonAggregatedValues:a,initialFormattedValues:o,col:n,rowNode:l,idx:h}=e,d=iI(this.gos)?.setFillValue;if(t="y"===this.dragAxis?this.isUp?"up":"down":this.isLeft?"left":"right",d){let e=d(this.gos.addGridCommonParams({event:i,values:r.map(({value:e})=>e),initialValues:s,initialNonAggregatedValues:a,initialFormattedValues:o,currentIndex:h,currentCellValue:this.valueService.getValue(n,l),direction:t,column:n,rowNode:l}));if(!1!==e)return{value:e,fromUserFunction:!0}}let c=!r.some(({value:e})=>{let t=parseFloat(e);return isNaN(t)||t.toString()!==e.toString()});if(i.altKey||!c){if(c&&1===s.length){let e=this.isUp||this.isLeft?-1:1;return{value:parseFloat(iB(r).value)+1*e,fromUserFunction:!1}}let{value:e,column:t,rowNode:i}=r[h%r.length];return{value:e,fromUserFunction:!1,sourceCol:t,sourceRowNode:i}}return{value:iB(function(e){let t=e.length,i=0;if(t<=1)return e;for(let t=0;t<e.length;t++){let r=e[t],s=r.toString().split("e-");if(s.length>1){i=Math.max(i,parseInt(s[1],10));continue}Math.floor(r)!==r&&(i=Math.max(i,r.toString().split(".")[1].length))}let r=0,s=0,a=0,o=0,n=0;for(let i=0;i<t;i++)n=e[i],r+=i,s+=n,o+=i*i,a+=i*n;let l=(t*a-r*s)/(t*o-r*r),h=s/t-l*r/t,d=[];for(let e=0;e<=t;e++)d.push(parseFloat((e*l+h).toFixed(i)));return d}(r.map(({value:e})=>Number(e)))),fromUserFunction:!1}}clearValues(){this.clearMarkedPath(),this.clearCellValues(),this.lastCellMarked=void 0,super.clearValues()}clearMarkedPath(){this.markedCells.forEach(e=>{if(!e.isAlive())return;let t=e.getComp();t.addOrRemoveCssClass("ag-selection-fill-top",!1),t.addOrRemoveCssClass("ag-selection-fill-right",!1),t.addOrRemoveCssClass("ag-selection-fill-bottom",!1),t.addOrRemoveCssClass("ag-selection-fill-left",!1)}),this.markedCells.length=0,this.isUp=!1,this.isLeft=!1,this.isReduce=!1}clearCellValues(){this.cellValues.length=0}markPathFrom(e,t){if(this.clearMarkedPath(),this.clearCellValues(),"y"===this.dragAxis){if(this.rowPositionUtils.sameRow(t,e))return;let i=this.rowPositionUtils.before(t,e),r=this.getRangeStartRow(),s=this.getRangeEndRow();i&&(t.rowPinned==r.rowPinned&&t.rowIndex>=r.rowIndex||r.rowPinned!=s.rowPinned&&t.rowPinned==s.rowPinned&&t.rowIndex<=s.rowIndex)?(this.reduceVertical(e,t),this.isReduce=!0):(this.extendVertical(e,t,i),this.isReduce=!1)}else{let i=e.column,r=t.column;if(i===r)return;let s=this.visibleColsService.getAllCols(),a=s.indexOf(i),o=s.indexOf(r);o<=a&&o>=s.indexOf(this.getCellRange().columns[0])?(this.reduceHorizontal(e,t),this.isReduce=!0):(this.extendHorizontal(e,t,o<a),this.isReduce=!1)}this.lastCellMarked=t}extendVertical(e,t,i){let{navigationService:r,rangeService:s}=this,a=e;do{let o=this.getCellRange(),n=o.columns.length;for(let l=0;l<n;l++){let h=o.columns[l],d={rowIndex:a.rowIndex,rowPinned:a.rowPinned,column:h},c=s.isCellInSpecificRange(d,o),u=this.rowPositionUtils.sameRow(a,e);if(i&&(this.isUp=!0),!u){let e=r.getCellByPosition(d);if(e){this.markedCells.push(e);let r=e.getComp();c||(r.addOrRemoveCssClass("ag-selection-fill-left",0===l),r.addOrRemoveCssClass("ag-selection-fill-right",l===n-1)),r.addOrRemoveCssClass(i?"ag-selection-fill-top":"ag-selection-fill-bottom",this.rowPositionUtils.sameRow(a,t))}}}if(this.rowPositionUtils.sameRow(a,t))break}while(a=i?this.cellNavigationService.getRowAbove(a):this.cellNavigationService.getRowBelow(a))}reduceVertical(e,t){let i=e;do{let e=this.getCellRange(),r=e.columns.length,s=this.rowPositionUtils.sameRow(i,t);for(let s=0;s<r;s++){let r={rowIndex:i.rowIndex,rowPinned:i.rowPinned,column:e.columns[s]},a=this.navigationService.getCellByPosition(r);a&&(this.markedCells.push(a),a.getComp().addOrRemoveCssClass("ag-selection-fill-bottom",this.rowPositionUtils.sameRow(i,t)))}if(s)break}while(i=this.cellNavigationService.getRowAbove(i))}extendHorizontal(e,t,i){let r=this.visibleColsService.getAllCols(),s=r.indexOf(i?t.column:e.column),a=r.indexOf(i?this.getCellRange().columns[0]:t.column),o=i?0:1,n=r.slice(s+o,a+o),l=this.getRangeStartRow(),h=this.getRangeEndRow();n.forEach(e=>{let t=l,r=!1;do{r=this.rowPositionUtils.sameRow(t,h);let s=this.navigationService.getCellByPosition({rowIndex:t.rowIndex,rowPinned:t.rowPinned,column:e});if(s){this.markedCells.push(s);let r=s.getComp();r.addOrRemoveCssClass("ag-selection-fill-top",this.rowPositionUtils.sameRow(t,l)),r.addOrRemoveCssClass("ag-selection-fill-bottom",this.rowPositionUtils.sameRow(t,h)),i?(this.isLeft=!0,r.addOrRemoveCssClass("ag-selection-fill-left",e===n[0])):r.addOrRemoveCssClass("ag-selection-fill-right",e===iB(n))}t=this.cellNavigationService.getRowBelow(t)}while(!r)})}reduceHorizontal(e,t){let i=this.visibleColsService.getAllCols(),r=i.indexOf(t.column),s=i.indexOf(e.column),a=i.slice(r,s),o=this.getRangeStartRow(),n=this.getRangeEndRow();a.forEach(e=>{let t=o,i=!1;do{i=this.rowPositionUtils.sameRow(t,n);let r=this.navigationService.getCellByPosition({rowIndex:t.rowIndex,rowPinned:t.rowPinned,column:e});r&&(this.markedCells.push(r),r.getComp().addOrRemoveCssClass("ag-selection-fill-right",e===a[0])),t=this.cellNavigationService.getRowBelow(t)}while(!i)})}refresh(e){let t=this.rangeService.getCellRanges()[0];if(!t.startRow||!t.endRow){this.destroy();return}super.refresh(e)}},k6=class extends k3{constructor(){super('<div class="ag-range-handle"></div>'),this.type=n3.RANGE,this.rangeFixed=!1}onDrag(e){let t=this.getLastCellHovered();if(!t)return;let i=this.rangeService.getCellRanges(),r=iB(i);this.rangeFixed||(this.fixRangeStartEnd(r),this.rangeFixed=!0),this.endPosition={rowIndex:t.rowIndex,rowPinned:t.rowPinned,column:t.column},2!==i.length||i[0].type!==n4.DIMENSION||r.type!==n4.VALUE||this.rowPositionUtils.sameRow(this.endPosition,this.rangeService.getRangeEndRow(r))||this.rangeService.updateRangeEnd(i[0],{...this.endPosition,column:i[0].columns[0]},!0),this.rangeService.extendLatestRangeToCell(this.endPosition)}onDragEnd(e){let t=iB(this.rangeService.getCellRanges());this.fixRangeStartEnd(t),this.rangeFixed=!1}onDragCancel(){this.rangeFixed=!1}fixRangeStartEnd(e){let t=this.rangeService.getRangeStartRow(e),i=this.rangeService.getRangeEndRow(e),r=e.columns[0];e.startRow=t,e.endRow=i,e.startColumn=r}},k5=class extends i2{constructor(){super(...arguments),this.beanName="selectionHandleFactory"}createSelectionHandle(e){return this.createBean(e===n3.RANGE?new k6:new k4)}},k8="32.2.0",k7={version:k8,moduleName:`${tL.RangeSelectionModule}-core`,beans:[k2,k5],dependantModules:[IX]},k9={version:k8,moduleName:`${tL.RangeSelectionModule}-api`,apiFunctions:{getCellRanges:function(e){return e.rangeService?.getCellRanges()??null},addCellRange:function(e,t){e.rangeService?.addCellRange(t)},clearRangeSelection:k1,clearCellSelection:k1},dependantModules:[k7]},Te={version:k8,moduleName:tL.RangeSelectionModule,dependantModules:[k7,k9]};IH(k0,eh);var Tt={area:{isCartesian:!0,canInvert:!0},bar:{isCartesian:!0,canInvert:!0},histogram:{isCartesian:!0},line:{isCartesian:!0,canInvert:!0},pie:{isPie:!0},donut:{isPie:!0,canInvert:!0},scatter:{isCartesian:!0},bubble:{isCartesian:!0},"radial-column":{isPolar:!0,isEnterprise:!0,isRadial:!0,canInvert:!0},"radial-bar":{isPolar:!0,isEnterprise:!0,isRadial:!0,canInvert:!0},"radar-line":{isPolar:!0,isEnterprise:!0,canInvert:!0},"radar-area":{isPolar:!0,isEnterprise:!0,canInvert:!0},nightingale:{isPolar:!0,isEnterprise:!0,canInvert:!0},"range-bar":{isCartesian:!0,isEnterprise:!0,canSwitchDirection:!0},"range-area":{isCartesian:!0,isEnterprise:!0},"box-plot":{isCartesian:!0,isEnterprise:!0,canSwitchDirection:!0},treemap:{isEnterprise:!0,isHierarchical:!0},sunburst:{isEnterprise:!0,isHierarchical:!0},heatmap:{isCartesian:!0,isEnterprise:!0},waterfall:{isCartesian:!0,isEnterprise:!0,canSwitchDirection:!0}};function Ti(e){return dZ.COMBO_CHART_TYPES.includes(e)}function Tr(e,t){return!!Tt[e]?.[t]}var Ts=new Set(["stackedColumn","normalizedColumn","stackedBar","normalizedBar"]);function Ta(e){return Tr(e,"isCartesian")}function To(e){return Tr(e,"isPolar")}function Tn(e){return Tr(e,"isHierarchical")}function Tl(e){return"doughnut"===e?"donut":e}function Th(e){return dZ.CHART_TYPE_TO_SERIES_TYPE[e]}function Td(e){return Th(e)??"line"}function Tc(e){return Tr(e,"isPie")}function Tu(e){return Tn(Td(e))?void 0:1}function Tp(e){return Tn(Td(e))?2:"pie"===e||"waterfall"===e||"histogram"===e?1:void 0}function Tg(e){return!Ti(e)&&Tr(Td(e),"canInvert")}function Tm(e){switch(e){case"groupedColumn":case"stackedColumn":case"normalizedColumn":case"groupedBar":case"stackedBar":case"normalizedBar":case"stackedArea":case"normalizedArea":return`${e}Full`;case"doughnut":return"donut";case"areaColumnCombo":return"AreaColumnCombo";default:return e}}var Tf=class extends i2{constructor(e,t,i,r){super(),this.chartController=e,this.eGui=t,this.cssClass=i,this.createPanels=r,this.panels=[]}postConstruct(){this.addManagedListeners(this.chartController,{chartUpdated:()=>this.refreshPanels(!0),chartApiUpdate:()=>this.refreshPanels(!1)})}addComponent(e){this.createBean(e),this.panels.push(e),e.addCssClass(this.cssClass),this.eGui.appendChild(e.getGui())}refreshPanels(e){let t=this.chartController.getChartType(),i=this.chartController.isGrouping(),r=Td(t);e&&t===this.chartType&&i===this.isGrouping||(this.destroyPanels(),this.createPanels(t,r),this.chartType=t,this.isGrouping=i)}destroyPanels(){this.panels.forEach(e=>{sP(e.getGui()),this.destroyBean(e)}),this.panels=[]}destroy(){this.destroyPanels(),super.destroy()}},Tv=class extends sQ{constructor(e){super(),this.chartMenuParamsFactory=e}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){let e=this.chartMenuParamsFactory.addEnableParams("animation.enabled",{cssIdentifier:"charts-advanced-settings-top-level",direction:"vertical",suppressOpenCloseIcons:!0,title:this.chartTranslationService.translate("animation"),suppressEnabledCheckbox:!0,useToggle:!0}),t=this.chartMenuParamsFactory.getDefaultNumberInputParams("animation.duration","durationMillis",{min:0});this.setTemplate(`<div>
            <ag-group-component data-ref="animationGroup">
                <ag-input-number-field data-ref="animationHeightInput"></ag-input>
            </ag-group-component>
        </div>`,[I1,ox],{animationGroup:e,animationHeightInput:t})}},Ty={selector:"AG-COLOR-INPUT",component:class extends ow{constructor(){super({template:`
            <div role="presentation" class="ag-color-input">
                <div data-ref="eLabel" class="ag-input-field-label"></div>
                <div data-ref="eWrapper" class="ag-wrapper ag-input-wrapper" role="presentation">
                    <input data-ref="eInput" class="ag-input-field-input">
                    <div data-ref="eColor" class="ag-color-input-color"></div>
                </div>
            </div>`}),this.eColor=null}wireBeans(e){this.chartTranslationService=e.chartTranslationService}setColor(e){let t=e.toRgbaString();this.setValue(If.Color.fromString(t).toHexString().toUpperCase(),!0),this.eColor.style.backgroundColor=t}setValue(e,t){let i=If.Color.validColorString(e??"");return this.eInput.setCustomValidity(i?"":this.chartTranslationService.translate("invalidColor")),super.setValue(e,t),i&&!t&&this.dispatchLocalEvent({type:"colorChanged"}),this}onColorChanged(e){this.addManagedListeners(this,{colorChanged:()=>e(If.Color.fromString(this.value))})}}},TC=class e extends sQ{constructor(e){super(`<div class="ag-color-panel" tabindex="-1">
            <div data-ref="spectrumColor" class="ag-spectrum-color">
                <div class="ag-spectrum-sat ag-spectrum-fill">
                    <div data-ref="spectrumVal" class="ag-spectrum-val ag-spectrum-fill">
                        <div data-ref="spectrumDragger" class="ag-spectrum-dragger"></div>
                    </div>
                </div>
            </div>
            <div class="ag-spectrum-tools">
                <div data-ref="spectrumHue" class="ag-spectrum-hue ag-spectrum-tool">
                    <div class="ag-spectrum-hue-background"></div>
                    <div data-ref="spectrumHueSlider" class="ag-spectrum-slider"></div>
                </div>
                <div data-ref="spectrumAlpha" class="ag-spectrum-alpha ag-spectrum-tool">
                    <div class="ag-spectrum-alpha-background"></div>
                    <div data-ref="spectrumAlphaSlider" class="ag-spectrum-slider"></div>
                </div>
                <ag-color-input data-ref="colorInput"></ag-color-input>
                <div data-ref="recentColors" class="ag-recent-colors"></div>
            </div>
        </div>`,[Ty]),this.H=1,this.S=1,this.B=1,this.A=1,this.isSpectrumDragging=!1,this.isSpectrumHueDragging=!1,this.isSpectrumAlphaDragging=!1,this.colorChanged=!1,this.spectrumColor=null,this.spectrumVal=null,this.spectrumDragger=null,this.spectrumHue=null,this.spectrumHueSlider=null,this.spectrumAlpha=null,this.spectrumAlphaSlider=null,this.colorInput=null,this.recentColors=null,this.picker=e.picker}postConstruct(){this.initTabIndex(),this.initRecentColors(),this.addGuiEventListener("focus",()=>this.spectrumColor.focus()),this.addGuiEventListener("keydown",e=>{e.key!==aa.ENTER||e.defaultPrevented||this.destroy()}),this.addManagedListeners(this.spectrumColor,{keydown:e=>this.moveDragger(e)}),this.addManagedListeners(this.spectrumAlphaSlider,{keydown:e=>this.moveAlphaSlider(e)}),this.addManagedListeners(this.spectrumHueSlider,{keydown:e=>this.moveHueSlider(e)}),this.addManagedListeners(this.spectrumVal,{mousedown:this.onSpectrumDraggerDown.bind(this)}),this.addManagedListeners(this.spectrumHue,{mousedown:this.onSpectrumHueDown.bind(this)}),this.addManagedListeners(this.spectrumAlpha,{mousedown:this.onSpectrumAlphaDown.bind(this)}),this.addGuiEventListener("mousemove",e=>{this.onSpectrumDraggerMove(e),this.onSpectrumHueMove(e),this.onSpectrumAlphaMove(e)}),this.addManagedListeners(document,{mouseup:this.onMouseUp.bind(this)}),this.colorInput.onColorChanged(this.setColor.bind(this)),this.addManagedListeners(this.recentColors,{click:this.onRecentColorClick.bind(this),keydown:e=>{(e.key===aa.ENTER||e.key===aa.SPACE)&&(e.preventDefault(),this.onRecentColorClick(e))}})}initTabIndex(){let e=this.tabIndex=this.gos.get("tabIndex").toString();this.spectrumColor.setAttribute("tabindex",e),this.spectrumHueSlider.setAttribute("tabindex",e),this.spectrumAlphaSlider.setAttribute("tabindex",e)}refreshSpectrumRect(){return this.spectrumValRect=this.spectrumVal.getBoundingClientRect()}refreshHueRect(){return this.spectrumHueRect=this.spectrumHue.getBoundingClientRect()}refreshAlphaRect(){return this.spectrumAlphaRect=this.spectrumAlpha.getBoundingClientRect()}onSpectrumDraggerDown(e){e.preventDefault(),this.refreshSpectrumRect(),this.isSpectrumDragging=!0,this.moveDragger(e)}onSpectrumDraggerMove(e){this.isSpectrumDragging&&this.moveDragger(e)}onSpectrumHueDown(e){this.refreshHueRect(),this.isSpectrumHueDragging=!0,this.moveHueSlider(e)}onSpectrumHueMove(e){this.isSpectrumHueDragging&&this.moveHueSlider(e)}onSpectrumAlphaDown(e){this.refreshAlphaRect(),this.isSpectrumAlphaDragging=!0,this.moveAlphaSlider(e)}onSpectrumAlphaMove(e){this.isSpectrumAlphaDragging&&this.moveAlphaSlider(e)}onMouseUp(){this.isSpectrumDragging=!1,this.isSpectrumHueDragging=!1,this.isSpectrumAlphaDragging=!1}moveDragger(e){let t,i;let r=this.spectrumValRect;if(r){if(e instanceof MouseEvent)t=e.clientX-r.left,i=e.clientY-r.top;else{let r=e.key===aa.LEFT,s=e.key===aa.RIGHT,a=e.key===aa.UP,o=e.key===aa.DOWN,n=a||o,l=r||s;if(!n&&!l)return;e.preventDefault();let{x:h,y:d}=this.getSpectrumValue();t=h+(l?r?-5:5:0),i=d+(n?a?-5:5:0)}t=Math.min(t=Math.max(t,0),r.width),i=Math.min(i=Math.max(i,0),r.height),this.setSpectrumValue(t/r.width,1-i/r.height)}}moveHueSlider(e){let t=this.spectrumHueRect;if(!t)return;let i=this.moveSlider(this.spectrumHueSlider,e);null!=i&&(this.H=1-i/t.width,this.update())}moveAlphaSlider(e){let t=this.spectrumAlphaRect;if(!t)return;let i=this.moveSlider(this.spectrumAlphaSlider,e);null!=i&&(this.A=i/t.width,this.update())}moveSlider(e,t){let i;let r=e.getBoundingClientRect(),s=e.parentElement?.getBoundingClientRect();if(!e||!s)return null;let a=r.width/2;if(t instanceof MouseEvent)i=Math.floor(t.clientX-s.left);else{let r=t.key===aa.LEFT,s=t.key===aa.RIGHT;if(!r&&!s)return null;t.preventDefault(),i=parseFloat(e.style.left)+a+(r?-5:5)}return i=Math.min(i=Math.max(i,0),s.width),e.style.left=i-a+"px",i}update(e){let t=360*this.H,i=If.Color.fromHSB(t,this.S,this.B,this.A),r=i.toRgbaString(),s=If.Color.fromHSB(t,this.S,this.B).toRgbaString(),a=If.Color.fromHSB(t,1,1).toRgbaString(),o=this.picker;If.Color.fromString(o.getValue()).toRgbaString()!==r&&(this.colorChanged=!0),o.setValue(r),this.spectrumColor.style.backgroundColor=a,this.spectrumDragger.style.backgroundColor=s,this.spectrumHueSlider.style.backgroundColor=a,this.spectrumAlpha.style.setProperty("--ag-internal-spectrum-alpha-color-from",If.Color.fromHSB(t,this.S,this.B,0).toRgbaString()),this.spectrumAlpha.style.setProperty("--ag-internal-spectrum-alpha-color-to",s),this.spectrumAlpha.style.setProperty("--ag-internal-spectrum-alpha-color",r),e||this.colorInput.setColor(i)}setSpectrumValue(e,t,i){let r=this.spectrumValRect||this.refreshSpectrumRect();if(null==r)return;let s=this.spectrumDragger,a=s.getBoundingClientRect();e=Math.min(1,e=Math.max(0,e)),t=Math.min(1,t=Math.max(0,t)),this.S=e,this.B=t,s.style.left=e*r.width-a.width/2+"px",s.style.top=(1-t)*r.height-a.height/2+"px",this.update(i)}getSpectrumValue(){let e=this.spectrumDragger,t=e.getBoundingClientRect();return{x:parseFloat(e.style.left)+t.width/2,y:parseFloat(e.style.top)+t.height/2}}initRecentColors(){let t=e.recentColors,i=t.map((e,t)=>`<div class="ag-recent-color" id=${t} style="background-color: ${e}; width: 15px; height: 15px;" recent-color="${e}" tabIndex="${this.tabIndex}"></div>`);this.recentColors.innerHTML=i.join(""),sC(this.recentColors,!!t.length)}setValue(e){let t=If.Color.fromString(e);this.setColor(t,!0)}setColor(e,t){let[i,r,s]=e.toHSB();this.H=(isNaN(i)?0:i)/360,this.A=e.a;let a=this.spectrumHueRect||this.refreshHueRect(),o=this.spectrumAlphaRect||this.refreshAlphaRect();this.spectrumHueSlider.style.left=`${-((this.H-1)*a.width)-this.spectrumHueSlider.getBoundingClientRect().width/2}px`,this.spectrumAlphaSlider.style.left=`${this.A*o.width-this.spectrumAlphaSlider.getBoundingClientRect().width/2}px`,this.setSpectrumValue(r,s,!t)}onRecentColorClick(t){let i=t.target;if(!tY(i.id))return;let r=parseInt(i.id,10);this.setValue(e.recentColors[r]),this.destroy()}addRecentColor(){let t=If.Color.fromHSB(360*this.H,this.S,this.B,this.A).toRgbaString(),i=e.recentColors;this.colorChanged&&i[0]!==t&&(i=i.filter(e=>e!=t),(i=[t].concat(i)).length>e.maxRecentColors&&(i=i.slice(0,e.maxRecentColors)),e.recentColors=i)}destroy(){this.addRecentColor(),super.destroy()}};TC.maxRecentColors=8,TC.recentColors=[];var Tw=class extends ou{constructor(e){super({pickerAriaLabelKey:"ariaLabelColorPicker",pickerAriaLabelValue:"Color Picker",pickerType:"ag-list",className:"ag-color-picker",pickerIcon:"smallDown",...e})}postConstruct(){let e=ia(this.gos);this.eDisplayFieldColor=e.createElement("span"),this.eDisplayFieldColor.classList.add("ag-color-picker-color"),this.eDisplayFieldText=e.createElement("span"),this.eDisplayFieldText.classList.add("ag-color-picker-value"),this.eDisplayField.appendChild(this.eDisplayFieldColor),this.eDisplayField.appendChild(this.eDisplayFieldText),super.postConstruct(),this.value&&this.setValue(this.value)}createPickerComponent(){let e=this.eWrapper.getBoundingClientRect(),t=this.popupService.getParentRect();return this.createBean(new ks({closable:!1,modal:!0,hideTitleBar:!0,minWidth:190,width:190,height:250,x:e.right-t.left-190,y:e.top-t.top-250-(this.config.pickerGap??0),postProcessPopupParams:{type:"colorPicker",eventSource:this.eWrapper}}))}renderAndPositionPicker(){let e=this.pickerComponent,t=this.createBean(new TC({picker:this}));return e.addCssClass("ag-color-dialog"),t.addDestroyFunc(()=>{e.isAlive()&&this.destroyBean(e)}),e.setParentComponent(this),e.setBodyComponent(t),t.setValue(this.getValue()),t.getGui().focus(),e.addDestroyFunc(()=>{this.isDestroyingPicker?this.isDestroyingPicker=!1:(this.beforeHidePicker(),this.isDestroyingPicker=!0,t.isAlive()&&this.destroyBean(t),this.isAlive()&&this.getFocusableElement().focus())}),()=>this.pickerComponent?.close()}setValue(e){return this.value===e?this:(this.eDisplayFieldColor.style.backgroundColor=e,this.eDisplayFieldText.textContent=If.Color.fromString(e).toHexString().toUpperCase(),super.setValue(e))}getValue(){return this.value}},Tb={selector:"AG-COLOR-PICKER",component:Tw},TS=class extends sQ{constructor(e){super(),this.chartMenuParamsFactory=e}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){let e=this.chartMenuParamsFactory.addEnableParams("crosshair.enabled",{cssIdentifier:"charts-advanced-settings-top-level",direction:"vertical",suppressOpenCloseIcons:!0,title:this.chartTranslationService.translate("crosshair"),suppressEnabledCheckbox:!0,useToggle:!0}),t=this.chartMenuParamsFactory.getDefaultCheckboxParams("crosshair.label.enabled","crosshairLabel"),i=this.chartMenuParamsFactory.getDefaultCheckboxParams("crosshair.snap","crosshairSnap"),r=this.chartMenuParamsFactory.getDefaultColorPickerParams("crosshair.stroke","color");this.setTemplate(`<div>
            <ag-group-component data-ref="crosshairGroup">
                <ag-checkbox data-ref="crosshairLabelCheckbox"></ag-checkbox>
                <ag-checkbox data-ref="crosshairSnapCheckbox"></ag-checkbox>
                <ag-color-picker data-ref="crosshairStrokeColorPicker"></ag-color-picker>
            </ag-group-component>
        </div>`,[I1,ad,Tb],{crosshairGroup:e,crosshairLabelCheckbox:t,crosshairSnapCheckbox:i,crosshairStrokeColorPicker:r})}},Tx={selector:"AG-INPUT-RANGE",component:class extends al{constructor(e){super(e,"ag-range-field","range")}postConstruct(){super.postConstruct();let{min:e,max:t,step:i}=this.config;null!=e&&this.setMinValue(e),null!=t&&this.setMaxValue(t),this.setStep(i||1)}addInputListeners(){this.addManagedElementListeners(this.eInput,{input:e=>{let t=e.target.value;this.setValue(t)}})}setMinValue(e){return this.min=e,this.eInput.setAttribute("min",e.toString()),this}setMaxValue(e){return this.max=e,this.eInput.setAttribute("max",e.toString()),this}setStep(e){return this.eInput.setAttribute("step",e.toString()),this}setValue(e,t){null!=this.min&&(e=Math.max(parseFloat(e),this.min).toString()),null!=this.max&&(e=Math.min(parseFloat(e),this.max).toString());let i=super.setValue(e,t);return this.eInput.value=e,i}}},TM=class extends ao{constructor(e){super(e,`<div class="ag-slider">
            <label data-ref="eLabel"></label>
            <div class="ag-wrapper ag-slider-wrapper">
                <ag-input-range data-ref="eSlider"></ag-input-range>
                <ag-input-number-field data-ref="eText"></ag-input-number-field>
            </div>
        </div>`,[Tx,ox]),this.eLabel=null,this.eSlider=null,this.eText=null,this.labelAlignment="top"}postConstruct(){super.postConstruct(),this.eSlider.addCssClass("ag-slider-field");let{minValue:e,maxValue:t,textFieldWidth:i,step:r,value:s,onValueChange:a}=this.config;null!=e&&this.setMinValue(e),null!=t&&this.setMaxValue(t),null!=i&&this.setTextFieldWidth(i),null!=r&&this.setStep(r),null!=s&&this.setValue(s),null!=a&&this.onValueChange(a)}onValueChange(e){return this.addManagedListeners(this.eText,{fieldValueChanged:()=>{let t=parseFloat(this.eText.getValue());this.eSlider.setValue(t.toString(),!0),e(t||0)}}),this.addManagedListeners(this.eSlider,{fieldValueChanged:()=>{let t=this.eSlider.getValue();this.eText.setValue(t,!0),e(parseFloat(t))}}),this}setSliderWidth(e){return this.eSlider.setWidth(e),this}setTextFieldWidth(e){return this.eText.setWidth(e),this}setMinValue(e){return this.eSlider.setMinValue(e),this.eText.setMin(e),this}setMaxValue(e){return this.eSlider.setMaxValue(e),this.eText.setMax(e),this}getValue(){return this.eText.getValue()}setValue(e,t){return this.getValue()===e||(this.eText.setValue(e,!0),this.eSlider.setValue(e,!0),t||this.dispatchLocalEvent({type:"fieldValueChanged"})),this}setStep(e){return this.eSlider.setStep(e),this.eText.setStep(e),this}},TE={selector:"AG-SLIDER",component:TM},TD=class extends sQ{constructor(e){super(),this.chartMenuParamsFactory=e}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){let e=this.chartMenuParamsFactory.addEnableParams("navigator.enabled",{cssIdentifier:"charts-advanced-settings-top-level",direction:"vertical",suppressOpenCloseIcons:!0,title:this.chartTranslationService.translate("navigator"),suppressEnabledCheckbox:!0,useToggle:!0}),t=this.chartMenuParamsFactory.getDefaultSliderParams("navigator.height","height",60);t.minValue=10;let i=this.chartMenuParamsFactory.getDefaultCheckboxParams("navigator.miniChart.enabled","miniChart");this.setTemplate(`<div>
            <ag-group-component data-ref="navigatorGroup">
                <ag-slider data-ref="navigatorHeightSlider"></ag-slider>
                <ag-checkbox data-ref="navigatorMiniChartCheckbox"></ag-checkbox>
            </ag-group-component>
        </div>`,[I1,TE,ad],{navigatorGroup:e,navigatorHeightSlider:t,navigatorMiniChartCheckbox:i})}},TI=class extends sQ{constructor(e){super(),this.chartMenuParamsFactory=e,this.zoomScrollingStepInput=null}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){let e;let t=this.chartMenuParamsFactory.addEnableParams("zoom.enabled",{cssIdentifier:"charts-advanced-settings-top-level",direction:"vertical",suppressOpenCloseIcons:!0,title:this.chartTranslationService.translate("zoom"),suppressEnabledCheckbox:!0,useToggle:!0}),i=this.chartMenuParamsFactory.getDefaultCheckboxParams("zoom.enableScrolling","scrollingZoom"),r=this.chartMenuParamsFactory.getDefaultSliderParams("zoom.scrollingStep","scrollingStep",1);r.step=.01,r.minValue=r.step;let s=this.chartMenuParamsFactory.getDefaultCheckboxParams("zoom.enableSelecting","selectingZoom");i.onValueChange=(e=i.onValueChange,t=>{e&&(e(t),this.zoomScrollingStepInput.setDisabled(!t))}),this.setTemplate(`<div>
            <ag-group-component data-ref="zoomGroup">
                <ag-checkbox data-ref="zoomSelectingCheckbox"></ag-checkbox>
                <ag-checkbox data-ref="zoomScrollingCheckbox"></ag-checkbox>
                <ag-slider data-ref="zoomScrollingStepInput"></ag-slider>
            </ag-group-component>
        </div>`,[I1,ad,TE],{zoomGroup:t,zoomScrollingCheckbox:i,zoomScrollingStepInput:r,zoomSelectingCheckbox:s}),this.zoomScrollingStepInput.setDisabled(!i.value)}},Tk=["navigator","zoom","animation","crosshair"],TT=class extends sQ{constructor(e){super('<div class="ag-chart-advanced-settings-wrapper"></div>'),this.chartMenuContext=e}postConstruct(){this.chartPanelFeature=this.createManagedBean(new Tf(this.chartMenuContext.chartController,this.getGui(),"ag-chart-advanced-settings-section",(e,t)=>this.createPanels(e,t))),this.chartPanelFeature.refreshPanels()}createPanels(e,t){Tk.forEach(e=>{if(!this.isGroupPanelShownForSeries(e,t))return;let i=this.createPanel(e);this.chartPanelFeature.addComponent(i)})}isGroupPanelShownForSeries(e,t){return"animation"===e||Ta(t)}createPanel(e){let{chartMenuParamsFactory:t,chartAxisMenuParamsFactory:i}=this.chartMenuContext;switch(e){case"navigator":return new TD(t);case"zoom":return new TI(t);case"animation":return new Tv(t);case"crosshair":return new TS(i)}}},TA=class extends i2{constructor(){super(...arguments),this.beanName="advancedSettingsMenuFactory"}wireBeans(e){this.focusService=e.focusService,this.chartTranslationService=e.chartTranslationService}showMenu(e,t){this.hideMenu();let i=this.createBean(new TR(e));this.activeDialog=this.createBean(new ks({title:this.chartTranslationService.translate("advancedSettings"),component:i,width:300,height:400,resizable:!0,movable:!0,centered:!0,closable:!0,afterGuiAttached:()=>{this.focusService.findFocusableElements(i.getGui())[0]?.focus()},closedCallback:()=>{this.activeMenu=this.destroyBean(this.activeMenu),this.activeDialog=void 0,t?.focus({preventScroll:!0})}})),this.activeMenu=i}hideMenu(){this.activeDialog&&this.destroyBean(this.activeDialog)}destroy(){this.activeMenu=this.destroyBean(this.activeMenu),this.activeDialog=this.destroyBean(this.activeDialog),super.destroy()}},TR=class extends hu{constructor(e){super('<div class="ag-chart-advanced-settings"></div>'),this.chartMenuContext=e}wireBeans(e){this.focusService=e.focusService}postConstruct(){this.advancedSettingsPanel=this.createManagedBean(new TT(this.chartMenuContext)),this.getGui().appendChild(this.advancedSettingsPanel.getGui()),this.initialiseTabGuard({onTabKeyDown:this.onTabKeyDown.bind(this),focusTrapActive:!0})}onTabKeyDown(e){if(e.defaultPrevented)return;e.preventDefault();let t=e.shiftKey,i=this.advancedSettingsPanel.getGui(),r=this.focusService.findNextFocusableElement(i,!1,t);if(r)r.focus();else{let e=this.focusService.findFocusableElements(i);e.length&&e[t?e.length-1:0].focus()}}},TL=class extends i2{constructor(){super(...arguments),this.beanName="chartMenuListFactory"}wireBeans(e){this.popupService=e.popupService,this.chartMenuService=e.chartMenuService,this.chartTranslationService=e.chartTranslationService}showMenuList(e){let{eventSource:t,showMenu:i,chartMenuContext:r}=e,s=this.chartMenuService.doChartToolPanelsExist(r.chartController),a=this.mapWithStockItems(this.getMenuItems(r.chartController,s),r,i,t,s);if(!a.length)return;let o=this.createBean(new TP(a));this.activeChartMenuList=o;let n=-1,l="left";this.gos.get("enableRtl")&&(n=1,l="right");let h=o.getGui();this.popupService.addPopup({modal:!0,eChild:h,closeOnEsc:!0,closedCallback:()=>{this.destroyBean(o),this.activeChartMenuList=void 0,id(this.gos)&&t.focus({preventScroll:!0})},afterGuiAttached:e=>o.afterGuiAttached(e),positionCallback:()=>{this.popupService.positionPopupByComponent({type:"chartMenu",eventSource:t,ePopup:h,alignSide:l,nudgeX:4*n,nudgeY:4,position:"under",keepWithinBounds:!0})},ariaLabel:"Chart Menu"})}getMenuItems(e,t){let i=[...t?["chartEdit"]:[],...e.isEnterprise()?["chartAdvancedSettings"]:[],e.isChartLinked()?"chartUnlink":"chartLink","chartDownload"],r=this.gos.get("chartMenuItems");return r?Array.isArray(r)?r:r(this.gos.addGridCommonParams({defaultItems:i})):i}mapWithStockItems(e,t,i,r,s){if(!e)return[];let a=[];return e.forEach(e=>{let o;if(!(o="string"==typeof e?this.getStockMenuItem(e,t,i,r,s):{...e}))return;let{subMenu:n}=o;Array.isArray(n)&&(o.subMenu=this.mapWithStockItems(n,t,i,r,s)),a.push(o)}),a}getStockMenuItem(e,t,i,r,s){switch(e){case"chartEdit":return s?this.createMenuItem(this.chartTranslationService.translate("chartEdit"),"chartsMenuEdit",i):null;case"chartAdvancedSettings":return this.createMenuItem(this.chartTranslationService.translate("chartAdvancedSettings"),"chartsMenuAdvancedSettings",()=>this.chartMenuService.openAdvancedSettings(t,r));case"chartUnlink":return t.chartController.isChartLinked()?this.createMenuItem(this.chartTranslationService.translate("chartUnlink"),"unlinked",()=>this.chartMenuService.toggleLinked(t)):null;case"chartLink":return t.chartController.isChartLinked()?null:this.createMenuItem(this.chartTranslationService.translate("chartLink"),"linked",()=>this.chartMenuService.toggleLinked(t));case"chartDownload":return this.createMenuItem(this.chartTranslationService.translate("chartDownload"),"save",()=>this.chartMenuService.downloadChart(t))}return null}createMenuItem(e,t,i){return{name:e,icon:s2(t,this.gos,null),action:i}}destroy(){this.destroyBean(this.activeChartMenuList),super.destroy()}},TP=class extends sQ{constructor(e){super(`
            <div data-ref="eChartsMenu" role="presentation" class="ag-menu ag-chart-menu-popup"></div>
        `),this.menuItems=e,this.eChartsMenu=null}wireBeans(e){this.focusService=e.focusService}postConstruct(){this.mainMenuList=this.createManagedBean(new ka(0)),this.mainMenuList.addMenuItems(this.menuItems),this.mainMenuList.addEventListener("closeMenu",this.onHidePopup.bind(this)),this.eChartsMenu.appendChild(this.mainMenuList.getGui())}onHidePopup(){this.hidePopupFunc?.()}afterGuiAttached({hidePopup:e}){e&&(this.hidePopupFunc=e,this.addDestroyFunc(e)),this.focusService.focusInto(this.mainMenuList.getGui())}},TF=class e extends i2{constructor(){super(...arguments),this.beanName="chartCrossFilterService"}wireBeans(e){this.columnModel=e.columnModel,this.valueService=e.valueService,this.filterManager=e.filterManager,t4(this.gos)&&(this.clientSideRowModel=e.rowModel)}filter(t,i=!1){let r=this.filterManager?.getFilterModel()??{};if(i){this.resetFilters(r);return}let s=e.extractFilterColId(t);this.isValidColumnFilter(s)?this.updateFilters(r,t,s):tO("cross filtering requires a 'agSetColumnFilter' or 'agMultiColumnFilter' to be defined on the column with id: '"+s+"'")}resetFilters(e){Object.keys(e).length>0&&(this.filterManager?.setFilterModel(null),this.filterManager?.onFilterChanged({source:"api"}))}updateFilters(t,i,r){let s=e.extractFilterColId(i),a=i.datum[s];if(void 0===a)return;let o=a.toString();if(i.event.metaKey||i.event.ctrlKey){let e;let i=this.getCurrentGridValuesForCategory(r);iU(i,o)?e=i.filter(e=>e!==o):(e=i).push(o),t[r]=this.getUpdatedFilterModel(r,e)}else t={[r]:this.getUpdatedFilterModel(r,[o])};this.filterManager?.setFilterModel(t)}getUpdatedFilterModel(e,t){return"agMultiColumnFilter"===this.getColumnFilterType(e)?{filterType:"multi",filterModels:[null,{filterType:"set",values:t}]}:{filterType:"set",values:t}}getCurrentGridValuesForCategory(e){let t=[],i=this.getColumnById(e);return this.clientSideRowModel?.forEachNodeAfterFilter(e=>{if(i&&!e.group){let r=this.valueService.getValue(i,e)+"";t.includes(r)||t.push(r)}}),t}static extractFilterColId(e){return e.xKey||e.calloutLabelKey}isValidColumnFilter(e){e.indexOf("-filtered-out")&&(e=e.replace("-filtered-out",""));let t=this.getColumnFilterType(e);return"boolean"==typeof t?t:iU(["agSetColumnFilter","agMultiColumnFilter"],t)}getColumnFilterType(e){let t=this.getColumnById(e);if(t)return t.getColDef().filter}getColumnById(e){return this.columnModel.getCol(e)}},TN=["chartUnlink","chartLink","chartDownload","chartMenu"],TO={settings:"chartSettings",data:"chartData",format:"chartFormat"},TB=class extends i2{constructor(){super(...arguments),this.beanName="chartMenuService"}wireBeans(e){this.advancedSettingsMenuFactory=e.advancedSettingsMenuFactory}downloadChart(e,t,i,r){e.chartController.getChartProxy().downloadChart(t,i,r)}toggleLinked(e){e.chartController.detachChartRange()}openAdvancedSettings(e,t){this.advancedSettingsMenuFactory.showMenu(e,t)}hideAdvancedSettings(){this.advancedSettingsMenuFactory.hideMenu()}getChartToolbarOptions(){let e=["chartMenu"],t=this.gos.getCallback("getChartToolbarItems");return t?t({defaultItems:e}).filter(e=>!!TN.includes(e)||(tO(`'${e}' is not a valid Chart Toolbar Option`),!1)):e}getChartToolPanels(e){let t=this.gos.get("chartToolPanelsDef"),i=t?.panels?.map(e=>{let t=TO[e];return t||tO(`Invalid panel in chartToolPanelsDef.panels: '${e}'`),t}).filter(e=>!!e)??Object.values(TO);e.isPivotChart()&&(i=i.filter(e=>"chartData"!==e));let r=t?.defaultToolPanel,s=r&&TO[r]||i[0];return{panels:i,defaultPanel:s}}doesChartToolbarExist(){return this.getChartToolbarOptions().length>0}doChartToolPanelsExist(e){let{panels:t}=this.getChartToolPanels(e);return t.length>0}},TG=class e extends i2{constructor(){super(...arguments),this.beanName="chartTranslationService"}translate(t){let i=this.localeService.getLocaleTextFunc(),r=e.DEFAULT_TRANSLATIONS[t];return i(t,r)}};TG.DEFAULT_TRANSLATIONS={pivotChartTitle:"Pivot Chart",rangeChartTitle:"Range Chart",settings:"Chart",data:"Set Up",format:"Customize",categories:"Categories",defaultCategory:"(None)",series:"Series",switchCategorySeries:"Switch Category / Series",categoryValues:"Category Values",seriesLabels:"Series Labels",aggregate:"Aggregate",xyValues:"X Y Values",paired:"Paired Mode",axis:"Axis",xAxis:"Horizontal Axis",yAxis:"Vertical Axis",polarAxis:"Polar Axis",radiusAxis:"Radius Axis",navigator:"Navigator",zoom:"Zoom",animation:"Animation",crosshair:"Crosshair",color:"Color",thickness:"Thickness",preferredLength:"Preferred Length",xType:"X Type",axisType:"Axis Type",automatic:"Automatic",category:"Category",number:"Number",time:"Time",timeFormat:"Time Format",autoRotate:"Auto Rotate",labelRotation:"Rotation",circle:"Circle",polygon:"Polygon",square:"Square",cross:"Cross",diamond:"Diamond",plus:"Plus",triangle:"Triangle",heart:"Heart",orientation:"Orientation",fixed:"Fixed",parallel:"Parallel",perpendicular:"Perpendicular",radiusAxisPosition:"Position",ticks:"Ticks",gridLines:"Grid Lines",width:"Width",height:"Height",length:"Length",padding:"Padding",spacing:"Spacing",chartStyle:"Chart Style",title:"Title",chartTitles:"Titles",chartTitle:"Chart Title",chartSubtitle:"Subtitle",horizontalAxisTitle:"Horizontal Axis Title",verticalAxisTitle:"Vertical Axis Title",polarAxisTitle:"Polar Axis Title",titlePlaceholder:"Chart Title",background:"Background",font:"Font",weight:"Weight",top:"Top",right:"Right",bottom:"Bottom",left:"Left",labels:"Labels",calloutLabels:"Callout Labels",sectorLabels:"Sector Labels",positionRatio:"Position Ratio",size:"Size",shape:"Shape",minSize:"Minimum Size",maxSize:"Maximum Size",legend:"Legend",position:"Position",markerSize:"Marker Size",markerStroke:"Marker Stroke",markerPadding:"Marker Padding",itemSpacing:"Item Spacing",itemPaddingX:"Item Padding X",itemPaddingY:"Item Padding Y",layoutHorizontalSpacing:"Horizontal Spacing",layoutVerticalSpacing:"Vertical Spacing",strokeWidth:"Stroke Width",offset:"Offset",offsets:"Offsets",tooltips:"Tooltips",callout:"Callout",markers:"Markers",shadow:"Shadow",blur:"Blur",xOffset:"X Offset",yOffset:"Y Offset",lineWidth:"Line Width",lineDash:"Line Dash",lineDashOffset:"Dash Offset",scrollingZoom:"Scrolling",scrollingStep:"Scrolling Step",selectingZoom:"Selecting",durationMillis:"Duration (ms)",crosshairLabel:"Label",crosshairSnap:"Snap to Node",normal:"Normal",bold:"Bold",italic:"Italic",boldItalic:"Bold Italic",predefined:"Predefined",fillOpacity:"Fill Opacity",strokeColor:"Line Color",strokeOpacity:"Line Opacity",miniChart:"Mini-Chart",histogramBinCount:"Bin count",connectorLine:"Connector Line",seriesItems:"Series Items",seriesItemType:"Item Type",seriesItemPositive:"Positive",seriesItemNegative:"Negative",seriesItemLabels:"Item Labels",columnGroup:"Column",barGroup:"Bar",pieGroup:"Pie",lineGroup:"Line",scatterGroup:"X Y (Scatter)",areaGroup:"Area",polarGroup:"Polar",statisticalGroup:"Statistical",hierarchicalGroup:"Hierarchical",specializedGroup:"Specialized",combinationGroup:"Combination",groupedColumnTooltip:"Grouped",stackedColumnTooltip:"Stacked",normalizedColumnTooltip:"100% Stacked",groupedBarTooltip:"Grouped",stackedBarTooltip:"Stacked",normalizedBarTooltip:"100% Stacked",pieTooltip:"Pie",donutTooltip:"Donut",lineTooltip:"Line",groupedAreaTooltip:"Area",stackedAreaTooltip:"Stacked",normalizedAreaTooltip:"100% Stacked",scatterTooltip:"Scatter",bubbleTooltip:"Bubble",histogramTooltip:"Histogram",radialColumnTooltip:"Radial Column",radialBarTooltip:"Radial Bar",radarLineTooltip:"Radar Line",radarAreaTooltip:"Radar Area",nightingaleTooltip:"Nightingale",rangeBarTooltip:"Range Bar",rangeAreaTooltip:"Range Area",boxPlotTooltip:"Box Plot",treemapTooltip:"Treemap",sunburstTooltip:"Sunburst",waterfallTooltip:"Waterfall",heatmapTooltip:"Heatmap",columnLineComboTooltip:"Column & Line",areaColumnComboTooltip:"Area & Column",customComboTooltip:"Custom Combination",innerRadius:"Inner Radius",startAngle:"Start Angle",endAngle:"End Angle",reverseDirection:"Reverse Direction",groupPadding:"Group Padding",seriesPadding:"Series Padding",tile:"Tile",whisker:"Whisker",cap:"Cap",capLengthRatio:"Length Ratio",labelPlacement:"Placement",inside:"Inside",outside:"Outside",noDataToChart:"No data available to be charted.",pivotChartRequiresPivotMode:"Pivot Chart requires Pivot Mode enabled.",chartSettingsToolbarTooltip:"Menu",chartLinkToolbarTooltip:"Linked to Grid",chartUnlinkToolbarTooltip:"Unlinked from Grid",chartDownloadToolbarTooltip:"Download Chart",chartMenuToolbarTooltip:"Menu",chartEdit:"Edit Chart",chartAdvancedSettings:"Advanced Settings",chartLink:"Link to Grid",chartUnlink:"Unlink from Grid",chartDownload:"Download Chart",histogramFrequency:"Frequency",seriesChartType:"Series Chart Type",seriesType:"Series Type",secondaryAxis:"Secondary Axis",seriesAdd:"Add a series",categoryAdd:"Add a category",bar:"Bar",column:"Column",histogram:"Histogram",advancedSettings:"Advanced Settings",direction:"Direction",horizontal:"Horizontal",vertical:"Vertical",seriesGroupType:"Group Type",groupedSeriesGroupType:"Grouped",stackedSeriesGroupType:"Stacked",normalizedSeriesGroupType:"100% Stacked",legendEnabled:"Enabled",invalidColor:"Color value is invalid",groupedColumnFull:"Grouped Column",stackedColumnFull:"Stacked Column",normalizedColumnFull:"100% Stacked Column",groupedBarFull:"Grouped Bar",stackedBarFull:"Stacked Bar",normalizedBarFull:"100% Stacked Bar",stackedAreaFull:"Stacked Area",normalizedAreaFull:"100% Stacked Area",customCombo:"Custom Combination",groupedColumn:"Grouped",stackedColumn:"Stacked",pie:"Pie",donut:"Donut",line:"Line",scatter:"Scatter",bubble:"Bubble",area:"Area",stackedArea:"Stacked",radarLine:"Radar Line",radarArea:"Radar Area",nightingale:"Nightingale",radialColumn:"Radial Column",radialBar:"Radial Bar",boxPlot:"Box Plot",rangeBar:"Range Bar",rangeArea:"Range Area",treemap:"Treemap",sunburst:"Sunburst",waterfall:"Waterfall",heatmap:"Heatmap",columnLineCombo:"Column & Line",AreaColumnCombo:"Area & Column",ariaChartMenuClose:"Close Chart Edit Menu",ariaChartSelected:"Selected",group:"Group",timeFormatSlashesDDMMYYYY:"DD/MM/YYYY",timeFormatSlashesMMDDYYYY:"MM/DD/YYYY",timeFormatSlashesDDMMYY:"DD/MM/YY",timeFormatSlashesMMDDYY:"MM/DD/YY",timeFormatDotsDDMYY:"DD.M.YY",timeFormatDotsMDDYY:"M.DD.YY",timeFormatDashesYYYYMMDD:"YYYY-MM-DD",timeFormatSpacesDDMMMMYYYY:"DD MMMM YYYY",timeFormatHHMMSS:"HH:MM:SS",timeFormatHHMMSSAmPm:"HH:MM:SS AM/PM",sum:"Sum",first:"First",last:"Last",min:"Min",max:"Max",count:"Count",avg:"Average"};var Tz="32.2.0",T_=["number","category","grouped-category","log","time"];function TV(e,t,i){if(null==e)return i;let r=t.split("."),s=e;for(;r.length>1;)if(null==(s=s[r.shift()]))return i;let a=s[r[0]];return null!=a?a:i}function Tj(e){return iU(Object.keys(Ip.themes),e)}var TH=T_.reduce((e,t)=>({...e,[t]:{title:{_enabledFromTheme:!0}}}),{});function TU(e,t){let{customChartThemes:i}=e,r=i&&i[t];return r||tO(`no stock theme exists with the name '${t}' and no custom chart theme with that name was supplied to 'customChartThemes'`),r}var TW=class e extends i2{wireBeans(e){this.sortController=e.sortController,this.gridRowModel=e.rowModel,this.columnModel=e.columnModel,this.valueService=e.valueService,this.pivotResultColsService=e.pivotResultColsService,this.rowNodeSorter=e.rowNodeSorter,this.aggregationStage=e.aggregationStage}getData(e){if(e.crossFiltering){if(e.grouping)return tO("crossing filtering with row grouping is not supported."),{chartData:[],columnNames:{}};if(!t4(this.gos))return tO("crossing filtering is only supported in the client side row model."),{chartData:[],columnNames:{}}}t6(this.gos)&&e.pivoting&&this.updatePivotKeysForSSRM();let t=this.extractRowsFromGridRowModel(e);return t.chartData=this.aggregateRowsByDimension(e,t.chartData),t}extractRowsFromGridRowModel(t){let i,r;let{crossFiltering:s,startRow:a,endRow:o,valueCols:n,dimensionCols:l,grouping:h}=t,d=[],c={},u={},p={},g={},m=[];if(s)g=this.getFilteredRowNodes(),i=(m=this.getAllRowNodes()).length;else{let e=this.gridRowModel.getRowCount()-1;i=a===o&&0===a&&0===l.length&&0===n.length?0:(o>=0?Math.min(o,e):e)-a+1}i>0&&n.forEach(e=>{let t=[],i=e.getColDef().pivotKeys;i&&(t=i.slice());let r=e.getColDef().headerName;r&&t.push(r),t.length>0&&(c[e.getId()]=t)});let f=0,v=0;for(let r=0;r<i;r++){let i=s?m[r]:this.gridRowModel.getRow(r+a);if(i.footer||i.detail){f++;continue}let o={};l.forEach(t=>{let s=t.colId,a=this.columnModel.getCol(s);if(a){let t=this.valueService.getValue(a,i);if(h){let a=t?.toString?String(t.toString()):"",n=e.getGroupLabels(i,a);o[s]={labels:n,id:v++,toString:function(){return this.labels.filter(e=>!!e).reverse().join(" - ")}},i.group&&(u[n.toString()]=r-f);let l=n.slice(1,n.length).toString();l&&(p[l]=u[l])}else o[s]=t}else o[TZ.DEFAULT_CATEGORY]=r+1}),n.forEach(e=>{let r=e.getColId();if(s){let s=r+"-filtered-out",a=this.valueService.getValue(e,i),n=null!=a&&"function"==typeof a.toNumber?a.toNumber():a;g[i.id]?(o[r]=n,o[s]=t.aggFunc||t.isScatter?void 0:0):(o[r]=t.aggFunc||t.isScatter?void 0:0,o[s]=n)}else{let t=this.valueService.getValue(e,i);t&&Object.prototype.hasOwnProperty.call(t,"toString")&&(t=parseFloat(t.toString())),o[r]=null!=t&&"function"==typeof t.toNumber?t.toNumber():t}}),d.push(o)}if(h){let e=t2(p),t=d;d=[],r=[];for(let i=0;i<t.length;i++)(iU(e,i)?r:d).push(t[i])}return{chartData:d,columnNames:c,groupChartData:r}}aggregateRowsByDimension(e,t){let i=e.dimensionCols;if(!e.aggFunc||0===i.length)return t;let r=iB(i),s=r&&r.colId,a={},o=[];if(t.forEach(e=>{let t=a;i.forEach(r=>{let a=r.colId,n=e[a];if(a===s){let r=t[n];r||(r={__children:[]},i.forEach(t=>{let i=t.colId;r[i]=e[i]}),t[n]=r,o.push(r)),r.__children.push(e)}else t[n]||(t[n]={}),t=t[n]})}),this.gos.assertModuleRegistered(tL.RowGroupingModule,"Charting Aggregation")){let t=this.aggregationStage;o.forEach(i=>e.valueCols.forEach(r=>{if(e.crossFiltering)e.valueCols.forEach(r=>{let s=r.getColId(),a=i.__children.filter(e=>void 0!==e[s]).map(e=>e[s]),o=t.aggregateValues(a,e.aggFunc);i[r.getId()]=o&&void 0!==o.value?o.value:o;let n=`${s}-filtered-out`,l=i.__children.filter(e=>void 0!==e[n]).map(e=>e[n]),h=t.aggregateValues(l,e.aggFunc);i[n]=h&&void 0!==h.value?h.value:h});else{let s=i.__children.map(e=>e[r.getId()]),a=t.aggregateValues(s,e.aggFunc);i[r.getId()]=a&&void 0!==a.value?a.value:a}}))}return o}updatePivotKeysForSSRM(){let e=this.pivotResultColsService.getPivotResultCols()?.list;if(!e)return;let t=this.extractPivotKeySeparator(e);e.forEach(e=>{if(""===t)e.getColDef().pivotKeys=[];else{let i=e.getColId().split(t);e.getColDef().pivotKeys=i.slice(0,i.length-1)}})}extractPivotKeySeparator(e){if(0===e.length)return"";let t=(e,i)=>{let r=e.getGroupId();return e.getParent()?t(e.getParent(),r):i.split(r)[1][0]},i=e[0];return null==i.getParent()?"":t(i.getParent(),i.getColId())}static getGroupLabels(e,t){let i=[t];for(;e&&0!==e.level;)(e=e.parent)&&i.push(e.key);return i}getFilteredRowNodes(){let e={};return this.gridRowModel.forEachNodeAfterFilterAndSort(t=>{e[t.id]=t}),e}getAllRowNodes(){let e=[];return this.gridRowModel.forEachNode(t=>{e.push(t)}),this.sortRowNodes(e)}sortRowNodes(e){let t=this.sortController.getSortOptions();return t&&0!=t.length?this.rowNodeSorter.doFullSort(e,t):e}},T$=class extends i2{constructor(){super(...arguments),this.beanName="chartColumnService",this.valueColsWithoutSeriesType=new Set}wireBeans(e){this.columnModel=e.columnModel,this.showRowGroupColsService=e.showRowGroupColsService,this.columnNameService=e.columnNameService,this.visibleColsService=e.visibleColsService,this.funcColsService=e.funcColsService,this.valueService=e.valueService,this.rowPositionUtils=e.rowPositionUtils}postConstruct(){let e=()=>this.valueColsWithoutSeriesType.clear();this.addManagedEventListeners({newColumnsLoaded:e,rowDataUpdated:e})}getColumn(e){return this.columnModel.getColDefCol(e)}getAllDisplayedColumns(){return this.visibleColsService.getAllCols()}getColDisplayName(e,t){let i="chart",r=this.columnNameService.getDisplayNameForColumn(e,i);if(t){let t=[r],s=e=>{if(!e)return;let r=this.columnNameService.getDisplayNameForColumnGroup(e,i);tZ(r)||(t.unshift(r),s(e.getParent()))};return s(e.getParent()),t.join(" - ")}return r}getRowGroupColumns(){return this.funcColsService.getRowGroupColumns()}getGroupDisplayColumns(){return this.showRowGroupColsService?.getShowRowGroupCols()??[]}isPivotMode(){return this.columnModel.isPivotMode()}isPivotActive(){return this.columnModel.isPivotActive()}getChartColumns(){let e=this.columnModel.getCols(),t=new Set,i=new Set;return e.forEach(e=>{let r=e.getColDef(),s=r.chartDataType;if(s)switch(s){case"category":case"time":t.add(e);return;case"series":i.add(e);return;case"excluded":return;default:tO(`unexpected chartDataType value '${s}' supplied, instead use 'category', 'series' or 'excluded'`)}if("ag-Grid-AutoColumn"===r.colId){t.add(e);return}if(!e.isPrimary()){i.add(e);return}(this.isInferredValueCol(e)?i:t).add(e)}),{dimensionCols:t,valueCols:i}}isInferredValueCol(e){let t=e.getColId();if("ag-Grid-AutoColumn"===t)return!1;let i=this.rowPositionUtils.getRowNode({rowIndex:0,rowPinned:null});if(!i)return this.valueColsWithoutSeriesType.has(t);let r=this.valueService.getValue(e,i);null==r&&(r=this.extractLeafData(i,e)),null!=r&&"function"==typeof r.toNumber&&(r=r.toNumber());let s="number"==typeof r;return s&&this.valueColsWithoutSeriesType.add(t),s}extractLeafData(e,t){if(!e.allLeafChildren)return null;for(let i=0;i<e.allLeafChildren.length;i++){let r=e.allLeafChildren[i],s=this.valueService.getValue(t,r);if(null!=s)return s}return null}destroy(){this.valueColsWithoutSeriesType.clear(),super.destroy()}},TY=class e extends i2{constructor(e){super(),this.suppressComboChartWarnings=!1,this.chartDataModel=e,this.seriesChartTypes=e.params.seriesChartTypes??[]}postConstruct(){this.initComboCharts()}update(e){this.seriesChartTypes=e??this.seriesChartTypes,this.initComboCharts(),this.updateSeriesChartTypes()}initComboCharts(){let e=this.seriesChartTypes&&this.seriesChartTypes.length>0;("customCombo"===this.chartDataModel.chartType||e)&&(this.chartDataModel.chartType="customCombo",this.savedCustomSeriesChartTypes=this.seriesChartTypes||[])}updateSeriesChartTypes(){if(this.chartDataModel.isComboChart()){if(this.seriesChartTypes=this.seriesChartTypes.map(e=>{let t=["groupedColumn","stackedColumn","stackedArea"].includes(e.chartType);return e.secondaryAxis=!t&&e.secondaryAxis,e}),"customCombo"===this.chartDataModel.chartType){this.updateSeriesChartTypesForCustomCombo();return}this.updateChartSeriesTypesForBuiltInCombos()}}updateSeriesChartTypesForCustomCombo(){this.seriesChartTypes&&this.seriesChartTypes.length>0||this.suppressComboChartWarnings||tO("'seriesChartTypes' are required when the 'customCombo' chart type is specified."),this.seriesChartTypes=this.seriesChartTypes.map(t=>(e.SUPPORTED_COMBO_CHART_TYPES.includes(t.chartType)||(tO(`invalid chartType '${t.chartType}' supplied in 'seriesChartTypes', converting to 'line' instead.`),t.chartType="line"),t));let t=this.chartDataModel.valueColState.map(e=>(this.savedCustomSeriesChartTypes&&0!==this.savedCustomSeriesChartTypes.length||(this.savedCustomSeriesChartTypes=this.seriesChartTypes),this.savedCustomSeriesChartTypes.find(t=>t.colId===e.colId)||(e.selected&&!this.suppressComboChartWarnings&&tO(`no 'seriesChartType' found for colId = '${e.colId}', defaulting to 'line'.`),{colId:e.colId,chartType:"line",secondaryAxis:!1})));this.seriesChartTypes=t,this.savedCustomSeriesChartTypes=t,this.suppressComboChartWarnings=!0}updateChartSeriesTypesForBuiltInCombos(){let{chartType:e,valueColState:t}=this.chartDataModel,i="columnLineCombo"===e?"groupedColumn":"stackedArea",r="columnLineCombo"===e?"line":"groupedColumn",s=t.filter(e=>e.selected),a=Math.ceil(s.length/2);this.seriesChartTypes=s.map((e,t)=>({colId:e.colId,chartType:t>=a?r:i,secondaryAxis:!1}))}};TY.SUPPORTED_COMBO_CHART_TYPES=["line","groupedColumn","stackedColumn","area","stackedArea"];var TK=class e extends i2{constructor(e){super(),this.unlinked=!1,this.chartData=[],this.valueColState=[],this.dimensionColState=[],this.columnNames={},this.crossFiltering=!1,this.grouping=!1,this.params=e,this.chartId=e.chartId,this.setParams(e)}wireBeans(e){this.rangeService=e.rangeService,this.chartTranslationService=e.chartTranslationService}setParams(e){let{chartType:t,pivotChart:i,chartThemeName:r,switchCategorySeries:s,aggFunc:a,cellRange:o,suppressChartRanges:n,unlinkChart:l,crossFiltering:h,seriesGroupType:d}=e;this.chartType=t,this.pivotChart=i??!1,this.chartThemeName=r,this.switchCategorySeries=!!s,this.aggFunc=a,this.referenceCellRange=o,this.suppliedCellRange=o,this.suppressChartRanges=n??!1,this.unlinked=!!l,this.crossFiltering=!!h,this.seriesGroupType=d}postConstruct(){this.datasource=this.createManagedBean(new TW),this.chartColumnService=this.createManagedBean(new T$),this.comboChartModel=this.createManagedBean(new TY(this)),this.updateCellRanges({setColsFromRange:!0}),this.updateData()}updateModel(e){let{cellRange:t,seriesChartTypes:i}=e;t!==this.suppliedCellRange&&(this.dimensionCellRange=void 0,this.valueCellRange=void 0),this.setParams(e),this.updateSelectedDimensions(t?.columns),this.updateCellRanges({setColsFromRange:!0}),(this.isComboChart()||i)&&this.comboChartModel.update(i),this.unlinked||this.updateData()}updateCellRanges(e){let{updatedColState:t,resetOrder:i,maintainColState:r,setColsFromRange:s}=e??{};this.valueCellRange&&(this.referenceCellRange=this.valueCellRange);let{dimensionCols:a,valueCols:o}=this.chartColumnService.getChartColumns(),n=this.getAllColumnsFromRanges();t&&this.updateColumnState(t,i),this.setDimensionCellRange(a,n,t),this.setValueCellRange(o,n,s),t||r||(this.resetColumnState(),this.syncDimensionCellRange()),this.comboChartModel.updateSeriesChartTypes()}updateData(){let{startRow:e,endRow:t}=this.getRowIndexes();this.pivotChart&&this.resetColumnState(),this.grouping=this.isGrouping();let i={aggFunc:this.aggFunc,dimensionCols:this.getSelectedDimensions(),grouping:this.grouping,pivoting:this.isPivotActive(),crossFiltering:this.crossFiltering,valueCols:this.getSelectedValueCols(),startRow:e,endRow:t,isScatter:iU(["scatter","bubble"],this.chartType)},{chartData:r,columnNames:s,groupChartData:a}=this.datasource.getData(i);this.chartData=r,this.groupChartData=a,this.columnNames=s,this.categoryAxisType=void 0}isGrouping(){let e=this.gos.get("treeData"),t=e?null:this.chartColumnService.getRowGroupColumns(),i=e||t&&t.length>0,r=this.getSelectedDimensions().map(({colId:e})=>e),s=this.chartColumnService.getGroupDisplayColumns().map(e=>e.getColId()).some(e=>r.includes(e));return!!i&&s}getSelectedValueCols(){return this.valueColState.filter(e=>e.selected).map(e=>e.column)}getSelectedDimensions(){return this.dimensionColState.filter(e=>e.selected)}getColDisplayName(e,t){return this.chartColumnService.getColDisplayName(e,t)}isPivotMode(){return this.chartColumnService.isPivotMode()}getChartDataType(e){let t=this.chartColumnService.getColumn(e);return t?t.getColDef().chartDataType:void 0}isPivotActive(){return this.chartColumnService.isPivotActive()}createCellRange(e,...t){return{id:this.chartId,startRow:this.referenceCellRange.startRow,endRow:this.referenceCellRange.endRow,columns:t,startColumn:e===n4.DIMENSION||null==this.referenceCellRange.startColumn?t[0]:this.referenceCellRange.startColumn,type:e}}getAllColumnsFromRanges(){if(this.pivotChart)return new Set(this.chartColumnService.getAllDisplayedColumns());let e=this.dimensionCellRange||this.valueCellRange?[]:this.referenceCellRange.columns;return this.dimensionCellRange&&e.push(...this.dimensionCellRange.columns),this.valueCellRange&&e.push(...this.valueCellRange.columns),new Set(e)}getRowIndexes(){let e=0,t=0,{rangeService:i,valueCellRange:r,dimensionCellRange:s}=this,a=r||s;if(i&&a){e=i.getRangeStartRow(a).rowIndex;let r=i.getRangeEndRow(a);t="bottom"===r.rowPinned?-1:r.rowIndex}return{startRow:e,endRow:t}}resetColumnState(){let{dimensionCols:t,valueCols:i}=this.chartColumnService.getChartColumns(),r=this.getAllColumnsFromRanges(),s=this.valueColState.length<1;this.dimensionColState=[],this.valueColState=[];let a=Tn(Td(this.chartType)),o=!1,n=1,l=this.suppliedCellRange.columns[0];t.forEach(e=>{let t="ag-Grid-AutoColumn"===e.getColId(),i=!1;this.crossFiltering&&this.aggFunc?l.getColId()===e.getColId()&&(i=!0):i=!!t||(!o||a)&&r.has(e),this.dimensionColState.push({column:e,colId:e.getColId(),displayName:this.getColDisplayName(e),selected:i,order:n++}),i&&(o=!0)});let h={colId:e.DEFAULT_CATEGORY,displayName:this.chartTranslationService.translate("defaultCategory"),selected:!o,order:0};this.dimensionColState.unshift(h);let d=this.referenceCellRange.columns.filter(e=>i.has(e));i.forEach(e=>{s&&iU(this.referenceCellRange.columns,e)&&(e=d.shift()),this.valueColState.push({column:e,colId:e.getColId(),displayName:this.getColDisplayName(e),selected:r.has(e),order:n++})})}updateColumnState(e,t){let i=t=>t.colId===e.colId,{dimensionColState:r,valueColState:s}=this,a=r.find(i),o=s.find(i);if(a){if(Tn(Td(this.chartType)))a.selected=e.selected;else{let t=e.selected?a:r.filter(e=>e!==a).find(({selected:e})=>e);r.forEach(e=>e.selected=e===t)}}else o&&(o.selected=e.selected);let n=[...r,...s],l=[];t||(n.forEach((t,i)=>{i===e.order&&l.push(e.colId),t.colId!==e.colId&&l.push(t.colId)}),n.forEach(e=>{let t=l.indexOf(e.colId);e.order=t>=0?l.indexOf(e.colId):n.length-1})),this.reorderColState()}reorderColState(){let e=(e,t)=>e.order-t.order;this.dimensionColState.sort(e),this.valueColState.sort(e)}setDimensionCellRange(t,i,r){this.dimensionCellRange=void 0;let s=Tn(Td(this.chartType));if(!r&&!this.dimensionColState.length){let e=[];t.forEach(t=>{(!(e.length>0)||s)&&i.has(t)&&e.push(t)}),e.length>0&&(this.dimensionCellRange=this.createCellRange(n4.DIMENSION,...e));return}let a=r?[r]:[];if(this.crossFiltering&&this.aggFunc){let e=this.suppliedCellRange.columns[0];a=this.dimensionColState.filter(t=>t.colId===e.getColId())}else(s||0===a.length||a.some(({column:e})=>!e||!t.has(e)))&&(a=this.dimensionColState.filter(e=>e.selected));let o=1===a.length&&a[0].colId===e.DEFAULT_CATEGORY,n=a.map(({column:e})=>e).filter(e=>null!=e);n.length>0&&!o&&(this.dimensionCellRange=this.createCellRange(n4.DIMENSION,...n))}setValueCellRange(e,t,i){this.valueCellRange=void 0;let r=[],s=Tp(this.chartType),a=0;if(e.forEach(e=>{i?(null==s||a<s)&&t.has(e)&&(r.push(e),a++):this.valueColState.some(t=>t.selected&&t.colId===e.getColId())&&r.push(e)}),r.length>0){let e=[];this.valueColState.length>0?e=this.valueColState.map(e=>e.colId):t.forEach(t=>e.push(t.getColId())),r.sort((t,i)=>e.indexOf(t.getColId())-e.indexOf(i.getColId())),this.valueCellRange=this.createCellRange(n4.VALUE,...r)}}resetCellRanges(e,t){if(!e&&!t)return;let{dimensionCols:i,valueCols:r}=this.chartColumnService.getChartColumns(),s=this.getAllColumnsFromRanges();e&&this.setDimensionCellRange(i,s),t&&this.setValueCellRange(r,s)}updateSelectedDimensions(e){let t=new Set(e.map(e=>e.getColId()));if(Tn(Td(this.chartType))){let e=new Set(this.dimensionColState.filter(e=>t.has(e.colId)).map(e=>e.colId));this.dimensionColState=this.dimensionColState.map(t=>({...t,selected:e.has(t.colId)}))}else{let e=(this.dimensionColState.find(e=>t.has(e.colId))||this.dimensionColState[0]).colId;this.dimensionColState=this.dimensionColState.map(t=>({...t,selected:t.colId===e}))}}syncDimensionCellRange(){let e=this.getSelectedDimensions();if(0===e.length)return;let t=e.map(({column:e})=>e).filter(e=>null!=e);t.length>0&&(this.dimensionCellRange=this.createCellRange(n4.DIMENSION,...t))}isComboChart(e){return Ti(e??this.chartType)}};TK.DEFAULT_CATEGORY="AG-GRID-DEFAULT-CATEGORY";var TZ=TK,Tq=e=>t=>void 0==t||e(t),TX=e=>"string"==typeof e,TQ=e=>"boolean"==typeof e,TJ=e=>"object"==typeof e,T0=(e,t)=>i=>`AG Grid - unable to update chart as invalid params supplied:  \`${e}: ${i}\`, expected ${t}.`,T1=e=>`${e} is not supported in AG Charts Community (either 'ag-grid-charts-enterprise' or '@ag-grid-enterprise/charts-enterprise' hasn't been loaded). See https://www.ag-grid.com/javascript-data-grid/integrated-charts-installation/ for more details.`,T2=class e{static isEnterprise(){return Iy.enterpriseModule.isEnterprise}static isValidChartType(e){return!!Th(e)||Ti(e)}static isLegacyChartType(t){return e.legacyChartTypes.includes(t)}static validateUpdateParams(t){switch(t.type){case"rangeChartUpdate":return e.validateUpdateRangeChartParams(t);case"pivotChartUpdate":return e.validateUpdatePivotChartParams(t);case"crossFilterChartUpdate":return e.validateUpdateCrossFilterChartParams(t);default:return tO(`Invalid value supplied for 'type': ${t.type}. It must be either 'rangeChartUpdate', 'pivotChartUpdate', or 'crossFilterChartUpdate'.`),!1}}static validateCreateParams(t){return T3(t,[e.enterpriseChartTypeValidation,e.switchCategorySeriesValidation])}static validateUpdateRangeChartParams(t){return T3(t,[...e.commonUpdateValidations,e.enterpriseChartTypeValidation,...e.cellRangeValidations,{property:"seriesChartTypes",validationFn:e=>void 0===e||Array.isArray(e)&&e.every(TJ),warnMessage:T0("seriesChartTypes","Array of SeriesChartType")}],[...e.baseUpdateChartParams,"cellRange","suppressChartRanges","switchCategorySeries","aggFunc","seriesChartTypes","seriesGroupType"],"UpdateRangeChartParams")}static validateUpdatePivotChartParams(t){return T3(t,[...e.commonUpdateValidations],[...e.baseUpdateChartParams],"UpdatePivotChartParams")}static validateUpdateCrossFilterChartParams(t){return T3(t,[...e.commonUpdateValidations,...e.cellRangeValidations],[...e.baseUpdateChartParams,"cellRange","suppressChartRanges","aggFunc"],"UpdateCrossFilterChartParams")}};function T3(e,t,i,r){let s;for(let i of t){let{property:t,validationFn:r,warnMessage:a,warnIfFixed:o}=i;if(t in e){let i=e[t],n=r(i);if(!0===n)continue;if(!1===n)return tO(a(i)),!1;(s=s||{...e})[t]=n,o&&tO(a(i))}}if(i){for(let t in e)if(!i.includes(t))return tO(`Unexpected property supplied. ${r} does not contain: \`${t}\`.`),!1}return!s||s}T2.legacyChartTypes=["doughnut"],T2.baseUpdateChartParams=["type","chartId","chartType","chartThemeName","chartThemeOverrides","unlinkChart"],T2.validateChartType=Tq(e=>{if(T2.isValidChartType(e))return!0;if(T2.isLegacyChartType(e)){let t=Tl(e);return tO(`The chart type '${e}' has been deprecated. Please use '${t}' instead.`),t}return!1}),T2.validateAgChartThemeOverrides=Tq(e=>"object"==typeof e),T2.validateChartParamsCellRange=Tq(e=>"object"==typeof e),T2.validateAggFunc=Tq(e=>"string"==typeof e||"function"==typeof e),T2.enterpriseChartTypeValidation={property:"chartType",validationFn:Tq(e=>T2.isEnterprise()||!e||!Tr(Td(e),"isEnterprise")),warnMessage:e=>T1(`The '${e}' chart type`)},T2.switchCategorySeriesValidation={property:"switchCategorySeries",validationFn:Tq(e=>{if(!e||T2.isEnterprise())return!0}),warnMessage:()=>T1("'switchCategorySeries' has been ignored as it"),warnIfFixed:!0},T2.commonUpdateValidations=[{property:"chartId",validationFn:TX,warnMessage:T0("chartId","string")},{property:"chartType",validationFn:T2.validateChartType,warnMessage:T0("chartType","ChartType")},{property:"chartThemeName",validationFn:TX,warnMessage:T0("chartThemeName","string")},{property:"chartThemeOverrides",validationFn:T2.validateAgChartThemeOverrides,warnMessage:T0("chartThemeOverrides","AgChartThemeOverrides")},{property:"unlinkChart",validationFn:TQ,warnMessage:T0("unlinkChart","boolean")}],T2.cellRangeValidations=[{property:"cellRange",validationFn:T2.validateChartParamsCellRange,warnMessage:T0("cellRange","ChartParamsCellRange")},{property:"suppressChartRanges",validationFn:TQ,warnMessage:T0("suppressChartRanges","boolean")},{property:"aggFunc",validationFn:T2.validateAggFunc,warnMessage:T0("aggFunc","string or IAggFunc")},T2.switchCategorySeriesValidation];var T4=["ag-default","ag-material","ag-sheets","ag-polychroma","ag-vivid"],T6=class extends i2{constructor(e){super(),this.model=e,this.isEnterprise=()=>Iy.enterpriseModule.isEnterprise}wireBeans(e){this.rangeService=e.rangeService}postConstruct(){this.setChartRange(),this.model.unlinked&&this.rangeService&&this.rangeService.setCellRanges([]);let e=this.updateForGridChange.bind(this,{});this.addManagedEventListeners({cellSelectionChanged:e=>{e.id&&e.id===this.model.chartId&&this.updateForRangeChange()},columnMoved:e,columnPinned:e,columnVisible:e,columnRowGroupChanged:e,modelUpdated:e,cellValueChanged:this.updateForDataChange.bind(this)})}update(e){if(!this.validUpdateType(e))return!1;let t=T2.validateUpdateParams(e);if(!t)return!1;let i=!0===t?e:t;return this.applyValidatedChartParams(i),!0}applyValidatedChartParams(e){let{chartId:t,chartType:i,chartThemeName:r,unlinkChart:s}=e,a={chartId:t,pivotChart:this.model.pivotChart,chartType:i??this.model.chartType,chartThemeName:r??this.model.chartThemeName,unlinkChart:s??this.model.unlinked,cellRange:this.model.suppliedCellRange,switchCategorySeries:this.model.switchCategorySeries,aggFunc:this.model.aggFunc,seriesChartTypes:void 0,suppressChartRanges:!1,crossFiltering:!1};switch(e.type){case"rangeChartUpdate":a.cellRange=this.createCellRange(e)??this.model.suppliedCellRange,a.switchCategorySeries=e.switchCategorySeries??this.model.switchCategorySeries,a.aggFunc=e.aggFunc??this.model.aggFunc,a.seriesChartTypes=e.seriesChartTypes,a.suppressChartRanges=e.suppressChartRanges??this.model.suppressChartRanges,a.seriesGroupType=e.seriesGroupType??this.model.seriesGroupType;break;case"crossFilterChartUpdate":a.cellRange=this.createCellRange(e)??this.model.suppliedCellRange,a.switchCategorySeries=!1,a.aggFunc=e.aggFunc??this.model.aggFunc,a.crossFiltering=!0,a.suppressChartRanges=e.suppressChartRanges??this.model.suppressChartRanges;break;case"pivotChartUpdate":a.switchCategorySeries=!1}this.model.updateModel(a),a.unlinkChart||a.suppressChartRanges?this.rangeService?.setCellRanges([]):this.setChartRange()}updateForGridChange(e){if(this.model.unlinked)return;let{maintainColState:t,setColsFromRange:i}=e??{};this.model.updateCellRanges({maintainColState:t,setColsFromRange:i}),this.model.updateData(),this.setChartRange()}updateForDataChange(){this.model.unlinked||(this.model.updateData(),this.raiseChartModelUpdateEvent())}updateForRangeChange(){this.updateForGridChange({setColsFromRange:!0}),this.raiseChartRangeSelectionChangedEvent()}updateForPanelChange(e){this.model.updateCellRanges(e),this.model.updateData(),e.skipAnimation&&this.getChartProxy().getChartRef().skipAnimations(),this.setChartRange(),this.raiseChartRangeSelectionChangedEvent()}updateThemeOverrides(e){this.chartProxy.updateThemeOverrides(e)}getChartUpdateParams(e){let t=this.getSelectedValueColState().map(e=>({colId:e.colId,displayName:e.displayName})),i=this.getChartData(),r=this.getSelectedDimensions(),s={data:i,groupData:this.model.groupChartData,grouping:this.isGrouping(),categories:r.map(e=>({id:e.colId,name:e.displayName,chartDataType:this.model.categoryAxisType??this.model.getChartDataType(e.colId)})),fields:t,chartId:this.getChartId(),getCrossFilteringContext:()=>({lastSelectedChartId:"xxx"}),seriesChartTypes:this.getSeriesChartTypes(),updatedOverrides:e,seriesGroupType:this.model.seriesGroupType};return this.isCategorySeriesSwitched()?this.invertCategorySeriesParams(s):s}invertCategorySeriesParams(e){let[t]=e.categories,i=[{id:TZ.DEFAULT_CATEGORY,name:""}],r=e.data.map((e,i)=>{let r=`${t.id}:${i}`,s=e[t.id];return{colId:r,displayName:null==s?"":String(s)}}),s=e.fields.map(i=>{let r={[TZ.DEFAULT_CATEGORY]:i.displayName};for(let[s,a]of e.data.entries()){let e=`${t.id}:${s}`,o=a[i.colId];r[e]=o}return r});return{...e,categories:i,fields:r,data:s}}getChartModel(){let e=this.model.pivotChart?"pivot":"range",t=this.isComboChart()?this.model.comboChartModel.seriesChartTypes:void 0;return{modelType:e,chartId:this.model.chartId,chartType:this.model.chartType,chartThemeName:this.getChartThemeName(),chartOptions:this.chartProxy.getChartThemeOverrides(),chartPalette:this.chartProxy.getChartPalette(),cellRange:this.getCellRangeParams(),switchCategorySeries:this.model.switchCategorySeries,suppressChartRanges:this.model.suppressChartRanges,aggFunc:this.model.aggFunc,unlinkChart:this.model.unlinked,seriesChartTypes:t,seriesGroupType:this.model.seriesGroupType}}getChartId(){return this.model.chartId}getChartData(){return this.model.chartData}getChartType(){return this.model.chartType}setChartType(e){this.updateMultiSeriesAndCategory(this.model.chartType,e),this.model.chartType=e,this.model.comboChartModel.updateSeriesChartTypes(),this.model.switchCategorySeries=!1,this.model.categoryAxisType=void 0,this.model.seriesGroupType=void 0,this.raiseChartModelUpdateEvent(),this.raiseChartOptionsChangedEvent()}isCategorySeriesSwitched(){return this.model.switchCategorySeries&&!this.model.isGrouping()}switchCategorySeries(e){Tg(this.getChartType())&&(this.model.switchCategorySeries=e,this.raiseChartModelUpdateEvent())}getAggFunc(){return this.model.aggFunc}setAggFunc(e,t){this.model.aggFunc!==e&&(this.model.aggFunc=e,t||(this.model.updateData(),this.raiseChartModelUpdateEvent()))}updateMultiSeriesAndCategory(e,t){let i=(e,t)=>{let i=0;for(let r of e)r.selected&&(i>=t?r.selected=!1:i++);0===i&&(e[0].selected=!0)},r=Tu(t),s=Tp(t),a=null!=r&&(Tu(e)??100)>(r??100),o=null!=s&&(Tp(e)??100)>(s??100);a&&i(this.model.dimensionColState,r),o&&i(this.model.valueColState,s),(a||o)&&(this.model.resetCellRanges(a,o),this.setChartRange(!0))}setChartThemeName(e,t){this.model.chartThemeName=e,t||(this.raiseChartModelUpdateEvent(),this.raiseChartOptionsChangedEvent())}getChartThemeName(){return this.model.chartThemeName}isPivotChart(){return this.model.pivotChart}isPivotMode(){return this.model.isPivotMode()}isGrouping(){return this.model.isGrouping()}isCrossFilterChart(){return this.model.crossFiltering}getThemeNames(){return this.gos.get("chartThemes")||T4}getThemes(){return this.getThemeNames().map(e=>{let t=Tj(e)?e:this.chartProxy.lookupCustomChartTheme(e);return Ip.getChartTheme(t)})}getPalettes(){return this.getThemes().map(e=>e.palette)}getThemeTemplateParameters(){return this.getThemes().map(e=>e.getTemplateParameters())}getValueColState(){return this.model.valueColState.map(this.displayNameMapper.bind(this))}getSelectedValueColState(){return this.getValueColState().filter(e=>e.selected)}getSelectedDimensions(){return this.model.getSelectedDimensions()}displayNameMapper(e){let{column:t}=e;if(t)e.displayName=this.model.getColDisplayName(t,this.model.isPivotMode());else{let i=this.model.columnNames[e.colId];e.displayName=i?i.join(" - "):this.model.getColDisplayName(t)}return e}getColStateForMenu(){return{dimensionCols:this.model.dimensionColState,valueCols:this.getValueColState()}}setChartRange(e=!1){!this.rangeService||this.model.suppressChartRanges||this.model.unlinked||this.rangeService.setCellRanges(this.getCellRanges()),e||this.raiseChartModelUpdateEvent()}detachChartRange(){this.model.unlinked=!this.model.unlinked,this.model.unlinked?this.rangeService&&this.rangeService.setCellRanges([]):this.updateForGridChange(),this.dispatchLocalEvent({type:"chartLinkedChanged"})}setChartProxy(e){this.chartProxy=e}getChartProxy(){return this.chartProxy}isActiveXYChart(){return["scatter","bubble"].includes(this.getChartType())}isChartLinked(){return!this.model.unlinked}customComboExists(){let e=this.model.comboChartModel.savedCustomSeriesChartTypes;return e&&e.length>0}getSeriesChartTypes(){return this.model.comboChartModel.seriesChartTypes}isComboChart(e){return this.model.isComboChart(e)}updateSeriesChartType(e,t,i){let r=this.model.comboChartModel.seriesChartTypes.find(t=>t.colId===e);if(r){let e="customCombo"!==this.model.chartType;e&&(this.model.chartType="customCombo");let s=r.chartType;null!=t&&(r.chartType=t),null!=i&&(r.secondaryAxis=i),this.model.comboChartModel.savedCustomSeriesChartTypes=this.model.comboChartModel.seriesChartTypes,this.model.comboChartModel.updateSeriesChartTypes(),this.updateForDataChange(),e&&this.dispatchLocalEvent({type:"chartTypeChanged"}),s!==t&&this.dispatchLocalEvent({type:"chartSeriesChartTypeChanged"}),this.raiseChartOptionsChangedEvent()}}getActiveSeriesChartTypes(){let e=this.getSelectedValueColState().map(e=>e.colId);return this.getSeriesChartTypes().filter(t=>e.includes(t.colId))}getChartSeriesTypes(e){let t=e??this.getChartType();return this.isComboChart(t)?["line","bar","area"]:[Td(t)]}getChartSeriesType(){let e=this.getSeriesChartTypes();if(0===e.length)return"bar";let t=e[0].chartType;return"columnLineCombo"===t?"bar":"areaColumnCombo"===t?"area":Td(t)}getCellRanges(){return[this.model.dimensionCellRange,this.model.valueCellRange].filter(e=>e)}createCellRange(e){return e.cellRange&&this.rangeService?.createPartialCellRangeFromRangeParams(e.cellRange,!0)}validUpdateType(e){if(!e.type)return tO("Unable to update chart as the 'type' is missing. It must be either 'rangeChartUpdate', 'pivotChartUpdate', or 'crossFilterChartUpdate'."),!1;let t={"Range Chart":()=>!this.isPivotChart()&&!this.isCrossFilterChart(),"Pivot Chart":()=>this.isPivotChart(),"Cross Filter Chart":()=>this.isCrossFilterChart()},i=Object.keys(t).find(e=>t[e]())??"Range Chart",r=e.type===`${i[0].toLowerCase()}${i.slice(1).replace(/ /g,"")}Update`;return r||tO(`Unable to update chart as a '${e.type}' update type is not permitted on a ${i}.`),r}getCellRangeParams(){let e=this.getCellRanges(),t=e[0],i=t&&t.startRow||null,r=t&&t.endRow||null;return{rowStartIndex:i&&i.rowIndex,rowStartPinned:i&&i.rowPinned,rowEndIndex:r&&r.rowIndex,rowEndPinned:r&&r.rowPinned,columns:e.reduce((e,t)=>e.concat(t.columns.map(e=>e.getId())),[])}}setCategoryAxisType(e){this.model.categoryAxisType=e,this.raiseChartModelUpdateEvent()}getSeriesGroupType(){return this.model.seriesGroupType??this.chartProxy.getSeriesGroupType()}setSeriesGroupType(e){this.model.seriesGroupType=e,this.raiseChartModelUpdateEvent()}raiseChartModelUpdateEvent(){this.dispatchLocalEvent({type:"chartModelUpdate"})}raiseChartUpdatedEvent(){this.dispatchLocalEvent({type:"chartUpdated"})}raiseChartApiUpdateEvent(){this.dispatchLocalEvent({type:"chartApiUpdate"})}raiseChartOptionsChangedEvent(){let{chartId:e,chartType:t}=this.getChartModel();this.eventService.dispatchEvent({type:"chartOptionsChanged",chartId:e,chartType:t,chartThemeName:this.getChartThemeName(),chartOptions:this.chartProxy.getChartThemeOverrides()})}raiseChartRangeSelectionChangedEvent(){this.eventService.dispatchEvent({type:"chartRangeSelectionChanged",id:this.model.chartId,chartId:this.model.chartId,cellRange:this.getCellRangeParams()})}destroy(){super.destroy(),this.rangeService&&this.rangeService.setCellRanges([])}};function T5(e){return null!=e.chart?e.chart:e}var T8=class{constructor(e){this.chartProxyParams=e,this.clearThemeOverrides=!1,this.isEnterpriseCharts=Iy.enterpriseModule.isEnterprise,this.chart=e.chartInstance,this.chartType=e.chartType,this.crossFiltering=e.crossFiltering,this.crossFilterCallback=e.crossFilterCallback,this.standaloneChartType=Td(this.chartType),null==this.chart?this.chart=D7.create(this.getCommonChartOptions()):this.clearThemeOverrides=!0}crossFilteringReset(){}update(e){this.getChartRef().update(this.getUpdateOptions(e,this.getCommonChartOptions(e.updatedOverrides)))}updateThemeOverrides(e){this.getChartRef().updateDelta({theme:{overrides:e}})}getChart(){return T5(this.chart)}getChartRef(){return this.chart}downloadChart(e,t,i){let{chart:r}=this,s=T5(r),a=t||(s.title?s.title.text:"chart"),{width:o,height:n}=e||{};r.download({width:o,height:n,fileName:a,fileFormat:i})}getChartImageDataURL(e){return this.getChart().getCanvasDataURL(e)}getChartOptions(){return this.chart.getOptions()}getChartThemeOverrides(){return this.getChartOptions().theme.overrides??{}}getChartPalette(){return Ip.getChartTheme(this.getChartOptions().theme).palette}setPaired(e){let t=Td(this.chartProxyParams.chartType);this.chart.updateDelta({theme:{overrides:{[t]:{paired:e}}}})}isPaired(){let e=Td(this.chartProxyParams.chartType);return TV(this.getChartThemeOverrides(),`${e}.paired`,!0)}lookupCustomChartTheme(e){return TU(this.chartProxyParams,e)}getSeriesGroupType(){}transformCategoryData(e,t){return e.map((e,i)=>{let r=e[t],s=r&&r.toString?r.toString():"",a={...e};return a[t]={id:i,value:r,toString:()=>s},a})}getCommonChartOptions(e){let t=this.clearThemeOverrides?{}:this.chart?.getOptions()??{},i=null!=this.chart?this.getActiveFormattingPanelOverrides():void 0;this.clearThemeOverrides=!1;let r=function(e,t,i,r,s){let{chartOptionsToRestore:a,chartPaletteToRestore:o,chartThemeToRestore:n}=e,l=function(e){let t=e.getChartThemeName(),i=e.getChartThemes();return iU(i,t)||(t=i[0]),t}(e),h=Tj(l),d=h?{baseTheme:l}:TU(e,l)??{},c=e.getGridOptionsChartThemeOverrides(),u=e.apiChartThemeOverrides,p=Td(e.chartType),g=e.crossFiltering?{[p]:{tooltip:{delay:500},legend:{listeners:{legendItemClick:e=>{t.getChart().series.forEach(t=>{t.toggleSeriesItem(e.itemId,e.enabled),t.toggleSeriesItem(`${e.itemId}-filtered-out`,e.enabled)})}}},listeners:{click:t=>e.crossFilterCallback(t,!0)}}}:void 0,m=[h?function(e,t,i){let r=e.getExtraPaddingDirections();return{common:{...t?{animation:{duration:500}}:void 0,axes:TH,padding:{top:!i&&r.includes("top")?40:20,right:r.includes("right")?30:20,bottom:r.includes("bottom")?40:20,left:r.includes("left")?30:20}}}}(e,i,(()=>{let e=e=>!!e&&Object.keys(e).some(t=>TV(e[t],"title.enabled",!1));return e(c)||e(u)})()):void 0,{pie:{series:{title:{_enabledFromTheme:!0},calloutLabel:{_enabledFromTheme:!0},sectorLabel:{enabled:!1,_enabledFromTheme:!0}}},donut:{series:{title:{_enabledFromTheme:!0},calloutLabel:{_enabledFromTheme:!0},sectorLabel:{enabled:!1,_enabledFromTheme:!0}}}},r,g,c,u,{...a??{}},s].filter(e=>!!e).reduce((e,t)=>({baseTheme:e,overrides:t}),d);return o&&l===n&&!function(e,t){let i=(e,t)=>e===t||e?.length===t?.length&&(e?.every((e,i)=>e===t?.[i])??!1);return i(e.fills,t.fills)&&i(e.strokes,t.strokes)}(o,Ip.getChartTheme(d).palette)&&(m.palette=o),m}(this.chartProxyParams,this,this.isEnterpriseCharts,this.getChartThemeDefaults(),e??i),s={...t,mode:"integrated"};return s.theme=r,s.container=this.chartProxyParams.parentElement,s}getChartThemeDefaults(){let e=this.getSeriesChartThemeDefaults(),t=e?{[this.standaloneChartType]:e}:{},i={enabled:!0,snap:!0,label:{enabled:!1}},r=this.isEnterpriseCharts?{zoom:{enabled:!0},animation:{enabled:!0,duration:500},axes:{number:{crosshair:i},category:{crosshair:i},log:{crosshair:i},time:{crosshair:i}}}:{};return r.minHeight=0,r.minWidth=0,r.navigator={enabled:!1},{common:r,...t}}getSeriesChartThemeDefaults(){}getActiveFormattingPanelOverrides(){if(this.clearThemeOverrides)return{};let e=this.chart?.getOptions().theme;return e?.overrides??{}}destroy({keepChartInstance:e=!1}={}){if(e)return this.chart.resetAnimations(),this.chart;this.destroyChart()}destroyChart(){this.chart&&(this.chart.destroy(),this.chart=void 0)}},T7=class extends T8{constructor(e){super(e),this.crossFilteringAllPoints=new Set,this.crossFilteringSelectedPoints=[]}getUpdateOptions(e,t){let i=this.getAxes(e,t);return{...t,data:this.getData(e,i),axes:i,series:this.getSeries(e)}}getData(e,t){let i=["area","line"].includes(this.standaloneChartType);return this.crossFiltering&&i?this.getCrossFilterData(e):this.getDataTransformedData(e,t)}getDataTransformedData(e,t){let i=t[0].type,{categories:r,data:s}=e,[a]=r;switch(i){case"category":return this.transformCategoryData(s,a.id);case"time":return this.transformTimeData(s,a.id);default:return s}}getXAxisType(e){return e.grouping?"grouped-category":this.isXAxisOfType(e,"time",e=>e instanceof Date)?"time":this.isXAxisOfType(e,"number")?"number":"category"}isXAxisOfType(e,t,i){let[r]=e.categories;if(r?.chartDataType)return r.chartDataType===t;if(!i)return!1;let s=e.data[0];return!!s&&i(s[r.id])}transformTimeData(e,t){return e[0]?.[t] instanceof Date?e:e.map(e=>{let i=e[t];return"string"==typeof i?{...e,[t]:new Date(i)}:e})}crossFilteringReset(){this.crossFilteringSelectedPoints=[],this.crossFilteringAllPoints.clear()}crossFilteringPointSelected(e){return 0==this.crossFilteringSelectedPoints.length||this.crossFilteringSelectedPoints.includes(e)}crossFilteringDeselectedPoints(){return this.crossFilteringSelectedPoints.length>0&&this.crossFilteringAllPoints.size!==this.crossFilteringSelectedPoints.length}extractLineAreaCrossFilterSeries(e,t){let[i]=t.categories,r=e=>"area"===this.standaloneChartType?t.getCrossFilteringContext().lastSelectedChartId===t.chartId?e+"-total":e:e+"-total";return e.map(e=>(e.yKey=r(e.yKey),e.listeners={nodeClick:t=>{let i=t.datum[e.xKey],r=t.event.metaKey||t.event.ctrlKey;this.crossFilteringAddSelectedPoint(r,i),this.crossFilterCallback(t)}},e.marker={itemStyler:e=>{let t=e.datum[i.id];return{fill:e.highlighted?"yellow":e.fill,size:e.highlighted?14:this.crossFilteringPointSelected(t)?8:0}}},"area"===this.standaloneChartType&&(e.fillOpacity=this.crossFilteringDeselectedPoints()?.3:1),"line"===this.standaloneChartType&&(e.strokeOpacity=this.crossFilteringDeselectedPoints()?.3:1),e))}getCrossFilterData(e){this.crossFilteringAllPoints.clear();let[t]=e.categories,i=e.fields[0].colId,r=`${i}-filtered-out`,s=e.getCrossFilteringContext().lastSelectedChartId;return e.data.map(a=>{let o=a[t.id];this.crossFilteringAllPoints.add(o);let n=this.crossFilteringPointSelected(o);return"area"===this.standaloneChartType&&s===e.chartId&&(a[`${i}-total`]=n?a[i]:a[i]+a[r]),"line"===this.standaloneChartType&&(a[`${i}-total`]=n?a[i]:a[i]+a[r]),a})}crossFilteringAddSelectedPoint(e,t){e?this.crossFilteringSelectedPoints.push(t):this.crossFilteringSelectedPoints=[t]}isHorizontal(e){let t=this.standaloneChartType;if("waterfall"!==t&&"box-plot"!==t&&"range-bar"!==t)return!1;let i=e.theme,r=e=>{let i=e?.overrides?.[t]?.series?.direction;return null!=i?"horizontal"===i:"object"==typeof e?.baseTheme&&r(e.baseTheme)};return r(i)}},T9=class extends T7{constructor(e){super(e)}getAxes(e){let t=[{type:this.getXAxisType(e),position:"bottom"},{type:"number",position:"left"}];if(this.isNormalised()){let e=t[1];e.label={...e.label,formatter:e=>Math.round(e.value)+"%"}}return t}getSeries(e){let[t]=e.categories,i=e.fields.map(e=>({type:this.standaloneChartType,xKey:t.id,xName:t.name,yKey:e.colId,yName:e.displayName,normalizedTo:"normalizedArea"===this.chartType?100:void 0,stacked:["normalizedArea","stackedArea"].includes(this.chartType)}));return this.crossFiltering?this.extractLineAreaCrossFilterSeries(i,e):i}isNormalised(){return!this.crossFiltering&&"normalizedArea"===this.chartType}};function Ae(e,t){let i=parseInt(e.slice(1,3),16),r=parseInt(e.slice(3,5),16),s=parseInt(e.slice(5,7),16);return t?`rgba(${i}, ${r}, ${s}, ${t})`:`rgba(${i}, ${r}, ${s})`}function At(e,t){return e.map(e=>{let i=If.Color.fromString(e);return new If.Color(i.r,i.g,i.b,t).toHexString()})}var Ai=new Set(["bar","groupedBar","stackedBar","normalizedBar"]),Ar=class extends T7{constructor(e){super(e)}getAxes(e){let t=[{type:this.getXAxisType(e),position:this.isHorizontal()?"left":"bottom"},{type:"number",position:this.isHorizontal()?"bottom":"left"}];if(this.isNormalised()){let e=t[1];e.label={...e.label,formatter:e=>Math.round(e.value)+"%"}}return t}getSeries(e){let[t]=e.categories,i=e.fields.map(e=>{var i;return{type:this.standaloneChartType,direction:this.isHorizontal()?"horizontal":"vertical",stacked:this.crossFiltering||(i=this.chartType,Ts.has(i)),normalizedTo:this.isNormalised()?100:void 0,xKey:t.id,xName:t.name,yKey:e.colId,yName:e.displayName}});return this.crossFiltering?this.extractCrossFilterSeries(i):i}extractCrossFilterSeries(e){let t=this.getChartPalette(),i=(e,i)=>({...e,highlightStyle:{item:{fill:void 0}},fill:t?.fills?.[i],stroke:t?.strokes?.[i],listeners:{nodeClick:this.crossFilterCallback}}),r=e=>{let t=e.yKey+"-filtered-out";return{...e,yKey:t,fill:Ae(e.fill,"0.3"),stroke:Ae(e.stroke,"0.3"),showInLegend:!1}},s=[];for(let t=0;t<e.length;t++){let a=e[t];s.push(i(a,t)),s.push(r(i(a,t)))}return s}isNormalised(){return!this.crossFiltering&&iU(["normalizedColumn","normalizedBar"],this.chartType)}isHorizontal(){return Ai.has(this.chartType)}},As=class extends T7{constructor(e){super(e)}getSeries(e){let t=e.fields[0];return[{type:this.standaloneChartType,xKey:t.colId,xName:t.displayName,yName:this.chartProxyParams.translate("histogramFrequency"),areaPlot:!1}]}getAxes(e){return[{type:"number",position:"bottom"},{type:"number",position:"left"}]}},Aa=class extends T7{constructor(e){super(e)}getAxes(e){return[{type:this.getXAxisType(e),position:"bottom"},{type:"number",position:"left"}]}getSeries(e){let[t]=e.categories,i=e.fields.map(e=>({type:this.standaloneChartType,xKey:t.id,xName:t.name,yKey:e.colId,yName:e.displayName}));return this.crossFiltering?this.extractLineAreaCrossFilterSeries(i,e):i}},Ao=class extends T7{constructor(e){super(e)}getAxes(e){return[{type:"number",position:"bottom"},{type:"number",position:"left"}]}getSeries(e){let[t]=e.categories,i=this.isPaired(),r=this.getSeriesDefinitions(e.fields,i),s=t.id===TZ.DEFAULT_CATEGORY?void 0:t,a=r.map(e=>e?.sizeField?{type:"bubble",xKey:e.xField.colId,xName:e.xField.displayName??void 0,yKey:e.yField.colId,yName:e.yField.displayName??void 0,title:`${e.yField.displayName} vs ${e.xField.displayName}`,sizeKey:e.sizeField.colId,sizeName:e.sizeField.displayName??"",labelKey:s?s.id:e.yField.colId,labelName:s?s.name:void 0}:{type:"scatter",xKey:e.xField.colId,xName:e.xField.displayName??void 0,yKey:e.yField.colId,yName:e.yField.displayName??void 0,title:`${e.yField.displayName} vs ${e.xField.displayName}`,labelKey:s?s.id:e.yField.colId,labelName:s?s.name:void 0});return this.crossFiltering?this.extractCrossFilterSeries(a,e):a}extractCrossFilterSeries(e,t){let{data:i}=t,r=this.getChartPalette(),s=e=>`${e}-filtered-out`,a=(e,t)=>{let i=[1/0,-1/0];if(null!=t)for(let r of e){let e=r[t]??r[s(t)];e<i[0]&&(i[0]=e),e>i[1]&&(i[1]=e)}if(i[0]<=i[1])return i},o=e.map((e,t)=>{let s;let o=r?.fills?.[t],n=r?.strokes?.[t];if("bubble"===e.type){let{sizeKey:t}=e;s=a(i,t)}return{...e,fill:o,stroke:n,domain:s,highlightStyle:{item:{fill:"yellow"}},listeners:{...e.listeners,nodeClick:this.crossFilterCallback}}});return[...o,...o.map(e=>{let{yKey:t,xKey:i}=e,r={};return"bubble"===e.type&&(r={sizeKey:s(e.sizeKey)}),{...e,...r,yKey:s(t),xKey:s(i),fillOpacity:.3,strokeOpacity:.3,showInLegend:!1,listeners:{...e.listeners,nodeClick:e=>{let t=e.datum[s(i)],r={...e,xKey:i,datum:{...e.datum,[i]:t}};this.crossFilterCallback(r)}}}})]}getSeriesDefinitions(e,t){if(e.length<2)return[];let i="bubble"===this.chartType;if(t)return i?e.map((t,i)=>i%3==0?{xField:t,yField:e[i+1],sizeField:e[i+2]}:null).filter(e=>e&&e.yField&&e.sizeField):e.map((t,i)=>i%2==0?{xField:t,yField:e[i+1]}:null).filter(e=>e&&e.yField);let r=e[0];return i?e.map((t,i)=>i%2==1?{xField:r,yField:t,sizeField:e[i+1]}:null).filter(e=>e&&e.sizeField):e.filter((e,t)=>t>0).map(e=>({xField:r,yField:e}))}},An=class extends T7{constructor(e){super(e)}getAxes(e,t){return[{type:this.getXAxisType(e),position:this.isHorizontal(t)?"left":"bottom"},{type:"number",position:this.isHorizontal(t)?"bottom":"left"}]}getSeries(e){let[t]=e.categories,[i]=e.fields;return[{type:this.standaloneChartType,xKey:t.id,xName:t.name,yKey:i.colId,yName:i.displayName??void 0}]}},Al=class extends T7{constructor(e){super(e)}getAxes(e){let t=e?e.fields:[],i=new Map(t.map(e=>[e.colId,e])),{primaryYKeys:r,secondaryYKeys:s}=this.getYKeys(t,e.seriesChartTypes),a=[{type:this.getXAxisType(e),position:"bottom"}];return r.length>0&&a.push({type:"number",keys:r,position:"left"}),s.length>0&&s.forEach(e=>{let t=i.get(e);t&&t.colId===e&&a.push({type:"number",keys:[e],position:"right"})}),a}getSeries(e){let{fields:t,seriesChartTypes:i}=e,[r]=e.categories;return t.map(e=>{let t=i.find(t=>t.colId===e.colId);if(t){let i=t.chartType,s=["groupedColumn","groupedBar"].includes(i);return{type:Td(i),xKey:r.id,yKey:e.colId,yName:e.displayName,stacked:["stackedArea","stackedColumn"].includes(i),...s?{grouped:!0}:{}}}})}getYKeys(e,t){let i=[],r=[];return e.forEach(e=>{let s=e.colId,a=t.find(e=>e.colId===s);a&&(a.secondaryAxis?r.push(s):i.push(s))}),{primaryYKeys:i,secondaryYKeys:r}}},Ah="AG-GRID-DEFAULT-LABEL-KEY";function Ad(e,t=null,i){let{depth:r,rootValues:s,value:a,children:o}=e;if(s)return s.map(e=>({[Ah]:t,...e}));if(0===r)return[{[Ah]:t,...a}];let n=[];for(let[e,t]of o.entries())n.push(...Ad(t,e,!0));return i?[{[Ah]:t,children:n,...a??{}}]:n}function Ac(e,t,i){let r={depth:0,children:new Map};return e.forEach(e=>{let s=t(e);(function e(t,i,r,s,a){if(s===i)return 0===s?(a.rootValues||(a.rootValues=[]),a.rootValues.push(t)):a.value=t,a;{let o=r(t,s),n=e(t,i,r,s+1,a.children.get(o)||{depth:0,children:new Map});return a.children.set(o,n),a.depth=Math.max(1+n.depth,a.depth),a}})(e,s,i,0,r)}),r}var Au=class extends T8{constructor(e){super(e)}getUpdateOptions(e,t){let{fields:i}=e,[r,s]=i;return{...t,series:this.getSeries(r,s),data:this.getData(e,r,s)}}getSeriesChartThemeDefaults(){return{gradientLegend:{gradient:{preferredLength:200}}}}getSeries(e,t){return[{type:this.standaloneChartType,labelKey:Ah,sizeKey:e?.colId,sizeName:e?.displayName??void 0,colorKey:t?.colId,colorName:t?.displayName??void 0}]}getData(e,t,i){var r,s;let{categories:a,data:o,groupData:n,grouping:l}=e;if(l)return r=i?o.concat(n?.map(e=>{let i={...e};return delete i[t.colId],i})??[]):o,s=e=>e[i8]?.labels??null,Ad(Ac(r,function(e){return s(e)?.length??0},function(e,t){let i=s(e);if(!i)return null;let r=i.length-1-t;return i[r]}));{let e=a.map(({id:e})=>e);return Ad(Ac(o,function(t){return e.length},function(t,i){var r;return null==(r=t[e[i]])?null:String(r)}))}}},Ap=class extends T8{constructor(e){super(e)}getUpdateOptions(e,t){return{...t,data:this.crossFiltering?this.getCrossFilterData(e):e.data,series:this.getSeries(e)}}getSeries(e){let[t]=e.categories,i=e.fields.length,r={currentOffset:0,offsetAmount:i>1?20:40},s=this.getFields(e).map(e=>{let s={type:this.standaloneChartType,angleKey:e.colId,angleName:e.displayName,sectorLabelKey:e.colId,calloutLabelName:t.name,calloutLabelKey:t.id};if("donut"===this.chartType||"doughnut"===this.chartType){let{outerRadiusOffset:t,innerRadiusOffset:a}=function(e){let t=e.currentOffset;e.currentOffset-=e.offsetAmount;let i=e.currentOffset;return e.currentOffset-=e.offsetAmount,{outerRadiusOffset:t,innerRadiusOffset:i}}(r),o=e.displayName?{title:{text:e.displayName,showInLegend:i>1}}:void 0;return{...s,type:"donut",outerRadiusOffset:t,innerRadiusOffset:a,...o,calloutLine:{colors:this.getChartPalette()?.strokes}}}return s});return this.crossFiltering?this.extractCrossFilterSeries(s):s}getCrossFilterData(e){let t=e.fields[0].colId,i=`${t}-filtered-out`;return e.data.map(e=>{let r=e[t]+e[i];return e[`${t}-total`]=r,e[i]=1,e[t]=e[t]/r,e})}extractCrossFilterSeries(e){let t;let i=this.getChartPalette(),r=e=>({...e,legendItemKey:e.calloutLabelKey,calloutLabel:{enabled:!1},highlightStyle:{item:{fill:void 0}},radiusKey:e.angleKey,angleKey:e.angleKey+"-total",radiusMin:0,radiusMax:1,listeners:{nodeClick:this.crossFilterCallback}}),s=e[0],a=s.angleKey,o=r(s);return[(t=r(s),{...o,radiusKey:a+"-filtered-out",fills:At(t.fills??i?.fills??[],.3),strokes:At(t.strokes??i?.strokes??[],.3),showInLegend:!1}),o]}getFields(e){return"pie"===this.chartType?e.fields.slice(0,1):e.fields}},Ag=class extends T8{constructor(e){super(e)}getAxes(e){let t="radial-bar"===this.standaloneChartType;return[{type:t?"angle-number":"angle-category"},{type:t?"radius-category":"radius-number"}]}getSeries(e){let{fields:t,categories:i,seriesGroupType:r}=e,[s]=i,a="radial-bar"===this.standaloneChartType,o=this.getSeriesGroupTypeOptions(r);return t.map(e=>({type:this.standaloneChartType,angleKey:a?e.colId:s.id,angleName:a?e.displayName??void 0:s.name,radiusKey:a?s.id:e.colId,radiusName:a?s.name:e.displayName??void 0,...o}))}getSeriesGroupType(){let e=this.standaloneChartType;if(!["nightingale","radial-bar","radial-column"].includes(e))return;let t=this.getChart().series?.[0]?.properties.toJson(),i=()=>t.normalizedTo?"normalized":"stacked";return"nightingale"===e?t.grouped?"grouped":i():t.stacked?i():"grouped"}getUpdateOptions(e,t){let i=this.getAxes(e);return{...t,data:this.getData(e,i),axes:i,series:this.getSeries(e)}}getData(e,t){if(!t.some(e=>"angle-category"===e.type||"radius-category"===e.type))return e.data;{let[t]=e.categories;return this.transformCategoryData(e.data,t.id)}}getSeriesGroupTypeOptions(e){return e?{grouped:"grouped"===e||void 0,stacked:"grouped"!==e||void 0,normalizedTo:"normalized"===e?100:void 0}:{}}},Am=class extends T8{constructor(e){super(e)}getUpdateOptions(e,t){let i="AG-GRID-DEFAULT-HEATMAP-SERIES-KEY",r="AG-GRID-DEFAULT-HEATMAP-VALUE-KEY",s="AG-GRID-DEFAULT-HEATMAP-CATEGORY-KEY";return{...t,series:this.getSeries(e,i,r,s),data:this.getData(e,i,r,s)}}getSeries(e,t,i,r){let[s]=e.categories;return[{type:this.standaloneChartType,yKey:r,xKey:t,colorKey:i,yName:s.name,xName:void 0,colorName:void 0}]}getData(e,t,i,r){var s,a;let[o]=e.categories;return s=e.data,a=(s,a)=>{let n=s[o.id],l=null==n?"":String(n),h={id:a,value:n,toString:()=>l};return e.fields.map(({colId:e,displayName:a})=>({...s,[t]:a,[i]:s[e],[r]:h}))},s.reduce((e,t,i,r)=>e.concat(a(t,i,r)),[])}getSeriesChartThemeDefaults(){return{gradientLegend:{gradient:{preferredLength:200}},series:{tooltip:{renderer:Af}}}}};function Af(e){let{xKey:t,yKey:i,colorKey:r,yName:s,datum:a}=e;return{title:"",content:[{label:s,value:a[i]},{label:a[t],value:r&&a[r]}].map(({label:e,value:t})=>`<b>${Av(String(e))}:</b> ${Av(String(t))}`).join("<br>")}}function Av(e){let t={"&":"&amp;","<":"&lt;",">":"&gt;"},i=RegExp(`[${Object.keys(t).join("")}]`,"g");return e.replace(i,e=>t[e])}var Ay=class extends T7{constructor(e){super(e)}getAxes(e,t){return[{type:this.getXAxisType(e),position:this.isHorizontal(t)?"left":"bottom"},{type:"number",position:this.isHorizontal(t)?"bottom":"left"}]}computeSeriesStatistics(e,t){let{data:i,fields:r}=e,[s]=e.categories,a=s.id||TZ.DEFAULT_CATEGORY;return Array.from(this.groupDataByCategory(a,i)).map(([e,i])=>{let a={[s.id]:e};return r.forEach((e,r)=>{let s=i.map(t=>t[e.colId]).filter(e=>"number"==typeof e&&!isNaN(e));Object.entries(t(s)).forEach(([e,t])=>{a[`${e}:${r}`]=s.length>0?t:null})}),a})}groupDataByCategory(e,t){let i=t=>{if(e===TZ.DEFAULT_CATEGORY)return 1;let i=t[e];return null==i?"":i instanceof Date?i.getTime():i};return t.reduce((e,t)=>{let r=i(t),s=e.get(r);return s?s.push(t):e.set(r,[t]),e},new Map)}},AC=class extends Ay{constructor(e){super(e)}getSeries(e){let[t]=e.categories;return e.fields.map((e,i)=>({type:this.standaloneChartType,xKey:t.id,xName:t.name,yName:e.displayName??void 0,minName:"Min",q1Name:"Q1",medianName:"Median",q3Name:"Q3",maxName:"Max",minKey:`min:${i}`,q1Key:`q1:${i}`,medianKey:`median:${i}`,q3Key:`q3:${i}`,maxKey:`max:${i}`}))}getData(e){return this.computeSeriesStatistics(e,e=>{let t=e.sort((e,t)=>e-t);return{min:t[0],q1:this.quantile(t,.25),median:this.quantile(t,.5),q3:this.quantile(t,.75),max:t[t.length-1]}})}quantile(e,t){let i=(e.length-1)*t,r=Math.floor(i);return void 0!==e[r+1]?e[r]+(i-r)*(e[r+1]-e[r]):e[r]}},Aw=class extends Ay{constructor(e){super(e)}getSeries(e){let[t]=e.categories;return e.fields.map((e,i)=>({type:this.standaloneChartType,xKey:t.id,xName:t.name,yName:e.displayName??void 0,yLowName:"Min",yHighName:"Max",yLowKey:`min:${i}`,yHighKey:`max:${i}`}))}getData(e){return this.computeSeriesStatistics(e,e=>({min:Math.min(...e),max:Math.max(...e)}))}},Ab=class extends sQ{constructor(){super('<div class="ag-chart-menu" data-ref="eMenu"></div>'),this.eMenu=null,this.buttonListenersDestroyFuncs=[]}wireBeans(e){this.chartTranslationService=e.chartTranslationService}updateParams(e){let{buttons:t}=e;this.createButtons(t)}createButtons(e){this.buttonListenersDestroyFuncs.forEach(e=>e?.()),this.buttonListenersDestroyFuncs=[];let t=this.eMenu;sL(t),e.forEach(e=>{let{buttonName:i,iconName:r,callback:s}=e,a=this.createButton(r),o=this.chartTranslationService.translate(i+"ToolbarTooltip");o&&a instanceof HTMLElement&&(a.title=o),this.buttonListenersDestroyFuncs.push(...this.addManagedElementListeners(a,{click:e=>s(e.currentTarget)})),t.appendChild(a)})}createButton(e){let t=s2(e,this.gos,void 0,!0);t.classList.add("ag-chart-menu-icon");let i=ia(this.gos).createElement("button");return i.appendChild(t),i.classList.add("ag-chart-menu-toolbar-button"),i}destroy(){this.buttonListenersDestroyFuncs=[],super.destroy()}},AS=class extends sQ{constructor(e){super('<div class="ag-pill-select" role="presentation"></div>'),this.config=e??{};let{selectedValueList:t,valueFormatter:i,valueList:r}=this.config;this.selectedValues=t??[],this.valueList=r??[],this.valueFormatter=i??(e=>rL(e))}postConstruct(){let{ariaLabel:e,onValuesChange:t,dragSourceId:i}=this.config;this.dropZonePanel=this.createManagedBean(new AM({getValues:()=>this.selectedValues,setValues:e=>this.updateValues(e),isDraggable:()=>this.selectedValues.length>1},e=>this.valueFormatter(e),e,i)),this.getGui().appendChild(this.dropZonePanel.getGui()),this.initSelect(),null!=t&&(this.onValuesChange=t)}setValues(e,t){let{added:i,removed:r,updated:s}=this.getChanges(this.valueList,e),a=!1;return(i.length||r.length||s.length)&&(a=!0),this.valueList=e,this.updateValues(t,a,!0),this}setValueFormatter(e){return this.valueFormatter=e,this}initSelect(){let e=this.createSelectOptions();if(!e.length)return!1;let{selectPlaceholder:t}=this.config;return this.eSelect=this.createBean(new op({options:e,placeholder:t,onValueChange:e=>this.addValue(e),pickerIcon:"chartsMenuAdd"})),this.getGui().appendChild(this.eSelect.getGui()),!0}createSelectOptions(){let e=[],{maxSelection:t}=this.config;return t&&this.selectedValues.length>=t||this.valueList.forEach(t=>{this.selectedValues.includes(t)||e.push({value:t,text:this.valueFormatter(t)})}),e}addValue(e){this.dropZonePanel.addItem(e)}updateValues(e,t,i){let r=this.selectedValues;this.selectedValues=e;let s=this.getChanges(r,e),a=t||s.added.length||s.removed.length,o=ih(this.gos),n=this.eSelect?.getGui().contains(o),l=this.dropZonePanel?.getGui().contains(o);i||this.onValuesChange?.(s);let h=!!a&&!this.refreshSelect();this.dropZonePanel.refreshGui(),a&&n&&(h?this.dropZonePanel.focusList(!0):this.eSelect?.getFocusableElement().focus()),l&&!e.length&&this.eSelect?.getFocusableElement().focus()}getChanges(e,t){return{added:t.filter(t=>!e.includes(t)),removed:e.filter(e=>!t.includes(e)),updated:t.filter((t,i)=>e[i]!==t),selected:t}}refreshSelect(){if(!this.eSelect)return this.initSelect();let e=this.createSelectOptions();return e.length?(this.eSelect.clearOptions().addOptions(e).setValue(void 0,!0),!0):(sP(this.eSelect.getGui()),this.eSelect=this.destroyBean(this.eSelect),!1)}destroy(){this.destroyBean(this.eSelect),super.destroy()}},Ax=class extends ke{constructor(e,t,i,r,s,a){super(t,i,!1),this.value=e,this.valueFormatter=r,this.draggable=s,this.sourceId=a}getItem(){return this.value}getDisplayName(){return this.valueFormatter(this.value)}getAriaDisplayName(){return this.getDisplayName()}getTooltip(){}createGetDragItem(){return()=>({value:this.value})}getDragSourceType(){return aX.ChartPanel}getDragSourceId(){return this.sourceId}isDraggable(){return this.draggable}},AM=class extends kt{constructor(e,t,i,r){super(!1),this.model=e,this.valueFormatter=t,this.ariaLabel=i,this.sourceId=r}postConstruct(){super.init()}isItemDroppable(e,t){return this.isSourceEventFromTarget(t)||null!=this.sourceId&&this.sourceId===t.dragSource.sourceId}updateItems(e){this.model.setValues(e)}getExistingItems(){return this.model.getValues()}getIconName(){return this.isPotentialDndItems()?"move":"notAllowed"}getAriaLabel(){return this.ariaLabel}createPillComponent(e,t,i){return new Ax(e,t,i,this.valueFormatter,this.model.isDraggable(),this.sourceId)}getItems(e){return[e.value]}isInterestedIn(e){return e===aX.ChartPanel}},AE=class extends sQ{constructor(e,t,i,r){super(r),this.chartController=e,this.allowMultipleSelection=t,this.maxSelection=i}wireBeans(e){this.chartTranslationService=e.chartTranslationService}addItem(e){this.groupComp.addItem(e)}createGroup(e,t,i,r,s){if(this.allowMultipleSelection){let s=e.filter(e=>e.selected);this.valuePillSelect=this.groupComp.createManagedBean(new AS({valueList:e,selectedValueList:s,valueFormatter:t,selectPlaceholder:this.chartTranslationService.translate(i),dragSourceId:r,onValuesChange:e=>this.onValueChange(e),maxSelection:this.maxSelection})),this.groupComp.addItem(this.valuePillSelect)}else{let t=this.createValueSelectParams(e);t.onValueChange=t=>{e.forEach(e=>{e.selected=!1}),t.selected=!0,t.colId===TZ.DEFAULT_CATEGORY&&this.chartController.setAggFunc(void 0,!0),this.chartController.updateForPanelChange({updatedColState:t,skipAnimation:s?.()})},this.valueSelect=this.groupComp.createManagedBean(new op(t)),this.groupComp.addItem(this.valueSelect)}}refreshValueSelect(e){if(!this.valueSelect)return;let{options:t,value:i}=this.createValueSelectParams(e);this.valueSelect.clearOptions().addOptions(t).setValue(i,!0)}createValueSelectParams(e){let t;return{options:e.map(e=>{let i=e.displayName??"";return e.selected&&(t=e),{value:e,text:i}}),value:t}}onValueChange({added:e,updated:t,removed:i,selected:r}){let s,a;let o=()=>{r.forEach((e,t)=>{e.order=t}),a=!0};e.length?((s=e[0]).selected=!0,o()):i.length?(s=i[0]).selected=!1:t.length&&(o(),s=t[0]),s&&this.chartController.updateForPanelChange({updatedColState:s,resetOrder:a})}destroy(){this.valuePillSelect=void 0,this.valueSelect=void 0,super.destroy()}},AD=class extends AE{constructor(e,t,i,r,s){super(e,i,void 0,'<div id="categoriesGroup"></div>'),this.title=t,this.dimensionCols=r,this.isOpen=s}postConstruct(){this.groupComp=this.createBean(new IQ({title:this.title,enabled:!0,suppressEnabledCheckbox:!0,suppressOpenCloseIcons:!1,cssIdentifier:"charts-data",expanded:this.isOpen})),this.createGroup(this.dimensionCols,e=>e.displayName??"","categoryAdd","categorySelect",()=>!this.chartController.getAggFunc()),this.createAggFuncControls(this.dimensionCols),this.getGui().appendChild(this.groupComp.getGui())}refresh(e){this.valuePillSelect?.setValues(e,e.filter(e=>e.selected)),this.refreshValueSelect(e),this.refreshAggFuncControls(e,this.chartController.getAggFunc())}createAggFuncControls(e){let t=this.chartController.getAggFunc();this.groupComp.addItem(this.aggFuncToggle=this.createBean(new hn({label:this.chartTranslationService.translate("aggregate"),labelAlignment:"left",labelWidth:"flex",inputWidth:"flex",value:void 0!=t,onValueChange:e=>{let t=e?"sum":void 0;this.chartController.setAggFunc(t),this.aggFuncSelect?.setValue(t,!0),this.aggFuncSelect?.setDisplayed(void 0!=t)}}))),this.groupComp.addItem(this.aggFuncSelect=this.createBean(new op({options:[{value:"sum",text:this.chartTranslationService.translate("sum")},{value:"first",text:this.chartTranslationService.translate("first")},{value:"last",text:this.chartTranslationService.translate("last")},{value:"min",text:this.chartTranslationService.translate("min")},{value:"max",text:this.chartTranslationService.translate("max")},{value:"count",text:this.chartTranslationService.translate("count")},{value:"avg",text:this.chartTranslationService.translate("avg")}],value:"string"==typeof t?t:void 0,onValueChange:e=>{this.chartController.setAggFunc(e)}}))),this.refreshAggFuncControls(e,t)}refreshAggFuncControls(e,t){let i=e.filter(e=>e.selected).some(e=>e.colId!==TZ.DEFAULT_CATEGORY);this.aggFuncToggle?.setValue(void 0!=t),this.aggFuncSelect?.setValue("string"==typeof t?t:void 0,!0),this.aggFuncToggle?.setDisplayed(i),this.aggFuncSelect?.setDisplayed(i&&void 0!=t)}clearAggFuncControls(){this.aggFuncToggle=this.destroyBean(this.aggFuncToggle),this.aggFuncSelect=this.destroyBean(this.aggFuncSelect)}destroy(){this.clearAggFuncControls(),this.groupComp=this.destroyBean(this.groupComp),super.destroy()}},AI=class extends i2{constructor(e){super(),this.chartOptionsProxy=e}wireBeans(e){this.chartTranslationService=e.chartTranslationService}getDefaultColorPickerParams(e,t,i){return this.addValueParams(e,{label:this.chartTranslationService.translate(t??"color"),labelWidth:"flex",inputWidth:"flex",labelAlignment:"top",pickerGap:6},i)}getDefaultNumberInputParams(e,t,i){return this.addValueParams(e,{label:this.chartTranslationService.translate(t),labelAlignment:"top",labelWidth:"flex",inputWidth:"flex",precision:i?.precision,step:i?.step,min:i?.min,max:i?.max},{parseInputValue:e=>{let t=Number(e);return isNaN(t)?void 0:t},formatInputValue:e=>null==e?"":`${e}`})}getDefaultSliderParams(e,t,i,r){let s=this.chartOptionsProxy.getValue(e)??0;r&&Array.isArray(s)&&(s=s[0]);let a=this.getDefaultSliderParamsWithoutValueParams(s,t,i);return a.onValueChange=t=>this.chartOptionsProxy.setValue(e,r?[t]:t),a}getDefaultSliderParamsWithoutValueParams(e,t,i){return{label:this.chartTranslationService.translate(t),minValue:0,maxValue:Math.max(e,i),textFieldWidth:45,value:`${e}`}}getDefaultCheckboxParams(e,t,i){let r=this.chartOptionsProxy.getValue(e),s={label:this.chartTranslationService.translate(t),value:r,readOnly:i?.readOnly,passive:i?.passive};return s.onValueChange=t=>{this.chartOptionsProxy.setValue(e,"boolean"==typeof t?t:void 0)},s}getDefaultSelectParams(e,t,i){return this.getDefaultSelectParamsWithoutValueParams(t,i,this.chartOptionsProxy.getValue(e),t=>{this.chartOptionsProxy.setValue(e,t)})}getDefaultSelectParamsWithoutValueParams(e,t,i,r){return{label:this.chartTranslationService.translate(e),labelAlignment:"top",options:t,pickerGap:6,value:i,onValueChange:r}}getDefaultFontPanelParams(e,t){let i=t=>`${e}.${t}`;return this.addEnableParams(i("enabled"),{name:this.chartTranslationService.translate(t),suppressEnabledCheckbox:!1,chartMenuParamsFactory:this,keyMapper:i})}addValueParams(e,t,i){let r=this.chartOptionsProxy.getValue(e);return t.value=i?.formatInputValue?i.formatInputValue(r):r,t.onValueChange=t=>{let r=i?.parseInputValue?i.parseInputValue(t):t;this.chartOptionsProxy.setValue(e,r)},t}addEnableParams(e,t){return t.enabled=this.chartOptionsProxy.getValue(e)??!1,t.onEnableChange=t=>this.chartOptionsProxy.setValue(e,t),t}getChartOptions(){return this.chartOptionsProxy}},Ak=class extends sQ{constructor(e,t){super(),this.chartMenuContext=e,this.isOpen=t,this.chartSpecificGroup=null,this.hasContent=!1}wireBeans(e){this.chartTranslationService=e.chartTranslationService,this.chartService=e.chartService}postConstruct(){let e={title:this.getTitle(),enabled:!0,suppressEnabledCheckbox:!0,suppressOpenCloseIcons:!1,cssIdentifier:"charts-data",expanded:this.isOpen,items:[...this.createDirectionSelect(),this.createGroupTypeSelect()]};this.setTemplate(`
            <div id="chartSpecificGroup">
                <ag-group-component data-ref="chartSpecificGroup"></ag-group-component>
            </div>`,[I1],{chartSpecificGroup:e}),this.setDisplayed(this.hasContent)}refresh(){this.hasContent=!1,this.chartSpecificGroup.setTitle(this.getTitle()),this.updateDirectionSelect(),this.updateGroupTypeSelect(),this.setDisplayed(this.hasContent)}getTitle(){let e=this.chartMenuContext.chartController.getChartType();return this.chartTranslationService.translate(Tm(e))}createDirectionSelect(){if(!this.chartService.isEnterprise())return[];let{chartOptionsService:e,chartController:t}=this.chartMenuContext,i=e.getSeriesOptionsProxy(()=>Td(t.getChartType())),r=this.createManagedBean(new AI(i)),s=["horizontal","vertical"].map(e=>({value:e,text:this.chartTranslationService.translate(e)})),a=r.getDefaultSelectParams("direction","direction",s),o=a.onValueChange;return a.onValueChange=e=>{o(e),t.raiseChartModelUpdateEvent()},this.directionSelect=this.createManagedBean(new op(a)),this.updateDirectionSelect(),[this.directionSelect]}updateDirectionSelect(){let e=Tr(Td(this.chartMenuContext.chartController.getChartType()),"canSwitchDirection");this.updateDisplayed(this.directionSelect,e)}createGroupTypeSelect(){let{chartController:e,chartMenuParamsFactory:t}=this.chartMenuContext;return this.groupTypeSelect=this.createManagedBean(new op(t.getDefaultSelectParamsWithoutValueParams("seriesGroupType",dZ.SERIES_GROUP_TYPES.map(e=>({value:e,text:this.chartTranslationService.translate(`${e}SeriesGroupType`)})),e.getSeriesGroupType(),t=>e.setSeriesGroupType(t)))),this.updateGroupTypeSelect(),this.groupTypeSelect}updateGroupTypeSelect(){let e=["radialColumn","radialBar","nightingale"].includes(this.chartMenuContext.chartController.getChartType());this.updateDisplayed(this.groupTypeSelect,e)}updateDisplayed(e,t){e?.setDisplayed(t),e&&(this.hasContent=this.hasContent||t)}},AT=class extends sQ{constructor(e,t,i){super('<div id="seriesChartTypeGroup"></div>'),this.chartController=e,this.columns=t,this.isOpen=i,this.selectedColIds=[],this.chartTypeComps=new Map,this.secondaryAxisComps=new Map}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){this.createSeriesChartTypeGroup(this.columns)}refresh(e){iG(this.getValidColIds(e),this.selectedColIds)?this.refreshComps():this.recreate(e)}recreate(e){this.isOpen=this.seriesChartTypeGroupComp.isExpanded(),sL(this.getGui()),this.destroyBean(this.seriesChartTypeGroupComp),this.columns=e,this.selectedColIds=[],this.clearComps(),this.postConstruct()}getValidColIds(e){let t=this.chartController.getSeriesChartTypes();return e.filter(e=>e.selected&&!!t.filter(t=>t.colId===e.colId)[0]).map(({colId:e})=>e)}createSeriesChartTypeGroup(e){this.seriesChartTypeGroupComp=this.createBean(new IQ({title:this.chartTranslationService.translate("seriesChartType"),enabled:!0,suppressEnabledCheckbox:!0,suppressOpenCloseIcons:!1,cssIdentifier:"charts-data",expanded:this.isOpen}));let t=this.chartController.getSeriesChartTypes();e.forEach(e=>{if(!e.selected)return;let i=t.filter(t=>t.colId===e.colId)[0];if(!i)return;this.selectedColIds.push(e.colId);let r=this.seriesChartTypeGroupComp.createManagedBean(new IQ({title:e.displayName,enabled:!0,suppressEnabledCheckbox:!0,suppressOpenCloseIcons:!0,cssIdentifier:"charts-format-sub-level"})),s=this.seriesChartTypeGroupComp.createManagedBean(new ah({label:this.chartTranslationService.translate("secondaryAxis"),labelWidth:"flex",disabled:["groupedColumn","stackedColumn","stackedArea"].includes(i.chartType),value:!!i.secondaryAxis,onValueChange:t=>this.chartController.updateSeriesChartType(e.colId,void 0,t)}));r.addItem(s);let a=["line","area","stackedArea","groupedColumn","stackedColumn"].map(e=>({value:e,text:this.chartTranslationService.translate(Tm(e))})),o=r.createManagedBean(new op({options:a,value:i.chartType,onValueChange:t=>this.chartController.updateSeriesChartType(e.colId,t)}));r.addItem(o),this.seriesChartTypeGroupComp.addItem(r),this.chartTypeComps.set(e.colId,o),this.secondaryAxisComps.set(e.colId,s)}),this.getGui().appendChild(this.seriesChartTypeGroupComp.getGui())}refreshComps(){let e=this.chartController.getSeriesChartTypes();this.selectedColIds.forEach(t=>{let i=e.find(e=>e.colId===t);if(!i)return;let r=this.chartTypeComps.get(t),s=this.secondaryAxisComps.get(t);r?.setValue(i.chartType),s?.setValue(!!i.secondaryAxis),s?.setDisabled(this.isSecondaryAxisDisabled(i.chartType))})}clearComps(){this.chartTypeComps.clear(),this.secondaryAxisComps.clear()}isSecondaryAxisDisabled(e){return["groupedColumn","stackedColumn","stackedArea"].includes(e)}destroy(){this.clearComps(),this.seriesChartTypeGroupComp=this.destroyBean(this.seriesChartTypeGroupComp),super.destroy()}},AA=class extends AE{constructor(e,t,i,r,s,a,o){super(e,r,s,'<div id="seriesGroup"></div>'),this.chartOptionsService=t,this.title=i,this.valueCols=a,this.isOpen=o}postConstruct(){if(this.groupComp=this.createBean(new IQ({title:this.title,enabled:!0,suppressEnabledCheckbox:!0,suppressOpenCloseIcons:!1,cssIdentifier:"charts-data",expanded:this.isOpen})),this.chartController.isActiveXYChart()){let e=this.groupComp.createManagedBean(new hn({label:this.chartTranslationService.translate("paired"),labelAlignment:"left",labelWidth:"flex",inputWidth:"flex",value:this.chartOptionsService.getPairedMode(),onValueChange:e=>{this.chartOptionsService.setPairedMode(!!e),this.chartController.updateForGridChange({maintainColState:!0})}}));this.groupComp.addItem(e)}this.createGroup(this.valueCols,this.generateGetSeriesLabel(this.valueCols),"seriesAdd","seriesSelect"),this.getGui().appendChild(this.groupComp.getGui())}refresh(e){this.valuePillSelect?.setValueFormatter(this.generateGetSeriesLabel(e)),this.valuePillSelect?.setValues(e,e.filter(e=>e.selected)),this.refreshValueSelect(e)}generateGetSeriesLabel(e){if(!this.chartController.isActiveXYChart())return e=>e.displayName??"";let t=e.filter(e=>e.selected),i="bubble"===this.chartController.getChartType(),r=this.chartOptionsService.getPairedMode(),s=new Map;return s.set(0,"X"),s.set(1,"Y"),s.set(2,"size"),e=>{let a;let o=e.displayName??"";if(!e.selected)return o;let n=t.indexOf(e);return -1===n?o:(a=r?s.get(n%(i?3:2)):0===n?"X":i&&n%2==0?"size":"Y",`${o} (${a})`)}}destroy(){this.groupComp=this.destroyBean(this.groupComp),super.destroy()}},AR={groups:[{type:"categories",isOpen:!0},{type:"series",isOpen:!0},{type:"seriesChartType",isOpen:!0},{type:"chartSpecific",isOpen:!0}]},AL=class extends sQ{constructor(e){super('<div class="ag-chart-data-wrapper ag-scrollable-container"></div>'),this.chartMenuContext=e,this.isSwitchCategorySeriesToggled=!1,this.restoreSwitchCategorySeriesToggleFocus=!1,this.panels=[],this.chartController=e.chartController}wireBeans(e){this.chartTranslationService=e.chartTranslationService,this.chartService=e.chartService}postConstruct(){this.createSwitchCategorySeriesToggle(),this.isSwitchCategorySeriesToggled=this.chartController.isCategorySeriesSwitched(),this.updatePanels();let e=this.updatePanels.bind(this);this.addManagedListeners(this.chartController,{chartModelUpdate:e,chartApiUpdate:e})}destroy(){this.clearPanelComponents(),super.destroy()}updatePanels(){let e=this.chartType,t=this.isSwitchCategorySeriesToggled,{dimensionCols:i,valueCols:r}=this.chartController.getColStateForMenu();this.chartType=this.chartController.getChartType(),this.isSwitchCategorySeriesToggled=this.chartController.isCategorySeriesSwitched();let s=this.isSwitchCategorySeriesToggled!==t;this.canRefresh(e,this.chartType)&&!s?(this.categoriesDataPanel?.refresh(i),this.seriesDataPanel?.refresh(r),this.seriesChartTypePanel?.refresh(r),this.chartSpecificPanel?.refresh()):this.recreatePanels(i,r);let a=Tg(this.chartType)&&this.chartService.isEnterprise()&&!this.chartController.isGrouping();sC(this.switchCategorySeriesToggle.getGui(),a),s&&this.switchCategorySeriesToggle?.setValue(this.chartController.isCategorySeriesSwitched()),this.restoreSwitchCategorySeriesToggleFocus&&(this.restoreSwitchCategorySeriesToggleFocus=!1,a&&this.switchCategorySeriesToggle.getFocusableElement().focus())}canRefresh(e,t){if(void 0===e)return!1;if(e===t)return!0;let i=e=>["columnLineCombo","areaColumnCombo","customCombo"].includes(e);return!!(i(e)&&i(t))}recreatePanels(e,t){this.clearPanelComponents();let{chartType:i}=this;if(!i)return;let r=this.chartController.isCategorySeriesSwitched();this.getDataPanelDef().groups?.forEach(({type:s,isOpen:a})=>{s===(r?"series":"categories")?(this.categoriesDataPanel=this.createBean(new AD(this.chartController,this.getCategoryGroupTitle(r),this.getCategoryGroupMultipleSelect(i,r),e,a)),this.panels.push(this.categoriesDataPanel)):s===(r?"categories":"series")?(this.seriesDataPanel=this.createBean(new AA(this.chartController,this.chartMenuContext.chartOptionsService,this.getSeriesGroupTitle(r),this.getSeriesGroupMultipleSelect(i,r),this.getSeriesGroupMaxSelection(i,r),t,a)),this.panels.push(this.seriesDataPanel)):"seriesChartType"===s?this.chartController.isComboChart()&&(this.seriesChartTypePanel=this.createBean(new AT(this.chartController,t,a)),this.panels.push(this.seriesChartTypePanel)):"chartSpecific"===s?(this.chartSpecificPanel=this.createBean(new Ak(this.chartMenuContext,a)),this.panels.push(this.chartSpecificPanel)):tO(`Invalid charts data panel group name supplied: '${s}'`)}),(r?this.categoriesDataPanel:this.seriesDataPanel)?.addItem(this.switchCategorySeriesToggle.getGui()),this.addPanelComponents()}addPanelComponents(){if(!this.panels.length)return;let e=ia(this.gos).createDocumentFragment();for(let t of this.panels)t.addCssClass("ag-chart-data-section"),e.appendChild(t.getGui());this.getGui().appendChild(e)}clearPanelComponents(){let e=this.getGui();this.panels.forEach(t=>{e.removeChild(t.getGui()),this.destroyBean(t)}),this.panels=[]}getDataPanelDef(){return this.gos.get("chartToolPanelsDef")?.dataPanel??AR}getCategoryGroupTitle(e){return e?this.chartTranslationService.translate("seriesLabels"):this.chartTranslationService.translate(this.chartController.isActiveXYChart()?"labels":"categories")}getCategoryGroupMultipleSelect(e,t){return!t&&1!==Tu(e)}getSeriesGroupTitle(e){return e?this.chartTranslationService.translate("categoryValues"):this.chartTranslationService.translate(this.chartController.isActiveXYChart()?"xyValues":"series")}getSeriesGroupMultipleSelect(e,t){return 1!==this.getSeriesGroupMaxSelection(e,t)}getSeriesGroupMaxSelection(e,t){if(!t)return Tp(e)}createSwitchCategorySeriesToggle(){this.switchCategorySeriesToggle=this.createManagedBean(new hn({label:this.chartTranslationService.translate("switchCategorySeries"),labelAlignment:"left",labelWidth:"flex",inputWidth:"flex",value:this.chartController.isCategorySeriesSwitched(),onValueChange:e=>{this.restoreSwitchCategorySeriesToggleFocus=!0,this.chartController.switchCategorySeries(e)}}))}},AP=class extends ao{constructor(e){super(e,`<div class="ag-angle-select">
            <div data-ref="eLabel"></div>
            <div class="ag-wrapper ag-angle-select-wrapper">
                <div class="ag-angle-select-field">
                    <div data-ref="eParentCircle" class="ag-angle-select-parent-circle">
                        <div data-ref="eChildCircle" class="ag-angle-select-child-circle"></div>
                    </div>
                </div>
                <ag-input-number-field data-ref="eAngleValue"></ag-input-number-field>
            </div>
        </div>`,[ox]),this.eLabel=null,this.eParentCircle=null,this.eChildCircle=null,this.eAngleValue=null,this.radius=0,this.offsetX=0,this.offsetY=0}wireBeans(e){this.dragService=e.dragService}postConstruct(){super.postConstruct();let{value:e,onValueChange:t}=this.config;null!=e&&this.setValue(e,void 0,!0),null!=t&&this.onValueChange(t),this.dragListener={eElement:this.eParentCircle,dragStartPixels:0,onDragStart:()=>{this.parentCircleRect=this.eParentCircle.getBoundingClientRect()},onDragging:e=>this.calculateAngleDrag(e),onDragStop:()=>{}},this.dragService.addDragSource(this.dragListener),this.eAngleValue.setLabel("").setLabelWidth(5).setInputWidth(45).setMin(0).setMax(360).setValue(`${this.degrees}`).onValueChange(e=>{(null==e||""===e)&&(e="0");let t=parseFloat(e=this.eAngleValue.normalizeValue(e));t>180&&(t-=360),this.setValue(t)}),this.updateNumberInput(),tY(this.getValue())&&this.eAngleValue.setValue(this.normalizeNegativeValue(this.getValue()).toString()),this.addManagedListeners(this,{fieldValueChanged:()=>{this.eAngleValue.getInputElement().contains(ih(this.gos))||this.updateNumberInput()}})}updateNumberInput(){let e=this.normalizeNegativeValue(this.getValue());this.eAngleValue.setValue(e.toString())}positionChildCircle(e){let t=this.parentCircleRect||{width:24,height:24},i=this.eChildCircle,r=t.width/2,s=t.height/2;i.style.left=`${r+8*Math.cos(e)}px`,i.style.top=`${s+8*Math.sin(e)}px`}calculatePolar(){let e=this.offsetX,t=this.offsetY,i=Math.atan2(t,e);this.degrees=this.toDegrees(i),this.radius=Math.sqrt(e*e+t*t),this.positionChildCircle(i)}calculateCartesian(){let e=this.toRadians(this.getValue()),t=this.getRadius();this.setOffsetX(Math.cos(e)*t).setOffsetY(Math.sin(e)*t)}setOffsetX(e){return this.offsetX!==e&&(this.offsetX=e,this.calculatePolar()),this}setOffsetY(e){return this.offsetY!==e&&(this.offsetY=e,this.calculatePolar()),this}calculateAngleDrag(e){let t=this.parentCircleRect,i=t.width/2,r=t.height/2,s=e.clientX-t.left,a=Math.atan2(e.clientY-t.top-r,s-i);this.setValue(a,!0)}toDegrees(e){return e/Math.PI*180}toRadians(e){return e/180*Math.PI}normalizeNegativeValue(e){return e<0?360+e:e}normalizeAngle180(e){return(e%=2*Math.PI)<-Math.PI?e+=2*Math.PI:e>=Math.PI&&(e-=2*Math.PI),e}getRadius(){return this.radius}setRadius(e){return this.radius===e||(this.radius=e,this.calculateCartesian()),this}onValueChange(e){return this.addManagedListeners(this,{fieldValueChanged:()=>{e(this.degrees)}}),this}getValue(e){return e?this.toRadians(this.degrees):this.degrees}setValue(e,t,i){let r;return r=t?e:this.normalizeAngle180(this.toRadians(e)),e=this.toDegrees(r),this.degrees===e||(this.degrees=Math.floor(e),this.calculateCartesian(),this.positionChildCircle(r),i||this.dispatchLocalEvent({type:"fieldValueChanged"})),this}setWidth(e){return sV(this.getGui(),e),this}setDisabled(e){return super.setDisabled(e),this.eAngleValue.setDisabled(e),this}destroy(){this.dragService.removeDragSource(this.dragListener),super.destroy()}},AF=class extends sQ{constructor(e){super(),this.params=e,this.fontGroup=null,this.activeComps=[],this.chartOptions=e.chartMenuParamsFactory.getChartOptions()}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){let{cssIdentifier:e="charts-format-sub-level",name:t,enabled:i,onEnableChange:r,suppressEnabledCheckbox:s,chartMenuParamsFactory:a,keyMapper:o}=this.params;this.setTemplate(`<div class="ag-font-panel">
        <ag-group-component data-ref="fontGroup">
            <ag-select data-ref="familySelect"></ag-select>
            <ag-select data-ref="weightStyleSelect"></ag-select>
            <div class="ag-charts-font-size-color">
                <ag-select data-ref="sizeSelect"></ag-select>
                <ag-color-picker data-ref="colorPicker"></ag-color-picker>
            </div>
        </ag-group-component>
    </div>`,[I1,og,Tb],{fontGroup:{cssIdentifier:e,direction:"vertical",suppressOpenCloseIcons:!0,title:t,enabled:i,suppressEnabledCheckbox:!0,onEnableChange:e=>{r&&r(e)},useToggle:!s},familySelect:this.getFamilySelectParams(),weightStyleSelect:this.getWeightStyleSelectParams(),sizeSelect:this.getSizeSelectParams(),colorPicker:a.getDefaultColorPickerParams(o("color"))}),this.addOrRemoveCssClass("ag-font-panel-no-header",!t)}addItem(e,t){t?this.fontGroup.prependItem(e):this.fontGroup.addItem(e),this.activeComps.push(e)}setEnabled(e){this.fontGroup.setEnabled(e)}getFamilySelectParams(){let e=["Arial, sans-serif","Aria Black, sans-serif","Book Antiqua,  serif","Charcoal, sans-serif","Comic Sans MS, cursive","Courier, monospace","Courier New, monospace","Gadget, sans-serif","Geneva, sans-serif","Helvetica, sans-serif","Impact, sans-serif","Lucida Console, monospace","Lucida Grande, sans-serif","Lucida Sans Unicode,  sans-serif","Monaco, monospace","Palatino Linotype, serif","Palatino, serif","Times New Roman, serif","Times, serif","Verdana, sans-serif"],t=this.getInitialFontValue("fontFamily"),i=e[0];if(t){let r=e.map(e=>e.toLowerCase()).indexOf(t.toLowerCase());if(r>=0)i=e[r];else{let r=t[0].toUpperCase()+t.substring(1).toLowerCase();e.push(r),i=r}}let r=e.sort().map(e=>({value:e,text:e}));return this.params.chartMenuParamsFactory.getDefaultSelectParamsWithoutValueParams("font",r,`${i}`,e=>this.setFont({fontFamily:e}))}getSizeSelectParams(){let e=[8,10,12,14,16,18,20,22,24,26,28,30,32,34,36],t=this.getInitialFontValue("fontSize");iU(e,t)||e.push(t);let i=e.sort((e,t)=>e-t).map(e=>({value:`${e}`,text:`${e}`}));return this.params.chartMenuParamsFactory.getDefaultSelectParamsWithoutValueParams("size",i,`${t}`,e=>this.setFont({fontSize:parseInt(e,10)}))}getWeightStyleSelectParams(){let e=this.getInitialFontValue("fontWeight")??"normal",t=this.getInitialFontValue("fontStyle")??"normal",i=[{name:"normal",weight:"normal",style:"normal"},{name:"bold",weight:"bold",style:"normal"},{name:"italic",weight:"normal",style:"italic"},{name:"boldItalic",weight:"bold",style:"italic"}],r=i.find(i=>i.weight===e&&i.style===t);r||(r={name:"predefined",weight:e,style:t},i.unshift(r));let s=i.map(e=>({value:e.name,text:this.chartTranslationService.translate(e.name)}));return this.params.chartMenuParamsFactory.getDefaultSelectParamsWithoutValueParams("weight",s,r.name,e=>{let t=i.find(t=>t.name===e);this.setFont({fontWeight:t.weight,fontStyle:t.style})})}destroyActiveComps(){this.activeComps.forEach(e=>{sP(e.getGui()),this.destroyBean(e)})}destroy(){this.destroyActiveComps(),super.destroy()}setFont(e){let{keyMapper:t}=this.params;Object.entries(e).forEach(([e,i])=>{i&&this.chartOptions.setValue(t(e),i)})}getInitialFontValue(e){let{keyMapper:t}=this.params;return this.chartOptions.getValue(t(e))}},AN=class extends sQ{constructor(e){super(),this.chartMenuUtils=e}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){let{chartMenuUtils:e}=this,t=e.addEnableParams("tick.enabled",{cssIdentifier:"charts-format-sub-level",direction:"vertical",suppressOpenCloseIcons:!0,title:this.chartTranslationService.translate("ticks"),suppressEnabledCheckbox:!0,useToggle:!0}),i=e.getDefaultColorPickerParams("tick.stroke"),r=e.getDefaultSliderParams("tick.width","width",10),s=e.getDefaultSliderParams("tick.size","length",30);this.setTemplate(`<div>
            <ag-group-component data-ref="axisTicksGroup">
                <ag-color-picker data-ref="axisTicksColorPicker"></ag-color-picker>
                <ag-slider data-ref="axisTicksWidthSlider"></ag-slider>
                <ag-slider data-ref="axisTicksSizeSlider"></ag-slider>
            </ag-group-component>
        </div>`,[I1,Tb,TE],{axisTicksGroup:t,axisTicksColorPicker:i,axisTicksWidthSlider:r,axisTicksSizeSlider:s})}},AO=class extends sQ{constructor(e){super(),this.chartMenuUtils=e,this.chartOptions=e.getChartOptions()}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){let e=this.chartMenuUtils.addEnableParams("gridLine.enabled",{cssIdentifier:"charts-format-sub-level",direction:"vertical",suppressOpenCloseIcons:!0,title:this.chartTranslationService.translate("gridLines"),suppressEnabledCheckbox:!0,useToggle:!0}),t=this.getGridLineColorPickerParams("color"),i=this.getGridLineWidthSliderParams("thickness"),r=this.getGridLineDashSliderParams("lineDash");this.setTemplate(`<div>
            <ag-group-component data-ref="gridLineGroup">
                <ag-color-picker data-ref="gridLineColorPicker"></ag-color-picker>
                <ag-slider data-ref="gridLineWidthSlider"></ag-slider>
                <ag-slider data-ref="gridLineLineDashSlider"></ag-slider>
            </ag-group-component>
        </div>`,[I1,Tb,TE],{gridLineGroup:e,gridLineColorPicker:t,gridLineWidthSlider:i,gridLineLineDashSlider:r})}getGridLineColorPickerParams(e){return this.chartMenuUtils.getDefaultColorPickerParams("gridLine.style",e,{formatInputValue:e=>e?.[0]?.stroke,parseInputValue:e=>{let t=this.chartOptions.getValue("gridLine.style")??[];return 0===t.length?[{stroke:e,lineDash:[]}]:[{...t[0],stroke:e}]}})}getGridLineWidthSliderParams(e){return this.chartMenuUtils.getDefaultSliderParams("gridLine.width",e,10)}getGridLineDashSliderParams(e){let t=this.chartOptions.getValue("gridLine.style"),i=t?.[0]?.lineDash?.[0],r=this.chartMenuUtils.getDefaultSliderParamsWithoutValueParams(i??0,e,30);return r.onValueChange=e=>{let t=this.chartOptions.getValue("gridLine.style.0.stroke");this.chartOptions.setValue("gridLine.style",[{lineDash:[e],stroke:t}])},r}},AB=class extends sQ{constructor(e,t){super(),this.axisType=e,this.options=t,this.axisGroup=null,this.axisTypeSelect=null,this.axisPositionSelect=null,this.axisTimeFormatSelect=null,this.activePanels=[],this.axisLabelUpdateFuncs=[];let{chartOptionsService:i,seriesType:r}=t;this.chartOptionsSeriesProxy=i.getSeriesOptionsProxy(()=>r)}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){let{isExpandedOnInit:e,chartOptionsService:t,chartController:i,registerGroupComponent:r}=this.options,s=this.axisType,a={cssIdentifier:"charts-format-top-level",direction:"vertical",title:this.translate(s),expanded:e,suppressEnabledCheckbox:!0},o=t.getCartesianAxisOptionsProxy(this.axisType),n=this.createManagedBean(new AI(o)),l=this.createManagedBean(new AI(t.getCartesianAxisThemeOverridesProxy(this.axisType))),h=this.getAxisTypeSelectParams(n,t.getCartesianAxisAppliedThemeOverridesProxy(this.axisType)),d=this.getAxisPositionSelectParams(n),c=this.getAxisTimeFormatSelectParams(n),u=this.getAxisColorInputParams(l),p=this.getAxisLineWidthSliderParams(l);this.setTemplate(`<div>
            <ag-group-component data-ref="axisGroup">
                <ag-select data-ref="axisTypeSelect"></ag-select>
                <ag-select data-ref="axisTimeFormatSelect"></ag-select>
                <ag-select data-ref="axisPositionSelect"></ag-select>
                <ag-color-picker data-ref="axisColorInput"></ag-color-picker>
                <ag-slider data-ref="axisLineWidthSlider"></ag-slider>
            </ag-group-component>
        </div>`,[I1,og,Tb,TE],{axisGroup:a,axisTypeSelect:h??void 0,axisPositionSelect:d??void 0,axisTimeFormatSelect:c??void 0,axisColorInput:u,axisLineWidthSlider:p}),r(this.axisGroup),this.axisTypeSelect.setDisplayed(!!h.options?.length),d||this.removeTemplateComponent(this.axisPositionSelect);let g=()=>{let e="time"===o.getValue("type");sC(this.axisTimeFormatSelect.getGui(),e)};c?(g(),this.addManagedEventListeners({chartOptionsChanged:()=>{g()}})):this.removeTemplateComponent(this.axisTimeFormatSelect),this.initGridLines(l),this.initAxisTicks(l),this.initAxisLabels(l),this.addManagedListeners(i,{chartUpdated:()=>this.axisLabelUpdateFuncs.forEach(e=>e()),chartModelUpdate:()=>setTimeout(()=>{this.isAlive()&&(this.refreshAxisTypeSelect(n),g())})})}getAxisTypeSelectParams(e,t){let i=e.getChartOptions(),r=this.getAxisTypeSelectOptions(),s=e.getDefaultSelectParams("type","axisType",r);return s.onValueChange=e=>{let r=i.getValue("type");if(e===r)return;let s=t.getValue("*"),a="time"===e,o="time"===r!==a?a?"%d %B %Y":void 0:null;if(this.options.chartOptionsService.setCartesianCategoryAxisType(this.axisType,e),null!==o){let e=i.getValue("label")??{};i.setValue("label",{...e,format:o})}t.setValue("*",s)},s}refreshAxisTypeSelect(e){let t=this.getAxisTypeSelectOptions(),i=!!t.length;this.axisTypeSelect.setDisplayed(i),i&&this.axisTypeSelect.clearOptions().addOptions(t).setValue(e.getChartOptions().getValue("type"))}getAxisTypeSelectOptions(){let{chartController:e}=this.options;return["heatmap","histogram","boxPlot","rangeBar","scatter","bubble"].includes(e.getChartType())||e.isGrouping()||!this.isCategoryAxis()||e.isCategorySeriesSwitched()||!(()=>{let t=e.getChartData()[0];return!!t&&e.getSelectedDimensions().every(e=>!isNaN(parseFloat(t[e.colId])))})()?[]:["category","number","time"].map(e=>({value:e,text:this.translate(e)}))}isCategoryAxis(){let e="horizontal"===this.chartOptionsSeriesProxy.getValue("direction");return e&&"yAxis"===this.axisType||!e&&"xAxis"===this.axisType}getAxisPositionSelectParams(e){let t=((e,t)=>{if("heatmap"===e)return null;switch(t){case"xAxis":return[{value:"top",text:this.translate("top")},{value:"bottom",text:this.translate("bottom")}];case"yAxis":return[{value:"left",text:this.translate("left")},{value:"right",text:this.translate("right")}]}})(this.options.chartController.getChartType(),this.axisType);return t?e.getDefaultSelectParams("position","position",t):null}getAxisTimeFormatSelectParams(e){if(!this.isCategoryAxis())return null;let t=[{value:"%d/%m/%Y",text:this.translate("timeFormatSlashesDDMMYYYY")},{value:"%m/%d/%Y",text:this.translate("timeFormatSlashesMMDDYYYY")},{value:"%d/%m/%y",text:this.translate("timeFormatSlashesDDMMYY")},{value:"%m/%d/%y",text:this.translate("timeFormatSlashesMMDDYY")},{value:"%d.%e.%y",text:this.translate("timeFormatDotsDDMYY")},{value:"%e.%d.%y",text:this.translate("timeFormatDotsMDDYY")},{value:"%Y-%m-%d",text:this.translate("timeFormatDashesYYYYMMDD")},{value:"%d %B %Y",text:this.translate("timeFormatSpacesDDMMMMYYYY")},{value:"%H:%M:%S",text:this.translate("timeFormatHHMMSS")},{value:"%I:%M:%S %p",text:this.translate("timeFormatHHMMSSAmPm")}];return e.getDefaultSelectParams("label.format","timeFormat",t)}getAxisColorInputParams(e){return e.getDefaultColorPickerParams("line.stroke")}getAxisLineWidthSliderParams(e){let t=e.getChartOptions(),i=e=>{t.setValues([{expression:"line.enabled",value:null!=e},{expression:"line.width",value:e??0}])},r=e.getDefaultSliderParamsWithoutValueParams((t.getValue("line.enabled")?t.getValue("line.width"):null)??0,"thickness",10);return r.onValueChange=e=>{i(0===e?null:e)},r}initGridLines(e){if("heatmap"===this.options.chartController.getChartType())return;let t=this.createBean(new AO(e));this.axisGroup.addItem(t),this.activePanels.push(t)}initAxisTicks(e){if(!this.hasConfigurableAxisTicks())return;let t=this.createBean(new AN(e));this.axisGroup.addItem(t),this.activePanels.push(t)}hasConfigurableAxisTicks(){switch(this.options.chartController.getChartType()){case"radarLine":case"radarArea":case"rangeBar":case"boxPlot":case"waterfall":return!1;default:return!0}}initAxisLabels(e){let t={name:this.translate("labels"),enabled:!0,suppressEnabledCheckbox:!0,chartMenuParamsFactory:e,keyMapper:e=>`label.${e}`},i=this.createBean(new AF(t));this.axisGroup.addItem(i),this.activePanels.push(i),this.addAdditionalLabelComps(i,e)}addAdditionalLabelComps(e,t){this.addLabelPadding(e,t);let i=this.createRotationWidget("labelRotation",t),r=this.initLabelRotation(i,t);e.addItem(r),e.addItem(i)}initLabelRotation(e,t){let i=t.getChartOptions(),r=()=>i.getValue("label.rotation"),s="number"!=typeof r()&&i.getValue("label.autoRotate"),a=this.createBean(new ah({label:this.translate("autoRotate"),value:s,onValueChange:t=>{t&&(this.prevRotation=r()),i.setValues([{expression:"label.autoRotate",value:t},{expression:"label.rotation",value:t?void 0:this.prevRotation}]),e.setDisplayed(!t)}}));return e.setDisplayed(!s),a}createRotationWidget(e,t){let i=t.getChartOptions(),r=()=>i.getValue("label.rotation"),s=String.fromCharCode(176),a=new AP({label:`${this.chartTranslationService.translate(e)} ${s}`,labelWidth:"flex",value:r()??0,onValueChange:e=>i.setValue("label.rotation",e)});return this.axisLabelUpdateFuncs.push(()=>{a.setValue(r()??0)}),this.createBean(a)}addLabelPadding(e,t){let i=this.createBean(new TM(t.getDefaultSliderParams("label.padding","padding",30)));e.addItem(i)}translate(e){return this.chartTranslationService.translate(e)}removeTemplateComponent(e){sP(e.getGui()),this.destroyBean(e)}destroyActivePanels(){this.activePanels.forEach(e=>{sP(e.getGui()),this.destroyBean(e)})}destroy(){this.destroyActivePanels(),super.destroy()}},AG=class extends sQ{constructor(e){super(),this.options=e,this.axisGroup=null}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){let{isExpandedOnInit:e,chartAxisMenuParamsFactory:t,registerGroupComponent:i}=this.options,r={cssIdentifier:"charts-format-top-level",direction:"vertical",title:this.translate("polarAxis"),expanded:e,suppressEnabledCheckbox:!0},s=t.getDefaultColorPickerParams("line.stroke"),a=t.getDefaultSliderParams("line.width","thickness",10);this.setTemplate(`<div>
            <ag-group-component data-ref="axisGroup">
                <ag-color-picker data-ref="axisColorInput"></ag-color-picker>
                <ag-slider data-ref="axisLineWidthSlider"></ag-slider>
            </ag-group-component>
        </div>`,[I1,Tb,TE],{axisGroup:r,axisColorInput:s,axisLineWidthSlider:a}),i(this.axisGroup),this.initAxis(),this.initAxisLabels(),this.initRadiusAxis()}initAxis(){let e=this.options.chartController.getChartType();if(["radarLine","radarArea"].includes(e)){let e=[{value:"circle",text:this.translate("circle")},{value:"polygon",text:this.translate("polygon")}];this.axisGroup.addItem(this.createSelect({labelKey:"shape",options:e,property:"shape"}))}"pie"!==e&&this.axisGroup.addItem(this.createSlider({labelKey:"innerRadius",defaultMaxValue:1,property:"innerRadiusRatio"}))}initAxisLabels(){let e={name:this.translate("labels"),enabled:!0,suppressEnabledCheckbox:!0,chartMenuParamsFactory:this.options.chartAxisMenuParamsFactory,keyMapper:e=>`label.${e}`},t=this.createManagedBean(new AF(e)),i=this.createOrientationWidget();t.addItem(i),this.axisGroup.addItem(t)}createOrientationWidget(){let e=[{value:"fixed",text:this.translate("fixed")},{value:"parallel",text:this.translate("parallel")},{value:"perpendicular",text:this.translate("perpendicular")}];return this.createSelect({labelKey:"orientation",options:e,property:"label.orientation"})}initRadiusAxis(){if(!Tr(Td(this.options.chartController.getChartType()),"isRadial"))return;let e=[this.createSlider({labelKey:"groupPadding",defaultMaxValue:1,property:"paddingInner"}),this.createSlider({labelKey:"seriesPadding",defaultMaxValue:1,property:"groupPaddingInner"})],t=this.createManagedBean(new IQ({cssIdentifier:"charts-format-sub-level",direction:"vertical",suppressOpenCloseIcons:!0,enabled:!0,suppressEnabledCheckbox:!0,title:this.translate("padding"),items:e})).hideEnabledCheckbox(!0).hideOpenCloseIcons(!0);this.axisGroup.addItem(t)}createSlider(e){let{labelKey:t,defaultMaxValue:i,step:r=.05,property:s}=e,a=this.options.chartAxisMenuParamsFactory.getDefaultSliderParams(s,t,i);return a.step=r,this.createManagedBean(new TM(a))}createSelect(e){let{labelKey:t,options:i,property:r}=e;return this.createManagedBean(new op(this.options.chartAxisMenuParamsFactory.getDefaultSelectParams(r,t,i)))}translate(e){return this.chartTranslationService.translate(e)}},Az=class extends sQ{constructor(e){super(),this.chartMenuUtils=e}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){let e=this.chartMenuUtils.addEnableParams("background.visible",{cssIdentifier:"charts-format-sub-level",direction:"vertical",suppressOpenCloseIcons:!0,title:this.chartTranslationService.translate("background"),suppressEnabledCheckbox:!0,useToggle:!0}),t=this.chartMenuUtils.getDefaultColorPickerParams("background.fill");this.setTemplate(`<div>
            <ag-group-component data-ref="chartBackgroundGroup">
                <ag-color-picker data-ref="colorPicker"></ag-color-picker>
            </ag-group-component>
        <div>`,[I1,Tb],{chartBackgroundGroup:e,colorPicker:t})}},A_=class extends sQ{constructor(e,t){super(),this.chartMenuUtils=e,this.chartController=t,this.paddingTopSlider=null}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){let e={cssIdentifier:"charts-format-sub-level",direction:"vertical",suppressOpenCloseIcons:!0,title:this.chartTranslationService.translate("padding"),suppressEnabledCheckbox:!0},t=e=>this.chartMenuUtils.getDefaultSliderParams("padding."+e,e,200);this.setTemplate(`<div>
            <ag-group-component data-ref="chartPaddingGroup">
                <ag-slider data-ref="paddingTopSlider"></ag-slider>
                <ag-slider data-ref="paddingRightSlider"></ag-slider>
                <ag-slider data-ref="paddingBottomSlider"></ag-slider>
                <ag-slider data-ref="paddingLeftSlider"></ag-slider>
            </ag-group-component>
        <div>`,[I1,TE],{chartPaddingGroup:e,paddingTopSlider:t("top"),paddingRightSlider:t("right"),paddingBottomSlider:t("bottom"),paddingLeftSlider:t("left")}),this.addManagedEventListeners({chartOptionsChanged:e=>{this.updateTopPadding(e.chartOptions)}})}updateTopPadding(e){let t=[...this.chartController.getChartSeriesTypes(),"common"].map(t=>e[t]?.padding?.top).find(e=>null!=e);null!=t&&this.paddingTopSlider.setValue(`${t}`)}},AV=class extends sQ{constructor(e){super(),this.options=e,this.chartGroup=null}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){let{chartController:e,chartMenuParamsFactory:t,isExpandedOnInit:i,registerGroupComponent:r}=this.options,s={cssIdentifier:"charts-format-top-level",direction:"vertical",title:this.chartTranslationService.translate("chartStyle"),expanded:i,suppressEnabledCheckbox:!0,items:[this.createManagedBean(new A_(t,e)),this.createManagedBean(new Az(t))]};this.setTemplate(`<div>
            <ag-group-component data-ref="chartGroup"></ag-group-component>
        </div>`,[I1],{chartGroup:s}),r(this.chartGroup)}},Aj=class extends i2{constructor(e){super(),this.groupContainer=e,this.id=0,this.groupComponents=new Map}addGroupComponent(e){let t=this.id++;this.groupComponents.set(t,e),e.isExpanded()&&(this.expandedGroupComponent=t),e.onExpandedChange(i=>{if(i){let i=this.expandedGroupComponent;if(this.expandedGroupComponent=t,null!=i){let t=e.getGui(),r=t.offsetTop-this.groupContainer.parentElement.scrollTop;this.groupComponents.get(i)?.toggleGroupExpand(!1,!0);let s=t.offsetTop-r;s<0&&(s=0),s!==this.groupContainer.parentElement.scrollTop&&(this.groupContainer.parentElement.scrollTop=s)}}else this.expandedGroupComponent=void 0})}destroy(){this.groupComponents.clear(),super.destroy()}},AH=class extends sQ{constructor(e){super(),this.options=e,this.legendGroup=null,this.isGradient=["treemap","sunburst","heatmap"].includes(e.seriesType),this.key=this.isGradient?"gradientLegend":"legend"}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){let{chartMenuParamsFactory:e,isExpandedOnInit:t,registerGroupComponent:i}=this.options,r=this.createManagedBean(new op(e.getDefaultSelectParams(`${this.key}.position`,"position",["top","right","bottom","left"].map(e=>({value:e,text:this.chartTranslationService.translate(e)}))))),s=this.createManagedBean(new IQ(e.addEnableParams(`${this.key}.enabled`,{cssIdentifier:"charts-format-sub-level",direction:"vertical",suppressOpenCloseIcons:!0,title:this.chartTranslationService.translate("legendEnabled"),suppressEnabledCheckbox:!0,useToggle:!0,items:[this.createLabelPanel(e),r,...this.getItems(e)]}))),a={cssIdentifier:"charts-format-top-level",direction:"vertical",title:this.chartTranslationService.translate("legend"),suppressEnabledCheckbox:!0,expanded:t,items:[s]};this.setTemplate(`<div>
            <ag-group-component data-ref="legendGroup">
            </ag-group-component>
        </div>`,[I1],{legendGroup:a}),i(this.legendGroup)}getItems(e){let t=(t,i,r)=>this.createManagedBean(new TM(e.getDefaultSliderParams(`${this.key}.${t}`,i,r)));return this.isGradient?[this.createManagedBean(new ah(e.addValueParams("gradientLegend.reverseOrder",{label:this.chartTranslationService.translate("reverseDirection"),labelWidth:"flex"}))),t("gradient.thickness","thickness",40),t("gradient.preferredLength","preferredLength",300),t("spacing","spacing",200)]:[t("spacing","spacing",200),t("item.marker.size","markerSize",40),t("item.marker.strokeWidth","markerStroke",10),t("item.marker.padding","itemSpacing",20),t("item.paddingX","layoutHorizontalSpacing",50),t("item.paddingY","layoutVerticalSpacing",50)]}createLabelPanel(e){let t=this.isGradient?"gradientLegend.scale.label":"legend.item.label";return this.createManagedBean(new AF({enabled:!0,suppressEnabledCheckbox:!0,chartMenuParamsFactory:e,keyMapper:e=>`${t}.${e}`,cssIdentifier:"charts-format-sub-level-no-header"}))}},AU=class extends sQ{constructor(e){super(),this.chartMenuUtils=e}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){let e={cssIdentifier:"charts-format-sub-level",direction:"vertical",title:this.chartTranslationService.translate("callout"),enabled:!0,suppressOpenCloseIcons:!0,suppressEnabledCheckbox:!0};this.setTemplate(`<div>
            <ag-group-component data-ref="calloutGroup">
                <ag-slider data-ref="calloutLengthSlider"></ag-slider>
                <ag-slider data-ref="calloutStrokeWidthSlider"></ag-slider>
                <ag-slider data-ref="labelOffsetSlider"></ag-slider>
            </ag-group-component>
        </div>`,[I1,TE],{calloutGroup:e,calloutLengthSlider:this.chartMenuUtils.getDefaultSliderParams("calloutLine.length","length",40),calloutStrokeWidthSlider:this.chartMenuUtils.getDefaultSliderParams("calloutLine.strokeWidth","strokeWidth",10),labelOffsetSlider:this.chartMenuUtils.getDefaultSliderParams("calloutLabel.offset","offset",30)})}},AW=class extends sQ{constructor(e){super(),this.chartMenuUtils=e}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){let e={cssIdentifier:"charts-format-sub-level",direction:"vertical",title:this.chartTranslationService.translate("cap"),enabled:!0,suppressOpenCloseIcons:!0,suppressEnabledCheckbox:!0},t=this.chartMenuUtils.getDefaultSliderParams("cap.lengthRatio","capLengthRatio",1);t.step=.05,this.setTemplate(`<div>
            <ag-group-component data-ref="capsGroup">
                <ag-slider data-ref="capLengthRatioSlider"></ag-slider>
            </ag-group-component>
        </div>`,[I1,TE],{capsGroup:e,capLengthRatioSlider:t})}},A$=class extends sQ{constructor(e){super(),this.chartMenuUtils=e}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){let e={cssIdentifier:"charts-format-sub-level",direction:"vertical",title:this.chartTranslationService.translate("connectorLine"),enabled:!0,suppressOpenCloseIcons:!0,suppressEnabledCheckbox:!0};this.setTemplate(`<div>
            <ag-group-component data-ref="lineGroup">
                <ag-color-picker data-ref="lineColorPicker"></ag-color-picker>
                <ag-slider data-ref="lineStrokeWidthSlider"></ag-slider>
                <ag-slider data-ref="lineOpacitySlider"></ag-slider>
                <ag-slider data-ref="lineDashSlider"></ag-slider>                
            </ag-group-component>
        </div>`,[I1,Tb,TE],{lineGroup:e,lineColorPicker:this.chartMenuUtils.getDefaultColorPickerParams("line.stroke"),lineStrokeWidthSlider:this.getSliderParams("strokeWidth",10,"line.strokeWidth"),lineDashSlider:this.getSliderParams("lineDash",30,"line.lineDash",1,!0),lineOpacitySlider:this.getSliderParams("strokeOpacity",1,"line.strokeOpacity",.05)})}getSliderParams(e,t,i,r=1,s=!1){let a=this.chartMenuUtils.getDefaultSliderParams(i,e,t,s);return a.step=r,a}};function AY(e){return["square","circle","cross","diamond","plus","triangle","heart"].map(t=>({value:t,text:e.translate(t)}))}var AK=class extends sQ{constructor(e){super(),this.chartMenuUtils=e}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){let e=this.chartMenuUtils.addEnableParams("marker.enabled",{cssIdentifier:"charts-format-sub-level",direction:"vertical",title:this.chartTranslationService.translate("markers"),suppressEnabledCheckbox:!0,useToggle:!0,suppressOpenCloseIcons:!0});this.setTemplate(`<div>
            <ag-group-component data-ref="seriesMarkersGroup">
                <ag-select data-ref="seriesMarkerShapeSelect"></ag-select>
                <ag-slider data-ref="seriesMarkerSizeSlider"></ag-slider>
                <ag-slider data-ref="seriesMarkerStrokeWidthSlider"></ag-slider>
            </ag-group-component>
        </div>`,[I1,og,TE],{seriesMarkersGroup:e,seriesMarkerShapeSelect:this.chartMenuUtils.getDefaultSelectParams("marker.shape","shape",AY(this.chartTranslationService)),seriesMarkerSizeSlider:this.chartMenuUtils.getDefaultSliderParams("marker.size","size",60),seriesMarkerStrokeWidthSlider:this.chartMenuUtils.getDefaultSliderParams("marker.strokeWidth","strokeWidth",10)})}},AZ=class extends sQ{constructor(e){super(),this.chartMenuUtils=e,this.seriesItemsGroup=null,this.activePanels=[]}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){let e={cssIdentifier:"charts-format-sub-level",direction:"vertical",title:this.chartTranslationService.translate("seriesItems"),enabled:!0,suppressOpenCloseIcons:!0,suppressEnabledCheckbox:!0};this.setTemplate(`<div>
            <ag-group-component data-ref="seriesItemsGroup">
                <ag-select data-ref="seriesItemSelect"></ag-select>
            </ag-group-component>
        </div>`,[I1,og],{seriesItemsGroup:e,seriesItemSelect:this.getSeriesItemsParams()}),this.initSeriesControls()}getSeriesItemsParams(){let e=[{value:"positive",text:this.chartTranslationService.translate("seriesItemPositive")},{value:"negative",text:this.chartTranslationService.translate("seriesItemNegative")}];return this.chartMenuUtils.getDefaultSelectParamsWithoutValueParams("seriesItemType",e,"positive",e=>{this.destroyActivePanels(),this.initSeriesControls(e)})}initSeriesControls(e="positive"){this.initSlider("strokeWidth",10,`item.${e}.strokeWidth`),this.initSlider("lineDash",30,`item.${e}.lineDash`,1,!0),this.initSlider("strokeOpacity",1,`item.${e}.strokeOpacity`,.05,!1),this.initSlider("fillOpacity",1,`item.${e}.fillOpacity`,.05,!1),this.initItemLabels(e)}initSlider(e,t,i,r=1,s=!1){let a=this.chartMenuUtils.getDefaultSliderParams(i,e,t,s);a.step=r;let o=this.seriesItemsGroup.createManagedBean(new TM(a));this.seriesItemsGroup.addItem(o),this.activePanels.push(o)}initItemLabels(e){let t=this.chartMenuUtils.getDefaultFontPanelParams(`item.${e}.label`,"seriesItemLabels"),i=this.createBean(new AF(t));this.seriesItemsGroup.addItem(i),this.activePanels.push(i)}destroyActivePanels(){this.activePanels.forEach(e=>{sP(e.getGui()),this.destroyBean(e)})}destroy(){this.destroyActivePanels(),super.destroy()}},Aq=class extends sQ{constructor(e,t="shadow"){super(),this.chartMenuUtils=e,this.propertyKey=t}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){let e=this.propertyKey,t=this.chartMenuUtils.addEnableParams(`${e}.enabled`,{cssIdentifier:"charts-format-sub-level",direction:"vertical",suppressOpenCloseIcons:!0,title:this.chartTranslationService.translate("shadow"),suppressEnabledCheckbox:!0,useToggle:!0}),i=this.chartMenuUtils.getDefaultColorPickerParams(`${e}.color`);this.setTemplate(`<div>
            <ag-group-component data-ref="shadowGroup">
                <ag-color-picker data-ref="shadowColorPicker"></ag-color-picker>
                <ag-slider data-ref="shadowBlurSlider"></ag-slider>
                <ag-slider data-ref="shadowXOffsetSlider"></ag-slider>
                <ag-slider data-ref="shadowYOffsetSlider"></ag-slider>
            </ag-group-component>
        </div>`,[I1,Tb,TE],{shadowGroup:t,shadowColorPicker:i,shadowBlurSlider:this.getSliderParams("blur",0,20),shadowXOffsetSlider:this.getSliderParams("xOffset",-10,10),shadowYOffsetSlider:this.getSliderParams("yOffset",-10,10)})}getSliderParams(e,t,i){let r=`${this.propertyKey}.${e}`,s=this.chartMenuUtils.getDefaultSliderParams(r,e,i);return s.minValue=t,s}},AX=class extends sQ{constructor(e){super(),this.chartMenuUtils=e}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){let e={cssIdentifier:"charts-format-sub-level",direction:"vertical",enabled:!0,suppressOpenCloseIcons:!0,suppressEnabledCheckbox:!0};this.setTemplate(`<div>
            <ag-group-component data-ref="groupSpacing">
                <ag-slider data-ref="groupPaddingSlider"></ag-slider>
                <ag-slider data-ref="groupSpacingSlider"></ag-slider>
            </ag-group-component>
            <ag-group-component data-ref="tileSpacing">
                <ag-slider data-ref="tilePaddingSlider"></ag-slider>
                <ag-slider data-ref="tileSpacingSlider"></ag-slider>
            </ag-group-component>
        </div>`,[I1,TE],{groupSpacing:{...e,title:this.chartTranslationService.translate("group")},tileSpacing:{...e,title:this.chartTranslationService.translate("tile")},groupPaddingSlider:this.getSliderParams("padding","group.padding"),groupSpacingSlider:this.getSliderParams("spacing","group.gap"),tilePaddingSlider:this.getSliderParams("padding","tile.padding"),tileSpacingSlider:this.getSliderParams("spacing","tile.gap")})}getSliderParams(e,t){return this.chartMenuUtils.getDefaultSliderParams(t,e,10)}},AQ=class extends sQ{constructor(e){super(),this.chartMenuUtils=e}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){let e={cssIdentifier:"charts-format-sub-level",direction:"vertical",title:this.chartTranslationService.translate("whisker"),enabled:!0,suppressOpenCloseIcons:!0,suppressEnabledCheckbox:!0};this.setTemplate(`<div>
            <ag-group-component data-ref="whiskersGroup">
                <ag-color-picker data-ref="whiskerColorPicker"></ag-color-picker>
                <ag-slider data-ref="whiskerThicknessSlider"></ag-slider>
                <ag-slider data-ref="whiskerOpacitySlider"></ag-slider>
                <ag-slider data-ref="whiskerLineDashSlider"></ag-slider>
                <ag-slider data-ref="whiskerLineDashOffsetSlider"></ag-slider>
            </ag-group-component>
        </div>`,[I1,Tb,TE],{whiskersGroup:e,whiskerColorPicker:this.chartMenuUtils.getDefaultColorPickerParams("whisker.stroke"),whiskerThicknessSlider:this.chartMenuUtils.getDefaultSliderParams("whisker.strokeWidth","strokeWidth",10),whiskerOpacitySlider:this.chartMenuUtils.getDefaultSliderParams("whisker.strokeOpacity","strokeOpacity",1),whiskerLineDashSlider:this.chartMenuUtils.getDefaultSliderParams("whisker.lineDash","lineDash",30,!0),whiskerLineDashOffsetSlider:this.chartMenuUtils.getDefaultSliderParams("whisker.lineDashOffset","lineDashOffset",30)})}},AJ="tooltips",A0="strokeWidth",A1="lineDash",A2="lineOpacity",A3="fillOpacity",A4="labels",A6="shadow",A5=class extends sQ{constructor(e){super(),this.options=e,this.seriesGroup=null,this.activePanels=[],this.widgetFuncs={lineWidth:()=>this.initStrokeWidth("lineWidth"),[A0]:()=>this.initStrokeWidth("strokeWidth"),lineColor:()=>this.initLineColor(),[A1]:()=>this.initLineDash(),[A2]:()=>this.initOpacity("strokeOpacity"),[A3]:()=>this.initOpacity("fillOpacity"),markers:()=>new AK(this.chartMenuUtils),[A4]:()=>this.initLabels(),sectorLabels:()=>this.initSectorLabels(),[A6]:()=>new Aq(this.chartMenuUtils),[AJ]:()=>this.initTooltips(),bins:()=>this.initBins(),whiskers:()=>new AQ(this.chartMenuUtils),caps:()=>new AW(this.chartMenuUtils),connectorLine:()=>new A$(this.chartMenuUtils),seriesItems:()=>new AZ(this.chartMenuUtils),tileSpacing:()=>new AX(this.chartMenuUtils),shape:()=>this.initShape(),size:()=>this.initSize("size","size"),minSize:()=>this.initSize("size","minSize"),maxSize:()=>this.initSize("maxSize","maxSize")},this.seriesWidgetMappings={bar:[AJ,A0,A1,A2,A3,A4,A6],pie:[AJ,A0,A2,A3,A4,"sectorLabels",A6],donut:[AJ,A0,A2,A3,A4,"sectorLabels",A6],line:[AJ,"lineWidth",A1,A2,"markers",A4],scatter:[AJ,"shape","size",A0,A4],bubble:[AJ,"shape","minSize","maxSize",A0,A4],area:[AJ,"lineWidth",A1,A2,A3,"markers",A4,A6],histogram:[AJ,"bins",A0,A1,A2,A3,A4,A6],"radial-column":[AJ,A0,A1,A2,A3,A4],"radial-bar":[AJ,A0,A1,A2,A3,A4],"radar-line":[AJ,A0,A1,A2,"markers",A4],"radar-area":[AJ,A0,A1,A2,A3,"markers",A4],nightingale:[AJ,A0,A1,A2,A3,A4],"box-plot":[AJ,A0,A1,A2,A3,"whiskers","caps"],"range-bar":[AJ,A0,A1,A2,A3,A4],"range-area":[AJ,"lineWidth",A1,A2,A3,"markers",A4,A6],treemap:[AJ,"tileSpacing"],sunburst:[AJ],heatmap:[AJ,A4,"lineColor","lineWidth",A2],waterfall:[AJ,"connectorLine","seriesItems"]},this.seriesType=e.seriesType}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){let{isExpandedOnInit:e,chartOptionsService:t,chartController:i,registerGroupComponent:r}=this.options,s={cssIdentifier:"charts-format-top-level",direction:"vertical",title:this.translate("series"),expanded:e,suppressEnabledCheckbox:!0};this.setTemplate(`<div>
            <ag-group-component data-ref="seriesGroup">
            </ag-group-component>
        </div>`,[I1],{seriesGroup:s}),r(this.seriesGroup),this.chartMenuUtils=this.createManagedBean(new AI(t.getSeriesOptionsProxy(()=>this.seriesType))),this.addManagedListeners(i,{chartSeriesChartTypeChanged:this.refreshWidgets.bind(this)}),this.refreshWidgets()}refreshWidgets(){let{chartController:e}=this.options;this.destroyActivePanels(),e.getChartProxy().getChart().waitForUpdate().then(()=>{this.isAlive()&&(e.isComboChart()&&(this.updateSeriesType(),this.initSeriesSelect()),(this.seriesWidgetMappings[this.seriesType]??[]).forEach(e=>{let t;let i=this.widgetFuncs[e]();if(Array.isArray(i)){let e=this.createBean(i[0]);t=e,i[1](e)}else t=this.createBean(i);this.seriesGroup.addItem(t),this.activePanels.push(t)}))}).catch(e=>tB("chart rendering failed",e))}initSeriesSelect(){let e=this.createBean(new op(this.chartMenuUtils.getDefaultSelectParamsWithoutValueParams("seriesType",this.getSeriesSelectOptions(),`${this.seriesType}`,e=>{this.seriesType=e,this.refreshWidgets()})));this.seriesGroup.addItem(e),this.activePanels.push(e)}initTooltips(){return new hn(this.chartMenuUtils.addValueParams("tooltip.enabled",{label:this.translate("tooltips"),labelAlignment:"left",labelWidth:"flex",inputWidth:"flex"}))}initLineColor(){return new Tw(this.chartMenuUtils.getDefaultColorPickerParams("stroke","strokeColor"))}initStrokeWidth(e){return new TM(this.chartMenuUtils.getDefaultSliderParams("strokeWidth",e,10))}initLineDash(){return new TM(this.chartMenuUtils.getDefaultSliderParams("lineDash","lineDash",30,!0))}initOpacity(e){let t=this.chartMenuUtils.getDefaultSliderParams(e,e,1);return t.step=.05,new TM(t)}initLabels(){let e=Tc(this.seriesType);return[new AF(this.chartMenuUtils.getDefaultFontPanelParams(e?"calloutLabel":"label",e?"calloutLabels":"labels")),t=>{if(e){let e=t.createManagedBean(new AU(this.chartMenuUtils));t.addItem(e),this.activePanels.push(e)}if("range-bar"===this.seriesType){let e=[{value:"inside",text:this.translate("inside")},{value:"outside",text:this.translate("outside")}],i=t.createManagedBean(new op(this.chartMenuUtils.getDefaultSelectParams("label.placement","labelPlacement",e)));t.addItem(i),this.activePanels.push(i);let r=t.createManagedBean(new TM(this.chartMenuUtils.getDefaultSliderParams("label.padding","padding",200)));t.addItem(r),this.activePanels.push(r)}}]}initSectorLabels(){return[new AF(this.chartMenuUtils.getDefaultFontPanelParams("sectorLabel","sectorLabels")),e=>{let t=this.chartMenuUtils.getDefaultSliderParams("sectorLabel.positionRatio","positionRatio",1);t.step=.05;let i=e.createManagedBean(new TM(t));e.addItem(i)}]}initBins(){let e=this.chartMenuUtils.getDefaultSliderParams("binCount","histogramBinCount",20),t=this.chartMenuUtils.getChartOptions(),i=(t.getValue("bins")??t.getValue("calculatedBins",!0)).length;return e.value=`${i}`,e.maxValue=Math.max(i,20),new TM(e)}initShape(){return new op(this.chartMenuUtils.getDefaultSelectParams("shape","shape",AY(this.chartTranslationService)))}initSize(e,t){return new TM(this.chartMenuUtils.getDefaultSliderParams(e,t,60))}getSeriesSelectOptions(){let e=this.getActiveSeriesTypes();return["area","bar","line"].filter(t=>e.includes(t)).map(e=>({value:e,text:this.translate(e)}))}updateSeriesType(){let e=this.getActiveSeriesTypes();!e.includes(this.seriesType)&&e.length>0&&(this.seriesType=e[0])}getActiveSeriesTypes(){return this.options.chartController.getActiveSeriesChartTypes().map(e=>Td(e.chartType))}translate(e){return this.chartTranslationService.translate(e)}destroyActivePanels(){this.activePanels.forEach(e=>{sP(e.getGui()),this.destroyBean(e)})}destroy(){this.destroyActivePanels(),super.destroy()}},A8=class extends sQ{constructor(e,t,i){super("<div></div>"),this.chartMenuUtils=e,this.name=t,this.key=i,this.chartOptions=e.getChartOptions()}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){this.initFontPanel()}hasTitle(){let e=this.chartOptions.getValue(this.key);return e&&e.enabled&&e.text&&e.text.length>0}initFontPanel(){let e=this.hasTitle(),t={name:this.chartTranslationService.translate(this.name),enabled:e,suppressEnabledCheckbox:!1,chartMenuParamsFactory:this.chartMenuUtils,keyMapper:e=>`${this.key}.${e}`,onEnableChange:e=>this.onEnableChange(e)};this.fontPanel=this.createManagedBean(new AF(t)),this.fontPanel.addItem(this.createBean(new ow(this.getTextInputParams())),!0),this.fontPanel.addItem(this.createBean(new TM(this.getSpacingSliderParams()))),this.getGui().appendChild(this.fontPanel.getGui())}getTextInputParams(){return this.chartMenuUtils.addValueParams(`${this.key}.text`,{label:this.chartTranslationService.translate("title"),labelAlignment:"top"})}getSpacingSliderParams(){return this.chartMenuUtils.getDefaultSliderParams(`${this.key}.spacing`,"spacing",100)}onEnableChange(e){this.chartOptions.setValue(`${this.key}.enabled`,e)}},A7=class extends A8{wireBeans(e){super.wireBeans(e),this.chartMenuService=e.chartMenuService}postConstruct(){this.titlePlaceholder=this.chartTranslationService.translate("titlePlaceholder"),super.postConstruct(),this.addManagedEventListeners({chartTitleEdit:()=>{this.fontPanel.setEnabled(this.hasTitle())}})}getTextInputParams(){let e=super.getTextInputParams();return this.shouldOverrideTextWithPlaceholder(e.value)&&(e.value=this.titlePlaceholder),e}getSpacingSliderParams(){let e=super.getSpacingSliderParams();return e.value="10",e}onEnableChange(e){if(this.chartMenuService.doesChartToolbarExist()){let t=this.chartOptions.getValue("padding.top");this.chartOptions.setValue("padding.top",e?t-20:t+20)}this.chartOptions.setValue(`${this.key}.enabled`,e);let t=this.chartOptions.getValue(`${this.key}.text`);e&&this.shouldOverrideTextWithPlaceholder(t)&&this.chartOptions.setValue(`${this.key}.text`,this.titlePlaceholder)}shouldOverrideTextWithPlaceholder(e){return"Title"===e||e?.trim().length===0}},A9=class extends sQ{constructor(e){super(),this.options=e,this.titleGroup=null}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){let{chartMenuParamsFactory:e,chartAxisMenuParamsFactory:t,chartOptionsService:i,seriesType:r,isExpandedOnInit:s=!1,registerGroupComponent:a}=this.options,o=[];if(Ta(r)){let e=e=>this.createManagedBean(new AI(i.getCartesianAxisThemeOverridesProxy(e)));o.push(this.createManagedBean(new A8(e("xAxis"),"horizontalAxisTitle","title"))),o.push(this.createManagedBean(new A8(e("yAxis"),"verticalAxisTitle","title")))}else To(r)&&o.push(this.createManagedBean(new A8(t,"polarAxisTitle","title")));let n={cssIdentifier:"charts-format-top-level",direction:"vertical",title:this.chartTranslationService.translate("chartTitles"),expanded:s,suppressEnabledCheckbox:!0,items:[this.createManagedBean(new A7(e,"chartTitle","title")),this.createManagedBean(new A8(e,"chartSubtitle","subtitle")),...o]};this.setTemplate(`<div>
            <ag-group-component data-ref="titleGroup"></ag-group-component>
        </div>`,[I1],{titleGroup:n}),a(this.titleGroup)}},Re={groups:[{type:"chart"},{type:"titles"},{type:"legend"},{type:"series"},{type:"axis"}]},Rt=class extends sQ{constructor(e){super('<div class="ag-chart-format-wrapper"></div>'),this.chartMenuContext=e}postConstruct(){this.groupExpansionFeature=this.createManagedBean(new Aj(this.getGui())),this.chartPanelFeature=this.createManagedBean(new Tf(this.chartMenuContext.chartController,this.getGui(),"ag-chart-format-section",(e,t)=>this.createPanels(t))),this.chartPanelFeature.refreshPanels()}createPanels(e){let t=!1;this.getFormatPanelDef().groups?.forEach(({type:i,isOpen:r=!1})=>{if(!this.isGroupPanelShownInSeries(i,e))return;r&&(t&&tO(`As of v32, only one charts customize panel group can be expanded at a time. '${i}' will not be expanded.`),t=!0);let s={...this.chartMenuContext,isExpandedOnInit:r,seriesType:e,registerGroupComponent:e=>this.groupExpansionFeature.addGroupComponent(e)};switch(i){case"chart":this.chartPanelFeature.addComponent(new AV(s));break;case"titles":this.chartPanelFeature.addComponent(new A9(s));break;case"legend":this.chartPanelFeature.addComponent(new AH(s));break;case"axis":To(e)?this.chartPanelFeature.addComponent(new AG(s)):Ta(e)&&(this.chartPanelFeature.addComponent(new AB("xAxis",s)),this.chartPanelFeature.addComponent(new AB("yAxis",s)));break;case"horizontalAxis":this.chartPanelFeature.addComponent(new AB("xAxis",s));break;case"verticalAxis":this.chartPanelFeature.addComponent(new AB("yAxis",s));break;case"series":this.chartPanelFeature.addComponent(new A5(s));break;case"navigator":tO("'navigator' is now displayed in the charts advanced settings instead of the customize panel, and this setting will be ignored.");break;default:tO(`Invalid charts customize panel group name supplied: '${i}'`)}})}getFormatPanelDef(){return this.gos.get("chartToolPanelsDef")?.formatPanel||Re}isGroupPanelShownInSeries(e,t){return["chart","titles","legend","series"].includes(e)||Ta(t)&&["axis","horizontalAxis","verticalAxis"].includes(e)||To(t)&&"axis"===e}};function Ri(e){let{stacked:t,size:i,padding:r,xScalePadding:s,xScaleDomain:a,yScaleDomain:o}=e,n=new It.BandScale;n.domain=a,n.range=[r,i-r],n.paddingInner=s,n.paddingOuter=s;let l=new It.LinearScale;l.domain=o,l.range=[i-r,r];let h=(e,t,i)=>e.map((e,r)=>{let s=i.convert(e),a=new It.Rect;return a.x=t.convert(r),a.y=s,a.width=t.bandwidth,a.height=i.convert(0)-s,a.strokeWidth=0,a.crisp=!0,a});return t?e.data.map(e=>h(e,n,l)):h(e.data,n,l)}function Rr(e,t,i,r){let s=new It.LinearScale;s.domain=[0,4],s.range=[r,i-r];let a=new It.LinearScale;a.domain=[0,10],a.range=[i-r,r];let o=t.map(e=>{let t=new It.Path;return t.strokeWidth=3,t.lineCap="round",t.fill=void 0,e.forEach((e,i)=>{t.path[i>0?"lineTo":"moveTo"](s.convert(i),a.convert(e))}),t}),n=new It.Group;return n.setClipRectInGroupCoordinateSpace(new It.BBox(r,r,i-2*r,i-2*r)),n.append(o),e.append(n),o}function Rs(e,t,i,r,s,a=0){let o=new It.LinearScale;o.domain=[0,7],o.range=[-Math.PI,Math.PI].map(e=>e+Math.PI/2);let n=new It.LinearScale;n.domain=[0,10],n.range=[r,s];let l=[],h=i/2,d=t.map(e=>{let t=new It.Path;return t.strokeWidth=1,t.strokeOpacity=.5,t.lineCap="round",t.fill=void 0,t.fillOpacity=.8,e.forEach((e,i)=>{let d=o.convert(i),c=r+s-n.convert(e),u=c*Math.cos(d)+h,p=c*Math.sin(d)+h;if(t.path[i>0?"lineTo":"moveTo"](u,p),a>0){let e=new It.Circle;e.x=u,e.y=p,e.size=a,l.push(e)}}),t.path.closePath(),t}),c=new It.Group;return c.append([...d,...l]),e.append(c),{paths:d,markers:l}}function Ra(e){let[t,i]=[1/0,-1/0];return{processedData:e.reduce((e,r,s)=>{let a=s>0?e[s-1]:void 0;e[s]??(e[s]=[]);let o=e[s];return r.forEach((e,r)=>{a&&(e+=a[r]),o[r]=e,o[r]<t&&(t=o[r]),o[r]>i&&(i=o[r])}),e},[]),min:t,max:i}}var Ro=class extends sQ{constructor(e,t){super(),this.tooltipName=t,this.size=58,this.padding=5,this.root=new It.Group;let i=new It.Scene({width:this.size,height:this.size});i.canvas.element.classList.add("ag-chart-mini-thumbnail-canvas"),i.setRoot(this.root),i.setContainer(e),this.scene=i}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){this.scene.canvas.element.title=this.chartTranslationService.translate(this.tooltipName),this.scene.render().catch(e=>{tB("AG Grid - chart update failed",e)})}},Rn=class extends Ro{constructor(e,t){super(e,t),this.stroke="gray",this.axisOvershoot=3}postConstruct(){let e=this.size,t=this.padding,i=new It.Line;i.x1=t,i.y1=t,i.x2=t,i.y2=e-t+this.axisOvershoot,i.stroke=this.stroke;let r=new It.Line;r.x1=t-this.axisOvershoot+1,r.y1=e-t,r.x2=e-t+1,r.y2=e-t,r.stroke=this.stroke;let s=this.root;s.append(i),s.append(r),super.postConstruct()}},Rl=class extends Rn{constructor(e,t,i){super(e,"groupedColumnTooltip"),this.columnData=[2,3,4];let{root:r,columnData:s,size:a,padding:o}=this;this.columns=Ri({stacked:!1,root:r,data:s,size:a,padding:o,xScaleDomain:[0,1,2],yScaleDomain:[0,4],xScalePadding:.3}),r.append(this.columns),this.updateColors(t,i)}updateColors(e,t){this.columns.forEach((i,r)=>{i.fill=e[r],i.stroke=t[r]})}};Rl.chartType="groupedColumn";var Rh=class e extends Rn{constructor(t,i,r,s,a,o=e.data,n=[0,16],l="stackedColumnTooltip"){super(t,l);let{root:h,size:d,padding:c}=this;this.stackedColumns=Ri({stacked:!0,root:h,data:o,size:d,padding:c,xScaleDomain:[0,1,2],yScaleDomain:n,xScalePadding:.3}),h.append([].concat.apply([],this.stackedColumns)),this.updateColors(i,r)}updateColors(e,t){this.stackedColumns.forEach((i,r)=>i.forEach(i=>{i.fill=e[r],i.stroke=t[r]}))}};Rh.chartType="stackedColumn",Rh.data=[[8,12,16],[6,9,12],[2,3,4]];var Rd=Rh,Rc=class e extends Rd{constructor(t,i,r,s,a){super(t,i,r,s,a,e.data,[0,10],"normalizedColumnTooltip")}};Rc.chartType="normalizedColumn",Rc.data=[[10,10,10],[6,7,8],[2,4,6]];var Ru=class extends Rn{constructor(e,t,i){super(e,"groupedBarTooltip");let r=this.padding,s=this.size,a=new It.BandScale;a.domain=[0,1,2],a.range=[r,s-r],a.paddingInner=.3,a.paddingOuter=.3;let o=new It.LinearScale;o.domain=[0,4],o.range=[s-r,r];let n=o.convert(0),l=a.bandwidth;this.bars=[2,3,4].map((e,t)=>{let i=new It.Rect;return i.x=r,i.y=a.convert(t),i.width=n-o.convert(e),i.height=l,i.strokeWidth=0,i.crisp=!0,i}),this.updateColors(t,i),this.root.append(this.bars)}updateColors(e,t){this.bars.forEach((i,r)=>{i.fill=e[r],i.stroke=t[r]})}};Ru.chartType="groupedBar";var Rp=class e extends Rn{constructor(t,i,r,s,a,o=e.data,n=[0,16],l="stackedBarTooltip"){super(t,l);let h=this.size,d=this.padding,c=new It.BandScale;c.domain=[0,1,2],c.range=[d,h-d],c.paddingInner=.3,c.paddingOuter=.3;let u=new It.LinearScale;u.domain=n,u.range=[h-d,d];let p=u.convert(0),g=c.bandwidth;this.bars=o.map(e=>e.map((e,t)=>{let i=new It.Rect;return i.x=d,i.y=c.convert(t),i.width=p-u.convert(e),i.height=g,i.strokeWidth=0,i.crisp=!0,i})),this.updateColors(i,r),this.root.append([].concat.apply([],this.bars))}updateColors(e,t){this.bars.forEach((i,r)=>i.forEach(i=>{i.fill=e[r],i.stroke=t[r]}))}};Rp.chartType="stackedBar",Rp.data=[[8,12,16],[6,9,12],[2,3,4]];var Rg=Rp,Rm=class e extends Rg{constructor(t,i,r,s,a){super(t,i,r,s,a,e.data,[0,10],"normalizedBarTooltip")}};Rm.chartType="normalizedBar",Rm.data=[[10,10,10],[6,7,8],[2,4,6]];var Rf=It.toRadians,Rv=class extends Ro{constructor(e,t,i,r,s,a=.6,o="donutTooltip"){super(e,o);let n=(this.size-2*this.padding)/2,l=n+this.padding,h=[[Rf(-90),Rf(30)],[Rf(30),Rf(120)],[Rf(120),Rf(180)],[Rf(180),Rf(210)],[Rf(210),Rf(240)],[Rf(240),Rf(270)]];this.sectors=h.map(([e,t])=>{let i=new It.Sector;return i.centerX=l,i.centerY=l,i.innerRadius=n*a,i.outerRadius=n,i.startAngle=e,i.endAngle=t,i.stroke=void 0,i.strokeWidth=0,i.inset=.75,i}),this.updateColors(t,i),this.root.append(this.sectors)}updateColors(e,t){this.sectors.forEach((i,r)=>{i.fill=e[r%e.length],i.stroke=t[r%t.length]})}};Rv.chartType="donut";var Ry=class extends Rv{constructor(e,t,i,r,s){super(e,t,i,r,s,0,"pieTooltip")}};Ry.chartType="pie";var RC=class extends Rn{constructor(e,t,i){super(e,"lineTooltip"),this.data=[[9,7,8,5,6],[5,6,3,4,1],[1,3,4,8,7]],this.lines=Rr(this.root,this.data,this.size,this.padding),this.updateColors(t,i)}updateColors(e,t){this.lines.forEach((t,i)=>{t.stroke=e[i]})}};RC.chartType="line";var Rw=class extends Rn{constructor(e,t,i){super(e,"scatterTooltip");let r=this.size,s=this.padding,a=new It.LinearScale;a.domain=[-.5,4],a.range=[2*s,r-s];let o=new It.LinearScale;o.domain=[-.5,3.5],o.range=[r-s,s];let n=[];[[[.3,3],[1.1,.9],[2,.4],[3.4,2.4]],[[0,.3],[1,2],[2.4,1.4],[3,0]]].forEach(e=>{e.forEach(([e,t])=>{let i=new It.Arc;i.strokeWidth=0,i.centerX=a.convert(e),i.centerY=o.convert(t),i.radius=2.5,n.push(i)})}),this.points=n,this.updateColors(t,i);let l=new It.Group;l.setClipRectInGroupCoordinateSpace(new It.BBox(s,s,r-2*s,r-2*s)),l.append(this.points),this.root.append(l)}updateColors(e,t){this.points.forEach((i,r)=>{i.stroke=t[r%t.length],i.fill=e[r%e.length]})}};Rw.chartType="scatter";var Rb=class extends Rn{constructor(e,t,i){super(e,"bubbleTooltip");let r=this.size,s=this.padding,a=new It.LinearScale;a.domain=[0,1],a.range=[2*s,r-s];let o=new It.LinearScale;o.domain=[0,1],o.range=[r-s,s];let n=[];[[[.1,.3,5],[.5,.4,7],[.2,.8,7]],[[.8,.7,5],[.7,.3,9]]].forEach(e=>{e.forEach(([e,t,i])=>{let r=new It.Arc;r.strokeWidth=0,r.centerX=a.convert(e),r.centerY=o.convert(t),r.radius=i,r.fillOpacity=.7,n.push(r)})}),this.points=n,this.updateColors(t,i);let l=new It.Group;l.setClipRectInGroupCoordinateSpace(new It.BBox(s,s,r-2*s,r-2*s)),l.append(this.points),this.root.append(l)}updateColors(e,t){this.points.forEach((i,r)=>{i.stroke=t[r%t.length],i.fill=e[r%e.length]})}};Rb.chartType="bubble";var RS=class e extends Rn{constructor(t,i,r,s,a,o=e.data){super(t,"groupedAreaTooltip");let n=this.size,l=this.padding,h=new It.BandScale;h.domain=[0,1,2],h.paddingInner=1,h.paddingOuter=0,h.range=[l+.5,n-l-.5];let d=new It.LinearScale;d.domain=[0,6],d.range=[n-l+.5,l];let c=2*o.length-1,u=[],p=d.convert(0);o.forEach((e,t)=>{let i=h.convert(t);e.forEach((e,r)=>{let s=d.convert(e),a=u[r]||(u[r]=[]);a[t]={x:i,y:s},a[c-t]={x:i,y:p}})}),this.areas=u.reverse().map(e=>{let t=new It.Path;t.strokeWidth=1,t.strokeOpacity=.75,t.fillOpacity=.7;let i=t.path;return i.clear(),e.forEach((e,t)=>i[t>0?"lineTo":"moveTo"](e.x,e.y)),i.closePath(),t}),this.updateColors(i,r),this.root.append(this.areas)}updateColors(e,t){this.areas.forEach((i,r)=>{i.fill=e[r],i.stroke=t[r]})}};RS.chartType="area",RS.data=[[1,3,5],[2,6,4],[5,3,1]];var Rx=class e extends Rn{constructor(t,i,r,s,a,o=e.data,n="stackedAreaTooltip"){super(t,n);let l=this.size,h=this.padding,d=new It.BandScale;d.domain=[0,1,2],d.paddingInner=1,d.paddingOuter=0,d.range=[h+.5,l-h-.5];let c=new It.LinearScale;c.domain=[0,16],c.range=[l-h+.5,h+.5];let u=2*o.length-1,p=[];o.forEach((e,t)=>{let i=d.convert(t),r=0;e.forEach((e,s)=>{let a=c.convert(r+e),o=p[s]||(p[s]=[]);o[t]={x:i,y:a},o[u-t]={x:i,y:c.convert(r)},r+=e})}),this.areas=p.map(e=>{let t=new It.Path;t.strokeWidth=0;let i=t.path;return i.clear(),e.forEach((e,t)=>i[t>0?"lineTo":"moveTo"](e.x,e.y)),i.closePath(),t}),this.updateColors(i,r),this.root.append(this.areas)}updateColors(e,t){this.areas.forEach((i,r)=>{i.fill=e[r],i.stroke=t[r]})}};Rx.chartType="stackedArea",Rx.data=[[2,3,2],[3,6,5],[6,2,2]];var RM=Rx,RE=class e extends RM{constructor(t,i,r,s,a,o=e.data){super(t,i,r,s,a,o,"normalizedAreaTooltip")}};RE.chartType="normalizedArea",RE.data=RM.data.map(e=>{let t=e.reduce((e,t)=>e+t,0);return e.map(e=>e/t*16)});var RD=class extends Rn{constructor(e,t,i){super(e,"histogramTooltip");let r=this.padding,s=this.size,a=[2,5,11,13,10,6,1],o=new It.LinearScale;o.domain=[0,a.length],o.range=[r,s-r];let n=new It.LinearScale;n.domain=[0,a.reduce((e,t)=>Math.max(e,t),0)],n.range=[s-r,r];let l=n.convert(0);this.bars=a.map((e,t)=>{let i=n.convert(e),r=o.convert(t),s=o.convert(t+1),a=new It.Rect;return a.x=r,a.y=i,a.width=s-r,a.height=l-i,a.strokeWidth=1,a.strokeOpacity=.75,a.crisp=!0,a}),this.updateColors(t,i),this.root.append(this.bars)}updateColors([e],[t]){this.bars.forEach(i=>{i.fill=e,i.stroke=t})}};RD.chartType="histogram";var RI=class extends Ro{constructor(e,t){super(e,t),this.stroke="gray",this.showRadiusAxisLine=!0,this.showAngleAxisLines=!0}postConstruct(){let e=this.size,t=this.padding,i=(e-2*t)/2,r=this.showAngleAxisLines?[i,.8*i,.6*i,.4*i]:[],s=new It.Line;s.x1=e/2,s.y1=t,s.x2=e/2,s.y2=e-t-i-r[r.length-1],s.stroke=this.stroke,s.strokeOpacity=.5,s.fill=void 0,s.visible=this.showRadiusAxisLine;let a=t+i;this.gridLines=r.map((e,t)=>{let i=new It.Path;return i.path.arc(a,a,e,0,2*Math.PI),i.strokeWidth=1,i.stroke=this.stroke,i.strokeOpacity=0===t?.5:.2,i.fill=void 0,i});let o=this.root;o.append(s),this.gridLines.length>0&&o.append(this.gridLines),super.postConstruct()}},Rk=class extends RI{constructor(e,t,i){super(e,"radialColumnTooltip"),this.data=[[6,8,10,2,6,5],[4,4,3,6,4,4],[5,4,2,9,8,9]],this.showRadiusAxisLine=!1;let{padding:r,size:s,data:a}=this,o=(s-2*r)/2,n=.4*o,l=new It.BandScale;l.domain=a[0].map((e,t)=>t),l.range=[0,2*Math.PI],l.paddingInner=0,l.paddingOuter=0;let h=.7*l.bandwidth,{processedData:d,max:c}=Ra(a),u=new It.LinearScale;u.domain=[0,c],u.range=[n,o];let p=this.size/2;this.series=d.map((e,t)=>{let i=0===t?void 0:d[t-1],r=new It.TranslatableGroup({zIndex:1e6}),s=e.map((e,t)=>{let r=i?.[t],s=u.convert(e),a=u.convert(r??0),d=l.convert(t),c=d+h,p=It.getRadialColumnWidth(d,c,o,.5,.5),g=new It.RadialColumnShape;return g.columnWidth=p,g.innerRadius=a,g.outerRadius=s,g.startAngle=d,g.endAngle=c,g.isBeveled=!0,g.axisInnerRadius=n,g.axisOuterRadius=o,g.stroke=void 0,g.strokeWidth=0,g});return r.append(s),r.translationX=p,r.translationY=p,r}),this.root.append(this.series),this.updateColors(t,i)}updateColors(e,t){this.series.forEach((i,r)=>{i.children?.forEach(i=>{i.fill=e[r%e.length],i.stroke=t[r%t.length]})})}};Rk.chartType="radialColumn";var RT=class extends RI{constructor(e,t,i){super(e,"radialBarTooltip"),this.data=[[6,8,10],[4,4,3],[5,4,2]],this.showRadiusAxisLine=!1;let r=(this.size-this.padding)/2,s=new It.BandScale;s.domain=this.data[0].map((e,t)=>t),s.range=[.4*r,r],s.paddingInner=.5,s.paddingOuter=0;let a=s.bandwidth,{processedData:o,max:n}=Ra(this.data),l=new It.LinearScale;l.domain=[0,Math.ceil(1.5*n)];let h=1.5*Math.PI,d=h+2*Math.PI;l.range=[h,d];let c=this.size/2;this.series=o.map((e,t)=>{let i=t<0?void 0:o[t-1],r=new It.Group({zIndex:1e6}),n=e.map((e,t)=>{let r=i?.[t]??0,o=s.convert(t),n=l.convert(r),h=l.convert(e),d=new It.Sector;return d.centerX=c,d.centerY=c,d.innerRadius=o-a,d.outerRadius=o,d.startAngle=n,d.endAngle=h,d.stroke=void 0,d.strokeWidth=0,d});return r.append(n),r}),this.root.append(this.series),this.updateColors(t,i)}updateColors(e,t){this.series.forEach((i,r)=>{i.children?.forEach(i=>{i.fill=e[r%e.length],i.stroke=t[r%t.length]})})}};RT.chartType="radialBar";var RA=class extends RI{constructor(e,t,i){super(e,"radarLineTooltip"),this.markerSize=4,this.data=[[8,7,8,7,8,8,7,8],[6,8,5,10,6,7,4,6],[0,3,3,5,4,4,2,0]],this.showRadiusAxisLine=!1;let r=(this.size-2*this.padding)/2,{paths:s,markers:a}=Rs(this.root,this.data,this.size,r,0,this.markerSize);this.lines=s,this.markers=a,this.updateColors(t,i)}updateColors(e,t){this.lines.forEach((i,r)=>{let s=this.data[r].length;i.stroke=e[r];let a=r*s;this.markers.slice(a,a+s).forEach(i=>{i.stroke=t[r],i.fill=e[r]})})}};RA.chartType="radarLine";var RR=class extends RI{constructor(e,t,i){super(e,"radarAreaTooltip"),this.data=[[8,10,5,7,4,1,5,8],[1,1,2,7,7,8,10,1],[4,5,9,9,4,2,3,4]],this.showRadiusAxisLine=!1;let r=(this.size-2*this.padding)/2,s=r-.3*this.size;this.areas=Rs(this.root,this.data,this.size,r,s).paths,this.updateColors(t,i)}updateColors(e,t){this.areas.forEach((i,r)=>{i.fill=e[r],i.stroke=t[r]})}};RR.chartType="radarArea";var RL=class extends RI{constructor(e,t,i){super(e,"nightingaleTooltip"),this.data=[[6,10,9,8,7,8],[4,6,5,4,5,5],[3,5,4,3,4,7]],this.showRadiusAxisLine=!1;let r=(this.size-2*this.padding)/2,s=new It.BandScale;s.domain=this.data[0].map((e,t)=>t),s.range=[-Math.PI,Math.PI],s.paddingInner=0,s.paddingOuter=0;let a=.7*s.bandwidth,{processedData:o,max:n}=Ra(this.data),l=new It.LinearScale;l.domain=[0,n],l.range=[0,r];let h=this.size/2;this.series=o.map((e,t)=>{let i=t<0?void 0:o[t-1],r=new It.Group({zIndex:1e6}),n=e.map((e,t)=>{let r=i?.[t],o=l.convert(e),n=l.convert(r??0),d=s.convert(t),c=d+a,u=new It.Sector;return u.centerX=h,u.centerY=h,u.innerRadius=n,u.outerRadius=o,u.startAngle=d,u.endAngle=c,u.stroke=void 0,u.strokeWidth=0,u});return r.append(n),r}),this.root.append(this.series),this.updateColors(t,i)}updateColors(e,t){this.series.forEach((i,r)=>{i.children?.forEach(i=>{i.fill=e[r%e.length],i.stroke=t[r%t.length]})})}};RL.chartType="nightingale";var RP=class extends Rn{constructor(e,t,i){super(e,"rangeBarTooltip"),this.bars=this.createRangeBar(this.root,[3,3.5,3],this.size,this.padding,"vertical"),this.updateColors(t,i)}updateColors(e,t){this.bars.forEach((i,r)=>{i.fill=e[r],i.stroke=t[r]})}createRangeBar(e,t,i,r,s){let a="horizontal"===s,o=2*r,n=new It.BandScale;n.domain=t.map((e,t)=>t),n.range=[r,i-r],n.paddingInner=.3,n.paddingOuter=.3;let l=new It.LinearScale;l.domain=[.7*t.reduce((e,t)=>Math.min(e,t),1/0),1.3*t.reduce((e,t)=>Math.max(e,t),0)],l.range=[o,i-o];let h=n.bandwidth,d=t.map((e,t)=>{let[i,r]=[.7*e,1.3*e],s=n.convert(t),o=l.convert(i),d=l.convert(r)-o,c=new It.Rect;return c.x=a?o:s,c.y=a?s:o,c.width=a?d:h,c.height=a?h:d,c.strokeWidth=0,c.crisp=!0,c});return e.append(d),d}};RP.chartType="rangeBar";var RF=class extends Rn{constructor(e,t,i){super(e,"rangeAreaTooltip");let r=[RN({offset:1.5,length:4,pattern:{low:3,high:5,period:4}}),RN({offset:1.5,length:4,pattern:{low:2.25,high:4.25,period:4}}),RN({offset:3,length:4,pattern:{low:2.5,high:4.5,period:4}})].map(e=>e.map(([e,t])=>({x:e,low:t-.875,high:t+.875}))),{lines:s,areas:a}=this.createRangeArea(this.root,r,this.size,this.padding);this.lines=s,this.areas=a,this.updateColors(t,i)}updateColors(e,t){e=RB(e,1,2),t=RB(t,1,2),this.lines.forEach(([e,i],r)=>{e.fill=void 0,e.stroke=t[r],i.fill=void 0,i.stroke=t[r]}),this.areas.forEach((t,i)=>{t.fill=e[i]})}createRangeArea(e,t,i,r){let s=t.reduce((e,t)=>t.reduce((e,{x:t})=>Math.min(e,t),e),1/0),a=t.reduce((e,t)=>t.reduce((e,{x:t})=>Math.max(e,t),e),-1/0),o=t.reduce((e,t)=>t.reduce((e,{low:t})=>Math.min(e,t),e),1/0),n=t.reduce((e,t)=>t.reduce((e,{high:t})=>Math.max(e,t),e),-1/0),l=new It.LinearScale;l.domain=[s,a],l.range=[r,i-r];let h=2*r,d=new It.LinearScale;d.domain=[o,n],d.range=[i-h,h];let c=[],u=[];return t.map(e=>{let t=new It.Path,i=new It.Path,r=new It.Path;return c.push([t,i]),u.push(r),t.strokeWidth=0,i.strokeWidth=0,r.strokeWidth=0,r.fillOpacity=.8,t.path.clear(),i.path.clear(),r.path.clear(),e.map((e,s)=>{let{x:a,low:o,high:n}=e,h=l.convert(a),c=d.convert(o),u=d.convert(n),p=s>0?"lineTo":"moveTo";return t.path[p](h,u),i.path[p](h,c),r.path[p](h,u),[h,c]})}).forEach((e,t)=>{let i=e.length-1,r=u[t];for(let t=i;t>=0;t--){let[i,s]=e[t];r.path.lineTo(i,s)}}),e.append(u.concat(...c)),{lines:c,areas:u}}};function RN(e){let{offset:t,length:i,pattern:r}=e,s=function(e,t,i){let{period:r}=i,s=e/r,o=[0,.5].map(e=>e-s).map(RO).sort((e,t)=>e-t);return Array.from({length:Math.floor(o.length*(r/t))},(e,t)=>o[t%o.length]+Math.floor(t/o.length)).map(e=>e*r).map(t=>[t,a(e+t,i)])}(t,i,r);return(0===s.length||0!==s[0][0])&&s.unshift([0,a(t+0,r)]),s[s.length-1][0]!==i&&s.push([i,a(t+i,r)]),s;function a(e,t){let{low:i,high:r,period:s}=t,a=RO(e/s);return i+(r-i)*(a>.5?1-2*(a-.5):2*a)}}function RO(e){let t=e%1;return t<0?t+1:t}function RB(e,t,i){let r=[...e],s=r[t];return r[t]=r[i],r[i]=s,r}RF.chartType="rangeArea";var RG=class extends Rn{constructor(e,t,i,r,s){super(e,"boxPlotTooltip");let a=this.padding,o=this.size,n=[11,11.5,10.5],l=new It.LinearScale;l.domain=[.8*n.reduce((e,t)=>Math.min(e,t),1/0),1.2*n.reduce((e,t)=>Math.max(e,t),0)],l.range=[o-1.5*a,a];let h=new It.BandScale;h.domain=n.map((e,t)=>t),h.range=[a,o-a],h.paddingInner=.4,h.paddingOuter=.2;let d=Math.round(h.bandwidth),c=Math.round(h.bandwidth/2);this.boxPlotGroups=n.map((e,t)=>{let[i,r,s,a]=[.8*e,.9*e,1.1*e,1.2*e],o=Math.round(l.convert(s)),n=Math.round(h.convert(t)),u=Math.round(n+d),p=Math.round(l.convert(r)),g=Math.round(l.convert(i)),m=Math.round(l.convert(e)),f=Math.round(l.convert(a)),v=n+c,y=new It.Group,C=new It.Rect,w=new It.Line,b=new It.Line,S=new It.Line,x=new It.Line,M=new It.Line;return C.x=n,C.y=o,C.width=d,C.height=p-o,C.strokeWidth=1,C.strokeOpacity=.75,C.crisp=!0,this.setLineProperties(w,n,u,m,m),this.setLineProperties(b,v,v,f,o),this.setLineProperties(S,v,v,g,p),this.setLineProperties(x,n,u,f,f),this.setLineProperties(M,n,u,g,g),y.append([C,w,b,S,x,M]),y}),this.updateColors(t,i,r,s),this.root.append(this.boxPlotGroups)}updateColors(e,t,i,r){let s=i?.get(Ip.DEFAULT_BACKGROUND_COLOUR),a=(Array.isArray(s)?s[0]:s)??"white";this.boxPlotGroups.forEach((i,s)=>{i.children?.forEach(i=>{let o=e[s%e.length];i.fill=r?o:If.interpolateColor(o,a)(.7),i.stroke=t[s%t.length]})})}setLineProperties(e,t,i,r,s){e.x1=t,e.x2=i,e.y1=r,e.y2=s,e.strokeOpacity=.75}};RG.chartType="boxPlot";var Rz=class extends Ro{constructor(e,t,i,r,s){super(e,"treemapTooltip");let{size:a,padding:o}=this,n=[[1,1],[3,2,1]],l=n.length%2==0?.3:.2,h=[o,a-o],d=n.length,c=d*(d+1)/2,u=l/(d-1),p=h[1]-h[0],g=p-l,m=h[0];this.rects=n.reduce((e,t,i)=>{e??(e=[]);let r=(d-i)/c*g,s=t.length,a=t.reduce((e,t)=>e+=t,0),o=l/(s-1||1),n=s>1?p-l:p,f=h[0],v=t.map(e=>{let t=new It.Rect,i=n*e/a;return t.x=m,t.y=f,t.width=r,t.height=i,t.strokeWidth=.75,t.crisp=!0,f+=i+o,t});return m+=r+u,e.push(...v),e},[]),this.updateColors(t,i,r,s);let f=new It.Group;f.setClipRectInGroupCoordinateSpace(new It.BBox(o,o,a-o,a-o)),f.append(this.rects),this.root.append(f)}updateColors(e,t,i,r){let s=i?.get(Ip.DEFAULT_BACKGROUND_COLOUR),a=(Array.isArray(s)?s[0]:s)??"white";this.rects.forEach((i,s)=>{i.fill=e[s%t.length],i.stroke=r?t[s%t.length]:a})}};Rz.chartType="treemap";var R_=class extends RI{constructor(e,t,i){super(e,"sunburstTooltip"),this.data=[[[],[]],[[],[]],[[],[]]],this.angleOffset=-Math.PI/2,this.innerRadiusRatio=0,this.showRadiusAxisLine=!1,this.showAngleAxisLines=!1;let{data:r,size:s,padding:a,angleOffset:o,innerRadiusRatio:n}=this,l=(s-2*a)/2,h=[o+0,o+2*Math.PI],d=Math.abs(h[1]-h[0]),c=[l*n,l],u=Math.abs(c[1]-c[0]),p=0,g=(e,t)=>{e.forEach(e=>{let i=t+1;p=Math.max(p,i),g(e,i)})};g(r,0);let m=u/p,f=this.size/2,v=h[0];this.series=[];let y=(e,t,i,r,s)=>{if(!Array.isArray(e))return;let a=t+1,o=i;e.forEach((e,i,n)=>{let l=s;l||(l=new It.Group,this.series.push(l));let h=c[0]+t*m,d=c[0]+a*m,u=1/n.length,p=o,g=p+r*u,v=new It.Sector;v.centerX=f,v.centerY=f,v.innerRadius=h,v.outerRadius=d,v.startAngle=p,v.endAngle=g,v.stroke=void 0,v.strokeWidth=0,v.inset=.75,o=g,l.append(v),y(e,a,p,Math.abs(g-p),l)})};y(r,0,v,d),this.root.append(this.series),this.updateColors(t,i)}updateColors(e,t){this.series.forEach((i,r)=>{i.children?.forEach(i=>{i.fill=e[r%e.length],i.stroke=t[r%t.length]})})}};R_.chartType="sunburst";var RV=class extends Ro{constructor(e,t,i,r,s){super(e,"heatmapTooltip");let{size:a,padding:o}=this,n=Array.from({length:3},(e,t)=>Array.from({length:3},(e,t)=>t)),l=n.map((e,t)=>t),h=new It.BandScale;h.domain=l,h.range=[o,a-o],h.paddingInner=.01,h.paddingOuter=.1;let d=new It.BandScale;d.domain=l,d.range=[o,a-o],d.paddingInner=.01,d.paddingOuter=.1;let c=h.bandwidth??0,u=d.bandwidth??0;this.rects=n.reduce((e,t,i)=>{e??(e=[]);let r=t.map((e,t)=>{let r=new It.Rect;return r.x=h.convert(i),r.y=d.convert(t),r.width=c,r.height=u,r.strokeWidth=0,r.crisp=!0,r});return e.push(...r),e},[]),this.updateColors(t,i,r,s);let p=new It.Group;p.setClipRectInGroupCoordinateSpace(new It.BBox(o,o,a-o,a-o)),p.append(this.rects),this.root.append(p)}updateColors(e,t,i,r){let s=i?.get(Ip.DEFAULT_DIVERGING_SERIES_COLOUR_RANGE),a=i?.get(Ip.DEFAULT_BACKGROUND_COLOUR),o=(Array.isArray(a)?a[0]:a)??"white",n=r?[e[0],e[1]]:s,l=r?t[0]:o,h=If.interpolateColor(n[0],n[1]);this.rects.forEach((e,t)=>{e.fill=h(.2*t),e.stroke=l})}};RV.chartType="heatmap";var Rj=class extends Rn{constructor(e,t,i,r,s){super(e,"waterfallTooltip"),this.data=[4,3,-3,6,-3],this.bars=this.createWaterfall(this.root,this.data,this.size,this.padding,"vertical").bars,this.updateColors(t,i,r,s)}updateColors(e,t,i,r){let{data:s}=this,a={fill:r?e[0]:i?.get(Ip.PALETTE_ALT_UP_FILL),stroke:r?t[0]:i?.get(Ip.PALETTE_ALT_UP_STROKE)},o={fill:r?e[1]:i?.get(Ip.PALETTE_ALT_DOWN_FILL),stroke:r?t[1]:i?.get(Ip.PALETTE_ALT_DOWN_STROKE)};this.bars.forEach((e,t)=>{let i=s[t]>=0;e.fill=i?a.fill:o.fill,e.stroke=i?a.stroke:o.stroke})}createWaterfall(e,t,i,r,s){let a=2*r,{processedData:o,min:n,max:l}=Ra(t.map(e=>[e])),h=o.reduce((e,t)=>e.concat(t),[]),d=new It.LinearScale;d.domain=[Math.min(n,0),l],d.range=[i-a,a];let c=new It.BandScale;c.domain=t.map((e,t)=>t),c.range=[r,i-r],c.paddingInner=.2,c.paddingOuter=.3;let u=c.bandwidth,p=new It.Path;p.stroke="#575757",p.strokeWidth=0;let g=Math.floor(p.strokeWidth)%2/2,m=p.path;m.clear();let f="horizontal"===s,v=h.map((e,i)=>{let r=i>0?h[i-1]:0,s=t[i]>0,a=Math.round(d.convert(e)),o=Math.round(d.convert(r)),n=(s?a:o)-g,l=Math.abs((s?o:a)+g-n),p=c.convert(i),v=new It.Rect;v.x=f?n:p,v.y=f?p:n,v.width=f?l:u,v.height=f?u:l,v.strokeWidth=0,v.crisp=!0;let y=a+g,C=o+g;if(i>0){let e=f?C:v.x,t=f?v.y:C;m.lineTo(e,t)}let w=f?y:v.x,b=f?v.y:y;return m.moveTo(w,b),v});return e.append([p,...v]),{bars:v}}};Rj.chartType="waterfall";var RH=class extends Rn{constructor(e,t,i){super(e,"columnLineComboTooltip"),this.columnData=[3,4],this.lineData=[[5,4,6,5,4]];let{root:r,columnData:s,lineData:a,size:o,padding:n}=this;this.columns=Ri({stacked:!1,root:r,data:s,size:o,padding:n,xScaleDomain:[0,1],yScaleDomain:[0,4],xScalePadding:.5}),r.append(this.columns),this.lines=Rr(r,a,o,n),this.updateColors(t,i)}updateColors(e,t){this.columns.forEach((i,r)=>{i.fill=e[r],i.stroke=t[r]}),this.lines.forEach((t,i)=>{t.stroke=e[i+2]})}};RH.chartType="columnLineCombo";var RU=class extends Rn{constructor(e,t,i){super(e,"areaColumnComboTooltip"),this.columnData=[3,4.5],this.areaData=[[5,4,6,5,4]];let{root:r,columnData:s,areaData:a,size:o,padding:n}=this;this.columns=Ri({stacked:!1,root:r,data:s,size:o,padding:n,xScaleDomain:[0,1],yScaleDomain:[0,6],xScalePadding:.5});let l=new It.BandScale;l.range=[n,o-n],l.domain=[0,1,2,3,4],l.paddingInner=1,l.paddingOuter=0;let h=new It.LinearScale;h.range=[o-n,n],h.domain=[0,6];let d=[],c=h.convert(0),u=l.convert(0);a.forEach((e,t)=>{let i=d[t]||(d[t]=[]);e.forEach((e,t)=>{let r=l.convert(t),s=h.convert(e);i[t]={x:r,y:s}});let r=l.convert(e.length-1);d[t].push({x:r,y:c},{x:u,y:c})}),this.areas=d.map(e=>{let t=new It.Path;t.strokeWidth=0,t.fillOpacity=.8;let i=t.path;return e.forEach((e,t)=>i[t>0?"lineTo":"moveTo"](e.x,e.y)),t}),r.append(this.areas),r.append([].concat.apply([],this.columns)),this.updateColors(t,i)}updateColors(e,t){this.areas.forEach((i,r)=>{i.fill=e[r],i.stroke=t[r]}),this.columns.forEach((i,r)=>{i.fill=e[r+1],i.stroke=t[r+1]})}};RU.chartType="areaColumnCombo";var RW=class extends Ro{constructor(e,t,i){super(e,"customComboTooltip"),this.columnData=[3,4],this.lineData=[[5,4,6,5,4]];let{root:r,columnData:s,lineData:a,size:o,padding:n}=this;this.columns=Ri({stacked:!1,root:r,data:s,size:o,padding:n,xScaleDomain:[0,1],yScaleDomain:[0,4],xScalePadding:.5}),r.append(this.columns),this.lines=Rr(r,a,o,n);let l="grey",h=new It.Line;h.x1=n,h.y1=n,h.x2=n,h.y2=o-n+3,h.stroke=l;let d=new It.Line;d.x1=n-3+1,d.y1=o-n,d.x2=o-n+1,d.y2=o-n,d.stroke=l;let c=new It.Path;this.buildPenIconPath(c),c.fill="whitesmoke",c.stroke="darkslategrey",c.strokeWidth=1,r.append([d,h,c]),this.updateColors(t,i)}updateColors(e,t){this.columns.forEach((i,r)=>{i.fill=e[r],i.stroke=t[r]}),this.lines.forEach((t,i)=>{t.stroke=e[i+2]})}buildPenIconPath(e){let{path:t}=e;t.moveTo(25.76,43.46),t.lineTo(31.27,48.53),t.moveTo(49.86,22),t.lineTo(49.86,22),t.cubicCurveTo(49.01994659053345,21.317514933510974,47.89593834348529,21.09645997825817,46.86,21.41),t.lineTo(46.86,21.41),t.cubicCurveTo(45.55460035985361,21.77260167850787,44.38777081121966,22.517979360321792,43.51,23.55),t.lineTo(25.51,43.8),t.lineTo(25.43,43.89),t.lineTo(23.01,51.89),t.lineTo(22.83,52.46),t.lineTo(31.02,48.86),t.lineTo(49.02,28.52),t.lineTo(49.02,28.52),t.cubicCurveTo(49.940716461596224,27.521914221246085,50.54302631059587,26.2720342455763,50.75,24.93),t.lineTo(50.75,24.93),t.cubicCurveTo(50.95363374988308,23.866379846512814,50.62080640232334,22.77066734274871,49.86,22),t.closePath(),t.moveTo(41.76,25.5),t.lineTo(47.34,30.5),t.moveTo(40.74,26.65),t.lineTo(46.25,31.71)}};RW.chartType="customCombo";var R$={columnGroup:{column:{range:!0,pivot:!0,enterprise:!1,icon:Rl},stackedColumn:{range:!0,pivot:!0,enterprise:!1,icon:Rd},normalizedColumn:{range:!0,pivot:!0,enterprise:!1,icon:Rc}},barGroup:{bar:{range:!0,pivot:!0,enterprise:!1,icon:Ru},stackedBar:{range:!0,pivot:!0,enterprise:!1,icon:Rg},normalizedBar:{range:!0,pivot:!0,enterprise:!1,icon:Rm}},pieGroup:{pie:{range:!0,pivot:!0,enterprise:!1,icon:Ry},donut:{range:!0,pivot:!0,enterprise:!1,icon:Rv},doughnut:{range:!0,pivot:!0,enterprise:!1,icon:Rv}},lineGroup:{line:{range:!0,pivot:!0,enterprise:!1,icon:RC}},scatterGroup:{scatter:{range:!0,pivot:!0,enterprise:!1,icon:Rw},bubble:{range:!0,pivot:!0,enterprise:!1,icon:Rb}},areaGroup:{area:{range:!0,pivot:!0,enterprise:!1,icon:RS},stackedArea:{range:!0,pivot:!0,enterprise:!1,icon:RM},normalizedArea:{range:!0,pivot:!0,enterprise:!1,icon:RE}},polarGroup:{radarLine:{range:!0,pivot:!1,enterprise:!0,icon:RA},radarArea:{range:!0,pivot:!1,enterprise:!0,icon:RR},nightingale:{range:!0,pivot:!1,enterprise:!0,icon:RL},radialColumn:{range:!0,pivot:!1,enterprise:!0,icon:Rk},radialBar:{range:!0,pivot:!1,enterprise:!0,icon:RT}},statisticalGroup:{boxPlot:{range:!0,pivot:!1,enterprise:!0,icon:RG},histogram:{range:!0,pivot:!1,enterprise:!1,icon:RD},rangeBar:{range:!0,pivot:!1,enterprise:!0,icon:RP},rangeArea:{range:!0,pivot:!1,enterprise:!0,icon:RF}},hierarchicalGroup:{treemap:{range:!0,pivot:!0,enterprise:!0,icon:Rz},sunburst:{range:!0,pivot:!0,enterprise:!0,icon:R_}},specializedGroup:{heatmap:{range:!0,pivot:!1,enterprise:!0,icon:RV},waterfall:{range:!0,pivot:!1,enterprise:!0,icon:Rj}},combinationGroup:{columnLineCombo:{range:!0,pivot:!0,enterprise:!1,icon:RH},areaColumnCombo:{range:!0,pivot:!0,enterprise:!1,icon:RU},customCombo:{range:!0,pivot:!0,enterprise:!1,icon:RW}}},RY={columnGroup:["column","stackedColumn","normalizedColumn"],barGroup:["bar","stackedBar","normalizedBar"],pieGroup:["pie","donut"],lineGroup:["line"],scatterGroup:["scatter","bubble"],areaGroup:["area","stackedArea","normalizedArea"],polarGroup:["radarLine","radarArea","nightingale","radialColumn","radialBar"],statisticalGroup:["boxPlot","histogram","rangeBar","rangeArea"],hierarchicalGroup:["treemap","sunburst"],specializedGroup:["heatmap","waterfall"],combinationGroup:["columnLineCombo","areaColumnCombo","customCombo"]},RK=class extends sQ{constructor(e,t,i,r,s,a=RY){super('<div class="ag-chart-settings-mini-wrapper"></div>'),this.wrappers=new Map,this.chartController=e,this.fills=t,this.strokes=i,this.themeTemplateParameters=r,this.isCustomTheme=s,this.chartGroups={...a}}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){!this.chartController.customComboExists()&&this.chartGroups.combinationGroup&&(this.chartGroups.combinationGroup=this.chartGroups.combinationGroup.filter(e=>"customCombo"!==e));let e=this.getGui(),t=this.chartController.isEnterprise(),i=this.chartController.isPivotChart(),r=!i;for(let{label:s,items:a}of Object.keys(this.chartGroups).map(e=>{let s=e in R$?R$[e]:void 0;if(!s)return tO(`invalid chartGroupsDef config '${e}'`),null;let a=(this.chartGroups[e]??[]).map(a=>{let o=a in s?s[a]:void 0;return o?!t&&o.enterprise?null:r&&o.range||i&&o.pivot?o:null:(tO(`invalid chartGroupsDef config '${e}.${a}'`),null)}).filter(e=>null!=e);return 0===a.length?null:{label:this.chartTranslationService.translate(e),items:a}}).filter(e=>null!=e)){let t=this.createBean(new IQ({title:s,suppressEnabledCheckbox:!0,enabled:!0,suppressOpenCloseIcons:!0,cssIdentifier:"charts-settings",direction:"horizontal",suppressKeyboardNavigation:!0}));for(let e of a){let i=e.icon,r=document.createElement("div");r.classList.add("ag-chart-mini-thumbnail"),r.setAttribute("tabindex","0"),r.setAttribute("role","button");let s=i.chartType,a=()=>{this.chartController.setChartType(s),this.updateSelectedMiniChart()};this.addManagedListeners(r,{click:a,keydown:e=>{(e.key==aa.ENTER||e.key===aa.SPACE)&&(e.preventDefault(),a())}}),this.wrappers.set(s,r),this.createBean(new i(r,this.fills,this.strokes,this.themeTemplateParameters,this.isCustomTheme)),t.addItem(r)}e.appendChild(t.getGui())}this.updateSelectedMiniChart()}updateSelectedMiniChart(){let e=this.chartController.getChartType();this.wrappers.forEach((t,i)=>{let r=i===e;t.classList.toggle("ag-selected",r);let s=this.chartTranslationService.translate(Tm(i));rJ(t,r?`${s}. ${this.chartTranslationService.translate("ariaChartSelected")}`:s)})}destroy(){this.wrappers.clear(),super.destroy()}},RZ=class extends sQ{constructor(e){super(`<div class="ag-chart-settings-wrapper">
            <div data-ref="eMiniChartsContainer" class="ag-chart-settings-mini-charts-container ag-scrollable-container"></div>
            <div data-ref="eNavBar" class="ag-chart-settings-nav-bar">
                <div data-ref="ePrevBtn" class="ag-chart-settings-prev">
                    <button type="button" class="ag-button ag-chart-settings-prev-button"></button>
                </div>
                <div data-ref="eCardSelector" class="ag-chart-settings-card-selector"></div>
                <div data-ref="eNextBtn" class="ag-chart-settings-next">
                    <button type="button" class="ag-button ag-chart-settings-next-button"></button>
                </div>
            </div>
        </div>`),this.chartController=e,this.eMiniChartsContainer=null,this.eNavBar=null,this.eCardSelector=null,this.ePrevBtn=null,this.eNextBtn=null,this.miniChartsContainers=[],this.cardItems=[],this.activePaletteIndex=0,this.palettes=[],this.themes=[]}postConstruct(){this.resetPalettes(),this.ePrevBtn.insertAdjacentElement("afterbegin",s2("previous",this.gos)),this.eNextBtn.insertAdjacentElement("afterbegin",s2("next",this.gos)),this.addManagedElementListeners(this.ePrevBtn,{click:()=>this.setActivePalette(this.getPrev(),"left")}),this.addManagedElementListeners(this.eNextBtn,{click:()=>this.setActivePalette(this.getNext(),"right")});let e=()=>this.resetPalettes(!0);this.addManagedListeners(this.chartController,{chartTypeChanged:e,chartApiUpdate:e}),this.scrollSelectedIntoView()}scrollSelectedIntoView(){setTimeout(()=>{let e=this.miniChartsContainers.find(e=>!e.getGui().classList.contains("ag-hidden")).getGui().querySelector(".ag-selected");if(e){let t=e.offsetParent;t&&this.eMiniChartsContainer.scrollTo(0,t.offsetTop)}},250)}resetPalettes(e){let t=this.chartController.getPalettes(),i=this.chartController.getThemeTemplateParameters(),r=this.gos.get("chartToolPanelsDef")?.settingsPanel?.chartGroupsDef;if(iG(t,this.palettes)&&!e||this.isAnimating)return;this.palettes=t,this.themes=this.chartController.getThemeNames(),this.activePaletteIndex=this.themes.findIndex(e=>e===this.chartController.getChartThemeName()),this.cardItems=[],sL(this.eCardSelector),this.destroyMiniCharts();let{themes:s}=this;this.palettes.forEach((e,t)=>{let a=this.activePaletteIndex===t,{fills:o=[],strokes:n=[]}=e,l=!Tj(s[t]),h=this.createBean(new RK(this.chartController,o,n,i[t],l,r));this.miniChartsContainers.push(h),this.eMiniChartsContainer.appendChild(h.getGui()),this.addCardLink(t),a?h.updateSelectedMiniChart():h.setDisplayed(!1)}),sC(this.eNavBar,this.palettes.length>1),sf(this.cardItems[this.activePaletteIndex],"ag-selected","ag-not-selected")}addCardLink(e){let t=document.createElement("div");t.classList.add("ag-chart-settings-card-item"),this.addManagedElementListeners(t,{click:()=>{this.setActivePalette(e,e<this.activePaletteIndex?"left":"right")}}),this.eCardSelector.appendChild(t),this.cardItems.push(t)}getPrev(){let e=this.activePaletteIndex-1;return e<0&&(e=this.palettes.length-1),e}getNext(){let e=this.activePaletteIndex+1;return e>=this.palettes.length&&(e=0),e}setActivePalette(e,t){if(this.isAnimating||this.activePaletteIndex===e)return;sf(this.cardItems[e],"ag-selected","ag-not-selected");let i=this.miniChartsContainers[this.activePaletteIndex],r=i.getGui(),s=this.miniChartsContainers[e],a=s.getGui();i.updateSelectedMiniChart(),s.updateSelectedMiniChart();let o=a.style.left=`${sI(this.getGui())*("left"===t?-1:1)}px`;this.activePaletteIndex=e,this.isAnimating=!0;let n="ag-animating";s.setDisplayed(!0),i.addCssClass(n),s.addCssClass(n),this.chartController.setChartThemeName(this.themes[e]),window.setTimeout(()=>{r.style.left=`${-parseFloat(o)}px`,a.style.left="0px"},0),window.setTimeout(()=>{this.isAnimating=!1,i.removeCssClass(n),s.removeCssClass(n),i.setDisplayed(!1)},300)}destroyMiniCharts(){sL(this.eMiniChartsContainer),this.miniChartsContainers=this.destroyBeans(this.miniChartsContainers)}destroy(){this.destroyMiniCharts(),super.destroy()}},Rq=class e extends sQ{constructor(e,t){super(),this.panels=e,this.chartMenuContext=t,this.tabs=[]}wireBeans(e){this.chartTranslationService=e.chartTranslationService}postConstruct(){this.panels.forEach(e=>{let t=e.replace("chart","").toLowerCase(),i=this.createPanel(t),r=this.createTab(e,t,i);this.tabs.push(r),this.addDestroyFunc(()=>this.destroyBean(i))}),this.tabbedLayout=new kd({items:this.tabs,cssClass:"ag-chart-tabbed-menu",keepScrollPosition:!0,suppressFocusBodyOnOpen:!0,suppressTrapFocus:!0,enableCloseButton:!0,closeButtonAriaLabel:this.chartTranslationService.translate("ariaChartMenuClose"),onCloseClicked:()=>{this.eventSource?.focus({preventScroll:!0}),this.dispatchLocalEvent({type:"closed"})}}),this.createBean(this.tabbedLayout)}createTab(e,t,i){let r=document.createElement("div");r.classList.add("ag-chart-tab",`ag-chart-${t}`),this.createBean(i),r.appendChild(i.getGui());let s=document.createElement("div"),a=this.chartTranslationService.translate(t);return s.innerText=a,{title:s,titleLabel:a,bodyPromise:ab.resolve(r),getScrollableContainer:()=>r.querySelector(".ag-scrollable-container")||r,name:e}}showTab(e){let t=this.tabs[e];this.tabbedLayout.showItem(t)}getGui(){return this.tabbedLayout&&this.tabbedLayout.getGui()}showMenu(e,t){this.eventSource=e,t||this.tabbedLayout?.focusHeader(!0)}destroy(){this.parentComponent&&this.parentComponent.isAlive()&&this.destroyBean(this.parentComponent),super.destroy()}createPanel(t){switch(t){case e.TAB_DATA:return new AL(this.chartMenuContext);case e.TAB_FORMAT:return new Rt(this.chartMenuContext);default:return new RZ(this.chartMenuContext.chartController)}}};Rq.TAB_DATA="data",Rq.TAB_FORMAT="format";var RX=class extends sQ{constructor(e,t,i){super('<div class="ag-chart-menu-wrapper"></div>'),this.eChartContainer=e,this.eMenuPanelContainer=t,this.chartMenuContext=i,this.buttons={chartLink:{iconName:"linked",callback:()=>this.chartMenuService.toggleLinked(this.chartMenuContext)},chartUnlink:{iconName:"unlinked",callback:()=>this.chartMenuService.toggleLinked(this.chartMenuContext)},chartDownload:{iconName:"save",callback:()=>this.chartMenuService.downloadChart(this.chartMenuContext)},chartMenu:{iconName:"menuAlt",callback:e=>this.showMenuList(e)}},this.panels=[],this.menuVisible=!1,this.chartController=i.chartController}wireBeans(e){this.chartMenuService=e.chartMenuService,this.chartMenuListFactory=e.chartMenuListFactory,this.environment=e.environment}postConstruct(){this.chartToolbar=this.createManagedBean(new Ab),this.getGui().appendChild(this.chartToolbar.getGui()),this.refreshToolbarAndPanels(),this.addManagedEventListeners({chartCreated:e=>{e.chartId===this.chartController.getChartId()&&this.gos.get("chartToolPanelsDef")?.defaultToolPanel&&this.showMenu({panel:this.defaultPanel,suppressFocus:!0})}}),this.addManagedListeners(this.chartController,{chartLinkedChanged:this.refreshToolbarAndPanels.bind(this)}),this.refreshMenuClasses(),this.addManagedListeners(this.chartController,{chartApiUpdate:this.refreshToolbarAndPanels.bind(this)})}isVisible(){return this.menuVisible}getExtraPaddingDirections(){return["chartMenu","chartLink","chartUnlink","chartDownload"].some(e=>this.chartToolbarOptions.includes(e))?["top"]:[]}refreshToolbarAndPanels(){this.initToolbarOptionsAndPanels(),this.updateToolbar()}initToolbarOptionsAndPanels(){let{panels:e,defaultPanel:t}=this.chartMenuService.getChartToolPanels(this.chartController);this.panels=e,this.defaultPanel=t,this.chartToolbarOptions=this.chartMenuService.getChartToolbarOptions()}updateToolbar(){let e=this.chartToolbarOptions.map(e=>{let{iconName:t,callback:i}=this.buttons[e];return{buttonName:e,iconName:t,callback:i}});this.chartToolbar.updateParams({buttons:e})}createMenuPanel(e){let t=this.menuPanel=this.createBean(new kr({height:"100%",closable:!0,hideTitleBar:!0,cssIdentifier:"chart-menu"}));return t.setParentComponent(this),this.eMenuPanelContainer.appendChild(t.getGui()),this.tabbedMenu=this.createBean(new Rq(this.panels,this.chartMenuContext)),this.addManagedListeners(this.tabbedMenu,{closed:()=>{this.hideMenu()}}),this.addManagedListeners(t,{destroyed:()=>this.destroyBean(this.tabbedMenu)}),new ab(i=>{window.setTimeout(()=>{t.setBodyComponent(this.tabbedMenu),this.tabbedMenu.showTab(e),i(t)},100)})}showContainer(e,t){this.menuPanel&&(this.menuVisible=!0,this.refreshMenuClasses(),this.tabbedMenu.showMenu(e,t))}showMenu(e){let{panel:t,eventSource:i,suppressFocus:r}=e??{};if(this.menuPanel&&!t)this.showContainer(i,r);else{let e=t||this.defaultPanel,s=this.panels.indexOf(e);s<0&&(tO(`'${t}' is not a valid Chart Tool Panel name`),s=this.panels.indexOf(this.defaultPanel)),this.menuPanel?(this.tabbedMenu.showTab(s),this.showContainer(i,r)):this.createMenuPanel(s).then(()=>this.showContainer(i,r))}}hideMenu(){this.menuVisible=!1,this.refreshMenuClasses()}refreshMenuClasses(){this.eChartContainer.classList.toggle("ag-chart-menu-visible",this.menuVisible),this.eChartContainer.classList.toggle("ag-chart-menu-hidden",!this.menuVisible)}showMenuList(e){this.chartMenuListFactory.showMenuList({eventSource:e,showMenu:()=>this.showMenu({eventSource:e}),chartMenuContext:this.chartMenuContext})}destroy(){super.destroy(),this.menuPanel&&this.menuPanel.isAlive()&&this.destroyBean(this.menuPanel),this.tabbedMenu&&this.tabbedMenu.isAlive()&&this.destroyBean(this.tabbedMenu)}},RQ=["number","category","time","grouped-category"],RJ=[...RQ,"angle-category","angle-number","radius-category","radius-number"],R0=class extends i2{constructor(e){super(),this.chartController=e}getChartThemeOverridesProxy(){return{getValue:e=>this.getChartOption(e),setValue:(e,t)=>this.setChartThemeOverrides([{expression:e,value:t}]),setValues:e=>this.setChartThemeOverrides(e)}}getAxisThemeOverridesProxy(){return{getValue:e=>this.getAxisProperty(e),setValue:(e,t)=>this.setAxisThemeOverrides([{expression:e,value:t}]),setValues:e=>this.setAxisThemeOverrides(e)}}getCartesianAxisOptionsProxy(e){return{getValue:t=>this.getCartesianAxisProperty(e,t),setValue:(t,i)=>this.setCartesianAxisOptions(e,[{expression:t,value:i}]),setValues:t=>this.setCartesianAxisOptions(e,t)}}getCartesianAxisThemeOverridesProxy(e){return{getValue:t=>this.getCartesianAxisProperty(e,t),setValue:(t,i)=>this.setCartesianAxisThemeOverrides(e,[{expression:t,value:i}]),setValues:t=>this.setCartesianAxisThemeOverrides(e,t)}}getCartesianAxisAppliedThemeOverridesProxy(e){return{getValue:t=>this.getCartesianAxisThemeOverride(e,"*"===t?null:t),setValue:(t,i)=>this.setCartesianAxisThemeOverrides(e,[{expression:"*"===t?null:t,value:i}]),setValues:t=>this.setCartesianAxisThemeOverrides(e,t)}}getSeriesOptionsProxy(e){return{getValue:(t,i)=>this.getSeriesOption(e(),t,i),setValue:(t,i)=>this.setSeriesOptions(e(),[{expression:t,value:i}]),setValues:t=>this.setSeriesOptions(e(),t)}}getPersistedChartThemeOverrides(e,t,i,r){let s=this.getRetainedChartThemeOverrideKeys(i,r),a=this.getRetainedChartAxisThemeOverrideKeys(null,i,r),o=this.createChartOptions();for(let t of s){let s=this.retrieveChartOptionsThemeOverride(e,i,t);void 0!==s&&this.assignChartOptionsThemeOverride(o,r,t,s)}return t&&this.assignPersistedAxisOverrides({existingAxes:t,retainedChartAxisThemeOverrideKeys:a,existingChartOptions:e,targetChartOptions:o,existingChartType:i,targetChartType:r}),o.theme.overrides}assignPersistedAxisOverrides(e){let{existingAxes:t,retainedChartAxisThemeOverrideKeys:i,existingChartOptions:r,targetChartOptions:s,existingChartType:a,targetChartType:o}=e;for(let{expression:e,targetAxisTypes:n}of i)for(let i of t.map(e=>e.type)){let t=this.retrieveChartOptionsThemeOverride(r,a,["axes",i,e].join("."));if(void 0!==t)for(let i of n)this.assignChartOptionsThemeOverride(s,o,["axes",i,e].join("."),t)}}getRetainedChartThemeOverrideKeys(e,t){let i=["zoom","navigator"];return["animation",...((e,t)=>{let r=[];return Ta(Td(e))&&Ta(Td(t))&&r.push(...i),r})(e,t)]}getRetainedChartAxisThemeOverrideKeys(e,t,i){return Ta(Td(t))&&Ta(Td(i))?this.getRetainedCartesianAxisThemeOverrideKeys(e).map(e=>({expression:e,targetAxisTypes:RQ})):[]}getRetainedCartesianAxisThemeOverrideKeys(e){let t="xAxis"===e?["",".top",".bottom"]:"yAxis"===e?["",".left",".right"]:["",".left",".right",".top",".bottom"],i=[];for(let e of["crosshair"])for(let r of t)i.push(`${e}${r}`);return i}getChartOption(e){return TV(this.getChart(),e,void 0)}setChartThemeOverrides(e){let t=this.getChartType(),i=this.createChartOptions();for(let{expression:r,value:s}of e)this.assignChartOptionsThemeOverride(i,t,r,s);this.applyChartOptions(i)}applyChartOptions(e,t){0!==Object.keys(e).length&&(this.updateChart(e),t?.silent||this.raiseChartOptionsChangedEvent())}awaitChartOptionUpdate(e){this.chartController.getChartProxy().getChart().waitForUpdate().then(()=>e()).catch(e=>tB("chart update failed",e))}getAxisProperty(e){return TV(this.getChart().axes?.[0],e,void 0)}setAxisThemeOverrides(e){let t=this.getChart(),i=this.getChartType(),r=this.createChartOptions();for(let{expression:s,value:a}of e){let e=t.axes?.filter(e=>{let t=s.split("."),i=e;for(let e of t){if(!(e in i))return!1;i=i[e]}return!0});if(e)for(let t of e)this.isValidAxisType(t)&&this.assignChartAxisThemeOverride(r,i,t.type,null,s,a)}this.applyChartOptions(r)}getCartesianAxisProperty(e,t){let i=this.getChartAxes();return TV(this.getCartesianAxis(i,e),t,void 0)}getCartesianAxisThemeOverride(e,t){let i=this.getChartAxes(),r=this.getCartesianAxis(i,e);if(!r||!this.isValidAxisType(r))return;let s=this.getChartType(),a=this.getChart().getOptions();return this.retrieveChartAxisThemeOverride(a,s,r.type,"yAxis"===e?["left","right"]:["bottom","top"],t)}setCartesianAxisThemeOverrides(e,t){let i=this.getChartAxes(),r=this.getCartesianAxis(i,e);if(!r||!this.isValidAxisType(r))return;let s=this.getChartType(),a=this.createChartOptions();for(let{expression:i,value:o}of t)this.assignChartAxisThemeOverride(a,s,r.type,"yAxis"===e?["left","right"]:["bottom","top"],i,o);this.applyChartOptions(a)}setCartesianAxisOptions(e,t){this.updateCartesianAxisOptions(e,(e,i,r)=>{let s=i.indexOf(r);for(let{expression:i,value:r}of t)this.assignChartOption(e,`axes.${s}.${i}`,r)})}updateCartesianAxisOptions(e,t){let i=this.getChart().getOptions(),r="axes"in i?i.axes:void 0;if(!i||!r)return;let s=this.getChartAxes(),a=this.getCartesianAxis(s,e);if(!a)return;let o=this.createChartOptions();o.axes=r,t(o,s,a,i),this.applyChartOptions(o)}setCartesianCategoryAxisType(e,t){this.updateCartesianAxisOptions(e,(i,r,s,a)=>{let o=this.getChartType();this.assignPersistedAxisOverrides({existingAxes:[s],retainedChartAxisThemeOverrideKeys:this.getRetainedChartAxisThemeOverrideKeys(e,o,o),existingChartOptions:a,targetChartOptions:i,existingChartType:o,targetChartType:o}),this.assignChartOption(i,"axes.0.type",t),this.chartController.setCategoryAxisType(t)})}getCartesianAxis(e,t){if(!(e.length<2))switch(t){case"xAxis":return"x"===e[0].direction?e[0]:e[1];case"yAxis":return"y"===e[1].direction?e[1]:e[0]}}getSeriesOption(e,t,i){let r=this.getChart().series.find(t=>!!Tt[e]&&t.type===e);return TV(i?r:r?.properties.toJson(),t,void 0)}setSeriesOptions(e,t){let i=this.createChartOptions();for(let{expression:r,value:s}of t)this.assignChartOptionsSeriesThemeOverride(i,e,`series.${r}`,s);this.applyChartOptions(i)}getPairedMode(){return this.chartController.getChartProxy().isPaired()}setPairedMode(e){this.chartController.getChartProxy().setPaired(e)}getChartAxes(){return this.getChart().axes??[]}retrieveChartAxisThemeOverride(e,t,i,r,s){if(!r)return this.retrieveChartOptionsThemeOverride(e,t,["axes",i,...s?[s]:[]].join("."));for(let a of r){let r=this.retrieveChartOptionsThemeOverride(e,t,["axes",i,a,...s?[s]:[]].join("."));if(void 0!==r)return r}}assignChartAxisThemeOverride(e,t,i,r,s,a){if(r)for(let o of r)this.assignChartOptionsThemeOverride(e,t,["axes",i,o,...s?[s]:[]].join("."),a);else this.assignChartOptionsThemeOverride(e,t,["axes",i,...s?[s]:[]].join("."),a)}isValidAxisType(e){return RJ.includes(e.type)}getChartType(){return this.chartController.getChartType()}getChart(){return this.chartController.getChartProxy().getChart()}updateChart(e){let t=this.chartController.getChartProxy().getChartRef();t.skipAnimations(),t.updateDelta(e)}createChartOptions(){return{theme:{overrides:{}}}}retrieveChartOptionsThemeOverride(e,t,i){for(let r of this.getChartThemeOverridesSeriesTypeKeys(t)){let t=this.retrieveChartOptionsSeriesThemeOverride(e,r,i);if(void 0!==t)return t}}assignChartOptionsThemeOverride(e,t,i,r){for(let s of this.getChartThemeOverridesSeriesTypeKeys(t))this.assignChartOptionsSeriesThemeOverride(e,s,i,r)}retrieveChartOptionsSeriesThemeOverride(e,t,i){return this.retrieveChartOption(e,["theme","overrides",t,...i?[i]:[]].join("."))}assignChartOptionsSeriesThemeOverride(e,t,i,r){this.assignChartOption(e,["theme","overrides",t,...i?[i]:[]].join("."),r)}getChartThemeOverridesSeriesTypeKeys(e){let t=this.chartController.getChartSeriesTypes(e);return this.chartController.isComboChart()&&t.push("common"),t}retrieveChartOption(e,t){return TV(e,t,void 0)}assignChartOption(e,t,i){!function(e,t,i){if(null==e)return;let r=t.split("."),s=e;r.forEach((e,t)=>{s[e]||(s[e]={}),t<r.length-1&&(s=s[e])}),s[r[r.length-1]]=i}(e,t,i)}raiseChartOptionsChangedEvent(){let e=this.chartController.getChartModel();this.eventService.dispatchEvent({type:"chartOptionsChanged",chartId:e.chartId,chartType:e.chartType,chartThemeName:this.chartController.getChartThemeName(),chartOptions:e.chartOptions})}destroy(){super.destroy()}},R1=class e extends sQ{constructor(e){super(`<div class="ag-chart">
            <div data-ref="eChartContainer" class="ag-chart-components-wrapper ag-chart-menu-hidden">
                <div data-ref="eChart" class="ag-chart-canvas-wrapper"></div>
                <div data-ref="eEmpty" class="ag-chart-empty-text ag-unselectable"></div>
            </div>
            <div data-ref="eMenuContainer" class="ag-chart-docked-container"></div>
            </div>`),this.eChart=null,this.eChartContainer=null,this.eMenuContainer=null,this.eEmpty=null,this.params=e}wireBeans(e){this.crossFilterService=e.chartCrossFilterService,this.chartTranslationService=e.chartTranslationService,this.chartMenuService=e.chartMenuService,this.focusService=e.focusService,this.popupService=e.popupService}postConstruct(){let e={...this.params,chartType:Tl(this.params.chartType),chartThemeName:this.getThemeName()},t=this.gos.get("enableRtl");this.addCssClass(t?"ag-rtl":"ag-ltr");let i=this.createBean(new TZ(e));this.chartController=this.createManagedBean(new T6(i)),this.chartOptionsService=this.createManagedBean(new R0(this.chartController)),this.validateCustomThemes(),this.createChart(),this.params.insideDialog&&this.addDialog(),this.addMenu(),this.addManagedElementListeners(this.getGui(),{focusin:this.setActiveChartCellRange.bind(this)}),this.addManagedListeners(this.chartController,{chartModelUpdate:this.update.bind(this)}),this.addManagedPropertyListeners(["chartThemeOverrides","chartThemes"],this.reactivePropertyUpdate.bind(this)),this.update(),this.raiseChartCreatedEvent()}createChart(){let t;this.chartProxy&&(t=this.chartProxy.destroy({keepChartInstance:!0}));let i=this.chartController.getChartType(),r={chartType:i,chartInstance:t,getChartThemeName:this.getChartThemeName.bind(this),getChartThemes:this.getChartThemes.bind(this),customChartThemes:this.gos.get("customChartThemes"),getGridOptionsChartThemeOverrides:()=>this.getGridOptionsChartThemeOverrides(),getExtraPaddingDirections:()=>this.chartMenu?.getExtraPaddingDirections()??[],apiChartThemeOverrides:this.params.chartThemeOverrides,crossFiltering:this.params.crossFiltering??!1,crossFilterCallback:(e,t)=>{this.params.crossFilteringContext.lastSelectedChartId=t?"":this.chartController.getChartId(),t&&this.params.crossFilteringResetCallback(),this.crossFilterService.filter(e,t)},parentElement:this.eChart,grouping:this.chartController.isGrouping(),chartThemeToRestore:this.params.chartThemeName,chartOptionsToRestore:this.params.chartOptionsToRestore,chartPaletteToRestore:this.params.chartPaletteToRestore,seriesChartTypes:this.chartController.getSeriesChartTypes(),translate:e=>this.chartTranslationService.translate(e)};if(this.params.chartOptionsToRestore=void 0,this.chartType=i,this.chartProxy=e.createChartProxy(r),!this.chartProxy){tO("invalid chart type supplied: "+r.chartType);return}this.chartController.setChartProxy(this.chartProxy),this.createMenuContext()}createMenuContext(){if(this.chartMenuContext)return;let e=this.createManagedBean(new AI(this.chartOptionsService.getChartThemeOverridesProxy())),t=this.createManagedBean(new AI(this.chartOptionsService.getAxisThemeOverridesProxy()));this.chartMenuContext={chartController:this.chartController,chartOptionsService:this.chartOptionsService,chartMenuParamsFactory:e,chartAxisMenuParamsFactory:t}}getChartThemeName(){return this.chartController.getChartThemeName()}getChartThemes(){return this.chartController.getThemeNames()}getGridOptionsChartThemeOverrides(){return this.gos.get("chartThemeOverrides")}static createChartProxy(e){switch(e.chartType){case"column":case"bar":case"groupedColumn":case"stackedColumn":case"normalizedColumn":case"groupedBar":case"stackedBar":case"normalizedBar":return new Ar(e);case"pie":case"donut":case"doughnut":return new Ap(e);case"area":case"stackedArea":case"normalizedArea":return new T9(e);case"line":return new Aa(e);case"scatter":case"bubble":return new Ao(e);case"histogram":return new As(e);case"radarLine":case"radarArea":case"nightingale":case"radialColumn":case"radialBar":return new Ag(e);case"rangeBar":case"rangeArea":return new Aw(e);case"boxPlot":return new AC(e);case"treemap":case"sunburst":return new Au(e);case"heatmap":return new Am(e);case"waterfall":return new An(e);case"columnLineCombo":case"areaColumnCombo":case"customCombo":return new Al(e);default:throw`AG Grid: Unable to create chart as an invalid chartType = '${e.chartType}' was supplied.`}}addDialog(){let e=this.chartTranslationService.translate(this.params.pivotChart?"pivotChartTitle":"rangeChartTitle"),{width:t,height:i}=this.getBestDialogSize(),r=this.params.focusDialogOnOpen?()=>setTimeout(()=>this.focusService.focusInto(this.getGui())):void 0;this.chartDialog=new ks({resizable:!0,movable:!0,maximizable:!0,title:e,width:t,height:i,component:this,centered:!0,closable:!0,afterGuiAttached:r,postProcessPopupParams:{type:"chart"}}),this.createBean(this.chartDialog),this.chartDialog.addEventListener("destroyed",()=>{this.destroy(),this.chartMenuService.hideAdvancedSettings();let e=this.focusService.getFocusedCell();setTimeout(()=>{this.focusService.isAlive()&&(e?this.focusService.setFocusedCell({...e,forceBrowserFocus:!0}):this.focusService.focusGridInnerElement())})})}getBestDialogSize(){let e=this.popupService.getPopupParent(),t=.75*sI(e),i=.75*sD(e),r=this.chartProxy.getChart(),s=this.params.insideDialog?850:r.width,a=this.params.insideDialog?470:r.height;return(s>t||a>i)&&(a=Math.round(.553*(s=Math.min(s,t))))>i&&(s=Math.min(s,Math.round((a=i)/.553))),{width:s,height:a}}addMenu(){this.params.crossFiltering||(this.chartMenu=this.createBean(new RX(this.eChartContainer,this.eMenuContainer,this.chartMenuContext)),this.eChartContainer.appendChild(this.chartMenu.getGui()))}update(e){if(e?.chartId&&!this.chartController.update(e))return;let t=this.chartTypeChanged(e),i=t||this.chartEmpty?(e=>{let t=this.chartType,i=this.chartProxy.getChart(),r=i?.getOptions(),s=i?.axes;return this.chartOptionsService.getPersistedChartThemeOverrides(r,s,t,e??t)})(t):void 0;t&&this.createChart(),i&&e?.chartThemeOverrides&&rd(i,e.chartThemeOverrides);let r=i??e?.chartThemeOverrides;this.updateChart(r),e?.chartId&&this.chartProxy.getChart().waitForUpdate().then(()=>{this.chartController.raiseChartApiUpdateEvent()})}updateChart(e){let{chartProxy:t}=this,i=this.chartController.getSelectedValueColState(),r=this.chartController.getChartData(),s=this.handleEmptyChart(r,i.length);if(this.chartEmpty=s,s){e&&this.chartController.updateThemeOverrides(e);return}let a=this.chartController.getChartUpdateParams(e);t.update(a),this.chartProxy.getChart().waitForUpdate().then(()=>{this.chartController.raiseChartUpdatedEvent()})}chartTypeChanged(e){let[t,i]=[this.chartController.getChartType(),e?.chartType],r=i?Tl(i):void 0;return this.chartType!==t?r??t:r&&t!==r?r:null}getChartModel(){return this.chartController.getChartModel()}getChartImageDataURL(e){return this.chartProxy.getChartImageDataURL(e)}handleEmptyChart(e,t){let i=this.chartController.isPivotChart()&&!this.chartController.isPivotMode(),r=this.chartController.getChartType(),s=1;this.chartController.isActiveXYChart()?s="bubble"===r?3:2:Tn(Td(r))&&(s=0);let a=t<s||0===e.length;if(this.eChart){let e=i||a;sC(this.eChart,!e),sC(this.eEmpty,e)}return i?(this.eEmpty.innerText=this.chartTranslationService.translate("pivotChartRequiresPivotMode"),!0):!!a&&(this.eEmpty.innerText=this.chartTranslationService.translate("noDataToChart"),!0)}downloadChart(e,t,i){this.chartProxy.downloadChart(e,t,i)}openChartToolPanel(e){let t=e?TO[e]:e;this.chartMenu.showMenu({panel:t})}closeChartToolPanel(){this.chartMenu.hideMenu()}getChartId(){return this.chartController.getChartId()}getUnderlyingChart(){return this.chartProxy.getChartRef()}crossFilteringReset(){this.chartProxy.crossFilteringReset()}setActiveChartCellRange(e){this.getGui().contains(e.relatedTarget)||(this.chartController.setChartRange(!0),this.focusService.clearFocusedCell())}getThemeName(){let e=this.gos.get("chartThemes")||T4;if(0===e.length)throw Error("Cannot create chart: no chart themes available.");let{chartThemeName:t}=this.params;return iU(e,t)?t:e[0]}getAllKeysInObjects(e){let t={};return e.filter(e=>null!=e).forEach(e=>{Object.keys(e).forEach(e=>t[e]=null)}),Object.keys(t)}validateCustomThemes(){let e=this.getChartThemes(),t=this.gos.get("customChartThemes");t&&this.getAllKeysInObjects([t]).forEach(t=>{iU(e,t)||tO("a custom chart theme with the name '"+t+"' has been supplied but not added to the 'chartThemes' list")})}reactivePropertyUpdate(){this.chartController.setChartThemeName(this.getThemeName(),!0);let e=this.getChartId(),t=this.chartController.isCrossFilterChart()?"crossFilter":this.getChartModel().modelType,i=this.gos.get("chartThemeOverrides")||{};this.update({type:`${t}ChartUpdate`,chartId:e,chartThemeOverrides:i})}raiseChartCreatedEvent(){this.chartProxy.getChart().waitForUpdate().then(()=>{this.eventService.dispatchEvent({type:"chartCreated",chartId:this.chartController.getChartId()})})}raiseChartDestroyedEvent(){this.eventService.dispatchEvent({type:"chartDestroyed",chartId:this.chartController.getChartId()})}destroy(){super.destroy(),this.chartProxy&&this.chartProxy.destroy(),this.destroyBean(this.chartMenu),this.chartDialog&&this.chartDialog.isAlive()&&this.destroyBean(this.chartDialog),this.onDestroyColorSchemeChangeListener?.();let e=this.getGui();sL(e),sP(e),this.raiseChartDestroyedEvent()}};function R2(e){return e=Lu("chartOptions.legend.item.marker.type","shape",e),e=Lu("chartOptions.seriesDefaults.marker.type","shape",e),e=Lu("chartOptions.legend.padding","spacing",e)}function R3(e){let{chartType:t,chartPalette:i,chartOptions:{xAxis:r,yAxis:s,...a},...o}=e=Lp("chartOptions.seriesDefaults.marker.minSize",e),n=function(e){switch(e){case"bar":case"stackedBar":case"normalizedBar":return["number","category"];case"groupedBar":return["number","grouped-category"];case"column":case"stackedColumn":case"normalizedColumn":case"line":case"area":case"stackedArea":case"normalizedArea":case"histogram":return["category","number"];case"groupedColumn":return["grouped-category","number"];case"scatter":case"bubble":return["number","number"];default:return}}(t),l=n?.map((e,t)=>({type:e,...0===t?r:s}));return{chartType:t,chartThemeName:({borneo:"ag-default",material:"ag-material",bright:"ag-vivid"})[i]??"ag-default",chartOptions:{...a,axes:l,xAxis:r,yAxis:s},...o}}function R4(e){return e=Lu("chartOptions.seriesDefaults.label.minRequiredAngle","minAngle",e)}function R6(e){return e=Lp("chart",e=Lm("chartOptions.seriesDefaults.highlightStyle",e,({dimOpacity:e,...t})=>({...t,...null!=e?{series:{dimOpacity:e}}:{}}))),e=Lp("chartOptions.seriesDefaults.tooltipClass",e),e=Ll("chartOptions.axes[].label.rotation",0,e=Lp("chartOptions.seriesDefaults.tooltipTracking",e)),e=Ll("chartOptions.axes[].label.rotation",335,e)}function R5(e){let t=({item:e,series:t,...i})=>({item:{...i,...e},...t?{series:t}:{}});return e=Lm("chartOptions.seriesDefaults.highlightStyle",e,t),e=Lm("chartOptions.series[].highlightStyle",e,t)}function R8(e){e=Ld("chartOptions.seriesDefaults.fill.opacity","chartOptions.seriesDefaults.fillOpacity",e),e=Ld("chartOptions.seriesDefaults.stroke.opacity","chartOptions.seriesDefaults.strokeOpacity",e),e=Lp("chartOptions.seriesDefaults.fill",e=Ld("chartOptions.seriesDefaults.stroke.width","chartOptions.seriesDefaults.strokeWidth",e)),e=Lp("chartOptions.seriesDefaults.stroke",e),e=Lp("chartOptions.seriesDefaults.callout.colors",e),e=Lp("chartOptions.xAxis",e);let{chartType:t,chartOptions:{axes:i,series:r,seriesDefaults:s,...a},...o}=e=Lp("chartOptions.yAxis",e),n=Tl(t),l=Td(n),h=[l],d={};if(!Tc(l)){let e={top:{},bottom:{},left:{},right:{}},t=i.map(({type:t,...i})=>({[t]:{...e,...i}})).reduce(Lf,{});T_.filter(e=>null==t[e]).forEach(i=>{t[i]={...e}}),d.axes=t}let c=h.map(e=>({[e]:{...d,series:s,...a}})).reduce(Lf,{});return e={...o,chartType:n,chartOptions:c}}function R7(e){return e=Lp("chartOptions.*.title.padding",e),e=Lp("chartOptions.*.subtitle.padding",e),e=Lh("chartOptions.*.axes.*.title.enabled",!1,e=Lp("chartOptions.*.axes.*.title.padding",e))}function R9(e){return e=Lu("chartOptions.pie.series.callout","calloutLine",e),e=Lu("chartOptions.pie.series.label","calloutLabel",e),e=Lu("chartOptions.pie.series.labelKey","sectorLabelKey",e),e=Lu("chartOptions.pie.series.labelName","sectorLabelName",e),e=Lu("chartOptions.donut.series.callout","calloutLine",e),e=Lu("chartOptions.donut.series.label","calloutLabel",e),e=Lu("chartOptions.donut.series.labelKey","sectorLabelKey",e),e=Lu("chartOptions.donut.series.labelName","sectorLabelName",e)}function Le(e){return e=Lc("chartOptions.scatter.series.fill","chartOptions.scatter.series.marker.fill",e),e=Lc("chartOptions.scatter.series.fillOpacity","chartOptions.scatter.series.marker.fillOpacity",e),e=Lc("chartOptions.scatter.series.stroke","chartOptions.scatter.series.marker.stroke",e),e=Lc("chartOptions.scatter.series.strokeOpacity","chartOptions.scatter.series.marker.strokeOpacity",e),e=Ld("chartOptions.scatter.series.paired","chartOptions.scatter.paired",e=Lc("chartOptions.scatter.series.strokeWidth","chartOptions.scatter.series.marker.strokeWidth",e))}function Lt(e){return e=Lp("chartOptions.axes[].tick.count",e)}function Li(e){return e=Lm("chartOptions.*.tooltip",e,({tracking:e,...t})=>{let i={...t};return!1===e?(i.position??(i.position={type:"pointer"}),i.range??(i.range="nearest")):!0===e&&(i.position??(i.position={type:"node"}),i.range??(i.range="nearest")),i})}function Lr(e){return e=Lu("chartOptions.pie.series.labelKey","sectorLabelKey",e),e=Lh("chartOptions.common.legend.position","right",e=function e(t,i,r){"string"==typeof t&&(t=t.split("."));let s=t[0];return t.length>1&&(r[s]=e(t.slice(1),i,r[s]??{})),Object.keys(r).includes(s)||(r[s]=i),r}("chartOptions.common.legend.enabled",!0,e=Lp("chartOptions.*.series.flipXY",e=Li(e=Lt(e=Lu("chartOptions.pie.series.labelName","sectorLabelName",e))))))}function Ls(e){let t=Lu("chartOptions.column","bar",e),i={"ag-pastel":"ag-sheets","ag-solar":"ag-polychroma"}[t.chartThemeName]||t.chartThemeName;return{...t,chartThemeName:i}}function La(e){return e=Lg("chartOptions.*.autoSize",!0,e,(e,t)=>{!0===e[t]||!1===e[t]&&(e.minHeight=600,e.minWidth=300),delete e[t]})}function Lo(e,t,i){if(Ln(e)>Ln(t.version)){let r=i(t);return r.version=e,r}return t}function Ln(e){let{major:t,minor:i,patch:r}=function(e){let t="string"==typeof e?e.split(".").map(e=>Number(e)):[];if(3!==t.length||t.some(e=>isNaN(e)))throw Error("AG Grid - Illegal version string: "+e);return{major:t[0],minor:t[1],patch:t[2]}}(e);return 1e4*t+100*i+r}function Ll(e,t,i){return Lg(e,!0,i,(e,i)=>{e[i]===t&&delete e[i]})}function Lh(e,t,i){return Lg(e,!1,i,(e,i)=>{null==e[i]&&(e[i]=t)})}function Ld(e,t,i){let r;let s=!1;return(i=Lg(e,!0,i,(e,t)=>{s=!0,r=e[t],delete e[t]}),s)?Lg(t,!1,i,(e,t)=>{e[t]=r}):i}function Lc(e,t,i){let r;let s=!1;return(i=Lg(e,!0,i,(e,t)=>{s=!0,r=e[t],delete e[t]}),s)?Lg(t,!1,i,(e,t)=>{void 0===e[t]&&(e[t]=r)}):i}function Lu(e,t,i){return Lg(e,!0,i,(e,i)=>{e[t]=e[i],delete e[i]})}function Lp(e,t){return Lg(e,!0,t,(e,t)=>delete e[t])}function Lg(e,t,i,r){let s=e instanceof Array?e:e.split("."),a=s.slice(0,s.length-1),o=s[s.length-1];return Lm(a,i,e=>{let i=Object.keys(e).includes(o);if(t&&!i)return e;let s={...e};return r(s,o),s})}function Lm(e,t,i){let r=e instanceof Array?e:e.split(".");if(t={...t},0===r.length)return i(t);if(r[0].startsWith("{"))for(let e of r[0].substring(1,r[0].lastIndexOf("}")).split(","))null!=t[e]&&(t[e]=Lm(r.slice(1),t[e],i));else if(r[0].endsWith("[]")){let s=r[0].substring(0,e[0].indexOf("["));t[s]instanceof Array&&(t[s]=t[s].map(e=>Lm(r.slice(1),e,i)))}else if("*"===r[0])for(let e in t)t[e]=Lm(r.slice(1),t[e],i);else null!=t[r[0]]&&(t[r[0]]=Lm(r.slice(1),t[r[0]],i));return t}var Lf=(e,t)=>({...e,...t}),Lv=class extends i2{constructor(){super(...arguments),this.beanName="chartService",this.activeCharts=new Set,this.activeChartComps=new Set,this.crossFilteringContext={lastSelectedChartId:""},this.isEnterprise=()=>Iy.enterpriseModule.isEnterprise}wireBeans(e){this.visibleColsService=e.visibleColsService,this.rangeService=e.rangeService,this.environment=e.environment,this.focusService=e.focusService}updateChart(e){if(0===this.activeChartComps.size){tO("No active charts to update.");return}let t=[...this.activeChartComps].find(t=>t.getChartId()===e.chartId);if(!t){tO(`Unable to update chart. No active chart found with ID: ${e.chartId}.`);return}t.update(e)}getChartModels(){let e=[],t=e=>({...e,version:Tz});return this.activeChartComps.forEach(i=>e.push(t(i.getChartModel()))),e}getChartRef(e){let t;return this.activeCharts.forEach(i=>{i.chartId===e&&(t=i)}),t}getChartComp(e){let t;return this.activeChartComps.forEach(i=>{i.getChartId()===e&&(t=i)}),t}getChartImageDataURL(e){let t;return this.activeChartComps.forEach(i=>{i.getChartId()===e.chartId&&(t=i.getChartImageDataURL(e.fileFormat))}),t}downloadChart(e){let t=Array.from(this.activeChartComps).find(t=>t.getChartId()===e.chartId);t?.downloadChart(e.dimensions,e.fileName,e.fileFormat)}openChartToolPanel(e){let t=Array.from(this.activeChartComps).find(t=>t.getChartId()===e.chartId);t?.openChartToolPanel(e.panel)}closeChartToolPanel(e){let t=Array.from(this.activeChartComps).find(t=>t.getChartId()===e);t?.closeChartToolPanel()}createChartFromCurrentRange(e="groupedColumn",t){let i=this.getSelectedRange();return this.createChart({cellRange:i,chartType:e,focusDialogOnOpen:!t})}restoreChart(e,t){var i,r;let s,a,o,n;if(!e){tO("unable to restore chart as no chart model is provided");return}if(e.version!==Tz&&((i=e).version,null==i.version&&(i.version=function(e){if(null!=e.version)return e.version;let t=(e,...t)=>Object.keys(e||{}).some(e=>t.includes(e)),i=e.chartOptions,r=t(i,"seriesDefaults")?i?.seriesDefaults:i?.[Object.keys(i)[0]],[s="27.1.0"]=Object.entries({"27.0.0":t(e,"seriesChartTypes"),"26.2.0":!t(i,"seriesDefaults"),"26.1.0":t(r?.highlightStyle,"item"),"26.0.0":t(r?.highlightStyle,"series"),"25.1.0":t(r?.label,"minAngle"),"25.0.0":t(e,"modelType","aggFunc","unlinkChart","suppressChartRanges")||t(r,"lineDash","lineDashOffset"),"24.0.0":t(e,"chartThemeName","chart")||t(i,"series"),"23.2.0":t(i,"navigator"),"23.0.0":t(i?.legend?.item?.marker,"shape"),"22.1.0":t(e,"chartPalette","chartType")}).filter(([e,t])=>t)[0];return s}(i)),i=Lo("23.0.0",i,R2),i=Lo("24.0.0",i,R3),i=Lo("25.1.0",i,R4),i=Lo("26.0.0",i,R6),i=Lo("26.1.0",i,R5),i=Lo("26.2.0",i,R8),i=Lo("28.0.0",i,R7),i=Lo("28.2.0",i,R9),i=Lo("29.0.0",i,Le),i=Lo("29.1.0",i,Lt),i=Lo("29.2.0",i,Li),i=Lo("30.0.0",i,Lr),i=Lo("31.0.0",i,Ls),r=Lp("chartOptions.*.width",r=i=Lo("32.0.0",i,La)),e=i=Lo(Tz,i=r=Lh("chartOptions.*.axes.category.label.autoRotate",!0,r=Lp("chartOptions.*.height",r)),e=>e)),"pivot"===e.modelType?(this.gos.updateGridOptions({options:{pivotMode:!0},source:"pivotChart"}),s=this.createCellRange(void 0,!0),a=!0,o=!0):(s=this.createCellRange(e.cellRange),n=e.chartPalette,o=e.suppressChartRanges),s)return this.createChart({...e,cellRange:s,pivotChart:a,suppressChartRanges:o,chartContainer:t,chartOptionsToRestore:e.chartOptions,chartPaletteToRestore:n})}createRangeChart(e,t){let i=this.createCellRange(e.cellRange);if(i)return this.createChart({...e,cellRange:i,focusDialogOnOpen:!t})}createPivotChart(e,t){this.gos.updateGridOptions({options:{pivotMode:!0},source:"pivotChart"});let i=this.createCellRange(void 0,!0);if(i)return this.createChart({...e,cellRange:i,pivotChart:!0,suppressChartRanges:!0,focusDialogOnOpen:!t})}createCrossFilterChart(e,t){let i=this.createCellRange(e.cellRange);if(!i)return;let r=!(void 0!==e.suppressChartRanges&&null!==e.suppressChartRanges)||e.suppressChartRanges;return this.createChart({...e,cellRange:i,suppressChartRanges:r,crossFiltering:!0,focusDialogOnOpen:!t})}createChart(e){let t=T2.validateCreateParams(e);if(!t)return;let{chartType:i,chartContainer:r}=e=!0===t?e:t,s=this.gos.getCallback("createChartContainer"),a=new R1({...e,chartId:this.generateId(),chartType:Tl(i),insideDialog:!(r||s),crossFilteringContext:this.crossFilteringContext,crossFilteringResetCallback:()=>this.activeChartComps.forEach(e=>e.crossFilteringReset())});this.createBean(a);let o=this.createChartRef(a);return r?(r.appendChild(a.getGui()),this.environment.applyThemeClasses(r)):s?s(o):a.addEventListener("destroyed",()=>{this.activeChartComps.delete(a),this.activeCharts.delete(o)}),o}createChartRef(e){let t={destroyChart:()=>{this.activeCharts.has(t)&&(this.destroyBean(e),this.activeChartComps.delete(e),this.activeCharts.delete(t))},focusChart:()=>{this.focusService.focusInto(e.getGui())},chartElement:e.getGui(),chart:e.getUnderlyingChart(),chartId:e.getChartModel().chartId};return this.activeCharts.add(t),this.activeChartComps.add(e),t}getSelectedRange(){let e=this.rangeService?.getCellRanges()??[];return e.length>0?e[0]:{columns:[]}}generateId(){return`id-${Math.random().toString(36).substring(2,18)}`}createCellRange(e,t){let i=t?{rowStartIndex:null,rowStartPinned:void 0,rowEndIndex:null,rowEndPinned:void 0,columns:this.visibleColsService.getAllCols().map(e=>e.getColId())}:e,r=i&&this.rangeService?.createPartialCellRangeFromRangeParams(i,!0);return r||tO(`unable to create chart as ${t?"there are no columns in the grid":"no range is selected"}.`),r}destroy(){this.activeCharts.forEach(e=>e.destroyChart()),super.destroy()}};function Ly(e){return e&&e.match(/\d+\.\d+\.\d+/)}function LC({type:e,gridVersion:t,chartsVersion:i}){let r="AG Grid: AG Grid version is incompatible. Please see https://www.ag-grid.com/javascript-data-grid/modules/ for more information.";if(!t)return r;let s=function(e){if(!e||!Ly(e))return;let[t,i]=e.split(".")||[],r=`${t}.${i}.x`,s=parseInt(t,10)-28+6;if(!(s<0))return{gridMajorMinor:r,chartsMajorMinor:`${s}.${i}.x`}}(t);if(!s)return r;let{gridMajorMinor:a,chartsMajorMinor:o}=s;return"incompatible"===e?`AG Grid version ${t} and AG Charts version ${i} is not supported. AG Grid version ${a} should be used with AG Chart ${o}. Please see https://www.ag-grid.com/javascript-data-grid/modules/ for more information.`:"invalidCharts"===e?`AG Grid version ${a} should be used with AG Chart ${o}. Please see https://www.ag-grid.com/javascript-data-grid/modules/ for more information.`:r}Lv.CHARTS_VERSION=ym;var Lw={version:Tz,validate:()=>(function({gridVersion:e,chartsVersion:t}){if(!Ly(t))return{isValid:!1,message:LC({type:"invalidCharts",gridVersion:e,chartsVersion:t})};if(!Ly(e))return{isValid:!1,message:LC({type:"invalidGrid",gridVersion:e,chartsVersion:t})};let[i,r]=e.split(".")||[],[s,a,o]=t.split(".")||[],n=function({gridMajorVersion:e,chartsMajorVersion:t}){let i=parseInt(e,10),r=parseInt(t,10),s=i-28;return s===r-6&&s>=0}({gridMajorVersion:i,chartsMajorVersion:s});return n&&r===a||o.includes("beta")?{isValid:!0}:n&&r===a?{isValid:!1,message:LC({type:"invalid",gridVersion:e,chartsVersion:t})}:{isValid:!1,message:LC({type:"incompatible",gridVersion:e,chartsVersion:t})}})({gridVersion:Tz,chartsVersion:Lv.CHARTS_VERSION}),moduleName:`${tL.GridChartsModule}-core`,beans:[Lv,TG,TF,TL,TB,TA],userComponents:[{name:"agMenuItem",classImp:Iq}],dependantModules:[Te,IX]},Lb={version:Tz,moduleName:`${tL.GridChartsModule}-api`,apiFunctions:{getChartModels:function(e){return e.frameworkOverrides.wrapIncoming(()=>e.chartService?.getChartModels())},getChartRef:function(e,t){return e.frameworkOverrides.wrapIncoming(()=>e.chartService?.getChartRef(t))},getChartImageDataURL:function(e,t){return e.frameworkOverrides.wrapIncoming(()=>e.chartService?.getChartImageDataURL(t))},downloadChart:function(e,t){return e.frameworkOverrides.wrapIncoming(()=>e.chartService?.downloadChart(t))},openChartToolPanel:function(e,t){return e.frameworkOverrides.wrapIncoming(()=>e.chartService?.openChartToolPanel(t))},closeChartToolPanel:function(e,t){return e.frameworkOverrides.wrapIncoming(()=>e.chartService?.closeChartToolPanel(t.chartId))},createRangeChart:function(e,t){return e.frameworkOverrides.wrapIncoming(()=>e.chartService?.createRangeChart(t,!0))},createPivotChart:function(e,t){return e.frameworkOverrides.wrapIncoming(()=>e.chartService?.createPivotChart(t,!0))},createCrossFilterChart:function(e,t){return e.frameworkOverrides.wrapIncoming(()=>e.chartService?.createCrossFilterChart(t,!0))},updateChart:function(e,t){return e.frameworkOverrides.wrapIncoming(()=>e.chartService?.updateChart(t))},restoreChart:function(e,t,i){return e.frameworkOverrides.wrapIncoming(()=>e.chartService?.restoreChart(t,i))}},dependantModules:[Lw]},LS={version:Tz,moduleName:tL.GridChartsModule,dependantModules:[Lw,Lb]},Lx={time:ur,AgCharts:D7},LM="paste",LE="dragCopy",LD="clipboard",LI=e=>`AG Grid: Unable to use the Clipboard API (navigator.clipboard.${e}()). The reason why it could not be used has been logged in the previous line. For this reason the grid has defaulted to using a workaround which doesn't perform as well. Either fix why Clipboard API is blocked, OR stop this message from appearing by setting grid property suppressClipboardApi=true (which will default the grid to using the workaround rather than the API.`,Lk=class e extends i2{constructor(){super(...arguments),this.beanName="clipboardService",this.lastPasteOperationTime=0,this.navigatorApiFailed=!1}wireBeans(e){this.csvCreator=e.csvCreator,this.selectionService=e.selectionService,this.rowModel=e.rowModel,this.ctrlsService=e.ctrlsService,this.valueService=e.valueService,this.focusService=e.focusService,this.rowRenderer=e.rowRenderer,this.visibleColsService=e.visibleColsService,this.funcColsService=e.funcColsService,this.cellNavigationService=e.cellNavigationService,this.cellPositionUtils=e.cellPositionUtils,this.rowPositionUtils=e.rowPositionUtils,this.rangeService=e.rangeService}postConstruct(){t4(this.gos)&&(this.clientSideRowModel=this.rowModel),this.ctrlsService.whenReady(this,e=>{this.gridCtrl=e.gridCtrl})}pasteFromClipboard(){!this.gos.get("suppressClipboardApi")&&!this.navigatorApiFailed&&navigator.clipboard&&navigator.clipboard.readText?navigator.clipboard.readText().then(this.processClipboardData.bind(this)).catch(e=>{tO(`${e}
${LI("readText")}`),this.navigatorApiFailed=!0,this.pasteFromClipboardLegacy()}):this.pasteFromClipboardLegacy()}pasteFromClipboardLegacy(){let e=!1,t=t=>{let i=new Date().getTime();i-this.lastPasteOperationTime<50&&(e=!0,t.preventDefault()),this.lastPasteOperationTime=i};this.executeOnTempElement(e=>{e.addEventListener("paste",t),e.focus({preventScroll:!0})},i=>{let r=i.value;e?this.refocusLastFocusedCell():this.processClipboardData(r),i.removeEventListener("paste",t)})}refocusLastFocusedCell(){let e=this.focusService.getFocusedCell();e&&this.focusService.setFocusedCell({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0})}getClipboardDelimiter(){let e=this.gos.get("clipboardDelimiter");return tY(e)?e:"	"}processClipboardData(t){if(null==t)return;let i=e.stringToArray(t,this.getClipboardDelimiter()),r=this.gos.getCallback("processDataFromClipboard");r&&(i=r({data:i})),null!=i&&(this.gos.get("suppressLastEmptyLineOnPaste")&&this.removeLastLineIfBlank(i),this.doPasteOperation((e,t,r,s)=>{this.rangeService?.isMoreThanOneCell()&&!this.hasOnlyOneValueToPaste(i)?this.pasteIntoActiveRange(this.rangeService,i,e,t,s):this.pasteStartingFromFocusedCell(i,e,t,r,s)}))}static stringToArray(e,t=","){let i=[],r=e=>"\r"===e||"\n"===e,s=!1;if(""===e)return[[""]];for(let a=0,o=0,n=0;n<e.length;n++){let l=e[n-1],h=e[n],d=e[n+1],c=()=>{i[a]||(i[a]=[]),i[a][o]||(i[a][o]="")};if(c(),'"'===h&&(s?'"'===d?(i[a][o]+='"',n++):s=!1:(void 0===l||l===t||r(l))&&(s=!0)),!s&&'"'!==h){if(h===t){o++,c();continue}if(r(h)){o=0,a++,c(),"\r"===h&&"\n"===d&&n++;continue}}i[a][o]+=h}return i}doPasteOperation(e){let t;let i="clipboard";this.eventService.dispatchEvent({type:"pasteStart",source:i}),this.clientSideRowModel&&(t=new dP(this.gos.get("aggregateOnlyChangedColumns"),this.clientSideRowModel.getRootNode()));let r={},s=[];e(r,s,this.focusService.getFocusedCell(),t);let a=[...s];t&&(this.clientSideRowModel.doAggregate(t),t.forEachChangedNodeDepthFirst(e=>{a.push(e)})),this.rowRenderer.refreshCells({rowNodes:a}),this.dispatchFlashCells(r),this.fireRowChanged(s),this.refocusLastFocusedCell(),this.eventService.dispatchEvent({type:"pasteEnd",source:i})}pasteIntoActiveRange(e,t,i,r,s){let a=this.getRangeSize(e)%t.length!=0,o=0,n=0;this.iterateActiveRanges(!1,(e,l,h,d)=>{if(d-o>=t.length){if(a)return;o+=n,n=0}let c=t[d-o];r.push(l);let u=this.gos.getCallback("processCellFromClipboard");h.forEach((t,r)=>{if(!t.isCellEditable(l)||t.isSuppressPaste(l))return;r>=c.length&&(r%=c.length);let a=this.processCell(l,t,c[r],LE,u,!0);l.setDataValue(t,a,LM),s&&s.addParentNode(l.parent,[t]);let{rowIndex:o,rowPinned:n}=e;i[this.cellPositionUtils.createIdFromValues({rowIndex:o,column:t,rowPinned:n})]=!0}),n++})}getDisplayedColumnsStartingAt(e){let t=e,i=[];for(;null!=t;)i.push(t),t=this.visibleColsService.getColAfter(t);return i}pasteStartingFromFocusedCell(e,t,i,r,s){if(!r)return;let a={rowIndex:r.rowIndex,rowPinned:r.rowPinned},o=this.getDisplayedColumnsStartingAt(r.column);this.isPasteSingleValueIntoRange(e)?this.pasteSingleValueIntoRange(e,i,t,s):this.pasteMultipleValues(e,a,i,o,t,LD,s)}isPasteSingleValueIntoRange(e){return this.hasOnlyOneValueToPaste(e)&&null!=this.rangeService&&!this.rangeService.isEmpty()}pasteSingleValueIntoRange(e,t,i,r){let s=e[0][0];this.iterateActiveRanges(!1,(e,a,o)=>{t.push(a),o.forEach(e=>this.updateCellValue(a,e,s,i,LD,r))})}hasOnlyOneValueToPaste(e){return 1===e.length&&1===e[0].length}copyRangeDown(){if(!this.rangeService||this.rangeService.isEmpty())return;let e=[];this.doPasteOperation((t,i,r,s)=>{let a=this.gos.getCallback("processCellForClipboard"),o=this.gos.getCallback("processCellFromClipboard");this.iterateActiveRanges(!0,(r,n,l)=>{e.length?(i.push(n),l.forEach((i,a)=>{if(!i.isCellEditable(n)||i.isSuppressPaste(n))return;let l=this.processCell(n,i,e[a],LE,o,!0);n.setDataValue(i,l,LM),s&&s.addParentNode(n.parent,[i]);let{rowIndex:h,rowPinned:d}=r;t[this.cellPositionUtils.createIdFromValues({rowIndex:h,column:i,rowPinned:d})]=!0})):l.forEach(t=>{let i=this.processCell(n,t,this.valueService.getValue(t,n),LE,a,!1,!0);e.push(i)})})})}removeLastLineIfBlank(e){let t=iB(e);if(t&&1===t.length&&""===t[0]){if(1===e.length)return;i_(e,t)}}fireRowChanged(e){"fullRow"===this.gos.get("editType")&&e.forEach(e=>{this.eventService.dispatchEvent({type:"rowValueChanged",node:e,data:e.data,rowIndex:e.rowIndex,rowPinned:e.rowPinned})})}pasteMultipleValues(e,t,i,r,s,a,o){let n=t,l=null!=this.clientSideRowModel&&!this.gos.get("enableGroupEdit")&&!this.gos.get("treeData"),h=()=>{for(;;){if(!n)return null;let e=this.rowPositionUtils.getRowNode(n);if(n=this.cellNavigationService.getRowBelow({rowPinned:n.rowPinned,rowIndex:n.rowIndex}),null==e)return null;if(!(e.detail||e.footer||l&&e.group))return e}};e.forEach(e=>{let t=h();t&&(e.forEach((e,i)=>this.updateCellValue(t,r[i],e,s,a,o)),i.push(t))})}updateCellValue(e,t,i,r,s,a){if(!e||!t||!t.isCellEditable(e)||t.isSuppressPaste(e))return;let o=this.processCell(e,t,i,s,this.gos.getCallback("processCellFromClipboard"),!0);e.setDataValue(t,o,LM);let{rowIndex:n,rowPinned:l}=e;r[this.cellPositionUtils.createIdFromValues({rowIndex:n,column:t,rowPinned:l})]=!0,a&&a.addParentNode(e.parent,[t])}copyToClipboard(e={}){this.copyOrCutToClipboard(e)}cutToClipboard(e={},t="api"){this.gos.get("suppressCutToClipboard")||(this.eventService.dispatchEvent({type:"cutStart",source:t}),this.copyOrCutToClipboard(e,!0),this.eventService.dispatchEvent({type:"cutEnd",source:t}))}copyOrCutToClipboard(e,t){let{includeHeaders:i,includeGroupHeaders:r}=e;null==i&&(i=this.gos.get("copyHeadersToClipboard")),null==r&&(r=this.gos.get("copyGroupHeadersToClipboard"));let s={includeHeaders:i,includeGroupHeaders:r},a=this.gos.get("selection"),o=null;this.shouldCopyCells(a)?(this.copySelectedRangeToClipboard(s),o=0):this.shouldCopyRows(a)?(this.copySelectedRowsToClipboard(s),o=1):this.focusService.isAnyCellFocused()&&(this.copyFocusedCellToClipboard(s),o=2),t&&null!==o&&this.clearCellsAfterCopy(o)}shouldCopyCells(e){if(!this.rangeService||this.rangeService.isEmpty())return!1;if(e)return"cell"===e.mode;{let e=this.gos.get("suppressCopySingleCellRanges");return!(!this.rangeService.isMoreThanOneCell()&&e)}}shouldCopyRows(e){return!this.selectionService.isEmpty()&&(e?"cell"!==e.mode&&(e.copySelectedRows??!1):!this.gos.get("suppressCopyRowsToClipboard"))}clearCellsAfterCopy(e){if(this.eventService.dispatchEvent({type:"keyShortcutChangedCellStart"}),0===e)this.rangeService.clearCellRangeCellValues({cellEventSource:"clipboardService"});else if(1===e)this.clearSelectedRows();else{let e=this.focusService.getFocusedCell();if(null==e)return;let t=this.rowPositionUtils.getRowNode(e);t&&this.clearCellValue(t,e.column)}this.eventService.dispatchEvent({type:"keyShortcutChangedCellEnd"})}clearSelectedRows(){let e=this.selectionService.getSelectedNodes(),t=this.visibleColsService.getAllCols();for(let i of e)for(let e of t)this.clearCellValue(i,e)}clearCellValue(e,t){if(!t.isCellEditable(e))return;let i=this.valueService.getDeleteValue(t,e);e.setDataValue(t,i,"clipboardService")}iterateActiveRanges(e,t,i){if(!this.rangeService||this.rangeService.isEmpty())return;let r=this.rangeService.getCellRanges();e?this.iterateActiveRange(r[0],t,i,!0):r.forEach((e,s)=>this.iterateActiveRange(e,t,i,s===r.length-1))}iterateActiveRange(e,t,i,r){if(!this.rangeService)return;let s=this.rangeService.getRangeStartRow(e),a=this.rangeService.getRangeEndRow(e);i&&e.columns&&i(e.columns);let o=0,n=!1;for(;!n&&null!=s;){let i=this.rowPositionUtils.getRowNode(s);n=this.rowPositionUtils.sameRow(s,a),t(s,i,e.columns,o++,n&&r),s=this.cellNavigationService.getRowBelow(s)}}copySelectedRangeToClipboard(e={}){if(!this.rangeService||this.rangeService.isEmpty())return;let{data:t,cellsToFlash:i}=this.rangeService.areAllRangesAbleToMerge()?this.buildDataFromMergedRanges(this.rangeService,e):this.buildDataFromRanges(this.rangeService,e);this.copyDataToClipboard(t),this.dispatchFlashCells(i)}buildDataFromMergedRanges(e,t){let i=new Set,r=e.getCellRanges(),s=new Map,a=[],o={};r.forEach(t=>{t.columns.forEach(e=>i.add(e));let{rowPositions:r,cellsToFlash:n}=this.getRangeRowPositionsAndCellsToFlash(e,t);r.forEach(e=>{let t=`${e.rowIndex}-${e.rowPinned||"null"}`;s.get(t)||(s.set(t,!0),a.push(e))}),Object.assign(o,n)});let n=this.visibleColsService.getAllCols(),l=Array.from(i);return l.sort((e,t)=>n.indexOf(e)-n.indexOf(t)),{data:this.buildExportParams({columns:l,rowPositions:a,includeHeaders:t.includeHeaders,includeGroupHeaders:t.includeGroupHeaders}),cellsToFlash:o}}buildDataFromRanges(e,t){let i=e.getCellRanges(),r=[],s={};return i.forEach(i=>{let{rowPositions:a,cellsToFlash:o}=this.getRangeRowPositionsAndCellsToFlash(e,i);Object.assign(s,o),r.push(this.buildExportParams({columns:i.columns,rowPositions:a,includeHeaders:t.includeHeaders,includeGroupHeaders:t.includeGroupHeaders}))}),{data:r.join("\n"),cellsToFlash:s}}getRangeRowPositionsAndCellsToFlash(e,t){let i=[],r={},s=e.getRangeStartRow(t),a=e.getRangeEndRow(t),o=s;for(;o&&(i.push(o),t.columns.forEach(e=>{let{rowIndex:t,rowPinned:i}=o;r[this.cellPositionUtils.createIdFromValues({rowIndex:t,column:e,rowPinned:i})]=!0}),!this.rowPositionUtils.sameRow(o,a));)o=this.cellNavigationService.getRowBelow(o);return{rowPositions:i,cellsToFlash:r}}getCellsToFlashFromRowNodes(e){let t=this.visibleColsService.getAllCols(),i={};for(let r=0;r<e.length;r++){let{rowIndex:s,rowPinned:a}=e[r];if(null!=s)for(let e=0;e<t.length;e++){let r=t[e];i[this.cellPositionUtils.createIdFromValues({rowIndex:s,column:r,rowPinned:a})]=!0}}return i}copyFocusedCellToClipboard(e={}){let t=this.focusService.getFocusedCell();if(null==t)return;let i=this.cellPositionUtils.createId(t),r={rowPinned:t.rowPinned,rowIndex:t.rowIndex},s=t.column,a=this.buildExportParams({columns:[s],rowPositions:[r],includeHeaders:e.includeHeaders,includeGroupHeaders:e.includeGroupHeaders});this.copyDataToClipboard(a),this.dispatchFlashCells({[i]:!0})}copySelectedRowsToClipboard(e={}){let{columnKeys:t,includeHeaders:i,includeGroupHeaders:r}=e,s=this.buildExportParams({columns:t,includeHeaders:i,includeGroupHeaders:r});this.copyDataToClipboard(s);let a=this.selectionService.getSelectedNodes()||[];this.dispatchFlashCells(this.getCellsToFlashFromRowNodes(a))}buildExportParams(e){let{columns:t,rowPositions:i,includeHeaders:r=!1,includeGroupHeaders:s=!1}=e,a={columnKeys:t,rowPositions:i,skipColumnHeaders:!r,skipColumnGroupHeaders:!s,suppressQuotes:!0,columnSeparator:this.getClipboardDelimiter(),onlySelected:!i,processCellCallback:this.gos.getCallback("processCellForClipboard"),processRowGroupCallback:e=>this.processRowGroupCallback(e),processHeaderCallback:this.gos.getCallback("processHeaderForClipboard"),processGroupHeaderCallback:this.gos.getCallback("processGroupHeaderForClipboard")};return this.csvCreator.getDataAsCsv(a,!0)}processRowGroupCallback(e){let{node:t,column:i}=e,r=this.gos.get("treeData"),s=this.gos.get("suppressGroupMaintainValueType"),a=(()=>{if(r||s||!i)return t.key;let e=t.groupData?.[i.getId()];return e&&t.rowGroupColumn&&!1!==t.rowGroupColumn.getColDef().useValueFormatterForExport?this.valueService.formatValue(t.rowGroupColumn,t,e)??e:e})();if(e.node.footer){let e="";a&&a.length&&(e=` ${a}`),a=`Total${e}`}let o=this.gos.getCallback("processCellForClipboard");if(o){let e=t.rowGroupColumn;return!e&&t.footer&&-1===t.level&&(e=this.funcColsService.getRowGroupColumns()[0]),o({value:a,node:t,column:e,type:"clipboard",formatValue:i=>this.valueService.formatValue(e,t,i)??i,parseValue:i=>this.valueService.parseValue(e,t,i,this.valueService.getValue(e,t))})}return a}dispatchFlashCells(e){window.setTimeout(()=>{this.eventService.dispatchEvent({type:"flashCells",cells:e})},0)}processCell(e,t,i,r,s,a,o){return s?s({column:t,node:e,value:i,type:r,formatValue:i=>this.valueService.formatValue(t,e??null,i)??i,parseValue:i=>this.valueService.parseValue(t,e??null,i,this.valueService.getValue(t,e))}):a&&!1!==t.getColDef().useValueParserForImport?this.valueService.parseValue(t,e??null,i,this.valueService.getValue(t,e)):o&&!1!==t.getColDef().useValueFormatterForExport?this.valueService.formatValue(t,e??null,i)??i:i}copyDataToClipboard(e){let t=this.gos.getCallback("sendToClipboard");if(t){t({data:e});return}if(!this.gos.get("suppressClipboardApi")&&navigator.clipboard){navigator.clipboard.writeText(e).catch(t=>{tO(`${t}
${LI("writeText")}`),this.copyDataToClipboardLegacy(e)});return}this.copyDataToClipboardLegacy(e)}copyDataToClipboardLegacy(e){this.executeOnTempElement(t=>{let i=ia(this.gos),r=ih(this.gos);t.value=e||" ",t.select(),t.focus({preventScroll:!0}),i.execCommand("copy")||tO("Browser did not allow document.execCommand('copy'). Ensure api.copySelectedRowsToClipboard() is invoked via a user event, i.e. button click, otherwise the browser will prevent it for security reasons."),null!=r&&null!=r.focus&&r.focus({preventScroll:!0})})}executeOnTempElement(e,t){let i=ia(this.gos),r=i.createElement("textarea");r.style.width="1px",r.style.height="1px",r.style.top=i.documentElement.scrollTop+"px",r.style.left=i.documentElement.scrollLeft+"px",r.style.position="absolute",r.style.opacity="0";let s=this.gridCtrl.getGui();s.appendChild(r);try{e(r)}catch(e){tO("Browser does not support document.execCommand('copy') for clipboard operations")}t?window.setTimeout(()=>{t(r),s.removeChild(r)},100):s.removeChild(r)}getRangeSize(e){let t=e.getCellRanges(),i=0,r=0;return t.length>0&&(i=e.getRangeStartRow(t[0]).rowIndex,r=e.getRangeEndRow(t[0]).rowIndex),i-r+1}},LT="32.2.0",LA={version:LT,moduleName:`${tL.ClipboardModule}-core`,beans:[Lk],dependantModules:[IX,cn]},LR={version:LT,moduleName:`${tL.ClipboardModule}-api`,apiFunctions:{copyToClipboard:function(e,t){e.clipboardService?.copyToClipboard(t)},cutToClipboard:function(e,t){e.clipboardService?.cutToClipboard(t)},copySelectedRowsToClipboard:function(e,t){e.clipboardService?.copySelectedRowsToClipboard(t)},copySelectedRangeToClipboard:function(e,t){e.clipboardService?.copySelectedRangeToClipboard(t)},copySelectedRangeDown:function(e){e.clipboardService?.copyRangeDown()},pasteFromClipboard:function(e){e.clipboardService?.pasteFromClipboard()}},dependantModules:[LA]},LL={version:LT,moduleName:tL.ClipboardModule,dependantModules:[LA,LR]},LP={sum:"Sum",first:"First",last:"Last",min:"Min",max:"Max",count:"Count",avg:"Average"},LF=class extends i2{constructor(){super(...arguments),this.beanName="aggFuncService",this.aggFuncsMap={},this.initialised=!1}postConstruct(){this.init()}init(){this.initialised||(this.initialiseWithDefaultAggregations(),this.addAggFuncs(this.gos.get("aggFuncs")))}initialiseWithDefaultAggregations(){let e=this.aggFuncsMap;e.sum=LN,e.first=LO,e.last=LB,e.min=LG,e.max=Lz,e.count=L_,e.avg=LV,this.initialised=!0}isAggFuncPossible(e,t){let i=iU(this.getFuncNames(e),t),r=tY(this.aggFuncsMap[t]);return i&&r}getDefaultFuncLabel(e){return LP[e]??e}getDefaultAggFunc(e){let t=e.getColDef().defaultAggFunc;if(tY(t)&&this.isAggFuncPossible(e,t))return t;if(this.isAggFuncPossible(e,"sum"))return"sum";let i=this.getFuncNames(e);return iO(i)?i[0]:null}addAggFuncs(e){this.init(),ro(e,(e,t)=>{this.aggFuncsMap[e]=t})}getAggFunc(e){return this.init(),this.aggFuncsMap[e]}getFuncNames(e){let t=e.getColDef().allowedAggFuncs;return null==t?Object.keys(this.aggFuncsMap).sort():t}clear(){this.aggFuncsMap={}}};function LN(e){let{values:t}=e,i=null;for(let e=0;e<t.length;e++){let r=t[e];"number"==typeof r?null===i?i=r:i+="number"==typeof i?r:BigInt(r):"bigint"==typeof r&&(i=null===i?r:("bigint"==typeof i?i:BigInt(i))+r)}return i}function LO(e){return e.values.length>0?e.values[0]:null}function LB(e){return e.values.length>0?iB(e.values):null}function LG(e){let{values:t}=e,i=null;for(let e=0;e<t.length;e++){let r=t[e];("number"==typeof r||"bigint"==typeof r)&&(null===i||i>r)&&(i=r)}return i}function Lz(e){let{values:t}=e,i=null;for(let e=0;e<t.length;e++){let r=t[e];("number"==typeof r||"bigint"==typeof r)&&(null===i||i<r)&&(i=r)}return i}function L_(e){let{values:t}=e,i=0;for(let e=0;e<t.length;e++){let r=t[e];i+=null!=r&&"number"==typeof r.value?r.value:1}let r=e.rowNode?.aggData?.[e.column.getColId()];return r&&r.value===i?r:{value:i,toString:function(){return this.value.toString()},toNumber:function(){return this.value}}}function LV(e){let{values:t}=e,i=0,r=0;for(let e=0;e<t.length;e++){let s=t[e],a=null;"number"==typeof s||"bigint"==typeof s?(a=s,r++):null!=s&&("number"==typeof s.value||"bigint"==typeof s.value)&&"number"==typeof s.count&&(a=s.value*("number"==typeof s.value?s.count:BigInt(s.count)),r+=s.count),"number"==typeof a?i+="number"==typeof i?a:BigInt(a):"bigint"==typeof a&&(i=("bigint"==typeof i?i:BigInt(i))+a)}let s=null;r>0&&(s=i/("number"==typeof i?r:BigInt(r)));let a=e.rowNode?.aggData?.[e.column?.getColId()];return a&&a.count===r&&a.value===s?a:{count:r,value:s,toString:function(){return"number"==typeof this.value||"bigint"==typeof this.value?this.value.toString():""},toNumber:function(){return this.value}}}var Lj=class extends i2{constructor(){super(...arguments),this.beanName="aggregationStage"}wireBeans(e){this.columnModel=e.columnModel,this.aggFuncService=e.aggFuncService,this.funcColsService=e.funcColsService,this.pivotResultColsService=e.pivotResultColsService,this.valueService=e.valueService}execute(e){let t=tZ(this.funcColsService.getValueColumns()),i=!this.gos.getCallback("getGroupRowAgg"),r=e.changedPath&&e.changedPath.isActive();if(t&&i&&r)return;let s=this.createAggDetails(e);this.recursivelyCreateAggData(s)}createAggDetails(e){let t=this.columnModel.isPivotActive(),i=this.funcColsService.getValueColumns(),r=t?this.funcColsService.getPivotColumns():[];return{alwaysAggregateAtRootLevel:this.gos.get("alwaysAggregateAtRootLevel"),groupIncludeTotalFooter:!!im(this.gos),changedPath:e.changedPath,valueColumns:i,pivotColumns:r,filteredOnly:!this.isSuppressAggFilteredOnly(),userAggFunc:this.gos.getCallback("getGroupRowAgg")}}isSuppressAggFilteredOnly(){return void 0!==ig(this.gos)||this.gos.get("suppressAggFilteredOnly")}recursivelyCreateAggData(e){e.changedPath.forEachChangedNodeDepthFirst(t=>{if(!t.hasChildren()){t.aggData&&t.setAggData(null);return}if(-1===t.level&&!e.groupIncludeTotalFooter){let i=!this.columnModel.isPivotMode();if(!e.alwaysAggregateAtRootLevel&&i){t.setAggData(null);return}}this.aggregateRowNode(t,e)},!0)}aggregateRowNode(e,t){let i;let r=0===t.valueColumns.length,s=0===t.pivotColumns.length;i=t.userAggFunc?t.userAggFunc({nodes:e.childrenAfterFilter}):r?null:s?this.aggregateRowNodeUsingValuesOnly(e,t):this.aggregateRowNodeUsingValuesAndPivot(e),e.setAggData(i),e.sibling&&e.sibling.setAggData(i)}aggregateRowNodeUsingValuesAndPivot(e){let t={},i=this.pivotResultColsService.getPivotResultCols()?.list??[],r=!0;for(let s=0;s<i.length;s++){let a;let o=i[s],n=o.getColDef();if(null!=n.pivotTotalColumnIds){r=!1;continue}let l=n.pivotKeys??[];a=e.leafGroup?this.getValuesFromMappedSet(e.childrenMapped,l,n.pivotValueColumn):this.getValuesPivotNonLeaf(e,n.colId),t[n.colId]=this.aggregateValues(a,n.pivotValueColumn.getAggFunc(),n.pivotValueColumn,e,o)}if(!r)for(let r=0;r<i.length;r++){let s=i[r],a=s.getColDef();if(null==a.pivotTotalColumnIds||!a.pivotTotalColumnIds.length)continue;let o=a.pivotTotalColumnIds.map(e=>t[e]);t[a.colId]=this.aggregateValues(o,a.pivotValueColumn.getAggFunc(),a.pivotValueColumn,e,s)}return t}aggregateRowNodeUsingValuesOnly(e,t){let i={},r=t.changedPath.isActive()?t.changedPath.getValueColumnsForNode(e,t.valueColumns):t.valueColumns,s=t.changedPath.isActive()?t.changedPath.getNotValueColumnsForNode(e,t.valueColumns):null,a=this.getValuesNormal(e,r,t.filteredOnly),o=e.aggData;return r.forEach((t,r)=>{i[t.getId()]=this.aggregateValues(a[r],t.getAggFunc(),t,e)}),s&&o&&s.forEach(e=>{i[e.getId()]=o[e.getId()]}),i}getValuesPivotNonLeaf(e,t){return e.childrenAfterFilter.map(e=>e.aggData[t])}getValuesFromMappedSet(e,t,i){let r=e;for(let e=0;e<t.length;e++){let i=t[e];r=r?r[i]:null}return r?r.map(e=>this.valueService.getValue(i,e)):[]}getValuesNormal(e,t,i){let r=[];t.forEach(()=>r.push([]));let s=t.length,a=i?e.childrenAfterFilter:e.childrenAfterGroup,o=a.length;for(let e=0;e<o;e++){let i=a[e];for(let e=0;e<s;e++){let s=t[e],a=this.valueService.getValue(s,i);r[e].push(a)}}return r}aggregateValues(e,t,i,r,s){let a="string"==typeof t?this.aggFuncService.getAggFunc(t):t;return"function"!=typeof a?(tB(`unrecognised aggregation function ${t}`),null):a(this.gos.addGridCommonParams({values:e,column:i,colDef:i?i.getColDef():void 0,pivotResultColumn:s,rowNode:r,data:r?r.data:void 0}))}},LH=class extends i2{constructor(){super(...arguments),this.beanName="autoColService"}wireBeans(e){this.columnModel=e.columnModel,this.columnNameService=e.columnNameService,this.columnFactory=e.columnFactory}createAutoCols(e){let t=[],i=this.gos.get("treeData"),r=iy(this.gos);return i&&r&&(tO('you cannot mix groupDisplayType = "multipleColumns" with treeData, only one column can be used to display groups when doing tree data'),r=!1),r?e.forEach((e,i)=>{t.push(this.createOneAutoCol(e,i))}):t.push(this.createOneAutoCol()),t}updateAutoCols(e,t){e.forEach((e,i)=>this.updateOneAutoCol(e,i,t))}createOneAutoCol(e,t){let i;i=e?`${i8}-${e.getId()}`:i8;let r=this.createAutoColDef(i,e,t);r.colId=i;let s=new rf(r,null,i,!0);return this.createBean(s),s}updateOneAutoCol(e,t,i){let r=e.getColDef(),s="string"==typeof r.showRowGroup?r.showRowGroup:void 0,a=null!=s?this.columnModel.getColDefCol(s):void 0,o=this.createAutoColDef(e.getId(),a??void 0,t);e.setColDef(o,null,i),this.columnFactory.applyColumnState(e,o,i)}createAutoColDef(e,t,i){let r=this.createBaseColDef(t);rd(r,this.gos.get("autoGroupColumnDef")),r=this.columnFactory.addColumnDefaultAndTypes(r,e),!this.gos.get("treeData")&&tK(r.field)&&tK(r.valueGetter)&&tK(r.filterValueGetter)&&"agGroupColumnFilter"!==r.filter&&(r.filter=!1),i&&i>0&&(r.headerCheckboxSelection=!1);let s=ip(this.gos),a=r.valueGetter||null!=r.field;return s&&!a&&(r.sortIndex=void 0,r.initialSort=void 0),r}createBaseColDef(e){let t=this.gos.get("autoGroupColumnDef"),i={headerName:this.localeService.getLocaleTextFunc()("group","Group")};if(t&&(t.cellRenderer||t.cellRendererSelector)||(i.cellRenderer="agGroupCellRenderer"),e){let t=e.getColDef();Object.assign(i,{headerName:this.columnNameService.getDisplayNameForColumn(e,"header"),headerValueGetter:t.headerValueGetter}),t.cellRenderer&&Object.assign(i,{cellRendererParams:{innerRenderer:t.cellRenderer,innerRendererParams:t.cellRendererParams}}),i.showRowGroup=e.getColId()}else i.showRowGroup=!0;return i}},LU=class extends ke{constructor(e,t,i,r,s){super(t,i,s,`
                <span role="option">
                    <span data-ref="eDragHandle" class="ag-drag-handle ag-column-drop-cell-drag-handle" role="presentation"></span>
                    <span data-ref="eText" class="ag-column-drop-cell-text" aria-hidden="true"></span>
                    <ag-sort-indicator data-ref="eSortIndicator"></ag-sort-indicator>
                    <span data-ref="eButton" class="ag-column-drop-cell-button" role="presentation"></span>
                </span>
            `,[s9]),this.column=e,this.dropZonePurpose=r,this.eSortIndicator=null,this.popupShowing=!1}wireBeans(e){super.wireBeans(e),this.popupService=e.popupService,this.sortController=e.sortController,this.columnModel=e.columnModel,this.columnNameService=e.columnNameService,this.funcColsService=e.funcColsService,this.aggFuncService=e.aggFuncService}postConstruct(){this.displayName=this.columnNameService.getDisplayNameForColumn(this.column,"columnDrop"),super.postConstruct(),this.setupSort(),this.addManagedEventListeners({sortChanged:()=>{this.setupAria()}}),this.isGroupingZone()&&this.addManagedPropertyListener("groupLockGroupColumns",()=>{this.refreshRemove(),this.refreshDraggable(),this.setupAria()})}getItem(){return this.column}getDisplayName(){return this.displayName}getTooltip(){return this.column.getColDef().headerTooltip}addAdditionalAriaInstructions(e,t){let i=this.gos.get("rowGroupPanelSuppressSort"),r=this.gos.get("functionsReadOnly");if(this.isAggregationZone()&&!r){let i=t("ariaDropZoneColumnValueItemDescription","Press ENTER to change the aggregation type");e.push(i)}if(this.isGroupingZone()&&this.column.isSortable()&&!i){let i=t("ariaDropZoneColumnGroupItemDescription","Press ENTER to sort");e.push(i)}super.addAdditionalAriaInstructions(e,t)}isDraggable(){return this.isReadOnly()}isRemovable(){return this.isReadOnly()}isReadOnly(){return!this.isGroupingAndLocked()&&!this.gos.get("functionsReadOnly")}getAriaDisplayName(){let e=this.localeService.getLocaleTextFunc(),{name:t,aggFuncName:i}=this.getColumnAndAggFuncName(),r=e("ariaDropZoneColumnComponentAggFuncSeparator"," of "),s={asc:e("ariaDropZoneColumnComponentSortAscending","ascending"),desc:e("ariaDropZoneColumnComponentSortDescending","descending")},a=this.column.getSort(),o=this.gos.get("rowGroupPanelSuppressSort");return[i&&`${i}${r}`,t,this.isGroupingZone()&&!o&&a&&`, ${s[a]}`].filter(e=>!!e).join("")}getColumnAndAggFuncName(){let e=this.displayName,t="";if(this.isAggregationZone()){let e=this.column.getAggFunc(),i="string"==typeof e?e:"agg";t=this.localeService.getLocaleTextFunc()(i,i)}return{name:e,aggFuncName:t}}setupSort(){let e=this.column.isSortable(),t=this.isGroupingZone();if(e&&t&&!this.gos.get("rowGroupPanelSuppressSort")){this.eSortIndicator.setupSort(this.column,!0);let e=e=>{e.preventDefault();let t="ctrl"===this.gos.get("multiSortKey")?e.ctrlKey||e.metaKey:e.shiftKey;this.sortController.progressSort(this.column,t,"uiColumnSorted")};this.addGuiEventListener("click",e),this.addGuiEventListener("keydown",t=>{t.key===aa.ENTER&&this.isGroupingZone()&&e(t)})}}getDefaultIconName(){return"hide"}createGetDragItem(){let{column:e}=this;return()=>{let t={};return t[e.getId()]=e.isVisible(),{columns:[e],visibleState:t}}}setupComponents(){super.setupComponents(),this.isAggregationZone()&&!this.gos.get("functionsReadOnly")&&this.addGuiEventListener("click",this.onShowAggFuncSelection.bind(this))}onKeyDown(e){super.onKeyDown(e),e.key===aa.ENTER&&this.isAggregationZone()&&!this.gos.get("functionsReadOnly")&&(e.preventDefault(),this.onShowAggFuncSelection())}getDisplayValue(){let{name:e,aggFuncName:t}=this.getColumnAndAggFuncName();return this.isAggregationZone()?`${t}(${e})`:e}onShowAggFuncSelection(){if(this.popupShowing)return;this.popupShowing=!0;let e=new I6({cssIdentifier:"select-agg-func"}),t=this.aggFuncService.getFuncNames(this.column),i=this.getGui(),r=e.getGui();e.setModel({getRow:function(e){return t[e]},getRowCount:function(){return t.length}}),this.createBean(e);let s=sO('<div class="ag-select-agg-func-popup"></div>');s.style.top="0px",s.style.left="0px",s.appendChild(r),s.style.width=`${i.clientWidth}px`;let[a]=this.addManagedElementListeners(s,{focusout:e=>{!s.contains(e.relatedTarget)&&n&&n.hideFunc()}}),o=this.localeService.getLocaleTextFunc(),n=this.popupService.addPopup({modal:!0,eChild:s,closeOnEsc:!0,closedCallback:t=>{this.destroyBean(e),this.popupShowing=!1,t?.key==="Escape"&&i.focus(),a&&a()},ariaLabel:o("ariaLabelAggregationFunction","Aggregation Function")});n&&e.setComponentCreator(this.createAggSelect.bind(this,n.hideFunc)),e.addGuiEventListener("keydown",t=>{if(t.key===aa.ENTER||t.key===aa.SPACE){let t=e.getLastFocusedRow();if(null==t)return;let i=e.getComponentAt(t);i&&i.selectItem()}}),this.popupService.positionPopupByComponent({type:"aggFuncSelect",eventSource:i,ePopup:s,keepWithinBounds:!0,column:this.column,position:"under"}),e.refresh();let l=t.findIndex(e=>e===this.column.getAggFunc());-1===l&&(l=0),e.focusRow(l)}createAggSelect(e,t){let i=this.localeService.getLocaleTextFunc(),r=t.toString();return new LW(()=>{e(),this.funcColsService.setColumnAggFunc(this.column,t,"toolPanelDragAndDrop")},i(r,r))}isGroupingAndLocked(){return this.isGroupingZone()&&this.columnModel.isColGroupLocked(this.column)}isAggregationZone(){return"aggregation"===this.dropZonePurpose}isGroupingZone(){return"rowGroup"===this.dropZonePurpose}getDragSourceType(){return aX.ToolPanel}destroy(){super.destroy(),this.column=null}},LW=class extends sQ{constructor(e,t){super('<div class="ag-select-agg-func-item"/>'),this.selectItem=e,this.getGui().innerText=t,this.addGuiEventListener("click",this.selectItem)}},L$=class extends kt{constructor(e,t){super(e),this.dropZonePurpose=t}wireBeans(e){super.wireBeans(e),this.columnModel=e.columnModel,this.funcColsService=e.funcColsService}init(e){super.init(e),this.addManagedEventListeners({newColumnsLoaded:this.refreshGui.bind(this)}),this.addManagedPropertyListeners(["functionsReadOnly","rowGroupPanelSuppressSort","groupLockGroupColumns"],this.refreshGui.bind(this))}getItems(e){return e.columns??[]}isInterestedIn(e){return e===aX.HeaderCell||e===aX.ToolPanel}minimumAllowedNewInsertIndex(){let e=this.gos.get("groupLockGroupColumns"),t=this.funcColsService.getRowGroupColumns().length;return -1===e?t:Math.min(e,t)}showOrHideColumnOnExit(e){return this.isRowGroupPanel()&&!this.gos.get("suppressRowGroupHidesColumns")&&!e.fromNudge}handleDragEnterEnd(e){if(this.showOrHideColumnOnExit(e)){let t=e.dragSource.getDragItem().columns;this.setColumnsVisible(t,!1,"uiColumnDragged")}}handleDragLeaveEnd(e){if(this.showOrHideColumnOnExit(e)){let t=e.dragSource.getDragItem();this.setColumnsVisible(t.columns,!0,"uiColumnDragged")}}setColumnsVisible(e,t,i){if(e){let r=e.filter(e=>!e.getColDef().lockVisible);this.columnModel.setColsVisible(r,t,i)}}isRowGroupPanel(){return"rowGroup"===this.dropZonePurpose}createPillComponent(e,t,i,r){return new LU(e,t,i,this.dropZonePurpose,r)}},LY=class extends L${constructor(e){super(e,"pivot")}postConstruct(){let e=this.localeService.getLocaleTextFunc(),t=e("pivotColumnsEmptyMessage","Drag here to set column labels"),i=e("pivots","Column Labels");super.init({icon:s2("pivotPanel",this.gos,null),emptyMessage:t,title:i}),this.addManagedEventListeners({newColumnsLoaded:this.refresh.bind(this),columnPivotChanged:this.refresh.bind(this),columnPivotModeChanged:this.checkVisibility.bind(this)}),this.refresh()}getAriaLabel(){return this.localeService.getLocaleTextFunc()("ariaPivotDropZonePanelLabel","Column Labels")}getTooltipParams(){let e=super.getTooltipParams();return e.location="pivotColumnsList",e}refresh(){this.checkVisibility(),this.refreshGui()}checkVisibility(){let e=this.columnModel.isPivotMode();if(this.isHorizontal())switch(this.gos.get("pivotPanelShow")){case"always":this.setDisplayed(e);break;case"onlyWhenPivoting":{let t=this.columnModel.isPivotActive();this.setDisplayed(e&&t);break}default:this.setDisplayed(!1)}else this.setDisplayed(e)}isItemDroppable(e,t){return!this.gos.get("functionsReadOnly")&&!!e.isPrimary()&&e.isAllowPivot()&&(!e.isPivotActive()||this.isSourceEventFromTarget(t))}updateItems(e){this.funcColsService.setPivotColumns(e,"toolPanelUi")}getIconName(){return this.isPotentialDndItems()?"pivot":"notAllowed"}getExistingItems(){return this.funcColsService.getPivotColumns()}},LK=class extends L${constructor(e){super(e,"rowGroup")}postConstruct(){let e=this.localeService.getLocaleTextFunc(),t=e("rowGroupColumnsEmptyMessage","Drag here to set row groups"),i=e("groups","Row Groups");super.init({icon:s2("rowGroupPanel",this.gos,null),emptyMessage:t,title:i}),this.addManagedEventListeners({columnRowGroupChanged:this.refreshGui.bind(this)})}getAriaLabel(){return this.localeService.getLocaleTextFunc()("ariaRowGroupDropZonePanelLabel","Row Groups")}getTooltipParams(){let e=super.getTooltipParams();return e.location="rowGroupColumnsList",e}isItemDroppable(e,t){return!this.gos.get("functionsReadOnly")&&!!e.isPrimary()&&e.isAllowRowGroup()&&(!e.isRowGroupActive()||this.isSourceEventFromTarget(t))}updateItems(e){this.funcColsService.setRowGroupColumns(e,"toolPanelUi")}getIconName(){return this.isPotentialDndItems()?"group":"notAllowed"}getExistingItems(){return this.funcColsService.getRowGroupColumns()}},LZ={selector:"AG-GRID-HEADER-DROP-ZONES",component:class extends sQ{wireBeans(e){this.columnModel=e.columnModel,this.funcColsService=e.funcColsService}constructor(){super()}postConstruct(){this.setGui(this.createNorthPanel());let e=this.onRowGroupChanged.bind(this);this.addManagedEventListeners({columnRowGroupChanged:e,newColumnsLoaded:e}),this.addManagedPropertyListener("rowGroupPanelShow",e),this.addManagedPropertyListener("pivotPanelShow",()=>this.onPivotPanelShow()),this.onRowGroupChanged()}createNorthPanel(){let e=document.createElement("div");e.classList.add("ag-column-drop-wrapper"),rQ(e,"presentation"),this.rowGroupComp=new LK(!0),this.createManagedBean(this.rowGroupComp),this.pivotComp=new LY(!0),this.createManagedBean(this.pivotComp),e.appendChild(this.rowGroupComp.getGui()),e.appendChild(this.pivotComp.getGui());let t=this.onDropPanelVisible.bind(this);return this.addManagedListeners(this.rowGroupComp,{displayChanged:t}),this.addManagedListeners(this.pivotComp,{displayChanged:t}),this.onDropPanelVisible(),e}onDropPanelVisible(){let e=this.rowGroupComp.isDisplayed()&&this.pivotComp.isDisplayed(),t="ag-column-drop-horizontal-half-width";this.rowGroupComp.addOrRemoveCssClass(t,e),this.pivotComp.addOrRemoveCssClass(t,e)}onRowGroupChanged(){if(!this.rowGroupComp)return;let e=this.gos.get("rowGroupPanelShow");if("always"===e)this.rowGroupComp.setDisplayed(!0);else if("onlyWhenGrouping"===e){let e=!this.funcColsService.isRowGroupEmpty();this.rowGroupComp.setDisplayed(e)}else this.rowGroupComp.setDisplayed(!1)}onPivotPanelShow(){if(!this.pivotComp)return;let e=this.gos.get("pivotPanelShow");if("always"===e)this.pivotComp.setDisplayed(!0);else if("onlyWhenPivoting"===e){let e=this.columnModel.isPivotActive();this.pivotComp.setDisplayed(e)}else this.pivotComp.setDisplayed(!1)}}},Lq=class extends i2{constructor(){super(...arguments),this.beanName="columnDropZonesService"}getDropZoneSelector(){return LZ}},LX=class extends i2{constructor(){super(...arguments),this.beanName="filterAggregatesStage"}wireBeans(e){this.filterManager=e.filterManager,this.columnModel=e.columnModel}execute(e){let t=this.columnModel.isPivotMode(),i=this.filterManager?.isAggregateFilterPresent()||this.filterManager?.isAggregateQuickFilterPresent(),r=ig(this.gos)||(t?e=>e.node.leafGroup:e=>!e.node.group),{changedPath:s}=e,a=(e,t=!1)=>{e.childrenAfterFilter&&(e.childrenAfterAggFilter=e.childrenAfterFilter,t&&e.childrenAfterAggFilter.forEach(e=>a(e,t)),this.setAllChildrenCount(e)),e.sibling&&(e.sibling.childrenAfterAggFilter=e.childrenAfterAggFilter)};s.forEachChangedNodeDepthFirst(i?e=>{e.childrenAfterAggFilter=e.childrenAfterFilter?.filter(e=>r({node:e})&&this.filterManager.doesRowPassAggregateFilters({rowNode:e})?(a(e,!0),!0):e.childrenAfterAggFilter?.length)||null,this.setAllChildrenCount(e),e.sibling&&(e.sibling.childrenAfterAggFilter=e.childrenAfterAggFilter)}:a,!0)}setAllChildrenCountTreeData(e){let t=e.childrenAfterAggFilter,i=0;if(t){let e=t.length;i=e;for(let r=0;r<e;++r)i+=t[r].allChildrenCount??0}e.setAllChildrenCount(0===i&&e.level>=0?null:i)}setAllChildrenCountGridGrouping(e){let t=0;e.childrenAfterAggFilter.forEach(e=>{e.group?t+=e.allChildrenCount:t++}),e.setAllChildrenCount(t)}setAllChildrenCount(e){if(!e.hasChildren()){e.setAllChildrenCount(null);return}this.gos.get("treeData")?this.setAllChildrenCountTreeData(e):this.setAllChildrenCountGridGrouping(e)}},LQ=class extends hu{constructor(){super(`
            <div class="ag-group-filter">
                <div data-ref="eGroupField"></div>
                <div data-ref="eUnderlyingFilter"></div>
            </div>
        `),this.eGroupField=null,this.eUnderlyingFilter=null}wireBeans(e){this.filterManager=e.filterManager,this.columnNameService=e.columnNameService,this.funcColsService=e.funcColsService}postConstruct(){this.initialiseTabGuard({})}init(e){return this.updateParams(e).then(()=>{this.addManagedEventListeners({columnRowGroupChanged:()=>this.onColumnRowGroupChanged(),filterDestroyed:e=>this.onFilterDestroyed(e)})})}refresh(e){return this.updateParams(e),!0}updateParams(e){return this.params=e,this.validateParams(),this.updateGroups()}validateParams(){let{colDef:e}=this.params;e.field&&tO('Group Column Filter does not work with the colDef property "field". This property will be ignored.'),e.filterValueGetter&&tO('Group Column Filter does not work with the colDef property "filterValueGetter". This property will be ignored.'),e.filterParams&&tO('Group Column Filter does not work with the colDef property "filterParams". This property will be ignored.')}updateGroups(){let e=this.updateGroupField();return this.getUnderlyingFilters(e)}getSourceColumns(){return(this.groupColumn=this.params.column,this.gos.get("treeData"))?(tO("Group Column Filter does not work with Tree Data enabled. Please disable Tree Data, or use a different filter."),[]):this.funcColsService.getSourceColumnsForGroupColumn(this.groupColumn)||(tO("Group Column Filter only works on group columns. Please use a different filter."),[])}updateGroupField(){sL(this.eGroupField),this.eGroupFieldSelect&&this.destroyBean(this.eGroupFieldSelect);let e=this.getSourceColumns(),t=e.filter(e=>e.isFilterAllowed());return t.length?(1===e.length?(this.selectedColumn=t[0],sC(this.eGroupField,!1)):(this.selectedColumn&&t.some(e=>e.getId()===this.selectedColumn.getId())||(this.selectedColumn=t[0]),this.createGroupFieldSelectElement(t),this.eGroupField.appendChild(this.eGroupFieldSelect.getGui()),this.eGroupField.appendChild(sO('<div class="ag-filter-separator"></div>')),sC(this.eGroupField,!0)),t):(this.selectedColumn=void 0,sC(this.eGroupField,!1),null)}createGroupFieldSelectElement(e){this.eGroupFieldSelect=this.createManagedBean(new op);let t=this.localeService.getLocaleTextFunc();this.eGroupFieldSelect.setLabel(t("groupFilterSelect","Select field:")),this.eGroupFieldSelect.setLabelAlignment("top"),this.eGroupFieldSelect.addOptions(e.map(e=>({value:e.getId(),text:this.columnNameService.getDisplayNameForColumn(e,"groupFilter",!1)??void 0}))),this.eGroupFieldSelect.setValue(this.selectedColumn.getId()),this.eGroupFieldSelect.onValueChange(e=>this.updateSelectedColumn(e)),this.eGroupFieldSelect.addCssClass("ag-group-filter-field-select-wrapper"),1===e.length&&this.eGroupFieldSelect.setDisabled(!0)}getUnderlyingFilters(e){if(!e)return this.filterColumnPairs=void 0,this.selectedFilter=void 0,this.groupColumn.setFilterActive(!1,"columnRowGroupChanged"),ab.resolve();let t=[],i=[];return e.forEach(e=>{let r=this.filterManager.getOrCreateFilterWrapper(e);r?.filterPromise&&t.push(r.filterPromise.then(t=>(t&&i.push({filter:t,column:e}),e.getId()===this.selectedColumn.getId()&&(this.selectedFilter=t??void 0),t)))}),ab.all(t).then(()=>{this.filterColumnPairs=i,this.groupColumn.setFilterActive(this.isFilterActive(),"columnRowGroupChanged")})}addUnderlyingFilterElement(){if(sL(this.eUnderlyingFilter),!this.selectedColumn)return ab.resolve();let e=this.createManagedBean(new oe(this.selectedColumn,"COLUMN_MENU"));return(this.filterWrapperComp=e,e.hasFilter())?(this.eUnderlyingFilter.appendChild(e.getGui()),e.getFilter()?.then(()=>{e.afterGuiAttached?.(this.afterGuiAttachedParams),this.afterGuiAttachedParams?.suppressFocus||!this.eGroupFieldSelect||this.eGroupFieldSelect.isDisabled()||this.eGroupFieldSelect.getFocusableElement().focus()})??ab.resolve()):ab.resolve()}updateSelectedColumn(e){if(!e)return;this.filterWrapperComp?.afterGuiDetached(),this.destroyBean(this.filterWrapperComp);let t=this.getFilterColumnPair(e);this.selectedColumn=t?.column,this.selectedFilter=t?.filter,this.dispatchLocalEvent({type:"selectedColumnChanged"}),this.addUnderlyingFilterElement()}isFilterActive(){return!!this.filterColumnPairs?.some(({filter:e})=>e.isFilterActive())}doesFilterPass(){return!0}getModel(){return null}setModel(){return ab.resolve()}afterGuiAttached(e){this.afterGuiAttachedParams=e,this.addUnderlyingFilterElement()}afterGuiDetached(){sL(this.eUnderlyingFilter),this.selectedFilter?.afterGuiDetached?.()}onColumnRowGroupChanged(){this.updateGroups().then(()=>{this.dispatchLocalEvent({type:"columnRowGroupChanged"})})}onFilterDestroyed({column:e,source:t}){if("gridDestroyed"===t)return;let i=e.getColId();this.filterColumnPairs?.some(({column:e})=>e.getColId()===i)&&setTimeout(()=>{this.updateGroups()})}getFilterColumnPair(e){if(e)return this.filterColumnPairs?.find(({column:t})=>t.getId()===e)}getSelectedFilter(){return this.selectedFilter}getSelectedColumn(){return this.selectedColumn}isFilterAllowed(){return!!this.selectedColumn}destroy(){super.destroy()}},LJ=class extends sQ{constructor(){super(`
            <div data-ref="eFloatingFilter" class="ag-group-floating-filter ag-floating-filter-input" role="presentation"></div>
        `),this.eFloatingFilter=null,this.haveAddedColumnListeners=!1}wireBeans(e){this.columnNameService=e.columnNameService,this.filterManager=e.filterManager}init(e){this.params=e;let t="multipleColumns"===this.gos.get("groupDisplayType");return new ab(e=>{this.params.parentFilterInstance(i=>{this.parentFilterInstance=i,t?this.setupUnderlyingFloatingFilterElement().then(()=>e()):(this.setupReadOnlyFloatingFilterElement(),e())})}).then(()=>{this.addManagedListeners(this.parentFilterInstance,{selectedColumnChanged:this.onSelectedColumnChanged.bind(this),columnRowGroupChanged:this.onColumnRowGroupChanged.bind(this)})})}onParamsUpdated(e){this.refresh(e)}refresh(e){this.params=e,this.setParams()}setParams(){let e=this.columnNameService.getDisplayNameForColumn(this.params.column,"header",!0),t=this.localeService.getLocaleTextFunc();this.eFloatingFilterText?.setInputAriaLabel(`${e} ${t("ariaFilterInput","Filter Input")}`)}setupReadOnlyFloatingFilterElement(){this.eFloatingFilterText||(this.eFloatingFilterText=this.createManagedBean(new ow),this.eFloatingFilterText.setDisabled(!0).addGuiEventListener("click",()=>this.params.showParentFilter()),this.setParams()),this.updateDisplayedValue(),this.eFloatingFilter.appendChild(this.eFloatingFilterText.getGui())}setupUnderlyingFloatingFilterElement(){this.showingUnderlyingFloatingFilter=!1,this.underlyingFloatingFilter=void 0,sL(this.eFloatingFilter);let e=this.parentFilterInstance.getSelectedColumn();if(e&&!e.isVisible()){let t=this.filterManager.getFloatingFilterCompDetails(e,this.params.showParentFilter);if(t)return this.haveAddedColumnListeners||(this.haveAddedColumnListeners=!0,this.addManagedListeners(e,{visibleChanged:this.onColumnVisibleChanged.bind(this),colDefChanged:this.onColDefChanged.bind(this)})),t.newAgStackInstance().then(e=>{this.underlyingFloatingFilter=e,this.underlyingFloatingFilter?.onParentModelChanged(this.parentFilterInstance.getSelectedFilter()?.getModel()),this.appendChild(e.getGui()),this.showingUnderlyingFloatingFilter=!0})}return this.setupReadOnlyFloatingFilterElement(),ab.resolve()}onColumnVisibleChanged(){this.setupUnderlyingFloatingFilterElement()}onColDefChanged(e){if(!e.column)return;let t=this.filterManager.getFloatingFilterCompDetails(e.column,this.params.showParentFilter);t&&(this.underlyingFloatingFilter?.refresh?this.underlyingFloatingFilter.refresh(t.params):this.underlyingFloatingFilter?.onParamsUpdated?.(t.params))}onParentModelChanged(e,t){this.showingUnderlyingFloatingFilter?this.underlyingFloatingFilter?.onParentModelChanged(this.parentFilterInstance.getSelectedFilter()?.getModel(),t):this.updateDisplayedValue()}updateDisplayedValue(){if(!this.parentFilterInstance||!this.eFloatingFilterText)return;let e=this.parentFilterInstance.getSelectedFilter();if(!e){this.eFloatingFilterText.setValue(""),this.eFloatingFilterText.setDisplayed(!1);return}if(this.eFloatingFilterText.setDisplayed(!0),e.getModelAsString){let t=e.getModel();this.eFloatingFilterText.setValue(null==t?"":e.getModelAsString(t))}else this.eFloatingFilterText.setValue("")}onSelectedColumnChanged(){this.showingUnderlyingFloatingFilter||this.updateDisplayedValue()}onColumnRowGroupChanged(){this.showingUnderlyingFloatingFilter||this.updateDisplayedValue()}destroy(){super.destroy()}},L0=class{constructor(){this.allSets={},this.allParents=[]}removeFromChildrenAfterGroup(e,t){this.getSet(e).removeFromChildrenAfterGroup[t.id]=!0}isRemoveFromAllLeafChildren(e,t){return!!this.getSet(e).removeFromAllLeafChildren[t.id]}preventRemoveFromAllLeafChildren(e,t){let i=this.getSet(e);delete i.removeFromAllLeafChildren[t.id]}removeFromAllLeafChildren(e,t){this.getSet(e).removeFromAllLeafChildren[t.id]=!0}getSet(e){return this.allSets[e.id]||(this.allSets[e.id]={removeFromAllLeafChildren:{},removeFromChildrenAfterGroup:{}},this.allParents.push(e)),this.allSets[e.id]}getAllParents(){return this.allParents}flush(){this.allParents.forEach(e=>{let t=this.allSets[e.id];e.childrenAfterGroup=e.childrenAfterGroup.filter(e=>!t.removeFromChildrenAfterGroup[e.id]),e.allLeafChildren=e.allLeafChildren?.filter(e=>!t.removeFromAllLeafChildren[e.id])??null,e.updateHasChildren();let i=e.sibling;i&&(i.childrenAfterGroup=e.childrenAfterGroup,i.allLeafChildren=e.allLeafChildren)}),this.allSets={},this.allParents.length=0}};function L1(e,t){let i=e.sourceRowIndex,r=t.sourceRowIndex,s=i>=0,a=r>=0;return s&&a?i-r:s||a?s?1:-1:e.__objectId-t.__objectId}var L2=class extends i2{wireBeans(e){this.beans=e,this.columnModel=e.columnModel,this.funcColsService=e.funcColsService,this.valueService=e.valueService,this.selectionService=e.selectionService,this.showRowGroupColsService=e.showRowGroupColsService}execute(e){let t=this.createGroupingDetails(e);if(t.transactions)this.handleTransaction(t);else{let i=!0===e.afterColumnsChanged;this.shotgunResetEverything(t,i)}this.positionLeafsAndGroups(e.changedPath),this.orderGroups(t)}positionLeafsAndGroups(e){e.forEachChangedNodeDepthFirst(e=>{if(e.childrenAfterGroup){let t;let i=[],r=[];e.childrenAfterGroup.forEach(e=>{e.childrenAfterGroup?.length?""!==e.key||t?r.push(e):t=e:i.push(e)}),t&&r.push(t),e.childrenAfterGroup=[...i,...r]}},!1)}createGroupingDetails(e){let{rowNode:t,changedPath:i,rowNodeTransactions:r,rowNodesOrderChanged:s}=e,a=this.funcColsService.getRowGroupColumns();return{expandByDefault:this.gos.get("groupDefaultExpanded"),groupedCols:a,rootNode:t,pivotMode:this.columnModel.isPivotMode(),groupedColCount:a?.length??0,transactions:r,rowNodesOrderChanged:!!s,changedPath:i,groupAllowUnbalanced:this.gos.get("groupAllowUnbalanced"),isGroupOpenByDefault:this.gos.getCallback("isGroupOpenByDefault"),initialGroupOrderComparator:this.gos.getCallback("initialGroupOrderComparator"),suppressGroupMaintainValueType:this.gos.get("suppressGroupMaintainValueType"),keyCreators:a?.map(e=>e.getColDef().keyCreator)??[]}}handleTransaction(e){e.transactions.forEach(t=>{let i=new L0;iO(t.remove)&&this.removeNodes(t.remove,e,i),iO(t.update)&&this.moveNodesInWrongPath(t.update,e,i),iO(t.add)&&this.insertNodes(t.add,e);let r=i.getAllParents().slice();i.flush(),this.removeEmptyGroups(r,e)}),e.rowNodesOrderChanged&&this.sortChildren(e)}sortChildren(e){e.changedPath.forEachChangedNodeDepthFirst(t=>{(function(e){if(!e)return!1;let t=e.length;if(t<2)return!1;let i=!1;for(let r=1;r<t;r++)if(L1(e[r-1],e[r])>0){i=!0;break}return!!i&&(e.sort(L1),!0)})(t.childrenAfterGroup)&&e.changedPath.addParentNode(t)},!1,!0)}orderGroups(e){let t=e.initialGroupOrderComparator;tY(t)&&function e(i){tY(i.childrenAfterGroup)&&!i.leafGroup&&(i.childrenAfterGroup.sort((e,i)=>t({nodeA:e,nodeB:i})),i.childrenAfterGroup.forEach(t=>e(t)))}(e.rootNode)}getExistingPathForNode(e,t){let i=[],r=e.parent;for(;r&&r!==t.rootNode;)i.push({key:r.key,rowGroupColumn:r.rowGroupColumn,field:r.field}),r=r.parent;return i.reverse(),i}moveNodesInWrongPath(e,t,i){e.forEach(e=>{t.changedPath.isActive()&&t.changedPath.addParentNode(e.parent);let r=e=>e.key;iG(this.getExistingPathForNode(e,t).map(r),this.getGroupInfo(e,t).map(r))||this.moveNode(e,t,i)})}moveNode(e,t,i){if(this.removeNodesFromParents([e],t,i),this.insertOneNode(e,t,i),e.setData(e.data),t.changedPath.isActive()){let i=e.parent;t.changedPath.addParentNode(i)}}removeNodes(e,t,i){this.removeNodesFromParents(e,t,i),t.changedPath.isActive()&&e.forEach(e=>t.changedPath.addParentNode(e.parent))}forEachParentGroup(e,t,i){let r=t;for(;r&&r!==e.rootNode;)i(r),r=r.parent}removeNodesFromParents(e,t,i){let r=i||new L0;e.forEach(e=>{this.removeFromParent(e,r),this.forEachParentGroup(t,e.parent,t=>{r.removeFromAllLeafChildren(t,e)})}),null==i&&r.flush()}removeEmptyGroups(e,t){let i=!0,r=e=>{let t=this.getChildrenMappedKey(e.key,e.rowGroupColumn),i=e.parent;return!!i?.childrenMapped&&!!i.childrenMapped[t]&&!!e.group&&(e.childrenAfterGroup?.length??0)===0};for(;i;){i=!1;let s=new L0;e.forEach(e=>{this.forEachParentGroup(t,e,e=>{r(e)&&(i=!0,this.removeFromParent(e,s),e.setSelectedParams({newValue:!1,source:"rowGroupChanged"}))})}),s.flush()}}removeFromParent(e,t){e.parent&&(t?t.removeFromChildrenAfterGroup(e.parent,e):(i_(e.parent.childrenAfterGroup,e),e.parent.updateHasChildren()));let i=this.getChildrenMappedKey(e.key,e.rowGroupColumn);e.parent?.childrenMapped&&delete e.parent.childrenMapped[i],e.setRowTop(null),e.setRowIndex(null)}addToParent(e,t){let i=this.getChildrenMappedKey(e.key,e.rowGroupColumn);t?.childrenMapped&&t.childrenMapped[i]!==e&&(t.childrenMapped[i]=e,t.childrenAfterGroup.push(e),t.setGroup(!0))}areGroupColsEqual(e,t){return null!=e&&null!=t&&e.pivotMode===t.pivotMode&&iG(e.groupedCols,t.groupedCols)&&iG(e.keyCreators,t.keyCreators)}checkAllGroupDataAfterColsChanged(e){let t=i=>{i&&i.forEach(i=>{if(!i.group)return;let r={field:i.field,key:i.key,rowGroupColumn:i.rowGroupColumn,leafNode:i.allLeafChildren?.[0]};this.setGroupData(i,r,e),t(i.childrenAfterGroup)})};t(e.rootNode.childrenAfterGroup)}shotgunResetEverything(e,t){if(this.noChangeInGroupingColumns(e,t))return;this.selectionService.filterFromSelection(e=>e&&!e.group);let{groupedCols:i}=e,r=e.rootNode;r.leafGroup=0===i.length,r.childrenAfterGroup=[],r.childrenMapped={},r.updateHasChildren();let s=r.sibling;s&&(s.childrenAfterGroup=r.childrenAfterGroup,s.childrenMapped=r.childrenMapped),this.insertNodes(r.allLeafChildren,e)}noChangeInGroupingColumns(e,t){let i=!1,r=this.showRowGroupColsService.getShowRowGroupCols(),s=r?r.map(e=>e.getId()).join("-"):"";return t&&(i=this.areGroupColsEqual(e,this.oldGroupingDetails),this.oldGroupDisplayColIds!==s&&this.checkAllGroupDataAfterColsChanged(e)),this.oldGroupingDetails=e,this.oldGroupDisplayColIds=s,i}insertNodes(e,t){e.forEach(e=>{this.insertOneNode(e,t),t.changedPath.isActive()&&t.changedPath.addParentNode(e.parent)})}insertOneNode(e,t,i){let r=this.getGroupInfo(e,t),s=this.findParentForNode(e,r,t,i);s.group||tO("duplicate group keys for row data, keys should be unique",[s.data,e.data]),e.parent=s,e.level=r.length,s.childrenAfterGroup.push(e),s.updateHasChildren()}findParentForNode(e,t,i,r){let s=i.rootNode;return t.forEach((t,a)=>{s=this.getOrCreateNextNode(s,t,a,i),r?.isRemoveFromAllLeafChildren(s,e)?r?.preventRemoveFromAllLeafChildren(s,e):s.allLeafChildren.push(e)}),s}getOrCreateNextNode(e,t,i,r){let s=this.getChildrenMappedKey(t.key,t.rowGroupColumn),a=e?.childrenMapped?.[s];return a||(a=this.createGroup(t,e,i,r),this.addToParent(a,e)),a}createGroup(e,t,i,r){let s=new a7(this.beans);return s.group=!0,s.field=e.field,s.rowGroupColumn=e.rowGroupColumn,this.setGroupData(s,e,r),s.key=e.key,s.id=this.createGroupId(s,t,i),s.level=i,s.leafGroup=i===r.groupedColCount-1,s.allLeafChildren=[],s.setAllChildrenCount(0),s.rowGroupIndex=i,s.childrenAfterGroup=[],s.childrenMapped={},s.updateHasChildren(),s.parent=t,this.setExpandedInitialValue(r,s),s}createGroupId(e,t,i){let r=(e,t)=>{if(!e.rowGroupColumn)return null;let i=t?r(t,t.parent,0):null;return`${null==i?"":i+"-"}${e.rowGroupColumn.getColId()}-${e.key}`};return a7.ID_PREFIX_ROW_GROUP+r(e,t,i)}setGroupData(e,t,i){e.groupData={},this.showRowGroupColsService.getShowRowGroupCols().forEach(r=>{let s=e.rowGroupColumn;null!==s&&r.isRowGroupDisplayed(s.getId())&&(i.suppressGroupMaintainValueType?e.groupData[r.getColId()]=t.key:e.groupData[r.getColId()]=this.valueService.getValue(s,t.leafNode))})}getChildrenMappedKey(e,t){return t?t.getId()+"-"+e:e}setExpandedInitialValue(e,t){if(e.pivotMode&&t.leafGroup){t.expanded=!1;return}let i=e.isGroupOpenByDefault;if(i){let e={rowNode:t,field:t.field,key:t.key,level:t.level,rowGroupColumn:t.rowGroupColumn};t.expanded=!0==i(e);return}if(-1===e.expandByDefault){t.expanded=!0;return}t.expanded=t.level<e.expandByDefault}getGroupInfo(e,t){let i=[];return t.groupedCols.forEach(r=>{let s=this.valueService.getKeyForNode(r,e),a=null!=s&&""!==s;if(!t.pivotMode&&t.groupAllowUnbalanced||a||(s="",a=!0),a){let t={key:s,field:r.getColDef().field,rowGroupColumn:r,leafNode:e};i.push(t)}}),i}},L3=(e,t)=>e.treeNode.oldSourceRowIndex-t.treeNode.oldSourceRowIndex,L4=Object.freeze([]),L6=L4.values(),L5=(e,t)=>{e.parent=null,e.treeNode=null,t?e.childrenAfterGroup=[]:(e.level=0,e.childrenAfterGroup=null,e.allLeafChildren=null)},L8=class e{constructor(e,t,i){this.parent=e,this.key=t,this.level=i,this.children=null,this.invalidatedHead=null,this.invalidatedNext=void 0,this.row=null,this.oldRow=null,this.duplicateRows=null,this.childrenAfterGroup=L4,this.allLeafChildren=L4,this.childrenChanged=!1,this.leafChildrenChanged=!1,this.oldSourceRowIndex=-1}isEmptyFillerNode(){return!this.row?.data&&!this.children?.size}hasChildren(){return!!this.children?.size}enumChildren(){return this.children?.values()??L6}upsertKey(t){"string"!=typeof t&&(t=String(t));let i=this.children?.get(t);return i||(i=new e(this,t,this.level+1),(this.children??(this.children=new Map))?.set(i.key,i)),i}destroy(){let{row:e,parent:t}=this;null!==t&&(t?.children?.delete(this.key),null!==e&&L5(e,!0),this.parent=null)}setRow(e){let{level:t,row:i,childrenAfterGroup:r}=this;if(t<0)null!==i&&i!==e&&L5(i,!0);else{if(i===e)return!1;null!==i?(e.allLeafChildren=i.allLeafChildren??this.allLeafChildren??L4,L5(i,!1)):e.allLeafChildren=this.allLeafChildren??L4}return e.level=t,e.childrenAfterGroup=r,e.treeNode=this,this.row=e,!0}removeRow(e){let{level:t,row:i,duplicateRows:r,childrenAfterGroup:s}=this;if(i===e){let e=this.popDuplicateRow();e?(this.row=e,e.childrenAfterGroup=s,t>=0&&(e.allLeafChildren=i.allLeafChildren??this.allLeafChildren??L4)):this.row=null}else{if(!r?.delete(e))return!1;0===r.size&&(this.duplicateRows=null)}return L5(e,t<0),!0}addDuplicateRow(e){let{level:t}=this,i=this.duplicateRows;if(null===i)i=new Set,this.duplicateRows=i;else if(i.has(e))return!1;return i.add(e),e.treeNode=this,e.level=t,t>=0&&(e.allLeafChildren=L4),e.childrenAfterGroup=L4,!0}sortFirstDuplicateRow(){let e=this.duplicateRows,t=this.row;if(!t||!e)return t;let i=t;for(let t of e)t.sourceRowIndex<i.sourceRowIndex&&(i=t);return i!==t&&(i.childrenAfterGroup=this.childrenAfterGroup,i.allLeafChildren=t.allLeafChildren??this.allLeafChildren??L4,t.childrenAfterGroup=L4,t.allLeafChildren=L4,e.delete(i),e.add(t),this.row=i),i}popDuplicateRow(){let e=null,t=this.duplicateRows;return null!==t&&null!==(e=t.values().next().value)&&t.delete(e)&&0===t.size&&(this.duplicateRows=null),e}dequeueInvalidated(){let e=this.invalidatedHead;return null!==e&&(this.invalidatedHead=e.invalidatedNext??null,e.invalidatedNext=void 0),e}invalidate(){let e=this,t=this.parent;for(;null!==t&&void 0===e.invalidatedNext;)e.invalidatedNext=t.invalidatedHead,t.invalidatedHead=e,t=(e=t).parent}invalidateOrder(){let e=this.parent;null!==e&&!e.childrenChanged&&((this.children?.size??0)>1||!e.row?.data)&&(e.childrenChanged=!0,e.invalidate())}getRowPosition(){let e=this.row;return e?.data?e.sourceRowIndex:this.childrenAfterGroup[0]?.treeNode?.oldSourceRowIndex??this.oldSourceRowIndex}updateChildrenAfterGroup(){this.childrenChanged=!1;let e=this.children?.size??0;if(0===e)return 0!==this.childrenAfterGroup.length&&(this.leafChildrenChanged=!0,this.childrenAfterGroup=L4,this.row.childrenAfterGroup=L4,!0);let t=!1,i=this.childrenAfterGroup;i===L4?(i=Array(e),this.childrenAfterGroup=i,this.row.childrenAfterGroup=i,t=!0):i.length!==e&&(i.length=e,t=!0);let r=0,s=-1,a=!1;for(let e of this.enumChildren()){let o=e.getRowPosition();o<s&&(a=!0),s=o,e.oldSourceRowIndex=o;let n=e.row;i[r]!==n&&(i[r]=n,t=!0),++r}return t&&(this.leafChildrenChanged=!0),a&&this.reorderChildrenList(i),t||a}reorderChildrenList(e){let t=e.length,i=this.children;e.sort(L3),i.clear();for(let r=0;r<t;++r){let t=e[r].treeNode;i.set(t.key,t)}}updateAllLeafChildren(){let{parent:e,row:t,childrenAfterGroup:i}=this;this.leafChildrenChanged=!1;let r=!1,s=i.length;if(0===s)r=t.allLeafChildren?.length!==0,t.allLeafChildren=L4,this.allLeafChildren=L4;else if(1===s&&i[0].allLeafChildren?.length)t.allLeafChildren=i[0].allLeafChildren,this.allLeafChildren=null,r=!0;else{let e=this.allLeafChildren;(e===L4||null===e)&&(e=[],this.allLeafChildren=e);let a=e.length,o=0;for(let t=0;t<s;++t){let s=i[t],n=s.allLeafChildren,l=n.length;if(l)for(let t=0;t<l;++t){let i=n[t];(o>=a||e[o]!==i)&&(e[o]=i,r=!0),++o}else(o>=a||e[o]!==s)&&s&&(e[o]=s,r=!0),++o}a!==o&&(e.length=o,r=!0),t.allLeafChildren!==e&&(t.allLeafChildren=e,r=!0)}r&&e&&(e.leafChildrenChanged=!0)}},L7=e=>(1&e.treeNodeFlags)!=0,L9=e=>(2&e.treeNodeFlags)!=0,Pe=e=>(4&e.treeNodeFlags)!=0,Pt=e=>(8&e.treeNodeFlags)!=0,Pi=e=>(16&e.treeNodeFlags)!=0,Pr=(e,t)=>{t?e.treeNodeFlags|=2:e.treeNodeFlags&=-3},Ps=e=>{let t=e.treeNodeFlags;(1&t)!=0&&(e.treeNodeFlags=4|t)},Pa=e=>{let t=e.treeNodeFlags;(1&t)!=0&&(e.treeNodeFlags=12|t)},Po=e=>{e.treeNodeFlags|=16},Pn=e=>{e.treeNodeFlags=1|-29&e.treeNodeFlags},Pl=e=>{e.treeNodeFlags=0},Ph=class extends i2{constructor(){super(...arguments),this.rowsPendingDestruction=null,this.root=new L8(null,"",-1)}wireBeans(e){this.beans=e,this.showRowGroupColsService=e.showRowGroupColsService}destroy(){let e=this.root.row;null!==e&&(this.root.removeRow(e),Pl(e)),this.destroyTree(this.root),this.commitDestroyedRows(),super.destroy()}execute(e){let{rowNodeTransactions:t,rowNodesOrderChanged:i,changedPath:r}=e,s=e.rowNode,a=this.gos,o={changedPath:r,expandByDefault:a.get("groupDefaultExpanded"),suppressGroupMaintainValueType:a.get("suppressGroupMaintainValueType"),getDataPath:a.get("getDataPath"),isGroupOpenByDefault:a.getCallback("isGroupOpenByDefault"),initialGroupOrderComparator:a.getCallback("initialGroupOrderComparator")};this.root.setRow(s),s.leafGroup=!1;let n=s.sibling;n&&(n.childrenAfterGroup=s.childrenAfterGroup,n.childrenMapped=s.childrenMapped),t?this.handleTransaction(o,t,i):this.handleRowData(o,s,!0===e.afterColumnsChanged)}handleRowData(e,t,i){let r=this.root;if(i||void 0===this.oldGroupDisplayColIds){let e=this.showRowGroupColsService?.getShowRowGroupCols()?.map(e=>e.getId()).join("-")??"";if(i){this.oldGroupDisplayColIds!==e&&this.checkAllGroupDataAfterColsChanged(r.row?.childrenAfterGroup);return}this.oldGroupDisplayColIds=e}this.clearTree(r),this.addOrUpdateRows(e,t.allLeafChildren,!1),this.commitTree(e)}handleTransaction(e,t,i){for(let{remove:i,update:r,add:s}of t)this.removeRows(i),this.addOrUpdateRows(e,r,!0),this.addOrUpdateRows(e,s,!1);i&&this.handleRowNodesOrderChanged(),this.commitTree(e)}handleRowNodesOrderChanged(){let e=this.root.row?.allLeafChildren;if(e)for(let t=0,i=e.length;t<i;++t){let i=e[t].treeNode;i&&i.oldSourceRowIndex!==t&&i.invalidateOrder()}}checkAllGroupDataAfterColsChanged(e){for(let t=0,i=e?.length??0;t<i;++t){let i=e[t];this.setGroupData(i,i.treeNode?.key??i.key),this.checkAllGroupDataAfterColsChanged(i.childrenAfterGroup)}}addOrUpdateRows(e,t,i){for(let r=0,s=t?.length??0;r<s;++r){let s=t[r],a=this.upsertPath(this.getDataPath(e,s));a&&this.addOrUpdateRow(a,s,i)}}removeRows(e){for(let t=0,i=e?.length??0;t<i;++t){let i=e[t],r=i.treeNode;null!==r&&this.removeRow(r,i)}}getDataPath({getDataPath:e},{data:t}){let i=e?.(t)||L4;return i.length||tO("getDataPath() should not return an empty path",[t]),i}upsertPath(e){let t=this.root,i=e.length-1;for(let r=0;r<=i;++r){let s=t.upsertKey(e[r]);if(r>=i)return s.invalidate(),s;t=s}return null}addOrUpdateRow(e,t,i){let{level:r,row:s}=e;if(r<0)return;let a=!1;if(s!==t){let i=t.treeNode;null!==i&&i!==e&&(i.removeRow(t),i.invalidate()),null===s?(e.setRow(t),a=!0):s.data?e.addDuplicateRow(t)&&(a=!0):(e.setRow(t),this.destroyRow(s,!0),a=!0)}i&&!Pe(t)&&(Ps(t),a=!0),a&&e.invalidate(),this.rowsPendingDestruction?.delete(t)}removeRow(e,t){let{parent:i,level:r}=e;if(r<0)return;let s=!1;e.removeRow(t)&&(s=!0,i&&(i.childrenChanged=!0),this.destroyRow(t,!t.data)),s&&e.invalidate()}commitTree(e){let t=this.root;this.commitInvalidatedChildren(e,t);let i=t.row;t.childrenChanged&&t.updateChildrenAfterGroup()&&Po(i),i.updateHasChildren(),Pi(i)&&e.changedPath?.isActive()&&e.changedPath.addParentNode(i),Pn(i),this.commitDestroyedRows()}commitInvalidatedChildren(e,t){for(;;){let i=t.dequeueInvalidated();if(null===i)break;i.parent===t&&this.commitChild(e,t,i)}}commitChild(e,t,i){if(i.isEmptyFillerNode()){this.clearTree(i);return}this.commitNodePreOrder(t,i),this.commitInvalidatedChildren(e,i),this.commitNodePostOrder(e,t,i)}commitNodePreOrder(e,t){let i=t.row;if(null===i?(i=this.createFillerRow(t),t.setRow(i)):void 0===(i=t.sortFirstDuplicateRow()).allChildrenCount&&(i.allChildrenCount=null),i.parent=e.row,t.oldRow!==i)for(let e of t.enumChildren()){let t=e.row;null!==t&&(t.parent=i)}let r=t.key;i.key!==r?(i.key=r,Pa(i),this.setGroupData(i,r)):i.groupData||this.setGroupData(i,r)}commitNodePostOrder(e,t,i){let r=i.row,s=i.oldRow;if(i.isEmptyFillerNode()){this.clearTree(i);return}i.childrenChanged&&i.updateChildrenAfterGroup()&&Po(r),i.leafChildrenChanged&&i.updateAllLeafChildren();let a=i.getRowPosition();i.oldSourceRowIndex!==a&&(i.oldSourceRowIndex=a,t.childrenChanged=!0);let o=!!r.childrenAfterGroup?.length,n=o||!r.data,l=r.group;l!==n?(Po(r),r.setGroup(n),n||r.expanded||Pr(r,!1)):r.hasChildren()!==o&&(Po(r),r.updateHasChildren()),r.group&&!L9(r)&&(s!==r&&null!==s&&s.group&&L9(s)&&!e.isGroupOpenByDefault?r.expanded=s.expanded:r.expanded=this.getExpandedInitialValue(e,r),Pr(r,!0)),Pe(r)&&(Po(t.row),Pt(r)&&r.setData(r.data)),s!==r&&(i.oldRow=r,null!==s&&(l||i.hasChildren())&&Po(r),t.childrenChanged=!0,Po(t.row)),Pi(r)?e.changedPath?.isActive()&&e.changedPath.addParentNode(r):L7(r)||(r.childrenAfterFilter||(r.childrenAfterFilter=r.childrenAfterGroup.slice()),r.childrenAfterAggFilter||(r.childrenAfterAggFilter=r.childrenAfterFilter.slice()),r.childrenAfterSort||(r.childrenAfterSort=r.childrenAfterAggFilter.slice())),Pn(r),i.duplicateRows?.size&&!i.duplicateRowsWarned&&(i.duplicateRowsWarned=!0,tO("duplicate group keys for row data, keys should be unique",[r.id,r.data,...Array.from(i.duplicateRows).map(e=>e.data)]))}createFillerRow(e){let t=new a7(this.beans);t.key=e.key,t.group=!0,t.field=null,t.leafGroup=!1,t.rowGroupIndex=null,t.allChildrenCount=null;let i=e.level+"-"+e.key,r=e.parent;for(;null!==r;){let e=r.parent;if(null===e)break;i=`${r.level}-${r.key}-${i}`,r=e}return t.id=a7.ID_PREFIX_ROW_GROUP+i,t}setGroupData(e,t){let i={};e.groupData=i;let r=this.showRowGroupColsService?.getShowRowGroupCols();if(r)for(let e of r)i[e.getColId()]=t}getExpandedInitialValue(e,t){let i=e.isGroupOpenByDefault;return i?!0==i({rowNode:t,field:t.field,key:t.key,level:t.level,rowGroupColumn:t.rowGroupColumn}):-1===e.expandByDefault||t.level<e.expandByDefault}clearTree(e){let{parent:t,oldRow:i,row:r,level:s}=e;if(null!==t&&null!==i&&(t.childrenChanged=!0,null!==t.row&&Po(t.row)),null!==r&&s>=0){let t=e.row;for(;null!==t&&e.removeRow(t);)this.destroyRow(t,!t.data),t=e.row}for(let t of e.enumChildren())this.clearTree(t);e.destroy()}destroyTree(e){let{row:t,level:i,duplicateRows:r}=e;if(t&&(i>=0&&!t.data?this.destroyRow(t,!0):Pl(t)),r)for(let e of r)i>=0&&!e.data?this.destroyRow(e,!0):Pl(e);for(let t of e.enumChildren())this.destroyTree(t);e.destroy()}destroyRow(e,t){if(!L7(e)){Pl(e);return}if(!t){(this.rowsPendingDestruction??(this.rowsPendingDestruction=new Set)).add(e);return}Pl(e),e.setRowIndex(null),e.setRowTop(null),!e.data&&e.isSelected()&&e.setSelectedParams({newValue:!1,source:"rowGroupChanged"})}commitDestroyedRows(){let{rowsPendingDestruction:e}=this;if(null!==e)for(let t of(this.rowsPendingDestruction=null,e))this.destroyRow(t,!0)}},Pd=class extends i2{constructor(){super(...arguments),this.beanName="groupStage"}wireBeans(e){this.selectableService=e.selectableService}execute(e){let t=this.gos.get("treeData")?Ph:L2,i=this.strategy;i?.constructor!==t&&(this.destroyBean(i),i=this.createManagedBean(new t),this.strategy=i),i.execute(e),this.selectableService.updateSelectableAfterGrouping()}destroy(){this.destroyBean(this.strategy),this.strategy=void 0,super.destroy()}},Pc="PivotRowTotal_",Pu=class extends i2{constructor(){super(...arguments),this.beanName="pivotColDefService"}wireBeans(e){this.columnModel=e.columnModel,this.funcColsService=e.funcColsService,this.columnNameService=e.columnNameService}postConstruct(){let e=()=>this.gos.get("serverSidePivotResultFieldSeparator")??"_";this.fieldSeparator=e(),this.addManagedPropertyListener("serverSidePivotResultFieldSeparator",()=>{this.fieldSeparator=e()});let t=()=>this.gos.get("pivotDefaultExpanded");this.pivotDefaultExpanded=t(),this.addManagedPropertyListener("pivotDefaultExpanded",()=>{this.pivotDefaultExpanded=t()})}createPivotColumnDefs(e){let t=this.createPivotColumnsFromUniqueValues(e),i=function e(t,i=[]){return t.forEach(t=>{void 0!==t.children?e(t.children,i):i.push(t)}),i}(t);return this.addRowGroupTotals(t,i),this.addExpandablePivotGroups(t,i),this.addPivotTotalsToGroups(t,i),{pivotColumnGroupDefs:t,pivotColumnDefs:i.map(e=>rn(e))}}createPivotColumnsFromUniqueValues(e){let t=this.funcColsService.getPivotColumns(),i=t.length;return this.recursivelyBuildGroup(0,e,[],i,t)}recursivelyBuildGroup(e,t,i,r,s){let a=this.funcColsService.getValueColumns();if(e>=r)return this.buildMeasureCols(i);let o=s[e].getColDef(),n=this.headerNameComparator.bind(this,o.pivotComparator);if(1===a.length&&this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&e===r-1){let e=[];return ro(t,t=>{let r=[...i,t],s=this.createColDef(a[0],t,r);s.columnGroupShow="open",e.push(s)}),e.sort(n),e}let l=[];return ro(t,(t,a)=>{let o=-1===this.pivotDefaultExpanded||e<this.pivotDefaultExpanded,n=[...i,t];l.push({children:this.recursivelyBuildGroup(e+1,a,n,r,s),headerName:t,pivotKeys:n,columnGroupShow:"open",openByDefault:o,groupId:this.generateColumnGroupId(n)})}),l.sort(n),l}buildMeasureCols(e){let t=this.funcColsService.getValueColumns();return 0===t.length?[this.createColDef(null,"-",e)]:t.map(t=>{let i=this.columnNameService.getDisplayNameForColumn(t,"header");return{...this.createColDef(t,i,e),columnGroupShow:"open"}})}addExpandablePivotGroups(e,t){let i=this.gos.get("suppressExpandablePivotGroups");if(i||this.gos.get("pivotColumnGroupTotals"))return;let r=(e,t,s)=>{if("children"in e){let a=new Map;e.children.forEach(e=>{r(e,t,a)});let o=!e.children.some(e=>e.children);this.funcColsService.getValueColumns().forEach(r=>{let s=this.columnNameService.getDisplayNameForColumn(r,"header"),n=this.createColDef(r,s,e.pivotKeys);n.pivotTotalColumnIds=a.get(r.getColId()),n.columnGroupShow=i?"open":"closed",n.aggFunc=r.getAggFunc(),o||(e.children.push(n),t.push(n))}),this.merge(s,a);return}if(!e.pivotValueColumn)return;let a=e.pivotValueColumn.getColId();s.has(a)?s.get(a).push(e.colId):s.set(a,[e.colId])};e.forEach(e=>{r(e,t,new Map)})}addPivotTotalsToGroups(e,t){if(!this.gos.get("pivotColumnGroupTotals"))return;let i="after"===this.gos.get("pivotColumnGroupTotals"),r=this.funcColsService.getValueColumns(),s=r.map(e=>e.getAggFunc());if(!s||s.length<1||!this.sameAggFuncs(s))return;let a=r[0];e.forEach(e=>{this.recursivelyAddPivotTotal(e,t,a,i)})}recursivelyAddPivotTotal(e,t,i,r){if(!e.children)return e.colId?[e.colId]:null;let s=[];if(e.children.forEach(e=>{let a=this.recursivelyAddPivotTotal(e,t,i,r);a&&(s=s.concat(a))}),e.children.length>1){let a=this.localeService.getLocaleTextFunc()("pivotColumnGroupTotals","Total"),o=this.createColDef(i,a,e.pivotKeys,!0);o.pivotTotalColumnIds=s,o.aggFunc=i.getAggFunc(),o.columnGroupShow=this.gos.get("suppressExpandablePivotGroups")?"open":void 0;let n=e.children;r?n.push(o):n.unshift(o),t.push(o)}return s}addRowGroupTotals(e,t){if(!this.gos.get("pivotRowTotals"))return;let i="after"===this.gos.get("pivotRowTotals"),r=this.funcColsService.getValueColumns().slice();i||r.reverse();let s=r.length>1||!this.gos.get("removePivotHeaderRowWhenSingleValueColumn");for(let a=0;a<r.length;a++){let o=r[a],n=this.columnNameService.getDisplayNameForColumn(o,"header"),l=this.createColDef(o,n,[]),h=[];for(let e=0;e<t.length;e++){let i=t[e];i.pivotValueColumn===o&&h.push(i.colId)}l.pivotTotalColumnIds=h,l.colId=Pc+l.colId;let d=s?{children:[l],pivotKeys:[],groupId:`${Pc}_pivotGroup_${o.getColId()}`}:l;t.push(l),i?e.push(d):e.unshift(d)}}createColDef(e,t,i,r=!1){let s={};return e&&(Object.assign(s,e.getColDef()),s.hide=!1),s.headerName=t,s.colId=this.generateColumnId(i||[],e&&!r?e.getColId():""),s.field=s.colId,s.valueGetter=e=>e.data?.[e.colDef.field],s.pivotKeys=i,s.pivotValueColumn=e,!0===s.filter&&(s.filter="agNumberColumnFilter"),s}sameAggFuncs(e){if(1==e.length)return!0;for(let t=1;t<e.length;t++)if(e[t]!==e[0])return!1;return!0}headerNameComparator(e,t,i){return e?e(t.headerName,i.headerName):t.headerName&&!i.headerName?1:!t.headerName&&i.headerName?-1:t.headerName&&i.headerName?t.headerName<i.headerName?-1:t.headerName>i.headerName?1:0:0}merge(e,t){t.forEach((t,i)=>{let r=[...e.has(i)?e.get(i):[],...t];e.set(i,r)})}generateColumnGroupId(e){let t=this.funcColsService.getPivotColumns().map(e=>e.getColId());return`pivotGroup_${t.join("-")}_${e.join("-")}`}generateColumnId(e,t){let i=this.funcColsService.getPivotColumns().map(e=>e.getColId());return`pivot_${i.join("-")}_${e.join("-")}_${t}`}createColDefsFromFields(e){let t={};for(let i=0;i<e.length;i++){let r=e[i].split(this.fieldSeparator),s=t;for(let e=0;e<r.length;e++){let t=r[e];null==s[t]&&(s[t]={}),s=s[t]}}let i=(e,t,r,s)=>{let a=[];for(let t in r){let o=r[t],n=i(`${e}${this.fieldSeparator}${t}`,t,o,s+1);a.push(n)}if(0===a.length){let i=this.columnModel.getColDefCol(t);if(i){let r=this.columnNameService.getDisplayNameForColumn(i,"header")??t,s=this.createColDef(i,r,void 0,!1);return s.colId=e,s.aggFunc=i.getAggFunc(),s.valueGetter=t=>t.data?.[e],s}return{colId:e,headerName:t,valueGetter:t=>t.data?.[e]}}return this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&1===a.length&&"colId"in a[0]?(a[0].headerName=t,a[0]):{openByDefault:-1===this.pivotDefaultExpanded||s<this.pivotDefaultExpanded,groupId:e,headerName:t,children:a}},r=[];for(let e in t){let s=t[e],a=i(e,e,s,0);r.push(a)}return r}},Pp="Exceeded maximum allowed pivot column count.",Pg=class extends i2{constructor(){super(...arguments),this.beanName="pivotStage",this.uniqueValues={},this.lastTimeFailed=!1,this.maxUniqueValues=-1,this.currentUniqueCount=0}wireBeans(e){this.valueService=e.valueService,this.columnModel=e.columnModel,this.pivotResultColsService=e.pivotResultColsService,this.funcColsService=e.funcColsService,this.pivotColDefService=e.pivotColDefService}execute(e){let t=e.changedPath;this.columnModel.isPivotActive()?this.executePivotOn(t):this.executePivotOff(t)}executePivotOff(e){this.aggregationColumnsHashLastTime=null,this.uniqueValues={},this.pivotResultColsService.isPivotResultColsPresent()&&(this.pivotResultColsService.setPivotResultCols(null,"rowModelUpdated"),e&&e.setInactive())}executePivotOn(e){let t;let i=this.funcColsService.getValueColumns().length??1,r=this.gos.get("pivotMaxGeneratedColumns");this.maxUniqueValues=-1===r?-1:r/i;try{t=this.bucketUpRowNodes(e)}catch(e){if(e.message===Pp){this.pivotResultColsService.setPivotResultCols([],"rowModelUpdated"),this.eventService.dispatchEvent({type:"pivotMaxColumnsExceeded",message:e.message}),this.lastTimeFailed=!0;return}throw e}let s=this.setUniqueValues(t),a=this.funcColsService.getValueColumns(),o=a.map(e=>`${e.getId()}-${e.getColDef().headerName}`).join("#"),n=a.map(e=>e.getAggFunc().toString()).join("#"),l=this.aggregationColumnsHashLastTime!==o,h=this.aggregationFuncsHashLastTime!==n;this.aggregationColumnsHashLastTime=o,this.aggregationFuncsHashLastTime=n;let d=this.funcColsService.getRowGroupColumns().map(e=>e.getId()).join("#"),c=d!==this.groupColumnsHashLastTime;this.groupColumnsHashLastTime=d;let u=this.gos.get("pivotRowTotals"),p=this.gos.get("pivotColumnGroupTotals"),g=this.gos.get("suppressExpandablePivotGroups"),m=this.gos.get("removePivotHeaderRowWhenSingleValueColumn"),f=u!==this.pivotRowTotalsLastTime||p!==this.pivotColumnGroupTotalsLastTime||g!==this.suppressExpandablePivotGroupsLastTime||m!==this.removePivotHeaderRowWhenSingleValueColumnLastTime;if(this.pivotRowTotalsLastTime=u,this.pivotColumnGroupTotalsLastTime=p,this.suppressExpandablePivotGroupsLastTime=g,this.removePivotHeaderRowWhenSingleValueColumnLastTime=m,this.lastTimeFailed||s||l||c||h||f){let{pivotColumnGroupDefs:t,pivotColumnDefs:i}=this.pivotColDefService.createPivotColumnDefs(this.uniqueValues);this.pivotColumnDefs=i,this.pivotResultColsService.setPivotResultCols(t,"rowModelUpdated"),e&&e.setInactive()}this.lastTimeFailed=!1}setUniqueValues(e){return JSON.stringify(e)!==JSON.stringify(this.uniqueValues)&&(this.uniqueValues=e,!0)}bucketUpRowNodes(e){this.currentUniqueCount=0;let t={};e.forEachChangedNodeDepthFirst(e=>{e.leafGroup&&(e.childrenMapped=null)});let i=e=>{e.leafGroup?this.bucketRowNode(e,t):e.childrenAfterFilter?.forEach(i)};return e.executeFromRootNode(i),t}bucketRowNode(e,t){let i=this.funcColsService.getPivotColumns();0===i.length?e.childrenMapped=null:e.childrenMapped=this.bucketChildren(e.childrenAfterFilter,i,0,t),e.sibling&&(e.sibling.childrenMapped=e.childrenMapped)}bucketChildren(e,t,i,r){let s={},a=t[i];if(e.forEach(e=>{let t=this.valueService.getKeyForNode(a,e);if(tK(t)&&(t=""),!r[t]){this.currentUniqueCount+=1,r[t]={};let e=-1!==this.maxUniqueValues,i=this.currentUniqueCount>this.maxUniqueValues;if(e&&i)throw Error(Pp)}s[t]||(s[t]=[]),s[t].push(e)}),i===t.length-1)return s;{let e={};return ro(s,(s,a)=>{e[s]=this.bucketChildren(a,t,i+1,r[s])}),e}}getPivotColumnDefs(){return this.pivotColumnDefs}},Pm=class extends i2{constructor(){super(...arguments),this.beanName="showRowGroupColsService"}wireBeans(e){this.columnModel=e.columnModel,this.funcColsService=e.funcColsService}refresh(){this.showRowGroupCols=[],this.showRowGroupColsMap={},this.columnModel.getCols().forEach(e=>{let t=e.getColDef().showRowGroup,i="string"==typeof t;(i||!0===t)&&(this.showRowGroupCols.push(e),i?this.showRowGroupColsMap[t]=e:this.funcColsService.getRowGroupColumns().forEach(t=>{this.showRowGroupColsMap[t.getId()]=e}))})}getShowRowGroupCols(){return this.showRowGroupCols}getShowRowGroupCol(e){return this.showRowGroupColsMap[e]}},Pf="32.2.0",Pv={version:Pf,moduleName:`${tL.RowGroupingModule}-core`,beans:[Lj,LX,Pd,Pu,Pg,LF,LH,Pm,Lq],userComponents:[{name:"agGroupRowRenderer",classImp:kp},{name:"agGroupCellRenderer",classImp:kp}],controllers:[{name:"groupCellRendererCtrl",classImp:kc}],dependantModules:[IX]},Py={version:Pf,moduleName:`${tL.RowGroupingModule}-api`,apiFunctions:{addAggFunc:function(e,t,i){e.aggFuncService&&e.aggFuncService.addAggFuncs({key:i})},addAggFuncs:function(e,t){e.aggFuncService&&e.aggFuncService.addAggFuncs(t)},clearAggFuncs:function(e){e.aggFuncService&&e.aggFuncService.clear()},setColumnAggFunc:function(e,t,i){e.funcColsService.setColumnAggFunc(t,i,"api")},isPivotMode:function(e){return e.columnModel.isPivotMode()},getPivotResultColumn:function(e,t,i){return e.pivotResultColsService.lookupPivotResultCol(t,i)},setValueColumns:function(e,t){e.funcColsService.setValueColumns(t,"api")},getValueColumns:function(e){return e.funcColsService.getValueColumns()},removeValueColumn:function(e,t){e.funcColsService.removeValueColumns([t],"api")},removeValueColumns:function(e,t){e.funcColsService.removeValueColumns(t,"api")},addValueColumn:function(e,t){e.funcColsService.addValueColumns([t],"api")},addValueColumns:function(e,t){e.funcColsService.addValueColumns(t,"api")},setRowGroupColumns:function(e,t){e.funcColsService.setRowGroupColumns(t,"api")},removeRowGroupColumn:function(e,t){e.funcColsService.removeRowGroupColumns([t],"api")},removeRowGroupColumns:function(e,t){e.funcColsService.removeRowGroupColumns(t,"api")},addRowGroupColumn:function(e,t){e.funcColsService.addRowGroupColumns([t],"api")},addRowGroupColumns:function(e,t){e.funcColsService.addRowGroupColumns(t,"api")},getRowGroupColumns:function(e){return e.funcColsService.getRowGroupColumns()},moveRowGroupColumn:function(e,t,i){e.funcColsService.moveRowGroupColumn(t,i,"api")},setPivotColumns:function(e,t){e.funcColsService.setPivotColumns(t,"api")},removePivotColumn:function(e,t){e.funcColsService.removePivotColumns([t],"api")},removePivotColumns:function(e,t){e.funcColsService.removePivotColumns(t,"api")},addPivotColumn:function(e,t){e.funcColsService.addPivotColumns([t],"api")},addPivotColumns:function(e,t){e.funcColsService.addPivotColumns(t,"api")},getPivotColumns:function(e){return e.funcColsService.getPivotColumns()},setPivotResultColumns:function(e,t){e.pivotResultColsService.setPivotResultCols(t,"api")},getPivotResultColumns:function(e){let t=e.pivotResultColsService.getPivotResultCols();return t?t.list:null}},dependantModules:[Pv]},PC={version:Pf,moduleName:"@ag-grid-enterprise/group-filter",userComponents:[{name:"agGroupColumnFilter",classImp:LQ}],dependantModules:[Pv,no]},Pw={version:Pf,moduleName:tL.RowGroupingModule,dependantModules:[Pv,Py,PC,{version:Pf,moduleName:"@ag-grid-enterprise/group-floating-filter",userComponents:[{name:"agGroupColumnFloatingFilter",classImp:LJ}],dependantModules:[PC,nl]}]},Pb=class extends L${constructor(e){super(e,"aggregation")}postConstruct(){let e=this.localeService.getLocaleTextFunc(),t=e("valueColumnsEmptyMessage","Drag here to aggregate"),i=e("values","Values");super.init({icon:s2("valuePanel",this.gos,null),emptyMessage:t,title:i}),this.addManagedEventListeners({columnValueChanged:this.refreshGui.bind(this)})}getAriaLabel(){return this.localeService.getLocaleTextFunc()("ariaValuesDropZonePanelLabel","Values")}getTooltipParams(){let e=super.getTooltipParams();return e.location="valueColumnsList",e}getIconName(){return this.isPotentialDndItems()?"aggregate":"notAllowed"}isItemDroppable(e,t){return!this.gos.get("functionsReadOnly")&&!!e.isPrimary()&&e.isAllowValue()&&(!e.isValueActive()||this.isSourceEventFromTarget(t))}updateItems(e){this.funcColsService.setValueColumns(e,"toolPanelUi")}getExistingItems(){return this.funcColsService.getValueColumns()}};function PS(e){return!!e&&void 0!==e.children}function Px(e){return PS(e)?e.groupId:e.colId}var PM=class extends i2{constructor(){super(...arguments),this.beanName="toolPanelColDefService"}wireBeans(e){this.columnModel=e.columnModel}createColumnTree(e){let t=[],i=(e,r)=>{if(PS(e)){let t=void 0!==e.groupId?e.groupId:e.headerName,s=new i4(e,t,!1,r),a=[];return e.children.forEach(e=>{let t=i(e,r+1);t&&a.push(t)}),s.setChildren(a),s}{let i=e.colId?e.colId:e.field,r=this.columnModel.getColDefCol(i);return r||t.push(e),r}},r=[];return e.forEach(e=>{let t=i(e,0);t&&r.push(t)}),t.length>0&&tO("unable to find grid columns for the supplied colDef(s):",t),r}syncLayoutWithGrid(e){e(function(e){let t=(e,t)=>PS(e)&&PS(t)&&Px(e)===Px(t),i=(e,t)=>(PS(t)&&(t.children&&t.groupId&&function e(t,i,r){if(!PS(t))return!0;if(((e,t)=>{let i=iU(e.children.map(Px),Px(t)),r=iB(e.children),s=r&&Px(r)!==Px(t);return i&&s})(t,r)||t.groupId===i&&!iU(t.children.map(Px),Px(r)))return t.children.push(r),!0;for(let s=t.children.length-1;s>=0&&!e(t.children[s],i,r);s--);return!1}(e,t.groupId,t.children[0])||t.children.forEach(t=>i(e,t))),e),r=[];for(let s=1;s<=e.length;s++){let a=e[s-1],o=e[s];t(a,o)?e[s]=i(a,o):r.push(a)}return r}(this.getLeafPathTrees()))}getLeafPathTrees(){let e=(t,i)=>{let r;if(i3(t)){if(t.isPadding())r=i;else{let e=Object.assign({},t.getColGroupDef());e.groupId=t.getGroupId(),e.children=[i],r=e}}else{let e=Object.assign({},t.getColDef());e.colId=t.getColId(),r=e}let s=t.getOriginalParent();return s?e(s,r):r};return this.columnModel.getCols().filter(e=>{let t=e.getColDef();return e.isPrimary()&&!t.showRowGroup}).map(t=>e(t,t.getColDef()))}},PE=class extends sQ{constructor(e){super(),this.eToggleButton=null,this.eIconWrapper=null,this.eLabel=null,this.toolPanelDef=e}getToolPanelId(){return this.toolPanelDef.id}postConstruct(){let e=this.createTemplate();this.setTemplate(e,[]),this.setLabel(),this.setIcon(),this.addManagedElementListeners(this.eToggleButton,{click:this.onButtonPressed.bind(this)}),this.eToggleButton.setAttribute("id",`ag-${this.getCompId()}-button`)}createTemplate(){return`<div class="ag-side-button" role="presentation">
                <button type="button" data-ref="eToggleButton" tabindex="-1" role="tab" aria-expanded="false" class="ag-button ag-side-button-button">
                    <div data-ref="eIconWrapper" class="ag-side-button-icon-wrapper" aria-hidden="true"></div>
                    <span data-ref="eLabel" class="ag-side-button-label"></span>
                </button>
            </div>`}setLabel(){let e=this.localeService.getLocaleTextFunc(),t=this.toolPanelDef,i=e(t.labelKey,t.labelDefault);this.eLabel.innerText=i}setIcon(){this.eIconWrapper.insertAdjacentElement("afterbegin",s2(this.toolPanelDef.iconKey,this.gos))}onButtonPressed(){this.dispatchLocalEvent({type:"toggleButtonClicked"})}setSelected(e){this.addOrRemoveCssClass("ag-selected",e),r5(this.eToggleButton,e)}getButtonElement(){return this.eToggleButton}},PD={selector:"AG-SIDE-BAR-BUTTONS",component:class extends sQ{constructor(){super('<div class="ag-side-buttons" role="tablist"></div>'),this.buttonComps=[]}wireBeans(e){this.focusService=e.focusService,this.visibleColsService=e.visibleColsService}postConstruct(){this.addManagedElementListeners(this.getFocusableElement(),{keydown:this.handleKeyDown.bind(this)})}handleKeyDown(e){if(e.key===aa.TAB&&e.shiftKey){if(this.focusService.focusNextGridCoreContainer(!0)){e.preventDefault();return}iX(e)}}setActiveButton(e){this.buttonComps.forEach(t=>{t.setSelected(e===t.getToolPanelId())})}addButtonComp(e){let t=this.createBean(new PE(e));return this.buttonComps.push(t),this.appendChild(t),t.addEventListener("toggleButtonClicked",()=>{this.dispatchLocalEvent({type:"sideBarButtonClicked",toolPanelId:e.id})}),t}clearButtons(){this.buttonComps=this.destroyBeans(this.buttonComps),sL(this.getGui()),super.destroy()}destroy(){this.clearButtons(),super.destroy()}}},PI={id:"columns",labelDefault:"Columns",labelKey:"columns",iconKey:"columns",toolPanel:"agColumnsToolPanel"},Pk={id:"filters",labelDefault:"Filters",labelKey:"filters",iconKey:"filter",toolPanel:"agFiltersToolPanel"},PT={columns:PI,filters:Pk};function PA(e){if(e){if(!0===e)return{toolPanels:[PI,Pk],defaultToolPanel:"columns"};if("string"==typeof e)return PA([e]);if(Array.isArray(e)){let t=[];if(e.forEach(e=>{let i=PT[e];if(!i){PR(e);return}t.push(i)}),0===t.length)return;return{toolPanels:t,defaultToolPanel:t[0].id}}return{toolPanels:function(e){let t=[];return e&&e.forEach(e=>{let i=null;if("string"==typeof e){let t=PT[e];if(!t){PR(e);return}i=t}else i=e;t.push(i)}),t}(e.toolPanels),defaultToolPanel:e.defaultToolPanel,hiddenByDefault:e.hiddenByDefault,position:e.position}}}function PR(e){tO(`the key ${e} is not a valid key for specifying a tool panel, valid keys are: ${Object.keys(PT).join(",")}`)}var PL=class extends sQ{constructor(){super('<div class="ag-tool-panel-horizontal-resize"></div>'),this.minWidth=100,this.maxWidth=null}wireBeans(e){this.horizontalResizeService=e.horizontalResizeService}setElementToResize(e){this.elementToResize=e}postConstruct(){let e=this.horizontalResizeService.addResizeBar({eResizeBar:this.getGui(),dragStartPixels:1,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this),onResizeEnd:this.onResizeEnd.bind(this)});this.addDestroyFunc(e),this.setInverted(this.gos.get("enableRtl"))}dispatchResizeEvent(e,t,i){this.eventService.dispatchEvent({type:"toolPanelSizeChanged",width:i,started:e,ended:t})}onResizeStart(){this.startingWidth=this.elementToResize.offsetWidth,this.dispatchResizeEvent(!0,!1,this.startingWidth)}onResizeEnd(e){return this.onResizing(e,!0)}onResizing(e,t=!1){let i=this.inverted?-1:1,r=Math.max(this.minWidth,Math.floor(this.startingWidth-e*i));null!=this.maxWidth&&(r=Math.min(this.maxWidth,r)),this.elementToResize.style.width=`${r}px`,this.dispatchResizeEvent(!1,t,r)}setInverted(e){this.inverted=e}setMaxWidth(e){this.maxWidth=e}setMinWidth(e){null!=e?this.minWidth=e:this.minWidth=100}},PP=class extends sQ{wireBeans(e){this.userComponentFactory=e.userComponentFactory}constructor(){super('<div class="ag-tool-panel-wrapper" role="tabpanel"/>')}postConstruct(){let e=this.getGui(),t=this.resizeBar=this.createManagedBean(new PL);e.setAttribute("id",`ag-${this.getCompId()}`),t.setElementToResize(e),this.appendChild(t)}getToolPanelId(){return this.toolPanelId}setToolPanelDef(e,t){let{id:i,minWidth:r,maxWidth:s,width:a}=e;this.toolPanelId=i,this.width=a;let o=this.userComponentFactory.getToolPanelCompDetails(e,t),n=o.newAgStackInstance();if(this.params=o.params,null==n){tO(`error processing tool panel component ${i}. You need to specify 'toolPanel'`);return}n.then(this.setToolPanelComponent.bind(this)),null!=r&&this.resizeBar.setMinWidth(r),null!=s&&this.resizeBar.setMaxWidth(s)}setToolPanelComponent(e){this.toolPanelCompInstance=e,this.appendChild(e.getGui()),this.addDestroyFunc(()=>{this.destroyBean(e)}),this.width&&(this.getGui().style.width=`${this.width}px`)}getToolPanelInstance(){return this.toolPanelCompInstance}setResizerSizerSide(e){let t=this.gos.get("enableRtl"),i="left"===e;this.resizeBar.setInverted(t?i:!i)}refresh(){this.toolPanelCompInstance?.refresh(this.params)}},PF={selector:"AG-SIDE-BAR",component:class extends sQ{constructor(){super(`<div class="ag-side-bar ag-unselectable">
            <ag-side-bar-buttons data-ref="sideBarButtons"></ag-side-bar-buttons>
        </div>`,[PD]),this.sideBarButtons=null,this.toolPanelWrappers=[]}wireBeans(e){this.focusService=e.focusService,this.filterManager=e.filterManager,this.sideBarService=e.sideBarService}postConstruct(){this.sideBarButtons.addEventListener("sideBarButtonClicked",this.onToolPanelButtonClicked.bind(this));let{sideBar:e}=this.gos.get("initialState")??{};this.setSideBarDef({sideBarDef:PA(this.gos.get("sideBar")),sideBarState:e}),this.addManagedPropertyListener("sideBar",this.onSideBarUpdated.bind(this)),this.sideBarService.registerSideBarComp(this);let t=this.getFocusableElement();this.createManagedBean(new oa(t,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this)})),h5(this,t,this.focusService)}onTabKeyDown(e){if(e.defaultPrevented)return;let{focusService:t,sideBarButtons:i}=this,r=this.getGui(),s=i.getGui(),a=ih(this.gos),o=r.querySelector(".ag-tool-panel-wrapper:not(.ag-hidden)"),n=e.target;if(!o)return;if(s.contains(a)){t.focusInto(o,e.shiftKey)&&e.preventDefault();return}if(!e.shiftKey)return;let l=null;o.contains(a)?l=this.focusService.findNextFocusableElement(o,void 0,!0):t.isTargetUnderManagedComponent(o,n)&&e.shiftKey&&(l=this.focusService.findFocusableElementBeforeTabGuard(o,n)),l||(l=s.querySelector(".ag-selected button")),l&&l!==e.target&&(e.preventDefault(),l.focus())}handleKeyDown(e){let t=ih(this.gos);if(!this.sideBarButtons.getGui().contains(t))return;let i=this.sideBarButtons.getGui(),r=Array.prototype.slice.call(i.querySelectorAll(".ag-side-button")),s=r.findIndex(e=>e.contains(t)),a=null;switch(e.key){case aa.LEFT:case aa.UP:a=Math.max(0,s-1);break;case aa.RIGHT:case aa.DOWN:a=Math.min(s+1,r.length-1)}if(null===a)return;let o=r[a].querySelector("button");o&&(o.focus(),e.preventDefault())}onToolPanelButtonClicked(e){let t=e.toolPanelId;this.openedItem()===t?this.openToolPanel(void 0,"sideBarButtonClicked"):this.openToolPanel(t,"sideBarButtonClicked")}clearDownUi(){this.sideBarButtons.clearButtons(),this.destroyToolPanelWrappers()}setSideBarDef({sideBarDef:e,sideBarState:t,existingToolPanelWrappers:i}){if(this.setDisplayed(!1),this.sideBar=e,this.sideBar&&this.sideBar.toolPanels){let e=this.sideBar.toolPanels;if(this.createToolPanelsAndSideButtons(e,t,i),!this.toolPanelWrappers.length)return;let r=t?t.visible:!this.sideBar.hiddenByDefault;if(this.setDisplayed(r),this.setSideBarPosition(t?t.position:this.sideBar.position),r){if(t){let{openToolPanel:e}=t;e&&this.openToolPanel(e,"sideBarInitializing")}else this.openToolPanel(this.sideBar.defaultToolPanel,"sideBarInitializing")}}}getDef(){return this.sideBar}setSideBarPosition(e){e||(e="right"),this.position=e;let t="left"===e,i=t?"right":"left";return this.addOrRemoveCssClass("ag-side-bar-left",t),this.addOrRemoveCssClass("ag-side-bar-right",!t),this.toolPanelWrappers.forEach(e=>{e.setResizerSizerSide(i)}),this.dispatchSideBarUpdated(),this}setDisplayed(e,t){super.setDisplayed(e,t),this.dispatchSideBarUpdated()}getState(){let e={};return this.toolPanelWrappers.forEach(t=>{e[t.getToolPanelId()]=t.getToolPanelInstance()?.getState?.()}),{visible:this.isDisplayed(),position:this.position,openToolPanel:this.openedItem(),toolPanels:e}}createToolPanelsAndSideButtons(e,t,i){for(let r of e)this.createToolPanelAndSideButton(r,t?.toolPanels?.[r.id],i?.[r.id])}validateDef(e){if(null==e.id)return tO("please review all your toolPanel components, it seems like at least one of them doesn't have an id"),!1;if("agColumnsToolPanel"===e.toolPanel&&!this.gos.assertModuleRegistered(tL.ColumnsToolPanelModule,"Column Tool Panel"))return!1;if("agFiltersToolPanel"===e.toolPanel){if(!this.gos.assertModuleRegistered(tL.FiltersToolPanelModule,"Filters Tool Panel"))return!1;if(this.filterManager?.isAdvancedFilterEnabled())return tO("Advanced Filter does not work with Filters Tool Panel. Filters Tool Panel has been disabled."),!1}return!0}createToolPanelAndSideButton(e,t,i){let r;if(!this.validateDef(e))return;let s=this.sideBarButtons.addButtonComp(e);i?r=i:(r=this.createBean(new PP)).setToolPanelDef(e,{initialState:t,onStateUpdated:()=>this.dispatchSideBarUpdated()}),r.setDisplayed(!1);let a=r.getGui();this.appendChild(a),this.toolPanelWrappers.push(r),ss(s.getButtonElement(),a)}refresh(){this.toolPanelWrappers.forEach(e=>e.refresh())}openToolPanel(e,t="api"){let i=this.openedItem();i!==e&&(this.toolPanelWrappers.forEach(t=>{let i=e===t.getToolPanelId();t.setDisplayed(i)}),i!==this.openedItem()&&(this.sideBarButtons.setActiveButton(e),this.raiseToolPanelVisibleEvent(e,i??void 0,t)))}getToolPanelInstance(e){let t=this.toolPanelWrappers.filter(t=>t.getToolPanelId()===e)[0];if(!t){tO(`unable to lookup Tool Panel as invalid key supplied: ${e}`);return}return t.getToolPanelInstance()}raiseToolPanelVisibleEvent(e,t,i){let r=!!e&&!!t;t&&this.eventService.dispatchEvent({type:"toolPanelVisibleChanged",source:i,key:t,visible:!1,switchingToolPanel:r}),e&&this.eventService.dispatchEvent({type:"toolPanelVisibleChanged",source:i,key:e,visible:!0,switchingToolPanel:r})}close(e="api"){this.openToolPanel(void 0,e)}isToolPanelShowing(){return!!this.openedItem()}openedItem(){let e=null;return this.toolPanelWrappers.forEach(t=>{t.isDisplayed()&&(e=t.getToolPanelId())}),e}onSideBarUpdated(){let e=PA(this.gos.get("sideBar")),t={};e&&this.sideBar&&e.toolPanels?.forEach(e=>{let{id:i}=e;if(!i)return;let r=this.sideBar.toolPanels?.find(e=>e.id===i);if(!r||e.toolPanel!==r.toolPanel)return;let s=this.toolPanelWrappers.find(e=>e.getToolPanelId()===i);if(!s)return;let a=this.gos.addGridCommonParams({...e.toolPanelParams??{},onStateUpdated:()=>this.dispatchSideBarUpdated()});!0===s.getToolPanelInstance()?.refresh(a)&&(this.toolPanelWrappers=this.toolPanelWrappers.filter(e=>e!==s),sP(s.getGui()),t[i]=s)}),this.clearDownUi(),this.setSideBarDef({sideBarDef:e,existingToolPanelWrappers:t})}dispatchSideBarUpdated(){this.eventService.dispatchEvent({type:"sideBarUpdated"})}destroyToolPanelWrappers(){this.toolPanelWrappers.forEach(e=>{sP(e.getGui()),this.destroyBean(e)}),this.toolPanelWrappers.length=0}destroy(){this.destroyToolPanelWrappers(),super.destroy()}}},PN=class extends i2{constructor(){super(...arguments),this.beanName="sideBarService"}registerSideBarComp(e){this.sideBarComp=e}getSideBarComp(){return this.sideBarComp}getSideBarSelector(){return PF}},PO="32.2.0",PB={version:PO,moduleName:`${tL.SideBarModule}-core`,beans:[PM,PN],dependantModules:[IX]},PG={version:PO,moduleName:`${tL.SideBarModule}-api`,apiFunctions:{isSideBarVisible:function(e){return e.sideBarService?.getSideBarComp().isDisplayed()??!1},setSideBarVisible:function(e,t){e.sideBarService?.getSideBarComp().setDisplayed(t)},setSideBarPosition:function(e,t){e.sideBarService?.getSideBarComp().setSideBarPosition(t)},openToolPanel:function(e,t){e.sideBarService?.getSideBarComp().openToolPanel(t,"api")},closeToolPanel:function(e){e.sideBarService?.getSideBarComp().close("api")},getOpenedToolPanel:function(e){return e.sideBarService?.getSideBarComp().openedItem()??null},refreshToolPanel:function(e){e.sideBarService?.getSideBarComp().refresh()},isToolPanelShowing:function(e){return e.sideBarService?.getSideBarComp().isToolPanelShowing()??!1},getToolPanelInstance:function(e,t){return aU(e.sideBarService?.getSideBarComp().getToolPanelInstance(t))},getSideBar:function(e){return e.sideBarService?.getSideBarComp().getDef()}},dependantModules:[PB]},Pz={version:PO,moduleName:tL.SideBarModule,dependantModules:[PB,PG]},P_={selector:"AG-PRIMARY-COLS-HEADER",component:class extends sQ{constructor(){super(`<div class="ag-column-select-header" role="presentation">
            <div data-ref="eExpand" class="ag-column-select-header-icon"></div>
            <ag-checkbox data-ref="eSelect" class="ag-column-select-header-checkbox"></ag-checkbox>
            <ag-input-text-field class="ag-column-select-header-filter-wrapper" data-ref="eFilterTextField"></ag-input-text-field>
        </div>`,[ad,ob]),this.eExpand=null,this.eSelect=null,this.eFilterTextField=null}wireBeans(e){this.columnModel=e.columnModel}postConstruct(){this.createExpandIcons(),this.addManagedListeners(this.eExpand,{click:this.onExpandClicked.bind(this),keydown:e=>{e.key===aa.SPACE&&(e.preventDefault(),this.onExpandClicked())}}),this.addManagedElementListeners(this.eSelect.getInputElement(),{click:this.onSelectClicked.bind(this)}),this.addManagedPropertyListener("functionsReadOnly",()=>this.onFunctionsReadOnlyPropChanged()),this.eFilterTextField.setAutoComplete(!1).onValueChange(()=>this.onFilterTextChanged()),this.addManagedElementListeners(this.eFilterTextField.getInputElement(),{keydown:this.onMiniFilterKeyDown.bind(this)}),this.addManagedEventListeners({newColumnsLoaded:this.showOrHideOptions.bind(this)});let e=this.localeService.getLocaleTextFunc();this.eSelect.setInputAriaLabel(e("ariaColumnSelectAll","Toggle All Columns Visibility")),this.eFilterTextField.setInputAriaLabel(e("ariaFilterColumnsInput","Filter Columns Input")),this.activateTabIndex([this.eExpand])}onFunctionsReadOnlyPropChanged(){let e=this.gos.get("functionsReadOnly");this.eSelect.setReadOnly(e),this.eSelect.addOrRemoveCssClass("ag-column-select-column-readonly",e)}init(e){this.params=e;let t=this.gos.get("functionsReadOnly");this.eSelect.setReadOnly(t),this.eSelect.addOrRemoveCssClass("ag-column-select-column-readonly",t),this.columnModel.isReady()&&this.showOrHideOptions()}createExpandIcons(){this.eExpand.appendChild(this.eExpandChecked=s2("columnSelectOpen",this.gos)),this.eExpand.appendChild(this.eExpandUnchecked=s2("columnSelectClosed",this.gos)),this.eExpand.appendChild(this.eExpandIndeterminate=s2("columnSelectIndeterminate",this.gos)),this.setExpandState(0)}showOrHideOptions(){let e=!this.params.suppressColumnFilter,t=!this.params.suppressColumnSelectAll,i=!this.params.suppressColumnExpandAll,r=this.columnModel.isProvidedColGroupsPresent(),s=this.localeService.getLocaleTextFunc();this.eFilterTextField.setInputPlaceholder(s("searchOoo","Search...")),sC(this.eFilterTextField.getGui(),e),sC(this.eSelect.getGui(),t),sC(this.eExpand,i&&r)}onFilterTextChanged(){this.onFilterTextChangedDebounced||(this.onFilterTextChangedDebounced=tj(()=>{let e=this.eFilterTextField.getValue();this.dispatchLocalEvent({type:"filterChanged",filterText:e})},300)),this.onFilterTextChangedDebounced()}onMiniFilterKeyDown(e){e.key===aa.ENTER&&setTimeout(()=>this.onSelectClicked(),300)}onSelectClicked(){this.dispatchLocalEvent({type:this.selectState?"unselectAll":"selectAll"})}onExpandClicked(){this.dispatchLocalEvent({type:0===this.expandState?"collapseAll":"expandAll"})}setExpandState(e){this.expandState=e,sC(this.eExpandChecked,0===this.expandState),sC(this.eExpandUnchecked,1===this.expandState),sC(this.eExpandIndeterminate,2===this.expandState)}setSelectionState(e){this.selectState=e,this.eSelect.setValue(this.selectState)}}},PV=class{constructor(e,t,i,r=!1,s){this.localEventService=new tR,this.displayName=e,this.dept=i,this.group=r,r?(this.columnGroup=t,this.expanded=s,this.children=[]):this.column=t}isGroup(){return this.group}getDisplayName(){return this.displayName}getColumnGroup(){return this.columnGroup}getColumn(){return this.column}getDept(){return this.dept}isExpanded(){return!!this.expanded}getChildren(){return this.children}isPassesFilter(){return this.passesFilter}setExpanded(e){e!==this.expanded&&(this.expanded=e,this.localEventService.dispatchEvent({type:"expandedChanged"}))}setPassesFilter(e){this.passesFilter=e}addEventListener(e,t){this.localEventService.addEventListener(e,t)}removeEventListener(e,t){this.localEventService.removeEventListener(e,t)}},Pj=class extends sQ{constructor(e,t,i){super('<div class="ag-menu"></div>'),this.column=e,this.mouseEvent=t,this.parentEl=i,this.displayName=null}wireBeans(e){this.columnModel=e.columnModel,this.columnNameService=e.columnNameService,this.funcColsService=e.funcColsService,this.popupService=e.popupService,this.focusService=e.focusService}postConstruct(){if(this.initializeProperties(this.column),this.buildMenuItemMap(),rm(this.column)?this.displayName=this.columnNameService.getDisplayNameForColumn(this.column,"columnToolPanel"):this.displayName=this.columnNameService.getDisplayNameForProvidedColumnGroup(null,this.column,"columnToolPanel"),this.isActive()){this.mouseEvent.preventDefault();let e=this.getMappedMenuItems();0!==e.length&&this.displayContextMenu(e)}}initializeProperties(e){i3(e)?this.columns=e.getLeafColumns():this.columns=[e],this.allowGrouping=this.columns.some(e=>e.isPrimary()&&e.isAllowRowGroup()),this.allowValues=this.columns.some(e=>e.isPrimary()&&e.isAllowValue()),this.allowPivoting=this.columnModel.isPivotMode()&&this.columns.some(e=>e.isPrimary()&&e.isAllowPivot())}buildMenuItemMap(){let e=this.localeService.getLocaleTextFunc();this.menuItemMap=new Map,this.menuItemMap.set("rowGroup",{allowedFunction:e=>e.isPrimary()&&e.isAllowRowGroup()&&!this.columnModel.isColGroupLocked(e),activeFunction:e=>e.isRowGroupActive(),activateLabel:()=>`${e("groupBy","Group by")} ${this.displayName}`,deactivateLabel:()=>`${e("ungroupBy","Un-Group by")} ${this.displayName}`,activateFunction:()=>{let e=this.funcColsService.getRowGroupColumns();this.funcColsService.setRowGroupColumns(this.addColumnsToList(e),"toolPanelUi")},deActivateFunction:()=>{let e=this.funcColsService.getRowGroupColumns();this.funcColsService.setRowGroupColumns(this.removeColumnsFromList(e),"toolPanelUi")},addIcon:"menuAddRowGroup",removeIcon:"menuRemoveRowGroup"}),this.menuItemMap.set("value",{allowedFunction:e=>e.isPrimary()&&e.isAllowValue(),activeFunction:e=>e.isValueActive(),activateLabel:()=>e("addToValues",`Add ${this.displayName} to values`,[this.displayName]),deactivateLabel:()=>e("removeFromValues",`Remove ${this.displayName} from values`,[this.displayName]),activateFunction:()=>{let e=this.funcColsService.getValueColumns();this.funcColsService.setValueColumns(this.addColumnsToList(e),"toolPanelUi")},deActivateFunction:()=>{let e=this.funcColsService.getValueColumns();this.funcColsService.setValueColumns(this.removeColumnsFromList(e),"toolPanelUi")},addIcon:"valuePanel",removeIcon:"valuePanel"}),this.menuItemMap.set("pivot",{allowedFunction:e=>this.columnModel.isPivotMode()&&e.isPrimary()&&e.isAllowPivot(),activeFunction:e=>e.isPivotActive(),activateLabel:()=>e("addToLabels",`Add ${this.displayName} to labels`,[this.displayName]),deactivateLabel:()=>e("removeFromLabels",`Remove ${this.displayName} from labels`,[this.displayName]),activateFunction:()=>{let e=this.funcColsService.getPivotColumns();this.funcColsService.setPivotColumns(this.addColumnsToList(e),"toolPanelUi")},deActivateFunction:()=>{let e=this.funcColsService.getPivotColumns();this.funcColsService.setPivotColumns(this.removeColumnsFromList(e),"toolPanelUi")},addIcon:"pivotPanel",removeIcon:"pivotPanel"})}addColumnsToList(e){return[...e].concat(this.columns.filter(t=>-1===e.indexOf(t)))}removeColumnsFromList(e){return e.filter(e=>-1===this.columns.indexOf(e))}displayContextMenu(e){let t=this.getGui(),i=this.createBean(new ka),r=this.localeService.getLocaleTextFunc(),s=()=>{};t.appendChild(i.getGui()),i.addMenuItems(e),i.addManagedListeners(i,{closeMenu:()=>{this.parentEl.focus(),s()}});let a=this.popupService.addPopup({modal:!0,eChild:t,closeOnEsc:!0,afterGuiAttached:()=>this.focusService.focusInto(i.getGui()),ariaLabel:r("ariaLabelContextMenu","Context Menu"),closedCallback:e=>{e instanceof KeyboardEvent&&this.parentEl.focus(),this.destroyBean(i)}});a&&(s=a.hideFunc),this.popupService.positionPopupUnderMouseEvent({type:"columnContextMenu",mouseEvent:this.mouseEvent,ePopup:t})}isActive(){return this.allowGrouping||this.allowValues||this.allowPivoting}getMappedMenuItems(){let e=[];for(let t of this.menuItemMap.values()){let i=this.columns.some(e=>t.allowedFunction(e)&&!t.activeFunction(e)),r=this.columns.some(e=>t.allowedFunction(e)&&t.activeFunction(e));i&&e.push({name:t.activateLabel(this.displayName),icon:s2(t.addIcon,this.gos,null),action:()=>t.activateFunction()}),r&&e.push({name:t.deactivateLabel(this.displayName),icon:s2(t.removeIcon,this.gos,null),action:()=>t.deActivateFunction()})}return e}},PH=class extends sQ{constructor(e,t,i,r){super(),this.modelItem=e,this.allowDragging=t,this.eventType=i,this.focusWrapper=r,this.cbSelect=null,this.eLabel=null,this.eGroupOpenedIcon=null,this.eGroupClosedIcon=null,this.eColumnGroupIcons=null,this.processingColumnStateChange=!1,this.modelItem=e,this.columnGroup=e.getColumnGroup(),this.columnDept=e.getDept(),this.displayName=e.getDisplayName(),this.allowDragging=t}wireBeans(e){this.columnModel=e.columnModel,this.dragAndDropService=e.dragAndDropService,this.modelItemUtils=e.modelItemUtils}postConstruct(){this.setTemplate(`<div class="ag-column-select-column-group" aria-hidden="true">
            <span class="ag-column-group-icons" data-ref="eColumnGroupIcons" >
                <span class="ag-column-group-closed-icon" data-ref="eGroupClosedIcon"></span>
                <span class="ag-column-group-opened-icon" data-ref="eGroupOpenedIcon"></span>
            </span>
            <ag-checkbox data-ref="cbSelect" class="ag-column-select-checkbox"></ag-checkbox>
            <span class="ag-column-select-column-label" data-ref="eLabel"></span>
        </div>`,[ad]),this.eDragHandle=s2("columnDrag",this.gos),this.eDragHandle.classList.add("ag-drag-handle","ag-column-select-column-group-drag-handle");let e=this.cbSelect.getGui(),t=this.cbSelect.getInputElement();e.insertAdjacentElement("afterend",this.eDragHandle),t.setAttribute("tabindex","-1"),this.eLabel.innerHTML=this.displayName?this.displayName:"",this.setupExpandContract(),this.addCssClass("ag-column-select-indent-"+this.columnDept),this.getGui().style.setProperty("--ag-indentation-level",String(this.columnDept)),this.addManagedEventListeners({columnPivotModeChanged:this.onColumnStateChanged.bind(this)}),this.addManagedElementListeners(this.eLabel,{click:this.onLabelClicked.bind(this)}),this.addManagedListeners(this.cbSelect,{fieldValueChanged:this.onCheckboxChanged.bind(this)}),this.addManagedListeners(this.modelItem,{expandedChanged:this.onExpandChanged.bind(this)}),this.addManagedListeners(this.focusWrapper,{keydown:this.handleKeyDown.bind(this),contextmenu:this.onContextMenu.bind(this)}),this.setOpenClosedIcons(),this.setupDragging(),this.onColumnStateChanged(),this.addVisibilityListenersToAllChildren(),this.refreshAriaExpanded(),this.refreshAriaLabel(),this.setupTooltip(),oK(this.columnGroup.getColGroupDef(),this.gos,null,this.columnGroup).forEach(e=>this.addOrRemoveCssClass(e,!0))}getColumns(){return this.columnGroup.getLeafColumns()}setupTooltip(){let e;let t=this.columnGroup.getColGroupDef();if(!t)return;"whenTruncated"===this.gos.get("tooltipShowMode")&&(e=()=>this.eLabel.scrollWidth>this.eLabel.clientWidth);let i=()=>{let i=t.headerTooltip;this.setTooltip({newTooltipText:i,location:"columnToolPanelColumnGroup",shouldDisplayTooltip:e})};i(),this.addManagedEventListeners({newColumnsLoaded:i})}getTooltipParams(){let e=super.getTooltipParams();return e.location="columnToolPanelColumnGroup",e}handleKeyDown(e){switch(e.key){case aa.LEFT:e.preventDefault(),this.modelItem.setExpanded(!1);break;case aa.RIGHT:e.preventDefault(),this.modelItem.setExpanded(!0);break;case aa.SPACE:e.preventDefault(),this.isSelectable()&&this.onSelectAllChanged(!this.isSelected())}}onContextMenu(e){let{columnGroup:t,gos:i}=this;if(i.get("functionsReadOnly"))return;let r=this.createBean(new Pj(t,e,this.focusWrapper));this.addDestroyFunc(()=>{r.isAlive()&&this.destroyBean(r)})}addVisibilityListenersToAllChildren(){let e=this.onColumnStateChanged.bind(this);this.columnGroup.getLeafColumns().forEach(t=>{this.addManagedListeners(t,{visibleChanged:e,columnValueChanged:e,columnPivotChanged:e,columnRowGroupChanged:e})})}setupDragging(){if(!this.allowDragging){sC(this.eDragHandle,!1);return}let e=!this.gos.get("suppressDragLeaveHidesColumns"),t={type:aX.ToolPanel,eElement:this.eDragHandle,dragItemName:this.displayName,getDefaultIconName:()=>e?"hide":"notAllowed",getDragItem:()=>this.createDragItem(),onDragStarted:()=>{e=!this.gos.get("suppressDragLeaveHidesColumns"),this.eventService.dispatchEvent({type:"columnPanelItemDragStart",column:this.columnGroup})},onDragStopped:()=>{this.eventService.dispatchEvent({type:"columnPanelItemDragEnd"})},onGridEnter:t=>{e&&this.modelItemUtils.updateColumns({columns:this.columnGroup.getLeafColumns(),visibleState:t?.visibleState,pivotState:t?.pivotState,eventType:this.eventType})},onGridExit:()=>{e&&this.onChangeCommon(!1)}};this.dragAndDropService.addDragSource(t,!0),this.addDestroyFunc(()=>this.dragAndDropService.removeDragSource(t))}createDragItem(){let e=this.columnGroup.getLeafColumns(),t={},i={};return e.forEach(e=>{let r=e.getId();t[r]=e.isVisible(),i[r]=this.modelItemUtils.createPivotState(e)}),{columns:e,visibleState:t,pivotState:i}}setupExpandContract(){this.eGroupClosedIcon.appendChild(s1("columnSelectClosed",this.gos,null)),this.eGroupOpenedIcon.appendChild(s1("columnSelectOpen",this.gos,null));let e=this.onExpandOrContractClicked.bind(this);this.addManagedElementListeners(this.eGroupClosedIcon,{click:e}),this.addManagedElementListeners(this.eGroupOpenedIcon,{click:e});let t=new s6(this.eColumnGroupIcons,!0);this.addManagedListeners(t,{tap:e}),this.addDestroyFunc(t.destroy.bind(t))}onLabelClicked(){let e=!this.cbSelect.getValue();this.onChangeCommon(e)}onCheckboxChanged(e){this.onChangeCommon(e.selected)}getVisibleLeafColumns(){let e=[],t=i=>{i.forEach(i=>{i.isPassesFilter()&&(i.isGroup()?t(i.getChildren()):e.push(i.getColumn()))})};return t(this.modelItem.getChildren()),e}onChangeCommon(e){this.refreshAriaLabel(),this.processingColumnStateChange||this.modelItemUtils.selectAllChildren(this.modelItem.getChildren(),e,this.eventType)}refreshAriaLabel(){let e=this.localeService.getLocaleTextFunc(),t=e("ariaColumnGroup","Column Group"),i=this.cbSelect.getValue(),r=void 0===i?e("ariaIndeterminate","indeterminate"):i?e("ariaVisible","visible"):e("ariaHidden","hidden"),s=e("ariaToggleVisibility","Press SPACE to toggle visibility");rJ(this.focusWrapper,`${this.displayName} ${t}`),this.cbSelect.setInputAriaLabel(`${s} (${r})`),r1(this.focusWrapper,this.cbSelect.getInputElement().id)}onColumnStateChanged(){let e=this.workOutSelectedValue(),t=this.workOutReadOnlyValue();this.processingColumnStateChange=!0,this.cbSelect.setValue(e),this.cbSelect.setReadOnly(t),this.addOrRemoveCssClass("ag-column-select-column-group-readonly",t),this.processingColumnStateChange=!1}workOutSelectedValue(){let e=this.columnModel.isPivotMode(),t=this.getVisibleLeafColumns(),i=0,r=0;if(t.forEach(t=>{(e||!t.getColDef().lockVisible)&&(this.isColumnChecked(t,e)?i++:r++)}),!(i>0)||!(r>0))return i>0}workOutReadOnlyValue(){let e=this.columnModel.isPivotMode(),t=0;return this.columnGroup.getLeafColumns().forEach(i=>{e?i.isAnyFunctionAllowed()&&t++:!i.getColDef().lockVisible&&t++}),0===t}isColumnChecked(e,t){if(t){let t=e.isPivotActive(),i=e.isRowGroupActive(),r=e.isValueActive();return t||i||r}return e.isVisible()}onExpandOrContractClicked(){let e=this.modelItem.isExpanded();this.modelItem.setExpanded(!e)}onExpandChanged(){this.setOpenClosedIcons(),this.refreshAriaExpanded()}setOpenClosedIcons(){let e=this.modelItem.isExpanded();sC(this.eGroupClosedIcon,!e),sC(this.eGroupOpenedIcon,e)}refreshAriaExpanded(){r5(this.focusWrapper,this.modelItem.isExpanded())}getDisplayName(){return this.displayName}onSelectAllChanged(e){let t=this.cbSelect.getValue();this.cbSelect.isReadOnly()||(!e||t)&&(e||!t)||this.cbSelect.toggle()}isSelected(){return this.cbSelect.getValue()}isSelectable(){return!this.cbSelect.isReadOnly()}setSelected(e){this.cbSelect.setValue(e,!0)}},PU=class extends i2{constructor(e,t){super(),this.comp=e,this.virtualList=t}wireBeans(e){this.columnMoveService=e.columnMoveService,this.columnModel=e.columnModel}postConstruct(){this.createManagedBean(new kh(this.comp,this.virtualList,{dragSourceType:aX.ToolPanel,listItemDragStartEvent:"columnPanelItemDragStart",listItemDragEndEvent:"columnPanelItemDragEnd",eventSource:this.eventService,getCurrentDragValue:e=>this.getCurrentDragValue(e),isMoveBlocked:e=>this.isMoveBlocked(e),getNumRows:e=>e.getDisplayedColsList().length,moveItem:(e,t)=>this.moveItem(this.getCurrentColumnsBeingMoved(e),t)}))}getCurrentDragValue(e){return e.column}getCurrentColumnsBeingMoved(e){return i3(e)?e.getLeafColumns():e?[e]:[]}isMoveBlocked(e){return!!this.gos.get("suppressMovableColumns")||!!this.getCurrentColumnsBeingMoved(e).find(e=>{let t=e.getColDef();return!!t.suppressMovable||!!t.lockPosition})}moveItem(e,t){if(!t)return;let{component:i}=t,r=null,s="top"===t.position;if(i instanceof PH?(r=i.getColumns()[0],s=!0):i&&(r=i.getColumn()),!r)return;let a=this.getMoveTargetIndex({currentColumns:e,lastHoveredColumn:r,isBefore:s});null!=a&&this.columnMoveService.moveColumns(e,a,"toolPanelUi")}getMoveTargetIndex(e){let{currentColumns:t,lastHoveredColumn:i,isBefore:r}=e;if(!i||!t)return null;let s=this.columnModel.getCols().indexOf(i),a=r?s:s+1,o=this.getMoveDiff(t,a);return a-o}getMoveDiff(e,t){let i=this.columnModel.getCols();if(!e)return 0;let r=e[0],s=e.length;return i.indexOf(r)<t?s:0}},PW=class extends sQ{constructor(e,t,i,r){super(),this.allowDragging=t,this.groupsExist=i,this.focusWrapper=r,this.eLabel=null,this.cbSelect=null,this.processingColumnStateChange=!1,this.column=e.getColumn(),this.columnDept=e.getDept(),this.displayName=e.getDisplayName()}wireBeans(e){this.columnModel=e.columnModel,this.dragAndDropService=e.dragAndDropService,this.modelItemUtils=e.modelItemUtils}postConstruct(){this.setTemplate(`<div class="ag-column-select-column" aria-hidden="true">
            <ag-checkbox data-ref="cbSelect" class="ag-column-select-checkbox"></ag-checkbox>
            <span class="ag-column-select-column-label" data-ref="eLabel"></span>
        </div>`,[ad]),this.eDragHandle=s2("columnDrag",this.gos),this.eDragHandle.classList.add("ag-drag-handle","ag-column-select-column-drag-handle");let e=this.cbSelect.getGui(),t=this.cbSelect.getInputElement();e.insertAdjacentElement("afterend",this.eDragHandle),t.setAttribute("tabindex","-1");let i=rL(this.displayName);this.eLabel.innerHTML=i;let r=this.columnDept;this.groupsExist&&this.addCssClass("ag-column-select-add-group-indent"),this.addCssClass(`ag-column-select-indent-${r}`),this.getGui().style.setProperty("--ag-indentation-level",String(r)),this.setupDragging();let s=this.onColumnStateChanged.bind(this);this.addManagedEventListeners({columnPivotModeChanged:s}),this.addManagedListeners(this.column,{columnValueChanged:s,columnPivotChanged:s,columnRowGroupChanged:s,visibleChanged:s}),this.addManagedListeners(this.focusWrapper,{keydown:this.handleKeyDown.bind(this),contextmenu:this.onContextMenu.bind(this)}),this.addManagedPropertyListener("functionsReadOnly",this.onColumnStateChanged.bind(this)),this.addManagedListeners(this.cbSelect,{fieldValueChanged:this.onCheckboxChanged.bind(this)}),this.addManagedElementListeners(this.eLabel,{click:this.onLabelClicked.bind(this)}),this.onColumnStateChanged(),this.refreshAriaLabel(),this.setupTooltip(),oK(this.column.getColDef(),this.gos,this.column,null).forEach(e=>this.addOrRemoveCssClass(e,!0))}getColumn(){return this.column}setupTooltip(){let e;"whenTruncated"===this.gos.get("tooltipShowMode")&&(e=()=>this.eLabel.scrollWidth>this.eLabel.clientWidth);let t=()=>{let t=this.column.getColDef().headerTooltip;this.setTooltip({newTooltipText:t,location:"columnToolPanelColumn",shouldDisplayTooltip:e})};t(),this.addManagedEventListeners({newColumnsLoaded:t})}getTooltipParams(){let e=super.getTooltipParams();return e.location="columnToolPanelColumn",e.colDef=this.column.getColDef(),e}onContextMenu(e){let{column:t,gos:i}=this;if(i.get("functionsReadOnly"))return;let r=this.createBean(new Pj(t,e,this.focusWrapper));this.addDestroyFunc(()=>{r.isAlive()&&this.destroyBean(r)})}handleKeyDown(e){e.key===aa.SPACE&&(e.preventDefault(),this.isSelectable()&&this.onSelectAllChanged(!this.isSelected()))}onLabelClicked(){if(this.gos.get("functionsReadOnly"))return;let e=!this.cbSelect.getValue();this.onChangeCommon(e)}onCheckboxChanged(e){this.onChangeCommon(e.selected)}onChangeCommon(e){!this.cbSelect.isReadOnly()&&(this.refreshAriaLabel(),this.processingColumnStateChange||this.modelItemUtils.setColumn(this.column,e,"toolPanelUi"))}refreshAriaLabel(){let e=this.localeService.getLocaleTextFunc(),t=e("ariaColumn","Column"),i=this.cbSelect.getValue()?e("ariaVisible","visible"):e("ariaHidden","hidden"),r=e("ariaToggleVisibility","Press SPACE to toggle visibility");rJ(this.focusWrapper,`${this.displayName} ${t}`),this.cbSelect.setInputAriaLabel(`${r} (${i})`),r1(this.focusWrapper,this.cbSelect.getInputElement().id)}setupDragging(){if(!this.allowDragging){sC(this.eDragHandle,!1);return}let e=!this.gos.get("suppressDragLeaveHidesColumns"),t={type:aX.ToolPanel,eElement:this.eDragHandle,dragItemName:this.displayName,getDefaultIconName:()=>e?"hide":"notAllowed",getDragItem:()=>this.createDragItem(),onDragStarted:()=>{e=!this.gos.get("suppressDragLeaveHidesColumns"),this.eventService.dispatchEvent({type:"columnPanelItemDragStart",column:this.column})},onDragStopped:()=>{this.eventService.dispatchEvent({type:"columnPanelItemDragEnd"})},onGridEnter:t=>{e&&this.modelItemUtils.updateColumns({columns:[this.column],visibleState:t?.visibleState,pivotState:t?.pivotState,eventType:"toolPanelUi"})},onGridExit:()=>{e&&this.onChangeCommon(!1)}};this.dragAndDropService.addDragSource(t,!0),this.addDestroyFunc(()=>this.dragAndDropService.removeDragSource(t))}createDragItem(){let e=this.column.getColId(),t={[e]:this.column.isVisible()},i={[e]:this.modelItemUtils.createPivotState(this.column)};return{columns:[this.column],visibleState:t,pivotState:i}}onColumnStateChanged(){this.processingColumnStateChange=!0;let e=this.columnModel.isPivotMode();if(e){let e=this.column.isAnyFunctionActive();this.cbSelect.setValue(e)}else this.cbSelect.setValue(this.column.isVisible());let t=!0,i=!0;if(e){let e=this.gos.get("functionsReadOnly"),r=!this.column.isAnyFunctionAllowed();i=t=!e&&!r}else{let{enableRowGroup:e,enableValue:r,lockPosition:s,suppressMovable:a,lockVisible:o}=this.column.getColDef();t=!o,i=!!e||!!r||!(s||a)}this.cbSelect.setReadOnly(!t),this.eDragHandle.classList.toggle("ag-column-select-column-readonly",!i),this.addOrRemoveCssClass("ag-column-select-column-readonly",!i&&!t),this.cbSelect.setPassive(!1),this.processingColumnStateChange=!1}getDisplayName(){return this.displayName}onSelectAllChanged(e){e===this.cbSelect.getValue()||this.cbSelect.isReadOnly()||this.cbSelect.toggle()}isSelected(){return this.cbSelect.getValue()}isSelectable(){return!this.cbSelect.isReadOnly()}isExpandable(){return!1}setExpanded(e){tO("can not expand a column item that does not represent a column group header")}},P$=class{constructor(e){this.items=e}getRowCount(){return this.items.length}getRow(e){return this.items[e]}},PY={selector:"AG-PRIMARY-COLS-LIST",component:class extends sQ{constructor(){super('<div class="ag-column-select-list" role="presentation"></div>'),this.destroyColumnItemFuncs=[],this.hasLoadedInitialState=!1,this.isInitialState=!1}wireBeans(e){this.columnModel=e.columnModel,this.columnNameService=e.columnNameService,this.colDefService=e.toolPanelColDefService,this.modelItemUtils=e.modelItemUtils}destroy(){this.destroyColumnTree(),super.destroy()}destroyColumnTree(){this.allColsTree=[],this.destroyColumnItemFuncs.forEach(e=>e()),this.destroyColumnItemFuncs=[]}init(e,t,i){this.params=e,this.allowDragging=t,this.eventType=i,this.params.suppressSyncLayoutWithGrid||this.addManagedEventListeners({columnMoved:this.onColumnsChanged.bind(this)}),this.addManagedEventListeners({newColumnsLoaded:this.onColumnsChanged.bind(this)});let r=this.fireSelectionChangedEvent.bind(this);this.addManagedEventListeners({columnPivotChanged:r,columnPivotModeChanged:r,columnRowGroupChanged:r,columnValueChanged:r,columnVisible:r,newColumnsLoaded:r}),this.expandGroupsByDefault=!this.params.contractColumnSelection,this.virtualList=this.createManagedBean(new I6({cssIdentifier:"column-select",ariaRole:"tree"})),this.appendChild(this.virtualList.getGui()),this.virtualList.setComponentCreator((e,t)=>(r2(t,e.getDept()+1),this.createComponentFromItem(e,t))),this.columnModel.isReady()&&this.onColumnsChanged(),this.params.suppressColumnMove||this.createManagedBean(new PU(this,this.virtualList))}createComponentFromItem(e,t){if(e.isGroup()){let i=new PH(e,this.allowDragging,this.eventType,t);return this.createBean(i),i}let i=new PW(e,this.allowDragging,this.groupsExist,t);return this.createBean(i),i}onColumnsChanged(){this.hasLoadedInitialState||(this.hasLoadedInitialState=!0,this.isInitialState=!!this.params.initialState);let e=this.getExpandedStates(),t=this.columnModel.isPivotMode();this.params.suppressSyncLayoutWithGrid||t?this.buildTreeFromProvidedColumnDefs():this.buildTreeFromWhatGridIsDisplaying(),this.setExpandedStates(e),this.markFilteredColumns(),this.flattenAndFilterModel(),this.isInitialState=!1}getDisplayedColsList(){return this.displayedColsList}getExpandedStates(){let e={};if(this.isInitialState){let{expandedGroupIds:t}=this.params.initialState;return t.forEach(t=>{e[t]=!0}),e}return this.allColsTree?(this.forEachItem(t=>{if(!t.isGroup())return;let i=t.getColumnGroup();i&&(e[i.getId()]=t.isExpanded())}),e):{}}setExpandedStates(e){if(!this.allColsTree)return;let{isInitialState:t}=this;this.forEachItem(i=>{if(!i.isGroup())return;let r=i.getColumnGroup();if(r){let s=e[r.getId()];(null!=s||t)&&i.setExpanded(!!s)}})}buildTreeFromWhatGridIsDisplaying(){this.colDefService.syncLayoutWithGrid(this.setColumnLayout.bind(this))}setColumnLayout(e){let t=this.colDefService.createColumnTree(e);this.buildListModel(t),this.groupsExist=e.some(e=>e&&void 0!==e.children),this.markFilteredColumns(),this.flattenAndFilterModel()}buildTreeFromProvidedColumnDefs(){this.buildListModel(this.columnModel.getColDefColTree()),this.groupsExist=this.columnModel.isProvidedColGroupsPresent()}buildListModel(e){let t=this.onColumnExpanded.bind(this),i=e=>{e.addEventListener("expandedChanged",t);let i=e.removeEventListener.bind(e,"expandedChanged",t);this.destroyColumnItemFuncs.push(i)},r=(e,t,i)=>{e.forEach(e=>{i3(e)?s(e,t,i):a(e,t,i)})},s=(e,t,s)=>{let a=e.getColGroupDef();if(a&&a.suppressColumnsToolPanel)return;if(e.isPadding()){r(e.getChildren(),t,s);return}let o=new PV(this.columnNameService.getDisplayNameForProvidedColumnGroup(null,e,"columnToolPanel"),e,t,!0,this.expandGroupsByDefault);s.push(o),i(o),r(e.getChildren(),t+1,o.getChildren())},a=(e,t,i)=>{if(e.getColDef()&&e.getColDef().suppressColumnsToolPanel)return;let r=this.columnNameService.getDisplayNameForColumn(e,"columnToolPanel");i.push(new PV(r,e,t))};this.destroyColumnTree(),r(e,0,this.allColsTree)}onColumnExpanded(){this.flattenAndFilterModel()}flattenAndFilterModel(){this.displayedColsList=[];let e=t=>{t.isPassesFilter()&&(this.displayedColsList.push(t),t.isGroup()&&t.isExpanded()&&t.getChildren().forEach(e))};this.allColsTree.forEach(e),this.virtualList.setModel(new P$(this.displayedColsList));let t=this.virtualList.getLastFocusedRow();this.virtualList.refresh(),null!=t&&this.focusRowIfAlive(t),this.notifyListeners(),this.refreshAriaLabel()}refreshAriaLabel(){let e=this.localeService.getLocaleTextFunc(),t=e("ariaColumnPanelList","Column List"),i=e("columns","Columns"),r=this.displayedColsList.length;rJ(this.virtualList.getAriaElement(),`${t} ${r} ${i}`)}focusRowIfAlive(e){window.setTimeout(()=>{this.isAlive()&&this.virtualList.focusRow(e)},0)}forEachItem(e){let t=i=>{i.forEach(i=>{e(i),i.isGroup()&&t(i.getChildren())})};this.allColsTree&&t(this.allColsTree)}doSetExpandedAll(e){this.forEachItem(t=>{t.isGroup()&&t.setExpanded(e)})}setGroupsExpanded(e,t){if(!t){this.doSetExpandedAll(e);return}let i=[];this.forEachItem(r=>{if(!r.isGroup())return;let s=r.getColumnGroup().getId();t.indexOf(s)>=0&&(r.setExpanded(e),i.push(s))});let r=t.filter(e=>!iU(i,e));r.length>0&&tO("unable to find group(s) for supplied groupIds:",r)}getExpandState(){let e=0,t=0;return(this.forEachItem(i=>{i.isGroup()&&(i.isExpanded()?e++:t++)}),e>0&&t>0)?2:t>0?1:0}doSetSelectedAll(e){this.modelItemUtils.selectAllChildren(this.allColsTree,e,this.eventType)}getSelectionState(){let e=0,t=0,i=this.columnModel.isPivotMode();if(this.forEachItem(r=>{let s;if(r.isGroup()||!r.isPassesFilter())return;let a=r.getColumn(),o=a.getColDef();if(i){if(!a.isAllowPivot()&&!a.isAllowRowGroup()&&!a.isAllowValue())return;s=a.isValueActive()||a.isPivotActive()||a.isRowGroupActive()}else{if(o.lockVisible)return;s=a.isVisible()}s?e++:t++}),!(e>0)||!(t>0))return!(0===e||t>0)}setFilterText(e){this.filterText=tY(e)?e.toLowerCase():null,this.markFilteredColumns(),this.flattenAndFilterModel()}markFilteredColumns(){let e=e=>{if(!tY(this.filterText))return!0;let t=e.getDisplayName();return null==t||-1!==t.toLowerCase().indexOf(this.filterText)},t=(i,r)=>{let s=!1;if(i.isGroup()){let a=e(i);i.getChildren().forEach(e=>{let i=t(e,a||r);i&&(s=i)})}let a=!!r||!!s||e(i);return i.setPassesFilter(a),a};this.allColsTree.forEach(e=>t(e,!1))}notifyListeners(){this.fireGroupExpandedEvent(),this.fireSelectionChangedEvent()}fireGroupExpandedEvent(){let e=this.getExpandState();this.dispatchLocalEvent({type:"groupExpanded",state:e})}fireSelectionChangedEvent(){if(!this.allColsTree)return;let e=this.getSelectionState();this.dispatchLocalEvent({type:"selectionChanged",state:e})}getExpandedGroups(){let e=[];return this.allColsTree&&this.forEachItem(t=>{t.isGroup()&&t.isExpanded()&&e.push(t.getColumnGroup().getId())}),e}}},PK=class extends sQ{constructor(){super(`<div class="ag-column-select">
            <ag-primary-cols-header data-ref="primaryColsHeaderPanel"></ag-primary-cols-header>
            <ag-primary-cols-list data-ref="primaryColsListPanel"></ag-primary-cols-list>
        </div>`,[P_,PY]),this.primaryColsHeaderPanel=null,this.primaryColsListPanel=null}init(e,t,i){this.allowDragging=e,this.params=t,this.eventType=i,this.primaryColsHeaderPanel.init(this.params);let r=this.params.suppressColumnFilter,s=this.params.suppressColumnSelectAll;this.params.suppressColumnExpandAll&&r&&s&&this.primaryColsHeaderPanel.setDisplayed(!1),this.addManagedListeners(this.primaryColsListPanel,{groupExpanded:this.onGroupExpanded.bind(this),selectionChanged:this.onSelectionChange.bind(this)}),this.primaryColsListPanel.init(this.params,this.allowDragging,this.eventType),this.addManagedListeners(this.primaryColsHeaderPanel,{expandAll:this.onExpandAll.bind(this),collapseAll:this.onCollapseAll.bind(this),selectAll:this.onSelectAll.bind(this),unselectAll:this.onUnselectAll.bind(this),filterChanged:this.onFilterChanged.bind(this)}),this.positionableFeature=new os(this.getGui(),{minHeight:100}),this.createManagedBean(this.positionableFeature)}toggleResizable(e){this.positionableFeature.setResizable(!!e&&{bottom:!0})}onExpandAll(){this.primaryColsListPanel.doSetExpandedAll(!0)}onCollapseAll(){this.primaryColsListPanel.doSetExpandedAll(!1)}expandGroups(e){this.primaryColsListPanel.setGroupsExpanded(!0,e)}collapseGroups(e){this.primaryColsListPanel.setGroupsExpanded(!1,e)}setColumnLayout(e){this.primaryColsListPanel.setColumnLayout(e)}onFilterChanged(e){this.primaryColsListPanel.setFilterText(e.filterText)}syncLayoutWithGrid(){this.primaryColsListPanel.onColumnsChanged()}onSelectAll(){this.primaryColsListPanel.doSetSelectedAll(!0)}onUnselectAll(){this.primaryColsListPanel.doSetSelectedAll(!1)}onGroupExpanded(e){this.primaryColsHeaderPanel.setExpandState(e.state),this.params.onStateUpdated()}onSelectionChange(e){this.primaryColsHeaderPanel.setSelectionState(e.state)}getExpandedGroups(){return this.primaryColsListPanel.getExpandedGroups()}},PZ=class extends sQ{constructor(){super(...arguments),this.cbPivotMode=null}wireBeans(e){this.columnModel=e.columnModel,this.ctrlsService=e.ctrlsService}createTemplate(){return`<div class="ag-pivot-mode-panel">
                <ag-toggle-button data-ref="cbPivotMode" class="ag-pivot-mode-select"></ag-toggle-button>
            </div>`}postConstruct(){this.setTemplate(this.createTemplate(),[hl]),this.cbPivotMode.setValue(this.columnModel.isPivotMode());let e=this.localeService.getLocaleTextFunc();this.cbPivotMode.setLabel(e("pivotMode","Pivot Mode")),this.addManagedListeners(this.cbPivotMode,{fieldValueChanged:this.onBtPivotMode.bind(this)});let t=this.onPivotModeChanged.bind(this);this.addManagedEventListeners({newColumnsLoaded:t,columnPivotModeChanged:t})}onBtPivotMode(){let e=!!this.cbPivotMode.getValue();e!==this.columnModel.isPivotMode()&&(this.gos.updateGridOptions({options:{pivotMode:e},source:"toolPanelUi"}),this.ctrlsService.getHeaderRowContainerCtrls().forEach(e=>e.refresh()))}onPivotModeChanged(){let e=this.columnModel.isPivotMode();this.cbPivotMode.setValue(e)}},Pq=class extends sQ{constructor(){super('<div class="ag-column-panel"></div>'),this.initialised=!1,this.childDestroyFuncs=[]}setVisible(e){super.setDisplayed(e),e&&!this.initialised&&this.init(this.params)}init(e){let t=this.gos.addGridCommonParams({suppressColumnMove:!1,suppressColumnSelectAll:!1,suppressColumnFilter:!1,suppressColumnExpandAll:!1,contractColumnSelection:!1,suppressPivotMode:!1,suppressRowGroups:!1,suppressValues:!1,suppressPivots:!1,suppressSyncLayoutWithGrid:!1});if(this.params={...t,...e},this.isRowGroupingModuleLoaded()&&!this.params.suppressPivotMode&&(this.pivotModePanel=this.createBean(new PZ),this.childDestroyFuncs.push(()=>this.destroyBean(this.pivotModePanel)),this.appendChild(this.pivotModePanel)),this.primaryColsPanel=this.createBean(new PK),this.childDestroyFuncs.push(()=>this.destroyBean(this.primaryColsPanel)),this.primaryColsPanel.init(!0,this.params,"toolPanelUi"),this.primaryColsPanel.addCssClass("ag-column-panel-column-select"),this.appendChild(this.primaryColsPanel),this.isRowGroupingModuleLoaded()){this.params.suppressRowGroups||(this.rowGroupDropZonePanel=this.createBean(new LK(!1)),this.childDestroyFuncs.push(()=>this.destroyBean(this.rowGroupDropZonePanel)),this.appendChild(this.rowGroupDropZonePanel)),this.params.suppressValues||(this.valuesDropZonePanel=this.createBean(new Pb(!1)),this.childDestroyFuncs.push(()=>this.destroyBean(this.valuesDropZonePanel)),this.appendChild(this.valuesDropZonePanel)),this.params.suppressPivots||(this.pivotDropZonePanel=this.createBean(new LY(!1)),this.childDestroyFuncs.push(()=>this.destroyBean(this.pivotDropZonePanel)),this.appendChild(this.pivotDropZonePanel)),this.setLastVisible();let[e]=this.addManagedEventListeners({columnPivotModeChanged:()=>{this.resetChildrenHeight(),this.setLastVisible()}});this.childDestroyFuncs.push(()=>e())}this.initialised=!0}setPivotModeSectionVisible(e){this.isRowGroupingModuleLoaded()&&(this.pivotModePanel?this.pivotModePanel.setDisplayed(e):e&&(this.pivotModePanel=this.createBean(new PZ),this.getGui().insertBefore(this.pivotModePanel.getGui(),this.getGui().firstChild),this.childDestroyFuncs.push(()=>this.destroyBean(this.pivotModePanel))),this.setLastVisible())}setRowGroupsSectionVisible(e){this.isRowGroupingModuleLoaded()&&(this.rowGroupDropZonePanel?this.rowGroupDropZonePanel.setDisplayed(e):e&&(this.rowGroupDropZonePanel=this.createManagedBean(new LK(!1)),this.appendChild(this.rowGroupDropZonePanel)),this.setLastVisible())}setValuesSectionVisible(e){this.isRowGroupingModuleLoaded()&&(this.valuesDropZonePanel?this.valuesDropZonePanel.setDisplayed(e):e&&(this.valuesDropZonePanel=this.createManagedBean(new Pb(!1)),this.appendChild(this.valuesDropZonePanel)),this.setLastVisible())}setPivotSectionVisible(e){this.isRowGroupingModuleLoaded()&&(this.pivotDropZonePanel?this.pivotDropZonePanel.setDisplayed(e):e&&(this.pivotDropZonePanel=this.createManagedBean(new LY(!1)),this.appendChild(this.pivotDropZonePanel),this.pivotDropZonePanel.setDisplayed(e)),this.setLastVisible())}setResizers(){[this.primaryColsPanel,this.rowGroupDropZonePanel,this.valuesDropZonePanel,this.pivotDropZonePanel].forEach(e=>{if(!e)return;let t=e.getGui();e.toggleResizable(!t.classList.contains("ag-last-column-drop")&&!t.classList.contains("ag-hidden"))})}setLastVisible(){let e=this.getGui();Array.prototype.slice.call(e.querySelectorAll(".ag-column-drop")).forEach(e=>e.classList.remove("ag-last-column-drop"));let t=iB(e.querySelectorAll(".ag-column-drop:not(.ag-hidden)"));t&&t.classList.add("ag-last-column-drop"),this.setResizers()}resetChildrenHeight(){let e=this.getGui().children;for(let t=0;t<e.length;t++){let i=e[t];i.style.removeProperty("height"),i.style.removeProperty("flex")}}isRowGroupingModuleLoaded(){return this.gos.assertModuleRegistered(tL.RowGroupingModule,"Row Grouping")}expandColumnGroups(e){this.primaryColsPanel.expandGroups(e)}collapseColumnGroups(e){this.primaryColsPanel.collapseGroups(e)}setColumnLayout(e){this.primaryColsPanel.setColumnLayout(e)}syncLayoutWithGrid(){this.primaryColsPanel.syncLayoutWithGrid()}destroyChildren(){this.childDestroyFuncs.forEach(e=>e()),this.childDestroyFuncs.length=0,sL(this.getGui())}refresh(e){return this.destroyChildren(),this.init(e),!0}getState(){return{expandedGroupIds:this.primaryColsPanel.getExpandedGroups()}}destroy(){this.destroyChildren(),super.destroy()}},PX=class extends i2{constructor(){super(...arguments),this.beanName="modelItemUtils"}wireBeans(e){this.aggFuncService=e.aggFuncService,this.columnModel=e.columnModel,this.columnApplyStateService=e.columnApplyStateService}selectAllChildren(e,t,i){let r=this.extractAllLeafColumns(e);this.setAllColumns(r,t,i)}setColumn(e,t,i){this.setAllColumns([e],t,i)}setAllColumns(e,t,i){this.columnModel.isPivotMode()?this.setAllPivot(e,t,i):this.setAllVisible(e,t,i)}extractAllLeafColumns(e){let t=[],i=e=>{e.forEach(e=>{e.isPassesFilter()&&(e.isGroup()?i(e.getChildren()):t.push(e.getColumn()))})};return i(e),t}setAllVisible(e,t,i){let r=[];e.forEach(e=>{e.getColDef().lockVisible||e.isVisible()==t||r.push({colId:e.getId(),hide:!t})}),r.length>0&&this.columnApplyStateService.applyColumnState({state:r},i)}setAllPivot(e,t,i){this.setAllPivotActive(e,t,i)}setAllPivotActive(e,t,i){let r=[];e.forEach(t?e=>{if(!e.isAnyFunctionActive()){if(e.isAllowValue()){let t="string"==typeof e.getAggFunc()?e.getAggFunc():this.aggFuncService?.getDefaultAggFunc(e);r.push({colId:e.getId(),aggFunc:t})}else e.isAllowRowGroup()?r.push({colId:e.getId(),rowGroup:!0}):e.isAllowPivot()&&r.push({colId:e.getId(),pivot:!0})}}:e=>{(e.isPivotActive()||e.isRowGroupActive()||e.isValueActive())&&r.push({colId:e.getId(),pivot:!1,rowGroup:!1,aggFunc:null})}),r.length>0&&this.columnApplyStateService.applyColumnState({state:r},i)}updateColumns(e){let{columns:t,visibleState:i,pivotState:r,eventType:s}=e,a=t.map(e=>{let t=e.getColId();if(!this.columnModel.isPivotMode())return{colId:t,hide:!i?.[t]};{let e=r?.[t];return{colId:t,pivot:e?.pivot,rowGroup:e?.rowGroup,aggFunc:e?.aggFunc}}});this.columnApplyStateService.applyColumnState({state:a},s)}createPivotState(e){return{pivot:e.isPivotActive(),rowGroup:e.isRowGroupActive(),aggFunc:e.isValueActive()?e.getAggFunc():void 0}}},PQ={version:"32.2.0",moduleName:tL.ColumnsToolPanelModule,beans:[PX],userComponents:[{name:"agColumnsToolPanel",classImp:Pq},{name:"agMenuItem",classImp:Iq}],dependantModules:[IX,Pw,Pz]},PJ={0:1,"0.00":2,"#,##0":3,"#,##0.00":4,"0%":9,"0.00%":10,"0.00E+00":11,"# ?/?":12,"# ??/??":13,"mm-dd-yy":14,"d-mmm-yy":15,"d-mmm":16,"mmm-yy":17,"h:mm AM/PM":18,"h:mm:ss AM/PM":19,"h:mm":20,"h:mm:ss":21,"m/d/yy h:mm":22,"#,##0 ;(#,##0)":37,"#,##0 ;[Red](#,##0)":38,"#,##0.00;(#,##0.00)":39,"#,##0.00;[Red](#,##0.00)":40,"mm:ss":45,"[h]:mm:ss":46,"mmss.0":47,"##0.0E+0":48,"@":49},P0=e=>Math.round(96*e/72),P1=e=>Math.ceil(9525*e),P2=e=>{if(void 0!==e)return Math.max(["Automatic","Roman","Swiss","Modern","Script","Decorative"].indexOf(e||"Automatic"),0)},P3=(e,t)=>{if(t)return"number"==typeof t?t:t({rowIndex:e})},P4=(e,t)=>{let{colSpan:i,column:r}=e.position;if(e.width){if(i){let s=t.slice(r-1,r+i-1),a=0;for(let t=0;t<s.length;t++){let i=s[t].getActualWidth();if(e.width<a+i){e.position.colSpan=t+1,e.totalWidth=e.width,e.width=e.totalWidth-a;break}a+=i}}else e.totalWidth=e.width}},P6=(e,t)=>{let{rowSpan:i,row:r}=e.position;if(e.height){if(i){let s=0,a=0;for(let o=r;o<r+i;o++){let i=P0(P3(o,t)||20);if(e.height<s+i){e.position.rowSpan=a+1,e.totalHeight=e.height,e.height=e.totalHeight-s;break}s+=i,a++}}else e.totalHeight=e.height}},P5=(e,t)=>{let i=ch.createHeader({encoding:"UTF-8",standalone:"yes"}),r=ch.createXml(e);return t?r:`${i}${r}`},P8=e=>{let t=String.fromCharCode,i=Math.floor(e/26),r=e%26;return i&&26!==e?r?i<26?t(65+i-1)+t(65+r-1):P8(i)+t(65+r-1):P8(i-1)+"Z":t(65+e-1)},P7=e=>{if(null==e)return null;let t="";for(let i=0;i<e.length;i++){let r=e.charCodeAt(i);if(r>=0&&r<=31&&10!==r){let e=r.toString(16).toUpperCase().padStart(4,"0");t+=`_x${e}_`}else t+=e[i]}return t},P9=e=>{let t=[];for(let i of e.keys()){let e=i.toString(),r={name:"t",textNode:rL(P7(e),!1)};e.trim().length!==e.length&&(r.properties={rawMap:{"xml:space":"preserve"}}),t.push({name:"si",children:[r]})}return t},Fe={getTemplate(e){let{name:t,ContentType:i,Extension:r,PartName:s}=e;return{name:t,properties:{rawMap:{Extension:r,PartName:s,ContentType:i}}}}},Ft={getTemplate(e){let t=Array(e).fill(void 0).map((e,t)=>({name:"Override",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml",PartName:`/xl/worksheets/sheet${t+1}.xml`})),i=NQ.worksheetImages.size,r=NQ.worksheetHeaderFooterImages.size,s=NQ.worksheetDataTables.size,a={};NQ.workbookImageIds.forEach(e=>{a["jpg"===e.type?"jpeg":e.type]=!0});let o=Array(i).fill(void 0).map((e,t)=>({name:"Override",ContentType:"application/vnd.openxmlformats-officedocument.drawing+xml",PartName:`/xl/drawings/drawing${t+1}.xml`})),n=Array(s).fill(void 0).map((e,t)=>({name:"Override",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml",PartName:`/xl/tables/${NQ.getTableNameFromIndex(t)}.xml`})),l=Object.keys(a).map(e=>({name:"Default",ContentType:`image/${e}`,Extension:e}));return r&&l.push({name:"Default",Extension:"vml",ContentType:"application/vnd.openxmlformats-officedocument.vmlDrawing"}),{name:"Types",properties:{rawMap:{xmlns:"http://schemas.openxmlformats.org/package/2006/content-types"}},children:[...l,{name:"Default",Extension:"rels",ContentType:"application/vnd.openxmlformats-package.relationships+xml"},{name:"Default",ContentType:"application/xml",Extension:"xml"},{name:"Override",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml",PartName:"/xl/workbook.xml"},...t,{name:"Override",ContentType:"application/vnd.openxmlformats-officedocument.theme+xml",PartName:"/xl/theme/theme1.xml"},{name:"Override",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml",PartName:"/xl/styles.xml"},{name:"Override",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml",PartName:"/xl/sharedStrings.xml"},...o,...n,{name:"Override",ContentType:"application/vnd.openxmlformats-package.core-properties+xml",PartName:"/docProps/core.xml"}].map(e=>Fe.getTemplate(e))}}},Fi={getTemplate(e){let t=new Date().toJSON();return{name:"cp:coreProperties",properties:{prefixedAttributes:[{prefix:"xmlns:",map:{cp:"http://schemas.openxmlformats.org/package/2006/metadata/core-properties",dc:"http://purl.org/dc/elements/1.1/",dcterms:"http://purl.org/dc/terms/",dcmitype:"http://purl.org/dc/dcmitype/",xsi:"http://www.w3.org/2001/XMLSchema-instance"}}]},children:[{name:"dc:creator",textNode:e},{name:"dc:title",textNode:"Workbook"},{name:"dcterms:created",properties:{rawMap:{"xsi:type":"dcterms:W3CDTF"}},textNode:t},{name:"dcterms:modified",properties:{rawMap:{"xsi:type":"dcterms:W3CDTF"}},textNode:t}]}}},Fr=(e,t)=>({name:`xdr:${e}`,children:[{name:"xdr:col",textNode:t.col.toString()},{name:"xdr:colOff",textNode:t.offsetX.toString()},{name:"xdr:row",textNode:t.row.toString()},{name:"xdr:rowOff",textNode:t.offsetY.toString()}]}),Fs=e=>{let t=[{name:"a:ext",properties:{rawMap:{uri:"{FF2B5EF4-FFF2-40B4-BE49-F238E27FC236}"}},children:[{name:"a16:creationId",properties:{rawMap:{id:"{822E6D20-D7BC-2841-A643-D49A6EF008A2}","xmlns:a16":"http://schemas.microsoft.com/office/drawing/2014/main"}}}]}];switch(e.recolor&&e.recolor.toLowerCase()){case"grayscale":case"sepia":case"washout":t.push({name:"a:ext",properties:{rawMap:{uri:"{C183D7F6-B498-43B3-948B-1728B52AA6E4}"}},children:[{name:"adec:decorative",properties:{rawMap:{val:"0","xmlns:adec":"http://schemas.microsoft.com/office/drawing/2017/decorative"}}}]})}return{name:"a:extLst",children:t}},Fa=(e,t)=>({name:"xdr:nvPicPr",children:[{name:"xdr:cNvPr",properties:{rawMap:{id:t,name:e.id,descr:null!=e.altText?e.altText:void 0}},children:[Fs(e)]},{name:"xdr:cNvPicPr",properties:{rawMap:{preferRelativeResize:"0"}},children:[{name:"a:picLocks"}]}]}),Fo=e=>{if(!e.saturation&&!e.tint)return;let t=[];return e.saturation&&t.push({name:"a:satMod",properties:{rawMap:{val:1e3*e.saturation}}}),e.tint&&t.push({name:"a:tint",properties:{rawMap:{val:1e3*e.tint}}}),t},Fn=(e,t)=>({name:"a:duotone",children:[{name:"a:prstClr",properties:{rawMap:{val:e.color}},children:Fo(e)},{name:"a:srgbClr",properties:{rawMap:{val:t.color}},children:Fo(t)}]}),Fl=(e,t)=>{let i;if(e.transparency&&(i=[{name:"a:alphaModFix",properties:{rawMap:{amt:1e5-Math.round(1e3*Math.min(Math.max(e.transparency,0),100))}}}]),e.recolor)switch(i||(i=[]),e.recolor.toLocaleLowerCase()){case"grayscale":i.push({name:"a:grayscl"});break;case"sepia":i.push(Fn({color:"black"},{color:"D9C3A5",tint:50,saturation:180}));break;case"washout":i.push({name:"a:lum",properties:{rawMap:{bright:"70000",contrast:"-70000"}}})}return{name:"xdr:blipFill",children:[{name:"a:blip",properties:{rawMap:{cstate:"print","r:embed":`rId${t}`,"xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships"}},children:i},{name:"a:stretch",children:[{name:"a:fillRect"}]}]}},Fh=(e,t)=>{let i={name:"a:xfrm",children:[{name:"a:off",properties:{rawMap:{x:0,y:0}}},{name:"a:ext",properties:{rawMap:{cx:t.width,cy:t.height}}}]};if(e.rotation){let t=e.rotation;i.properties={rawMap:{rot:6e4*Math.min(Math.max(t,0),360)}}}return{name:"xdr:spPr",children:[i,{name:"a:prstGeom",properties:{rawMap:{prst:"rect"}},children:[{name:"a:avLst"}]}]}},Fd=e=>{e.fitCell=!!e.fitCell||!e.width||!e.height;let{position:t={},fitCell:i,width:r=0,height:s=0,totalHeight:a,totalWidth:o}=e,{offsetX:n=0,offsetY:l=0,row:h=1,rowSpan:d=1,column:c=1,colSpan:u=1}=t;return{from:{row:h-1,col:c-1,offsetX:P1(n),offsetY:P1(l)},to:{row:h-1+(i?1:d-1),col:c-1+(i?1:u-1),offsetX:P1(r+n),offsetY:P1(s+l)},height:P1(a||s),width:P1(o||r)}},Fc=(e,t,i,r)=>({name:"xdr:pic",children:[Fa(e,t+1),Fl(e,i+1),Fh(e,r)]}),Fu={getTemplate(e){let{sheetIndex:t}=e,i=NQ.worksheetImages.get(t),r=NQ.worksheetImageIds.get(t);return{name:"xdr:wsDr",properties:{rawMap:{"xmlns:a":"http://schemas.openxmlformats.org/drawingml/2006/main","xmlns:xdr":"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing"}},children:i.map((e,t)=>{let i=Fd(e);return{name:"xdr:twoCellAnchor",properties:{rawMap:{editAs:"absolute"}},children:[Fr("from",i.from),Fr("to",i.to),Fc(e,t,r.get(e.id).index,i),{name:"xdr:clientData"}]}})}}},Fp={getTemplate(e){let{Id:t,Type:i,Target:r}=e;return{name:"Relationship",properties:{rawMap:{Id:t,Type:i,Target:r}}}}},Fg={getTemplate:e=>({name:"Relationships",properties:{rawMap:{xmlns:"http://schemas.openxmlformats.org/package/2006/relationships"}},children:e.map(e=>Fp.getTemplate(e))})},Fm=e=>({name:"sst",properties:{rawMap:{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main",count:e.size,uniqueCount:e.size}},children:P9(e)}),Ff=e=>{switch(e){case 1:return"thin";case 2:return"medium";case 3:return"thick";default:return"hair"}},Fv={None:"None",Dot:"Dotted",Dash:"Dashed",Double:"Double",DashDot:"DashDot",DashDotDot:"DashDotDot",SlantDashDot:"SlantDashDot",Continuous:"Continuous"},Fy=["Dashed","DashDot","DashDotDot"],FC={None:"none",Solid:"solid",Gray50:"mediumGray",Gray75:"darkGray",Gray25:"lightGray",HorzStripe:"darkHorizontal",VertStripe:"darkVertical",ReverseDiagStripe:"darkDown",DiagStripe:"darkUp",DiagCross:"darkGrid",ThickDiagCross:"darkTrellis",ThinHorzStripe:"lightHorizontal",ThinVertStripe:"lightVertical",ThinReverseDiagStripe:"lightDown",ThinDiagStripe:"lightUp",ThinHorzCross:"lightGrid",ThinDiagCross:"lightTrellis",Gray125:"gray125",Gray0625:"gray0625"},Fw={Automatic:"general",Left:"left",Center:"center",Right:"right",Fill:"fill",Justify:"justify",CenterAcrossSelection:"centerContinuous",Distributed:"distributed",JustifyDistributed:"justify"},Fb={Automatic:void 0,Top:"top",Bottom:"bottom",Center:"center",Justify:"justify",Distributed:"distributed",JustifyDistributed:"justify"},FS=e=>e?FC[e]||e:"none",Fx=e=>void 0==e?e:("#"===e.charAt(0)&&(e=e.substring(1)),6===e.length?"FF"+e:e),FM=(e,t)=>{if(!e)return"thin";let i=Ff(t);if("Continuous"===e)return i;let r=Fv[e];return"medium"===i&&Fy.some(e=>e===r)?`medium${r}`:`${r.charAt(0).toLowerCase()}${r.substring(1)}`},FE=e=>Fw[e]||"general",FD=e=>Fb[e]||void 0,FI=e=>({name:"color",properties:{rawMap:{rgb:Fx(e||"#000000")}}}),Fk={getTemplate(e){let{left:t,right:i,top:r,bottom:s,diagonal:a}=e,o=t?[FI(t.color)]:void 0,n=i?[FI(i.color)]:void 0,l=r?[FI(r.color)]:void 0,h=s?[FI(s.color)]:void 0,d=a?[FI(a.color)]:void 0;return{name:"border",children:[{name:"left",properties:{rawMap:{style:t&&t.style}},children:o},{name:"right",properties:{rawMap:{style:i&&i.style}},children:n},{name:"top",properties:{rawMap:{style:r&&r.style}},children:l},{name:"bottom",properties:{rawMap:{style:s&&s.style}},children:h},{name:"diagonal",properties:{rawMap:{style:a&&a.style}},children:d}]}}},FT=e=>({name:"borders",properties:{rawMap:{count:e.length}},children:e.map(e=>Fk.getTemplate(e))}),FA=e=>Math.max(["Context","LeftToRight","RightToLeft"].indexOf(e),0),FR={getTemplate(e){let{horizontal:t,indent:i,readingOrder:r,rotate:s,shrinkToFit:a,vertical:o,wrapText:n}=e;return{name:"alignment",properties:{rawMap:{horizontal:t&&FE(t),indent:i,readingOrder:r&&FA(r),textRotation:s,shrinkToFit:a,vertical:o&&FD(o),wrapText:n}}}}},FL={getTemplate(e){let t=!1===e.protected?0:1;return{name:"protection",properties:{rawMap:{hidden:!0===e.hideFormula?1:0,locked:t}}}}},FP={getTemplate(e){let{alignment:t,borderId:i,fillId:r,fontId:s,numFmtId:a,protection:o,quotePrefix:n,xfId:l}=e,h=[];return t&&h.push(FR.getTemplate(t)),o&&h.push(FL.getTemplate(o)),{name:"xf",properties:{rawMap:{applyAlignment:t?1:void 0,applyProtection:o?1:void 0,applyBorder:i?1:void 0,applyFill:r?1:void 0,borderId:i,fillId:r,applyFont:s?1:void 0,fontId:s,applyNumberFormat:a?1:void 0,numFmtId:a,quotePrefix:n?1:void 0,xfId:l}},children:h.length?h:void 0}}},FF=e=>({name:"cellStyleXfs",properties:{rawMap:{count:e.length}},children:e.map(e=>FP.getTemplate(e))}),FN={getTemplate(e){let{builtinId:t,name:i,xfId:r}=e;return{name:"cellStyle",properties:{rawMap:{builtinId:t,name:i,xfId:r}}}}},FO=e=>({name:"cellStyles",properties:{rawMap:{count:e.length}},children:e.map(e=>FN.getTemplate(e))}),FB=e=>({name:"cellXfs",properties:{rawMap:{count:e.length}},children:e.map(e=>FP.getTemplate(e))}),FG={getTemplate(e){let{patternType:t,fgTheme:i,fgTint:r,fgRgb:s,bgRgb:a,bgIndexed:o}=e,n={name:"patternFill",properties:{rawMap:{patternType:t}}};return(i||r||s)&&(n.children=[{name:"fgColor",properties:{rawMap:{theme:i,tint:r,rgb:s}}}]),(o||a)&&(n.children||(n.children=[]),n.children.push({name:"bgColor",properties:{rawMap:{indexed:o,rgb:a}}})),{name:"fill",children:[n]}}},Fz=e=>({name:"fills",properties:{rawMap:{count:e.length}},children:e.map(e=>FG.getTemplate(e))}),F_={getTemplate(e){let{size:t,colorTheme:i,color:r="FF000000",fontName:s="Calibri",family:a,scheme:o,italic:n,bold:l,strikeThrough:h,outline:d,shadow:c,underline:u,verticalAlign:p}=e,g=[{name:"sz",properties:{rawMap:{val:t}}},{name:"color",properties:{rawMap:{theme:i,rgb:r}}},{name:"name",properties:{rawMap:{val:s}}}];return a&&g.push({name:"family",properties:{rawMap:{val:a}}}),o&&g.push({name:"scheme",properties:{rawMap:{val:o}}}),n&&g.push({name:"i"}),l&&g.push({name:"b"}),h&&g.push({name:"strike"}),d&&g.push({name:"outline"}),c&&g.push({name:"shadow"}),u&&g.push({name:"u",properties:{rawMap:{val:u}}}),p&&g.push({name:"vertAlign",properties:{rawMap:{val:p}}}),{name:"font",children:g}}},FV=e=>({name:"fonts",properties:{rawMap:{count:e.length}},children:e.map(e=>F_.getTemplate(e))}),Fj={getTemplate(e){let{formatCode:t,numFmtId:i}=e;return t.length&&(t=function(e){let t=e.split(/(\[[^\]]*\])/);for(let e=0;e<t.length;e++){let i=t[e];i.length&&(i.startsWith("[")||(i=i.replace(/\$/g,'"$"')),t[e]=rL(i))}return t.join("")}(t)),{name:"numFmt",properties:{rawMap:{formatCode:t,numFmtId:i}}}}},FH=e=>({name:"numFmts",properties:{rawMap:{count:e.length}},children:e.map(e=>Fj.getTemplate(e))}),FU=(e,t)=>(-1!==e.indexOf("mixedStyle")&&t>1&&(e+=`_${t}`),e),FW=()=>{ee={base:0},et=[],ei=[{fontName:"Calibri",colorTheme:"1",family:"2",scheme:"minor"}],er=[{patternType:"none"},{patternType:"gray125"}],es=[{left:void 0,right:void 0,top:void 0,bottom:void 0,diagonal:void 0}],ea=[{borderId:0,fillId:0,fontId:0,numFmtId:0}],eo=[{borderId:0,fillId:0,fontId:0,numFmtId:0,xfId:0}],en=[{builtinId:0,name:"Normal",xfId:0}]},F$=e=>{let t=FS(e.pattern),i=Fx(e.color),r=Fx(e.patternColor),s=er.findIndex(e=>{let{patternType:s,fgRgb:a,bgRgb:o}=e;return s==t&&a==i&&o==r});return -1===s&&(s=er.length,er.push({patternType:t,fgRgb:i,bgRgb:r})),s},FY=e=>{if(PJ[e])return PJ[e];let t=et.findIndex(t=>t.formatCode===e);return -1===t?(t=et.length+164,et.push({formatCode:e,numFmtId:t})):t=et[t].numFmtId,t},FK=e=>{let t,i,r,s,a,o,n,l;let{borderBottom:h,borderTop:d,borderLeft:c,borderRight:u}=e;c&&(r=FM(c.lineStyle,c.weight),n=Fx(c.color)),u&&(s=FM(u.lineStyle,u.weight),l=Fx(u.color)),h&&(t=FM(h.lineStyle,h.weight),a=Fx(h.color)),d&&(i=FM(d.lineStyle,d.weight),o=Fx(d.color));let p=es.findIndex(e=>{let{left:h,right:d,top:c,bottom:u}=e;if(!h&&(r||n)||!d&&(s||l)||!c&&(i||o)||!u&&(t||a))return!1;let{style:p,color:g}=h||{},{style:m,color:f}=d||{},{style:v,color:y}=c||{},{style:C,color:w}=u||{};return p==r&&g==n&&m==s&&f==l&&v==i&&y==o&&C==t&&w==a});return -1===p&&(p=es.length,es.push({left:{style:r,color:n},right:{style:s,color:l},top:{style:i,color:o},bottom:{style:t,color:a},diagonal:{style:void 0,color:void 0}})),p},FZ=e=>{let{fontName:t="Calibri",color:i,size:r,bold:s,italic:a,outline:o,shadow:n,strikeThrough:l,underline:h,family:d,verticalAlign:c}=e,u=Fx(i),p=P2(d),g=h?h.toLocaleLowerCase():void 0,m=c?c.toLocaleLowerCase():void 0,f=ei.findIndex(e=>e.fontName==t&&e.color==u&&e.size==r&&e.bold==s&&e.italic==a&&e.outline==o&&e.shadow==n&&e.strikeThrough==l&&e.underline==g&&e.verticalAlign==m&&e.family==p);return -1===f&&(f=ei.length,ei.push({fontName:t,color:u,size:r,bold:s,italic:a,outline:o,shadow:n,strikeThrough:l,underline:g,verticalAlign:m,family:null!=p?p.toString():void 0})),f},Fq=e=>{let{alignment:t,borders:i,font:r,interior:s,numberFormat:a,protection:o,quotePrefix:n}=e,{id:l}=e,h=0,d=0,c=0,u=0;l&&void 0==ee[l=FU(l,el)]&&(s&&(h=F$(s)),i&&(d=FK(i)),r&&(c=FZ(r)),a&&(u=FY(a.format)),ee[l]=eo.length,eo.push({alignment:t,borderId:d||0,fillId:h||0,fontId:c||0,numFmtId:u||0,protection:o,quotePrefix:n,xfId:0}))},FX=(e,t)=>ee[FU(e,t)]||0,FQ=(e,t)=>{1===(el=t)&&FW(),e.forEach(Fq)},FJ={getTemplate(e){let t=FH(et),i=FV(ei.map(t=>({...t,size:null!=t.size?t.size:e}))),r=Fz(er),s=FT(es),a=FF(ea),o=FB(eo),n=FO(en);return FW(),{name:"styleSheet",properties:{rawMap:{"mc:Ignorable":"x14ac x16r2 xr",xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","xmlns:x14ac":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac","xmlns:x16r2":"http://schemas.microsoft.com/office/spreadsheetml/2015/02/main","xmlns:xr":"http://schemas.microsoft.com/office/spreadsheetml/2014/revision"}},children:[t,i,r,s,a,o,n,{name:"tableStyles",properties:{rawMap:{count:0,defaultPivotStyle:"PivotStyleLight16",defaultTableStyle:"TableStyleMedium2"}}}]}}},F0={getTemplate(e,t){let{name:i,columns:r,rowCount:s,displayName:a,headerRowIndex:o,showRowStripes:n,showColumnStripes:l,showFilterButtons:h,highlightFirstColumn:d,highlightLastColumn:c}=e||{};if(!e||!i||!Array.isArray(r)||!r.length||!s)return{name:"table"};let u=r.map((e,t)=>({name:"filterColumn",properties:{rawMap:{colId:t.toString(),hiddenButton:h[t]?0:1}}})),p=o+1,g=(t+1).toString(),m=`A${p}`,f=`${String.fromCharCode(64+r.length)}${p+s}`,v=`${m}:${f}`;return{name:"table",properties:{rawMap:{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"xr xr3","xmlns:xr":"http://schemas.microsoft.com/office/spreadsheetml/2014/revision","xmlns:xr3":"http://schemas.microsoft.com/office/spreadsheetml/2016/revision3",name:i,displayName:t?`${a}_${t+1}`:a,ref:v,totalsRowShown:0,id:g}},children:[{name:"autoFilter",properties:{rawMap:{ref:v}},children:u},{name:"tableColumns",properties:{rawMap:{count:r.length}},children:r.map((e,t)=>({name:"tableColumn",properties:{rawMap:{id:(t+1).toString(),name:e,dataCellStyle:"Normal"}}}))},{name:"tableStyleInfo",properties:{rawMap:{name:"TableStyleLight1",showFirstColumn:d?1:0,showLastColumn:c?1:0,showRowStripes:n?1:0,showColumnStripes:l?1:0}}}]}}},F1=e=>{let[t,i,r,s]=e;return{name:`a:${t}`,children:[{name:`a:${i}`,properties:{rawMap:{val:r,lastClr:s}}}]}},F2=()=>({name:"a:clrScheme",properties:{rawMap:{name:"Office"}},children:[F1(["dk1","sysClr","windowText","000000"]),F1(["lt1","sysClr","window","FFFFFF"]),F1(["dk2","srgbClr","44546A"]),F1(["lt2","srgbClr","E7E6E6"]),F1(["accent1","srgbClr","4472C4"]),F1(["accent2","srgbClr","ED7D31"]),F1(["accent3","srgbClr","A5A5A5"]),F1(["accent4","srgbClr","FFC000"]),F1(["accent5","srgbClr","5B9BD5"]),F1(["accent6","srgbClr","70AD47"]),F1(["hlink","srgbClr","0563C1"]),F1(["folHlink","srgbClr","954F72"])]}),F3=e=>{let[t,i,r,s]=e;return{name:`a:${t}`,properties:{rawMap:{script:r,typeface:i,panose:s}}}},F4=()=>({name:"a:fontScheme",properties:{rawMap:{name:"Office"}},children:[{name:"a:majorFont",children:[F3(["latin","Calibri Light",void 0,"020F0302020204030204"]),F3(["ea",""]),F3(["cs",""]),F3(["font","游ゴシック Light","Jpan"]),F3(["font","맑은 고딕","Hang"]),F3(["font","等线 Light","Hans"]),F3(["font","新細明體","Hant"]),F3(["font","Times New Roman","Arab"]),F3(["font","Times New Roman","Hebr"]),F3(["font","Tahoma","Thai"]),F3(["font","Nyala","Ethi"]),F3(["font","Vrinda","Beng"]),F3(["font","Shruti","Gujr"]),F3(["font","MoolBoran","Khmr"]),F3(["font","Tunga","Knda"]),F3(["font","Raavi","Guru"]),F3(["font","Euphemia","Cans"]),F3(["font","Plantagenet Cherokee","Cher"]),F3(["font","Microsoft Yi Baiti","Yiii"]),F3(["font","Microsoft Himalaya","Tibt"]),F3(["font","MV Boli","Thaa"]),F3(["font","Mangal","Deva"]),F3(["font","Gautami","Telu"]),F3(["font","Latha","Taml"]),F3(["font","Estrangelo Edessa","Syrc"]),F3(["font","Kalinga","Orya"]),F3(["font","Kartika","Mlym"]),F3(["font","DokChampa","Laoo"]),F3(["font","Iskoola Pota","Sinh"]),F3(["font","Mongolian Baiti","Mong"]),F3(["font","Times New Roman","Viet"]),F3(["font","Microsoft Uighur","Uigh"]),F3(["font","Sylfaen","Geor"]),F3(["font","Arial","Armn"]),F3(["font","Leelawadee UI","Bugi"]),F3(["font","Microsoft JhengHei","Bopo"]),F3(["font","Javanese Text","Java"]),F3(["font","Segoe UI","Lisu"]),F3(["font","Myanmar Text","Mymr"]),F3(["font","Ebrima","Nkoo"]),F3(["font","Nirmala UI","Olck"]),F3(["font","Ebrima","Osma"]),F3(["font","Phagspa","Phag"]),F3(["font","Estrangelo Edessa","Syrn"]),F3(["font","Estrangelo Edessa","Syrj"]),F3(["font","Estrangelo Edessa","Syre"]),F3(["font","Nirmala UI","Sora"]),F3(["font","Microsoft Tai Le","Tale"]),F3(["font","Microsoft New Tai Lue","Talu"]),F3(["font","Ebrima","Tfng"])]},{name:"a:minorFont",children:[F3(["latin","Calibri",void 0,"020F0502020204030204"]),F3(["ea",""]),F3(["cs",""]),F3(["font","游ゴシック","Jpan"]),F3(["font","맑은 고딕","Hang"]),F3(["font","等线","Hans"]),F3(["font","新細明體","Hant"]),F3(["font","Arial","Arab"]),F3(["font","Arial","Hebr"]),F3(["font","Tahoma","Thai"]),F3(["font","Nyala","Ethi"]),F3(["font","Vrinda","Beng"]),F3(["font","Shruti","Gujr"]),F3(["font","DaunPenh","Khmr"]),F3(["font","Tunga","Knda"]),F3(["font","Raavi","Guru"]),F3(["font","Euphemia","Cans"]),F3(["font","Plantagenet Cherokee","Cher"]),F3(["font","Microsoft Yi Baiti","Yiii"]),F3(["font","Microsoft Himalaya","Tibt"]),F3(["font","MV Boli","Thaa"]),F3(["font","Mangal","Deva"]),F3(["font","Gautami","Telu"]),F3(["font","Latha","Taml"]),F3(["font","Estrangelo Edessa","Syrc"]),F3(["font","Kalinga","Orya"]),F3(["font","Kartika","Mlym"]),F3(["font","DokChampa","Laoo"]),F3(["font","Iskoola Pota","Sinh"]),F3(["font","Mongolian Baiti","Mong"]),F3(["font","Arial","Viet"]),F3(["font","Microsoft Uighur","Uigh"]),F3(["font","Sylfaen","Geor"]),F3(["font","Arial","Armn"]),F3(["font","Leelawadee UI","Bugi"]),F3(["font","Microsoft JhengHei","Bopo"]),F3(["font","Javanese Text","Java"]),F3(["font","Segoe UI","Lisu"]),F3(["font","Myanmar Text","Mymr"]),F3(["font","Ebrima","Nkoo"]),F3(["font","Nirmala UI","Olck"]),F3(["font","Ebrima","Osma"]),F3(["font","Phagspa","Phag"]),F3(["font","Estrangelo Edessa","Syrn"]),F3(["font","Estrangelo Edessa","Syrj"]),F3(["font","Estrangelo Edessa","Syre"]),F3(["font","Nirmala UI","Sora"]),F3(["font","Microsoft Tai Le","Tale"]),F3(["font","Microsoft New Tai Lue","Talu"]),F3(["font","Ebrima","Tfng"])]}]}),F6=(e,t,i)=>({name:`a:${e}`,properties:{rawMap:{val:t}},children:i}),F5=e=>{let[t,i,r,s,a,o]=e,n=[];return n.push(F6("satMod",r)),s&&n.push(F6("lumMod",s)),a&&n.push(F6("tint",a)),o&&n.push(F6("shade",o)),{name:"a:gs",properties:{rawMap:{pos:t}},children:[{name:"a:schemeClr",properties:{rawMap:{val:i}},children:n}]}},F8=(e,t)=>({name:"a:solidFill",children:[F6("schemeClr",e,t)]}),F7=e=>{let[t,i,r,s,a]=e,[o,n]=a;return{name:"a:gradFill",properties:{rawMap:{rotWithShape:t}},children:[{name:"a:gsLst",children:[F5(i),F5(r),F5(s)]},{name:"a:lin",properties:{rawMap:{ang:o,scaled:n}}}]}},F9=e=>{let[t,i,r,s]=e;return{name:"a:ln",properties:{rawMap:{w:t,cap:i,cmpd:r,algn:s}},children:[F8("phClr"),F6("prstDash","solid"),{name:"a:miter",properties:{rawMap:{lim:"800000"}}}]}},Ne=e=>{let t=[];if(e){let[i,r,s,a,o]=e;t.push({name:"a:outerShdw",properties:{rawMap:{blurRad:i,dist:r,dir:s,algn:a,rotWithShape:o}},children:[F6("srgbClr","000000",[F6("alpha","63000")])]})}return{name:"a:effectStyle",children:[Object.assign({},{name:"a:effectLst"},t.length?{children:t}:{})]}},Nt=()=>({name:"a:fillStyleLst",children:[F8("phClr"),F7(["1",["0","phClr","105000","110000","67000"],["50000","phClr","103000","105000","73000"],["100000","phClr","109000","105000","81000"],["5400000","0"]]),F7(["1",["0","phClr","103000","102000","94000"],["50000","phClr","110000","100000",void 0,"100000"],["100000","phClr","120000","99000",void 0,"78000"],["5400000","0"]])]}),Ni=()=>({name:"a:lnStyleLst",children:[F9(["6350","flat","sng","ctr"]),F9(["12700","flat","sng","ctr"]),F9(["19050","flat","sng","ctr"])]}),Nr=()=>({name:"a:effectStyleLst",children:[Ne(),Ne(),Ne(["57150","19050","5400000","ctr","0"])]}),Ns=()=>({name:"a:bgFillStyleLst",children:[F8("phClr"),F8("phClr",[F6("tint","95000"),F6("satMod","170000")]),F7(["1",["0","phClr","150000","102000","93000","98000"],["50000","phClr","130000","103000","98000","90000"],["100000","phClr","120000",void 0,void 0,"63000"],["5400000","0"]])]}),Na=()=>({name:"a:fmtScheme",properties:{rawMap:{name:"Office"}},children:[Nt(),Ni(),Nr(),Ns()]}),No=()=>({name:"a:themeElements",children:[F2(),F4(),Na()]}),Nn=()=>({name:"a:theme",properties:{prefixedAttributes:[{prefix:"xmlns:",map:{a:"http://schemas.openxmlformats.org/drawingml/2006/main"}}],rawMap:{name:"Office Theme"}},children:[No(),{name:"a:objectDefaults"},{name:"a:extraClrSchemeLst"}]}),Nl=()=>({name:"o:shapelayout",properties:{prefixedAttributes:[{prefix:"v:",map:{ext:"edit"}}]},children:[{name:"o:idmap",properties:{prefixedAttributes:[{prefix:"v:",map:{ext:"edit"}}],rawMap:{data:"1"}}}]}),Nh=()=>({name:"v:stroke",properties:{rawMap:{joinstyle:"miter"}}}),Nd=e=>({name:"v:formulas",children:e.map(e=>({name:"v:f",properties:{rawMap:{eqn:e}}}))}),Nc=()=>({name:"v:path",properties:{prefixedAttributes:[{prefix:"o:",map:{connecttype:"rect",extrusionok:"f"}}],rawMap:{gradientshapeok:"t"}}}),Nu=e=>{let{aspectratio:t,rotation:i}=e||{},r={};return t&&(r.aspectratio="t"),i&&(r.rotation="t"),{name:"o:lock",properties:{prefixedAttributes:[{prefix:"v:",map:{ext:"edit"}}],rawMap:r}}},Np=(e,t)=>{let i;let{recolor:r,brightness:s,contrast:a,id:o}=e;if(r&&(i={},("Washout"===r||"Grayscale"===r)&&(i.gain="19661f",i.blacklevel="22938f"),("Black & White"===r||"Grayscale"===r)&&(i.grayscale="t","Black & White"===r&&(i.bilevel="t"))),!r||"Grayscale"===r){if(i||(i={}),null!=a&&50!==a){let e="1";a>=0&&(a<50?e=String(a/50):a<100?e=String(50/(100-a)):100===a&&(e="2147483647f")),i.gain=e}null!=s&&50!==s&&(i.blacklevel=((s-0)/100*1+-.5).toString())}return{name:"v:imagedata",properties:{prefixedAttributes:[{prefix:"o:",map:{relid:`rId${t}`,title:o}}],rawMap:i}}},Ng=()=>({name:"v:shapetype",properties:{prefixedAttributes:[{prefix:"o:",map:{spt:"75",preferrelative:"t"}}],rawMap:{coordsize:"21600,21600",filled:"f",id:"_x0000_t75",path:"m@4@5l@4@11@9@11@9@5xe",stroked:"f"}},children:[Nh(),Nd(["if lineDrawn pixelLineWidth 0","sum @0 1 0","sum 0 0 @1","prod @2 1 2","prod @3 21600 pixelWidth","prod @3 21600 pixelHeight","sum @0 0 1","prod @6 1 2","prod @7 21600 pixelWidth","sum @8 21600 0","prod @7 21600 pixelHeight","sum @10 21600 0"]),Nc(),Nu({aspectratio:!0})]}),Nm=e=>Math.floor((e??0)*.74999943307122),Nf=(e,t)=>{let{width:i=0,height:r=0,altText:s}=e,a=Nm(i),o=Nm(r);return{name:"v:shape",properties:{rawMap:{id:e.headerFooterPosition,"o:spid":"_x0000_s1025",style:`position: absolute; margin-left: 0; margin-top: 10in; margin-bottom: 0; margin-right: 0; width: ${a}pt; height: ${o}pt; z-index: ${t+1}`,type:"#_x0000_t75",alt:s}},children:[Np(e,t+1),Nu({rotation:!0})]}},Nv={getTemplate(e){let t=NQ.worksheetHeaderFooterImages.get(e.sheetIndex)||[];return{name:"xml",properties:{prefixedAttributes:[{prefix:"xmlns:",map:{v:"urn:schemas-microsoft-com:vml",o:"urn:schemas-microsoft-com:office:office",x:"urn:schemas-microsoft-com:office:excel"}}]},children:[Nl(),Ng(),...t.map((e,t)=>Nf(e,t))]}}},Ny={getTemplate(e,t){let i=(t+1).toString();return{name:"sheet",properties:{rawMap:{name:e,sheetId:i,"r:id":`rId${i}`}}}}},NC=e=>({name:"sheets",children:e.map((e,t)=>Ny.getTemplate(e,t))}),Nw=(e,t)=>({name:"workbook",properties:{prefixedAttributes:[{prefix:"xmlns:",map:{r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships"}}],rawMap:{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main"}},children:[{name:"bookViews",children:[{name:"workbookView",properties:{rawMap:{activeTab:t}}}]},NC(e)]}),Nb=e=>Math.ceil((e-12)/7+1),NS={getTemplate(e){let{min:t,max:i,outlineLevel:r,s,width:a,hidden:o,bestFit:n}=e,l=1,h="0";return a>1&&(l=Nb(a),h="1"),{name:"col",properties:{rawMap:{min:t,max:i,outlineLevel:null!=r?r:void 0,width:l,style:s,hidden:o?"1":"0",bestFit:n?"1":"0",customWidth:h}}}}},Nx={getTemplate:e=>({name:"mergeCell",properties:{rawMap:{ref:e}}})},NM=e=>{let t=e.charAt(0).toLowerCase();return"s"===t?"inlineStr":t},NE={getTemplate(e,t,i){let{ref:r,data:s,styleId:a}=e,{type:o,value:n}=s||{type:"empty",value:null},l=o;"f"===o?l="str":o.charAt(0)===o.charAt(0).toUpperCase()&&(l=NM(o));let h={name:"c",properties:{rawMap:{r:r,t:"empty"===l?void 0:l,s:a?FX(a,i):void 0}}};return"empty"===l?h:Object.assign({},h,{children:"str"===l&&"f"===o?[{name:"f",textNode:rL(P7(n),!1)}]:"inlineStr"===l?[{name:"is",children:[{name:"t",textNode:rL(P7(n),!1)}]}]:[{name:"v",textNode:n}]})}},ND=(e,t)=>{let i=[],r=0;for(let t=0;t<e.length;t++){let s=e[t];s.mergeAcross&&(i.push({pos:t,excelPos:r}),r+=s.mergeAcross),r++}if(i.length)for(let r=i.length-1;r>=0;r--){let s=[],a=e[i[r].pos];for(let e=1;e<=a.mergeAcross;e++)s.push({ref:`${P8(i[r].excelPos+1+e)}${t+1}`,styleId:a.styleId,data:{type:"empty",value:null}});s.length&&e.splice(i[r].pos+1,0,...s)}},NI=e=>e.data?.value!==""||void 0!==e.styleId,Nk={getTemplate(e,t,i){let{collapsed:r,hidden:s,height:a,outlineLevel:o,cells:n=[]}=e;return ND(n,t),{name:"row",properties:{rawMap:{r:t+1,collapsed:r?"1":"0",hidden:s?"1":"0",ht:a,customHeight:null!=a?"1":"0",spans:"1:1",outlineLevel:o||void 0}},children:n.filter(NI).map((e,t)=>NE.getTemplate(e,t,i))}}},NT=(e,t,i)=>{let r=[],s=[];e.forEach((e,i)=>{let a;let o=e.cells,n=0;o.forEach((e,o)=>{let l=o+n+1,h=P8(l),d=i+1;if(e.mergeAcross){let t=P8(o+(n+=e.mergeAcross)+1);r.push(`${h}${d}:${t}${d}`)}t[l-1]||(t[l-1]={});let{collapsibleRanges:c}=e;c&&c.forEach(e=>{s.push([l+e[0],l+e[1]])}),(a=t[l-1]).min=l,a.max=l,e.ref=`${h}${d}`})}),s.sort((e,t)=>e[0]!==t[0]?e[0]-t[0]:t[1]-e[1]);let a=new Map,o=new Map;return s.filter(e=>{let t=e.toString();return!a.get(t)&&(a.set(t,!0),!0)}).forEach(e=>{let r=t.find(t=>t.min==e[0]&&t.max==e[1]),s=o.get(e[0]);t.push({min:e[0],max:e[1],outlineLevel:i?void 0:s||1,width:(r||{width:100}).width}),o.set(e[0],(s||0)+1)}),r},NA=e=>e&&("Portrait"===e||"Landscape"===e)?e.toLocaleLowerCase():"portrait",NR=e=>{if(null==e)return 1;let t=["Letter","Letter Small","Tabloid","Ledger","Legal","Statement","Executive","A3","A4","A4 Small","A5","A6","B4","B5","Folio","Envelope","Envelope DL","Envelope C5","Envelope B5","Envelope C3","Envelope C4","Envelope C6","Envelope Monarch","Japanese Postcard","Japanese Double Postcard"].indexOf(e);return -1===t?1:t+1},NL=e=>(ro({"&[Page]":"&P","&[Pages]":"&N","&[Date]":"&D","&[Time]":"&T","&[Tab]":"&A","&[Path]":"&Z","&[File]":"&F","&[Picture]":"&G"},(t,i)=>{e=e.replace(t,i)}),e),NP=e=>"Center"===e?"C":"Right"===e?"R":"L",NF=(e,t)=>(t&&(e+="&amp;&quot;"+(t.fontName||"Calibri"),t.bold!==t.italic?e+=t.bold?",Bold":",Italic":t.bold?e+=",Bold Italic":e+=",Regular",e+="&quot;",t.size&&(e+=`&amp;${t.size}`),t.strikeThrough&&(e+="&amp;S"),t.underline&&(e+=`&amp;${"Double"===t.underline?"E":"U"}`),t.color&&(e+=`&amp;K${t.color.replace("#","").toUpperCase()}`)),e),NN=(e,t,i)=>e.reduce((e,r,s)=>{let a=NP(r.position),o=NF(`${e}&amp;${a}`,r.font);r.position||(r.position=["Left","Center","Right"][s]);let{image:n}=r;if("&[Picture]"===r.value&&n){let e=`${a}${t}${i}`;NQ.addHeaderFooterImageToMap(n,e)}return`${o}${rL(NL(r.value))}`},""),NO=e=>{let t=[];return["all","first","even"].forEach(i=>{let r=e[i],s="all"===i?"odd":i;if(r)for(let[e,a]of Object.entries(r)){let r=`${e.charAt(0).toUpperCase()}${e.slice(1)}`,o=e[0].toUpperCase();if(a){let e="all"===i?"":i.toUpperCase();t.push({name:`${s}${r}`,properties:{rawMap:{"xml:space":"preserve"}},textNode:NN(a,o,e)})}}}),t},NB=e=>t=>(e.length&&t.children.push({name:"cols",children:e.map(e=>NS.getTemplate(e))}),t),NG=(e,t)=>i=>(e.length&&i.children.push({name:"sheetData",children:e.map((e,i)=>Nk.getTemplate(e,i,t))}),i),Nz=e=>t=>(e.length&&t.children.push({name:"mergeCells",properties:{rawMap:{count:e.length}},children:e.map(e=>Nx.getTemplate(e))}),t),N_=e=>t=>{let{top:i=.75,right:r=.7,bottom:s=.75,left:a=.7,header:o=.3,footer:n=.3}=e;return t.children.push({name:"pageMargins",properties:{rawMap:{bottom:s,footer:n,header:o,left:a,right:r,top:i}}}),t},NV=e=>t=>(e&&t.children.push({name:"pageSetup",properties:{rawMap:{horizontalDpi:0,verticalDpi:0,orientation:NA(e.orientation),paperSize:NR(e.pageSize)}}}),t),Nj=e=>t=>{if(!e)return t;let i=null!=e.first?1:0,r=null!=e.even?1:0;return t.children.push({name:"headerFooter",properties:{rawMap:{differentFirst:i,differentOddEven:r}},children:NO(e)}),t},NH=e=>t=>(e&&t.children.push({name:"tableParts",properties:{rawMap:{count:"1"}},children:[{name:"tablePart",properties:{rawMap:{"r:id":`rId${++t.rIdCounter}`}}}]}),t),NU=e=>t=>{let i=NQ.worksheetImages.get(e);return i?.length&&t.children.push({name:"drawing",properties:{rawMap:{"r:id":`rId${++t.rIdCounter}`}}}),t},NW=e=>t=>(NQ.worksheetHeaderFooterImages.get(e)&&t.children.push({name:"legacyDrawingHF",properties:{rawMap:{"r:id":`rId${++t.rIdCounter}`}}}),t),N$=(e=0,t=0)=>{let i=e>0||t>0;return i?[{name:"pane",properties:{rawMap:{state:i?"frozen":void 0,topLeftCell:i?`${P8(e+1)}${t+1}`:void 0,xSplit:0===e?void 0:e,ySplit:0===t?void 0:t}}}]:void 0},NY=(e=!1,t,i)=>r=>(r.children.push({name:"sheetViews",children:[{name:"sheetView",properties:{rawMap:{rightToLeft:!0===e?"1":"0",workbookViewId:"0"}},children:N$(t,i)}]}),r),NK=()=>e=>(e.children.push({name:"sheetPr",children:[{name:"outlinePr",properties:{rawMap:{summaryBelow:0}}}]}),e),NZ=e=>t=>{let i=e.reduce((e,t)=>t.outlineLevel&&t.outlineLevel>e?t.outlineLevel:e,0);return t.children.push({name:"sheetFormatPr",properties:{rawMap:{baseColWidth:10,defaultRowHeight:16,outlineLevelRow:i||void 0}}}),t},Nq={getTemplate(e){let{worksheet:t,currentSheet:i,config:r}=e,{margins:s={},pageSetup:a,headerFooterConfig:o,suppressColumnOutline:n,rightToLeft:l,frozenRowCount:h,frozenColumnCount:d}=r,{table:c}=t,{rows:u,columns:p}=c,g=p&&p.length?NT(u,p,!!n):[],{worksheetDataTables:m}=NQ,f=m.get(i),{children:v}=tW(NK(),NY(l,d,h),NZ(u),NB(p),NG(u,i+1),Nz(g),N_(s),NV(a),Nj(o),NU(i),NW(i),NH(f))({children:[],rIdCounter:0});return{name:"worksheet",properties:{prefixedAttributes:[{prefix:"xmlns:",map:{r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships"}}],rawMap:{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main"}},children:v}}},NX=class e{static createExcel(e,t,i){this.addSheetName(t),FQ(e,this.sheetNames.length);let r=Object.assign({},i);return i.exportAsExcelTable&&(i.columnModel.isPivotActive()&&(this.showExcelTableNonCompatibleFeaturesWarning("pivot mode"),r.exportAsExcelTable=!1),i.gos.get("masterDetail")&&(this.showExcelTableNonCompatibleFeaturesWarning("master/detail"),r.exportAsExcelTable=!1)),this.processTableConfig(t,r),this.createWorksheet(t,r)}static showExcelTableNonCompatibleFeaturesWarning(e){tO(`Excel table export does not work with ${e}. The exported Excel file will not contain any Excel tables.
Please turn off ${e} to enable Excel table exports.`)}static getTableNameFromIndex(e){return`table${e+1}`}static getSanitizedTableName(e){return e.replace(/^[^a-zA-Z_]+/,"_").replace(/\s/g,"_").replace(/[^a-zA-Z0-9_]/g,"_")}static addTableToSheet(e,t){if(this.worksheetDataTables.has(e)){tO("Unable to add data table to Excel sheet: A table already exists.");return}this.worksheetDataTables.set(e,t)}static processTableConfig(t,i){if(!i.exportAsExcelTable)return;let{name:r,showColumnStripes:s,showRowStripes:a,showFilterButton:o,highlightFirstColumn:n,highlightLastColumn:l}="boolean"==typeof i.exportAsExcelTable?{}:i.exportAsExcelTable,h=this.getSanitizedTableName(r||e.defaultTableDisplayName),d=this.sheetNames.length-1,{table:c}=t,{rows:u,columns:p}=c,g=i.columnModel.getHeaderRowCount(),m=u.length,f=p.length,v=[],y=[];for(let e=0;e<f;e++){let t=p[e];v.push(t.displayName||""),y.push("match"===o||void 0===o?t.filterAllowed??!1:o)}if(!v||!v.length||!m||!h){tO("Unable to add data table to Excel sheet: Missing required parameters.");return}this.addTableToSheet(d,{name:this.getTableNameFromIndex(d),displayName:h,columns:v,showFilterButtons:y,headerRowIndex:g-1,rowCount:m-g,showRowStripes:a??!0,showColumnStripes:s??!1,highlightFirstColumn:n??!1,highlightLastColumn:l??!1})}static addHeaderFooterImageToMap(e,t){let i=this.sheetNames.length-1;e.headerFooterPosition=t,this.buildImageMap({imageToAdd:e,idx:i});let r=this.worksheetHeaderFooterImages.get(i);r||(r=[],this.worksheetHeaderFooterImages.set(i,r)),r.find(t=>t.id===e.id)||r.push(e)}static addBodyImageToMap(e,t,i,r,s){let a=this.sheetNames.length,{row:o,column:n}=e.position||{};r&&(null==t||null==i||o&&n||(e.position||(e.position={}),e.position=Object.assign({},e.position,{row:t,column:r.indexOf(i)+1})),P4(e,r),P6(e,s)),this.buildImageMap({imageToAdd:e,idx:a});let l=this.worksheetImageIds.get(a);l||(l=new Map,this.worksheetImageIds.set(a,l));let h=this.worksheetImages.get(a);h?h.push(e):this.worksheetImages.set(a,[e]),l.get(e.id)||l.set(e.id,{index:l.size,type:e.imageType})}static buildImageMap(e){let{imageToAdd:t,idx:i}=e,r=this.images.get(t.id);if(r){let e=r.find(e=>e.sheetId===i);e?e.image.push(t):r.push({sheetId:i,image:[t]})}else this.images.set(t.id,[{sheetId:i,image:[t]}]),this.workbookImageIds.set(t.id,{type:t.imageType,index:this.workbookImageIds.size})}static addSheetName(e){let t=rL(e.name)||"",i="";for(;-1!==this.sheetNames.indexOf(`${t}${i}`);)if(""===i)i="_1";else{let e=parseInt(i.slice(1),10);i=`_${e+1}`}e.name=`${t}${i}`,this.sheetNames.push(e.name)}static getStringPosition(e){return this.sharedStrings.has(e)?this.sharedStrings.get(e):(this.sharedStrings.set(e,this.sharedStrings.size),this.sharedStrings.size-1)}static resetFactory(){this.sharedStrings=new Map,this.images=new Map,this.worksheetImages=new Map,this.worksheetHeaderFooterImages=new Map,this.workbookImageIds=new Map,this.worksheetImageIds=new Map,this.worksheetDataTables=new Map,this.sheetNames=[],this.factoryMode=aK.SINGLE_SHEET}static createWorkbook(e){return P5(Nw(this.sheetNames,e))}static createStylesheet(e){return P5(FJ.getTemplate(e))}static createSharedStrings(){return P5(Fm(this.sharedStrings))}static createCore(e){return P5(Fi.getTemplate(e))}static createContentTypes(e){return P5(Ft.getTemplate(e))}static createRels(){return P5(Fg.getTemplate([{Id:"rId1",Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",Target:"xl/workbook.xml"},{Id:"rId2",Type:"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",Target:"docProps/core.xml"}]))}static createTheme(){return P5(Nn())}static createTable(e,t){return P5(F0.getTemplate(e,t))}static createWorkbookRels(e){let t=Array(e).fill(void 0).map((e,t)=>({Id:`rId${t+1}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet",Target:`worksheets/sheet${t+1}.xml`}));return P5(Fg.getTemplate([...t,{Id:`rId${e+1}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",Target:"theme/theme1.xml"},{Id:`rId${e+2}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",Target:"styles.xml"},{Id:`rId${e+3}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",Target:"sharedStrings.xml"}]))}static createDrawing(e){return P5(Fu.getTemplate({sheetIndex:e}))}static createDrawingRel(e){let t=this.worksheetImageIds.get(e)||[],i=[];for(let[e,r]of t)i.push({Id:`rId${r.index+1}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",Target:`../media/image${this.workbookImageIds.get(e).index+1}.${r.type}`});return P5(Fg.getTemplate(i))}static createVmlDrawing(e){return P5(Nv.getTemplate({sheetIndex:e}),!0)}static createVmlDrawingRel(e){let t=this.worksheetHeaderFooterImages.get(e)||[],i=[];for(let e=0;e<t.length;e++){let r=t[e],s=this.workbookImageIds.get(r.id);if(!s)continue;let{index:a,type:o}=s,n="jpg"===o?"jpeg":o;i.push({Id:`rId${e+1}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",Target:`../media/image${a+1}.${n}`})}return P5(Fg.getTemplate(i))}static createRelationships({drawingIndex:e,vmlDrawingIndex:t,tableIndex:i}={}){if(void 0===e&&void 0===t&&void 0===i)return"";let r=[];return null!=e&&r.push({Id:`rId${r.length+1}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",Target:`../drawings/drawing${e+1}.xml`}),null!=t&&r.push({Id:`rId${r.length+1}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing",Target:`../drawings/vmlDrawing${t+1}.vml`}),null!=i&&r.push({Id:`rId${r.length+1}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/table",Target:`../tables/${this.getTableNameFromIndex(i)}.xml`}),P5(Fg.getTemplate(r))}static createWorksheet(e,t){return P5(Nq.getTemplate({worksheet:e,currentSheet:this.sheetNames.length-1,config:t}))}};NX.sharedStrings=new Map,NX.sheetNames=[],NX.images=new Map,NX.worksheetImages=new Map,NX.worksheetHeaderFooterImages=new Map,NX.workbookImageIds=new Map,NX.worksheetImageIds=new Map,NX.worksheetDataTables=new Map,NX.defaultTableDisplayName="AG-GRID-TABLE",NX.factoryMode=aK.SINGLE_SHEET;var NQ=NX,NJ=class extends d9{constructor(e){super(e),this.mixedStyles={},this.mixedStyleCounter=0,this.rows=[],this.frozenRowCount=0,this.skipFrozenRows=!1,this.frozenColumnCount=0,this.skipFrozenColumns=!1,this.config=Object.assign({},e),this.stylesByIds={},this.config.baseExcelStyles.forEach(e=>{this.stylesByIds[e.id]=e}),this.excelStyles=[...this.config.baseExcelStyles,{id:"_quotePrefix",quotePrefix:1}]}addCustomContent(e){e.forEach(e=>{let t;let i=this.rows.length+1;this.config.suppressRowOutline||null==e.outlineLevel||(t=e.outlineLevel);let r={height:P3(i,e.height||this.config.rowHeight),cells:(e.cells||[]).map((e,t)=>{let r=this.addImage(i,this.columnsToExport[t],e.data?.value),s=null;e.styleId&&(s="string"==typeof e.styleId?[e.styleId]:e.styleId);let a=this.getStyleId(s);if(r)return this.createCell(a,this.getDataTypeForValue(r.value),null==r.value?"":r.value);let o=e.data?.value??"",n=this.getDataTypeForValue(o);return e.mergeAcross?this.createMergedCell(a,n,o,e.mergeAcross):this.createCell(a,n,o)}),outlineLevel:t};null!=e.collapsed&&(r.collapsed=e.collapsed),null!=e.hidden&&(r.hidden=e.hidden),this.rows.push(r)})}onNewHeaderGroupingRow(){let e=[],{freezeRows:t,headerRowHeight:i}=this.config;return this.rows.push({cells:e,height:P3(this.rows.length+1,i)}),t&&this.frozenRowCount++,{onColumn:(t,i,r,s,a)=>{let o=this.config.styleLinker({rowType:cr.HEADER_GROUPING,rowIndex:1,value:`grouping-${i}`,columnGroup:t});e.push({...this.createMergedCell(this.getStyleId(o),this.getDataTypeForValue("string"),i,s),collapsibleRanges:a})}}}onNewHeaderRow(){let{freezeRows:e,headerRowHeight:t}=this.config;return e&&this.frozenRowCount++,this.onNewRow(this.onNewHeaderColumn,t)}onNewBodyRow(e){let{freezeRows:t,rowHeight:i}=this.config;!this.skipFrozenRows&&("headersAndPinnedRows"===t&&e?.rowPinned==="top"?this.frozenRowCount++:"function"==typeof t&&t({...this.gos.getGridCommonParams(),node:e})?this.frozenRowCount++:this.skipFrozenRows=!0);let r=this.onNewRow(this.onNewBodyColumn,i);return e&&this.addRowOutlineIfNecessary(e),r}prepare(e){super.prepare(e),this.columnsToExport=[...e],this.cols=e.map((e,t)=>this.convertColumnToExcel(e,t))}parse(){let e;let t=this.rows.reduce((e,t)=>Math.max(e,t.cells.length),0);for(;this.cols.length<t;)this.cols.push(this.convertColumnToExcel(null,this.cols.length+1));let{config:i}=this;if(null!=i.sheetName){let{sheetName:t}=i;e=String("function"==typeof t?t(this.gos.getGridCommonParams()):t).substring(0,31)}else e="ag-grid";let r={name:e,table:{columns:this.cols,rows:this.rows}};return this.createExcel(r)}addRowOutlineIfNecessary(e){let{gos:t,suppressRowOutline:i,rowGroupExpandState:r="expanded"}=this.config;if(t.get("groupHideOpenParents")||i||null==e.level)return;let s=e.footer?1:0,a=iB(this.rows);if(a.outlineLevel=e.level+s,"expanded"===r)return;let o="collapsed"===r;if(e.isExpandable()){let t=!o&&e.expanded;a.collapsed=!t}a.hidden=!!e.parent&&-1!==e.parent.level&&(o||this.isAnyParentCollapsed(e.parent))}isAnyParentCollapsed(e){for(;e&&-1!==e.level;){if(!e.expanded)return!0;e=e.parent}return!1}convertColumnToExcel(e,t){let i=this.config.columnWidth,r=(e?this.extractHeaderValue(e):void 0)??"",s=!!e&&e.isFilterAllowed();return i?"number"==typeof i?{width:i,displayName:r,filterAllowed:s}:{width:i({column:e,index:t}),displayName:r,filterAllowed:s}:e?{width:Math.max(e.getActualWidth(),75),displayName:r,filterAllowed:s}:{displayName:r,filterAllowed:s}}onNewHeaderColumn(e,t){return i=>{let r=this.extractHeaderValue(i),s=this.config.styleLinker({rowType:cr.HEADER,rowIndex:e,value:r,column:i});t.push(this.createCell(this.getStyleId(s),this.getDataTypeForValue("string"),r))}}onNewBodyColumn(e,t){let i=0,{freezeColumns:r,rightToLeft:s}=this.config;return(a,o,n)=>{if(i>0){i-=1;return}if(!this.skipFrozenColumns){let e=a.getPinned();"pinned"===r&&e&&(!0===e||"left"===e)!==s?this.frozenColumnCount++:"function"==typeof r&&r({...this.gos.getGridCommonParams(),column:a})?this.frozenColumnCount++:this.skipFrozenColumns=!0}let{value:l,valueFormatted:h}=this.extractRowCellValue(a,o,e,"excel",n),d=this.config.styleLinker({rowType:cr.BODY,rowIndex:e,value:l,column:a,node:n}),c=this.getStyleId(d),u=a.getColSpan(n),p=this.addImage(e,a,l);p?t.push(this.createCell(c,this.getDataTypeForValue(p.value),null==p.value?"":p.value)):u>1?(i=u-1,t.push(this.createMergedCell(c,this.getDataTypeForValue(l),l,u-1))):t.push(this.createCell(c,this.getDataTypeForValue(l),l,h))}}onNewRow(e,t){let i=[];return this.rows.push({cells:i,height:P3(this.rows.length+1,t)}),{onColumn:e.bind(this,this.rows.length,i)()}}createExcel(e){let{excelStyles:t,config:i}=this;return this.frozenColumnCount&&(i.frozenColumnCount=this.frozenColumnCount),this.frozenRowCount&&(i.frozenRowCount=this.frozenRowCount),NQ.createExcel(t,e,i)}getDataTypeForValue(e){return void 0===e?"empty":this.isNumerical(e)?"n":"s"}getTypeFromStyle(e,t){if(this.isFormula(t))return"f";if(e&&e.dataType)switch(e.dataType.toLocaleLowerCase()){case"formula":return"f";case"string":return"s";case"number":return"n";case"datetime":return"d";case"error":return"e";case"boolean":return"b";default:tO(`Unrecognized data type for excel export [${e.id}.dataType=${e.dataType}]`)}return null}addImage(e,t,i){if(!this.config.addImageToCell)return;let r=this.config.addImageToCell(e,t,i);if(r)return NQ.addBodyImageToMap(r.image,e,t,this.columnsToExport,this.config.rowHeight),r}createCell(e,t,i,r){let s=this.getStyleById(e);!s?.dataType&&"s"===t&&r&&(i=r);let a=this.getTypeFromStyle(s,i)||t,{value:o,escaped:n}=this.getCellValue(a,i),l=[];return s&&l.push(e),n&&l.push("_quotePrefix"),{styleId:e=this.getStyleId(l)||void 0,data:{type:a,value:o}}}createMergedCell(e,t,i,r){return{styleId:this.getStyleById(e)?e:void 0,data:{type:t,value:"s"===t?NQ.getStringPosition(null==i?"":i).toString():i},mergeAcross:r}}getCellValue(e,t){let i=!1;if(null==t||"s"===e&&""===t)return{value:"",escaped:!1};if("s"===e)t&&"'"===t[0]&&(i=!0,t=t.slice(1)),t=NQ.getStringPosition(t).toString();else if("f"===e)t=t.slice(1);else if("n"===e){let e=Number(t);isNaN(e)?t="":""!==t&&(t=e.toString())}return{value:t,escaped:i}}getStyleId(e){if(!e||!e.length)return null;if(1===e.length)return e[0];let t=e.join("-");return this.mixedStyles[t]||this.addNewMixedStyle(e),this.mixedStyles[t].excelID}deepCloneObject(e){return JSON.parse(JSON.stringify(e))}addNewMixedStyle(e){this.mixedStyleCounter+=1;let t=`mixedStyle${this.mixedStyleCounter}`,i={};for(let t of e)for(let e of this.excelStyles)e.id===t&&rd(i,this.deepCloneObject(e));i.id=t,i.name=t;let r=e.join("-");this.mixedStyles[r]={excelID:t,key:r,result:i},this.excelStyles.push(i),this.stylesByIds[t]=i}isFormula(e){return null!=e&&this.config.autoConvertFormulas&&e.toString().startsWith("=")}isNumerical(e){return"bigint"==typeof e||isFinite(e)&&""!==e&&!isNaN(parseFloat(e))}getStyleById(e){return null==e?null:this.stylesByIds[e]||null}},N0=()=>{cx.addFolders(["_rels/","docProps/","xl/","xl/theme/","xl/_rels/","xl/worksheets/"]);let{images:e}=NQ;if(!e.size)return;cx.addFolders(["xl/worksheets/_rels","xl/drawings/","xl/drawings/_rels","xl/media/"]);let t=0;e.forEach(e=>{let{base64:i,imageType:r}=e[0].image[0];cx.addFile(`xl/media/image${++t}.${"jpg"===r?"jpeg":r}`,i,!0)})},N1=e=>{let t=0,i=0,r=0,{images:s,worksheetDataTables:a,worksheetImages:o,worksheetHeaderFooterImages:n}=NQ;for(let l=0;l<e.length;l++){let h,d,c;let u=e[l];cx.addFile(`xl/worksheets/sheet${l+1}.xml`,u,!1);let p=s.size>0&&o.has(l),g=a.size>0&&a.has(l),m=s.size&&n.has(l);if(!p&&!g&&!m)continue;p&&(N2(l,t),d=t,t++),m&&(N3(l,i),c=i,i++),g&&(h=r++);let f=`xl/worksheets/_rels/sheet${l+1}.xml.rels`;cx.addFile(f,NQ.createRelationships({tableIndex:h,drawingIndex:d,vmlDrawingIndex:c}))}},N2=(e,t)=>{let i="xl/drawings",r=`${i}/drawing${t+1}.xml`,s=`${i}/_rels/drawing${t+1}.xml.rels`;cx.addFile(s,NQ.createDrawingRel(e)),cx.addFile(r,NQ.createDrawing(e))},N3=(e,t)=>{let i="xl/drawings",r=`${i}/vmlDrawing${t+1}.vml`,s=`${i}/_rels/vmlDrawing${t+1}.vml.rels`;cx.addFile(r,NQ.createVmlDrawing(e)),cx.addFile(s,NQ.createVmlDrawingRel(e))},N4=()=>{let{worksheetDataTables:e}=NQ,t=Array.from(e.keys());for(let i=0;i<t.length;i++){let r=t[i],s=e.get(r);s&&cx.addFile(`xl/tables/${s.name}.xml`,NQ.createTable(s,i))}},N6=(e,t,i,r)=>{cx.addFile("xl/workbook.xml",NQ.createWorkbook(r)),cx.addFile("xl/styles.xml",NQ.createStylesheet(e)),cx.addFile("xl/sharedStrings.xml",NQ.createSharedStrings()),cx.addFile("xl/theme/theme1.xml",NQ.createTheme()),cx.addFile("xl/_rels/workbook.xml.rels",NQ.createWorkbookRels(i)),cx.addFile("docProps/core.xml",NQ.createCore(t)),cx.addFile("[Content_Types].xml",NQ.createContentTypes(i)),cx.addFile("_rels/.rels",NQ.createRels())},N5=(e,t={})=>{if(!e||0===e.length)return tO("Invalid params supplied to createExcelFileForExcel() - `ExcelExportParams.data` is empty."),NQ.resetFactory(),!1;let{fontSize:i=11,author:r="AG Grid",activeTab:s=0}=t,a=e.length,o=Math.max(Math.min(s,a-1),0);return N0(),N4(),N1(e),N6(i,r,a,o),NQ.resetFactory(),!0},N8=e=>{let{data:t,fontSize:i,author:r,activeSheetIndex:s}=e,a=e.mimeType||"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";return N5(t,{author:r,fontSize:i,activeTab:s})?cx.getZipFile(a):Promise.resolve(void 0)},N7=e=>{let{data:t,fontSize:i,author:r,activeSheetIndex:s}=e,a=e.mimeType||"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";if(N5(t,{author:r,fontSize:i,activeTab:s}))return cx.getUncompressedZipFile(a)},N9=e=>{let{fileName:t="export.xlsx"}=e;N8(e).then(e=>{if(e){let i="function"==typeof t?t():t;ce.download(i,e)}})},Oe=class extends d7{constructor(){super(...arguments),this.beanName="excelCreator"}wireBeans(e){this.columnModel=e.columnModel,this.columnNameService=e.columnNameService,this.funcColsService=e.funcColsService,this.valueService=e.valueService,this.stylingService=e.stylingService,this.gridSerializer=e.gridSerializer,this.gos=e.gos}postConstruct(){this.setBeans({gridSerializer:this.gridSerializer,gos:this.gos})}getMergedParams(e){return Object.assign({},this.gos.get("defaultExcelExportParams"),e)}export(e){if(this.isExportSuppressed()){tO("Export cancelled. Export is not allowed as per your configuration.");return}let t=this.getMergedParams(e),i={data:[this.getData(t)],fontSize:t.fontSize,author:t.author,mimeType:t.mimeType};this.packageCompressedFile(i).then(e=>{if(e){let{fileName:i}=t,r="function"==typeof i?i(this.gos.getGridCommonParams()):i;ce.download(this.getFileName(r),e)}})}exportDataAsExcel(e){this.export(e)}getDataAsExcel(e){let t=this.getMergedParams(e),i={data:[this.getData(t)],fontSize:t.fontSize,author:t.author,mimeType:t.mimeType};return this.packageFile(i)}setFactoryMode(e){NQ.factoryMode=e}getFactoryMode(){return NQ.factoryMode}getSheetDataForExcel(e){let t=this.getMergedParams(e);return this.getData(t)}getMultipleSheetsAsExcel(e){return N7(e)}exportMultipleSheetsAsExcel(e){N9(e)}getDefaultFileExtension(){return"xlsx"}createSerializingSession(e){let{columnModel:t,columnNameService:i,funcColsService:r,valueService:s,gos:a}=this;return new NJ({...e,columnModel:t,columnNameService:i,funcColsService:r,valueService:s,gos:a,suppressRowOutline:e.suppressRowOutline||e.skipRowGroups,headerRowHeight:e.headerRowHeight||e.rowHeight,baseExcelStyles:this.gos.get("excelStyles")||[],rightToLeft:e.rightToLeft??this.gos.get("enableRtl"),styleLinker:this.styleLinker.bind(this)})}styleLinker(e){let{rowType:t,rowIndex:i,value:r,column:s,columnGroup:a,node:o}=e,n=t===cr.HEADER,l=t===cr.HEADER_GROUPING,h=n?s:a,d=[];if(n||l)return d.push("header"),l&&d.push("headerGroup"),h&&(d=d.concat(oY(h.getDefinition(),this.gos,s||null,a||null))),d;let c=this.gos.get("excelStyles"),u=["cell"];if(!c||!c.length)return u;let p=c.map(e=>e.id),g=s.getDefinition();return this.stylingService.processAllCellClasses(g,this.gos.addGridCommonParams({value:r,data:o.data,node:o,colDef:g,column:s,rowIndex:i}),e=>{p.indexOf(e)>-1&&u.push(e)}),u.sort((e,t)=>p.indexOf(e)<p.indexOf(t)?-1:1)}isExportSuppressed(){return this.gos.get("suppressExcelExport")}packageCompressedFile(e){return N8(e)}packageFile(e){return N7(e)}};function Ot(e){return e.excelCreator?.getFactoryMode()!==aK.MULTI_SHEET||(tO("The Excel Exporter is currently on Multi Sheet mode. End that operation by calling 'api.getMultipleSheetAsExcel()' or 'api.exportMultipleSheetsAsExcel()'"),!1)}var Oi="32.2.0",Or={version:Oi,moduleName:`${tL.ExcelExportModule}-core`,beans:[Oe],dependantModules:[co,IX]},Os={version:Oi,moduleName:`${tL.ExcelExportModule}-api`,apiFunctions:{getDataAsExcel:function(e,t){if(Ot(e))return e.excelCreator?.getDataAsExcel(t)},exportDataAsExcel:function(e,t){Ot(e)&&e.excelCreator?.exportDataAsExcel(t)},getSheetDataForExcel:function(e,t){return e.excelCreator?.setFactoryMode(aK.MULTI_SHEET),e.excelCreator?.getSheetDataForExcel(t)},getMultipleSheetsAsExcel:function(e,t){return e.excelCreator?.getMultipleSheetsAsExcel(t)},exportMultipleSheetsAsExcel:function(e,t){e.excelCreator?.exportMultipleSheetsAsExcel(t)}},dependantModules:[Or]},Oa={version:Oi,moduleName:tL.ExcelExportModule,dependantModules:[Or,Os]},Oo={selector:"AG-FILTERS-TOOL-PANEL-HEADER",component:class extends sQ{constructor(){super(...arguments),this.eExpand=null,this.eFilterTextField=null}wireBeans(e){this.columnModel=e.columnModel}postConstruct(){this.setTemplate(`<div class="ag-filter-toolpanel-search" role="presentation">
                <div data-ref="eExpand" class="ag-filter-toolpanel-expand"></div>
                <ag-input-text-field data-ref="eFilterTextField" class="ag-filter-toolpanel-search-input"></ag-input-text-field>
            </div>`,[ob]);let e=this.localeService.getLocaleTextFunc();this.eFilterTextField.setAutoComplete(!1).setInputAriaLabel(e("ariaFilterColumnsInput","Filter Columns Input")).onValueChange(this.onSearchTextChanged.bind(this)),this.createExpandIcons(),this.setExpandState(0),this.addManagedElementListeners(this.eExpand,{click:this.onExpandClicked.bind(this)}),this.addManagedEventListeners({newColumnsLoaded:this.showOrHideOptions.bind(this)})}init(e){this.params=e,this.columnModel.isReady()&&this.showOrHideOptions()}createExpandIcons(){this.eExpand.appendChild(this.eExpandChecked=s2("columnSelectOpen",this.gos)),this.eExpand.appendChild(this.eExpandUnchecked=s2("columnSelectClosed",this.gos)),this.eExpand.appendChild(this.eExpandIndeterminate=s2("columnSelectIndeterminate",this.gos))}showOrHideOptions(){let e=!this.params.suppressFilterSearch,t=!this.params.suppressExpandAll,i=this.localeService.getLocaleTextFunc();this.eFilterTextField.setInputPlaceholder(i("searchOoo","Search..."));let r=this.columnModel.getCols().some(e=>e.getOriginalParent()&&e.isFilterAllowed());sC(this.eFilterTextField.getGui(),e),sC(this.eExpand,t&&r)}onSearchTextChanged(){this.onSearchTextChangedDebounced||(this.onSearchTextChangedDebounced=tj(()=>{this.dispatchLocalEvent({type:"searchChanged",searchText:this.eFilterTextField.getValue()})},300)),this.onSearchTextChangedDebounced()}onExpandClicked(){let e=0===this.currentExpandState?{type:"collapseAll"}:{type:"expandAll"};this.dispatchLocalEvent(e)}setExpandState(e){this.currentExpandState=e,sC(this.eExpandChecked,0===this.currentExpandState),sC(this.eExpandUnchecked,1===this.currentExpandState),sC(this.eExpandIndeterminate,2===this.currentExpandState)}}},On=class extends sQ{constructor(e,t){super(`
            <div class="ag-filter-toolpanel-instance">
                <div class="ag-filter-toolpanel-header ag-filter-toolpanel-instance-header" data-ref="eFilterToolPanelHeader" role="button" aria-expanded="false">
                    <div data-ref="eExpand" class="ag-filter-toolpanel-expand"></div>
                    <span data-ref="eFilterName" class="ag-header-cell-text"></span>
                    <span data-ref="eFilterIcon" class="ag-header-icon ag-filter-icon ag-filter-toolpanel-instance-header-icon" aria-hidden="true"></span>
                </div>
                <div class="ag-filter-toolpanel-instance-body ag-filter" data-ref="agFilterToolPanelBody"></div>
            </div>`),this.expandedCallback=t,this.eFilterToolPanelHeader=null,this.eFilterName=null,this.agFilterToolPanelBody=null,this.eFilterIcon=null,this.eExpand=null,this.expanded=!1,this.hideHeader=e}wireBeans(e){this.filterManager=e.filterManager,this.columnNameService=e.columnNameService}postConstruct(){this.eExpandChecked=s2("columnSelectOpen",this.gos),this.eExpandUnchecked=s2("columnSelectClosed",this.gos),this.eExpand.appendChild(this.eExpandChecked),this.eExpand.appendChild(this.eExpandUnchecked)}setColumn(e){this.column=e,this.eFilterName.innerText=this.columnNameService.getDisplayNameForColumn(this.column,"filterToolPanel",!1)||"",this.addManagedListeners(this.eFilterToolPanelHeader,{click:this.toggleExpanded.bind(this),keydown:this.onKeyDown.bind(this)}),this.addManagedEventListeners({filterOpened:this.onFilterOpened.bind(this)}),this.addInIcon("filter",this.eFilterIcon,this.column),sC(this.eFilterIcon,this.isFilterActive(),{skipAriaHidden:!0}),sC(this.eExpandChecked,!1),this.hideHeader?(sC(this.eFilterToolPanelHeader,!1),this.eFilterToolPanelHeader.removeAttribute("tabindex")):this.eFilterToolPanelHeader.setAttribute("tabindex","0"),this.addManagedListeners(this.column,{filterChanged:this.onFilterChanged.bind(this)})}onKeyDown(e){let{key:t}=e,{ENTER:i,SPACE:r,LEFT:s,RIGHT:a}=aa;(t===i||t===r||t===s||t===a)&&(e.preventDefault(),t===i||t===r?this.toggleExpanded():t===aa.LEFT?this.collapse():this.expand())}getColumn(){return this.column}getColumnFilterName(){return this.columnNameService.getDisplayNameForColumn(this.column,"filterToolPanel",!1)}addCssClassToTitleBar(e){this.eFilterToolPanelHeader.classList.add(e)}addInIcon(e,t,i){if(null==t)return;let r=s2(e,this.gos,i);t.appendChild(r)}isFilterActive(){return!!this.filterManager?.isFilterActive(this.column)}onFilterChanged(){sC(this.eFilterIcon,this.isFilterActive(),{skipAriaHidden:!0}),this.dispatchLocalEvent({type:"filterChanged"})}toggleExpanded(){this.expanded?this.collapse():this.expand()}expand(){this.expanded||(this.expanded=!0,r5(this.eFilterToolPanelHeader,!0),sC(this.eExpandChecked,!0),sC(this.eExpandUnchecked,!1),this.addFilterElement(),this.expandedCallback())}addFilterElement(e){let t=sO('<div class="ag-filter-toolpanel-instance-filter"></div>'),i=this.createManagedBean(new oe(this.column,"TOOLBAR"));this.filterWrapperComp=i,i.hasFilter()&&i.getFilter()?.then(r=>{this.underlyingFilter=r,r&&(t.appendChild(i.getGui()),this.agFilterToolPanelBody.appendChild(t),i.afterGuiAttached({container:"toolPanel",suppressFocus:e}))})}collapse(){this.expanded&&(this.expanded=!1,r5(this.eFilterToolPanelHeader,!1),this.removeFilterElement(),sC(this.eExpandChecked,!1),sC(this.eExpandUnchecked,!0),this.filterWrapperComp?.afterGuiDetached(),this.destroyBean(this.filterWrapperComp),this.expandedCallback())}removeFilterElement(){sL(this.agFilterToolPanelBody)}isExpanded(){return this.expanded}refreshFilter(e){if(!this.expanded)return;let t=this.underlyingFilter;t&&(e?"function"==typeof t.refreshVirtualList&&t.refreshVirtualList():t.afterGuiDetached?.())}onFilterOpened(e){"COLUMN_MENU"===e.source&&e.column===this.column&&this.expanded&&this.collapse()}},Ol=class e extends sQ{constructor(e,t,i,r,s){super(),this.filterGroupComp=null,this.columnGroup=e,this.childFilterComps=t,this.depth=r,this.expandedCallback=i,this.showingColumn=s}wireBeans(e){this.columnNameService=e.columnNameService}postConstruct(){this.setTemplate(`<div class="ag-filter-toolpanel-group-wrapper">
            <ag-group-component data-ref="filterGroupComp"></ag-group-component>
        </div>`,[I1],{filterGroupComp:{cssIdentifier:"filter-toolpanel",direction:"vertical"}}),this.setGroupTitle(),this.filterGroupComp.setAlignItems("stretch"),this.filterGroupComp.addCssClass(`ag-filter-toolpanel-group-level-${this.depth}`),this.filterGroupComp.getGui().style.setProperty("--ag-indentation-level",String(this.depth)),this.filterGroupComp.addCssClassToTitleBar(`ag-filter-toolpanel-group-level-${this.depth}-header`),this.childFilterComps.forEach(e=>{this.filterGroupComp.addItem(e),e.addCssClassToTitleBar(`ag-filter-toolpanel-group-level-${this.depth+1}-header`),e.getGui().style.setProperty("--ag-indentation-level",String(this.depth+1))}),this.refreshFilterClass(),this.addExpandCollapseListeners(),this.addFilterChangedListeners(),this.setupTooltip(),this.addInIcon("filter")}setupTooltip(){let e;if(!this.showingColumn)return;"whenTruncated"===this.gos.get("tooltipShowMode")&&(e=()=>{let e=this.filterGroupComp.getGui().querySelector(".ag-group-title");return!e||e.scrollWidth>e.clientWidth});let t=()=>{let t=this.columnGroup.getColDef().headerTooltip;this.setTooltip({newTooltipText:t,location:"filterToolPanelColumnGroup",shouldDisplayTooltip:e})};t(),this.addManagedEventListeners({newColumnsLoaded:t})}getTooltipParams(){let e=super.getTooltipParams();return e.location="filterToolPanelColumnGroup",e}addCssClassToTitleBar(e){this.filterGroupComp.addCssClassToTitleBar(e)}refreshFilters(t){this.childFilterComps.forEach(i=>{i instanceof e?i.refreshFilters(t):i.refreshFilter(t)})}isColumnGroup(){return i3(this.columnGroup)}isExpanded(){return this.filterGroupComp.isExpanded()}getChildren(){return this.childFilterComps}getFilterGroupName(){return this.filterGroupName?this.filterGroupName:""}getFilterGroupId(){return this.columnGroup.getId()}hideGroupItem(e,t){this.filterGroupComp.hideItem(e,t)}hideGroup(e){this.setDisplayed(!e)}addInIcon(e){let t=s2(e,this.gos);t&&t.classList.add("ag-filter-toolpanel-group-instance-header-icon"),this.filterGroupComp.addTitleBarWidget(t)}forEachToolPanelFilterChild(e){this.childFilterComps.forEach(t=>{t instanceof On&&e(t)})}addExpandCollapseListeners(){let e=this.isColumnGroup()?()=>this.expandedCallback():()=>this.forEachToolPanelFilterChild(e=>e.expand()),t=this.isColumnGroup()?()=>this.expandedCallback():()=>this.forEachToolPanelFilterChild(e=>e.collapse());this.addManagedListeners(this.filterGroupComp,{expanded:e,collapsed:t})}getColumns(){return i3(this.columnGroup)?this.columnGroup.getLeafColumns():[this.columnGroup]}addFilterChangedListeners(){this.getColumns().forEach(e=>{this.addManagedListeners(e,{filterChanged:()=>this.refreshFilterClass()})}),i3(this.columnGroup)||this.addManagedEventListeners({filterOpened:this.onFilterOpened.bind(this)})}refreshFilterClass(){let e=this.getColumns();this.filterGroupComp.addOrRemoveCssClass("ag-has-filter",e.some(e=>e.isFilterActive()))}onFilterOpened(e){"COLUMN_MENU"===e.source&&e.column===this.columnGroup&&this.isExpanded()&&this.collapse()}expand(){this.filterGroupComp.toggleGroupExpand(!0)}collapse(){this.filterGroupComp.toggleGroupExpand(!1)}setGroupTitle(){this.filterGroupName=i3(this.columnGroup)?this.getColumnGroupName(this.columnGroup):this.getColumnName(this.columnGroup),this.filterGroupComp.setTitle(this.filterGroupName||"")}getColumnGroupName(e){return this.columnNameService.getDisplayNameForProvidedColumnGroup(null,e,"filterToolPanel")}getColumnName(e){return this.columnNameService.getDisplayNameForColumn(e,"filterToolPanel",!1)}destroyFilters(){this.childFilterComps=this.destroyBeans(this.childFilterComps),sL(this.getGui())}destroy(){this.destroyFilters(),super.destroy()}},Oh={selector:"AG-FILTERS-TOOL-PANEL-LIST",component:class extends sQ{constructor(){super('<div class="ag-filter-list-panel"></div>'),this.initialised=!1,this.hasLoadedInitialState=!1,this.isInitialState=!1,this.filterGroupComps=[],this.suppressOnColumnsChanged=!1,this.onColumnsChangedPending=!1}wireBeans(e){this.toolPanelColDefService=e.toolPanelColDefService,this.columnModel=e.columnModel}init(e){this.initialised=!0;let t=this.gos.addGridCommonParams({suppressExpandAll:!1,suppressFilterSearch:!1,suppressSyncLayoutWithGrid:!1});rd(t,e),this.params=t,this.params.suppressSyncLayoutWithGrid||this.addManagedEventListeners({columnMoved:()=>this.onColumnsChanged()}),this.addManagedEventListeners({newColumnsLoaded:()=>this.onColumnsChanged(),toolPanelVisibleChanged:e=>{"filters"===e.key&&this.refreshFilters(e.visible)},dragStarted:()=>{this.suppressOnColumnsChanged=!0},dragStopped:()=>{this.suppressOnColumnsChanged=!1,this.onColumnsChangedPending&&(this.onColumnsChangedPending=!1,this.onColumnsChanged())}}),this.columnModel.isReady()&&this.onColumnsChanged()}onColumnsChanged(){if(this.suppressOnColumnsChanged){this.onColumnsChangedPending=!0;return}let e=this.columnModel.isPivotMode();this.params.suppressSyncLayoutWithGrid||e?this.buildTreeFromProvidedColumnDefs():this.syncFilterLayout(),this.refreshAriaLabel()}syncFilterLayout(){this.toolPanelColDefService.syncLayoutWithGrid(this.setFiltersLayout.bind(this)),this.refreshAriaLabel()}buildTreeFromProvidedColumnDefs(){let e=this.columnModel.getColDefColTree();this.recreateFilters(e)}setFiltersLayout(e){let t=this.toolPanelColDefService.createColumnTree(e);this.recreateFilters(t)}recreateFilters(e){let t=ih(this.gos);this.hasLoadedInitialState||(this.hasLoadedInitialState=!0,this.isInitialState=!!this.params.initialState);let i=this.getExpansionState();this.destroyFilters(),this.filterGroupComps=this.recursivelyAddComps(e,0,i);let r=this.filterGroupComps.length;r&&(this.filterGroupComps.forEach(e=>this.appendChild(e)),this.setFirstAndLastVisible(0,r-1)),tY(this.searchFilterText)&&this.searchFilters(this.searchFilterText),this.fireExpandedEvent(),this.getGui().contains(t)&&t.focus(),this.isInitialState=!1,this.refreshAriaLabel()}recursivelyAddComps(e,t,i){return iW(e.map(e=>{if(i3(e))return iW(this.recursivelyAddFilterGroupComps(e,t,i));if(!this.shouldDisplayFilter(e))return[];let r=new On(0===t,()=>this.onFilterExpanded());if(this.createBean(r),r.setColumn(e),i.get(e.getId())&&r.expand(),t>0)return r;let s=this.createBean(new Ol(e,[r],this.onGroupExpanded.bind(this),t,!0));return s.addCssClassToTitleBar("ag-filter-toolpanel-header"),i.get(s.getFilterGroupId())||s.collapse(),s}))}refreshAriaLabel(){let e=this.localeService.getLocaleTextFunc(),t=e("ariaFilterPanelList","Filter List"),i=e("filters","Filters"),r=this.getGui().querySelectorAll(".ag-filter-toolpanel-group-item:not(.ag-filter-toolpanel-group-wrapper, .ag-hidden)").length;rJ(this.getAriaElement(),`${t} ${r} ${i}`)}recursivelyAddFilterGroupComps(e,t,i){if(!this.filtersExistInChildren(e.getChildren()))return;let r=e.getColGroupDef();if(r&&r.suppressFiltersToolPanel)return[];let s=e.isPadding()?t:t+1,a=iW(this.recursivelyAddComps(e.getChildren(),s,i));if(e.isPadding())return a;let o=new Ol(e,a,this.onGroupExpanded.bind(this),t,!1);this.createBean(o),o.addCssClassToTitleBar("ag-filter-toolpanel-header");let n=i.get(o.getFilterGroupId());return(this.isInitialState&&!n||!1===n)&&o.collapse(),[o]}filtersExistInChildren(e){return e.some(e=>i3(e)?this.filtersExistInChildren(e.getChildren()):this.shouldDisplayFilter(e))}shouldDisplayFilter(e){let t=e.getColDef()&&e.getColDef().suppressFiltersToolPanel;return e.isFilterAllowed()&&!t}getExpansionState(){let e=new Map;if(this.isInitialState){let{expandedColIds:t,expandedGroupIds:i}=this.params.initialState;return t.forEach(t=>e.set(t,!0)),i.forEach(t=>e.set(t,!0)),e}let t=i=>{e.set(i.getFilterGroupId(),i.isExpanded()),i.getChildren().forEach(i=>{i instanceof Ol?t(i):e.set(i.getColumn().getId(),i.isExpanded())})};return this.filterGroupComps.forEach(t),e}refresh(){}setVisible(e){super.setDisplayed(e),e&&!this.initialised&&this.init(this.params)}expandFilterGroups(e,t){let i=[],r=s=>{let a=s.getFilterGroupId();(!t||iU(t,a))&&(e&&s.isColumnGroup()?s.expand():s.collapse(),i.push(a)),s.getChildren().forEach(e=>{e instanceof Ol&&r(e)})};if(this.filterGroupComps.forEach(r),this.onGroupExpanded(),t){let e=t.filter(e=>0>i.indexOf(e));e.length>0&&tO("unable to find groups for these supplied groupIds:",e)}}expandFilters(e,t){let i=[],r=s=>{if(s instanceof Ol){let t=!1;return s.getChildren().forEach(i=>{r(i)&&(e?(s.expand(),t=!0):s.isColumnGroup()||s.collapse())}),t}let a=s.getColumn().getColId(),o=!t||iU(t,a);return o&&(e?s.expand():s.collapse(),i.push(a)),o};if(this.filterGroupComps.forEach(r),this.onGroupExpanded(),t){let e=t.filter(e=>0>i.indexOf(e));e.length>0&&tO("unable to find columns for these supplied colIds:"+e)}}onGroupExpanded(){this.fireExpandedEvent()}onFilterExpanded(){this.dispatchLocalEvent({type:"filterExpanded"})}fireExpandedEvent(){let e,t=0,i=0,r=e=>{e.isColumnGroup()&&(e.isExpanded()?t++:i++,e.getChildren().forEach(e=>{e instanceof Ol&&r(e)}))};this.filterGroupComps.forEach(r),e=t>0&&i>0?2:i>0?1:0,this.dispatchLocalEvent({type:"groupExpanded",state:e})}performFilterSearch(e){this.searchFilterText=tY(e)?e.toLowerCase():null,this.searchFilters(this.searchFilterText)}searchFilters(e){let t,i;let r=t=>!tY(e)||-1!==t.toLowerCase().indexOf(e),s=(e,t)=>{if(!(e instanceof Ol))return r(e.getColumnFilterName()||"");let i=e.getChildren(),a=r(e.getFilterGroupName()),o=t||a;if(o){e.hideGroup(!1);for(let t=0;t<i.length;t++)s(i[t],o),e.hideGroupItem(!1,t);return!0}let n=!1;return i.forEach((i,r)=>{let a=s(i,t);e.hideGroupItem(!a,r),a&&(n=!0)}),e.hideGroup(!n),n};this.filterGroupComps.forEach((e,r)=>{s(e,!1),void 0===t?e.containsCssClass("ag-hidden")||(t=r,i=r):e.containsCssClass("ag-hidden")||i===r||(i=r)}),this.setFirstAndLastVisible(t,i),this.refreshAriaLabel()}setFirstAndLastVisible(e,t){this.filterGroupComps.forEach((i,r)=>{i.removeCssClass("ag-first-group-visible"),i.removeCssClass("ag-last-group-visible"),r===e&&i.addCssClass("ag-first-group-visible"),r===t&&i.addCssClass("ag-last-group-visible")})}refreshFilters(e){this.filterGroupComps.forEach(t=>t.refreshFilters(e))}getExpandedFiltersAndGroups(){let e=[],t=new Set,i=r=>{if(r instanceof Ol){r.getChildren().forEach(e=>i(e));let s=r.getFilterGroupId();r.isExpanded()&&!t.has(s)&&e.push(s)}else r.isExpanded()&&t.add(r.getColumn().getColId())};return this.filterGroupComps.forEach(i),{expandedGroupIds:e,expandedColIds:Array.from(t)}}destroyFilters(){this.filterGroupComps=this.destroyBeans(this.filterGroupComps),sL(this.getGui())}destroy(){this.destroyFilters(),super.destroy()}}},Od=class extends sQ{constructor(){super(`<div class="ag-filter-toolpanel">
            <ag-filters-tool-panel-header data-ref="filtersToolPanelHeaderPanel"></ag-filters-tool-panel-header>
            <ag-filters-tool-panel-list data-ref="filtersToolPanelListPanel"></ag-filters-tool-panel-list>
         </div>`,[Oo,Oh]),this.filtersToolPanelHeaderPanel=null,this.filtersToolPanelListPanel=null,this.initialised=!1,this.listenerDestroyFuncs=[]}init(e){this.initialised&&(this.listenerDestroyFuncs.forEach(e=>e()),this.listenerDestroyFuncs=[]),this.initialised=!0;let t=this.gos.addGridCommonParams({suppressExpandAll:!1,suppressFilterSearch:!1,suppressSyncLayoutWithGrid:!1});this.params={...t,...e},this.filtersToolPanelHeaderPanel.init(this.params),this.filtersToolPanelListPanel.init(this.params);let i=this.params.suppressExpandAll,r=this.params.suppressFilterSearch;i&&r&&this.filtersToolPanelHeaderPanel.setDisplayed(!1),this.listenerDestroyFuncs.push(...this.addManagedListeners(this.filtersToolPanelHeaderPanel,{expandAll:this.onExpandAll.bind(this),collapseAll:this.onCollapseAll.bind(this),searchChanged:this.onSearchChanged.bind(this)}),...this.addManagedListeners(this.filtersToolPanelListPanel,{filterExpanded:this.onFilterExpanded.bind(this),groupExpanded:this.onGroupExpanded.bind(this)}))}setVisible(e){super.setDisplayed(e),e&&!this.initialised&&this.init(this.params)}onExpandAll(){this.filtersToolPanelListPanel.expandFilterGroups(!0)}onCollapseAll(){this.filtersToolPanelListPanel.expandFilterGroups(!1)}onSearchChanged(e){this.filtersToolPanelListPanel.performFilterSearch(e.searchText)}setFilterLayout(e){this.filtersToolPanelListPanel.setFiltersLayout(e)}onFilterExpanded(){this.params.onStateUpdated()}onGroupExpanded(e){this.filtersToolPanelHeaderPanel.setExpandState(e.state),this.params.onStateUpdated()}expandFilterGroups(e){this.filtersToolPanelListPanel.expandFilterGroups(!0,e)}collapseFilterGroups(e){this.filtersToolPanelListPanel.expandFilterGroups(!1,e)}expandFilters(e){this.filtersToolPanelListPanel.expandFilters(!0,e)}collapseFilters(e){this.filtersToolPanelListPanel.expandFilters(!1,e)}syncLayoutWithGrid(){this.filtersToolPanelListPanel.syncFilterLayout()}refresh(e){return this.init(e),!0}getState(){return this.filtersToolPanelListPanel.getExpandedFiltersAndGroups()}destroy(){super.destroy()}},Oc={version:"32.2.0",moduleName:tL.FiltersToolPanelModule,beans:[],userComponents:[{name:"agFiltersToolPanel",classImp:Od}],dependantModules:[Pz,IX,no]},Ou=class extends i2{constructor(){super(...arguments),this.loadRowDataVersion=0}wireBeans(e){this.focusService=e.focusService,this.rowPositionUtils=e.rowPositionUtils,this.environment=e.environment}init(e,t){this.params=t,this.comp=e,null==t.pinned&&(this.setAutoHeightClasses(),this.setupRefreshStrategy(),this.addThemeToDetailGrid(),this.createDetailGrid(),this.loadRowData(),this.addManagedEventListeners({fullWidthRowFocused:this.onFullWidthRowFocused.bind(this)}))}onFullWidthRowFocused(e){let t=this.params,i={rowIndex:t.node.rowIndex,rowPinned:t.node.rowPinned},r={rowIndex:e.rowIndex,rowPinned:e.rowPinned};this.rowPositionUtils.sameRow(i,r)&&this.focusService.focusInto(this.comp.getGui(),e.fromBelow)}setAutoHeightClasses(){let e=this.gos.get("detailRowAutoHeight");this.comp.addOrRemoveCssClass(e?"ag-details-row-auto-height":"ag-details-row-fixed-height",!0),this.comp.addOrRemoveDetailGridCssClass(e?"ag-details-grid-auto-height":"ag-details-grid-fixed-height",!0)}setupRefreshStrategy(){let e=this.params.refreshStrategy;if("everything"==e||"nothing"==e||"rows"==e){this.refreshStrategy=e;return}null!=e&&tO("invalid cellRendererParams.refreshStrategy = '"+e+"' supplied, defaulting to refreshStrategy = 'rows'."),this.refreshStrategy="rows"}addThemeToDetailGrid(){for(let e of this.environment.getThemeClasses())this.comp.addOrRemoveDetailGridCssClass(e,!0)}createDetailGrid(){if(tK(this.params.detailGridOptions)){tO("could not find detail grid options for master detail, please set gridOptions.detailCellRendererParams.detailGridOptions");return}let e={...this.params.detailGridOptions};this.gos.get("detailRowAutoHeight")&&(e.domLayout="autoHeight"),e.theme||(e.theme=this.gos.get("theme")),this.comp.setDetailGrid(e)}registerDetailWithMaster(e){let t=this.params.node.id,i=this.params.api,r={id:t,api:e},s=this.params.node;i.isDestroyed()||(i.addDetailGridInfo(t,r),s.detailGridInfo=r,this.addDestroyFunc(()=>{s.detailGridInfo===r&&(i.isDestroyed()||i.removeDetailGridInfo(t),s.detailGridInfo=null)}))}loadRowData(){this.loadRowDataVersion++;let e=this.loadRowDataVersion;if(this.params.detailGridOptions?.rowModelType==="serverSide"){let e=this.params.node;e.detailGridInfo?.api?.refreshServerSide({purge:!0});return}let t=this.params.getDetailRowData;if(!t){tO("could not find getDetailRowData for master / detail, please set gridOptions.detailCellRendererParams.getDetailRowData");return}t({node:this.params.node,data:this.params.node.data,successCallback:t=>{this.loadRowDataVersion===e&&this.comp.setRowData(t)},context:this.gos.getGridCommonParams().context})}refresh(){switch(this.refreshStrategy){case"nothing":return!0;case"everything":return!1}return this.loadRowData(),!0}},Op=class{constructor(e){this.parentWrapper=e}wrap(e,t,i,r){return this.parentWrapper.wrap(e,t,i,r)}},Og=class extends sQ{constructor(){super(...arguments),this.eDetailGrid=null}wireBeans(e){this.context=e.context}init(e){this.params=e,this.selectAndSetTemplate(),this.ctrl=this.createManagedBean(new Ou),this.ctrl.init({addOrRemoveCssClass:(e,t)=>this.addOrRemoveCssClass(e,t),addOrRemoveDetailGridCssClass:(e,t)=>this.eDetailGrid.classList.toggle(e,t),setDetailGrid:e=>this.setDetailGrid(e),setRowData:e=>this.setRowData(e),getGui:()=>this.eDetailGrid},e)}refresh(){return this.ctrl&&this.ctrl.refresh()}destroy(){super.destroy()}selectAndSetTemplate(){if(this.params.pinned){this.setTemplate('<div class="ag-details-row"></div>');return}let e=()=>{this.setTemplate(`<div class="ag-details-row" role="gridcell">
                <div data-ref="eDetailGrid" class="ag-details-grid" role="presentation"></div>
            </div>`)};if(tK(this.params.template))e();else if("string"==typeof this.params.template)this.setTemplate(this.params.template,[]);else if("function"==typeof this.params.template){let e=(0,this.params.template)(this.params);this.setTemplate(e,[])}else tO("detailCellRendererParams.template should be function or string"),e();null==this.eDetailGrid&&tO('Reference to eDetailGrid was missing from the details template. Please add data-ref="eDetailGrid" to the template.')}setDetailGrid(e){if(!this.eDetailGrid)return;let t=new Op(this.context.getBean("frameworkComponentWrapper")),i=this.getFrameworkOverrides(),r=function(e,t,i){if(!t)return tB("No gridOptions provided to createGrid"),{};let r=new dW().create(e,t,t=>{let i=new hq(e);t.createBean(i)},void 0,i);return Object.isFrozen(t)||i?.frameworkOverrides||Object.defineProperty(t,"api",{get:()=>{tB("gridOptions.api is no longer supported. See https://ag-grid.com/javascript-data-grid/grid-interface/#grid-api.")},configurable:!0}),r}(this.eDetailGrid,e,{frameworkOverrides:i,providedBeanInstances:{frameworkComponentWrapper:t},modules:aW.__getGridRegisteredModules(this.params.api.getGridId())});this.detailApi=r,this.ctrl.registerDetailWithMaster(r),this.addDestroyFunc(()=>{r?.destroy()})}setRowData(e){this.detailApi&&this.detailApi.setGridOption("rowData",e)}},Om=class extends i2{constructor(){super(...arguments),this.beanName="detailGridApiService",this.detailGridInfoMap={}}addDetailGridInfo(e,t){this.detailGridInfoMap[e]=t}removeDetailGridInfo(e){delete this.detailGridInfoMap[e]}getDetailGridInfo(e){return this.detailGridInfoMap[e]}forEachDetailGridInfo(e){let t=0;ro(this.detailGridInfoMap,(i,r)=>{tY(r)&&(e(r,t),t++)})}destroy(){this.detailGridInfoMap={},super.destroy()}},Of="32.2.0",Ov={version:Of,moduleName:`${tL.MasterDetailModule}-core`,userComponents:[{name:"agGroupRowRenderer",classImp:kp},{name:"agGroupCellRenderer",classImp:kp},{name:"agDetailCellRenderer",classImp:Og}],controllers:[{name:"detailCellRenderer",classImp:Ou},{name:"groupCellRendererCtrl",classImp:kc}],dependantModules:[IX]},Oy={version:Of,moduleName:`${tL.MasterDetailModule}-api`,beans:[Om],apiFunctions:{addDetailGridInfo:function(e,t,i){e.detailGridApiService?.addDetailGridInfo(t,i)},removeDetailGridInfo:function(e,t){e.detailGridApiService?.removeDetailGridInfo(t)},getDetailGridInfo:function(e,t){return e.detailGridApiService?.getDetailGridInfo(t)},forEachDetailGridInfo:function(e,t){e.detailGridApiService?.forEachDetailGridInfo(t)}},dependantModules:[Ov]},OC={version:Of,moduleName:tL.MasterDetailModule,dependantModules:[Ov,Oy]},Ow=class e extends i2{constructor(){super(...arguments),this.beanName="chartMenuItemMapper"}wireBeans(e){this.chartService=e.chartService}getChartItems(t){if(!this.chartService){this.gos.assertModuleRegistered(tL.GridChartsModule,`the Context Menu key "${t}"`);return}let i="pivotChart"===t?new Ob(this.gos,this.chartService,this.localeService):new OS(this.gos,this.chartService,this.localeService),r=this.chartService.isEnterprise(),s=i.getMenuItem();if(s&&s.subMenu&&!r){let e=t=>({...t,subMenu:t.subMenu?.filter(e=>!e._enterprise).map(t=>e(t))});s=e(s)}let a=this.gos.get("chartToolPanelsDef")?.settingsPanel?.chartGroupsDef;return a&&(s=e.filterAndOrderChartMenu(s,a,i.getConfigLookup())),this.cleanInternals(s)}cleanInternals(e){if(!e)return e;let t=e=>(delete e?._key,delete e?._enterprise,e?.subMenu?.forEach(e=>t(e)),e);return t(e)}static buildLookup(e){let t={},i=e=>{t[e._key]=e,e.subMenu&&e.subMenu.forEach(e=>i(e))};return i(e),t}static filterAndOrderChartMenu(e,t,i){let r=this.buildLookup(e),s={...e,subMenu:[]};if(Object.entries(t).forEach(([e,t])=>{let a=i[e];if(null===a)return;if(void 0==a){tO(`invalid chartGroupsDef config '${e}'`);return}let o=r[a._key];if(o){if(o.subMenu){let i=t.map(t=>{let i=a[t];if(void 0==i){tO(`invalid chartGroupsDef config '${e}.${t}'`);return}return r[i]}).filter(e=>void 0!==e);i.length>0&&(o.subMenu=i,s.subMenu?.push(o))}else s.subMenu?.push(o)}}),s.subMenu?.length!=0)return s}},Ob=class{constructor(e,t,i){this.gos=e,this.chartService=t,this.localeService=i}getMenuItem(){let e=this.localeService.getLocaleTextFunc(),t=(t,i,r,s,a=!1)=>({name:e(t,i),action:()=>this.chartService.createPivotChart({chartType:r}),_key:s,_enterprise:a});return{name:e("pivotChart","Pivot Chart"),_key:"pivotChart",subMenu:[{_key:"pivotColumnChart",name:e("columnChart","Column"),subMenu:[t("groupedColumn","Grouped&lrm;","groupedColumn","pivotGroupedColumn"),t("stackedColumn","Stacked&lrm;","stackedColumn","pivotStackedColumn"),t("normalizedColumn","100% Stacked&lrm;","normalizedColumn","pivotNormalizedColumn")]},{_key:"pivotBarChart",name:e("barChart","Bar"),subMenu:[t("groupedBar","Grouped&lrm;","groupedBar","pivotGroupedBar"),t("stackedBar","Stacked&lrm;","stackedBar","pivotStackedBar"),t("normalizedBar","100% Stacked&lrm;","normalizedBar","pivotNormalizedBar")]},{_key:"pivotPieChart",name:e("pieChart","Pie"),subMenu:[t("pie","Pie&lrm;","pie","pivotPie"),t("donut","Donut&lrm;","donut","pivotDonut")]},t("line","Line&lrm;","line","pivotLineChart"),{_key:"pivotXYChart",name:e("xyChart","X Y (Scatter)"),subMenu:[t("scatter","Scatter&lrm;","scatter","pivotScatter"),t("bubble","Bubble&lrm;","bubble","pivotBubble")]},{_key:"pivotAreaChart",name:e("areaChart","Area"),subMenu:[t("area","Area&lrm;","area","pivotArea"),t("stackedArea","Stacked&lrm;","stackedArea","pivotStackedArea"),t("normalizedArea","100% Stacked&lrm;","normalizedArea","pivotNormalizedArea")]},{_key:"pivotStatisticalChart",_enterprise:!1,name:e("statisticalChart","Statistical"),subMenu:[t("histogramChart","Histogram&lrm;","histogram","pivotHistogram",!1)]},{_key:"pivotHierarchicalChart",_enterprise:!0,name:e("hierarchicalChart","Hierarchical"),subMenu:[t("treemapChart","Treemap&lrm;","treemap","pivotTreemap",!0),t("sunburstChart","Sunburst&lrm;","sunburst","pivotSunburst",!0)]},{_key:"pivotCombinationChart",name:e("combinationChart","Combination"),subMenu:[t("columnLineCombo","Column & Line&lrm;","columnLineCombo","pivotColumnLineCombo"),t("AreaColumnCombo","Area & Column&lrm;","areaColumnCombo","pivotAreaColumnCombo")]}],icon:s2("chart",this.gos,void 0)}}getConfigLookup(){return{columnGroup:{_key:"pivotColumnChart",column:"pivotGroupedColumn",stackedColumn:"pivotStackedColumn",normalizedColumn:"pivotNormalizedColumn"},barGroup:{_key:"pivotBarChart",bar:"pivotGroupedBar",stackedBar:"pivotStackedBar",normalizedBar:"pivotNormalizedBar"},pieGroup:{_key:"pivotPieChart",pie:"pivotPie",donut:"pivotDonut",doughnut:"pivotDonut"},lineGroup:{_key:"pivotLineChart",line:"pivotLineChart"},scatterGroup:{_key:"pivotXYChart",bubble:"pivotBubble",scatter:"pivotScatter"},areaGroup:{_key:"pivotAreaChart",area:"pivotArea",stackedArea:"pivotStackedArea",normalizedArea:"pivotNormalizedArea"},combinationGroup:{_key:"pivotCombinationChart",columnLineCombo:"pivotColumnLineCombo",areaColumnCombo:"pivotAreaColumnCombo",customCombo:null},hierarchicalGroup:{_key:"pivotHierarchicalChart",treemap:"pivotTreemap",sunburst:"pivotSunburst"},statisticalGroup:{_key:"pivotStatisticalChart",histogram:"pivotHistogram",rangeBar:null,rangeArea:null,boxPlot:null},polarGroup:null,specializedGroup:null}}},OS=class{constructor(e,t,i){this.gos=e,this.chartService=t,this.localeService=i}getMenuItem(){let e=this.localeService.getLocaleTextFunc(),t=(t,i,r,s,a=!1)=>({name:e(t,i),action:()=>this.chartService.createChartFromCurrentRange(r),_key:s,_enterprise:a});return{name:e("chartRange","Chart Range"),_key:"chartRange",subMenu:[{name:e("columnChart","Column"),subMenu:[t("groupedColumn","Grouped&lrm;","groupedColumn","rangeGroupedColumn"),t("stackedColumn","Stacked&lrm;","stackedColumn","rangeStackedColumn"),t("normalizedColumn","100% Stacked&lrm;","normalizedColumn","rangeNormalizedColumn")],_key:"rangeColumnChart"},{name:e("barChart","Bar"),subMenu:[t("groupedBar","Grouped&lrm;","groupedBar","rangeGroupedBar"),t("stackedBar","Stacked&lrm;","stackedBar","rangeStackedBar"),t("normalizedBar","100% Stacked&lrm;","normalizedBar","rangeNormalizedBar")],_key:"rangeBarChart"},{name:e("pieChart","Pie"),subMenu:[t("pie","Pie&lrm;","pie","rangePie"),t("donut","Donut&lrm;","donut","rangeDonut")],_key:"rangePieChart"},t("line","Line&lrm;","line","rangeLineChart"),{name:e("xyChart","X Y (Scatter)"),subMenu:[t("scatter","Scatter&lrm;","scatter","rangeScatter"),t("bubble","Bubble&lrm;","bubble","rangeBubble")],_key:"rangeXYChart"},{name:e("areaChart","Area"),subMenu:[t("area","Area&lrm;","area","rangeArea"),t("stackedArea","Stacked&lrm;","stackedArea","rangeStackedArea"),t("normalizedArea","100% Stacked&lrm;","normalizedArea","rangeNormalizedArea")],_key:"rangeAreaChart"},{name:e("polarChart","Polar"),subMenu:[t("radarLine","Radar Line&lrm;","radarLine","rangeRadarLine"),t("radarArea","Radar Area&lrm;","radarArea","rangeRadarArea"),t("nightingale","Nightingale&lrm;","nightingale","rangeNightingale"),t("radialColumn","Radial Column&lrm;","radialColumn","rangeRadialColumn"),t("radialBar","Radial Bar&lrm;","radialBar","rangeRadialBar")],_key:"rangePolarChart",_enterprise:!0},{name:e("statisticalChart","Statistical"),subMenu:[t("boxPlot","Box Plot&lrm;","boxPlot","rangeBoxPlot",!0),t("histogramChart","Histogram&lrm;","histogram","rangeHistogram",!1),t("rangeBar","Range Bar&lrm;","rangeBar","rangeRangeBar",!0),t("rangeArea","Range Area&lrm;","rangeArea","rangeRangeArea",!0)],_key:"rangeStatisticalChart",_enterprise:!1},{name:e("hierarchicalChart","Hierarchical"),subMenu:[t("treemap","Treemap&lrm;","treemap","rangeTreemap"),t("sunburst","Sunburst&lrm;","sunburst","rangeSunburst")],_key:"rangeHierarchicalChart",_enterprise:!0},{name:e("specializedChart","Specialized"),subMenu:[t("heatmap","Heatmap&lrm;","heatmap","rangeHeatmap"),t("waterfall","Waterfall&lrm;","waterfall","rangeWaterfall")],_key:"rangeSpecializedChart",_enterprise:!0},{name:e("combinationChart","Combination"),subMenu:[t("columnLineCombo","Column & Line&lrm;","columnLineCombo","rangeColumnLineCombo"),t("AreaColumnCombo","Area & Column&lrm;","areaColumnCombo","rangeAreaColumnCombo")],_key:"rangeCombinationChart"}],icon:s2("chart",this.gos,void 0)}}getConfigLookup(){return{columnGroup:{_key:"rangeColumnChart",column:"rangeGroupedColumn",stackedColumn:"rangeStackedColumn",normalizedColumn:"rangeNormalizedColumn"},barGroup:{_key:"rangeBarChart",bar:"rangeGroupedBar",stackedBar:"rangeStackedBar",normalizedBar:"rangeNormalizedBar"},pieGroup:{_key:"rangePieChart",pie:"rangePie",donut:"rangeDonut",doughnut:"rangeDonut"},lineGroup:{_key:"rangeLineChart",line:"rangeLineChart"},scatterGroup:{_key:"rangeXYChart",bubble:"rangeBubble",scatter:"rangeScatter"},areaGroup:{_key:"rangeAreaChart",area:"rangeArea",stackedArea:"rangeStackedArea",normalizedArea:"rangeNormalizedArea"},polarGroup:{_key:"rangePolarChart",radarLine:"rangeRadarLine",radarArea:"rangeRadarArea",nightingale:"rangeNightingale",radialColumn:"rangeRadialColumn",radialBar:"rangeRadialBar"},statisticalGroup:{_key:"rangeStatisticalChart",boxPlot:"rangeBoxPlot",histogram:"rangeHistogram",rangeBar:"rangeRangeBar",rangeArea:"rangeRangeArea"},hierarchicalGroup:{_key:"rangeHierarchicalChart",treemap:"rangeTreemap",sunburst:"rangeSunburst"},specializedGroup:{_key:"rangeSpecializedChart",heatmap:"rangeHeatmap",waterfall:"rangeWaterfall"},combinationGroup:{_key:"rangeCombinationChart",columnLineCombo:"rangeColumnLineCombo",areaColumnCombo:"rangeAreaColumnCombo",customCombo:null}}}},Ox=class extends i2{constructor(){super(...arguments),this.beanName="columnChooserFactory"}wireBeans(e){this.focusService=e.focusService,this.menuUtils=e.menuUtils,this.visibleColsService=e.visibleColsService}createColumnSelectPanel(e,t,i,r){let s=e.createManagedBean(new PK),{contractColumnSelection:a,suppressColumnExpandAll:o,suppressColumnFilter:n,suppressColumnSelectAll:l,suppressSyncLayoutWithGrid:h,columnLayout:d}=r??t?.getColDef().columnChooserParams??t?.getColDef().columnsMenuParams??{};return s.init(!!i,this.gos.addGridCommonParams({suppressColumnMove:!1,suppressValues:!1,suppressPivots:!1,suppressRowGroups:!1,suppressPivotMode:!1,contractColumnSelection:!!a,suppressColumnExpandAll:!!o,suppressColumnFilter:!!n,suppressColumnSelectAll:!!l,suppressSyncLayoutWithGrid:!!d||!!h,onStateUpdated:()=>{}}),"columnMenu"),d&&s.setColumnLayout(d),s}showColumnChooser({column:e,chooserParams:t,eventSource:i}){this.hideActiveColumnChooser();let r=this.createColumnSelectPanel(this,e,!0,t),s=this.localeService.getLocaleTextFunc(),a=this.visibleColsService.getAllCols().indexOf(e),o=e?this.focusService.getFocusedHeader():null;this.activeColumnChooserDialog=this.createBean(new ks({title:s("chooseColumns","Choose Columns"),component:r,width:300,height:300,resizable:!0,movable:!0,centered:!0,closable:!0,afterGuiAttached:()=>{this.focusService.findNextFocusableElement(r.getGui())?.focus({preventScroll:!0}),this.dispatchVisibleChangedEvent(!0,e)},closedCallback:t=>{let r=this.activeColumnChooser.getGui();this.destroyBean(this.activeColumnChooser),this.activeColumnChooser=void 0,this.activeColumnChooserDialog=void 0,this.dispatchVisibleChangedEvent(!1,e),e&&this.menuUtils.restoreFocusOnClose({column:e,headerPosition:o,columnIndex:a,eventSource:i},r,t,!0)},postProcessPopupParams:{type:"columnChooser",column:e,eventSource:i}})),this.activeColumnChooser=r}hideActiveColumnChooser(){this.activeColumnChooserDialog&&this.destroyBean(this.activeColumnChooserDialog)}dispatchVisibleChangedEvent(e,t){this.eventService.dispatchEvent({type:"columnMenuVisibleChanged",visible:e,switchingTab:!1,key:"columnChooser",column:t??null})}},OM="separator",OE=class extends i2{constructor(){super(...arguments),this.beanName="columnMenuFactory"}wireBeans(e){this.menuItemMapper=e.menuItemMapper,this.columnModel=e.columnModel,this.funcColsService=e.funcColsService,this.menuService=e.menuService}createMenu(e,t,i,r){let s=e.createManagedBean(new ka(0,{column:i??null,node:null,value:null})),a=this.menuItemMapper.mapWithStockItems(t,i??null,r,"columnMenu");return s.addMenuItems(a),s}getMenuItems(e,t){let i;let r=this.getDefaultMenuOptions(e),s=e?.getColDef().mainMenuItems;if(Array.isArray(s))i=s;else if("function"==typeof s)i=s(this.gos.addGridCommonParams({column:e,defaultItems:r}));else{let t=this.gos.getCallback("getMainMenuItems");i=t&&e?t({column:e,defaultItems:r}):r}return!function(e,t){if(e)for(let i=e.length-2;i>=0;i--){let r=e[i]===t,s=e[i+1]===t;r&&s&&e.splice(i+1,1)}}(i,OM),i}getDefaultMenuOptions(e){let t=[],i=this.menuService.isLegacyMenuEnabled();if(!e)return i||t.push("columnChooser"),t.push("resetColumns"),t;let r=!e.getColDef().lockPinned,s=this.funcColsService.getRowGroupColumns().length,a=e.isAllowValue(),o=e.isAllowRowGroup(),n=e.isPrimary(),l=this.columnModel.isPivotMode(),h=t4(this.gos),d=this.gos.get("treeData"),c=n&&s>0&&a||!n;if(!i&&e.isSortable()){let i=e.getSort();"asc"!==i&&t.push("sortAscending"),"desc"!==i&&t.push("sortDescending"),i&&t.push("sortUnSort"),t.push(OM)}return this.menuService.isFilterMenuItemEnabled(e)&&(t.push("columnFilter"),t.push(OM)),r&&t.push("pinSubMenu"),c&&t.push("valueAggSubMenu"),(r||c)&&t.push(OM),t.push("autoSizeThis"),t.push("autoSizeAll"),t.push(OM),e.getColDef().showRowGroup?t.push("rowUnGroup"):o&&e.isPrimary()&&(e.isRowGroupActive()?this.columnModel.isColGroupLocked(e)||t.push("rowUnGroup"):t.push("rowGroup")),t.push(OM),i||t.push("columnChooser"),t.push("resetColumns"),h&&(d||s>(l?1:0))&&(t.push("expandAll"),t.push("contractAll")),t}},OD="ag-context-menu-open",OI=class extends i2{constructor(){super(...arguments),this.beanName="contextMenuFactory"}wireBeans(e){this.popupService=e.popupService,this.ctrlsService=e.ctrlsService,this.columnModel=e.columnModel,this.menuUtils=e.menuUtils,this.rangeService=e.rangeService,this.focusService=e.focusService}hideActiveMenu(){this.destroyBean(this.activeMenu)}getMenuItems(e,t,i){let r=[];if(tY(e)&&this.gos.isModuleRegistered(tL.ClipboardModule)&&t&&(this.gos.get("suppressCutToClipboard")||r.push("cut"),r.push("copy","copyWithHeaders","copyWithGroupHeaders","paste","separator")),this.gos.get("enableCharts")&&this.gos.isModuleRegistered(tL.GridChartsModule)&&(this.columnModel.isPivotMode()&&r.push("pivotChart"),this.rangeService&&!this.rangeService.isEmpty()&&r.push("chartRange")),tY(e)){let e=!this.gos.isModuleRegistered(tL.CsvExportModule),t=!this.gos.isModuleRegistered(tL.ExcelExportModule),i=this.gos.get("suppressExcelExport")||t,s=this.gos.get("suppressCsvExport")||e;sc()||i&&s||r.push("export")}let s=r.length?r:void 0,a=t?.getColDef().contextMenuItems;if(Array.isArray(a))return a;if("function"==typeof a)return a(this.gos.addGridCommonParams({column:t,node:e,value:i,defaultItems:s}));let o=this.gos.getCallback("getContextMenuItems");return o?o({column:t,node:e,value:i,defaultItems:s}):r}onContextMenu(e,t,i,r,s,a){this.menuUtils.onContextMenu(e,t,e=>this.showMenu(i,r,s,e,a))}showMenu(e,t,i,r,s){let a=this.getMenuItems(e,t,i),o=this.ctrlsService.getGridBodyCtrl().getGui();if(void 0===a||tZ(a))return!1;let n=new Ok(a,t,e,i);this.createBean(n);let l=n.getGui();t||this.focusService.clearFocusedCell();let h={column:t,rowNode:e,type:"contextMenu",mouseEvent:r,ePopup:l,nudgeY:1},d=this.localeService.getLocaleTextFunc(),c=this.popupService.addPopup({modal:!0,eChild:l,closeOnEsc:!0,closedCallback:e=>{o.classList.remove(OD),this.destroyBean(n),this.dispatchVisibleChangedEvent(!1,void 0===e?"api":"ui")},click:r,positionCallback:()=>{let e=this.gos.get("enableRtl");this.popupService.positionPopupUnderMouseEvent({...h,nudgeX:e?-((l.offsetWidth+1)*1):1})},anchorToElement:s,ariaLabel:d("ariaLabelContextMenu","Context Menu")});c&&(o.classList.add(OD),n.afterGuiAttached({container:"contextMenu",hidePopup:c.hideFunc})),this.activeMenu&&this.hideActiveMenu(),this.activeMenu=n,n.addEventListener("destroyed",()=>{this.activeMenu===n&&(this.activeMenu=null)}),c&&n.addEventListener("closeMenu",e=>c.hideFunc({mouseEvent:e.mouseEvent??void 0,keyboardEvent:e.keyboardEvent??void 0,forceHide:!0}));let u=r&&r instanceof MouseEvent&&"mousedown"===r.type;return this.dispatchVisibleChangedEvent(!0,u?"api":"ui"),!0}dispatchVisibleChangedEvent(e,t="ui"){this.eventService.dispatchEvent({type:"contextMenuVisibleChanged",visible:e,source:t})}},Ok=class extends sQ{constructor(e,t,i,r){super('<div class="ag-menu" role="presentation"></div>'),this.menuItems=e,this.column=t,this.node=i,this.value=r,this.menuList=null,this.focusedCell=null}wireBeans(e){this.focusService=e.focusService,this.menuItemMapper=e.menuItemMapper,this.cellPositionUtils=e.cellPositionUtils}postConstruct(){let e=this.createManagedBean(new ka(0,{column:this.column,node:this.node,value:this.value})),t=this.menuItemMapper.mapWithStockItems(this.menuItems,null,()=>this.getGui(),"contextMenu");e.addMenuItems(t),this.appendChild(e),this.menuList=e,e.addEventListener("closeMenu",e=>this.dispatchLocalEvent(e))}afterGuiAttached(e){e.hidePopup&&this.addDestroyFunc(e.hidePopup),this.focusedCell=this.focusService.getFocusedCell(),this.menuList&&this.focusService.focusInto(this.menuList.getGui())}restoreFocusedCell(){let e=this.focusService.getFocusedCell();if(e&&this.focusedCell&&this.cellPositionUtils.equals(e,this.focusedCell)){let{rowIndex:e,rowPinned:t,column:i}=this.focusedCell;id(this.gos)&&this.focusService.setFocusedCell({rowIndex:e,column:i,rowPinned:t,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!this.focusService.isKeyboardMode()})}}destroy(){this.restoreFocusedCell(),super.destroy()}},OT="filterMenuTab",OA="generalMenuTab",OR="columnsMenuTab",OL=[OA,OT,OR],OP=class extends i2{constructor(){super(...arguments),this.beanName="enterpriseMenuFactory"}wireBeans(e){this.popupService=e.popupService,this.focusService=e.focusService,this.ctrlsService=e.ctrlsService,this.visibleColsService=e.visibleColsService,this.filterManager=e.filterManager,this.menuUtils=e.menuUtils,this.menuService=e.menuService,this.columnMenuFactory=e.columnMenuFactory}hideActiveMenu(){this.destroyBean(this.activeMenu)}showMenuAfterMouseEvent(e,t,i,r){let{column:s,columnGroup:a}=this.splitColumnOrGroup(e),o=r?"filterMenuTab":void 0;this.showMenu(s,a,e=>{let r=e.getGui();this.popupService.positionPopupUnderMouseEvent({type:i,column:s,mouseEvent:t,ePopup:r}),o&&e.showTab?.(o),this.dispatchVisibleChangedEvent(!0,!1,s,a,o)},i,o,void 0,t.target)}splitColumnOrGroup(e){let t=e&&rm(e);return{column:t?e:void 0,columnGroup:t?void 0:e}}showMenuAfterButtonClick(e,t,i,r){let s=-1,a="left";this.gos.get("enableRtl")&&(s=1,a="right");let o=r?"filterMenuTab":void 0,n=o?[o]:void 0,l=this.menuService.isLegacyMenuEnabled(),h=(l?9:4)*s,d=l?-23:4,{column:c,columnGroup:u}=this.splitColumnOrGroup(e);this.showMenu(c,u,e=>{let r=e.getGui();this.popupService.positionPopupByComponent({type:i,column:c,eventSource:t,ePopup:r,alignSide:a,nudgeX:h,nudgeY:d,position:"under",keepWithinBounds:!0}),o&&e.showTab?.(o),this.dispatchVisibleChangedEvent(!0,!1,c,u,o)},i,o,n,t)}showMenu(e,t,i,r,s,a,o){let n=this.getMenuParams(e,t,a,o);if(!n)return;let{menu:l,eMenuGui:h,anchorToElement:d,restoreFocusParams:c}=n,u=[];u.push(t=>{let i=l.getGui();this.destroyBean(l),e&&(e.setMenuVisible(!1,"contextMenu"),this.menuUtils.restoreFocusOnClose(c,i,t))});let p=this.localeService.getLocaleTextFunc();if(this.popupService.addPopup({modal:!0,eChild:h,closeOnEsc:!0,closedCallback:i=>{u.forEach(e=>e(i)),this.dispatchVisibleChangedEvent(!1,!1,e,t,s)},afterGuiAttached:e=>l.afterGuiAttached(Object.assign({},{container:r},e)),positionCallback:s?()=>i(l):void 0,ariaLabel:p("ariaLabelColumnMenu","Column Menu")}),s||(l.showTabBasedOnPreviousSelection?.(),i(l)),this.menuService.isColumnMenuAnchoringEnabled()){let t=this.popupService.setPopupPositionRelatedToElement(h,d);t&&e&&this.addStopAnchoring(t,e,u)}l.addEventListener("tabSelected",t=>{this.dispatchVisibleChangedEvent(!1,!0,e),this.lastSelectedTab=t.key,this.dispatchVisibleChangedEvent(!0,!0,e)}),e?.setMenuVisible(!0,"contextMenu"),this.activeMenu=l,l.addEventListener("destroyed",()=>{this.activeMenu===l&&(this.activeMenu=null)})}addStopAnchoring(e,t,i){e.then(e=>{t.addEventListener("leftChanged",e),t.addEventListener("visibleChanged",e),i.push(()=>{t.removeEventListener("leftChanged",e),t.removeEventListener("visibleChanged",e)})})}getMenuParams(e,t,i,r){let s={column:e,headerPosition:this.focusService.getFocusedHeader(),columnIndex:this.visibleColsService.getAllCols().indexOf(e),eventSource:r},a=this.createMenu(e,t,s,i,r);return a?{menu:a,eMenuGui:a.getGui(),anchorToElement:r||this.ctrlsService.getGridBodyCtrl().getGui(),restoreFocusParams:s}:void 0}createMenu(e,t,i,r,s){if(this.menuService.isLegacyMenuEnabled())return this.createBean(new OF(e,i,this.lastSelectedTab,r,s));{let r=this.columnMenuFactory.getMenuItems(e,t);return r.length?this.createBean(new ON(r,e,i,s)):void 0}}dispatchVisibleChangedEvent(e,t,i,r,s){this.eventService.dispatchEvent({type:"columnMenuVisibleChanged",visible:e,switchingTab:t,key:this.lastSelectedTab??s??(this.menuService.isLegacyMenuEnabled()?OA:"columnMenu"),column:i??null,columnGroup:r??null})}isMenuEnabled(e){if(!this.menuService.isLegacyMenuEnabled())return!0;let t=!this.filterManager?.isFilterAllowed(e),i=e.getColDef().menuTabs??OL;return(t&&i.includes(OT)?i.length-1:i.length)>0}showMenuAfterContextMenuEvent(e,t,i){this.menuUtils.onContextMenu(t,i,t=>(this.showMenuAfterMouseEvent(e,t,"columnMenu"),!0))}},OF=class extends i2{constructor(e,t,i,r,s){super(),this.column=e,this.restoreFocusParams=t,this.initialSelection=i,this.restrictTo=r,this.sourceElement=s,this.tabFactories={},this.includeChecks={},this.tabFactories[OA]=this.createMainPanel.bind(this),this.tabFactories[OT]=this.createFilterPanel.bind(this),this.tabFactories[OR]=this.createColumnsPanel.bind(this),this.includeChecks[OA]=()=>!0,this.includeChecks[OT]=()=>!!e&&!!this.filterManager?.isFilterAllowed(e),this.includeChecks[OR]=()=>!0}wireBeans(e){this.filterManager=e.filterManager,this.columnChooserFactory=e.columnChooserFactory,this.columnMenuFactory=e.columnMenuFactory,this.menuUtils=e.menuUtils}postConstruct(){let e=this.getTabsToCreate().map(e=>this.createTab(e));this.tabbedLayout=new kd({items:e,cssClass:"ag-menu",onActiveItemClicked:this.onHidePopup.bind(this),onItemClicked:this.onTabItemClicked.bind(this)}),this.createBean(this.tabbedLayout),this.mainMenuList&&this.mainMenuList.setParentComponent(this.tabbedLayout),this.addDestroyFunc(()=>this.destroyBean(this.tabbedLayout))}getTabsToCreate(){return this.restrictTo?this.restrictTo:(this.column?.getColDef().menuTabs??OL).filter(e=>this.isValidMenuTabItem(e)).filter(e=>this.isNotSuppressed(e)).filter(e=>this.isModuleLoaded(e))}isModuleLoaded(e){return e!==OR||this.gos.isModuleRegistered(tL.ColumnsToolPanelModule)}isValidMenuTabItem(e){let t=!0,i=OL;return null!=this.restrictTo&&(t=this.restrictTo.indexOf(e)>-1,i=this.restrictTo),(t=t&&OL.indexOf(e)>-1)||tO(`Trying to render an invalid menu item '${e}'. Check that your 'menuTabs' contains one of [${i}]`),t}isNotSuppressed(e){return this.includeChecks[e]()}createTab(e){return this.tabFactories[e]()}showTabBasedOnPreviousSelection(){this.showTab(this.initialSelection)}showTab(e){this.tabItemColumns&&e===OR?this.tabbedLayout.showItem(this.tabItemColumns):this.tabItemFilter&&e===OT?this.tabbedLayout.showItem(this.tabItemFilter):this.tabItemGeneral&&e===OA?this.tabbedLayout.showItem(this.tabItemGeneral):this.tabbedLayout.showFirstItem()}onTabItemClicked(e){let t=null;switch(e.item){case this.tabItemColumns:t=OR;break;case this.tabItemFilter:t=OT;break;case this.tabItemGeneral:t=OA}t&&this.activateTab(t)}activateTab(e){this.dispatchLocalEvent({type:"tabSelected",key:e})}createMainPanel(){return this.mainMenuList=this.columnMenuFactory.createMenu(this,this.columnMenuFactory.getMenuItems(this.column),this.column,()=>this.sourceElement??this.getGui()),this.mainMenuList.addEventListener("closeMenu",this.onHidePopup.bind(this)),this.tabItemGeneral={title:s2("menu",this.gos,this.column),titleLabel:OA.replace("MenuTab",""),bodyPromise:ab.resolve(this.mainMenuList.getGui()),name:OA},this.tabItemGeneral}onHidePopup(e){this.menuUtils.closePopupAndRestoreFocusOnSelect(this.hidePopupFunc,this.restoreFocusParams,e)}createFilterPanel(){let e=this.column?this.createBean(new oe(this.column,"COLUMN_MENU")):null;if(this.filterComp=e,!e?.hasFilter())throw Error("AG Grid - Unable to instantiate filter");return this.tabItemFilter={title:s2("filter",this.gos,this.column),titleLabel:OT.replace("MenuTab",""),bodyPromise:ab.resolve(e?.getGui()),afterAttachedCallback:t=>e.afterGuiAttached(t),afterDetachedCallback:()=>e.afterGuiDetached(),name:OT},this.tabItemFilter}createColumnsPanel(){let e=document.createElement("div");e.classList.add("ag-menu-column-select-wrapper");let t=this.columnChooserFactory.createColumnSelectPanel(this,this.column).getGui();return t.classList.add("ag-menu-column-select"),e.appendChild(t),this.tabItemColumns={title:s2("columns",this.gos,this.column),titleLabel:OR.replace("MenuTab",""),bodyPromise:ab.resolve(e),name:OR},this.tabItemColumns}afterGuiAttached(e){let{container:t,hidePopup:i}=e;this.tabbedLayout.setAfterAttachedParams({container:t,hidePopup:i}),i&&(this.hidePopupFunc=i,this.addDestroyFunc(i))}getGui(){return this.tabbedLayout.getGui()}destroy(){super.destroy(),this.destroyBean(this.filterComp)}},ON=class extends sQ{constructor(e,t,i,r){super(`
            <div data-ref="eColumnMenu" role="presentation" class="ag-menu ag-column-menu"></div>
        `),this.menuItems=e,this.column=t,this.restoreFocusParams=i,this.sourceElement=r,this.eColumnMenu=null}wireBeans(e){this.columnMenuFactory=e.columnMenuFactory,this.menuUtils=e.menuUtils,this.focusService=e.focusService}postConstruct(){this.mainMenuList=this.columnMenuFactory.createMenu(this,this.menuItems,this.column,()=>this.sourceElement??this.getGui()),this.mainMenuList.addEventListener("closeMenu",this.onHidePopup.bind(this)),this.eColumnMenu.appendChild(this.mainMenuList.getGui())}onHidePopup(e){this.menuUtils.closePopupAndRestoreFocusOnSelect(this.hidePopupFunc,this.restoreFocusParams,e)}afterGuiAttached({hidePopup:e}){e&&(this.hidePopupFunc=e,this.addDestroyFunc(e)),this.focusService.focusInto(this.mainMenuList.getGui())}},OO=class extends i2{constructor(){super(...arguments),this.beanName="menuItemMapper"}wireBeans(e){this.columnModel=e.columnModel,this.columnNameService=e.columnNameService,this.columnApplyStateService=e.columnApplyStateService,this.funcColsService=e.funcColsService,this.focusService=e.focusService,this.rowPositionUtils=e.rowPositionUtils,this.chartMenuItemMapper=e.chartMenuItemMapper,this.menuService=e.menuService,this.sortController=e.sortController,this.columnAutosizeService=e.columnAutosizeService,this.expansionService=e.expansionService,this.clipboardService=e.clipboardService,this.aggFuncService=e.aggFuncService,this.csvCreator=e.csvCreator,this.excelCreator=e.excelCreator}mapWithStockItems(e,t,i,r){if(!e)return[];let s=[];return e.forEach(e=>{let a;if(!(a="string"==typeof e?this.getStockMenuItem(e,t,i,r):{...e}))return;let{subMenu:o}=a;o&&o instanceof Array&&(a.subMenu=this.mapWithStockItems(o,t,i,r)),null!=a&&s.push(a)}),s}getStockMenuItem(e,t,i,r){let s=this.localeService.getLocaleTextFunc(),a=this.gos.get("skipHeaderOnAutoSize");switch(e){case"pinSubMenu":return{name:s("pinColumn","Pin Column"),icon:s2("menuPin",this.gos,null),subMenu:["clearPinned","pinLeft","pinRight"]};case"pinLeft":return{name:s("pinLeft","Pin Left"),action:()=>this.columnModel.setColsPinned([t],"left",r),checked:!!t&&t.isPinnedLeft()};case"pinRight":return{name:s("pinRight","Pin Right"),action:()=>this.columnModel.setColsPinned([t],"right",r),checked:!!t&&t.isPinnedRight()};case"clearPinned":return{name:s("noPin","No Pin"),action:()=>this.columnModel.setColsPinned([t],null,r),checked:!!t&&!t.isPinned()};case"valueAggSubMenu":if(!this.gos.assertModuleRegistered(tL.RowGroupingModule,"Aggregation from Menu")||!t?.isPrimary()&&!t?.getColDef().pivotValueColumn)return null;return{name:s("valueAggregation","Value Aggregation"),icon:s2("menuValue",this.gos,null),subMenu:this.createAggregationSubMenu(t,this.aggFuncService),disabled:this.gos.get("functionsReadOnly")};case"autoSizeThis":return{name:s("autosizeThisColumn","Autosize This Column"),action:()=>this.columnAutosizeService.autoSizeColumn(t,r,a)};case"autoSizeAll":return{name:s("autosizeAllColumns","Autosize All Columns"),action:()=>this.columnAutosizeService.autoSizeAllColumns(r,a)};case"rowGroup":return{name:s("groupBy","Group by")+" "+rL(this.columnNameService.getDisplayNameForColumn(t,"header")),disabled:this.gos.get("functionsReadOnly")||t?.isRowGroupActive()||!t?.getColDef().enableRowGroup,action:()=>this.funcColsService.addRowGroupColumns([t],r),icon:s2("menuAddRowGroup",this.gos,null)};case"rowUnGroup":{let e=s2("menuRemoveRowGroup",this.gos,null),i=t?.getColDef().showRowGroup,a=this.gos.get("groupLockGroupColumns");if(!0===i)return{name:s("ungroupAll","Un-Group All"),disabled:this.gos.get("functionsReadOnly")||-1===a||a>=this.funcColsService.getRowGroupColumns().length,action:()=>this.funcColsService.setRowGroupColumns(this.funcColsService.getRowGroupColumns().slice(0,a),r),icon:e};if("string"==typeof i){let t=this.columnModel.getColDefCol(i),a=null!=t?rL(this.columnNameService.getDisplayNameForColumn(t,"header")):i;return{name:s("ungroupBy","Un-Group by")+" "+a,disabled:this.gos.get("functionsReadOnly")||null!=t&&this.columnModel.isColGroupLocked(t),action:()=>this.funcColsService.removeRowGroupColumns([i],r),icon:e}}return{name:s("ungroupBy","Un-Group by")+" "+rL(this.columnNameService.getDisplayNameForColumn(t,"header")),disabled:this.gos.get("functionsReadOnly")||!t?.isRowGroupActive()||!t?.getColDef().enableRowGroup||this.columnModel.isColGroupLocked(t),action:()=>this.funcColsService.removeRowGroupColumns([t],r),icon:e}}case"resetColumns":return{name:s("resetColumns","Reset Columns"),action:()=>this.columnApplyStateService.resetColumnState(r)};case"expandAll":return{name:s("expandAll","Expand All Row Groups"),action:()=>this.expansionService.expandAll(!0)};case"contractAll":return{name:s("collapseAll","Collapse All Row Groups"),action:()=>this.expansionService.expandAll(!1)};case"copy":if(this.gos.assertModuleRegistered(tL.ClipboardModule,"Copy from Menu"))return{name:s("copy","Copy"),shortcut:s("ctrlC","Ctrl+C"),icon:s2("clipboardCopy",this.gos,null),action:()=>this.clipboardService.copyToClipboard()};return null;case"copyWithHeaders":if(this.gos.assertModuleRegistered(tL.ClipboardModule,"Copy with Headers from Menu"))return{name:s("copyWithHeaders","Copy with Headers"),icon:s2("clipboardCopy",this.gos,null),action:()=>this.clipboardService.copyToClipboard({includeHeaders:!0})};return null;case"copyWithGroupHeaders":if(this.gos.assertModuleRegistered(tL.ClipboardModule,"Copy with Group Headers from Menu"))return{name:s("copyWithGroupHeaders","Copy with Group Headers"),icon:s2("clipboardCopy",this.gos,null),action:()=>this.clipboardService.copyToClipboard({includeHeaders:!0,includeGroupHeaders:!0})};return null;case"cut":if(!this.gos.assertModuleRegistered(tL.ClipboardModule,"Cut from Menu"))return null;{let e=this.focusService.getFocusedCell(),t=e?this.rowPositionUtils.getRowNode(e):null,i=!!t&&e?.column.isCellEditable(t);return{name:s("cut","Cut"),shortcut:s("ctrlX","Ctrl+X"),icon:s2("clipboardCut",this.gos,null),disabled:!i||this.gos.get("suppressCutToClipboard"),action:()=>this.clipboardService.cutToClipboard(void 0,"contextMenu")}}case"paste":if(this.gos.assertModuleRegistered(tL.ClipboardModule,"Paste from Clipboard"))return{name:s("paste","Paste"),shortcut:s("ctrlV","Ctrl+V"),disabled:!0,icon:s2("clipboardPaste",this.gos,null),action:()=>this.clipboardService.pasteFromClipboard()};return null;case"export":{let e=[],t=this.gos.isModuleRegistered(tL.CsvExportModule),i=this.gos.isModuleRegistered(tL.ExcelExportModule);return!this.gos.get("suppressCsvExport")&&t&&e.push("csvExport"),!this.gos.get("suppressExcelExport")&&i&&e.push("excelExport"),{name:s("export","Export"),subMenu:e,icon:s2("save",this.gos,null)}}case"csvExport":return{name:s("csvExport","CSV Export"),icon:s2("csvExport",this.gos,null),action:()=>this.csvCreator?.exportDataAsCsv()};case"excelExport":return{name:s("excelExport","Excel Export"),icon:s2("excelExport",this.gos,null),action:()=>this.excelCreator?.exportDataAsExcel()};case"separator":return"separator";case"pivotChart":case"chartRange":return this.chartMenuItemMapper.getChartItems(e)??null;case"columnFilter":if(t)return{name:s("columnFilter","Column Filter"),icon:s2("filter",this.gos,null),action:()=>this.menuService.showFilterMenu({column:t,buttonElement:i(),containerType:"columnFilter",positionBy:"button"})};return null;case"columnChooser":if(this.gos.isModuleRegistered(tL.ColumnsToolPanelModule))return{name:s("columnChooser","Choose Columns"),icon:s2("columns",this.gos,null),action:()=>this.menuService.showColumnChooser({column:t,eventSource:i()})};return null;case"sortAscending":return{name:s("sortAscending","Sort Ascending"),icon:s2("sortAscending",this.gos,null),action:()=>this.sortController.setSortForColumn(t,"asc",!1,r)};case"sortDescending":return{name:s("sortDescending","Sort Descending"),icon:s2("sortDescending",this.gos,null),action:()=>this.sortController.setSortForColumn(t,"desc",!1,r)};case"sortUnSort":return{name:s("sortUnSort","Clear Sort"),icon:s2("sortUnSort",this.gos,null),action:()=>this.sortController.setSortForColumn(t,null,!1,r)};default:return tO(`unknown menu item type ${e}`),null}}createAggregationSubMenu(e,t){let i;let r=this.localeService.getLocaleTextFunc();if(e.isPrimary())i=e;else{let t=e.getColDef().pivotValueColumn;i=tY(t)?t:void 0}let s=[];if(i){let e=i.isValueActive(),a=t.getFuncNames(i);s.push({name:r("noAggregation","None"),action:()=>{this.funcColsService.removeValueColumns([i],"contextMenu"),this.funcColsService.setColumnAggFunc(i,void 0,"contextMenu")},checked:!e}),a.forEach(a=>{s.push({name:r(a,t.getDefaultFuncLabel(a)),action:()=>{this.funcColsService.setColumnAggFunc(i,a,"contextMenu"),this.funcColsService.addValueColumns([i],"contextMenu")},checked:e&&i.getAggFunc()===a})})}return s}},OB=class extends i2{constructor(){super(...arguments),this.beanName="menuUtils"}wireBeans(e){this.focusService=e.focusService,this.headerNavigationService=e.headerNavigationService,this.visibleColsService=e.visibleColsService}restoreFocusOnClose(e,t,i,r){let{eventSource:s}=e,a=i instanceof KeyboardEvent;if(!r&&!a||!s)return;let o=ih(this.gos);(t.contains(o)||id(this.gos))&&this.focusHeaderCell(e)}closePopupAndRestoreFocusOnSelect(e,t,i){let r;i&&i.keyboardEvent&&(r=i.keyboardEvent),e(r&&{keyboardEvent:r});let s=this.focusService.getFocusedCell();if(id(this.gos)){if(s){let{rowIndex:e,rowPinned:t,column:i}=s;this.focusService.setFocusedCell({rowIndex:e,column:i,rowPinned:t,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}else this.focusHeaderCell(t)}}onContextMenu(e,t,i){if((this.gos.get("allowContextMenuWithControlKey")||!e||!e.ctrlKey&&!e.metaKey)&&(e&&this.blockMiddleClickScrollsIfNeeded(e),!this.gos.get("suppressContextMenu")&&i(e??t.touches[0]))){let i=e??t;i&&i.cancelable&&i.preventDefault()}}async focusHeaderCell(e){let{column:t,columnIndex:i,headerPosition:r,eventSource:s}=e,a=await this.visibleColsService.getAllCols().some(e=>e===t);if(!t||t.isAlive()){if(a&&s&&sN(s)){let e=this.focusService.findTabbableParent(s);e&&(t&&this.headerNavigationService.scrollToColumn(t),e.focus())}else if(r&&-1!==i){let e=this.visibleColsService.getAllCols(),t=e[i]||iB(e);t&&this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:r.headerRowIndex,column:t}})}}}blockMiddleClickScrollsIfNeeded(e){this.gos.get("suppressMiddleClickScrolls")&&2===e.which&&e.preventDefault()}},OG="32.2.0",Oz={version:OG,moduleName:`${tL.MenuModule}-core`,beans:[OP,OI,OO,Ow,Ox,OE,OB],dependantModules:[IX],userComponents:[{name:"agMenuItem",classImp:Iq}]},O_={version:OG,moduleName:`${tL.MenuModule}-api`,apiFunctions:{showContextMenu:function(e,t){let{rowNode:i,column:r,value:s,x:a,y:o}=t||{},{x:n,y:l}=e.menuService.getContextMenuPosition(i,r);null!=a&&(n=a),null!=o&&(l=o),e.menuService.showContextMenu({mouseEvent:new MouseEvent("mousedown",{clientX:n,clientY:l}),rowNode:i,column:r,value:s})},showColumnChooser:function(e,t){e.menuService.showColumnChooser({chooserParams:t})},hideColumnChooser:function(e){e.menuService.hideColumnChooser()}},dependantModules:[Oz,h3]},OV={version:OG,moduleName:tL.MenuModule,dependantModules:[Oz,O_]},Oj=class e extends hu{constructor(){super('<div class="ag-multi-filter ag-menu-list-compact"></div>'),this.filterDefs=[],this.filters=[],this.guiDestroyFuncs=[],this.filterGuis=[],this.activeFilterIndices=[],this.lastActivatedMenuItem=null,this.afterFiltersReadyFuncs=[]}wireBeans(e){this.filterManager=e.filterManager,this.userComponentFactory=e.userComponentFactory,this.focusService=e.focusService}postConstruct(){this.initialiseTabGuard({onFocusIn:e=>this.onFocusIn(e)})}static getFilterDefs(e){let{filters:t}=e;return t&&t.length>0?t:[{filter:"agTextColumnFilter"},{filter:"agSetColumnFilter"}]}init(t){this.params=t,this.filterDefs=e.getFilterDefs(t);let{column:i,filterChangedCallback:r}=t;this.column=i,this.filterChangedCallback=r;let s=[];return this.filterDefs.forEach((e,t)=>{let i=this.createFilter(e,t);null!=i&&s.push(i)}),new ab(e=>{ab.all(s).then(t=>{this.filters=t,this.refreshGui("columnMenu").then(()=>{e()})})}).then(()=>{this.afterFiltersReadyFuncs.forEach(e=>e()),this.afterFiltersReadyFuncs.length=0})}refreshGui(e){return e===this.lastOpenedInContainer?ab.resolve():(this.tabGuardFeature.removeAllChildrenExceptTabGuards(),this.destroyChildren(),ab.all(this.filters.map((t,i)=>{let r;let s=this.filterDefs[i],a=this.getFilterTitle(t,s);if("subMenu"===s.display&&"toolPanel"!==e)r=this.insertFilterMenu(t,a).then(e=>e.getGui());else if("subMenu"===s.display||"accordion"===s.display){let e=this.insertFilterGroup(t,a);r=ab.resolve(e.getGui())}else r=ab.resolve(t.getGui());return r})).then(t=>{t.forEach((e,t)=>{t>0&&this.appendChild(sO('<div class="ag-filter-separator"></div>')),this.appendChild(e)}),this.filterGuis=t,this.lastOpenedInContainer=e}))}getFilterTitle(e,t){return null!=t.title?t.title:e instanceof oh?e.getFilterTitle():"Filter"}destroyChildren(){this.guiDestroyFuncs.forEach(e=>e()),this.guiDestroyFuncs.length=0,this.filterGuis.length=0}insertFilterMenu(e,t){let i=this.createBean(new kn);return i.init({menuItemDef:{name:t,subMenu:[],cssClasses:["ag-multi-filter-menu-item"],menuItem:Iq,menuItemParams:{cssClassPrefix:"ag-compact-menu-option",isCompact:!0}},level:0,isAnotherSubMenuOpen:()=>!1,childComponent:e,contextParams:{column:null,node:null,value:null}}).then(()=>{i.setParentComponent(this),this.guiDestroyFuncs.push(()=>this.destroyBean(i)),this.addManagedListeners(i,{menuItemActivated:e=>{this.lastActivatedMenuItem&&this.lastActivatedMenuItem!==e.menuItem&&this.lastActivatedMenuItem.deactivate(),this.lastActivatedMenuItem=e.menuItem}});let e=i.getGui();return i.addManagedElementListeners(e,{keydown:e=>{let{key:t}=e;switch(t){case aa.UP:case aa.RIGHT:case aa.DOWN:case aa.LEFT:e.preventDefault(),t===aa.RIGHT&&i.openSubMenu(!0)}},focusin:()=>i.activate(),focusout:()=>{i.isSubMenuOpen()||i.isSubMenuOpening()||i.deactivate()}}),i})}insertFilterGroup(e,t){let i=this.createBean(new IQ({title:t,cssIdentifier:"multi-filter"}));return this.guiDestroyFuncs.push(()=>this.destroyBean(i)),i.addItem(e.getGui()),i.toggleGroupExpand(!1),e.afterGuiAttached&&i.addManagedListeners(i,{expanded:()=>e.afterGuiAttached({container:this.lastOpenedInContainer,suppressFocus:!0,hidePopup:this.hidePopup})}),i}isFilterActive(){return this.filters.some(e=>e.isFilterActive())}getLastActiveFilterIndex(){return this.activeFilterIndices.length>0?this.activeFilterIndices[this.activeFilterIndices.length-1]:null}doesFilterPass(e,t){let i=!0;return this.filters.forEach(r=>{i&&r!==t&&r.isFilterActive()&&(i=r.doesFilterPass(e))}),i}getFilterType(){return"multi"}getModelFromUi(){return{filterType:this.getFilterType(),filterModels:this.filters.map(e=>"function"==typeof e.getModelFromUi?e.getModelFromUi():null)}}getModel(){return this.isFilterActive()?{filterType:this.getFilterType(),filterModels:this.filters.map(e=>e.isFilterActive()?e.getModel():null)}:null}setModel(e){let t=(e,t)=>new ab(i=>{let r=e.setModel(t);r?r.then(()=>i()):i()}),i=[];return null==e?i=this.filters.map((e,i)=>t(e,null).then(()=>{this.updateActiveList(i)})):this.filters.forEach((r,s)=>{let a=t(r,e.filterModels.length>s?e.filterModels[s]:null).then(()=>{this.updateActiveList(s)});i.push(a)}),ab.all(i).then(()=>{})}applyModel(e="api"){let t=!1;return this.filters.forEach(i=>{i instanceof oh&&(t=i.applyModel(e)||t)}),t}getChildFilterInstance(e){return this.filters[e]}afterGuiAttached(e){let t;e?(this.hidePopup=e.hidePopup,t=this.refreshGui(e.container)):(this.hidePopup=void 0,t=ab.resolve());let i=e?.suppressFocus;t.then(()=>{let{filterDefs:t}=this,r=!!i;t&&iY(t,(t,s)=>{let a=0===s,o=t.display&&"inline"!==t.display,n=i||!a||o,l={...e??{},suppressFocus:n},h=this.filters?.[s];if(h&&(this.executeFunctionIfExistsOnFilter(h,"afterGuiAttached",l),a&&!n&&(r=!0)),!i&&a&&o){let e=this.filterGuis[s];e&&(this.focusService.focusInto(e)||e.focus(),r=!0)}});let s=ih(this.gos);!r&&(id(this.gos)||this.getGui().contains(s))&&this.forceFocusOutOfContainer(!0)})}afterGuiDetached(){this.executeFunctionIfExists("afterGuiDetached")}onAnyFilterChanged(){this.executeFunctionIfExists("onAnyFilterChanged")}onNewRowsLoaded(){this.executeFunctionIfExists("onNewRowsLoaded")}destroy(){this.filters.forEach(e=>this.destroyBean(e)),this.filters.length=0,this.destroyChildren(),this.hidePopup=void 0,super.destroy()}executeFunctionIfExists(e,...t){iY(this.filters,i=>{this.executeFunctionIfExistsOnFilter(i,e,t)})}executeFunctionIfExistsOnFilter(e,t,...i){let r=e[t];"function"==typeof r&&r.apply(e,i)}createFilter(e,t){let i;let{filterModifiedCallback:r,doesRowPassOtherFilter:s}=this.params,a={...this.filterManager.createFilterParams(this.column,this.column.getColDef()),filterModifiedCallback:r,filterChangedCallback:e=>{this.executeWhenAllFiltersReady(()=>this.filterChanged(t,e))},doesRowPassOtherFilter:e=>s(e)&&this.doesFilterPass({node:e,data:e.data},i)},o=this.userComponentFactory.getFilterDetails(e,a,"agTextColumnFilter");if(!o)return null;let n=o.newAgStackInstance();return n&&n.then(e=>i=e),n}executeWhenAllFiltersReady(e){this.filters&&this.filters.length>0?e():this.afterFiltersReadyFuncs.push(e)}updateActiveList(e){let t=this.filters[e];i_(this.activeFilterIndices,e),t.isFilterActive()&&this.activeFilterIndices.push(e)}filterChanged(e,t){this.updateActiveList(e),this.filterChangedCallback(t);let i=this.filters[e];this.filters.forEach(e=>{e!==i&&"function"==typeof e.onAnyFilterChanged&&e.onAnyFilterChanged()})}onFocusIn(e){null==this.lastActivatedMenuItem||this.lastActivatedMenuItem.getGui().contains(e.target)||(this.lastActivatedMenuItem.deactivate(),this.lastActivatedMenuItem=null)}getModelAsString(e){if(!this.filters||!e?.filterModels?.length)return"";let t=this.getLastActiveFilterIndex()??0,i=this.filters[t];return i.getModelAsString?.(e.filterModels[t])??""}},OH=class extends sQ{constructor(){super('<div class="ag-multi-floating-filter ag-floating-filter-input"></div>'),this.floatingFilters=[],this.compDetailsList=[]}wireBeans(e){this.userComponentFactory=e.userComponentFactory,this.filterManager=e.filterManager}init(e){this.params=e;let{compDetailsList:t}=this.getCompDetailsList(e);return this.setParams(t)}setParams(e){let t=[];return e.forEach(e=>{let i=e?.newAgStackInstance();null!=i&&(this.compDetailsList.push(e),t.push(i))}),ab.all(t).then(e=>{e.forEach((e,t)=>{this.floatingFilters.push(e);let i=e.getGui();this.appendChild(i),t>0&&sC(i,!1)})})}onParamsUpdated(e){this.refresh(e)}refresh(e){this.params=e;let{compDetailsList:t,floatingFilterParamsList:i}=this.getCompDetailsList(e);t.length===this.compDetailsList.length&&t.every((e,t)=>!this.filterManager?.areFilterCompsDifferent(this.compDetailsList[t],e))?i.forEach((e,t)=>{let i=this.floatingFilters[t],r=!1;i.refresh&&null!==i.refresh(e)&&(r=!0),r||i.onParamsUpdated?.(e)}):(sL(this.getGui()),this.destroyBeans(this.floatingFilters),this.floatingFilters=[],this.compDetailsList=[],this.setParams(t))}getCompDetailsList(e){let t=[],i=[],r=e.filterParams;return Oj.getFilterDefs(r).forEach((r,s)=>{let a={...e,parentFilterInstance:e=>{this.parentMultiFilterInstance(t=>{let i=t.getChildFilterInstance(s);null!=i&&e(i)})}};rd(a.filterParams,r.filterParams);let o=this.getCompDetails(r,a);o&&(t.push(o),i.push(a))}),{compDetailsList:t,floatingFilterParamsList:i}}onParentModelChanged(e,t){t&&t.afterFloatingFilter||this.parentMultiFilterInstance(i=>{if(null==e)this.floatingFilters.forEach((e,i)=>{e.onParentModelChanged(null,t),sC(e.getGui(),0===i)});else{let r=i.getLastActiveFilterIndex();this.floatingFilters.forEach((i,s)=>{let a=e.filterModels.length>s?e.filterModels[s]:null;i.onParentModelChanged(a,t),sC(i.getGui(),null==r?0===s:s===r)})}})}destroy(){this.destroyBeans(this.floatingFilters),this.floatingFilters.length=0,super.destroy()}getCompDetails(e,t){let i=o3(this.frameworkOverrides,e,()=>this.filterManager.getDefaultFloatingFilter(this.params.column))??"agReadOnlyFloatingFilter";return this.userComponentFactory.getFloatingFilterCompDetails(e,t,i)}parentMultiFilterInstance(e){this.params.parentFilterInstance(t=>{if(!(t instanceof Oj))throw Error("AG Grid - MultiFloatingFilterComp expects MultiFilter as its parent");e(t)})}},OU="32.2.0",OW={version:OU,moduleName:`${tL.MultiFilterModule}-core`,userComponents:[{name:"agMultiColumnFilter",classImp:Oj},{name:"agMenuItem",classImp:Iq}],dependantModules:[IX,no]},O$={version:OU,moduleName:tL.MultiFilterModule,dependantModules:[OW,{version:OU,moduleName:"@ag-grid-enterprise/multi-floating-filter",userComponents:[{name:"agMultiColumnFloatingFilter",classImp:OH}],dependantModules:[OW,nh]}]},OY=class extends av{constructor(){super('<div class="ag-cell-edit-wrapper"></div>')}init(e){this.params=e;let{cellStartedEdit:t,values:i}=e;tK(i)&&tO("agRichSelectCellEditor requires cellEditorParams.values to be set");let{params:r,valuesPromise:s}=this.buildRichSelectParams();this.richSelect=this.createManagedBean(new I9(r)),this.richSelect.addCssClass("ag-cell-editor"),this.appendChild(this.richSelect),s&&s.then(e=>{this.richSelect.setValueList({valueList:e,refresh:!0});let t=this.getSearchStringCallback(e);t&&this.richSelect.setSearchStringCreator(t)}),this.addManagedListeners(this.richSelect,{fieldPickerValueSelected:this.onEditorPickerValueSelected.bind(this)}),this.focusAfterAttached=t}onEditorPickerValueSelected(e){setTimeout(()=>this.params.stopEditing(!e.fromEnterKey))}buildRichSelectParams(){let e,t;let{cellRenderer:i,cellHeight:r,value:s,values:a,formatValue:o,searchDebounceDelay:n,valueListGap:l,valueListMaxHeight:h,valueListMaxWidth:d,allowTyping:c,filterList:u,searchType:p,highlightMatch:g,valuePlaceholder:m,eventKey:f,multiSelect:v,suppressDeselectAll:y,suppressMultiSelectPillRenderer:C}=this.params,w={value:s,cellRenderer:i,cellRowHeight:r,searchDebounceDelay:n,valueFormatter:o,pickerAriaLabelKey:"ariaLabelRichSelectField",pickerAriaLabelValue:"Rich Select Field",pickerType:"virtual-list",pickerGap:l,allowTyping:c,filterList:u,searchType:p,highlightMatch:g,maxPickerHeight:h,maxPickerWidth:d,placeholder:m,initialInputValue:f?.length===1?f:void 0,multiSelect:v,suppressDeselectAll:y,suppressMultiSelectPillRenderer:C};return Array.isArray(e="function"==typeof a?a(this.params):a??[])?(w.valueList=e,w.searchStringCreator=this.getSearchStringCallback(e)):t=e,v&&c&&(this.params.allowTyping=w.allowTyping=!1,tO("agRichSelectCellEditor cannot have `multiSelect` and `allowTyping` set to `true`. AllowTyping has been turned off.")),{params:w,valuesPromise:t}}getSearchStringCallback(e){let{colDef:t}=this.params;if("object"==typeof e[0]&&t.keyCreator)return e=>e.map(e=>{let i=this.gos.addGridCommonParams({value:e,colDef:this.params.colDef,column:this.params.column,node:this.params.node,data:this.params.data});return t.keyCreator(i)})}afterGuiAttached(){let{focusAfterAttached:e,params:t}=this;setTimeout(()=>{if(!this.isAlive())return;if(e){let e=this.richSelect.getFocusableElement();e.focus();let{allowTyping:t,eventKey:i}=this.params;t&&(!i||1!==i.length)&&e.select()}this.richSelect.showPicker();let{eventKey:i}=t;i&&i?.length===1&&this.richSelect.searchTextFromString(i)})}focusIn(){this.richSelect.getFocusableElement().focus()}getValue(){return this.richSelect.getValue()}isPopup(){return!1}},OK={version:"32.2.0",moduleName:tL.RichSelectModule,beans:[],userComponents:[{name:"agRichSelect",classImp:OY},{name:"agRichSelectCellEditor",classImp:OY}],dependantModules:[IX,l4]},OZ=class extends i2{constructor(){super(...arguments),this.beanName="ssrmBlockUtils"}wireBeans(e){this.valueService=e.valueService,this.showRowGroupColsService=e.showRowGroupColsService,this.nodeManager=e.ssrmNodeManager,this.beans=e,this.expansionService=e.expansionService,this.serverSideRowModel=e.rowModel,this.storeFactory=e.ssrmStoreFactory}createRowNode(e){let t=new a7(this.beans),i=null!=e.rowHeight?e.rowHeight:it(this.gos);return t.setRowHeight(i),t.group=e.group,t.leafGroup=e.leafGroup,t.level=e.level,t.uiLevel=e.level,t.parent=e.parent,t.stub=!0,t.__needsRefreshWhenVisible=!1,t.group&&(t.expanded=!1,t.field=e.field,t.rowGroupColumn=e.rowGroupColumn),t}destroyRowNodes(e){e&&e.forEach(e=>this.destroyRowNode(e))}destroyRowNode(e,t=!1){e.childStore&&!t&&(this.destroyBean(e.childStore),e.childStore=null),e.sibling&&!e.footer&&this.destroyRowNode(e.sibling,!1),e.clearRowTopAndRowIndex(),null!=e.id&&this.nodeManager.removeNode(e)}setTreeGroupInfo(e){e.updateHasChildren();let t=this.gos.get("getServerSideGroupKey");e.hasChildren()&&null!=t&&(e.key=t(e.data)),e.hasChildren()||null==e.childStore||(this.destroyBean(e.childStore),e.childStore=null,e.expanded=!1)}setRowGroupInfo(e){if(e.key=this.valueService.getValue(e.rowGroupColumn,e),(null===e.key||void 0===e.key)&&tF(()=>{tO("null and undefined values are not allowed for server side row model keys"),e.rowGroupColumn&&tO(`column = ${e.rowGroupColumn.getId()}`),tO("data is "+e.data)},"ServerSideBlock-CannotHaveNullOrUndefinedForKey"),this.gos.get("groupAllowUnbalanced")&&""===e.key){let t=this.serverSideRowModel.getParams();e.childStore=this.createBean(this.storeFactory.createStore(t,e))}iv(this.beans.gos)({node:e})&&(e.createFooter(),e.sibling&&(e.sibling.uiLevel=e.uiLevel+1))}setMasterDetailInfo(e){let t=this.gos.get("isRowMaster");null!=t?e.master=t(e.data):e.master=!0}updateDataIntoRowNode(e,t){e.updateData(t),this.gos.get("treeData")?(this.setTreeGroupInfo(e),this.setChildCountIntoRowNode(e)):e.group?(this.setChildCountIntoRowNode(e),!e.footer&&(iv(this.beans.gos)({node:e})?e.sibling?e.sibling.updateData(t):e.createFooter():e.sibling&&e.destroyFooter())):this.gos.get("masterDetail")}setDataIntoRowNode(e,t,i,r){e.stub=!1;let s=this.gos.get("treeData");tY(t)?(e.setDataAndId(t,i),s?this.setTreeGroupInfo(e):e.group?this.setRowGroupInfo(e):this.gos.get("masterDetail")&&this.setMasterDetailInfo(e)):(e.setDataAndId(void 0,void 0),e.key=null),(s||e.group)&&(this.setGroupDataIntoRowNode(e),this.setChildCountIntoRowNode(e)),tY(t)&&(e.setRowHeight(ie(this.gos,e,!1,r).height),e.sibling?.setRowHeight(ie(this.gos,e.sibling,!1,r).height))}setChildCountIntoRowNode(e){let t=this.gos.get("getChildCount");t&&e.setAllChildrenCount(t(e.data))}setGroupDataIntoRowNode(e){let t=this.showRowGroupColsService?.getShowRowGroupCols()??[],i=this.gos.get("treeData");t.forEach(t=>{if(null==e.groupData&&(e.groupData={}),i)e.groupData[t.getColId()]=e.key;else if(t.isRowGroupDisplayed(e.rowGroupColumn.getId())){let i=this.valueService.getValue(e.rowGroupColumn,e);e.groupData[t.getColId()]=i}})}clearDisplayIndex(e){e.clearRowTopAndRowIndex(),e.hasChildren()&&tY(e.childStore)&&e.childStore.clearDisplayIndexes(),e.master&&e.detailNode&&e.detailNode.clearRowTopAndRowIndex()}setDisplayIndex(e,t,i,r){let s=this.gos.get("groupAllowUnbalanced")&&e.group&&""===e.key;if(this.gos.get("groupHideOpenParents")&&e.group&&e.expanded||s?(e.setRowIndex(null),e.setRowTop(null)):(e.setRowIndex(t.next()),e.setRowTop(i.value),i.value+=e.rowHeight),e.setUiLevel(r),!e.footer&&(e.master&&(e.expanded&&e.detailNode?(e.detailNode.setRowIndex(t.next()),e.detailNode.setRowTop(i.value),i.value+=e.detailNode.rowHeight):e.detailNode&&e.detailNode.clearRowTopAndRowIndex()),e.hasChildren()&&tY(e.childStore))){let a=e.childStore;e.expanded||s?a.setDisplayIndexes(t,i,s?r:r+1):a.clearDisplayIndexes()}}binarySearchForDisplayIndex(e,t){let i=0,r=t.length-1;if(tK(r)||tK(i)){tO(`error: topPointer = ${r}, bottomPointer = ${i}`);return}for(;;){let s=Math.floor((i+r)/2),a=t[s];if(a.rowIndex===e)return a;let o=a.master&&a.expanded,n=a.detailNode;if(o&&n&&n.rowIndex===e)return a.detailNode;let l=a.childStore;if(a.expanded&&l&&l.isDisplayIndexInStore(e))return l.getRowUsingDisplayIndex(e);if(a.rowIndex<e)i=s+1;else if(a.rowIndex>e)r=s-1;else{tO(`error: unable to locate rowIndex = ${e} in cache`);return}}}extractRowBounds(e,t){let i=e=>({rowHeight:e.rowHeight,rowTop:e.rowTop});if(e.rowIndex===t)return i(e);if(e.hasChildren()&&e.expanded&&tY(e.childStore)){let i=e.childStore;if(i.isDisplayIndexInStore(t))return i.getRowBounds(t)}else if(e.master&&e.expanded&&tY(e.detailNode)&&e.detailNode.rowIndex===t)return i(e.detailNode)}isPixelInNodeRange(e,t){return!!(tY(e.rowTop)&&tY(e.rowHeight))&&t>=e.rowTop&&t<e.rowTop+e.rowHeight}getIndexAtPixel(e,t){if(this.isPixelInNodeRange(e,t))return e.rowIndex;let i=e.master&&e.expanded,r=e.detailNode;if(i&&r&&this.isPixelInNodeRange(r,t))return e.detailNode.rowIndex;if(e.hasChildren()&&e.expanded&&tY(e.childStore)){let i=e.childStore;if(i.isPixelInRange(t))return i.getRowIndexAtPixel(t)}return null}createNodeIdPrefix(e){let t=[],i=e;for(;i&&i.level>=0;)""===i.key?t.push("ag-Grid-MissingKey"):t.push(i.key),i=i.parent;if(t.length>0)return t.reverse().join("-")}checkOpenByDefault(e){return this.expansionService.checkOpenByDefault(e)}},Oq=class extends i2{constructor(){super(...arguments),this.beanName="ssrmExpandListener"}wireBeans(e){this.serverSideRowModel=e.rowModel,this.storeFactory=e.ssrmStoreFactory,this.beans=e}postConstruct(){t6(this.gos)&&this.addManagedEventListeners({rowGroupOpened:this.onRowGroupOpened.bind(this)})}onRowGroupOpened(e){let t=e.node;if(t.expanded){if(t.master)this.createDetailNode(t);else if(tK(t.childStore)){let e=this.serverSideRowModel.getParams();t.childStore=this.createBean(this.storeFactory.createStore(e,t))}}else this.gos.get("purgeClosedRowNodes")&&tY(t.childStore)&&(t.childStore=this.destroyBean(t.childStore));this.eventService.dispatchEvent({type:"storeUpdated"})}createDetailNode(e){if(tY(e.detailNode))return e.detailNode;let t=new a7(this.beans);t.detail=!0,t.selectable=!1,t.parent=e,tY(e.id)&&(t.id="detail_"+e.id),t.data=e.data,t.level=e.level+1;let i=ie(this.gos,t).height;return t.rowHeight=i||200,e.detailNode=t,t}},OX=class extends i2{constructor(){super(...arguments),this.beanName="ssrmFilterListener"}wireBeans(e){this.serverSideRowModel=e.rowModel,this.filterManager=e.filterManager,this.listenerUtils=e.ssrmListenerUtils}postConstruct(){t6(this.gos)&&this.addManagedEventListeners({advancedFilterEnabledChanged:()=>this.onFilterChanged(!0),filterChanged:()=>this.onFilterChanged()})}onFilterChanged(e){let t,i;let r=this.serverSideRowModel.getParams();if(!r)return;let s=r.filterModel;if(this.filterManager?.isAdvancedFilterEnabled()){t=this.filterManager.getAdvancedFilterModel();let r=e?Object.keys(s??{}):this.getAdvancedFilterColumns(s),a=this.getAdvancedFilterColumns(t);r.forEach(e=>a.add(e)),i=Array.from(a)}else if(t=this.filterManager?.getFilterModel()??{},e){let e=this.getAdvancedFilterColumns(s);Object.keys(t).forEach(t=>e.add(t)),i=Array.from(e)}else i=this.findChangedColumns(s,t);let a={valueColChanged:this.listenerUtils.isSortingWithValueColumn(i),secondaryColChanged:this.listenerUtils.isSortingWithSecondaryColumn(i),changedColumns:i};this.serverSideRowModel.refreshAfterFilter(t,a)}findChangedColumns(e,t){let i={};Object.keys(e).forEach(e=>i[e]=!0),Object.keys(t).forEach(e=>i[e]=!0);let r=[];return Object.keys(i).forEach(i=>{JSON.stringify(e[i])!=JSON.stringify(t[i])&&r.push(i)}),r}getAdvancedFilterColumns(e){let t=new Set;if(!e)return t;let i=e=>{"join"===e.filterType?e.conditions.forEach(e=>i(e)):t.add(e.colId)};return i(e),t}},OQ=class extends i2{constructor(){super(...arguments),this.beanName="ssrmListenerUtils"}wireBeans(e){this.pivotResultColsService=e.pivotResultColsService,this.funcColsService=e.funcColsService}isSortingWithValueColumn(e){let t=this.funcColsService.getValueColumns().map(e=>e.getColId());for(let i=0;i<e.length;i++)if(t.indexOf(e[i])>-1)return!0;return!1}isSortingWithSecondaryColumn(e){let t=this.pivotResultColsService.getPivotResultCols();if(!t)return!1;let i=t.list.map(e=>e.getColId());for(let t=0;t<e.length;t++)if(i.indexOf(e[t])>-1)return!0;return!1}},OJ=class extends i2{constructor(){super(...arguments),this.beanName="ssrmSortService"}wireBeans(e){this.sortController=e.sortController,this.serverSideRowModel=e.rowModel,this.listenerUtils=e.ssrmListenerUtils}postConstruct(){t6(this.gos)&&this.addManagedEventListeners({sortChanged:this.onSortChanged.bind(this)})}onSortChanged(){let e=this.serverSideRowModel.getParams();if(!e)return;let t=this.sortController.getSortModel(),i=e.sortModel,r=this.findChangedColumnsInSort(t,i),s=this.listenerUtils.isSortingWithValueColumn(r),a=this.listenerUtils.isSortingWithSecondaryColumn(r);this.serverSideRowModel.refreshAfterSort(t,{valueColChanged:s,secondaryColChanged:a,changedColumns:r})}findChangedColumnsInSort(e,t){let i=[];[e,t].forEach(e=>{if(e){let t=e.map(e=>e.colId);i=i.concat(t)}});let r=(e,t)=>(e?e.sort:null)!==(t?t.sort:null),s=(i,r)=>(i?t.indexOf(i):-1)!==(r?e.indexOf(r):-1);return i.filter(i=>{let a=t.find(e=>e.colId===i),o=e.find(e=>e.colId===i);return r(a,o)||s(a,o)})}},O0=class extends i2{constructor(){super(...arguments),this.beanName="ssrmNodeManager",this.rowNodes={}}addRowNode(e){let t=e.id;this.rowNodes[t]&&(tO(`Duplicate node id ${e.id}. Row IDs are provided via the getRowId() callback. Please modify the getRowId() callback code to provide unique row id values.`),tO("first instance",this.rowNodes[t].data),tO("second instance",e.data)),this.rowNodes[t]=e}removeNode(e){let t=e.id;this.rowNodes[t]&&(this.rowNodes[t]=void 0)}destroy(){this.clear(),super.destroy()}clear(){this.rowNodes={},super.destroy()}},O1=class extends hr{constructor(e,t,i){super(0),this.nodeIdSequence=new sK,this.info={},this.ssrmParams=e,this.parentRowNode=i,this.level=i.level+1,this.groupLevel=e.rowGroupCols?this.level<e.rowGroupCols.length:void 0,this.leafGroup=!!e.rowGroupCols&&this.level===e.rowGroupCols.length-1}wireBeans(e){this.storeUtils=e.ssrmStoreUtils,this.blockUtils=e.ssrmBlockUtils,this.funcColsService=e.funcColsService,this.rowNodeBlockLoader=e.rowNodeBlockLoader,this.rowNodeSorter=e.rowNodeSorter,this.sortController=e.sortController,this.selectionService=e.selectionService,this.nodeManager=e.ssrmNodeManager,this.filterManager=e.filterManager,this.transactionManager=e.ssrmTransactionManager,this.serverSideRowModel=e.rowModel}postConstruct(){if(this.usingTreeData=this.gos.get("treeData"),this.nodeIdPrefix=this.blockUtils.createNodeIdPrefix(this.parentRowNode),!this.usingTreeData&&this.groupLevel){let e=this.ssrmParams.rowGroupCols[this.level];this.groupField=e.field,this.rowGroupColumn=this.funcColsService.getRowGroupColumns()[this.level]}let e=1,t=-1===this.parentRowNode.level,i=this.storeUtils.getServerSideInitialRowCount();t&&null!=i&&(e=i),this.initialiseRowNodes(e),this.rowNodeBlockLoader.addBlock(this),this.addDestroyFunc(()=>this.rowNodeBlockLoader.removeBlock(this)),this.postSortFunc=this.gos.getCallback("postSortRows"),null!=i&&this.eventService.dispatchEventOnce({type:"rowCountReady"})}destroy(){this.destroyRowNodes(),super.destroy()}destroyRowNodes(){this.blockUtils.destroyRowNodes(this.allRowNodes),this.allRowNodes=[],this.nodesAfterSort=[],this.nodesAfterFilter=[],this.allNodesMap={}}initialiseRowNodes(e,t=!1){this.destroyRowNodes();for(let i=0;i<e;i++){let e=this.blockUtils.createRowNode({field:this.groupField,group:this.groupLevel,leafGroup:this.leafGroup,level:this.level,parent:this.parentRowNode,rowGroupColumn:this.rowGroupColumn});t&&(e.failedLoad=!0),this.allRowNodes.push(e),this.nodesAfterFilter.push(e),this.nodesAfterSort.push(e)}}getBlockStateJson(){return{id:this.nodeIdPrefix?this.nodeIdPrefix:"",state:this.getState()}}loadFromDatasource(){this.storeUtils.loadFromDatasource({startRow:void 0,endRow:void 0,parentBlock:this,parentNode:this.parentRowNode,storeParams:this.ssrmParams,success:this.success.bind(this,this.getVersion()),fail:this.pageLoadFailed.bind(this,this.getVersion())})}getStartRow(){return 0}getEndRow(){return this.nodesAfterSort.length}createDataNode(e,t){let i=this.blockUtils.createRowNode({field:this.groupField,group:this.groupLevel,leafGroup:this.leafGroup,level:this.level,parent:this.parentRowNode,rowGroupColumn:this.rowGroupColumn});null!=t?iV(this.allRowNodes,i,t):this.allRowNodes.push(i);let r=this.prefixId(this.nodeIdSequence.next());return this.blockUtils.setDataIntoRowNode(i,e,r,void 0),this.nodeManager.addRowNode(i),this.blockUtils.checkOpenByDefault(i),this.allNodesMap[i.id]=i,i}prefixId(e){return this.nodeIdPrefix?this.nodeIdPrefix+"-"+e:e.toString()}processServerFail(){this.initialiseRowNodes(1,!0),this.fireStoreUpdatedEvent(),this.flushAsyncTransactions()}processServerResult(e){if(!this.isAlive())return;let t=e.groupLevelInfo;t&&Object.assign(this.info,t),e.pivotResultFields&&this.serverSideRowModel.generateSecondaryColumns(e.pivotResultFields);let i=this.allRowNodes.length>0?this.allNodesMap:void 0;this.allRowNodes=[],this.nodesAfterSort=[],this.nodesAfterFilter=[],this.allNodesMap={},e.rowData||tO('"params.data" is missing from Server-Side Row Model success() callback. Please use the "data" attribute. If no data is returned, set an empty list.'),this.createOrRecycleNodes(i,e.rowData),i&&this.blockUtils.destroyRowNodes(rh(i)),0===this.level&&this.eventService.dispatchEventOnce({type:"rowCountReady"}),this.filterAndSortNodes(),this.fireStoreUpdatedEvent(),this.flushAsyncTransactions()}createOrRecycleNodes(e,t){if(!t)return;let i=t=>{if(!e)return;let i=iw(this.gos);if(!i)return;let r=this.parentRowNode.getRoute()??[],s=this.level,a=i({data:t,parentKeys:r.length>0?r:void 0,level:s}),o=e[a];if(o)return delete e[a],o},r=(e,t)=>{this.allNodesMap[e.id]=e,this.blockUtils.updateDataIntoRowNode(e,t),this.allRowNodes.push(e)};t.forEach(e=>{let t=i(e);t?r(t,e):this.createDataNode(e)})}flushAsyncTransactions(){window.setTimeout(()=>this.transactionManager.flushAsyncTransactions(),0)}filterAndSortNodes(){this.filterRowNodes(),this.sortRowNodes()}sortRowNodes(){let e=this.storeUtils.isServerSideSortAllLevels()||this.storeUtils.isServerSideSortOnServer(),t=this.sortController.getSortOptions(),i=!t||0==t.length;if(e||i){this.nodesAfterSort=this.nodesAfterFilter;return}if(this.nodesAfterSort=this.rowNodeSorter.doFullSort(this.nodesAfterFilter,t),this.postSortFunc){let e={nodes:this.nodesAfterSort};this.postSortFunc(e)}}filterRowNodes(){let e=!this.storeUtils.isServerSideOnlyRefreshFilteredGroups()||this.storeUtils.isServerSideFilterOnServer(),t=this.groupLevel;if(e||t){this.nodesAfterFilter=this.allRowNodes;return}this.nodesAfterFilter=this.filterManager?this.allRowNodes.filter(e=>this.filterManager.doesRowPassFilter({rowNode:e})):this.allRowNodes}clearDisplayIndexes(){this.displayIndexStart=void 0,this.displayIndexEnd=void 0,this.allRowNodes.forEach(e=>this.blockUtils.clearDisplayIndex(e))}getDisplayIndexEnd(){return this.displayIndexEnd}isDisplayIndexInStore(e){return 0!==this.getRowCount()&&e>=this.displayIndexStart&&e<this.displayIndexEnd}setDisplayIndexes(e,t,i){this.displayIndexStart=e.peek(),this.topPx=t.value;let r={};this.nodesAfterSort.forEach(s=>{this.blockUtils.setDisplayIndex(s,e,t,i),r[s.id]=!0}),this.allRowNodes.forEach(e=>{r[e.id]||this.blockUtils.clearDisplayIndex(e)}),this.displayIndexEnd=e.peek(),this.heightPx=t.value-this.topPx}forEachStoreDeep(e,t=new sK){e(this,t.next()),this.allRowNodes.forEach(i=>{let r=i.childStore;r&&r.forEachStoreDeep(e,t)})}forEachNodeDeep(e,t=new sK){this.allRowNodes.forEach(i=>{e(i,t.next());let r=i.childStore;r&&r.forEachNodeDeep(e,t)})}forEachNodeDeepAfterFilterAndSort(e,t=new sK,i=!1){this.nodesAfterSort.forEach(r=>{e(r,t.next());let s=r.childStore;s&&s.forEachNodeDeepAfterFilterAndSort(e,t,i)}),i&&this.parentRowNode.sibling&&e(this.parentRowNode.sibling,t.next())}getRowUsingDisplayIndex(e){if(this.isDisplayIndexInStore(e))return this.blockUtils.binarySearchForDisplayIndex(e,this.nodesAfterSort)}getRowBounds(e){for(let t=0;t<this.nodesAfterSort.length;t++){let i=this.nodesAfterSort[t],r=this.blockUtils.extractRowBounds(i,e);if(r)return r}return null}isPixelInRange(e){return e>=this.topPx&&e<this.topPx+this.heightPx}getRowIndexAtPixel(e){if(e<=this.topPx)return this.nodesAfterSort[0].rowIndex;if(e>=this.topPx+this.heightPx){let t=this.nodesAfterSort[this.nodesAfterSort.length-1];if(!t)return null;if(e>=t.rowTop+t.rowHeight&&t.expanded){if(t.childStore&&t.childStore.getRowCount()>0)return t.childStore.getRowIndexAtPixel(e);if(t.detailNode)return t.detailNode.rowIndex}return t.rowIndex}let t=null;return(this.nodesAfterSort.forEach(i=>{let r=this.blockUtils.getIndexAtPixel(i,e);null!=r&&(t=r)}),null==t)?this.displayIndexEnd-1:t}getChildStore(e){return this.storeUtils.getChildStore(e,this,e=>this.allRowNodes.find(t=>t.key==e))}forEachChildStoreShallow(e){this.allRowNodes.forEach(t=>{let i=t.childStore;i&&e(i)})}refreshAfterFilter(e){let t=this.storeUtils.isServerSideFilterOnServer(),i=this.storeUtils.isServerRefreshNeeded(this.parentRowNode,this.ssrmParams.rowGroupCols,e);if(!this.storeUtils.isServerSideOnlyRefreshFilteredGroups()||t&&i){this.refreshStore(!0),this.sortRowNodes();return}this.filterRowNodes(),this.sortRowNodes(),this.forEachChildStoreShallow(t=>t.refreshAfterFilter(e))}refreshAfterSort(e){let t=this.storeUtils.isServerSideSortOnServer(),i=this.storeUtils.isServerRefreshNeeded(this.parentRowNode,this.ssrmParams.rowGroupCols,e);if(this.storeUtils.isServerSideSortAllLevels()||t&&i){this.refreshStore(!0),this.filterRowNodes();return}this.filterRowNodes(),this.sortRowNodes(),this.forEachChildStoreShallow(t=>t.refreshAfterSort(e))}applyTransaction(e){switch(this.getState()){case"failed":return{status:hi.StoreLoadingFailed};case"loading":return{status:hi.StoreLoading};case"needsLoading":return{status:hi.StoreWaitingToLoad}}let t=this.gos.getCallback("isApplyServerSideTransaction");if(t&&!t({transaction:e,parentNode:this.parentRowNode,groupLevelInfo:this.info}))return{status:hi.Cancelled};let i={status:hi.Applied,remove:[],update:[],add:[]},r=[];return this.executeAdd(e,i),this.executeRemove(e,i,r),this.executeUpdate(e,i,r),this.filterAndSortNodes(),this.updateSelection(r),i}updateSelection(e){e.length>0&&(this.selectionService.setNodesSelected({newValue:!1,nodes:e,suppressFinishActions:!0,clearSelection:!1,source:"rowDataChanged"}),this.eventService.dispatchEvent({type:"selectionChanged",source:"rowDataChanged"}))}executeAdd(e,t){let{add:i,addIndex:r}=e;tZ(i)||("number"==typeof r&&r>=0?i.reverse().forEach(e=>{let i=this.createDataNode(e,r);t.add.push(i)}):i.forEach(e=>{let i=this.createDataNode(e);t.add.push(i)}))}executeRemove(e,t,i){let{remove:r}=e;if(null==r)return;let s={};r.forEach(e=>{let r=this.lookupRowNode(e);r&&(r.isSelected()&&i.push(r),r.clearRowTopAndRowIndex(),s[r.id]=!0,delete this.allNodesMap[r.id],t.remove.push(r),this.nodeManager.removeNode(r))}),this.allRowNodes=this.allRowNodes.filter(e=>!s[e.id])}executeUpdate(e,t,i){let{update:r}=e;null!=r&&r.forEach(e=>{let r=this.lookupRowNode(e);r&&(this.blockUtils.updateDataIntoRowNode(r,e),!r.selectable&&r.isSelected()&&i.push(r),t.update.push(r))})}lookupRowNode(e){let t=iw(this.gos);if(null!=t){let i=this.parentRowNode.getRoute()??[],r=t({data:e,parentKeys:i.length>0?i:void 0,level:this.level});return this.allNodesMap[r]||(tB(`could not find row id=${r}, data item was not found for this id`),null)}return this.allRowNodes.find(t=>t.data===e)||(tB("could not find data item as object was not found",e),null)}addStoreStates(e){e.push({suppressInfiniteScroll:!0,route:this.parentRowNode.getRoute()??[],rowCount:this.allRowNodes.length,info:this.info}),this.forEachChildStoreShallow(t=>t.addStoreStates(e))}refreshStore(e){if(e){let e=this.nodesAfterSort?this.nodesAfterSort.length:1;this.initialiseRowNodes(e)}this.scheduleLoad(),this.fireStoreUpdatedEvent()}retryLoads(){"failed"===this.getState()&&(this.initialiseRowNodes(1),this.scheduleLoad()),this.forEachChildStoreShallow(e=>e.retryLoads())}scheduleLoad(){this.setStateWaitingToLoad(),this.rowNodeBlockLoader.checkBlockToLoad()}fireStoreUpdatedEvent(){this.eventService.dispatchEvent({type:"storeUpdated"})}getRowCount(){return this.nodesAfterSort.length}getTopLevelRowDisplayedIndex(e){return this.nodesAfterSort[e].rowIndex}isLastRowIndexKnown(){return"loaded"==this.getState()}getRowNodesInRange(e,t){let i=[],r=!1;return tK(e)&&(r=!0),this.nodesAfterSort.forEach(s=>{let a=s===e||s===t;(r||a)&&i.push(s),a&&(r=!r)}),r?[]:i}getStoreBounds(){return{topPx:this.topPx,heightPx:this.heightPx}}},O2=class extends i2{constructor(){super(...arguments),this.beanName="lazyBlockLoadingService",this.cacheLoadingNodesMap=new Map,this.isCheckQueued=!1,this.nextBlockToLoad=void 0}wireBeans(e){this.rowNodeBlockLoader=e.rowNodeBlockLoader,this.rowRenderer=e.rowRenderer,this.rowModel=e.rowModel}postConstruct(){this.addManagedListeners(this.rowNodeBlockLoader,{blockLoaded:()=>this.queueLoadCheck()})}subscribe(e){this.cacheLoadingNodesMap.set(e,new Set)}unsubscribe(e){this.cacheLoadingNodesMap.delete(e)}queueLoadCheck(){this.isCheckQueued||(this.isCheckQueued=!0,window.queueMicrotask(()=>{this.queueLoadAction(),this.isCheckQueued=!1}))}queueLoadAction(){let e=this.getBlockToLoad();if(!e)return;let t=this.nextBlockToLoad&&this.nextBlockToLoad.cache===e.cache&&this.nextBlockToLoad.index===e.index;if(!t&&(!this.nextBlockToLoad||!t)){this.nextBlockToLoad=e,window.clearTimeout(this.loaderTimeout);let t=Number(this.nextBlockToLoad.index),i=this.nextBlockToLoad.cache,r=e.index+e.cache.getBlockSize();this.loaderTimeout=window.setTimeout(()=>{i.isAlive()&&(this.loaderTimeout=void 0,this.attemptLoad(i,t,r),this.nextBlockToLoad=void 0)},this.gos.get("blockLoadDebounceMillis"))}}attemptLoad(e,t,i){let r=this.rowNodeBlockLoader.getAvailableLoadingCount();(null==r||0!==r)&&(this.rowNodeBlockLoader.registerLoads(1),this.executeLoad(e,t,i),this.queueLoadCheck())}executeLoad(e,t,i){let r=e.getSsrmParams(),s={startRow:t,endRow:i,rowGroupCols:r.rowGroupCols,valueCols:r.valueCols,pivotCols:r.pivotCols,pivotMode:r.pivotMode,groupKeys:e.store.getParentNode().getRoute()??[],filterModel:r.filterModel,sortModel:r.sortModel},a=this.cacheLoadingNodesMap.get(e),o=()=>{for(let e=0;e<i-t;e++)a.delete(t+e)},n=this.gos.addGridCommonParams({request:s,success:r=>{this.rowNodeBlockLoader.loadComplete(),e.onLoadSuccess(t,i-t,r),o()},fail:()=>{this.rowNodeBlockLoader.loadComplete(),e.onLoadFailed(t,i-t),o()},parentNode:e.store.getParentNode()});(()=>{for(let e=0;e<i-t;e++)a.add(t+e)})(),e.getSsrmParams().datasource?.getRows(n)}getBlockToLoad(){let e=this.rowRenderer.getFirstVirtualRenderedRow(),t=this.rowRenderer.getLastVirtualRenderedRow();for(let i=e;i<=t;i++){let e=this.rowModel.getRow(i);if(!e)continue;let t=e.parent&&e.parent.childStore;if(!t||!(t instanceof O6))continue;let r=t.getCache(),s=r.getNodes().getBy("node",e);if(!s)continue;let a=this.cacheLoadingNodesMap.get(r);if(!a?.has(s.index)&&(e.__needsRefreshWhenVisible||e.stub&&!e.failedLoad))return{cache:r,index:r.getBlockStartIndex(s.index)}}let i=null,r=null,s=Number.MAX_SAFE_INTEGER;for(let a of this.cacheLoadingNodesMap.keys())a.getNodesToRefresh().forEach(o=>{if(null==o.rowIndex){r=o,i=a;return}let n=a.getNodes().getBy("node",o);if(!n)return;let l=this.cacheLoadingNodesMap.get(a);if(l?.has(n.index))return;let h=Math.abs(e-o.rowIndex),d=Math.abs(o.rowIndex-t);h<s&&(r=o,s=h,i=a),d<s&&(r=o,s=d,i=a)});if(!i)return;let a=i,o=a.getNodes().getBy("node",r)?.index;return null==o?void 0:{cache:a,index:a.getBlockStartIndex(o)}}isRowLoading(e,t){return this.cacheLoadingNodesMap.get(e)?.has(t)??!1}};O2.DEFAULT_BLOCK_SIZE=100;var O3=class{constructor(...e){if(e.length<1)throw Error("AG Grid: At least one index must be provided.");this.indexes=e,this.maps=new Map(this.indexes.map(e=>[e,new Map]))}getSize(){return this.maps.get(this.indexes[0]).size}getBy(e,t){let i=this.maps.get(e);if(!i)throw Error(`AG Grid: ${String(e)} not found`);return i.get(t)}set(e){this.indexes.forEach(t=>{let i=this.maps.get(t);if(!i)throw Error(`AG Grid: ${String(t)} not found`);i.set(e[t],e)})}delete(e){this.indexes.forEach(t=>{let i=this.maps.get(t);if(!i)throw Error(`AG Grid: ${String(t)} not found`);i.delete(e[t])})}clear(){this.maps.forEach(e=>e.clear())}getIterator(e){let t=this.maps.get(e);if(!t)throw Error(`AG Grid: ${String(e)} not found`);return t.values()}forEach(e){let t;let i=this.getIterator(this.indexes[0]);for(;(t=i.next())&&!t.done;)e(t.value)}find(e){let t;let i=this.getIterator(this.indexes[0]);for(;(t=i.next())&&!t.done;)if(e(t.value))return t.value}filter(e){let t;let i=this.getIterator(this.indexes[0]),r=[];for(;(t=i.next())&&!t.done;)e(t.value)&&r.push(t.value);return r}},O4=class extends i2{constructor(e,t,i,r){super(),this.live=!0,this.removedNodeCache=new Map,this.store=e,this.numberOfRows=t,this.isLastRowKnown=i,this.storeParams=r}wireBeans(e){this.rowRenderer=e.rowRenderer,this.blockUtils=e.ssrmBlockUtils,this.focusService=e.focusService,this.nodeManager=e.ssrmNodeManager,this.serverSideRowModel=e.rowModel,this.rowNodeSorter=e.rowNodeSorter,this.sortController=e.sortController,this.lazyBlockLoadingService=e.lazyBlockLoadingService}postConstruct(){this.lazyBlockLoadingService.subscribe(this),this.nodeMap=new O3("index","id","node"),this.nodeDisplayIndexMap=new Map,this.nodesToRefresh=new Set,this.defaultNodeIdPrefix=this.blockUtils.createNodeIdPrefix(this.store.getParentNode()),this.getRowIdFunc=iw(this.gos),this.isMasterDetail=this.gos.get("masterDetail")}destroy(){this.lazyBlockLoadingService.unsubscribe(this),this.numberOfRows=0,this.nodeMap.forEach(e=>this.blockUtils.destroyRowNode(e.node)),this.nodeMap.clear(),this.nodeDisplayIndexMap.clear(),this.nodesToRefresh.clear(),this.live=!1,super.destroy()}getRowByDisplayIndex(e){if(!this.store.isDisplayIndexInStore(e))return;let t=this.nodeDisplayIndexMap.get(e);if(t)return(t.stub||t.__needsRefreshWhenVisible)&&this.lazyBlockLoadingService.queueLoadCheck(),t;if(this.gos.get("groupHideOpenParents")||this.gos.get("groupAllowUnbalanced")){let t=this.nodeMap.find(t=>!!t.node.childStore?.isDisplayIndexInStore(e));if(t)return t.node.childStore?.getRowUsingDisplayIndex(e)}if(e===this.store.getDisplayIndexStart())return this.createStubNode(0,e);let i=this.nodeDisplayIndexMap.get(e-1);if(i){if(this.isMasterDetail&&i.master&&i.expanded)return i.detailNode;if(i.expanded&&i.childStore?.isDisplayIndexInStore(e))return i.childStore?.getRowUsingDisplayIndex(e);let t=this.nodeMap.getBy("node",i);return this.createStubNode(t.index+1,e)}let r=this.getSurroundingNodesByDisplayIndex(e);if(null==r){let t=this.store.getRowCount()-(this.store.getDisplayIndexEnd()-e);return this.createStubNode(t,e)}let{previousNode:s,nextNode:a}=r;if(s&&s.node.expanded&&s.node.childStore?.isDisplayIndexInStore(e))return s.node.childStore?.getRowUsingDisplayIndex(e);if(a){let t=a.node.rowIndex-e,i=a.index-t;return this.createStubNode(i,e)}let o=this.store.getRowCount()-(this.store.getDisplayIndexEnd()-e);return this.createStubNode(o,e)}createStubNode(e,t){let i=this.store.getRowBounds(t),r=this.createRowAtIndex(e,null,e=>{e.setRowIndex(t),e.setRowTop(i.rowTop),this.nodeDisplayIndexMap.set(t,e)});if(0===e&&this.gos.get("groupHideOpenParents")){let e=this.store.getParentNode().groupData;for(let t in e)r.setGroupValue(t,e[t])}return this.lazyBlockLoadingService.queueLoadCheck(),r}getRowByStoreIndex(e){return this.nodeMap.getBy("index",e)?.node}skipDisplayIndexes(e,t,i){if(0===e)return;let r=it(this.gos);t.skip(e),i.value+=e*r}setDisplayIndexes(e,t,i){this.nodeDisplayIndexMap.clear();let r={};this.nodeMap.forEach(e=>{r[e.index]=e.node});let s=-1;for(let a in r){let o=r[a],n=Number(a),l=n-1-s;this.skipDisplayIndexes(l,e,t);let h=0===n;if(o.setFirstChild(h),h&&this.gos.get("groupHideOpenParents")){let e=this.store.getParentNode().groupData;for(let t in e)o.setGroupValue(t,h?e[t]:void 0)}this.blockUtils.setDisplayIndex(o,e,t,i),null!=o.rowIndex&&this.nodeDisplayIndexMap.set(o.rowIndex,o),s=n}let a=this.numberOfRows-1-s;this.skipDisplayIndexes(a,e,t),this.purgeExcessRows()}getRowCount(){return this.numberOfRows}setRowCount(e,t){if(e<0)throw Error("AG Grid: setRowCount can only accept a positive row count.");this.numberOfRows=e,null!=t&&(this.isLastRowKnown=t,!1===t&&(this.numberOfRows+=1)),this.fireStoreUpdatedEvent()}getNodes(){return this.nodeMap}getNodeCachedByDisplayIndex(e){return this.nodeDisplayIndexMap.get(e)??null}getNodesToRefresh(){return this.nodesToRefresh}getSurroundingNodesByDisplayIndex(e){let t,i;return(this.nodeMap.forEach(r=>{if(e>r.node.rowIndex){(null==i||i.node.rowIndex<r.node.rowIndex)&&(i=r);return}if(null==t||t.node.rowIndex>r.node.rowIndex){t=r;return}}),i||t)?{previousNode:i,nextNode:t}:null}getDisplayIndexFromStoreIndex(e){let t,i;let r=this.nodeMap.getBy("index",e);if(r)return r.node.rowIndex;if(this.nodeMap.forEach(r=>{if(e>r.index){(null==i||i.index<r.index)&&(i=r);return}if(null==t||t.index>r.index){t=r;return}}),!t)return this.store.getDisplayIndexEnd()-(this.numberOfRows-e);if(!i)return this.store.getDisplayIndexStart()+e;let s=e-i.index;return(i.node.childStore?.getDisplayIndexEnd()??i.node.rowIndex)+s}createRowAtIndex(e,t,i){let r=this.nodeMap.getBy("index",e);if(r){let{node:i}=r;if(i.__needsRefreshWhenVisible=!1,this.doesNodeMatch(t,i))return this.blockUtils.updateDataIntoRowNode(i,t),this.nodesToRefresh.delete(i),i;if(null==this.getRowIdFunc&&i.hasChildren()&&i.expanded)return this.nodesToRefresh.delete(i),i;this.destroyRowAtIndex(e)}if(t&&null!=this.getRowIdFunc){let i=this.getRowId(t),r=i&&this.removedNodeCache?.get(i);if(r)return this.removedNodeCache?.delete(i),this.blockUtils.updateDataIntoRowNode(r,t),this.nodeMap.set({id:r.id,node:r,index:e}),this.nodesToRefresh.delete(r),r.__needsRefreshWhenVisible=!1,r;let s=this.nodeMap.getBy("id",i);if(s){this.nodeMap.delete(s);let{node:i,index:r}=s;return this.blockUtils.updateDataIntoRowNode(i,t),this.nodeMap.set({id:i.id,node:i,index:e}),this.nodesToRefresh.delete(i),i.__needsRefreshWhenVisible=!1,this.getBlockStartIndex(r)===this.getBlockStartIndex(e)||this.markBlockForVerify(r),i}}let s=this.blockUtils.createRowNode(this.store.getRowDetails());if(null!=t){let e=this.getPrefixedId(this.store.getIdSequence().next());this.blockUtils.setDataIntoRowNode(s,t,e,void 0),this.serverSideRowModel.setPaused(!0),this.blockUtils.checkOpenByDefault(s),this.serverSideRowModel.setPaused(!1),this.nodeManager.addRowNode(s)}return this.nodeMap.set({id:s.id,node:s,index:e}),i&&i(s),s}getBlockStates(){let e={},t={};this.nodeMap.forEach(({node:i,index:r})=>{let s=this.getBlockStartIndex(r);i.stub||i.failedLoad||(e[s]=(e[s]??0)+1);let a="loaded";i.failedLoad?a="failed":this.lazyBlockLoadingService.isRowLoading(this,s)?a="loading":(this.nodesToRefresh.has(i)||i.stub)&&(a="needsLoading"),t[s]||(t[s]=new Set),t[s].add(a)});let i={loading:4,failed:3,needsLoading:2,loaded:1},r=this.blockUtils.createNodeIdPrefix(this.store.getParentNode()),s={};return Object.entries(t).forEach(([t,a])=>{let o=[...a].sort((e,t)=>(i[e]??0)-(i[t]??0))[0],n=Number(t)/this.getBlockSize();s[r?`${r}-${n}`:String(n)]={blockNumber:n,startRow:Number(t),endRow:Number(t)+this.getBlockSize(),pageStatus:o,loadedRowCount:e[t]??0}}),s}destroyRowAtIndex(e){let t=this.nodeMap.getBy("index",e);t&&(this.nodeMap.delete(t),this.nodeDisplayIndexMap.delete(t.node.rowIndex),this.nodesToRefresh.size>0?this.removedNodeCache.set(t.node.id,t.node):this.blockUtils.destroyRowNode(t.node),this.nodesToRefresh.delete(t.node))}getSsrmParams(){return this.store.getSsrmParams()}getPrefixedId(e){return this.defaultNodeIdPrefix?this.defaultNodeIdPrefix+"-"+e:e.toString()}markBlockForVerify(e){let[t,i]=this.getBlockBounds(e);this.nodeMap.filter(e=>e.index>=t&&e.index<i).forEach(({node:e})=>{e.__needsRefreshWhenVisible=!0})}doesNodeMatch(e,t){if(t.stub)return!1;let i=this.getRowId(e);return null===i?t.data===e:t.id===i}purgeStubsOutsideOfViewport(){let e=this.rowRenderer.getFirstVirtualRenderedRow(),t=this.rowRenderer.getLastVirtualRenderedRow(),i=this.getBlockStartIndex(e),[,r]=this.getBlockBounds(t);this.nodeMap.forEach(e=>{!this.lazyBlockLoadingService.isRowLoading(this,e.index)&&!e.node.failedLoad&&e.node.stub&&(e.index<i||e.index>r)&&this.destroyRowAtIndex(e.index)})}getBlocksDistanceFromRow(e,t){let i={};return e.forEach(({node:e,index:r})=>{let s;let[a,o]=this.getBlockBounds(r);if(a in i)return;let n=Math.abs(e.rowIndex-t),l=this.nodeMap.getBy("index",[o-1]);l&&(s=Math.abs(l.node.rowIndex-t));let h=null==s||n<s?n:s;i[a]=h}),Object.entries(i)}purgeExcessRows(){if(this.purgeStubsOutsideOfViewport(),null==this.store.getDisplayIndexEnd()||null==this.storeParams.maxBlocksInCache)return;let e=this.rowRenderer.getFirstVirtualRenderedRow(),t=this.rowRenderer.getLastVirtualRenderedRow(),i=new Set,r=new Set;this.nodeMap.forEach(({index:s,node:a})=>{let o=this.getBlockStartIndex(s);i.add(o),a.rowIndex>=e&&a.rowIndex<=t&&r.add(o)});let s=Math.max(r.size,this.storeParams.maxBlocksInCache??0),a=i.size-s;if(a<=0)return;let o=Number.MAX_SAFE_INTEGER,n=Number.MIN_SAFE_INTEGER;r.forEach(e=>{o>e&&(o=e),n<e&&(n=e)});let l=this.nodeMap.filter(({node:e,index:t})=>{let i=this.getBlockStartIndex(t);return!(i>=o&&i<=n)&&!this.isNodeCached(e)});if(0===l.length)return;let h=this.getBlocksDistanceFromRow(l,e+(t-e)/2),d=this.getBlockSize();h.sort((e,t)=>Math.sign(t[1]-e[1]));for(let e=0;e<Math.min(a,h.length);e++){let t=Number(h[e][0]);for(let e=t;e<t+d;e++){let t=this.nodeMap.getBy("index",e);!t||this.isNodeCached(t.node)||this.destroyRowAtIndex(e)}}}isNodeFocused(e){let t=this.focusService.getFocusCellToUseAfterRefresh();return!!t&&null==t.rowPinned&&t.rowIndex===e.rowIndex}isNodeCached(e){let t=this.gos.get("groupAllowUnbalanced")&&""===e.key;return e.isExpandable()&&e.expanded||this.isNodeFocused(e)||t}extractDuplicateIds(e){if(null==this.getRowIdFunc)return[];let t=new Set,i=new Set;return e.forEach(e=>{let r=this.getRowId(e);if(t.has(r)){i.add(r);return}t.add(r)}),[...i]}onLoadSuccess(e,t,i){if(!this.live)return;let r=i.groupLevelInfo;if(this.store.setStoreInfo(r),null!=this.getRowIdFunc){let r=this.extractDuplicateIds(i.rowData);if(r.length>0){let i=r.join(", ");tO(`Unable to display rows as duplicate row ids (${i}) were returned by the getRowId callback. Please modify the getRowId callback to provide unique ids.`),this.onLoadFailed(e,t);return}}i.pivotResultFields&&this.serverSideRowModel.generateSecondaryColumns(i.pivotResultFields);let s=this.nodesToRefresh.size>0;if(i.rowData.forEach((t,i)=>{let r=e+i,s=this.nodeMap.getBy("index",r);if(s?.node?.stub){this.createRowAtIndex(r,t);return}if(s&&this.doesNodeMatch(t,s.node)){this.blockUtils.updateDataIntoRowNode(s.node,t),this.nodesToRefresh.delete(s.node),s.node.__needsRefreshWhenVisible=!1;return}this.createRowAtIndex(r,t)}),void 0!=i.rowCount&&-1!==i.rowCount)this.numberOfRows=i.rowCount,this.isLastRowKnown=!0;else if(t>i.rowData.length)this.numberOfRows=e+i.rowData.length,this.isLastRowKnown=!0;else if(!this.isLastRowKnown){let t=e+i.rowData.length+1;t>this.numberOfRows&&(this.numberOfRows=t)}this.isLastRowKnown&&this.nodeMap.filter(e=>e.index>=this.numberOfRows).forEach(e=>this.destroyRowAtIndex(e.index)),this.fireStoreUpdatedEvent();let a=0===this.nodesToRefresh.size;s&&a&&this.fireRefreshFinishedEvent()}fireRefreshFinishedEvent(){0===this.nodesToRefresh.size&&(this.removedNodeCache.forEach(e=>{this.blockUtils.destroyRowNode(e)}),this.removedNodeCache=new Map,this.store.fireRefreshFinishedEvent())}isStoreFullyLoaded(){let e=this.isLastRowKnown,t=this.nodeMap.getSize()===this.numberOfRows;if(!e||!t||this.nodesToRefresh.size>0)return;let i=-1;return null==this.nodeMap.find(e=>(i+=1,e.index!==i||!!e.node.__needsRefreshWhenVisible||!!e.node.stub))}isLastRowIndexKnown(){return this.isLastRowKnown}onLoadFailed(e,t){if(!this.live)return;let i=this.nodesToRefresh.size>0;for(let i=e;i<e+t&&i<this.getRowCount();i++){let{node:e}=this.nodeMap.getBy("index",i)??{};e&&this.nodesToRefresh.delete(e),e&&e.stub||(e&&!e.stub&&this.destroyRowAtIndex(i),e=this.createRowAtIndex(i)),e.__needsRefreshWhenVisible=!1,e.failedLoad=!0}let r=0===this.nodesToRefresh.size;i&&r&&this.fireRefreshFinishedEvent(),this.fireStoreUpdatedEvent()}markNodesForRefresh(){this.nodeMap.forEach(e=>{(!e.node.stub||e.node.failedLoad)&&this.nodesToRefresh.add(e.node)}),this.lazyBlockLoadingService.queueLoadCheck(),this.isLastRowKnown&&0===this.numberOfRows&&(this.numberOfRows=1,this.isLastRowKnown=!1,this.fireStoreUpdatedEvent())}isNodeInCache(e){return!!this.nodeMap.getBy("id",e)}fireStoreUpdatedEvent(){this.live&&this.store.fireStoreUpdatedEvent()}getRowId(e){if(null==this.getRowIdFunc)return null;let{level:t}=this.store.getRowDetails(),i=this.store.getParentNode().getRoute()??[];return this.getRowIdFunc({data:e,parentKeys:i.length>0?i:void 0,level:t})}getOrderedNodeMap(){let e={};return this.nodeMap.forEach(t=>e[t.index]=t),e}clearDisplayIndexes(){this.nodeDisplayIndexMap.clear()}clientSideSortRows(){let e=this.sortController.getSortOptions();if(!e.some(e=>null!=e.sort))return;let t=Array(this.nodeMap.getSize());this.nodeMap.forEach(e=>t[e.index]=e.node),this.nodeMap.clear(),this.rowNodeSorter.doFullSort(t,e).forEach((e,t)=>{this.nodeMap.set({id:e.id,node:e,index:t})})}updateRowNodes(e){if(null==this.getRowIdFunc)throw Error("AG Grid: Transactions can only be applied when row ids are supplied.");let t=[];return e.forEach(e=>{let i=this.getRowId(e),r=this.nodeMap.getBy("id",i);r&&(this.blockUtils.updateDataIntoRowNode(r.node,e),t.push(r.node))}),t}insertRowNodes(e,t){let i=this.store.getRowCount()-(this.store.getParentNode().sibling?1:0),r=null==t&&this.isLastRowKnown?i:t;if(null==r||i<r)return[];if(null==this.getRowIdFunc)throw Error("AG Grid: Transactions can only be applied when row ids are supplied.");let s={};e.forEach(e=>{let t=this.getRowId(e);t&&this.isNodeInCache(t)||(s[t]=e)});let a=Object.values(s),o=a.length;if(0===o)return[];let n=this.nodeMap.filter(e=>e.index>=r);return n.forEach(e=>this.nodeMap.delete(e)),n.forEach(e=>{this.nodeMap.set({node:e.node,index:e.index+o,id:e.id})}),this.numberOfRows+=o,a.map((e,t)=>this.createRowAtIndex(r+t,e))}removeRowNodes(e){if(null==this.getRowIdFunc)throw Error("AG Grid: Transactions can only be applied when row ids are supplied.");let t=[],i=[],r=0,s=[...e],a=this.getOrderedNodeMap(),o=-1;for(let e in a){o+=1;let n=a[e],l=s.findIndex(e=>e===n.id);if(-1!==l){s.splice(l,1),this.destroyRowAtIndex(Number(e)),t.push(n.node),r+=1;continue}if(0===r)continue;let h=Number(e);o!==h&&i.push(n.node),this.nodeMap.delete(a[e]),this.nodeMap.set({id:n.id,node:n.node,index:h-r})}return this.numberOfRows-=this.isLastRowIndexKnown()?e.length:r,s.length>0&&i.length>0&&(i.forEach(e=>e.__needsRefreshWhenVisible=!0),this.lazyBlockLoadingService.queueLoadCheck()),t}getBlockSize(){return this.storeParams.cacheBlockSize||O2.DEFAULT_BLOCK_SIZE}getBlockStartIndex(e){return e-e%this.getBlockSize()}getBlockBounds(e){let t=this.getBlockStartIndex(e);return[t,t+this.getBlockSize()]}},O6=class extends i2{constructor(e,t,i){super(),this.idSequence=new sK,this.ssrmParams=e,this.parentRowNode=i,this.storeParams=t,this.level=i.level+1,this.group=!!e.rowGroupCols&&this.level<e.rowGroupCols.length,this.leafGroup=!!e.rowGroupCols&&this.level===e.rowGroupCols.length-1,this.info={}}wireBeans(e){this.blockUtils=e.ssrmBlockUtils,this.storeUtils=e.ssrmStoreUtils,this.selectionService=e.selectionService,this.funcColsService=e.funcColsService}postConstruct(){let e=1;if(0===this.level&&(e=this.storeUtils.getServerSideInitialRowCount()??1,this.eventService.dispatchEventOnce({type:"rowCountReady"})),this.cache=this.createManagedBean(new O4(this,e,!1,this.storeParams)),!this.gos.get("treeData")&&this.group){let e=this.ssrmParams.rowGroupCols[this.level];this.groupField=e.field,this.rowGroupColumn=this.funcColsService.getRowGroupColumns()[this.level]}}destroy(){this.displayIndexStart=void 0,this.displayIndexEnd=void 0,this.destroyBean(this.cache),super.destroy()}applyRowData(e,t,i){this.cache.onLoadSuccess(t,i,e)}applyTransaction(e){let t,i,r;let s=iw(this.gos);if(!s)return tO("getRowId callback must be implemented for transactions to work. Transaction was ignored."),{status:hi.Cancelled};let a=this.gos.getCallback("isApplyServerSideTransaction");if(a&&!a({transaction:e,parentNode:this.parentRowNode,groupLevelInfo:this.info}))return{status:hi.Cancelled};let o=this.cache.isStoreFullyLoaded();if(e.update?.length&&(t=this.cache.updateRowNodes(e.update)),e.add?.length){let t=e.addIndex;null!=t&&t<0&&(t=void 0),i=this.cache.insertRowNodes(e.add,t)}if(e.remove?.length){let t=[...new Set(e.remove.map(e=>s({level:this.level,parentKeys:this.parentRowNode.getRoute()??[],data:e})))];r=this.cache.removeRowNodes(t)}let n=this.gos.get("serverSideEnableClientSideSort"),l=t?.length||i?.length;return o&&n&&l&&this.cache.clientSideSortRows(),this.updateSelectionAfterTransaction(t,r),{status:hi.Applied,update:t,add:i,remove:r}}updateSelectionAfterTransaction(e,t){let i=[];e?.forEach(e=>{e.isSelected()&&!e.selectable&&i.push(e)}),t?.forEach(e=>{e.isSelected()&&i.push(e)}),i.length&&this.selectionService.setNodesSelected({newValue:!1,clearSelection:!1,nodes:i,source:"rowDataChanged"})}clearDisplayIndexes(){this.displayIndexStart=void 0,this.displayIndexEnd=void 0,this.cache.getNodes().forEach(e=>this.blockUtils.clearDisplayIndex(e.node)),this.parentRowNode.sibling&&this.blockUtils.clearDisplayIndex(this.parentRowNode.sibling),this.cache.clearDisplayIndexes()}getDisplayIndexStart(){return this.displayIndexStart}getDisplayIndexEnd(){return this.displayIndexEnd}getRowCount(){return this.parentRowNode.sibling?this.cache.getRowCount()+1:this.cache.getRowCount()}setRowCount(e,t){this.cache.setRowCount(e,t)}isDisplayIndexInStore(e){return 0!==this.cache.getRowCount()&&this.displayIndexStart<=e&&e<this.getDisplayIndexEnd()}setDisplayIndexes(e,t,i){this.displayIndexStart=e.peek(),this.topPx=t.value;let r=this.parentRowNode.level>-1&&iv(this.gos)({node:this.parentRowNode});r||this.parentRowNode.destroyFooter(),"top"===r&&(this.parentRowNode.createFooter(),this.blockUtils.setDisplayIndex(this.parentRowNode.sibling,e,t,i)),this.cache.setDisplayIndexes(e,t,i),"bottom"===r&&(this.parentRowNode.createFooter(),this.blockUtils.setDisplayIndex(this.parentRowNode.sibling,e,t,i)),this.displayIndexEnd=e.peek(),this.heightPx=t.value-this.topPx}forEachStoreDeep(e,t=new sK){e(this,t.next()),this.cache.getNodes().forEach(i=>{let r=i.node.childStore;r&&r.forEachStoreDeep(e,t)})}forEachNodeDeep(e,t=new sK){this.cache.getNodes().forEach(i=>{e(i.node,t.next());let r=i.node.childStore;r&&r.forEachNodeDeep(e,t)})}forEachNodeDeepAfterFilterAndSort(e,t=new sK,i=!1){let r=this.parentRowNode.level>-1&&iv(this.gos)({node:this.parentRowNode});"top"===r&&e(this.parentRowNode.sibling,t.next());let s=this.cache.getOrderedNodeMap();for(let r in s){let a=s[r];e(a.node,t.next());let o=a.node.childStore;o&&o.forEachNodeDeepAfterFilterAndSort(e,t,i)}"bottom"===r&&e(this.parentRowNode.sibling,t.next())}retryLoads(){this.cache.getNodes().forEach(({node:e})=>{e.failedLoad&&(e.failedLoad=!1,e.__needsRefreshWhenVisible=!0,e.stub=!0)}),this.forEachChildStoreShallow(e=>e.retryLoads()),this.fireStoreUpdatedEvent()}getRowUsingDisplayIndex(e){return this.parentRowNode.sibling&&e===this.parentRowNode.sibling.rowIndex?this.parentRowNode.sibling:this.cache.getRowByDisplayIndex(e)}getRowBounds(e){if(!this.isDisplayIndexInStore(e))return null;let t=this.cache.getNodeCachedByDisplayIndex(e);if(t){let i=this.blockUtils.extractRowBounds(t,e);if(i)return i}let{previousNode:i,nextNode:r}=this.cache.getSurroundingNodesByDisplayIndex(e)??{};if(i){let t=this.blockUtils.extractRowBounds(i.node,e);if(null!=t)return t}let s=it(this.gos);if(r){let t=(r.node.rowIndex-e)*s;return{rowTop:r.node.rowTop-t,rowHeight:s}}return{rowTop:this.topPx+this.heightPx-(this.getDisplayIndexEnd()-e)*s,rowHeight:s}}isPixelInRange(e){return e>=this.topPx&&e<this.topPx+this.heightPx}getRowIndexAtPixel(e){if(e<this.topPx)return this.getDisplayIndexStart();if(e>=this.topPx+this.heightPx)return this.getDisplayIndexEnd()-1;if(this.parentRowNode.sibling&&e>this.parentRowNode.sibling.rowTop&&e<this.parentRowNode.sibling.rowTop+this.parentRowNode.sibling.rowHeight)return this.parentRowNode.sibling.rowIndex;let t=Number.MAX_SAFE_INTEGER,i=null,r=Number.MAX_SAFE_INTEGER,s=null;if(this.cache.getNodes().forEach(({node:a})=>{let o=Math.abs(e-a.rowTop);if(a.rowTop<e){o<t&&(t=o,i=a);return}o<r&&(r=o,s=a)}),i){let t=this.blockUtils.getIndexAtPixel(i,e);if(null!=t)return t}let a=it(this.gos);if(s){let t=Math.ceil((s.rowTop-e)/a);return s.rowIndex-t}let o=Math.floor((this.topPx+this.heightPx-e)/a);return this.getDisplayIndexEnd()-o}getChildStore(e){return this.storeUtils.getChildStore(e,this,e=>{let t=this.cache.getNodes().find(t=>t.node.key==e);return t?t.node:null})}forEachChildStoreShallow(e){this.cache.getNodes().forEach(({node:t})=>{t.childStore&&e(t.childStore)})}refreshAfterSort(e){if(this.storeUtils.isServerSideSortAllLevels()||this.storeUtils.isServerRefreshNeeded(this.parentRowNode,this.ssrmParams.rowGroupCols,e)){let e=this.cache.isStoreFullyLoaded(),t=this.gos.get("serverSideEnableClientSideSort");if(!(e&&t)){let e=this.cache.getRowCount(),t=this.cache.isLastRowIndexKnown();this.destroyBean(this.cache),this.cache=this.createManagedBean(new O4(this,e,t,this.storeParams));return}this.cache.clientSideSortRows()}this.forEachChildStoreShallow(t=>t.refreshAfterSort(e))}refreshAfterFilter(e){if(!this.storeUtils.isServerSideOnlyRefreshFilteredGroups()||this.storeUtils.isServerRefreshNeeded(this.parentRowNode,this.ssrmParams.rowGroupCols,e)){this.refreshStore(!0);return}this.forEachChildStoreShallow(t=>t.refreshAfterFilter(e))}refreshStore(e){if(e){this.destroyBean(this.cache),this.cache=this.createManagedBean(new O4(this,1,!1,this.storeParams)),this.fireStoreUpdatedEvent();return}this.cache.markNodesForRefresh()}getTopLevelRowDisplayedIndex(e){return this.cache.getDisplayIndexFromStoreIndex(e)??e}isLastRowIndexKnown(){return this.cache.isLastRowIndexKnown()}getRowNodesInRange(e,t){return this.cache.getNodes().filter(({node:i})=>i.rowIndex>=e.rowIndex&&i.rowIndex<=t.rowIndex).map(({node:e})=>e)}addStoreStates(e){e.push({suppressInfiniteScroll:!1,route:this.parentRowNode.getRoute()??[],rowCount:this.getRowCount(),lastRowIndexKnown:this.isLastRowIndexKnown(),info:this.info,maxBlocksInCache:this.storeParams.maxBlocksInCache,cacheBlockSize:this.storeParams.cacheBlockSize}),this.forEachChildStoreShallow(t=>t.addStoreStates(e))}getIdSequence(){return this.idSequence}getParentNode(){return this.parentRowNode}getRowDetails(){return{field:this.groupField,group:this.group,leafGroup:this.leafGroup,level:this.level,parent:this.parentRowNode,rowGroupColumn:this.rowGroupColumn}}getSsrmParams(){return this.ssrmParams}setStoreInfo(e){e&&Object.assign(this.info,e)}fireStoreUpdatedEvent(){this.eventService.dispatchEvent({type:"storeUpdated"})}fireRefreshFinishedEvent(){this.eventService.dispatchEvent({type:"storeRefreshed",route:this.parentRowNode.getRoute()})}getBlockStates(){return this.cache.getBlockStates()}getStoreBounds(){return{topPx:this.topPx,heightPx:this.heightPx}}getCache(){return this.cache}},O5=class extends i2{constructor(){super(...arguments),this.beanName="rowModel",this.onRowHeightChanged_debounced=tj(this.onRowHeightChanged.bind(this),100),this.pauseStoreUpdateListening=!1,this.started=!1,this.managingPivotResultColumns=!1}wireBeans(e){this.columnModel=e.columnModel,this.columnNameService=e.columnNameService,this.pivotResultColsService=e.pivotResultColsService,this.funcColsService=e.funcColsService,this.filterManager=e.filterManager,this.sortController=e.sortController,this.rowRenderer=e.rowRenderer,this.nodeManager=e.ssrmNodeManager,this.storeFactory=e.ssrmStoreFactory,this.beans=e,this.pivotColDefService=e.pivotColDefService}ensureRowHeightsValid(){return!1}start(){this.started=!0,this.updateDatasource()}destroyDatasource(){this.datasource&&(this.datasource.destroy&&this.datasource.destroy(),this.rowRenderer.datasourceChanged(),this.datasource=void 0)}postConstruct(){let e=this.resetRootStore.bind(this);this.addManagedEventListeners({newColumnsLoaded:this.onColumnEverything.bind(this),storeUpdated:this.onStoreUpdated.bind(this),columnValueChanged:e,columnPivotChanged:e,columnRowGroupChanged:e,columnPivotModeChanged:e}),this.addManagedPropertyListeners(["masterDetail","treeData","removePivotHeaderRowWhenSingleValueColumn","suppressServerSideInfiniteScroll","cacheBlockSize"],e),this.addManagedPropertyListener("groupAllowUnbalanced",()=>this.onStoreUpdated()),this.addManagedPropertyListener("rowHeight",()=>this.resetRowHeights()),this.verifyProps(),this.addManagedPropertyListener("serverSideDatasource",()=>this.updateDatasource())}updateDatasource(){let e=this.gos.get("serverSideDatasource");e&&this.setDatasource(e)}verifyProps(){this.gos.exists("initialGroupOrderComparator")&&tO("initialGroupOrderComparator cannot be used with Server Side Row Model."),t8(this.gos)&&!this.gos.exists("getRowId")&&tO("getRowId callback must be provided for Server Side Row Model selection to work correctly.")}setDatasource(e){this.started&&(this.destroyDatasource(),this.datasource=e,this.resetRootStore())}applyRowData(e,t,i){let r=this.getRootStore();if(!r)return;let s=r.getChildStore(i);s&&(s instanceof O6?s.applyRowData(e,t,e.rowData.length):s instanceof O1&&s.processServerResult(e))}isLastRowIndexKnown(){let e=this.getRootStore();return!!e&&e.isLastRowIndexKnown()}onColumnEverything(){if(!this.storeParams){this.resetRootStore();return}let e=this.columnsToValueObjects(this.funcColsService.getRowGroupColumns()),t=this.columnsToValueObjects(this.funcColsService.getValueColumns()),i=this.columnsToValueObjects(this.funcColsService.getPivotColumns()),r=e=>{let t={};e.oldCols.forEach(e=>t[e.id]=e);let i=e.newCols.every(e=>{let i=t[e.id];return i&&delete t[e.id],i&&i.field===e.field&&i.aggFunc===e.aggFunc}),r=!e.allowRemovedColumns&&!!Object.values(t).length;return i&&!r},s=!t0(this.storeParams.sortModel,this.sortController.getSortModel()),a=!r({oldCols:this.storeParams.rowGroupCols,newCols:e}),o=!r({oldCols:this.storeParams.pivotCols,newCols:i}),n=!!e?.length&&!r({oldCols:this.storeParams.valueCols,newCols:t,allowRemovedColumns:!0});if(s||a||o||n)this.resetRootStore();else{let e=this.createStoreParams();this.storeParams.rowGroupCols=e.rowGroupCols,this.storeParams.pivotCols=e.pivotCols,this.storeParams.valueCols=e.valueCols}}destroyRootStore(){this.rootNode&&this.rootNode.childStore&&(this.rootNode.childStore=this.destroyBean(this.rootNode.childStore),this.nodeManager.clear())}refreshAfterSort(e,t){this.storeParams&&(this.storeParams.sortModel=e);let i=this.getRootStore();i&&(i.refreshAfterSort(t),this.onStoreUpdated())}generateSecondaryColumns(e){if(!this.pivotColDefService){this.gos.assertModuleRegistered(tL.RowGroupingModule,"pivotResultFields");return}let t=this.pivotColDefService.createColDefsFromFields(e);this.managingPivotResultColumns=!0,this.pivotResultColsService.setPivotResultCols(t,"rowModelUpdated")}resetRowHeights(){let e=this.resetRowHeightsForAllRowNodes(),t=ie(this.gos,this.rootNode);if(this.rootNode.setRowHeight(t.height,t.estimated),this.rootNode.sibling){let e=ie(this.gos,this.rootNode.sibling);this.rootNode.sibling.setRowHeight(e.height,e.estimated)}e&&this.onRowHeightChanged()}resetRowHeightsForAllRowNodes(){let e=!1;return this.forEachNode(t=>{let i=ie(this.gos,t);t.setRowHeight(i.height,i.estimated);let r=t.detailNode;if(r){let e=ie(this.gos,r);r.setRowHeight(e.height,e.estimated)}if(t.sibling){let e=ie(this.gos,t.sibling);r.setRowHeight(e.height,e.estimated)}e=!0}),e}resetRootStore(){this.destroyRootStore(),this.rootNode=new a7(this.beans),this.rootNode.group=!0,this.rootNode.level=-1,this.datasource&&(this.storeParams=this.createStoreParams(),this.rootNode.childStore=this.createBean(this.storeFactory.createStore(this.storeParams,this.rootNode)),this.updateRowIndexesAndBounds()),this.managingPivotResultColumns&&(this.pivotResultColsService.setPivotResultCols(null,"api"),this.managingPivotResultColumns=!1),this.dispatchModelUpdated(!0)}columnsToValueObjects(e){return e.map(e=>({id:e.getId(),aggFunc:e.getAggFunc(),displayName:this.columnNameService.getDisplayNameForColumn(e,"model"),field:e.getColDef().field}))}createStoreParams(){let e=this.columnsToValueObjects(this.funcColsService.getRowGroupColumns()),t=this.columnsToValueObjects(this.funcColsService.getValueColumns()),i=this.columnsToValueObjects(this.funcColsService.getPivotColumns()),r=t9(this.gos);return{valueCols:t,rowGroupCols:e,pivotCols:i,pivotMode:this.columnModel.isPivotMode(),filterModel:this.filterManager?.isAdvancedFilterEnabled()?this.filterManager?.getAdvancedFilterModel():this.filterManager?.getFilterModel()??{},sortModel:this.sortController.getSortModel(),datasource:this.datasource,lastAccessedSequence:new sK,dynamicRowHeight:r}}getParams(){return this.storeParams}dispatchModelUpdated(e=!1){this.eventService.dispatchEvent({type:"modelUpdated",animate:!e,keepRenderedRows:!e,newPage:!1,newData:!1})}onStoreUpdated(){this.pauseStoreUpdateListening||(this.updateRowIndexesAndBounds(),this.dispatchModelUpdated())}onRowHeightChangedDebounced(){this.onRowHeightChanged_debounced()}onRowHeightChanged(){this.updateRowIndexesAndBounds(),this.dispatchModelUpdated()}updateRowIndexesAndBounds(){let e=this.getRootStore();e&&e.setDisplayIndexes(new sK,{value:0},0)}retryLoads(){let e=this.getRootStore();e&&(e.retryLoads(),this.onStoreUpdated())}getRow(e){let t=this.getRootStore();if(t)return t.getRowUsingDisplayIndex(e)}setPaused(e){this.pauseStoreUpdateListening=e}expandAll(e){this.pauseStoreUpdateListening=!0,this.forEachNode(t=>{!t.stub&&t.hasChildren()&&t.setExpanded(e)}),this.pauseStoreUpdateListening=!1,this.onStoreUpdated()}refreshAfterFilter(e,t){this.storeParams&&(this.storeParams.filterModel=e);let i=this.getRootStore();i&&(i.refreshAfterFilter(t),this.onStoreUpdated())}getRootStore(){if(this.rootNode&&this.rootNode.childStore)return this.rootNode.childStore}getRowCount(){let e=this.getRootStore();return e?e.getDisplayIndexEnd():0}getTopLevelRowCount(){let e=this.getRootStore();return e?e.getRowCount():1}getTopLevelRowDisplayedIndex(e){let t=this.getRootStore();return t?t.getTopLevelRowDisplayedIndex(e):e}getRowBounds(e){let t=this.getRootStore();return t?t.getRowBounds(e):{rowTop:0,rowHeight:it(this.gos)}}getBlockStates(){let e=this.getRootStore();if(!e)return;let t={};return e.forEachStoreDeep(e=>{if(e instanceof O1){let{id:i,state:r}=e.getBlockStateJson();t[i]=r}else if(e instanceof O6)Object.entries(e.getBlockStates()).forEach(([e,i])=>{t[e]=i});else throw Error("AG Grid: Unsupported store type")}),t}getRowIndexAtPixel(e){let t=this.getRootStore();return e<=0||!t?0:t.getRowIndexAtPixel(e)}isEmpty(){return!1}isRowsToRender(){return null!=this.getRootStore()&&this.getRowCount()>0}getType(){return"serverSide"}forEachNode(e){let t=this.getRootStore();t&&t.forEachNodeDeep(e)}forEachNodeAfterFilterAndSort(e,t=!1){let i=this.getRootStore();i&&i.forEachNodeDeepAfterFilterAndSort(e,void 0,t)}executeOnStore(e,t){if(!this.started)return!1;let i=this.getRootStore();if(!i)return!0;let r=i.getChildStore(e);return r&&t(r),!0}refreshStore(e={}){let t=e.route?e.route:[];this.executeOnStore(t,t=>t.refreshStore(!0==e.purge))}getStoreState(){let e=[],t=this.getRootStore();return t&&t.addStoreStates(e),e}getNodesInRangeForSelection(e,t){let i=e.rowIndex,r=t.rowIndex;if(null===i&&null===r)return[];if(null===r)return e?[e]:[];if(null===i)return[t];let s=[],[a,o]=[i,r].sort((e,t)=>e-t);return(this.forEachNode(e=>{let t=e.rowIndex;null!=t&&!e.stub&&t>=a&&t<=o&&s.push(e)}),s.length!==o-a+1)?e?[e,t]:[]:s}getRowNode(e){let t;return this.forEachNode(i=>{i.id===e&&(t=i),i.detailNode&&i.detailNode.id===e&&(t=i.detailNode)}),t}isRowPresent(e){return!!this.getRowNode(e.id)}setRowCount(e,t){let i=this.getRootStore();if(i){if(i instanceof O6){i.setRowCount(e,t);return}tB("Infinite scrolling must be enabled in order to set the row count.")}}destroy(){this.destroyDatasource(),this.destroyRootStore(),super.destroy()}},O8=class extends lO{constructor(){super(...arguments),this.beanName="expansionService",this.queuedRowIds=new Set}wireBeans(e){super.wireBeans(e),this.serverSideRowModel=e.rowModel}postConstruct(){super.postConstruct(),this.addManagedEventListeners({columnRowGroupChanged:()=>{this.queuedRowIds.clear()}})}checkOpenByDefault(e){if(!e.isExpandable())return;if(this.queuedRowIds.has(e.id)){this.queuedRowIds.delete(e.id),e.setExpanded(!0);return}let t=this.gos.getCallback("isServerSideGroupOpenByDefault");t&&t({data:e.data,rowNode:e})&&e.setExpanded(!0)}expandRows(e){e.forEach(e=>{let t=this.serverSideRowModel.getRowNode(e);t?t.setExpanded(!0):this.queuedRowIds.add(e)})}expandAll(e){this.serverSideRowModel.expandAll(e)}onGroupExpandedOrCollapsed(){}},O7=class{constructor(){this.root=null,this.end=null,this.cachedRange=[]}init(e){this.rowModel=e}reset(){this.root=null,this.end=null,this.cachedRange.length=0}setRoot(e){this.root=e,this.end=null,this.cachedRange.length=0}setEndRange(e){this.end=e,this.cachedRange.length=0}getRoot(){return this.root}getRange(){if(0===this.cachedRange.length){let e=this.root?this.rowModel.getRowNode(this.root):void 0,t=this.end?this.rowModel.getRowNode(this.end):void 0;if(null==e||null==t)return this.cachedRange;this.cachedRange=this.rowModel.getNodesInRangeForSelection(e,t)}return this.cachedRange}isInRange(e){return null!==this.root&&this.getRange().some(t=>t.id===e)}truncate(e){let t=this.getRange();if(0===t.length)return{keep:[],discard:[]};let i=t[0].id===this.root,r=t.findIndex(t=>t.id===e);if(!(r>-1))return{keep:t,discard:[]};{let s=t.slice(0,r),a=t.slice(r+1);return this.setEndRange(e),i?{keep:s,discard:a}:{keep:a,discard:s}}}extend(e,t=!1){if(null==this.root){let i=this.getRange().slice(),r=this.rowModel.getRowNode(e);return r&&(t&&r.depthFirstSearch(e=>!e.group&&i.push(e)),i.push(r)),this.setRoot(e),{keep:i,discard:[]}}let i=this.rowModel.getRowNode(e),r=this.rowModel.getRowNode(this.root);if(null==i)return{keep:this.getRange(),discard:[]};if(null==r)return{keep:this.getRange().concat(i),discard:[]};if(this.rowModel.getNodesInRangeForSelection(r,i).find(e=>e.id===this.end))return this.setEndRange(e),{keep:this.getRange(),discard:[]};{let t=this.getRange().slice();return this.setEndRange(e),{keep:this.getRange(),discard:t}}}},O9=class extends i2{constructor(){super(...arguments),this.selectionCtx=new O7,this.selectedState={selectAll:!1,toggledNodes:new Set},this.selectAllUsed=!1,this.selectedNodes={}}wireBeans(e){this.rowModel=e.rowModel}postConstruct(){this.selectionCtx.init(this.rowModel)}getSelectedState(){return{selectAll:this.selectedState.selectAll,toggledNodes:[...this.selectedState.toggledNodes]}}setSelectedState(e){let t={selectAll:!1,toggledNodes:new Set};if("object"!=typeof e)return tB("The provided selection state should be an object.");if(!("selectAll"in e))return tB("Invalid selection state. The state must conform to `IServerSideSelectionState`.");if("boolean"!=typeof e.selectAll)return tB("selectAll must be of boolean type.");if(t.selectAll=e.selectAll,!("toggledNodes"in e&&Array.isArray(e.toggledNodes)))return tO("`toggledNodes` must be an array of string ids.");e.toggledNodes.forEach(e=>{"string"==typeof e?t.toggledNodes.add(e):tO(`Provided ids must be of string type. Invalid id provided: ${e}`)});let i=t.selectAll||t.toggledNodes.size>1;if(ix(this.gos)&&!iL(this.gos)&&i)return tO("cannot multi select unless selection mode is 'multiRow'");this.selectedState=t}deleteSelectionStateFromParent(e,t){if(0===this.selectedState.toggledNodes.size)return!1;let i=!1;return t.forEach(e=>{this.selectedState.toggledNodes.delete(e)&&(i=!0)}),i}overrideSelectionValue(e,t){if(!dv(t))return e;let i=this.selectionCtx.getRoot(),r=i?this.rowModel.getRowNode(i):null;return!r||(r.isSelected()??!1)}setNodesSelected(e){let{nodes:t,clearSelection:i,newValue:r,rangeSelect:s,source:a}=e;if(0===t.length)return 0;let o=i&&r&&!s;if(!iL(this.gos)||o){if(t.length>1)throw Error("AG Grid: cannot select multiple rows when selection.mode is set to 'singleRow'");let e=t[0];return r&&e.selectable?(this.selectedNodes={[e.id]:e},this.selectedState={selectAll:!1,toggledNodes:new Set([e.id])}):(this.selectedNodes={},this.selectedState={selectAll:!1,toggledNodes:new Set}),e.selectable&&this.selectionCtx.setRoot(e.id),1}let n=(e,t=r)=>{t&&e.selectable?this.selectedNodes[e.id]=e:delete this.selectedNodes[e.id],t!==this.selectedState.selectAll&&e.selectable?this.selectedState.toggledNodes.add(e.id):this.selectedState.toggledNodes.delete(e.id)};if(s){if(t.length>1)throw Error("AG Grid: cannot select multiple rows when using rangeSelect");let e=t[0],i=this.overrideSelectionValue(r,a);if(this.selectionCtx.isInRange(e.id)){let t=this.selectionCtx.truncate(e.id);i&&t.discard.forEach(e=>n(e,!1)),t.keep.forEach(e=>n(e,i))}else if(this.selectionCtx.getRoot()!==e.id){let t=this.selectionCtx.extend(e.id);i&&t.discard.forEach(e=>n(e,!1)),t.keep.forEach(e=>n(e,i))}return 1}return t.forEach(e=>n(e)),this.selectionCtx.setRoot(iB(t).id),1}processNewRow(e){this.selectedNodes[e.id]&&(this.selectedNodes[e.id]=e)}isNodeSelected(e){let t=this.selectedState.toggledNodes.has(e.id);return this.selectedState.selectAll?!t:t}getSelectedNodes(){return this.selectAllUsed&&tO(`getSelectedNodes and getSelectedRows functions cannot be used with select all functionality with the server-side row model.
                Use \`api.getServerSideSelectionState()\` instead.`),Object.values(this.selectedNodes)}getSelectedRows(){return this.getSelectedNodes().map(e=>e.data)}getSelectionCount(){return this.selectedState.selectAll?-1:this.selectedState.toggledNodes.size}clearOtherNodes(e,t){let i=this.selectedState.selectAll?1:this.selectedState.toggledNodes.size-1;return this.selectedState={selectAll:!1,toggledNodes:new Set([e.id])},this.rowModel.forEachNode(i=>{i!==e&&i.selectThisNode(!1,void 0,t)}),this.eventService.dispatchEvent({type:"selectionChanged",source:t}),i}isEmpty(){return!this.selectedState.selectAll&&!this.selectedState.toggledNodes?.size}selectAllRowNodes(){this.selectedState={selectAll:!0,toggledNodes:new Set},this.selectedNodes={},this.selectAllUsed=!0,this.selectionCtx.reset()}deselectAllRowNodes(){this.selectedState={selectAll:!1,toggledNodes:new Set},this.selectedNodes={},this.selectionCtx.reset()}getSelectAllState(){return this.selectedState.selectAll?!(this.selectedState.toggledNodes.size>0)||null:this.selectedState.toggledNodes.size>0&&null}},Be=class extends i2{constructor(){super(...arguments),this.selectionCtx=new O7,this.selectedState={selectAllChildren:!1,toggledNodes:new Map}}wireBeans(e){this.rowModel=e.rowModel,this.funcColsService=e.funcColsService,this.filterManager=e.filterManager,this.selectionService=e.selectionService}postConstruct(){this.addManagedEventListeners({modelUpdated:()=>this.removeRedundantState(),columnRowGroupChanged:()=>this.selectionService.reset("rowGroupChanged")}),this.selectionCtx.init(this.rowModel)}getSelectedState(){let e=this.gos.get("treeData"),t=(i,r,s)=>{let a={nodeId:s};if((e||r<=this.funcColsService.getRowGroupColumns().length)&&(a.selectAllChildren=i.selectAllChildren),i.toggledNodes.size){let e=[];i.toggledNodes.forEach((i,s)=>{let a=t(i,r+1,s);e.push(a)}),a.toggledNodes=e}return a};return t(this.selectedState,0)}setSelectedState(e){if("selectAll"in e)return tB("Invalid selection state. When `groupSelectsChildren` is enabled, the state must conform to `IServerSideGroupSelectionState`.");let t=(e,i)=>{if("object"!=typeof e)throw Error("Each provided state object must be an object.");if("selectAllChildren"in e&&"boolean"!=typeof e.selectAllChildren)throw Error("`selectAllChildren` must be a boolean value or undefined.");if("toggledNodes"in e){if(!Array.isArray(e.toggledNodes))throw Error("`toggledNodes` must be an array.");if(!e.toggledNodes.every(e=>"object"==typeof e&&"nodeId"in e&&"string"==typeof e.nodeId))throw Error("Every `toggledNode` requires an associated string id.")}let r=e.selectAllChildren??!i,s=e.toggledNodes?.map(e=>[e.nodeId,t(e,r)]);if(s?.some(([,e])=>r===e.selectAllChildren&&0===e.toggledNodes.size))throw Error(`
                    Row selection state could not be parsed due to invalid data. Ensure all child state has toggledNodes or does not conform with the parent rule.
                    Please rebuild the selection state and reapply it.
                `);return{selectAllChildren:r,toggledNodes:new Map(s)}};try{this.selectedState=t(e,!!e.selectAllChildren)}catch(e){tB(e.message)}}deleteSelectionStateFromParent(e,t){let i=this.selectedState,r=[...e];for(;i&&r.length;)i=i.toggledNodes.get(r.pop());if(!i)return!1;let s=!1;return t.forEach(e=>{i?.toggledNodes.delete(e)&&(s=!0)}),s&&this.removeRedundantState(),s}overrideSelectionValue(e,t){if(!dv(t))return e;let i=this.selectionCtx.getRoot(),r=i?this.rowModel.getRowNode(i):null;return!r||(r.isSelected()??!1)}setNodesSelected({nodes:e,newValue:t,rangeSelect:i,clearSelection:r,source:s}){if(0===e.length)return 0;if(i){if(e.length>1)throw Error("AG Grid: cannot select multiple rows when using rangeSelect");let i=e[0],r=this.overrideSelectionValue(t,s);if(this.selectionCtx.isInRange(i.id)){let e=this.selectionCtx.truncate(i.id);r&&this.selectRange(e.discard,!1),this.selectRange(e.keep,r)}else if(this.selectionCtx.getRoot()!==i.id){let e=this.selectionCtx.extend(i.id,!0);r&&this.selectRange(e.discard,!1),this.selectRange(e.keep,r)}return 1}let a=r&&t&&!i;if(!iL(this.gos)||a){if(e.length>1)throw Error("AG Grid: cannot select multiple rows when selection.mode is set to 'singleRow'");this.deselectAllRowNodes()}return e.forEach(e=>{let i=this.getRouteToNode(e);this.recursivelySelectNode(i,this.selectedState,t)}),this.removeRedundantState(),this.selectionCtx.setRoot(iB(e).id),1}selectRange(e,t){let i=e.map(this.getRouteToNode).sort((e,t)=>t.length-e.length),r=new Set;i.forEach(e=>{r.has(iB(e))||(e.forEach(e=>r.add(e)),this.recursivelySelectNode(e,this.selectedState,t))}),this.removeRedundantState()}isNodeSelected(e){let t=this.getRouteToNode(e);return this.isNodePathSelected(t,this.selectedState)}isNodePathSelected([e,...t],i){if(0===t.length){let t=i.toggledNodes.has(e.id);if(e.hasChildren()){let t=i.toggledNodes.get(e.id);if(t&&t.toggledNodes.size)return}return i.selectAllChildren?!t:t}if(i.toggledNodes.has(e.id)){let r=i.toggledNodes.get(e.id);if(r)return this.isNodePathSelected(t,r)}return i.selectAllChildren}getRouteToNode(e){let t=[],i=e;for(;i.parent;)t.push(i),i=i.parent;return t.reverse()}removeRedundantState(){if(this.filterManager?.isAnyFilterPresent())return;let e=(t=this.selectedState,i,r)=>{if(t.toggledNodes.forEach((i,r)=>{e(i,r,t)}),i){let e=this.rowModel.getRowNode(i),r=e?.childStore;if(r?.isLastRowIndexKnown()&&t.toggledNodes.size>=r.getRowCount()){for(let e of t.toggledNodes.entries()){let[t,i]=e;if(i.toggledNodes.size>0||!this.rowModel.getRowNode(t))return}t.selectAllChildren=!t.selectAllChildren,t.toggledNodes.clear()}}let s=0===t.toggledNodes.size,a=r?.selectAllChildren===t.selectAllChildren;s&&a&&r?.toggledNodes.delete(i)};e()}recursivelySelectNode([e,...t],i,r){if(!e)return;if(!t.length){let t=e.selectable;if(i.selectAllChildren===r||!t){i.toggledNodes.delete(e.id);return}let s={selectAllChildren:r,toggledNodes:new Map};i.toggledNodes.set(e.id,s);return}let s=i.toggledNodes.has(e.id),a=i.toggledNodes.get(e.id)??{selectAllChildren:i.selectAllChildren,toggledNodes:new Map};s||i.toggledNodes.set(e.id,a),this.recursivelySelectNode(t,a,r),i.selectAllChildren===a.selectAllChildren&&0===a.toggledNodes.size&&i.toggledNodes.delete(e.id)}getSelectedNodes(){tO(`\`getSelectedNodes\` and \`getSelectedRows\` functions cannot be used with \`groupSelectsChildren\` and the server-side row model.
            Use \`api.getServerSideSelectionState()\` instead.`);let e=[];return this.rowModel.forEachNode(t=>{t.isSelected()&&e.push(t)}),e}processNewRow(){}getSelectedRows(){return this.getSelectedNodes().map(e=>e.data)}getSelectionCount(){return -1}isEmpty(){return!this.selectedState.selectAllChildren&&!this.selectedState.toggledNodes?.size}selectAllRowNodes(){this.selectedState={selectAllChildren:!0,toggledNodes:new Map},this.selectionCtx.reset()}deselectAllRowNodes(){this.selectedState={selectAllChildren:!1,toggledNodes:new Map},this.selectionCtx.reset()}getSelectAllState(){return this.selectedState.selectAllChildren?!(this.selectedState.toggledNodes.size>0)||null:this.selectedState.toggledNodes.size>0&&null}},Bt=class extends i2{constructor(){super(...arguments),this.beanName="selectionService"}wireBeans(e){this.rowModel=e.rowModel}postConstruct(){this.addManagedPropertyListeners(["groupSelectsChildren","selection"],()=>{let e=iF(this.gos),t=e&&this.selectionStrategy instanceof O9?Be:!e&&this.selectionStrategy instanceof Be?O9:void 0;t&&(this.destroyBean(this.selectionStrategy),this.selectionStrategy=this.createManagedBean(new t),this.shotgunResetNodeSelectionState(),this.dispatchSelectionChanged("api"))}),this.addManagedPropertyListeners(["rowSelection","selection"],()=>{let e=iR(this.gos);e!==this.selectionMode&&(this.selectionMode=e,this.deselectAllRowNodes({source:"api"}))}),this.selectionMode=iR(this.gos);let e=iF(this.gos)?Be:O9;this.selectionStrategy=this.createManagedBean(new e)}getSelectionState(){return this.selectionStrategy.getSelectedState()}setSelectionState(e,t){Array.isArray(e)||(this.selectionStrategy.setSelectedState(e),this.shotgunResetNodeSelectionState(),this.dispatchSelectionChanged(t))}setNodesSelected(e){let{nodes:t,...i}=e;if(t.length>1&&"multiRow"!==this.selectionMode)return tO("cannot multi select unless selection mode is 'multiRow'"),0;if(t.length>1&&e.rangeSelect)return tO("cannot use range selection when multi selecting rows"),0;let r={nodes:t.filter(e=>e.selectable),...i};if(!r.nodes.length)return 0;let s=this.selectionStrategy.setNodesSelected(r);return this.shotgunResetNodeSelectionState(r.source),this.dispatchSelectionChanged(r.source),s}deleteSelectionStateFromParent(e,t){this.selectionStrategy.deleteSelectionStateFromParent(e,t)&&(this.shotgunResetNodeSelectionState(),this.dispatchSelectionChanged("api"))}shotgunResetNodeSelectionState(e){this.rowModel.forEachNode(t=>{if(t.stub)return;let i=this.selectionStrategy.isNodeSelected(t);i!==t.isSelected()&&t.selectThisNode(i,void 0,e)})}getSelectedNodes(){return this.selectionStrategy.getSelectedNodes()}getSelectedRows(){return this.selectionStrategy.getSelectedRows()}getSelectionCount(){return this.selectionStrategy.getSelectionCount()}syncInRowNode(e){this.selectionStrategy.processNewRow(e);let t=this.selectionStrategy.isNodeSelected(e);if(!1!=t&&!e.selectable){this.selectionStrategy.setNodesSelected({nodes:[e],newValue:!1,source:"api"}),this.shotgunResetNodeSelectionState(),this.dispatchSelectionChanged("api");return}e.setSelectedInitialValue(t)}reset(){this.selectionStrategy.deselectAllRowNodes({source:"api"})}isEmpty(){return this.selectionStrategy.isEmpty()}hasNodesToSelect(){return!0}selectAllRowNodes(e){if(Bi(e),ix(this.gos)&&"multiRow"!==iR(this.gos))return tO("cannot multi select unless selection mode is 'multiRow'");this.selectionStrategy.selectAllRowNodes(e),this.rowModel.forEachNode(t=>{t.stub||t.selectThisNode(!0,void 0,e.source)}),this.dispatchSelectionChanged(e.source)}deselectAllRowNodes(e){Bi(e),this.selectionStrategy.deselectAllRowNodes(e),this.rowModel.forEachNode(t=>{t.stub||t.selectThisNode(!1,void 0,e.source)}),this.dispatchSelectionChanged(e.source)}getSelectAllState(e,t){return this.selectionStrategy.getSelectAllState(e,t)}updateGroupsFromChildrenSelections(){return!1}getBestCostNodeSelection(){tO("calling gridApi.getBestCostNodeSelection() is only possible when using rowModelType=`clientSide`.")}filterFromSelection(){}dispatchSelectionChanged(e){this.eventService.dispatchEvent({type:"selectionChanged",source:e})}};function Bi({justCurrentPage:e,justFiltered:t}){(e||t)&&tO(`selecting just ${e?"current page":"filtered"} only works when gridOptions.rowModelType='clientSide'`)}var Br=class extends i2{constructor(){super(...arguments),this.beanName="ssrmStoreFactory"}wireBeans(e){this.columnModel=e.columnModel,this.funcColsService=e.funcColsService}createStore(e,t){let i=this.getStoreParams(e,t);return new(i.suppressInfiniteScroll?O1:O6)(e,i,t)}getStoreParams(e,t){let i=this.getLevelSpecificParams(t),r=this.isInfiniteScroll(i),s=this.getBlockSize(r,i),a=this.getMaxBlocksInCache(r,e,i);return{suppressInfiniteScroll:!r,cacheBlockSize:s,maxBlocksInCache:a}}getMaxBlocksInCache(e,t,i){if(!e)return;let r=i&&null!=i.maxBlocksInCache?i.maxBlocksInCache:this.gos.get("maxBlocksInCache");if(null!=r&&r>=0){if(t.dynamicRowHeight){tO("Server Side Row Model does not support Dynamic Row Height and Cache Purging. Either a) remove getRowHeight() callback or b) remove maxBlocksInCache property. Purging has been disabled.");return}if(this.columnModel.isAutoRowHeightActive()){tO("Server Side Row Model does not support Auto Row Height and Cache Purging. Either a) remove colDef.autoHeight or b) remove maxBlocksInCache property. Purging has been disabled.");return}return r}}getBlockSize(e,t){if(!e)return;let i=t&&null!=t.cacheBlockSize?t.cacheBlockSize:this.gos.get("cacheBlockSize");return null!=i&&i>0?i:100}getLevelSpecificParams(e){let t=this.gos.getCallback("getServerSideGroupLevelParams");if(t)return t({level:e.level+1,parentRowNode:e.level>=0?e:void 0,rowGroupColumns:this.funcColsService.getRowGroupColumns(),pivotColumns:this.funcColsService.getPivotColumns(),pivotMode:this.columnModel.isPivotMode()})}isInfiniteScroll(e){return!(e&&null!=e.suppressInfiniteScroll?e.suppressInfiniteScroll:this.isSuppressServerSideInfiniteScroll())}isSuppressServerSideInfiniteScroll(){return this.gos.get("suppressServerSideInfiniteScroll")}},Bs=class extends i2{constructor(){super(...arguments),this.beanName="ssrmStoreUtils"}wireBeans(e){this.columnModel=e.columnModel,this.serverSideRowModel=e.rowModel,this.storeFactory=e.ssrmStoreFactory}loadFromDatasource(e){let{storeParams:t,parentBlock:i,parentNode:r}=e,s=r.getRoute()??[];if(!t.datasource)return;let a={startRow:e.startRow,endRow:e.endRow,rowGroupCols:t.rowGroupCols,valueCols:t.valueCols,pivotCols:t.pivotCols,pivotMode:t.pivotMode,groupKeys:s,filterModel:t.filterModel,sortModel:t.sortModel},o=this.gos.addGridCommonParams({success:e.success,fail:e.fail,request:a,parentNode:e.parentNode});window.setTimeout(()=>{if(!t.datasource||!i.isAlive()){e.fail();return}t.datasource.getRows(o)},0)}getChildStore(e,t,i){if(tZ(e))return t;let r=i(e[0]);if(r){if(1===e.length&&!r.childStore){let e=this.serverSideRowModel.getParams();r.childStore=this.createBean(this.storeFactory.createStore(e,r))}let t=e.slice(1,e.length),i=r.childStore;return i?i.getChildStore(t):null}return null}isServerRefreshNeeded(e,t,i){if(i.valueColChanged||i.secondaryColChanged)return!0;let r=e.level+1;if(!(r<t.length))return!0;let s=t[r].id;return i.changedColumns.indexOf(s)>-1||this.columnModel.getCols().filter(e=>e.getColDef().showRowGroup&&i.changedColumns.includes(e.getId())).map(e=>e.getColDef().showRowGroup).some(e=>!0===e||e===s)}getServerSideInitialRowCount(){return this.gos.get("serverSideInitialRowCount")}assertRowModelIsServerSide(e){return!!t6(this.gos)||(tO(`The '${e}' property can only be used with the Server Side Row Model.`),!1)}assertNotTreeData(e){return!this.gos.get("treeData")||(tO(`The '${e}' property cannot be used while using tree data.`),!1)}isServerSideSortAllLevels(){return this.gos.get("serverSideSortAllLevels")&&this.assertRowModelIsServerSide("serverSideSortAllLevels")}isServerSideOnlyRefreshFilteredGroups(){return this.gos.get("serverSideOnlyRefreshFilteredGroups")&&this.assertRowModelIsServerSide("serverSideOnlyRefreshFilteredGroups")}isServerSideSortOnServer(){return this.gos.get("serverSideSortOnServer")&&this.assertRowModelIsServerSide("serverSideSortOnServer")&&this.assertNotTreeData("serverSideSortOnServer")}isServerSideFilterOnServer(){return this.gos.get("serverSideFilterOnServer")&&this.assertRowModelIsServerSide("serverSideFilterOnServer")&&this.assertNotTreeData("serverSideFilterOnServer")}},Ba=class extends i2{constructor(){super(...arguments),this.beanName="ssrmTransactionManager",this.asyncTransactions=[]}wireBeans(e){this.valueCache=e.valueCache,this.serverSideRowModel=e.rowModel,this.selectionService=e.selectionService}postConstruct(){if(!t6(this.gos))return}applyTransactionAsync(e,t){null==this.asyncTransactionsTimeout&&this.scheduleExecuteAsync(),this.asyncTransactions.push({transaction:e,callback:t})}scheduleExecuteAsync(){let e=this.gos.get("asyncTransactionWaitMillis");this.asyncTransactionsTimeout=window.setTimeout(()=>{this.executeAsyncTransactions()},e)}executeAsyncTransactions(){if(!this.asyncTransactions)return;let e=[],t=[],i=[],r=!1;this.asyncTransactions.forEach(s=>{let a;if(this.serverSideRowModel.executeOnStore(s.transaction.route,e=>{a=e.applyTransaction(s.transaction)})?void 0==a&&(a={status:hi.StoreNotFound}):a={status:hi.StoreNotStarted},t.push(a),a.status==hi.StoreLoading){i.push(s);return}s.callback&&e.push(()=>s.callback(a)),a.status===hi.Applied&&(r=!0)}),e.length>0&&window.setTimeout(()=>{e.forEach(e=>e())},0),this.asyncTransactionsTimeout=void 0,this.asyncTransactions=i,r&&(this.valueCache.onDataChanged(),this.eventService.dispatchEvent({type:"storeUpdated"})),t.length>0&&this.eventService.dispatchEvent({type:"asyncTransactionsFlushed",results:t})}flushAsyncTransactions(){null!=this.asyncTransactionsTimeout&&clearTimeout(this.asyncTransactionsTimeout),this.executeAsyncTransactions()}applyTransaction(e){let t;if(!this.serverSideRowModel.executeOnStore(e.route,i=>{t=i.applyTransaction(e)}))return{status:hi.StoreNotStarted};if(!t)return{status:hi.StoreNotFound};if(this.valueCache.onDataChanged(),t.remove){let i=t.remove.map(e=>e.id);this.selectionService.deleteSelectionStateFromParent(e.route||[],i)}return this.eventService.dispatchEvent({type:"storeUpdated"}),t}},Bo="32.2.0",Bn={version:Bo,moduleName:`${tL.ServerSideRowModelModule}-core`,rowModel:"serverSide",beans:[O5,Oq,OJ,Bs,OZ,O0,Ba,OX,Br,OQ,Bt,O8,O2],dependantModules:[IX,hs]},Bl={version:Bo,moduleName:`${tL.ServerSideRowModelModule}-api`,beans:[d$],apiFunctions:{getServerSideSelectionState:function(e){return e.selectionService.getSelectionState()},setServerSideSelectionState:function(e,t){e.selectionService.setSelectionState(t,"api")},applyServerSideTransaction:function(e,t){return e.ssrmTransactionManager?.applyTransaction(t)},applyServerSideTransactionAsync:function(e,t,i){return e.ssrmTransactionManager?.applyTransactionAsync(t,i)},applyServerSideRowData:function(e,t){let i=t.startRow??0,r=t.route??[];if(i<0){tO(`invalid value ${t.startRow} for startRow, the value should be >= 0`);return}e.rowModelHelperService?.getServerSideRowModel()?.applyRowData(t.successParams,i,r)},retryServerSideLoads:function(e){e.rowModelHelperService?.getServerSideRowModel()?.retryLoads()},flushServerSideAsyncTransactions:function(e){return e.ssrmTransactionManager?.flushAsyncTransactions()},refreshServerSide:function(e,t){e.rowModelHelperService?.getServerSideRowModel()?.refreshStore(t)},getServerSideGroupLevelState:function(e){return e.rowModelHelperService?.getServerSideRowModel()?.getStoreState()??[]}},dependantModules:[Bn,dY,dK]},Bh={version:Bo,moduleName:tL.ServerSideRowModelModule,dependantModules:[Bn,Bl]},Bd=class{};Bd.SELECT_ALL="__AG_SELECT_ALL__",Bd.ADD_SELECTION_TO_FILTER="__AG_ADD_SELECTION_TO_FILTER__";var Bc={loadingOoo:"Loading...",blanks:"(Blanks)",searchOoo:"Search...",selectAll:"(Select All)",selectAllSearchResults:"(Select All Search Results)",addCurrentSelectionToFilter:"Add current selection to filter",noMatches:"No matches."},Bu=class extends sQ{constructor(e){super(e.isGroup?`
            <div class="ag-set-filter-item" aria-hidden="true">
                <span class="ag-set-filter-group-icons">
                    <span class="ag-set-filter-group-closed-icon" data-ref="eGroupClosedIcon"></span>
                    <span class="ag-set-filter-group-opened-icon" data-ref="eGroupOpenedIcon"></span>
                    <span class="ag-set-filter-group-indeterminate-icon" data-ref="eGroupIndeterminateIcon"></span>
                </span>
                <ag-checkbox data-ref="eCheckbox" class="ag-set-filter-item-checkbox"></ag-checkbox>
            </div>`:`
            <div class="ag-set-filter-item">
                <ag-checkbox data-ref="eCheckbox" class="ag-set-filter-item-checkbox"></ag-checkbox>
            </div>`,[ad]),this.eCheckbox=null,this.eGroupOpenedIcon=null,this.eGroupClosedIcon=null,this.eGroupIndeterminateIcon=null,this.focusWrapper=e.focusWrapper,this.value=e.value,this.params=e.params,this.translate=e.translate,this.valueFormatter=e.valueFormatter,this.item=e.item,this.isSelected=e.isSelected,this.isTree=e.isTree,this.depth=e.depth??0,this.isGroup=e.isGroup,this.groupsExist=e.groupsExist,this.isExpanded=e.isExpanded,this.hasIndeterminateExpandState=e.hasIndeterminateExpandState}wireBeans(e){this.valueService=e.valueService,this.userComponentFactory=e.userComponentFactory}postConstruct(){this.addDestroyFunc(()=>this.destroyCellRendererComponent?.()),this.render(),this.eCheckbox.setLabelEllipsis(!0).setValue(this.isSelected,!0).setDisabled(!!this.params.readOnly).getInputElement().setAttribute("tabindex","-1"),this.refreshVariableAriaLabels(),this.isTree&&(this.depth>0&&(this.addCssClass("ag-set-filter-indent-"+this.depth),this.getGui().style.setProperty("--ag-indentation-level",String(this.depth))),this.isGroup?this.setupExpansion():this.groupsExist&&this.addCssClass("ag-set-filter-add-group-indent"),r2(this.getAriaElement(),this.depth+1)),this.refreshAriaChecked(),this.params.readOnly||this.eCheckbox.onValueChange(e=>this.onCheckboxChanged(!!e))}getFocusableElement(){return this.focusWrapper}setupExpansion(){this.eGroupClosedIcon.appendChild(s1("setFilterGroupClosed",this.gos,null)),this.eGroupOpenedIcon.appendChild(s1("setFilterGroupOpen",this.gos,null));let e=this.onExpandOrContractClicked.bind(this);this.addManagedElementListeners(this.eGroupClosedIcon,{click:e}),this.addManagedElementListeners(this.eGroupOpenedIcon,{click:e}),this.hasIndeterminateExpandState&&(this.eGroupIndeterminateIcon.appendChild(s1("setFilterGroupIndeterminate",this.gos,null)),this.addManagedElementListeners(this.eGroupIndeterminateIcon,{click:e})),this.setExpandedIcons(),this.refreshAriaExpanded()}onExpandOrContractClicked(){this.setExpanded(!this.isExpanded)}setExpanded(e,t){if(this.isGroup&&e!==this.isExpanded){this.isExpanded=e;let i={type:"expandedChanged",isExpanded:!!e,item:this.item};t||this.dispatchLocalEvent(i),this.setExpandedIcons(),this.refreshAriaExpanded()}}setExpandedIcons(){sC(this.eGroupClosedIcon,this.hasIndeterminateExpandState?!1===this.isExpanded:!this.isExpanded),sC(this.eGroupOpenedIcon,!0===this.isExpanded),this.hasIndeterminateExpandState&&sC(this.eGroupIndeterminateIcon,void 0===this.isExpanded)}onCheckboxChanged(e){this.isSelected=e;let t={type:"selectionChanged",isSelected:e,item:this.item};this.dispatchLocalEvent(t),this.refreshVariableAriaLabels(),this.refreshAriaChecked()}toggleSelected(){this.params.readOnly||this.setSelected(!this.isSelected)}setSelected(e,t){this.isSelected=e,this.eCheckbox.setValue(e,t),this.refreshAriaChecked()}refreshVariableAriaLabels(){if(!this.isTree)return;let e=this.localeService.getLocaleTextFunc(),t=this.eCheckbox.getValue(),i=void 0===t?e("ariaIndeterminate","indeterminate"):t?e("ariaVisible","visible"):e("ariaHidden","hidden"),r=e("ariaToggleVisibility","Press SPACE to toggle visibility");r0(this.eCheckbox.getInputElement(),void 0),this.eCheckbox.setInputAriaLabel(`${r} (${i})`)}setupFixedAriaLabels(e){if(!this.isTree)return;let t=this.localeService.getLocaleTextFunc()("ariaFilterValue","Filter Value"),i=this.getAriaElement();rJ(i,`${e} ${t}`),r1(i,this.eCheckbox.getInputElement().id)}refreshAriaChecked(){var e;rq(this.getAriaElement(),"checked",void 0===(e=this.eCheckbox.getValue())?"mixed":e)}refreshAriaExpanded(){r5(this.getAriaElement(),!!this.isExpanded)}refresh(e,t,i){if(this.item=e,t!==this.isSelected&&this.setSelected(t,!0),this.setExpanded(i,!0),this.valueFunction){let e=this.valueFunction();this.setTooltipAndCellRendererParams(e,e),this.cellRendererComponent||this.renderCellWithoutCellRenderer()}if(this.cellRendererComponent&&!this.cellRendererComponent.refresh?.(this.cellRendererParams)){let e=this.cellRendererComponent;this.renderCell(),this.destroyBean(e)}}render(){let{params:{column:e}}=this,{value:t}=this,i=null;"function"==typeof t?(this.valueFunction=t,t=i=this.valueFunction()):i=this.isTree?tq(t):this.getFormattedValue(e,t),this.setTooltipAndCellRendererParams(t,i),this.renderCell()}setTooltipAndCellRendererParams(e,t){let i="whenTruncated"===this.gos.get("tooltipShowMode");if(this.params.showTooltips&&(!i||!this.params.cellRenderer)){let r;let s=null!=t?t:tq(e);i&&(r=()=>{let e=this.eCheckbox.getGui().querySelector(".ag-label");return!e||e.scrollWidth>e.clientWidth}),this.setTooltip({newTooltipText:s,location:"setFilterValue",getColDef:()=>this.params.colDef,getColumn:()=>this.params.column,shouldDisplayTooltip:r})}this.cellRendererParams=this.gos.addGridCommonParams({value:e,valueFormatted:t,colDef:this.params.colDef,column:this.params.column,setTooltip:(e,t)=>{this.setTooltip({newTooltipText:e,getColDef:()=>this.params.colDef,getColumn:()=>this.params.column,location:"setFilterValue",shouldDisplayTooltip:t})}})}getTooltipParams(){let e=super.getTooltipParams();return e.location="setFilterValue",e.colDef=this.getComponentHolder(),this.isTree&&(e.level=this.depth),e}getFormattedValue(e,t){return this.valueService.formatValue(e,null,t,this.valueFormatter,!1)}renderCell(){let e=this.userComponentFactory.getSetFilterCellRendererDetails(this.params,this.cellRendererParams),t=e?e.newAgStackInstance():void 0;if(null==t){this.renderCellWithoutCellRenderer();return}t.then(e=>{e&&(this.cellRendererComponent=e,this.eCheckbox.setLabel(e.getGui()),this.destroyCellRendererComponent=()=>this.destroyBean(e))})}renderCellWithoutCellRenderer(){let e=(null==this.cellRendererParams.valueFormatted?this.cellRendererParams.value:this.cellRendererParams.valueFormatted)??this.translate("blanks");"string"!=typeof e&&(tO(`Set Filter Value Formatter must return string values. Please ensure the Set Filter Value Formatter returns string values for complex objects. See ${this.getFrameworkOverrides().getDocLink("filter-set-filter-list/#filter-value-types")}`),e=""),this.eCheckbox.setLabel(e),this.setupFixedAriaLabels(e)}getComponentHolder(){return this.params.column.getColDef()}},Bp=class{getModelAsString(e,t){let{values:i}=e||t.getModel()||{},r=t.getValueModel();if(null==i||null==r)return"";let s=i.filter(e=>r.isKeyAvailable(e)),a=s.length,o=s.slice(0,10).map(e=>t.getFormattedValue(e));return`(${a}) ${o.join(",")}${a>10?",...":""}`}};function Bg(e,t,i){let r=e;return r?(r=r.map(e=>tq(t$(e))),!t&&i&&r.some(e=>null==e))?null==iB(r)?null:r.filter(e=>null!=e):r:null}var Bm=class{constructor(e,t,i,r,s,a,o,n,l,h,d){this.rowModel=e,this.filterParams=t,this.createKey=i,this.caseFormat=r,this.funcColsService=s,this.valueService=a,this.treeDataOrGrouping=o,this.treeData=n,this.getDataPath=l,this.groupAllowUnbalanced=h,this.addManagedEventListeners=d}extractUniqueValuesAsync(e,t){return new ab(i=>{if(this.rowModel.isRowDataLoaded())i(this.extractUniqueValues(e,t));else{let[r]=this.addManagedEventListeners({rowCountReady:()=>{r?.(),i(this.extractUniqueValues(e,t))}})}})}extractUniqueValues(e,t){let i=new Map,r=this.extractExistingFormattedKeys(t),s=new Set,a=this.treeData&&!!this.getDataPath,o=this.funcColsService.getRowGroupColumns(),n=(e,a)=>{let o=this.caseFormat(e);if(!s.has(o)){s.add(o);let n=e,l=t$(a),h=r?.get(o);null!=h&&(n=h,l=t.get(h)),i.set(n,l)}};return this.rowModel.forEachLeafNode(t=>{if(!t.data||!e(t))return;if(this.treeDataOrGrouping){this.addValueForTreeDataOrGrouping(t,a,o,n);return}let i=this.getValue(t);null!=i&&Array.isArray(i)?(i.forEach(e=>{n(this.createKey(e,t),e)}),0===i.length&&n(null,null)):n(this.createKey(i,t),i)}),i}addValueForTreeDataOrGrouping(e,t,i,r){let s;if(t){if(e.childrenAfterGroup?.length)return;s=this.getDataPath(e.data)}else(s=i.map(t=>this.valueService.getKeyForNode(t,e))).push(this.getValue(e));let a=Bg(s,t,this.groupAllowUnbalanced);r(this.createKey(a),a)}getValue(e){return this.filterParams.getValue(e)}extractExistingFormattedKeys(e){if(!e)return null;let t=new Map;return e.forEach((e,i)=>{t.set(this.caseFormat(i),i)}),t}},Bf=class{constructor({caseFormat:e}){this.filteringKeys=null,this.filteringKeysCaseFormatted=null,this.hasNoAppliedFilteringKeys=!1,this.caseFormat=e}allFilteringKeys(){return this.filteringKeys}allFilteringKeysCaseFormatted(){return this.filteringKeysCaseFormatted}noAppliedFilteringKeys(){return this.hasNoAppliedFilteringKeys}setFilteringKeys(e){this.filteringKeys=new Set(e),this.hasNoAppliedFilteringKeys=!this.filteringKeys||0===this.filteringKeys.size,this.filteringKeysCaseFormatted=new Set,this.filteringKeys.forEach(e=>this.filteringKeysCaseFormatted.add(this.caseFormat(e)))}addFilteringKey(e){null==this.filteringKeys&&(this.filteringKeys=new Set,this.filteringKeysCaseFormatted=new Set),this.filteringKeys.add(e),this.filteringKeysCaseFormatted.add(this.caseFormat(e)),this.hasNoAppliedFilteringKeys&&(this.hasNoAppliedFilteringKeys=!1)}hasCaseFormattedFilteringKey(e){return this.filteringKeysCaseFormatted.has(this.caseFormat(e))}hasFilteringKey(e){return this.filteringKeys.has(e)}reset(){this.filteringKeys=null,this.filteringKeysCaseFormatted=null,this.hasNoAppliedFilteringKeys=!1}},Bv=class{constructor(e,t,i,r){this.valueService=e,this.valueFormatter=t,this.formatter=i,this.column=r,this.displayedKeys=[]}updateDisplayedValuesToAllAvailable(e,t,i){this.displayedKeys=Array.from(i)}updateDisplayedValuesToMatchMiniFilter(e,t,i,r,s){for(let t of(this.displayedKeys=[],i))if(null==t)s&&this.displayedKeys.push(t);else{let i=e(t),s=this.valueService.formatValue(this.column,null,i,this.valueFormatter,!1);r(this.formatter(s))&&this.displayedKeys.push(t)}}getDisplayedValueCount(){return this.displayedKeys.length}getDisplayedItem(e){return this.displayedKeys[e]}getSelectAllItem(){return Bd.SELECT_ALL}getAddSelectionToFilterItem(){return Bd.ADD_SELECTION_TO_FILTER}getDisplayedKeys(){return this.displayedKeys}forEachDisplayedKey(e){this.displayedKeys.forEach(e)}someDisplayedKey(e){return this.displayedKeys.some(e)}hasGroups(){return!1}refresh(){}},By=e=>e?[String(e.getFullYear()),String(e.getMonth()+1),String(e.getDate())]:null,BC=class{constructor(e,t,i,r){this.formatter=e,this.treeListPathGetter=t,this.treeListFormatter=i,this.treeDataOrGrouping=r,this.allDisplayedItemsTree=[],this.activeDisplayedItemsFlat=[],this.selectAllItem={depth:0,filterPasses:!0,available:!0,treeKey:Bd.SELECT_ALL,children:this.allDisplayedItemsTree,expanded:!0,key:Bd.SELECT_ALL,parentTreeKeys:[]},this.addSelectionToFilterItem={depth:0,filterPasses:!0,available:!0,treeKey:Bd.ADD_SELECTION_TO_FILTER,expanded:!0,key:Bd.ADD_SELECTION_TO_FILTER,parentTreeKeys:[]}}updateOnParamsChange(e){this.treeListFormatter=e}updateDisplayedValuesToAllAvailable(e,t,i,r){"reload"===r?this.generateItemTree(e,t,i):"otherFilter"===r?(this.updateAvailable(i),this.updateExpandAll()):"miniFilter"===r&&(this.resetFilter(),this.updateExpandAll()),this.flattenItems()}updateDisplayedValuesToMatchMiniFilter(e,t,i,r,s,a){"reload"===a?this.generateItemTree(e,t,i):"otherFilter"===a&&this.updateAvailable(i),this.updateFilter(r,s),this.updateExpandAll(),this.flattenItems()}generateItemTree(e,t,i){this.allDisplayedItemsTree=[],this.groupsExist=!1;let r=this.getTreeListPathGetter(e,i);for(let s of t){let t;let a=r(e(s))??[null];a.length>1&&(this.groupsExist=!0);let o=i.has(s),n=this.allDisplayedItemsTree,l=[];a.forEach((e,i)=>{n||(n=[],t.children=n),(t=n.find(t=>t.treeKey?.toUpperCase()===e?.toUpperCase()))||(t={treeKey:e,depth:i,filterPasses:!0,expanded:!1,available:o,parentTreeKeys:l},i===a.length-1&&(t.key=s),n.push(t)),n=t.children,l=[...l,e]})}this.updateAvailable(i),this.selectAllItem.children=this.allDisplayedItemsTree,this.selectAllItem.expanded=!1}getTreeListPathGetter(e,t){if(this.treeListPathGetter)return this.treeListPathGetter;if(this.treeDataOrGrouping)return e=>e;let i=!1;for(let r of t){let t=e(r);if(t instanceof Date){i=!0;break}if(null!=t)break}return i?By:(tO("property treeList=true for Set Filter params, but you did not provide a treeListPathGetter or values of type Date."),e=>[String(e)])}flattenItems(){this.activeDisplayedItemsFlat=[];let e=t=>{t.forEach(t=>{t.filterPasses&&t.available&&(this.activeDisplayedItemsFlat.push(t),t.children&&t.expanded&&e(t.children))})};e(this.allDisplayedItemsTree)}resetFilter(){let e=t=>{t.children&&t.children.forEach(t=>{e(t)}),t.filterPasses=!0};this.allDisplayedItemsTree.forEach(t=>e(t))}updateFilter(e,t){let i=i=>!!i.available&&(null==i.treeKey?t:e(this.formatter(this.treeListFormatter?this.treeListFormatter(i.treeKey,i.depth,i.parentTreeKeys):i.treeKey)));this.allDisplayedItemsTree.forEach(e=>this.recursiveItemCheck(e,!1,i,"filterPasses"))}getDisplayedValueCount(){return this.activeDisplayedItemsFlat.length}getDisplayedItem(e){return this.activeDisplayedItemsFlat[e]}getSelectAllItem(){return this.selectAllItem}getAddSelectionToFilterItem(){return this.addSelectionToFilterItem}getDisplayedKeys(){let e=[];return this.forEachDisplayedKey(t=>e.push(t)),e}forEachDisplayedKey(e){let t=(i,r)=>{i.children?i.expanded&&r||i.children.forEach(e=>{e.filterPasses&&t(e,!1)}):e(i.key)};this.activeDisplayedItemsFlat.forEach(e=>t(e,!0))}someDisplayedKey(e){let t=(i,r)=>i.children?(!i.expanded||!r)&&i.children.some(e=>!!e.filterPasses&&t(e,!1)):e(i.key);return this.activeDisplayedItemsFlat.some(e=>t(e,!0))}hasGroups(){return this.groupsExist}refresh(){this.updateExpandAll(),this.flattenItems()}updateExpandAll(){let e=(t,i,r)=>{for(let s of t){if(!s.filterPasses||!s.available||!s.children)continue;if(i=i||!!s.expanded,r=r||!s.expanded,i&&r)return;let t=e(s.children,i,r);if(void 0===t)return;t?i=!0:r=!0}return i&&r?void 0:i},t=this.getSelectAllItem();t.expanded=e(t.children,!1,!1)}recursiveItemCheck(e,t,i,r){let s=!1;e.children&&e.children.forEach(a=>{let o=this.recursiveItemCheck(a,t||i(e),i,r);s=s||o});let a=t||s||i(e);return e[r]=a,a}updateAvailable(e){let t=t=>e.has(t.key);this.allDisplayedItemsTree.forEach(e=>this.recursiveItemCheck(e,!1,t,"available"))}},Bw=class{constructor(e){this.localEventService=new tR,this.miniFilterText=null,this.addCurrentSelectionToFilter=!1,this.providedValues=null,this.allValues=new Map,this.availableKeys=new Set,this.selectedKeys=new Set,this.initialised=!1;let{usingComplexObjects:t,funcColsService:i,valueService:r,treeDataTreeList:s,groupingTreeList:a,filterParams:o,gos:n,valueFormatter:l,addManagedEventListeners:h}=e,{column:d,colDef:c,textFormatter:u,doesRowPassOtherFilter:p,suppressSorting:g,comparator:m,rowModel:f,values:v,caseSensitive:y,treeList:C,treeListPathGetter:w,treeListFormatter:b}=o;this.filterParams=o,this.gos=n,this.setIsLoading=e.setIsLoading,this.translate=e.translate,this.caseFormat=e.caseFormat,this.createKey=e.createKey,this.usingComplexObjects=!!e.usingComplexObjects,this.formatter=u??(e=>e??null),this.doesRowPassOtherFilters=p,this.suppressSorting=g||!1,this.filteringKeys=new Bf({caseFormat:this.caseFormat});let S=m??c.comparator,x=!!s||!!a;this.compareByValue=!!(t&&S||x||C&&!w),x&&!S?this.entryComparator=this.createTreeDataOrGroupingComparator():!C||w||S?this.entryComparator=([e,t],[i,r])=>S(t,r):this.entryComparator=([e,t],[i,r])=>t1(t,r),this.keyComparator=S??t1,this.caseSensitive=!!y;let M=n.get("getDataPath"),E=n.get("groupAllowUnbalanced");t4(n)&&(this.clientSideValuesExtractor=new Bm(f,this.filterParams,this.createKey,this.caseFormat,i,r,x,!!s,M,E,h)),null==v?this.valuesType=2:(this.valuesType=Array.isArray(v)?0:1,this.providedValues=v),this.displayValueModel=C?new BC(this.formatter,w,b,s||a):new Bv(r,l,this.formatter,d),this.updateAllValues().then(e=>this.resetSelectionState(e||[]))}addEventListener(e,t,i){this.localEventService.addEventListener(e,t,i)}removeEventListener(e,t,i){this.localEventService.removeEventListener(e,t,i)}updateOnParamsChange(e){return new ab(t=>{let{values:i,textFormatter:r,suppressSorting:s,treeListFormatter:a}=e,o=this.providedValues,n=this.suppressSorting;if(this.filterParams=e,this.formatter=r??(e=>e??null),this.suppressSorting=s||!1,this.providedValues=i??null,this.displayValueModel instanceof BC&&this.displayValueModel.updateOnParamsChange(a),this.providedValues!==o||this.suppressSorting!==n){i&&0!==i.length?this.valuesType=Array.isArray(i)?0:1:(this.valuesType=2,this.providedValues=null);let e=this.getModel();this.updateAllValues().then(()=>{this.setModel(e).then(()=>t())})}else t()})}refreshValues(){return new ab(e=>{this.allValuesPromise.then(()=>{let t=this.getModel();this.updateAllValues(),this.setModel(t).then(()=>e())})})}overrideValues(e){return new ab(t=>{this.allValuesPromise.then(()=>{this.valuesType=0,this.providedValues=e,this.refreshValues().then(()=>t())})})}refreshAfterAnyFilterChanged(){return this.showAvailableOnly()?this.allValuesPromise.then(e=>(this.updateAvailableKeys(e??[],"otherFilter"),!0)):ab.resolve(!1)}isInitialised(){return this.initialised}updateAllValues(){return this.allValuesPromise=new ab(e=>{switch(this.valuesType){case 2:this.getValuesFromRowsAsync(!1).then(t=>e(this.processAllValues(t)));break;case 0:e(this.processAllValues(this.uniqueValues(this.validateProvidedValues(this.providedValues))));break;case 1:{this.setIsLoading(!0);let t=this.providedValues,{column:i,colDef:r}=this.filterParams,s=this.gos.addGridCommonParams({success:t=>{this.setIsLoading(!1),e(this.processAllValues(this.uniqueValues(this.validateProvidedValues(t))))},colDef:r,column:i});window.setTimeout(()=>t(s),0);break}default:throw Error("Unrecognised valuesType")}}),this.allValuesPromise.then(e=>this.updateAvailableKeys(e||[],"reload")).then(()=>this.initialised=!0),this.allValuesPromise}processAllValues(e){let t=this.sortKeys(e);return this.allValues=e??new Map,t}validateProvidedValues(e){if(this.usingComplexObjects&&e?.length){let t=e[0];t&&"object"!=typeof t&&"function"!=typeof t&&(null==this.createKey(t)?tO("Set Filter Key Creator is returning null for provided values and provided values are primitives. Please provide complex objects. See https://www.ag-grid.com/javascript-data-grid/filter-set-filter-list/#filter-value-types"):tO("Set Filter has a Key Creator, but provided values are primitives. Did you mean to provide complex objects?"))}return e}setValuesType(e){this.valuesType=e}getValuesType(){return this.valuesType}isKeyAvailable(e){return this.availableKeys.has(e)}showAvailableOnly(){return 2===this.valuesType}updateAvailableKeys(e,t){let i=this.showAvailableOnly()?this.sortKeys(this.getValuesFromRows(!0)):e;this.availableKeys=new Set(i),this.localEventService.dispatchEvent({type:"availableValuesChanged"}),this.updateDisplayedValues(t,e)}sortKeys(e){let t;let i=e??new Map;return this.suppressSorting?Array.from(i.keys()):(t=this.compareByValue?Array.from(i.entries()).sort(this.entryComparator).map(([e])=>e):Array.from(i.keys()).sort(this.keyComparator),this.filterParams.excelMode&&i.has(null)&&(t=t.filter(e=>null!=e)).push(null),t)}getParamsForValuesFromRows(e=!1){return this.clientSideValuesExtractor?{predicate:t=>!e||this.doesRowPassOtherFilters(t),existingValues:e&&!this.caseSensitive?this.allValues:void 0}:(tB("Set Filter cannot initialise because you are using a row model that does not contain all rows in the browser. Either use a different filter type, or configure Set Filter such that you provide it with values"),null)}getValuesFromRows(e=!1){let t=this.getParamsForValuesFromRows(e);return t?this.clientSideValuesExtractor.extractUniqueValues(t.predicate,t.existingValues):null}getValuesFromRowsAsync(e=!1){let t=this.getParamsForValuesFromRows(e);return t?this.clientSideValuesExtractor.extractUniqueValuesAsync(t.predicate,t.existingValues):ab.resolve(null)}setMiniFilter(e){return e=t$(e),this.miniFilterText!==e&&(null===e&&this.setAddCurrentSelectionToFilter(!1),this.miniFilterText=e,this.updateDisplayedValues("miniFilter"),!0)}getMiniFilter(){return this.miniFilterText}updateDisplayedValues(e,t){if("expansion"===e){this.displayValueModel.refresh();return}if(null==this.miniFilterText){this.displayValueModel.updateDisplayedValuesToAllAvailable(e=>this.getValue(e),t,this.availableKeys,e);return}let i=this.caseFormat(this.formatter(this.miniFilterText)||""),r=e=>null!=e&&this.caseFormat(e).indexOf(i)>=0,s=!!this.filterParams.excelMode&&r(this.translate("blanks"));this.displayValueModel.updateDisplayedValuesToMatchMiniFilter(e=>this.getValue(e),t,this.availableKeys,r,s,e)}getDisplayedValueCount(){return this.displayValueModel.getDisplayedValueCount()}getDisplayedItem(e){return this.displayValueModel.getDisplayedItem(e)}getSelectAllItem(){return this.displayValueModel.getSelectAllItem()}getAddSelectionToFilterItem(){return this.displayValueModel.getAddSelectionToFilterItem()}hasSelections(){return this.filterParams.defaultToNothingSelected?this.selectedKeys.size>0:this.allValues.size!==this.selectedKeys.size}getKeys(){return Array.from(this.allValues.keys())}getValues(){return Array.from(this.allValues.values())}getValue(e){return this.allValues.get(e)}setAddCurrentSelectionToFilter(e){this.addCurrentSelectionToFilter=e}isInWindowsExcelMode(){return"windows"===this.filterParams.excelMode}isAddCurrentSelectionToFilterChecked(){return this.isInWindowsExcelMode()&&this.addCurrentSelectionToFilter}showAddCurrentSelectionToFilter(){return this.isInWindowsExcelMode()&&tY(this.miniFilterText)&&this.miniFilterText.length>0}selectAllMatchingMiniFilter(e=!1){null==this.miniFilterText?this.selectedKeys=new Set(this.allValues.keys()):(e&&this.selectedKeys.clear(),this.displayValueModel.forEachDisplayedKey(e=>this.selectedKeys.add(e)))}deselectAllMatchingMiniFilter(){null==this.miniFilterText?this.selectedKeys.clear():this.displayValueModel.forEachDisplayedKey(e=>this.selectedKeys.delete(e))}selectKey(e){this.selectedKeys.add(e)}deselectKey(e){this.filterParams.excelMode&&this.isEverythingVisibleSelected()&&this.resetSelectionState(this.displayValueModel.getDisplayedKeys()),this.selectedKeys.delete(e)}isKeySelected(e){return this.selectedKeys.has(e)}isEverythingVisibleSelected(){return!this.displayValueModel.someDisplayedKey(e=>!this.isKeySelected(e))}isNothingVisibleSelected(){return!this.displayValueModel.someDisplayedKey(e=>this.isKeySelected(e))}getModel(){if(!this.hasSelections())return null;let e=this.isAddCurrentSelectionToFilterChecked()?this.filteringKeys.allFilteringKeys():null;return e&&e.size>0?this.selectedKeys?Array.from(new Set([...Array.from(e),...Array.from(this.selectedKeys).filter(t=>!e.has(t))])):Array.from(e):Array.from(this.selectedKeys)}setModel(e){return this.allValuesPromise.then(t=>{if(null==e)this.resetSelectionState(t??[]);else{this.selectedKeys.clear();let t=new Map;this.allValues.forEach((e,i)=>{t.set(this.caseFormat(i),i)}),e.forEach(e=>{let i=this.caseFormat(t$(e)),r=t.get(i);void 0!==r&&this.selectKey(r)})}})}uniqueValues(e){let t=new Map,i=new Set;return(e??[]).forEach(e=>{let r=t$(e),s=this.createKey(r),a=this.caseFormat(s);i.has(a)||(i.add(a),t.set(s,r))}),t}resetSelectionState(e){this.filterParams.defaultToNothingSelected?this.selectedKeys.clear():this.selectedKeys=new Set(e)}hasGroups(){return this.displayValueModel.hasGroups()}createTreeDataOrGroupingComparator(){return([e,t],[i,r])=>{if(null==t)return null==r?0:-1;if(null==r)return 1;for(let e=0;e<t.length;e++){if(e>=r.length)return 1;let i=t1(t[e],r[e]);if(0!==i)return i}return 0}}setAppliedModelKeys(e){this.filteringKeys.setFilteringKeys(e)}addToAppliedModelKeys(e){this.filteringKeys.addFilteringKey(e)}getAppliedModelKeys(){return this.filteringKeys.allFilteringKeys()}getCaseFormattedAppliedModelKeys(){return this.filteringKeys.allFilteringKeysCaseFormatted()}hasAppliedModelKey(e){return this.filteringKeys.hasCaseFormattedFilteringKey(e)}hasAnyAppliedModelKey(){return!this.filteringKeys.noAppliedFilteringKeys()}},Bb=class extends oh{constructor(){super("setFilter"),this.eMiniFilter=null,this.eFilterLoading=null,this.eSetFilterList=null,this.eFilterNoMatches=null,this.valueModel=null,this.setFilterParams=null,this.virtualList=null,this.caseSensitive=!1,this.treeDataTreeList=!1,this.groupingTreeList=!1,this.hardRefreshVirtualList=!1,this.noValueFormatterSupplied=!1,this.filterModelFormatter=new Bp,this.updateSetFilterOnParamsChange=e=>{this.setFilterParams=e,this.caseSensitive=!!e.caseSensitive;let t=e.keyCreator??e.colDef.keyCreator;this.setValueFormatter(e.valueFormatter,t,!!e.treeList,!!e.colDef.refData);let i=e.column.getId().startsWith(i8);this.treeDataTreeList=this.gos.get("treeData")&&!!e.treeList&&i,this.getDataPath=this.gos.get("getDataPath"),this.groupingTreeList=!!this.funcColsService.getRowGroupColumns().length&&!!e.treeList&&i,this.createKey=this.generateCreateKey(t,this.treeDataTreeList||this.groupingTreeList)}}wireBeans(e){super.wireBeans(e),this.funcColsService=e.funcColsService,this.valueService=e.valueService,this.dataTypeService=e.dataTypeService}postConstruct(){super.postConstruct()}updateUiVisibility(){}createBodyTemplate(){return`
            <div class="ag-set-filter">
                <div data-ref="eFilterLoading" class="ag-filter-loading ag-hidden">${this.translateForSetFilter("loadingOoo")}</div>
                <ag-input-text-field class="ag-mini-filter" data-ref="eMiniFilter"></ag-input-text-field>
                <div data-ref="eFilterNoMatches" class="ag-filter-no-matches ag-hidden">${this.translateForSetFilter("noMatches")}</div>
                <div data-ref="eSetFilterList" class="ag-set-filter-list" role="presentation"></div>
            </div>`}getAgComponents(){return[ob]}handleKeyDown(e){if(super.handleKeyDown(e),!e.defaultPrevented)switch(e.key){case aa.SPACE:this.handleKeySpace(e);break;case aa.ENTER:this.handleKeyEnter(e);break;case aa.LEFT:this.handleKeyLeft(e);break;case aa.RIGHT:this.handleKeyRight(e)}}handleKeySpace(e){this.getComponentForKeyEvent(e)?.toggleSelected()}handleKeyEnter(e){if(!this.setFilterParams)return;let{excelMode:t,readOnly:i}=this.setFilterParams||{};t&&!i&&(e.preventDefault(),this.onBtApply(!1,!1,e),"mac"===this.setFilterParams.excelMode&&this.eMiniFilter.getInputElement().select())}handleKeyLeft(e){this.getComponentForKeyEvent(e)?.setExpanded(!1)}handleKeyRight(e){this.getComponentForKeyEvent(e)?.setExpanded(!0)}getComponentForKeyEvent(e){if(!this.eSetFilterList.contains(ih(this.gos))||!this.virtualList)return;let t=this.virtualList.getLastFocusedRow();if(null==t)return;let i=this.virtualList.getComponentAt(t);if(null==i)return;e.preventDefault();let{readOnly:r}=this.setFilterParams??{};if(!r)return i}getCssIdentifier(){return"set-filter"}setModel(e){return null==e&&this.valueModel?.getModel()==null?(this.setMiniFilter(null),ab.resolve()):super.setModel(e)}refresh(e){if(this.applyExcelModeOptions(e),!super.refresh(e))return!1;let t=this.setFilterParams;return!(["treeList","treeListPathGetter","caseSensitive","comparator","excelMode"].some(i=>e[i]!==t?.[i])||this.haveColDefParamsChanged(e))&&(super.updateParams(e),this.updateSetFilterOnParamsChange(e),this.updateMiniFilter(),e.suppressSelectAll!==t?.suppressSelectAll&&this.createVirtualListModel(e),this.valueModel?.updateOnParamsChange(e).then(()=>{this.refreshFilterValues()}),!0)}haveColDefParamsChanged(e){let{colDef:t,keyCreator:i}=e,{colDef:r,keyCreator:s}=this.setFilterParams??{},a=i??t.keyCreator,o=s??r?.keyCreator,n=t.filterValueGetter!==r?.filterValueGetter,l=!!this.dataTypeService&&!!a&&this.dataTypeService.getFormatValue(t.cellDataType)===a&&t.valueFormatter!==r?.valueFormatter;return n||a!==o||l}setModelAndRefresh(e){return this.valueModel?this.valueModel.setModel(e).then(()=>{this.isAlive()&&this.checkAndRefreshVirtualList()}):ab.resolve()}resetUiToDefaults(){return this.setMiniFilter(null),this.setModelAndRefresh(null)}setModelIntoUi(e){this.setMiniFilter(null);let t=null==e?null:e.values;return this.setModelAndRefresh(t)}getModelFromUi(){if(!this.valueModel)throw Error("Value model has not been created.");let e=this.valueModel.getModel();return e?{values:e,filterType:this.getFilterType()}:null}getFilterType(){return"set"}getValueModel(){return this.valueModel}areModelsEqual(e,t){return null==e&&null==t||null!=e&&null!=t&&iG(e.values,t.values)}setParams(e){this.applyExcelModeOptions(e),super.setParams(e),this.updateSetFilterOnParamsChange(e);let t=e.keyCreator??e.colDef.keyCreator;this.valueModel=new Bw({filterParams:e,setIsLoading:e=>this.setIsLoading(e),translate:e=>this.translateForSetFilter(e),caseFormat:e=>this.caseFormat(e),createKey:this.createKey,valueFormatter:this.valueFormatter,usingComplexObjects:!!t,gos:this.gos,funcColsService:this.funcColsService,valueService:this.valueService,treeDataTreeList:this.treeDataTreeList,groupingTreeList:this.groupingTreeList,addManagedEventListeners:e=>this.addManagedEventListeners(e)}),this.initialiseFilterBodyUi(),this.addEventListenersForDataChanges()}onAddCurrentSelectionToFilterChange(e){if(!this.valueModel)throw Error("Value model has not been created.");this.valueModel.setAddCurrentSelectionToFilter(e)}setValueFormatter(e,t,i,r){let s=e;if(!s){if(t&&!i)throw Error("AG Grid: Must supply a Value Formatter in Set Filter params when using a Key Creator");this.noValueFormatterSupplied=!0,r||(s=e=>tq(e.value))}this.valueFormatter=s}generateCreateKey(e,t){if(t&&!e)throw Error("AG Grid: Must supply a Key Creator in Set Filter params when `treeList = true` on a group column, and Tree Data or Row Grouping is enabled.");return e?(t,i=null)=>t$(e(this.getKeyCreatorParams(t,i))):e=>t$(tq(e))}getFormattedValue(e){let t=this.valueModel.getValue(e);this.noValueFormatterSupplied&&(this.treeDataTreeList||this.groupingTreeList)&&Array.isArray(t)&&(t=iB(t));let i=this.valueService.formatValue(this.setFilterParams.column,null,t,this.valueFormatter,!1);return(null==i?tq(t):i)??this.translateForSetFilter("blanks")}applyExcelModeOptions(e){"windows"===e.excelMode?(e.buttons||(e.buttons=["apply","cancel"]),null==e.closeOnApply&&(e.closeOnApply=!0)):"mac"===e.excelMode&&(e.buttons||(e.buttons=["reset"]),null==e.applyMiniFilterWhileTyping&&(e.applyMiniFilterWhileTyping=!0),null==e.debounceMs&&(e.debounceMs=500)),e.excelMode&&e.defaultToNothingSelected&&(e.defaultToNothingSelected=!1,tO('The Set Filter Parameter "defaultToNothingSelected" value was ignored because it does not work when "excelMode" is used.'))}addEventListenersForDataChanges(){this.isValuesTakenFromGrid()&&(this.addManagedEventListeners({cellValueChanged:e=>{this.setFilterParams&&e.column===this.setFilterParams.column&&this.syncAfterDataChange()}}),this.addManagedPropertyListeners(["treeData","getDataPath","groupAllowUnbalanced"],()=>{this.syncAfterDataChange()}))}syncAfterDataChange(){if(!this.valueModel)throw Error("Value model has not been created.");return this.valueModel.refreshValues().then(()=>{this.checkAndRefreshVirtualList(),(!this.applyActive||this.areModelsEqual(this.getModel(),this.getModelFromUi()))&&this.onBtApply(!1,!0)})}setIsLoading(e){sC(this.eFilterLoading,e),e||(this.hardRefreshVirtualList=!0)}initialiseFilterBodyUi(){this.initVirtualList(),this.initMiniFilter()}initVirtualList(){if(!this.setFilterParams)throw Error("Set filter params have not been provided.");if(!this.valueModel)throw Error("Value model has not been created.");let e=this.localeService.getLocaleTextFunc()("ariaFilterList","Filter List"),t=!!this.setFilterParams.treeList,i=this.virtualList=this.createBean(new I6({cssIdentifier:"filter",ariaRole:t?"tree":"listbox",listName:e})),r=this.eSetFilterList;t&&r.classList.add("ag-set-filter-tree-list"),r&&r.appendChild(i.getGui());let{cellHeight:s}=this.setFilterParams;null!=s&&i.setRowHeight(s),i.setComponentCreator((e,i)=>this.createSetListItem(e,t,i)),i.setComponentUpdater((e,t)=>this.updateSetListItem(e,t)),this.createVirtualListModel(this.setFilterParams)}createVirtualListModel(e){let t;this.valueModel&&(t=e.suppressSelectAll?new BS(this.valueModel):new Bx(this.valueModel,()=>this.isSelectAllSelected()),e.treeList&&(t=new BM(t)),this.virtualList?.setModel(t))}getSelectAllLabel(){if(!this.setFilterParams)throw Error("Set filter params have not been provided.");if(!this.valueModel)throw Error("Value model has not been created.");let e=null!=this.valueModel.getMiniFilter()&&this.setFilterParams.excelMode?"selectAllSearchResults":"selectAll";return this.translateForSetFilter(e)}getAddSelectionToFilterLabel(){if(!this.setFilterParams)throw Error("Set filter params have not been provided.");if(!this.valueModel)throw Error("Value model has not been created.");return this.translateForSetFilter("addCurrentSelectionToFilter")}createSetListItem(e,t,i){if(!this.setFilterParams)throw Error("Set filter params have not been provided.");if(!this.valueModel)throw Error("Value model has not been created.");let r=this.valueModel.hasGroups(),{isSelected:s,isExpanded:a}=this.isSelectedExpanded(e),{value:o,depth:n,isGroup:l,hasIndeterminateExpandState:h,selectedListener:d,expandedListener:c}=this.newSetListItemAttributes(e),u={focusWrapper:i,value:o,params:this.setFilterParams,translate:e=>this.translateForSetFilter(e),valueFormatter:this.valueFormatter,item:e,isSelected:s,isTree:t,depth:n,groupsExist:r,isGroup:l,isExpanded:a,hasIndeterminateExpandState:h},p=this.createBean(new Bu(u));return p.addEventListener("selectionChanged",d),c&&p.addEventListener("expandedChanged",c),p}newSetTreeItemAttributes(e){if(!this.setFilterParams)throw Error("Set filter params have not been provided.");if(!this.valueModel)throw Error("Value model has not been created.");let t=this.valueModel.hasGroups();return e.key===Bd.SELECT_ALL?{value:()=>this.getSelectAllLabel(),isGroup:t,depth:e.depth,hasIndeterminateExpandState:!0,selectedListener:e=>this.onSelectAll(e.isSelected),expandedListener:e=>this.onExpandAll(e.item,e.isExpanded)}:e.key===Bd.ADD_SELECTION_TO_FILTER?{value:()=>this.getAddSelectionToFilterLabel(),depth:e.depth,isGroup:!1,hasIndeterminateExpandState:!1,selectedListener:e=>{this.onAddCurrentSelectionToFilterChange(e.isSelected)}}:e.children?{value:this.setFilterParams.treeListFormatter?.(e.treeKey,e.depth,e.parentTreeKeys)??e.treeKey,depth:e.depth,isGroup:!0,selectedListener:e=>this.onGroupItemSelected(e.item,e.isSelected),expandedListener:e=>this.onExpandedChanged(e.item,e.isExpanded)}:{value:this.setFilterParams.treeListFormatter?.(e.treeKey,e.depth,e.parentTreeKeys)??e.treeKey,depth:e.depth,selectedListener:e=>this.onItemSelected(e.item.key,e.isSelected)}}newSetListItemAttributes(e){if(!this.setFilterParams)throw Error("Set filter params have not been provided.");if(!this.valueModel)throw Error("Value model has not been created.");return this.isSetFilterModelTreeItem(e)?this.newSetTreeItemAttributes(e):e===Bd.SELECT_ALL?{value:()=>this.getSelectAllLabel(),selectedListener:e=>this.onSelectAll(e.isSelected)}:e===Bd.ADD_SELECTION_TO_FILTER?{value:()=>this.getAddSelectionToFilterLabel(),selectedListener:e=>{this.onAddCurrentSelectionToFilterChange(e.isSelected)}}:{value:this.valueModel.getValue(e),selectedListener:e=>this.onItemSelected(e.item,e.isSelected)}}updateSetListItem(e,t){let{isSelected:i,isExpanded:r}=this.isSelectedExpanded(e);t.refresh(e,i,r)}isSelectedExpanded(e){let t,i;return this.isSetFilterModelTreeItem(e)?(i=e.expanded,t=e.key===Bd.SELECT_ALL?this.isSelectAllSelected():e.key===Bd.ADD_SELECTION_TO_FILTER?this.valueModel.isAddCurrentSelectionToFilterChecked():e.children?this.areAllChildrenSelected(e):this.valueModel.isKeySelected(e.key)):t=e===Bd.SELECT_ALL?this.isSelectAllSelected():e===Bd.ADD_SELECTION_TO_FILTER?this.valueModel.isAddCurrentSelectionToFilterChecked():this.valueModel.isKeySelected(e),{isSelected:t,isExpanded:i}}isSetFilterModelTreeItem(e){return e?.treeKey!==void 0}initMiniFilter(){if(!this.setFilterParams)throw Error("Set filter params have not been provided.");if(!this.valueModel)throw Error("Value model has not been created.");let{eMiniFilter:e,localeService:t}=this,i=t.getLocaleTextFunc();e.setDisplayed(!this.setFilterParams.suppressMiniFilter),e.setValue(this.valueModel.getMiniFilter()),e.onValueChange(()=>this.onMiniFilterInput()),e.setInputAriaLabel(i("ariaSearchFilterValues","Search filter values")),this.addManagedElementListeners(e.getInputElement(),{keydown:e=>this.onMiniFilterKeyDown(e)})}updateMiniFilter(){if(!this.setFilterParams)throw Error("Set filter params have not been provided.");if(!this.valueModel)throw Error("Value model has not been created.");let{eMiniFilter:e}=this;e.isDisplayed()!==!this.setFilterParams.suppressMiniFilter&&e.setDisplayed(!this.setFilterParams.suppressMiniFilter);let t=this.valueModel.getMiniFilter();e.getValue()!==t&&e.setValue(t)}afterGuiAttached(e){if(!this.setFilterParams)throw Error("Set filter params have not been provided.");super.afterGuiAttached(e),this.resetExpansion(),this.refreshVirtualList();let{eMiniFilter:t}=this;t.setInputPlaceholder(this.translateForSetFilter("searchOoo")),e&&e.suppressFocus||(t.isDisplayed()?t.getFocusableElement().focus():this.virtualList?.focusRow(0))}afterGuiDetached(){super.afterGuiDetached(),this.setFilterParams?.excelMode&&this.resetMiniFilter();let e=this.getModel();(this.setFilterParams?.excelMode||!this.areModelsEqual(e,this.getModelFromUi()))&&(this.resetUiToActiveModel(e),this.showOrHideResults())}applyModel(e="api"){if(!this.setFilterParams)throw Error("Set filter params have not been provided.");if(!this.valueModel)throw Error("Value model has not been created.");this.setFilterParams.excelMode&&"rowDataUpdated"!==e&&this.valueModel.isEverythingVisibleSelected()&&this.valueModel.selectAllMatchingMiniFilter();let t=this.valueModel.showAddCurrentSelectionToFilter()&&this.valueModel.isAddCurrentSelectionToFilterChecked();if(t&&!this.getModel())return!1;let i=super.applyModel(e),r=this.getModel();return r?(t||this.valueModel.setAppliedModelKeys(new Set),r.values.forEach(e=>{this.valueModel.addToAppliedModelKeys(e)})):t||this.valueModel.setAppliedModelKeys(null),i}isModelValid(e){return!this.setFilterParams||!this.setFilterParams.excelMode||null==e||e.values.length>0}doesFilterPass(e){if(!this.setFilterParams||!this.valueModel||!this.valueModel.getCaseFormattedAppliedModelKeys())return!0;if(!this.valueModel.hasAnyAppliedModelKey())return!1;let{node:t,data:i}=e;if(this.treeDataTreeList)return this.doesFilterPassForTreeData(t,i);if(this.groupingTreeList)return this.doesFilterPassForGrouping(t);let r=this.getValueFromNode(t);return null!=r&&Array.isArray(r)?0===r.length?this.valueModel.hasAppliedModelKey(null):r.some(e=>this.isInAppliedModel(this.createKey(e,t))):this.isInAppliedModel(this.createKey(r,t))}doesFilterPassForTreeData(e,t){return!e.childrenAfterGroup?.length&&this.isInAppliedModel(this.createKey(Bg(this.getDataPath(t),!0,this.gos.get("groupAllowUnbalanced"))))}doesFilterPassForGrouping(e){let t=this.funcColsService.getRowGroupColumns().map(t=>this.valueService.getKeyForNode(t,e));return t.push(this.getValueFromNode(e)),this.isInAppliedModel(this.createKey(Bg(t,!1,this.gos.get("groupAllowUnbalanced"))))}isInAppliedModel(e){return this.valueModel.hasAppliedModelKey(e)}getValueFromNode(e){return this.setFilterParams.getValue(e)}getKeyCreatorParams(e,t=null){return{value:e,colDef:this.setFilterParams.colDef,column:this.setFilterParams.column,node:t,data:t?.data,api:this.setFilterParams.api,context:this.setFilterParams.context}}onNewRowsLoaded(){this.isValuesTakenFromGrid()&&this.syncAfterDataChange()}isValuesTakenFromGrid(){return!!this.valueModel&&2===this.valueModel.getValuesType()}setFilterValues(e){if(!this.valueModel)throw Error("Value model has not been created.");this.valueModel.overrideValues(e).then(()=>{this.checkAndRefreshVirtualList(),this.onUiChanged()})}resetFilterValues(){if(!this.valueModel)throw Error("Value model has not been created.");this.valueModel.setValuesType(2),this.syncAfterDataChange()}refreshFilterValues(){if(!this.valueModel)throw Error("Value model has not been created.");this.valueModel.isInitialised()&&this.valueModel.refreshValues().then(()=>{this.hardRefreshVirtualList=!0,this.checkAndRefreshVirtualList(),this.onUiChanged()})}onAnyFilterChanged(){setTimeout(()=>{if(this.isAlive()){if(!this.valueModel)throw Error("Value model has not been created.");this.valueModel.refreshAfterAnyFilterChanged().then(e=>{e&&(this.checkAndRefreshVirtualList(),this.showOrHideResults())})}},0)}onMiniFilterInput(){if(!this.setFilterParams)throw Error("Set filter params have not been provided.");if(!this.valueModel)throw Error("Value model has not been created.");if(!this.valueModel.setMiniFilter(this.eMiniFilter.getValue()))return;let{applyMiniFilterWhileTyping:e,readOnly:t}=this.setFilterParams||{};!t&&e?this.filterOnAllVisibleValues(!1):this.updateUiAfterMiniFilterChange()}updateUiAfterMiniFilterChange(){if(!this.setFilterParams)throw Error("Set filter params have not been provided.");if(!this.valueModel)throw Error("Value model has not been created.");let{excelMode:e,readOnly:t}=this.setFilterParams||{};null==e||t?this.checkAndRefreshVirtualList():null==this.valueModel.getMiniFilter()?this.resetUiToActiveModel(this.getModel()):(this.valueModel.selectAllMatchingMiniFilter(!0),this.checkAndRefreshVirtualList(),this.onUiChanged()),this.showOrHideResults()}showOrHideResults(){if(!this.valueModel)throw Error("Value model has not been created.");let e=null!=this.valueModel.getMiniFilter()&&1>this.valueModel.getDisplayedValueCount();sC(this.eFilterNoMatches,e),sC(this.eSetFilterList,!e)}resetMiniFilter(){this.eMiniFilter.setValue(null,!0),this.valueModel?.setMiniFilter(null)}resetUiToActiveModel(e,t){this.setModelAndRefresh(null==e?null:e.values).then(()=>{this.onUiChanged(!1,"prevent"),t?.()})}handleCancelEnd(e){this.setMiniFilter(null),super.handleCancelEnd(e)}onMiniFilterKeyDown(e){let{excelMode:t,readOnly:i}=this.setFilterParams||{};e.key!==aa.ENTER||t||i||this.filterOnAllVisibleValues()}filterOnAllVisibleValues(e=!0){let{readOnly:t}=this.setFilterParams||{};if(!this.valueModel)throw Error("Value model has not been created.");if(t)throw Error("Unable to filter in readOnly mode.");this.valueModel.selectAllMatchingMiniFilter(!0),this.checkAndRefreshVirtualList(),this.onUiChanged(!1,e?"immediately":"debounce"),this.showOrHideResults()}focusRowIfAlive(e){null!=e&&window.setTimeout(()=>{if(!this.virtualList)throw Error("Virtual list has not been created.");this.isAlive()&&this.virtualList.focusRow(e)},0)}onSelectAll(e){if(!this.valueModel)throw Error("Value model has not been created.");if(!this.virtualList)throw Error("Virtual list has not been created.");e?this.valueModel.selectAllMatchingMiniFilter():this.valueModel.deselectAllMatchingMiniFilter(),this.refreshAfterSelection()}onGroupItemSelected(e,t){let i=e=>{e.children?e.children.forEach(e=>i(e)):this.selectItem(e.key,t)};i(e),this.refreshAfterSelection()}onItemSelected(e,t){if(!this.valueModel)throw Error("Value model has not been created.");if(!this.virtualList)throw Error("Virtual list has not been created.");this.selectItem(e,t),this.refreshAfterSelection()}selectItem(e,t){t?this.valueModel.selectKey(e):this.valueModel.deselectKey(e)}onExpandAll(e,t){let i=e=>{e.filterPasses&&e.available&&e.children&&(e.children.forEach(e=>i(e)),e.expanded=t)};i(e),this.refreshAfterExpansion()}onExpandedChanged(e,t){e.expanded=t,this.refreshAfterExpansion()}refreshAfterExpansion(){let e=this.virtualList.getLastFocusedRow();this.valueModel.updateDisplayedValues("expansion"),this.checkAndRefreshVirtualList(),this.focusRowIfAlive(e)}refreshAfterSelection(){let e=this.virtualList.getLastFocusedRow();this.checkAndRefreshVirtualList(),this.onUiChanged(),this.focusRowIfAlive(e)}setMiniFilter(e){this.eMiniFilter.setValue(e),this.onMiniFilterInput()}getMiniFilter(){return this.valueModel?this.valueModel.getMiniFilter():null}checkAndRefreshVirtualList(){if(!this.virtualList)throw Error("Virtual list has not been created.");this.virtualList.refresh(!this.hardRefreshVirtualList),this.hardRefreshVirtualList&&(this.hardRefreshVirtualList=!1)}getFilterKeys(){return this.valueModel?this.valueModel.getKeys():[]}getFilterValues(){return this.valueModel?this.valueModel.getValues():[]}getValues(){return this.getFilterKeys()}refreshVirtualList(){this.setFilterParams&&this.setFilterParams.refreshValuesOnOpen?this.refreshFilterValues():this.checkAndRefreshVirtualList()}translateForSetFilter(e){return this.localeService.getLocaleTextFunc()(e,Bc[e])}isSelectAllSelected(){if(!this.setFilterParams||!this.valueModel)return!1;if(this.setFilterParams.defaultToNothingSelected){if(this.valueModel.hasSelections()&&this.valueModel.isEverythingVisibleSelected())return!0;if(this.valueModel.isNothingVisibleSelected())return!1}else{if(this.valueModel.hasSelections()&&this.valueModel.isNothingVisibleSelected())return!1;if(this.valueModel.isEverythingVisibleSelected())return!0}}areAllChildrenSelected(e){let t=e=>{if(!e.children)return this.valueModel.isKeySelected(e.key);{let i=!1,r=!1;return e.children.some(e=>{if(!e.filterPasses||!e.available)return!1;let s=t(e);return void 0===s||(s?i=!0:r=!0,i&&r)})?void 0:i}};return this.setFilterParams.defaultToNothingSelected?this.valueModel.hasSelections()&&t(e):t(e)}destroy(){null!=this.virtualList&&(this.virtualList.destroy(),this.virtualList=null),super.destroy()}caseFormat(e){return null==e||"string"!=typeof e?e:this.caseSensitive?e:e.toUpperCase()}resetExpansion(){if(!this.setFilterParams?.treeList)return;let e=this.valueModel?.getSelectAllItem();if(this.isSetFilterModelTreeItem(e)){let t=e=>{e.children&&(e.children.forEach(e=>t(e)),e.expanded=!1)};t(e),this.valueModel.updateDisplayedValues("expansion")}}getModelAsString(e){return this.filterModelFormatter.getModelAsString(e,this)}getPositionableElement(){return this.eSetFilterList}},BS=class{constructor(e){this.model=e}getRowCount(){return this.model.getDisplayedValueCount()}getRow(e){return this.model.getDisplayedItem(e)}areRowsEqual(e,t){return e===t}},Bx=class{constructor(e,t){this.model=e,this.isSelectAllSelected=t}getRowCount(){let e=this.model.showAddCurrentSelectionToFilter();return this.model.getDisplayedValueCount()+(e?2:1)}getRow(e){if(0===e)return this.model.getSelectAllItem();let t=this.model.showAddCurrentSelectionToFilter();return 1===e&&t?this.model.getAddSelectionToFilterItem():this.model.getDisplayedItem(e-(t?2:1))}areRowsEqual(e,t){return e===t}},BM=class{constructor(e){this.model=e}getRowCount(){return this.model.getRowCount()}getRow(e){return this.model.getRow(e)}areRowsEqual(e,t){return null==e&&null==t||null!=e&&null!=t&&e.treeKey===t.treeKey&&e.depth===t.depth}},BE=class extends sQ{constructor(){super(`
            <div class="ag-floating-filter-input ag-set-floating-filter-input" role="presentation">
                <ag-input-text-field data-ref="eFloatingFilterText"></ag-input-text-field>
            </div>`,[ob]),this.eFloatingFilterText=null,this.availableValuesListenerAdded=!1,this.filterModelFormatter=new Bp}wireBeans(e){this.columnNameService=e.columnNameService}destroy(){super.destroy()}init(e){this.params=e,this.eFloatingFilterText.setDisabled(!0).addGuiEventListener("click",()=>this.params.showParentFilter()),this.setParams(e)}setParams(e){let t=this.columnNameService.getDisplayNameForColumn(e.column,"header",!0),i=this.localeService.getLocaleTextFunc();this.eFloatingFilterText.setInputAriaLabel(`${t} ${i("ariaFilterInput","Filter Input")}`)}onParamsUpdated(e){this.refresh(e)}refresh(e){this.params=e,this.setParams(e)}onParentModelChanged(e){this.updateFloatingFilterText(e)}parentSetFilterInstance(e){this.params.parentFilterInstance(t=>{if(!(t instanceof Bb))throw Error("AG Grid - SetFloatingFilter expects SetFilter as its parent");e(t)})}addAvailableValuesListener(){this.parentSetFilterInstance(e=>{let t=e.getValueModel();t&&this.addManagedListeners(t,{availableValuesChanged:()=>this.updateFloatingFilterText()})}),this.availableValuesListenerAdded=!0}updateFloatingFilterText(e){this.availableValuesListenerAdded||this.addAvailableValuesListener(),this.parentSetFilterInstance(t=>{this.eFloatingFilterText.setValue(this.filterModelFormatter.getModelAsString(e,t))})}},BD="32.2.0",BI={version:BD,moduleName:`${tL.SetFilterModule}-core`,userComponents:[{name:"agSetColumnFilter",classImp:Bb}],dependantModules:[IX,no]},Bk={version:BD,moduleName:tL.SetFilterModule,dependantModules:[BI,{version:BD,moduleName:"@ag-grid-enterprise/set-floating-filter",userComponents:[{name:"agSetColumnFloatingFilter",classImp:BE}],dependantModules:[BI,nl]}]};function BT(e,t="solid"){let i={solid:[],dash:[4,3],dot:[1,3],dashDot:[4,3,1,3],dashDotDot:[4,3,1,3,1,3],shortDot:[1,1],shortDash:[3,1],shortDashDot:[3,1,1,1],shortDashDotDot:[3,1,1,1,1,1],longDash:[8,3],longDashDot:[8,3,1,3],longDashDotDot:[8,3,1,3,1,3]},r={solid:[],dash:[3,3],dot:[0,3],dashDot:[3,3,0,3],dashDotDot:[3,3,0,3,0,3],shortDot:[0,2],shortDash:[2,2],shortDashDot:[2,2,0,2],shortDashDotDot:[2,2,0,2,0,2],longDash:[7,3],longDashDot:[7,3,0,3],longDashDotDot:[7,3,0,3,0,3]};return"round"===e||"square"===e?void 0==r[t]?(BA(t),r.solid):r[t]:void 0==i[t]?(BA(t),i.solid):i[t]}function BA(e){tO(`'${e}' is not a valid 'lineDash' option.`)}function BR(e){switch(e){case"circle":default:return It.Circle;case"square":return It.Square;case"diamond":return It.Diamond}}var BL=`
.ag-sparkline-tooltip-wrapper {
    position: absolute;
    user-select: none;
    pointer-events: none;
}

.ag-sparkline-tooltip {
    position: relative;
    font: 12px arial,sans-serif;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgb(0 0 0 / 20%), 0 1px 1px rgb(0 0 0 / 14%);
    line-height: 1.7em;
    overflow: hidden;
    white-space: nowrap;
    z-index: 99999;
    background-color: rgb(255, 255, 255);
    color: rgba(0,0,0, 0.67);
}

.ag-sparkline-tooltip-content {
    padding: 0 7px;
    opacity: 1;
}

.ag-sparkline-tooltip-title {
    padding-left: 7px;
    opacity: 1;
}

.ag-sparkline-tooltip-wrapper-hidden {
    top: -10000px !important;
}

.ag-sparkline-wrapper {
    box-sizing: border-box;
    overflow: hidden;
}
`,{extent:BP,isNumber:BF,isString:BN,isStringObject:BO,isDate:BB,createId:BG,Padding:Bz}=If,{LinearScale:B_,BandScale:BV,TimeScale:Bj}=Im,{Transformable:BH}=It,BU=class{constructor(){this.type="category",this.stroke="rgb(204, 214, 235)",this.strokeWidth=1}},BW=class e{constructor(){this.id=BG(this),this.seriesRect={x:0,y:0,width:0,height:0},this._context=void 0,this._container=void 0,this._data=void 0,this.padding=new Bz(3),this.xKey="x",this.yKey="y",this.dataType=void 0,this.xData=[],this.yData=[],this.min=void 0,this.max=void 0,this.yScale=new B_,this.axis=new BU,this.highlightStyle={size:6,fill:"yellow",stroke:"silver",strokeWidth:1},this._width=100,this._height=100,this.smallestInterval=void 0,this.layoutId=0,this.defaultDateFormatter=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}),this._onMouseMove=this.onMouseMove.bind(this),this._onMouseOut=this.onMouseOut.bind(this);let t=new It.TranslatableGroup;this.rootGroup=t;let i=document.createElement("div");i.setAttribute("class","ag-sparkline-wrapper");let r=new It.Scene({});this.scene=r,this.canvasElement=r.canvas.element,r.setRoot(t),r.setContainer(i),this.resizeAndSetDimensions(this.width,this.height),e.tooltipDocuments.includes(document)||this.initialiseTooltipStyles(),this.setupDomEventListeners(this.canvasElement)}set context(e){this._context!==e&&(this._context=e)}get context(){return this._context}set container(e){if(this._container!==e){let{parentNode:t}=this.canvasElement;null!=t&&t.removeChild(this.canvasElement),e&&e.appendChild(this.canvasElement),this._container=e}}get container(){return this._container}set data(e){this._data!==e&&(this._data=e,this.processData(),this.mouseMoveEvent&&this.highlightedDatum&&this.updateHitPoint(this.mouseMoveEvent))}get data(){return this._data}resizeAndSetDimensions(e,t){this.scene.resize(e,t),this.seriesRect.width=e,this.seriesRect.height=t}initialiseTooltipStyles(){let t=document.createElement("style");t.innerHTML=BL,document.head.insertBefore(t,document.head.querySelector("style")),e.tooltipDocuments.push(document)}set width(e){this._width!==e&&(this._width=e,this.scene.resize(e,this.height),this.scheduleLayout())}get width(){return this._width}set height(e){this._height!==e&&(this._height=e,this.scene.resize(this.width,e),this.scheduleLayout())}get height(){return this._height}update(){}updateYScale(){this.updateYScaleRange(),this.updateYScaleDomain()}updateYScaleDomain(){}updateYScaleRange(){let{yScale:e,seriesRect:t}=this;e.range=[t.height,0]}updateXScale(){let{type:e}=this.axis;this.xScale=this.getXScale(e),this.updateXScaleRange(),this.updateXScaleDomain()}updateXScaleRange(){this.xScale.range=[0,this.seriesRect.width]}updateXScaleDomain(){let e;let{xData:t,xScale:i}=this;(i instanceof B_||i instanceof Bj)&&(e=BP(t)),this.xScale.domain=e?e.slice():t}getXScale(e="category"){switch(e){case"number":return new B_;case"time":return new Bj;default:return new BV}}updateAxisLine(){}updateAxes(){this.updateYScale(),this.updateXScale(),this.updateAxisLine()}updateCrosshairs(){this.updateXCrosshairLine(),this.updateYCrosshairLine()}generateNodeData(){return[]}getNodeData(){return[]}updateNodes(){}updateXCrosshairLine(){}updateYCrosshairLine(){}highlightDatum(e){this.updateNodes()}dehighlightDatum(){this.highlightedDatum=void 0,this.updateNodes(),this.updateCrosshairs()}onMouseMove(e){this.mouseMoveEvent=e,this.updateHitPoint(e)}renderScene(){this.scene.render().catch(e=>tB("chart rendering failed",e))}updateHitPoint(e){let t=this.pickClosestSeriesNodeDatum(e.offsetX,e.offsetY);if(!t)return;let i=this.highlightedDatum;this.highlightedDatum=t,(this.highlightedDatum&&!i||this.highlightedDatum&&i&&this.highlightedDatum!==i)&&(this.highlightDatum(t),this.updateCrosshairs(),this.renderScene()),(this.processedOptions?.tooltip?.enabled??!0)&&this.handleTooltip(e,t)}onMouseOut(e){this.dehighlightDatum(),this.tooltip.toggle(!1),this.renderScene()}processData(){let e;let{data:t,yData:i,xData:r}=this;if(!t||this.invalidData(this.data))return;i.length=0,r.length=0;let s=t.length,a=this.getDataType(t);this.dataType=a;let{type:o}=this.axis,n="number"!==o&&"time"!==o?"category":o,l="number"===n||"time"===n,h=(e,t)=>{void 0==this.smallestInterval&&(this.smallestInterval={x:1/0,y:1/0});let{x:i}=this.smallestInterval,r=Math.abs(e-t);r>0&&r<i&&(this.smallestInterval.x=r)};if("number"===a)for(let a=0;a<s;a++){let s=a,o=t[a],d=this.getDatum(s,n),c=this.getDatum(o,"number");l&&h(d,e),r.push(d),i.push(c),e=d}else if("array"===a)for(let a=0;a<s;a++){let s=t[a];if(Array.isArray(s)){let t=s[0],a=s[1],o=this.getDatum(t,n),d=this.getDatum(a,"number");if(void 0==o)continue;l&&h(o,e),r.push(o),i.push(d),e=o}}else if("object"===a){let{yKey:a,xKey:o}=this;for(let d=0;d<s;d++){let s=t[d];if("object"==typeof s&&!Array.isArray(s)){let t=s[o],d=s[a],c=this.getDatum(t,n),u=this.getDatum(d,"number");if(void 0==c)continue;l&&h(c,e),r.push(c),i.push(u),e=c}}}this.updateAxes(),this.immediateLayout()}getDataType(e){for(let t of e)if(void 0!=t){if(BF(t))return"number";if(Array.isArray(t))return"array";if("object"==typeof t)return"object"}}getDatum(e,t){if("number"===t&&BF(e)||"time"===t&&(BF(e)||BB(e)))return e;if("category"===t){if(BN(e)||BB(e)||BF(e))return{toString:()=>String(e)};if(BO(e))return e}}get layoutScheduled(){return!!this.layoutId}scheduleLayout(){this.layoutId&&cancelAnimationFrame(this.layoutId),this.layoutId=requestAnimationFrame(()=>{this.immediateLayout(),this.layoutId=0})}immediateLayout(){this.setSparklineDimensions(),this.invalidData(this.data)||(this.updateXScaleRange(),this.updateYScaleRange(),this.updateAxisLine(),this.update(),this.renderScene())}setSparklineDimensions(){let{width:e,height:t,padding:i,seriesRect:r,rootGroup:s}=this,a=e-i.left-i.right,o=t-i.top-i.bottom;r.width=a,r.height=o,r.x=i.left,r.y=i.top,s.translationX=r.x,s.translationY=r.y}pickClosestSeriesNodeDatum(e,t){let i,r=1/0,s=BH.fromCanvasPoint(this.rootGroup,e,t),a=this.getNodeData();for(let e=0;e<a.length;e++){let t=a[e];if(!t.point)return;let o=this.getDistance(s,t.point);o<=r&&(r=o,i=t)}return i}getDistance(e,t){return Math.abs(e.x-t.x)}handleTooltip(e,t){let{seriesDatum:i}=t,{canvasElement:r}=this,{clientX:s,clientY:a}=e,o=this.processedOptions?.tooltip,n={pageX:s,pageY:a,position:{xOffset:o?.xOffset,yOffset:o?.yOffset},container:o?.container};void 0==n.container&&(n.container=r);let l=i.y,h=i.x,d=o?.enabled??!0,c=o?.renderer;if(c){let e=c({context:this.context,datum:i,yValue:l,xValue:h});d="string"!=typeof e&&void 0!==e.enabled?e.enabled:d}let u=d&&void 0!==i.y&&this.getTooltipHtml(t);u&&this.tooltip.show(n,u)}formatNumericDatum(e){return String(Math.round(10*e)/10)}formatDatum(e){let t=this.axis.type||"category";return"number"===t&&"number"==typeof e?this.formatNumericDatum(e):"time"===t&&(e instanceof Date||BF(e))?this.defaultDateFormatter.format(e):String(e)}setupDomEventListeners(e){e.addEventListener("mousemove",this._onMouseMove),e.addEventListener("mouseout",this._onMouseOut)}cleanupDomEventListeners(e){e.removeEventListener("mousemove",this._onMouseMove),e.removeEventListener("mouseout",this._onMouseOut)}invalidData(e){return!e||!Array.isArray(e)}destroy(){this.cleanupDomEventListeners(this.canvasElement),this.scene.destroy(),this.container=void 0}};BW.tooltipDocuments=[];var B$=BW;function BY(e,t){let i,r;if("string"==typeof e)return e;t=t??{};let{content:s=t.content??"",title:a=t.title??void 0,color:o=t.color,backgroundColor:n=t.backgroundColor,opacity:l=t.opacity??1}=e;o?(i=a?`<span class="${BK}-title"; style="color: ${o}">${a}</span>`:"",r=`<span class="${BK}-content" style="color: ${o}">${s}</span>`):(i=a?`<span class="${BK}-title">${a}</span>`:"",r=`<span class="${BK}-content">${s}</span>`);let h=`opacity: ${l}`;return n&&(h+=`; background-color: ${n.toLowerCase()}`),`<div class="${BK}" style="${h}">
                ${i}
                ${r}
            </div>`}var BK="ag-sparkline-tooltip",BZ=class{constructor(){this.created=!1,this.element=document.createElement("div")}isVisible(){let{element:e}=this;if(e.classList)return!e.classList.contains(`${BK}-wrapper-hidden`);let t=e.getAttribute("class");return!!t&&0>t.split(" ").indexOf(`${BK}-wrapper-hidden`)}updateClass(e){this.created||(document.body.appendChild(this.element),this.created=!0);let t=[`${BK}-wrapper`];!0!==e&&t.push(`${BK}-wrapper-hidden`),this.element.setAttribute("class",t.join(" "))}show(e,t){this.toggle(!1);let{element:i}=this;if(void 0!==t)i.innerHTML=t;else if(!i.innerHTML)return;let r=e.position?.xOffset??10,s=e.position?.yOffset??0,a=e.pageX+r,o=e.pageY+s,n=i.getBoundingClientRect(),l=window.innerWidth-n.width;if(e.container){let t=e.container.getBoundingClientRect();l=t.left+(t.width-n.width)}a>l&&(a=e.pageX-i.clientWidth-r),"undefined"!=typeof scrollX&&(a+=scrollX),"undefined"!=typeof scrollY&&(o+=scrollY),i.style.left=`${Math.round(a)}px`,i.style.top=`${Math.round(o)}px`,this.toggle(!0)}toggle(e){this.updateClass(e)}destroy(){let{parentNode:e}=this.element;e&&e.removeChild(this.element)}},{extent:Bq}=If,{BandScale:BX}=Im,BQ=class{constructor(){this.enabled=!0,this.shape="circle",this.size=0,this.fill="rgb(124, 181, 236)",this.stroke="rgb(124, 181, 236)",this.strokeWidth=1,this.formatter=void 0}},BJ=class{constructor(){this.stroke="rgb(124, 181, 236)",this.strokeWidth=1}},B0=class{constructor(){this.xLine={enabled:!0,stroke:"rgba(0,0,0, 0.54)",strokeWidth:1,lineDash:"solid",lineCap:void 0},this.yLine={enabled:!1,stroke:"rgba(0,0,0, 0.54)",strokeWidth:1,lineDash:"solid",lineCap:void 0}}},B1=class extends B${constructor(){super(),this.fill="rgba(124, 181, 236, 0.25)",this.strokePath=new It.Path,this.fillPath=new It.Path,this.xCrosshairLine=new It.Line,this.yCrosshairLine=new It.Line,this.areaSparklineGroup=new It.Group,this.xAxisLine=new It.Line,this.markers=new It.Group,this.markerSelection=It.Selection.select(this.markers,()=>this.markerFactory()),this.markerSelectionData=[],this.marker=new BQ,this.line=new BJ,this.crosshairs=new B0,this.rootGroup.append(this.areaSparklineGroup),this.xAxisLine.zIndex=500,this.fillPath.zIndex=50,this.strokePath.zIndex=1e3,this.xCrosshairLine.zIndex=2e3,this.yCrosshairLine.zIndex=2e3,this.markers.zIndex=2500,this.areaSparklineGroup.append([this.fillPath,this.xAxisLine,this.strokePath,this.xCrosshairLine,this.yCrosshairLine,this.markers])}markerFactory(){let{shape:e}=this.marker;return new(BR(e))}getNodeData(){return this.markerSelectionData}update(){let e=this.generateNodeData();if(!e)return;let{nodeData:t,fillData:i,strokeData:r}=e;this.markerSelectionData=t,this.updateSelection(t),this.updateNodes(),this.updateStroke(r),this.updateFill(i)}updateYScaleDomain(){let{yData:e,yScale:t}=this,i=Bq(e),r=0,s=1;null!=i&&(r=this.min=i[0],s=this.max=i[1]),r=r<0?r:0,s=s<0?0:s,t.domain=[r,s]}generateNodeData(){let e,t,i,r;let{data:s,yData:a,xData:o,xScale:n,yScale:l}=this;if(!s)return;let h=!(n instanceof BX),d=h?0:n.bandwidth/2,c=a.length,u=[],p=[],g=[],m=l.convert(0);for(let s=0;s<c;s++){let f=a[s],v=o[s],y=n.convert(h?n.toDomain(v):v)+d,C=void 0===f?NaN:l.convert(f);s+1<c&&(r=n.convert(h?n.toDomain(o[s+1]):o[s+1])+d),g.push({seriesDatum:{x:v,y:f},point:{x:y,y:C}}),void 0===f&&void 0!==i?(p.push({seriesDatum:void 0,point:{x:i,y:m}}),void 0!==r&&p.push({seriesDatum:void 0,point:{x:r,y:m}})):void 0!==f&&(p.push({seriesDatum:{x:v,y:f},point:{x:y,y:C}}),u.push({seriesDatum:{x:v,y:f},point:{x:y,y:C}}),e=void 0!==e?e:y,t=y),i=y}return p.push({seriesDatum:void 0,point:{x:t,y:m}},{seriesDatum:void 0,point:{x:e,y:m}}),{nodeData:u,fillData:p,strokeData:g}}updateAxisLine(){let{xScale:e,yScale:t,axis:{stroke:i,strokeWidth:r},xAxisLine:s}=this,a=t.convert(0);s.x1=e.range[0],s.x2=e.range[1],s.y1=s.y2=a,s.stroke=i,s.strokeWidth=r}updateSelection(e){this.markerSelection.update(e)}updateNodes(){let{highlightedDatum:e,highlightStyle:t,marker:i}=this,{size:r,fill:s,stroke:a,strokeWidth:o}=t,n=i.formatter;this.markerSelection.each((t,l,h)=>{let d;let{point:c,seriesDatum:u}=l;if(!c)return;let p=l===e,g=p&&void 0!==s?s:i.fill,m=p&&void 0!==a?a:i.stroke,f=p&&void 0!==o?o:i.strokeWidth,v=p&&void 0!==r?r:i.size;if(n){let e=h===this.markerSelectionData.length-1,t=u.y===this.min,i=u.y===this.max;d=n({datum:l,xValue:u.x,yValue:u.y,min:t,max:i,first:0===h,last:e,fill:g,stroke:m,strokeWidth:f,size:v,highlighted:p})}t.size=d&&void 0!=d.size?d.size:v,t.fill=d&&void 0!=d.fill?d.fill:g,t.stroke=d&&void 0!=d.stroke?d.stroke:m,t.strokeWidth=d&&void 0!=d.strokeWidth?d.strokeWidth:f,t.translationX=c.x,t.translationY=c.y,t.visible=d&&void 0!=d.enabled?d.enabled:i.enabled&&t.size>0})}updateStroke(e){let{strokePath:t,yData:i,line:r}=this,s=t.path;if(s.clear(),i.length<2)return;let a=e.length,o=!0;for(let t=0;t<a;t++){let{point:i,seriesDatum:r}=e[t],a=i.x,n=i.y;void 0==r.y?o=!0:o?(s.moveTo(a,n),o=!1):s.lineTo(a,n)}t.lineJoin=t.lineCap="round",t.fill=void 0,t.stroke=r.stroke,t.strokeWidth=r.strokeWidth}updateFill(e){let{fillPath:t,yData:i,fill:r}=this,s=t.path,a=e.length;if(s.clear(),!(i.length<2)){for(let t=0;t<a;t++){let{point:i}=e[t],r=i.x,a=i.y;t>0?s.lineTo(r,a):s.moveTo(r,a)}s.closePath(),t.lineJoin="round",t.stroke=void 0,t.fill=r}}updateXCrosshairLine(){let{yScale:e,xCrosshairLine:t,highlightedDatum:i,crosshairs:{xLine:r}}=this;if(!r.enabled||void 0==i){t.strokeWidth=0;return}t.y1=e.range[0],t.y2=e.range[1],t.x1=t.x2=i.point.x,t.stroke=r.stroke,t.strokeWidth=r.strokeWidth??1,t.lineCap="round"===r.lineCap||"square"===r.lineCap?r.lineCap:void 0;let{lineDash:s}=r;t.lineDash=Array.isArray(s)?s:BT(t.lineCap,r.lineDash)}updateYCrosshairLine(){let{xScale:e,yCrosshairLine:t,highlightedDatum:i,crosshairs:{yLine:r}}=this;if(!r.enabled||void 0==i){t.strokeWidth=0;return}t.x1=e.range[0],t.x2=e.range[1],t.y1=t.y2=i.point.y,t.stroke=r.stroke,t.strokeWidth=r.strokeWidth??1,t.lineCap="round"===r.lineCap||"square"===r.lineCap?r.lineCap:void 0;let{lineDash:s}=r;t.lineDash=Array.isArray(s)?s:BT(t.lineCap,r.lineDash)}getTooltipHtml(e){let{dataType:t}=this,{seriesDatum:i}=e,r=i.y,s=i.x,a={content:this.formatNumericDatum(r),title:"array"===t||"object"===t?this.formatDatum(s):void 0},o=this.processedOptions?.tooltip?.renderer;return o?BY(o({context:this.context,datum:i,yValue:r,xValue:s}),a):BY(a)}},B2=class{constructor(){this.enabled=!0,this.fontSize=8,this.fontFamily="Verdana, sans-serif",this.fontStyle=void 0,this.fontWeight=void 0,this.color="rgba(70, 70, 70, 1)"}},{extent:B3}=If,B4=class extends B2{constructor(){super(...arguments),this.formatter=void 0,this.placement="insideEnd"}},B6=class extends B${constructor(){super(),this.fill="rgb(124, 181, 236)",this.stroke="silver",this.strokeWidth=0,this.paddingInner=.1,this.paddingOuter=.2,this.valueAxisDomain=void 0,this.formatter=void 0,this.axisLine=new It.Line,this.bandWidth=0,this.sparklineGroup=new It.Group,this.rectGroup=new It.Group,this.labelGroup=new It.Group,this.rectSelection=It.Selection.select(this.rectGroup,It.Rect),this.labelSelection=It.Selection.select(this.labelGroup,It.Text),this.nodeSelectionData=[],this.label=new B4,this.rootGroup.append(this.sparklineGroup),this.rectGroup.zIndex=50,this.axisLine.zIndex=500,this.labelGroup.zIndex=1500,this.sparklineGroup.append([this.rectGroup,this.axisLine,this.labelGroup]),this.axisLine.lineCap="round",this.label.enabled=!1}getNodeData(){return this.nodeSelectionData}update(){this.updateSelections(),this.updateNodes()}updateSelections(){let e=this.generateNodeData();e&&(this.nodeSelectionData=e,this.updateRectSelection(e),this.updateLabelSelection(e))}updateNodes(){this.updateRectNodes(),this.updateLabelNodes()}calculateStep(e){let{xScale:t,paddingInner:i,paddingOuter:r,smallestInterval:s}=this,a=Math.min((t.domain[1]-t.domain[0])/(s?.x??1)+1,50);return e/Math.max(1,2*r+(a-1)*i+a)}updateYScaleDomain(){let{yScale:e,yData:t,valueAxisDomain:i}=this,r=B3(t),s=0,a=1;null!=r&&(s=this.min=r[0],a=this.max=r[1]),s=s<0?s:0,a=a<0?0:a,i&&(i[1]<a&&(i[1]=a),i[0]>s&&(i[0]=s)),e.domain=i||[s,a]}updateRectSelection(e){this.rectSelection.update(e)}updateRectNodes(){let{highlightedDatum:e,formatter:t,fill:i,stroke:r,strokeWidth:s}=this,{fill:a,stroke:o,strokeWidth:n}=this.highlightStyle;this.rectSelection.each((l,h,d)=>{let c;let u=h===e,p=u&&void 0!==a?a:i,g=u&&void 0!==o?o:r,m=u&&void 0!==n?n:s,{x:f,y:v,width:y,height:C,seriesDatum:w}=h;if(t){let e=d===this.nodeSelectionData.length-1,i=w.y===this.min,r=w.y===this.max;c=t({datum:h,xValue:w.x,yValue:w.y,width:y,height:C,min:i,max:r,first:0===d,last:e,fill:p,stroke:g,strokeWidth:m,highlighted:u})}l.fill=c&&c.fill||p,l.stroke=c&&c.stroke||g,l.strokeWidth=c&&c.strokeWidth||m,l.x=f,l.y=v,l.width=y,l.height=C,l.visible=l.height>0})}updateLabelSelection(e){this.labelSelection.update(e,e=>{e.tag=1,e.pointerEvents=It.PointerEvents.None})}updateLabelNodes(){let{label:{enabled:e,fontStyle:t,fontWeight:i,fontSize:r,fontFamily:s,color:a}}=this;this.labelSelection.each((o,n)=>{let l=n.label;l&&e?(o.fontStyle=t,o.fontWeight=i,o.fontSize=r,o.fontFamily=s,o.textAlign=l.textAlign,o.textBaseline=l.textBaseline,o.text=l.text,o.x=l.x,o.y=l.y,o.fill=a,o.visible=!0):o.visible=!1})}getTooltipHtml(e){let{dataType:t}=this,{seriesDatum:i}=e,r=i.y,s=i.x,a={content:this.formatNumericDatum(r),title:"array"===t||"object"===t?this.formatDatum(s):void 0},o=this.processedOptions?.tooltip?.renderer;return o?BY(o({context:this.context,datum:i,yValue:r,xValue:s}),a):BY(a)}formatLabelValue(e){return e%1!=0?e.toFixed(1):e.toFixed(0)}},{isNumber:B5}=If,{BandScale:B8}=Im,B7=class extends B6{updateYScaleRange(){let{seriesRect:e,yScale:t}=this;t.range=[0,e.width]}updateXScaleRange(){let{xScale:e,seriesRect:t,paddingOuter:i,paddingInner:r}=this;if(e instanceof B8)e.range=[0,t.height],e.paddingInner=r,e.paddingOuter=i;else{let s=this.calculateStep(t.height),a=s*i;this.bandWidth=s*(1-r),e.range=[a,t.height-a-this.bandWidth]}}updateAxisLine(){let{yScale:e,axis:{stroke:t,strokeWidth:i},axisLine:r,seriesRect:s}=this,a=e.convert(0);r.x1=r.x2=a,r.y1=0,r.y2=s.height,r.stroke=t,r.strokeWidth=i+(i%2==1?1:0)}generateNodeData(){let{data:e,yData:t,xData:i,xScale:r,yScale:s,fill:a,stroke:o,strokeWidth:n,label:l}=this;if(!e)return;let{fontStyle:h,fontWeight:d,fontSize:c,fontFamily:u,color:p,formatter:g,placement:m}=l,f=[],v=s.convert(0),y=!(r instanceof B8);for(let e=0,l=t.length;e<l;e++){let l,C,w,b=t[e],S=i[e],x=void 0===b;x&&(b=0);let M=r.convert(y?r.toDomain(S):S),E=Math.min(void 0===b?NaN:s.convert(b),v),D=Math.max(void 0===b?NaN:s.convert(b),v),I=y?this.bandWidth:r.bandwidth,k=D-E,T={x:v,y:M};l=g?g({value:b}):void 0!==b&&B5(b)?this.formatLabelValue(b):"";let A=M+I/2,R=void 0!==b&&b>=0;if("center"===m)C=E+k/2,w="center";else if("outsideEnd"===m)C=E+(R?k+4:-4),w=R?"start":"end";else if("insideEnd"===m){C=E+(R?k-4:4),w=R?"end":"start";let e=Iy.CachedTextMeasurerPool.measureText(l,{font:u}).width||20,t=v+e,i=v-e;(R&&C<t||!R&&C>i)&&(C=v+4*(R?1:-1),w=R?"start":"end")}else C=v+4*(R?1:-1),w=R?"start":"end";f.push({x:E,y:M,width:k,height:I,fill:a,stroke:o,strokeWidth:n,seriesDatum:{x:S,y:x?void 0:b},point:T,label:{x:C,y:A,text:l,fontStyle:h,fontWeight:d,fontSize:c,fontFamily:u,textAlign:w,textBaseline:"middle",fill:p}})}return f}getDistance(e,t){return Math.abs(e.y-t.y)}},{isNumber:B9}=If,{BandScale:Ge}=Im,Gt=class extends B6{updateYScaleRange(){let{seriesRect:e,yScale:t}=this;t.range=[e.height,0]}updateXScaleRange(){let{xScale:e,seriesRect:t,paddingOuter:i,paddingInner:r}=this;if(e instanceof Ge)e.range=[0,t.width],e.paddingInner=r,e.paddingOuter=i;else{let s=this.calculateStep(t.width),a=s*i;this.bandWidth=s*(1-r),e.range=[a,t.width-a-this.bandWidth]}}updateAxisLine(){let{yScale:e,axis:{stroke:t,strokeWidth:i},axisLine:r,seriesRect:s}=this,a=e.convert(0);r.x1=0,r.x2=s.width,r.y1=r.y2=a,r.stroke=t,r.strokeWidth=i+(i%2==1?1:0)}generateNodeData(){let{data:e,yData:t,xData:i,xScale:r,yScale:s,fill:a,stroke:o,strokeWidth:n,label:l}=this;if(!e)return;let{fontStyle:h,fontWeight:d,fontSize:c,fontFamily:u,color:p,formatter:g,placement:m}=l,f=[],v=s.convert(0),y=!(r instanceof Ge);for(let e=0,l=t.length;e<l;e++){let l,C,w,b=t[e],S=i[e],x=void 0===b;x&&(b=0);let M=Math.min(void 0===b?NaN:s.convert(b),v),E=r.convert(y?r.toDomain(S):S),D=Math.max(void 0===b?NaN:s.convert(b),v),I=y?this.bandWidth:r.bandwidth,k=D-M,T={x:E+I/2,y:v};l=g?g({value:b}):void 0!==b&&B9(b)?this.formatLabelValue(b):"";let A=E+I/2,R=void 0!==b&&b>=0;if("center"===m)C=M+k/2,w="middle";else if("outsideEnd"===m)C=M+(R?-2:k+2),w=R?"bottom":"top";else if("insideEnd"===m){C=M+(R?2:k-2),w=R?"top":"bottom";let e=Iy.CachedTextMeasurerPool.measureText(l,{font:u}).height||10,t=v-e,i=v+e;(R&&C>t||!R&&C<i)&&(C=v+2*(R?-1:1),w=R?"bottom":"top")}else C=v+2*(R?-1:1),w=R?"bottom":"top";f.push({x:E,y:M,width:I,height:k,fill:a,stroke:o,strokeWidth:n,seriesDatum:{x:S,y:x?void 0:b},point:T,label:{x:A,y:C,text:l,fontStyle:h,fontWeight:d,fontSize:c,fontFamily:u,textAlign:"center",textBaseline:w,fill:p}})}return f}},{extent:Gi}=If,{BandScale:Gr}=Im,Gs=class{constructor(){this.enabled=!0,this.shape="circle",this.size=0,this.fill="rgb(124, 181, 236)",this.stroke="rgb(124, 181, 236)",this.strokeWidth=1,this.formatter=void 0}},Ga=class{constructor(){this.stroke="rgb(124, 181, 236)",this.strokeWidth=1}},Go=class{constructor(){this.xLine={enabled:!0,stroke:"rgba(0,0,0, 0.54)",strokeWidth:1,lineDash:"solid",lineCap:void 0},this.yLine={enabled:!1,stroke:"rgba(0,0,0, 0.54)",strokeWidth:1,lineDash:"solid",lineCap:void 0}}},Gn=class extends B${constructor(){super(),this.linePath=new It.Path,this.xCrosshairLine=new It.Line,this.yCrosshairLine=new It.Line,this.lineSparklineGroup=new It.Group,this.markers=new It.Group,this.markerSelection=It.Selection.select(this.markers,()=>this.markerFactory()),this.markerSelectionData=[],this.marker=new Gs,this.line=new Ga,this.crosshairs=new Go,this.rootGroup.append(this.lineSparklineGroup),this.linePath.zIndex=1e3,this.xCrosshairLine.zIndex=2e3,this.yCrosshairLine.zIndex=2e3,this.markers.zIndex=2500,this.lineSparklineGroup.append([this.linePath,this.xCrosshairLine,this.yCrosshairLine,this.markers])}getNodeData(){return this.markerSelectionData}markerFactory(){let{shape:e}=this.marker;return new(BR(e))}onMarkerShapeChange(){this.markerSelection=this.markerSelection.clear(),this.scheduleLayout()}update(){let e=this.generateNodeData();e&&(this.markerSelectionData=e,this.updateSelection(e),this.updateNodes(),this.updateLine())}updateYScaleDomain(){let{yData:e,yScale:t}=this,i=Gi(e),r=0,s=1;if(null!=i&&(r=this.min=i[0],s=this.max=i[1]),r===s){let e=Math.abs(.01*r);r-=e,s+=e}t.domain=[r,s]}generateNodeData(){let{data:e,yData:t,xData:i,xScale:r,yScale:s}=this;if(!e)return;let a=!(r instanceof Gr),o=a?0:r.bandwidth/2,n=[];for(let e=0;e<t.length;e++){let l=t[e],h=i[e];if(void 0==l)continue;let d=r.convert(a?r.toDomain(h):h)+o,c=void 0===l?NaN:s.convert(l);n.push({seriesDatum:{x:h,y:l},point:{x:d,y:c}})}return n}updateSelection(e){this.markerSelection.update(e)}updateNodes(){let{highlightedDatum:e,highlightStyle:t,marker:i}=this,{size:r,fill:s,stroke:a,strokeWidth:o}=t,n=i.formatter;this.markerSelection.each((t,l,h)=>{let d;let c=l===e,u=c&&void 0!==s?s:i.fill,p=c&&void 0!==a?a:i.stroke,g=c&&void 0!==o?o:i.strokeWidth,m=c&&void 0!==r?r:i.size,{seriesDatum:f,point:v}=l;if(n){let e=h===this.markerSelectionData.length-1,t=f.y===this.min,i=f.y===this.max;d=n({datum:l,xValue:f.x,yValue:f.y,min:t,max:i,first:0===h,last:e,fill:u,stroke:p,strokeWidth:g,size:m,highlighted:c})}t.size=d&&void 0!=d.size?d.size:m,t.fill=d&&void 0!=d.fill?d.fill:u,t.stroke=d&&void 0!=d.stroke?d.stroke:p,t.strokeWidth=d&&void 0!=d.strokeWidth?d.strokeWidth:g,t.translationX=v.x,t.translationY=v.y,t.visible=d&&void 0!=d.enabled?d.enabled:i.enabled&&t.size>0})}updateLine(){let{linePath:e,yData:t,xData:i,xScale:r,yScale:s,line:a}=this,o=e.path;if(o.clear(),t.length<2)return;let n=!(r instanceof Gr),l=t.length,h=n?0:r.bandwidth/2,d=!0;for(let e=0;e<l;e++){let a=i[e],l=t[e],c=r.convert(n?r.toDomain(a):a)+h,u=void 0===l?NaN:s.convert(l);void 0==l?d=!0:d?(o.moveTo(c,u),d=!1):o.lineTo(c,u)}e.fill=void 0,e.stroke=a.stroke,e.strokeWidth=a.strokeWidth}updateXCrosshairLine(){let{yScale:e,xCrosshairLine:t,highlightedDatum:i,crosshairs:{xLine:r}}=this;if(!r.enabled||void 0==i){t.strokeWidth=0;return}t.y1=e.range[0],t.y2=e.range[1],t.x1=t.x2=i.point.x,t.stroke=r.stroke,t.strokeWidth=r.strokeWidth??1,t.lineCap="round"===r.lineCap||"square"===r.lineCap?r.lineCap:void 0;let{lineDash:s}=r;t.lineDash=Array.isArray(s)?s:BT(t.lineCap,r.lineDash)}updateYCrosshairLine(){let{xScale:e,yCrosshairLine:t,highlightedDatum:i,crosshairs:{yLine:r}}=this;if(!r.enabled||void 0==i){t.strokeWidth=0;return}t.x1=e.range[0],t.x2=e.range[1],t.y1=t.y2=i.point.y,t.stroke=r.stroke,t.strokeWidth=r.strokeWidth??1,t.lineCap="round"===r.lineCap||"square"===r.lineCap?r.lineCap:void 0;let{lineDash:s}=r;t.lineDash=Array.isArray(s)?s:BT(t.lineCap,r.lineDash)}getTooltipHtml(e){let{dataType:t}=this,{seriesDatum:i}=e,r=i.y,s=i.x,a={content:this.formatNumericDatum(r),title:"array"===t||"object"===t?this.formatDatum(s):void 0},o=this.processedOptions?.tooltip?.renderer;return o?BY(o({context:this.context,datum:i,yValue:r,xValue:s}),a):BY(a)}},{isNumber:Gl}=If,Gh=class{static create(e,t){var i,r,s,a,o,n,l;let h=function(e="line"){switch(e){case"column":return new Gt;case"bar":return new B7;case"area":return new B1;default:return new Gn}}((e=If.deepClone(e)).type);return t&&(h.tooltip=t),Gf(h,"context",(i=e).context,i),Gf(h,"width",i.width,i),Gf(h,"height",i.height,i),Gf(h,"container",i.container,i),Gf(h,"xKey",i.xKey,i),Gf(h,"yKey",i.yKey,i),i.padding&&(Gf(r=h.padding,"top",(s=i.padding).top,s),Gf(r,"right",s.right,s),Gf(r,"bottom",s.bottom,s),Gf(r,"left",s.left,s)),i.axis&&(Gf(a=h.axis,"type",(o=i.axis).type,o),Gf(a,"stroke",o.stroke,o),Gf(a,"strokeWidth",o.strokeWidth,o)),i.highlightStyle&&(Gf(n=h.highlightStyle,"fill",(l=i.highlightStyle).fill,l),Gf(n,"size",l.size,l),Gf(n,"stroke",l.stroke,l),Gf(n,"strokeWidth",l.strokeWidth,l)),function(e,t){switch(t.type){case"bar":case"column":var i,r,s,a;Gf(i=e,"valueAxisDomain",(r=t).valueAxisDomain,r),Gf(i,"fill",r.fill,r),Gf(i,"stroke",r.stroke,r),Gf(i,"strokeWidth",r.strokeWidth,r),Gf(i,"paddingInner",r.paddingInner,r),Gf(i,"paddingOuter",r.paddingOuter,r),Gf(i,"formatter",r.formatter,r),r.label&&(Gf(s=i.label,"enabled",(a=r.label).enabled,a),Gf(s,"fontStyle",a.fontStyle,a),Gf(s,"fontWeight",a.fontWeight,a),Gf(s,"fontSize",a.fontSize,a),Gf(s,"fontFamily",a.fontFamily,a),Gf(s,"textAlign",a.textAlign,a),Gf(s,"textBaseline",a.textBaseline,a),Gf(s,"color",a.color,a),Gf(s,"formatter",a.formatter,a),Gf(s,"placement",a.placement,a));break;case"area":Gf(e,"fill",t.fill,t),t.marker&&Gd(e.marker,t.marker),t.line&&Gc(e.line,t.line),t.crosshairs&&Gu(e.crosshairs,t.crosshairs);break;default:t.marker&&Gd(e.marker,t.marker),t.line&&Gc(e.line,t.line),t.crosshairs&&Gu(e.crosshairs,t.crosshairs)}}(h,e),e.data&&(h.data=e.data),h.processedOptions=e,h}};function Gd(e,t){Gf(e,"enabled",t.enabled,t),Gf(e,"size",t.size,t),Gf(e,"shape",t.shape,t),Gf(e,"fill",t.fill,t),Gf(e,"stroke",t.stroke,t),Gf(e,"strokeWidth",t.strokeWidth,t),Gf(e,"formatter",t.formatter,t)}function Gc(e,t){Gf(e,"stroke",t.stroke,t),Gf(e,"strokeWidth",t.strokeWidth,t)}function Gu(e,t){e.xLine&&t.xLine&&Gp(e.xLine,t.xLine),e.yLine&&t.yLine&&Gp(e.yLine,t.yLine)}function Gp(e,t){Gf(e,"enabled",t.enabled,t),Gf(e,"stroke",t.stroke,t),Gf(e,"strokeWidth",t.strokeWidth,t),Gf(e,"lineDash",t.lineDash,t),Gf(e,"lineCap",t.lineCap,t)}var Gg=(e,t,i)=>!!Gl(t)||(tO(`${e} must be a number, the value you provided is not a valid number. Using the default of ${i}px.`),!1),Gm={xOffset:Gg,yOffset:Gg};function Gf(e,t,i,r){if(t in r){if(t in e){let r=Gm[t];(!r||r(t,i,e[t]))&&e[t]!==i&&(e[t]=i)}else tO(`Property ${t} does not exist on the target object.`)}}var Gv=class extends sQ{constructor(){super(`<div class="ag-sparkline-wrapper">
            <span data-ref="eSparkline"></span>
        </div>`),this.eSparkline=null}wireBeans(e){this.resizeObserverService=e.resizeObserverService,this.sparklineTooltipSingleton=e.sparklineTooltipSingleton}init(e){let t=!0,i=this.resizeObserverService.observeResize(this.getGui(),()=>{let{clientWidth:i,clientHeight:r}=this.getGui();if(0!==i&&0!==r){if(t){let s={data:e.value,width:i,height:r,context:{data:e.data},...e.sparklineOptions};this.sparkline=Gh.create(s,this.sparklineTooltipSingleton.getSparklineTooltip()),this.eSparkline.appendChild(this.sparkline.canvasElement),t=!1}else this.sparkline.width=i,this.sparkline.height=r}});this.addDestroyFunc(()=>i())}refresh(e){return!!this.sparkline&&(this.sparkline.data=e.value,this.sparkline.context={data:e.data},!0)}destroy(){this.sparkline&&this.sparkline.destroy(),super.destroy()}},Gy=class extends i2{constructor(){super(...arguments),this.beanName="sparklineTooltipSingleton"}postConstruct(){this.tooltip=new BZ}getSparklineTooltip(){return this.tooltip}destroy(){this.tooltip&&this.tooltip.destroy(),super.destroy()}},GC={version:"32.2.0",moduleName:tL.SparklinesModule,beans:[Gy],userComponents:[{name:"agSparklineCellRenderer",classImp:Gv}],dependantModules:[IX]},Gw=class extends sQ{constructor(){super(`<div class="ag-status-name-value">
            <span data-ref="eLabel"></span>:&nbsp;
            <span data-ref="eValue" class="ag-status-name-value-value"></span>
        </div>`),this.eLabel=null,this.eValue=null}setLabel(e,t){this.setDisplayed(!1);let i=this.localeService.getLocaleTextFunc();this.eLabel.innerHTML=i(e,t)}setValue(e){this.eValue.innerHTML=e}},Gb={selector:"AG-NAME-VALUE",component:Gw},GS=class extends sQ{constructor(){super(`<div class="ag-status-panel ag-status-panel-aggregations">
            <ag-name-value data-ref="avgAggregationComp"></ag-name-value>
            <ag-name-value data-ref="countAggregationComp"></ag-name-value>
            <ag-name-value data-ref="minAggregationComp"></ag-name-value>
            <ag-name-value data-ref="maxAggregationComp"></ag-name-value>
            <ag-name-value data-ref="sumAggregationComp"></ag-name-value>
        </div>`,[Gb]),this.sumAggregationComp=null,this.countAggregationComp=null,this.minAggregationComp=null,this.maxAggregationComp=null,this.avgAggregationComp=null}wireBeans(e){this.valueService=e.valueService,this.cellNavigationService=e.cellNavigationService,this.cellPositionUtils=e.cellPositionUtils,this.rowPositionUtils=e.rowPositionUtils,this.rangeService=e.rangeService}destroy(){super.destroy()}postConstruct(){if(!t4(this.gos)&&!t6(this.gos)){tO("agAggregationComponent should only be used with the client and server side row model.");return}this.avgAggregationComp.setLabel("avg","Average"),this.countAggregationComp.setLabel("count","Count"),this.minAggregationComp.setLabel("min","Min"),this.maxAggregationComp.setLabel("max","Max"),this.sumAggregationComp.setLabel("sum","Sum"),this.addManagedEventListeners({cellSelectionChanged:this.onCellSelectionChanged.bind(this),modelUpdated:this.onCellSelectionChanged.bind(this)})}init(e){this.refresh(e)}refresh(e){return this.params=e,this.onCellSelectionChanged(),!0}setAggregationComponentValue(e,t,i){let r=this.getAllowedAggregationValueComponent(e);if(tY(r)&&r){let e=this.localeService.getLocaleTextFunc(),s=e("thousandSeparator",","),a=e("decimalSeparator",".");r.setValue("number"!=typeof t?"":oO(Math.round(100*t)/100,s,a)),r.setDisplayed(i)}else this.getAggregationValueComponent(e)?.setDisplayed(!1)}getAllowedAggregationValueComponent(e){let{aggFuncs:t}=this.params;return!t||t.includes(e)?this.getAggregationValueComponent(e):null}getAggregationValueComponent(e){return this[`${e}AggregationComp`]}onCellSelectionChanged(){let e=this.rangeService?.getCellRanges(),t=0,i=0,r=0,s=null,a=null,o={};if(e&&!tZ(e)&&this.rangeService)for(let n=0;n<e.length;n++){let l=e[n],h=this.rangeService.getRangeStartRow(l),d=this.rangeService.getRangeEndRow(l);for(;!(tK(h)||!h||this.rowPositionUtils.before(d,h))&&h&&l.columns;)l.columns.forEach(e=>{if(null===h)return;let n=this.cellPositionUtils.createId({rowPinned:h.rowPinned,column:e,rowIndex:h.rowIndex});if(o[n])return;o[n]=!0;let l=this.rowPositionUtils.getRowNode(h);if(tK(l))return;let d=this.valueService.getValue(e,l);!tK(d)&&""!==d&&(i++,"object"==typeof d&&"value"in d&&""===(d=d.value)||("string"==typeof d&&(d=Number(d)),"number"==typeof d&&!isNaN(d)&&(t+=d,(null===a||d>a)&&(a=d),(null===s||d<s)&&(s=d),r++)))}),h=this.cellNavigationService.getRowBelow(h)}let n=i>1,l=r>1;this.setAggregationComponentValue("count",i,n),this.setAggregationComponentValue("sum",t,l),this.setAggregationComponentValue("min",s,l),this.setAggregationComponentValue("max",a,l),this.setAggregationComponentValue("avg",t/r,l)}},Gx=class extends Gw{wireBeans(e){this.rowModel=e.rowModel}postConstruct(){if(this.setLabel("filteredRows","Filtered"),!t4(this.gos)){tO("agFilteredRowCountComponent should only be used with the client side row model.");return}this.addCssClass("ag-status-panel"),this.addCssClass("ag-status-panel-filtered-row-count"),this.setDisplayed(!0);let e=this.onDataChanged.bind(this);this.addManagedEventListeners({modelUpdated:e}),e()}onDataChanged(){let e=this.getTotalRowCountValue(),t=this.getFilteredRowCountValue(),i=this.localeService.getLocaleTextFunc(),r=i("thousandSeparator",","),s=i("decimalSeparator",".");this.setValue(oO(t,r,s)),this.setDisplayed(e!==t)}getTotalRowCountValue(){let e=0;return this.rowModel.forEachNode(()=>e+=1),e}getFilteredRowCountValue(){let e=0;return this.rowModel.forEachNodeAfterFilter(t=>{t.group||(e+=1)}),e}init(){}refresh(){return!0}destroy(){super.destroy()}},GM=class extends Gw{wireBeans(e){this.selectionService=e.selectionService}postConstruct(){if(!t4(this.gos)&&!t6(this.gos)){tO("agSelectedRowCountComponent should only be used with the client and server side row model.");return}this.setLabel("selectedRows","Selected"),this.addCssClass("ag-status-panel"),this.addCssClass("ag-status-panel-selected-row-count"),this.onRowSelectionChanged();let e=this.onRowSelectionChanged.bind(this);this.addManagedEventListeners({modelUpdated:e,selectionChanged:e})}onRowSelectionChanged(){let e=this.selectionService.getSelectionCount();if(e<0){this.setValue("?"),this.setDisplayed(!0);return}let t=this.localeService.getLocaleTextFunc(),i=t("thousandSeparator",","),r=t("decimalSeparator",".");this.setValue(oO(e,i,r)),this.setDisplayed(e>0)}init(){}refresh(){return!0}destroy(){super.destroy()}},GE=class extends Gw{wireBeans(e){this.rowModel=e.rowModel}postConstruct(){if(!t4(this.gos)){tO("agTotalAndFilteredRowCountComponent should only be used with the client side row model.");return}this.setLabel("totalAndFilteredRows","Rows"),this.addCssClass("ag-status-panel"),this.addCssClass("ag-status-panel-total-and-filtered-row-count"),this.setDisplayed(!0),this.addManagedEventListeners({modelUpdated:this.onDataChanged.bind(this)}),this.onDataChanged()}onDataChanged(){let e=this.localeService.getLocaleTextFunc(),t=e("thousandSeparator",","),i=e("decimalSeparator","."),r=oO(this.getFilteredRowCountValue(),t,i),s=oO(this.getTotalRowCount(),t,i);if(r===s)this.setValue(r);else{let e=this.localeService.getLocaleTextFunc();this.setValue(`${r} ${e("of","of")} ${s}`)}}getFilteredRowCountValue(){let e=0;return this.rowModel.forEachNodeAfterFilter(t=>{!t.group&&e++}),e}getTotalRowCount(){let e=0;return this.rowModel.forEachNode(t=>{!t.group&&e++}),e}init(){}refresh(){return!0}destroy(){super.destroy()}},GD=class extends Gw{wireBeans(e){this.rowModel=e.rowModel}postConstruct(){if(this.setLabel("totalRows","Total Rows"),!t4(this.gos)){tO("agTotalRowCountComponent should only be used with the client side row model.");return}this.addCssClass("ag-status-panel"),this.addCssClass("ag-status-panel-total-row-count"),this.setDisplayed(!0),this.addManagedEventListeners({modelUpdated:this.onDataChanged.bind(this)}),this.onDataChanged()}onDataChanged(){let e=this.localeService.getLocaleTextFunc(),t=e("thousandSeparator",","),i=e("decimalSeparator",".");this.setValue(oO(this.getRowCountValue(),t,i))}getRowCountValue(){let e=0;return this.rowModel.forEachLeafNode(()=>e+=1),e}init(){}refresh(){return!0}destroy(){super.destroy()}},GI={selector:"AG-STATUS-BAR",component:class extends sQ{constructor(){super(`<div class="ag-status-bar">
            <div data-ref="eStatusBarLeft" class="ag-status-bar-left" role="status"></div>
            <div data-ref="eStatusBarCenter" class="ag-status-bar-center" role="status"></div>
            <div data-ref="eStatusBarRight" class="ag-status-bar-right" role="status"></div>
        </div>`),this.updateQueued=!1,this.panelsPromise=ab.resolve(),this.eStatusBarLeft=null,this.eStatusBarCenter=null,this.eStatusBarRight=null,this.compDestroyFunctions={}}wireBeans(e){this.userComponentFactory=e.userComponentFactory,this.statusBarService=e.statusBarService}postConstruct(){this.processStatusPanels(new Map),this.addManagedPropertyListeners(["statusBar"],this.handleStatusBarChanged.bind(this))}processStatusPanels(e){let t=this.gos.get("statusBar")?.statusPanels;if(t){let i=t.filter(e=>"left"===e.align),r=t.filter(e=>"center"===e.align),s=t.filter(e=>!e.align||"right"===e.align);this.panelsPromise=ab.all([this.createAndRenderComponents(i,this.eStatusBarLeft,e),this.createAndRenderComponents(r,this.eStatusBarCenter,e),this.createAndRenderComponents(s,this.eStatusBarRight,e)])}else this.setDisplayed(!1)}handleStatusBarChanged(){this.updateQueued||(this.updateQueued=!0,this.panelsPromise.then(()=>{this.updateStatusBar(),this.updateQueued=!1}))}updateStatusBar(){let e=this.gos.get("statusBar")?.statusPanels,t=Array.isArray(e)&&e.length>0;this.setDisplayed(t);let i=new Map;t&&e.forEach(e=>{let t=e.key??e.statusPanel,r=this.statusBarService.getStatusPanel(t);if(r?.refresh){let s=this.gos.addGridCommonParams(e.statusPanelParams??{});r.refresh(s)&&(i.set(t,r),delete this.compDestroyFunctions[t],sP(r.getGui()))}}),this.resetStatusBar(),t&&this.processStatusPanels(i)}resetStatusBar(){this.eStatusBarLeft.innerHTML="",this.eStatusBarCenter.innerHTML="",this.eStatusBarRight.innerHTML="",this.destroyComponents(),this.statusBarService.unregisterAllComponents()}destroy(){this.destroyComponents(),super.destroy()}destroyComponents(){Object.values(this.compDestroyFunctions).forEach(e=>e()),this.compDestroyFunctions={}}createAndRenderComponents(e,t,i){let r=[];return e.forEach(e=>{let t;let s=e.key||e.statusPanel,a=i.get(s);if(a)t=ab.resolve(a);else if(null==(t=this.userComponentFactory.getStatusPanelCompDetails(e,{}).newAgStackInstance()))return;r.push({key:s,promise:t})}),ab.all(r.map(e=>e.promise)).then(()=>{r.forEach(e=>{e.promise.then(i=>{let r=()=>{this.destroyBean(i)};this.isAlive()?(this.statusBarService.registerStatusPanel(e.key,i),t.appendChild(i.getGui()),this.compDestroyFunctions[e.key]=r):r()})})})}}},Gk=class extends i2{constructor(){super(),this.beanName="statusBarService",this.allComponents=new Map}registerStatusPanel(e,t){this.allComponents.set(e,t)}unregisterStatusPanel(e){this.allComponents.delete(e)}unregisterAllComponents(){this.allComponents.clear()}getStatusPanel(e){return this.allComponents.get(e)}getStatusPanelSelector(){return GI}destroy(){this.unregisterAllComponents(),super.destroy()}},GT="32.2.0",GA={version:GT,moduleName:`${tL.StatusBarModule}-core`,beans:[Gk],userComponents:[{name:"agAggregationComponent",classImp:GS},{name:"agSelectedRowCountComponent",classImp:GM},{name:"agTotalRowCountComponent",classImp:GD},{name:"agFilteredRowCountComponent",classImp:Gx},{name:"agTotalAndFilteredRowCountComponent",classImp:GE}],dependantModules:[IX]},GR={version:GT,moduleName:`${tL.StatusBarModule}-api`,apiFunctions:{getStatusPanel:function(e,t){return aU(e.statusBarService.getStatusPanel(t))}},dependantModules:[GA]},GL={version:GT,moduleName:tL.StatusBarModule,dependantModules:[GA,GR]},GP=class extends i2{constructor(){super(...arguments),this.beanName="rowModel",this.firstRow=-1,this.lastRow=-1,this.rowCount=-1,this.rowNodesByIndex={}}wireBeans(e){this.rowRenderer=e.rowRenderer,this.focusService=e.focusService,this.beans=e}ensureRowHeightsValid(e,t,i,r){return!1}postConstruct(){this.rowHeight=it(this.gos),this.addManagedEventListeners({viewportChanged:this.onViewportChanged.bind(this)}),this.addManagedPropertyListener("viewportDatasource",()=>this.updateDatasource()),this.addManagedPropertyListener("rowHeight",()=>{this.rowHeight=it(this.gos),this.updateRowHeights()})}start(){this.updateDatasource()}isLastRowIndexKnown(){return!0}destroy(){this.destroyDatasource(),super.destroy()}destroyDatasource(){this.viewportDatasource&&(this.viewportDatasource.destroy&&this.viewportDatasource.destroy(),this.rowRenderer.datasourceChanged(),this.firstRow=-1,this.lastRow=-1)}updateDatasource(){let e=this.gos.get("viewportDatasource");e&&this.setViewportDatasource(e)}getViewportRowModelPageSize(){return this.gos.get("viewportRowModelPageSize")}getViewportRowModelBufferSize(){return this.gos.get("viewportRowModelBufferSize")}calculateFirstRow(e){let t=this.getViewportRowModelBufferSize(),i=this.getViewportRowModelPageSize(),r=e-t;return r<0?0:Math.floor(r/i)*i}calculateLastRow(e){if(-1===e)return e;let t=this.getViewportRowModelBufferSize(),i=this.getViewportRowModelPageSize();return Math.min(Math.ceil((e+t)/i)*i,this.rowCount-1)}onViewportChanged(e){let t=this.calculateFirstRow(e.firstRow),i=this.calculateLastRow(e.lastRow);(this.firstRow!==t||this.lastRow!==i)&&(this.firstRow=t,this.lastRow=i,this.purgeRowsNotInViewport(),this.viewportDatasource&&this.viewportDatasource.setViewportRange(this.firstRow,this.lastRow))}purgeRowsNotInViewport(){Object.keys(this.rowNodesByIndex).forEach(e=>{let t=parseInt(e,10);if(t<this.firstRow||t>this.lastRow){if(this.isRowFocused(t))return;delete this.rowNodesByIndex[t]}})}isRowFocused(e){let t=this.focusService.getFocusCellToUseAfterRefresh();return!!t&&null==t.rowPinned&&t.rowIndex===e}setViewportDatasource(e){this.destroyDatasource(),this.viewportDatasource=e,this.rowCount=-1,e.init?e.init({setRowCount:this.setRowCount.bind(this),setRowData:this.setRowData.bind(this),getRow:this.getRow.bind(this)}):tO("viewport is missing init method.")}getType(){return"viewport"}getRow(e){return this.rowNodesByIndex[e]||(this.rowNodesByIndex[e]=this.createBlankRowNode(e)),this.rowNodesByIndex[e]}getRowNode(e){let t;return this.forEachNode(i=>{i.id===e&&(t=i)}),t}getRowCount(){return -1===this.rowCount?0:this.rowCount}getRowIndexAtPixel(e){return 0!==this.rowHeight?Math.floor(e/this.rowHeight):0}getRowBounds(e){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*e}}updateRowHeights(){this.forEachNode(e=>{e.setRowHeight(this.rowHeight),e.setRowTop(this.rowHeight*e.rowIndex)}),this.eventService.dispatchEvent({type:"modelUpdated",newData:!1,newPage:!1,keepRenderedRows:!0,animate:!1})}getTopLevelRowCount(){return this.getRowCount()}getTopLevelRowDisplayedIndex(e){return e}isEmpty(){return this.rowCount>0}isRowsToRender(){return this.rowCount>0}getNodesInRangeForSelection(e,t){let i=e.rowIndex,r=t.rowIndex,s=i<this.firstRow||i>this.lastRow,a=r<this.firstRow||r>this.lastRow;if(s||a)return[];let o=[],n=i<=r?i:r,l=i<=r?r:i;for(let e=n;e<=l;e++)o.push(this.rowNodesByIndex[e]);return o}forEachNode(e){let t=0;Object.keys(this.rowNodesByIndex).forEach(i=>{let r=parseInt(i,10);e(this.rowNodesByIndex[r],t),t++})}setRowData(e){ro(e,(e,t)=>{let i=parseInt(e,10);if(i>=this.firstRow&&i<=this.lastRow){let e=this.rowNodesByIndex[i];tK(e)&&(e=this.createBlankRowNode(i),this.rowNodesByIndex[i]=e),e.setDataAndId(t,i.toString())}})}createBlankRowNode(e){let t=new a7(this.beans);return t.setRowHeight(this.rowHeight),t.setRowTop(this.rowHeight*e),t.setRowIndex(e),t}setRowCount(e,t=!1){e!==this.rowCount&&(this.rowCount=e,this.eventService.dispatchEventOnce({type:"rowCountReady"}),this.eventService.dispatchEvent({type:"modelUpdated",newData:!1,newPage:!1,keepRenderedRows:t,animate:!1}))}isRowPresent(e){return!!this.getRowNode(e.id)}},GF={version:"32.2.0",moduleName:tL.ViewportRowModelModule,rowModel:"viewport",beans:[GP],dependantModules:[IX]},GN=(e,t)=>new GG(e.feature,t,e.defaults,e.css),GO=0,GB=(e,t=`customPart${++GO}`)=>new GG(e,t),GG=class e{constructor(e,t,i={},r=[]){this.feature=e,this.variant=t,this.defaults=i,this.css=r}get id(){return this.feature?`${this.feature}/${this.variant}`:this.variant}withParams(t){let i={...this.defaults};for(let[e,r]of Object.entries(t))null!=r&&(i[e]=r);return new e(this.feature,this.variant,i,this.css)}withAdditionalParams(e){return this.withParams(e)}withCSS(t){return new e(this.feature,this.variant,this.defaults,this.css.concat(t))}},Gz=':where([class^=ag-]){box-sizing:border-box;outline:none;&:after,&:before,&:focus,&:focus-within{box-sizing:border-box;outline:none}&:where(button){background:none;border:none;color:inherit;cursor:pointer;font-family:inherit;font-size:inherit;line-height:inherit;margin:0;padding:0}&:where(button){font-weight:inherit}&::-ms-clear{display:none}}.ag-aria-description-container{border:0;z-index:9999;clip:rect(1px,1px,1px,1px);height:1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.ag-hidden{display:none!important}.ag-invisible{visibility:hidden!important}.ag-unselectable{-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-selectable{-webkit-user-select:text;-moz-user-select:text;user-select:text}.ag-tab-guard{display:block;height:0;position:absolute;width:0}.ag-virtual-list-viewport .ag-tab-guard{position:sticky}.ag-tab-guard-top{top:1px}.ag-tab-guard-bottom{bottom:1px}.ag-shake-left-to-right{animation-direction:alternate;animation-duration:.2s;animation-iteration-count:infinite;animation-name:ag-shake-left-to-right}@keyframes ag-shake-left-to-right{0%{padding-left:6px;padding-right:2px}to{padding-left:2px;padding-right:6px}}.ag-watermark{bottom:20px;color:#9b9b9b;opacity:.7;position:absolute;right:25px;transition:opacity 1s ease-out 3s;&:before{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMDkiIGhlaWdodD0iMzYiIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAyMDkgMzYiPjxwYXRoIGZpbGw9IiM5QjlCOUIiIGQ9Ik0xOTIuOTkzIDIzLjY1OHYtNy45NDZoLTEzLjU0MWwtNy45NDcgNy45NDZ6TTIwOC4yNSAzLjk1aC0xNi45NzRsLTguMDEgNy45NDdoMjQuOTg0ek0xNjMuNjIyIDMxLjYwNWw0LjA2OS00LjA2OWgxMy43MzJ2Ny45NDdoLTE3LjgwMXoiLz48cGF0aCBmaWxsPSIjOUI5QjlCIiBkPSJNMTY2LjYxIDE5Ljc4aDguNzczbDguMDEtNy45NDZIMTY2LjYxek0xNTcuMDExIDMxLjYwNWg2LjYxMWw3Ljg4My03Ljk0N2gtMTQuNDk0ek0xOTEuMjc2IDMuOTVsLTQuMDY4IDQuMDdIMTYxLjI3Vi4wNzJoMzAuMDA2ek0yMC44NCAzMC4yMDZIOC4zNzhsLTIuMTYyIDUuMzRILjc1TDEyLjI1NyA4LjU5Mmg0Ljc2OEwyOC41MyAzNS41NDZoLTUuNTN6bS0xLjcxNy00LjI2TDE0LjYwOSAxNC45NWwtNC41MTQgMTAuOTk4ek0xMDQuNDM3IDE4LjUwOWMxLjU4OS0yLjM1MiA1LjU5NC0yLjYwNyA3LjI0Ny0yLjYwN3Y0LjU3OGMtMi4wMzQgMC00LjA2OS4wNjMtNS4yNzcuOTUzLTEuMjA3Ljg5LTEuODQzIDIuMDk4LTEuODQzIDMuNTZ2MTAuNTUzaC00Ljk1OVYxNS45MDJoNC43Njh6TTExOS4zNzYgMTUuOTAyaC00Ljk1OHYxOS42NDRoNC45NTh6TTExOS4zNzYgNy4xM2gtNC45NTh2NS44NDhoNC45NTh6TTE0My45NzkgNy4xM3YyOC40MTZoLTQuNzY4bC0uMTI3LTIuOTg4YTguMyA4LjMgMCAwIDEtMi42NyAyLjQ4Yy0xLjA4MS41NzItMi40MTYuODktMy45NDIuODktMS4zMzUgMC0yLjYwNi0uMjU1LTMuNjg3LS43LTEuMTQ0LS41MDgtMi4xNjItMS4xNDQtMi45ODgtMi4wMzRhOS42IDkuNiAwIDAgMS0xLjk3MS0zLjE3OWMtLjUwOC0xLjIwNy0uNjk5LTIuNjA2LS42OTktNC4xMzJzLjI1NC0yLjkyNC42OTktNC4xOTZjLjUwOS0xLjI3MSAxLjE0NS0yLjM1MiAxLjk3MS0zLjI0MnMxLjg0NC0xLjU4OSAyLjk4OC0yLjA5OCAyLjM1Mi0uNzYzIDMuNjg3LS43NjNjMS41MjYgMCAyLjc5Ny4yNTUgMy44NzguODI3czEuOTcxIDEuMzM1IDIuNjcgMi40MTZWNy4xOTNoNC45NTl6bS0xMC40MjYgMjQuNTM4YzEuNjUzIDAgMi45MjQtLjU3MiAzLjk0MS0xLjY1M3MxLjUyNi0yLjU0MyAxLjUyNi00LjMyMy0uNTA5LTMuMTc4LTEuNTI2LTQuMzIyYy0xLjAxNy0xLjA4MS0yLjI4OC0xLjY1My0zLjk0MS0xLjY1My0xLjU5IDAtMi45MjUuNTcyLTMuODc4IDEuNjUzLTEuMDE3IDEuMDgtMS41MjYgMi41NDMtMS41MjYgNC4zMjIgMCAxLjc4LjUwOSAzLjE4IDEuNTI2IDQuMjYgMS4wMTcgMS4xNDQgMi4yODggMS43MTYgMy44NzggMS43MTZNNTcuMjAyIDIwLjM1M0g0NC45MzN2NC4yNTloNi45OTNjLS4xOSAyLjE2MS0xLjAxNyAzLjgxNC0yLjQxNiA1LjE1LTEuMzk4IDEuMjctMy4xNzggMS45MDYtNS40NjcgMS45MDYtMS4yNzEgMC0yLjQ4LS4yNTQtMy40OTYtLjY5OWE3IDcgMCAwIDEtMi43MzQtMS45N2MtLjc2My0uODI3LTEuMzM1LTEuODQ0LTEuNzgtMy4wNTJzLS42MzYtMi40OC0uNjM2LTMuOTQyLjE5LTIuNzMzLjYzNi0zLjk0MWMuMzgxLTEuMjA4IDEuMDE3LTIuMTYyIDEuNzgtMy4wNTIuNzYzLS44MjYgMS42NTMtMS40NjIgMi43MzMtMS45N2E5LjEgOS4xIDAgMCAxIDMuNTYtLjdxNC4wMDUgMCA2LjEwMyAxLjkwN2wzLjMwNi0zLjMwNWMtMi40OC0xLjkwNy01LjY1OC0yLjkyNS05LjQwOS0yLjkyNS0yLjA5NyAwLTQuMDA0LjMxOC01LjcyMSAxLjAxOC0xLjcxNi42OTktMy4xNzkgMS41ODktNC4zODYgMi43OTdBMTIuMSAxMi4xIDAgMCAwIDMxLjIgMTYuMjJjLS42MzUgMS43MTctLjk1MyAzLjYyNC0uOTUzIDUuNjU4cy4zMTggMy45NDIgMS4wMTcgNS42NThjLjcgMS43MTcgMS41OSAzLjE3OSAyLjc5NyA0LjM4N2ExMi4xIDEyLjEgMCAwIDAgNC4zODcgMi43OTdjMS43MTYuNyAzLjYyMyAxLjAxNyA1LjY1NyAxLjAxNyAyLjAzNSAwIDMuODc4LS4zMTggNS41MzEtMS4wMTcgMS42NTMtLjcgMy4wNTItMS41OSA0LjE5Ni0yLjc5N3ExLjcxNi0xLjgxMiAyLjY3LTQuMzg3Yy42MzYtMS43MTYuOTU0LTMuNjIzLjk1NC01LjY1OHYtLjgyNmMtLjE5MS0uMTI3LS4yNTUtLjQ0NS0uMjU1LS43TTk1Ljk4MiAyMC4zNTNoLTEyLjI3djQuMjU5aDYuOTkzYy0uMTkgMi4xNjEtMS4wMTcgMy44MTQtMi40MTYgNS4xNS0xLjM5OCAxLjI3LTMuMTc4IDEuOTA2LTUuNDY3IDEuOTA2LTEuMjcxIDAtMi40OC0uMjU0LTMuNDk2LS42OTlhNyA3IDAgMCAxLTIuNzM0LTEuOTdjLS43NjMtLjgyNy0xLjMzNS0xLjg0NC0xLjc4LTMuMDUycy0uNjM2LTIuNDgtLjYzNi0zLjk0Mi4xOS0yLjczMy42MzYtMy45NDFjLjM4MS0xLjIwOCAxLjAxNy0yLjE2MiAxLjc4LTMuMDUyLjc2My0uODI2IDEuNjUzLTEuNDYyIDIuNzM0LTEuOTdhOS4xIDkuMSAwIDAgMSAzLjU2LS43cTQuMDA1IDAgNi4xMDMgMS45MDdsMy4zMDUtMy4zMDVjLTIuNDc5LTEuOTA3LTUuNjU4LTIuOTI1LTkuNDA4LTIuOTI1LTIuMDk4IDAtNC4wMDUuMzE4LTUuNzIyIDEuMDE4LTEuNzE2LjY5OS0zLjE3OCAxLjU4OS00LjM4NiAyLjc5N2ExMi4xIDEyLjEgMCAwIDAtMi43OTcgNC4zODZjLS42MzYgMS43MTctLjk1NCAzLjYyNC0uOTU0IDUuNjU4cy4zMTggMy45NDIgMS4wMTcgNS42NThjLjcgMS43MTcgMS41OSAzLjE3OSAyLjc5NyA0LjM4N2ExMi4xIDEyLjEgMCAwIDAgNC4zODcgMi43OTdjMS43MTYuNyAzLjYyMyAxLjAxNyA1LjY1OCAxLjAxNyAyLjAzNCAwIDMuODc4LS4zMTggNS41My0xLjAxNyAxLjY1My0uNyAzLjA1Mi0xLjU5IDQuMTk2LTIuNzk3cTEuNzE4LTEuODEyIDIuNjctNC4zODdjLjYzNi0xLjcxNi45NTQtMy42MjMuOTU0LTUuNjU4di0uODI2Yy0uMTktLjEyNy0uMjU1LS40NDUtLjI1NS0uNyIvPjwvc3ZnPg==);background-repeat:no-repeat;background-size:170px 40px;content:"";display:block;height:40px;width:170px}}.ag-watermark-text{font-family:Impact,sans-serif;font-size:19px;font-weight:700;opacity:.5}.ag-ltr .ag-watermark-text{padding-left:.7rem}.ag-rtl .ag-watermark-text{padding-right:.7rem}.ag-body-horizontal-scroll-viewport,.ag-body-vertical-scroll-viewport,.ag-body-viewport,.ag-center-cols-viewport,.ag-floating-bottom-viewport,.ag-floating-top-viewport,.ag-header-viewport,.ag-sticky-bottom-viewport,.ag-sticky-top-viewport,.ag-virtual-list-viewport{flex:1 1 auto;height:100%;min-width:0;overflow:hidden;position:relative}.ag-body-viewport,.ag-center-cols-viewport,.ag-floating-bottom-viewport,.ag-floating-top-viewport,.ag-header-viewport,.ag-sticky-bottom-viewport,.ag-sticky-top-viewport{overflow-x:auto;-ms-overflow-style:none!important;scrollbar-width:none!important;&::-webkit-scrollbar{display:none!important}}.ag-body-viewport{display:flex;overflow-x:hidden;&.ag-layout-normal{overflow-y:auto;-webkit-overflow-scrolling:touch}}.ag-sticky-bottom-container,.ag-sticky-top-container{min-height:1px}.ag-center-cols-viewport{min-height:100%;width:100%}.ag-body-horizontal-scroll-viewport{overflow-x:scroll}.ag-body-vertical-scroll-viewport{overflow-y:scroll}.ag-virtual-list-viewport{overflow:auto;width:100%}.ag-body-container,.ag-body-horizontal-scroll-container,.ag-body-vertical-scroll-container,.ag-center-cols-container,.ag-floating-bottom-container,.ag-floating-bottom-full-width-container,.ag-floating-top-container,.ag-full-width-container,.ag-header-container,.ag-pinned-left-cols-container,.ag-pinned-right-cols-container,.ag-sticky-bottom-container,.ag-sticky-top-container,.ag-virtual-list-container{position:relative}.ag-floating-bottom-container,.ag-floating-top-container,.ag-header-container,.ag-sticky-bottom-container,.ag-sticky-top-container{height:100%;white-space:nowrap}.ag-center-cols-container,.ag-pinned-right-cols-container{display:block}.ag-body-horizontal-scroll-container{height:100%}.ag-body-vertical-scroll-container{width:100%}.ag-floating-bottom-full-width-container,.ag-floating-top-full-width-container,.ag-full-width-container,.ag-sticky-bottom-full-width-container,.ag-sticky-top-full-width-container{pointer-events:none;position:absolute;top:0}.ag-ltr .ag-floating-bottom-full-width-container,.ag-ltr .ag-floating-top-full-width-container,.ag-ltr .ag-full-width-container,.ag-ltr .ag-sticky-bottom-full-width-container,.ag-ltr .ag-sticky-top-full-width-container{left:0}.ag-rtl .ag-floating-bottom-full-width-container,.ag-rtl .ag-floating-top-full-width-container,.ag-rtl .ag-full-width-container,.ag-rtl .ag-sticky-bottom-full-width-container,.ag-rtl .ag-sticky-top-full-width-container{right:0}.ag-full-width-container{width:100%}.ag-floating-bottom-full-width-container,.ag-floating-top-full-width-container{display:inline-block;height:100%;overflow:hidden;width:100%}.ag-virtual-list-container{overflow:hidden}.ag-body{display:flex;flex:1 1 auto;flex-direction:row!important;min-height:0;position:relative}.ag-body-horizontal-scroll,.ag-body-vertical-scroll{display:flex;min-height:0;min-width:0;position:relative;&.ag-scrollbar-invisible{bottom:0;position:absolute;&.ag-apple-scrollbar{opacity:0;transition:opacity .4s;visibility:hidden;&.ag-scrollbar-active,&.ag-scrollbar-scrolling{opacity:1;visibility:visible}}}}.ag-body-horizontal-scroll{width:100%;&.ag-scrollbar-invisible{left:0;right:0}}.ag-body-vertical-scroll{height:100%;&.ag-scrollbar-invisible{top:0;z-index:10}}.ag-ltr .ag-body-vertical-scroll{&.ag-scrollbar-invisible{right:0}}.ag-rtl .ag-body-vertical-scroll{&.ag-scrollbar-invisible{left:0}}.ag-force-vertical-scroll{overflow-y:scroll!important}.ag-horizontal-left-spacer,.ag-horizontal-right-spacer{height:100%;min-width:0;overflow-x:scroll;&.ag-scroller-corner{overflow-x:hidden}}.ag-ltr .ag-column-moving{.ag-cell,.ag-header-cell{transition:left .2s}.ag-header-group-cell{transition:left .2s,width .2s}}.ag-rtl .ag-column-moving{.ag-cell,.ag-header-cell{transition:right .2s}.ag-header-group-cell{transition:right .2s,width .2s}}.ag-row-animation .ag-row{transition:transform .4s,top .4s,opacity .2s}.ag-row-animation .ag-row.ag-after-created{transition:transform .4s,top .4s,height .4s,opacity .2s}.ag-row-no-animation .ag-row{transition:none}.ag-row-loading{align-items:center;display:flex}.ag-row-position-absolute{position:absolute}.ag-row-position-relative{position:relative}.ag-full-width-row{overflow:hidden;pointer-events:all}.ag-row-inline-editing{z-index:1}.ag-row-dragging{z-index:2}.ag-stub-cell{align-items:center;display:flex}.ag-cell{display:inline-block;height:100%;position:absolute;white-space:nowrap}.ag-cell-value{flex:1 1 auto}.ag-cell-value,.ag-group-value{overflow:hidden;text-overflow:ellipsis}.ag-cell-wrap-text{white-space:normal;word-break:break-word}.ag-sparkline-wrapper{height:100%;left:0;position:absolute;top:0;width:100%}.ag-full-width-row .ag-cell-wrapper.ag-row-group{align-items:center;height:100%}.ag-cell .ag-icon{display:inline-block;vertical-align:middle}.ag-floating-top{border-bottom:var(--ag-pinned-row-border);display:flex;overflow:hidden;position:relative;white-space:nowrap;width:100%}.ag-pinned-left-floating-top,.ag-pinned-right-floating-top{display:inline-block;min-width:0;overflow:hidden;position:relative}.ag-floating-bottom{border-top:var(--ag-pinned-row-border);display:flex;overflow:hidden;position:relative;white-space:nowrap;width:100%}.ag-pinned-left-floating-bottom,.ag-pinned-right-floating-bottom{display:inline-block;min-width:0;overflow:hidden;position:relative}.ag-sticky-bottom,.ag-sticky-top{background-color:var(--ag-background-color);display:flex;height:0;overflow:hidden;position:absolute;width:100%}.ag-pinned-left-sticky-top,.ag-pinned-right-sticky-top{height:100%;overflow:hidden;position:relative}.ag-sticky-bottom-full-width-container,.ag-sticky-top-full-width-container{height:100%;overflow:hidden;width:100%}.ag-value-slide-out{opacity:1}.ag-ltr .ag-value-slide-out{margin-right:5px;transition:opacity 3s,margin-right 3s}.ag-rtl .ag-value-slide-out{margin-left:5px;transition:opacity 3s,margin-left 3s}:is(.ag-ltr,.ag-rtl) .ag-value-slide-out{transition-timing-function:linear}.ag-value-slide-out-end{opacity:0}.ag-ltr .ag-value-slide-out-end{margin-right:10px}.ag-rtl .ag-value-slide-out-end{margin-left:10px}.ag-opacity-zero{opacity:0!important}.ag-details-row{width:100%}.ag-details-row-fixed-height{height:100%}.ag-details-grid{width:100%}.ag-details-grid-fixed-height{height:100%}.ag-cell-label-container{align-items:center;display:flex;flex-direction:row-reverse;height:100%;justify-content:space-between;width:100%}.ag-right-aligned-header{.ag-cell-label-container{flex-direction:row}.ag-header-cell-text{text-align:end}}.ag-column-group-icons{display:block;>*{cursor:pointer}}.ag-pill-select{display:flex;flex-direction:column;.ag-column-drop-list{padding:0}.ag-select{padding-top:var(--ag-spacing)}.ag-picker-field-wrapper{background-color:transparent;border:0}.ag-picker-field-display{cursor:pointer}}.ag-ltr{direction:ltr;.ag-body,.ag-body-horizontal-scroll,.ag-body-viewport,.ag-floating-bottom,.ag-floating-top,.ag-header,.ag-sticky-bottom,.ag-sticky-top{flex-direction:row}}.ag-rtl{direction:rtl;.ag-body,.ag-body-horizontal-scroll,.ag-body-viewport,.ag-floating-bottom,.ag-floating-top,.ag-header,.ag-sticky-bottom,.ag-sticky-top{flex-direction:row-reverse}.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{display:block}}.ag-rtl{.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{transform:rotate(180deg)}}.ag-rtl{.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{transform:rotate(-180deg)}}.ag-measurement-container{overflow:hidden;visibility:hidden;width:0;& div{position:absolute}}.ag-group{position:relative;width:100%}.ag-group-title-bar{align-items:center;display:flex;padding:var(--ag-spacing)}.ag-group-title{display:inline;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-group-title-bar .ag-group-title{cursor:default}.ag-group-toolbar{align-items:center;display:flex;padding:var(--ag-spacing)}.ag-group-container{display:flex}.ag-disabled .ag-group-container{pointer-events:none}.ag-disabled-group-container,.ag-disabled-group-title-bar{opacity:.5}.ag-group-container-horizontal{flex-direction:row;flex-wrap:wrap}.ag-group-container-vertical{flex-direction:column}.ag-group-title-bar-icon{cursor:pointer;flex:none}.ag-ltr .ag-group-title-bar-icon{margin-right:var(--ag-spacing)}.ag-rtl .ag-group-title-bar-icon{margin-left:var(--ag-spacing)}.ag-group-item-alignment-stretch .ag-group-item{align-items:stretch}.ag-group-item-alignment-start .ag-group-item{align-items:flex-start}.ag-group-item-alignment-end .ag-group-item{align-items:flex-end}.ag-popup-child{top:0;z-index:5;&:where(:not(.ag-tooltip-custom)){box-shadow:var(--ag-popup-shadow)}}.ag-popup-editor{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-large-text-input{display:block}.ag-rtl{text-align:right}.ag-ltr .ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-left:var(--ag-row-group-indent-size)}.ag-rtl .ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-right:var(--ag-row-group-indent-size)}.ag-ltr .ag-row-group-leaf-indent{margin-left:calc(var(--ag-cell-widget-spacing) + var(--ag-icon-size))}.ag-rtl .ag-row-group-leaf-indent{margin-right:calc(var(--ag-cell-widget-spacing) + var(--ag-icon-size))}.ag-value-change-delta{padding:0 2px}.ag-value-change-delta-up{color:var(--ag-value-change-delta-up-color)}.ag-value-change-delta-down{color:var(--ag-value-change-delta-down-color)}.ag-value-change-value{background-color:transparent;border-radius:1px;padding-left:1px;padding-right:1px;transition:background-color 1s}.ag-value-change-value-highlight{background-color:var(--ag-value-change-value-highlight-background-color);transition:background-color .1s}.ag-cell-data-changed{background-color:var(--ag-value-change-value-highlight-background-color)!important}.ag-cell-data-changed-animation{background-color:transparent}.ag-cell-highlight{background-color:var(--ag-range-selection-highlight-color)!important}.ag-row{background-color:var(--ag-background-color);border-bottom:var(--ag-row-border);color:var(--ag-cell-text-color);font-size:var(--ag-data-font-size);height:var(--ag-row-height);white-space:nowrap;width:100%;--ag-internal-content-line-height:min(calc(var(--ag-row-height) - 1px),var(--ag-line-height,1000px))}:where(.ag-body-vertical-content-no-gap) .ag-row-last{border-bottom-color:transparent}.ag-sticky-bottom{border-top:var(--ag-row-border);box-sizing:content-box!important;display:none}.ag-group-contracted,.ag-group-expanded{cursor:pointer}.ag-cell,.ag-full-width-row .ag-cell-wrapper.ag-row-group{border:1px solid transparent;line-height:var(--ag-internal-content-line-height)}.ag-ltr .ag-cell{border-right:var(--ag-column-border)}.ag-rtl .ag-cell{border-left:var(--ag-column-border)}.ag-ltr :where(.ag-body-horizontal-content-no-gap) .ag-column-last{border-right-color:transparent}.ag-rtl :where(.ag-body-horizontal-content-no-gap) .ag-column-last{border-left-color:transparent}.ag-cell-wrapper{align-items:center;display:flex;&.ag-row-group{align-items:flex-start}>:not(.ag-cell-value):not(.ag-group-value){align-items:center;display:flex;height:var(--ag-internal-content-line-height)}}.ag-ltr .ag-cell-wrapper{padding-left:calc(var(--ag-indentation-level)*var(--ag-row-group-indent-size))}.ag-rtl .ag-cell-wrapper{padding-right:calc(var(--ag-indentation-level)*var(--ag-row-group-indent-size))}.ag-ltr .ag-row>.ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-rtl .ag-row>.ag-cell-wrapper.ag-row-group{padding-right:calc(var(--ag-cell-horizontal-padding) + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-ltr .ag-group-contracted,.ag-ltr .ag-group-expanded,.ag-ltr .ag-row-drag,.ag-ltr .ag-selection-checkbox{margin-right:var(--ag-cell-widget-spacing)}.ag-rtl .ag-group-contracted,.ag-rtl .ag-group-expanded,.ag-rtl .ag-row-drag,.ag-rtl .ag-selection-checkbox{margin-left:var(--ag-cell-widget-spacing)}.ag-ltr .ag-group-child-count{margin-left:3px}.ag-rtl .ag-group-child-count{margin-right:3px}.ag-row-highlight-above:after,.ag-row-highlight-below:after{background-color:var(--ag-range-selection-border-color);content:"";height:1px;position:absolute;width:calc(100% - 1px)}.ag-ltr .ag-row-highlight-above:after,.ag-ltr .ag-row-highlight-below:after{left:1px}.ag-rtl .ag-row-highlight-above:after,.ag-rtl .ag-row-highlight-below:after{right:1px}.ag-row-highlight-above:after{top:-1px}.ag-row-highlight-above.ag-row-first:after{top:0}.ag-row-highlight-below:after{bottom:0}.ag-row-odd{background-color:var(--ag-odd-row-background-color)}.ag-row-selected:before{background-color:var(--ag-selected-row-background-color);content:"";display:block;inset:0;pointer-events:none;position:absolute}.ag-row-hover.ag-full-width-row.ag-row-group:before,.ag-row-hover:not(.ag-full-width-row):before{background-color:var(--ag-row-hover-color);content:"";display:block;inset:0;pointer-events:none;position:absolute}.ag-row-hover.ag-row-selected:before{background-color:var(--ag-row-hover-color);background-image:linear-gradient(var(--ag-selected-row-background-color),var(--ag-selected-row-background-color))}.ag-row-hover.ag-full-width-row.ag-row-group>*{position:relative}.ag-column-hover{background-color:var(--ag-column-hover-color)}.ag-right-aligned-cell{font-variant-numeric:tabular-nums}.ag-ltr .ag-right-aligned-cell{text-align:right}.ag-rtl .ag-right-aligned-cell{text-align:left}.ag-right-aligned-cell .ag-cell-value,.ag-right-aligned-cell .ag-group-value{margin-left:auto}.ag-cell:not(.ag-cell-inline-editing),.ag-full-width-row .ag-cell-wrapper.ag-row-group{-webkit-font-smoothing:subpixel-antialiased}.ag-ltr .ag-cell:not(.ag-cell-inline-editing),.ag-ltr .ag-full-width-row .ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px + var(--ag-row-group-indent-size)*var(--ag-indentation-level));padding-right:calc(var(--ag-cell-horizontal-padding) - 1px)}.ag-rtl .ag-cell:not(.ag-cell-inline-editing),.ag-rtl .ag-full-width-row .ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px);padding-right:calc(var(--ag-cell-horizontal-padding) - 1px + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-row>.ag-cell-wrapper{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px);padding-right:calc(var(--ag-cell-horizontal-padding) - 1px)}.ag-row-dragging{cursor:move;opacity:.5}.ag-details-row{background-color:var(--ag-background-color);padding:calc(var(--ag-spacing)*3.5)}.ag-layout-auto-height,.ag-layout-print{.ag-center-cols-container,.ag-center-cols-viewport{min-height:150px}}.ag-overlay-loading-wrapper{background-color:var(--ag-modal-overlay-background-color)}.ag-skeleton-container{align-content:center;height:100%;width:100%}.ag-skeleton-effect{animation:ag-skeleton-loading 1.5s ease-in-out .5s infinite;background-color:var(--ag-row-loading-skeleton-effect-color);border-radius:.25rem;height:1em;width:100%}.ag-ltr .ag-right-aligned-cell .ag-skeleton-effect{margin-left:auto}.ag-rtl .ag-right-aligned-cell .ag-skeleton-effect{margin-right:auto}@keyframes ag-skeleton-loading{0%{opacity:1}50%{opacity:.4}to{opacity:1}}.ag-loading{align-items:center;display:flex;height:100%}.ag-ltr .ag-loading{padding-left:var(--ag-cell-horizontal-padding)}.ag-rtl .ag-loading{padding-right:var(--ag-cell-horizontal-padding)}.ag-ltr .ag-loading-icon{padding-right:var(--ag-cell-widget-spacing)}.ag-rtl .ag-loading-icon{padding-left:var(--ag-cell-widget-spacing)}.ag-icon-loading{animation-duration:1s;animation-iteration-count:infinite;animation-name:spin;animation-timing-function:linear}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.ag-details-row{padding:calc(var(--ag-spacing)*3.75)}.ag-pinned-left-header,.ag-pinned-right-header{display:inline-block;overflow:hidden;position:relative}.ag-body-horizontal-scroll:not(.ag-scrollbar-invisible){.ag-horizontal-left-spacer:not(.ag-scroller-corner){border-right:var(--ag-pinned-column-border)}.ag-horizontal-right-spacer:not(.ag-scroller-corner){border-left:var(--ag-pinned-column-border)}}.ag-pinned-right-header{border-left:var(--ag-pinned-column-border)}.ag-pinned-left-header{border-right:var(--ag-pinned-column-border)}.ag-cell.ag-cell-first-right-pinned:not(.ag-cell-range-left):not(.ag-cell-range-single-cell){border-left:var(--ag-pinned-column-border)}.ag-cell.ag-cell-last-left-pinned:not(.ag-cell-range-right):not(.ag-cell-range-single-cell){border-right:var(--ag-pinned-column-border)}.ag-pinned-left-header .ag-header-cell-resize:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}.ag-pinned-right-header .ag-header-cell-resize:after{left:50%}.ag-pinned-left-header,.ag-pinned-right-header{height:100%}.ag-pinned-left-header .ag-header-cell-resize{right:-3px}.ag-pinned-right-header .ag-header-cell-resize{left:-3px}.ag-body-viewport:not(.ag-has-focus) .ag-cell-range-single-cell:not(.ag-cell-inline-editing),.ag-cell-range-selected:not(.ag-cell-focus){background-color:var(--ag-range-selection-background-color);&.ag-cell-range-chart{background-color:var(--ag-range-selection-chart-background-color)!important;&.ag-cell-range-chart-category{background-color:var(--ag-range-selection-chart-category-background-color)!important}}}.ag-cell-range-selected-1:not(.ag-cell-focus),.ag-root:not(.ag-context-menu-open) .ag-body-viewport:not(.ag-has-focus) .ag-cell-range-selected-1:not(.ag-cell-inline-editing){background-color:var(--ag-range-selection-background-color)}.ag-cell-range-selected-2:not(.ag-cell-focus){background-image:linear-gradient(var(--ag-range-selection-background-color),var(--ag-range-selection-background-color))}.ag-cell-range-selected-3:not(.ag-cell-focus){background-image:linear-gradient(var(--ag-range-selection-background-color),var(--ag-range-selection-background-color)),linear-gradient(var(--ag-range-selection-background-color),var(--ag-range-selection-background-color))}.ag-cell-range-selected-4:not(.ag-cell-focus){background-image:linear-gradient(var(--ag-range-selection-background-color),var(--ag-range-selection-background-color)),linear-gradient(var(--ag-range-selection-background-color),var(--ag-range-selection-background-color)),linear-gradient(var(--ag-range-selection-background-color),var(--ag-range-selection-background-color))}.ag-cell.ag-cell-range-selected:not(.ag-cell-range-single-cell){&.ag-cell-range-top{border-top-color:var(--ag-range-selection-border-color);border-top-style:var(--ag-range-selection-border-style)}&.ag-cell-range-right{border-right-color:var(--ag-range-selection-border-color);border-right-style:var(--ag-range-selection-border-style)}&.ag-cell-range-bottom{border-bottom-color:var(--ag-range-selection-border-color);border-bottom-style:var(--ag-range-selection-border-style)}&.ag-cell-range-left{border-left-color:var(--ag-range-selection-border-color);border-left-style:var(--ag-range-selection-border-style)}}.ag-ltr,.ag-rtl{.ag-cell-focus:not(.ag-cell-range-selected):focus-within,.ag-cell-range-single-cell,.ag-cell-range-single-cell.ag-cell-range-handle,.ag-context-menu-open .ag-cell-focus:not(.ag-cell-range-selected),.ag-full-width-row.ag-row-focus:focus .ag-cell-wrapper.ag-row-group{border:1px solid;border-color:var(--ag-range-selection-border-color);border-style:var(--ag-range-selection-border-style);outline:initial}}.ag-cell.ag-selection-fill-top,.ag-cell.ag-selection-fill-top.ag-cell-range-selected{border-top:1px dashed;border-top-color:var(--ag-range-selection-border-color)}.ag-ltr .ag-cell.ag-selection-fill-right,.ag-ltr .ag-cell.ag-selection-fill-right.ag-cell-range-selected{border-right:1px dashed var(--ag-range-selection-border-color)!important}.ag-rtl .ag-cell.ag-selection-fill-right,.ag-rtl .ag-cell.ag-selection-fill-right.ag-cell-range-selected{border-left:1px dashed var(--ag-range-selection-border-color)!important}.ag-cell.ag-selection-fill-bottom,.ag-cell.ag-selection-fill-bottom.ag-cell-range-selected{border-bottom:1px dashed;border-bottom-color:var(--ag-range-selection-border-color)}.ag-ltr .ag-cell.ag-selection-fill-left,.ag-ltr .ag-cell.ag-selection-fill-left.ag-cell-range-selected{border-left:1px dashed var(--ag-range-selection-border-color)!important}.ag-rtl .ag-cell.ag-selection-fill-left,.ag-rtl .ag-cell.ag-selection-fill-left.ag-cell-range-selected{border-right:1px dashed var(--ag-range-selection-border-color)!important}.ag-fill-handle,.ag-range-handle{background-color:var(--ag-range-selection-border-color);bottom:-1px;height:6px;position:absolute;width:6px}.ag-ltr .ag-fill-handle,.ag-ltr .ag-range-handle{right:-1px}.ag-rtl .ag-fill-handle,.ag-rtl .ag-range-handle{left:-1px}.ag-fill-handle{cursor:cell}.ag-ltr .ag-range-handle{cursor:nwse-resize}.ag-rtl .ag-range-handle{cursor:nesw-resize}.ag-cell-inline-editing{border:var(--ag-input-focus-border)!important}.ag-input-wrapper,.ag-picker-field-wrapper{align-items:center;display:flex;flex:1 1 auto;line-height:normal;position:relative}.ag-input-field{align-items:center;display:flex;flex-direction:row}.ag-input-field-input{flex:1 1 auto}.ag-floating-filter-input .ag-input-field-input[type=date]{width:1px}.ag-input-field-input{min-width:0;width:100%}.ag-column-select-header-filter-wrapper,.ag-filter-filter,.ag-filter-toolpanel-search,.ag-mini-filter{.ag-input-wrapper:before{background-color:currentColor;content:"";display:block;height:12px;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS41Ij48cGF0aCBkPSJNNS4zIDlhMy43IDMuNyAwIDEgMCAwLTcuNSAzLjcgMy43IDAgMCAwIDAgNy41Wk0xMC41IDEwLjUgOC4zIDguMiIvPjwvc3ZnPg==");mask-image:url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS41Ij48cGF0aCBkPSJNNS4zIDlhMy43IDMuNyAwIDEgMCAwLTcuNSAzLjcgMy43IDAgMCAwIDAgNy41Wk0xMC41IDEwLjUgOC4zIDguMiIvPjwvc3ZnPg==");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;opacity:50%;position:absolute;width:12px}}.ag-ltr .ag-column-select-header-filter-wrapper,.ag-ltr .ag-filter-filter,.ag-ltr .ag-filter-toolpanel-search,.ag-ltr .ag-mini-filter{.ag-input-wrapper:before{margin-left:var(--ag-spacing)}& input.ag-number-field-input,& input.ag-text-field-input{padding-left:calc(var(--ag-spacing)*1.5 + 12px)}}.ag-rtl .ag-column-select-header-filter-wrapper,.ag-rtl .ag-filter-filter,.ag-rtl .ag-filter-toolpanel-search,.ag-rtl .ag-mini-filter{.ag-input-wrapper:before{margin-right:var(--ag-spacing)}& input.ag-number-field-input,& input.ag-text-field-input{padding-right:calc(var(--ag-spacing)*1.5 + 12px)}}.ag-advanced-filter-header{align-items:center;background-color:var(--ag-header-background-color);border-bottom:var(--ag-header-row-border);display:flex;padding-left:var(--ag-cell-horizontal-padding);padding-right:var(--ag-cell-horizontal-padding);position:relative}.ag-advanced-filter{align-items:center;display:flex;width:100%}.ag-advanced-filter-apply-button,.ag-advanced-filter-builder-button{line-height:normal;white-space:nowrap}.ag-ltr .ag-advanced-filter-apply-button,.ag-ltr .ag-advanced-filter-builder-button{margin-left:calc(var(--ag-spacing)*2)}.ag-rtl .ag-advanced-filter-apply-button,.ag-rtl .ag-advanced-filter-builder-button{margin-right:calc(var(--ag-spacing)*2)}.ag-advanced-filter-builder-button{align-items:center;background-color:unset;border:0;display:flex;font-size:var(--ag-font-size);font-weight:600;padding:var(--ag-spacing);&:hover:not(:disabled){background-color:var(--ag-row-hover-color)}&:not(:disabled){cursor:pointer}}.ag-ltr .ag-advanced-filter-builder-button-label{margin-left:var(--ag-spacing)}.ag-rtl .ag-advanced-filter-builder-button-label{margin-right:var(--ag-spacing)}.ag-advanced-filter-builder{display:flex;flex-direction:column;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:100%}.ag-advanced-filter-builder-list{flex:1;overflow:auto}.ag-advanced-filter-builder-button-panel{border-top:var(--ag-advanced-filter-builder-button-bar-border);display:flex;justify-content:flex-end;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}.ag-ltr .ag-advanced-filter-builder .ag-advanced-filter-builder-button-panel{.ag-advanced-filter-builder-apply-button,.ag-advanced-filter-builder-cancel-button{margin-left:calc(var(--ag-spacing)*2)}}.ag-rtl .ag-advanced-filter-builder .ag-advanced-filter-builder-button-panel{.ag-advanced-filter-builder-apply-button,.ag-advanced-filter-builder-cancel-button{margin-right:calc(var(--ag-spacing)*2)}}.ag-advanced-filter-builder-item-wrapper{align-items:center;display:flex;flex:1 1 auto;justify-content:space-between;overflow:hidden}.ag-ltr .ag-advanced-filter-builder-item-wrapper{padding-left:calc(var(--ag-icon-size)/2);padding-right:var(--ag-icon-size)}.ag-rtl .ag-advanced-filter-builder-item-wrapper{padding-left:var(--ag-icon-size);padding-right:calc(var(--ag-icon-size)/2)}.ag-virtual-list-viewport .ag-advanced-filter-builder-item-wrapper .ag-tab-guard{position:absolute}.ag-advanced-filter-builder-item-tree-lines>*{width:var(--ag-advanced-filter-builder-indent-size)}.ag-advanced-filter-builder-item-tree-lines .ag-advanced-filter-builder-item-tree-line-root{width:var(--ag-icon-size);&:before{height:50%;top:50%}}.ag-advanced-filter-builder-item-tree-line-horizontal,.ag-advanced-filter-builder-item-tree-line-vertical,.ag-advanced-filter-builder-item-tree-line-vertical-bottom,.ag-advanced-filter-builder-item-tree-line-vertical-top{align-items:center;display:flex;height:100%;position:relative;&:after,&:before{content:"";height:100%;position:absolute}}.ag-advanced-filter-builder-item-tree-line-horizontal:after{border-bottom:1px solid var(--ag-border-color);height:50%;top:0;width:calc(var(--ag-advanced-filter-builder-indent-size) - var(--ag-icon-size))}.ag-ltr .ag-advanced-filter-builder-item-tree-line-horizontal:after{left:calc(var(--ag-icon-size)/2)}.ag-rtl .ag-advanced-filter-builder-item-tree-line-horizontal:after{right:calc(var(--ag-icon-size)/2)}.ag-advanced-filter-builder-item-tree-line-vertical:before{top:0;width:calc(var(--ag-advanced-filter-builder-indent-size) - var(--ag-icon-size)/2)}.ag-ltr .ag-advanced-filter-builder-item-tree-line-vertical:before{border-left:1px solid var(--ag-border-color);left:calc(var(--ag-icon-size)/2)}.ag-rtl .ag-advanced-filter-builder-item-tree-line-vertical:before{border-right:1px solid var(--ag-border-color);right:calc(var(--ag-icon-size)/2)}.ag-advanced-filter-builder-item-tree-line-vertical-top:before{height:50%;top:0;width:calc(var(--ag-advanced-filter-builder-indent-size) - var(--ag-icon-size)/2)}.ag-ltr .ag-advanced-filter-builder-item-tree-line-vertical-top:before{border-left:1px solid var(--ag-border-color);left:calc(var(--ag-icon-size)/2)}.ag-rtl .ag-advanced-filter-builder-item-tree-line-vertical-top:before{border-right:1px solid var(--ag-border-color);right:calc(var(--ag-icon-size)/2)}.ag-advanced-filter-builder-item-tree-line-vertical-bottom:before{height:calc(50% - var(--ag-icon-size)*1.5/2);top:calc(50% + var(--ag-icon-size)*1.5/2);width:calc(var(--ag-icon-size)/2)}.ag-ltr .ag-advanced-filter-builder-item-tree-line-vertical-bottom:before{border-left:1px solid var(--ag-border-color);left:calc(var(--ag-icon-size)/2)}.ag-rtl .ag-advanced-filter-builder-item-tree-line-vertical-bottom:before{border-right:1px solid var(--ag-border-color);right:calc(var(--ag-icon-size)/2)}.ag-advanced-filter-builder-item-condition{padding-bottom:var(--ag-spacing);padding-top:var(--ag-spacing)}.ag-advanced-filter-builder-item,.ag-advanced-filter-builder-item-buttons,.ag-advanced-filter-builder-item-condition,.ag-advanced-filter-builder-item-tree-lines,.ag-advanced-filter-builder-pill,.ag-advanced-filter-builder-pill-wrapper{align-items:center;display:flex;height:100%}.ag-advanced-filter-builder-pill-wrapper{margin:0 var(--ag-spacing)}.ag-advanced-filter-builder-pill{border-radius:var(--ag-border-radius);min-height:calc(100% - var(--ag-spacing)*3);min-width:calc(var(--ag-spacing)*2);padding:var(--ag-spacing) calc(var(--ag-spacing)*2);position:relative;.ag-advanced-filter-builder-value-number{font-family:monospace;font-weight:700}.ag-advanced-filter-builder-value-empty{color:var(--ag-subtle-text-color)}}.ag-ltr .ag-advanced-filter-builder-pill{.ag-picker-field-display{margin-right:var(--ag-spacing)}}.ag-rtl .ag-advanced-filter-builder-pill{.ag-picker-field-display{margin-left:var(--ag-spacing)}}.ag-advanced-filter-builder-item-button,.ag-advanced-filter-builder-pill{&:focus-visible{shadow:var(--ag-focus-shadow)}}.ag-advanced-filter-builder-pill-display{font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-advanced-filter-builder-join-pill{background-color:var(--ag-advanced-filter-builder-join-pill-color);cursor:pointer}.ag-advanced-filter-builder-column-pill{background-color:var(--ag-advanced-filter-builder-column-pill-color);cursor:pointer}.ag-advanced-filter-builder-option-pill{background-color:var(--ag-advanced-filter-builder-option-pill-color);cursor:pointer}.ag-advanced-filter-builder-value-pill{background-color:var(--ag-advanced-filter-builder-value-pill-color);cursor:text;max-width:140px;.ag-advanced-filter-builder-pill-display{display:block}}.ag-advanced-filter-builder-item-buttons>*{margin:0 calc(var(--ag-spacing)*.5)}.ag-advanced-filter-builder-item-button{color:var(--ag-subtle-text-color);cursor:pointer;position:relative}.ag-advanced-filter-builder-item-button-disabled{cursor:default;opacity:.5}.ag-advanced-filter-builder-virtual-list-container{top:var(--ag-spacing)}.ag-advanced-filter-builder-virtual-list-item{cursor:default;display:flex;height:var(--ag-list-item-height);&:hover{background-color:var(--ag-row-hover-color);.ag-advanced-filter-builder-item-button{opacity:100%}}}.ag-advanced-filter-builder-validation .ag-advanced-filter-builder-invalid,.ag-advanced-filter-builder-virtual-list-item-highlight .ag-advanced-filter-builder-item-button:focus-visible{opacity:100%}.ag-advanced-filter-builder-invalid{color:var(--ag-invalid-color);cursor:default;margin:0 var(--ag-spacing)}.ag-cell-inline-editing{border-radius:var(--ag-border-radius);padding:0;z-index:1;.ag-cell-edit-wrapper,.ag-cell-editor,.ag-cell-editor .ag-wrapper,.ag-cell-editor input,.ag-cell-wrapper{height:100%;line-height:normal;width:100%}}.ag-autocomplete-list-popup,.ag-popup-editor .ag-large-text{background-color:var(--ag-background-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);padding:0}.ag-large-text-input{height:auto;padding:var(--ag-cell-horizontal-padding)}.ag-rtl .ag-large-text-input textarea{resize:none}.ag-checkbox-edit{padding-left:var(--ag-cell-horizontal-padding);padding-right:var(--ag-cell-horizontal-padding)}.ag-chart{display:flex;height:100%;position:relative;width:100%}.ag-chart-components-wrapper{display:flex}.ag-chart-canvas-wrapper,.ag-chart-components-wrapper{flex:1 1 auto;position:relative}.ag-chart-menu{display:flex;flex-direction:column;position:absolute;top:16px}.ag-ltr .ag-chart-menu{right:20px}.ag-rtl .ag-chart-menu{left:20px}.ag-chart-docked-container{min-width:var(--ag-chart-menu-panel-width);position:relative}.ag-chart-menu-hidden~.ag-chart-docked-container{display:none}.ag-chart-tabbed-menu{display:flex;flex-direction:column;height:100%;overflow:hidden;width:100%}.ag-chart-tabbed-menu-header{cursor:default;flex:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-chart-tabbed-menu-body{align-items:stretch;display:flex;flex:1 1 auto;overflow:hidden}.ag-chart-tab{overflow:hidden;overflow-y:auto;width:100%}.ag-chart-settings{overflow-x:hidden}.ag-chart-settings-wrapper{display:flex;flex-direction:column;height:100%;overflow:hidden;position:relative;width:100%}.ag-chart-settings-nav-bar{align-items:center;display:flex;height:30px;padding:0 10px;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:100%}.ag-chart-settings-card-selector{align-items:center;display:flex;flex:1 1 auto;height:100%;justify-content:space-around;padding:0 10px}.ag-chart-settings-card-item{background-color:var(--ag-foreground-color);border-radius:4px;cursor:pointer;height:10px;height:8px;position:relative;width:10px;width:8px;&.ag-not-selected{opacity:.2}&:before{background-color:transparent;content:" ";display:block;height:20px;left:50%;margin-left:-10px;margin-top:-10px;position:absolute;top:50%;width:20px}&.ag-selected{background-color:var(--ag-accent-color)}}.ag-chart-settings-next,.ag-chart-settings-prev{flex:none;position:relative;&:focus-within{border-radius:1px;box-shadow:var(--ag-focus-shadow)}}.ag-chart-settings-next-button,.ag-chart-settings-prev-button{cursor:pointer;height:100%;left:0;opacity:0;position:absolute;top:0;width:100%}.ag-chart-settings-mini-charts-container{flex:1 1 auto;overflow-x:hidden;overflow-y:auto;position:relative}.ag-chart-settings-mini-wrapper{display:flex;flex-direction:column;left:0;min-height:100%;overflow:hidden;position:absolute;top:0;width:100%;&.ag-animating{transition:left .3s;transition-timing-function:ease-in-out}}.ag-chart-mini-thumbnail{cursor:pointer}.ag-chart-mini-thumbnail-canvas{display:block}.ag-chart-advanced-settings-wrapper,.ag-chart-data-wrapper,.ag-chart-format-wrapper{display:flex;flex-direction:column;padding-bottom:16px;position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-chart-advanced-settings-wrapper,.ag-chart-data-wrapper{height:100%;overflow-y:auto}.ag-chart-advanced-settings{background-color:var(--ag-chrome-background-color)}.ag-chart-advanced-settings,.ag-chart-advanced-settings-wrapper{width:100%}.ag-chart-advanced-settings-wrapper{padding-bottom:0}.ag-chart-advanced-settings-section,.ag-chart-data-section,.ag-chart-format-section{display:flex;margin:0}.ag-chart-advanced-settings-section{border-bottom:1px solid var(--ag-border-color)}.ag-chart-empty-text{align-items:center;background-color:var(--ag-background-color);display:flex;height:100%;justify-content:center;top:0;width:100%}.ag-chart .ag-chart-menu{display:none}.ag-chart-menu-hidden:hover .ag-chart-menu{display:block}.ag-chart{.ag-chart-menu-wrapper{.ag-chart-menu{display:flex;flex-direction:row;gap:20px;top:8px;width:auto}}}.ag-ltr .ag-chart{.ag-chart-menu-wrapper{.ag-chart-menu{justify-content:right;right:calc(var(--ag-cell-horizontal-padding) + var(--ag-spacing) - 4px)}}}.ag-rtl .ag-chart{.ag-chart-menu-wrapper{.ag-chart-menu{justify-content:left;left:calc(var(--ag-cell-horizontal-padding) + var(--ag-spacing) - 4px)}}}.ag-charts-font-size-color{align-self:stretch;display:flex;justify-content:space-between}.ag-charts-data-group-item{position:relative}.ag-charts-data-group-item:not(:last-child){margin-bottom:var(--ag-spacing)}.ag-chart-menu{background:var(--ag-background-color);border-radius:var(--ag-border-radius)}.ag-chart-menu-icon{border-radius:var(--ag-border-radius);cursor:pointer;margin:2px 0;opacity:.5;opacity:.8;&:hover{opacity:1}}.ag-chart-menu-toolbar-button{background-color:unset;border:0;border-radius:1px;padding:0 2px}.ag-chart-mini-thumbnail{border:1px solid var(--ag-border-color);border-radius:5px;&.ag-selected{border-color:var(--ag-accent-color);border-width:2px}&:focus-visible{border-color:var(--ag-accent-color);box-shadow:var(--ag-focus-shadow)}}.ag-chart-data-column-drag-handle{margin-left:var(--ag-spacing)}.ag-charts-data-group-title-bar,.ag-charts-format-top-level-group-title-bar,.ag-charts-settings-group-title-bar{position:relative}.ag-charts-advanced-settings-top-level-group-title-bar{background-color:unset;position:relative}.ag-charts-advanced-settings-top-level-group-title-bar:focus-visible,.ag-charts-data-group-title-bar:focus-visible,.ag-charts-format-top-level-group-title-bar:focus-visible,.ag-charts-settings-group-title-bar:focus-visible{box-shadow:inset var(--ag-focus-shadow)}.ag-charts-data-group-container{padding:calc(var(--ag-widget-container-vertical-padding)*.5) var(--ag-widget-container-horizontal-padding);.ag-charts-data-group-item:not(.ag-charts-format-sub-level-group):not(.ag-pill-select):not(.ag-select){height:var(--ag-list-item-height)}.ag-charts-data-group-item.ag-picker-field{margin-top:var(--ag-spacing)}}.ag-charts-advanced-settings-top-level-group-container,.ag-charts-format-top-level-group-container{margin-left:calc(var(--ag-spacing)*2);padding:var(--ag-spacing)}.ag-charts-advanced-settings-top-level-group-item,.ag-charts-format-top-level-group-item{margin:var(--ag-spacing) 0}.ag-charts-format-sub-level-group-container{display:flex;flex-direction:column;gap:var(--ag-widget-vertical-spacing);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}.ag-charts-settings-group-container{display:grid;grid-template-columns:60px 1fr 60px 1fr 60px;padding:var(--ag-spacing);row-gap:8px;.ag-chart-mini-thumbnail:nth-child(3n+1){grid-column:1}.ag-chart-mini-thumbnail:nth-child(3n+2){grid-column:3}.ag-chart-mini-thumbnail:nth-child(3n+3){grid-column:5}}.ag-chart-data-section,.ag-chart-format-section{display:flex;margin:0}.ag-chart-menu-panel{background-color:var(--ag-chrome-background-color)}.ag-ltr .ag-chart-menu-panel{border-left:1px solid var(--ag-border-color)}.ag-rtl .ag-chart-menu-panel{border-right:1px solid var(--ag-border-color)}.ag-chart-tabbed-menu-body{position:relative;&:after{background:linear-gradient(var(--ag-background-color),transparent);content:"";display:block;height:16px;left:0;position:absolute;right:0;top:0}}.ag-charts-data-group-title-bar,.ag-charts-format-top-level-group-title-bar,.ag-charts-settings-group-container,.ag-charts-settings-group-title-bar{border-top:none;font-weight:500;padding:0 calc(var(--ag-spacing)*1.5)}.ag-chart-settings-nav-bar{border-top:1px solid var(--ag-border-color)}.ag-charts-format-sub-level-group-title-bar{background:none;font-weight:500}.ag-chart-data-section,.ag-chart-format-section{.ag-label:not(.ag-group-title-bar){color:var(--ag-chart-menu-label-color)}.ag-label-align-top .ag-label{margin-bottom:var(--ag-widget-vertical-spacing);margin-top:calc(var(--ag-widget-vertical-spacing)*.5)}.ag-slider.ag-label-align-top .ag-label{margin-bottom:0}& label{display:inline-block}}.ag-chart-data-wrapper,.ag-chart-format-wrapper,.ag-charts-data-group-container,.ag-charts-data-group-title-bar,.ag-charts-format-sub-level-group,.ag-charts-format-sub-level-group-container,.ag-charts-format-sub-level-group-container>*,.ag-charts-format-sub-level-group-item:last-child,.ag-charts-format-sub-level-group-title-bar,.ag-charts-format-top-level-group,.ag-charts-format-top-level-group .ag-charts-format-top-level-group-container,.ag-charts-format-top-level-group-item,.ag-charts-format-top-level-group-title-bar,.ag-charts-settings-group-container,.ag-charts-settings-group-title-bar{margin:0;padding:0}.ag-charts-data-group,.ag-charts-format-top-level-group{border-top:1px solid var(--ag-border-color)}.ag-charts-data-group-title-bar,.ag-charts-format-top-level-group-title-bar,.ag-charts-settings-group-title-bar{padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}.ag-charts-data-group .ag-charts-data-group-container,.ag-charts-format-top-level-group .ag-charts-format-top-level-group-container,.ag-charts-settings-group .ag-charts-settings-group-container{padding:0 var(--ag-widget-container-horizontal-padding)}.ag-charts-format-sub-level-group-title-bar{padding:var(--ag-widget-vertical-spacing) 0}.ag-charts-format-sub-level-group-container{padding-bottom:var(--ag-widget-container-vertical-padding);padding-top:var(--ag-widget-vertical-spacing)}.ag-charts-format-sub-level-group-container>*,.ag-charts-format-sub-level-no-header-group-container>*,.ag-charts-format-top-level-group-container>*{margin-bottom:var(--ag-widget-vertical-spacing)}.ag-chart-advanced-settings-section,.ag-chart-settings-mini-wrapper,.ag-charts-data-group-item{padding-bottom:var(--ag-widget-container-vertical-padding)}.ag-chart-advanced-settings-section{padding-top:var(--ag-widget-container-vertical-padding)}.ag-charts-advanced-settings-top-level-group{.ag-charts-advanced-settings-top-level-group-container,.ag-charts-advanced-settings-top-level-group-title-bar{padding:0 var(--ag-widget-container-horizontal-padding)}}.ag-charts-advanced-settings-top-level-group-container{margin:0}.ag-charts-advanced-settings-top-level-group-item{margin-bottom:0;margin-top:calc(var(--ag-widget-vertical-spacing)*2)}.ag-chart-menu{--ag-icon-size:20px;background-color:color-mix(in srgb,transparent,var(--ag-background-color) 30%);padding:4px 2px}.ag-chart-settings-card-item.ag-not-selected:hover{opacity:.35}.ag-column-drop{align-items:center;display:inline-flex;overflow:auto;position:relative;width:100%}.ag-column-drop-cell,.ag-column-drop-list{align-items:center;display:flex}.ag-column-drop-cell{gap:var(--ag-spacing);position:relative}.ag-column-drop-cell-text{flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-column-drop-vertical{align-items:stretch;display:flex;flex-direction:column;overflow:hidden}.ag-column-drop-vertical-title-bar{align-items:center;display:flex;flex:none}.ag-column-drop-vertical-list{align-items:stretch;flex-direction:column;flex-grow:1;overflow-x:auto;position:relative;>*{flex:none}}.ag-column-drop-empty .ag-column-drop-vertical-list{overflow:hidden}.ag-column-drop-vertical-empty-message{display:block}.ag-column-drop.ag-column-drop-horizontal{overflow:hidden;white-space:nowrap}.ag-column-drop-cell-button{cursor:pointer}.ag-column-drop-wrapper{display:flex}.ag-column-drop-horizontal-half-width{width:50%!important}.ag-column-drop-cell{background:var(--ag-column-drop-cell-background-color);border:var(--ag-column-drop-cell-border);border-radius:500px;padding:calc(var(--ag-spacing)*.5);&:focus-visible{box-shadow:var(--ag-focus-shadow)}}.ag-ltr .ag-column-drop-cell{padding-left:calc(var(--ag-spacing)*.75)}.ag-rtl .ag-column-drop-cell{padding-right:calc(var(--ag-spacing)*.75)}.ag-column-drop-cell-button{min-width:calc(var(--ag-spacing)*4)}.ag-column-drop-cell-ghost{opacity:.5}.ag-column-drop-horizontal{gap:var(--ag-cell-widget-spacing);height:var(--ag-header-height)}.ag-ltr .ag-column-drop-horizontal{padding-left:var(--ag-cell-horizontal-padding)}.ag-rtl .ag-column-drop-horizontal{padding-right:var(--ag-cell-horizontal-padding)}.ag-column-drop-horizontal-list{gap:var(--ag-cell-widget-spacing)}.ag-column-drop-vertical-list{padding-bottom:var(--ag-spacing);padding-left:var(--ag-spacing);padding-right:var(--ag-spacing)}.ag-column-drop-vertical-cell{margin-top:var(--ag-spacing)}.ag-ltr .ag-column-drop-vertical-icon{margin-right:var(--ag-widget-horizontal-spacing)}.ag-rtl .ag-column-drop-vertical-icon{margin-left:var(--ag-widget-horizontal-spacing)}.ag-column-drop-vertical-empty-message{bottom:0;left:0;margin-top:var(--ag-spacing);overflow:hidden;position:absolute;right:0;top:0}.ag-select-agg-func-popup{background:var(--ag-background-color);border:1px solid var(--ag-border-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);height:calc(var(--ag-spacing)*5*3.5);padding:0;position:absolute}.ag-select-agg-func-virtual-list-item{cursor:default;&:hover{background-color:var(--ag-selected-row-background-color)}&:focus-visible{shadow:var(--ag-focus-shadow)}}.ag-ltr .ag-select-agg-func-virtual-list-item{padding-left:calc(var(--ag-spacing)*2)}.ag-rtl .ag-select-agg-func-virtual-list-item{padding-right:calc(var(--ag-spacing)*2)}.ag-sort-indicator-container{display:contents}.ag-ltr .ag-sort-indicator-icon{padding-left:var(--ag-spacing)}.ag-rtl .ag-sort-indicator-icon{padding-right:var(--ag-spacing)}.ag-column-drop-horizontal{background-color:var(--ag-header-background-color);border-bottom:var(--ag-header-row-border)}.ag-ltr .ag-column-drop-horizontal-half-width:not(:last-child){border-right:var(--ag-column-border)}.ag-rtl .ag-column-drop-horizontal-half-width:not(:last-child){border-left:var(--ag-column-border)}.ag-column-drop-cell-button{min-width:0;opacity:.75;&:hover{opacity:1}}.ag-column-drop-vertical{min-height:75px}.ag-column-drop-vertical-title-bar{padding:var(--ag-widget-container-vertical-padding) calc(var(--ag-spacing)*2) 0}.ag-column-drop-vertical-empty-message{align-items:center;border:1px dashed;border-color:var(--ag-border-color);display:flex;justify-content:center;margin:calc(var(--ag-spacing)*1.5) calc(var(--ag-spacing)*2);padding:calc(var(--ag-spacing)*2)}.ag-column-select{display:flex;flex:3 1 0px;flex-direction:column;overflow:hidden;position:relative}.ag-column-select-header{flex:none;height:var(--ag-header-height);padding-left:var(--ag-widget-container-horizontal-padding);padding-right:var(--ag-widget-container-horizontal-padding)}.ag-column-select-column,.ag-column-select-column-group,.ag-column-select-header{align-items:center;display:flex;gap:var(--ag-widget-horizontal-spacing);position:relative}.ag-column-select-column,.ag-column-select-column-group{height:100%}.ag-column-select-virtual-list-item:focus-visible{box-shadow:inset var(--ag-focus-shadow)}.ag-column-select-header-icon{border-radius:var(--ag-border-radius);cursor:pointer;height:var(--ag-icon-size);position:relative;width:var(--ag-icon-size);&:focus-visible{box-shadow:var(--ag-focus-shadow)}}.ag-column-select-header-filter-wrapper{flex:1 1 auto}.ag-column-select-header-filter{width:100%}.ag-column-select-list{flex:1 1 0px;overflow:hidden}.ag-ltr .ag-column-select-column,.ag-ltr .ag-column-select-column-group{padding-left:calc(var(--ag-indentation-level)*var(--ag-column-select-indent-size))}.ag-rtl .ag-column-select-column,.ag-rtl .ag-column-select-column-group{padding-right:calc(var(--ag-indentation-level)*var(--ag-column-select-indent-size))}.ag-ltr .ag-column-select-add-group-indent{margin-left:calc(var(--ag-icon-size) + var(--ag-spacing)*1.5)}.ag-rtl .ag-column-select-add-group-indent{margin-right:calc(var(--ag-icon-size) + var(--ag-spacing)*1.5)}.ag-column-select-column,.ag-column-select-column-group{&:not(:last-child){margin-bottom:var(--ag-widget-vertical-spacing)}}.ag-column-select-column-group-readonly,.ag-column-select-column-readonly{opacity:.5;pointer-events:none}.ag-column-select-virtual-list-viewport{padding:calc(var(--ag-widget-container-vertical-padding)*.5) 0}.ag-column-select-virtual-list-item{padding:0 var(--ag-widget-container-horizontal-padding)}.ag-column-select-column-label{flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-column-select-checkbox{display:flex}.ag-set-filter{--ag-indentation-level:0}.ag-set-filter-item{align-items:center;display:flex;height:100%}.ag-set-filter-item-checkbox{display:flex;height:100%;width:100%}.ag-set-filter-group-icons{display:block;>*{cursor:pointer}}.ag-filter-body-wrapper{display:flex;flex-direction:column}.ag-filter-filter{flex:1 1 0px}.ag-filter-condition{display:flex;justify-content:center}.ag-floating-filter-body{display:flex;flex:1 1 auto;height:100%;position:relative}.ag-floating-filter-full-body{align-items:center;display:flex;flex:1 1 auto;height:100%;overflow:hidden;width:100%}.ag-floating-filter-full-body>div{flex:1 1 auto}.ag-floating-filter-input{align-items:center;display:flex;width:100%;>*{flex:1 1 auto}}.ag-floating-filter-button{display:flex;flex:none}.ag-set-floating-filter-input input[disabled]{pointer-events:none}.ag-floating-filter-button-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:none;height:var(--ag-icon-size);width:var(--ag-icon-size)}.ag-filter-loading{height:100%;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);position:absolute;width:100%;z-index:1}.ag-column-panel{display:flex;flex:1 1 auto;flex-direction:column;overflow:hidden}.ag-pivot-mode-panel{display:flex;height:var(--ag-header-height)}.ag-pivot-mode-select{align-items:center;display:flex}.ag-ltr .ag-pivot-mode-select{margin-left:var(--ag-widget-container-horizontal-padding)}.ag-rtl .ag-pivot-mode-select{margin-right:var(--ag-widget-container-horizontal-padding)}.ag-column-panel-column-select{border-bottom:var(--ag-tool-panel-separator-border);border-top:var(--ag-tool-panel-separator-border)}:where(.ag-column-panel) .ag-column-drop-vertical{flex:1 1 0px;min-height:50px;&:where(:not(.ag-last-column-drop)){border-bottom:var(--ag-tool-panel-separator-border)}}.ag-dnd-ghost{align-items:center;background-color:var(--ag-drag-and-drop-image-background-color);border:var(--ag-drag-and-drop-image-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-drag-and-drop-image-shadow);color:var(--ag-text-color);cursor:move;font-weight:500;gap:var(--ag-cell-widget-spacing);height:var(--ag-header-height);max-width:200px;padding-left:var(--ag-cell-horizontal-padding);padding-right:var(--ag-cell-horizontal-padding);text-overflow:ellipsis;transform:translateY(calc(var(--ag-spacing)*2))}.ag-dnd-ghost,.ag-header{display:flex;overflow:hidden;white-space:nowrap}.ag-header{background-color:var(--ag-header-background-color);border-bottom:var(--ag-header-row-border);color:var(--ag-header-text-color);font-family:var(--ag-header-font-family);font-size:var(--ag-header-font-size);font-weight:var(--ag-header-font-weight);width:100%}.ag-header-row{height:var(--ag-header-height);position:absolute}.ag-header-row:not(:first-child){.ag-header-cell:not(.ag-header-span-height.ag-header-span-total),.ag-header-group-cell.ag-header-group-cell-with-group{border-top:var(--ag-header-row-border)}}.ag-header-row:not(.ag-header-row-column-group){overflow:hidden}.ag-header.ag-header-allow-overflow .ag-header-row{overflow:visible}.ag-header-cell,.ag-header-group-cell{align-items:center;display:inline-flex;gap:var(--ag-cell-widget-spacing);height:100%;overflow:hidden;padding:0 var(--ag-cell-horizontal-padding);position:absolute}@property --ag-internal-moving-color{syntax:"<color>";inherits:false;initial-value:transparent}@property --ag-internal-hover-color{syntax:"<color>";inherits:false;initial-value:transparent}.ag-header-cell:not(.ag-floating-filter),.ag-header-group-cell{&:before{background-image:linear-gradient(var(--ag-internal-hover-color),var(--ag-internal-hover-color)),linear-gradient(var(--ag-internal-moving-color),var(--ag-internal-moving-color));content:"";inset:0;position:absolute;--ag-internal-moving-color:transparent;--ag-internal-hover-color:transparent;transition:--ag-internal-moving-color var(--ag-header-cell-background-transition-duration),--ag-internal-hover-color var(--ag-header-cell-background-transition-duration)}&:hover:before{--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}&.ag-header-cell-moving:before{--ag-internal-moving-color:var(--ag-header-cell-moving-background-color);--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}}:where(.ag-header-cell:not(.ag-floating-filter) *,.ag-header-group-cell *){position:relative;z-index:1}.ag-header-cell-filter-button,.ag-header-cell.ag-header-active .ag-header-cell-menu-button{opacity:1}.ag-header-cell-menu-button:not(.ag-header-menu-always-show){opacity:0;transition:opacity .2s}.ag-header-cell-label,.ag-header-group-cell-label{align-items:center;align-self:stretch;display:flex;flex:1 1 auto;gap:var(--ag-spacing);padding:5px 0}.ag-header-cell-label{overflow:hidden;text-overflow:ellipsis}.ag-header-group-cell-label.ag-sticky-label{flex:none;max-width:100%;position:sticky}.ag-ltr .ag-header-group-cell-label.ag-sticky-label{left:var(--ag-cell-horizontal-padding)}.ag-rtl .ag-header-group-cell-label.ag-sticky-label{right:var(--ag-cell-horizontal-padding)}.ag-header-cell-text,.ag-header-group-text{overflow:hidden;text-overflow:ellipsis}.ag-header-cell-text{word-break:break-word}.ag-header-group-cell .ag-header-cell-comp-wrapper{display:flex}.ag-header-cell:not(.ag-header-cell-auto-height) .ag-header-cell-comp-wrapper{align-items:center;display:flex;height:100%}.ag-header-cell-comp-wrapper{width:100%}.ag-header-cell-wrap-text .ag-header-cell-comp-wrapper{white-space:normal}.ag-right-aligned-header .ag-header-cell-label{flex-direction:row-reverse}.ag-floating-filter-button-button,.ag-header-cell-filter-button,.ag-header-cell-menu-button,.ag-header-cell-sortable .ag-header-cell-label,.ag-header-expand-icon,.ag-panel-title-bar-button{cursor:pointer}.ag-advanced-filter-header-cell,.ag-header-cell,.ag-header-group-cell{&:focus-visible{box-shadow:inset var(--ag-focus-shadow)}}.ag-header-cell:after,.ag-header-group-cell:not(.ag-header-span-height.ag-header-group-cell-no-group):after{content:"";height:var(--ag-header-column-border-height);position:absolute;top:calc(50% - var(--ag-header-column-border-height)*.5);z-index:1}.ag-ltr .ag-header-cell:after,.ag-ltr .ag-header-group-cell:not(.ag-header-span-height.ag-header-group-cell-no-group):after{border-right:var(--ag-header-column-border);right:0}.ag-rtl .ag-header-cell:after,.ag-rtl .ag-header-group-cell:not(.ag-header-span-height.ag-header-group-cell-no-group):after{border-left:var(--ag-header-column-border);left:0}.ag-header-highlight-after:after,.ag-header-highlight-before:after{background-color:var(--ag-accent-color);content:"";height:100%;position:absolute;width:1px}.ag-ltr .ag-header-highlight-before:after{left:0}.ag-ltr .ag-header-highlight-after:after,.ag-rtl .ag-header-highlight-before:after{right:0}.ag-rtl .ag-header-highlight-after:after{left:0}.ag-ltr .ag-pinned-left-header .ag-header-highlight-after:after{right:1px}.ag-rtl .ag-pinned-left-header .ag-header-highlight-after:after{left:1px}.ag-header-cell-resize{align-items:center;cursor:ew-resize;display:flex;height:100%;position:absolute;top:0;width:8px;z-index:2;&:after{background-color:var(--ag-header-column-resize-handle-color);content:"";height:var(--ag-header-column-resize-handle-height);position:absolute;top:calc(50% - var(--ag-header-column-resize-handle-height)*.5);width:var(--ag-header-column-resize-handle-width);z-index:1}}.ag-ltr .ag-header-cell-resize{right:-3px;&:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}}.ag-rtl .ag-header-cell-resize{left:-3px;&:after{right:calc(50% - var(--ag-header-column-resize-handle-width))}}.ag-header-cell.ag-header-span-height .ag-header-cell-resize:after{height:calc(100% - var(--ag-spacing)*4);top:calc(var(--ag-spacing)*2)}.ag-header-group-cell-no-group.ag-header-span-height .ag-header-cell-resize{display:none}.ag-menu{background-color:var(--ag-menu-background-color);border:var(--ag-menu-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-menu-shadow);color:var(--ag-menu-text-color);max-height:100%;min-width:180px;overflow-y:auto;position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-menu-list{cursor:default;display:table;padding:var(--ag-spacing) 0;width:100%}.ag-menu-option,.ag-menu-separator{display:table-row}.ag-menu-option-part,.ag-menu-separator-part{display:table-cell;vertical-align:middle}.ag-menu-option-text{white-space:nowrap}.ag-menu-option-custom{display:contents}.ag-compact-menu-option{display:flex;flex-wrap:nowrap;width:100%}.ag-compact-menu-option-text{flex:1 1 auto;white-space:nowrap}.ag-menu-separator{height:calc(var(--ag-spacing)*2 + 1px)}.ag-menu-separator-part:after{border-top:1px solid var(--ag-menu-separator-color);content:"";display:block}.ag-compact-menu-option-active,.ag-menu-option-active{background-color:var(--ag-row-hover-color)}.ag-compact-menu-option-part,.ag-menu-option-part{line-height:var(--ag-icon-size);padding:calc(var(--ag-spacing) + 2px) 0}.ag-compact-menu-option-disabled,.ag-menu-option-disabled{cursor:not-allowed;opacity:.5}.ag-compact-menu-option-icon,.ag-menu-option-icon{width:var(--ag-icon-size)}.ag-ltr .ag-compact-menu-option-icon,.ag-ltr .ag-menu-option-icon{padding-left:calc(var(--ag-spacing)*2)}.ag-rtl .ag-compact-menu-option-icon,.ag-rtl .ag-menu-option-icon{padding-right:calc(var(--ag-spacing)*2)}.ag-compact-menu-option-text,.ag-menu-option-text{padding-left:calc(var(--ag-spacing)*2);padding-right:calc(var(--ag-spacing)*2)}.ag-ltr .ag-compact-menu-option-shortcut,.ag-ltr .ag-menu-option-shortcut{padding-right:var(--ag-spacing)}.ag-rtl .ag-compact-menu-option-shortcut,.ag-rtl .ag-menu-option-shortcut{padding-left:var(--ag-spacing)}.ag-ltr .ag-compact-menu-option-popup-pointer,.ag-ltr .ag-menu-option-popup-pointer{padding-right:var(--ag-spacing)}.ag-rtl .ag-compact-menu-option-popup-pointer,.ag-rtl .ag-menu-option-popup-pointer{padding-left:var(--ag-spacing)}.ag-menu-column-select-wrapper{height:265px;overflow:auto;.ag-column-select{height:100%}}.ag-menu.ag-tabs{min-width:290px}.ag-filter-separator{border-top:1px solid var(--menu-separator-color)}.ag-filter-select .ag-picker-field-wrapper{width:0}.ag-filter-condition-operator{height:17px}.ag-ltr .ag-filter-condition-operator-or{margin-left:calc(var(--ag-spacing)*2)}.ag-rtl .ag-filter-condition-operator-or{margin-right:calc(var(--ag-spacing)*2)}.ag-set-filter-select-all{padding-top:var(--ag-widget-container-vertical-padding)}.ag-filter-no-matches,.ag-set-filter-list{height:calc(var(--ag-list-item-height)*6)}.ag-filter-no-matches{padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}.ag-set-filter-tree-list{height:calc(var(--ag-list-item-height)*10)}.ag-set-filter-filter{margin-left:var(--ag-widget-container-horizontal-padding);margin-right:var(--ag-widget-container-horizontal-padding);margin-top:var(--ag-widget-container-vertical-padding)}.ag-filter-to{margin-top:var(--ag-widget-vertical-spacing)}.ag-mini-filter{margin:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}.ag-ltr .ag-set-filter-item{padding-left:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}.ag-rtl .ag-set-filter-item{padding-right:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}.ag-ltr .ag-set-filter-add-group-indent{margin-left:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}.ag-rtl .ag-set-filter-add-group-indent{margin-right:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}.ag-ltr .ag-set-filter-group-icons{margin-right:var(--ag-widget-container-horizontal-padding)}.ag-rtl .ag-set-filter-group-icons{margin-left:var(--ag-widget-container-horizontal-padding)}.ag-filter-menu .ag-set-filter-list{min-width:200px}.ag-filter-virtual-list-item:focus-visible{box-shadow:inset var(--ag-focus-shadow)}.ag-filter-apply-panel{display:flex;justify-content:flex-end;overflow:hidden;padding:var(--ag-widget-vertical-spacing) var(--ag-widget-container-horizontal-padding) var(--ag-widget-container-vertical-padding)}.ag-filter-apply-panel-button{line-height:1.5}.ag-ltr .ag-filter-apply-panel-button{margin-left:calc(var(--ag-spacing)*2)}.ag-rtl .ag-filter-apply-panel-button{margin-right:calc(var(--ag-spacing)*2)}.ag-simple-filter-body-wrapper{display:flex;flex-direction:column;min-height:calc(var(--ag-list-item-height) + var(--ag-widget-container-vertical-padding) + var(--ag-widget-vertical-spacing));overflow-y:auto;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);padding-bottom:calc(var(--ag-widget-container-vertical-padding) - var(--ag-widget-vertical-spacing));&>*{margin-bottom:var(--ag-widget-vertical-spacing)}.ag-resizer-wrapper{margin:0}}.ag-multi-filter-menu-item{margin:var(--ag-spacing) 0}.ag-multi-filter-group-title-bar{background-color:transparent;color:var(--ag-header-text-color);font-weight:500;padding:calc(var(--ag-spacing)*1.5) var(--ag-spacing);&:focus-visible{box-shadow:var(--ag-focus-shadow)}}.ag-group-filter-field-select-wrapper{display:flex;flex-direction:column;gap:var(--ag-widget-vertical-spacing);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}.ag-menu-option{cursor:pointer;font-weight:500}.ag-ltr .ag-menu-option-popup-pointer .ag-icon{text-align:right}.ag-rtl .ag-menu-option-popup-pointer .ag-icon{text-align:left}.ag-panel{background-color:var(--ag-panel-background-color);display:flex;flex-direction:column;overflow:hidden;position:relative}.ag-dialog{border:var(--ag-dialog-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dialog-shadow);position:absolute}.ag-panel-title-bar{align-items:center;background-color:var(--ag-panel-title-bar-background-color);border-bottom:var(--ag-panel-title-bar-border);color:var(--ag-header-text-color);cursor:default;display:flex;flex:none;height:var(--ag-header-height);padding:var(--ag-spacing) var(--ag-cell-horizontal-padding)}.ag-ltr .ag-panel-title-bar-button{margin-left:calc(var(--ag-spacing)*2);margin-right:var(--ag-spacing)}.ag-rtl .ag-panel-title-bar-button{margin-left:var(--ag-spacing);margin-right:calc(var(--ag-spacing)*2)}.ag-panel-title-bar-title{color:var(--ag-header-text-color);flex:1 1 auto;font-weight:500}.ag-panel-title-bar-buttons{display:flex}.ag-panel-title-bar-button{cursor:pointer}.ag-panel-content-wrapper{display:flex;flex:1 1 auto;overflow:hidden;position:relative}.ag-resizer{pointer-events:none;position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;z-index:1;&.ag-resizer-topLeft{height:5px;left:0;top:0;width:5px}&.ag-resizer-top{cursor:ns-resize;height:5px;left:5px;right:5px;top:0}&.ag-resizer-topRight{height:5px;right:0;top:0;width:5px}&.ag-resizer-right{bottom:5px;cursor:ew-resize;right:0;top:5px;width:5px}&.ag-resizer-bottomRight{bottom:0;height:5px;right:0;width:5px}&.ag-resizer-bottom{bottom:0;cursor:ns-resize;height:5px;left:5px;right:5px}&.ag-resizer-bottomLeft{bottom:0;height:5px;left:0;width:5px}&.ag-resizer-left{bottom:5px;cursor:ew-resize;left:0;top:5px;width:5px}}.ag-ltr .ag-resizer{&.ag-resizer-topLeft{cursor:nwse-resize}&.ag-resizer-topRight{cursor:nesw-resize}&.ag-resizer-bottomRight{cursor:nwse-resize}&.ag-resizer-bottomLeft{cursor:nesw-resize}}.ag-rtl .ag-resizer{&.ag-resizer-topLeft{cursor:nesw-resize}&.ag-resizer-topRight{cursor:nwse-resize}&.ag-resizer-bottomRight{cursor:nesw-resize}&.ag-resizer-bottomLeft{cursor:nwse-resize}}.ag-dragging-fill-handle .ag-dialog,.ag-dragging-range-handle .ag-dialog{opacity:.7;pointer-events:none}.ag-layout-print{&.ag-body{display:block;height:unset}&.ag-root-wrapper{display:inline-block}.ag-body-horizontal-scroll,.ag-body-vertical-scroll{display:none}&.ag-force-vertical-scroll{overflow-y:visible!important}}@media print{.ag-root-wrapper.ag-layout-print{display:table;.ag-body-horizontal-scroll-viewport,.ag-body-viewport,.ag-center-cols-container,.ag-center-cols-viewport,.ag-root,.ag-root-wrapper-body,.ag-virtual-list-viewport{display:block!important;height:auto!important;overflow:hidden!important}.ag-cell,.ag-row{-moz-column-break-inside:avoid;break-inside:avoid}}}.ag-select{align-items:center;display:flex;flex-direction:row;.ag-picker-field-wrapper{cursor:default}&.ag-disabled .ag-picker-field-wrapper:focus{box-shadow:none}&:not(.ag-cell-editor,.ag-label-align-top){min-height:var(--ag-list-item-height)}.ag-picker-field-display{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-picker-field-icon{align-items:center;display:flex}&.ag-disabled{opacity:.5}}.ag-ltr .ag-select{.ag-picker-field-wrapper{padding-left:calc(var(--ag-cell-horizontal-padding)/2);padding-right:var(--ag-spacing)}}.ag-rtl .ag-select{.ag-picker-field-wrapper{padding-left:var(--ag-spacing);padding-right:calc(var(--ag-cell-horizontal-padding)/2)}}.ag-rich-select{cursor:default;height:100%}.ag-rich-select-value{align-items:center;background-color:var(--ag-input-background-color);display:flex;height:100%;padding:var(--ag-spacing);.ag-picker-field-display{overflow:hidden;text-overflow:ellipsis;&.ag-display-as-placeholder{opacity:.5}}}.ag-rich-select-list{background-color:var(--ag-input-background-color);border:var(--ag-input-border);border-radius:var(--ag-input-border-radius);box-shadow:var(--ag-dropdown-shadow);height:auto;position:relative;width:100%;.ag-loading-text{padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}}.ag-rich-select-row{align-items:center;display:flex;flex:1 1 auto;height:100%;overflow:hidden;padding:0 var(--ag-spacing);white-space:nowrap}.ag-rich-select-row-selected{background-color:var(--ag-selected-row-background-color)}.ag-rich-select-row-highlighted,.ag-rich-select-row:hover{background-image:linear-gradient(var(--ag-row-hover-color),var(--ag-row-hover-color))}.ag-rich-select-row-text-highlight{font-weight:700}.ag-rich-select-field-input{flex:1 1 auto;.ag-input-field-input{border:none!important;box-shadow:none!important;padding:0!important;text-overflow:ellipsis;&::-moz-placeholder{opacity:.8}&::placeholder{opacity:.8}}}.ag-ltr .ag-rich-select-field-input{left:var(--ag-spacing)}.ag-rtl .ag-rich-select-field-input{right:var(--ag-spacing)}.ag-popup-editor .ag-rich-select-value{height:var(--ag-row-height);min-width:200px}.ag-rich-select-virtual-list-item{cursor:default;height:var(--ag-list-item-height)}.ag-pill-container{display:flex;flex-wrap:nowrap;gap:.25rem}.ag-pill{align-items:center;background:var(--ag-select-cell-background-color);border:var(--ag-select-cell-border);border-radius:var(--ag-border-radius);display:flex;padding:0 .25rem;white-space:nowrap;&:focus-visible{box-shadow:var(--ag-focus-shadow)}}.ag-pill .ag-pill-button{border:none;padding:0;&:hover{color:var(--ag-accent-color);cursor:pointer}}.ag-ltr .ag-pill .ag-pill-button{margin-left:var(--ag-spacing)}.ag-rtl .ag-pill .ag-pill-button{margin-right:var(--ag-spacing)}ag-grid,ag-grid-angular{display:block}.ag-dnd-ghost,.ag-popup,.ag-root-wrapper{cursor:default;line-height:normal;white-space:normal;-webkit-font-smoothing:antialiased;background-color:var(--ag-background-color);color:var(--ag-text-color);color-scheme:var(--ag-browser-color-scheme);font-family:var(--ag-font-family);font-size:var(--ag-font-size);--ag-indentation-level:0}.ag-root-wrapper{border:var(--ag-wrapper-border);border-radius:var(--ag-wrapper-border-radius);display:flex;flex-direction:column;overflow:hidden;position:relative;&.ag-layout-normal{height:100%}}.ag-root-wrapper-body{display:flex;flex-direction:row;&.ag-layout-normal{flex:1 1 auto;height:0;min-height:0}}.ag-root{display:flex;flex-direction:column;position:relative;&.ag-layout-auto-height,&.ag-layout-normal{flex:1 1 auto;overflow:hidden;width:0}&.ag-layout-normal{height:100%}}.ag-tool-panel-wrapper{cursor:default;display:flex;overflow-x:hidden;overflow-y:auto;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:var(--ag-side-bar-panel-width)}.ag-select-agg-func-item{align-items:center;display:flex;flex:1 1 auto;flex-direction:row;flex-wrap:nowrap;height:100%;overflow:hidden;position:relative;text-overflow:ellipsis;white-space:nowrap;>*{flex:none}}.ag-tool-panel-horizontal-resize{cursor:ew-resize;height:100%;position:absolute;top:0;width:5px;z-index:1}.ag-ltr .ag-side-bar-left .ag-tool-panel-horizontal-resize{right:-3px}.ag-ltr .ag-side-bar-right .ag-tool-panel-horizontal-resize,.ag-rtl .ag-side-bar-left .ag-tool-panel-horizontal-resize{left:-3px}.ag-rtl .ag-side-bar-right .ag-tool-panel-horizontal-resize{right:-3px}.ag-side-bar{background-color:var(--ag-side-bar-background-color);display:flex;flex-direction:row-reverse;position:relative}.ag-side-bar-left{flex-direction:row;order:-1}.ag-side-buttons{position:relative;width:calc(var(--ag-icon-size) + var(--ag-spacing)*2)}.ag-side-button{&.ag-selected{background-color:var(--ag-background-color);border-bottom:1px solid var(--ag-border-color);&:not(:first-of-type){border-top:1px solid var(--ag-border-color)}}}.ag-side-button-button{align-items:center;cursor:pointer;display:flex;flex-direction:column;gap:var(--ag-spacing);padding:calc(var(--ag-spacing)*3) 0;position:relative;white-space:nowrap;width:100%;&:focus{box-shadow:none}}.ag-side-button-button:focus-visible{box-shadow:inset var(--ag-focus-shadow)}.ag-side-button-label{writing-mode:vertical-lr}@media (max-resolution:1.5x){.ag-side-button-label{font-family:"Segoe UI",var(--ag-font-family)}.ag-ltr .ag-side-button-label{transform:rotate(.05deg)}.ag-rtl .ag-side-button-label{transform:rotate(-.05deg)}}.ag-ltr .ag-side-bar-left,.ag-rtl .ag-side-bar-right{border-right:var(--ag-side-panel-border);.ag-tool-panel-wrapper{border-left:var(--ag-side-panel-border)}}.ag-ltr .ag-side-bar-right,.ag-rtl .ag-side-bar-left{border-left:var(--ag-side-panel-border);.ag-tool-panel-wrapper{border-right:var(--ag-side-panel-border)}}.ag-ltr .ag-chart-menu-panel{border-left:var(--ag-side-panel-border)}.ag-rtl .ag-chart-menu-panel{border-right:var(--ag-side-panel-border)}.ag-button{border-radius:0}.ag-standard-button{-moz-appearance:none;appearance:none;-webkit-appearance:none;background-color:var(--ag-background-color);border:var(--ag-input-border);border-radius:var(--ag-border-radius);cursor:pointer;font-family:inherit;padding:var(--ag-spacing) calc(var(--ag-spacing)*2);&:hover{background-color:var(--ag-row-hover-color)}&:active{border-color:var(--ag-accent-color)}&:disabled{background-color:var(--ag-input-disabled-background-color);border:var(--ag-input-disabled-border);color:var(--ag-input-disabled-text-color)}}:where(input[class^=ag-][type=button],button[class^=ag-]):focus-visible{box-shadow:var(--ag-focus-shadow)}.ag-drag-handle{color:var(--ag-drag-handle-color);cursor:grab}.ag-list-item,.ag-virtual-list-item{height:var(--ag-list-item-height)}.ag-virtual-list-item{position:absolute;width:100%}.ag-select-list{background-color:var(--ag-background-color);border:var(--ag-input-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);overflow-x:hidden;overflow-y:auto}.ag-list-item{align-items:center;display:flex;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;&.ag-active-item{background-color:var(--ag-row-hover-color)}}.ag-select-list-item{cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;& span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}.ag-ltr .ag-select-list-item{padding-left:calc(var(--ag-cell-horizontal-padding)/2)}.ag-rtl .ag-select-list-item{padding-right:calc(var(--ag-cell-horizontal-padding)/2)}.ag-list-item-hovered:after{background-color:var(--ag-accent-color);content:"";height:1px;left:0;position:absolute;right:0}.ag-item-highlight-top:after{top:0}.ag-item-highlight-bottom:after{bottom:0}.ag-range-field{align-items:center;display:flex;.ag-input-wrapper{height:100%}}& input[class^=ag-][type=range]{-webkit-appearance:none;background:none;height:100%;overflow:visible;padding:0;width:100%;&::-webkit-slider-runnable-track{background-color:var(--ag-border-color);border-radius:1.5px;height:3px;margin:0;padding:0;width:100%}&::-moz-range-track{background-color:var(--ag-border-color);border-radius:1.5px;height:3px;margin:0;padding:0;width:100%}&::-webkit-slider-thumb{-webkit-appearance:none;background-color:var(--ag-background-color);border:1px solid var(--ag-border-color);border-radius:100%;height:var(--ag-icon-size);margin:0;padding:0;transform:translateY(calc(var(--ag-icon-size)*-.5 + 1.5px));width:var(--ag-icon-size)}&::-moz-ag-range-thumb{-webkit-appearance:none;background-color:var(--ag-background-color);border:1px solid var(--ag-border-color);border-radius:100%;height:var(--ag-icon-size);margin:0;padding:0;transform:translateY(calc(var(--ag-icon-size)*-.5 + 1.5px));width:var(--ag-icon-size)}&:focus{&::-webkit-slider-thumb{border-color:var(--ag-accent-color);box-shadow:var(--ag-focus-shadow)}&::-moz-ag-range-thumb{border-color:var(--ag-accent-color);box-shadow:var(--ag-focus-shadow)}}&:active{&::-webkit-slider-runnable-track{background-color:var(--ag-accent-color)}&::-moz-ag-range-track{background-color:var(--ag-accent-color)}}&:disabled{opacity:.5}}.ag-toggle-button{flex:none;min-width:unset;width:unset}.ag-toggle-button-input-wrapper{background-color:var(--ag-toggle-button-off-background-color);border:solid var(--ag-toggle-button-border-width) var(--ag-toggle-button-off-border-color);border-radius:calc(var(--ag-toggle-button-height)*.5);flex:none;height:var(--ag-toggle-button-height);max-width:var(--ag-toggle-button-width);min-width:var(--ag-toggle-button-width);position:relative;& input{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:100%;opacity:0;width:100%}&:before{background-color:var(--ag-toggle-button-switch-background-color);border:var(--ag-toggle-button-border-width) solid var(--ag-toggle-button-switch-border-color);border-radius:100%;content:"";display:block;height:var(--ag-toggle-button-height);pointer-events:none;position:absolute;top:calc(0px - var(--ag-toggle-button-border-width));width:var(--ag-toggle-button-height)}&.ag-checked{background-color:var(--ag-toggle-button-on-background-color);border-color:var(--ag-toggle-button-on-border-color);&:before{border-color:var(--ag-toggle-button-on-border-color)}}&:focus-within{box-shadow:var(--ag-focus-shadow)}&.ag-disabled{opacity:.5}}.ag-ltr .ag-toggle-button-input-wrapper{&:before{left:calc(0px - var(--ag-toggle-button-border-width));transition:left .1s}&.ag-checked{&:before{left:calc(100% - var(--ag-toggle-button-height) + var(--ag-toggle-button-border-width))}}}.ag-rtl .ag-toggle-button-input-wrapper{&:before{right:calc(0px - var(--ag-toggle-button-border-width));transition:right .1s}&.ag-checked{&:before{right:calc(100% - var(--ag-toggle-button-height) + var(--ag-toggle-button-border-width))}}}.ag-autocomplete{align-items:center;display:flex;width:100%;>*{flex:1 1 auto}}.ag-autocomplete-list-popup{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-autocomplete-list{height:calc(var(--ag-row-height)*6.5);min-width:200px;position:relative;width:100%}.ag-autocomplete-virtual-list-item{cursor:default;display:flex;height:var(--ag-list-item-height);&:focus-visible:after{content:none}&:hover{background-color:var(--ag-row-hover-color)}}.ag-autocomplete-row{align-items:center;display:flex;flex:1 1 auto;overflow:hidden}.ag-autocomplete-row-label{margin:0 var(--ag-widget-container-horizontal-padding);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-autocomplete-row-selected{background-color:var(--ag-selected-row-background-color)}.ag-tooltip{background-color:var(--ag-tooltip-background-color);border:var(--ag-tooltip-border);border-radius:var(--ag-border-radius);color:var(--ag-tooltip-text-color);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);white-space:normal}.ag-tooltip,.ag-tooltip-custom{position:absolute;z-index:99999}.ag-tooltip-custom:not(.ag-tooltip-interactive),.ag-tooltip:not(.ag-tooltip-interactive){pointer-events:none}.ag-tooltip-custom.ag-tooltip-animate,.ag-tooltip.ag-tooltip-animate{transition:opacity 1s;&.ag-tooltip-hiding{opacity:0}}.ag-angle-select{align-items:center;display:flex}.ag-angle-select-wrapper{display:flex}.ag-angle-select-parent-circle{display:block;position:relative}.ag-angle-select-child-circle{position:absolute}.ag-slider-wrapper{display:flex;.ag-input-field{flex:1 1 auto}}.ag-picker-field-display{flex:1 1 auto}.ag-picker-field{align-items:center;display:flex}.ag-picker-field-icon{border:0;cursor:pointer;display:flex;margin:0;padding:0}.ag-color-panel{display:flex;flex-direction:column;text-align:center;width:100%}.ag-spectrum-color{cursor:default;flex:1 1 auto;overflow:visible;position:relative}.ag-spectrum-fill{inset:0;position:absolute}.ag-spectrum-val{cursor:pointer}.ag-spectrum-dragger{cursor:pointer;pointer-events:none;position:absolute}.ag-spectrum-alpha,.ag-spectrum-hue{cursor:default}.ag-spectrum-hue-background{background:linear-gradient(270deg,red 3%,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red);height:100%;width:100%}.ag-spectrum-alpha-background{background:linear-gradient(to right,var(--ag-internal-spectrum-alpha-color-from),var(--ag-internal-spectrum-alpha-color-to)),url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="4" height="4"><rect x="0" y="0" width="4" height="4" fill="%23fff"/><path d="M0 0H2V4H4V2H0Z" fill="%23b2b2b2"/></svg>\') 0 0 /4px 4px;height:100%;width:100%}.ag-spectrum-tool{cursor:pointer;position:relative}.ag-spectrum-slider{pointer-events:none;position:absolute}.ag-spectrum-alpha .ag-spectrum-slider{background:linear-gradient(to bottom,var(--ag-internal-spectrum-alpha-color),var(--ag-internal-spectrum-alpha-color)) var(--ag-background-color)}.ag-recent-colors{display:flex;gap:6px;margin-top:10px}.ag-recent-color{cursor:pointer}.ag-angle-select[disabled]{opacity:.5;pointer-events:none}.ag-ltr .ag-angle-select-field,.ag-ltr .ag-slider-field{margin-right:calc(var(--ag-spacing)*2)}.ag-rtl .ag-angle-select-field,.ag-rtl .ag-slider-field{margin-left:calc(var(--ag-spacing)*2)}.ag-angle-select-parent-circle{background-color:var(--ag-background-color);border:1px solid;border-color:var(--ag-border-color);border-radius:12px;height:24px;width:24px}.ag-angle-select-child-circle{background-color:var(--ag-foreground-color);border-radius:3px;height:6px;left:12px;margin-left:-3px;margin-top:-4px;top:4px;width:6px}.ag-picker-field-wrapper{background-color:var(--ag-background-color);border:var(--ag-input-border);border-radius:5px;min-height:max(var(--ag-list-item-height),calc(var(--ag-spacing)*4));overflow:hidden;&:disabled{opacity:.5}&.ag-picker-has-focus,&:focus-within{border:var(--ag-input-focus-border);box-shadow:var(--ag-focus-shadow)}}.ag-picker-field-button{background-color:var(--ag-background-color)}.ag-dialog.ag-color-dialog{border-radius:5px}.ag-color-picker{.ag-picker-field-wrapper{padding-left:var(--ag-spacing);padding-right:var(--ag-spacing)}.ag-picker-field-display{align-items:center;display:flex;flex-direction:row;min-height:var(--ag-list-item-height)}}.ag-ltr .ag-color-picker-color,.ag-ltr .ag-color-picker-value{margin-right:var(--ag-spacing)}.ag-rtl .ag-color-picker-color,.ag-rtl .ag-color-picker-value{margin-left:var(--ag-spacing)}.ag-color-panel{padding:var(--ag-spacing)}.ag-spectrum-tools{padding-bottom:0;padding-left:0;padding-right:0}.ag-spectrum-tool{height:12px}.ag-spectrum-alpha-background,.ag-spectrum-hue-background{border-radius:12px}.ag-spectrum-slider{border:3px solid #f8f8f8;border-radius:18px;height:18px;margin-top:-15px;width:18px}.ag-recent-colors{margin-bottom:2px;margin-left:var(--ag-spacing);margin-right:var(--ag-spacing)}.ag-color-input-color,.ag-color-picker-color,.ag-recent-color{border-radius:4px}.ag-recent-color{border:1px solid var(--ag-border-color)}.ag-spectrum-sat{background-image:linear-gradient(90deg,#fff,hsla(20,42%,65%,0))}.ag-spectrum-val{background-image:linear-gradient(0deg,#000,hsla(20,42%,65%,0))}.ag-spectrum-dragger{background:#000;border:3px solid #fff;border-radius:18px;box-shadow:0 0 2px 0 rgba(0,0,0,.24);height:18px;width:18px}.ag-spectrum-alpha-background,.ag-spectrum-hue-background{border-radius:2px}.ag-spectrum-tool{border-radius:2px;height:11px;margin-bottom:10px}.ag-spectrum-slider{border:2px solid #fff;border-radius:13px;box-shadow:0 1px 4px 0 rgba(0,0,0,.37);height:13px;margin-top:-12px;width:13px}.ag-recent-color,.ag-spectrum-color,.ag-spectrum-slider{&:focus-visible:not(:disabled):not([readonly]){box-shadow:var(--ag-focus-shadow)}}.ag-color-input{.ag-color-input-color{position:absolute}}.ag-ltr .ag-color-input{& input[class^=ag-][type=text].ag-input-field-input{padding-left:calc(var(--ag-icon-size) + var(--ag-spacing)*2)}.ag-color-input-color{margin-left:var(--ag-spacing)}}.ag-rtl .ag-color-input{& input[class^=ag-][type=text].ag-input-field-input{padding-right:calc(var(--ag-icon-size) + var(--ag-spacing)*2)}.ag-color-input-color{margin-right:var(--ag-spacing)}}.ag-color-input-color,.ag-color-picker-color{border:1px solid var(--ag-border-color);border-radius:2px;height:var(--ag-icon-size);width:var(--ag-icon-size)}.ag-pill-select{.ag-picker-field-display{font-weight:500}.ag-picker-field-display,.ag-picker-field-icon .ag-icon{color:var(--ag-chart-menu-label-color)}}.ag-filter-toolpanel{flex:1 1 0px;min-width:0}.ag-filter-toolpanel-header{position:relative}.ag-filter-toolpanel-header,.ag-filter-toolpanel-search{align-items:center;display:flex;>*{align-items:center;display:flex}}.ag-filter-toolpanel-header{height:calc(var(--ag-spacing)*6);&:focus-visible{border-radius:var(--ag-border-radius);box-shadow:inset var(--ag-focus-shadow)}}.ag-filter-toolpanel-header,.ag-filter-toolpanel-search{padding:0 var(--ag-spacing)}.ag-filter-toolpanel-group:not(.ag-has-filter)>.ag-group-title-bar .ag-filter-toolpanel-group-instance-header-icon{display:none}.ag-filter-toolpanel-group-level-0-header{height:calc(var(--ag-spacing)*8)}.ag-filter-toolpanel-group-item{margin-bottom:calc(var(--ag-spacing)*.5);margin-top:calc(var(--ag-spacing)*.5)}.ag-filter-toolpanel-search{margin-bottom:var(--ag-spacing);margin-top:var(--ag-widget-container-vertical-padding)}.ag-filter-toolpanel-search-input{flex-grow:1;height:calc(var(--ag-spacing)*4)}.ag-ltr .ag-filter-toolpanel-group-title-bar-icon{margin-right:var(--ag-spacing)}.ag-rtl .ag-filter-toolpanel-group-title-bar-icon{margin-left:var(--ag-spacing)}.ag-filter-toolpanel-expand{cursor:pointer}.ag-ltr .ag-filter-toolpanel-expand{margin-right:var(--ag-spacing)}.ag-rtl .ag-filter-toolpanel-expand{margin-left:var(--ag-spacing)}.ag-ltr .ag-filter-toolpanel-group-title-bar,.ag-ltr .ag-filter-toolpanel-instance-header{padding-left:calc(var(--ag-spacing) + var(--ag-filter-tool-panel-group-indent)*var(--ag-indentation-level))}.ag-rtl .ag-filter-toolpanel-group-title-bar,.ag-rtl .ag-filter-toolpanel-instance-header{padding-right:calc(var(--ag-spacing) + var(--ag-filter-tool-panel-group-indent)*var(--ag-indentation-level))}.ag-ltr .ag-filter-toolpanel-instance-body{margin-left:var(--ag-filter-tool-panel-group-indent)}.ag-rtl .ag-filter-toolpanel-instance-body{margin-right:var(--ag-filter-tool-panel-group-indent)}.ag-ltr .ag-filter-toolpanel-group-instance-header-icon,.ag-ltr .ag-filter-toolpanel-instance-header-icon{margin-left:var(--ag-spacing)}.ag-rtl .ag-filter-toolpanel-group-instance-header-icon,.ag-rtl .ag-filter-toolpanel-instance-header-icon{margin-right:var(--ag-spacing)}.ag-filter-toolpanel-instance-filter{background-color:var(--ag-chrome-background-color)}.ag-filter-toolpanel-group-level-0{border-top:none}.ag-filter-toolpanel-header{height:auto;padding-bottom:var(--ag-spacing);padding-top:var(--ag-spacing)}.ag-filter-toolpanel-group-item{margin:0}.ag-filter-toolpanel-header,.ag-filter-toolpanel-search{color:var(--ag-header-text-color);font-weight:500}.ag-paging-panel{align-items:center;border-top:var(--ag-footer-row-border);display:flex;gap:calc(var(--ag-spacing)*4);height:max(var(--ag-row-height),22px);justify-content:flex-end;padding:0 var(--ag-cell-horizontal-padding)}.ag-paging-page-size .ag-wrapper{min-width:50px}.ag-paging-page-summary-panel{align-items:center;display:flex;gap:var(--ag-cell-widget-spacing);.ag-disabled &{pointer-events:none}}.ag-paging-button{cursor:pointer;position:relative;&:focus-visible{box-shadow:var(--ag-focus-shadow)}&.ag-disabled{cursor:default;opacity:.5}}.ag-paging-number,.ag-paging-row-summary-panel-number{font-weight:500}.ag-status-bar{border-top:var(--ag-footer-row-border);display:flex;justify-content:space-between;line-height:1.5;overflow:hidden;padding-left:calc(var(--ag-spacing)*4);padding-right:calc(var(--ag-spacing)*4)}.ag-status-panel{display:inline-flex}.ag-status-name-value{white-space:nowrap}.ag-status-bar-center,.ag-status-bar-left,.ag-status-bar-right{display:inline-flex}.ag-status-bar-center{text-align:center}.ag-status-name-value{margin-left:var(--ag-spacing);margin-right:var(--ag-spacing);padding-bottom:var(--ag-widget-container-vertical-padding);padding-top:var(--ag-widget-container-vertical-padding)}.ag-status-name-value-value{font-weight:500}.ag-overlay{inset:0;pointer-events:none;position:absolute;z-index:2}.ag-overlay-panel,.ag-overlay-wrapper{display:flex;height:100%;width:100%}.ag-overlay-wrapper{align-items:center;flex:none;justify-content:center;text-align:center}.ag-overlay-loading-wrapper{pointer-events:all}.ag-overlay-loading-center{background:var(--ag-background-color);border:1px solid var(--ag-border-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-popup-shadow);padding:var(--ag-spacing)}.ag-icon{display:block;height:var(--ag-icon-size);position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:var(--ag-icon-size)}.ag-column-select-column-group-readonly,.ag-disabled,[disabled]{.ag-icon{opacity:.5}}.ag-column-select-column-readonly .ag-icon-grip,.ag-column-select-column-readonly.ag-icon-grip{opacity:.35}.ag-chart-menu-icon,.ag-chart-settings-next,.ag-chart-settings-prev,.ag-column-group-icons,.ag-column-select-header-icon,.ag-filter-toolpanel-expand,.ag-floating-filter-button-button,.ag-group-contracted .ag-icon,.ag-group-expanded .ag-icon,.ag-group-title-bar-icon,.ag-header-cell-filter-button,.ag-header-cell-menu-button,.ag-header-expand-icon,.ag-panel-title-bar-button,.ag-panel-title-bar-button-icon,.ag-set-filter-group-icons{&:hover{background-color:var(--ag-icon-button-hover-color);border-radius:1px;box-shadow:0 0 0 4px var(--ag-icon-button-hover-color)}}.ag-filter-active{--ag-icon-button-hover-color:color-mix(in srgb,transparent,var(--ag-accent-color) 28%);background-color:color-mix(in srgb,transparent,var(--ag-accent-color) 14%);border-radius:1px;box-shadow:0 0 0 4px color-mix(in srgb,transparent,var(--ag-accent-color) 14%);position:relative;&:after{background-color:var(--ag-accent-color);border-radius:50%;content:"";height:6px;position:absolute;top:-1px;width:6px}.ag-icon-filter{clip-path:path("M8,0C8,4.415 11.585,8 16,8L16,16L0,16L0,0L8,0Z")}}.ag-ltr .ag-filter-active{&:after{right:-1px}}.ag-rtl .ag-filter-active{&:after{left:-1px}}.ag-label-align-right{.ag-label{order:1}>*{flex:none}}.ag-label-align-top{align-items:flex-start;flex-direction:column;>*{align-self:stretch}}.ag-label-ellipsis{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-label{white-space:nowrap}.ag-ltr .ag-label{margin-right:var(--ag-spacing)}.ag-rtl .ag-label{margin-left:var(--ag-spacing)}.ag-label-align-top .ag-label{margin-bottom:calc(var(--ag-spacing)*.5)}.ag-ltr .ag-label-align-right .ag-label{margin-left:var(--ag-spacing)}.ag-rtl .ag-label-align-right .ag-label{margin-right:var(--ag-spacing)}',G_={backgroundColor:"#FFF",foregroundColor:"#181d1f",textColor:{ref:"foregroundColor"},accentColor:"#2196f3",invalidColor:"#e02525",borderColor:{ref:"foregroundColor",mix:.15},wrapperBorder:!0,rowBorder:!0,browserColorScheme:"light",headerRowBorder:{ref:"rowBorder"},footerRowBorder:{ref:"rowBorder"},columnBorder:{style:"solid",width:1,color:"transparent"},headerColumnBorder:!1,headerColumnBorderHeight:"100%",pinnedColumnBorder:!0,pinnedRowBorder:!0,sidePanelBorder:!0,fontFamily:["-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue","sans-serif"],chromeBackgroundColor:{ref:"foregroundColor",mix:.02,onto:"backgroundColor"},headerBackgroundColor:{ref:"chromeBackgroundColor"},headerFontFamily:{ref:"fontFamily"},headerFontWeight:500,headerFontSize:{ref:"fontSize"},dataFontSize:{ref:"fontSize"},headerTextColor:{ref:"textColor"},headerCellHoverBackgroundColor:"transparent",headerCellMovingBackgroundColor:{ref:"backgroundColor"},headerCellBackgroundTransitionDuration:"0.2s",cellTextColor:{ref:"textColor"},subtleTextColor:{ref:"textColor",mix:.5},rangeSelectionBorderStyle:"solid",rangeSelectionBorderColor:{ref:"accentColor"},rangeSelectionBackgroundColor:{ref:"accentColor",mix:.2},rangeSelectionChartBackgroundColor:"#0058FF1A",rangeSelectionChartCategoryBackgroundColor:"#00FF841A",rangeSelectionHighlightColor:{ref:"accentColor",mix:.5},rowHoverColor:{ref:"accentColor",mix:.08},columnHoverColor:{ref:"accentColor",mix:.05},selectedRowBackgroundColor:{ref:"accentColor",mix:.12},modalOverlayBackgroundColor:{ref:"backgroundColor",mix:.66},oddRowBackgroundColor:{ref:"backgroundColor"},borderRadius:4,wrapperBorderRadius:8,cellHorizontalPadding:{calc:"spacing * 2 * cellHorizontalPaddingScale"},cellWidgetSpacing:{calc:"spacing * 1.5"},cellHorizontalPaddingScale:1,rowGroupIndentSize:{calc:"cellWidgetSpacing + iconSize"},valueChangeDeltaUpColor:"#43a047",valueChangeDeltaDownColor:"#e53935",valueChangeValueHighlightBackgroundColor:"#16a08580",spacing:8,fontSize:14,rowHeight:{calc:"max(iconSize, dataFontSize) + spacing * 3.25 * rowVerticalPaddingScale"},rowVerticalPaddingScale:1,headerHeight:{calc:"max(iconSize, dataFontSize) + spacing * 4 * headerVerticalPaddingScale"},headerVerticalPaddingScale:1,popupShadow:{radius:16,color:"#00000026"},dropdownShadow:{radius:4,spread:1,offsetY:1,color:"#babfc766"},dragAndDropImageBackgroundColor:{ref:"backgroundColor"},dragAndDropImageBorder:!0,dragAndDropImageShadow:{ref:"popupShadow"},dragHandleColor:{ref:"foregroundColor",mix:.7},focusShadow:{spread:3,color:{ref:"accentColor",mix:.5}},sideBarPanelWidth:250,sideBarBackgroundColor:{ref:"chromeBackgroundColor"},headerColumnResizeHandleHeight:"30%",headerColumnResizeHandleWidth:2,headerColumnResizeHandleColor:{ref:"borderColor"},widgetContainerHorizontalPadding:{calc:"spacing * 1.5"},widgetContainerVerticalPadding:{calc:"spacing * 1.5"},widgetHorizontalSpacing:{calc:"spacing * 1.5"},widgetVerticalSpacing:{ref:"spacing"},listItemHeight:{calc:"iconSize + widgetVerticalSpacing"},iconSize:16,toggleButtonWidth:28,toggleButtonHeight:18,toggleButtonBorderWidth:2,toggleButtonOnBorderColor:{ref:"accentColor"},toggleButtonOnBackgroundColor:{ref:"accentColor"},toggleButtonOffBorderColor:{ref:"foregroundColor",mix:.3,onto:"backgroundColor"},toggleButtonOffBackgroundColor:{ref:"foregroundColor",mix:.3,onto:"backgroundColor"},toggleButtonSwitchBorderColor:{ref:"toggleButtonOffBorderColor"},toggleButtonSwitchBackgroundColor:{ref:"backgroundColor"},menuBorder:{color:{ref:"foregroundColor",mix:.2}},menuBackgroundColor:{ref:"foregroundColor",mix:.03,onto:"backgroundColor"},menuTextColor:{ref:"foregroundColor",mix:.95,onto:"backgroundColor"},menuShadow:{ref:"popupShadow"},menuSeparatorColor:{ref:"borderColor"},setFilterIndentSize:{ref:"iconSize"},chartMenuPanelWidth:260,chartMenuLabelColor:{ref:"foregroundColor",mix:.8},iconButtonHoverColor:{ref:"foregroundColor",mix:.1},dialogShadow:{ref:"popupShadow"},dialogBorder:{color:{ref:"foregroundColor",mix:.2}},panelBackgroundColor:{ref:"backgroundColor"},panelTitleBarBackgroundColor:{ref:"headerBackgroundColor"},panelTitleBarBorder:!0,columnSelectIndentSize:{ref:"iconSize"},toolPanelSeparatorBorder:!0,tooltipBackgroundColor:{ref:"chromeBackgroundColor"},tooltipTextColor:{ref:"textColor"},tooltipBorder:!0,columnDropCellBackgroundColor:{ref:"foregroundColor",mix:.07},columnDropCellBorder:{color:{ref:"foregroundColor",mix:.13}},selectCellBackgroundColor:{ref:"foregroundColor",mix:.07},selectCellBorder:{color:{ref:"foregroundColor",mix:.13}},advancedFilterBuilderButtonBarBorder:!0,advancedFilterBuilderIndentSize:{calc:"spacing * 2 + iconSize"},advancedFilterBuilderJoinPillColor:"#f08e8d",advancedFilterBuilderColumnPillColor:"#a6e194",advancedFilterBuilderOptionPillColor:"#f3c08b",advancedFilterBuilderValuePillColor:"#85c0e4",filterToolPanelGroupIndent:{ref:"spacing"},iconButtonHoverBackgroundColor:{ref:"foregroundColor",mix:.1},rowLoadingSkeletonEffectColor:"rgba(66, 66, 66, 0.2)"},GV=e=>e.replace(/[A-Z]/g,e=>`-${e}`).toLowerCase(),Gj=e=>`--ag-${GV(e)}`,GH=e=>`var(${Gj(e)})`,GU=(e,t,i)=>Math.max(t,Math.min(i,e)),GW=(e=>{let t=new Map;return i=>(t.has(i)||t.set(i,e(i)),t.get(i))})(e=>{if(/Color$/.test(e))return"color";if(/Scale?$/.test(e))return"scale";if("spacing"===e||/(Padding|Spacing|Size|Width|Height|Radius|Indent|Start|End|Top|Bottom|Horizontal|Vertical)$/.test(e))return"length";if(/Border$/.test(e))return"border";if(/BorderStyle$/.test(e))return"borderStyle";if(/Shadow$/.test(e))return"shadow";if(/Image$/.test(e))return"image";if(/Family$/.test(e))return"fontFamily";if(/Weight$/.test(e))return"fontWeight";if(/Duration$/.test(e))return"duration";if(/ColorScheme$/.test(e))return"colorScheme";throw Error(`"${e}" is not a valid theme parameter.`)}),G$=e=>"string"==typeof e?e:"number"==typeof e&&String(e),GY=e=>{if("string"==typeof e)return e;if("ref"in e){let t=GH(e.ref);if(null==e.mix)return t;let i=e.onto?"var(--ag-background-color)":"transparent";return`color-mix(in srgb, ${i}, ${t} ${GU(100*e.mix,0,100)}%)`}return!1},GK=e=>{if("string"==typeof e)return e;if("number"==typeof e)return`${e}px`;if("calc"in e){let t=e.calc.replace(/ ?[*/+] ?/g," $& ");return`calc(${t.replace(/(?<!(\w|--[\w-]*))([a-z][a-z0-9]*\b)(?!\s*\()/gi,e=>` ${GH(e)} `)})`}return"ref"in e&&GH(e.ref)},GZ=e=>"string"==typeof e?e:"googleFont"in e?GZ(e.googleFont):"ref"in e?GH(e.ref):!!Array.isArray(e)&&e.map(e=>("object"==typeof e&&"googleFont"in e&&(e=e.googleFont),/^[\w-]+$/.test(e)?e:JSON.stringify(e))).join(", "),Gq=e=>"string"==typeof e?e:"url"in e?`url(${JSON.stringify(e.url)})`:"svg"in e?Gq({url:`data:image/svg+xml,${encodeURIComponent(e.svg)}`}):"ref"in e&&GH(e.ref),GX={color:GY,colorScheme:G$,length:GK,scale:G$,border:(e,t)=>"string"==typeof e?e:!0===e?"solid 1px var(--ag-border-color)":!1===e?"columnBorder"===t?"solid 1px transparent":"none":"ref"in e?GH(e.ref):G$(e.style??"solid")+" "+GK(e.width??1)+" "+GY(e.color??{ref:"borderColor"}),borderStyle:G$,shadow:e=>"string"==typeof e?e:!1===e?"none":"ref"in e?GH(e.ref):[GK(e.offsetX??0),GK(e.offsetY??0),GK(e.radius??0),GK(e.spread??0),GY(e.color??{ref:"foregroundColor"})].join(" "),image:Gq,fontFamily:GZ,fontWeight:G$,duration:(e,t)=>"string"==typeof e?e:"number"==typeof e?(e>50&&tB(`Numeric value ${e} passed to ${t} param will be interpreted as ${e} seconds. If this is intentional use "${e}s" to silence this warning.`),`${e}s`):"ref"in e&&GH(e.ref)},GQ=(e,t)=>GX[GW(e)](t,e),GJ=0,G0=(e=`customTheme${++GJ}`)=>new G4(e,[],{}),G1="object"!=typeof window||!window||"object"!=typeof document||window.document!==document,G2=0,G3=!1,G4=class e{constructor(e,t=[],i={}){this.id=e,this.dependencies=t,this.defaults=i,this.useCount=0}withPart(t){return"function"==typeof t&&(t=t()),new e(this.id,this.dependencies.concat(t),this.defaults)}withParams(t){let i={...this.defaults};for(let[e,r]of Object.entries(t))null!=r&&(i[e]=r);return new e(this.id,this.dependencies,i)}getCSS(){return[Gz,...this._getCSSChunks().map(e=>e.css)].join("\n\n")}startUse(e){++this.useCount,1===this.useCount&&this._install(e)}stopUse(){--this.useCount,0===this.useCount&&setTimeout(()=>{0===this.useCount&&G7(this.getCssClass(),this._installRoot)},1e3)}getCssClass(){return null==this._cssClass&&(this._cssClass=`ag-theme-${++G2}`),this._cssClass}getParams(){if(this._getParamsCache)return this._getParamsCache;let e={...G_};for(let t of this._getFlatUnits())for(let[i,r]of Object.entries(t.defaults)){let t=null!=r?r:G_[i];null!=t&&(e[i]=t)}return this._getParamsCache=e}async _install({container:e,loadThemeGoogleFonts:t}){if(G1)return;!G3&&(G3=!0,G7("legacy",document.head),getComputedStyle(document.body).getPropertyValue("--ag-legacy-styles-loaded")&&tB("both Theming API and the ag-grid.css are used on the same page, styling will be incorrect"));let i=e.getRootNode();i instanceof ShadowRoot||(i=document.head),this._installRoot=i;let r=[];for(let e of(r.push(G8({css:Gz,part:"core",root:i})),G5(this)))t?ze(e):null==t&&tO(`theme uses google font ${e} but no value for loadThemeGoogleFonts was provided. Pass true to load fonts from ${zt} or false to silence this warning.`);for(let e of this._getCSSChunks())G8({css:e.css,part:e.id,scope:this.getCssClass(),root:i});return Promise.all(r)}_getFlatUnits(){if(this._getFlatUnitsCache)return this._getFlatUnitsCache;let e={};for(let t of this.dependencies)delete e[t.feature],e[t.feature]=t;let t=[...Object.values(e),this];return this._getFlatUnitsCache=t}_getCSSChunks(){if(this._getCssChunksCache)return this._getCssChunksCache;let e=[];for(let t of(e.push(G6(this)),this._getFlatUnits()))if(t.css&&t.css.length>0){let i=`/* Part ${t.id} */`;i+=t.css.map(e=>"function"==typeof e?e():e).join("\n")+"\n",i=`.${this.getCssClass()} {
	${i}
}`,e.push({css:i,id:t.id})}return this._getCssChunksCache=e}},G6=e=>{let t="",i="";for(let[r,s]of Object.entries(e.getParams())){let e=GQ(r,s);if(!1===e)tB(`Invalid value for param ${r} - ${zr(s)}`);else{let s=Gj(r),a=s.replace("--ag-","--ag-inherited-");t+=`	${s}: var(${a}, ${e});
`,i+=`	${a}: var(${s});
`}}let r=`:where(.${e.getCssClass()})`,s=`${r} {
${t}}
`;return{css:s+=`:has(> ${r}):not(${r}) {
${i}}
`,id:"variables"}},G5=e=>Array.from(new Set(Object.values(e.getParams()).flat().map(e=>e?.googleFont).filter(e=>"string"==typeof e))).sort(),G8=async({root:e,part:t,scope:i,css:r})=>{let s=`:scope > style[data-ag-part="${t}"]`;i&&(s+=`[data-ag-scope="${i}"]`);let a=e.querySelector(s);if(!a){(a=document.createElement("style")).dataset.agPart=t,i&&(a.dataset.agScope=i);let r=e.querySelectorAll(":scope > style[data-ag-part]"),s=r[r.length-1];s?s.insertAdjacentElement("afterend",a):e.firstElementChild?e.firstElementChild.insertAdjacentElement("beforebegin",a):e.appendChild(a)}if(a._agTextContent!==r)return a.textContent=r,a._agTextContent=r,zi(a)},G7=(e,t)=>{for(let i of Array.from(t.querySelectorAll(`:scope > style[data-ag-scope="${e}"]`)))i.remove()},G9=new Set,ze=async e=>{if(!G9.has(e))return G9.add(e),G8({css:`@import url('https://${zt}/css2?family=${encodeURIComponent(e)}:wght@100;200;300;400;500;600;700;800;900&display=swap');
`,part:`googleFont:${e}`,root:document.head})},zt="fonts.googleapis.com",zi=e=>new Promise(t=>{let i=()=>{e.removeEventListener("load",i),t()};e.addEventListener("load",i)}),zr=e=>null==e?String(e):`${typeof e} ${e}`,zs=GB("checkboxStyle","default").withAdditionalParams({checkboxBorderWidth:1,checkboxBorderRadius:{ref:"borderRadius"},checkboxUncheckedBackgroundColor:{ref:"backgroundColor"},checkboxUncheckedBorderColor:{ref:"foregroundColor",mix:.3,onto:"backgroundColor"},checkboxCheckedBackgroundColor:{ref:"accentColor"},checkboxCheckedBorderColor:{ref:"accentColor"},checkboxCheckedShapeImage:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="10" height="7" fill="none"><path stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.75" d="M1 3.5 3.5 6l5-5"/></svg>'},checkboxCheckedShapeColor:{ref:"backgroundColor"},checkboxIndeterminateBackgroundColor:{ref:"foregroundColor",mix:.3,onto:"backgroundColor"},checkboxIndeterminateBorderColor:{ref:"foregroundColor",mix:.3,onto:"backgroundColor"},checkboxIndeterminateShapeImage:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="10" height="2" fill="none"><rect width="10" height="2" fill="#000" rx="1"/></svg>'},checkboxIndeterminateShapeColor:{ref:"backgroundColor"},radioCheckedShapeImage:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="6" height="6" fill="none"><circle cx="3" cy="3" r="3" fill="#000"/></svg>'}}).withCSS('.ag-checkbox-input-wrapper,.ag-radio-button-input-wrapper{background-color:var(--ag-checkbox-unchecked-background-color);border:solid var(--ag-checkbox-border-width) var(--ag-checkbox-unchecked-border-color);flex:none;height:var(--ag-icon-size);position:relative;width:var(--ag-icon-size);& input{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:100%;opacity:0;width:100%}&:after{content:"";display:block;inset:0;-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;pointer-events:none;position:absolute}&.ag-checked{background-color:var(--ag-checkbox-checked-background-color);border-color:var(--ag-checkbox-checked-border-color);&:after{background-color:var(--ag-checkbox-checked-shape-color)}}&:active,&:focus-within{box-shadow:var(--ag-focus-shadow)}&.ag-disabled{filter:grayscale();opacity:.5}}.ag-checkbox-input-wrapper{border-radius:var(--ag-checkbox-border-radius);&.ag-checked:after{-webkit-mask-image:var(--ag-checkbox-checked-shape-image);mask-image:var(--ag-checkbox-checked-shape-image)}&.ag-indeterminate{background-color:var(--ag-checkbox-indeterminate-background-color);border-color:var(--ag-checkbox-indeterminate-border-color);&:after{background-color:var(--ag-checkbox-indeterminate-shape-color);-webkit-mask-image:var(--ag-checkbox-indeterminate-shape-image);mask-image:var(--ag-checkbox-indeterminate-shape-image)}}}.ag-radio-button-input-wrapper{border-radius:100%;&.ag-checked:after{-webkit-mask-image:var(--ag-radio-checked-shape-image);mask-image:var(--ag-radio-checked-shape-image)}}'),za=GB("colorScheme","light"),zo=GB("colorScheme","lightWarm").withParams({foregroundColor:"#000000de",borderColor:"#60300026",chromeBackgroundColor:"#60300005"}),zn=GB("colorScheme","lightCold").withParams({foregroundColor:"#000",backgroundColor:"#fff",chromeBackgroundColor:"#f3f8f8"}),zl=GB("colorScheme","dark").withParams({backgroundColor:"hsl(217, 0%, 17%)",foregroundColor:"#FFF",chromeBackgroundColor:{ref:"foregroundColor",mix:.05,onto:"backgroundColor"},browserColorScheme:"dark"}),zh=GB("colorScheme","darkWarm").withParams({backgroundColor:"hsl(29, 10%, 17%)",foregroundColor:"#FFF",chromeBackgroundColor:{ref:"foregroundColor",mix:.05,onto:"backgroundColor"},browserColorScheme:"dark"}),zd=GB("colorScheme","darkBlue").withParams({backgroundColor:"#1f2836",foregroundColor:"#FFF",chromeBackgroundColor:{ref:"foregroundColor",mix:.07,onto:"backgroundColor"},browserColorScheme:"dark"}),zc=GB("iconSet","alpine").withCSS(".ag-icon:before{background-color:currentColor;content:\"\";display:block;height:var(--ag-icon-size);-webkit-mask-image:linear-gradient(#0000,#0000);mask-image:linear-gradient(#0000,#0000);-webkit-mask-size:contain;mask-size:contain;width:var(--ag-icon-size)}.ag-icon-aggregation:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M24 6H8v2l8 8-8 8v2h16v-2H11l8-8-8-8h13z' style='fill-rule:nonzero'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M24 6H8v2l8 8-8 8v2h16v-2H11l8-8-8-8h13z' style='fill-rule:nonzero'/%3E%3C/svg%3E\")}.ag-icon-arrows:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M7.515 11.171 2.687 16l4.828 4.829-1.414 1.414L-.142 16l6.243-6.243zm16.97 0 1.414-1.414L32.142 16l-6.243 6.243-1.414-1.414L29.313 16zM16.028 13.2l2.829 2.828-2.829 2.829-2.828-2.829zm-4.857 11.285L16 29.313l4.829-4.828 1.414 1.414L16 32.142l-6.243-6.243zm0-16.97L9.757 6.101 16-.142l6.243 6.243-1.414 1.414L16 2.687z' style='fill-rule:nonzero'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M7.515 11.171 2.687 16l4.828 4.829-1.414 1.414L-.142 16l6.243-6.243zm16.97 0 1.414-1.414L32.142 16l-6.243 6.243-1.414-1.414L29.313 16zM16.028 13.2l2.829 2.828-2.829 2.829-2.828-2.829zm-4.857 11.285L16 29.313l4.829-4.828 1.414 1.414L16 32.142l-6.243-6.243zm0-16.97L9.757 6.101 16-.142l6.243 6.243-1.414 1.414L16 2.687z' style='fill-rule:nonzero'/%3E%3C/svg%3E\")}.ag-icon-asc:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m5.333 16 1.88 1.88 7.453-7.44v16.227h2.667V10.44l7.44 7.453L26.666 16 15.999 5.333 5.332 16z' style='fill-rule:nonzero'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m5.333 16 1.88 1.88 7.453-7.44v16.227h2.667V10.44l7.44 7.453L26.666 16 15.999 5.333 5.332 16z' style='fill-rule:nonzero'/%3E%3C/svg%3E\")}.ag-icon-cancel:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M16 2.667A13.32 13.32 0 0 0 2.667 16c0 7.373 5.96 13.333 13.333 13.333S29.333 23.373 29.333 16 23.373 2.667 16 2.667m6.667 18.12-1.88 1.88L16 17.88l-4.787 4.787-1.88-1.88L14.12 16l-4.787-4.787 1.88-1.88L16 14.12l4.787-4.787 1.88 1.88L17.88 16z' style='fill-rule:nonzero'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M16 2.667A13.32 13.32 0 0 0 2.667 16c0 7.373 5.96 13.333 13.333 13.333S29.333 23.373 29.333 16 23.373 2.667 16 2.667m6.667 18.12-1.88 1.88L16 17.88l-4.787 4.787-1.88-1.88L14.12 16l-4.787-4.787 1.88-1.88L16 14.12l4.787-4.787 1.88 1.88L17.88 16z' style='fill-rule:nonzero'/%3E%3C/svg%3E\")}.ag-icon-chart:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Echart%3C/title%3E%3Cg fill='%23000' fill-rule='nonzero'%3E%3Cpath d='M14 7h4v18h-4zM8 17h4v8H8zM20 13h4v12h-4z'/%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Echart%3C/title%3E%3Cg fill='%23000' fill-rule='nonzero'%3E%3Cpath d='M14 7h4v18h-4zM8 17h4v8H8zM20 13h4v12h-4z'/%3E%3C/g%3E%3C/svg%3E\")}.ag-icon-color-picker:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M23.907 17.587 10.574 4.254l-1.88 1.88 3.173 3.173-8.28 8.28 10.16 10.16zm-16.547 0 6.387-6.387 6.387 6.387zm18.387 2s-2.667 2.893-2.667 4.667c0 1.467 1.2 2.667 2.667 2.667s2.667-1.2 2.667-2.667c0-1.773-2.667-4.667-2.667-4.667' style='fill-rule:nonzero'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M23.907 17.587 10.574 4.254l-1.88 1.88 3.173 3.173-8.28 8.28 10.16 10.16zm-16.547 0 6.387-6.387 6.387 6.387zm18.387 2s-2.667 2.893-2.667 4.667c0 1.467 1.2 2.667 2.667 2.667s2.667-1.2 2.667-2.667c0-1.773-2.667-4.667-2.667-4.667' style='fill-rule:nonzero'/%3E%3C/svg%3E\")}.ag-icon-columns:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M26 25H6V7h20zM12 11H8v12h4zm6 0h-4v12h4zm6 12V11h-4v12z' style='fill-rule:nonzero' transform='translate(0 -1)'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M26 25H6V7h20zM12 11H8v12h4zm6 0h-4v12h4zm6 12V11h-4v12z' style='fill-rule:nonzero' transform='translate(0 -1)'/%3E%3C/svg%3E\")}.ag-icon-contracted:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m12 6 10 10-10 10-2-2 8-8-8-8z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m12 6 10 10-10 10-2-2 8-8-8-8z'/%3E%3C/svg%3E\")}.ag-icon-copy:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M22 1.333H6A2.675 2.675 0 0 0 3.333 4v18.667H6V4h16zm4 5.334H11.333a2.675 2.675 0 0 0-2.667 2.667v18.667c0 1.467 1.2 2.667 2.667 2.667H26c1.467 0 2.667-1.2 2.667-2.667V9.334c0-1.467-1.2-2.667-2.667-2.667M26 28H11.333V9.333H26z' style='fill-rule:nonzero'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M22 1.333H6A2.675 2.675 0 0 0 3.333 4v18.667H6V4h16zm4 5.334H11.333a2.675 2.675 0 0 0-2.667 2.667v18.667c0 1.467 1.2 2.667 2.667 2.667H26c1.467 0 2.667-1.2 2.667-2.667V9.334c0-1.467-1.2-2.667-2.667-2.667M26 28H11.333V9.333H26z' style='fill-rule:nonzero'/%3E%3C/svg%3E\")}.ag-icon-cross:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M15.984 13.894 27.05 2.828l2.122 2.122-11.066 11.066 11.066 11.066-2.122 2.12-11.066-11.066L4.918 29.202l-2.12-2.12 11.066-11.066L2.798 4.95l2.12-2.122z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M15.984 13.894 27.05 2.828l2.122 2.122-11.066 11.066 11.066 11.066-2.122 2.12-11.066-11.066L4.918 29.202l-2.12-2.12 11.066-11.066L2.798 4.95l2.12-2.122z'/%3E%3C/svg%3E\")}.ag-icon-csv:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='matrix(.06285 0 0 .06285 3.934 -.054)'/%3E%3Cpath d='M.688-.226a.2.2 0 0 1-.017.074.28.28 0 0 1-.145.14.412.412 0 0 1-.234.013.28.28 0 0 1-.202-.168.468.468 0 0 1-.04-.19q0-.086.025-.155a.319.319 0 0 1 .182-.191.4.4 0 0 1 .134-.025q.087 0 .155.035a.3.3 0 0 1 .104.085.17.17 0 0 1 .036.097.06.06 0 0 1-.018.044.06.06 0 0 1-.042.019.06.06 0 0 1-.042-.013.2.2 0 0 1-.031-.046.2.2 0 0 0-.066-.079.16.16 0 0 0-.095-.027.17.17 0 0 0-.142.068.3.3 0 0 0-.053.193.4.4 0 0 0 .023.139.2.2 0 0 0 .067.083.2.2 0 0 0 .1.027q.063 0 .106-.031a.2.2 0 0 0 .065-.091.2.2 0 0 1 .023-.046q.014-.018.044-.018a.06.06 0 0 1 .044.018.06.06 0 0 1 .019.045' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 7.122 25.977)'/%3E%3Cpath d='M.622-.215a.2.2 0 0 1-.033.117.23.23 0 0 1-.098.081.4.4 0 0 1-.153.029.34.34 0 0 1-.175-.04.23.23 0 0 1-.079-.077.17.17 0 0 1-.031-.093q0-.027.019-.045a.06.06 0 0 1 .046-.019.06.06 0 0 1 .039.014.1.1 0 0 1 .027.044.3.3 0 0 0 .03.057q.015.023.044.038.03.015.076.015.065 0 .105-.03a.09.09 0 0 0 .04-.075.08.08 0 0 0-.022-.058.14.14 0 0 0-.056-.034 1 1 0 0 0-.092-.025.7.7 0 0 1-.129-.042.2.2 0 0 1-.083-.066.17.17 0 0 1-.03-.104q0-.058.032-.105a.2.2 0 0 1 .093-.07.4.4 0 0 1 .144-.025q.066 0 .114.016a.3.3 0 0 1 .08.044.2.2 0 0 1 .046.057q.015.03.015.058a.07.07 0 0 1-.018.046.06.06 0 0 1-.046.021q-.025 0-.038-.012a.2.2 0 0 1-.028-.041.2.2 0 0 0-.047-.063Q.387-.625.326-.625a.15.15 0 0 0-.09.025q-.035.024-.035.059 0 .021.012.037a.1.1 0 0 0 .032.027.4.4 0 0 0 .111.036q.06.015.11.031.048.018.083.042a.2.2 0 0 1 .054.062.2.2 0 0 1 .019.091' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 13.339 25.977)'/%3E%3Cpath d='m.184-.633.162.48.163-.483q.013-.038.019-.053a.062.062 0 0 1 .061-.039q.018 0 .034.009a.1.1 0 0 1 .025.025q.009.015.009.031L.654-.64l-.007.025-.009.024-.173.468-.019.051a.2.2 0 0 1-.021.042.1.1 0 0 1-.033.03.1.1 0 0 1-.049.012.1.1 0 0 1-.05-.011A.1.1 0 0 1 .26-.03a.2.2 0 0 1-.021-.042L.22-.123.05-.587.041-.612.033-.638.03-.662q0-.025.02-.046a.07.07 0 0 1 .05-.02q.037 0 .053.023.015.023.031.072' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 18.94 25.977)'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='matrix(.06285 0 0 .06285 3.934 -.054)'/%3E%3Cpath d='M.688-.226a.2.2 0 0 1-.017.074.28.28 0 0 1-.145.14.412.412 0 0 1-.234.013.28.28 0 0 1-.202-.168.468.468 0 0 1-.04-.19q0-.086.025-.155a.319.319 0 0 1 .182-.191.4.4 0 0 1 .134-.025q.087 0 .155.035a.3.3 0 0 1 .104.085.17.17 0 0 1 .036.097.06.06 0 0 1-.018.044.06.06 0 0 1-.042.019.06.06 0 0 1-.042-.013.2.2 0 0 1-.031-.046.2.2 0 0 0-.066-.079.16.16 0 0 0-.095-.027.17.17 0 0 0-.142.068.3.3 0 0 0-.053.193.4.4 0 0 0 .023.139.2.2 0 0 0 .067.083.2.2 0 0 0 .1.027q.063 0 .106-.031a.2.2 0 0 0 .065-.091.2.2 0 0 1 .023-.046q.014-.018.044-.018a.06.06 0 0 1 .044.018.06.06 0 0 1 .019.045' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 7.122 25.977)'/%3E%3Cpath d='M.622-.215a.2.2 0 0 1-.033.117.23.23 0 0 1-.098.081.4.4 0 0 1-.153.029.34.34 0 0 1-.175-.04.23.23 0 0 1-.079-.077.17.17 0 0 1-.031-.093q0-.027.019-.045a.06.06 0 0 1 .046-.019.06.06 0 0 1 .039.014.1.1 0 0 1 .027.044.3.3 0 0 0 .03.057q.015.023.044.038.03.015.076.015.065 0 .105-.03a.09.09 0 0 0 .04-.075.08.08 0 0 0-.022-.058.14.14 0 0 0-.056-.034 1 1 0 0 0-.092-.025.7.7 0 0 1-.129-.042.2.2 0 0 1-.083-.066.17.17 0 0 1-.03-.104q0-.058.032-.105a.2.2 0 0 1 .093-.07.4.4 0 0 1 .144-.025q.066 0 .114.016a.3.3 0 0 1 .08.044.2.2 0 0 1 .046.057q.015.03.015.058a.07.07 0 0 1-.018.046.06.06 0 0 1-.046.021q-.025 0-.038-.012a.2.2 0 0 1-.028-.041.2.2 0 0 0-.047-.063Q.387-.625.326-.625a.15.15 0 0 0-.09.025q-.035.024-.035.059 0 .021.012.037a.1.1 0 0 0 .032.027.4.4 0 0 0 .111.036q.06.015.11.031.048.018.083.042a.2.2 0 0 1 .054.062.2.2 0 0 1 .019.091' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 13.339 25.977)'/%3E%3Cpath d='m.184-.633.162.48.163-.483q.013-.038.019-.053a.062.062 0 0 1 .061-.039q.018 0 .034.009a.1.1 0 0 1 .025.025q.009.015.009.031L.654-.64l-.007.025-.009.024-.173.468-.019.051a.2.2 0 0 1-.021.042.1.1 0 0 1-.033.03.1.1 0 0 1-.049.012.1.1 0 0 1-.05-.011A.1.1 0 0 1 .26-.03a.2.2 0 0 1-.021-.042L.22-.123.05-.587.041-.612.033-.638.03-.662q0-.025.02-.046a.07.07 0 0 1 .05-.02q.037 0 .053.023.015.023.031.072' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 18.94 25.977)'/%3E%3C/svg%3E\")}.ag-icon-cut:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M13.775 15.198 3.835 2.945a1.501 1.501 0 0 1 2.33-1.89l14.997 18.488A6.003 6.003 0 0 1 29.657 25c0 3.311-2.688 6-6 6s-6-2.689-6-6c0-1.335.437-2.569 1.176-3.566l-3.127-3.855-3.001 3.7A5.97 5.97 0 0 1 14 25c0 3.311-2.689 6-6 6s-6-2.689-6-6a6.003 6.003 0 0 1 8.315-5.536zm9.882 6.702a3.1 3.1 0 0 0-3.1 3.1c0 1.711 1.389 3.1 3.1 3.1s3.1-1.389 3.1-3.1-1.389-3.1-3.1-3.1M8 21.95a3.05 3.05 0 1 0 .001 6.101A3.05 3.05 0 0 0 8 21.95m9.63-11.505 1.932 2.381 8.015-9.881a1.5 1.5 0 0 0-2.329-1.89z' style='fill-rule:nonzero'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M13.775 15.198 3.835 2.945a1.501 1.501 0 0 1 2.33-1.89l14.997 18.488A6.003 6.003 0 0 1 29.657 25c0 3.311-2.688 6-6 6s-6-2.689-6-6c0-1.335.437-2.569 1.176-3.566l-3.127-3.855-3.001 3.7A5.97 5.97 0 0 1 14 25c0 3.311-2.689 6-6 6s-6-2.689-6-6a6.003 6.003 0 0 1 8.315-5.536zm9.882 6.702a3.1 3.1 0 0 0-3.1 3.1c0 1.711 1.389 3.1 3.1 3.1s3.1-1.389 3.1-3.1-1.389-3.1-3.1-3.1M8 21.95a3.05 3.05 0 1 0 .001 6.101A3.05 3.05 0 0 0 8 21.95m9.63-11.505 1.932 2.381 8.015-9.881a1.5 1.5 0 0 0-2.329-1.89z' style='fill-rule:nonzero'/%3E%3C/svg%3E\")}.ag-icon-desc:before,.ag-icon-down:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m26.667 16-1.88-1.88-7.453 7.44V5.333h-2.667V21.56l-7.44-7.453L5.334 16l10.667 10.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m26.667 16-1.88-1.88-7.453 7.44V5.333h-2.667V21.56l-7.44-7.453L5.334 16l10.667 10.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E\")}.ag-icon-excel:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='matrix(.06285 0 0 .06285 3.934 -.054)'/%3E%3Cpath d='m.052-.139.16-.234-.135-.208a.4.4 0 0 1-.028-.052.1.1 0 0 1-.01-.042.05.05 0 0 1 .018-.037.07.07 0 0 1 .045-.016q.03 0 .047.018a1 1 0 0 1 .047.066l.107.174.115-.174.024-.038.019-.026.021-.015a.1.1 0 0 1 .027-.005.06.06 0 0 1 .044.016.05.05 0 0 1 .018.039q0 .033-.038.089l-.141.211.152.234a.3.3 0 0 1 .03.051.1.1 0 0 1 .009.038.1.1 0 0 1-.008.031.1.1 0 0 1-.024.023.1.1 0 0 1-.034.008.1.1 0 0 1-.035-.008.1.1 0 0 1-.023-.022L.427-.067.301-.265l-.134.204-.022.034-.016.019a.1.1 0 0 1-.022.015.1.1 0 0 1-.03.005.06.06 0 0 1-.044-.016.06.06 0 0 1-.017-.047q0-.036.036-.088' style='fill-rule:nonzero' transform='matrix(17.82892 0 0 16.50777 10.371 25.928)'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='matrix(.06285 0 0 .06285 3.934 -.054)'/%3E%3Cpath d='m.052-.139.16-.234-.135-.208a.4.4 0 0 1-.028-.052.1.1 0 0 1-.01-.042.05.05 0 0 1 .018-.037.07.07 0 0 1 .045-.016q.03 0 .047.018a1 1 0 0 1 .047.066l.107.174.115-.174.024-.038.019-.026.021-.015a.1.1 0 0 1 .027-.005.06.06 0 0 1 .044.016.05.05 0 0 1 .018.039q0 .033-.038.089l-.141.211.152.234a.3.3 0 0 1 .03.051.1.1 0 0 1 .009.038.1.1 0 0 1-.008.031.1.1 0 0 1-.024.023.1.1 0 0 1-.034.008.1.1 0 0 1-.035-.008.1.1 0 0 1-.023-.022L.427-.067.301-.265l-.134.204-.022.034-.016.019a.1.1 0 0 1-.022.015.1.1 0 0 1-.03.005.06.06 0 0 1-.044-.016.06.06 0 0 1-.017-.047q0-.036.036-.088' style='fill-rule:nonzero' transform='matrix(17.82892 0 0 16.50777 10.371 25.928)'/%3E%3C/svg%3E\")}.ag-icon-expanded:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M20 26 10 16 20 6l2 2-8 8 8 8z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M20 26 10 16 20 6l2 2-8 8 8 8z'/%3E%3C/svg%3E\")}.ag-icon-eye-slash:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eeye-slash%3C/title%3E%3Cpath fill='%23000' fill-rule='nonzero' d='M8.95 10.364 7 8.414 8.414 7l2.32 2.32A13.2 13.2 0 0 1 16.5 8c5.608 0 10.542 3.515 12.381 8.667L29 17l-.119.333a13 13 0 0 1-4.255 5.879l1.466 1.466-1.414 1.414-1.754-1.753A13.2 13.2 0 0 1 16.5 26c-5.608 0-10.542-3.515-12.381-8.667L4 17l.119-.333a13 13 0 0 1 4.83-6.303m1.445 1.445A11.02 11.02 0 0 0 6.148 17c1.646 4.177 5.728 7 10.352 7 1.76 0 3.441-.409 4.94-1.146l-1.878-1.878A5.06 5.06 0 0 1 16.5 22c-2.789 0-5.05-2.239-5.05-5 0-1.158.398-2.223 1.065-3.07zm1.855-.974 1.794 1.795A5.07 5.07 0 0 1 16.5 12c2.789 0 5.05 2.239 5.05 5 0 .9-.24 1.745-.661 2.474l2.305 2.306A11 11 0 0 0 26.852 17c-1.646-4.177-5.728-7-10.352-7-1.495 0-2.933.295-4.25.835'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eeye-slash%3C/title%3E%3Cpath fill='%23000' fill-rule='nonzero' d='M8.95 10.364 7 8.414 8.414 7l2.32 2.32A13.2 13.2 0 0 1 16.5 8c5.608 0 10.542 3.515 12.381 8.667L29 17l-.119.333a13 13 0 0 1-4.255 5.879l1.466 1.466-1.414 1.414-1.754-1.753A13.2 13.2 0 0 1 16.5 26c-5.608 0-10.542-3.515-12.381-8.667L4 17l.119-.333a13 13 0 0 1 4.83-6.303m1.445 1.445A11.02 11.02 0 0 0 6.148 17c1.646 4.177 5.728 7 10.352 7 1.76 0 3.441-.409 4.94-1.146l-1.878-1.878A5.06 5.06 0 0 1 16.5 22c-2.789 0-5.05-2.239-5.05-5 0-1.158.398-2.223 1.065-3.07zm1.855-.974 1.794 1.795A5.07 5.07 0 0 1 16.5 12c2.789 0 5.05 2.239 5.05 5 0 .9-.24 1.745-.661 2.474l2.305 2.306A11 11 0 0 0 26.852 17c-1.646-4.177-5.728-7-10.352-7-1.495 0-2.933.295-4.25.835'/%3E%3C/svg%3E\")}.ag-icon-eye:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M16.5 23c4.624 0 8.706-2.823 10.352-7-1.646-4.177-5.728-7-10.352-7s-8.706 2.823-10.352 7c1.646 4.177 5.728 7 10.352 7M4.119 15.667C5.958 10.515 10.892 7 16.5 7s10.542 3.515 12.381 8.667L29 16l-.119.333C27.042 21.485 22.108 25 16.5 25S5.958 21.485 4.119 16.333L4 16zM16.5 21c2.789 0 5.049-2.239 5.049-5s-2.26-5-5.049-5-5.049 2.239-5.049 5 2.26 5 5.049 5' style='fill-rule:nonzero'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M16.5 23c4.624 0 8.706-2.823 10.352-7-1.646-4.177-5.728-7-10.352-7s-8.706 2.823-10.352 7c1.646 4.177 5.728 7 10.352 7M4.119 15.667C5.958 10.515 10.892 7 16.5 7s10.542 3.515 12.381 8.667L29 16l-.119.333C27.042 21.485 22.108 25 16.5 25S5.958 21.485 4.119 16.333L4 16zM16.5 21c2.789 0 5.049-2.239 5.049-5s-2.26-5-5.049-5-5.049 2.239-5.049 5 2.26 5 5.049 5' style='fill-rule:nonzero'/%3E%3C/svg%3E\")}.ag-icon-filter:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m28 8-8 8v5l-6 6V16L6 8V6h22zM9 8l7 7v7l2-2v-5l7-7z' style='fill-rule:nonzero'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m28 8-8 8v5l-6 6V16L6 8V6h22zM9 8l7 7v7l2-2v-5l7-7z' style='fill-rule:nonzero'/%3E%3C/svg%3E\")}.ag-icon-first:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M24.273 22.12 18.153 16l6.12-6.12L22.393 8l-8 8 8 8zM7.727 8h2.667v16H7.727z' style='fill-rule:nonzero'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M24.273 22.12 18.153 16l6.12-6.12L22.393 8l-8 8 8 8zM7.727 8h2.667v16H7.727z' style='fill-rule:nonzero'/%3E%3C/svg%3E\")}.ag-icon-group:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M14 7v1H9V7zm0-3v1H5.001V4zm-7 7H5v-1h2zm0-3H5V7h2zM3 5H1V4h2zm11 5v1H9v-1zm-7 4H5v-1h2zm7-1v1H9v-1z' style='fill-rule:nonzero' transform='matrix(2 0 0 2 0 -2)'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M14 7v1H9V7zm0-3v1H5.001V4zm-7 7H5v-1h2zm0-3H5V7h2zM3 5H1V4h2zm11 5v1H9v-1zm-7 4H5v-1h2zm7-1v1H9v-1z' style='fill-rule:nonzero' transform='matrix(2 0 0 2 0 -2)'/%3E%3C/svg%3E\")}.ag-icon-last:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m7.727 9.88 6.12 6.12-6.12 6.12L9.607 24l8-8-8-8zM21.607 8h2.667v16h-2.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m7.727 9.88 6.12 6.12-6.12 6.12L9.607 24l8-8-8-8zM21.607 8h2.667v16h-2.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E\")}.ag-icon-left:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M26.667 14.667H10.44l7.453-7.453L16 5.334 5.333 16.001 16 26.668l1.88-1.88-7.44-7.453h16.227z' style='fill-rule:nonzero'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M26.667 14.667H10.44l7.453-7.453L16 5.334 5.333 16.001 16 26.668l1.88-1.88-7.44-7.453h16.227z' style='fill-rule:nonzero'/%3E%3C/svg%3E\")}.ag-icon-linked:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M5.2 16a4.136 4.136 0 0 1 4.133-4.133h5.333V9.334H9.333a6.67 6.67 0 0 0-6.667 6.667 6.67 6.67 0 0 0 6.667 6.667h5.333v-2.533H9.333A4.136 4.136 0 0 1 5.2 16.002zm5.467 1.333h10.667v-2.667H10.667zm12-8h-5.333v2.533h5.333a4.136 4.136 0 0 1 4.133 4.133 4.136 4.136 0 0 1-4.133 4.133h-5.333v2.533h5.333a6.67 6.67 0 0 0 6.667-6.667 6.67 6.67 0 0 0-6.667-6.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M5.2 16a4.136 4.136 0 0 1 4.133-4.133h5.333V9.334H9.333a6.67 6.67 0 0 0-6.667 6.667 6.67 6.67 0 0 0 6.667 6.667h5.333v-2.533H9.333A4.136 4.136 0 0 1 5.2 16.002zm5.467 1.333h10.667v-2.667H10.667zm12-8h-5.333v2.533h5.333a4.136 4.136 0 0 1 4.133 4.133 4.136 4.136 0 0 1-4.133 4.133h-5.333v2.533h5.333a6.67 6.67 0 0 0 6.667-6.667 6.67 6.67 0 0 0-6.667-6.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E\")}.ag-icon-loading:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M17 29h-2v-8h2zm-3.586-9L7 26.414 5.586 25 12 18.586zm13 5L25 26.414 18.586 20 20 18.586zM29 17h-8v-2h8zm-18 0H3v-2h8zm2.414-5L12 13.414 5.586 7 7 5.586zm13-5L20 13.414 18.586 12 25 5.586zM17 11h-2V3h2z' style='fill-rule:nonzero' transform='translate(-3.692 -3.692)scale(1.23077)'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M17 29h-2v-8h2zm-3.586-9L7 26.414 5.586 25 12 18.586zm13 5L25 26.414 18.586 20 20 18.586zM29 17h-8v-2h8zm-18 0H3v-2h8zm2.414-5L12 13.414 5.586 7 7 5.586zm13-5L20 13.414 18.586 12 25 5.586zM17 11h-2V3h2z' style='fill-rule:nonzero' transform='translate(-3.692 -3.692)scale(1.23077)'/%3E%3C/svg%3E\")}.ag-icon-maximize:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M14 30H2V18h2.828v7.05l8.254-8.252 2.12 2.12-8.252 8.254H14zm4-28h12v12h-2.828V6.95l-8.254 8.252-2.12-2.12 8.252-8.254H18z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M14 30H2V18h2.828v7.05l8.254-8.252 2.12 2.12-8.252 8.254H14zm4-28h12v12h-2.828V6.95l-8.254 8.252-2.12-2.12 8.252-8.254H18z'/%3E%3C/svg%3E\")}.ag-icon-menu:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M20 13H0v-2h20zm0-6H0V5h20zm0-6H0v-2h20z' style='fill-rule:nonzero' transform='translate(6 9)'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M20 13H0v-2h20zm0-6H0V5h20zm0-6H0v-2h20z' style='fill-rule:nonzero' transform='translate(6 9)'/%3E%3C/svg%3E\")}.ag-icon-menu-alt:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M16 19a3 3 0 1 0 0-6 3 3 0 0 0 0 6M16 11a3 3 0 1 0 0-6 3 3 0 0 0 0 6M16 27a3 3 0 1 0 0-6 3 3 0 0 0 0 6'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M16 19a3 3 0 1 0 0-6 3 3 0 0 0 0 6M16 11a3 3 0 1 0 0-6 3 3 0 0 0 0 6M16 27a3 3 0 1 0 0-6 3 3 0 0 0 0 6'/%3E%3C/svg%3E\")}.ag-icon-minimize:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M2 18h12v12h-2.828v-7.05l-8.254 8.252-2.12-2.12 8.252-8.254H2zm28-4H18V2h2.828v7.05L29.082.798l2.12 2.12-8.252 8.254H30z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M2 18h12v12h-2.828v-7.05l-8.254 8.252-2.12-2.12 8.252-8.254H2zm28-4H18V2h2.828v7.05L29.082.798l2.12 2.12-8.252 8.254H30z'/%3E%3C/svg%3E\")}.ag-icon-minus:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M6.572 6.572a13.32 13.32 0 0 0 0 18.856 13.32 13.32 0 0 0 18.856 0 13.32 13.32 0 0 0 0-18.856 13.32 13.32 0 0 0-18.856 0m17.527 8.099v2.658H7.901v-2.658z' style='fill-rule:nonzero'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M6.572 6.572a13.32 13.32 0 0 0 0 18.856 13.32 13.32 0 0 0 18.856 0 13.32 13.32 0 0 0 0-18.856 13.32 13.32 0 0 0-18.856 0m17.527 8.099v2.658H7.901v-2.658z' style='fill-rule:nonzero'/%3E%3C/svg%3E\")}.ag-icon-next:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M10.94 6 9.06 7.88 17.167 16 9.06 24.12 10.94 26l10-10z' style='fill-rule:nonzero' transform='translate(1)'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M10.94 6 9.06 7.88 17.167 16 9.06 24.12 10.94 26l10-10z' style='fill-rule:nonzero' transform='translate(1)'/%3E%3C/svg%3E\")}.ag-icon-none:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enone%3C/title%3E%3Cg fill='%23000' fill-rule='nonzero'%3E%3Cpath d='M23.708 14.645 16 6.939l-7.708 7.706 1.416 1.416L16 9.767l6.292 6.294zM23.708 20.355 16 28.061l-7.708-7.706 1.416-1.416L16 25.233l6.292-6.294z'/%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enone%3C/title%3E%3Cg fill='%23000' fill-rule='nonzero'%3E%3Cpath d='M23.708 14.645 16 6.939l-7.708 7.706 1.416 1.416L16 9.767l6.292 6.294zM23.708 20.355 16 28.061l-7.708-7.706 1.416-1.416L16 25.233l6.292-6.294z'/%3E%3C/g%3E%3C/svg%3E\")}.ag-icon-not-allowed:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M16 2.667C8.64 2.667 2.667 8.64 2.667 16S8.64 29.333 16 29.333 29.333 23.36 29.333 16 23.36 2.667 16 2.667M5.333 16c0-5.893 4.773-10.667 10.667-10.667 2.467 0 4.733.84 6.533 2.253L7.586 22.533A10.54 10.54 0 0 1 5.333 16M16 26.667c-2.467 0-4.733-.84-6.533-2.253L24.414 9.467A10.54 10.54 0 0 1 26.667 16c0 5.893-4.773 10.667-10.667 10.667' style='fill-rule:nonzero'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M16 2.667C8.64 2.667 2.667 8.64 2.667 16S8.64 29.333 16 29.333 29.333 23.36 29.333 16 23.36 2.667 16 2.667M5.333 16c0-5.893 4.773-10.667 10.667-10.667 2.467 0 4.733.84 6.533 2.253L7.586 22.533A10.54 10.54 0 0 1 5.333 16M16 26.667c-2.467 0-4.733-.84-6.533-2.253L24.414 9.467A10.54 10.54 0 0 1 26.667 16c0 5.893-4.773 10.667-10.667 10.667' style='fill-rule:nonzero'/%3E%3C/svg%3E\")}.ag-icon-paste:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M25.334 4H19.76C19.2 2.453 17.733 1.333 16 1.333S12.8 2.453 12.24 4H6.667A2.675 2.675 0 0 0 4 6.667V28c0 1.467 1.2 2.667 2.667 2.667h18.667c1.467 0 2.667-1.2 2.667-2.667V6.667C28.001 5.2 26.801 4 25.334 4M16 4c.733 0 1.333.6 1.333 1.333s-.6 1.333-1.333 1.333-1.333-.6-1.333-1.333S15.267 4 16 4m9.333 24H6.666V6.667h2.667v4h13.333v-4h2.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M25.334 4H19.76C19.2 2.453 17.733 1.333 16 1.333S12.8 2.453 12.24 4H6.667A2.675 2.675 0 0 0 4 6.667V28c0 1.467 1.2 2.667 2.667 2.667h18.667c1.467 0 2.667-1.2 2.667-2.667V6.667C28.001 5.2 26.801 4 25.334 4M16 4c.733 0 1.333.6 1.333 1.333s-.6 1.333-1.333 1.333-1.333-.6-1.333-1.333S15.267 4 16 4m9.333 24H6.666V6.667h2.667v4h13.333v-4h2.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E\")}.ag-icon-pin:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m10.78 19.777-4.668-4.666s.032-1 .67-1.87c1.366-1.86 4.052-1.96 6.056-1.572l3.158-3.108c-.7-2.342 3.352-5.046 3.352-5.046l9.166 9.168q-.334.447-.67.894c-1.074 1.426-2.538 2.63-4.272 2.338l-3.32 3.218c.046.344.042.03.118 1.152.144 2.13-.64 4.324-2.632 5.34l-.746.364-4.798-4.798-7.292 7.294-1.416-1.416zm8.24-13.672c-.688.568-1.416 1.45-1.024 2.072l.49.722-4.986 4.988c-1.988-.506-4.346-.636-5.156.614l9.02 9.032q.14-.099.272-.21c1.226-1.08.764-3.04.498-4.9l4.79-4.79s1.47.938 2.936-.776l-6.79-6.79q-.026.019-.05.038' style='fill-rule:nonzero'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m10.78 19.777-4.668-4.666s.032-1 .67-1.87c1.366-1.86 4.052-1.96 6.056-1.572l3.158-3.108c-.7-2.342 3.352-5.046 3.352-5.046l9.166 9.168q-.334.447-.67.894c-1.074 1.426-2.538 2.63-4.272 2.338l-3.32 3.218c.046.344.042.03.118 1.152.144 2.13-.64 4.324-2.632 5.34l-.746.364-4.798-4.798-7.292 7.294-1.416-1.416zm8.24-13.672c-.688.568-1.416 1.45-1.024 2.072l.49.722-4.986 4.988c-1.988-.506-4.346-.636-5.156.614l9.02 9.032q.14-.099.272-.21c1.226-1.08.764-3.04.498-4.9l4.79-4.79s1.47.938 2.936-.776l-6.79-6.79q-.026.019-.05.038' style='fill-rule:nonzero'/%3E%3C/svg%3E\")}.ag-icon-pivot:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M25.128 2.002c2.56.096 4.772 2.292 4.87 4.87a712 712 0 0 1 0 18.256c-.096 2.56-2.292 4.772-4.87 4.87a712 712 0 0 1-18.256 0c-2.558-.096-4.772-2.29-4.87-4.87a712 712 0 0 1 0-18.256c.096-2.56 2.292-4.772 4.87-4.87a712 712 0 0 1 18.256 0m2.966 7.954H9.892v18.136c5.086.13 10.18.098 15.264-.096 1.48-.094 2.746-1.35 2.84-2.84.192-5.064.226-10.134.098-15.2M3.968 24.1q.015.528.036 1.056c.094 1.484 1.354 2.746 2.84 2.84l1.012.036V24.1zM22 15.414l-.292.294-1.416-1.416L23 11.586l2.708 2.706-1.416 1.416-.292-.294v3.592c-.032 2.604-2.246 4.892-4.872 4.992L15.414 24l.294.292-1.416 1.416L11.586 23l2.706-2.708 1.416 1.416-.322.32c3.372.03 6.578-.164 6.614-3.034zM3.88 18.038c.002 1.346.012 2.694.038 4.04h3.938v-4.04zm.05-6.062a681 681 0 0 0-.044 4.042h3.97v-4.042zm5.962-7.99Q8.449 3.999 7.006 4c-1.57.02-2.946 1.348-3.004 2.922q-.02 1.517-.042 3.034h3.896v-2.02h2.036zm14.244-.016v3.966h3.898q-.017-.546-.038-1.092c-.094-1.48-1.35-2.746-2.84-2.84q-.51-.019-1.02-.034m-8.14-.054q-2.035.022-4.07.048v3.972h4.07zm6.106.008a213 213 0 0 0-4.07-.022v4.034h4.07z' style='fill-rule:nonzero'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M25.128 2.002c2.56.096 4.772 2.292 4.87 4.87a712 712 0 0 1 0 18.256c-.096 2.56-2.292 4.772-4.87 4.87a712 712 0 0 1-18.256 0c-2.558-.096-4.772-2.29-4.87-4.87a712 712 0 0 1 0-18.256c.096-2.56 2.292-4.772 4.87-4.87a712 712 0 0 1 18.256 0m2.966 7.954H9.892v18.136c5.086.13 10.18.098 15.264-.096 1.48-.094 2.746-1.35 2.84-2.84.192-5.064.226-10.134.098-15.2M3.968 24.1q.015.528.036 1.056c.094 1.484 1.354 2.746 2.84 2.84l1.012.036V24.1zM22 15.414l-.292.294-1.416-1.416L23 11.586l2.708 2.706-1.416 1.416-.292-.294v3.592c-.032 2.604-2.246 4.892-4.872 4.992L15.414 24l.294.292-1.416 1.416L11.586 23l2.706-2.708 1.416 1.416-.322.32c3.372.03 6.578-.164 6.614-3.034zM3.88 18.038c.002 1.346.012 2.694.038 4.04h3.938v-4.04zm.05-6.062a681 681 0 0 0-.044 4.042h3.97v-4.042zm5.962-7.99Q8.449 3.999 7.006 4c-1.57.02-2.946 1.348-3.004 2.922q-.02 1.517-.042 3.034h3.896v-2.02h2.036zm14.244-.016v3.966h3.898q-.017-.546-.038-1.092c-.094-1.48-1.35-2.746-2.84-2.84q-.51-.019-1.02-.034m-8.14-.054q-2.035.022-4.07.048v3.972h4.07zm6.106.008a213 213 0 0 0-4.07-.022v4.034h4.07z' style='fill-rule:nonzero'/%3E%3C/svg%3E\")}.ag-icon-plus:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M6.572 6.572a13.32 13.32 0 0 0 0 18.856 13.32 13.32 0 0 0 18.856 0 13.32 13.32 0 0 0 0-18.856 13.32 13.32 0 0 0-18.856 0m17.527 8.099v2.658h-6.77v6.77h-2.658v-6.77h-6.77v-2.658h6.77v-6.77h2.658v6.77z' style='fill-rule:nonzero'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M6.572 6.572a13.32 13.32 0 0 0 0 18.856 13.32 13.32 0 0 0 18.856 0 13.32 13.32 0 0 0 0-18.856 13.32 13.32 0 0 0-18.856 0m17.527 8.099v2.658h-6.77v6.77h-2.658v-6.77h-6.77v-2.658h6.77v-6.77h2.658v6.77z' style='fill-rule:nonzero'/%3E%3C/svg%3E\")}.ag-icon-previous:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M21.94 7.88 20.06 6l-10 10 10 10 1.88-1.88L13.833 16z' style='fill-rule:nonzero'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M21.94 7.88 20.06 6l-10 10 10 10 1.88-1.88L13.833 16z' style='fill-rule:nonzero'/%3E%3C/svg%3E\")}.ag-icon-right:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m16 5.333-1.88 1.88 7.44 7.453H5.333v2.667H21.56l-7.44 7.453 1.88 1.88 10.667-10.667L16 5.332z' style='fill-rule:nonzero'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m16 5.333-1.88 1.88 7.44 7.453H5.333v2.667H21.56l-7.44 7.453 1.88 1.88 10.667-10.667L16 5.332z' style='fill-rule:nonzero'/%3E%3C/svg%3E\")}.ag-icon-save:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M15.708 2.355 8 10.061.292 2.355 1.708.939 8 7.233 14.292.939z' style='fill-rule:nonzero' transform='translate(8 14)'/%3E%3Cpath d='M5 26h22v2H5zM15 4h2v18h-2z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M15.708 2.355 8 10.061.292 2.355 1.708.939 8 7.233 14.292.939z' style='fill-rule:nonzero' transform='translate(8 14)'/%3E%3Cpath d='M5 26h22v2H5zM15 4h2v18h-2z'/%3E%3C/svg%3E\")}.ag-icon-small-down:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M7.334 10.667 16 21.334l8.667-10.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M7.334 10.667 16 21.334l8.667-10.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E\")}.ag-icon-small-left:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M21.333 7.334 10.666 16l10.667 8.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M21.333 7.334 10.666 16l10.667 8.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E\")}.ag-icon-small-right:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M10.667 24.666 21.334 16 10.667 7.333z' style='fill-rule:nonzero'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M10.667 24.666 21.334 16 10.667 7.333z' style='fill-rule:nonzero'/%3E%3C/svg%3E\")}.ag-icon-small-up:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M7.334 21.333 16 10.666l8.667 10.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M7.334 21.333 16 10.666l8.667 10.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E\")}.ag-icon-tick:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M11.586 22.96 27.718 6.828 29.84 8.95 11.586 27.202 2.4 18.016l2.12-2.122z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M11.586 22.96 27.718 6.828 29.84 8.95 11.586 27.202 2.4 18.016l2.12-2.122z'/%3E%3C/svg%3E\")}.ag-icon-tree-closed:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m11.94 6-1.88 1.88L18.167 16l-8.107 8.12L11.94 26l10-10z' style='fill-rule:nonzero'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m11.94 6-1.88 1.88L18.167 16l-8.107 8.12L11.94 26l10-10z' style='fill-rule:nonzero'/%3E%3C/svg%3E\")}.ag-icon-tree-indeterminate:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M6 13.5h20v3H6z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M6 13.5h20v3H6z'/%3E%3C/svg%3E\")}.ag-icon-tree-open:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M24.12 9.06 16 17.167 7.88 9.06 6 10.94l10 10 10-10z' style='fill-rule:nonzero' transform='translate(0 1)'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M24.12 9.06 16 17.167 7.88 9.06 6 10.94l10 10 10-10z' style='fill-rule:nonzero' transform='translate(0 1)'/%3E%3C/svg%3E\")}.ag-icon-unlinked:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M22.667 9.333h-5.333v2.533h5.333a4.136 4.136 0 0 1 4.133 4.133c0 1.907-1.307 3.507-3.08 3.973l1.947 1.947c2.173-1.107 3.667-3.32 3.667-5.92a6.67 6.67 0 0 0-6.667-6.667zm-1.334 5.334h-2.92l2.667 2.667h.253zM2.667 5.693 6.814 9.84A6.65 6.65 0 0 0 2.667 16a6.67 6.67 0 0 0 6.667 6.667h5.333v-2.533H9.334a4.136 4.136 0 0 1-4.133-4.133c0-2.12 1.613-3.867 3.68-4.093l2.76 2.76h-.973v2.667h3.64l3.027 3.027v2.307h2.307l5.347 5.333 1.68-1.68L4.362 4.002 2.669 5.695z' style='fill-rule:nonzero'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M22.667 9.333h-5.333v2.533h5.333a4.136 4.136 0 0 1 4.133 4.133c0 1.907-1.307 3.507-3.08 3.973l1.947 1.947c2.173-1.107 3.667-3.32 3.667-5.92a6.67 6.67 0 0 0-6.667-6.667zm-1.334 5.334h-2.92l2.667 2.667h.253zM2.667 5.693 6.814 9.84A6.65 6.65 0 0 0 2.667 16a6.67 6.67 0 0 0 6.667 6.667h5.333v-2.533H9.334a4.136 4.136 0 0 1-4.133-4.133c0-2.12 1.613-3.867 3.68-4.093l2.76 2.76h-.973v2.667h3.64l3.027 3.027v2.307h2.307l5.347 5.333 1.68-1.68L4.362 4.002 2.669 5.695z' style='fill-rule:nonzero'/%3E%3C/svg%3E\")}.ag-icon-up:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m5.333 16 1.88 1.88 7.453-7.44v16.227h2.667V10.44l7.44 7.453L26.666 16 15.999 5.333 5.332 16z' style='fill-rule:nonzero'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m5.333 16 1.88 1.88 7.453-7.44v16.227h2.667V10.44l7.44 7.453L26.666 16 15.999 5.333 5.332 16z' style='fill-rule:nonzero'/%3E%3C/svg%3E\")}.ag-icon-grip:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M8 24H6v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zM8 18H6v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zM8 12H6V8h2zm6 0h-2V8h2zm6 0h-2V8h2zm6 0h-2V8h2z' style='fill-rule:nonzero'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M8 24H6v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zM8 18H6v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zM8 12H6V8h2zm6 0h-2V8h2zm6 0h-2V8h2zm6 0h-2V8h2z' style='fill-rule:nonzero'/%3E%3C/svg%3E\")}.ag-icon-settings:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M30 8h-4.1c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2v2h14.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30zm-9 4c-1.7 0-3-1.3-3-3s1.3-3 3-3 3 1.3 3 3-1.3 3-3 3M2 24h4.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30v-2H15.9c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2zm9-4c1.7 0 3 1.3 3 3s-1.3 3-3 3-3-1.3-3-3 1.3-3 3-3'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M30 8h-4.1c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2v2h14.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30zm-9 4c-1.7 0-3-1.3-3-3s1.3-3 3-3 3 1.3 3 3-1.3 3-3 3M2 24h4.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30v-2H15.9c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2zm9-4c1.7 0 3 1.3 3 3s-1.3 3-3 3-3-1.3-3-3 1.3-3 3-3'/%3E%3C/svg%3E\")}"),zu=GB("iconSet","material").withCSS(".ag-icon:before{background-color:currentColor;content:\"\";display:block;height:var(--ag-icon-size);-webkit-mask-image:linear-gradient(#0000,#0000);mask-image:linear-gradient(#0000,#0000);-webkit-mask-size:contain;mask-size:contain;width:var(--ag-icon-size)}.ag-icon-aggregation:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eaggregation%3C/title%3E%3Cpath d='M24 5.333H8V8l8.667 8L8 24v2.667h16v-4h-9.333L21.334 16l-6.667-6.667H24z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eaggregation%3C/title%3E%3Cpath d='M24 5.333H8V8l8.667 8L8 24v2.667h16v-4h-9.333L21.334 16l-6.667-6.667H24z'/%3E%3C/svg%3E\")}.ag-icon-arrows:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Earrows%3C/title%3E%3Cpath d='M13.333 11.556h5.333V8h3.556L16 1.778 9.778 8h3.556zm-1.777 1.777H8V9.777l-6.222 6.222L8 22.221v-3.556h3.556zM30.222 16 24 9.778v3.556h-3.556v5.333H24v3.556l6.222-6.222zm-11.555 4.444h-5.333V24H9.778L16 30.222 22.222 24h-3.556z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Earrows%3C/title%3E%3Cpath d='M13.333 11.556h5.333V8h3.556L16 1.778 9.778 8h3.556zm-1.777 1.777H8V9.777l-6.222 6.222L8 22.221v-3.556h3.556zM30.222 16 24 9.778v3.556h-3.556v5.333H24v3.556l6.222-6.222zm-11.555 4.444h-5.333V24H9.778L16 30.222 22.222 24h-3.556z'/%3E%3C/svg%3E\")}.ag-icon-asc:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Easc%3C/title%3E%3Cpath d='m5.333 16 1.88 1.88 7.453-7.44v16.227h2.667V10.44l7.44 7.453L26.666 16 15.999 5.333z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Easc%3C/title%3E%3Cpath d='m5.333 16 1.88 1.88 7.453-7.44v16.227h2.667V10.44l7.44 7.453L26.666 16 15.999 5.333z'/%3E%3C/svg%3E\")}.ag-icon-cancel:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecancel%3C/title%3E%3Cpath d='M16 2.667C8.627 2.667 2.667 8.627 2.667 16S8.627 29.333 16 29.333 29.333 23.373 29.333 16 23.373 2.667 16 2.667m6.667 18.12-1.88 1.88L16 17.88l-4.787 4.787-1.88-1.88L14.12 16l-4.787-4.787 1.88-1.88L16 14.12l4.787-4.787 1.88 1.88L17.88 16z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecancel%3C/title%3E%3Cpath d='M16 2.667C8.627 2.667 2.667 8.627 2.667 16S8.627 29.333 16 29.333 29.333 23.373 29.333 16 23.373 2.667 16 2.667m6.667 18.12-1.88 1.88L16 17.88l-4.787 4.787-1.88-1.88L14.12 16l-4.787-4.787 1.88-1.88L16 14.12l4.787-4.787 1.88 1.88L17.88 16z'/%3E%3C/svg%3E\")}.ag-icon-chart:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Echart%3C/title%3E%3Cpath d='M6.667 12.267h4v13.067h-4zm7.466-5.6h3.733v18.667h-3.733zM21.6 17.333h3.733v8H21.6z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Echart%3C/title%3E%3Cpath d='M6.667 12.267h4v13.067h-4zm7.466-5.6h3.733v18.667h-3.733zM21.6 17.333h3.733v8H21.6z'/%3E%3C/svg%3E\")}.ag-icon-color-picker:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecolor-picker%3C/title%3E%3Cpath d='M23.907 17.587 10.574 4.254l-1.88 1.88 3.173 3.173-8.28 8.28 10.16 10.16zm-16.547 0 6.387-6.387 6.387 6.387H7.361zm18.387 2s-2.667 2.893-2.667 4.667c0 1.467 1.2 2.667 2.667 2.667s2.667-1.2 2.667-2.667c0-1.773-2.667-4.667-2.667-4.667'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecolor-picker%3C/title%3E%3Cpath d='M23.907 17.587 10.574 4.254l-1.88 1.88 3.173 3.173-8.28 8.28 10.16 10.16zm-16.547 0 6.387-6.387 6.387 6.387H7.361zm18.387 2s-2.667 2.893-2.667 4.667c0 1.467 1.2 2.667 2.667 2.667s2.667-1.2 2.667-2.667c0-1.773-2.667-4.667-2.667-4.667'/%3E%3C/svg%3E\")}.ag-icon-columns:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecolumns%3C/title%3E%3Cpath d='M5.333 10.667h5.333V5.334H5.333zm8 16h5.333v-5.333h-5.333zm-8 0h5.333v-5.333H5.333zm0-8h5.333v-5.333H5.333zm8 0h5.333v-5.333h-5.333zm8-13.334v5.333h5.333V5.333zm-8 5.334h5.333V5.334h-5.333zm8 8h5.333v-5.333h-5.333zm0 8h5.333v-5.333h-5.333z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecolumns%3C/title%3E%3Cpath d='M5.333 10.667h5.333V5.334H5.333zm8 16h5.333v-5.333h-5.333zm-8 0h5.333v-5.333H5.333zm0-8h5.333v-5.333H5.333zm8 0h5.333v-5.333h-5.333zm8-13.334v5.333h5.333V5.333zm-8 5.334h5.333V5.334h-5.333zm8 8h5.333v-5.333h-5.333zm0 8h5.333v-5.333h-5.333z'/%3E%3C/svg%3E\")}.ag-icon-contracted:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Econtracted%3C/title%3E%3Cpath d='m12.94 8-1.88 1.88L17.167 16l-6.107 6.12L12.94 24l8-8z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Econtracted%3C/title%3E%3Cpath d='m12.94 8-1.88 1.88L17.167 16l-6.107 6.12L12.94 24l8-8z'/%3E%3C/svg%3E\")}.ag-icon-copy:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecopy%3C/title%3E%3Cpath d='M22 1.333H6A2.675 2.675 0 0 0 3.333 4v18.667H6V4h16zm4 5.334H11.333a2.675 2.675 0 0 0-2.667 2.667v18.667c0 1.467 1.2 2.667 2.667 2.667H26c1.467 0 2.667-1.2 2.667-2.667V9.334c0-1.467-1.2-2.667-2.667-2.667M26 28H11.333V9.333H26z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecopy%3C/title%3E%3Cpath d='M22 1.333H6A2.675 2.675 0 0 0 3.333 4v18.667H6V4h16zm4 5.334H11.333a2.675 2.675 0 0 0-2.667 2.667v18.667c0 1.467 1.2 2.667 2.667 2.667H26c1.467 0 2.667-1.2 2.667-2.667V9.334c0-1.467-1.2-2.667-2.667-2.667M26 28H11.333V9.333H26z'/%3E%3C/svg%3E\")}.ag-icon-cross:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecross%3C/title%3E%3Cpath d='m25.333 8.547-1.88-1.88L16 14.12 8.547 6.667l-1.88 1.88L14.12 16l-7.453 7.453 1.88 1.88L16 17.88l7.453 7.453 1.88-1.88L17.88 16z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecross%3C/title%3E%3Cpath d='m25.333 8.547-1.88-1.88L16 14.12 8.547 6.667l-1.88 1.88L14.12 16l-7.453 7.453 1.88 1.88L16 17.88l7.453 7.453 1.88-1.88L17.88 16z'/%3E%3C/svg%3E\")}.ag-icon-csv:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='matrix(.06285 0 0 .06285 3.934 -.054)'/%3E%3Cpath d='M.688-.226a.2.2 0 0 1-.017.074.28.28 0 0 1-.145.14.412.412 0 0 1-.234.013.28.28 0 0 1-.202-.168.468.468 0 0 1-.04-.19q0-.086.025-.155a.319.319 0 0 1 .182-.191.4.4 0 0 1 .134-.025q.087 0 .155.035a.3.3 0 0 1 .104.085.17.17 0 0 1 .036.097.06.06 0 0 1-.018.044.06.06 0 0 1-.042.019.06.06 0 0 1-.042-.013.2.2 0 0 1-.031-.046.2.2 0 0 0-.066-.079.16.16 0 0 0-.095-.027.17.17 0 0 0-.142.068.3.3 0 0 0-.053.193.4.4 0 0 0 .023.139.2.2 0 0 0 .067.083.2.2 0 0 0 .1.027q.063 0 .106-.031a.2.2 0 0 0 .065-.091.2.2 0 0 1 .023-.046q.014-.018.044-.018a.06.06 0 0 1 .044.018.06.06 0 0 1 .019.045' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 7.122 25.977)'/%3E%3Cpath d='M.622-.215a.2.2 0 0 1-.033.117.23.23 0 0 1-.098.081.4.4 0 0 1-.153.029.34.34 0 0 1-.175-.04.23.23 0 0 1-.079-.077.17.17 0 0 1-.031-.093q0-.027.019-.045a.06.06 0 0 1 .046-.019.06.06 0 0 1 .039.014.1.1 0 0 1 .027.044.3.3 0 0 0 .03.057q.015.023.044.038.03.015.076.015.065 0 .105-.03a.09.09 0 0 0 .04-.075.08.08 0 0 0-.022-.058.14.14 0 0 0-.056-.034 1 1 0 0 0-.092-.025.7.7 0 0 1-.129-.042.2.2 0 0 1-.083-.066.17.17 0 0 1-.03-.104q0-.058.032-.105a.2.2 0 0 1 .093-.07.4.4 0 0 1 .144-.025q.066 0 .114.016a.3.3 0 0 1 .08.044.2.2 0 0 1 .046.057q.015.03.015.058a.07.07 0 0 1-.018.046.06.06 0 0 1-.046.021q-.025 0-.038-.012a.2.2 0 0 1-.028-.041.2.2 0 0 0-.047-.063Q.387-.625.326-.625a.15.15 0 0 0-.09.025q-.035.024-.035.059 0 .021.012.037a.1.1 0 0 0 .032.027.4.4 0 0 0 .111.036q.06.015.11.031.048.018.083.042a.2.2 0 0 1 .054.062.2.2 0 0 1 .019.091' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 13.339 25.977)'/%3E%3Cpath d='m.184-.633.162.48.163-.483q.013-.038.019-.053a.062.062 0 0 1 .061-.039q.018 0 .034.009a.1.1 0 0 1 .025.025q.009.015.009.031L.654-.64l-.007.025-.009.024-.173.468-.019.051a.2.2 0 0 1-.021.042.1.1 0 0 1-.033.03.1.1 0 0 1-.049.012.1.1 0 0 1-.05-.011A.1.1 0 0 1 .26-.03a.2.2 0 0 1-.021-.042L.22-.123.05-.587.041-.612.033-.638.03-.662q0-.025.02-.046a.07.07 0 0 1 .05-.02q.037 0 .053.023.015.023.031.072' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 18.94 25.977)'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='matrix(.06285 0 0 .06285 3.934 -.054)'/%3E%3Cpath d='M.688-.226a.2.2 0 0 1-.017.074.28.28 0 0 1-.145.14.412.412 0 0 1-.234.013.28.28 0 0 1-.202-.168.468.468 0 0 1-.04-.19q0-.086.025-.155a.319.319 0 0 1 .182-.191.4.4 0 0 1 .134-.025q.087 0 .155.035a.3.3 0 0 1 .104.085.17.17 0 0 1 .036.097.06.06 0 0 1-.018.044.06.06 0 0 1-.042.019.06.06 0 0 1-.042-.013.2.2 0 0 1-.031-.046.2.2 0 0 0-.066-.079.16.16 0 0 0-.095-.027.17.17 0 0 0-.142.068.3.3 0 0 0-.053.193.4.4 0 0 0 .023.139.2.2 0 0 0 .067.083.2.2 0 0 0 .1.027q.063 0 .106-.031a.2.2 0 0 0 .065-.091.2.2 0 0 1 .023-.046q.014-.018.044-.018a.06.06 0 0 1 .044.018.06.06 0 0 1 .019.045' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 7.122 25.977)'/%3E%3Cpath d='M.622-.215a.2.2 0 0 1-.033.117.23.23 0 0 1-.098.081.4.4 0 0 1-.153.029.34.34 0 0 1-.175-.04.23.23 0 0 1-.079-.077.17.17 0 0 1-.031-.093q0-.027.019-.045a.06.06 0 0 1 .046-.019.06.06 0 0 1 .039.014.1.1 0 0 1 .027.044.3.3 0 0 0 .03.057q.015.023.044.038.03.015.076.015.065 0 .105-.03a.09.09 0 0 0 .04-.075.08.08 0 0 0-.022-.058.14.14 0 0 0-.056-.034 1 1 0 0 0-.092-.025.7.7 0 0 1-.129-.042.2.2 0 0 1-.083-.066.17.17 0 0 1-.03-.104q0-.058.032-.105a.2.2 0 0 1 .093-.07.4.4 0 0 1 .144-.025q.066 0 .114.016a.3.3 0 0 1 .08.044.2.2 0 0 1 .046.057q.015.03.015.058a.07.07 0 0 1-.018.046.06.06 0 0 1-.046.021q-.025 0-.038-.012a.2.2 0 0 1-.028-.041.2.2 0 0 0-.047-.063Q.387-.625.326-.625a.15.15 0 0 0-.09.025q-.035.024-.035.059 0 .021.012.037a.1.1 0 0 0 .032.027.4.4 0 0 0 .111.036q.06.015.11.031.048.018.083.042a.2.2 0 0 1 .054.062.2.2 0 0 1 .019.091' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 13.339 25.977)'/%3E%3Cpath d='m.184-.633.162.48.163-.483q.013-.038.019-.053a.062.062 0 0 1 .061-.039q.018 0 .034.009a.1.1 0 0 1 .025.025q.009.015.009.031L.654-.64l-.007.025-.009.024-.173.468-.019.051a.2.2 0 0 1-.021.042.1.1 0 0 1-.033.03.1.1 0 0 1-.049.012.1.1 0 0 1-.05-.011A.1.1 0 0 1 .26-.03a.2.2 0 0 1-.021-.042L.22-.123.05-.587.041-.612.033-.638.03-.662q0-.025.02-.046a.07.07 0 0 1 .05-.02q.037 0 .053.023.015.023.031.072' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 18.94 25.977)'/%3E%3C/svg%3E\")}.ag-icon-cut:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m19 3-6 6 2 2 7-7V3m-10 9.5a.503.503 0 0 1-.5-.5c0-.274.226-.5.5-.5s.5.226.5.5-.226.5-.5.5M6 20c-1.097 0-2-.903-2-2a2 2 0 0 1 2-2c1.097 0 2 .903 2 2a2 2 0 0 1-2 2M6 8c-1.097 0-2-.903-2-2a2 2 0 0 1 2-2c1.097 0 2 .903 2 2a2 2 0 0 1-2 2m3.64-.36c.23-.5.36-1.05.36-1.64 0-2.194-1.806-4-4-4S2 3.806 2 6s1.806 4 4 4c.59 0 1.14-.13 1.64-.36L10 12l-2.36 2.36C7.14 14.13 6.59 14 6 14c-2.194 0-4 1.806-4 4s1.806 4 4 4 4-1.806 4-4c0-.59-.13-1.14-.36-1.64L12 14l7 7h3v-1z' style='fill-rule:nonzero' transform='translate(4 4)'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m19 3-6 6 2 2 7-7V3m-10 9.5a.503.503 0 0 1-.5-.5c0-.274.226-.5.5-.5s.5.226.5.5-.226.5-.5.5M6 20c-1.097 0-2-.903-2-2a2 2 0 0 1 2-2c1.097 0 2 .903 2 2a2 2 0 0 1-2 2M6 8c-1.097 0-2-.903-2-2a2 2 0 0 1 2-2c1.097 0 2 .903 2 2a2 2 0 0 1-2 2m3.64-.36c.23-.5.36-1.05.36-1.64 0-2.194-1.806-4-4-4S2 3.806 2 6s1.806 4 4 4c.59 0 1.14-.13 1.64-.36L10 12l-2.36 2.36C7.14 14.13 6.59 14 6 14c-2.194 0-4 1.806-4 4s1.806 4 4 4 4-1.806 4-4c0-.59-.13-1.14-.36-1.64L12 14l7 7h3v-1z' style='fill-rule:nonzero' transform='translate(4 4)'/%3E%3C/svg%3E\")}.ag-icon-desc:before,.ag-icon-down:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Edesc%3C/title%3E%3Cpath d='m26.667 16-1.88-1.88-7.453 7.44V5.333h-2.667V21.56l-7.44-7.453L5.334 16l10.667 10.667L26.668 16z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Edesc%3C/title%3E%3Cpath d='m26.667 16-1.88-1.88-7.453 7.44V5.333h-2.667V21.56l-7.44-7.453L5.334 16l10.667 10.667L26.668 16z'/%3E%3C/svg%3E\")}.ag-icon-excel:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='matrix(.06285 0 0 .06285 3.934 -.054)'/%3E%3Cpath d='m.052-.139.16-.234-.135-.208a.4.4 0 0 1-.028-.052.1.1 0 0 1-.01-.042.05.05 0 0 1 .018-.037.07.07 0 0 1 .045-.016q.03 0 .047.018a1 1 0 0 1 .047.066l.107.174.115-.174.024-.038.019-.026.021-.015a.1.1 0 0 1 .027-.005.06.06 0 0 1 .044.016.05.05 0 0 1 .018.039q0 .033-.038.089l-.141.211.152.234a.3.3 0 0 1 .03.051.1.1 0 0 1 .009.038.1.1 0 0 1-.008.031.1.1 0 0 1-.024.023.1.1 0 0 1-.034.008.1.1 0 0 1-.035-.008.1.1 0 0 1-.023-.022L.427-.067.301-.265l-.134.204-.022.034-.016.019a.1.1 0 0 1-.022.015.1.1 0 0 1-.03.005.06.06 0 0 1-.044-.016.06.06 0 0 1-.017-.047q0-.036.036-.088' style='fill-rule:nonzero' transform='matrix(17.82892 0 0 16.50777 10.371 25.928)'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='matrix(.06285 0 0 .06285 3.934 -.054)'/%3E%3Cpath d='m.052-.139.16-.234-.135-.208a.4.4 0 0 1-.028-.052.1.1 0 0 1-.01-.042.05.05 0 0 1 .018-.037.07.07 0 0 1 .045-.016q.03 0 .047.018a1 1 0 0 1 .047.066l.107.174.115-.174.024-.038.019-.026.021-.015a.1.1 0 0 1 .027-.005.06.06 0 0 1 .044.016.05.05 0 0 1 .018.039q0 .033-.038.089l-.141.211.152.234a.3.3 0 0 1 .03.051.1.1 0 0 1 .009.038.1.1 0 0 1-.008.031.1.1 0 0 1-.024.023.1.1 0 0 1-.034.008.1.1 0 0 1-.035-.008.1.1 0 0 1-.023-.022L.427-.067.301-.265l-.134.204-.022.034-.016.019a.1.1 0 0 1-.022.015.1.1 0 0 1-.03.005.06.06 0 0 1-.044-.016.06.06 0 0 1-.017-.047q0-.036.036-.088' style='fill-rule:nonzero' transform='matrix(17.82892 0 0 16.50777 10.371 25.928)'/%3E%3C/svg%3E\")}.ag-icon-expanded:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eexpanded%3C/title%3E%3Cpath d='M20.94 9.88 19.06 8l-8 8 8 8 1.88-1.88L14.833 16z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eexpanded%3C/title%3E%3Cpath d='M20.94 9.88 19.06 8l-8 8 8 8 1.88-1.88L14.833 16z'/%3E%3C/svg%3E\")}.ag-icon-eye-slash:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eeye-slash%3C/title%3E%3Cpath d='M21.106 15.088A5.19 5.19 0 0 0 16 10.814a5.17 5.17 0 0 0-3.668 1.522L9.866 9.868a12.2 12.2 0 0 1 6.133-1.646c5.186 0 9.614 3.225 11.408 7.778a12.34 12.34 0 0 1-5.276 6.133l-2.468-2.466a5.17 5.17 0 0 0 1.449-2.802h-2.123c-.148.508-.42.964-.782 1.33l-1.33-1.33h-2.514l2.196 2.196q-.272.049-.56.05a3.11 3.11 0 0 1-2.99-2.245h-2.123a5.19 5.19 0 0 0 7.3 3.836l2.247 2.247a12.2 12.2 0 0 1-4.434.828c-5.186 0-9.614-3.225-11.408-7.778a12.3 12.3 0 0 1 3.781-5.111l2.924 2.924a5.1 5.1 0 0 0-.404 1.275h4.206l-1.296-1.296a3.1 3.1 0 0 1 2.196-.903c1.404 0 2.587.924 2.976 2.199h2.13z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eeye-slash%3C/title%3E%3Cpath d='M21.106 15.088A5.19 5.19 0 0 0 16 10.814a5.17 5.17 0 0 0-3.668 1.522L9.866 9.868a12.2 12.2 0 0 1 6.133-1.646c5.186 0 9.614 3.225 11.408 7.778a12.34 12.34 0 0 1-5.276 6.133l-2.468-2.466a5.17 5.17 0 0 0 1.449-2.802h-2.123c-.148.508-.42.964-.782 1.33l-1.33-1.33h-2.514l2.196 2.196q-.272.049-.56.05a3.11 3.11 0 0 1-2.99-2.245h-2.123a5.19 5.19 0 0 0 7.3 3.836l2.247 2.247a12.2 12.2 0 0 1-4.434.828c-5.186 0-9.614-3.225-11.408-7.778a12.3 12.3 0 0 1 3.781-5.111l2.924 2.924a5.1 5.1 0 0 0-.404 1.275h4.206l-1.296-1.296a3.1 3.1 0 0 1 2.196-.903c1.404 0 2.587.924 2.976 2.199h2.13z'/%3E%3C/svg%3E\")}.ag-icon-eye:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eeye%3C/title%3E%3Cpath d='M16 8.222c-5.186 0-9.614 3.225-11.408 7.778 1.794 4.553 6.222 7.778 11.408 7.778S25.614 20.553 27.408 16C25.614 11.447 21.186 8.222 16 8.222m0 12.964c-2.862 0-5.186-2.324-5.186-5.186s2.324-5.186 5.186-5.186 5.186 2.324 5.186 5.186-2.324 5.186-5.186 5.186m0-8.297c-1.721 0-3.111 1.39-3.111 3.111s1.39 3.111 3.111 3.111 3.111-1.39 3.111-3.111-1.39-3.111-3.111-3.111'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eeye%3C/title%3E%3Cpath d='M16 8.222c-5.186 0-9.614 3.225-11.408 7.778 1.794 4.553 6.222 7.778 11.408 7.778S25.614 20.553 27.408 16C25.614 11.447 21.186 8.222 16 8.222m0 12.964c-2.862 0-5.186-2.324-5.186-5.186s2.324-5.186 5.186-5.186 5.186 2.324 5.186 5.186-2.324 5.186-5.186 5.186m0-8.297c-1.721 0-3.111 1.39-3.111 3.111s1.39 3.111 3.111 3.111 3.111-1.39 3.111-3.111-1.39-3.111-3.111-3.111'/%3E%3C/svg%3E\")}.ag-icon-filter:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Efilter%3C/title%3E%3Cpath d='M13.333 24h5.333v-2.667h-5.333zM4 8v2.667h24V8zm4 9.333h16v-2.667H8z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Efilter%3C/title%3E%3Cpath d='M13.333 24h5.333v-2.667h-5.333zM4 8v2.667h24V8zm4 9.333h16v-2.667H8z'/%3E%3C/svg%3E\")}.ag-icon-first:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Efirst%3C/title%3E%3Cpath d='M24.273 22.12 18.153 16l6.12-6.12L22.393 8l-8 8 8 8zM7.727 8h2.667v16H7.727z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Efirst%3C/title%3E%3Cpath d='M24.273 22.12 18.153 16l6.12-6.12L22.393 8l-8 8 8 8zM7.727 8h2.667v16H7.727z'/%3E%3C/svg%3E\")}.ag-icon-group:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Egroup%3C/title%3E%3Cpath d='M18.667 21.333h8.889A3.555 3.555 0 0 1 24 24.889h-5.333zm8.888-7.111v3.556h-8.889v-3.556zM24 7.111a3.555 3.555 0 0 1 3.556 3.556h-16V7.111zm-8.889 17.778h-3.556v-3.556h3.556zm0-7.111h-3.556v-3.556h3.556zM8 10.667H4.444A3.555 3.555 0 0 1 8 7.111z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Egroup%3C/title%3E%3Cpath d='M18.667 21.333h8.889A3.555 3.555 0 0 1 24 24.889h-5.333zm8.888-7.111v3.556h-8.889v-3.556zM24 7.111a3.555 3.555 0 0 1 3.556 3.556h-16V7.111zm-8.889 17.778h-3.556v-3.556h3.556zm0-7.111h-3.556v-3.556h3.556zM8 10.667H4.444A3.555 3.555 0 0 1 8 7.111z'/%3E%3C/svg%3E\")}.ag-icon-last:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Elast%3C/title%3E%3Cpath d='m7.727 9.88 6.12 6.12-6.12 6.12L9.607 24l8-8-8-8zM21.607 8h2.667v16h-2.667z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Elast%3C/title%3E%3Cpath d='m7.727 9.88 6.12 6.12-6.12 6.12L9.607 24l8-8-8-8zM21.607 8h2.667v16h-2.667z'/%3E%3C/svg%3E\")}.ag-icon-left:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eleft%3C/title%3E%3Cpath d='M26.667 14.667H10.44l7.453-7.453L16 5.334 5.333 16.001 16 26.668l1.88-1.88-7.44-7.453h16.227v-2.667z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eleft%3C/title%3E%3Cpath d='M26.667 14.667H10.44l7.453-7.453L16 5.334 5.333 16.001 16 26.668l1.88-1.88-7.44-7.453h16.227v-2.667z'/%3E%3C/svg%3E\")}.ag-icon-linked:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Elinked%3C/title%3E%3Cpath d='M5.2 16a4.136 4.136 0 0 1 4.133-4.133h5.333V9.334H9.333c-3.68 0-6.667 2.987-6.667 6.667s2.987 6.667 6.667 6.667h5.333v-2.533H9.333A4.136 4.136 0 0 1 5.2 16.002zm5.467 1.333h10.667v-2.667H10.667zm12-8h-5.333v2.533h5.333c2.28 0 4.133 1.853 4.133 4.133s-1.853 4.133-4.133 4.133h-5.333v2.533h5.333c3.68 0 6.667-2.987 6.667-6.667s-2.987-6.667-6.667-6.667z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Elinked%3C/title%3E%3Cpath d='M5.2 16a4.136 4.136 0 0 1 4.133-4.133h5.333V9.334H9.333c-3.68 0-6.667 2.987-6.667 6.667s2.987 6.667 6.667 6.667h5.333v-2.533H9.333A4.136 4.136 0 0 1 5.2 16.002zm5.467 1.333h10.667v-2.667H10.667zm12-8h-5.333v2.533h5.333c2.28 0 4.133 1.853 4.133 4.133s-1.853 4.133-4.133 4.133h-5.333v2.533h5.333c3.68 0 6.667-2.987 6.667-6.667s-2.987-6.667-6.667-6.667z'/%3E%3C/svg%3E\")}.ag-icon-loading:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eloading%3C/title%3E%3Cpath d='m17.778 11.708 3.25-3.251 2.516 2.516-3.251 3.25h4.597v3.556h-4.597l3.251 3.25-2.516 2.516-3.25-3.251v4.597h-3.556v-4.597l-3.25 3.251-2.516-2.516 3.251-3.25H7.11v-3.556h4.597l-3.251-3.25 2.516-2.516 3.25 3.251V7.111h3.556zm-3.251 7.847h2.944l2.084-2.084v-2.944l-2.084-2.084h-2.944l-2.084 2.084v2.944z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eloading%3C/title%3E%3Cpath d='m17.778 11.708 3.25-3.251 2.516 2.516-3.251 3.25h4.597v3.556h-4.597l3.251 3.25-2.516 2.516-3.25-3.251v4.597h-3.556v-4.597l-3.25 3.251-2.516-2.516 3.251-3.25H7.11v-3.556h4.597l-3.251-3.25 2.516-2.516 3.25 3.251V7.111h3.556zm-3.251 7.847h2.944l2.084-2.084v-2.944l-2.084-2.084h-2.944l-2.084 2.084v2.944z'/%3E%3C/svg%3E\")}.ag-icon-maximize:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Emaximize%3C/title%3E%3Cpath d='M4 4h24v2.667H4z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Emaximize%3C/title%3E%3Cpath d='M4 4h24v2.667H4z'/%3E%3C/svg%3E\")}.ag-icon-menu:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Emenu%3C/title%3E%3Cpath d='M4 24h24v-2.667H4zm0-6.667h24v-2.667H4zM4 8v2.667h24V8z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Emenu%3C/title%3E%3Cpath d='M4 24h24v-2.667H4zm0-6.667h24v-2.667H4zM4 8v2.667h24V8z'/%3E%3C/svg%3E\")}.ag-icon-menu-alt:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M16 26.667a2.57 2.57 0 0 1-1.883-.784A2.57 2.57 0 0 1 13.333 24q0-1.1.784-1.883A2.57 2.57 0 0 1 16 21.333q1.1 0 1.883.784.784.783.784 1.883t-.784 1.883a2.57 2.57 0 0 1-1.883.784m0-8a2.57 2.57 0 0 1-1.883-.784A2.57 2.57 0 0 1 13.333 16q0-1.1.784-1.883A2.57 2.57 0 0 1 16 13.333q1.1 0 1.883.784.784.783.784 1.883t-.784 1.883a2.57 2.57 0 0 1-1.883.784m0-8a2.57 2.57 0 0 1-1.883-.784A2.57 2.57 0 0 1 13.333 8q0-1.1.784-1.883A2.57 2.57 0 0 1 16 5.333q1.1 0 1.883.784.784.783.784 1.883t-.784 1.883a2.57 2.57 0 0 1-1.883.784'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M16 26.667a2.57 2.57 0 0 1-1.883-.784A2.57 2.57 0 0 1 13.333 24q0-1.1.784-1.883A2.57 2.57 0 0 1 16 21.333q1.1 0 1.883.784.784.783.784 1.883t-.784 1.883a2.57 2.57 0 0 1-1.883.784m0-8a2.57 2.57 0 0 1-1.883-.784A2.57 2.57 0 0 1 13.333 16q0-1.1.784-1.883A2.57 2.57 0 0 1 16 13.333q1.1 0 1.883.784.784.783.784 1.883t-.784 1.883a2.57 2.57 0 0 1-1.883.784m0-8a2.57 2.57 0 0 1-1.883-.784A2.57 2.57 0 0 1 13.333 8q0-1.1.784-1.883A2.57 2.57 0 0 1 16 5.333q1.1 0 1.883.784.784.783.784 1.883t-.784 1.883a2.57 2.57 0 0 1-1.883.784'/%3E%3C/svg%3E\")}.ag-icon-minimize:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eminimize%3C/title%3E%3Cpath d='M8 25.333h16V28H8z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eminimize%3C/title%3E%3Cpath d='M8 25.333h16V28H8z'/%3E%3C/svg%3E\")}.ag-icon-minus:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M6.572 6.572a13.32 13.32 0 0 0 0 18.856 13.32 13.32 0 0 0 18.856 0 13.32 13.32 0 0 0 0-18.856 13.32 13.32 0 0 0-18.856 0m17.527 8.099v2.658H7.901v-2.658z' style='fill-rule:nonzero'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M6.572 6.572a13.32 13.32 0 0 0 0 18.856 13.32 13.32 0 0 0 18.856 0 13.32 13.32 0 0 0 0-18.856 13.32 13.32 0 0 0-18.856 0m17.527 8.099v2.658H7.901v-2.658z' style='fill-rule:nonzero'/%3E%3C/svg%3E\")}.ag-icon-next:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enext%3C/title%3E%3Cpath d='m12.94 8-1.88 1.88L17.167 16l-6.107 6.12L12.94 24l8-8z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enext%3C/title%3E%3Cpath d='m12.94 8-1.88 1.88L17.167 16l-6.107 6.12L12.94 24l8-8z'/%3E%3C/svg%3E\")}.ag-icon-none:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enone%3C/title%3E%3Cpath d='M4 24h16v-2.667H4zM4 8v2.667h24V8zm0 9.333h24v-2.667H4z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enone%3C/title%3E%3Cpath d='M4 24h16v-2.667H4zM4 8v2.667h24V8zm0 9.333h24v-2.667H4z'/%3E%3C/svg%3E\")}.ag-icon-not-allowed:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enot-allowed%3C/title%3E%3Cpath d='M16 2.667C8.64 2.667 2.667 8.64 2.667 16S8.64 29.333 16 29.333 29.333 23.36 29.333 16 23.36 2.667 16 2.667M5.333 16c0-5.893 4.773-10.667 10.667-10.667 2.467 0 4.733.84 6.533 2.253L7.586 22.533A10.54 10.54 0 0 1 5.333 16M16 26.667c-2.467 0-4.733-.84-6.533-2.253L24.414 9.467A10.54 10.54 0 0 1 26.667 16c0 5.893-4.773 10.667-10.667 10.667'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enot-allowed%3C/title%3E%3Cpath d='M16 2.667C8.64 2.667 2.667 8.64 2.667 16S8.64 29.333 16 29.333 29.333 23.36 29.333 16 23.36 2.667 16 2.667M5.333 16c0-5.893 4.773-10.667 10.667-10.667 2.467 0 4.733.84 6.533 2.253L7.586 22.533A10.54 10.54 0 0 1 5.333 16M16 26.667c-2.467 0-4.733-.84-6.533-2.253L24.414 9.467A10.54 10.54 0 0 1 26.667 16c0 5.893-4.773 10.667-10.667 10.667'/%3E%3C/svg%3E\")}.ag-icon-paste:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Epaste%3C/title%3E%3Cpath d='M25.333 4H19.76C19.2 2.453 17.733 1.333 16 1.333S12.8 2.453 12.24 4H6.667A2.675 2.675 0 0 0 4 6.667V28c0 1.467 1.2 2.667 2.667 2.667h18.667c1.467 0 2.667-1.2 2.667-2.667V6.667C28.001 5.2 26.801 4 25.334 4zM16 4c.733 0 1.333.6 1.333 1.333s-.6 1.333-1.333 1.333-1.333-.6-1.333-1.333S15.267 4 16 4m9.333 24H6.666V6.667h2.667v4h13.333v-4h2.667z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Epaste%3C/title%3E%3Cpath d='M25.333 4H19.76C19.2 2.453 17.733 1.333 16 1.333S12.8 2.453 12.24 4H6.667A2.675 2.675 0 0 0 4 6.667V28c0 1.467 1.2 2.667 2.667 2.667h18.667c1.467 0 2.667-1.2 2.667-2.667V6.667C28.001 5.2 26.801 4 25.334 4zM16 4c.733 0 1.333.6 1.333 1.333s-.6 1.333-1.333 1.333-1.333-.6-1.333-1.333S15.267 4 16 4m9.333 24H6.666V6.667h2.667v4h13.333v-4h2.667z'/%3E%3C/svg%3E\")}.ag-icon-pin:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Epin%3C/title%3E%3Cpath d='m11.106 22.093-4.444 4.444-1.259-1.259 4.444-4.444zm5.872-16.63 9.618 9.62-.962.962-.962-.962-7.694 3.847 1.924 1.924-2.74 2.74-7.696-7.696 2.741-2.74 1.924 1.925 3.847-7.696-.962-.962z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Epin%3C/title%3E%3Cpath d='m11.106 22.093-4.444 4.444-1.259-1.259 4.444-4.444zm5.872-16.63 9.618 9.62-.962.962-.962-.962-7.694 3.847 1.924 1.924-2.74 2.74-7.696-7.696 2.741-2.74 1.924 1.925 3.847-7.696-.962-.962z'/%3E%3C/svg%3E\")}.ag-icon-pivot:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Epivot%3C/title%3E%3Cpath d='M26.667 30.223H5.334a3.556 3.556 0 0 1-3.556-3.556V5.334a3.556 3.556 0 0 1 3.556-3.556h21.333a3.556 3.556 0 0 1 3.556 3.556v21.333a3.556 3.556 0 0 1-3.556 3.556m-16-8.89H5.334v5.333h5.333zm16-7.11H12.444v12.444h14.223zm-9.15 6.85-2.039 2.037 2.039 2.039-1.257 1.257-3.295-3.296 3.295-3.295q.63.628 1.257 1.257zm-6.85-6.85H5.334v5.333h5.333zm15.74 3.816-1.257 1.256-2.039-2.037-2.037 2.037-1.257-1.256 3.295-3.296zM10.667 5.333H5.334v5.333h5.333zm8.889 0h-7.112v5.333h7.112zm7.111 0h-5.333v5.333h5.333z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Epivot%3C/title%3E%3Cpath d='M26.667 30.223H5.334a3.556 3.556 0 0 1-3.556-3.556V5.334a3.556 3.556 0 0 1 3.556-3.556h21.333a3.556 3.556 0 0 1 3.556 3.556v21.333a3.556 3.556 0 0 1-3.556 3.556m-16-8.89H5.334v5.333h5.333zm16-7.11H12.444v12.444h14.223zm-9.15 6.85-2.039 2.037 2.039 2.039-1.257 1.257-3.295-3.296 3.295-3.295q.63.628 1.257 1.257zm-6.85-6.85H5.334v5.333h5.333zm15.74 3.816-1.257 1.256-2.039-2.037-2.037 2.037-1.257-1.256 3.295-3.296zM10.667 5.333H5.334v5.333h5.333zm8.889 0h-7.112v5.333h7.112zm7.111 0h-5.333v5.333h5.333z'/%3E%3C/svg%3E\")}.ag-icon-plus:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M6.572 6.572a13.32 13.32 0 0 0 0 18.856 13.32 13.32 0 0 0 18.856 0 13.32 13.32 0 0 0 0-18.856 13.32 13.32 0 0 0-18.856 0m17.527 8.099v2.658h-6.77v6.77h-2.658v-6.77h-6.77v-2.658h6.77v-6.77h2.658v6.77z' style='fill-rule:nonzero'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M6.572 6.572a13.32 13.32 0 0 0 0 18.856 13.32 13.32 0 0 0 18.856 0 13.32 13.32 0 0 0 0-18.856 13.32 13.32 0 0 0-18.856 0m17.527 8.099v2.658h-6.77v6.77h-2.658v-6.77h-6.77v-2.658h6.77v-6.77h2.658v6.77z' style='fill-rule:nonzero'/%3E%3C/svg%3E\")}.ag-icon-previous:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eprevious%3C/title%3E%3Cpath d='M20.94 9.88 19.06 8l-8 8 8 8 1.88-1.88L14.833 16z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eprevious%3C/title%3E%3Cpath d='M20.94 9.88 19.06 8l-8 8 8 8 1.88-1.88L14.833 16z'/%3E%3C/svg%3E\")}.ag-icon-right:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eright%3C/title%3E%3Cpath d='m16 5.333-1.88 1.88 7.44 7.453H5.333v2.667H21.56l-7.44 7.453 1.88 1.88 10.667-10.667L16 5.332z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eright%3C/title%3E%3Cpath d='m16 5.333-1.88 1.88 7.44 7.453H5.333v2.667H21.56l-7.44 7.453 1.88 1.88 10.667-10.667L16 5.332z'/%3E%3C/svg%3E\")}.ag-icon-save:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esave%3C/title%3E%3Cpath d='M25.333 16v9.333H6.666V16H3.999v9.333C3.999 26.8 5.199 28 6.666 28h18.667C26.8 28 28 26.8 28 25.333V16zm-8 .893 3.453-3.44 1.88 1.88L15.999 22l-6.667-6.667 1.88-1.88 3.453 3.44V4h2.667v12.893z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esave%3C/title%3E%3Cpath d='M25.333 16v9.333H6.666V16H3.999v9.333C3.999 26.8 5.199 28 6.666 28h18.667C26.8 28 28 26.8 28 25.333V16zm-8 .893 3.453-3.44 1.88 1.88L15.999 22l-6.667-6.667 1.88-1.88 3.453 3.44V4h2.667v12.893z'/%3E%3C/svg%3E\")}.ag-icon-small-down:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-down%3C/title%3E%3Cpath d='M9.333 12.667 16 19.334l6.667-6.667H9.334z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-down%3C/title%3E%3Cpath d='M9.333 12.667 16 19.334l6.667-6.667H9.334z'/%3E%3C/svg%3E\")}.ag-icon-small-left:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-left%3C/title%3E%3Cpath d='M19.333 9.333 12.666 16l6.667 6.667V9.334z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-left%3C/title%3E%3Cpath d='M19.333 9.333 12.666 16l6.667 6.667V9.334z'/%3E%3C/svg%3E\")}.ag-icon-small-right:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-right%3C/title%3E%3Cpath d='M12.667 22.667 19.334 16l-6.667-6.667v13.333z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-right%3C/title%3E%3Cpath d='M12.667 22.667 19.334 16l-6.667-6.667v13.333z'/%3E%3C/svg%3E\")}.ag-icon-small-up:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-up%3C/title%3E%3Cpath d='M9.333 19.333 16 12.666l6.667 6.667H9.334z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-up%3C/title%3E%3Cpath d='M9.333 19.333 16 12.666l6.667 6.667H9.334z'/%3E%3C/svg%3E\")}.ag-icon-tick:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etick%3C/title%3E%3Cpath d='m11.727 21.167-5.56-5.56-1.893 1.88 7.453 7.453 16-16-1.88-1.88z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etick%3C/title%3E%3Cpath d='m11.727 21.167-5.56-5.56-1.893 1.88 7.453 7.453 16-16-1.88-1.88z'/%3E%3C/svg%3E\")}.ag-icon-tree-closed:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etree-closed%3C/title%3E%3Cpath d='m12.94 8-1.88 1.88L17.167 16l-6.107 6.12L12.94 24l8-8z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etree-closed%3C/title%3E%3Cpath d='m12.94 8-1.88 1.88L17.167 16l-6.107 6.12L12.94 24l8-8z'/%3E%3C/svg%3E\")}.ag-icon-tree-indeterminate:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etree-indeterminate%3C/title%3E%3Cpath d='M6.667 14.667h18.667v2.667H6.667z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etree-indeterminate%3C/title%3E%3Cpath d='M6.667 14.667h18.667v2.667H6.667z'/%3E%3C/svg%3E\")}.ag-icon-tree-open:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etree-open%3C/title%3E%3Cpath d='M22.12 11.06 16 17.167 9.88 11.06 8 12.94l8 8 8-8z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etree-open%3C/title%3E%3Cpath d='M22.12 11.06 16 17.167 9.88 11.06 8 12.94l8 8 8-8z'/%3E%3C/svg%3E\")}.ag-icon-unlinked:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eunlinked%3C/title%3E%3Cpath d='M22.667 9.333h-5.333v2.533h5.333a4.136 4.136 0 0 1 4.133 4.133c0 1.907-1.307 3.507-3.08 3.973l1.947 1.947c2.173-1.107 3.667-3.32 3.667-5.92a6.67 6.67 0 0 0-6.667-6.667zm-1.334 5.334h-2.92l2.667 2.667h.253zM2.667 5.693 6.814 9.84A6.65 6.65 0 0 0 2.667 16a6.67 6.67 0 0 0 6.667 6.667h5.333v-2.533H9.334a4.136 4.136 0 0 1-4.133-4.133c0-2.12 1.613-3.867 3.68-4.093l2.76 2.76h-.973v2.667h3.64l3.027 3.027v2.307h2.307l5.347 5.333 1.68-1.68L4.362 4.002 2.669 5.695z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eunlinked%3C/title%3E%3Cpath d='M22.667 9.333h-5.333v2.533h5.333a4.136 4.136 0 0 1 4.133 4.133c0 1.907-1.307 3.507-3.08 3.973l1.947 1.947c2.173-1.107 3.667-3.32 3.667-5.92a6.67 6.67 0 0 0-6.667-6.667zm-1.334 5.334h-2.92l2.667 2.667h.253zM2.667 5.693 6.814 9.84A6.65 6.65 0 0 0 2.667 16a6.67 6.67 0 0 0 6.667 6.667h5.333v-2.533H9.334a4.136 4.136 0 0 1-4.133-4.133c0-2.12 1.613-3.867 3.68-4.093l2.76 2.76h-.973v2.667h3.64l3.027 3.027v2.307h2.307l5.347 5.333 1.68-1.68L4.362 4.002 2.669 5.695z'/%3E%3C/svg%3E\")}.ag-icon-up:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Easc%3C/title%3E%3Cpath d='m5.333 16 1.88 1.88 7.453-7.44v16.227h2.667V10.44l7.44 7.453L26.666 16 15.999 5.333z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Easc%3C/title%3E%3Cpath d='m5.333 16 1.88 1.88 7.453-7.44v16.227h2.667V10.44l7.44 7.453L26.666 16 15.999 5.333z'/%3E%3C/svg%3E\")}.ag-icon-grip:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Egrip%3C/title%3E%3Cpath d='M26.667 12H5.334v2.667h21.333zM5.333 20h21.333v-2.667H5.333z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Egrip%3C/title%3E%3Cpath d='M26.667 12H5.334v2.667h21.333zM5.333 20h21.333v-2.667H5.333z'/%3E%3C/svg%3E\")}.ag-icon-settings:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M30 8h-4.1c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2v2h14.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30zm-9 4c-1.7 0-3-1.3-3-3s1.3-3 3-3 3 1.3 3 3-1.3 3-3 3M2 24h4.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30v-2H15.9c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2zm9-4c1.7 0 3 1.3 3 3s-1.3 3-3 3-3-1.3-3-3 1.3-3 3-3'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M30 8h-4.1c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2v2h14.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30zm-9 4c-1.7 0-3-1.3-3-3s1.3-3 3-3 3 1.3 3 3-1.3 3-3 3M2 24h4.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30v-2H15.9c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2zm9-4c1.7 0 3 1.3 3 3s-1.3 3-3 3-3-1.3-3-3 1.3-3 3-3'/%3E%3C/svg%3E\")}"),zp={aggregation:'<path d="M18 7V4H6l6 8-6 8h12v-3"/>',arrows:'<polyline points="5 9 2 12 5 15"/><polyline points="9 5 12 2 15 5"/><polyline points="15 19 12 22 9 19"/><polyline points="19 9 22 12 19 15"/><line x1="2" x2="22" y1="12" y2="12"/><line x1="12" x2="12" y1="2" y2="22"/>',asc:'<path d="m5 12 7-7 7 7"/><path d="M12 19V5"/>',cancel:'<circle cx="12" cy="12" r="10"/><path d="m15 9-6 6"/><path d="m9 9 6 6"/>',chart:'<line x1="18" x2="18" y1="20" y2="10"/><line x1="12" x2="12" y1="20" y2="4"/><line x1="6" x2="6" y1="20" y2="14"/>',"color-picker":'<path d="m19 11-8-8-8.6 8.6a2 2 0 0 0 0 2.8l5.2 5.2c.8.8 2 .8 2.8 0L19 11Z"/><path d="m5 2 5 5"/><path d="M2 13h15"/><path d="M22 20a2 2 0 1 1-4 0c0-1.6 1.7-2.4 2-4 .3 1.6 2 2.4 2 4Z"/>',columns:'<path d="M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18"/>',contracted:'<path d="m9 18 6-6-6-6"/>',copy:'<rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/>',cross:'<path d="M18 6 6 18"/><path d="m6 6 12 12"/>',csv:'<path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/><polyline points="14 2 14 8 20 8"/><path d="M8 13h2"/><path d="M8 17h2"/><path d="M14 13h2"/><path d="M14 17h2"/>',cut:'<circle cx="6" cy="6" r="3"/><path d="M8.12 8.12 12 12"/><path d="M20 4 8.12 15.88"/><circle cx="6" cy="18" r="3"/><path d="M14.8 14.8 20 20"/>',desc:'<path d="M12 5v14"/><path d="m19 12-7 7-7-7"/>',down:'<path d="M12 5v14"/><path d="m19 12-7 7-7-7"/>',excel:'<path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/><polyline points="14 2 14 8 20 8"/><path d="M8 13h2"/><path d="M8 17h2"/><path d="M14 13h2"/><path d="M14 17h2"/>',expanded:'<path d="m15 18-6-6 6-6"/>',"eye-slash":'<path d="M9.88 9.88a3 3 0 1 0 4.24 4.24"/><path d="M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68"/><path d="M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61"/><line x1="2" x2="22" y1="2" y2="22"/>',eye:'<path d="M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"/><circle cx="12" cy="12" r="3"/>',filter:'<path d="M3 6h18"/><path d="M7 12h10"/><path d="M10 18h4"/>',first:'<path d="m17 18-6-6 6-6"/><path d="M7 6v12"/>',group:'<path d="M16 12H3"/><path d="M16 18H3"/><path d="M10 6H3"/><path d="M21 18V8a2 2 0 0 0-2-2h-5"/><path d="m16 8-2-2 2-2"/>',last:'<path d="m7 18 6-6-6-6"/><path d="M17 6v12"/>',left:'<path d="m12 19-7-7 7-7"/><path d="M19 12H5"/>',linked:'<path d="M9 17H7A5 5 0 0 1 7 7h2"/><path d="M15 7h2a5 5 0 1 1 0 10h-2"/><line x1="8" x2="16" y1="12" y2="12"/>',loading:'<line x1="12" x2="12" y1="2" y2="6"/><line x1="12" x2="12" y1="18" y2="22"/><line x1="4.93" x2="7.76" y1="4.93" y2="7.76"/><line x1="16.24" x2="19.07" y1="16.24" y2="19.07"/><line x1="2" x2="6" y1="12" y2="12"/><line x1="18" x2="22" y1="12" y2="12"/><line x1="4.93" x2="7.76" y1="19.07" y2="16.24"/><line x1="16.24" x2="19.07" y1="7.76" y2="4.93"/>',maximize:'<polyline points="15 3 21 3 21 9"/><polyline points="9 21 3 21 3 15"/><line x1="21" x2="14" y1="3" y2="10"/><line x1="3" x2="10" y1="21" y2="14"/>',menu:'<line x1="4" x2="20" y1="12" y2="12"/><line x1="4" x2="20" y1="6" y2="6"/><line x1="4" x2="20" y1="18" y2="18"/>',"menu-alt":'<circle cx="12" cy="5" r="0.75" fill="#D9D9D9"/><circle cx="12" cy="12" r="0.75" fill="#D9D9D9"/><circle cx="12" cy="19" r="0.75" fill="#D9D9D9"/>',minimize:'<polyline points="4 14 10 14 10 20"/><polyline points="20 10 14 10 14 4"/><line x1="14" x2="21" y1="10" y2="3"/><line x1="3" x2="10" y1="21" y2="14"/>',minus:'<circle cx="12" cy="12" r="10"/><path d="M8 12h8"/>',next:'<path d="m9 18 6-6-6-6"/>',none:'<path d="m7 15 5 5 5-5"/><path d="m7 9 5-5 5 5"/>',"not-allowed":'<circle cx="12" cy="12" r="10"/><path d="m4.9 4.9 14.2 14.2"/>',paste:'<path d="M15 2H9a1 1 0 0 0-1 1v2c0 .6.4 1 1 1h6c.6 0 1-.4 1-1V3c0-.6-.4-1-1-1Z"/><path d="M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2M16 4h2a2 2 0 0 1 2 2v2M11 14h10"/><path d="m17 10 4 4-4 4"/>',pin:'<line x1="12" x2="12" y1="17" y2="22"/><path d="M5 17h14v-1.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V6h1a2 2 0 0 0 0-4H8a2 2 0 0 0 0 4h1v4.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24Z"/>',pivot:'<path d="M15 3v18"/><rect width="18" height="18" x="3" y="3" rx="2"/><path d="M21 9H3"/><path d="M21 15H3"/>',plus:'<circle cx="12" cy="12" r="10"/><path d="M8 12h8"/><path d="M12 8v8"/>',previous:'<path d="m15 18-6-6 6-6"/>',right:'<path d="M5 12h14"/><path d="m12 5 7 7-7 7"/>',save:'<path d="M12 17V3"/><path d="m6 11 6 6 6-6"/><path d="M19 21H5"/>',"small-down":'<path d="m6 9 6 6 6-6"/>',"small-left":'<path d="m15 18-6-6 6-6"/>',"small-right":'<path d="m9 18 6-6-6-6"/>',"small-up":'<path d="m18 15-6-6-6 6"/>',tick:'<path d="M20 6 9 17l-5-5"/>',"tree-closed":'<path d="m9 18 6-6-6-6"/>',"tree-indeterminate":'<path d="M5 12h14"/>',"tree-open":'<path d="m6 9 6 6 6-6"/>',unlinked:'<path d="M9 17H7A5 5 0 0 1 7 7"/><path d="M15 7h2a5 5 0 0 1 4 8"/><line x1="8" x2="12" y1="12" y2="12"/><line x1="2" x2="22" y1="2" y2="22"/>',up:'<path d="m5 12 7-7 7 7"/><path d="M12 19V5"/>',grip:'<circle cx="5" cy="8" r="0.5"/><circle cx="12" cy="8" r="0.5"/><circle cx="19" cy="8" r="0.5"/><circle cx="5" cy="16" r="0.5"/><circle cx="12" cy="16" r="0.5"/><circle cx="19" cy="16" r="0.5"/><g stroke="none" fill="currentColor"><circle cx="5" cy="8" r="1"/><circle cx="12" cy="8" r="1"/><circle cx="19" cy="8" r="1"/><circle cx="5" cy="16" r="1"/><circle cx="12" cy="16" r="1"/><circle cx="19" cy="16" r="1"/></g>',settings:'<path d="M20 7h-9"/><path d="M14 17H5"/><circle cx="17" cy="17" r="3"/><circle cx="7" cy="7" r="3"/>'},zg=(e={})=>{let t='.ag-icon:before{background-color:currentColor;content:"";display:block;height:var(--ag-icon-size);-webkit-mask-image:linear-gradient(#0000,#0000);mask-image:linear-gradient(#0000,#0000);-webkit-mask-size:contain;mask-size:contain;width:var(--ag-icon-size)}';for(let i of Object.keys(zp)){let r=zm(i,e.strokeWidth||1.5);t+=`.ag-icon-${i}::before { mask-image: url('data:image/svg+xml,${encodeURIComponent(r)}'); }
`}return t},zm=(e,t)=>{let i=zp[e];if(!i)throw Error(`Missing icon data for ${e}`);return`<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon ag-icon-${e}" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke="black" stroke-width="${t}" viewBox="0 0 24 24"><style>* { vector-effect: non-scaling-stroke; }</style>`+i+"</svg>"},zf=(e={})=>GB("iconSet","quartz").withCSS(()=>zg(e)),zv=GB("iconSet","quartzLight").withCSS(()=>zg({strokeWidth:1})),zy=GB("iconSet","quartzRegular").withCSS(zg),zC=GB("iconSet","quartzBold").withCSS(()=>zg({strokeWidth:2})),zw=GB("inputStyle","base").withAdditionalParams({inputBackgroundColor:"transparent",inputBorder:!1,inputBorderRadius:0,inputTextColor:{ref:"textColor"},inputPaddingStart:0,inputHeight:{calc:"max(iconSize, fontSize) + spacing * 2"},inputFocusBackgroundColor:{ref:"inputBackgroundColor"},inputFocusBorder:{ref:"inputBorder"},inputFocusShadow:"none",inputFocusTextColor:{ref:"inputTextColor"},inputDisabledBackgroundColor:{ref:"inputBackgroundColor"},inputDisabledBorder:{ref:"inputBorder"},inputDisabledTextColor:{ref:"inputTextColor"},inputInvalidBackgroundColor:{ref:"inputBackgroundColor"},inputInvalidBorder:{ref:"inputBorder"},inputInvalidTextColor:{ref:"inputTextColor"}}).withCSS(":where(input[class^=ag-][type=number]:not(.ag-number-field-input-stepper)){-moz-appearance:textfield;&::-webkit-inner-spin-button,&::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}}:where(input[class^=ag-]:not([type]),input[class^=ag-][type=text],input[class^=ag-][type=number],input[class^=ag-][type=tel],input[class^=ag-][type=date],input[class^=ag-][type=datetime-local],textarea[class^=ag-]){background-color:var(--ag-input-background-color);border:var(--ag-input-border);border-radius:var(--ag-input-border-radius);color:var(--ag-input-text-color);cursor:pointer;font-family:inherit;font-size:inherit;line-height:inherit;margin:0;min-height:var(--ag-input-height);padding:0;&:where(:disabled){background-color:var(--ag-input-disabled-background-color);border:var(--ag-input-disabled-border);color:var(--ag-input-disabled-text-color)}&:where(:focus){background-color:var(--ag-input-focus-background-color);border:var(--ag-input-focus-border);box-shadow:var(--ag-input-focus-shadow);color:var(--ag-input-focus-text-color)}&:where(:invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&:where(.invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}}&.ag-ltr :where(input[class^=ag-]:not([type]),input[class^=ag-][type=text],input[class^=ag-][type=number],input[class^=ag-][type=tel],input[class^=ag-][type=date],input[class^=ag-][type=datetime-local],textarea[class^=ag-]){padding-left:var(--ag-input-padding-start)}&.ag-rtl :where(input[class^=ag-]:not([type]),input[class^=ag-][type=text],input[class^=ag-][type=number],input[class^=ag-][type=tel],input[class^=ag-][type=date],input[class^=ag-][type=datetime-local],textarea[class^=ag-]){padding-right:var(--ag-input-padding-start)}"),zb=GN(zw,"bordered").withParams({inputBackgroundColor:{ref:"backgroundColor"},inputBorder:!0,inputBorderRadius:{ref:"borderRadius"},inputPaddingStart:{ref:"spacing"},inputFocusBorder:{color:{ref:"accentColor"}},inputFocusShadow:{ref:"focusShadow"},inputDisabledBackgroundColor:{ref:"foregroundColor",mix:.06,onto:"backgroundColor"},inputDisabledTextColor:{ref:"textColor",mix:.5},inputInvalidBorder:{color:{ref:"invalidColor"}}}),zS=GN(zw,"underlined").withParams({inputBorder:{width:2,color:{ref:"foregroundColor",mix:.3}},inputPaddingStart:{ref:"spacing"},inputFocusBorder:"solid 2px var(--ag-accent-color)",inputDisabledTextColor:{ref:"textColor",mix:.5},inputDisabledBorder:"solid 1px var(--ag-border-color)",inputInvalidBorder:{width:2,color:{ref:"invalidColor",mix:.3}}}).withCSS(":where(input[class^=ag-]:not([type]),input[class^=ag-][type=text],input[class^=ag-][type=number],input[class^=ag-][type=tel],input[class^=ag-][type=date],input[class^=ag-][type=datetime-local],textarea[class^=ag-]){border-left:none;border-right:none;border-top:none}"),zx=GB("tabStyle","base").withAdditionalParams({tabBarBackgroundColor:"transparent",tabBarHorizontalPadding:0,tabBarTopPadding:0,tabBackgroundColor:"transparent",tabTextColor:{ref:"textColor"},tabHorizontalPadding:{ref:"spacing"},tabTopPadding:{ref:"spacing"},tabBottomPadding:{ref:"spacing"},tabSpacing:"0",tabHoverBackgroundColor:{ref:"tabBackgroundColor"},tabHoverTextColor:{ref:"tabTextColor"},tabSelectedBackgroundColor:{ref:"tabBackgroundColor"},tabSelectedTextColor:{ref:"tabTextColor"},tabSelectedBorderWidth:1,tabSelectedBorderColor:"transparent",tabSelectedUnderlineColor:"transparent",tabSelectedUnderlineWidth:"0",tabSelectedUnderlineTransitionDuration:"0",tabBarBorder:!1}).withCSS('.ag-tabs-header{background-color:var(--ag-tab-bar-background-color);border-bottom:var(--ag-tab-bar-border);display:flex;gap:var(--ag-tab-spacing);padding:var(--ag-tab-bar-top-padding) var(--ag-tab-bar-horizontal-padding) 0}.ag-tabs-header-wrapper{display:flex;.ag-tabs-header{flex:1}}.ag-tabs-close-button-wrapper{border:0;padding:var(--ag-spacing)}&.ag-ltr .ag-tabs-close-button-wrapper{border-right:1px solid var(--ag-border-color)}&.ag-rtl .ag-tabs-close-button-wrapper{border-left:1px solid var(--ag-border-color)}.ag-tabs-close-button{background-color:unset;border:0;cursor:pointer;padding:0}.ag-tab{align-items:center;background-color:var(--ag-tab-background-color);border-left:var(--ag-tab-selected-border-width) solid transparent;border-right:var(--ag-tab-selected-border-width) solid transparent;color:var(--ag-tab-text-color);cursor:pointer;display:flex;flex:1;justify-content:center;padding:var(--ag-tab-top-padding) var(--ag-tab-horizontal-padding) var(--ag-tab-bottom-padding);position:relative;&:hover{background-color:var(--ag-tab-hover-background-color);color:var(--ag-tab-hover-text-color)}&.ag-tab-selected{background-color:var(--ag-tab-selected-background-color);color:var(--ag-tab-selected-text-color)}&:after{background-color:var(--ag-tab-selected-underline-color);bottom:0;content:"";display:block;height:var(--ag-tab-selected-underline-width);left:0;opacity:0;position:absolute;right:0;transition:opacity var(--ag-tab-selected-underline-transition-duration)}&.ag-tab-selected:after{opacity:1}&:focus-visible{box-shadow:inset var(--ag-focus-shadow)}}&.ag-ltr .ag-tab{&.ag-tab-selected{&:not(:first-of-type){border-left-color:var(--ag-tab-selected-border-color)}&:not(:last-of-type){border-right-color:var(--ag-tab-selected-border-color)}}}&.ag-rtl .ag-tab{&.ag-tab-selected{&:not(:first-of-type){border-right-color:var(--ag-tab-selected-border-color)}&:not(:last-of-type){border-left-color:var(--ag-tab-selected-border-color)}}}'),zM=GN(zx,"quartz").withParams({tabBarBorder:!0,tabBarBackgroundColor:{ref:"foregroundColor",mix:.05},tabTextColor:{ref:"textColor",mix:.7},tabSelectedTextColor:{ref:"textColor"},tabHoverTextColor:{ref:"textColor"},tabSelectedBorderColor:{ref:"borderColor"},tabSelectedBackgroundColor:{ref:"backgroundColor"}}),zE=GN(zx,"material").withParams({tabBarBackgroundColor:{ref:"chromeBackgroundColor"},tabSelectedUnderlineColor:{ref:"primaryColor"},tabSelectedUnderlineWidth:2,tabSelectedUnderlineTransitionDuration:"0"}),zD=GN(zx,"alpine").withParams({tabBarBorder:!0,tabBarBackgroundColor:{ref:"chromeBackgroundColor"},tabHoverTextColor:{ref:"accentColor"},tabSelectedTextColor:{ref:"accentColor"},tabSelectedUnderlineColor:{ref:"accentColor"},tabSelectedUnderlineWidth:2,tabSelectedUnderlineTransitionDuration:"0.3s"}),zI=GN(zx,"rolodex").withParams({tabBarBackgroundColor:{ref:"chromeBackgroundColor"},tabBarHorizontalPadding:{ref:"spacing"},tabBarTopPadding:{ref:"spacing"},tabBarBorder:!0,tabHorizontalPadding:{calc:"spacing * 2"},tabTopPadding:{ref:"spacing"},tabBottomPadding:{ref:"spacing"},tabSpacing:{ref:"spacing"},tabSelectedBorderColor:{ref:"borderColor"},tabSelectedBackgroundColor:{ref:"backgroundColor"}}).withCSS(".ag-tab{border-left:var(--ag-tab-selected-border-width) solid transparent;border-right:var(--ag-tab-selected-border-width) solid transparent;border-top:var(--ag-tab-selected-border-width) solid transparent;flex:0;&.ag-tab-selected{border-left-color:var(--ag-tab-selected-border-color);border-right-color:var(--ag-tab-selected-border-color);border-top-color:var(--ag-tab-selected-border-color);margin-bottom:-1px;padding-bottom:calc(var(--ag-tab-bottom-padding) + 1px)}}"),zk=e=>G0(e).withPart(zs),zT=zk("quartz").withPart(za).withPart(zf).withPart(zM).withPart(()=>zb).withParams({fontFamily:[{googleFont:"IBM Plex Sans"},"-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Oxygen-Sans","Ubuntu"]}),zA=zk("alpine").withPart(za).withPart(zc).withPart(zD).withPart(zb).withParams({accentColor:"#2196f3",selectedRowBackgroundColor:{ref:"accentColor",mix:.3},inputFocusBorder:{color:{ref:"accentColor",mix:.4}},fontSize:13,dataFontSize:14,headerFontWeight:700,borderRadius:3,wrapperBorderRadius:3,tabSelectedUnderlineColor:{ref:"accentColor"},tabSelectedBorderWidth:2,tabSelectedUnderlineTransitionDuration:.3}),zR=zk("balham").withPart(zn).withPart(zc).withPart(zI).withPart(zb).withParams({spacing:4,borderRadius:2,wrapperBorderRadius:2,headerColumnResizeHandleColor:"transparent",headerColumnBorder:!0,headerColumnBorderHeight:"50%",oddRowBackgroundColor:{ref:"chromeBackgroundColor",mix:.5},headerTextColor:{ref:"foregroundColor",mix:.5},fontSize:12,headerFontWeight:"bold"});IH(IU,k0),aW.__registerModules([dg,d8,cT,cn,kJ,LS,LL,PQ,Oa,Oc,OC,OV,O$,Te,OK,Pw,Bh,Bk,Pz,GC,GL,GF],!1,void 0);var zL=i(83454);function zP(e){let{Component:t,pageProps:i,...r}=e,[s]=(0,ev.useState)(()=>(0,tE.createBrowserSupabaseClient)());return((0,ev.useEffect)(()=>{var e;null===(e=document.body.classList)||void 0===e||e.remove("loading")},[]),r.router.pathname.endsWith("public"))?(0,ed.jsx)(tv.SessionContextProvider,{supabaseClient:s,children:(0,ed.jsx)(tC,{children:(0,ed.jsx)(tT,{children:(0,ed.jsxs)(tM.V,{children:[(0,ed.jsx)(tA.Wi,{trackPageViews:!0}),(0,ed.jsx)(t,{...i})]})})})}):(0,ed.jsx)(tv.SessionContextProvider,{supabaseClient:s,children:(0,ed.jsx)(tC,{children:(0,ed.jsx)(tT,{children:(0,ed.jsx)(tM.V,{children:(0,ed.jsxs)(tx,{children:[(0,ed.jsx)(tA.Wi,{trackPageViews:!0}),(0,ed.jsx)(t,{...i})]})})})})})}IZ.setLicenseKey(zL.env.AG_GRID_LICENSE_KEY||"")},89079:function(e){"use strict";var t=Object.defineProperty,i=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty,a={};function o(e){var t;let i=["path"in e&&e.path&&`Path=${e.path}`,"expires"in e&&(e.expires||0===e.expires)&&`Expires=${("number"==typeof e.expires?new Date(e.expires):e.expires).toUTCString()}`,"maxAge"in e&&"number"==typeof e.maxAge&&`Max-Age=${e.maxAge}`,"domain"in e&&e.domain&&`Domain=${e.domain}`,"secure"in e&&e.secure&&"Secure","httpOnly"in e&&e.httpOnly&&"HttpOnly","sameSite"in e&&e.sameSite&&`SameSite=${e.sameSite}`,"partitioned"in e&&e.partitioned&&"Partitioned","priority"in e&&e.priority&&`Priority=${e.priority}`].filter(Boolean),r=`${e.name}=${encodeURIComponent(null!=(t=e.value)?t:"")}`;return 0===i.length?r:`${r}; ${i.join("; ")}`}function n(e){let t=new Map;for(let i of e.split(/; */)){if(!i)continue;let e=i.indexOf("=");if(-1===e){t.set(i,"true");continue}let[r,s]=[i.slice(0,e),i.slice(e+1)];try{t.set(r,decodeURIComponent(null!=s?s:"true"))}catch{}}return t}function l(e){var t,i;if(!e)return;let[[r,s],...a]=n(e),{domain:o,expires:l,httponly:c,maxage:u,path:p,samesite:g,secure:m,partitioned:f,priority:v}=Object.fromEntries(a.map(([e,t])=>[e.toLowerCase(),t]));return function(e){let t={};for(let i in e)e[i]&&(t[i]=e[i]);return t}({name:r,value:decodeURIComponent(s),domain:o,...l&&{expires:new Date(l)},...c&&{httpOnly:!0},..."string"==typeof u&&{maxAge:Number(u)},path:p,...g&&{sameSite:h.includes(t=(t=g).toLowerCase())?t:void 0},...m&&{secure:!0},...v&&{priority:d.includes(i=(i=v).toLowerCase())?i:void 0},...f&&{partitioned:!0}})}((e,i)=>{for(var r in i)t(e,r,{get:i[r],enumerable:!0})})(a,{RequestCookies:()=>c,ResponseCookies:()=>u,parseCookie:()=>n,parseSetCookie:()=>l,stringifyCookie:()=>o}),e.exports=((e,a,o,n)=>{if(a&&"object"==typeof a||"function"==typeof a)for(let l of r(a))s.call(e,l)||l===o||t(e,l,{get:()=>a[l],enumerable:!(n=i(a,l))||n.enumerable});return e})(t({},"__esModule",{value:!0}),a);var h=["strict","lax","none"],d=["low","medium","high"],c=class{constructor(e){this._parsed=new Map,this._headers=e;let t=e.get("cookie");if(t)for(let[e,i]of n(t))this._parsed.set(e,{name:e,value:i})}[Symbol.iterator](){return this._parsed[Symbol.iterator]()}get size(){return this._parsed.size}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let i=Array.from(this._parsed);if(!e.length)return i.map(([e,t])=>t);let r="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return i.filter(([e])=>e===r).map(([e,t])=>t)}has(e){return this._parsed.has(e)}set(...e){let[t,i]=1===e.length?[e[0].name,e[0].value]:e,r=this._parsed;return r.set(t,{name:t,value:i}),this._headers.set("cookie",Array.from(r).map(([e,t])=>o(t)).join("; ")),this}delete(e){let t=this._parsed,i=Array.isArray(e)?e.map(e=>t.delete(e)):t.delete(e);return this._headers.set("cookie",Array.from(t).map(([e,t])=>o(t)).join("; ")),i}clear(){return this.delete(Array.from(this._parsed.keys())),this}[Symbol.for("edge-runtime.inspect.custom")](){return`RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(e=>`${e.name}=${encodeURIComponent(e.value)}`).join("; ")}},u=class{constructor(e){var t,i,r;this._parsed=new Map,this._headers=e;let s=null!=(r=null!=(i=null==(t=e.getSetCookie)?void 0:t.call(e))?i:e.get("set-cookie"))?r:[];for(let e of Array.isArray(s)?s:function(e){if(!e)return[];var t,i,r,s,a,o=[],n=0;function l(){for(;n<e.length&&/\s/.test(e.charAt(n));)n+=1;return n<e.length}for(;n<e.length;){for(t=n,a=!1;l();)if(","===(i=e.charAt(n))){for(r=n,n+=1,l(),s=n;n<e.length&&"="!==(i=e.charAt(n))&&";"!==i&&","!==i;)n+=1;n<e.length&&"="===e.charAt(n)?(a=!0,n=s,o.push(e.substring(t,r)),t=n):n=r+1}else n+=1;(!a||n>=e.length)&&o.push(e.substring(t,e.length))}return o}(s)){let t=l(e);t&&this._parsed.set(t.name,t)}}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let i=Array.from(this._parsed.values());if(!e.length)return i;let r="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return i.filter(e=>e.name===r)}has(e){return this._parsed.has(e)}set(...e){let[t,i,r]=1===e.length?[e[0].name,e[0].value,e[0]]:e,s=this._parsed;return s.set(t,function(e={name:"",value:""}){return"number"==typeof e.expires&&(e.expires=new Date(e.expires)),e.maxAge&&(e.expires=new Date(Date.now()+1e3*e.maxAge)),(null===e.path||void 0===e.path)&&(e.path="/"),e}({name:t,value:i,...r})),function(e,t){for(let[,i]of(t.delete("set-cookie"),e)){let e=o(i);t.append("set-cookie",e)}}(s,this._headers),this}delete(...e){let[t,i,r]="string"==typeof e[0]?[e[0]]:[e[0].name,e[0].path,e[0].domain];return this.set({name:t,path:i,domain:r,value:"",expires:new Date(0)})}[Symbol.for("edge-runtime.inspect.custom")](){return`ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(o).join("; ")}}},21876:function(e){!function(){var t={675:function(e,t){"use strict";t.byteLength=function(e){var t=l(e),i=t[0],r=t[1];return(i+r)*3/4-r},t.toByteArray=function(e){var t,i,a=l(e),o=a[0],n=a[1],h=new s((o+n)*3/4-n),d=0,c=n>0?o-4:o;for(i=0;i<c;i+=4)t=r[e.charCodeAt(i)]<<18|r[e.charCodeAt(i+1)]<<12|r[e.charCodeAt(i+2)]<<6|r[e.charCodeAt(i+3)],h[d++]=t>>16&255,h[d++]=t>>8&255,h[d++]=255&t;return 2===n&&(t=r[e.charCodeAt(i)]<<2|r[e.charCodeAt(i+1)]>>4,h[d++]=255&t),1===n&&(t=r[e.charCodeAt(i)]<<10|r[e.charCodeAt(i+1)]<<4|r[e.charCodeAt(i+2)]>>2,h[d++]=t>>8&255,h[d++]=255&t),h},t.fromByteArray=function(e){for(var t,r=e.length,s=r%3,a=[],o=0,n=r-s;o<n;o+=16383)a.push(function(e,t,r){for(var s,a=[],o=t;o<r;o+=3)a.push(i[(s=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(255&e[o+2]))>>18&63]+i[s>>12&63]+i[s>>6&63]+i[63&s]);return a.join("")}(e,o,o+16383>n?n:o+16383));return 1===s?a.push(i[(t=e[r-1])>>2]+i[t<<4&63]+"=="):2===s&&a.push(i[(t=(e[r-2]<<8)+e[r-1])>>10]+i[t>>4&63]+i[t<<2&63]+"="),a.join("")};for(var i=[],r=[],s="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,n=a.length;o<n;++o)i[o]=a[o],r[a.charCodeAt(o)]=o;function l(e){var t=e.length;if(t%4>0)throw Error("Invalid string. Length must be a multiple of 4");var i=e.indexOf("=");-1===i&&(i=t);var r=i===t?0:4-i%4;return[i,r]}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},72:function(e,t,i){"use strict";var r=i(675),s=i(783),a="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function o(e){if(e>2147483647)throw RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,n.prototype),t}function n(e,t,i){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return d(e)}return l(e,t,i)}function l(e,t,i){if("string"==typeof e)return function(e,t){if(("string"!=typeof t||""===t)&&(t="utf8"),!n.isEncoding(t))throw TypeError("Unknown encoding: "+t);var i=0|p(e,t),r=o(i),s=r.write(e,t);return s!==i&&(r=r.slice(0,s)),r}(e,t);if(ArrayBuffer.isView(e))return c(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(T(e,ArrayBuffer)||e&&T(e.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(T(e,SharedArrayBuffer)||e&&T(e.buffer,SharedArrayBuffer)))return function(e,t,i){var r;if(t<0||e.byteLength<t)throw RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(i||0))throw RangeError('"length" is outside of buffer bounds');return Object.setPrototypeOf(r=void 0===t&&void 0===i?new Uint8Array(e):void 0===i?new Uint8Array(e,t):new Uint8Array(e,t,i),n.prototype),r}(e,t,i);if("number"==typeof e)throw TypeError('The "value" argument must not be of type number. Received type number');var r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return n.from(r,t,i);var s=function(e){if(n.isBuffer(e)){var t,i=0|u(e.length),r=o(i);return 0===r.length||e.copy(r,0,0,i),r}return void 0!==e.length?"number"!=typeof e.length||(t=e.length)!=t?o(0):c(e):"Buffer"===e.type&&Array.isArray(e.data)?c(e.data):void 0}(e);if(s)return s;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return n.from(e[Symbol.toPrimitive]("string"),t,i);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function h(e){if("number"!=typeof e)throw TypeError('"size" argument must be of type number');if(e<0)throw RangeError('The value "'+e+'" is invalid for option "size"')}function d(e){return h(e),o(e<0?0:0|u(e))}function c(e){for(var t=e.length<0?0:0|u(e.length),i=o(t),r=0;r<t;r+=1)i[r]=255&e[r];return i}function u(e){if(e>=2147483647)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|e}function p(e,t){if(n.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||T(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var i=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===i)return 0;for(var s=!1;;)switch(t){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":return E(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return I(e).length;default:if(s)return r?-1:E(e).length;t=(""+t).toLowerCase(),s=!0}}function g(e,t,i){var s,a,o=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===i||i>this.length)&&(i=this.length),i<=0||(i>>>=0)<=(t>>>=0)))return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,i){var r=e.length;(!t||t<0)&&(t=0),(!i||i<0||i>r)&&(i=r);for(var s="",a=t;a<i;++a)s+=A[e[a]];return s}(this,t,i);case"utf8":case"utf-8":return y(this,t,i);case"ascii":return function(e,t,i){var r="";i=Math.min(e.length,i);for(var s=t;s<i;++s)r+=String.fromCharCode(127&e[s]);return r}(this,t,i);case"latin1":case"binary":return function(e,t,i){var r="";i=Math.min(e.length,i);for(var s=t;s<i;++s)r+=String.fromCharCode(e[s]);return r}(this,t,i);case"base64":return s=t,a=i,0===s&&a===this.length?r.fromByteArray(this):r.fromByteArray(this.slice(s,a));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(e,t,i){for(var r=e.slice(t,i),s="",a=0;a<r.length;a+=2)s+=String.fromCharCode(r[a]+256*r[a+1]);return s}(this,t,i);default:if(o)throw TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),o=!0}}function m(e,t,i){var r=e[t];e[t]=e[i],e[i]=r}function f(e,t,i,r,s){var a;if(0===e.length)return -1;if("string"==typeof i?(r=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),(a=i=+i)!=a&&(i=s?0:e.length-1),i<0&&(i=e.length+i),i>=e.length){if(s)return -1;i=e.length-1}else if(i<0){if(!s)return -1;i=0}if("string"==typeof t&&(t=n.from(t,r)),n.isBuffer(t))return 0===t.length?-1:v(e,t,i,r,s);if("number"==typeof t)return(t&=255,"function"==typeof Uint8Array.prototype.indexOf)?s?Uint8Array.prototype.indexOf.call(e,t,i):Uint8Array.prototype.lastIndexOf.call(e,t,i):v(e,[t],i,r,s);throw TypeError("val must be string, number or Buffer")}function v(e,t,i,r,s){var a,o=1,n=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return -1;o=2,n/=2,l/=2,i/=2}function h(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(s){var d=-1;for(a=i;a<n;a++)if(h(e,a)===h(t,-1===d?0:a-d)){if(-1===d&&(d=a),a-d+1===l)return d*o}else -1!==d&&(a-=a-d),d=-1}else for(i+l>n&&(i=n-l),a=i;a>=0;a--){for(var c=!0,u=0;u<l;u++)if(h(e,a+u)!==h(t,u)){c=!1;break}if(c)return a}return -1}function y(e,t,i){i=Math.min(e.length,i);for(var r=[],s=t;s<i;){var a,o,n,l,h=e[s],d=null,c=h>239?4:h>223?3:h>191?2:1;if(s+c<=i)switch(c){case 1:h<128&&(d=h);break;case 2:(192&(a=e[s+1]))==128&&(l=(31&h)<<6|63&a)>127&&(d=l);break;case 3:a=e[s+1],o=e[s+2],(192&a)==128&&(192&o)==128&&(l=(15&h)<<12|(63&a)<<6|63&o)>2047&&(l<55296||l>57343)&&(d=l);break;case 4:a=e[s+1],o=e[s+2],n=e[s+3],(192&a)==128&&(192&o)==128&&(192&n)==128&&(l=(15&h)<<18|(63&a)<<12|(63&o)<<6|63&n)>65535&&l<1114112&&(d=l)}null===d?(d=65533,c=1):d>65535&&(d-=65536,r.push(d>>>10&1023|55296),d=56320|1023&d),r.push(d),s+=c}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);for(var i="",r=0;r<t;)i+=String.fromCharCode.apply(String,e.slice(r,r+=4096));return i}(r)}function C(e,t,i){if(e%1!=0||e<0)throw RangeError("offset is not uint");if(e+t>i)throw RangeError("Trying to access beyond buffer length")}function w(e,t,i,r,s,a){if(!n.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>s||t<a)throw RangeError('"value" argument is out of bounds');if(i+r>e.length)throw RangeError("Index out of range")}function b(e,t,i,r,s,a){if(i+r>e.length||i<0)throw RangeError("Index out of range")}function S(e,t,i,r,a){return t=+t,i>>>=0,a||b(e,t,i,4,34028234663852886e22,-34028234663852886e22),s.write(e,t,i,r,23,4),i+4}function x(e,t,i,r,a){return t=+t,i>>>=0,a||b(e,t,i,8,17976931348623157e292,-17976931348623157e292),s.write(e,t,i,r,52,8),i+8}t.Buffer=n,t.SlowBuffer=function(e){return+e!=e&&(e=0),n.alloc(+e)},t.INSPECT_MAX_BYTES=50,t.kMaxLength=2147483647,n.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),n.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(n.prototype,"parent",{enumerable:!0,get:function(){if(n.isBuffer(this))return this.buffer}}),Object.defineProperty(n.prototype,"offset",{enumerable:!0,get:function(){if(n.isBuffer(this))return this.byteOffset}}),n.poolSize=8192,n.from=function(e,t,i){return l(e,t,i)},Object.setPrototypeOf(n.prototype,Uint8Array.prototype),Object.setPrototypeOf(n,Uint8Array),n.alloc=function(e,t,i){return(h(e),e<=0)?o(e):void 0!==t?"string"==typeof i?o(e).fill(t,i):o(e).fill(t):o(e)},n.allocUnsafe=function(e){return d(e)},n.allocUnsafeSlow=function(e){return d(e)},n.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==n.prototype},n.compare=function(e,t){if(T(e,Uint8Array)&&(e=n.from(e,e.offset,e.byteLength)),T(t,Uint8Array)&&(t=n.from(t,t.offset,t.byteLength)),!n.isBuffer(e)||!n.isBuffer(t))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var i=e.length,r=t.length,s=0,a=Math.min(i,r);s<a;++s)if(e[s]!==t[s]){i=e[s],r=t[s];break}return i<r?-1:r<i?1:0},n.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},n.concat=function(e,t){if(!Array.isArray(e))throw TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return n.alloc(0);if(void 0===t)for(i=0,t=0;i<e.length;++i)t+=e[i].length;var i,r=n.allocUnsafe(t),s=0;for(i=0;i<e.length;++i){var a=e[i];if(T(a,Uint8Array)&&(a=n.from(a)),!n.isBuffer(a))throw TypeError('"list" argument must be an Array of Buffers');a.copy(r,s),s+=a.length}return r},n.byteLength=p,n.prototype._isBuffer=!0,n.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)m(this,t,t+1);return this},n.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)m(this,t,t+3),m(this,t+1,t+2);return this},n.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)m(this,t,t+7),m(this,t+1,t+6),m(this,t+2,t+5),m(this,t+3,t+4);return this},n.prototype.toString=function(){var e=this.length;return 0===e?"":0==arguments.length?y(this,0,e):g.apply(this,arguments)},n.prototype.toLocaleString=n.prototype.toString,n.prototype.equals=function(e){if(!n.isBuffer(e))throw TypeError("Argument must be a Buffer");return this===e||0===n.compare(this,e)},n.prototype.inspect=function(){var e="",i=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,i).replace(/(.{2})/g,"$1 ").trim(),this.length>i&&(e+=" ... "),"<Buffer "+e+">"},a&&(n.prototype[a]=n.prototype.inspect),n.prototype.compare=function(e,t,i,r,s){if(T(e,Uint8Array)&&(e=n.from(e,e.offset,e.byteLength)),!n.isBuffer(e))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===i&&(i=e?e.length:0),void 0===r&&(r=0),void 0===s&&(s=this.length),t<0||i>e.length||r<0||s>this.length)throw RangeError("out of range index");if(r>=s&&t>=i)return 0;if(r>=s)return -1;if(t>=i)return 1;if(t>>>=0,i>>>=0,r>>>=0,s>>>=0,this===e)return 0;for(var a=s-r,o=i-t,l=Math.min(a,o),h=this.slice(r,s),d=e.slice(t,i),c=0;c<l;++c)if(h[c]!==d[c]){a=h[c],o=d[c];break}return a<o?-1:o<a?1:0},n.prototype.includes=function(e,t,i){return -1!==this.indexOf(e,t,i)},n.prototype.indexOf=function(e,t,i){return f(this,e,t,i,!0)},n.prototype.lastIndexOf=function(e,t,i){return f(this,e,t,i,!1)},n.prototype.write=function(e,t,i,r){if(void 0===t)r="utf8",i=this.length,t=0;else if(void 0===i&&"string"==typeof t)r=t,i=this.length,t=0;else if(isFinite(t))t>>>=0,isFinite(i)?(i>>>=0,void 0===r&&(r="utf8")):(r=i,i=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var s,a,o,n,l,h,d,c,u,p,g,m,f=this.length-t;if((void 0===i||i>f)&&(i=f),e.length>0&&(i<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var v=!1;;)switch(r){case"hex":return function(e,t,i,r){i=Number(i)||0;var s=e.length-i;r?(r=Number(r))>s&&(r=s):r=s;var a=t.length;r>a/2&&(r=a/2);for(var o=0;o<r;++o){var n=parseInt(t.substr(2*o,2),16);if(n!=n)break;e[i+o]=n}return o}(this,e,t,i);case"utf8":case"utf-8":return l=t,h=i,k(E(e,this.length-l),this,l,h);case"ascii":return d=t,c=i,k(D(e),this,d,c);case"latin1":case"binary":return s=this,a=e,o=t,n=i,k(D(a),s,o,n);case"base64":return u=t,p=i,k(I(e),this,u,p);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return g=t,m=i,k(function(e,t){for(var i,r,s=[],a=0;a<e.length&&!((t-=2)<0);++a)r=(i=e.charCodeAt(a))>>8,s.push(i%256),s.push(r);return s}(e,this.length-g),this,g,m);default:if(v)throw TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),v=!0}},n.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},n.prototype.slice=function(e,t){var i=this.length;e=~~e,t=void 0===t?i:~~t,e<0?(e+=i)<0&&(e=0):e>i&&(e=i),t<0?(t+=i)<0&&(t=0):t>i&&(t=i),t<e&&(t=e);var r=this.subarray(e,t);return Object.setPrototypeOf(r,n.prototype),r},n.prototype.readUIntLE=function(e,t,i){e>>>=0,t>>>=0,i||C(e,t,this.length);for(var r=this[e],s=1,a=0;++a<t&&(s*=256);)r+=this[e+a]*s;return r},n.prototype.readUIntBE=function(e,t,i){e>>>=0,t>>>=0,i||C(e,t,this.length);for(var r=this[e+--t],s=1;t>0&&(s*=256);)r+=this[e+--t]*s;return r},n.prototype.readUInt8=function(e,t){return e>>>=0,t||C(e,1,this.length),this[e]},n.prototype.readUInt16LE=function(e,t){return e>>>=0,t||C(e,2,this.length),this[e]|this[e+1]<<8},n.prototype.readUInt16BE=function(e,t){return e>>>=0,t||C(e,2,this.length),this[e]<<8|this[e+1]},n.prototype.readUInt32LE=function(e,t){return e>>>=0,t||C(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},n.prototype.readUInt32BE=function(e,t){return e>>>=0,t||C(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},n.prototype.readIntLE=function(e,t,i){e>>>=0,t>>>=0,i||C(e,t,this.length);for(var r=this[e],s=1,a=0;++a<t&&(s*=256);)r+=this[e+a]*s;return r>=(s*=128)&&(r-=Math.pow(2,8*t)),r},n.prototype.readIntBE=function(e,t,i){e>>>=0,t>>>=0,i||C(e,t,this.length);for(var r=t,s=1,a=this[e+--r];r>0&&(s*=256);)a+=this[e+--r]*s;return a>=(s*=128)&&(a-=Math.pow(2,8*t)),a},n.prototype.readInt8=function(e,t){return(e>>>=0,t||C(e,1,this.length),128&this[e])?-((255-this[e]+1)*1):this[e]},n.prototype.readInt16LE=function(e,t){e>>>=0,t||C(e,2,this.length);var i=this[e]|this[e+1]<<8;return 32768&i?4294901760|i:i},n.prototype.readInt16BE=function(e,t){e>>>=0,t||C(e,2,this.length);var i=this[e+1]|this[e]<<8;return 32768&i?4294901760|i:i},n.prototype.readInt32LE=function(e,t){return e>>>=0,t||C(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},n.prototype.readInt32BE=function(e,t){return e>>>=0,t||C(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},n.prototype.readFloatLE=function(e,t){return e>>>=0,t||C(e,4,this.length),s.read(this,e,!0,23,4)},n.prototype.readFloatBE=function(e,t){return e>>>=0,t||C(e,4,this.length),s.read(this,e,!1,23,4)},n.prototype.readDoubleLE=function(e,t){return e>>>=0,t||C(e,8,this.length),s.read(this,e,!0,52,8)},n.prototype.readDoubleBE=function(e,t){return e>>>=0,t||C(e,8,this.length),s.read(this,e,!1,52,8)},n.prototype.writeUIntLE=function(e,t,i,r){if(e=+e,t>>>=0,i>>>=0,!r){var s=Math.pow(2,8*i)-1;w(this,e,t,i,s,0)}var a=1,o=0;for(this[t]=255&e;++o<i&&(a*=256);)this[t+o]=e/a&255;return t+i},n.prototype.writeUIntBE=function(e,t,i,r){if(e=+e,t>>>=0,i>>>=0,!r){var s=Math.pow(2,8*i)-1;w(this,e,t,i,s,0)}var a=i-1,o=1;for(this[t+a]=255&e;--a>=0&&(o*=256);)this[t+a]=e/o&255;return t+i},n.prototype.writeUInt8=function(e,t,i){return e=+e,t>>>=0,i||w(this,e,t,1,255,0),this[t]=255&e,t+1},n.prototype.writeUInt16LE=function(e,t,i){return e=+e,t>>>=0,i||w(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},n.prototype.writeUInt16BE=function(e,t,i){return e=+e,t>>>=0,i||w(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},n.prototype.writeUInt32LE=function(e,t,i){return e=+e,t>>>=0,i||w(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},n.prototype.writeUInt32BE=function(e,t,i){return e=+e,t>>>=0,i||w(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},n.prototype.writeIntLE=function(e,t,i,r){if(e=+e,t>>>=0,!r){var s=Math.pow(2,8*i-1);w(this,e,t,i,s-1,-s)}var a=0,o=1,n=0;for(this[t]=255&e;++a<i&&(o*=256);)e<0&&0===n&&0!==this[t+a-1]&&(n=1),this[t+a]=(e/o>>0)-n&255;return t+i},n.prototype.writeIntBE=function(e,t,i,r){if(e=+e,t>>>=0,!r){var s=Math.pow(2,8*i-1);w(this,e,t,i,s-1,-s)}var a=i-1,o=1,n=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===n&&0!==this[t+a+1]&&(n=1),this[t+a]=(e/o>>0)-n&255;return t+i},n.prototype.writeInt8=function(e,t,i){return e=+e,t>>>=0,i||w(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},n.prototype.writeInt16LE=function(e,t,i){return e=+e,t>>>=0,i||w(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},n.prototype.writeInt16BE=function(e,t,i){return e=+e,t>>>=0,i||w(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},n.prototype.writeInt32LE=function(e,t,i){return e=+e,t>>>=0,i||w(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},n.prototype.writeInt32BE=function(e,t,i){return e=+e,t>>>=0,i||w(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},n.prototype.writeFloatLE=function(e,t,i){return S(this,e,t,!0,i)},n.prototype.writeFloatBE=function(e,t,i){return S(this,e,t,!1,i)},n.prototype.writeDoubleLE=function(e,t,i){return x(this,e,t,!0,i)},n.prototype.writeDoubleBE=function(e,t,i){return x(this,e,t,!1,i)},n.prototype.copy=function(e,t,i,r){if(!n.isBuffer(e))throw TypeError("argument should be a Buffer");if(i||(i=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<i&&(r=i),r===i||0===e.length||0===this.length)return 0;if(t<0)throw RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw RangeError("Index out of range");if(r<0)throw RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-i&&(r=e.length-t+i);var s=r-i;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(t,i,r);else if(this===e&&i<t&&t<r)for(var a=s-1;a>=0;--a)e[a+t]=this[a+i];else Uint8Array.prototype.set.call(e,this.subarray(i,r),t);return s},n.prototype.fill=function(e,t,i,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,i=this.length):"string"==typeof i&&(r=i,i=this.length),void 0!==r&&"string"!=typeof r)throw TypeError("encoding must be a string");if("string"==typeof r&&!n.isEncoding(r))throw TypeError("Unknown encoding: "+r);if(1===e.length){var s,a=e.charCodeAt(0);("utf8"===r&&a<128||"latin1"===r)&&(e=a)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<i)throw RangeError("Out of range index");if(i<=t)return this;if(t>>>=0,i=void 0===i?this.length:i>>>0,e||(e=0),"number"==typeof e)for(s=t;s<i;++s)this[s]=e;else{var o=n.isBuffer(e)?e:n.from(e,r),l=o.length;if(0===l)throw TypeError('The value "'+e+'" is invalid for argument "value"');for(s=0;s<i-t;++s)this[s+t]=o[s%l]}return this};var M=/[^+/0-9A-Za-z-_]/g;function E(e,t){t=t||1/0;for(var i,r=e.length,s=null,a=[],o=0;o<r;++o){if((i=e.charCodeAt(o))>55295&&i<57344){if(!s){if(i>56319||o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}s=i;continue}if(i<56320){(t-=3)>-1&&a.push(239,191,189),s=i;continue}i=(s-55296<<10|i-56320)+65536}else s&&(t-=3)>-1&&a.push(239,191,189);if(s=null,i<128){if((t-=1)<0)break;a.push(i)}else if(i<2048){if((t-=2)<0)break;a.push(i>>6|192,63&i|128)}else if(i<65536){if((t-=3)<0)break;a.push(i>>12|224,i>>6&63|128,63&i|128)}else if(i<1114112){if((t-=4)<0)break;a.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}else throw Error("Invalid code point")}return a}function D(e){for(var t=[],i=0;i<e.length;++i)t.push(255&e.charCodeAt(i));return t}function I(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(M,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function k(e,t,i,r){for(var s=0;s<r&&!(s+i>=t.length)&&!(s>=e.length);++s)t[s+i]=e[s];return s}function T(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}var A=function(){for(var e="0123456789abcdef",t=Array(256),i=0;i<16;++i)for(var r=16*i,s=0;s<16;++s)t[r+s]=e[i]+e[s];return t}()},783:function(e,t){t.read=function(e,t,i,r,s){var a,o,n=8*s-r-1,l=(1<<n)-1,h=l>>1,d=-7,c=i?s-1:0,u=i?-1:1,p=e[t+c];for(c+=u,a=p&(1<<-d)-1,p>>=-d,d+=n;d>0;a=256*a+e[t+c],c+=u,d-=8);for(o=a&(1<<-d)-1,a>>=-d,d+=r;d>0;o=256*o+e[t+c],c+=u,d-=8);if(0===a)a=1-h;else{if(a===l)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,r),a-=h}return(p?-1:1)*o*Math.pow(2,a-r)},t.write=function(e,t,i,r,s,a){var o,n,l,h=8*a-s-1,d=(1<<h)-1,c=d>>1,u=23===s?5960464477539062e-23:0,p=r?0:a-1,g=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(isNaN(t=Math.abs(t))||t===1/0?(n=isNaN(t)?1:0,o=d):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+c>=1?t+=u/l:t+=u*Math.pow(2,1-c),t*l>=2&&(o++,l/=2),o+c>=d?(n=0,o=d):o+c>=1?(n=(t*l-1)*Math.pow(2,s),o+=c):(n=t*Math.pow(2,c-1)*Math.pow(2,s),o=0));s>=8;e[i+p]=255&n,p+=g,n/=256,s-=8);for(o=o<<s|n,h+=s;h>0;e[i+p]=255&o,p+=g,o/=256,h-=8);e[i+p-g]|=128*m}}},i={};function r(e){var s=i[e];if(void 0!==s)return s.exports;var a=i[e]={exports:{}},o=!0;try{t[e](a,a.exports,r),o=!1}finally{o&&delete i[e]}return a.exports}r.ab="//";var s=r(72);e.exports=s}()},1409:function(){},96452:function(){},88112:function(){},4213:function(){},75158:function(){},94180:function(){},32646:function(){},58447:function(){},74881:function(){},61610:function(){},77663:function(e){!function(){var t={229:function(e){var t,i,r,s=e.exports={};function a(){throw Error("setTimeout has not been defined")}function o(){throw Error("clearTimeout has not been defined")}function n(e){if(t===setTimeout)return setTimeout(e,0);if((t===a||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(i){try{return t.call(null,e,0)}catch(i){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:a}catch(e){t=a}try{i="function"==typeof clearTimeout?clearTimeout:o}catch(e){i=o}}();var l=[],h=!1,d=-1;function c(){h&&r&&(h=!1,r.length?l=r.concat(l):d=-1,l.length&&u())}function u(){if(!h){var e=n(c);h=!0;for(var t=l.length;t;){for(r=l,l=[];++d<t;)r&&r[d].run();d=-1,t=l.length}r=null,h=!1,function(e){if(i===clearTimeout)return clearTimeout(e);if((i===o||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(e);try{i(e)}catch(t){try{return i.call(null,e)}catch(t){return i.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function g(){}s.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)t[i-1]=arguments[i];l.push(new p(e,t)),1!==l.length||h||n(u)},p.prototype.run=function(){this.fun.apply(null,this.array)},s.title="browser",s.browser=!0,s.env={},s.argv=[],s.version="",s.versions={},s.on=g,s.addListener=g,s.once=g,s.off=g,s.removeListener=g,s.removeAllListeners=g,s.emit=g,s.prependListener=g,s.prependOnceListener=g,s.listeners=function(e){return[]},s.binding=function(e){throw Error("process.binding is not supported")},s.cwd=function(){return"/"},s.chdir=function(e){throw Error("process.chdir is not supported")},s.umask=function(){return 0}}},i={};function r(e){var s=i[e];if(void 0!==s)return s.exports;var a=i[e]={exports:{}},o=!0;try{t[e](a,a.exports,r),o=!1}finally{o&&delete i[e]}return a.exports}r.ab="//";var s=r(229);e.exports=s}()},80725:function(e,t,i){var r;(()=>{var s={226:function(s,a){!function(o,n){"use strict";var l="function",h="undefined",d="object",c="string",u="major",p="model",g="name",m="type",f="vendor",v="version",y="architecture",C="console",w="mobile",b="tablet",S="smarttv",x="wearable",M="embedded",E="Amazon",D="Apple",I="ASUS",k="BlackBerry",T="Browser",A="Chrome",R="Firefox",L="Google",P="Huawei",F="Microsoft",N="Motorola",O="Opera",B="Samsung",G="Sharp",z="Sony",_="Xiaomi",V="Zebra",j="Facebook",H="Chromium OS",U="Mac OS",W=function(e,t){var i={};for(var r in e)t[r]&&t[r].length%2==0?i[r]=t[r].concat(e[r]):i[r]=e[r];return i},$=function(e){for(var t={},i=0;i<e.length;i++)t[e[i].toUpperCase()]=e[i];return t},Y=function(e,t){return typeof e===c&&-1!==K(t).indexOf(K(e))},K=function(e){return e.toLowerCase()},Z=function(e,t){if(typeof e===c)return e=e.replace(/^\s\s*/,""),typeof t===h?e:e.substring(0,350)},q=function(e,t){for(var i,r,s,a,o,h,c=0;c<t.length&&!o;){var u=t[c],p=t[c+1];for(i=r=0;i<u.length&&!o&&u[i];)if(o=u[i++].exec(e))for(s=0;s<p.length;s++)h=o[++r],typeof(a=p[s])===d&&a.length>0?2===a.length?typeof a[1]==l?this[a[0]]=a[1].call(this,h):this[a[0]]=a[1]:3===a.length?typeof a[1]!==l||a[1].exec&&a[1].test?this[a[0]]=h?h.replace(a[1],a[2]):void 0:this[a[0]]=h?a[1].call(this,h,a[2]):void 0:4===a.length&&(this[a[0]]=h?a[3].call(this,h.replace(a[1],a[2])):void 0):this[a]=h||n;c+=2}},X=function(e,t){for(var i in t)if(typeof t[i]===d&&t[i].length>0){for(var r=0;r<t[i].length;r++)if(Y(t[i][r],e))return"?"===i?n:i}else if(Y(t[i],e))return"?"===i?n:i;return e},Q={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},J={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[v,[g,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[v,[g,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[g,v],[/opios[\/ ]+([\w\.]+)/i],[v,[g,O+" Mini"]],[/\bopr\/([\w\.]+)/i],[v,[g,O]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[g,v],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[v,[g,"UC"+T]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i],[v,[g,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[v,[g,"WeChat"]],[/konqueror\/([\w\.]+)/i],[v,[g,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[v,[g,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[v,[g,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[g,/(.+)/,"$1 Secure "+T],v],[/\bfocus\/([\w\.]+)/i],[v,[g,R+" Focus"]],[/\bopt\/([\w\.]+)/i],[v,[g,O+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[v,[g,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[v,[g,"Dolphin"]],[/coast\/([\w\.]+)/i],[v,[g,O+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[v,[g,"MIUI "+T]],[/fxios\/([-\w\.]+)/i],[v,[g,R]],[/\bqihu|(qi?ho?o?|360)browser/i],[[g,"360 "+T]],[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],[[g,/(.+)/,"$1 "+T],v],[/(comodo_dragon)\/([\w\.]+)/i],[[g,/_/g," "],v],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[g,v],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i,/\[(linkedin)app\]/i],[g],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[g,j],v],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[g,v],[/\bgsa\/([\w\.]+) .*safari\//i],[v,[g,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[v,[g,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[v,[g,A+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[g,A+" WebView"],v],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[v,[g,"Android "+T]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[g,v],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[v,[g,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[v,g],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[g,[v,X,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[g,v],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[g,"Netscape"],v],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[v,[g,R+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[g,v],[/(cobalt)\/([\w\.]+)/i],[g,[v,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[y,"amd64"]],[/(ia32(?=;))/i],[[y,K]],[/((?:i[346]|x)86)[;\)]/i],[[y,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[y,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[y,"armhf"]],[/windows (ce|mobile); ppc;/i],[[y,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[y,/ower/,"",K]],[/(sun4\w)[;\)]/i],[[y,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[y,K]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[p,[f,B],[m,b]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[p,[f,B],[m,w]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[p,[f,D],[m,w]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[p,[f,D],[m,b]],[/(macintosh);/i],[p,[f,D]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[p,[f,G],[m,w]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[p,[f,P],[m,b]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[p,[f,P],[m,w]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[p,/_/g," "],[f,_],[m,w]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[p,/_/g," "],[f,_],[m,b]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[p,[f,"OPPO"],[m,w]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[p,[f,"Vivo"],[m,w]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[p,[f,"Realme"],[m,w]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[p,[f,N],[m,w]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[p,[f,N],[m,b]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[p,[f,"LG"],[m,b]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[p,[f,"LG"],[m,w]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[p,[f,"Lenovo"],[m,b]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[p,/_/g," "],[f,"Nokia"],[m,w]],[/(pixel c)\b/i],[p,[f,L],[m,b]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[p,[f,L],[m,w]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[p,[f,z],[m,w]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[p,"Xperia Tablet"],[f,z],[m,b]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[p,[f,"OnePlus"],[m,w]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[p,[f,E],[m,b]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[p,/(.+)/g,"Fire Phone $1"],[f,E],[m,w]],[/(playbook);[-\w\),; ]+(rim)/i],[p,f,[m,b]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[p,[f,k],[m,w]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[p,[f,I],[m,b]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[p,[f,I],[m,w]],[/(nexus 9)/i],[p,[f,"HTC"],[m,b]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[f,[p,/_/g," "],[m,w]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[p,[f,"Acer"],[m,b]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[p,[f,"Meizu"],[m,w]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[f,p,[m,w]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[f,p,[m,b]],[/(surface duo)/i],[p,[f,F],[m,b]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[p,[f,"Fairphone"],[m,w]],[/(u304aa)/i],[p,[f,"AT&T"],[m,w]],[/\bsie-(\w*)/i],[p,[f,"Siemens"],[m,w]],[/\b(rct\w+) b/i],[p,[f,"RCA"],[m,b]],[/\b(venue[\d ]{2,7}) b/i],[p,[f,"Dell"],[m,b]],[/\b(q(?:mv|ta)\w+) b/i],[p,[f,"Verizon"],[m,b]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[p,[f,"Barnes & Noble"],[m,b]],[/\b(tm\d{3}\w+) b/i],[p,[f,"NuVision"],[m,b]],[/\b(k88) b/i],[p,[f,"ZTE"],[m,b]],[/\b(nx\d{3}j) b/i],[p,[f,"ZTE"],[m,w]],[/\b(gen\d{3}) b.+49h/i],[p,[f,"Swiss"],[m,w]],[/\b(zur\d{3}) b/i],[p,[f,"Swiss"],[m,b]],[/\b((zeki)?tb.*\b) b/i],[p,[f,"Zeki"],[m,b]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[f,"Dragon Touch"],p,[m,b]],[/\b(ns-?\w{0,9}) b/i],[p,[f,"Insignia"],[m,b]],[/\b((nxa|next)-?\w{0,9}) b/i],[p,[f,"NextBook"],[m,b]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[f,"Voice"],p,[m,w]],[/\b(lvtel\-)?(v1[12]) b/i],[[f,"LvTel"],p,[m,w]],[/\b(ph-1) /i],[p,[f,"Essential"],[m,w]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[p,[f,"Envizen"],[m,b]],[/\b(trio[-\w\. ]+) b/i],[p,[f,"MachSpeed"],[m,b]],[/\btu_(1491) b/i],[p,[f,"Rotor"],[m,b]],[/(shield[\w ]+) b/i],[p,[f,"Nvidia"],[m,b]],[/(sprint) (\w+)/i],[f,p,[m,w]],[/(kin\.[onetw]{3})/i],[[p,/\./g," "],[f,F],[m,w]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[p,[f,V],[m,b]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[p,[f,V],[m,w]],[/smart-tv.+(samsung)/i],[f,[m,S]],[/hbbtv.+maple;(\d+)/i],[[p,/^/,"SmartTV"],[f,B],[m,S]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[f,"LG"],[m,S]],[/(apple) ?tv/i],[f,[p,D+" TV"],[m,S]],[/crkey/i],[[p,A+"cast"],[f,L],[m,S]],[/droid.+aft(\w)( bui|\))/i],[p,[f,E],[m,S]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[p,[f,G],[m,S]],[/(bravia[\w ]+)( bui|\))/i],[p,[f,z],[m,S]],[/(mitv-\w{5}) bui/i],[p,[f,_],[m,S]],[/Hbbtv.*(technisat) (.*);/i],[f,p,[m,S]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[f,Z],[p,Z],[m,S]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[m,S]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[f,p,[m,C]],[/droid.+; (shield) bui/i],[p,[f,"Nvidia"],[m,C]],[/(playstation [345portablevi]+)/i],[p,[f,z],[m,C]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[p,[f,F],[m,C]],[/((pebble))app/i],[f,p,[m,x]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[p,[f,D],[m,x]],[/droid.+; (glass) \d/i],[p,[f,L],[m,x]],[/droid.+; (wt63?0{2,3})\)/i],[p,[f,V],[m,x]],[/(quest( 2| pro)?)/i],[p,[f,j],[m,x]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[f,[m,M]],[/(aeobc)\b/i],[p,[f,E],[m,M]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[p,[m,w]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[p,[m,b]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[m,b]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[m,w]],[/(android[-\w\. ]{0,9});.+buil/i],[p,[f,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[v,[g,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[v,[g,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[g,v],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[v,g]],os:[[/microsoft (windows) (vista|xp)/i],[g,v],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[g,[v,X,Q]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[g,"Windows"],[v,X,Q]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/ios;fbsv\/([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[v,/_/g,"."],[g,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[g,U],[v,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[v,g],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[g,v],[/\(bb(10);/i],[v,[g,k]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[v,[g,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[v,[g,R+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[v,[g,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[v,[g,"watchOS"]],[/crkey\/([\d\.]+)/i],[v,[g,A+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[g,H],v],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[g,v],[/(sunos) ?([\w\.\d]*)/i],[[g,"Solaris"],v],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[g,v]]},ee=function(e,t){if(typeof e===d&&(t=e,e=n),!(this instanceof ee))return new ee(e,t).getResult();var i=typeof o!==h&&o.navigator?o.navigator:n,r=e||(i&&i.userAgent?i.userAgent:""),s=i&&i.userAgentData?i.userAgentData:n,a=t?W(J,t):J,C=i&&i.userAgent==r;return this.getBrowser=function(){var e,t={};return t[g]=n,t[v]=n,q.call(t,r,a.browser),t[u]=typeof(e=t[v])===c?e.replace(/[^\d\.]/g,"").split(".")[0]:n,C&&i&&i.brave&&typeof i.brave.isBrave==l&&(t[g]="Brave"),t},this.getCPU=function(){var e={};return e[y]=n,q.call(e,r,a.cpu),e},this.getDevice=function(){var e={};return e[f]=n,e[p]=n,e[m]=n,q.call(e,r,a.device),C&&!e[m]&&s&&s.mobile&&(e[m]=w),C&&"Macintosh"==e[p]&&i&&typeof i.standalone!==h&&i.maxTouchPoints&&i.maxTouchPoints>2&&(e[p]="iPad",e[m]=b),e},this.getEngine=function(){var e={};return e[g]=n,e[v]=n,q.call(e,r,a.engine),e},this.getOS=function(){var e={};return e[g]=n,e[v]=n,q.call(e,r,a.os),C&&!e[g]&&s&&"Unknown"!=s.platform&&(e[g]=s.platform.replace(/chrome os/i,H).replace(/macos/i,U)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return r},this.setUA=function(e){return r=typeof e===c&&e.length>350?Z(e,350):e,this},this.setUA(r),this};ee.VERSION="1.0.35",ee.BROWSER=$([g,v,u]),ee.CPU=$([y]),ee.DEVICE=$([p,f,m,C,w,S,b,x,M]),ee.ENGINE=ee.OS=$([g,v]),typeof a!==h?(s.exports&&(a=s.exports=ee),a.UAParser=ee):i.amdO?void 0!==(r=(function(){return ee}).call(t,i,t,e))&&(e.exports=r):typeof o!==h&&(o.UAParser=ee);var et=typeof o!==h&&(o.jQuery||o.Zepto);if(et&&!et.ua){var ei=new ee;et.ua=ei.getResult(),et.ua.get=function(){return ei.getUA()},et.ua.set=function(e){ei.setUA(e);var t=ei.getResult();for(var i in t)et.ua[i]=t[i]}}}("object"==typeof window?window:this)}},a={};function o(e){var t=a[e];if(void 0!==t)return t.exports;var i=a[e]={exports:{}},r=!0;try{s[e].call(i.exports,i,i.exports,o),r=!1}finally{r&&delete a[e]}return i.exports}o.ab="//";var n=o(226);e.exports=n})()},39949:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var i in t)Object.defineProperty(e,i,{enumerable:!0,get:t[i]})}(t,{PageSignatureError:function(){return i},RemovedPageError:function(){return r},RemovedUAError:function(){return s}});class i extends Error{constructor({page:e}){super(`The middleware "${e}" accepts an async API directly with the form:
  
  export function middleware(request, event) {
    return NextResponse.redirect('/new-location')
  }
  
  Read more: https://nextjs.org/docs/messages/middleware-new-signature
  `)}}class r extends Error{constructor(){super(`The request.page has been deprecated in favour of \`URLPattern\`.
  Read more: https://nextjs.org/docs/messages/middleware-request-page
  `)}}class s extends Error{constructor(){super(`The request.ua has been removed in favour of \`userAgent\` function.
  Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent
  `)}}},1289:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"NextURL",{enumerable:!0,get:function(){return d}});let r=i(70410),s=i(95701),a=i(42167),o=i(28995),n=/(?!^https?:\/\/)(127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|\[::1\]|localhost)/;function l(e,t){return new URL(String(e).replace(n,"localhost"),t&&String(t).replace(n,"localhost"))}let h=Symbol("NextURLInternal");class d{constructor(e,t,i){let r,s;"object"==typeof t&&"pathname"in t||"string"==typeof t?(r=t,s=i||{}):s=i||t||{},this[h]={url:l(e,r??s.base),options:s,basePath:""},this.analyze()}analyze(){var e,t,i,s,n;let l=(0,o.getNextPathnameInfo)(this[h].url.pathname,{nextConfig:this[h].options.nextConfig,parseData:!0,i18nProvider:this[h].options.i18nProvider}),d=(0,a.getHostname)(this[h].url,this[h].options.headers);this[h].domainLocale=this[h].options.i18nProvider?this[h].options.i18nProvider.detectDomainLocale(d):(0,r.detectDomainLocale)(null==(t=this[h].options.nextConfig)?void 0:null==(e=t.i18n)?void 0:e.domains,d);let c=(null==(i=this[h].domainLocale)?void 0:i.defaultLocale)||(null==(n=this[h].options.nextConfig)?void 0:null==(s=n.i18n)?void 0:s.defaultLocale);this[h].url.pathname=l.pathname,this[h].defaultLocale=c,this[h].basePath=l.basePath??"",this[h].buildId=l.buildId,this[h].locale=l.locale??c,this[h].trailingSlash=l.trailingSlash}formatPathname(){return(0,s.formatNextPathnameInfo)({basePath:this[h].basePath,buildId:this[h].buildId,defaultLocale:this[h].options.forceLocale?void 0:this[h].defaultLocale,locale:this[h].locale,pathname:this[h].url.pathname,trailingSlash:this[h].trailingSlash})}formatSearch(){return this[h].url.search}get buildId(){return this[h].buildId}set buildId(e){this[h].buildId=e}get locale(){return this[h].locale??""}set locale(e){var t,i;if(!this[h].locale||!(null==(i=this[h].options.nextConfig)?void 0:null==(t=i.i18n)?void 0:t.locales.includes(e)))throw TypeError(`The NextURL configuration includes no locale "${e}"`);this[h].locale=e}get defaultLocale(){return this[h].defaultLocale}get domainLocale(){return this[h].domainLocale}get searchParams(){return this[h].url.searchParams}get host(){return this[h].url.host}set host(e){this[h].url.host=e}get hostname(){return this[h].url.hostname}set hostname(e){this[h].url.hostname=e}get port(){return this[h].url.port}set port(e){this[h].url.port=e}get protocol(){return this[h].url.protocol}set protocol(e){this[h].url.protocol=e}get href(){let e=this.formatPathname(),t=this.formatSearch();return`${this.protocol}//${this.host}${e}${t}${this.hash}`}set href(e){this[h].url=l(e),this.analyze()}get origin(){return this[h].url.origin}get pathname(){return this[h].url.pathname}set pathname(e){this[h].url.pathname=e}get hash(){return this[h].url.hash}set hash(e){this[h].url.hash=e}get search(){return this[h].url.search}set search(e){this[h].url.search=e}get password(){return this[h].url.password}set password(e){this[h].url.password=e}get username(){return this[h].url.username}set username(e){this[h].url.username=e}get basePath(){return this[h].basePath}set basePath(e){this[h].basePath=e.startsWith("/")?e:`/${e}`}toString(){return this.href}toJSON(){return this.href}[Symbol.for("edge-runtime.inspect.custom")](){return{href:this.href,origin:this.origin,protocol:this.protocol,username:this.username,password:this.password,host:this.host,hostname:this.hostname,port:this.port,pathname:this.pathname,search:this.search,searchParams:this.searchParams,hash:this.hash}}clone(){return new d(String(this),this[h].options)}}},47246:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ReflectAdapter",{enumerable:!0,get:function(){return i}});class i{static get(e,t,i){let r=Reflect.get(e,t,i);return"function"==typeof r?r.bind(e):r}static set(e,t,i,r){return Reflect.set(e,t,i,r)}static has(e,t){return Reflect.has(e,t)}static deleteProperty(e,t){return Reflect.deleteProperty(e,t)}}},80255:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var i in t)Object.defineProperty(e,i,{enumerable:!0,get:t[i]})}(t,{RequestCookies:function(){return r.RequestCookies},ResponseCookies:function(){return r.ResponseCookies},stringifyCookie:function(){return r.stringifyCookie}});let r=i(89079)},77239:function(e,t){"use strict";function i(){throw Error('ImageResponse moved from "next/server" to "next/og" since Next.js 14, please import from "next/og" instead')}Object.defineProperty(t,"E",{enumerable:!0,get:function(){return i}})},53399:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var i in t)Object.defineProperty(e,i,{enumerable:!0,get:t[i]})}(t,{INTERNALS:function(){return n},NextRequest:function(){return l}});let r=i(1289),s=i(9129),a=i(39949),o=i(80255),n=Symbol("internal request");class l extends Request{constructor(e,t={}){let i="string"!=typeof e&&"url"in e?e.url:String(e);(0,s.validateURL)(i),e instanceof Request?super(e,t):super(i,t);let a=new r.NextURL(i,{headers:(0,s.toNodeOutgoingHttpHeaders)(this.headers),nextConfig:t.nextConfig});this[n]={cookies:new o.RequestCookies(this.headers),geo:t.geo||{},ip:t.ip,nextUrl:a,url:a.toString()}}[Symbol.for("edge-runtime.inspect.custom")](){return{cookies:this.cookies,geo:this.geo,ip:this.ip,nextUrl:this.nextUrl,url:this.url,bodyUsed:this.bodyUsed,cache:this.cache,credentials:this.credentials,destination:this.destination,headers:Object.fromEntries(this.headers),integrity:this.integrity,keepalive:this.keepalive,method:this.method,mode:this.mode,redirect:this.redirect,referrer:this.referrer,referrerPolicy:this.referrerPolicy,signal:this.signal}}get cookies(){return this[n].cookies}get geo(){return this[n].geo}get ip(){return this[n].ip}get nextUrl(){return this[n].nextUrl}get page(){throw new a.RemovedPageError}get ua(){throw new a.RemovedUAError}get url(){return this[n].url}}},63013:function(e,t,i){"use strict";Object.defineProperty(t,"x",{enumerable:!0,get:function(){return c}});let r=i(80255),s=i(1289),a=i(9129),o=i(47246),n=i(80255),l=Symbol("internal response"),h=new Set([301,302,303,307,308]);function d(e,t){var i;if(null==e?void 0:null==(i=e.request)?void 0:i.headers){if(!(e.request.headers instanceof Headers))throw Error("request.headers must be an instance of Headers");let i=[];for(let[r,s]of e.request.headers)t.set("x-middleware-request-"+r,s),i.push(r);t.set("x-middleware-override-headers",i.join(","))}}class c extends Response{constructor(e,t={}){super(e,t);let i=this.headers,h=new Proxy(new n.ResponseCookies(i),{get(e,s,a){switch(s){case"delete":case"set":return(...a)=>{let o=Reflect.apply(e[s],e,a),l=new Headers(i);return o instanceof n.ResponseCookies&&i.set("x-middleware-set-cookie",o.getAll().map(e=>(0,r.stringifyCookie)(e)).join(",")),d(t,l),o};default:return o.ReflectAdapter.get(e,s,a)}}});this[l]={cookies:h,url:t.url?new s.NextURL(t.url,{headers:(0,a.toNodeOutgoingHttpHeaders)(i),nextConfig:t.nextConfig}):void 0}}[Symbol.for("edge-runtime.inspect.custom")](){return{cookies:this.cookies,url:this.url,body:this.body,bodyUsed:this.bodyUsed,headers:Object.fromEntries(this.headers),ok:this.ok,redirected:this.redirected,status:this.status,statusText:this.statusText,type:this.type}}get cookies(){return this[l].cookies}static json(e,t){let i=Response.json(e,t);return new c(i.body,i)}static redirect(e,t){let i="number"==typeof t?t:(null==t?void 0:t.status)??307;if(!h.has(i))throw RangeError('Failed to execute "redirect" on "response": Invalid status code');let r="object"==typeof t?t:{},s=new Headers(null==r?void 0:r.headers);return s.set("Location",(0,a.validateURL)(e)),new c(null,{...r,headers:s,status:i})}static rewrite(e,t){let i=new Headers(null==t?void 0:t.headers);return i.set("x-middleware-rewrite",(0,a.validateURL)(e)),d(t,i),new c(null,{...t,headers:i})}static next(e){let t=new Headers(null==e?void 0:e.headers);return t.set("x-middleware-next","1"),d(e,t),new c(null,{...e,headers:t})}}},89297:function(e,t){"use strict";Object.defineProperty(t,"o",{enumerable:!0,get:function(){return i}});let i="undefined"==typeof URLPattern?void 0:URLPattern},50733:function(e,t,i){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var i in t)Object.defineProperty(e,i,{enumerable:!0,get:t[i]})}(t,{isBot:function(){return a},userAgent:function(){return n},userAgentFromString:function(){return o}});let s=(r=i(80725))&&r.__esModule?r:{default:r};function a(e){return/Googlebot|Mediapartners-Google|AdsBot-Google|googleweblight|Storebot-Google|Google-PageRenderer|Google-InspectionTool|Bingbot|BingPreview|Slurp|DuckDuckBot|baiduspider|yandex|sogou|LinkedInBot|bitlybot|tumblr|vkShare|quora link preview|facebookexternalhit|facebookcatalog|Twitterbot|applebot|redditbot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|ia_archiver/i.test(e)}function o(e){return{...(0,s.default)(e),isBot:void 0!==e&&a(e)}}function n({headers:e}){return o(e.get("user-agent")||void 0)}},9129:function(e,t){"use strict";function i(e){let t=new Headers;for(let[i,r]of Object.entries(e))for(let e of Array.isArray(r)?r:[r])void 0!==e&&("number"==typeof e&&(e=e.toString()),t.append(i,e));return t}function r(e){var t,i,r,s,a,o=[],n=0;function l(){for(;n<e.length&&/\s/.test(e.charAt(n));)n+=1;return n<e.length}for(;n<e.length;){for(t=n,a=!1;l();)if(","===(i=e.charAt(n))){for(r=n,n+=1,l(),s=n;n<e.length&&"="!==(i=e.charAt(n))&&";"!==i&&","!==i;)n+=1;n<e.length&&"="===e.charAt(n)?(a=!0,n=s,o.push(e.substring(t,r)),t=n):n=r+1}else n+=1;(!a||n>=e.length)&&o.push(e.substring(t,e.length))}return o}function s(e){let t={},i=[];if(e)for(let[s,a]of e.entries())"set-cookie"===s.toLowerCase()?(i.push(...r(a)),t[s]=1===i.length?i[0]:i):t[s]=a;return t}function a(e){try{return String(new URL(String(e)))}catch(t){throw Error(`URL is malformed "${String(e)}". Please use only absolute URLs - https://nextjs.org/docs/messages/middleware-relative-urls`,{cause:t})}}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var i in t)Object.defineProperty(e,i,{enumerable:!0,get:t[i]})}(t,{fromNodeOutgoingHttpHeaders:function(){return i},splitCookiesString:function(){return r},toNodeOutgoingHttpHeaders:function(){return s},validateURL:function(){return a}})},9008:function(e,t,i){e.exports=i(37219)},41664:function(e,t,i){e.exports=i(24116)},11163:function(e,t,i){e.exports=i(26036)},4298:function(e,t,i){e.exports=i(90069)},82584:function(e,t,i){let r={NextRequest:i(53399).NextRequest,NextResponse:i(63013).x,ImageResponse:i(77239).E,userAgentFromString:i(50733).userAgentFromString,userAgent:i(50733).userAgent,URLPattern:i(89297).o};e.exports=r,t.NextRequest=r.NextRequest,t.NextResponse=r.NextResponse,t.ImageResponse=r.ImageResponse,t.userAgentFromString=r.userAgentFromString,t.userAgent=r.userAgent,t.URLPattern=r.URLPattern},51462:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GoogleAnalytics=void 0;let r=i(97582),s=r.__importDefault(i(67294)),a=r.__importDefault(i(4298)),o=i(88816);t.GoogleAnalytics=function({debugMode:e=!1,gaMeasurementId:t,gtagUrl:i="https://www.googletagmanager.com/gtag/js",strategy:r="afterInteractive",defaultConsent:n="granted",trackPageViews:l,nonce:h}){let d="G-S7RN8N5DQS";return((0,o.usePageViews)({gaMeasurementId:d,ignoreHashChange:"object"==typeof l&&(null==l?void 0:l.ignoreHashChange),disabled:!l}),d)?s.default.createElement(s.default.Fragment,null,s.default.createElement(a.default,{src:`${i}?id=${d}`,strategy:r}),s.default.createElement(a.default,{id:"nextjs-google-analytics",nonce:h},`
            window.dataLayer = window.dataLayer || [];
            function gtag(){dataLayer.push(arguments);}
            gtag('js', new Date());
            ${"denied"===n?`gtag('consent', 'default', {
              'ad_storage': 'denied',
              'analytics_storage': 'denied',
              'ad_user_data': 'denied',
              'ad_personalization': 'denied'
            });`:""}
            gtag('config', '${d}', {
              page_path: window.location.pathname,
              ${e?`debug_mode: ${e},`:""}
            });
          `)):null}},87270:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GoogleAnalytics=void 0;var r=i(51462);Object.defineProperty(t,"GoogleAnalytics",{enumerable:!0,get:function(){return r.GoogleAnalytics}})},88816:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.usePageViews=t.usePagesViews=void 0;var r=i(47015);Object.defineProperty(t,"usePagesViews",{enumerable:!0,get:function(){return r.usePagesViews}});var s=i(69412);Object.defineProperty(t,"usePageViews",{enumerable:!0,get:function(){return s.usePageViews}})},69412:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.usePageViews=void 0;let r=i(67294),s=i(11163),a=i(18396);t.usePageViews=function({gaMeasurementId:e,ignoreHashChange:t,disabled:i}={}){(0,r.useEffect)(()=>{if(i)return;let e=e=>{(0,a.pageView)({path:e.toString()},"G-S7RN8N5DQS")};return s.Router.events.on("routeChangeComplete",e),t||s.Router.events.on("hashChangeComplete",e),()=>{s.Router.events.off("routeChangeComplete",e),t||s.Router.events.off("hashChangeComplete",e)}},[s.Router.events,e,t])}},47015:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.usePagesViews=void 0;let r=i(69412);t.usePagesViews=function(e){console.warn("Nextjs Google Analytics: The 'usePagesViews' hook is deprecated. Please use 'usePageViews' hook instead. https://github.com/MauricioRobayo/nextjs-google-analytics#readme"),(0,r.usePageViews)(e)}},44304:function(e,t,i){"use strict";t.Wi=void 0;var r=i(87270);Object.defineProperty(t,"Wi",{enumerable:!0,get:function(){return r.GoogleAnalytics}}),i(88816),i(18396)},65146:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.consent=void 0,t.consent=function({arg:e,params:t}){window.gtag&&window.gtag("consent",e,t)}},99633:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.event=void 0;let r=i(97582);t.event=function(e,t={}){var{category:i,label:s,value:a,nonInteraction:o,userId:n}=t,l=r.__rest(t,["category","label","value","nonInteraction","userId"]);if(!window.gtag)return;let h=Object.assign({},l);void 0!==i&&(h.event_category=i),void 0!==s&&(h.event_label=s),void 0!==a&&(h.value=a),void 0!==o&&(h.non_interaction=o),void 0!==n&&(h.user_id=n),window.gtag("event",e,h)}},18396:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.consent=t.event=t.pageView=void 0;var r=i(83371);Object.defineProperty(t,"pageView",{enumerable:!0,get:function(){return r.pageView}});var s=i(99633);Object.defineProperty(t,"event",{enumerable:!0,get:function(){return s.event}});var a=i(65146);Object.defineProperty(t,"consent",{enumerable:!0,get:function(){return a.consent}})},83371:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pageView=void 0,t.pageView=function({title:e,location:t,path:i,sendPageView:r,userId:s}={},a){let o="G-S7RN8N5DQS";if(!o||!window.gtag)return;let n={};void 0!==e&&(n.page_title=e),void 0!==t&&(n.page_location=t),void 0!==i&&(n.page_path=i),void 0!==r&&(n.send_page_view=r),void 0!==s&&(n.user_id=s),window.gtag("config",o,n)}},11744:function(e,t,i){"use strict";let r,s,a;i.r(t),i.d(t,{AccessTokenNotFound:function(){return ic},AuthHelperError:function(){return il},CallbackUrlFailed:function(){return im},CookieNotFound:function(){return ih},CookieNotParsed:function(){return ig},CookieNotSaved:function(){return id},JWTInvalid:function(){return iy},JWTPayloadFailed:function(){return iv},ProviderTokenNotFound:function(){return ip},RefreshTokenNotFound:function(){return iu},createBrowserSupabaseClient:function(){return ia},createServerSupabaseClient:function(){return io},ensureArray:function(){return ir},filterCookies:function(){return t9},isBrowser:function(){return is},parseCookies:function(){return iC},parseSupabaseCookie:function(){return it},serializeCookie:function(){return iw},stringifySupabaseSession:function(){return ii}});let o=e=>{let t;return e?t=e:"undefined"==typeof fetch?t=(...e)=>Promise.resolve().then(i.bind(i,89743)).then(({default:t})=>t(...e)):t=fetch,(...e)=>t(...e)};class n extends Error{constructor(e,t="FunctionsError",i){super(e),this.name=t,this.context=i}}class l extends n{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}}class h extends n{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}}class d extends n{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}}(U=W||(W={})).Any="any",U.ApNortheast1="ap-northeast-1",U.ApNortheast2="ap-northeast-2",U.ApSouth1="ap-south-1",U.ApSoutheast1="ap-southeast-1",U.ApSoutheast2="ap-southeast-2",U.CaCentral1="ca-central-1",U.EuCentral1="eu-central-1",U.EuWest1="eu-west-1",U.EuWest2="eu-west-2",U.EuWest3="eu-west-3",U.SaEast1="sa-east-1",U.UsEast1="us-east-1",U.UsWest1="us-west-1",U.UsWest2="us-west-2";class c{constructor(e,{headers:t={},customFetch:i,region:r=W.Any}={}){this.url=e,this.headers=t,this.region=r,this.fetch=o(i)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e,t={}){var i,r,s,a,o;return r=this,s=void 0,a=void 0,o=function*(){try{let r;let{headers:s,method:a,body:o}=t,n={},{region:c}=t;c||(c=this.region),c&&"any"!==c&&(n["x-region"]=c),o&&(s&&!Object.prototype.hasOwnProperty.call(s,"Content-Type")||!s)&&("undefined"!=typeof Blob&&o instanceof Blob||o instanceof ArrayBuffer?(n["Content-Type"]="application/octet-stream",r=o):"string"==typeof o?(n["Content-Type"]="text/plain",r=o):"undefined"!=typeof FormData&&o instanceof FormData?r=o:(n["Content-Type"]="application/json",r=JSON.stringify(o)));let u=yield this.fetch(`${this.url}/${e}`,{method:a||"POST",headers:Object.assign(Object.assign(Object.assign({},n),this.headers),s),body:r}).catch(e=>{throw new l(e)}),p=u.headers.get("x-relay-error");if(p&&"true"===p)throw new h(u);if(!u.ok)throw new d(u);let g=(null!==(i=u.headers.get("Content-Type"))&&void 0!==i?i:"text/plain").split(";")[0].trim();return{data:"application/json"===g?yield u.json():"application/octet-stream"===g?yield u.blob():"text/event-stream"===g?u:"multipart/form-data"===g?yield u.formData():yield u.text(),error:null}}catch(e){return{data:null,error:e}}},new(a||(a=Promise))(function(e,t){function i(e){try{l(o.next(e))}catch(e){t(e)}}function n(e){try{l(o.throw(e))}catch(e){t(e)}}function l(t){var r;t.done?e(t.value):((r=t.value)instanceof a?r:new a(function(e){e(r)})).then(i,n)}l((o=o.apply(r,s||[])).next())})}}let{PostgrestClient:u,PostgrestQueryBuilder:p,PostgrestFilterBuilder:g,PostgrestTransformBuilder:m,PostgrestBuilder:f}=i(50159),v={"X-Client-Info":"realtime-js/2.10.2"};(ei=$||($={}))[ei.connecting=0]="connecting",ei[ei.open=1]="open",ei[ei.closing=2]="closing",ei[ei.closed=3]="closed",(er=Y||(Y={})).closed="closed",er.errored="errored",er.joined="joined",er.joining="joining",er.leaving="leaving",(es=K||(K={})).close="phx_close",es.error="phx_error",es.join="phx_join",es.reply="phx_reply",es.leave="phx_leave",es.access_token="access_token",(Z||(Z={})).websocket="websocket",(ea=q||(q={})).Connecting="connecting",ea.Open="open",ea.Closing="closing",ea.Closed="closed";class y{constructor(){this.HEADER_LENGTH=1}decode(e,t){return e.constructor===ArrayBuffer?t(this._binaryDecode(e)):"string"==typeof e?t(JSON.parse(e)):t({})}_binaryDecode(e){let t=new DataView(e),i=new TextDecoder;return this._decodeBroadcast(e,t,i)}_decodeBroadcast(e,t,i){let r=t.getUint8(1),s=t.getUint8(2),a=this.HEADER_LENGTH+2,o=i.decode(e.slice(a,a+r));a+=r;let n=i.decode(e.slice(a,a+s));return a+=s,{ref:null,topic:o,event:n,payload:JSON.parse(i.decode(e.slice(a,e.byteLength)))}}}class C{constructor(e,t){this.callback=e,this.timerCalc=t,this.timer=void 0,this.tries=0,this.callback=e,this.timerCalc=t}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}}(eo=X||(X={})).abstime="abstime",eo.bool="bool",eo.date="date",eo.daterange="daterange",eo.float4="float4",eo.float8="float8",eo.int2="int2",eo.int4="int4",eo.int4range="int4range",eo.int8="int8",eo.int8range="int8range",eo.json="json",eo.jsonb="jsonb",eo.money="money",eo.numeric="numeric",eo.oid="oid",eo.reltime="reltime",eo.text="text",eo.time="time",eo.timestamp="timestamp",eo.timestamptz="timestamptz",eo.timetz="timetz",eo.tsrange="tsrange",eo.tstzrange="tstzrange";let w=(e,t,i={})=>{var r;let s=null!==(r=i.skipTypes)&&void 0!==r?r:[];return Object.keys(t).reduce((i,r)=>(i[r]=b(r,e,t,s),i),{})},b=(e,t,i,r)=>{let s=t.find(t=>t.name===e),a=null==s?void 0:s.type,o=i[e];return a&&!r.includes(a)?S(a,o):x(o)},S=(e,t)=>{if("_"===e.charAt(0))return I(t,e.slice(1,e.length));switch(e){case X.bool:return M(t);case X.float4:case X.float8:case X.int2:case X.int4:case X.int8:case X.numeric:case X.oid:return E(t);case X.json:case X.jsonb:return D(t);case X.timestamp:return k(t);case X.abstime:case X.date:case X.daterange:case X.int4range:case X.int8range:case X.money:case X.reltime:case X.text:case X.time:case X.timestamptz:case X.timetz:case X.tsrange:case X.tstzrange:default:return x(t)}},x=e=>e,M=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},E=e=>{if("string"==typeof e){let t=parseFloat(e);if(!Number.isNaN(t))return t}return e},D=e=>{if("string"==typeof e)try{return JSON.parse(e)}catch(e){console.log(`JSON parse error: ${e}`)}return e},I=(e,t)=>{if("string"!=typeof e)return e;let i=e.length-1,r=e[i];if("{"===e[0]&&"}"===r){let r;let s=e.slice(1,i);try{r=JSON.parse("["+s+"]")}catch(e){r=s?s.split(","):[]}return r.map(e=>S(t,e))}return e},k=e=>"string"==typeof e?e.replace(" ","T"):e,T=e=>{let t=e;return(t=(t=t.replace(/^ws/i,"http")).replace(/(\/socket\/websocket|\/socket|\/websocket)\/?$/i,"")).replace(/\/+$/,"")};class A{constructor(e,t,i={},r=1e4){this.channel=e,this.event=t,this.payload=i,this.timeout=r,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(e){this.timeout=e,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}send(){this._hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,join_ref:this.channel._joinRef()}))}updatePayload(e){this.payload=Object.assign(Object.assign({},this.payload),e)}receive(e,t){var i;return this._hasReceived(e)&&t(null===(i=this.receivedResp)||void 0===i?void 0:i.response),this.recHooks.push({status:e,callback:t}),this}startTimeout(){this.timeoutTimer||(this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref),this.channel._on(this.refEvent,{},e=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=e,this._matchReceive(e)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout))}trigger(e,t){this.refEvent&&this.channel._trigger(this.refEvent,{status:e,response:t})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:e,response:t}){this.recHooks.filter(t=>t.status===e).forEach(e=>e.callback(t))}_hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}}(en=Q||(Q={})).SYNC="sync",en.JOIN="join",en.LEAVE="leave";class R{constructor(e,t){this.channel=e,this.state={},this.pendingDiffs=[],this.joinRef=null,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};let i=(null==t?void 0:t.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(i.state,{},e=>{let{onJoin:t,onLeave:i,onSync:r}=this.caller;this.joinRef=this.channel._joinRef(),this.state=R.syncState(this.state,e,t,i),this.pendingDiffs.forEach(e=>{this.state=R.syncDiff(this.state,e,t,i)}),this.pendingDiffs=[],r()}),this.channel._on(i.diff,{},e=>{let{onJoin:t,onLeave:i,onSync:r}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(e):(this.state=R.syncDiff(this.state,e,t,i),r())}),this.onJoin((e,t,i)=>{this.channel._trigger("presence",{event:"join",key:e,currentPresences:t,newPresences:i})}),this.onLeave((e,t,i)=>{this.channel._trigger("presence",{event:"leave",key:e,currentPresences:t,leftPresences:i})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(e,t,i,r){let s=this.cloneDeep(e),a=this.transformState(t),o={},n={};return this.map(s,(e,t)=>{a[e]||(n[e]=t)}),this.map(a,(e,t)=>{let i=s[e];if(i){let r=t.map(e=>e.presence_ref),s=i.map(e=>e.presence_ref),a=t.filter(e=>0>s.indexOf(e.presence_ref)),l=i.filter(e=>0>r.indexOf(e.presence_ref));a.length>0&&(o[e]=a),l.length>0&&(n[e]=l)}else o[e]=t}),this.syncDiff(s,{joins:o,leaves:n},i,r)}static syncDiff(e,t,i,r){let{joins:s,leaves:a}={joins:this.transformState(t.joins),leaves:this.transformState(t.leaves)};return i||(i=()=>{}),r||(r=()=>{}),this.map(s,(t,r)=>{var s;let a=null!==(s=e[t])&&void 0!==s?s:[];if(e[t]=this.cloneDeep(r),a.length>0){let i=e[t].map(e=>e.presence_ref),r=a.filter(e=>0>i.indexOf(e.presence_ref));e[t].unshift(...r)}i(t,a,r)}),this.map(a,(t,i)=>{let s=e[t];if(!s)return;let a=i.map(e=>e.presence_ref);s=s.filter(e=>0>a.indexOf(e.presence_ref)),e[t]=s,r(t,s,i),0===s.length&&delete e[t]}),e}static map(e,t){return Object.getOwnPropertyNames(e).map(i=>t(i,e[i]))}static transformState(e){return Object.getOwnPropertyNames(e=this.cloneDeep(e)).reduce((t,i)=>{let r=e[i];return"metas"in r?t[i]=r.metas.map(e=>(e.presence_ref=e.phx_ref,delete e.phx_ref,delete e.phx_ref_prev,e)):t[i]=r,t},{})}static cloneDeep(e){return JSON.parse(JSON.stringify(e))}onJoin(e){this.caller.onJoin=e}onLeave(e){this.caller.onLeave=e}onSync(e){this.caller.onSync=e}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}(el=J||(J={})).ALL="*",el.INSERT="INSERT",el.UPDATE="UPDATE",el.DELETE="DELETE",(eh=ee||(ee={})).BROADCAST="broadcast",eh.PRESENCE="presence",eh.POSTGRES_CHANGES="postgres_changes",(ed=et||(et={})).SUBSCRIBED="SUBSCRIBED",ed.TIMED_OUT="TIMED_OUT",ed.CLOSED="CLOSED",ed.CHANNEL_ERROR="CHANNEL_ERROR";class L{constructor(e,t={config:{}},i){this.topic=e,this.params=t,this.socket=i,this.bindings={},this.state=Y.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=e.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:""},private:!1},t.config),this.timeout=this.socket.timeout,this.joinPush=new A(this,K.join,this.params,this.timeout),this.rejoinTimer=new C(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=Y.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(e=>e.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=Y.closed,this.socket._remove(this)}),this._onError(e=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,e),this.state=Y.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=Y.errored,this.rejoinTimer.scheduleTimeout())}),this._on(K.reply,{},(e,t)=>{this._trigger(this._replyEventName(t),e)}),this.presence=new R(this),this.broadcastEndpointURL=T(this.socket.endPoint)+"/api/broadcast"}subscribe(e,t=this.timeout){var i,r;if(this.socket.isConnected()||this.socket.connect(),this.joinedOnce)throw"tried to subscribe multiple times. 'subscribe' can only be called a single time per channel instance";{let{config:{broadcast:s,presence:a,private:o}}=this.params;this._onError(t=>e&&e("CHANNEL_ERROR",t)),this._onClose(()=>e&&e("CLOSED"));let n={},l={broadcast:s,presence:a,postgres_changes:null!==(r=null===(i=this.bindings.postgres_changes)||void 0===i?void 0:i.map(e=>e.filter))&&void 0!==r?r:[],private:o};this.socket.accessToken&&(n.access_token=this.socket.accessToken),this.updateJoinPayload(Object.assign({config:l},n)),this.joinedOnce=!0,this._rejoin(t),this.joinPush.receive("ok",({postgres_changes:t})=>{var i;if(this.socket.accessToken&&this.socket.setAuth(this.socket.accessToken),void 0===t){e&&e("SUBSCRIBED");return}{let r=this.bindings.postgres_changes,s=null!==(i=null==r?void 0:r.length)&&void 0!==i?i:0,a=[];for(let i=0;i<s;i++){let s=r[i],{filter:{event:o,schema:n,table:l,filter:h}}=s,d=t&&t[i];if(d&&d.event===o&&d.schema===n&&d.table===l&&d.filter===h)a.push(Object.assign(Object.assign({},s),{id:d.id}));else{this.unsubscribe(),e&&e("CHANNEL_ERROR",Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=a,e&&e("SUBSCRIBED");return}}).receive("error",t=>{e&&e("CHANNEL_ERROR",Error(JSON.stringify(Object.values(t).join(", ")||"error")))}).receive("timeout",()=>{e&&e("TIMED_OUT")})}return this}presenceState(){return this.presence.state}async track(e,t={}){return await this.send({type:"presence",event:"track",payload:e},t.timeout||this.timeout)}async untrack(e={}){return await this.send({type:"presence",event:"untrack"},e)}on(e,t,i){return this._on(e,t,i)}async send(e,t={}){var i,r;if(this._canPush()||"broadcast"!==e.type)return new Promise(i=>{var r,s,a;let o=this._push(e.type,e,t.timeout||this.timeout);"broadcast"!==e.type||(null===(a=null===(s=null===(r=this.params)||void 0===r?void 0:r.config)||void 0===s?void 0:s.broadcast)||void 0===a?void 0:a.ack)||i("ok"),o.receive("ok",()=>i("ok")),o.receive("error",()=>i("error")),o.receive("timeout",()=>i("timed out"))});{let{event:s,payload:a}=e,o={method:"POST",headers:{Authorization:this.socket.accessToken?`Bearer ${this.socket.accessToken}`:"",apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"},body:JSON.stringify({messages:[{topic:this.subTopic,event:s,payload:a}]})};try{let e=await this._fetchWithTimeout(this.broadcastEndpointURL,o,null!==(i=t.timeout)&&void 0!==i?i:this.timeout);return await (null===(r=e.body)||void 0===r?void 0:r.cancel()),e.ok?"ok":"error"}catch(e){if("AbortError"===e.name)return"timed out";return"error"}}}updateJoinPayload(e){this.joinPush.updatePayload(e)}unsubscribe(e=this.timeout){this.state=Y.leaving;let t=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(K.close,"leave",this._joinRef())};return this.rejoinTimer.reset(),this.joinPush.destroy(),new Promise(i=>{let r=new A(this,K.leave,{},e);r.receive("ok",()=>{t(),i("ok")}).receive("timeout",()=>{t(),i("timed out")}).receive("error",()=>{i("error")}),r.send(),this._canPush()||r.trigger("ok",{})})}async _fetchWithTimeout(e,t,i){let r=new AbortController,s=setTimeout(()=>r.abort(),i),a=await this.socket.fetch(e,Object.assign(Object.assign({},t),{signal:r.signal}));return clearTimeout(s),a}_push(e,t,i=this.timeout){if(!this.joinedOnce)throw`tried to push '${e}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let r=new A(this,e,t,i);return this._canPush()?r.send():(r.startTimeout(),this.pushBuffer.push(r)),r}_onMessage(e,t,i){return t}_isMember(e){return this.topic===e}_joinRef(){return this.joinPush.ref}_trigger(e,t,i){var r,s;let a=e.toLocaleLowerCase(),{close:o,error:n,leave:l,join:h}=K;if(i&&[o,n,l,h].indexOf(a)>=0&&i!==this._joinRef())return;let d=this._onMessage(a,t,i);if(t&&!d)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(a)?null===(r=this.bindings.postgres_changes)||void 0===r||r.filter(e=>{var t,i,r;return(null===(t=e.filter)||void 0===t?void 0:t.event)==="*"||(null===(r=null===(i=e.filter)||void 0===i?void 0:i.event)||void 0===r?void 0:r.toLocaleLowerCase())===a}).map(e=>e.callback(d,i)):null===(s=this.bindings[a])||void 0===s||s.filter(e=>{var i,r,s,o,n,l;if(!["broadcast","presence","postgres_changes"].includes(a))return e.type.toLocaleLowerCase()===a;if("id"in e){let a=e.id,o=null===(i=e.filter)||void 0===i?void 0:i.event;return a&&(null===(r=t.ids)||void 0===r?void 0:r.includes(a))&&("*"===o||(null==o?void 0:o.toLocaleLowerCase())===(null===(s=t.data)||void 0===s?void 0:s.type.toLocaleLowerCase()))}{let i=null===(n=null===(o=null==e?void 0:e.filter)||void 0===o?void 0:o.event)||void 0===n?void 0:n.toLocaleLowerCase();return"*"===i||i===(null===(l=null==t?void 0:t.event)||void 0===l?void 0:l.toLocaleLowerCase())}}).map(e=>{if("object"==typeof d&&"ids"in d){let e=d.data,{schema:t,table:i,commit_timestamp:r,type:s,errors:a}=e;d=Object.assign(Object.assign({},{schema:t,table:i,commit_timestamp:r,eventType:s,new:{},old:{},errors:a}),this._getPayloadRecords(e))}e.callback(d,i)})}_isClosed(){return this.state===Y.closed}_isJoined(){return this.state===Y.joined}_isJoining(){return this.state===Y.joining}_isLeaving(){return this.state===Y.leaving}_replyEventName(e){return`chan_reply_${e}`}_on(e,t,i){let r=e.toLocaleLowerCase(),s={type:r,filter:t,callback:i};return this.bindings[r]?this.bindings[r].push(s):this.bindings[r]=[s],this}_off(e,t){let i=e.toLocaleLowerCase();return this.bindings[i]=this.bindings[i].filter(e=>{var r;return!((null===(r=e.type)||void 0===r?void 0:r.toLocaleLowerCase())===i&&L.isEqual(e.filter,t))}),this}static isEqual(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let i in e)if(e[i]!==t[i])return!1;return!0}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(e){this._on(K.close,{},e)}_onError(e){this._on(K.error,{},t=>e(t))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(e=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=Y.joining,this.joinPush.resend(e))}_getPayloadRecords(e){let t={new:{},old:{}};return("INSERT"===e.type||"UPDATE"===e.type)&&(t.new=w(e.columns,e.record)),("UPDATE"===e.type||"DELETE"===e.type)&&(t.old=w(e.columns,e.old_record)),t}}let P=()=>{},F="undefined"!=typeof WebSocket;class N{constructor(e,t){var r;this.accessToken=null,this.apiKey=null,this.channels=[],this.endPoint="",this.httpEndpoint="",this.headers=v,this.params={},this.timeout=1e4,this.heartbeatIntervalMs=3e4,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.ref=0,this.logger=P,this.conn=null,this.sendBuffer=[],this.serializer=new y,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this._resolveFetch=e=>{let t;return e?t=e:"undefined"==typeof fetch?t=(...e)=>Promise.resolve().then(i.bind(i,89743)).then(({default:t})=>t(...e)):t=fetch,(...e)=>t(...e)},this.endPoint=`${e}/${Z.websocket}`,this.httpEndpoint=T(e),(null==t?void 0:t.transport)?this.transport=t.transport:this.transport=null,(null==t?void 0:t.params)&&(this.params=t.params),(null==t?void 0:t.headers)&&(this.headers=Object.assign(Object.assign({},this.headers),t.headers)),(null==t?void 0:t.timeout)&&(this.timeout=t.timeout),(null==t?void 0:t.logger)&&(this.logger=t.logger),(null==t?void 0:t.heartbeatIntervalMs)&&(this.heartbeatIntervalMs=t.heartbeatIntervalMs);let s=null===(r=null==t?void 0:t.params)||void 0===r?void 0:r.apikey;s&&(this.accessToken=s,this.apiKey=s),this.reconnectAfterMs=(null==t?void 0:t.reconnectAfterMs)?t.reconnectAfterMs:e=>[1e3,2e3,5e3,1e4][e-1]||1e4,this.encode=(null==t?void 0:t.encode)?t.encode:(e,t)=>t(JSON.stringify(e)),this.decode=(null==t?void 0:t.decode)?t.decode:this.serializer.decode.bind(this.serializer),this.reconnectTimer=new C(async()=>{this.disconnect(),this.connect()},this.reconnectAfterMs),this.fetch=this._resolveFetch(null==t?void 0:t.fetch)}connect(){if(!this.conn){if(this.transport){this.conn=new this.transport(this._endPointURL(),void 0,{headers:this.headers});return}if(F){this.conn=new WebSocket(this._endPointURL()),this.setupConnection();return}this.conn=new O(this._endPointURL(),void 0,{close:()=>{this.conn=null}}),i.e(3363).then(i.t.bind(i,57026,23)).then(({default:e})=>{this.conn=new e(this._endPointURL(),void 0,{headers:this.headers}),this.setupConnection()})}}disconnect(e,t){this.conn&&(this.conn.onclose=function(){},e?this.conn.close(e,null!=t?t:""):this.conn.close(),this.conn=null,this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.reconnectTimer.reset())}getChannels(){return this.channels}async removeChannel(e){let t=await e.unsubscribe();return 0===this.channels.length&&this.disconnect(),t}async removeAllChannels(){let e=await Promise.all(this.channels.map(e=>e.unsubscribe()));return this.disconnect(),e}log(e,t,i){this.logger(e,t,i)}connectionState(){switch(this.conn&&this.conn.readyState){case $.connecting:return q.Connecting;case $.open:return q.Open;case $.closing:return q.Closing;default:return q.Closed}}isConnected(){return this.connectionState()===q.Open}channel(e,t={config:{}}){let i=new L(`realtime:${e}`,t,this);return this.channels.push(i),i}push(e){let{topic:t,event:i,payload:r,ref:s}=e,a=()=>{this.encode(e,e=>{var t;null===(t=this.conn)||void 0===t||t.send(e)})};this.log("push",`${t} ${i} (${s})`,r),this.isConnected()?a():this.sendBuffer.push(a)}setAuth(e){this.accessToken=e,this.channels.forEach(t=>{e&&t.updateJoinPayload({access_token:e}),t.joinedOnce&&t._isJoined()&&t._push(K.access_token,{access_token:e})})}_makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}_leaveOpenTopic(e){let t=this.channels.find(t=>t.topic===e&&(t._isJoined()||t._isJoining()));t&&(this.log("transport",`leaving duplicate topic "${e}"`),t.unsubscribe())}_remove(e){this.channels=this.channels.filter(t=>t._joinRef()!==e._joinRef())}setupConnection(){this.conn&&(this.conn.binaryType="arraybuffer",this.conn.onopen=()=>this._onConnOpen(),this.conn.onerror=e=>this._onConnError(e),this.conn.onmessage=e=>this._onConnMessage(e),this.conn.onclose=e=>this._onConnClose(e))}_endPointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:"1.0.0"}))}_onConnMessage(e){this.decode(e.data,e=>{let{topic:t,event:i,payload:r,ref:s}=e;(s&&s===this.pendingHeartbeatRef||i===(null==r?void 0:r.type))&&(this.pendingHeartbeatRef=null),this.log("receive",`${r.status||""} ${t} ${i} ${s&&"("+s+")"||""}`,r),this.channels.filter(e=>e._isMember(t)).forEach(e=>e._trigger(i,r,s)),this.stateChangeCallbacks.message.forEach(t=>t(e))})}_onConnOpen(){this.log("transport",`connected to ${this._endPointURL()}`),this._flushSendBuffer(),this.reconnectTimer.reset(),this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this._sendHeartbeat(),this.heartbeatIntervalMs),this.stateChangeCallbacks.open.forEach(e=>e())}_onConnClose(e){this.log("transport","close",e),this._triggerChanError(),this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.reconnectTimer.scheduleTimeout(),this.stateChangeCallbacks.close.forEach(t=>t(e))}_onConnError(e){this.log("transport",e.message),this._triggerChanError(),this.stateChangeCallbacks.error.forEach(t=>t(e))}_triggerChanError(){this.channels.forEach(e=>e._trigger(K.error))}_appendParams(e,t){if(0===Object.keys(t).length)return e;let i=e.match(/\?/)?"&":"?",r=new URLSearchParams(t);return`${e}${i}${r}`}_flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}_sendHeartbeat(){var e;if(this.isConnected()){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection"),null===(e=this.conn)||void 0===e||e.close(1e3,"hearbeat timeout");return}this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef}),this.setAuth(this.accessToken)}}}class O{constructor(e,t,i){this.binaryType="arraybuffer",this.onclose=()=>{},this.onerror=()=>{},this.onmessage=()=>{},this.onopen=()=>{},this.readyState=$.connecting,this.send=()=>{},this.url=null,this.url=e,this.close=i.close}}class B extends Error{constructor(e){super(e),this.__isStorageError=!0,this.name="StorageError"}}function G(e){return"object"==typeof e&&null!==e&&"__isStorageError"in e}class z extends B{constructor(e,t){super(e),this.name="StorageApiError",this.status=t}toJSON(){return{name:this.name,message:this.message,status:this.status}}}class _ extends B{constructor(e,t){super(e),this.name="StorageUnknownError",this.originalError=t}}let V=e=>{let t;return e?t=e:"undefined"==typeof fetch?t=(...e)=>Promise.resolve().then(i.bind(i,89743)).then(({default:t})=>t(...e)):t=fetch,(...e)=>t(...e)},j=()=>{var e,t,r,s;return e=void 0,t=void 0,r=void 0,s=function*(){return"undefined"==typeof Response?(yield Promise.resolve().then(i.bind(i,89743))).Response:Response},new(r||(r=Promise))(function(i,a){function o(e){try{l(s.next(e))}catch(e){a(e)}}function n(e){try{l(s.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(o,n)}l((s=s.apply(e,t||[])).next())})},H=e=>{if(Array.isArray(e))return e.map(e=>H(e));if("function"==typeof e||e!==Object(e))return e;let t={};return Object.entries(e).forEach(([e,i])=>{t[e.replace(/([-_][a-z])/gi,e=>e.toUpperCase().replace(/[-_]/g,""))]=H(i)}),t};var U,W,$,Y,K,Z,q,X,Q,J,ee,et,ei,er,es,ea,eo,en,el,eh,ed,ec=function(e,t,i,r){return new(i||(i=Promise))(function(s,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function n(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?s(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(o,n)}l((r=r.apply(e,t||[])).next())})};let eu=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),ep=(e,t,i)=>ec(void 0,void 0,void 0,function*(){e instanceof(yield j())&&!(null==i?void 0:i.noResolveJson)?e.json().then(i=>{t(new z(eu(i),e.status||500))}).catch(e=>{t(new _(eu(e),e))}):t(new _(eu(e),e))}),eg=(e,t,i,r)=>{let s={method:e,headers:(null==t?void 0:t.headers)||{}};return"GET"===e?s:(s.headers=Object.assign({"Content-Type":"application/json"},null==t?void 0:t.headers),r&&(s.body=JSON.stringify(r)),Object.assign(Object.assign({},s),i))};function em(e,t,i,r,s,a){return ec(this,void 0,void 0,function*(){return new Promise((o,n)=>{e(i,eg(t,r,s,a)).then(e=>{if(!e.ok)throw e;return(null==r?void 0:r.noResolveJson)?e:e.json()}).then(e=>o(e)).catch(e=>ep(e,n,r))})})}function ef(e,t,i,r){return ec(this,void 0,void 0,function*(){return em(e,"GET",t,i,r)})}function ev(e,t,i,r,s){return ec(this,void 0,void 0,function*(){return em(e,"POST",t,r,s,i)})}function ey(e,t,i,r,s){return ec(this,void 0,void 0,function*(){return em(e,"DELETE",t,r,s,i)})}var eC=i(21876).Buffer,ew=function(e,t,i,r){return new(i||(i=Promise))(function(s,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function n(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?s(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(o,n)}l((r=r.apply(e,t||[])).next())})};let eb={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},eS={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};class ex{constructor(e,t={},i,r){this.url=e,this.headers=t,this.bucketId=i,this.fetch=V(r)}uploadOrUpdate(e,t,i,r){return ew(this,void 0,void 0,function*(){try{let s;let a=Object.assign(Object.assign({},eS),r),o=Object.assign(Object.assign({},this.headers),"POST"===e&&{"x-upsert":String(a.upsert)}),n=a.metadata;"undefined"!=typeof Blob&&i instanceof Blob?((s=new FormData).append("cacheControl",a.cacheControl),s.append("",i),n&&s.append("metadata",this.encodeMetadata(n))):"undefined"!=typeof FormData&&i instanceof FormData?((s=i).append("cacheControl",a.cacheControl),n&&s.append("metadata",this.encodeMetadata(n))):(s=i,o["cache-control"]=`max-age=${a.cacheControl}`,o["content-type"]=a.contentType,n&&(o["x-metadata"]=this.toBase64(this.encodeMetadata(n)))),(null==r?void 0:r.headers)&&(o=Object.assign(Object.assign({},o),r.headers));let l=this._removeEmptyFolders(t),h=this._getFinalPath(l),d=yield this.fetch(`${this.url}/object/${h}`,Object.assign({method:e,body:s,headers:o},(null==a?void 0:a.duplex)?{duplex:a.duplex}:{})),c=yield d.json();if(d.ok)return{data:{path:l,id:c.Id,fullPath:c.Key},error:null};return{data:null,error:c}}catch(e){if(G(e))return{data:null,error:e};throw e}})}upload(e,t,i){return ew(this,void 0,void 0,function*(){return this.uploadOrUpdate("POST",e,t,i)})}uploadToSignedUrl(e,t,i,r){return ew(this,void 0,void 0,function*(){let s=this._removeEmptyFolders(e),a=this._getFinalPath(s),o=new URL(this.url+`/object/upload/sign/${a}`);o.searchParams.set("token",t);try{let e;let t=Object.assign({upsert:eS.upsert},r),a=Object.assign(Object.assign({},this.headers),{"x-upsert":String(t.upsert)});"undefined"!=typeof Blob&&i instanceof Blob?((e=new FormData).append("cacheControl",t.cacheControl),e.append("",i)):"undefined"!=typeof FormData&&i instanceof FormData?(e=i).append("cacheControl",t.cacheControl):(e=i,a["cache-control"]=`max-age=${t.cacheControl}`,a["content-type"]=t.contentType);let n=yield this.fetch(o.toString(),{method:"PUT",body:e,headers:a}),l=yield n.json();if(n.ok)return{data:{path:s,fullPath:l.Key},error:null};return{data:null,error:l}}catch(e){if(G(e))return{data:null,error:e};throw e}})}createSignedUploadUrl(e,t){return ew(this,void 0,void 0,function*(){try{let i=this._getFinalPath(e),r=Object.assign({},this.headers);(null==t?void 0:t.upsert)&&(r["x-upsert"]="true");let s=yield ev(this.fetch,`${this.url}/object/upload/sign/${i}`,{},{headers:r}),a=new URL(this.url+s.url),o=a.searchParams.get("token");if(!o)throw new B("No token returned by API");return{data:{signedUrl:a.toString(),path:e,token:o},error:null}}catch(e){if(G(e))return{data:null,error:e};throw e}})}update(e,t,i){return ew(this,void 0,void 0,function*(){return this.uploadOrUpdate("PUT",e,t,i)})}move(e,t,i){return ew(this,void 0,void 0,function*(){try{return{data:yield ev(this.fetch,`${this.url}/object/move`,{bucketId:this.bucketId,sourceKey:e,destinationKey:t,destinationBucket:null==i?void 0:i.destinationBucket},{headers:this.headers}),error:null}}catch(e){if(G(e))return{data:null,error:e};throw e}})}copy(e,t,i){return ew(this,void 0,void 0,function*(){try{return{data:{path:(yield ev(this.fetch,`${this.url}/object/copy`,{bucketId:this.bucketId,sourceKey:e,destinationKey:t,destinationBucket:null==i?void 0:i.destinationBucket},{headers:this.headers})).Key},error:null}}catch(e){if(G(e))return{data:null,error:e};throw e}})}createSignedUrl(e,t,i){return ew(this,void 0,void 0,function*(){try{let r=this._getFinalPath(e),s=yield ev(this.fetch,`${this.url}/object/sign/${r}`,Object.assign({expiresIn:t},(null==i?void 0:i.transform)?{transform:i.transform}:{}),{headers:this.headers}),a=(null==i?void 0:i.download)?`&download=${!0===i.download?"":i.download}`:"";return{data:s={signedUrl:encodeURI(`${this.url}${s.signedURL}${a}`)},error:null}}catch(e){if(G(e))return{data:null,error:e};throw e}})}createSignedUrls(e,t,i){return ew(this,void 0,void 0,function*(){try{let r=yield ev(this.fetch,`${this.url}/object/sign/${this.bucketId}`,{expiresIn:t,paths:e},{headers:this.headers}),s=(null==i?void 0:i.download)?`&download=${!0===i.download?"":i.download}`:"";return{data:r.map(e=>Object.assign(Object.assign({},e),{signedUrl:e.signedURL?encodeURI(`${this.url}${e.signedURL}${s}`):null})),error:null}}catch(e){if(G(e))return{data:null,error:e};throw e}})}download(e,t){return ew(this,void 0,void 0,function*(){let i=void 0!==(null==t?void 0:t.transform),r=this.transformOptsToQueryString((null==t?void 0:t.transform)||{}),s=r?`?${r}`:"";try{let t=this._getFinalPath(e),r=yield ef(this.fetch,`${this.url}/${i?"render/image/authenticated":"object"}/${t}${s}`,{headers:this.headers,noResolveJson:!0});return{data:yield r.blob(),error:null}}catch(e){if(G(e))return{data:null,error:e};throw e}})}info(e){return ew(this,void 0,void 0,function*(){let t=this._getFinalPath(e);try{let e=yield ef(this.fetch,`${this.url}/object/info/${t}`,{headers:this.headers});return{data:H(e),error:null}}catch(e){if(G(e))return{data:null,error:e};throw e}})}exists(e){return ew(this,void 0,void 0,function*(){let t=this._getFinalPath(e);try{return yield function(e,t,i,r){return ec(this,void 0,void 0,function*(){return em(e,"HEAD",t,Object.assign(Object.assign({},i),{noResolveJson:!0}),void 0)})}(this.fetch,`${this.url}/object/${t}`,{headers:this.headers}),{data:!0,error:null}}catch(e){if(G(e)&&e instanceof _){let t=e.originalError;if([400,404].includes(null==t?void 0:t.status))return{data:!1,error:e}}throw e}})}getPublicUrl(e,t){let i=this._getFinalPath(e),r=[],s=(null==t?void 0:t.download)?`download=${!0===t.download?"":t.download}`:"";""!==s&&r.push(s);let a=void 0!==(null==t?void 0:t.transform),o=this.transformOptsToQueryString((null==t?void 0:t.transform)||{});""!==o&&r.push(o);let n=r.join("&");return""!==n&&(n=`?${n}`),{data:{publicUrl:encodeURI(`${this.url}/${a?"render/image":"object"}/public/${i}${n}`)}}}remove(e){return ew(this,void 0,void 0,function*(){try{return{data:yield ey(this.fetch,`${this.url}/object/${this.bucketId}`,{prefixes:e},{headers:this.headers}),error:null}}catch(e){if(G(e))return{data:null,error:e};throw e}})}list(e,t,i){return ew(this,void 0,void 0,function*(){try{let r=Object.assign(Object.assign(Object.assign({},eb),t),{prefix:e||""});return{data:yield ev(this.fetch,`${this.url}/object/list/${this.bucketId}`,r,{headers:this.headers},i),error:null}}catch(e){if(G(e))return{data:null,error:e};throw e}})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return void 0!==eC?eC.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(e){let t=[];return e.width&&t.push(`width=${e.width}`),e.height&&t.push(`height=${e.height}`),e.resize&&t.push(`resize=${e.resize}`),e.format&&t.push(`format=${e.format}`),e.quality&&t.push(`quality=${e.quality}`),t.join("&")}}let eM={"X-Client-Info":"storage-js/2.7.0"};var eE=function(e,t,i,r){return new(i||(i=Promise))(function(s,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function n(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?s(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(o,n)}l((r=r.apply(e,t||[])).next())})};class eD{constructor(e,t={},i){this.url=e,this.headers=Object.assign(Object.assign({},eM),t),this.fetch=V(i)}listBuckets(){return eE(this,void 0,void 0,function*(){try{return{data:yield ef(this.fetch,`${this.url}/bucket`,{headers:this.headers}),error:null}}catch(e){if(G(e))return{data:null,error:e};throw e}})}getBucket(e){return eE(this,void 0,void 0,function*(){try{return{data:yield ef(this.fetch,`${this.url}/bucket/${e}`,{headers:this.headers}),error:null}}catch(e){if(G(e))return{data:null,error:e};throw e}})}createBucket(e,t={public:!1}){return eE(this,void 0,void 0,function*(){try{return{data:yield ev(this.fetch,`${this.url}/bucket`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:this.headers}),error:null}}catch(e){if(G(e))return{data:null,error:e};throw e}})}updateBucket(e,t){return eE(this,void 0,void 0,function*(){try{return{data:yield function(e,t,i,r,s){return ec(this,void 0,void 0,function*(){return em(e,"PUT",t,r,void 0,i)})}(this.fetch,`${this.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:this.headers}),error:null}}catch(e){if(G(e))return{data:null,error:e};throw e}})}emptyBucket(e){return eE(this,void 0,void 0,function*(){try{return{data:yield ev(this.fetch,`${this.url}/bucket/${e}/empty`,{},{headers:this.headers}),error:null}}catch(e){if(G(e))return{data:null,error:e};throw e}})}deleteBucket(e){return eE(this,void 0,void 0,function*(){try{return{data:yield ey(this.fetch,`${this.url}/bucket/${e}`,{},{headers:this.headers}),error:null}}catch(e){if(G(e))return{data:null,error:e};throw e}})}}class eI extends eD{constructor(e,t={},i){super(e,t,i)}from(e){return new ex(this.url,this.headers,e,this.fetch)}}let ek="";"undefined"!=typeof Deno?ek="deno":"undefined"!=typeof document?ek="web":"undefined"!=typeof navigator&&"ReactNative"===navigator.product?ek="react-native":ek="node";let eT={headers:{"X-Client-Info":`supabase-js-${ek}/2.45.4`}},eA={schema:"public"},eR={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},eL={};var eP=i(89743);let eF=e=>{let t;return e?t=e:"undefined"==typeof fetch?t=eP.default:t=fetch,(...e)=>t(...e)},eN=()=>"undefined"==typeof Headers?eP.Headers:Headers,eO=(e,t,i)=>{let r=eF(i),s=eN();return(i,a)=>{var o,n,l,h;return o=void 0,n=void 0,l=void 0,h=function*(){var o;let n=null!==(o=yield t())&&void 0!==o?o:e,l=new s(null==a?void 0:a.headers);return l.has("apikey")||l.set("apikey",e),l.has("Authorization")||l.set("Authorization",`Bearer ${n}`),r(i,Object.assign(Object.assign({},a),{headers:l}))},new(l||(l=Promise))(function(e,t){function i(e){try{s(h.next(e))}catch(e){t(e)}}function r(e){try{s(h.throw(e))}catch(e){t(e)}}function s(t){var s;t.done?e(t.value):((s=t.value)instanceof l?s:new l(function(e){e(s)})).then(i,r)}s((h=h.apply(o,n||[])).next())})}},eB="2.65.0",eG={"X-Client-Info":`gotrue-js/${eB}`},ez="X-Supabase-Api-Version",e_={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},eV=()=>"undefined"!=typeof document,ej={tested:!1,writable:!1},eH=()=>{if(!eV())return!1;try{if("object"!=typeof globalThis.localStorage)return!1}catch(e){return!1}if(ej.tested)return ej.writable;let e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),ej.tested=!0,ej.writable=!0}catch(e){ej.tested=!0,ej.writable=!1}return ej.writable};function eU(e){let t={},i=new URL(e);if(i.hash&&"#"===i.hash[0])try{new URLSearchParams(i.hash.substring(1)).forEach((e,i)=>{t[i]=e})}catch(e){}return i.searchParams.forEach((e,i)=>{t[i]=e}),t}let eW=e=>{let t;return e?t=e:"undefined"==typeof fetch?t=(...e)=>Promise.resolve().then(i.bind(i,89743)).then(({default:t})=>t(...e)):t=fetch,(...e)=>t(...e)},e$=e=>"object"==typeof e&&null!==e&&"status"in e&&"ok"in e&&"json"in e&&"function"==typeof e.json,eY=async(e,t,i)=>{await e.setItem(t,JSON.stringify(i))},eK=async(e,t)=>{let i=await e.getItem(t);if(!i)return null;try{return JSON.parse(i)}catch(e){return i}},eZ=async(e,t)=>{await e.removeItem(t)};class eq{constructor(){this.promise=new eq.promiseConstructor((e,t)=>{this.resolve=e,this.reject=t})}}function eX(e){let t=e.split(".");if(3!==t.length)throw Error("JWT is not valid: not a JWT structure");if(!/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}=?$|[a-z0-9_-]{2}(==)?$)$/i.test(t[1]))throw Error("JWT is not valid: payload is not in base64url format");return JSON.parse(function(e){let t,i,r,s,a,o,n;let l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",h="",d=0;for(e=e.replace("-","+").replace("_","/");d<e.length;)s=l.indexOf(e.charAt(d++)),a=l.indexOf(e.charAt(d++)),o=l.indexOf(e.charAt(d++)),n=l.indexOf(e.charAt(d++)),t=s<<2|a>>4,i=(15&a)<<4|o>>2,r=(3&o)<<6|n,h+=String.fromCharCode(t),64!=o&&0!=i&&(h+=String.fromCharCode(i)),64!=n&&0!=r&&(h+=String.fromCharCode(r));return h}(t[1]))}async function eQ(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function eJ(e){return("0"+e.toString(16)).substr(-2)}async function e0(e){let t=new TextEncoder().encode(e);return Array.from(new Uint8Array(await crypto.subtle.digest("SHA-256",t))).map(e=>String.fromCharCode(e)).join("")}async function e1(e){return"undefined"!=typeof crypto&&void 0!==crypto.subtle&&"undefined"!=typeof TextEncoder?btoa(await e0(e)).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""):(console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),e)}async function e2(e,t,i=!1){let r=function(){let e=new Uint32Array(56);if("undefined"==typeof crypto){let e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",t=e.length,i="";for(let r=0;r<56;r++)i+=e.charAt(Math.floor(Math.random()*t));return i}return crypto.getRandomValues(e),Array.from(e,eJ).join("")}(),s=r;i&&(s+="/PASSWORD_RECOVERY"),await eY(e,`${t}-code-verifier`,s);let a=await e1(r),o=r===a?"plain":"s256";return[a,o]}eq.promiseConstructor=Promise;let e3=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;class e4 extends Error{constructor(e,t,i){super(e),this.__isAuthError=!0,this.name="AuthError",this.status=t,this.code=i}}function e6(e){return"object"==typeof e&&null!==e&&"__isAuthError"in e}class e5 extends e4{constructor(e,t,i){super(e,t,i),this.name="AuthApiError",this.status=t,this.code=i}}class e8 extends e4{constructor(e,t){super(e),this.name="AuthUnknownError",this.originalError=t}}class e7 extends e4{constructor(e,t,i,r){super(e,i,r),this.name=t,this.status=i}}class e9 extends e7{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}class te extends e7{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class tt extends e7{constructor(e){super(e,"AuthInvalidCredentialsError",400,void 0)}}class ti extends e7{constructor(e,t=null){super(e,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=t}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class tr extends e7{constructor(e,t=null){super(e,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=t}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class ts extends e7{constructor(e,t){super(e,"AuthRetryableFetchError",t,void 0)}}function ta(e){return e6(e)&&"AuthRetryableFetchError"===e.name}class to extends e7{constructor(e,t,i){super(e,"AuthWeakPasswordError",t,"weak_password"),this.reasons=i}}var tn=function(e,t){var i={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(i[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)0>t.indexOf(r[s])&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(i[r[s]]=e[r[s]]);return i};let tl=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),th=[502,503,504];async function td(e){var t;let i,r;if(!e$(e))throw new ts(tl(e),0);if(th.includes(e.status))throw new ts(tl(e),e.status);try{i=await e.json()}catch(e){throw new e8(tl(e),e)}let s=function(e){let t=e.headers.get(ez);if(!t||!t.match(e3))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch(e){return null}}(e);if(s&&s.getTime()>=e_["2024-01-01"].timestamp&&"object"==typeof i&&i&&"string"==typeof i.code?r=i.code:"object"==typeof i&&i&&"string"==typeof i.error_code&&(r=i.error_code),r){if("weak_password"===r)throw new to(tl(i),e.status,(null===(t=i.weak_password)||void 0===t?void 0:t.reasons)||[]);if("session_not_found"===r)throw new e9}else if("object"==typeof i&&i&&"object"==typeof i.weak_password&&i.weak_password&&Array.isArray(i.weak_password.reasons)&&i.weak_password.reasons.length&&i.weak_password.reasons.reduce((e,t)=>e&&"string"==typeof t,!0))throw new to(tl(i),e.status,i.weak_password.reasons);throw new e5(tl(i),e.status||500,r)}let tc=(e,t,i,r)=>{let s={method:e,headers:(null==t?void 0:t.headers)||{}};return"GET"===e?s:(s.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},null==t?void 0:t.headers),s.body=JSON.stringify(r),Object.assign(Object.assign({},s),i))};async function tu(e,t,i,r){var s;let a=Object.assign({},null==r?void 0:r.headers);a[ez]||(a[ez]=e_["2024-01-01"].name),(null==r?void 0:r.jwt)&&(a.Authorization=`Bearer ${r.jwt}`);let o=null!==(s=null==r?void 0:r.query)&&void 0!==s?s:{};(null==r?void 0:r.redirectTo)&&(o.redirect_to=r.redirectTo);let n=Object.keys(o).length?"?"+new URLSearchParams(o).toString():"",l=await tp(e,t,i+n,{headers:a,noResolveJson:null==r?void 0:r.noResolveJson},{},null==r?void 0:r.body);return(null==r?void 0:r.xform)?null==r?void 0:r.xform(l):{data:Object.assign({},l),error:null}}async function tp(e,t,i,r,s,a){let o;let n=tc(t,r,s,a);try{o=await e(i,Object.assign({},n))}catch(e){throw console.error(e),new ts(tl(e),0)}if(o.ok||await td(o),null==r?void 0:r.noResolveJson)return o;try{return await o.json()}catch(e){await td(e)}}function tg(e){var t,i;let r=null;return e.access_token&&e.refresh_token&&e.expires_in&&(r=Object.assign({},e),!e.expires_at)&&(r.expires_at=(i=e.expires_in,Math.round(Date.now()/1e3)+i)),{data:{session:r,user:null!==(t=e.user)&&void 0!==t?t:e},error:null}}function tm(e){let t=tg(e);return!t.error&&e.weak_password&&"object"==typeof e.weak_password&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&"string"==typeof e.weak_password.message&&e.weak_password.reasons.reduce((e,t)=>e&&"string"==typeof t,!0)&&(t.data.weak_password=e.weak_password),t}function tf(e){var t;return{data:{user:null!==(t=e.user)&&void 0!==t?t:e},error:null}}function tv(e){return{data:e,error:null}}function ty(e){let{action_link:t,email_otp:i,hashed_token:r,redirect_to:s,verification_type:a}=e;return{data:{properties:{action_link:t,email_otp:i,hashed_token:r,redirect_to:s,verification_type:a},user:Object.assign({},tn(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]))},error:null}}function tC(e){return e}var tw=function(e,t){var i={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(i[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)0>t.indexOf(r[s])&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(i[r[s]]=e[r[s]]);return i};class tb{constructor({url:e="",headers:t={},fetch:i}){this.url=e,this.headers=t,this.fetch=eW(i),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)}}async signOut(e,t="global"){try{return await tu(this.fetch,"POST",`${this.url}/logout?scope=${t}`,{headers:this.headers,jwt:e,noResolveJson:!0}),{data:null,error:null}}catch(e){if(e6(e))return{data:null,error:e};throw e}}async inviteUserByEmail(e,t={}){try{return await tu(this.fetch,"POST",`${this.url}/invite`,{body:{email:e,data:t.data},headers:this.headers,redirectTo:t.redirectTo,xform:tf})}catch(e){if(e6(e))return{data:{user:null},error:e};throw e}}async generateLink(e){try{let{options:t}=e,i=tw(e,["options"]),r=Object.assign(Object.assign({},i),t);return"newEmail"in i&&(r.new_email=null==i?void 0:i.newEmail,delete r.newEmail),await tu(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:r,headers:this.headers,xform:ty,redirectTo:null==t?void 0:t.redirectTo})}catch(e){if(e6(e))return{data:{properties:null,user:null},error:e};throw e}}async createUser(e){try{return await tu(this.fetch,"POST",`${this.url}/admin/users`,{body:e,headers:this.headers,xform:tf})}catch(e){if(e6(e))return{data:{user:null},error:e};throw e}}async listUsers(e){var t,i,r,s,a,o,n;try{let l={nextPage:null,lastPage:0,total:0},h=await tu(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:null!==(i=null===(t=null==e?void 0:e.page)||void 0===t?void 0:t.toString())&&void 0!==i?i:"",per_page:null!==(s=null===(r=null==e?void 0:e.perPage)||void 0===r?void 0:r.toString())&&void 0!==s?s:""},xform:tC});if(h.error)throw h.error;let d=await h.json(),c=null!==(a=h.headers.get("x-total-count"))&&void 0!==a?a:0,u=null!==(n=null===(o=h.headers.get("link"))||void 0===o?void 0:o.split(","))&&void 0!==n?n:[];return u.length>0&&(u.forEach(e=>{let t=parseInt(e.split(";")[0].split("=")[1].substring(0,1)),i=JSON.parse(e.split(";")[1].split("=")[1]);l[`${i}Page`]=t}),l.total=parseInt(c)),{data:Object.assign(Object.assign({},d),l),error:null}}catch(e){if(e6(e))return{data:{users:[]},error:e};throw e}}async getUserById(e){try{return await tu(this.fetch,"GET",`${this.url}/admin/users/${e}`,{headers:this.headers,xform:tf})}catch(e){if(e6(e))return{data:{user:null},error:e};throw e}}async updateUserById(e,t){try{return await tu(this.fetch,"PUT",`${this.url}/admin/users/${e}`,{body:t,headers:this.headers,xform:tf})}catch(e){if(e6(e))return{data:{user:null},error:e};throw e}}async deleteUser(e,t=!1){try{return await tu(this.fetch,"DELETE",`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:t},xform:tf})}catch(e){if(e6(e))return{data:{user:null},error:e};throw e}}async _listFactors(e){try{let{data:t,error:i}=await tu(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/factors`,{headers:this.headers,xform:e=>({data:{factors:e},error:null})});return{data:t,error:i}}catch(e){if(e6(e))return{data:null,error:e};throw e}}async _deleteFactor(e){try{return{data:await tu(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/factors/${e.id}`,{headers:this.headers}),error:null}}catch(e){if(e6(e))return{data:null,error:e};throw e}}}let tS={getItem:e=>eH()?globalThis.localStorage.getItem(e):null,setItem:(e,t)=>{eH()&&globalThis.localStorage.setItem(e,t)},removeItem:e=>{eH()&&globalThis.localStorage.removeItem(e)}};function tx(e={}){return{getItem:t=>e[t]||null,setItem:(t,i)=>{e[t]=i},removeItem:t=>{delete e[t]}}}let tM={debug:!!(globalThis&&eH()&&globalThis.localStorage&&"true"===globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug"))};class tE extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}}class tD extends tE{}async function tI(e,t,i){tM.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);let r=new globalThis.AbortController;return t>0&&setTimeout(()=>{r.abort(),tM.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},t),await globalThis.navigator.locks.request(e,0===t?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:r.signal},async r=>{if(r){tM.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,r.name);try{return await i()}finally{tM.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,r.name)}}else{if(0===t)throw tM.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new tD(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(tM.debug)try{let e=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(e,null,"  "))}catch(e){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",e)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),await i()}})}!function(){if("object"!=typeof globalThis)try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch(e){"undefined"!=typeof self&&(self.globalThis=self)}}();let tk={url:"http://localhost:9999",storageKey:"supabase.auth.token",autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:eG,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1};async function tT(e,t,i){return await i()}class tA{constructor(e){var t,i;this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log,this.instanceID=tA.nextInstanceID,tA.nextInstanceID+=1,this.instanceID>0&&eV()&&console.warn("Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.");let r=Object.assign(Object.assign({},tk),e);if(this.logDebugMessages=!!r.debug,"function"==typeof r.debug&&(this.logger=r.debug),this.persistSession=r.persistSession,this.storageKey=r.storageKey,this.autoRefreshToken=r.autoRefreshToken,this.admin=new tb({url:r.url,headers:r.headers,fetch:r.fetch}),this.url=r.url,this.headers=r.headers,this.fetch=eW(r.fetch),this.lock=r.lock||tT,this.detectSessionInUrl=r.detectSessionInUrl,this.flowType=r.flowType,this.hasCustomAuthorizationHeader=r.hasCustomAuthorizationHeader,r.lock?this.lock=r.lock:eV()&&(null===(t=null==globalThis?void 0:globalThis.navigator)||void 0===t?void 0:t.locks)?this.lock=tI:this.lock=tT,this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this)},this.persistSession?r.storage?this.storage=r.storage:eH()?this.storage=tS:(this.memoryStorage={},this.storage=tx(this.memoryStorage)):(this.memoryStorage={},this.storage=tx(this.memoryStorage)),eV()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(e){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",e)}null===(i=this.broadcastChannel)||void 0===i||i.addEventListener("message",async e=>{this._debug("received broadcast notification from other tab or client",e),await this._notifyAllSubscribers(e.data.event,e.data.session,!1)})}this.initialize()}_debug(...e){return this.logDebugMessages&&this.logger(`GoTrueClient@${this.instanceID} (${eB}) ${new Date().toISOString()}`,...e),this}async initialize(){return this.initializePromise||(this.initializePromise=(async()=>await this._acquireLock(-1,async()=>await this._initialize()))()),await this.initializePromise}async _initialize(){try{let e=!!eV()&&await this._isPKCEFlow();if(this._debug("#_initialize()","begin","is PKCE flow",e),e||this.detectSessionInUrl&&this._isImplicitGrantFlow()){let{data:t,error:i}=await this._getSessionFromURL(e);if(i){if(this._debug("#_initialize()","error detecting session from URL",i),(null==i?void 0:i.message)==="Identity is already linked"||(null==i?void 0:i.message)==="Identity is already linked to another user")return{error:i};return await this._removeSession(),{error:i}}let{session:r,redirectType:s}=t;return this._debug("#_initialize()","detected session in URL",r,"redirect type",s),await this._saveSession(r),setTimeout(async()=>{"recovery"===s?await this._notifyAllSubscribers("PASSWORD_RECOVERY",r):await this._notifyAllSubscribers("SIGNED_IN",r)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(e){if(e6(e))return{error:e};return{error:new e8("Unexpected error during initialization",e)}}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(e){var t,i,r;try{let{data:s,error:a}=await tu(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:null!==(i=null===(t=null==e?void 0:e.options)||void 0===t?void 0:t.data)&&void 0!==i?i:{},gotrue_meta_security:{captcha_token:null===(r=null==e?void 0:e.options)||void 0===r?void 0:r.captchaToken}},xform:tg});if(a||!s)return{data:{user:null,session:null},error:a};let o=s.session,n=s.user;return s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers("SIGNED_IN",o)),{data:{user:n,session:o},error:null}}catch(e){if(e6(e))return{data:{user:null,session:null},error:e};throw e}}async signUp(e){var t,i,r;try{let s;if("email"in e){let{email:i,password:r,options:a}=e,o=null,n=null;"pkce"===this.flowType&&([o,n]=await e2(this.storage,this.storageKey)),s=await tu(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:null==a?void 0:a.emailRedirectTo,body:{email:i,password:r,data:null!==(t=null==a?void 0:a.data)&&void 0!==t?t:{},gotrue_meta_security:{captcha_token:null==a?void 0:a.captchaToken},code_challenge:o,code_challenge_method:n},xform:tg})}else if("phone"in e){let{phone:t,password:a,options:o}=e;s=await tu(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:t,password:a,data:null!==(i=null==o?void 0:o.data)&&void 0!==i?i:{},channel:null!==(r=null==o?void 0:o.channel)&&void 0!==r?r:"sms",gotrue_meta_security:{captcha_token:null==o?void 0:o.captchaToken}},xform:tg})}else throw new tt("You must provide either an email or phone number and a password");let{data:a,error:o}=s;if(o||!a)return{data:{user:null,session:null},error:o};let n=a.session,l=a.user;return a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers("SIGNED_IN",n)),{data:{user:l,session:n},error:null}}catch(e){if(e6(e))return{data:{user:null,session:null},error:e};throw e}}async signInWithPassword(e){try{let t;if("email"in e){let{email:i,password:r,options:s}=e;t=await tu(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:i,password:r,gotrue_meta_security:{captcha_token:null==s?void 0:s.captchaToken}},xform:tm})}else if("phone"in e){let{phone:i,password:r,options:s}=e;t=await tu(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:i,password:r,gotrue_meta_security:{captcha_token:null==s?void 0:s.captchaToken}},xform:tm})}else throw new tt("You must provide either an email or phone number and a password");let{data:i,error:r}=t;if(r)return{data:{user:null,session:null},error:r};if(!i||!i.session||!i.user)return{data:{user:null,session:null},error:new te};return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",i.session)),{data:Object.assign({user:i.user,session:i.session},i.weak_password?{weakPassword:i.weak_password}:null),error:r}}catch(e){if(e6(e))return{data:{user:null,session:null},error:e};throw e}}async signInWithOAuth(e){var t,i,r,s;return await this._handleProviderSignIn(e.provider,{redirectTo:null===(t=e.options)||void 0===t?void 0:t.redirectTo,scopes:null===(i=e.options)||void 0===i?void 0:i.scopes,queryParams:null===(r=e.options)||void 0===r?void 0:r.queryParams,skipBrowserRedirect:null===(s=e.options)||void 0===s?void 0:s.skipBrowserRedirect})}async exchangeCodeForSession(e){return await this.initializePromise,this._acquireLock(-1,async()=>this._exchangeCodeForSession(e))}async _exchangeCodeForSession(e){let t=await eK(this.storage,`${this.storageKey}-code-verifier`),[i,r]=(null!=t?t:"").split("/");try{let{data:t,error:s}=await tu(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:i},xform:tg});if(await eZ(this.storage,`${this.storageKey}-code-verifier`),s)throw s;if(!t||!t.session||!t.user)return{data:{user:null,session:null,redirectType:null},error:new te};return t.session&&(await this._saveSession(t.session),await this._notifyAllSubscribers("SIGNED_IN",t.session)),{data:Object.assign(Object.assign({},t),{redirectType:null!=r?r:null}),error:s}}catch(e){if(e6(e))return{data:{user:null,session:null,redirectType:null},error:e};throw e}}async signInWithIdToken(e){try{let{options:t,provider:i,token:r,access_token:s,nonce:a}=e,{data:o,error:n}=await tu(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:i,id_token:r,access_token:s,nonce:a,gotrue_meta_security:{captcha_token:null==t?void 0:t.captchaToken}},xform:tg});if(n)return{data:{user:null,session:null},error:n};if(!o||!o.session||!o.user)return{data:{user:null,session:null},error:new te};return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",o.session)),{data:o,error:n}}catch(e){if(e6(e))return{data:{user:null,session:null},error:e};throw e}}async signInWithOtp(e){var t,i,r,s,a;try{if("email"in e){let{email:r,options:s}=e,a=null,o=null;"pkce"===this.flowType&&([a,o]=await e2(this.storage,this.storageKey));let{error:n}=await tu(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:r,data:null!==(t=null==s?void 0:s.data)&&void 0!==t?t:{},create_user:null===(i=null==s?void 0:s.shouldCreateUser)||void 0===i||i,gotrue_meta_security:{captcha_token:null==s?void 0:s.captchaToken},code_challenge:a,code_challenge_method:o},redirectTo:null==s?void 0:s.emailRedirectTo});return{data:{user:null,session:null},error:n}}if("phone"in e){let{phone:t,options:i}=e,{data:o,error:n}=await tu(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:t,data:null!==(r=null==i?void 0:i.data)&&void 0!==r?r:{},create_user:null===(s=null==i?void 0:i.shouldCreateUser)||void 0===s||s,gotrue_meta_security:{captcha_token:null==i?void 0:i.captchaToken},channel:null!==(a=null==i?void 0:i.channel)&&void 0!==a?a:"sms"}});return{data:{user:null,session:null,messageId:null==o?void 0:o.message_id},error:n}}throw new tt("You must provide either an email or phone number.")}catch(e){if(e6(e))return{data:{user:null,session:null},error:e};throw e}}async verifyOtp(e){var t,i;try{let r,s;"options"in e&&(r=null===(t=e.options)||void 0===t?void 0:t.redirectTo,s=null===(i=e.options)||void 0===i?void 0:i.captchaToken);let{data:a,error:o}=await tu(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:s}}),redirectTo:r,xform:tg});if(o)throw o;if(!a)throw Error("An error occurred on token verification.");let n=a.session,l=a.user;return(null==n?void 0:n.access_token)&&(await this._saveSession(n),await this._notifyAllSubscribers("recovery"==e.type?"PASSWORD_RECOVERY":"SIGNED_IN",n)),{data:{user:l,session:n},error:null}}catch(e){if(e6(e))return{data:{user:null,session:null},error:e};throw e}}async signInWithSSO(e){var t,i,r;try{let s=null,a=null;return"pkce"===this.flowType&&([s,a]=await e2(this.storage,this.storageKey)),await tu(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in e?{provider_id:e.providerId}:null),"domain"in e?{domain:e.domain}:null),{redirect_to:null!==(i=null===(t=e.options)||void 0===t?void 0:t.redirectTo)&&void 0!==i?i:void 0}),(null===(r=null==e?void 0:e.options)||void 0===r?void 0:r.captchaToken)?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:s,code_challenge_method:a}),headers:this.headers,xform:tv})}catch(e){if(e6(e))return{data:null,error:e};throw e}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async e=>{let{data:{session:t},error:i}=e;if(i)throw i;if(!t)throw new e9;let{error:r}=await tu(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:t.access_token});return{data:{user:null,session:null},error:r}})}catch(e){if(e6(e))return{data:{user:null,session:null},error:e};throw e}}async resend(e){try{let t=`${this.url}/resend`;if("email"in e){let{email:i,type:r,options:s}=e,{error:a}=await tu(this.fetch,"POST",t,{headers:this.headers,body:{email:i,type:r,gotrue_meta_security:{captcha_token:null==s?void 0:s.captchaToken}},redirectTo:null==s?void 0:s.emailRedirectTo});return{data:{user:null,session:null},error:a}}if("phone"in e){let{phone:i,type:r,options:s}=e,{data:a,error:o}=await tu(this.fetch,"POST",t,{headers:this.headers,body:{phone:i,type:r,gotrue_meta_security:{captcha_token:null==s?void 0:s.captchaToken}}});return{data:{user:null,session:null,messageId:null==a?void 0:a.message_id},error:o}}throw new tt("You must provide either an email or phone number and a type")}catch(e){if(e6(e))return{data:{user:null,session:null},error:e};throw e}}async getSession(){return await this.initializePromise,await this._acquireLock(-1,async()=>this._useSession(async e=>e))}async _acquireLock(e,t){this._debug("#_acquireLock","begin",e);try{if(this.lockAcquired){let e=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),i=(async()=>(await e,await t()))();return this.pendingInLock.push((async()=>{try{await i}catch(e){}})()),i}return await this.lock(`lock:${this.storageKey}`,e,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;let e=t();for(this.pendingInLock.push((async()=>{try{await e}catch(e){}})()),await e;this.pendingInLock.length;){let e=[...this.pendingInLock];await Promise.all(e),this.pendingInLock.splice(0,e.length)}return await e}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(e){this._debug("#_useSession","begin");try{let t=await this.__loadSession();return await e(t)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",Error().stack);try{let e=null,t=await eK(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",t),null!==t&&(this._isValidSession(t)?e=t:(this._debug("#getSession()","session from storage is not valid"),await this._removeSession())),!e)return{data:{session:null},error:null};let i=!!e.expires_at&&e.expires_at<=Date.now()/1e3;if(this._debug("#__loadSession()",`session has${i?"":" not"} expired`,"expires_at",e.expires_at),!i){if(this.storage.isServer){let t=this.suppressGetSessionWarning;e=new Proxy(e,{get:(e,i,r)=>(t||"user"!==i||(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and many not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),t=!0,this.suppressGetSessionWarning=!0),Reflect.get(e,i,r))})}return{data:{session:e},error:null}}let{session:r,error:s}=await this._callRefreshToken(e.refresh_token);if(s)return{data:{session:null},error:s};return{data:{session:r},error:null}}finally{this._debug("#__loadSession()","end")}}async getUser(e){return e?await this._getUser(e):(await this.initializePromise,await this._acquireLock(-1,async()=>await this._getUser()))}async _getUser(e){try{if(e)return await tu(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:e,xform:tf});return await this._useSession(async e=>{var t,i,r;let{data:s,error:a}=e;if(a)throw a;return(null===(t=s.session)||void 0===t?void 0:t.access_token)||this.hasCustomAuthorizationHeader?await tu(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:null!==(r=null===(i=s.session)||void 0===i?void 0:i.access_token)&&void 0!==r?r:void 0,xform:tf}):{data:{user:null},error:new e9}})}catch(e){if(e6(e))return e6(e)&&"AuthSessionMissingError"===e.name&&(await this._removeSession(),await eZ(this.storage,`${this.storageKey}-code-verifier`),await this._notifyAllSubscribers("SIGNED_OUT",null)),{data:{user:null},error:e};throw e}}async updateUser(e,t={}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._updateUser(e,t))}async _updateUser(e,t={}){try{return await this._useSession(async i=>{let{data:r,error:s}=i;if(s)throw s;if(!r.session)throw new e9;let a=r.session,o=null,n=null;"pkce"===this.flowType&&null!=e.email&&([o,n]=await e2(this.storage,this.storageKey));let{data:l,error:h}=await tu(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:null==t?void 0:t.emailRedirectTo,body:Object.assign(Object.assign({},e),{code_challenge:o,code_challenge_method:n}),jwt:a.access_token,xform:tf});if(h)throw h;return a.user=l.user,await this._saveSession(a),await this._notifyAllSubscribers("USER_UPDATED",a),{data:{user:a.user},error:null}})}catch(e){if(e6(e))return{data:{user:null},error:e};throw e}}_decodeJWT(e){return eX(e)}async setSession(e){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._setSession(e))}async _setSession(e){try{if(!e.access_token||!e.refresh_token)throw new e9;let t=Date.now()/1e3,i=t,r=!0,s=null,a=eX(e.access_token);if(a.exp&&(r=(i=a.exp)<=t),r){let{session:t,error:i}=await this._callRefreshToken(e.refresh_token);if(i)return{data:{user:null,session:null},error:i};if(!t)return{data:{user:null,session:null},error:null};s=t}else{let{data:r,error:a}=await this._getUser(e.access_token);if(a)throw a;s={access_token:e.access_token,refresh_token:e.refresh_token,user:r.user,token_type:"bearer",expires_in:i-t,expires_at:i},await this._saveSession(s),await this._notifyAllSubscribers("SIGNED_IN",s)}return{data:{user:s.user,session:s},error:null}}catch(e){if(e6(e))return{data:{session:null,user:null},error:e};throw e}}async refreshSession(e){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._refreshSession(e))}async _refreshSession(e){try{return await this._useSession(async t=>{var i;if(!e){let{data:r,error:s}=t;if(s)throw s;e=null!==(i=r.session)&&void 0!==i?i:void 0}if(!(null==e?void 0:e.refresh_token))throw new e9;let{session:r,error:s}=await this._callRefreshToken(e.refresh_token);return s?{data:{user:null,session:null},error:s}:r?{data:{user:r.user,session:r},error:null}:{data:{user:null,session:null},error:null}})}catch(e){if(e6(e))return{data:{user:null,session:null},error:e};throw e}}async _getSessionFromURL(e){try{if(!eV())throw new ti("No browser detected.");if("implicit"!==this.flowType||this._isImplicitGrantFlow()){if("pkce"==this.flowType&&!e)throw new tr("Not a valid PKCE flow url.")}else throw new ti("Not a valid implicit grant flow url.");let t=eU(window.location.href);if(e){if(!t.code)throw new tr("No code detected.");let{data:e,error:i}=await this._exchangeCodeForSession(t.code);if(i)throw i;let r=new URL(window.location.href);return r.searchParams.delete("code"),window.history.replaceState(window.history.state,"",r.toString()),{data:{session:e.session,redirectType:null},error:null}}if(t.error||t.error_description||t.error_code)throw new ti(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});let{provider_token:i,provider_refresh_token:r,access_token:s,refresh_token:a,expires_in:o,expires_at:n,token_type:l}=t;if(!s||!o||!a||!l)throw new ti("No session defined in URL");let h=Math.round(Date.now()/1e3),d=parseInt(o),c=h+d;n&&(c=parseInt(n));let u=c-h;1e3*u<=3e4&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${u}s, should have been closer to ${d}s`);let p=c-d;h-p>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",p,c,h):h-p<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",p,c,h);let{data:g,error:m}=await this._getUser(s);if(m)throw m;let f={provider_token:i,provider_refresh_token:r,access_token:s,expires_in:d,expires_at:c,refresh_token:a,token_type:l,user:g.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),{data:{session:f,redirectType:t.type},error:null}}catch(e){if(e6(e))return{data:{session:null,redirectType:null},error:e};throw e}}_isImplicitGrantFlow(){let e=eU(window.location.href);return!!(eV()&&(e.access_token||e.error_description))}async _isPKCEFlow(){let e=eU(window.location.href),t=await eK(this.storage,`${this.storageKey}-code-verifier`);return!!(e.code&&t)}async signOut(e={scope:"global"}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._signOut(e))}async _signOut({scope:e}={scope:"global"}){return await this._useSession(async t=>{var i;let{data:r,error:s}=t;if(s)return{error:s};let a=null===(i=r.session)||void 0===i?void 0:i.access_token;if(a){let{error:t}=await this.admin.signOut(a,e);if(t&&!(e6(t)&&"AuthApiError"===t.name&&(404===t.status||401===t.status||403===t.status)))return{error:t}}return"others"!==e&&(await this._removeSession(),await eZ(this.storage,`${this.storageKey}-code-verifier`),await this._notifyAllSubscribers("SIGNED_OUT",null)),{error:null}})}onAuthStateChange(e){let t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){let t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}),i={id:t,callback:e,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",t),this.stateChangeEmitters.delete(t)}};return this._debug("#onAuthStateChange()","registered callback with id",t),this.stateChangeEmitters.set(t,i),(async()=>{await this.initializePromise,await this._acquireLock(-1,async()=>{this._emitInitialSession(t)})})(),{data:{subscription:i}}}async _emitInitialSession(e){return await this._useSession(async t=>{var i,r;try{let{data:{session:r},error:s}=t;if(s)throw s;await (null===(i=this.stateChangeEmitters.get(e))||void 0===i?void 0:i.callback("INITIAL_SESSION",r)),this._debug("INITIAL_SESSION","callback id",e,"session",r)}catch(t){await (null===(r=this.stateChangeEmitters.get(e))||void 0===r?void 0:r.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",e,"error",t),console.error(t)}})}async resetPasswordForEmail(e,t={}){let i=null,r=null;"pkce"===this.flowType&&([i,r]=await e2(this.storage,this.storageKey,!0));try{return await tu(this.fetch,"POST",`${this.url}/recover`,{body:{email:e,code_challenge:i,code_challenge_method:r,gotrue_meta_security:{captcha_token:t.captchaToken}},headers:this.headers,redirectTo:t.redirectTo})}catch(e){if(e6(e))return{data:null,error:e};throw e}}async getUserIdentities(){var e;try{let{data:t,error:i}=await this.getUser();if(i)throw i;return{data:{identities:null!==(e=t.user.identities)&&void 0!==e?e:[]},error:null}}catch(e){if(e6(e))return{data:null,error:e};throw e}}async linkIdentity(e){var t;try{let{data:i,error:r}=await this._useSession(async t=>{var i,r,s,a,o;let{data:n,error:l}=t;if(l)throw l;let h=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:null===(i=e.options)||void 0===i?void 0:i.redirectTo,scopes:null===(r=e.options)||void 0===r?void 0:r.scopes,queryParams:null===(s=e.options)||void 0===s?void 0:s.queryParams,skipBrowserRedirect:!0});return await tu(this.fetch,"GET",h,{headers:this.headers,jwt:null!==(o=null===(a=n.session)||void 0===a?void 0:a.access_token)&&void 0!==o?o:void 0})});if(r)throw r;return!eV()||(null===(t=e.options)||void 0===t?void 0:t.skipBrowserRedirect)||window.location.assign(null==i?void 0:i.url),{data:{provider:e.provider,url:null==i?void 0:i.url},error:null}}catch(t){if(e6(t))return{data:{provider:e.provider,url:null},error:t};throw t}}async unlinkIdentity(e){try{return await this._useSession(async t=>{var i,r;let{data:s,error:a}=t;if(a)throw a;return await tu(this.fetch,"DELETE",`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:null!==(r=null===(i=s.session)||void 0===i?void 0:i.access_token)&&void 0!==r?r:void 0})})}catch(e){if(e6(e))return{data:null,error:e};throw e}}async _refreshAccessToken(e){let t=`#_refreshAccessToken(${e.substring(0,5)}...)`;this._debug(t,"begin");try{var i,r;let s=Date.now();return await (i=async i=>(i>0&&await eQ(200*Math.pow(2,i-1)),this._debug(t,"refreshing attempt",i),await tu(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:tg})),r=(e,t)=>{let i=200*Math.pow(2,e);return t&&ta(t)&&Date.now()+i-s<3e4},new Promise((e,t)=>{(async()=>{for(let s=0;s<1/0;s++)try{let t=await i(s);if(!r(s,null,t)){e(t);return}}catch(e){if(!r(s,e)){t(e);return}}})()}))}catch(e){if(this._debug(t,"error",e),e6(e))return{data:{session:null,user:null},error:e};throw e}finally{this._debug(t,"end")}}_isValidSession(e){return"object"==typeof e&&null!==e&&"access_token"in e&&"refresh_token"in e&&"expires_at"in e}async _handleProviderSignIn(e,t){let i=await this._getUrlForProvider(`${this.url}/authorize`,e,{redirectTo:t.redirectTo,scopes:t.scopes,queryParams:t.queryParams});return this._debug("#_handleProviderSignIn()","provider",e,"options",t,"url",i),eV()&&!t.skipBrowserRedirect&&window.location.assign(i),{data:{provider:e,url:i},error:null}}async _recoverAndRefresh(){var e;let t="#_recoverAndRefresh()";this._debug(t,"begin");try{let i=await eK(this.storage,this.storageKey);if(this._debug(t,"session from storage",i),!this._isValidSession(i)){this._debug(t,"session is not valid"),null!==i&&await this._removeSession();return}let r=Math.round(Date.now()/1e3),s=(null!==(e=i.expires_at)&&void 0!==e?e:1/0)<r+10;if(this._debug(t,`session has${s?"":" not"} expired with margin of 10s`),s){if(this.autoRefreshToken&&i.refresh_token){let{error:e}=await this._callRefreshToken(i.refresh_token);e&&(console.error(e),ta(e)||(this._debug(t,"refresh failed with a non-retryable error, removing the session",e),await this._removeSession()))}}else await this._notifyAllSubscribers("SIGNED_IN",i)}catch(e){this._debug(t,"error",e),console.error(e);return}finally{this._debug(t,"end")}}async _callRefreshToken(e){var t,i;if(!e)throw new e9;if(this.refreshingDeferred)return this.refreshingDeferred.promise;let r=`#_callRefreshToken(${e.substring(0,5)}...)`;this._debug(r,"begin");try{this.refreshingDeferred=new eq;let{data:t,error:i}=await this._refreshAccessToken(e);if(i)throw i;if(!t.session)throw new e9;await this._saveSession(t.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",t.session);let r={session:t.session,error:null};return this.refreshingDeferred.resolve(r),r}catch(e){if(this._debug(r,"error",e),e6(e)){let i={session:null,error:e};return ta(e)||(await this._removeSession(),await this._notifyAllSubscribers("SIGNED_OUT",null)),null===(t=this.refreshingDeferred)||void 0===t||t.resolve(i),i}throw null===(i=this.refreshingDeferred)||void 0===i||i.reject(e),e}finally{this.refreshingDeferred=null,this._debug(r,"end")}}async _notifyAllSubscribers(e,t,i=!0){let r=`#_notifyAllSubscribers(${e})`;this._debug(r,"begin",t,`broadcast = ${i}`);try{this.broadcastChannel&&i&&this.broadcastChannel.postMessage({event:e,session:t});let r=[],s=Array.from(this.stateChangeEmitters.values()).map(async i=>{try{await i.callback(e,t)}catch(e){r.push(e)}});if(await Promise.all(s),r.length>0){for(let e=0;e<r.length;e+=1)console.error(r[e]);throw r[0]}}finally{this._debug(r,"end")}}async _saveSession(e){this._debug("#_saveSession()",e),this.suppressGetSessionWarning=!0,await eY(this.storage,this.storageKey,e)}async _removeSession(){this._debug("#_removeSession()"),await eZ(this.storage,this.storageKey)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");let e=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{e&&eV()&&(null==window?void 0:window.removeEventListener)&&window.removeEventListener("visibilitychange",e)}catch(e){console.error("removing visibilitychange callback failed",e)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");let e=setInterval(()=>this._autoRefreshTokenTick(),3e4);this.autoRefreshTicker=e,e&&"object"==typeof e&&"function"==typeof e.unref?e.unref():"undefined"!=typeof Deno&&"function"==typeof Deno.unrefTimer&&Deno.unrefTimer(e),setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");let e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{let e=Date.now();try{return await this._useSession(async t=>{let{data:{session:i}}=t;if(!i||!i.refresh_token||!i.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}let r=Math.floor((1e3*i.expires_at-e)/3e4);this._debug("#_autoRefreshTokenTick()",`access token expires in ${r} ticks, a tick lasts 30000ms, refresh threshold is 3 ticks`),r<=3&&await this._callRefreshToken(i.refresh_token)})}catch(e){console.error("Auto refresh tick failed with error. This is likely a transient error.",e)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(e){if(e.isAcquireTimeout||e instanceof tE)this._debug("auto refresh token tick lock not available");else throw e}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!eV()||!(null==window?void 0:window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>await this._onVisibilityChanged(!1),null==window||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(e){console.error("_handleVisibilityChange",e)}}async _onVisibilityChanged(e){let t=`#_onVisibilityChanged(${e})`;this._debug(t,"visibilityState",document.visibilityState),"visible"===document.visibilityState?(this.autoRefreshToken&&this._startAutoRefresh(),e||(await this.initializePromise,await this._acquireLock(-1,async()=>{if("visible"!==document.visibilityState){this._debug(t,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):"hidden"===document.visibilityState&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(e,t,i){let r=[`provider=${encodeURIComponent(t)}`];if((null==i?void 0:i.redirectTo)&&r.push(`redirect_to=${encodeURIComponent(i.redirectTo)}`),(null==i?void 0:i.scopes)&&r.push(`scopes=${encodeURIComponent(i.scopes)}`),"pkce"===this.flowType){let[e,t]=await e2(this.storage,this.storageKey),i=new URLSearchParams({code_challenge:`${encodeURIComponent(e)}`,code_challenge_method:`${encodeURIComponent(t)}`});r.push(i.toString())}if(null==i?void 0:i.queryParams){let e=new URLSearchParams(i.queryParams);r.push(e.toString())}return(null==i?void 0:i.skipBrowserRedirect)&&r.push(`skip_http_redirect=${i.skipBrowserRedirect}`),`${e}?${r.join("&")}`}async _unenroll(e){try{return await this._useSession(async t=>{var i;let{data:r,error:s}=t;return s?{data:null,error:s}:await tu(this.fetch,"DELETE",`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:null===(i=null==r?void 0:r.session)||void 0===i?void 0:i.access_token})})}catch(e){if(e6(e))return{data:null,error:e};throw e}}async _enroll(e){try{return await this._useSession(async t=>{var i,r;let{data:s,error:a}=t;if(a)return{data:null,error:a};let o=Object.assign({friendly_name:e.friendlyName,factor_type:e.factorType},"phone"===e.factorType?{phone:e.phone}:{issuer:e.issuer}),{data:n,error:l}=await tu(this.fetch,"POST",`${this.url}/factors`,{body:o,headers:this.headers,jwt:null===(i=null==s?void 0:s.session)||void 0===i?void 0:i.access_token});return l?{data:null,error:l}:("phone"===e.factorType&&delete n.totp,"totp"===e.factorType&&(null===(r=null==n?void 0:n.totp)||void 0===r?void 0:r.qr_code)&&(n.totp.qr_code=`data:image/svg+xml;utf-8,${n.totp.qr_code}`),{data:n,error:null})})}catch(e){if(e6(e))return{data:null,error:e};throw e}}async _verify(e){return this._acquireLock(-1,async()=>{try{return await this._useSession(async t=>{var i;let{data:r,error:s}=t;if(s)return{data:null,error:s};let{data:a,error:o}=await tu(this.fetch,"POST",`${this.url}/factors/${e.factorId}/verify`,{body:{code:e.code,challenge_id:e.challengeId},headers:this.headers,jwt:null===(i=null==r?void 0:r.session)||void 0===i?void 0:i.access_token});return o?{data:null,error:o}:(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+a.expires_in},a)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",a),{data:a,error:o})})}catch(e){if(e6(e))return{data:null,error:e};throw e}})}async _challenge(e){return this._acquireLock(-1,async()=>{try{return await this._useSession(async t=>{var i;let{data:r,error:s}=t;return s?{data:null,error:s}:await tu(this.fetch,"POST",`${this.url}/factors/${e.factorId}/challenge`,{body:{channel:e.channel},headers:this.headers,jwt:null===(i=null==r?void 0:r.session)||void 0===i?void 0:i.access_token})})}catch(e){if(e6(e))return{data:null,error:e};throw e}})}async _challengeAndVerify(e){let{data:t,error:i}=await this._challenge({factorId:e.factorId});return i?{data:null,error:i}:await this._verify({factorId:e.factorId,challengeId:t.id,code:e.code})}async _listFactors(){let{data:{user:e},error:t}=await this.getUser();if(t)return{data:null,error:t};let i=(null==e?void 0:e.factors)||[],r=i.filter(e=>"totp"===e.factor_type&&"verified"===e.status),s=i.filter(e=>"phone"===e.factor_type&&"verified"===e.status);return{data:{all:i,totp:r,phone:s},error:null}}async _getAuthenticatorAssuranceLevel(){return this._acquireLock(-1,async()=>await this._useSession(async e=>{var t,i;let{data:{session:r},error:s}=e;if(s)return{data:null,error:s};if(!r)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};let a=this._decodeJWT(r.access_token),o=null;a.aal&&(o=a.aal);let n=o;return(null!==(i=null===(t=r.user.factors)||void 0===t?void 0:t.filter(e=>"verified"===e.status))&&void 0!==i?i:[]).length>0&&(n="aal2"),{data:{currentLevel:o,nextLevel:n,currentAuthenticationMethods:a.amr||[]},error:null}}))}}tA.nextInstanceID=0;var tR=tA;class tL extends tR{constructor(e){super(e)}}class tP{constructor(e,t,i){var r,s,a;if(this.supabaseUrl=e,this.supabaseKey=t,!e)throw Error("supabaseUrl is required.");if(!t)throw Error("supabaseKey is required.");let o=e.replace(/\/$/,"");this.realtimeUrl=`${o}/realtime/v1`.replace(/^http/i,"ws"),this.authUrl=`${o}/auth/v1`,this.storageUrl=`${o}/storage/v1`,this.functionsUrl=`${o}/functions/v1`;let n=`sb-${new URL(this.authUrl).hostname.split(".")[0]}-auth-token`,l=function(e,t){let{db:i,auth:r,realtime:s,global:a}=e,{db:o,auth:n,realtime:l,global:h}=t,d={db:Object.assign(Object.assign({},o),i),auth:Object.assign(Object.assign({},n),r),realtime:Object.assign(Object.assign({},l),s),global:Object.assign(Object.assign({},h),a),accessToken:()=>{var e,t,i,r;return e=this,t=void 0,r=function*(){return""},new(i=void 0,i=Promise)(function(s,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function n(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?s(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(o,n)}l((r=r.apply(e,t||[])).next())})}};return e.accessToken?d.accessToken=e.accessToken:delete d.accessToken,d}(null!=i?i:{},{db:eA,realtime:eL,auth:Object.assign(Object.assign({},eR),{storageKey:n}),global:eT});this.storageKey=null!==(r=l.auth.storageKey)&&void 0!==r?r:"",this.headers=null!==(s=l.global.headers)&&void 0!==s?s:{},l.accessToken?(this.accessToken=l.accessToken,this.auth=new Proxy({},{get:(e,t)=>{throw Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(t)} is not possible`)}})):this.auth=this._initSupabaseAuthClient(null!==(a=l.auth)&&void 0!==a?a:{},this.headers,l.global.fetch),this.fetch=eO(t,this._getAccessToken.bind(this),l.global.fetch),this.realtime=this._initRealtimeClient(Object.assign({headers:this.headers},l.realtime)),this.rest=new u(`${o}/rest/v1`,{headers:this.headers,schema:l.db.schema,fetch:this.fetch}),l.accessToken||this._listenForAuthEvents()}get functions(){return new c(this.functionsUrl,{headers:this.headers,customFetch:this.fetch})}get storage(){return new eI(this.storageUrl,this.headers,this.fetch)}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,t={},i={}){return this.rest.rpc(e,t,i)}channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}_getAccessToken(){var e,t,i,r,s,a;return i=this,r=void 0,s=void 0,a=function*(){if(this.accessToken)return yield this.accessToken();let{data:i}=yield this.auth.getSession();return null!==(t=null===(e=i.session)||void 0===e?void 0:e.access_token)&&void 0!==t?t:null},new(s||(s=Promise))(function(e,t){function o(e){try{l(a.next(e))}catch(e){t(e)}}function n(e){try{l(a.throw(e))}catch(e){t(e)}}function l(t){var i;t.done?e(t.value):((i=t.value)instanceof s?i:new s(function(e){e(i)})).then(o,n)}l((a=a.apply(i,r||[])).next())})}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:i,storage:r,storageKey:s,flowType:a,lock:o,debug:n},l,h){var d;let c={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new tL({url:this.authUrl,headers:Object.assign(Object.assign({},c),l),storageKey:s,autoRefreshToken:e,persistSession:t,detectSessionInUrl:i,storage:r,flowType:a,lock:o,debug:n,fetch:h,hasCustomAuthorizationHeader:"Authorization"in this.headers})}_initRealtimeClient(e){return new N(this.realtimeUrl,Object.assign(Object.assign({},e),{params:Object.assign({apikey:this.supabaseKey},null==e?void 0:e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((e,t)=>{this._handleTokenChanged(e,"CLIENT",null==t?void 0:t.access_token)})}_handleTokenChanged(e,t,i){("TOKEN_REFRESHED"===e||"SIGNED_IN"===e)&&this.changedAccessToken!==i?(this.realtime.setAuth(null!=i?i:null),this.changedAccessToken=i):"SIGNED_OUT"===e&&(this.realtime.setAuth(this.supabaseKey),"STORAGE"==t&&this.auth.signOut(),this.changedAccessToken=void 0)}}let tF=(e,t,i)=>new tP(e,t,i);var tN=i(21876).Buffer;let tO="function"==typeof tN,tB="function"==typeof TextDecoder?new TextDecoder:void 0;"function"==typeof TextEncoder&&new TextEncoder;let tG=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),tz=(r={},tG.forEach((e,t)=>r[e]=t),r),t_=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,tV=String.fromCharCode.bind(String),tj="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),tH=e=>e.replace(/[^A-Za-z0-9\+\/]/g,"");"function"==typeof btoa||tO||(e=>{let t,i,r,s,a="",o=e.length%3;for(let o=0;o<e.length;){if((i=e.charCodeAt(o++))>255||(r=e.charCodeAt(o++))>255||(s=e.charCodeAt(o++))>255)throw TypeError("invalid character found");a+=tG[(t=i<<16|r<<8|s)>>18&63]+tG[t>>12&63]+tG[t>>6&63]+tG[63&t]}return o?a.slice(0,o-3)+"===".substring(o):a});let tU=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,tW=e=>{switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return tV((t>>>10)+55296)+tV((1023&t)+56320);case 3:return tV((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return tV((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},t$=e=>e.replace(tU,tW),tY="function"==typeof atob?e=>atob(tH(e)):tO?e=>tN.from(e,"base64").toString("binary"):e=>{if(e=e.replace(/\s+/g,""),!t_.test(e))throw TypeError("malformed base64.");e+="==".slice(2-(3&e.length));let t,i="",r,s;for(let a=0;a<e.length;)t=tz[e.charAt(a++)]<<18|tz[e.charAt(a++)]<<12|(r=tz[e.charAt(a++)])<<6|(s=tz[e.charAt(a++)]),i+=64===r?tV(t>>16&255):64===s?tV(t>>16&255,t>>8&255):tV(t>>16&255,t>>8&255,255&t);return i},tK=tO?e=>tj(tN.from(e,"base64")):e=>tj(tY(e).split("").map(e=>e.charCodeAt(0))),tZ=tO?e=>tN.from(e,"base64").toString("utf8"):tB?e=>tB.decode(tK(e)):e=>t$(tY(e)),tq=e=>tH(e.replace(/[-_]/g,e=>"-"==e?"+":"/")),tX=e=>tZ(tq(e));var tQ=Object.create,tJ=Object.defineProperty,t0=Object.getOwnPropertyDescriptor,t1=Object.getOwnPropertyNames,t2=Object.getPrototypeOf,t3=Object.prototype.hasOwnProperty,t4=(e,t,i,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of t1(t))t3.call(e,s)||s===i||tJ(e,s,{get:()=>t[s],enumerable:!(r=t0(t,s))||r.enumerable});return e},t6=(e,t,i)=>(i=null!=e?tQ(t2(e)):{},t4(!t&&e&&e.__esModule?i:tJ(i,"default",{value:e,enumerable:!0}),e)),t5=(s={"../../node_modules/.pnpm/cookie@0.5.0/node_modules/cookie/index.js"(e){e.parse=function(e,t){if("string"!=typeof e)throw TypeError("argument str must be a string");for(var i={},s=(t||{}).decode||r,a=0;a<e.length;){var o=e.indexOf("=",a);if(-1===o)break;var n=e.indexOf(";",a);if(-1===n)n=e.length;else if(n<o){a=e.lastIndexOf(";",o-1)+1;continue}var l=e.slice(a,o).trim();if(void 0===i[l]){var h=e.slice(o+1,n).trim();34===h.charCodeAt(0)&&(h=h.slice(1,-1)),i[l]=function(e,t){try{return t(e)}catch(t){return e}}(h,s)}a=n+1}return i},e.serialize=function(e,r,a){var o=a||{},n=o.encode||s;if("function"!=typeof n)throw TypeError("option encode is invalid");if(!i.test(e))throw TypeError("argument name is invalid");var l=n(r);if(l&&!i.test(l))throw TypeError("argument val is invalid");var h=e+"="+l;if(null!=o.maxAge){var d=o.maxAge-0;if(isNaN(d)||!isFinite(d))throw TypeError("option maxAge is invalid");h+="; Max-Age="+Math.floor(d)}if(o.domain){if(!i.test(o.domain))throw TypeError("option domain is invalid");h+="; Domain="+o.domain}if(o.path){if(!i.test(o.path))throw TypeError("option path is invalid");h+="; Path="+o.path}if(o.expires){var c=o.expires;if("[object Date]"!==t.call(c)&&!(c instanceof Date)||isNaN(c.valueOf()))throw TypeError("option expires is invalid");h+="; Expires="+c.toUTCString()}if(o.httpOnly&&(h+="; HttpOnly"),o.secure&&(h+="; Secure"),o.priority)switch("string"==typeof o.priority?o.priority.toLowerCase():o.priority){case"low":h+="; Priority=Low";break;case"medium":h+="; Priority=Medium";break;case"high":h+="; Priority=High";break;default:throw TypeError("option priority is invalid")}if(o.sameSite)switch("string"==typeof o.sameSite?o.sameSite.toLowerCase():o.sameSite){case!0:case"strict":h+="; SameSite=Strict";break;case"lax":h+="; SameSite=Lax";break;case"none":h+="; SameSite=None";break;default:throw TypeError("option sameSite is invalid")}return h};var t=Object.prototype.toString,i=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function r(e){return -1!==e.indexOf("%")?decodeURIComponent(e):e}function s(e){return encodeURIComponent(e)}}},function(){return a||(0,s[t1(s)[0]])((a={exports:{}}).exports,a),a.exports}),t8=t6(t5()),t7=t6(t5());function t9(e,t){let i=new Set(e.map(e=>(0,t7.parse)(e)).reduce((e,i,r)=>(t in i&&e.push(r),e),[]));return e.filter((e,t)=>!i.has(t))}function ie(e){if(!e)throw Error('The "host" request header is not available');let t=Array.isArray(e)?e[0]:e,i=t.indexOf(":")>-1&&t.split(":")[0]||t;return!(["localhost","127.0.0.1"].indexOf(i)>-1||i.endsWith(".local"))}function it(e){if(!e)return null;try{let t=JSON.parse(e);if(!t)return null;if("Object"===t.constructor.name)return t;if("Array"!==t.constructor.name)throw Error(`Unexpected format: ${t.constructor.name}`);let[i,r,s]=t[0].split("."),a=tX(r),{exp:o,sub:n,...l}=JSON.parse(a);return{expires_at:o,expires_in:o-Math.round(Date.now()/1e3),token_type:"bearer",access_token:t[0],refresh_token:t[1],provider_token:t[2],provider_refresh_token:t[3],user:{id:n,factors:t[4],...l}}}catch(e){return console.warn("Failed to parse cookie string:",e),null}}function ii(e){return JSON.stringify([e.access_token,e.refresh_token,e.provider_token,e.provider_refresh_token,e.user.factors])}function ir(e){return Array.isArray(e)?e:[e]}function is(){return"undefined"!=typeof window}function ia({supabaseUrl:e,supabaseKey:t,options:i,cookieOptions:{name:r="supabase-auth-token",domain:s,path:a="/",sameSite:o="lax",secure:n,maxAge:l=31536e6}={}}){return tF(e,t,{...i,auth:{storageKey:r,storage:{getItem(e){if(!is())return null;let t=it((0,t8.parse)(document.cookie)[e]);return t?JSON.stringify(t):null},setItem(e,t){var i;if(!is())return;let r=ii(JSON.parse(t));document.cookie=(0,t8.serialize)(e,r,{domain:s,path:a,maxAge:l,httpOnly:!1,sameSite:o,secure:n??(null==(i=document.location)?void 0:i.protocol)==="https:"})},removeItem(e){is()&&(document.cookie=(0,t8.serialize)(e,"",{domain:s,path:a,expires:new Date(0),httpOnly:!1,sameSite:o,secure:n}))}}}})}function io({supabaseUrl:e,supabaseKey:t,getCookie:i,setCookie:r,getRequestHeader:s,options:a,cookieOptions:{name:o="supabase-auth-token",domain:n,path:l="/",sameSite:h="lax",secure:d,maxAge:c=31536e6}={}}){let u=it(i(o))??null;return tF(e,t,{...a,auth:{detectSessionInUrl:!1,autoRefreshToken:!1,storageKey:o,storage:{getItem:e=>JSON.stringify(u),setItem(e,t){let i=JSON.parse(t),a=ii(i);u=i,r(e,a,{domain:n,path:l,maxAge:c,httpOnly:!1,sameSite:h,secure:d??ie(s("host"))})},removeItem(e){u&&r(e,"",{domain:n,path:l,expires:new Date(0),httpOnly:!1,sameSite:h,secure:d??ie(s("host"))})}}}})}var il=class extends Error{constructor(e,t){super(e),this.errorType=t,this.source="sb_auth_helpers"}toObj(){return{type:this.errorType,message:this.message,source:this.source}}toString(){return JSON.stringify(this.toObj())}},ih=class extends il{constructor(){super("No cookie was found!","cookie_not_found")}},id=class extends il{constructor(){super("Cookies cannot be saved!","cookie_not_saved")}},ic=class extends il{constructor(){super("No access token was found!","cookie_not_found")}},iu=class extends il{constructor(){super("No refresh token was found!","cookie_not_found")}},ip=class extends il{constructor(){super("No provider token was found!","cookie_not_found")}},ig=class extends il{constructor(){super("Not able to parse cookies!","cookie_not_parsed")}},im=class extends il{constructor(e){super(`The request to ${e} failed!`,"callback_url_failed")}},iv=class extends il{constructor(){super("Not able to parse JWT payload!","jwt_payload_failed")}},iy=class extends il{constructor(){super("Invalid jwt!","jwt_invalid")}},iC=t7.parse,iw=t7.serialize},90512:function(e,t,i){"use strict";function r(){for(var e,t,i=0,r="",s=arguments.length;i<s;i++)(e=arguments[i])&&(t=function e(t){var i,r,s="";if("string"==typeof t||"number"==typeof t)s+=t;else if("object"==typeof t){if(Array.isArray(t)){var a=t.length;for(i=0;i<a;i++)t[i]&&(r=e(t[i]))&&(s&&(s+=" "),s+=r)}else for(r in t)t[r]&&(s&&(s+=" "),s+=r)}return s}(e))&&(r&&(r+=" "),r+=t);return r}i.d(t,{W:function(){return r}}),t.Z=r},97582:function(e,t,i){"use strict";i.r(t),i.d(t,{__addDisposableResource:function(){return F},__assign:function(){return a},__asyncDelegator:function(){return E},__asyncGenerator:function(){return M},__asyncValues:function(){return D},__await:function(){return x},__awaiter:function(){return g},__classPrivateFieldGet:function(){return R},__classPrivateFieldIn:function(){return P},__classPrivateFieldSet:function(){return L},__createBinding:function(){return f},__decorate:function(){return n},__disposeResources:function(){return O},__esDecorate:function(){return h},__exportStar:function(){return v},__extends:function(){return s},__generator:function(){return m},__importDefault:function(){return A},__importStar:function(){return T},__makeTemplateObject:function(){return I},__metadata:function(){return p},__param:function(){return l},__propKey:function(){return c},__read:function(){return C},__rest:function(){return o},__runInitializers:function(){return d},__setFunctionName:function(){return u},__spread:function(){return w},__spreadArray:function(){return S},__spreadArrays:function(){return b},__values:function(){return y}});var r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)};function s(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}var a=function(){return(a=Object.assign||function(e){for(var t,i=1,r=arguments.length;i<r;i++)for(var s in t=arguments[i])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)};function o(e,t){var i={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(i[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)0>t.indexOf(r[s])&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(i[r[s]]=e[r[s]]);return i}function n(e,t,i,r){var s,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(o=(a<3?s(o):a>3?s(t,i,o):s(t,i))||o);return a>3&&o&&Object.defineProperty(t,i,o),o}function l(e,t){return function(i,r){t(i,r,e)}}function h(e,t,i,r,s,a){function o(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var n,l=r.kind,h="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?r.static?e:e.prototype:null,c=t||(d?Object.getOwnPropertyDescriptor(d,r.name):{}),u=!1,p=i.length-1;p>=0;p--){var g={};for(var m in r)g[m]="access"===m?{}:r[m];for(var m in r.access)g.access[m]=r.access[m];g.addInitializer=function(e){if(u)throw TypeError("Cannot add initializers after decoration has completed");a.push(o(e||null))};var f=(0,i[p])("accessor"===l?{get:c.get,set:c.set}:c[h],g);if("accessor"===l){if(void 0===f)continue;if(null===f||"object"!=typeof f)throw TypeError("Object expected");(n=o(f.get))&&(c.get=n),(n=o(f.set))&&(c.set=n),(n=o(f.init))&&s.unshift(n)}else(n=o(f))&&("field"===l?s.unshift(n):c[h]=n)}d&&Object.defineProperty(d,r.name,c),u=!0}function d(e,t,i){for(var r=arguments.length>2,s=0;s<t.length;s++)i=r?t[s].call(e,i):t[s].call(e);return r?i:void 0}function c(e){return"symbol"==typeof e?e:"".concat(e)}function u(e,t,i){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:i?"".concat(i," ",t):t})}function p(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function g(e,t,i,r){return new(i||(i=Promise))(function(s,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function n(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?s(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(o,n)}l((r=r.apply(e,t||[])).next())})}function m(e,t){var i,r,s,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=n(0),o.throw=n(1),o.return=n(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function n(n){return function(l){return function(n){if(i)throw TypeError("Generator is already executing.");for(;o&&(o=0,n[0]&&(a=0)),a;)try{if(i=1,r&&(s=2&n[0]?r.return:n[0]?r.throw||((s=r.return)&&s.call(r),0):r.next)&&!(s=s.call(r,n[1])).done)return s;switch(r=0,s&&(n=[2&n[0],s.value]),n[0]){case 0:case 1:s=n;break;case 4:return a.label++,{value:n[1],done:!1};case 5:a.label++,r=n[1],n=[0];continue;case 7:n=a.ops.pop(),a.trys.pop();continue;default:if(!(s=(s=a.trys).length>0&&s[s.length-1])&&(6===n[0]||2===n[0])){a=0;continue}if(3===n[0]&&(!s||n[1]>s[0]&&n[1]<s[3])){a.label=n[1];break}if(6===n[0]&&a.label<s[1]){a.label=s[1],s=n;break}if(s&&a.label<s[2]){a.label=s[2],a.ops.push(n);break}s[2]&&a.ops.pop(),a.trys.pop();continue}n=t.call(e,a)}catch(e){n=[6,e],r=0}finally{i=s=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,l])}}}var f=Object.create?function(e,t,i,r){void 0===r&&(r=i);var s=Object.getOwnPropertyDescriptor(t,i);(!s||("get"in s?!t.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,r,s)}:function(e,t,i,r){void 0===r&&(r=i),e[r]=t[i]};function v(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||f(t,e,i)}function y(e){var t="function"==typeof Symbol&&Symbol.iterator,i=t&&e[t],r=0;if(i)return i.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function C(e,t){var i="function"==typeof Symbol&&e[Symbol.iterator];if(!i)return e;var r,s,a=i.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){s={error:e}}finally{try{r&&!r.done&&(i=a.return)&&i.call(a)}finally{if(s)throw s.error}}return o}function w(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(C(arguments[t]));return e}function b(){for(var e=0,t=0,i=arguments.length;t<i;t++)e+=arguments[t].length;for(var r=Array(e),s=0,t=0;t<i;t++)for(var a=arguments[t],o=0,n=a.length;o<n;o++,s++)r[s]=a[o];return r}function S(e,t,i){if(i||2==arguments.length)for(var r,s=0,a=t.length;s<a;s++)!r&&s in t||(r||(r=Array.prototype.slice.call(t,0,s)),r[s]=t[s]);return e.concat(r||Array.prototype.slice.call(t))}function x(e){return this instanceof x?(this.v=e,this):new x(e)}function M(e,t,i){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var r,s=i.apply(e,t||[]),a=[];return r=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),o("next"),o("throw"),o("return",function(e){return function(t){return Promise.resolve(t).then(e,h)}}),r[Symbol.asyncIterator]=function(){return this},r;function o(e,t){s[e]&&(r[e]=function(t){return new Promise(function(i,r){a.push([e,t,i,r])>1||n(e,t)})},t&&(r[e]=t(r[e])))}function n(e,t){try{var i;(i=s[e](t)).value instanceof x?Promise.resolve(i.value.v).then(l,h):d(a[0][2],i)}catch(e){d(a[0][3],e)}}function l(e){n("next",e)}function h(e){n("throw",e)}function d(e,t){e(t),a.shift(),a.length&&n(a[0][0],a[0][1])}}function E(e){var t,i;return t={},r("next"),r("throw",function(e){throw e}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,s){t[r]=e[r]?function(t){return(i=!i)?{value:x(e[r](t)),done:!1}:s?s(t):t}:s}}function D(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,i=e[Symbol.asyncIterator];return i?i.call(e):(e=y(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(i){t[i]=e[i]&&function(t){return new Promise(function(r,s){!function(e,t,i,r){Promise.resolve(r).then(function(t){e({value:t,done:i})},t)}(r,s,(t=e[i](t)).done,t.value)})}}}function I(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var k=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function T(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)"default"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&f(t,e,i);return k(t,e),t}function A(e){return e&&e.__esModule?e:{default:e}}function R(e,t,i,r){if("a"===i&&!r)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?r:"a"===i?r.call(e):r?r.value:t.get(e)}function L(e,t,i,r,s){if("m"===r)throw TypeError("Private method is not writable");if("a"===r&&!s)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!s:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?s.call(e,i):s?s.value=i:t.set(e,i),i}function P(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function F(e,t,i){if(null!=t){var r,s;if("object"!=typeof t&&"function"!=typeof t)throw TypeError("Object expected.");if(i){if(!Symbol.asyncDispose)throw TypeError("Symbol.asyncDispose is not defined.");r=t[Symbol.asyncDispose]}if(void 0===r){if(!Symbol.dispose)throw TypeError("Symbol.dispose is not defined.");r=t[Symbol.dispose],i&&(s=r)}if("function"!=typeof r)throw TypeError("Object not disposable.");s&&(r=function(){try{s.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:r,async:i})}else i&&e.stack.push({async:!0});return t}var N="function"==typeof SuppressedError?SuppressedError:function(e,t,i){var r=Error(i);return r.name="SuppressedError",r.error=e,r.suppressed=t,r};function O(e){function t(t){e.error=e.hasError?new N(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}var i,r=0;return function s(){for(;i=e.stack.pop();)try{if(!i.async&&1===r)return r=0,e.stack.push(i),Promise.resolve().then(s);if(i.dispose){var a=i.dispose.call(i.value);if(i.async)return r|=2,Promise.resolve(a).then(s,function(e){return t(e),s()})}else r|=1}catch(e){t(e)}if(1===r)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}()}t.default={__extends:s,__assign:a,__rest:o,__decorate:n,__param:l,__metadata:p,__awaiter:g,__generator:m,__createBinding:f,__exportStar:v,__values:y,__read:C,__spread:w,__spreadArrays:b,__spreadArray:S,__await:x,__asyncGenerator:M,__asyncDelegator:E,__asyncValues:D,__makeTemplateObject:I,__importStar:T,__importDefault:A,__classPrivateFieldGet:R,__classPrivateFieldSet:L,__classPrivateFieldIn:P,__addDisposableResource:F,__disposeResources:O}}},function(e){var t=function(t){return e(e.s=t)};e.O(0,[9774,179],function(){return t(80209),t(6840),t(26036)}),_N_E=e.O()}]);