PageSourceSearch

https://app-new-lilac.vercel.app/js/chunk-vendors.58ba0cf4.js

js app-new-lilac.vercel.app collected 2026-10-03 06:06:40 UTC 3,918,205 bytes, 32 lines download raw bytes

1"use strict";(self["webpackChunkpcei_tulcan"]=self["webpackChunkpcei_tulcan"]||[]).push([[4998],{7790:function(e,t,i){i.d(t,{Pb:function(){return Ma}});i(2106),i(8453),i(6895),i(2530),i(6828),i(4289),i(7226),i(2509),i(7763);var n=i(6907),o=function(){return o=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},o.apply(this,arguments)};function r(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))}function s(e,t){var i,n,o,r,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(i)throw new TypeError("Generator is already executing.");for(;s;)try{if(i=1,n&&(o=2&r[0]?n.return:r[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,r[1])).done)return o;switch(n=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return s.label++,{value:r[1],done:!1};case 5:s.label++,n=r[1],r=[0];continue;case 7:r=s.ops.pop(),s.trys.pop();continue;default:if(o=s.trys,!((o=o.length>0&&o[o.length-1])||6!==r[0]&&2!==r[0])){s=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]<o[3])){s.label=r[1];break}if(6===r[0]&&s.label<o[1]){s.label=o[1],o=r;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(r);break}o[2]&&s.ops.pop(),s.trys.pop();continue}r=t.call(e,s)}catch(e){r=[6,e],n=0}finally{i=o=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,a])}}}var a=Symbol("$eartho"),l=function(e,t){return l=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])},l(e,t)};function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}l(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}var u=function(){return u=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},u.apply(this,arguments)};function d(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(i[n[o]]=e[n[o]])}return i}function p(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))}function h(e,t){var i,n,o,r,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(i)throw new TypeError("Generator is already executing.");for(;s;)try{if(i=1,n&&(o=2&r[0]?n.return:r[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,r[1])).done)return o;switch(n=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return s.label++,{value:r[1],done:!1};case 5:s.label++,n=r[1],r=[0];continue;case 7:r=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==r[0]&&2!==r[0])){s=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]<o[3])){s.label=r[1];break}if(6===r[0]&&s.label<o[1]){s.label=o[1],o=r;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(r);break}o[2]&&s.ops.pop(),s.trys.pop();continue}r=t.call(e,s)}catch(e){r=[6,e],n=0}finally{i=o=0}
1if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,a])}}}function f(e,t){var i="function"==typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=r.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(i=r.return)&&i.call(r)}finally{if(o)throw o.error}}return s}function g(e,t,i){if(i||2===arguments.length)for(var n,o=0,r=t.length;o<r;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}var v="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof i.g?i.g:"undefined"!=typeof self?self:{};function y(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function m(e,t){return e(t={exports:{}},t.exports),t.exports}var C,b,w=function(e){return e&&e.Math==Math&&e},S=w("object"==typeof globalThis&&globalThis)||w("object"==typeof window&&window)||w("object"==typeof self&&self)||w("object"==typeof v&&v)||function(){return this}()||Function("return this")(),E=function(e){try{return!!e()}catch(e){return!0}},x=!E((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),O=!E((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),T=Function.prototype.call,D=O?T.bind(T):function(){return T.apply(T,arguments)},R={}.propertyIsEnumerable,A=Object.getOwnPropertyDescriptor,_=A&&!R.call({1:2},1)?function(e){var t=A(this,e);return!!t&&t.enumerable}:R,P={f:_},M=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},k=Function.prototype,N=k.bind,L=k.call,I=O&&N.bind(L,L),F=O?function(e){return e&&I(e)}:function(e){return e&&function(){return L.apply(e,arguments)}},G=F({}.toString),V=F("".slice),B=function(e){return V(G(e),8,-1)},j=Object,H=F("".split),W=E((function(){return!j("z").propertyIsEnumerable(0)}))?function(e){return"String"==B(e)?H(e,""):j(e)}:j,U=TypeError,z=function(e){if(null==e)throw U("Can't call method on "+e);return e},K=function(e){return W(z(e))},Y=function(e){return"function"==typeof e},q=function(e){return"object"==typeof e?null!==e:Y(e)},X=function(e){return Y(e)?e:void 0},$=function(e,t){return arguments.length<2?X(S[e]):S[e]&&S[e][t]},Z=F({}.isPrototypeOf),J=$("navigator","userAgent")||"",Q=S.process,ee=S.Deno,te=Q&&Q.versions||ee&&ee.version,ie=te&&te.v8;ie&&(b=(C=ie.split("."))[0]>0&&C[0]<4?1:+(C[0]+C[1])),!b&&J&&(!(C=J.match(/Edge\/(\d+)/))||C[1]>=74)&&(C=J.match(/Chrome\/(\d+)/))&&(b=+C[1]);var ne=b,oe=!!Object.getOwnPropertySymbols&&!E((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&ne&&ne<41})),re=oe&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,se=Object,ae=re?function(e){return"symbol"==typeof e}:function(e){var t=$("Symbol");return Y(t)&&Z(t.prototype,se(e))},le=String,ce=function(e){try{return le(e)}catch(e){return"Object"}},ue=TypeError,de=function(e){if(Y(e))return e;throw ue(ce(e)+" is not a function")},pe=function(e,t){var i=e[t];return null==i?void 0:de(i)},he=TypeError,fe=Object.defineProperty,ge=function(e,t){try{fe(S,e,{value:t,configurable:!0,writable:!0})}catch(i){S[e]=t}return t},ve=S["__core-js_shared__"]||ge("__core-js_shared__",{}),ye=m((function(e){(e.exports=function(e,t){return ve[e]||(ve[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.23.1",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.23.1/LICENSE",source:"https://github.com/zloirock/core-js"})})),me=Object,Ce=function(e){return me(z(e))},be=F({}.hasOwnProperty),we=Object.hasOwn||function(e,t){return be(Ce(e),t)},Se=0,Ee=Math.random(),xe=F(1..toString),Oe=function(e){return"Symbol("+(void 0===e?"":e)+")_"+xe(++Se+Ee,36)},Te=ye("wks"),De=S.Symbol,Re=De&&De.for,Ae=re?De:De&&De.withoutSetter||Oe,_e=function(e){if(!we(Te,e)||!oe&&"string"!=typeof Te[e]){var t="Symbol."+e;oe&&we(De,e)?Te[e]=De[e]:Te[e]=re&&Re?Re(t):Ae(t)}return Te[e]},Pe=TypeError,Me=_e("toPrimitive"),ke=function(e){var t=function(e,t){if(!q(e)||ae(e))return e;var i,n=pe(e,Me);if(n){if(void 0===t&&(t="default"),i=D(n,e,t),!q(i)||ae(i))return i;throw Pe("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var i,n;if("string"===t&&Y(i=e.toString)&&!q(n=D(i,e)))return n;if(Y(i=e.valueOf)&&!q(n=D(i,e)))return n;if("string"!==t&&Y(i=e.toString)&&!q(n=D(i,e)))return n;throw he("Can't convert object to primitive value")}(e,t)}(e,"string");return ae(t)?t:t+""},Ne=S.document,Le=q(Ne)&&q(Ne.createElement),Ie=function(e){return Le?Ne.createElement(e):{}},Fe=!x&&!E((function(){return 7!=Object.defineProperty(Ie("div"),"a",{get:function(){return 7}}).a})),Ge=Object.getOwnPropertyDescriptor,Ve={f:x?Ge:function(e,t){if(e=K(e),t=ke(t),Fe)try{return Ge(e,t)}catch(e){}if(we(e,t))return M(!D(P.f,e,t),e[t])}},Be=x&&E((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),je=String,He=TypeError,We=function(e){if(q(e))return e;throw He(je(e)+" is not an object")},Ue=TypeError,ze=Object.defineProperty,Ke=Object.getOwnPropertyDescriptor,Ye={f:x?Be?function(e,t,i){if(We(e),t=ke(t),We(i),"function"==typeof e&&"prototype"===t&&"value"in i&&"writable"in i&&!i.writable){var n=Ke(e,t);n&&n.writable&&(e[t]=i.value,i={configurable:"configurable"in i?i.configurable:n.configurable,enumerable:"enumerable"in i?i.enumerable:n.enumerable,writable:!1})}return ze(e,t,i)}:ze:function(e,t,i){if(We(e),t=ke(t),We(i),Fe)try{return ze(e,t,i)}catch(e){}
vendor: 4,074 bytes, line 1
1if("get"in i||"set"in i)throw Ue("Accessors not supported");return"value"in i&&(e[t]=i.value),e}},qe=x?function(e,t,i){return Ye.f(e,t,M(1,i))}:function(e,t,i){return e[t]=i,e},Xe=Function.prototype,$e=x&&Object.getOwnPropertyDescriptor,Ze=we(Xe,"name"),Je={EXISTS:Ze,PROPER:Ze&&"something"===function(){}.name,CONFIGURABLE:Ze&&(!x||x&&$e(Xe,"name").configurable)},Qe=F(Function.toString);Y(ve.inspectSource)||(ve.inspectSource=function(e){return Qe(e)});var et,tt,it,nt=ve.inspectSource,ot=S.WeakMap,rt=Y(ot)&&/native code/.test(nt(ot)),st=ye("keys"),at=function(e){return st[e]||(st[e]=Oe(e))},lt={},ct=S.TypeError,ut=S.WeakMap;if(rt||ve.state){var dt=ve.state||(ve.state=new ut),pt=F(dt.get),ht=F(dt.has),ft=F(dt.set);et=function(e,t){if(ht(dt,e))throw new ct("Object already initialized");return t.facade=e,ft(dt,e,t),t},tt=function(e){return pt(dt,e)||{}},it=function(e){return ht(dt,e)}}else{var gt=at("state");lt[gt]=!0,et=function(e,t){if(we(e,gt))throw new ct("Object already initialized");return t.facade=e,qe(e,gt,t),t},tt=function(e){return we(e,gt)?e[gt]:{}},it=function(e){return we(e,gt)}}var vt={set:et,get:tt,has:it,enforce:function(e){return it(e)?tt(e):et(e,{})},getterFor:function(e){return function(t){var i;if(!q(t)||(i=tt(t)).type!==e)throw ct("Incompatible receiver, "+e+" required");return i}}},yt=m((function(e){var t=Je.CONFIGURABLE,i=vt.enforce,n=vt.get,o=Object.defineProperty,r=x&&!E((function(){return 8!==o((function(){}),"length",{value:8}).length})),s=String(String).split("String"),a=e.exports=function(e,n,a){"Symbol("===String(n).slice(0,7)&&(n="["+String(n).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),a&&a.getter&&(n="get "+n),a&&a.setter&&(n="set "+n),(!we(e,"name")||t&&e.name!==n)&&o(e,"name",{value:n,configurable:!0}),r&&a&&we(a,"arity")&&e.length!==a.arity&&o(e,"length",{value:a.arity});try{a&&we(a,"constructor")&&a.constructor?x&&o(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var l=i(e);return we(l,"source")||(l.source=s.join("string"==typeof n?n:"")),e};Function.prototype.toString=a((function(){return Y(this)&&n(this).source||nt(this)}),"toString")})),mt=function(e,t,i,n){n||(n={});var o=n.enumerable,r=void 0!==n.name?n.name:t;return Y(i)&&yt(i,r,n),n.global?o?e[t]=i:ge(t,i):(n.unsafe?e[t]&&(o=!0):delete e[t],o?e[t]=i:Ye.f(e,t,{value:i,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})),e},Ct=Math.ceil,bt=Math.floor,wt=Math.trunc||function(e){var t=+e;return(t>0?bt:Ct)(t)},St=function(e){var t=+e;return t!=t||0===t?0:wt(t)},Et=Math.max,xt=Math.min,Ot=function(e,t){var i=St(e);return i<0?Et(i+t,0):xt(i,t)},Tt=Math.min,Dt=function(e){return e>0?Tt(St(e),9007199254740991):0},Rt=function(e){return Dt(e.length)},At=function(e){return function(t,i,n){var o,r=K(t),s=Rt(r),a=Ot(n,s);if(e&&i!=i){for(;s>a;)if((o=r[a++])!=o)return!0}else for(;s>a;a++)if((e||a in r)&&r[a]===i)return e||a||0;return!e&&-1}},_t={includes:At(!0),indexOf:At(!1)},Pt=_t.indexOf,Mt=F([].push),kt=function(e,t){var i,n=K(e),o=0,r=[];for(i in n)!we(lt,i)&&we(n,i)&&Mt(r,i);for(;t.length>o;)we(n,i=t[o++])&&(~Pt(r,i)||Mt(r,i));return r},Nt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Lt=Nt.concat("length","prototype"),It={f:Object.getOwnPropertyNames||function(e){return kt(e,Lt)}},Ft={f:Object.getOwnPropertySymbols},Gt=F([].concat),Vt=$("Reflect","ownKeys")||function(e){var t=It.f(We(e)),i=Ft.f;return i?Gt(t,i(e)):t},Bt=function(e,t,i){for(var n=Vt(t),o=Ye.f,r=Ve.f,s=0;s<n.length;s++){var a=n[s];we(e,a)||i&&we(i,a)||o(e,a,r(t,a))}},jt=/#|\.prototype\./,Ht=function(e,t){var i=Ut[Wt(e)];return i==Kt||i!=zt&&(Y(t)?E(t):!!t)},Wt=Ht.normalize=function(e){return String(e).replace(jt,".").toLowerCase()},Ut=Ht.data={},zt=Ht.NATIVE="N",Kt=Ht.POLYFILL="P",Yt=Ht,qt=Ve.f,Xt=function(e,t){var i,n,o,r,s,a=e.target,l=e.global,c=e.stat;if(i=l?S:c?S[a]||ge(a,{}):(S[a]||{}).prototype)for(n in t){if(r=t[n],o=e.dontCallGetSet?(s=qt(i,n))&&s.value:i[n],!Yt(l?n:a+(c?".":"#")+n,e.forced)&&void 0!==o){if(typeof r==typeof o)continue;Bt(r,o)}
vendor: 4,264 bytes, line 1
1(e.sham||o&&o.sham)&&qe(r,"sham",!0),mt(i,n,r,e)}},$t={};$t[_e("toStringTag")]="z";var Zt,Jt="[object z]"===String($t),Qt=_e("toStringTag"),ei=Object,ti="Arguments"==B(function(){return arguments}()),ii=Jt?B:function(e){var t,i,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(i=function(e,t){try{return e[t]}catch(e){}}(t=ei(e),Qt))?i:ti?B(t):"Object"==(n=B(t))&&Y(t.callee)?"Arguments":n},ni=String,oi=function(e){if("Symbol"===ii(e))throw TypeError("Cannot convert a Symbol value to a string");return ni(e)},ri=_e("match"),si=TypeError,ai=function(e){if(function(e){var t;return q(e)&&(void 0!==(t=e[ri])?!!t:"RegExp"==B(e))}(e))throw si("The method doesn't accept regular expressions");return e},li=_e("match"),ci=function(e){var t=/./;try{"/./"[e](t)}catch(i){try{return t[li]=!1,"/./"[e](t)}catch(e){}}return!1},ui=Ve.f,di=F("".startsWith),pi=F("".slice),hi=Math.min,fi=ci("startsWith"),gi=!(fi||(Zt=ui(String.prototype,"startsWith"),!Zt||Zt.writable));Xt({target:"String",proto:!0,forced:!gi&&!fi},{startsWith:function(e){var t=oi(z(this));ai(e);var i=Dt(hi(arguments.length>1?arguments[1]:void 0,t.length)),n=oi(e);return di?di(t,n,i):pi(t,i,i+n.length)===n}});var vi=function(e,t){return F(S[e].prototype[t])};vi("String","startsWith");var yi=Array.isArray||function(e){return"Array"==B(e)},mi=TypeError,Ci=function(e){if(e>9007199254740991)throw mi("Maximum allowed index exceeded");return e},bi=function(e,t,i){var n=ke(t);n in e?Ye.f(e,n,M(0,i)):e[n]=i},wi=function(){},Si=[],Ei=$("Reflect","construct"),xi=/^\s*(?:class|function)\b/,Oi=F(xi.exec),Ti=!xi.exec(wi),Di=function(e){if(!Y(e))return!1;try{return Ei(wi,Si,e),!0}catch(e){return!1}},Ri=function(e){if(!Y(e))return!1;switch(ii(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Ti||!!Oi(xi,nt(e))}catch(e){return!0}};Ri.sham=!0;var Ai=!Ei||E((function(){var e;return Di(Di.call)||!Di(Object)||!Di((function(){e=!0}))||e}))?Ri:Di,_i=_e("species"),Pi=Array,Mi=function(e,t){return new(function(e){var t;return yi(e)&&(t=e.constructor,(Ai(t)&&(t===Pi||yi(t.prototype))||q(t)&&null===(t=t[_i]))&&(t=void 0)),void 0===t?Pi:t}(e))(0===t?0:t)},ki=_e("species"),Ni=_e("isConcatSpreadable"),Li=ne>=51||!E((function(){var e=[];return e[Ni]=!1,e.concat()[0]!==e})),Ii=ne>=51||!E((function(){var e=[];return(e.constructor={})[ki]=function(){return{foo:1}},1!==e.concat(Boolean).foo})),Fi=function(e){if(!q(e))return!1;var t=e[Ni];return void 0!==t?!!t:yi(e)};Xt({target:"Array",proto:!0,arity:1,forced:!Li||!Ii},{concat:function(e){var t,i,n,o,r,s=Ce(this),a=Mi(s,0),l=0;for(t=-1,n=arguments.length;t<n;t++)if(Fi(r=-1===t?s:arguments[t]))for(o=Rt(r),Ci(l+o),i=0;i<o;i++,l++)i in r&&bi(a,l,r[i]);else Ci(l+1),bi(a,l++,r);return a.length=l,a}});var Gi=Jt?{}.toString:function(){return"[object "+ii(this)+"]"};Jt||mt(Object.prototype,"toString",Gi,{unsafe:!0});var Vi,Bi=Object.keys||function(e){return kt(e,Nt)},ji=x&&!Be?Object.defineProperties:function(e,t){We(e);for(var i,n=K(t),o=Bi(t),r=o.length,s=0;r>s;)Ye.f(e,i=o[s++],n[i]);return e},Hi={f:ji},Wi=$("document","documentElement"),Ui=at("IE_PROTO"),zi=function(){},Ki=function(e){return"<script>"+e+"<\/script>"},Yi=function(e){e.write(Ki("")),e.close();var t=e.parentWindow.Object;return e=null,t},qi=function(){try{Vi=new ActiveXObject("htmlfile")}catch(e){}var e,t;qi="undefined"!=typeof document?document.domain&&Vi?Yi(Vi):((t=Ie("iframe")).style.display="none",Wi.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(Ki("document.F=Object")),e.close(),e.F):Yi(Vi);for(var i=Nt.length;i--;)delete qi.prototype[Nt[i]];return qi()};lt[Ui]=!0;var Xi=Object.create||function(e,t){var i;return null!==e?(zi.prototype=We(e),i=new zi,zi.prototype=null,i[Ui]=e):i=qi(),void 0===t?i:Hi.f(i,t)},$i=Array,Zi=Math.max,Ji=It.f,Qi="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],en={f:function(e){return Qi&&"Window"==B(e)?function(e){try{return Ji(e)}catch(e){return function(e,t,i){for(var n=Rt(e),o=Ot(void 0,n),r=Ot(n,n),s=$i(Zi(r-o,0)),a=0;o<r;o++,a++)bi(s,a,e[o]);return s.length=a,s}(Qi)}}(e):Ji(K(e))}},tn={f:_e},nn=S,on=Ye.f,rn=function(e){var t=nn.Symbol||(nn.Symbol={});we(t,e)||on(t,e,{value:tn.f(e)})}
vendor: 4,171 bytes, line 1
1,sn=function(){var e=$("Symbol"),t=e&&e.prototype,i=t&&t.valueOf,n=_e("toPrimitive");t&&!t[n]&&mt(t,n,(function(e){return D(i,this)}),{arity:1})},an=Ye.f,ln=_e("toStringTag"),cn=function(e,t,i){e&&!i&&(e=e.prototype),e&&!we(e,ln)&&an(e,ln,{configurable:!0,value:t})},un=F(F.bind),dn=function(e,t){return de(e),void 0===t?e:O?un(e,t):function(){return e.apply(t,arguments)}},pn=F([].push),hn=function(e){var t=1==e,i=2==e,n=3==e,o=4==e,r=6==e,s=7==e,a=5==e||r;return function(l,c,u,d){for(var p,h,f=Ce(l),g=W(f),v=dn(c,u),y=Rt(g),m=0,C=d||Mi,b=t?C(l,y):i||s?C(l,0):void 0;y>m;m++)if((a||m in g)&&(h=v(p=g[m],m,f),e))if(t)b[m]=h;else if(h)switch(e){case 3:return!0;case 5:return p;case 6:return m;case 2:pn(b,p)}else switch(e){case 4:return!1;case 7:pn(b,p)}return r?-1:n||o?o:b}},fn=[hn(0),hn(1),hn(2),hn(3),hn(4),hn(5),hn(6),hn(7)][0],gn=at("hidden"),vn=vt.set,yn=vt.getterFor("Symbol"),mn=Object.prototype,Cn=S.Symbol,bn=Cn&&Cn.prototype,wn=S.TypeError,Sn=S.QObject,En=Ve.f,xn=Ye.f,On=en.f,Tn=P.f,Dn=F([].push),Rn=ye("symbols"),An=ye("op-symbols"),_n=ye("wks"),Pn=!Sn||!Sn.prototype||!Sn.prototype.findChild,Mn=x&&E((function(){return 7!=Xi(xn({},"a",{get:function(){return xn(this,"a",{value:7}).a}})).a}))?function(e,t,i){var n=En(mn,t);n&&delete mn[t],xn(e,t,i),n&&e!==mn&&xn(mn,t,n)}:xn,kn=function(e,t){var i=Rn[e]=Xi(bn);return vn(i,{type:"Symbol",tag:e,description:t}),x||(i.description=t),i},Nn=function(e,t,i){e===mn&&Nn(An,t,i),We(e);var n=ke(t);return We(i),we(Rn,n)?(i.enumerable?(we(e,gn)&&e[gn][n]&&(e[gn][n]=!1),i=Xi(i,{enumerable:M(0,!1)})):(we(e,gn)||xn(e,gn,M(1,{})),e[gn][n]=!0),Mn(e,n,i)):xn(e,n,i)},Ln=function(e,t){We(e);var i=K(t),n=Bi(i).concat(Vn(i));return fn(n,(function(t){x&&!D(In,i,t)||Nn(e,t,i[t])})),e},In=function(e){var t=ke(e),i=D(Tn,this,t);return!(this===mn&&we(Rn,t)&&!we(An,t))&&(!(i||!we(this,t)||!we(Rn,t)||we(this,gn)&&this[gn][t])||i)},Fn=function(e,t){var i=K(e),n=ke(t);if(i!==mn||!we(Rn,n)||we(An,n)){var o=En(i,n);return!o||!we(Rn,n)||we(i,gn)&&i[gn][n]||(o.enumerable=!0),o}},Gn=function(e){var t=On(K(e)),i=[];return fn(t,(function(e){we(Rn,e)||we(lt,e)||Dn(i,e)})),i},Vn=function(e){var t=e===mn,i=On(t?An:K(e)),n=[];return fn(i,(function(e){!we(Rn,e)||t&&!we(mn,e)||Dn(n,Rn[e])})),n};oe||(bn=(Cn=function(){if(Z(bn,this))throw wn("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?oi(arguments[0]):void 0,t=Oe(e),i=function(e){this===mn&&D(i,An,e),we(this,gn)&&we(this[gn],t)&&(this[gn][t]=!1),Mn(this,t,M(1,e))};return x&&Pn&&Mn(mn,t,{configurable:!0,set:i}),kn(t,e)}).prototype,mt(bn,"toString",(function(){return yn(this).tag})),mt(Cn,"withoutSetter",(function(e){return kn(Oe(e),e)})),P.f=In,Ye.f=Nn,Hi.f=Ln,Ve.f=Fn,It.f=en.f=Gn,Ft.f=Vn,tn.f=function(e){return kn(_e(e),e)},x&&(xn(bn,"description",{configurable:!0,get:function(){return yn(this).description}}),mt(mn,"propertyIsEnumerable",In,{unsafe:!0}))),Xt({global:!0,constructor:!0,wrap:!0,forced:!oe,sham:!oe},{Symbol:Cn}),fn(Bi(_n),(function(e){rn(e)})),Xt({target:"Symbol",stat:!0,forced:!oe},{useSetter:function(){Pn=!0},useSimple:function(){Pn=!1}}),Xt({target:"Object",stat:!0,forced:!oe,sham:!x},{create:function(e,t){return void 0===t?Xi(e):Ln(Xi(e),t)},defineProperty:Nn,defineProperties:Ln,getOwnPropertyDescriptor:Fn}),Xt({target:"Object",stat:!0,forced:!oe},{getOwnPropertyNames:Gn}),sn(),cn(Cn,"Symbol"),lt[gn]=!0;var Bn=oe&&!!Symbol.for&&!!Symbol.keyFor,jn=ye("string-to-symbol-registry"),Hn=ye("symbol-to-string-registry");Xt({target:"Symbol",stat:!0,forced:!Bn},{for:function(e){var t=oi(e);if(we(jn,t))return jn[t];var i=$("Symbol")(t);return jn[t]=i,Hn[i]=t,i}});var Wn=ye("symbol-to-string-registry");Xt({target:"Symbol",stat:!0,forced:!Bn},{keyFor:function(e){if(!ae(e))throw TypeError(ce(e)+" is not a symbol");if(we(Wn,e))return Wn[e]}});var Un=Function.prototype,zn=Un.apply,Kn=Un.call,Yn="object"==typeof Reflect&&Reflect.apply||(O?Kn.bind(zn):function(){return Kn.apply(zn,arguments)}),qn=F([].slice),Xn=$("JSON","stringify"),$n=F(/./.exec),Zn=F("".charAt),Jn=F("".charCodeAt),Qn=F("".replace),eo=F(1..toString),to=/[\uD800-\uDFFF]/g,io=/^[\uD800-\uDBFF]$/,no=/^[\uDC00-\uDFFF]$/,oo=!oe||E((function(){var e=$
vendor: 9,220 bytes, line 1
1("Symbol")();return"[null]"!=Xn([e])||"{}"!=Xn({a:e})||"{}"!=Xn(Object(e))})),ro=E((function(){return'"\\udf06\\ud834"'!==Xn("\udf06\ud834")||'"\\udead"'!==Xn("\udead")})),so=function(e,t){var i=qn(arguments),n=t;if((q(t)||void 0!==e)&&!ae(e))return yi(t)||(t=function(e,t){if(Y(n)&&(t=D(n,this,e,t)),!ae(t))return t}),i[1]=t,Yn(Xn,null,i)},ao=function(e,t,i){var n=Zn(i,t-1),o=Zn(i,t+1);return $n(io,e)&&!$n(no,o)||$n(no,e)&&!$n(io,n)?"\\u"+eo(Jn(e,0),16):e};Xn&&Xt({target:"JSON",stat:!0,arity:3,forced:oo||ro},{stringify:function(e,t,i){var n=qn(arguments),o=Yn(oo?so:Xn,null,n);return ro&&"string"==typeof o?Qn(o,to,ao):o}});var lo=!oe||E((function(){Ft.f(1)}));Xt({target:"Object",stat:!0,forced:lo},{getOwnPropertySymbols:function(e){var t=Ft.f;return t?t(Ce(e)):[]}}),rn("asyncIterator");var co=Ye.f,uo=S.Symbol,po=uo&&uo.prototype;if(x&&Y(uo)&&(!("description"in po)||void 0!==uo().description)){var ho={},fo=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:oi(arguments[0]),t=Z(po,this)?new uo(e):void 0===e?uo():uo(e);return""===e&&(ho[t]=!0),t};Bt(fo,uo),fo.prototype=po,po.constructor=fo;var go="Symbol(test)"==String(uo("test")),vo=F(po.toString),yo=F(po.valueOf),mo=/^Symbol\((.*)\)[^)]+$/,Co=F("".replace),bo=F("".slice);co(po,"description",{configurable:!0,get:function(){var e=yo(this),t=vo(e);if(we(ho,e))return"";var i=go?bo(t,7,-1):Co(t,mo,"$1");return""===i?void 0:i}}),Xt({global:!0,constructor:!0,forced:!0},{Symbol:fo})}rn("hasInstance"),rn("isConcatSpreadable"),rn("iterator"),rn("match"),rn("matchAll"),rn("replace"),rn("search"),rn("species"),rn("split"),rn("toPrimitive"),sn(),rn("toStringTag"),cn($("Symbol"),"Symbol"),rn("unscopables"),cn(S.JSON,"JSON",!0),cn(Math,"Math",!0),Xt({global:!0},{Reflect:{}}),cn(S.Reflect,"Reflect",!0),nn.Symbol;var wo,So,Eo,xo=F("".charAt),Oo=F("".charCodeAt),To=F("".slice),Do=function(e){return function(t,i){var n,o,r=oi(z(t)),s=St(i),a=r.length;return s<0||s>=a?e?"":void 0:(n=Oo(r,s))<55296||n>56319||s+1===a||(o=Oo(r,s+1))<56320||o>57343?e?xo(r,s):n:e?To(r,s,s+2):o-56320+(n-55296<<10)+65536}},Ro={codeAt:Do(!1),charAt:Do(!0)},Ao=!E((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),_o=at("IE_PROTO"),Po=Object,Mo=Po.prototype,ko=Ao?Po.getPrototypeOf:function(e){var t=Ce(e);if(we(t,_o))return t[_o];var i=t.constructor;return Y(i)&&t instanceof i?i.prototype:t instanceof Po?Mo:null},No=_e("iterator"),Lo=!1;[].keys&&("next"in(Eo=[].keys())?(So=ko(ko(Eo)))!==Object.prototype&&(wo=So):Lo=!0);var Io=null==wo||E((function(){var e={};return wo[No].call(e)!==e}));Io&&(wo={}),Y(wo[No])||mt(wo,No,(function(){return this}));var Fo={IteratorPrototype:wo,BUGGY_SAFARI_ITERATORS:Lo},Go={},Vo=Fo.IteratorPrototype,Bo=function(){return this},jo=String,Ho=TypeError,Wo=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,i={};try{(e=F(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(i,[]),t=i instanceof Array}catch(e){}return function(i,n){return We(i),function(e){if("object"==typeof e||Y(e))return e;throw Ho("Can't set "+jo(e)+" as a prototype")}(n),t?e(i,n):i.__proto__=n,i}}():void 0),Uo=Je.PROPER,zo=Je.CONFIGURABLE,Ko=Fo.IteratorPrototype,Yo=Fo.BUGGY_SAFARI_ITERATORS,qo=_e("iterator"),Xo=function(){return this},$o=function(e,t,i,n,o,r,s){!function(e,t,i,n){var o=t+" Iterator";e.prototype=Xi(Vo,{next:M(1,i)}),cn(e,o,!1),Go[o]=Bo}(i,t,n);var a,l,c,u=function(e){if(e===o&&g)return g;if(!Yo&&e in h)return h[e];switch(e){case"keys":case"values":case"entries":return function(){return new i(this,e)}}return function(){return new i(this)}},d=t+" Iterator",p=!1,h=e.prototype,f=h[qo]||h["@@iterator"]||o&&h[o],g=!Yo&&f||u(o),v="Array"==t&&h.entries||f;if(v&&(a=ko(v.call(new e)))!==Object.prototype&&a.next&&(ko(a)!==Ko&&(Wo?Wo(a,Ko):Y(a[qo])||mt(a,qo,Xo)),cn(a,d,!0)),Uo&&"values"==o&&f&&"values"!==f.name&&(zo?qe(h,"name","values"):(p=!0,g=function(){return D(f,this)})),o)if(l={values:u("values"),keys:r?g:u("keys"),entries:u("entries")},s)for(c in l)(Yo||p||!(c in h))&&mt(h,c,l[c]);else Xt({target:t,proto:!0,forced:Yo||p},l);return h[qo]!==g&&mt(h,qo,g,{name:o}),Go[t]=g,l},Zo=Ro.charAt,Jo=vt.set,Qo=vt.getterFor("String Iterator");$o(String,"String",(function(e){Jo(this,{type:"String Iterator",string:oi(e),index:0})}),(function(){var e,t=Qo(this),i=t.string,n=t.index;return n>=i.length?{value:void 0,done:!0}:(e=Zo(i,n),t.index+=e.length,{value:e,done:!1})}));var er=function(e,t,i){var n,o;We(e);try{if(!(n=pe(e,"return"))){if("throw"===t)throw i;return i}n=D(n,e)}catch(e){o=!0,n=e}if("throw"===t)throw i;if(o)throw n;return We(n),i},tr=function(e,t,i,n){try{return n?t(We(i)[0],i[1]):t(i)}catch(t){er(e,"throw",t)}},ir=_e("iterator"),nr=Array.prototype,or=function(e){return void 0!==e&&(Go.Array===e||nr[ir]===e)},rr=_e("iterator"),sr=function(e){if(null!=e)return pe(e,rr)||pe(e,"@@iterator")||Go[ii(e)]},ar=TypeError,lr=function(e,t){var i=arguments.length<2?sr(e):t;if(de(i))return We(D(i,e));throw ar(ce(e)+" is not iterable")},cr=Array,ur=_e("iterator"),dr=!1;try{var pr=0,hr={next:function(){return{done:!!pr++}},return:function(){dr=!0}};hr[ur]=function(){return this},Array.from(hr,(function(){throw 2}))}catch(l){}var fr=function(e,t){if(!t&&!dr)return!1;var i=!1;try{var n={};n[ur]=function(){return{next:function(){return{done:i=!0}}}},e(n)}catch(e){}return i},gr=!fr((function(e){Array.from(e)}));Xt({target:"Array",stat:!0,forced:gr},{from:function(e){var t=Ce(e),i=Ai(this),n=arguments.length,o=n>1?arguments[1]:void 0,r=void 0!==o;r&&(o=dn(o,n>2?arguments[2]:void 0));var s,a,l,c,u,d,p=sr(t),h=0;if(!p||this===cr&&or(p))for(s=Rt(t),a=i?new this(s):cr(s);s>h;h++)d=r?o(t[h],h):t[h],bi(a,h,d);else for(u=(c=lr(t,p)).next,a=i?new this:[];!(l=D(u,c)).done;h++)d=r?tr(c,o,[l.value,h],!0):l.value,bi(a,h,d);return a.length=h,a}}),nn.Array.from;var vr,yr,mr,Cr="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView,br=Ye.f,wr=S.Int8Array,Sr=wr&&wr.prototype,Er=S.Uint8ClampedArray,xr=Er&&Er.prototype,Or=wr&&ko(wr),Tr=Sr&&ko(Sr),Dr=Object.prototype,Rr=S.TypeError,Ar=_e("toStringTag"),_r=Oe("TYPED_ARRAY_TAG"),Pr=Oe("TYPED_ARRAY_CONSTRUCTOR"),Mr=Cr&&!!Wo&&"Opera"!==ii(S.opera),kr=!1,Nr={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},Lr={BigInt64Array:8,BigUint64Array:8},Ir=function(e){if(!q(e))return!1;var t=ii(e);return we(Nr,t)||we(Lr,t)};for(vr in Nr)(mr=(yr=S[vr])&&yr.prototype)?qe(mr,Pr,yr):Mr=!1;for(vr in Lr)(mr=(yr=S[vr])&&yr.prototype)&&qe(mr,Pr,yr);if((!Mr||!Y(Or)||Or===Function.prototype)&&(Or=function(){throw Rr("Incorrect invocation")},Mr))for(vr in Nr)S[vr]&&Wo(S[vr],Or);if((!Mr||!Tr||Tr===Dr)&&(Tr=Or.prototype,Mr))for(vr in Nr)S[vr]&&Wo(S[vr].prototype,Tr);if(Mr&&ko(xr)!==Tr&&Wo(xr,Tr),x&&!we(Tr,Ar))for(vr in kr=!0,br(Tr,Ar,{get:function(){return q(this)?this[_r]:void 0}}),Nr)S[vr]&&qe(S[vr],_r,vr);var Fr={NATIVE_ARRAY_BUFFER_VIEWS:Mr,TYPED_ARRAY_CONSTRUCTOR:Pr,TYPED_ARRAY_TAG:kr&&_r,aTypedArray:function(e){if(Ir(e))return e;throw Rr("Target is not a typed array")},aTypedArrayConstructor:function(e){if(Y(e)&&(!Wo||Z(Or,e)))return e;throw Rr(ce(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,i,n){if(x){if(i)for(var o in Nr){var r=S[o];if(r&&we(r.prototype,e))try{delete r.prototype[e]}catch(i){try{r.prototype[e]=t}catch(e){}}}Tr[e]&&!i||mt(Tr,e,i?t:Mr&&Sr[e]||t,n)}},exportTypedArrayStaticMethod:function(e,t,i){var n,o;if(x){if(Wo){if(i)for(n in Nr)if((o=S[n])&&we(o,e))try{delete o[e]}catch(e){}if(Or[e]&&!i)return;try{return mt(Or,e,i?t:Mr&&Or[e]||t)}catch(e){}}for(n in Nr)!(o=S[n])||o[e]&&!i||mt(o,e,t)}},isView:function(e){if(!q(e))return!1;var t=ii(e);return"DataView"===t||we(Nr,t)||we(Lr,t)},isTypedArray:Ir,TypedArray:Or,TypedArrayPrototype:Tr},Gr=TypeError,Vr=_e("species"),Br=Fr.TYPED_ARRAY_CONSTRUCTOR,jr=Fr.aTypedArrayConstructor,Hr=Fr.aTypedArray;(0,Fr.exportTypedArrayMethod)("slice",(function(e,t){for(var i=qn(Hr(this),e,t),n=jr(function(e,t){var i,n=We(e).constructor;return void 0===n||null==(i=We(n)[Vr])?t:function(e){if(Ai(e))return e;throw Gr(ce(e)+" is not a constructor")}(i)}(this,this[Br])),o=0,r=i.length,s=new n(r);r>o;)s[o]=i[o++];return s}),E((function(){new Int8Array(1).slice()})));var Wr=Ye.f,Ur=_e("unscopables"),zr=Array.prototype;null==zr[Ur]&&Wr(zr,Ur,{configurable:!0,value:Xi(null)});var Kr=function(e){zr[Ur][e]=!0},Yr=_t.includes,qr=E((function(){return!Array(1).includes()}));Xt({target:"Array",proto:!0,forced:qr},{includes:function(e){return Yr(this,e,arguments.length>1?arguments[1]:void 0)}}),Kr("includes"),vi("Array","includes");var Xr=F("".indexOf);Xt({target:"String",proto:!0,forced:!ci("includes")},{includes:function(e){return!!~Xr(oi(z(this)),oi(ai(e)),arguments.length>1?arguments[1]:void 0)}}),vi("String","includes");var $r=Ye.f,Zr=vt.set,Jr=vt.getterFor("Array Iterator");$o(Array,"Array",(function(e,t){Zr(this,{type:"Array Iterator",target:K(e),index:0,kind:t})}),(function(){var e=Jr(this),t=e.target,i=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==i?{value:n,done:!1}:"values"==i?{value:t[n],done:!1}:{value:[n,t[n]],done:!1}}),"values");var Qr=Go.Arguments=Go.Array;
vendor: 4,415 bytes, line 1
1if(Kr("keys"),Kr("values"),Kr("entries"),x&&"values"!==Qr.name)try{$r(Qr,"name",{value:"values"})}catch(l){}var es=E((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),ts=Object.isExtensible,is=E((function(){ts(1)}))||es?function(e){return!!q(e)&&(!es||"ArrayBuffer"!=B(e))&&(!ts||ts(e))}:ts,ns=!E((function(){return Object.isExtensible(Object.preventExtensions({}))})),os=m((function(e){var t=Ye.f,i=!1,n=Oe("meta"),o=0,r=function(e){t(e,n,{value:{objectID:"O"+o++,weakData:{}}})},s=e.exports={enable:function(){s.enable=function(){},i=!0;var e=It.f,t=F([].splice),o={};o[n]=1,e(o).length&&(It.f=function(i){for(var o=e(i),r=0,s=o.length;r<s;r++)if(o[r]===n){t(o,r,1);break}return o},Xt({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:en.f}))},fastKey:function(e,t){if(!q(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!we(e,n)){if(!is(e))return"F";if(!t)return"E";r(e)}return e[n].objectID},getWeakData:function(e,t){if(!we(e,n)){if(!is(e))return!0;if(!t)return!1;r(e)}return e[n].weakData},onFreeze:function(e){return ns&&i&&is(e)&&!we(e,n)&&r(e),e}};lt[n]=!0}));os.enable,os.fastKey,os.getWeakData,os.onFreeze;var rs=TypeError,ss=function(e,t){this.stopped=e,this.result=t},as=ss.prototype,ls=function(e,t,i){var n,o,r,s,a,l,c,u=i&&i.that,d=!(!i||!i.AS_ENTRIES),p=!(!i||!i.IS_ITERATOR),h=!(!i||!i.INTERRUPTED),f=dn(t,u),g=function(e){return n&&er(n,"normal",e),new ss(!0,e)},v=function(e){return d?(We(e),h?f(e[0],e[1],g):f(e[0],e[1])):h?f(e,g):f(e)};if(p)n=e;else{if(!(o=sr(e)))throw rs(ce(e)+" is not iterable");if(or(o)){for(r=0,s=Rt(e);s>r;r++)if((a=v(e[r]))&&Z(as,a))return a;return new ss(!1)}n=lr(e,o)}for(l=n.next;!(c=D(l,n)).done;){try{a=v(c.value)}catch(e){er(n,"throw",e)}if("object"==typeof a&&a&&Z(as,a))return a}return new ss(!1)},cs=TypeError,us=function(e,t){if(Z(t,e))return e;throw cs("Incorrect invocation")},ds=function(e,t,i){for(var n in t)mt(e,n,t[n],i);return e},ps=_e("species"),hs=Ye.f,fs=os.fastKey,gs=vt.set,vs=vt.getterFor,ys={getConstructor:function(e,t,i,n){var o=e((function(e,o){us(e,r),gs(e,{type:t,index:Xi(null),first:void 0,last:void 0,size:0}),x||(e.size=0),null!=o&&ls(o,e[n],{that:e,AS_ENTRIES:i})})),r=o.prototype,s=vs(t),a=function(e,t,i){var n,o,r=s(e),a=l(e,t);return a?a.value=i:(r.last=a={index:o=fs(t,!0),key:t,value:i,previous:n=r.last,next:void 0,removed:!1},r.first||(r.first=a),n&&(n.next=a),x?r.size++:e.size++,"F"!==o&&(r.index[o]=a)),e},l=function(e,t){var i,n=s(e),o=fs(t);if("F"!==o)return n.index[o];for(i=n.first;i;i=i.next)if(i.key==t)return i};return ds(r,{clear:function(){for(var e=s(this),t=e.index,i=e.first;i;)i.removed=!0,i.previous&&(i.previous=i.previous.next=void 0),delete t[i.index],i=i.next;e.first=e.last=void 0,x?e.size=0:this.size=0},delete:function(e){var t=this,i=s(t),n=l(t,e);if(n){var o=n.next,r=n.previous;delete i.index[n.index],n.removed=!0,r&&(r.next=o),o&&(o.previous=r),i.first==n&&(i.first=o),i.last==n&&(i.last=r),x?i.size--:t.size--}return!!n},forEach:function(e){for(var t,i=s(this),n=dn(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:i.first;)for(n(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!l(this,e)}}),ds(r,i?{get:function(e){var t=l(this,e);return t&&t.value},set:function(e,t){return a(this,0===e?0:e,t)}}:{add:function(e){return a(this,e=0===e?0:e,e)}}),x&&hs(r,"size",{get:function(){return s(this).size}}),o},setStrong:function(e,t,i){var n=t+" Iterator",o=vs(t),r=vs(n);$o(e,t,(function(e,t){gs(this,{type:n,target:e,state:o(e),kind:t,last:void 0})}),(function(){for(var e=r(this),t=e.kind,i=e.last;i&&i.removed;)i=i.previous;return e.target&&(e.last=i=i?i.next:e.state.first)?"keys"==t?{value:i.key,done:!1}:"values"==t?{value:i.value,done:!1}:{value:[i.key,i.value],done:!1}:(e.target=void 0,{value:void 0,done:!0})}),i?"entries":"values",!i,!0),function(e){var t=$(e),i=Ye.f;x&&t&&!t[ps]&&i(t,ps,{configurable:!0,get:function(){return this}})}(t)}};function ms(e){var t=this.constructor;return this.then((function(i){return t.resolve(e()).then((function(){return i}))}),(function(i){return t.resolve(e()).then((function(){return t.reject(i)}))}))}function Cs(e){return new this((function(t,i){if(!e||void 0===e.length)return i(new TypeError(typeof e+" "+e+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var n=Array.prototype.slice.call(e);
1if(0===n.length)return t([]);var o=n.length;function r(e,i){if(i&&("object"==typeof i||"function"==typeof i)){var s=i.then;if("function"==typeof s)return void s.call(i,(function(t){r(e,t)}),(function(i){n[e]={status:"rejected",reason:i},0==--o&&t(n)}))}n[e]={status:"fulfilled",value:i},0==--o&&t(n)}for(var s=0;s<n.length;s++)r(s,n[s])}))}!function(e,t,i){var n=-1!==e.indexOf("Map"),o=-1!==e.indexOf("Weak"),r=n?"set":"add",s=S[e],a=s&&s.prototype,l=s,c={},u=function(e){var t=F(a[e]);mt(a,e,"add"==e?function(e){return t(this,0===e?0:e),this}:"delete"==e?function(e){return!(o&&!q(e))&&t(this,0===e?0:e)}:"get"==e?function(e){return o&&!q(e)?void 0:t(this,0===e?0:e)}:"has"==e?function(e){return!(o&&!q(e))&&t(this,0===e?0:e)}:function(e,i){return t(this,0===e?0:e,i),this})};if(Yt(e,!Y(s)||!(o||a.forEach&&!E((function(){(new s).entries().next()})))))l=i.getConstructor(t,e,n,r),os.enable();else if(Yt(e,!0)){var d=new l,p=d[r](o?{}:-0,1)!=d,h=E((function(){d.has(1)})),f=fr((function(e){new s(e)})),g=!o&&E((function(){for(var e=new s,t=5;t--;)e[r](t,t);return!e.has(-0)}));f||((l=t((function(e,t){us(e,a);var i=function(e,t,i){var n,o;return Wo&&Y(n=t.constructor)&&n!==i&&q(o=n.prototype)&&o!==i.prototype&&Wo(e,o),e}(new s,e,l);return null!=t&&ls(t,i[r],{that:i,AS_ENTRIES:n}),i}))).prototype=a,a.constructor=l),(h||g)&&(u("delete"),u("has"),n&&u("get")),(g||p)&&u(r),o&&a.clear&&delete a.clear}c[e]=l,Xt({global:!0,constructor:!0,forced:l!=s},c),cn(l,e),o||i.setStrong(l,e,n)}("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),ys),nn.Set;var bs=setTimeout;function ws(e){return Boolean(e&&void 0!==e.length)}function Ss(){}function Es(e){if(!(this instanceof Es))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],As(e,this)}function xs(e,t){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,Es._immediateFn((function(){var i=1===e._state?t.onFulfilled:t.onRejected;if(null!==i){var n;try{n=i(e._value)}catch(e){return void Ts(t.promise,e)}Os(t.promise,n)}else(1===e._state?Os:Ts)(t.promise,e._value)}))):e._deferreds.push(t)}function Os(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var i=t.then;if(t instanceof Es)return e._state=3,e._value=t,void Ds(e);if("function"==typeof i)return void As((n=i,o=t,function(){n.apply(o,arguments)}),e)}e._state=1,e._value=t,Ds(e)}catch(t){Ts(e,t)}var n,o}function Ts(e,t){e._state=2,e._value=t,Ds(e)}function Ds(e){2===e._state&&0===e._deferreds.length&&Es._immediateFn((function(){e._handled||Es._unhandledRejectionFn(e._value)}));for(var t=0,i=e._deferreds.length;t<i;t++)xs(e,e._deferreds[t]);e._deferreds=null}function Rs(e,t,i){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=i}function As(e,t){var i=!1;try{e((function(e){i||(i=!0,Os(t,e))}),(function(e){i||(i=!0,Ts(t,e))}))}catch(e){if(i)return;i=!0,Ts(t,e)}}Es.prototype.catch=function(e){return this.then(null,e)},Es.prototype.then=function(e,t){var i=new this.constructor(Ss);return xs(this,new Rs(e,t,i)),i},Es.prototype.finally=ms,Es.all=function(e){return new Es((function(t,i){if(!ws(e))return i(new TypeError("Promise.all accepts an array"));var n=Array.prototype.slice.call(e);if(0===n.length)return t([]);var o=n.length;function r(e,s){try{if(s&&("object"==typeof s||"function"==typeof s)){var a=s.then;if("function"==typeof a)return void a.call(s,(function(t){r(e,t)}),i)}n[e]=s,0==--o&&t(n)}catch(e){i(e)}}for(var s=0;s<n.length;s++)r(s,n[s])}))},Es.allSettled=Cs,Es.resolve=function(e){return e&&"object"==typeof e&&e.constructor===Es?e:new Es((function(t){t(e)}))},Es.reject=function(e){return new Es((function(t,i){i(e)}))},Es.race=function(e){return new Es((function(t,i){if(!ws(e))return i(new TypeError("Promise.race accepts an array"));for(var n=0,o=e.length;n<o;n++)Es.resolve(e[n]).then(t,i)}))},Es._immediateFn="function"==typeof setImmediate&&function(e){setImmediate(e)}||function(e){bs(e,0)},Es._unhandledRejectionFn=function(e){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)};var _s=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof i.g)return i.g;throw new Error("unable to locate global object")}();"function"!=typeof _s.Promise?_s.Promise=Es:(_s.Promise.prototype.finally||(_s.Promise.prototype.finally=ms),_s.Promise.allSettled||(_s.Promise.allSettled=Cs)),function(e){function t(){}function i(e,t){if(e=void 0===e?"utf-8":e,t=void 0===t?{fatal:!1}:t,-1===o.indexOf(e.toLowerCase()))throw new RangeError("Failed to construct 'TextDecoder': The encoding label provided ('"+e+"') is invali
1d.");if(t.fatal)throw Error("Failed to construct 'TextDecoder': the 'fatal' option is unsupported.")}function n(e){for(var t=0,i=Math.min(65536,e.length+1),n=new Uint16Array(i),o=[],r=0;;){var s=t<e.length;if(!s||r>=i-1){if(o.push(String.fromCharCode.apply(null,n.subarray(0,r))),!s)return o.join("");e=e.subarray(t),r=t=0}if(0==(128&(s=e[t++])))n[r++]=s;else if(192==(224&s)){var a=63&e[t++];n[r++]=(31&s)<<6|a}else if(224==(240&s)){a=63&e[t++];var l=63&e[t++];n[r++]=(31&s)<<12|a<<6|l}else 240==(248&s)&&(65535<(s=(7&s)<<18|(a=63&e[t++])<<12|(l=63&e[t++])<<6|63&e[t++])&&(s-=65536,n[r++]=s>>>10&1023|55296,s=56320|1023&s),n[r++]=s)}}if(e.TextEncoder&&e.TextDecoder)return!1;var o=["utf-8","utf8","unicode-1-1-utf-8"];Object.defineProperty(t.prototype,"encoding",{value:"utf-8"}),t.prototype.encode=function(e,t){if((t=void 0===t?{stream:!1}:t).stream)throw Error("Failed to encode: the 'stream' option is unsupported.");t=0;for(var i=e.length,n=0,o=Math.max(32,i+(i>>>1)+7),r=new Uint8Array(o>>>3<<3);t<i;){var s=e.charCodeAt(t++);if(55296<=s&&56319>=s){if(t<i){var a=e.charCodeAt(t);56320==(64512&a)&&(++t,s=((1023&s)<<10)+(1023&a)+65536)}if(55296<=s&&56319>=s)continue}if(n+4>r.length&&(o+=8,o=(o*=1+t/e.length*2)>>>3<<3,(a=new Uint8Array(o)).set(r),r=a),0==(4294967168&s))r[n++]=s;else{if(0==(4294965248&s))r[n++]=s>>>6&31|192;else if(0==(4294901760&s))r[n++]=s>>>12&15|224,r[n++]=s>>>6&63|128;else{if(0!=(4292870144&s))continue;r[n++]=s>>>18&7|240,r[n++]=s>>>12&63|128,r[n++]=s>>>6&63|128}r[n++]=63&s|128}}return r.slice?r.slice(0,n):r.subarray(0,n)},Object.defineProperty(i.prototype,"encoding",{value:"utf-8"}),Object.defineProperty(i.prototype,"fatal",{value:!1}),Object.defineProperty(i.prototype,"ignoreBOM",{value:!1});var r=n;"function"==typeof Buffer&&Buffer.from?r=function(e){return Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString("utf-8")}:"function"==typeof Blob&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&(r=function(e){var t=URL.createObjectURL(new Blob([e],{type:"text/plain;charset=UTF-8"}));try{var i=new XMLHttpRequest;return i.open("GET",t,!1),i.send(),i.responseText}catch(t){return n(e)}finally{URL.revokeObjectURL(t)}}),i.prototype.decode=function(e,t){if((t=void 0===t?{stream:!1}:t).stream)throw Error("Failed to decode: the 'stream' option is unsupported.");return e=e instanceof Uint8Array?e:e.buffer instanceof ArrayBuffer?new Uint8Array(e.buffer):new Uint8Array(e),r(e)},e.TextEncoder=t,e.TextDecoder=i}("undefined"!=typeof window?window:v),function(){function e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function t(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}function n(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}function r(e,t){return r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},r(e,t)}function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function a(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?s(e):t}function l(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=o(e);if(t){var r=o(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return a(this,i)}}function c(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=o(e)););return e}function u(e,t,i){return u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,i){var n=c(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(i):o.value}},u(e,t,i||e)}var d=function(){function t(){e(this,t),Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}return i(t,[{key:"addEventListener",value:function(e,t,i){e in this.listeners||(this.listeners[e]=[]),this.listeners[e].push({callback:t,options:i})}},{key:"removeEventListener",value:function(e,t){if(e in this.listeners)for(var i=this.listeners[e],n=0,o=i.length;n<o;n++)if(i[n].callback===t)return void i.splice(n,1)}},{key:"dispatchEvent",value:function(e){if(e.type in this.listeners){for(var t=this.listeners[e.type].slice(),i=0,n=t.length;i<n;i++){var o=t[i];try{o.callback.call(this,e)}catch(e){Promise.resolve().then((function(){throw e}))}o.options&&o.options.once&&this.removeEventListener(e.type,o.callback)}return!e.defaultPrevented}}}]),t}(),p=function(t){n(a,t);var r=l(a);function a(){var t;return e(this,a),(t=r.call(this)).listeners||d.call(s(t)),Object.defineProperty(s(t),"aborted",{value:!1,writable:!0,configurable:!0}),Object.defineProperty(s(t),"onabort",{value:null,writable:!0,configurable:!0}),t}return i(a,[{key:"toString",value:function(){return"[object AbortSignal]"}},{key:"dispatchEvent",value:function(e){"abort"===e.type&&(this.aborted=!0,"function"==typeof this.onabort&&this.onabort.call(this,e)),u(o(a.prototype),"dis
1patchEvent",this).call(this,e)}}]),a}(d),h=function(){function t(){e(this,t),Object.defineProperty(this,"signal",{value:new p,writable:!0,configurable:!0})}return i(t,[{key:"abort",value:function(){var e;try{e=new Event("abort")}catch(t){"undefined"!=typeof document?document.createEvent?(e=document.createEvent("Event")).initEvent("abort",!1,!1):(e=document.createEventObject()).type="abort":e={type:"abort",bubbles:!1,cancelable:!1}}this.signal.dispatchEvent(e)}},{key:"toString",value:function(){return"[object AbortController]"}}]),t}();"undefined"!=typeof Symbol&&Symbol.toStringTag&&(h.prototype[Symbol.toStringTag]="AbortController",p.prototype[Symbol.toStringTag]="AbortSignal"),function(e){(function(e){return e.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL?(console.log("__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL=true is set, will force install polyfill"),!0):"function"==typeof e.Request&&!e.Request.prototype.hasOwnProperty("signal")||!e.AbortController})(e)&&(e.AbortController=h,e.AbortSignal=p)}("undefined"!=typeof self?self:v)}();var Ps=m((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){var e=this;this.locked=new Map,this.addToLocked=function(t,i){var n=e.locked.get(t);void 0===n?void 0===i?e.locked.set(t,[]):e.locked.set(t,[i]):void 0!==i&&(n.unshift(i),e.locked.set(t,n))},this.isLocked=function(t){return e.locked.has(t)},this.lock=function(t){return new Promise((function(i,n){e.isLocked(t)?e.addToLocked(t,i):(e.addToLocked(t),i())}))},this.unlock=function(t){var i=e.locked.get(t);if(void 0!==i&&0!==i.length){var n=i.pop();e.locked.set(t,i),void 0!==n&&setTimeout(n,0)}else e.locked.delete(t)}}return e.getInstance=function(){return void 0===e.instance&&(e.instance=new e),e.instance},e}();t.default=function(){return i.getInstance()}}));y(Ps);var Ms=m((function(e,t){var i=v&&v.__awaiter||function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){e.done?o(e.value):new i((function(t){t(e.value)})).then(s,a)}l((n=n.apply(e,t||[])).next())}))},n=v&&v.__generator||function(e,t){var i,n,o,r,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(i)throw new TypeError("Generator is already executing.");for(;s;)try{if(i=1,n&&(o=2&r[0]?n.return:r[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,r[1])).done)return o;switch(n=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return s.label++,{value:r[1],done:!1};case 5:s.label++,n=r[1],r=[0];continue;case 7:r=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==r[0]&&2!==r[0])){s=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]<o[3])){s.label=r[1];break}if(6===r[0]&&s.label<o[1]){s.label=o[1],o=r;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(r);break}o[2]&&s.ops.pop(),s.trys.pop();continue}r=t.call(e,s)}catch(e){r=[6,e],n=0}finally{i=o=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,a])}}};Object.defineProperty(t,"__esModule",{value:!0});var o="browser-tabs-lock-key";function r(e){return new Promise((function(t){return setTimeout(t,e)}))}function s(e){for(var t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz",i="",n=0;n<e;n++)i+=t[Math.floor(Math.random()*t.length)];return i}var a=function(){function e(){this.acquiredIatSet=new Set,this.id=Date.now().toString()+s(15),this.acquireLock=this.acquireLock.bind(this),this.releaseLock=this.releaseLock.bind(this),this.releaseLock__private__=this.releaseLock__private__.bind(this),this.waitForSomethingToChange=this.waitForSomethingToChange.bind(this),this.refreshLockWhileAcquired=this.refreshLockWhileAcquired.bind(this),void 0===e.waiters&&(e.waiters=[])}return e.prototype.acquireLock=function(t,a){return void 0===a&&(a=5e3),i(this,void 0,void 0,(function(){var i,l,c,u,d,p;return n(this,(function(n){switch(n.label){case 0:i=Date.now()+s(4),l=Date.now()+a,c=o+"-"+t,u=window.localStorage,n.label=1;case 1:return Date.now()<l?[4,r(30)]:[3,8];case 2:return n.sent(),null!==u.getItem(c)?[3,5]:(d=this.id+"-"+t+"-"+i,[4,r(Math.floor(25*Math.random()))]);case 3:return n.sent(),u.setItem(c,JSON.stringify({id:this.id,iat:i,timeoutKey:d,timeAcquired:Date.now(),timeRefreshed:Date.now()})),[4,r(30)];case 4:return n.sent(),null!==(p=u.getItem(c))&&(p=JSON.parse(p)).id===this.id&&p.iat===i?(this.acquiredIatSet.add(i),this.refreshLockWhileAcquired(c,i),[2,!0]):[3,7];case 5:return e.lockCorrector(),[4,this.waitForSomethingToChange(l)];case 6:n.sent(),n.label=7;case 7:return i=Date.now()+s(4),[3,1];case 8:return[2,!1]}}))}))},e.prototype.refreshLockWhileAcquired=function(e,t){return i(this,void 0,void 0,(function(){var o=this;return n(this,(function(r){return setTimeout((function(){return i(o,void 0,void 0,(function(){var i,o;return n(this,(function(n){switch(n.label){case 0:return[4,Ps.default().lock(t)];case 1:return n.sent(),this.acquiredIatSet.has(t)?(i=window.localStorage,null===(o=i.getItem(e))?(Ps.default().unlock(t),[2]):((o=JSON.parse(o)).timeRefreshed=Date.now(),i.setItem(e,JSON.stringify(o)),Ps.default().unlock(t),this.refreshLockWhileAcquired(e,t),[2])):(Ps.default().unlock(t),[2])}}))}))}),1e3),[2]}))}
1))},e.prototype.waitForSomethingToChange=function(t){return i(this,void 0,void 0,(function(){return n(this,(function(i){switch(i.label){case 0:return[4,new Promise((function(i){var n=!1,o=Date.now(),r=!1;function s(){if(r||(window.removeEventListener("storage",s),e.removeFromWaiting(s),clearTimeout(a),r=!0),!n){n=!0;var t=50-(Date.now()-o);t>0?setTimeout(i,t):i()}}window.addEventListener("storage",s),e.addToWaiting(s);var a=setTimeout(s,Math.max(0,t-Date.now()))}))];case 1:return i.sent(),[2]}}))}))},e.addToWaiting=function(t){this.removeFromWaiting(t),void 0!==e.waiters&&e.waiters.push(t)},e.removeFromWaiting=function(t){void 0!==e.waiters&&(e.waiters=e.waiters.filter((function(e){return e!==t})))},e.notifyWaiters=function(){void 0!==e.waiters&&e.waiters.slice().forEach((function(e){return e()}))},e.prototype.releaseLock=function(e){return i(this,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,this.releaseLock__private__(e)];case 1:return[2,t.sent()]}}))}))},e.prototype.releaseLock__private__=function(t){return i(this,void 0,void 0,(function(){var i,r,s;return n(this,(function(n){switch(n.label){case 0:return i=window.localStorage,r=o+"-"+t,null===(s=i.getItem(r))?[2]:(s=JSON.parse(s)).id!==this.id?[3,2]:[4,Ps.default().lock(s.iat)];case 1:n.sent(),this.acquiredIatSet.delete(s.iat),i.removeItem(r),Ps.default().unlock(s.iat),e.notifyWaiters(),n.label=2;case 2:return[2]}}
1))}))},e.lockCorrector=function(){for(var t=Date.now()-5e3,i=window.localStorage,n=Object.keys(i),r=!1,s=0;s<n.length;s++){var a=n[s];if(a.includes(o)){var l=i.getItem(a);null!==l&&(void 0===(l=JSON.parse(l)).timeRefreshed&&l.timeAcquired<t||void 0!==l.timeRefreshed&&l.timeRefreshed<t)&&(i.removeItem(a),r=!0)}}r&&e.notifyWaiters()},e.waiters=void 0,e}();t.default=a})),ks=y(Ms),Ns=["login_required","consent_required","interaction_required","account_selection_required","access_denied"],Ls={name:"eartho-one-js",version:"1.21.1"},Is=function(){return Date.now()},Fs=function(e){function t(i,n){var o=e.call(this,n)||this;return o.error=i,o.error_description=n,Object.setPrototypeOf(o,t.prototype),o}return c(t,e),t.fromPayload=function(e){return new t(e.error,e.error_description)},t}(Error),Gs=function(e){function t(i,n,o,r){void 0===r&&(r=null);var s=e.call(this,i,n)||this;return s.state=o,s.appState=r,Object.setPrototypeOf(s,t.prototype),s}return c(t,e),t}(Fs),Vs=function(e){function t(){var i=e.call(this,"timeout","Timeout")||this;return Object.setPrototypeOf(i,t.prototype),i}return c(t,e),t}(Fs),Bs=function(e){function t(i){var n=e.call(this)||this;return n.popup=i,Object.setPrototypeOf(n,t.prototype),n}return c(t,e),t}(Vs),js=function(e){function t(i){var n=e.call(this,"cancelled","Popup closed")||this;return n.popup=i,Object.setPrototypeOf(n,t.prototype),n}return c(t,e),t}(Fs),Hs=function(e){function t(i,n,o){var r=e.call(this,i,n)||this;return r.mfa_token=o,Object.setPrototypeOf(r,t.prototype),r}return c(t,e),t}(Fs),Ws=function(e){return new Promise((function(t,i){var n,o=setInterval((function(){e.popup&&e.popup.closed&&(clearInterval(o),clearTimeout(r),window.removeEventListener("message",n,!1),i(new js(e.popup)))}),1e3),r=setTimeout((function(){clearInterval(o),i(new Bs(e.popup)),window.removeEventListener("message",n,!1)}),1e3*(e.timeoutInSeconds||360));n=function(s){if(s.data&&"authorization_response"===s.data.type){if(clearTimeout(r),clearInterval(o),window.removeEventListener("message",n,!1),e.popup.close(),s.data.response.error)return i(Fs.fromPayload(s.data.response));t(s.data.response)}},window.addEventListener("message",n)}))},Us=function(){return window.crypto||window.msCrypto},zs=function(){var e=Us();return e.subtle||e.webkitSubtle},Ks=function(){var e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_~.",t="";return Array.from(Us().getRandomValues(new Uint8Array(43))).forEach((function(i){return t+=e[i%e.length]})),t},Ys=function(e){return btoa(e)},qs=function(e){return Object.keys(e).filter((function(t){return void 0!==e[t]})).map((function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])})).join("&")},Xs=function(e){return p(void 0,void 0,void 0,(function(){var t;return h(this,(function(i){switch(i.label){case 0:return t=zs().digest({name:"SHA-256"},(new TextEncoder).encode(e)),window.msCrypto?[2,new Promise((function(e,i){t.oncomplete=function(t){e(t.target.result)},t.onerror=function(e){i(e.error)},t.onabort=function(){i("The digest operation was aborted")}}))]:[4,t];case 1:return[2,i.sent()]}}))}))},$s=function(e){return function(e){return decodeURIComponent(atob(e).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""))}(e.replace(/_/g,"/").replace(/-/g,"+"))},Zs=function(e){var t=new Uint8Array(e);return function(e){var t={"+":"-","/":"_","=":""};return e.replace(/[+/=]/g,(function(e){return t[e]}))}(window.btoa(String.fromCharCode.apply(String,g([],f(Array.from(t)),!1))))},Js=function(e,t){return p(void 0,void 0,void 0,(function(){var i,n;return h(this,(function(o){switch(o.label){case 0:return[4,(r=e,s=t,s=s||{},new Promise((function(e,t){var i=new XMLHttpRequest,n=[],o=[],a={},l=function(){return{ok:2==(i.status/100|0),statusText:i.statusText,status:i.status,url:i.responseURL,text:function(){return Promise.resolve(i.responseText)},json:function(){return Promise.resolve(i.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([i.response]))},clone:l,headers:{keys:function(){return n},entries:function(){return o},get:function(e){return a[e.toLowerCase()]},has:function(e){return e.toLowerCase()in a}}}};for(var c in i.open(s.method||"get",r,!0),i.onload=function(){i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(e,t,i){n.push(t=t.toLowerCase()),o.push([t,i]),a[t]=a[t]?a[t]+","+i:i})),e(l())},i.onerror=t,i.withCredentials="include"==s.credentials,s.headers)i.setRequestHeader(c,s.headers[c]);i.send(s.body||null)})))];case 1:return i=o.sent(),n={ok:i.ok},[4,i.json()];case 2:return[2,(n.json=o.sent(),n)]}var r,s}))}))},Qs=function(e,t,i){return p(void 0,void 0,void 0,(function(){var n,o;return h(this,(function(r){return n=new AbortController,t.signal=n.signal,[2,Promise.race([Js(e,t),new Promise((function(e,t){o=setTimeout((function(){n.abort(),t(new Error("Timeout when executing 'fetch'"))}),i)}))]).finally((function(){clearTimeout(o)}))]}))}))},ea=function(e,t,i,n,o,r,s){return p(void 0,void 0,void 0,(function(){return h(this,(function(a){return[2,(l={auth:{audience:t,scope:i},timeout:o,fetchUrl:e,fetchOptions:n,useFormData:s},c=r,new Promise((function(e,t){var i=new MessageChannel;i.port1.onmessage=function(i){i.data.error?t(new Error(i.data.error)):e(i.data)},c.postMessage(l,[i.port2])})))];var l,c}))}))},ta=function(e,t,i,n,o,r,s){return void 0===s&&(s=1e4),p(void 0,void 0,void 0,(function(){return h(this,(function(a){return o?[2,ea(e,t,i,n,s,o,r)]:[2,Qs(e,n,s)]}))}))};function ia(e,t,i,n,o,r,s){return p(this,void 0,void 0,(function(){var a,l,c,u,p,f,g,v,y;return h(this,(function(h){switch(h.label){case 0:a=null,c=0,h.label=1;case 1:if(!(c<3))return[3,6];h.label=2;case 2:return h.trys.push([2,4,,5]),[4,ta(e,i,n,o,r,s,t)];case 3:return l=h.sent(),a=null,[3,6];case 4:return u=h.sent(),a=u,[3,5];case 5:return c++,[3,1];case 6:if(a)throw a.message=a.message||"Failed to fetch",a;if(p=l.json,f=p.error,g=p.error_description,v=d(p,["error","error_description"]),!l.ok){if(y=g||"HTTP error. Unable to fetch ".concat(e),"mfa_required"===f)throw new Hs(f,y,v.mfa_token);throw new Fs(f||"request_error",y)}return[2,v]}}))}))}function na(e,t){var i=e.baseUrl,n=e.timeout,o=e.audience,r=e.scope,s=e.earthoOne,a=e.useFormData,l=d(e,["baseUrl","timeout","audience","scope","earthoOne","useFormData"]);return p(this,void 0,void 0,(function(){var e;return h(this,(function(c){switch(c.label){case 0:return e=a?qs(l):JSON.stringify(l),[4,ia(i,n,o||"default",r,{method:"POST",body:e,headers:{"Content-Type":a?"application/x-www-form-urlencoded":"application/json","Eartho-Client":btoa(JSON.stringify(s||Ls))}},t,a)];case 1:return[2,c.sent()]}}))}))}var oa=function(e){return Array.from(new Set(e))},ra=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];
1return oa(e.join(" ").trim().split(/\s+/)).join(" ")},sa=function(){function e(e,t){void 0===t&&(t="@@earthoOnespajs@@"),this.prefix=t,this.client_id=e.client_id,this.audience=e.audience}return e.prototype.toKey=function(){return"".concat(this.prefix,"::").concat(this.client_id,"::").concat(this.audience,"::").concat(this.scope)},e.fromKey=function(t){var i=f(t.split("::"),4),n=i[0],o=i[1],r=i[2];return new e({client_id:o,scope:i[3],audience:r},n)},e.fromCacheEntry=function(t){return new e({scope:t.scope,audience:t.audience,client_id:t.client_id})},e}(),aa=function(){function e(){}return e.prototype.set=function(e,t){localStorage.setItem(e,JSON.stringify(t))},e.prototype.get=function(e){var t=window.localStorage.getItem(e);if(t)try{return JSON.parse(t)}catch(e){return void console.log(e)}},e.prototype.remove=function(e){localStorage.removeItem(e)},e.prototype.allKeys=function(){return Object.keys(window.localStorage).filter((function(e){return e.startsWith("@@earthoOnespajs@@")}))},e}(),la=function(){var e;this.enclosedCache=(e={},{set:function(t,i){e[t]=i},get:function(t){var i=e[t];if(i)return i},remove:function(t){delete e[t]},allKeys:function(){return Object.keys(e)}})},ca=function(){function e(e,t,i){this.cache=e,this.keyManifest=t,this.nowProvider=i,this.nowProvider=this.nowProvider||Is}return e.prototype.get=function(e,t){return p(this,void 0,void 0,(function(){var t,i,n;return h(this,(function(o){switch(o.label){case 0:return[4,this.cache.get(e.toKey())];case 1:return(t=o.sent())?[3,4]:[4,this.getCacheKeys()];case 2:return(i=o.sent())?(n=this.matchExistingCacheKey(e,i))?[4,this.cache.get(n)]:[3,4]:[2];case 3:t=o.sent(),o.label=4;case 4:return t?[4,this.nowProvider()]:[2];case 5:return o.sent(),[2,t.body]}}))}))},e.prototype.set=function(e){var t;return p(this,void 0,void 0,(function(){var i,n;return h(this,(function(o){switch(o.label){case 0:return i=new sa({client_id:e.client_id,scope:e.scope,audience:e.audience}),[4,this.wrapCacheEntry(e)];case 1:return n=o.sent(),[4,this.cache.set(i.toKey(),n)];case 2:return o.sent(),[4,null===(t=this.keyManifest)||void 0===t?void 0:t.add(i.toKey())];case 3:return o.sent(),[2]}}))}))},e.prototype.clear=function(e){var t;return p(this,void 0,void 0,(function(){var i,n=this;return h(this,(function(o){switch(o.label){case 0:return[4,this.getCacheKeys()];case 1:return(i=o.sent())?[4,i.filter((function(t){return!e||t.includes(e)})).reduce((function(e,t){return p(n,void 0,void 0,(function(){return h(this,(function(i){switch(i.label){case 0:return[4,e];case 1:return i.sent(),[4,this.cache.remove(t)];case 2:return i.sent(),[2]}}))}))}),Promise.resolve())]:[2];case 2:return o.sent(),[4,null===(t=this.keyManifest)||void 0===t?void 0:t.clear()];case 3:return o.sent(),[2]}}))}))},e.prototype.clearSync=function(e){var t=this,i=this.cache.allKeys();i&&i.filter((function(t){return!e||t.includes(e)})).forEach((function(e){t.cache.remove(e)}))},e.prototype.wrapCacheEntry=function(e){return p(this,void 0,void 0,(function(){var t,i,n;return h(this,(function(o){switch(o.label){case 0:return[4,this.nowProvider()];case 1:return t=o.sent(),i=Math.floor(t/1e3)+e.expires_in,n=Math.min(i,e.decodedToken.claims.exp),[2,{body:e,expiresAt:n}]}}))}))},e.prototype.getCacheKeys=function(){var e;return p(this,void 0,void 0,(function(){var t;return h(this,(function(i){switch(i.label){case 0:return this.keyManifest?[4,this.keyManifest.get()]:[3,2];case 1:return t=null===(e=i.sent())||void 0===e?void 0:e.keys,[3,4];case 2:return[4,this.cache.allKeys()];case 3:t=i.sent(),i.label=4;case 4:return[2,t]}}))}))},e.prototype.matchExistingCacheKey=function(e,t){return t.filter((function(t){var i=sa.fromKey(t),n=new Set(i.scope&&i.scope.split(" ")),o=e.scope.split(" "),r=i.scope&&o.reduce((function(e,t){return e&&n.has(t)}),!0);return"@@earthoOnespajs@@"===i.prefix&&i.client_id===e.client_id&&i.audience===e.audience&&r}))[0]},e}(),ua=function(){function e(e,t){this.storage=e,this.clientId=t,this.storageKey="".concat("a0.spajs.txs",".").concat(this.clientId),this.transaction=this.storage.get(this.storageKey)}return e.prototype.create=function(e){this.transaction=e,this.storage.save(this.storageKey,e,{daysUntilExpire:1})},e.prototype.get=function(){return this.transaction},e.prototype.remove=function(){delete this.transaction,this.storage.remove(this.storageKey)},e}(),da=function(e){return"number"==typeof e}
1,pa=["iss","aud","exp","nbf","iat","jti","azp","nonce","auth_time","at_hash","c_hash","acr","amr","sub_jwk","cnf","sip_from_tag","sip_date","sip_callid","sip_cseq_num","sip_via_branch","orig","dest","mky","events","toe","txn","rph","sid","vot","vtm"],ha=function(e){if(!e.id_token)throw new Error("ID token is required but missing");var t=function(e){var t=e.split("."),i=f(t,3),n=i[0],o=i[1],r=i[2];if(3!==t.length||!n||!o||!r)throw new Error("ID token could not be decoded");var s=JSON.parse($s(o)),a={__raw:e},l={};return Object.keys(s).forEach((function(e){a[e]=s[e],pa.includes(e)||(l[e]=s[e])})),{encoded:{header:n,payload:o,signature:r},header:JSON.parse($s(n)),claims:a,user:l}}(e.id_token);if(!t.claims.iss)throw new Error("Issuer (iss) claim must be a string present in the ID token");if(t.claims.iss!==e.iss)throw new Error('Issuer (iss) claim mismatch in the ID token; expected "'.concat(e.iss,'", found "').concat(t.claims.iss,'"'));if(!t.user.sub)throw new Error("Subject (sub) claim must be a string present in the ID token");if("RS256"!==t.header.alg)throw new Error('Signature algorithm of "'.concat(t.header.alg,'" is not supported. Expected the ID token to be signed with "RS256".'));if(!t.claims.aud||"string"!=typeof t.claims.aud&&!Array.isArray(t.claims.aud))throw new Error("Audience (aud) claim must be a string or array of strings present in the ID token");if(Array.isArray(t.claims.aud)){if(!t.claims.aud.includes(e.aud))throw new Error('Audience (aud) claim mismatch in the ID token; expected "'.concat(e.aud,'" but was not one of "').concat(t.claims.aud.join(", "),'"'));if(t.claims.aud.length>1){if(!t.claims.azp)throw new Error("Authorized Party (azp) claim must be a string present in the ID token when Audience (aud) claim has multiple values");if(t.claims.azp!==e.aud)throw new Error('Authorized Party (azp) claim mismatch in the ID token; expected "'.concat(e.aud,'", found "').concat(t.claims.azp,'"'))}}else if(t.claims.aud!==e.aud)throw new Error('Audience (aud) claim mismatch in the ID token; expected "'.concat(e.aud,'" but found "').concat(t.claims.aud,'"'));if(e.nonce){if(!t.claims.nonce)throw new Error("Nonce (nonce) claim must be a string present in the ID token");if(t.claims.nonce!==e.nonce)throw new Error('Nonce (nonce) claim mismatch in the ID token; expected "'.concat(e.nonce,'", found "').concat(t.claims.nonce,'"'))}if(e.max_age&&!da(t.claims.auth_time))throw new Error("Authentication Time (auth_time) claim must be a number present in the ID token when Max Age (max_age) is specified");if(!da(t.claims.exp))throw new Error("Expiration Time (exp) claim must be a number present in the ID token");if(!da(t.claims.iat))throw new Error("Issued At (iat) claim must be a number present in the ID token");var i=e.leeway||60,n=new Date(e.now||Date.now()),o=new Date(0),r=new Date(0),s=new Date(0);if(s.setUTCSeconds(parseInt(t.claims.auth_time)+e.max_age+i),o.setUTCSeconds(t.claims.exp+i),r.setUTCSeconds(t.claims.nbf-i),n>o)throw new Error("Expiration Time (exp) claim error in the ID token; current time (".concat(n,") is after expiration time (").concat(o,")"));if(da(t.claims.nbf)&&n<r)throw new Error("Not Before time (nbf) claim in the ID token indicates that this token can't be used just yet. Currrent time (".concat(n,") is before ").concat(r));if(da(t.claims.auth_time)&&n>s)throw new Error("Authentication Time (auth_time) claim in the ID token indicates that too much time has passed since the last end-user authentication. Currrent time (".concat(n,") is after last auth at ").concat(s));return t},fa=m((function(e,t){var i=v&&v.__assign||function(){return i=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};function n(e,t){if(!t)return"";var i="; "+e;return!0===t?i:i+"="+t}function o(e,t,i){return encodeURIComponent(e).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/\(/g,"%28").replace(/\)/g,"%29")+"="+encodeURIComponent(t).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decode
1URIComponent)+function(e){if("number"==typeof e.expires){var t=new Date;t.setMilliseconds(t.getMilliseconds()+864e5*e.expires),e.expires=t}return n("Expires",e.expires?e.expires.toUTCString():"")+n("Domain",e.domain)+n("Path",e.path)+n("Secure",e.secure)+n("SameSite",e.sameSite)}(i)}function r(e){for(var t={},i=e?e.split("; "):[],n=/(%[\dA-F]{2})+/gi,o=0;o<i.length;o++){var r=i[o].split("="),s=r.slice(1).join("=");'"'===s.charAt(0)&&(s=s.slice(1,-1));try{t[r[0].replace(n,decodeURIComponent)]=s.replace(n,decodeURIComponent)}catch(e){}}return t}function s(){return r(document.cookie)}function a(e,t,n){document.cookie=o(e,t,i({path:"/"},n))}t.__esModule=!0,t.encode=o,t.parse=r,t.getAll=s,t.get=function(e){return s()[e]},t.set=a,t.remove=function(e,t){a(e,"",i(i({},t),{expires:-1}))}}));y(fa),fa.encode,fa.parse,fa.getAll;var ga,va=fa.get,ya=fa.set,ma=fa.remove,Ca={get:function(e){var t=va(e);if(void 0!==t)return JSON.parse(t)},save:function(e,t,i){var n={};"https:"===window.location.protocol&&(n={secure:!0,sameSite:"none"}),(null==i?void 0:i.daysUntilExpire)&&(n.expires=i.daysUntilExpire),(null==i?void 0:i.cookieDomain)&&(n.domain=i.cookieDomain),ya(e,JSON.stringify(t),n)},remove:function(e){ma(e)}},ba={get:function(e){return Ca.get(e)||Ca.get("".concat("_legacy_").concat(e))},save:function(e,t,i){var n={};"https:"===window.location.protocol&&(n={secure:!0}),(null==i?void 0:i.daysUntilExpire)&&(n.expires=i.daysUntilExpire),ya("".concat("_legacy_").concat(e),JSON.stringify(t),n),Ca.save(e,t,i)},remove:function(e){Ca.remove(e),Ca.remove("".concat("_legacy_").concat(e))}},wa={get:function(e){if("undefined"!=typeof sessionStorage){var t=sessionStorage.getItem(e);if(void 0!==t)return JSON.parse(t)}},save:function(e,t){sessionStorage.setItem(e,JSON.stringify(t))},remove:function(e){sessionStorage.removeItem(e)}},Sa=function(e){return ga=ga||function(e,t,i){var n=void 0===t?null:t,o=function(e,t){var i=atob(e);if(t){for(var n=new Uint8Array(i.length),o=0,r=i.length;o<r;++o)n[o]=i.charCodeAt(o);return String.fromCharCode.apply(null,new Uint16Array(n.buffer))}return i}(e,void 0!==i&&i),r=o.indexOf("\n",10)+1,s=o.substring(r)+(n?"//# sourceMappingURL="+n:""),a=new Blob([s],{type:"application/javascript"});return URL.createObjectURL(a)}("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwohZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Ci8qISAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICAgQ29weXJpZ2h0IChjKSBNaWNyb3NvZnQgQ29ycG9yYXRpb24uCgogICAgUGVybWlzc2lvbiB0byB1c2UsIGNvcHksIG1vZGlmeSwgYW5kL29yIGRpc3RyaWJ1dGUgdGhpcyBzb2Z0d2FyZSBmb3IgYW55CiAgICBwdXJwb3NlIHdpdGggb3Igd2l0aG91dCBmZWUgaXMgaGVyZWJ5IGdyYW50ZWQuCgogICAgVEhFIFNPRlRXQVJFIElTIFBST1ZJREVEICJBUyBJUyIgQU5EIFRIRSBBVVRIT1IgRElTQ0xBSU1TIEFMTCBXQVJSQU5USUVTIFdJVEgKICAgIFJFR0FSRCBUTyBUSElTIFNPRlRXQVJFIElOQ0xVRElORyBBTEwgSU1QTElFRCBXQVJSQU5USUVTIE9GIE1FUkNIQU5UQUJJTElUWQogICAgQU5EIEZJVE5FU1MuIElOIE5PIEVWRU5UIFNIQUxMIFRIRSBBVVRIT1IgQkUgTElBQkxFIEZPUiBBTlkgU1BFQ0lBTCwgRElSRUNULAogICAgSU5ESVJFQ1QsIE9SIENPTlNFUVVFTlRJQUwgREFNQUdFUyBPUiBBTlkgREFNQUdFUyBXSEFUU09FVkVSIFJFU1VMVElORyBGUk9NCiAgICBMT1NTIE9GIFVTRSwgREFUQSBPUiBQUk9GSVRTLCBXSEVUSEVSIElOIEFOIEFDVElPTiBPRiBDT05UUkFDVCwgTkVHTElHRU5DRSBPUgogICAgT1RIRVIgVE9SVElPVVMgQUNUSU9OLCBBUklTSU5HIE9VVCBPRiBPUiBJTiBDT05ORUNUSU9OIFdJVEggVEhFIFVTRSBPUgogICAgUEVSRk9STUFOQ0UgT0YgVEhJUyBTT0ZUV0FSRS4KICAgICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovdmFyIGU9ZnVuY3Rpb24oKXtyZXR1cm4gZT1PYmplY3QuYXNzaWdufHxmdW5jdGlvbihlKXtmb3IodmFyIHIsdD0xLG49YXJndW1lbnRzLmxlbmd0aDt0PG47dCsrKWZvcih2YXIgbyBpbiByPWFyZ3VtZW50c1t0XSlPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwocixvKSYmKGVbb109cltvXSk7cmV0dXJuIGV9LGUuYXBwbHkodGhpcyxhcmd1bWVudHMpfTtmdW5jdGlvbiByKGUscix0LG4pe3JldHVybiBuZXcodHx8KHQ9UHJvbWlzZSkpKChmdW5jdGlvbihvLGEpe2Z1bmN0aW9uIHMoZSl7dHJ5e2Mobi5uZXh0KGUpKX1jYXRjaChlKXthKGUpfX1mdW5jdGlvbiBpKGUpe3RyeXtjKG4udGhyb3coZSkpfWNhdGNoKGUpe2EoZSl9fWZ1bmN0aW9uIGMoZSl7dmFyIHI7ZS5kb25lP28oZS52YWx1ZSk6KHI9ZS52YWx1ZSxyIGluc3RhbmNlb2YgdD9yOm5ldyB0KChmdW5jdGlvbihlKXtlKHIpfSkpKS50aGVuKHMsaSl9Yygobj1uLmFwcGx5KGUscnx8W10pKS5uZXh0KCkpfSkpfWZ1bmN0aW9uIHQoZSxyKXt2YXIgdCxuLG8sYSxzPXtsYWJlbDowLHNlbnQ6ZnVuY3Rpb24oKXtpZigxJm9bMF0pdGhyb3cgb1sxXTtyZXR1cm4gb1sxXX0sdHJ5czpbXSxvcHM6W119O3JldHVybiBhPXtuZXh0OmkoMCksdGhyb3c6aSgxKSxyZXR1cm46aSgyKX0sImZ1bmN0aW9uIj09dHlwZW9mIFN5bWJvbCYmKGFbU3ltYm9sLml0ZXJhdG9yXT1mdW5jdGlvbigpe3JldHVybiB0aGlzfSksYTtmdW5jdGlvbiBpKGEpe3JldHVybiBmdW5jdGlvbihpKXtyZXR1cm4gZnVuY3Rpb24oYSl7aWYodCl0aHJvdyBuZXcgVHlwZUVycm9yKCJHZW5lcmF0b3IgaXMgYWxyZWFkeSBleGVjdXRpbmcuIik7Zm9yKDtzOyl0cnl7aWYodD0xLG4mJihvPTImYVswXT9uLnJldHVybjphWzBdP24udGhyb3d8fCgobz1uLnJldHVybikmJm8uY2FsbChuKSwwKTpuLm5leHQpJiYhKG89by5jYWxsKG4sYVsxXSkpLmRvbmUpcmV0dXJuIG87c3dpdGNoKG49MCxvJiYoYT1bMiZhWzBdLG8udmFsdWVdKSxhWzBdKXtjYXNlIDA6Y2FzZSAxOm89YTticmVhaztjYXNlIDQ6cmV0dXJuIHMubGFiZWwrKyx7dmFsdWU6YVsxXSxkb25lOiExfTtjYXNlIDU6cy5sYWJlbCsrLG49YVsxXSxhPVswXTtjb250aW51ZTtjYXNlIDc6YT1zLm9wcy5wb3AoKSxzLnRyeXMucG9wKCk7Y29udGludWU7ZGVmYXVsdDppZighKG89cy50cnlzLChvPW8ubGVuZ3RoPjAmJm9bby5sZW5ndGgtMV0pfHw2IT09YVswXSYmMiE9PWFbMF0pKXtzPTA7Y29udGludWV9aWYoMz09PWFbMF0mJighb3x8YVsxXT5vWzBdJiZhWzFdPG9bM10pKXtzLmxhYmVsPWFbMV07YnJlYWt9aWYoNj09PWFbMF0mJnMubGFiZWw8b1sxXSl7cy5sYWJlbD1vWzFdLG89YTticmVha31pZihvJiZzLmxhYmVsPG9bMl0pe3MubGFiZWw9b1syXSxzLm9wcy5wdXNoKGEpO2JyZWFrfW9bMl0mJnMub3BzLnBvcCgpLHMudHJ5cy5wb3AoKTtjb250aW51ZX1hPXIuY2FsbChlLHMpfWNhdGNoKGUpe2E9WzYsZV0sbj0wfWZpbmFsbHl7dD1vPTB9aWYoNSZhWzBdKXRocm93IGFbMV07cmV0dXJue3ZhbHVlOmFbMF0/YVsxXTp2b2lkIDAsZG9uZTo
1hMH19KFthLGldKX19fXZhciBuPXt9LG89ZnVuY3Rpb24oZSxyKXtyZXR1cm4iIi5jb25jYXQoZSwifCIpLmNvbmNhdChyKX07YWRkRXZlbnRMaXN0ZW5lcigibWVzc2FnZSIsKGZ1bmN0aW9uKGEpe3ZhciBzPWEuZGF0YSxpPXMudGltZW91dCxjPXMuYXV0aCx1PXMuZmV0Y2hVcmwsZj1zLmZldGNoT3B0aW9ucyxsPXMudXNlRm9ybURhdGEsaD1mdW5jdGlvbihlLHIpe3ZhciB0PSJmdW5jdGlvbiI9PXR5cGVvZiBTeW1ib2wmJmVbU3ltYm9sLml0ZXJhdG9yXTtpZighdClyZXR1cm4gZTt2YXIgbixvLGE9dC5jYWxsKGUpLHM9W107dHJ5e2Zvcig7KHZvaWQgMD09PXJ8fHItLSA+MCkmJiEobj1hLm5leHQoKSkuZG9uZTspcy5wdXNoKG4udmFsdWUpfWNhdGNoKGUpe289e2Vycm9yOmV9fWZpbmFsbHl7dHJ5e24mJiFuLmRvbmUmJih0PWEucmV0dXJuKSYmdC5jYWxsKGEpfWZpbmFsbHl7aWYobyl0aHJvdyBvLmVycm9yfX1yZXR1cm4gc30oYS5wb3J0cywxKVswXTtyZXR1cm4gcih2b2lkIDAsdm9pZCAwLHZvaWQgMCwoZnVuY3Rpb24oKXt2YXIgcixhLHMscCx5LGIsZCx2LHcsZztyZXR1cm4gdCh0aGlzLChmdW5jdGlvbih0KXtzd2l0Y2godC5sYWJlbCl7Y2FzZSAwOnM9KGE9Y3x8e30pLmF1ZGllbmNlLHA9YS5zY29wZSx0LmxhYmVsPTE7Y2FzZSAxOmlmKHQudHJ5cy5wdXNoKFsxLDcsLDhdKSwhKHk9bD8oaz1mLmJvZHksUz1uZXcgVVJMU2VhcmNoUGFyYW1zKGspLF89e30sUy5mb3JFYWNoKChmdW5jdGlvbihlLHIpe19bcl09ZX0pKSxfKTpKU09OLnBhcnNlKGYuYm9keSkpLnJlZnJlc2hfdG9rZW4mJiJyZWZyZXNoX3Rva2VuIj09PXkuZ3JhbnRfdHlwZSl7aWYoYj1mdW5jdGlvbihlLHIpe3JldHVybiBuW28oZSxyKV19KHMscCksIWIpdGhyb3cgbmV3IEVycm9yKCJUaGUgd2ViIHdvcmtlciBpcyBtaXNzaW5nIHRoZSByZWZyZXNoIHRva2VuIik7Zi5ib2R5PWw/bmV3IFVSTFNlYXJjaFBhcmFtcyhlKGUoe30seSkse3JlZnJlc2hfdG9rZW46Yn0pKS50b1N0cmluZygpOkpTT04uc3RyaW5naWZ5KGUoZSh7fSx5KSx7cmVmcmVzaF90b2tlbjpifSkpfWQ9dm9pZCAwLCJmdW5jdGlvbiI9PXR5cGVvZiBBYm9ydENvbnRyb2xsZXImJihkPW5ldyBBYm9ydENvbnRyb2xsZXIsZi5zaWduYWw9ZC5zaWduYWwpLHY9dm9pZCAwLHQubGFiZWw9MjtjYXNlIDI6cmV0dXJuIHQudHJ5cy5wdXNoKFsyLDQsLDVdKSxbNCxQcm9taXNlLnJhY2UoWyhtPWksbmV3IFByb21pc2UoKGZ1bmN0aW9uKGUpe3JldHVybiBzZXRUaW1lb3V0KGUsbSl9KSkpLGZldGNoKHUsZSh7fSxmKSldKV07Y2FzZSAzOnJldHVybiB2PXQuc2VudCgpLFszLDVdO2Nhc2UgNDpyZXR1cm4gdz10LnNlbnQoKSxoLnBvc3RNZXNzYWdlKHtlcnJvcjp3Lm1lc3NhZ2V9KSxbMl07Y2FzZSA1OnJldHVybiB2P1s0LHYuanNvbigpXTooZCYmZC5hYm9ydCgpLGgucG9zdE1lc3NhZ2Uoe2Vycm9yOiJUaW1lb3V0IHdoZW4gZXhlY3V0aW5nICdmZXRjaCcifSksWzJdKTtjYXNlIDY6cmV0dXJuKHI9dC5zZW50KCkpLnJlZnJlc2hfdG9rZW4/KGZ1bmN0aW9uKGUscix0KXtuW28ocix0KV09ZX0oci5yZWZyZXNoX3Rva2VuLHMscCksZGVsZXRlIHIucmVmcmVzaF90b2tlbik6ZnVuY3Rpb24oZSxyKXtkZWxldGUgbltvKGUscildfShzLHApLGgucG9zdE1lc3NhZ2Uoe29rOnYub2ssanNvbjpyfSksWzMsOF07Y2FzZSA3OnJldHVybiBnPXQuc2VudCgpLGgucG9zdE1lc3NhZ2Uoe29rOiExLGpzb246e2Vycm9yX2Rlc2NyaXB0aW9uOmcubWVzc2FnZX19KSxbMyw4XTtjYXNlIDg6cmV0dXJuWzJdfXZhciBtLGssUyxffSkpfSkpfSkpfSgpOwoK",null,!1),new Worker(ga,e)},Ea={},xa=function(e,t){var i=Ea[t];return i||(i=e().finally((function(){delete Ea[t],i=null})),Ea[t]=i),i},Oa=function(){function e(e,t){this.cache=e,this.clientId=t,this.manifestKey=this.createManifestKeyFrom(this.clientId)}return e.prototype.add=function(e){var t;return p(this,void 0,void 0,(function(){var i,n;return h(this,(function(o){switch(o.label){case 0:return n=Set.bind,[4,this.cache.get(this.manifestKey)];case 1:return(i=new(n.apply(Set,[void 0,(null===(t=o.sent())||void 0===t?void 0:t.keys)||[]]))).add(e),[4,this.cache.set(this.manifestKey,{keys:g([],f(i),!1)})];case 2:return o.sent(),[2]}}))}))},e.prototype.remove=function(e){return p(this,void 0,void 0,(function(){var t,i;return h(this,(function(n){switch(n.label){case 0:return[4,this.cache.get(this.manifestKey)];case 1:return(t=n.sent())?((i=new Set(t.keys)).delete(e),i.size>0?[4,this.cache.set(this.manifestKey,{keys:g([],f(i),!1)})]:[3,3]):[3,5];case 2:case 4:return[2,n.sent()];case 3:return[4,this.cache.remove(this.manifestKey)];case 5:return[2]}}
1))}))},e.prototype.get=function(){return this.cache.get(this.manifestKey)},e.prototype.clear=function(){return this.cache.remove(this.manifestKey)},e.prototype.createManifestKeyFrom=function(e){return"".concat("@@earthoOnespajs@@","::").concat(e)},e}(),Ta=new ks,Da={memory:function(){return(new la).enclosedCache},localstorage:function(){return new aa}},Ra=function(e){return Da[e]},Aa=function(){function e(e){var t,i,n,o,r;if(this.options=e,"undefined"!=typeof window&&function(){if(!Us())throw new Error("For security reasons, `window.crypto` is required to run `eartho-one-js`.");if(void 0===zs())throw new Error("\n      eartho-one-js must run on a secure origin. See https://github.com/earthoOne/eartho-one-js/blob/master/FAQ.md#why-do-i-get-eartho-one-js-must-run-on-a-secure-origin for more information.\n    ")}(),e.domain=e.domain||"one.eartho.world",this.domainUrl=(n=this.options.domain,/^https?:\/\//.test(n)?n:"https://".concat(n)),this.tokenIssuer="https://one.eartho.world/",this.options.useRefreshTokens=!0,this.options.cacheLocation="localstorage",this.options.redirect_uri=this.options.redirect_uri||window.location.href,this.defaultScope=ra("openid",void 0!==(null===(i=null===(t=this.options)||void 0===t?void 0:t.advancedOptions)||void 0===i?void 0:i.defaultScope)?this.options.advancedOptions.defaultScope:"openid profile email"),e.cache&&e.cacheLocation&&console.warn("Both `cache` and `cacheLocation` options have been specified in the earthoOne configuration; ignoring `cacheLocation` and using `cache`."),e.cache)o=e.cache;else{if(this.cacheLocation=e.cacheLocation||"memory",!Ra(this.cacheLocation))throw new Error('Invalid cache location "'.concat(this.cacheLocation,'"'));o=Ra(this.cacheLocation)()}this.httpTimeoutMs=e.httpTimeoutInSeconds?1e3*e.httpTimeoutInSeconds:1e4,this.cookieStorage=!1===e.legacySameSiteCookie?Ca:ba,this.isConnectedCookieName=(r=this.options.client_id,"earthoOne.".concat(r,".is.authenticated")),this.sessionCheckExpiryDays=e.sessionCheckExpiryDays||1;var s=e.useCookiesForTransactions?this.cookieStorage:wa;this.scope=this.options.scope,this.transactionManager=new ua(s,this.options.client_id),this.nowProvider=this.options.nowProvider||Is,this.cacheManager=new ca(o,o.allKeys?null:new Oa(o,this.options.client_id),this.nowProvider),this.options.useRefreshTokens&&(this.scope=ra(this.scope,"offline_access")),"undefined"!=typeof window&&window.Worker&&this.options.useRefreshTokens&&"memory"===this.cacheLocation&&!/Trident.*rv:11\.0/.test(navigator.userAgent)&&(this.worker=new Sa),this.customOptions=function(e){return e.advancedOptions,e.audience,e.earthoOne,e.authorizeTimeoutInSeconds,e.cacheLocation,e.client_id,e.domain,e.issuer,e.leeway,e.max_age,e.redirect_uri,e.scope,e.useRefreshTokens,e.useCookiesForTransactions,e.useFormData,d(e,["advancedOptions","audience","earthoOne","authorizeTimeoutInSeconds","cacheLocation","client_id","domain","issuer","leeway","max_age","redirect_uri","scope","useRefreshTokens","useCookiesForTransactions","useFormData"])}(e)}return e.prototype._url=function(e){var t=encodeURIComponent(btoa(JSON.stringify(this.options.earthoOne||Ls)));return"".concat(this.domainUrl).concat(e,"&earthoOne=").concat(t)},e.prototype.connectWithPopup=function(e,t){return p(this,void 0,void 0,(function(){var i,n,o,r,s,a,l,c,p,f,g,v;return h(this,(function(h){switch(h.label){case 0:if(t=t||{},!e.access_id)throw new Error("PopupConnectOptions.accessId must be defined");if(!t.popup&&(t.popup=function(e){var t=window.screenX+(window.innerWidth-400)/2,i=window.screenY+(window.innerHeight-610)/2;return window.open("","earthoOne:authorize:popup","left=".concat(t,",top=").concat(i,",width=").concat(400,",height=").concat(610,",resizable,scrollbars=yes,status=1"))}(),!t.popup))throw new Error("Unable to open a popup for connectWithPopup - window.open returned `null`");return i=d(e,[]),n=Ys(Ks()),o=Ys(Ks()),r=Ks(),[4,Xs(r)];case 1:return s=h.sent(),a=Zs(s),l=this._getParams(i,n,o,a,this.options.redirect_uri||window.location.origin,e.access_id),c=this._connectUrl(u(u({},l),{response_mode:"web_message"})),t.popup.location.href=c,[4,Ws(u(u({},t),{timeoutInSeconds:t.timeoutInSeconds||this.options.authorizeTimeoutInSeconds||360}))];case 2:if(p=h.sent(),n!==p.state)throw new Error("Invalid state");return[4,na({audience:l.audience,scope:l.scope,baseUrl:"https://api.eartho.world/access/oauth/token",client_id:this.options.client_id,code_verifier:r,code:p.code,access_id:e.access_id,grant_type:"authorization_code",redirect_uri:l.redirect_uri,earthoOne:this.options.earthoOne,useFormData:this.options.useFormData,timeout:this.httpTimeoutMs},this.worker)];case 3:return f=h.sent(),[4,this._verifyIdToken(f.id_token,o)];case 4:return g=h.sent(),v=u(u({},f),{decodedToken:g,scope:l.scope,audience:l.audience||"default",client_id:this.options.client_id}),[4,this.cacheManager.set(v)];case 5:return h.sent(),this.cookieStorage.save(this.isConnectedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),[2]}}))}))},e.prototype.handleRedirectCallback=function(e){return void 0===e&&(e=window.location.href),p(this,void 0,void 0,(function(){var t,i,n,o,r,s,a,l,c,d,p;return h(this,(function(h){switch(h.label){case 0:if(0===(t=e.split("?").slice(1)).length)return[2];if(i=function(e){e.indexOf("#")>-1&&(e=e.substr(0,e.indexOf("#")));var t=e.split("&"),i={};return t.forEach((function(e){var t=f(e.split("="),2),n=t[0],o=t[1];i[n]=decodeURIComponent(o)}
1)),i.expires_in&&(i.expires_in=parseInt(i.expires_in)),i}(t.join("")),n=i.state,o=i.code,r=i.error,s=i.error_description,!n||!o)return[2];if(!(a=this.transactionManager.get()))throw new Error("Invalid transactionManager state");if(this.transactionManager.remove(),r)throw new Gs(r,s,n,a.appState);if(!a.code_verifier||a.state&&a.state!==n)throw new Error("Invalid state "+a.state+" ~~ "+n);return l={audience:a.audience,scope:a.scope,baseUrl:"https://api.eartho.world/access/oauth/token",client_id:this.options.client_id,code_verifier:a.code_verifier,code:o,access_id:a.access_id,grant_type:"authorization_code",earthoOne:this.options.earthoOne,useFormData:this.options.useFormData,timeout:this.httpTimeoutMs},void 0!==a.redirect_uri&&(l.redirect_uri=a.redirect_uri),[4,na(l,this.worker)];case 1:return c=h.sent(),[4,this._verifyIdToken(c.id_token,a.nonce)];case 2:return d=h.sent(),[4,this.cacheManager.set(u(u(u(u({},c),{decodedToken:d,audience:a.audience,scope:a.scope}),c.scope?{oauthTokenScope:c.scope}:null),{client_id:this.options.client_id}))];case 3:return h.sent(),this.cookieStorage.save(this.isConnectedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),p=location.href.split("?")[0],window.history.pushState("object",document.title,p),[2,{appState:a.appState}]}}))}))},e.prototype.connectWithRedirect=function(e){return void 0===e&&(e={}),p(this,void 0,void 0,(function(){var t,i,n;return h(this,(function(o){switch(o.label){case 0:return t=e.redirectMethod,i=d(e,["redirectMethod"]),[4,this.buildConnectUrl(i)];case 1:return n=o.sent(),window.location[t||"assign"](n),[2]}}))}))},e.prototype.getIdToken=function(e){return void 0===e&&(e={}),p(this,void 0,void 0,(function(){var t,i,n,o=this;return h(this,(function(r){return t=u(u({audience:this.options.audience,ignoreCache:!1},e),{scope:ra(this.defaultScope,this.scope,e.scope)}),i=t.ignoreCache,n=d(t,["ignoreCache"]),[2,xa((function(){return o._connectSilently(u({ignoreCache:i},n))}),"".concat(this.options.client_id,"::").concat(n.audience,"::").concat(n.scope))]}))}))},e.prototype.connectSilently=function(e){return void 0===e&&(e={}),p(this,void 0,void 0,(function(){var t,i,n,o=this;return h(this,(function(r){return t=u(u({audience:this.options.audience,ignoreCache:!1},e),{scope:ra(this.defaultScope,this.scope,e.scope)}),i=t.ignoreCache,n=d(t,["ignoreCache"]),[2,xa((function(){return o._connectSilently(u({ignoreCache:i},n))}),"".concat(this.options.client_id,"::").concat(n.audience,"::").concat(n.scope))]}))}))},e.prototype._connectSilently=function(e){return void 0===e&&(e={}),p(this,void 0,void 0,(function(){var t,i,n,o,r,s,a,l;return h(this,(function(c){switch(c.label){case 0:return t=e.ignoreCache,i=d(e,["ignoreCache"]),t?[3,2]:[4,this._getEntryFromCache({scope:i.scope,audience:i.audience||"default",client_id:this.options.client_id,getDetailedEntry:e.detailedResponse})];case 1:if(n=c.sent())return[2,n];c.label=2;case 2:return[4,(f=function(){return Ta.acquireLock("earthoOne.lock.getTokenSilently",5e3)},g=10,void 0===g&&(g=3),p(void 0,void 0,void 0,(function(){var e;return h(this,(function(t){switch(t.label){case 0:e=0,t.label=1;case 1:return e<g?[4,f()]:[3,4];case 2:if(t.sent())return[2,!0];t.label=3;case 3:return e++,[3,1];case 4:return[2,!1]}}))})))];case 3:if(!c.sent())return[3,12];c.label=4;case 4:return c.trys.push([4,,9,11]),t?[3,6]:[4,this._getEntryFromCache({scope:i.scope,audience:i.audience||"default",client_id:this.options.client_id,getDetailedEntry:e.detailedResponse})];case 5:if(n=c.sent())return[2,n];c.label=6;case 6:return[4,this._getTokenUsingRefreshToken(i)];case 7:return o=c.sent(),[4,this.cacheManager.set(u({client_id:this.options.client_id},o))];case 8:return c.sent(),this.cookieStorage.save(this.isConnectedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),e.detailedResponse?(r=o.id_token,s=o.access_token,a=o.oauthTokenScope,l=o.expires_in,[2,u(u({id_token:r,access_token:s},a?{scope:a}:null),{expires_in:l})]):[2,o.id_token];case 9:return[4,Ta.releaseLock("earthoOne.lock.getTokenSilently")];case 10:return c.sent(),[7];case 11:return[3,13];case 12:throw new Vs;case 13:return[2]}var f,g}))}))},e.prototype.getUser=function(e){return void 0===e&&(e={}),p(this,void 0,void 0,(function(){var t,i,n;return h(this,(function(o){switch(o.label){case 0:return t=e.audience||this.options.audience||"default",i=ra(this.defaultScope,this.scope,e.scope),[4,this.cacheManager.get(new sa({client_id:this.options.client_id,audience:t,scope:i}))];case 1:return[2,(n=o.sent())&&n.decodedToken&&n.decodedToken.user]}}
1))}))},e.prototype.isConnected=function(){return p(this,void 0,void 0,(function(){return h(this,(function(e){switch(e.label){case 0:return[4,this.getUser()];case 1:return[2,!!e.sent()]}}))}))},e.prototype.checkSession=function(e){return p(this,void 0,void 0,(function(){var t;return h(this,(function(i){switch(i.label){case 0:if(!this.cookieStorage.get(this.isConnectedCookieName)){if(!this.cookieStorage.get("earthoOne.is.authenticated"))return[2];this.cookieStorage.save(this.isConnectedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this.cookieStorage.remove("earthoOne.is.authenticated")}i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.connectSilently(e)];case 2:return i.sent(),[3,4];case 3:if(t=i.sent(),!Ns.includes(t.error))throw t;return[3,4];case 4:return[2]}}))}))},e.prototype.buildLogoutUrl=function(e){void 0===e&&(e={}),null!==e.client_id?e.client_id=e.client_id||this.options.client_id:delete e.client_id;var t=e.federated,i=d(e,["federated"]),n=t?"&federated":"";return this._url("/v2/logout?".concat(qs(i)))+n},e.prototype.logout=function(e){var t=this;void 0===e&&(e={});var i=e.localOnly,n=d(e,["localOnly"]);if(i&&n.federated)throw new Error("It is invalid to set both the `federated` and `localOnly` options to `true`");var o=function(){t.cookieStorage.remove(t.orgHintCookieName),t.cookieStorage.remove(t.isConnectedCookieName),i||t.buildLogoutUrl(n)};if(this.options.cache)return this.cacheManager.clear().then((function(){return o()}));this.cacheManager.clearSync(),o()},e.prototype._getTokenUsingRefreshToken=function(e){return p(this,void 0,void 0,(function(){var t,i,n,o,r,s,a,l,c;return h(this,(function(p){switch(p.label){case 0:return e.scope=ra(this.defaultScope,this.options.scope,e.scope),[4,this.cacheManager.get(new sa({scope:e.scope,audience:e.audience||"default",client_id:this.options.client_id}))];case 1:if(!((t=p.sent())&&t.refresh_token||this.worker))throw{error:"login_required",error_message:"Login required"};i=e.redirect_uri||this.options.redirect_uri||window.location.origin,o=e.scope,r=e.audience,s=d(e,["scope","audience","ignoreCache","timeoutInSeconds","detailedResponse"]),a="number"==typeof e.timeoutInSeconds?1e3*e.timeoutInSeconds:null,p.label=2;case 2:return p.trys.push([2,4,,5]),[4,na(u(u(u(u(u({},this.customOptions),s),{audience:r,scope:o,baseUrl:"https://api.eartho.world/access/oauth/refreshtoken",client_id:this.options.client_id,grant_type:"refresh_token",access_id:"",refresh_token:t&&t.refresh_token,redirect_uri:i}),a&&{timeout:a}),{earthoOne:this.options.earthoOne,useFormData:this.options.useFormData,timeout:this.httpTimeoutMs}),this.worker)];case 3:return n=p.sent(),[3,5];case 4:throw"The web worker is missing the refresh token"===(l=p.sent()).message||l.message&&l.message.indexOf("invalid refresh token"),l;case 5:return[4,this._verifyIdToken(n.id_token)];case 6:return c=p.sent(),[2,u(u({},n),{decodedToken:c,scope:e.scope,oauthTokenScope:n.scope,audience:e.audience||"default"})]}}))}))},e.prototype._getEntryFromCache=function(e){var t=e.scope,i=e.audience,n=e.client_id,o=e.getDetailedEntry,r=void 0!==o&&o;return p(this,void 0,void 0,(function(){var e,o,s,a,l;return h(this,(function(c){switch(c.label){case 0:return[4,this.cacheManager.get(new sa({scope:t,audience:i,client_id:n}),60)];case 1:return(e=c.sent())&&e.id_token?r?(o=e.id_token,s=e.access_token,a=e.oauthTokenScope,l=e.expires_in,[2,u(u({id_token:o,access_token:s},a?{scope:a}:null),{expires_in:l})]):[2,e.id_token]:[2]}}))}))},e.prototype._getParams=function(e,t,i,n,o,r){var s=this.options;s.useRefreshTokens,s.useCookiesForTransactions,s.useFormData,s.earthoOne;var a=s.enabledProviders;s.cacheLocation,s.advancedOptions,s.detailedResponse,s.nowProvider,s.authorizeTimeoutInSeconds,s.legacySameSiteCookie,s.sessionCheckExpiryDays,s.domain,s.leeway,s.httpTimeoutInSeconds;var l=d(s,["useRefreshTokens","useCookiesForTransactions","useFormData","earthoOne","enabledProviders","cacheLocation","advancedOptions","detailedResponse","nowProvider","authorizeTimeoutInSeconds","legacySameSiteCookie","sessionCheckExpiryDays","domain","leeway","httpTimeoutInSeconds"]);return u(u(u({},l),e),{scope:ra(this.defaultScope,this.scope,e.scope),response_type:"code",response_mode:"query",state:t,nonce:i,redirect_uri:o||this.options.redirect_uri,access_id:r,enabled_providers:a,code_challenge:n,code_challenge_method:"S256"})},e.prototype._connectUrl=function(e){return this._url("/connect?".concat(qs(e)))},e.prototype._verifyIdToken=function(e,t){return p(this,void 0,void 0,(function(){var i;return h(this,(function(n){switch(n.label){case 0:return[4,this.nowProvider()];case 1:return i=n.sent(),[2,ha({iss:this.tokenIssuer,aud:this.options.client_id,id_token:e,nonce:t,leeway:this.options.leeway,max_age:this._parseNumber(this.options.max_age),now:i})]}}))}))},e.prototype._parseNumber=function(e){return"string"!=typeof e?e:parseInt(e,10)||void 0},e.prototype.buildConnectUrl=function(e){return void 0===e&&(e={}),p(this,void 0,void 0,(function(){var t,i,n,o,r,s,a,l,c,u,p,f;return h(this,(function(h){switch(h.label){case 0:return t=e.redirect_uri,i=e.access_id,n=e.appState,o=d(e,["redirect_uri","access_id","appState"]),r=Ys(Ks()),s=Ys(Ks()),a=Ks(),[4,Xs(a)];case 1:return l=h.sent(),c=Zs(l),u=e.fragment?"#".concat(e.fragment):"",p=this._getParams(o,r,s,c,t,i),f=this._connectUrl(p),this.transactionManager.create({nonce:s,code_verifier:a,appState:n,access_id:i,scope:p.scope,audience:p.audience||"default",redirect_uri:p.redirect_uri,state:r}),[2,f+u]}}))}))},e}();var _a=(0,n.iH)(null),Pa=function(){function e(e,t){var i,o;this.clientOptions=e,this.pluginOptions=t,this._isLoading=(0,n.iH)(!0),this._isConnected=(0,n.iH)(!1),this._user=(0,n.iH)({}),this._idToken=(0,n.iH)(),this._error=(0,n.iH)(null),this.isLoading=(0,n.OT)(this._isLoading),this.isConnected=(0,n.OT)(this._isConnected),this.user=(0,n.OT)(this._user),this.idToken=(0,n.OT)(this._idToken),this.error=(0,n.OT)(this._error),i=this,o=["constructor"],Object.getOwnPropertyNames(Object.getPrototypeOf(i)).filter((function(e){return!o.includes(e)}
1)).forEach((function(e){return i[e]=i[e].bind(i)}))}return e.prototype.install=function(e){this._client=new Aa(o(o({},this.clientOptions),{earthoOne:{name:"one-client-vue",version:"1.0.2"}})),this.__checkSession(e.config.globalProperties.$router),e.config.globalProperties.$eartho=this,e.provide(a,this),_a.value=this},e.prototype.connectWithRedirect=function(e){return r(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this._client.connectWithRedirect(e)]}))}))},e.prototype.connectWithPopup=function(e,t){return r(this,void 0,void 0,(function(){var i=this;return s(this,(function(n){return[2,this.__proxy((function(){return i._client.connectWithPopup(e,t)}))]}))}))},e.prototype.logout=function(e){return r(this,void 0,void 0,(function(){var t=this;return s(this,(function(i){return(null==e?void 0:e.localOnly)?[2,this.__proxy((function(){return t._client.logout(e)}))]:[2,this._client.logout(e)]}))}))},e.prototype.connectSilently=function(e){return void 0===e&&(e={}),r(this,void 0,void 0,(function(){var t=this;return s(this,(function(i){return[2,this.__proxy((function(){return t._client.connectSilently(e)}))]}))}))},e.prototype.checkSession=function(e){return r(this,void 0,void 0,(function(){var t=this;return s(this,(function(i){return[2,this.__proxy((function(){return t._client.checkSession(e)}))]}))}))},e.prototype.handleRedirectCallback=function(e){return r(this,void 0,void 0,(function(){var t=this;return s(this,(function(i){return[2,this.__proxy((function(){return t._client.handleRedirectCallback(e)}))]}))}))},e.prototype.__checkSession=function(e){var t,i;return r(this,void 0,void 0,(function(){var n,o,r,a;return s(this,(function(s){switch(s.label){case 0:return!(n=window.location.search).includes("code=")&&!n.includes("error=")||!n.includes("state=")||(null===(t=this.pluginOptions)||void 0===t?void 0:t.skipRedirectCallback)?[3,2]:[4,this.handleRedirectCallback()];case 1:return o=s.sent(),r=null==o?void 0:o.appState,a=null!==(i=null==r?void 0:r.target)&&void 0!==i?i:"/",window.history.replaceState({},"","/"),e&&e.push(a),[2,o];case 2:return[4,this.checkSession()];case 3:s.sent(),s.label=4;case 4:return[2]}}
1))}))},e.prototype.__refreshState=function(){return r(this,void 0,void 0,(function(){var e,t;return s(this,(function(i){switch(i.label){case 0:return e=this._isConnected,[4,this._client.isConnected()];case 1:return e.value=i.sent(),t=this._user,[4,this._client.getUser()];case 2:return t.value=i.sent(),this._isLoading.value=!1,[2]}}))}))},e.prototype.__proxy=function(e,t){return void 0===t&&(t=!0),r(this,void 0,void 0,(function(){var i,n;return s(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,3,6]),[4,e()];case 1:return i=o.sent(),this._error.value=null,[3,6];case 2:throw n=o.sent(),this._error.value=n,n;case 3:return t?[4,this.__refreshState()]:[3,5];case 4:o.sent(),o.label=5;case 5:return[7];case 6:return[2,i]}}))}))},e}();function Ma(e,t){return new Pa(e,t)}},2949:function(e,t,i){i.d(t,{ZP:function(){return O}});var n=i(5677),o=i(1437),r=i(5220);const s=["innerHTML"];function a(e,t,i,a,l,c){return(0,n.wg)(),(0,n.j4)(o.uT,{"enter-active-class":c.transition.enter,"leave-active-class":c.transition.leave},{default:(0,n.w5)((()=>[(0,n.wy)((0,n._)("div",{class:(0,r.C_)(["c-toast",`c-toast--${i.type}`,`c-toast--${i.position}`]),onMouseover:t[0]||(t[0]=e=>c.toggleTimer(!0)),onMouseleave:t[1]||(t[1]=e=>c.toggleTimer(!1)),onClick:t[2]||(t[2]=(...e)=>c.click&&c.click(...e)),role:"alert",innerHTML:i.message},null,42,s),[[o.F8,l.isActive]])])),_:1},8,["enter-active-class","leave-active-class"])}const l=e=>{"undefined"!==typeof e.remove?e.remove():e.parentNode.removeChild(e)};class c{constructor(e,t){this.startedAt=Date.now(),this.callback=e,this.delay=t,this.timer=setTimeout(e,t)}pause(){this.stop(),this.delay-=Date.now()-this.startedAt}resume(){this.stop(),this.startedAt=Date.now(),this.timer=setTimeout(this.callback,this.delay)}stop(){clearTimeout(this.timer)}}const u={TOP_RIGHT:"top-right",TOP:"top",TOP_LEFT:"top-left",BOTTOM_RIGHT:"bottom-right",BOTTOM:"bottom",BOTTOM_LEFT:"bottom-left"};var d=Object.freeze(u);function p(e,t,i){let n=null;switch(e){case u.TOP:case u.TOP_RIGHT:case u.TOP_LEFT:n=t;break;case u.BOTTOM:case u.BOTTOM_RIGHT:case u.BOTTOM_LEFT:n=i;break}return n}i(2106);class h{constructor(){this.queue={}}$on(e,t){this.queue[e]=this.queue[e]||[],this.queue[e].push(t)}$off(e,t){if(this.queue[e])for(var i=0;i<this.queue[e].length;i++)if(this.queue[e][i]===t){this.queue[e].splice(i,1);break}}$emit(e,t){this.queue[e]&&this.queue[e].forEach((function(e){e(t)}))}}var f=new h,g={name:"toast",props:{message:{type:String,required:!0},type:{type:String,default:"default"},position:{type:String,default:d.BOTTOM_RIGHT,validator(e){return Object.values(d).includes(e)}},maxToasts:{type:[Number,Boolean],default:!1},duration:{type:[Number,Boolean],default:4e3},dismissible:{type:Boolean,default:!0},queue:{type:Boolean,default:!1},pauseOnHover:{type:Boolean,default:!0},useDefaultCss:{type:Boolean,default:!0},onClose:{type:Function,default:()=>{}},onClick:{type:Function,default:()=>{}}},data(){return{isActive:!1,parentTop:null,parentBottom:null,isHovered:!1,timer:null}},beforeMount(){this.createParents(),this.setDefaultCss(),this.setupContainer()},mounted(){this.showNotice(),f.$on("toast-clear",this.close)},methods:{createParents(){this.parentTop=document.querySelector(".c-toast-container--top"),this.parentBottom=document.querySelector(".c-toast-container--bottom"),this.parentTop&&this.parentBottom||(this.parentTop||(this.parentTop=document.createElement("div"),this.parentTop.className="c-toast-container c-toast-container--top"),this.parentBottom||(this.parentBottom=document.createElement("div"),this.parentBottom.className="c-toast-container c-toast-container--bottom"))},setDefaultCss(){const e=this.useDefaultCss?"add":"remove";this.parentTop.classList[e]("v--default-css"),this.parentBottom.classList[e]("v--default-css")},setupContainer(){const e=document.body;e.appendChild(this.parentTop),e.appendChild(this.parentBottom)},shouldQueue(){return!(!this.queue&&!1===this.maxToasts)&&(!1!==this.maxToasts?this.maxToasts<=this.parentTop.childElementCount+this.parentBottom.childElementCount:this.parentTop.childElementCount>0||this.parentBottom.childElementCount>0)},showNotice(){this.shouldQueue()?this.queueTimer=setTimeout(this.showNotice,250):(this.correctParent.insertAdjacentElement("afterbegin",this.$el),this.isActive=!0,this.timer=!1!==this.duration?new c(this.close,this.duration):null)},click(){this.onClick.apply(null,arguments),this.dismissible&&this.close()},toggleTimer(e){this.timer&&this.pauseOnHover&&(e?this.timer.pause():this.timer.resume())},stopTimer(){this.timer&&this.timer.stop(),clearTimeout(this.queueTimer)},close(){this.stopTimer(),this.isActive=!1,setTimeout((()=>{this.onClose.apply(null,arguments),l(this.$el)}),150)}},computed:{correctParent(){return p(this.position,this.parentTop,this.parentBottom)},transition(){return p(this.position,{enter:"fadeInDown",leave:"fadeOut"},{enter:"fadeInUp",leave:"fadeOut"})}},beforeUnmount(){f.$off("toast-clear",this.close)}},v=i(6268);const y=(0,v.Z)(g,[["render",a]]);var m=y;const C=()=>"undefined"!==typeof document&&document.createElement("div"),b=(e,{props:t,children:i,element:r,app:s}={})=>{let a=r||C(),l=(0,n.h)(e,t,i);s&&s._context&&(l.appContext=s._context),(0,o.sY)(l,a);const c=()=>{a&&(0,o.sY)(null,a),a=null,l=null};return{vNode:l,destroy:c,el:a}};var w=b;const S=(e={})=>({show(t,i={}){let n={message:t,...i};const o=w(m,{props:{...e,...n}});return o},clear(){f.$emit("toast-clear")},success(e,t={}){return t.type="success",this.show(e,t)}
1,error(e,t={}){return t.type="error",this.show(e,t)},info(e,t={}){return t.type="info",this.show(e,t)},warning(e,t={}){return t.type="warning",this.show(e,t)}});var E=S;const x=(e,t={})=>{let i=E(t);e.$toast=i,e.config.globalProperties.$toast=i};m.install=x;var O=m},6907:function(e,t,i){i.d(t,{$y:function(){return Re},B:function(){return s},BK:function(){return Xe},Bj:function(){return r},EB:function(){return c},Fl:function(){return tt},IU:function(){return Pe},Jd:function(){return R},OT:function(){return xe},PG:function(){return De},SU:function(){return We},Tn:function(){return Ue},Um:function(){return Ee},Vh:function(){return Je},WL:function(){return Ke},X$:function(){return M},X3:function(){return _e},XI:function(){return Ve},Xl:function(){return Me},YS:function(){return Oe},ZM:function(){return qe},cE:function(){return x},dq:function(){return Fe},iH:function(){return Ge},j:function(){return _},lk:function(){return A},nZ:function(){return l},oR:function(){return He},qj:function(){return Se},qq:function(){return S},sT:function(){return O},yT:function(){return Ae}});i(2106);var n=i(5220);let o;class r{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this.parent=o,!e&&o&&(this.index=(o.scopes||(o.scopes=[])).push(this)-1)}get active(){return this._active}run(e){if(this._active){const t=o;try{return o=this,e()}finally{o=t}}else 0}on(){o=this}off(){o=this.parent}stop(e){if(this._active){let t,i;for(t=0,i=this.effects.length;t<i;t++)this.effects[t].stop();for(t=0,i=this.cleanups.length;t<i;t++)this.cleanups[t]();if(this.scopes)for(t=0,i=this.scopes.length;t<i;t++)this.scopes[t].stop(!0);if(!this.detached&&this.parent&&!e){const e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.parent=void 0,this._active=!1}}}function s(e){return new r(e)}function a(e,t=o){t&&t.active&&t.effects.push(e)}function l(){return o}function c(e){o&&o.cleanups.push(e)}const u=e=>{const t=new Set(e);return t.w=0,t.n=0,t},d=e=>(e.w&y)>0,p=e=>(e.n&y)>0,h=({deps:e})=>{if(e.length)for(let t=0;t<e.length;t++)e[t].w|=y},f=e=>{const{deps:t}=e;if(t.length){let i=0;for(let n=0;n<t.length;n++){const o=t[n];d(o)&&!p(o)?o.delete(e):t[i++]=o,o.w&=~y,o.n&=~y}t.length=i}},g=new WeakMap;let v=0,y=1;const m=30;let C;const b=Symbol(""),w=Symbol("");class S{constructor(e,t=null,i){this.fn=e,this.scheduler=t,this.active=!0,this.deps=[],this.parent=void 0,a(this,i)}run(){if(!this.active)return this.fn();let e=C,t=T;while(e){if(e===this)return;e=e.parent}try{return this.parent=C,C=this,T=!0,y=1<<++v,v<=m?h(this):E(this),this.fn()}finally{v<=m&&f(this),y=1<<--v,C=this.parent,T=t,this.parent=void 0,this.deferStop&&this.stop()}}stop(){C===this?this.deferStop=!0:this.active&&(E(this),this.onStop&&this.onStop(),this.active=!1)}}function E(e){const{deps:t}=e;if(t.length){for(let i=0;i<t.length;i++)t[i].delete(e);t.length=0}}function x(e,t){e.effect instanceof S&&(e=e.effect.fn);const i=new S(e);t&&((0,n.l7)(i,t),t.scope&&a(i,t.scope)),t&&t.lazy||i.run();const o=i.run.bind(i);return o.effect=i,o}function O(e){e.effect.stop()}let T=!0;const D=[];function R(){D.push(T),T=!1}function A(){const e=D.pop();T=void 0===e||e}function _(e,t,i){if(T&&C){let t=g.get(e);t||g.set(e,t=new Map);let n=t.get(i);n||t.set(i,n=u());const o=void 0;P(n,o)}}function P(e,t){let i=!1;v<=m?p(e)||(e.n|=y,i=!d(e)):i=!e.has(C),i&&(e.add(C),C.deps.push(e))}function M(e,t,i,o,r,s){const a=g.get(e);if(!a)return;let l=[];if("clear"===t)l=[...a.values()];else if("length"===i&&(0,n.kJ)(e)){const e=Number(o);a.forEach(((t,i)=>{("length"===i||!(0,n.yk)(i)&&i>=e)&&l.push(t)}))}else switch(void 0!==i&&l.push(a.get(i)),t){case"add":(0,n.kJ)(e)?(0,n.S0)(i)&&l.push(a.get("length")):(l.push(a.get(b)),(0,n._N)(e)&&l.push(a.get(w)));break;case"delete":(0,n.kJ)(e)||(l.push(a.get(b)),(0,n._N)(e)&&l.push(a.get(w)));break;case"set":(0,n._N)(e)&&l.push(a.get(b));break}if(1===l.length)l[0]&&k(l[0]);else{const e=[];for(const t of l)t&&e.push(...t);k(u(e))}}function k(e,t){const i=(0,n.kJ)(e)?e:[...e];for(const n of i)n.computed&&N(n,t);for(const n of i)n.computed||N(n,t)}function N(e,t){(e!==C||e.allowRecurse)&&(e.scheduler?e.scheduler():e.run())}function L(e,t){var i;return null==(i=g.get(e))?void 0:i.get(t)}const I=(0,n.fY)("__proto__,__v_isRef,__isVue"),F=new Set(Object.getOwnPropertyNames(Symbol).filter((e=>"arguments"!==e&&"caller"!==e)).map((e=>Symbol[e])).filter(n.yk)),G=V();function V(){const e={};return["includes","indexOf","lastIndexOf"].forEach((t=>{e[t]=function(...e){const i=Pe(this);for(let t=0,o=this.length;t<o;t++)_(i,"get",t+"");const n=i[t](...e);return-1===n||!1===n?i[t](...e.map(Pe)):n}})),["push","pop","shift","unshift","splice"].forEach((t=>{e[t]=function(...e){R();const i=Pe(this)[t].apply(this,e);return A(),i}})),e}function B(e){const t=Pe(this);return _(t,"has",e),t.hasOwnProperty(e)}class j{constructor(e=!1,t=!1){this._isReadonly=e,this._shallow=t}get(e,t,i){const o=this._isReadonly,r=this._shallow;if("__v_isReactive"===t)return!o;if("__v_isReadonly"===t)return o;if("__v_isShallow"===t)return r;if("__v_raw"===t)return i===(o?r?Ce:me:r?ye:ve).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(i)?e:void 0;const s=(0,n.kJ)(e);if(!o){if(s&&(0,n.RI)(G,t))return Reflect.get(G,t,i);if("hasOwnProperty"===t)return B}const a=Reflect.get(e,t,i);return((0,n.yk)(t)?F.has(t):I(t))?a:(o||_(e,"get",t),r?a:Fe(a)?s&&(0,n.S0)(t)?a:a.value:(0,n.Kn)(a)?o?xe(a
1):Se(a):a)}}class H extends j{constructor(e=!1){super(!1,e)}set(e,t,i,o){let r=e[t];if(Re(r)&&Fe(r)&&!Fe(i))return!1;if(!this._shallow&&(Ae(i)||Re(i)||(r=Pe(r),i=Pe(i)),!(0,n.kJ)(e)&&Fe(r)&&!Fe(i)))return r.value=i,!0;const s=(0,n.kJ)(e)&&(0,n.S0)(t)?Number(t)<e.length:(0,n.RI)(e,t),a=Reflect.set(e,t,i,o);return e===Pe(o)&&(s?(0,n.aU)(i,r)&&M(e,"set",t,i,r):M(e,"add",t,i)),a}deleteProperty(e,t){const i=(0,n.RI)(e,t),o=e[t],r=Reflect.deleteProperty(e,t);return r&&i&&M(e,"delete",t,void 0,o),r}has(e,t){const i=Reflect.has(e,t);return(0,n.yk)(t)&&F.has(t)||_(e,"has",t),i}ownKeys(e){return _(e,"iterate",(0,n.kJ)(e)?"length":b),Reflect.ownKeys(e)}}class W extends j{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}}const U=new H,z=new W,K=new H(!0),Y=new W(!0),q=e=>e,X=e=>Reflect.getPrototypeOf(e);function $(e,t,i=!1,o=!1){e=e["__v_raw"];const r=Pe(e),s=Pe(t);i||((0,n.aU)(t,s)&&_(r,"get",t),_(r,"get",s));const{has:a}=X(r),l=o?q:i?Ne:ke;return a.call(r,t)?l(e.get(t)):a.call(r,s)?l(e.get(s)):void(e!==r&&e.get(t))}function Z(e,t=!1){const i=this["__v_raw"],o=Pe(i),r=Pe(e);return t||((0,n.aU)(e,r)&&_(o,"has",e),_(o,"has",r)),e===r?i.has(e):i.has(e)||i.has(r)}function J(e,t=!1){return e=e["__v_raw"],!t&&_(Pe(e),"iterate",b),Reflect.get(e,"size",e)}function Q(e){e=Pe(e);const t=Pe(this),i=X(t),n=i.has.call(t,e);return n||(t.add(e),M(t,"add",e,e)),this}function ee(e,t){t=Pe(t);const i=Pe(this),{has:o,get:r}=X(i);let s=o.call(i,e);s||(e=Pe(e),s=o.call(i,e));const a=r.call(i,e);return i.set(e,t),s?(0,n.aU)(t,a)&&M(i,"set",e,t,a):M(i,"add",e,t),this}function te(e){const t=Pe(this),{has:i,get:n}=X(t);let o=i.call(t,e);o||(e=Pe(e),o=i.call(t,e));const r=n?n.call(t,e):void 0,s=t.delete(e);return o&&M(t,"delete",e,void 0,r),s}function ie(){const e=Pe(this),t=0!==e.size,i=void 0,n=e.clear();return t&&M(e,"clear",void 0,void 0,i),n}function ne(e,t){return function(i,n){const o=this,r=o["__v_raw"],s=Pe(r),a=t?q:e?Ne:ke;return!e&&_(s,"iterate",b),r.forEach(((e,t)=>i.call(n,a(e),a(t),o)))}}function oe(e,t,i){return function(...o){const r=this["__v_raw"],s=Pe(r),a=(0,n._N)(s),l="entries"===e||e===Symbol.iterator&&a,c="keys"===e&&a,u=r[e](...o),d=i?q:t?Ne:ke;return!t&&_(s,"iterate",c?w:b),{next(){const{value:e,done:t}=u.next();return t?{value:e,done:t}:{value:l?[d(e[0]),d(e[1])]:d(e),done:t}},[Symbol.iterator](){return this}}}}function re(e){return function(...t){return"delete"!==e&&("clear"===e?void 0:this)}}function se(){const e={get(e){return $(this,e)},get size(){return J(this)},has:Z,add:Q,set:ee,delete:te,clear:ie,forEach:ne(!1,!1)},t={get(e){return $(this,e,!1,!0)},get size(){return J(this)},has:Z,add:Q,set:ee,delete:te,clear:ie,forEach:ne(!1,!0)},i={get(e){return $(this,e,!0)},get size(){return J(this,!0)},has(e){return Z.call(this,e,!0)},add:re("add"),set:re("set"),delete:re("delete"),clear:re("clear"),forEach:ne(!0,!1)},n={get(e){return $(this,e,!0,!0)},get size(){return J(this,!0)},has(e){return Z.call(this,e,!0)},add:re("add"),set:re("set"),delete:re("delete"),clear:re("clear"),forEach:ne(!0,!0)},o=["keys","values","entries",Symbol.iterator];return o.forEach((o=>{e[o]=oe(o,!1,!1),i[o]=oe(o,!0,!1),t[o]=oe(o,!1,!0),n[o]=oe(o,!0,!0)})),[e,i,t,n]}const[ae,le,ce,ue]=se();function de(e,t){const i=t?e?ue:ce:e?le:ae;return(t,o,r)=>"__v_isReactive"===o?!e:"__v_isReadonly"===o?e:"__v_raw"===o?t:Reflect.get((0,n.RI)(i,o)&&o in t?i:t,o,r)}const pe={get:de(!1,!1)},he={get:de(!1,!0)},fe={get:de(!0,!1)},ge={get:de(!0,!0)};const ve=new WeakMap,ye=new WeakMap,me=new WeakMap,Ce=new WeakMap;function be(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function we(e){return e["__v_skip"]||!Object.isExtensible(e)?0:be((0,n.W7)(e))}function Se(e){return Re(e)?e:Te(e,!1,U,pe,ve)}function Ee(e){return Te(e,!1,K,he,ye)}function xe(e){return Te(e,!0,z,fe,me)}function Oe(e){return Te(e,!0,Y,ge,Ce)}function Te(e,t,i,o,r){if(!(0,n.Kn)(e))return e;if(e["__v_raw"]&&(!t||!e["__v_isReactive"]))return e;const s=r.get(e);if(s)return s;const a=we(e);if(0===a)return e;const l=new Proxy(e,2===a?o:i);return r.set(e,l),l}function De(e){return Re(e)?De(e["__v_raw"]):!(!e||!e["__v_isReactive"])}function Re(e){return!(!e||!e["__v_isReadonly"])}function Ae(e){return!(!e||!e["__v_isShallow"])}function _e(e){return De(e)||Re(e)}function Pe(e){const t=e&&e["__v_raw"];return t?Pe(t):e}function Me(e){return(0,n.Nj)(e,"__v_skip",!0),e}const ke=e=>(0,n.Kn)(e)?Se(e):e,Ne=e=>(0,n.Kn)(e)?xe(e):e;function Le(e){T&&C&&(e=Pe(e),P(e.dep||(e.dep=u())))}function Ie(e,t){e=Pe(e);const i=e.dep;i&&k(i)}function Fe(e){return!(!e||!0!==e.__v_isRef)}function Ge(e){return Be(e,!1)}function Ve(e){return Be(e,!0)}function Be(e,t){return Fe(e)?e:new je(e,t)}class je{constructor(e,t){this.__v_isShallow=t,this.dep=void 0,this.__v_isRef=!0,this._rawValue=t?e:Pe(e),this._value=t?e:ke(e)}get value(){return Le(this),this._value}set value(e){const t=this.__v_isShallow||Ae(e)||Re(e);e=t?e:Pe(e),(0,n.aU)(e,this._rawValue)&&(this._rawValue=e,this._value=t?e:ke(e),Ie(this,e))}}function He(e){Ie(e,void 0)}function We(e){return Fe(e)?e.value:e}function Ue(e){return(0,n.mf)(e)?e():We(e)}const ze={get:(e,t,i)=>We(Reflect.get(e,t,i)),set:(e,t,i,n)=>{const o=e[t];return Fe(o)&&!Fe(i)?(o.value=i,!0):Reflect.set(e,t,i,n)}};function Ke(e){return De(e)?e:new Proxy(e,ze)}class Ye{constructor(e){this.dep=void 0,this.__v_isRef=!0;const{get:t,set:i}=e((()=>Le(this)),(()=>Ie(this)));this._get=t,this._set=i}get value(){return this._get()}set value(e){this._set(e)}}function qe(e){return new Ye(e)}function Xe(e){const t=(0,n.kJ)(e)?new Array(e.length):{};for(const i in e)t[i]=Qe(e,i);return t}class $e{constructor(e,t,i){this._object=e,this._key=t,this._defaultValue=i,this.__v_isRef=!0}get value(){const e=this._object[this._key];return void 0===e?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return L(Pe(this._object),this._key)}}class Ze{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function Je(e,t,i){return Fe(e)?e:(0,n.mf)(e)?new Ze(e):(0,n.Kn)(e)&&arguments.length>1?Qe(e,t,i):Ge(e)}function Qe(e,t,i){const n=e[t];return Fe(n)?n:new $e(e,t,i)}class et{constructor(e,t,i,n){this._setter=t,this.dep=void 0,this.__v_isRef=!0,this["__v_isReadonly"]=!1,this._dirty=!0,this.effect=new S(e,(()=>{this._dirty||(this._dirty=!0,Ie(this))})),this.effect.computed=this,this.effect.active=this._cacheable=!n,this["__v_isReadonly"]=i}get value(){const e=Pe(this);return Le(e),!e._dirty&&e._cacheable||(e._dirty=!1,e._value=e.effect.run()),e._value}set value(e){this._setter(e)}}function tt(e,t,i=!1){let o,r;const s=(0,n.mf)(e);s?(o=e,r=n.dG):(o=e.get,r=e.set);const a=new et(o,r,s||!r,i);return a}},5677:function(e,t,i){i.d(t,{$d:function(){return l},$y:function(){return n.$y},Ah:function(){return ut},B:function(){return n.B},BK:function(){return n.BK},Bj:function(){return n.Bj},Bz:function(){return Tt},C3:function(){return dn},C_:function(){return o.C_},Cn:function(){return H},EB:function(){return n.EB},EM:function(){return li},Eo:function(){return ki},F4:function(){return mn},FN:function(){return Mn},Fl:function(){return Qn},G:function(){return lo},Gn:function(){return _t},HX:function(){return W},HY:function(){return qi},Ho:function(){return Cn},IU:function(){return n.IU},JJ:function(){return si}
1,Jd:function(){return ct},KU:function(){return a},Ko:function(){return gt},LL:function(){return ie},MW:function(){return Ot},MX:function(){return oo},Mr:function(){return no},Nv:function(){return vt},OT:function(){return n.OT},Ob:function(){return Xe},P$:function(){return Ie},PG:function(){return n.PG},Q2:function(){return ne},Q6:function(){return He},RC:function(){return ze},Rh:function(){return be},Rr:function(){return Mt},S3:function(){return c},SU:function(){return n.SU},Tn:function(){return n.Tn},U2:function(){return Ge},Uc:function(){return to},Uk:function(){return bn},Um:function(){return n.Um},Us:function(){return Mi},Vf:function(){return Gt},Vh:function(){return n.Vh},WI:function(){return yt},WL:function(){return n.WL},WY:function(){return Dt},Wl:function(){return At},Wm:function(){return vn},Wu:function(){return s},X3:function(){return n.X3},XI:function(){return n.XI},Xl:function(){return n.Xl},Xn:function(){return at},Y1:function(){return zn},Y3:function(){return b},Y8:function(){return Me},YP:function(){return Ee},YS:function(){return n.YS},Yq:function(){return pt},Yu:function(){return Rt},ZK:function(){return r},ZM:function(){return n.ZM},Zq:function(){return io},_:function(){return gn},_A:function(){return o._A},aZ:function(){return We},b9:function(){return Pt},bT:function(){return ht},bv:function(){return st},cE:function(){return n.cE},d1:function(){return ft},dD:function(){return j},dG:function(){return Tn},dl:function(){return Ze},dq:function(){return n.dq},ec:function(){return N},eq:function(){return co},f3:function(){return ai},h:function(){return eo},hR:function(){return o.hR},i8:function(){return so},iD:function(){return an},iH:function(){return n.iH},ic:function(){return lt},j4:function(){return ln},j5:function(){return o.j5},kC:function(){return o.kC},kq:function(){return Sn},l1:function(){return kt},lA:function(){return cn},lR:function(){return Ki},m0:function(){return Ce},mW:function(){return P},mv:function(){return Bt},mx:function(){return Ct},n4:function(){return le},nJ:function(){return Ne},nK:function(){return je},nQ:function(){return ro},nZ:function(){return n.nZ},oR:function(){return n.oR},of:function(){return Kn},p1:function(){return Vt},qG:function(){return Zi},qZ:function(){return rn},qb:function(){return O},qj:function(){return n.qj},qq:function(){return n.qq},ry:function(){return uo},sT:function(){return n.sT},se:function(){return Je},sv:function(){return $i},tT:function(){return Nt},uE:function(){return wn},u_:function(){return Ft},up:function(){return ee},vl:function(){return dt},vs:function(){return o.vs},w5:function(){return U},wF:function(){return rt},wg:function(){return en},wy:function(){return Re},xv:function(){return Xi},yT:function(){return n.yT},yX:function(){return we},zw:function(){return o.zw}});i(2106);var n=i(6907),o=i(5220);function r(e,...t){}function s(e,t){}function a(e,t,i,n){let o;try{o=n?e(...n):e()}catch(r){c(r,t,i)}return o}function l(e,t,i,n){if((0,o.mf)(e)){const r=a(e,t,i,n);return r&&(0,o.tI)(r)&&r.catch((e=>{c(e,t,i)})),r}const r=[];for(let o=0;o<e.length;o++)r.push(l(e[o],t,i,n));return r}function c(e,t,i,n=!0){const o=t?t.vnode:null;if(t){let n=t.parent;const o=t.proxy,r=i;while(n){const t=n.ec;if(t)for(let i=0;i<t.length;i++)if(!1===t[i](e,o,r))return;n=n.parent}const s=t.appContext.config.errorHandler;if(s)return void a(s,null,10,[e,o,r])}u(e,i,o,n)}function u(e,t,i,n=!0){console.error(e)}let d=!1,p=!1;const h=[];let f=0;const g=[];let v=null,y=0;const m=Promise.resolve();let C=null;function b(e){const t=C||m;return e?t.then(this?e.bind(this):e):t}function w(e){let t=f+1,i=h.length;while(t<i){const n=t+i>>>1,o=h[n],r=R(o);r<e||r===e&&o.pre?t=n+1:i=n}return t}function S(e){h.length&&h.includes(e,d&&e.allowRecurse?f+1:f)||(null==e.id?h.push(e):h.splice(w(e.id),0,e),E())}function E(){d||p||(p=!0,C=m.then(_))}function x(e){const t=h.indexOf(e);t>f&&h.splice(t,1)}function O(e){(0,o.kJ)(e)?g.push(...e):v&&v.includes(e,e.allowRecurse?y+1:y)||g.push(e),E()}function T(e,t,i=(d?f+1:0)){for(0;i<h.length;i++){const t=h[i];if(t&&t.pre){if(e&&t.id!==e.uid)continue;0,h.splice(i,1),i--,t()}}}function D(e){if(g.length){const e=[...new Set(g)];if(g.length=0,v)return void v.push(...e);for(v=e,v.sort(((e,t)=>R(e)-R(t))),y=0;y<v.length;y++)v[y]();v=null,y=0}}const R=e=>null==e.id?1/0:e.id,A=(e,t)=>
1{const i=R(e)-R(t);if(0===i){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return i};function _(e){p=!1,d=!0,h.sort(A);o.dG;try{for(f=0;f<h.length;f++){const e=h[f];e&&!1!==e.active&&a(e,null,14)}}finally{f=0,h.length=0,D(e),d=!1,C=null,(h.length||g.length)&&_(e)}}let P,M=[],k=!1;function N(e,t){var i,n;if(P=e,P)P.enabled=!0,M.forEach((({event:e,args:t})=>P.emit(e,...t))),M=[];else if("undefined"!==typeof window&&window.HTMLElement&&!(null==(n=null==(i=window.navigator)?void 0:i.userAgent)?void 0:n.includes("jsdom"))){const e=t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[];e.push((e=>{N(e,t)})),setTimeout((()=>{P||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,k=!0,M=[])}),3e3)}else k=!0,M=[]}function L(e,t,...i){if(e.isUnmounted)return;const n=e.vnode.props||o.kT;let r=i;const s=t.startsWith("update:"),a=s&&t.slice(7);if(a&&a in n){const e=`${"modelValue"===a?"model":a}Modifiers`,{number:t,trim:s}=n[e]||o.kT;s&&(r=i.map((e=>(0,o.HD)(e)?e.trim():e))),t&&(r=i.map(o.h5))}let c;let u=n[c=(0,o.hR)(t)]||n[c=(0,o.hR)((0,o._A)(t))];!u&&s&&(u=n[c=(0,o.hR)((0,o.rs)(t))]),u&&l(u,e,6,r);const d=n[c+"Once"];if(d){if(e.emitted){if(e.emitted[c])return}else e.emitted={};e.emitted[c]=!0,l(d,e,6,r)}}function I(e,t,i=!1){const n=t.emitsCache,r=n.get(e);if(void 0!==r)return r;const s=e.emits;let a={},l=!1;if(!(0,o.mf)(e)){const n=e=>{const i=I(e,t,!0);i&&(l=!0,(0,o.l7)(a,i))};!i&&t.mixins.length&&t.mixins.forEach(n),e.extends&&n(e.extends),e.mixins&&e.mixins.forEach(n)}return s||l?((0,o.kJ)(s)?s.forEach((e=>a[e]=null)):(0,o.l7)(a,s),(0,o.Kn)(e)&&n.set(e,a),a):((0,o.Kn)(e)&&n.set(e,null),null)}function F(e,t){return!(!e||!(0,o.F7)(t))&&(t=t.slice(2).replace(/Once$/,""),(0,o.RI)(e,t[0].toLowerCase()+t.slice(1))||(0,o.RI)(e,(0,o.rs)(t))||(0,o.RI)(e,t))}let G=null,V=null;function B(e){const t=G;return G=e,V=e&&e.type.__scopeId||null,t}function j(e){V=e}function H(){V=null}const W=e=>U;function U(e,t=G,i){if(!t)return e;if(e._n)return e;const n=(...i)=>{n._d&&rn(-1);const o=B(t);let r;try{r=e(...i)}finally{B(o),n._d&&rn(1)}return r};return n._n=!0,n._c=!0,n._d=!0,n}function z(e){const{type:t,vnode:i,proxy:n,withProxy:r,props:s,propsOptions:[a],slots:l,attrs:u,emit:d,render:p,renderCache:h,data:f,setupState:g,ctx:v,inheritAttrs:y}=e;let m,C;const b=B(e);try{if(4&i.shapeFlag){const e=r||n,t=e;m=En(p.call(t,e,h,s,g,f,v)),C=u}else{const e=t;0,m=En(e.length>1?e(s,{attrs:u,slots:l,emit:d}):e(s,null)),C=t.props?u:Y(u)}}catch(S){Ji.length=0,c(S,e,1),m=vn($i)}let w=m;if(C&&!1!==y){const e=Object.keys(C),{shapeFlag:t}=w;e.length&&7&t&&(a&&e.some(o.tR)&&(C=q(C,a)),w=Cn(w,C))}return i.dirs&&(w=Cn(w),w.dirs=w.dirs?w.dirs.concat(i.dirs):i.dirs),i.transition&&(w.transition=i.transition),m=w,B(b),m}function K(e){let t;for(let i=0;i<e.length;i++){const n=e[i];if(!cn(n))return;if(n.type!==$i||"v-if"===n.children){if(t)return;t=n}}return t}const Y=e=>{let t;for(const i in e)("class"===i||"style"===i||(0,o.F7)(i))&&((t||(t={}))[i]=e[i]);return t},q=(e,t)=>{const i={};for(const n in e)(0,o.tR)(n)&&n.slice(9)in t||(i[n]=e[n]);return i};function X(e,t,i){const{props:n,children:o,component:r}=e,{props:s,children:a,patchFlag:l}=t,c=r.emitsOptions;if(t.dirs||t.transition)return!0;if(!(i&&l>=0))return!(!o&&!a||a&&a.$stable)||n!==s&&(n?!s||$(n,s,c):!!s);if(1024&l)return!0;if(16&l)return n?$(n,s,c):!!s;if(8&l){const e=t.dynamicProps;for(let t=0;t<e.length;t++){const i=e[t];if(s[i]!==n[i]&&!F(c,i))return!0}}return!1}function $(e,t,i){const n=Object.keys(t);if(n.length!==Object.keys(e).length)return!0;for(let o=0;o<n.length;o++){const r=n[o];if(t[r]!==e[r]&&!F(i,r))return!0}return!1}function Z({vnode:e,parent:t},i){while(t&&t.subTree===e)(e=t.vnode).el=i,t=t.parent}const J="components",Q="directives";function ee(e,t){return oe(J,e,!0,t)||e}const te=Symbol.for("v-ndc");function ie(e){return(0,o.HD)(e)?oe(J,e,!1)||e:e||te}function ne(e){return oe(Q,e)}function oe(e,t,i=!0,n=!1){const r=G||Pn;if(r){const i=r.type;if(e===J){const e=Zn(i,!1);if(e&&(e===t||e===(0,o._A)(t)||e===(0,o.kC)((0,o._A)(t))))return i}const s=re(r[e]||i[e],t)||re(r.appContext[e],t);return!s&&n?i:s}}function re(e,t){return e&&(e[t]||e[(0,o._A)(t)]||e[(0,o.kC)((0,o._A)(t))])}const se=e=>e.__isSuspense,ae={name:"Suspense",__isSuspense:!0,process(e,t,i,n,o,r,s,a,l,c){null==e?ue(t,i,n,o,r,s,a,l,c):de(e,t,i,n,o,s,a,l,c)},hydrate:he,create:pe,normalize:fe},le=ae;function ce(e,t){const i=e.props&&e.props[t];(0,o.mf)(i)&&i()}function ue(e,t,i,n,o,r,s,a,l){const{p:c,o:{createElement:u}}=l,d=u("div"),p=e.suspense=pe(e,o,n,t,d,i,r,s,a,l);c(null,p.pendingBranch=e.ssContent,d,null,n,p,r,s),p.deps>
10?(ce(e,"onPending"),ce(e,"onFallback"),c(null,e.ssFallback,t,i,n,null,r,s),ye(p,e.ssFallback)):p.resolve(!1,!0)}function de(e,t,i,n,o,r,s,a,{p:l,um:c,o:{createElement:u}}){const d=t.suspense=e.suspense;d.vnode=t,t.el=e.el;const p=t.ssContent,h=t.ssFallback,{activeBranch:f,pendingBranch:g,isInFallback:v,isHydrating:y}=d;if(g)d.pendingBranch=p,un(p,g)?(l(g,p,d.hiddenContainer,null,o,d,r,s,a),d.deps<=0?d.resolve():v&&(l(f,h,i,n,o,null,r,s,a),ye(d,h))):(d.pendingId++,y?(d.isHydrating=!1,d.activeBranch=g):c(g,o,d),d.deps=0,d.effects.length=0,d.hiddenContainer=u("div"),v?(l(null,p,d.hiddenContainer,null,o,d,r,s,a),d.deps<=0?d.resolve():(l(f,h,i,n,o,null,r,s,a),ye(d,h))):f&&un(p,f)?(l(f,p,i,n,o,d,r,s,a),d.resolve(!0)):(l(null,p,d.hiddenContainer,null,o,d,r,s,a),d.deps<=0&&d.resolve()));else if(f&&un(p,f))l(f,p,i,n,o,d,r,s,a),ye(d,p);else if(ce(t,"onPending"),d.pendingBranch=p,d.pendingId++,l(null,p,d.hiddenContainer,null,o,d,r,s,a),d.deps<=0)d.resolve();else{const{timeout:e,pendingId:t}=d;e>0?setTimeout((()=>{d.pendingId===t&&d.fallback(h)}),e):0===e&&d.fallback(h)}}function pe(e,t,i,n,r,s,a,l,u,d,p=!1){const{p:h,m:f,um:g,n:v,o:{parentNode:y,remove:m}}=d;let C;const b=me(e);b&&(null==t?void 0:t.pendingBranch)&&(C=t.pendingId,t.deps++);const w=e.props?(0,o.He)(e.props.timeout):void 0;const S={vnode:e,parent:t,parentComponent:i,isSVG:a,container:n,hiddenContainer:r,anchor:s,deps:0,pendingId:0,timeout:"number"===typeof w?w:-1,activeBranch:null,pendingBranch:null,isInFallback:!0,isHydrating:p,isUnmounted:!1,effects:[],resolve(e=!1,i=!1){const{vnode:n,activeBranch:o,pendingBranch:r,pendingId:s,effects:a,parentComponent:l,container:c}=S;let u=!1;if(S.isHydrating)S.isHydrating=!1;else if(!e){u=o&&r.transition&&"out-in"===r.transition.mode,u&&(o.transition.afterLeave=()=>{s===S.pendingId&&(f(r,c,v(o),0),O(a))});let{anchor:e}=S;o&&(e=v(o),g(o,l,S,!0)),u||f(r,c,e,0)}ye(S,r),S.pendingBranch=null,S.isInFallback=!1;let d=S.parent,p=!1;while(d){if(d.pendingBranch){d.effects.push(...a),p=!0;break}d=d.parent}p||u||O(a),S.effects=[],b&&t&&t.pendingBranch&&C===t.pendingId&&(t.deps--,0!==t.deps||i||t.resolve()),ce(n,"onResolve")},fallback(e){if(!S.pendingBranch)return;const{vnode:t,activeBranch:i,parentComponent:n,container:o,isSVG:r}=S;ce(t,"onFallback");const s=v(i),a=()=>{S.isInFallback&&(h(null,e,o,s,n,null,r,l,u),ye(S,e))},c=e.transition&&"out-in"===e.transition.mode;c&&(i.transition.afterLeave=a),S.isInFallback=!0,g(i,n,null,!0),c||a()},move(e,t,i){S.activeBranch&&f(S.activeBranch,e,t,i),S.container=e},next(){return S.activeBranch&&v(S.activeBranch)},registerDep(e,t){const i=!!S.pendingBranch;i&&S.deps++;const n=e.vnode.el;e.asyncDep.catch((t=>{c(t,e,0)})).then((o=>{if(e.isUnmounted||S.isUnmounted||S.pendingId!==e.suspenseId)return;e.asyncResolved=!0;const{vnode:r}=e;Un(e,o,!1),n&&(r.el=n);const s=!n&&e.subTree.el;t(e,r,y(n||e.subTree.el),n?null:v(e.subTree),S,a,u),s&&m(s),Z(e,r.el),i&&0===--S.deps&&S.resolve()}))},unmount(e,t){S.isUnmounted=!0,S.activeBranch&&g(S.activeBranch,i,e,t),S.pe
1ndingBranch&&g(S.pendingBranch,i,e,t)}};return S}function he(e,t,i,n,o,r,s,a,l){const c=t.suspense=pe(t,n,i,e.parentNode,document.createElement("div"),null,o,r,s,a,!0),u=l(e,c.pendingBranch=t.ssContent,i,c,r,s);return 0===c.deps&&c.resolve(!1,!0),u}function fe(e){const{shapeFlag:t,children:i}=e,n=32&t;e.ssContent=ge(n?i.default:i),e.ssFallback=n?ge(i.fallback):vn($i)}function ge(e){let t;if((0,o.mf)(e)){const i=on&&e._c;i&&(e._d=!1,en()),e=e(),i&&(e._d=!0,t=Qi,tn())}if((0,o.kJ)(e)){const t=K(e);0,e=t}return e=En(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter((t=>t!==e))),e}function ve(e,t){t&&t.pendingBranch?(0,o.kJ)(e)?t.effects.push(...e):t.effects.push(e):O(e)}function ye(e,t){e.activeBranch=t;const{vnode:i,parentComponent:n}=e,o=i.el=t.el;n&&n.subTree===i&&(n.vnode.el=o,Z(n,o))}function me(e){var t;return null!=(null==(t=e.props)?void 0:t.suspensible)&&!1!==e.props.suspensible}function Ce(e,t){return xe(e,null,t)}function be(e,t){return xe(e,null,{flush:"post"})}function we(e,t){return xe(e,null,{flush:"sync"})}const Se={};function Ee(e,t,i){return xe(e,t,i)}function xe(e,t,{immediate:i,deep:r,flush:s,onTrack:c,onTrigger:u}=o.kT){var d;const p=(0,n.nZ)()===(null==(d=Pn)?void 0:d.scope)?Pn:null;let h,f,g=!1,v=!1;if((0,n.dq)(e)?(h=()=>e.value,g=(0,n.yT)(e)):(0,n.PG)(e)?(h=()=>e,r=!0):(0,o.kJ)(e)?(v=!0,g=e.some((e=>(0,n.PG)(e)||(0,n.yT)(e))),h=()=>e.map((e=>(0,n.dq)(e)?e.value:(0,n.PG)(e)?De(e):(0,o.mf)(e)?a(e,p,2):void 0))):h=(0,o.mf)(e)?t?()=>a(e,p,2):()=>{if(!p||!p.isUnmounted)return f&&f(),l(e,p,3,[m])}:o.dG,t&&r){const e=h;h=()=>De(e())}let y,m=e=>{f=E.onStop=()=>{a(e,p,4),f=E.onStop=void 0}};if(jn){if(m=o.dG,t?i&&l(t,p,3,[h(),v?[]:void 0,m]):h(),"sync"!==s)return o.dG;{const e=io();y=e.__watcherHandles||(e.__watcherHandles=[])}}let C=v?new Array(e.length).fill(Se):Se;const b=()=>{if(E.active)if(t){const e=E.run();(r||g||(v?e.some(((e,t)=>(0,o.aU)(e,C[t]))):(0,o.aU)(e,C)))&&(f&&f(),l(t,p,3,[e,C===Se?void 0:v&&C[0]===Se?[]:C,m]),C=e)}else E.run()};let w;b.allowRecurse=!!t,"sync"===s?w=b:"post"===s?w=()=>Pi(b,p&&p.suspense):(b.pre=!0,p&&(b.id=p.uid),w=()=>S(b));const E=new n.qq(h,w);t?i?b():C=E.run():"post"===s?Pi(E.run.bind(E),p&&p.suspense):E.run();const x=()=>{E.stop(),p&&p.scope&&(0,o.Od)(p.scope.effects,E)};return y&&y.push(x),x}function Oe(e,t,i){const n=this.proxy,r=(0,o.HD)(e)?e.includes(".")?Te(n,e):()=>n[e]:e.bind(n,n);let s;(0,o.mf)(t)?s=t:(s=t.handler,i=t);const a=Pn;In(this);const l=xe(r,s.bind(n),i);return a?In(a):Fn(),l}function Te(e,t){const i=t.split(".");return()=>{let t=e;for(let e=0;e<i.length&&t;e++)t=t[i[e]];return t}}function De(e,t){if(!(0,o.Kn)(e)||e["__v_skip"])return e;if(t=t||new Set,t.has(e))return e;if(t.add(e),(0,n.dq)(e))De(e.value,t);else if((0,o.kJ)(e))for(let i=0;i<e.length;i++)De(e[i],t);else if((0,o.DM)(e)||(0,o._N)(e))e.forEach((e=>{De(e,t)}));else if((0,o.PO)(e))for(const i in e)De(e[i],t);return e}function Re(e,t){const i=G;if(null===i)return e;const n=$n(i)||i.proxy,r=e.dirs||(e.dirs=[]);for(let s=0;s<t.length;s++){let[e,i,a,l=o.kT]=t[s];e&&((0,o.mf)(e)&&(e={mounted:e,updated:e}),e.deep&&De(i),r.push({dir:e,instance:n,value:i,oldValue:void 0,arg:a,modifiers:l}))}return e}function Ae(e,t,i,o){const r=e.dirs,s=t&&t.dirs;for(let a=0;a<r.length;a++){const c=r[a];s&&(c.oldValue=s[a].value);let u=c.dir[o];u&&((0,n.Jd)(),l(u,i,8,[e.el,c,e,t]),(0,n.lk)())}}const _e=Symbol("_leaveCb"),Pe=Symbol("_enterCb");function Me(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return st((()=>{e.isMounted=!0})),ct((()=>{e.isUnmounting=!0})),e}const ke=[Function,Array],Ne={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:ke,onEnter:ke,onAfterEnter:ke,onEnterCancelled:ke,onBeforeLeave:ke,onLeave:ke,onAfterLeave:ke,onLeaveCancelled:ke,onBeforeAppear:ke,onAppear:ke,onAfterAppear:ke,onAppearCancelled:ke},Le={name:"BaseTransition",props:Ne,setup(e,{slots:t}){const i=Mn(),o=Me();let r;return()=>{const s=t.default&&He(t.default(),!0);if(!s||!s.length)return;let a=s[0];if(s.length>1){let e=!1;for(const t of s)if(t.type!==$i){0,a=t,e=!0;break}}const l=(0,n.IU)(e),{mode:c}=l;if(o.isLeaving)return Ve(a);const u=Be(a);if(!u)return Ve(a);const d=Ge(u,l,o,i);je(u,d);const p=i.subTree,h=p&&Be(p);let f=!1;const{getTransitionKey:g}=u.type;if(g){const e=g();void 0===r?r=e:e!==r&&(r=e,f=!0)}if(h&&h.type!==$i&&(!un(u,h)||f)){const e=Ge(h,l,o,i);if(je(h,e),"out-in"===c)return o.isLeaving=!0,e.afterLeave=()=>{o.isLeaving=!1,!1!==i.update.active&&i.update()},Ve(a);"in-out"===c&&u.type!==$i&&(e.delayLeave=(e,t,i)=>{const n=Fe(o,h);n[String(h.key)]=h,e[_e]=()=>{t(),e[_e]=void 0,delete d.delayedLeave},d.delayedLeave=i})}return a}}},Ie=Le;
1function Fe(e,t){const{leavingVNodes:i}=e;let n=i.get(t.type);return n||(n=Object.create(null),i.set(t.type,n)),n}function Ge(e,t,i,n){const{appear:r,mode:s,persisted:a=!1,onBeforeEnter:c,onEnter:u,onAfterEnter:d,onEnterCancelled:p,onBeforeLeave:h,onLeave:f,onAfterLeave:g,onLeaveCancelled:v,onBeforeAppear:y,onAppear:m,onAfterAppear:C,onAppearCancelled:b}=t,w=String(e.key),S=Fe(i,e),E=(e,t)=>{e&&l(e,n,9,t)},x=(e,t)=>{const i=t[1];E(e,t),(0,o.kJ)(e)?e.every((e=>e.length<=1))&&i():e.length<=1&&i()},O={mode:s,persisted:a,beforeEnter(t){let n=c;if(!i.isMounted){if(!r)return;n=y||c}t[_e]&&t[_e](!0);const o=S[w];o&&un(e,o)&&o.el[_e]&&o.el[_e](),E(n,[t])},enter(e){let t=u,n=d,o=p;if(!i.isMounted){if(!r)return;t=m||u,n=C||d,o=b||p}let s=!1;const a=e[Pe]=t=>{s||(s=!0,E(t?o:n,[e]),O.delayedLeave&&O.delayedLeave(),e[Pe]=void 0)};t?x(t,[e,a]):a()},leave(t,n){const o=String(e.key);if(t[Pe]&&t[Pe](!0),i.isUnmounting)return n();E(h,[t]);let r=!1;const s=t[_e]=i=>{r||(r=!0,n(),E(i?v:g,[t]),t[_e]=void 0,S[o]===e&&delete S[o])};S[o]=e,f?x(f,[t,s]):s()},clone(e){return Ge(e,t,i,n)}};return O}function Ve(e){if(Ye(e))return e=Cn(e),e.children=null,e}function Be(e){return Ye(e)?e.children?e.children[0]:void 0:e}function je(e,t){6&e.shapeFlag&&e.component?je(e.component.subTree,t):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function He(e,t=!1,i){let n=[],o=0;for(let r=0;r<e.length;r++){let s=e[r];const a=null==i?s.key:String(i)+String(null!=s.key?s.key:r);s.type===qi?(128&s.patchFlag&&o++,n=n.concat(He(s.children,t,a))):(t||s.type!==$i)&&n.push(null!=a?Cn(s,{key:a}):s)}if(o>1)for(let r=0;r<n.length;r++)n[r].patchFlag=-2;return n}
2/*! #__NO_SIDE_EFFECTS__ */function We(e,t){return(0,o.mf)(e)?(()=>(0,o.l7)({name:e.name},t,{setup:e}))():e}const Ue=e=>!!e.type.__asyncLoader
3/*! #__NO_SIDE_EFFECTS__ */;function ze(e){(0,o.mf)(e)&&(e={loader:e});const{loader:t,loadingComponent:i,errorComponent:r,delay:s=200,timeout:a,suspensible:l=!0,onError:u}=e;let d,p=null,h=0;const f=()=>(h++,p=null,g()),g=()=>{let e;return p||(e=p=t().catch((e=>{if(e=e instanceof Error?e:new Error(String(e)),u)return new Promise(((t,i)=>{const n=()=>t(f()),o=()=>i(e);u(e,n,o,h+1)}));throw e})).then((t=>e!==p&&p?p:(t&&(t.__esModule||"Module"===t[Symbol.toStringTag])&&(t=t.default),d=t,t))))};return We({name:"AsyncComponentWrapper",__asyncLoader:g,get __asyncResolved(){return d},setup(){const e=Pn;if(d)return()=>Ke(d,e);const t=t=>{p=null,c(t,e,13,!r)};if(l&&e.suspense||jn)return g().then((t=>()=>Ke(t,e))).catch((e=>(t(e),()=>r?vn(r,{error:e}):null)));const o=(0,n.iH)(!1),u=(0,n.iH)(),h=(0,n.iH)(!!s);return s&&setTimeout((()=>{h.value=!1}),s),null!=a&&setTimeout((()=>{if(!o.value&&!u.value){const e=new Error(`Async component timed out after ${a}ms.`);t(e),u.value=e}}),a),g().then((()=>{o.value=!0,e.parent&&Ye(e.parent.vnode)&&S(e.parent.update)})).catch((e=>{t(e),u.value=e})),()=>o.value&&d?Ke(d,e):u.value&&r?vn(r,{error:u.value}):i&&!h.value?vn(i):void 0}})}function Ke(e,t){const{ref:i,props:n,children:o,ce:r}=t.vnode,s=vn(e,n,o);return s.ref=i,s.ce=r,delete t.vnode.ce,s}const Ye=e=>e.type.__isKeepAlive,qe={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const i=Mn(),n=i.ctx;if(!n.renderer)return()=>{const e=t.default&&t.default();return e&&1===e.length?e[0]:e};const r=new Map,s=new Set;let a=null;const l=i.suspense,{renderer:{p:c,m:u,um:d,o:{createElement:p}}}=n,h=p("div");function f(e){tt(e),d(e,i,l,!0)}function g(e){r.forEach(((t,i)=>{const n=Zn(t.type);!n||e&&e(n)||v(i)}))}function v(e){const t=r.get(e);a&&un(t,a)?a&&tt(a):f(t),r.delete(e),s.delete(e)}n.activate=(e,t,i,n,r)=>{const s=e.component;u(e,t,i,0,l),c(s.vnode,e,t,i,s,l,n,e.slotScopeIds,r),Pi((()=>{s.isDeactivated=!1,s.a&&(0,o.ir)(s.a);const t=e.props&&e.props.onVnodeMounted;t&&Dn(t,s.parent,e)}),l)},n.deactivate=e=>{const t=e.component;u(e,h,null,1,l),Pi((()=>{t.da&&(0,o.ir)(t.da);const i=e.props&&e.props.onVnodeUnmounted;i&&Dn(i,t.parent,e),t.isDeactivated=!0}),l)},Ee((()=>[e.include,e.exclude]),(([e,t])=>{e&&g((t=>$e(e,t))),t&&g((e=>!$e(t,e)))}),{flush:"post",deep:!0});let y=null;const m=()=>{null!=y&&r.set(y,it(i.subTree))};return st(m),lt(m),ct((()=>{r.forEach((e=>{const{subTree:t,suspense:n}=i,o=it(t);if(e.type!==o.type||e.key!==o.key)f(e);else{tt(o);const e=o.component.da;e&&Pi(e,n)}}))})),()=>{if(y=null,!t.default)return null;const i=t.default(),n=i[0];if(i.length>1)return a=null,i;
3if(!cn(n)||!(4&n.shapeFlag)&&!(128&n.shapeFlag))return a=null,n;let o=it(n);const l=o.type,c=Zn(Ue(o)?o.type.__asyncResolved||{}:l),{include:u,exclude:d,max:p}=e;if(u&&(!c||!$e(u,c))||d&&c&&$e(d,c))return a=o,n;const h=null==o.key?l:o.key,f=r.get(h);return o.el&&(o=Cn(o),128&n.shapeFlag&&(n.ssContent=o)),y=h,f?(o.el=f.el,o.component=f.component,o.transition&&je(o,o.transition),o.shapeFlag|=512,s.delete(h),s.add(h)):(s.add(h),p&&s.size>parseInt(p,10)&&v(s.values().next().value)),o.shapeFlag|=256,a=o,se(n.type)?n:o}}},Xe=qe;function $e(e,t){return(0,o.kJ)(e)?e.some((e=>$e(e,t))):(0,o.HD)(e)?e.split(",").includes(t):!!(0,o.Kj)(e)&&e.test(t)}function Ze(e,t){Qe(e,"a",t)}function Je(e,t){Qe(e,"da",t)}function Qe(e,t,i=Pn){const n=e.__wdc||(e.__wdc=()=>{let t=i;while(t){if(t.isDeactivated)return;t=t.parent}return e()});if(nt(t,n,i),i){let e=i.parent;while(e&&e.parent)Ye(e.parent.vnode)&&et(n,t,i,e),e=e.parent}}function et(e,t,i,n){const r=nt(t,e,n,!0);ut((()=>{(0,o.Od)(n[t],r)}),i)}function tt(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function it(e){return 128&e.shapeFlag?e.ssContent:e}function nt(e,t,i=Pn,o=!1){if(i){const r=i[e]||(i[e]=[]),s=t.__weh||(t.__weh=(...o)=>{if(i.isUnmounted)return;(0,n.Jd)(),In(i);const r=l(t,i,e,o);return Fn(),(0,n.lk)(),r});return o?r.unshift(s):r.push(s),s}}const ot=e=>(t,i=Pn)=>(!jn||"sp"===e)&&nt(e,((...e)=>t(...e)),i),rt=ot("bm"),st=ot("m"),at=ot("bu"),lt=ot("u"),ct=ot("bum"),ut=ot("um"),dt=ot("sp"),pt=ot("rtg"),ht=ot("rtc");function ft(e,t=Pn){nt("ec",e,t)}function gt(e,t,i,n){let r;const s=i&&i[n];if((0,o.kJ)(e)||(0,o.HD)(e)){r=new Array(e.length);for(let i=0,n=e.length;i<n;i++)r[i]=t(e[i],i,void 0,s&&s[i])}else if("number"===typeof e){0,r=new Array(e);for(let i=0;i<e;i++)r[i]=t(i+1,i,void 0,s&&s[i])}else if((0,o.Kn)(e))if(e[Symbol.iterator])r=Array.from(e,((e,i)=>t(e,i,void 0,s&&s[i])));else{const i=Object.keys(e);r=new Array(i.length);for(let n=0,o=i.length;n<o;n++){const o=i[n];r[n]=t(e[o],o,n,s&&s[n])}}else r=[];return i&&(i[n]=r),r}function vt(e,t){for(let i=0;i<t.length;i++){const n=t[i];if((0,o.kJ)(n))for(let t=0;t<n.length;t++)e[n[t].name]=n[t].fn;else n&&(e[n.name]=n.key?(...e)=>{const t=n.fn(...e);return t&&(t.key=n.key),t}:n.fn)}return e}function yt(e,t,i={},n,o){if(G.isCE||G.parent&&Ue(G.parent)&&G.parent.isCE)return"default"!==t&&(i.name=t),vn("slot",i,n&&n());let r=e[t];r&&r._c&&(r._d=!1),en();const s=r&&mt(r(i)),a=ln(qi,{key:i.key||s&&s.key||`_${t}`},s||(n?n():[]),s&&1===e._?64:-2);return!o&&a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),r&&r._c&&(r._d=!0),a}function mt(e){return e.some((e=>!cn(e)||e.type!==$i&&!(e.type===qi&&!mt(e.children))))?e:null}function Ct(e,t){const i={};for(const n in e)i[t&&/[A-Z]/.test(n)?`on:${n}`:(0,o.hR)(n)]=e[n];return i}const bt=e=>e?Gn(e)?$n(e)||e.proxy:bt(e.parent):null,wt=(0,o.l7)(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>bt(e.parent),$root:e=>bt(e.root),$emit:e=>e.emit,$options:e=>Kt(e),$forceUpdate:e=>e.f||(e.f=()=>S(e.update)),$nextTick:e=>e.n||(e.n=b.bind(e.proxy)),$watch:e=>Oe.bind(e)}),St=(e,t)=>e!==o.kT&&!e.__isScriptSetup&&(0,o.RI)(e,t),Et={get({_:e},t){const{ctx:i,setupState:r,data:s,props:a,accessCache:l,type:c,appContext:u}=e;let d;if("$"!==t[0]){const n=l[t];if(void 0!==n)switch(n){case 1:return r[t];case 2:return s[t];case 4:return i[t];case 3:return a[t]}else{if(St(r,t))return l[t]=1,r[t];if(s!==o.kT&&(0,o.RI)(s,t))return l[t]=2,s[t];if((d=e.propsOptions[0])&&(0,o.RI)(d,t))return l[t]=3,a[t];if(i!==o.kT&&(0,o.RI)(i,t))return l[t]=4,i[t];jt&&(l[t]=0)}}const p=wt[t];let h,f;return p?("$attrs"===t&&(0,n.j)(e,"get",t),p(e)):(h=c.__cssModules)&&(h=h[t])?h:i!==o.kT&&(0,o.RI)(i,t)?(l[t]=4,i[t]):(f=u.config.globalProperties,(0,o.RI)(f,t)?f[t]:void 0)},set({_:e},t,i){const{data:n,setupState:r,ctx:s}=e;return St(r,t)?(r[t]=i,!0):n!==o.kT&&(0,o.RI)(n,t)?(n[t]=i,!0):!(0,o.RI)(e.props,t)&&(("$"!==t[0]||!(t.slice(1)in e))&&(s[t]=i,!0))},has({_:{data:e,setupState:t,accessCache:i,ctx:n,appContext:r,propsOptions:s}},a){let l;return!!i[a]||e!==o.kT&&(0,o.RI)(e,a)||St(t,a)||(l=s[0])&&(0,o.RI)(l,a)||(0,o.RI)(n,a)||(0,o.RI)(wt,a)||(0,o.RI)(r.config.globalProperties,a)},defineProperty(e,t,i){return null!=i.get?e._.accessCache[t]=0:(0,o.RI)(i,"value")&&this.set(e,t,i.value,null),Reflect.defineProperty(e,t,i)}};const xt=(0,o.l7)({},Et,{get(e,t){if(t!==Symbol.unscopables)return Et.get(e,t,e)},has(e,t){const i="_"!==t[0]&&!(0,o.yl)(t);return i}});function Ot(){return null}function Tt(){return null}function Dt(e){0}function Rt(e){0}function At(){return null}function _t(){0}function Pt(e,t){return null}function Mt(){return Lt().slots}function kt(){return Lt().attrs}function Nt(e,t,i){const o=Mn();if(i&&i.local){const i=(0,n.iH)(e[t]);return Ee((()=>e[t]),(e=>i.value=e)),Ee(i,(i=>{i!==e[t]&&o.emit(`update:${t}`,i)})),i}return{__v_isRef:!0,get value(){return e[t]},set value(e){o.emit(`update:${t}`,e)}}}function Lt(){const e=Mn();return e.setupContext||(e.setupContext=Xn(e))}function It(e){return(0,o.kJ)(e)?e.reduce(((e,t)=>(e[t]=null,e)),{}):e}function Ft(e,t){const i=It(e);for(const n in t){if(n.startsWith("__skip"))continue;let e=i[n];e?(0,o.kJ)(e)||(0,o.mf)(e)?e=i[n]={type:e,default:t[n]}:e.default=t[n]:null===e&&(e=i[n]={default:t[n]}),e&&t[`__skip_${n}`]&&(e.skipFactory=!0)}return i}function Gt(e,t){return e&&t?(0,o.kJ)(e)&&(0,o.kJ)(t)?e.concat(t):(0,o.l7)({},It(e),It(t)):e||t}function Vt(e,t){const i={};for(const n in e)t.includes(n)||Object.defineProperty(i,n,{enumerable:!0,get:()=>e[n]});return i}function Bt(e){const t=Mn();let i=e();return Fn(),(0,o.tI)(i)&&(i=i.catch((e=>{throw In(t),e}))),[i,()=>In(t)]}let jt=!0;function Ht(e){const t=Kt(e),i=e.proxy,r=e.ctx;jt=!1,t.beforeCreate&&Ut(t.beforeCreate,e,"bc");const{data:s,computed:a,methods:l,watch:c,provide:u,inject:d,created:p,beforeMount:h,mounted:f,beforeUpdate:g,updated:v,activated:y,deactivated:m,beforeDestroy:C,beforeUnmount:b,destroyed:w,unmounted:S,render:E,renderTracked:x,renderTriggered:O,errorCaptured:T,serverPrefetch:D,expose:R,inheritAttrs:A,components:_,directives:P,filters:M}=t,k=null;if(d&&Wt(d,r,k),l)for(const n in l){const e=l[n];
3(0,o.mf)(e)&&(r[n]=e.bind(i))}if(s){0;const t=s.call(i,i);0,(0,o.Kn)(t)&&(e.data=(0,n.qj)(t))}if(jt=!0,a)for(const n in a){const e=a[n],t=(0,o.mf)(e)?e.bind(i,i):(0,o.mf)(e.get)?e.get.bind(i,i):o.dG;0;const s=!(0,o.mf)(e)&&(0,o.mf)(e.set)?e.set.bind(i):o.dG,l=Qn({get:t,set:s});Object.defineProperty(r,n,{enumerable:!0,configurable:!0,get:()=>l.value,set:e=>l.value=e})}if(c)for(const n in c)zt(c[n],r,i,n);if(u){const e=(0,o.mf)(u)?u.call(i):u;Reflect.ownKeys(e).forEach((t=>{si(t,e[t])}))}function N(e,t){(0,o.kJ)(t)?t.forEach((t=>e(t.bind(i)))):t&&e(t.bind(i))}if(p&&Ut(p,e,"c"),N(rt,h),N(st,f),N(at,g),N(lt,v),N(Ze,y),N(Je,m),N(ft,T),N(ht,x),N(pt,O),N(ct,b),N(ut,S),N(dt,D),(0,o.kJ)(R))if(R.length){const t=e.exposed||(e.exposed={});R.forEach((e=>{Object.defineProperty(t,e,{get:()=>i[e],set:t=>i[e]=t})}))}else e.exposed||(e.exposed={});E&&e.render===o.dG&&(e.render=E),null!=A&&(e.inheritAttrs=A),_&&(e.components=_),P&&(e.directives=P)}function Wt(e,t,i=o.dG){(0,o.kJ)(e)&&(e=Zt(e));for(const r in e){const i=e[r];let s;s=(0,o.Kn)(i)?"default"in i?ai(i.from||r,i.default,!0):ai(i.from||r):ai(i),(0,n.dq)(s)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>s.value,set:e=>s.value=e}):t[r]=s}}function Ut(e,t,i){l((0,o.kJ)(e)?e.map((e=>e.bind(t.proxy))):e.bind(t.proxy),t,i)}function zt(e,t,i,n){const r=n.includes(".")?Te(i,n):()=>i[n];if((0,o.HD)(e)){const i=t[e];(0,o.mf)(i)&&Ee(r,i)}else if((0,o.mf)(e))Ee(r,e.bind(i));else if((0,o.Kn)(e))if((0,o.kJ)(e))e.forEach((e=>zt(e,t,i,n)));else{const n=(0,o.mf)(e.handler)?e.handler.bind(i):t[e.handler];(0,o.mf)(n)&&Ee(r,n,e)}else 0}function Kt(e){const t=e.type,{mixins:i,extends:n}=t,{mixins:r,optionsCache:s,config:{optionMergeStrategies:a}}=e.appContext,l=s.get(t);let c;return l?c=l:r.length||i||n?(c={},r.length&&r.forEach((e=>Yt(c,e,a,!0))),Yt(c,t,a)):c=t,(0,o.Kn)(t)&&s.set(t,c),c}function Yt(e,t,i,n=!1){const{mixins:o,extends:r}=t;r&&Yt(e,r,i,!0),o&&o.forEach((t=>Yt(e,t,i,!0)));for(const s in t)if(n&&"expose"===s);else{const n=qt[s]||i&&i[s];e[s]=n?n(e[s],t[s]):t[s]}return e}const qt={data:Xt,props:ei,emits:ei,methods:Qt,computed:Qt,beforeCreate:Jt,created:Jt,beforeMount:Jt,mounted:Jt,beforeUpdate:Jt,updated:Jt,beforeDestroy:Jt,beforeUnmount:Jt,destroyed:Jt,unmounted:Jt,activated:Jt,deactivated:Jt,errorCaptured:Jt,serverPrefetch:Jt,components:Qt,directives:Qt,watch:ti,provide:Xt,inject:$t};function Xt(e,t){return t?e?function(){return(0,o.l7)((0,o.mf)(e)?e.call(this,this):e,(0,o.mf)(t)?t.call(this,this):t)}:t:e}function $t(e,t){return Qt(Zt(e),Zt(t))}function Zt(e){if((0,o.kJ)(e)){const t={};for(let i=0;i<e.length;i++)t[e[i]]=e[i];return t}return e}function Jt(e,t){return e?[...new Set([].concat(e,t))]:t}function Qt(e,t){return e?(0,o.l7)(Object.create(null),e,t):t}function ei(e,t){return e?(0,o.kJ)(e)&&(0,o.kJ)(t)?[...new Set([...e,...t])]:(0,o.l7)(Object.create(null),It(e),It(null!=t?t:{})):t}function ti(e,t){if(!e)return t;if(!t)return e;const i=(0,o.l7)(Object.create(null),e);for(const n in t)i[n]=Jt(e[n],t[n]);return i}function ii(){return{app:null,config:{isNativeTag:o.NO,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let ni=0;function oi(e,t){return function(i,n=null){(0,o.mf)(i)||(i=(0,o.l7)({},i)),null==n||(0,o.Kn)(n)||(n=null);const r=ii();const s=new WeakSet;let a=!1;const l=r.app={_uid:ni++,_component:i,_props:n,_container:null,_context:r,_instance:null,version:so,get config(){return r.config},set config(e){0},use(e,...t){return s.has(e)||(e&&(0,o.mf)(e.install)?(s.add(e),e.install(l,...t)):(0,o.mf)(e)&&(s.add(e),e(l,...t))),l},mixin(e){return r.mixins.includes(e)||r.mixins.push(e),l},component(e,t){return t?(r.components[e]=t,l):r.components[e]},directive(e,t){return t?(r.directives[e]=t,l):r.directives[e]},mount(o,s,c){if(!a){0;const u=vn(i,n);return u.appContext=r,s&&t?t(u,o):e(u,o,c),a=!0,l._container=o,o.__vue_app__=l,$n(u.component)||u.component.proxy}},unmount(){a&&(e(null,l._container),delete l._container.__vue_app__)},provide(e,t){return r.provides[e]=t,l},runWithContext(e){ri=l;try{return e()}finally{ri=null}}};return l}}let ri=null;function si(e,t){if(Pn){let i=Pn.provides;const n=Pn.parent&&Pn.parent.provides;n===i&&(i=Pn.provides=Object.create(n)),i[e]=t}else 0}function ai(e,t,i=!1){const n=Pn||G;if(n||ri){const r=n?null==n.parent?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides:ri._context.provides;if(r&&e in r)return r[e];if(arguments.length>1)return i&&(0,o.mf)(t)?t.call(n&&n.proxy):t}else 0}function li(){return!!(Pn||G||ri)}function ci(e,t,i,r=!1){const s={},a={};(0,o.Nj)(a,pn,1),e.propsDefaults=Object.create(null),di(e,t,s,a);for(const n in e.propsOptions[0])n in s||(s[n]=void 0);i?e.props=r?s:(0,n.Um)(s):e.type.props?e.props=s:e.props=a,e.attrs=a}function ui(e,t,i,r){const{props:s,attrs:a,vnode:{patchFlag:l}}=e,c=(0,n.IU)(s),[u]=e.propsOptions;let d=!1;if(!(r||l>0)||16&l){let n;di(e,t,s,a)&&(d=!0);for(const r in c)t&&((0,o.RI)(t,r)||(n=(0,o.rs)(r))!==r&&(0,o.RI)(t,n))||(u?!i||void 0===i[r]&&void 0===i[n]||(s[r]=pi(u,c,r,void 0,e,!0)):delete s[r]);
3if(a!==c)for(const e in a)t&&(0,o.RI)(t,e)||(delete a[e],d=!0)}else if(8&l){const i=e.vnode.dynamicProps;for(let n=0;n<i.length;n++){let r=i[n];if(F(e.emitsOptions,r))continue;const l=t[r];if(u)if((0,o.RI)(a,r))l!==a[r]&&(a[r]=l,d=!0);else{const t=(0,o._A)(r);s[t]=pi(u,c,t,l,e,!1)}else l!==a[r]&&(a[r]=l,d=!0)}}d&&(0,n.X$)(e,"set","$attrs")}function di(e,t,i,r){const[s,a]=e.propsOptions;let l,c=!1;if(t)for(let n in t){if((0,o.Gg)(n))continue;const u=t[n];let d;s&&(0,o.RI)(s,d=(0,o._A)(n))?a&&a.includes(d)?(l||(l={}))[d]=u:i[d]=u:F(e.emitsOptions,n)||n in r&&u===r[n]||(r[n]=u,c=!0)}if(a){const t=(0,n.IU)(i),r=l||o.kT;for(let n=0;n<a.length;n++){const l=a[n];i[l]=pi(s,t,l,r[l],e,!(0,o.RI)(r,l))}}return c}function pi(e,t,i,n,r,s){const a=e[i];if(null!=a){const e=(0,o.RI)(a,"default");if(e&&void 0===n){const e=a.default;if(a.type!==Function&&!a.skipFactory&&(0,o.mf)(e)){const{propsDefaults:o}=r;i in o?n=o[i]:(In(r),n=o[i]=e.call(null,t),Fn())}else n=e}a[0]&&(s&&!e?n=!1:!a[1]||""!==n&&n!==(0,o.rs)(i)||(n=!0))}return n}function hi(e,t,i=!1){const n=t.propsCache,r=n.get(e);if(r)return r;const s=e.props,a={},l=[];let c=!1;if(!(0,o.mf)(e)){const n=e=>{c=!0;const[i,n]=hi(e,t,!0);(0,o.l7)(a,i),n&&l.push(...n)};!i&&t.mixins.length&&t.mixins.forEach(n),e.extends&&n(e.extends),e.mixins&&e.mixins.forEach(n)}if(!s&&!c)return(0,o.Kn)(e)&&n.set(e,o.Z6),o.Z6;if((0,o.kJ)(s))for(let d=0;d<s.length;d++){0;const e=(0,o._A)(s[d]);fi(e)&&(a[e]=o.kT)}else if(s){0;for(const e in s){const t=(0,o._A)(e);if(fi(t)){const i=s[e],n=a[t]=(0,o.kJ)(i)||(0,o.mf)(i)?{type:i}:(0,o.l7)({},i);if(n){const e=yi(Boolean,n.type),i=yi(String,n.type);n[0]=e>-1,n[1]=i<0||e<i,(e>-1||(0,o.RI)(n,"default"))&&l.push(t)}}}}const u=[a,l];return(0,o.Kn)(e)&&n.set(e,u),u}function fi(e){return"$"!==e[0]}function gi(e){const t=e&&e.toString().match(/^\s*(function|class) (\w+)/);return t?t[2]:null===e?"null":""}function vi(e,t){return gi(e)===gi(t)}function yi(e,t){return(0,o.kJ)(t)?t.findIndex((t=>vi(t,e))):(0,o.mf)(t)&&vi(t,e)?0:-1}const mi=e=>"_"===e[0]||"$stable"===e,Ci=e=>(0,o.kJ)(e)?e.map(En):[En(e)],bi=(e,t,i)=>{if(t._n)return t;const n=U(((...e)=>Ci(t(...e))),i);return n._c=!1,n},wi=(e,t,i)=>{const n=e._ctx;for(const r in e){if(mi(r))continue;const i=e[r];if((0,o.mf)(i))t[r]=bi(r,i,n);else if(null!=i){0;const e=Ci(i);t[r]=()=>e}}},Si=(e,t)=>{const i=Ci(t);e.slots.default=()=>i},Ei=(e,t)=>{if(32&e.vnode.shapeFlag){const i=t._;i?(e.slots=(0,n.IU)(t),(0,o.Nj)(t,"_",i)):wi(t,e.slots={})}else e.slots={},t&&Si(e,t);(0,o.Nj)(e.slots,pn,1)},xi=(e,t,i)=>{const{vnode:n,slots:r}=e;let s=!0,a=o.kT;if(32&n.shapeFlag){const e=t._;e?i&&1===e?s=!1:((0,o.l7)(r,t),i||1!==e||delete r._):(s=!t.$stable,wi(t,r)),a=t}else t&&(Si(e,t),a={default:1});if(s)for(const o in r)mi(o)||null!=a[o]||delete r[o]};function Oi(e,t,i,r,s=!1){if((0,o.kJ)(e))return void e.forEach(((e,n)=>Oi(e,t&&((0,o.kJ)(t)?t[n]:t),i,r,s)));if(Ue(r)&&!s)return;const l=4&r.shapeFlag?$n(r.component)||r.component.proxy:r.el,c=s?null:l,{i:u,r:d}=e;const p=t&&t.r,h=u.refs===o.kT?u.refs={}:u.refs,f=u.setupState;if(null!=p&&p!==d&&((0,o.HD)(p)?(h[p]=null,(0,o.RI)(f,p)&&(f[p]=null)):(0,n.dq)(p)&&(p.value=null)),(0,o.mf)(d))a(d,u,12,[c,h]);else{const t=(0,o.HD)(d),r=(0,n.dq)(d);if(t||r){const n=()=>
3{if(e.f){const i=t?(0,o.RI)(f,d)?f[d]:h[d]:d.value;s?(0,o.kJ)(i)&&(0,o.Od)(i,l):(0,o.kJ)(i)?i.includes(l)||i.push(l):t?(h[d]=[l],(0,o.RI)(f,d)&&(f[d]=h[d])):(d.value=[l],e.k&&(h[e.k]=d.value))}else t?(h[d]=c,(0,o.RI)(f,d)&&(f[d]=c)):r&&(d.value=c,e.k&&(h[e.k]=c))};c?(n.id=-1,Pi(n,i)):n()}else 0}}let Ti=!1;const Di=e=>/svg/.test(e.namespaceURI)&&"foreignObject"!==e.tagName,Ri=e=>8===e.nodeType;function Ai(e){const{mt:t,p:i,o:{patchProp:n,createText:r,nextSibling:s,parentNode:a,remove:l,insert:c,createComment:u}}=e,d=(e,t)=>{if(!t.hasChildNodes())return i(null,e,t),D(),void(t._vnode=e);Ti=!1,p(t.firstChild,e,null,null,null),D(),t._vnode=e,Ti&&console.error("Hydration completed but contains mismatches.")},p=(i,n,o,l,u,d=!1)=>{const b=Ri(i)&&"["===i.data,w=()=>v(i,n,o,l,u,b),{type:S,ref:E,shapeFlag:x,patchFlag:O}=n;let T=i.nodeType;n.el=i,-2===O&&(d=!1,n.dynamicChildren=null);let D=null;switch(S){case Xi:3!==T?""===n.children?(c(n.el=r(""),a(i),i),D=i):D=w():(i.data!==n.children&&(Ti=!0,i.data=n.children),D=s(i));break;case $i:C(i)?(D=s(i),m(n.el=i.content.firstChild,i,o)):D=8!==T||b?w():s(i);break;case Zi:if(b&&(i=s(i),T=i.nodeType),1===T||3===T){D=i;const e=!n.children.length;for(let t=0;t<n.staticCount;t++)e&&(n.children+=1===D.nodeType?D.outerHTML:D.data),t===n.staticCount-1&&(n.anchor=D),D=s(D);return b?s(D):D}w();break;case qi:D=b?g(i,n,o,l,u,d):w();break;default:if(1&x)D=1===T&&n.type.toLowerCase()===i.tagName.toLowerCase()||C(i)?h(i,n,o,l,u,d):w();else if(6&x){n.slotScopeIds=u;const e=a(i);if(D=b?y(i):Ri(i)&&"teleport start"===i.data?y(i,i.data,"teleport end"):s(i),t(n,e,null,o,l,Di(e),d),Ue(n)){let t;b?(t=vn(qi),t.anchor=D?D.previousSibling:e.lastChild):t=3===i.nodeType?bn(""):vn("div"),t.el=i,n.component.subTree=t}}else 64&x?D=8!==T?w():n.type.hydrate(i,n,o,l,u,d,e,f):128&x&&(D=n.type.hydrate(i,n,o,l,Di(a(i)),u,d,e,p))}return null!=E&&Oi(E,null,l,n),D},h=(e,t,i,r,s,a)=>{a=a||!!t.dynamicChildren;const{type:c,props:u,patchFlag:d,shapeFlag:p,dirs:h,transition:g}=t,v="input"===c||"option"===c;if(v||-1!==d){if(h&&Ae(t,null,i,"created"),u)if(v||!a||48&d)for(const t in u)(v&&(t.endsWith("value")||"indeterminate"===t)||(0,o.F7)(t)&&!(0,o.Gg)(t)||"."===t[0])&&n(e,t,null,u[t],!1,void 0,i);else u.onClick&&n(e,"onClick",null,u.onClick,!1,void 0,i);let c;(c=u&&u.onVnodeBeforeMount)&&Dn(c,i,t);let y=!1;if(C(e)){y=Ii(r,g)&&i&&i.vnode.props&&i.vnode.props.appear;const n=e.content.firstChild;y&&g.beforeEnter(n),m(n,e,i),t.el=e=n}if(h&&Ae(t,null,i,"beforeMount"),((c=u&&u.onVnodeMounted)||h||y)&&ve((()=>{c&&Dn(c,i,t),y&&g.enter(e),h&&Ae(t,null,i,"mounted")}),r),16&p&&(!u||!u.innerHTML&&!u.textContent)){let n=f(e.firstChild,t,e,i,r,s,a);while(n){Ti=!0;const e=n;n=n.nextSibling,l(e)}}else 8&p&&e.textContent!==t.children&&(Ti=!0,e.textContent=t.children)}return e.nextSibling},f=(e,t,n,o,r,s,a)=>{a=a||!!t.dynamicChildren;const l=t.children,c=l.length;for(let u=0;u<c;u++){const t=a?l[u]:l[u]=En(l[u]);if(e)e=p(e,t,o,r,s,a);else{if(t.type===Xi&&!t.children)continue;Ti=!0,i(null,t,n,null,o,r,Di(n),s)}}return e},g=(e,t,i,n,o,r)=>{const{slotScopeIds:l}=t;l&&(o=o?o.concat(l):l);const d=a(e),p=f(s(e),t,d,i,n,o,r);return p&&Ri(p)&&"]"===p.data?s(t.anchor=p):(Ti=!0,c(t.anchor=u("]"),d,p),p)},v=(e,t,n,o,r,c)=>{if(Ti=!0,t.el=null,c){const t=y(e);while(1){const i=s(e);if(!i||i===t)break;l(i)}}const u=s(e),d=a(e);return l(e),i(null,t,d,u,n,o,Di(d),r),u},y=(e,t="[",i="]")=>{let n=0;while(e)if(e=s(e),e&&Ri(e)&&(e.data===t&&n++,e.data===i)){if(0===n)return s(e);n--}return e},m=(e,t,i)=>{const n=t.parentNode;n&&n.replaceChild(e,t);let o=i;while(o)o.vnode.el===t&&(o.vnode.el=o.subTree.el=e),o=o.parent},C=e=>1===e.nodeType&&"template"===e.tagName.toLowerCase();return[d,p]}function _i(){}const Pi=ve;function Mi(e){return Ni(e)}function ki(e){return Ni(e,Ai)}function Ni(e,t){_i();const i=(0,o.E9)();i.__VUE__=!0;const{insert:r,remove:s,patchProp:a,createElement:l,createText:c,createComment:u,setText:d,setElementText:p,parentNode:h,nextSibling:f,setScopeId:g=o.dG,insertStaticContent:v}=e,y=(e,t,i,n=null,o=null,r=null,s=!1,a=null,l=!!t.dynamicChildren)=>{if(e===t)return;e&&!un(e,t)&&(n=J(e),U(e,o,r,!0),e=null),-2===t.patchFlag&&(l=!1,t.dynamicChildren=null);const{type:c,ref:u,shapeFlag:d}=t;switch(c){case Xi:m(e,t,i,n);break;case $i:C(e,t,i,n);break;case Zi:null==e&&b(t,i,n,s);break;case qi:N(e,t,i,n,o,r,s,a,l);break;default:1&d?O(e,t,i,n,o,r,s,a,l):6&d?L(e,t,i,n,o,r,s,a,l):(64&d||128&d)&&c.process(e,t,i,n,o,r,s,a,l,ee)}null!=u&&o&&Oi(u,e&&e.ref,r,t||e,!t)},m=(e,t,i,n)=>{if(null==e)r(t.el=c(t.children),i,n);else{const i=t.el=e.el;t.children!==e.children&&d(i,t.children)}},C=(e,t,i,n)=>{null==e?r(t.el=u(t.children||""),i,n):t.el=e.el},b=(e,t,i,n)=>{[e.el,e.anchor]=v(e.children,t,i,n,e.el,e.anchor)},w=({el:e,anchor:t},i,n)=>{let o;while(e&&e!==t)o=f(e),r(e,i,n),e=o;r(t,i,n)},E=({el:e,anchor:t})=>{let i;while(e&&e!==t)i=f(e),s(e),e=i;s(t)},O=(e,t,i,n,o,r,s,a,l)=>{s=s||"svg"===t.type,null==e?R(t,i,n,o,r,s,a,l):P(e,t,o,r,s,a,l)},R=(e,t,i,n,s,c,u,d)=>{let h,f;const{type:g,props:v,shapeFlag:y,transition:m,dirs:C}=e;
3if(h=e.el=l(e.type,c,v&&v.is,v),8&y?p(h,e.children):16&y&&_(e.children,h,null,n,s,c&&"foreignObject"!==g,u,d),C&&Ae(e,null,n,"created"),A(h,e,e.scopeId,u,n),v){for(const t in v)"value"===t||(0,o.Gg)(t)||a(h,t,null,v[t],c,e.children,n,s,$);"value"in v&&a(h,"value",null,v.value),(f=v.onVnodeBeforeMount)&&Dn(f,n,e)}C&&Ae(e,null,n,"beforeMount");const b=Ii(s,m);b&&m.beforeEnter(h),r(h,t,i),((f=v&&v.onVnodeMounted)||b||C)&&Pi((()=>{f&&Dn(f,n,e),b&&m.enter(h),C&&Ae(e,null,n,"mounted")}),s)},A=(e,t,i,n,o)=>{if(i&&g(e,i),n)for(let r=0;r<n.length;r++)g(e,n[r]);if(o){let i=o.subTree;if(t===i){const t=o.vnode;A(e,t,t.scopeId,t.slotScopeIds,o.parent)}}},_=(e,t,i,n,o,r,s,a,l=0)=>{for(let c=l;c<e.length;c++){const l=e[c]=a?xn(e[c]):En(e[c]);y(null,l,t,i,n,o,r,s,a)}},P=(e,t,i,n,r,s,l)=>{const c=t.el=e.el;let{patchFlag:u,dynamicChildren:d,dirs:h}=t;u|=16&e.patchFlag;const f=e.props||o.kT,g=t.props||o.kT;let v;i&&Li(i,!1),(v=g.onVnodeBeforeUpdate)&&Dn(v,i,t,e),h&&Ae(t,e,i,"beforeUpdate"),i&&Li(i,!0);const y=r&&"foreignObject"!==t.type;if(d?M(e.dynamicChildren,d,c,i,n,y,s):l||B(e,t,c,null,i,n,y,s,!1),u>0){if(16&u)k(c,t,f,g,i,n,r);else if(2&u&&f.class!==g.class&&a(c,"class",null,g.class,r),4&u&&a(c,"style",f.style,g.style,r),8&u){const o=t.dynamicProps;for(let t=0;t<o.length;t++){const s=o[t],l=f[s],u=g[s];u===l&&"value"!==s||a(c,s,l,u,r,e.children,i,n,$)}}1&u&&e.children!==t.children&&p(c,t.children)}else l||null!=d||k(c,t,f,g,i,n,r);((v=g.onVnodeUpdated)||h)&&Pi((()=>{v&&Dn(v,i,t,e),h&&Ae(t,e,i,"updated")}),n)},M=(e,t,i,n,o,r,s)=>{for(let a=0;a<t.length;a++){const l=e[a],c=t[a],u=l.el&&(l.type===qi||!un(l,c)||70&l.shapeFlag)?h(l.el):i;y(l,c,u,null,n,o,r,s,!0)}},k=(e,t,i,n,r,s,l)=>{if(i!==n){if(i!==o.kT)for(const c in i)(0,o.Gg)(c)||c in n||a(e,c,i[c],null,l,t.children,r,s,$);for(const c in n){if((0,o.Gg)(c))continue;const u=n[c],d=i[c];u!==d&&"value"!==c&&a(e,c,d,u,l,t.children,r,s,$)}"value"in n&&a(e,"value",i.value,n.value)}},N=(e,t,i,n,o,s,a,l,u)=>{const d=t.el=e?e.el:c(""),p=t.anchor=e?e.anchor:c("");let{patchFlag:h,dynamicChildren:f,slotScopeIds:g}=t;g&&(l=l?l.concat(g):g),null==e?(r(d,i,n),r(p,i,n),_(t.children,i,p,o,s,a,l,u)):h>0&&64&h&&f&&e.dynamicChildren?(M(e.dynamicChildren,f,i,o,s,a,l),(null!=t.key||o&&t===o.subTree)&&Fi(e,t,!0)):B(e,t,i,p,o,s,a,l,u)},L=(e,t,i,n,o,r,s,a,l)=>{t.slotScopeIds=a,null==e?512&t.shapeFlag?o.ctx.activate(t,i,n,s,l):I(t,i,n,o,r,s,l):F(e,t,l)},I=(e,t,i,n,o,r,s)=>{const a=e.component=_n(e,n,o);if(Ye(e)&&(a.ctx.renderer=ee),Hn(a),a.asyncDep){if(o&&o.registerDep(a,G),!e.el){const e=a.subTree=vn($i);C(null,e,t,i)}}else G(a,e,t,i,o,r,s)},F=(e,t,i)=>{const n=t.component=e.component;if(X(e,t,i)){if(n.asyncDep&&!n.asyncResolved)return void V(n,t,i);n.next=t,x(n.update),n.update()}else t.el=e.el,n.vnode=t},G=(e,t,i,r,s,a,l)=>{const c=()=>{if(e.isMounted){let t,{next:i,bu:n,u:r,parent:c,vnode:u}=e,d=i;0,Li(e,!1),i?(i.el=u.el,V(e,i,l)):i=u,n&&(0,o.ir)(n),(t=i.props&&i.props.onVnodeBeforeUpdate)&&Dn(t,c,i,u),Li(e,!0);const p=z(e);0;const f=e.subTree;e.subTree=p,y(f,p,h(f.el),J(f),e,s,a),i.el=p.el,null===d&&Z(e,p.el),r&&Pi(r,s),(t=i.props&&i.props.onVnodeUpdated)&&Pi((()=>Dn(t,c,i,u)),s)}else{let n;const{el:l,props:c}=t,{bm:u,m:d,parent:p}=e,h=Ue(t);if(Li(e,!1),u&&(0,o.ir)(u),!h&&(n=c&&c.onVnodeBeforeMount)&&Dn(n,p,t),Li(e,!0),l&&ie){const i=()=>{e.subTree=z(e),ie(l,e.subTree,e,s,null)};h?t.type.__asyncLoader().then((()=>!e.isUnmounted&&i())):i()}else{0;const n=e.subTree=z(e);0,y(null,n,i,r,e,s,a),t.el=n.el}if(d&&Pi(d,s),!h&&(n=c&&c.onVnodeMounted)){const e=t;Pi((()=>Dn(n,p,e)),s)}(256&t.shapeFlag||p&&Ue(p.vnode)&&256&p.vnode.shapeFlag)&&e.a&&Pi(e.a,s),e.isMounted=!0,t=i=r=null}},u=e.effect=new n.qq(c,(()=>S(d)),e.scope),d=e.update=()=>u.run();d.id=e.uid,Li(e,!0),d()},V=(e,t,i)=>{t.component=e;const o=e.vnode.props;e.vnode=t,e.next=null,ui(e,t.props,o,i),xi(e,t.children,i),(0,n.Jd)(),T(e),(0,n.lk)()},B=(e,t,i,n,o,r,s,a,l=!1)=>{const c=e&&e.children,u=e?e.shapeFlag:0,d=t.children,{patchFlag:h,shapeFlag:f}=t;if(h>0){if(128&h)return void H(c,d,i,n,o,r,s,a,l);if(256&h)return void j(c,d,i,n,o,r,s,a,l)}8&f?(16&u&&$(c,o,r),d!==c&&p(i,d)):16&u?16&f?H(c,d,i,n,o,r,s,a,l):$(c,o,r,!0):(8&u&&p(i,""),16&f&&_(d,i,n,o,r,s,a,l))},j=(e,t,i,n,r,s,a,l,c)=>{e=e||o.Z6,t=t||o.Z6;const u=e.length,d=t.length,p=Math.min(u,d);let h;for(h=0;h<p;
3h++){const n=t[h]=c?xn(t[h]):En(t[h]);y(e[h],n,i,null,r,s,a,l,c)}u>d?$(e,r,s,!0,!1,p):_(t,i,n,r,s,a,l,c,p)},H=(e,t,i,n,r,s,a,l,c)=>{let u=0;const d=t.length;let p=e.length-1,h=d-1;while(u<=p&&u<=h){const n=e[u],o=t[u]=c?xn(t[u]):En(t[u]);if(!un(n,o))break;y(n,o,i,null,r,s,a,l,c),u++}while(u<=p&&u<=h){const n=e[p],o=t[h]=c?xn(t[h]):En(t[h]);if(!un(n,o))break;y(n,o,i,null,r,s,a,l,c),p--,h--}if(u>p){if(u<=h){const e=h+1,o=e<d?t[e].el:n;while(u<=h)y(null,t[u]=c?xn(t[u]):En(t[u]),i,o,r,s,a,l,c),u++}}else if(u>h)while(u<=p)U(e[u],r,s,!0),u++;else{const f=u,g=u,v=new Map;for(u=g;u<=h;u++){const e=t[u]=c?xn(t[u]):En(t[u]);null!=e.key&&v.set(e.key,u)}let m,C=0;const b=h-g+1;let w=!1,S=0;const E=new Array(b);for(u=0;u<b;u++)E[u]=0;for(u=f;u<=p;u++){const n=e[u];if(C>=b){U(n,r,s,!0);continue}let o;if(null!=n.key)o=v.get(n.key);else for(m=g;m<=h;m++)if(0===E[m-g]&&un(n,t[m])){o=m;break}void 0===o?U(n,r,s,!0):(E[o-g]=u+1,o>=S?S=o:w=!0,y(n,t[o],i,null,r,s,a,l,c),C++)}const x=w?Gi(E):o.Z6;for(m=x.length-1,u=b-1;u>=0;u--){const e=g+u,o=t[e],p=e+1<d?t[e+1].el:n;0===E[u]?y(null,o,i,p,r,s,a,l,c):w&&(m<0||u!==x[m]?W(o,i,p,2):m--)}}},W=(e,t,i,n,o=null)=>{const{el:s,type:a,transition:l,children:c,shapeFlag:u}=e;if(6&u)return void W(e.component.subTree,t,i,n);if(128&u)return void e.suspense.move(t,i,n);if(64&u)return void a.move(e,t,i,ee);if(a===qi){r(s,t,i);for(let e=0;e<c.length;e++)W(c[e],t,i,n);return void r(e.anchor,t,i)}if(a===Zi)return void w(e,t,i);const d=2!==n&&1&u&&l;if(d)if(0===n)l.beforeEnter(s),r(s,t,i),Pi((()=>l.enter(s)),o);else{const{leave:e,delayLeave:n,afterLeave:o}=l,a=()=>r(s,t,i),c=()=>{e(s,(()=>{a(),o&&o()}))};n?n(s,a,c):c()}else r(s,t,i)},U=(e,t,i,n=!1,o=!1)=>{const{type:r,props:s,ref:a,children:l,dynamicChildren:c,shapeFlag:u,patchFlag:d,dirs:p}=e;if(null!=a&&Oi(a,null,i,e,!0),256&u)return void t.ctx.deactivate(e);const h=1&u&&p,f=!Ue(e);let g;if(f&&(g=s&&s.onVnodeBeforeUnmount)&&Dn(g,t,e),6&u)q(e.component,i,n);else{if(128&u)return void e.suspense.unmount(i,n);h&&Ae(e,null,t,"beforeUnmount"),64&u?e.type.remove(e,t,i,o,ee,n):c&&(r!==qi||d>0&&64&d)?$(c,t,i,!1,!0):(r===qi&&384&d||!o&&16&u)&&$(l,t,i),n&&K(e)}(f&&(g=s&&s.onVnodeUnmounted)||h)&&Pi((()=>{g&&Dn(g,t,e),h&&Ae(e,null,t,"unmounted")}),i)},K=e=>{const{type:t,el:i,anchor:n,transition:o}=e;if(t===qi)return void Y(i,n);if(t===Zi)return void E(e);const r=()=>{s(i),o&&!o.persisted&&o.afterLeave&&o.afterLeave()};if(1&e.shapeFlag&&o&&!o.persisted){const{leave:t,delayLeave:n}=o,s=()=>t(i,r);n?n(e.el,r,s):s()}else r()},Y=(e,t)=>{let i;while(e!==t)i=f(e),s(e),e=i;s(t)},q=(e,t,i)=>{const{bum:n,scope:r,update:s,subTree:a,um:l}=e;n&&(0,o.ir)(n),r.stop(),s&&(s.active=!1,U(a,e,t,i)),l&&Pi(l,t),Pi((()=>{e.isUnmounted=!0}),t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve())},$=(e,t,i,n=!1,o=!1,r=0)=>{for(let s=r;s<e.length;s++)U(e[s],t,i,n,o)},J=e=>6&e.shapeFlag?J(e.component.subTree):128&e.shapeFlag?e.suspense.next():f(e.anchor||e.el),Q=(e,t,i)=>{null==e?t._vnode&&U(t._vnode,null,null,!0):y(t._vnode||null,e,t,null,null,null,i),T(),D(),t._vnode=e},ee={p:y,um:U,m:W,r:K,mt:I,mc:_,pc:B,pbc:M,n:J,o:e};let te,ie;return t&&([te,ie]=t(ee)),{render:Q,hydrate:te,createApp:oi(Q,te)}}function Li({effect:e,update:t},i){e.allowRecurse=t.allowRecurse=i}function Ii(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Fi(e,t,i=!1){const n=e.children,r=t.children;if((0,o.kJ)(n)&&(0,o.kJ)(r))for(let o=0;o<n.length;o++){const e=n[o];let t=r[o];1&t.shapeFlag&&!t.dynamicChildren&&((t.patchFlag<=0||32===t.patchFlag)&&(t=r[o]=xn(r[o]),t.el=e.el),i||Fi(e,t)),t.type===Xi&&(t.el=e.el)}}function Gi(e){const t=e.slice(),i=[0];let n,o,r,s,a;const l=e.length;for(n=0;n<l;n++){const l=e[n];if(0!==l){if(o=i[i.length-1],e[o]<l){t[n]=o,i.push(n);continue}r=0,s=i.length-1;while(r<s)a=r+s>>1,e[i[a]]<l?r=a+1:s=a;l<e[i[r]]&&(r>0&&(t[n]=i[r-1]),i[r]=n)}}r=i.length,s=i[r-1];while(r-- >0)i[r]=s,s=t[s];return i}const Vi=e=>e.__isTeleport,Bi=e=>e&&(e.disabled||""===e.disabled),ji=e=>"undefined"!==typeof SVGElement&&e instanceof SVGElement,Hi=(e,t)=>{const i=e&&e.to;if((0,o.HD)(i)){if(t){const e=t(i);return e}return null}return i},Wi={name:"Teleport",__isTeleport:!0,process(e,t,i,n,o,r,s,a,l,c){const{mc:u,pc:d,pbc:p,o:{insert:h,querySelector:f,createText:g,createComment:v}}=c,y=Bi(t.props);let{shapeFlag:m,children:C,dynamicChildren:b}=t;if(null==e){const e=t.el=g(""),c=t.anchor=g("");h(e,i,n),h(c,i,n);const d=t.target=Hi(t.props,f),p=t.targetAnchor=g("");d&&(h(p,d),s=s||ji(d));const v=(e,t)=>
3{16&m&&u(C,e,t,o,r,s,a,l)};y?v(i,c):d&&v(d,p)}else{t.el=e.el;const n=t.anchor=e.anchor,u=t.target=e.target,h=t.targetAnchor=e.targetAnchor,g=Bi(e.props),v=g?i:u,m=g?n:h;if(s=s||ji(u),b?(p(e.dynamicChildren,b,v,o,r,s,a),Fi(e,t,!0)):l||d(e,t,v,m,o,r,s,a,!1),y)g?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Ui(t,i,n,c,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const e=t.target=Hi(t.props,f);e&&Ui(t,e,null,c,0)}else g&&Ui(t,u,h,c,1)}Yi(t)},remove(e,t,i,n,{um:o,o:{remove:r}},s){const{shapeFlag:a,children:l,anchor:c,targetAnchor:u,target:d,props:p}=e;if(d&&r(u),s&&r(c),16&a){const e=s||!Bi(p);for(let n=0;n<l.length;n++){const r=l[n];o(r,t,i,e,!!r.dynamicChildren)}}},move:Ui,hydrate:zi};function Ui(e,t,i,{o:{insert:n},m:o},r=2){0===r&&n(e.targetAnchor,t,i);const{el:s,anchor:a,shapeFlag:l,children:c,props:u}=e,d=2===r;if(d&&n(s,t,i),(!d||Bi(u))&&16&l)for(let p=0;p<c.length;p++)o(c[p],t,i,2);d&&n(a,t,i)}function zi(e,t,i,n,o,r,{o:{nextSibling:s,parentNode:a,querySelector:l}},c){const u=t.target=Hi(t.props,l);if(u){const l=u._lpa||u.firstChild;if(16&t.shapeFlag)if(Bi(t.props))t.anchor=c(s(e),t,a(e),i,n,o,r),t.targetAnchor=l;else{t.anchor=s(e);let a=l;while(a)if(a=s(a),a&&8===a.nodeType&&"teleport anchor"===a.data){t.targetAnchor=a,u._lpa=t.targetAnchor&&s(t.targetAnchor);break}c(l,t,u,i,n,o,r)}Yi(t)}return t.anchor&&s(t.anchor)}const Ki=Wi;function Yi(e){const t=e.ctx;if(t&&t.ut){let i=e.children[0].el;while(i&&i!==e.targetAnchor)1===i.nodeType&&i.setAttribute("data-v-owner",t.uid),i=i.nextSibling;t.ut()}}const qi=Symbol.for("v-fgt"),Xi=Symbol.for("v-txt"),$i=Symbol.for("v-cmt"),Zi=Symbol.for("v-stc"),Ji=[];let Qi=null;function en(e=!1){Ji.push(Qi=e?null:[])}function tn(){Ji.pop(),Qi=Ji[Ji.length-1]||null}let nn,on=1;function rn(e){on+=e}function sn(e){return e.dynamicChildren=on>0?Qi||o.Z6:null,tn(),on>0&&Qi&&Qi.push(e),e}function an(e,t,i,n,o,r){return sn(gn(e,t,i,n,o,r,!0))}function ln(e,t,i,n,o){return sn(vn(e,t,i,n,o,!0))}function cn(e){return!!e&&!0===e.__v_isVNode}function un(e,t){return e.type===t.type&&e.key===t.key}function dn(e){nn=e}const pn="__vInternal",hn=({key:e})=>null!=e?e:null,fn=({ref:e,ref_key:t,ref_for:i})=>("number"===typeof e&&(e=""+e),null!=e?(0,o.HD)(e)||(0,n.dq)(e)||(0,o.mf)(e)?{i:G,r:e,k:t,f:!!i}:e:null);function gn(e,t=null,i=null,n=0,r=null,s=(e===qi?0:1),a=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&hn(t),ref:t&&fn(t),scopeId:V,slotScopeIds:null,children:i,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:n,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:G};return l?(On(c,i),128&s&&e.normalize(c)):i&&(c.shapeFlag|=(0,o.HD)(i)?8:16),on>0&&!a&&Qi&&(c.patchFlag>0||6&s)&&32!==c.patchFlag&&Qi.push(c),c}const vn=yn;function yn(e,t=null,i=null,r=0,s=null,a=!1){if(e&&e!==te||(e=$i),cn(e)){const n=Cn(e,t,!0);return i&&On(n,i),on>0&&!a&&Qi&&(6&n.shapeFlag?Qi[Qi.indexOf(e)]=n:Qi.push(n)),n.patchFlag|=-2,n}if(Jn(e)&&(e=e.__vccOpts),t){t=mn(t);let{class:e,style:i}=t;e&&!(0,o.HD)(e)&&(t.class=(0,o.C_)(e)),(0,o.Kn)(i)&&((0,n.X3)(i)&&!(0,o.kJ)(i)&&(i=(0,o.l7)({},i)),t.style=(0,o.j5)(i))}const l=(0,o.HD)(e)?1:se(e)?128:Vi(e)?64:(0,o.Kn)(e)?4:(0,o.mf)(e)?2:0;return gn(e,t,i,r,s,l,a,!0)}function mn(e){return e?(0,n.X3)(e)||pn in e?(0,o.l7)({},e):e:null}function Cn(e,t,i=!1){const{props:n,ref:r,patchFlag:s,children:a}=e,l=t?Tn(n||{},t):n,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&hn(l),ref:t&&t.ref?i&&r?(0,o.kJ)(r)?r.concat(fn(t)):[r,fn(t)]:fn(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==qi?-1===s?16:16|s:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Cn(e.ssContent),ssFallback:e.ssFallback&&Cn(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c}function bn(e=" ",t=0){return vn(Xi,null,e,t)}function wn(e,t){const i=vn(Zi,null,e);return i.staticCount=t,i}function Sn(e="",t=!1){return t?(en(),ln($i,null,e)):vn($i,null,e)}function En(e){return null==e||"boolean"===typeof e?vn($i):(0,o.kJ)(e)?vn(qi,null,e.slice()):"object"===typeof e?xn(e):vn(Xi,null,String(e))}function xn(e){return null===e.el&&-1!==e.patchFlag||e.memo?e:Cn(e)}function On(e,t){let i=0;const{shapeFlag:n}=e;if(null==t)t=null;else if((0,o.kJ)(t))i=16;else if("object"===typeof t){if(65&n){const i=t.default;return void(i&&(i._c&&(i._d=!1),On(e,i()),i._c&&(i._d=!0)))}{i=32;const n=t._;n||pn in t?3===n&&G&&(1===G.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=G}}else(0,o.mf)(t)?(t={default:t,_ctx:G},i=32):(t=String(t),64&n?(i=16,t=[bn(t)]):i=8);e.children=t,e.shapeFlag|=i}function Tn(...e){const t={};for(let i=0;i<e.length;i++){const n=e[i];for(const e in n)if("class"===e)t.class!==n.class&&(t.class=(0,o.C_)([t.class,n.class]));else if("style"===e)t.style=(0,o.j5)([t.style,n.style]);else if((0,o.F7)(e)){const i=t[e],r=n[e];!r||i===r||(0,o.kJ)(i)&&i.includes(r)||(t[e]=i?[].concat(i,r):r)}else""!==e&&(t[e]=n[e])}return t}function Dn(e,t,i,n=null){l(e,t,7,[i,n])}const Rn=ii();let An=0;function _n(e,t,i){const r=e.type,s=(t?t.appContext:e.appContext)||Rn,a={uid:An++,vnode:e,type:r,parent:t,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,scope:new n.Bj(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(s.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:hi(r,s),emitsOptions:I(r,s),emit:null,emitted:null,propsDefaults:o.kT,inheritAttrs:r.inheritAttrs,ctx:o.kT,data:o.kT,props:o.kT,attrs:o.kT,slots:o.kT,refs:o.kT,setupState:o.kT,setupContext:null,attrsProxy:null,slotsProxy:null,suspense:i,suspenseId:i?i.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,
3sp:null};return a.ctx={_:a},a.root=t?t.root:a,a.emit=L.bind(null,a),e.ce&&e.ce(a),a}let Pn=null;const Mn=()=>Pn||G;let kn,Nn,Ln="__VUE_INSTANCE_SETTERS__";(Nn=(0,o.E9)()[Ln])||(Nn=(0,o.E9)()[Ln]=[]),Nn.push((e=>Pn=e)),kn=e=>{Nn.length>1?Nn.forEach((t=>t(e))):Nn[0](e)};const In=e=>{kn(e),e.scope.on()},Fn=()=>{Pn&&Pn.scope.off(),kn(null)};function Gn(e){return 4&e.vnode.shapeFlag}let Vn,Bn,jn=!1;function Hn(e,t=!1){jn=t;const{props:i,children:n}=e.vnode,o=Gn(e);ci(e,i,o,t),Ei(e,n);const r=o?Wn(e,t):void 0;return jn=!1,r}function Wn(e,t){const i=e.type;e.accessCache=Object.create(null),e.proxy=(0,n.Xl)(new Proxy(e.ctx,Et));const{setup:r}=i;if(r){const i=e.setupContext=r.length>1?Xn(e):null;In(e),(0,n.Jd)();const s=a(r,e,0,[e.props,i]);if((0,n.lk)(),Fn(),(0,o.tI)(s)){if(s.then(Fn,Fn),t)return s.then((i=>{Un(e,i,t)})).catch((t=>{c(t,e,0)}));e.asyncDep=s}else Un(e,s,t)}else Yn(e,t)}function Un(e,t,i){(0,o.mf)(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:(0,o.Kn)(t)&&(e.setupState=(0,n.WL)(t)),Yn(e,i)}function zn(e){Vn=e,Bn=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,xt))}}const Kn=()=>!Vn;function Yn(e,t,i){const r=e.type;if(!e.render){if(!t&&Vn&&!r.render){const t=r.template||Kt(e).template;if(t){0;const{isCustomElement:i,compilerOptions:n}=e.appContext.config,{delimiters:s,compilerOptions:a}=r,l=(0,o.l7)((0,o.l7)({isCustomElement:i,delimiters:s},n),a);r.render=Vn(t,l)}}e.render=r.render||o.dG,Bn&&Bn(e)}In(e),(0,n.Jd)();try{Ht(e)}finally{(0,n.lk)(),Fn()}}function qn(e){return e.attrsProxy||(e.attrsProxy=new Proxy(e.attrs,{get(t,i){return(0,n.j)(e,"get","$attrs"),t[i]}}))}function Xn(e){const t=t=>{e.exposed=t||{}};return{get attrs(){return qn(e)},slots:e.slots,emit:e.emit,expose:t}}function $n(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy((0,n.WL)((0,n.Xl)(e.exposed)),{get(t,i){return i in t?t[i]:i in wt?wt[i](e):void 0},has(e,t){return t in e||t in wt}}))}function Zn(e,t=!0){return(0,o.mf)(e)?e.displayName||e.name:e.name||t&&e.__name}function Jn(e){return(0,o.mf)(e)&&"__vccOpts"in e}const Qn=(e,t)=>(0,n.Fl)(e,t,jn);function eo(e,t,i){const n=arguments.length;return 2===n?(0,o.Kn)(t)&&!(0,o.kJ)(t)?cn(t)?vn(e,null,[t]):vn(e,t):vn(e,null,t):(n>3?i=Array.prototype.slice.call(arguments,2):3===n&&cn(i)&&(i=[i]),vn(e,t,i))}const to=Symbol.for("v-scx"),io=()=>{{const e=ai(to);return e}};function no(){return void 0}function oo(e,t,i,n){const o=i[n];if(o&&ro(o,e))return o;const r=t();return r.memo=e.slice(),i[n]=r}function ro(e,t){const i=e.memo;if(i.length!=t.length)return!1;for(let n=0;n<i.length;n++)if((0,o.aU)(i[n],t[n]))return!1;return on>0&&Qi&&Qi.push(e),!0}const so="3.3.11",ao={createComponentInstance:_n,setupComponent:Hn,renderComponentRoot:z,setCurrentRenderingInstance:B,isVNode:cn,normalizeVNode:En},lo=ao,co=null,uo=null},1437:function(e,t,i){i.d(t,{$d:function(){return n.$d},$y:function(){return n.$y},Ah:function(){return re},B:function(){return n.B},BK:function(){return n.BK},Bj:function(){return n.Bj},Bz:function(){return n.Bz},C3:function(){return n.C3},C_:function(){return n.C_},Cn:function(){return n.Cn},D2:function(){return He},EB:function(){return n.EB},EM:function(){return n.EM},Eo:function(){return n.Eo},F4:function(){return n.F4},F8:function(){return M},FN:function(){return n.FN},Fl:function(){return n.Fl},G:function(){return n.G},G2:function(){return Ae},Gn:function(){return n.Gn},HX:function(){return n.HX},HY:function(){return n.HY},Ho:function(){return n.Ho},IU:function(){return n.IU},JJ:function(){return n.JJ},Jd:function(){return n.Jd},KU:function(){return n.KU},Ko:function(){return n.Ko},LL:function(){return n.LL},MW:function(){return oe},MX:function(){return n.MX},Mr:function(){return n.Mr},Nd:function(){return et},Nv:function(){return n.Nv},OT:function(){return n.OT},Ob:function(){return n.Ob},P$:function(){return n.P$},PG:function(){return n.PG},Q2:function(){return n.Q2},Q6:function(){return n.Q6},RC:function(){return n.RC},Rh:function(){return n.Rh},Rr:function(){return n.Rr},S3:function(){return n.S3},SK:function(){return n.Ah},SU:function(){return n.SU},Tn:function(){return n.Tn},U2:function(){return n.U2},Uc:function(){return n.Uc},Uk:function(){return n.Uk},Um:function(){return n.Um},Us:function(){return n.Us},Vf:function(){return n.Vf},Vh:function(){return n.Vh},W3:function(){return ye},WI:function(){return n.WI},WL:function(){return n.WL},WY:function(){return n.WY},Wl:function(){return n.Wl},Wm:function(){return n.Wm},Wu:function(){return n.Wu},X3:function(){return n.X3},XI:function(){return n.XI},Xl:function(){return n.Xl},Xn:function(){return n.Xn},Y1:function(){return n.Y1},Y3:function(){return n.Y3},Y8:function(){return n.Y8},YP:function(){return n.YP},YS:function(){return n.YS},YZ:function(){return Ne},Yq:function(){return n.Yq},Yu:function(){return n.Yu},ZB:function(){return Xe},ZK:function(){return n.ZK},ZM:function(){return n.ZM},Zq:function(){return n.Zq},_:function(){return n._},_A:function(){return n._A},a2:function(){return ae},aZ:function(){return n.aZ},b9:function(){return n.b9},bM:function(){return _e},bT:function(){return n.bT},bv:function(){return n.bv},cE:function(){return n.cE},d1:function(){return n.d1},dD:function(){return n.dD},dG:function(){return n.dG},dl:function(){return n.dl},dq:function(){return n.dq},e8:function(){return De},ec:function(){return n.ec},eq:function(){return n.eq},f3:function(){return n.f3},fb:function(){return le},h:function(){return n.h},hR:function(){return n.hR},i8:function(){return n.i8},iD:function(){return n.iD},iH:function(){return n.iH},iM:function(){return Be},ic:function(){return n.ic},j4:function(){return n.j4},j5:function(){return n.j5},kC:function(){return n.kC},kq:function(){return n.kq},l1:function(){return n.l1},lA:function(){return n.lA},lR:function(){return n.lR},m0:function(){return n.m0},mW:function(){return n.mW},mv:function(){return n.mv},mx:function(){return n.mx},n4:function(){return n.n4},nJ:function(){return n.nJ},nK:function(){return n.nK},nQ:function(){return n.nQ},nZ:function(){return n.nZ},nr:function(){return Te},oR:function(){return n.oR},of:function(){return n.of},p1:function(){return n.p1},qG:function(){return n.qG},qZ:function(){return n.qZ},qb:function(){return n.qb},qj:function(){return n.qj},qq:function(){return n.qq},ri:function(){return $e},ry:function(){return n.ry},sT:function(){return n.sT},sY:function(){return qe},se:function(){return n.se},sj:function(){return ce},sv:function(){return n.sv},tT:function(){return n.tT},uE:function(){return n.uE},uT:function(){return h},u_:function(){return n.u_},up:function(){return n.up},vl:function(){return n.vl},vr:function(){return Ze},vs:function(){return n.vs},w5:function(){return n.w5},wF:function(){return n.wF},wg:function(){return n.wg},wy:function(){return n.wy},xv:function(){return n.xv},yT:function(){return n.yT},yX:function(){return n.yX},yb:function(){return n.MW},zw:function(){return n.zw}});i(2106);var n=i(5677),o=i(5220),r=i(6907);const s="http://www.w3.org/2000/svg",a="undefined"!==typeof document?document:null,l=a&&a.createElement("template"),c={insert:(e,t,i)=>{t.insertBefore(e,i||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,i,n)=>{const o=t?a.createElementNS(s,e):a.createElement(e,i?{is:i}:void 0);return"select"===e&&n&&null!=n.multiple&&o.setAttribute("multiple",n.multiple),o},createText:e=>a.createTextNode(e),createComment:e=>a.createComment(e),setText:(e,t)=>
3{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>a.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,i,n,o,r){const s=i?i.previousSibling:t.lastChild;if(o&&(o===r||o.nextSibling)){while(1)if(t.insertBefore(o.cloneNode(!0),i),o===r||!(o=o.nextSibling))break}else{l.innerHTML=n?`<svg>${e}</svg>`:e;const o=l.content;if(n){const e=o.firstChild;while(e.firstChild)o.appendChild(e.firstChild);o.removeChild(e)}t.insertBefore(o,i)}return[s?s.nextSibling:t.firstChild,i?i.previousSibling:t.lastChild]}},u="transition",d="animation",p=Symbol("_vtc"),h=(e,{slots:t})=>(0,n.h)(n.P$,m(e),t);h.displayName="Transition";const f={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},g=h.props=(0,o.l7)({},n.nJ,f),v=(e,t=[])=>{(0,o.kJ)(e)?e.forEach((e=>e(...t))):e&&e(...t)},y=e=>!!e&&((0,o.kJ)(e)?e.some((e=>e.length>1)):e.length>1);function m(e){const t={};for(const o in e)o in f||(t[o]=e[o]);if(!1===e.css)return t;const{name:i="v",type:n,duration:r,enterFromClass:s=`${i}-enter-from`,enterActiveClass:a=`${i}-enter-active`,enterToClass:l=`${i}-enter-to`,appearFromClass:c=s,appearActiveClass:u=a,appearToClass:d=l,leaveFromClass:p=`${i}-leave-from`,leaveActiveClass:h=`${i}-leave-active`,leaveToClass:g=`${i}-leave-to`}=e,m=C(r),b=m&&m[0],x=m&&m[1],{onBeforeEnter:T,onEnter:D,onEnterCancelled:R,onLeave:_,onLeaveCancelled:P,onBeforeAppear:M=T,onAppear:k=D,onAppearCancelled:N=R}=t,L=(e,t,i)=>{S(e,t?d:l),S(e,t?u:a),i&&i()},I=(e,t)=>{e._isLeaving=!1,S(e,p),S(e,g),S(e,h),t&&t()},F=e=>(t,i)=>{const o=e?k:D,r=()=>L(t,e,i);v(o,[t,r]),E((()=>{S(t,e?c:s),w(t,e?d:l),y(o)||O(t,n,b,r)}))};return(0,o.l7)(t,{onBeforeEnter(e){v(T,[e]),w(e,s),w(e,a)},onBeforeAppear(e){v(M,[e]),w(e,c),w(e,u)},onEnter:F(!1),onAppear:F(!0),onLeave(e,t){e._isLeaving=!0;const i=()=>I(e,t);w(e,p),A(),w(e,h),E((()=>{e._isLeaving&&(S(e,p),w(e,g),y(_)||O(e,n,x,i))})),v(_,[e,i])},onEnterCancelled(e){L(e,!1),v(R,[e])},onAppearCancelled(e){L(e,!0),v(N,[e])},onLeaveCancelled(e){I(e),v(P,[e])}})}function C(e){if(null==e)return null;if((0,o.Kn)(e))return[b(e.enter),b(e.leave)];{const t=b(e);return[t,t]}}function b(e){const t=(0,o.He)(e);return t}function w(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.add(t))),(e[p]||(e[p]=new Set)).add(t)}function S(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.remove(t)));const i=e[p];i&&(i.delete(t),i.size||(e[p]=void 0))}function E(e){requestAnimationFrame((()=>{requestAnimationFrame(e)}))}let x=0;function O(e,t,i,n){const o=e._endId=++x,r=()=>{o===e._endId&&n()};if(i)return setTimeout(r,i);const{type:s,timeout:a,propCount:l}=T(e,t);if(!s)return n();const c=s+"end";let u=0;const d=()=>{e.removeEventListener(c,p),r()},p=t=>{t.target===e&&++u>=l&&d()};setTimeout((()=>{u<l&&d()}),a+1),e.addEventListener(c,p)}function T(e,t){const i=window.getComputedStyle(e),n=e=>(i[e]||"").split(", "),o=n(`${u}Delay`),r=n(`${u}Duration`),s=D(o,r),a=n(`${d}Delay`),l=n(`${d}Duration`),c=D(a,l);let p=null,h=0,f=0;t===u?s>0&&(p=u,h=s,f=r.length):t===d?c>0&&(p=d,h=c,f=l.length):(h=Math.max(s,c),p=h>0?s>c?u:d:null,f=p?p===u?r.length:l.length:0);const g=p===u&&/\b(transform|all)(,|$)/.test(n(`${u}Property`).toString());return{type:p,timeout:h,propCount:f,hasTransform:g}}function D(e,t){while(e.length<t.length)e=e.concat(e);return Math.max(...t.map(((t,i)=>R(t)+R(e[i]))))}function R(e){return"auto"===e?0:1e3*Number(e.slice(0,-1).replace(",","."))}function A(){return document.body.offsetHeight}function _(e,t,i){const n=e[p];n&&(t=(t?[t,...n]:[...n]).join(" ")),null==t?e.removeAttribute("class"):i?e.setAttribute("class",t):e.className=t}const P=Symbol("_vod"),M={beforeMount(e,{value:t},{transition:i}){e[P]="none"===e.style.display?"":e.style.display,i&&t?i.beforeEnter(e):k(e,t)},mounted(e,{value:t},{transition:i}){i&&t&&i.enter(e)},updated(e,{value:t,oldValue:i},{transition:n}){!t!==!i&&(n?t?(n.beforeEnter(e),k(e,!0),n.enter(e)):n.leave(e,(()=>{k(e,!1)})):k(e,t))},beforeUnmount(e,{value:t}){k(e,t)}};function k(e,t){e.style.display=t?e[P]:"none"}function N(){M.getSSRProps=({value:e})=>
3{if(!e)return{style:{display:"none"}}}}function L(e,t,i){const n=e.style,r=(0,o.HD)(i);if(i&&!r){if(t&&!(0,o.HD)(t))for(const e in t)null==i[e]&&F(n,e,"");for(const e in i)F(n,e,i[e])}else{const o=n.display;r?t!==i&&(n.cssText=i):t&&e.removeAttribute("style"),P in e&&(n.display=o)}}const I=/\s*!important$/;function F(e,t,i){if((0,o.kJ)(i))i.forEach((i=>F(e,t,i)));else if(null==i&&(i=""),t.startsWith("--"))e.setProperty(t,i);else{const n=B(e,t);I.test(i)?e.setProperty((0,o.rs)(n),i.replace(I,""),"important"):e[n]=i}}const G=["Webkit","Moz","ms"],V={};function B(e,t){const i=V[t];if(i)return i;let n=(0,o._A)(t);if("filter"!==n&&n in e)return V[t]=n;n=(0,o.kC)(n);for(let o=0;o<G.length;o++){const i=G[o]+n;if(i in e)return V[t]=i}return t}const j="http://www.w3.org/1999/xlink";function H(e,t,i,n,r){if(n&&t.startsWith("xlink:"))null==i?e.removeAttributeNS(j,t.slice(6,t.length)):e.setAttributeNS(j,t,i);else{const n=(0,o.Pq)(t);null==i||n&&!(0,o.yA)(i)?e.removeAttribute(t):e.setAttribute(t,n?"":i)}}function W(e,t,i,n,r,s,a){if("innerHTML"===t||"textContent"===t)return n&&a(n,r,s),void(e[t]=null==i?"":i);const l=e.tagName;if("value"===t&&"PROGRESS"!==l&&!l.includes("-")){e._value=i;const n="OPTION"===l?e.getAttribute("value"):e.value,o=null==i?"":i;return n!==o&&(e.value=o),void(null==i&&e.removeAttribute(t))}let c=!1;if(""===i||null==i){const n=typeof e[t];"boolean"===n?i=(0,o.yA)(i):null==i&&"string"===n?(i="",c=!0):"number"===n&&(i=0,c=!0)}try{e[t]=i}catch(u){0}c&&e.removeAttribute(t)}function U(e,t,i,n){e.addEventListener(t,i,n)}function z(e,t,i,n){e.removeEventListener(t,i,n)}const K=Symbol("_vei");function Y(e,t,i,n,o=null){const r=e[K]||(e[K]={}),s=r[t];if(n&&s)s.value=n;else{const[i,a]=X(t);if(n){const s=r[t]=Q(n,o);U(e,i,s,a)}else s&&(z(e,i,s,a),r[t]=void 0)}}const q=/(?:Once|Passive|Capture)$/;function X(e){let t;if(q.test(e)){let i;t={};while(i=e.match(q))e=e.slice(0,e.length-i[0].length),t[i[0].toLowerCase()]=!0}const i=":"===e[2]?e.slice(3):(0,o.rs)(e.slice(2));return[i,t]}let $=0;const Z=Promise.resolve(),J=()=>$||(Z.then((()=>$=0)),$=Date.now());function Q(e,t){const i=e=>{if(e._vts){if(e._vts<=i.attached)return}else e._vts=Date.now();(0,n.$d)(ee(e,i.value),t,5,[e])};return i.value=e,i.attached=J(),i}function ee(e,t){if((0,o.kJ)(t)){const i=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{i.call(e),e._stopped=!0},t.map((e=>t=>!t._stopped&&e&&e(t)))}return t}const te=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,ie=(e,t,i,n,r=!1,s,a,l,c)=>{"class"===t?_(e,n,r):"style"===t?L(e,i,n):(0,o.F7)(t)?(0,o.tR)(t)||Y(e,t,i,n,a):("."===t[0]?(t=t.slice(1),1):"^"===t[0]?(t=t.slice(1),0):ne(e,t,n,r))?W(e,t,n,s,a,l,c):("true-value"===t?e._trueValue=n:"false-value"===t&&(e._falseValue=n),H(e,t,n,r))};function ne(e,t,i,n){if(n)return"innerHTML"===t||"textContent"===t||!!(t in e&&te(t)&&(0,o.mf)(i));if("spellcheck"===t||"draggable"===t||"translate"===t)return!1;if("form"===t)return!1;if("list"===t&&"INPUT"===e.tagName)return!1;if("type"===t&&"TEXTAREA"===e.tagName)return!1;if("width"===t||"height"===t){const t=e.tagName;if("IMG"===t||"VIDEO"===t||"CANVAS"===t||"SOURCE"===t)return!1}return(!te(t)||!(0,o.HD)(i))&&t in e}
4/*! #__NO_SIDE_EFFECTS__ */function oe(e,t){const i=(0,n.aZ)(e);class o extends ae{constructor(e){super(i,e,t)}}return o.def=i,o}
5/*! #__NO_SIDE_EFFECTS__ */const re=e=>oe(e,Xe),se="undefined"!==typeof HTMLElement?HTMLElement:class{};class ae extends se{constructor(e,t={},i){super(),this._def=e,this._props=t,this._instance=null,this._connected=!1,this._resolved=!1,this._numberProps=null,this._ob=null,this.shadowRoot&&i?i(this._createVNode(),this.shadowRoot):(this.attachShadow({mode:"open"}),this._def.__asyncLoader||this._resolveProps(this._def))}connectedCallback(){this._connected=!0,this._instance||(this._resolved?this._update():this._resolveDef())}disconnectedCallback(){this._connected=!1,this._ob&&(this._ob.disconnect(),this._ob=null),(0,n.Y3)((()=>{this._connected||(qe(null,this.shadowRoot),this._instance=null)}))}_resolveDef(){this._resolved=!0;for(let i=0;i<this.attributes.length;i++)this._setAttr(this.attributes[i].name);this._ob=new MutationObserver((e=>{for(const t of e)this._setAttr(t.attributeName)})),this._ob.observe(this,{attributes:!0});const e=(e,t=!1)=>{const{props:i,styles:n}=e;let r;if(i&&!(0,o.kJ)(i))for(const s in i){const e=i[s];(e===Number||e&&e.type===Number)&&(s in this._props&&(this._props[s]=(0,o.He)(this._props[s])),(r||(r=Object.create(null)))[(0,o._A)(s)]=!0)}this._numberProps=r,t&&this._resolveProps(e),this._applyStyles(n),this._update()},t=this._def.__asyncLoader;t?t().then((t=>e(t,!0))):e(this._def)}_resolveProps(e){const{props:t}=e,i=(0,o.kJ)(t)?t:Object.keys(t||{});for(const n of Object.keys(this))"_"!==n[0]&&i.includes(n)&&this._setProp(n,this[n],!0,!1);for(const n of i.map(o._A))Object.defineProperty(this,n,{get(){return this._getProp(n)},set(e){this._setProp(n,e)}})}_setAttr(e){let t=this.getAttribute(e);const i=(0,o._A)(e);this._numberProps&&this._numberProps[i]&&(t=(0,o.He)(t)),this._setProp(i,t,!1)}_getProp(e){return this._props[e]}_setProp(e,t,i=!0,n=!0){t!==this._props[e]&&(this._props[e]=t,n&&this._instance&&this._update(),i&&(!0===t?this.setAttribute((0,o.rs)(e),""):"string"===typeof t||"number"===typeof t?this.setAttribute((0,o.rs)(e),t+""):t||this.removeAttribute((0,o.rs)(e))))}
5_update(){qe(this._createVNode(),this.shadowRoot)}_createVNode(){const e=(0,n.Wm)(this._def,(0,o.l7)({},this._props));return this._instance||(e.ce=e=>{this._instance=e,e.isCE=!0;const t=(e,t)=>{this.dispatchEvent(new CustomEvent(e,{detail:t}))};e.emit=(e,...i)=>{t(e,i),(0,o.rs)(e)!==e&&t((0,o.rs)(e),i)};let i=this;while(i=i&&(i.parentNode||i.host))if(i instanceof ae){e.parent=i._instance,e.provides=i._instance.provides;break}}),e}_applyStyles(e){e&&e.forEach((e=>{const t=document.createElement("style");t.textContent=e,this.shadowRoot.appendChild(t)}))}}function le(e="$style"){{const t=(0,n.FN)();if(!t)return o.kT;const i=t.type.__cssModules;if(!i)return o.kT;const r=i[e];return r||o.kT}}function ce(e){const t=(0,n.FN)();if(!t)return;const i=t.ut=(i=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach((e=>de(e,i)))},o=()=>{const n=e(t.proxy);ue(t.subTree,n),i(n)};(0,n.Rh)(o),(0,n.bv)((()=>{const e=new MutationObserver(o);e.observe(t.subTree.el.parentNode,{childList:!0}),(0,n.Ah)((()=>e.disconnect()))}))}function ue(e,t){if(128&e.shapeFlag){const i=e.suspense;e=i.activeBranch,i.pendingBranch&&!i.isHydrating&&i.effects.push((()=>{ue(i.activeBranch,t)}))}while(e.component)e=e.component.subTree;if(1&e.shapeFlag&&e.el)de(e.el,t);else if(e.type===n.HY)e.children.forEach((e=>ue(e,t)));else if(e.type===n.qG){let{el:i,anchor:n}=e;while(i){if(de(i,t),i===n)break;i=i.nextSibling}}}function de(e,t){if(1===e.nodeType){const i=e.style;for(const e in t)i.setProperty(`--${e}`,t[e])}}const pe=new WeakMap,he=new WeakMap,fe=Symbol("_moveCb"),ge=Symbol("_enterCb"),ve={name:"TransitionGroup",props:(0,o.l7)({},g,{tag:String,moveClass:String}),setup(e,{slots:t}){const i=(0,n.FN)(),o=(0,n.Y8)();let s,a;return(0,n.ic)((()=>{if(!s.length)return;const t=e.moveClass||`${e.name||"v"}-move`;if(!we(s[0].el,i.vnode.el,t))return;s.forEach(me),s.forEach(Ce);const n=s.filter(be);A(),n.forEach((e=>{const i=e.el,n=i.style;w(i,t),n.transform=n.webkitTransform=n.transitionDuration="";const o=i[fe]=e=>{e&&e.target!==i||e&&!/transform$/.test(e.propertyName)||(i.removeEventListener("transitionend",o),i[fe]=null,S(i,t))};i.addEventListener("transitionend",o)}))})),()=>{const l=(0,r.IU)(e),c=m(l);let u=l.tag||n.HY;s=a,a=t.default?(0,n.Q6)(t.default()):[];for(let e=0;e<a.length;e++){const t=a[e];null!=t.key&&(0,n.nK)(t,(0,n.U2)(t,c,o,i))}if(s)for(let e=0;e<s.length;e++){const t=s[e];(0,n.nK)(t,(0,n.U2)(t,c,o,i)),pe.set(t,t.el.getBoundingClientRect())}return(0,n.Wm)(u,null,a)}}};ve.props;const ye=ve;function me(e){const t=e.el;t[fe]&&t[fe](),t[ge]&&t[ge]()}function Ce(e){he.set(e,e.el.getBoundingClientRect())}function be(e){const t=pe.get(e),i=he.get(e),n=t.left-i.left,o=t.top-i.top;if(n||o){const t=e.el.style;return t.transform=t.webkitTransform=`translate(${n}px,${o}px)`,t.transitionDuration="0s",e}}function we(e,t,i){const n=e.cloneNode(),o=e[p];o&&o.forEach((e=>{e.split(/\s+/).forEach((e=>e&&n.classList.remove(e)))})),i.split(/\s+/).forEach((e=>e&&n.classList.add(e))),n.style.display="none";const r=1===t.nodeType?t:t.parentNode;r.appendChild(n);const{hasTransform:s}=T(n);return r.removeChild(n),s}const Se=e=>{const t=e.props["onUpdate:modelValue"]||!1;return(0,o.kJ)(t)?e=>(0,o.ir)(t,e):t};function Ee(e){e.target.composing=!0}function xe(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Oe=Symbol("_assign"),Te={created(e,{modifiers:{lazy:t,trim:i,number:n}},r){e[Oe]=Se(r);const s=n||r.props&&"number"===r.props.type;U(e,t?"change":"input",(t=>{if(t.target.composing)return;let n=e.value;i&&(n=n.trim()),s&&(n=(0,o.h5)(n)),e[Oe](n)})),i&&U(e,"change",(()=>{e.value=e.value.trim()})),t||(U(e,"compositionstart",Ee),U(e,"compositionend",xe),U(e,"change",xe))},mounted(e,{value:t}){e.value=null==t?"":t},beforeUpdate(e,{value:t,modifiers:{lazy:i,trim:n,number:r}},s){if(e[Oe]=Se(s),e.composing)return;const a=r||"number"===e.type?(0,o.h5)(e.value):e.value,l=null==t?"":t;if(a!==l){if(document.activeElement===e&&"range"!==e.type){if(i)return;if(n&&e.value.trim()===l)return}e.value=l}}},De={deep:!0,created(e,t,i){e[Oe]=Se(i),U(e,"change",(()=>{const t=e._modelValue,i=Me(e),n=e.checked,r=e[Oe];if((0,o.kJ)(t)){const e=(0,o.hq)(t,i),s=-1!==e;if(n&&!s)r(t.concat(i));else if(!n&&s){const i=[...t];i.splice(e,1),r(i)}}else if((0,o.DM)(t)){const e=new Set(t);n?e.add(i):e.delete(i),r(e)}else r(ke(e,n))}))},mounted:Re,beforeUpdate(e,t,i){e[Oe]=Se(i),Re(e,t,i)}};function Re(e,{value:t,oldValue:i},n){e._modelValue=t,(0,o.kJ)(t)?e.checked=(0,o.hq)(t,n.props.value)>-1:(0,o.DM)(t)?e.checked=t.has(n.props.value):t!==i&&(e.checked=(0,o.WV)(t,ke(e,!0)))}const Ae={created(e,{value:t},i){e.checked=(0,o.WV)(t,i.props.value),e[Oe]=Se(i),U(e,"change",(()=>{e[Oe](Me(e))}))},beforeUpdate(e,{value:t,oldValue:i},n){e[Oe]=Se(n),t!==i&&(e.checked=(0,o.WV)(t,n.props.value))}},_e={deep:!0,created(e,{value:t,modifiers:{number:i}},n){const r=(0,o.DM)(t);U(e,"change",(()=>
5{const t=Array.prototype.filter.call(e.options,(e=>e.selected)).map((e=>i?(0,o.h5)(Me(e)):Me(e)));e[Oe](e.multiple?r?new Set(t):t:t[0])})),e[Oe]=Se(n)},mounted(e,{value:t}){Pe(e,t)},beforeUpdate(e,t,i){e[Oe]=Se(i)},updated(e,{value:t}){Pe(e,t)}};function Pe(e,t){const i=e.multiple;if(!i||(0,o.kJ)(t)||(0,o.DM)(t)){for(let n=0,r=e.options.length;n<r;n++){const r=e.options[n],s=Me(r);if(i)(0,o.kJ)(t)?r.selected=(0,o.hq)(t,s)>-1:r.selected=t.has(s);else if((0,o.WV)(Me(r),t))return void(e.selectedIndex!==n&&(e.selectedIndex=n))}i||-1===e.selectedIndex||(e.selectedIndex=-1)}}function Me(e){return"_value"in e?e._value:e.value}function ke(e,t){const i=t?"_trueValue":"_falseValue";return i in e?e[i]:t}const Ne={created(e,t,i){Ie(e,t,i,null,"created")},mounted(e,t,i){Ie(e,t,i,null,"mounted")},beforeUpdate(e,t,i,n){Ie(e,t,i,n,"beforeUpdate")},updated(e,t,i,n){Ie(e,t,i,n,"updated")}};function Le(e,t){switch(e){case"SELECT":return _e;case"TEXTAREA":return Te;default:switch(t){case"checkbox":return De;case"radio":return Ae;default:return Te}}}function Ie(e,t,i,n,o){const r=Le(e.tagName,i.props&&i.props.type),s=r[o];s&&s(e,t,i,n)}function Fe(){Te.getSSRProps=({value:e})=>({value:e}),Ae.getSSRProps=({value:e},t)=>{if(t.props&&(0,o.WV)(t.props.value,e))return{checked:!0}},De.getSSRProps=({value:e},t)=>{if((0,o.kJ)(e)){if(t.props&&(0,o.hq)(e,t.props.value)>-1)return{checked:!0}}else if((0,o.DM)(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},Ne.getSSRProps=(e,t)=>{if("string"!==typeof t.type)return;const i=Le(t.type.toUpperCase(),t.props&&t.props.type);return i.getSSRProps?i.getSSRProps(e,t):void 0}}const Ge=["ctrl","shift","alt","meta"],Ve={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&0!==e.button,middle:e=>"button"in e&&1!==e.button,right:e=>"button"in e&&2!==e.button,exact:(e,t)=>Ge.some((i=>e[`${i}Key`]&&!t.includes(i)))},Be=(e,t)=>e._withMods||(e._withMods=(i,...n)=>{for(let e=0;e<t.length;e++){const n=Ve[t[e]];if(n&&n(i,t))return}return e(i,...n)}),je={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},He=(e,t)=>e._withKeys||(e._withKeys=i=>{if(!("key"in i))return;const n=(0,o.rs)(i.key);return t.some((e=>e===n||je[e]===n))?e(i):void 0}),We=(0,o.l7)({patchProp:ie},c);let Ue,ze=!1;function Ke(){return Ue||(Ue=(0,n.Us)(We))}function Ye(){return Ue=ze?Ue:(0,n.Eo)(We),ze=!0,Ue}const qe=(...e)=>{Ke().render(...e)},Xe=(...e)=>{Ye().hydrate(...e)},$e=(...e)=>{const t=Ke().createApp(...e);const{mount:i}=t;return t.mount=e=>{const n=Je(e);if(!n)return;const r=t._component;(0,o.mf)(r)||r.render||r.template||(r.template=n.innerHTML),n.innerHTML="";const s=i(n,!1,n instanceof SVGElement);return n instanceof Element&&(n.removeAttribute("v-cloak"),n.setAttribute("data-v-app","")),s},t},Ze=(...e)=>{const t=Ye().createApp(...e);const{mount:i}=t;return t.mount=e=>{const t=Je(e);if(t)return i(t,!0,t instanceof SVGElement)},t};function Je(e){if((0,o.HD)(e)){const t=document.querySelector(e);return t}return e}let Qe=!1;const et=()=>{Qe||(Qe=!0,Fe(),N())}},5220:function(e,t,i){i.d(t,{C_:function(){return Z},DM:function(){return v},E9:function(){return W},F7:function(){return l},Gg:function(){return A},HD:function(){return b},He:function(){return j},Kj:function(){return m},Kn:function(){return S},NO:function(){return a},Nj:function(){return V},Od:function(){return d},PO:function(){return D},Pq:function(){return ee},RI:function(){return h},S0:function(){return R},W7:function(){return T},WV:function(){return ne},Z6:function(){return r},_A:function(){return M},_N:function(){return g},aU:function(){return F},dG:function(){return s},fY:function(){return n},h5:function(){return B},hR:function(){return I},hq:function(){return oe},ir:function(){return G},j5:function(){return K},kC:function(){return L},kJ:function(){return f},kT:function(){return o},l7:function(){return u},mf:function(){return C},rs:function(){return N},tI:function(){return E},tR:function(){return c},vs:function(){return J},yA:function(){return te},yk:function(){return w},yl:function(){return z},zw:function(){return re}});i(2106);function n(e,t){const i=Object.create(null),n=e.split(",");for(let o=0;o<n.length;o++)i[n[o]]=!0;return t?e=>!!i[e.toLowerCase()]:e=>!!i[e]}const o={},r=[],s=()=>{},a=()=>!1,l=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),c=e=>e.startsWith("onUpdate:"),u=Object.assign,d=(e,t)=>{const i=e.indexOf(t);i>-1&&e.splice(i,1)},p=Object.prototype.hasOwnProperty,h=(e,t)=>p.call(e,t),f=Array.isArray,g=e=>"[object Map]"===O(e),v=e=>"[object Set]"===O(e),y=e=>"[object Date]"===O(e),m=e=>"[object RegExp]"===O(e),C=e=>
5"function"===typeof e,b=e=>"string"===typeof e,w=e=>"symbol"===typeof e,S=e=>null!==e&&"object"===typeof e,E=e=>(S(e)||C(e))&&C(e.then)&&C(e.catch),x=Object.prototype.toString,O=e=>x.call(e),T=e=>O(e).slice(8,-1),D=e=>"[object Object]"===O(e),R=e=>b(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,A=n(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),_=e=>{const t=Object.create(null);return i=>{const n=t[i];return n||(t[i]=e(i))}},P=/-(\w)/g,M=_((e=>e.replace(P,((e,t)=>t?t.toUpperCase():"")))),k=/\B([A-Z])/g,N=_((e=>e.replace(k,"-$1").toLowerCase())),L=_((e=>e.charAt(0).toUpperCase()+e.slice(1))),I=_((e=>{const t=e?`on${L(e)}`:"";return t})),F=(e,t)=>!Object.is(e,t),G=(e,t)=>{for(let i=0;i<e.length;i++)e[i](t)},V=(e,t,i)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:i})},B=e=>{const t=parseFloat(e);return isNaN(t)?e:t},j=e=>{const t=b(e)?Number(e):NaN;return isNaN(t)?e:t};let H;const W=()=>H||(H="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:"undefined"!==typeof window?window:"undefined"!==typeof i.g?i.g:{});const U="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console",z=n(U);function K(e){if(f(e)){const t={};for(let i=0;i<e.length;i++){const n=e[i],o=b(n)?$(n):K(n);if(o)for(const e in o)t[e]=o[e]}return t}if(b(e)||S(e))return e}const Y=/;(?![^(]*\))/g,q=/:([^]+)/,X=/\/\*[^]*?\*\//g;function $(e){const t={};return e.replace(X,"").split(Y).forEach((e=>{if(e){const i=e.split(q);i.length>1&&(t[i[0].trim()]=i[1].trim())}})),t}function Z(e){let t="";if(b(e))t=e;else if(f(e))for(let i=0;i<e.length;i++){const n=Z(e[i]);n&&(t+=n+" ")}else if(S(e))for(const i in e)e[i]&&(t+=i+" ");return t.trim()}function J(e){if(!e)return null;let{class:t,style:i}=e;return t&&!b(t)&&(e.class=Z(t)),i&&(e.style=K(i)),e}const Q="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",ee=n(Q);function te(e){return!!e||""===e}function ie(e,t){if(e.length!==t.length)return!1;let i=!0;for(let n=0;i&&n<e.length;n++)i=ne(e[n],t[n]);return i}function ne(e,t){if(e===t)return!0;let i=y(e),n=y(t);if(i||n)return!(!i||!n)&&e.getTime()===t.getTime();if(i=w(e),n=w(t),i||n)return e===t;if(i=f(e),n=f(t),i||n)return!(!i||!n)&&ie(e,t);if(i=S(e),n=S(t),i||n){if(!i||!n)return!1;const o=Object.keys(e).length,r=Object.keys(t).length;if(o!==r)return!1;for(const i in e){const n=e.hasOwnProperty(i),o=t.hasOwnProperty(i);if(n&&!o||!n&&o||!ne(e[i],t[i]))return!1}}return String(e)===String(t)}function oe(e,t){return e.findIndex((e=>ne(e,t)))}const re=e=>b(e)?e:null==e?"":f(e)||S(e)&&(e.toString===x||!C(e.toString))?JSON.stringify(e,se,2):String(e),se=(e,t)=>t&&t.__v_isRef?se(e,t.value):g(t)?{[`Map(${t.size})`]:[...t.entries()].reduce(((e,[t,i],n)=>(e[ae(t,n)+" =>"]=i,e)),{})}:v(t)?{[`Set(${t.size})`]:[...t.values()].map((e=>ae(e)))}:w(t)?ae(t):!S(t)||f(t)||D(t)?t:String(t),ae=(e,t="")=>{var i;return w(e)?`Symbol(${null!=(i=e.description)?i:t})`:e}},5821:function(e,t,i){i.d(t,{$j7:function(){return ae},$zI:function(){return lg},AGU:function(){return Dr},AS9:function(){return st},BxR:function(){return Pf},CPJ:function(){return Nf},Cvn:function(){return Yl},D_6:function(){return Cr},Dkq:function(){return Qh},EHG:function(){return Rb},Ekq:function(){return Du},F$j:function(){return Ab},FXL:function(){return ce},FiY:function(){return pe},Fxk:function(){return wa},GXE:function(){return J},Gxm:function(){return xr},H1u:function(){return zf},IFn:function(){return mb},INo:function(){return bs},IUB:function(){return Ob},KTj:function(){return mf},KTm:function(){return Oe},LQq:function(){return Xr},Lm6:function(){return Mc},LuV:function(){return Vf},MQo:function(){return Ir},MiH:function(){return xg},Nk3:function(){return gC},NlK:function(){return tf},NqP:function(){return le},O3h:function(){return ne},O_3:function(){return Xf},POd:function(){return me},QKF:function(){return Ss},QVL:function(){return Ms},Qk6:function(){return Th},RXH:function(){return Qs},StC:function(){return kc},VDZ:function(){return xo},Vu6:function(){return ue},WD6:function(){return mh},WKU:function(){return db},WU2:function(){return mC},YaM:function(){return wb},ZST:function(){return _r},_:function(){return Ko},aCu:function(){return AC},aVm:function(){return pb},at1:function(){return Yo},cqo:function(){return sr},d2Z:function(){return CC},eHy:function(){return yt},fKL:function(){return sf},fQL:function(){return fu},fsG:function(){return de},h7_:function(){return Hf},hhW:function(){return vC},jMC:function(){return Eb},jUB:function(){return Pa},j_S:function(){return $o},jkc:function(){return Yr},juH:function(){return Ug},nN0:function(){return ff},nPL:function(){return _a},plv:function(){return Jt},rYX:function(){return Ah},rvo:function(){return Ta},rwP:function(){return Hs},sJC:function(){return tg},sO1:function(){return yC},sgG:function(){return Ee},uIV:function(){return dC},vA3:function(){return Dg},w4P:function(){return eu},wA2:function(){return rr},wGv:function(){return Hr},wSp:function(){return og},x$5:function(){return Zl},z0n:function(){return ub},zW2:function(){return ht}});i(2106),i(4289),i(7226),i(2509),i(8453),i(6895),i(2530),i(7763);
6/**
7          * @ag-grid-community/all-modules - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v31.0.0
8          * @link https://www.ag-grid.com/
9          * @license MIT
10          */
11function n(e){return null==e||""===e?null:e}function o(e,t){return void 0===t&&(t=!1),null!=e&&(""!==e||t)}function r(e){return!o(e)}function s(e){return null==e||0===e.length}function a(e){return null!=e&&"function"===typeof e.toString?e.toString():null}function l(e){if(void 0!==e){if(null===e||""===e)return null;if("number"===typeof e)return isNaN(e)?void 0:e;var t=parseInt(e,10);return isNaN(t)?void 0:t}}function c(e){if(void 0!==e)return null!==e&&""!==e&&("boolean"===typeof e?e:/true/i.test(e))}function u(e){if(null!=e&&""!==e)return e}function d(e,t){var i=e?JSON.stringify(e):null,n=t?JSON.stringify(t):null;return i===n}function p(e,t,i){void 0===i&&(i=!1);var n=null==e,o=null==t;if(e&&e.toNumber&&(e=e.toNumber()),t&&t.toNumber&&(t=t.toNumber()),n&&o)return 0;if(n)return-1;if(o)return 1;function r(e,t){return e>t?1:e<t?-1:0}if("string"!==typeof e)return r(e,t);if(!i)return r(e,t);try{return e.localeCompare(t)}catch(s){return r(e,t)}}function h(e){if(e instanceof Set||e instanceof Map){var t=[];return e.forEach((function(e){return t.push(e)})),t}return Object.values(e)}var f=Object.freeze({__proto__:null,makeNull:n,exists:o,missing:r,missingOrEmpty:s,toStringOrNull:a,attrToNumber:l,attrToBoolean:c,attrToString:u,jsonEquals:d,defaultComparator:p,values:h}),g=function(){function e(){this.existingKeys={}}return e.prototype.addExistingKeys=function(e){for(var t=0;t<e.length;t++)this.existingKeys[e[t]]=!0},e.prototype.getUniqueKey=function(e,t){e=a(e);var i=0;while(1){var n=void 0;if(e?(n=e,0!==i&&(n+="_"+i)):t?(n=t,0!==i&&(n+="_"+i)):n=i,!this.existingKeys[n])return this.existingKeys[n]=!0,String(n);i++}},e}(),v=function(e){var t="function"===typeof Symbol&&Symbol.iterator,i=t&&e[t],n=0;if(i)return i.call(e);
11if(e&&"number"===typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},y=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s};function m(e,t){var i,n;if(null!=e)if(Array.isArray(e))for(var o=0;o<e.length;o++)t(o.toString(),e[o]);else try{for(var r=v(Object.entries(e)),s=r.next();!s.done;s=r.next()){var a=y(s.value,2),l=a[0],c=a[1];t(l,c)}}catch(u){i={error:u}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}}function C(e){for(var t={},i=Object.keys(e),n=0;n<i.length;n++){var o=i[n],r=e[o];t[o]=r}return t}function b(e){return JSON.parse(JSON.stringify(e))}function w(e,t){if(e){var i=e,n={};return Object.keys(i).forEach((function(e){if(!(t&&t.indexOf(e)>=0)){var o=i[e],r=N(o)&&o.constructor===Object;n[e]=r?w(o):o}})),n}}function S(e,t){return e[t]}function E(e,t,i){e[t]=i}function x(e,t){for(var i=[],n=2;n<arguments.length;n++)i[n-2]=arguments[n];i.forEach((function(i){return O(e,t,i)}))}function O(e,t,i,n){var o=S(e,i);void 0!==o&&E(t,i,n?n(o):o)}function T(e){var t={};return e.filter((function(e){return null!=e})).forEach((function(e){Object.keys(e).forEach((function(e){return t[e]=null}))})),Object.keys(t)}function D(e){if(!e)return[];var t=Object;if("function"===typeof t.values)return t.values(e);var i=[];for(var n in e)e.hasOwnProperty(n)&&e.propertyIsEnumerable(n)&&i.push(e[n]);return i}function R(e,t,i,n){void 0===i&&(i=!0),void 0===n&&(n=!1),o(t)&&m(t,(function(t,o){var r=e[t];if(r!==o){if(n){var s=null==r&&null!=o;if(s){var a="object"===typeof o&&o.constructor===Object,l=a;l&&(r={},e[t]=r)}}N(o)&&N(r)&&!Array.isArray(r)?R(r,o,i,n):(i||void 0!==o)&&(e[t]=o)}}))}function A(e){return r(e)||0===Object.keys(e).length}function _(e,t,i){if(null==e)return i;var n=t.split("."),o=e;while(n.length>1)if(o=o[n.shift()],null==o)return i;var r=o[n[0]];return null!=r?r:i}function P(e,t,i){if(null!=e){var n=t.split("."),o=e;n.forEach((function(e,t){o[e]||(o[e]={}),t<n.length-1&&(o=o[e])})),o[n[n.length-1]]=i}}function M(e,t,i){if(t&&e){if(!i)return e[t];for(var n=t.split("."),o=e,r=0;r<n.length;r++){if(null==o)return;o=o[n[r]]}return o}}function k(e,t,i){void 0===t&&(t=[]),Object.keys(e).forEach((function(i){var n=e[i];"object"!==typeof n||t.includes(i)||(e[i]=void 0)}));var n=Object.getPrototypeOf(e),o={},r=function(e){return"AG Grid: Grid API function ".concat(e,"() cannot be called as the grid has been destroyed.\n    It is recommended to remove local references to the grid api. Alternatively, check gridApi.isDestroyed() to avoid calling methods against a destroyed grid.\n    To run logic when the grid is about to be destroyed use the gridPreDestroy event. See: ").concat(i)};Object.getOwnPropertyNames(n).forEach((function(e){var i=n[e];if("function"===typeof i&&!t.includes(e)){var s=function(){console.warn(r(e))};o[e]={value:s,writable:!0}}})),Object.defineProperties(e,o)}function N(e){return"object"===typeof e&&null!==e}var L=Object.freeze({__proto__:null,iterateObject:m,cloneObject:C,deepCloneObject:b,deepCloneDefinition:w,getProperty:S,setProperty:E,copyPropertiesIfPresent:x,copyPropertyIfPresent:O,getAllKeysInObjects:T,getAllValuesInObject:D,mergeDeep:R,missingOrEmptyObject:A,get:_,set:P,getValueUsingField:M,removeAllReferences:k,isNonNullObject:N}),I={};function F(e,t){I[t]||(e(),I[t]=!0)}function G(e){F((function(){return console.warn("AG Grid: "+e)}),e)}function V(e){F((function(){return console.error("AG Grid: "+e)}),e)}function B(e){if(e.name)return e.name;var t=/function\s+([^\(]+)/.exec(e.toString());return t&&2===t.length?t[1].trim():null}function j(e){return!!(e&&e.constructor&&e.call&&e.apply)}function H(e){K(e,400)}var W=[],U=!1;function z(e){W.push(e),U||(U=!0,window.setTimeout((function(){var e=W.slice();W.length=0,U=!1,e.forEach((function(e){return e()}))}),0))}function K(e,t){void 0===t&&(t=0),e.length>0&&window.setTimeout((function(){return e.forEach((function(e){return e()}))}),t)}function Y(e,t){var i;return function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];var r=this;window.clearTimeout(i),i=window.setTimeout((function(){e.apply(r,n)}),t)}}function q(e,t){var i=0;return function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];var r=this,s=(new Date).getTime();s-i<t||(i=s,e.apply(r,n))}}function X(e,t,i,n){void 0===i&&(i=100);var o=(new Date).getTime(),r=null,s=!1,a=function(){var a=(new Date).getTime()-o>i;(e()||a)&&(t(),s=!0,null!=r&&(window.clearInterval(r),r=null),a&&n&&console.warn(n))};a(),s||(r=window.setInterval(a,10))}function $(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return e.reduce((function(e,t){return t(e)}),t)}}function Z(e){e&&e()}var J,Q=function(){},ee=Object.freeze({__proto__:null,doOnce:F,warnOnce:G,errorOnce:V,getFunctionName:B,isFunction:j,executeInAWhile:H,executeNextVMTurn:z,executeAfter:K,debounce:Y,throttle:q,waitUntil:X,compose:$,callIfPresent:Z,noop:Q});(function(e){e["CommunityCoreModule"]="@ag-grid-community/core",e["InfiniteRowModelModule"]="@ag-grid-community/infinite-row-model",e["ClientSideRowModelModule"]="@ag-grid-community/client-side-row-model",e["CsvExportModule"]="@ag-grid-community/csv-export",e["EnterpriseCoreModule"]="@ag-grid-enterprise/core",e["RowGroupingModule"]="@ag-grid-enterprise/row-grouping",e["ColumnsToolPanelModule"]="@ag-grid-enterprise/column-tool-panel",e["FiltersToolPanelModule"]="@ag-grid-enterprise/filter-tool-panel",e["MenuModule"]="@ag-grid-enterprise/menu",e["SetFilterModule"]="@ag-grid-enterprise/set-filter",e["MultiFilterModule"]="@ag-grid-enterprise/multi-filter",e["StatusBarModule"]="@ag-grid-enterprise/status-bar",e["SideBarModule"]="@ag-grid-enterprise/side-bar",e["RangeSelectionModule"]="@ag-grid-enterprise/range-selection",e["MasterDetailModule"]="@ag-grid-enterprise/master-detail",e["RichSelectModule"]="@ag-grid-enterprise/rich-select",e["GridChartsModule"]="@ag-grid-enterprise/charts",e["ViewportRowModelModule"]="@ag-grid-enterprise/viewport-row-model",e["ServerSideRowModelModule"]="@ag-grid-enterprise/server-side-row-model",e["ExcelExportModule"]="@ag-grid-enterprise/excel-export",e["ClipboardModule"]="@ag-grid-enterprise/clipboard",e["SparklinesModule"]="@ag-grid-enterprise/sparklines",e["AdvancedFilterModule"]="@ag-grid-enterprise/advanced-filter",e["AngularModule"]="@ag-grid-community/angular",e["ReactModule"]="@ag-grid-community/react",e["VueModule"]="@ag-grid-community/vue"})(J||(J={}));var te=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},ie=function(e,t,i){if(i||2===arguments.length)for(var n,o=0,r=t.length;o<r;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},ne=function(){function e(){}return e.register=function(t){e.__register(t,!0,void 0)},e.registerModules=function(t){e.__registerModules(t,!0,void 0)},e.__register=function(t,i,n){e.runVersionChecks(t),void 0!==n?(e.areGridScopedModules=!0,void 0===e.gridModulesMap[n]&&(e.gridModulesMap[n]={}),e.gridModulesMap[n][t.moduleName]=t):e.globalModulesMap[t.moduleName]=t,e.setModuleBased(i)},e.__unRegisterGridModules=function(t){delete e.gridModulesMap[t]},e.__registerModules=function(t,i,n){e.setModuleBased(i),t&&t.forEach((function(t){return e.__register(t,i,n)}))},e.isValidModuleVersion=function(t){var i=te(t.version.split(".")||[],2),n=i[0],o=i[1],r=te(e.currentModuleVersion.split(".")||[],2),s=r[0],a=r[1];return n===s&&o===a},e.runVersionChecks=function(t){if(e.currentModuleVersion||(e.currentModuleVersion=t.version),t.version?e.isValidModuleVersion(t)||console.error("AG Grid: You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. '".concat(t.moduleName,"' is version ").concat(t.version," but the other modules are version ").concat(this.currentModuleVersion,". Please update all modules to the same version.")):console.error("AG Grid: You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. '".concat(t.moduleName,"' is incompatible. Please update all modules to the same version.")),t.validate){var i=t.validate();if(!i.isValid){var n=i;console.error("AG Grid: ".concat(n.message))}}},e.setModuleBased=function(t){void 0===e.moduleBased?e.moduleBased=t:e.moduleBased!==t&&F((function(){console.warn("AG Grid: You are mixing modules (i.e. @ag-grid-community/core) and packages (ag-grid-community) 
11- you can only use one or the other of these mechanisms."),console.warn("Please see https://www.ag-grid.com/javascript-grid/packages-modules/ for more information.")}),"ModulePackageCheck")},e.__setIsBundled=function(){e.isBundled=!0},e.__assertRegistered=function(t,i,n){var o;if(this.__isRegistered(t,n))return!0;var r,s=i+t;if(e.isBundled)r="AG Grid: unable to use ".concat(i," as 'ag-grid-enterprise' has not been loaded. Check you are using the Enterprise bundle:\n        \n        <script src=\"https://cdn.jsdelivr.net/npm/ag-grid-enterprise@AG_GRID_VERSION/dist/ag-grid-enterprise.min.js\"><\/script>\n        \nFor 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){var a=null===(o=Object.entries(J).find((function(e){var i=te(e,2);i[0];var n=i[1];return n===t})))||void 0===o?void 0:o[0];r="AG Grid: unable to use ".concat(i," as the ").concat(a," is not registered").concat(e.areGridScopedModules?" for gridId: ".concat(n):"",". Check if you have registered the module:\n           \n    import { ModuleRegistry } from '@ag-grid-community/core';\n    import { ").concat(a," } from '").concat(t,"';\n    \n    ModuleRegistry.registerModules([ ").concat(a," ]);\n\nFor more info see: https://www.ag-grid.com/javascript-grid/modules/")}else r="AG Grid: unable to use ".concat(i," as package 'ag-grid-enterprise' has not been imported. Check that you have imported the package:\n            \n    import 'ag-grid-enterprise';\n            \nFor more info see: https://www.ag-grid.com/javascript-grid/packages/");return F((function(){console.warn(r)}),s),!1},e.__isRegistered=function(t,i){var n;return!!e.globalModulesMap[t]||!!(null===(n=e.gridModulesMap[i])||void 0===n?void 0:n[t])},e.__getRegisteredModules=function(t){return ie(ie([],te(h(e.globalModulesMap)),!1),te(h(e.gridModulesMap[t]||{})),!1)},e.__getGridRegisteredModules=function(t){var i;return h(null!==(i=e.gridModulesMap[t])&&void 0!==i?i:{})||[]},e.__isPackageBased=function(){return!e.moduleBased},e.globalModulesMap={},e.gridModulesMap={},e.areGridScopedModules=!1,e}(),oe=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},re=function(e,t,i){if(i||2===arguments.length)for(var n,o=0,r=t.length;o<r;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},se=function(){function e(e,t){if(this.beanWrappers={},this.destroyed=!1,e&&e.beanClasses){this.contextParams=e,this.logger=t,this.logger.log(">> creating ag-Application Context"),this.createBeans();var i=this.getBeanInstances();this.wireBeans(i),this.logger.log(">> ag-Application Context ready - component is alive")}}return e.prototype.getBeanInstances=function(){return h(this.beanWrappers).map((function(e){return e.beanInstance}))},e.prototype.createBean=function(e,t){if(!e)throw Error("Can't wire to bean since it is null");return this.wireBeans([e],t),e},e.prototype.wireBeans=function(e,t){this.autoWireBeans(e),this.methodWireBeans(e),this.callLifeCycleMethods(e,"preConstructMethods"),o(t)&&e.forEach(t),this.callLifeCycleMethods(e,"postConstructMethods")},e.prototype.createBeans=function(){var e=this;this.contextParams.beanClasses.forEach(this.createBeanWrapper.bind(this)),m(this.beanWrappers,(function(t,i){var n;i.bean.__agBeanMetaData&&i.bean.__agBeanMetaData.autowireMethods&&i.bean.__agBeanMetaData.autowireMethods.agConstructor&&(n=i.bean.__agBeanMetaData.autowireMethods.agConstructor);var o=e.getBeansForParameters(n,i.bean.name),r=new(i.bean.bind.apply(i.bean,re([null],oe(o),!1)));i.beanInstance=r}));var t=Object.keys(this.beanWrappers).join(", ");this.logger.log("created beans: ".concat(t))},e.prototype.createBeanWrapper=function(e){var t=e.__agBeanMetaData;if(!t){var i=void 0;return i=e.prototype.constructor?B(e.prototype.constructor):""+e,void console.error("Context item ".concat(i," is not a bean"))}var n={bean:e,beanInstance:null,beanName:t.beanName};this.beanWrappers[t.beanName]=n},e.prototype.autoWireBeans=function(e){var t=this;e.forEach((function(e){t.forEachMetaDataInHierarchy(e,(function(i,n){var o=i.agClassAttributes;o&&o.forEach((function(i){var o=t.lookupBeanInstance(n,i.beanName,i.optional);e[i.attributeName]=o}))}))}))},e.prototype.methodWireBeans=function(e){var t=this;e.forEach((function(e){t.forEachMetaDataInHierarchy(e,(function(i,n){m(i.autowireMethods,(function(i,o){if("agConstructor"!==i){var r=t.getBeansF
11orParameters(o,n);e[i].apply(e,r)}}))}))}))},e.prototype.forEachMetaDataInHierarchy=function(e,t){var i=Object.getPrototypeOf(e);while(null!=i){var n=i.constructor;if(n.hasOwnProperty("__agBeanMetaData")){var o=n.__agBeanMetaData,r=this.getBeanName(n);t(o,r)}i=Object.getPrototypeOf(i)}},e.prototype.getBeanName=function(e){if(e.__agBeanMetaData&&e.__agBeanMetaData.beanName)return e.__agBeanMetaData.beanName;var t=e.toString(),i=t.substring(9,t.indexOf("("));return i},e.prototype.getBeansForParameters=function(e,t){var i=this,n=[];return e&&m(e,(function(e,o){var r=i.lookupBeanInstance(t,o);n[Number(e)]=r})),n},e.prototype.lookupBeanInstance=function(e,t,i){if(void 0===i&&(i=!1),this.destroyed)return this.logger.log("AG Grid: bean reference ".concat(t," is used after the grid is destroyed!")),null;if("context"===t)return this;if(this.contextParams.providedBeanInstances&&this.contextParams.providedBeanInstances.hasOwnProperty(t))return this.contextParams.providedBeanInstances[t];var n=this.beanWrappers[t];return n?n.beanInstance:(i||console.error("AG Grid: unable to find bean reference ".concat(t," while initialising ").concat(e)),null)},e.prototype.callLifeCycleMethods=function(e,t){var i=this;e.forEach((function(e){return i.callLifeCycleMethodsOnBean(e,t)}))},e.prototype.callLifeCycleMethodsOnBean=function(e,t,i){var n={};this.forEachMetaDataInHierarchy(e,(function(e){var o=e[t];o&&o.forEach((function(e){e!=i&&(n[e]=!0)}))}));var o=Object.keys(n);o.forEach((function(t){return e[t]()}))},e.prototype.getBean=function(e){return this.lookupBeanInstance("getBean",e,!0)},e.prototype.destroy=function(){if(!this.destroyed){this.destroyed=!0,this.logger.log(">> Shutting down ag-Application Context");var e=this.getBeanInstances();this.destroyBeans(e),this.contextParams.providedBeanInstances=null,ne.__unRegisterGridModules(this.contextParams.gridId),this.logger.log(">> ag-Application Context shut down - component is dead")}},e.prototype.destroyBean=function(e){e&&this.destroyBeans([e])},e.prototype.destroyBeans=function(e){var t=this;return e?(e.forEach((function(e){t.callLifeCycleMethodsOnBean(e,"preDestroyMethods","destroy");var i=e;"function"===typeof i.destroy&&i.destroy()})),[]):[]},e.prototype.isDestroyed=function(){return this.destroyed},e.prototype.getGridId=function(){return this.contextParams.gridId},e}();function ae(e,t,i){var n=ge(e.constructor);n.preConstructMethods||(n.preConstructMethods=[]),n.preConstructMethods.push(t)}function le(e,t,i){var n=ge(e.constructor);n.postConstructMethods||(n.postConstructMethods=[]),n.postConstructMethods.push(t)}function ce(e,t,i){var n=ge(e.constructor);n.preDestroyMethods||(n.preDestroyMethods=[]),n.preDestroyMethods.push(t)}function ue(e){return function(t){var i=ge(t);i.beanName=e}}function de(e){return function(t,i,n){he(t,e,!1,t,i,null)}}function pe(e){return function(t,i,n){he(t,e,!0,t,i,null)}}function he(e,t,i,n,o,r){if(null!==t)if("number"!==typeof r){var s=ge(e.constructor);s.agClassAttributes||(s.agClassAttributes=[]),s.agClassAttributes.push({attributeName:o,beanName:t,optional:i})}else console.error("AG Grid: Autowired should be on an attribute");else console.error("AG Grid: Autowired name should not be null")}function fe(e){return function(t,i,n){var o,r="function"==typeof t?t:t.constructor;if("number"===typeof n){var s=void 0;i?(o=ge(r),s=i):(o=ge(r),s="agConstructor"),o.autowireMethods||(o.autowireMethods={}),o.autowireMethods[s]||(o.autowireMethods[s]={}),o.autowireMethods[s][n]=e}}}function ge(e){return e.hasOwnProperty("__agBeanMetaData")||(e.__agBeanMetaData={}),e.__agBeanMetaData}var ve=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},ye=function(e,t){return function(i,n){t(i,n,e)}},me=function(){function e(){this.allSyncListeners=new Map,this.allAsyncListeners=new Map,this.globalSyncListeners=new Set,this.globalAsyncListeners=new Set,this.asyncFunctionsQueue=[],this.scheduled=!1,this.firedEvents={}}
11return e.prototype.setBeans=function(e,t,i,n,o){if(void 0===n&&(n=null),void 0===o&&(o=null),this.frameworkOverrides=i,this.gridOptionsService=t,n){var r=t.useAsyncEvents();this.addGlobalListener(n,r)}o&&this.addGlobalListener(o,!1)},e.prototype.getListeners=function(e,t,i){var n=t?this.allAsyncListeners:this.allSyncListeners,o=n.get(e);return!o&&i&&(o=new Set,n.set(e,o)),o},e.prototype.noRegisteredListenersExist=function(){return 0===this.allSyncListeners.size&&0===this.allAsyncListeners.size&&0===this.globalSyncListeners.size&&0===this.globalAsyncListeners.size},e.prototype.addEventListener=function(e,t,i){void 0===i&&(i=!1),this.getListeners(e,i,!0).add(t)},e.prototype.removeEventListener=function(e,t,i){void 0===i&&(i=!1);var n=this.getListeners(e,i,!1);if(n&&(n.delete(t),0===n.size)){var o=i?this.allAsyncListeners:this.allSyncListeners;o.delete(e)}},e.prototype.addGlobalListener=function(e,t){void 0===t&&(t=!1),(t?this.globalAsyncListeners:this.globalSyncListeners).add(e)},e.prototype.removeGlobalListener=function(e,t){void 0===t&&(t=!1),(t?this.globalAsyncListeners:this.globalSyncListeners).delete(e)},e.prototype.dispatchEvent=function(e){var t=e;if(this.gridOptionsService){var i=this.gridOptionsService,n=i.api,o=i.columnApi,r=i.context;t.api=n,t.columnApi=o,t.context=r}this.dispatchToListeners(t,!0),this.dispatchToListeners(t,!1),this.firedEvents[t.type]=!0},e.prototype.dispatchEventOnce=function(e){this.firedEvents[e.type]||this.dispatchEvent(e)},e.prototype.dispatchToListeners=function(e,t){var i,n=this,o=e.type;if(t&&"event"in e){var r=e.event;r instanceof Event&&(e.eventPath=r.composedPath())}var s=function(i,o){return i.forEach((function(i){o.has(i)&&(t?n.dispatchAsync((function(){return i(e)})):i(e))}))},a=null!==(i=this.getListeners(o,t,!1))&&void 0!==i?i:new Set,l=new Set(a);l.size>0&&s(l,a);var c=new Set(t?this.globalAsyncListeners:this.globalSyncListeners);c.forEach((function(i){t?n.dispatchAsync((function(){return n.frameworkOverrides.dispatchEvent(o,(function(){return i(o,e)}),!0)})):n.frameworkOverrides.dispatchEvent(o,(function(){return i(o,e)}),!0)}))},e.prototype.dispatchAsync=function(e){this.asyncFunctionsQueue.push(e),this.scheduled||(window.setTimeout(this.flushAsyncQueue.bind(this),0),this.scheduled=!0)},e.prototype.flushAsyncQueue=function(){this.scheduled=!1;var e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[],e.forEach((function(e){return e()}))},ve([ye(0,fe("loggerFactory")),ye(1,fe("gridOptionsService")),ye(2,fe("frameworkOverrides")),ye(3,fe("globalEventListener")),ye(4,fe("globalSyncEventListener"))],e.prototype,"setBeans",null),e=ve([ue("eventService")],e),e}(),Ce=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},be={resizable:!0,sortable:!0},we=0;function Se(){return we++}var Ee=function(){function e(e,t,i,n){this.instanceId=Se(),this.autoHeaderHeight=null,this.moving=!1,this.menuVisible=!1,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.eventService=new me,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.colDef=e,this.userProvidedColDef=t,this.colId=i,this.primary=n,this.setState(e)}return e.prototype.getInstanceId=function(){return this.instanceId},e.prototype.setState=function(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);var t=e.sortIndex,i=e.initialSortIndex;void 0!==t?null!==t&&(this.sortIndex=t):null!==i&&(this.sortIndex=i);var n=e.hide,o=e.initialHide;this.visible=void 0!==n?!n:!o,void 0!==e.pinned?this.setPinned(e.pinned):this.setPinned(e.initialPinned);var r=e.flex,s=e.initialFlex;void 0!==r?this.flex=r:void 0!==s&&(this.flex=s)},e.prototype.setColDef=function(e,t,i){void 0===i&&(i="api"),this.colDef=e,this.userProvidedColDef=t,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),this.eventService.dispatchEvent(this.createColumnEvent("colDefChanged",i))},e.prototype.getUserProvidedColDef=function(){return this.userProvidedColDef},e.prototype.setParent=function(e){this.parent=e},e.prototype.getParent=function(){return this.parent},e.prototype.setOriginalParent=function(e){this.originalParent=e},e.prototype.getOriginalParent=function(){return this.originalParent},e.prototype.initialise=function(){this.initMinAndMaxWidths(),this.resetActualWidth("gridInitializing"),this.initDotNotation(),this.initTooltip()},e.prototype.initDotNotation=function(){var e=this.gridOptionsService.get("suppressFieldDotNotation");this.fieldContainsDots=o(this.colDef.field)&&this.colDef.field.indexOf(".")>=0&&!e,this.tooltipFieldContainsDots=o(this.colDef.tooltipField)&&this.colDef.tooltipField.indexOf(".")>=0&&!e},e.prototype.initMinAndMaxWidths=function(){var e=this.colDef;this.minWidth=this.columnUtils.calculateColMinWidth(e),this.maxWidth=this.columnUtils.calculateColMaxWidth(e)},e.prototype.initTooltip=function(){this.tooltipEnabled=o(this.colDef.tooltipField)||o(this.colDef.tooltipValueGetter)||o(this.colDef.tooltipComponent)},e.prototype.resetActualWidth=function(e){void 0===e&&(e="api");var t=this.columnUtils.calculateColInitialWidth(this.colDef);this.setActualWidth(t,e,!0)},e.prototype.isEmptyGroup=function(){return!1},e.prototype.isRowGroupDisplayed=function(e){if(r(this.colDef)||r(this.colDef.showRowGroup))return!1;var t=!0===this.colDef.showRowGroup,i=this.colDef.showRowGroup===e;return t||i},e.prototype.isPrimary=function(){return this.primary},e.prototype.isFilterAllowed=function(){var e=!!this.colDef.filter;return e},e.prototype.isFieldContainsDots=function(){return this.fieldContainsDots},e.prototype.isTooltipEnabled=function(){return this.tooltipEnabled},e.prototype.isTooltipFieldContainsDots=function(){return this.tooltipFieldContainsDots},e.prototype.addEventListener=function(e,t){this.eventService.addEventListener(e,t)},e.prototype.removeEventListener=function(e,t){this.eventService.removeEventListener(e,t)},e.prototype.createColumnFunctionCallbackParams=function(e){return{node:e,data:e.data,column:this,colDef:this.colDef,context:this.gridOptionsService.context,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi}},e.prototype.isSuppressNavigable=function(e){if("boolean"===typeof this.colDef.suppressNavigable)return this.colDef.suppressNavigable;if("function"===typeof this.colDef.suppressNavigable){var t=this.createColumnFunctionCallbackParams(e),i=this.colDef.suppressNavigable;return i(t)}return!1},e.prototype.isCellEditable=function(e){return!(e.group&&!this.gridOptionsService.get("enableGroupEdit"))&&this.isColumnFunc(e,this.colDef.editable)},e.prototype.isSuppressFillHandle=function(){return!!this.colDef.suppressFillHandle},e.prototype.isAutoHeight=function(){return!!this.colDef.autoHeight},e.prototype.isAutoHeaderHeight=function(){return!!this.colDef.autoHeaderHeight},e.prototype.isRowDrag=function(e){return this.isColumnFunc(e,this.colDef.rowDrag)},e.prototype.isDndSource=function(e){return this.isColumnFunc(e,this.colDef.dndSource)},e.prototype.isCellCheckboxSelection=function(e){return this.isColumnFunc(e,this.colDef.checkboxSelection)},e.prototype.isSuppressPaste=function(e){return this.isColumnFunc(e,this.colDef?this.colDef.suppressPaste:null)},e.prototype.isResizable=function(){return!!this.getColDefValue("resizable")},e.prototype.getColDefValue=function(e){var t;return null!==(t=this.colDef[e])&&void 0!==t?t:be[e]},e.prototype.isColumnFunc=function(e,t){if("boolean"===typeof t)return t;if("function"===typeof t){var i=this.createColumnFunctionCallbackParams(e),n=t;return n(i)}return!1},e.prototype.setMoving=function(e,t){void 0===t&&(t="api"),this.moving=e,this.eventService.dispatchEvent(this.createColumnEvent("movingChanged",t))},e.prototype.createColumnEvent=function(e,t){return{type:e,column:this,columns:[this],source:t,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context}},e.prototype.isMoving=function(){return this.moving},e.prototype.getSort=function(){return this.sort},e.prototype.setSort=function(e,t){void 0===t&&(t="api"),this.sort!==e&&(this.sort=e,this.eventService.dispatchEvent(this.createColumnEvent("sortChanged",t))),this.dispatchStateUpdatedEvent("sort")},e.prototype.setMenuVisible=function(e,t){void 0===t&&(t="api"),this.menuVisible!==e&&(this.menuVisible=e,this.eventService.dispatchEvent(this.createColumnEvent("menuVisibleChanged",t)))},e.prototype.isMenuVisible=function(){return this.menuVisible},e.prototype.isSortable=function(){return!!this.getColDefValue("sortable")},e.prototype.isSortAscending=function(){return"asc"===this.sort},e.prototype.isSortDescending=function(){return"desc"===this.sort},e.prototype.isSortNone=function(){return r(this.sort)},e.prototype.isSorting=function(){return o(this.sort)},e.prototype.getSortIndex=function(){return this.sortIndex},e.prototype.setSortIndex=function(e){this.sortIndex=e,this.dispatchStateUpdatedEvent("sortIndex")},e.prototype.setAggFunc=function(e){this.aggFunc=e,this.dispatchStateUpdatedEvent("aggFunc")},e.prototype.getAggFunc=function(){return this.aggFunc},e.prototype.getLeft=function(){return this.left},e.prototype.getOldLeft=function(){return this.oldLeft},e.prototype.getRight=function(){return this.left+this.actualWidth},e.prototype.setLeft=function(e,t){void 0===t&&(t="api"),this.oldLeft=this.left,this.left!==e&&(this.left=e,this.eventService.dispatchEvent(this.createColumnEvent("leftChanged",t)))},e.prototype.isFilterActive=function(){return this.filterActive},e.prototype.setFilterActive=function(e,t,i){void 0===t&&(t="api"),this.filterActive!==e&&(this.filterActive=e,this.eventService.dispatchEvent(this.createColumnEvent("filterActiveChanged",t)));var n=this.createColumnEvent("filterChanged",t);i&&R(n,i),this.eventService.dispatchEvent(n)},e.prototype.isHovered=function(){return this.columnHoverService.isHovered(this)},e.prototype.setPinned=function(e){this.pinned=!0===e||"left"===e?"left"
vendor: 7,813 bytes, line 11
11:"right"===e?"right":null,this.dispatchStateUpdatedEvent("pinned")},e.prototype.setFirstRightPinned=function(e,t){void 0===t&&(t="api"),this.firstRightPinned!==e&&(this.firstRightPinned=e,this.eventService.dispatchEvent(this.createColumnEvent("firstRightPinnedChanged",t)))},e.prototype.setLastLeftPinned=function(e,t){void 0===t&&(t="api"),this.lastLeftPinned!==e&&(this.lastLeftPinned=e,this.eventService.dispatchEvent(this.createColumnEvent("lastLeftPinnedChanged",t)))},e.prototype.isFirstRightPinned=function(){return this.firstRightPinned},e.prototype.isLastLeftPinned=function(){return this.lastLeftPinned},e.prototype.isPinned=function(){return"left"===this.pinned||"right"===this.pinned},e.prototype.isPinnedLeft=function(){return"left"===this.pinned},e.prototype.isPinnedRight=function(){return"right"===this.pinned},e.prototype.getPinned=function(){return this.pinned},e.prototype.setVisible=function(e,t){void 0===t&&(t="api");var i=!0===e;this.visible!==i&&(this.visible=i,this.eventService.dispatchEvent(this.createColumnEvent("visibleChanged",t))),this.dispatchStateUpdatedEvent("hide")},e.prototype.isVisible=function(){return this.visible},e.prototype.isSpanHeaderHeight=function(){var e=this.getColDef();return!e.suppressSpanHeaderHeight&&!e.autoHeaderHeight},e.prototype.getColDef=function(){return this.colDef},e.prototype.getColumnGroupShow=function(){return this.colDef.columnGroupShow},e.prototype.getColId=function(){return this.colId},e.prototype.getId=function(){return this.colId},e.prototype.getUniqueId=function(){return this.colId},e.prototype.getDefinition=function(){return this.colDef},e.prototype.getActualWidth=function(){return this.actualWidth},e.prototype.getAutoHeaderHeight=function(){return this.autoHeaderHeight},e.prototype.setAutoHeaderHeight=function(e){var t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t},e.prototype.createBaseColDefParams=function(e){var t={node:e,data:e.data,colDef:this.colDef,column:this,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context};return t},e.prototype.getColSpan=function(e){if(r(this.colDef.colSpan))return 1;var t=this.createBaseColDefParams(e),i=this.colDef.colSpan(t);return Math.max(i,1)},e.prototype.getRowSpan=function(e){if(r(this.colDef.rowSpan))return 1;var t=this.createBaseColDefParams(e),i=this.colDef.rowSpan(t);return Math.max(i,1)},e.prototype.setActualWidth=function(e,t,i){void 0===t&&(t="api"),void 0===i&&(i=!1),null!=this.minWidth&&(e=Math.max(e,this.minWidth)),null!=this.maxWidth&&(e=Math.min(e,this.maxWidth)),this.actualWidth!==e&&(this.actualWidth=e,this.flex&&"flex"!==t&&"gridInitializing"!==t&&(this.flex=null),i||this.fireColumnWidthChangedEvent(t)),this.dispatchStateUpdatedEvent("width")},e.prototype.fireColumnWidthChangedEvent=function(e){this.eventService.dispatchEvent(this.createColumnEvent("widthChanged",e))},e.prototype.isGreaterThanMax=function(e){return null!=this.maxWidth&&e>this.maxWidth},e.prototype.getMinWidth=function(){return this.minWidth},e.prototype.getMaxWidth=function(){return this.maxWidth},e.prototype.getFlex=function(){return this.flex||0},e.prototype.setFlex=function(e){this.flex!==e&&(this.flex=e),this.dispatchStateUpdatedEvent("flex")},e.prototype.setMinimum=function(e){void 0===e&&(e="api"),o(this.minWidth)&&this.setActualWidth(this.minWidth,e)},e.prototype.setRowGroupActive=function(e,t){void 0===t&&(t="api"),this.rowGroupActive!==e&&(this.rowGroupActive=e,this.eventService.dispatchEvent(this.createColumnEvent("columnRowGroupChanged",t))),this.dispatchStateUpdatedEvent("rowGroup")},e.prototype.isRowGroupActive=function(){return this.rowGroupActive},e.prototype.setPivotActive=function(e,t){void 0===t&&(t="api"),this.pivotActive!==e&&(this.pivotActive=e,this.eventService.dispatchEvent(this.createColumnEvent("columnPivotChanged",t))),this.dispatchStateUpdatedEvent("pivot")},e.prototype.isPivotActive=function(){return this.pivotActive},e.prototype.isAnyFunctionActive=function(){return this.isPivotActive()||this.isRowGroupActive()||this.isValueActive()},e.prototype.isAnyFunctionAllowed=function(){return this.isAllowPivot()||this.isAllowRowGroup()||this.isAllowValue()},e.prototype.setValueActive=function(e,t){void 0===t&&(t="api"),this.aggregationActive!==e&&(this.aggregationActive=e,this.eventService.dispatchEvent(this.createColumnEvent("columnValueChanged",t)))},e.prototype.isValueActive=function(){return this.aggregationActive},e.prototype.isAllowPivot=function(){return!0===this.colDef.enablePivot},e.prototype.isAllowValue=function(){return!0===this.colDef.enableValue},e.prototype.isAllowRowGroup=function(){return!0===this.colDef.enableRowGroup},e.prototype.getMenuTabs=function(e){var t=this.getColDef().menuTabs;return null==t&&(t=e),t},e.prototype.dispatchStateUpdatedEvent=function(t){this.eventService.dispatchEvent({type:e.EVENT_STATE_UPDATED,key:t})},e.EVENT_MOVING_CHANGED="movingChanged",e.EVENT_LEFT_CHANGED="leftChanged",e.EVENT_WIDTH_CHANGED="widthChanged",e.EVENT_LAST_LEFT_PINNED_CHANGED="lastLeftPinnedChanged",e.EVENT_FIRST_RIGHT_PINNED_CHANGED="firstRightPinnedChanged",e.EVENT_VISIBLE_CHANGED="visibleChanged",e.EVENT_FILTER_CHANGED="filterChanged",e.EVENT_FILTER_ACTIVE_CHANGED="filterActiveChanged",e.EVENT_SORT_CHANGED="sortChanged",e.EVENT_COL_DEF_CHANGED="colDefChanged",e.EVENT_MENU_VISIBLE_CHANGED="menuVisibleChanged",e.EVENT_ROW_GROUP_CHANGED="columnRowGroupChanged",e.EVENT_PIVOT_CHANGED="columnPivotChanged",e.EVENT_VALUE_CHANGED="columnValueChanged",e.EVENT_STATE_UPDATED="columnStateUpdated",Ce([de("gridOptionsService")],e.prototype,"gridOptionsService",void 0),Ce([de("columnUtils")],e.prototype,"columnUtils",void 0),Ce([de("columnHoverService")],e.prototype,"columnHoverService",void 0),Ce([le],e.prototype,"initialise",null),e}(),xe=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Oe=function(){function e(e,t,i,n){this.localEventService=new me,this.expandable=!1,this.instanceId=Se(),this.expandableListenerRemoveCallback=null,this.colGroupDef=e,this.groupId=t,this.expanded=!!e&&!!e.openByDefault,this.padding=i,this.level=n}return e.prototype.destroy=function(){this.expandableListenerRemoveCallback&&this.reset(null,void 0)},e.prototype.reset=function(e,t){this.colGroupDef=e,this.level=t,this.originalParent=null,this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback(),this.children=void 0,this.expandable=void 0},e.prototype.getInstanceId=function(){return this.instanceId},e.prototype.setOriginalParent=function(e){this.originalParent=e},e.prototype.getOriginalParent=function(){return this.originalParent},e.prototype.getLevel=function(){return this.level},e.prototype.isVisible=function(){return!!this.children&&this.children.some((function(e){return e.isVisible()}))},e.prototype.isPadding=function(){return this.padding},e.prototype.setExpanded=function(t){this.expanded=void 0!==t&&t;var i={type:e.EVENT_EXPANDED_CHANGED};this.localEventService.dispatchEvent(i)},e.prototype.isExpandable=function(){return this.expandable},e.prototype.isExpanded=function(){return this.expanded},e.prototype.getGroupId=function(){return this.groupId},e.prototype.getId=function(){return this.getGroupId()},e.prototype.setChildren=function(e){this.children=e},e.prototype.getChildren=function(){return this.children},e.prototype.getColGroupDef=function(){return this.colGroupDef},e.prototype.getLeafColumns=function(){var e=[];return this.addLeafColumns(e),e},e.prototype.addLeafColumns=function(t){this.children&&this.children.forEac
11h((function(i){i instanceof Ee?t.push(i):i instanceof e&&i.addLeafColumns(t)}))},e.prototype.getColumnGroupShow=function(){var e=this.colGroupDef;if(e)return e.columnGroupShow},e.prototype.setupExpandable=function(){var e=this;this.setExpandable(),this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback();var t=this.onColumnVisibilityChanged.bind(this);this.getLeafColumns().forEach((function(e){return e.addEventListener("visibleChanged",t)})),this.expandableListenerRemoveCallback=function(){e.getLeafColumns().forEach((function(e){return e.removeEventListener("visibleChanged",t)})),e.expandableListenerRemoveCallback=null}},e.prototype.setExpandable=function(){if(!this.isPadding()){for(var t=!1,i=!1,n=!1,o=this.findChildrenRemovingPadding(),r=0,s=o.length;r<s;r++){var a=o[r];if(a.isVisible()){var l=a.getColumnGroupShow();"open"===l?(t=!0,n=!0):"closed"===l?(i=!0,n=!0):(t=!0,i=!0)}}var c=t&&i&&n;if(this.expandable!==c){this.expandable=c;var u={type:e.EVENT_EXPANDABLE_CHANGED};this.localEventService.dispatchEvent(u)}}},e.prototype.findChildrenRemovingPadding=function(){var t=[],i=function(n){n.forEach((function(n){var o=n instanceof e&&n.isPadding();o?i(n.children):t.push(n)}))};return i(this.children),t},e.prototype.onColumnVisibilityChanged=function(){this.setExpandable()},e.prototype.addEventListener=function(e,t){this.localEventService.addEventListener(e,t)},e.prototype.removeEventListener=function(e,t){this.localEventService.removeEventListener(e,t)},e.EVENT_EXPANDED_CHANGED="expandedChanged",e.EVENT_EXPANDABLE_CHANGED="expandableChanged",xe([ce],e.prototype,"destroy",null),e}(),Te={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}};function De(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var i=0;i<e.length;i++){var n=e[i];if(o(n))return n}return null}function Re(e){return null!=e&&e.length>0}function Ae(e){if(e&&e.length)return e[e.length-1]}function _e(e,t,i){return null==e&&null==t||null!=e&&null!=t&&e.length===t.length&&e.every((function(e,n){return i?i(e,t[n]):t[n]===e}))}function Pe(e,t){return _e(e,t)}function Me(e){return e.sort((function(e,t){return e-t}))}function ke(e,t){if(e)for(var i=e.length-2;i>=0;i--){var n=e[i]===t,o=e[i+1]===t;n&&o&&e.splice(i+1,1)}}function Ne(e,t){var i=e.indexOf(t);i>=0&&(e[i]=e[e.length-1],e.pop())}function Le(e,t){var i=e.indexOf(t);i>=0&&e.splice(i,1)}function Ie(e,t){for(var i=0;i<t.length;i++)Ne(e,t[i])}function Fe(e,t){for(var i=0;i<t.length;i++)Le(e,t[i])}function Ge(e,t,i){e.splice(i,0,t)}function Ve(e,t,i){if(null!=e&&null!=t)for(var n=t.length-1;n>=0;n--){var o=t[n];Ge(e,o,i)}}function Be(e,t,i){Fe(e,t),t.slice().reverse().forEach((function(t){return Ge(e,t,i)}))}function je(e,t){return e.indexOf(t)>-1}function He(e){return[].concat.apply([],e)}function We(e,t){null!=t&&null!=e&&t.forEach((function(t){return e.push(t)}))}function Ue(e){return e.map(a)}function ze(e,t){if(null!=e)for(var i=e.length-1;i>=0;i--)t(e[i],i)}var Ke=Object.freeze({__proto__:null,firstExistingValue:De,existsAndNotEmpty:Re,last:Ae,areEqual:_e,shallowCompare:Pe,sortNumerically:Me,removeRepeatsFromArray:ke,removeFromUnorderedArray:Ne,removeFromArray:Le,removeAllFromUnorderedArray:Ie,removeAllFromArray:Fe,insertIntoArray:Ge,insertArrayIntoArray:Ve,moveInArray:Be,includes:je,flatten:He,pushAll:We,toStrings:Ue,forEachReverse:ze}),Ye="__ag_Grid_Stop_Propagation",qe=["touchstart","touchend","touchmove","touchcancel","scroll"],Xe={};function $e(e){e[Ye]=!0}function Ze(e){return!0===e[Ye]}var Je=function(){var e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"},t=function(t){if("boolean"===typeof Xe[t])return Xe[t];var i=document.createElement(e[t]||"div");return t="on"+t,Xe[t]=t in i};return t}();function Qe(e,t,i){var n=t;while(n){var o=e.getDomData(n,i);if(o)return o;n=n.parentElement}return null}function et(e,t){return!(!t||!e)&&it(t).indexOf(e)>=0}function tt(e){var t=[],i=e.target;while(i)t.push(i),i=i.parentElement;return t}function it(e){var t=e;return t.path?t.path:t.composedPath?t.composedPath():tt(t)}function nt(e,t,i,n){var o=je(qe,i),r=o?{passive:!0}:void 0;e&&e.addEventListener&&e.addEventListener(t,i,n,r)}var ot=Object.freeze({__proto__:null,stopPropagationForAgGrid:$e,isStopPropagationForAgGrid:Ze,isEventSupported:Je,getCtrlForEventTarget:Qe,isElementInEventPath:et,createEventPath:tt,getEventPath:it,addSafePassiveEventListener:nt}),rt=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},st=function(){function e(){var e=this;this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.lastChangeSetIdLookup={},this.propertyListenerId=0,this.isAlive=function(){return!e.destroyed}}return e.prototype.getFrameworkOverrides=function(){return this.frameworkOverrides},e.prototype.getContext=function(){return this.context},e.prototype.destroy=function(){this.destroyFunctions.forEach((function(e){return e()})),this.destroyFunctions.length=0,this.destroyed=!0,this.dispatchEvent({type:e.EVENT_DESTROYED})},e.prototype.addEventListener=function(e,t){this.localEventService||(this.localEventService=new me),this.localEventService.addEventListener(e,t)},e.prototype.removeEventListener=function(e,t){this.localEventService&&this.localEventService.removeEventListener(e,t)},e.prototype.dispatchEventAsync=function(e){var t=this;window.setTimeout((function(){return t.dispatchEvent(e)}),0)},e.prototype.dispatchEvent=function(e){this.localEventService&&this.localEventService.dispatchEvent(e)},e.prototype.addManagedListener=function(e,t,i){var n=this;if(!this.destroyed){e instanceof HTMLElement?nt(this.getFrameworkOverrides(),e,t,i):e.addEventListener(t,i);var o=function(){return e.removeEventListener(t,i),n.destroyFunctions=n.destroyFunctions.filter((function(e){return e!==o})),null};return this.destroyFunctions.push(o),o}}
11,e.prototype.setupGridOptionListener=function(e,t){var i=this;this.gridOptionsService.addEventListener(e,t);var n=function(){return i.gridOptionsService.removeEventListener(e,t),i.destroyFunctions=i.destroyFunctions.filter((function(e){return e!==n})),null};this.destroyFunctions.push(n)},e.prototype.addManagedPropertyListener=function(e,t){this.destroyed||this.setupGridOptionListener(e,t)},e.prototype.addManagedPropertyListeners=function(e,t){var i=this;if(!this.destroyed){var n=e.join("-")+this.propertyListenerId++,o=function(e){if(e.changeSet){if(e.changeSet&&e.changeSet.id===i.lastChangeSetIdLookup[n])return;i.lastChangeSetIdLookup[n]=e.changeSet.id}var o={type:"gridPropertyChanged",changeSet:e.changeSet};t(o)};e.forEach((function(e){return i.setupGridOptionListener(e,o)}))}},e.prototype.addDestroyFunc=function(e){this.isAlive()?this.destroyFunctions.push(e):e()},e.prototype.createManagedBean=function(e,t){var i=this.createBean(e,t);return this.addDestroyFunc(this.destroyBean.bind(this,e,t)),i},e.prototype.createBean=function(e,t,i){return(t||this.getContext()).createBean(e,i)},e.prototype.destroyBean=function(e,t){return(t||this.getContext()).destroyBean(e)},e.prototype.destroyBeans=function(e,t){var i=this;return e&&e.forEach((function(e){return i.destroyBean(e,t)})),[]},e.EVENT_DESTROYED="destroyed",rt([de("frameworkOverrides")],e.prototype,"frameworkOverrides",void 0),rt([de("context")],e.prototype,"context",void 0),rt([de("eventService")],e.prototype,"eventService",void 0),rt([de("gridOptionsService")],e.prototype,"gridOptionsService",void 0),rt([de("localeService")],e.prototype,"localeService",void 0),rt([de("environment")],e.prototype,"environment",void 0),rt([ce],e.prototype,"destroy",null),e}(),at=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),lt=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},ct=function(e,t){return function(i,n){t(i,n,e)}},ut=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return at(t,e),t.prototype.setBeans=function(e){this.logger=e.create("ColumnFactory")},t.prototype.createColumnTree=function(e,t,i){var n=new g,o=this.extractExistingTreeData(i),r=o.existingCols,s=o.existingGroups,a=o.existingColKeys;n.addExistingKeys(a);var l=this.recursivelyCreateColumns(e,0,t,r,n,s),c=this.findMaxDept(l,0);this.logger.log("Number of levels for grouped columns is "+c);var u=this.balanceColumnTree(l,0,c,n),d=function(e,t){e instanceof Oe&&e.setupExpandable(),e.setOriginalParent(t)};return this.columnUtils.depthFirstOriginalTreeSearch(null,u,d),{columnTree:u,treeDept:c}},t.prototype.extractExistingTreeData=function(e){var t=[],i=[],n=[];return e&&this.columnUtils.depthFirstOriginalTreeSearch(null,e,(function(e){if(e instanceof Oe){var o=e;i.push(o)}else{var r=e;n.push(r.getId()),t.push(r)}})),{existingCols:t,existingGroups:i,existingColKeys:n}},t.prototype.createForAutoGroups=function(e,t){var i=this;return e.map((function(e){return i.createAutoGroupTreeItem(t,e)}))},t.prototype.createAutoGroupTreeItem=function(e,t){for(var i=this.findDepth(e),n=t,o=i-1;o>=0;o--){var r=new Oe(null,"FAKE_PATH_".concat(t.getId(),"}_").concat(o),!0,o);this.createBean(r),r.setChildren([n]),n.setOriginalParent(r),n=r}return 0===i&&t.setOriginalParent(null),n},t.prototype.findDepth=function(e){var t=0,i=e;while(i&&i[0]&&i[0]instanceof Oe)t++,i=i[0].getChildren();return t},t.prototype.balanceColumnTree=function(e,t,i,n){for(var o=[],r=0;r<e.length;r++){var s=e[r];if(s instanceof Oe){var a=s,l=this.balanceColumnTree(a.getChildren(),t+1,i,n);a.setChildren(l),o.push(a)}else{for(var c=void 0,u=void 0,d=i-1;d>=t;d--){var p=n.getUniqueKey(null,null),h=this.createMergedColGroupDef(null),f=new Oe(h,p,!0,t);this.createBean(f),u&&u.setChildren([f]),u=f,c||(c=u)}if(c&&u){o.push(c);var g=e.some((function(e){return e instanceof Oe}));
11if(g){u.setChildren([s]);continue}u.setChildren(e);break}o.push(s)}}return o},t.prototype.findMaxDept=function(e,t){for(var i=t,n=0;n<e.length;n++){var o=e[n];if(o instanceof Oe){var r=o,s=this.findMaxDept(r.getChildren(),t+1);i<s&&(i=s)}}return i},t.prototype.recursivelyCreateColumns=function(e,t,i,n,o,r){if(!e)return[];for(var s=new Array(e.length),a=0;a<s.length;a++){var l=e[a];this.isColumnGroup(l)?s[a]=this.createColumnGroup(i,l,t,n,o,r):s[a]=this.createColumn(i,l,n,o)}return s},t.prototype.createColumnGroup=function(e,t,i,n,o,r){var s=this.createMergedColGroupDef(t),a=o.getUniqueKey(s.groupId||null,null),l=new Oe(s,a,!1,i);this.createBean(l);var c=this.findExistingGroup(t,r);c&&r.splice(c.idx,1);var u=null===c||void 0===c?void 0:c.group;u&&l.setExpanded(u.isExpanded());var d=this.recursivelyCreateColumns(s.children,i+1,e,n,o,r);return l.setChildren(d),l},t.prototype.createMergedColGroupDef=function(e){var t={};return Object.assign(t,this.gridOptionsService.get("defaultColGroupDef")),Object.assign(t,e),t},t.prototype.createColumn=function(e,t,i,n){var o=this.findExistingColumn(t,i);o&&(null===i||void 0===i||i.splice(o.idx,1));var r=null===o||void 0===o?void 0:o.column;if(r){a=this.addColumnDefaultAndTypes(t,r.getColId());r.setColDef(a,t),this.applyColumnState(r,a)}else{var s=n.getUniqueKey(t.colId,t.field),a=this.addColumnDefaultAndTypes(t,s);r=new Ee(a,t,s,e),this.context.createBean(r)}return this.dataTypeService.addColumnListeners(r),r},t.prototype.applyColumnState=function(e,t){var i=l(t.flex);void 0!==i&&e.setFlex(i);var n=e.getFlex()<=0;if(n){var o=l(t.width);if(null!=o)e.setActualWidth(o);else{var r=e.getActualWidth();e.setActualWidth(r)}}void 0!==t.sort&&("asc"==t.sort||"desc"==t.sort?e.setSort(t.sort):e.setSort(void 0));var s=l(t.sortIndex);void 0!==s&&e.setSortIndex(s);var a=c(t.hide);void 0!==a&&e.setVisible(!a),void 0!==t.pinned&&e.setPinned(t.pinned)},t.prototype.findExistingColumn=function(e,t){if(t)for(var i=0;i<t.length;i++){var n=t[i].getUserProvidedColDef();if(n){var o=null!=e.colId;if(o){if(t[i].getId()===e.colId)return{idx:i,column:t[i]}}else{var r=null!=e.field;if(r){if(n.field===e.field)return{idx:i,column:t[i]}}else if(n===e)return{idx:i,column:t[i]}}}}},t.prototype.findExistingGroup=function(e,t){var i=null!=e.groupId;if(i)for(var n=0;n<t.length;n++){var o=t[n],r=o.getColGroupDef();if(r&&o.getId()===e.groupId)return{idx:n,group:o}}},t.prototype.addColumnDefaultAndTypes=function(e,t){var i={},n=this.gridOptionsService.get("defaultColDef");R(i,n,!1,!0);var o=this.dataTypeService.updateColDefAndGetColumnType(i,e,t);o&&this.assignColumnTypes(o,i),R(i,e,!1,!0);var r=this.gridOptionsService.get("autoGroupColumnDef"),s=this.gridOptionsService.isColumnsSortingCoupledToGroup();return e.rowGroup&&r&&s&&R(i,{sort:r.sort,initialSort:r.initialSort},!1,!0),this.dataTypeService.validateColDef(i),i},t.prototype.assignColumnTypes=function(e,t){if(e.length){var i=Object.assign({},Te),n=this.gridOptionsService.get("columnTypes")||{};m(n,(function(e,t){if(e in i)console.warn("AG Grid: the column type '".concat(e,"' is a default column type and cannot be overridden."));else{var n=t;n.type&&G("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((function(e){var n=i[e.trim()];n?R(t,n,!1,!0):console.warn("AG Grid: colDef.type '"+e+"' does not correspond to defined gridOptions.columnTypes")}))}},t.prototype.isColumnGroup=function(e){return void 0!==e.children},lt([de("columnUtils")],t.prototype,"columnUtils",void 0),lt([de("dataTypeService")],t.prototype,"dataTypeService",void 0),lt([ct(0,fe("loggerFactory"))],t.prototype,"setBeans",null),t=lt([ue("columnFactory")],t),t}(st),dt=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},pt=function(){function e(e,t,i,n){this.displayedChildren=[],this.localEventService=new me,this.groupId=t,this.partId=i,this.providedColumnGroup=e,this.pinned=n}return e.createUniqueId=function(e,t){return e+"_"+t},e.prototype.reset=function(){this.parent=null,this.children=null,this.displayedChildren=null},e.prototype.getParent=function(){return this.parent},e.prototype.setParent=function(e){this.parent=e},e.prototype.getUniqueId=function(){return e.createUniqueId(this.groupId,this.partId)},e.prototype.isEmptyGroup=function(){return 0===this.displayedChildren.length},e.prototype.isMoving=function(){var e=this.getProvidedColumnGroup().getLeafColumns();return!(!e||0===e.length)&&e.every((function(e){return e.isMoving()}))},e.prototype.checkLeft=function(){if(this.displayedChildren.forEac
vendor: 5,420 bytes, line 11
11h((function(t){t instanceof e&&t.checkLeft()})),this.displayedChildren.length>0)if(this.gridOptionsService.get("enableRtl")){var t=Ae(this.displayedChildren),i=t.getLeft();this.setLeft(i)}else{var n=this.displayedChildren[0].getLeft();this.setLeft(n)}else this.setLeft(null)},e.prototype.getLeft=function(){return this.left},e.prototype.getOldLeft=function(){return this.oldLeft},e.prototype.setLeft=function(t){this.oldLeft=t,this.left!==t&&(this.left=t,this.localEventService.dispatchEvent(this.createAgEvent(e.EVENT_LEFT_CHANGED)))},e.prototype.getPinned=function(){return this.pinned},e.prototype.createAgEvent=function(e){return{type:e}},e.prototype.addEventListener=function(e,t){this.localEventService.addEventListener(e,t)},e.prototype.removeEventListener=function(e,t){this.localEventService.removeEventListener(e,t)},e.prototype.getGroupId=function(){return this.groupId},e.prototype.getPartId=function(){return this.partId},e.prototype.isChildInThisGroupDeepSearch=function(t){var i=!1;return this.children.forEach((function(n){t===n&&(i=!0),n instanceof e&&n.isChildInThisGroupDeepSearch(t)&&(i=!0)})),i},e.prototype.getActualWidth=function(){var e=0;return this.displayedChildren&&this.displayedChildren.forEach((function(t){e+=t.getActualWidth()})),e},e.prototype.isResizable=function(){if(!this.displayedChildren)return!1;var e=!1;return this.displayedChildren.forEach((function(t){t.isResizable()&&(e=!0)})),e},e.prototype.getMinWidth=function(){var e=0;return this.displayedChildren.forEach((function(t){e+=t.getMinWidth()||0})),e},e.prototype.addChild=function(e){this.children||(this.children=[]),this.children.push(e)},e.prototype.getDisplayedChildren=function(){return this.displayedChildren},e.prototype.getLeafColumns=function(){var e=[];return this.addLeafColumns(e),e},e.prototype.getDisplayedLeafColumns=function(){var e=[];return this.addDisplayedLeafColumns(e),e},e.prototype.getDefinition=function(){return this.providedColumnGroup.getColGroupDef()},e.prototype.getColGroupDef=function(){return this.providedColumnGroup.getColGroupDef()},e.prototype.isPadding=function(){return this.providedColumnGroup.isPadding()},e.prototype.isExpandable=function(){return this.providedColumnGroup.isExpandable()},e.prototype.isExpanded=function(){return this.providedColumnGroup.isExpanded()},e.prototype.setExpanded=function(e){this.providedColumnGroup.setExpanded(e)},e.prototype.addDisplayedLeafColumns=function(t){this.displayedChildren.forEach((function(i){i instanceof Ee?t.push(i):i instanceof e&&i.addDisplayedLeafColumns(t)}))},e.prototype.addLeafColumns=function(t){this.children.forEach((function(i){i instanceof Ee?t.push(i):i instanceof e&&i.addLeafColumns(t)}))},e.prototype.getChildren=function(){return this.children},e.prototype.getColumnGroupShow=function(){return this.providedColumnGroup.getColumnGroupShow()},e.prototype.getProvidedColumnGroup=function(){return this.providedColumnGroup},e.prototype.getPaddingLevel=function(){var e=this.getParent();return this.isPadding()&&e&&e.isPadding()?1+e.getPaddingLevel():0},e.prototype.calculateDisplayedColumns=function(){var t=this;this.displayedChildren=[];var i=this;while(null!=i&&i.isPadding())i=i.getParent();var n=!!i&&i.providedColumnGroup.isExpandable();if(!n)return this.displayedChildren=this.children,void this.localEventService.dispatchEvent(this.createAgEvent(e.EVENT_DISPLAYED_CHILDREN_CHANGED));this.children.forEach((function(n){var o=n instanceof e&&(!n.displayedChildren||!n.displayedChildren.length);if(!o){var r=n.getColumnGroupShow();switch(r){case"open":i.providedColumnGroup.isExpanded()&&t.displayedChildren.push(n);break;case"closed":i.providedColumnGroup.isExpanded()||t.displayedChildren.push(n);break;default:t.displayedChildren.push(n);break}}})),this.localEventService.dispatchEvent(this.createAgEvent(e.EVENT_DISPLAYED_CHILDREN_CHANGED))},e.EVENT_LEFT_CHANGED="leftChanged",e.EVENT_DISPLAYED_CHILDREN_CHANGED="displayedChildrenChanged",dt([de("gridOptionsService")],e.prototype,"gridOptionsService",void 0),e}(),ht=function(){function e(){}return e.EVENT_COLUMN_EVERYTHING_CHANGED="columnEverythingChanged",e.EVENT_NEW_COLUMNS_LOADED="newColumnsLoaded",e.EVENT_COLUMN_PIVOT_MODE_CHANGED="columnPivotModeChanged",e.EVENT_COLUMN_ROW_GROUP_CHANGED="columnRowGroupChanged",e.EVENT_EXPAND_COLLAPSE_ALL="expandOrCollapseAll",e.EVENT_COLUMN_PIVOT_CHANGED="columnPivotChanged",e.EVENT_GRID_COLUMNS_CHANGED="gridColumnsChanged",e.EVENT_COLUMN_VALUE_CHANGED="columnValueChanged",e.EVENT_COLUMN_MOVED="columnMoved",e.EVENT_COLUMN_VISIBLE="columnVisible",e.EVENT_COLUMN_PINNED="columnPinned",e.EVENT_COLUMN_GROUP_OPENED="columnGroupOpened",e.EVENT_COLUMN_RESIZED="columnResized",e.EVENT_DISPLAYED_COLUMNS_CHANGED="displayedColumnsChanged",e.EVENT_SUPPRESS_COLUMN_MOVE_CHANGED="suppressMovableColumns",e.EVENT_SUPPRESS_MENU_HIDE_CHANGED="suppressMenuHide",e.EVENT_SUPPRESS_FIELD_DOT_NOTATION="suppressFieldDotNotation",e.EVENT_VIRTUAL_COLUMNS_CHANGED="virtualColumnsChanged",e.EVENT_ASYNC_TRANSACTIONS_FLUSHED="asyncTransactionsFlushed",e.EVENT_ROW_GROUP_OPENED="rowGroupOpened",e.EVENT_ROW_DATA_UPDATED="rowDataUpdated",e.EVENT_PINNED_ROW_DATA_CHANGED="pinnedRowDataChanged",e.EVENT_RANGE_SELECTION_CHANGED="rangeSelectionChanged",e.EVENT_CHART_CREATED="chartCreated",e.EVENT_CHART_RANGE_SELECTION_CHANGED="chartRangeSelectionChanged",e.EVENT_CHART_OPTIONS_CHANGED="chartOptionsChanged",e.EVENT_CHART_DESTROYED="chartDe
11stroyed",e.EVENT_TOOL_PANEL_VISIBLE_CHANGED="toolPanelVisibleChanged",e.EVENT_TOOL_PANEL_SIZE_CHANGED="toolPanelSizeChanged",e.EVENT_COLUMN_PANEL_ITEM_DRAG_START="columnPanelItemDragStart",e.EVENT_COLUMN_PANEL_ITEM_DRAG_END="columnPanelItemDragEnd",e.EVENT_MODEL_UPDATED="modelUpdated",e.EVENT_CUT_START="cutStart",e.EVENT_CUT_END="cutEnd",e.EVENT_PASTE_START="pasteStart",e.EVENT_PASTE_END="pasteEnd",e.EVENT_FILL_START="fillStart",e.EVENT_FILL_END="fillEnd",e.EVENT_RANGE_DELETE_START="rangeDeleteStart",e.EVENT_RANGE_DELETE_END="rangeDeleteEnd",e.EVENT_UNDO_STARTED="undoStarted",e.EVENT_UNDO_ENDED="undoEnded",e.EVENT_REDO_STARTED="redoStarted",e.EVENT_REDO_ENDED="redoEnded",e.EVENT_KEY_SHORTCUT_CHANGED_CELL_START="keyShortcutChangedCellStart",e.EVENT_KEY_SHORTCUT_CHANGED_CELL_END="keyShortcutChangedCellEnd",e.EVENT_CELL_CLICKED="cellClicked",e.EVENT_CELL_DOUBLE_CLICKED="cellDoubleClicked",e.EVENT_CELL_MOUSE_DOWN="cellMouseDown",e.EVENT_CELL_CONTEXT_MENU="cellContextMenu",e.EVENT_CELL_VALUE_CHANGED="cellValueChanged",e.EVENT_CELL_EDIT_REQUEST="cellEditRequest",e.EVENT_ROW_VALUE_CHANGED="rowValueChanged",e.EVENT_CELL_FOCUSED="cellFocused",e.EVENT_CELL_FOCUS_CLEARED="cellFocusCleared",e.EVENT_FULL_WIDTH_ROW_FOCUSED="fullWidthRowFocused",e.EVENT_ROW_SELECTED="rowSelected",e.EVENT_SELECTION_CHANGED="selectionChanged",e.EVENT_TOOLTIP_SHOW="tooltipShow",e.EVENT_TOOLTIP_HIDE="tooltipHide",e.EVENT_CELL_KEY_DOWN="cellKeyDown",e.EVENT_CELL_MOUSE_OVER="cellMouseOver",e.EVENT_CELL_MOUSE_OUT="cellMouseOut",e.EVENT_FILTER_CHANGED="filterChanged",e.EVENT_FILTER_MODIFIED="filterModified",e.EVENT_FILTER_OPENED="filterOpened",e.EVENT_ADVANCED_FILTER_BUILDER_VISIBLE_CHANGED="advancedFilterBuilderVisibleChanged",e.EVENT_SORT_CHANGED="sortChanged",e.EVENT_VIRTUAL_ROW_REMOVED="virtualRowRemoved",e.EVENT_ROW_CLICKED="rowClicked",e.EVENT_ROW_DOUBLE_CLICKED="rowDoubleClicked",e.EVENT_GRID_READY="gridReady",e.EVENT_GRID_PRE_DESTROYED="gridPreDestroyed",e.EVENT_GRID_SIZE_CHANGED="gridSizeChanged",e.EVENT_VIEWPORT_CHANGED="viewportChanged",e.EVENT_SCROLLBAR_WIDTH_CHANGED="scrollbarWidthChanged",e.EVENT_FIRST_DATA_RENDERED="firstDataRendered",e.EVENT_DRAG_STARTED="dragStarted",e.EVENT_DRAG_STOPPED="dragStopped",e.EVENT_CHECKBOX_CHANGED="checkboxChanged",e.EVENT_ROW_EDITING_STARTED="rowEditingStarted",e.EVENT_ROW_EDITING_STOPPED="rowEditingStopped",e.EVENT_CELL_EDITING_STARTED="cellEditingStarted",e.EVENT_CELL_EDITING_STOPPED="cellEditingStopped",e.EVENT_BODY_SCROLL="bodyScroll",e.EVENT_BODY_SCROLL_END="bodyScrollEnd",e.EVENT_HEIGHT_SCALE_CHANGED="heightScaleChanged",e.EVENT_PAGINATION_CHANGED="paginationChanged",e.EVENT_COMPONENT_STATE_CHANGED="componentStateChanged",e.EVENT_STORE_REFRESHED="storeRefreshed",e.EVENT_STATE_UPDATED="stateUpdated",e.EVENT_BODY_HEIGHT_CHANGED="bodyHeightChanged",e.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED="displayedColumnsWidthChanged",e.EVENT_SCROLL_VISIBILITY_CHANGED="scrollVisibilityChanged",e.EVENT_COLUMN_HOVER_CHANGED="columnHoverChanged",e.EVENT_FLASH_CELLS="flashCells",e.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED="paginationPixelOffsetChanged",e.EVENT_DISPLAYED_ROWS_CHANGED="displayedRowsChanged",e.EVENT_LEFT_PINNED_WIDTH_CHANGED="leftPinnedWidthChanged",e.EVENT_RIGHT_PINNED_WIDTH_CHANGED="rightPinnedWidthChanged",e.EVENT_ROW_CONTAINER_HEIGHT_CHANGED="rowContainerHeightChanged",e.EVENT_HEADER_HEIGHT_CHANGED="headerHeightChanged",e.EVENT_COLUMN_HEADER_HEIGHT_CHANGED="columnHeaderHeightChanged",e.EVENT_ROW_DRAG_ENTER="rowDragEnter",e.EVENT_ROW_DRAG_MOVE="rowDragMove",e.EVENT_ROW_DRAG_LEAVE="rowDragLeave",e.EVENT_ROW_DRAG_END="rowDragEnd",e.EVENT_GRID_STYLES_CHANGED="gridStylesChanged",e.EVENT_POPUP_TO_FRONT="popupToFront",e.EVENT_COLUMN_ROW_GROUP_CHANGE_REQUEST="columnRowGroupChangeRequest",e.EVENT_COLUMN_PIVOT_CHANGE_REQUEST="columnPivotChangeRequest",e.EVENT_COLUMN_VALUE_CHANGE_REQUEST="columnValueChangeRequest",e.EVENT_COLUMN_AGG_FUNC_CHANGE_REQUEST="columnAggFuncChangeRequest",e.EVENT_STORE_UPDATED="storeUpdated",e.EVENT_FILTER_DESTROYED="filterDestroyed",e.EVENT_ROW_DATA_UPDATE_STARTED="rowDataUpdateStarted",e.EVENT_ROW_COUNT_READY="rowCountReady",e.EVENT_ADVANCED_FILTER_ENABLED_CHANGED="advancedFilterEnabledChanged",e.EVENT_DATA_TYPES_INFERRED="dataTypesInferred",e.EVENT_FIELD_VALUE_CHANGED="fieldValueChanged",e.EVENT_FIELD_PICKER_VALUE_SELECTED="fieldPickerValueSelected",e.EVENT_SIDE_BAR_UPDATED="sideBarUpdated",e}(),ft=function(){function e(){this.existingIds={}}return e.prototype.getInstanceIdForKey=function(e){var t,i=this.existingIds[e];return t="number"!==typeof i?0:i+1,this.existingIds[e]=t,t},e}(),gt=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),vt=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},yt="ag-Grid-AutoColumn",mt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return gt(t,e),t.prototype.createAutoGroupColumns=function(e){var t=this,i=[],n=this.gridOptionsService.get("treeData"),o=this.gridOptionsService.isGroupMultiAutoColumn();return n&&o&&(console.warn('AG Grid: you cannot mix groupDisplayType = "multipleColumns" with treeData, only one column can be used to display groups when doing tree data'),o=!1),o?e.forEach((function(e,n){i.push(t.createOneAutoGroupColumn(e,n))})):i.push(this.createOneAutoGroupColumn()),i},t.prototype.updateAutoGroupColumns=function(e){var t=this;e.forEach((function(e,i){return t.updateOneAutoGroupColumn(e,i)}))},t.prototype.createOneAutoGroupColumn=function(e,t){var i;i=e?"".concat(yt,"-").concat(e.getId()):yt;var n=this.createAutoGroupColDef(i,e,t);n.colId=i;var o=new Ee(n,null,i,!0);return this.context.createBean(o),o},t.prototype.updateOneAutoGroupColumn=function(e,t){var i=e.getColDef(),n="string"==typeof i.showRowGroup?i.showRowGroup:void 0,o=null!=n?this.columnModel.getPrimaryColumn(n):void 0,r=this.createAutoGroupColDef(e.getId(),null!==o&&void 0!==o?o:void 0,t);e.setColDef(r,null),this.columnFactory.applyColumnState(e,r)},t.prototype.createAutoGroupColDef=function(e,t,i){var n=this.createBaseColDef(t),o=this.gridOptionsService.get("autoGroupColumnDef");if(R(n,o),n=this.columnFactory.addColumnDefaultAndTypes(n,e),!this.gridOptionsService.get("treeData")){var s=r(n.field)&&r(n.valueGetter)&&r(n.filterValueGetter)&&"agGroupColumnFilter"!==n.filter;s&&(n.filter=!1)}i&&i>0&&(n.headerCheckboxSelection=!1);var a=this.gridOptionsService.isColumnsSortingCoupledToGroup(),l=n.valueGetter||null!=n.field;return a&&!l&&(n.sortIndex=void 0,n.initialSort=void 0),n},t.prototype.createBaseColDef=function(e){var t=this.gridOptionsService.get("autoGroupColumnDef"),i=this.localeService.getLocaleTextFunc(),n={headerName:i("group","Group")},o=t&&(t.cellRenderer||t.cellRendererSelector);if(o||(n.cellRenderer="agGroupCellRenderer"),e){var r=e.getColDef();Object.assign(n,{headerName:this.columnModel.getDisplayNameForColumn(e,"header"),headerValueGetter:r.headerValueGetter}),r.cellRenderer&&Object.assign(n,{cellRendererParams:{innerRenderer:r.cellRenderer,innerRendererParams:r.cellRendererParams}}),n.showRowGroup=e.getColId()}else n.showRowGroup=!0;return n},vt([de("columnModel")],t.prototype,"columnModel",void 0),vt([de("columnFactory")],t.prototype,"columnFactory",void 0),t=vt([ue("autoGroupColService")],t),t}(st),Ct=/[&<>"']/g,bt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function wt(e){var t=String.fromCharCode;function i(e){var t=[];if(!e)return[];var i,n,o=e.length,r=0;while(r<o)i=e.charCodeAt(r++),i>=55296&&i<=56319&&r<o?(n=e.charCodeAt(r++),56320==(64512&n)?t.push(((1023&i)<<10)+(1023&n)+65536):(t.push(i),r--)):t.push(i);return t}function n(e){if(e>=55296&&e<=57343)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value")}function o(e,i){return t(e>>i&63|128)}function r(e){if(e>=0&&e<=31&&10!==e){var i=e.toString(16).toUpperCase(),r=i.padStart(4,"0");return"_x".concat(r,"_")}if(0==(4294967168&e))return t(e);var s="";return 0==(4294965248&e)?s=t(e>>6&31|192):0==(4294901760&e)?(n(e),s=t(e>>12&15|224),s+=o(e,6)):0==(4292870144&e)&&(s=t(e>>18&7|240),s+=o(e,12),s+=o(e,6)),s+=t(63&e|128),s}var s,a=i(e),l=a.length,c=-1,u="";while(++c<l)s=a[c],u+=r(s);return u}function St(e){return e[0].toUpperCase()+e.substring(1).toLowerCase()}function Et(e,t){if(null==e)return null;var i=e.toString().toString();return t?i:i.replace(Ct,(function(e){return bt[e]}))}function xt(e){if(!e||null==e)return null;var t=/([a-z])([A-Z])/g,i=/([A-Z]+)([A-Z])([a-z])/g,n=e.replace(t,"$1 $2").replace(i,"$1 $2$3").replace(/\./g," ").split(" ");return n.map((function(e){return e.substring(0,1).toUpperCase()+(e.length>1?e.substring(1,e.length):"")})).join(" ")}function Ot(e){return e.replace(/[A-Z]/g,(function(e){return"-".concat(e.toLocaleLowerCase())}))}var Tt=Object.freeze({__proto__:null,utf8_encode:wt,capitalise:St,escapeString:Et,camelCaseToHumanText:xt,camelCaseToHyphenated:Ot});function Dt(e){var t=new Map;return e.forEach((function(e){return t.set(e[0],e[1])})),t}function Rt(e,t){var i=new Map;return e.forEach((function(e){return i.set(t(e),e)})),i}function At(e){var t=[];return e.forEach((function(e,i){return t.push(i)})),t}var _t=Object.freeze({__proto__:null,convertToMap:Dt,mapById:Rt,keys:At}),Pt=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Mt=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},kt=function(e,t){return function(i,n){t(i,n,e)}},Nt=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(i[n[o]]=e[n[o]])}return i},Lt=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},It=function(e,t,i){if(i||2===arguments.length)for(var n,o=0,r=t.length;o<r;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},Ft=function(e){var t="function"===typeof Symbol&&Symbol.iterator,i=t&&e[t],n=0;if(i)return i.call(e);
11if(e&&"number"===typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Gt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.primaryHeaderRowCount=0,t.secondaryHeaderRowCount=0,t.gridHeaderRowCount=0,t.displayedColumnsLeft=[],t.displayedColumnsRight=[],t.displayedColumnsCenter=[],t.displayedColumns=[],t.displayedColumnsAndGroupsMap={},t.viewportColumns=[],t.viewportColumnsHash="",t.headerViewportColumns=[],t.viewportColumnsCenter=[],t.headerViewportColumnsCenter=[],t.autoHeightActiveAtLeastOnce=!1,t.rowGroupColumns=[],t.valueColumns=[],t.pivotColumns=[],t.ready=!1,t.autoGroupsNeedBuilding=!1,t.forceRecreateAutoGroups=!1,t.pivotMode=!1,t.bodyWidth=0,t.leftWidth=0,t.rightWidth=0,t.bodyWidthDirty=!0,t.shouldQueueResizeOperations=!1,t.resizeOperationQueue=[],t}return Pt(t,e),t.prototype.init=function(){var e=this;this.suppressColumnVirtualisation=this.gridOptionsService.get("suppressColumnVirtualisation");var t=this.gridOptionsService.get("pivotMode");this.isPivotSettingAllowed(t)&&(this.pivotMode=t),this.addManagedPropertyListeners(["groupDisplayType","treeData","treeDataDisplayType","groupHideOpenParents"],(function(){return e.buildAutoGroupColumns()})),this.addManagedPropertyListener("autoGroupColumnDef",(function(){return e.onAutoGroupColumnDefChanged()})),this.addManagedPropertyListeners(["defaultColDef","columnTypes","suppressFieldDotNotation"],(function(t){return e.onSharedColDefChanged(t.source)})),this.addManagedPropertyListener("pivotMode",(function(){return e.setPivotMode(e.gridOptionsService.get("pivotMode"))})),this.addManagedListener(this.eventService,ht.EVENT_FIRST_DATA_RENDERED,(function(){return e.onFirstDataRendered()}))},t.prototype.buildAutoGroupColumns=function(){this.columnDefs&&(this.autoGroupsNeedBuilding=!0,this.forceRecreateAutoGroups=!0,this.updateGridColumns(),this.updateDisplayedColumns("gridOptionsChanged"))},t.prototype.onAutoGroupColumnDefChanged=function(){this.groupAutoColumns&&this.autoGroupColService.updateAutoGroupColumns(this.groupAutoColumns)},t.prototype.onSharedColDefChanged=function(e){void 0===e&&(e="api"),this.gridColumns&&(this.groupAutoColumns&&this.autoGroupColService.updateAutoGroupColumns(this.groupAutoColumns),this.createColumnsFromColumnDefs(!0,e))},t.prototype.setColumnDefs=function(e,t){void 0===t&&(t="api");var i=!!this.columnDefs;this.columnDefs=e,this.createColumnsFromColumnDefs(i,t)},t.prototype.recreateColumnDefs=function(e){void 0===e&&(e="api"),this.onSharedColDefChanged(e)},t.prototype.destroyOldColumns=function(e,t){var i={};if(e){this.columnUtils.depthFirstOriginalTreeSearch(null,e,(function(e){i[e.getInstanceId()]=e})),t&&this.columnUtils.depthFirstOriginalTreeSearch(null,t,(function(e){i[e.getInstanceId()]=null}));var n=Object.values(i).filter((function(e){return null!=e}));this.destroyBeans(n)}},t.prototype.destroyColumns=function(){this.destroyOldColumns(this.primaryColumnTree),this.destroyOldColumns(this.secondaryBalancedTree),this.destroyOldColumns(this.groupAutoColsBalancedTree)},t.prototype.createColumnsFromColumnDefs=function(e,t){var i=this;void 0===t&&(t="api");var n=e?this.compareColumnStatesAndDispatchEvents(t):void 0;this.valueCache.expire(),this.autoGroupsNeedBuilding=!0;var o=this.primaryColumns,r=this.primaryColumnTree,s=this.columnFactory.createColumnTree(this.columnDefs,!0,r);this.destroyOldColumns(this.primaryColumnTree,s.columnTree),this.primaryColumnTree=s.columnTree,this.primaryHeaderRowCount=s.treeDept+1,this.primaryColumns=this.getColumnsFromTree(this.primaryColumnTree),this.primaryColumnsMap={},this.primaryColumns.forEach((function(e){return i.primaryColumnsMap[e.getId()]=e})),this.extractRowGroupColumns(t,o),this.extractPivotColumns(t,o),this.extractValueColumns(t,o),this.ready=!0;var a=void 0===this.gridColsArePrimary,l=this.gridColsArePrimary||a||this.autoGroupsNeedBuilding;l&&(this.updateGridColumns(),e&&this.gridColsArePrimary&&!this.gridOptionsService.get("maintainColumnOrder")&&this.orderGridColumnsLikePrimary(),this.updateDisplayedColumns(t),this.checkViewportColumns()),this.dispatchEverythingChanged(t),n&&n(),this.dispatchNewColumnsLoaded(t)},t.prototype.dispatchNewColumnsLoaded=function(e){var t={type:ht.EVENT_NEW_COLUMNS_LOADED,source:e};this.eventService.dispatchEvent(t),"gridInitializing"===e&&this.onColumnsReady()},t.prototype.dispatchEverythingChanged=function(e){void 0===e&&(e="api");var t={type:ht.EVENT_COLUMN_EVERYTHING_CHANGED,source:e};this.eventService.dispatchEvent(t)},t.prototype.orderGridColumnsLikePrimary=function(){var e=this,t=this.primaryColumns;if(t){var i=t.filter((function(t){return e.gridColumns.indexOf(t)>=0})),n=this.gridColumns.filter((function(e){return i.indexOf(e)<0}));
11this.gridColumns=It(It([],Lt(n),!1),Lt(i),!1),this.gridColumns=this.placeLockedColumns(this.gridColumns)}},t.prototype.getAllDisplayedAutoHeightCols=function(){return this.displayedAutoHeightCols},t.prototype.setViewport=function(){this.gridOptionsService.get("enableRtl")?(this.viewportLeft=this.bodyWidth-this.scrollPosition-this.scrollWidth,this.viewportRight=this.bodyWidth-this.scrollPosition):(this.viewportLeft=this.scrollPosition,this.viewportRight=this.scrollWidth+this.scrollPosition)},t.prototype.getDisplayedColumnsStartingAt=function(e){var t=e,i=[];while(null!=t)i.push(t),t=this.getDisplayedColAfter(t);return i},t.prototype.checkViewportColumns=function(e){if(void 0===e&&(e=!1),null!=this.displayedColumnsCenter){var t=this.extractViewport();if(t){var i={type:ht.EVENT_VIRTUAL_COLUMNS_CHANGED,afterScroll:e};this.eventService.dispatchEvent(i)}}},t.prototype.setViewportPosition=function(e,t,i){void 0===i&&(i=!1),(e!==this.scrollWidth||t!==this.scrollPosition||this.bodyWidthDirty)&&(this.scrollWidth=e,this.scrollPosition=t,this.bodyWidthDirty=!0,this.setViewport(),this.ready&&this.checkViewportColumns(i))},t.prototype.isPivotMode=function(){return this.pivotMode},t.prototype.isPivotSettingAllowed=function(e){return!e||!this.gridOptionsService.get("treeData")||(console.warn("AG Grid: Pivot mode not available in conjunction Tree Data i.e. 'gridOptions.treeData: true'"),!1)},t.prototype.setPivotMode=function(e,t){if(void 0===t&&(t="api"),e!==this.pivotMode&&this.isPivotSettingAllowed(this.pivotMode)&&(this.pivotMode=e,this.gridColumns)){this.autoGroupsNeedBuilding=!0,this.updateGridColumns(),this.updateDisplayedColumns(t);var i={type:ht.EVENT_COLUMN_PIVOT_MODE_CHANGED};this.eventService.dispatchEvent(i)}},t.prototype.getSecondaryPivotColumn=function(e,t){if(r(this.secondaryColumns))return null;var i=this.getPrimaryColumn(t),n=null;return this.secondaryColumns.forEach((function(t){var o=t.getColDef().pivotKeys,r=t.getColDef().pivotValueColumn,s=_e(o,e),a=r===i;s&&a&&(n=t)})),n},t.prototype.setBeans=function(e){this.logger=e.create("columnModel")},t.prototype.setFirstRightAndLastLeftPinned=function(e){var t,i;this.gridOptionsService.get("enableRtl")?(t=this.displayedColumnsLeft?this.displayedColumnsLeft[0]:null,i=this.displayedColumnsRight?Ae(this.displayedColumnsRight):null):(t=this.displayedColumnsLeft?Ae(this.displayedColumnsLeft):null,i=this.displayedColumnsRight?this.displayedColumnsRight[0]:null),this.gridColumns.forEach((function(n){n.setLastLeftPinned(n===t,e),n.setFirstRightPinned(n===i,e)}))},t.prototype.autoSizeColumns=function(e){var t=this;if(this.shouldQueueResizeOperations)this.resizeOperationQueue.push((function(){return t.autoSizeColumns(e)}));else{var i=e.columns,n=e.skipHeader,o=e.skipHeaderGroups,r=e.stopAtGroup,s=e.source,a=void 0===s?"api":s;this.animationFrameService.flushAllFrames();var l=[],c=-1,u=null!=n?n:this.gridOptionsService.get("skipHeaderOnAutoSize"),d=null!=o?o:u;while(0!==c)c=0,this.actionOnGridColumns(i,(function(e){if(l.indexOf(e)>=0)return!1;var i=t.autoWidthCalculator.getPreferredWidthForColumn(e,u);if(i>0){var n=t.normaliseColumnWidth(e,i);e.setActualWidth(n,a),l.push(e),c++}return!0}),a);d||this.autoSizeColumnGroupsByColumns(i,a,r),this.dispatchColumnResizedEvent(l,!0,"autosizeColumns")}},t.prototype.dispatchColumnResizedEvent=function(e,t,i,n){if(void 0===n&&(n=null),e&&e.length){var o={type:ht.EVENT_COLUMN_RESIZED,columns:e,column:1===e.length?e[0]:null,flexColumns:n,finished:t,source:i};this.eventService.dispatchEvent(o)}},t.prototype.dispatchColumnChangedEvent=function(e,t,i){var n={type:e,columns:t,column:t&&1==t.length?t[0]:null,source:i};this.eventService.dispatchEvent(n)},t.prototype.dispatchColumnMovedEvent=function(e){var t=e.movedColumns,i=e.source,n=e.toIndex,o=e.finished,r={type:ht.EVENT_COLUMN_MOVED,columns:t,column:t&&1===t.length?t[0]:null,toIndex:n,finished:o,source:i};this.eventService.dispatchEvent(r)},t.prototype.dispatchColumnPinnedEvent=function(e,t){if(e.length){var i=1===e.length?e[0]:null,n=this.getCommonValue(e,(function(e){return e.getPinned()})),o={type:ht.EVENT_COLUMN_PINNED,pinned:null!=n?n:null,columns:e,column:i,source:t};this.eventService.dispatchEvent(o)}},t.prototype.dispatchColumnVisibleEvent=function(e,t){if(e.length){var i=1===e.length?e[0]:null,n=this.getCommonValue(e,(function(e){return e.isVisible()})),o={type:ht.EVENT_COLUMN_VISIBLE,visible:n,columns:e,column:i,source:t};this.eventService.dispatchEvent(o)}},t.prototype.autoSizeColumn=function(e,t,i){void 0===i&&(i="api"),e&&this.autoSizeColumns({columns:[e],skipHeader:t,skipHeaderGroups:!0,source:i})},t.prototype.autoSizeColumnGroupsByColumns=function(e,t,i){var n,o,r,s,a,l=new Set,c=this.getGridColumns(e);
11c.forEach((function(e){var t=e.getParent();while(t&&t!=i)t.isPadding()||l.add(t),t=t.getParent()}));var u=[];try{for(var d=Ft(l),p=d.next();!p.done;p=d.next()){var h=p.value;try{for(var f=(r=void 0,Ft(this.ctrlsService.getHeaderRowContainerCtrls())),g=f.next();!g.done;g=f.next()){var v=g.value;if(a=v.getHeaderCtrlForColumn(h),a)break}}catch(y){r={error:y}}finally{try{g&&!g.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}a&&a.resizeLeafColumnsToFit(t)}}catch(m){n={error:m}}finally{try{p&&!p.done&&(o=d.return)&&o.call(d)}finally{if(n)throw n.error}}return u},t.prototype.autoSizeAllColumns=function(e,t){var i=this;if(void 0===t&&(t="api"),this.shouldQueueResizeOperations)this.resizeOperationQueue.push((function(){return i.autoSizeAllColumns(e,t)}));else{var n=this.getAllDisplayedColumns();this.autoSizeColumns({columns:n,skipHeader:e,source:t})}},t.prototype.getColumnsFromTree=function(e){var t=[],i=function(e){for(var n=0;n<e.length;n++){var o=e[n];o instanceof Ee?t.push(o):o instanceof Oe&&i(o.getChildren())}};return i(e),t},t.prototype.getAllDisplayedTrees=function(){return this.displayedTreeLeft&&this.displayedTreeRight&&this.displayedTreeCentre?this.displayedTreeLeft.concat(this.displayedTreeCentre).concat(this.displayedTreeRight):null},t.prototype.getPrimaryColumnTree=function(){return this.primaryColumnTree},t.prototype.getHeaderRowCount=function(){return this.gridHeaderRowCount},t.prototype.getDisplayedTreeLeft=function(){return this.displayedTreeLeft},t.prototype.getDisplayedTreeRight=function(){return this.displayedTreeRight},t.prototype.getDisplayedTreeCentre=function(){return this.displayedTreeCentre},t.prototype.isColumnDisplayed=function(e){return this.getAllDisplayedColumns().indexOf(e)>=0},t.prototype.getAllDisplayedColumns=function(){return this.displayedColumns},t.prototype.getViewportColumns=function(){return this.viewportColumns},t.prototype.getDisplayedLeftColumnsForRow=function(e){return this.colSpanActive?this.getDisplayedColumnsForRow(e,this.displayedColumnsLeft):this.displayedColumnsLeft},t.prototype.getDisplayedRightColumnsForRow=function(e){return this.colSpanActive?this.getDisplayedColumnsForRow(e,this.displayedColumnsRight):this.displayedColumnsRight},t.prototype.isColSpanActive=function(){return this.colSpanActive},t.prototype.getDisplayedColumnsForRow=function(e,t,i,n){for(var o,r=[],s=null,a=function(a){var l,c=t[a],u=t.length-a,d=Math.min(c.getColSpan(e),u),p=[c];if(d>1){for(var h=d-1,f=1;f<=h;f++)p.push(t[a+f]);a+=h}if(i?(l=!1,p.forEach((function(e){i(e)&&(l=!0)}))):l=!0,l){if(0===r.length&&s){var g=!!n&&n(c);g&&r.push(s)}r.push(c)}s=c,o=a},l=0;l<t.length;l++)a(l),l=o;return r},t.prototype.getViewportCenterColumnsForRow=function(e){var t=this;if(!this.colSpanActive)return this.viewportColumnsCenter;var i=function(e){var i=e.getLeft();return o(i)&&i>t.viewportLeft},n=this.suppressColumnVirtualisation?null:this.isColumnInRowViewport.bind(this);return this.getDisplayedColumnsForRow(e,this.displayedColumnsCenter,n,i)},t.prototype.isColumnAtEdge=function(e,t){var i=this.getAllDisplayedColumns();if(!i.length)return!1;var n,o="first"===t;if(e instanceof pt){var r=e.getDisplayedLeafColumns();if(!r.length)return!1;n=o?r[0]:Ae(r)}else n=e;return(o?i[0]:Ae(i))===n},t.prototype.getAriaColumnIndex=function(e){var t;return t=e instanceof pt?e.getLeafColumns()[0]:e,this.getAllGridColumns().indexOf(t)+1},t.prototype.isColumnInHeaderViewport=function(e){return!!e.isAutoHeaderHeight()||this.isColumnInRowViewport(e)},t.prototype.isColumnInRowViewport=function(e){if(e.isAutoHeight())return!0;var t=e.getLeft()||0,i=t+e.getActualWidth(),n=this.viewportLeft-200,o=this.viewportRight+200,r=t<n&&i<n,s=t>o&&i>o;return!r&&!s},t.prototype.getDisplayedColumnsLeftWidth=function(){return this.getWidthOfColsInList(this.displayedColumnsLeft)},t.prototype.getDisplayedColumnsRightWidth=function(){return this.getWidthOfColsInList(this.displayedColumnsRight)},t.prototype.updatePrimaryColumnList=function(e,t,i,n,o,r){var a=this;if(void 0===r&&(r="api"),e&&!s(e)){var l=!1;if(e.forEach((function(e){var o=a.getPrimaryColumn(e);if(o){if(i){if(t.indexOf(o)>=0)return;t.push(o)}else{if(t.indexOf(o)<0)return;Le(t,o)}n(o),l=!0}})),l){this.autoGroupsNeedBuilding&&this.updateGridColumns(),this.updateDisplayedColumns(r);var c={type:o,columns:t,column:1===t.length?t[0]:null,source:r};this.eventService.dispatchEvent(c)}}},t.prototype.setRowGroupColumns=function(e,t){void 0===t&&(t="api"),this.autoGroupsNeedBuilding=!0,this.setPrimaryColumnList(e,this.rowGroupColumns,ht.EVENT_COLUMN_ROW_GROUP_CHANGED,!0,this.setRowGroupActive.bind(this),t)},t.prototype.setRowGroupActive=function(e,t,i){e!==t.isRowGroupActive()&&(t.setRowGroupActive(e,i),e&&!this.gridOptionsService.get("suppressRowGroupHidesColumns")&&this.setColumnVisible(t,!1,i),e||this.gridOptionsService.get("suppressMakeColumnVisibleAfterUnGroup")||this.setColumnVisible(t,!0,i))},t.prototype.addRowGroupColumn=function(e,t){void 0===t&&(t="api"),e&&this.addRowGroupColumns([e],t)},t.prototype.addRowGroupColumns=function(e,t){void 0===t&&(t="api"),this.autoGroupsNeedBuilding=!0,this.updatePrimaryColumnList(e,this.rowGroupColumns,!0,this.setRowGroupActive.bind(this,!0),ht.EVENT_COLUMN_ROW_GROUP_CHANGED,t)},t.prototype.removeRowGroupColumns=function(e,t){void 0===t&&(t="api"),this.autoGroupsNeedBuilding=!0,this.updatePrimaryColumnList(e,this.rowGroupColumns,!1,this.setRowGroupActive.bind(this,!1),ht.EVENT_COLUMN_ROW_GROUP_CHANGED,t)},t.prototype.removeRowGroupColumn=function(e,t){void 0===t&&(t="api"),e&&this.removeRowGroupColumns([e],t)},t.prototype.addPivotColumns=function(e,t){void 0===t&&(t="api"),this.updatePrimaryColumnList(e,this.pivotColumns,!0,(function(e){return e.setPivotActive(!0,t)}),ht.EVENT_COLUMN_PIVOT_CHANGED,t)},t.prototype.setPivotColumns=function(e,t){void 0===t&&(t="api"),this.setPrimaryColumnList(e,this.pivotColumns,ht.EVENT_COLUMN_PIVOT_CHANGED,!0,(function(e,i){i.setPivotActive(e,t)}),t)},t.prototype.addPivotColumn=function(e,t){void 0===t&&(t="api"),this.addPivotColumns([e],t)},t.prototype.removePivotColumns=function(e,t){void 0===t&&(t="api"),this.updatePrimaryColumnList(e,this.pivotColumns,!1,(function(e){return e.setPivotActive(!1,t)}),ht.EVENT_COLUMN_PIVOT_CHANGED,t)},t.prototype.removePivotColumn=function(e,t){void 0===t&&(t="api"),this.removePivotColumns([e],t)},t.prototype.setPrimaryColumnList=function(e,t,i,n,r,s){var a=this;if(this.gridColumns){var l=new Map;t.forEach((function(e,t){return l.set(e,t)})),t.length=0,o(e)&&e.forEach((function(e){var i=a.getPrimaryColumn(e);
11i&&t.push(i)})),t.forEach((function(e,t){var i=l.get(e);void 0!==i?n&&i!==t||l.delete(e):l.set(e,0)})),(this.primaryColumns||[]).forEach((function(e){var i=t.indexOf(e)>=0;r(i,e)})),this.autoGroupsNeedBuilding&&this.updateGridColumns(),this.updateDisplayedColumns(s),this.dispatchColumnChangedEvent(i,It([],Lt(l.keys()),!1),s)}},t.prototype.setValueColumns=function(e,t){void 0===t&&(t="api"),this.setPrimaryColumnList(e,this.valueColumns,ht.EVENT_COLUMN_VALUE_CHANGED,!1,this.setValueActive.bind(this),t)},t.prototype.setValueActive=function(e,t,i){if(e!==t.isValueActive()&&(t.setValueActive(e,i),e&&!t.getAggFunc())){var n=this.aggFuncService.getDefaultAggFunc(t);t.setAggFunc(n)}},t.prototype.addValueColumns=function(e,t){void 0===t&&(t="api"),this.updatePrimaryColumnList(e,this.valueColumns,!0,this.setValueActive.bind(this,!0),ht.EVENT_COLUMN_VALUE_CHANGED,t)},t.prototype.addValueColumn=function(e,t){void 0===t&&(t="api"),e&&this.addValueColumns([e],t)},t.prototype.removeValueColumn=function(e,t){void 0===t&&(t="api"),this.removeValueColumns([e],t)},t.prototype.removeValueColumns=function(e,t){void 0===t&&(t="api"),this.updatePrimaryColumnList(e,this.valueColumns,!1,this.setValueActive.bind(this,!1),ht.EVENT_COLUMN_VALUE_CHANGED,t)},t.prototype.normaliseColumnWidth=function(e,t){var i=e.getMinWidth();o(i)&&t<i&&(t=i);var n=e.getMaxWidth();return o(n)&&e.isGreaterThanMax(t)&&(t=n),t},t.prototype.getPrimaryOrGridColumn=function(e){var t=this.getPrimaryColumn(e);return t||this.getGridColumn(e)},t.prototype.setColumnWidths=function(e,t,i,n){var o=this;void 0===n&&(n="api");var r=[];e.forEach((function(e){var i=o.getPrimaryOrGridColumn(e.key);if(i){r.push({width:e.newWidth,ratios:[1],columns:[i]});var n="shift"===o.gridOptionsService.get("colResizeDefault");if(n&&(t=!t),t){var s=o.getDisplayedColAfter(i);if(!s)return;var a=i.getActualWidth()-e.newWidth,l=s.getActualWidth()+a;r.push({width:l,ratios:[1],columns:[s]})}}})),0!==r.length&&this.resizeColumnSets({resizeSets:r,finished:i,source:n})},t.prototype.checkMinAndMaxWidthsForSet=function(e){var t=e.columns,i=e.width,n=0,r=0,s=!0;t.forEach((function(e){var t=e.getMinWidth();n+=t||0;var i=e.getMaxWidth();o(i)&&i>0?r+=i:s=!1}));var a=i>=n,l=!s||i<=r;return a&&l},t.prototype.resizeColumnSets=function(e){var t=this,i=e.resizeSets,n=e.finished,r=e.source,s=!i||i.every((function(e){return t.checkMinAndMaxWidthsForSet(e)}));if(s){var a=[],l=[];i.forEach((function(e){var t=e.width,i=e.columns,n=e.ratios,s={},c={};i.forEach((function(e){return l.push(e)}));var u=!0,d=0,p=function(){if(d++,d>1e3)return console.error("AG Grid: infinite loop in resizeColumnSets"),"break";u=!1;var e=[],r=0,a=t;i.forEach((function(t,i){var o=c[t.getId()];if(o)a-=s[t.getId()];else{e.push(t);var l=n[i];r+=l}}));var l=1/r;e.forEach((function(i,r){var d,p=r===e.length-1;p?d=a:(d=Math.round(n[r]*t*l),a-=d);var h=i.getMinWidth(),f=i.getMaxWidth();o(h)&&d<h?(d=h,c[i.getId()]=!0,u=!0):o(f)&&f>0&&d>f&&(d=f,c[i.getId()]=!0,u=!0),s[i.getId()]=d}))};while(u){var h=p();if("break"===h)break}i.forEach((function(e){var t=s[e.getId()],i=e.getActualWidth();i!==t&&(e.setActualWidth(t,r),a.push(e))}))}));var c=a.length>0,u=[];c&&(u=this.refreshFlexedColumns({resizingCols:l,skipSetLeft:!0}),this.setLeftValues(r),this.updateBodyWidths(),this.checkViewportColumns());var d=l.concat(u);(c||n)&&this.dispatchColumnResizedEvent(d,n,r,u)}else if(n){var p=i&&i.length>0?i[0].columns:null;this.dispatchColumnResizedEvent(p,n,r)}},t.prototype.setColumnAggFunc=function(e,t,i){if(void 0===i&&(i="api"),e){var n=this.getPrimaryColumn(e);n&&(n.setAggFunc(t),this.dispatchColumnChangedEvent(ht.EVENT_COLUMN_VALUE_CHANGED,[n],i))}},t.prototype.moveRowGroupColumn=function(e,t,i){if(void 0===i&&(i="api"),!this.isRowGroupEmpty()){var n=this.rowGroupColumns[e],o=this.rowGroupColumns.slice(e,t);this.rowGroupColumns.splice(e,1),this.rowGroupColumns.splice(t,0,n);var r={type:ht.EVENT_COLUMN_ROW_GROUP_CHANGED,columns:o,column:1===o.length?o[0]:null,source:i};this.eventService.dispatchEvent(r)}},t.prototype.moveColumns=function(e,t,i,n){if(void 0===i&&(i="api"),void 0===n&&(n=!0),this.gridColumns){if(this.columnAnimationService.start(),t>this.gridColumns.length-e.length)return console.warn("AG Grid: tried to insert columns in invali
11d location, toIndex = "+t),void console.warn("AG Grid: remember that you should not count the moving columns when calculating the new index");var o=this.getGridColumns(e),r=!this.doesMovePassRules(o,t);r||(Be(this.gridColumns,o,t),this.updateDisplayedColumns(i),this.dispatchColumnMovedEvent({movedColumns:o,source:i,toIndex:t,finished:n}),this.columnAnimationService.finish())}},t.prototype.doesMovePassRules=function(e,t){var i=this.getProposedColumnOrder(e,t);return this.doesOrderPassRules(i)},t.prototype.doesOrderPassRules=function(e){return!!this.doesMovePassMarryChildren(e)&&!!this.doesMovePassLockedPositions(e)},t.prototype.getProposedColumnOrder=function(e,t){var i=this.gridColumns.slice();return Be(i,e,t),i},t.prototype.sortColumnsLikeGridColumns=function(e){var t=this;if(e&&!(e.length<=1)){var i=e.filter((function(e){return t.gridColumns.indexOf(e)<0})).length>0;i||e.sort((function(e,i){var n=t.gridColumns.indexOf(e),o=t.gridColumns.indexOf(i);return n-o}))}},t.prototype.doesMovePassLockedPositions=function(e){var t=0,i=!0,n=function(e){return e?!0===e||"left"===e?0:2:1};return e.forEach((function(e){var o=n(e.getColDef().lockPosition);o<t&&(i=!1),t=o})),i},t.prototype.doesMovePassMarryChildren=function(e){var t=!0;return this.columnUtils.depthFirstOriginalTreeSearch(null,this.gridBalancedTree,(function(i){if(i instanceof Oe){var n=i,o=n.getColGroupDef(),r=o&&o.marryChildren;if(r){var s=[];n.getLeafColumns().forEach((function(t){var i=e.indexOf(t);s.push(i)}));var a=Math.max.apply(Math,s),l=Math.min.apply(Math,s),c=a-l,u=n.getLeafColumns().length-1;c>u&&(t=!1)}}})),t},t.prototype.moveColumn=function(e,t,i){void 0===i&&(i="api"),this.moveColumns([e],t,i)},t.prototype.moveColumnByIndex=function(e,t,i){if(void 0===i&&(i="api"),this.gridColumns){var n=this.gridColumns[e];this.moveColumn(n,t,i)}},t.prototype.getColumnDefs=function(){var e=this;if(this.primaryColumns){var t=this.primaryColumns.slice();return this.gridColsArePrimary?t.sort((function(t,i){return e.gridColumns.indexOf(t)-e.gridColumns.indexOf(i)})):this.lastPrimaryOrder&&t.sort((function(t,i){return e.lastPrimaryOrder.indexOf(t)-e.lastPrimaryOrder.indexOf(i)})),this.columnDefFactory.buildColumnDefs(t,this.rowGroupColumns,this.pivotColumns)}},t.prototype.getBodyContainerWidth=function(){return this.bodyWidth},t.prototype.getContainerWidth=function(e){switch(e){case"left":return this.leftWidth;case"right":return this.rightWidth;default:return this.bodyWidth}},t.prototype.updateBodyWidths=function(){var e=this.getWidthOfColsInList(this.displayedColumnsCenter),t=this.getWidthOfColsInList(this.displayedColumnsLeft),i=this.getWidthOfColsInList(this.displayedColumnsRight);this.bodyWidthDirty=this.bodyWidth!==e;var n=this.bodyWidth!==e||this.leftWidth!==t||this.rightWidth!==i;if(n){this.bodyWidth=e,this.leftWidth=t,this.rightWidth=i;var o={type:ht.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED};this.eventService.dispatchEvent(o)}},t.prototype.getValueColumns=function(){return this.valueColumns?this.valueColumns:[]},t.prototype.getPivotColumns=function(){return this.pivotColumns?this.pivotColumns:[]},t.prototype.isPivotActive=function(){return this.pivotColumns&&this.pivotColumns.length>0&&this.pivotMode},t.prototype.getRowGroupColumns=function(){return this.rowGroupColumns?this.rowGroupColumns:[]},t.prototype.getDisplayedCenterColumns=function(){return this.displayedColumnsCenter},t.prototype.getDisplayedLeftColumns=function(){return this.displayedColumnsLeft},t.prototype.getDisplayedRightColumns=function(){return this.displayedColumnsRight},t.prototype.getDisplayedColumns=function(e){switch(e){case"left":return this.getDisplayedLeftColumns();case"right":return this.getDisplayedRightColumns();default:return this.getDisplayedCenterColumns()}},t.prototype.getAllPrimaryColumns=function(){return this.primaryColumns?this.primaryColumns.slice():null},t.prototype.getSecondaryColumns=function(){return this.secondaryColumns?this.secondaryColumns.slice():null},t.prototype.getAllColumnsForQuickFilter=function(){return this.columnsForQuickFilter},t.prototype.getAllGridColumns=function(){var e;return null!==(e=this.gridColumns)&&void 0!==e?e:[]},t.prototype.isEmpty=function(){return s(this.gridColumns)},t.prototype.isRowGroupEmpty=function(){return s(this.rowGroupColumns)},t.prototype.setColumnVisible=function(e,t,i){void 0===i&&(i="api"),this.setColumnsVisible([e],t,i)},t.prototype.setColumnsVisible=function(e,t,i){void 0===t&&(t=!1),void 0===i&&(i="api"),this.applyColumnState({state:e.map((function(e){return{colId:"string"===typeof e?e:e.getColId(),hide:!t}}))},i)},t.prototype.setColumnPinned=function(e,t,i){void 0===i&&(i="api"),e&&this.setColumnsPinned([e],t,i)},t.prototype.setColumnsPinned=function(e,t,i){var n;(void 0===i&&(i="api"),this.gridColumns)&&(this.gridOptionsService.isDomLayout("print")?console.warn("AG Grid: Changing the column pinning status is not allowed with domLayout='print'"):(this.columnAnimationService.start(),n=!0===t||"left"===t?"left":"right"===t?"right":null,this.actionOnGridColumns(e,(function(e){return e.getPinned()!==n&&(e.setPinned(n),!0)}),i,(function(){var e={type:ht.EVENT_COLUMN_PINNED,pinned:n,column:null,columns:null,source:i};return e})),this.columnAnimationService.finish()))},t.prototype.actionOnGridColumns=function(e,t,i,n){var r=this;if(!s(e)){var a=[];if(e.forEach((function(e){var i=r.getGridColumn(e);if(i){var n=t(i);!1!==n&&a.push(i)}})),a.length&&(this.updateDisplayedColumns(i),o(n)&&n)){var l=n();l.columns=a,l.column=1===a.length?a[0]:null,this.eventService.dispatchEvent(l)}}},t.prototype.getDisplayedColBefore=function(e){var t=this.getAllDisplayedColumns(),i=t.indexOf(e);return i>0?t[i-1]:null},t.prototype.getDisplayedColAfter=function(e){var t=this.getAllDisplayedColumns(),i=t.indexOf(e);return i<t.length-1?t[i+1]:null},t.prototype.getDisplayedGroupAfter=function(e){return this.getDisplayedGroupAtDirection(e,"After")},t.prototype.getDisplayedGroupBefore=function(e){return this.getDisplayedGroupAtDirection(e,"Before")},t.prototype.getDisplayedGroupAtDirection=function(e,t){var i=e.getProvidedColumnGroup().getLevel()+e.getPaddingLevel(),n=e.getDisplayedLeafColumns(),o="After"===t?Ae(n):n[0],r="getDisplayedCol".concat(t);while(1){var s=this[r](o);if(!s)return null;var a=this.getColumnGroupAtLevel(s,i);if(a!==e)return a}},t.prototype.getColumnGroupAtLevel=function(e,t){var i,n,o=e.getParent();while(1){var r=o.getProvidedColumnGroup();if(i=r.getLevel(),n=o.getPaddingLevel(),i+n<=t)break;o=o.getParent()}return o},t.prototype.isPinningLeft=function(){return this.displayedColumnsLeft.length>0},t.prototype.isPinningRight=function(){return this.displayedColumnsRight.length>0},t.prototype.getPrimaryAndSecondaryAndAutoColumns=function(){var e;return(e=[]).concat.apply(e,[this.primaryColumns||[],this.groupAutoColumns||[],this.secondaryColumns||[]])},t.prototype.createStateItemFromColumn=function(e){var t=e.isRowGroupActive()?this.rowGroupColumns.indexOf(e):null,i=e.isPivotActive()?this.pivotColumns.indexOf(e):null,n=e.isValueActive()?e.getAggFunc():null,o=null!=e.getSort()?e.getSort():null,r=null!=e.getSortIndex()?e.getSortIndex():null,s=null!=e.getFlex()&&e.getFlex()>0?e.getFlex():null,a={colId:e.getColId(),width:e.getActualWidth(),hide:!e.isVisible(),pinned:e.getPinned(),sort:o,sortIndex:r,aggFunc:n,rowGroup:e.isRowGroupActive(),rowGroupIndex:t,pivot:e.isPivotActive(),pivotIndex:i,flex:s};return a},t.prototype.getColumnState=function(){if(r(this.primaryColumns)||!this.isAlive())return[];var e=this.getPrimaryAndSecondaryAndAutoColumns(),t=e.map(this.createStateItemFromColumn.bind(this));return this.orderColumnStateList(t),t},t.prototype.orderColumnStateList=function(e){var t=Dt(this.gridColumns.map((function(e,t){return[e.getColId(),t]})));e.sort((function(e,i){var n=t.has(e.colId)?t.get(e.colId):-1,o=t.has(i.colId)?t.get(i.colId):-1;return n-o}))},t.prototype.resetColumnState=function(e){var t=this;if(void 0===e&&(e="api"),!s(this.primaryColumns)){var i=this.getColumnsFromTree(this.primaryColumnTree),n=[],o=1e3,a=1e3,l=[];this.groupAutoColumns&&(l=l.concat(this.groupAutoColumns)),i&&(l=l.concat(i)),l.forEach((function(e){var i=t.getColumnStateFromColDef(e);r(i.rowGroupIndex)&&i.rowGroup&&(i.rowGroupIndex=o++),r(i.pivotIndex)&&i.pivot&&(i.pivotIndex=a++),n.push(i)})),this.applyColumnState({state:n,applyOrder:!0},e)}},t.prototype.getColumnStateFromColDef=function(e){var t=function(e,t){return null!=e?e:null!=t?t:null},i=e.getColDef(),n=t(i.sort,i.initialSort),o=t(i.sortIndex,i.initialSortIndex),r=t(i.hide,i.initialHide),s=t(i.pinned,i.initialPinned),a=t(i.width,i.initialWidth),l=t(i.flex,i.initialFlex),c=t(i.rowGroupIndex,i.initialRowGroupIndex),u=t(i.rowGroup,i.initialRowGroup);null!=c||null!=u&&0!=u||(c=null,u=null);var d=t(i.pivotIndex,i.initialPivotIndex),p=t(i.pivot,i.initialPivot);null!=d||null!=p&&0!=p||(d=null,p=null);var h=t(i.aggFunc,i.initialAggFunc);return{colId:e.getColId(),sort:n,sortIndex:o,hide:r,pinned:s,width:a,flex:l,rowGroup:u,rowGroupIndex:c,pivot:p,pivotIndex:d,aggFunc:h}},t.prototype.applyColumnState=function(e,t){var i=this;if(s(this.primaryColumns))return!1;if(e&&e.state&&!e.state.forEach)return console.warn("AG Grid: applyColumnState() - the state attribute should be an array, however an array was not found. Please provide an array of items (one for each col you want to change) for state."),!1;var n=function(n,o,r){var s=i.compareColumnStatesAndDispatchEvents(t);i.autoGroupsNeedBuilding=!0;var a=o.slice(),l={},c={},u=[],d=[],p=0,h=i.rowGroupColumns.slice(),f=i.pivotColumns.slice();
vendor: 10,275 bytes, line 11
11n.forEach((function(n){var o=n.colId||"",s=o.startsWith(yt);if(s)return u.push(n),void d.push(n);var h=r(o);h?(i.syncColumnWithStateItem(h,n,e.defaultState,l,c,!1,t),Le(a,h)):(d.push(n),p+=1)}));var g=function(n){return i.syncColumnWithStateItem(n,null,e.defaultState,l,c,!1,t)};a.forEach(g);var v=function(e,t,i,n){var o=e[i.getId()],r=e[n.getId()],s=null!=o,a=null!=r;if(s&&a)return o-r;if(s)return-1;if(a)return 1;var l=t.indexOf(i),c=t.indexOf(n),u=l>=0,d=c>=0;return u&&d?l-c:u?-1:1};i.rowGroupColumns.sort(v.bind(i,l,h)),i.pivotColumns.sort(v.bind(i,c,f)),i.updateGridColumns();var y=i.groupAutoColumns?i.groupAutoColumns.slice():[];return u.forEach((function(n){var o=i.getAutoColumn(n.colId);Le(y,o),i.syncColumnWithStateItem(o,n,e.defaultState,null,null,!0,t)})),y.forEach(g),i.applyOrderAfterApplyState(e),i.updateDisplayedColumns(t),i.dispatchEverythingChanged(t),s(),{unmatchedAndAutoStates:d,unmatchedCount:p}};this.columnAnimationService.start();var r=n(e.state||[],this.primaryColumns||[],(function(e){return i.getPrimaryColumn(e)})),a=r.unmatchedAndAutoStates,l=r.unmatchedCount;return(a.length>0||o(e.defaultState))&&(l=n(a,this.secondaryColumns||[],(function(e){return i.getSecondaryColumn(e)})).unmatchedCount),this.columnAnimationService.finish(),0===l},t.prototype.applyOrderAfterApplyState=function(e){var t=this;if(e.applyOrder&&e.state){var i=[],n={};e.state.forEach((function(e){if(e.colId&&!n[e.colId]){var o=t.gridColumnsMap[e.colId];o&&(i.push(o),n[e.colId]=!0)}}));var o=0;this.gridColumns.forEach((function(e){var t=e.getColId(),r=null!=n[t];if(!r){var s=t.startsWith(yt);s?Ge(i,e,o++):i.push(e)}})),i=this.placeLockedColumns(i),this.doesMovePassMarryChildren(i)?this.gridColumns=i:console.warn("AG Grid: Applying column order broke a group where columns should be married together. Applying new order has been discarded.")}},t.prototype.compareColumnStatesAndDispatchEvents=function(e){var t=this,i={rowGroupColumns:this.rowGroupColumns.slice(),pivotColumns:this.pivotColumns.slice(),valueColumns:this.valueColumns.slice()},n=this.getColumnState(),o={};return n.forEach((function(e){o[e.colId]=e})),function(){var r=t.getPrimaryAndSecondaryAndAutoColumns(),s=function(i,n,o,r){var s=n.map(r),a=o.map(r),l=_e(s,a);if(!l){var c=new Set(n);o.forEach((function(e){c.delete(e)||c.add(e)}));var u=It([],Lt(c),!1),d={type:i,columns:u,column:1===u.length?u[0]:null,source:e};t.eventService.dispatchEvent(d)}},a=function(e){var t=[];return r.forEach((function(i){var n=o[i.getColId()];n&&e(n,i)&&t.push(i)})),t},l=function(e){return e.getColId()};s(ht.EVENT_COLUMN_ROW_GROUP_CHANGED,i.rowGroupColumns,t.rowGroupColumns,l),s(ht.EVENT_COLUMN_PIVOT_CHANGED,i.pivotColumns,t.pivotColumns,l);var c=function(e,t){var i=null!=e.aggFunc,n=i!=t.isValueActive(),o=i&&e.aggFunc!=t.getAggFunc();return n||o},u=a(c);u.length>0&&t.dispatchColumnChangedEvent(ht.EVENT_COLUMN_VALUE_CHANGED,u,e);var d=function(e,t){return e.width!=t.getActualWidth()};t.dispatchColumnResizedEvent(a(d),!0,e);var p=function(e,t){return e.pinned!=t.getPinned()};t.dispatchColumnPinnedEvent(a(p),e);var h=function(e,t){return e.hide==t.isVisible()};t.dispatchColumnVisibleEvent(a(h),e);var f=function(e,t){return e.sort!=t.getSort()||e.sortIndex!=t.getSortIndex()};a(f).length>0&&t.sortController.dispatchSortChangedEvents(e),t.normaliseColumnMovedEventForColumnState(n,e)}},t.prototype.getCommonValue=function(e,t){if(e&&0!=e.length){for(var i=t(e[0]),n=1;n<e.length;n++)if(i!==t(e[n]))return;return i}},t.prototype.normaliseColumnMovedEventForColumnState=function(e,t){var i=this,n=this.getColumnState(),o={};n.forEach((function(e){return o[e.colId]=e}));var r={};e.forEach((function(e){o[e.colId]&&(r[e.colId]=!0)}));var s=e.filter((function(e){return r[e.colId]})),a=n.filter((function(e){return r[e.colId]})),l=[];a.forEach((function(e,t){var n=s&&s[t];if(n&&n.colId!==e.colId){var o=i.getGridColumn(n.colId);o&&l.push(o)}})),l.length&&this.dispatchColumnMovedEvent({movedColumns:l,source:t,finished:!0})},t.prototype.syncColumnWithStateItem=function(e,t,i,n,r,s,a){if(e){var l=function(e,n){var r={value1:void 0,value2:void 0},s=!1;return t&&(void 0!==t[e]&&(r.value1=t[e],s=!0),o(n)&&void 0!==t[n]&&(r.value2=t[n],s=!0)),!s&&i&&(void 0!==i[e]&&(r.value1=i[e]),o(n)&&void 0!==i[n]&&(r.value2=i[n])),r},c=l("hide").value1;void 0!==c&&e.setVisible(!c,a);var u=l("pinned").value1;void 0!==u&&e.setPinned(u);var d=this.columnUtils.calculateColMinWidth(e.getColDef()),p=l("flex").value1;void 0!==p&&e.setFlex(p);var h=e.getFlex()<=0;if(h){var f=l("width").value1;null!=f&&null!=d&&f>=d&&e.setActualWidth(f,a)}var g=l("sort").value1;void 0!==g&&("desc"===g||"asc"===g?e.setSort(g,a):e.setSort(void 0,a));var v=l("sortIndex").value1;if(void 0!==v&&e.setSortIndex(v),!s&&e.isPrimary()){var y=l("aggFunc").value1;void 0!==y&&("string"===typeof y?(e.setAggFunc(y),e.isValueActive()||(e.setValueActive(!0,a),this.valueColumns.push(e))):(o(y)&&console.warn("AG Grid: stateItem.aggFunc must be a string. if using your own aggregation functions, register the functions first before using them in get/set state. This is because it is intended for the column state to be stored and retrieved as simple JSON."),e.isValueActive()&&(e.setValueActive(!1,a),Le(this.valueColumns,e))));var m=l("rowGroup","rowGroupIndex"),C=m.value1,b=m.value2;void 0===C&&void 0===b||("number"===typeof b||C?(e.isRowGroupActive()||(e.setRowGroupActive(!0,a),this.rowGroupColumns.push(e)),n&&"number"===typeof b&&(n[e.getId()]=b)):e.isRowGroupActive()&&(e.setRowGroupActive(!1,a),Le(this.rowGroupColumns,e)));var w=l("pivot","pivotIndex"),S=w.value1,E=w.value2;void 0===S&&void 0===E||("number"===typeof E||S?(e.isPivotActive()||(e.setPivotActive(!0,a),this.pivotColumns.push(e)),r&&"number"===typeof E&&(r[e.getId()]=E)):e.isPivotActive()&&(e.setPivotActive(!1,a),Le(this.pivotColumns,e)))}}},t.prototype.getGridColumns=function(e){return this.getColumns(e,this.getGridColumn.bind(this))},t.prototype.getColumns=function(e,t){var i=[];return e&&e.forEach((function(e){var n=t(e);n&&i.push(n)})),i},t.prototype.getColumnWithValidation=function(e){if(null==e)return null;var t=this.getGridColumn(e);return t||console.warn("AG Grid: could not find column "+e),t},t.prototype.getPrimaryColumn=function(e){return this.primaryColumns?this.getColumn(e,this.primaryColumns,this.primaryColumnsMap):null},t.prototype.getGridColumn=function(e){return this.getColumn(e,this.gridColumns,this.gridColumnsMap)},t.prototype.lookupGridColumn=function(e){return this.gridColumnsMap[e]},t.prototype.getSecondaryColumn=function(e){return this.secondaryColumns?this.getColumn(e,this.secondaryColumns,this.secondaryColumnsMap):null},t.prototype.getColumn=function(e,t,i){if(!e||!i)return null;if("string"==typeof e&&i[e])return i[e];for(var n=0;n<t.length;n++)if(this.columnsMatch(t[n],e))return t[n];return this.getAutoColumn(e)},t.prototype.getSourceColumnsForGroupColumn=function(e){var t=e.getColDef().showRowGroup;if(!t)return null;if(!0===t)return this.rowGroupColumns.slice(0);var i=this.getPrimaryColumn(t);return i?[i]:null},t.prototype.getAutoColumn=function(e){var t=this;return this.groupAutoColumns&&o(this.groupAutoColumns)&&!r(this.groupAutoColumns)&&this.groupAutoColumns.find((function(i){return t.columnsMatch(i,e)}))||null},t.prototype.columnsMatch=function(e,t){var i=e===t,n=e.getColDef()===t,o=e.getColId()==t;return i||n||o},t.prototype.getDisplayNameForColumn=function(e,t,i){if(void 0===i&&(i=!1),!e)return null;var n=this.getHeaderName(e.getColDef(),e,null,null,t);return i?this.wrapHeaderNameWithAggFunc(e,n):n},t.prototype.getDisplayNameForProvidedColumnGroup=function(e,t,i){var n=t?t.getColGroupDef():null;return n?this.getHeaderName(n,null,e,t,i):null},t.prototype.getDisplayNameForColumnGroup=function(e,t){return this.getDisplayNameForProvidedColumnGroup(e,e.getProvidedColumnGroup(),t)},t.prototype.getHeaderName=function(e,t,i,n,o){var r=e.headerValueGetter;if(r){var s={colDef:e,column:t,columnGroup:i,providedColumnGroup:n,location:o,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context};return"function"===typeof r?r(s):"string"===typeof r?this.expressionService.evaluate(r,s):(console.warn("AG Grid: headerValueGetter must be a function or a string"),"")}return null!=e.headerName?e.headerName:e.field?xt(e.field):""},t.prototype.wrapHeaderNameWithAggFunc=function(e,t){if(this.gridOptionsService.get("suppressAggFuncInHeader"))return t;var i,n=e.getColDef().pivotValueColumn,r=o(n),s=null;if(r){var a=this.gridOptionsService.get("removePivotHeaderRowWhenSingleValueColumn")&&1===this.valueColumns.length,l=void 0!==e.getColDef().pivotTotalColumnIds;if(a&&!l)return t;s=n?n.getAggFunc():null,i=!0}else{var c=e.isValueActive(),u=this.pivotMode||!this.isRowGroupEmpty();c&&u?(s=e.getAggFunc(),i=!0):i=!1}if(i){var d="string"===typeof s?s:"func",p=this.localeService.getLocaleTextFunc(),h=p(d,d);return"".concat(h,"(").concat(t,")")}return t},t.prototype.getColumnGroup=function(e,t){if(!e)return null;if(e instanceof pt)return e;var i=this.getAllDisplayedTrees(),n="number"===typeof t,o=null;return this.columnUtils.depthFirstAllColumnTreeSearch(i,(function(i){if(i instanceof pt){var r=i,s=void 0;s=n?e===r.getGroupId()&&t===r.getPartId():e===r.getGroupId(),s&&(o=r)}})),o},t.prototype.isReady=function(){return this.ready},t.prototype.extractValueColumns=function(e,t){this.valueColumns=this.extractColumns(t,this.valueColumns,(function(t,i){return t.setValueActive(i,e)}),(function(){}),(function(){}),(function(e){var t=e.aggFunc;return null===t||""===t?null:void 0!==t?!!t:void 0}),(function(e){return null!=e.initialAggFunc&&""!=e.initialAggFunc})),this.valueColumns.forEach((function(e){var t=e.getColDef();null!=t.aggFunc&&""!=t.aggFunc?e.setAggFunc(t.aggFunc):e.getAggFunc()||e.setAggFunc(t.initialAggFunc)}))},t.prototype.extractRowGroupColumns=function(e,t){this.rowGroupColumns=this.extractColumns(t,this.rowGroupColumns,(function(t,i){return t.setRowGroupActive(i,e)}),(function(e){return e.rowGroupIndex}),(function(e){return e.initialRowGroupIndex}),(function(e){return e.rowGroup}),(function(e){return e.initialRowGroup}))},t.prototype.extractColumns=function(e,t,i,n,o,r,s){void 0===e&&(e=[]),void 0===t&&(t=[]);var a=[],u=[];
11(this.primaryColumns||[]).forEach((function(i){var d,p=e.indexOf(i)<0,h=i.getColDef(),f=c(r(h)),g=c(s(h)),v=l(n(h)),y=l(o(h)),m=void 0!==f,C=void 0!==v,b=void 0!==g,w=void 0!==y;if(d=m?f:C?null!==v&&v>=0:p?b?g:!!w&&(null!=y&&y>=0):t.indexOf(i)>=0,d){var S=p?null!=v||null!=y:null!=v;S?a.push(i):u.push(i)}}));var d=function(e){var t=n(e.getColDef()),i=o(e.getColDef());return null!=t?t:i};a.sort((function(e,t){var i=d(e),n=d(t);return i===n?0:i<n?-1:1}));var p=[].concat(a);return t.forEach((function(e){u.indexOf(e)>=0&&p.push(e)})),u.forEach((function(e){p.indexOf(e)<0&&p.push(e)})),t.forEach((function(e){p.indexOf(e)<0&&i(e,!1)})),p.forEach((function(e){t.indexOf(e)<0&&i(e,!0)})),p},t.prototype.extractPivotColumns=function(e,t){this.pivotColumns=this.extractColumns(t,this.pivotColumns,(function(t,i){return t.setPivotActive(i,e)}),(function(e){return e.pivotIndex}),(function(e){return e.initialPivotIndex}),(function(e){return e.pivot}),(function(e){return e.initialPivot}))},t.prototype.resetColumnGroupState=function(e){if(void 0===e&&(e="api"),this.primaryColumnTree){var t=[];this.columnUtils.depthFirstOriginalTreeSearch(null,this.primaryColumnTree,(function(e){if(e instanceof Oe){var i=e.getColGroupDef(),n={groupId:e.getGroupId(),open:i?i.openByDefault:void 0};t.push(n)}})),this.setColumnGroupState(t,e)}},t.prototype.getColumnGroupState=function(){var e=[];return this.columnUtils.depthFirstOriginalTreeSearch(null,this.gridBalancedTree,(function(t){t instanceof Oe&&e.push({groupId:t.getGroupId(),open:t.isExpanded()})})),e},t.prototype.setColumnGroupState=function(e,t){var i=this;if(void 0===t&&(t="api"),this.gridBalancedTree){this.columnAnimationService.start();var n=[];if(e.forEach((function(e){var t=e.groupId,o=e.open,r=i.getProvidedColumnGroup(t);r&&r.isExpanded()!==o&&(i.logger.log("columnGroupOpened("+r.getGroupId()+","+o+")"),r.setExpanded(o),n.push(r))})),this.updateGroupsAndDisplayedColumns(t),this.setFirstRightAndLastLeftPinned(t),n.length){var o={type:ht.EVENT_COLUMN_GROUP_OPENED,columnGroup:1===Oe.length?n[0]:void 0,columnGroups:n};this.eventService.dispatchEvent(o)}this.columnAnimationService.finish()}},t.prototype.setColumnGroupOpened=function(e,t,i){var n;void 0===i&&(i="api"),n=e instanceof Oe?e.getId():e||"",this.setColumnGroupState([{groupId:n,open:t}],i)},t.prototype.getProvidedColumnGroup=function(e){"string"!==typeof e&&console.error("AG Grid: group key must be a string");var t=null;return this.columnUtils.depthFirstOriginalTreeSearch(null,this.gridBalancedTree,(function(i){i instanceof Oe&&i.getId()===e&&(t=i)})),t},t.prototype.calculateColumnsForDisplay=function(){var e,t=this;return e=this.pivotMode&&r(this.secondaryColumns)?this.gridColumns.filter((function(e){var i=t.groupAutoColumns&&je(t.groupAutoColumns,e),n=t.valueColumns&&je(t.valueColumns,e);return i||n})):this.gridColumns.filter((function(e){var i=t.groupAutoColumns&&je(t.groupAutoColumns,e);return i||e.isVisible()})),e},t.prototype.checkColSpanActiveInCols=function(e){var t=!1;return e.forEach((function(e){o(e.getColDef().colSpan)&&(t=!0)})),t},t.prototype.calculateColumnsForGroupDisplay=function(){var e=this;this.groupDisplayColumns=[],this.groupDisplayColumnsMap={};var t=function(t){var i=t.getColDef(),n=i.showRowGroup;i&&o(n)&&(e.groupDisplayColumns.push(t),"string"===typeof n?e.groupDisplayColumnsMap[n]=t:!0===n&&e.getRowGroupColumns().forEach((function(i){e.groupDisplayColumnsMap[i.getId()]=t})))};this.gridColumns.forEach(t)},t.prototype.getGroupDisplayColumns=function(){return this.groupDisplayColumns},t.prototype.getGroupDisplayColumnForGroup=function(e){return this.groupDisplayColumnsMap[e]},t.prototype.updateDisplayedColumns=function(e){var t=this.calculateColumnsForDisplay();this.buildDisplayedTrees(t),this.updateGroupsAndDisplayedColumns(e),this.setFirstRightAndLastLeftPinned(e)},t.prototype.isSecondaryColumnsPresent=function(){return o(this.secondaryColumns)},t.prototype.setSecondaryColumns=function(e,t){var i=this;if(void 0===t&&(t="api"),this.gridColumns){var n=e&&e.length>0;if(n||!r(this.secondaryColumns)){if(n){this.processSecondaryColumnDefinitions(e);var o=this.columnFactory.createColumnTree(e,!1,this.secondaryBalancedTree||this.previousSecondaryColumns||void 0);this.destroyOldColumns(this.secondaryBalancedTree,o.columnTree),this.secondaryBalancedTree=o.columnTree,this.secondaryHeaderRowCount=o.treeDept+1,this.secondaryColumns=this.getColumnsFromTree(this.secondaryBalancedTree),this.secondaryColumnsMap={},this.secondaryColumns.forEach((function(e){return i.secondaryColumnsMap[e.getId()]=e})),this.previousSecondaryColumns=null}else this.previousSecondaryColumns=this.secondaryBalancedTree,this.secondaryBalancedTree=null,this.secondaryHeaderRowCount=-1,this.secondaryColumns=null,this.secondaryColumnsMap={};this.updateGridColumns(),this.updateDisplayedColumns(t)}}},t.prototype.processSecondaryColumnDefinitions=function(e){var t=this.gridOptionsService.get("processPivotResultColDef"),i=this.gridOptionsService.get("processPivotResultColGroupDef");if(t||i){var n=function(e){e.forEach((function(e){var r=o(e.children);if(r){var s=e;i&&i(s),n(s.children)}else{var a=e;t&&t(a)}}))};e&&n(e)}},t.prototype.updateGridColumns=function(){var e,t=this,i=this.gridBalancedTree;if(this.gridColsArePrimary?this.lastPrimaryOrder=this.gridColumns:this.lastSecondaryOrder=this.gridColumns,this.secondaryColumns&&this.secondaryBalancedTree){var n=this.secondaryColumns.every((function(e){return void 0!==t.gridColumnsMap[e.getColId()]}));this.gridBalancedTree=this.secondaryBalancedTree.slice(),this.gridHeaderRowCount=this.secondaryHeaderRowCount,this.gridColumns=this.secondaryColumns.slice(),this.gridColsArePrimary=!1,n&&(e=this.lastSecondaryOrder)}else this.primaryColumns&&(this.gridBalancedTree=this.primaryColumnTree.slice(),this.gridHeaderRowCount=this.primaryHeaderRowCount,this.gridColumns=this.primaryColumns.slice(),this.gridColsArePrimary=!0,e=this.lastPrimaryOrder);var o=this.createGroupAutoColumnsIfNeeded();if(o&&e){var r=Dt(this.groupAutoColumns.map((function(e){return[e,!0]})));e=e.filter((function(e){return!r.has(e)}
11)),e=It(It([],Lt(this.groupAutoColumns),!1),Lt(e),!1)}if(this.addAutoGroupToGridColumns(),this.orderGridColsLike(e),this.gridColumns=this.placeLockedColumns(this.gridColumns),this.calculateColumnsForGroupDisplay(),this.refreshQuickFilterColumns(),this.clearDisplayedAndViewportColumns(),this.colSpanActive=this.checkColSpanActiveInCols(this.gridColumns),this.gridColumnsMap={},this.gridColumns.forEach((function(e){return t.gridColumnsMap[e.getId()]=e})),this.setAutoHeightActive(),!_e(i,this.gridBalancedTree)){var s={type:ht.EVENT_GRID_COLUMNS_CHANGED};this.eventService.dispatchEvent(s)}},t.prototype.setAutoHeightActive=function(){if(this.autoHeightActive=this.gridColumns.filter((function(e){return e.isAutoHeight()})).length>0,this.autoHeightActive){this.autoHeightActiveAtLeastOnce=!0;var e=this.gridOptionsService.isRowModelType("clientSide")||this.gridOptionsService.isRowModelType("serverSide");e||G("autoHeight columns only work with Client Side Row Model and Server Side Row Model.")}},t.prototype.orderGridColsLike=function(e){if(!r(e)){var t=Dt(e.map((function(e,t){return[e,t]}))),i=!0;if(this.gridColumns.forEach((function(e){t.has(e)&&(i=!1)})),!i){var n=Dt(this.gridColumns.map((function(e){return[e,!0]}))),o=e.filter((function(e){return n.has(e)})),s=Dt(o.map((function(e){return[e,!0]}))),a=this.gridColumns.filter((function(e){return!s.has(e)})),l=o.slice();a.forEach((function(e){var t=e.getOriginalParent();if(t){var i=[];while(!i.length&&t){var n=t.getLeafColumns();n.forEach((function(e){var t=l.indexOf(e)>=0,n=i.indexOf(e)<0;t&&n&&i.push(e)})),t=t.getOriginalParent()}if(i.length){var o=i.map((function(e){return l.indexOf(e)})),r=Math.max.apply(Math,It([],Lt(o),!1));Ge(l,e,r+1)}else l.push(e)}else l.push(e)})),this.gridColumns=l}}},t.prototype.isPrimaryColumnGroupsPresent=function(){return this.primaryHeaderRowCount>1},t.prototype.refreshQuickFilterColumns=function(){var e,t=null!==(e=this.isPivotMode()?this.secondaryColumns:this.primaryColumns)&&void 0!==e?e:[];this.groupAutoColumns&&(t=t.concat(this.groupAutoColumns)),this.columnsForQuickFilter=this.gridOptionsService.get("includeHiddenColumnsInQuickFilter")?t:t.filter((function(e){return e.isVisible()||e.isRowGroupActive()}))},t.prototype.placeLockedColumns=function(e){var t=[],i=[],n=[];return e.forEach((function(e){var o=e.getColDef().lockPosition;"right"===o?n.push(e):"left"===o||!0===o?t.push(e):i.push(e)})),It(It(It([],Lt(t),!1),Lt(i),!1),Lt(n),!1)},t.prototype.addAutoGroupToGridColumns=function(){if(r(this.groupAutoColumns))return this.destroyOldColumns(this.groupAutoColsBalancedTree),void(this.groupAutoColsBalancedTree=null);this.gridColumns=this.groupAutoColumns?this.groupAutoColumns.concat(this.gridColumns):this.gridColumns;var e=this.columnFactory.createForAutoGroups(this.groupAutoColumns,this.gridBalancedTree);this.destroyOldColumns(this.groupAutoColsBalancedTree,e),this.groupAutoColsBalancedTree=e,this.gridBalancedTree=e.concat(this.gridBalancedTree)},t.prototype.clearDisplayedAndViewportColumns=function(){this.viewportRowLeft={},this.viewportRowRight={},this.viewportRowCenter={},this.displayedColumnsLeft=[],this.displayedColumnsRight=[],this.displayedColumnsCenter=[],this.displayedColumns=[],this.viewportColumns=[],this.headerViewportColumns=[],this.viewportColumnsHash=""},t.prototype.updateGroupsAndDisplayedColumns=function(e){this.updateOpenClosedVisibilityInColumnGroups(),this.deriveDisplayedColumns(e),this.refreshFlexedColumns(),this.extractViewport(),this.updateBodyWidths();var t={type:ht.EVENT_DISPLAYED_COLUMNS_CHANGED};this.eventService.dispatchEvent(t)},t.prototype.deriveDisplayedColumns=function(e){this.derivedDisplayedColumnsFromDisplayedTree(this.displayedTreeLeft,this.displayedColumnsLeft),this.derivedDisplayedColumnsFromDisplayedTree(this.displayedTreeCentre,this.displayedColumnsCenter),this.derivedDisplayedColumnsFromDisplayedTree(this.displayedTreeRight,this.displayedColumnsRight),this.joinDisplayedColumns(),this.setLeftValues(e),this.displayedAutoHeightCols=this.displayedColumns.filter((function(e){return e.isAutoHeight()}))},t.prototype.isAutoRowHeightActive=function(){return this.autoHeightActive},t.prototype.wasAutoRowHeightEverActive=function(){return this.autoHeightActiveAtLeastOnce},t.prototype.joinDisplayedColumns=function(){this.gridOptionsService.get("enableRtl")?this.displayedColumns=this.displayedColumnsRight.concat(this.displayedColumnsCenter).concat(this.displayedColumnsLeft):this.displayedColumns=this.displayedColumnsLeft.concat(this.displayedColumnsCenter).concat(this.displayedColumnsRight)},t.prototype.setLeftValues=function(e){this.setLeftValuesOfColumns(e),this.setLeftValuesOfGroups()},t.prototype.setLeftValuesOfColumns=function(e){var t=this;if(this.primaryColumns){var i=this.primaryColumns.slice(0),n=this.gridOptionsService.get("enableRtl");[this.displayedColumnsLeft,this.displayedColumnsRight,this.displayedColumnsCenter].forEach((function(o){if
11(n){var r=t.getWidthOfColsInList(o);o.forEach((function(t){r-=t.getActualWidth(),t.setLeft(r,e)}))}else{var s=0;o.forEach((function(t){t.setLeft(s,e),s+=t.getActualWidth()}))}Ie(i,o)})),i.forEach((function(t){t.setLeft(null,e)}))}},t.prototype.setLeftValuesOfGroups=function(){[this.displayedTreeLeft,this.displayedTreeRight,this.displayedTreeCentre].forEach((function(e){e.forEach((function(e){if(e instanceof pt){var t=e;t.checkLeft()}}))}))},t.prototype.derivedDisplayedColumnsFromDisplayedTree=function(e,t){t.length=0,this.columnUtils.depthFirstDisplayedColumnTreeSearch(e,(function(e){e instanceof Ee&&t.push(e)}))},t.prototype.extractViewportColumns=function(){this.suppressColumnVirtualisation?(this.viewportColumnsCenter=this.displayedColumnsCenter,this.headerViewportColumnsCenter=this.displayedColumnsCenter):(this.viewportColumnsCenter=this.displayedColumnsCenter.filter(this.isColumnInRowViewport.bind(this)),this.headerViewportColumnsCenter=this.displayedColumnsCenter.filter(this.isColumnInHeaderViewport.bind(this))),this.viewportColumns=this.viewportColumnsCenter.concat(this.displayedColumnsLeft).concat(this.displayedColumnsRight),this.headerViewportColumns=this.headerViewportColumnsCenter.concat(this.displayedColumnsLeft).concat(this.displayedColumnsRight)},t.prototype.getVirtualHeaderGroupRow=function(e,t){var i;switch(e){case"left":i=this.viewportRowLeft[t];break;case"right":i=this.viewportRowRight[t];break;default:i=this.viewportRowCenter[t];break}return r(i)&&(i=[]),i},t.prototype.calculateHeaderRows=function(){this.viewportRowLeft={},this.viewportRowRight={},this.viewportRowCenter={};var e={};this.headerViewportColumns.forEach((function(t){return e[t.getId()]=!0}));var t=function(i,n,o){for(var r=!1,s=0;s<i.length;s++){var a=i[s],l=!1;if(a instanceof Ee)l=!0===e[a.getId()];else{var c=a,u=c.getDisplayedChildren();u&&(l=t(u,n,o+1))}l&&(r=!0,n[o]||(n[o]=[]),n[o].push(a))}return r};t(this.displayedTreeLeft,this.viewportRowLeft,0),t(this.displayedTreeRight,this.viewportRowRight,0),t(this.displayedTreeCentre,this.viewportRowCenter,0)},t.prototype.extractViewport=function(){var e=function(e){return"".concat(e.getId(),"-").concat(e.getPinned()||"normal")};this.extractViewportColumns();var t=this.viewportColumns.map(e).join("#"),i=this.viewportColumnsHash!==t;return i&&(this.viewportColumnsHash=t,this.calculateHeaderRows()),i},t.prototype.refreshFlexedColumns=function(e){var t;void 0===e&&(e={});var i=e.source?e.source:"flex";if(null!=e.viewportWidth&&(this.flexViewportWidth=e.viewportWidth),!this.flexViewportWidth)return[];var n=-1;if(e.resizingCols)for(var r=new Set(e.resizingCols),s=this.displayedColumnsCenter,a=s.length-1;a>=0;a--)if(r.has(s[a])){n=a;break}var l=0,c=[],u=0,d=0;for(a=0;a<this.displayedColumnsCenter.length;a++){var p=this.displayedColumnsCenter[a].getFlex()&&a>n;p?(c.push(this.displayedColumnsCenter[a]),d+=this.displayedColumnsCenter[a].getFlex(),u+=null!==(t=this.displayedColumnsCenter[a].getMinWidth())&&void 0!==t?t:0):l+=this.displayedColumnsCenter[a].getActualWidth()}if(!c.length)return[];var h=[];l+u>this.flexViewportWidth&&(c.forEach((function(e){var t;return e.setActualWidth(null!==(t=e.getMinWidth())&&void 0!==t?t:0,i)})),h=c,c=[]);var f,g=[];e:while(1){f=this.flexViewportWidth-l;var v=f/d;for(a=0;a<c.length;a++){var y=c[a],m=v*y.getFlex(),C=0,b=y.getMinWidth(),w=y.getMaxWidth();if(o(b)&&m<b?C=b:o(w)&&m>w&&(C=w),C){y.setActualWidth(C,i),Ne(c,y),d-=y.getFlex(),h.push(y),l+=y.getActualWidth();continue e}g[a]=Math.round(m)}break}var S=f;return c.forEach((function(e,t){e.setActualWidth(Math.min(g[t],S),i),h.push(e),S-=g[t]})),e.skipSetLeft||this.setLeftValues(i),e.updateBodyWidths&&this.updateBodyWidths(),e.fireResizedEvent&&this.dispatchColumnResizedEvent(h,!0,i,c),c},t.prototype.sizeColumnsToFit=function(e,t,i,n){var r,s,a,l,c,u=this;if(void 0===t&&(t="sizeColumnsToFit"),this.shouldQueueResizeOperations)this.resizeOperationQueue.push((function(){return u.sizeColumnsToFit(e,t,i,n)}));else{var d={};n&&(null===(r=null===n||void 0===n?void 0:n.columnLimits)||void 0===r||r.forEach((function(e){var t=e.key,i=Nt(e,["key"]);d["string"===typeof t?t:t.getColId()]=i})));var p=this.getAllDisplayedColumns(),h=e===this.getWidthOfColsInList(p);if(!(e<=0||!p.length||h)){var f=[],g=[];p.forEach((function(e){!0===e.getColDef().suppressSizeToFit?g.push(e):f.push(e)}));var v=f.slice(0),y=!1,m=function(e){Le(f,e),g.push(e)};f.forEach((function(e){var i,o;e.resetActualWidth(t);var r=null===d||void 0===d?void 0:d[e.getId()],s=null!==(i=null===r||void 0===r?void 0:r.minWidth)&&void 0!==i?i:null===n||void 0===n?void 0:n.defaultMinWidth,a=null!==(o=null===r||void 0===r?void 0:r.maxWidth)&&void 0!==o?o:null===n||void 0===n?void 0:n.defaultMaxWidth,l=e.getActualWidth();"number"===typeof s&&l<s?e.setActualWidth(s,t,!0):"number"===typeof a&&l>a&&e.setActualWidth(a,t,!0)}));while(!y){y=!0;var C=e-this.getWidthOfColsInList(g);if(C<=0)f.forEach((function(e){var i,o,r=null!==(o=null===(i=null===d||void 0===d?void 0:d[e.getId()])||void 0===i?void 0:i.minWidth)&&void 0!==o?o:null===n||void 0===n?void 0:n.defaultMinWidth;"number"!==typeof r?e.setMinimum(t):e.setActualWidth(r,t,!0)}));else for(var b=C/this.getWidthOfColsInList(f),w=C,S=f.length-1;S>=0;S--){var E=f[S],x=null===d||void 0===d?void 0:d[E.getId()],O=null!==(s=null===x||void 0===x?void 0:x.minWidth)&&void 0!==s?s:null===n||void 0===n?void 0:n.defaultMinWidth,T=null!==(a=null===x||void 0===x?void 0:x.maxWidth)&&void 0!==a?a:null===n||void 0===n?void 0:n.defaultMaxWidth,D=null!==(l=E.getMinWidth())&&void 0!==l?l:0,R=null!==(c=E.getMaxWidth())&&void 0!==c?c:Number.MAX_VALUE,A="number"===typeof O&&O>D?O:E.getMinWidth(),_="number"===typeof T&&T<R?T:E.getMaxWidth(),P=Math.round(E.getActualWidth()*b);o(A)&&P<A?(P=A,m(E),y=!1):o(_)&&P>_?(P=_,m(E),y=!1):0===S&&(P=w),E.setActualWidth(P,t,!0),w-=P}}v.forEach((function(e){e.fireColumnWidthChangedEvent(t)})),this.setLeftValues(t),this.updateBodyWidths(),i||this.dispatchColumnResizedEvent(v,!0,t)}}},t.prototype.buildDisplayedTrees=function(e){var t=[],i=[],n=[];e.forEach((function(e){switch(e.getPinned()){case"left":t.push(e);break;case"right":i.push(e);break;default:n.push(e);break}}
11));var o=new ft;this.displayedTreeLeft=this.displayedGroupCreator.createDisplayedGroups(t,o,"left",this.displayedTreeLeft),this.displayedTreeRight=this.displayedGroupCreator.createDisplayedGroups(i,o,"right",this.displayedTreeRight),this.displayedTreeCentre=this.displayedGroupCreator.createDisplayedGroups(n,o,null,this.displayedTreeCentre),this.updateDisplayedMap()},t.prototype.updateDisplayedMap=function(){var e=this;this.displayedColumnsAndGroupsMap={};var t=function(t){e.displayedColumnsAndGroupsMap[t.getUniqueId()]=t};this.columnUtils.depthFirstAllColumnTreeSearch(this.displayedTreeCentre,t),this.columnUtils.depthFirstAllColumnTreeSearch(this.displayedTreeLeft,t),this.columnUtils.depthFirstAllColumnTreeSearch(this.displayedTreeRight,t)},t.prototype.isDisplayed=function(e){var t=this.displayedColumnsAndGroupsMap[e.getUniqueId()];return t===e},t.prototype.updateOpenClosedVisibilityInColumnGroups=function(){var e=this.getAllDisplayedTrees();this.columnUtils.depthFirstAllColumnTreeSearch(e,(function(e){e instanceof pt&&e.calculateDisplayedColumns()}))},t.prototype.getGroupAutoColumns=function(){return this.groupAutoColumns},t.prototype.createGroupAutoColumnsIfNeeded=function(){var e=this.forceRecreateAutoGroups;if(this.forceRecreateAutoGroups=!1,!this.autoGroupsNeedBuilding)return!1;this.autoGroupsNeedBuilding=!1;var t=this.gridOptionsService.isGroupUseEntireRow(this.pivotMode),i=this.pivotMode?this.gridOptionsService.get("pivotSuppressAutoColumn"):this.isGroupSuppressAutoColumn(),n=this.rowGroupColumns.length>0||this.gridOptionsService.get("treeData"),o=n&&!i&&!t;if(o){var r=this.autoGroupColService.createAutoGroupColumns(this.rowGroupColumns),s=!this.autoColsEqual(r,this.groupAutoColumns);if(s||e)return this.groupAutoColumns=r,!0}else this.groupAutoColumns=null;return!1},t.prototype.isGroupSuppressAutoColumn=function(){var e=this.gridOptionsService.get("groupDisplayType"),t="custom"===e;if(t)return!0;var i=this.gridOptionsService.get("treeDataDisplayType");return"custom"===i},t.prototype.autoColsEqual=function(e,t){return _e(e,t,(function(e,t){return e.getColId()===t.getColId()}))},t.prototype.getWidthOfColsInList=function(e){return e.reduce((function(e,t){return e+t.getActualWidth()}),0)},t.prototype.getFirstDisplayedColumn=function(){var e=this.gridOptionsService.get("enableRtl"),t=["getDisplayedLeftColumns","getDisplayedCenterColumns","getDisplayedRightColumns"];e&&t.reverse();for(var i=0;i<t.length;i++){var n=this[t[i]]();if(n.length)return e?Ae(n):n[0]}return null},t.prototype.setColumnHeaderHeight=function(e,t){var i=e.setAutoHeaderHeight(t);if(i){var n={type:ht.EVENT_COLUMN_HEADER_HEIGHT_CHANGED,column:e,columns:[e],source:"autosizeColumnHeaderHeight"};this.eventService.dispatchEvent(n)}},t.prototype.getColumnGroupHeaderRowHeight=function(){return this.isPivotMode()?this.getPivotGroupHeaderHeight():this.getGroupHeaderHeight()},t.prototype.getColumnHeaderRowHeight=function(){var e=this.isPivotMode()?this.getPivotHeaderHeight():this.getHeaderHeight(),t=this.getAllDisplayedColumns().filter((function(e){return e.isAutoHeaderHeight()})).map((function(e){return e.getAutoHeaderHeight()||0}));return Math.max.apply(Math,It([e],Lt(t),!1))},t.prototype.getHeaderHeight=function(){var e;return null!==(e=this.gridOptionsService.get("headerHeight"))&&void 0!==e?e:this.environment.getFromTheme(25,"headerHeight")},t.prototype.getFloatingFiltersHeight=function(){var e;return null!==(e=this.gridOptionsService.get("floatingFiltersHeight"))&&void 0!==e?e:this.getHeaderHeight()},t.prototype.getGroupHeaderHeight=function(){var e;return null!==(e=this.gridOptionsService.get("groupHeaderHeight"))&&void 0!==e?e:this.getHeaderHeight()},t.prototype.getPivotHeaderHeight=function(){var e;return null!==(e=this.gridOptionsService.get("pivotHeaderHeight"))&&void 0!==e?e:this.getHeaderHeight()},t.prototype.getPivotGroupHeaderHeight=function(){var e;return null!==(e=this.gridOptionsService.get("pivotGroupHeaderHeight"))&&void 0!==e?e:this.getGroupHeaderHeight()},t.prototype.queueResizeOperations=function(){this.shouldQueueResizeOperations=!0},t.prototype.processResizeOperations=function(){this.shouldQueueResizeOperations=!1,this.resizeOperation
11Queue.forEach((function(e){return e()})),this.resizeOperationQueue=[]},t.prototype.resetColumnDefIntoColumn=function(e,t){var i=e.getUserProvidedColDef();if(!i)return!1;var n=this.columnFactory.addColumnDefaultAndTypes(i,e.getColId());return e.setColDef(n,i,t),!0},t.prototype.isColumnGroupingLocked=function(e){var t=this.gridOptionsService.get("groupLockGroupColumns");if(!e.isRowGroupActive()||0===t)return!1;if(-1===t)return!0;var i=this.rowGroupColumns.findIndex((function(t){return t.getColId()===e.getColId()}));return t>i},t.prototype.generateColumnStateForRowGroupAndPivotIndexes=function(e,t){var i=this,n={},o=function(e,t,o,r,s,a){if(!t.length||!i.primaryColumns)return[];for(var l=Object.keys(e),c=new Set(l),u=new Set(l),d=new Set(t.map((function(e){var t=e.getColId();return u.delete(t),t})).concat(l)),p=[],h={},f=0,g=0;g<i.primaryColumns.length;g++){var v=i.primaryColumns[g].getColId();d.has(v)&&(p.push(v),h[v]=f++)}var y=1e3,m=!1,C=0,b=function(t){for(var i=h[t],n=C;n<i;n++){var o=p[n];u.has(o)&&(e[o][s]=y++,u.delete(o))}C=i};t.forEach((function(t){var i=t.getColId();if(c.has(i))b(i),e[i][s]=y++;else{var l=t.getColDef(),d=null===l[s]||void 0===l[s]&&null==l[a];if(d){if(!m){var f=l[o]||void 0===l[o]&&l[r];f?b(i):(u.forEach((function(t){e[t][s]=y+h[t]})),y+=p.length,m=!0)}n[i]||(n[i]={colId:i}),n[i][s]=y++}}}))};return o(e,this.rowGroupColumns,"rowGroup","initialRowGroup","rowGroupIndex","initialRowGroupIndex"),o(t,this.pivotColumns,"pivot","initialPivot","pivotIndex","initialPivotIndex"),Object.values(n)},t.prototype.onColumnsReady=function(){var e=this,t=this.gridOptionsService.get("autoSizeStrategy");if(t){var i=t.type;setTimeout((function(){if("fitGridWidth"===i){var n=t.columnLimits,o=t.defaultMinWidth,r=t.defaultMaxWidth,s=null===n||void 0===n?void 0:n.map((function(e){var t=e.colId,i=e.minWidth,n=e.maxWidth;return{key:t,minWidth:i,maxWidth:n}}));e.ctrlsService.getGridBodyCtrl().sizeColumnsToFit({defaultMinWidth:o,defaultMaxWidth:r,columnLimits:s})}else"fitProvidedWidth"===i&&e.sizeColumnsToFit(t.width,"sizeColumnsToFit")}))}},t.prototype.onFirstDataRendered=function(){var e=this,t=this.gridOptionsService.get("autoSizeStrategy");if("fitCellContents"===(null===t||void 0===t?void 0:t.type)){var i=t.colIds,n=t.skipHeader;setTimeout((function(){i?e.autoSizeColumns({columns:i,skipHeader:n,source:"autosizeColumns"}):e.autoSizeAllColumns(n,"autosizeColumns")}))}},Mt([de("expressionService")],t.prototype,"expressionService",void 0),Mt([de("columnFactory")],t.prototype,"columnFactory",void 0),Mt([de("displayedGroupCreator")],t.prototype,"displayedGroupCreator",void 0),Mt([de("ctrlsService")],t.prototype,"ctrlsService",void 0),Mt([de("autoWidthCalculator")],t.prototype,"autoWidthCalculator",void 0),Mt([de("columnUtils")],t.prototype,"columnUtils",void 0),Mt([de("columnAnimationService")],t.prototype,"columnAnimationService",void 0),Mt([de("autoGroupColService")],t.prototype,"autoGroupColService",void 0),Mt([pe("aggFuncService")],t.prototype,"aggFuncService",void 0),Mt([pe("valueCache")],t.prototype,"valueCache",void 0),Mt([pe("animationFrameService")],t.prototype,"animationFrameService",void 0),Mt([de("sortController")],t.prototype,"sortController",void 0),Mt([de("columnDefFactory")],t.prototype,"columnDefFactory",void 0),Mt([le],t.prototype,"init",null),Mt([ce],t.prototype,"destroyColumns",null),Mt([kt(0,fe("loggerFactory"))],t.prototype,"setBeans",null),t=Mt([ue("columnModel")],t),t}(st),Vt=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Bt=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},jt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Vt(t,e),t.prototype.calculateColMinWidth=function(e){return null!=e.minWidth?e.minWidth:this.environment.getMinColW
11idth()},t.prototype.calculateColMaxWidth=function(e){return null!=e.maxWidth?e.maxWidth:Number.MAX_SAFE_INTEGER},t.prototype.calculateColInitialWidth=function(e){var t,i=this.calculateColMinWidth(e),n=this.calculateColMaxWidth(e),o=l(e.width),r=l(e.initialWidth);return t=null!=o?o:null!=r?r:200,Math.max(Math.min(t,n),i)},t.prototype.getOriginalPathForColumn=function(e,t){var i=[],n=!1,o=function(t,r){for(var s=0;s<t.length;s++){if(n)return;var a=t[s];if(a instanceof Oe){var l=a;o(l.getChildren(),r+1),i[r]=a}else a===e&&(n=!0)}};return o(t,0),n?i:null},t.prototype.depthFirstOriginalTreeSearch=function(e,t,i){var n=this;t&&t.forEach((function(t){t instanceof Oe&&n.depthFirstOriginalTreeSearch(t,t.getChildren(),i),i(t,e)}))},t.prototype.depthFirstAllColumnTreeSearch=function(e,t){var i=this;e&&e.forEach((function(e){e instanceof pt&&i.depthFirstAllColumnTreeSearch(e.getChildren(),t),t(e)}))},t.prototype.depthFirstDisplayedColumnTreeSearch=function(e,t){var i=this;e&&e.forEach((function(e){e instanceof pt&&i.depthFirstDisplayedColumnTreeSearch(e.getDisplayedChildren(),t),t(e)}))},t=Bt([ue("columnUtils")],t),t}(st),Ht=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Wt=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Ut=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ht(t,e),t.prototype.createDisplayedGroups=function(e,t,i,n){var o=this,r=this.mapOldGroupsById(n),s=[],a=e,l=function(){var e=a;a=[];for(var n=0,l=function(l){var c=n;n=l;var u=e[c],d=u instanceof pt?u.getProvidedColumnGroup():u,p=d.getOriginalParent();if(null!=p){var h=o.createColumnGroup(p,t,r,i);for(f=c;f<l;f++)h.addChild(e[f]);a.push(h)}else for(var f=c;f<l;f++)s.push(e[f])},c=1;c<e.length;c++){var u=e[c],d=u instanceof pt?u.getProvidedColumnGroup():u,p=d.getOriginalParent(),h=e[n],f=h instanceof pt?h.getProvidedColumnGroup():h,g=f.getOriginalParent();p!==g&&l(c)}n<e.length&&l(e.length)};while(a.length)l();return this.setupParentsIntoColumns(s,null),s},t.prototype.createColumnGroup=function(e,t,i,n){var r=e.getGroupId(),s=t.getInstanceIdForKey(r),a=pt.createUniqueId(r,s),l=i[a];return l&&l.getProvidedColumnGroup()!==e&&(l=null),o(l)?l.reset():(l=new pt(e,r,s,n),this.context.createBean(l)),l},t.prototype.mapOldGroupsById=function(e){var t={},i=function(e){e.forEach((function(e){if(e instanceof pt){var n=e;t[e.getUniqueId()]=n,i(n.getChildren())}}))};return e&&i(e),t},t.prototype.setupParentsIntoColumns=function(e,t){var i=this;e.forEach((function(e){if(e.setParent(t),e instanceof pt){var n=e;i.setupParentsIntoColumns(n.getChildren(),n)}}))},t=Wt([ue("displayedGroupCreator")],t),t}(st),zt=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},Kt=function(e,t,i){if(i||2===arguments.length)for(var n,o=0,r=t.length;o<r;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},Yt={statusBar:!0,enableBrowserTooltips:!0,tooltipTrigger:!0,tooltipMouseTrack:!0,tooltipInteraction:!0,defaultColGroupDef:!0,suppressAutoSize:!0,skipHeaderOnAutoSize:!0,autoSizeStrategy:!0,components:!0,stopEditingWhenCellsLoseFocus:!0,undoRedoCellEditing:!0,undoRedoCellEditingLimit:!0,excelStyles:!0,cacheQuickFilter:!0,excludeHiddenColumnsFromQuickFilter:!0,advancedFilterModel:!0,customChartThemes:!0,chartThemeOverrides:!0,enableChartToolPanelsButton:!0,suppressChartToolPanelsButton:!0,chartToolPanelsDef:!0,loadingCellRendererSelector:!0,localeText:!0,keepDetailRows:!0,keepDetailRowsCount:!0,detailRowHeight:!0,detailRowAutoHeight:!0,alignedGrids:!0,tabIndex:!0,valueCache:!0,valueCacheNeverExpires:!0,enableCellExpressions:!0,suppressParentsInRowNodes:!0,suppressTouch:!0,suppressAsyncEvents:!0,suppressBrowserResizeObserver:!0,suppressPropertyNamesCheck:!0,debug:!0,loadingOverlayComponent:!0,loadingOverlayComponentParams:!0,suppressLoadingOverlay:!0,noRowsOverlayComponent:!0,noRowsOverlayComponentParams:!0,paginationPageSizeSelector:!0,paginateChildRows:!0,pivotPanelShow:!0,pivotSuppressAutoColumn:!0,suppressExpandablePivotGroups:!0,aggFuncs:!0,suppressAggFuncInHeader:!0,suppressAggAtRootLevel:!0,removePivotHeaderRowWhenSingleValueColumn:!0,allowShowChangeAfterFilter:!0,ensureDomOrder:!0,enableRtl:!0,suppressColumnVirtualisation:!0,suppressMaxRenderedRowRestriction:!0,suppressRowVirtualisation:!0,rowDragText:!0,suppressGroupMaintainValueType:!0,autoGroupColumnDef:!0,groupLockGroupColumns:!0,rowGroupPanelSuppressSort:!0,suppressGroupRowsSticky:!0,rowModelType:!0,cacheOverflowSize:!0,infiniteInitialRowCount:!0,serverSideInitialRowCount:!0,suppressServerSideInfiniteScroll:!0,maxBlocksInCache:!0,maxConcurrentDatasourceRequests:!0,blockLoadDebounceMillis:!0,serverSideOnlyRefreshFilteredGroups:!0,serverSidePivotResultFieldSeparator:!0,viewportRowModelPageSize:!0,viewportRowModelBufferSize:!0,debounceVerticalScrollbar:!0,suppressAnimationFrame:!0,suppressPreventDefaultOnMouseWheel:!0,scrollbarWidth:!0,icons:!0,suppressRowTransform:!0,gridId:!0,functionsPassive:!0,enableGroupEdit:!0,initialState:!0,processUnpinnedColumns:!0,createChartContainer:!0,getLocaleText:!0,getRowId:!0},qt=function(){function e(){}return e.STRING_PROPERTIES=["rowSelection","overlayLoadingTemplate","overlayNoRowsTemplate","gridId","quickFilterText","rowModelType","editType","domLayout","clipboardDelimiter","rowGroupPanelShow","multiSortKey","pivotColumnGroupTotals","pivotRowTotals","pivotPanelShow","fillHandleDirection","groupDisplayType","treeDataDisplayType","colResizeDefault","tooltipTrigger","serverSidePivotResultFieldSeparator"],e.OBJECT_PROPERTIES=["components","rowStyle","context","autoGroupColumnDef","localeText","icons","datasource","serverSideDatasource","viewportDatasource","groupRowRendererParams","aggFuncs","fullWidthCellRendererParams","defaultColGroupDef","defaultColDef","defaultCsvExportParams","defaultExcelExportParams","columnTypes","rowClassRules","detailCellRendererParams","loadingCellRendererParams","loadingOverlayComponentParams","noRowsOverlayComponentParams","popupParent","statusBar","sideBar","chartThemeOverrides","customChartThemes","chartToolPanelsDef","dataTypeDefinitions","advancedFilterModel","advancedFilterParent","advancedFilterBuilderParams","initialState","autoSizeStrategy"],e.ARRAY_PROPERTIES=["sortingOrder","alignedGrids","rowData","columnDefs","excelStyles","pinnedTopRowData","pinnedBottomRowData","chartThemes","rowClass","paginationPageSizeSelector"],e.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","tabIndex"],e.BOOLEAN_PROPERTIES=["suppressMakeColumnVisibleAfterUnGroup","suppressRowClickSelection","suppressCellFocus","suppressHorizontalScroll","groupSelectsChildren","alwaysShowHorizontalScroll","alwaysShowVerticalScroll","debug","enableBrowserTooltips","enableCellExpressions","groupIncludeTotalFooter","groupSuppressBlankHeader","suppressMenuHide","suppressRowDeselection","unSortIcon","suppressMultiSort","alwaysMultiSort","singleClickEdit","suppressLoadingOverlay","suppressNoRowsOverlay","suppressAutoSize","skipHeaderOnAutoSize","suppressParentsInRowNodes","suppressColumnMoveAnimation","suppressMovableColumns","suppressFieldDotNotation","enableRangeSelection","enableRangeHandle","enableFillHandle","suppressClearOnFillReduction","deltaSort","suppressTouch","suppressAsyncEvents","allowContextMenuWithControlKey","suppressContextMenu","enableCellChangeFlash","suppressDragLeaveHidesColumns","suppressRowGroupHidesColumns","suppressMiddleClickScrolls","suppressPreventDefaultOnMouseWheel","suppressCopyRowsToClipboard","copyHeadersToClipboard","copyGroupHeadersToClipboard","pivotMode","suppressAggFuncInHeader","suppressColumnVirtualisation","alwaysAggregateAtRootLevel","suppressAggAtRootLevel","suppressFocusAfterRefresh","functionsPassive","functionsReadOnly","animateRows","groupSelectsFiltered","groupRemoveSingleChildren","groupRemoveLowestSingleChildren","enableRtl","suppressClickEdit","rowDragEntireRow","rowDragManaged","suppressRowDrag","suppressMoveWhenRowDragging","rowDragMultiRow","enableGroupEdit","embedFullWidthRows","suppressPaginationPanel","groupHideOpenParents","groupAllowUnbalanced","pagination","paginationAutoPageSize","suppressScrollOnNewData","suppressScrollWhenPopupsAreOpen","purgeClosedRowNodes","cacheQuickFilter","includeHiddenColumnsInQuickFilter","excludeHiddenColumnsFromQuickFilter","ensureDomOrder","accentedSort","suppressChangeDetection","valueCache","valueCacheNeverExpires","aggregateOnlyChangedColumns","suppressAnimationFrame","suppressExcelExport","suppressCsvExport","includeHiddenColumnsInAdvancedFilter","suppressMultiRangeSelection","enterMovesDown","enterMovesDownAfterEdit","enterNavigatesVerticallyAfterEdit","enterNavigatesVertically","suppressPropertyNamesCheck","rowMultiSelectWithClick","suppressRowHoverHighlight","suppressRowTransform","suppressClipboardPaste","suppressLastEmptyLineOnPaste","enableCharts","enableChartToolPanelsButton","suppressChartToolPanelsButton","suppressMaintainUnsortedOrder","enableCellTextSelection","suppressBrowserResizeObserver","suppressMaxRenderedRowRestriction","excludeChildrenWhenTreeDataFiltering","tooltipMouseTrack","tooltipInteraction","keepDetailRows","paginateChildRows","preventDefaultOnContextMenu","undoRedoCellEditing","allowDragFromColumnsToolPanel","pivotSuppressAutoColumn","suppressExpandablePivotGroups","debounceVerticalScrollbar","detailRowAutoHeight","serverSideFilterAllLevels","serverSideSortAllLevels","serverSideOnlyRefreshFilteredGroups","serverSideSortOnServer","serverSideFilterOnServer","suppressAggFilteredOnly","showOpenedGroup","suppressClipboardApi","suppressModelUpdateAfterUpdateTransaction","stopEditingWhenCellsLoseFocus","maintainColumnOrder","groupMaintainOrder","columnHoverHighlight","readOnlyEdit","suppressRowVirtualisation","enableCellEditingOnBackspace","resetRowDataOnUpdate","removePivotHeaderRowWhenSingleValueColumn","suppressCopySingleCellRanges","suppressGroupRowsSticky","suppressCutToClipboard","suppressServerSideInfiniteScroll","rowGroupPanelSuppressSort","allowShowChangeAfterFilter","enableAdvancedFilter","masterDetail","treeData","suppressGroupMaintainValueType"],e.FUNCTIONAL_PROPERTIES=["doesExternalFilterPass","processPivotResultColDef","processPivotResultColGroupDef","getBusinessKeyForNode","isRowSelectable","rowDragText","groupRowRenderer","fullWidthCellRenderer","loadingCellRenderer","loadingOverlayComponent","noRowsOverlayComponent","detailCellRenderer","quickFilterParser","quickFilterMatcher"],e.CALLBACK_PROPERTIES=["getLocaleText","isExternalFilterPresent","getRowHeight","getRowClass","getRowStyle","getContextMenuItems","getMainMenuItems","processRowPostCreate","processCellForClipboard","getGroupRowAgg","isFullWidthRow","
11sendToClipboard","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"],e.FUNCTION_PROPERTIES=Kt(Kt([],zt(e.FUNCTIONAL_PROPERTIES),!1),zt(e.CALLBACK_PROPERTIES),!1),e.ALL_PROPERTIES=Kt(Kt(Kt(Kt(Kt(Kt([],zt(e.ARRAY_PROPERTIES),!1),zt(e.OBJECT_PROPERTIES),!1),zt(e.STRING_PROPERTIES),!1),zt(e.NUMBER_PROPERTIES),!1),zt(e.FUNCTION_PROPERTIES),!1),zt(e.BOOLEAN_PROPERTIES),!1),e}(),Xt=function(){return Xt=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Xt.apply(this,arguments)},$t=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},Zt=function(e,t,i){if(i||2===arguments.length)for(var n,o=0,r=t.length;o<r;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},Jt=function(){function e(){}var t;return e.getCallbackForEvent=function(e){return!e||e.length<2?e:"on"+e[0].toUpperCase()+e.substring(1)},e.getGridOptionKeys=function(){return this.ALL_PROPERTIES_AND_CALLBACKS},e.combineAttributesAndGridOptions=function(t,i){"object"!==typeof t&&(t={});var n=Xt({},t),o=e.getGridOptionKeys();return o.forEach((function(t){var o=i[t];"undefined"!==typeof o&&o!==e.VUE_OMITTED_PROPERTY&&(n[t]=o)})),n},e.processOnChange=function(t,i){if(t){var n={},o=!1;if(Object.keys(t).filter((function(t){return e.ALL_PROPERTIES_AND_CALLBACKS_SET.has(t)})).forEach((function(e){n[e]=t[e],o=!0})),o){i.__internalUpdateGridOptions(n);var r={type:ht.EVENT_COMPONENT_STATE_CHANGED};m(n,(function(e,t){r[e]=t})),i.dispatchEvent(r)}}},t=e,e.EVENTS=h(ht),e.VUE_OMITTED_PROPERTY="AG-VUE-OMITTED-PROPERTY",e.EXCLUDED_INTERNAL_EVENTS=[ht.EVENT_SCROLLBAR_WIDTH_CHANGED,ht.EVENT_CHECKBOX_CHANGED,ht.EVENT_HEIGHT_SCALE_CHANGED,ht.EVENT_BODY_HEIGHT_CHANGED,ht.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,ht.EVENT_SCROLL_VISIBILITY_CHANGED,ht.EVENT_COLUMN_HOVER_CHANGED,ht.EVENT_FLASH_CELLS,ht.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED,ht.EVENT_DISPLAYED_ROWS_CHANGED,ht.EVENT_LEFT_PINNED_WIDTH_CHANGED,ht.EVENT_RIGHT_PINNED_WIDTH_CHANGED,ht.EVENT_ROW_CONTAINER_HEIGHT_CHANGED,ht.EVENT_POPUP_TO_FRONT,ht.EVENT_STORE_UPDATED,ht.EVENT_COLUMN_PANEL_ITEM_DRAG_START,ht.EVENT_COLUMN_PANEL_ITEM_DRAG_END,ht.EVENT_FILL_START,ht.EVENT_FILL_END,ht.EVENT_KEY_SHORTCUT_CHANGED_CELL_START,ht.EVENT_KEY_SHORTCUT_CHANGED_CELL_END,ht.EVENT_FULL_WIDTH_ROW_FOCUSED,ht.EVENT_HEADER_HEIGHT_CHANGED,ht.EVENT_COLUMN_HEADER_HEIGHT_CHANGED,ht.EVENT_CELL_FOCUS_CLEARED,ht.EVENT_GRID_STYLES_CHANGED,ht.EVENT_FILTER_DESTROYED,ht.EVENT_ROW_DATA_UPDATE_STARTED,ht.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,ht.EVENT_DATA_TYPES_INFERRED,ht.EVENT_FIELD_VALUE_CHANGED,ht.EVENT_FIELD_PICKER_VALUE_SELECTED,ht.EVENT_SUPPRESS_COLUMN_MOVE_CHANGED,ht.EVENT_SUPPRESS_MENU_HIDE_CHANGED,ht.EVENT_SUPPRESS_FIELD_DOT_NOTATION,ht.EVENT_ROW_COUNT_READY,ht.EVENT_SIDE_BAR_UPDATED],e.PUBLIC_EVENTS=e.EVENTS.filter((function(t){return!je(e.EXCLUDED_INTERNAL_EVENTS,t)})),e.EVENT_CALLBACKS=e.EVENTS.map((function(t){return e.getCallbackForEvent(t)})),e.STRING_PROPERTIES=qt.STRING_PROPERTIES,e.OBJECT_PROPERTIES=qt.OBJECT_PROPERTIES,e.ARRAY_PROPERTIES=qt.ARRAY_PROPERTIES,e.NUMBER_PROPERTIES=qt.NUMBER_PROPERTIES,e.BOOLEAN_PROPERTIES=qt.BOOLEAN_PROPERTIES,e.FUNCTION_PROPERTIES=qt.FUNCTION_PROPERTIES,e.ALL_PROPERTIES=qt.ALL_PROPERTIES,e.ALL_PROPERTIES_AND_CALLBACKS=Zt(Zt([],$t(t.ALL_PROPERTIES),!1),$t(t.EVENT_CALLBACKS),!1),e.ALL_PROPERTIES_AND_CALLBACKS_SET=new Set(e.ALL_PROPERTIES_AND_CALLBACKS),e}(),Qt=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ei=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},ti=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.componentsMappedByName={},t}return Qt(t,e),t.prototype.setupComponents=function(e){var t=this;e&&e.forEach((function(e){return t.addComponent(e)}))},t.prototype.addComponent=function(e){var t=e.componentName.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),i=t.toUpperCase();this.componentsMappedByName[i]=e.componentClass},t.prototype.getComponentClass=function(e){return this.componentsMappedByName[e]},t=ei([ue("agStackComponentsRegistry")],t),t}(st);function ii(e,t,i){null==i||"string"===typeof i&&""==i?oi(e,t):ni(e,t,i)}function ni(e,t,i){e.setAttribute(ri(t),i.toString())}function oi(e,t){e.removeAttribute(ri(t))}function ri(e){return"aria-".concat(e)}function si(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function ai(e){var t;return t="asc"===e?"ascending":"desc"===e?"descending":"mixed"===e?"other":"none",t}function li(e){return parseInt(e.getAttribute("aria-level"),10)}function ci(e){return parseInt(e.getAttribute("aria-posinset"),10)}function ui(e){return e.getAttribute("aria-label")}function di(e,t){ii(e,"label",t)}function pi(e,t){ii(e,"labelledby",t)}function hi(e,t){ii(e,"description",t)}function fi(e,t){ii(e,"describedby",t)}function gi(e,t){ii(e,"live",t)}function vi(e,t){ii(e,"atomic",t)}function yi(e,t){ii(e,"relevant",t)}function mi(e,t){ii(e,"level",t)}function Ci(e,t){ii(e,"disabled",t)}function bi(e,t){ii(e,"hidden",t)}function wi(e,t){ii(e,"activedescendant",t)}function Si(e,t){ni(e,"expanded",t)}function Ei(e){oi(e,"expanded")}function xi(e,t){ni(e,"setsize",t)}function Oi(e,t){ni(e,"posinset",t)}function Ti(e,t){ni(e,"multiselectable",t)}function Di(e,t){ni(e,"rowcount",t)}function Ri(e,t){ni(e,"rowindex",t)}function Ai(e,t){ni(e,"colcount",t)}function _i(e,t){ni(e,"colindex",t)}function Pi(e,t){ni(e,"colspan",t)}function Mi(e,t){ni(e,"sort",t)}function ki(e){oi(e,"sort")}function Ni(e,t){ii(e,"selected",t)}function Li(e,t){ni(e,"checked",void 0===t?"mixed":t)}function Ii(e,t){ii(e,"controls",t.id),pi(t,e.id)}function Fi(e,t){return void 0===t?e("ariaIndeterminate","indeterminate"):!0===t?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var Gi,Vi,Bi,ji,Hi,Wi,Ui,zi,Ki=Object.freeze({__proto__:null,setAriaRole:si,getAriaSortState:ai,getAriaLevel:li,getAriaPosInSet:ci,getAriaLabel:ui,setAriaLabel:di,setAriaLabelledBy:pi,setAriaDescription:hi,setAriaDescribedBy:fi,setAriaLive:gi,setAriaAtomic:vi,setAriaRelevant:yi,setAriaLevel:mi,setAriaDisabled:Ci,setAriaHidden:bi,setAriaActiveDescendant:wi,setAriaExpanded:Si,removeAriaExpanded:Ei,setAriaSetSize:xi,setAriaPosInSet:Oi,setAriaMultiSelectable:Ti,setAriaRowCount:Di,setAriaRowIndex:Ri,setAriaColCount:Ai,setAriaColIndex:_i,setAriaColSpan:Pi,setAriaSort:Mi,removeAriaSort:ki,setAriaSelected:Ni,setAriaChecked:Li,setAriaControl
11s:Ii,getAriaCheckboxStateName:Fi});function Yi(){return void 0===Gi&&(Gi=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),Gi}function qi(){if(void 0===Vi)if(Yi()){var e=navigator.userAgent.match(/version\/(\d+)/i);e&&(Vi=null!=e[1]?parseFloat(e[1]):0)}else Vi=0;return Vi}function Xi(){if(void 0===Bi){var e=window;Bi=!!e.chrome&&(!!e.chrome.webstore||!!e.chrome.runtime)||/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor)}return Bi}function $i(){return void 0===ji&&(ji=/(firefox)/i.test(navigator.userAgent)),ji}function Zi(){return void 0===Hi&&(Hi=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),Hi}function Ji(){return void 0===Wi&&(Wi=/iPad|iPhone|iPod/.test(navigator.platform)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1),Wi}function Qi(){return!Yi()||qi()>=15}function en(e){if(!e)return null;var t=e.tabIndex,i=e.getAttribute("tabIndex");return-1!==t||null!==i&&(""!==i||$i())?t.toString():null}function tn(){if(!document.body)return-1;var e=1e6,t=navigator.userAgent.toLowerCase().match(/firefox/)?6e6:1e9,i=document.createElement("div");document.body.appendChild(i);while(1){var n=2*e;if(i.style.height=n+"px",n>t||i.clientHeight!==n)break;e=n}return document.body.removeChild(i),e}function nn(){var e,t,i;return null!==(t=null===(e=document.body)||void 0===e?void 0:e.clientWidth)&&void 0!==t?t:window.innerHeight||(null===(i=document.documentElement)||void 0===i?void 0:i.clientWidth)||-1}function on(){var e,t,i;return null!==(t=null===(e=document.body)||void 0===e?void 0:e.clientHeight)&&void 0!==t?t:window.innerHeight||(null===(i=document.documentElement)||void 0===i?void 0:i.clientHeight)||-1}function rn(){return null==zi&&sn(),zi}function sn(){var 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);var i=t.offsetWidth-t.clientWidth;0===i&&0===t.clientWidth&&(i=null),t.parentNode&&t.parentNode.removeChild(t),null!=i&&(zi=i,Ui=0===i)}function an(){return null==Ui&&sn(),Ui}var ln=Object.freeze({__proto__:null,isBrowserSafari:Yi,getSafariVersion:qi,isBrowserChrome:Xi,isBrowserFirefox:$i,isMacOsUserAgent:Zi,isIOSUserAgent:Ji,browserSupportsPreventScroll:Qi,getTabIndex:en,getMaxDivHeight:tn,getBodyWidth:nn,getBodyHeight:on,getScrollbarWidth:rn,isInvisibleScrollbar:an});function cn(e,t){return e.toString().padStart(t,"0")}function un(e,t){for(var i=[],n=e;n<=t;n++)i.push(n);return i}function dn(e){return"string"===typeof e&&(e=parseInt(e,10)),"number"===typeof e?Math.floor(e):null}function pn(e,t){for(var i="",n=0;n<t;n++)i+=String.fromCharCode(255&e),e>>>=8;return i}function hn(e,t,i){return"number"!==typeof e?"":fn(Math.round(100*e)/100,t,i)}function fn(e,t,i){return"number"!==typeof e?"":e.toString().replace(".",i).replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1".concat(t))}function gn(e){return null==e?null:e.reduce((function(e,t){return e+t}),0)}var vn=Object.freeze({__proto__:null,padStartWidthZeros:cn,createArrayOfNumbers:un,cleanNumber:dn,decToHex:pn,formatNumberTwoDecimalPlacesAndCommas:hn,formatNumberCommas:fn,sum:gn}),yn=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s};function mn(e,t,i){if(void 0===t&&(t=!0),void 0===i&&(i="-"),!e)return null;var n=[e.getFullYear(),e.getMonth()+1,e.getDate()].map((function(e){return cn(e,2)})).join(i);return t&&(n+=" "+[e.getHours(),e.getMinutes(),e.getSeconds()].map((function(e){return cn(e,2)})).join(":")),n}var Cn=function(e){if(e>3&&e<21)return"th";var t=e%10;switch(t){case 1:return"st";case 2:return"nd";case 3:return"rd"}return"th"};function bn(e,t){void 0===t&&(t="YYYY-MM-DD");var i=cn(e.getFullYear(),4),n=["January","February","March","April","May","June","July","August","September","October","November","December"],o=["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
11ay","Saturday"],r={YYYY:function(){return i.slice(i.length-4,i.length)},YY:function(){return i.slice(i.length-2,i.length)},Y:function(){return"".concat(e.getFullYear())},MMMM:function(){return n[e.getMonth()]},MMM:function(){return n[e.getMonth()].slice(0,3)},MM:function(){return cn(e.getMonth()+1,2)},Mo:function(){return"".concat(e.getMonth()+1).concat(Cn(e.getMonth()+1))},M:function(){return"".concat(e.getMonth()+1)},Do:function(){return"".concat(e.getDate()).concat(Cn(e.getDate()))},DD:function(){return cn(e.getDate(),2)},D:function(){return"".concat(e.getDate())},dddd:function(){return o[e.getDay()]},ddd:function(){return o[e.getDay()].slice(0,3)},dd:function(){return o[e.getDay()].slice(0,2)},do:function(){return"".concat(e.getDay()).concat(Cn(e.getDay()))},d:function(){return"".concat(e.getDay())}},s=new RegExp(Object.keys(r).join("|"),"g");return t.replace(s,(function(e){return e in r?r[e]():e}))}function wn(e){if(!e)return null;var t=yn(e.split(" "),2),i=t[0],n=t[1];if(!i)return null;var o=i.split("-").map((function(e){return parseInt(e,10)}));if(3!==o.filter((function(e){return!isNaN(e)})).length)return null;var r=yn(o,3),s=r[0],a=r[1],l=r[2],c=new Date(s,a-1,l);if(c.getFullYear()!==s||c.getMonth()!==a-1||c.getDate()!==l)return null;if(!n||"00:00:00"===n)return c;var u=yn(n.split(":").map((function(e){return parseInt(e,10)})),3),d=u[0],p=u[1],h=u[2];return d>=0&&d<24&&c.setHours(d),p>=0&&p<60&&c.setMinutes(p),h>=0&&h<60&&c.setSeconds(h),c}var Sn,En=Object.freeze({__proto__:null,serialiseDate:mn,dateToFormattedString:bn,parseDateTimeFromString:wn}),xn=function(e){var t="function"===typeof Symbol&&Symbol.iterator,i=t&&e[t],n=0;if(i)return i.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},On=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s};function Tn(e,t,i){var n=e.parentElement,o=n&&n.firstChild;while(o)t&&o.classList.toggle(t,o===e),i&&o.classList.toggle(i,o!==e),o=o.nextSibling}var Dn="[tabindex], input, select, button, textarea, [href]",Rn="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function An(e){var t=Element.prototype.matches||Element.prototype.msMatchesSelector,i="input, select, button, textarea",n=t.call(e,i),o=t.call(e,Rn),r=zn(e),s=n&&!o&&r;return s}function _n(e,t,i){void 0===i&&(i={});var n=i.skipAriaHidden;e.classList.toggle("ag-hidden",!t),n||bi(e,!t)}function Pn(e,t,i){void 0===i&&(i={});var n=i.skipAriaHidden;e.classList.toggle("ag-invisible",!t),n||bi(e,!t)}function Mn(e,t){var i="disabled",n=t?function(e){return e.setAttribute(i,"")}:function(e){return e.removeAttribute(i)};n(e),po(e.querySelectorAll("input"),(function(e){return n(e)}))}function kn(e,t,i){var n=0;while(e){if(e.classList.contains(t))return!0;if(e=e.parentElement,"number"==typeof i){if(++n>i)break}else if(e===i)break}return!1}function Nn(e){var t=window.getComputedStyle(e),i=t.height,n=t.width,o=t.borderTopWidth,r=t.borderRightWidth,s=t.borderBottomWidth,a=t.borderLeftWidth,l=t.paddingTop,c=t.paddingRight,u=t.paddingBottom,d=t.paddingLeft,p=t.marginTop,h=t.marginRight,f=t.marginBottom,g=t.marginLeft,v=t.boxSizing;return{height:parseFloat(i),width:parseFloat(n),borderTopWidth:parseFloat(o),borderRightWidth:parseFloat(r),borderBottomWidth:parseFloat(s),borderLeftWidth:parseFloat(a),paddingTop:parseFloat(l),paddingRight:parseFloat(c),paddingBottom:parseFloat(u),paddingLeft:parseFloat(d),marginTop:parseFloat(p),marginRight:parseFloat(h),marginBottom:parseFloat(f),marginLeft:parseFloat(g),boxSizing:v}}function Ln(e){var t=Nn(e);return"border-box"===t.boxSizing?t.height-t.paddingTop-t.paddingBottom:t.height}function In(e){var t=Nn(e);return"border-box"===t.boxSizing?t.width-t.paddingLeft-t.paddingRight:t.width}function Fn(e){var t=Nn(e),i=t.marginBottom+t.marginTop;return Math.ceil(e.offsetHeight+i)}function Gn(e){var t=Nn(e),i=t.marginLeft+t.marginRight;return Math.ceil(e.offsetWidth+i)}function Vn(e){var t=e.getBoundingClientRect(),i=Nn(e),n=i.borderTopWidth,o=i.borderLeftWidth,r=i.borderRightWidth,s=i.borderBottomWidth;
11return{top:t.top+(n||0),left:t.left+(o||0),right:t.right+(r||0),bottom:t.bottom+(s||0)}}function Bn(){if("boolean"===typeof Sn)return Sn;var 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">\n            <span style="display: inline-block; width: 1px"></span>\n            <span style="display: inline-block; width: 1px"></span>\n        </div>',document.body.appendChild(e),e.scrollLeft=1,Sn=0===Math.floor(e.scrollLeft),document.body.removeChild(e),Sn}function jn(e,t){var i=e.scrollLeft;return t&&(i=Math.abs(i),Xi()&&!Bn()&&(i=e.scrollWidth-e.clientWidth-i)),i}function Hn(e,t,i){i&&(Bn()?t*=-1:(Yi()||Xi())&&(t=e.scrollWidth-e.clientWidth-t)),e.scrollLeft=t}function Wn(e){while(e&&e.firstChild)e.removeChild(e.firstChild)}function Un(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function zn(e){var t=e;if(t.checkVisibility)return t.checkVisibility({checkVisibilityCSS:!0});var i=!e.offsetParent||"visible"!==window.getComputedStyle(e).visibility;return!i}function Kn(e){var t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function Yn(e,t){e.lastChild?e.insertAdjacentHTML("afterbegin",t):e.innerHTML=t}function qn(e){return e&&e.clientHeight?e.clientHeight:0}function Xn(e){return e&&e.clientWidth?e.clientWidth:0}function $n(e,t,i){if(!i||i.nextSibling!==t){var n=document.activeElement,o=t.contains(n);i?i.nextSibling?e.insertBefore(t,i.nextSibling):e.appendChild(t):e.firstChild&&e.firstChild!==t&&e.insertAdjacentElement("afterbegin",t),o&&n&&Qi()&&n.focus({preventScroll:!0})}}function Zn(e,t){for(var i=0;i<t.length;i++){var n=t[i],o=e.children[i];o!==n&&e.insertBefore(n,o)}}function Jn(e,t,i){i?i.insertAdjacentElement("afterend",t):e.firstChild?e.insertAdjacentElement("afterbegin",t):e.appendChild(t)}function Qn(e,t){var i,n;if(t)try{for(var o=xn(Object.entries(t)),r=o.next();!r.done;r=o.next()){var s=On(r.value,2),a=s[0],l=s[1];if(a&&a.length&&null!=l){var c=Ot(a),u=l.toString(),d=u.replace(/\s*!important/g,""),p=d.length!=u.length?"important":void 0;e.style.setProperty(c,d,p)}}}catch(h){i={error:h}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}}function eo(e){return e.clientWidth<e.scrollWidth}function to(e){return e.clientHeight<e.scrollHeight}function io(e,t){"flex"===t?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):no(e,t)}function no(e,t){t=so(t),e.style.width=t.toString(),e.style.maxWidth=t.toString(),e.style.minWidth=t.toString()}function oo(e,t){"flex"===t?(e.style.removeProperty("height"),e.style.removeProperty("minHeight"),e.style.removeProperty("maxHeight"),e.style.flex="1 1 auto"):ro(e,t)}function ro(e,t){t=so(t),e.style.height=t.toString(),e.style.maxHeight=t.toString(),e.style.minHeight=t.toString()}function so(e){return"number"===typeof e?"".concat(e,"px"):e}function ao(e){return e instanceof Node||e instanceof HTMLElement}function lo(e){if(null==e)return[];var t=[];return po(e,(function(e){return t.push(e)})),t}function co(e,t){if(e)for(var i=0;i<e.length;i++){var n=e[i];t(n.name,n.value)}}function uo(e,t,i){null==i?e.removeAttribute(t):e.setAttribute(t,i.toString())}function po(e,t){if(null!=e)for(var i=0;i<e.length;i++)t(e[i])}function ho(e,t){e.then((function(e){var i=e.getGui();null!=i&&("object"===typeof i?t.appendChild(i):t.innerHTML=i)}))}var fo=Object.freeze({__proto__:null,radioCssClass:Tn,FOCUSABLE_SELECTOR:Dn,FOCUSABLE_EXCLUDE:Rn,isFocusableFormField:An,setDisplayed:_n,setVisible:Pn,setDisabled:Mn,isElementChildOfClass:kn,getElementSize:Nn,getInnerHeight:Ln,getInnerWidth:In,getAbsoluteHeight:Fn,getAbsoluteWidth:Gn,getElementRectWithOffset:Vn,isRtlNegativeScroll:Bn,getScrollLeft:jn,setScrollLeft:Hn,clearElement:Wn,removeFromParent:Un,isVisible:zn,loadTemplate:Kn,appendHtml:Yn,offsetHeight:qn,offsetWidth:Xn,ensureDomOrder:$n,setDomChildOrder:Zn,insertWithDomOrder:Jn,addStylesToElement:Qn,isHorizontalScrollShowing:eo,isVerticalScrollShowing:to,setElementWidth:io,setFixedWidth:no,setElementHeight:oo,setFixedHeight:ro,formatSize:so,isNodeOrElement:ao,copyNodeList:lo,iterateNamedNodeMap:co,addOrRemoveAttribute:uo,nodeListForEach:po,bindCellRendererToHtmlElement:ho}),go=function(e){var t="function"===typeof Symbol&&Symbol.iterator,i=t&&e[t],n=0;if(i)return i.call(e);
11if(e&&"number"===typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function vo(e,t,i){var n={},o=e.filter((function(e){return!t.some((function(t){return t===e}))}));return o.length>0&&o.forEach((function(e){return n[e]=yo(e,i).values})),n}function yo(e,t,i,n){var o,r,s=t.map((function(t,i){return{value:t,relevance:mo(e.toLowerCase(),t.toLocaleLowerCase()),idx:i}}));if(s.sort((function(e,t){return t.relevance-e.relevance})),i&&(s=s.filter((function(e){return 0!==e.relevance}))),s.length>0&&n&&n>0){var a=s[0].relevance,l=a*n;s=s.filter((function(e){return l-e.relevance<0}))}var c=[],u=[];try{for(var d=go(s),p=d.next();!p.done;p=d.next()){var h=p.value;c.push(h.value),u.push(h.idx)}}catch(f){o={error:f}}finally{try{p&&!p.done&&(r=d.return)&&r.call(d)}finally{if(o)throw o.error}}return{values:c,indices:u}}function mo(e,t){for(var i=e.replace(/\s/g,""),n=t.replace(/\s/g,""),o=0,r=-1,s=0;s<i.length;s++){var a=n.indexOf(i[s],r+1);-1!==a&&(r=a,o+=100-100*r/1e4*100)}return o}var Co=Object.freeze({__proto__:null,fuzzyCheckStrings:vo,fuzzySuggestions:yo}),bo={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",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"};function wo(e,t,i){var n=So(e,t,i);if(n){var o=n.className;if("string"===typeof o&&o.indexOf("ag-icon")>-1||"object"===typeof o&&o["ag-icon"])return n}var r=document.createElement("span");return r.appendChild(n),r}function So(e,t,i,n){var o=null,r=i&&i.getColDef().icons;if(r&&(o=r[e]),t&&!o){var s=t.get("icons");s&&(o=s[e])}if(!o){var a=document.createElement("span"),l=bo[e];return l||(n?l=e:(console.warn("AG Grid: Did not find icon ".concat(e)),l="")),a.setAttribute("class","ag-icon ag-icon-".concat(l)),a.setAttribute("unselectable","on"),si(a,"presentation"),a}var c=void 0;if("function"===typeof o)c=o();else{if("string"!==typeof o)throw new Error("icon from grid options needs to be a string or a function");c=o}return"string"===typeof c?Kn(c):ao(c)?c:void console.warn("AG Grid: iconRenderer should return back a string or a dom object")}var Eo=Object.freeze({__proto__:null,iconNameClassMap:bo,createIcon:wo,createIconNoSpan:So}),xo=function(){function e(){}return e.BACKSPACE="Backspace",e.TAB="Tab",e.ENTER="Enter",e.ESCAPE="Escape",e.SPACE=" ",e.LEFT="ArrowLeft",e.UP="ArrowUp",e.RIGHT="ArrowRight",e.DOWN="ArrowDown",e.DELETE="Delete",e.F2="F2",e.PAGE_UP="PageUp",e.PAGE_DOWN="PageDown",e.PAGE_HOME="Home",e.PAGE_END="End",e.A="KeyA",e.C="KeyC",e.D="KeyD",e.V="KeyV",e.X="KeyX",e.Y="KeyY",e.Z="KeyZ",e}(),Oo=65,To=67,Do=86,Ro=68,Ao=90,_o=89;function Po(e){if(e.altKey||e.ctrlKey||e.metaKey)return!1;
11var t=1===e.key.length;return t}function Mo(e,t,i,n,o){var r=n?n.getColDef().suppressKeyboardEvent:void 0;if(!r)return!1;var s={event:t,editing:o,column:n,api:e.api,node:i,data:i.data,colDef:n.getColDef(),context:e.context,columnApi:e.columnApi};if(r){var a=r(s);if(a)return!0}return!1}function ko(e,t,i,n){var r=n.getDefinition(),s=r&&r.suppressHeaderKeyboardEvent;if(!o(s))return!1;var a={api:e.api,columnApi:e.columnApi,context:e.context,colDef:r,column:n,headerRowIndex:i,event:t};return!!s(a)}function No(e){var t,i=e.keyCode;switch(i){case Oo:t=xo.A;break;case To:t=xo.C;break;case Do:t=xo.V;break;case Ro:t=xo.D;break;case Ao:t=xo.Z;break;case _o:t=xo.Y;break;default:t=e.code}return t}function Lo(e,t){return void 0===t&&(t=!1),e===xo.DELETE||!t&&e===xo.BACKSPACE&&Zi()}var Io=Object.freeze({__proto__:null,isEventFromPrintableCharacter:Po,isUserSuppressingKeyboardEvent:Mo,isUserSuppressingHeaderKeyboardEvent:ko,normaliseQwertyAzerty:No,isDeleteKey:Lo});function Fo(e,t,i){if(0===i)return!1;var n=Math.abs(e.clientX-t.clientX),o=Math.abs(e.clientY-t.clientY);return Math.max(n,o)<=i}var Go=Object.freeze({__proto__:null,areEventsNear:Fo});function Vo(e,t){if(!e)return!1;for(var i,n,o=function(e,i){var n=t[e.id],o=t[i.id],r=void 0!==n,s=void 0!==o,a=r&&s,l=!r&&!s;return a?n-o:l?e.__objectId-i.__objectId:r?1:-1},r=!1,s=0;s<e.length-1;s++)if(i=e[s],n=e[s+1],o(i,n)>0){r=!0;break}return!!r&&(e.sort(o),!0)}var Bo=Object.freeze({__proto__:null,sortRowNodesByOrder:Vo});function jo(e){var t=new Set;return e.forEach((function(e){return t.add(e)})),t}var Ho,Wo=Object.freeze({__proto__:null,convertToSet:jo}),Uo=function(){return Uo=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Uo.apply(this,arguments)},zo=Uo(Uo(Uo(Uo(Uo(Uo(Uo(Uo(Uo(Uo(Uo(Uo(Uo(Uo(Uo(Uo(Uo(Uo({},Ki),Ke),ln),En),fo),ot),ee),Co),f),Eo),Io),_t),Go),vn),L),Bo),Wo),Tt),Ko=zo,Yo=function(){function e(e,t){void 0===e&&(e=0),void 0===t&&(t=1),this.nextValue=e,this.step=t}return e.prototype.next=function(){var e=this.nextValue;return this.nextValue+=this.step,e},e.prototype.peek=function(){return this.nextValue},e.prototype.skip=function(e){this.nextValue+=e},e}();(function(e){e[e["IN_PROGRESS"]=0]="IN_PROGRESS",e[e["RESOLVED"]=1]="RESOLVED"})(Ho||(Ho={}));var qo,Xo,$o=function(){function e(e){var t=this;this.status=Ho.IN_PROGRESS,this.resolution=null,this.waiters=[],e((function(e){return t.onDone(e)}),(function(e){return t.onReject(e)}))}return e.all=function(t){return new e((function(e){var i=t.length,n=new Array(i);t.forEach((function(t,o){t.then((function(t){n[o]=t,i--,0===i&&e(n)}))}))}))},e.resolve=function(t){return void 0===t&&(t=null),new e((function(e){return e(t)}))},e.prototype.then=function(t){var i=this;return new e((function(e){i.status===Ho.RESOLVED?e(t(i.resolution)):i.waiters.push((function(i){return e(t(i))}))}))},e.prototype.resolveNow=function(e,t){return this.status===Ho.RESOLVED?t(this.resolution):e},e.prototype.onDone=function(e){this.status=Ho.RESOLVED,this.resolution=e,this.waiters.forEach((function(t){return t(e)}))},e.prototype.onReject=function(e){console.warn("TBI")},e}(),Zo=(function(){function e(){this.timestamp=(new Date).getTime()}e.prototype.print=function(e){var t=(new Date).getTime()-this.timestamp;console.info("".concat(e," = ").concat(t)),this.timestamp=(new Date).getTime()}}(),function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}()),Jo=function(){return Jo=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Jo.apply(this,arguments)},Qo=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};(function(e){e[e["NOTHING"]=0]="NOTHING",e[e["WAITING_TO_SHOW"]=1]="WAITING_TO_SHOW",e[e["SHOWING"]=2]="SHOWING"})(qo||(qo={})),function(e){e[e["HOVER"]=0]="HOVER",e[e["FOCUS"]=1]="FOCUS"}(Xo||(Xo={}));var er=function(e){function t(t,i,n){var o=e.call(this)||this;return o.parentComp=t,o.tooltipShowDelayOverride=i,o.tooltipHideDelayOverride=n,o.SHOW_QUICK_TOOLTIP_DIFF=1e3,o.FADE_OUT_TOOLTIP_TIMEOUT=1e3,o.INTERACTIVE_HIDE_DELAY=100,o.interactionEnabled=!1,o.isInteractingWithTooltip=!1,o.state=qo.NOTHING,o.tooltipInstanceCount=0,o.tooltipMouseTrack=!1,o}return Zo(t,e),t.prototype.postConstruct=function(){this.gridOptionsService.get("tooltipInteraction")&&(this.interactionEnabled=!0),this.tooltipTrigger=this.getTooltipTrigger(),this.tooltipMouseTrack=this.gridOptionsService.get("tooltipMouseTrack");var e=this.parentComp.getGui();this.tooltipTrigger===Xo.HOVER&&(this.addManagedListener(e,"mouseenter",this.onMouseEnter.bind(this)),this.addManagedListener(e,"mouseleave",this.onMouseLeave.bind(this))),this.tooltipTrigger===Xo.FOCUS&&(this.addManagedListener(e,"focusin",this.onFocusIn.bind(this)),this.addManagedListener(e,"focusout",this.onFocusOut.bind(this))),this.addManagedListener(e,"mousemove",this.onMouseMove.bind(this)),this.interactionEnabled||(this.addManagedListener(e,"mousedown",this.onMouseDown.bind(this)),this.addManagedListener(e,"keydown",this.onKeyDown.bind(this)))},t.prototype.getGridOptionsTooltipDelay=function(e){var t=this.gridOptionsService.get(e);return t<0&&G("".concat(e," should not be lower than 0")),Math.max(200,t)},t.prototype.getTooltipDelay=function(e){var t,i;return"show"===e?null!==(t=this.tooltipShowDelayOverride)&&void 0!==t?t:this.getGridOptionsTooltipDelay("tooltipShowDelay"):null!==(i=this.tooltipHideDelayOverride)&&void 0!==i?i:this.getGridOptionsTooltipDelay("tooltipHideDelay")},t.prototype.destroy=function(){this.setToDoNothing(),e.prototype.destroy.call(this)},t.prototype.getTooltipTrigger=function(){var e=this.gridOptionsService.get("tooltipTrigger");return e&&"hover"!==e?Xo.FOCUS:Xo.HOVER},t.prototype.onMouseEnter=function(e){var i=this;this.interactionEnabled&&this.interactiveTooltipTimeoutId&&(this.unlockService(),this.startHideTimeout()),Ji()||(t.isLocked?this.showTooltipTimeoutId=window.setTimeout((function(){i.prepareToShowTooltip(e)}),this.INTERACTIVE_HIDE_DELAY):this.prepareToShowTooltip(e))},t.prototype.onMouseMove=function(e){this.lastMouseEvent&&(this.lastMouseEvent=e),this.tooltipMouseTrack&&this.state===qo.SHOWING&&this.tooltipComp&&this.positionTooltip()},t.prototype.onMouseDown=function(){this.setToDoNothing()},t.prototype.onMouseLeave=function(){this.interactionEnabled?this.lockService():this.setToDoNothing()},t.prototype.onFocusIn=function(){this.prepareToShowTooltip()},t.prototype.onFocusOut=function(e){var t,i=e.relatedTarget,n=this.parentComp.getGui(),o=null===(t=this.tooltipComp)||void 0===t?void 0:t.getGui();this.isInteractingWithTooltip||n.contains(i)||this.interactionEnabled&&(null===o||void 0===o?void 0:o.contains(i))||this.setToDoNothing()},t.prototype.onKeyDown=function(){this.setToDoNothing()},t.prototype.prepareToShowTooltip=function(e){if(this.state!=qo.NOTHING||t.isLocked)return!1;var i=0;return e&&(i=this.isLastTooltipHiddenRecently()?200:this.getTooltipDelay("show")),this.lastMouseEvent=e||null,this.showTooltipTimeoutId=window.setTimeout(this.showTooltip.bind(this),i),this.state=qo.WAITING_TO_SHOW,!0},t.prototype.isLastTooltipHiddenRecently=function(){var e=(new Date).getTime(),i=t.lastTooltipHideTime;return e-i<this.SHOW_QUICK_TOOLTIP_DIFF},t.prototype.setToDoNothing=function(){this.state===qo.SHOWING&&this.hideTooltip(),this.onBodyScrollEventCallback&&(this.onBodyScrollEventCallback(),this.onBodyScrollEventCallback=void 0),this.onColumnMovedEventCallback&&(this.onColumnMovedEventCallback(),this.onColumnMovedEventCallback=void 0),this.clearTimeouts(),this.state=qo.NOTHING,this.lastMouseEvent=null},t.prototype.showTooltip=function(){var e=Jo({},this.parentComp.getTooltipParams());if(o(e.value)){this.state=qo.SHOWING,this.tooltipInstanceCount++;var t=this.newTooltipComponentCallback.bind(this,this.tooltipInstanceCount),i=this.userComponentFactory.getTooltipCompDetail
11s(e);i.newAgStackInstance().then(t)}else this.setToDoNothing()},t.prototype.hideTooltip=function(e){if(e||!this.isInteractingWithTooltip){this.tooltipComp&&(this.destroyTooltipComp(),t.lastTooltipHideTime=(new Date).getTime());var i={type:ht.EVENT_TOOLTIP_HIDE,parentGui:this.parentComp.getGui()};this.eventService.dispatchEvent(i),this.state=qo.NOTHING}},t.prototype.newTooltipComponentCallback=function(e,t){var i=this.state!==qo.SHOWING||this.tooltipInstanceCount!==e;if(i)this.getContext().destroyBean(t);else{var n=t.getGui();this.tooltipComp=t,n.classList.contains("ag-tooltip")||n.classList.add("ag-tooltip-custom"),this.tooltipTrigger===Xo.HOVER&&n.classList.add("ag-tooltip-animate"),this.interactionEnabled&&n.classList.add("ag-tooltip-interactive");var o=this.localeService.getLocaleTextFunc(),r=this.popupService.addPopup({eChild:n,ariaLabel:o("ariaLabelTooltip","Tooltip")});r&&(this.tooltipPopupDestroyFunc=r.hideFunc),this.positionTooltip(),this.tooltipTrigger===Xo.FOCUS&&(this.onBodyScrollEventCallback=this.addManagedListener(this.eventService,ht.EVENT_BODY_SCROLL,this.setToDoNothing.bind(this)),this.onColumnMovedEventCallback=this.addManagedListener(this.eventService,ht.EVENT_COLUMN_MOVED,this.setToDoNothing.bind(this))),this.interactionEnabled&&(this.tooltipTrigger===Xo.HOVER?(this.tooltipMouseEnterListener=this.addManagedListener(n,"mouseenter",this.onTooltipMouseEnter.bind(this))||null,this.tooltipMouseLeaveListener=this.addManagedListener(n,"mouseleave",this.onTooltipMouseLeave.bind(this))||null):(this.tooltipFocusInListener=this.addManagedListener(n,"focusin",this.onTooltipFocusIn.bind(this))||null,this.tooltipFocusOutListener=this.addManagedListener(n,"focusout",this.onTooltipFocusOut.bind(this))||null));var s={type:ht.EVENT_TOOLTIP_SHOW,tooltipGui:n,parentGui:this.parentComp.getGui()};this.eventService.dispatchEvent(s),this.startHideTimeout()}},t.prototype.onTooltipMouseEnter=function(){this.isInteractingWithTooltip=!0,this.unlockService()},t.prototype.onTooltipMouseLeave=function(){this.isInteractingWithTooltip=!1,this.lockService()},t.prototype.onTooltipFocusIn=function(){this.isInteractingWithTooltip=!0},t.prototype.onTooltipFocusOut=function(e){var t,i=this.parentComp.getGui(),n=null===(t=this.tooltipComp)||void 0===t?void 0:t.getGui(),o=e.relatedTarget;(null===n||void 0===n?void 0:n.contains(o))||(this.isInteractingWithTooltip=!1,i.contains(o)?this.startHideTimeout():this.hideTooltip())},t.prototype.positionTooltip=function(){var e={type:"tooltip",ePopup:this.tooltipComp.getGui(),nudgeY:18,skipObserver:this.tooltipMouseTrack};this.lastMouseEvent?this.popupService.positionPopupUnderMouseEvent(Jo(Jo({},e),{mouseEvent:this.lastMouseEvent})):this.popupService.positionPopupByComponent(Jo(Jo({},e),{eventSource:this.parentComp.getGui(),position:"under",keepWithinBounds:!0,nudgeY:5}))},t.prototype.destroyTooltipComp=function(){var e=this;this.tooltipComp.getGui().classList.add("ag-tooltip-hiding");var t=this.tooltipPopupDestroyFunc,i=this.tooltipComp,n=this.tooltipTrigger===Xo.HOVER?this.FADE_OUT_TOOLTIP_TIMEOUT:0;window.setTimeout((function(){t(),e.getContext().destroyBean(i)}),n),this.clearTooltipListeners(),this.tooltipPopupDestroyFunc=void 0,this.tooltipComp=void 0},t.prototype.clearTooltipListeners=function(){[this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener,this.tooltipFocusInListener,this.tooltipFocusOutListener].forEach((function(e){e&&e()})),this.tooltipMouseEnterListener=this.tooltipMouseLeaveListener=this.tooltipFocusInListener=this.tooltipFocusOutListener=null},t.prototype.lockService=function(){var e=this;t.isLocked=!0,this.interactiveTooltipTimeoutId=window.setTimeout((function(){e.unlockService(),e.setToDoNothing()}),this.INTERACTIVE_HIDE_DELAY)},t.prototype.unlockService=function(){t.isLocked=!1,this.clearInteractiveTimeout()},t.prototype.startHideTimeout=function(){this.clearHideTimeout(),this.hideTooltipTimeoutId=window.setTimeout(this.hideTooltip.bind(this),this.getTooltipDelay("hide"))},t.prototype.clearShowTimeout=function(){this.showTooltipTimeoutId&&(window.clearTimeout(this.showTooltipTimeoutId),this.showTooltipTimeoutId=void 0)},t.prototype.clearHideTimeout=function(){this.hideTooltipTimeoutId&&(window.clearTimeout(this.hideTooltipTimeoutId),this.hideTooltipTimeoutId=void 0)},t.prototype.clearInteractiveTimeout=function(){this.interactiveTooltipTimeoutId&&(window.clearTimeout(this.interactiveTooltipTimeoutId),this.interactiveTooltipTimeoutId=void 0)},t.prototype.clearTimeouts=function(){this.clearShowTimeout(),this.clearHideTimeout(),this.clearInteractiveTimeout()},t.isLocked=!1,Qo([de("popupService")],t.prototype,"popupService",void 0),Qo([de("userComponentFactory")],t.prototype,"userComponentFactory",void 0),Qo([le],t.prototype,"postConstruct",null),t}(st),tr=function(){function e(e){this.cssClassStates={},this.getGui=e}return e.prototype.addCssClass=function(e){var t=this,i=(e||"").split(" ");if(i.length>1)i.forEach((function(e){return t.addCssClass(e)}));else{var n=!0!==this.cssClassStates[e];if(n&&e.length){var o=this.getGui();o&&o.classList.add(e),this.cssClassStates[e]=!0}}},e.prototype.removeCssClass=function(e){var t=this,i=(e||"").split(" ");if(i.length>1)i.forEach((function(e){return t.removeCssClass(e)}));else{var n=!1!==this.cssClassStates[e];if(n&&e.length){var o=this.getGui();o&&o.classList.remove(e),this.cssClassStates[e]=!1}
11}},e.prototype.containsCssClass=function(e){var t=this.getGui();return!!t&&t.classList.contains(e)},e.prototype.addOrRemoveCssClass=function(e,t){var i=this;if(e){if(e.indexOf(" ")>=0){var n=(e||"").split(" ");if(n.length>1)return void n.forEach((function(e){return i.addOrRemoveCssClass(e,t)}))}var o=this.cssClassStates[e]!==t;if(o&&e.length){var r=this.getGui();r&&r.classList.toggle(e,t),this.cssClassStates[e]=t}}},e}(),ir=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),nr=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},or=new Yo,rr=function(e){function t(t){var i=e.call(this)||this;return i.displayed=!0,i.visible=!0,i.compId=or.next(),i.cssClassManager=new tr((function(){return i.eGui})),t&&i.setTemplate(t),i}return ir(t,e),t.prototype.preConstructOnComponent=function(){this.usingBrowserTooltips=this.gridOptionsService.get("enableBrowserTooltips")},t.prototype.getCompId=function(){return this.compId},t.prototype.getTooltipParams=function(){return{value:this.tooltipText,location:"UNKNOWN"}},t.prototype.setTooltip=function(e,t,i){var n=this,o=function(){n.usingBrowserTooltips?n.getGui().removeAttribute("title"):n.tooltipFeature=n.destroyBean(n.tooltipFeature)},r=function(){n.usingBrowserTooltips?n.getGui().setAttribute("title",n.tooltipText):n.tooltipFeature=n.createBean(new er(n,t,i))};this.tooltipText!=e&&(this.tooltipText&&o(),null!=e&&(this.tooltipText=e,this.tooltipText&&r()))},t.prototype.createChildComponentsFromTags=function(e,t){var i=this,n=lo(e.childNodes);n.forEach((function(n){if(n instanceof HTMLElement){var o=i.createComponentFromElement(n,(function(e){var t=e.getGui();t&&i.copyAttributesFromNode(n,e.getGui())}),t);if(o){if(o.addItems&&n.children.length){i.createChildComponentsFromTags(n,t);var r=Array.prototype.slice.call(n.children);o.addItems(r)}i.swapComponentForNode(o,e,n)}else n.childNodes&&i.createChildComponentsFromTags(n,t)}}))},t.prototype.createComponentFromElement=function(e,i,n){var o=e.nodeName,r=n?n[e.getAttribute("ref")]:void 0,s=this.agStackComponentsRegistry.getComponentClass(o);if(s){t.elementGettingCreated=e;var a=new s(r);return a.setParentComponent(this),this.createBean(a,null,i),a}return null},t.prototype.copyAttributesFromNode=function(e,t){co(e.attributes,(function(e,i){return t.setAttribute(e,i)}))},t.prototype.swapComponentForNode=function(e,t,i){var n=e.getGui();t.replaceChild(n,i),t.insertBefore(document.createComment(i.nodeName),n),this.addDestroyFunc(this.destroyBean.bind(this,e)),this.swapInComponentForQuerySelectors(e,i)},t.prototype.swapInComponentForQuerySelectors=function(e,t){var i=this;this.iterateOverQuerySelectors((function(n){i[n.attributeName]===t&&(i[n.attributeName]=e)}))},t.prototype.iterateOverQuerySelectors=function(e){var t=Object.getPrototypeOf(this);while(null!=t){var i=t.__agComponentMetaData,n=B(t.constructor);i&&i[n]&&i[n].querySelectors&&i[n].querySelectors.forEach((function(t){return e(t)})),t=Object.getPrototypeOf(t)}},t.prototype.activateTabIndex=function(e){var t=this.gridOptionsService.get("tabIndex");e||(e=[]),e.length||e.push(this.getGui()),e.forEach((function(e){return e.setAttribute("tabindex",t.toString())}))},t.prototype.setTemplate=function(e,t){var i=Kn(e);this.setTemplateFromElement(i,t)},t.prototype.setTemplateFromElement=function(e,t){this.eGui=e,this.eGui.__agComponent=this,this.wireQuerySelectors(),this.getContext()&&this.createChildComponentsFromTags(this.getGui(),t)},t.prototype.createChildComponentsPreConstruct=function(){this.getGui()&&this.createChildComponentsFromTags(this.getGui())},t.prototype.wireQuerySelectors=function(){var e=this;if(this.eGui){var t=this;this.iterateOverQuerySelectors((function(i){var n=function(e){return t[i.attributeName]=e},o=i.refSelector&&e.getAttribute("ref")===i.refSelector;if(o)n(e.eGui);else{var r=e.eGui.querySelector(i.querySelector);r&&n(r.__agComponent||r)}}))}},t.prototype.getGui=function(){return this.eGui},t.prototype.getFocusableElement=function(){return this.eGui},t.prototype.getAriaElement=function(){return this.getFocusableElement()},t.prototype.setParentComponent=function(e){this.parentComponent=e},t.prototype.getParentComponent=function(){return this.parentComponent},t.prototype.setGui=function(e){this.eGui=e},t.prototype.queryForHtmlElement=function(e){return this.eGui.querySelector(e)},t.prototype.queryForHtmlInputElement=function(e){return this.eGui.querySelector(e)},t.prototype.appendChild=function(e,t){if(null!=e)if(t||(t=this.eGui),ao(e))t.appendChild(e);else{var i=e;t.appendChild(i.getGui())}},t.prototype.isDisplayed=function(){return this.displayed},t.prototype.setVisible=function(e,t){if(void 0===t&&(t={}),e!==this.visible){this.visible=e;var i=t.skipAriaHidden;Pn(this.eGui,e,{skipAriaHidden:i})}},t.prototype.setDisplayed=function(e,i){if(void 0===i&&(i={}),e!==this.displayed){this.displayed=e;var n=i.skipAriaHidden;_n(this.eGui,e,{skipAriaHidden:n});var o={type:t.EVENT_DISPLAYED_CHANGED,visible:this.displayed};this.dispatchEvent(o)}},t.prototype.destroy=function(){this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature)),this.parentComponent&&(this.parentComponent=void 0);var t=this.eGui;t&&t.__agComponent&&(t.__agComponent=void 0),e.prototype.destroy.call(this)},t.prototype.addGuiEventListener=function(e,t,i){var n=this;this.eGui.addEventListener(e,t,i),this.addDestroyFunc((function(){return n.eGui.removeEventListener(e,t)}))},t.prototype.addCssClass=function(e){this.cssClassManager.addCssClass(e)},t.prototype.removeCssClass=function(e){this.cssClassManager.removeCssClass(e)},t.prototype.containsCssClass=function(e){return this.cssClassManager.containsCssClass(e)},t.prototype.addOrRemoveCssClass=function(e,t){this.cssClassManager.addOrRemoveCssClass(e,t)},t.prototype.getAttribute=function(e){var t=this.eGui;return t?t.getAttribute(e):null},t.prototype.getRefElement=function(e){return this.queryForHtmlElement('[ref="'.concat(e,'"]'))},t.EVENT_DISPLAYED_CHANGED="displayedChanged",nr([de("agStackComponentsRegistry")],t.prototype,"agStackComponentsRegistry",void 0),nr([ae],t.prototype,"preConstructOnComponent",null),nr([ae],t.prototype,"createChildComponentsPreConstruct",null),t}(st);function sr(e){return ar.bind(this,"[ref=".concat(e,"]"),e)}function ar(e,t,i,n,o){null!==e?"number"!==typeof o?lr(i,"querySelectors",{attributeName:n,querySelector:e,refSelector:t}):console.error("AG Grid: QuerySelector should be on an attribute"):console.error("AG Grid: QuerySelector selector should not be null")}function lr(e,t,i){var n=cr(e,B(e.constructor));n[t]||(n[t]=[]),n[t].push(i)}function cr(e,t){return e.__agComponentMetaData||(e.__agComponentMetaData={}),e.__agComponentMetaData[t]||(e.__agComponentMetaData[t]={}),e.__agComponentMetaData[t]}var ur=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),dr=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},pr=function(e){function t(){return e.call(this,'\n            <div class="ag-floating-filter-input" role="presentation">\n                <ag-input-text-field ref="eFloatingFilterText"></ag-input-text-field>\n            </div>')||this}return ur(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this)},t.prototype.init=function(e){this.params=e;var t=this.columnModel.getDisplayNameForColumn(e.column,"header",!0),i=this.localeService.getLocaleTextFunc();this.eFloatingFilterText.setDisabled(!0).setInputAriaLabel("".concat(t," ").concat(i("ariaFilterInput","Filter Input")))},t.prototype.onParentModelChanged=function(e){var t=this;e?this.params.parentFilterInstance((function(i){if(i.getModelAsString){var n=i.getModelAsString(e);t.eFloatingFilterText.setValue(n)}})):this.eFloatingFilterText.setValue("")},t.prototype.onParamsUpdated=function(e){this.init(e)},dr([sr("eFloatingFilterText")],t.prototype,"eFloatingFilterText",void 0),dr([de("columnModel")],t.prototype,"columnModel",void 0),t}(rr),hr=function(){function e(e,t,i,n){var o=this;this.alive=!0,this.context=e,this.eParent=n;
11var r=t.getDateCompDetails(i),s=r.newAgStackInstance();s.then((function(t){o.alive?(o.dateComp=t,t&&(n.appendChild(t.getGui()),t.afterGuiAttached&&t.afterGuiAttached(),o.tempValue&&t.setDate(o.tempValue),null!=o.disabled&&o.setDateCompDisabled(o.disabled))):e.destroyBean(t)}))}return e.prototype.destroy=function(){this.alive=!1,this.dateComp=this.context.destroyBean(this.dateComp)},e.prototype.getDate=function(){return this.dateComp?this.dateComp.getDate():this.tempValue},e.prototype.setDate=function(e){this.dateComp?this.dateComp.setDate(e):this.tempValue=e},e.prototype.setDisabled=function(e){this.dateComp?this.setDateCompDisabled(e):this.disabled=e},e.prototype.setDisplayed=function(e){_n(this.eParent,e)},e.prototype.setInputPlaceholder=function(e){this.dateComp&&this.dateComp.setInputPlaceholder&&this.dateComp.setInputPlaceholder(e)},e.prototype.setInputAriaLabel=function(e){this.dateComp&&this.dateComp.setInputAriaLabel&&this.dateComp.setInputAriaLabel(e)},e.prototype.afterGuiAttached=function(e){this.dateComp&&"function"===typeof this.dateComp.afterGuiAttached&&this.dateComp.afterGuiAttached(e)},e.prototype.updateParams=function(e){var t;(null===(t=this.dateComp)||void 0===t?void 0:t.onParamsUpdated)&&"function"===typeof this.dateComp.onParamsUpdated&&this.dateComp.onParamsUpdated(e)},e.prototype.setDateCompDisabled=function(e){null!=this.dateComp&&null!=this.dateComp.setDisabled&&this.dateComp.setDisabled(e)},e}(),fr=function(){function e(){this.customFilterOptions={}}return e.prototype.init=function(e,t){this.filterOptions=e.filterOptions||t,this.mapCustomOptions(),this.selectDefaultItem(e)},e.prototype.getFilterOptions=function(){return this.filterOptions},e.prototype.mapCustomOptions=function(){var e=this;this.filterOptions&&this.filterOptions.forEach((function(t){if("string"!==typeof t){var i=[["displayKey"],["displayName"],["predicate","test"]],n=function(e){return!!e.some((function(e){return null!=t[e]}))||(console.warn("AG Grid: ignoring FilterOptionDef as it doesn't contain one of '".concat(e,"'")),!1)};i.every(n)?e.customFilterOptions[t.displayKey]=t:e.filterOptions=e.filterOptions.filter((function(e){return e===t}))||[]}}))},e.prototype.selectDefaultItem=function(e){if(e.defaultOption)this.defaultOption=e.defaultOption;else if(this.filterOptions.length>=1){var t=this.filterOptions[0];"string"===typeof t?this.defaultOption=t:t.displayKey?this.defaultOption=t.displayKey:console.warn("AG Grid: invalid FilterOptionDef supplied as it doesn't contain a 'displayKey'")}else console.warn("AG Grid: no filter options for filter")},e.prototype.getDefaultOption=function(){return this.defaultOption},e.prototype.getCustomOption=function(e){return this.customFilterOptions[e]},e}(),gr={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"},vr=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),yr=function(){return yr=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},yr.apply(this,arguments)},mr=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Cr=function(e){function t(t,i){void 0===i&&(i={});var n=e.call(this)||this;return n.eFocusableElement=t,n.callbacks=i,n.callbacks=yr({shouldStopEventPropagation:function(){return!1},onTabKeyDown:function(e){if(!e.defaultPrevented){var t=n.focusService.findNextFocusableElement(n.eFocusableElement,!1,e.shiftKey);t&&(t.focus(),e.preventDefault())}}},i),n}return vr(t,e),t.prototype.postConstruct=function(){this.eFocusableElement.classList.add(t.FOCUS_MANAGED_CLASS),this.addKeyDownListeners(this.eFocusableElement),this.callbacks.onFocusIn&&this.addManagedListener(this.eFocusableElement,"focusin",this.callbacks.onFocusIn),this.callbacks.onFocusOut&&this.addManagedListener(this.eFocusableElement,"focusout",this.callbacks.onFocusOut)},t.prototype.addKeyDownListeners=function(e){var t=this;this.addManagedListener(e,"keydown",(function(e){e.defaultPrevented||Ze(e)||(t.callbacks.shouldStopEventPropagation(e)?$e(e):e.key===xo.TAB?t.callbacks.onTabKeyDown(e):t.callbacks.handleKeyDown&&t.callbacks.handleKeyDown(e))}))},t.FOCUS_MANAGED_CLASS="ag-focus-managed",mr([de("focusService")],t.prototype,"focusService",void 0),mr([le],t.prototype,"postConstruct",null),t}(st),br=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),wr=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Sr="ag-resizer-wrapper",Er='<div class="'.concat(Sr,'">\n        <div ref="eTopLeftResizer" class="ag-resizer ag-resizer-topLeft"></div>\n        <div ref="eTopResizer" class="ag-resizer ag-resizer-top"></div>\n        <div ref="eTopRightResizer" class="ag-resizer ag-resizer-topRight"></div>\n        <div ref="eRightResizer" class="ag-resizer ag-resizer-right"></div>\n        <div ref="eBottomRightResizer" class="ag-resizer ag-resizer-bottomRight"></div>\n        <div ref="eBottomResizer" class="ag-resizer ag-resizer-bottom"></div>\n        <div ref="eBottomLeftResizer" class="ag-resizer ag-resizer-bottomLeft"></div>\n        <div ref="eLeftResizer" class="ag-resizer ag-resizer-left"></div>\n    </div>'),xr=function(e){function t(t,i){var n=e.call(this)||this;return n.element=t,n.dragStartPosition={x:0,y:0},n.position={x:0,y:0}
11,n.lastSize={width:-1,height:-1},n.positioned=!1,n.resizersAdded=!1,n.resizeListeners=[],n.boundaryEl=null,n.isResizing=!1,n.isMoving=!1,n.resizable={},n.movable=!1,n.currentResizer=null,n.config=Object.assign({},{popup:!1},i),n}return br(t,e),t.prototype.center=function(){var e=this.offsetParent,t=e.clientHeight,i=e.clientWidth,n=i/2-this.getWidth()/2,o=t/2-this.getHeight()/2;this.offsetElement(n,o)},t.prototype.initialisePosition=function(){if(!this.positioned){var e=this.config,t=e.centered,i=e.forcePopupParentAsOffsetParent,n=e.minWidth,o=e.width,r=e.minHeight,s=e.height,a=e.x,l=e.y;this.offsetParent||this.setOffsetParent();var c=0,u=0,d=zn(this.element);if(d){var p=this.findBoundaryElement(),h=window.getComputedStyle(p);if(null!=h.minWidth){var f=p.offsetWidth-this.element.offsetWidth;u=parseInt(h.minWidth,10)-f}if(null!=h.minHeight){var g=p.offsetHeight-this.element.offsetHeight;c=parseInt(h.minHeight,10)-g}}if(this.minHeight=r||c,this.minWidth=n||u,o&&this.setWidth(o),s&&this.setHeight(s),o&&s||this.refreshSize(),t)this.center();else if(a||l)this.offsetElement(a,l);else if(d&&i){p=this.boundaryEl;var v=!0;if(p||(p=this.findBoundaryElement(),v=!1),p){var y=parseFloat(p.style.top),m=parseFloat(p.style.left);v?this.offsetElement(isNaN(m)?0:m,isNaN(y)?0:y):this.setPosition(m,y)}}this.positioned=!!this.offsetParent}},t.prototype.isPositioned=function(){return this.positioned},t.prototype.getPosition=function(){return this.position},t.prototype.setMovable=function(e,t){if(this.config.popup&&e!==this.movable){this.movable=e;var 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)}},t.prototype.setResizable=function(e){var t=this;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((function(i){var n=e,o=!!n[i],r=t.getResizerElement(i),s={dragStartPixels:0,eElement:r,onDragStart:function(e){return t.onResizeStart(e,i)},onDragging:t.onResize.bind(t),onDragStop:function(e){return t.onResizeEnd(e,i)}};(o||!t.isAlive()&&!o)&&(o?(t.dragService.addDragSource(s),t.resizeListeners.push(s),r.style.pointerEvents="all"):r.style.pointerEvents="none",t.resizable[i]=o)}))},t.prototype.removeSizeFromEl=function(){this.element.style.removeProperty("height"),this.element.style.removeProperty("width"),this.element.style.removeProperty("flex")},t.prototype.restoreLastSize=function(){this.element.style.flex="0 0 auto";var e=this.lastSize,t=e.height,i=e.width;-1!==i&&(this.element.style.width="".concat(i,"px")),-1!==t&&(this.element.style.height="".concat(t,"px"))},t.prototype.getHeight=function(){return this.element.offsetHeight},t.prototype.setHeight=function(e){var t=this.config.popup,i=this.element,n=!1;if("string"===typeof e&&-1!==e.indexOf("%"))ro(i,e),e=Fn(i),n=!0;else if(e=Math.max(this.minHeight,e),this.positioned){var o=this.getAvailableHeight();o&&e>o&&(e=o)}this.getHeight()!==e&&(n?(i.style.maxHeight="unset",i.style.minHeight="unset"):t?ro(i,e):(i.style.height="".concat(e,"px"),i.style.flex="0 0 auto",this.lastSize.height="number"===typeof e?e:parseFloat(e)))},t.prototype.getAvailableHeight=function(){var e=this.config,t=e.popup,i=e.forcePopupParentAsOffsetParent;this.positioned||this.initialisePosition();var n=this.offsetParent.clientHeight;if(!n)return null;var o=this.element.getBoundingClientRect(),r=this.offsetParent.getBoundingClientRect(),s=t?this.position.y:o.top,a=t?0:r.top,l=0;if(i){var c=this.element.parentElement;if(c){var u=c.getBoundingClientRect().bottom;l=u-o.bottom}}var d=n+a-s-l;return d},t.prototype.getWidth=function(){return this.element.offsetWidth},t.prototype.setWidth=function(e){var t=this.element,i=this.config.popup,n=!1;if("string"===typeof e&&-1!==e.indexOf("%"))no(t,e),e=Gn(t),n=!0;else if(this.positioned){e=Math.max(this.minWidth,e);var o=this.offsetParent.clientWidth,r=i?this.position.x:this.element.getBoundingClientRect().left;o&&e+r>o&&(e=o-r)}this.getWidth()!==e&&(n?(t.style.maxWidth="unset",t.style.minWidth="unset"):this.config.popup?no(t,e):(t.style.width="".concat(e,"px"),t.style.flex=" unset",this.lastSize.width="number"===typeof e?e:parseFloat(e)))},t.prototype.offsetElement=function(e,t){void 0===e&&(e=0),void 0===t&&(t=0);var i=this.config.forcePopupParentAsOffsetParent,n=i?this.boundaryEl:this.element;n&&(this.popupService.positionPopup({ePopup:n,keepWithinBounds:!0,skipObserver:this.movable||this.isResizable(),updatePosition:function(){return{x:e,y:t}}}),this.setPosition(parseFloat(n.style.left),parseFloat(n.style.top)))},t.prototype.constrainSizeToAvailableHeight=function(e){var t=this;if(this.config.forcePopupParentAsOffsetParent){var i=function(){var e=t.getAvailableHeight();t.element.style.setProperty("max-height","".concat(e,"px"))};e?this.resizeObserverSubscriber=this.resizeObserverService.observeResize(this.popupService.getPopupParent(),i):(this.element.style.removeProperty("max-height"),this.resizeObserverSubscriber&&(this.resizeObserverSubscriber(),this.resizeObserverSubscriber=void 0))}},t.prototype.setPosition=function(e,t){this.position.x=e,this.position.y=t},t.prototype.updateDragStartPosition=function(e,t){this.dragStartPosition={x:e,y:t}},t.prototype.calculateMouseMovement=function(e){var t=e.e,i=e.isLeft,n=e.isTop,o=e.anywhereWithin,r=e.topBuffer,s=t.clientX-this.dragStartPosition.x,a=t.clientY-this.dragStartPosition.y,l=this.shouldSkipX(t,!!i,!!o,s)?0:s,c=this.shouldSkipY(t,!!n,r,a)?0:a;return{movementX:l,movementY:c}},t.prototype.shouldSkipX=function(e,t,i,n){var o=this.element.getBoundingClientRect(),r=this.offsetParent.getBoundingClientRect(),s=this.boundaryEl.getBoundingClientRect(),a=this.config.popup?this.position.x:o.left,l=a<=0&&r.left>=e.clientX||r.right<=e.clientX&&r.right<=s.right;return!!l||(l=t?n<0&&e.clientX>a+r.left||n>0&&e.clientX<a+r.left:i?n<0&&e.clientX>s.right||n>0&&e.clientX<a+r.left:n<0&&e.clientX>s.right||n>0&&e.clientX<s.right,l)},t.prototype.shouldSkipY=function(e,t,i,n){void 0===i&&(i=0);var o=this.element.getBoundingClientRect(),r=this.offsetParent.getBoundingClientRect(),s=this.boundaryEl.getBoundingClientRect(),a=this.config.popup?this.position.y:o.top,l=a<=0&&r.top>=e.clientY||r.bottom<=e.clientY&&r.bottom<=s.bottom;return!!l||(l=t?n<0&&e.clientY>a+r.top+i||n>
110&&e.clientY<a+r.top:n<0&&e.clientY>s.bottom||n>0&&e.clientY<s.bottom,l)},t.prototype.createResizeMap=function(){var e=this.element;this.resizerMap={topLeft:{element:e.querySelector("[ref=eTopLeftResizer]")},top:{element:e.querySelector("[ref=eTopResizer]")},topRight:{element:e.querySelector("[ref=eTopRightResizer]")},right:{element:e.querySelector("[ref=eRightResizer]")},bottomRight:{element:e.querySelector("[ref=eBottomRightResizer]")},bottom:{element:e.querySelector("[ref=eBottomResizer]")},bottomLeft:{element:e.querySelector("[ref=eBottomLeftResizer]")},left:{element:e.querySelector("[ref=eLeftResizer]")}}},t.prototype.addResizers=function(){if(!this.resizersAdded){var e=this.element;if(e){var t=new DOMParser,i=t.parseFromString(Er,"text/html").body;e.appendChild(i.firstChild),this.createResizeMap(),this.resizersAdded=!0}}},t.prototype.removeResizers=function(){this.resizerMap=void 0;var e=this.element.querySelector(".".concat(Sr));e&&this.element.removeChild(e),this.resizersAdded=!1},t.prototype.getResizerElement=function(e){return this.resizerMap[e].element},t.prototype.onResizeStart=function(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");var i=this.config,n=i.popup,o=i.forcePopupParentAsOffsetParent;n||o||this.applySizeToSiblings(this.currentResizer.isBottom||this.currentResizer.isTop),this.isResizing=!0,this.updateDragStartPosition(e.clientX,e.clientY)},t.prototype.getSiblings=function(){var e=this.element,t=e.parentElement;return t?Array.prototype.slice.call(t.children).filter((function(e){return!e.classList.contains("ag-hidden")})):null},t.prototype.getMinSizeOfSiblings=function(){for(var e=this.getSiblings()||[],t=0,i=0,n=0;n<e.length;n++){var o=e[n],r=!!o.style.flex&&"0 0 auto"!==o.style.flex;if(o!==this.element){var s=this.minHeight||0,a=this.minWidth||0;if(r){var l=window.getComputedStyle(o);l.minHeight&&(s=parseInt(l.minHeight,10)),l.minWidth&&(a=parseInt(l.minWidth,10))}else s=o.offsetHeight,a=o.offsetWidth;t+=s,i+=a}}return{height:t,width:i}},t.prototype.applySizeToSiblings=function(e){var t=null,i=this.getSiblings();if(i){for(var n=0;n<i.length;n++){var o=i[n];o!==t&&(e?o.style.height="".concat(o.offsetHeight,"px"):o.style.width="".concat(o.offsetWidth,"px"),o.style.flex="0 0 auto",o===this.element&&(t=i[n+1]))}t&&(t.style.removeProperty("height"),t.style.removeProperty("min-height"),t.style.removeProperty("max-height"),t.style.flex="1 1 auto")}},t.prototype.isResizable=function(){return Object.values(this.resizable).some((function(e){return e}))},t.prototype.onResize=function(e){if(this.isResizing&&this.currentResizer){var t=this.config,i=t.popup,n=t.forcePopupParentAsOffsetParent,o=this.currentResizer,r=o.isTop,s=o.isRight,a=o.isBottom,l=o.isLeft,c=s||l,u=a||r,d=this.calculateMouseMovement({e:e,isLeft:l,isTop:r}),p=d.movementX,h=d.movementY,f=this.position.x,g=this.position.y,v=0,y=0;if(c&&p){var m=l?-1:1,C=this.getWidth(),b=C+p*m,w=!1;l&&(v=C-b,(f+v<=0||b<=this.minWidth)&&(w=!0,v=0)),w||this.setWidth(b)}if(u&&h){m=r?-1:1;var S=this.getHeight(),E=S+h*m,x=!1;r?(y=S-E,(g+y<=0||E<=this.minHeight)&&(x=!0,y=0)):!this.config.popup&&!this.config.forcePopupParentAsOffsetParent&&S<E&&this.getMinSizeOfSiblings().height+E>this.element.parentElement.offsetHeight&&(x=!0),x||this.setHeight(E)}this.updateDragStartPosition(e.clientX,e.clientY),((i||n)&&v||y)&&this.offsetElement(f+v,g+y)}},t.prototype.onResizeEnd=function(e,t){this.isResizing=!1,this.currentResizer=null,this.boundaryEl=null;var i={type:"resize",api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi};this.element.classList.remove("ag-resizing"),this.resizerMap[t].element.classList.remove("ag-active"),this.dispatchEvent(i)},t.prototype.refreshSize=function(){var e=this.element;this.config.popup&&(this.config.width||this.setWidth(e.offsetWidth),this.config.height||this.setHeight(e.offsetHeight))},t.prototype.onMoveStart=function(e){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.isMoving=!0,this.element.classList.add("ag-moving"),this.updateDragStartPosition(e.clientX,e.clientY)},t.prototype.onMove=function(e){if(this.isMoving){var t,i=this.position,n=i.x,o=i.y;this.config.calculateTopBuffer&&(t=this.config.calculateTopBuffer());var r=this.calculateMouseMovement({e:e,isTop:!0,anywhereWithin:!0,topBuffer:t}),s=r.movementX,a=r.movementY;this.offsetElement(n+s,o+a),this.updateDragStartPosition(e.clientX,e.clientY)}},t.prototype.onMoveEnd=function(){this.isMoving=!1,this.boundaryEl=null,this.element.classList.remove("ag-moving")},t.prototype.setOffsetParent=function(){this.config.forcePopupParentAsOffsetParent?this.offsetParent=this.popupService.getPopupParent():this.offsetParent=this.element.offsetParent},t.prototype.findBoundaryElement=function(){var e=this.element;while(e){if("static"!==window.getComputedStyle(e).position)return e;e=e.parentElement}return this.element},t.prototype.clearResizeListeners=function(){while(this.resizeListeners.length){var e=this.resizeListeners.pop();this.dragService.removeDragSource(e)}},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.moveElementDragListener&&this.dragService.removeDragSource(this.moveElementDragListener),this.constrainSizeToAvailableHeight(!1),this.clearResizeListeners(),this.removeResizers()},wr([de("popupService")],t.prototype,"popupService",void 0),wr([de("resizeObserverService")],t.prototype,"resizeObserverService",void 0),wr([de("dragService")],t.prototype,"dragService",void 0),t}(st),Or=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Tr=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Dr=function(e){function t(t){var i=e.call(this)||this;return i.filterNameKey=t,i.applyActive=!1,i.hidePopup=null,i.debouncePending=!1,i.appliedModel=null,i.buttonListeners=[],i}return Or(t,e),t.prototype.postConstruct=function(){this.resetTemplate(),this.createManagedBean(new Cr(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)})),this.positionableFeature=new xr(this.getPositionableElement(),{forcePopupParentAsOffsetParent:!0}),this.createBean(this.positionableFeature)},t.prototype.handleKeyDown=function(e){},t.prototype.getFilterTitle=function(){return this.translate(this.filterNameKey)},t.prototype.isFilterActive=function(){return!!this.appliedModel},t.prototype.resetTemplate=function(e){var t=this.getGui();t&&t.removeEventListener("submit",this.onFormSubmit);var i='\n            <form class="ag-filter-wrapper">\n                <div class="ag-filter-body-wrapper ag-'.concat(this.getCssIdentifier(),'-body-wrapper" ref="eFilterBody">\n                    ').concat(this.createBodyTemplate(),"\n                </div>\n            </form>");this.setTemplate(i,e),t=this.getGui(),t&&t.addEventListener("submit",this.onFormSubmit)},t.prototype.isReadOnly=function(){return!!this.providedFilterParams.readOnly},t.prototype.init=function(e){var t=this;this.setParams(e),this.resetUiToDefaults(!0).then((function(){t.updateUiVisibility(),t.setupOnBtApplyDebounce()}))},t.prototype.setParams=function(e){this.providedFilterParams=e,this.applyActive=t.isUseApplyButton(e),this.resetButtonsPanel()},t.prototype.updateParams=function(e){var i=this;this.providedFilterParams=e,this.applyActive=t.isUseApplyButton(e),this.resetUiToActiveModel(this.getModel(),(function(){i.updateUiVisibility(),i.setupOnBtApplyDebounce()}))},t.prototype.resetButtonsPanel=function(){var e=this,t=this.providedFilterParams.buttons,i=t&&t.length>0&&!this.isReadOnly();if(this.eButtonsPanel?(Wn(this.eButtonsPanel),this.buttonListeners.forEac
11h((function(e){return null===e||void 0===e?void 0:e()})),this.buttonListeners=[]):i&&(this.eButtonsPanel=document.createElement("div"),this.eButtonsPanel.classList.add("ag-filter-apply-panel")),i){var n=document.createDocumentFragment(),o=function(t){var i,o;switch(t){case"apply":i=e.translate("applyFilter"),o=function(t){return e.onBtApply(!1,!1,t)};break;case"clear":i=e.translate("clearFilter"),o=function(){return e.onBtClear()};break;case"reset":i=e.translate("resetFilter"),o=function(){return e.onBtReset()};break;case"cancel":i=e.translate("cancelFilter"),o=function(t){e.onBtCancel(t)};break;default:return void console.warn("AG Grid: Unknown button type specified")}var r="apply"===t?"submit":"button",s=Kn('<button\n                    type="'.concat(r,'"\n                    ref="').concat(t,'FilterButton"\n                    class="ag-button ag-standard-button ag-filter-apply-panel-button"\n                >').concat(i,"\n                </button>"));e.buttonListeners.push(e.addManagedListener(s,"click",o)),n.append(s)};jo(t).forEach((function(e){return o(e)})),this.eButtonsPanel.append(n),this.getGui().appendChild(this.eButtonsPanel)}else this.eButtonsPanel&&Un(this.eButtonsPanel)},t.prototype.getDefaultDebounceMs=function(){return 0},t.prototype.setupOnBtApplyDebounce=function(){var e=this,i=t.getDebounceMs(this.providedFilterParams,this.getDefaultDebounceMs()),n=Y(this.checkApplyDebounce.bind(this),i);this.onBtApplyDebounce=function(){e.debouncePending=!0,n()}},t.prototype.checkApplyDebounce=function(){this.debouncePending&&(this.debouncePending=!1,this.onBtApply())},t.prototype.getModel=function(){return this.appliedModel?this.appliedModel:null},t.prototype.setModel=function(e){var t=this,i=null!=e?this.setModelIntoUi(e):this.resetUiToDefaults();return i.then((function(){t.updateUiVisibility(),t.applyModel("api")}))},t.prototype.onBtCancel=function(e){var t=this;this.resetUiToActiveModel(this.getModel(),(function(){t.handleCancelEnd(e)}))},t.prototype.handleCancelEnd=function(e){this.providedFilterParams.closeOnApply&&this.close(e)},t.prototype.resetUiToActiveModel=function(e,t){var i=this,n=function(){i.onUiChanged(!1,"prevent"),null===t||void 0===t||t()};null!=e?this.setModelIntoUi(e).then(n):this.resetUiToDefaults().then(n)},t.prototype.onBtClear=function(){var e=this;this.resetUiToDefaults().then((function(){return e.onUiChanged()}))},t.prototype.onBtReset=function(){this.onBtClear(),this.onBtApply()},t.prototype.applyModel=function(e){var t=this.getModelFromUi();if(!this.isModelValid(t))return!1;var i=this.appliedModel;return this.appliedModel=t,!this.areModelsEqual(i,t)},t.prototype.isModelValid=function(e){return!0},t.prototype.onFormSubmit=function(e){e.preventDefault()},t.prototype.onBtApply=function(e,t,i){if(void 0===e&&(e=!1),void 0===t&&(t=!1),i&&i.preventDefault(),this.applyModel(t?"rowDataUpdated":"ui")){var n="columnFilter";this.providedFilterParams.filterChangedCallback({afterFloatingFilter:e,afterDataChange:t,source:n})}var o=this.providedFilterParams.closeOnApply;o&&this.applyActive&&!e&&!t&&this.close(i)},t.prototype.onNewRowsLoaded=function(){},t.prototype.close=function(e){if(this.hidePopup){var t,i=e,n=i&&i.key;"Enter"!==n&&"Space"!==n||(t={keyboardEvent:i}),this.hidePopup(t),this.hidePopup=null}},t.prototype.onUiChanged=function(e,t){if(void 0===e&&(e=!1),this.updateUiVisibility(),this.providedFilterParams.filterModifiedCallback(),this.applyActive&&!this.isReadOnly()){var i=this.isModelValid(this.getModelFromUi()),n=this.getRefElement("applyFilterButton");n&&Mn(n,!i)}e&&!t||"immediately"===t?this.onBtApply(e):(this.applyActive||t)&&"debounce"!==t||this.onBtApplyDebounce()},t.prototype.afterGuiAttached=function(e){e&&(this.hidePopup=e.hidePopup),this.refreshFilterResizer(null===e||void 0===e?void 0:e.container)},t.prototype.refreshFilterResizer=function(e){if(this.positionableFeature&&"toolPanel"!==e){var t="floatingFilter"===e,i=this,n=i.positionableFeature,o=i.gridOptionsService;t?(n.restoreLastSize(),n.setResizable(o.get("enableRtl")?{bottom:!0,bottomLeft:!0,left:!0}:{bottom:!0,bottomRight:!0,right:!0})):(this.positionableFeature.removeSizeFromEl(),this.positionableFeature.setRe
11sizable(!1)),this.positionableFeature.constrainSizeToAvailableHeight(!0)}},t.prototype.afterGuiDetached=function(){this.checkApplyDebounce(),this.positionableFeature&&this.positionableFeature.constrainSizeToAvailableHeight(!1)},t.getDebounceMs=function(e,i){return t.isUseApplyButton(e)?(null!=e.debounceMs&&console.warn("AG Grid: debounceMs is ignored when apply button is present"),0):null!=e.debounceMs?e.debounceMs:i},t.isUseApplyButton=function(e){return!!e.buttons&&e.buttons.indexOf("apply")>=0},t.prototype.refresh=function(e){return this.providedFilterParams=e,!0},t.prototype.destroy=function(){var t=this.getGui();t&&t.removeEventListener("submit",this.onFormSubmit),this.hidePopup=null,this.positionableFeature&&(this.positionableFeature=this.destroyBean(this.positionableFeature)),e.prototype.destroy.call(this)},t.prototype.translate=function(e){var t=this.localeService.getLocaleTextFunc();return t(e,gr[e])},t.prototype.getCellValue=function(e){return this.providedFilterParams.getValue(e)},t.prototype.getPositionableElement=function(){return this.eFilterBody},Tr([de("rowModel")],t.prototype,"rowModel",void 0),Tr([sr("eFilterBody")],t.prototype,"eFilterBody",void 0),Tr([le],t.prototype,"postConstruct",null),t}(rr),Rr=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ar=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},_r=function(e){function t(t,i){var n=e.call(this,i)||this;return n.labelSeparator="",n.labelAlignment="left",n.disabled=!1,n.label="",n.config=t||{},n}return Rr(t,e),t.prototype.postConstruct=function(){this.addCssClass("ag-labeled"),this.eLabel.classList.add("ag-label");var e=this.config,t=e.labelSeparator,i=e.label,n=e.labelWidth,o=e.labelAlignment;null!=t&&this.setLabelSeparator(t),null!=i&&this.setLabel(i),null!=n&&this.setLabelWidth(n),this.setLabelAlignment(o||this.labelAlignment),this.refreshLabel()},t.prototype.refreshLabel=function(){Wn(this.eLabel),"string"===typeof this.label?this.eLabel.innerText=this.label+this.labelSeparator:this.label&&this.eLabel.appendChild(this.label),""===this.label?(_n(this.eLabel,!1),si(this.eLabel,"presentation")):(_n(this.eLabel,!0),si(this.eLabel,null))},t.prototype.setLabelSeparator=function(e){return this.labelSeparator===e||(this.labelSeparator=e,null!=this.label&&this.refreshLabel()),this},t.prototype.getLabelId=function(){return this.eLabel.id=this.eLabel.id||"ag-".concat(this.getCompId(),"-label"),this.eLabel.id},t.prototype.getLabel=function(){return this.label},t.prototype.setLabel=function(e){return this.label===e||(this.label=e,this.refreshLabel()),this},t.prototype.setLabelAlignment=function(e){var t=this.getGui(),i=t.classList;return i.toggle("ag-label-align-left","left"===e),i.toggle("ag-label-align-right","right"===e),i.toggle("ag-label-align-top","top"===e),this},t.prototype.setLabelEllipsis=function(e){return this.eLabel.classList.toggle("ag-label-ellipsis",e),this},t.prototype.setLabelWidth=function(e){return null==this.label||io(this.eLabel,e),this},t.prototype.setDisabled=function(e){e=!!e;var t=this.getGui();return Mn(t,e),t.classList.toggle("ag-disabled",e),this.disabled=e,this},t.prototype.isDisabled=function(){return!!this.disabled},Ar([le],t.prototype,"postConstruct",null),t}(rr),Pr=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Mr=function(e){function t(t,i,n){var o=e.call(this,t,i)||this;return o.className=n,o}return Pr(t,e),t.prototype.postConstruct=function(){e.prototype.postConstruct.call(this),this.className&&this.addCssClass(this.className),this.refreshAriaLabelledBy()},t.prototype.refreshAriaLabelledBy=function(){var e=this.getAriaElement(),t=this.getLabelId();null!==ui(e)?pi(e,""):pi(e,null!==t&&void 0!==t?t:"")},t.prototype.setAriaLabel=function(e){return di(this.getAriaElement(),e),this.refreshAriaLabelledBy(),this},t.prototype.onValueChange=function(e){var t=this;return this.addManagedListener(this,ht.EVENT_FIELD_VALUE_CHANGED,(function(){return e(t.getValue())})),this},t.prototype.getWidth=function(){return this.getGui().clientWidth},t.prototype.setWidth=function(e){return no(this.getGui(),e),this},t.prototype.getPreviousValue=function(){return this.previousValue},t.prototype.getValue=function(){return this.value},t.prototype.setValue=function(e,t){return this.value===e||(this.previousValue=this.value,this.value=e,t||this.dispatchEvent({type:ht.EVENT_FIELD_VALUE_CHANGED})),this},t}(_r),kr=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Nr=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Lr='\n    <div class="ag-picker-field" role="presentation">\n        <div ref="eLabel"></div>\n            <div ref="eWrapper" class="ag-wrapper ag-picker-field-wrapper ag-picker-collapsed">\n            <div ref="eDisplayField" class="ag-picker-field-display"></div>\n            <div ref="eIcon" class="ag-picker-field-icon" aria-hidden="true"></div>\n        </div>\n    </div>',Ir=function(e){function t(t){var i=e.call(this,t,(null===t||void 0===t?void 0:t.template)||Lr,null===t||void 0===t?void 0:t.className)||this;if(i.isPickerDisplayed=!1,i.skipClick=!1,i.pickerGap=4,i.hideCurrentPicker=null,i.ariaRole=null===t||void 0===t?void 0:t.ariaRole,i.onPickerFocusIn=i.onPickerFocusIn.bind(i),i.onPickerFocusOut=i.onPickerFocusOut.bind(i),!t)return i;var n=t.pickerGap,o=t.maxPickerHeight,r=t.variableWidth,s=t.minPickerWidth,a=t.maxPickerWidth;return null!=n&&(i.pickerGap=n),i.variableWidth=!!r,null!=o&&i.setPickerMaxHeight(o),null!=s&&i.setPickerMinWidth(s),null!=a&&i.setPickerMaxWidth(a),i}return kr(t,e),t.prototype.postConstruct=function(){e.prototype.postConstruct.call(this),this.setupAria();var t="ag-".concat(this.getCompId(),"-display");this.eDisplayField.setAttribute("id",t);var i=this.getAriaElement();this.addManagedListener(i,"keydown",this.onKeyDown.bind(this)),this.addManagedListener(this.eLabel,"mousedown",this.onLabelOrWrapperMouseDown.bind(this)),this.addManagedListener(this.eWrapper,"mousedown",this.onLabelOrWrapperMouseDown.bind(this));var n=this.config.pickerIcon;if(n){var o=So(n,this.gridOptionsService);o&&this.eIcon.appendChild(o)}},t.prototype.setupAria=function(){var e=this.getAriaElement();e.setAttribute("tabindex",this.gridOptionsService.get("tabIndex").toString()),Si(e,!1),this.ariaRole&&si(e,this.ariaRole)},t.prototype.onLabelOrWrapperMouseDown=function(e){if(e){var t=this.getFocusableElement();if(t!==this.eWrapper&&(null===e||void 0===e?void 0:e.target)===t)return;e.preventDefault(),this.getFocusableElement().focus()}this.skipClick?this.skipClick=!1:this.isDisabled()||(this.isPickerDisplayed?this.hidePicker():this.showPicker())},t.prototype.onKeyDown=function(e){switch(e.key){case xo.UP:case xo.DOWN:case xo.ENTER:case xo.SPACE:e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case xo.ESCAPE:this.isPickerDisplayed&&(e.preventDefault(),e.stopPropagation(),this.hideCurrentPicker&&this.hideCurrentPicker());break}},t.prototype.showPicker=function(){this.isPickerDisplayed=!0,this.pickerComponent||(this.pickerComponent=this.createPickerComponent());var e=this.pickerComponent.getGui();e.addEventListener("focusin",this.onPickerFocusIn),e.addEventListener("focusout",this.onPickerFocusOut),this.hideCurrentPicker=this.renderAndPositionPicker(),this.toggleExpandedStyles(!0)},t.prototype.renderAndPositionPicker=function(){var e=this,t=this.gridOptionsService.getDocument(),i=this.pickerComponent.getGui();this.gridOptionsService.get("suppressScrollWhenPopupsAreOpen")||(this.destroyMouseWheelFunc=this.addManagedListener(this.eventService,ht.EVENT_BODY_SCROLL,(function(){e.hidePicker()})));var n=this.localeService.getLocaleTextFunc(),o=this.config,r=o.pickerAriaLabelKey,s=o.pickerAriaLabelValue,a=o.modalPicker,l=void 0===a||a,c={modal:l,eChild:i,closeOnEsc:!0,closedCallback:function(){var i=t.activeElement===t.body;e.beforeHidePicker(),i&&e.isAlive()&&e.getFocusableElement().focus()},ariaLabel:n(r,s)},u=this.popupService.addPopup(c),d=this,p=d.maxPickerHeight,h=d.minPickerWidth,f=d.maxPickerWidth,g=d.variableWidth;g?(h&&(i.style.minWidth=h),i.style.width=so(Gn(this.eWrapper)),f&&(i.style.maxWidth=f)):io(i,null!==f&&void 0!==f?f:Gn(this.eWrapper));var v=null!==p&&void 0!==p?p:"".concat(Ln(this.popupService.getPopupParent()),"px");return i.style.setProperty("max-height",v),i.style.position="absolute",this.alignPickerToComponent(),u.hideFunc},t.prototype.alignPickerToComponent=function(){if(this.pickerComponent){var e=this.config.pickerType,t=this.pickerGap,i=this.gridOptionsService.get("enableRtl")?"right":"left";this.popupService.positionPopupByComponent({type:e,eventSource:this.eWrapper,ePopup:this.pickerComponent.getGui(),position:"under",alignSide:i,keepWithinBounds:!0,nudgeY:t})}},t.prototype.beforeHidePicker=function(){this.destroyMouseWheelFunc&&(this.destroyMouseWheelFunc(),this.destroyMouseWheelFunc=void 0),this.toggleExpandedStyles(!1);var e=this.pickerComponent.getGui();e.removeEventListener("focusin",this.onPickerFocusIn),e.removeEventListener("focusout",this.onPickerFocusOut),this.isPickerDisplayed=!1,this.pickerComponent=void 0,this.hideCurrentPicker=null},t.prototype.toggleExpandedStyles=function(e){if(this.isAlive()){var t=this.getAriaElement();Si(t,e),this.eWrapper.classList.toggle("ag-picker-expanded",e),this.eWrapper.classList.toggle("ag-picker-collapsed",!e)}},t.prototype.onPickerFocusIn=function(){this.togglePickerHasFocus(!0)},t.prototype.onPickerFocusOut=function(e){var t;(null===(t=this.pickerComponent)||void 0===t?void 0:t.getGui().contains(e.relatedTarget))||this.togglePickerHasFocus(!1)},t.prototype.togglePickerHasFocus=function(e){this.pickerComponent&&this.eWrapper.classList.toggle("ag-picker-has-focus",e)},t.prototype.hidePicker=function(){this.hideCurrentPicker&&this.hideCurrentPicker()},t.prototype.setInputWidth=function(e){return io(this.eWrapper,e),this},t.prototype.getFocusableElement=function(){return this.eWrapper},t.prototype.setPickerGap=function(e){return this.pickerGap=e,this},t.prototype.setPickerMinWidth=function(e){return"number"===typeof e&&(e="".concat(e,"px")),this.minPickerWidth=null==e?void 0:e,this},t.prototype.setPickerMaxWidth=function(e){return"number"===typeof e&&(e="".concat(e,"px")),this.maxPickerWidth=null==e?void 0:e,this},t.prototype.setPickerMaxHeight=function(e){return"number"===typeof e&&(e="".concat(e,"px")),this.maxPickerHeight=null==e?void 0:e,this},t.prototype.destroy=function(){this.hidePicker(),e.prototype.destroy.call(this)},Nr([de("popupService")],t.prototype,"popupService",void 0),Nr([sr("eLabel")],t.prototype,"eLabel",void 0),Nr([sr("eWrapper")],t.prototype,"eWrapper",void 0),Nr([sr("eDisplayField")],t.prototype,"eDisplayField",void 0),Nr([sr("eIcon")],t.prototype,"eIcon",void 0),t}(Mr),Fr=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Gr=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Vr=function(e){function t(t){void 0===t&&(t="default");var i=e.call(this,'<div class="ag-list ag-'.concat(t,'-list" role="listbox"></div>'))||this;return i.cssIdentifier=t,i.options=[],i.itemEls=[],i}return Fr(t,e),t.prototype.init=function(){this.addManagedListener(this.getGui(),"keydown",this.handleKeyDown.bind(this))},t.prototype.handleKeyDown=function(e){var t=e.key;switch(t){case xo.ENTER:if(this.highlightedEl){var i=this.itemEls.indexOf(this.highlightedEl);this.setValueByIndex(i)}else this.setValue(this.getValue());break;case xo.DOWN:case xo.UP:var n=t===xo.DOWN,o=void 0;if(e.preventDefault(),this.highlightedEl){var r=this.itemEls.indexOf(this.highlightedEl),s=r+(n?1:-1);s=Math.min(Math.max(s,0),this.itemEls.length-1),o=this.itemEls[s]}else o=this.itemEls[n?0:this.itemEls.length-1];this.highlightItem(o);break}},t.prototype.addOptions=function(e){var t=this;return e.forEach((function(e){return t.addOption(e)})),this},t.prototype.addOption=function(e){var t=e.value,i=e.text,n=Et(i||t);return this.options.push({value:t,text:n}),this.renderOption(t,n),this.updateIndices(),this},t.prototype.updateIndices=function(){var e=this.getGui().querySelectorAll(".ag-list-item");e.forEach((function(t,i){Oi(t,i+1),xi(t,e.length)}))},t.prototype.renderOption=function(e,t){var i=this,n=document.createElement("div");si(n,"option"),n.classList.add("ag-list-item","ag-".concat(this.cssIdentifier,"-list-item")),n.innerHTML="<span>".concat(t,"</span>"),n.tabIndex=-1,this.itemEls.push(n),this.addManagedListener(n,"mouseover",(function(){return i.highlightItem(n)})),this.addManagedListener(n,"mouseleave",(function(){return i.clearHighlighted()})),this.addManagedListener(n,"click",(function(){return i.setValue(e)})),this.getGui().appendChild(n)},t.prototype.setValue=function(e,t){if(this.value===e)return this.fireItemSelected(),this;if(null==e)return this.reset(),this;var i=this.options.findIndex((function(t){return t.value===e}));if(-1!==i){var n=this.options[i];this.value=n.value,this.displayValue=null!=n.text?n.text:n.value,this.highlightItem(this.itemEls[i]),t||this.fireChangeEvent()}return this},t.prototype.setValueByIndex=function(e){return this.setValue(this.options[e].value)},t.prototype.getValue=function(){return this.value},t.prototype.getDisplayValue=function(){return this.displayValue},t.prototype.refreshHighlighted=function(){var e=this;this.clearHighlighted();var t=this.options.findIndex((function(t){return t.value===e.value}));-1!==t&&this.highlightItem(this.itemEls[t])},t.prototype.reset=function(){this.value=null,this.displayValue=null,this.clearHighlighted(),this.fireChangeEvent()},t.prototype.highlightItem=function(e){zn(e)&&(this.clearHighlighted(),this.highlightedEl=e,this.highlightedEl.classList.add(t.ACTIVE_CLASS),Ni(this.highlightedEl,!0),this.highlightedEl.focus())},t.prototype.clearHighlighted=function(){this.highlightedEl&&zn(this.highlightedEl)&&(this.highlightedEl.classList.remove(t.ACTIVE_CLASS),Ni(this.highlightedEl,!1),this.highlightedEl=null)},t.prototype.fireChangeEvent=function(){this.dispatchEvent({type:ht.EVENT_FIELD_VALUE_CHANGED}),this.f
11ireItemSelected()},t.prototype.fireItemSelected=function(){this.dispatchEvent({type:t.EVENT_ITEM_SELECTED})},t.EVENT_ITEM_SELECTED="selectedItem",t.ACTIVE_CLASS="ag-active-item",Gr([le],t.prototype,"init",null),t}(rr),Br=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),jr=function(){return jr=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},jr.apply(this,arguments)},Hr=function(e){function t(t){return e.call(this,jr({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"smallDown",ariaRole:"combobox"},t))||this}return Br(t,e),t.prototype.postConstruct=function(){e.prototype.postConstruct.call(this),this.createListComponent(),this.eWrapper.tabIndex=this.gridOptionsService.get("tabIndex")},t.prototype.createListComponent=function(){var e=this;this.listComponent=this.createBean(new Vr("select")),this.listComponent.setParentComponent(this);var i=this.listComponent.getAriaElement(),n="ag-select-list-".concat(this.listComponent.getCompId());i.setAttribute("id",n),Ii(this.getAriaElement(),i),this.listComponent.addGuiEventListener("keydown",(function(t){t.key===xo.TAB&&(t.preventDefault(),t.stopImmediatePropagation(),e.getGui().dispatchEvent(new KeyboardEvent("keydown",{key:t.key,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,bubbles:!0})))})),this.listComponent.addManagedListener(this.listComponent,Vr.EVENT_ITEM_SELECTED,(function(){e.hidePicker(),e.dispatchEvent({type:t.EVENT_ITEM_SELECTED})})),this.listComponent.addManagedListener(this.listComponent,ht.EVENT_FIELD_VALUE_CHANGED,(function(){e.listComponent&&(e.setValue(e.listComponent.getValue(),!1,!0),e.hidePicker())}))},t.prototype.createPickerComponent=function(){return this.listComponent},t.prototype.showPicker=function(){this.listComponent&&(e.prototype.showPicker.call(this),this.listComponent.refreshHighlighted())},t.prototype.addOptions=function(e){var t=this;return e.forEach((function(e){return t.addOption(e)})),this},t.prototype.addOption=function(e){return this.listComponent.addOption(e),this},t.prototype.setValue=function(t,i,n){if(this.value===t||!this.listComponent)return this;n||this.listComponent.setValue(t,!0);var o=this.listComponent.getValue();return o===this.getValue()?this:(this.eDisplayField.innerHTML=this.listComponent.getDisplayValue(),e.prototype.setValue.call(this,t,i))},t.prototype.destroy=function(){this.listComponent&&(this.destroyBean(this.listComponent),this.listComponent=void 0),e.prototype.destroy.call(this)},t.EVENT_ITEM_SELECTED="selectedItem",t}(Ir),Wr=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ur=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},zr=function(e){function t(t,i,n,o){void 0===n&&(n="text"),void 0===o&&(o="input");var r=e.call(this,t,'\n            <div role="presentation">\n                <div ref="eLabel" class="ag-input-field-label"></div>\n                <div ref="eWrapper" class="ag-wrapper ag-input-wrapper" role="presentation">\n                    <'.concat(o,' ref="eInput" class="ag-input-field-input"></').concat(o,">\n                </div>\n            </div>"),i)||this;return r.inputType=n,r.displayFieldTag=o,r}return Wr(t,e),t.prototype.postConstruct=function(){e.prototype.postConstruct.call(this),this.setInputType(),this.eLabel.classList.add("".concat(this.className,"-label")),this.eWrapper.classList.add("".concat(this.className,"-input-wrapper")),this.eInput.classList.add("".concat(this.className,"-input")),this.addCssClass("ag-input-field"),this.eInput.id=this.eInput.id||"ag-".concat(this.getCompId(),"-input");var t=this.config,i=t.width,n=t.value;null!=i&&this.setWidth(i),null!=n&&this.setValue(n),this.addInputListeners(),this.activateTabIndex([this.eInput])},t.prototype.addInputListeners=function(){var e=this;this.addManagedListener(this.eInput,"input",(function(t){return e.setValue(t.target.value)}))}
11,t.prototype.setInputType=function(){"input"===this.displayFieldTag&&this.eInput.setAttribute("type",this.inputType)},t.prototype.getInputElement=function(){return this.eInput},t.prototype.setInputWidth=function(e){return io(this.eWrapper,e),this},t.prototype.setInputName=function(e){return this.getInputElement().setAttribute("name",e),this},t.prototype.getFocusableElement=function(){return this.eInput},t.prototype.setMaxLength=function(e){var t=this.eInput;return t.maxLength=e,this},t.prototype.setInputPlaceholder=function(e){return uo(this.eInput,"placeholder",e),this},t.prototype.setInputAriaLabel=function(e){return di(this.eInput,e),this.refreshAriaLabelledBy(),this},t.prototype.setDisabled=function(t){return Mn(this.eInput,t),e.prototype.setDisabled.call(this,t)},t.prototype.setAutoComplete=function(e){if(!0===e)uo(this.eInput,"autocomplete",null);else{var t="string"===typeof e?e:"off";uo(this.eInput,"autocomplete",t)}return this},Ur([sr("eLabel")],t.prototype,"eLabel",void 0),Ur([sr("eWrapper")],t.prototype,"eWrapper",void 0),Ur([sr("eInput")],t.prototype,"eInput",void 0),t}(Mr),Kr=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Yr=function(e){function t(t,i,n){void 0===i&&(i="ag-checkbox"),void 0===n&&(n="checkbox");var o=e.call(this,t,i,n)||this;return o.labelAlignment="right",o.selected=!1,o.readOnly=!1,o.passive=!1,o}return Kr(t,e),t.prototype.addInputListeners=function(){this.addManagedListener(this.eInput,"click",this.onCheckboxClick.bind(this)),this.addManagedListener(this.eLabel,"click",this.toggle.bind(this))},t.prototype.getNextValue=function(){return void 0===this.selected||!this.selected},t.prototype.setPassive=function(e){this.passive=e},t.prototype.isReadOnly=function(){return this.readOnly},t.prototype.setReadOnly=function(e){this.eWrapper.classList.toggle("ag-disabled",e),this.eInput.disabled=e,this.readOnly=e},t.prototype.setDisabled=function(t){return this.eWrapper.classList.toggle("ag-disabled",t),e.prototype.setDisabled.call(this,t)},t.prototype.toggle=function(){if(!this.eInput.disabled){var e=this.isSelected(),t=this.getNextValue();this.passive?this.dispatchChange(t,e):this.setValue(t)}},t.prototype.getValue=function(){return this.isSelected()},t.prototype.setValue=function(e,t){return this.refreshSelectedClass(e),this.setSelected(e,t),this},t.prototype.setName=function(e){var t=this.getInputElement();return t.name=e,this},t.prototype.isSelected=function(){return this.selected},t.prototype.setSelected=function(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))},t.prototype.dispatchChange=function(e,t,i){this.dispatchEvent({type:ht.EVENT_FIELD_VALUE_CHANGED,selected:e,previousValue:t,event:i});var n=this.getInputElement(),o={type:ht.EVENT_CHECKBOX_CHANGED,id:n.id,name:n.name,selected:e,previousValue:t};this.eventService.dispatchEvent(o)},t.prototype.onCheckboxClick=function(e){if(!this.passive&&!this.eInput.disabled){var t=this.isSelected(),i=this.selected=e.target.checked;this.refreshSelectedClass(i),this.dispatchChange(i,t,e)}},t.prototype.refreshSelectedClass=function(e){this.eWrapper.classList.toggle("ag-checked",!0===e),this.eWrapper.classList.toggle("ag-indeterminate",null==e)},t}(zr),qr=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Xr=function(e){function t(t){return e.call(this,t,"ag-radio-button","radio")||this}return qr(t,e),t.prototype.isSelected=function(){return this.eInput.checked},t.prototype.toggle=function(){this.eInput.disabled||this.isSelected()||this.setValue(!0)},t.prototype.addInputListeners=function(){e.prototype.addInputListeners.call(this),this.addManagedListener(this.eventService,ht.EVENT_CHECKBOX_CHANGED,this.onChange.bind(this))},t.prototype.onChange=function(e){e.selected&&e.name&&this.eInput.name&&this.eInput.name===e.name&&e.id&&this.eInput.id!==e.id&&this.setValue(!1,!0)},t}(Yr),$r=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Zr=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},Jr=function(e,t,i){if(i||2===arguments.length)for(var n,o=0,r=t.length;o<r;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},Qr=function(){function e(e,t,i){this.localeService=e,this.optionsFactory=t,this.valueFormatter=i}return e.prototype.getModelAsString=function(e){var t=this;if(!e)return null;var i=null!=e.operator,n=this.localeService.getLocaleTextFunc();if(i){var o=e,r=o.conditions;if(!r){var s=o.condition1,a=o.condition2;r=[s,a]}var l=r.map((function(e){return t.getModelAsString(e)})),c="AND"===o.operator?"andCondition":"orCondition";return l.join(" ".concat(n(c,gr[c])," "))}if(e.type===es.BLANK||e.type===es.NOT_BLANK)return n(e.type,e.type);var u=e,d=this.optionsFactory.getCustomOption(u.type),p=d||{},h=p.displayKey,f=p.displayName,g=p.numberOfInputs;return h&&f&&0===g?(n(h,f),f):this.conditionToString(u,d)},e.prototype.updateParams=function(e){this.optionsFactory=e.optionsFactory},e.prototype.formatValue=function(e){var t;return this.valueFormatter?null!==(t=this.valueFormatter(null!==e&&void 0!==e?e:null))&&void 0!==t?t:"":String(e)},e}(),es=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.eTypes=[],t.eJoinOperatorPanels=[],t.eJoinOperatorsAnd=[],t.eJoinOperatorsOr=[],t.eConditionBodies=[],t.listener=function(){return t.onUiChanged()},t.lastUiCompletePosition=null,t.joinOperatorId=0,t}return $r(t,e),t.prototype.getNumberOfInputs=function(e){var i=this.optionsFactory.getCustomOption(e);if(i){var n=i.numberOfInputs;return null!=n?n:1}var o=[t.EMPTY,t.NOT_BLANK,t.BLANK];return e&&o.indexOf(e)>=0?0:e===t.IN_RANGE?2:1},t.prototype.onFloatingFilterChanged=function(e,t){this.setTypeFromFloatingFilter(e),this.setValueFromFloatingFilter(t),this.onUiChanged(!0)},t.prototype.setTypeFromFloatingFilter=function(e){var t=this;
11this.eTypes.forEach((function(i,n){0===n?i.setValue(e,!0):i.setValue(t.optionsFactory.getDefaultOption(),!0)}))},t.prototype.getModelFromUi=function(){var e=this.getUiCompleteConditions();return 0===e.length?null:this.maxNumConditions>1&&e.length>1?{filterType:this.getFilterType(),operator:this.getJoinOperator(),condition1:e[0],condition2:e[1],conditions:e}:e[0]},t.prototype.getConditionTypes=function(){return this.eTypes.map((function(e){return e.getValue()}))},t.prototype.getConditionType=function(e){return this.eTypes[e].getValue()},t.prototype.getJoinOperator=function(){return 0===this.eJoinOperatorsOr.length?this.defaultJoinOperator:!0===this.eJoinOperatorsOr[0].getValue()?"OR":"AND"},t.prototype.areModelsEqual=function(e,t){var i=this;if(!e&&!t)return!0;if(!e&&t||e&&!t)return!1;var n,o=!e.operator,r=!t.operator,s=!o&&r||o&&!r;if(s)return!1;if(o){var a=e,l=t;n=this.areSimpleModelsEqual(a,l)}else{var c=e,u=t;n=c.operator===u.operator&&_e(c.conditions,u.conditions,(function(e,t){return i.areSimpleModelsEqual(e,t)}))}return n},t.prototype.shouldRefresh=function(e){var t,i,n,o=this.getModel(),r=o?null!==(t=o.conditions)&&void 0!==t?t:[o]:null,s=null!==(n=null===(i=e.filterOptions)||void 0===i?void 0:i.map((function(e){return"string"===typeof e?e:e.displayKey})))&&void 0!==n?n:this.getDefaultFilterOptions(),a=!r||r.every((function(e){return void 0!==s.find((function(t){return t===e.type}))}));return!!a&&!("number"===typeof e.maxNumConditions&&r&&r.length>e.maxNumConditions)},t.prototype.refresh=function(t){if(!this.shouldRefresh(t))return!1;var i=e.prototype.refresh.call(this,t);return!!i&&(this.setParams(t),this.removeConditionsAndOperators(0),this.createOption(),this.setModel(this.getModel()),!0)},t.prototype.setModelIntoUi=function(e){var t=this,i=e.operator;if(i){var n=e;n.conditions||(n.conditions=[n.condition1,n.condition2]);var o=this.validateAndUpdateConditions(n.conditions),r=this.getNumConditions();if(o<r)this.removeConditionsAndOperators(o);else if(o>r)for(var s=r;s<o;s++)this.createJoinOperatorPanel(),this.createOption();var a="OR"===n.operator;this.eJoinOperatorsAnd.forEach((function(e){return e.setValue(!a,!0)})),this.eJoinOperatorsOr.forEach((function(e){return e.setValue(a,!0)})),n.conditions.forEach((function(e,i){t.eTypes[i].setValue(e.type,!0),t.setConditionIntoUi(e,i)}))}else{var l=e;this.getNumConditions()>1&&this.removeConditionsAndOperators(1),this.eTypes[0].setValue(l.type,!0),this.setConditionIntoUi(l,0)}return this.lastUiCompletePosition=this.getNumConditions()-1,this.createMissingConditionsAndOperators(),this.onUiChanged(),$o.resolve()},t.prototype.validateAndUpdateConditions=function(e){var t=e.length;return t>this.maxNumConditions&&(e.splice(this.maxNumConditions),G('Filter Model contains more conditions than "filterParams.maxNumConditions". Additional conditions have been ignored.'),t=this.maxNumConditions),t},t.prototype.doesFilterPass=function(e){var t,i=this,n=this.getModel();if(null==n)return!0;var o=n.operator,r=[];if(o){var s=n;r.push.apply(r,Jr([],Zr(null!==(t=s.conditions)&&void 0!==t?t:[]),!1))}else r.push(n);var a=o&&"OR"===o?"some":"every";return r[a]((function(t){return i.individualConditionPasses(e,t)}))},t.prototype.setParams=function(t){e.prototype.setParams.call(this,t),this.setNumConditions(t),this.defaultJoinOperator=this.getDefaultJoinOperator(t.defaultJoinOperator),this.filterPlaceholder=t.filterPlaceholder,this.optionsFactory=new fr,this.optionsFactory.init(t,this.getDefaultFilterOptions()),this.createFilterListOptions(),this.createOption(),this.createMissingConditionsAndOperators(),this.isReadOnly()&&this.eFilterBody.setAttribute("tabindex","-1")},t.prototype.setNumConditions=function(e){var t,i;null!=e.suppressAndOrCondition&&G('Since v29.2 "filterParams.suppressAndOrCondition" is deprecated. Use "filterParams.maxNumConditions = 1" instead.'),null!=e.alwaysShowBothConditions&&G('Since v29.2 "filterParams.alwaysShowBothConditions" is deprecated. Use "filterParams.numAlwaysVisibleConditions = 2" instead.'),this.maxNumConditions=null!==(t=e.maxNumConditions)&&void 0!==t?t:e.suppressAndOrCondition?1:2,this.maxNumConditions<1&&(G('"filterParams.maxNumConditions" must be greater than or equal to zero.'),this.maxNumConditions=1),this.numAlwaysVisibleConditions=null!==(i=e.numAlwaysVisibleConditions)&&void 0!==i?i:e.alwaysShowBothConditions?2:1,this.numAlwaysVisibleConditions<1&&(G('"filterParams.numAlwaysVisibleConditions" must be greater than or equal to zero.'),this.numAlwaysVisibleConditions=1),this.numAlwaysVisibleConditions>this.maxNumConditions&&(G('"filterParams.numAlwaysVisibleConditions" cannot be greater than "filterParams.maxNumConditions".'),this.numAlwaysVisibleConditions=this.maxNumConditions)},t.prototype.createOption=function(){var e=this,t=this.createManagedBean(new Hr);this.eTypes.push(t),t.addCssClass("ag-filter-select"),this.eFilterBody.appendChild(t.getGui());var i=this.createValueElement();this.eConditionBodies.push(i),this.eFilterBody.appendChild(i),this.putOptionsIntoDropdown(t),this.resetType(t);
11var n=this.getNumConditions()-1;this.forEachPositionInput(n,(function(t){return e.resetInput(t)})),this.addChangedListeners(t,n)},t.prototype.createJoinOperatorPanel=function(){var e=document.createElement("div");this.eJoinOperatorPanels.push(e),e.classList.add("ag-filter-condition");var t=this.createJoinOperator(this.eJoinOperatorsAnd,e,"and"),i=this.createJoinOperator(this.eJoinOperatorsOr,e,"or");this.eFilterBody.appendChild(e);var n=this.eJoinOperatorPanels.length-1,o=this.joinOperatorId++;this.resetJoinOperatorAnd(t,n,o),this.resetJoinOperatorOr(i,n,o),this.isReadOnly()||(t.onValueChange(this.listener),i.onValueChange(this.listener))},t.prototype.createJoinOperator=function(e,t,i){var n=this.createManagedBean(new Xr);return e.push(n),n.addCssClass("ag-filter-condition-operator"),n.addCssClass("ag-filter-condition-operator-".concat(i)),t.appendChild(n.getGui()),n},t.prototype.getDefaultJoinOperator=function(e){return"AND"===e||"OR"===e?e:"AND"},t.prototype.createFilterListOptions=function(){var e=this,t=this.optionsFactory.getFilterOptions();this.filterListOptions=t.map((function(t){return"string"===typeof t?e.createBoilerplateListOption(t):e.createCustomListOption(t)}))},t.prototype.putOptionsIntoDropdown=function(e){this.filterListOptions.forEach((function(t){e.addOption(t)})),e.setDisabled(this.filterListOptions.length<=1)},t.prototype.createBoilerplateListOption=function(e){return{value:e,text:this.translate(e)}},t.prototype.createCustomListOption=function(e){var t=e.displayKey,i=this.optionsFactory.getCustomOption(e.displayKey);return{value:t,text:i?this.localeService.getLocaleTextFunc()(i.displayKey,i.displayName):this.translate(t)}},t.prototype.isAllowTwoConditions=function(){return this.maxNumConditions>=2},t.prototype.createBodyTemplate=function(){return""},t.prototype.getCssIdentifier=function(){return"simple-filter"},t.prototype.updateUiVisibility=function(){var e=this.getJoinOperator();this.updateNumConditions(),this.updateConditionStatusesAndValues(this.lastUiCompletePosition,e)},t.prototype.updateNumConditions=function(){for(var e,t=-1,i=!0,n=0;n<this.getNumConditions();n++)this.isConditionUiComplete(n)?t=n:i=!1;if(this.shouldAddNewConditionAtEnd(i))this.createJoinOperatorPanel(),this.createOption();else{var o=null!==(e=this.lastUiCompletePosition)&&void 0!==e?e:this.getNumConditions()-2;if(t<o){this.removeConditionsAndOperators(o+1);var r=t+1,s=o-r;s>0&&this.removeConditionsAndOperators(r,s),this.createMissingConditionsAndOperators()}}this.lastUiCompletePosition=t},t.prototype.updateConditionStatusesAndValues=function(e,t){var i=this;this.eTypes.forEach((function(t,n){var o=i.isConditionDisabled(n,e);t.setDisabled(o||i.filterListOptions.length<=1),1===n&&(Mn(i.eJoinOperatorPanels[0],o),i.eJoinOperatorsAnd[0].setDisabled(o),i.eJoinOperatorsOr[0].setDisabled(o))})),this.eConditionBodies.forEach((function(e,t){_n(e,i.isConditionBodyVisible(t))}));var n="OR"===(null!==t&&void 0!==t?t:this.getJoinOperator());this.eJoinOperatorsAnd.forEach((function(e,t){e.setValue(!n,!0)})),this.eJoinOperatorsOr.forEach((function(e,t){e.setValue(n,!0)})),this.forEachInput((function(t,n,o,r){i.setElementDisplayed(t,n<r),i.setElementDisabled(t,i.isConditionDisabled(o,e))})),this.resetPlaceholder()},t.prototype.shouldAddNewConditionAtEnd=function(e){return e&&this.getNumConditions()<this.maxNumConditions&&!this.isReadOnly()},t.prototype.removeConditionsAndOperators=function(e,t){if(!(e>=this.getNumConditions())){this.removeComponents(this.eTypes,e,t),this.removeElements(this.eConditionBodies,e,t),this.removeValueElements(e,t);var i=Math.max(e-1,0);this.removeElements(this.eJoinOperatorPanels,i,t),this.removeComponents(this.eJoinOperatorsAnd,i,t),this.removeComponents(this.eJoinOperatorsOr,i,t)}},t.prototype.removeElements=function(e,t,i){var n=this.removeItems(e,t,i);n.forEach((function(e){return Un(e)}))},t.prototype.removeComponents=function(e,t,i){var n=this,o=this.removeItems(e,t,i);o.forEach((function(e){Un(e.getGui()),n.destroyBean(e)}))},t.prototype.removeItems=function(e,t,i){return null==i?e.splice(t):e.splice(t,i)},t.prototype.afterGuiAttached=function(t){if(e.prototype.afterGuiAttached.call(this,t),this.resetPlaceholder(),!(null===t||void 0===t?void 0:t.suppressFocus))if(this.isReadOnly())this.eFilterBody.focus();else{var i=this.getInputs(0)[0];if(!i)return;i instanceof zr&&i.getInputElement().focus()}},t.prototype.afterGuiDetached=function(){e.prototype.afterGuiDetached.call(this);var t=this.getModel();this.resetUiToActiveModel(t);
11for(var i=-1,n=-1,o=!1,r=this.getJoinOperator(),s=this.getNumConditions()-1;s>=0;s--)if(this.isConditionUiComplete(s))-1===i&&(i=s,n=s);else{var a=s>=this.numAlwaysVisibleConditions&&!this.isConditionUiComplete(s-1),l=s<i;(a||l)&&(this.removeConditionsAndOperators(s,1),o=!0,l&&n--)}var c=!1;this.getNumConditions()<this.numAlwaysVisibleConditions&&(this.createMissingConditionsAndOperators(),c=!0),this.shouldAddNewConditionAtEnd(n===this.getNumConditions()-1)&&(this.createJoinOperatorPanel(),this.createOption(),c=!0),c&&this.updateConditionStatusesAndValues(n,r),o&&this.updateJoinOperatorsDisabled(),this.lastUiCompletePosition=n},t.prototype.getPlaceholderText=function(e,t){var i=this.translate(e);if(j(this.filterPlaceholder)){var n=this.filterPlaceholder,o=this.eTypes[t].getValue(),r=this.translate(o);i=n({filterOptionKey:o,filterOption:r,placeholder:i})}else"string"===typeof this.filterPlaceholder&&(i=this.filterPlaceholder);return i},t.prototype.resetPlaceholder=function(){var e=this,t=this.localeService.getLocaleTextFunc();this.forEachInput((function(i,n,o,r){if(i instanceof zr){var s=0===n&&r>1?"inRangeStart":0===n?"filterOoo":"inRangeEnd",a=0===n&&r>1?t("ariaFilterFromValue","Filter from value"):0===n?t("ariaFilterValue","Filter Value"):t("ariaFilterToValue","Filter to Value");i.setInputPlaceholder(e.getPlaceholderText(s,o)),i.setInputAriaLabel(a)}}))},t.prototype.setElementValue=function(e,t,i){e instanceof zr&&e.setValue(null!=t?String(t):null,!0)},t.prototype.setElementDisplayed=function(e,t){e instanceof rr&&_n(e.getGui(),t)},t.prototype.setElementDisabled=function(e,t){e instanceof rr&&Mn(e.getGui(),t)},t.prototype.attachElementOnChange=function(e,t){e instanceof zr&&e.onValueChange(t)},t.prototype.forEachInput=function(e){var t=this;this.getConditionTypes().forEach((function(i,n){t.forEachPositionTypeInput(n,i,e)}))},t.prototype.forEachPositionInput=function(e,t){var i=this.getConditionType(e);this.forEachPositionTypeInput(e,i,t)},t.prototype.forEachPositionTypeInput=function(e,t,i){for(var n=this.getNumberOfInputs(t),o=this.getInputs(e),r=0;r<o.length;r++){var s=o[r];null!=s&&i(s,r,e,n)}},t.prototype.isConditionDisabled=function(e,t){return!!this.isReadOnly()||0!==e&&e>t+1},t.prototype.isConditionBodyVisible=function(e){var t=this.getConditionType(e),i=this.getNumberOfInputs(t);return i>0},t.prototype.isConditionUiComplete=function(e){if(e>=this.getNumConditions())return!1;var i=this.getConditionType(e);return i!==t.EMPTY&&!this.getValues(e).some((function(e){return null==e}))},t.prototype.getNumConditions=function(){return this.eTypes.length},t.prototype.getUiCompleteConditions=function(){for(var e=[],t=0;t<this.getNumConditions();t++)this.isConditionUiComplete(t)&&e.push(this.createCondition(t));return e},t.prototype.createMissingConditionsAndOperators=function(){if(!this.isReadOnly())for(var e=this.getNumConditions();e<this.numAlwaysVisibleConditions;e++)this.createJoinOperatorPanel(),this.createOption()},t.prototype.resetUiToDefaults=function(e){var t=this;return this.removeConditionsAndOperators(this.isReadOnly()?1:this.numAlwaysVisibleConditions),this.eTypes.forEach((function(e){return t.resetType(e)})),this.eJoinOperatorsAnd.forEach((function(e,i){return t.resetJoinOperatorAnd(e,i,t.joinOperatorId+i)})),this.eJoinOperatorsOr.forEach((function(e,i){return t.resetJoinOperatorOr(e,i,t.joinOperatorId+i)})),this.joinOperatorId++,this.forEachInput((function(e){return t.resetInput(e)})),this.resetPlaceholder(),this.createMissingConditionsAndOperators(),this.lastUiCompletePosition=null,e||this.onUiChanged(),$o.resolve()},t.prototype.resetType=function(e){var t=this.localeService.getLocaleTextFunc(),i=t("ariaFilteringOperator","Filtering operator");e.setValue(this.optionsFactory.getDefaultOption(),!0).setAriaLabel(i).setDisabled(this.isReadOnly()||this.filterListOptions.length<=1)},t.prototype.resetJoinOperatorAnd=function(e,t,i){this.resetJoinOperator(e,t,this.isDefaultOperator("AND"),this.translate("andCondition"),i)},t.prototype.resetJoinOperatorOr=function(e,t,i){this.resetJoinOperator(e,t,this.isDefaultOperator("OR"),this.translate("orCondition"),i)},t.prototype.resetJoinOperator=function(e,t,i,n,o){this.updateJoinOperatorDisabled(e.setValue(i,!0).setName("ag-simple-filter-and-or-".concat(this.getCompId(),"-").concat(o)).setLabel(n),t)},t.prototype.updateJoinOperatorsDisabled=function(){var e=this;
11this.eJoinOperatorsAnd.forEach((function(t,i){return e.updateJoinOperatorDisabled(t,i)})),this.eJoinOperatorsOr.forEach((function(t,i){return e.updateJoinOperatorDisabled(t,i)}))},t.prototype.updateJoinOperatorDisabled=function(e,t){e.setDisabled(this.isReadOnly()||t>0)},t.prototype.resetInput=function(e){this.setElementValue(e,null),this.setElementDisabled(e,this.isReadOnly())},t.prototype.setConditionIntoUi=function(e,t){var i=this,n=this.mapValuesFromModel(e);this.forEachInput((function(e,o,r,s){r===t&&i.setElementValue(e,null!=n[o]?n[o]:null)}))},t.prototype.setValueFromFloatingFilter=function(e){var t=this;this.forEachInput((function(i,n,o,r){t.setElementValue(i,0===n&&0===o?e:null,!0)}))},t.prototype.isDefaultOperator=function(e){return e===this.defaultJoinOperator},t.prototype.addChangedListeners=function(e,t){var i=this;this.isReadOnly()||(e.onValueChange(this.listener),this.forEachPositionInput(t,(function(e){i.attachElementOnChange(e,i.listener)})))},t.prototype.individualConditionPasses=function(e,t){var i=this.getCellValue(e.node),n=this.mapValuesFromModel(t),o=this.optionsFactory.getCustomOption(t.type),r=this.evaluateCustomFilter(o,n,i);return null!=r?r:null==i?this.evaluateNullValue(t.type):this.evaluateNonNullValue(n,i,t,e)},t.prototype.evaluateCustomFilter=function(e,t,i){if(null!=e){var n=e.predicate;return null==n||t.some((function(e){return null==e}))?void 0:n(t,i)}},t.prototype.isBlank=function(e){return null==e||"string"===typeof e&&0===e.trim().length},t.prototype.hasInvalidInputs=function(){return!1},t.EMPTY="empty",t.BLANK="blank",t.NOT_BLANK="notBlank",t.EQUALS="equals",t.NOT_EQUAL="notEqual",t.LESS_THAN="lessThan",t.LESS_THAN_OR_EQUAL="lessThanOrEqual",t.GREATER_THAN="greaterThan",t.GREATER_THAN_OR_EQUAL="greaterThanOrEqual",t.IN_RANGE="inRange",t.CONTAINS="contains",t.NOT_CONTAINS="notContains",t.STARTS_WITH="startsWith",t.ENDS_WITH="endsWith",t}(Dr),ts=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),is=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ts(t,e),t.prototype.setParams=function(t){e.prototype.setParams.call(this,t),this.scalarFilterParams=t},t.prototype.evaluateNullValue=function(e){switch(e){case t.EQUALS:case t.NOT_EQUAL:if(this.scalarFilterParams.includeBlanksInEquals)return!0;break;case t.GREATER_THAN:case t.GREATER_THAN_OR_EQUAL:if(this.scalarFilterParams.includeBlanksInGreaterThan)return!0;break;case t.LESS_THAN:case t.LESS_THAN_OR_EQUAL:if(this.scalarFilterParams.includeBlanksInLessThan)return!0;break;case t.IN_RANGE:if(this.scalarFilterParams.includeBlanksInRange)return!0;break;case t.BLANK:return!0;case t.NOT_BLANK:return!1}return!1},t.prototype.evaluateNonNullValue=function(e,i,n){var o=this.comparator(),r=null!=e[0]?o(e[0],i):0;switch(n.type){case t.EQUALS:return 0===r;case t.NOT_EQUAL:return 0!==r;case t.GREATER_THAN:return r>0;case t.GREATER_THAN_OR_EQUAL:return r>=0;case t.LESS_THAN:return r<0;case t.LESS_THAN_OR_EQUAL:return r<=0;case t.IN_RANGE:var s=o(e[1],i);return this.scalarFilterParams.inRangeInclusive?r>=0&&s<=0:r>0&&s<0;case t.BLANK:return this.isBlank(i);case t.NOT_BLANK:return!this.isBlank(i);default:return console.warn('AG Grid: Unexpected type of filter "'+n.type+'", it looks like the filter was configured with incorrect Filter Options'),!0}},t}(es),ns=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),os=function(){return os=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},os.apply(this,arguments)},rs=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},ss=1e3,as=1/0,ls=function(e){function t(t,i,n){var o=e.call(this,i,n)||this;return o.dateFilterParams=t,o}return ns(t,e),t.prototype.conditionToString=function(e,t){var i=e.type,n=(t||{}
11).numberOfInputs,o=i==es.IN_RANGE||2===n,r=wn(e.dateFrom),s=wn(e.dateTo),a=this.dateFilterParams.inRangeFloatingFilterDateFormat;if(o){var l=null!==r?bn(r,a):"null",c=null!==s?bn(s,a):"null";return"".concat(l,"-").concat(c)}return null!=r?bn(r,a):"".concat(i)},t.prototype.updateParams=function(t){e.prototype.updateParams.call(this,t),this.dateFilterParams=t.dateFilterParams},t}(Qr),cs=function(e){function t(){var t=e.call(this,"dateFilter")||this;return t.eConditionPanelsFrom=[],t.eConditionPanelsTo=[],t.dateConditionFromComps=[],t.dateConditionToComps=[],t.minValidYear=ss,t.maxValidYear=as,t.minValidDate=null,t.maxValidDate=null,t}return ns(t,e),t.prototype.afterGuiAttached=function(t){e.prototype.afterGuiAttached.call(this,t),this.dateConditionFromComps[0].afterGuiAttached(t)},t.prototype.mapValuesFromModel=function(e){var t=e||{},i=t.dateFrom,n=t.dateTo,o=t.type;return[i&&wn(i)||null,n&&wn(n)||null].slice(0,this.getNumberOfInputs(o))},t.prototype.comparator=function(){return this.dateFilterParams.comparator?this.dateFilterParams.comparator:this.defaultComparator.bind(this)},t.prototype.defaultComparator=function(e,t){var i=t;return null==t||i<e?-1:i>e?1:0},t.prototype.setParams=function(t){this.dateFilterParams=t,e.prototype.setParams.call(this,t);var i=function(e,i){if(null!=t[e]){if(!isNaN(t[e]))return null==t[e]?i:Number(t[e]);console.warn("AG Grid: DateFilter ".concat(e," is not a number"))}return i};this.minValidYear=i("minValidYear",ss),this.maxValidYear=i("maxValidYear",as),this.minValidYear>this.maxValidYear&&console.warn("AG Grid: DateFilter minValidYear should be <= maxValidYear"),t.minValidDate?this.minValidDate=t.minValidDate instanceof Date?t.minValidDate:wn(t.minValidDate):this.minValidDate=null,t.maxValidDate?this.maxValidDate=t.maxValidDate instanceof Date?t.maxValidDate:wn(t.maxValidDate):this.maxValidDate=null,this.minValidDate&&this.maxValidDate&&this.minValidDate>this.maxValidDate&&console.warn("AG Grid: DateFilter minValidDate should be <= maxValidDate"),this.filterModelFormatter=new ls(this.dateFilterParams,this.localeService,this.optionsFactory)},t.prototype.createDateCompWrapper=function(e){var t=this,i=new hr(this.getContext(),this.userComponentFactory,{onDateChanged:function(){return t.onUiChanged()},filterParams:this.dateFilterParams},e);return this.addDestroyFunc((function(){return i.destroy()})),i},t.prototype.setElementValue=function(e,t){e.setDate(t)},t.prototype.setElementDisplayed=function(e,t){e.setDisplayed(t)},t.prototype.setElementDisabled=function(e,t){e.setDisabled(t)},t.prototype.getDefaultFilterOptions=function(){return t.DEFAULT_FILTER_OPTIONS},t.prototype.createValueElement=function(){var e=document.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},t.prototype.createFromToElement=function(e,t,i,n){var o=document.createElement("div");o.classList.add("ag-filter-".concat(n)),o.classList.add("ag-filter-date-".concat(n)),t.push(o),e.appendChild(o),i.push(this.createDateCompWrapper(o))},t.prototype.removeValueElements=function(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)},t.prototype.removeDateComps=function(e,t,i){var n=this.removeItems(e,t,i);n.forEach((function(e){return e.destroy()}))},t.prototype.isValidDateValue=function(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},t.prototype.isConditionUiComplete=function(t){var i=this;if(!e.prototype.isConditionUiComplete.call(this,t))return!1;var n=!0;return this.forEachInput((function(e,o,r,s){r!==t||!n||o>=s||(n=n&&i.isValidDateValue(e.getDate()))})),n},t.prototype.areSimpleModelsEqual=function(e,t){return e.dateFrom===t.dateFrom&&e.dateTo===t.dateTo&&e.type===t.type},t.prototype.getFilterType=function(){return"date"},t.prototype.createCondition=function(e){var t=this.getConditionType(e),i={},n=this.getValues(e);return n.length>0&&(i.dateFrom=mn(n[0])),n.length>1&&(i.dateTo=mn(n[1])),os({dateFrom:null,dateTo:null,filterType:this.getFilterType(),type:t},i)},t.prototype.resetPlaceholder=function(){var e=this.localeService.getLocaleTextFunc(),t=this.translate("dateFormatOoo"),i=e("ariaFilterValue","Filter Value");this.forEachInput((function(e){e.setInputPlaceholder(t),e.setInputAriaLabel(i)}))},t.prototype.getInputs=function(e){return e>=this.dateConditionFromComps.length?[null,null]:[this.dateConditionFromComps[e],this.dateConditionToComps[e]]},t.prototype.getValues=function(e){var t=[];return this.forEachPositionInput(e,(function(e,i,n,o){i<o&&t.push(e.getDate())})),t},t.prototype.translate=function(t){return t===is.LESS_THAN?e.prototype.translate.call(this,"before"):t===is.GREATER_THAN?e.prototype.translate.call(this,"after"):e.prototype.translate.call(this,t)},t.prototype.getModelAsString=function(e){var t;return null!==(t=this.filterModelFormatter.getModelAsString(e))&&void 0!==t?t:""},t.DEFAULT_FILTER_OPTIONS=[is.EQUALS,is.NOT_EQUAL,is.LESS_THAN,is.GREATER_THAN,is.IN_RANGE,is.BLANK,is.NOT_BLANK],rs([de("userComponentFactory")],t.prototype,"userComponentFactory",void 0),t}(is),us=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ds=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return us(t,e),t.prototype.getDefaultDebounceMs=function(){return 0},t.prototype.destroy=function(){e.prototype.destroy.call(this)},t.prototype.isEventFromFloatingFilter=function(e){return e&&e.afterFloatingFilter},t.prototype.isEventFromDataChange=function(e){return null===e||void 0===e?void 0:e.afterDataChange},t.prototype.getLastType=function(){return this.lastType},t.prototype.isReadOnly=function(){return this.readOnly},t.prototype.setLastTypeFromModel=function(e){if(e){var t,i=e.operator;if(i){var n=e;t=n.conditions[0]}else t=e;this.lastType=t.type}else this.lastType=this.optionsFactory.getDefaultOption()},t.prototype.canWeEditAfterModelFromParentFilter=function(e){if(!e)return this.isTypeEditable(this.lastType);var t=e.operator;if(t)return!1;var i=e;return this.isTypeEditable(i.type)}
11,t.prototype.init=function(e){this.setSimpleParams(e,!1)},t.prototype.setSimpleParams=function(e,t){void 0===t&&(t=!0),this.optionsFactory=new fr,this.optionsFactory.init(e.filterParams,this.getDefaultFilterOptions()),t||(this.lastType=this.optionsFactory.getDefaultOption()),this.readOnly=!!e.filterParams.readOnly;var i=this.isTypeEditable(this.lastType);this.setEditable(i)},t.prototype.onParamsUpdated=function(e){this.setSimpleParams(e)},t.prototype.doesFilterHaveSingleInput=function(e){var t=this.optionsFactory.getCustomOption(e),i=(t||{}).numberOfInputs;return null==i||1==i},t.prototype.isTypeEditable=function(e){var t=[es.IN_RANGE,es.EMPTY,es.BLANK,es.NOT_BLANK];return!!e&&!this.isReadOnly()&&this.doesFilterHaveSingleInput(e)&&t.indexOf(e)<0},t}(rr),ps=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),hs=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},fs=function(e){function t(){return e.call(this,'\n            <div class="ag-floating-filter-input" role="presentation">\n                <ag-input-text-field ref="eReadOnlyText"></ag-input-text-field>\n                <div ref="eDateWrapper" style="display: flex;"></div>\n            </div>')||this}return ps(t,e),t.prototype.getDefaultFilterOptions=function(){return cs.DEFAULT_FILTER_OPTIONS},t.prototype.init=function(t){e.prototype.init.call(this,t),this.params=t,this.filterParams=t.filterParams,this.createDateComponent(),this.filterModelFormatter=new ls(this.filterParams,this.localeService,this.optionsFactory);var i=this.localeService.getLocaleTextFunc();this.eReadOnlyText.setDisabled(!0).setInputAriaLabel(i("ariaDateFilterInput","Date Filter Input"))},t.prototype.onParamsUpdated=function(t){e.prototype.onParamsUpdated.call(this,t),this.params=t,this.filterParams=t.filterParams,this.updateDateComponent(),this.filterModelFormatter.updateParams({optionsFactory:this.optionsFactory,dateFilterParams:this.filterParams}),this.updateCompOnModelChange(t.currentParentModel())},t.prototype.updateCompOnModelChange=function(e){var t=!this.isReadOnly()&&this.canWeEditAfterModelFromParentFilter(e);if(this.setEditable(t),t){if(e){var i=e;this.dateComp.setDate(wn(i.dateFrom))}else this.dateComp.setDate(null);this.eReadOnlyText.setValue("")}else this.eReadOnlyText.setValue(this.filterModelFormatter.getModelAsString(e)),this.dateComp.setDate(null)},t.prototype.setEditable=function(e){_n(this.eDateWrapper,e),_n(this.eReadOnlyText.getGui(),!e)},t.prototype.onParentModelChanged=function(t,i){this.isEventFromFloatingFilter(i)||this.isEventFromDataChange(i)||(e.prototype.setLastTypeFromModel.call(this,t),this.updateCompOnModelChange(t))},t.prototype.onDateChanged=function(){var e=this,t=this.dateComp.getDate(),i=mn(t);this.params.parentFilterInstance((function(t){if(t){var n=wn(i);t.onFloatingFilterChanged(e.getLastType()||null,n)}}))},t.prototype.getDateComponentParams=function(){var e=Dr.getDebounceMs(this.params.filterParams,this.getDefaultDebounceMs());return{onDateChanged:Y(this.onDateChanged.bind(this),e),filterParams:this.params.column.getColDef().filterParams}},t.prototype.createDateComponent=function(){var e=this;this.dateComp=new hr(this.getContext(),this.userComponentFactory,this.getDateComponentParams(),this.eDateWrapper),this.addDestroyFunc((function(){return e.dateComp.destroy()}))},t.prototype.updateDateComponent=function(){var e=this.getDateComponentParams(),t=this.gridOptionsService,i=t.api,n=t.columnApi,o=t.context;e.api=i,e.columnApi=n,e.context=o,this.dateComp.updateParams(e)},t.prototype.getFilterModelFormatter=function(){return this.filterModelFormatter},hs([de("userComponentFactory")],t.prototype,"userComponentFactory",void 0),hs([sr("eReadOnlyText")],t.prototype,"eReadOnlyText",void 0),hs([sr("eDateWrapper")],t.prototype,"eDateWrapper",void 0),t}(ds),gs=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),vs=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},ys=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},ms=function(e){function t(){return e.call(this,'\n            <div class="ag-filter-filter">\n                <ag-input-text-field class="ag-date-filter" ref="eDateInput"></ag-input-text-field>\n            </div>')||this}return gs(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this)},t.prototype.init=function(e){var t=this;this.params=e,this.setParams(e);var i=this.gridOptionsService.getDocument(),n=this.eDateInput.getInputElement();this.addManagedListener(n,"mousedown",(function(){t.eDateInput.isDisabled()||t.usingSafariDatePicker||n.focus()})),this.addManagedListener(n,"input",(function(e){e.target===i.activeElement&&(t.eDateInput.isDisabled()||t.params.onDateChanged())}))},t.prototype.setParams=function(e){var t=this.eDateInput.getInputElement(),i=this.shouldUseBrowserDatePicker(e);this.usingSafariDatePicker=i&&Yi(),t.type=i?"date":"text";var n=e.filterParams||{},o=n.minValidYear,r=n.maxValidYear,s=n.minValidDate,a=n.maxValidDate;if(s&&o&&G("DateFilter should not have both minValidDate and minValidYear parameters set at the same time! minValidYear will be ignored."),a&&r&&G("DateFilter should not have both maxValidDate and maxValidYear parameters set at the same time! maxValidYear will be ignored."),s&&a){var l=ys([s,a].map((function(e){return e instanceof Date?e:wn(e)})),2),c=l[0],u=l[1];c&&u&&c.getTime()>u.getTime()&&G("DateFilter parameter minValidDate should always be lower than or equal to parameter maxValidDate.")}s?s instanceof Date?t.min=bn(s):t.min=s:o&&(t.min="".concat(o,"-01-01")),a?a instanceof Date?t.max=bn(a):t.max=a:r&&(t.max="".concat(r,"-12-31"))},t.prototype.onParamsUpdated=function(e){this.params=e,this.setParams(e)},t.prototype.getDate=function(){return wn(this.eDateInput.getValue())},t.prototype.setDate=function(e){this.eDateInput.setValue(mn(e,!1))},t.prototype.setInputPlaceholder=function(e){this.eDateInput.setInputPlaceholder(e)},t.prototype.setDisabled=function(e){this.eDateInput.setDisabled(e)},t.prototype.afterGuiAttached=function(e){e&&e.suppressFocus||this.eDateInput.getInputElement().focus()},t.prototype.shouldUseBrowserDatePicker=function(e){return e.filterParams&&null!=e.f
11ilterParams.browserDatePicker?e.filterParams.browserDatePicker:Xi()||$i()||Yi()&&qi()>=14.1},vs([sr("eDateInput")],t.prototype,"eDateInput",void 0),t}(rr),Cs=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),bs=function(e){function t(t,i,n){return void 0===i&&(i="ag-text-field"),void 0===n&&(n="text"),e.call(this,t,i,n)||this}return Cs(t,e),t.prototype.postConstruct=function(){e.prototype.postConstruct.call(this),this.config.allowedCharPattern&&this.preventDisallowedCharacters()},t.prototype.setValue=function(t,i){return this.eInput.value!==t&&(this.eInput.value=o(t)?t:""),e.prototype.setValue.call(this,t,i)},t.prototype.setStartValue=function(e){this.setValue(e,!0)},t.prototype.preventDisallowedCharacters=function(){var e=new RegExp("[".concat(this.config.allowedCharPattern,"]")),t=function(t){Po(t)&&t.key&&!e.test(t.key)&&t.preventDefault()};this.addManagedListener(this.eInput,"keydown",t),this.addManagedListener(this.eInput,"paste",(function(t){var i,n=null===(i=t.clipboardData)||void 0===i?void 0:i.getData("text");n&&n.split("").some((function(t){return!e.test(t)}))&&t.preventDefault()}))},t}(zr),ws=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ss=function(e){function t(t){return e.call(this,t,"ag-number-field","number")||this}return ws(t,e),t.prototype.postConstruct=function(){var t=this;e.prototype.postConstruct.call(this),this.addManagedListener(this.eInput,"blur",(function(){var e=parseFloat(t.eInput.value),i=isNaN(e)?"":t.normalizeValue(e.toString());t.value!==i&&t.setValue(i)})),this.addManagedListener(this.eInput,"wheel",this.onWheel.bind(this)),this.eInput.step="any"},t.prototype.onWheel=function(e){document.activeElement===this.eInput&&e.preventDefault()},t.prototype.normalizeValue=function(e){if(""===e)return"";null!=this.precision&&(e=this.adjustPrecision(e));var 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},t.prototype.adjustPrecision=function(e,t){if(null==this.precision)return e;if(t){var i=parseFloat(e).toFixed(this.precision);return parseFloat(i).toString()}var n=String(e).split(".");if(n.length>1){if(n[1].length<=this.precision)return e;if(this.precision>0)return"".concat(n[0],".").concat(n[1].slice(0,this.precision))}return n[0]},t.prototype.setMin=function(e){return this.min===e||(this.min=e,uo(this.eInput,"min",e)),this},t.prototype.setMax=function(e){return this.max===e||(this.max=e,uo(this.eInput,"max",e)),this},t.prototype.setPrecision=function(e){return this.precision=e,this},t.prototype.setStep=function(e){return this.step===e||(this.step=e,uo(this.eInput,"step",e)),this},t.prototype.setValue=function(t,i){var n=this;return this.setValueOrInputValue((function(t){return e.prototype.setValue.call(n,t,i)}),(function(){return n}),t)},t.prototype.setStartValue=function(t){var i=this;return this.setValueOrInputValue((function(t){return e.prototype.setValue.call(i,t,!0)}),(function(e){i.eInput.value=e}),t)},t.prototype.setValueOrInputValue=function(e,t,i){if(o(i)){var n=this.isScientificNotation(i);if(n&&this.eInput.validity.valid)return e(i);
11if(!n){i=this.adjustPrecision(i);var r=this.normalizeValue(i);n=i!=r}if(n)return t(i)}return e(i)},t.prototype.getValue=function(){if(this.eInput.validity.valid){var t=this.eInput.value;return this.isScientificNotation(t)?this.adjustPrecision(t,!0):e.prototype.getValue.call(this)}},t.prototype.isScientificNotation=function(e){return"string"===typeof e&&e.includes("e")},t}(bs),Es=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),xs=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Es(t,e),t.prototype.conditionToString=function(e,t){var i=(t||{}).numberOfInputs,n=e.type==es.IN_RANGE||2===i;return n?"".concat(this.formatValue(e.filter),"-").concat(this.formatValue(e.filterTo)):null!=e.filter?this.formatValue(e.filter):"".concat(e.type)},t}(Qr);function Os(e){var t=(null!==e&&void 0!==e?e:{}).allowedCharPattern;return null!==t&&void 0!==t?t:null}var Ts,Ds,Rs=function(e){function t(){var t=e.call(this,"numberFilter")||this;return t.eValuesFrom=[],t.eValuesTo=[],t}return Es(t,e),t.prototype.refresh=function(t){return this.numberFilterParams.allowedCharPattern===t.allowedCharPattern&&e.prototype.refresh.call(this,t)},t.prototype.mapValuesFromModel=function(e){var t=e||{},i=t.filter,n=t.filterTo,o=t.type;return[this.processValue(i),this.processValue(n)].slice(0,this.getNumberOfInputs(o))},t.prototype.getDefaultDebounceMs=function(){return 500},t.prototype.comparator=function(){return function(e,t){return e===t?0:e<t?1:-1}},t.prototype.setParams=function(t){this.numberFilterParams=t,e.prototype.setParams.call(this,t),this.filterModelFormatter=new xs(this.localeService,this.optionsFactory,this.numberFilterParams.numberFormatter)},t.prototype.getDefaultFilterOptions=function(){return t.DEFAULT_FILTER_OPTIONS},t.prototype.setElementValue=function(t,i,n){var o=!n&&this.numberFilterParams.numberFormatter?this.numberFilterParams.numberFormatter(null!==i&&void 0!==i?i:null):i;e.prototype.setElementValue.call(this,t,o)},t.prototype.createValueElement=function(){var e=Os(this.numberFilterParams),t=document.createElement("div");return t.classList.add("ag-filter-body"),si(t,"presentation"),this.createFromToElement(t,this.eValuesFrom,"from",e),this.createFromToElement(t,this.eValuesTo,"to",e),t},t.prototype.createFromToElement=function(e,t,i,n){var o=this.createManagedBean(n?new bs({allowedCharPattern:n}):new Ss);o.addCssClass("ag-filter-".concat(i)),o.addCssClass("ag-filter-filter"),t.push(o),e.appendChild(o.getGui())},t.prototype.removeValueElements=function(e,t){this.removeComponents(this.eValuesFrom,e,t),this.removeComponents(this.eValuesTo,e,t)},t.prototype.getValues=function(e){var t=this,i=[];return this.forEachPositionInput(e,(function(e,n,o,r){n<r&&i.push(t.processValue(t.stringToFloat(e.getValue())))})),i},t.prototype.areSimpleModelsEqual=function(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type},t.prototype.getFilterType=function(){return"number"},t.prototype.processValue=function(e){return null==e||isNaN(e)?null:e},t.prototype.stringToFloat=function(e){if("number"===typeof e)return e;var t=n(e);return null!=t&&""===t.trim()&&(t=null),this.numberFilterParams.numberParser?this.numberFilterParams.numberParser(t):null==t||"-"===t.trim()?null:parseFloat(t)},t.prototype.createCondition=function(e){var t=this.getConditionType(e),i={filterType:this.getFilterType(),type:t},n=this.getValues(e);return n.length>0&&(i.filter=n[0]),n.length>1&&(i.filterTo=n[1]),i},t.prototype.getInputs=function(e){return e>=this.eValuesFrom.length?[null,null]:[this.eValuesFrom[e],this.eValuesTo[e]]},t.prototype.getModelAsString=function(e){var t;return null!==(t=this.filterModelFormatter.getModelAsString(e))&&void 0!==t?t:""},t.prototype.hasInvalidInputs=function(){var e=!1;return this.forEachInput((function(t){t.getInputElement().validity.valid||(e=!0)})),e},t.DEFAULT_FILTER_OPTIONS=[is.EQUALS,is.NOT_EQUAL,is.GREATER_THAN,is.GREATER_THAN_OR_EQUAL,is.LESS_THAN,is.LESS_THAN_OR_EQUAL,is.IN_RANGE,is.BLANK,is.NOT_BLANK],t}(is),As=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),_s=function(){return _s=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},_s.apply(this,arguments)},Ps=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return As(t,e),t.prototype.conditionToString=function(e,t){var i=(t||{}).numberOfInputs,n=e.type==es.IN_RANGE||2===i;
11return n?"".concat(e.filter,"-").concat(e.filterTo):null!=e.filter?"".concat(e.filter):"".concat(e.type)},t}(Qr),Ms=function(e){function t(){var t=e.call(this,"textFilter")||this;return t.eValuesFrom=[],t.eValuesTo=[],t}return As(t,e),t.trimInput=function(e){var t=e&&e.trim();return""===t?e:t},t.prototype.getDefaultDebounceMs=function(){return 500},t.prototype.setParams=function(i){this.textFilterParams=i,e.prototype.setParams.call(this,i),this.matcher=this.getTextMatcher(),this.formatter=this.textFilterParams.textFormatter||(this.textFilterParams.caseSensitive?t.DEFAULT_FORMATTER:t.DEFAULT_LOWERCASE_FORMATTER),this.filterModelFormatter=new Ps(this.localeService,this.optionsFactory)},t.prototype.getTextMatcher=function(){var e=this.textFilterParams.textCustomComparator;return e?(Ko.warnOnce("textCustomComparator is deprecated, use textMatcher instead."),function(t){var i=t.filterOption,n=t.value,o=t.filterText;return e(i,n,o)}):this.textFilterParams.textMatcher||t.DEFAULT_MATCHER},t.prototype.createCondition=function(e){var t=this.getConditionType(e),i={filterType:this.getFilterType(),type:t},n=this.getValuesWithSideEffects(e,!0);return n.length>0&&(i.filter=n[0]),n.length>1&&(i.filterTo=n[1]),i},t.prototype.getFilterType=function(){return"text"},t.prototype.areSimpleModelsEqual=function(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type},t.prototype.getInputs=function(e){return e>=this.eValuesFrom.length?[null,null]:[this.eValuesFrom[e],this.eValuesTo[e]]},t.prototype.getValues=function(e){return this.getValuesWithSideEffects(e,!1)},t.prototype.getValuesWithSideEffects=function(e,i){var o=this,r=[];return this.forEachPositionInput(e,(function(e,s,a,l){var c;if(s<l){var u=n(e.getValue());i&&o.textFilterParams.trimInput&&(u=null!==(c=t.trimInput(u))&&void 0!==c?c:null,e.setValue(u,!0)),r.push(u)}})),r},t.prototype.getDefaultFilterOptions=function(){return t.DEFAULT_FILTER_OPTIONS},t.prototype.createValueElement=function(){var e=document.createElement("div");return e.classList.add("ag-filter-body"),si(e,"presentation"),this.createFromToElement(e,this.eValuesFrom,"from"),this.createFromToElement(e,this.eValuesTo,"to"),e},t.prototype.createFromToElement=function(e,t,i){var n=this.createManagedBean(new bs);n.addCssClass("ag-filter-".concat(i)),n.addCssClass("ag-filter-filter"),t.push(n),e.appendChild(n.getGui())},t.prototype.removeValueElements=function(e,t){this.removeComponents(this.eValuesFrom,e,t),this.removeComponents(this.eValuesTo,e,t)},t.prototype.mapValuesFromModel=function(e){var t=e||{},i=t.filter,n=t.filterTo,o=t.type;return[i||null,n||null].slice(0,this.getNumberOfInputs(o))},t.prototype.evaluateNullValue=function(e){var t=[es.NOT_EQUAL,es.NOT_CONTAINS,es.BLANK];return!!e&&t.indexOf(e)>=0},t.prototype.evaluateNonNullValue=function(e,t,i,n){var o=this,r=e.map((function(e){return o.formatter(e)}))||[],s=this.formatter(t),a=this.textFilterParams,l=a.api,c=a.colDef,u=a.column,d=a.columnApi,p=a.context,h=a.textFormatter;if(i.type===es.BLANK)return this.isBlank(t);if(i.type===es.NOT_BLANK)return!this.isBlank(t);var f={api:l,colDef:c,column:u,columnApi:d,context:p,node:n.node,data:n.data,filterOption:i.type,value:s,textFormatter:h};return r.some((function(e){return o.matcher(_s(_s({},f),{filterText:e}))}))},t.prototype.getModelAsString=function(e){var t;return null!==(t=this.filterModelFormatter.getModelAsString(e))&&void 0!==t?t:""},t.DEFAULT_FILTER_OPTIONS=[es.CONTAINS,es.NOT_CONTAINS,es.EQUALS,es.NOT_EQUAL,es.STARTS_WITH,es.ENDS_WITH,es.BLANK,es.NOT_BLANK],t.DEFAULT_FORMATTER=function(e){return e},t.DEFAULT_LOWERCASE_FORMATTER=function(e){return null==e?null:e.toString().toLowerCase()},t.DEFAULT_MATCHER=function(e){var i=e.filterOption,n=e.value,o=e.filterText;if(null==o)return!1;switch(i){case t.CONTAINS:return n.indexOf(o)>=0;case t.NOT_CONTAINS:return n.indexOf(o)<0;case t.EQUALS:return n===o;case t.NOT_EQUAL:return n!=o;case t.STARTS_WITH:return 0===n.indexOf(o);case t.ENDS_WITH:var r=n.lastIndexOf(o);return r>=0&&r===n.length-o.length;default:return!1}},t}(es),ks=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ns=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Ls=function(e){function t(t){var i=e.call(this)||this;return i.params=t,i.valueChangedListener=function(){},i}return ks(t,e),t.prototype.setupGui=function(e){var t,i=this;this.eFloatingFilterTextInput=this.createManagedBean(new bs(null===(t=this.params)||void 0===t?void 0:t.config));var n=this.eFloatingFilterTextInput.getGui();e.appendChild(n),this.addManagedListener(n,"input",(function(e){return i.valueChangedListener(e)})),this.addManagedListener(n,"keydown",(function(e){return i.valueChangedListener(e)}))},t.prototype.setEditable=function(e){this.eFloatingFilterTextInput.setDisabled(!e)},t.prototype.setAutoComplete=function(e){this.eFloatingFilterTextInput.setAutoComplete(e)},t.prototype.getValue=function(){return this.eFloatingFilterTextInput.getValue()},t.prototype.setValue=function(e,t){this.eFloatingFilterTextInput.setValue(e,t)},t.prototype.setValueChangedListener=function(e){this.valueChangedListener=e},t.prototype.setParams=function(e){this.setAriaLabel(e.ariaLabel),void 0!==e.autoComplete&&this.setAutoComplete(e.autoComplete)},t.prototype.setAriaLabel=function(e){this.eFloatingFilterTextInput.setInputAriaLabel(e)},t}(st),Is=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ks(t,e),t.prototype.postConstruct=function(){this.setTemplate('\n            <div class="ag-floating-filter-input" role="presentation" ref="eFloatingFilterInputContainer"></div>\n        ')},t.prototype.getDefaultDebounceMs=function(){return 500},t.prototype.onParentModelChanged=function(e,t){this.isEventFromFloatingFilter(t)||this.isEventFromDataChange(t)||(this.setLastTypeFromModel(e),this.setEditable(this.canWeEditAfterModelFromParentFilter(e)),this.floatingFilterInputService.setValue(this.getFilterModelFormatter().getModelAsString(e)))},t.prototype.init=function(t){this.setupFloatingFilterInputService(t),e.prototype.init.call(this,t),this.setTextInputParams(t)},t.prototype.setupFloatingFilterInputService=function(e){this.floatingFilterInputService=this.createFloatingFilterInputService(e),this.floatingFilterInputService.setupGui(this.eFloatingFilterInputContainer)},t.prototype.setTextInputParams=function(e){var t;this.params=e;var i=null!==(t=e.browserAutoComplete)&&void 0!==t&&t;if(this.floatingFilterInputService.setParams({ariaLabel:this.getAriaLabel(e),autoComplete:i}),this.applyActive=Dr.isUseApplyButton(this.params.filterParams),!this.isReadOnly()){var n=Dr.getDebounceMs(this.params.filterParams,this.getDefaultDebounceMs()),o=Y(this.syncUpWithParentFilter.bind(this),n);this.floatingFilterInputService.setValueChangedListener(o)}},t.prototype.onParamsUpdated=function(t){e.prototype.onParamsUpdated.call(this,t),this.setTextInputParams(t)},t.prototype.recreateFloatingFilterInputService=function(e){var t=this.floatingFilterInputService.getValue();Wn(this.eFloatingFilterInputContainer),this.destroyBean(this.floatingFilterInputService),this.setupFloatingFilterInputService(e),this.floatingFilterInputService.setValue(t,!0)},t.prototype.getAriaLabel=function(e){var t=this.columnModel.getDisplayNameForColumn(e.column,"header",!0),i=this.localeService.getLocaleTextFunc();return"".concat(t," ").concat(i("ariaFilterInput","Filter Input"))},t.prototype.syncUpWithParentFilter=function(e){var t=this,i=e.key===xo.ENTE
11R;if(!this.applyActive||i){var n=this.floatingFilterInputService.getValue();this.params.filterParams.trimInput&&(n=Ms.trimInput(n),this.floatingFilterInputService.setValue(n,!0)),this.params.parentFilterInstance((function(e){e&&e.onFloatingFilterChanged(t.getLastType()||null,n||null)}))}},t.prototype.setEditable=function(e){this.floatingFilterInputService.setEditable(e)},Ns([de("columnModel")],t.prototype,"columnModel",void 0),Ns([sr("eFloatingFilterInputContainer")],t.prototype,"eFloatingFilterInputContainer",void 0),Ns([le],t.prototype,"postConstruct",null),t}(ds),Fs=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Gs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.valueChangedListener=function(){},t.numberInputActive=!0,t}return Fs(t,e),t.prototype.setupGui=function(e){var t=this;this.eFloatingFilterNumberInput=this.createManagedBean(new Ss),this.eFloatingFilterTextInput=this.createManagedBean(new bs),this.eFloatingFilterTextInput.setDisabled(!0);var i=this.eFloatingFilterNumberInput.getGui(),n=this.eFloatingFilterTextInput.getGui();e.appendChild(i),e.appendChild(n),this.setupListeners(i,(function(e){return t.valueChangedListener(e)})),this.setupListeners(n,(function(e){return t.valueChangedListener(e)}))},t.prototype.setEditable=function(e){this.numberInputActive=e,this.eFloatingFilterNumberInput.setDisplayed(this.numberInputActive),this.eFloatingFilterTextInput.setDisplayed(!this.numberInputActive)},t.prototype.setAutoComplete=function(e){this.eFloatingFilterNumberInput.setAutoComplete(e),this.eFloatingFilterTextInput.setAutoComplete(e)},t.prototype.getValue=function(){return this.getActiveInputElement().getValue()},t.prototype.setValue=function(e,t){this.getActiveInputElement().setValue(e,t)},t.prototype.getActiveInputElement=function(){return this.numberInputActive?this.eFloatingFilterNumberInput:this.eFloatingFilterTextInput},t.prototype.setValueChangedListener=function(e){this.valueChangedListener=e},t.prototype.setupListeners=function(e,t){this.addManagedListener(e,"input",t),this.addManagedListener(e,"keydown",t)},t.prototype.setParams=function(e){this.setAriaLabel(e.ariaLabel),void 0!==e.autoComplete&&this.setAutoComplete(e.autoComplete)},t.prototype.setAriaLabel=function(e){this.eFloatingFilterNumberInput.setInputAriaLabel(e),this.eFloatingFilterTextInput.setInputAriaLabel(e)},t}(st),Vs=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Fs(t,e),t.prototype.init=function(t){var i;e.prototype.init.call(this,t),this.filterModelFormatter=new xs(this.localeService,this.optionsFactory,null===(i=t.filterParams)||void 0===i?void 0:i.numberFormatter)},t.prototype.onParamsUpdated=function(t){var i=Os(t.filterParams);i!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(t),e.prototype.onParamsUpdated.call(this,t),this.filterModelFormatter.updateParams({optionsFactory:this.optionsFactory})},t.prototype.getDefaultFilterOptions=function(){return Rs.DEFAULT_FILTER_OPTIONS},t.prototype.getFilterModelFormatter=function(){return this.filterModelFormatter},t.prototype.createFloatingFilterInputService=function(e){return this.allowedCharPattern=Os(e.filterParams),this.allowedCharPattern?this.createManagedBean(new Ls({config:{allowedCharPattern:this.allowedCharPattern}})):this.createManagedBean(new Gs)},t}(Is),Bs=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),js=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Bs(t,e),t.prototype.init=function(t){e.prototype.init.call(this,t),this.filterModelFormatter=new Ps(this.localeService,this.optionsFactory)},t.prototype.onParamsUpdated=function(t){e.prototype.onParamsUpdated.call(this,t),this.filterModelFormatter.updateParams({optionsFactory:this.optionsFactory})},t.prototype.getDefaultFilterOptions=function(){return Ms.DEFAULT_FILTER_OPTIONS},t.prototype.getFilterModelFormatter=function(){return this.filterModelFormatter},t.prototype.createFloatingFilterInputService=function(){return this.createManagedBean(new Ls)},t}(Is),Hs=function(){function e(e,t){void 0===t&&(t=!1);var i=this;this.destroyFuncs=[],this.touching=!1,this.eventService=new me,this.eElement=e,this.preventMouseClick=t;var n=this.onTouchStart.bind(this),o=this.onTouchMove.bind(this),r=this.onTouchEnd.bind(this);this.eElement.addEventListener("touchstart",n,{passive:!0}),this.eElement.addEventListener("touchmove",o,{passive:!0}),this.eElement.addEventListener("touchend",r,{passive:!1}),this.destroyFuncs.push((function(){i.eElement.removeEventListener("touchstart",n,{passive:!0}),i.eElement.removeEventListener("touchmove",o,{passive:!0}),i.eElement.removeEventListener("touchend",r,{passive:!1})}
11))}return e.prototype.getActiveTouch=function(e){for(var t=0;t<e.length;t++){var i=e[t].identifier===this.touchStart.identifier;if(i)return e[t]}return null},e.prototype.addEventListener=function(e,t){this.eventService.addEventListener(e,t)},e.prototype.removeEventListener=function(e,t){this.eventService.removeEventListener(e,t)},e.prototype.onTouchStart=function(t){var i=this;if(!this.touching){this.touchStart=t.touches[0],this.touching=!0,this.moved=!1;var n=this.touchStart;window.setTimeout((function(){var o=i.touchStart===n;if(i.touching&&o&&!i.moved){i.moved=!0;var r={type:e.EVENT_LONG_TAP,touchStart:i.touchStart,touchEvent:t};i.eventService.dispatchEvent(r)}}),500)}},e.prototype.onTouchMove=function(e){if(this.touching){var t=this.getActiveTouch(e.touches);if(t){var i=!Fo(t,this.touchStart,4);i&&(this.moved=!0)}}},e.prototype.onTouchEnd=function(t){if(this.touching){if(!this.moved){var i={type:e.EVENT_TAP,touchStart:this.touchStart};this.eventService.dispatchEvent(i),this.checkForDoubleTap()}this.preventMouseClick&&t.cancelable&&t.preventDefault(),this.touching=!1}},e.prototype.checkForDoubleTap=function(){var t=(new Date).getTime();if(this.lastTapTime&&this.lastTapTime>0){var i=t-this.lastTapTime;if(i>e.DOUBLE_TAP_MILLIS){var n={type:e.EVENT_DOUBLE_TAP,touchStart:this.touchStart};this.eventService.dispatchEvent(n),this.lastTapTime=null}else this.lastTapTime=t}else this.lastTapTime=t},e.prototype.destroy=function(){this.destroyFuncs.forEach((function(e){return e()}))},e.EVENT_TAP="tap",e.EVENT_DOUBLE_TAP="doubleTap",e.EVENT_LONG_TAP="longTap",e.DOUBLE_TAP_MILLIS=500,e}(),Ws=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Us=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},zs=function(e){function t(i){var n=e.call(this)||this;return i||n.setTemplate(t.TEMPLATE),n}return Ws(t,e),t.prototype.attachCustomElements=function(e,t,i,n,o){this.eSortOrder=e,this.eSortAsc=t,this.eSortDesc=i,this.eSortMixed=n,this.eSortNone=o},t.prototype.setupSort=function(e,t){var i=this;void 0===t&&(t=!1),this.column=e,this.suppressOrder=t,this.setupMultiSortIndicator(),this.column.isSortable()&&(this.addInIcon("sortAscending",this.eSortAsc,e),this.addInIcon("sortDescending",this.eSortDesc,e),this.addInIcon("sortUnSort",this.eSortNone,e),this.addManagedPropertyListener("unSortIcon",(function(){return i.updateIcons()})),this.addManagedListener(this.eventService,ht.EVENT_NEW_COLUMNS_LOADED,(function(){return i.updateIcons()})),this.addManagedListener(this.eventService,ht.EVENT_SORT_CHANGED,(function(){return i.onSortChanged()})),this.addManagedListener(this.eventService,ht.EVENT_COLUMN_ROW_GROUP_CHANGED,(function(){return i.onSortChanged()})),this.onSortChanged())},t.prototype.addInIcon=function(e,t,i){if(null!=t){var n=So(e,this.gridOptionsService,i);n&&t.appendChild(n)}},t.prototype.onSortChanged=function(){this.updateIcons(),this.suppressOrder||this.updateSortOrder()},t.prototype.updateIcons=function(){var e=this.sortController.getDisplaySortForColumn(this.column);if(this.eSortAsc){var t="asc"===e;_n(this.eSortAsc,t,{skipAriaHidden:!0})}if(this.eSortDesc){var i="desc"===e;_n(this.eSortDesc,i,{skipAriaHidden:!0})}if(this.eSortNone){var n=!this.column.getColDef().unSortIcon&&!this.gridOptionsService.get("unSortIcon"),o=null===e||void 0===e;_n(this.eSortNone,!n&&o,{skipAriaHidden:!0})}},t.prototype.setupMultiSortIndicator=function(){var e=this;this.addInIcon("sortUnSort",this.eSortMixed,this.column);var t=this.column.getColDef().showRowGroup,i=this.gridOptionsService.isColumnsSortingCoupledToGroup();i&&t&&(this.addManagedListener(this.eventService,ht.EVENT_SORT_CHANGED,(function(){return e.updateMultiSortIndicator()}
11)),this.addManagedListener(this.eventService,ht.EVENT_COLUMN_ROW_GROUP_CHANGED,(function(){return e.updateMultiSortIndicator()})),this.updateMultiSortIndicator())},t.prototype.updateMultiSortIndicator=function(){if(this.eSortMixed){var e="mixed"===this.sortController.getDisplaySortForColumn(this.column);_n(this.eSortMixed,e,{skipAriaHidden:!0})}},t.prototype.updateSortOrder=function(){var e,t=this;if(this.eSortOrder){var i=this.sortController.getColumnsWithSortingOrdered(),n=null!==(e=this.sortController.getDisplaySortIndexForColumn(this.column))&&void 0!==e?e:-1,o=i.some((function(e){var i;return null!==(i=t.sortController.getDisplaySortIndexForColumn(e))&&void 0!==i&&i})),r=n>=0&&o;_n(this.eSortOrder,r,{skipAriaHidden:!0}),n>=0?this.eSortOrder.innerHTML=(n+1).toString():Wn(this.eSortOrder)}},t.TEMPLATE='<span class="ag-sort-indicator-container">\n            <span ref="eSortOrder" class="ag-sort-indicator-icon ag-sort-order ag-hidden" aria-hidden="true"></span>\n            <span ref="eSortAsc" class="ag-sort-indicator-icon ag-sort-ascending-icon ag-hidden" aria-hidden="true"></span>\n            <span ref="eSortDesc" class="ag-sort-indicator-icon ag-sort-descending-icon ag-hidden" aria-hidden="true"></span>\n            <span ref="eSortMixed" class="ag-sort-indicator-icon ag-sort-mixed-icon ag-hidden" aria-hidden="true"></span>\n            <span ref="eSortNone" class="ag-sort-indicator-icon ag-sort-none-icon ag-hidden" aria-hidden="true"></span>\n        </span>',Us([sr("eSortOrder")],t.prototype,"eSortOrder",void 0),Us([sr("eSortAsc")],t.prototype,"eSortAsc",void 0),Us([sr("eSortDesc")],t.prototype,"eSortDesc",void 0),Us([sr("eSortMixed")],t.prototype,"eSortMixed",void 0),Us([sr("eSortNone")],t.prototype,"eSortNone",void 0),Us([de("columnModel")],t.prototype,"columnModel",void 0),Us([de("sortController")],t.prototype,"sortController",void 0),t}(rr),Ks=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ys=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},qs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.lastMovingChanged=0,t}return Ks(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this)},t.prototype.refresh=function(e){return this.params=e,this.workOutTemplate()==this.currentTemplate&&(this.workOutShowMenu()==this.currentShowMenu&&(this.workOutSort()==this.currentSort&&(this.shouldSuppressMenuHide()==this.currentSuppressMenuHide&&(this.setDisplayName(e),!0))))},t.prototype.workOutTemplate=function(){var e=De(this.params.template,t.TEMPLATE);return e=e&&e.trim?e.trim():e,e},t.prototype.init=function(e){this.params=e,this.currentTemplate=this.workOutTemplate(),this.setTemplate(this.currentTemplate),this.setupTap(),this.setupIcons(e.column),this.setMenu(),this.setupSort(),this.setupFilterIcon(),this.setDisplayName(e)},t.prototype.setDisplayName=function(e){if(this.currentDisplayName!=e.displayName){this.currentDisplayName=e.displayName;var t=Et(this.currentDisplayName);this.eText&&(this.eText.innerHTML=t)}},t.prototype.setupIcons=function(e){this.addInIcon("menu",this.eMenu,e),this.addInIcon("filter",this.eFilter,e)},t.prototype.addInIcon=function(e,t,i){if(null!=t){var n=So(e,this.gridOptionsService,i);n&&t.appendChild(n)}},t.prototype.setupTap=function(){var e=this,t=this.gridOptionsService;if(!t.get("suppressTouch")){var i=new Hs(this.getGui(),!0),n=t.get("suppressMenuHide"),r=n&&o(this.eMenu),s=r?new Hs(this.eMenu,!0):i;if(this.params.enableMenu){var a=r?"EVENT_TAP":"EVENT_LONG_TAP",l=function(i){t.api.showColumnMenuAfterMouseClick(e.params.column,i.touchStart)};this.addManagedListener(s,Hs[a],l)}if(this.params.enableSorting){var c=function(t){var i=t.touchStart.target;n&&e.eMenu.contains(i)||e.sortController.progressSort(e.params.column,!1,"uiColumnSorted")};this.addManagedListener(i,Hs.EVENT_TAP,c)}this.addDestroyFunc((function(){return i.destroy()})),r&&this.addDestroyFunc((function(){return s.destroy()}))}},t.prototype.workOutShowMenu=function(){var e=!this.gridOptionsService.get("suppressMenuHide"),t=Ji()&&e,i=this.params.enableMenu&&!t;return i},t.prototype.shouldSuppressMenuHide=function(){return this.gridOptionsService.get("suppressMenuHide")},t.prototype.setMenu=function(){var e=this;this.eMenu&&(this.currentShowMenu=this.workOutShowMenu(),this.currentShowMenu?(this.currentSuppressMenuHide=this.shouldSuppressMenuHide(),this.addManagedListener(this.eMenu,"click",(function(){return e.showMenu(e.eMenu)})),this.eMenu.classList.toggle("ag-header-menu-always-show",this.currentSuppressMenuHide)):Un(this.eMenu))},t.prototype.showMenu=function(e){e||(e=this.eMenu),this.menuFactory.showMenuAfterButtonClick(this.params.column,e,"columnMenu")},t.prototype.workOutSort=function(){return this.params.enableSorting},t.prototype.setupSort=function(){var e=this;if(this.currentSort=this.params.enableSorting,this.eSortIndicator||(this.eSortIndicator=this.context.createBean(new zs(!0)),this.eSortIndicator.attachCustomElements(this.eSortOrder,this.eSortAsc,this.eSortDe
11sc,this.eSortMixed,this.eSortNone)),this.eSortIndicator.setupSort(this.params.column),this.currentSort){this.addManagedListener(this.params.column,Ee.EVENT_MOVING_CHANGED,(function(){e.lastMovingChanged=(new Date).getTime()})),this.eLabel&&this.addManagedListener(this.eLabel,"click",(function(t){var i=e.params.column.isMoving(),n=(new Date).getTime(),o=n-e.lastMovingChanged<50,r=i||o;if(!r){var s="ctrl"===e.gridOptionsService.get("multiSortKey"),a=s?t.ctrlKey||t.metaKey:t.shiftKey;e.params.progressSort(a)}}));var t=function(){if(e.addOrRemoveCssClass("ag-header-cell-sorted-asc",e.params.column.isSortAscending()),e.addOrRemoveCssClass("ag-header-cell-sorted-desc",e.params.column.isSortDescending()),e.addOrRemoveCssClass("ag-header-cell-sorted-none",e.params.column.isSortNone()),e.params.column.getColDef().showRowGroup){var t=e.columnModel.getSourceColumnsForGroupColumn(e.params.column),i=null===t||void 0===t?void 0:t.every((function(t){return e.params.column.getSort()==t.getSort()})),n=!i;e.addOrRemoveCssClass("ag-header-cell-sorted-mixed",n)}};this.addManagedListener(this.eventService,ht.EVENT_SORT_CHANGED,t),this.addManagedListener(this.eventService,ht.EVENT_COLUMN_ROW_GROUP_CHANGED,t)}},t.prototype.setupFilterIcon=function(){this.eFilter&&(this.addManagedListener(this.params.column,Ee.EVENT_FILTER_CHANGED,this.onFilterChanged.bind(this)),this.onFilterChanged())},t.prototype.onFilterChanged=function(){var e=this.params.column.isFilterActive();_n(this.eFilter,e,{skipAriaHidden:!0})},t.TEMPLATE='<div class="ag-cell-label-container" role="presentation">\n            <span ref="eMenu" class="ag-header-icon ag-header-cell-menu-button" aria-hidden="true"></span>\n            <div ref="eLabel" class="ag-header-cell-label" role="presentation">\n                <span ref="eText" class="ag-header-cell-text"></span>\n                <span ref="eFilter" class="ag-header-icon ag-header-label-icon ag-filter-icon" aria-hidden="true"></span>\n                <ag-sort-indicator ref="eSortIndicator"></ag-sort-indicator>\n            </div>\n        </div>',Ys([de("sortController")],t.prototype,"sortController",void 0),Ys([de("menuFactory")],t.prototype,"menuFactory",void 0),Ys([de("columnModel")],t.prototype,"columnModel",void 0),Ys([sr("eFilter")],t.prototype,"eFilter",void 0),Ys([sr("eSortIndicator")],t.prototype,"eSortIndicator",void 0),Ys([sr("eMenu")],t.prototype,"eMenu",void 0),Ys([sr("eLabel")],t.prototype,"eLabel",void 0),Ys([sr("eText")],t.prototype,"eText",void 0),Ys([sr("eSortOrder")],t.prototype,"eSortOrder",void 0),Ys([sr("eSortAsc")],t.prototype,"eSortAsc",void 0),Ys([sr("eSortDesc")],t.prototype,"eSortDesc",void 0),Ys([sr("eSortMixed")],t.prototype,"eSortMixed",void 0),Ys([sr("eSortNone")],t.prototype,"eSortNone",void 0),t}(rr),Xs=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),$s=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Zs=function(e){function t(){return e.call(this,t.TEMPLATE)||this}return Xs(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this)},t.prototype.init=function(e){this.params=e,this.checkWarnings(),this.setupLabel(),this.addGroupExpandIcon(),this.setupExpandIcons()},t.prototype.checkWarnings=function(){var e=this.params;e.template&&G("A template was provided for Header Group Comp - templates are only supported for Header Comps (not groups)")},t.prototype.setupExpandIcons=function(){var e=this;this.addInIcon("columnGroupOpened","agOpened"),this.addInIcon("columnGroupClosed","agClosed");var t=function(t){if(!Ze(t)){var i=!e.params.columnGroup.isExpanded();e.columnModel.setColumnGroupOpened(e.params.columnGroup.getProvidedColumnGroup(),i,"uiColumnExpanded")}};this.addTouchAndClickListeners(this.eCloseIcon,t),this.addTouchAndClickListeners(this.eOpenIcon,t);var i=function(e){$e(e)};this.addManagedListener(this.eCloseIcon,"dblclick",i),this.addManagedListener(this.eOpenIcon,"dblclick",i),this.addManagedListener(this.getGui(),"dblclick",t),this.updateIconVisibility();var n=this.params.columnGroup.getProvidedColumnGroup();this.addManagedListener(n,Oe.EVENT_EXPANDED_CHANGED,this.updateIconVisibility.bind(this)),this.addManagedListener(n,Oe.EVENT_EXPANDABLE_CHANGED,this.updateIconVisibility.bind(this))},t.prototype.addTouchAndClickListeners=function(e,t){var i=new Hs(e,!0);this.addManagedListener(i,Hs.EVENT_TAP,t),this.addDestroyFunc((function(){return i.destroy()})),this.addManagedListener(e,"click",t)},t.prototype.updateIconVisibility=function(){var e=this.params.columnGroup;if(e.isExpandable()){var t=this.params.columnGroup.isExpanded();_n(this.eOpenIcon,t),_n(this.eCloseIcon,!t)}else _n(this.eOpenIcon,!1),_n(this.eCloseIcon,!1)},t.prototype.addInIcon=function(e,t){var i=So(e,this.gridOptionsService,null);i&&this.getRefElement(t).appendChild(i)},t.prototype.addGroupExpandIcon=function(){if(!this.params.columnGroup.isExpandable())return _n(this.eOpenIcon,!1),void _n(this.eCloseIcon,!1)},t.prototype.setupLabel=function(){var e,t=this.params,i=t.displayName,n=t.columnGroup;if(o(i)){var r=Et(i);this.getRefElement("agLabel").innerHTML=r}this.addOrRemoveCssClass("ag-sticky-label",!(null===(e=n.getColGroupDef())||void 0===e?void 0:e.suppressStickyLabel))},t.TEMPLATE='<div class="ag-header-group-cell-label" ref="agContainer" role="presentation">
11\n            <span ref="agLabel" class="ag-header-group-text" role="presentation"></span>\n            <span ref="agOpened" class="ag-header-icon ag-header-expand-icon ag-header-expand-icon-expanded"></span>\n            <span ref="agClosed" class="ag-header-icon ag-header-expand-icon ag-header-expand-icon-collapsed"></span>\n        </div>',$s([de("columnModel")],t.prototype,"columnModel",void 0),$s([sr("agOpened")],t.prototype,"eOpenIcon",void 0),$s([sr("agClosed")],t.prototype,"eCloseIcon",void 0),t}(rr),Js=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Qs=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Js(t,e),t.prototype.isPopup=function(){return!0},t.prototype.setParentComponent=function(t){t.addCssClass("ag-has-popup"),e.prototype.setParentComponent.call(this,t)},t.prototype.destroy=function(){var t=this.parentComponent,i=t&&t.isAlive();i&&t.getGui().classList.remove("ag-has-popup"),e.prototype.destroy.call(this)},t}(rr),ea=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ta=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},ia=function(e){function t(){return e.call(this,t.TEMPLATE)||this}return ea(t,e),t.prototype.init=function(e){this.params=e,this.focusAfterAttached=e.cellStartedEdit,this.eTextArea.setMaxLength(e.maxLength||200).setCols(e.cols||60).setRows(e.rows||10),o(e.value,!0)&&this.eTextArea.setValue(e.value.toString(),!0),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.activateTabIndex()},t.prototype.onKeyDown=function(e){var t=e.key;(t===xo.LEFT||t===xo.UP||t===xo.RIGHT||t===xo.DOWN||e.shiftKey&&t===xo.ENTER)&&e.stopPropagation()},t.prototype.afterGuiAttached=function(){var e=this.localeService.getLocaleTextFunc();this.eTextArea.setInputAriaLabel(e("ariaInputEditor","Input Editor")),this.focusAfterAttached&&this.eTextArea.getFocusableElement().focus()},t.prototype.getValue=function(){var e=this.eTextArea.getValue();return o(e)||o(this.params.value)?this.params.parseValue(e):this.params.value},t.TEMPLATE='<div class="ag-large-text">\n            <ag-input-text-area ref="eTextArea" class="ag-large-text-input"></ag-input-text-area>\n        </div>',ta([sr("eTextArea")],t.prototype,"eTextArea",void 0),t}(Qs),na=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),oa=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},ra=function(e){function t(){var t=e.call(this,'<div class="ag-cell-edit-wrapper">\n                <ag-select class="ag-cell-editor" ref="eSelect"></ag-select>\n            </div>')||this;return t.startedByEnter=!1,t}return na(t,e),t.prototype.init=function(e){this.focusAfterAttached=e.cellStartedEdit;var t=this,i=t.eSelect,n=t.valueFormatterService,o=t.gridOptionsService,s=e.values,a=e.value,l=e.eventKe
11y;if(r(s))console.warn("AG Grid: no values found for select cellEditor");else{this.startedByEnter=null!=l&&l===xo.ENTER;var c=!1;s.forEach((function(t){var o={value:t},r=n.formatValue(e.column,null,t),s=null!==r&&void 0!==r;o.text=s?r:t,i.addOption(o),c=c||a===t})),c?i.setValue(e.value,!0):e.values.length&&i.setValue(e.values[0],!0);var u=e.valueListGap,d=e.valueListMaxWidth,p=e.valueListMaxHeight;null!=u&&i.setPickerGap(u),null!=p&&i.setPickerMaxHeight(p),null!=d&&i.setPickerMaxWidth(d),"fullRow"!==o.get("editType")&&this.addManagedListener(this.eSelect,Hr.EVENT_ITEM_SELECTED,(function(){return e.stopEditing()}))}},t.prototype.afterGuiAttached=function(){var e=this;this.focusAfterAttached&&this.eSelect.getFocusableElement().focus(),this.startedByEnter&&setTimeout((function(){e.isAlive()&&e.eSelect.showPicker()}))},t.prototype.focusIn=function(){this.eSelect.getFocusableElement().focus()},t.prototype.getValue=function(){return this.eSelect.getValue()},t.prototype.isPopup=function(){return!1},oa([de("valueFormatterService")],t.prototype,"valueFormatterService",void 0),oa([sr("eSelect")],t.prototype,"eSelect",void 0),t}(Qs),sa=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),aa=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},la=function(e){function t(t){var i=e.call(this,'\n            <div class="ag-cell-edit-wrapper">\n                '.concat(t.getTemplate(),"\n            </div>"))||this;return i.cellEditorInput=t,i}return sa(t,e),t.prototype.init=function(e){this.params=e;var t,i=this.eInput;if(this.cellEditorInput.init(i,e),e.cellStartedEdit){this.focusAfterAttached=!0;var n=e.eventKey;n===xo.BACKSPACE||e.eventKey===xo.DELETE?t="":n&&1===n.length?t=n:(t=this.cellEditorInput.getStartValue(),n!==xo.F2&&(this.highlightAllOnFocus=!0))}else this.focusAfterAttached=!1,t=this.cellEditorInput.getStartValue();null!=t&&i.setStartValue(t),this.addManagedListener(i.getGui(),"keydown",(function(e){var t=e.key;t!==xo.PAGE_UP&&t!==xo.PAGE_DOWN||e.preventDefault()}))},t.prototype.afterGuiAttached=function(){var e,t,i=this.localeService.getLocaleTextFunc(),n=this.eInput;if(n.setInputAriaLabel(i("ariaInputEditor","Input Editor")),this.focusAfterAttached){Yi()||n.getFocusableElement().focus();var o=n.getInputElement();this.highlightAllOnFocus?o.select():null===(t=(e=this.cellEditorInput).setCaret)||void 0===t||t.call(e)}},t.prototype.focusIn=function(){var e=this.eInput,t=e.getFocusableElement(),i=e.getInputElement();t.focus(),i.select()},t.prototype.getValue=function(){return this.cellEditorInput.getValue()},t.prototype.isPopup=function(){return!1},aa([sr("eInput")],t.prototype,"eInput",void 0),t}(Qs),ca=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ua=function(){function e(){}return e.prototype.getTemplate=function(){return'<ag-input-text-field class="ag-cell-editor" ref="eInput"></ag-input-text-field>'},e.prototype.init=function(e,t){this.eInput=e,this.params=t,null!=t.maxLength&&e.setMaxLength(t.maxLength)},e.prototype.getValue=function(){var e=this.eInput.getValue();return o(e)||o(this.params.value)?this.params.parseValue(e):this.params.value},e.prototype.getStartValue=function(){var e=this.params.useFormatter||this.params.column.getColDef().refData;return e?this.params.formatValue(this.params.value):this.params.value},e.prototype.setCaret=function(){var e=this.eInput.getValue(),t=o(e)&&e.length||0;t&&this.eInput.getInputElement().setSelectionRange(t,t)},e}(),da=function(e){function t(){return e.call(this,new ua)||this}return ca(t,e),t}(la),pa=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ha=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},fa="↑",ga="↓",va=function(e){function t(){var i=e.call(this,t.TEMPLATE)||this;return i.refreshCount=0,i}return pa(t,e),t.prototype.init=function(e){this.eValue=this.queryForHtmlElement(".ag-value-change-value"),this.eDelta=this.queryForHtmlElement(".ag-value-change-delta"),this.refresh(e)},t.prototype.showDelta=function(e,t){var i=Math.abs(t),n=e.formatValue(i),r=o(n)?n:i,s=t>=0;this.eDelta.innerHTML=s?fa+r:ga+r,this.eDelta.classList.toggle("ag-value-change-delta-up",s),this.eDelta.classList.toggle("ag-value-change-delta-down",!s)},t.prototype.setTimerToRemoveDelta=function(){var e=this;this.refreshCount++;var t=this.refreshCount;window.setTimeout((function(){t===e.refreshCount&&e.hideDeltaValue()}),2e3)},t.prototype.hideDeltaValue=function(){this.eValue.classList.remove("ag-value-change-value-highlight"),Wn(this.eDelta)},t.prototype.refresh=function(e){var t=e.value;if(t===this.lastValue)return!1;if(o(e.valueFormatted)?this.eValue.innerHTML=e.valueFormatted:o(e.value)?this.eValue.innerHTML=t:Wn(this.eV
11alue),this.filterManager.isSuppressFlashingCellsBecauseFiltering())return!1;if("number"===typeof t&&"number"===typeof this.lastValue){var i=t-this.lastValue;this.showDelta(e,i)}return this.lastValue&&this.eValue.classList.add("ag-value-change-value-highlight"),this.setTimerToRemoveDelta(),this.lastValue=t,!0},t.TEMPLATE='<span><span class="ag-value-change-delta"></span><span class="ag-value-change-value"></span></span>',ha([de("filterManager")],t.prototype,"filterManager",void 0),t}(rr),ya=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ma=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Ca=function(e){function t(){var i=e.call(this,t.TEMPLATE)||this;return i.refreshCount=0,i.eCurrent=i.queryForHtmlElement(".ag-value-slide-current"),i}return ya(t,e),t.prototype.init=function(e){this.refresh(e)},t.prototype.addSlideAnimation=function(){var e=this;this.refreshCount++;var t=this.refreshCount;this.ePrevious&&this.getGui().removeChild(this.ePrevious),this.ePrevious=Kn('<span class="ag-value-slide-previous ag-value-slide-out"></span>'),this.ePrevious.innerHTML=this.eCurrent.innerHTML,this.getGui().insertBefore(this.ePrevious,this.eCurrent),window.setTimeout((function(){t===e.refreshCount&&e.ePrevious.classList.add("ag-value-slide-out-end")}),50),window.setTimeout((function(){t===e.refreshCount&&(e.getGui().removeChild(e.ePrevious),e.ePrevious=null)}),3e3)},t.prototype.refresh=function(e){var t=e.value;return r(t)&&(t=""),t!==this.lastValue&&(!this.filterManager.isSuppressFlashingCellsBecauseFiltering()&&(this.addSlideAnimation(),this.lastValue=t,o(e.valueFormatted)?this.eCurrent.innerHTML=e.valueFormatted:o(e.value)?this.eCurrent.innerHTML=t:Wn(this.eCurrent),!0))},t.TEMPLATE='<span>\n            <span class="ag-value-slide-current"></span>\n        </span>',ma([de("filterManager")],t.prototype,"filterManager",void 0),t}(rr),ba=function(){return ba=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ba.apply(this,arguments)},wa=function(){function e(t){this.rowIndex=null,this.key=null,this.childrenMapped={},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}return e.prototype.setData=function(e){this.setDataCommon(e,!1)},e.prototype.updateData=function(e){this.setDataCommon(e,!0)},e.prototype.setDataCommon=function(e,t){var i=this.data;this.data=e,this.beans.valueCache.onDataChanged(),this.updateDataOnDetailNode(),this.checkRowSelectable(),this.resetQuickFilterAggregateText();var n=this.createDataChangedEvent(e,i,t);this.dispatchLocalEvent(n)},e.prototype.updateDataOnDetailNode=function(){this.detailNode&&(this.detailNode.data=this.data)},e.prototype.createDataChangedEvent=function(t,i,n){return{type:e.EVENT_DATA_CHANGED,node:this,oldData:i,newData:t,update:n}},e.prototype.createLocalRowEvent=function(e){return{type:e,node:this}},e.prototype.getRowIndexString=function(){return"top"===this.rowPinned?"t-"+this.rowIndex:"bottom"===this.rowPinned?"b-"+this.rowIndex:this.rowIndex.toString()},e.prototype.createDaemonNode=function(){var 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},e.prototype.setDataAndId=function(e,t){var i=o(this.id)?this.createDaemonNode():null,n=this.data;this.data=e,this.updateDataOnDetailNode(),this.setId(t),this.checkRowSelectable(),this.beans.selectionService.syncInRowNode(this,i);var r=this.createDataChangedEvent(e,n,!1);this.dispatchLocalEvent(r)},e.prototype.checkRowSelectable=function(){var e=this.beans.gridOptionsService.get("isRowSelectable");this.setRowSelectable(!e||e(this))},e.prototype.setRowSelectable=function(t,i){if(this.selectable!==t){if(this.selectable=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_SELECTABLE_CHANGED)),i)return;var n=this.beans.gridOptionsService.get("groupSelectsChildren");if(n){var o=this.calculateSelectedFromChildren();return void this.setSelectedParams({newValue:null!==o&&void 0!==o&&o,source:"selectableChanged"})}this.isSelected()&&!this.selectable&&this.setSelectedParams({newValue:!1,source:"selectableChanged"})}},e.prototype.setId=function(t){var i=this.beans.gridOptionsService.getCallback("getRowId");if(i)if(this.data){var n=this.getGroupKeys(!0);this.id=i({data:this.data,parentKeys:n.length>0?n:void 0,level:this.level}),null!==this.id&&"string"===typeof this.id&&this.id.startsWith(e.ID_PREFIX_ROW_GROUP)&&console.error("AG Grid: Row IDs cannot start with ".concat(e.ID_PREFIX_ROW_GROUP,", this is a reserved prefix for AG Grid's row grouping feature.")),null!==this.id&&"string"!==typeof this.id&&(this.id=""+this.id
11)}else this.id=void 0;else this.id=t},e.prototype.getGroupKeys=function(e){void 0===e&&(e=!1);var t=[],i=this;e&&(i=i.parent);while(i&&i.level>=0)t.push(i.key),i=i.parent;return t.reverse(),t},e.prototype.isPixelInRange=function(e){return!(!o(this.rowTop)||!o(this.rowHeight))&&(e>=this.rowTop&&e<this.rowTop+this.rowHeight)},e.prototype.setFirstChild=function(t){this.firstChild!==t&&(this.firstChild=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_FIRST_CHILD_CHANGED)))},e.prototype.setLastChild=function(t){this.lastChild!==t&&(this.lastChild=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_LAST_CHILD_CHANGED)))},e.prototype.setChildIndex=function(t){this.childIndex!==t&&(this.childIndex=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_CHILD_INDEX_CHANGED)))},e.prototype.setRowTop=function(t){this.oldRowTop=this.rowTop,this.rowTop!==t&&(this.rowTop=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_TOP_CHANGED)),this.setDisplayed(null!==t))},e.prototype.clearRowTopAndRowIndex=function(){this.oldRowTop=null,this.setRowTop(null),this.setRowIndex(null)},e.prototype.setDisplayed=function(t){this.displayed!==t&&(this.displayed=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_DISPLAYED_CHANGED)))},e.prototype.setDragging=function(t){this.dragging!==t&&(this.dragging=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_DRAGGING_CHANGED)))},e.prototype.setHighlighted=function(t){t!==this.highlighted&&(this.highlighted=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_HIGHLIGHT_CHANGED)))},e.prototype.setHovered=function(e){this.hovered!==e&&(this.hovered=e)},e.prototype.isHovered=function(){return this.hovered},e.prototype.setAllChildrenCount=function(t){this.allChildrenCount!==t&&(this.allChildrenCount=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_ALL_CHILDREN_COUNT_CHANGED)))},e.prototype.setMaster=function(t){this.master!==t&&(this.master&&!t&&(this.expanded=!1),this.master=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_MASTER_CHANGED)))},e.prototype.setGroup=function(t){this.group!==t&&(this.group&&!t&&(this.expanded=!1),this.group=t,this.updateHasChildren(),this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_GROUP_CHANGED)))},e.prototype.setRowHeight=function(t,i){void 0===i&&(i=!1),this.rowHeight=t,this.rowHeightEstimated=i,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_HEIGHT_CHANGED))},e.prototype.setRowAutoHeight=function(e,t){this.__autoHeights||(this.__autoHeights={}),this.__autoHeights[t.getId()]=e,null!=e&&(null==this.checkAutoHeightsDebounced&&(this.checkAutoHeightsDebounced=Y(this.checkAutoHeights.bind(this),1)),this.checkAutoHeightsDebounced())},e.prototype.checkAutoHeights=function(){var e=this,t=!1,i=!0,n=0,o=this.__autoHeights;if(null!=o){var r=this.beans.columnModel.getAllDisplayedAutoHeightCols();if(r.forEach((function(r){var s=o[r.getId()];if(null==s){if(!e.beans.columnModel.isColSpanActive())return void(t=!0);var a=[];switch(r.getPinned()){case"left":a=e.beans.columnModel.getDisplayedLeftColumnsForRow(e);break;case"right":a=e.beans.columnModel.getDisplayedRightColumnsForRow(e);break;case null:a=e.beans.columnModel.getViewportCenterColumnsForRow(e);break}if(a.includes(r))return void(t=!0);s=-1}else i=!1;s>n&&(n=s)})),!t&&((i||n<10)&&(n=this.beans.gridOptionsService.getRowHeightForNode(this).height),n!=this.rowHeight)){this.setRowHeight(n);var s=this.beans.rowModel;s.onRowHeightChangedDebounced&&s.onRowHeightChangedDebounced()}}},e.prototype.setRowIndex=function(t){this.rowIndex!==t&&(this.rowIndex=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_ROW_INDEX_CHANGED)))},e.prototype.setUiLevel=function(t){this.uiLevel!==t&&(this.uiLevel=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_UI_LEVEL_CHANGED)))},e.prototype.setExpanded=function(t,i){if(this.expanded!==t){this.expanded=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_EXPANDED_CHANGED));var n=Object.assign({},this.createGlobalRowEvent(ht.EVENT_ROW_GROUP_OPENED),{expanded:t,event:i||null});this.beans.rowNodeEventThrottle.dispatchExpanded(n),this.sibling&&this.beans.rowRenderer.refreshCells({rowNodes:[this]})}},e.prototype.createGlobalRowEvent=function(e){return{type:e,node:this,data:this.data,rowIndex:this.rowIndex,rowPinned:this.rowPinned,context:this.beans.gridOptionsService.context,api:this.beans.gridOptionsService.api,columnApi:this.beans.gridOptionsService.columnApi}},e.prototype.dispatchLocalEvent=function(e){this.eventService&&this.eventService.dispatchEvent(e)},e.prototype.setDataValue=function(e,t,i){var n=this,o=function(){var t;return"string"!==typeof e?e:null!==(t=n.beans.columnModel.getGridColumn(e))&&void 0!==t?t:n.beans.columnModel.getPrimaryColumn(e)}
11,r=o(),s=this.getValueFromValueService(r);if(this.beans.gridOptionsService.get("readOnlyEdit"))return this.dispatchEventForSaveValueReadOnly(r,s,t,i),!1;var a=this.beans.valueService.setValue(this,r,t,i);return this.dispatchCellChangedEvent(r,t,s),this.checkRowSelectable(),a},e.prototype.getValueFromValueService=function(e){var t=this.leafGroup&&this.beans.columnModel.isPivotMode(),i=this.group&&this.expanded&&!this.footer&&!t,n=this.beans.gridOptionsService.getGroupIncludeFooter(),o=n({node:this}),r=this.beans.gridOptionsService.get("groupSuppressBlankHeader"),s=i&&o&&!r,a=this.beans.valueService.getValue(e,this,!1,s);return a},e.prototype.dispatchEventForSaveValueReadOnly=function(e,t,i,n){var o={type:ht.EVENT_CELL_EDIT_REQUEST,event:null,rowIndex:this.rowIndex,rowPinned:this.rowPinned,column:e,colDef:e.getColDef(),context:this.beans.gridOptionsService.context,api:this.beans.gridOptionsService.api,columnApi:this.beans.gridOptionsService.columnApi,data:this.data,node:this,oldValue:t,newValue:i,value:i,source:n};this.beans.eventService.dispatchEvent(o)},e.prototype.setGroupValue=function(e,t){var i=this.beans.columnModel.getGridColumn(e);r(this.groupData)&&(this.groupData={});var n=i.getColId(),o=this.groupData[n];o!==t&&(this.groupData[n]=t,this.dispatchCellChangedEvent(i,t,o))},e.prototype.setAggData=function(e){var t=this,i=T([this.aggData,e]),n=this.aggData;this.aggData=e,this.eventService&&i.forEach((function(e){var i=t.aggData?t.aggData[e]:void 0,o=n?n[e]:void 0;if(i!==o){var r=t.beans.columnModel.lookupGridColumn(e);r&&t.dispatchCellChangedEvent(r,i,o)}}))},e.prototype.updateHasChildren=function(){var t=this.group&&!this.footer||this.childrenAfterGroup&&this.childrenAfterGroup.length>0,i=this.beans.gridOptionsService.isRowModelType("serverSide");if(i){var n=this.beans.gridOptionsService.get("treeData"),o=this.beans.gridOptionsService.get("isServerSideGroup");t=!this.stub&&!this.footer&&(n?!!o&&o(this.data):!!this.group)}t!==this.__hasChildren&&(this.__hasChildren=!!t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_HAS_CHILDREN_CHANGED)))},e.prototype.hasChildren=function(){return null==this.__hasChildren&&this.updateHasChildren(),this.__hasChildren},e.prototype.isEmptyRowGroupNode=function(){return this.group&&s(this.childrenAfterGroup)},e.prototype.dispatchCellChangedEvent=function(t,i,n){var o={type:e.EVENT_CELL_CHANGED,node:this,column:t,newValue:i,oldValue:n};this.dispatchLocalEvent(o)},e.prototype.resetQuickFilterAggregateText=function(){this.quickFilterAggregateText=null},e.prototype.isExpandable=function(){return!this.footer&&(this.beans.columnModel.isPivotMode()?this.hasChildren()&&!this.leafGroup:this.hasChildren()||!!this.master)},e.prototype.isSelected=function(){return this.footer?this.sibling.isSelected():this.selected},e.prototype.depthFirstSearch=function(e){this.childrenAfterGroup&&this.childrenAfterGroup.forEach((function(t){return t.depthFirstSearch(e)})),e(this)},e.prototype.calculateSelectedFromChildren=function(){var e,t=!1,i=!1,n=!1;if(!(null===(e=this.childrenAfterGroup)||void 0===e?void 0:e.length))return this.selectable?this.selected:null;for(var o=0;o<this.childrenAfterGroup.length;o++){var r=this.childrenAfterGroup[o],s=r.isSelected();if(!r.selectable){var a=r.calculateSelectedFromChildren();if(null===a)continue;s=a}switch(s){case!0:t=!0;break;case!1:i=!0;break;default:n=!0;break}}return n||t&&i?void 0:!!t||!i&&(this.selectable?this.selected:null)},e.prototype.setSelectedInitialValue=function(e){this.selected=e},e.prototype.selectThisNode=function(t,i,n){void 0===n&&(n="api");var o=!this.selectable&&t,r=this.selected===t;if(o||r)return!1;if(this.selected=t,this.eventService){this.dispatchLocalEvent(this.createLocalRowEvent(e.EVENT_ROW_SELECTED));var s=this.sibling;s&&s.footer&&s.dispatchLocalEvent(s.createLocalRowEvent(e.EVENT_ROW_SELECTED))}var a=ba(ba({},this.createGlobalRowEvent(ht.EVENT_ROW_SELECTED)),{event:i||null,source:n});return this.beans.eventService.dispatchEvent(a),!0},e.prototype.setSelected=function(e,t,i){void 0===t&&(t=!1),void 0===i&&(i="api"),"boolean"!==typeof i?this.setSelectedParams({newValue:e,clearSelection:t,rangeSelect:!1,source:i}):console.warn("AG Grid: since version v30, rowNode.setSelected() property `suppressFinishActions` has been removed, please use `gridApi.setNodesSelected()` for bulk actions, and the event `source` property for ignoring events instead.")},e.prototype.setSelectedParams=function(e){return this.rowPinned?(console.warn("AG Grid: cannot select pinned rows"),0):void 0===this.id?(console.warn("AG Grid: cannot select node until id for node is known"),0):this.beans.selectionService.setNodesSelected(ba(ba({},e),{nodes:[this.footer?this.sibling:this]}
11))},e.prototype.isRowPinned=function(){return"top"===this.rowPinned||"bottom"===this.rowPinned},e.prototype.isParentOfNode=function(e){var t=this.parent;while(t){if(t===e)return!0;t=t.parent}return!1},e.prototype.addEventListener=function(e,t){this.eventService||(this.eventService=new me),this.eventService.addEventListener(e,t)},e.prototype.removeEventListener=function(e,t){this.eventService&&(this.eventService.removeEventListener(e,t),this.eventService.noRegisteredListenersExist()&&(this.eventService=null))},e.prototype.onMouseEnter=function(){this.dispatchLocalEvent(this.createLocalRowEvent(e.EVENT_MOUSE_ENTER))},e.prototype.onMouseLeave=function(){this.dispatchLocalEvent(this.createLocalRowEvent(e.EVENT_MOUSE_LEAVE))},e.prototype.getFirstChildOfFirstChild=function(e){var t=this,i=!0,n=!1,r=null;while(i&&!n){var s=t.parent,a=o(s)&&t.firstChild;a?s.rowGroupColumn===e&&(n=!0,r=s):i=!1,t=s}return n?r:null},e.prototype.isFullWidthCell=function(){if(this.detail)return!0;var e=this.beans.gridOptionsService.getCallback("isFullWidthRow");return!!e&&e({rowNode:this})},e.prototype.getRoute=function(){if(null!=this.key){var e=[],t=this;while(null!=t.key)e.push(t.key),t=t.parent;return e.reverse()}},e.prototype.createFooter=function(){var t=this;if(!this.sibling){var i=new Set(["eventService","__objectId","sticky"]),n=new e(this.beans);Object.keys(this).forEach((function(e){i.has(e)||(n[e]=t[e])})),n.footer=!0,n.setRowTop(null),n.setRowIndex(null),n.oldRowTop=null,n.id="rowGroupFooter_"+this.id,n.sibling=this,this.sibling=n}},e.prototype.destroyFooter=function(){this.sibling&&(this.sibling.setRowTop(null),this.sibling.setRowIndex(null),this.sibling=void 0)},e.ID_PREFIX_ROW_GROUP="row-group-",e.ID_PREFIX_TOP_PINNED="t-",e.ID_PREFIX_BOTTOM_PINNED="b-",e.OBJECT_ID_SEQUENCE=0,e.EVENT_ROW_SELECTED="rowSelected",e.EVENT_DATA_CHANGED="dataChanged",e.EVENT_CELL_CHANGED="cellChanged",e.EVENT_ALL_CHILDREN_COUNT_CHANGED="allChildrenCountChanged",e.EVENT_MASTER_CHANGED="masterChanged",e.EVENT_GROUP_CHANGED="groupChanged",e.EVENT_MOUSE_ENTER="mouseEnter",e.EVENT_MOUSE_LEAVE="mouseLeave",e.EVENT_HEIGHT_CHANGED="heightChanged",e.EVENT_TOP_CHANGED="topChanged",e.EVENT_DISPLAYED_CHANGED="displayedChanged",e.EVENT_FIRST_CHILD_CHANGED="firstChildChanged",e.EVENT_LAST_CHILD_CHANGED="lastChildChanged",e.EVENT_CHILD_INDEX_CHANGED="childIndexChanged",e.EVENT_ROW_INDEX_CHANGED="rowIndexChanged",e.EVENT_EXPANDED_CHANGED="expandedChanged",e.EVENT_HAS_CHILDREN_CHANGED="hasChildrenChanged",e.EVENT_SELECTABLE_CHANGED="selectableChanged",e.EVENT_UI_LEVEL_CHANGED="uiLevelChanged",e.EVENT_HIGHLIGHT_CHANGED="rowHighlightChanged",e.EVENT_DRAGGING_CHANGED="draggingChanged",e}(),Sa=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ea=function(){return Ea=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Ea.apply(this,arguments)},xa=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Oa=function(e){function t(){return e.call(this,'\n            <div class="ag-selection-checkbox" role="presentation">\n                <ag-checkbox role="presentation" ref="eCheckbox"></ag-checkbox>\n            </div>')||this}return Sa(t,e),t.prototype.postConstruct=function(){this.eCheckbox.setPassive(!0),gi(this.eCheckbox.getInputElement(),"polite")},t.prototype.getCheckboxId=function(){return this.eCheckbox.getInputElement().id},t.prototype.onDataChanged=function(){this.onSelectionChanged()},t.prototype.onSelectableChanged=function(){this.showOrHideSelect()},t.prototype.onSelectionChanged=function(){var e=this.localeService.getLocaleTextFunc(),t=this.rowNode.isSelected(),i=Fi(e,t),n=e("ariaRowToggleSelection","Press Space to toggle row selection");this.eCheckbox.setValue(t,!0),this.eCheckbox.setInputAriaLabel("".concat(n," (").concat(i,")"))},t.prototype.onClicked=function(e,t,i){return this.rowNode.setSelectedParams({newValue:e,rangeSelect:i.shiftKey,groupSelectsFiltered:t,event:i,source:"checkboxSelected"})},t.prototype.init=function(e){var t=this;this.rowNode=e.rowNode,this.column=e.column,this.overrides=e.overrides,this.onSelectionChanged(),this.addManagedListener(this.eCheckbox.getInputElement(),"dblclick",(function(e){$e(e)})),this.addManagedListener(this.eCheckbox.getInputElement(),"click",(function(e){$e(e);var i=t.gridOptionsService.get("groupSelectsFiltered"),n=t.eCheckbox.getValue();if(t.shouldHandleIndeterminateState(n,i)){var o=t.onClicked(!0,i,e||{});0===o&&t.onClicked(!1,i,e)}else n?t.onClicked(!1,i,e):t.onClicked(!0,i,e||{})})),this.addManagedListener(this.rowNode,wa.EVENT_ROW_SELECTED,this.onSelectionChanged.bind(this)),this.addManagedListener(this.rowNode,wa.EVENT_DATA_CHANGED,this.onDataChanged.bind(this)),this.addManagedListener(this.rowNode,wa.EVENT_SELECTABLE_CHANGED,this.onSelectableChanged.bind(this));var i=this.gridOptionsService.get("isRowSelectable"),n=i||"function"===typeof this.getIsVisible();if(n){var o=this.showOrHideSelect.bind(this);this.addManagedListener(this.eventService,ht.EVENT_DISPLAYED_COLUMNS_CHANGED,o),this.addManagedListener(this.rowNode,wa.EVENT_DATA_CHANGED,o),this.addManagedListener(this.rowNode,wa.EVENT_CELL_CHANGED,o),this.showOrHideSelect()}this.eCheckbox.getInputElement().setAttribute("tabindex","-1")},t.prototype.shouldHandleIndeterminateState=function(e,t){return t&&(void 0===this.eCheckbox.getPreviousValue()||void 0===e)&&this.gridOptionsService.isRowModelType("clientSide")},t.prototype.showOrHideSelect=function(){var e,t,i,n,o=this.rowNode.selectable,r=this.getIsVisible();if(o)if("function"===typeof r){var s=null===(e=this.overrides)||void 0===e?void 0:e.callbackParams,a=null===(t=this.column)||void 0===t?void 0:t.createColumnFunctionCallbackParams(this.rowNode);o=!!a&&r(Ea(Ea({},s),a))}else o=null!==r&&void 0!==r&&r;var l=null===(i=this.column)||void 0===i?void 0:i.getColDef().showDisabledCheckboxes;if(l)return this.eCheckbox.setDisabled(!o),this.setVisible(!0),void this.setDisplayed(!0);(null===(n=this.overrides)||void 0===n?void 0:n.removeHidden)?this.setDisplayed(o):this.setVisible(o)},t.prototype.getIsVisible=function(){var e,t;return this.overrides?this.overrides.isVisible:null===(t=null===(e=this.column)||void 0===e?void 0:e.getColDef())||void 0===t?void 0:t.checkboxSelection},xa([sr("eCheckbox")],t.prototype,"eCheckbox",void 0),xa([le],t.prototype,"postConstruct",null),t}(rr);(function(e){e[e["Up"]=0]="Up",e[e["Down"]=1]="Down"})(Ts||(Ts={})),function(e){e[e["Left"]=0]="Left",e[e["Right"]=1]="Right"}(Ds||(Ds={}));var Ta,Da=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ra=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Aa=function(e){var t="function"===typeof Symbol&&Symbol.iterator,i=t&&e[t],n=0;if(i)return i.call(e);
vendor: 15,653 bytes, line 11
11if(e&&"number"===typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};(function(e){e[e["ToolPanel"]=0]="ToolPanel",e[e["HeaderCell"]=1]="HeaderCell",e[e["RowDrag"]=2]="RowDrag",e[e["ChartPanel"]=3]="ChartPanel",e[e["AdvancedFilterBuilder"]=4]="AdvancedFilterBuilder"})(Ta||(Ta={}));var _a,Pa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.dragSourceAndParamsList=[],t.dropTargets=[],t}var i;return Da(t,e),i=t,t.prototype.init=function(){this.ePinnedIcon=wo("columnMovePin",this.gridOptionsService,null),this.eHideIcon=wo("columnMoveHide",this.gridOptionsService,null),this.eMoveIcon=wo("columnMoveMove",this.gridOptionsService,null),this.eLeftIcon=wo("columnMoveLeft",this.gridOptionsService,null),this.eRightIcon=wo("columnMoveRight",this.gridOptionsService,null),this.eGroupIcon=wo("columnMoveGroup",this.gridOptionsService,null),this.eAggregateIcon=wo("columnMoveValue",this.gridOptionsService,null),this.ePivotIcon=wo("columnMovePivot",this.gridOptionsService,null),this.eDropNotAllowedIcon=wo("dropNotAllowed",this.gridOptionsService,null)},t.prototype.addDragSource=function(e,t){void 0===t&&(t=!1);var i={eElement:e.eElement,dragStartPixels:e.dragStartPixels,onDragStart:this.onDragStart.bind(this,e),onDragStop:this.onDragStop.bind(this),onDragging:this.onDragging.bind(this),includeTouch:t};this.dragSourceAndParamsList.push({params:i,dragSource:e}),this.dragService.addDragSource(i)},t.prototype.removeDragSource=function(e){var t=this.dragSourceAndParamsList.find((function(t){return t.dragSource===e}));t&&(this.dragService.removeDragSource(t.params),Le(this.dragSourceAndParamsList,t))},t.prototype.clearDragSourceParamsList=function(){var e=this;this.dragSourceAndParamsList.forEach((function(t){return e.dragService.removeDragSource(t.params)})),this.dragSourceAndParamsList.length=0,this.dropTargets.length=0},t.prototype.nudge=function(){this.dragging&&this.onDragging(this.eventLastTime,!0)},t.prototype.onDragStart=function(e,t){this.dragging=!0,this.dragSource=e,this.eventLastTime=t,this.dragItem=this.dragSource.getDragItem(),this.lastDropTarget=this.dragSource.dragSourceDropTarget,this.dragSource.onDragStarted&&this.dragSource.onDragStarted(),this.createGhost()},t.prototype.onDragStop=function(e){if(this.eventLastTime=null,this.dragging=!1,this.dragSource.onDragStopped&&this.dragSource.onDragStopped(),this.lastDropTarget&&this.lastDropTarget.onDragStop){var t=this.createDropTargetEvent(this.lastDropTarget,e,null,null,!1);this.lastDropTarget.onDragStop(t)}this.lastDropTarget=null,this.dragItem=null,this.removeGhost()},t.prototype.onDragging=function(e,t){var i,n,o,r,s=this,a=this.getHorizontalDirection(e),l=this.getVerticalDirection(e);this.eventLastTime=e,this.positionGhost(e);var c=this.dropTargets.filter((function(t){return s.isMouseOnDropTarget(e,t)})),u=this.findCurrentDropTarget(e,c);if(u!==this.lastDropTarget)this.leaveLastTargetIfExists(e,a,l,t),null!==this.lastDropTarget&&null===u&&(null===(n=(i=this.dragSource).onGridExit)||void 0===n||n.call(i,this.dragItem)),null===this.lastDropTarget&&null!==u&&(null===(r=(o=this.dragSource).onGridEnter)||void 0===r||r.call(o,this.dragItem)),this.enterDragTargetIfExists(u,e,a,l,t),this.lastDropTarget=u;else if(u&&u.onDragging){var d=this.createDropTargetEvent(u,e,a,l,t);u.onDragging(d)}},t.prototype.getAllContainersFromDropTarget=function(e){var t=e.getSecondaryContainers?e.getSecondaryContainers():null,i=[[e.getContainer()]];return t?i.concat(t):i},t.prototype.allContainersIntersect=function(e,t){var i,n;try{for(var o=Aa(t),r=o.next();!r.done;r=o.next()){var s=r.value,a=s.getBoundingClientRect();if(0===a.width||0===a.height)return!1;var l=e.clientX>=a.left&&e.clientX<a.right,c=e.clientY>=a.top&&e.clientY<a.bottom;if(!l||!c)return!1}}catch(u){i={error:u}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return!0},t.prototype.isMouseOnDropTarget=function(e,t){var i,n,o=this.getAllContainersFromDropTarget(t),r=!1;try{for(var s=Aa(o),a=s.next();!a.done;a=s.next()){var l=a.value;if(this.allContainersIntersect(e,l)){r=!0;break}}}catch(c){i={error:c}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(i)throw i.error}}return!(t.targetContainsSource&&!t.getContainer().contains(this.dragSource.eElement))&&(r&&t.isInterestedIn(this.dragSource.type,this.dragSource.eElement))},t.prototype.findCurrentDropTarget=function(e,t){var i,n,o,r,s=t.length;if(0===s)return null;if(1===s)return t[0];var a=this.gridOptionsService.getRootNode(),l=a.elementsFromPoint(e.clientX,e.clientY);try{for(var c=Aa(l),u=c.next();!u.done;u=c.next()){var d=u.value;try{for(var p=(o=void 0,Aa(t)),h=p.next();!h.done;h=p.next()){var f=h.value,g=He(this.getAllContainersFromDropTarget(f));if(-1!==g.indexOf(d))return f}}catch(v){o={error:v}}finally{try{h&&!h.done&&(r=p.return)&&r.call(p)}finally{if(o)throw o.error}}}}catch(y){i={error:y}}finally{try{u&&!u.done&&(n=c.return)&&n.call(c)}finally{if(i)throw i.error}}return null},t.prototype.enterDragTargetIfExists=function(e,t,i,n,o){if(e){if(e.onDragEnter){var r=this.createDropTargetEvent(e,t,i,n,o);e.onDragEnter(r)}this.setGhostIcon(e.getIconName?e.getIconName():null)}},t.prototype.leaveLastTargetIfExists=function(e,t,i,n){if(this.lastDropTarget){if(this.lastDropTarget.onDragLeave){var o=this.createDropTargetEvent(this.lastDropTarget,e,t,i,n);this.lastDropTarget.onDragLeave(o)}this.setGhostIcon(null)}},t.prototype.addDropTarget=function(e){this.dropTargets.push(e)},t.prototype.removeDropTarget=function(e){this.dropTargets=this.dropTargets.filter((function(t){return t.getContainer()!==e.getContainer()}))},t.prototype.hasExternalDropZones=function(){return this.dropTargets.some((function(e){return e.external}))},t.prototype.findExternalZone=function(e){var t=this.dropTargets.filter((function(e){return e.external}));return t.find((function(t){return t.getContainer()===e.getContainer()}))||null},t.prototype.getHorizontalDirection=function(e){var t=this.eventLastTime&&this.eventLastTime.clientX,i=e.clientX;return t===i?null:t>i?Ds.Left:Ds.Right},t.prototype.getVerticalDirection=function(e){var t=this.eventLastTime&&this.eventLastTime.clientY,i=e.clientY;return t===i?null:t>i?Ts.Up:Ts.Down},t.prototype.createDropTargetEvent=function(e,t,i,n,o){var r=e.getContainer(),s=r.getBoundingClientRect(),a=this,l=a.gridApi,c=a.columnApi,u=a.dragItem,d=a.dragSource,p=t.clientX-s.left,h=t.clientY-s.top;return{event:t,x:p,y:h,vDirection:n,hDirection:i,dragSource:d,fromNudge:o,dragItem:u,api:l,columnApi:c,dropZoneTarget:r}},t.prototype.positionGhost=function(e){var t=this.eGhost;if(t){var i=t.getBoundingClientRect(),n=i.height,o=nn()-2,r=on()-2,s=Vn(t.offsetParent),a=e.clientY,l=e.clientX,c=a-s.top-n/2,u=l-s.left-10,d=this.gridOptionsService.getDocument(),p=d.defaultView||window,h=p.pageYOffset||d.documentElement.scrollTop,f=p.pageXOffset||d.documentElement.scrollLeft;o>0&&u+t.clientWidth>o+f&&(u=o+f-t.clientWidth),u<0&&(u=0),r>0&&c+t.clientHeight>r+h&&(c=r+h-t.clientHeight),c<0&&(c=0),t.style.left="".concat(u,"px"),t.style.top="".concat(c,"px")}},t.prototype.removeGhost=function(){this.eGhost&&this.eGhostParent&&this.eGhostParent.removeChild(this.eGhost),this.eGhost=null},t.prototype.createGhost=function(){this.eGhost=Kn(i.GHOST_TEMPLATE),this.mouseEventService.stampTopLevelGridCompWithGridInstance(this.eGhost);var e=this.environment.getTheme().theme;e&&this.eGhost.classList.add(e),this.eGhostIcon=this.eGhost.querySelector(".ag-dnd-ghost-icon"),this.setGhostIcon(null);var t=this.eGhost.querySelector(".ag-dnd-ghost-label"),n=this.dragSource.dragItemName;j(n)&&(n=n()),t.innerHTML=Et(n)||"",this.eGhost.style.height="25px",this.eGhost.style.top="20px",this.eGhost.style.left="20px";var o=this.gridOptionsService.getDocument(),r=null,s=null;try{r=o.fullscreenElement}catch(l){}finally{r||(r=this.gridOptionsService.getRootNode());var a=r.querySelector("body");s=a||(r instanceof ShadowRoot?r:r instanceof Document?null===r||void 0===r?void 0:r.documentElement:r)}this.eGhostParent=s,this.eGhostParent?this.eGhostParent.appendChild(this.eGhost):console.warn("AG Grid: could not find document body, it is needed for dragging columns")},t.prototype.setGhostIcon=function(e,t){void 0===t&&(t=!1),Wn(this.eGhostIcon);var n=null;switch(e||(e=this.dragSource.getDefaultIconName?this.dragSource.getDefaultIconName():i.ICON_NOT_ALLOWED),e){case i.ICON_PINNED:n=this.ePinnedIcon;break;case i.ICON_MOVE:n=this.eMoveIcon;break;case i.ICON_LEFT:n=this.eLeftIcon;break;case i.ICON_RIGHT:n=this.eRightIcon;break;case i.ICON_GROUP:n=this.eGroupIcon;break;case i.ICON_AGGREGATE:n=this.eAggregateIcon;break;case i.ICON_PIVOT:n=this.ePivotIcon;break;case i.ICON_NOT_ALLOWED:n=this.eDropNotAllowedIcon;break;case i.ICON_HIDE:n=this.eHideIcon;break}this.eGhostIcon.classList.toggle("ag-shake-left-to-right",t),n===this.eHideIcon&&this.gridOptionsService.get("suppressDragLeaveHidesColumns")||n&&this.eGhostIcon.appendChild(n)},t.ICON_PINNED="pinned",t.ICON_MOVE="move",t.ICON_LEFT="left",t.ICON_RIGHT="right",t.ICON_GROUP="group",t.ICON_AGGREGATE="aggregate",t.ICON_PIVOT="pivot",t.ICON_NOT_ALLOWED="notAllowed",t.ICON_HIDE="hide",t.GHOST_TEMPLATE='<div class="ag-dnd-ghost ag-unselectable">\n            <span class="ag-dnd-ghost-icon ag-shake-left-to-right"></span>\n            <div class="ag-dnd-ghost-label"></div>\n        </div>',Ra([de("dragService")],t.prototype,"dragService",void 0),Ra([de("mouseEventService")],t.prototype,"mouseEventService",void 0),Ra([de("columnApi")],t.prototype,"columnApi",void 0),Ra([de("gridApi")],t.prototype,"gridApi",void 0),Ra([le],t.prototype,"init",null),Ra([ce],t.prototype,"clearDragSourceParamsList",null),t=i=Ra([ue("dragAndDropService")],t),t}(st),Ma=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ka=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Na=function(e){function t(t,i,n,o,r,s){var a=e.call(this)||this;return a.cellValueFn=t,a.rowNode=i,a.column=n,a.customGui=o,a.dragStartPixels=r,a.suppressVisibilityChange=s,a.dragSource=null,a}return Ma(t,e),t.prototype.isCustomGui=function(){return null!=this.customGui},t.prototype.postConstruct=function(){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(So("rowDrag",this.gridOptionsService,null)),this.addDragSource()),this.checkCompatibility(),!this.suppressVisibilityChange){var e=this.gridOptionsService.get("rowDragManaged")?new Fa(this,this.beans,this.rowNode,this.column):new Ia(this,this.beans,this.rowNode,this.column);this.createManagedBean(e,this.beans.context)}},t.prototype.setDragElement=function(e,t){this.setTemplateFromElement(e),this.addDragSource(t)},t.prototype.getSelectedNodes=function(){var e=this.gridOptionsService.get("rowDragMultiRow");if(!e)return[this.rowNode];var t=this.beans.selectionService.getSelectedNodes();return-1!==t.indexOf(this.rowNode)?t:[this.rowNode]},t.prototype.checkCompatibility=function(){var e=this.gridOptionsService.get("rowDragManaged"),t=this.gridOptionsService.get("treeData");t&&e&&G("If using row drag with tree data, you cannot have rowDragManaged=true")},t.prototype.getDragItem=function(){return{rowNode:this.rowNode,rowNodes:this.getSelectedNodes(),columns:this.column?[this.column]:void 0,defaultTextValue:this.cellValueFn()}},t.prototype.getRowDragText=function(e){if(e){var t=e.getColDef();if(t.rowDragText)return t.rowDragText}return this.gridOptionsService.get("rowDragText")},t.prototype.addDragSource=function(e){var t=this;void 0===e&&(e=4),this.dragSource&&this.removeDragSource();var i=this.localeService.getLocaleTextFunc();this.dragSource={type:Ta.RowDrag,eElement:this.getGui(),dragItemName:function(){var e,n=t.getDragItem(),o=(null===(e=n.rowNodes)||void 0===e?void 0:e.length)||1,r=t.getRowDragText(t.column);return r?r(n,o):1===o?t.cellValueFn():"".concat(o," ").concat(i("rowDragRows","rows"))},getDragItem:function(){return t.getDragItem()},dragStartPixels:e,dragSourceDomDataKey:this.gridOptionsService.getDomDataKey()},this.beans.dragAndDropService.addDragSource(this.dragSource,!0)},t.prototype.removeDragSource=function(){this.dragSource&&this.beans.dragAndDropService.removeDragSource(this.dragSource),this.dragSource=null},ka([de("beans")],t.prototype,"beans",void 0),ka([le],t.prototype,"postConstruct",null),ka([ce],t.prototype,"removeDragSource",null),t}(rr),La=function(e){function t(t,i,n){var o=e.call(this)||this;return o.parent=t,o.rowNode=i,o.column=n,o}return Ma(t,e),t.prototype.setDisplayedOrVisible=function(e){var t={skipAriaHidden:!0};if(e)this.parent.setDisplayed(!1,t);else{var i=!0,n=!1;this.column&&(i=this.column.isRowDrag(this.rowNode)||this.parent.isCustomGui(),n=j(this.column.getColDef().rowDrag)),n?(this.parent.setDisplayed(!0,t),this.parent.setVisible(i,t)):(this.parent.setDisplayed(i,t),this.parent.setVisible(!0,t))}},t}(st),Ia=function(e){function t(t,i,n,o){var r=e.call(this,t,n,o)||this;return r.beans=i,r}return Ma(t,e),t.prototype.postConstruct=function(){this.addManagedPropertyListener("suppressRowDrag",this.onSuppressRowDrag.bind(this)),this.addManagedListener(this.rowNode,wa.EVENT_DATA_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.rowNode,wa.EVENT_CELL_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.rowNode,wa.EVENT_CELL_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.beans.eventService,ht.EVENT_NEW_COLUMNS_LOADED,this.workOutVisibility.bind(this)),this.workOutVisibility()},t.prototype.onSuppressRowDrag=function(){this.workOutVisibility()},t.prototype.workOutVisibility=function(){var e=this.gridOptionsService.get("suppressRowDrag");this.setDisplayedOrVisible(e)},ka([le],t.prototype,"postConstruct",null),t}(La),Fa=function(e){function t(t,i,n,o){var r=e.call(this,t,n,o)||this;return r.beans=i,r}return Ma(t,e),t.prototype.postConstruct=function(){this.addManagedListener(this.beans.eventService,ht.EVENT_SORT_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.beans.eventService,ht.EVENT_FILTER_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.beans.eventService,ht.EVENT_COLUMN_ROW_GROUP_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.beans.eventService,ht.EVENT_NEW_COLUMNS_LOADED,this.workOutVisibility.bind(this)),this.addManagedListener(this.rowNode,wa.EVENT_DATA_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.rowNode,wa.EVENT_CELL_CHANGED,this.workOutVisibility.bind(this)),this.addManagedPropertyListener("suppressRowDrag",this.onSuppressRowDrag.bind(this)),this.workOutVisibility()},t.prototype.onSuppressRowDrag=function(){this.workOutVisibility()},t.prototype.workOutVisibility=function(){var e=this.beans.ctrlsService.getGridBodyCtrl(),t=e.getRowDragFeature
11(),i=t&&t.shouldPreventRowMove(),n=this.gridOptionsService.get("suppressRowDrag"),o=this.beans.dragAndDropService.hasExternalDropZones(),r=i&&!o||n;this.setDisplayedOrVisible(r)},ka([le],t.prototype,"postConstruct",null),t}(La),Ga=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Va=function(){return Va=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Va.apply(this,arguments)},Ba=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},ja=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ga(t,e),t.prototype.init=function(e,t,i,n,o,r,s){var a,l;this.params=s,this.eGui=t,this.eCheckbox=i,this.eExpanded=n,this.eContracted=o,this.comp=e,this.compClass=r;var c=s.node;s.value;var u=s.colDef,d=this.isTopLevelFooter();if(!d){var p=this.isEmbeddedRowMismatch();if(p)return;if(c.footer&&this.gridOptionsService.get("groupHideOpenParents")){var h=u&&u.showRowGroup,f=c.rowGroupColumn&&c.rowGroupColumn.getColId();if(h!==f)return}}if(this.setupShowingValueForOpenedParent(),this.findDisplayedGroupNode(),!d){var g=s.node.footer&&s.node.rowGroupIndex===this.columnModel.getRowGroupColumns().findIndex((function(e){var t;return e.getColId()===(null===(t=s.colDef)||void 0===t?void 0:t.showRowGroup)})),v="singleColumn"===this.gridOptionsService.get("groupDisplayType")||this.gridOptionsService.get("treeData"),y=v||this.gridOptionsService.get("showOpenedGroup")&&!s.node.footer&&(!s.node.group||null!=s.node.rowGroupIndex&&s.node.rowGroupIndex>this.columnModel.getRowGroupColumns().findIndex((function(e){var t;return e.getColId()===(null===(t=s.colDef)||void 0===t?void 0:t.showRowGroup)}))),m=!c.group&&((null===(a=this.params.colDef)||void 0===a?void 0:a.field)||(null===(l=this.params.colDef)||void 0===l?void 0:l.valueGetter)),C=this.isExpandable(),b=!this.showingValueForOpenedParent&&!C&&!m&&!y&&!g;if(b)return}this.addExpandAndContract(),this.addFullWidthRowDraggerIfNeeded(),this.addCheckboxIfNeeded(),this.addValueElement(),this.setupIndent(),this.refreshAriaExpanded()},t.prototype.getCellAriaRole=function(){var e,t,i=null===(e=this.params.colDef)||void 0===e?void 0:e.cellAriaRole,n=null===(t=this.params.column)||void 0===t?void 0:t.getColDef().cellAriaRole;return i||n||"gridcell"},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.expandListener=null},t.prototype.refreshAriaExpanded=function(){var e=this.params,t=e.node,i=e.eParentOfValue;if(this.expandListener&&(this.expandListener=this.expandListener()),this.isExpandable()){var n=function(){Si(i,!!t.expanded)};this.expandListener=this.addManagedListener(t,wa.EVENT_EXPANDED_CHANGED,n)||null,n()}else Ei(i)},t.prototype.isTopLevelFooter=function(){if(!this.gridOptionsService.get("groupIncludeTotalFooter"))return!1;if(null!=this.params.value||-1!=this.params.node.level)return!1;var e=this.params.colDef,t=null==e;if(t)return!0;if(!0===e.showRowGroup)return!0;var i=this.columnModel.getRowGroupColumns();if(!i||0===i.length)return!0;var n=i[0];return n.getId()===e.showRowGroup},t.prototype.isEmbeddedRowMismatch=function(){if(!this.params.fullWidth||!this.gridOptionsService.get("embedFullWidthRows"))return!1;var e="left"===this.params.pinned,t="right"===this.params.pinned,i=!e&&!t;return this.gridOptionsService.get("enableRtl")?this.columnModel.isPinningLeft()?!t:!i:this.columnModel.isPinningLeft()?!e:!i},t.prototype.findDisplayedGroupNode=function(){var e=this.params.column,t=this.params.node;if(this.showingValueForOpenedParent){var i=t.parent;while(null!=i){if(i.rowGroupColumn&&e.isRowGroupDisplayed(i.rowGroupColumn.getId())){this.displayedGroupNode=i;break}i=i.parent}}r(this.displayedGroupNode)&&(this.displayedGroupNode=t)},t.prototype.setupShowingValueForOpenedParent=function(){var e=this.params.node,t=this.params.column;if(this.gridOptionsService.get("groupHideOpenParents"))if(e.groupData){var i=null!=e.rowGroupColumn;if(i){var n=e.rowGroupColumn.getId(),o=t.isRowGroupDisplayed(n);if(o)return void(this.showingValueForOpenedParent=!1)}
11var r=null!=e.groupData[t.getId()];this.showingValueForOpenedParent=r}else this.showingValueForOpenedParent=!1;else this.showingValueForOpenedParent=!1},t.prototype.addValueElement=function(){this.displayedGroupNode.footer?this.addFooterValue():(this.addGroupValue(),this.addChildCount())},t.prototype.addGroupValue=function(){var e,t=this.adjustParamsWithDetailsFromRelatedColumn(),i=this.getInnerCompDetails(t),n=t.valueFormatted,o=t.value,r=n;if(null==r){var s=this.displayedGroupNode.rowGroupColumn&&(null===(e=this.params.column)||void 0===e?void 0:e.isRowGroupDisplayed(this.displayedGroupNode.rowGroupColumn.getId()));if(""===this.displayedGroupNode.key&&this.displayedGroupNode.group&&s){var a=this.localeService.getLocaleTextFunc();r=a("blanks","(Blanks)")}else r=null!==o&&void 0!==o?o:null}this.comp.setInnerRenderer(i,r)},t.prototype.adjustParamsWithDetailsFromRelatedColumn=function(){var e=this.displayedGroupNode.rowGroupColumn,t=this.params.column;if(!e)return this.params;var i=null!=t;if(i){var n=t.isRowGroupDisplayed(e.getId());if(!n)return this.params}var o=this.params,r=this.params,s=r.value,a=r.node,l=this.valueFormatterService.formatValue(e,a,s),c=Va(Va({},o),{valueFormatted:l});return c},t.prototype.addFooterValue=function(){var e=this.params.footerValueGetter,t="";if(e){var i=C(this.params);i.value=this.params.value,"function"===typeof e?t=e(i):"string"===typeof e?t=this.expressionService.evaluate(e,i):console.warn("AG Grid: footerValueGetter should be either a function or a string (expression)")}else t="Total "+(null!=this.params.value?this.params.value:"");var n=this.getInnerCompDetails(this.params);this.comp.setInnerRenderer(n,t)},t.prototype.getInnerCompDetails=function(e){var t=this;if(e.fullWidth)return this.userComponentFactory.getFullWidthGroupRowInnerCellRenderer(this.gridOptionsService.get("groupRowRendererParams"),e);var i=this.userComponentFactory.getInnerRendererDetails(e,e),n=function(e){return e&&e.componentClass==t.compClass};if(i&&!n(i))return i;var o=this.displayedGroupNode.rowGroupColumn,r=o?o.getColDef():void 0;if(r){var s=this.userComponentFactory.getCellRendererDetails(r,e);if(s&&!n(s))return s;if(n(s)&&r.cellRendererParams&&r.cellRendererParams.innerRenderer){var a=this.userComponentFactory.getInnerRendererDetails(r.cellRendererParams,e);return a}}},t.prototype.addChildCount=function(){this.params.suppressCount||(this.addManagedListener(this.displayedGroupNode,wa.EVENT_ALL_CHILDREN_COUNT_CHANGED,this.updateChildCount.bind(this)),this.updateChildCount())},t.prototype.updateChildCount=function(){var e=this.displayedGroupNode.allChildrenCount,t=this.isShowRowGroupForThisRow(),i=t&&null!=e&&e>=0,n=i?"(".concat(e,")"):"";this.comp.setChildCount(n)},t.prototype.isShowRowGroupForThisRow=function(){if(this.gridOptionsService.get("treeData"))return!0;var e=this.displayedGroupNode.rowGroupColumn;if(!e)return!1;var t=this.params.column,i=null==t||t.isRowGroupDisplayed(e.getId());return i},t.prototype.addExpandAndContract=function(){var e,t=this.params,i=So("groupExpanded",this.gridOptionsService,null),n=So("groupContracted",this.gridOptionsService,null);i&&this.eExpanded.appendChild(i),n&&this.eContracted.appendChild(n);var o=t.eGridCell,r=(null===(e=this.params.column)||void 0===e?void 0:e.isCellEditable(t.node))&&this.gridOptionsService.get("enableGroupEdit");r||!this.isExpandable()||t.suppressDoubleClickExpand||this.addManagedListener(o,"dblclick",this.onCellDblClicked.bind(this)),this.addManagedListener(this.eExpanded,"click",this.onExpandClicked.bind(this)),this.addManagedListener(this.eContracted,"click",this.onExpandClicked.bind(this)),this.addManagedListener(o,"keydown",this.onKeyDown.bind(this)),this.addManagedListener(t.node,wa.EVENT_EXPANDED_CHANGED,this.showExpandAndContractIcons.bind(this)),this.showExpandAndContractIcons();var s=this.onRowNodeIsExpandableChanged.bind(this);this.addManagedListener(this.displayedGroupNode,wa.EVENT_ALL_CHILDREN_COUNT_CHANGED,s),this.addManagedListener(this.displayedGroupNode,wa.EVENT_MASTER_CHANGED,s),this.addManagedListener(this.displayedGroupNode,wa.EVENT_GROUP_CHANGED,s),this.addManagedListener(this.displayedGroupNode,wa.EVENT_HAS_CHILDREN_CHANGED,s)},t.prototype.onExpandClicked=function(e){Ze(e)||($e(e),this.onExpandOrContract(e))},t.prototype.onExpandOrContract=function(e){var t=this.displayedGroupNode,i=!t.expanded;!i&&t.sticky&&this.scrollToStickyNode(t),t.setExpanded(i,e)},t.prototype.scrollToStickyNode=function(e){var t=this.ctrlsService.getGridBodyCtrl(),i=t.getScrollFeature
11();i.setVerticalScrollPosition(e.rowTop-e.stickyRowTop)},t.prototype.isExpandable=function(){if(this.showingValueForOpenedParent)return!0;var e=this.displayedGroupNode,t=this.columnModel.isPivotMode()&&e.leafGroup,i=e.isExpandable()&&!e.footer&&!t;if(!i)return!1;var n=this.params.column,o=null!=n&&"string"===typeof n.getColDef().showRowGroup;if(o){var r=this.isShowRowGroupForThisRow();return r}return!0},t.prototype.showExpandAndContractIcons=function(){var e=this,t=e.params,i=e.displayedGroupNode,n=e.columnModel,o=t.node,r=this.isExpandable();if(r){var s=!!this.showingValueForOpenedParent||o.expanded;this.comp.setExpandedDisplayed(s),this.comp.setContractedDisplayed(!s)}else this.comp.setExpandedDisplayed(!1),this.comp.setContractedDisplayed(!1);var a=n.isPivotMode(),l=a&&i.leafGroup,c=r&&!l,u=o.footer&&-1===o.level;this.comp.addOrRemoveCssClass("ag-cell-expandable",c),this.comp.addOrRemoveCssClass("ag-row-group",c),a?this.comp.addOrRemoveCssClass("ag-pivot-leaf-group",l):u||this.comp.addOrRemoveCssClass("ag-row-group-leaf-indent",!c)},t.prototype.onRowNodeIsExpandableChanged=function(){this.showExpandAndContractIcons(),this.setIndent(),this.refreshAriaExpanded()},t.prototype.setupIndent=function(){var e=this.params.node,t=this.params.suppressPadding;t||(this.addManagedListener(e,wa.EVENT_UI_LEVEL_CHANGED,this.setIndent.bind(this)),this.setIndent())},t.prototype.setIndent=function(){if(!this.gridOptionsService.get("groupHideOpenParents")){var e=this.params,t=e.node,i=!!e.colDef,n=this.gridOptionsService.get("treeData"),o=!i||n||!0===e.colDef.showRowGroup,r=o?t.uiLevel:0;this.indentClass&&this.comp.addOrRemoveCssClass(this.indentClass,!1),this.indentClass="ag-row-group-indent-"+r,this.comp.addOrRemoveCssClass(this.indentClass,!0)}},t.prototype.addFullWidthRowDraggerIfNeeded=function(){var e=this;if(this.params.fullWidth&&this.params.rowDrag){var t=new Na((function(){return e.params.value}),this.params.node);this.createManagedBean(t,this.context),this.eGui.insertAdjacentElement("afterbegin",t.getGui())}},t.prototype.isUserWantsSelected=function(){var e=this.params.checkbox;return"function"===typeof e||!0===e},t.prototype.addCheckboxIfNeeded=function(){var e=this,t=this.displayedGroupNode,i=this.isUserWantsSelected()&&!t.footer&&!t.rowPinned&&!t.detail;if(i){var n=new Oa;this.getContext().createBean(n),n.init({rowNode:this.params.node,column:this.params.column,overrides:{isVisible:this.params.checkbox,callbackParams:this.params,removeHidden:!0}}),this.eCheckbox.appendChild(n.getGui()),this.addDestroyFunc((function(){return e.getContext().destroyBean(n)}))}this.comp.setCheckboxVisible(i)},t.prototype.onKeyDown=function(e){var t=e.key===xo.ENTER;if(t&&!this.params.suppressEnterExpand){var i=this.params.column&&this.params.column.isCellEditable(this.params.node);i||this.onExpandOrContract(e)}},t.prototype.onCellDblClicked=function(e){if(!Ze(e)){var t=et(this.eExpanded,e)||et(this.eContracted,e);t||this.onExpandOrContract(e)}},Ba([de("expressionService")],t.prototype,"expressionService",void 0),Ba([de("valueFormatterService")],t.prototype,"valueFormatterService",void 0),Ba([de("columnModel")],t.prototype,"columnModel",void 0),Ba([de("userComponentFactory")],t.prototype,"userComponentFactory",void 0),Ba([de("ctrlsService")],t.prototype,"ctrlsService",void 0),t}(st),Ha=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Wa=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Ua=function(e){function t(){return e.call(this,t.TEMPLATE)||this}return Ha(t,e),t.prototype.init=function(e){var t=this,i={setInnerRenderer:function(e,i){return t.setRenderDetails(e,i)},setChildCount:function(e){return t.eChildCount.innerHTML=e},addOrRemoveCssClass:function(e,i){return t.addOrRemoveCssClass(e,i)},setContractedDisplayed:function(e){return _n(t.eContracted,e)},setExpandedDisplayed:function(e){return _n(t.eExpanded,e)},setCheckboxVisible:function(e){return t.eCheckbox.classList.toggle("ag-invisible",!e)}},n=this.createManagedBean(new ja),o=!e.colDef,r=this.getGui();n.init(i,r,this.eCheckbox,this.eExpanded,this.eContracted,this.constructor,e),o&&si(r,n.getCellAriaRole())},t.prototype.setRenderDetails=function(e,t){var i=this;if(e){var n=e.newAgStackInstance();if(!n)return;n.then((function(e){if(e){var t=function(){return i.context.destroyBean(e)};i.isAlive()?(i.eValue.appendChild(e.getGui()),i.addDestroyFunc(t)):t()}}))}else this.eValue.innerText=t},t.prototype.destroy=function(){this.getContext().destroyBean(this.innerCellRenderer),e.prototype.destroy.call(this)},t.prototype.refresh=function(){return!1},t.TEMPLATE='<span class="ag-cell-wrapper">
11\n            <span class="ag-group-expanded" ref="eExpanded"></span>\n            <span class="ag-group-contracted" ref="eContracted"></span>\n            <span class="ag-group-checkbox ag-invisible" ref="eCheckbox"></span>\n            <span class="ag-group-value" ref="eValue"></span>\n            <span class="ag-group-child-count" ref="eChildCount"></span>\n        </span>',Wa([sr("eExpanded")],t.prototype,"eExpanded",void 0),Wa([sr("eContracted")],t.prototype,"eContracted",void 0),Wa([sr("eCheckbox")],t.prototype,"eCheckbox",void 0),Wa([sr("eValue")],t.prototype,"eValue",void 0),Wa([sr("eChildCount")],t.prototype,"eChildCount",void 0),t}(rr),za=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ka=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Ya=function(e){function t(){return e.call(this,t.TEMPLATE)||this}return za(t,e),t.prototype.init=function(e){e.node.failedLoad?this.setupFailed():this.setupLoading()},t.prototype.setupFailed=function(){var e=this.localeService.getLocaleTextFunc();this.eLoadingText.innerText=e("loadingError","ERR")},t.prototype.setupLoading=function(){var e=So("groupLoading",this.gridOptionsService,null);e&&this.eLoadingIcon.appendChild(e);var t=this.localeService.getLocaleTextFunc();this.eLoadingText.innerText=t("loadingOoo","Loading")},t.prototype.refresh=function(e){return!1},t.prototype.destroy=function(){e.prototype.destroy.call(this)},t.TEMPLATE='<div class="ag-loading">\n            <span class="ag-loading-icon" ref="eLoadingIcon"></span>\n            <span class="ag-loading-text" ref="eLoadingText"></span>\n        </div>',Ka([sr("eLoadingIcon")],t.prototype,"eLoadingIcon",void 0),Ka([sr("eLoadingText")],t.prototype,"eLoadingText",void 0),t}(rr),qa=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Xa=function(e){function t(){return e.call(this)||this}return qa(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this)},t.prototype.init=function(e){var i,n=null!==(i=this.gridOptionsService.get("overlayLoadingTemplate"))&&void 0!==i?i:t.DEFAULT_LOADING_OVERLAY_TEMPLATE,o=this.localeService.getLocaleTextFunc(),r=n.replace("[LOADING...]",o("loadingOoo","Loading..."));this.setTemplate(r)},t.DEFAULT_LOADING_OVERLAY_TEMPLATE='<span class="ag-overlay-loading-center">[LOADING...]</span>',t}(rr),$a=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Za=function(e){function t(){return e.call(this)||this}return $a(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this)},t.prototype.init=function(e){var i,n=null!==(i=this.gridOptionsService.get("overlayNoRowsTemplate"))&&void 0!==i?i:t.DEFAULT_NO_ROWS_TEMPLATE,o=this.localeService.getLocaleTextFunc(),r=n.replace("[NO_ROWS_TO_SHOW]",o("noRowsToShow","No Rows To Show"));this.setTemplate(r)},t.DEFAULT_NO_ROWS_TEMPLATE='<span class="ag-overlay-no-rows-center">[NO_ROWS_TO_SHOW]</span>',t}(rr),Ja=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Qa=function(e){function t(){return e.call(this,'<div class="ag-tooltip"></div>')||this}return Ja(t,e),t.prototype.init=function(e){var t=e.value;this.getGui().innerHTML=Et(t)},t}(Qs),el=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),tl=function(){function e(){}return e.prototype.getTemplate=function(){return'<ag-input-number-field class="ag-cell-editor" ref="eInput"></ag-input-number-field>'},e.prototype.init=function(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);var i=e.getInputElement();t.preventStepping?e.addManagedListener(i,"keydown",this.preventStepping):t.showStepperButtons&&i.classList.add("ag-number-field-input-stepper")},e.prototype.preventStepping=function(e){e.key!==xo.UP&&e.key!==xo.DOWN||e.preventDefault()},e.prototype.getValue=function(){var e=this.eInput.getValue();if(!o(e)&&!o(this.params.value))return this.params.value;var 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},e.prototype.getStartValue=function(){return this.params.value},e}(),il=function(e){function t(){return e.call(this,new tl)||this}return el(t,e),t}(la),nl=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ol=function(){function e(){}return e.prototype.getTemplate=function(){return'<ag-input-date-field class="ag-cell-editor" ref="eInput"></ag-input-date-field>'},e.prototype.init=function(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)},e.prototype.getValue=function(){var e=this.eInput.getDate();return o(e)||o(this.params.value)?null!==e&&void 0!==e?e:null:this.params.value},e.prototype.getStartValue=function(){var e=this.params.value;if(e instanceof Date)return mn(e,!1)},e}(),rl=function(e){function t(){return e.call(this,new ol)||this}return nl(t,e),t}(la),sl=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),al=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},ll=function(){function e(e){this.getDataTypeService=e}return e.prototype.getTemplate=function(){return'<ag-input-date-field class="ag-cell-editor" ref="eInput"></ag-input-date-field>'},e.prototype.init=function(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)},e.prototype.getValue=function(){var e=this.formatDate(this.eInput.getDate());return o(e)||o(this.params.value)?this.params.parseValue(null!==e&&void 0!==e?e:""):this.params.value},e.prototype.getStartValue=function(){var e,t;return mn(null!==(t=this.parseDate(null!==(e=this.params.value)&&void 0!==e?e:void 0))&&void 0!==t?t:null,!1)},e.prototype.parseDate=function(e){return this.getDataTypeService().getDateParserFunction()(e)},e.prototype.formatDate=function(e){return this.getDataTypeService().getDateFormatterFunction()(e)},e}(),cl=function(e){function t(){var t=e.call(this,new ll((function(){return t.dataTypeService})))||this;return t}return sl(t,e),al([de("dataTypeService")],t.prototype,"dataTypeService",void 0),t}(la),ul=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),dl=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},pl=function(e){function t(){return e.call(this,t.TEMPLATE)||this}return ul(t,e),t.prototype.init=function(e){var t=this;this.params=e,this.updateCheckbox(e);var i=this.eCheckbox.getInputElement();i.setAttribute("tabindex","-1"),gi(i,"polite"),this.addManagedListener(i,"click",(function(e){if($e(e),!t.eCheckbox.isDisabled()){var i=t.eCheckbox.getValue();t.onCheckboxChanged(i)}})),this.addManagedListener(i,"dblclick",(function(e){$e(e)}));var n=this.gridOptionsService.getDocument();this.addManagedListener(this.params.eGridCell,"keydown",(function(e){if(e.key===xo.SPACE&&!t.eCheckbox.isDisabled()){t.params.eGridCell===n.activeElement&&t.eCheckbox.toggle();var i=t.eCheckbox.getValue();t.onCheckboxChanged(i),e.preventDefault()}}))},t.prototype.refresh=function(e){return this.params=e,this.updateCheckbox(e),!0},t.prototype.updateCheckbox=function(e){var t,i,n,o,r=!0;if(e.node.group&&e.column){var s=e.column.getColId();s.startsWith(yt)?o=null==e.value||""===e.value?void 0:"true"===e.value:e.node.aggData&&void 0!==e.node.aggData[s]?o=null!==(t=e.value)&&void 0!==t?t:void 0:r=!1}else o=null!==(i=e.value)&&void 0!==i?i:void 0;if(r){this.eCheckbox.setValue(o);var a=null!=e.disabled?e.disabled:!(null===(n=e.column)||void 0===n?void 0:n.isCellEditable(e.node));this.eCheckbox.setDisabled(a);var l=this.localeService.getLocaleTextFunc(),c=Fi(l,o),u=a?c:"".concat(l("ariaToggleCellValue","Press SPACE to toggle cell value")," (").concat(c,")");this.eCheckbox.setInputAriaLabel(u)}else this.eCheckbox.setDisplayed(!1)},t.prototype.onCheckboxChanged=function(e){var t=this.params,i=t.column,n=t.node,o=t.rowIndex,r=t.value,s={type:ht.EVENT_CELL_EDITING_STARTED,column:i,colDef:null===i||void 0===i?void 0:i.getColDef(),data:n.data,node:n,rowIndex:o,rowPinned:n.rowPinned,value:r};this.eventService.dispatchEvent(s);var a=this.params.node.setDataValue(this.params.column,e,"edit"),l={type:ht.EVENT_CELL_EDITING_STOPPED,column:i,colDef:null===i||void 0===i?void 0:i.getColDef(),data:n.data,node:n,rowIndex:o,rowPinned:n.rowPinned,value:r,oldValue:r,newValue:e,valueChanged:a};this.eventService.dispatchEvent(l)},t.TEMPLATE='\n        <div class="ag-cell-wrapper ag-checkbox-cell" role="presentation">\n            <ag-checkbox role="presentation" ref="eCheckbox"></ag-checkbox>\n        </div>',dl([sr("eCheckbox")],t.prototype,"eCheckbox",void 0),t}(rr),hl=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),fl=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},gl=function(e){function t(){return e.call(this,'\n            <div class="ag-cell-wrapper ag-cell-edit-wrapper ag-checkbox-edit">\n                <ag-checkbox role="presentation" ref="eCheckbox"></ag-checkbox>\n            </div>')||this}return hl(t,e),t.prototype.init=function(e){var t,i=this;this.params=e;var n=null!==(t=e.value)&&void 0!==t?t:void 0;this.eCheckbox.setValue(n);var o=this.eCheckbox.getInputElement();o.setAttribute("tabindex","-1"),this.setAriaLabel(n),this.addManagedListener(this.eCheckbox,ht.EVENT_FIELD_VALUE_CHANGED,(function(e){return i.setAriaLabel(e.selected)}))},t.prototype.getValue=function(){return this.eCheckbox.getValue()}
11,t.prototype.focusIn=function(){this.eCheckbox.getFocusableElement().focus()},t.prototype.afterGuiAttached=function(){this.params.cellStartedEdit&&this.focusIn()},t.prototype.isPopup=function(){return!1},t.prototype.setAriaLabel=function(e){var t=this.localeService.getLocaleTextFunc(),i=Fi(t,e),n=t("ariaToggleCellValue","Press SPACE to toggle cell value");this.eCheckbox.setInputAriaLabel("".concat(n," (").concat(i,")"))},fl([sr("eCheckbox")],t.prototype,"eCheckbox",void 0),t}(Qs),vl=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),yl=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},ml=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},Cl=function(e,t,i){if(i||2===arguments.length)for(var n,o=0,r=t.length;o<r;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},bl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.agGridDefaults={agDateInput:ms,agColumnHeader:qs,agColumnGroupHeader:Zs,agSortIndicator:zs,agTextColumnFloatingFilter:js,agNumberColumnFloatingFilter:Vs,agDateColumnFloatingFilter:fs,agReadOnlyFloatingFilter:pr,agAnimateShowChangeCellRenderer:va,agAnimateSlideCellRenderer:Ca,agGroupCellRenderer:Ua,agGroupRowRenderer:Ua,agLoadingCellRenderer:Ya,agCheckboxCellRenderer:pl,agCellEditor:da,agTextCellEditor:da,agNumberCellEditor:il,agDateCellEditor:rl,agDateStringCellEditor:cl,agSelectCellEditor:ra,agLargeTextCellEditor:ia,agCheckboxCellEditor:gl,agTextColumnFilter:Ms,agNumberColumnFilter:Rs,agDateColumnFilter:cs,agLoadingOverlay:Xa,agNoRowsOverlay:Za,agTooltipComponent:Qa},t.enterpriseAgDefaultCompsModule={agSetColumnFilter:J.SetFilterModule,agSetColumnFloatingFilter:J.SetFilterModule,agMultiColumnFilter:J.MultiFilterModule,agMultiColumnFloatingFilter:J.MultiFilterModule,agGroupColumnFilter:J.RowGroupingModule,agGroupColumnFloatingFilter:J.RowGroupingModule,agRichSelect:J.RichSelectModule,agRichSelectCellEditor:J.RichSelectModule,agDetailCellRenderer:J.MasterDetailModule,agSparklineCellRenderer:J.SparklinesModule},t.jsComps={},t}return vl(t,e),t.prototype.init=function(){var e=this;null!=this.gridOptions.components&&m(this.gridOptions.components,(function(t,i){return e.registerJsComponent(t,i)}))},t.prototype.registerDefaultComponent=function(e,t){this.agGridDefaults[e]?console.error("Trying to overwrite a default component. You should call registerComponent"):this.agGridDefaults[e]=t},t.prototype.registerJsComponent=function(e,t){this.jsComps[e]=t},t.prototype.retrieve=function(e,t){var i=this,n=function(e,t){return{componentFromFramework:t,component:e}},o=this.getFrameworkOverrides().frameworkComponent(t,this.gridOptions.components);if(null!=o)return n(o,!0);var r=this.jsComps[t];if(r){var s=this.getFrameworkOverrides().isFrameworkComponent(r);return n(r,s)}var a=this.agGridDefaults[t];if(a)return n(a,!1);var l=this.enterpriseAgDefaultCompsModule[t];return l?ne.__assertRegistered(l,"AG Grid '".concat(e,"' component: ").concat(t),this.context.getGridId()):F((function(){i.warnAboutMissingComponent(e,t)}),"MissingComp"+t),null},t.prototype.warnAboutMissingComponent=function(e,t){var i=Cl(Cl([],ml(Object.keys(this.agGridDefaults).filter((function(e){return!["agCellEditor","agGroupRowRenderer","agSortIndicator"].includes(e)}))),!1),ml(Object.keys(this.jsComps)),!1),n=yo(t,i,!0,.8).values;console.warn("AG Grid: Could not find '".concat(t,"' component. It was configured as \"").concat(e,": '").concat(t,"'\" but it wasn't found in the list of registered components.")),n.length>0&&console.warn("         Did you mean: [".concat(n.slice(0,3),"]?")),console.warn("If using a custom component check it has been registered as described 
11in: ".concat(this.getFrameworkOverrides().getDocLink("components/")))},yl([de("gridOptions")],t.prototype,"gridOptions",void 0),yl([le],t.prototype,"init",null),t=yl([ue("userComponentRegistry")],t),t}(st),wl={propertyName:"dateComponent",cellRenderer:!1},Sl={propertyName:"headerComponent",cellRenderer:!1},El={propertyName:"headerGroupComponent",cellRenderer:!1},xl={propertyName:"cellRenderer",cellRenderer:!0},Ol={propertyName:"cellEditor",cellRenderer:!1},Tl={propertyName:"innerRenderer",cellRenderer:!0},Dl={propertyName:"loadingOverlayComponent",cellRenderer:!1},Rl={propertyName:"noRowsOverlayComponent",cellRenderer:!1},Al={propertyName:"tooltipComponent",cellRenderer:!1},_l={propertyName:"filter",cellRenderer:!1},Pl={propertyName:"floatingFilterComponent",cellRenderer:!1},Ml={propertyName:"toolPanel",cellRenderer:!1},kl={propertyName:"statusPanel",cellRenderer:!1},Nl={propertyName:"fullWidthCellRenderer",cellRenderer:!0},Ll={propertyName:"loadingCellRenderer",cellRenderer:!0},Il={propertyName:"groupRowRenderer",cellRenderer:!0},Fl={propertyName:"detailCellRenderer",cellRenderer:!0},Gl=function(){function e(){}return e.getFloatingFilterType=function(e){return this.filterToFloatingFilterMapping[e]},e.filterToFloatingFilterMapping={set:"agSetColumnFloatingFilter",agSetColumnFilter:"agSetColumnFloatingFilter",multi:"agMultiColumnFloatingFilter",agMultiColumnFilter:"agMultiColumnFloatingFilter",group:"agGroupColumnFloatingFilter",agGroupColumnFilter:"agGroupColumnFloatingFilter",number:"agNumberColumnFloatingFilter",agNumberColumnFilter:"agNumberColumnFloatingFilter",date:"agDateColumnFloatingFilter",agDateColumnFilter:"agDateColumnFloatingFilter",text:"agTextColumnFloatingFilter",agTextColumnFilter:"agTextColumnFloatingFilter"},e}(),Vl=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Bl=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},jl=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Vl(t,e),t.prototype.getHeaderCompDetails=function(e,t){return this.getCompDetails(e,Sl,"agColumnHeader",t)},t.prototype.getHeaderGroupCompDetails=function(e){var t=e.columnGroup.getColGroupDef();return this.getCompDetails(t,El,"agColumnGroupHeader",e)},t.prototype.getFullWidthCellRendererDetails=function(e){return this.getCompDetails(this.gridOptions,Nl,null,e,!0)},t.prototype.getFullWidthLoadingCellRendererDetails=function(e){return this.getCompDetails(this.gridOptions,Ll,"agLoadingCellRenderer",e,!0)},t.prototype.getFullWidthGroupCellRendererDetails=function(e){return this.getCompDetails(this.gridOptions,Il,"agGroupRowRenderer",e,!0)},t.prototype.getFullWidthDetailCellRendererDetails=function(e){return this.getCompDetails(this.gridOptions,Fl,"agDetailCellRenderer",e,!0)},t.prototype.getInnerRendererDetails=function(e,t){return this.getCompDetails(e,Tl,null,t)},t.prototype.getFullWidthGroupRowInnerCellRenderer=function(e,t){return this.getCompDetails(e,Tl,null,t)},t.prototype.getCellRendererDetails=function(e,t){return this.getCompDetails(e,xl,null,t)},t.prototype.getCellEditorDetails=function(e,t){return this.getCompDetails(e,Ol,"agCellEditor",t,!0)},t.prototype.getFilterDetails=function(e,t,i){return this.getCompDetails(e,_l,i,t,!0)},t.prototype.getDateCompDetails=function(e){return this.getCompDetails(this.gridOptions,wl,"agDateInput",e,!0)},t.prototype.getLoadingOverlayCompDetails=function(e){return this.getCompDetails(this.gridOptions,Dl,"agLoadingOverlay",e,!0)}
vendor: 1,207 bytes, line 11
11,t.prototype.getNoRowsOverlayCompDetails=function(e){return this.getCompDetails(this.gridOptions,Rl,"agNoRowsOverlay",e,!0)},t.prototype.getTooltipCompDetails=function(e){return this.getCompDetails(e.colDef,Al,"agTooltipComponent",e,!0)},t.prototype.getSetFilterCellRendererDetails=function(e,t){return this.getCompDetails(e,xl,null,t)},t.prototype.getFloatingFilterCompDetails=function(e,t,i){return this.getCompDetails(e,Pl,i,t)},t.prototype.getToolPanelCompDetails=function(e,t){return this.getCompDetails(e,Ml,null,t,!0)},t.prototype.getStatusPanelCompDetails=function(e,t){return this.getCompDetails(e,kl,null,t,!0)},t.prototype.getCompDetails=function(e,t,i,n,o){var r=this;void 0===o&&(o=!1);var s=t.propertyName,a=t.cellRenderer,l=this.getCompKeys(e,t,n),c=l.compName,u=l.jsComp,d=l.fwComp,p=l.paramsFromSelector,h=l.popupFromSelector,f=l.popupPositionFromSelector,g=function(e){var t=r.userComponentRegistry.retrieve(s,e);t&&(u=t.componentFromFramework?void 0:t.component,d=t.componentFromFramework?t.component:void 0)};if(null!=c&&g(c),null==u&&null==d&&null!=i&&g(i),u&&a&&!this.agComponentUtils.doesImplementIComponent(u)&&(u=this.agComponentUtils.adaptFunction(s,u)),u||d){var v=this.mergeParam
11sWithApplicationProvidedParams(e,t,n,p),y=null==u,m=u||d;return{componentFromFramework:y,componentClass:m,params:v,type:t,popupFromSelector:h,popupPositionFromSelector:f,newAgStackInstance:function(){return r.newAgStackInstance(m,y,v,t)}}}o&&console.error("AG Grid: Could not find component ".concat(c,", did you forget to configure this component?"))},t.prototype.getCompKeys=function(e,t,i){var n,o,r,s,a,l,c=this,u=t.propertyName;if(e){var d=e,p=d[u+"Selector"],h=p?p(i):null,f=function(e){if("string"===typeof e)n=e;else if(null!=e&&!0!==e){var t=c.getFrameworkOverrides().isFrameworkComponent(e);t?r=e:o=e}};h?(f(h.component),s=h.params,a=h.popup,l=h.popupPosition):f(d[u])}return{compName:n,jsComp:o,fwComp:r,paramsFromSelector:s,popupFromSelector:a,popupPositionFromSelector:l}},t.prototype.newAgStackInstance=function(e,t,i,n){var o,r=n.propertyName,s=!t;if(s)o=new e;else{var a=this.componentMetadataProvider.retrieve(r);o=this.frameworkComponentWrapper.wrap(e,a.mandatoryMethodList,a.optionalMethodList,n)}var l=this.initComponent(o,i);return null==l?$o.resolve(o):l.then((function(){return o}))},t.prototype.mergeParamsWithApplicationProvidedParams=function(e,t,i,n){void 0===n&&(n=null);var o={context:this.gridOptionsService.context,columnApi:this.gridOptionsService.columnApi,api:this.gridOptionsService.api};R(o,i);var r=e,s=r&&r[t.propertyName+"Params"];if("function"===typeof s){var a=s(i);R(o,a)}else"object"===typeof s&&R(o,s);return R(o,n),o},t.prototype.initComponent=function(e,t){if(this.context.createBean(e),null!=e.init)return e.init(t)},t.prototype.getDefaultFloatingFilterType=function(e,t){if(null==e)return null;var i=null,n=this.getCompKeys(e,_l),o=n.compName,r=n.jsComp,s=n.fwComp;if(o)i=Gl.getFloatingFilterType(o);else{var a=null==r&&null==s&&!0===e.filter;a&&(i=t())}return i},Bl([de("gridOptions")],t.prototype,"gridOptions",void 0),Bl([de("agComponentUtils")],t.prototype,"agComponentUtils",void 0),Bl([de("componentMetadataProvider")],t.prototype,"componentMetadataProvider",void 0),Bl([de("userComponentRegistry")],t.prototype,"userComponentRegistry",void 0),Bl([pe("frameworkComponentWrapper")],t.prototype,"frameworkComponentWrapper",void 0),t=Bl([ue("userComponentFactory")],t),t}(st),Hl=function(){function e(){}return e.ColDefPropertyMap={headerName:void 0,columnGroupShow:void 0,headerClass:void 0,toolPanelClass:void 0,headerValueGetter:void 0,pivotKeys:void 0,groupId:void 0,colId:void 0,sort:void 0,initialSort:void 0,field:void 0,type:void 0,cellDataType:void 0,tooltipComponent:void 0,tooltipField:void 0,headerTooltip:void 0,cellClass:void 0,showRowGroup:void 0,filter:void 0,initialAggFunc:void 0,defaultAggFunc:void 0,aggFunc:void 0,pinned:void 0,initialPinned:void 0,chartDataType:void 0,cellAriaRole:void 0,cellEditorPopupPosition:void 0,headerGroupComponent:void 0,headerGroupComponentParams:void 0,cellStyle:void 0,cellRenderer:void 0,cellRendererParams:void 0,cellEditor:void 0,cellEditorParams:void 0,filterParams:void 0,pivotValueColumn:void 0,headerComponent:void 0,headerComponentParams:void 0,floatingFilterComponent:void 0,floatingFilterComponentParams:void 0,tooltipComponentParams:void 0,refData:void 0,columnsMenuParams:void 0,children:void 0,sortingOrder:void 0,allowedAggFuncs:void 0,menuTabs:void 0,pivotTotalColumnIds:void 0,cellClassRules:void 0,icons:void 0,sortIndex:void 0,initialSortIndex:void 0,flex:void 0,initialFlex:void 0,width:void 0,initialWidth:void 0,minWidth:void 0,maxWidth:void 0,rowGroupIndex:void 0,initialRowGroupIndex:void 0,pivotIndex:void 0,initialPivotIndex:void 0,suppressCellFlash:void 0,suppressColumnsToolPanel:void 0,suppressFiltersToolPanel:void 0,openByDefault:void 0,marryChildren:void 0,suppressStickyLabel:void 0,hide:void 0,initialHide:void 0,rowGroup:void 0,initialRowGroup:void 0,pivot:void 0,initialPivot:void 0,checkboxSelection:void 0,showDisabledCheckboxes:void 0,headerCheckboxSelection:void 0,headerCheckboxSelectionFilteredOnly:void 0,headerCheckboxSelectionCurrentPageOnly:void 0,suppressMenu:void 0,suppressMovable:void 0,lockPosition:void 0,lockVisible:void 0,lockPinned:void 0,unSortIcon:void 0,suppressSizeToFit:void 0,suppressAutoSize:void 0,enableRowGroup:void 0,enablePivot:void 0,enableValue:void 0,editable:void 0,suppressPaste:void 0,suppressNavigable:void 0,enableCellChangeFlash:void 0,rowDrag:void 0,dndSource:void 0,autoHeight:void 0,wrapText:void 0,sortable:void 0,resizable:void 0,singleClickEdit:void 0,floatingFilter:void 0,cellEditorPopup:void 0,suppressFillHandle:void 0,wrapHeaderText:void 0,autoHeaderHeight:void 0,dndSourceOnRowDrag:void 0,valueGetter:void 0,valueSetter:void 0,filterValueGetter:void 0,keyCreator:void 0,valueFormatter:void 0,valueParser:void 0,comparator:void 0,equals:void 0,pivotComparator:void 0,suppressKeyboardEvent:void 0,suppressHeaderKeyboardEvent:void 0,colSpan:void 0,rowSpan:void 0,getQuickFilterText:void 0,onCellValueChanged:void 0,onCellClicked:void 0,onCellDoubleClicked:void 0,onCellContextMenu:void 0,rowDragText:void 0,tooltipValueGetter:void 0,cellRendererSelector:void 0,cellEditorSelector:void 0,suppressS
11panHeaderHeight:void 0,useValueFormatterForExport:void 0,useValueParserForImport:void 0},e.ALL_PROPERTIES=Object.keys(e.ColDefPropertyMap),e}();(function(e){e[e["SINGLE_SHEET"]=0]="SINGLE_SHEET",e[e["MULTI_SHEET"]=1]="MULTI_SHEET"})(_a||(_a={}));var Wl,Ul=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),zl=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Kl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.dragEndFunctions=[],t.dragSources=[],t}return Ul(t,e),t.prototype.removeAllListeners=function(){this.dragSources.forEach(this.removeListener.bind(this)),this.dragSources.length=0},t.prototype.removeListener=function(e){var t=e.dragSource.eElement,i=e.mouseDownListener;if(t.removeEventListener("mousedown",i),e.touchEnabled){var n=e.touchStartListener;t.removeEventListener("touchstart",n,{passive:!0})}},t.prototype.removeDragSource=function(e){var t=this.dragSources.find((function(t){return t.dragSource===e}));t&&(this.removeListener(t),Le(this.dragSources,t))},t.prototype.isDragging=function(){return this.dragging},t.prototype.addDragSource=function(e){var t=this,i=this.onMouseDown.bind(this,e),n=e.eElement,o=e.includeTouch,r=e.stopPropagationForTouch;n.addEventListener("mousedown",i);var s=null,a=this.gridOptionsService.get("suppressTouch");o&&!a&&(s=function(i){An(i.target)||(i.cancelable&&(i.preventDefault(),r&&i.stopPropagation()),t.onTouchStart(e,i))},n.addEventListener("touchstart",s,{passive:!1})),this.dragSources.push({dragSource:e,mouseDownListener:i,touchStartListener:s,touchEnabled:!!o})},t.prototype.getStartTarget=function(){return this.startTarget},t.prototype.onTouchStart=function(e,t){var i=this;this.currentDragParams=e,this.dragging=!1;var n=t.touches[0];this.touchLastTime=n,this.touchStart=n;var o=function(t){return i.onTouchMove(t,e.eElement)},r=function(t){return i.onTouchUp(t,e.eElement)},s=function(e){e.cancelable&&e.preventDefault()},a=t.target,l=[{target:this.gridOptionsService.getRootNode(),type:"touchmove",listener:s,options:{passive:!1}},{target:a,type:"touchmove",listener:o,options:{passive:!0}},{target:a,type:"touchend",listener:r,options:{passive:!0}},{target:a,type:"touchcancel",listener:r,options:{passive:!0}}];this.addTemporaryEvents(l),0===e.dragStartPixels&&this.onCommonMove(n,this.touchStart,e.eElement)},t.prototype.onMouseDown=function(e,t){var i=this,n=t;if((!e.skipMouseEvent||!e.skipMouseEvent(t))&&!n._alreadyProcessedByDragService&&(n._alreadyProcessedByDragService=!0,0===t.button)){this.shouldPreventMouseEvent(t)&&t.preventDefault(),this.currentDragParams=e,this.dragging=!1,this.mouseStartEvent=t,this.startTarget=t.target;var o=function(t){return i.onMouseMove(t,e.eElement)},r=function(t){return i.onMouseUp(t,e.eElement)},s=function(e){return e.preventDefault()},a=this.gridOptionsService.getRootNode(),l=[{target:a,type:"mousemove",listener:o},{target:a,type:"mouseup",listener:r},{target:a,type:"contextmenu",listener:s}];this.addTemporaryEvents(l),0===e.dragStartPixels&&this.onMouseMove(t,e.eElement)}},t.prototype.addTemporaryEvents=function(e){e.forEach((function(e){var t=e.target,i=e.type,n=e.listener,o=e.options;t.addEventListener(i,n,o)})),this.dragEndFunctions.push((function(){e.forEach((function(e){var t=e.target,i=e.type,n=e.listener,o=e.options;t.removeEventListener(i,n,o)}))}))},t.prototype.isEventNearStartEvent=function(e,t){var i=this.currentDragParams.dragStartPixels,n=o(i)?i:4;
11return Fo(e,t,n)},t.prototype.getFirstActiveTouch=function(e){for(var t=0;t<e.length;t++)if(e[t].identifier===this.touchStart.identifier)return e[t];return null},t.prototype.onCommonMove=function(e,t,i){if(!this.dragging){if(!this.dragging&&this.isEventNearStartEvent(e,t))return;this.dragging=!0;var n={type:ht.EVENT_DRAG_STARTED,target:i};this.eventService.dispatchEvent(n),this.currentDragParams.onDragStart(t),this.currentDragParams.onDragging(t)}this.currentDragParams.onDragging(e)},t.prototype.onTouchMove=function(e,t){var i=this.getFirstActiveTouch(e.touches);i&&this.onCommonMove(i,this.touchStart,t)},t.prototype.onMouseMove=function(e,t){var i;if(Yi()){var n=this.gridOptionsService.getDocument();null===(i=n.getSelection())||void 0===i||i.removeAllRanges()}this.shouldPreventMouseEvent(e)&&e.preventDefault(),this.onCommonMove(e,this.mouseStartEvent,t)},t.prototype.shouldPreventMouseEvent=function(e){var t=this.gridOptionsService.get("enableCellTextSelection"),i="mousemove"===e.type;return t&&i&&e.cancelable&&this.mouseEventService.isEventFromThisGrid(e)&&!this.isOverFormFieldElement(e)},t.prototype.isOverFormFieldElement=function(e){var t=e.target,i=null===t||void 0===t?void 0:t.tagName.toLocaleLowerCase();return!!(null===i||void 0===i?void 0:i.match("^a$|textarea|input|select|button"))},t.prototype.onTouchUp=function(e,t){var i=this.getFirstActiveTouch(e.changedTouches);i||(i=this.touchLastTime),this.onUpCommon(i,t)},t.prototype.onMouseUp=function(e,t){this.onUpCommon(e,t)},t.prototype.onUpCommon=function(e,t){if(this.dragging){this.dragging=!1,this.currentDragParams.onDragStop(e);var i={type:ht.EVENT_DRAG_STOPPED,target:t};this.eventService.dispatchEvent(i)}this.mouseStartEvent=null,this.startTarget=null,this.touchStart=null,this.touchLastTime=null,this.currentDragParams=null,this.dragEndFunctions.forEach((function(e){return e()})),this.dragEndFunctions.length=0},zl([de("mouseEventService")],t.prototype,"mouseEventService",void 0),zl([ce],t.prototype,"removeAllListeners",null),t=zl([ue("dragService")],t),t}(st),Yl=function(){function e(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||function(){return!1},this.shouldSkipHorizontalScroll=e.shouldSkipHorizontalScroll||function(){return!1}}return e.prototype.check=function(e,t){void 0===t&&(t=!1);var i=t||this.shouldSkipVerticalScroll();if(!i||!this.shouldSkipHorizontalScroll()){var n=this.scrollContainer.getBoundingClientRect(),o=this.scrollByTick;this.tickLeft=e.clientX<n.left+o,this.tickRight=e.clientX>n.right-o,this.tickUp=e.clientY<n.top+o&&!i,this.tickDown=e.clientY>n.bottom-o&&!i,this.tickLeft||this.tickRight||this.tickUp||this.tickDown?this.ensureTickingStarted():this.ensureCleared()}},e.prototype.ensureTickingStarted=function(){null===this.tickingInterval&&(this.tickingInterval=window.setInterval(this.doTick.bind(this),100),this.tickCount=0)},e.prototype.doTick=function(){var e;if(this.tickCount++,e=this.tickCount>20?200:this.tickCount>10?80:40,this.scrollVertically){var t=this.getVerticalPosition();this.tickUp&&this.setVerticalPosition(t-e),this.tickDown&&this.setVerticalPosition(t+e)}if(this.scrollHorizontally){var i=this.getHorizontalPosition();this.tickLeft&&this.setHorizontalPosition(i-e),this.tickRight&&this.setHorizontalPosition(i+e)}this.onScrollCallback&&this.onScrollCallback()},e.prototype.ensureCleared=function(){this.tickingInterval&&(window.clearInterval(this.tickingInterval),this.tickingInterval=null)},e}(),ql=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Xl=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},$l="ag-list-item-hovered",Zl=function(e){function t(t,i,n){var o=e.call(this)||this;return o.comp=t,o.virtualList=i,o.params=n,o.currentDragValue=null,o.lastHoveredListItem=null,o}return ql(t,e),t.prototype.postConstruct=function(){this.addManagedListener(this.params.eventSource,this.params.listItemDragStartEvent,this.listItemDragStart.bind(this)),this.addManagedListener(this.params.eventSource,this.params.listItemDragEndEvent,this.listItemDragEnd.bind(this)),this.createDropTarget(),this.createAutoScrollService()},t.prototype.listItemDragStart=function(e){this.currentDragValue=this.params.getCurrentDragValue(e),this.moveBlocked=this.params.isMoveBlocked(this.currentDragValue)},t.prototype.listItemDragEnd=function(){var e=this;window.setTimeout((function(){e.currentDragValue=null,e.moveBlocked=!1}),10)},t.prototype.createDropTarget=function(){var e=this,t={isInterestedIn:function(t){return t===e.params.dragSourceType},getIconName:function(){return Pa[e.moveBlocked?"ICON_NOT_ALLOWED":"ICON_MOVE"]},getContainer:function(){return e.comp.getGui()},onDragging:function(t){return e.onDragging(t)},onDragStop:function(){return e.onDragStop()},onDragLeave:function(){return e.onDragLeave()}};this.dragAndDropService.addDropTarget(t)},t.prototype.createAutoScrollService=function(){var e=this.virtualList.getGui();
11this.autoScrollService=new Yl({scrollContainer:e,scrollAxis:"y",getVerticalPosition:function(){return e.scrollTop},setVerticalPosition:function(t){return e.scrollTop=t}})},t.prototype.onDragging=function(e){if(this.currentDragValue&&!this.moveBlocked){var t=this.getListDragItem(e),i=this.virtualList.getComponentAt(t.rowIndex);if(i){var n=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,Tn(n,$l),Tn(n,"ag-item-highlight-".concat(t.position)))}}},t.prototype.getListDragItem=function(e){var t=this.virtualList.getGui(),i=parseFloat(window.getComputedStyle(t).paddingTop),n=this.virtualList.getRowHeight(),o=this.virtualList.getScrollTop(),r=Math.max(0,(e.y-i+o)/n),s=this.params.getNumRows(this.comp)-1,a=0|Math.min(s,r);return{rowIndex:a,position:Math.round(r)>r||r>s?"bottom":"top",component:this.virtualList.getComponentAt(a)}},t.prototype.onDragStop=function(){this.moveBlocked||(this.params.moveItem(this.currentDragValue,this.lastHoveredListItem),this.clearHoveredItems(),this.autoScrollService.ensureCleared())},t.prototype.onDragLeave=function(){this.clearHoveredItems(),this.autoScrollService.ensureCleared()},t.prototype.clearHoveredItems=function(){var e=this.virtualList.getGui();e.querySelectorAll(".".concat($l)).forEach((function(e){[$l,"ag-item-highlight-top","ag-item-highlight-bottom"].forEach((function(t){e.classList.remove(t)}))})),this.lastHoveredListItem=null},Xl([de("dragAndDropService")],t.prototype,"dragAndDropService",void 0),Xl([le],t.prototype,"postConstruct",null),t}(st);(function(e){e[e["Above"]=0]="Above",e[e["Below"]=1]="Below"})(Wl||(Wl={}));var Jl=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};function Ql(e){var t=e,i=null!=t&&null!=t.getFrameworkComponentInstance;return i?t.getFrameworkComponentInstance():e}var ec,tc=function(){function e(){this.detailGridInfoMap={},this.destroyCalled=!1}return e.prototype.init=function(){var e=this;switch(this.rowModel.getType()){case"clientSide":this.clientSideRowModel=this.rowModel;break;case"infinite":this.infiniteRowModel=this.rowModel;break;case"serverSide":this.serverSideRowModel=this.rowModel;break}this.ctrlsService.whenReady((function(){e.gridBodyCtrl=e.ctrlsService.getGridBodyCtrl()}))},e.prototype.__getAlignedGridService=function(){return this.alignedGridsService},e.prototype.__getContext=function(){return this.context},e.prototype.getGridId=function(){return this.context.getGridId()},e.prototype.addDetailGridInfo=function(e,t){this.detailGridInfoMap[e]=t},e.prototype.removeDetailGridInfo=function(e){this.detailGridInfoMap[e]=void 0},e.prototype.getDetailGridInfo=function(e){return this.detailGridInfoMap[e]},e.prototype.forEachDetailGridInfo=function(e){var t=0;m(this.detailGridInfoMap,(function(i,n){o(n)&&(e(n,t),t++)}))},e.prototype.getDataAsCsv=function(e){if(ne.__assertRegistered(J.CsvExportModule,"api.getDataAsCsv",this.context.getGridId()))return this.csvCreator.getDataAsCsv(e)},e.prototype.exportDataAsCsv=function(e){ne.__assertRegistered(J.CsvExportModule,"api.exportDataAsCSv",this.context.getGridId())&&this.csvCreator.exportDataAsCsv(e)},e.prototype.assertNotExcelMultiSheet=function(e,t){return!!ne.__assertRegistered(J.ExcelExportModule,"api."+e,this.context.getGridId())&&(this.excelCreator.getFactoryMode()!==_a.MULTI_SHEET||(console.warn("AG Grid: The Excel Exporter is currently on Multi Sheet mode. End that operation by calling 'api.getMultipleSheetAsExcel()' or 'api.exportMultipleSheetsAsExcel()'"),!1))},e.prototype.getDataAsExcel=function(e){if(this.assertNotExcelMultiSheet("getDataAsExcel",e))return this.excelCreator.getDataAsExcel(e)},e.prototype.exportDataAsExcel=function(e){this.assertNotExcelMultiSheet("exportDataAsExcel",e)&&this.excelCreator.exportDataAsExcel(e)},e.prototype.getSheetDataForExcel=function(e){if(ne.__assertRegistered(J.ExcelExportModule,"api.getSheetDataForExcel",this.context.getGridId()))return this.excelCreator.setFactoryMode(_a.MULTI_SHEET),this.excelCreator.getSheetDataForExcel(e)},e.prototype.getMultipleSheetsAsExcel=function(e){if(ne.__assertRegistered(J.ExcelExportModule,"api.getMultipleSheetsAsExcel",this.context.getGridId()))return this.excelCreator.getMultipleSheetsAsExcel
11(e)},e.prototype.exportMultipleSheetsAsExcel=function(e){if(ne.__assertRegistered(J.ExcelExportModule,"api.exportMultipleSheetsAsExcel",this.context.getGridId()))return this.excelCreator.exportMultipleSheetsAsExcel(e)},e.prototype.setGridAriaProperty=function(e,t){if(e){var i=this.ctrlsService.getGridBodyCtrl().getGui(),n="aria-".concat(e);null===t?i.removeAttribute(n):i.setAttribute(n,t)}},e.prototype.logMissingRowModel=function(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];console.error("AG Grid: api.".concat(e," can only be called when gridOptions.rowModelType is ").concat(t.join(" or ")))},e.prototype.getPinnedTopRowCount=function(){return this.pinnedRowModel.getPinnedTopRowCount()},e.prototype.getPinnedBottomRowCount=function(){return this.pinnedRowModel.getPinnedBottomRowCount()},e.prototype.getPinnedTopRow=function(e){return this.pinnedRowModel.getPinnedTopRow(e)},e.prototype.getPinnedBottomRow=function(e){return this.pinnedRowModel.getPinnedBottomRow(e)},e.prototype.expireValueCache=function(){this.valueCache.expire()},e.prototype.getVerticalPixelRange=function(){return this.gridBodyCtrl.getScrollFeature().getVScrollPosition()},e.prototype.getHorizontalPixelRange=function(){return this.gridBodyCtrl.getScrollFeature().getHScrollPosition()},e.prototype.refreshCells=function(e){void 0===e&&(e={}),this.rowRenderer.refreshCells(e)},e.prototype.flashCells=function(e){void 0===e&&(e={}),this.rowRenderer.flashCells(e)},e.prototype.redrawRows=function(e){void 0===e&&(e={});var t=e?e.rowNodes:void 0;this.rowRenderer.redrawRows(t)},e.prototype.refreshHeader=function(){this.ctrlsService.getHeaderRowContainerCtrls().forEach((function(e){return e.refresh()}))},e.prototype.isAnyFilterPresent=function(){return this.filterManager.isAnyFilterPresent()},e.prototype.isColumnFilterPresent=function(){return this.filterManager.isColumnFilterPresent()||this.filterManager.isAggregateFilterPresent()},e.prototype.isQuickFilterPresent=function(){return this.filterManager.isQuickFilterPresent()},e.prototype.getModel=function(){return this.rowModel},e.prototype.setRowNodeExpanded=function(e,t,i){this.expansionService.setRowNodeExpanded(e,t,i)},e.prototype.onGroupExpandedOrCollapsed=function(){r(this.clientSideRowModel)?this.logMissingRowModel("onGroupExpandedOrCollapsed","clientSide"):this.expansionService.onGroupExpandedOrCollapsed()},e.prototype.refreshClientSideRowModel=function(e){r(this.clientSideRowModel)?this.logMissingRowModel("refreshClientSideRowModel","clientSide"):this.clientSideRowModel.refreshModel(e)},e.prototype.isAnimationFrameQueueEmpty=function(){return this.animationFrameService.isQueueEmpty()},e.prototype.flushAllAnimationFrames=function(){this.animationFrameService.flushAllFrames()},e.prototype.getRowNode=function(e){return this.rowModel.getRowNode(e)},e.prototype.getSizesForCurrentTheme=function(){return{rowHeight:this.gos.getRowHeightAsNumber(),headerHeight:this.columnModel.getHeaderHeight()}},e.prototype.expandAll=function(){this.clientSideRowModel||this.serverSideRowModel?this.expansionService.expandAll(!0):this.logMissingRowModel("expandAll","clientSide","serverSide")},e.prototype.collapseAll=function(){this.clientSideRowModel||this.serverSideRowModel?this.expansionService.expandAll(!1):this.logMissingRowModel("collapseAll","clientSide","serverSide")},e.prototype.addRenderedRowListener=function(e,t,i){this.rowRenderer.addRenderedRowListener(e,t,i)},e.prototype.getQuickFilter=function(){return this.gos.get("quickFilterText")},e.prototype.getAdvancedFilterModel=function(){return ne.__assertRegistered(J.AdvancedFilterModule,"api.getAdvancedFilterModel",this.context.getGridId())?this.filterManager.getAdvancedFilterModel():null},e.prototype.setAdvancedFilterModel=function(e){this.filterManager.setAdvancedFilterModel(e)},e.prototype.showAdvancedFilterBuilder=function(){ne.__assertRegistered(J.AdvancedFilterModule,"api.setAdvancedFilterModel",this.context.getGridId())&&this.filterManager.showAdvancedFilterBuilder("api")},e.prototype.setNodesSelected=function(e){var t=e.nodes.every((function(e){return e.rowPinned?(console.warn("AG Grid: cannot select pinned rows"),!1):void 0!==e.id||(console.warn("AG Grid: cannot select node until id for node is known"),!1)}));if(t){var i=e.nodes,n=e.source,o=e.newValue,r=i;this.selectionService.setNodesSelected({nodes:r,source:null!==n&&void 0!==n?n:"api",newValue:o})}},e.prototype.selectAll=function(e){void 0===e&&(e="apiSelectAll"),this.selectionService.selectAllRowNodes({source:e})},e.prototype.deselectAll=function(e){void 0===e&&(e="apiSelectAll"),this.selectionService.deselectAllRowNodes({source:e})},e.prototype.selectAllFiltered=function(e){void 0===e&&(e="apiSelectAllFiltered"),this.selectionService.selectAllRowNodes({source:e,justFiltered:!0})},e.prototype.deselectAllFiltered=function(e){void 0===e&&(e="apiSelectAllFiltered"),this.selectionService.deselectAllRowNodes({source:e,justFiltered:!0})},e.prototype.getServerSideSelectionState=function(){return r(this.serverSideRowModel)?(this.logMissingRowModel("getServerSideSelectionState","serverSide"),null):this.selectionService.getSelectionState()},e.prototype.setServerSideSelectionState=function(e){r(this.serverSideRowModel)?this.logMissingRowModel("setServerSideSelectionState","serverSide"):this.selectionService.setSelectionState(e,"api")},e.prototype.selectAllOnCurrentPage=function(e){void 0===e&&(e="apiSelectAllCurrentPage"),this.selectionService.selectAllRowNodes({source:e,justCurrentPage:!0})},e.prototype.deselectAllOnCurrentPage=function(e){void 0===e&&(e="apiSelectAllCurrentPage"),this.selectionService.deselectAllRowNodes({source:e,justCurrentPage:!0})},e.prototype.showLoadingOverlay=function(){this.overlayService.showLoadingOverlay()},e.prototype.showNoRowsOverlay=function(){this.overlayService.showNoRowsOverlay()},e.prototype.hideOverlay=function(){this.overlayService.hideOverlay()},e.prototype.getSelectedNodes=function(){return this.selectionService.getSelectedNodes()},e.prototype.getSelectedRows=function(){return this.selectionService.getSelectedRows()},e.prototype.getBestCostNodeSelection=function(){if(!r(this.clientSideRowModel))return this.selectionService.getBe
11stCostNodeSelection();this.logMissingRowModel("getBestCostNodeSelection","clientSide")},e.prototype.getRenderedNodes=function(){return this.rowRenderer.getRenderedNodes()},e.prototype.ensureColumnVisible=function(e,t){void 0===t&&(t="auto"),this.gridBodyCtrl.getScrollFeature().ensureColumnVisible(e,t)},e.prototype.ensureIndexVisible=function(e,t){this.gridBodyCtrl.getScrollFeature().ensureIndexVisible(e,t)},e.prototype.ensureNodeVisible=function(e,t){void 0===t&&(t=null),this.gridBodyCtrl.getScrollFeature().ensureNodeVisible(e,t)},e.prototype.forEachLeafNode=function(e){r(this.clientSideRowModel)?this.logMissingRowModel("forEachLeafNode","clientSide"):this.clientSideRowModel.forEachLeafNode(e)},e.prototype.forEachNode=function(e,t){this.rowModel.forEachNode(e,t)},e.prototype.forEachNodeAfterFilter=function(e){r(this.clientSideRowModel)?this.logMissingRowModel("forEachNodeAfterFilter","clientSide"):this.clientSideRowModel.forEachNodeAfterFilter(e)},e.prototype.forEachNodeAfterFilterAndSort=function(e){r(this.clientSideRowModel)?this.logMissingRowModel("forEachNodeAfterFilterAndSort","clientSide"):this.clientSideRowModel.forEachNodeAfterFilterAndSort(e)},e.prototype.getFilterInstance=function(e,t){return this.filterManager.getFilterInstance(e,t)},e.prototype.destroyFilter=function(e){var t=this.columnModel.getPrimaryColumn(e);if(t)return this.filterManager.destroyFilter(t,"api")},e.prototype.getStatusPanel=function(e){if(ne.__assertRegistered(J.StatusBarModule,"api.getStatusPanel",this.context.getGridId())){var t=this.statusBarService.getStatusPanel(e);return Ql(t)}},e.prototype.getColumnDef=function(e){var t=this.columnModel.getPrimaryColumn(e);return t?t.getColDef():null},e.prototype.getColumnDefs=function(){return this.columnModel.getColumnDefs()},e.prototype.onFilterChanged=function(e){void 0===e&&(e="api"),this.filterManager.onFilterChanged({source:e})},e.prototype.onSortChanged=function(){this.sortController.onSortChanged("api")},e.prototype.setFilterModel=function(e){this.filterManager.setFilterModel(e)},e.prototype.getFilterModel=function(){return this.filterManager.getFilterModel()},e.prototype.getFocusedCell=function(){return this.focusService.getFocusedCell()},e.prototype.clearFocusedCell=function(){return this.focusService.clearFocusedCell()},e.prototype.setFocusedCell=function(e,t,i){this.focusService.setFocusedCell({rowIndex:e,column:t,rowPinned:i,forceBrowserFocus:!0})},e.prototype.addRowDropZone=function(e){this.gridBodyCtrl.getRowDragFeature().addRowDropZone(e)},e.prototype.removeRowDropZone=function(e){var t=this.dragAndDropService.findExternalZone(e);t&&this.dragAndDropService.removeDropTarget(t)},e.prototype.getRowDropZoneParams=function(e){return this.gridBodyCtrl.getRowDragFeature().getRowDropZone(e)},e.prototype.assertSideBarLoaded=function(e){return ne.__assertRegistered(J.SideBarModule,"api."+e,this.context.getGridId())},e.prototype.isSideBarVisible=function(){return this.assertSideBarLoaded("isSideBarVisible")&&this.sideBarService.getSideBarComp().isDisplayed()},e.prototype.setSideBarVisible=function(e){this.assertSideBarLoaded("setSideBarVisible")&&this.sideBarService.getSideBarComp().setDisplayed(e)},e.prototype.setSideBarPosition=function(e){this.assertSideBarLoaded("setSideBarPosition")&&this.sideBarService.getSideBarComp().setSideBarPosition(e)},e.prototype.openToolPanel=function(e){this.assertSideBarLoaded("openToolPanel")&&this.sideBarService.getSideBarComp().openToolPanel(e,"api")},e.prototype.closeToolPanel=function(){this.assertSideBarLoaded("closeToolPanel")&&this.sideBarService.getSideBarComp().close("api")},e.prototype.getOpenedToolPanel=function(){return this.assertSideBarLoaded("getOpenedToolPanel")?this.sideBarService.getSideBarComp().openedItem():null},e.prototype.refreshToolPanel=function(){this.assertSideBarLoaded("refreshToolPanel")&&this.sideBarService.getSideBarComp().refresh()},e.prototype.isToolPanelShowing=function(){return this.assertSideBarLoaded("isToolPanelShowing")&&this.sideBarService.getSideBarComp().isToolPanelShowing()},e.prototype.getToolPanelInstance=function(e){if(this.assertSideBarLoaded("getToolPanelInstance")){var t=this.sideBarService.getSideBarComp().getToolPanelInstance(e);return Ql(t)}},e.prototype.getSideBar=function(){if(this.assertSideBarLoaded("getSideBar"))return this.sideBarService.getSideBarComp().getDef()},e.prototype.resetRowHeights=function(){if(o(this.clientSideRowModel)){if(this.columnModel.isAutoRowHeightActive())return void console.warn("AG Grid: calling gridApi.resetRowHeights() makes no sense when using Auto Row Height.");this.clientSideRowModel.resetRowHeights()}},e.prototype.setRowCount=function(e,t){if(this.serverSideRowModel)return this.columnModel.isRowGroupEmpty()?void this.serverSideRowModel.setRowCount(e,t):void console.error("AG Grid: setRowCount cannot be used while using row grouping.");this.infiniteRowModel?this.infiniteRowModel.setRowCount(e,t):this.logMissingRowModel("setRowCount","
11infinite","serverSide")},e.prototype.onRowHeightChanged=function(){this.clientSideRowModel?this.clientSideRowModel.onRowHeightChanged():this.serverSideRowModel&&this.serverSideRowModel.onRowHeightChanged()},e.prototype.getValue=function(e,t){var i=this.columnModel.getPrimaryColumn(e);return r(i)&&(i=this.columnModel.getGridColumn(e)),r(i)?null:this.valueService.getValue(i,t)},e.prototype.addEventListener=function(e,t){this.apiEventService.addEventListener(e,t)},e.prototype.addGlobalListener=function(e){this.apiEventService.addGlobalListener(e)},e.prototype.removeEventListener=function(e,t){this.apiEventService.removeEventListener(e,t)},e.prototype.removeGlobalListener=function(e){this.apiEventService.removeGlobalListener(e)},e.prototype.dispatchEvent=function(e){this.eventService.dispatchEvent(e)},e.prototype.destroy=function(){var e="See ".concat(this.frameworkOverrides.getDocLink("grid-lifecycle/#grid-pre-destroyed"));if(!this.destroyCalled){var t={type:ht.EVENT_GRID_PRE_DESTROYED,state:this.getState()};this.dispatchEvent(t),this.destroyCalled=!0;var i=this.ctrlsService.getGridCtrl();i&&i.destroyGridUi(),this.context.destroy(),k(this,["isDestroyed"],e)}},e.prototype.isDestroyed=function(){return this.destroyCalled},e.prototype.resetQuickFilter=function(){this.filterManager.resetQuickFilterCache()},e.prototype.getCellRanges=function(){return this.rangeService?this.rangeService.getCellRanges():(ne.__assertRegistered(J.RangeSelectionModule,"api.getCellRanges",this.context.getGridId()),null)},e.prototype.addCellRange=function(e){this.rangeService?this.rangeService.addCellRange(e):ne.__assertRegistered(J.RangeSelectionModule,"api.addCellRange",this.context.getGridId())},e.prototype.clearRangeSelection=function(){this.rangeService&&this.rangeService.removeAllCellRanges(),ne.__assertRegistered(J.RangeSelectionModule,"gridApi.clearRangeSelection",this.context.getGridId())},e.prototype.undoCellEditing=function(){this.undoRedoService.undo("api")},e.prototype.redoCellEditing=function(){this.undoRedoService.redo("api")},e.prototype.getCurrentUndoSize=function(){return this.undoRedoService.getCurrentUndoStackSize()},e.prototype.getCurrentRedoSize=function(){return this.undoRedoService.getCurrentRedoStackSize()},e.prototype.getChartModels=function(){if(ne.__assertRegistered(J.GridChartsModule,"api.getChartModels",this.context.getGridId()))return this.chartService.getChartModels()},e.prototype.getChartRef=function(e){if(ne.__assertRegistered(J.GridChartsModule,"api.getChartRef",this.context.getGridId()))return this.chartService.getChartRef(e)},e.prototype.getChartImageDataURL=function(e){if(ne.__assertRegistered(J.GridChartsModule,"api.getChartImageDataURL",this.context.getGridId()))return this.chartService.getChartImageDataURL(e)},e.prototype.downloadChart=function(e){if(ne.__assertRegistered(J.GridChartsModule,"api.downloadChart",this.context.getGridId()))return this.chartService.downloadChart(e)},e.prototype.openChartToolPanel=function(e){if(ne.__assertRegistered(J.GridChartsModule,"api.openChartToolPanel",this.context.getGridId()))return this.chartService.openChartToolPanel(e)},e.prototype.closeChartToolPanel=function(e){if(ne.__assertRegistered(J.GridChartsModule,"api.closeChartToolPanel",this.context.getGridId()))return this.chartService.closeChartToolPanel(e.chartId)},e.prototype.createRangeChart=function(e){if(ne.__assertRegistered(J.GridChartsModule,"api.createRangeChart",this.context.getGridId()))return this.chartService.createRangeChart(e)},e.prototype.createPivotChart=function(e){if(ne.__assertRegistered(J.GridChartsModule,"api.createPivotChart",this.context.getGridId()))return this.chartService.createPivotChart(e)},e.prototype.createCrossFilterChart=function(e){if(ne.__assertRegistered(J.GridChartsModule,"api.createCrossFilterChart",this.context.getGridId()))return this.chartService.createCrossFilterChart(e)},e.prototype.updateChart=function(e){ne.__assertRegistered(J.GridChartsModule,"api.updateChart",this.context.getGridId())&&this.chartService.updateChart(e)},e.prototype.restoreChart=function(e,t){if(ne.__assertRegistered(J.GridChartsModule,"api.restoreChart",this.context.getGridId()))return this.chartService.restoreChart(e,t)},e.prototype.copyToClipboard=function(e){ne.__assertRegistered(J.ClipboardModule,"api.copyToClipboard",this.context.getGridId())&&this.clipboardService.copyToClipboard(e)},e.prototype.cutToClipboard=function(e){ne.__assertRegistered(J.ClipboardModule,"api.cutToClipboard",this.context.getGridId())&&this.clipboardService.cutToClipboard(e,"a
11pi")},e.prototype.copySelectedRowsToClipboard=function(e){ne.__assertRegistered(J.ClipboardModule,"api.copySelectedRowsToClipboard",this.context.getGridId())&&this.clipboardService.copySelectedRowsToClipboard(e)},e.prototype.copySelectedRangeToClipboard=function(e){ne.__assertRegistered(J.ClipboardModule,"api.copySelectedRangeToClipboard",this.context.getGridId())&&this.clipboardService.copySelectedRangeToClipboard(e)},e.prototype.copySelectedRangeDown=function(){ne.__assertRegistered(J.ClipboardModule,"api.copySelectedRangeDown",this.context.getGridId())&&this.clipboardService.copyRangeDown()},e.prototype.pasteFromClipboard=function(){ne.__assertRegistered(J.ClipboardModule,"api.pasteFromClipboard",this.context.getGridId())&&this.clipboardService.pasteFromClipboard()},e.prototype.showColumnMenuAfterButtonClick=function(e,t){var i=this.columnModel.getGridColumn(e);this.menuFactory.showMenuAfterButtonClick(i,t,"columnMenu")},e.prototype.showColumnMenuAfterMouseClick=function(e,t){var i=this.columnModel.getGridColumn(e);i||(i=this.columnModel.getPrimaryColumn(e)),i?this.menuFactory.showMenuAfterMouseEvent(i,t):console.error("AG Grid: column '".concat(e,"' not found"))},e.prototype.hidePopupMenu=function(){this.contextMenuFactory&&this.contextMenuFactory.hideActiveMenu(),this.menuFactory.hideActiveMenu()},e.prototype.tabToNextCell=function(e){return this.navigationService.tabToNextCell(!1,e)},e.prototype.tabToPreviousCell=function(e){return this.navigationService.tabToNextCell(!0,e)},e.prototype.getCellRendererInstances=function(e){void 0===e&&(e={});var t=this.rowRenderer.getCellRendererInstances(e),i=t.map(Ql);return i},e.prototype.getCellEditorInstances=function(e){void 0===e&&(e={});var t=this.rowRenderer.getCellEditorInstances(e),i=t.map(Ql);return i},e.prototype.getEditingCells=function(){return this.rowRenderer.getEditingCells()},e.prototype.stopEditing=function(e){void 0===e&&(e=!1),this.rowRenderer.stopEditing(e)},e.prototype.startEditingCell=function(e){var t=this.columnModel.getGridColumn(e.colKey);if(t){var i={rowIndex:e.rowIndex,rowPinned:e.rowPinned||null,column:t},n=null==e.rowPinned;n&&this.gridBodyCtrl.getScrollFeature().ensureIndexVisible(e.rowIndex);var o=this.navigationService.getCellByPosition(i);o&&(this.focusService.isCellFocused(i)||this.focusService.setFocusedCell(i),o.startRowOrCellEdit(e.key))}else console.warn("AG Grid: no column found for ".concat(e.colKey))},e.prototype.addAggFunc=function(e,t){this.aggFuncService&&this.aggFuncService.addAggFunc(e,t)},e.prototype.addAggFuncs=function(e){this.aggFuncService&&this.aggFuncService.addAggFuncs(e)},e.prototype.clearAggFuncs=function(){this.aggFuncService&&this.aggFuncService.clear()},e.prototype.applyServerSideTransaction=function(e){if(this.serverSideTransactionManager)return this.serverSideTransactionManager.applyTransaction(e);this.logMissingRowModel("applyServerSideTransaction","serverSide")},e.prototype.applyServerSideTransactionAsync=function(e,t){if(this.serverSideTransactionManager)return this.serverSideTransactionManager.applyTransactionAsync(e,t);this.logMissingRowModel("applyServerSideTransactionAsync","serverSide")},e.prototype.applyServerSideRowData=function(e){var t,i,n=null!==(t=e.startRow)&&void 0!==t?t:0,o=null!==(i=e.route)&&void 0!==i?i:[];n<0?console.warn("AG Grid: invalid value ".concat(e.startRow," for startRow, the value should be >= 0")):this.serverSideRowModel?this.serverSideRowModel.applyRowData(e.successParams,n,o):this.logMissingRowModel("setServerSideDatasource","serverSide")},e.prototype.retryServerSideLoads=function(){this.serverSideRowModel?this.serverSideRowModel.retryLoads():this.logMissingRowModel("retryServerSideLoads","serverSide")},e.prototype.flushServerSideAsyncTransactions=function(){if(this.serverSideTransactionManager)return this.serverSideTransactionManager.flushAsyncTransactions();this.logMissingRowModel("flushServerSideAsyncTransactions","serverSide")},e.prototype.applyTransaction=function(e){if(this.clientSideRowModel)return this.clientSideRowModel.updateRowData(e);this.logMissingRowModel("applyTransaction","clientSide")},e.prototype.applyTransactionAsync=function(e,t){this.clientSideRowModel?this.clientSideRowModel.batchUpdateRowData(e,t):this.logMissingRowModel("applyTransactionAsync","clientSide")},e.prototype.flushAsyncTransactions=function(){this.clientSideRowModel?this.clientSideRowModel.flushAsyncTransactions():this.logMissingRowModel("flushAsyncTransactions","clientSide")},e.prototype.refreshInfiniteCache=function(){this.infiniteRowModel?this.infiniteRowModel.refreshCache():this.logMissingRowModel("refreshInfiniteCache","infinite")},e.prototype.purgeInfiniteCache=function(){this.infiniteRowModel?this.infiniteRowModel.purgeCache():this.logMissingRowModel("purgeInfiniteCache","infinite")},e.prototype.refreshServerSide=function(e){this.serverSideRowModel?this.serverSideRowModel.refreshStore(e):this.logMissingRowModel("refreshServerSide","serverSide")},e.prototype.getServerSideGroupLevelState=function(){return this.serverSideRowModel?this.serverSideRowModel.getStoreState():(this.logMissingRowModel("getServerSideGroupLevelState","serverSide"),[])},e.prototype.getInfiniteRowCount=function(){if(this.infiniteRowModel)return this.infiniteRowModel.getRowCount();
11this.logMissingRowModel("getInfiniteRowCount","infinite")},e.prototype.isLastRowIndexKnown=function(){if(this.infiniteRowModel)return this.infiniteRowModel.isLastRowIndexKnown();this.logMissingRowModel("isLastRowIndexKnown","infinite")},e.prototype.getCacheBlockState=function(){return this.rowNodeBlockLoader.getBlockState()},e.prototype.getFirstDisplayedRow=function(){return this.rowRenderer.getFirstVirtualRenderedRow()},e.prototype.getLastDisplayedRow=function(){return this.rowRenderer.getLastVirtualRenderedRow()},e.prototype.getDisplayedRowAtIndex=function(e){return this.rowModel.getRow(e)},e.prototype.getDisplayedRowCount=function(){return this.rowModel.getRowCount()},e.prototype.paginationIsLastPageFound=function(){return this.paginationProxy.isLastPageFound()},e.prototype.paginationGetPageSize=function(){return this.paginationProxy.getPageSize()},e.prototype.paginationGetCurrentPage=function(){return this.paginationProxy.getCurrentPage()},e.prototype.paginationGetTotalPages=function(){return this.paginationProxy.getTotalPages()},e.prototype.paginationGetRowCount=function(){return this.paginationProxy.getMasterRowCount()},e.prototype.paginationGoToNextPage=function(){this.paginationProxy.goToNextPage()},e.prototype.paginationGoToPreviousPage=function(){this.paginationProxy.goToPreviousPage()},e.prototype.paginationGoToFirstPage=function(){this.paginationProxy.goToFirstPage()},e.prototype.paginationGoToLastPage=function(){this.paginationProxy.goToLastPage()},e.prototype.paginationGoToPage=function(e){this.paginationProxy.goToPage(e)},e.prototype.sizeColumnsToFit=function(e){"number"===typeof e?this.columnModel.sizeColumnsToFit(e,"api"):this.gridBodyCtrl.sizeColumnsToFit(e)},e.prototype.setColumnGroupOpened=function(e,t){this.columnModel.setColumnGroupOpened(e,t,"api")},e.prototype.getColumnGroup=function(e,t){return this.columnModel.getColumnGroup(e,t)},e.prototype.getProvidedColumnGroup=function(e){return this.columnModel.getProvidedColumnGroup(e)},e.prototype.getDisplayNameForColumn=function(e,t){return this.columnModel.getDisplayNameForColumn(e,t)||""},e.prototype.getDisplayNameForColumnGroup=function(e,t){return this.columnModel.getDisplayNameForColumnGroup(e,t)||""},e.prototype.getColumn=function(e){return this.columnModel.getPrimaryColumn(e)},e.prototype.getColumns=function(){return this.columnModel.getAllPrimaryColumns()},e.prototype.applyColumnState=function(e){return this.columnModel.applyColumnState(e,"api")},e.prototype.getColumnState=function(){return this.columnModel.getColumnState()},e.prototype.resetColumnState=function(){this.columnModel.resetColumnState("api")},e.prototype.getColumnGroupState=function(){return this.columnModel.getColumnGroupState()},e.prototype.setColumnGroupState=function(e){this.columnModel.setColumnGroupState(e,"api")},e.prototype.resetColumnGroupState=function(){this.columnModel.resetColumnGroupState("api")},e.prototype.isPinning=function(){return this.columnModel.isPinningLeft()||this.columnModel.isPinningRight()},e.prototype.isPinningLeft=function(){return this.columnModel.isPinningLeft()},e.prototype.isPinningRight=function(){return this.columnModel.isPinningRight()},e.prototype.getDisplayedColAfter=function(e){return this.columnModel.getDisplayedColAfter(e)},e.prototype.getDisplayedColBefore=function(e){return this.columnModel.getDisplayedColBefore(e)},e.prototype.setColumnVisible=function(e,t){this.columnModel.setColumnVisible(e,t,"api")},e.prototype.setColumnsVisible=function(e,t){this.columnModel.setColumnsVisible(e,t,"api")},e.prototype.setColumnPinned=function(e,t){this.columnModel.setColumnPinned(e,t,"api")},e.prototype.setColumnsPinned=function(e,t){this.columnModel.setColumnsPinned(e,t,"api")},e.prototype.getAllGridColumns=function(){return this.columnModel.getAllGridColumns()},e.prototype.getDisplayedLeftColumns=function(){return this.columnModel.getDisplayedLeftColumns()},e.prototype.getDisplayedCenterColumns=function(){return this.columnModel.getDisplayedCenterColumns()},e.prototype.getDisplayedRightColumns=function(){return this.columnModel.getDisplayedRightColumns()},e.prototype.getAllDisplayedColumns=function(){return this.columnModel.getAllDisplayedColumns()},e.prototype.getAllDisplayedVirtualColumns=function(){return this.columnModel.getViewportColumns()},e.prototype.moveColumn=function(e,t){this.columnModel.moveColumn(e,t,"api")},e.prototype.moveColumnByIndex=function(e,t){this.columnModel.moveColumnByIndex(e,t,"api")},e.prototype.moveColumns=function(e,t){this.columnModel.moveColumns(e,t,"api")},e.prototype.moveRowGroupColumn=function(e,t){this.columnModel.moveRowGroupColumn(e,t)}
11,e.prototype.setColumnAggFunc=function(e,t){this.columnModel.setColumnAggFunc(e,t)},e.prototype.setColumnWidth=function(e,t,i,n){void 0===i&&(i=!0),this.columnModel.setColumnWidths([{key:e,newWidth:t}],!1,i,n)},e.prototype.setColumnWidths=function(e,t,i){void 0===t&&(t=!0),this.columnModel.setColumnWidths(e,!1,t,i)},e.prototype.isPivotMode=function(){return this.columnModel.isPivotMode()},e.prototype.getPivotResultColumn=function(e,t){return this.columnModel.getSecondaryPivotColumn(e,t)},e.prototype.setValueColumns=function(e){this.columnModel.setValueColumns(e,"api")},e.prototype.getValueColumns=function(){return this.columnModel.getValueColumns()},e.prototype.removeValueColumn=function(e){this.columnModel.removeValueColumn(e,"api")},e.prototype.removeValueColumns=function(e){this.columnModel.removeValueColumns(e,"api")},e.prototype.addValueColumn=function(e){this.columnModel.addValueColumn(e,"api")},e.prototype.addValueColumns=function(e){this.columnModel.addValueColumns(e,"api")},e.prototype.setRowGroupColumns=function(e){this.columnModel.setRowGroupColumns(e,"api")},e.prototype.removeRowGroupColumn=function(e){this.columnModel.removeRowGroupColumn(e,"api")},e.prototype.removeRowGroupColumns=function(e){this.columnModel.removeRowGroupColumns(e,"api")},e.prototype.addRowGroupColumn=function(e){this.columnModel.addRowGroupColumn(e,"api")},e.prototype.addRowGroupColumns=function(e){this.columnModel.addRowGroupColumns(e,"api")},e.prototype.getRowGroupColumns=function(){return this.columnModel.getRowGroupColumns()},e.prototype.setPivotColumns=function(e){this.columnModel.setPivotColumns(e,"api")},e.prototype.removePivotColumn=function(e){this.columnModel.removePivotColumn(e,"api")},e.prototype.removePivotColumns=function(e){this.columnModel.removePivotColumns(e,"api")},e.prototype.addPivotColumn=function(e){this.columnModel.addPivotColumn(e,"api")},e.prototype.addPivotColumns=function(e){this.columnModel.addPivotColumns(e,"api")},e.prototype.getPivotColumns=function(){return this.columnModel.getPivotColumns()},e.prototype.getLeftDisplayedColumnGroups=function(){return this.columnModel.getDisplayedTreeLeft()},e.prototype.getCenterDisplayedColumnGroups=function(){return this.columnModel.getDisplayedTreeCentre()},e.prototype.getRightDisplayedColumnGroups=function(){return this.columnModel.getDisplayedTreeRight()},e.prototype.getAllDisplayedColumnGroups=function(){return this.columnModel.getAllDisplayedTrees()},e.prototype.autoSizeColumn=function(e,t){return this.columnModel.autoSizeColumn(e,t,"api")},e.prototype.autoSizeColumns=function(e,t){this.columnModel.autoSizeColumns({columns:e,skipHeader:t})},e.prototype.autoSizeAllColumns=function(e){this.columnModel.autoSizeAllColumns(e,"api")},e.prototype.setPivotResultColumns=function(e){this.columnModel.setSecondaryColumns(e,"api")},e.prototype.getPivotResultColumns=function(){return this.columnModel.getSecondaryColumns()},e.prototype.getState=function(){return this.stateService.getState()},e.prototype.getGridOption=function(e){return this.gos.get(e)},e.prototype.setGridOption=function(e,t){var i;this.updateGridOptions((i={},i[e]=t,i))},e.prototype.updateGridOptions=function(e){this.gos.updateGridOptions({options:e})},e.prototype.__internalUpdateGridOptions=function(e){this.gos.updateGridOptions({options:e,source:"gridOptionsUpdated"})},e.prototype.deprecatedUpdateGridOption=function(e,t){G("set".concat(e.charAt(0).toUpperCase()).concat(e.slice(1,e.length)," is deprecated. Please use 'api.setGridOption('").concat(e,"', newValue)' or 'api.updateGridOptions({ ").concat(e,": newValue })' instead.")),this.setGridOption(e,t)},e.prototype.setPivotMode=function(e){this.deprecatedUpdateGridOption("pivotMode",e)},e.prototype.setPinnedTopRowData=function(e){this.deprecatedUpdateGridOption("pinnedTopRowData",e)},e.prototype.setPinnedBottomRowData=function(e){this.deprecatedUpdateGridOption("pinnedBottomRowData",e)},e.prototype.setPopupParent=function(e){this.deprecatedUpdateGridOption("popupParent",e)},e.prototype.setSuppressModelUpdateAfterUpdateTransaction=function(e){this.deprecatedUpdateGridOption("suppressModelUpdateAfterUpdateTransaction",e)},e.prototype.setDataTypeDefinitions=function(e){this.deprecatedUpdateGridOption("dataTypeDefinitions",e)},e.prototype.setPagination=function(e){this.deprecatedUpdateGridOption("pagination",e)},e.prototype.paginationSetPageSize=function(e){this.deprecatedUpdateGridOption("paginationPageSize",e)},e.prototype.setSideBar=function(e){this.deprecatedUpdateGridOption("sideBar",e)},e.prototype.setSuppressClipboardPaste=function(e){this.deprecatedUpdateGridOption("suppressClipboardPaste",e)},e.prototype.setGroupRemoveSingleChildren=function(e){this.deprecatedUpdateGridOption("groupRemoveSingleChildren",e)},e.prototype.setGroupRemoveLowestSingleChildren=function(e){this.deprecatedUpdateGridOption("groupRemoveLowestSingleChildren",e)},e.prototype.setGroupDisplayType=function(e){this.deprecatedUpdateGridOption("groupDisplayType",e)},e.prototype.setGroupIncludeFooter=function(e){this.deprecatedUpdateGridOption("groupIncludeFooter",e)},e.prototype.setGroupIncludeTotalFooter=function(e){this.deprecatedUpdateGridOption("groupIncludeTotalFooter",e)},e.prototype.setRowClass=function(e){this.deprecatedUpdateGridOption("rowClass",e)},e.prototype.setDeltaSort=function(e){this.deprecatedUpdateGridOption("deltaSort",e)},e.prototype.setSuppressRowDrag=function(e){this.deprecatedUpdateGridOption("suppressRowDrag",e)},e.prototype.setSuppressMoveWhenRowDragging=function(e){this.deprecatedUpdateGridOption("suppressMoveWhenRowDragging",e)},e.prototype.setSuppressRowClickSelection=function(e){this.deprecatedUpdateGridOption("suppressRowClickSelection",e)},e.prototype.setEnableAdvancedFilter=function(e){this.deprecatedUpdateGridOption("enableAdvancedFilter",e)},e.prototype.setIncludeHiddenColumnsInAdvancedFilter=function(e){this.deprecatedUpdateGridOption("includeHiddenColumnsInAdvancedFilter",e)},e.prototype.setAdvancedFilterParent=function(e){this.deprecatedUpdateGridOption("advancedFilterParent",e)},e.prototype.setAdvancedFilterBuilderParams=function(e){this.deprecatedUpdateGridOption("advancedFilterBuilderParams",e)},e.prototype.setQuickFilter=function(e){G("setQuickFilter is deprecated. Please use 'api.setGridOption('quickFilterText', newValue)' or 'api.updateGridOptions({ quickFilterText: newValue })' instead."),this.gos.updateGridOptions({options:{quickFilterText:e}})},e.prototype.setExcludeHiddenColumnsFromQuickFilter=function(e){this.deprecatedUpdateGridOption("includeHiddenColumnsInQuickFilter",!e)},e.prototype.setIncludeHiddenColumnsInQuickFilter=function(e){this.deprecatedUpdateGridOption("includeHiddenColumnsInQuickFilter",e)},e.prototype.setQuickFilterParser=function(e){this.deprecatedUpdateGridOption("quickFilterParser",e)},e.prototype.setQuickFilterMatcher=function(e){this.deprecatedUpdateGridOption("quickFilterMatcher",e)},e.prototype.setAlwaysShowHorizontalScroll=function(e){this.deprecatedUpdateGridOption("alwaysShowHorizontalScroll",e)},e.prototype.setAlwaysShowVerticalScroll=function(e){this.deprecatedUpdateGridOption("alwaysShowVerticalScroll",e)},e.prototype.setFunctionsReadOnly=function(e){this.deprecatedUpdateGridOption("functionsReadOnly",e)},e.prototype.setColumnDefs=function(e,t){void 0===t&&(t="api"),G("setColumnDefs is deprecated. Please use 'api.setGridOption('columnDefs', newValue)' or 'api.updateGridOptions({ columnDefs: newValue })' instead."),this.gos.updateGridOptions({options:{columnDefs:e},source:t})},e.prototype.setAutoGroupColumnDef=function(e,t){void 0===t&&(t="api"),G("setAutoGroupColumnDef is deprecated. Please use 'api.setGridOption('autoGroupColumnDef', newValue)' or 'api.updateGridOptions({ autoGroupColumnDef: newValue })' instead."),this.gos.updateGridOptions({options:{autoGroupColumnDef:e},source:t})},e.prototype.setDefaultColDef=function(e,t){void 0===t&&(t="api"),G("setDefaultColDef is deprecated. Please use 'api.setGridOption('defaultColDef', newValue)' or 'api.updateGridOptions({ defaultColDef: newValue })' instead."),this.gos.updateGridOptions({options:{defaultColDef:e},source:t})},e.prototype.setColumnTypes=function(e,t){void 0===t&&(t="api"),G("setColumnTypes is deprecated. Please use 'api.setGridOption('columnTypes', newValue)' or 'api.updateGridOptions({ columnTypes: newValue })' instead."),this.gos.updateGridOptions({options:{columnTypes:e},source:t})},e.prototype.setTreeData=function(e){this.deprecatedUpdateGridOption("treeData",e)},e.prototype.setServerSideDatasource=function(e){this.deprecatedUpdateGridOption("serverSideDatasource",e)},e.prototype.setCacheBlockSize=function(e){this.deprecatedUpdateGridOption("cacheBlockSize",e)},e.prototype.setDatasource=function(e){this.deprecatedUpdateGridOption("datasource",e)},e.prototype.setViewportDatasource=function(e){this.deprecatedUpdateGridOption("viewportDatasource",e)},e.prototype.setRowData=function(e){this.deprecatedUpdateGridOption("rowData",e)},e.prototype.setEnableCellTextSelection=function(e){this.deprecatedUpdateGridOption("enableCellTextSelection",e)},e.prototype.setHeaderHeight=function(e){this.deprecatedUpdateGridOption("headerHeight",e)}
11,e.prototype.setDomLayout=function(e){this.deprecatedUpdateGridOption("domLayout",e)},e.prototype.setFillHandleDirection=function(e){this.deprecatedUpdateGridOption("fillHandleDirection",e)},e.prototype.setGroupHeaderHeight=function(e){this.deprecatedUpdateGridOption("groupHeaderHeight",e)},e.prototype.setFloatingFiltersHeight=function(e){this.deprecatedUpdateGridOption("floatingFiltersHeight",e)},e.prototype.setPivotHeaderHeight=function(e){this.deprecatedUpdateGridOption("pivotHeaderHeight",e)},e.prototype.setPivotGroupHeaderHeight=function(e){this.deprecatedUpdateGridOption("pivotGroupHeaderHeight",e)},e.prototype.setAnimateRows=function(e){this.deprecatedUpdateGridOption("animateRows",e)},e.prototype.setIsExternalFilterPresent=function(e){this.deprecatedUpdateGridOption("isExternalFilterPresent",e)},e.prototype.setDoesExternalFilterPass=function(e){this.deprecatedUpdateGridOption("doesExternalFilterPass",e)},e.prototype.setNavigateToNextCell=function(e){this.deprecatedUpdateGridOption("navigateToNextCell",e)},e.prototype.setTabToNextCell=function(e){this.deprecatedUpdateGridOption("tabToNextCell",e)},e.prototype.setTabToNextHeader=function(e){this.deprecatedUpdateGridOption("tabToNextHeader",e)},e.prototype.setNavigateToNextHeader=function(e){this.deprecatedUpdateGridOption("navigateToNextHeader",e)},e.prototype.setRowGroupPanelShow=function(e){this.deprecatedUpdateGridOption("rowGroupPanelShow",e)},e.prototype.setGetGroupRowAgg=function(e){this.deprecatedUpdateGridOption("getGroupRowAgg",e)},e.prototype.setGetBusinessKeyForNode=function(e){this.deprecatedUpdateGridOption("getBusinessKeyForNode",e)},e.prototype.setGetChildCount=function(e){this.deprecatedUpdateGridOption("getChildCount",e)},e.prototype.setProcessRowPostCreate=function(e){this.deprecatedUpdateGridOption("processRowPostCreate",e)},e.prototype.setGetRowId=function(e){G("getRowId is a static property and can no longer be updated.")},e.prototype.setGetRowClass=function(e){this.deprecatedUpdateGridOption("getRowClass",e)},e.prototype.setIsFullWidthRow=function(e){this.deprecatedUpdateGridOption("isFullWidthRow",e)},e.prototype.setIsRowSelectable=function(e){this.deprecatedUpdateGridOption("isRowSelectable",e)},e.prototype.setIsRowMaster=function(e){this.deprecatedUpdateGridOption("isRowMaster",e)},e.prototype.setPostSortRows=function(e){this.deprecatedUpdateGridOption("postSortRows",e)},e.prototype.setGetDocument=function(e){this.deprecatedUpdateGridOption("getDocument",e)},e.prototype.setGetContextMenuItems=function(e){this.deprecatedUpdateGridOption("getContextMenuItems",e)},e.prototype.setGetMainMenuItems=function(e){this.deprecatedUpdateGridOption("getMainMenuItems",e)},e.prototype.setProcessCellForClipboard=function(e){this.deprecatedUpdateGridOption("processCellForClipboard",e)},e.prototype.setSendToClipboard=function(e){this.deprecatedUpdateGridOption("sendToClipboard",e)},e.prototype.setProcessCellFromClipboard=function(e){this.deprecatedUpdateGridOption("processCellFromClipboard",e)},e.prototype.setProcessPivotResultColDef=function(e){this.deprecatedUpdateGridOption("processPivotResultColDef",e)},e.prototype.setProcessPivotResultColGroupDef=function(e){this.deprecatedUpdateGridOption("processPivotResultColGroupDef",e)},e.prototype.setPostProcessPopup=function(e){this.deprecatedUpdateGridOption("postProcessPopup",e)},e.prototype.setInitialGroupOrderComparator=function(e){this.deprecatedUpdateGridOption("initialGroupOrderComparator",e)},e.prototype.setGetChartToolbarItems=function(e){this.deprecatedUpdateGridOption("getChartToolbarItems",e)},e.prototype.setPaginationNumberFormatter=function(e){this.deprecatedUpdateGridOption("paginationNumberFormatter",e)},e.prototype.setGetServerSideGroupLevelParams=function(e){this.deprecatedUpdateGridOption("getServerSideGroupLevelParams",e)},e.prototype.setIsServerSideGroupOpenByDefault=function(e){this.deprecatedUpdateGridOption("isServerSideGroupOpenByDefault",e)},e.prototype.setIsApplyServerSideTransaction=function(e){this.deprecatedUpdateGridOption("isApplyServerSideTransaction",e)},e.prototype.setIsServerSideGroup=function(e){this.deprecatedUpdateGridOption("isServerSideGroup",e)},e.prototype.setGetServerSideGroupKey=function(e){this.deprecatedUpdateGridOption("getServerSideGroupKey",e)},e.prototype.setGetRowStyle=function(e){this.deprecatedUpdateGridOption("getRowStyle",e)},e.prototype.setGetRowHeight=function(e){this.deprecatedUpdateGridOption("getRowHeight",e)},Jl([pe("csvCreator")],e.prototype,"csvCreator",void 0),Jl([pe("excelCreator")],e.prototype,"excelCreator",void 0),Jl([de("rowRenderer")],e.prototype,"rowRenderer",void 0),Jl([de("navigationService")],e.prototype,"navigationService",void 0),Jl([de("filterManager")],e.prototype,"filterManager",void 0),Jl([de("columnModel")],e.prototype,"columnModel",void 0),Jl([de("selectionService")],e.prototype,"selectionService",void 0),Jl([de("gridOptionsService")],e.prototype,"gos",void 0),Jl([de("valueService")],e.prototype,"valueService",void 0),Jl([de("alignedGridsService")],e.prototype,"alignedGridsService",void 0),Jl([de("eventService")],e.prototype,"eventService",void 0),Jl([de("pinnedRowModel")],e.prototype,"pinnedRowModel",void 0),Jl([de("context")],e.prototype,"context",void 0),Jl([de("rowModel")],e.prototype,"rowModel",void 0),Jl([de("sortController")],e.prototype,"sortController",void 0),Jl([de("paginationProxy")],e.prototype,"paginationProxy",void 0),Jl([de("focusService")],e.prototype,"focusService",void 0),Jl([de("dragAndDropService")],e.prototype,"dragAndDropService",void 0),Jl([pe("rangeService")],e.prototype,"rangeService",void 0),Jl([pe("clipboardService")],e.prototype,"clipboardService",void 0),Jl([pe("aggFuncService")],e.prototype,"aggFuncService",void 0),Jl([de("menuFactory")],e.prototype,"menuFactory",void 0),Jl([pe("contextMenuFactory")],e.prototype,"contextMenuFactory",void 0),Jl([de("valueCache")],e.prototype,"valueCache",void 0),Jl([de("animationFrameService")],e.prototype,"animationFrameService",void 0),Jl([pe("statusBarService")],e.prototype,"statusBarService",void 0),Jl([pe("chartService")],e.prototype,"chartService",void 0),Jl([pe("undoRedoService")],e.prototype,"undoRedoService",void 0),Jl([pe("rowNodeBlockLoader")],e.prototype,"rowNodeBlockLoader",void 0),Jl([pe("ssrmTransactionManager")],e.prototype,"serverSideTransactionManager",void 0),Jl([de("ctrlsService")],e.prototype,"ctrlsService",void 0),Jl([de("overlayService")],e.prototype,"overlayService",void 0),Jl([pe("sideBarService")],e.prototype,"sideBarService",void 0),Jl([de("stateService")],e.prototype,"stateService",void 0),Jl([de("expansionService")],e.prototype,"expansionService",void 0),Jl([de("apiEventService")],e.prototype,"apiEventService",void 0),Jl([de("frameworkOverrides")],e.prototype,"frameworkOverrides",void 0),Jl([le],e.prototype,"init",null),e=Jl([ue("gridApi")],e),e}(),ic=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),nc=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},oc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.quickFilter=null,t.quickFilterParts=null,t}var i;return ic(t,e),i=t,t.prototype.postConstruct=function(){var e=this;this.addManagedListener(this.eventService,ht.EVENT_COLUMN_PIVOT_MODE_CHANGED,(function(){return e.resetQuickFilterCache()})),this.addManagedListener(this.eventService,ht.EVENT_NEW_COLUMNS_LOADED,(function(){return e.resetQuickFilterCache()})),this.addManagedListener(this.eventService,ht.EVENT_COLUMN_ROW_GROUP_CHANGED,(function(){return e.resetQuickFilterCache()})),this.addManagedListener(this.eventService,ht.EVENT_COLUMN_VISIBLE,(function(){e.gridOptionsService.get("includeHiddenColumnsInQuickFilter")||e.resetQuickFilterCache()})),this.addManagedPropertyListener("quickFilterText",(function(t){return e.setQuickFilter(t.currentValue)})),this.addManagedPropertyListener("includeHiddenColumnsInQuickFilter",(function(){return e.onIncludeHiddenColumnsInQuickFilterChanged()})),this.quickFilter=this.parseQuickFilter(this.gridOptionsService.get("quickFilterText")),this.parser=this.gridOptionsService.get("quickFilterParser"),this.matcher=this.gridOptionsService.get("quickFilterMatcher"),this.setQuickFilterParts(),this.addManagedPropertyListeners(["quickFilterMatcher","quickFilterParser"],(function(){return e.setQuickFilterParserAndMatcher()}))},t.prototype.isQuickFilterPresent=function(){return null!==this.quickFilter},t.prototype.doesRowPassQuickFilter=function(e){var t=this,i=this.gridOptionsService.get("
11cacheQuickFilter");return this.matcher?this.doesRowPassQuickFilterMatcher(i,e):this.quickFilterParts.every((function(n){return i?t.doesRowPassQuickFilterCache(e,n):t.doesRowPassQuickFilterNoCache(e,n)}))},t.prototype.resetQuickFilterCache=function(){this.rowModel.forEachNode((function(e){return e.quickFilterAggregateText=null}))},t.prototype.setQuickFilterParts=function(){var e=this,t=e.quickFilter,i=e.parser;this.quickFilterParts=t?i?i(t):t.split(" "):null},t.prototype.parseQuickFilter=function(e){return o(e)?this.gridOptionsService.isRowModelType("clientSide")?e.toUpperCase():(console.warn("AG Grid - Quick filtering only works with the Client-Side Row Model"),null):null},t.prototype.setQuickFilter=function(e){if(null==e||"string"===typeof e){var t=this.parseQuickFilter(e);this.quickFilter!==t&&(this.quickFilter=t,this.setQuickFilterParts(),this.dispatchEvent({type:i.EVENT_QUICK_FILTER_CHANGED}))}else console.warn("AG Grid - Grid option quickFilterText only supports string inputs, received: ".concat(typeof e))},t.prototype.setQuickFilterParserAndMatcher=function(){var e=this.gridOptionsService.get("quickFilterParser"),t=this.gridOptionsService.get("quickFilterMatcher"),n=e!==this.parser||t!==this.matcher;this.parser=e,this.matcher=t,n&&(this.setQuickFilterParts(),this.dispatchEvent({type:i.EVENT_QUICK_FILTER_CHANGED}))},t.prototype.onIncludeHiddenColumnsInQuickFilterChanged=function(){this.columnModel.refreshQuickFilterColumns(),this.resetQuickFilterCache(),this.isQuickFilterPresent()&&this.dispatchEvent({type:i.EVENT_QUICK_FILTER_CHANGED})},t.prototype.doesRowPassQuickFilterNoCache=function(e,t){var i=this,n=this.columnModel.getAllColumnsForQuickFilter();return n.some((function(n){var r=i.getQuickFilterTextForColumn(n,e);return o(r)&&r.indexOf(t)>=0}))},t.prototype.doesRowPassQuickFilterCache=function(e,t){return this.checkGenerateQuickFilterAggregateText(e),e.quickFilterAggregateText.indexOf(t)>=0},t.prototype.doesRowPassQuickFilterMatcher=function(e,t){var i;e?(this.checkGenerateQuickFilterAggregateText(t),i=t.quickFilterAggregateText):i=this.getQuickFilterAggregateText(t);var n=this,o=n.quickFilterParts,r=n.matcher;return r(o,i)},t.prototype.checkGenerateQuickFilterAggregateText=function(e){e.quickFilterAggregateText||(e.quickFilterAggregateText=this.getQuickFilterAggregateText(e))},t.prototype.getQuickFilterTextForColumn=function(e,t){var i=this.valueService.getValue(e,t,!0),n=e.getColDef();if(n.getQuickFilterText){var r={value:i,node:t,data:t.data,column:e,colDef:n,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context};i=n.getQuickFilterText(r)}return o(i)?i.toString().toUpperCase():null},t.prototype.getQuickFilterAggregateText=function(e){var t=this,n=[],r=this.columnModel.getAllColumnsForQuickFilter();return r.forEach((function(i){var r=t.getQuickFilterTextForColumn(i,e);o(r)&&n.push(r)})),n.join(i.QUICK_FILTER_SEPARATOR)},t.EVENT_QUICK_FILTER_CHANGED="quickFilterChanged",t.QUICK_FILTER_SEPARATOR="\n",nc([de("valueService")],t.prototype,"valueService",void 0),nc([de("columnModel")],t.prototype,"columnModel",void 0),nc([de("rowModel")],t.prototype,"rowModel",void 0),nc([le],t.prototype,"postConstruct",null),t=i=nc([ue("quickFilterService")],t),t}(st),rc=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),sc=function(){return sc=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},sc.apply(this,arguments)},ac=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},lc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.allColumnFilters=new Map,t.allColumnListeners=new Map,t.activeAggregateFilters=[],t.activeColumnFilters=[],t.processingFilterChange=!1,t.filterModelUpdateQueue=[],t.advancedFilterModelUpdateQueue=[],t}return rc(t,e),t.prototype.init=function(){var e=this;this.addManagedListener(this.eventService,ht.EVENT_GRID_COLUMNS_CHANGED,(function(){return e.onColumnsChanged()})),this.addManagedListener(this.eventService,ht.EVENT_COLUMN_VALUE_CHANGED,(function(){return e.refreshFiltersForAggregations()})),this.addManagedListener(this.eventService,ht.EVENT_COLUMN_PIVOT_CHANGED,(function(){return e.refreshFiltersForAggregations()})),this.addManagedListener(this.eventService,ht.EVENT_COLUMN_PIVOT_MODE_CHANGED,(function(){return e.refreshFiltersForAggregations()})),this.addManagedListener(this.eventService,ht.EVENT_NEW_COLUMNS_LOADED,(function(){return e.updateAdvancedFilterColumns()})),this.addManagedListener(this.eventService,ht.EVENT_COLUMN_VISIBLE,(function(){return e.updateAdvancedFilterColumns()})),this.addManagedListener(this.eventService,ht.EVENT_ROW_DATA_UPDATED,(function(){return e.onNewRowsLoaded("rowDataUpdated")})),this.externalFilterPresent=this.isExternalFilterPresentCallback(),this.addManagedPropertyListeners(["isExternalFilterPresent","doesExternalFilterPass"],(function(){e.onFilterChanged({source:"api"})})),this.updateAggFiltering(),this.addManagedPropertyListener("groupAggFiltering",(function(){e.updateAggFiltering(),e.onFilterChanged()})),this.addManagedPropertyListener("advancedFilterModel",(function(t){return e.setAdvancedFilterModel(t.currentValue)})),this.addManagedListener(this.eventService,ht.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,(function(t){var i=t.enabled;return e.onAdvancedFilterEnabledChanged(i)})),this.addManagedListener(this.eventService,ht.EVENT_DATA_TYPES_INFERRED,(function(){return e.process
11FilterModelUpdateQueue()})),this.addManagedListener(this.quickFilterService,oc.EVENT_QUICK_FILTER_CHANGED,(function(){return e.onFilterChanged({source:"quickFilter"})}))},t.prototype.isExternalFilterPresentCallback=function(){var e=this.gridOptionsService.getCallback("isExternalFilterPresent");return"function"===typeof e&&e({})},t.prototype.doesExternalFilterPass=function(e){var t=this.gridOptionsService.get("doesExternalFilterPass");return"function"===typeof t&&t(e)},t.prototype.setFilterModel=function(e,t){var i=this;if(void 0===t&&(t="api"),this.isAdvancedFilterEnabled())this.warnAdvancedFilters();else if(this.dataTypeService.isPendingInference())this.filterModelUpdateQueue.push({model:e,source:t});else{var n=[],o=this.getFilterModel();if(e){var r=jo(Object.keys(e));this.allColumnFilters.forEach((function(t,o){var s=e[o];n.push(i.setModelOnFilterWrapper(t.filterPromise,s)),r.delete(o)})),r.forEach((function(t){var o=i.columnModel.getPrimaryColumn(t)||i.columnModel.getGridColumn(t);if(o)if(o.isFilterAllowed()){var r=i.getOrCreateFilterWrapper(o,"NO_UI");r?n.push(i.setModelOnFilterWrapper(r.filterPromise,e[t])):console.warn("AG-Grid: setFilterModel() - unable to fully apply model, unable to create filter for colId: "+t)}else console.warn("AG Grid: setFilterModel() - unable to fully apply model, filtering disabled for colId: "+t);else console.warn("AG Grid: setFilterModel() - no column found for colId: "+t)}))}else this.allColumnFilters.forEach((function(e){n.push(i.setModelOnFilterWrapper(e.filterPromise,null))}));$o.all(n).then((function(){var e=i.getFilterModel(),n=[];i.allColumnFilters.forEach((function(t,i){var r=o?o[i]:null,s=e?e[i]:null;Ko.jsonEquals(r,s)||n.push(t.column)})),n.length>0&&i.onFilterChanged({columns:n,source:t})}))}},t.prototype.setModelOnFilterWrapper=function(e,t){return new $o((function(i){e.then((function(e){"function"!==typeof e.setModel&&(console.warn("AG Grid: filter missing setModel method, which is needed for setFilterModel"),i()),(e.setModel(t)||$o.resolve()).then((function(){return i()}))}))}))},t.prototype.getFilterModel=function(){var e={};return this.allColumnFilters.forEach((function(t,i){var n=t.filterPromise,r=n.resolveNow(null,(function(e){return e}));if(null==r)return null;if("function"===typeof r.getModel){var s=r.getModel();o(s)&&(e[i]=s)}else console.warn("AG Grid: filter API missing getModel method, which is needed for getFilterModel")})),e},t.prototype.isColumnFilterPresent=function(){return this.activeColumnFilters.length>0},t.prototype.isAggregateFilterPresent=function(){return!!this.activeAggregateFilters.length},t.prototype.isExternalFilterPresent=function(){return this.externalFilterPresent},t.prototype.isChildFilterPresent=function(){return this.isColumnFilterPresent()||this.isQuickFilterPresent()||this.isExternalFilterPresent()||this.isAdvancedFilterPresent()},t.prototype.isAdvancedFilterPresent=function(){return this.isAdvancedFilterEnabled()&&this.advancedFilterService.isFilterPresent()},t.prototype.onAdvancedFilterEnabledChanged=function(e){var t,i=this;e?this.allColumnFilters.size&&(this.allColumnFilters.forEach((function(e){return i.disposeFilterWrapper(e,"advancedFilterEnabled")})),this.onFilterChanged({source:"advancedFilter"})):(null===(t=this.advancedFilterService)||void 0===t?void 0:t.isFilterPresent())&&(this.advancedFilterService.setModel(null),this.onFilterChanged({source:"advancedFilter"}))},t.prototype.isAdvancedFilterEnabled=function(){var e;return null===(e=this.advancedFilterService)||void 0===e?void 0:e.isEnabled()},t.prototype.isAdvancedFilterHeaderActive=function(){return this.isAdvancedFilterEnabled()&&this.advancedFilterService.isHeaderActive()},t.prototype.doAggregateFiltersPass=function(e,t){return this.doColumnFiltersPass(e,t,!0)},t.prototype.updateActiveFilters=function(){var e=this;this.activeColumnFilters.length=0,this.activeAggregateFilters.length=0;var t=function(e){return!!e&&(e.isFilterActive?e.isFilterActive():(console.warn("AG Grid: Filter is missing isFilterActive() method"),!1))},i=!!this.gridOptionsService.getGroupAggFiltering(),n=function(t){var n=!t.isPrimary();if(n)return!0;var o=!e.columnModel.isPivotActive(),r=t.isValueActive();return!(!r||!o)&&(!!e.columnModel.isPivotMode()||i)};
11this.allColumnFilters.forEach((function(i){if(i.filterPromise.resolveNow(!1,t)){var o=i.filterPromise.resolveNow(null,(function(e){return e}));n(i.column)?e.activeAggregateFilters.push(o):e.activeColumnFilters.push(o)}}))},t.prototype.updateFilterFlagInColumns=function(e,t){this.allColumnFilters.forEach((function(i){var n=i.filterPromise.resolveNow(!1,(function(e){return e.isFilterActive()}));i.column.setFilterActive(n,e,t)}))},t.prototype.isAnyFilterPresent=function(){return this.isQuickFilterPresent()||this.isColumnFilterPresent()||this.isAggregateFilterPresent()||this.isExternalFilterPresent()},t.prototype.doColumnFiltersPass=function(e,t,i){for(var n=e.data,o=e.aggData,r=i?this.activeAggregateFilters:this.activeColumnFilters,s=i?o:n,a=0;a<r.length;a++){var l=r[a];if(null!=l&&l!==t){if("function"!==typeof l.doesFilterPass)throw new Error("Filter is missing method doesFilterPass");if(!l.doesFilterPass({node:e,data:s}))return!1}}return!0},t.prototype.resetQuickFilterCache=function(){this.quickFilterService.resetQuickFilterCache()},t.prototype.refreshFiltersForAggregations=function(){var e=this.gridOptionsService.getGroupAggFiltering();e&&this.onFilterChanged()},t.prototype.callOnFilterChangedOutsideRenderCycle=function(e){var t=this,i=function(){return t.onFilterChanged(e)};this.rowRenderer.isRefreshInProgress()?setTimeout(i,0):i()},t.prototype.onFilterChanged=function(e){void 0===e&&(e={});var t=e.source,i=e.filterInstance,n=e.additionalEventAttributes,o=e.columns;this.updateDependantFilters(),this.updateActiveFilters(),this.updateFilterFlagInColumns("filterChanged",n),this.externalFilterPresent=this.isExternalFilterPresentCallback(),this.allColumnFilters.forEach((function(e){e.filterPromise&&e.filterPromise.then((function(e){e&&e!==i&&e.onAnyFilterChanged&&e.onAnyFilterChanged()}))}));var r={source:t,type:ht.EVENT_FILTER_CHANGED,columns:o||[]};n&&R(r,n),this.processingFilterChange=!0,this.eventService.dispatchEvent(r),this.processingFilterChange=!1},t.prototype.isSuppressFlashingCellsBecauseFiltering=function(){var e,t=null!==(e=this.gridOptionsService.get("allowShowChangeAfterFilter"))&&void 0!==e&&e;return!t&&this.processingFilterChange},t.prototype.isQuickFilterPresent=function(){return this.quickFilterService.isQuickFilterPresent()},t.prototype.updateAggFiltering=function(){this.aggFiltering=!!this.gridOptionsService.getGroupAggFiltering()},t.prototype.isAggregateQuickFilterPresent=function(){return this.isQuickFilterPresent()&&(this.aggFiltering||this.columnModel.isPivotMode())},t.prototype.isNonAggregateQuickFilterPresent=function(){return this.isQuickFilterPresent()&&!(this.aggFiltering||this.columnModel.isPivotMode())},t.prototype.doesRowPassOtherFilters=function(e,t){return this.doesRowPassFilter({rowNode:t,filterInstanceToSkip:e})},t.prototype.doesRowPassAggregateFilters=function(e){return!(this.isAggregateQuickFilterPresent()&&!this.quickFilterService.doesRowPassQuickFilter(e.rowNode))&&!(this.isAggregateFilterPresent()&&!this.doAggregateFiltersPass(e.rowNode,e.filterInstanceToSkip))},t.prototype.doesRowPassFilter=function(e){return!(this.isNonAggregateQuickFilterPresent()&&!this.quickFilterService.doesRowPassQuickFilter(e.rowNode))&&(!(this.isExternalFilterPresent()&&!this.doesExternalFilterPass(e.rowNode))&&(!(this.isColumnFilterPresent()&&!this.doColumnFiltersPass(e.rowNode,e.filterInstanceToSkip))&&!(this.isAdvancedFilterPresent()&&!this.advancedFilterService.doesFilterPass(e.rowNode))))},t.prototype.onNewRowsLoaded=function(e){this.allColumnFilters.forEach((function(e){e.filterPromise.then((function(e){e.onNewRowsLoaded&&e.onNewRowsLoaded()}))})),this.updateFilterFlagInColumns(e,{afterDataChange:!0}),this.updateActiveFilters()},t.prototype.createValueGetter=function(e){var t=this;return function(i){var n=i.node;return t.valueService.getValue(e,n,!0)}},t.prototype.createGetValue=function(e){var t=this;return function(i,n){var o=n?t.columnModel.getGridColumn(n):e;return o?t.valueService.getValue(o,i,!0):void 0}},t.prototype.getFilterComponent=function(e,t,i){var n;if(void 0===i&&(i=!0),i)return(null===(n=this.getOrCreateFilterWrapper(e,t))||void 0===n?void 0:n.filterPromise)||null;var o=this.cachedFilter(e);return o?o.filterPromise:null},t.prototype.isFilterActive=function(e){var t=this.cachedFilter(e);return!!t&&t.filterPromise.resolveNow(!1,(function(e){return e.isFilterActive()}
11))},t.prototype.getOrCreateFilterWrapper=function(e,t){if(!e.isFilterAllowed())return null;var i=this.cachedFilter(e);return i?"NO_UI"!==t&&this.putIntoGui(i,t):(i=this.createFilterWrapper(e,t),this.setColumnFilterWrapper(e,i)),i},t.prototype.cachedFilter=function(e){return this.allColumnFilters.get(e.getColId())},t.prototype.getDefaultFilter=function(e){var t;if(ne.__isRegistered(J.SetFilterModule,this.context.getGridId()))t="agSetColumnFilter";else{var i=e.getColDef().cellDataType;t="number"===i?"agNumberColumnFilter":"date"===i||"dateString"===i?"agDateColumnFilter":"agTextColumnFilter"}return t},t.prototype.getDefaultFloatingFilter=function(e){var t;if(ne.__isRegistered(J.SetFilterModule,this.context.getGridId()))t="agSetColumnFloatingFilter";else{var i=e.getColDef().cellDataType;t="number"===i?"agNumberColumnFloatingFilter":"date"===i||"dateString"===i?"agDateColumnFloatingFilter":"agTextColumnFloatingFilter"}return t},t.prototype.createFilterInstance=function(e){var t,i=this,n=this.getDefaultFilter(e),o=e.getColDef(),r=sc(sc({},this.createFilterParams(e,o)),{filterModifiedCallback:function(){return i.filterModifiedCallbackFactory(t,e)()},filterChangedCallback:function(n){return i.filterChangedCallbackFactory(t,e)(n)},doesRowPassOtherFilter:function(e){return i.doesRowPassOtherFilters(t,e)}}),s=this.userComponentFactory.getFilterDetails(o,r,n);return s?{filterPromise:function(){var e=s.newAgStackInstance();return e&&e.then((function(e){return t=e})),e},compDetails:s}:{filterPromise:null,compDetails:null}},t.prototype.createFilterParams=function(e,t){var i={column:e,colDef:C(t),rowModel:this.rowModel,filterChangedCallback:function(){},filterModifiedCallback:function(){},valueGetter:this.createValueGetter(e),getValue:this.createGetValue(e),doesRowPassOtherFilter:function(){return!0},api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context};return i},t.prototype.createFilterWrapper=function(e,t){var i,n={column:e,filterPromise:null,compiledElement:null,guiPromise:$o.resolve(null),compDetails:null},o=this.createFilterInstance(e),r=o.filterPromise,s=o.compDetails;return n.filterPromise=null!==(i=null===r||void 0===r?void 0:r())&&void 0!==i?i:null,n.compDetails=s,r&&this.putIntoGui(n,t),n},t.prototype.putIntoGui=function(e,t){var i=this,n=document.createElement("div");n.className="ag-filter",e.guiPromise=new $o((function(r){e.filterPromise.then((function(s){var a=s.getGui();o(a)||console.warn("AG Grid: getGui method from filter returned ".concat(a,", it should be a DOM element or an HTML template string.")),"string"===typeof a&&(a=Kn(a)),n.appendChild(a),r(n);var l={type:ht.EVENT_FILTER_OPENED,column:e.column,source:t,eGui:n};i.eventService.dispatchEvent(l)}))}))},t.prototype.onColumnsChanged=function(){var e=this,t=[];this.allColumnFilters.forEach((function(i,n){var o;o=i.column.isPrimary()?e.columnModel.getPrimaryColumn(n):e.columnModel.getGridColumn(n),o||(t.push(i.column),e.disposeFilterWrapper(i,"columnChanged"),e.disposeColumnListener(n))})),t.length>0?this.onFilterChanged({columns:t,source:"api"}):this.updateDependantFilters()},t.prototype.updateDependantFilters=function(){var e=this,t=this.columnModel.getGroupAutoColumns();null===t||void 0===t||t.forEach((function(t){"agGroupColumnFilter"===t.getColDef().filter&&e.getOrCreateFilterWrapper(t,"NO_UI")}))},t.prototype.isFilterAllowed=function(e){var t,i;if(this.isAdvancedFilterEnabled())return!1;var n=e.isFilterAllowed();if(!n)return!1;var o=this.allColumnFilters.get(e.getColId());return null===(i=null===(t=null===o||void 0===o?void 0:o.filterPromise)||void 0===t?void 0:t.resolveNow(!0,(function(e){return"function"!==typeof(null===e||void 0===e?void 0:e.isFilterAllowed)||(null===e||void 0===e?void 0:e.isFilterAllowed())})))||void 0===i||i},t.prototype.getFloatingFilterCompDetails=function(e,t){var i=this,n=e.getColDef(),o=this.createFilterParams(e,n),r=this.userComponentFactory.mergeParamsWithApplicationProvidedParams(n,_l,o),s=this.userComponentFactory.getDefaultFloatingFilterType(n,(function(){return i.getDefaultFloatingFilter(e)}));null==s&&(s="agReadOnlyFloatingFilter");var a=function(t){var n=i.getFilterComponent(e,"NO_UI");null!=n&&n.then((function(e){t(Ql(e))}))},l={column:e,filterParams:r,currentParentModel:function(){return i.getCurrentFloatingFilterParentModel(e)},parentFilterInstance:a,showParentFilter:t,suppressFilterButton:!1};
11return this.userComponentFactory.getFloatingFilterCompDetails(n,l,s)},t.prototype.getCurrentFloatingFilterParentModel=function(e){var t=this.getFilterComponent(e,"NO_UI",!1);return t?t.resolveNow(null,(function(e){return e&&e.getModel()})):null},t.prototype.destroyFilter=function(e,t){void 0===t&&(t="api");var i=e.getColId(),n=this.allColumnFilters.get(i);this.disposeColumnListener(i),n&&(this.disposeFilterWrapper(n,t),this.onFilterChanged({columns:[e],source:"api"}))},t.prototype.disposeColumnListener=function(e){var t=this.allColumnListeners.get(e);t&&(this.allColumnListeners.delete(e),t())},t.prototype.disposeFilterWrapper=function(e,t){var i=this;e.filterPromise.then((function(n){i.getContext().destroyBean(n),e.column.setFilterActive(!1,"filterDestroyed"),i.allColumnFilters.delete(e.column.getColId());var o={type:ht.EVENT_FILTER_DESTROYED,source:t,column:e.column};i.eventService.dispatchEvent(o)}))},t.prototype.filterModifiedCallbackFactory=function(e,t){var i=this;return function(){var n={type:ht.EVENT_FILTER_MODIFIED,column:t,filterInstance:e};i.eventService.dispatchEvent(n)}},t.prototype.filterChangedCallbackFactory=function(e,t){var i=this;return function(n){var o,r=null!==(o=null===n||void 0===n?void 0:n.source)&&void 0!==o?o:"api",s={filter:e,additionalEventAttributes:n,columns:[t],source:r};i.callOnFilterChangedOutsideRenderCycle(s)}},t.prototype.checkDestroyFilter=function(e){var t=this,i=this.allColumnFilters.get(e);if(i){var n=i.column,o=(n.isFilterAllowed()?this.createFilterInstance(n):{compDetails:null}).compDetails;if(this.areFilterCompsDifferent(i.compDetails,o))this.destroyFilter(n,"columnChanged");else{var r=n.getColDef().filterParams;i.filterPromise?i.filterPromise.then((function(e){var i=!(null===e||void 0===e?void 0:e.refresh)||e.refresh(sc(sc(sc({},t.createFilterParams(n,n.getColDef())),{filterModifiedCallback:t.filterModifiedCallbackFactory(e,n),filterChangedCallback:t.filterChangedCallbackFactory(e,n),doesRowPassOtherFilter:function(i){return t.doesRowPassOtherFilters(e,i)}}),r));i||t.destroyFilter(n,"columnChanged")})):this.destroyFilter(n,"columnChanged")}}},t.prototype.setColumnFilterWrapper=function(e,t){var i=this,n=e.getColId();this.allColumnFilters.set(n,t),this.allColumnListeners.set(n,this.addManagedListener(e,Ee.EVENT_COL_DEF_CHANGED,(function(){return i.checkDestroyFilter(n)})))},t.prototype.areFilterCompsDifferent=function(e,t){if(!t||!e)return!0;var i=e.componentClass,n=t.componentClass,o=i===n||(null===i||void 0===i?void 0:i.render)&&(null===n||void 0===n?void 0:n.render)&&i.render===n.render;return!o},t.prototype.getAdvancedFilterModel=function(){return this.isAdvancedFilterEnabled()?this.advancedFilterService.getModel():null},t.prototype.setAdvancedFilterModel=function(e){this.isAdvancedFilterEnabled()&&(this.dataTypeService.isPendingInference()?this.advancedFilterModelUpdateQueue.push(e):(this.advancedFilterService.setModel(null!==e&&void 0!==e?e:null),this.onFilterChanged({source:"advancedFilter"})))},t.prototype.showAdvancedFilterBuilder=function(e){this.isAdvancedFilterEnabled()&&this.advancedFilterService.getCtrl().toggleFilterBuilder(e,!0)},t.prototype.updateAdvancedFilterColumns=function(){this.isAdvancedFilterEnabled()&&this.advancedFilterService.updateValidity()&&this.onFilterChanged({source:"advancedFilter"})},t.prototype.hasFloatingFilters=function(){if(this.isAdvancedFilterEnabled())return!1;var e=this.columnModel.getAllGridColumns();return e.some((function(e){return e.getColDef().floatingFilter}))},t.prototype.getFilterInstance=function(e,t){if(!this.isAdvancedFilterEnabled()){var i=this.getFilterInstanceImpl(e,(function(e){if(t){var i=Ql(e);t(i)}})),n=Ql(i);return n}this.warnAdvancedFilters()},t.prototype.getFilterInstanceImpl=function(e,t){var i=this.columnModel.getPrimaryColumn(e);if(i){var n=this.getFilterComponent(i,"NO_UI"),o=n&&n.resolveNow(null,(function(e){return e}));return o?setTimeout(t,0,o):n&&n.then((function(e){t(e)})),o}},t.prototype.warnAdvancedFilters=function(){G("Column Filter API methods have been disabled as Advanced Filters are enabled.")},t.prototype.setupAdvancedFilterHeaderComp=function(e){var t;null===(t=this.advancedFilterService)||void 0===t||t.getCtrl().setupHeaderComp(e)},t.prototype.getHeaderRowCount=function(){return this.isAdvancedFilterHeaderActive()?1:0},t.prototype.getHeaderHeight=function(){return this.isAdvancedFilterHeaderActive()?this.advancedFilterService.getCtrl().getHeaderHeight():0}
11,t.prototype.processFilterModelUpdateQueue=function(){var e=this;this.filterModelUpdateQueue.forEach((function(t){var i=t.model,n=t.source;return e.setFilterModel(i,n)})),this.filterModelUpdateQueue=[],this.advancedFilterModelUpdateQueue.forEach((function(t){return e.setAdvancedFilterModel(t)})),this.advancedFilterModelUpdateQueue=[]},t.prototype.destroy=function(){var t=this;e.prototype.destroy.call(this),this.allColumnFilters.forEach((function(e){return t.disposeFilterWrapper(e,"gridDestroyed")})),this.allColumnListeners.clear()},ac([de("valueService")],t.prototype,"valueService",void 0),ac([de("columnModel")],t.prototype,"columnModel",void 0),ac([de("rowModel")],t.prototype,"rowModel",void 0),ac([de("userComponentFactory")],t.prototype,"userComponentFactory",void 0),ac([de("rowRenderer")],t.prototype,"rowRenderer",void 0),ac([de("dataTypeService")],t.prototype,"dataTypeService",void 0),ac([de("quickFilterService")],t.prototype,"quickFilterService",void 0),ac([pe("advancedFilterService")],t.prototype,"advancedFilterService",void 0),ac([le],t.prototype,"init",null),t=ac([ue("filterManager")],t),t}(st),cc=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),uc=function(e){function t(t,i){var n=e.call(this,t)||this;return n.ctrl=i,n}return cc(t,e),t.prototype.getCtrl=function(){return this.ctrl},t}(rr),dc=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),pc=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},hc=function(e){function t(i){return e.call(this,t.TEMPLATE,i)||this}return dc(t,e),t.prototype.postConstruct=function(){var e=this,t=this.getGui(),i={addOrRemoveCssClass:function(t,i){return e.addOrRemoveCssClass(t,i)},addOrRemoveBodyCssClass:function(t,i){return e.eFloatingFilterBody.classList.toggle(t,i)},setButtonWrapperDisplayed:function(t){return _n(e.eButtonWrapper,t)},setCompDetails:function(t){return e.setCompDetails(t)},getFloatingFilterComp:function(){return e.compPromise},setWidth:function(e){return t.style.width=e},setMenuIcon:function(t){return e.eButtonShowMainFilter.appendChild(t)}};this.ctrl.setComp(i,t,this.eButtonShowMainFilter,this.eFloatingFilterBody)},t.prototype.setCompDetails=function(e){var t=this;if(!e)return this.destroyFloatingFilterComp(),void(this.compPromise=null);this.compPromise=e.newAgStackInstance(),this.compPromise.then((function(e){return t.afterCompCreated(e)}))},t.prototype.destroyFloatingFilterComp=function(){this.floatingFilterComp&&(this.eFloatingFilterBody.removeChild(this.floatingFilterComp.getGui()),this.floatingFilterComp=this.destroyBean(this.floatingFilterComp))},t.prototype.afterCompCreated=function(e){e&&(this.isAlive()?(this.destroyFloatingFilterComp(),this.floatingFilterComp=e,this.eFloatingFilterBody.appendChild(e.getGui()),e.afterGuiAttached&&e.afterGuiAttached()):this.destroyBean(e))},t.TEMPLATE='<div class="ag-header-cell ag-floating-filter" role="gridcell" tabindex="-1">\n            <div ref="eFloatingFilterBody" role="presentation"></div>\n            <div class="ag-floating-filter-button ag-hidden" ref="eButtonWrapper" role="presentation">\n                <button type="button" class="ag-button ag-floating-filter-button-button" ref="eButtonShowMainFilter" tabindex="-1"></button>\n            </div>\n        </div>',pc([sr("eFloatingFilterBody")],t.prototype,"eFloatingFilterBody",void 0),pc([sr("eButtonWrapper")],t.prototype,"eButtonWrapper",void 0),pc([sr("eButtonShowMainFilter")],t.prototype,"eButtonShowMainFilter",void 0),pc([le],t.prototype,"postConstruct",null),pc([ce],t.prototype,"destroyFloatingFilterComp",null),t}(uc),fc=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),gc=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};(function(e){e["AUTO_HEIGHT"]="ag-layout-auto-height",e["NORMAL"]="ag-layout-normal",e["PRINT"]="ag-layout-print"})(ec||(ec={}));var vc,yc,mc=function(e){function t(t){var i=e.call(this)||this;return i.view=t,i}return fc(t,e),t.prototype.postConstruct=function(){this.addManagedPropertyListener("domLayout",this.updateLayoutClasses.bind(this)),this.updateLayoutClasses()},t.prototype.updateLayoutClasses=function(){var e=this.getDomLayout(),t={autoHeight:"autoHeight"===e,normal:"normal"===e,print:"print"===e},i=t.autoHeight?ec.AUTO_HEIGHT:t.print?ec.PRINT:ec.NORMAL;this.view.updateLayoutClasses(i,t)},t.prototype.getDomLayout=function(){var e,t=null!==(e=this.gridOptionsService.get("domLayout"))&&void 0!==e?e:"normal",i=["normal","print","autoHeight"];
11return-1===i.indexOf(t)?(G("".concat(t," is not valid for DOM Layout, valid values are 'normal', 'autoHeight', 'print'.")),"normal"):t},gc([le],t.prototype,"postConstruct",null),t}(st),Cc=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),bc=function(){return bc=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},bc.apply(this,arguments)},wc=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};(function(e){e[e["Vertical"]=0]="Vertical",e[e["Horizontal"]=1]="Horizontal"})(vc||(vc={})),function(e){e[e["Container"]=0]="Container",e[e["FakeContainer"]=1]="FakeContainer"}(yc||(yc={}));var Sc,Ec=function(e){function t(t){var i=e.call(this)||this;return i.lastScrollSource=[null,null],i.scrollLeft=-1,i.nextScrollTop=-1,i.scrollTop=-1,i.eBodyViewport=t,i.resetLastHScrollDebounced=Y((function(){return i.lastScrollSource[vc.Horizontal]=null}),500),i.resetLastVScrollDebounced=Y((function(){return i.lastScrollSource[vc.Vertical]=null}),500),i}return Cc(t,e),t.prototype.postConstruct=function(){var e=this;this.enableRtl=this.gridOptionsService.get("enableRtl"),this.addManagedListener(this.eventService,ht.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onDisplayedColumnsWidthChanged.bind(this)),this.ctrlsService.whenReady((function(t){e.centerRowContainerCtrl=t.centerRowContainerCtrl,e.onDisplayedColumnsWidthChanged(),e.addScrollListener()}))},t.prototype.addScrollListener=function(){var e=this.ctrlsService.getFakeHScrollComp(),t=this.ctrlsService.getFakeVScrollComp();this.addManagedListener(this.centerRowContainerCtrl.getViewportElement(),"scroll",this.onHScroll.bind(this)),e.onScrollCallback(this.onFakeHScroll.bind(this));var i=this.gridOptionsService.get("debounceVerticalScrollbar"),n=i?Y(this.onVScroll.bind(this),100):this.onVScroll.bind(this),o=i?Y(this.onFakeVScroll.bind(this),100):this.onFakeVScroll.bind(this);this.addManagedListener(this.eBodyViewport,"scroll",n),t.onScrollCallback(o)},t.prototype.onDisplayedColumnsWidthChanged=function(){this.enableRtl&&this.horizontallyScrollHeaderCenterAndFloatingCenter()},t.prototype.horizontallyScrollHeaderCenterAndFloatingCenter=function(e){var t=null==this.centerRowContainerCtrl;if(!t){void 0===e&&(e=this.centerRowContainerCtrl.getCenterViewportScrollLeft());var i=this.enableRtl?e:-e,n=this.ctrlsService.getTopCenterRowContainerCtrl(),o=this.ctrlsService.getStickyTopCenterRowContainerCtrl(),r=this.ctrlsService.getBottomCenterRowContainerCtrl(),s=this.ctrlsService.getFakeHScrollComp(),a=this.ctrlsService.getHeaderRowContainerCtrl();a.setHorizontalScroll(-i),r.setContainerTranslateX(i),n.setContainerTranslateX(i),o.setContainerTranslateX(i);var l=this.centerRowContainerCtrl.getViewportElement(),c=this.lastScrollSource[vc.Horizontal]===yc.Container;e=Math.abs(e),c?s.setScrollPosition(e):Hn(l,e,this.enableRtl)}},t.prototype.isControllingScroll=function(e,t){return null==this.lastScrollSource[t]?(this.lastScrollSource[t]=e,!0):this.lastScrollSource[t]===e},t.prototype.onFakeHScroll=function(){this.isControllingScroll(yc.FakeContainer,vc.Horizontal)&&this.onHScrollCommon(yc.FakeContainer)},t.prototype.onHScroll=function(){this.isControllingScroll(yc.Container,vc.Horizontal)&&this.onHScrollCommon(yc.Container)},t.prototype.onHScrollCommon=function(e){var t,i=this.centerRowContainerCtrl.getViewportElement(),n=i.scrollLeft;this.shouldBlockScrollUpdate(vc.Horizontal,n,!0)||(t=e===yc.Container?jn(i,this.enableRtl):this.ctrlsService.getFakeHScrollComp().getScrollPosition(),this.doHorizontalScroll(Math.round(t)),this.resetLastHScrollDebounced())},t.prototype.onFakeVScroll=function(){this.isControllingScroll(yc.FakeContainer,vc.Vertical)&&this.onVScrollCommon(yc.FakeContainer)},t.prototype.onVScroll=function(){this.isControllingScroll(yc.Container,vc.Vertical)&&this.onVScrollCommon(yc.Container)},t.prototype.onVScrollCommon=function(e){var t;t=e===yc.Container?this.eBodyViewport.scrollTop:this.ctrlsService.getFakeVScrollComp().getScrollPosition(),this.shouldBlockScrollUpdate(vc.Vertical,t,!0)||(this.animationFrameService.setScrollTop(t),this.nextScrollTop=t,e===yc.Container?this.ctrlsService.getFakeVScrollComp().setScrollPosition(t):this.eBodyViewport.scrollTop=t,this.gridOptionsService.get("suppressAnimationFrame")?this.scrollGridIfNeeded():this.animationFrameService.schedule(),this.resetLastVScrollDebounced())},t.prototype.doHorizontalScroll=function(e){var t=this.ctrlsService.getFakeHScrollComp().getScrollPosition();this.scrollLeft===e&&e===t||(this.scrollLeft=e,this.fireScrollEvent(vc.Horizontal),this.horizontallyScrollHeaderCenterAndFloating
11Center(e),this.centerRowContainerCtrl.onHorizontalViewportChanged(!0))},t.prototype.fireScrollEvent=function(e){var t=this,i={type:ht.EVENT_BODY_SCROLL,direction:e===vc.Horizontal?"horizontal":"vertical",left:this.scrollLeft,top:this.scrollTop};this.eventService.dispatchEvent(i),window.clearTimeout(this.scrollTimer),this.scrollTimer=void 0,this.scrollTimer=window.setTimeout((function(){var e=bc(bc({},i),{type:ht.EVENT_BODY_SCROLL_END});t.eventService.dispatchEvent(e)}),100)},t.prototype.shouldBlockScrollUpdate=function(e,t,i){return void 0===i&&(i=!1),!(i&&!Ji())&&(e===vc.Vertical?this.shouldBlockVerticalScroll(t):this.shouldBlockHorizontalScroll(t))},t.prototype.shouldBlockVerticalScroll=function(e){var t=Ln(this.eBodyViewport),i=this.eBodyViewport.scrollHeight;return e<0||e+t>i},t.prototype.shouldBlockHorizontalScroll=function(e){var t=this.centerRowContainerCtrl.getCenterWidth(),i=this.centerRowContainerCtrl.getViewportElement().scrollWidth;if(this.enableRtl&&Bn()){if(e>0)return!0}else if(e<0)return!0;return Math.abs(e)+t>i},t.prototype.redrawRowsAfterScroll=function(){this.fireScrollEvent(vc.Vertical)},t.prototype.checkScrollLeft=function(){this.scrollLeft!==this.centerRowContainerCtrl.getCenterViewportScrollLeft()&&this.onHScrollCommon(yc.Container)},t.prototype.scrollGridIfNeeded=function(){var e=this.scrollTop!=this.nextScrollTop;return e&&(this.scrollTop=this.nextScrollTop,this.redrawRowsAfterScroll()),e},t.prototype.setHorizontalScrollPosition=function(e,t){void 0===t&&(t=!1);var i=0,n=this.centerRowContainerCtrl.getViewportElement().scrollWidth-this.centerRowContainerCtrl.getCenterWidth();!t&&this.shouldBlockScrollUpdate(vc.Horizontal,e)&&(e=this.enableRtl&&Bn()?e>0?0:n:Math.min(Math.max(e,i),n)),Hn(this.centerRowContainerCtrl.getViewportElement(),Math.abs(e),this.enableRtl),this.doHorizontalScroll(e)},t.prototype.setVerticalScrollPosition=function(e){this.eBodyViewport.scrollTop=e},t.prototype.getVScrollPosition=function(){var e={top:this.eBodyViewport.scrollTop,bottom:this.eBodyViewport.scrollTop+this.eBodyViewport.offsetHeight};return e},t.prototype.getHScrollPosition=function(){return this.centerRowContainerCtrl.getHScrollPosition()},t.prototype.isHorizontalScrollShowing=function(){return this.centerRowContainerCtrl.isHorizontalScrollShowing()},t.prototype.scrollHorizontally=function(e){var t=this.centerRowContainerCtrl.getViewportElement().scrollLeft;return this.setHorizontalScrollPosition(t+e),this.centerRowContainerCtrl.getViewportElement().scrollLeft-t},t.prototype.scrollToTop=function(){this.eBodyViewport.scrollTop=0},t.prototype.ensureNodeVisible=function(e,t){void 0===t&&(t=null);for(var i=this.rowModel.getRowCount(),n=-1,o=0;o<i;o++){var r=this.rowModel.getRow(o);if("function"===typeof e){var s=e;if(r&&s(r)){n=o;break}}else if(e===r||e===r.data){n=o;break}}n>=0&&this.ensureIndexVisible(n,t)},t.prototype.ensureIndexVisible=function(e,t){if(!this.gridOptionsService.isDomLayout("print")){var i=this.paginationProxy.getRowCount();if("number"!==typeof e||e<0||e>=i)console.warn("AG Grid: Invalid row index for ensureIndexVisible: "+e);else{var n=this.gridOptionsService.get("pagination"),o=n&&!this.gridOptionsService.get("suppressPaginationPanel");o||this.paginationProxy.goToPageWithIndex(e);var r,s=this.ctrlsService.getGridBodyCtrl(),a=s.getStickyTopHeight(),l=this.paginationProxy.getRow(e);do{var c=l.rowTop,u=l.rowHeight,d=this.paginationProxy.getPixelOffset(),p=l.rowTop-d,h=p+l.rowHeight,f=this.getVScrollPosition(),g=this.heightScaler.getDivStretchOffset(),v=f.top+g,y=f.bottom+g,m=y-v,C=this.heightScaler.getScrollPositionForPixel(p),b=this.heightScaler.getScrollPositionForPixel(h-m),w=Math.min((C+b)/2,p),S=v+a>p,E=y<h,x=null;"top"===t?x=C:"bottom"===t?x=b:"middle"===t?x=w:S?x=C-a:E&&(x=b),null!==x&&(this.setVerticalScrollPosition(x),this.rowRenderer.redraw({afterScroll:!0})),r=c!==l.rowTop||u!==l.rowHeight}while(r);this.animationFrameService.flushAllFrames()}}},t.prototype.ensureColumnVisible=function(e,t){void 0===t&&(t="auto");var i=this.columnModel.getGridColumn(e);if(i&&!i.isPinned()&&this.columnModel.isColumnDisplayed(i)){var n=this.getPositionedHorizontalScroll(i,t);null!==n&&this.centerRowContainerCtrl.setCenterViewportScrollLeft(n),this.centerRowContainerCtrl.onHorizontalViewportChanged(),this.animationFrameService.flushAllFrames()}},t.prototype.setScrollPosition=function(e,t){this.centerRowContainerCtrl.setCenterViewportScrollLeft(t),this.setVerticalScrollPosition(e),this.rowRenderer.redraw({afterScroll:!0}),this.animationFrameService.flushAllFrames()},t.prototype.getPositionedHorizontalScroll=function(e,t){var i=this.isColumnOutsideViewport(e),n=i.columnBeforeStart,o=i.columnAfterEnd,r=this.centerRowContainerCtrl.getCenterWidth()<e.getActualWidth(),s=this.centerRowContainerCtrl.getCenterWidth(),a=this.enableRtl,l=(a?n:o)||r,c=a?o:n;"auto"!==t&&(l="start"===t,c="end"===t);var u="middle"===t;if(l||c||u){var d=this.getColumnBounds(e),p=d.colLeft,h=d.colMiddle,f=d.colRight;return u?h-s/2:l?a?f:p:a?p-s:f-s}return null},t.prototype.isColumnOutsideViewport=function(e){var t=this.getViewportBounds(),i=t.start,n=t.end,o=this.getColumnBounds(e),r=o.colLeft,s=o.colRight,a=this.enableRtl,l=a?i>s:n<s,c=a?n<r:i>r;return{columnBeforeStart:l,columnAfterEnd:c}},t.prototype.getColumnBounds=function(e){var t=this.enableRtl,i=this.columnModel.getBodyContainerWidth(),n=e.getActualWidth(),o=e.getLeft(),r=t?-1:1,s=t?i-o:o,a=s+n*r,l=s+n/2*r;return{colLeft:s,colMiddle:l,colRight:a}},t.prototype.getViewportBounds=function(){var e=this.centerRowContainerCtrl.getCenterWidth(),t=this.centerRowContainerCtrl.getCenterViewportScrollLeft(),i=t,n=e+t;return{start:i,end:n,width:e}},wc([de("ctrlsService")],t.prototype,"ctrlsService",void 0),wc([de("animationFrameService")],t.prototype,"animationFrameService",void 0),wc([de("paginationProxy")],t.prototype,"paginationProxy",void 0),wc([de("rowModel")],t.prototype,"rowModel",void 0),wc([de("rowContainerHeightService")],t.prototype,"heightScaler",void 0),wc([de("rowRenderer")],t.prototype,"rowRenderer",void 0),wc([de("columnModel")],t.prototype,"columnModel",void 0),wc([le],t.prototype,"postConstruct",null),t}(st),xc=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Oc=function(){return Oc=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Oc.apply(this,arguments)},Tc=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Dc=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},Rc=function(e,t,i){if(i||2===arguments.length)for(var n,o=0,r=t.length;o<r;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},Ac=function(e){function t(t){var i=e.call(this)||this;return i.isMultiRowDrag=!1,i.isGridSorted=!1,i.isGridFiltered=!1,i.isRowGroupActive=!1,i.eContainer=t,i}return xc(t,e),t.prototype.postConstruct=function(){var e=this;this.gridOptionsService.isRowModelType("clientSide")&&(this.clientSideRowModel=this.rowModel);var t=function(){e.onSortChanged(),e.onFilterChanged(),e.onRowGroupChanged()};this.addManagedListener(this.eventService,ht.EVENT_SORT_CHANGED,this.onSortChanged.bind(this)),this.addManagedListener(this.eventService,ht.EVENT_FILTER_CHANGED,this.onFilterChanged.bind(this)),this.addManagedListener(this.eventService,ht.EVENT_COLUMN_ROW_GROUP_CHANGED,this.onRowGroupChanged.bind(this)),this.addManagedListener(this.eventService,ht.EVENT_MODEL_UPDATED,(function(){t()})),t(),this.ctrlsService.whenReady((function(){var t=e.ctrlsService.getGridBodyCtrl();
vendor: 10,211 bytes, line 11
11e.autoScrollService=new Yl({scrollContainer:t.getBodyViewportElement(),scrollAxis:"y",getVerticalPosition:function(){return t.getScrollFeature().getVScrollPosition().top},setVerticalPosition:function(e){return t.getScrollFeature().setVerticalScrollPosition(e)},onScrollCallback:function(){e.onDragging(e.lastDraggingEvent)}})}))},t.prototype.onSortChanged=function(){this.isGridSorted=this.sortController.isSortActive()},t.prototype.onFilterChanged=function(){this.isGridFiltered=this.filterManager.isAnyFilterPresent()},t.prototype.onRowGroupChanged=function(){var e=this.columnModel.getRowGroupColumns();this.isRowGroupActive=!s(e)},t.prototype.getContainer=function(){return this.eContainer},t.prototype.isInterestedIn=function(e){return e===Ta.RowDrag},t.prototype.getIconName=function(){var e=this.gridOptionsService.get("rowDragManaged");return e&&this.shouldPreventRowMove()?Pa.ICON_NOT_ALLOWED:Pa.ICON_MOVE},t.prototype.shouldPreventRowMove=function(){return this.isGridSorted||this.isGridFiltered||this.isRowGroupActive},t.prototype.getRowNodes=function(e){var t=this;if(!this.isFromThisGrid(e))return e.dragItem.rowNodes||[];var i=this.gridOptionsService.get("rowDragMultiRow"),n=Rc([],Dc(this.selectionService.getSelectedNodes()),!1).sort((function(e,i){return null==e.rowIndex||null==i.rowIndex?0:t.getRowIndexNumber(e)-t.getRowIndexNumber(i)})),o=e.dragItem.rowNode;return i&&-1!==n.indexOf(o)?(this.isMultiRowDrag=!0,n):(this.isMultiRowDrag=!1,[o])},t.prototype.onDragEnter=function(e){e.dragItem.rowNodes=this.getRowNodes(e),this.dispatchGridEvent(ht.EVENT_ROW_DRAG_ENTER,e),this.getRowNodes(e).forEach((function(e){e.setDragging(!0)})),this.onEnterOrDragging(e)},t.prototype.onDragging=function(e){this.onEnterOrDragging(e)},t.prototype.isFromThisGrid=function(e){var t=e.dragSource.dragSourceDomDataKey;return t===this.gridOptionsService.getDomDataKey()},t.prototype.isDropZoneWithinThisGrid=function(e){var t=this.ctrlsService.getGridBodyCtrl(),i=t.getGui(),n=e.dropZoneTarget;return!i.contains(n)},t.prototype.onEnterOrDragging=function(e){this.dispatchGridEvent(ht.EVENT_ROW_DRAG_MOVE,e),this.lastDraggingEvent=e;var t=this.mouseEventService.getNormalisedPosition(e).y,i=this.gridOptionsService.get("rowDragManaged");i&&this.doManagedDrag(e,t),this.autoScrollService.check(e.event)},t.prototype.doManagedDrag=function(e,t){var i=this.isFromThisGrid(e),n=this.gridOptionsService.get("rowDragManaged"),o=e.dragItem.rowNodes;n&&this.shouldPreventRowMove()||(this.gridOptionsService.get("suppressMoveWhenRowDragging")||!i?this.isDropZoneWithinThisGrid(e)||this.clientSideRowModel.highlightRowAtPixel(o[0],t):this.moveRows(o,t))},t.prototype.getRowIndexNumber=function(e){return parseInt(Ae(e.getRowIndexString().split("-")),10)},t.prototype.moveRowAndClearHighlight=function(e){var t=this,i=this.clientSideRowModel.getLastHighlightedRowNode(),n=i&&i.highlighted===Wl.Below,o=this.mouseEventService.getNormalisedPosition(e).y,r=e.dragItem.rowNodes,s=n?1:0;if(this.isFromThisGrid(e))r.forEach((function(e){e.rowTop<o&&(s-=1)})),this.moveRows(r,o,s);else{var a=this.gridOptionsService.getCallback("getRowId"),l=this.clientSideRowModel.getRowIndexAtPixel(o)+1;this.clientSideRowModel.getHighlightPosition(o)===Wl.Above&&l--,this.clientSideRowModel.updateRowData({add:r.map((function(e){return e.data})).filter((function(e){return!t.clientSideRowModel.getRowNode(a?a({data:e,level:0}):e.id)})),addIndex:l})}this.clearRowHighlight()},t.prototype.clearRowHighlight=function(){this.clientSideRowModel.highlightRowAtPixel(null)},t.prototype.moveRows=function(e,t,i){void 0===i&&(i=0);var n=this.clientSideRowModel.ensureRowsAtPixel(e,t,i);n&&(this.focusService.clearFocusedCell(),this.rangeService&&this.rangeService.removeAllCellRanges())},t.prototype.addRowDropZone=function(e){var t=this;if(e.getContainer())if(this.dragAndDropService.findExternalZone(e))console.warn("AG Grid: addRowDropZone - target already exists in the list of DropZones. Use `removeRowDropZone` before adding it again.");else{var i={getContainer:e.getContainer};e.fromGrid?(e.fromGrid=void 0,i=e):(e.onDragEnter&&(i.onDragEnter=function(i){e.onDragEnter(t.draggingToRowDragEvent(ht.EVENT_ROW_DRAG_ENTER,i))}),e.onDragLeave&&(i.onDragLeave=function(i){e.onDragLeave(t.draggingToRowDragEvent(ht.EVENT_ROW_DRAG_LEAVE,i))}),e.onDragging&&(i.onDragging=function(i){e.onDragging(t.draggingToRowDragEvent(ht.EVENT_ROW_DRAG_MOVE,i))}),e.onDragStop&&(i.onDragStop=function(i){e.onDragStop(t.draggingToRowDragEvent(ht.EVENT_ROW_DRAG_END,i))})),this.dragAndDropService.addDropTarget(Oc({isInterestedIn:function(e){return e===Ta.RowDrag},getIconName:function(){return Pa.ICON_MOVE},external:!0},i))}else G("addRowDropZone - A container target needs to be provided")},t.prototype.getRowDropZone=function(e){var t=this,i=this.getContainer.bind(this),n=this.onDragEnter.bind(this),o=this.onDragLeave.bind(this),r=this.onDragging.bind(this),s=this.onDragStop.bind(this);return e?{getContainer:i,onDragEnter:e.onDragEnter?function(i){n(i),e.onDragEnter(t.draggingToRowDragEvent(ht.EVENT_ROW_DRAG_ENTER,i))}:n,onDragLeave:e.onDragLeave?function(i){o(i),e.onDragLeave(t.draggingToRowDragEvent(ht.EVENT_ROW_DRAG_LEAVE,i))}:o,onDragging:e.onDragging?function(i){r(i),e.onDragging(t.draggingToRowDragEvent(ht.EVENT_ROW_DRAG_MOVE,i))}:r,onDragStop:e.onDragStop?function(i){s(i),e.onDragStop(t.draggingToRowDragEvent(ht.EVENT_ROW_DRAG_END,i))}:s,fromGrid:!0}:{getContainer:i,onDragEnter:n,onDragLeave:o,onDragging:r,onDragStop:s,fromGrid:!0}},t.prototype.draggingToRowDragEvent=function(e,t){var i,n,o=this.mouseEventService.getNormalisedPosition(t).y,r=o>this.paginationProxy.getCurrentPageHeight(),s=-1;switch(r||(s=this.rowModel.getRowIndexAtPixel(o),i=this.rowModel.getRow(s)),t.vDirection){case Ts.Down:n="down";break;case Ts.Up:n="up";break;default:n=null;break}var a={type:e,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context,event:t.event,node:t.dragItem.rowNode,nodes:t.dragItem.rowNodes,overIndex:s,overNode:i,y:o,vDirection:n};return a},t.prototype.dispatchGridEvent=function(e,t){var i=this.draggingToRowDragEvent(e,t);this.eventService.dispatchEvent(i)},t.prototype.onDragLeave=function(e){this.dispatchGridEvent(ht.EVENT_ROW_DRAG_LEAVE,e),this.stopDragging(e),this.gridOptionsService.get("rowDragManaged")&&this.clearRowHighlight(),this.isFromThisGrid(e)&&(this.isMultiRowDrag=!1)},t.prototype.onDragStop=function(e){this.dispatchGridEvent(ht.EVENT_ROW_DRAG_END,e),this.stopDragging(e),!this.gridOptionsService.get("rowDragManaged")||!this.gridOptionsService.get("suppressMoveWhenRowDragging")&&this.isFromThisGrid(e)||this.isDropZoneWithinThisGrid(e)||this.moveRowAndClearHighlight(e)},t.prototype.stopDragging=function(e){this.autoScrollService.ensureCleared(),this.getRowNodes(e).forEach((function(e){e.setDragging(!1)}))},Tc([de("dragAndDropService")],t.prototype,"dragAndDropService",void 0),Tc([de("rowModel")],t.prototype,"rowModel",void 0),Tc([de("paginationProxy")],t.prototype,"paginationProxy",void 0),Tc([de("columnModel")],t.prototype,"columnModel",void 0),Tc([de("focusService")],t.prototype,"focusService",void 0),Tc([de("sortController")],t.prototype,"sortController",void 0),Tc([de("filterManager")],t.prototype,"filterManager",void 0),Tc([de("selectionService")],t.prototype,"selectionService",void 0),Tc([de("mouseEventService")],t.prototype,"mouseEventService",void 0),Tc([de("ctrlsService")],t.prototype,"ctrlsService",void 0),Tc([pe("rangeService")],t.prototype,"rangeService",void 0),Tc([le],t.prototype,"postConstruct",null),t}(st),_c=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Pc=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};(function(e){e["ANIMATION_ON"]="ag-row-animation",e["ANIMATION_OFF"]="ag-row-no-animation"})(Sc||(Sc={}));var Mc,kc,Nc="ag-force-vertical-scroll",Lc="ag-selectable",Ic="ag-column-moving",Fc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.stickyTopHeight=0,t}return _c(t,e),t.prototype.getScrollFeature=function(){return this.bodyScrollFeature},t.prototype.getBodyViewportElement=function(){return this.eBodyViewport},t.prototype.setComp=function(e,t,i,n,o,r){var s=this;this.comp=e,this.eGridBody=t,this.eBodyViewport=i,this.eTop=n,this.eBottom=o,this.eStickyTop=r,this.setCellTextSelection(this.gridOptionsService.get("enableCellTextSelection")),this.addManagedPropertyListener("enableCellTextSelection",(function(e){return s.setCellTextSelection(e.currentValue)})),this.createManagedBean(new mc(this.comp)),this.bodyScrollFeature=this.createManagedBean(new Ec(this.eBodyViewport)),this.addRowDragListener(),this.setupRowAnimationCssClass(),this.addEventListeners(),this.addFocusListeners([n,i,o,r]),this.onGridColumnsChanged(),this.addBodyViewportListener(),this.setFloatingHeights(),this.disableBrowserDragging(),this.addStopEditingWhenGridLosesFocus(),this.filterManager.setupAdvancedFilterHeaderComp(n),this.ctrlsService.registerGridBodyCtrl(this)},t.prototype.getComp=function(){return this.comp},t.prototype.addEventListeners=function(){this.addManagedListener(this.eventService,ht.EVENT_GRID_COLUMNS_CHANGED,this.onGridColumnsChanged.bind(this)),this.addManagedListener(this.eventService,ht.EVENT_SCROLL_VISIBILITY_CHANGED,this.onScrollVisibilityChanged.bind(this)),this.addManagedListener(this.eventService,ht.EVENT_PINNED_ROW_DATA_CHANGED,this.onPinnedRowDataChanged.bind(this)),this.addManagedListener(this.eventService,ht.EVENT_HEADER_HEIGHT_CHANGED,this.onHeaderHeight
11Changed.bind(this))},t.prototype.addFocusListeners=function(e){var t=this;e.forEach((function(e){t.addManagedListener(e,"focusin",(function(t){var i=t.target,n=kn(i,"ag-root",e);e.classList.toggle("ag-has-focus",!n)})),t.addManagedListener(e,"focusout",(function(t){var i=t.target,n=t.relatedTarget,o=e.contains(n),r=kn(n,"ag-root",e),s=kn(i,"ag-root",e);s||o&&!r||e.classList.remove("ag-has-focus")}))}))},t.prototype.setColumnMovingCss=function(e){this.comp.setColumnMovingCss(Ic,e)},t.prototype.setCellTextSelection=function(e){void 0===e&&(e=!1),this.comp.setCellSelectableCss(Lc,e)},t.prototype.onScrollVisibilityChanged=function(){var e=this,t=this.scrollVisibleService.isVerticalScrollShowing();this.setVerticalScrollPaddingVisible(t),this.setStickyTopWidth(t);var i=t&&this.gridOptionsService.getScrollbarWidth()||0,n=an()?16:0,o="calc(100% + ".concat(i+n,"px)");this.animationFrameService.requestAnimationFrame((function(){return e.comp.setBodyViewportWidth(o)}))},t.prototype.onGridColumnsChanged=function(){var e=this.columnModel.getAllGridColumns();this.comp.setColumnCount(e.length)},t.prototype.disableBrowserDragging=function(){this.addManagedListener(this.eGridBody,"dragstart",(function(e){if(e.target instanceof HTMLImageElement)return e.preventDefault(),!1}))},t.prototype.addStopEditingWhenGridLosesFocus=function(){var e=this;if(this.gridOptionsService.get("stopEditingWhenCellsLoseFocus")){var t=function(t){var n=t.relatedTarget;if(null!==en(n)){var o=i.some((function(e){return e.contains(n)}))&&e.mouseEventService.isElementInThisGrid(n);if(!o){var r=e.popupService;o=r.getActivePopups().some((function(e){return e.contains(n)}))||r.isElementWithinCustomPopup(n)}o||e.rowRenderer.stopEditing()}else e.rowRenderer.stopEditing()},i=[this.eBodyViewport,this.eBottom,this.eTop,this.eStickyTop];i.forEach((function(i){return e.addManagedListener(i,"focusout",t)}))}},t.prototype.updateRowCount=function(){var e=this.headerNavigationService.getHeaderRowCount()+this.filterManager.getHeaderRowCount(),t=this.rowModel.isLastRowIndexKnown()?this.rowModel.getRowCount():-1,i=-1===t?-1:e+t;this.comp.setRowCount(i)},t.prototype.registerBodyViewportResizeListener=function(e){this.comp.registerBodyViewportResizeListener(e)},t.prototype.setVerticalScrollPaddingVisible=function(e){var t=e?"scroll":"hidden";this.comp.setPinnedTopBottomOverflowY(t)},t.prototype.isVerticalScrollShowing=function(){var e=this.gridOptionsService.get("alwaysShowVerticalScroll"),t=e?Nc:null,i=this.gridOptionsService.isDomLayout("normal");return this.comp.setAlwaysVerticalScrollClass(t,e),e||i&&to(this.eBodyViewport)},t.prototype.setupRowAnimationCssClass=function(){var e=this,t=function(){var t=e.gridOptionsService.isAnimateRows()&&!e.rowContainerHeightService.isStretching(),i=t?Sc.ANIMATION_ON:Sc.ANIMATION_OFF;e.comp.setRowAnimationCssOnBodyViewport(i,t)};t(),this.addManagedListener(this.eventService,ht.EVENT_HEIGHT_SCALE_CHANGED,t),this.addManagedPropertyListener("animateRows",t)},t.prototype.getGridBodyElement=function(){return this.eGridBody},t.prototype.addBodyViewportListener=function(){var e=this.onBodyViewportContextMenu.bind(this);this.addManagedListener(this.eBodyViewport,"contextmenu",e),this.mockContextMenuForIPad(e),this.addManagedListener(this.eBodyViewport,"wheel",this.onBodyViewportWheel.bind(this)),this.addManagedListener(this.eStickyTop,"wheel",this.onStickyTopWheel.bind(this)),this.addFullWidthContainerWheelListener()},t.prototype.addFullWidthContainerWheelListener=function(){var e=this,t=this.eBodyViewport.querySelector(".ag-full-width-container"),i=this.eBodyViewport.querySelector(".ag-center-cols-viewport");t&&i&&this.addManagedListener(t,"wheel",(function(t){return e.onFullWidthContainerWheel(t,i)}))},t.prototype.onFullWidthContainerWheel=function(e,t){!e.deltaX||Math.abs(e.deltaY)>Math.abs(e.deltaX)||!this.mouseEventService.isEventFromThisGrid(e)||(e.preventDefault(),t.scrollBy({left:e.deltaX}))},t.prototype.onBodyViewportContextMenu=function(e,t,i){if(e||i){if(this.gridOptionsService.get("preventDefaultOnContextMenu")){var n=e||i;n.preventDefault()}var o=(e||t).target;if(o===this.eBodyViewport||o===this.ctrlsService.getCenterRowContainerCtrl().getViewportElement()){if(!this.contextMenuFactory)return;e?this.contextMenuFactory.onContextMenu(e,null,null,null,null,this.eGridBody):i&&this.contextMenuFactory.onContextMenu(null,i,null,null,null,this.eGridBody)}}},t.prototype.mockContextMenuForIPad=function(e){if(Ji()){var t=new Hs(this.eBodyViewport),i=function(t){e(void 0,t.touchStart,t.touchEvent)};this.addManagedListener(t,Hs.EVENT_LONG_TAP,i),this.addDestroyFunc((function(){return t.destroy()}))}},t.prototype.onBodyViewportWheel=function(e){this.gridOptionsService.get("suppressScrollWhenPopupsAreOpen")&&this.popupService.hasAnchoredPopup()&&e.preventDefault()},t.prototype.onStickyTopWheel=function(e){e.preventDefault(),e.offsetY&&this.scrollVertically(e.deltaY)},t.prototype.getGui=function(){return this.eGridBody},t.prototype.scrollVertically=function(e){var t=this.eBodyViewport.scrollTop;return this.bodyScrollFeature.setVerticalScrollPosition(t+e),this.eBodyViewport.scrollTop-t},t.prototype.addRowDragListener=function(){this.rowDragFeature=this.createManagedBean(new Ac(this.eBodyViewport)),this.dragAndDropService.addDropTarget(this.rowDragFeature)},t.prototype.getRowDragFeature=function(){return this.rowDragFeature},t.prototype.onPinnedRowDataChanged=function(){this.setFloatingHeights()},t.prototype.setFloatingHeights=function(){var e=this.pinnedRowModel,t=e.getPinnedTopTotalHeight();t&&(t+=1);var i=e.getPinnedBottomTotalHeight();i&&(i+=1),this.comp.setTopHeight(t),this.comp.setBottomHeight(i),this.comp.setTopDisplay(t?"inherit":"none"),this.comp.setBottomDisplay(i?"inherit":"none"),this.setStickyTopOffsetTop()},t.prototype.setStickyTopHeight=function(e){void 0===e&&(e=0),this.comp.setStickyTopHeight("".concat(e,"px")),this.stickyTopHeight=e},t.prototype.getStickyTopHeight=function(){return this.stickyTopHeight},t.prototype.setStickyTopWidth=function(e){if(e){var t=this.gridOptionsService.getScrollbarWidth();this.comp.setStickyTopWidth("calc(100% - ".concat(t,"px)"))}else this.comp.setStickyTopWidth("100%")}
11,t.prototype.onHeaderHeightChanged=function(){this.setStickyTopOffsetTop()},t.prototype.setStickyTopOffsetTop=function(){var e=this.ctrlsService.getGridHeaderCtrl(),t=e.getHeaderHeight()+this.filterManager.getHeaderHeight(),i=this.pinnedRowModel.getPinnedTopTotalHeight(),n=0;t>0&&(n+=t+1),i>0&&(n+=i+1),this.comp.setStickyTopTop("".concat(n,"px"))},t.prototype.sizeColumnsToFit=function(e,t){var i=this,n=this.isVerticalScrollShowing(),o=n?this.gridOptionsService.getScrollbarWidth():0,r=In(this.eGridBody),s=r-o;s>0?this.columnModel.sizeColumnsToFit(s,"sizeColumnsToFit",!1,e):void 0===t?window.setTimeout((function(){i.sizeColumnsToFit(e,100)}),0):100===t?window.setTimeout((function(){i.sizeColumnsToFit(e,500)}),100):500===t?window.setTimeout((function(){i.sizeColumnsToFit(e,-1)}),500):console.warn("AG Grid: tried to call sizeColumnsToFit() but the grid is coming back with zero width, maybe the grid is not visible yet on the screen?")},t.prototype.addScrollEventListener=function(e){this.eBodyViewport.addEventListener("scroll",e,{passive:!0})},t.prototype.removeScrollEventListener=function(e){this.eBodyViewport.removeEventListener("scroll",e)},Pc([de("animationFrameService")],t.prototype,"animationFrameService",void 0),Pc([de("rowContainerHeightService")],t.prototype,"rowContainerHeightService",void 0),Pc([de("ctrlsService")],t.prototype,"ctrlsService",void 0),Pc([de("columnModel")],t.prototype,"columnModel",void 0),Pc([de("scrollVisibleService")],t.prototype,"scrollVisibleService",void 0),Pc([pe("contextMenuFactory")],t.prototype,"contextMenuFactory",void 0),Pc([de("headerNavigationService")],t.prototype,"headerNavigationService",void 0),Pc([de("dragAndDropService")],t.prototype,"dragAndDropService",void 0),Pc([de("pinnedRowModel")],t.prototype,"pinnedRowModel",void 0),Pc([de("rowRenderer")],t.prototype,"rowRenderer",void 0),Pc([de("popupService")],t.prototype,"popupService",void 0),Pc([de("mouseEventService")],t.prototype,"mouseEventService",void 0),Pc([de("rowModel")],t.prototype,"rowModel",void 0),Pc([de("filterManager")],t.prototype,"filterManager",void 0),t}(st);(function(e){e[e["FILL"]=0]="FILL",e[e["RANGE"]=1]="RANGE"})(Mc||(Mc={})),function(e){e[e["VALUE"]=0]="VALUE",e[e["DIMENSION"]=1]="DIMENSION"}(kc||(kc={}));var Gc,Vc="ag-cell-range-selected",Bc="ag-cell-range-chart",jc="ag-cell-range-single-cell",Hc="ag-cell-range-chart-category",Wc="ag-cell-range-handle",Uc="ag-cell-range-top",zc="ag-cell-range-right",Kc="ag-cell-range-bottom",Yc="ag-cell-range-left",qc=function(){function e(e,t){this.beans=e,this.cellCtrl=t}return e.prototype.setComp=function(e,t){this.cellComp=e,this.eGui=t,this.onRangeSelectionChanged()},e.prototype.onRangeSelectionChanged=function(){this.cellComp&&(this.rangeCount=this.beans.rangeService.getCellRangeCount(this.cellCtrl.getCellPosition()),this.hasChartRange=this.getHasChartRange(),this.cellComp.addOrRemoveCssClass(Vc,0!==this.rangeCount),this.cellComp.addOrRemoveCssClass("".concat(Vc,"-1"),1===this.rangeCount),this.cellComp.addOrRemoveCssClass("".concat(Vc,"-2"),2===this.rangeCount),this.cellComp.addOrRemoveCssClass("".concat(Vc,"-3"),3===this.rangeCount),this.cellComp.addOrRemoveCssClass("".concat(Vc,"-4"),this.rangeCount>=4),this.cellComp.addOrRemoveCssClass(Bc,this.hasChartRange),Ni(this.eGui,this.rangeCount>0||void 0),this.cellComp.addOrRemoveCssClass(jc,this.isSingleCell()),this.updateRangeBorders(),this.refreshHandle())},e.prototype.updateRangeBorders=function(){var e=this.getRangeBorders(),t=this.isSingleCell(),i=!t&&e.top,n=!t&&e.right,o=!t&&e.bottom,r=!t&&e.left;this.cellComp.addOrRemoveCssClass(Uc,i),this.cellComp.addOrRemoveCssClass(zc,n),this.cellComp.addOrRemoveCssClass(Kc,o),this.cellComp.addOrRemoveCssClass(Yc,r)},e.prototype.isSingleCell=function(){var e=this.beans.rangeService;return 1===this.rangeCount&&e&&!e.isMoreThanOneCell()},e.prototype.getHasChartRange=function(){var e=this.beans.rangeService;if(!this.rangeCount||!e)return!1;var t=e.getCellRanges();return t.length>0&&t.every((function(e){return je([kc.DIMENSION,kc.VALUE],e.type)}))},e.prototype.updateRangeBordersIfRangeCount=function(){this.rangeCount>0&&(this.updateRangeBorders(),this.refreshHandle())},e.prototype.getRangeBorders=function(){var e,t,i=this,n=this.beans.gridOptionsService.get("enableRtl"),o=!1,r=!1,s=!1,a=!1,l=this.cellCtrl.getCellPosition().column,c=this.beans,u=c.rangeService,d=c.columnModel;n?(e=d.getDisplayedColAfter(l),t=d.getDisplayedColBefore(l)):(e=d.getDisplayedColBefore(l),t=d.getDisplayedColAfter(l));var p=u.getCellRanges().filter((function(e){return u.isCellInSpecificRange(i.cellCtrl.getCellPosition(),e)}));e||(a=!0),t||(r=!0);for(var h=0;h<p.length;h++){if(o&&r&&s&&a)break;var f=p[h],g=u.getRangeStartRow(f),v=u.getRangeEndRow(f);!o&&this.beans.rowPositionUtils.sameRow(g,this.cellCtrl.getCellPosition())&&(o=!0),!s&&this.beans.rowPositionUtils.sameRow(v,this.cellCtrl.getCellPosition())&&(s=!0),!a&&e&&f.columns.indexOf(e)<0&&(a=!0),!r&&t&&f.columns.indexOf(t)<0&&(r=!0)}return{top:o,right:r,bottom:s,left:a}},e.prototype.refreshHandle=function(){if(this.beans.rangeService){var e=this.shouldHaveSelectionHandle();this.selectionHandle&&!e&&(this.selectionHandle=this.beans.context.destroyBean(this.selectionHandle)),e&&this.addSelectionHandle(),this.cellComp.addOrRemoveCssClass(Wc,!!this.selectionHandle)}},e.prototype.shouldHaveSelectionHandle=function(){var e=this.beans,t=e.gridOptionsService,i=e.rangeService,n=i.getCellRanges(),o=n.length;if(this.rangeCount<1||o<1)return!1;var r=Ae(n),s=this.cellCtrl.getCellPosition(),a=t.get("enableFillHandle")&&!this.cellCtrl.isSuppressFillHandle(),l=t.get("enableRangeHandle"),c=1===o&&!this.cellCtrl.isEditing()&&(a||l);if(this.hasChartRange){var u=n[0].type===kc.DIMENSION,d=u&&i.isCellInSpecificRange(s,n[0]);this.cellComp.addOrRemoveCssClass(Hc,d),c=r.type===kc.VALUE}return c&&null!=r.endRow&&i.isContiguousRange(r)&&i.isBottomRightCell(r,s)},e.prototype.addSelectionHandle=function(){var e=this.beans,t=e.gridOptionsService,i=e.rangeService,n=Ae(i.getCellRanges()).type,o=t.get("enableFillHandle")&&r(n),s=o?Mc.FILL:Mc.RANGE;this.selectionHandle&&this.selectionHandle.getType()!==s&&(this.selectionHandle=this.beans.context.destroyBean(this.selectionHandle)),this.selectionHandle||(this.selectionHandle=this.beans.selectionHandleFactory.createSelectionHandle(s)),this.selectionHandle.refresh(this.cellCtrl)},e.prototype.destroy=function(){this.beans.context.destroyBean(this.selectionHandle)},e}(),Xc=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),$c=function(e){function t(t,i){var n=e.call(this)||this;return n.cellCtrl=t,n.beans=i,n.column=t.getColumn(),n.rowNode=t.getRowNode(),n.setupColSpan(),n.setupRowSpan(),n}return Xc(t,e),t.prototype.setupRowSpan=function(){var e=this;this.rowSpan=this.column.getRowSpan(this.rowNode),this.addManagedListener(this.beans.eventService,ht.EVENT_NEW_COLUMNS_LOADED,(function(){return e.onNewColumnsLoaded()}))},t.prototype.setComp=function(e){this.eGui=e,this.onLeftChanged(),this.onWidthChanged(),this.applyRowSpan()},t.prototype.onNewColumnsLoaded=function(){var e=this.column.getRowSpan(this.rowNode);this.rowSpan!==e&&(this.rowSpan=e,this.applyRowSpan(!0))},t.prototype.onDisplayColumnsChanged=function(){var e=this.getColSpanningList(
11);_e(this.colsSpanning,e)||(this.colsSpanning=e,this.onWidthChanged(),this.onLeftChanged())},t.prototype.setupColSpan=function(){null!=this.column.getColDef().colSpan&&(this.colsSpanning=this.getColSpanningList(),this.addManagedListener(this.beans.eventService,ht.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayColumnsChanged.bind(this)),this.addManagedListener(this.beans.eventService,ht.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onWidthChanged.bind(this)))},t.prototype.onWidthChanged=function(){if(this.eGui){var e=this.getCellWidth();this.eGui.style.width="".concat(e,"px")}},t.prototype.getCellWidth=function(){return this.colsSpanning?this.colsSpanning.reduce((function(e,t){return e+t.getActualWidth()}),0):this.column.getActualWidth()},t.prototype.getColSpanningList=function(){var e=this.column.getColSpan(this.rowNode),t=[];if(1===e)t.push(this.column);else for(var i=this.column,n=this.column.getPinned(),o=0;i&&o<e;o++){if(t.push(i),i=this.beans.columnModel.getDisplayedColAfter(i),!i||r(i))break;if(n!==i.getPinned())break}return t},t.prototype.onLeftChanged=function(){if(this.eGui){var e=this.modifyLeftForPrintLayout(this.getCellLeft());this.eGui.style.left=e+"px"}},t.prototype.getCellLeft=function(){var e;return e=this.beans.gridOptionsService.get("enableRtl")&&this.colsSpanning?Ae(this.colsSpanning):this.column,e.getLeft()},t.prototype.modifyLeftForPrintLayout=function(e){if(!this.cellCtrl.isPrintLayout()||"left"===this.column.getPinned())return e;var t=this.beans.columnModel.getDisplayedColumnsLeftWidth();if("right"===this.column.getPinned()){var i=this.beans.columnModel.getBodyContainerWidth();return t+i+(e||0)}return t+(e||0)},t.prototype.applyRowSpan=function(e){if(1!==this.rowSpan||e){var t=this.beans.gridOptionsService.getRowHeightAsNumber(),i=t*this.rowSpan;this.eGui.style.height="".concat(i,"px"),this.eGui.style.zIndex="1"}},t.prototype.destroy=function(){e.prototype.destroy.call(this)},t}(st),Zc=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Jc=function(e){function t(t,i){var n=e.call(this)||this;return n.staticClasses=[],n.cellCtrl=t,n.beans=i,n.column=t.getColumn(),n.rowNode=t.getRowNode(),n}return Zc(t,e),t.prototype.setComp=function(e){this.cellComp=e,this.applyUserStyles(),this.applyCellClassRules(),this.applyClassesFromColDef()},t.prototype.applyCellClassRules=function(){var e=this,t=this.column.getColDef(),i=t.cellClassRules,n={value:this.cellCtrl.getValue(),data:this.rowNode.data,node:this.rowNode,colDef:t,column:this.column,rowIndex:this.rowNode.rowIndex,api:this.beans.gridOptionsService.api,columnApi:this.beans.gridOptionsService.columnApi,context:this.beans.gridOptionsService.context};this.beans.stylingService.processClassRules(i===this.cellClassRules?void 0:this.cellClassRules,i,n,(function(t){return e.cellComp.addOrRemoveCssClass(t,!0)}),(function(t){return e.cellComp.addOrRemoveCssClass(t,!1)})),this.cellClassRules=i},t.prototype.applyUserStyles=function(){var e=this.column.getColDef();if(e.cellStyle){var t;if("function"===typeof e.cellStyle){var i={column:this.column,value:this.cellCtrl.getValue(),colDef:e,data:this.rowNode.data,node:this.rowNode,rowIndex:this.rowNode.rowIndex,api:this.beans.gridOptionsService.api,columnApi:this.beans.gridOptionsService.columnApi,context:this.beans.gridOptionsService.context},n=e.cellStyle;t=n(i)}else t=e.cellStyle;t&&this.cellComp.setUserStyles(t)}},t.prototype.applyClassesFromColDef=function(){var e=this,t=this.column.getColDef(),i={value:this.cellCtrl.getValue(),data:this.rowNode.data,node:this.rowNode,column:this.column,colDef:t,rowIndex:this.rowNode.rowIndex,api:this.beans.gridOptionsService.api,columnApi:this.beans.gridOptionsService.columnApi,context:this.beans.gridOptionsService.context};
11this.staticClasses.length&&this.staticClasses.forEach((function(t){return e.cellComp.addOrRemoveCssClass(t,!1)})),this.staticClasses=this.beans.stylingService.getStaticCellClasses(t,i),this.staticClasses.length&&this.staticClasses.forEach((function(t){return e.cellComp.addOrRemoveCssClass(t,!0)}))},t.prototype.destroy=function(){e.prototype.destroy.call(this)},t}(st),Qc=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),eu=function(e){function t(t,i){var n=e.call(this)||this;return n.ctrl=t,n.beans=i,n}return Qc(t,e),t.prototype.setComp=function(e){this.eGui=e,this.setupTooltip()},t.prototype.setBrowserTooltip=function(e){var t="title";null!=e&&""!=e?this.eGui.setAttribute(t,e):this.eGui.removeAttribute(t)},t.prototype.setupTooltip=function(){this.browserTooltips=this.beans.gridOptionsService.get("enableBrowserTooltips"),this.updateTooltipText(),this.browserTooltips?this.setBrowserTooltip(this.tooltip):this.createTooltipFeatureIfNeeded()},t.prototype.updateTooltipText=function(){this.tooltip=this.ctrl.getTooltipValue()},t.prototype.createTooltipFeatureIfNeeded=function(){var e,t,i,n,o=this;if(null==this.genericTooltipFeature){var r={getTooltipParams:function(){return o.getTooltipParams()},getGui:function(){return o.ctrl.getGui()}};this.genericTooltipFeature=this.createManagedBean(new er(r,null===(t=(e=this.ctrl).getTooltipShowDelayOverride)||void 0===t?void 0:t.call(e),null===(n=(i=this.ctrl).getTooltipHideDelayOverride)||void 0===n?void 0:n.call(i)),this.beans.context)}},t.prototype.refreshToolTip=function(){this.updateTooltipText(),this.browserTooltips&&this.setBrowserTooltip(this.tooltip)},t.prototype.getTooltipParams=function(){var e=this,t=this.ctrl,i=t.getColumn?t.getColumn():void 0,n=t.getColDef?t.getColDef():void 0,o=t.getRowNode?t.getRowNode():void 0;return{location:t.getLocation(),colDef:n,column:i,rowIndex:t.getRowIndex?t.getRowIndex():void 0,node:o,data:o?o.data:void 0,value:this.getTooltipText(),valueFormatted:t.getValueFormatted?t.getValueFormatted():void 0,hideTooltipCallback:function(){return e.genericTooltipFeature.hideTooltip(!0)}}},t.prototype.getTooltipText=function(){return this.tooltip},t.prototype.destroy=function(){e.prototype.destroy.call(this)},t}(st),tu=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},iu=function(){function e(){}return e.prototype.postConstruct=function(){this.gridOptionsService.isRowModelType("clientSide")&&(this.clientSideRowModel=this.rowModel),this.gridOptionsService.isRowModelType("serverSide")&&(this.serverSideRowModel=this.rowModel)},tu([de("resizeObserverService")],e.prototype,"resizeObserverService",void 0),tu([de("paginationProxy")],e.prototype,"paginationProxy",void 0),tu([de("context")],e.prototype,"context",void 0),tu([de("columnApi")],e.prototype,"columnApi",void 0),tu([de("gridApi")],e.prototype,"gridApi",void 0),tu([de("gridOptionsService")],e.prototype,"gridOptionsService",void 0),tu([de("expressionService")],e.prototype,"expressionService",void 0),tu([de("environment")],e.prototype,"environment",void 0),tu([de("rowRenderer")],e.prototype,"rowRenderer",void 0),tu([de("templateService")],e.prototype,"templateService",void 0),tu([de("valueService")],e.prototype,"valueService",void 0),tu([de("eventService")],e.prototype,"eventService",void 0),tu([de("columnModel")],e.prototype,"columnModel",void 0),tu([de("headerNavigationService")],e.prototype,"headerNavigationService",void 0),tu([de("navigationService")],e.prototype,"navigationService",void 0),tu([de("columnAnimationService")],e.prototype,"columnAnimationService",void 0),tu([pe("rangeService")],e.prototype,"rangeService",void 0),tu([de("focusService")],e.prototype,"focusService",void 0),tu([pe("contextMenuFactory")],e.prototype,"contextMenuFactory",void 0),tu([de("popupService")],e.prototype,"popupService",void 0),tu([de("valueFormatterService")],e.prototype,"valueFormatterService",void 0),tu([de("stylingService")],e.prototype,"stylingService",void 0),tu([de("columnHoverService")],e.prototype,"columnHoverService",void 0),tu([de("userComponentFactory")],e.prototype,"userComponentFactory",void 0),tu([de("userComponentRegistry")],e.prototype,"userComponentRegistry",void 0),tu([de("animationFrameService")],e.prototype,"animationFrameService",void 0),tu([de("dragService")],e.prototype,"dragService",void 0),tu([de("dragAndDropService")],e.prototype,"dragAndDropService",void 0),tu([de("sortController")],e.prototype,"sortController",void 0),tu([de("filterManager")],e.prototype,"filterManager",void 0),tu([de("rowContainerHeightService")],e.prototype,"rowContainerHeightService",void 0),tu([de("frameworkOverrides")],e.prototype,"frameworkOverrides",void 0),tu([de("cellPositionUtils")],e.prototype,"cellPositionUtils",void 0),tu([de("rowPositionUtils")],e.prototype,"rowPositionUtils",void 0),tu([de("selectionService")],e.prototype,"selectionService",void 0),tu([pe("selectionHandleFactory")],e.prototype,"selectionHandleFactory",void 0),tu([de("rowCssClassCalculator")],e.prototype,"rowCssClassCalculator",void 0),tu([de("rowModel")],e.prototype,"rowModel",void 0),tu([de("ctrlsService")],e.prototype,"ctrlsService",void 0),tu([de("ctrlsFactory")],e.prototype,"ctrlsFactory",void 0),tu([de("agStackComponentsRegistry")],e.prototype,"agStackComponentsRegistry",void 0),tu([de("valueCache")],e.prototype,"valueCache",void 0),tu([de("rowNodeEventThrottle")],e.prototype,"rowNodeEventThrottle",void 0),tu([de("localeService")],e.prototype,"localeService",void 0),tu([de("valueParserService")],e.prototype,"valueParserService",void 0),tu([de("syncService")],e.prototype,"syncService",void 0),tu([le],e.prototype,"postConstruct",null),e=tu([ue("beans")],e),e}(),nu=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}
11(),ou=function(e){function t(t,i,n){var o=e.call(this)||this;return o.cellCtrl=t,o.beans=i,o.column=n,o}return nu(t,e),t.prototype.onMouseEvent=function(e,t){if(!Ze(t))switch(e){case"click":this.onCellClicked(t);break;case"mousedown":case"touchstart":this.onMouseDown(t);break;case"dblclick":this.onCellDoubleClicked(t);break;case"mouseout":this.onMouseOut(t);break;case"mouseover":this.onMouseOver(t);break}},t.prototype.onCellClicked=function(e){if(this.isDoubleClickOnIPad())return this.onCellDoubleClicked(e),void e.preventDefault();var t=this.beans,i=t.eventService,n=t.rangeService,o=t.gridOptionsService,r=e.ctrlKey||e.metaKey;n&&r&&n.getCellRangeCount(this.cellCtrl.getCellPosition())>1&&n.intersectLastRange(!0);var s=this.cellCtrl.createEvent(e,ht.EVENT_CELL_CLICKED);i.dispatchEvent(s);var a=this.column.getColDef();a.onCellClicked&&window.setTimeout((function(){return a.onCellClicked(s)}),0);var l=(o.get("singleClickEdit")||a.singleClickEdit)&&!o.get("suppressClickEdit");!l||e.shiftKey&&0!=(null===n||void 0===n?void 0:n.getCellRanges().length)||this.cellCtrl.startRowOrCellEdit()},t.prototype.isDoubleClickOnIPad=function(){if(!Ji()||Je("dblclick"))return!1;var e=(new Date).getTime(),t=e-this.lastIPadMouseClickEvent<200;return this.lastIPadMouseClickEvent=e,t},t.prototype.onCellDoubleClicked=function(e){var t=this.column.getColDef(),i=this.cellCtrl.createEvent(e,ht.EVENT_CELL_DOUBLE_CLICKED);this.beans.eventService.dispatchEvent(i),"function"===typeof t.onCellDoubleClicked&&window.setTimeout((function(){return t.onCellDoubleClicked(i)}),0);var n=!this.beans.gridOptionsService.get("singleClickEdit")&&!this.beans.gridOptionsService.get("suppressClickEdit");n&&this.cellCtrl.startRowOrCellEdit(null,e)},t.prototype.onMouseDown=function(e){var t=e.ctrlKey,i=e.metaKey,n=e.shiftKey,o=e.target,r=this,s=r.cellCtrl,a=r.beans,l=a.eventService,c=a.rangeService,u=a.focusService;if(!this.isRightClickInExistingRange(e)){var d=c&&0!=c.getCellRanges().length;if(!n||!d){var p=Yi()&&!s.isEditing()&&!An(o);s.focusCell(p)}if(n&&d&&!u.isCellFocused(s.getCellPosition())){e.preventDefault();var h=u.getFocusedCell();if(h){var f=h.column,g=h.rowIndex,v=h.rowPinned,y=a.rowRenderer.getRowByPosition({rowIndex:g,rowPinned:v}),m=null===y||void 0===y?void 0:y.getCellCtrl(f);(null===m||void 0===m?void 0:m.isEditing())&&m.stopEditing(),u.setFocusedCell({column:f,rowIndex:g,rowPinned:v,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}}if(!this.containsWidget(o)){if(c){var C=this.cellCtrl.getCellPosition();if(n)c.extendLatestRangeToCell(C);else{var b=t||i;c.setRangeToCell(C,b)}}l.dispatchEvent(this.cellCtrl.createEvent(e,ht.EVENT_CELL_MOUSE_DOWN))}}},t.prototype.isRightClickInExistingRange=function(e){var t=this.beans.rangeService;if(t){var i=t.isCellInAnyRange(this.cellCtrl.getCellPosition()),n=2===e.button||e.ctrlKey&&this.beans.gridOptionsService.get("allowContextMenuWithControlKey");if(i&&n)return!0}return!1},t.prototype.containsWidget=function(e){return kn(e,"ag-selection-checkbox",3)},t.prototype.onMouseOut=function(e){if(!this.mouseStayingInsideCell(e)){var t=this.cellCtrl.createEvent(e,ht.EVENT_CELL_MOUSE_OUT);this.beans.eventService.dispatchEvent(t),this.beans.columnHoverService.clearMouseOver()}},t.prototype.onMouseOver=function(e){if(!this.mouseStayingInsideCell(e)){var t=this.cellCtrl.createEvent(e,ht.EVENT_CELL_MOUSE_OVER);this.beans.eventService.dispatchEvent(t),this.beans.columnHoverService.setMouseOver([this.column])}},t.prototype.mouseStayingInsideCell=function(e){if(!e.target||!e.relatedTarget)return!1;var t=this.cellCtrl.getGui(),i=t.contains(e.target),n=t.contains(e.relatedTarget);return i&&n},t.prototype.destroy=function(){},t}(iu),ru=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),su=function(e){function t(t,i,n,o,r){var s=e.call(this)||this;return s.cellCtrl=t,s.beans=i,s.rowNode=o,s.rowCtrl=r,s}return ru(t,e),t.prototype.setComp=function(e){this.eGui=e},t.prototype.onKeyDown=function(e){var t=e.key;
11switch(t){case xo.ENTER:this.onEnterKeyDown(e);break;case xo.F2:this.onF2KeyDown(e);break;case xo.ESCAPE:this.onEscapeKeyDown(e);break;case xo.TAB:this.onTabKeyDown(e);break;case xo.BACKSPACE:case xo.DELETE:this.onBackspaceOrDeleteKeyDown(t,e);break;case xo.DOWN:case xo.UP:case xo.RIGHT:case xo.LEFT:this.onNavigationKeyDown(e,t);break}},t.prototype.onNavigationKeyDown=function(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())},t.prototype.onShiftRangeSelect=function(e){if(this.beans.rangeService){var t=this.beans.rangeService.extendLatestRangeInDirection(e);t&&this.beans.navigationService.ensureCellVisible(t)}},t.prototype.onTabKeyDown=function(e){this.beans.navigationService.onTabKeyDown(this.cellCtrl,e)},t.prototype.onBackspaceOrDeleteKeyDown=function(e,t){var i=this,n=i.cellCtrl,o=i.beans,r=i.rowNode,s=o.gridOptionsService,a=o.rangeService,l=o.eventService;n.isEditing()||(l.dispatchEvent({type:ht.EVENT_KEY_SHORTCUT_CHANGED_CELL_START}),Lo(e,s.get("enableCellEditingOnBackspace"))?a&&s.get("enableRangeSelection")?a.clearCellRangeCellValues({dispatchWrapperEvents:!0,wrapperEventSource:"deleteKey"}):n.isCellEditable()&&r.setDataValue(n.getColumn(),null,"cellClear"):n.startRowOrCellEdit(e,t),l.dispatchEvent({type:ht.EVENT_KEY_SHORTCUT_CHANGED_CELL_END}))},t.prototype.onEnterKeyDown=function(e){if(this.cellCtrl.isEditing()||this.rowCtrl.isEditing())this.cellCtrl.stopEditingAndFocus(!1,e.shiftKey);else if(this.beans.gridOptionsService.get("enterNavigatesVertically")){var t=e.shiftKey?xo.UP:xo.DOWN;this.beans.navigationService.navigateToNextCell(null,t,this.cellCtrl.getCellPosition(),!1)}else this.cellCtrl.startRowOrCellEdit(xo.ENTER,e),this.cellCtrl.isEditing()&&e.preventDefault()},t.prototype.onF2KeyDown=function(e){this.cellCtrl.isEditing()||this.cellCtrl.startRowOrCellEdit(xo.F2,e)},t.prototype.onEscapeKeyDown=function(e){this.cellCtrl.isEditing()&&(this.cellCtrl.stopRowOrCellEdit(!0),this.cellCtrl.focusCell(!0))},t.prototype.processCharacter=function(e){var t=e.target,i=t!==this.eGui;if(!i&&!this.cellCtrl.isEditing()){var n=e.key;" "===n?this.onSpaceKeyDown(e):(this.cellCtrl.startRowOrCellEdit(n,e),e.preventDefault())}},t.prototype.onSpaceKeyDown=function(e){var t=this.beans.gridOptionsService;if(!this.cellCtrl.isEditing()&&t.isRowSelection()){var i=this.rowNode.isSelected(),n=!i;if(n||!t.get("suppressRowDeselection")){var o=this.beans.gridOptionsService.get("groupSelectsFiltered"),r=this.rowNode.setSelectedParams({newValue:n,rangeSelect:e.shiftKey,groupSelectsFiltered:o,event:e,source:"spaceKey"});void 0===i&&0===r&&this.rowNode.setSelectedParams({newValue:!1,rangeSelect:e.shiftKey,groupSelectsFiltered:o,event:e,source:"spaceKey"})}}e.preventDefault()},t.prototype.destroy=function(){e.prototype.destroy.call(this)},t}(st),au=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),lu=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},cu=function(e){function t(t,i,n){var o=e.call(this,'<div class="ag-drag-handle ag-row-drag" draggable="true"></div>')||this;return o.rowNode=t,o.column=i,o.eCell=n,o}return au(t,e),t.prototype.postConstruct=function(){var e=this.getGui();e.appendChild(So("rowDrag",this.gridOptionsService,null)),this.addGuiEventListener("mousedown",(function(e){e.stopPropagation()})),this.addDragSource(),this.checkVisibility()},t.prototype.addDragSource=function(){this.addGuiEventListener("dragstart",this.onDragStart.bind(this))},t.prototype.onDragStart=function(e){var t=this,i=this.column.getColDef().dndSourceOnRowDrag;e.dataTransfer.setDragImage(this.eCell,0,0);var n=function(){try{var i=JSON.stringify(t.rowNode.data);e.dataTransfer.setData("application/json",i),e.dataTransfer.setData("text/plain",i)}catch(n){}};if(i){var o={rowNode:this.rowNode,dragEvent:e,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context};i(o)}else n()},t.prototype.checkVisibility=function(){var e=this.column.isDndSource(this.rowNode);this.setDisplayed(e)},lu([le],t.prototype,"postConstruct",null),t}(rr),uu=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},du=function(e,t,i){if(i||2===arguments.length)for(var n,o=0,r=t.length;o<r;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},pu="ag-column-first",hu="ag-column-last",fu=function(){function e(){}return e.getHeaderClassesFromColDef=function(e,t,i,n){return r(e)?[]:this.getColumnClassesFromCollDef(e.headerClass,e,t,i,n)},e.getToolPanelClassesFromColDef=function(e,t,i,n){return r(e)?[]:this.getColumnClassesFromCollDef(e.toolPanelClass,e,t,i,n)},e.refreshFirstAndLastStyles=function(e,t,i){e.addOrRemoveCssClass(pu,i.isColumnAtEdge(t,"first")),e.addOrRemoveCssClass(hu,i.isColumnAtEdge(t,"last"))},e.getClassParams=function(e,t,i,n){return{colDef:e,column:i,columnGroup:n,api:t.api,columnApi:t.columnApi,context:t.context}},e.getColumnClassesFromCollDef=function(e,t,i,n,o){if(r(e))return[];var s;if("function"===typeof e){var a=this.getClassParams(t,i,n,o);s=e(a)}else s=e;return"string"===typeof s?[s]:Array.isArray(s)?du([],uu(s),!1):[]},e}(),gu=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),vu=function(){return vu=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},vu.apply(this,arguments)},yu="ag-cell",mu="ag-cell-auto-height",Cu="ag-cell-normal-height",bu="ag-cell-focus",wu="ag-cell-first-right-pinned",Su="ag-cell-last-left-pinned",Eu="ag-cell-not-inline-editing",xu="ag-column-hover",Ou="ag-cell-wrap-text",Tu=0,Du=function(e){function t(t,i,n,o){var r=e.call(this)||this;r.cellRangeFeature=null,r.cellPositionFeature=null,r.cellCustomStyleFeature=null,r.tooltipFeature=null,r.cellMouseListenerFeature=null,r.cellKeyboardListenerFeature=null,r.suppressRefreshCell=!1,r.onCellCompAttachedFuncs=[],r.column=t,r.rowNode=i,r.beans=n,r.rowCtrl=o,r.instanceId=t.getId()+"-"+Tu++;var s=r.column.getColDef();return r.colIdSanitised=Et(r.column.getId()),r.beans.gridOptionsService.get("suppressCellFocus")||(r.tabIndex=-1),r.isCellRenderer=null!=s.cellRenderer||null!=s.cellRendererSelector,r.createCellPosition(),r.addFeatures(),r.updateAndFormatValue(!1),r}return gu(t,e),t.prototype.shouldRestoreFocus=function(){return this.beans.focusService.shouldRestoreFocus(this.cellPosition)},t.prototype.addFeatures=function(){var e=this;this.cellPositionFeature=new $c(this,this.beans),this.addDestroyFunc((function(){var t;null===(t=e.cellPositionFeature)||void 0===t||t.destroy(),e.cellPositionFeature=null})),this.cellCustomStyleFeature=new Jc(this,this.beans),this.addDestroyFunc((function(){var t;null===(t=e.cellCustomStyleFeature)||void 0===t||t.destroy(),e.cellCustomStyleFeature=null})),this.cellMouseListenerFeature=new ou(this,this.beans,this.column),this.addDestroyFunc((function(){var t;null===(t=e.cellMouseListenerFeature)||void 0===t||t.destroy(),e.cellMouseListenerFeature=null})),this.cellKeyboardListenerFeature=new su(this,this.beans,this.column,this.rowNode,this.rowCtrl),this.addDestroyFunc((function(){var t;null===(t=e.cellKeyboardListenerFeature)||void 0===t||t.destroy(),e.cellKeyboardListenerFeature=null})),this.column.isTooltipEnabled()&&(this.enableTooltipFeature(),this.addDestroyFunc((function(){e.disableTooltipFeature()})));var t=this.beans.rangeService&&this.beans.gridOptionsService.get("enableRangeSelection");t&&(this.cellRangeFeature=new qc(this.beans,this),this.addDestroyFunc((function(){var t;null===(t=e.cellRangeFeature)||void 0===t||t.destroy(),e.cellRangeFeature=null})))},t.prototype.enableTooltipFeature=function(){var e=this,t=function(){var t=e.column.getColDef(),i=e.rowNode.data;if(t.tooltipField&&o(i))return M(i,t.tooltipField,e.column.isTooltipFieldContainsDots());var n=t.tooltipValueGetter;return n?n({location:"cell",api:e.beans.gridOptionsService.api,columnApi:e.beans.gridOptionsService.columnApi,context:e.beans.gridOptionsService.context,colDef:e.column.getColDef(),column:e.column,rowIndex:e.cellPosition.rowIndex,node:e.rowNode,data:e.rowNode.data,value:e.value,valueFormatted:e.valueFormatted}):null},i={getColumn:function(){return e.column},getColDef:function(){return e.column.getColDef()},getRowIndex:function(){return e.cellPosition.rowIndex},getRowNode:function(){return e.rowNode},getGui:function(){return e.getGui()},getLocation:function(){return"cell"},getTooltipValue:t,getValueFormatted:function(){return e.valueFormatted}};this.tooltipFeature=new eu(i,this.beans)},t.prototype.disableTooltipFeature=function(){this.tooltipFeature&&(this.tooltipFeature.destroy(),this.tooltipFeature=null)},t.prototype.setComp=function(e,t,i,n,o){var r,s,a,l;this.cellComp=e,this.eGui=t,this.printLayout=n,this.addDomData(),this.onCellFocused(this.focusEventToRestore),this.applyStaticCssClasse
11s(),this.setWrapText(),this.onFirstRightPinnedChanged(),this.onLastLeftPinnedChanged(),this.onColumnHover(),this.setupControlComps(),this.setupAutoHeight(i),this.refreshFirstAndLastStyles(),this.refreshAriaColIndex(),null===(r=this.cellPositionFeature)||void 0===r||r.setComp(t),null===(s=this.cellCustomStyleFeature)||void 0===s||s.setComp(e),null===(a=this.tooltipFeature)||void 0===a||a.setComp(t),null===(l=this.cellKeyboardListenerFeature)||void 0===l||l.setComp(this.eGui),this.cellRangeFeature&&this.cellRangeFeature.setComp(e,t),o&&this.isCellEditable()?this.startEditing():this.showValue(),this.onCellCompAttachedFuncs.length&&(this.onCellCompAttachedFuncs.forEach((function(e){return e()})),this.onCellCompAttachedFuncs=[])},t.prototype.setupAutoHeight=function(e){var t=this;if(this.isAutoHeight=this.column.isAutoHeight(),this.isAutoHeight&&e){var i=e.parentElement,n=this.beans.gridOptionsService.getRowHeightForNode(this.rowNode).height,o=function(r){if(!t.editing&&t.isAlive()){var s=Nn(i),a=s.paddingTop,l=s.paddingBottom,c=s.borderBottomWidth,u=s.borderTopWidth,d=a+l+c+u,p=e.offsetHeight,h=p+d;if(r<5){var f=t.beans.gridOptionsService.getDocument(),g=!f||!f.contains(e),v=0==h;if(g||v)return void t.beans.frameworkOverrides.setTimeout((function(){return o(r+1)}),0)}var y=Math.max(h,n);t.rowNode.setRowAutoHeight(y,t.column)}},r=function(){return o(0)};r();var s=this.beans.resizeObserverService.observeResize(e,r);this.addDestroyFunc((function(){s(),t.rowNode.setRowAutoHeight(void 0,t.column)}))}},t.prototype.getCellAriaRole=function(){var e;return null!==(e=this.column.getColDef().cellAriaRole)&&void 0!==e?e:"gridcell"},t.prototype.getInstanceId=function(){return this.instanceId},t.prototype.getIncludeSelection=function(){return this.includeSelection},t.prototype.getIncludeRowDrag=function(){return this.includeRowDrag},t.prototype.getIncludeDndSource=function(){return this.includeDndSource},t.prototype.getColumnIdSanitised=function(){return this.colIdSanitised},t.prototype.getTabIndex=function(){return this.tabIndex},t.prototype.getIsCellRenderer=function(){return this.isCellRenderer},t.prototype.getValueToDisplay=function(){return null!=this.valueFormatted?this.valueFormatted:this.value},t.prototype.showValue=function(e){void 0===e&&(e=!1);var t,i=this.getValueToDisplay();if(this.isCellRenderer){var n=this.createCellRendererParams();t=this.beans.userComponentFactory.getCellRendererDetails(this.column.getColDef(),n)}this.cellComp.setRenderDetails(t,i,e),this.refreshHandle()},t.prototype.setupControlComps=function(){var e=this.column.getColDef();this.includeSelection=this.isIncludeControl(e.checkboxSelection),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)},t.prototype.isForceWrapper=function(){var e=this.beans.gridOptionsService.get("enableCellTextSelection")||this.column.isAutoHeight();return e},t.prototype.isIncludeControl=function(e){var t=null!=this.rowNode.rowPinned,i="function"===typeof e,n=!t&&(i||!0===e);return n},t.prototype.refreshShouldDestroy=function(){var e=this.column.getColDef(),t=this.includeSelection!=this.isIncludeControl(e.checkboxSelection),i=this.includeRowDrag!=this.isIncludeControl(e.rowDrag),n=this.includeDndSource!=this.isIncludeControl(e.dndSource);return t||i||n},t.prototype.startEditing=function(e,t,i){var n=this;if(void 0===e&&(e=null),void 0===t&&(t=!1),void 0===i&&(i=null),this.isCellEditable()&&!this.editing)if(this.cellComp){var o=this.createCellEditorParams(e,t),r=this.column.getColDef(),s=this.beans.userComponentFactory.getCellEditorDetails(r,o),a=null!=(null===s||void 0===s?void 0:s.popupFromSelector)?s.popupFromSelector:!!r.cellEditorPopup,l=null!=(null===s||void 0===s?void 0:s.popupPositionFromSelector)?s.popupPositionFromSelector:r.cellEditorPopupPosition;this.setEditing(!0),this.cellComp.setEditDetails(s,a,l);var c=this.createEvent(i,ht.EVENT_CELL_EDITING_STARTED);this.beans.eventService.dispatchEvent(c)}else this.onCellCompAttachedFuncs.push((function(){n.startEditing(e,t,i)}))},t.prototype.setEditing=function(e){this.editing!==e&&(this.editing=e,this.refreshHandle())},t.prototype.stopRowOrCellEdit=function(e){void 0===e&&(e=!1),"fullRow"===this.beans.gridOptionsService.get("editType")?this.rowCtrl.stopRowEditing(e):this.stopEditing(e)},t.prototype.onPopupEditorClosed=function(){this.isEditing()&&this.stopEditingAndFocus()},t.prototype.takeValueFromCellEditor=function(e){var t={newValueE
11xists:!1};if(e)return t;var i=this.cellComp.getCellEditor();if(!i)return t;var n=i.isCancelAfterEnd&&i.isCancelAfterEnd();if(n)return t;var o=i.getValue();return{newValue:o,newValueExists:!0}},t.prototype.saveNewValue=function(e,t){if(t===e)return!1;this.suppressRefreshCell=!0;var i=this.rowNode.setDataValue(this.column,t,"edit");return this.suppressRefreshCell=!1,i},t.prototype.stopEditing=function(e){if(void 0===e&&(e=!1),!this.editing)return!1;var t=this.takeValueFromCellEditor(e),i=t.newValue,n=t.newValueExists,o=this.rowNode.getValueFromValueService(this.column),r=!1;return n&&(r=this.saveNewValue(o,i)),this.setEditing(!1),this.cellComp.setEditDetails(),this.updateAndFormatValue(!1),this.refreshCell({forceRefresh:!0,suppressFlash:!0}),this.dispatchEditingStoppedEvent(o,i,!e&&!!r),r},t.prototype.dispatchEditingStoppedEvent=function(e,t,i){var n=vu(vu({},this.createEvent(null,ht.EVENT_CELL_EDITING_STOPPED)),{oldValue:e,newValue:t,valueChanged:i});this.beans.eventService.dispatchEvent(n)},t.prototype.createCellEditorParams=function(e,t){return{value:this.rowNode.getValueFromValueService(this.column),eventKey:e,column:this.column,colDef:this.column.getColDef(),rowIndex:this.getCellPosition().rowIndex,node:this.rowNode,data:this.rowNode.data,api:this.beans.gridOptionsService.api,cellStartedEdit:t,columnApi:this.beans.gridOptionsService.columnApi,context:this.beans.gridOptionsService.context,onKeyDown:this.onKeyDown.bind(this),stopEditing:this.stopEditingAndFocus.bind(this),eGridCell:this.getGui(),parseValue:this.parseValue.bind(this),formatValue:this.formatValue.bind(this)}},t.prototype.createCellRendererParams=function(){var e=this,t={value:this.value,valueFormatted:this.valueFormatted,getValue:function(){return e.rowNode.getValueFromValueService(e.column)},setValue:function(t){return e.beans.valueService.setValue(e.rowNode,e.column,t)},formatValue:this.formatValue.bind(this),data:this.rowNode.data,node:this.rowNode,pinned:this.column.getPinned(),colDef:this.column.getColDef(),column:this.column,rowIndex:this.getCellPosition().rowIndex,api:this.beans.gridOptionsService.api,columnApi:this.beans.gridOptionsService.columnApi,context:this.beans.gridOptionsService.context,refreshCell:this.refreshCell.bind(this),eGridCell:this.getGui(),eParentOfValue:this.cellComp.getParentOfValue(),registerRowDragger:function(t,i,n,o){return e.registerRowDragger(t,i,o)}};return t},t.prototype.parseValue=function(e){return this.beans.valueParserService.parseValue(this.column,this.rowNode,e,this.getValue())},t.prototype.setFocusOutOnEditor=function(){if(this.editing){var e=this.cellComp.getCellEditor();e&&e.focusOut&&e.focusOut()}},t.prototype.setFocusInOnEditor=function(){if(this.editing){var e=this.cellComp.getCellEditor();e&&e.focusIn?e.focusIn():this.focusCell(!0)}},t.prototype.onCellChanged=function(e){var t=e.column===this.column;t&&this.refreshCell({})},t.prototype.refreshOrDestroyCell=function(e){var t;this.refreshShouldDestroy()?null===(t=this.rowCtrl)||void 0===t||t.refreshCell(this):this.refreshCell(e)},t.prototype.refreshCell=function(e){var t,i,n;if(!this.suppressRefreshCell&&!this.editing){var o=this.column.getColDef(),r=null!=e&&!!e.newData,s=null!=e&&!!e.suppressFlash||!!o.suppressCellFlash,a=null==o.field&&null==o.valueGetter&&null==o.showRowGroup,l=e&&e.forceRefresh||a||r,c=!!this.cellComp,u=this.updateAndFormatValue(c),d=l||u;if(c){if(d){this.showValue(r);var p=this.beans.filterManager.isSuppressFlashingCellsBecauseFiltering(),h=!s&&!p&&(this.beans.gridOptionsService.get("enableCellChangeFlash")||o.enableCellChangeFlash);h&&this.flashCell(),null===(t=this.cellCustomStyleFeature)||void 0===t||t.applyUserStyles(),null===(i=this.cellCustomStyleFeature)||void 0===i||i.applyClassesFromColDef()}this.refreshToolTip(),null===(n=this.cellCustomStyleFeature)||void 0===n||n.applyCellClassRules()}}},t.prototype.stopEditingAndFocus=function(e,t){void 0===e&&(e=!1),void 0===t&&(t=!1),this.stopRowOrCellEdit(),this.focusCell(!0),e||this.navigateAfterEdit(t)},t.prototype.navigateAfterEdit=function(e){var t=this.beans.gridOptionsService.get("enterNavigatesVerticallyAfterEdit");if(t){var i=e?xo.UP:xo.DOWN;this.beans.navigationService.navigateToNextCell(null,i,this.getCellPosition(),!1)}},t.prototype.flashCell=function(e){var t=e&&e.flashDelay,i=e&&e.fadeDelay;this.animateCell("data-changed",t,i)},t.prototype.animateCell=function(e,t,i){var n=this;if(this.cellComp){var r="ag-cell-".concat(e),s="ag-cell-".concat(e,"-animation"),a=this.beans.gridOptionsService;t||(t=a.get("cellFlashDelay")),o(i)||(i=a.get("cellFadeDelay")),this.cellComp.addOrRemoveCssClass(r,!0),this.cellComp.addOrRemoveCssClass(s,!1),window.setTimeout((function(){n.isAlive()&&(n.cellComp.addOrRemoveCssClass(r,!1),n.cellComp.addOrRemoveCssClass(s,!0),n.eGui.style.transition="background-color ".concat(i,"ms"),window.setTimeout((function(){n.isAlive()&&(n.cellComp.addOrRemoveCssClass(s,!1),n.eGui.style.transition="")}),i))}),t)}},t.prototype.onFlashCells=function(e){if(this.cellComp){var t=this.beans.cellPositionUtils.createId(this.getCellPosition()),i=e.cells[t];i&&this.animateCell("highlight")}},t.prototype.isCellEditable=function(){return this.column.isCellEditable(this.rowNode)},t.prototype.isSuppressFillHandle=function(){return this.column.isSuppressFillHandle()},t.prototype.formatValue=function(e){var t;return null!==(t=this.callValueFormatter(e))&&void 0!==t?t:e},t.prototype.callValueFormatter=function(e){return this.beans.valueFormatterService.formatValue(this.column,this.rowNode,e)},t.prototype.updateAndFormatValue=function(e){var t=this.value,i=this.valueFormatted;return this.value=this.rowNode.getValueFromValueService(this.column),this.valueFormatted=this.callValueFormatter(this.value),!e||(!this.valuesAreEqual(t,this.value)||this.valueFormatted!=i)},t.prototype.valuesAreEqual=function(e,t){var i=this.column.getColDef();return i.equals?i.equals(e,t):e===t},t.prototype.getComp=function(){return this.cellComp},t.prototype.getValue=function(){return this.value},t.prototype.getValueFormatted=function(){return this.valueFormatted},t.prototype.addDomData=function(){var e=this,i=this.getGui();this.beans.gridOptionsService.setDomData(i,t.DOM_DATA_KEY_CELL_CTRL,this),this.addDestroyFunc((function(){return e.beans.gridOptionsService.setDomData(i,t.DOM_DATA_KEY_CELL_CTRL,null)}))},t.prototype.createEvent=function(e,t){var i={type:t,node:this.rowNode,data:this.rowNode.data,value:this.value,column:this.column,colDef:this.column.getColDef(),context:this.beans.gridOptionsService.context,api:this.beans.gridApi,columnApi:this.beans.columnApi,rowPinned:this.rowNode.rowPinned,event:e,rowIndex:this.rowNode.rowIndex};return i},t.prototype.processCharacter=function(e){var t;null===(t=this.cellKeyboardListenerFeature)||void 0===t||t.processCharacter(e)},t.prototype.onKeyDown=function(e){var t;null===(t=this.cellKeyboardListenerFeature)||void 0===t||t.onKeyDown(e)},t.prototype.onMouseEvent=function(e,t){var i;null===(i=this.cellMouseListenerFeature)||void 0===i||i.onMouseEvent(e,t)},t.prototype.getGui=function(){return this.eGui},t.prototype.refreshToolTip=function(){var e;null===(e=this.tooltipFeature)||void 0===e||e.refreshToolTip()},t.prototype.getColSpanningList=function(){return this.cellPositionFeature.getColSpanningList(
11)},t.prototype.onLeftChanged=function(){var e;this.cellComp&&(null===(e=this.cellPositionFeature)||void 0===e||e.onLeftChanged())},t.prototype.onDisplayedColumnsChanged=function(){this.eGui&&(this.refreshAriaColIndex(),this.refreshFirstAndLastStyles())},t.prototype.refreshFirstAndLastStyles=function(){var e=this,t=e.cellComp,i=e.column,n=e.beans;fu.refreshFirstAndLastStyles(t,i,n.columnModel)},t.prototype.refreshAriaColIndex=function(){var e=this.beans.columnModel.getAriaColumnIndex(this.column);_i(this.getGui(),e)},t.prototype.isSuppressNavigable=function(){return this.column.isSuppressNavigable(this.rowNode)},t.prototype.onWidthChanged=function(){var e;return null===(e=this.cellPositionFeature)||void 0===e?void 0:e.onWidthChanged()},t.prototype.getColumn=function(){return this.column},t.prototype.getRowNode=function(){return this.rowNode},t.prototype.getBeans=function(){return this.beans},t.prototype.isPrintLayout=function(){return this.printLayout},t.prototype.appendChild=function(e){this.eGui.appendChild(e)},t.prototype.refreshHandle=function(){this.cellRangeFeature&&this.cellRangeFeature.refreshHandle()},t.prototype.getCellPosition=function(){return this.cellPosition},t.prototype.isEditing=function(){return this.editing},t.prototype.startRowOrCellEdit=function(e,t){void 0===t&&(t=null),this.cellComp&&("fullRow"===this.beans.gridOptionsService.get("editType")?this.rowCtrl.startRowEditing(e,this):this.startEditing(e,!0,t))},t.prototype.getRowCtrl=function(){return this.rowCtrl},t.prototype.getRowPosition=function(){return{rowIndex:this.cellPosition.rowIndex,rowPinned:this.cellPosition.rowPinned}},t.prototype.updateRangeBordersIfRangeCount=function(){this.cellComp&&this.cellRangeFeature&&this.cellRangeFeature.updateRangeBordersIfRangeCount()},t.prototype.onRangeSelectionChanged=function(){this.cellComp&&this.cellRangeFeature&&this.cellRangeFeature.onRangeSelectionChanged()},t.prototype.isRangeSelectionEnabled=function(){return null!=this.cellRangeFeature},t.prototype.focusCell=function(e){void 0===e&&(e=!1),this.beans.focusService.setFocusedCell({rowIndex:this.getCellPosition().rowIndex,column:this.column,rowPinned:this.rowNode.rowPinned,forceBrowserFocus:e})},t.prototype.onRowIndexChanged=function(){this.createCellPosition(),this.onCellFocused(),this.cellRangeFeature&&this.cellRangeFeature.onRangeSelectionChanged()},t.prototype.onFirstRightPinnedChanged=function(){if(this.cellComp){var e=this.column.isFirstRightPinned();this.cellComp.addOrRemoveCssClass(wu,e)}},t.prototype.onLastLeftPinnedChanged=function(){if(this.cellComp){var e=this.column.isLastLeftPinned();this.cellComp.addOrRemoveCssClass(Su,e)}},t.prototype.onCellFocused=function(e){if(!this.beans.gridOptionsService.get("suppressCellFocus")){var t=this.beans.focusService.isCellFocused(this.cellPosition);if(this.cellComp){if(this.focusEventToRestore=void 0,this.cellComp.addOrRemoveCssClass(bu,t),t&&e&&e.forceBrowserFocus){var i=this.cellComp.getFocusableElement();i.focus({preventScroll:!!e.preventScrollOnBrowserFocus})}var n="fullRow"===this.beans.gridOptionsService.get("editType");t||n||!this.editing||this.stopRowOrCellEdit()}else t&&(null===e||void 0===e?void 0:e.forceBrowserFocus)&&(this.focusEventToRestore=e)}},t.prototype.createCellPosition=function(){this.cellPosition={rowIndex:this.rowNode.rowIndex,rowPinned:n(this.rowNode.rowPinned),column:this.column}},t.prototype.applyStaticCssClasses=function(){this.cellComp.addOrRemoveCssClass(yu,!0),this.cellComp.addOrRemoveCssClass(Eu,!0);var e=1==this.column.isAutoHeight();this.cellComp.addOrRemoveCssClass(mu,e),this.cellComp.addOrRemoveCssClass(Cu,!e)},t.prototype.onColumnHover=function(){if(this.cellComp&&this.beans.gridOptionsService.get("columnHoverHighlight")){var e=this.beans.columnHoverService.isHovered(this.column);this.cellComp.addOrRemoveCssClass(xu,e)}},t.prototype.onColDefChanged=function(){var e,t;if(this.cellComp){var i=this.column.isAutoHeight();i!==this.isAutoHeight&&(null===(e=this.rowCtrl)||void 0===e||e.refreshCell(this));var n=this.column.isTooltipEnabled();n?(this.disableTooltipFeature(),this.enableTooltipFeature(),null===(t=this.tooltipFeature)||void 0===t||t.setComp(this.eGui)):this.disableTooltipFeature(),this.setWrapText(),this.editing||this.refreshOrDestroyCell({forceRefresh:!0,suppressFlash:!0})}},t.prototype.setWrapText=function(){var e=1==this.column.getColDef().wrapText;this.cellComp.addOrRemoveCssClass(Ou,e)},t.prototype.dispatchCellContextMenuEvent=function(e){var t=this.column.getColDef(),i=this.createEvent(e,ht.EVENT_CELL_CONTEXT_MENU);this.beans.eventService.dispatchEvent(i),t.onCellContextMenu&&window.setTimeout((function(){return t.onCellContextMenu(i)}),0)},t.prototype.getCellRenderer=function(){return this.cellComp?this.cellComp.getCellRenderer():null},t.prototype.getCellEditor=function(){return this.cellComp?this.cellComp.getCellEditor():null},t.prototype.destroy=function(){this.onCellCompAttachedFuncs=[],e.prototype.destroy.call(this)},t.prototype.createSelectionCheckbox=function(){var e=new Oa;return this.beans.context.createBean(e),e.init({rowNode:this.rowNode,column:this.column}),e},t.prototype.createDndSource=function(){var e=new cu(this.rowNode,this.column,this.eGui);return this.beans.context.createBean(e),e},t.prototype.registerRowDragger=function(e,t,i){var n=this;if(this.customRowDragComp)this.customRowDragComp.setDragElement(e,t);else{var o=this.createRowDragComp(e,t,i);o&&(this.customRowDragComp=o,this.addDestroyFunc((function(){n.beans.context.destroyBean(o),n.customRowDragComp=null})))}},t.prototype.createRowDragComp=function(e,t,i){var n=this,o=this.beans.gridOptionsService.get("pagination"),r=this.beans.gridOptionsService.get("rowDragManaged"),s=this.beans.gridOptionsService.isRowModelType("clientSide");if(r){if(!s)return void G("managed row dragging is only allowed in the Client Side Row Model");if(o)return void G("managed row dragging is not possible when doing pagination")}var a=new Na((function(){return n.value}),this.rowNode,this.column,e,t,i);return this.beans.context.createBean(a),a},t.DOM_DATA_KEY_CELL_CTRL="cellCtrl",t}(st),Ru=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Au=function(e){var t="function"===typeof Symbol&&Symbol.iterator,i=t&&e[t],n=0;if(i)return i.call(e);
11if(e&&"number"===typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},_u=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},Pu=function(e,t,i){if(i||2===arguments.length)for(var n,o=0,r=t.length;o<r;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))};(function(e){e["Normal"]="Normal",e["FullWidth"]="FullWidth",e["FullWidthLoading"]="FullWidthLoading",e["FullWidthGroup"]="FullWidthGroup",e["FullWidthDetail"]="FullWidthDetail"})(Gc||(Gc={}));var Mu,ku,Nu=0,Lu=function(e){function t(t,i,n,o,r){var s=e.call(this)||this;return s.allRowGuis=[],s.active=!0,s.centerCellCtrls={list:[],map:{}},s.leftCellCtrls={list:[],map:{}},s.rightCellCtrls={list:[],map:{}},s.slideInAnimation={left:!1,center:!1,right:!1,fullWidth:!1},s.fadeInAnimation={left:!1,center:!1,right:!1,fullWidth:!1},s.rowDragComps=[],s.lastMouseDownOnDragger=!1,s.emptyStyle={},s.updateColumnListsPending=!1,s.rowId=null,s.businessKeySanitised=null,s.beans=i,s.gridOptionsService=i.gridOptionsService,s.rowNode=t,s.paginationPage=i.paginationProxy.getCurrentPage(),s.useAnimationFrameForCreate=o,s.printLayout=r,s.instanceId=t.id+"-"+Nu++,s.rowId=Et(t.id),s.initRowBusinessKey(),s.rowFocused=i.focusService.isRowFocused(s.rowNode.rowIndex,s.rowNode.rowPinned),s.rowLevel=i.rowCssClassCalculator.calculateRowLevel(s.rowNode),s.setRowType(),s.setAnimateFlags(n),s.rowStyles=s.processStylesFromGridOptions(),s.isFullWidth()&&!s.gridOptionsService.get("suppressCellFocus")&&(s.tabIndex=-1),s.addListeners(),s}return Ru(t,e),t.prototype.initRowBusinessKey=function(){this.businessKeyForNodeFunc=this.gridOptionsService.get("getBusinessKeyForNode"),this.updateRowBusinessKey()},t.prototype.updateRowBusinessKey=function(){if("function"===typeof this.businessKeyForNodeFunc){var e=this.businessKeyForNodeFunc(this.rowNode);this.businessKeySanitised=Et(e)}},t.prototype.getRowId=function(){return this.rowId},t.prototype.getRowStyles=function(){return this.rowStyles},t.prototype.getTabIndex=function(){return this.tabIndex},t.prototype.isSticky=function(){return this.rowNode.sticky},t.prototype.getBeans=function(){return this.beans},t.prototype.getInstanceId=function(){return this.instanceId},t.prototype.setComp=function(e,t,i){var n={rowComp:e,element:t,containerType:i};this.allRowGuis.push(n),i===ku.LEFT?this.leftGui=n:i===ku.RIGHT?this.rightGui=n:i===ku.FULL_WIDTH?this.fullWidthGui=n:this.centerGui=n,this.initialiseRowComp(n),"FullWidthLoading"===this.rowType||this.rowNode.rowPinned||this.beans.rowRenderer.dispatchFirstDataRenderedEvent()},t.prototype.unsetComp=function(e){switch(this.allRowGuis=this.allRowGuis.filter((function(t){return t.containerType!==e})),e){case ku.LEFT:this.leftGui=void 0;break;case ku.RIGHT:this.rightGui=void 0;break;case ku.FULL_WIDTH:this.fullWidthGui=void 0;break;case ku.CENTER:this.centerGui=void 0;break}},t.prototype.isCacheable=function(){return this.rowType===Gc.FullWidthDetail&&this.gridOptionsService.get("keepDetailRows")},t.prototype.setCached=function(e){var t=e?"none":"";this.allRowGuis.forEach((function(e){return e.element.style.display=t}))},t.prototype.initialiseRowComp=function(e){var i=this,n=this.gridOptionsService;this.listenOnDomOrder(e),this.beans.columnModel.wasAutoRowHeightEverActive()&&this.rowNode.checkAutoHeights(),this.onRowHeightChanged(e),this.updateRowIndexes(e),this.setFocusedClasses(e),this.setStylesFromGridOptions(!1,e),n.isRowSelection()&&this.rowNode.selectable&&this.onRowSelected(e),this.updateColumnLists(!this.useAnimationFrameForCreate);var o=e.rowComp,r=this.getInitialRowClasses(e.containerType);r.forEach((function(e){return o.addOrRemoveCssClass(e,!0)})),this.executeSlideAndFadeAnimations(e),this.rowNode.group&&Si(e.element,1==this.rowNode.expanded),this.setRowCompRowId(o),this.setRowCompRowBusinessKey(o),n.setDomData(e.element,t.DOM_DATA_KEY_ROW_CTRL,this),this.addDestroyFunc((function(){return n.setDomData(e.element,t.DOM_DATA_KEY_ROW_CTRL,null)})),this.useAnimationFrameForCreate?this.beans.animationFrameService.createTask(this.addHoverFunctionality.bind(this,e.element),this.rowNode.rowIndex,"createTasksP2"):this.addHoverFunctionality(e.element),this.isFullWidth()&&this.setupFullWidth(e),n.get("rowDragEntireRow")&&this.addRowDraggerToRow(e),this.useAnimationFrameForCreate&&this.beans.animationFrameService.addDestroyTask((function(){i.isAlive()&&e.rowComp.addOrRemoveCssClass("ag-after-created",!0)})),this.executeProcessRowPostCreateFunc()},t.prototype.setRowCompRowBusinessKey=function(e){null!=this.businessKeySanitised&&e.setRowBusinessKey(this.businessKeySanitised)},t.prototype.getBusinessKey=function(){return this.businessKeySanitised},t.prototype.setRowCompRowId=function(e){this.rowId=Et(this.rowNode.id),null!=this.rowId&&e.setRowId(this.rowId)},t.prototype.executeSlideAndFadeAnimations=function(e){var t=this,i=e.containerType,n=this.slideInAnimation[i];n&&(z((function(){t.onTopChanged()})),this.slideInAnimation[i]=!1);var o=this.fadeInAnimation[i];
11o&&(z((function(){e.rowComp.addOrRemoveCssClass("ag-opacity-zero",!1)})),this.fadeInAnimation[i]=!1)},t.prototype.addRowDraggerToRow=function(e){if(this.gridOptionsService.get("enableRangeSelection"))G("Setting `rowDragEntireRow: true` in the gridOptions doesn't work with `enableRangeSelection: true`");else{var t=this.beans.localeService.getLocaleTextFunc(),i=new Na((function(){return"1 ".concat(t("rowDragRow","row"))}),this.rowNode,void 0,e.element,void 0,!0),n=this.createBean(i,this.beans.context);this.rowDragComps.push(n)}},t.prototype.setupFullWidth=function(e){var t=this.getPinnedForContainer(e.containerType),i=this.createFullWidthParams(e.element,t);if(this.rowType!=Gc.FullWidthDetail||ne.__assertRegistered(J.MasterDetailModule,"cell renderer 'agDetailCellRenderer' (for master detail)",this.beans.context.getGridId())){var n;switch(this.rowType){case Gc.FullWidthDetail:n=this.beans.userComponentFactory.getFullWidthDetailCellRendererDetails(i);break;case Gc.FullWidthGroup:n=this.beans.userComponentFactory.getFullWidthGroupCellRendererDetails(i);break;case Gc.FullWidthLoading:n=this.beans.userComponentFactory.getFullWidthLoadingCellRendererDetails(i);break;default:n=this.beans.userComponentFactory.getFullWidthCellRendererDetails(i);break}e.rowComp.showFullWidth(n)}},t.prototype.isPrintLayout=function(){return this.printLayout},t.prototype.getFullWidthCellRenderer=function(){var e,t;return null===(t=null===(e=this.fullWidthGui)||void 0===e?void 0:e.rowComp)||void 0===t?void 0:t.getFullWidthCellRenderer()},t.prototype.getCellElement=function(e){var t=this.getCellCtrl(e);return t?t.getGui():null},t.prototype.executeProcessRowPostCreateFunc=function(){var e=this.gridOptionsService.getCallback("processRowPostCreate");if(e&&this.areAllContainersReady()){var t={eRow:this.centerGui.element,ePinnedLeftRow:this.leftGui?this.leftGui.element:void 0,ePinnedRightRow:this.rightGui?this.rightGui.element:void 0,node:this.rowNode,rowIndex:this.rowNode.rowIndex,addRenderedRowListener:this.addEventListener.bind(this)};e(t)}},t.prototype.areAllContainersReady=function(){var e=!!this.leftGui||!this.beans.columnModel.isPinningLeft(),t=!!this.centerGui,i=!!this.rightGui||!this.beans.columnModel.isPinningRight();return e&&t&&i},t.prototype.setRowType=function(){var e=this.rowNode.stub,t=this.rowNode.isFullWidthCell(),i=this.gridOptionsService.get("masterDetail")&&this.rowNode.detail,n=this.beans.columnModel.isPivotMode(),o=!!this.rowNode.group&&!this.rowNode.footer,r=o&&this.gridOptionsService.isGroupUseEntireRow(n);this.rowType=e?Gc.FullWidthLoading:i?Gc.FullWidthDetail:t?Gc.FullWidth:r?Gc.FullWidthGroup:Gc.Normal},t.prototype.updateColumnLists=function(e,t){var i=this;if(void 0===e&&(e=!1),void 0===t&&(t=!1),!this.isFullWidth()){var n=e||this.gridOptionsService.get("suppressAnimationFrame")||this.printLayout;n?this.updateColumnListsImpl(t):this.updateColumnListsPending||(this.beans.animationFrameService.createTask((function(){i.active&&i.updateColumnListsImpl(!0)}),this.rowNode.rowIndex,"createTasksP1"),this.updateColumnListsPending=!0)}},t.prototype.createCellCtrls=function(e,t,i){var n=this;void 0===i&&(i=null);var o={list:[],map:{}},r=function(e,t){o.list.push(t),o.map[e]=t};return t.forEach((function(t){var i=t.getInstanceId(),o=e.map[i];o||(o=new Du(t,n.rowNode,n.beans,n)),r(i,o)})),e.list.forEach((function(e){var t=null!=o.map[e.getColumn().getInstanceId()];if(!t){var s=!n.isCellEligibleToBeRemoved(e,i);s?r(e.getColumn().getInstanceId(),e):e.destroy()}})),o},t.prototype.updateColumnListsImpl=function(e){this.updateColumnListsPending=!1,this.createAllCellCtrls(),this.setCellCtrls(e)},t.prototype.setCellCtrls=function(e){var t=this;this.allRowGuis.forEach((function(i){var n=t.getCellCtrlsForContainer(i.containerType);i.rowComp.setCellCtrls(n,e)}))},t.prototype.getCellCtrlsForContainer=function(e){switch(e){case ku.LEFT:return this.leftCellCtrls.list;case ku.RIGHT:return this.rightCellCtrls.list;case ku.FULL_WIDTH:return[];case ku.CENTER:return this.centerCellCtrls.list;default:var t=e;throw new Error("Unhandled case: ".concat(t))}},t.prototype.createAllCellCtrls=function(){var e=this.beans.columnModel;if(this.printLayout)this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,e.getAllDisplayedColumns()),this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}};else{var t=e.getViewportCenterColumnsForRow(this.rowNode);this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,t);var i=e.getDisplayedLeftColumnsForRow(this.rowNode);this.leftCellCtrls=this.createCellCtrls(this.leftCellCtrls,i,"left");var n=e.getDisplayedRightColumnsForRow(this.rowNode);this.rightCellCtrls=this.createCellCtrls(this.rightCellCtrls,n,"right")}},t.prototype.isCellEligibleToBeRemoved=function(e,t){var i=!0,n=!1,o=e.getColumn();if(o.getPinned()!=t)return i;var r=e.isEditing(),s=this.beans.focusService.isCellFocused(e.getCellPosition()),a=r||s;if(a){var l=e.getColumn(),c=this.beans.columnModel.getAllDisplayedColumns(),u=c.indexOf(l)>=0;return u?n:i}return i},t.prototype.getDomOrder=function(){var e=this.gridOptionsService.get("ensureDomOrder");return e||this.gridOptionsService.isDomLayout("print")},t.prototype.listenOnDomOrder=function(e){var t=this,i=function(){e.rowComp.setDomOrder(t.getDomOrder())};this.addManagedPropertyListener("domLayout",i),this.addManagedPropertyListener("ensureDomOrder",i)},t.prototype.setAnimateFlags=function(e){if(!this.isSticky()&&e){var t=o(this.rowNode.oldRowTop),i=this.beans.columnModel.isPinningLeft(),n=this.beans.columnModel.isPinningRight();if(t){if(this.isFullWidth()&&!this.gridOptionsService.get("embedFullWidthRows"))return void(this.slideInAnimation.fullWidth=!0);
11this.slideInAnimation.center=!0,this.slideInAnimation.left=i,this.slideInAnimation.right=n}else{if(this.isFullWidth()&&!this.gridOptionsService.get("embedFullWidthRows"))return void(this.fadeInAnimation.fullWidth=!0);this.fadeInAnimation.center=!0,this.fadeInAnimation.left=i,this.fadeInAnimation.right=n}}},t.prototype.isEditing=function(){return this.editingRow},t.prototype.stopRowEditing=function(e){this.stopEditing(e)},t.prototype.isFullWidth=function(){return this.rowType!==Gc.Normal},t.prototype.getRowType=function(){return this.rowType},t.prototype.refreshFullWidth=function(){var e=this,t=function(t,i){if(!t)return!0;var n=t.rowComp.getFullWidthCellRenderer();if(!n)return!1;if(!n.refresh)return!1;var o=e.createFullWidthParams(t.element,i),r=n.refresh(o);return r},i=t(this.fullWidthGui,null),n=t(this.centerGui,null),o=t(this.leftGui,"left"),r=t(this.rightGui,"right"),s=i&&n&&o&&r;return s},t.prototype.addListeners=function(){var e=this;this.addManagedListener(this.rowNode,wa.EVENT_HEIGHT_CHANGED,(function(){return e.onRowHeightChanged()})),this.addManagedListener(this.rowNode,wa.EVENT_ROW_SELECTED,(function(){return e.onRowSelected()})),this.addManagedListener(this.rowNode,wa.EVENT_ROW_INDEX_CHANGED,this.onRowIndexChanged.bind(this)),this.addManagedListener(this.rowNode,wa.EVENT_TOP_CHANGED,this.onTopChanged.bind(this)),this.addManagedListener(this.rowNode,wa.EVENT_EXPANDED_CHANGED,this.updateExpandedCss.bind(this)),this.addManagedListener(this.rowNode,wa.EVENT_HAS_CHILDREN_CHANGED,this.updateExpandedCss.bind(this)),this.rowNode.detail&&this.addManagedListener(this.rowNode.parent,wa.EVENT_DATA_CHANGED,this.onRowNodeDataChanged.bind(this)),this.addManagedListener(this.rowNode,wa.EVENT_DATA_CHANGED,this.onRowNodeDataChanged.bind(this)),this.addManagedListener(this.rowNode,wa.EVENT_CELL_CHANGED,this.onRowNodeCellChanged.bind(this)),this.addManagedListener(this.rowNode,wa.EVENT_HIGHLIGHT_CHANGED,this.onRowNodeHighlightChanged.bind(this)),this.addManagedListener(this.rowNode,wa.EVENT_DRAGGING_CHANGED,this.onRowNodeDraggingChanged.bind(this)),this.addManagedListener(this.rowNode,wa.EVENT_UI_LEVEL_CHANGED,this.onUiLevelChanged.bind(this));var t=this.beans.eventService;this.addManagedListener(t,ht.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED,this.onPaginationPixelOffsetChanged.bind(this)),this.addManagedListener(t,ht.EVENT_HEIGHT_SCALE_CHANGED,this.onTopChanged.bind(this)),this.addManagedListener(t,ht.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(t,ht.EVENT_VIRTUAL_COLUMNS_CHANGED,this.onVirtualColumnsChanged.bind(this)),this.addManagedListener(t,ht.EVENT_CELL_FOCUSED,this.onCellFocused.bind(this)),this.addManagedListener(t,ht.EVENT_CELL_FOCUS_CLEARED,this.onCellFocusCleared.bind(this)),this.addManagedListener(t,ht.EVENT_PAGINATION_CHANGED,this.onPaginationChanged.bind(this)),this.addManagedListener(t,ht.EVENT_MODEL_UPDATED,this.onModelUpdated.bind(this)),this.addManagedListener(t,ht.EVENT_COLUMN_MOVED,this.onColumnMoved.bind(this)),this.addDestroyFunc((function(){e.destroyBeans(e.rowDragComps,e.beans.context)})),this.addManagedPropertyListeners(["rowDragEntireRow"],(function(){var t=e.gridOptionsService.get("rowDragEntireRow");t?e.allRowGuis.forEach((function(t){e.addRowDraggerToRow(t)})):(e.destroyBeans(e.rowDragComps,e.beans.context),e.rowDragComps=[])})),this.addListenersForCellComps()},t.prototype.onColumnMoved=function(){this.updateColumnLists()},t.prototype.addListenersForCellComps=function(){var e=this;this.addManagedListener(this.rowNode,wa.EVENT_ROW_INDEX_CHANGED,(function(){e.getAllCellCtrls().forEach((function(e){return e.onRowIndexChanged()}))})),this.addManagedListener(this.rowNode,wa.EVENT_CELL_CHANGED,(function(t){e.getAllCellCtrls().forEach((function(e){return e.onCellChanged(t)}))}))},t.prototype.onRowNodeDataChanged=function(e){var t=this,i=this.isFullWidth()!==!!this.rowNode.isFullWidthCell();if(i)this.beans.rowRenderer.redrawRow(this.rowNode);else if(this.isFullWidth()){var n=this.refreshFullWidth();n||this.beans.rowRenderer.redrawRow(this.rowNode)}
11else this.getAllCellCtrls().forEach((function(t){return t.refreshCell({suppressFlash:!e.update,newData:!e.update})})),this.allRowGuis.forEach((function(e){t.setRowCompRowId(e.rowComp),t.updateRowBusinessKey(),t.setRowCompRowBusinessKey(e.rowComp)})),this.onRowSelected(),this.postProcessCss()},t.prototype.onRowNodeCellChanged=function(){this.postProcessCss()},t.prototype.postProcessCss=function(){this.setStylesFromGridOptions(!0),this.postProcessClassesFromGridOptions(),this.postProcessRowClassRules(),this.postProcessRowDragging()},t.prototype.onRowNodeHighlightChanged=function(){var e=this.rowNode.highlighted;this.allRowGuis.forEach((function(t){var i=e===Wl.Above,n=e===Wl.Below;t.rowComp.addOrRemoveCssClass("ag-row-highlight-above",i),t.rowComp.addOrRemoveCssClass("ag-row-highlight-below",n)}))},t.prototype.onRowNodeDraggingChanged=function(){this.postProcessRowDragging()},t.prototype.postProcessRowDragging=function(){var e=this.rowNode.dragging;this.allRowGuis.forEach((function(t){return t.rowComp.addOrRemoveCssClass("ag-row-dragging",e)}))},t.prototype.updateExpandedCss=function(){var e=this.rowNode.isExpandable(),t=1==this.rowNode.expanded;this.allRowGuis.forEach((function(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),Si(i.element,e&&t)}))},t.prototype.onDisplayedColumnsChanged=function(){this.updateColumnLists(!0),this.beans.columnModel.wasAutoRowHeightEverActive()&&this.rowNode.checkAutoHeights()},t.prototype.onVirtualColumnsChanged=function(){this.updateColumnLists(!1,!0)},t.prototype.getRowPosition=function(){return{rowPinned:n(this.rowNode.rowPinned),rowIndex:this.rowNode.rowIndex}},t.prototype.onKeyboardNavigate=function(e){var t=this.allRowGuis.find((function(t){return t.element.contains(e.target)})),i=t?t.element:null,n=i===e.target;if(n){var o=this.rowNode,r=this.beans.focusService.getFocusedCell(),s={rowIndex:o.rowIndex,rowPinned:o.rowPinned,column:r&&r.column};this.beans.navigationService.navigateToNextCell(e,e.key,s,!0),e.preventDefault()}},t.prototype.onTabKeyDown=function(e){if(!e.defaultPrevented&&!Ze(e)){var t=this.allRowGuis.find((function(t){return t.element.contains(e.target)})),i=t?t.element:null,n=i===e.target,o=null;n||(o=this.beans.focusService.findNextFocusableElement(i,!1,e.shiftKey)),(this.isFullWidth()&&n||!o)&&this.beans.navigationService.onTabKeyDown(this,e)}},t.prototype.onFullWidthRowFocused=function(e){var t,i=this.rowNode,n=!!e&&(this.isFullWidth()&&e.rowIndex===i.rowIndex&&e.rowPinned==i.rowPinned),o=this.fullWidthGui?this.fullWidthGui.element:null===(t=this.centerGui)||void 0===t?void 0:t.element;o&&(o.classList.toggle("ag-full-width-focus",n),n&&o.focus({preventScroll:!0}))},t.prototype.refreshCell=function(e){this.centerCellCtrls=this.removeCellCtrl(this.centerCellCtrls,e),this.leftCellCtrls=this.removeCellCtrl(this.leftCellCtrls,e),this.rightCellCtrls=this.removeCellCtrl(this.rightCellCtrls,e),this.updateColumnLists()},t.prototype.removeCellCtrl=function(e,t){var i={list:[],map:{}};return e.list.forEach((function(e){e!==t&&(i.list.push(e),i.map[e.getInstanceId()]=e)})),i},t.prototype.onMouseEvent=function(e,t){switch(e){case"dblclick":this.onRowDblClick(t);break;case"click":this.onRowClick(t);break;case"touchstart":case"mousedown":this.onRowMouseDown(t);break}},t.prototype.createRowEvent=function(e,t){return{type:e,node:this.rowNode,data:this.rowNode.data,rowIndex:this.rowNode.rowIndex,rowPinned:this.rowNode.rowPinned,context:this.gridOptionsService.context,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,event:t}},t.prototype.createRowEventWithSource=function(e,t){var i=this.createRowEvent(e,t);return i.source=this,i},t.prototype.onRowDblClick=function(e){if(!Ze(e)){var t=this.createRowEventWithSource(ht.EVENT_ROW_DOUBLE_CLICKED,e);this.beans.eventService.dispatchEvent(t)}},t.prototype.onRowMouseDown=function(e){if(this.lastMouseDownOnDragger=kn(e.target,"ag-row-drag",3),this.isFullWidth()){var t=this.rowNode,i=this.beans.columnModel;this.beans.rangeService&&this.beans.rangeService.removeAllCellRanges(),this.beans.focusService.setFocusedCell({rowIndex:t.rowIndex,column:i.getAllDisplayedColumns()[0],rowPinned:t.rowPinned,forceBrowserFocus:!0})}},t.prototype.onRowClick=function(e){var t=Ze(e)||this.lastMouseDownOnDragger;if(!t){var i=this.createRowEventWithSource(ht.EVENT_ROW_CLICKED,e);this.beans.eventService.dispatchEvent(i);var n=e.ctrlKey||e.metaKey,o=e.shiftKey,r=this.gridOptionsService.get("groupSelectsChildren");if(!(r&&this.rowNode.group||!this.rowNode.selectable||this.rowNode.rowPinned||!this.gridOptionsService.isRowSelection()||this.gridOptionsService.get("suppressRowClickSelection"))){var s=this.gridOptionsService.get("rowMultiSelectWithClick"),a=!this.gridOptionsService.get("suppressRowDeselection"),l="rowClicked";if(this.rowNode.isSelected())s?this.rowNode.setSelectedParams({newValue:!1,event:e,source:l}):n?a&&this.rowNode.setSelectedParams({newValue:!1,event:e,source:l}):this.rowNode.setSelectedParams({newValue:!0,clearSelection:!o,rangeSelect:o,event:e,source:l});else{var c=!s&&!n;this.rowNode.setSelectedParams({newValue:!0,clearSelection:c,rangeSelect:o,event:e,source:l})}}}},t.prototype.setupDetailRowAutoHeight=function(e){var t=this;if(this.rowType===Gc.FullWidthDetail&&this.gridOptionsService.get("detailRowAutoHeight")){var i=function(){var i=e.clientHeight;if(null!=i&&i>0){var n=function(){t.rowNode.setRowHeight(i),t.beans.clientSideRowModel?t.beans.clientSideRowModel.onRowHeightChanged():t.beans.serverSideRowModel&&t.beans.serverSideRowModel.onRowHeightChanged()};t.beans.frameworkOverrides.setTimeout(n,0)}},n=this.beans.resizeObserverService.observeResize(e,i);this.addDestroyFunc(n),i()}},t.prototype.createFullWidthParams=function(e,t){var i=this,n={fullWidth:!0,data:this.rowNode.data,node:this.rowNode,value:this.rowNode.key,valueFormatted:this.rowNode.key,rowIndex:this.rowNode.rowIndex,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context,eGridCell:e,eParentOfValue:e,pinned:t,addRenderedRowListener:this.addEventListener.bind(this),registerRowDragger:function(e,t,n,o){return i.addFullWidthRowDragging(e,t,n,o)}};return n},t.prototype.addFullWidthRowDragging=function(e,t,i,n){if(void 0===i&&(i=""),this.isFullWidth()){var o=new Na((function(){return i}),this.rowNode,void 0,e,t,n);this.createManagedBean(o,this.beans.context)}},t.prototype.onUiLevelChanged=function(){var e=this.beans.rowCssClassCalculator.calculateRowLevel(this.rowNode);if(this.rowLevel!=e){var t="ag-row-level-"+e,i="ag-row-level-"+this.rowLevel;this.allRowGuis.forEach((function(e){e.rowComp.addOrRemoveCssClass(t,!0),e.rowComp.addOrRemoveCssClass(i,!1)}))}this.rowLevel=e},t.prototype.isFirstRowOnPage=function(){return this.rowNode.rowIndex===this.beans.paginationProxy.getPageFirstRow()},t.prototype.isLastRowOnPage=function(){return this.rowNode.rowIndex===this.beans.paginationProxy.getPageLastRow()},t.prototype.onModelUpdated=function(){this.refreshFirstAndLastRowStyles()},t.prototype.refreshFirstAndLastRowStyles=function(){var e=this.isFirstRowOnPage(),t=this.isLastRowOnPage();this.firstRowOnPage!==e&&(this.firstRowOnPage=e,this.allRowGuis.forEach((function(t){return t.rowComp.addOrRemoveCssClass("ag-row-first",e)}))),this.lastRowOnPage!==t&&(this.lastRowOnPage=t,this.allRowGuis.forEach((function(e){return e.rowComp.addOrRemoveCssClass("ag-row-last",t)})))},t.prototype.stopEditing=function(e){var t,i;if(void 0===e&&(e=!1),!this.stoppingRowEdit){var n=this.getAllCellCtrls(),o=this.editingRow;this.stoppingRowEdit=!0;var r=!1;try{for(var s=Au(n),a=s.next();!a.done;a=s.next()){var l=a.value,c=l.stopEditing(e);o&&!e&&!r&&c&&(r=!0)}}catch(d){t={error:d}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(t)throw t.error}}if(r){var u=this.createRowEvent(ht.EVENT_ROW_VALUE_CHANGED);this.beans.eventService.dispatchEvent(u)}o&&this.setEditingRow(!1),this.stoppingRowEdit=!1}},t.prototype.setInlineEditingCss=function(e){this.allRowGuis.forEach((function(t){t.rowComp.addOrRemoveCssClass("ag-row-inline-editing",e),t.rowComp.addOrRemoveCssClass("ag-row-not-inline-editing",!e)}))},t.prototype.setEditingRow=function(e){this.editingRow=e,this.allRowGuis.forEach((function(t){return t.rowComp.addOrRemoveCssClass("ag-row-editing",e)}));var t=e?this.createRowEvent(ht.EVENT_ROW_EDITING_STARTED):this.createRowEvent(ht.EVENT_ROW_EDITING_STOPPED);this.beans.eventService.dispatchEvent(t)},t.prototype.startRowEditing=function(e,t,i){if(void 0===e&&(e=null),void 0===t&&(t=null),void 0===i&&(i=null),!this.editingRow){var n=this.getAllCellCtrls().reduce((function(n,o){var r=o===t;return r?o.startEditing(e,r,i):o.startEditing(null,r,i),!!n||o.isEditing()}),!1);n&&this.setEditingRow(!0)}},t.prototype.getAllCellCtrls=function(){if(0===this.leftCellCtrls.list.length&&0===this.rightCellCtrls.list.length)return this.centerCellCtrls.list;var e=Pu(Pu(Pu([],_u(this.centerCellCtrls.list),!1),_u(this.leftCellCtrls.list),!1),_u(this.rightCellCtrls.list),!1);return e},t.prototype.postProcessClassesFromGridOptions=function(){var e=this,t=this.beans.rowCssClassCalculator.processClassesFromGridOptions(this.rowNode);t&&t.length&&t.forEach((function(t){e.allRowGuis.forEach((function(e){return e.rowComp.addOrRemoveCssClass(t,!0)}))}))},t.prototype.postProcessRowClassRules=function(){var e=this;this.beans.rowCssClassCalculator.processRowClassRules(this.rowNode,(function(t){e.allRowGuis.forEach((function(e){return e.rowComp.addOrRemoveCssClass(t,!0)}))}),(function(t){e.allRowGuis.forEach((function(e){return e.rowComp.addOrRemoveCssClass(t,!1)}))}))},t.prototype.setStylesFromGridOptions=function(e,t){var i=this;e&&(this.rowStyles=this.processStylesFromGridOptions()),this.forEachGui(t,(function(e){return e.rowComp.setUserStyles(i.rowStyles)}))},t.prototype.getPinnedForContainer=function(e){var t=e===ku.LEFT?"left"
11:e===ku.RIGHT?"right":null;return t},t.prototype.getInitialRowClasses=function(e){var 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)},t.prototype.processStylesFromGridOptions=function(){var e=this.gridOptionsService.get("rowStyle");if(!e||"function"!==typeof e){var t,i=this.gridOptionsService.getCallback("getRowStyle");if(i){var n={data:this.rowNode.data,node:this.rowNode,rowIndex:this.rowNode.rowIndex};t=i(n)}return t||e?Object.assign({},e,t):this.emptyStyle}console.warn("AG Grid: rowStyle should be an object of key/value styles, not be a function, use getRowStyle() instead")},t.prototype.onRowSelected=function(e){var t=this,i=!!this.rowNode.isSelected();this.forEachGui(e,(function(e){e.rowComp.addOrRemoveCssClass("ag-row-selected",i),Ni(e.element,!!i||void 0);var n=t.createAriaLabel();di(e.element,null==n?"":n)}))},t.prototype.createAriaLabel=function(){var e=this.rowNode.isSelected();if(!e||!this.gridOptionsService.get("suppressRowDeselection")){var t=this.beans.localeService.getLocaleTextFunc(),i=t(e?"ariaRowDeselect":"ariaRowSelect","Press SPACE to ".concat(e?"deselect":"select"," this row."));return i}},t.prototype.isUseAnimationFrameForCreate=function(){return this.useAnimationFrameForCreate},t.prototype.addHoverFunctionality=function(e){var t=this;this.active&&(this.addManagedListener(e,"mouseenter",(function(){return t.rowNode.onMouseEnter()})),this.addManagedListener(e,"mouseleave",(function(){return t.rowNode.onMouseLeave()})),this.addManagedListener(this.rowNode,wa.EVENT_MOUSE_ENTER,(function(){t.beans.dragService.isDragging()||t.gridOptionsService.get("suppressRowHoverHighlight")||(e.classList.add("ag-row-hover"),t.rowNode.setHovered(!0))})),this.addManagedListener(this.rowNode,wa.EVENT_MOUSE_LEAVE,(function(){e.classList.remove("ag-row-hover"),t.rowNode.setHovered(!1)})))},t.prototype.roundRowTopToBounds=function(e){var t=this.beans.ctrlsService.getGridBodyCtrl(),i=t.getScrollFeature().getVScrollPosition(),n=this.applyPaginationOffset(i.top,!0)-100,o=this.applyPaginationOffset(i.bottom,!0)+100;return Math.min(Math.max(n,e),o)},t.prototype.getFrameworkOverrides=function(){return this.beans.frameworkOverrides},t.prototype.forEachGui=function(e,t){e?t(e):this.allRowGuis.forEach(t)},t.prototype.onRowHeightChanged=function(e){if(null!=this.rowNode.rowHeight){var t=this.rowNode.rowHeight,i=this.beans.environment.getDefaultRowHeight(),n=this.gridOptionsService.isGetRowHeightFunction(),o=n?this.gridOptionsService.getRowHeightForNode(this.rowNode).height:void 0,r=o?"".concat(Math.min(i,o)-2,"px"):void 0;this.forEachGui(e,(function(e){e.element.style.height="".concat(t,"px"),r&&e.element.style.setProperty("--ag-line-height",r)}))}},t.prototype.addEventListener=function(t,i){e.prototype.addEventListener.call(this,t,i)},t.prototype.removeEventListener=function(t,i){e.prototype.removeEventListener.call(this,t,i)},t.prototype.destroyFirstPass=function(){this.active=!1,this.gridOptionsService.isAnimateRows()&&this.setupRemoveAnimation(),this.rowNode.setHovered(!1);var t=this.createRowEvent(ht.EVENT_VIRTUAL_ROW_REMOVED);this.dispatchEvent(t),this.beans.eventService.dispatchEvent(t),e.prototype.destroy.call(this)},t.prototype.setupRemoveAnimation=function(){if(!this.isSticky()){var e=null!=this.rowNode.rowTop;if(e){var t=this.roundRowTopToBounds(this.rowNode.rowTop);this.setRowTop(t)}else this.allRowGuis.forEach((function(e){return e.rowComp.addOrRemoveCssClass("ag-opacity-zero",!0)}))}},t.prototype.destroySecondPass=function(){this.allRowGuis.length=0,this.stopEditing();var e=function(e){return e.list.forEach((function(e){return e.destroy()})),{list:[],map:{}}};this.centerCellCtrls=e(this.centerCellCtrls),this.leftCellCtrls=e(this.leftCellCtrls),this.rightCellCtrls=e(this.rightCellCtrls)}
11,t.prototype.setFocusedClasses=function(e){var t=this;this.forEachGui(e,(function(e){e.rowComp.addOrRemoveCssClass("ag-row-focus",t.rowFocused),e.rowComp.addOrRemoveCssClass("ag-row-no-focus",!t.rowFocused)}))},t.prototype.onCellFocused=function(){this.onCellFocusChanged()},t.prototype.onCellFocusCleared=function(){this.onCellFocusChanged()},t.prototype.onCellFocusChanged=function(){var 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)},t.prototype.onPaginationChanged=function(){var e=this.beans.paginationProxy.getCurrentPage();this.paginationPage!==e&&(this.paginationPage=e,this.onTopChanged()),this.refreshFirstAndLastRowStyles()},t.prototype.onTopChanged=function(){this.setRowTop(this.rowNode.rowTop)},t.prototype.onPaginationPixelOffsetChanged=function(){this.onTopChanged()},t.prototype.applyPaginationOffset=function(e,t){if(void 0===t&&(t=!1),this.rowNode.isRowPinned()||this.rowNode.sticky)return e;var i=this.beans.paginationProxy.getPixelOffset(),n=t?1:-1;return e+i*n},t.prototype.setRowTop=function(e){if(!this.printLayout&&o(e)){var t=this.applyPaginationOffset(e),i=this.rowNode.isRowPinned()||this.rowNode.sticky,n=i?t:this.beans.rowContainerHeightService.getRealPixelPosition(t),r="".concat(n,"px");this.setRowTopStyle(r)}},t.prototype.getInitialRowTop=function(e){var t=this.gridOptionsService.get("suppressRowTransform");return t?this.getInitialRowTopShared(e):void 0},t.prototype.getInitialTransform=function(e){var t=this.gridOptionsService.get("suppressRowTransform");return t?void 0:"translateY(".concat(this.getInitialRowTopShared(e),")")},t.prototype.getInitialRowTopShared=function(e){if(this.printLayout)return"";var t;if(this.isSticky())t=this.rowNode.stickyRowTop;else{var i=this.slideInAnimation[e]?this.roundRowTopToBounds(this.rowNode.oldRowTop):this.rowNode.rowTop,n=this.applyPaginationOffset(i);t=this.rowNode.isRowPinned()?n:this.beans.rowContainerHeightService.getRealPixelPosition(n)}return t+"px"},t.prototype.setRowTopStyle=function(e){var t=this.gridOptionsService.get("suppressRowTransform");this.allRowGuis.forEach((function(i){return t?i.rowComp.setTop(e):i.rowComp.setTransform("translateY(".concat(e,")"))}))},t.prototype.getRowNode=function(){return this.rowNode},t.prototype.getCellCtrl=function(e){var t=null;return this.getAllCellCtrls().forEach((function(i){i.getColumn()==e&&(t=i)})),null!=t||this.getAllCellCtrls().forEach((function(i){i.getColSpanningList().indexOf(e)>=0&&(t=i)})),t},t.prototype.onRowIndexChanged=function(){null!=this.rowNode.rowIndex&&(this.onCellFocusChanged(),this.updateRowIndexes(),this.postProcessCss())},t.prototype.getRowIndex=function(){return this.rowNode.getRowIndexString()},t.prototype.updateRowIndexes=function(e){var t=this.rowNode.getRowIndexString(),i=this.beans.headerNavigationService.getHeaderRowCount()+this.beans.filterManager.getHeaderRowCount(),n=this.rowNode.rowIndex%2===0,o=i+this.rowNode.rowIndex+1;this.forEachGui(e,(function(e){e.rowComp.setRowIndex(t),e.rowComp.addOrRemoveCssClass("ag-row-even",n),e.rowComp.addOrRemoveCssClass("ag-row-odd",!n),Ri(e.element,o)}))},t.prototype.getPinnedLeftRowElement=function(){return this.leftGui?this.leftGui.element:void 0},t.prototype.getPinnedRightRowElement=function(){return this.rightGui?this.rightGui.element:void 0},t.prototype.getBodyRowElement=function(){return this.centerGui?this.centerGui.element:void 0},t.prototype.getFullWidthRowElement=function(){return this.fullWidthGui?this.fullWidthGui.element:void 0},t.DOM_DATA_KEY_ROW_CTRL="renderedRow",t}(st),Iu=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Fu=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Gu=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},Vu=function(e){function t(t){var i=e.call(this)||this;return i.element=t,i}return Iu(t,e),t.prototype.postConstruct=function(){this.addKeyboardListeners(),this.addMouseListeners(),this.mockContextMenuForIPad()},t.prototype.addKeyboardListeners=function(){var e="keydown",t=this.processKeyboardEvent.bind(this,e);this.addManagedListener(this.element,e,t)},t.prototype.addMouseListeners=function(){var e=this,t=Je("touchstart")?"touchstart":"mousedown",i=["dblclick","contextmenu","mouseover","mouseout","click",t];
11i.forEach((function(t){var i=e.processMouseEvent.bind(e,t);e.addManagedListener(e.element,t,i)}))},t.prototype.processMouseEvent=function(e,t){if(this.mouseEventService.isEventFromThisGrid(t)&&!Ze(t)){var i=this.getRowForEvent(t),n=this.mouseEventService.getRenderedCellForEvent(t);"contextmenu"===e?this.handleContextMenuMouseEvent(t,null,i,n):(n&&n.onMouseEvent(e,t),i&&i.onMouseEvent(e,t))}},t.prototype.mockContextMenuForIPad=function(){var e=this;if(Ji()){var t=new Hs(this.element),i=function(t){var i=e.getRowForEvent(t.touchEvent),n=e.mouseEventService.getRenderedCellForEvent(t.touchEvent);e.handleContextMenuMouseEvent(null,t.touchEvent,i,n)};this.addManagedListener(t,Hs.EVENT_LONG_TAP,i),this.addDestroyFunc((function(){return t.destroy()}))}},t.prototype.getRowForEvent=function(e){var t=e.target;while(t){var i=this.gridOptionsService.getDomData(t,Lu.DOM_DATA_KEY_ROW_CTRL);if(i)return i;t=t.parentElement}return null},t.prototype.handleContextMenuMouseEvent=function(e,t,i,n){var o=i?i.getRowNode():null,r=n?n.getColumn():null,s=null;if(r){var a=e||t;n.dispatchCellContextMenuEvent(a),s=this.valueService.getValue(r,o)}var l=this.ctrlsService.getGridBodyCtrl(),c=n?n.getGui():l.getGridBodyElement();this.contextMenuFactory&&this.contextMenuFactory.onContextMenu(e,t,o,r,s,c)},t.prototype.getControlsForEventTarget=function(e){return{cellCtrl:Qe(this.gridOptionsService,e,Du.DOM_DATA_KEY_CELL_CTRL),rowCtrl:Qe(this.gridOptionsService,e,Lu.DOM_DATA_KEY_ROW_CTRL)}},t.prototype.processKeyboardEvent=function(e,t){var i=this.getControlsForEventTarget(t.target),n=i.cellCtrl,o=i.rowCtrl;t.defaultPrevented||(n?this.processCellKeyboardEvent(n,e,t):o&&o.isFullWidth()&&this.processFullWidthRowKeyboardEvent(o,e,t))},t.prototype.processCellKeyboardEvent=function(e,t,i){var n=e.getRowNode(),o=e.getColumn(),r=e.isEditing(),s=!Mo(this.gridOptionsService,i,n,o,r);if(s&&"keydown"===t){var a=!r&&this.navigationService.handlePageScrollingKey(i);a||e.onKeyDown(i),this.doGridOperations(i,e.isEditing()),Po(i)&&e.processCharacter(i)}if("keydown"===t){var l=e.createEvent(i,ht.EVENT_CELL_KEY_DOWN);this.eventService.dispatchEvent(l)}},t.prototype.processFullWidthRowKeyboardEvent=function(e,t,i){var n=e.getRowNode(),o=this.focusService.getFocusedCell(),r=o&&o.column,s=!Mo(this.gridOptionsService,i,n,r,!1);if(s){var a=i.key;if("keydown"===t)switch(a){case xo.PAGE_HOME:case xo.PAGE_END:case xo.PAGE_UP:case xo.PAGE_DOWN:this.navigationService.handlePageScrollingKey(i,!0);break;case xo.UP:case xo.DOWN:e.onKeyboardNavigate(i);break;case xo.TAB:e.onTabKeyDown(i);break}}if("keydown"===t){var l=e.createRowEvent(ht.EVENT_CELL_KEY_DOWN,i);this.eventService.dispatchEvent(l)}},t.prototype.doGridOperations=function(e,t){if((e.ctrlKey||e.metaKey)&&!t&&this.mouseEventService.isEventFromThisGrid(e)){var i=No(e);return i===xo.A?this.onCtrlAndA(e):i===xo.C?this.onCtrlAndC(e):i===xo.D?this.onCtrlAndD(e):i===xo.V?this.onCtrlAndV(e):i===xo.X?this.onCtrlAndX(e):i===xo.Y?this.onCtrlAndY():i===xo.Z?this.onCtrlAndZ(e):void 0}},t.prototype.onCtrlAndA=function(e){var t=this,i=t.pinnedRowModel,n=t.paginationProxy,o=t.rangeService;if(o&&n.isRowsToRender()){var r=Gu([i.isEmpty("top"),i.isEmpty("bottom")],2),a=r[0],l=r[1],c=a?null:"top",u=void 0,d=void 0;l?(u=null,d=this.paginationProxy.getRowCount()-1):(u="bottom",d=i.getPinnedBottomRowData().length-1);var p=this.columnModel.getAllDisplayedColumns();if(s(p))return;o.setCellRange({rowStartIndex:0,rowStartPinned:c,rowEndIndex:d,rowEndPinned:u,columnStart:p[0],columnEnd:Ae(p)})}e.preventDefault()},t.prototype.onCtrlAndC=function(e){if(this.clipboardService&&!this.gridOptionsService.get("enableCellTextSelection")){var t=this.getControlsForEventTarget(e.target),i=t.cellCtrl,n=t.rowCtrl;(null===i||void 0===i?void 0:i.isEditing())||(null===n||void 0===n?void 0:n.isEditing())||(e.preventDefault(),this.clipboardService.copyToClipboard())}},t.prototype.onCtrlAndX=function(e){if(this.clipboardService&&!this.gridOptionsService.get("enableCellTextSelection")&&!this.gridOptionsService.get("suppressCutToClipboard")){var t=this.getControlsForEventTarget(e.target),i=t.cellCtrl,n=t.rowCtrl;(null===i||void 0===i?void 0:i.isEditing())||(null===n||void 0===n?void 0:n.isEditing())||(e.preventDefault(),this.clipboardService.cutToClipboard(void 0,"ui"))}},t.prototype.onCtrlAndV=function(e){var t=this.getControlsForEventTarget(e.target),i=t.cellCtrl,n=t.rowCtrl;(null===i||void 0===i?void 0:i.isEditing())||(null===n||void 0===n?void 0:n.isEditing())||this.clipboardService&&!this.gridOptionsService.get("suppressClipboardPaste")&&this.clipboardService.pasteFromClipboard()},t.prototype.onCtrlAndD=function(e){this.clipboardService&&!this.gridOptionsService.get("suppressClipboardPaste")&&this.clipboardService.copyRangeDown(),e.preventDefault()},t.prototype.onCtrlAndZ=function(e){this.gridOptionsService.get("undoRedoCellEditing")&&(e.preventDefault(),e.shiftKey?this.undoRedoService.redo("ui"):this.undoRedoService.undo("ui"))},t.prototype.onCtrlAndY=function(){this.undoRedoService.redo("ui")}
11,Fu([de("mouseEventService")],t.prototype,"mouseEventService",void 0),Fu([de("valueService")],t.prototype,"valueService",void 0),Fu([pe("contextMenuFactory")],t.prototype,"contextMenuFactory",void 0),Fu([de("ctrlsService")],t.prototype,"ctrlsService",void 0),Fu([de("navigationService")],t.prototype,"navigationService",void 0),Fu([de("focusService")],t.prototype,"focusService",void 0),Fu([de("undoRedoService")],t.prototype,"undoRedoService",void 0),Fu([de("columnModel")],t.prototype,"columnModel",void 0),Fu([de("paginationProxy")],t.prototype,"paginationProxy",void 0),Fu([de("pinnedRowModel")],t.prototype,"pinnedRowModel",void 0),Fu([pe("rangeService")],t.prototype,"rangeService",void 0),Fu([pe("clipboardService")],t.prototype,"clipboardService",void 0),Fu([le],t.prototype,"postConstruct",null),t}(st),Bu=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ju=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Hu=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},Wu=function(e,t,i){if(i||2===arguments.length)for(var n,o=0,r=t.length;o<r;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},Uu=function(e){function t(t){var i=e.call(this)||this;return i.centerContainerCtrl=t,i}return Bu(t,e),t.prototype.postConstruct=function(){var e=this;this.ctrlsService.whenReady((function(){e.gridBodyCtrl=e.ctrlsService.getGridBodyCtrl(),e.listenForResize()})),this.addManagedListener(this.eventService,ht.EVENT_SCROLLBAR_WIDTH_CHANGED,this.onScrollbarWidthChanged.bind(this)),this.addManagedPropertyListeners(["alwaysShowHorizontalScroll","alwaysShowVerticalScroll"],(function(){e.checkViewportAndScrolls()}))},t.prototype.listenForResize=function(){var e=this,t=function(){return e.onCenterViewportResized()};this.centerContainerCtrl.registerViewportResizeListener(t),this.gridBodyCtrl.registerBodyViewportResizeListener(t)},t.prototype.onScrollbarWidthChanged=function(){this.checkViewportAndScrolls()},t.prototype.onCenterViewportResized=function(){if(this.centerContainerCtrl.isViewportVisible()){this.keepPinnedColumnsNarrowerThanViewport(),this.checkViewportAndScrolls();var e=this.centerContainerCtrl.getCenterWidth();e!==this.centerWidth&&(this.centerWidth=e,this.columnModel.refreshFlexedColumns({viewportWidth:this.centerWidth,updateBodyWidths:!0,fireResizedEvent:!0}))}else this.bodyHeight=0},t.prototype.keepPinnedColumnsNarrowerThanViewport=function(){var e=this.gridBodyCtrl.getBodyViewportElement(),t=In(e);if(!(isNaN(t)||t<=50)){var i=this.getPinnedColumnsOverflowingViewport(t-50),n=this.gridOptionsService.getCallback("processUnpinnedColumns");if(i.length){if(n){var o={columns:i,viewportWidth:t};i=n(o)}this.columnModel.setColumnsPinned(i,null,"viewportSizeFeature")}}},t.prototype.getPinnedColumnsOverflowingViewport=function(e){var t=this.pinnedWidthService.getPinnedRightWidth(),i=this.pinnedWidthService.getPinnedLeftWidth(),n=t+i;if(n<e)return[];var o=Wu([],Hu(this.columnModel.getDisplayedLeftColumns()),!1),r=Wu([],Hu(this.columnModel.getDisplayedRightColumns()),!1),s=0,a=0,l=0,c=[],u=n-l-e;while((a<o.length||s<r.length)&&u>0){if(s<r.length){var d=r[s++];u-=d.getActualWidth(),c.push(d)}if(a<o.length&&u>0){d=o[a++];u-=d.getActualWidth(),c.push(d)}}return c},t.prototype.checkViewportAndScrolls=function(){this.updateScrollVisibleService(),this.checkBodyHeight(),this.onHorizontalViewportChanged(),this.gridBodyCtrl.getScrollFeature
11().checkScrollLeft()},t.prototype.getBodyHeight=function(){return this.bodyHeight},t.prototype.checkBodyHeight=function(){var e=this.gridBodyCtrl.getBodyViewportElement(),t=Ln(e);if(this.bodyHeight!==t){this.bodyHeight=t;var i={type:ht.EVENT_BODY_HEIGHT_CHANGED};this.eventService.dispatchEvent(i)}},t.prototype.updateScrollVisibleService=function(){this.updateScrollVisibleServiceImpl(),setTimeout(this.updateScrollVisibleServiceImpl.bind(this),500)},t.prototype.updateScrollVisibleServiceImpl=function(){var e={horizontalScrollShowing:this.isHorizontalScrollShowing(),verticalScrollShowing:this.gridBodyCtrl.isVerticalScrollShowing()};this.scrollVisibleService.setScrollsVisible(e)},t.prototype.isHorizontalScrollShowing=function(){return this.centerContainerCtrl.isHorizontalScrollShowing()},t.prototype.onHorizontalViewportChanged=function(){var e=this.centerContainerCtrl.getCenterWidth(),t=this.centerContainerCtrl.getViewportScrollLeft();this.columnModel.setViewportPosition(e,t)},ju([de("ctrlsService")],t.prototype,"ctrlsService",void 0),ju([de("pinnedWidthService")],t.prototype,"pinnedWidthService",void 0),ju([de("columnModel")],t.prototype,"columnModel",void 0),ju([de("scrollVisibleService")],t.prototype,"scrollVisibleService",void 0),ju([le],t.prototype,"postConstruct",null),t}(st),zu=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ku=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Yu=function(e){function t(t){var i=e.call(this)||this;return i.element=t,i}return zu(t,e),t.prototype.postConstruct=function(){this.addManagedListener(this.eventService,ht.EVENT_LEFT_PINNED_WIDTH_CHANGED,this.onPinnedLeftWidthChanged.bind(this))},t.prototype.onPinnedLeftWidthChanged=function(){var e=this.pinnedWidthService.getPinnedLeftWidth(),t=e>0;_n(this.element,t),no(this.element,e)},t.prototype.getWidth=function(){return this.pinnedWidthService.getPinnedLeftWidth()},Ku([de("pinnedWidthService")],t.prototype,"pinnedWidthService",void 0),Ku([le],t.prototype,"postConstruct",null),t}(st),qu=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Xu=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},$u=function(e){function t(t){var i=e.call(this)||this;return i.element=t,i}return qu(t,e),t.prototype.postConstruct=function(){this.addManagedListener(this.eventService,ht.EVENT_RIGHT_PINNED_WIDTH_CHANGED,this.onPinnedRightWidthChanged.bind(this))},t.prototype.onPinnedRightWidthChanged=function(){var e=this.pinnedWidthService.getPinnedRightWidth(),t=e>0;_n(this.element,t),no(this.element,e)},t.prototype.getWidth=function(){return this.pinnedWidthService.getPinnedRightWidth()},Xu([de("pinnedWidthService")],t.prototype,"pinnedWidthService",void 0),Xu([le],t.prototype,"postConstruct",null),t}(st),Zu=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ju=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Qu=function(e){function t(t,i){var n=e.call(this)||this;return n.eContainer=t,n.eViewport=i,n}return Zu(t,e),t.prototype.postConstruct=function(){this.addManagedListener(this.eventService,ht.EVENT_ROW_CONTAINER_HEIGHT_CHANGED,this.onHeightChanged.bind(this))},t.prototype.onHeightChanged=function(){var e=this.maxDivHeightScaler.getUiContainerHeight(),t=null!=e?"".concat(e,"px"):"";this.eContainer.style.height=t,this.eViewport&&(this.eViewport.style.height=t)},Ju([de("rowContainerHeightService")],t.prototype,"maxDivHeightScaler",void 0),Ju([le],t.prototype,"postConstruct",null),t}(st),ed=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),td=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},id=function(e){function t(t){var i=e.call(this)||this;return i.eContainer=t,i}return ed(t,e),t.prototype.postConstruct=function(){var e=this;if(!r(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.addManagedPropertyListener("enableRangeSelection",(function(t){var i=t.currentValue;
11i?e.enableFeature():e.disableFeature()})),this.addDestroyFunc((function(){return e.disableFeature()}));var t=this.gridOptionsService.get("enableRangeSelection");t&&this.enableFeature()}},t.prototype.enableFeature=function(){this.dragService.addDragSource(this.params)},t.prototype.disableFeature=function(){this.dragService.removeDragSource(this.params)},td([pe("rangeService")],t.prototype,"rangeService",void 0),td([de("dragService")],t.prototype,"dragService",void 0),td([le],t.prototype,"postConstruct",null),t}(st),nd=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),od=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},rd=function(e){function t(t,i){void 0===i&&(i=!1);var n=e.call(this)||this;return n.callback=t,n.addSpacer=i,n}return nd(t,e),t.prototype.postConstruct=function(){var e=this.setWidth.bind(this);this.addManagedPropertyListener("domLayout",e),this.addManagedListener(this.eventService,ht.EVENT_DISPLAYED_COLUMNS_CHANGED,e),this.addManagedListener(this.eventService,ht.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,e),this.addManagedListener(this.eventService,ht.EVENT_LEFT_PINNED_WIDTH_CHANGED,e),this.addSpacer&&(this.addManagedListener(this.eventService,ht.EVENT_RIGHT_PINNED_WIDTH_CHANGED,e),this.addManagedListener(this.eventService,ht.EVENT_SCROLL_VISIBILITY_CHANGED,e),this.addManagedListener(this.eventService,ht.EVENT_SCROLLBAR_WIDTH_CHANGED,e)),this.setWidth()},t.prototype.setWidth=function(){var e,t=this.columnModel,i=this.gridOptionsService.isDomLayout("print"),n=t.getBodyContainerWidth(),o=t.getDisplayedColumnsLeftWidth(),r=t.getDisplayedColumnsRightWidth();if(i)e=n+o+r;else if(e=n,this.addSpacer){var s=this.gridOptionsService.get("enableRtl")?o:r;0===s&&this.scrollVisibleService.isVerticalScrollShowing()&&(e+=this.gridOptionsService.getScrollbarWidth())}this.callback(e)},od([de("columnModel")],t.prototype,"columnModel",void 0),od([de("scrollVisibleService")],t.prototype,"scrollVisibleService",void 0),od([le],t.prototype,"postConstruct",null),t}(st),sd=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ad=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},ld=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},cd=function(e,t,i){if(i||2===arguments.length)for(var n,o=0,r=t.length;o<r;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))};function ud(e){switch(e){case Mu.CENTER:case Mu.TOP_CENTER:case Mu.STICKY_TOP_CENTER:case Mu.BOTTOM_CENTER:return ku.CENT
11ER;case Mu.LEFT:case Mu.TOP_LEFT:case Mu.STICKY_TOP_LEFT:case Mu.BOTTOM_LEFT:return ku.LEFT;case Mu.RIGHT:case Mu.TOP_RIGHT:case Mu.STICKY_TOP_RIGHT:case Mu.BOTTOM_RIGHT:return ku.RIGHT;case Mu.FULL_WIDTH:case Mu.TOP_FULL_WIDTH:case Mu.STICKY_TOP_FULL_WIDTH:case Mu.BOTTOM_FULL_WIDTH:return ku.FULL_WIDTH;default:throw Error("Invalid Row Container Type")}}(function(e){e["LEFT"]="left",e["RIGHT"]="right",e["CENTER"]="center",e["FULL_WIDTH"]="fullWidth",e["TOP_LEFT"]="topLeft",e["TOP_RIGHT"]="topRight",e["TOP_CENTER"]="topCenter",e["TOP_FULL_WIDTH"]="topFullWidth",e["STICKY_TOP_LEFT"]="stickyTopLeft",e["STICKY_TOP_RIGHT"]="stickyTopRight",e["STICKY_TOP_CENTER"]="stickyTopCenter",e["STICKY_TOP_FULL_WIDTH"]="stickyTopFullWidth",e["BOTTOM_LEFT"]="bottomLeft",e["BOTTOM_RIGHT"]="bottomRight",e["BOTTOM_CENTER"]="bottomCenter",e["BOTTOM_FULL_WIDTH"]="bottomFullWidth"})(Mu||(Mu={})),function(e){e["LEFT"]="left",e["RIGHT"]="right",e["CENTER"]="center",e["FULL_WIDTH"]="fullWidth"}(ku||(ku={}));var dd=Dt([[Mu.CENTER,"ag-center-cols-container"],[Mu.LEFT,"ag-pinned-left-cols-container"],[Mu.RIGHT,"ag-pinned-right-cols-container"],[Mu.FULL_WIDTH,"ag-full-width-container"],[Mu.TOP_CENTER,"ag-floating-top-container"],[Mu.TOP_LEFT,"ag-pinned-left-floating-top"],[Mu.TOP_RIGHT,"ag-pinned-right-floating-top"],[Mu.TOP_FULL_WIDTH,"ag-floating-top-full-width-container"],[Mu.STICKY_TOP_CENTER,"ag-sticky-top-container"],[Mu.STICKY_TOP_LEFT,"ag-pinned-left-sticky-top"],[Mu.STICKY_TOP_RIGHT,"ag-pinned-right-sticky-top"],[Mu.STICKY_TOP_FULL_WIDTH,"ag-sticky-top-full-width-container"],[Mu.BOTTOM_CENTER,"ag-floating-bottom-container"],[Mu.BOTTOM_LEFT,"ag-pinned-left-floating-bottom"],[Mu.BOTTOM_RIGHT,"ag-pinned-right-floating-bottom"],[Mu.BOTTOM_FULL_WIDTH,"ag-floating-bottom-full-width-container"]]),pd=Dt([[Mu.CENTER,"ag-center-cols-viewport"],[Mu.TOP_CENTER,"ag-floating-top-viewport"],[Mu.STICKY_TOP_CENTER,"ag-sticky-top-viewport"],[Mu.BOTTOM_CENTER,"ag-floating-bottom-viewport"]]),hd=function(e){function t(t){var i=e.call(this)||this;return i.visible=!0,i.EMPTY_CTRLS=[],i.name=t,i.isFullWithContainer=i.name===Mu.TOP_FULL_WIDTH||i.name===Mu.STICKY_TOP_FULL_WIDTH||i.name===Mu.BOTTOM_FULL_WIDTH||i.name===Mu.FULL_WIDTH,i}return sd(t,e),t.getRowContainerCssClasses=function(e){var t=dd.get(e),i=pd.get(e);return{container:t,viewport:i}},t.getPinned=function(e){switch(e){case Mu.BOTTOM_LEFT:case Mu.TOP_LEFT:case Mu.STICKY_TOP_LEFT:case Mu.LEFT:return"left";case Mu.BOTTOM_RIGHT:case Mu.TOP_RIGHT:case Mu.STICKY_TOP_RIGHT:case Mu.RIGHT:return"right";default:return null}},t.prototype.postConstruct=function(){var e=this;this.enableRtl=this.gridOptionsService.get("enableRtl"),this.forContainers([Mu.CENTER],(function(){return e.viewportSizeFeature=e.createManagedBean(new Uu(e))}))},t.prototype.registerWithCtrlsService=function(){switch(this.name){case Mu.CENTER:this.ctrlsService.registerCenterRowContainerCtrl(this);break;case Mu.LEFT:this.ctrlsService.registerLeftRowContainerCtrl(this);break;case Mu.RIGHT:this.ctrlsService.registerRightRowContainerCtrl(this);break;case Mu.TOP_CENTER:this.ctrlsService.registerTopCenterRowContainerCtrl(this);break;case Mu.TOP_LEFT:this.ctrlsService.registerTopLeftRowContainerCon(this);break;case Mu.TOP_RIGHT:this.ctrlsService.registerTopRightRowContainerCtrl(this);break;case Mu.STICKY_TOP_CENTER:this.ctrlsService.registerStickyTopCenterRowContainerCtrl(this);break;case Mu.STICKY_TOP_LEFT:this.ctrlsService.registerStickyTopLeftRowContainerCon(this);break;case Mu.STICKY_TOP_RIGHT:this.ctrlsService.registerStickyTopRightRowContainerCtrl(this);break;case Mu.BOTTOM_CENTER:this.ctrlsService.registerBottomCenterRowContainerCtrl(this);break;case Mu.BOTTOM_LEFT:this.ctrlsService.registerBottomLeftRowContainerCtrl(this);break;case Mu.BOTTOM_RIGHT:this.ctrlsService.registerBottomRightRowContainerCtrl(this);break}},t.prototype.forContainers=function(e,t){e.indexOf(this.name)>=0&&t()},t.prototype.getContainerElement=function(){return this.eContainer},t.prototype.getViewportSizeFeature=function(){return this.viewportSizeFeature},t.prototype.setComp=function(e,t,i){var n=this;this.comp=e,this.eContainer=t,this.eViewport=i,this.createManagedBean(new Vu(this.eContainer)),this.addPreventScrollWhileDragging(),this.listenOnDomOrder(),this.stopHScrollOnPinnedRows();var o=[Mu.TOP_CENTER,Mu.TOP_LEFT,Mu.TOP_RIGHT],r=[Mu.STICKY_TOP_CENTER,Mu.STICKY_TOP_LEFT,Mu.STICKY_TOP_RIGHT],s=[Mu.BOTTOM_CENTER,Mu.BOTTOM_LEFT,Mu.BOTTOM_RIGHT],a=[Mu.CENTER,Mu.LEFT,Mu.RIGHT],l=cd(cd(cd(cd([],ld(o),!1),ld(s),!1),ld(a),!1),ld(r),!1),c=[Mu.CENTER,Mu.LEFT,Mu.RIGHT,Mu.FULL_WIDTH],u=[Mu.CENTER,Mu.TOP_CENTER,Mu.STICKY_TOP_CENTER,Mu.BOTTOM_CENTER],d=[Mu.LEFT,Mu.BOTTOM_LEFT,Mu.TOP_LEFT,Mu.STICKY_TOP_LEFT],p=[Mu.RIGHT,Mu.BOTTOM_RIGHT,Mu.TOP_RIGHT,Mu.STICKY_TOP_RIGHT];this.forContainers(d,(function(){n.pinnedWidthFeature=n.createManagedBean(new Yu(n.eContainer)),n.addManagedListener(n.eventService,ht.EVENT_LEFT_PINNED_WIDTH_CHANGED,(function(){return n.onPinnedWidthChanged()}))})),this.forContainers(p,(function(){n.pinnedWidthFeature=n.createManagedBean(new $u(n.eContainer)),n.addManagedListener(n.eventService,ht.EVENT_RIGHT_PINNED_WIDTH_CHANGED,(function(){return n.onPinnedWidthChanged()}))})),this.forContainers(c,(function(){return n.createManagedBean(new Qu(n.eContainer,n.name===Mu.CENT
11ER?i:void 0))})),this.forContainers(l,(function(){return n.createManagedBean(new id(n.eContainer))})),this.forContainers(u,(function(){return n.createManagedBean(new rd((function(e){return n.comp.setContainerWidth("".concat(e,"px"))})))})),this.addListeners(),this.registerWithCtrlsService()},t.prototype.addListeners=function(){var e=this;this.addManagedListener(this.eventService,ht.EVENT_DISPLAYED_COLUMNS_CHANGED,(function(){return e.onDisplayedColumnsChanged()})),this.addManagedListener(this.eventService,ht.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,(function(){return e.onDisplayedColumnsWidthChanged()})),this.addManagedListener(this.eventService,ht.EVENT_DISPLAYED_ROWS_CHANGED,(function(t){return e.onDisplayedRowsChanged(t.afterScroll)})),this.onDisplayedColumnsChanged(),this.onDisplayedColumnsWidthChanged(),this.onDisplayedRowsChanged()},t.prototype.listenOnDomOrder=function(){var e=this,t=[Mu.STICKY_TOP_CENTER,Mu.STICKY_TOP_LEFT,Mu.STICKY_TOP_RIGHT,Mu.STICKY_TOP_FULL_WIDTH],i=t.indexOf(this.name)>=0;if(i)this.comp.setDomOrder(!0);else{var n=function(){var t=e.gridOptionsService.get("ensureDomOrder"),i=e.gridOptionsService.isDomLayout("print");e.comp.setDomOrder(t||i)};this.addManagedPropertyListener("domLayout",n),n()}},t.prototype.stopHScrollOnPinnedRows=function(){var e=this;this.forContainers([Mu.TOP_CENTER,Mu.STICKY_TOP_CENTER,Mu.BOTTOM_CENTER],(function(){var t=function(){return e.eViewport.scrollLeft=0};e.addManagedListener(e.eViewport,"scroll",t)}))},t.prototype.onDisplayedColumnsChanged=function(){var e=this;this.forContainers([Mu.CENTER],(function(){return e.onHorizontalViewportChanged()}))},t.prototype.onDisplayedColumnsWidthChanged=function(){var e=this;this.forContainers([Mu.CENTER],(function(){return e.onHorizontalViewportChanged()}))},t.prototype.addPreventScrollWhileDragging=function(){var e=this,t=function(t){e.dragService.isDragging()&&t.cancelable&&t.preventDefault()};this.eContainer.addEventListener("touchmove",t,{passive:!1}),this.addDestroyFunc((function(){return e.eContainer.removeEventListener("touchmove",t)}))},t.prototype.onHorizontalViewportChanged=function(e){void 0===e&&(e=!1);var t=this.getCenterWidth(),i=this.getCenterViewportScrollLeft();this.columnModel.setViewportPosition(t,i,e)},t.prototype.getCenterWidth=function(){return In(this.eViewport)},t.prototype.getCenterViewportScrollLeft=function(){return jn(this.eViewport,this.enableRtl)},t.prototype.registerViewportResizeListener=function(e){var t=this.resizeObserverService.observeResize(this.eViewport,e);this.addDestroyFunc((function(){return t()}))},t.prototype.isViewportVisible=function(){return zn(this.eViewport)},t.prototype.getViewportScrollLeft=function(){return jn(this.eViewport,this.enableRtl)},t.prototype.isHorizontalScrollShowing=function(){var e=this.gridOptionsService.get("alwaysShowHorizontalScroll");return e||eo(this.eViewport)},t.prototype.getViewportElement=function(){return this.eViewport},t.prototype.setContainerTranslateX=function(e){this.eContainer.style.transform="translateX(".concat(e,"px)")},t.prototype.getHScrollPosition=function(){var e={left:this.eViewport.scrollLeft,right:this.eViewport.scrollLeft+this.eViewport.offsetWidth};return e},t.prototype.setCenterViewportScrollLeft=function(e){Hn(this.eViewport,e,this.enableRtl)},t.prototype.isContainerVisible=function(){var e=t.getPinned(this.name);return!e||!!this.pinnedWidthFeature&&this.pinnedWidthFeature.getWidth()>0},t.prototype.onPinnedWidthChanged=function(){var e=this.isContainerVisible();this.visible!=e&&(this.visible=e,this.onDisplayedRowsChanged())},t.prototype.onDisplayedRowsChanged=function(e){var t=this;if(void 0===e&&(e=!1),this.visible){var i=this.gridOptionsService.isDomLayout("print"),n=this.gridOptionsService.get("embedFullWidthRows"),o=n||i,r=function(e){var i=e.isFullWidth(),n=t.isFullWithContainer?!o&&i:o||!i;return n},s=this.getRowCtrls().filter(r);this.comp.setRowCtrls(s,e)}else this.comp.setRowCtrls(this.EMPTY_CTRLS,!1)},t.prototype.getRowCtrls=function(){switch(this.name){case Mu.TOP_CENTER:case Mu.TOP_LEFT:case Mu.TOP_RIGHT:case Mu.TOP_FULL_WIDTH:return this.rowRenderer.getTopRowCtrls();case Mu.STICKY_TOP_CENTER:case Mu.STICKY_TOP_LEFT:case Mu.STICKY_TOP_RIGHT:case Mu.STICKY_TOP_FULL_WIDTH:return this.rowRenderer.getStickyTopRowCtrls();case Mu.BOTTOM_CENTER:case Mu.BOTTOM_LEFT:case Mu.BOTTOM_RIGHT:case Mu.BOTTOM_FULL_WIDTH:return this.rowRenderer.getBottomRowCtrls();default:return this.rowRenderer.getCentreRowCtrls()}},ad([de("scrollVisibleService")],t.prototype,"scrollVisibleService",void 0),ad([de("dragService")],t.prototype,"dragService",void 0),ad([de("ctrlsService")],t.prototype,"ctrlsService",void 0),ad([de("columnModel")],t.prototype,"columnModel",void 0),ad([de("resizeObserverService")],t.prototype,"resizeObserverService",void 0),ad([de("animationFrameService")],t.prototype,"animationFrameService",void 0),ad([de("rowRenderer")],t.prototype,"rowRenderer",void 0),ad([le],t.prototype,"postConstruct",null),t}(st),fd=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),gd=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},vd='<div class="ag-root ag-unselectable" role="treegrid">\n        <ag-header-root ref="gridHeader"></ag-header-root>\n        <div class="ag-floating-top" ref="eTop" role="presentation">\n            <ag-row-container ref="topLeftContainer" name="'.concat(Mu.TOP_LEFT,'"></ag-row-container>\n            <ag-row-container ref="topCenterContainer" name="').concat(Mu.TOP_CENTER,'"></ag-row-container>\n            <ag-row-container ref="topRightContainer" name="').concat(Mu.TOP_RIGHT,'"></ag-row-container>\n            <ag-row-container ref="topFullWidthContainer" name="').concat(Mu.TOP_FULL_WIDTH,'"></ag-row-container>\n        </div>\n        <div class="ag-body" ref="eBody" role="presentation">\n            <div class="ag-body-viewport" ref="eBodyViewport" role="presentation">\n                <ag-row-container ref="leftContainer" name="').concat(Mu.LEFT,'"></ag-row-container>\n                <ag-row-container ref="centerContainer" name="').concat(Mu.CENTER,'"></ag-row-container>
11\n                <ag-row-container ref="rightContainer" name="').concat(Mu.RIGHT,'"></ag-row-container>\n                <ag-row-container ref="fullWidthContainer" name="').concat(Mu.FULL_WIDTH,'"></ag-row-container>\n            </div>\n            <ag-fake-vertical-scroll></ag-fake-vertical-scroll>\n        </div>\n        <div class="ag-sticky-top" ref="eStickyTop" role="presentation">\n            <ag-row-container ref="stickyTopLeftContainer" name="').concat(Mu.STICKY_TOP_LEFT,'"></ag-row-container>\n            <ag-row-container ref="stickyTopCenterContainer" name="').concat(Mu.STICKY_TOP_CENTER,'"></ag-row-container>\n            <ag-row-container ref="stickyTopRightContainer" name="').concat(Mu.STICKY_TOP_RIGHT,'"></ag-row-container>\n            <ag-row-container ref="stickyTopFullWidthContainer" name="').concat(Mu.STICKY_TOP_FULL_WIDTH,'"></ag-row-container>\n        </div>\n        <div class="ag-floating-bottom" ref="eBottom" role="presentation">\n            <ag-row-container ref="bottomLeftContainer" name="').concat(Mu.BOTTOM_LEFT,'"></ag-row-container>\n            <ag-row-container ref="bottomCenterContainer" name="').concat(Mu.BOTTOM_CENTER,'"></ag-row-container>\n            <ag-row-container ref="bottomRightContainer" name="').concat(Mu.BOTTOM_RIGHT,'"></ag-row-container>\n            <ag-row-container ref="bottomFullWidthContainer" name="').concat(Mu.BOTTOM_FULL_WIDTH,'"></ag-row-container>\n        </div>\n        <ag-fake-horizontal-scroll></ag-fake-horizontal-scroll>\n        <ag-overlay-wrapper></ag-overlay-wrapper>\n    </div>'),yd=function(e){function t(){return e.call(this,vd)||this}return fd(t,e),t.prototype.init=function(){var e=this,t=function(e,t){var i="".concat(e,"px");t.style.minHeight=i,t.style.height=i},i={setRowAnimationCssOnBodyViewport:function(t,i){return e.setRowAnimationCssOnBodyViewport(t,i)},setColumnCount:function(t){return Ai(e.getGui(),t)},setRowCount:function(t){return Di(e.getGui(),t)},setTopHeight:function(i){return t(i,e.eTop)},setBottomHeight:function(i){return t(i,e.eBottom)},setTopDisplay:function(t){return e.eTop.style.display=t},setBottomDisplay:function(t){return e.eBottom.style.display=t},setStickyTopHeight:function(t){return e.eStickyTop.style.height=t},setStickyTopTop:function(t){return e.eStickyTop.style.top=t},setStickyTopWidth:function(t){return e.eStickyTop.style.width=t},setColumnMovingCss:function(t,i){return e.addOrRemoveCssClass(t,i)},updateLayoutClasses:function(t,i){var n=[e.eBodyViewport.classList,e.eBody.classList];n.forEach((function(e){e.toggle(ec.AUTO_HEIGHT,i.autoHeight),e.toggle(ec.NORMAL,i.normal),e.toggle(ec.PRINT,i.print)})),e.addOrRemoveCssClass(ec.AUTO_HEIGHT,i.autoHeight),e.addOrRemoveCssClass(ec.NORMAL,i.normal),e.addOrRemoveCssClass(ec.PRINT,i.print)},setAlwaysVerticalScrollClass:function(t,i){return e.eBodyViewport.classList.toggle(Nc,i)},registerBodyViewportResizeListener:function(t){var i=e.resizeObserverService.observeResize(e.eBodyViewport,t);e.addDestroyFunc((function(){return i()}))},setPinnedTopBottomOverflowY:function(t){return e.eTop.style.overflowY=e.eBottom.style.overflowY=t},setCellSelectableCss:function(t,i){[e.eTop,e.eBodyViewport,e.eBottom].forEach((function(e){return e.classList.toggle(t,i)}))},setBodyViewportWidth:function(t){return e.eBodyViewport.style.width=t}};this.ctrl=this.createManagedBean(new Fc),this.ctrl.setComp(i,this.getGui(),this.eBodyViewport,this.eTop,this.eBottom,this.eStickyTop),(this.rangeService&&this.gridOptionsService.get("enableRangeSelection")||"multiple"===this.gridOptionsService.get("rowSelection"))&&Ti(this.getGui(),!0)},t.prototype.setRowAnimationCssOnBodyViewport=function(e,t){var i=this.eBodyViewport.classList;i.toggle(Sc.ANIMATION_ON,t),i.toggle(Sc.ANIMATION_OFF,!t)},t.prototype.getFloatingTopBottom=function(){return[this.eTop,this.eBottom]},gd([de("resizeObserverService")],t.prototype,"resizeObserverService",void 0),gd([pe("rangeService")],t.prototype,"rangeService",void 0),gd([sr("eBodyViewport")],t.prototype,"eBodyViewport",void 0),gd([sr("eStickyTop")],t.prototype,"eStickyTop",void 0),gd([sr("eTop")],t.prototype,"eTop",void 0),gd([sr("eBottom")],t.prototype,"eBottom",void 0),gd([sr("gridHeader")],t.prototype,"headerRootComp",void 0),gd([sr("eBody")],t.prototype,"eBody",void 0),gd([le],t.prototype,"init",null),t}(rr),md=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Cd=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},bd=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return md(t,e),t.prototype.postConstruct=function(){this.addManagedListener(this.eventService,ht.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,ht.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onDisplayedColumnsWidthChanged.bind(this))},t.prototype.onDisplayedColumnsChanged=function(){this.update()},t.prototype.onDisplayedColumnsWidthChanged=function(){this.update()},t.prototype.update=function(){this.updateImpl(),setTimeout(this.updateImpl.bind(this),500)},t.prototype.updateImpl=function(){var e=this.ctrlsService.getCenterRowContainerCtrl();if(e){var t={horizontalScrollShowing:e.isHorizontalScrollShowing(),verticalScrollShowing:this.isVerticalScrollShowing()};this.setScrollsVisible(t)}},t.prototype.setScrollsVisible=function(e){var t=this.horizontalScrollShowing!==e.horizontalScrollShowing||this.verticalScrollShowing!==e.verticalScrollShowing;if(t){this.horizontalScrollShowing=e.horizontalScrollShowing,this.verticalScrollShowing=e.verticalScrollShowing;var i={type:ht.EVENT_SCROLL_VISIBILITY_CHANGED};this.eventService.dispatchEvent(i)}},t.prototype.isHorizontalScrollShowing=function(){return this.horizontalScrollShowing},t.prototype.isVerticalScrollShowing=function(){return this.verticalScrollShowing},Cd([de("ctrlsService")],t.prototype,"ctrlsService",void 0),Cd([le],t.prototype,"postConstruct",null),t=Cd([ue("scrollVisibleService")],t),t}(st),wd=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Sd=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Ed=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.gridInstanceId=i.gridInstanceSequence.next(),t}var i;return wd(t,e),i=t,t.prototype.stampTopLevelGridCompWithGridInstance=function(e){e[i.GRID_DOM_KEY]=this.gridInstanceId},t.prototype.getRenderedCellForEvent=function(e){return Qe(this.gridOptionsService,e.target,Du.DOM_DATA_KEY_CELL_CTRL)},t.prototype.isEventFromThisGrid=function(e){var t=this.isElementInThisGrid(e.target);return t},t.prototype.isElementInThisGrid=function(e){var t=e;while(t){var n=t[i.GRID_DOM_KEY];if(o(n)){var r=n===this.gridInstanceId;return r}t=t.parentElement}return!1},t.prototype.getCellPositionForEvent=function(e){var t=this.getRenderedCellForEvent(e);return t?t.getCellPosition():null},t.prototype.getNormalisedPosition=function(e){var t,i,n=this.gridOptionsService.isDomLayout("normal"),o=e;if(null!=o.clientX||null!=o.clientY?(t=o.clientX,i=o.clientY):(t=o.x,i=o.y),n){var r=this.ctrlsService.getGridBodyCtrl(),s=r.getScrollFeature
11().getVScrollPosition(),a=r.getScrollFeature().getHScrollPosition();t+=a.left,i+=s.top}return{x:t,y:i}},t.gridInstanceSequence=new Yo,t.GRID_DOM_KEY="__ag_grid_instance",Sd([de("ctrlsService")],t.prototype,"ctrlsService",void 0),t=i=Sd([ue("mouseEventService")],t),t}(st),xd=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Od=function(){return Od=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Od.apply(this,arguments)},Td=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Dd=function(e){function t(){var t=e.call(this)||this;return t.onPageDown=q(t.onPageDown,100),t.onPageUp=q(t.onPageUp,100),t}return xd(t,e),t.prototype.postConstruct=function(){var e=this;this.ctrlsService.whenReady((function(t){e.gridBodyCon=t.gridBodyCtrl}))},t.prototype.handlePageScrollingKey=function(e,t){void 0===t&&(t=!1);var i=e.key,n=e.altKey,o=e.ctrlKey||e.metaKey,r=!!this.rangeService&&e.shiftKey,s=this.mouseEventService.getCellPositionForEvent(e),a=!1;switch(i){case xo.PAGE_HOME:case xo.PAGE_END:o||n||(this.onHomeOrEndKey(i),a=!0);break;case xo.LEFT:case xo.RIGHT:case xo.UP:case xo.DOWN:if(!s)return!1;!o||n||r||(this.onCtrlUpDownLeftRight(i,s),a=!0);break;case xo.PAGE_DOWN:case xo.PAGE_UP:o||n||(a=this.handlePageUpDown(i,s,t));break}return a&&e.preventDefault(),a},t.prototype.handlePageUpDown=function(e,t,i){return i&&(t=this.focusService.getFocusedCell()),!!t&&(e===xo.PAGE_UP?this.onPageUp(t):this.onPageDown(t),!0)},t.prototype.navigateTo=function(e){var t=e.scrollIndex,i=e.scrollType,n=e.scrollColumn,r=e.focusIndex,s=e.focusColumn;if(o(n)&&!n.isPinned()&&this.gridBodyCon.getScrollFeature().ensureColumnVisible(n),o(t)&&this.gridBodyCon.getScrollFeature().ensureIndexVisible(t,i),e.isAsync||this.gridBodyCon.getScrollFeature().ensureIndexVisible(r),this.focusService.setFocusedCell({rowIndex:r,column:s,rowPinned:null,forceBrowserFocus:!0}),this.rangeService){var a={rowIndex:r,rowPinned:null,column:s};this.rangeService.setRangeToCell(a)}},t.prototype.onPageDown=function(e){var t=this.ctrlsService.getGridBodyCtrl(),i=t.getScrollFeature().getVScrollPosition(),n=this.getViewportHeight(),o=this.paginationProxy.getPixelOffset(),r=i.top+n,s=this.paginationProxy.getRowIndexAtPixel(r+o);this.columnModel.isAutoRowHeightActive()?this.navigateToNextPageWithAutoHeight(e,s):this.navigateToNextPage(e,s)},t.prototype.onPageUp=function(e){var t=this.ctrlsService.getGridBodyCtrl(),i=t.getScrollFeature().getVScrollPosition(),n=this.paginationProxy.getPixelOffset(),o=i.top,r=this.paginationProxy.getRowIndexAtPixel(o+n);this.columnModel.isAutoRowHeightActive()?this.navigateToNextPageWithAutoHeight(e,r,!0):this.navigateToNextPage(e,r,!0)},t.prototype.navigateToNextPage=function(e,t,i){void 0===i&&(i=!1);var n,o=this.getViewportHeight(),r=this.paginationProxy.getPageFirstRow(),s=this.paginationProxy.getPageLastRow(),a=this.paginationProxy.getPixelOffset(),l=this.paginationProxy.getRow(e.rowIndex),c=i?(null===l||void 0===l?void 0:l.rowHeight)-o-a:o-a,u=(null===l||void 0===l?void 0:l.rowTop)+c,d=this.paginationProxy.getRowIndexAtPixel(u+a);if(d===e.rowIndex){var p=i?-1:1;t=d=e.rowIndex+p}i?(n="bottom",d<r&&(d=r),t<r&&(t=r)):(n="top",d>s&&(d=s),t>s&&(t=s)),this.isRowTallerThanView(d)&&(t=d,n="top"),this.navigateTo({scrollIndex:t,scrollType:n,scrollColumn:null,focusIndex:d,focusColumn:e.column})},t.prototype.navigateToNextPageWithAutoHeight=function(e,t,i){var n=this;void 0===i&&(i=!1),this.navigateTo({scrollIndex:t,scrollType:i?"bottom":"top",scrollC
11olumn:null,focusIndex:t,focusColumn:e.column}),setTimeout((function(){var o=n.getNextFocusIndexForAutoHeight(e,i);n.navigateTo({scrollIndex:t,scrollType:i?"bottom":"top",scrollColumn:null,focusIndex:o,focusColumn:e.column,isAsync:!0})}),50)},t.prototype.getNextFocusIndexForAutoHeight=function(e,t){var i;void 0===t&&(t=!1);var n=t?-1:1,o=this.getViewportHeight(),r=this.paginationProxy.getPageLastRow(),s=0,a=e.rowIndex;while(a>=0&&a<=r){var l=this.paginationProxy.getRow(a);if(l){var c=null!==(i=l.rowHeight)&&void 0!==i?i:0;if(s+c>o)break;s+=c}a+=n}return Math.max(0,Math.min(a,r))},t.prototype.getViewportHeight=function(){var e=this.ctrlsService.getGridBodyCtrl(),t=e.getScrollFeature().getVScrollPosition(),i=this.gridOptionsService.getScrollbarWidth(),n=t.bottom-t.top;return this.ctrlsService.getCenterRowContainerCtrl().isHorizontalScrollShowing()&&(n-=i),n},t.prototype.isRowTallerThanView=function(e){var t=this.paginationProxy.getRow(e);if(!t)return!1;var i=t.rowHeight;return"number"===typeof i&&i>this.getViewportHeight()},t.prototype.onCtrlUpDownLeftRight=function(e,t){var i=this.cellNavigationService.getNextCellToFocus(e,t,!0),n=i.rowIndex,o=i.column;this.navigateTo({scrollIndex:n,scrollType:null,scrollColumn:o,focusIndex:n,focusColumn:o})},t.prototype.onHomeOrEndKey=function(e){var t=e===xo.PAGE_HOME,i=this.columnModel.getAllDisplayedColumns(),n=t?i[0]:Ae(i),o=t?this.paginationProxy.getPageFirstRow():this.paginationProxy.getPageLastRow();this.navigateTo({scrollIndex:o,scrollType:null,scrollColumn:n,focusIndex:o,focusColumn:n})},t.prototype.onTabKeyDown=function(e,t){var i=t.shiftKey,n=this.tabToNextCellCommon(e,i,t);if(n)t.preventDefault();else if(i){var o=e.getRowPosition(),r=o.rowIndex,s=o.rowPinned,a=s?0===r:r===this.paginationProxy.getPageFirstRow();a&&(0===this.gridOptionsService.get("headerHeight")?this.focusService.focusNextGridCoreContainer(!0,!0):(t.preventDefault(),this.focusService.focusPreviousFromFirstCell(t)))}else e instanceof Du&&e.focusCell(!0),this.focusService.focusNextGridCoreContainer(i)&&t.preventDefault()},t.prototype.tabToNextCell=function(e,t){var i=this.focusService.getFocusedCell();if(!i)return!1;var n=this.getCellByPosition(i);return!!(n||(n=this.rowRenderer.getRowByPosition(i),n&&n.isFullWidth()))&&this.tabToNextCellCommon(n,e,t)},t.prototype.tabToNextCellCommon=function(e,t,i){var n,o=e.isEditing();if(!o&&e instanceof Du){var r=e,s=r.getRowCtrl();s&&(o=s.isEditing())}return n=o?"fullRow"===this.gridOptionsService.get("editType")?this.moveToNextEditingRow(e,t,i):this.moveToNextEditingCell(e,t,i):this.moveToNextCellNotEditing(e,t),n||!!this.focusService.getFocusedHeader()},t.prototype.moveToNextEditingCell=function(e,t,i){void 0===i&&(i=null);var n=e.getCellPosition();e.getGui().focus(),e.stopEditing();var o=this.findNextCellToFocusOn(n,t,!0);return null!=o&&(o.startEditing(null,!0,i),o.focusCell(!1),!0)},t.prototype.moveToNextEditingRow=function(e,t,i){void 0===i&&(i=null);var n=e.getCellPosition(),o=this.findNextCellToFocusOn(n,t,!0);if(null==o)return!1;var r=o.getCellPosition(),s=this.isCellEditable(n),a=this.isCellEditable(r),l=r&&n.rowIndex===r.rowIndex&&n.rowPinned===r.rowPinned;if(s&&e.setFocusOutOnEditor(),!l){var c=e.getRowCtrl();c.stopEditing();var u=o.getRowCtrl();u.startRowEditing(void 0,void 0,i)}return a?(o.setFocusInOnEditor(),o.focusCell()):o.focusCell(!0),!0},t.prototype.moveToNextCellNotEditing=function(e,t){var i,n=this.columnModel.getAllDisplayedColumns();i=e instanceof Lu?Od(Od({},e.getRowPosition()),{column:t?n[0]:Ae(n)}):e.getCellPosition();var r=this.findNextCellToFocusOn(i,t,!1);if(r instanceof Du)r.focusCell(!0);else if(r)return this.tryToFocusFullWidthRow(r.getRowPosition(),t);return o(r)},t.prototype.findNextCellToFocusOn=function(e,t,i){var n=e;while(1){e!==n&&(e=n),t||(n=this.getLastCellOfColSpan(n)),n=this.cellNavigationService.getNextTabbedCell(n,t);var r=this.gridOptionsService.getCallback("tabToNextCell");if(o(r)){var s={backwards:t,editing:i,previousCellPosition:e,nextCellPosition:n||null},a=r(s);o(a)?(a.floating&&(G("tabToNextCellFunc return type should have attributes: rowIndex, rowPinned, column. However you had 'floating', maybe you meant 'rowPinned'?"),a.rowPinned=a.floating),n={rowIndex:a.rowIndex,column:a.column,rowPinned:a.rowPinned}):n=null}if(!n)return null;if(n.rowIndex<0){var l=this.headerNavigationService.getHeaderRowCount();return this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:l+n.rowIndex,column:n.column},fromCell:!0}),null}var c="fullRow"===this.gridOptionsService.get("editType");if(i&&!c){var u=this.isCellEditable(n);if(!u)continue}this.ensureCellVisible(n);var d=this.getCellByPosition(n);if(!d){var p=this.rowRenderer.getRowByPosition(n);if(!p||!p.isFullWidth()||i)continue;return p}if(!d.isSuppressNavigable())return this.rangeService&&this.rangeService.setRangeToCell(n),d}},t.prototype.isCellEditable=function(e){var t=this.lookupRowNodeForCell(e);return!!t&&e.column.isCellEditable(t)},t.prototype.getCellByPosition=function(e){var t=this.rowRenderer.getRowByPosition(e);return t?t.getCellCtrl(e.column):null},t.prototype.lookupRowNodeForCell=function(e){return"top"===e.rowPinned?this.pinnedRowModel.getPinnedTopRow(e.rowIndex):"bottom"===e.rowPinned?this.pinnedRowModel.getPinnedBottomRow(e.rowIndex):this.paginationProxy.getRow(e.rowIndex)},t.prototype.navigateToNextCell=function(e,t,i,n){var s=i,a=!1;while(s&&(s===i||!this.isValidNavigateCell(s)))this.gridOptionsService.get("enableRtl")?t===xo.LEFT&&(s=this.getLastCellOfColSpan(s)):t===xo.RIGHT&&(s=this.getLastCellOfColSpan(s)),s=this.cellNavigationService.getNextCellToFocus(t,
11s),a=r(s);if(a&&e&&e.key===xo.UP&&(s={rowIndex:-1,rowPinned:null,column:i.column}),n){var l=this.gridOptionsService.getCallback("navigateToNextCell");if(o(l)){var c={key:t,previousCellPosition:i,nextCellPosition:s||null,event:e},u=l(c);o(u)?(u.floating&&(G("tabToNextCellFunc return type should have attributes: rowIndex, rowPinned, column. However you had 'floating', maybe you meant 'rowPinned'?"),u.rowPinned=u.floating),s={rowPinned:u.rowPinned,rowIndex:u.rowIndex,column:u.column}):s=null}}if(s)if(s.rowIndex<0){var d=this.headerNavigationService.getHeaderRowCount();this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:d+s.rowIndex,column:i.column},event:e||void 0,fromCell:!0})}else{var p=this.getNormalisedPosition(s);p?this.focusPosition(p):this.tryToFocusFullWidthRow(s)}},t.prototype.getNormalisedPosition=function(e){this.ensureCellVisible(e);var t=this.getCellByPosition(e);return t?(e=t.getCellPosition(),this.ensureCellVisible(e),e):null},t.prototype.tryToFocusFullWidthRow=function(e,t){void 0===t&&(t=!1);var i=this.columnModel.getAllDisplayedColumns(),n=this.rowRenderer.getRowByPosition(e);if(!n||!n.isFullWidth())return!1;var o=this.focusService.getFocusedCell(),r={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column||(t?Ae(i):i[0])};this.focusPosition(r);var s=null!=o&&this.rowPositionUtils.before(r,o),a={type:ht.EVENT_FULL_WIDTH_ROW_FOCUSED,rowIndex:r.rowIndex,rowPinned:r.rowPinned,column:r.column,isFullWidthCell:!0,floating:r.rowPinned,fromBelow:s};return this.eventService.dispatchEvent(a),!0},t.prototype.focusPosition=function(e){this.focusService.setFocusedCell({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0}),this.rangeService&&this.rangeService.setRangeToCell(e)},t.prototype.isValidNavigateCell=function(e){var t=this.rowPositionUtils.getRowNode(e);return!!t},t.prototype.getLastCellOfColSpan=function(e){var t=this.getCellByPosition(e);if(!t)return e;var i=t.getColSpanningList();return 1===i.length?e:{rowIndex:e.rowIndex,column:Ae(i),rowPinned:e.rowPinned}},t.prototype.ensureCellVisible=function(e){var t=this.gridOptionsService.isGroupRowsSticky(),i=this.rowModel.getRow(e.rowIndex),n=t&&(null===i||void 0===i?void 0:i.sticky);!n&&r(e.rowPinned)&&this.gridBodyCon.getScrollFeature().ensureIndexVisible(e.rowIndex),e.column.isPinned()||this.gridBodyCon.getScrollFeature().ensureColumnVisible(e.column)},Td([de("mouseEventService")],t.prototype,"mouseEventService",void 0),Td([de("paginationProxy")],t.prototype,"paginationProxy",void 0),Td([de("focusService")],t.prototype,"focusService",void 0),Td([pe("rangeService")],t.prototype,"rangeService",void 0),Td([de("columnModel")],t.prototype,"columnModel",void 0),Td([de("rowModel")],t.prototype,"rowModel",void 0),Td([de("ctrlsService")],t.prototype,"ctrlsService",void 0),Td([de("rowRenderer")],t.prototype,"rowRenderer",void 0),Td([de("headerNavigationService")],t.prototype,"headerNavigationService",void 0),Td([de("rowPositionUtils")],t.prototype,"rowPositionUtils",void 0),Td([de("cellNavigationService")],t.prototype,"cellNavigationService",void 0),Td([de("pinnedRowModel")],t.prototype,"pinnedRowModel",void 0),Td([le],t.prototype,"postConstruct",null),t=Td([ue("navigationService")],t),t}(st),Rd=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ad=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},_d=function(e){function t(t){var i=e.call(this,'<div class="ag-popup-editor" tabindex="-1"/>')||this;return i.params=t,i}return Rd(t,e),t.prototype.postConstruct=function(){this.gridOptionsService.setDomData(this.getGui(),t.DOM_KEY_POPUP_EDITOR_WRAPPER,!0),this.addKeyDownListener()},t.prototype.addKeyDownListener=function(){var e=this,t=this.getGui(),i=this.params,n=function(t){Mo(e.gridOptionsService,t,i.node,i.column,!0)||i.onKeyDown(t)};this.addManagedListener(t,"keydown",n)},t.DOM_KEY_POPUP_EDITOR_WRAPPER="popupEditorWrapper",Ad([le],t.prototype,"postConstruct",null),t}(Qs),Pd=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Md=function(e){function t(t,i,n,o,r){var s=e.call(this)||this;
11s.rendererVersion=0,s.editorVersion=0,s.beans=t,s.column=i.getColumn(),s.rowNode=i.getRowNode(),s.rowCtrl=i.getRowCtrl(),s.eRow=o,s.cellCtrl=i,s.setTemplate('<div comp-id="'.concat(s.getCompId(),'"/>'));var a=s.getGui();s.forceWrapper=i.isForceWrapper(),s.refreshWrapper(!1);var l=function(e,t){null!=t&&""!=t?a.setAttribute(e,t):a.removeAttribute(e)};si(a,i.getCellAriaRole()),l("col-id",i.getColumnIdSanitised());var c=i.getTabIndex();void 0!==c&&l("tabindex",c.toString());var u={addOrRemoveCssClass:function(e,t){return s.addOrRemoveCssClass(e,t)},setUserStyles:function(e){return Qn(a,e)},getFocusableElement:function(){return s.getFocusableElement()},setIncludeSelection:function(e){return s.includeSelection=e},setIncludeRowDrag:function(e){return s.includeRowDrag=e},setIncludeDndSource:function(e){return s.includeDndSource=e},setRenderDetails:function(e,t,i){return s.setRenderDetails(e,t,i)},setEditDetails:function(e,t,i){return s.setEditDetails(e,t,i)},getCellEditor:function(){return s.cellEditor||null},getCellRenderer:function(){return s.cellRenderer||null},getParentOfValue:function(){return s.getParentOfValue()}};return i.setComp(u,s.getGui(),s.eCellWrapper,n,r),s}return Pd(t,e),t.prototype.getParentOfValue=function(){return this.eCellValue?this.eCellValue:this.eCellWrapper?this.eCellWrapper:this.getGui()},t.prototype.setRenderDetails=function(e,t,i){var n=this.cellEditor&&!this.cellEditorPopupWrapper;if(!n){this.firstRender=null==this.firstRender;var o=this.refreshWrapper(!1);if(this.refreshEditStyles(!1),e){var r=i||o,s=!r&&this.refreshCellRenderer(e);s||(this.destroyRenderer(),this.createCellRendererInstance(e))}else this.destroyRenderer(),this.insertValueWithoutCellRenderer(t)}},t.prototype.setEditDetails=function(e,t,i){e?this.createCellEditorInstance(e,t,i):this.destroyEditor()},t.prototype.removeControls=function(){this.checkboxSelectionComp=this.beans.context.destroyBean(this.checkboxSelectionComp),this.dndSourceComp=this.beans.context.destroyBean(this.dndSourceComp),this.rowDraggingComp=this.beans.context.destroyBean(this.rowDraggingComp)},t.prototype.refreshWrapper=function(e){var t=this.includeRowDrag||this.includeDndSource||this.includeSelection,i=t||this.forceWrapper,n=i&&null==this.eCellWrapper;n&&(this.eCellWrapper=Kn('<div class="ag-cell-wrapper" role="presentation"></div>'),this.getGui().appendChild(this.eCellWrapper));var o=!i&&null!=this.eCellWrapper;o&&(Un(this.eCellWrapper),this.eCellWrapper=void 0),this.addOrRemoveCssClass("ag-cell-value",!i);var r=!e&&i,s=r&&null==this.eCellValue;s&&(this.eCellValue=Kn('<span class="ag-cell-value" role="presentation"></span>'),this.eCellWrapper.appendChild(this.eCellValue));var a=!r&&null!=this.eCellValue;a&&(Un(this.eCellValue),this.eCellValue=void 0);var l=n||o||s||a;return l&&this.removeControls(),e||t&&this.addControls(),l},t.prototype.addControls=function(){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))},t.prototype.createCellEditorInstance=function(e,t,i){var n=this,o=this.editorVersion,s=e.newAgStackInstance();if(s){var a=e.params;s.then((function(e){return n.afterCellEditorCreated(o,e,a,t,i)}));var l=r(this.cellEditor);l&&a.cellStartedEdit&&this.cellCtrl.focusCell(!0)}},t.prototype.insertValueWithoutCellRenderer=function(e){var t=this.getParentOfValue();Wn(t);var i=null!=e?Et(e):null;null!=i&&(t.innerHTML=i)},t.prototype.destroyEditorAndRenderer=function(){this.destroyRenderer(),this.destroyEditor()},t.prototype.destroyRenderer=function(){var e=this.beans.context;this.cellRenderer=e.destroyBean(this.cellRenderer),Un(this.cellRendererGui),this.cellRendererGui=null,this.rendererVersion++},t.prototype.destroyEditor=function(){var e=this.beans.context;this.hideEditorPopup&&this.hideEditorPopup(),this.hideEditorPopup=void 0,this.cellEditor=e.destroyBean(this.cellEditor),this.cellEditorPopupWrapper=e.destroyBean(this.cellEditorPopupWrapper),Un(this.cellEditorGui),this.cellEditorGui=null,this.editorVersion++},t.prototype.refreshCellRenderer=function(e){if(null==this.cellRenderer||null==this.cellRenderer.refresh)return!1;if(this.cellRendererClass!==e.componentClass)return!1;var t=this.cellRenderer.refresh(e.params);return!0===t||void 0===t},t.prototype.createCellRendererInstance=function(e){var t=this,i=this.beans.gridOptionsService.get("suppressAnimationFrame"),n=!i,o=this.rendererVersion,r=e.componentClass,s=function(){var i=t.rendererVersion!==o||!t.isAlive();if(!i){var n=e.newAgStackInstance(),s=t.afterCellRendererCreated.bind(t,o,r);n&&n.then(s)}};
11n&&this.firstRender?this.beans.animationFrameService.createTask(s,this.rowNode.rowIndex,"createTasksP2"):s()},t.prototype.getCtrl=function(){return this.cellCtrl},t.prototype.getRowCtrl=function(){return this.rowCtrl},t.prototype.getCellRenderer=function(){return this.cellRenderer},t.prototype.getCellEditor=function(){return this.cellEditor},t.prototype.afterCellRendererCreated=function(e,t,i){var n=!this.isAlive()||e!==this.rendererVersion;if(n)this.beans.context.destroyBean(i);else if(this.cellRenderer=i,this.cellRendererClass=t,this.cellRendererGui=this.cellRenderer.getGui(),null!=this.cellRendererGui){var o=this.getParentOfValue();Wn(o),o.appendChild(this.cellRendererGui)}},t.prototype.afterCellEditorCreated=function(e,t,i,n,o){var r=e!==this.editorVersion;if(r)this.beans.context.destroyBean(t);else{var s=t.isCancelBeforeStart&&t.isCancelBeforeStart();if(s)return this.beans.context.destroyBean(t),void this.cellCtrl.stopEditing(!0);if(!t.getGui)return console.warn("AG Grid: cellEditor for column ".concat(this.column.getId()," is missing getGui() method")),void this.beans.context.destroyBean(t);this.cellEditor=t,this.cellEditorGui=t.getGui();var a=n||void 0!==t.isPopup&&t.isPopup();a?this.addPopupCellEditor(i,o):this.addInCellEditor(),this.refreshEditStyles(!0,a),t.afterGuiAttached&&t.afterGuiAttached()}},t.prototype.refreshEditStyles=function(e,t){var i;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),null===(i=this.rowCtrl)||void 0===i||i.setInlineEditingCss(e)},t.prototype.addInCellEditor=function(){var e=this.getGui(),t=this.beans.gridOptionsService.getDocument();if(e.contains(t.activeElement)&&e.focus(),this.destroyRenderer(),this.refreshWrapper(!0),this.clearParentOfValue(),this.cellEditorGui){var i=this.getParentOfValue();i.appendChild(this.cellEditorGui)}},t.prototype.addPopupCellEditor=function(e,t){var i=this;"fullRow"===this.beans.gridOptionsService.get("editType")&&console.warn("AG Grid: popup cellEditor does not work with fullRowEdit - you cannot use them both - either turn off fullRowEdit, or stop using popup editors.");var n=this.cellEditor;this.cellEditorPopupWrapper=this.beans.context.createBean(new _d(e));var o=this.cellEditorPopupWrapper.getGui();this.cellEditorGui&&o.appendChild(this.cellEditorGui);var r=this.beans.popupService,s=this.beans.gridOptionsService.get("stopEditingWhenCellsLoseFocus"),a=null!=t?t:n.getPopupPosition?n.getPopupPosition():"over",l=this.beans.gridOptionsService.get("enableRtl"),c={ePopup:o,column:this.column,rowNode:this.rowNode,type:"popupCellEditor",eventSource:this.getGui(),position:a,alignSide:l?"right":"left",keepWithinBounds:!0},u=r.positionPopupByComponent.bind(r,c),d=this.beans.localeService.getLocaleTextFunc(),p=r.addPopup({modal:s,eChild:o,closeOnEsc:!0,closedCallback:function(){i.cellCtrl.onPopupEditorClosed()},anchorToElement:this.getGui(),positionCallback:u,ariaLabel:d("ariaLabelCellEditor","Cell Editor")});p&&(this.hideEditorPopup=p.hideFunc)},t.prototype.detach=function(){this.eRow.removeChild(this.getGui())},t.prototype.destroy=function(){this.cellCtrl.stopEditing(),this.destroyEditorAndRenderer(),this.removeControls(),e.prototype.destroy.call(this)},t.prototype.clearParentOfValue=function(){var e=this.getGui(),t=this.beans.gridOptionsService.getDocument();e.contains(t.activeElement)&&Qi()&&e.focus({preventScroll:!0}),Wn(this.getParentOfValue())},t}(rr),kd=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Nd=function(e){function t(t,i,n){var o=e.call(this)||this;o.cellComps={},o.beans=i,o.rowCtrl=t,o.setTemplate('<div comp-id="'.concat(o.getCompId(),'" style="').concat(o.getInitialStyle(n),'"/>'));var r=o.getGui(),s=r.style;o.domOrder=o.rowCtrl.getDomOrder(),si(r,"row");var a=o.rowCtrl.getTabIndex();null!=a&&r.setAttribute("tabindex",a.toString());var l={setDomOrder:function(e){return o.domOrder=e},setCellCtrls:function(e){return o.setCellCtrls(e)},showFullWidth:function(e){return o.showFullWidth(e)},getFullWidthCellRenderer:function(){return o.getFullWidthCellRenderer()},addOrRemoveCssClass:function(e,t){return o.addOrRemoveCssClass(e,t)},setUserStyles:function(e){return Qn(r,e)},setTop:function(e){return s.top=e},setTransform:function(e){return s.transform=e},setRowIndex:function(e){return r.setAttribute("row-index",e)},setRowId:function(e){return r.setAttribute("row-id",e)},setRowBusinessKey:function(e){return r.setAttribute("row-business-key",e)}};return t.setComp(l,o.getGui(),n),o.addDestroyFunc((function(){t.unsetComp(n)})),o}return kd(t,e),t.prototype.getInitialStyle=function(e){var t=this.rowCtrl.getInitialTransform(e),i=this.rowCtrl.getInitialRowTop(e);return t?"transform: ".concat(t):"top: ".concat(i)},t.prototype.showFullWidth=function(e){var t=this,i=function(e){if(t.isAlive()){var i=e.getGui();t.getGui().appendChild(i),t.rowCtrl.setupDetailRowAutoHeight(i),t.setFullWidthRowComp(e)}else t.beans.context.destroyBean(e)},n=e.newAgStackInstance();n&&n.then(i)},t.prototype.setCellCtrls=function(e){var t=this,i=Object.assign({},this.cellComps);e.forEach((function(e){var n=e.getInstanceId(),o=t.cellComps[n];null==o?t.newCellComp(e):i[n]=null}));var n=D(i).filter((function(e){return null!=e}));this.destroyCells(n),this.ensureDomOrder(e)},t.prototype.ensureDomOrder=function(e){var t=this;if(this.domOrder){var i=[];e.forEach((function(e){var n=t.cellComps[e.getInstanceId()];n&&i.push(n.getGui())})),Zn(this.getGui(),i)}},t.prototype.newCellComp=function(e){var t=new Md(this.beans,e,this.rowCtrl.isPrintLayout(),this.getGui(),this.rowCtrl.isEditing());this.cellComps[e.getInstanceId()]=t,this.getGui().appendChild(t.getGui())},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.destroyAllCells()},t.prototype.destroyAllCells=function(){var e=D(this.cellComps).filter((function(e){return null!=e}));this.destroyCells(e)},t.prototype.setFullWidthRowComp=function(e){var t=this;this.fullWidthCellRenderer&&console.error("AG Grid - should not be setting fullWidthRowComponent twice"),this.fullWidthCellRenderer=e,this.addDestroyFunc((function(){t.fullWidthCellRenderer=t.beans.context.destroyBean(t.fullWidthCellRenderer)}))},t.prototype.getFullWidthCellRenderer=function(){return this.fullWidthCellRenderer},t.prototype.destroyCells=function(e){var t=this;e.forEach((function(e){if(e){var i=e.getCtrl().getInstanceId();
11t.cellComps[i]===e&&(e.detach(),e.destroy(),t.cellComps[i]=null)}}))},t}(rr),Ld=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Id=function(){return Id=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Id.apply(this,arguments)},Fd=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};function Gd(){var e,t=rr.elementGettingCreated.getAttribute("name"),i=hd.getRowContainerCssClasses(t),n=t===Mu.CENTER||t===Mu.TOP_CENTER||t===Mu.STICKY_TOP_CENTER||t===Mu.BOTTOM_CENTER;return e=n?'<div class="'.concat(i.viewport,'" ref="eViewport" role="presentation">\n                <div class="').concat(i.container,'" ref="eContainer"></div>\n            </div>'):'<div class="'.concat(i.container,'" ref="eContainer"></div>'),e}var Vd,Bd=function(e){function t(){var t=e.call(this,Gd())||this;return t.rowComps={},t.name=rr.elementGettingCreated.getAttribute("name"),t.type=ud(t.name),t}return Ld(t,e),t.prototype.postConstruct=function(){var e=this,t={setViewportHeight:function(t){return e.eViewport.style.height=t},setRowCtrls:function(t){return e.setRowCtrls(t)},setDomOrder:function(t){e.domOrder=t},setContainerWidth:function(t){return e.eContainer.style.width=t}},i=this.createManagedBean(new hd(this.name));i.setComp(t,this.eContainer,this.eViewport)},t.prototype.preDestroy=function(){this.setRowCtrls([])},t.prototype.setRowCtrls=function(e){var t=this,i=Id({},this.rowComps);this.rowComps={},this.lastPlacedElement=null;var n=function(e){var n=e.getInstanceId(),o=i[n];if(o)t.rowComps[n]=o,delete i[n],t.ensureDomOrder(o.getGui());else{if(!e.getRowNode().displayed)return;var r=new Nd(e,t.beans,t.type);t.rowComps[n]=r,t.appendRow(r.getGui())}};
11e.forEach(n),D(i).forEach((function(e){t.eContainer.removeChild(e.getGui()),e.destroy()})),si(this.eContainer,e.length?"rowgroup":"presentation")},t.prototype.appendRow=function(e){this.domOrder?Jn(this.eContainer,e,this.lastPlacedElement):this.eContainer.appendChild(e),this.lastPlacedElement=e},t.prototype.ensureDomOrder=function(e){this.domOrder&&($n(this.eContainer,e,this.lastPlacedElement),this.lastPlacedElement=e)},Fd([de("beans")],t.prototype,"beans",void 0),Fd([sr("eViewport")],t.prototype,"eViewport",void 0),Fd([sr("eContainer")],t.prototype,"eContainer",void 0),Fd([le],t.prototype,"postConstruct",null),Fd([ce],t.prototype,"preDestroy",null),t}(rr),jd=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Hd=function(){function e(e){this.columnsToAggregate=[],this.columnsToGroup=[],this.columnsToPivot=[],this.pinned=e}return e.prototype.onDragEnter=function(e){var t=this;if(this.clearColumnsList(),!this.gridOptionsService.get("functionsReadOnly")){var i=e.dragItem.columns;i&&i.forEach((function(e){e.isPrimary()&&(e.isAnyFunctionActive()||(e.isAllowValue()?t.columnsToAggregate.push(e):e.isAllowRowGroup()?t.columnsToGroup.push(e):e.isAllowPivot()&&t.columnsToPivot.push(e)))}))}},e.prototype.getIconName=function(){var e=this.columnsToAggregate.length+this.columnsToGroup.length+this.columnsToPivot.length;return e>0?this.pinned?Pa.ICON_PINNED:Pa.ICON_MOVE:null},e.prototype.onDragLeave=function(e){this.clearColumnsList()},e.prototype.clearColumnsList=function(){this.columnsToAggregate.length=0,this.columnsToGroup.length=0,this.columnsToPivot.length=0},e.prototype.onDragging=function(e){},e.prototype.onDragStop=function(e){this.columnsToAggregate.length>0&&this.columnModel.addValueColumns(this.columnsToAggregate,"toolPanelDragAndDrop"),this.columnsToGroup.length>0&&this.columnModel.addRowGroupColumns(this.columnsToGroup,"toolPanelDragAndDrop"),this.columnsToPivot.length>0&&this.columnModel.addPivotColumns(this.columnsToPivot,"toolPanelDragAndDrop")},jd([de("columnModel")],e.prototype,"columnModel",void 0),jd([de("gridOptionsService")],e.prototype,"gridOptionsService",void 0),e}(),Wd=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},Ud=function(){function e(){}return e.attemptMoveColumns=function(e){var t=e.isFromHeader,i=e.hDirection,n=e.xPosition,o=e.fromEnter,r=e.fakeEvent,s=e.pinned,a=e.gridOptionsService,l=e.columnModel,c=i===Ds.Left,u=i===Ds.Right,d=e.allMovingColumns;if(t){var p=[];d.forEach((function(e){var t,i=null,n=e.getParent();while(null!=n&&1===n.getDisplayedLeafColumns().length)i=n,n=n.getParent();if(null!=i){var o=!!(null===(t=i.getColGroupDef())||void 0===t?void 0:t.marryChildren),r=o?i.getProvidedColumnGroup().getLeafColumns():i.getLeafColumns();r.forEach((function(e){p.includes(e)||p.push(e)}))}else p.includes(e)||p.push(e)})),d=p}var h=d.slice();l.sortColumnsLikeGridColumns(h);var f=this.calculateValidMoves({movingCols:h,draggingRight:u,xPosition:n,pinned:s,gridOptionsService:a,columnModel:l}),g=this.calculateOldIndex(h,l);if(0!==f.length){var v=f[0],y=null!==g&&!o;if(t&&(y=null!==g),y&&!r){if(c&&v>=g)return;if(u&&v<=g)return}for(var m=l.getAllDisplayedColumns(),C=[],b=null,w=0;w<f.length;w++){var S=f[w],E=l.getProposedColumnOrder(h,S);if(l.doesOrderPassRules(E)){var x=E.filter((function(e){return m.includes(e)}));if(null===b)b=x;else if(!_e(x,b))break;var O=this.groupFragCount(E);C.push({move:S,fragCount:O})}}if(0!==C.length)return C.sort((function(e,t){return e.fragCount-t.fragCount})),this.moveColumns(d,C[0].move,"uiColumnMoved",!1,l)}},e.moveColumns=function(e,t,i,n,o){return o.moveColumns(e,t,i,n),n?null:{columns:e,toIndex:t}},e.calculateOldIndex=function(e,t){var i=t.getAllGridColumns(),n=Me(e.map((function(e){return i.indexOf(e)}))),o=n[0],r=Ae(n),s=r-o,a=s!==n.length-1;return a?null:o},e.groupFragCount=function(e){function t(e){var t=[],i=e.getOriginalParent();while(null!=i)t.push(i),i=i.getOriginalParent();return t}for(var i=0,n=function(n){var o,r=t(e[n]),s=t(e[n+1]);o=Wd(r.length>s.length?[r,s]:[s,r],2),r=o[0],s=o[1],r.forEach((function(e){-1===s.indexOf(e)&&i++}))},o=0;o<e.length-1;o++)n(o);return i},e.calculateValidMoves=function(e){var t=e.movingCols,i=e.draggingRight,n=e.xPosition,o=e.pinned,r=e.gridOptionsService,s=e.columnModel,a=r.get("suppressMovableColumns")||t.some((function(e){return e.getColDef().suppressMovable}));if(a)return[];var l,c=s.getDisplayedColumns(o),u=s.getAllGridColumns(),d=c.filter((function(e){return je(t,e)})),p=c.filter((function(e){return!je(t,e)})),h=u.filter((function(e){return!je(t,e)})),f=0,g=n;if(i){var v=0;d.forEach((function(e){return v+=e.getActualWidth()})),g-=v}if(g>0){for(var y=0;y<p.length;y++){var m=p[y];if(g-=m.getActualWidth(),g<0)break;f++}i&&f++}if(f>0){var C=p[f-1];l=h.indexOf(C)+1}else l=h.indexOf(p[0]),-1===l&&(l=0);var b=[l],w=function(e,t){return e-t};if(i){var S=l+1,E=u.length-1;while(S<=E)b.push(S),S++;b.sort(w)}else{S=l,E=u.length-1;var x=u[S];while(S<=E&&c.indexOf(x)<0)S++,b.push(S),x=u[S];S=l-1;var O=0;while(S>=O)b.push(S),S--;b.sort(w).reverse()}return b},e.normaliseX=function(e,t,i,n,o){var r=o.getHeaderRowContainerCtrl(t).getViewport();if(i&&(e-=r.getBoundingClientRect().left),n.get("enableRtl")){var s=r.clientWidth;e=s-e}return null==t&&(e+=o.getCenterRowContainerCtrl().getCenterViewportScrollLeft()),e},e}(),zd=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Kd=function(){function e(e,t){this.needToMoveLeft=!1,this.needToMoveRight=!1,this.lastMovedInfo=null,this.pinned=e,this.eContainer=t,this.centerContainer=!o(e)}return e.prototype.init=function(){var e=this;this.ctrlsService.whenReady((function(){e.gridBodyCon=e.ctrlsService.getGridBodyCtrl()}))},e.prototype.getIconName=function(){return this.pinned?Pa.ICON_PINNED:Pa.ICON_MOVE},e.prototype.onDragEnter=function(e){var t=e.dragItem.columns,i=e.dragSource.type===Ta.ToolPanel;if(i)this.setColumnsVisible(t,!0,"uiColumnDragged");else{var n=e.dragItem.visibleState,o=(t||[]).filter((function(e){return n[e.getId()]}));this.setColumnsVisible(o,!0,"uiColumnDragged")}this.setColumnsPinned(t,this.pinned,"uiColumnDragged"),this.onDragging(e,!0,!0)},e.prototype.onDragLeave=function(){this.ensureIntervalCleared(),this.lastMovedInfo=null},e.prototype.setColumnsVisible=function(e,t,i){if(void 0===i&&(i="api"),e){var n=e.filter((function(e){return!e.getColDef().lockVisible}));this.columnModel.setColumnsVisible(n,t,i)}},e.prototype.setColumnsPinned=function(e,t,i){if(void 0===i&&(i="api"),e){var n=e.filter((function(e){return!e.getColDef().lockPinned}));this.columnModel.setColumnsPinned(n,t,i)}},e.prototype.onDragStop=function(){this.onDragging(this.lastDraggingEvent,!1,!0,!0),this.ensureIntervalCleared(),this.lastMovedInfo=null},e.prototype.checkCenterForScrolling=function(e){if(this.centerContainer){var t=this.ctrlsService.getCenterRowContainerCtrl().getCenterViewportScrollLeft(),i=t+this.ctrlsService.getCenterRowContainerCtrl().getCenterWidth();this.gridOptionsService.get("enableRtl")?(this.needToMoveRight=e<t+50,this.needToMoveLeft=e>i-50):(this.needToMoveLeft=e<t+50,this.needToMoveRight=e>i-50),this.needToMoveLeft||this.needToMoveRight?this.ensureIntervalStarted():this.ensureIntervalCleared()}},e.prototype.onDragging=function(e,t,i,n){var o,s=this;if(void 0===e&&(e=this.lastDraggingEvent),void 0===t&&(t=!1),void 0===i&&(i=!1),void 0===n&&(n=!1),n){if(this.lastMovedInfo){var a=this.lastMovedInfo,l=a.columns,c=a.toIndex;
11Ud.moveColumns(l,c,"uiColumnMoved",!0,this.columnModel)}}else if(this.lastDraggingEvent=e,!r(e.hDirection)){var u=Ud.normaliseX(e.x,this.pinned,!1,this.gridOptionsService,this.ctrlsService);t||this.checkCenterForScrolling(u);var d=this.normaliseDirection(e.hDirection),p=e.dragSource.type,h=(null===(o=e.dragSource.getDragItem().columns)||void 0===o?void 0:o.filter((function(e){return!e.getColDef().lockPinned||e.getPinned()==s.pinned})))||[],f=Ud.attemptMoveColumns({allMovingColumns:h,isFromHeader:p===Ta.HeaderCell,hDirection:d,xPosition:u,pinned:this.pinned,fromEnter:t,fakeEvent:i,gridOptionsService:this.gridOptionsService,columnModel:this.columnModel});f&&(this.lastMovedInfo=f)}},e.prototype.normaliseDirection=function(e){if(!this.gridOptionsService.get("enableRtl"))return e;switch(e){case Ds.Left:return Ds.Right;case Ds.Right:return Ds.Left;default:console.error("AG Grid: Unknown direction ".concat(e))}},e.prototype.ensureIntervalStarted=function(){this.movingIntervalId||(this.intervalCount=0,this.failedMoveAttempts=0,this.movingIntervalId=window.setInterval(this.moveInterval.bind(this),100),this.needToMoveLeft?this.dragAndDropService.setGhostIcon(Pa.ICON_LEFT,!0):this.dragAndDropService.setGhostIcon(Pa.ICON_RIGHT,!0))},e.prototype.ensureIntervalCleared=function(){this.movingIntervalId&&(window.clearInterval(this.movingIntervalId),this.movingIntervalId=null,this.dragAndDropService.setGhostIcon(Pa.ICON_MOVE))},e.prototype.moveInterval=function(){var e;this.intervalCount++,e=10+5*this.intervalCount,e>100&&(e=100);var 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{this.failedMoveAttempts++;var n=this.lastDraggingEvent.dragItem.columns,o=n.filter((function(e){return!e.getColDef().lockPinned}));if(o.length>0&&(this.dragAndDropService.setGhostIcon(Pa.ICON_PINNED),this.failedMoveAttempts>7)){var r=this.needToMoveLeft?"left":"right";this.setColumnsPinned(o,r,"uiColumnDragged"),this.dragAndDropService.nudge()}}},zd([de("columnModel")],e.prototype,"columnModel",void 0),zd([de("dragAndDropService")],e.prototype,"dragAndDropService",void 0),zd([de("gridOptionsService")],e.prototype,"gridOptionsService",void 0),zd([de("ctrlsService")],e.prototype,"ctrlsService",void 0),zd([le],e.prototype,"init",null),e}(),Yd=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),qd=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Xd=function(e){function t(t,i){var n=e.call(this)||this;return n.pinned=t,n.eContainer=i,n}return Yd(t,e),t.prototype.postConstruct=function(){var e=this;this.ctrlsService.whenReady((function(t){switch(e.pinned){case"left":e.eSecondaryContainers=[[t.gridBodyCtrl.getBodyViewportElement(),t.leftRowContainerCtrl.getContainerElement()],[t.bottomLeftRowContainerCtrl.getContainerElement()],[t.topLeftRowContainerCtrl.getContainerElement()]];break;case"right":e.eSecondaryContainers=[[t.gridBodyCtrl.getBodyViewportElement(),t.rightRowContainerCtrl.getContainerElement()],[t.bottomRightRowContainerCtrl.getContainerElement()],[t.topRightRowContainerCtrl.getContainerElement()]];break;default:e.eSecondaryContainers=[[t.gridBodyCtrl.getBodyViewportElement(),t.centerRowContainerCtrl.getViewportElement()],[t.bottomCenterRowContainerCtrl.getViewportElement()],[t.topCenterRowContainerCtrl.getViewportElement()]];break}}
11))},t.prototype.isInterestedIn=function(e){return e===Ta.HeaderCell||e===Ta.ToolPanel&&this.gridOptionsService.get("allowDragFromColumnsToolPanel")},t.prototype.getSecondaryContainers=function(){return this.eSecondaryContainers},t.prototype.getContainer=function(){return this.eContainer},t.prototype.init=function(){this.moveColumnFeature=this.createManagedBean(new Kd(this.pinned,this.eContainer)),this.bodyDropPivotTarget=this.createManagedBean(new Hd(this.pinned)),this.dragAndDropService.addDropTarget(this)},t.prototype.getIconName=function(){return this.currentDropListener.getIconName()},t.prototype.isDropColumnInPivotMode=function(e){return this.columnModel.isPivotMode()&&e.dragSource.type===Ta.ToolPanel},t.prototype.onDragEnter=function(e){this.currentDropListener=this.isDropColumnInPivotMode(e)?this.bodyDropPivotTarget:this.moveColumnFeature,this.currentDropListener.onDragEnter(e)},t.prototype.onDragLeave=function(e){this.currentDropListener.onDragLeave(e)},t.prototype.onDragging=function(e){this.currentDropListener.onDragging(e)},t.prototype.onDragStop=function(e){this.currentDropListener.onDragStop(e)},qd([de("dragAndDropService")],t.prototype,"dragAndDropService",void 0),qd([de("columnModel")],t.prototype,"columnModel",void 0),qd([de("ctrlsService")],t.prototype,"ctrlsService",void 0),qd([le],t.prototype,"postConstruct",null),qd([le],t.prototype,"init",null),t}(st),$d=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Zd=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Jd=function(e){function t(i){var n=e.call(this,t.TEMPLATE,i)||this;return n.headerCompVersion=0,n.column=i.getColumnGroupChild(),n.pinned=i.getPinned(),n}return $d(t,e),t.prototype.postConstruct=function(){var e=this,t=this.getGui(),i=function(e,i){null!=i&&""!=i?t.setAttribute(e,i):t.removeAttribute(e)};i("col-id",this.column.getColId());var n={setWidth:function(e){return t.style.width=e},addOrRemoveCssClass:function(t,i){return e.addOrRemoveCssClass(t,i)},setAriaDescription:function(e){return hi(t,e)},setAriaSort:function(e){return e?Mi(t,e):ki(t)},setUserCompDetails:function(t){return e.setUserCompDetails(t)},getUserCompInstance:function(){return e.headerComp}};this.ctrl.setComp(n,this.getGui(),this.eResize,this.eHeaderCompWrapper);var o=this.ctrl.getSelectAllGui();this.eResize.insertAdjacentElement("afterend",o)},t.prototype.destroyHeaderComp=function(){this.headerComp&&(this.eHeaderCompWrapper.removeChild(this.headerCompGui),this.headerComp=this.destroyBean(this.headerComp),this.headerCompGui=void 0)},t.prototype.setUserCompDetails=function(e){var t=this;this.headerCompVersion++;var i=this.headerCompVersion;e.newAgStackInstance().then((function(e){return t.afterCompCreated(i,e)}))},t.prototype.afterCompCreated=function(e,t){e==this.headerCompVersion&&this.isAlive()?(this.destroyHeaderComp(),this.headerComp=t,this.headerCompGui=t.getGui(),this.eHeaderCompWrapper.appendChild(this.headerCompGui),this.ctrl.setDragSource(this.getGui())):this.destroyBean(t)},t.TEMPLATE='<div class="ag-header-cell" role="columnheader" tabindex="-1">\n            <div ref="eResize" class="ag-header-cell-resize" role="presentation"></div>\n            <div ref="eHeaderCompWrapper" class="ag-header-cell-comp-wrapper" role="presentation"></div>\n        </div>',Zd([sr("eResize")],t.prototype,"eResize",void 0),Zd([sr("eHeaderCompWrapper")],t.prototype,"eHeaderCompWrapper",void 0),Zd([le],t.prototype,"postConstruct",null),Zd([ce],t.prototype,"destroyHeaderComp",
11null),t}(uc),Qd=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ep=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},tp=function(e){function t(i){return e.call(this,t.TEMPLATE,i)||this}return Qd(t,e),t.prototype.postConstruct=function(){var e=this,t=this.getGui(),i=function(e,i){return void 0!=i?t.setAttribute(e,i):t.removeAttribute(e)};t.setAttribute("col-id",this.ctrl.getColId());var n={addOrRemoveCssClass:function(t,i){return e.addOrRemoveCssClass(t,i)},setResizableDisplayed:function(t){return _n(e.eResize,t)},setWidth:function(e){return t.style.width=e},setAriaExpanded:function(e){return i("aria-expanded",e)},setUserCompDetails:function(t){return e.setUserCompDetails(t)},getUserCompInstance:function(){return e.headerGroupComp}};this.ctrl.setComp(n,t,this.eResize)},t.prototype.setUserCompDetails=function(e){var t=this;e.newAgStackInstance().then((function(e){return t.afterHeaderCompCreated(e)}))},t.prototype.afterHeaderCompCreated=function(e){var t=this,i=function(){return t.destroyBean(e)};if(this.isAlive()){var n=this.getGui(),o=e.getGui();n.appendChild(o),this.addDestroyFunc(i),this.headerGroupComp=e,this.ctrl.setDragSource(n)}else i()},t.TEMPLATE='<div class="ag-header-group-cell" role="columnheader" tabindex="-1">\n            <div ref="eResize" class="ag-header-cell-resize" role="presentation"></div>\n        </div>',ep([de("userComponentFactory")],t.prototype,"userComponentFactory",void 0),ep([sr("eResize")],t.prototype,"eResize",void 0),ep([le],t.prototype,"postConstruct",null),t}(uc),ip=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),np=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};(function(e){e["COLUMN_GROUP"]="group",e["COLUMN"]="column",e["FLOATING_FILTER"]="filter"})(Vd||(Vd={}));var op,rp=function(e){function t(t){var i=e.call(this)||this;return i.headerComps={},i.ctrl=t,i.setTemplate('<div class="'.concat(i.ctrl.getHeaderRowClass(),'" role="row"></div>')),i}return ip(t,e),t.prototype.init=function(){var e=this;this.getGui().style.transform=this.ctrl.getTransform(),Ri(this.getGui(),this.ctrl.getAriaRowIndex());var t={setHeight:function(t){return e.getGui().style.height=t},setTop:function(t){return e.getGui().style.top=t},setHeaderCtrls:function(t,i){return e.setHeaderCtrls(t,i)},setWidth:function(t){return e.getGui().style.width=t}};this.ctrl.setComp(t)},t.prototype.destroyHeaderCtrls=function(){this.setHeaderCtrls([],!1)},t.prototype.setHeaderCtrls=function(e,t){var i=this;if(this.isAlive()){var n=this.headerComps;if(this.headerComps={},e.forEach((function(e){var t=e.getInstanceId(),o=n[t];delete n[t],null==o&&(o=i.createHeaderComp(e),i.getGui().appendChild(o.getGui())),i.headerComps[t]=o})),m(n,(function(e,t){i.getGui().removeChild(t.getGui()),i.destroyBean(t)})),t){var o=D(this.headerComps);o.sort((function(e,t){var i=e.getCtrl().getColumnGroupChild().getLeft(),n=t.getCtrl().getColumnGroupChild().getLeft();return i-n}));var r=o.map((function(e){return e.getGui()}));Zn(this.getGui(),r)}}},t.prototype.createHeaderComp=function(e){var t;switch(this.ctrl.getType()){case Vd.COLUMN_GROUP:t=new tp(e);break;case Vd.FLOATING_FILTER:t=new hc(e);break;default:t=new Jd(e);break}return this.createBean(t),t.setParentComponent(this),t},np([le],t.prototype,"init",null),np([ce],t.prototype,"destroyHeaderCtrls",null),t}(rr),sp=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ap=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},lp=0,cp=function(e){function t(t,i){var n=e.call(this)||this;return n.resizeToggleTimeout=0,n.resizeMultiplier=1,n.resizeFeature=null,n.lastFocusEvent=null,n.dragSource=null,n.columnGroupChild=t,n.parentRowCtrl=i,n.instanceId=t.getUniqueId()+"-"+lp++,n}return sp(t,e),t.prototype.shouldStopEventPropagation=function(e){var t=this.focusService.getFocusedHeader(),i=t.headerRowIndex,n=t.column;return ko(this.gridOptionsService,e,i,n)},t.prototype.getWrapperHasFocus=function(){var e=this.gridOptionsService.getDocument(),t=e.activeElement;return t===this.eGui},t.prototype.setGui=function(e){this.eGui=e,this.addDomData(),this.addManagedListener(this.beans.eventService,ht.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.onDisplayedColumnsChanged()},t.prototype.onDisplayedColumnsChanged=function(){this.comp&&this.column&&(this.refreshFirstAndLastStyles(),this.refreshAriaColIndex())},t.prototype.refreshFirstAndLastStyles=function(){var e=this,t=e.comp,i=e.column,n=e.beans;fu.refreshFirstAndLastStyles(t,i,n.columnModel)},t.prototype.refreshAriaColIndex=function(){var e=this,t=e.beans,i=e.column,n=t.columnModel.getAriaColumnIndex(i);_i(this.eGui,n)},t.prototype.addResizeAndMoveKeyboardListeners=function(){this.resizeFeature&&(this.addManagedListener(this.eGui,"keydown",this.onGuiKeyDown.bind(this)),this.addManagedListener(this.eGui,"keyup",this.onGuiKeyUp.bind(this)))},t.prototype.onGuiKeyDown=function(e){var t,i=this.gridOptionsService.getDocument(),n=i.activeElement,o=e.ke
11y===xo.LEFT||e.key===xo.RIGHT;if(this.isResizing&&(e.preventDefault(),e.stopImmediatePropagation()),n===this.eGui&&(e.shiftKey||e.altKey)&&((this.isResizing||o)&&(e.preventDefault(),e.stopImmediatePropagation()),o)){var r=e.key===xo.LEFT!==this.gridOptionsService.get("enableRtl"),s=Ds[r?"Left":"Right"];e.altKey?(this.isResizing=!0,this.resizeMultiplier+=1,this.resizeHeader(s,e.shiftKey),null===(t=this.resizeFeature)||void 0===t||t.toggleColumnResizing(!0)):this.moveHeader(s)}},t.prototype.onGuiKeyUp=function(){var e=this;this.isResizing&&(this.resizeToggleTimeout&&(window.clearTimeout(this.resizeToggleTimeout),this.resizeToggleTimeout=0),this.isResizing=!1,this.resizeMultiplier=1,this.resizeToggleTimeout=setTimeout((function(){var t;null===(t=e.resizeFeature)||void 0===t||t.toggleColumnResizing(!1)}),150))},t.prototype.handleKeyDown=function(e){var t=this.getWrapperHasFocus();switch(e.key){case xo.PAGE_DOWN:case xo.PAGE_UP:case xo.PAGE_HOME:case xo.PAGE_END:t&&e.preventDefault()}},t.prototype.addDomData=function(){var e=this,i=t.DOM_DATA_KEY_HEADER_CTRL;this.gridOptionsService.setDomData(this.eGui,i,this),this.addDestroyFunc((function(){return e.gridOptionsService.setDomData(e.eGui,i,null)}))},t.prototype.getGui=function(){return this.eGui},t.prototype.focus=function(e){return!!this.eGui&&(this.lastFocusEvent=e||null,this.eGui.focus(),!0)},t.prototype.getRowIndex=function(){return this.parentRowCtrl.getRowIndex()},t.prototype.getParentRowCtrl=function(){return this.parentRowCtrl},t.prototype.getPinned=function(){return this.parentRowCtrl.getPinned()},t.prototype.getInstanceId=function(){return this.instanceId},t.prototype.getColumnGroupChild=function(){return this.columnGroupChild},t.prototype.removeDragSource=function(){this.dragSource&&(this.dragAndDropService.removeDragSource(this.dragSource),this.dragSource=null)},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.removeDragSource(),this.comp=null,this.column=null,this.resizeFeature=null,this.lastFocusEvent=null,this.columnGroupChild=null,this.parentRowCtrl=null,this.eGui=null},t.DOM_DATA_KEY_HEADER_CTRL="headerCtrl",ap([de("focusService")],t.prototype,"focusService",void 0),ap([de("beans")],t.prototype,"beans",void 0),ap([de("userComponentFactory")],t.prototype,"userComponentFactory",void 0),ap([de("ctrlsService")],t.prototype,"ctrlsService",void 0),ap([de("dragAndDropService")],t.prototype,"dragAndDropService",void 0),t}(st),up=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),dp=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},pp=function(e){function t(t,i,n,o){var r=e.call(this)||this;return r.columnOrGroup=t,r.eCell=i,r.ariaEl=r.eCell.querySelector("[role=columnheader]")||r.eCell,r.colsSpanning=o,r.beans=n,r}return up(t,e),t.prototype.setColsSpanning=function(e){this.colsSpanning=e,this.onLeftChanged()},t.prototype.getColumnOrGroup=function(){return this.beans.gridOptionsService.get("enableRtl")&&this.colsSpanning?Ae(this.colsSpanning):this.columnOrGroup},t.prototype.postConstruct=function(){this.addManagedListener(this.columnOrGroup,Ee.EVENT_LEFT_CHANGED,this.onLeftChanged.bind(this)),this.setLeftFirstTime(),this.addManagedListener(this.eventService,ht.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onLeftChanged.bind(this)),this.addManagedPropertyListener("domLayout",this.onLeftChanged.bind(this))},t.prototype.setLeftFirstTime=function(){var e=this.beans.gridOptionsService.get("suppressColumnMoveAnimation"),t=o(this.columnOrGroup.getOldLeft()),i=this.beans.columnAnimationService.isActive()&&t&&!e;i?this.animateInLeft():this.onLeftChanged()},t.prototype.animateInLeft=function(){var e=this,t=this.getColumnOrGroup(),i=t.getLeft(),n=t.getOldLeft(),o=this.modifyLeftForPrintLayout(t,n),r=this.modifyLeftForPrintLayout(t,i);
11this.setLeft(o),this.actualLeft=r,this.beans.columnAnimationService.executeNextVMTurn((function(){e.actualLeft===r&&e.setLeft(r)}))},t.prototype.onLeftChanged=function(){var e=this.getColumnOrGroup(),t=e.getLeft();this.actualLeft=this.modifyLeftForPrintLayout(e,t),this.setLeft(this.actualLeft)},t.prototype.modifyLeftForPrintLayout=function(e,t){var i=this.beans.gridOptionsService.isDomLayout("print");if(!i)return t;if("left"===e.getPinned())return t;var n=this.beans.columnModel.getDisplayedColumnsLeftWidth();if("right"===e.getPinned()){var o=this.beans.columnModel.getBodyContainerWidth();return n+o+t}return n+t},t.prototype.setLeft=function(e){if(o(e)&&(this.eCell.style.left="".concat(e,"px")),this.columnOrGroup instanceof Ee)this.columnOrGroup;else{var t=this.columnOrGroup,i=t.getLeafColumns();if(!i.length)return;i.length>1&&Pi(this.ariaEl,i.length),i[0]}},dp([le],t.prototype,"postConstruct",null),t}(st),hp=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),fp=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},gp=function(e){function t(t,i){var n=e.call(this)||this;return n.columns=t,n.element=i,n}return hp(t,e),t.prototype.postConstruct=function(){this.gridOptionsService.get("columnHoverHighlight")&&this.addMouseHoverListeners()},t.prototype.addMouseHoverListeners=function(){this.addManagedListener(this.element,"mouseout",this.onMouseOut.bind(this)),this.addManagedListener(this.element,"mouseover",this.onMouseOver.bind(this))},t.prototype.onMouseOut=function(){this.columnHoverService.clearMouseOver()},t.prototype.onMouseOver=function(){this.columnHoverService.setMouseOver(this.columns)},fp([de("columnHoverService")],t.prototype,"columnHoverService",void 0),fp([le],t.prototype,"postConstruct",null),t}(st),vp=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),yp=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},mp=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.iconCreated=!1,n.column=t,n}return vp(t,e),t.prototype.setComp=function(e,t,i,n){this.comp=e,this.eButtonShowMainFilter=i,this.eFloatingFilterBody=n,this.setGui(t),this.setupActive(),this.setupWidth(),this.setupLeft(),this.setupHover(),this.setupFocus(),this.setupAria(),this.setupFilterButton(),this.setupUserComp(),this.setupSyncWithFilter(),this.setupUi(),this.addManagedListener(this.eButtonShowMainFilter,"click",this.showParentFilter.bind(this)),this.setupFilterChangedListener(),this.addManagedListener(this.column,Ee.EVENT_COL_DEF_CHANGED,this.onColDefChanged.bind(this))},t.prototype.resizeHeader=function(){},t.prototype.moveHeader=function(){},t.prototype.setupActive=function(){var e=this.column.getColDef(),t=!!e.filter,i=!!e.floatingFilter;this.active=t&&i},t.prototype.setupUi=function(){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){var e=So("filter",this.gridOptionsService,this.column);e&&(this.iconCreated=!0,this.eButtonShowMainFilter.appendChild(e))}},t.prototype.setupFocus=function(){this.createManagedBean(new Cr(this.eGui,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)}))},t.prototype.setupAria=function(){var e=this.localeService.getLocaleTextFunc();di(this.eButtonShowMainFilter,e("ariaFilterMenuOpen","Open Filter Menu"))},t.prototype.onTabKeyDown=function(e){var t=this.gridOptionsService.getDocument(),i=t.activeElement,n=i===this.eGui;if(!n){var o=this.focusService.findNextFocusableElement(this.eGui,null,e.shiftKey);if(o)return this.beans.headerNavigationService.scrollToColumn(this.column),e.preventDefault(),void o.focus();var r=this.findNextColumnWithFloatingFilter(e.shiftKey);r&&this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:this.getParentRowCtrl().getRowIndex(),column:r},event:e})&&e.preventDefault()}},t.prototype.findNextColumnWithFloatingFilter=function(e){var t=this.beans.columnModel,i=this.column;do{if(i=e?t.getDisplayedColBefore(i):t.getDisplayedColAfter(i),!i)break}while(!i.getColDef().filter||!i.getColDef().floatingFilter);return i},t.prototype.handleKeyDown=function(t){e.prototype.handleKeyDown.call(this,t);var i=this.getWrapperHasFocus();switch(t.key){case xo.UP:case xo.DOWN:i||t.preventDefault();case xo.LEFT:case xo.RIGHT:if(i)return;t.stopPropagation();case xo.ENTER:i&&this.focusService.focusInto(this.eGui)&&t.preventDefault();break;case xo.ESCAPE:i||this.eGui.focus()}},t.prototype.onFocusIn=function(e){var t=this.eGui.contains(e.relatedTarget);if(!t){var i=!!e.relatedTarget&&!e.relatedTarget.classList.contains("ag-floating-filter"),n=!!e.relatedTarget&&kn(e.relatedTarget,"ag-floating-filter");if(i&&n&&e.target===this.eGui){var o=this.lastFocusEvent,r=!(!o||o.key!==xo.TAB);if(o&&r){var s=o.shiftKey;this.focusService.focusInto(this.eGui,s)}}var a=this.getRowIndex();this.beans.focusService.setFocusedHeader(a,this.column)}},t.prototype.setupHover=function(){var e=this;this.createManagedBean(new gp([this.column],this.eGui));
11var t=function(){if(e.gridOptionsService.get("columnHoverHighlight")){var t=e.columnHoverService.isHovered(e.column);e.comp.addOrRemoveCssClass("ag-column-hover",t)}};this.addManagedListener(this.eventService,ht.EVENT_COLUMN_HOVER_CHANGED,t),t()},t.prototype.setupLeft=function(){var e=new pp(this.column,this.eGui,this.beans);this.createManagedBean(e)},t.prototype.setupFilterButton=function(){var e=this.column.getColDef();this.suppressFilterButton=!!e.floatingFilterComponentParams&&!!e.floatingFilterComponentParams.suppressFilterButton},t.prototype.setupUserComp=function(){var e=this;if(this.active){var t=this.filterManager.getFloatingFilterCompDetails(this.column,(function(){return e.showParentFilter()}));t&&this.setCompDetails(t)}},t.prototype.setCompDetails=function(e){this.userCompDetails=e,this.comp.setCompDetails(e)},t.prototype.showParentFilter=function(){var e=this.suppressFilterButton?this.eFloatingFilterBody:this.eButtonShowMainFilter;this.menuFactory.showMenuAfterButtonClick(this.column,e,"floatingFilter","filterMenuTab",["filterMenuTab"])},t.prototype.setupSyncWithFilter=function(){var e=this;if(this.active){var t=function(t){var i=e.comp.getFloatingFilterComp();i&&i.then((function(i){if(i){var n=e.filterManager.getCurrentFloatingFilterParentModel(e.column);i.onParentModelChanged(n,t)}}))};this.destroySyncListener=this.addManagedListener(this.column,Ee.EVENT_FILTER_CHANGED,t),this.filterManager.isFilterActive(this.column)&&t(null)}},t.prototype.setupWidth=function(){var e=this,t=function(){var t="".concat(e.column.getActualWidth(),"px");e.comp.setWidth(t)};this.addManagedListener(this.column,Ee.EVENT_WIDTH_CHANGED,t),t()},t.prototype.setupFilterChangedListener=function(){this.active&&(this.destroyFilterChangedListener=this.addManagedListener(this.column,Ee.EVENT_FILTER_CHANGED,this.updateFilterButton.bind(this)))},t.prototype.updateFilterButton=function(){!this.suppressFilterButton&&this.comp&&this.comp.setButtonWrapperDisplayed(this.filterManager.isFilterAllowed(this.column))},t.prototype.onColDefChanged=function(){var e,t,i=this,n=this.active;this.setupActive();var o=!n&&this.active;n&&!this.active&&(null===(e=this.destroySyncListener)||void 0===e||e.call(this),null===(t=this.destroyFilterChangedListener)||void 0===t||t.call(this));var r=this.active?this.filterManager.getFloatingFilterCompDetails(this.column,(function(){return i.showParentFilter()})):null,s=this.comp.getFloatingFilterComp();s&&r?s.then((function(e){var t;!e||i.filterManager.areFilterCompsDifferent(null!==(t=i.userCompDetails)&&void 0!==t?t:null,r)?i.updateCompDetails(r,o):i.updateFloatingFilterParams(r)})):this.updateCompDetails(r,o)},t.prototype.updateCompDetails=function(e,t){this.setCompDetails(e),this.setupFilterButton(),this.setupUi(),t&&(this.setupSyncWithFilter(),this.setupFilterChangedListener())},t.prototype.updateFloatingFilterParams=function(e){var t;if(e){var i=e.params;null===(t=this.comp.getFloatingFilterComp())||void 0===t||t.then((function(e){(null===e||void 0===e?void 0:e.onParamsUpdated)&&"function"===typeof e.onParamsUpdated&&e.onParamsUpdated(i)}))}},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.eButtonShowMainFilter=null,this.eFloatingFilterBody=null,this.userCompDetails=null,this.destroySyncListener=null,this.destroyFilterChangedListener=null},yp([de("filterManager")],t.prototype,"filterManager",void 0),yp([de("columnHoverService")],t.prototype,"columnHoverService",void 0),yp([de("menuFactory")],t.prototype,"menuFactory",void 0),t}(cp),Cp=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),bp=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},wp=function(e){function t(t,i,n,o,r){var s=e.call(this)||this;
11return s.pinned=t,s.column=i,s.eResize=n,s.comp=o,s.ctrl=r,s}return Cp(t,e),t.prototype.postConstruct=function(){var e,t,i=this,n=[],o=function(){if(_n(i.eResize,e),e){var o=i.horizontalResizeService.addResizeBar({eResizeBar:i.eResize,onResizeStart:i.onResizeStart.bind(i),onResizing:i.onResizing.bind(i,!1),onResizeEnd:i.onResizing.bind(i,!0)});if(n.push(o),t){var r=i.gridOptionsService.get("skipHeaderOnAutoSize"),s=function(){i.columnModel.autoSizeColumn(i.column,r,"uiColumnResized")};i.eResize.addEventListener("dblclick",s);var a=new Hs(i.eResize);a.addEventListener(Hs.EVENT_DOUBLE_TAP,s),n.push((function(){i.eResize.removeEventListener("dblclick",s),a.removeEventListener(Hs.EVENT_DOUBLE_TAP,s),a.destroy()}))}}},r=function(){n.forEach((function(e){return e()})),n.length=0},s=function(){var n=i.column.isResizable(),s=!i.gridOptionsService.get("suppressAutoSize")&&!i.column.getColDef().suppressAutoSize,a=n!==e||s!==t;a&&(e=n,t=s,r(),o())};s(),this.addDestroyFunc(r),this.ctrl.addRefreshFunction(s)},t.prototype.onResizing=function(e,t){var i=this,n=i.column,o=i.lastResizeAmount,r=i.resizeStartWidth,s=this.normaliseResizeAmount(t),a=r+s,l=[{key:n,newWidth:a}];if(this.column.getPinned()){var c=this.pinnedWidthService.getPinnedLeftWidth(),u=this.pinnedWidthService.getPinnedRightWidth(),d=In(this.ctrlsService.getGridBodyCtrl().getBodyViewportElement())-50;if(c+u+(s-o)>d)return}this.lastResizeAmount=s,this.columnModel.setColumnWidths(l,this.resizeWithShiftKey,e,"uiColumnResized"),e&&this.toggleColumnResizing(!1)},t.prototype.onResizeStart=function(e){this.resizeStartWidth=this.column.getActualWidth(),this.lastResizeAmount=0,this.resizeWithShiftKey=e,this.toggleColumnResizing(!0)},t.prototype.toggleColumnResizing=function(e){this.comp.addOrRemoveCssClass("ag-column-resizing",e)},t.prototype.normaliseResizeAmount=function(e){var t=e,i="left"!==this.pinned,n="right"===this.pinned;return this.gridOptionsService.get("enableRtl")?i&&(t*=-1):n&&(t*=-1),t},bp([de("horizontalResizeService")],t.prototype,"horizontalResizeService",void 0),bp([de("pinnedWidthService")],t.prototype,"pinnedWidthService",void 0),bp([de("ctrlsService")],t.prototype,"ctrlsService",void 0),bp([de("columnModel")],t.prototype,"columnModel",void 0),bp([le],t.prototype,"postConstruct",null),t}(st),Sp=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ep=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},xp=function(e){function t(t){var i=e.call(this)||this;return i.cbSelectAllVisible=!1,i.processingEventFromCheckbox=!1,i.column=t,i}return Sp(t,e),t.prototype.onSpaceKeyDown=function(e){var t=this.cbSelectAll,i=this.gridOptionsService.getDocument();t.isDisplayed()&&!t.getGui().contains(i.activeElement)&&(e.preventDefault(),t.setValue(!t.getValue()))},t.prototype.getCheckboxGui=function(){return this.cbSelectAll.getGui()},t.prototype.setComp=function(e){this.headerCellCtrl=e,this.cbSelectAll=this.createManagedBean(new Yr),this.cbSelectAll.addCssClass("ag-header-select-all"),si(this.cbSelectAll.getGui(),"presentation"),this.showOrHideSelectAll(),this.addManagedListener(this.eventService,ht.EVENT_NEW_COLUMNS_LOADED,this.onNewColumnsLoaded.bind(this)),this.addManagedListener(this.eventService,ht.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,ht.EVENT_SELECTION_CHANGED,this.onSelectionChanged.bind(this)),this.addManagedListener(this.eventService,ht.EVENT_PAGINATION_CHANGED,this.onSelectionChanged.bind(this)),this.addManagedListener(this.eventService,ht.EVENT_MODEL_UPDATED,this.onModelChanged.bind(this)),this.addManagedListener(this.cbSelectAll,ht.EVENT_FIELD_VALUE_CHANGED,this.onCbSelectAll.bind(this)),bi(this.cbSelectAll.getGui(),!0),this.cbSelectAll.getInputElement().setAttribute("tabindex","-1"),this.refreshSelectAllLabel()},t.prototype.onNewColumnsLoaded=function(){this.showOrHideSelectAll()},t.prototype.onDisplayedColumnsChanged=function(){this.isAlive()&&this.showOrHideSelectAll()},t.prototype.showOrHideSelectAll=function(){this.cbSelectAllVisible=this.isCheckboxSelection(),this.cbSelectAll.setDisplayed(this.cbSelectAllVisible,{skipAriaHidden:!0}),this.cbSelectAllVisible&&(this.checkRightRowModelType("selectAllCheckbox"),this.checkSelectionType("selectAllCheckbox"),this.updateStateOfCheckbox()),this.refreshSelectAllLabel()},t.prototype.onModelChanged=function(){this.cbSelectAllVisible&&this.updateStateOfCheckbox()},t.prototype.onSelectionChanged=function(){this.cbSelectAllVisible&&this.updateStateOfCheckbox()},t.prototype.updateStateOfCheckbox=function(){if(!this.processingEventFromCheckbox){this.processingEventFromCheckbox=!0;var e=this.selectionService.getSelectAllState(this.isFilteredOnly(),this.isCurrentPageOnly());this.cbSelectAll.setValue(e),this.refreshSelectAllLabel(),this.processingEventFromCheckbox=!1}},t.prototype.refreshSelectAllLabel=function(){var e=this.localeService.getLocaleTextFunc(),t=this.cbSelectAll.getValue(),i=t?e("ariaChecked","checked"):e("ariaUnchecked","unchecked"),n=e("ariaRowSelectAll","Press Space to toggle all rows selection");
11this.cbSelectAllVisible?this.headerCellCtrl.setAriaDescriptionProperty("selectAll","".concat(n," (").concat(i,")")):this.headerCellCtrl.setAriaDescriptionProperty("selectAll",null),this.cbSelectAll.setInputAriaLabel("".concat(n," (").concat(i,")")),this.headerCellCtrl.refreshAriaDescription()},t.prototype.checkSelectionType=function(e){var t="multiple"===this.gridOptionsService.get("rowSelection");return!!t||(console.warn("AG Grid: ".concat(e," is only available if using 'multiple' rowSelection.")),!1)},t.prototype.checkRightRowModelType=function(e){var t=this.rowModel.getType(),i="clientSide"===t||"serverSide"===t;return!!i||(console.warn("AG Grid: ".concat(e," is only available if using 'clientSide' or 'serverSide' rowModelType, you are using ").concat(t,".")),!1)},t.prototype.onCbSelectAll=function(){if(!this.processingEventFromCheckbox&&this.cbSelectAllVisible){var e=this.cbSelectAll.getValue(),t=this.isFilteredOnly(),i=this.isCurrentPageOnly(),n="uiSelectAll";i?n="uiSelectAllCurrentPage":t&&(n="uiSelectAllFiltered");var o={source:n,justFiltered:t,justCurrentPage:i};e?this.selectionService.selectAllRowNodes(o):this.selectionService.deselectAllRowNodes(o)}},t.prototype.isCheckboxSelection=function(){var e=this.column.getColDef().headerCheckboxSelection;if("function"===typeof e){var t=e,i={column:this.column,colDef:this.column.getColDef(),columnApi:this.gridOptionsService.columnApi,api:this.gridOptionsService.api,context:this.gridOptionsService.context};e=t(i)}return!!e&&(this.checkRightRowModelType("headerCheckboxSelection")&&this.checkSelectionType("headerCheckboxSelection"))},t.prototype.isFilteredOnly=function(){return!!this.column.getColDef().headerCheckboxSelectionFilteredOnly},t.prototype.isCurrentPageOnly=function(){return!!this.column.getColDef().headerCheckboxSelectionCurrentPageOnly},Ep([de("rowModel")],t.prototype,"rowModel",void 0),Ep([de("selectionService")],t.prototype,"selectionService",void 0),t}(st),Op=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Tp=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Dp=function(e){var t="function"===typeof Symbol&&Symbol.iterator,i=t&&e[t],n=0;if(i)return i.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Rp=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},Ap=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.refreshFunctions=[],n.userHeaderClasses=new Set,n.ariaDescriptionProperties=new Map,n.column=t,n}return Op(t,e),t.prototype.setComp=function(e,t,i,n){var o=this;this.comp=e,this.setGui(t),this.updateState(),this.setupWidth(),this.setupMovingCss(),this.setupMenuClass(),this.setupSortableClass(),this.setupWrapTextClass(),this.refreshSpanHeaderHeight(),this.setupAutoHeight(n),this.addColumnHoverListener(),this.setupFilterClass(),this.setupClassesFromColDef(),this.setupTooltip(),this.addActiveHeaderMouseListeners(),this.setupSelectAll(),this.setupUserComp(),this.refreshAria(),this.resizeFeature=this.createManagedBean(new wp(this.getPinned(),this.column,i,e,this)),this.createManagedBean(new gp([this.column],t)),this.createManagedBean(new pp(this.column,t,this.beans)),this.createManagedBean(new Cr(t,{shouldStopEventPropagation:function(e){return o.shouldStopEventPropagation(e)},onTabKeyDown:function(){return null},handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addResizeAndMoveKeyboardListeners(),this.addManagedPropertyListeners(["suppressMovableColumns","suppressMenuHide","suppressAggFuncInHeader"],this.refresh.bind(this)),this.addManagedListener(this.column,Ee.EVENT_COL_DEF_CHANGED,this.refresh.bind(this)),this.addManagedListener(this.eventService,ht.EVENT_COLUMN_VALUE_CHANGED,this.onColumnValueChanged.bind(this)),this.addManagedListener(this.eventService,ht.EVENT_COLUMN_ROW_GROUP_CHANGED,this.onColumnRowGroupChanged.bind(this)),this.addManagedListener(this.eventService,ht.EVENT_COLUMN_PIVOT_CHANGED,this.onColumnPivotChanged.bind(this)),this.addManagedListener(this.eventService,ht.EVENT_HEADER_HEIGHT_CHANGED,this.onHeaderHeight
11Changed.bind(this))},t.prototype.resizeHeader=function(e,t){var i,n;if(this.column.isResizable()){var o=this.column.getPinned(),r=this.gridOptionsService.get("enableRtl"),s=this.column.getActualWidth(),a=null!==(i=this.column.getMinWidth())&&void 0!==i?i:0,l=null!==(n=this.column.getMaxWidth())&&void 0!==n?n:Number.MAX_SAFE_INTEGER,c=e===Ds.Left;o&&r!==("right"===o)&&(c=!c);var u=(c?-1:1)*this.resizeMultiplier,d=Math.min(Math.max(s+u,a),l);if(o){var p=this.pinnedWidthService.getPinnedLeftWidth(),h=this.pinnedWidthService.getPinnedRightWidth(),f=In(this.ctrlsService.getGridBodyCtrl().getBodyViewportElement())-50;if(p+h+u>f)return}this.columnModel.setColumnWidths([{key:this.column,newWidth:d}],t,!0)}},t.prototype.moveHeader=function(e){var t=this,i=t.eGui,n=t.column,o=t.columnModel,r=t.gridOptionsService,s=t.ctrlsService,a=this.getPinned(),l=i.getBoundingClientRect().left,c=n.getActualWidth(),u=r.get("enableRtl"),d=e===Ds.Left!==u,p=Ud.normaliseX(d?l-20:l+c+20,a,!0,r,s);Ud.attemptMoveColumns({allMovingColumns:[n],isFromHeader:!0,hDirection:e,xPosition:p,pinned:a,fromEnter:!1,fakeEvent:!1,gridOptionsService:r,columnModel:o}),s.getGridBodyCtrl().getScrollFeature().ensureColumnVisible(n,"auto")},t.prototype.setupUserComp=function(){var e=this.lookupUserCompDetails();this.setCompDetails(e)},t.prototype.setCompDetails=function(e){this.userCompDetails=e,this.comp.setUserCompDetails(e)},t.prototype.lookupUserCompDetails=function(){var e=this.createParams(),t=this.column.getColDef();return this.userComponentFactory.getHeaderCompDetails(t,e)},t.prototype.createParams=function(){var e=this,t={column:this.column,displayName:this.displayName,enableSorting:this.column.isSortable(),enableMenu:this.menuEnabled,showColumnMenu:function(t){e.gridApi.showColumnMenuAfterButtonClick(e.column,t)},progressSort:function(t){e.sortController.progressSort(e.column,!!t,"uiColumnSorted")},setSort:function(t,i){e.sortController.setSortForColumn(e.column,t,!!i,"uiColumnSorted")},api:this.gridApi,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context,eGridHeader:this.getGui()};return t},t.prototype.setupSelectAll=function(){this.selectAllFeature=this.createManagedBean(new xp(this.column)),this.selectAllFeature.setComp(this)},t.prototype.getSelectAllGui=function(){return this.selectAllFeature.getCheckboxGui()},t.prototype.handleKeyDown=function(t){e.prototype.handleKeyDown.call(this,t),t.key===xo.SPACE&&this.selectAllFeature.onSpaceKeyDown(t),t.key===xo.ENTER&&this.onEnterKeyDown(t)},t.prototype.onEnterKeyDown=function(e){var t=this.comp.getUserCompInstance();if(t)if(e.ctrlKey||e.metaKey)this.menuEnabled&&t.showMenu&&(e.preventDefault(),t.showMenu());else if(this.sortable){var i=e.shiftKey;this.sortController.progressSort(this.column,i,"uiColumnSorted")}},t.prototype.isMenuEnabled=function(){return this.menuEnabled},t.prototype.onFocusIn=function(e){if(!this.getGui().contains(e.relatedTarget)){var t=this.getRowIndex();this.focusService.setFocusedHeader(t,this.column)}this.setActiveHeader(!0)},t.prototype.onFocusOut=function(e){this.getGui().contains(e.relatedTarget)||this.setActiveHeader(!1)},t.prototype.setupTooltip=function(){var e=this,t={getColumn:function(){return e.column},getColDef:function(){return e.column.getColDef()},getGui:function(){return e.eGui},getLocation:function(){return"header"},getTooltipValue:function(){var t=e.column.getColDef().headerTooltip;return t}},i=this.createManagedBean(new eu(t,this.beans));i.setComp(this.eGui),this.refreshFunctions.push((function(){return i.refreshToolTip()}))},t.prototype.setupClassesFromColDef=function(){var e=this,t=function(){var t=e.column.getColDef(),i=fu.getHeaderClassesFromColDef(t,e.gridOptionsService,e.column,null),n=e.userHeaderClasses;e.userHeaderClasses=new Set(i),i.forEach((function(t){n.has(t)?n.delete(t):e.comp.addOrRemoveCssClass(t,!0)})),n.forEach((function(t){return e.comp.addOrRemoveCssClass(t,!1)}))};this.refreshFunctions.push(t),t()},t.prototype.setDragSource=function(e){var t=this;if(this.dragSourceElement=e,this.removeDragSource(),e&&this.draggable){var i=this,n=i.column,o=i.columnModel,r=i.displayName,s=i.dragAndDropService,a=i.gridOptionsService,l=!this.gridOptionsService.get("suppressDragLeaveHidesColumns"),c=this.dragSource={type:Ta.HeaderCell,eElement:e,getDefaultIconName:function(){return l?Pa.ICON_HIDE:Pa.ICON_NOT_ALLOWED},getDragItem:function(){return t.createDragItem(n)},dragItemName:r,onDragStarted:function(){l=!a.get("suppressDragLeaveHidesColumns"),n.setMoving(!0,"uiColumnMoved")},onDragStopped:function(){return n.setMoving(!1,"uiColumnMoved")},onGridEnter:function(e){var t;if(l){var i=(null===(t=null===e||void 0===e?void 0:e.columns)||void 0===t?void 0:t.filter((function(e){return!e.getColDef().lockVisible})))||[];o.setColumnsVisible(i,!0,"uiColumnMoved")}}
11,onGridExit:function(e){var t;if(l){var i=(null===(t=null===e||void 0===e?void 0:e.columns)||void 0===t?void 0:t.filter((function(e){return!e.getColDef().lockVisible})))||[];o.setColumnsVisible(i,!1,"uiColumnMoved")}}};s.addDragSource(c,!0)}},t.prototype.createDragItem=function(e){var t={};return t[e.getId()]=e.isVisible(),{columns:[e],visibleState:t}},t.prototype.updateState=function(){var e=this.column.getColDef();this.menuEnabled=this.menuFactory.isMenuEnabled(this.column)&&!e.suppressMenu,this.sortable=this.column.isSortable(),this.displayName=this.calculateDisplayName(),this.draggable=this.workOutDraggable()},t.prototype.addRefreshFunction=function(e){this.refreshFunctions.push(e)},t.prototype.refresh=function(){this.updateState(),this.refreshHeaderComp(),this.refreshAria(),this.refreshFunctions.forEach((function(e){return e()}))},t.prototype.refreshHeaderComp=function(){var e=this.lookupUserCompDetails(),t=this.comp.getUserCompInstance(),i=null!=t&&this.userCompDetails.componentClass==e.componentClass,n=!!i&&this.attemptHeaderCompRefresh(e.params);n?this.setDragSource(this.dragSourceElement):this.setCompDetails(e)},t.prototype.attemptHeaderCompRefresh=function(e){var t=this.comp.getUserCompInstance();if(!t)return!1;if(!t.refresh)return!1;var i=t.refresh(e);return i},t.prototype.calculateDisplayName=function(){return this.columnModel.getDisplayNameForColumn(this.column,"header",!0)},t.prototype.checkDisplayName=function(){this.displayName!==this.calculateDisplayName()&&this.refresh()},t.prototype.workOutDraggable=function(){var e=this.column.getColDef(),t=this.gridOptionsService.get("suppressMovableColumns"),i=!t&&!e.suppressMovable&&!e.lockPosition;return!!i||!!e.enableRowGroup||!!e.enablePivot},t.prototype.onColumnRowGroupChanged=function(){this.checkDisplayName()},t.prototype.onColumnPivotChanged=function(){this.checkDisplayName()},t.prototype.onColumnValueChanged=function(){this.checkDisplayName()},t.prototype.setupWidth=function(){var e=this,t=function(){var t=e.column.getActualWidth();e.comp.setWidth("".concat(t,"px"))};this.addManagedListener(this.column,Ee.EVENT_WIDTH_CHANGED,t),t()},t.prototype.setupMovingCss=function(){var e=this,t=function(){e.comp.addOrRemoveCssClass("ag-header-cell-moving",e.column.isMoving())};this.addManagedListener(this.column,Ee.EVENT_MOVING_CHANGED,t),t()},t.prototype.setupMenuClass=function(){var e=this,t=function(){e.comp.addOrRemoveCssClass("ag-column-menu-visible",e.column.isMenuVisible())};this.addManagedListener(this.column,Ee.EVENT_MENU_VISIBLE_CHANGED,t),t()},t.prototype.setupSortableClass=function(){var e=this,t=function(){e.comp.addOrRemoveCssClass("ag-header-cell-sortable",!!e.sortable)};t(),this.addRefreshFunction(t),this.addManagedListener(this.eventService,Ee.EVENT_SORT_CHANGED,this.refreshAriaSort.bind(this))},t.prototype.setupFilterClass=function(){var e=this,t=function(){var t=e.column.isFilterActive();e.comp.addOrRemoveCssClass("ag-header-cell-filtered",t),e.refreshAria()};this.addManagedListener(this.column,Ee.EVENT_FILTER_ACTIVE_CHANGED,t),t()},t.prototype.setupWrapTextClass=function(){var e=this,t=function(){var t=!!e.column.getColDef().wrapHeaderText;e.comp.addOrRemoveCssClass("ag-header-cell-wrap-text",t)};t(),this.addRefreshFunction(t)},t.prototype.onDisplayedColumnsChanged=function(){e.prototype.onDisplayedColumnsChanged.call(this),this.isAlive()&&this.onHeaderHeightChanged()},t.prototype.onHeaderHeightChanged=function(){this.refreshSpanHeaderHeight()},t.prototype.refreshSpanHeaderHeight=function(){var e=this,t=e.eGui,i=e.column,n=e.comp,o=e.columnModel,r=e.gridOptionsService;if(!i.isSpanHeaderHeight())return t.style.removeProperty("top"),t.style.removeProperty("height"),n.addOrRemoveCssClass("ag-header-span-height",!1),void n.addOrRemoveCssClass("ag-header-span-total",!1);var s=this.getColumnGroupPaddingInfo(),a=s.numberOfParents,l=s.isSpanningTotal;n.addOrRemoveCssClass("ag-header-span-height",a>0);var c=o.getColumnHeaderRowHeight();if(0===a)return n.addOrRemoveCssClass("ag-header-span-total",!1),t.style.setProperty("top","0px"),void t.style.setProperty("height","".concat(c,"px"));n.addOrRemoveCssClass("ag-header-span-total",l);var u=r.get("pivotMode"),d=u?o.getPivotGroupHeaderHeight():o.getGroupHeaderHeight(),p=a*d;t.style.setProperty("top","".concat(-p,"px")),t.style.setProperty("height","".concat(c+p,"px"))},t.prototype.getColumnGroupPaddingInfo=function(){var e=this.column.getParent();if(!e||!e.isPadding())return{numberOfParents:0,isSpanningTotal:!1};var t=e.getPaddingLevel()+1,i=!0;while(e){if(!e.isPadding()){i=!1;break}e=e.getParent()}return{numberOfParents:t,isSpanningTotal:i}},t.prototype.setupAutoHeight=function(e){var t,i=this,n=function(t){if(i.isAlive()){var o=Nn(i.getGui()),r=o.paddingTop,s=o.paddingBottom,a=o.borderBottomWidth,l=o.borderTopWidth,c=r+s+a+l,u=e.offsetHeight,d=u+c;if(t<5){var p=i.beans.gridOptionsService.getDocument(),h=!p||!p.contains(e),f=0==d;if(h||f)return void i.beans.frameworkOverrides.setTimeout((function(){return n(t+1)}),0)}i.columnModel.setColumnHeaderHeight(i.column,d)}},o=!1,r=function(){var e=i.column.isAutoHeaderHeight();e&&!o&&s(),!e&&o&&a()},s=function(){o=!0,n(0),i.comp.addOrRemoveCssClass("ag-header-cell-auto-height",!0),t=i.resizeObserverService.observeResize(e,(function(){return n(0)}))},a=function(){o=!1,t&&t(),i.comp.addOrRemoveCssClass("ag-header-cell-auto-height",!1),t=void 0};r(),this.addDestroyFunc((function(){return a()})),this.addManagedListener(this.column,Ee.EVENT_WIDTH_CHANGED,(function(){return o&&n(0)})),this.addManagedListener(this.eventService,Ee.EVENT_SORT_CHANGED,(function(){o&&i.beans.frameworkOverrides.setTimeout((function(){return n(0)}))})),this.addRefreshFunction(r)},t.prototype.refreshAriaSort=function(){if(this.sortable){var e=this.localeService.getLocaleTextFunc(),t=this.sortController.getDisplaySortForColumn(this.column)||null;this.comp.setAriaSort(ai(t)),this.setAriaDescriptionProperty("sort",e("ariaSortableColumn","Press ENTER to sort."))}else this.comp.setAriaSort(),this.setAriaDescriptionProperty("sort",null)},t.prototype.refreshAriaMenu=function(){if(this.menuEnabled){var e=this.localeService.getLocaleTextFunc();this.setAriaDescriptionProperty("menu",e("ariaMenuColumn","Press CTRL ENTER to open column menu."))}else this.setAriaDescriptionProperty("menu",null)},t.prototype.refreshAriaFiltered=function(){var e=this.localeService.getLocaleTextFunc(),t=this.column.isFilterActive();t?this.setAriaDescriptionProperty("filter",e("ariaColumnFiltered","Column Filtered")):this.setAriaDescriptionProperty("filter",null)},t.prototype.setAriaDescriptionProperty=function(e,t){null!=t?this.ariaDescriptionProperties.set(e,t):this.ariaDescriptionProperties.delete(e)},t.prototype.refreshAriaDescription=function(){var e,t,i=null;try{for(var n=Dp(this.ariaDescriptionProperties),o=n.next();!o.done;o=n.next()){var r=Rp(o.value,2),s=r[0],a=r[1];i="filter"===s?"".concat(a," ").concat(i||""):"".concat(i||""," ").concat(a)}}catch(l){e={error:l}}finally{try{o&&!o.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}this.comp.setAriaDescription(null!==i&&void 0!==i?i:void 0)},t.prototype.refreshAria=function(){this.refreshAriaSort(),this.refreshAriaMenu(),this.refreshAriaFiltered(),this.refreshAriaDescription()},t.prototype.addColumnHoverListener=function(){var e=this,t=function(){if(e.gridOptionsService.get("
11columnHoverHighlight")){var t=e.columnHoverService.isHovered(e.column);e.comp.addOrRemoveCssClass("ag-column-hover",t)}};this.addManagedListener(this.eventService,ht.EVENT_COLUMN_HOVER_CHANGED,t),t()},t.prototype.getColId=function(){return this.column.getColId()},t.prototype.addActiveHeaderMouseListeners=function(){var e=this,t=function(t){return e.setActiveHeader("mouseenter"===t.type)};this.addManagedListener(this.getGui(),"mouseenter",t),this.addManagedListener(this.getGui(),"mouseleave",t)},t.prototype.setActiveHeader=function(e){this.comp.addOrRemoveCssClass("ag-header-active",e)},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.refreshFunctions=null,this.selectAllFeature=null,this.dragSourceElement=null,this.userCompDetails=null,this.userHeaderClasses=null,this.ariaDescriptionProperties=null},Tp([de("columnModel")],t.prototype,"columnModel",void 0),Tp([de("pinnedWidthService")],t.prototype,"pinnedWidthService",void 0),Tp([de("columnHoverService")],t.prototype,"columnHoverService",void 0),Tp([de("sortController")],t.prototype,"sortController",void 0),Tp([de("menuFactory")],t.prototype,"menuFactory",void 0),Tp([de("resizeObserverService")],t.prototype,"resizeObserverService",void 0),Tp([de("gridApi")],t.prototype,"gridApi",void 0),t}(cp),_p=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Pp=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Mp=function(e){function t(t,i,n,o){var r=e.call(this)||this;return r.eResize=i,r.comp=t,r.pinned=n,r.columnGroup=o,r}return _p(t,e),t.prototype.postConstruct=function(){var e=this;if(this.columnGroup.isResizable()){var t=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(t),!this.gridOptionsService.get("suppressAutoSize")){var i=this.gridOptionsService.get("skipHeaderOnAutoSize");this.eResize.addEventListener("dblclick",(function(){var t=[],n=e.columnGroup.getDisplayedLeafColumns();n.forEach((function(e){e.getColDef().suppressAutoSize||t.push(e.getColId())})),t.length>0&&e.columnModel.autoSizeColumns({columns:t,skipHeader:i,stopAtGroup:e.columnGroup,source:"uiColumnResized"}),e.resizeLeafColumnsToFit("uiColumnResized")}))}}else this.comp.setResizableDisplayed(!1)},t.prototype.onResizeStart=function(e){var t=this.getInitialValues(e);this.storeLocalValues(t),this.toggleColumnResizing(!0)},t.prototype.onResizing=function(e,t,i){void 0===i&&(i="uiColumnResized");var n=this.normaliseDragChange(t),o=this.resizeStartWidth+n;this.resizeColumnsFromLocalValues(o,i,e)},t.prototype.getInitialValues=function(e){var t=this.getColumnsToResize(),i=this.getInitialSizeOfColumns(t),n=this.getSizeRatiosOfColumns(t,i),o={columnsToResize:t,resizeStartWidth:i,resizeRatios:n},r=null;if(e&&(r=this.columnModel.getDisplayedGroupAfter(this.columnGroup)),r){var s=r.getDisplayedLeafColumns(),a=o.groupAfterColumns=s.filter((function(e){return e.isResizable()})),l=o.groupAfterStartWidth=this.getInitialSizeOfColumns(a);o.groupAfterRatios=this.getSizeRatiosOfColumns(a,l)}else o.groupAfterColumns=void 0,o.groupAfterStartWidth=void 0,o.groupAfterRatios=void 0;return o},t.prototype.storeLocalValues=function(e){var t=e.columnsToResize,i=e.resizeStartWidth,n=e.resizeRatios,o=e.groupAfterColumns,r=e.groupAfterStartWidth,s=e.groupAfterRatios;this.resizeCols=t,this.resizeStartWidth=i,this.resizeRatios=n,this.resizeTakeFromCols=o,this.resizeTakeFromStartWidth=r,this.resizeTakeFromRatios=s},t.prototype.clearLocalValues=function(){this.resizeCols=void 0,this.resizeRatios=void 0,this.resizeTakeFromCols=void 0,this.resizeTakeFromRatios=void 0},t.prototype.resizeLeafColumnsToFit=function(e){var t=this.autoWidthCalculator.getPreferredWidthForColumnGroup(this.columnGroup),i=this.getInitialValues();t>i.resizeStartWidth&&this.resizeColumns(i,t,e,!0)},t.prototype.resizeColumnsFromLocalValues=function(e,t,i){var n,o,r;if(void 0===i&&(i=!0),this.resizeCols&&this.resizeRatios){var s={columnsToResize:this.resizeCols,resizeStartWidth:this.resizeStartWidth,resizeRatios:this.resizeRatios,groupAfterColumns:null!==(n=this.resizeTakeFromCols)&&void 0!==n?n:void 0,groupAfterStartWidth:null!==(o=this.resizeTakeFromStartWidth)&&void 0!==o?o:void 0,groupAfterRatios:null!==(r=this.resizeTakeFromRatios)&&void 0!==r?r:void 0};this.resizeColumns(s,e,t,i)}},t.prototype.resizeColumns=function(e,t,i,n){void 0===n&&(n=!0);var o=e.columnsToResize,r=e.resizeStartWidth,s=e.resizeRatios,a=e.groupAfterColumns,l=e.groupAfterStartWidth,c=e.groupAfterRatios,u=[];
11if(u.push({columns:o,ratios:s,width:t}),a){var d=t-r;u.push({columns:a,ratios:c,width:l-d})}this.columnModel.resizeColumnSets({resizeSets:u,finished:n,source:i}),n&&this.toggleColumnResizing(!1)},t.prototype.toggleColumnResizing=function(e){this.comp.addOrRemoveCssClass("ag-column-resizing",e)},t.prototype.getColumnsToResize=function(){var e=this.columnGroup.getDisplayedLeafColumns();return e.filter((function(e){return e.isResizable()}))},t.prototype.getInitialSizeOfColumns=function(e){return e.reduce((function(e,t){return e+t.getActualWidth()}),0)},t.prototype.getSizeRatiosOfColumns=function(e,t){return e.map((function(e){return e.getActualWidth()/t}))},t.prototype.normaliseDragChange=function(e){var t=e;return this.gridOptionsService.get("enableRtl")?"left"!==this.pinned&&(t*=-1):"right"===this.pinned&&(t*=-1),t},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.clearLocalValues()},Pp([de("horizontalResizeService")],t.prototype,"horizontalResizeService",void 0),Pp([de("autoWidthCalculator")],t.prototype,"autoWidthCalculator",void 0),Pp([de("columnModel")],t.prototype,"columnModel",void 0),Pp([le],t.prototype,"postConstruct",null),t}(st),kp=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Np=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Lp=function(e){function t(t,i){var n=e.call(this)||this;return n.removeChildListenersFuncs=[],n.columnGroup=i,n.comp=t,n}return kp(t,e),t.prototype.postConstruct=function(){this.addListenersToChildrenColumns(),this.addManagedListener(this.columnGroup,pt.EVENT_DISPLAYED_CHILDREN_CHANGED,this.onDisplayedChildrenChanged.bind(this)),this.onWidthChanged(),this.addDestroyFunc(this.removeListenersOnChildrenColumns.bind(this))},t.prototype.addListenersToChildrenColumns=function(){var e=this;this.removeListenersOnChildrenColumns();var t=this.onWidthChanged.bind(this);this.columnGroup.getLeafColumns().forEach((function(i){i.addEventListener("widthChanged",t),i.addEventListener("visibleChanged",t),e.removeChildListenersFuncs.push((function(){i.removeEventListener("widthChanged",t),i.removeEventListener("visibleChanged",t)}))}))},t.prototype.removeListenersOnChildrenColumns=function(){this.removeChildListenersFuncs.forEach((function(e){return e()})),this.removeChildListenersFuncs=[]},t.prototype.onDisplayedChildrenChanged=function(){this.addListenersToChildrenColumns(),this.onWidthChanged()},t.prototype.onWidthChanged=function(){var e=this.columnGroup.getActualWidth();this.comp.setWidth("".concat(e,"px")),this.comp.addOrRemoveCssClass("ag-hidden",0===e)},Np([le],t.prototype,"postConstruct",null),t}(st),Ip=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Fp=function(){return Fp=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Fp.apply(this,arguments)},Gp=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Vp=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.onSuppressColMoveChange=function(){if(n.isSuppressMoving())n.removeDragSource();else if(!n.dragSource){var e=n.getGui();n.setDragSource(e)}},n.column=t,n}return Ip(t,e),t.prototype.setComp=function(e,t,i){this.comp=e,this.setGui(t),this.displayName=this.columnModel.getDisplayNameForColumnGroup(this.column,"header"),this.addClasses(),this.setupMovingCss(),this.setupExpandable(),this.setupTooltip(),this.setupUserComp();var n=this.getParentRowCtrl().getPinned(),o=this.column.getProvidedColumnGroup().getLeafColumns();this.createManagedBean(new gp(o,t)),this.createManagedBean(new pp(this.column,t,this.beans)),this.createManagedBean(new Lp(e,this.column)),this.resizeFeature=this.createManagedBean(new Mp(e,i,n,this.column)),this.createManagedBean(new Cr(t,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:function(){},handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)})),this.addManagedPropertyListener(ht.EVENT_SUPPRESS_COLUMN_MOVE_CHANGED,this.onSuppressColMoveChange),this.addResizeAndMoveKeyboardListeners()},t.prototype.resizeHeader=function(e,t){if(this.resizeFeature){var i=e===Ds.Left,n=(i?-1:1)*this.resizeMultiplier,o=this.resizeFeature.getInitialValues(t);this.resizeFeature.resizeColumns(o,o.resizeStartWidth+n,"uiColumnResized",!0)}},t.prototype.moveHeader=function(e){var t=this,i=t.eGui,n=t.column,o=t.columnModel,r=t.gridOptionsService,s=t.ctrlsService,a=r.get("enableRtl"),l=e===Ds.Left,c=this.getPinned(),u=i.getBoundingClientRect(),d=u.left,p=u.width,h=Ud.normaliseX(l!==a?d-20:d+p+20,c,!0,r,s),f=n.getGroupId(),g=this.focusService.getFocusedHeader();Ud.attemptMoveColumns({allMovingColumns:this.column.getLeafColumns(),isFromHeader:!0,hDirection:e,xPosition:h,pinned:c,fromEnter:!1,fakeEvent:!1,gridOptionsService:r,columnModel:o});
11var v=n.getDisplayedLeafColumns(),y=l?v[0]:Ae(v);this.ctrlsService.getGridBodyCtrl().getScrollFeature().ensureColumnVisible(y,"auto"),!this.isAlive()&&g&&this.restoreFocus(f,n,g)},t.prototype.restoreFocus=function(e,t,i){var n=t.getLeafColumns();if(n.length){var o=n[0].getParent();if(o){var r=this.findGroupWidthId(o,e);r&&this.focusService.focusHeaderPosition({headerPosition:Fp(Fp({},i),{column:r})})}}},t.prototype.findGroupWidthId=function(e,t){while(e){if(e.getGroupId()===t)return e;e=e.getParent()}return null},t.prototype.resizeLeafColumnsToFit=function(e){this.resizeFeature&&this.resizeFeature.resizeLeafColumnsToFit(e)},t.prototype.setupUserComp=function(){var e=this,t={displayName:this.displayName,columnGroup:this.column,setExpanded:function(t){e.columnModel.setColumnGroupOpened(e.column.getProvidedColumnGroup(),t,"gridInitializing")},api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context},i=this.userComponentFactory.getHeaderGroupCompDetails(t);this.comp.setUserCompDetails(i)},t.prototype.setupTooltip=function(){var e=this,t=this.column.getColGroupDef(),i={getColumn:function(){return e.column},getGui:function(){return e.eGui},getLocation:function(){return"headerGroup"},getTooltipValue:function(){return t&&t.headerTooltip}};t&&(i.getColDef=function(){return t});var n=this.createManagedBean(new eu(i,this.beans));n.setComp(this.eGui)},t.prototype.setupExpandable=function(){var e=this.column.getProvidedColumnGroup();this.refreshExpanded(),this.addManagedListener(e,Oe.EVENT_EXPANDABLE_CHANGED,this.refreshExpanded.bind(this)),this.addManagedListener(e,Oe.EVENT_EXPANDED_CHANGED,this.refreshExpanded.bind(this))},t.prototype.refreshExpanded=function(){var e=this.column;this.expandable=e.isExpandable();var t=e.isExpanded();this.expandable?this.comp.setAriaExpanded(t?"true":"false"):this.comp.setAriaExpanded(void 0)},t.prototype.getColId=function(){return this.column.getUniqueId()},t.prototype.addClasses=function(){var e=this,t=this.column.getColGroupDef(),i=fu.getHeaderClassesFromColDef(t,this.gridOptionsService,null,this.column);if(this.column.isPadding()){i.push("ag-header-group-cell-no-group");var n=this.column.getLeafColumns();n.every((function(e){return e.isSpanHeaderHeight()}))&&i.push("ag-header-span-height")}else i.push("ag-header-group-cell-with-group");i.forEach((function(t){return e.comp.addOrRemoveCssClass(t,!0)}))},t.prototype.setupMovingCss=function(){var e=this,t=this.column.getProvidedColumnGroup(),i=t.getLeafColumns(),n=function(){return e.comp.addOrRemoveCssClass("ag-header-cell-moving",e.column.isMoving())};i.forEach((function(t){e.addManagedListener(t,Ee.EVENT_MOVING_CHANGED,n)})),n()},t.prototype.onFocusIn=function(e){if(!this.eGui.contains(e.relatedTarget)){var t=this.getRowIndex();this.beans.focusService.setFocusedHeader(t,this.column)}},t.prototype.handleKeyDown=function(t){e.prototype.handleKeyDown.call(this,t);var i=this.getWrapperHasFocus();if(this.expandable&&i&&t.key===xo.ENTER){var n=this.column,o=!n.isExpanded();this.columnModel.setColumnGroupOpened(n.getProvidedColumnGroup(),o,"uiColumnExpanded")}},t.prototype.setDragSource=function(e){var t=this;if(!this.isSuppressMoving()&&(this.removeDragSource(),e)){var i=this,n=i.column,o=i.columnModel,r=i.displayName,s=i.gridOptionsService,a=i.dragAndDropService,l=n.getProvidedColumnGroup().getLeafColumns(),c=!s.get("suppressDragLeaveHidesColumns"),u=this.dragSource={type:Ta.HeaderCell,eElement:e,getDefaultIconName:function(){return c?Pa.ICON_HIDE:Pa.ICON_NOT_ALLOWED},dragItemName:r,getDragItem:function(){return t.getDragItemForGroup(n)},onDragStarted:function(){c=!s.get("suppressDragLeaveHidesColumns"),l.forEach((function(e){return e.setMoving(!0,"uiColumnDragged")}))},onDragStopped:function(){return l.forEach((function(e){return e.setMoving(!1,"uiColumnDragged")}))},onGridEnter:function(e){var t;if(c){var i=(null===(t=null===e||void 0===e?void 0:e.columns)||void 0===t?void 0:t.filter((function(e){return!e.getColDef().lockVisible})))||[];o.setColumnsVisible(i,!0,"uiColumnMoved")}},onGridExit:function(e){var t;if(c){var i=(null===(t=null===e||void 0===e?void 0:e.columns)||void 0===t?void 0:t.filter((function(e){return!e.getColDef().lockVisible})))||[];o.setColumnsVisible(i,!1,"uiColumnMoved")}}};a.addDragSource(u,!0)}},t.prototype.getDragItemForGroup=function(e){var t=e.getProvidedColumnGroup().getLeafColumns(),i={};t.forEach((function(e){return i[e.getId()]=e.isVisible()}));var n=[];
11return this.columnModel.getAllDisplayedColumns().forEach((function(e){t.indexOf(e)>=0&&(n.push(e),Le(t,e))})),t.forEach((function(e){return n.push(e)})),{columns:n,visibleState:i}},t.prototype.isSuppressMoving=function(){var e=!1;this.column.getLeafColumns().forEach((function(t){(t.getColDef().suppressMovable||t.getColDef().lockPosition)&&(e=!0)}));var t=e||this.gridOptionsService.get("suppressMovableColumns");return t},Gp([de("columnModel")],t.prototype,"columnModel",void 0),t}(cp),Bp=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),jp=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Hp=function(e){var t="function"===typeof Symbol&&Symbol.iterator,i=t&&e[t],n=0;if(i)return i.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Wp=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},Up=0,zp=function(e){function t(t,i,n){var o=e.call(this)||this;o.instanceId=Up++,o.rowIndex=t,o.pinned=i,o.type=n;var r=n==Vd.COLUMN_GROUP?"ag-header-row-column-group":n==Vd.FLOATING_FILTER?"ag-header-row-column-filter":"ag-header-row-column";return o.headerRowClass="ag-header-row ".concat(r),o}return Bp(t,e),t.prototype.postConstruct=function(){this.isPrintLayout=this.gridOptionsService.isDomLayout("print"),this.isEnsureDomOrder=this.gridOptionsService.get("ensureDomOrder")},t.prototype.getInstanceId=function(){return this.instanceId},t.prototype.setComp=function(e,t){void 0===t&&(t=!0),this.comp=e,t&&(this.onRowHeightChanged(),this.onVirtualColumnsChanged()),this.setWidth(),this.addEventListeners()},t.prototype.getHeaderRowClass=function(){return this.headerRowClass},t.prototype.getAriaRowIndex=function(){return this.rowIndex+1},t.prototype.getTransform=function(){if(Yi())return"translateZ(0)"},t.prototype.addEventListeners=function(){var e=this;this.addManagedListener(this.eventService,ht.EVENT_COLUMN_RESIZED,this.onColumnResized.bind(this)),this.addManagedListener(this.eventService,ht.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,ht.EVENT_VIRTUAL_COLUMNS_CHANGED,(function(t){return e.onVirtualColumnsChanged(t.afterScroll)})),this.addManagedListener(this.eventService,ht.EVENT_COLUMN_HEADER_HEIGHT_CHANGED,this.onRowHeightChanged.bind(this)),this.addManagedListener(this.eventService,ht.EVENT_GRID_STYLES_CHANGED,this.onRowHeightChanged.bind(this)),this.addManagedListener(this.eventService,ht.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("domLayout",this.onDisplayedColumnsChanged.bind(this)),this.addManagedPropertyListener("ensureDomOrder",(function(t){return e.isEnsureDomOrder=t.currentValue})),this.addManagedPropertyListener("headerHeight",this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("pivotHeaderHeight",this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("groupHeaderHeight",this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("pivotGroupHeaderHeight",this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("floatingFiltersHeight",this.onRowHeightChanged.bind(this))},t.prototype.getHeaderCellCtrl=function(e){if(this.headerCellCtrls)return h(this.headerCellCtrls).find((function(t){return t.getColumnGroupChild()===e}))},t.prototype.onDisplayedColumnsChanged=function(){this.isPrintLayout=this.gridOptionsService.isDomLayout("print"),this.onVirtualColumnsChanged(),this.setWidth(),this.onRowHeightChanged()},t.prototype.getType=function(){return this.type},t.prototype.onColumnResized=function(){this.setWidth()},t.prototype.setWidth=function(){var e=this.getWidthForRow();this.comp.setWidth("".concat(e,"px"))},t.prototype.getWidthForRow=function(){if(this.isPrintLayout){var e=null!=this.pinned;return e?0:this.columnModel.getContainerWidth("right")+this.columnModel.getContainerWidth("left")+this.columnModel.getContainerWidth(null)}return this.columnModel.getContainerWidth(this.pinned)},t.prototype.onRowHeightChanged=function(){var e=this.getTopAndHeight(),t=e.topOffset,i=e.rowHeight;this.comp.setTop(t+"px"),this.comp.setHeight(i+"px")},t.prototype.getTopAndHeight=function(){var e=this.columnModel.getHeaderRowCount(),t=[],i=0;this.filterManager.hasFloatingFilters()&&(e++,i=1);for(var n=this.columnModel.getColumnGroupHeaderRowHeight(),o=this.columnModel.getColumnHeaderRowHeight(),r=1+i,s=e-r,a=0;a<s;a++)t.push(n);t.push(o);for(a=0;a<i;a++)t.push(this.columnModel.getFloatingFiltersHeight());var l=0;for(a=0;a<this.rowIndex;a++)l+=t[a];var c=t[this.rowIndex];return{topOffset:l,rowHeight:c}},t.prototype.getPinned=function(){return this.pinned},t.prototype.getRowIndex=function(){return this.rowIndex},t.prototype.onVirtualColumnsChanged=function(e){void 0===e&&(e=!1);var t=this.getHeaderCtrls(),i=this.isEnsureDomOrder||this.isPrintLayout;this.comp.setHeaderCtrls(t,i,e)},t.prototype.getHeaderCtrls=function(){var e,t,i,n,o=this,r=this.headerCellCtrls;this.headerCellCtrls=new Map;var s=this.getColumnsInViewport();try{for(var a=Hp(s),l=a.next();!l.done;l=a.next()){var c=l.value;this.recycleAndCreateHeaderCtrls(c,r)}}catch(m){e={error:m}}finally{try{l&&!l.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}var u=function(e){var t=o.focusService.isHeaderWrapperFocused(e);if(!t)return!1;var i=o.columnModel.isDisplayed(e.getColumnGroupChild());return i};if(r)try{for(var d=Hp(r),p=d.next();!p.done;p=d.next()){var h=Wp(p.value,2),f=h[0],g=h[1],v=u(g);v?this.headerCellCtrls.set(f,g):this.destroyBean(g)}}catch(C){i={error:C}}finally{try{p&&!p.done&&(n=d.return)&&n.call(d)}finally{if(i)throw i.error}}var y=Array.from(this.headerCellCtrls.values());return y},t.prototype.recycleAndCreateHeaderCtrls=function(e,t){if(this.headerCellCtrls&&!e.isEmptyGroup()){var i,n=e.getUniqueId();t&&(i=t.get(n),t.delete(n));var o=i&&i.getColumnGroupChild()!=e;
11if(o&&(this.destroyBean(i),i=void 0),null==i)switch(this.type){case Vd.FLOATING_FILTER:i=this.createBean(new mp(e,this));break;case Vd.COLUMN_GROUP:i=this.createBean(new Vp(e,this));break;default:i=this.createBean(new Ap(e,this));break}this.headerCellCtrls.set(n,i)}},t.prototype.getColumnsInViewport=function(){return this.isPrintLayout?this.getColumnsInViewportPrintLayout():this.getColumnsInViewportNormalLayout()},t.prototype.getColumnsInViewportPrintLayout=function(){var e=this;if(null!=this.pinned)return[];var t=[],i=this.getActualDepth();return["left",null,"right"].forEach((function(n){var o=e.columnModel.getVirtualHeaderGroupRow(n,i);t=t.concat(o)})),t},t.prototype.getActualDepth=function(){return this.type==Vd.FLOATING_FILTER?this.rowIndex-1:this.rowIndex},t.prototype.getColumnsInViewportNormalLayout=function(){return this.columnModel.getVirtualHeaderGroupRow(this.pinned,this.getActualDepth())},t.prototype.focusHeader=function(e,t){if(!this.headerCellCtrls)return!1;var i=Array.from(this.headerCellCtrls.values()),n=i.find((function(t){return t.getColumnGroupChild()==e}));return!!n&&n.focus(t)},t.prototype.destroy=function(){var t=this;this.headerCellCtrls&&this.headerCellCtrls.forEach((function(e){t.destroyBean(e)})),this.headerCellCtrls=void 0,e.prototype.destroy.call(this)},jp([de("columnModel")],t.prototype,"columnModel",void 0),jp([de("focusService")],t.prototype,"focusService",void 0),jp([de("filterManager")],t.prototype,"filterManager",void 0),jp([le],t.prototype,"postConstruct",null),t}(st),Kp=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Yp=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},qp=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},Xp=function(e,t,i){if(i||2===arguments.length)for(var n,o=0,r=t.length;o<r;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},$p=function(e){function t(t){var i=e.call(this)||this;return i.hidden=!1,i.includeFloatingFilter=!1,i.groupsRowCtrls=[],i.pinned=t,i}return Kp(t,e),t.prototype.setComp=function(e,t){this.comp=e,this.eViewport=t,this.setupCenterWidth(),this.setupPinnedWidth(),this.setupDragAndDrop(this.eViewport),this.addManagedListener(this.eventService,ht.EVENT_GRID_COLUMNS_CHANGED,this.onGridColumnsChanged.bind(this)),this.addManagedListener(this.eventService,ht.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,ht.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.ctrlsService.registerHeaderContainer(this,this.pinned),this.columnModel.isReady()&&this.refresh()},t.prototype.setupDragAndDrop=function(e){var t=new Xd(this.pinned,e);this.createManagedBean(t)},t.prototype.refresh=function(e){var t=this;void 0===e&&(e=!1);var i=new Yo,n=this.focusService.getFocusHeaderToUseAfterRefresh(),o=function(){var e=t.columnModel.getHeaderRowCount()-1;t.groupsRowCtrls=t.destroyBeans(t.groupsRowCtrls);for(var n=0;n<e;n++){var o=t.createBean(new zp(i.next(),t.pinned,Vd.COLUMN_GROUP));t.groupsRowCtrls.push(o)}},r=function(){var n=i.next(),o=!t.hidden&&(null==t.columnsRowCtrl||!e||t.columnsRowCtrl.getRowIndex()!==n),r=o||t.hidden;r&&(t.columnsRowCtrl=t.destroyBean(t.columnsRowCtrl)),o&&(t.columnsRowCtrl=t.createBean(new zp(n,t.pinned,Vd.COLUMN)))},s=function(){t.includeFloatingFilter=t.filterManager.hasFloatingFilters()&&!t.hidden;var n=function(){t.filtersRowCtrl=t.destroyBean(t.filtersRowCtrl)};if(t.includeFloatingFilter){var o=i.next();if(t.filtersRowCtrl){var r=t.filtersRowCtrl.getRowIndex()!==o;e&&!r||n()}t.filtersRowCtrl||(t.filtersRowCtrl=t.createBean(new zp(o,t.pinned,Vd.FLOATING_FILTER)))}else n()};o(),r(),s();var a=this.getAllCtrls();this.comp.setCtrls(a),this.restoreFocusOnHeader(n)},t.prototype.restoreFocusOnHeader=function(e){null!=e&&e.column.getPinned()==this.pinned&&this.focusService.focusHeaderPosition({headerPosition:e})},t.prototype.getAllCtrls=function(){var e=Xp([],qp(this.groupsRowCtrls),!1);return this.columnsRowCtrl&&e.push(this.columnsRowCtrl),this.filtersRowCtrl&&e.push(this.filtersRowCtrl),e},t.prototype.onGridColumnsChanged=function(){this.refresh(!0)},t.prototype.onDisplayedColumnsChanged=function(){var e=this.filterManager.hasFloatingFilters()&&!this.hidden;this.includeFloatingFilter!==e&&this.refresh(!0)},t.prototype.setupCenterWidth=function(){var e=this;null==this.pinned&&this.createManagedBean(new rd((function(t){return e.comp.setCenterWidth("".concat(t,"px"))}),!0))},t.prototype.setHorizontalScroll=function(e){this.comp.setViewportScrollLeft(e)},t.prototype.setupPinnedWidth=function(){var e=this;if(null!=this.pinned){var t="left"===this.pinned,i="right"===this.pinned;this.hidden=!0;var n=function(){var n=t?e.pinnedWidthService.getPinnedLeftWidth():e.pinnedWidthService.getPinnedRightWidth();if(null!=n){var o=0==n,r=e.hidden!==o,s=e.gridOptionsService.get("enableRtl"),a=e.gridOptionsService.getScrollbarWidth(),l=e.scrollVisibleService.isVerticalScrollShowing()&&(s&&t||!s&&i),c=l?n+a:n;e.comp.setPinnedContainerWidth("".concat(c,"px")),e.comp.setDisplayed(!o),r&&(e.hidden=o,e.refresh())}};this.addManagedListener(this.eventService,ht.EVENT_LEFT_PINNED_WIDTH_CHANGED,n),this.addManagedListener(this.eventService,ht.EVENT_RIGHT_PINNED_WIDTH_CHANGED,n),this.addManagedListener(this.eventService,ht.EVENT_SCROLL_VISIBILITY_CHANGED,n),this.addManagedListener(this.eventService,ht.EVENT_SCROLLBAR_WIDTH_CHANGED,n)}},t.prototype.getHeaderCtrlForColumn=function(e){if(e instanceof Ee){if(!this.columnsRowCtrl)return;return this.columnsRowCtrl.getHeaderCellCtrl(e)}if(0!==this.groupsRowCtrls.length)for(var t=0;t<this.groupsRowCtrls.length;t++){var i=this.groupsRowCtrls[t].getHeaderCellCtrl(e);
11if(i)return i}},t.prototype.getHtmlElementForColumnHeader=function(e){var t=this.getHeaderCtrlForColumn(e);return t?t.getGui():null},t.prototype.getRowType=function(e){var t=this.getAllCtrls(),i=t[e];return i?i.getType():void 0},t.prototype.focusHeader=function(e,t,i){var n=this.getAllCtrls(),o=n[e];return!!o&&o.focusHeader(t,i)},t.prototype.getViewport=function(){return this.eViewport},t.prototype.getRowCount=function(){return this.groupsRowCtrls.length+(this.columnsRowCtrl?1:0)+(this.filtersRowCtrl?1:0)},t.prototype.destroy=function(){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)),e.prototype.destroy.call(this)},Yp([de("ctrlsService")],t.prototype,"ctrlsService",void 0),Yp([de("scrollVisibleService")],t.prototype,"scrollVisibleService",void 0),Yp([de("pinnedWidthService")],t.prototype,"pinnedWidthService",void 0),Yp([de("columnModel")],t.prototype,"columnModel",void 0),Yp([de("focusService")],t.prototype,"focusService",void 0),Yp([de("filterManager")],t.prototype,"filterManager",void 0),t}(st),Zp=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Jp=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Qp=function(e){function t(t){var i=e.call(this)||this;return i.headerRowComps={},i.rowCompsList=[],i.pinned=t,i}return Zp(t,e),t.prototype.init=function(){var e=this;this.selectAndSetTemplate();var t={setDisplayed:function(t){return e.setDisplayed(t)},setCtrls:function(t){return e.setCtrls(t)},setCenterWidth:function(t){return e.eCenterContainer.style.width=t},setViewportScrollLeft:function(t){return e.getGui().scrollLeft=t},setPinnedContainerWidth:function(t){var i=e.getGui();i.style.width=t,i.style.maxWidth=t,i.style.minWidth=t}},i=this.createManagedBean(new $p(this.pinned));i.setComp(t,this.getGui())},t.prototype.selectAndSetTemplate=function(){var e="left"==this.pinned,i="right"==this.pinned,n=e?t.PINNED_LEFT_TEMPLATE:i?t.PINNED_RIGHT_TEMPLATE:t.CENTER_TEMPLATE;this.setTemplate(n),this.eRowContainer=this.eCenterContainer?this.eCenterContainer:this.getGui()},t.prototype.destroyRowComps=function(){this.setCtrls([])},t.prototype.destroyRowComp=function(e){this.destroyBean(e),this.eRowContainer.removeChild(e.getGui())},t.prototype.setCtrls=function(e){var t,i=this,n=this.headerRowComps;this.headerRowComps={},this.rowCompsList=[];var o=function(e){var n=e.getGui(),o=n.parentElement!=i.eRowContainer;o&&i.eRowContainer.appendChild(n),t&&$n(i.eRowContainer,n,t),t=n};e.forEach((function(e){var t=e.getInstanceId(),r=n[t];delete n[t];var s=r||i.createBean(new rp(e));i.headerRowComps[t]=s,i.rowCompsList.push(s),o(s)})),D(n).forEach((function(e){return i.destroyRowComp(e)}))},t.PINNED_LEFT_TEMPLATE='<div class="ag-pinned-left-header" role="presentation"></div>',t.PINNED_RIGHT_TEMPLATE='<div class="ag-pinned-right-header" role="presentation"></div>',t.CENTER_TEMPLATE='<div class="ag-header-viewport" role="presentation">\n            <div class="ag-header-container" ref="eCenterContainer" role="rowgroup"></div>\n        </div>',Jp([sr("eCenterContainer")],t.prototype,"eCenterContainer",void 0),Jp([le],t.prototype,"init",null),Jp([ce],t.prototype,"destroyRowComps",null),t}(rr),eh=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),th=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};(function(e){e[e["UP"]=0]="UP",e[e["DOWN"]=1]="DOWN",e[e["LEFT"]=2]="LEFT",e[e["RIGHT"]=3]="RIGHT"})(op||(op={}));var ih,nh=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return eh(t,e),t.prototype.postConstruct=function(){var e=this;this.ctrlsService.whenReady((function(t){e.gridBodyCon=t.gridBodyCtrl}))},t.prototype.getHeaderRowCount=function(){var e=this.ctrlsService.getHeaderRowContainerCtrl();return e?e.getRowCount():0},t.prototype.navigateVertically=function(e,t,i){if(t||(t=this.focusService.getFocusedHeader()),!t)return!1;var n=t.headerRowIndex,o=t.column,r=this.getHeaderRowCount(),s=e===op.UP,a=s?this.headerPositionUtils.getColumnVisibleParent(o,n):this.headerPositionUtils.getColumnVisibleChild(o,n),l=a.nextRow,
11c=a.nextFocusColumn,u=!1;return l<0&&(l=0,c=o,u=!0),l>=r&&(l=-1),!(!u&&!c)&&this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:l,column:c},allowUserOverride:!0,event:i})},t.prototype.navigateHorizontally=function(e,t,i){void 0===t&&(t=!1);var n,o,r=this.focusService.getFocusedHeader(),s=e===op.LEFT,a=this.gridOptionsService.get("enableRtl");return s!==a?(o="Before",n=this.headerPositionUtils.findHeader(r,o)):(o="After",n=this.headerPositionUtils.findHeader(r,o)),n||!t?this.focusService.focusHeaderPosition({headerPosition:n,direction:o,fromTab:t,allowUserOverride:!0,event:i}):this.focusNextHeaderRow(r,o,i)},t.prototype.focusNextHeaderRow=function(e,t,i){var n,o=e.headerRowIndex,r=null;return"Before"===t?o>0&&(n=o-1,r=this.headerPositionUtils.findColAtEdgeForHeaderRow(n,"end")):(n=o+1,r=this.headerPositionUtils.findColAtEdgeForHeaderRow(n,"start")),this.focusService.focusHeaderPosition({headerPosition:r,direction:t,fromTab:!0,allowUserOverride:!0,event:i})},t.prototype.scrollToColumn=function(e,t){if(void 0===t&&(t="After"),!e.getPinned()){var i;if(e instanceof pt){var n=e.getDisplayedLeafColumns();i="Before"===t?Ae(n):n[0]}else i=e;this.gridBodyCon.getScrollFeature().ensureColumnVisible(i)}},th([de("focusService")],t.prototype,"focusService",void 0),th([de("headerPositionUtils")],t.prototype,"headerPositionUtils",void 0),th([de("ctrlsService")],t.prototype,"ctrlsService",void 0),th([le],t.prototype,"postConstruct",null),t=th([ue("headerNavigationService")],t),t}(st),oh=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),rh=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},sh=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oh(t,e),t.prototype.setComp=function(e,t,i){this.comp=e,this.eGui=t,this.createManagedBean(new Cr(i,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addManagedListener(this.eventService,ht.EVENT_COLUMN_PIVOT_MODE_CHANGED,this.onPivotModeChanged.bind(this)),this.addManagedListener(this.eventService,ht.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.onPivotModeChanged(),this.setupHeaderHeight(),this.ctrlsService.registerGridHeaderCtrl(this)},t.prototype.setupHeaderHeight=function(){var e=this.setHeaderHeight.bind(this);e(),this.addManagedPropertyListener("headerHeight",e),this.addManagedPropertyListener("pivotHeaderHeight",e),this.addManagedPropertyListener("groupHeaderHeight",e),this.addManagedPropertyListener("pivotGroupHeaderHeight",e),this.addManagedPropertyListener("floatingFiltersHeight",e),this.addManagedListener(this.eventService,ht.EVENT_DISPLAYED_COLUMNS_CHANGED,e),this.addManagedListener(this.eventService,ht.EVENT_COLUMN_HEADER_HEIGHT_CHANGED,e),this.addManagedListener(this.eventService,ht.EVENT_GRID_STYLES_CHANGED,e),this.addManagedListener(this.eventService,ht.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,e)},t.prototype.getHeaderHeight=function(){return this.headerHeight},t.prototype.setHeaderHeight=function(){var e,t=this.columnModel,i=0,n=t.getHeaderRowCount(),o=this.filterManager.hasFloatingFilters();o&&(n++,i=1);var r=this.columnModel.getColumnGroupHeaderRowHeight(),s=this.columnModel.getColumnHeaderRowHeight(),a=1+i,l=n-a;if(e=i*t.getFloatingFiltersHeight(),e+=l*r,e+=s,this.headerHeight!==e){this.headerHeight=e;var c="".concat(e+1,"px");this.comp.setHeightAndMinHeight(c),this.eventService.dispatchEvent({type:ht.EVENT_HEADER_HEIGHT_CHANGED})}},t.prototype.onPivotModeChanged=function(){var e=this.columnModel.isPivotMode();this.comp.addOrRemoveCssClass("ag-pivot-on",e),this.comp.addOrRemoveCssClass("ag-pivot-off",!e)},t.prototype.onDisplayedColumnsChanged=function(){var e=this.columnModel.getAllDisplayedColumns(),t=e.some((function(e){return e.isSpanHeaderHeight()}));this.comp.addOrRemoveCssClass("ag-header-allow-overflow",t)},t.prototype.onTabKeyDown=function(e){var t=this.gridOptionsService.get("enableRtl"),i=e.shiftKey!==t?op.LEFT:op.RIGHT;(this.headerNavigationService.navigateHorizontally(i,!0,e)||this.focusService.focusNextGridCoreContainer(e.shiftKey))&&e.preventDefault()},t.prototype.handleKeyDown=function(e){var t=null;switch(e.key){case xo.LEFT:t=op.LEFT;case xo.RIGHT:o(t)||(t=op.RIGHT),this.headerNavigationService.navigateHorizontally(t,!1,e);break;case xo.UP:t=op.UP;case xo.DOWN:o(t)||(t=op.DOWN),this.headerNavigationService.navigateVertically(t,null,e)&&e.preventDefault();break;default:return}},t.prototype.onFocusOut=function(e){var t=this.gridOptionsService.getDocument(),i=e.relatedTarget;!i&&this.eGui.contains(t.activeElement)||this.eGui.contains(i)||this.focusService.clearFocusedHeader()},rh([de("headerNavigationService")],t.prototype,"headerNavigationService",void 0),rh([de("focusService")],t.prototype,"focusService",void 0),rh([de("columnModel")],t.prototype,"columnModel",void 0),rh([de("ctrlsService")],t.prototype,"ctrlsService",void 0),rh([de("filterManager")],t.prototype,"filterManager",void 0),t}(st),ah=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),lh=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},ch=function(e){function t(){return e.call(this,t.TEMPLATE)||this}return ah(t,e),t.prototype.postConstruct=function(){var e=this,t={addOrRemoveCssClass:function(t,i){return e.addOrRemoveCssClass(t,i)},setHeightAndMinHeight:function(t){e.getGui().style.height=t,e.getGui().style.minHeight=t}},i=this.createManagedBean(new sh);i.setComp(t,this.getGui(),this.getFocusableElement());var n=function(t){e.createManagedBean(t),e.appendChild(t)};n(new Qp("left")),n(new Qp(null)),n(new Qp("right"))},t.TEMPLATE='<div class="ag-header" role="presentation"/>',lh([le],t.prototype,"postConstruct",null),t}(rr),uh=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),dh=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},ph=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return uh(t,e),t.prototype.addResizeBar=function(e){var t=this,i={dragStartPixels:e.dragStartPixels||0,eElement:e.eResizeBar,onDragStart:this.onDragStart.bind(this,e),onDragStop:this.onDragStop.bind(this,e),onDragging:this.onDragging.bind(this,e),includeTouch:!0,stopPropagationForTouch:!0};this.dragService.addDragSource(i);var n=function(){return t.dragService.removeDragSource(i)};return n},t.prototype.onDragStart=function(e,t){this.dragStartX=t.clientX,this.setResizeIcons();var i=t instanceof MouseEvent&&!0===t.shiftKey;e.onResizeStart(i)},t.prototype.setResizeIcons=function(){var e=this.ctrlsService.getGridCtrl();
11e.setResizeCursor(!0),e.disableUserSelect(!0)},t.prototype.onDragStop=function(e,t){e.onResizeEnd(this.resizeAmount),this.resetIcons()},t.prototype.resetIcons=function(){var e=this.ctrlsService.getGridCtrl();e.setResizeCursor(!1),e.disableUserSelect(!1)},t.prototype.onDragging=function(e,t){this.resizeAmount=t.clientX-this.dragStartX,e.onResizing(this.resizeAmount)},dh([de("dragService")],t.prototype,"dragService",void 0),dh([de("ctrlsService")],t.prototype,"ctrlsService",void 0),t=dh([ue("horizontalResizeService")],t),t}(st),hh=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),fh=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},gh=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return hh(t,e),t.prototype.hideActiveMenu=function(){this.hidePopup&&this.hidePopup()},t.prototype.showMenuAfterMouseEvent=function(e,t){var i=this;this.showPopup(e,(function(n){i.popupService.positionPopupUnderMouseEvent({column:e,type:"columnMenu",mouseEvent:t,ePopup:n})}),"columnMenu",t.target)},t.prototype.showMenuAfterButtonClick=function(e,t,i){var n=this;this.showPopup(e,(function(o){n.popupService.positionPopupByComponent({type:i,eventSource:t,ePopup:o,keepWithinBounds:!0,position:"under",column:e})}),i,t)},t.prototype.showPopup=function(e,t,i,n){var o=this,r=this.filterManager.getOrCreateFilterWrapper(e,"COLUMN_MENU");if(!r)throw new Error("AG Grid - unable to show popup filter, filter instantiation failed");var s,a=document.createElement("div");si(a,"presentation"),a.classList.add("ag-menu"),this.tabListener=this.addManagedListener(a,"keydown",(function(e){return o.trapFocusWithin(e,a)})),r.guiPromise.then((function(e){return a.appendChild(e)}));var l=function(){var e;return null===(e=r.filterPromise)||void 0===e?void 0:e.then((function(e){var t;return null===(t=null===e||void 0===e?void 0:e.afterGuiDetached)||void 0===t?void 0:t.call(e)}))},c=n||this.ctrlsService.getGridBodyCtrl().getGui(),u=function(t){e.setMenuVisible(!1,"contextMenu");var i=t instanceof KeyboardEvent;if(o.tabListener&&(o.tabListener=o.tabListener()),i&&n&&zn(n)){var r=o.focusService.findTabbableParent(n);r&&r.focus()}l()},d=this.localeService.getLocaleTextFunc(),p=this.popupService.addPopup({modal:!0,eChild:a,closeOnEsc:!0,closedCallback:u,positionCallback:function(){return t(a)},anchorToElement:c,ariaLabel:d("ariaLabelColumnMenu","Column Menu")});p&&(this.hidePopup=s=p.hideFunc),r.filterPromise.then((function(e){t(a),e.afterGuiAttached&&e.afterGuiAttached({container:i,hidePopup:s})})),e.setMenuVisible(!0,"contextMenu")},t.prototype.trapFocusWithin=function(e,t){e.key!==xo.TAB||e.defaultPrevented||this.focusService.findNextFocusableElement(t,!1,e.shiftKey)||(e.preventDefault(),this.focusService.focusInto(t,e.shiftKey))},t.prototype.isMenuEnabled=function(e){return e.isFilterAllowed()&&e.getMenuTabs(["filterMenuTab"]).includes("filterMenuTab")},fh([de("filterManager")],t.prototype,"filterManager",void 0),fh([de("popupService")],t.prototype,"popupService",void 0),fh([de("focusService")],t.prototype,"focusService",void 0),fh([de("ctrlsService")],t.prototype,"ctrlsService",void 0),t=fh([ue("menuFactory")],t),t}(st),vh=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),yh=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},mh=function(e){function t(i){var n=e.call(this,t.getTemplate(i.cssClass))||this;return n.items=[],n.tabbedItemScrollMap=new Map,n.params=i,i.items&&i.items.forEac
11h((function(e){return n.addItem(e)})),n}return vh(t,e),t.prototype.postConstruct=function(){var e=this;this.createManagedBean(new Cr(this.getFocusableElement(),{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this)})),this.addDestroyFunc((function(){var t,i,n;return null===(n=null===(i=null===(t=e.activeItem)||void 0===t?void 0:t.tabbedItem)||void 0===i?void 0:i.afterDetachedCallback)||void 0===n?void 0:n.call(i)}))},t.getTemplate=function(e){return'<div class="ag-tabs '.concat(e,'">\n            <div ref="eHeader" role="tablist" class="ag-tabs-header ').concat(e?"".concat(e,"-header"):"",'"></div>\n            <div ref="eBody" role="presentation" class="ag-tabs-body ').concat(e?"".concat(e,"-body"):"",'"></div>\n        </div>')},t.prototype.handleKeyDown=function(e){var t=this.gridOptionsService.getDocument();switch(e.key){case xo.RIGHT:case xo.LEFT:if(!this.eHeader.contains(t.activeElement))return;var i=e.key===xo.RIGHT,n=this.gridOptionsService.get("enableRtl"),o=this.items.indexOf(this.activeItem),r=i!==n?Math.min(o+1,this.items.length-1):Math.max(o-1,0);if(o===r)return;e.preventDefault();var s=this.items[r];this.showItemWrapper(s),s.eHeaderButton.focus();break;case xo.UP:case xo.DOWN:e.stopPropagation();break}},t.prototype.onTabKeyDown=function(e){if(!e.defaultPrevented){var t=this,i=t.focusService,n=t.eHeader,o=t.eBody,r=t.activeItem,s=this.gridOptionsService.getDocument(),a=s.activeElement,l=e.target;if(e.preventDefault(),n.contains(a))i.focusInto(o,e.shiftKey);else{var c=null;i.isTargetUnderManagedComponent(o,l)&&(e.shiftKey&&(c=this.focusService.findFocusableElementBeforeTabGuard(o,l)),c||(c=r.eHeaderButton)),!c&&o.contains(a)&&(c=i.findNextFocusableElement(o,!1,e.shiftKey),c||(c=r.eHeaderButton)),c&&c.focus()}}},t.prototype.setAfterAttachedParams=function(e){this.afterAttachedParams=e},t.prototype.showFirstItem=function(){this.items.length>0&&this.showItemWrapper(this.items[0])},t.prototype.addItem=function(e){var t=document.createElement("span");si(t,"tab"),t.setAttribute("tabindex","-1"),t.appendChild(e.title),t.classList.add("ag-tab"),this.eHeader.appendChild(t),di(t,e.titleLabel);var i={tabbedItem:e,eHeaderButton:t};this.items.push(i),t.addEventListener("click",this.showItemWrapper.bind(this,i))},t.prototype.showItem=function(e){var t=this.items.find((function(t){return t.tabbedItem===e}));t&&this.showItemWrapper(t)},t.prototype.showItemWrapper=function(e){var t,i,n=this,o=e.tabbedItem,r=e.eHeaderButton;this.params.onItemClicked&&this.params.onItemClicked({item:o}),this.activeItem!==e?(this.lastScrollListener&&(this.lastScrollListener=this.lastScrollListener()),Wn(this.eBody),o.bodyPromise.then((function(e){n.eBody.appendChild(e);var t=!n.focusService.isKeyboardMode();if(n.focusService.focusInto(n.eBody,!1,t),o.afterAttachedCallback&&o.afterAttachedCallback(n.afterAttachedParams),n.params.keepScrollPosition){var i=o.getScrollableContainer&&o.getScrollableContainer()||e;n.lastScrollListener=n.addManagedListener(i,"scroll",(function(){n.tabbedItemScrollMap.set(o.name,i.scrollTop)}));var r=n.tabbedItemScrollMap.get(o.name);void 0!==r&&setTimeout((function(){i.scrollTop=r}),0)}})),this.activeItem&&(this.activeItem.eHeaderButton.classList.remove("ag-tab-selected"),null===(i=(t=this.activeItem.tabbedItem).afterDetachedCallback)||void 0===i||i.call(t)),r.classList.add("ag-tab-selected"),this.activeItem=e):Z(this.params.onActiveItemClicked)},yh([de("focusService")],t.prototype,"focusService",void 0),yh([sr("eHeader")],t.prototype,"eHeader",void 0),yh([sr("eBody")],t.prototype,"eBody",void 0),yh([le],t.prototype,"postConstruct",null),t}(rr),Ch=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),bh=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},wh=50,Sh=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.polyfillFunctions=[],t}return Ch(t,e),t.prototype.observeResize=function(e,t){var i=this,n=this.gridOptionsService.getWindow(),o=function(){var i=new n.ResizeObserver(t);return i.observe(e),function(){return i.disconnect()}},r=function(){var n=Xn(e),o=qn(e),r=!0,s=function(){if(r){var a=Xn(e),l=qn(e),c=a!==n||l!==o;
11c&&(n=a,o=l,t()),i.doNextPolyfillTurn(s)}};return s(),function(){return r=!1}},s=this.gridOptionsService.get("suppressBrowserResizeObserver"),a=!!n.ResizeObserver;return a&&!s?o():r()},t.prototype.doNextPolyfillTurn=function(e){this.polyfillFunctions.push(e),this.schedulePolyfill()},t.prototype.schedulePolyfill=function(){var e=this;if(!this.polyfillScheduled){var t=function(){var t=e.polyfillFunctions;e.polyfillScheduled=!1,e.polyfillFunctions=[],t.forEach((function(e){return e()}))};this.polyfillScheduled=!0,this.getFrameworkOverrides().setTimeout(t,wh)}},t=bh([ue("resizeObserverService")],t),t}(st),Eh=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),xh=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Oh=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.createTasksP1={list:[],sorted:!1},t.createTasksP2={list:[],sorted:!1},t.destroyTasks=[],t.ticking=!1,t.scrollGoingDown=!0,t.lastPage=0,t.lastScrollTop=0,t.taskCount=0,t.cancelledTasks=new Set,t}return Eh(t,e),t.prototype.setScrollTop=function(e){var t=this.gridOptionsService.get("pagination");if(this.scrollGoingDown=e>=this.lastScrollTop,t&&0===e){var i=this.paginationProxy.getCurrentPage();i!==this.lastPage&&(this.lastPage=i,this.scrollGoingDown=!0)}this.lastScrollTop=e},t.prototype.init=function(){this.useAnimationFrame=!this.gridOptionsService.get("suppressAnimationFrame")},t.prototype.isOn=function(){return this.useAnimationFrame},t.prototype.verifyAnimationFrameOn=function(e){!1===this.useAnimationFrame&&console.warn("AG Grid: AnimationFrameService.".concat(e," called but animation frames are off"))},t.prototype.createTask=function(e,t,i){this.verifyAnimationFrameOn(i);var n={task:e,index:t,createOrder:++this.taskCount};this.addTaskToList(this[i],n),this.schedule()},t.prototype.cancelTask=function(e){this.cancelledTasks.add(e)},t.prototype.addTaskToList=function(e,t){e.list.push(t),e.sorted=!1},t.prototype.sortTaskList=function(e){if(!e.sorted){var t=this.scrollGoingDown?1:-1;e.list.sort((function(e,i){return e.index!==i.index?t*(i.index-e.index):i.createOrder-e.createOrder})),e.sorted=!0}},t.prototype.addDestroyTask=function(e){this.verifyAnimationFrameOn("createTasksP3"),this.destroyTasks.push(e),this.schedule()},t.prototype.executeFrame=function(e){this.verifyAnimationFrameOn("executeFrame");var t=this.createTasksP1,i=t.list,n=this.createTasksP2,o=n.list,r=this.destroyTasks,s=(new Date).getTime(),a=(new Date).getTime()-s,l=e<=0,c=this.ctrlsService.getGridBodyCtrl();while(l||a<e){var u=c.getScrollFeature().scrollGridIfNeeded();if(!u){var d=void 0;if(i.length)this.sortTaskList(t),d=i.pop().task;else if(o.length)this.sortTaskList(n),d=o.pop().task;else{if(!r.length){this.cancelledTasks.clear();break}d=r.pop()}this.cancelledTasks.has(d)||d()}a=(new Date).getTime()-s}i.length||o.length||r.length?this.requestFrame():this.stopTicking()},t.prototype.stopTicking=function(){this.ticking=!1},t.prototype.flushAllFrames=function(){this.useAnimationFrame&&this.executeFrame(-1)},t.prototype.schedule=function(){this.useAnimationFrame&&(this.ticking||(this.ticking=!0,this.requestFrame()))},t.prototype.requestFrame=function(){var e=this.executeFrame.bind(this,60);this.requestAnimationFrame(e)},t.prototype.requestAnimationFrame=function(e){var t=this.gridOptionsService.getWindow();t.requestAnimationFrame?t.requestAnimationFrame(e):t.webkitRequestAnimationFrame?t.webkitRequestAnimationFrame(e):t.setTimeout(e,0)},t.prototype.isQueueEmpty=function(){return!this.ticking},t.prototype.debounce=function(e){var t=this,i=!1;return function(){t.isOn()?i||(i=!0,t.addDestroyTask((function(){i=!1,e()}))):t.getFrameworkOverrides().setTimeout(e,0)}},xh([de("ctrlsService")],t.prototype,"ctrlsService",void 0),xh([de("paginationProxy")],t.prototype,"paginationProxy",void 0),xh([le],t.prototype,"init",null),t=xh([ue("animationFrameService")],t),t}(st);(function(e){e["EVERYTHING"]="group",e["FILTER"]="filter",e["SORT"]="sort",e["MAP"]="map",e["AGGREGATE"]="aggregate",e["FILTER_AGGREGATES"]="filter_aggregates",e["PIVOT"]="pivot",e["NOTHING"]="nothing"}
11)(ih||(ih={}));var Th,Dh=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Rh=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Ah=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Dh(t,e),t.prototype.postConstruct=function(){this.isClientSideRowModel="clientSide"===this.rowModel.getType()},t.prototype.expandRows=function(e){if(this.isClientSideRowModel){var t=new Set(e);this.rowModel.forEachNode((function(e){e.id&&t.has(e.id)&&(e.expanded=!0)})),this.onGroupExpandedOrCollapsed()}},t.prototype.getExpandedRows=function(){var e=[];return this.rowModel.forEachNode((function(t){var i=t.expanded,n=t.id;i&&n&&e.push(n)})),e},t.prototype.expandAll=function(e){this.isClientSideRowModel&&this.rowModel.expandOrCollapseAll(e)},t.prototype.setRowNodeExpanded=function(e,t,i){e&&(i&&e.parent&&-1!==e.parent.level&&this.setRowNodeExpanded(e.parent,t,i),e.setExpanded(t))},t.prototype.onGroupExpandedOrCollapsed=function(){this.isClientSideRowModel&&this.rowModel.refreshModel({step:ih.MAP})},Rh([de("rowModel")],t.prototype,"rowModel",void 0),Rh([le],t.prototype,"postConstruct",null),t=Rh([ue("expansionService")],t),t}(st),_h=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ph=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Mh=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _h(t,e),t.prototype.postConstruct=function(){var e=this;this.ctrlsService.whenReady((function(t){e.centerRowContainerCtrl=t.centerRowContainerCtrl}))},t.prototype.getPreferredWidthForColumn=function(e,t){var i=this.getHeaderCellForColumn(e);if(!i)return-1;var n=this.rowRenderer.getAllCellsForColumn(e);return t||n.push(i),this.addElementsToContainerAndGetWidth(n)},t.prototype.getPreferredWidthForColumnGroup=function(e){var t=this.getHeaderCellForColumn(e);return t?this.addElementsToContainerAndGetWidth([t]):-1},t.prototype.addElementsToContainerAndGetWidth=function(e){var t=this,i=document.createElement("form");i.style.position="fixed";var n=this.centerRowContainerCtrl.getContainerElement();e.forEach((function(e){return t.cloneItemIntoDummy(e,i)})),n.appendChild(i);var o=i.offsetWidth;n.removeChild(i);var r=this.getAutoSizePadding();return o+r},t.prototype.getAutoSizePadding=function(){return this.gridOptionsService.get("autoSizePadding")},t.prototype.getHeaderCellForColumn=function(e){var t=null;return this.ctrlsService.getHeaderRowContainerCtrls().forEach((function(i){var n=i.getHtmlElementForColumnHeader(e);null!=n&&(t=n)})),t},t.prototype.cloneItemIntoDummy=function(e,t){var i=e.cloneNode(!0);i.style.width="",i.style.position="static",i.style.left="";var n=document.createElement("div"),o=n.classList,r=["ag-header-cell","ag-header-group-cell"].some((function(e){return i.classList.contains(e)}));r?(o.add("ag-header","ag-header-row"),n.style.position="static"):o.add("ag-row");var s=e.parentElement;while(s){var a=["ag-header-row","ag-row"].some((function(e){return s.classList.contains(e)}));if(a){for(var l=0;l<s.classList.length;l++){var c=s.classList[l];"ag-row-position-absolute"!=c&&o.add(c)}break}s=s.parentElement}n.appendChild(i),t.appendChild(n)},Ph([de("rowRenderer")],t.prototype,"rowRenderer",void 0),Ph([de("ctrlsService")],t.prototype,"ctrlsService",void 0),Ph([de("rowCssClassCalculator")],t.prototype,"rowCssClassCalculator",void 0),Ph([le],t.prototype,"postConstruct",null),t=Ph([ue("autoWidthCalculator")],t),t}(st),kh=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Nh=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Lh=function(e){var t="function"===typeof Symbol&&Symbol.iterator,i=t&&e[t],n=0;if(i)return i.call(e);
11if(e&&"number"===typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Ih=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},Fh=function(e,t,i){if(i||2===arguments.length)for(var n,o=0,r=t.length;o<r;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},Gh=function(e){function t(t,i){var n=e.call(this)||this;return n.createRowCon=t,n.destroyRowCtrls=i,n.stickyRowCtrls=[],n.containerHeight=0,n}return kh(t,e),t.prototype.postConstruct=function(){var e=this;this.isClientSide="clientSide"===this.rowModel.getType(),this.ctrlsService.whenReady((function(t){e.gridBodyCtrl=t.gridBodyCtrl}))},t.prototype.getStickyRowCtrls=function(){return this.stickyRowCtrls},t.prototype.checkStickyRows=function(){var e=this,t=0;if(!this.gridOptionsService.isGroupRowsSticky())return this.refreshNodesAndContainerHeight([],t);var i=[],n=this.rowRenderer.getFirstVisibleVerticalPixel(),o=function(o){var r,s,a,l;if(i.push(o),e.isClientSide){var c=o;while(c.isExpandable()&&c.expanded)if(c.master)c=c.detailNode;else if(c.childrenAfterSort){if(0===c.childrenAfterSort.length)break;c=Ae(c.childrenAfterSort)}l=c.rowTop+c.rowHeight}else if(o.master)l=o.detailNode.rowTop+o.detailNode.rowHeight;else{var u=null===(r=o.childStore)||void 0===r?void 0:r.getStoreBounds();l=(null!==(s=null===u||void 0===u?void 0:u.heightPx)&&void 0!==s?s:0)+(null!==(a=null===u||void 0===u?void 0:u.topPx)&&void 0!==a?a:0)}var d=n+t+o.rowHeight;o.stickyRowTop=l<d?t+(l-d):t,t=0,i.forEach((function(e){var i=e.stickyRowTop+e.rowHeight;t<i&&(t=i)}))};while(1){var r=n+t,s=this.rowModel.getRowIndexAtPixel(r),a=this.rowModel.getRow(s);if(null==a)break;if(a.level<0)break;var l=[],c=a.parent;while(c.level>=0)l.push(c),c=c.parent;var u=l.reverse().find((function(e){return i.indexOf(e)<0&&e.displayed}));if(u)o(u);else{if(!(a.isExpandable()&&a.expanded&&a.rowTop<r))break;o(a)}}return this.refreshNodesAndContainerHeight(i,t)},t.prototype.refreshStickyNode=function(e){for(var t=[],i=0;i<this.stickyRowCtrls.length;i++){var n=this.stickyRowCtrls[i].getRowNode();n!==e&&t.push(n)}this.refreshNodesAndContainerHeight(t,this.containerHeight)&&this.checkStickyRows()},t.prototype.refreshNodesAndContainerHeight=function(e,t){var i,n,o,r=this,s=!1,a=this.stickyRowCtrls.filter((function(t){return-1===e.indexOf(t.getRowNode())})),l=e.filter((function(e){return-1===r.stickyRowCtrls.findIndex((function(t){return t.getRowNode()===e}))}));(a.length||l.length)&&(s=!0);var c={};a.forEach((function(e){c[e.getRowNode().id]=e,r.stickyRowCtrls=r.stickyRowCtrls.filter((function(t){return t!==e}))}));try{for(var u=Lh(Object.values(c)),d=u.next();!d.done;d=u.next()){var p=d.value;p.getRowNode().sticky=!1}}catch(f){i={error:f}}finally{try{d&&!d.done&&(n=u.return)&&n.call(u)}finally{if(i)throw i.error}}this.destroyRowCtrls(c,!1);var h=l.map((function(e){return e.sticky=!0,r.createRowCon(e,!1,!1)}));return(o=this.stickyRowCtrls).push.apply(o,Fh([],Ih(h),!1)),this.stickyRowCtrls.forEach((function(e){return e.setRowTop(e.getRowNode().stickyRowTop)})),this.stickyRowCtrls.sort((function(e,t){return t.getRowNode().rowIndex-e.getRowNode().rowIndex})),this.containerHeight!==t&&(this.containerHeight=t,this.gridBodyCtrl.setStickyTopHeight(t),s=!0),s},Nh([de("rowModel")],t.prototype,"rowModel",void 0),Nh([de("rowRenderer")],t.prototype,"rowRenderer",void 0),Nh([de("ctrlsService")],t.prototype,"ctrlsService",void 0),Nh([le],t.prototype,"postConstruct",null),t}(st),Vh=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Bh=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},jh=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},Hh=function(e,t,i){if(i||2===arguments.length)for(var n,o=0,r=t.length;o<r;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},Wh=function(e){var t="function"===typeof Symbol&&Symbol.iterator,i=t&&e[t],n=0;if(i)return i.call(e);
11if(e&&"number"===typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Uh=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.destroyFuncsForColumnListeners=[],t.rowCtrlsByRowIndex={},t.zombieRowCtrls={},t.allRowCtrls=[],t.topRowCtrls=[],t.bottomRowCtrls=[],t.refreshInProgress=!1,t.dataFirstRenderedFired=!1,t.setupRangeSelectionListeners=function(){var e=function(){t.getAllCellCtrls().forEach((function(e){return e.onRangeSelectionChanged()}))},i=function(){t.getAllCellCtrls().forEach((function(e){return e.updateRangeBordersIfRangeCount()}))},n=function(){t.eventService.addEventListener(ht.EVENT_RANGE_SELECTION_CHANGED,e),t.eventService.addEventListener(ht.EVENT_COLUMN_MOVED,i),t.eventService.addEventListener(ht.EVENT_COLUMN_PINNED,i),t.eventService.addEventListener(ht.EVENT_COLUMN_VISIBLE,i)},o=function(){t.eventService.removeEventListener(ht.EVENT_RANGE_SELECTION_CHANGED,e),t.eventService.removeEventListener(ht.EVENT_COLUMN_MOVED,i),t.eventService.removeEventListener(ht.EVENT_COLUMN_PINNED,i),t.eventService.removeEventListener(ht.EVENT_COLUMN_VISIBLE,i)};t.addDestroyFunc((function(){return o()})),t.addManagedPropertyListener("enableRangeSelection",(function(e){var t=e.currentValue;t?n():o()}));var r=t.gridOptionsService.get("enableRangeSelection");r&&n()},t}return Vh(t,e),t.prototype.postConstruct=function(){var e=this;this.ctrlsService.whenReady((function(){e.gridBodyCtrl=e.ctrlsService.getGridBodyCtrl(),e.initialise()}))},t.prototype.initialise=function(){var e=this;if(this.addManagedListener(this.eventService,ht.EVENT_PAGINATION_CHANGED,this.onPageLoaded.bind(this)),this.addManagedListener(this.eventService,ht.EVENT_PINNED_ROW_DATA_CHANGED,this.onPinnedRowDataChanged.bind(this)),this.addManagedListener(this.eventService,ht.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,ht.EVENT_BODY_SCROLL,this.onBodyScroll.bind(this)),this.addManagedListener(this.eventService,ht.EVENT_BODY_HEIGHT_CHANGED,this.redraw.bind(this)),this.addManagedPropertyListeners(["domLayout","embedFullWidthRows"],(function(){return e.onDomLayoutChanged()})),this.addManagedPropertyListeners(["suppressMaxRenderedRowRestriction","rowBuffer"],(function(){return e.redraw()})),this.addManagedPropertyListeners(["suppressCellFocus","getBusinessKeyForNode","fullWidthCellRenderer","fullWidthCellRendererParams","rowStyle","getRowStyle","rowClass","getRowClass","rowClassRules","groupRowRenderer","groupRowRendererParams","loadingCellRenderer","loadingCellRendererParams","detailCellRenderer","detailCellRendererParams","enableRangeSelection","enableCellTextSelection"],(function(){return e.redrawRows()})),this.gridOptionsService.isGroupRowsSticky()){var t=this.rowModel.getType();"clientSide"!==t&&"serverSide"!==t||(this.stickyRowFeature=this.createManagedBean(new Gh(this.createRowCon.bind(this),this.destroyRowCtrls.bind(this))))}this.registerCellEventListeners(),this.initialiseCache(),this.printLayout=this.gridOptionsService.isDomLayout("print"),this.embedFullWidthRows=this.printLayout||this.gridOptionsService.get("embedFullWidthRows"),this.redrawAfterModelUpdate()},t.prototype.initialiseCache=function(){if(this.gridOptionsService.get("keepDetailRows")){var e=this.getKeepDetailRowsCount(),t=null!=e?e:3;this.cachedRowCtrls=new zh(t)}},t.prototype.getKeepDetailRowsCount=function(){return this.gridOptionsService.get("keepDetailRowsCount")},t.prototype.getStickyTopRowCtrls=function(){return this.stickyRowFeature?this.stickyRowFeature.getStickyRowCtrls():[]},t.prototype.updateAllRowCtrls=function(){var e=D(this.rowCtrlsByRowIndex),t=this.gridOptionsService.get("ensureDomOrder"),i=this.gridOptionsService.isDomLayout("print");(t||i)&&e.sort((function(e,t){return e.getRowNode().rowIndex-t.getRowNode.rowIndex}));var n=D(this.zombieRowCtrls),o=this.cachedRowCtrls?this.cachedRowCtrls.getEntries():[];n.length>0||o.length>0?this.allRowCtrls=Hh(Hh(Hh([],jh(e),!1),jh(n),!1),jh(o),!1):this.allRowCtrls=e},t.prototype.onCellFocusChanged=function(e){this.getAllCellCtrls().forEac
11h((function(t){return t.onCellFocused(e)})),this.getFullWidthRowCtrls().forEach((function(t){return t.onFullWidthRowFocused(e)}))},t.prototype.registerCellEventListeners=function(){var e=this;this.addManagedListener(this.eventService,ht.EVENT_CELL_FOCUSED,(function(t){e.onCellFocusChanged(t)})),this.addManagedListener(this.eventService,ht.EVENT_CELL_FOCUS_CLEARED,(function(){e.onCellFocusChanged()})),this.addManagedListener(this.eventService,ht.EVENT_FLASH_CELLS,(function(t){e.getAllCellCtrls().forEach((function(e){return e.onFlashCells(t)}))})),this.addManagedListener(this.eventService,ht.EVENT_COLUMN_HOVER_CHANGED,(function(){e.getAllCellCtrls().forEach((function(e){return e.onColumnHover()}))})),this.addManagedListener(this.eventService,ht.EVENT_DISPLAYED_COLUMNS_CHANGED,(function(){e.getAllCellCtrls().forEach((function(e){return e.onDisplayedColumnsChanged()}))})),this.addManagedListener(this.eventService,ht.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,(function(){e.printLayout&&e.getAllCellCtrls().forEach((function(e){return e.onLeftChanged()}))})),this.setupRangeSelectionListeners(),this.refreshListenersToColumnsForCellComps(),this.addManagedListener(this.eventService,ht.EVENT_GRID_COLUMNS_CHANGED,this.refreshListenersToColumnsForCellComps.bind(this)),this.addDestroyFunc(this.removeGridColumnListeners.bind(this))},t.prototype.removeGridColumnListeners=function(){this.destroyFuncsForColumnListeners.forEach((function(e){return e()})),this.destroyFuncsForColumnListeners.length=0},t.prototype.refreshListenersToColumnsForCellComps=function(){var e=this;this.removeGridColumnListeners();var t=this.columnModel.getAllGridColumns();t.forEach((function(t){var i=function(i){e.getAllCellCtrls().forEach((function(e){e.getColumn()===t&&i(e)}))},n=function(){i((function(e){return e.onLeftChanged()}))},o=function(){i((function(e){return e.onWidthChanged()}))},r=function(){i((function(e){return e.onFirstRightPinnedChanged()}))},s=function(){i((function(e){return e.onLastLeftPinnedChanged()}))},a=function(){i((function(e){return e.onColDefChanged()}))};t.addEventListener("leftChanged",n),t.addEventListener("widthChanged",o),t.addEventListener("firstRightPinnedChanged",r),t.addEventListener("lastLeftPinnedChanged",s),t.addEventListener("colDefChanged",a),e.destroyFuncsForColumnListeners.push((function(){t.removeEventListener("leftChanged",n),t.removeEventListener("widthChanged",o),t.removeEventListener("firstRightPinnedChanged",r),t.removeEventListener("lastLeftPinnedChanged",s),t.removeEventListener("colDefChanged",a)}))}))},t.prototype.onDomLayoutChanged=function(){var e=this.gridOptionsService.isDomLayout("print"),t=e||this.gridOptionsService.get("embedFullWidthRows"),i=t!==this.embedFullWidthRows||this.printLayout!==e;this.printLayout=e,this.embedFullWidthRows=t,i&&this.redrawAfterModelUpdate({domLayoutChanged:!0})},t.prototype.datasourceChanged=function(){this.firstRenderedRow=0,this.lastRenderedRow=-1;var e=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(e)},t.prototype.onPageLoaded=function(e){var t={recycleRows:e.keepRenderedRows,animate:e.animate,newData:e.newData,newPage:e.newPage,onlyBody:!0};this.redrawAfterModelUpdate(t)},t.prototype.getAllCellsForColumn=function(e){var t=[];return this.getAllRowCtrls().forEach((function(i){var n=i.getCellElement(e);n&&t.push(n)})),t},t.prototype.refreshFloatingRowComps=function(){this.refreshFloatingRows(this.topRowCtrls,this.pinnedRowModel.getPinnedTopRowData()),this.refreshFloatingRows(this.bottomRowCtrls,this.pinnedRowModel.getPinnedBottomRowData())},t.prototype.getTopRowCtrls=function(){return this.topRowCtrls},t.prototype.getCentreRowCtrls=function(){return this.allRowCtrls},t.prototype.getBottomRowCtrls=function(){return this.bottomRowCtrls},t.prototype.refreshFloatingRows=function(e,t){var i=this;e.forEach((function(e){e.destroyFirstPass(),e.destroySecondPass()})),e.length=0,t&&t.forEach((function(t){var n=new Lu(t,i.beans,!1,!1,i.printLayout);e.push(n)}))},t.prototype.onPinnedRowDataChanged=function(){var e={recycleRows:!0};this.redrawAfterModelUpdate(e)},t.prototype.redrawRow=function(e,t){var i=this;if(void 0===t&&(t=!1),e.sticky)this.stickyRowFeature.refreshStickyNode(e);else{var n=function(t){var n=t[e.rowIndex];n&&n.getRowNode()===e&&(n.destroyFirstPass(),n.destroySecondPass(),t[e.rowIndex]=i.createRowCon(e,!1,!1))};switch(e.rowPinned){case"top":n(this.topRowCtrls);case"bottom":n(this.bottomRowCtrls);default:n(this.rowCtrlsByRowIndex),this.updateAllRowCtrls()}}t||this.dispatchDisplayedRowsChanged(!1)},t.prototype.redrawRows=function(e){var t=this,i=null!=e;if(i)return null===e||void 0===e||e.forEach((function(e){return t.redrawRow(e,!0)})),void this.dispatchDisplayedRowsChanged(!1);this.redrawAfterModelUpdate()},t.prototype.getCellToRestoreFocusToAfterRefresh=function(e){var t=(null===e||void 0===e?void 0:e.suppressKeepFocus)?null:this.focusService.getFocusCellToUseAfterRefresh();if(null==t)return null;var i=this.gridOptionsService.getDocument(),n=i.activeElement,o=this.gridOptionsService.getDomData(n,Du.DOM_DATA_KEY_CELL_CTRL),r=this.gridOptionsService.getDomData(n,Lu.DOM_DATA_KEY_ROW_CTRL),s=o||r;return s?t:null},t.prototype.redrawAfterModelUpdate=function(e){void 0===e&&(e={}),this.getLockOnRefresh();var t=this.getCellToRestoreFocusToAfterRefresh(e);this.updateContainerHeights(),this.scrollToTopIfNewData(e);
vendor: 1,265 bytes, line 11
11var i=!e.domLayoutChanged&&!!e.recycleRows,n=e.animate&&this.gridOptionsService.isAnimateRows(),o=i?this.getRowsToRecycle():null;i||this.removeAllRowComps(),this.workOutFirstAndLastRowsToRender(),this.stickyRowFeature&&this.stickyRowFeature.checkStickyRows(),this.recycleRows(o,n),this.gridBodyCtrl.updateRowCount(),e.onlyBody||this.refreshFloatingRowComps(),this.dispatchDisplayedRowsChanged(),null!=t&&this.restoreFocusedCell(t),this.releaseLockOnRefresh()},t.prototype.scrollToTopIfNewData=function(e){var t=e.newData||e.newPage,i=this.gridOptionsService.get("suppressScrollOnNewData");t&&!i&&this.gridBodyCtrl.getScrollFeature().scrollToTop()},t.prototype.updateContainerHeights=function(){if(this.printLayout)this.rowContainerHeightService.setModelHeight(null);else{var e=this.paginationProxy.getCurrentPageHeight();0===e&&(e=1),this.rowContainerHeightService.setModelHeight(e)}},t.prototype.getLockOnRefresh=function(){if(this.refreshInProgress)throw new Error("AG Grid: cannot get grid to draw rows when it is in the middle of drawing rows. Your code probably called a grid API method while the grid was in the render stage. To overcome this, put the API call into a timeout, e.g. instead of api.redrawRows(), call setTimeout(function() { api.redrawRows(); }
11, 0). To see what part of your code that caused the refresh check this stacktrace.");this.refreshInProgress=!0},t.prototype.releaseLockOnRefresh=function(){this.refreshInProgress=!1},t.prototype.isRefreshInProgress=function(){return this.refreshInProgress},t.prototype.restoreFocusedCell=function(e){e&&(this.focusService.setRestoreFocusedCell(e),this.onCellFocusChanged({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,api:this.beans.gridApi,columnApi:this.beans.columnApi,context:this.beans.gridOptionsService.context,type:"mock"}))},t.prototype.stopEditing=function(e){void 0===e&&(e=!1),this.getAllRowCtrls().forEach((function(t){t.stopEditing(e)}))},t.prototype.getAllCellCtrls=function(){for(var e=[],t=this.getAllRowCtrls(),i=t.length,n=0;n<i;n++)for(var o=t[n].getAllCellCtrls(),r=o.length,s=0;s<r;s++)e.push(o[s]);return e},t.prototype.getAllRowCtrls=function(){var e,t,i=this.stickyRowFeature&&this.stickyRowFeature.getStickyRowCtrls()||[],n=Hh(Hh(Hh([],jh(this.topRowCtrls),!1),jh(this.bottomRowCtrls),!1),jh(i),!1);try{for(var o=Wh(Object.keys(this.rowCtrlsByRowIndex)),r=o.next();!r.done;r=o.next()){var s=r.value;n.push(this.rowCtrlsByRowIndex[s])}}catch(a){e={error:a}}finally{try{r&&!r.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}return n},t.prototype.addRenderedRowListener=function(e,t,i){var n=this.rowCtrlsByRowIndex[t];n&&n.addEventListener(e,i)},t.prototype.flashCells=function(e){void 0===e&&(e={});var t=e.flashDelay,i=e.fadeDelay;this.getCellCtrls(e.rowNodes,e.columns).forEach((function(e){return e.flashCell({flashDelay:t,fadeDelay:i})}))},t.prototype.refreshCells=function(e){var t=this;void 0===e&&(e={});var i={forceRefresh:e.force,newData:!1,suppressFlash:e.suppressFlash};this.getCellCtrls(e.rowNodes,e.columns).forEach((function(e){return e.refreshOrDestroyCell(i)})),e.rowNodes&&(this.getRowCtrls(e.rowNodes).forEach((function(e){if(e.isFullWidth()){var i=e.refreshFullWidth();i||t.redrawRow(e.getRowNode(),!0)}})),this.dispatchDisplayedRowsChanged(!1))},t.prototype.getCellRendererInstances=function(e){var t,i=this,n=this.getCellCtrls(e.rowNodes,e.columns).map((function(e){return e.getCellRenderer()})).filter((function(e){return null!=e}));if(null===(t=e.columns)||void 0===t?void 0:t.length)return n;var o=[],r=this.mapRowNodes(e.rowNodes);return this.getAllRowCtrls().forEach((function(e){if((!r||i.isRowInMap(e.getRowNode(),r))&&e.isFullWidth()){var t=e.getFullWidthCellRenderer();t&&o.push(t)}})),Hh(Hh([],jh(o),!1),jh(n),!1)},t.prototype.getCellEditorInstances=function(e){var t=[];return this.getCellCtrls(e.rowNodes,e.columns).forEach((function(e){var i=e.getCellEditor();i&&t.push(i)})),t},t.prototype.getEditingCells=function(){var e=[];return this.getAllCellCtrls().forEach((function(t){if(t.isEditing()){var i=t.getCellPosition();e.push(i)}})),e},t.prototype.mapRowNodes=function(e){if(e){var t={top:{},bottom:{},normal:{}};return e.forEach((function(e){var i=e.id;"top"===e.rowPinned?t.top[i]=e:"bottom"===e.rowPinned?t.bottom[i]=e:t.normal[i]=e})),t}},t.prototype.isRowInMap=function(e,t){var i=e.id,n=e.rowPinned;return"bottom"===n?null!=t.bottom[i]:"top"===n?null!=t.top[i]:null!=t.normal[i]},t.prototype.getRowCtrls=function(e){var t=this,i=this.mapRowNodes(e),n=this.getAllRowCtrls();return e&&i?n.filter((function(e){var n=e.getRowNode();return t.isRowInMap(n,i)})):n},t.prototype.getCellCtrls=function(e,t){var i,n=this;o(t)&&(i={},t.forEach((function(e){var t=n.columnModel.getGridColumn(e);o(t)&&(i[t.getId()]=!0)})));var r=[];return this.getRowCtrls(e).forEach((function(e){e.getAllCellCtrls().forEach((function(e){var t=e.getColumn().getId(),n=i&&!i[t];n||r.push(e)}))})),r},t.prototype.destroy=function(){this.removeAllRowComps(),e.prototype.destroy.call(this)},t.prototype.removeAllRowComps=function(){var e=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(e)},t.prototype.getRowsToRecycle=function(){var e=[];m(this.rowCtrlsByRowIndex,(function(t,i){var n=null==i.getRowNode().id;n&&e.push(t)})),this.removeRowCtrls(e);var t={};return m(this.rowCtrlsByRowIndex,(function(e,i){var n=i.getRowNode();t[n.id]=i})),this.rowCtrlsByRowIndex={},t},t.prototype.removeRowCtrls=function(e){var t=this;e.forEach((function(e){var i=t.rowCtrlsByRowIndex[e];i&&(i.destroyFirstPass(),i.destroySecondPass()),delete t.rowCtrlsByRowIndex[e]}))},t.prototype.onBodyScroll=function(e){"vertical"===e.direction&&this.redraw({afterScroll:!0})},t.prototype.redraw=function(e){void 0===e&&(e={});var t,i=e.afterScroll;this.stickyRowFeature&&Qi()&&(t=this.getCellToRestoreFocusToAfterRefresh()||void 0);
11var n=this.firstRenderedRow,o=this.lastRenderedRow;this.workOutFirstAndLastRowsToRender();var r=!1;this.stickyRowFeature&&(r=this.stickyRowFeature.checkStickyRows());var s=this.firstRenderedRow!==n||this.lastRenderedRow!==o;if((!i||r||s)&&(this.getLockOnRefresh(),this.recycleRows(null,!1,i),this.releaseLockOnRefresh(),this.dispatchDisplayedRowsChanged(i),null!=t)){var a=this.getCellToRestoreFocusToAfterRefresh();null!=t&&null==a&&(this.animationFrameService.flushAllFrames(),this.restoreFocusedCell(t))}},t.prototype.removeRowCompsNotToDraw=function(e){var t={};e.forEach((function(e){return t[e]=!0}));var i=Object.keys(this.rowCtrlsByRowIndex),n=i.filter((function(e){return!t[e]}));this.removeRowCtrls(n)},t.prototype.calculateIndexesToDraw=function(e){var t=this,i=un(this.firstRenderedRow,this.lastRenderedRow),n=function(e,n){var o=n.getRowNode().rowIndex;null!=o&&(o<t.firstRenderedRow||o>t.lastRenderedRow)&&t.doNotUnVirtualiseRow(n)&&i.push(o)};m(this.rowCtrlsByRowIndex,n),m(e,n),i.sort((function(e,t){return e-t}));for(var o=[],r=0;r<i.length;r++){var s=i[r],a=this.paginationProxy.getRow(s);a&&!a.sticky&&o.push(s)}return o},t.prototype.recycleRows=function(e,t,i){var n=this;void 0===t&&(t=!1),void 0===i&&(i=!1);var r=this.calculateIndexesToDraw(e);if(this.removeRowCompsNotToDraw(r),this.printLayout&&(t=!1),r.forEach((function(r){var s=n.createOrUpdateRowCtrl(r,e,t,i);o(s)})),e){var s=i&&!this.gridOptionsService.get("suppressAnimationFrame")&&!this.printLayout;s?this.beans.animationFrameService.addDestroyTask((function(){n.destroyRowCtrls(e,t),n.updateAllRowCtrls(),n.dispatchDisplayedRowsChanged()})):this.destroyRowCtrls(e,t)}this.updateAllRowCtrls()},t.prototype.dispatchDisplayedRowsChanged=function(e){void 0===e&&(e=!1);var t={type:ht.EVENT_DISPLAYED_ROWS_CHANGED,afterScroll:e};this.eventService.dispatchEvent(t)},t.prototype.onDisplayedColumnsChanged=function(){var e=this.columnModel.isPinningLeft(),t=this.columnModel.isPinningRight(),i=this.pinningLeft!==e||t!==this.pinningRight;i&&(this.pinningLeft=e,this.pinningRight=t,this.embedFullWidthRows&&this.redrawFullWidthEmbeddedRows())},t.prototype.redrawFullWidthEmbeddedRows=function(){var e=[];this.getFullWidthRowCtrls().forEach((function(t){var i=t.getRowNode().rowIndex;e.push(i.toString())})),this.refreshFloatingRowComps(),this.removeRowCtrls(e),this.redraw({afterScroll:!0})},t.prototype.getFullWidthRowCtrls=function(e){var t=this,i=this.mapRowNodes(e);return this.getAllRowCtrls().filter((function(e){if(!e.isFullWidth())return!1;var n=e.getRowNode();return!(null!=i&&!t.isRowInMap(n,i))}))},t.prototype.createOrUpdateRowCtrl=function(e,t,i,n){var r,s=this.rowCtrlsByRowIndex[e];s||(r=this.paginationProxy.getRow(e),o(r)&&o(t)&&t[r.id]&&r.alreadyRendered&&(s=t[r.id],t[r.id]=null));var a=!s;if(a){if(r||(r=this.paginationProxy.getRow(e)),!o(r))return;s=this.createRowCon(r,i,n)}return r&&(r.alreadyRendered=!0),this.rowCtrlsByRowIndex[e]=s,s},t.prototype.destroyRowCtrls=function(e,t){var i=this,n=[];m(e,(function(e,o){o&&(i.cachedRowCtrls&&o.isCacheable()?i.cachedRowCtrls.addRow(o):(o.destroyFirstPass(),t?(i.zombieRowCtrls[o.getInstanceId()]=o,n.push((function(){o.destroySecondPass(),delete i.zombieRowCtrls[o.getInstanceId()]}))):o.destroySecondPass()))})),t&&(n.push((function(){i.updateAllRowCtrls(),i.dispatchDisplayedRowsChanged()})),H(n))},t.prototype.getRowBuffer=function(){return this.gridOptionsService.get("rowBuffer")},t.prototype.getRowBufferInPixels=function(){var e=this.getRowBuffer(),t=this.gridOptionsService.getRowHeightAsNumber();return e*t},t.prototype.workOutFirstAndLastRowsToRender=function(){var e,t;if(this.rowContainerHeightService.updateOffset(),this.paginationProxy.isRowsToRender())if(this.printLayout)this.environment.refreshRowHeightVariable(),e=this.paginationProxy.getPageFirstRow(),t=this.paginationProxy.getPageLastRow();else{var i=this.getRowBufferInPixels(),n=this.ctrlsService.getGridBodyCtrl(),o=this.gridOptionsService.get("suppressRowVirtualisation"),r=!1,s=void 0,a=void 0;do{var l=this.paginationProxy.getPixelOffset(),c=this.paginationProxy.getCurrentPagePixelRange(),u=c.pageFirstPixel,d=c.pageLastPixel,p=this.rowContainerHeightService.getDivStretchOffset(),h=n.getScrollFeature
11().getVScrollPosition(),f=h.top,g=h.bottom;o?(s=u+p,a=d+p):(s=Math.max(f+l-i,u)+p,a=Math.min(g+l+i,d)+p),this.firstVisibleVPixel=Math.max(f+l,u)+p,r=this.ensureAllRowsInRangeHaveHeightsCalculated(s,a)}while(r);var v=this.paginationProxy.getRowIndexAtPixel(s),y=this.paginationProxy.getRowIndexAtPixel(a),m=this.paginationProxy.getPageFirstRow(),C=this.paginationProxy.getPageLastRow();v<m&&(v=m),y>C&&(y=C),e=v,t=y}else e=0,t=-1;var b=this.gridOptionsService.isDomLayout("normal"),w=this.gridOptionsService.get("suppressMaxRenderedRowRestriction"),S=Math.max(this.getRowBuffer(),500);b&&!w&&t-e>S&&(t=e+S);var E=e!==this.firstRenderedRow,x=t!==this.lastRenderedRow;if(E||x){this.firstRenderedRow=e,this.lastRenderedRow=t;var O={type:ht.EVENT_VIEWPORT_CHANGED,firstRow:e,lastRow:t};this.eventService.dispatchEvent(O)}},t.prototype.dispatchFirstDataRenderedEvent=function(){var e=this;if(!this.dataFirstRenderedFired){this.dataFirstRenderedFired=!0;var t={type:ht.EVENT_FIRST_DATA_RENDERED,firstRow:this.firstRenderedRow,lastRow:this.lastRenderedRow};window.requestAnimationFrame((function(){e.beans.eventService.dispatchEvent(t)}))}},t.prototype.ensureAllRowsInRangeHaveHeightsCalculated=function(e,t){var i=this.paginationProxy.ensureRowHeightsValid(e,t,-1,-1);return i&&this.updateContainerHeights(),i},t.prototype.getFirstVisibleVerticalPixel=function(){return this.firstVisibleVPixel},t.prototype.getFirstVirtualRenderedRow=function(){return this.firstRenderedRow},t.prototype.getLastVirtualRenderedRow=function(){return this.lastRenderedRow},t.prototype.doNotUnVirtualiseRow=function(e){var t=!1,i=!0,n=e.getRowNode(),o=this.focusService.isRowNodeFocused(n),r=e.isEditing(),s=n.detail,a=o||r||s;if(!a)return t;var l=this.paginationProxy.isRowPresent(n);return l?i:t},t.prototype.createRowCon=function(e,t,i){var n=this.cachedRowCtrls?this.cachedRowCtrls.getRow(e):null;if(n)return n;var o=this.gridOptionsService.get("suppressAnimationFrame"),r=i&&!o&&!this.printLayout,s=new Lu(e,this.beans,t,r,this.printLayout);return s},t.prototype.getRenderedNodes=function(){var e=this.rowCtrlsByRowIndex;return Object.keys(e).map((function(t){return e[t].getRowNode()}))},t.prototype.getRowByPosition=function(e){var t,i=e.rowIndex;switch(e.rowPinned){case"top":t=this.topRowCtrls[i];break;case"bottom":t=this.bottomRowCtrls[i];break;default:t=this.rowCtrlsByRowIndex[i],t||(t=this.getStickyTopRowCtrls().find((function(e){return e.getRowNode().rowIndex===i}))||null);break}return t},t.prototype.getRowNode=function(e){switch(e.rowPinned){case"top":return this.pinnedRowModel.getPinnedTopRowData()[e.rowIndex];case"bottom":return this.pinnedRowModel.getPinnedBottomRowData()[e.rowIndex];default:return this.rowModel.getRow(e.rowIndex)}},t.prototype.isRangeInRenderedViewport=function(e,t){var i=null==e||null==t;if(i)return!1;var n=e>this.lastRenderedRow,o=t<this.firstRenderedRow,r=!o&&!n;return r},Bh([de("animationFrameService")],t.prototype,"animationFrameService",void 0),Bh([de("paginationProxy")],t.prototype,"paginationProxy",void 0),Bh([de("columnModel")],t.prototype,"columnModel",void 0),Bh([de("pinnedRowModel")],t.prototype,"pinnedRowModel",void 0),Bh([de("rowModel")],t.prototype,"rowModel",void 0),Bh([de("focusService")],t.prototype,"focusService",void 0),Bh([de("beans")],t.prototype,"beans",void 0),Bh([de("rowContainerHeightService")],t.prototype,"rowContainerHeightService",void 0),Bh([de("ctrlsService")],t.prototype,"ctrlsService",void 0),Bh([le],t.prototype,"postConstruct",null),t=Bh([ue("rowRenderer")],t),t}(st),zh=function(){function e(e){this.entriesMap={},this.entriesList=[],this.maxCount=e}return e.prototype.addRow=function(e){if(this.entriesMap[e.getRowNode().id]=e,this.entriesList.push(e),e.setCached(!0),this.entriesList.length>this.maxCount){var t=this.entriesList[0];t.destroyFirstPass(),t.destroySecondPass(),this.removeFromCache(t)}},e.prototype.getRow=function(e){if(null==e||null==e.id)return null;var t=this.entriesMap[e.id];if(!t)return null;this.removeFromCache(t),t.setCached(!1);var i=t.getRowNode()!=e;return i?null:t},e.prototype.removeFromCache=function(e){var t=e.getRowNode().id;delete this.entriesMap[t],Le(this.entriesList,e)},e.prototype.getEntries=function(){return this.entriesList},e}(),Kh=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Yh=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},qh=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Kh(t,e),t.prototype.formatValue=function(e,t,i,n,o){void 0===o&&(o=!0);var r,s=null,a=e.getColDef();if(n?r=n:o&&(r=a.valueFormatter),r){var l={value:i,node:t,data:t?t.data:null,colDef:a,column:e,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context};s="function"===typeof r?r(l):this.expressionService.evaluate(r,l)}else if(a.refData)return a.refData[i]||"";return null==s&&Array.isArray(i)&&(s=i.join(", ")),s},Yh([de("expressionService")],t.prototype,"expressionService",void 0),t=Yh([ue("valueFormatterService")],t),t}(st),Xh=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),$h=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Zh=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Xh(t,e),t.prototype.init=function(){var e=this;this.setPinnedTopRowData(),this.setPinnedBottomRowData(),this.addManagedPropertyListener("pinnedTopRowData",(function(){return e.setPinnedTopRowData()})),this.addManagedPropertyListener("pinnedBottomRowData",(function(){return e.setPinnedBottomRowData()}))},t.prototype.isEmpty=function(e){var t="top"===e?this.pinnedTopRows:this.pinnedBottomRows;return s(t)},t.prototype.isRowsToRender=function(e){return!this.isEmpty(e)},t.prototype.getRowAtPixel=function(e,t){var i="top"===t?this.pinnedTopRows:this.pinnedBottomRows;if(s(i))return 0;for(var n=0;n<i.length;n++){var o=i[n],r=o.rowTop+o.rowHeight-1;
11if(r>=e)return n}return i.length-1},t.prototype.setPinnedTopRowData=function(){var e=this.gridOptionsService.get("pinnedTopRowData");this.pinnedTopRows=this.createNodesFromData(e,!0);var t={type:ht.EVENT_PINNED_ROW_DATA_CHANGED};this.eventService.dispatchEvent(t)},t.prototype.setPinnedBottomRowData=function(){var e=this.gridOptionsService.get("pinnedBottomRowData");this.pinnedBottomRows=this.createNodesFromData(e,!1);var t={type:ht.EVENT_PINNED_ROW_DATA_CHANGED};this.eventService.dispatchEvent(t)},t.prototype.createNodesFromData=function(e,t){var i=this,n=[];if(e){var o=0;e.forEach((function(e,r){var s=new wa(i.beans);s.data=e;var a=t?wa.ID_PREFIX_TOP_PINNED:wa.ID_PREFIX_BOTTOM_PINNED;s.id=a+r,s.rowPinned=t?"top":"bottom",s.setRowTop(o),s.setRowHeight(i.gridOptionsService.getRowHeightForNode(s).height),s.setRowIndex(r),o+=s.rowHeight,n.push(s)}))}return n},t.prototype.getPinnedTopRowData=function(){return this.pinnedTopRows},t.prototype.getPinnedBottomRowData=function(){return this.pinnedBottomRows},t.prototype.getPinnedTopTotalHeight=function(){return this.getTotalHeight(this.pinnedTopRows)},t.prototype.getPinnedTopRowCount=function(){return this.pinnedTopRows?this.pinnedTopRows.length:0},t.prototype.getPinnedBottomRowCount=function(){return this.pinnedBottomRows?this.pinnedBottomRows.length:0},t.prototype.getPinnedTopRow=function(e){return this.pinnedTopRows[e]},t.prototype.getPinnedBottomRow=function(e){return this.pinnedBottomRows[e]},t.prototype.forEachPinnedTopRow=function(e){s(this.pinnedTopRows)||this.pinnedTopRows.forEach(e)},t.prototype.forEachPinnedBottomRow=function(e){s(this.pinnedBottomRows)||this.pinnedBottomRows.forEach(e)},t.prototype.getPinnedBottomTotalHeight=function(){return this.getTotalHeight(this.pinnedBottomRows)},t.prototype.getTotalHeight=function(e){if(!e||0===e.length)return 0;var t=Ae(e);return t.rowTop+t.rowHeight},$h([de("beans")],t.prototype,"beans",void 0),$h([le],t.prototype,"init",null),t=$h([ue("pinnedRowModel")],t),t}(st);(function(e){e["Applied"]="Applied",e["StoreNotFound"]="StoreNotFound",e["StoreLoading"]="StoreLoading",e["StoreWaitingToLoad"]="StoreWaitingToLoad",e["StoreLoadingFailed"]="StoreLoadingFailed",e["StoreWrongType"]="StoreWrongType",e["Cancelled"]="Cancelled",e["StoreNotStarted"]="StoreNotStarted"})(Th||(Th={}));var Jh,Qh=function(){function e(e,t){this.active=!0,this.nodeIdsToColumns={},this.mapToItems={},this.keepingColumns=e,this.pathRoot={rowNode:t,children:null},this.mapToItems[t.id]=this.pathRoot}return e.prototype.setInactive=function(){this.active=!1},e.prototype.isActive=function(){return this.active},e.prototype.depthFirstSearchChangedPath=function(e,t){if(e.children)for(var i=0;i<e.children.length;i++)this.depthFirstSearchChangedPath(e.children[i],t);t(e.rowNode)},e.prototype.depthFirstSearchEverything=function(e,t,i){if(e.childrenAfterGroup)for(var n=0;n<e.childrenAfterGroup.length;n++){var o=e.childrenAfterGroup[n];o.childrenAfterGroup?this.depthFirstSearchEverything(e.childrenAfterGroup[n],t,i):i&&t(o)}t(e)},e.prototype.forEachChangedNodeDepthFirst=function(e,t,i){void 0===t&&(t=!1),void 0===i&&(i=!1),this.active&&!i?this.depthFirstSearchChangedPath(this.pathRoot,e):this.depthFirstSearchEverything(this.pathRoot.rowNode,e,t)},e.prototype.executeFromRootNode=function(e){e(this.pathRoot.rowNode)},e.prototype.createPathItems=function(e){var t=e,i=0;while(!this.mapToItems[t.id]){var n={rowNode:t,children:null};this.mapToItems[t.id]=n,i++,t=t.parent}return i},e.prototype.populateColumnsMap=function(e,t){var i=this;if(this.keepingColumns&&t){var n=e;while(n)this.nodeIdsToColumns[n.id]||(this.nodeIdsToColumns[n.id]={}),t.forEach((function(e){return i.nodeIdsToColumns[n.id][e.getId()]=!0})),n=n.parent}},e.prototype.linkPathItems=function(e,t){for(var i=e,n=0;n<t;n++){var o=this.mapToItems[i.id],r=this.mapToItems[i.parent.id];r.children||(r.children=[]),r.children.push(o),i=i.parent}},e.prototype.addParentNode=function(e,t){if(e&&!e.isRowPinned()){var i=this.createPathItems(e);this.linkPathItems(e,i),this.populateColumnsMap(e,t)}},e.prototype.canSkip=function(e){return this.active&&!this.mapToItems[e.id]},e.prototype.getValueColumnsForNode=function(e,t){if(!this.keepingColumns)return t;var i=this.nodeIdsToColumns[e.id],n=t.filter((function(e){return i[e.getId()]}));return n},e.prototype.getNotValueColumnsForNode=function(e,t){if(!this.keepingColumns)return null;var i=this.nodeIdsToColumns[e.id],n=t.filter((function(e){return!i[e.getId()]}));return n},e}(),ef=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),tf=function(e){function t(i){var n=e.call(this)||this;return n.state=t.STATE_WAITING_TO_LOAD,n.version=0,n.id=i,n}return ef(t,e),t.prototype.getId=function(){return this.id},t.prototype.load=function(){this.state=t.STATE_LOADING,this.loadFromDatasource()},t.prototype.getVersion=function(){return this.version},t.prototype.setStateWaitingToLoad=function(){this.version++,this.state=t.STATE_WAITING_TO_LOAD},t.prototype.getState=function(){return this.state},t.prototype.pageLoadFailed=function(e){var i=this.isRequestMostRecentAndLive(e);
vendor: 4,294 bytes, line 11
11i&&(this.state=t.STATE_FAILED,this.processServerFail()),this.dispatchLoadCompleted(!1)},t.prototype.success=function(e,t){this.successCommon(e,t)},t.prototype.pageLoaded=function(e,t,i){this.successCommon(e,{rowData:t,rowCount:i})},t.prototype.isRequestMostRecentAndLive=function(e){var t=e===this.version,i=this.isAlive();return t&&i},t.prototype.successCommon=function(e,i){this.dispatchLoadCompleted();var n=this.isRequestMostRecentAndLive(e);n&&(this.state=t.STATE_LOADED,this.processServerResult(i))},t.prototype.dispatchLoadCompleted=function(e){void 0===e&&(e=!0);var i={type:t.EVENT_LOAD_COMPLETE,success:e,block:this};this.dispatchEvent(i)},t.EVENT_LOAD_COMPLETE="loadComplete",t.STATE_WAITING_TO_LOAD="needsLoading",t.STATE_LOADING="loading",t.STATE_LOADED="loaded",t.STATE_FAILED="failed",t}(st),nf=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),of=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},rf=function(e,t){return function(i,n){t(i,n,e)}},sf=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.activeBlockLoadsCount=0,t.blocks=[],t.active=!0,t}var i;return nf(t,e),i=t,t.prototype.postConstruct=function(){this.maxConcurrentRequests=this.getMaxConcurrentDatasourceRequests();var e=this.gridOptionsService.get("blockLoadDebounceMillis");e&&e>0&&(this.checkBlockToLoadDebounce=Ko.debounce(this.performCheckBlocksToLoad.bind(this),e))},t.prototype.setBeans=function(e){this.logger=e.create("RowNodeBlockLoader")},t.prototype.getMaxConcurrentDatasourceRequests=function(){var e=this.gridOptionsService.get("maxConcurrentDatasourceRequests");return null==e?2:e<=0?void 0:e},t.prototype.addBlock=function(e){this.blocks.push(e),e.addEventListener(tf.EVENT_LOAD_COMPLETE,this.loadComplete.bind(this)),this.checkBlockToLoad()},t.prototype.removeBlock=function(e){Ko.removeFromArray(this.blocks,e)},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.active=!1},t.prototype.loadComplete=function(){this.activeBlockLoadsCount--,this.checkBlockToLoad(),this.dispatchEvent({type:i.BLOCK_LOADED_EVENT}),0==this.activeBlockLoadsCount&&this.dispatchEvent({type:i.BLOCK_LOADER_FINISHED_EVENT})},t.prototype.checkBlockToLoad=function(){this.checkBlockToLoadDebounce?this.checkBlockToLoadDebounce():this.performCheckBlocksToLoad()},t.prototype.performCheckBlocksToLoad=function(){if(this.active)if(this.printCacheStatus(),null!=this.maxConcurrentRequests&&this.activeBlockLoadsCount>=this.maxConcurrentRequests)this.logger.log("checkBlockToLoad: max loads exceeded");else{var e=this.getAvailableLoadingCount(),t=this.blocks.filter((function(e){return e.getState()===tf.STATE_WAITING_TO_LOAD})).slice(0,e);this.registerLoads(t.length),t.forEach((function(e){return e.load()})),this.printCacheStatus()}},t.prototype.getBlockState=function(){if(this.gridOptionsService.isRowModelType("serverSide")){var e=this.rowModel;return e.getBlockStates()}var t={};return this.blocks.forEach((function(e){var i=e.getBlockStateJson(),n=i.id,o=i.state;t[n]=o})),t},t.prototype.printCacheStatus=function(){this.logger.isLogging()&&this.logger.log("printCacheStatus: activePageLoadsCount = ".concat(this.activeBlockLoadsCount,",")+" blocks = ".concat(JSON.stringify(this.getBlockState())))},t.prototype.isLoading=function(){return this.activeBlockLoadsCount>0},t.prototype.registerLoads=function(e){this.activeBlockLoadsCount+=e},t.prototype.getAvailableLoadingCount=function(){return void 0!==this.maxConcurrentRequests?this.maxConcurrentRequests-this.activeBlockLoadsCount:void 0},t.BLOCK_LOADED_EVENT="blockLoaded",t.BLOCK_LOADER_FINISHED_EVENT="blockLoaderFinis
11hed",of([de("rowModel")],t.prototype,"rowModel",void 0),of([le],t.prototype,"postConstruct",null),of([rf(0,fe("loggerFactory"))],t.prototype,"setBeans",null),t=i=of([ue("rowNodeBlockLoader")],t),t}(st),af=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),lf=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},cf=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.currentPage=0,t.topDisplayedRowIndex=0,t.bottomDisplayedRowIndex=0,t.pixelOffset=0,t.masterRowCount=0,t}return af(t,e),t.prototype.postConstruct=function(){this.active=this.gridOptionsService.get("pagination"),this.pageSizeFromGridOptions=this.gridOptionsService.get("paginationPageSize"),this.paginateChildRows=this.isPaginateChildRows(),this.addManagedListener(this.eventService,ht.EVENT_MODEL_UPDATED,this.onModelUpdated.bind(this)),this.addManagedPropertyListener("pagination",this.onPaginationGridOptionChanged.bind(this)),this.addManagedPropertyListener("paginationPageSize",this.onPageSizeGridOptionChanged.bind(this)),this.onModelUpdated()},t.prototype.ensureRowHeightsValid=function(e,t,i,n){var o=this.rowModel.ensureRowHeightsValid(e,t,this.getPageFirstRow(),this.getPageLastRow());return o&&this.calculatePages(),o},t.prototype.isPaginateChildRows=function(){var e=this.gridOptionsService.get("groupRemoveSingleChildren")||this.gridOptionsService.get("groupRemoveLowestSingleChildren");return!!e||this.gridOptionsService.get("paginateChildRows")},t.prototype.onModelUpdated=function(e){this.calculatePages();var t={type:ht.EVENT_PAGINATION_CHANGED,animate:!!e&&e.animate,newData:!!e&&e.newData,newPage:!!e&&e.newPage,newPageSize:!!e&&e.newPageSize,keepRenderedRows:!!e&&e.keepRenderedRows};this.eventService.dispatchEvent(t)},t.prototype.onPaginationGridOptionChanged=function(){this.active=this.gridOptionsService.get("pagination"),this.calculatePages();var e={type:ht.EVENT_PAGINATION_CHANGED,animate:!1,newData:!1,newPage:!1,newPageSize:!1,keepRenderedRows:!0};this.eventService.dispatchEvent(e)},t.prototype.onPageSizeGridOptionChanged=function(){this.setPageSize(this.gridOptionsService.get("paginationPageSize"),"gridOptions")},t.prototype.goToPage=function(e){if(this.active&&this.currentPage!==e&&"number"===typeof this.currentPage){this.currentPage=e;var t={type:ht.EVENT_MODEL_UPDATED,animate:!1,keepRenderedRows:!1,newData:!1,newPage:!0,newPageSize:!1};this.onModelUpdated(t)}},t.prototype.getPixelOffset=function(){return this.pixelOffset},t.prototype.getRow=function(e){return this.rowModel.getRow(e)},t.prototype.getRowNode=function(e){return this.rowModel.getRowNode(e)},t.prototype.getRowIndexAtPixel=function(e){return this.rowModel.getRowIndexAtPixel(e)},t.prototype.getCurrentPageHeight=function(){return r(this.topRowBounds)||r(this.bottomRowBounds)?0:Math.max(this.bottomRowBounds.rowTop+this.bottomRowBounds.rowHeight-this.topRowBounds.rowTop,0)},t.prototype.getCurrentPagePixelRange=function(){var e=this.topRowBounds?this.topRowBounds.rowTop:0,t=this.bottomRowBounds?this.bottomRowBounds.rowTop+this.bottomRowBounds.rowHeight:0;return{pageFirstPixel:e,pageLastPixel:t}},t.prototype.isRowPresent=function(e){if(!this.rowModel.isRowPresent(e))return!1;var t=e.rowIndex>=this.topDisplayedRowIndex&&e.rowIndex<=this.bottomDisplayedRowIndex;return t},t.prototype.isEmpty=function(){return this.rowModel.isEmpty()},t.prototype.isRowsToRender=function(){return this.rowModel.isRowsToRender()},t.prototype.forEachNode=function(e){return this.rowModel.forEachNode(e)},t.prototype.forEachNodeOnPage=function(e){for(var t=this.getPageFirstRow(),i=this.getPageLastRow(),n=t;n<=i;n++){var o=this.getRow(n);o&&e(o)}},t.prototype.getType=function(){return this.rowModel.getType()},t.prototype.getRowBounds=function(e){var t=this.rowModel.getRowBounds(e);return t.rowIndex=e,t},t.prototype.getPageFirstRow=function(){return this.topRowBounds?this.topRowBounds.rowIndex:-1},t.prototype.getPageLastRow=function(){return this.bottomRowBounds?this.bottomRowBounds.rowIndex:-1},t.prototype.getRowCount=function(){return this.rowModel.getRowCount()},t.prototype.getPageForIndex=function(e){return Math.floor(e/this.pageSize)},t.prototype.goToPageWithIndex=function(e){if(this.active){var t=this.getPageForIndex(e);this.goToPage(t)}},t.prototype.isRowInPage=function(e){if(!this.active)return!0;var t=this.getPageForIndex(e.rowIndex);return t===this.currentPage},t.prototype.isLastPageFound=function(){return this.rowModel.isLastRowIndexKnown()},t.prototype.getCurrentPage=function(){return this.currentPage},t.prototype.goToNextPage=function(){this.goToPage(this.currentPage+1)},t.prototype.goToPreviousPage=function(){this.goToPage(this.currentPage-1)},t.prototype.goToFirstPage=function(){this.goToPage(0)},t.prototype.goToLastPage=function(){var e=this.rowModel.getRowCount(),t=Math.floor(e/this.pageSize);this.goToPage(t)},t.prototype.getPageSize=function(){return this.pageSize},t.prototype.getTotalPages=function(){return this.totalPages},t.prototype.setPage=function(e){this.currentPage=e},Object.defineProperty(t.prototype,"pageSize",{get:function(){return o(this.pageSizeAutoCalculated)?this.pageSizeAutoCalculated:o(this.pageSizeFromPageSizeSelector)?this.pageSizeFromPageSizeSelector:o(this.pageSizeFromInitialState)?this.pageSizeFromInitialState:o(this.pageSizeFromGridOptions)?this.pageSizeFromGridOptions:this.defaultPageSize}
11,enumerable:!1,configurable:!0}),t.prototype.unsetAutoCalculatedPageSize=function(){if(void 0!==this.pageSizeAutoCalculated){var e=this.pageSizeAutoCalculated;this.pageSizeAutoCalculated=void 0,this.pageSize!==e&&this.onModelUpdated({type:ht.EVENT_MODEL_UPDATED,animate:!1,keepRenderedRows:!1,newData:!1,newPage:!1,newPageSize:!0})}},t.prototype.setPageSize=function(e,t){var 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();break}if(i!==this.pageSize){var n={type:ht.EVENT_MODEL_UPDATED,animate:!1,keepRenderedRows:!1,newData:!1,newPage:!1,newPageSize:!0};this.onModelUpdated(n)}},t.prototype.calculatePages=function(){this.active?this.paginateChildRows?this.calculatePagesAllRows():this.calculatePagesMasterRowsOnly():this.calculatedPagesNotActive(),this.topRowBounds=this.rowModel.getRowBounds(this.topDisplayedRowIndex),this.topRowBounds&&(this.topRowBounds.rowIndex=this.topDisplayedRowIndex),this.bottomRowBounds=this.rowModel.getRowBounds(this.bottomDisplayedRowIndex),this.bottomRowBounds&&(this.bottomRowBounds.rowIndex=this.bottomDisplayedRowIndex),this.setPixelOffset(o(this.topRowBounds)?this.topRowBounds.rowTop:0)},t.prototype.setPixelOffset=function(e){this.pixelOffset!==e&&(this.pixelOffset=e,this.eventService.dispatchEvent({type:ht.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED}))},t.prototype.setZeroRows=function(){this.masterRowCount=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=-1,this.currentPage=0,this.totalPages=0},t.prototype.adjustCurrentPageIfInvalid=function(){this.currentPage>=this.totalPages&&(this.currentPage=this.totalPages-1),(!isFinite(this.currentPage)||isNaN(this.currentPage)||this.currentPage<0)&&(this.currentPage=0)},t.prototype.calculatePagesMasterRowsOnly=function(){if(this.masterRowCount=this.rowModel.getTopLevelRowCount(),this.masterRowCount<=0)this.setZeroRows();else{var e=this.masterRowCount-1;this.totalPages=Math.floor(e/this.pageSize)+1,this.adjustCurrentPageIfInvalid();var 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{var n=this.rowModel.getTopLevelRowDisplayedIndex(i+1);this.bottomDisplayedRowIndex=n-1}}},t.prototype.getMasterRowCount=function(){return this.masterRowCount},t.prototype.calculatePagesAllRows=function(){if(this.masterRowCount=this.rowModel.getRowCount(),0!==this.masterRowCount){var 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)}else this.setZeroRows()},t.prototype.calculatedPagesNotActive=function(){this.setPageSize(this.masterRowCount,"autoCalculated"),this.totalPages=1,this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=this.rowModel.getRowCount()-1},lf([de("rowModel")],t.prototype,"rowModel",void 0),lf([le],t.prototype,"postConstruct",null),t=lf([ue("paginationProxy")],t),t}(st),uf=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),df=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},pf=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return uf(t,e),t.prototype.processAllCellClasses=function(e,t,i,n){this.processClassRules(void 0,e.cellClassRules,t,i,n),this.processStaticCellClasses(e,t,i)},t.prototype.processClassRules=function(e,t,i,n,o){if(null!=t||null!=e){var r={},s={},a=function(e,t){e.split(" ").forEach((function(e){""!=e.trim()&&t(e)}))};if(t)for(var l=Object.keys(t),c=function(e){var n,o=l[e],c=t[o];"string"===typeof c?n=u.expressionService.evaluate(c,i):"function"===typeof c&&(n=c(i)),a(o,(function(e){n?r[e]=!0:s[e]=!0}))},u=this,d=0;d<l.length;d++)c(d);e&&o&&Object.keys(e).forEach((function(e){return a(e,(function(e){r[e]||(s[e]=!0)}))}
11)),o&&Object.keys(s).forEach(o),Object.keys(r).forEach(n)}},t.prototype.getStaticCellClasses=function(e,t){var i,n=e.cellClass;if(!n)return[];if("function"===typeof n){var o=n;i=o(t)}else i=n;return"string"===typeof i&&(i=[i]),i||[]},t.prototype.processStaticCellClasses=function(e,t,i){var n=this.getStaticCellClasses(e,t);n.forEach((function(e){i(e)}))},df([de("expressionService")],t.prototype,"expressionService",void 0),t=df([ue("stylingService")],t),t}(st),hf=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ff=function(e){function t(t){return e.call(this,t,"ag-toggle-button")||this}return hf(t,e),t.prototype.setValue=function(t,i){return e.prototype.setValue.call(this,t,i),this.addOrRemoveCssClass("ag-selected",this.getValue()),this},t}(Yr),gf=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),vf=function(e){function t(t){return e.call(this,t,"ag-text-area",null,"textarea")||this}return gf(t,e),t.prototype.setValue=function(t,i){var n=e.prototype.setValue.call(this,t,i);return this.eInput.value=t,n},t.prototype.setCols=function(e){return this.eInput.cols=e,this},t.prototype.setRows=function(e){return this.eInput.rows=e,this},t}(zr),yf=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),mf=function(e){function t(t){return e.call(this,t,"ag-date-field","date")||this}return yf(t,e),t.prototype.postConstruct=function(){var t=this;e.prototype.postConstruct.call(this),this.addManagedListener(this.eInput,"wheel",this.onWheel.bind(this));var i=Yi();this.addManagedListener(this.eInput,"mousedown",(function(){t.isDisabled()||i||t.eInput.focus()})),this.eInput.step="any"},t.prototype.onWheel=function(e){document.activeElement===this.eInput&&e.preventDefault()},t.prototype.setMin=function(e){var t,i=e instanceof Date?null!==(t=mn(null!==e&&void 0!==e?e:null,!1))&&void 0!==t?t:void 0:e;return this.min===i||(this.min=i,uo(this.eInput,"min",i)),this},t.prototype.setMax=function(e){var t,i=e instanceof Date?null!==(t=mn(null!==e&&void 0!==e?e:null,!1))&&void 0!==t?t:void 0:e;return this.max===i||(this.max=i,uo(this.eInput,"max",i)),this},t.prototype.setStep=function(e){return this.step===e||(this.step=e,uo(this.eInput,"step",e)),this},t.prototype.getDate=function(){var e;if(this.eInput.validity.valid)return null!==(e=wn(this.getValue()))&&void 0!==e?e:void 0},t.prototype.setDate=function(e,t){this.setValue(mn(null!==e&&void 0!==e?e:null,!1),t)},t}(bs),Cf=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),bf=function(e){function t(t){return e.call(this,t,"ag-range-field","range")||this}return Cf(t,e),t.prototype.postConstruct=function(){e.prototype.postConstruct.call(this);var t=this.config,i=t.min,n=t.max,o=t.step;null!=i&&this.setMinValue(i),null!=n&&this.setMaxValue(n),this.setStep(o||1)},t.prototype.addInputListeners=function(){var e=this;this.addManagedListener(this.eInput,"input",(function(t){var i=t.target.value;e.setValue(i)}))},t.prototype.setMinValue=function(e){return this.min=e,this.eInput.setAttribute("min",e.toString()),this},t.prototype.setMaxValue=function(e){return this.max=e,this.eInput.setAttribute("max",e.toString()),this},t.prototype.setStep=function(e){return this.eInput.setAttribute("step",e.toString()),this},t.prototype.setValue=function(t,i){null!=this.min&&(t=Math.max(parseFloat(t),this.min).toString()),null!=this.max&&(t=Math.min(parseFloat(t),this.max).toString());var n=e.prototype.setValue.call(this,t,i);return this.eInput.value=t,n},t}(zr),wf=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Sf=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Ef=function(e){function t(t,i){var n=e.call(this,'<div class="ag-rich-select-row" role="presentation"></div>')||this;return n.params=t,n.wrapperEl=i,n}return wf(t,e),t.prototype.postConstruct=function(){this.addManagedListener(this.getGui(),"mouseup",this.onMouseUp.bind(this))},t.prototype.setState=function(e){var t="";this.params.valueFormatter&&(t=this.params.valueFormatter(e));var i=this.populateWithRenderer(e,t);i||this.populateWithoutRenderer(e,t),this.value=e},t.prototype.highlightString=function(e){var t=this.parsedValue;if(!this.params.cellRenderer&&o(t)){var i=o(e);if(i){var n=null===t||void 0===t?void 0:t.toLocaleLowerCase().indexOf(e.toLocaleLowerCase());if(n>=0){var r=n+e.length,s=Et(t.slice(0,n),!0),a=Et(t.slice(n,r),!0),l=Et(t.slice(r));this.renderValueWithoutRenderer("".concat(s,'<span class="ag-rich-select-row-text-highlight">').concat(a,"</span>").concat(l))}else i=!1}i||this.renderValueWithoutRenderer(t)}},t.prototype.updateHighlighted=function(e){var t,i=this.getGui(),n="ag-rich-select-row-".concat(this.getCompId());if(null===(t=i.parentElement)||void 0===t||t.setAttribute("id",n),e){var o=this.getParentComponent().getAriaElement();wi(o,n),this.wrapperEl.setAttribute("data-active-option",n)}Ni(i.parentElement,e),this.addOrRemoveCssClass("ag-rich-select-row-selected",e)},t.prototype.populateWithoutRenderer=function(e,t){var i=this.gridOptionsService.getDocument(),n=this.getGui(),r=i.createElement("span");r.style.overflow="hidden",r.style.textOverflow="ellipsis";var s=Et(o(t)?t:e,!0);this.parsedValue=o(s)?s:null,n.appendChild(r),this.renderValueWithoutRenderer(s)},t.prototype.renderValueWithoutRenderer=function(e){var t=this.getGui().querySelector("span");t&&(t.innerHTML=o(e)?e:"&nbsp;")},t.prototype.populateWithRenderer=function(e,t){var i,n,o=this;return this.params.cellRenderer&&(n=this.userComponentFactory.getCellRendererDetails(this.params,{value:e,valueFormatted:t,api:this.gridOptionsService.api})),n&&(i=n.newAgStackInstance()),i&&ho(i,this.getGui()),!!i&&(i.then((function(e){o.addDestroyFunc((function(){o.getContext().destroyBean(e)}))})),!0)},t.prototype.onMouseUp=function(){var e=this.getParentComponent(),t={type:ht.EVENT_FIELD_PICKER_VALUE_SELECTED,fromEnterKey:!1,value:this.value};null===e||void 0===e||e.dispatchEvent(t)},Sf([de("userComponentFactory")],t.prototype,"userComponentFactory",void 0),Sf([le],t.prototype,"postConstruct",null),t}(rr),xf=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Of=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};(function(e){e["TAB_GUARD"]="ag-tab-guard",e["TAB_GUARD_TOP"]="ag-tab-guard-top",e["TAB_GUARD_BOTTOM"]="ag-tab-guard-bottom"})(Jh||(Jh={}));var Tf,Df=function(e){function t(t){var i=e.call(this)||this;i.skipTabGuardFocus=!1;var n=t.comp,o=t.eTopGuard,r=t.eBottomGuard,s=t.focusInnerElement,a=t.onFocusIn,l=t.onFocusOut,c=t.shouldStopEventPropagation,u=t.onTabKeyDown,d=t.handleKeyDown,p=t.eFocusableElement;return i.comp=n,i.eTopGuard=o,i.eBottomGuard=r,i.providedFocusInnerElement=s,i.eFocusableElement=p,i.providedFocusIn=a,i.providedFocusOut=l,i.providedShouldStopEventPropagation=c,i.providedOnTabKeyDown=u,i.providedHandleKeyDown=d,i}return xf(t,e),t.prototype.postConstruct=function(){var e=this;this.createManagedBean(new Cr(this.eFocusableElement,{shouldStopEventPropagation:function(){return e.shouldStopEventPropagation()},onTabKeyDown:function(t){return e.onTabKeyDown(t)},handleKeyDown:function(t){return e.handleKeyDown(t)},onFocusIn:function(t){return e.onFocusIn(t)},onFocusOut:function(t){return e.onFocusOut(t)}})),this.activateTabGuards(),[this.eTopGuard,this.eBottomGuard].forEac
vendor: 1,929 bytes, line 11
11h((function(t){return e.addManagedListener(t,"focus",e.onFocus.bind(e))}))},t.prototype.handleKeyDown=function(e){this.providedHandleKeyDown&&this.providedHandleKeyDown(e)},t.prototype.tabGuardsAreActive=function(){return!!this.eTopGuard&&this.eTopGuard.hasAttribute("tabIndex")},t.prototype.shouldStopEventPropagation=function(){return!!this.providedShouldStopEventPropagation&&this.providedShouldStopEventPropagation()},t.prototype.activateTabGuards=function(){var e=this.gridOptionsService.get("tabIndex");this.comp.setTabIndex(e.toString())},t.prototype.deactivateTabGuards=function(){this.comp.setTabIndex()},t.prototype.onFocus=function(e){if(this.skipTabGuardFocus)this.skipTabGuardFocus=!1;else{var t=e.target===this.eBottomGuard;this.providedFocusInnerElement?this.providedFocusInnerElement(t):this.focusInnerElement(t)}},t.prototype.onFocusIn=function(e){this.providedFocusIn&&this.providedFocusIn(e)||this.deactivateTabGuards()},t.prototype.onFocusOut=function(e){this.providedFocusOut&&this.providedFocusOut(e)||this.eFocusableElement.contains(e.relatedTarget)||this.activateTabGuards()},t.prototype.onTabKeyDown=function(e){var t=this;if(this.providedOnTabKeyDown)this.providedOnTabKeyDown(e);else if(!e.defaultPrevented){var i=this.tabGuardsAreActive();i&&this.deactivateTabGuards();var n=this.getNextFocusableElement(e.shiftKey);i&&setTimeout((function(){return t.activateTabGuards()}),0),n&&(n.focus(),e.preventDefault())}},t.prototype.focusInnerElement=function(e){void 0===e&&(e=!1);var 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})},t.prototype.getNextFocusableElement=function(e){return this.focusService.findNextFocusableElement(this.eFocusableElement,!1,e)},t.prototype.forceFocusOutOfContainer=function(e){void 0===e&&(e=!1);var t=e?this.eTopGuard:this.eBottomGuard;
11this.activateTabGuards(),this.skipTabGuardFocus=!0,t.focus()},Of([de("focusService")],t.prototype,"focusService",void 0),Of([le],t.prototype,"postConstruct",null),t}(st),Rf=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Af=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},_f=function(e,t,i){if(i||2===arguments.length)for(var n,o=0,r=t.length;o<r;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},Pf=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Rf(t,e),t.prototype.initialiseTabGuard=function(e){this.eTopGuard=this.createTabGuard("top"),this.eBottomGuard=this.createTabGuard("bottom"),this.eFocusableElement=this.getFocusableElement();var t=[this.eTopGuard,this.eBottomGuard],i={setTabIndex:function(e){t.forEach((function(t){return null!=e?t.setAttribute("tabindex",e):t.removeAttribute("tabindex")}))}};this.addTabGuards(this.eTopGuard,this.eBottomGuard),this.tabGuardCtrl=this.createManagedBean(new Df({comp:i,eTopGuard:this.eTopGuard,eBottomGuard:this.eBottomGuard,eFocusableElement:this.eFocusableElement,onFocusIn:e.onFocusIn,onFocusOut:e.onFocusOut,focusInnerElement:e.focusInnerElement,handleKeyDown:e.handleKeyDown,onTabKeyDown:e.onTabKeyDown,shouldStopEventPropagation:e.shouldStopEventPropagation}))},t.prototype.createTabGuard=function(e){var t=document.createElement("div"),i="top"===e?Jh.TAB_GUARD_TOP:Jh.TAB_GUARD_BOTTOM;return t.classList.add(Jh.TAB_GUARD,i),si(t,"presentation"),t},t.prototype.addTabGuards=function(e,t){this.eFocusableElement.insertAdjacentElement("afterbegin",e),this.eFocusableElement.insertAdjacentElement("beforeend",t)},t.prototype.removeAllChildrenExceptTabGuards=function(){var e=[this.eTopGuard,this.eBottomGuard];Wn(this.getFocusableElement()),this.addTabGuards.apply(this,_f([],Af(e),!1))},t.prototype.forceFocusOutOfContainer=function(e){void 0===e&&(e=!1),this.tabGuardCtrl.forceFocusOutOfContainer(e)},t.prototype.appendChild=function(t,i){ao(t)||(t=t.getGui());var n=this.eBottomGuard;n?n.insertAdjacentElement("beforebegin",t):e.prototype.appendChild.call(this,t,i)},t}(rr),Mf=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),kf=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Nf=function(e){function t(i){var n=e.call(this,t.getTemplate((null===i||void 0===i?void 0:i.cssIdentifier)||"default"))||this;n.renderedRows=new Map,n.rowHeight=20;var o=i||{},r=o.cssIdentifier,s=void 0===r?"default":r,a=o.ariaRole,l=void 0===a?"listbox":a,c=o.listName;return n.cssIdentifier=s,n.ariaRole=l,n.listName=c,n}return Mf(t,e),t.prototype.postConstruct=function(){var e=this;this.addScrollListener(),this.rowHeight=this.getItemHeight(),this.addResizeObserver(),this.initialiseTabGuard({onFocusIn:function(t){return e.onFocusIn(t)},onFocusOut:function(t){return e.onFocusOut(t)},focusInnerElement:function(t){return e.focusInnerElement(t)},onTabKeyDown:function(t){return e.onTabKeyDown(t)},handleKeyDown:function(t){return e.handleKeyDown(t)}}),this.setAriaProperties(),this.addManagedListener(this.eventService,ht.EVENT_GRID_STYLES_CHANGED,this.onGridStylesChanged.bind(this))},t.prototype.onGridStylesChanged=function(){this.rowHeight=this.getItemHeight(),this.refresh()},t.prototype.setAriaProperties=function(){var e=this.localeService.getLocaleTextFunc(),t=e("ariaDefaultListName",this.listName||"List"),i=this.eContainer;si(i,this.ariaRole),di(i,t)},t.prototype.addResizeObserver=function(){var e=this,t=function(){return e.animationFrameService.requestAnimationFrame((function(){return e.drawVirtualRows()}))},i=this.resizeObserverService.observeResize(this.getGui(),t);this.addDestroyFunc(i)}
11,t.prototype.focusInnerElement=function(e){this.focusRow(e?this.model.getRowCount()-1:0)},t.prototype.onFocusIn=function(e){var t=e.target;return t.classList.contains("ag-virtual-list-item")&&(this.lastFocusedRowIndex=ci(t)-1),!1},t.prototype.onFocusOut=function(e){return this.getFocusableElement().contains(e.relatedTarget)||(this.lastFocusedRowIndex=null),!1},t.prototype.handleKeyDown=function(e){switch(e.key){case xo.UP:case xo.DOWN:this.navigate(e.key===xo.UP)&&e.preventDefault();break}},t.prototype.onTabKeyDown=function(e){this.navigate(e.shiftKey)?e.preventDefault():($e(e),this.forceFocusOutOfContainer(e.shiftKey))},t.prototype.navigate=function(e){if(null==this.lastFocusedRowIndex)return!1;var t=this.lastFocusedRowIndex+(e?-1:1);return!(t<0||t>=this.model.getRowCount())&&(this.focusRow(t),!0)},t.prototype.getLastFocusedRow=function(){return this.lastFocusedRowIndex},t.prototype.focusRow=function(e){var t=this;this.ensureIndexVisible(e),window.setTimeout((function(){if(t.isAlive()){var i=t.renderedRows.get(e);i&&i.eDiv.focus()}}),10)},t.prototype.getComponentAt=function(e){var t=this.renderedRows.get(e);return t&&t.rowComponent},t.prototype.forEachRenderedRow=function(e){this.renderedRows.forEach((function(t,i){return e(t.rowComponent,i)}))},t.getTemplate=function(e){return'<div class="ag-virtual-list-viewport ag-'.concat(e,'-virtual-list-viewport" role="presentation">\n                <div class="ag-virtual-list-container ag-').concat(e,'-virtual-list-container" ref="eContainer"></div>\n            </div>')},t.prototype.getItemHeight=function(){return this.environment.getListItemHeight()},t.prototype.ensureIndexVisible=function(e,t){void 0===t&&(t=!0);var i=this.model.getRowCount();if("number"!==typeof e||e<0||e>=i)return console.warn("AG Grid: invalid row index for ensureIndexVisible: "+e),!1;var n=e*this.rowHeight,o=n+this.rowHeight,r=this.getGui(),s=r.scrollTop,a=r.offsetHeight,l=s+a,c=t?0:this.rowHeight,u=s>n+c,d=l<o-c;if(u)return r.scrollTop=n,!0;if(d){var p=o-a;return r.scrollTop=p,!0}return!1},t.prototype.setComponentCreator=function(e){this.componentCreator=e},t.prototype.setComponentUpdater=function(e){this.componentUpdater=e},t.prototype.getRowHeight=function(){return this.rowHeight},t.prototype.getScrollTop=function(){return this.getGui().scrollTop},t.prototype.setRowHeight=function(e){this.rowHeight=e,this.refresh()},t.prototype.refresh=function(e){var t=this;if(null!=this.model&&this.isAlive()){var i=this.model.getRowCount();this.eContainer.style.height="".concat(i*this.rowHeight,"px"),X((function(){return t.eContainer.clientHeight>=i*t.rowHeight}),(function(){t.isAlive()&&(t.canSoftRefresh(e)?t.drawVirtualRows(!0):(t.clearVirtualRows(),t.drawVirtualRows()))}))}},t.prototype.canSoftRefresh=function(e){return!!(e&&this.renderedRows.size&&"function"===typeof this.model.areRowsEqual&&this.componentUpdater)},t.prototype.clearVirtualRows=function(){var e=this;this.renderedRows.forEach((function(t,i){return e.removeRow(i)}))},t.prototype.drawVirtualRows=function(e){if(this.isAlive()&&this.model){var t=this.getGui(),i=t.scrollTop,n=i+t.offsetHeight,o=Math.floor(i/this.rowHeight),r=Math.floor(n/this.rowHeight);this.ensureRowsRendered(o,r,e)}},t.prototype.ensureRowsRendered=function(e,t,i){var n=this;this.renderedRows.forEach((function(i,o){(o<e||o>t)&&o!==n.lastFocusedRowIndex&&n.removeRow(o)})),i&&this.refreshRows();for(var o=e;o<=t;o++)this.renderedRows.has(o)||o<this.model.getRowCount()&&this.insertRow(o)},t.prototype.insertRow=function(e){var t=this,i=this.model.getRow(e),n=document.createElement("div");n.classList.add("ag-virtual-list-item","ag-".concat(this.cssIdentifier,"-virtual-list-item")),si(n,"tree"===this.ariaRole?"treeitem":"option"),xi(n,this.model.getRowCount()),Oi(n,e+1),n.setAttribute("tabindex","-1"),n.style.height="".concat(this.rowHeight,"px"),n.style.top="".concat(this.rowHeight*e,"px");var o=this.componentCreator(i,n);o.addGuiEventListener("focusin",(function(){return t.lastFocusedRowIndex=e})),n.appendChild(o.getGui()),this.renderedRows.has(e-1)?this.renderedRows.get(e-1).eDiv.insertAdjacentElement("afterend",n):this.renderedRows.has(e+1)?this.renderedRows.get(e+1).eDiv.insertAdjacentElement("beforebegin",n):this.eContainer.appendChild(n),this.renderedRows.set(e,{rowComponent:o,eDiv:n,value:i})},t.prototype.removeRow=function(e){var t=this.renderedRows.get(e);this.eContainer.removeChild(t.eDiv),this.destroyBean(t.rowComponent),this.renderedRows.delete(e)},t.prototype.refreshRows=function(){var e=this,t=this.model.getRowCount();this.renderedRows.forEach((function(i,n){var o,r;if(n>=t)e.removeRow(n);else{var s=e.model.getRow(n);(null===(r=(o=e.model).areRowsEqual)||void 0===r?void 0:r.call(o,i.value,s))?e.componentUpdater(s,i.rowComponent):e.removeRow(n)}}))},t.prototype.addScrollListener=function(){var e=this;this.addGuiEventListener("scroll",(function(){return e.drawVirtualRows()}),{passive:!0})},t.prototype.setModel=function(e){this.model=e},t.prototype.getAriaElement=function(){return this.eContainer},t.prototype.destroy=function(){this.isAlive()&&(this.clearVirtualRows(),e.prototype.destroy.call(this))},kf([de("resizeObserverService")],t.prototype,"resizeObserverService",void 0),kf([de("animationFrameService")],t.prototype,"animationFrameService",void 0),kf([sr("eContainer")],t.prototype,"eContainer",void 0),kf([le],t.prototype,"postConstruct",null),t}(Pf),Lf=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),If=function(){return If=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}
11,If.apply(this,arguments)},Ff=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Gf='\n    <div class="ag-picker-field" role="presentation">\n        <div ref="eLabel"></div>\n            <div ref="eWrapper" class="ag-wrapper ag-picker-field-wrapper ag-rich-select-value ag-picker-collapsed">\n            <div ref="eDisplayField" class="ag-picker-field-display"></div>\n            <ag-input-text-field ref="eInput" class="ag-rich-select-field-input"></ag-input-text-field>\n            <div ref="eIcon" class="ag-picker-field-icon" aria-hidden="true"></div>\n        </div>\n    </div>',Vf=function(e){function t(t){var i,n,o=this;o=e.call(this,If(If({pickerAriaLabelKey:"ariaLabelRichSelectField",pickerAriaLabelValue:"Rich Select Field",pickerType:"ag-list",className:"ag-rich-select",pickerIcon:"smallDown",ariaRole:"combobox",template:null!==(i=null===t||void 0===t?void 0:t.template)&&void 0!==i?i:Gf,modalPicker:!1},t),{maxPickerHeight:null!==(n=null===t||void 0===t?void 0:t.maxPickerHeight)&&void 0!==n?n:"calc(var(--ag-row-height) * 6.5)"}))||this,o.searchString="",o.highlightedItem=-1,o.lastRowHovered=-1,o.searchStringCreator=null;var r=t||{},s=r.cellRowHeight,a=r.value,l=r.valueList,c=r.searchStringCreator;return null!=s&&(o.cellRowHeight=s),void 0!==a&&(o.value=a),null!=l&&(o.values=l),c&&(o.searchStringCreator=c),o}return Lf(t,e),t.prototype.postConstruct=function(){var t=this;e.prototype.postConstruct.call(this),this.createLoadingElement(),this.createListComponent();var i=this.config,n=i.allowTyping,o=i.placeholder;n?(this.eInput.setAutoComplete(!1).setInputPlaceholder(o),this.eDisplayField.classList.add("ag-hidden")):this.eInput.setDisplayed(!1),this.eWrapper.tabIndex=this.gridOptionsService.get("tabIndex");var r=this.config.searchDebounceDelay,s=void 0===r?300:r;this.clearSearchString=Y(this.clearSearchString,s),this.renderSelectedValue(),n&&(this.eInput.onValueChange((function(e){return t.searchTextFromString(e)})),this.addManagedListener(this.eWrapper,"focus",this.onWrapperFocus.bind(this))),this.addManagedListener(this.eWrapper,"focusout",this.onWrapperFocusOut.bind(this))},t.prototype.createLoadingElement=function(){var e=this.gridOptionsService.getDocument(),t=this.localeService.getLocaleTextFunc(),i=e.createElement("div");i.classList.add("ag-loading-text"),i.innerText=t("loadingOoo","Loading..."),this.eLoading=i},t.prototype.createListComponent=function(){var e=this;this.listComponent=this.createBean(new Nf({cssIdentifier:"rich-select"})),this.listComponent.setComponentCreator(this.createRowComponent.bind(this)),this.listComponent.setParentComponent(this),this.addManagedListener(this.listComponent,ht.EVENT_FIELD_PICKER_VALUE_SELECTED,(function(t){e.onListValueSelected(t.value,t.fromEnterKey)}));var t=this.cellRowHeight;t&&this.listComponent.setRowHeight(t);var i=this.listComponent.getGui(),n=this.listComponent.getAriaElement();this.addManagedListener(i,"mousemove",this.onPickerMouseMove.bind(this)),this.addManagedListener(i,"mousedown",(function(e){return e.preventDefault()})),i.classList.add("ag-rich-select-list");var o="ag-rich-select-list-".concat(this.listComponent.getCompId());n.setAttribute("id",o);var r=this.localeService.getLocaleTextFunc(),s=r(this.config.pickerAriaLabelKey,this.config.pickerAriaLabelValue);di(n,s),Ii(this.eWrapper,n)},t.prototype.renderSelectedValue=function(){var e,t,i=this,n=this,r=n.value,s=n.eDisplayField,a=n.config,l=this.config,c=l.allowTyping,u=l.initialInputValue,d=this.config.valueFormatter?this.config.valueFormatter(r):r;if(c)this.eInput.setValue(null!==u&&void 0!==u?u:d);else if(a.cellRenderer&&(e=this.userComponentFactory.getCellRendererDetails(this.config,{value:r,valueFormatted:d,api:this.gridOptionsService.api})),e&&(t=e.newAgStackInstance()),t)Wn(s),ho(t,s),t.then((function(e){i.addDestroyFunc((function(){return i.getContext().destroyBean(e)}))}));else if(o(this.value))s.innerText=d,s.classList.remove("ag-display-as-placeholder");else{var p=a.placeholder;o(p)?(s.innerHTML="".concat(Et(p)),s.classList.add("ag-display-as-placeholder")):Wn(s)}},t.prototype.getCurrentValueIndex=function(){var e=this,t=e.currentList,i=e.value;if(null==i||!t)return-1;for(var n=0;n<t.length;n++)if(t[n]===i)return n;return-1},t.prototype.highlightFilterMatch=function(){var e,t=this;null===(e=this.listComponent)||void 0===e||e.forEachRenderedRow((function(e,i){e.highlightString(t.searchString)}))},t.prototype.highlightSelectedValue=function(e){var t,i=this;null==e&&(e=this.getCurrentValueIndex()),this.highlightedItem=e,null===(t=this.listComponent)||void 0===t||t.forEachRenderedRow((function(t,n){var o=-1!==e&&i.highlightedItem===n;t.updateHighlighted(o)}))},t.prototype.setRowHeight=function(e){e!==this.cellRowHeight&&(this.cellRowHeight=e),this.listComponent&&this.listComponent.setRowHeight(e)},t.prototype.createPickerComponent=function(){var e=this.values;return e&&this.setValueList({valueList:e}),this.listComponent},t.prototype.setSearchStringCreator=function(e){this.searchStringCreator=e},t.prototype.setValueList=function(e){var t=e.valueList,i=e.refresh;this.listComponent&&this.currentList!==t&&(this.currentList=t,this.listComponent.setModel({getRowCount:function(){return t.length},getRow:function(e){return t[e]}}),i&&(this.values?this.listComponent.refresh():(this.values=t,this.isPickerDisplayed&&this.showCurrentValueInPicker())))},t.prototype.showPicker=function(){e.prototype.showPicker.call(this),this.showCurrentValueInPicker(),this.displayOrHidePicker()},t.prototype.showCurrentValueInPicker=function(){var e,t;if(this.listComponent)if(this.currentList){(null===(e=this.eLoading)||void 0===e?void 0:e.offsetParent)&&(null===(t=this.eLoading.parentElement)||void 0===t||t.removeChild(this.eLoading));var i=this.getCurrentValueIndex();-1!==i?(this.listComponent.refresh(),this.listComponent.ensureIndexVisible(i),this.listComponent.refresh(!0),this.highlightSelectedValue(i)):this.listComponent.refresh()}else this.isPickerDisplayed&&this.eLoading&&this.listComponent.appendChild(this.eLoading)},t.prototype.beforeHidePicker=function(){this.highlightedItem=-1,e.prototype.beforeHidePicker.call(this)},t.prototype.onWrapperFocus=function(){if(this.eInput){var e=this.eInput.getFocusableElement();e.focus(),e.select()}},t.prototype.onWrapperFocusOut=function(e){this.eWrapper.contains(e.relatedTarget)||this.hidePicker()},t.prototype.buildSearchStringFromKeyboardEvent=function(e){var t=e.key;if(t===xo.BACKSPACE)this.searchString=this.searchString.slice(0,-1),t="";else if(!Po(e))return;e.preventDefault(),this.searchTextFromCharacter(t)},t.prototype.searchTextFromCharacter=function(e){this.searchString+=e,this.runSearch(),this.clearSearchString()},t.prototype.searchTextFromString=function(e){null==e&&(e=""),this.searchString=e,this.runSearch()},t.prototype.buildSearchStrings=function(e){var t,i=this.config.valueFormatter,n=void 0===i?function(e){return e}:i;return"number"===typeof e[0]||"string"===typeof e[0]?t=e.map((function(e){return n(e)})):"object"===typeof e[0]&&this.searchStringCreator&&(t=this.searchStringCreator(e)),t},t.prototype.getSuggestionsAndFilteredValues=function(e,t){var i=this,n=[],o=[];if(!e.length)return{suggestions:n,filteredValues:o};var r=this.config,s=r.searchType,a=void 0===s?"fuzzy":s,l=r.filterList;if("fuzzy"===a){var c=yo(this.searchString,t,!0);n=c.values;var u=c.indices;if(l&&u.length)for(var d=0;d<u.length;d++)o.push(this.values[u[d]])}else n=t.filter((function(e,t){var n=e.toLocaleLowerCase(),r=i.searchString.toLocaleLowerCase(),s="match"===a?n.startsWith(r):-1!==n.indexOf(r);return l&&s&&o.push(i.values[t]),s}));return{suggestions:n,filteredValues:o}},t.prototype.filterListModel=function(e){var t=this.config.filterList;t&&(this.setValueList({valueList:e,refresh:!0}),this.alignPickerToComponent())},t.prototype.runSearch=function(){var e,t,i=this.values,n=this.buildSearchStrings(i);if(n){var o=this.getSuggestionsAndFilteredValues(this.searchString,n),r=o.suggestions,s=o.filteredValues,a=this.config,l=a.filterList,c=a.highlightMatch,u=a.searchType,d=void 0===u?"fuzzy":u,p=s.length,h=!(!l||""===this.searchString);if(this.filterListModel(h?s:i),r.length){var f=h?0:n.indexOf(r[0]);this.selectListItem(f)}else if(this.highlightSelectedValue(-1),!h||p)null===(e=this.listComponent)||void 0===e||e.ensureIndexVisible(0);else if(h){this.getAriaElement().removeAttribute("data-active-option");var g=null===(t=this.listComponent)||void 0===t?void 0:t.getAriaElement();g&&wi(g,null)}c&&"fuzzy"!==d&&this.highlightFilterMatch(),this.displayOrHidePicker()}else this.highlightSelectedValue(-1)},t.prototype.displayOrHidePicker=function(){var e,t=null===(e=this.listComponent)||void 0===e?void 0:e.getGui(),i=!!this.currentList&&0===this.currentList.length;null===t||void 0===t||t.classList.toggle("ag-hidden",i)},t.prototype.clearSearchString=function(){this.searchString=""},t.prototype.selectListItem=function(e,t){if(!(!this.isPickerDisplayed||!this.currentList||!this.listComponent||e<0||e>=this.currentList.length)){var i=this.listComponent.ensureIndexVisible(e,!t);i&&!t&&this.listComponent.refresh(!0),this.highlightSelectedValue(e)}},t.prototype.setValue=function(t,i,n){var o=this.currentList?this.currentList.indexOf(t):-1;return-1===o?this:(this.value=t,n||this.selectListItem(o),this.renderSelectedValue(),e.prototype.setValue.call(this,t,i))},t.prototype.createRowComponent=function(e){var t=new Ef(this.config,this.eWrapper);t.setParentComponent(this.listComponent),this.getContext().createBean(t),t.setState(e);var i=this.config,n=i.highlightMatch,o=i.searchType,r=void 0===o?"fuzzy":o;return n&&"fuzzy"!==r&&t.highlightString(this.searchString),t},t.prototype.getRowForMouseEvent=function(e){var t=this.listComponent;if(!t)return-1;var i=null===t||void 0===t?void 0:t.getGui(),n=i.getBoundingClientRect(),o=t.getScrollTop(),r=e.clientY-n.top+o;return Math.floor(r/t.getRowHeight())},t.prototype.onPickerMouseMove=function(e){if(this.listComponent){var t=this.getRowForMouseEvent(e);-1!==t&&t!=this.lastRowHovered&&(this.lastRowHovered=t,this.selectListItem(t,!0))}},t.prototype.onNavigationKeyDown=function(e,t){e.preventDefault();var i=t===xo.DOWN;if(this.isPickerDisplayed||!i){var n=this.highlightedItem,o=i?1:-1,r=-1===n?0:n+o;this.selectListItem(r)}else this.showPicker()}
11,t.prototype.onEnterKeyDown=function(e){this.isPickerDisplayed&&(e.preventDefault(),this.currentList&&this.onListValueSelected(this.currentList[this.highlightedItem],!0))},t.prototype.onTabKeyDown=function(){this.isPickerDisplayed&&this.currentList&&this.setValue(this.currentList[this.highlightedItem],!1,!0)},t.prototype.onListValueSelected=function(e,t){this.setValue(e,!1,!0),this.dispatchPickerEvent(e,t),this.hidePicker()},t.prototype.dispatchPickerEvent=function(e,t){var i={type:ht.EVENT_FIELD_PICKER_VALUE_SELECTED,fromEnterKey:t,value:e};this.dispatchEvent(i)},t.prototype.getFocusableElement=function(){var t=this.config.allowTyping;return t?this.eInput.getFocusableElement():e.prototype.getFocusableElement.call(this)},t.prototype.onKeyDown=function(e){var t=e.key,i=this.config.allowTyping;switch(t){case xo.LEFT:case xo.RIGHT:case xo.PAGE_HOME:case xo.PAGE_END:i||e.preventDefault();break;case xo.PAGE_UP:case xo.PAGE_DOWN:e.preventDefault();break;case xo.DOWN:case xo.UP:this.onNavigationKeyDown(e,t);break;case xo.ESCAPE:this.isPickerDisplayed&&(zn(this.listComponent.getGui())&&(e.preventDefault(),$e(e)),this.hidePicker());break;case xo.ENTER:this.onEnterKeyDown(e);break;case xo.TAB:this.onTabKeyDown();break;default:i||this.buildSearchStringFromKeyboardEvent(e)}},t.prototype.destroy=function(){this.listComponent&&(this.destroyBean(this.listComponent),this.listComponent=void 0),this.eLoading=void 0,e.prototype.destroy.call(this)},Ff([de("userComponentFactory")],t.prototype,"userComponentFactory",void 0),Ff([sr("eInput")],t.prototype,"eInput",void 0),t}(Ir),Bf=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),jf=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Hf=function(e){function t(i){var n=e.call(this,i,t.TEMPLATE)||this;return n.labelAlignment="top",n}return Bf(t,e),t.prototype.init=function(){this.eSlider.addCssClass("ag-slider-field")},t.prototype.onValueChange=function(e){var t=this,i=ht.EVENT_FIELD_VALUE_CHANGED;return this.addManagedListener(this.eText,i,(function(){var i=parseFloat(t.eText.getValue());t.eSlider.setValue(i.toString(),!0),e(i||0)})),this.addManagedListener(this.eSlider,i,(function(){var i=t.eSlider.getValue();t.eText.setValue(i,!0),e(parseFloat(i))})),this},t.prototype.setSliderWidth=function(e){return this.eSlider.setWidth(e),this},t.prototype.setTextFieldWidth=function(e){return this.eText.setWidth(e),this},t.prototype.setMinValue=function(e){return this.eSlider.setMinValue(e),this.eText.setMin(e),this},t.prototype.setMaxValue=function(e){return this.eSlider.setMaxValue(e),this.eText.setMax(e),this},t.prototype.getValue=function(){return this.eText.getValue()},t.prototype.setValue=function(e){return this.getValue()===e||(this.eText.setValue(e,!0),this.eSlider.setValue(e,!0),this.dispatchEvent({type:ht.EVENT_FIELD_VALUE_CHANGED})),this},t.prototype.setStep=function(e){return this.eSlider.setStep(e),this.eText.setStep(e),this},t.TEMPLATE='<div class="ag-slider">\n            <label ref="eLabel"></label>\n            <div class="ag-wrapper ag-slider-wrapper">\n                <ag-input-range ref="eSlider"></ag-input-range>\n                <ag-input-number-field ref="eText"></ag-input-number-field>\n            </div>\n        </div>',jf([sr("eLabel")],t.prototype,"eLabel",void 0),jf([sr("eSlider")],t.prototype,"eSlider",void 0),jf([sr("eText")],t.prototype,"eText",void 0),jf([le],t.prototype,"init",null),t}(_r),Wf=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Uf=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},zf=function(e){function t(i){void 0===i&&(i={});var n=e.call(this,t.getTemplate(i))||this;n.suppressEnabledCheckbox=!0,n.suppressOpenCloseIcons=!1;var o=i.title,r=i.enabled,s=i.items,a=i.suppressEnabledCheckbox,l=i.suppressOpenCloseIcons;return n.title=o,n.cssIdentifier=i.cssIdentifier||"default",n.enabled=null==r||r,n.items=s||[],n.alignItems=i.alignItems||"center",null!=a&&(n.suppressEnabledCheckbox=a),null!=l&&(n.suppressOpenCloseIcons=l),n}return Wf(t,e),t.getTemplate=function(e){var t=e.cssIdentifier||"default",i=e.direction||"vertical";return'<div class="ag-group ag-'.concat(t,'-group" role="presentation">\n            <div class="ag-group-title-bar ag-').concat(t,'-group-title-bar ag-unselectable" ref="eTitleBar" role="button">
11\n                <span class="ag-group-title-bar-icon ag-').concat(t,'-group-title-bar-icon" ref="eGroupOpenedIcon" role="presentation"></span>\n                <span class="ag-group-title-bar-icon ag-').concat(t,'-group-title-bar-icon" ref="eGroupClosedIcon" role="presentation"></span>\n                <span ref="eTitle" class="ag-group-title ag-').concat(t,'-group-title"></span>\n            </div>\n            <div ref="eToolbar" class="ag-group-toolbar ag-').concat(t,'-group-toolbar">\n                <ag-checkbox ref="cbGroupEnabled"></ag-checkbox>\n            </div>\n            <div ref="eContainer" class="ag-group-container ag-group-container-').concat(i," ag-").concat(t,'-group-container"></div>\n        </div>')},t.prototype.postConstruct=function(){if(this.items.length){var e=this.items;this.items=[],this.addItems(e)}var t=this.localeService.getLocaleTextFunc();this.cbGroupEnabled.setLabel(t("enabled","Enabled")),this.title&&this.setTitle(this.title),this.enabled&&this.setEnabled(this.enabled),this.setAlignItems(this.alignItems),this.hideEnabledCheckbox(this.suppressEnabledCheckbox),this.hideOpenCloseIcons(this.suppressOpenCloseIcons),this.setupExpandContract(),this.refreshAriaStatus(),this.refreshChildDisplay()},t.prototype.setupExpandContract=function(){var e=this;this.eGroupClosedIcon.appendChild(wo("columnSelectClosed",this.gridOptionsService,null)),this.eGroupOpenedIcon.appendChild(wo("columnSelectOpen",this.gridOptionsService,null)),this.addManagedListener(this.eTitleBar,"click",(function(){return e.toggleGroupExpand()})),this.addManagedListener(this.eTitleBar,"keydown",(function(t){switch(t.key){case xo.ENTER:case xo.SPACE:t.preventDefault(),e.toggleGroupExpand();break;case xo.RIGHT:case xo.LEFT:t.preventDefault(),e.toggleGroupExpand(t.key===xo.RIGHT);break}}))},t.prototype.refreshAriaStatus=function(){this.suppressOpenCloseIcons||Si(this.eTitleBar,this.expanded)},t.prototype.refreshChildDisplay=function(){var e=!this.suppressOpenCloseIcons;_n(this.eToolbar,this.expanded&&!this.suppressEnabledCheckbox),_n(this.eGroupOpenedIcon,e&&this.expanded),_n(this.eGroupClosedIcon,e&&!this.expanded)},t.prototype.isExpanded=function(){return this.expanded},t.prototype.setAlignItems=function(e){this.alignItems!==e&&this.removeCssClass("ag-group-item-alignment-".concat(this.alignItems)),this.alignItems=e;var t="ag-group-item-alignment-".concat(this.alignItems);return this.addCssClass(t),this},t.prototype.toggleGroupExpand=function(e){return this.suppressOpenCloseIcons?(this.expanded=!0,this.refreshChildDisplay(),_n(this.eContainer,!0),this):(e=null!=e?e:!this.expanded,this.expanded===e||(this.expanded=e,this.refreshAriaStatus(),this.refreshChildDisplay(),_n(this.eContainer,e),this.dispatchEvent({type:this.expanded?t.EVENT_EXPANDED:t.EVENT_COLLAPSED})),this)},t.prototype.addItems=function(e){var t=this;e.forEach((function(e){return t.addItem(e)}))},t.prototype.addItem=function(e){var t=this.eContainer,i=e instanceof rr?e.getGui():e;i.classList.add("ag-group-item","ag-".concat(this.cssIdentifier,"-group-item")),t.appendChild(i),this.items.push(i)},t.prototype.hideItem=function(e,t){var i=this.items[t];_n(i,!e)},t.prototype.setTitle=function(e){return this.eTitle.innerText=e,this},t.prototype.addCssClassToTitleBar=function(e){this.eTitleBar.classList.add(e)},t.prototype.setEnabled=function(e,t){return this.enabled=e,this.refreshDisabledStyles(),this.toggleGroupExpand(e),t||this.cbGroupEnabled.setValue(e),this},t.prototype.isEnabled=function(){return this.enabled},t.prototype.onEnableChange=function(e){var t=this;return this.cbGroupEnabled.onValueChange((function(i){t.setEnabled(i,!0),e(i)})),this},t.prototype.hideEnabledCheckbox=function(e){return this.suppressEnabledCheckbox=e,this.refreshChildDisplay(),this.refreshDisabledStyles(),this},t.prototype.hideOpenCloseIcons=function(e){return this.suppressOpenCloseIcons=e,e&&this.toggleGroupExpand(!0),this},t.prototype.refreshDisabledStyles=function(){this.addOrRemoveCssClass("ag-disabled",!this.enabled),this.suppressEnabledCheckbox&&!this.enabled?(this.eTitleBar.classList.add("ag-disabled-group-title-bar"),this.eTitleBar.removeAttribute("tabindex")):(this.eTitleBar.classList.remove("ag-disabled-group-title-bar"),this.eTitleBar.setAttribute("tabindex","0")),this.eContainer.classList.toggle("ag-disabled-group-container",!this.enabled)},t.EVENT_EXPANDED="expanded",t.EVENT_COLLAPSED="collapsed",Uf([sr("eTitleBar")],t.prototype,"eTitleBar",void 0),Uf([sr("eGroupOpenedIcon")],t.prototype,"eGroupOpenedIcon",void 0),Uf([sr("eGroupClosedIcon")],t.prototype,"eGroupClosedIcon",void 0),Uf([sr("eToolbar")],t.prototype,"eToolbar",void 0),Uf([sr("cbGroupEnabled")],t.prototype,"cbGroupEnabled",void 0),Uf([sr("eTitle")],t.prototype,"eTitle",void 0),Uf([sr("eContainer")],t.prototype,"eContainer",void 0),Uf([le],t.prototype,"postConstruct",null),t}(rr),Kf=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Yf=function(){return Yf=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Yf.apply(this,arguments)},qf=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Xf=function(e){function t(t){void 0===t&&(t=1);var i=e.call(this,'<div class="ag-menu-list" role="tree"></div>')||this;return i.level=t,i.menuItems=[],i}return Kf(t,e),t.prototype.postConstruct=function(){var e=this;this.initialiseTabGuard({onTabKeyDown:function(t){return e.onTabKeyDown(t)},handleKeyDown:function(t){return e.handleKeyDown(t)}})},t.prototype.onTabKeyDown=function(e){var t=this.getParentComponent(),i=t&&t.getGui(),n=i&&i.classList.contains("ag-focus-managed");n||e.preventDefault(),e.shiftKey&&this.closeIfIsChild(e)},t.prototype.handleKeyDown=function(e){switch(e.key){case xo.UP:case xo.RIGHT:case xo.DOWN:case xo.LEFT:e.preventDefault(),this.handleNavKey(e.ke
vendor: 17,982 bytes, line 11
11y);break;case xo.ESCAPE:var t=this.findTopMenu();t&&this.focusService.focusInto(t.getGui());break}},t.prototype.clearActiveItem=function(){this.activeMenuItem&&(this.activeMenuItem.deactivate(),this.activeMenuItem=null)},t.prototype.addMenuItems=function(e){var t=this;null!=e&&e.forEach((function(e){"separator"===e?t.addSeparator():"string"===typeof e?console.warn("AG Grid: unrecognised menu item ".concat(e)):t.addItem(e)}))},t.prototype.addItem=function(e){var t=this,i=this.createManagedBean(new tg(Yf(Yf({},e),{isAnotherSubMenuOpen:function(){return t.menuItems.some((function(e){return e.isSubMenuOpen()}))}})));i.setParentComponent(this),mi(i.getGui(),this.level),this.menuItems.push(i),this.appendChild(i.getGui()),this.addManagedListener(i,tg.EVENT_MENU_ITEM_SELECTED,(function(e){t.dispatchEvent(e)})),this.addManagedListener(i,tg.EVENT_MENU_ITEM_ACTIVATED,(function(e){t.activeMenuItem&&t.activeMenuItem!==e.menuItem&&t.activeMenuItem.deactivate(),t.activeMenuItem=e.menuItem}))},t.prototype.activateFirstItem=function(){var e=this.menuItems.filter((function(e){return!e.isDisabled()}))[0];e&&e.activate()},t.prototype.addSeparator=function(){var e='\n            <div class="ag-menu-separator" aria-hidden="true">\n                <div class="ag-menu-separator-part"></div>\n                <div class="ag-menu-separator-part"></div>\n                <div class="ag-menu-separator-part"></div>\n                <div class="ag-menu-separator-part"></div>\n            </div>';this.appendChild(Kn(e))},t.prototype.findTopMenu=function(){var e=this.getParentComponent();if(!e&&this instanceof t)return this;while(1){var i=e&&e.getParentComponent&&e.getParentComponent();if(!i||!(i instanceof t||i instanceof tg))break;e=i}return e instanceof t?e:void 0},t.prototype.handleNavKey=function(e){switch(e){case xo.UP:case xo.DOWN:var t=this.findNextItem(e===xo.UP);return void(t&&t!==this.activeMenuItem&&t.activate())}var i=this.gridOptionsService.get("enableRtl")?xo.RIGHT:xo.LEFT;e===i?this.closeIfIsChild():this.openChild()},t.prototype.closeIfIsChild=function(e){var t=this.getParentComponent();t&&t instanceof tg&&(e&&e.preventDefault(),t.closeSubMenu(),t.getGui().focus())},t.prototype.openChild=function(){this.activeMenuItem&&this.activeMenuItem.openSubMenu(!0)},t.prototype.findNextItem=function(e){var t=this.menuItems.filter((function(e){return!e.isDisabled()}));if(t.length){if(!this.activeMenuItem)return e?Ae(t):t[0];var i;e&&t.reverse();for(var n=!1,o=0;o<t.length;o++){var r=t[o];if(n){i=r;break}r===this.activeMenuItem&&(n=!0)}return i||this.activeMenuItem}},t.prototype.destroy=function(){this.clearActiveItem(),e.prototype.destroy.call(this)},qf([de("focusService")],t.prototype,"focusService",void 0),qf([le],t.prototype,"postConstruct",null),t}(Pf),$f=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Zf=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Jf=function(e){function t(t){var i=e.call(this)||this;return i.wrappedComponent=t,i.setTemplateFromElement(t.getGui()),i}return $f(t,e),t.prototype.postConstruct=function(){var e=this;this.initialiseTabGuard({onTabKeyDown:function(t){return e.onTabKeyDown(t)},handleKeyDown:function(t){return e.handleKeyDown(t)}})},t.prototype.handleKeyDown=function(e){e.key===xo.ESCAPE&&this.closePanel()},t.prototype.onTabKeyDown=function(e){e.defaultPrevented||(this.closePanel(),e.preventDefault())},t.prototype.closePanel=function(){var e=this.parentComponent;e.closeSubMenu(),setTimeout((function(){return e.getGui().focus()}),0)},Zf([le],t.prototype,"postConstruct",null),t}(Pf),Qf=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),eg=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},tg=function(e){function t(t){var i=e.call(this)||this;return i.params=t,i.isActive=!1,i.subMenuIsOpen=!1,i.setTemplate('<div class="'.concat(i.getClassName(),'" tabindex="-1" role="treeitem"></div>')),i}return Qf(t,e),t.prototype.init=function(){var e=this;this.addIcon(),this.addName(),this.addShortcut(),this.addSubMenu(),this.addTooltip();var t=this.getGui();this.params.disabled?(this.addCssClass(this.getClassName("disabled")),Ci(t,!0)):(this.addGuiEventListener("click",(function(t){return e.onItemSelected(t)})),this.addGuiEventListener("keydown",(function(t){t.key!==xo.ENTER&&t.key!==xo.SPACE||(t.preventDefault(),e.onItemSelected(t))})),this.addGuiEventListener("mousedown",(function(e){e.stopPropagation(),e.preventDefault()})),this.addGuiEventListener("mouseenter",(function(){return e.onMouseEnter()})),this.addGuiEventListener("mouseleave",(function(){return e.onMouseLeave()}))),this.params.cssClasses&&this.params.cssClasses.forEach((function(t){return e.addCssClass(t)}))},t.prototype.isDisabled=function(){return!!this.params.disabled},t.prototype.openSubMenu=function(e){var i=this;if(void 0===e&&(e=!1),this.closeSubMenu(),this.params.subMenu){var n,o=Kn('<div class="ag-menu" role="presentation"></div>');if(this.params.subMenu instanceof Array){var r=li(this.getGui()),s=isNaN(r)?1:r+1,a=this.createBean(new Xf(s));a.setParentComponent(this),a.addMenuItems(this.params.subMenu),o.appendChild(a.getGui()),this.addManagedListener(a,t.EVENT_MENU_ITEM_SELECTED,(function(e){return i.dispatchEvent(e)})),a.addGuiEventListener("mouseenter",(function(){return i.cancelDeactivate()})),n=function(){return i.destroyBean(a)},e&&setTimeout((function(){return a.activateFirstItem()}),0)}else{var l=this.params.subMenu,c=this.createBean(new Jf(l));c.setParentComponent(this);var u=c.getGui(),d="mouseenter",p=function(){return i.cancelDeactivate()};u.addEventListener(d,p),n=function(){return u.removeEventListener(d,p)},o.appendChild(u),l.afterGuiAttached&&setTimeout((function(){return l.afterGuiAttached()}),0)}var h=this.getGui(),f=this.popupService.positionPopupForMenu.bind(this.popupService,{eventSource:h,ePopup:o}),g=this.localeService.getLocaleTextFunc(),v=this.popupService.addPopup({modal:!0,eChild:o,positionCallback:f,anchorToElement:h,ariaLabel:g("ariaLabelSubMenu","SubMenu")});this.subMenuIsOpen=!0,Si(h,!0),this.hideSubMenu=function(){v&&v.hideFunc(),i.subMenuIsOpen=!1,Si(h,!1),n()}}},t.prototype.closeSubMenu=function(){this.hideSubMenu&&(this.hideSubMenu(),this.hideSubMenu=null,Si(this.getGui(),!1))},t.prototype.isSubMenuOpen=function(){return this.subMenuIsOpen},t.prototype.activate=function(e){var t=this;this.cancelActivate(),this.params.disabled||(this.isActive=!0,this.addCssClass(this.getClassName("active")),this.getGui().focus(),e&&this.params.subMenu&&window.setTimeout((function(){t.isAlive()&&t.isActive&&t.openSubMenu()}),300),this.onItemActivated())},t.prototype.deactivate=function(){this.cancelDeactivate(),this.removeCssClass(this.getClassName("active")),this.isActive=!1,this.subMenuIsOpen&&this.hideSubMenu()},t.prototype.addIcon=function(){if(this.params.checked||this.params.icon||!this.params.isCompact){var e=Kn('<span ref="eIcon" class="'.concat(this.getClassName("part")," ").concat(this.getClassName("icon"),'" role="presentation"></span>'));this.params.checked?e.appendChild(So("check",this.gridOptionsService)):this.params.icon&&(ao(this.params.icon)?e.appendChild(this.params.icon):"string"===typeof this.params.icon?e.innerHTML=this.params.icon:console.warn("AG Grid: menu item icon must be DOM node or string")),this.getGui().appendChild(e)}},t.prototype.addName=function(){if(this.params.name||!this.params.isCompact){var e=Kn('<span ref="eName" class="'.concat(this.getClassName("part")," ").concat(this.getClassName("text"),'">').concat(this.params.name||"","</span>"));this.getGui().appendChild(e)}},t.prototype.addTooltip=function(){this.params.tooltip&&(this.tooltip=this.params.tooltip,this.gridOptionsService.get("enableBrowserTooltips")?this.getGui().setAttribute("title",this.tooltip):this.createManagedBean(new er(this)))},t.prototype.getTooltipParams=function(){return{location:"menu",value:this.tooltip}},t.prototype.addShortcut=function(){if(this.params.shortcut||!this.params.isCompact){var e=Kn('<span ref="eShortcut" class="'.concat(this.getClassName("part")," ").concat(this.getClassName("shortcut"),'">').concat(this.params.shortcut||"","</span>"));this.getGui().appendChild(e)}},t.prototype.addSubMenu=function(){if(this.params.subMenu||!this.params.isCompact){var e=Kn('<span ref="ePopupPointer" class="'.concat(this.getClassName("part")," ").concat(this.getClassName("popup-pointer"),'"></span>')),t=this.getGui();if(this.params.subMenu){var i=this.gridOptionsService.get("enableRtl")?"smallLeft":"smallRight";Si(t,!1),e.appendChild(So(i,this.gridOptionsService))}t.appendChild(e)}},t.prototype.onItemSelected=function(e){if(this.params.action?this.params.action():this.openSubMenu(e&&"keydown"===e.type),!this.params.subMenu||this.params.action){var i={type:t.EVENT_MENU_ITEM_SELECTED,action:this.params.action,checked:this.params.checked,cssClasses:this.params.cssClasses,disabled:this.params.disabled,icon:this.params.icon,name:this.params.name,shortcut:this.params.shortcut,subMenu:this.params.subMenu,tooltip:this.params.tooltip,event:e};this.dispatchEvent(i)}},t.prototype.onItemActivated=function(){var e={type:t.EVENT_MENU_ITEM_ACTIVATED,menuItem:this};this.dispatchEvent(e)},t.prototype.cancelActivate=function(){this.activateTimeoutId&&(window.clearTimeout(this.activateTimeoutId),this.activateTimeoutId=0)},t.prototype.cancelDeactivate=function(){this.deactivateTimeoutId&&(window.clearTimeout(this.deactivateTimeoutId),this.deactivateTimeoutId=0)},t.prototype.onMouseEnter=function(){var e=this;this.cancelDeactivate(),this.params.isAnotherSubMenuOpen()?this.activateTimeoutId=window.setTimeout((function(){return e.activate(!0)}),t.ACTIVATION_DELAY):this.activate(!0)},t.prototype.onMouseLeave=function(){var e=this;this.cancelActivate(),this.isSubMenuOpen()?this.deactivateTimeoutId=window.setTimeout((function(){return e.deactivate()}),t.ACTIVATION_DELAY):this.deactivate()},t.prototype.getClassName=function(e){var t=this.params.isCompact?"ag-compact-menu-option":"ag-menu-option";return e?"".concat(t,"-").concat(e):t},t.EVENT_MENU_ITEM_SELECTED="menuItemSelected",t.EVENT_MENU_ITEM_ACTIVATED="menuItemActivated",t.ACTIVATION_DELAY=80,eg([de("popupService")],t.prototype,"popupService",void 0),eg([le],t.prototype,"init",null),t}(rr),ig=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ng=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},og=function(e){function t(i){var n=e.call(this,t.getTemplate(i))||this;return n.closable=!0,n.config=i,n}return ig(t,e),t.getTemplate=function(e){var t=e&&e.cssIdentifier||"default";return'<div class="ag-panel ag-'.concat(t,'-panel" tabindex="-1">\n            <div ref="eTitleBar" class="ag-panel-title-bar ag-').concat(t,'-panel-title-bar ag-unselectable">\n                <span ref="eTitle" class="ag-panel-title-bar-title ag-').concat(t,'-panel-title-bar-title"></span>\n                <div ref="eTitleBarButtons" class="ag-panel-title-bar-buttons ag-').concat(t,'-panel-title-bar-buttons"></div>\n            </div>\n            <div ref="eContentWrapper" class="ag-panel-content-wrapper ag-').concat(t,'-panel-content-wrapper"></div>\n        </div>')},t.prototype.postConstruct=function(){var e=this,t=this.config,i=t.component,n=t.closable,o=t.hideTitleBar,r=t.title,s=t.minWidth,a=void 0===s?250:s,l=t.width,c=t.minHeight,u=void 0===c?250:c,d=t.height,p=t.centered,h=t.popup,f=t.x,g=t.y;this.positionableFeature=new xr(this.getGui(),{minWidth:a,width:l,minHeight:u,height:d,centered:p,x:f,y:g,popup:h,calculateTopBuffer:function(){return e.positionableFeature.getHeight()-e.getBodyHeight()}}),this.createManagedBean(this.positionableFeature);var v=this.getGui();i&&this.setBodyComponent(i),o?_n(this.eTitleBar,!1):(r&&this.setTitle(r),this.setClosable(null!=n?n:this.closable)),this.addManagedListener(this.eTitleBar,"mousedown",(function(t){var i=e.gridOptionsService.getDocument();if(v.contains(t.relatedTarget)||v.contains(i.activeElement)||e.eTitleBarButtons.contains(t.target))t.preventDefault();else{var n=e.eContentWrapper.querySelector("button, [href], input, select, textarea, [tabindex]");n&&n.focus()}})),h&&this.positionableFeature.isPositioned()||(this.renderComponent&&this.renderComponent(),this.positionableFeature.initialisePosition(),this.eContentWrapper.style.height="0")},t.prototype.renderComponent=function(){var e=this,t=this.getGui();t.focus(),this.close=function(){t.parentElement.removeChild(t),e.destroy()}},t.prototype.getHeight=function(){return this.positionableFeature.getHeight()},t.prototype.setHeight=function(e){this.positionableFeature.setHeight(e)},t.prototype.getWidth=function(){return this.positionableFeature.getWidth()},t.prototype.setWidth=function(e){this.positionableFeature.setWidth(e)},t.prototype.setClosable=function(e){if(e!==this.closable&&(this.closable=e),e){var i=this.closeButtonComp=new rr(t.CLOSE_BTN_TEMPLATE);this.getContext().createBean(i);var n=i.getGui(),o=So("close",this.gridOptionsService);o.classList.add("ag-panel-title-bar-button-icon"),n.appendChild(o),this.addTitleBarButton(i),i.addManagedListener(n,"click",this.onBtClose.bind(this))}else if(this.closeButtonComp){n=this.closeButtonComp.getGui();n.parentElement.removeChild(n),this.closeButtonComp=this.destroyBean(this.closeButtonComp)}},t.prototype.setBodyComponent=function(e){e.setParentComponent(this),this.eContentWrapper.appendChild(e.getGui())},t.prototype.addTitleBarButton=function(e,t){var i=this.eTitleBarButtons,n=i.children,o=n.length;null==t&&(t=o),t=Math.max(0,Math.min(t,o)),e.addCssClass("ag-panel-title-bar-button");var r=e.getGui();0===t?i.insertAdjacentElement("afterbegin",r):t===o?i.insertAdjacentElement("beforeend",r):n[t-1].insertAdjacentElement("afterend",r),e.setParentComponent(this)},t.prototype.getBodyHeight=function(){return Ln(this.eContentWrapper)},t.prototype.getBodyWidth=function(){return In(this.eContentWrapper)},t.prototype.setTitle=function(e){this.eTitle.innerText=e},t.prototype.onBtClose=function(){this.close()},t.prototype.destroy=function(){this.closeButtonComp&&(this.closeButtonComp=this.destroyBean(this.closeButtonComp));var t=this.getGui();t&&zn(t)&&this.close(),e.prototype.destroy.call(this)},t.CLOSE_BTN_TEMPLATE='<div class="ag-button"></div>',ng([sr("eContentWrapper")],t.prototype,"eContentWrapper",void 0),ng([sr("eTitleBar")],t.prototype,"eTitleBar",void 0),ng([sr("eTitleBarButtons")],t.prototype,"eTitleBarButtons",void 0),ng([sr("eTitle")],t.prototype,"eTitle",void 0),ng([le],t.prototype,"postConstruct",null),t}(rr),rg=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),sg=function(){return sg=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},sg.apply(this,arguments)},ag=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},lg=function(e){function t(t){var i=e.call(this,sg(sg({},t),{popup:!0}))||this;return i.isMaximizable=!1,i.isMaximized=!1,i.maximizeListeners=[],i.resizeListenerDestroy=null,i.lastPosition={x:0,y:0,width:0,height:0},i}return rg(t,e),t.prototype.postConstruct=function(){var t=this,i=this.getGui(),n=this.config,o=n.movable,r=n.resizable,s=n.maximizable;this.addCssClass("ag-dialog"),e.prototype.postConstruct.call(this),this.addManagedListener(i,"focu
11sin",(function(e){i.contains(e.relatedTarget)||t.popupService.bringPopupToFront(i)})),o&&this.setMovable(o),s&&this.setMaximizable(s),r&&this.setResizable(r)},t.prototype.renderComponent=function(){var e=this.getGui(),t=this.config,i=t.alwaysOnTop,n=t.modal,o=t.title,r=t.afterGuiAttached,s=this.localeService.getLocaleTextFunc(),a=this.popupService.addPopup({modal:n,eChild:e,closeOnEsc:!0,closedCallback:this.destroy.bind(this),alwaysOnTop:i,ariaLabel:o||s("ariaLabelDialog","Dialog"),afterGuiAttached:r});a&&(this.close=a.hideFunc)},t.prototype.toggleMaximize=function(){var e=this.positionableFeature.getPosition();if(this.isMaximized){var t=this.lastPosition,i=t.x,n=t.y,o=t.width,r=t.height;this.setWidth(o),this.setHeight(r),this.positionableFeature.offsetElement(i,n)}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()},t.prototype.refreshMaximizeIcon=function(){_n(this.maximizeIcon,!this.isMaximized),_n(this.minimizeIcon,this.isMaximized)},t.prototype.clearMaximizebleListeners=function(){this.maximizeListeners.length&&(this.maximizeListeners.forEach((function(e){return e()})),this.maximizeListeners.length=0),this.resizeListenerDestroy&&(this.resizeListenerDestroy(),this.resizeListenerDestroy=null)},t.prototype.destroy=function(){this.maximizeButtonComp=this.destroyBean(this.maximizeButtonComp),this.clearMaximizebleListeners(),e.prototype.destroy.call(this)},t.prototype.setResizable=function(e){this.positionableFeature.setResizable(e)},t.prototype.setMovable=function(e){this.positionableFeature.setMovable(e,this.eTitleBar)},t.prototype.setMaximizable=function(e){var t=this;if(!e)return this.clearMaximizebleListeners(),void(this.maximizeButtonComp&&(this.destroyBean(this.maximizeButtonComp),this.maximizeButtonComp=this.maximizeIcon=this.minimizeIcon=void 0));var i=this.eTitleBar;if(i&&e!==this.isMaximizable){var n=this.buildMaximizeAndMinimizeElements();this.refreshMaximizeIcon(),n.addManagedListener(n.getGui(),"click",this.toggleMaximize.bind(this)),this.addTitleBarButton(n,0),this.maximizeListeners.push(this.addManagedListener(i,"dblclick",this.toggleMaximize.bind(this))),this.resizeListenerDestroy=this.addManagedListener(this,"resize",(function(){t.isMaximized=!1,t.refreshMaximizeIcon()}))}},t.prototype.buildMaximizeAndMinimizeElements=function(){var e=this.maximizeButtonComp=this.createBean(new rr('<div class="ag-dialog-button"></span>')),t=e.getGui();return this.maximizeIcon=So("maximize",this.gridOptionsService),t.appendChild(this.maximizeIcon),this.maximizeIcon.classList.add("ag-panel-title-bar-button-icon"),this.minimizeIcon=So("minimize",this.gridOptionsService),t.appendChild(this.minimizeIcon),this.minimizeIcon.classList.add("ag-panel-title-bar-button-icon"),e},ag([de("popupService")],t.prototype,"popupService",void 0),t}(og),cg=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ug=function(){return ug=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ug.apply(this,arguments)},dg=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},pg=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},hg=function(e,t,i){if(i||2===arguments.length)for(var n,o=0,r=t.length;o<r;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},fg=function(e){var t="function"===typeof Symbol&&Symbol.iterator,i=t&&e[t],n=0;if(i)return i.call(e);
11if(e&&"number"===typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};(function(e){e[e["vertical"]=0]="vertical",e[e["horizontal"]=1]="horizontal"})(Tf||(Tf={}));var gg=0,vg=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.popupList=[],t}var i;return cg(t,e),i=t,t.prototype.postConstruct=function(){var e=this;this.ctrlsService.whenReady((function(t){e.gridCtrl=t.gridCtrl})),this.addManagedListener(this.eventService,ht.EVENT_GRID_STYLES_CHANGED,this.handleThemeChange.bind(this))},t.prototype.getPopupParent=function(){var e=this.gridOptionsService.get("popupParent");return e||this.gridCtrl.getGui()},t.prototype.positionPopupForMenu=function(e){var t=e.eventSource,i=e.ePopup,n=this.getPopupIndex(i);if(-1!==n){var o=this.popupList[n];o.alignedToElement=t}var r=t.getBoundingClientRect(),s=this.getParentRect(),a=this.keepXYWithinBounds(i,r.top-s.top,Tf.vertical),l=i.clientWidth>0?i.clientWidth:200;i.style.minWidth="".concat(l,"px");var c,u=s.right-s.left,d=u-l;function p(){return r.right-s.left-2}function h(){return r.left-s.left-l}this.gridOptionsService.get("enableRtl")?(c=h(),c<0&&(c=p(),this.setAlignedStyles(i,"left")),c>d&&(c=0,this.setAlignedStyles(i,"right"))):(c=p(),c>d&&(c=h(),this.setAlignedStyles(i,"right")),c<0&&(c=0,this.setAlignedStyles(i,"left"))),i.style.left="".concat(c,"px"),i.style.top="".concat(a,"px")},t.prototype.positionPopupUnderMouseEvent=function(e){var t=this,i=e.ePopup,n=e.nudgeX,o=e.nudgeY,r=e.skipObserver;this.positionPopup({ePopup:i,nudgeX:n,nudgeY:o,keepWithinBounds:!0,skipObserver:r,updatePosition:function(){return t.calculatePointerAlign(e.mouseEvent)},postProcessCallback:function(){return t.callPostProcessPopup(e.type,e.ePopup,null,e.mouseEvent,e.column,e.rowNode)}})},t.prototype.calculatePointerAlign=function(e){var t=this.getParentRect();return{x:e.clientX-t.left,y:e.clientY-t.top}},t.prototype.positionPopupByComponent=function(e){var t=this,i=e.ePopup,n=e.nudgeX,o=e.nudgeY,r=e.keepWithinBounds,s=e.eventSource,a=e.alignSide,l=void 0===a?"left":a,c=e.position,u=void 0===c?"over":c,d=e.column,p=e.rowNode,h=e.type,f=s.getBoundingClientRect(),g=this.getParentRect(),v=this.getPopupIndex(i);if(-1!==v){var y=this.popupList[v];y.alignedToElement=s}var m=function(){var n,r=f.left-g.left;if("right"===l&&(r-=i.offsetWidth-f.width),"over"===u)n=f.top-g.top,t.setAlignedStyles(i,"over");else{t.setAlignedStyles(i,"under");var s=t.shouldRenderUnderOrAbove(i,f,g,e.nudgeY||0);n="under"===s?f.top-g.top+f.height:f.top-i.offsetHeight-2*(o||0)-g.top}return{x:r,y:n}};this.positionPopup({ePopup:i,nudgeX:n,nudgeY:o,keepWithinBounds:r,updatePosition:m,postProcessCallback:function(){return t.callPostProcessPopup(h,i,s,null,d,p)}})},t.prototype.shouldRenderUnderOrAbove=function(e,t,i,n){var o=i.bottom-t.bottom,r=t.top-i.top,s=e.offsetHeight+n;return o>s?"under":r>s||r>o?"above":"under"},t.prototype.setAlignedStyles=function(e,t){var i=this.getPopupIndex(e);if(-1!==i){var n=this.popupList[i],o=n.alignedToElement;if(o){var r=["right","left","over","above","under"];r.forEach((function(t){o.classList.remove("ag-has-popup-positioned-".concat(t)),e.classList.remove("ag-popup-positioned-".concat(t))})),t&&(o.classList.add("ag-has-popup-positioned-".concat(t)),e.classList.add("ag-popup-positioned-".concat(t)))}}},t.prototype.callPostProcessPopup=function(e,t,i,n,o,r){var s=this.gridOptionsService.getCallback("postProcessPopup");if(s){var a={column:o,rowNode:r,ePopup:t,type:e,eventSource:i,mouseEvent:n};s(a)}},t.prototype.positionPopup=function(e){var t=this,n=e.ePopup,o=e.keepWithinBounds,r=e.nudgeX,s=e.nudgeY,a=e.skipObserver,l=e.updatePosition,c={width:0,height:0},u=function(i){void 0===i&&(i=!1);var a=l(),u=a.x,d=a.y;i&&n.clientWidth===c.width&&n.clientHeight===c.height||(c.width=n.clientWidth,c.height=n.clientHeight,r&&(u+=r),s&&(d+=s),o&&(u=t.keepXYWithinBounds(n,u,Tf.horizontal),d=t.keepXYWithinBounds(n,d,Tf.vertical)),n.style.left="".concat(u,"px"),n.style.top="".concat(d,"px"),e.postProcessCallback&&e.postProcessCallback())};if(u(),!a){var d=this.resizeObserverService.observeResize(n,(function(){return u(!0)}));setTimeout((function(){return d()}),i.WAIT_FOR_POPUP_CONTENT_RESIZE)}},t.prototype.getActivePopups=function(){return this.popupList.map((function(e){return e.element}))},t.prototype.getPopupList=function(){return this.popupList},t.prototype.getParentRect=function(){var e=this.gridOptionsService.getDocument(),t=this.getPopupParent();return t===e.body?t=e.documentElement:"static"===getComputedStyle(t).position&&(t=t.offsetParent),Vn(t)},t.prototype.keepXYWithinBounds=function(e,t,i){var n=i===Tf.vertical,o=n?"clientHeight":"clientWidth",r=n?"top":"left",s=n?"offsetHeight":"offsetWidth",a=n?"scrollTop":"scrollLeft",l=this.gridOptionsService.getDocument(),c=l.documentElement,u=this.getPopupParent(),d=u.getBoundingClientRect(),p=l.documentElement.getBoundingClientRect(),h=u===l.body,f=e[s],g=n?Fn:Gn,v=h?g(c)+c[a]:u[o];h&&(v-=Math.abs(p[r]-d[r]));var y=v-f;return Math.min(Math.max(t,0),Math.abs(y))},t.prototype.addPopup=function(e){var t=this.gridOptionsService.getDocument(),i=e.eChild,n=e.ariaLabel,o=e.alwaysOnTop,r=e.positionCallback,s=e.anchorToElement;if(!t)return console.warn("AG Grid: could not find the document, document is empty"),{hideFunc:function(){}};var a=this.getPopupIndex(i);if(-1!==a){var l=this.popupList[a];return{hideFunc:l.hideFunc}}this.initialisePopupPosition(i);var c=this.createPopupWrapper(i,n,!!o),u=this.addEventListenersToPopup(ug(ug({},e),{wrapperEl:c}));return r&&r(),this.addPopupToPopupList(i,c,u,s),{hideFunc:u}},t.prototype.initialisePopupPosition=function(e){var t=this.getPopupParent(),i=t.getBoundingClientRect();o(e.style.top)||(e.style.top="".concat(-1*i.top,"px")),o(e.style.left)||(e.style.left="".concat(-1*i.left,"px"))},t.prototype.createPopupWrapper=function(e,t,i){var n,o=this.getPopupParent(),r=document.createElement("div"),s=this.environment.getTheme().allThemes;return s.length&&(n=r.classList).add.apply(n,hg([],pg(s),!1)),r.classList.add("ag-popup"),e.classList.add(this.gridOptionsService.get("enableRtl")?"ag-rtl":"ag-ltr","ag-popup-child"),e.hasAttribute("role")||si(e,"dialog"),di(e,t),r.appendChild(e),o.appendChild(r),i?this.setAlwaysOnTop(e,!0):this.bringPopupToFront(e),r},t.prototype.handleThemeChange=function(){var e,t,i,n,o,r=this.environment.getTheme().allThemes;try{for(var s=fg(this.popupList),a=s.next();!a.done;a=s.next()){var l=a.value;try{for(var c=(i=void 0,fg(Array.from(l.wrapper.classList))),u=c.next();!u.done;u=c.next()){var d=u.value;d.startsWith("ag-theme-")&&l.wrapper.classList.remove(d)}}catch(p){i={error:p}}finally{try{u&&!u.done&&(n=c.return)&&n.call(c)}finally{if(i)throw i.error}}r.length&&(o=l.wrapper.classList).add.apply(o,hg([],pg(r),!1))}}catch(h){e={error:h}}finally{try{a&&!a.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}},t.prototype.addEventListenersToPopup=function(e){var t=this,i=this.gridOptionsService.getDocument(),n=this.getPopupParent(),o=e.wrapperEl,r=e.eChild;e.click;var s=e.closedCallback,a=e.afterGuiAttached,l=e.closeOnEsc,c=e.modal,u=!1,d=function(e){if(o.contains(i.activeElement)){var t=e.key;t!==xo.ESCAPE||Ze(e)||f({keyboardEvent:e})}},p=function(e){return f({mouseEvent:e})},h=function(e){return f({touchEvent:e})},f=function(e){void 0===e&&(e={});var a=e.mouseEvent,l=e.touchEvent,c=e.keyboardEvent;t.isEventFromCurrentPopup({mouseEvent:a,touchEvent:l},r)||u||(u=!0,n.removeChild(o),i.removeEventListener("keydown",d),i.removeEventListener("mousedown",p),i.removeEventListener("touchstart",h),i.removeEventListener("contextmenu",p),t.eventService.removeEventListener(ht.EVENT_DRAG_STARTED,p),s&&s(a||l||c),t.removePopupFromPopupList(r))};return a&&a({hidePopup:f}),window.setTimeout((function(){l&&i.addEventListener("keydown",d),c&&(i.addEventListener("mousedown",p),t.eventService.addEventListener(ht.EVENT_DRAG_STARTED,p),i.addEventListener("touchstart",h),i.addEventListener("contextmenu",p))}),0),f},t.prototype.addPopupToPopupList=function(e,t,i,n){this.popupList.push({element:e,wrapper:t,hideFunc:i,instanceId:gg++,isAnchored:!!n}),n&&this.setPopupPositionRelatedToElement(e,n)},t.prototype.getPopupIndex=function(e){return this.popupList.findIndex((function(t){return t.element===e}))},t.prototype.setPopupPositionRelatedToElement=function(e,t){var i=this.getPopupIndex(e);if(-1!==i){var n=this.popupList[i];if(n.stopAnchoringPromise&&n.stopAnchoringPromise.then((function(e){return e&&e()})),n.stopAnchoringPromise=void 0,n.isAnchored=!1,t){var o=this.keepPopupPositionedRelativeTo({element:t,ePopup:e,hidePopup:n.hideFunc});return n.stopAnchoringPromise=o,n.isAnchored=!0,o}}},t.prototype.removePopupFromPopupList=function(e){this.setAlignedStyles(e,null),this.setPopupPositionRelatedToElement(e,null),this.popupList=this.popupList.filter((function(t){return t.element!==e}))},t.prototype.keepPopupPositionedRelativeTo=function(e){var t=this,i=this.getPopupParent(),n=i.getBoundingClientRect(),o=e.element,r=e.ePopup,s=o.getBoundingClientRect(),a=n.top-s.top,l=n.left-s.left,c=a,u=l,d=r.style.top,p=parseInt(d.substring(0,d.length-1),10),h=r.style.left,f=parseInt(h.substring(0,h.length-1),10);return new $o((function(n){t.getFrameworkOverrides().setInterval((function(){var n=i.getBoundingClientRect(),s=o.getBoundingClientRect(),d=0==s.top&&0==s.left&&0==s.height&&0==s.width;if(d)e.hidePopup();else{var h=n.top-s.top;if(h!=c){var g=t.keepXYWithinBounds(r,p+a-h,Tf.vertical);r.style.top="".concat(g,"px")}c=h;var v=n.left-s.left;if(v!=u){var y=t.keepXYWithinBounds(r,f+l-v,Tf.horizontal);r.style.left="".concat(y,"px")}u=v}}),200).then((function(e){var t=function(){null!=e&&window.clearInterval(e)};n(t)}))}))},t.prototype.hasAnchoredPopup=function(){return this.popupList.some((function(e){return e.isAnchored}))},t.prototype.isEventFromCurrentPopup=function(e,t){var i=e.mouseEvent,n=e.touchEvent,o=i||n;if(!o)return!1;var r=this.getPopupIndex(t);if(-1===r)return!1;for(var s=r;s<this.popupList.length;s++){var a=this.popupList[s];if(et(a.element,o))return!0}return this.isElementWithinCustomPopup(o.target)},t.prototype.isElementWithinCustomPopup=function(e){var t=this.gridOptionsService.getDocument();while(e&&e!==t.body){if(e.classList.contains("ag-custom-component-popup")||null===e.parentElement)return!0;e=e.parentElement}return!1},t.prototype.getWrapper=function(e){while(!e.classList.contains("ag-popup")&&e.parentElement)e=e.parentElement;return e.classList.contains("ag-popup")?e:null},t.prototype.setAlwaysOnTop=function(e,t){var i=this.getWrapper(e);i&&(i.classList.toggle("ag-always-on-top",!!t),t&&this.bringPopupToFront(i))},t.prototype.bringPopupToFront=function(e){var t=this.getPopupParent(),i=Array.prototype.slice.call(t.querySelectorAll(".ag-popup")),n=i.length,o=Array.prototype.slice.call(t.querySelectorAll(".ag-popup.ag-always-on-top")),r=o.length,s=this.getWrapper(e);if(s&&!(n<=1)&&t.contains(e)){var a=i.indexOf(s),l=s.querySelectorAll("div"),c=[];if(l.forEach((function(e){0!==e.scrollTop&&c.push([e,e.scrollTop])})),r){var u=s.classList.contains("ag-always-on-top");u?a!==n-1&&Ae(o).insertAdjacentElement("afterend",s):a!==n-r-1&&o[0].insertAdjacentElement("beforebegin",s)}else a!==n-1&&Ae(i).insertAdjacentElement("afterend",s);while(c.length){var d=c.pop();d[0].scrollTop=d[1]}var p={type:"popupToFront",api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,eWrapper:s};this.eventService.dispatchEvent(p)}},t.WAIT_FOR_POPUP_CONTENT_RESIZE=200,dg([de("focusService")],t.prototype,"focusService",void 0),dg([de("ctrlsService")],t.prototype,"ctrlsService",void 0),dg([de("resizeObserverService")],t.prototype,"resizeObserverService",void 0),dg([le],t.prototype,"postConstruct",null),t=i=dg([ue("popupService")],t),t}(st),yg=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),mg=function(e){function t(){var t=e.call(this,'\n        <div class="ag-autocomplete-row" role="presentation">\n            <div class="ag-autocomplete-row-label"></div>\n        </div>')||this;return t.hasHighlighting=!1,t}return yg(t,e),t.prototype.setState=function(e,t){this.value=e,this.render(),this.updateSelected(t)},t.prototype.updateSelected=function(e){this.addOrRemoveCssClass("ag-autocomplete-row-selected",e)},t.prototype.setSearchString=function(e){var t,i=!1;if(o(e)){var n=null===(t=this.value)||void 0===t?void 0:t.toLocaleLowerCase().indexOf(e.toLocaleLowerCase());if(n>=0){i=!0,this.hasHighlighting=!0;var r=n+e.length,s=Et(this.value.slice(0,n)),a=Et(this.value.slice(n,r)),l=Et(this.value.slice(r));this.getGui().lastElementChild.innerHTML="".concat(s,"<b>").concat(a,"</b>").concat(l)}}!i&&this.hasHighlighting&&(this.hasHighlighting=!1,this.render())},t.prototype.render=function(){var e;this.getGui().lastElementChild.innerHTML=null!==(e=Et(this.value))&&void 0!==e?e:"&nbsp;"},t}(rr),Cg=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),bg=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},wg=function(e){function t(i){var n=e.call(this,t.TEMPLATE)||this;return n.params=i,n.searchString="",n}return Cg(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this)},t.prototype.init=function(){var e=this;this.autocompleteEntries=this.params.autocompleteEntries,this.virtualList=this.createManagedBean(new Nf({cssIdentifier:"autocomplete"})),this.virtualList.setComponentCreator(this.createRowComponent.bind(this)),this.eList.appendChild(this.virtualList.getGui()),this.virtualList.setModel({getRowCount:function(){return e.autocompleteEntries.length},getRow:function(t){return e.autocompleteEntries[t]}});var t=this.virtualList.getGui();this.addManagedListener(t,"click",(function(){return e.params.onConfirmed()})),this.addManagedListener(t,"mousemove",this.onMouseMove.bind(this)),this.addManagedListener(t,"mousedown",(function(e){return e.preventDefault()})),this.setSelectedValue(0)},t.prototype.onNavigationKeyDown=function(e,t){e.preventDefault();var i=this.autocompleteEntries.indexOf(this.selectedValue),n=t===xo.UP?i-1:i+1;this.checkSetSelectedValue(n)},t.prototype.setSearch=function(e){this.searchString=e,o(e)?this.runSearch():(this.autocompleteEntries=this.params.autocompleteEntries,this.virtualList.refresh(),this.checkSetSelectedValue(0)),this.updateSearchInList()},t.prototype.runContainsSearch=function(e,t){var i,n=!1,o=e.toLocaleLowerCase(),r=t.filter((function(e){var t=e.toLocaleLowerCase(),r=t.indexOf(o),s=0===r,a=r>=0;return a&&(!i||!n&&s||n===s&&e.length<i.length)&&(i=e,n=s),a}));return!i&&r.length&&(i=r[0]),{topMatch:i,allMatches:r}},t.prototype.runSearch=function(){var e,t,i,n,o=this.params.autocompleteEntries,r=o.map((function(e){var t;return null!==(t=e.displayValue)&&void 0!==t?t:e.key}));if(this.params.useFuzzySearch)i=yo(this.searchString,r,!0).values,n=i.length?i[0]:void 0;else{var s=this.runContainsSearch(this.searchString,r);i=s.allMatches,n=s.topMatch}var a=o.filter((function(e){var t=e.key,n=e.displayValue;return i.includes(null!==n&&void 0!==n?n:t)}));if(!a.length&&this.selectedValue&&(null===(t=null===(e=this.params)||void 0===e?void 0:e.forceLastSelection)||void 0===t?void 0:t.call(e,this.selectedValue,this.searchString))&&(a=[this.se
11lectedValue]),this.autocompleteEntries=a,this.virtualList.refresh(),n){var l=i.indexOf(n);this.checkSetSelectedValue(l)}},t.prototype.updateSearchInList=function(){var e=this;this.virtualList.forEachRenderedRow((function(t){return t.setSearchString(e.searchString)}))},t.prototype.checkSetSelectedValue=function(e){e>=0&&e<this.autocompleteEntries.length&&this.setSelectedValue(e)},t.prototype.setSelectedValue=function(e){var t=this.autocompleteEntries[e];this.selectedValue!==t&&(this.selectedValue=t,this.virtualList.ensureIndexVisible(e),this.virtualList.forEachRenderedRow((function(t,i){t.updateSelected(e===i)})))},t.prototype.createRowComponent=function(e){var t,i=new mg;return this.getContext().createBean(i),i.setState(null!==(t=e.displayValue)&&void 0!==t?t:e.key,e===this.selectedValue),i},t.prototype.onMouseMove=function(e){var t=this.virtualList.getGui().getBoundingClientRect(),i=this.virtualList.getScrollTop(),n=e.clientY-t.top+i,o=Math.floor(n/this.virtualList.getRowHeight());this.checkSetSelectedValue(o)},t.prototype.afterGuiAttached=function(){this.virtualList.refresh()},t.prototype.getSelectedValue=function(){var e;return this.autocompleteEntries.length&&null!==(e=this.selectedValue)&&void 0!==e?e:null},t.TEMPLATE='<div class="ag-autocomplete-list-popup">\n            <div ref="eList" class="ag-autocomplete-list"></div>\n        <div>',bg([sr("eList")],t.prototype,"eList",void 0),bg([le],t.prototype,"init",null),t}(Qs),Sg=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Eg=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},xg=function(e){function t(){var t=e.call(this,'\n            <div class="ag-autocomplete" role="presentation">\n                <ag-input-text-field ref="eAutocompleteInput"></ag-input-text-field>\n            </div>')||this;return t.isListOpen=!1,t.lastPosition=0,t.valid=!0,t}return Sg(t,e),t.prototype.postConstruct=function(){var e=this;this.eAutocompleteInput.onValueChange((function(t){return e.onValueChanged(t)})),this.eAutocompleteInput.getInputElement().setAttribute("autocomplete","off"),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.addGuiEventListener("click",this.updatePositionAndList.bind(this)),this.addDestroyFunc((function(){e.destroyBean(e.autocompleteList)})),this.addGuiEventListener("focusout",(function(){return e.onFocusOut()}))},t.prototype.onValueChanged=function(e){var t=n(e);this.updateValue(t),this.updateAutocompleteList(t)},t.prototype.updateValue=function(e){this.updateLastPosition(),this.dispatchEvent({type:t.EVENT_VALUE_CHANGED,value:e}),this.validate(e)},t.prototype.updateAutocompleteList=function(e){var t,i,n,o,r=null!==(i=null===(t=this.listGenerator)||void 0===t?void 0:t.call(this,e,this.lastPosition))&&void 0!==i?i:{enabled:!1};if(r.type&&r.type===(null===(n=this.autocompleteListParams)||void 0===n?void 0:n.type)||this.isListOpen&&this.closeList(),this.autocompleteListParams=r,null===(o=this.autocompleteListParams)||void 0===o?void 0:o.enabled){this.isListOpen||this.openList();var s=this.autocompleteListParams.searchString;this.autocompleteList.setSearch(null!==s&&void 0!==s?s:"")}else this.isListOpen&&this.closeList()},t.prototype.onKeyDown=function(e){var t=this,i=e.key;switch(this.updateLastPosition(),i){case xo.ENTER:this.onEnterKeyDown(e);break;case xo.TAB:this.onTabKeyDown(e);break;case xo.DOWN:case xo.UP:this.onUpDownKeyDown(e,i);break;case xo.LEFT:case xo.RIGHT:case xo.PAGE_HOME:case xo.PAGE_END:setTimeout((function(){t.updatePositionAndList()}));break;case xo.ESCAPE:this.onEscapeKeyDown(e);break;case xo.SPACE:e.ctrlKey&&!this.isListOpen&&(e.preventDefault(),this.forceOpenList());break}},t.prototype.confirmSelection=function(){var e,i=null===(e=this.autocompleteList)||void 0===e?void 0:e.getSelectedValue();i&&(this.closeList(),this.dispatchEvent({type:t.EVENT_OPTION_SELECTED,value:this.getValue(),position:this.lastPosition,updateEntry:i,autocompleteType:this.autocompleteListParams.type}))},t.prototype.onTabKeyDown=function(e){this.isListOpen&&(e.preventDefault(),e.stopPropagation(),this.confirmSelection())}
11,t.prototype.onEnterKeyDown=function(e){e.preventDefault(),this.isListOpen?this.confirmSelection():this.onCompleted()},t.prototype.onUpDownKeyDown=function(e,t){var i;e.preventDefault(),this.isListOpen?null===(i=this.autocompleteList)||void 0===i||i.onNavigationKeyDown(e,t):this.forceOpenList()},t.prototype.onEscapeKeyDown=function(e){this.isListOpen&&(e.preventDefault(),e.stopPropagation(),this.closeList(),this.setCaret(this.lastPosition,!0))},t.prototype.onFocusOut=function(){this.isListOpen&&this.closeList()},t.prototype.updatePositionAndList=function(){var e;this.updateLastPosition(),this.updateAutocompleteList(null!==(e=this.eAutocompleteInput.getValue())&&void 0!==e?e:null)},t.prototype.setCaret=function(e,t){var i=this.gridOptionsService.getDocument();t&&i.activeElement===i.body&&this.eAutocompleteInput.getFocusableElement().focus();var n=this.eAutocompleteInput.getInputElement();n.setSelectionRange(e,e),e===n.value.length&&(n.scrollLeft=n.scrollWidth)},t.prototype.forceOpenList=function(){this.onValueChanged(this.eAutocompleteInput.getValue())},t.prototype.updateLastPosition=function(){var e;this.lastPosition=null!==(e=this.eAutocompleteInput.getInputElement().selectionStart)&&void 0!==e?e:0},t.prototype.validate=function(e){var i;this.validator&&(this.validationMessage=this.validator(e),this.eAutocompleteInput.getInputElement().setCustomValidity(null!==(i=this.validationMessage)&&void 0!==i?i:""),this.valid=!this.validationMessage,this.dispatchEvent({type:t.EVENT_VALID_CHANGED,isValid:this.valid,validationMessage:this.validationMessage}))},t.prototype.openList=function(){var e=this;this.isListOpen=!0,this.autocompleteList=this.createBean(new wg({autocompleteEntries:this.autocompleteListParams.entries,onConfirmed:function(){return e.confirmSelection()},forceLastSelection:this.forceLastSelection}));var t=this.autocompleteList.getGui(),i={ePopup:t,type:"autocomplete",eventSource:this.getGui(),position:"under",alignSide:this.gridOptionsService.get("enableRtl")?"right":"left",keepWithinBounds:!0},n=this.popupService.addPopup({eChild:t,anchorToElement:this.getGui(),positionCallback:function(){return e.popupService.positionPopupByComponent(i)},ariaLabel:this.listAriaLabel});this.hidePopup=n.hideFunc,this.autocompleteList.afterGuiAttached()},t.prototype.closeList=function(){this.isListOpen=!1,this.hidePopup(),this.destroyBean(this.autocompleteList),this.autocompleteList=null},t.prototype.onCompleted=function(){this.isListOpen&&this.closeList(),this.dispatchEvent({type:t.EVENT_VALUE_CONFIRMED,value:this.getValue(),isValid:this.isValid()})},t.prototype.getValue=function(){return n(this.eAutocompleteInput.getValue())},t.prototype.setInputPlaceholder=function(e){return this.eAutocompleteInput.setInputPlaceholder(e),this},t.prototype.setInputAriaLabel=function(e){return this.eAutocompleteInput.setInputAriaLabel(e),this},t.prototype.setListAriaLabel=function(e){return this.listAriaLabel=e,this},t.prototype.setListGenerator=function(e){return this.listGenerator=e,this},t.prototype.setValidator=function(e){return this.validator=e,this},t.prototype.isValid=function(){return this.valid},t.prototype.setValue=function(e){var t=e.value,i=e.position,n=e.silent,o=e.updateListOnlyIfOpen,r=e.restoreFocus;this.eAutocompleteInput.setValue(t,!0),this.setCaret(null!==i&&void 0!==i?i:this.lastPosition,r),n||this.updateValue(t),o&&!this.isListOpen||this.updateAutocompleteList(t)},t.prototype.setForceLastSelection=function(e){return this.forceLastSelection=e,this},t.prototype.setInputDisabled=function(e){return this.eAutocompleteInput.setDisabled(e),this},t.EVENT_VALUE_CHANGED="eventValueChanged",t.EVENT_VALUE_CONFIRMED="eventValueConfirmed",t.EVENT_OPTION_SELECTED="eventOptionSelected",t.EVENT_VALID_CHANGED="eventValidChanged",Eg([de("popupService")],t.prototype,"popupService",void 0),Eg([sr("eAutocompleteInput")],t.prototype,"eAutocompleteInput",void 0),Eg([le],t.prototype,"postConstruct",null),t}(rr),Og=["mouseover","mouseout","mouseenter","mouseleave","mousemove"],Tg=["touchstart","touchend","touchmove","touchcancel"],Dg=function(){function e(e){void 0===e&&(e="javascript"),this.frameworkName=e,this.renderingEngine="vanilla",this.isOutsideAngular=function(e){return je(Og,e)}}return e.prototype.setTimeout=function(e,t){window.setTimeout(e,t)},e.prototype.setInterval=function(e,t){return new $o((function(i){i(window.setInterval(e,t))}))},e.prototype.addEventListener=function(e,t,i,n){var o=je(Tg,t);e.addEventListener(t,i,{capture:!!n,passive:o})},e.prototype.dispatchEvent=function(e,t,i){t()},e.prototype.frameworkComponent=function(e){return null},e.prototype.isFrameworkComponent=function(e){return!1},e.prototype.getDocLink=function(e){var t="solid"===this.frameworkName?"react":this.frameworkName;return"https://www.ag-grid.com/".concat(t,"-data-grid").concat(e?"/".concat(e):"")},e}(),Rg=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ag=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},_g=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},Pg=function(e,t,i){if(i||2===arguments.length)for(var n,o=0,r=t.length;o<r;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},Mg=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Rg(t,e),t.prototype.getNextCellToFocus=function(e,t,i){return void 0===i&&(i=!1),i?this.getNextCellToFocusWithCtrlPressed(e,t):this.getNextCellToFocusWithoutCtrlPressed(e,t)},t.prototype.getNextCellToFocusWithCtrlPressed=function(e,t){var i,n,o=e===xo.UP,r=e===xo.DOWN,s=e===xo.LEFT;if(o||r)n=o?this.paginationProxy.getPageFirstRow():this.paginationProxy.getPageLastRow(),i=t.column;else{var a=this.columnModel.getAllDisplayedColumns(),l=this.gridOptionsService.get("enableRtl");n=t.rowIndex,i=s!==l?a[0]:Ae(a)}return{rowIndex:n,rowPinned:null,column:i}},t.prototype.getNextCellToFocusWithoutCtrlPressed=function(e,t){var i=t,n=!1;while(!n){switch(e){case xo.UP:i=this.getCellAbove(i);break;case xo.DOWN:i=this.getCellBelow(i);break;case xo.RIGHT:i=this.gridOptionsService.get("enableRtl")?this.getCellToLeft(i):this.getCellToRight(i);break;case xo.LEFT:i=this.gridOptionsService.get("enableRtl")?this.getCellToRight(i):this.getCellToLeft(i);break;default:i=null,console.warn("AG Grid: unknown key for navigation "+e);break}n=!i||this.isCellGoodToFocusOn(i)}return i},t.prototype.isCellGoodToFocusOn=function(e){var t,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);break}if(!t)return!1;var n=i.isSuppressNavigable(t);return!n},t.prototype.getCellToLeft=function(e){if(!e)return null;var t=this.columnModel.getDisplayedColBefore(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null},t.prototype.getCellToRight=function(e){if(!e)return null;var t=this.columnModel.getDisplayedColAfter(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null},t.prototype.getRowBelow=function(e){var t=e.rowIndex,i=e.rowPinned;if(this.isLastRowInContainer(e))switch(i){case"bottom":return null;case"top":return this.rowModel.isRowsToRender()?{rowIndex:this.paginationProxy.getPageFirstRow(),rowPinned:null}:this.pinnedRowModel.isRowsToRender("bottom")?{rowIndex:0,rowPinned:"bottom"}:null;default:return this.pinnedRowModel.isRowsToRender("bottom")?{rowIndex:0,rowPinned:"bottom"}:null}var n=this.rowModel.getRow(e.rowIndex),o=this.getNextStickyPosition(n);return o||{rowIndex:t+1,rowPinned:i}},t.prototype.getNextStickyPosition=function(e,t){if(this.gridOptionsService.isGroupRowsSticky()&&e&&e.sticky){var i=Pg([],_g(this.rowRenderer.getStickyTopRowCtrls()),!1).sort((function(e,t){return e.getRowNode().rowIndex-t.getRowNode().rowIndex})),n=t?-1:1,o=i.findIndex((function(t){return t.getRowNode().rowIndex===e.rowIndex})),r=i[o+n];return r?{rowIndex:r.getRowNode().rowIndex,rowPinned:null}:void 0}},t.prototype.getCellBelow=function(e){if(!e)return null;var t=this.getRowBelow(e);return t?{rowIndex:t.rowIndex,column:e.column,rowPinned:t.rowPinned}:null},t.prototype.isLastRowInContainer=function(e){var t=e.rowPinned,i=e.rowIndex;if("top"===t){var n=this.pinnedRowModel.getPinnedTopRowData().length-1;return n<=i}if("bottom"===t){var o=this.pinnedRowModel.getPinnedBottomRowData().length-1;return o<=i}var r=this.paginationProxy.getPageLastRow();return r<=i},t.prototype.getRowAbove=function(e){var t=e.rowIndex,i=e.rowPinned,n=i?0===t:t===this.paginationProxy.getPageFirstRow();if(n)return"top"===i?null:i&&this.rowModel.isRowsToRender()?this.getLastBodyCell():this.pinnedRowModel.isRowsToRender("top")?this.getLastFloatingTopRow():null;var o=this.rowModel.getRow(e.rowIndex),r=this.getNextStickyPosition(o,!0);return r||{rowIndex:t-1,rowPinned:i}},t.prototype.getCellAbove=function(e){if(!e)return null;var t=this.getRowAbove({rowIndex:e.rowIndex,rowPinned:e.rowPinned});return t?{rowIndex:t.rowIndex,column:e.column,rowPinned:t.rowPinned}:null},t.prototype.getLastBodyCell=function(){var e=this.paginationProxy.getPageLastRow();return{rowIndex:e,rowPinned:null}},t.prototype.getLastFloatingTopRow=function(){var e=this.pinnedRowModel.getPinnedTopRowData().length-1;return{rowIndex:e,rowPinned:"top"}},t.prototype.getNextTabbedCell=function(e,t){return t?this.getNextTabbedCellBackwards(e):this.getNextTabbedCellForwards(e)},t.prototype.getNextTabbedCellForwards=function(e){var t=this.columnModel.getAllDisplayedColumns(),i=e.rowIndex,n=e.rowPinned,o=this.columnModel.getDisplayedColAfter(e.column);if(!o){o=t[0];var s=this.getRowBelow(e);if(r(s))return null;if(!s.rowPinned&&!this.paginationProxy.isRowInPage(s))return null;i=s?s.rowIndex:null,n=s?s.rowPinned:null}return{rowIndex:i,column:o,rowPinned:n}},t.prototype.getNextTabbedCellBackwards=function(e){var t=this.columnModel.getAllDisplayedColumns(),i=e.rowIndex,n=e.rowPinned,o=this.columnModel.getDisplayedColBefore(e.column);if(!o){o=Ae(t);var s=this.getRowAbove({rowIndex:e.rowIndex,rowPinned:e.rowPinned});if(r(s))return null;if(!s.rowPinned&&!this.paginationProxy.isRowInPage(s))return null;i=s?s.rowIndex:null,n=s?s.rowPinned:null}return{rowIndex:i,column:o,rowPinned:n}},Ag([de("columnModel")],t.prototype,"columnModel",void 0),Ag([de("rowModel")],t.prototype,"rowModel",void 0),Ag([de("rowRenderer")],t.prototype,"rowRenderer",void 0),Ag([de("pinnedRowModel")],t.prototype,"pinnedRowModel",void 0),Ag([de("paginationProxy")],t.prototype,"paginationProxy",void 0),t=Ag([ue("cellNavigationService")],t),t}(st),kg=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ng=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Lg=function(e,t){return function(i,n){t(i,n,e)}},Ig=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.consuming=!1,t}return kg(t,e),t.prototype.setBeans=function(e){this.logger=e.create("AlignedGridsService")},t.prototype.getAlignedGridApis=function(){var e,t=this,i=null!==(e=this.gridOptionsService.get("alignedGrids"))&&void 0!==e?e:[],n="function"===typeof i;"function"===typeof i&&(i=i());var o=function(){return"See ".concat(t.getFrameworkOverrides().getDocLink("aligned-grids"))},r=i.map((function(e){var t;
11if(!e)return V("alignedGrids contains an undefined option."),n||V('You may want to configure via a callback to avoid setup race conditions:\n                     "alignedGrids: () => [linkedGrid]"'),void V(o());if(e instanceof tc)return e;var i=e;return"current"in i?null===(t=i.current)||void 0===t?void 0:t.api:(i.api||V("alignedGrids - No api found on the linked grid. If you are passing gridOptions to alignedGrids since v31 this is no longer valid. ".concat(o())),i.api)})).filter((function(e){return!!e&&!e.isDestroyed()}));return r},t.prototype.init=function(){this.addManagedListener(this.eventService,ht.EVENT_COLUMN_MOVED,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,ht.EVENT_COLUMN_VISIBLE,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,ht.EVENT_COLUMN_PINNED,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,ht.EVENT_COLUMN_GROUP_OPENED,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,ht.EVENT_COLUMN_RESIZED,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,ht.EVENT_BODY_SCROLL,this.fireScrollEvent.bind(this))},t.prototype.fireEvent=function(e){this.consuming||this.getAlignedGridApis().forEach((function(t){var i=t.__getAlignedGridService();e(i)}))},t.prototype.onEvent=function(e){this.consuming=!0,e(),this.consuming=!1},t.prototype.fireColumnEvent=function(e){this.fireEvent((function(t){t.onColumnEvent(e)}))},t.prototype.fireScrollEvent=function(e){"horizontal"===e.direction&&this.fireEvent((function(t){t.onScrollEvent(e)}))},t.prototype.onScrollEvent=function(e){var t=this;this.onEvent((function(){var i=t.ctrlsService.getGridBodyCtrl();i.getScrollFeature().setHorizontalScrollPosition(e.left,!0)}))},t.prototype.getMasterColumns=function(e){var t=[];return e.columns?e.columns.forEach((function(e){t.push(e)})):e.column&&t.push(e.column),t},t.prototype.getColumnIds=function(e){var t=[];return e.columns?e.columns.forEach((function(e){t.push(e.getColId())})):e.column&&t.push(e.column.getColId()),t},t.prototype.onColumnEvent=function(e){var t=this;this.onEvent((function(){switch(e.type){case ht.EVENT_COLUMN_MOVED:case ht.EVENT_COLUMN_VISIBLE:case ht.EVENT_COLUMN_PINNED:case ht.EVENT_COLUMN_RESIZED:var i=e;t.processColumnEvent(i);break;case ht.EVENT_COLUMN_GROUP_OPENED:var n=e;t.processGroupOpenedEvent(n);break;case ht.EVENT_COLUMN_PIVOT_CHANGED:console.warn("AG Grid: pivoting is not supported with aligned grids. You can only use one of these features at a time in a grid.");break}}))},t.prototype.processGroupOpenedEvent=function(e){var t=this;e.columnGroups.forEach((function(i){var n=null;if(i){var o=i.getGroupId();n=t.columnModel.getProvidedColumnGroup(o)}i&&!n||(t.logger.log("onColumnEvent-> processing "+e+" expanded = "+i.isExpanded()),t.columnModel.setColumnGroupOpened(n,i.isExpanded(),"alignedGridChanged"))}))},t.prototype.processColumnEvent=function(e){var t,i=this,n=e.column,o=null;if(n&&(o=this.columnModel.getPrimaryColumn(n.getColId())),!n||o){var r=this.getMasterColumns(e);switch(e.type){case ht.EVENT_COLUMN_MOVED:var s=e,a=e.api.getColumnState(),l=a.map((function(e){return{colId:e.colId}}));this.columnModel.applyColumnState({state:l,applyOrder:!0},"alignedGridChanged"),this.logger.log("onColumnEvent-> processing ".concat(e.type," toIndex = ").concat(s.toIndex));break;case ht.EVENT_COLUMN_VISIBLE:var c=e;a=e.api.getColumnState(),l=a.map((function(e){return{colId:e.colId,hide:e.hide}}));this.columnModel.applyColumnState({state:l},"alignedGridChanged"),this.logger.log("onColumnEvent-> processing ".concat(e.type," visible = ").concat(c.visible));break;case ht.EVENT_COLUMN_PINNED:var u=e;a=e.api.getColumnState(),l=a.map((function(e){return{colId:e.colId,pinned:e.pinned}}));this.columnModel.applyColumnState({state:l},"alignedGridChanged"),this.logger.log("onColumnEvent-> processing ".concat(e.type," pinned = ").concat(u.pinned));break;case ht.EVENT_COLUMN_RESIZED:var d=e,p={};r.forEach((function(t){i.logger.log("onColumnEvent-> processing ".concat(e.type," actualWidth = ").concat(t.getActualWidth())),p[t.getId()]={key:t.getColId(),newWidth:t.getActualWidth()}})),null===(t=d.flexColumns)||void 0===t||t.forEach((function(e){p[e.getId()]&&delete p[e.getId()]})),this.columnModel.setColumnWidths(Object.values(p),!1,d.finished,"alignedGridChanged");break}var h=this.ctrlsService.getGridBodyCtrl(),f=h.isVerticalScrollShowing();
11this.getAlignedGridApis().forEach((function(e){e.setGridOption("alwaysShowVerticalScroll",f)}))}},Ng([de("columnModel")],t.prototype,"columnModel",void 0),Ng([de("ctrlsService")],t.prototype,"ctrlsService",void 0),Ng([Lg(0,fe("loggerFactory"))],t.prototype,"setBeans",null),Ng([le],t.prototype,"init",null),t=Ng([ue("alignedGridsService")],t),t}(st),Fg=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Gg=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Vg=function(e,t){return function(i,n){t(i,n,e)}},Bg=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.selectedNodes=new Map,t}return Fg(t,e),t.prototype.setBeans=function(e){this.logger=e.create("selectionService"),this.resetNodes()},t.prototype.init=function(){var e=this;this.rowSelection=this.gridOptionsService.get("rowSelection"),this.groupSelectsChildren=this.gridOptionsService.get("groupSelectsChildren"),this.addManagedPropertyListeners(["groupSelectsChildren","rowSelection"],(function(){e.groupSelectsChildren=e.gridOptionsService.get("groupSelectsChildren"),e.rowSelection=e.gridOptionsService.get("rowSelection"),e.deselectAllRowNodes({source:"api"})})),this.addManagedListener(this.eventService,ht.EVENT_ROW_SELECTED,this.onRowSelected.bind(this))},t.prototype.isMultiselect=function(){return"multiple"===this.rowSelection},t.prototype.setNodesSelected=function(e){var t;if(0===e.nodes.length)return 0;var i=e.newValue,n=e.clearSelection,o=e.suppressFinishActions,r=e.rangeSelect;e.event;var s=e.source,a=void 0===s?"api":s;if(e.nodes.length>1&&!this.isMultiselect())return console.warn("AG Grid: cannot multi select while rowSelection='single'"),0;var l=this.groupSelectsChildren&&!0===e.groupSelectsFiltered,c=e.nodes.map((function(e){return e.footer?e.sibling:e}));if(r){if(e.nodes.length>1)return console.warn("AG Grid: cannot range select while selecting multiple rows"),0;var u=this.getLastSelectedNode();if(u){var d=c[0],p=u!==d;if(p&&this.isMultiselect())return this.selectRange(d,u,e.newValue,a)}}for(var h=0,f=0;f<c.length;f++){d=c[f];var g=l&&d.group;if(!g){var v=d.selectThisNode(i,e.event,a);v&&h++}this.groupSelectsChildren&&(null===(t=d.childrenAfterGroup)||void 0===t?void 0:t.length)&&(h+=this.selectChildren(d,i,l,a))}if(!o){var y=i&&(n||!this.isMultiselect());if(y&&(h+=this.clearOtherNodes(c[0],a)),h>0){this.updateGroupsFromChildrenSelections(a);var m={type:ht.EVENT_SELECTION_CHANGED,source:a};this.eventService.dispatchEvent(m)}}return h},t.prototype.selectRange=function(e,t,i,n){var o=this;void 0===i&&(i=!0);var r=this.rowModel.getNodesInRangeForSelection(e,t),s=0;r.forEach((function(t){if(!(t.group&&o.groupSelectsChildren||!1===i&&e===t)){var r=t.selectThisNode(i,void 0,n);r&&s++}})),this.updateGroupsFromChildrenSelections(n);var a={type:ht.EVENT_SELECTION_CHANGED,source:n};return this.eventService.dispatchEvent(a),s},t.prototype.selectChildren=function(e,t,i,n){var o=i?e.childrenAfterAggFilter:e.childrenAfterGroup;return r(o)?0:this.setNodesSelected({newValue:t,clearSelection:!1,suppressFinishActions:!0,groupSelectsFiltered:i,source:n,nodes:o})},t.prototype.getLastSelectedNode=function(){var e=Array.from(this.selectedNodes.keys());if(0==e.length)return null;var t=this.selectedNodes.get(Ae(e));return t||null},t.prototype.getSelectedNodes=function(){var e=[];return this.selectedNodes.forEach((function(t){t&&e.push(t)})),e},t.prototype.getSelectedRows=function(){var e=[];
11return this.selectedNodes.forEach((function(t){t&&t.data&&e.push(t.data)})),e},t.prototype.getSelectionCount=function(){return this.selectedNodes.size},t.prototype.filterFromSelection=function(e){var t=new Map;this.selectedNodes.forEach((function(i,n){var o=i&&e(i);o&&t.set(n,i)})),this.selectedNodes=t},t.prototype.updateGroupsFromChildrenSelections=function(e,t){if(!this.groupSelectsChildren)return!1;if("clientSide"!==this.rowModel.getType())return!1;var i=this.rowModel,n=i.getRootNode();t||(t=new Qh(!0,n),t.setInactive());var o=!1;return t.forEachChangedNodeDepthFirst((function(t){if(t!==n){var i=t.calculateSelectedFromChildren();o=t.selectThisNode(null!==i&&i,void 0,e)||o}})),o},t.prototype.clearOtherNodes=function(e,t){var i=this,n=new Map,o=0;return this.selectedNodes.forEach((function(r){if(r&&r.id!==e.id){var s=i.selectedNodes.get(r.id);o+=s.setSelectedParams({newValue:!1,clearSelection:!1,suppressFinishActions:!0,source:t}),i.groupSelectsChildren&&r.parent&&n.set(r.parent.id,r.parent)}})),n.forEach((function(e){var i=e.calculateSelectedFromChildren();e.selectThisNode(null!==i&&i,void 0,t)})),o},t.prototype.onRowSelected=function(e){var t=e.node;this.groupSelectsChildren&&t.group||(t.isSelected()?this.selectedNodes.set(t.id,t):this.selectedNodes.delete(t.id))},t.prototype.syncInRowNode=function(e,t){this.syncInOldRowNode(e,t),this.syncInNewRowNode(e)},t.prototype.syncInOldRowNode=function(e,t){var i=o(t)&&e.id!==t.id;if(i&&t){var n=t.id,r=this.selectedNodes.get(n)==e;r&&this.selectedNodes.set(t.id,t)}},t.prototype.syncInNewRowNode=function(e){this.selectedNodes.has(e.id)?(e.setSelectedInitialValue(!0),this.selectedNodes.set(e.id,e)):e.setSelectedInitialValue(!1)},t.prototype.reset=function(e){var t=this.getSelectionCount();if(this.resetNodes(),t){var i={type:ht.EVENT_SELECTION_CHANGED,source:e};this.eventService.dispatchEvent(i)}},t.prototype.resetNodes=function(){var e;this.logger.log("reset"),null===(e=this.selectedNodes)||void 0===e||e.clear()},t.prototype.getBestCostNodeSelection=function(){if("clientSide"===this.rowModel.getType()){var e=this.rowModel,t=e.getTopLevelNodes();if(null!==t){var i=[];return n(t),i}}function n(e){for(var t=0,o=e.length;t<o;t++){var r=e[t];if(r.isSelected())i.push(r);else{var s=r;s.group&&s.children&&n(s.children)}}}},t.prototype.isEmpty=function(){var e=0;return this.selectedNodes.forEach((function(t){t&&e++})),0===e},t.prototype.deselectAllRowNodes=function(e){var t=function(e){return e.selectThisNode(!1,void 0,n)},i="clientSide"===this.rowModel.getType(),n=e.source,o=e.justFiltered,r=e.justCurrentPage;if(r||o){if(!i)return void console.error("AG Grid: selecting just filtered only works when gridOptions.rowModelType='clientSide'");this.getNodesToSelect(o,r).forEach(t)}else this.selectedNodes.forEach((function(e){e&&t(e)})),this.reset(n);i&&this.groupSelectsChildren&&this.updateGroupsFromChildrenSelections(n);var s={type:ht.EVENT_SELECTION_CHANGED,source:n};this.eventService.dispatchEvent(s)},t.prototype.getSelectedCounts=function(e,t){var i=this,n=0,o=0,r=function(e){i.groupSelectsChildren&&e.group||(e.isSelected()?n++:e.selectable&&o++)};return this.getNodesToSelect(e,t).forEach(r),{selectedCount:n,notSelectedCount:o}},t.prototype.getSelectAllState=function(e,t){var i=this.getSelectedCounts(e,t),n=i.selectedCount,o=i.notSelectedCount;return(0!==n||0!==o)&&(n>0&&o>0?null:n>0)},t.prototype.getNodesToSelect=function(e,t){var i=this;if(void 0===e&&(e=!1),void 0===t&&(t=!1),"clientSide"!==this.rowModel.getType())throw new Error("selectAll only available when rowModelType='clientSide', ie not ".concat(this.rowModel.getType()));var n=[];if(t)return this.paginationProxy.forEachNodeOnPage((function(e){if(e.group)if(e.expanded)i.groupSelectsChildren||n.push(e);else{var t=function(e){var i;n.push(e),(null===(i=e.childrenAfterFilter)||void 0===i?void 0:i.length)&&e.childrenAfterFilter.forEach(t)};t(e)}else n.push(e)})),n;var o=this.rowModel;return e?(o.forEachNodeAfterFilter((function(e){n.push(e)})),n):(o.forEachNode((function(e){n.push(e)})),n)},t.prototype.selectAllRowNodes=function(e){if("clientSide"!==this.rowModel.getType())throw new Error("selectAll only available when rowModelType='clientSide', ie not ".concat(this.rowModel.getType()));var t=e.source,i=e.justFiltered,n=e.justCurrentPage,o=function(e){return e.selectThisNode(!0,void 0,t)};
11this.getNodesToSelect(i,n).forEach(o),"clientSide"===this.rowModel.getType()&&this.groupSelectsChildren&&this.updateGroupsFromChildrenSelections(t);var r={type:ht.EVENT_SELECTION_CHANGED,source:t};this.eventService.dispatchEvent(r)},t.prototype.getSelectionState=function(){var e=[];return this.selectedNodes.forEach((function(t){(null===t||void 0===t?void 0:t.id)&&e.push(t.id)})),e.length?e:null},t.prototype.setSelectionState=function(e,t){if(Array.isArray(e)){var i=new Set(e),n=[];this.rowModel.forEachNode((function(e){i.has(e.id)&&n.push(e)})),this.setNodesSelected({newValue:!0,nodes:n,source:t})}},Gg([de("rowModel")],t.prototype,"rowModel",void 0),Gg([de("paginationProxy")],t.prototype,"paginationProxy",void 0),Gg([Vg(0,fe("loggerFactory"))],t.prototype,"setBeans",null),Gg([le],t.prototype,"init",null),t=Gg([ue("selectionService")],t),t}(st),jg=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Hg=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},Wg=function(e,t,i){if(i||2===arguments.length)for(var n,o=0,r=t.length;o<r;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},Ug=function(){function e(e){var t=this;this.viaApi=function(e){for(var i,n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];return G("Since v31, 'columnApi.".concat(e,"' is deprecated and moved to 'api.").concat(e,"'.")),(i=t.api)[e].apply(i,Wg([],Hg(n),!1))},this.api=e}return e.prototype.sizeColumnsToFit=function(e){this.viaApi("sizeColumnsToFit",e)},e.prototype.setColumnGroupOpened=function(e,t){this.viaApi("setColumnGroupOpened",e,t)},e.prototype.getColumnGroup=function(e,t){return this.viaApi("getColumnGroup",e,t)},e.prototype.getProvidedColumnGroup=function(e){return this.viaApi("getProvidedColumnGroup",e)},e.prototype.getDisplayNameForColumn=function(e,t){return this.viaApi("getDisplayNameForColumn",e,t)},e.prototype.getDisplayNameForColumnGroup=function(e,t){return this.viaApi("getDisplayNameForColumnGroup",e,t)},e.prototype.getColumn=function(e){return this.viaApi("getColumn",e)},e.prototype.getColumns=function(){return this.viaApi("getColumns")},e.prototype.applyColumnState=function(e){return this.viaApi("applyColumnState",e)},e.prototype.getColumnState=function(){return this.viaApi("getColumnState")},e.prototype.resetColumnState=function(){this.viaApi("resetColumnState")},e.prototype.getColumnGroupState=function(){return this.viaApi("getColumnGroupState")},e.prototype.setColumnGroupState=function(e){this.viaApi("setColumnGroupState",e)},e.prototype.resetColumnGroupState=function(){this.viaApi("resetColumnGroupState")},e.prototype.isPinning=function(){return this.viaApi("isPinning")},e.prototype.isPinningLeft=function(){return this.viaApi("isPinningLeft")},e.prototype.isPinningRight=function(){return this.viaApi("isPinningRight")},e.prototype.getDisplayedColAfter=function(e){return this.viaApi("getDisplayedColAfter",e)},e.prototype.getDisplayedColBefore=function(e){return this.viaApi("getDisplayedColBefore",e)},e.prototype.setColumnVisible=function(e,t){this.viaApi("setColumnVisible",e,t)},e.prototype.setColumnsVisible=function(e,t){this.viaApi("setColumnsVisible",e,t)},e.prototype.setColumnPinned=function(e,t){this.viaApi("setColumnPinned",e,t)},e.prototype.setColumnsPinned=function(e,t){this.viaApi("setColumnsPinned",e,t)},e.prototype.getAllGridColumns=function(){return this.viaApi("getAllGridColumns")},e.prototype.getDisplayedLeftColumns=function(){return this.viaApi("getDisplayedLeftColumns")},e.prototype.getDisplayedCenterColumns=function(){return this.viaApi("getDisplayedCenterColumns")},e.prototype.getDisplayedRightColumns=function(){return this.viaApi("getDisplayedRightColumns")},e.prototype.getAllDisplayedColumns=function(){return this.viaApi("getAllDisplayedColumns")},e.prototype.getAllDisplayedVirtualColumns=function(){return this.viaApi("getAllDisplayedVirtualColumns")},e.prototype.moveColumn=function(e,t){this.viaApi("moveColumn",e,t)},e.prototype.moveColumnByIndex=function(e,t){this.viaApi("moveColumnByIndex",e,t)},e.prototype.moveColumns=function(e,t){this.viaApi("moveColumns",e,t)},e.prototype.moveRowGroupColumn=function(e,t){this.viaApi("moveRowGroupColumn",e,t)}
11,e.prototype.setColumnAggFunc=function(e,t){this.viaApi("setColumnAggFunc",e,t)},e.prototype.setColumnWidth=function(e,t,i,n){void 0===i&&(i=!0),this.viaApi("setColumnWidth",e,t,i,n)},e.prototype.setColumnWidths=function(e,t,i){void 0===t&&(t=!0),this.viaApi("setColumnWidths",e,t,i)},e.prototype.setPivotMode=function(e){this.viaApi("setPivotMode",e)},e.prototype.isPivotMode=function(){return this.viaApi("isPivotMode")},e.prototype.getPivotResultColumn=function(e,t){return this.viaApi("getPivotResultColumn",e,t)},e.prototype.setValueColumns=function(e){this.viaApi("setValueColumns",e)},e.prototype.getValueColumns=function(){return this.viaApi("getValueColumns")},e.prototype.removeValueColumn=function(e){this.viaApi("removeValueColumn",e)},e.prototype.removeValueColumns=function(e){this.viaApi("removeValueColumns",e)},e.prototype.addValueColumn=function(e){this.viaApi("addValueColumn",e)},e.prototype.addValueColumns=function(e){this.viaApi("addValueColumns",e)},e.prototype.setRowGroupColumns=function(e){this.viaApi("setRowGroupColumns",e)},e.prototype.removeRowGroupColumn=function(e){this.viaApi("removeRowGroupColumn",e)},e.prototype.removeRowGroupColumns=function(e){this.viaApi("removeRowGroupColumns",e)},e.prototype.addRowGroupColumn=function(e){this.viaApi("addRowGroupColumn",e)},e.prototype.addRowGroupColumns=function(e){this.viaApi("addRowGroupColumns",e)},e.prototype.getRowGroupColumns=function(){return this.viaApi("getRowGroupColumns")},e.prototype.setPivotColumns=function(e){this.viaApi("setPivotColumns",e)},e.prototype.removePivotColumn=function(e){this.viaApi("removePivotColumn",e)},e.prototype.removePivotColumns=function(e){this.viaApi("removePivotColumns",e)},e.prototype.addPivotColumn=function(e){this.viaApi("addPivotColumn",e)},e.prototype.addPivotColumns=function(e){this.viaApi("addPivotColumns",e)},e.prototype.getPivotColumns=function(){return this.viaApi("getPivotColumns")},e.prototype.getLeftDisplayedColumnGroups=function(){return this.viaApi("getLeftDisplayedColumnGroups")},e.prototype.getCenterDisplayedColumnGroups=function(){return this.viaApi("getCenterDisplayedColumnGroups")},e.prototype.getRightDisplayedColumnGroups=function(){return this.viaApi("getRightDisplayedColumnGroups")},e.prototype.getAllDisplayedColumnGroups=function(){return this.viaApi("getAllDisplayedColumnGroups")},e.prototype.autoSizeColumn=function(e,t){return this.viaApi("autoSizeColumn",e,t)},e.prototype.autoSizeColumns=function(e,t){this.viaApi("autoSizeColumns",e,t)},e.prototype.autoSizeAllColumns=function(e){this.viaApi("autoSizeAllColumns",e)},e.prototype.setPivotResultColumns=function(e){this.viaApi("setPivotResultColumns",e)},e.prototype.getPivotResultColumns=function(){return this.viaApi("getPivotResultColumns")},jg([de("gridApi")],e.prototype,"api",void 0),e=jg([ue("columnApi")],e),e}(),zg=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Kg=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Yg=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.initialised=!1,t.isSsrm=!1,t}return zg(t,e),t.prototype.init=function(){var e=this;this.isSsrm=this.gridOptionsService.isRowModelType("serverSide"),this.cellExpressions=this.gridOptionsService.get("enableCellExpressions"),this.isTreeData=this.gridOptionsService.get("treeData"),this.initialised=!0;var t=function(t){return e.callColumnCellValueChangedHandler(t)},i=this.gridOptionsService.useAsyncEvents();this.eventService.addEventListener(ht.EVENT_CELL_VALUE_CHANGED,t,i),this.addDestroyFunc((function(){return e.eventService.removeEventListener(ht.EVENT_CELL_VALUE_CHANGED,t,i)})),this.addManagedPropertyListener("treeData",(function(t){return e.isTreeData=t.currentValue}))},t.prototype.getValue=function(e,t,i,n){if(void 0===i&&(i=!1),void 0===n&&(n=!1),this.initialised||this.init(),t){var o,r=e.getColDef(),s=r.field,a=e.getColId(),l=t.data,c=t.groupData&&void 0!==t.groupData[a],u=!n&&t.aggData&&void 0!==t.aggData[a],d=this.isSsrm&&n&&!!e.getColDef().aggFunc,p=this.isSsrm&&t.footer&&t.field&&(!0===e.getColDef().showRowGroup||e.getColDef().showRowGroup===t.field);if(i&&r.filterValueGetter?o=this.executeFilterValueGetter(r.filterValueGetter,l,e,t):this.isTreeData&&u?o=t.aggData[a]:this.isTreeData&&r.valueGetter?o=this.execute
11ValueGetter(r.valueGetter,l,e,t):this.isTreeData&&s&&l?o=M(l,s,e.isFieldContainsDots()):c?o=t.groupData[a]:u?o=t.aggData[a]:r.valueGetter?o=this.executeValueGetter(r.valueGetter,l,e,t):p?o=M(l,t.field,e.isFieldContainsDots()):s&&l&&!d&&(o=M(l,s,e.isFieldContainsDots())),this.cellExpressions&&"string"===typeof o&&0===o.indexOf("=")){var h=o.substring(1);o=this.executeValueGetter(h,l,e,t)}if(null==o){var f=this.getOpenedGroup(t,e);if(null!=f)return f}return o}},t.prototype.getOpenedGroup=function(e,t){if(this.gridOptionsService.get("showOpenedGroup")){var i=t.getColDef();if(i.showRowGroup){var n=t.getColDef().showRowGroup,o=e.parent;while(null!=o){if(o.rowGroupColumn&&(!0===n||n===o.rowGroupColumn.getColId()))return o.key;o=o.parent}}}},t.prototype.setValue=function(e,t,i,n){var s=this.columnModel.getPrimaryColumn(t);if(!e||!s)return!1;r(e.data)&&(e.data={});var a=s.getColDef(),l=a.field,c=a.valueSetter;if(r(l)&&r(c))return console.warn("AG Grid: you need either field or valueSetter set on colDef for editing to work"),!1;if(!this.dataTypeService.checkType(s,i))return console.warn("AG Grid: Data type of the new value does not match the cell data type of the column"),!1;var u,d={node:e,data:e.data,oldValue:this.getValue(s,e),newValue:i,colDef:s.getColDef(),column:s,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context};if(d.newValue=i,u=o(c)?"function"===typeof c?c(d):this.expressionService.evaluate(c,d):this.setValueUsingField(e.data,l,i,s.isFieldContainsDots()),void 0===u&&(u=!0),!u)return!1;e.resetQuickFilterAggregateText(),this.valueCache.onDataChanged(),d.newValue=this.getValue(s,e);var p={type:ht.EVENT_CELL_VALUE_CHANGED,event:null,rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:d.column,api:d.api,columnApi:d.columnApi,colDef:d.colDef,context:d.context,data:e.data,node:e,oldValue:d.oldValue,newValue:d.newValue,value:d.newValue,source:n};return this.eventService.dispatchEvent(p),!0},t.prototype.callColumnCellValueChangedHandler=function(e){var t=e.colDef.onCellValueChanged;"function"===typeof t&&t({node:e.node,data:e.data,oldValue:e.oldValue,newValue:e.newValue,colDef:e.colDef,column:e.column,api:e.api,columnApi:e.columnApi,context:e.context})},t.prototype.setValueUsingField=function(e,t,i,n){if(!t)return!1;var o=!1;if(n){var r=t.split("."),s=e;while(r.length>0&&s){var a=r.shift();0===r.length?(o=s[a]===i,o||(s[a]=i)):s=s[a]}}else o=e[t]===i,o||(e[t]=i);return!o},t.prototype.executeFilterValueGetter=function(e,t,i,n){var o={data:t,node:n,column:i,colDef:i.getColDef(),api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context,getValue:this.getValueCallback.bind(this,n)};return"function"===typeof e?e(o):this.expressionService.evaluate(e,o)},t.prototype.executeValueGetter=function(e,t,i,n){var o=i.getColId(),r=this.valueCache.getValue(n,o);if(void 0!==r)return r;var s,a={data:t,node:n,column:i,colDef:i.getColDef(),api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context,getValue:this.getValueCallback.bind(this,n)};return s="function"===typeof e?e(a):this.expressionService.evaluate(e,a),this.valueCache.setValue(n,o,s),s},t.prototype.getValueCallback=function(e,t){var i=this.columnModel.getPrimaryColumn(t);return i?this.getValue(i,e):null},t.prototype.getKeyForNode=function(e,t){var i=this.getValue(e,t),n=e.getColDef().keyCreator,o=i;if(n){var r={value:i,colDef:e.getColDef(),column:e,node:t,data:t.data,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context};o=n(r)}return"string"===typeof o||null==o||(o=String(o),"[object Object]"===o&&G("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")),o},Kg([de("expressionService")],t.prototype,"expressionService",void 0),Kg([de("columnModel")],t.prototype,"columnModel",void 0),Kg([de("valueCache")],t.prototype,"valueCache",void 0),Kg([de("dataTypeService")],t.prototype,"dataTypeService",void 0),Kg([le],t.prototype,"init",null),t=Kg([ue("valueService")],t),t}(st),qg=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Xg=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},$g=function(e,t){return function(i,n){t(i,n,e)}},Zg=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.expressionToFunctionCache={},t}return qg(t,e),t.prototype.setBeans=function(e){this.logger=e.create("ExpressionService")},t.prototype.evaluate=function(e,t){if("string"===typeof e)return this.evaluateExpression(e,t);console.error("AG Grid: value should be either a string or a function",e)},t.prototype.evaluateExpression=function(e,t){try{var i=this.createExpressionFunction(e),n=i(t.value,t.context,t.oldValue,t.newValue,t.value,t.node,t.data,t.colDef,t.rowIndex,t.api,t.columnApi,t.getValue,t.column,t.columnGroup);return n}catch(o){return console.log("Processing of the expression failed"),console.log("Expression = "+e),console.log("Param
11s =",t),console.log("Exception = "+o),null}},t.prototype.createExpressionFunction=function(e){if(this.expressionToFunctionCache[e])return this.expressionToFunctionCache[e];var t=this.createFunctionBody(e),i=new Function("x, ctx, oldValue, newValue, value, node, data, colDef, rowIndex, api, columnApi, getValue, column, columnGroup",t);return this.expressionToFunctionCache[e]=i,i},t.prototype.createFunctionBody=function(e){return e.indexOf("return")>=0?e:"return "+e+";"},Xg([$g(0,fe("loggerFactory"))],t.prototype,"setBeans",null),t=Xg([ue("expressionService")],t),t}(st),Jg=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Qg=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},ev=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.templateCache={},t.waitingCallbacks={},t}return Jg(t,e),t.prototype.getTemplate=function(e,t){var i=this.templateCache[e];if(i)return i;var n=this.waitingCallbacks[e],o=this;if(!n){n=[],this.waitingCallbacks[e]=n;var r=new XMLHttpRequest;r.onload=function(){o.handleHttpResult(this,e)},r.open("GET",e),r.send()}return t&&n.push(t),null},t.prototype.handleHttpResult=function(e,t){if(200===e.status&&null!==e.response){this.templateCache[t]=e.response||e.responseText;for(var i=this.waitingCallbacks[t],n=0;n<i.length;n++){var o=i[n];o()}}else console.warn("AG Grid: Unable to get template error ".concat(e.status," - ").concat(t))},t=Qg([ue("templateService")],t),t}(st),tv=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),iv=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},nv=function(e,t){return function(i,n){t(i,n,e)}},ov=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return tv(t,e),t.prototype.setBeans=function(e){this.logging=e.get("debug")},t.prototype.create=function(e){return new rv(e,this.isLogging.bind(this))},t.prototype.isLogging=function(){return this.logging},iv([nv(0,fe("gridOptionsService"))],t.prototype,"setBeans",null),t=iv([ue("loggerFactory")],t),t}(st),rv=function(){function e(e,t){this.name=e,this.isLoggingFunc=t}return e.prototype.isLogging=function(){return this.isLoggingFunc()},e.prototype.log=function(e){this.isLoggingFunc()&&console.log("AG Grid."+this.name+": "+e)},e}(),sv=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),av=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},lv=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return sv(t,e),t.prototype.setComp=function(e,t,i){var n=this;this.view=e,this.eGridHostDiv=t,this.eGui=i,this.eGui.setAttribute("grid-id",this.context.getGridId()),this.dragAndDropService.addDropTarget({getContainer:function(){return n.eGui},isInterestedIn:function(e){return e===Ta.HeaderCell||e===Ta.ToolPanel},getIconName:function(){return Pa.ICON_NOT_ALLOWED}}),this.mouseEventService.stampTopLevelGridCompWithGridInstance(t),this.createManagedBean(new mc(this.view)),this.addRtlSupport();var o=this.resizeObserverService.observeResize(this.eGridHostDiv,this.onGridSizeChanged.bind(this));this.addDestroyFunc((function(){return o()})),this.ctrlsService.registerGridCtrl(this)},t.prototype.isDetailGrid=function(){var e,t=this.focusService.findTabbableParent(this.getGui());return(null===(e=null===t||void 0===t?void 0:t.getAttribute("row-id"))||void 0===e?void 0:e.startsWith("detail"))||!1},t.prototype.showDropZones=function(){return ne.__isRegistered(J.RowGroupingModule,this.context.getGridId())},t.prototype.showSideBar=function(){return ne.__isRegistered(J.SideBarModule,this.context.getGridId())},t.prototype.showStatusBar=function(){return ne.__isRegistered(J.StatusBarModule,this.context.getGridId())},t.prototype.showWatermark=function(){return ne.__isRegistered(J.EnterpriseCoreModule,this.context.getGridId())},t.prototype.onGridSizeChanged=function(){var e={type:ht.EVENT_GRID_SIZE_CHANGED,clientWidth:this.eGridHostDiv.clientWidth,clientHeight:this.eGridHostDiv.clientHeight};this.eventService.dispatchEvent(e)},t.prototype.addRtlSupport=function(){var e=this.gridOptionsService.get("enableRtl")?"ag-rtl":"ag-ltr";this.view.setRtlClass(e)},t.prototype.destroyGridUi=function(){this.view.destroyGridUi()},t.prototype.getGui=function(){return this.eGui},t.prototype.setResizeCursor=function(e){this.view.setCursor(e?"ew-resize":null)},t.prototype.disableUserSelect=function(e){this.view.setUserSelect(e?"none":null)}
11,t.prototype.focusNextInnerContainer=function(e){var t=this.gridOptionsService.getDocument(),i=this.view.getFocusableContainers(),n=i.findIndex((function(e){return e.contains(t.activeElement)})),o=n+(e?-1:1);return!(o<=0||o>=i.length)&&this.focusService.focusInto(i[o])},t.prototype.focusInnerElement=function(e){var t=this.view.getFocusableContainers(),i=this.columnModel.getAllDisplayedColumns();if(e){if(t.length>1)return this.focusService.focusInto(Ae(t),!0);var n=Ae(i);if(this.focusService.focusGridView(n,!0))return!0}return 0===this.gridOptionsService.get("headerHeight")?this.focusService.focusGridView(i[0]):this.focusService.focusFirstHeader()},t.prototype.forceFocusOutOfContainer=function(e){void 0===e&&(e=!1),this.view.forceFocusOutOfContainer(e)},av([de("focusService")],t.prototype,"focusService",void 0),av([de("resizeObserverService")],t.prototype,"resizeObserverService",void 0),av([de("columnModel")],t.prototype,"columnModel",void 0),av([de("ctrlsService")],t.prototype,"ctrlsService",void 0),av([de("mouseEventService")],t.prototype,"mouseEventService",void 0),av([de("dragAndDropService")],t.prototype,"dragAndDropService",void 0),t}(st),cv=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),uv=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},dv=function(e){function t(t){var i=e.call(this)||this;return i.eGridDiv=t,i}return cv(t,e),t.prototype.postConstruct=function(){var e=this;this.logger=this.loggerFactory.create("GridComp");var t={destroyGridUi:function(){return e.destroyBean(e)},setRtlClass:function(t){return e.addCssClass(t)},forceFocusOutOfContainer:this.forceFocusOutOfContainer.bind(this),updateLayoutClasses:this.updateLayoutClasses.bind(this),getFocusableContainers:this.getFocusableContainers.bind(this),setUserSelect:function(t){e.getGui().style.userSelect=null!=t?t:"",e.getGui().style.webkitUserSelect=null!=t?t:""},setCursor:function(t){e.getGui().style.cursor=null!=t?t:""}};this.ctrl=this.createManagedBean(new lv);var i=this.createTemplate();this.setTemplate(i),this.ctrl.setComp(t,this.eGridDiv,this.getGui()),this.insertGridIntoDom(),this.initialiseTabGuard({onTabKeyDown:function(){},focusInnerElement:function(t){return e.ctrl.focusInnerElement(t)}})},t.prototype.insertGridIntoDom=function(){var e=this,t=this.getGui();this.eGridDiv.appendChild(t),this.addDestroyFunc((function(){e.eGridDiv.removeChild(t),e.logger.log("Grid removed from DOM")}))},t.prototype.updateLayoutClasses=function(e,t){var i=this.eRootWrapperBody.classList;i.toggle(ec.AUTO_HEIGHT,t.autoHeight),i.toggle(ec.NORMAL,t.normal),i.toggle(ec.PRINT,t.print),this.addOrRemoveCssClass(ec.AUTO_HEIGHT,t.autoHeight),this.addOrRemoveCssClass(ec.NORMAL,t.normal),this.addOrRemoveCssClass(ec.PRINT,t.print)},t.prototype.createTemplate=function(){var e=this.ctrl.showDropZones()?"<ag-grid-header-drop-zones></ag-grid-header-drop-zones>":"",t=this.ctrl.showSideBar()?'<ag-side-bar ref="sideBar"></ag-side-bar>':"",i=this.ctrl.showStatusBar()?'<ag-status-bar ref="statusBar"></ag-status-bar>':"",n=this.ctrl.showWatermark()?"<ag-watermark></ag-watermark>":"",o='<div class="ag-root-wrapper" role="presentation">\n                '.concat(e,'\n                <div class="ag-root-wrapper-body" ref="rootWrapperBody" role="presentation">\n                    <ag-grid-body ref="gridBody"></ag-grid-body>\n                    ').concat(t,"\n                </div>\n                ").concat(i,"\n                <ag-pagination></ag-pagination>\n                ").concat(n,"\n            </div>");return o},t.prototype.getFocusableElement=function(){return this.eRootWrapperBody},t.prototype.getFocusableContainers=function(){var e=[this.gridBodyComp.getGui()];return this.sideBarComp&&e.push(this.sideBarComp.getGui()),e.filter((function(e){return zn(e)}))},uv([de("loggerFactory")],t.prototype,"loggerFactory",void 0),uv([sr("gridBody")],t.prototype,"gridBodyComp",void 0),uv([sr("sideBar")],t.prototype,"sideBarComp",void 0),uv([sr("rootWrapperBody")],t.prototype,"eRootWrapperBody",void 0),uv([le],t.prototype,"postConstruct",null),t}(Pf),pv=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),hv=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},fv=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},gv=function(e,t,i){if(i||2===arguments.length)for(var n,o=0,r=t.length;o<r;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},vv=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}var i;return pv(t,e),i=t,t.prototype.progressSort=function(e,t,i){var n=this.getNextSortDirection(e);this.setSortForColumn(e,n,t,i)},t.prototype.setSortForColumn=function(e,t,i,n){"asc"!==t&&"desc"!==t&&(t=null);var o=this.gridOptionsService.isColumnsSortingCoupledToGroup(),r=[e];if(o&&e.getColDef().showRowGroup){var s=this.columnModel.getSourceColumnsForGroupColumn(e),a=null===s||void 0===s?void 0:s.filter((function(e){return e.isSortable()}));a&&(r=gv([e],fv(a),!1))}r.forEach((function(e){return e.setSort(t,n)}
11));var l=(i||this.gridOptionsService.get("alwaysMultiSort"))&&!this.gridOptionsService.get("suppressMultiSort");l||this.clearSortBarTheseColumns(r,n),this.updateSortIndex(e),this.dispatchSortChangedEvents(n)},t.prototype.updateSortIndex=function(e){var t=this.gridOptionsService.isColumnsSortingCoupledToGroup(),i=this.columnModel.getGroupDisplayColumnForGroup(e.getId()),n=t&&i||e,o=this.getColumnsWithSortingOrdered();this.columnModel.getPrimaryAndSecondaryAndAutoColumns().forEach((function(e){return e.setSortIndex(null)}));var r=o.filter((function(e){return e!==n})),s=n.getSort()?gv(gv([],fv(r),!1),[n],!1):r;s.forEach((function(e,t){return e.setSortIndex(t)}))},t.prototype.onSortChanged=function(e){this.dispatchSortChangedEvents(e)},t.prototype.isSortActive=function(){var e=this.columnModel.getPrimaryAndSecondaryAndAutoColumns(),t=e.filter((function(e){return!!e.getSort()}));return t&&t.length>0},t.prototype.dispatchSortChangedEvents=function(e){var t={type:ht.EVENT_SORT_CHANGED,source:e};this.eventService.dispatchEvent(t)},t.prototype.clearSortBarTheseColumns=function(e,t){this.columnModel.getPrimaryAndSecondaryAndAutoColumns().forEach((function(i){e.includes(i)||i.setSort(void 0,t)}))},t.prototype.getNextSortDirection=function(e){var t;if(t=e.getColDef().sortingOrder?e.getColDef().sortingOrder:this.gridOptionsService.get("sortingOrder")?this.gridOptionsService.get("sortingOrder"):i.DEFAULT_SORTING_ORDER,!Array.isArray(t)||t.length<=0)return console.warn("AG Grid: sortingOrder must be an array with at least one element, currently it's ".concat(t)),null;var n,o=t.indexOf(e.getSort()),r=o<0,s=o==t.length-1;return n=r||s?t[0]:t[o+1],i.DEFAULT_SORTING_ORDER.indexOf(n)<0?(console.warn("AG Grid: invalid sort type "+n),null):n},t.prototype.getIndexedSortMap=function(){var e=this,t=this.columnModel.getPrimaryAndSecondaryAndAutoColumns().filter((function(e){return!!e.getSort()}));if(this.columnModel.isPivotMode()){var i=this.gridOptionsService.isColumnsSortingCoupledToGroup();t=t.filter((function(t){var n=!!t.getAggFunc(),o=!t.isPrimary(),r=i?e.columnModel.getGroupDisplayColumnForGroup(t.getId()):t.getColDef().showRowGroup;return n||o||r}))}var n=this.columnModel.getRowGroupColumns().filter((function(e){return!!e.getSort()})),o=this.gridOptionsService.isColumnsSortingCoupledToGroup()&&!!n.length;o&&(t=gv([],fv(new Set(t.map((function(t){var i;return null!==(i=e.columnModel.getGroupDisplayColumnForGroup(t.getId()))&&void 0!==i?i:t}
11)))),!1));var r={};t.forEach((function(e,t){return r[e.getId()]=t})),t.sort((function(e,t){var i=e.getSortIndex(),n=t.getSortIndex();if(null!=i&&null!=n)return i-n;if(null==i&&null==n){var o=r[e.getId()],s=r[t.getId()];return o>s?1:-1}return null==n?-1:1}));var s=new Map;return t.forEach((function(e,t){return s.set(e,t)})),o&&n.forEach((function(t){var i=e.columnModel.getGroupDisplayColumnForGroup(t.getId());s.set(t,s.get(i))})),s},t.prototype.getColumnsWithSortingOrdered=function(){return gv([],fv(this.getIndexedSortMap().entries()),!1).sort((function(e,t){var i=fv(e,2);i[0];var n=i[1],o=fv(t,2);o[0];var r=o[1];return n-r})).map((function(e){var t=fv(e,1),i=t[0];return i}))},t.prototype.getSortModel=function(){return this.getColumnsWithSortingOrdered().filter((function(e){return e.getSort()})).map((function(e){return{sort:e.getSort(),colId:e.getId()}}))},t.prototype.getSortOptions=function(){return this.getColumnsWithSortingOrdered().filter((function(e){return e.getSort()})).map((function(e){return{sort:e.getSort(),column:e}}))},t.prototype.canColumnDisplayMixedSort=function(e){var t=this.gridOptionsService.isColumnsSortingCoupledToGroup(),i=!!e.getColDef().showRowGroup;return t&&i},t.prototype.getDisplaySortForColumn=function(e){var t=this.columnModel.getSourceColumnsForGroupColumn(e);if(!this.canColumnDisplayMixedSort(e)||!(null===t||void 0===t?void 0:t.length))return e.getSort();var i=null!=e.getColDef().field||!!e.getColDef().valueGetter,n=i?gv([e],fv(t),!1):t,o=n[0].getSort(),r=n.every((function(e){return e.getSort()==o}));return r?o:"mixed"},t.prototype.getDisplaySortIndexForColumn=function(e){return this.getIndexedSortMap().get(e)},t.DEFAULT_SORTING_ORDER=["asc","desc",null],hv([de("columnModel")],t.prototype,"columnModel",void 0),t=i=hv([ue("sortController")],t),t}(st),yv=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),mv=function(){return mv=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},mv.apply(this,arguments)},Cv=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},bv=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}var i;return yv(t,e),i=t,t.addKeyboardModeEvents=function(e){this.instanceCount>0||(e.addEventListener("keydown",i.toggleKeyboardMode),e.addEventListener("mousedown",i.toggleKeyboardMode))},t.removeKeyboardModeEvents=function(e){this.instanceCount>0||(e.addEventListener("keydown",i.toggleKeyboardMode),e.addEventListener("mousedown",i.toggleKeyboardMode))},t.toggleKeyboardMode=function(e){var t=i.keyboardModeActive,n="keydown"===e.type;n&&(e.ctrlKey||e.metaKey||e.altKey)||t!==n&&(i.keyboardModeActive=n)},t.unregisterGridCompController=function(e){i.removeKeyboardModeEvents(e)},t.prototype.init=function(){var e=this,t=this.clearFocusedCell.bind(this);this.addManagedListener(this.eventService,ht.EVENT_COLUMN_PIVOT_MODE_CHANGED,t),this.addManagedListener(this.eventService,ht.EVENT_NEW_COLUMNS_LOADED,this.onColumnEverythingChanged.bind(this)),this.addManagedListener(this.eventService,ht.EVENT_COLUMN_GROUP_OPENED,t),this.addManagedListener(this.eventService,ht.EVENT_COLUMN_ROW_GROUP_CHANGED,t),this.registerKeyboardFocusEvents(),this.ctrlsService.whenReady((function(t){e.gridCtrl=t.gridCtrl}))},t.prototype.registerKeyboardFocusEvents=function(){var e=this.gridOptionsService.getDocument();i.addKeyboardModeEvents(e),i.instanceCount++,this.addDestroyFunc((function(){i.instanceCount--,i.unregisterGridCompController(e)}))},t.prototype.onColumnEverythingChanged=function(){if(this.focusedCellPosition){var e=this.focusedCellPosition.column,t=this.columnModel.getGridColumn(e.getId());e!==t&&this.clearFocusedCell()}},t.prototype.isKeyboardMode=function(){return i.keyboardModeActive},t.prototype.getFocusCellToUseAfterRefresh=function(){var e=this.gridOptionsService.getDocument();return this.gridOptionsService.get("suppressFocusAfterRefresh")||!this.focusedCellPosition||this.isDomDataMissingInHierarchy(e.activeElement,Lu.DOM_DATA_KEY_ROW_CTRL)?null:this.focusedCellPosition},t.prototype.getFocusHeaderToUseAfterRefresh=function(){var e=this.gridOptionsService.getDocument();return this.gridOptionsService.get("suppressFocusAfterRefresh")||!this.focused
11HeaderPosition||this.isDomDataMissingInHierarchy(e.activeElement,cp.DOM_DATA_KEY_HEADER_CTRL)?null:this.focusedHeaderPosition},t.prototype.isDomDataMissingInHierarchy=function(e,t){var i=e;while(i){var n=this.gridOptionsService.getDomData(i,t);if(n)return!1;i=i.parentNode}return!0},t.prototype.getFocusedCell=function(){return this.focusedCellPosition},t.prototype.shouldRestoreFocus=function(e){var t=this;return!!this.isCellRestoreFocused(e)&&(setTimeout((function(){t.restoredFocusedCellPosition=null}),0),!0)},t.prototype.isCellRestoreFocused=function(e){return null!=this.restoredFocusedCellPosition&&this.cellPositionUtils.equals(e,this.restoredFocusedCellPosition)},t.prototype.setRestoreFocusedCell=function(e){"react"===this.getFrameworkOverrides().renderingEngine&&(this.restoredFocusedCellPosition=e)},t.prototype.getFocusEventParams=function(){var e=this.focusedCellPosition,t=e.rowIndex,i=e.rowPinned,n=e.column,o={rowIndex:t,rowPinned:i,column:n,isFullWidthCell:!1},r=this.rowRenderer.getRowByPosition({rowIndex:t,rowPinned:i});return r&&(o.isFullWidthCell=r.isFullWidth()),o},t.prototype.clearFocusedCell=function(){if(this.restoredFocusedCellPosition=null,null!=this.focusedCellPosition){var e=mv({type:ht.EVENT_CELL_FOCUS_CLEARED},this.getFocusEventParams());this.focusedCellPosition=null,this.eventService.dispatchEvent(e)}},t.prototype.setFocusedCell=function(e){var t=e.column,i=e.rowIndex,o=e.rowPinned,r=e.forceBrowserFocus,s=void 0!==r&&r,a=e.preventScrollOnBrowserFocus,l=void 0!==a&&a,c=this.columnModel.getGridColumn(t);if(c){this.focusedCellPosition=c?{rowIndex:i,rowPinned:n(o),column:c}:null;var u=mv(mv({type:ht.EVENT_CELL_FOCUSED},this.getFocusEventParams()),{forceBrowserFocus:s,preventScrollOnBrowserFocus:l,floating:null});this.eventService.dispatchEvent(u)}else this.focusedCellPosition=null},t.prototype.isCellFocused=function(e){return null!=this.focusedCellPosition&&this.cellPositionUtils.equals(e,this.focusedCellPosition)},t.prototype.isRowNodeFocused=function(e){return this.isRowFocused(e.rowIndex,e.rowPinned)},t.prototype.isHeaderWrapperFocused=function(e){if(null==this.focusedHeaderPosition)return!1;var t=e.getColumnGroupChild(),i=e.getRowIndex(),n=e.getPinned(),o=this.focusedHeaderPosition,r=o.column,s=o.headerRowIndex;return t===r&&i===s&&n==r.getPinned()},t.prototype.clearFocusedHeader=function(){this.focusedHeaderPosition=null},t.prototype.getFocusedHeader=function(){return this.focusedHeaderPosition},t.prototype.setFocusedHeader=function(e,t){this.focusedHeaderPosition={headerRowIndex:e,column:t}},t.prototype.focusHeaderPosition=function(e){var t=e.direction,i=e.fromTab,n=e.allowUserOverride,o=e.event,r=e.fromCell,s=e.headerPosition;if(r&&this.filterManager.isAdvancedFilterHeaderActive())return this.focusAdvancedFilter(s);if(n){var a=this.getFocusedHeader(),l=this.headerNavigationService.getHeaderRowCount();if(i){var c=this.gridOptionsService.getCallback("tabToNextHeader");if(c){var u={backwards:"Before"===t,previousHeaderPosition:a,nextHeaderPosition:s,headerRowCount:l};s=c(u)}}else{c=this.gridOptionsService.getCallback("navigateToNextHeader");if(c&&o){var d={key:o.key,previousHeaderPosition:a,nextHeaderPosition:s,headerRowCount:l,event:o};s=c(d)}}}if(!s)return!1;if(-1===s.headerRowIndex)return this.filterManager.isAdvancedFilterHeaderActive()?this.focusAdvancedFilter(s):this.focusGridView(s.column);this.headerNavigationService.scrollToColumn(s.column,t);var p=this.ctrlsService.getHeaderRowContainerCtrl(s.column.getPinned()),h=p.focusHeader(s.headerRowIndex,s.column,o);return h},t.prototype.focusFirstHeader=function(){var e=this.columnModel.getAllDisplayedColumns()[0];return!!e&&(e.getParent()&&(e=this.columnModel.getColumnGroupAtLevel(e,0)),this.focusHeaderPosition({headerPosition:{headerRowIndex:0,column:e}}))},t.prototype.focusLastHeader=function(e){var t=this.headerNavigationService.getHeaderRowCount()-1,i=Ae(this.columnModel.getAllDisplayedColumns());return this.focusHeaderPosition({headerPosition:{headerRowIndex:t,column:i},event:e})},t.prototype.focusPreviousFromFirstCell=function(e){return this.filterManager.isAdvancedFilterHeaderActive()?this.focusAdvancedFilter(null):this.focusLastHeader(e)},t.prototype.isAnyCellFocused=function(){return!!this.focusedCellPosition},t.prototype.isRowFocused=function(e,t){return null!=this.focusedCellPosition&&(this.focusedCellPosition.rowIndex===e&&this.focusedCellPosition.rowPinned===n(t))},t.prototype.findFocusableElements=function(e,t,i){void 0===i&&(i=!1);var n=Dn,o=Rn;t&&(o+=", "+t),i&&(o+=', [tabindex="-1"]');var r=Array.prototype.slice.apply(e.querySelectorAll(n)).filter((function(e){return zn(e)}
11)),s=Array.prototype.slice.apply(e.querySelectorAll(o));if(!s.length)return r;var a=function(e,t){return e.filter((function(e){return-1===t.indexOf(e)}))};return a(r,s)},t.prototype.focusInto=function(e,t,i){void 0===t&&(t=!1),void 0===i&&(i=!1);var n=this.findFocusableElements(e,null,i),o=t?Ae(n):n[0];return!!o&&(o.focus({preventScroll:!0}),!0)},t.prototype.findFocusableElementBeforeTabGuard=function(e,t){if(!t)return null;var i=this.findFocusableElements(e),n=i.indexOf(t);if(-1===n)return null;for(var o=-1,r=n-1;r>=0;r--)if(i[r].classList.contains(Jh.TAB_GUARD_TOP)){o=r;break}return o<=0?null:i[o-1]},t.prototype.findNextFocusableElement=function(e,t,i){void 0===e&&(e=this.eGridDiv);var n,o=this.findFocusableElements(e,t?':not([tabindex="-1"])':null),r=this.gridOptionsService.getDocument(),s=r.activeElement;n=t?o.findIndex((function(e){return e.contains(s)})):o.indexOf(s);var a=n+(i?-1:1);return a<0||a>=o.length?null:o[a]},t.prototype.isTargetUnderManagedComponent=function(e,t){if(!t)return!1;var i=e.querySelectorAll(".".concat(Cr.FOCUS_MANAGED_CLASS));if(!i.length)return!1;for(var n=0;n<i.length;n++)if(i[n].contains(t))return!0;return!1},t.prototype.findTabbableParent=function(e,t){void 0===t&&(t=5);var i=0;while(e&&null===en(e)&&++i<=t)e=e.parentElement;return null===en(e)?null:e},t.prototype.focusGridView=function(e,t){if(this.gridOptionsService.get("suppressCellFocus"))return t?this.focusLastHeader():this.focusNextGridCoreContainer(!1);var i=t?this.rowPositionUtils.getLastRow():this.rowPositionUtils.getFirstRow();if(!i)return!1;var o=i.rowIndex,r=i.rowPinned,s=this.getFocusedHeader();if(!e&&s&&(e=s.column),null==o||!e)return!1;if(this.navigationService.ensureCellVisible({rowIndex:o,column:e,rowPinned:r}),this.setFocusedCell({rowIndex:o,column:e,rowPinned:n(r),forceBrowserFocus:!0}),this.rangeService){var a={rowIndex:o,rowPinned:r,column:e};this.rangeService.setRangeToCell(a)}return!0},t.prototype.focusNextGridCoreContainer=function(e,t){return void 0===t&&(t=!1),!(t||!this.gridCtrl.focusNextInnerContainer(e))||((t||!e&&!this.gridCtrl.isDetailGrid())&&this.gridCtrl.forceFocusOutOfContainer(e),!1)},t.prototype.focusAdvancedFilter=function(e){return this.advancedFilterFocusColumn=null===e||void 0===e?void 0:e.column,this.advancedFilterService.getCtrl().focusHeaderComp()},t.prototype.focusNextFromAdvancedFilter=function(e,t){var i,n,o=null!==(i=t?void 0:this.advancedFilterFocusColumn)&&void 0!==i?i:null===(n=this.columnModel.getAllDisplayedColumns())||void 0===n?void 0:n[0];return e?this.focusHeaderPosition({headerPosition:{column:o,headerRowIndex:this.headerNavigationService.getHeaderRowCount()-1}}):this.focusGridView(o)},t.prototype.clearAdvancedFilterColumn=function(){this.advancedFilterFocusColumn=void 0},t.keyboardModeActive=!1,t.instanceCount=0,Cv([de("eGridDiv")],t.prototype,"eGridDiv",void 0),Cv([de("columnModel")],t.prototype,"columnModel",void 0),Cv([de("headerNavigationService")],t.prototype,"headerNavigationService",void 0),Cv([de("rowRenderer")],t.prototype,"rowRenderer",void 0),Cv([de("rowPositionUtils")],t.prototype,"rowPositionUtils",void 0),Cv([de("cellPositionUtils")],t.prototype,"cellPositionUtils",void 0),Cv([pe("rangeService")],t.prototype,"rangeService",void 0),Cv([de("navigationService")],t.prototype,"navigationService",void 0),Cv([de("ctrlsService")],t.prototype,"ctrlsService",void 0),Cv([de("filterManager")],t.prototype,"filterManager",void 0),Cv([pe("advancedFilterService")],t.prototype,"advancedFilterService",void 0),Cv([le],t.prototype,"init",null),t=i=Cv([ue("focusService")],t),t}(st),wv=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Sv=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Ev=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return wv(t,e),t.prototype.setMouseOver=function(e){this.selectedColumns=e;var t={type:ht.EVENT_COLUMN_HOVER_CHANGED};this.eventService.dispatchEvent(t)},t.prototype.clearMouseOver=function(){this.selectedColumns=null;var e={type:ht.EVENT_COLUMN_HOVER_CHANGED};this.eventService.dispatchEvent(e)},t.prototype.isHovered=function(e){return!!this.selectedColumns&&this.selectedColumns.indexOf(e)>=0},t=Sv([ue("columnHoverService")],t),t}(st),xv=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ov=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Tv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.executeNextFuncs=[],t.executeLaterFuncs=[],t.active=!1,t.animationThreadCount=0,t}return xv(t,e),t.prototype.postConstruct=function(){var e=this;this.ctrlsService.whenReady((function(t){return e.gridBodyCtrl=t.gridBodyCtrl}))},t.prototype.isActive=function(){return this.active},t.prototype.start=function(){this.active||this.gridOptionsService.get("suppressColumnMoveAnimation")||this.gridOptionsService.get("enableRtl")||(this.ensureAnimationCssClassPresent(),this.active=!0)},t.prototype.finish=function(){this.active&&(this.flush(),this.active=!1)},t.prototype.executeNextVMTurn=function(e){this.active?this.executeNextFuncs.push(e):e()},t.prototype.executeLaterVMTurn=function(e){this.active?this.executeLaterFuncs.push(e):e()},t.prototype.ensureAnimationCssClassPresent=function(){var e=this;this.animationThreadCount++;var t=this.animationThreadCount;this.gridBodyCtrl.setColumnMovingCss(!0),this.executeLaterFuncs.push((function(){e.animationThreadCount===t&&e.gridBodyCtrl.setColumnMovingCss(!1)}))},t.prototype.flush=function(){var e=this.executeNextFuncs;this.executeNextFuncs=[];var t=this.executeLaterFuncs;this.executeLaterFuncs=[],0===e.length&&0===t.length||(window.setTimeout((function(){return e.forEach((function(e){return e()}))}),0),window.setTimeout((function(){return t.forEach((function(e){return e()}))}),300))},Ov([de("ctrlsService")],t.prototype,"ctrlsService",void 0),Ov([le],t.prototype,"postConstruct",null),t=Ov([ue("columnAnimationService")],t),t}(st),Dv=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Rv=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Av=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Dv(t,e),t.prototype.postConstruct=function(){var e=this;this.ctrlsService.whenReady((function(t){e.centerRowContainerCon=t.centerRowContainerCtrl,e.addManagedListener(e.eventService,ht.EVENT_BODY_HEIGHT_CHANGED,e.checkPageSize.bind(e)),e.addManagedListener(e.eventService,ht.EVENT_SCROLL_VISIBILITY_CHANGED,e.checkPageSize.bind(e)),e.addManagedPropertyListener("paginationAutoPageSize",e.onPaginationAutoSizeChanged.bind(e)),e.checkPageSize()}))},t.prototype.notActive=function(){return!this.gridOptionsService.get("paginationAutoPageSize")||null==this.centerRowContainerCon},t.prototype.onPaginationAutoSizeChanged=function(){this.notActive()?this.paginationProxy.unsetAutoCalculatedPageSize():this.checkPageSize()},t.prototype.checkPageSize=function(){var e=this;if(!this.notActive()){var t=this.centerRowContainerCon.getViewportSizeFeature
11().getBodyHeight();if(t>0){var i=function(){var i=e.gridOptionsService.getRowHeightAsNumber(),n=Math.floor(t/i);e.paginationProxy.setPageSize(n,"autoCalculated")};this.isBodyRendered?Y((function(){return i()}),50)():(i(),this.isBodyRendered=!0)}else this.isBodyRendered=!1}},Rv([de("ctrlsService")],t.prototype,"ctrlsService",void 0),Rv([de("paginationProxy")],t.prototype,"paginationProxy",void 0),Rv([le],t.prototype,"postConstruct",null),t=Rv([ue("paginationAutoPageSizeService")],t),t}(st),_v=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Pv=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Mv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.cacheVersion=0,t}return _v(t,e),t.prototype.init=function(){this.active=this.gridOptionsService.get("valueCache"),this.neverExpires=this.gridOptionsService.get("valueCacheNeverExpires")},t.prototype.onDataChanged=function(){this.neverExpires||this.expire()},t.prototype.expire=function(){this.cacheVersion++},t.prototype.setValue=function(e,t,i){this.active&&(e.__cacheVersion!==this.cacheVersion&&(e.__cacheVersion=this.cacheVersion,e.__cacheData={}),e.__cacheData[t]=i)},t.prototype.getValue=function(e,t){if(this.active&&e.__cacheVersion===this.cacheVersion)return e.__cacheData[t]},Pv([le],t.prototype,"init",null),t=Pv([ue("valueCache")],t),t}(st),kv=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Nv=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Lv="paste",Iv=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return kv(t,e),t.prototype.init=function(){"clientSide"===this.rowModel.getType()&&(this.clientSideRowModel=this.rowModel),this.addManagedListener(this.eventService,ht.EVENT_CELL_VALUE_CHANGED,this.onCellValueChanged.bind(this))},t.prototype.onCellValueChanged=function(e){e.source!==Lv&&this.doChangeDetection(e.node,e.column)},t.prototype.doChangeDetection=function(e,t){if(!this.gridOptionsService.get("suppressChangeDetection")){var i=[e];if(this.clientSideRowModel&&!e.isRowPinned()){var n=this.gridOptionsService.get("aggregateOnlyChangedColumns"),o=new Qh(n,this.clientSideRowModel.getRootNode());o.addParentNode(e.parent,[t]),this.clientSideRowModel.doAggregate(o),o.forEachChangedNodeDepthFirst((function(e){i.push(e)}))}this.rowRenderer.refreshCells({rowNodes:i})}},Nv([de("rowModel")],t.prototype,"rowModel",void 0),Nv([de("rowRenderer")],t.prototype,"rowRenderer",void 0),Nv([le],t.prototype,"init",null),t=Nv([ue("changeDetectionService")],t),t}(st),Fv=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Gv=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Vv=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Fv(t,e),t.prototype.adaptFunction=function(e,t){var i=this.componentMetadataProvider.retrieve(e);return i&&i.functionAdapter?i.functionAdapter(t):null},t.prototype.adaptCellRendererFunction=function(e){var t=function(){function t(){}return t.prototype.refresh=function(e){return!1},t.prototype.getGui=function(){return this.eGui},t.prototype.init=function(t){var i=e(t),n=typeof i;this.eGui="string"!==n&&"number"!==n&&"boolean"!==n?null!=i?i:Kn("<span></span>"):Kn("<span>"+i+"</span>")},t}();return t},t.prototype.doesImplementIComponent=function(e){return!!e&&(e.prototype&&"getGui"in e.prototype)},Gv([de("componentMetadataProvider")],t.prototype,"componentMetadataProvider",void 0),t=Gv([ue("agComponentUtils")],t),t}(st),Bv=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),jv=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Hv=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Bv(t,e),t.prototype.postConstruct=function(){this.componentMetaData={dateComponent:{mandatoryMethodList:["getDate","setDate"],optionalMethodList:["afterGuiAttached","setInputPlaceholder","setInputAriaLabel"]},detailCellRenderer:{mandatoryMethodList:[],optionalMethodList:["refresh"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},headerComponent:{mandatoryMethodList:[],optionalMethodList:["refresh"]},headerGroupComponent:{mandatoryMethodList:[],optionalMethodList:[]},loadingCellRenderer:{mandatoryMethodList:[],optionalMethodList:[]},loadingOverlayComponent:{mandatoryMethodList:[],optionalMethodList:[]},noRowsOverlayComponent:{mandatoryMethodList:[],optionalMethodList:[]},floatingFilterComponent:{mandatoryMethodList:["onParentModelChanged"],optionalMethodList:["afterGuiAttached"]},floatingFilterWrapperComponent:{mandatoryMethodList:[],optionalMethodList:[]},cellRenderer:{mandatoryMethodList:[],optionalMethodList:["refresh","afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},cellEditor:{mandatoryMethodList:["getValue"],optionalMethodList:["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached"]},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"]},filterComponent:{mandatoryMethodList:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethodList:["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged","onAnyFilterChanged"]},statusPanel:{mandatoryMethodList:[],optionalMethodList:["afterGuiAttached"]},toolPanel:{mandatoryMethodList:[],optionalMethodList:["refresh","afterGuiAttached"]},tooltipComponent:{mandatoryMethodList:[],optionalMethodList:[]}}},t.prototype.retrieve=function(e){return this.componentMetaData[e]},jv([de("agComponentUtils")],t.prototype,"agComponentUtils",void 0),jv([le],t.prototype,"postConstruct",null),t=jv([ue("componentMetadataProvider")],t),t}(st),Wv=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Uv=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},zv=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},Kv=function(e,t,i){if(i||2===arguments.length)for(var n,o=0,r=t.length;o<r;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},Yv=25,qv=10,Xv=8,$v=4,Zv=4,Jv=6,Qv=16,ey=14,ty=8,iy={"ag-theme-custom":{headerHeight:25,headerCellMinWidth:24,listItemHeight:5*$v,rowHeight:25,chartMenuPanelWidth:220},"ag-theme-material":{headerHeight:7*Xv,headerCellMinWidth:48,listItemHeight:4*Xv,rowHeight:6*Xv,chartMenuPanelWidth:240},"ag-theme-balham":{headerHeight:8*Zv,headerCellMinWidth:24,listItemHeight:6*Zv,rowHeight:7*Zv,chartMenuPanelWidth:220}
11,"ag-theme-alpine":{headerHeight:8*Jv,headerCellMinWidth:36,listItemHeight:4*Jv,rowHeight:7*Jv,chartMenuPanelWidth:240},"ag-theme-quartz":{headerHeight:ey+4.25*ty,headerCellMinWidth:36,listItemHeight:Qv+ty,rowHeight:ey+3.5*ty,chartMenuPanelWidth:260}},ny={headerHeight:["ag-header-row"],headerCellMinWidth:["ag-header-cell"],listItemHeight:["ag-virtual-list-item"],rowHeight:["ag-row"],chartMenuPanelWidth:["ag-chart-docked-container"]},oy=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.calculatedSizes={},t}return Wv(t,e),t.prototype.postConstruct=function(){var e,t=this,i=null!==(e=this.getTheme().el)&&void 0!==e?e:this.eGridDiv;this.addManagedPropertyListener("rowHeight",(function(){return t.refreshRowHeightVariable()})),this.mutationObserver=new MutationObserver((function(){t.calculatedSizes={},t.fireGridStylesChangedEvent()})),this.mutationObserver.observe(i||this.eGridDiv,{attributes:!0,attributeFilter:["class"]})},t.prototype.fireGridStylesChangedEvent=function(){var e={type:ht.EVENT_GRID_STYLES_CHANGED};this.eventService.dispatchEvent(e)},t.prototype.getSassVariable=function(e){var t=this.getTheme(),i=t.themeFamily,n=t.el;if(i&&0===i.indexOf("ag-theme")){this.calculatedSizes||(this.calculatedSizes={}),this.calculatedSizes[i]||(this.calculatedSizes[i]={});var o=this.calculatedSizes[i][e];return null!=o?o:(this.calculatedSizes[i][e]=this.calculateValueForSassProperty(e,i,n),this.calculatedSizes[i][e])}},t.prototype.calculateValueForSassProperty=function(e,t,i){var n,o="ag-theme-"+(t.match("material")?"material":t.match("balham")?"balham":t.match("alpine")?"alpine":"custom"),r=iy[o][e],s=this.gridOptionsService.getDocument();if(i||(i=this.eGridDiv),!ny[e])return r;var a=ny[e],l=s.createElement("div"),c=Array.from(i.classList);(n=l.classList).add.apply(n,Kv([t],zv(c),!1)),l.style.position="absolute";var u=a.reduce((function(e,t){var i=s.createElement("div");return i.style.position="static",i.classList.add(t),e.appendChild(i),i}),l),d=0;if(s.body){s.body.appendChild(l);var p=-1!==e.toLowerCase().indexOf("height")?"height":"width";d=parseInt(window.getComputedStyle(u)[p],10),s.body.removeChild(l)}return d||r},t.prototype.isThemeDark=function(){var e=this.getTheme().theme;return!!e&&e.indexOf("dark")>=0},t.prototype.chartMenuPanelWidth=function(){return this.getSassVariable("chartMenuPanelWidth")},t.prototype.getTheme=function(){var e=/\bag-(material|(?:theme-([\w\-]*)))\b/g,t=this.eGridDiv,i=null,n=[];while(t){if(i=e.exec(t.className),i){var o=t.className.match(e);o&&(n=o);break}t=t.parentElement||void 0}if(!i)return{allThemes:n};var r=i[0];return{theme:r,el:t,themeFamily:r.replace(/-dark$/,""),allThemes:n}},t.prototype.getFromTheme=function(e,t){var i;return null!==(i=this.getSassVariable(t))&&void 0!==i?i:e},t.prototype.getDefaultRowHeight=function(){return this.getFromTheme(Yv,"rowHeight")},t.prototype.getListItemHeight=function(){return this.getFromTheme(20,"listItemHeight")},t.prototype.refreshRowHeightVariable=function(){var e=this.eGridDiv.style.getPropertyValue("--ag-line-height").trim(),t=this.gridOptionsService.get("rowHeight");if(null==t||isNaN(t)||!isFinite(t))return null!==e&&this.eGridDiv.style.setProperty("--ag-line-height",null),-1;var i="".concat(t,"px");return e!=i?(this.eGridDiv.style.setProperty("--ag-line-height",i),t):""!=e?parseFloat(e):-1},t.prototype.getMinColWidth=function(){var e=this.getFromTheme(null,"headerCellMinWidth");return o(e)?Math.max(e,qv):qv},t.prototype.destroy=function(){this.calculatedSizes=null,this.mutationObserver&&this.mutationObserver.disconnect(),e.prototype.destroy.call(this)},Uv([de("eGridDiv")],t.prototype,"eGridDiv",void 0),Uv([le],t.prototype,"postConstruct",null),t=Uv([ue("environment")],t),t}(st),ry=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),sy=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},ay=function(e,t){return function(i,n){t(i,n,e)}},ly=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.scrollY=0,t.uiBodyHeight=0,t}return ry(t,e),t.prototype.agWire=function(e){this.logger=e.create("RowContainerHeightService")},t.prototype.postConstruct=function(){this.addManagedListener(this.eventService,ht.EVENT_BODY_HEIGHT_CHANGED,this.updateOffset.bind(this)),this.maxDivHeight=tn(),this.logger.log("maxDivHeight = "+this.maxDivHeight)},t.prototype.isStretching=function(){return this.stretching},t.prototype.getDivStretchOffset=function(){return this.divStretchOffset},t.prototype.updateOffset=function(){if(this.stretching){var e=this.ctrlsService.getGridBodyCtrl(),t=e.getScrollFeature
11().getVScrollPosition().top,i=this.getUiBodyHeight(),n=t!==this.scrollY||i!==this.uiBodyHeight;n&&(this.scrollY=t,this.uiBodyHeight=i,this.calculateOffset())}},t.prototype.calculateOffset=function(){this.setUiContainerHeight(this.maxDivHeight),this.pixelsToShave=this.modelHeight-this.uiContainerHeight,this.maxScrollY=this.uiContainerHeight-this.uiBodyHeight;var e=this.scrollY/this.maxScrollY,t=e*this.pixelsToShave;this.logger.log("Div Stretch Offset = ".concat(t," (").concat(this.pixelsToShave," * ").concat(e,")")),this.setDivStretchOffset(t)},t.prototype.setUiContainerHeight=function(e){e!==this.uiContainerHeight&&(this.uiContainerHeight=e,this.eventService.dispatchEvent({type:ht.EVENT_ROW_CONTAINER_HEIGHT_CHANGED}))},t.prototype.clearOffset=function(){this.setUiContainerHeight(this.modelHeight),this.pixelsToShave=0,this.setDivStretchOffset(0)},t.prototype.setDivStretchOffset=function(e){var t="number"===typeof e?Math.floor(e):null;this.divStretchOffset!==t&&(this.divStretchOffset=t,this.eventService.dispatchEvent({type:ht.EVENT_HEIGHT_SCALE_CHANGED}))},t.prototype.setModelHeight=function(e){this.modelHeight=e,this.stretching=null!=e&&this.maxDivHeight>0&&e>this.maxDivHeight,this.stretching?this.calculateOffset():this.clearOffset()},t.prototype.getUiContainerHeight=function(){return this.uiContainerHeight},t.prototype.getRealPixelPosition=function(e){return e-this.divStretchOffset},t.prototype.getUiBodyHeight=function(){var e=this.ctrlsService.getGridBodyCtrl(),t=e.getScrollFeature().getVScrollPosition();return t.bottom-t.top},t.prototype.getScrollPositionForPixel=function(e){if(this.pixelsToShave<=0)return e;var t=this.modelHeight-this.getUiBodyHeight(),i=e/t,n=this.maxScrollY*i;return n},sy([de("ctrlsService")],t.prototype,"ctrlsService",void 0),sy([ay(0,fe("loggerFactory"))],t.prototype,"agWire",null),sy([le],t.prototype,"postConstruct",null),t=sy([ue("rowContainerHeightService")],t),t}(st),cy=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),uy=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},dy=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return cy(t,e),t.prototype.init=function(){var e=this;this.addManagedPropertyListener("isRowSelectable",(function(){return e.updateSelectable()}))},t.prototype.updateSelectableAfterGrouping=function(){this.updateSelectable(!0)},t.prototype.updateSelectable=function(e){void 0===e&&(e=!1);var t=!!this.gridOptionsService.get("rowSelection"),i=this.gridOptionsService.get("isRowSelectable");if(t&&i){var n=this.gridOptionsService.get("groupSelectsChildren"),o="clientSide"===this.rowModel.getType()&&n,r=[],s=function(t){if(!e||t.group)if(o&&t.group){var n=t.childrenAfterGroup.some((function(e){return!0===e.selectable}));t.setRowSelectable(n,!0)}else{var s=!i||i(t);t.setRowSelectable(s,!0),!s&&t.isSelected()&&r.push(t)}};if(o){var a=this.rowModel,l=new Qh(!1,a.getRootNode());l.forEachChangedNodeDepthFirst(s,!0,!0)}else this.rowModel.forEachNode(s);r.length&&this.selectionService.setNodesSelected({nodes:r,newValue:!1,source:"selectableChanged"}),o&&this.selectionService instanceof Bg&&this.selectionService.updateGroupsFromChildrenSelections("selectableChanged")}},uy([de("rowModel")],t.prototype,"rowModel",void 0),uy([de("selectionService")],t.prototype,"selectionService",void 0),uy([le],t.prototype,"init",null),t=uy([ue("selectableService")],t),t}(st),py=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),hy=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},fy=function(e){function t(){var t=e.call(this)||this;return t.previousAndFirstButtonsDisabled=!1,t.nextButtonDisabled=!1,t.lastButtonDisabled=!1,t.areListenersSetup=!1,t}return py(t,e),t.prototype.postConstruct=function(){var e=this,t=this.gridOptionsService.get("enableRtl");this.setTemplate(this.getTemplate());var i=this,n=i.btFirst,o=i.btPrevious,r=i.btNext,s=i.btLast;i.pageSizeComp,this.activateTabIndex([n,o,r,s]),n.insertAdjacentElement("afterbegin",So(t?"last":"first",this.gridOptionsService)),o.insertAdjacentElement("afterbegin",So(t?"next":"previous",this.gridOptionsService)),r.insertAdjacentElement("afterbegin",So(t?"previous":"next",this.gridOptionsService)),s.insertAdjacentElement("afterbegin",So(t?"first":"last",this.gridOptionsService)),this.addManagedPropertyListener("pagination",this.onPaginationChanged.bind(this)),this.addManagedPropertyListener("suppressPaginationPanel",this.onPaginationChanged.bind(this)),this.addManagedPropertyListeners(["paginationPageSizeSelector","paginationAutoPageSize","suppressPaginationPanel"],(function(){return e.onPageSizeRelatedOptionsChange()})),this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector()),this.onPaginationChanged()},t.prototype.onPaginationChanged=function(){var e=this.gridOptionsService.get("pagination"),t=e&&!this.gridOptionsService.get("suppressPaginationPanel");this.setDisplayed(t),t&&(this.setupListeners(),this.enableOrDisableButtons(),this.updateRowLabels(),this.setCurrentPageLabel(),this.setTotalLabels(),this.onPageSizeRelatedOptionsChange())},t.prototype.onPageSizeRelatedOptionsChange=function(){this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector())},t.prototype.setupListeners=function(){var e=this;this.areListenersSetup||(this.addManagedListener(this.eventService,ht.EVENT_PAGINATION_CHANGED,this.onPaginationChanged.bind(this)),[{el:this.btFirst,fn:this.onBtFirst.bind(this)},{el:this.btPrevious,fn:this.onBtPrevious.bind(this)},{el:this.btNext,fn:this.onBtNext.bind(this)},{el:this.btLast,fn:this.onBtLast.bind(this)}
11].forEach((function(t){var i=t.el,n=t.fn;e.addManagedListener(i,"click",n),e.addManagedListener(i,"keydown",(function(e){e.key!==xo.ENTER&&e.key!==xo.SPACE||(e.preventDefault(),n())}))})),this.areListenersSetup=!0)},t.prototype.onBtFirst=function(){this.previousAndFirstButtonsDisabled||this.paginationProxy.goToFirstPage()},t.prototype.setCurrentPageLabel=function(){var e=this.paginationProxy.getTotalPages()>0,t=this.paginationProxy.getCurrentPage(),i=e?t+1:0;this.lbCurrent.innerHTML=this.formatNumber(i)},t.prototype.formatNumber=function(e){var t=this.gridOptionsService.getCallback("paginationNumberFormatter");if(t){var i={value:e};return t(i)}var n=this.localeService.getLocaleTextFunc(),o=n("thousandSeparator",","),r=n("decimalSeparator",".");return fn(e,o,r)},t.prototype.getTemplate=function(){var e=this.localeService.getLocaleTextFunc(),t=e("page","Page"),i=e("to","to"),n=e("of","of"),o=e("firstPage","First Page"),r=e("previousPage","Previous Page"),s=e("nextPage","Next Page"),a=e("lastPage","Last Page"),l=this.getCompId();return'<div class="ag-paging-panel ag-unselectable" id="ag-'.concat(l,'">\n                <ag-page-size-selector ref="pageSizeComp"></ag-page-size-selector>\n                <span class="ag-paging-row-summary-panel" role="status">\n                    <span id="ag-').concat(l,'-first-row" ref="lbFirstRowOnPage" class="ag-paging-row-summary-panel-number"></span>\n                    <span id="ag-').concat(l,'-to">').concat(i,'</span>\n                    <span id="ag-').concat(l,'-last-row" ref="lbLastRowOnPage" class="ag-paging-row-summary-panel-number"></span>\n                    <span id="ag-').concat(l,'-of">').concat(n,'</span>\n                    <span id="ag-').concat(l,'-row-count" ref="lbRecordCount" class="ag-paging-row-summary-panel-number"></span>\n                </span>\n                <span class="ag-paging-page-summary-panel" role="presentation">\n                    <div ref="btFirst" class="ag-button ag-paging-button" role="button" aria-label="').concat(o,'"></div>\n                    <div ref="btPrevious" class="ag-button ag-paging-button" role="button" aria-label="').concat(r,'"></div>\n                    <span class="ag-paging-description" role="status">\n                        <span id="ag-').concat(l,'-start-page">').concat(t,'</span>\n                        <span id="ag-').concat(l,'-start-page-number" ref="lbCurrent" class="ag-paging-number"></span>\n                        <span id="ag-').concat(l,'-of-page">').concat(n,'</span>\n                        <span id="ag-').concat(l,'-of-page-number" ref="lbTotal" class="ag-paging-number"></span>\n                    </span>\n                    <div ref="btNext" class="ag-button ag-paging-button" role="button" aria-label="').concat(s,'"></div>\n                    <div ref="btLast" class="ag-button ag-paging-button" role="button" aria-label="').concat(a,'"></div>\n                </span>\n            </div>')},t.prototype.onBtNext=function(){this.nextButtonDisabled||this.paginationProxy.goToNextPage()},t.prototype.onBtPrevious=function(){this.previousAndFirstButtonsDisabled||this.paginationProxy.goToPreviousPage()},t.prototype.onBtLast=function(){this.lastButtonDisabled||this.paginationProxy.goToLastPage()},t.prototype.enableOrDisableButtons=function(){var e=this.paginationProxy.getCurrentPage(),t=this.paginationProxy.isLastPageFound(),i=this.paginationProxy.getTotalPages();this.previousAndFirstButtonsDisabled=0===e,this.toggleButtonDisabled(this.btFirst,this.previousAndFirstButtonsDisabled),this.toggleButtonDisabled(this.btPrevious,this.previousAndFirstButtonsDisabled);var n=this.isZeroPagesToDisplay(),o=e===i-1;this.nextButtonDisabled=o||n,this.lastButtonDisabled=!t||n||e===i-1,this.toggleButtonDisabled(this.btNext,this.nextButtonDisabled),this.toggleButtonDisabled(this.btLast,this.lastButtonDisabled)},t.prototype.toggleButtonDisabled=function(e,t){Ci(e,t),e.classList.toggle("ag-disabled",t)},t.prototype.updateRowLabels=function(){var e,t,i=this.paginationProxy.getCurrentPage(),n=this.paginationProxy.getPageSize(),o=this.paginationProxy.isLastPageFound(),r=this.paginationProxy.isLastPageFound()?this.paginationProxy.getMasterRowCount():null;if(this.isZeroPagesToDisplay()?e=t=0:(e=n*i+1,t=e+n-1,o&&t>r&&(t=r)),this.lbFirstRowOnPage.innerHTML=this.formatNumber(e),this.rowNodeBlockLoader.isLoading()){var s=this.localeService.getLocaleTextFunc();this.lbLastRowOnPage.innerHTML=s("pageLastRowUnknown","?")}else this.lbLastRowOnPage.innerHTML=this.formatNumber(t)},t.prototype.isZeroPagesToDisplay=function(){var e=this.paginationProxy.isLastPageFound(),t=this.paginationProxy.getTotalPages();return e&&0===t},t.prototype.setTotalLabels=function(){var e=this.paginationProxy.isLastPageFound(),t=this.paginationProxy.getTotalPages(),i=e?this.paginationProxy.getMasterRowCount():null;if(1===i){var n=this.paginationProxy.getRow(0),o=n&&n.group&&!(n.groupData||n.aggData);if(o)return void this.setTotalLabelsToZero()}if(e)this.lbTotal.innerHTML=this.formatNumber(t),this.lbRecordCount.innerHTML=this.formatNumber(i);else{var r=this.localeService.getLocaleTextFunc()("more","more");this.lbTotal.innerHTML=r,this.lbRecordCount.innerHTML=r}},t.prototype.setTotalLabelsToZero=function(){this.lbFirstRowOnPage.innerHTML=this.formatNumber(0),this.lbCurrent.innerHTML=this.formatNumber(0),this.lbLastRowOnPage.innerHTML=this.formatNumber(0),this.lbTotal.innerHTML=this.formatNumber(0),this.lbRecordCount.innerHTML=this.formatNumber(0)},hy([de("paginationProxy")],t.prototype,"paginationProxy",void 0),hy([de("rowNodeBlockLoader")],t.prototype,"rowNodeBlockLoader",void 0),hy([sr("btFirst")],t.prototype,"btFirst",void 0),hy([sr("btPrevious")],t.prototype,"btPrevious",void 0),hy([sr("btNext")],t.prototype,"btNext",void 0),hy([sr("btLast")],t.prototype,"btLast",void 0),hy([sr("lbRecordCount")],t.prototype,"lbRecordCount",void 0),hy([sr("lbFirstRowOnPage")],t.prototype,"lbFirstRowOnPage",void 0),hy([sr("lbLastRowOnPage")],t.prototype,"lbLastRowOnPage",void 0),hy([sr("lbCurrent")],t.prototype,"lbCurrent",void 0),hy([sr("lbTotal")],t.prototype,"lbTotal",void 0),hy([sr("pageSizeComp")],t.prototype,"pageSizeComp",void 0),hy([le],t.prototype,"postConstruct",null),t}(rr),gy=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),vy=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},yy=function(e){function t(){var i=e.call(this,t.TEMPLATE)||this;return i.inProgress=!1,i.destroyRequested=!1,i}return gy(t,e),t.prototype.updateLayoutClasses=function(e,t){var i=this.eOverlayWrapper.classList;i.toggle(ec.AUTO_HEIGHT,t.autoHeight),i.toggle(ec.NORMAL,t.normal),i.toggle(ec.PRINT,t.print)},t.prototype.postConstruct=function(){this.createManagedBean(new mc(this)),this.setDisplayed(!1,{skipAriaHidden:!0}),this.overlayService.registerOverlayWrapperComp(this)},t.prototype.setWrapperTypeClass=function(e){var t=this.eOverlayWrapper.classList;this.activeOverlayWrapperCssClass&&t.toggle(this.activeOverlayWrapperCssClass,!1),this.activeOverlayWrapperCssClass=e,t.toggle(e,!0)},t.prototype.showOverlay=function(e,t){var i=this;this.inProgress||(this.setWrapperTypeClass(t),this.destroyActiveOverlay(),this.inProgress=!0,e&&e.then((function(e){i.inProgress=!1,i.eOverlayWrapper.appendChild(e.getGui()),i.activeOverlay=e,i.destroyRequested&&(i.destroyRequested=!1,i.destroyActiveOverlay())})),this.setDisplayed(!0,{skipAriaHidden:!0}))},t.prototype.destroyActiveOverlay=function(){this.inProgress?this.destroyRequested=!0:this.activeOverlay&&(this.activeOverlay=this.getContext().destroyBean(this.activeOverlay),Wn(this.eOverlayWrapper))},t.prototype.hideOverlay=function(){this.destroyActiveOverlay(),this.setDisplayed(!1,{skipAriaHidden:!0})},t.prototype.destroy=function(){this.destroyActiveOverlay(),e.prototype.destroy.call(this)},t.TEMPLATE='\n        <div class="ag-overlay" aria-hidden="true">\n            <div class="ag-overlay-panel">\n                <div class="ag-overlay-wrapper" ref="eOverlayWrapper"></div>\n            </div>\n        </div>',vy([de("overlayService")],t.prototype,"overlayService",void 0),vy([sr("eOverlayWrapper")],t.prototype,"eOverlayWrapper",void 0),vy([le],t.prototype,"postConstruct",null),t}(rr),my=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Cy=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},by=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return my(t,e),t.prototype.getFirstRow=function(){var e,t=0;return this.pinnedRowModel.getPinnedTopRowCount()?e="top":this.rowModel.getRowCount()?(e=null,t=this.paginationProxy.getPageFirstRow()):this.pinnedRowModel.getPinnedBottomRowCount()&&(e="bottom"),void 0===e?null:{rowIndex:t,rowPinned:e}},t.prototype.getLastRow=function(){var e,t=null,i=this.pinnedRowModel.getPinnedBottomRowCount(),n=this.pinnedRowModel.getPinnedTopRowCount();return i?(t="bottom",e=i-1):this.rowModel.getRowCount()?(t=null,e=this.paginationProxy.getPageLastRow()):n&&(t="top",e=n-1),void 0===e?null:{rowIndex:e,rowPinned:t}},t.prototype.getRowNode=function(e){switch(e.rowPinned){case"top":return this.pinnedRowModel.getPinnedTopRowData()[e.rowIndex];case"bottom":return this.pinnedRowModel.getPinnedBottomRowData()[e.rowIndex];default:return this.rowModel.getRow(e.rowIndex)}},t.prototype.sameRow=function(e,t){return!e&&!t||!(e&&!t||!e&&t)&&(e.rowIndex===t.rowIndex&&e.rowPinned==t.rowPinned)},t.prototype.before=function(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(o(t.rowPinned))return"top"!==t.rowPinned;break}return e.rowIndex<t.rowIndex},t.prototype.rowMax=function(e){var t,i=this;return e.forEach((function(e){(void 0===t||i.before(t,e))&&(t=e)})),t},t.prototype.rowMin=function(e){var t,i=this;return e.forEach((function(e){(void 0===t||i.before(e,t))&&(t=e)})),t},Cy([de("rowModel")],t.prototype,"rowModel",void 0),Cy([de("pinnedRowModel")],t.prototype,"pinnedRowModel",void 0),Cy([de("paginationProxy")],t.prototype,"paginationProxy",void 0),t=Cy([ue("rowPositionUtils")],t),t}(st),wy=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Sy=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Ey=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return wy(t,e),t.prototype.createId=function(e){var t=e.rowIndex,i=e.rowPinned,n=e.column;return this.createIdFromValues({rowIndex:t,column:n,rowPinned:i})},t.prototype.createIdFromValues=function(e){var t=e.rowIndex,i=e.rowPinned,n=e.column;return"".concat(t,".").concat(null==i?"null":i,".").concat(n.getId())},t.prototype.equals=function(e,t){var i=e.column===t.column,n=e.rowPinned===t.rowPinned,o=e.rowIndex===t.rowIndex;return i&&n&&o},t=Sy([ue("cellPositionUtils")],t),t}(st),xy=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Oy=function(){function e(e){this.cellValueChanges=e}return e}(),Ty=function(e){function t(t,i,n,o){var r=e.call(this,t)||this;return r.initialRange=i,r.finalRange=n,r.ranges=o,r}return xy(t,e),t}(Oy),Dy=function(){function e(t){this.actionStack=[],this.maxStackSize=t||e.DEFAULT_STACK_SIZE,this.actionStack=new Array(this.maxStackSize)}return e.prototype.pop=function(){return this.actionStack.pop()},e.prototype.push=function(e){var t=e.cellValueChanges&&e.cellValueChanges.length>0;t&&(this.actionStack.length===this.maxStackSize&&this.actionStack.shift(),this.actionStack.push(e))},e.prototype.clear=function(){this.actionStack=[]},e.prototype.getCurrentStackSize=function(){return this.actionStack.length},e.DEFAULT_STACK_SIZE=10,e}(),Ry=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ay=function(){return Ay=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Ay.apply(this,arguments)},_y=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Py=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},My=function(e,t,i){if(i||2===arguments.length)for(var n,o=0,r=t.length;o<r;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},ky=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.cellValueChanges=[],t.activeCellEdit=null,t.activeRowEdit=null,t.isPasting=!1,t.isRangeInAction=!1,t.onCellValueChanged=function(e){var i={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned},n=null!==t.activeCellEdit&&t.cellPositionUtils.equals(t.activeCellEdit,i),o=null!==t.activeRowEdit&&t.rowPositionUtils.sameRow(t.activeRowEdit,i),r=n||o||t.isPasting||t.isRangeInAction;if(r){var s=e.rowPinned,a=e.rowIndex,l=e.column,c=e.oldValue,u=e.value,d={rowPinned:s,rowIndex:a,columnId:l.getColId(),newValue:u,oldValue:c};t.cellValueChanges.push(d)}},t.clearStacks=function(){t.undoStack.clear(),t.redoStack.clear()},t}return Ry(t,e),t.prototype.init=function(){var e=this;if(this.gridOptionsService.get("undoRedoCellEditing")){var t=this.gridOptionsService.get("undoRedoCellEditing
11Limit");t<=0||(this.undoStack=new Dy(t),this.redoStack=new Dy(t),this.addRowEditingListeners(),this.addCellEditingListeners(),this.addPasteListeners(),this.addFillListeners(),this.addCellKeyListeners(),this.addManagedListener(this.eventService,ht.EVENT_CELL_VALUE_CHANGED,this.onCellValueChanged),this.addManagedListener(this.eventService,ht.EVENT_MODEL_UPDATED,(function(t){t.keepUndoRedoStack||e.clearStacks()})),this.addManagedListener(this.eventService,ht.EVENT_COLUMN_PIVOT_MODE_CHANGED,this.clearStacks),this.addManagedListener(this.eventService,ht.EVENT_NEW_COLUMNS_LOADED,this.clearStacks),this.addManagedListener(this.eventService,ht.EVENT_COLUMN_GROUP_OPENED,this.clearStacks),this.addManagedListener(this.eventService,ht.EVENT_COLUMN_ROW_GROUP_CHANGED,this.clearStacks),this.addManagedListener(this.eventService,ht.EVENT_COLUMN_MOVED,this.clearStacks),this.addManagedListener(this.eventService,ht.EVENT_COLUMN_PINNED,this.clearStacks),this.addManagedListener(this.eventService,ht.EVENT_COLUMN_VISIBLE,this.clearStacks),this.addManagedListener(this.eventService,ht.EVENT_ROW_DRAG_END,this.clearStacks),this.ctrlsService.whenReady((function(){e.gridBodyCtrl=e.ctrlsService.getGridBodyCtrl()})))}},t.prototype.getCurrentUndoStackSize=function(){return this.undoStack?this.undoStack.getCurrentStackSize():0},t.prototype.getCurrentRedoStackSize=function(){return this.redoStack?this.redoStack.getCurrentStackSize():0},t.prototype.undo=function(e){var t={type:ht.EVENT_UNDO_STARTED,source:e};this.eventService.dispatchEvent(t);var i=this.undoRedo(this.undoStack,this.redoStack,"initialRange","oldValue","undo"),n={type:ht.EVENT_UNDO_ENDED,source:e,operationPerformed:i};this.eventService.dispatchEvent(n)},t.prototype.redo=function(e){var t={type:ht.EVENT_REDO_STARTED,source:e};this.eventService.dispatchEvent(t);var i=this.undoRedo(this.redoStack,this.undoStack,"finalRange","newValue","redo"),n={type:ht.EVENT_REDO_ENDED,source:e,operationPerformed:i};this.eventService.dispatchEvent(n)},t.prototype.undoRedo=function(e,t,i,n,o){if(!e)return!1;var r=e.pop();return!(!r||!r.cellValueChanges)&&(this.processAction(r,(function(e){return e[n]}),o),r instanceof Ty?this.processRange(r.ranges||[r[i]]):this.processCell(r.cellValueChanges),t.push(r),!0)},t.prototype.processAction=function(e,t,i){var n=this;
11e.cellValueChanges.forEach((function(e){var o=e.rowIndex,r=e.rowPinned,s=e.columnId,a={rowIndex:o,rowPinned:r},l=n.getRowNode(a);l.displayed&&l.setDataValue(s,t(e),i)}))},t.prototype.processRange=function(e){var t,i=this;this.rangeService.removeAllCellRanges(!0),e.forEach((function(n,o){if(n){var r=n.startRow,s=n.endRow;o===e.length-1&&(t={rowPinned:r.rowPinned,rowIndex:r.rowIndex,columnId:n.startColumn.getColId()},i.setLastFocusedCell(t));var a={rowStartIndex:r.rowIndex,rowStartPinned:r.rowPinned,rowEndIndex:s.rowIndex,rowEndPinned:s.rowPinned,columnStart:n.startColumn,columns:n.columns};i.rangeService.addCellRange(a)}}))},t.prototype.processCell=function(e){var t=e[0],i=t.rowIndex,n=t.rowPinned,o={rowIndex:i,rowPinned:n},r=this.getRowNode(o),s={rowPinned:t.rowPinned,rowIndex:r.rowIndex,columnId:t.columnId};this.setLastFocusedCell(s,!!this.rangeService)},t.prototype.setLastFocusedCell=function(e,t){var i=e.rowIndex,n=e.columnId,o=e.rowPinned,r=this.gridBodyCtrl.getScrollFeature(),s=this.columnModel.getGridColumn(n);if(s){r.ensureIndexVisible(i),r.ensureColumnVisible(s);var a={rowIndex:i,column:s,rowPinned:o};this.focusService.setFocusedCell(Ay(Ay({},a),{forceBrowserFocus:!0})),t&&this.rangeService.setRangeToCell(a)}},t.prototype.addRowEditingListeners=function(){var e=this;this.addManagedListener(this.eventService,ht.EVENT_ROW_EDITING_STARTED,(function(t){e.activeRowEdit={rowIndex:t.rowIndex,rowPinned:t.rowPinned}})),this.addManagedListener(this.eventService,ht.EVENT_ROW_EDITING_STOPPED,(function(){var t=new Oy(e.cellValueChanges);e.pushActionsToUndoStack(t),e.activeRowEdit=null}))},t.prototype.addCellEditingListeners=function(){var e=this;this.addManagedListener(this.eventService,ht.EVENT_CELL_EDITING_STARTED,(function(t){e.activeCellEdit={column:t.column,rowIndex:t.rowIndex,rowPinned:t.rowPinned}})),this.addManagedListener(this.eventService,ht.EVENT_CELL_EDITING_STOPPED,(function(t){e.activeCellEdit=null;var i=t.valueChanged&&!e.activeRowEdit&&!e.isPasting&&!e.isRangeInAction;if(i){var n=new Oy(e.cellValueChanges);e.pushActionsToUndoStack(n)}}))},t.prototype.addPasteListeners=function(){var e=this;this.addManagedListener(this.eventService,ht.EVENT_PASTE_START,(function(){e.isPasting=!0})),this.addManagedListener(this.eventService,ht.EVENT_PASTE_END,(function(){var t=new Oy(e.cellValueChanges);e.pushActionsToUndoStack(t),e.isPasting=!1}))},t.prototype.addFillListeners=function(){var e=this;this.addManagedListener(this.eventService,ht.EVENT_FILL_START,(function(){e.isRangeInAction=!0})),this.addManagedListener(this.eventService,ht.EVENT_FILL_END,(function(t){var i=new Ty(e.cellValueChanges,t.initialRange,t.finalRange);e.pushActionsToUndoStack(i),e.isRangeInAction=!1}))},t.prototype.addCellKeyListeners=function(){var e=this;this.addManagedListener(this.eventService,ht.EVENT_KEY_SHORTCUT_CHANGED_CELL_START,(function(){e.isRangeInAction=!0})),this.addManagedListener(this.eventService,ht.EVENT_KEY_SHORTCUT_CHANGED_CELL_END,(function(){var t;t=e.rangeService&&e.gridOptionsService.get("enableRangeSelection")?new Ty(e.cellValueChanges,void 0,void 0,My([],Py(e.rangeService.getCellRanges()),!1)):new Oy(e.cellValueChanges),e.pushActionsToUndoStack(t),e.isRangeInAction=!1}))},t.prototype.pushActionsToUndoStack=function(e){this.undoStack.push(e),this.cellValueChanges=[],this.redoStack.clear()},t.prototype.getRowNode=function(e){switch(e.rowPinned){case"top":return this.pinnedRowModel.getPinnedTopRowData()[e.rowIndex];case"bottom":return this.pinnedRowModel.getPinnedBottomRowData()[e.rowIndex];default:return this.rowModel.getRow(e.rowIndex)}},_y([de("focusService")],t.prototype,"focusService",void 0),_y([de("ctrlsService")],t.prototype,"ctrlsService",void 0),_y([de("rowModel")],t.prototype,"rowModel",void 0),_y([de("pinnedRowModel")],t.prototype,"pinnedRowModel",void 0),_y([de("cellPositionUtils")],t.prototype,"cellPositionUtils",void 0),_y([de("rowPositionUtils")],t.prototype,"rowPositionUtils",void 0),_y([de("columnModel")],t.prototype,"columnModel",void 0),_y([pe("rangeService")],t.prototype,"rangeService",void 0),_y([le],t.prototype,"init",null),t=_y([ue("undoRedoService")],t),t}(st),Ny=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ly=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Iy=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ny(t,e),t.prototype.findHeader=function(e,t){var i,n,o;if(e.column instanceof pt?(n="getDisplayedGroup".concat(t),i=this.columnModel[n](e.column)):(o="getDisplayedCol".concat(t),i=this.columnModel[o](e.column)),i){var r=e.headerRowIndex,s=this.getHeaderRowType(r);if(s===Vd.COLUMN_GROUP){var a=i;if(a.isPadding()&&this.isAnyChildSpanningHeaderHeight(a)){var l=this.getColumnVisibleChild(a,r,t),c=l.nextFocusColumn,u=l.nextRow;c&&(i=c,r=u)}}return{column:i,headerRowIndex:r}}},t.prototype.isAnyChildSpanningHeaderHeight=function(e){return!!e&&e.getLeafColumns().some((function(e){return e.isSpanHeaderHeight()}))},t.prototype.getColumnVisibleParent=function(e,t){var i=this.getHeaderRowType(t),n=i===Vd.FLOATING_FILTER,o=i===Vd.COLUMN,r=n?e:e.getParent(),s=t-1;if(o&&this.isAnyChildSpanningHeaderHeight(e.getParent())){while(r&&r.isPadding())r=r.getParent(),s--;s<0&&(r=e,s=t)}return{nextFocusColumn:r,nextRow:s}},t.prototype.getColumnVisibleChild=function(e,t,i){void 0===i&&(i="After");var n=this.getHeaderRowType(t),o=e,r=t+1;if(n===Vd.COLUMN_GROUP){var s=e.getDisplayedLeafColumns(),a="After"===i?s[0]:Ae(s);if(this.isAnyChildSpanningHeaderHeight(a.getParent())){o=a;var l=a.getParent();while(l&&l!==e)l=l.getParent(),r++}else o=e.getDisplayedChildren()[0]}return{nextFocusColumn:o,nextRow:r}},t.prototype.getHeaderRowType=function(e){var t=this.ctrlsService.getHeaderRowContainerCtrl();if(t)return t.getRowType(e)},t.prototype.findColAtEdgeForHeaderRow=function(e,t){var i=this.columnModel.getAllDisplayedColumns(),n=i["start"===t?0:i.length-1];if(n){var o=this.ctrlsService.getHeaderRowContainerCtrl(n.getPinned()),r=o.getRowType(e);if(r==Vd.COLUMN_GROUP){var s=this.columnModel.getColumnGroupAtLevel(n,e);return{headerRowIndex:e,column:s}}return{headerRowIndex:null==r?-1:e,column:n}}},Ly([de("columnModel")],t.prototype,"columnModel",void 0),Ly([de("ctrlsService")],t.prototype,"ctrlsService",void 0),t=Ly([ue("headerPositionUtils")],t),t}(st),Fy=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Gy=function(){function e(){}return e.prototype.buildColumnDefs=function(e,t,i){var n=this,o=[],r={};return e.forEach((function(e){var s=n.createDefFromColumn(e,t,i),a=!0,l=s,c=e.getOriginalParent(),u=null;while(c){var d=null;if(c.isPadding())c=c.getOriginalParent();else{var p=r[c.getGroupId()];if(p){p.children.push(l),a=!1;break}
vendor: 15,032 bytes, line 11
11if(d=n.createDefFromGroup(c),d&&(d.children=[l],r[d.groupId]=d,l=d,c=c.getOriginalParent()),null!=c&&u===c){a=!1;break}u=c}}a&&o.push(l)})),o},e.prototype.createDefFromGroup=function(e){var t=w(e.getColGroupDef(),["children"]);return t&&(t.groupId=e.getGroupId()),t},e.prototype.createDefFromColumn=function(e,t,i){var n=w(e.getColDef());return n.colId=e.getColId(),n.width=e.getActualWidth(),n.rowGroup=e.isRowGroupActive(),n.rowGroupIndex=e.isRowGroupActive()?t.indexOf(e):null,n.pivot=e.isPivotActive(),n.pivotIndex=e.isPivotActive()?i.indexOf(e):null,n.aggFunc=e.isValueActive()?e.getAggFunc():null,n.hide=!e.isVisible()||void 0,n.pinned=e.isPinned()?e.getPinned():null,n.sort=e.getSort()?e.getSort():null,n.sortIndex=null!=e.getSortIndex()?e.getSortIndex():null,n},e=Fy([ue("columnDefFactory")],e),e}(),Vy=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},By=function(){function e(){}return e.prototype.getInitialRowClasses=function(e){var t=[];return o(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"),We(t,this.processClassesFromGridOptions(e.rowNode)),We(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},e.prototype.processClassesFromGridOptions=function(e){var t=[],i=function(e){"string"===typeof e?t.push(e):Array.isArray(e)&&e.forEach((function(e){return t.push(e)}))},n=this.gridOptionsService.get("rowClass");if(n){if("function"===typeof n)return console.warn("AG Grid: rowClass should not be a function, please use getRowClass instead"),[];i(n)}var o=this.gridOptionsService.getCallback("getRowClass");if(o){var r={data:e.data,node:e,rowIndex:e.rowIndex},s=o(r);i(s)}return t},e.prototype.preProcessRowClassRules=function(e){var t=[];return this.processRowClassRules(e,(function(e){t.push(e)}),(function(e){})),t},e.prototype.processRowClassRules=function(e,t,i){var n={data:e.data,node:e,rowIndex:e.rowIndex,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context};this.stylingService.processClassRules(void 0,this.gridOptionsService.get("rowClassRules"),n,t,i)},e.prototype.calculateRowLevel=function(e){return e.group?e.level:e.parent?e.parent.level+1:0},Vy([de("stylingService")],e.prototype,"stylingService",void 0),Vy([de("gridOptionsService")],e.prototype,"gridOptionsService",void 0),e=Vy([ue("rowCssClassCalculator")],e),e}(),jy=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Hy=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Wy=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return jy(t,e),t.prototype.init=function(){var e=this;this.isAccentedSort=this.gridOptionsService.get("accentedSort"),this.primaryColumnsSortGroups=this.gridOptionsService.isColumnsSortingCoupledToGroup(),this.addManagedPropertyListener("accentedSort",(function(t){return e.isAccentedSort=t.currentValue})),this.addManagedPropertyListener("autoGroupColumnDef",(function(){return e.primaryColumnsSortGroups=e.gridOptionsService.isColumnsSortingCoupledToGroup()}))},t.prototype.doFullSort=function(e,t){var i=function(e,t){return{currentPos:t,rowNode:e}},n=e.map(i);return n.sort(this.compareRowNodes.bind(this,t)),n.map((function(e){return e.rowNode}))},t.prototype.compareRowNodes=function(e,t,i){for(var n=t.rowNode,o=i.rowNode,r=0,s=e.length;r<s;r++){var a=e[r],l="desc"===a.sort,c=this.getValue(n,a.column),u=this.getValue(o,a.column),d=void 0,p=this.getComparator(a,n);d=p?p(c,u,n,o,l):Ko.defaultComparator(c,u,this.isAccentedSort);var h=!isNaN(d);if(h&&0!==d)return"asc"===a.sort?d:-1*d}return t.currentPos-i.currentPos},t.prototype.getComparator=function(e,t){var i=e.column,n=i.getColDef().comparator;if(null!=n)return n;if(i.getColDef().showRowGroup){var o=!t.group&&i.getColDef().field;if(o){var r=this.columnModel.getPrimaryColumn(o);if(r)return r.getColDef().comparator}}},t.prototype.getValue=function(e,t){var i,n;if(!this.primaryColumnsSortGroups)return this.valueService.getValue(t,e,!1,!1);var o=e.rowGroupColumn===t;if(o){var r=this.gridOptionsService.isGroupUseEntireRow(this.columnModel.isPivotActive());if(r){var s=null===(i=e.allLeafChildren)||void 0===i?void 0:i[0];return s?this.valueService.getValue(t,s,!1,!1):void 0}var a=this.columnModel.getGroupDisplayColumnForGroup(t.getId());if(!a)return;return null===(n=e.groupData)||void 0===n?void 0:n[a.getId()]}return e.group&&t.getColDef().showRowGroup?void 0:this.valueService.getValue(t,e,!1,!1)},Hy([de("valueService")],t.prototype,"valueService",void 0),Hy([de("columnModel")],t.prototype,"columnModel",void 0),Hy([le],t.prototype,"init",null),t=Hy([ue("rowNodeSorter")],t),t}(st),Uy=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),zy=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Ky=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.ready=!1,t.readyCallbacks=[],t}var i;return Uy(t,e),i=t,t.prototype.checkReady=function(){if(this.ready=null!=this.gridCtrl&&null!=this.gridBodyCtrl&&null!=this.centerRowContainerCtrl&&null!=this.leftRowContainerCtrl&&null!=this.rightRowContainerCtrl&&null!=this.bottomCenterRowContainerCtrl&&null!=this.bottomLeftRowContainerCtrl&&null!=this.bottomRightRowContainerCtrl&&null!=this.topCenterRowContainerCtrl&&null!=this.topLeftRowContainerCtrl&&null!=this.topRightRowContainerCtrl&&null!=this.stickyTopCenterRowContainerCtrl&&null!=this.stickyTopLeftRowContainerCtrl&&null!=this.stickyTopRightRowContainerCtrl&&null!=this.centerHeaderRowContainerCtrl&&null!=this.leftHeaderRowContainerCtrl&&null!=this.rightHeaderRowContainerCtrl&&null!=this.fakeHScrollComp&&null!=this.fakeVScrollComp&&null!=this.gridHeaderCtrl,this.ready){var e=this.createReadyParams();this.readyCallbacks.forEach((function(t){return t(e)})),this.readyCallbacks.length=0}},t.prototype.whenReady=function(e){this.ready?e(this.createReadyParams()):this.readyCallbacks.push(e)},t.prototype.createReadyParams=function(){return{centerRowContainerCtrl:this.centerRowContainerCtrl,leftRowContainerCtrl:this.leftRowContainerCtrl,rightRowContainerCtrl:this.rightRowContainerCtrl,bottomCenterRowContainerCtrl:this.bottomCenterRowContainerCtrl,bottomLeftRowContainerCtrl:this.bottomLeftRowContainerCtrl,bottomRightRowContainerCtrl:this.bottomRightRowContainerCtrl,topCenterRowContainerCtrl:this.topCenterRowContainerCtrl,topLeftRowContainerCtrl:this.topLeftRowContainerCtrl,topRightRowContainerCtrl:this.topRightRowContainerCtrl,stickyTopCenterRowContainerCtrl:this.stickyTopCenterRowContainerCtrl,stickyTopLeftRowContainerCtrl:this.stickyTopLeftRowContainerCtrl,stickyTopRightRowContainerCtrl:this.stickyTopRightRowContainerCtrl,centerHeaderRowContainerCtrl:this.centerHeaderRowContainerCtrl,leftHeaderRowContainerCtrl:this.leftHeaderRowContainerCtrl,rightHeaderRowContainerCtrl:this.rightHeaderRowContainerCtrl,fakeHScrollComp:this.fakeHScrollComp,fakeVScrollComp:this.fakeVScrollComp,gridBodyCtrl:this.gridBodyCtrl,gridCtrl:this.gridCtrl,gridHeaderCtrl:this.gridHeaderCtrl}},t.prototype.registerFakeHScrollComp=function(e){this.fakeHScrollComp=e,this.checkReady()},t.prototype.registerFakeVScrollComp=function(e){this.fakeVScrollComp=e,this.checkReady()},t.prototype.registerGridHeaderCtrl=function(e){this.gridHeaderCtrl=e,this.checkReady()},t.prototype.registerCenterRowContainerCtrl=function(e){this.centerRowContainerCtrl=e,this.checkReady()},t.prototype.registerLeftRowContainerCtrl=function(e){this.leftRowContainerCtrl=e,this.checkReady()},t.prototype.registerRightRowContainerCtrl=function(e){this.rightRowContainerCtrl=e,this.checkReady()},t.prototype.registerTopCenterRowContainerCtrl=function(e){this.topCenterRowContainerCtrl=e,this.checkReady()},t.prototype.registerTopLeftRowContainerCon=function(e){this.topLeftRowContainerCtrl=e,this.checkReady()},t.prototype.registerTopRightRowContainerCtrl=function(e){this.topRightRowContainerCtrl=e,this.checkReady()},t.prototype.registerStickyTopCenterRowContainerCtrl=function(e){this.stickyTopCenterRowContainerCtrl=e,this.checkReady()},t.prototype.registerStickyTopLeftRowContainerCon=function(e){this.stickyTopLeftRowContainerCtrl=e,this.checkReady()},t.prototype.registerStickyTopRightRowContainerCtrl=function(e){this.stickyTopRightRowContainerCtrl=e,this.checkReady()},t.prototype.registerBottomCenterRowContainerCtrl=function(e){this.bottomCenterRowContainerCtrl=e,this.checkReady()},t.prototype.registerBottomLeftRowContainerCtrl=function(e){this.bottomLeftRowContainerCtrl=e,this.checkReady()},t.prototype.registerBottomRightRowContainerCtrl=function(e){this.bottomRightRowContainerCtrl=e,this.checkReady()},t.prototype.registerHeaderContainer=function(e,t){switch(t){case"left":this.leftHeaderRowContainerCtrl=e;break;case"right":this.rightHeaderRowContainerCtrl=e;break;default:this.centerHeaderRowContainerCtrl=e;break}this.checkReady()},t.prototype.registerGridBodyCtrl=function(e){this.gridBodyCtrl=e,this.checkReady()},t.prototype.registerGridCtrl=function(e){this.gridCtrl=e,this.checkReady()},t.prototype.getFakeHScrollComp=function(){return this.fakeHScrollComp},t.prototype.getFakeVScrollComp=function(){return this.fakeVScrollComp},t.prototype.getGridHeaderCtrl=function(){return this.gridHeaderCtrl},t.prototype.getGridCtrl=function(){return this.gridCtrl},t.prototype.getCenterRowContainerCtrl=function(){return this.centerRowContainerCtrl},t.prototype.getTopCenterRowContainerCtrl=function(){return this.topCenterRowContainerCtrl},t.prototype.getBottomCenterRowContainerCtrl=function(){return this.bottomCenterRowContainerCtrl},t.prototype.getStickyTopCenterRowContainerCtrl=function(){return this.stickyTopCenterRowContainerCtrl},t.prototype.getGridBodyCtrl=function(){return this.gridBodyCtrl},t.prototype.getHeaderRowContainerCtrls=function(){return[this.leftHeaderRowContainerCtrl,this.rightHeaderRowContainerCtrl,this.centerHeaderRowContainerCtrl]},t.prototype.getHeaderRowContainerCtrl=function(e){switch(e){case"left":return this.leftHeaderRowContainerCtrl;case"right":return this.rightHeaderRowContainerCtrl;default:return this.centerHeaderRowContainerCtrl}},t.NAME="ctrlsService",t=i=zy([ue(i.NAME)],t),t}(st),Yy=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),qy=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Xy=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.registry={},t}return Yy(t,e),t.prototype.register=function(e){this.registry[e.controllerName]=e.controllerClass},t.prototype.getInstance=function(e){var t=this.registry[e];if(null!=t)return new t},t=qy([ue("ctrlsFactory")],t),t}(st),$y=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Zy=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Jy=function(e){function t(t,i){var n=e.call(this,t)||this;return n.direction=i,n.hideTimeout=null,n}return $y(t,e),t.prototype.postConstruct=function(){this.addManagedListener(this.eventService,ht.EVENT_SCROLL_VISIBILITY_CHANGED,this.onScrollVisibilityChanged.bind(this)),this.onScrollVisibilityChanged(),this.addOrRemoveCssClass("ag-apple-scrollbar",Zi()||Ji())},t.prototype.initialiseInvisibleScrollbar=function(){void 0===this.invisibleScrollbar&&(this.invisibleScrollbar=an(),this.invisibleScrollbar&&(this.hideAndShowInvisibleScrollAsNeeded(),this.addActiveListenerToggles())
11)},t.prototype.addActiveListenerToggles=function(){var e=this,t=["mouseenter","mousedown","touchstart"],i=["mouseleave","touchend"],n=this.getGui();t.forEach((function(t){return e.addManagedListener(n,t,(function(){return e.addOrRemoveCssClass("ag-scrollbar-active",!0)}))})),i.forEach((function(t){return e.addManagedListener(n,t,(function(){return e.addOrRemoveCssClass("ag-scrollbar-active",!1)}))}))},t.prototype.onScrollVisibilityChanged=function(){var e=this;void 0===this.invisibleScrollbar&&this.initialiseInvisibleScrollbar(),this.animationFrameService.requestAnimationFrame((function(){return e.setScrollVisible()}))},t.prototype.hideAndShowInvisibleScrollAsNeeded=function(){var e=this;this.addManagedListener(this.eventService,ht.EVENT_BODY_SCROLL,(function(t){t.direction===e.direction&&(null!==e.hideTimeout&&(window.clearTimeout(e.hideTimeout),e.hideTimeout=null),e.addOrRemoveCssClass("ag-scrollbar-scrolling",!0))})),this.addManagedListener(this.eventService,ht.EVENT_BODY_SCROLL_END,(function(){e.hideTimeout=window.setTimeout((function(){e.addOrRemoveCssClass("ag-scrollbar-scrolling",!1),e.hideTimeout=null}),400)}))},t.prototype.attemptSettingScrollPosition=function(e){var t=this,i=this.getViewport();X((function(){return zn(i)}),(function(){return t.setScrollPosition(e)}),100)},t.prototype.getViewport=function(){return this.eViewport},t.prototype.getContainer=function(){return this.eContainer},t.prototype.onScrollCallback=function(e){this.addManagedListener(this.getViewport(),"scroll",e)},Zy([sr("eViewport")],t.prototype,"eViewport",void 0),Zy([sr("eContainer")],t.prototype,"eContainer",void 0),Zy([de("scrollVisibleService")],t.prototype,"scrollVisibleService",void 0),Zy([de("ctrlsService")],t.prototype,"ctrlsService",void 0),Zy([de("animationFrameService")],t.prototype,"animationFrameService",void 0),t}(rr),Qy=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),em=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},tm=function(e){function t(){return e.call(this,t.TEMPLATE,"horizontal")||this}return Qy(t,e),t.prototype.postConstruct=function(){var t=this;e.prototype.postConstruct.call(this);var i=this.setFakeHScrollSpacerWidths.bind(this);this.addManagedListener(this.eventService,ht.EVENT_DISPLAYED_COLUMNS_CHANGED,i),this.addManagedListener(this.eventService,ht.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,i),this.addManagedListener(this.eventService,ht.EVENT_PINNED_ROW_DATA_CHANGED,this.onPinnedRowDataChanged.bind(this)),this.addManagedPropertyListener("domLayout",i),this.ctrlsService.registerFakeHScrollComp(this),this.createManagedBean(new rd((function(e){return t.eContainer.style.width="".concat(e,"px")}))),this.addManagedPropertyListeners(["suppressHorizontalScroll"],this.onScrollVisibilityChanged.bind(this))},t.prototype.initialiseInvisibleScrollbar=function(){void 0===this.invisibleScrollbar&&(this.enableRtl=this.gridOptionsService.get("enableRtl"),e.prototype.initialiseInvisibleScrollbar.call(this),this.invisibleScrollbar&&this.refreshCompBottom())},t.prototype.onPinnedRowDataChanged=function(){this.refreshCompBottom()},t.prototype.refreshCompBottom=function(){if(this.invisibleScrollbar){var e=this.pinnedRowModel.getPinnedBottomTotalHeight();this.getGui().style.bottom="".concat(e,"px")}},t.prototype.onScrollVisibilityChanged=function(){e.prototype.onScrollVisibilityChanged.call(this),this.setFakeHScrollSpacerWidths()},t.prototype.setFakeHScrollSpacerWidths=function(){var e=this.scrollVisibleService.isVerticalScrollShowing(),t=this.columnModel.getDisplayedColumnsRightWidth(),i=!this.enableRtl&&e,n=this.gridOptionsService.getScrollbarWidth();i&&(t+=n),no(this.eRightSpacer,t),this.eRightSpacer.classList.toggle("ag-scroller-corner",t<=n);var o=this.columnModel.getDisplayedColumnsLeftWidth(),r=this.enableRtl&&e;r&&(o+=n),no(this.eLeftSpacer,o),this.eLeftSpacer.classList.toggle("ag-scroller-corner",o<=n)},t.prototype.setScrollVisible=function(){var e=this.scrollVisibleService.isHorizontalScrollShowing(),t=this.invisibleScrollbar,
11i=this.gridOptionsService.get("suppressHorizontalScroll"),n=e&&this.gridOptionsService.getScrollbarWidth()||0,o=0===n&&t?16:n,r=i?0:o;this.addOrRemoveCssClass("ag-scrollbar-invisible",t),ro(this.getGui(),r),ro(this.eViewport,r),ro(this.eContainer,r),this.setDisplayed(e,{skipAriaHidden:!0})},t.prototype.getScrollPosition=function(){return jn(this.getViewport(),this.enableRtl)},t.prototype.setScrollPosition=function(e){zn(this.getViewport())||this.attemptSettingScrollPosition(e),Hn(this.getViewport(),e,this.enableRtl)},t.TEMPLATE='<div class="ag-body-horizontal-scroll" aria-hidden="true">\n            <div class="ag-horizontal-left-spacer" ref="eLeftSpacer"></div>\n            <div class="ag-body-horizontal-scroll-viewport" ref="eViewport">\n                <div class="ag-body-horizontal-scroll-container" ref="eContainer"></div>\n            </div>\n            <div class="ag-horizontal-right-spacer" ref="eRightSpacer"></div>\n        </div>',em([sr("eLeftSpacer")],t.prototype,"eLeftSpacer",void 0),em([sr("eRightSpacer")],t.prototype,"eRightSpacer",void 0),em([de("columnModel")],t.prototype,"columnModel",void 0),em([de("pinnedRowModel")],t.prototype,"pinnedRowModel",void 0),em([le],t.prototype,"postConstruct",null),t}(Jy),im=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),nm=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},om=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return im(t,e),t.prototype.postConstruct=function(){var e=this.checkContainerWidths.bind(this);this.addManagedListener(this.eventService,ht.EVENT_DISPLAYED_COLUMNS_CHANGED,e),this.addManagedListener(this.eventService,ht.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,e),this.addManagedPropertyListener("domLayout",e)},t.prototype.checkContainerWidths=function(){var e=this.gridOptionsService.isDomLayout("print"),t=e?0:this.columnModel.getDisplayedColumnsLeftWidth(),i=e?0:this.columnModel.getDisplayedColumnsRightWidth();t!=this.leftWidth&&(this.leftWidth=t,this.eventService.dispatchEvent({type:ht.EVENT_LEFT_PINNED_WIDTH_CHANGED})),i!=this.rightWidth&&(this.rightWidth=i,this.eventService.dispatchEvent({type:ht.EVENT_RIGHT_PINNED_WIDTH_CHANGED}))},t.prototype.getPinnedRightWidth=function(){return this.rightWidth},t.prototype.getPinnedLeftWidth=function(){return this.leftWidth},nm([de("columnModel")],t.prototype,"columnModel",void 0),nm([le],t.prototype,"postConstruct",null),t=nm([ue("pinnedWidthService")],t),t}(st),rm=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),sm=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},am=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.events=[],t}return rm(t,e),t.prototype.postConstruct=function(){"clientSide"==this.rowModel.getType()&&(this.clientSideRowModel=this.rowModel)},t.prototype.dispatchExpanded=function(e){var t=this;if(null!=this.clientSideRowModel){this.events.push(e);var i=function(){t.clientSideRowModel&&t.clientSideRowModel.onRowGroupOpened(),t.events.forEac
11h((function(e){return t.eventService.dispatchEvent(e)})),t.events=[]};null==this.dispatchExpandedDebounced&&(this.dispatchExpandedDebounced=this.animationFrameService.debounce(i)),this.dispatchExpandedDebounced()}else this.eventService.dispatchEvent(e)},sm([de("animationFrameService")],t.prototype,"animationFrameService",void 0),sm([de("rowModel")],t.prototype,"rowModel",void 0),sm([le],t.prototype,"postConstruct",null),t=sm([ue("rowNodeEventThrottle")],t),t}(st),lm={},cm=function(e,t){var i;return"clientSide"===(null!==(i=t.rowModelType)&&void 0!==i?i:"clientSide")?{module:J.RowGroupingModule}:null},um={enableRowGroup:cm,rowGroup:cm,rowGroupIndex:cm,enablePivot:cm,enableValue:cm,pivot:cm,pivotIndex:cm,aggFunc:cm,cellEditor:function(e){return"agRichSelect"===e.cellEditor||"agRichSelectCellEditor"===e.cellEditor?{module:J.RichSelectModule}:null},menuTabs:function(e){var t,i=["columnsMenuTab","generalMenuTab"];return(null===(t=e.menuTabs)||void 0===t?void 0:t.some((function(e){return i.includes(e)})))?{module:J.MenuModule}:null},columnsMenuParams:{module:[J.MenuModule,J.ColumnsToolPanelModule]},headerCheckboxSelection:{supportedRowModels:["clientSide","serverSide"],dependencies:function(e,t){var i=t.rowSelection;return"multiple"===i?null:"headerCheckboxSelection is only supported with rowSelection=multiple"}},headerCheckboxSelectionFilteredOnly:{supportedRowModels:["clientSide"],dependencies:function(e,t){var i=t.rowSelection;return"multiple"===i?null:"headerCheckboxSelectionFilteredOnly is only supported with rowSelection=multiple"}},headerCheckboxSelectionCurrentPageOnly:{supportedRowModels:["clientSide"],dependencies:function(e,t){var i=t.rowSelection;return"multiple"===i?null:"headerCheckboxSelectionCurrentPageOnly is only supported with rowSelection=multiple"}},children:function(){return dm}},dm={objectName:"colDef",allProperties:Hl.ALL_PROPERTIES,docsUrl:"column-properties/",deprecations:lm,validations:um},pm=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},hm=function(e,t,i){if(i||2===arguments.length)for(var n,o=0,r=t.length;o<r;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},fm={enableChartToolPanelsButton:{version:"29",message:"The Chart Tool Panels button is now enabled by default. To hide the Chart Tool Panels button and display the hamburger button instead, set suppressChartToolPanelsButton=true."},functionsPassive:{version:"29.2"},onColumnRowGroupChangeRequest:{version:"29.2"},onColumnPivotChangeRequest:{version:"29.2"},onColumnValueChangeRequest:{version:"29.2"},onColumnAggFuncChangeRequest:{version:"29.2"},serverSideFilterAllLevels:{version:"30",message:"All server-side group levels are now filtered by default. This can be toggled using `serverSideOnlyRefreshFilteredGroups`."},suppressAggAtRootLevel:{version:"30",message:"The root level aggregation is now suppressed by default. This can be toggled using  `alwaysAggregateAtRootLevel`."},excludeHiddenColumnsFromQuickFilter:{version:"30",message:"Hidden columns are now excluded from the Quick Filter by default. This can be toggled using `includeHiddenColumnsInQuickFilter`."},enterMovesDown:{version:"30",renamed:"enterNavigatesVertically"},enterMovesDownAfterEdit:{version:"30",renamed:"enterNavigatesVerticallyAfterEdit"},suppressParentsInRowNodes:{version:"30.2",message:"Using suppressParentsInRowNodes is no longer recommended. To serialize nodes it is now recommended to instead remove the parent node reference before serialization."},advancedFilterModel:{version:"31",message:"Use `initialState.filter.advancedFilterModel` instead."},suppressAsyncEvents:{version:"31",message:"Events should be handled asynchronously."}},gm={suppressContextMenu:!1,preventDefaultOnContextMenu:!1,allowContextMenuWithControlKey:!1,suppressMenuHide:!1,enableBrowserTooltips:!1,tooltipTrigger:"hover",tooltipShowDelay:2e3,tooltipHideDelay:1e4,tooltipMouseTrack:!1,tooltipInteraction:!1,copyHeadersToClipboard:!1,copyGroupHeadersToClipboard:!1,clipboardDelimiter:"\t",suppressCopyRowsToClipboard:!1,suppressCopySingleCellRanges:!1,suppressLastEmptyLineOnPaste:!1,suppressClipboardPaste:!1,suppressClipboardApi:!1,suppressCutToClipboard:!1,maintainColumnOrder:!1,suppressFieldDotNotation:!1,allowDragFromColumnsToolPanel:!1,suppressMovableColumns:!1,suppressColumnMoveAnimation:!1,suppressDragLeaveHidesColumns:!1,suppressRowGroupHidesColumns:!1,suppressAutoSize:!1,autoSizePadding:20,skipHeaderOnAutoSize:!1,singleClickEdit:!1,suppressClickEdit:!1,readOnlyEdit:!1,stopEditingWhenCellsLoseFocus:!1,enterNavigatesVertically:!1,enterNavigatesVerticallyAfterEdit:!1,enableCellEditingOnBackspace:!1,undoRedoCellEditing:!1,undoRedoCellEditingLimit:10,suppressCsvExport:!1,suppressExcelExport:!1,cacheQuickFilter:!1,includeHiddenColumnsInQuickFilter:!1,excludeChildrenWhenTreeDataFiltering:!1,enableAdvancedFilter:!1,includeHiddenColumnsInAdvancedFilter:!1,enableCharts:!1,suppressChartToolPanelsButton:!1,masterDetail:!1,keepDetailRows:!1,keepDetailRowsCount:10,detailRowAutoHeight:!1,tabIndex:0,rowBuffer:10,valueCache:!1,valueCacheNeverExpires:!1,enableCellExpressions:!1,suppressTouch:!1,suppressFocusAfterRefresh:!1,suppressAsyncEvents:!1,suppressBrowserResizeObserver:!1,suppressPropertyNamesCheck:!1,suppressChangeDetection:!1,debug:!1,suppressLoadingOverlay:!1,suppressNoRowsOverlay:!1,pagination:!1,paginationPageSize:100,paginationPageSizeSelector:!0,paginationAutoPageSize:!1,paginateChildRows:!1,suppressPaginationPanel:!1,pivotMode:!1,pivotPanelShow:"never",pivotDefaultExpanded:0,pivotSuppressAutoColumn:!1,suppressExpandablePivotGroups:!1,functionsReadOnly:!1,suppressAggFuncInHeader:!1,alwaysAggregateAtRootLevel:!1,aggregateOnlyChangedColumns:!1,suppressAggFilteredOnly:!1,removePivotHeaderRowWhenSingleValueColumn:!1,animateRows:!0,enableCellChangeFlash:!1,cellFlashDelay:500,cellFadeDelay: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,suppressMultiRangeSelection:!1,enableCellTextSelection:!1,enableRangeSelection:!1,enableRangeHandle:!1,enableFillHandle:!1,fillHandleDirection:"xy",suppressClearOnFillReduction:!1,accentedSort:!1,unSortIcon:!1,suppressMultiSort:!1,alwaysMultiSort:!1,suppressMaintainUnsortedOrder:!1,suppressRowHoverHighlight:!1,suppressRowTransform:!1,columnHoverHighlight:!1,deltaSort:!1,enableGroupEdit:!1,suppressGroupMaintainValueType:!1,functionsPassive:!1,groupLockGroupColumns:0},vm={sideBar:{module:J.SideBarModule},statusBar:{module:J.StatusBarModule},enableCharts:{module:J.GridChartsModule}
11,getMainMenuItems:{module:J.MenuModule},getContextMenuItems:{module:J.MenuModule},allowContextMenuWithControlKey:{module:J.MenuModule},enableAdvancedFilter:{module:J.AdvancedFilterModule},treeData:{supportedRowModels:["clientSide","serverSide"],module:J.RowGroupingModule,dependencies:function(e){var t,i=null!==(t=e.rowModelType)&&void 0!==t?t:"clientSide";switch(i){case"clientSide":var n="treeData requires 'getDataPath' in the ".concat(i," row model.");return e.getDataPath?null:n;case"serverSide":var o="treeData requires 'isServerSideGroup' and 'getServerSideGroupKey' in the ".concat(i," row model.");return e.isServerSideGroup&&e.getServerSideGroupKey?null:o}return null}},masterDetail:{module:J.MasterDetailModule},enableRangeSelection:{module:J.RangeSelectionModule},enableRangeHandle:{dependencies:{enableRangeSelection:[!0]}},enableFillHandle:{dependencies:{enableRangeSelection:[!0]}},groupDefaultExpanded:{supportedRowModels:["clientSide"]},groupIncludeFooter:{supportedRowModels:["clientSide","serverSide"],dependencies:function(e){var t,i=null!==(t=e.rowModelType)&&void 0!==t?t:"clientSide";switch(i){case"clientSide":return null;case"serverSide":var n="groupIncludeFooter is not supported alongside suppressServerSideInfiniteScroll";return e.suppressServerSideInfiniteScroll?n:null}return null}},groupIncludeTotalFooter:{supportedRowModels:["clientSide"]},groupRemoveSingleChildren:{dependencies:{groupHideOpenParents:[void 0,!1],groupRemoveLowestSingleChildren:[void 0,!1]}},groupRemoveLowestSingleChildren:{dependencies:{groupHideOpenParents:[void 0,!1],groupRemoveSingleChildren:[void 0,!1]}},groupSelectsChildren:{dependencies:{rowSelection:["multiple"]}},suppressParentsInRowNodes:{dependencies:{groupSelectsChildren:[void 0,!1]}},viewportDatasource:{supportedRowModels:["viewport"],module:J.ViewportRowModelModule},serverSideDatasource:{supportedRowModels:["serverSide"],module:J.ServerSideRowModelModule},cacheBlockSize:{supportedRowModels:["serverSide","infinite"]},datasource:{supportedRowModels:["infinite"],module:J.InfiniteRowModelModule},rowData:{supportedRowModels:["clientSide"],module:J.ClientSideRowModelModule},columnDefs:function(){return dm},defaultColDef:function(){return dm},defaultColGroupDef:function(){return dm},autoGroupColumnDef:function(){return dm}},ym={objectName:"gridOptions",allProperties:hm(hm([],pm(qt.ALL_PROPERTIES),!1),pm(Jt.EVENT_CALLBACKS),!1),propertyExceptions:["api","columnApi"],docsUrl:"grid-options/",deprecations:fm,validations:vm},mm=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Cm=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},bm=function(e,t,i){if(i||2===arguments.length)for(var n,o=0,r=t.length;o<r;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},wm=function(){function e(){var e=this;this.destroyed=!1,this.domDataKey="__AG_"+Math.random().toString(),this.propertyEventService=new me,this.globalEventHandlerFactory=function(i){return function(n,o){if(!e.destroyed){var r=t.alwaysSyncGlobalEvents.has(n);if(!(r&&!i||!r&&i)){var s=Jt.getCallbackForEvent(n);"function"===typeof e.gridOptions[s]&&e.gridOptions[s](o)}}}}}var t;return t=e,Object.defineProperty(e.prototype,"context",{get:function(){return this.gridOptions["context"]},enumerable:!1,configurable:!0}),e.prototype.init=function(){this.columnApi=new Ug(this.api);var e=!this.get("suppressAsyncEvents");this.eventService.addGlobalListener(this.globalEventHandlerFactory().bind(this),e),this.eventService.addGlobalListener(this.globalEventHandlerFactory(!0).bind(this),!1),this.get
11ScrollbarWidth()},e.prototype.destroy=function(){this.destroyed=!0,this.columnApi=void 0},e.prototype.get=function(e){var t;return null!==(t=this.gridOptions[e])&&void 0!==t?t:gm[e]},e.prototype.getCallback=function(e){return this.mergeGridCommonParams(this.gridOptions[e])},e.prototype.exists=function(e){return o(this.gridOptions[e])},e.prototype.mergeGridCommonParams=function(e){var t=this;if(e){var i=function(i){var n=i;return n.api=t.api,n.columnApi=t.columnApi,n.context=t.context,e(n)};return i}return e},e.toBoolean=function(e){return"boolean"===typeof e?e:"string"===typeof e&&("TRUE"===e.toUpperCase()||""==e)},e.toNumber=function(e){if("number"===typeof e)return e;if("string"===typeof e){var t=parseInt(e);if(isNaN(t))return;return t}},e.toConstrainedNum=function(e,i){return function(n){var o=t.toNumber(n);if(!(null==o||o<e||o>i))return o}},e.getCoercedValue=function(e,i){var n=t.PROPERTY_COERCIONS.get(e);return n?n(i):i},e.getCoercedGridOptions=function(e){var i={};return Object.entries(e).forEach((function(e){var n=Cm(e,2),o=n[0],r=n[1],s=t.getCoercedValue(o,r);i[o]=s})),i},e.prototype.updateGridOptions=function(e){var i=this,n=e.options,o=e.source,r=void 0===o?"api":o,s={id:t.changeSetId++,properties:[]},a=[];Object.entries(n).forEach((function(e){var n=Cm(e,2),o=n[0],l=n[1];"api"===r&&Yt[o]&&G("".concat(o," is an initial property and cannot be updated."));var c=t.getCoercedValue(o,l),u="object"===typeof c&&"api"===r,d=i.gridOptions[o];if(u||d!==c){i.gridOptions[o]=c;var p={type:o,currentValue:c,previousValue:d,changeSet:s,source:r};a.push(p)}})),this.validationService.processGridOptions(this.gridOptions),s.properties=a.map((function(e){return e.type})),a.forEach((function(e){i.gridOptions.debug&&console.log("AG Grid: Updated property ".concat(e.type," from ").concat(String(e.previousValue)," to ").concat(String(e.currentValue),".")),i.propertyEventService.dispatchEvent(e)}))},e.prototype.addEventListener=function(e,t){this.propertyEventService.addEventListener(e,t)},e.prototype.removeEventListener=function(e,t){this.propertyEventService.removeEventListener(e,t)},e.prototype.getGridId=function(){return this.api.getGridId()},e.prototype.getScrollbarWidth=function(){if(null==this.scrollbarWidth){var e="number"===typeof this.gridOptions.scrollbarWidth&&this.gridOptions.scrollbarWidth>=0,t=e?this.gridOptions.scrollbarWidth:rn();null!=t&&(this.scrollbarWidth=t,this.eventService.dispatchEvent({type:ht.EVENT_SCROLLBAR_WIDTH_CHANGED}))}return this.scrollbarWidth},e.prototype.isRowModelType=function(e){return this.gridOptions.rowModelType===e||"clientSide"===e&&r(this.gridOptions.rowModelType)},e.prototype.isDomLayout=function(e){var t,i=null!==(t=this.gridOptions.domLayout)&&void 0!==t?t:"normal";return i===e},e.prototype.isRowSelection=function(){return"single"===this.gridOptions.rowSelection||"multiple"===this.gridOptions.rowSelection},e.prototype.useAsyncEvents=function(){return!this.get("suppressAsyncEvents")},e.prototype.isGetRowHeightFunction=function(){return"function"===typeof this.gridOptions.getRowHeight},e.prototype.getRowHeightForNode=function(e,t,i){if(void 0===t&&(t=!1),null==i&&(i=this.environment.getDefaultRowHeight()),this.isGetRowHeightFunction()){if(t)return{height:i,estimated:!0};var n={node:e,data:e.data},o=this.getCallback("getRowHeight")(n);if(this.isNumeric(o))return 0===o&&G("The return of `getRowHeight` cannot be zero. If the intention is to hide rows, use a filter instead."),{height:Math.max(1,o),estimated:!1}}if(e.detail&&this.get("masterDetail"))return this.getMasterDetailRowHeight();var r=this.gridOptions.rowHeight&&this.isNumeric(this.gridOptions.rowHeight)?this.gridOptions.rowHeight:i;return{height:r,estimated:!1}},e.prototype.getMasterDetailRowHeight=function(){return this.get("detailRowAutoHeight")?{height:1,estimated:!1}:this.isNumeric(this.gridOptions.detailRowHeight)?{height:this.gridOptions.detailRowHeight,estimated:!1}:{height:300,estimated:!1}},e.prototype.getRowHeightAsNumber=function(){if(!this.gridOptions.rowHeight||r(this.gridOptions.rowHeight))return this.environment.getDefaultRowHeight();var e=this.environment.refreshRowHeightVariable();return-1!==e?e:(console.warn("AG Grid row height must be a number if not using standard row model"),this.environment.getDefaultRowHeight())},e.prototype.isNumeric=function(e){return!isNaN(e)&&"number"===typeof e&&isFinite(e)},e.prototype.getDomDataKey=function(){return this.domDataKey},e.prototype.getDomData=function(e,t){var i=e[this.getDomDataKey()];return i?i[t]:void 0},e.prototype.setDomData=function(e,t,i){var n=this.getDomDataKey(),o=e[n];r(o)&&(o={},e[n]=o),o[t]=i},e.prototype.getDocument=function(){var e=null;return this.gridOptions.getDocument&&o(this.gridOptions.getDocument)?e=this.gridOptions.getDocument():this.eGridDiv&&(e=this.eGridDiv.ownerDocument),e&&o(e)?e:document},e.prototype.getWindow=function(){var e=this.getDocument();return e.defaultView||window},e.prototype.getRootNode=function(){return this.eGridDiv.getRootNode()},e.prototype.getAsyncTransactionWaitMillis=function(){return o(this.gridOptions.asyncTransactionWaitMillis)?this.gridOptions.asyncTransactionWaitMillis:50},e.prototype.isAnimateRows=function(){return!this.get("ensureDomOrder")&&this.get("animateRows")},e.prototype.isGroupRowsSticky=function(){return!(this.get("suppressGroupRowsSticky")||this.get("paginateChildRows")||this.get("groupHideOpenParents"))},e.prototype.isColumnsSortingCoupledToGroup=function(){var e=this.gridOptions.autoGroupColumnDef;return!(null===e||void 0===e?void 0:e.comparator)&&!this.get("treeData")},e.prototype.getGroupAggFiltering=function(){var e=this.gridOptions.groupAggFiltering;return"function"===typeof e?this.getCallback("groupAggFiltering"):!0===e?function(){return!0}:void 0},e.prototype.isGroupIncludeFooterTrueOrCallback=function(){var e=this.gridOptions.groupIncludeFooter;return!0===e||"function"===typeof e},e.prototype.getGroupIncludeFooter=function(){var e=this.gridOptions.groupIncludeFooter;return"function"===typeof e?this.getCallback("groupIncludeFooter"):!0===e?function(){return!0}:function(){return!1}},e.prototype.isGroupMultiAutoColumn=function(){return this.gridOptions.groupDisplayType?"multipleColumns"===this.gridOptions.groupDisplayType:this.get("groupHideOpenParents")},e.prototype.isGroupUseEntireRow=function(e){return!e&&"groupRows"===this.gridOptions.groupDisplayType},e.alwaysSyncGlobalEvents=new Set([ht.EVENT_GRID_PRE_DESTROYED]),e.PROPERTY_COERCIONS=new Map(bm(bm(bm([],Cm(qt.BOOLEAN_PROPERTIES.map((function(e){return[e,t.toBoolean]}))),!1),Cm(qt.NUMBER_PROPERTIES.map((function(e){return[e,t.toNumber]}))),!1),[["groupAggFiltering",function(e){return"function"===typeof e?e:t.toBoolean(e)}],["pageSize",t.toConstrainedNum(1,Number.MAX_VALUE)],["autoSizePadding",t.toConstrainedNum(0,Number.MAX_VALUE)],["keepDetailRowsCount",t.toConstrainedNum(1,Number.MAX_VALUE)],["rowBuffer",t.toConstrainedNum(0,Number.MAX_VALUE)],["infiniteInitialRowCount",t.toConstrainedNum(1,Number.MAX_VALUE)],["cacheOverflowSize",t.toConstrainedNum(1,Number.MAX_VALUE)],["cacheBlockSize",t.toConstrainedNum(1,Number.MAX_VALUE)],["serverSideInitialRowCount",t.toConstrainedNum(1,Number.MAX_VALUE)],["viewportRowModelPageSize",t.toConstrainedNum(1,Number.MAX_VALUE)],["viewportRowModelBufferSize",t.toConstrainedNum(0,Number.MAX_VALUE)]],!1)),e.changeSetId=0,mm([de("gridOptions")],e.prototype,"gridOptions",void 0),mm([de("eventService")],e.prototype,"eventService",void 0),mm([de("environment")],e.prototype,"environment",void 0),mm([de("eGridDiv")],e.prototype,"eGridDiv",void 0),mm([de("validationService")],e.prototype,"validationService",void 0),mm([de("gridApi")],e.prototype,"api",void 0),mm([le],e.prototype,"init",null),mm([ce],e.prototype,"destroy",null),e=t=mm([ue("gridOptionsService")],e),e}(),Sm=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Em=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},xm=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Sm(t,e),t.prototype.getLocaleTextFunc=function(){var e=this.gridOptionsService.getCallback("getLocaleText");if(e)return function(t,i,n){var o={key:t,defaultValue:i,variableValues:n};return e(o)};var t=this.gridOptionsService.get("localeText");return function(e,i,n){var o=t&&t[e];if(o&&n&&n.length){var r=0;while(1){if(r>=n.length)break;var s=o.indexOf("${variable}");if(-1===s)break;o=o.replace("${variable}",n[r++])}}return null!==o&&void 0!==o?o:i}},t=Em([ue("localeService")],t),t}(st),Om=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Tm=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Dm=function(e){function t(){return e.call(this,t.TEMPLATE,"vertical")||this}return Om(t,e),t.prototype.postConstruct=function(){e.prototype.postConstruct.call(this),this.createManagedBean(new Qu(this.eContainer)),this.ctrlsService.registerFakeVScrollComp(this),this.addManagedListener(this.eventService,ht.EVENT_ROW_CONTAINER_HEIGHT_CHANGED,this.onRowContainerHeight
11Changed.bind(this))},t.prototype.setScrollVisible=function(){var e=this.scrollVisibleService.isVerticalScrollShowing(),t=this.invisibleScrollbar,i=e&&this.gridOptionsService.getScrollbarWidth()||0,n=0===i&&t?16:i;this.addOrRemoveCssClass("ag-scrollbar-invisible",t),no(this.getGui(),n),no(this.eViewport,n),no(this.eContainer,n),this.setDisplayed(e,{skipAriaHidden:!0})},t.prototype.onRowContainerHeightChanged=function(){var e=this.ctrlsService.getGridBodyCtrl(),t=e.getBodyViewportElement();this.eViewport.scrollTop!=t.scrollTop&&(this.eViewport.scrollTop=t.scrollTop)},t.prototype.getScrollPosition=function(){return this.getViewport().scrollTop},t.prototype.setScrollPosition=function(e){zn(this.getViewport())||this.attemptSettingScrollPosition(e),this.getViewport().scrollTop=e},t.TEMPLATE='<div class="ag-body-vertical-scroll" aria-hidden="true">\n            <div class="ag-body-vertical-scroll-viewport" ref="eViewport">\n                <div class="ag-body-vertical-scroll-container" ref="eContainer"></div>\n            </div>\n        </div>',Tm([le],t.prototype,"postConstruct",null),t}(Jy),Rm=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Am=function(){return Am=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Am.apply(this,arguments)},_m=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Pm=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},Mm=function(e,t,i){if(i||2===arguments.length)for(var n,o=0,r=t.length;o<r;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},km={january:"January",february:"February",march:"March",april:"April",may:"May",june:"June",july:"July",august:"August",september:"September",october:"October",november:"November",december:"December"},Nm=["january","february","march","april","may","june","july","august","september","october","november","december"],Lm=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.dataTypeDefinitions={},t.isWaitingForRowData=!1,t.isColumnTypeOverrideInDataTypeDefinitions=!1,t.columnStateUpdatesPendingInference={},t.columnStateUpdateListenerDestroyFuncs=[],t}return Rm(t,e),t.prototype.init=function(){var e=this;this.groupHideOpenParents=this.gridOptionsService.get("groupHideOpenParents"),this.addManagedPropertyListener("groupHideOpenParents",(function(){e.groupHideOpenParents=e.gridOptionsService.get("groupHideOpenParents")})),this.processDataTypeDefinitions(),this.addManagedPropertyListener("dataTypeDefinitions",(function(){e.processDataTypeDefinitions(),e.columnModel.recreateColumnDefs("gridOptionsChanged")}))},t.prototype.processDataTypeDefinitions=function(){var e,t=this,i=this.getDefaultDataTypes();this.dataTypeDefinitions={},Object.entries(i).forEach((function(e){var i=Pm(e,2),n=i[0],o=i[1];t.dataTypeDefinitions[n]=Am(Am({},o),{groupSafeValueFormatter:t.createGroupSafeValueFormatter(o)})}));var n=null!==(e=this.gridOptionsService.get("dataTypeDefinitions"))&&void 0!==e?e:{};this.dataTypeMatchers={},Object.entries(n).forEach((function(e){var o=Pm(e,2),r=o[0],s=o[1],a=t.processDataTypeDefinition(s,n,[r],i);a&&(t.dataTypeDefinitions[r]=a,s.dataTypeMatcher&&(t.dataTypeMatchers[r]=s.dataTypeMatcher))})),this.checkObjectValueHandlers(i),["dateString","text","number","boolean","date"].forEach((function(e){var n=t.dataTypeMatchers[e];n&&delete t.dataTypeMatchers[e],t.dataTypeMatchers[e]=null!==n&&void 0!==n?n:i[e].dataTypeMatcher}))},t.prototype.mergeDataTypeDefinitions=function(e,t){var i=Am(Am({},e),t);return e.columnTypes&&t.columnTypes&&t.appendColumnTypes&&(i.columnTypes=Mm(Mm([],Pm(this.convertColumnTypes(e.columnTypes)),!1),Pm(this.convertColumnTypes(t.columnTypes)),!1)),i},t.prototype.processDataTypeDefinition=function(e,t,i,n){var o,r=e.extendsDataType;if(e.columnTypes&&(this.isColumnTypeOverrideInDataTypeDefinitions=!0),e.extendsDataType===e.baseDataType){var s=n[r],a=t[r];if(s&&a&&(s=a),!this.validateDataTypeDefinition(e,s,r))return;o=this.mergeDataTypeDefinitions(s,e)}else{if(i.includes(r))return void G('Data type definition hierarchies (via the "extendsDataType" property) cannot contain circular references.');var l=t[r];if(!this.validateDataTypeDefinition(e,l,r))return;var c=this.processDataTypeDefinition(l,t,Mm(Mm([],Pm(i),!1),[r],!1),n);if(!c)return;o=this.mergeDataTypeDefinitions(c,e)}return Am(Am({},o),{groupSafeValueFormatter:this.createGroupSafeValueFormatter(o)})},t.prototype.validateDataTypeDefinition=function(e,t,i){return t?t.baseDataType===e.baseDataType||(G('The "baseDataType" property of a data type definition must match that of its parent.'),!1):(G("The data type definition ".concat(i," does not exist.")),!1)},t.prototype.createGroupSafeValueFormatter=function(e){var t=this;if(e.valueFormatter)return function(i){var n,o;if(null===(n=i.node)||void 0===n?void 0:n.group){var r=i.column.getAggFunc();if(r){if("first"===r||"last"===r)return e.valueFormatter(i);if("number"===e.baseDataType&&"count"!==r){if("number"===typeof i.value)return e.valueFormatter(i);if("object"===typeof i.value){if(!i.value)return;if("toNumber"in i.value)return e.valueFormatter(Am(Am({},i),{value:i.value.toNumber()}));if("value"in i.value)return e.valueFormatter(Am(Am({},i),{value:i.value.value}))}}}if(!t.gridOptionsService.get("suppressGroupMaintainValueType"))return}else if(t.groupHideOpenParents&&i.column.isRowGroupActive()){if("string"!==typeof i.value||(null===(o=e.dataTypeMatcher)||void 0===o?void 0:o.call(e,i.value)))return e.valueFormatter(i);if(!t.gridOptionsService.get("suppressGroupMaintainValueType"))return}return e.valueFormatter(i)}},t.prototype.updateColDefAndGetDataTypeDefinitionColumnType=function(e,t,i){var n=t.cellDataType,o=t.field;if(void 0===n&&(n=e.cellDataType),null!=n&&!0!==n||(n=!!this.canInferCellDataType(e,t)&&this.inferCellDataType(o,i)),n){var r=this.dataTypeDefinitions[n];if(r)return e.cellDataType=n,r.groupSafeValueFormatter&&(e.valueFormatter=r.groupSafeValueFormatter),r.valueParser&&(e.valueParser=r.valueParser),r.suppressDefaultProperties||this.setColDefPropertiesForBaseDataType(e,r,i),r.columnTypes;G('Missing data type definition - "'.concat(n,'"'))}else e.cellDataType=!1},t.prototype.updateColDefAndGetColumnType=function(e,t,i){var n,o,r=this.updateColDefAndGetDataTypeDefinitionColumnType(e,t,i),s=null!==(o=null!==(n=t.type)&&void 0!==n?n:r)&&void 0!==o?o:e.type;return e.type=s,s?this.convertColumnTypes(s):void 0},t.prototype.addColumnListeners=function(e){if(this.isWaitingForRowData){var t=this.columnStateUpdatesPendingInference[e.getColId()];if(t){var i=function(e){t.add(e.key)};e.addEventListener(Ee.EVENT_STATE_UPDATED,i),this.columnStateUpdateListenerDestroyFuncs.push((function(){return e.removeEventListener(Ee.EVENT_STATE_UPDATED,i)}))}}},t.prototype.canInferCellDataType=function(e,t){var i,n=this;if("clientSide"!==this.rowModel.getType())return!1;var o={cellRenderer:!0,valueGetter:!0,valueParser:!0,refData:!0}
11;if(this.doColDefPropsPreventInference(t,o))return!1;var r=null===t.type?e.type:t.type;if(r){var s=null!==(i=this.gridOptionsService.get("columnTypes"))&&void 0!==i?i:{},a=this.convertColumnTypes(r).some((function(e){var t=s[e.trim()];return t&&n.doColDefPropsPreventInference(t,o)}));if(a)return!1}return!this.doColDefPropsPreventInference(e,o)},t.prototype.doColDefPropsPreventInference=function(e,t){var i=this;return[["cellRenderer","agSparklineCellRenderer"],["valueGetter",void 0],["valueParser",void 0],["refData",void 0]].some((function(n){var o=Pm(n,2),r=o[0],s=o[1];return i.doesColDefPropPreventInference(e,t,r,s)}))},t.prototype.doesColDefPropPreventInference=function(e,t,i,n){if(!t[i])return!1;var o=e[i];return null===o?(t[i]=!1,!1):void 0===n?!!o:o===n},t.prototype.inferCellDataType=function(e,t){var i;if(e){var n,o=this.getInitialData();if(o){var r=e.indexOf(".")>=0&&!this.gridOptionsService.get("suppressFieldDotNotation");n=M(o,e,r)}else this.initWaitForRowData(t);if(null!=n){var s=Pm(null!==(i=Object.entries(this.dataTypeMatchers).find((function(e){var t=Pm(e,2);t[0];var i=t[1];return i(n)})))&&void 0!==i?i:["object"],1),a=s[0];return a}}},t.prototype.getInitialData=function(){var e=this.gridOptionsService.get("rowData");if(null===e||void 0===e?void 0:e.length)return e[0];if(this.initialData)return this.initialData;var t=this.rowModel.getRootNode().allLeafChildren;return(null===t||void 0===t?void 0:t.length)?t[0].data:null},t.prototype.initWaitForRowData=function(e){var t=this;if(this.columnStateUpdatesPendingInference[e]=new Set,!this.isWaitingForRowData){this.isWaitingForRowData=!0;var i=this.isColumnTypeOverrideInDataTypeDefinitions;i&&this.columnModel.queueResizeOperations();var n=this.addManagedListener(this.eventService,ht.EVENT_ROW_DATA_UPDATE_STARTED,(function(e){var o=e.firstRowData;if(o){null===n||void 0===n||n(),t.isWaitingForRowData=!1,t.processColumnsPendingInference(o,i),t.columnStateUpdatesPendingInference={},i&&t.columnModel.processResizeOperations();var r={type:ht.EVENT_DATA_TYPES_INFERRED};t.eventService.dispatchEvent(r)}}))}},t.prototype.isPendingInference=function(){return this.isWaitingForRowData},t.prototype.processColumnsPendingInference=function(e,t){var i=this;this.initialData=e;var n=[];this.columnStateUpdateListenerDestroyFuncs.forEach((function(e){return e()})),this.columnStateUpdateListenerDestroyFuncs=[];var o={},r={};Object.entries(this.columnStateUpdatesPendingInference).forEach((function(e){var s=Pm(e,2),a=s[0],l=s[1],c=i.columnModel.getGridColumn(a);if(c){var u=c.getColDef();if(i.columnModel.resetColumnDefIntoColumn(c,"cellDataTypeInferred")){var d=c.getColDef();if(t&&d.type&&d.type!==u.type){var p=i.getUpdatedColumnState(c,l);p.rowGroup&&null==p.rowGroupIndex&&(o[a]=p),p.pivot&&null==p.pivotIndex&&(r[a]=p),n.push(p)}}}})),t&&n.push.apply(n,Mm([],Pm(this.columnModel.generateColumnStateForRowGroupAndPivotIndexes(o,r)),!1)),n.length&&this.columnModel.applyColumnState({state:n},"cellDataTypeInferred"),this.initialData=null},t.prototype.getUpdatedColumnState=function(e,t){var i=this.columnModel.getColumnStateFromColDef(e);return t.forEach((function(e){delete i[e],"rowGroup"===e?delete i.rowGroupIndex:"pivot"===e&&delete i.pivotIndex})),i},t.prototype.checkObjectValueHandlers=function(e){var t=this.dataTypeDefinitions.object,i=e.object;this.hasObjectValueParser=t.valueParser!==i.valueParser,this.hasObjectValueFormatter=t.valueFormatter!==i.valueFormatter},t.prototype.convertColumnTypes=function(e){var t=[];if(e instanceof Array){var i=e.some((function(e){return"string"!==typeof e}));i?console.warn("if colDef.type is supplied an array it should be of type 'string[]'"):t=e}else"string"===typeof e?t=e.split(","):console.warn("colDef.type should be of type 'string' | 'string[]'");return t},t.prototype.getDateStringTypeDefinition=function(){return this.dataTypeDefinitions.dateString},t.prototype.getDateParserFunction=function(){return this.getDateStringTypeDefinition().dateParser},t.prototype.getDateFormatterFunction=function(){return this.getDateStringTypeDefinition().dateFormatter},t.prototype.getDataTypeDefinition=function(e){var t=e.getColDef();if(t.cellDataType)return this.dataTypeDefinitions[t.cellDataType]},t.prototype.getBaseDataType=function(e){var t;return null===(t=this.getDataTypeDefinition(e))||void 0===t?void 0:t.baseDataType},t.prototype.checkType=function(e,t){var i;if(null==t)return!0;var n=null===(i=this.getDataTypeDefinition(e))||void 0===i?void 0:i.dataTypeMatcher;return!n||n(t)},t.prototype.validateColDef=function(e){"object"===e.cellDataType&&(e.valueFormatter!==this.dataTypeDefinitions.object.groupSafeValueFormatter||this.hasObjectValueFormatter||G('Cell data type is "object" but no value formatter has been provided. Please either provide an object data type definition with a value formatter, or set "colDef.valueFormatter"'),e.editable&&e.valueParser===this.dataTypeDefinitions.object.valueParser&&!this.hasObjectValueParser&&G('Cell data type is "object" but no value parser has been provided. Please either provide an object data type definition with a value parser, or set "colDef.valueParser"'))},t.prototype.setColDefPropertiesForBaseDataType=function(e,t,i){var n=this,r=function(e,i,o){var r=e.getColDef().valueFormatter;return r===t.groupSafeValueFormatter&&(r=t.valueFormatter),n.valueFormatterService.formatValue(e,i,o,r)},s=ne.__isRegistered(J.SetFilterModule,this.context.getGridId()),a=this.localeService.getLocaleTextFunc(),l=function(t){var i=e.filterParams;e.filterParams="object"===typeof i?Am(Am({},i),t):t};switch(t.baseDataType){case"number":e.cellEditor="agNumberCellEditor",s&&l({comparator:function(e,t){var i=null==e?0:parseInt(e),n=null==t?0:parseInt(t);return i===n?0:i>n?1:-1}});break;case"boolean":e.cellEditor="agCheckboxCellEditor",e.cellRenderer="agCheckboxCellRenderer",e.suppressKeyboardEvent=function(e){return!!e.colDef.editable&&e.event.key===xo.SPACE},l(s?{valueFormatter:function(e){return o(e.value)?a(String(e.value),e.value?"True":"False"):a("blanks","(Blanks)")}}:{maxNumConditions:1,filterOptions:["empty",{displayKey:"true",displayName:"True",predicate:function(e,t){return t},numberOfInputs:0}
11,{displayKey:"false",displayName:"False",predicate:function(e,t){return!1===t},numberOfInputs:0}]});break;case"date":e.cellEditor="agDateCellEditor",e.keyCreator=function(e){return r(e.column,e.node,e.value)},s&&l({valueFormatter:function(e){var t=r(e.column,e.node,e.value);return o(t)?t:a("blanks","(Blanks)")},treeList:!0,treeListFormatter:function(e,t){if(1===t&&null!=e){var i=Nm[Number(e)-1];return a(i,km[i])}return null!==e&&void 0!==e?e:a("blanks","(Blanks)")}});break;case"dateString":e.cellEditor="agDateStringCellEditor",e.keyCreator=function(e){return r(e.column,e.node,e.value)};var c=this.getDateParserFunction();l(s?{valueFormatter:function(e){var t=r(e.column,e.node,e.value);return o(t)?t:a("blanks","(Blanks)")},treeList:!0,treeListPathGetter:function(e){var t=c(null!==e&&void 0!==e?e:void 0);return t?[String(t.getFullYear()),String(t.getMonth()+1),String(t.getDate())]:null},treeListFormatter:function(e,t){if(1===t&&null!=e){var i=Nm[Number(e)-1];return a(i,km[i])}return null!==e&&void 0!==e?e:a("blanks","(Blanks)")}}:{comparator:function(e,t){var i=c(t);return null==t||i<e?-1:i>e?1:0}});break;case"object":e.cellEditorParams={useFormatter:!0},e.comparator=function(e,t){var o=n.columnModel.getPrimaryColumn(i),s=null===o||void 0===o?void 0:o.getColDef();if(!o||!s)return 0;var a=null==e?"":r(o,null,e),l=null==t?"":r(o,null,t);return a===l?0:a>l?1:-1},e.keyCreator=function(e){return r(e.column,e.node,e.value)},s?l({valueFormatter:function(e){var t=r(e.column,e.node,e.value);return o(t)?t:a("blanks","(Blanks)")}}):e.filterValueGetter=function(e){return r(e.column,e.node,n.valueService.getValue(e.column,e.node))};break}},t.prototype.getDefaultDataTypes=function(){var e=function(e){return!!e.match("^\\d{4}-\\d{2}-\\d{2}$")},t=this.localeService.getLocaleTextFunc();return{number:{baseDataType:"number",valueParser:function(e){return""===e.newValue?null:Number(e.newValue)},valueFormatter:function(e){return null==e.value?"":"number"!==typeof e.value||isNaN(e.value)?(console.log("was",typeof e.value,e.value,e),t("invalidNumber","Invalid Number")):String(e.value)},dataTypeMatcher:function(e){return"number"===typeof e}},text:{baseDataType:"text",valueParser:function(e){return""===e.newValue?null:a(e.newValue)},dataTypeMatcher:function(e){return"string"===typeof e}},boolean:{baseDataType:"boolean",valueParser:function(e){return null==e.newValue?e.newValue:""===e.newValue?null:"true"===String(e.newValue).toLowerCase()},valueFormatter:function(e){return null==e.value?"":String(e.value)},dataTypeMatcher:function(e){return"boolean"===typeof e}},date:{baseDataType:"date",valueParser:function(e){return wn(null==e.newValue?null:String(e.newValue))},valueFormatter:function(e){var i;return null==e.value?"":e.value instanceof Date&&!isNaN(e.value.getTime())?null!==(i=mn(e.value,!1))&&void 0!==i?i:"":t("invalidDate","Invalid Date")},dataTypeMatcher:function(e){return e instanceof Date}},dateString:{baseDataType:"dateString",dateParser:function(e){var t;return null!==(t=wn(e))&&void 0!==t?t:void 0},dateFormatter:function(e){var t;return null!==(t=mn(null!==e&&void 0!==e?e:null,!1))&&void 0!==t?t:void 0},valueParser:function(t){return e(String(t.newValue))?t.newValue:null},valueFormatter:function(t){return e(String(t.value))?t.value:""},dataTypeMatcher:function(t){return"string"===typeof t&&e(t)}},object:{baseDataType:"object",valueParser:function(){return null},valueFormatter:function(e){var t;return null!==(t=a(e.value))&&void 0!==t?t:""}}}},_m([de("rowModel")],t.prototype,"rowModel",void 0),_m([de("columnModel")],t.prototype,"columnModel",void 0),_m([de("columnUtils")],t.prototype,"columnUtils",void 0),_m([de("valueService")],t.prototype,"valueService",void 0),_m([de("valueFormatterService")],t.prototype,"valueFormatterService",void 0),_m([le],t.prototype,"init",null),t=_m([ue("dataTypeService")],t),t}(st),Im=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Fm=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Gm=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Im(t,e),t.prototype.parseValue=function(e,t,i,n){var r=e.getColDef(),s={node:t,data:null===t||void 0===t?void 0:t.data,oldValue:n,newValue:i,colDef:r,column:e,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context},a=r.valueParser;return o(a)?"function"===typeof a?a(s):this.expressionService.evaluate(a,s):i},Fm([de("expressionService")],t.prototype,"expressionService",void 0),t=Fm([ue("valueParserService")],t),t}(st),Vm=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Bm=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},jm=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.waitingForColumns=!1,t}return Vm(t,e),t.prototype.postConstruct=function(){var e=this;this.addManagedPropertyListener("columnDefs",(function(t){return e.setColumnDefs(t)}))},t.prototype.start=function(){var e=this;this.ctrlsService.whenReady((function(){var t=e.gridOptionsService.get("
11columnDefs");t?e.setColumnsAndData(t):e.waitingForColumns=!0,e.gridReady()}))},t.prototype.setColumnsAndData=function(e){this.columnModel.setColumnDefs(null!==e&&void 0!==e?e:[],"gridInitializing"),this.rowModel.start()},t.prototype.gridReady=function(){var e=this;this.dispatchGridReadyEvent();var t=ne.__isRegistered(J.EnterpriseCoreModule,this.context.getGridId()),i=new rv("AG Grid",(function(){return e.gridOptionsService.get("debug")}));i.log("initialised successfully, enterprise = ".concat(t))},t.prototype.dispatchGridReadyEvent=function(){var e={type:ht.EVENT_GRID_READY};this.eventService.dispatchEvent(e)},t.prototype.setColumnDefs=function(e){var t,i=this.gridOptionsService.get("columnDefs");if(i){if(this.waitingForColumns)return this.waitingForColumns=!1,void this.setColumnsAndData(i);var n=null!==(t=e.source)&&void 0!==t?t:"api";this.columnModel.setColumnDefs(i,n)}},Bm([de("ctrlsService")],t.prototype,"ctrlsService",void 0),Bm([de("columnModel")],t.prototype,"columnModel",void 0),Bm([de("rowModel")],t.prototype,"rowModel",void 0),Bm([le],t.prototype,"postConstruct",null),t=Bm([ue("syncService")],t),t}(st),Hm=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Wm=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Um=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.manuallyDisplayed=!1,t}return Hm(t,e),t.prototype.postConstruct=function(){var e=this;this.addManagedListener(this.eventService,ht.EVENT_ROW_DATA_UPDATED,(function(){return e.onRowDataUpdated()})),this.addManagedListener(this.eventService,ht.EVENT_NEW_COLUMNS_LOADED,(function(){return e.onNewColumnsLoaded()}))},t.prototype.registerOverlayWrapperComp=function(e){this.overlayWrapperComp=e,(!this.gridOptionsService.get("columnDefs")||this.gridOptionsService.isRowModelType("clientSide")&&!this.gridOptionsService.get("rowData"))&&this.showLoadingOverlay()},t.prototype.showLoadingOverlay=function(){if(!this.gridOptionsService.get("suppressLoadingOverlay")){var e={},t=this.userComponentFactory.getLoadingOverlayCompDetails(e);this.showOverlay(t,"ag-overlay-loading-wrapper")}},t.prototype.showNoRowsOverlay=function(){if(!this.gridOptionsService.get("suppressNoRowsOverlay")){var e={},t=this.userComponentFactory.getNoRowsOverlayCompDetails(e);this.showOverlay(t,"ag-overlay-no-rows-wrapper")}},t.prototype.showOverlay=function(e,t){var i=e.newAgStackInstance();this.manuallyDisplayed=this.columnModel.isReady()&&!this.paginationProxy.isEmpty(),this.overlayWrapperComp.showOverlay(i,t)},t.prototype.hideOverlay=function(){this.manuallyDisplayed=!1,this.overlayWrapperComp.hideOverlay()},t.prototype.showOrHideOverlay=function(){var e=this.paginationProxy.isEmpty(),t=this.gridOptionsService.get("suppressNoRowsOverlay");e&&!t?this.showNoRowsOverlay():this.hideOverlay()},t.prototype.onRowDataUpdated=function(){this.showOrHideOverlay()},t.prototype.onNewColumnsLoaded=function(){!this.columnModel.isReady()||this.paginationProxy.isEmpty()||this.manuallyDisplayed||this.hideOverlay()},Wm([de("userComponentFactory")],t.prototype,"userComponentFactory",void 0),Wm([de("paginationProxy")],t.prototype,"paginationProxy",void 0),Wm([de("columnModel")],t.prototype,"columnModel",void 0),Wm([le],t.prototype,"postConstruct",null),t=Wm([ue("overlayService")],t),t}(st),zm=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Km=function(){return Km=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Km.apply(this,arguments)},Ym=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},qm=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},Xm=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.suppressEvents=!0,t.queuedUpdateSources=new Set,t.dispatchStateUpdateEventDebounced=Y((function(){return t.dispatchQueuedStateUpdateEvents()}),0),t}return zm(t,e),t.prototype.postConstruct=function(){var e,t=this;this.isClientSideRowModel="clientSide"===this.rowModel.getType(),this.cachedState=null!==(e=this.gridOptionsService.get("initialState"))&&void 0!==e?e:{},this.ctrlsService.whenReady((function(){return t.setupStateOnGridReady()}));var i=this.addManagedListener(this.eventService,ht.EVENT_NEW_COLUMNS_LOADED,(function(e){var n=e.source;"gridInitializing"===n&&(null===i||void 0===i||i(),t.setupStateOnColumnsInitialised())})),n=this.addManagedListener(this.eventService,ht.EVENT_ROW_COUNT_READY,(function(){null===n||void 0===n||n(),t.setupStateOnRowCountReady()})),o=this.addManagedListener(this.eventService,ht.EVENT_FIRST_DATA_RENDERED,(function(){null===o||void 0===o||o(),t.setupStateOnFirstDataRendered(),t.suppressEvents=!1,t.dispatchStateUpdateEvent(["gridInitializing"])}))},t.prototype.getState=function(){return this.cachedState},t.prototype.setupStateOnGridReady=function(){var e=this;
11this.updateCachedState("sideBar",this.getSideBarState()),this.addManagedListener(this.eventService,ht.EVENT_TOOL_PANEL_VISIBLE_CHANGED,(function(){return e.updateCachedState("sideBar",e.getSideBarState())})),this.addManagedListener(this.eventService,ht.EVENT_SIDE_BAR_UPDATED,(function(){return e.updateCachedState("sideBar",e.getSideBarState())}))},t.prototype.setupStateOnColumnsInitialised=function(){var e,t=this,i=null!==(e=this.gridOptionsService.get("initialState"))&&void 0!==e?e:{},n=i.filter,o=i.columnGroup;this.setColumnState(i),o&&this.setColumnGroupState(o);var r=this.gridOptionsService.get("advancedFilterModel");(n||r)&&this.setFilterState(n,r),this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","pivot","rowGroup","sort"]),this.updateCachedState("columnGroup",this.getColumnGroupState()),this.updateCachedState("filter",this.getFilterState()),this.addManagedListener(this.eventService,ht.EVENT_COLUMN_VALUE_CHANGED,(function(){return t.updateColumnState(["aggregation"])})),this.addManagedListener(this.eventService,ht.EVENT_COLUMN_MOVED,(function(){return t.updateColumnState(["columnOrder"])})),this.addManagedListener(this.eventService,ht.EVENT_COLUMN_PINNED,(function(){return t.updateColumnState(["columnPinning"])})),this.addManagedListener(this.eventService,ht.EVENT_COLUMN_RESIZED,(function(){return t.updateColumnState(["columnSizing"])})),this.addManagedListener(this.eventService,ht.EVENT_COLUMN_VISIBLE,(function(){return t.updateColumnState(["columnVisibility"])})),this.addManagedListener(this.eventService,ht.EVENT_COLUMN_PIVOT_CHANGED,(function(){return t.updateColumnState(["pivot"])})),this.addManagedListener(this.eventService,ht.EVENT_COLUMN_PIVOT_MODE_CHANGED,(function(){return t.updateColumnState(["pivot"])})),this.addManagedListener(this.eventService,ht.EVENT_COLUMN_ROW_GROUP_CHANGED,(function(){return t.updateColumnState(["rowGroup"])})),this.addManagedListener(this.eventService,ht.EVENT_SORT_CHANGED,(function(){return t.updateColumnState(["sort"])})),this.addManagedListener(this.eventService,ht.EVENT_NEW_COLUMNS_LOADED,(function(){return t.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","pivot","rowGroup","sort"])})),this.addManagedListener(this.eventService,ht.EVENT_COLUMN_GROUP_OPENED,(function(){return t.updateCachedState("columnGroup",t.getColumnGroupState())})),this.addManagedListener(this.eventService,ht.EVENT_FILTER_CHANGED,(function(){return t.updateCachedState("filter",t.getFilterState())}))},t.prototype.setupStateOnRowCountReady=function(){var e,t=this,i=null!==(e=this.gridOptionsService.get("initialState"))&&void 0!==e?e:{},n=i.rowGroupExpansion,o=i.rowSelection,r=i.pagination;n&&this.setRowGroupExpansionState(n),o&&this.setRowSelectionState(o),r&&this.setPaginationState(r),this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState()),this.updateCachedState("rowSelection",this.getRowSelectionState()),this.updateCachedState("pagination",this.getPaginationState()),this.addManagedListener(this.eventService,ht.EVENT_ROW_GROUP_OPENED,(function(){return t.updateCachedState("rowGroupExpansion",t.getRowGroupExpansionState())})),this.addManagedListener(this.eventService,ht.EVENT_SELECTION_CHANGED,(function(){return t.updateCachedState("rowSelection",t.getRowSelectionState())})),this.addManagedListener(this.eventService,ht.EVENT_PAGINATION_CHANGED,(function(e){(e.newPage||e.newPageSize)&&t.updateCachedState("pagination",t.getPaginationState())}))},t.prototype.setupStateOnFirstDataRendered=function(){var e,t=this,i=null!==(e=this.gridOptionsService.get("initialState"))&&void 0!==e?e:{},n=i.scroll,o=i.rangeSelection,r=i.focusedCell;r&&this.setFocusedCellState(r),o&&this.setRangeSelectionState(o),n&&this.setScrollState(n),this.updateCachedState("sideBar",this.getSideBarState()),this.updateCachedState("focusedCell",this.getFocusedCellState()),this.updateCachedState("rangeSelection",this.getRangeSelectionState()),this.updateCachedState("scroll",this.getScrollState()),this.addManagedListener(this.eventService,ht.EVENT_CELL_FOCUSED,(function(){return t.updateCachedState("focusedCell",t.getFocusedCellState())})),this.addManagedListener(this.eventService,ht.EVENT_RANGE_SELECTION_CHANGED,(function(e){e.finished&&t.updateCachedState("rangeSelection",t.getRangeSelectionState())})),this.addManagedListener(this.eventService,ht.EVENT_BODY_SCROLL_END,(function(){return t.updateCachedState("scroll",t.getScrollState())}))},t.prototype.getColumnState=function(){for(var e=this.columnModel.isPivotMode(),t=[],i=[],n=[],o=[],r=[],s=[],a=[],l=[],c=[],u=this.columnModel.getColumnState(),d=0;d<u.length;d++){var p=u[d],h=p.colId,f=p.sort,g=p.sortIndex,v=p.rowGroup,y=p.rowGroupIndex,m=p.aggFunc,C=p.pivot,b=p.pivotIndex,w=p.pinned,S=p.hide,E=p.width,x=p.flex;c.push(h),f&&(t[null!==g&&void 0!==g?g:0]={colId:h,sort:f}),v&&(i[null!==y&&void 0!==y?y:0]=h),"string"===typeof m&&n.push({colId:h,aggFunc:m}),C&&(o[null!==b&&void 0!==b?b:0]=h),w&&("right"===w?s:r).push(h),S&&a.push(h),(x||E)&&l.push({colId:h,flex:null!==x&&void 0!==x?x:void 0,width:E})}return{sort:t.length?{sortModel:t}:void 0,rowGroup:i.length?{groupColIds:i}:void 0,aggregation:n.length?{aggregationModel:n}:void 0,pivot:o.length||e?{pivotMode:e,pivotColIds:o}:void 0,columnPinning:r.length||s.length?{leftColIds:r,rightColIds:s}:void 0,columnVisibility:a.length?{hiddenColIds:a}:void 0,columnSizing:l.length?{columnSizingModel:l}:void 0,columnOrder:c.length?{orderedColIds:c}:void 0}},t.prototype.setColumnState=function(e){var t=e.sort,i=e.rowGroup,n=e.aggregation,o=e.pivot,r=e.columnPinning,s=e.columnVisibility,a=e.columnSizing,l=e.columnOrder,c={},u={},d=function(e){var t=c[e];return t||(t={colId:e},c[e]=t,t)};t&&(t.sortModel.forEach((function(e,t){var i=e.colId,n=e.sort,o=d(i);o.sort=n,o.sortIndex=t})),u.sort=null,u.sortIndex=null),i&&(i.groupColIds.forEach((function(e,t){var i=d(e);i.rowGroup=!0,i.rowGroupIndex=t})),u.rowGroup=null,u.rowGroupIndex=null),n&&(n.aggregationModel.forEach((function(e){var t=e.colId,i=e.aggFunc;d(t).aggFunc=i})),u.aggFunc=null),o&&(o.pivotColIds.forEach((function(e,t){var i=d(e);i.pivot=!0,i.pivotIndex=t})),u.pivot=null,u.pivotIndex=null,this.columnModel.setPivotMode(o.pivotMode)),r&&(r.leftColIds.forEach((function(e){d(e).pinned="left"})),r.rightColIds.forEach((function(e){d(e).pinned="right"})),u.pinned=null),s&&(s.hiddenColIds.forEach((function(e){d(e).hide=!0})),u.hide=null),a&&(a.columnSizingModel.forEach((function(e){var t=e.colId,i=e.flex,n=e.width,o=d(t);o.flex=null!==i&&void 0!==i?i:null,o.width=n})),u.flex=null);var p=null===l||void 0===l?void 0:l.orderedColIds,h=!!(null===p||void 0===p?void 0:p.length),f=h?p.map((function(e){return d(e)})):Object.values(c);f.length&&this.columnModel.applyColumnState({state:f,applyOrder:h,defaultState:u},"gridInitializing")},t.prototype.getColumnGroupState=function(){var e=this.columnModel.getColumnGroupState(),t=[];return e.forEach((function(e){var i=e.groupId,n=e.open;
11n&&t.push(i)})),t.length?{openColumnGroupIds:t}:void 0},t.prototype.setColumnGroupState=function(e){var t=e.openColumnGroupIds,i=new Set(t),n=this.columnModel.getColumnGroupState(),o=n.map((function(e){var t=e.groupId;return{groupId:t,open:i.has(t)}}));this.columnModel.setColumnGroupState(o,"gridInitializing")},t.prototype.getFilterState=function(){var e,t=this.filterManager.getFilterModel();t&&0===Object.keys(t).length&&(t=void 0);var i=null!==(e=this.filterManager.getAdvancedFilterModel())&&void 0!==e?e:void 0;return t||i?{filterModel:t,advancedFilterModel:i}:void 0},t.prototype.setFilterState=function(e,t){var i=null!==e&&void 0!==e?e:{advancedFilterModel:t},n=i.filterModel,o=i.advancedFilterModel;n&&this.filterManager.setFilterModel(n,"columnFilter"),o&&this.filterManager.setAdvancedFilterModel(o)},t.prototype.getRangeSelectionState=function(){var e,t=null===(e=this.rangeService)||void 0===e?void 0:e.getCellRanges().map((function(e){var t=e.id,i=e.type,n=e.startRow,o=e.endRow,r=e.columns,s=e.startColumn;return{id:t,type:i,startRow:n,endRow:o,colIds:r.map((function(e){return e.getColId()})),startColId:s.getColId()}}));return(null===t||void 0===t?void 0:t.length)?{cellRanges:t}:void 0},t.prototype.setRangeSelectionState=function(e){var t,i=this;if(this.gridOptionsService.get("enableRangeSelection")){var n=e.cellRanges.map((function(e){return Km(Km({},e),{columns:e.colIds.map((function(e){return i.columnModel.getGridColumn(e)})),startColumn:i.columnModel.getGridColumn(e.startColId)})}));null===(t=this.rangeService)||void 0===t||t.setCellRanges(n)}},t.prototype.getScrollState=function(){var e,t,i;if(this.isClientSideRowModel){var n=null===(e=this.ctrlsService.getGridBodyCtrl())||void 0===e?void 0:e.getScrollFeature(),o=(null!==(t=null===n||void 0===n?void 0:n.getHScrollPosition())&&void 0!==t?t:{left:0}).left,r=(null!==(i=null===n||void 0===n?void 0:n.getVScrollPosition())&&void 0!==i?i:{top:0}).top;return r||o?{top:r,left:o}:void 0}},t.prototype.setScrollState=function(e){var t;if(this.isClientSideRowModel){var i=e.top,n=e.left;null===(t=this.ctrlsService.getGridBodyCtrl())||void 0===t||t.getScrollFeature().setScrollPosition(i,n)}},t.prototype.getSideBarState=function(){var e,t;return null===(t=null===(e=this.sideBarService)||void 0===e?void 0:e.getSideBarComp())||void 0===t?void 0:t.getState()},t.prototype.getFocusedCellState=function(){if(this.isClientSideRowModel){var e=this.focusService.getFocusedCell();if(e){var t=e.column,i=e.rowIndex,n=e.rowPinned;return{colId:t.getColId(),rowIndex:i,rowPinned:n}}}},t.prototype.setFocusedCellState=function(e){if(this.isClientSideRowModel){var t=e.colId,i=e.rowIndex,n=e.rowPinned;this.focusService.setFocusedCell({column:this.columnModel.getGridColumn(t),rowIndex:i,rowPinned:n,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}},t.prototype.getPaginationState=function(){var e=this.paginationProxy.getCurrentPage(),t=this.gridOptionsService.get("paginationAutoPageSize")?void 0:this.paginationProxy.getPageSize();if(e||t)return{page:e,pageSize:t}},t.prototype.setPaginationState=function(e){e.pageSize&&!this.gridOptionsService.get("paginationAutoPageSize")&&this.paginationProxy.setPageSize(e.pageSize,"initialState"),"number"===typeof e.page&&this.paginationProxy.setPage(e.page)},t.prototype.getRowSelectionState=function(){var e,t=this.selectionService.getSelectionState(),i=!t||!Array.isArray(t)&&(!1===t.selectAll||!1===t.selectAllChildren)&&!(null===(e=null===t||void 0===t?void 0:t.toggledNodes)||void 0===e?void 0:e.length);return i?void 0:t},t.prototype.setRowSelectionState=function(e){this.selectionService.setSelectionState(e,"gridInitializing")},t.prototype.getRowGroupExpansionState=function(){var e=this.expansionService.getExpandedRows();return e.length?{expandedRowGroupIds:e}:void 0},t.prototype.setRowGroupExpansionState=function(e){this.expansionService.expandRows(e.expandedRowGroupIds)},t.prototype.updateColumnState=function(e){var t=this,i=this.getColumnState(),n=!1;Object.entries(i).forEach((function(e){var i=qm(e,2),o=i[0],r=i[1];d(r,t.cachedState[o])||(n=!0)})),this.cachedState=Km(Km({},this.cachedState),i),n&&this.dispatchStateUpdateEvent(e)},t.prototype.updateCachedState=function(e,t){var i,n=this.cachedState[e];this.cachedState=Km(Km({},this.cachedState),(i={},i[e]=t,i)),d(t,n)||this.dispatchStateUpdateEvent([e])},t.prototype.dispatchStateUpdateEvent=function(e){var t=this;this.suppressEvents||(e.forEach((function(e){return t.queuedUpdateSources.add(e)})),this.dispatchStateUpdateEventDebounced())},t.prototype.dispatchQueuedStateUpdateEvents=function(){var e=Array.from(this.queuedUpdateSources);this.queuedUpdateSources.clear();var t={type:ht.EVENT_STATE_UPDATED,sources:e,state:this.cachedState};this.eventService.dispatchEvent(t)},Ym([de("filterManager")],t.prototype,"filterManager",void 0),Ym([pe("rangeService")],t.prototype,"rangeService",void 0),Ym([de("ctrlsService")],t.prototype,"ctrlsService",void 0),Ym([pe("sideBarService")],t.prototype,"sideBarService",void 0),Ym([de("focusService")],t.prototype,"focusService",void 0),Ym([de("columnModel")],t.prototype,"columnModel",void 0),Ym([de("paginationProxy")],t.prototype,"paginationProxy",void 0),Ym([de("rowModel")],t.prototype,"rowModel",void 0),Ym([de("selectionService")],t.prototype,"selectionService",void 0),Ym([de("expansionService")],t.prototype,"expansionService",void 0),Ym([le],t.prototype,"postConstruct",null),t=Ym([ue("stateService")],t),t}(st),$m=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Zm=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Jm=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},Qm=function(e,t,i){if(i||2===arguments.length)for(var n,o=0,r=t.length;o<r;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},eC=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $m(t,e),t.prototype.init=function(){this.processGridOptions(this.gridOptions)},t.prototype.processGridOptions=function(e){this.processOptions(e,ym)},t.prototype.processColumnDefs=function(e){this.processOptions(e,dm)},t.prototype.processOptions=function(e,t){var i=this,n=t.validations,o=t.deprecations,r=t.allProperties,s=t.propertyExceptions,a=t.objectName,l=t.docsUrl;r&&!0!==this.gridOptions.suppressPropertyNamesCheck&&this.checkProperties(e,Qm(Qm([],Jm(null!==s&&void 0!==s?s:[]),!1),Jm(Object.keys(o)),!1),r,a,l);var c=new Set,u=Object.keys(e);u.forEach((function(t){var r,s=o[t];if(s)if("renamed"in s){var a=s.renamed,l=s.version;c.add("As of v".concat(l,", ").concat(String(t)," is deprecated. Please use ").concat(String(a)," instead.")),e[a]=e[t]}else{var u=s.message;l=s.version;c.add("As of v".concat(l,", ").concat(String(t)," is deprecated. ").concat(null!==u&&void 0!==u?u:""))}var d=e[t];if(null!=d&&!1!==d){var p,h=n[t];if(h){if("function"===typeof h){var f=h(e,i.gridOptions);if(!f)return;if("objectName"in f){var g=e[t];return Array.isArray(g)?void g.forEach((function(e){i.processOptions(e,f)})):void i.processOptions(e[t],f)}p=f}else p=h;var v=p.module,y=p.dependencies,m=p.supportedRowModels;if(m){var C=null!==(r=i.gridOptions.rowModelType)&&void 0!==r?r:"clientSide";if(!m.includes(C))return void c.add("".concat(String(t)," is not supported with the '").concat(C,"' row model."))}if(v){var b=Array.isArray(v)?v:[v],w=!0;if(b.forEach((function(e){ne.__assertRegistered(e,String(t),i.gridOptionsService.getGridId())||(w=!1,c.add("".concat(String(t)," is only available when ").concat(e," is loaded.")))})),!w)return}if(y){var S=i.checkForWarning(t,y,e);
11if(S)return void c.add(S)}}}})),c.size>0&&c.forEach((function(e){G(e)}))},t.prototype.checkForWarning=function(e,t,i){if("function"===typeof t)return t(i,this.gridOptions);var n=Object.entries(t),o=n.find((function(e){var t=Jm(e,2),n=t[0],o=t[1],r=i[n];return!o.includes(r)}));if(!o)return null;var r=Jm(o,2),s=r[0],a=r[1];return a.length>1?"'".concat(String(e),"' requires '").concat(s,"' to be one of [").concat(a.join(", "),"]."):"'".concat(String(e),"' requires '").concat(s,"' to be ").concat(a[0],".")},t.prototype.checkProperties=function(e,t,i,n,o){var r=["__ob__","__v_skip","__metadata__"],s=vo(Object.getOwnPropertyNames(e),Qm(Qm(Qm([],Jm(r),!1),Jm(t),!1),Jm(i),!1),i);if(m(s,(function(e,t){G("invalid ".concat(n," property '").concat(e,"' did you mean any of these: ").concat(t.slice(0,8).join(", ")))})),Object.keys(s).length>0&&o){var a=this.getFrameworkOverrides().getDocLink(o);G("to see all the valid ".concat(n," properties please check: ").concat(a))}},Zm([de("gridOptions")],t.prototype,"gridOptions",void 0),Zm([le],t.prototype,"init",null),t=Zm([ue("validationService")],t),t}(st),tC=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),iC=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},nC=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.syncEventListeners=new Map,t.asyncEventListeners=new Map,t.syncGlobalEventListeners=new Set,t.asyncGlobalEventListeners=new Set,t}return tC(t,e),t.prototype.addEventListener=function(e,t){var i=this.gridOptionsService.useAsyncEvents(),n=i?this.asyncEventListeners:this.syncEventListeners;n.has(e)||n.set(e,new Set),n.get(e).add(t),this.eventService.addEventListener(e,t,i)},t.prototype.addGlobalListener=function(e){var t=this.gridOptionsService.useAsyncEvents(),i=t?this.asyncGlobalEventListeners:this.syncGlobalEventListeners;i.add(e),this.eventService.addGlobalListener(e,t)},t.prototype.removeEventListener=function(e,t){var i,n=this.asyncEventListeners.get(e),o=!!(null===n||void 0===n?void 0:n.delete(t));o||null===(i=this.asyncEventListeners.get(e))||void 0===i||i.delete(t),this.eventService.removeEventListener(e,t,o)},t.prototype.removeGlobalListener=function(e){var t=this.asyncGlobalEventListeners.delete(e);t||this.syncGlobalEventListeners.delete(e),this.eventService.removeGlobalListener(e,t)},t.prototype.destroyEventListeners=function(e,t){var i=this;e.forEach((function(e,n){e.forEach((function(e){return i.eventService.removeEventListener(n,e,t)})),e.clear()})),e.clear()},t.prototype.destroyGlobalListeners=function(e,t){var i=this;e.forEach((function(e){return i.eventService.removeGlobalListener(e,t)})),e.clear()},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.destroyEventListeners(this.syncEventListeners,!1),this.destroyEventListeners(this.asyncEventListeners,!0),this.destroyGlobalListeners(this.syncGlobalEventListeners,!1),this.destroyGlobalListeners(this.asyncGlobalEventListeners,!0)},t=iC([ue("apiEventService")],t),t}(st),oC=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),rC=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},sC=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},aC=function(e,t,i){if(i||2===arguments.length)for(var n,o=0,r=t.length;o<r;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},lC=function(e){function t(){var t=e.call(this,'<span class="ag-paging-page-size"></span>')||this;return t.hasEmptyOption=!1,t.handlePageSizeItemSelected=function(){if(t.selectPageSizeComp){var e=t.selectPageSizeComp.getValue();if(e){var i=Number(e);isNaN(i)||i<1||i===t.paginationProxy.getPageSize()||(t.paginationProxy.setPageSize(i,"pageSizeSelector"),t.hasEmptyOption&&t.toggleSelectDisplay(!0),t.selectPageSizeComp.getFocusableElement().focus())}}},t}return oC(t,e),t.prototype.init=function(){var e=this;this.addManagedPropertyListener("paginationPageSizeSelector",(function(){e.onPageSizeSelectorValuesChange()})),this.addManagedListener(this.eventService,ht.EVENT_PAGINATION_CHANGED,(function(t){return e.handlePaginationChanged(t)}))},t.prototype.handlePaginationChanged=function(e){if(this.selectPageSizeComp&&(null===e||void 0===e?void 0:e.newPageSize)){var t=this.paginationProxy.getPageSize();this.getPageSizeSelectorValues().includes(t)?this.selectPageSizeComp.setValue(t.toString()):this.hasEmptyOption?this.selectPageSizeComp.setValue(""):this.toggleSelectDisplay(!0)}},t.prototype.toggleSelectDisplay=function(e){this.selectPageSizeComp&&this.reset(),e&&(this.reloadPageSizesSelector(),this.selectPageSizeComp&&this.appendChild(this.selectPageSizeComp))},t.prototype.reset=function(){Wn(this.getGui()),this.selectPageSizeComp&&(this.destroyBean(this.selectPageSizeComp),this.selectPageSizeComp=void 0)},t.prototype.onPageSizeSelectorValuesChange=function(){this.selectPageSizeComp&&this.shouldShowPageSizeSelector()&&this.reloadPageSizesSelector()},t.prototype.shouldShowPageSizeSelector=function(){return this.gridOptionsService.get("pagination")&&!this.gridOptionsService.get("suppressPaginationPanel")&&!this.gridOptionsService.get("paginationAutoPageSize")&&!1!==this.gridOptionsService.get("paginationPageSizeSelector")},t.prototype.reloadPageSizesSelector=function(){var e=this,t=this.getPageSizeSelectorValues(),i=this.paginationProxy.getPageSize(),n=!i||!t.includes(i);n&&(t.unshift(""),G("The paginationPageSize grid option is set to a value that is not in the list of page size options.\n                Please make sure that the paginationPageSize grid option is set to one of the values in the \n                paginationPageSizeSelector array, or set the paginationPageSizeSelector to false to hide the page size selector.")),this.selectPageSizeComp&&(this.destroyBean(this.selectPageSizeComp),this.selectPageSizeComp=void 0);var o=this.localeService.getLocaleTextFunc(),r=o("pageSizeSelectorLabel","Page Size:"),s=t.map((function(e){return{value:String(e),text:String(e)}})),a=o("ariaPageSizeSelectorLabel","Page Size");this.selectPageSizeComp=this.createManagedBean(new Hr).addOptions(s).setValue(String(n?"":i)).setAriaLabel(a).setLabel(r).onValueChange((function(){return e.handlePageSizeItemSelected()})),this.hasEmptyOption=n},t.prototype.getPageSizeSelectorValues=function(){var e=[20,50,100],t=this.gridOptionsService.get("paginationPageSizeSelector");return Array.isArray(t)&&this.validateValues(t)?aC([],sC(t),!1).sort((function(e,t){return e-t})):e},t.prototype.validateValues=function(e){if(!e.length)return G("The paginationPageSizeSelector grid option is an empty array. This is most likely a mistake.\n                If you want to hide the page size selector, please set the paginationPageSizeSelector to false."),!1;for(var t=0;t<e.length;t++){var i=e[t],n="number"===typeof i,o=i>0;if(!n)return G("The paginationPageSizeSelector grid option contains a non-numeric value.\n                    Please make sure that all values in the paginationPageSizeSelector array are numbers."),!1;if(!o)return G("The paginationPageSizeSelector grid option contains a negative number or zero.\n                    Please make sure that all values in the paginationPageSizeSelector array are positive."),
11!1}return!0},t.prototype.destroy=function(){this.toggleSelectDisplay(!1),e.prototype.destroy.call(this)},rC([de("localeService")],t.prototype,"localeService",void 0),rC([de("gridOptionsService")],t.prototype,"gridOptionsService",void 0),rC([de("paginationProxy")],t.prototype,"paginationProxy",void 0),rC([le],t.prototype,"init",null),t}(rr),cC=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},uC=function(e,t,i){if(i||2===arguments.length)for(var n,o=0,r=t.length;o<r;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))};function dC(e,t,i){if(!t)return V("No gridOptions provided to createGrid"),{};var n=wm.getCoercedGridOptions(t),o=(new fC).create(e,n,(function(t){var i=new dv(e);t.createBean(i)}),void 0,i);if(!Object.isFrozen(t)&&!(null===i||void 0===i?void 0:i.frameworkOverrides)){var r="https://ag-grid.com/javascript-data-grid/grid-interface/#grid-api";Object.defineProperty(t,"api",{get:function(){V("gridOptions.api is no longer supported. See ".concat(r,"."))},configurable:!0}),Object.defineProperty(t,"columnApi",{get:function(){V("gridOptions.columnApi is no longer supported and all methods moved to the grid api. See ".concat(r,"."))},configurable:!0})}return o}(function(){function e(e,t,i){var n=this;if(G("Since v31 new Grid(...) is deprecated. Use createGrid instead: `const gridApi = createGrid(...)`. The grid api is returned from createGrid and will not be available on gridOptions."),t){this.gridOptions=t;var o=(new fC).create(e,t,(function(t){var i=new dv(e),o=t.createBean(i);o.addDestroyFunc((function(){n.destroy()}))}),void 0,i);this.gridOptions.api=o,this.gridOptions.columnApi=new Ug(o)}else V("No gridOptions provided to the grid")}e.prototype.destroy=function(){var e;this.gridOptions&&(null===(e=this.gridOptions.api)||void 0===e||e.destroy(),delete this.gridOptions.api,delete this.gridOptions.columnApi)}})();var pC,hC=1,fC=function(){function e(){}return e.prototype.create=function(e,t,i,n,o){var r,s=!!t.debug,a=null!==(r=t.gridId)&&void 0!==r?r:String(hC++),l=this.getRegisteredModules(o,a),c=this.createBeansList(t.rowModelType,l,a),u=this.createProvidedBeans(e,t,o);
11if(c){var d={providedBeanInstances:u,beanClasses:c,debug:s,gridId:a},p=new rv("Context",(function(){return d.debug})),h=new se(d,p),f=h.getBean("beans");return this.registerModuleUserComponents(f,l),this.registerStackComponents(f,l),this.registerControllers(f,l),i(h),f.syncService.start(),n&&n(h),f.gridApi}V("Failed to create grid.")},e.prototype.registerControllers=function(e,t){t.forEach((function(t){t.controllers&&t.controllers.forEach((function(t){return e.ctrlsFactory.register(t)}))}))},e.prototype.registerStackComponents=function(e,t){var i=this.createAgStackComponentsList(t);e.agStackComponentsRegistry.setupComponents(i)},e.prototype.getRegisteredModules=function(e,t){var i=e?e.modules:null,n=ne.__getRegisteredModules(t),o=[],r={},s=function(e,t,i){var n=function(t){r[t.moduleName]||(r[t.moduleName]=!0,o.push(t),ne.__register(t,e,i))};n(t),t.dependantModules&&t.dependantModules.forEach((function(t){return s(e,t,i)}))};return i&&i.forEach((function(e){return s(!0,e,t)})),n&&n.forEach((function(e){return s(!ne.__isPackageBased(),e,void 0)})),o},e.prototype.registerModuleUserComponents=function(e,t){var i=this.extractModuleEntity(t,(function(e){return e.userComponents?e.userComponents:[]}));i.forEach((function(t){e.userComponentRegistry.registerDefaultComponent(t.componentName,t.componentClass)}))},e.prototype.createProvidedBeans=function(e,t,i){var n=i?i.frameworkOverrides:null;r(n)&&(n=new Dg);var o={gridOptions:t,eGridDiv:e,globalEventListener:i?i.globalEventListener:null,globalSyncEventListener:i?i.globalSyncEventListener:null,frameworkOverrides:n};return i&&i.providedBeanInstances&&Object.assign(o,i.providedBeanInstances),o},e.prototype.createAgStackComponentsList=function(e){var t=[{componentName:"AgCheckbox",componentClass:Yr},{componentName:"AgRadioButton",componentClass:Xr},{componentName:"AgToggleButton",componentClass:ff},{componentName:"AgInputTextField",componentClass:bs},{componentName:"AgInputTextArea",componentClass:vf},{componentName:"AgInputNumberField",componentClass:Ss},{componentName:"AgInputDateField",componentClass:mf},{componentName:"AgInputRange",componentClass:bf},{componentName:"AgRichSelect",componentClass:Vf},{componentName:"AgSelect",componentClass:Hr},{componentName:"AgSlider",componentClass:Hf},{componentName:"AgGridBody",componentClass:yd},{componentName:"AgHeaderRoot",componentClass:ch},{componentName:"AgSortIndicator",componentClass:zs},{componentName:"AgPagination",componentClass:fy},{componentName:"AgPageSizeSelector",componentClass:lC},{componentName:"AgOverlayWrapper",componentClass:yy},{componentName:"AgGroupComponent",componentClass:zf},{componentName:"AgPanel",componentClass:og},{componentName:"AgDialog",componentClass:lg},{componentName:"AgRowContainer",componentClass:Bd},{componentName:"AgFakeHorizontalScroll",componentClass:tm},{componentName:"AgFakeVerticalScroll",componentClass:Dm},{componentName:"AgAutocomplete",componentClass:xg}],i=this.extractModuleEntity(e,(function(e){return e.agStackComponents?e.agStackComponents:[]}));return t=t.concat(i),t},e.prototype.createBeansList=function(e,t,i){void 0===e&&(e="clientSide");var n=t.filter((function(t){return!t.rowModel||t.rowModel===e})),o={clientSide:J.ClientSideRowModelModule,infinite:J.InfiniteRowModelModule,serverSide:J.ServerSideRowModelModule,viewport:J.ViewportRowModelModule};if(o[e]){if(ne.__assertRegistered(o[e],"rowModelType = '".concat(e,"'"),i)){var r=[iu,by,Ey,Iy,Av,tc,bl,Vv,Hv,Sh,jl,ly,ph,xm,eC,Zh,Kl,Ut,me,wm,vg,Bg,lc,Gt,nh,cf,Uh,Zg,ut,ev,Ig,Dd,Mv,Yg,ov,jt,Mh,gh,Pa,Ug,bv,Ed,oy,Mg,qh,pf,bd,vv,Ev,Tv,dy,mt,Iv,Oh,ky,ti,Gy,By,sf,Wy,Ky,om,am,Xy,Lm,Gm,oc,jm,Um,Xm,Ah,nC],s=this.extractModuleEntity(n,(function(e){return e.beans?e.beans:[]}));r.push.apply(r,uC([],cC(s),!1));var a=[];return r.forEach((function(e){a.indexOf(e)<0&&a.push(e)})),a}}else V("Could not find row model for rowModelType = "+e)},e.prototype.extractModuleEntity=function(e,t){return[].concat.apply([],uC([],cC(e.map(t)),!1))},e}(),gC=function(){function e(){}return e.prototype.wrap=function(e,t,i,n){var o=this;void 0===i&&(i=[]);var r=this.createWrapper(e,n);return t.forEach((function(e){o.createMethod(r,e,!0)}
11)),i.forEach((function(e){o.createMethod(r,e,!1)})),r},e.prototype.unwrap=function(e){return e},e.prototype.createMethod=function(e,t,i){e.addMethod(t,this.createMethodProxy(e,t,i))},e.prototype.createMethodProxy=function(e,t,i){return function(){return e.hasMethod(t)?e.callMethod(t,arguments):(i&&console.warn("AG Grid: Framework component is missing the method "+t+"()"),null)}},e}(),vC={columnGroup:["column","stackedColumn","normalizedColumn"],barGroup:["bar","stackedBar","normalizedBar"],pieGroup:["pie","doughnut"],lineGroup:["line"],scatterGroup:["scatter","bubble"],areaGroup:["area","stackedArea","normalizedArea"],histogramGroup:["histogram"],combinationGroup:["columnLineCombo","areaColumnCombo","customCombo"]},yC=["chartSettings","chartData","chartFormat"],mC=["chartUnlink","chartLink","chartDownload"],CC={settings:"chartSettings",data:"chartData",format:"chartFormat"};(function(e){e["InsideBase"]="insideBase",e["InsideEnd"]="insideEnd",e["Center"]="center",e["OutsideEnd"]="outsideEnd"})(pC||(pC={}));
12/**
13 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
14 * @version v31.0.0
15 * @link https://www.ag-grid.com/
16 * @license MIT
17 */
18var bC="undefined"===typeof i.g?{}:i.g;bC.HTMLElement="undefined"===typeof HTMLElement?{}:HTMLElement,bC.HTMLButtonElement="undefined"===typeof HTMLButtonElement?{}:HTMLButtonElement,bC.HTMLSelectElement="undefined"===typeof HTMLSelectElement?{}:HTMLSelectElement,bC.HTMLInputElement="undefined"===typeof HTMLInputElement?{}:HTMLInputElement,bC.Node="undefined"===typeof Node?{}:Node,bC.MouseEvent="undefined"===typeof MouseEvent?{}:MouseEvent;var wC,SC=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},EC=function(e,t,i){if(i||2===arguments.length)for(var n,o=0,r=t.length;o<r;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},xC=function(){function e(t,i,n,o,r,s){this.nextId=0,this.allNodesMap={},this.dataLoaded=!1,this.rootNode=t,this.gridOptionsService=i,this.eventService=n,this.columnModel=o,this.beans=s,this.selectionService=r,this.rootNode.group=!0,this.rootNode.level=-1,this.rootNode.id=e.ROOT_NODE_ID,this.rootNode.allLeafChildren=[],this.rootNode.childrenAfterGroup=[],this.rootNode.childrenAfterSort=[],this.rootNode.childrenAfterAggFilter=[],this.rootNode.childrenAfterFilter=[]}return e.prototype.getCopyOfNodesMap=function(){return Ko.cloneObject(this.allNodesMap)},e.prototype.getRowNode=function(e){return this.allNodesMap[e]},e.prototype.setRowData=function(t){var i=this;if("string"!==typeof t){this.dataLoaded=!0,this.dispatchRowDataUpdateStartedEvent(t);var n=this.rootNode,o=this.rootNode.sibling;n.childrenAfterFilter=null,n.childrenAfterGroup=null,n.childrenAfterAggFilter=null,n.childrenAfterSort=null,n.childrenMapped=null,n.updateHasChildren(),this.nextId=0,this.allNodesMap={},t?n.allLeafChildren=t.map((function(t){return i.createNode(t,i.rootNode,e.TOP_LEVEL)})):(n.allLeafChildren=[],n.childrenAfterGroup=[]),o&&(o.childrenAfterFilter=n.childrenAfterFilter,o.childrenAfterGroup=n.childrenAfterGroup,o.childrenAfterAggFilter=n.childrenAfterAggFilter,o.childrenAfterSort=n.childrenAfterSort,o.childrenMapped=n.childrenMapped,o.allLeafChildren=n.allLeafChildren)}else console.warn("AG Grid: rowData must be an array, however you passed in a string. If you are loading JSON, make sure you convert the JSON string to JavaScript objects first")},e.prototype.updateRowData=function(e,t){this.dataLoaded=!0,this.dispatchRowDataUpdateStartedEvent(e.add);var i={remove:[],update:[],add:[]},n=[];return this.executeRemove(e,i,n),this.executeUpdate(e,i,n),this.executeAdd(e,i),this.updateSelection(n,"rowDataChanged"),t&&Ko.sortRowNodesByOrder(this.rootNode.allLeafChildren,t),i},e.prototype.hasData=function(){return this.dataLoaded},e.prototype.dispatchRowDataUpdateStartedEvent=function(e){var t={type:ht.EVENT_ROW_DATA_UPDATE_STARTED,firstRowData:(null===e||void 0===e?void 0:e.length)?e[0]:null};this.eventService.dispatchEvent(t)},e.prototype.updateSelection=function(e,t){var i=e.length>0;if(i&&this.selectionService.setNodesSelected({newValue:!1,nodes:e,suppressFinishActions:!0,source:t}),this.selectionService.updateGroupsFromChildrenSelections(t),i){var n={type:ht.EVENT_SELECTION_CHANGED,source:t};this.eventService.dispatchEvent(n)}},e.prototype.executeAdd=function(t,i){var n,o=this,r=t.add,s=t.addIndex;if(!Ko.missingOrEmpty(r)){var a=r.map((function(t){return o.createNode(t,o.rootNode,e.TOP_LEVEL)}));if("number"===typeof s&&s>=0){var l=this.rootNode.allLeafChildren,c=l.length,u=s,d=this.gridOptionsService.get("treeData");if(d&&s>0&&c>0)for(var p=0;p<c;p++)if((null===(n=l[p])||void 0===n?void 0:n.rowIndex)==s-1){u=p+1;break}var h=l.slice(0,u),f=l.slice(u,l.length);this.rootNode.allLeafChildren=EC(EC(EC([],SC(h),!1),SC(a),!1),SC(f),!1)}else this.rootNode.allLeafChildren=EC(EC([],SC(this.rootNode.allLeafChildren),!1),SC(a),!1);this.rootNode.sibling&&(this.rootNode.sibling.allLeafChildren=this.rootNode.allLeafChildren),i.add=a}},e.prototype.executeRemove=function(e,t,i){var n=this,o=e.remove;if(!Ko.missingOrEmpty(o)){var r={};o.forEach((function(e){var o=n.lookupRowNode(e);o&&(o.isSelected()&&i.push(o),o.clearRowTopAndRowIndex(),r[o.id]=!0,delete n.allNodesMap[o.id],t.remove.push(o))})),this.rootNode.allLeafChildren=this.rootNode.allLeafChildren.filter((function(e){return!r[e.id]})),this.rootNode.sibling&&(this.rootNode.sibling.allLeafChildren=this.rootNode.allLeafChildren)}},e.prototype.executeUpdate=function(t,i,n){var o=this,r=t.update;Ko.missingOrEmpty(r)||r.forEach((function(t){var r=o.lookupRowNode(t);r&&(r.updateData(t),!r.selectable&&r.isSelected()&&n.push(r),o.setMasterForRow(r,t,e.TOP_LEVEL,!1),i.update.push(r))}))},e.prototype.lookupRowNode=function(e){var t,i=this.gridOptionsService.getCallback("getRowId");if(i){var n=i({data:e,level:0});if(t=this.allNodesMap[n],!t)return console.error("AG Grid: could not find row id=".concat(n,", data item was not found for this id")),null}else if(t=this.rootNode.allLeafChildren.find((function(t){return t.data===e})),!t)return console.error("AG Grid: could not find data item as object was not found",e),console.error("Consider using getRowId to help the Grid find matching row data"),null;return t||null},e.prototype.createNode=function(e,t,i){var n=new wa(this.beans);n.group=!1,this.setMasterForRow(n,e,i,!0);var o=this.gridOptionsService.get("suppressParentsInRowNodes");return t&&!o&&(n.parent=t),n.level=i,n.setDataAndId(e,this.nextId.toString()),this.allNodesMap[n.id]&&console.warn("AG Grid: duplicate node id '".concat(n.id,"' detected from getRowId callback, this could cause issues in your grid.")),this.allNodesMap[n.id]=n,this.nextId++,n},e.prototype.setMasterForRow=function(e,t,i,n){var o=this.gridOptionsService.get("treeData");if(o)e.setMaster(!1),n&&(e.expanded=!1);else{var r=this.gridOptionsService.get("masterDetail");if(r){var s=this.gridOptionsService.get("isRowMaster");
18s?e.setMaster(s(t)):e.setMaster(!0)}else e.setMaster(!1);if(n){var a=this.columnModel.getRowGroupColumns(),l=a?a.length:0,c=i+l;e.expanded=!!e.master&&this.isExpanded(c)}}},e.prototype.isExpanded=function(e){var t=this.gridOptionsService.get("groupDefaultExpanded");return-1===t||e<t},e.TOP_LEVEL=0,e.ROOT_NODE_ID="ROOT_NODE_ID",e}(),OC=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),TC=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},DC=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},RC=function(e,t,i){if(i||2===arguments.length)for(var n,o=0,r=t.length;o<r;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))};(function(e){e[e["Normal"]=0]="Normal",e[e["AfterFilter"]=1]="AfterFilter",e[e["AfterFilterAndSort"]=2]="AfterFilterAndSort",e[e["PivotNodes"]=3]="PivotNodes"})(wC||(wC={}));var AC,_C=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onRowHeightChanged_debounced=Ko.debounce(t.onRowHeightChanged.bind(t),100),t.rowsToDisplay=[],t.hasStarted=!1,t.shouldSkipSettingDataOnStart=!1,t}return OC(t,e),t.prototype.init=function(){var e=this,t=this.refreshModel.bind(this,{step:ih.EVERYTHING}),i=!this.gridOptionsService.get("suppressAnimationFrame"),n=this.refreshModel.bind(this,{step:ih.EVERYTHING,afterColumnsChanged:!0,keepRenderedRows:!0,animate:i});this.addManagedListener(this.eventService,ht.EVENT_NEW_COLUMNS_LOADED,n),this.addManagedListener(this.eventService,ht.EVENT_COLUMN_ROW_GROUP_CHANGED,t),this.addManagedListener(this.eventService,ht.EVENT_COLUMN_VALUE_CHANGED,this.onValueChanged.bind(this)),this.addManagedListener(this.eventService,ht.EVENT_COLUMN_PIVOT_CHANGED,this.refreshModel.bind(this,{step:ih.PIVOT})),this.addManagedListener(this.eventService,ht.EVENT_FILTER_CHANGED,this.onFilterChanged.bind(this)),this.addManagedListener(this.eventService,ht.EVENT_SORT_CHANGED,this.onSortChanged.bind(this)),this.addManagedListener(this.eventService,ht.EVENT_COLUMN_PIVOT_MODE_CHANGED,t),this.addManagedListener(this.eventService,ht.EVENT_GRID_STYLES_CHANGED,this.onGridStylesChanges.bind(this)),this.addManagedListener(this.eventService,ht.EVENT_GRID_READY,(function(){return e.onGridReady()})),this.addPropertyListeners(),this.rootNode=new wa(this.beans),this.nodeManager=new xC(this.rootNode,this.gridOptionsService,this.eventService,this.columnModel,this.selectionService,this.beans)},t.prototype.addPropertyListeners=function(){var e=this,t=new Set(["treeData","masterDetail"]),i=new Set(["suppressParentsInRowNodes","groupDefaultExpanded","groupAllowUnbalanced","initialGroupOrderComparator","groupHideOpenParents","groupDisplayType"]),n=new Set(["excludeChildrenWhenTreeDataFiltering"]),o=new Set(["removePivotHeaderRowWhenSingleValueColumn","pivotRowTotals","pivotColumnGroupTotals","suppressExpandablePivotGroups"]),r=new Set(["getGroupRowAgg","alwaysAggregateAtRootLevel","groupIncludeTotalFooter","suppressAggFilteredOnly"]),s=new Set(["postSortRows","groupDisplayType","accentedSort"]),a=new Set([]),l=new Set(["groupRemoveSingleChildren","groupRemoveLowestSingleChildren","groupIncludeFooter"]),c=RC(RC(RC(RC(RC(RC(RC(RC(RC([],DC(t),!1),DC(i),!1),DC(n),!1),DC(o),!1),DC(o),!1),DC(r),!1),DC(s),!1),DC(a),!1),DC(l),!1);this.addManagedPropertyListeners(c,(function(c){var u,d=null===(u=c.changeSet)||void 0===u?void 0:u.properties;if(d){var p=function(e){return d.some((function(t){return e.has(t)}))};
18p(t)?e.setRowData(e.rootNode.allLeafChildren.map((function(e){return e.data}))):p(i)?e.refreshModel({step:ih.EVERYTHING}):p(n)?e.refreshModel({step:ih.FILTER}):p(o)?e.refreshModel({step:ih.PIVOT}):p(r)?e.refreshModel({step:ih.AGGREGATE}):p(s)?e.refreshModel({step:ih.SORT}):p(a)?e.refreshModel({step:ih.FILTER_AGGREGATES}):p(l)&&e.refreshModel({step:ih.MAP})}})),this.addManagedPropertyListener("rowHeight",(function(){return e.resetRowHeights()}))},t.prototype.start=function(){this.hasStarted=!0,this.shouldSkipSettingDataOnStart?this.dispatchUpdateEventsAndRefresh():this.setInitialData()},t.prototype.setInitialData=function(){var e=this.gridOptionsService.get("rowData");e&&(this.shouldSkipSettingDataOnStart=!0,this.setRowData(e))},t.prototype.ensureRowHeightsValid=function(e,t,i,n){var o,r=!1;do{o=!1;for(var s=this.getRowIndexAtPixel(e),a=this.getRowIndexAtPixel(t),l=Math.max(s,i),c=Math.min(a,n),u=l;u<=c;u++){var d=this.getRow(u);if(d.rowHeightEstimated){var p=this.gridOptionsService.getRowHeightForNode(d);d.setRowHeight(p.height),o=!0,r=!0}}o&&this.setRowTopAndRowIndex()}while(o);return r},t.prototype.setRowTopAndRowIndex=function(){for(var e=this.environment.getDefaultRowHeight(),t=0,i=new Set,n=this.gridOptionsService.isDomLayout("normal"),o=0;o<this.rowsToDisplay.length;o++){var r=this.rowsToDisplay[o];if(null!=r.id&&i.add(r.id),null==r.rowHeight){var s=this.gridOptionsService.getRowHeightForNode(r,n,e);r.setRowHeight(s.height,s.estimated)}r.setRowTop(t),r.setRowIndex(o),t+=r.rowHeight}return i},t.prototype.clearRowTopAndRowIndex=function(e,t){var i=e.isActive(),n=function(e){e&&null!=e.id&&!t.has(e.id)&&e.clearRowTopAndRowIndex()},o=function(e){if(n(e),n(e.detailNode),n(e.sibling),e.hasChildren()&&e.childrenAfterGroup){var t=-1==e.level,r=i&&!t&&!e.expanded;r||e.childrenAfterGroup.forEach(o)}};o(this.rootNode)},t.prototype.ensureRowsAtPixel=function(e,t,i){var n=this;void 0===i&&(i=0);var o=this.getRowIndexAtPixel(t),r=this.getRow(o),s=!this.gridOptionsService.get("suppressAnimationFrame");return r!==e[0]&&(e.forEach((function(e){Ko.removeFromArray(n.rootNode.allLeafChildren,e)})),e.forEach((function(e,t){Ko.insertIntoArray(n.rootNode.allLeafChildren,e,Math.max(o+i,0)+t)})),this.refreshModel({step:ih.EVERYTHING,keepRenderedRows:!0,keepEditingRows:!0,animate:s}),!0)},t.prototype.highlightRowAtPixel=function(e,t){var i=null!=t?this.getRowIndexAtPixel(t):null,n=null!=i?this.getRow(i):null;if(n&&e&&n!==e&&null!=t){var o=this.getHighlightPosition(t,n);this.lastHighlightedRow&&this.lastHighlightedRow!==n&&(this.lastHighlightedRow.setHighlighted(null),this.lastHighlightedRow=null),n.setHighlighted(o),this.lastHighlightedRow=n}else this.lastHighlightedRow&&(this.lastHighlightedRow.setHighlighted(null),this.lastHighlightedRow=null)},t.prototype.getHighlightPosition=function(e,t){if(!t){var i=this.getRowIndexAtPixel(e);if(t=this.getRow(i||0),!t)return Wl.Below}var n=t.rowTop,o=t.rowHeight;return e-n<o/2?Wl.Above:Wl.Below},t.prototype.getLastHighlightedRowNode=function(){return this.lastHighlightedRow},t.prototype.isLastRowIndexKnown=function(){return!0},t.prototype.getRowCount=function(){return this.rowsToDisplay?this.rowsToDisplay.length:0},t.prototype.getTopLevelRowCount=function(){var e=this.rowsToDisplay&&this.rowsToDisplay[0]===this.rootNode;if(e)return 1;var t=this.rootNode.childrenAfterAggFilter;return t?t.length:0},t.prototype.getTopLevelRowDisplayedIndex=function(e){var t=this.rowsToDisplay&&this.rowsToDisplay[0]===this.rootNode;if(t)return e;var i=this.rootNode.childrenAfterSort[e];if(this.gridOptionsService.get("groupHideOpenParents"))while(i.expanded&&i.childrenAfterSort&&i.childrenAfterSort.length>0)i=i.childrenAfterSort[0];return i.rowIndex},t.prototype.getRowBounds=function(e){if(Ko.missing(this.rowsToDisplay))return null;var t=this.rowsToDisplay[e];return t?{rowTop:t.rowTop,rowHeight:t.rowHeight}:null},t.prototype.onRowGroupOpened=function(){var e=this.gridOptionsService.isAnimateRows();this.refreshModel({step:ih.MAP,keepRenderedRows:!0,animate:e})},t.prototype.onFilterChanged=function(e){if(!e.afterDataChange){var t=this.gridOptionsService.isAnimateRows(),i=0===e.columns.length||e.columns.some((function(e){return e.isPrimary()})),n=i?ih.FILTER:ih.FILTER_AGGREGATES;this.refreshModel({step:n,keepRenderedRows:!0,animate:t})}},t.prototype.onSortChanged=function(){var e=this.gridOptionsService.isAnimateRows();this.refreshModel({step:ih.SORT,keepRenderedRows:!0,animate:e,keepEditingRows:!0})},t.prototype.getType=function(){return"clientSide"},t.prototype.onValueChanged=function(){this.columnModel.isPivotActive()?this.refreshModel({step:ih.PIVOT}):this.refreshModel({step:ih.AGGREGATE})},t.prototype.createChangePath=function(e){var t=Ko.missingOrEmpty(e),i=new Qh(!1,this.rootNode);return(t||this.gridOptionsService.get("treeData"))&&i.setInactive(),i},t.prototype.isSuppressModelUpdateAfterUpdateTransaction=function(e){if(!this.gridOptionsService.get("suppressModelUpdateAfterUpdateTransaction"))return!1;if(null==e.rowNodeTransactions)return!1;var t=e.rowNodeTransactions.filter((function(e){return null!=e.add&&e.add.length>0||null!=e.remove&&e.remove.length>0})),i=null==t||0==t.length;return i},t.prototype.buildRefreshModelParams=function(e){var t=ih.EVERYTHING,i={everything:ih.EVERYTHING,group:ih.EVERYTHING,filter:ih.FILTER,map:ih.MAP,aggregate:ih.AGGREGATE,sort:ih.SORT,pivot:ih.PIVOT};
18if(Ko.exists(e)&&(t=i[e]),!Ko.missing(t)){var n=!this.gridOptionsService.get("suppressAnimationFrame"),o={step:t,keepRenderedRows:!0,keepEditingRows:!0,animate:n};return o}console.error("AG Grid: invalid step ".concat(e,", available steps are ").concat(Object.keys(i).join(", ")))},t.prototype.refreshModel=function(e){if(this.hasStarted){var t="object"===typeof e&&"step"in e?e:this.buildRefreshModelParams(e);if(t&&!this.isSuppressModelUpdateAfterUpdateTransaction(t)){var i=this.createChangePath(t.rowNodeTransactions);switch(t.step){case ih.EVERYTHING:this.doRowGrouping(t.rowNodeTransactions,t.rowNodeOrder,i,!!t.afterColumnsChanged);case ih.FILTER:this.doFilter(i);case ih.PIVOT:this.doPivot(i);case ih.AGGREGATE:this.doAggregate(i);case ih.FILTER_AGGREGATES:this.doFilterAggregates(i);case ih.SORT:this.doSort(t.rowNodeTransactions,i);case ih.MAP:this.doRowsToDisplay()}var n=this.setRowTopAndRowIndex();this.clearRowTopAndRowIndex(i,n);var o={type:ht.EVENT_MODEL_UPDATED,animate:t.animate,keepRenderedRows:t.keepRenderedRows,newData:t.newData,newPage:!1,keepUndoRedoStack:t.keepUndoRedoStack};this.eventService.dispatchEvent(o)}}},t.prototype.isEmpty=function(){var e=Ko.missing(this.rootNode.allLeafChildren)||0===this.rootNode.allLeafChildren.length;return Ko.missing(this.rootNode)||e||!this.columnModel.isReady()},t.prototype.isRowsToRender=function(){return Ko.exists(this.rowsToDisplay)&&this.rowsToDisplay.length>0},t.prototype.getNodesInRangeForSelection=function(e,t){var i=!t,n=!1,o=[],r=this.gridOptionsService.get("groupSelectsChildren");return this.forEachNodeAfterFilterAndSort((function(s){if(!n)if(i&&(s===t||s===e)&&(n=!0,s.group&&r))o.push.apply(o,RC([],DC(s.allLeafChildren),!1));else{if(!i){if(s!==t&&s!==e)return;i=!0}var a=!s.group||!r;a&&o.push(s)}})),o},t.prototype.setDatasource=function(e){console.error("AG Grid: should never call setDatasource on clientSideRowController")},t.prototype.getTopLevelNodes=function(){return this.rootNode?this.rootNode.childrenAfterGroup:null},t.prototype.getRootNode=function(){return this.rootNode},t.prototype.getRow=function(e){return this.rowsToDisplay[e]},t.prototype.isRowPresent=function(e){return this.rowsToDisplay.indexOf(e)>=0},t.prototype.getRowIndexAtPixel=function(e){if(this.isEmpty()||0===this.rowsToDisplay.length)return-1;var t=0,i=this.rowsToDisplay.length-1;if(e<=0)return 0;var n=Ko.last(this.rowsToDisplay);if(n.rowTop<=e)return this.rowsToDisplay.length-1;var o=-1,r=-1;while(1){var s=Math.floor((t+i)/2),a=this.rowsToDisplay[s];if(this.isRowInPixel(a,e))return s;a.rowTop<e?t=s+1:a.rowTop>e&&(i=s-1);var l=o===t&&r===i;if(l)return s;o=t,r=i}},t.prototype.isRowInPixel=function(e,t){var i=e.rowTop,n=e.rowTop+e.rowHeight,o=i<=t&&n>t;return o},t.prototype.forEachLeafNode=function(e){this.rootNode.allLeafChildren&&this.rootNode.allLeafChildren.forEach((function(t,i){return e(t,i)}))},t.prototype.forEachNode=function(e,t){void 0===t&&(t=!1),this.recursivelyWalkNodesAndCallback({nodes:RC([],DC(this.rootNode.childrenAfterGroup||[]),!1),callback:e,recursionType:wC.Normal,index:0,includeFooterNodes:t})},t.prototype.forEachNodeAfterFilter=function(e,t){void 0===t&&(t=!1),this.recursivelyWalkNodesAndCallback({nodes:RC([],DC(this.rootNode.childrenAfterAggFilter||[]),!1),callback:e,recursionType:wC.AfterFilter,index:0,includeFooterNodes:t})},t.prototype.forEachNodeAfterFilterAndSort=function(e,t){void 0===t&&(t=!1),this.recursivelyWalkNodesAndCallback({nodes:RC([],DC(this.rootNode.childrenAfterSort||[]),!1),callback:e,recursionType:wC.AfterFilterAndSort,index:0,includeFooterNodes:t})},t.prototype.forEachPivotNode=function(e,t){void 0===t&&(t=!1),this.recursivelyWalkNodesAndCallback({nodes:[this.rootNode],callback:e,recursionType:wC.PivotNodes,index:0,includeFooterNodes:t})},t.prototype.recursivelyWalkNodesAndCallback=function(e){for(var t,i=e.nodes,n=e.callback,o=e.recursionType,r=e.includeFooterNodes,s=e.index,a=0;a<i.length;a++){var l=i[a];if(n(l,s++),l.hasChildren()&&!l.footer){var c=null;switch(o){case wC.Normal:c=l.childrenAfterGroup;break;case wC.AfterFilter:c=l.childrenAfterAggFilter;break;case wC.AfterFilterAndSort:c=l.childrenAfterSort;break;case wC.PivotNodes:c=l.leafGroup?null:l.childrenAfterSort;break}c&&(s=this.recursivelyWalkNodesAndCallback({nodes:RC([],DC(c),!1),callback:n,recursionType:o,index:s,includeFooterNodes:r}))}}var u=null===(t=i[0])||void 0===t?void 0:t.parent;if(!r||!u)return s;var d=u===this.rootNode;
18if(d){var p=this.gridOptionsService.get("groupIncludeTotalFooter");if(!p)return s}else{var h=this.gridOptionsService.getGroupIncludeFooter();if(!h({node:u}))return s}return u.createFooter(),n(u.sibling,s++),s},t.prototype.doAggregate=function(e){this.aggregationStage&&this.aggregationStage.execute({rowNode:this.rootNode,changedPath:e})},t.prototype.doFilterAggregates=function(e){this.filterAggregatesStage?this.filterAggregatesStage.execute({rowNode:this.rootNode,changedPath:e}):this.rootNode.childrenAfterAggFilter=this.rootNode.childrenAfterFilter},t.prototype.expandOrCollapseAll=function(e){var t=this.gridOptionsService.get("treeData"),i=this.columnModel.isPivotActive(),n=function(o){o&&o.forEach((function(o){var r=function(){o.expanded=e,n(o.childrenAfterGroup)};if(t){var s=Ko.exists(o.childrenAfterGroup);s&&r()}else if(i){var a=!o.leafGroup;a&&r()}else{var l=o.group;l&&r()}}))};this.rootNode&&n(this.rootNode.childrenAfterGroup),this.refreshModel({step:ih.MAP});var o=e?"expandAll":"collapseAll",r={type:ht.EVENT_EXPAND_COLLAPSE_ALL,source:o};this.eventService.dispatchEvent(r)},t.prototype.doSort=function(e,t){this.sortStage.execute({rowNode:this.rootNode,rowNodeTransactions:e,changedPath:t})},t.prototype.doRowGrouping=function(e,t,i,n){if(this.groupStage){if(e?this.groupStage.execute({rowNode:this.rootNode,rowNodeTransactions:e,rowNodeOrder:t,changedPath:i}):this.groupStage.execute({rowNode:this.rootNode,changedPath:i,afterColumnsChanged:n}),this.gridOptionsService.get("groupSelectsChildren")){var o=this.selectionService.updateGroupsFromChildrenSelections("rowGroupChanged",i);if(o){var r={type:ht.EVENT_SELECTION_CHANGED,source:"rowGroupChanged"};this.eventService.dispatchEvent(r)}}}else this.rootNode.childrenAfterGroup=this.rootNode.allLeafChildren,this.rootNode.sibling&&(this.rootNode.sibling.childrenAfterGroup=this.rootNode.childrenAfterGroup),this.rootNode.updateHasChildren();this.eventService.dispatchEventOnce({type:ht.EVENT_ROW_COUNT_READY})},t.prototype.doFilter=function(e){this.filterStage.execute({rowNode:this.rootNode,changedPath:e})},t.prototype.doPivot=function(e){this.pivotStage&&this.pivotStage.execute({rowNode:this.rootNode,changedPath:e})},t.prototype.getCopyOfNodesMap=function(){return this.nodeManager.getCopyOfNodesMap()},t.prototype.getRowNode=function(e){var t="string"==typeof e&&0==e.indexOf(wa.ID_PREFIX_ROW_GROUP);if(t){var i=void 0;return this.forEachNode((function(t){t.id===e&&(i=t)})),i}return this.nodeManager.getRowNode(e)},t.prototype.setRowData=function(e){this.selectionService.reset("rowDataChanged"),this.nodeManager.setRowData(e),this.hasStarted&&this.dispatchUpdateEventsAndRefresh()},t.prototype.dispatchUpdateEventsAndRefresh=function(){var e={type:ht.EVENT_ROW_DATA_UPDATED};this.eventService.dispatchEvent(e),this.refreshModel({step:ih.EVERYTHING,newData:!0})},t.prototype.batchUpdateRowData=function(e,t){var i=this;if(null==this.applyAsyncTransactionsTimeout){this.rowDataTransactionBatch=[];var n=this.gridOptionsService.getAsyncTransactionWaitMillis();this.applyAsyncTransactionsTimeout=window.setTimeout((function(){i.executeBatchUpdateRowData()}),n)}this.rowDataTransactionBatch.push({rowDataTransaction:e,callback:t})},t.prototype.flushAsyncTransactions=function(){null!=this.applyAsyncTransactionsTimeout&&(clearTimeout(this.applyAsyncTransactionsTimeout),this.executeBatchUpdateRowData())},t.prototype.executeBatchUpdateRowData=function(){var e=this;this.valueCache.onDataChanged();var t=[],i=[],n=!1;if(this.rowDataTransactionBatch&&this.rowDataTransactionBatch.forEach((function(o){var r=e.nodeManager.updateRowData(o.rowDataTransaction,void 0);i.push(r),o.callback&&t.push(o.callback.bind(null,r)),"number"===typeof o.rowDataTransaction.addIndex&&(n=!0)})),this.commonUpdateRowData(i,void 0,n),t.length>0&&window.setTimeout((function(){t.forEach((function(e){return e()}))}),0),i.length>0){var o={type:ht.EVENT_ASYNC_TRANSACTIONS_FLUSHED,results:i};this.eventService.dispatchEvent(o)}this.rowDataTransactionBatch=null,this.applyAsyncTransactionsTimeout=void 0},t.prototype.updateRowData=function(e,t){this.valueCache.onDataChanged();var i=this.nodeManager.updateRowData(e,t),n="number"===typeof e.addIndex;return this.commonUpdateRowData([i],t,n),i},t.prototype.createRowNodeOrder=function(){var e=this.gridOptionsService.get("suppressMaintainUnsortedOrder");if(!e){var t={};if(this.rootNode&&this.rootNode.allLeafChildren)for(var i=0;i<this.rootNode.allLeafChildren.length;i++){var n=this.rootNode.allLeafChildren[i];t[n.id]=i}return t}},t.prototype.commonUpdateRowData=function(e,t,i){if(this.hasStarted){var n=!this.gridOptionsService.get("suppressAnimationFrame");
18i&&(t=this.createRowNodeOrder());var o={type:ht.EVENT_ROW_DATA_UPDATED};this.eventService.dispatchEvent(o),this.refreshModel({step:ih.EVERYTHING,rowNodeTransactions:e,rowNodeOrder:t,keepRenderedRows:!0,keepEditingRows:!0,animate:n})}},t.prototype.doRowsToDisplay=function(){this.rowsToDisplay=this.flattenStage.execute({rowNode:this.rootNode})},t.prototype.onRowHeightChanged=function(){this.refreshModel({step:ih.MAP,keepRenderedRows:!0,keepEditingRows:!0,keepUndoRedoStack:!0})},t.prototype.onRowHeightChangedDebounced=function(){this.onRowHeightChanged_debounced()},t.prototype.resetRowHeights=function(){var 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()},t.prototype.resetRowHeightsForAllRowNodes=function(){var e=!1;return this.forEachNode((function(t){t.setRowHeight(t.rowHeight,!0);var i=t.detailNode;i&&i.setRowHeight(i.rowHeight,!0),t.sibling&&t.sibling.setRowHeight(t.sibling.rowHeight,!0),e=!0})),e},t.prototype.onGridStylesChanges=function(){this.columnModel.isAutoRowHeightActive()||this.resetRowHeights()},t.prototype.onGridReady=function(){this.hasStarted||this.setInitialData()},t.prototype.isRowDataLoaded=function(){return this.nodeManager.hasData()},TC([de("columnModel")],t.prototype,"columnModel",void 0),TC([de("selectionService")],t.prototype,"selectionService",void 0),TC([de("filterManager")],t.prototype,"filterManager",void 0),TC([de("valueCache")],t.prototype,"valueCache",void 0),TC([de("beans")],t.prototype,"beans",void 0),TC([de("filterStage")],t.prototype,"filterStage",void 0),TC([de("sortStage")],t.prototype,"sortStage",void 0),TC([de("flattenStage")],t.prototype,"flattenStage",void 0),TC([pe("groupStage")],t.prototype,"groupStage",void 0),TC([pe("aggregationStage")],t.prototype,"aggregationStage",void 0),TC([pe("pivotStage")],t.prototype,"pivotStage",void 0),TC([pe("filterAggregatesStage")],t.prototype,"filterAggregatesStage",void 0),TC([le],t.prototype,"init",null),t=TC([ue("rowModel")],t),t}(st),PC=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),MC=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},kC=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return PC(t,e),t.prototype.execute=function(e){var t=e.changedPath;this.filterService.filter(t)},MC([de("filterService")],t.prototype,"filterService",void 0),t=MC([ue("filterStage")],t),t}(st),NC=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),LC=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},IC=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return NC(t,e),t.prototype.execute=function(e){var t=this,i=this.sortController.getSortOptions(),n=Ko.exists(i)&&i.length>0,o=n&&Ko.exists(e.rowNodeTransactions)&&this.gridOptionsService.get("deltaSort"),r=i.some((function(e){var i=t.gridOptionsService.isColumnsSortingCoupledToGroup();return i?e.column.isPrimary()&&e.column.isRowGroupActive():!!e.column.getColDef().showRowGroup}));this.sortService.sort(i,n,o,e.rowNodeTransactions,e.changedPath,r)},LC([de("sortService")],t.prototype,"sortService",void 0),LC([de("sortController")],t.prototype,"sortController",void 0),t=LC([ue("sortStage")],t),t}(st),FC=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),GC=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},VC=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return FC(t,e),t.prototype.execute=function(e){var t=e.rowNode,i=[],n=this.columnModel.isPivotMode(),o=n&&t.leafGroup,r=o?[t]:t.childrenAfterSort,s=this.getFlattenDetails();this.recursivelyAddToRowsToDisplay(s,r,i,n,0);var a=i.length>0,l=!o&&a&&s.groupIncludeTotalFooter;return l&&(t.createFooter(),this.addRowNodeToRowsToDisplay(s,t.sibling,i,0)),i},t.prototype.getFlattenDetails=function(){var e=this.gridOptionsService.get("groupRemoveSingleChildren"),t=!e&&this.gridOptionsService.get("groupRemoveLowestSingleChildren");return{groupRemoveLowestSingleChildren:t,groupRemoveSingleChildren:e,isGroupMultiAutoColumn:this.gridOptionsService.isGroupMultiAutoColumn(),hideOpenParents:this.gridOptionsService.get("groupHideOpenParents"),groupIncludeTotalFooter:this.gridOptionsService.get("groupIncludeTotalFooter"),getGroupIncludeFooter:this.gridOptionsService.getGroupIncludeFooter()}},t.prototype.recursivelyAddToRowsToDisplay=function(e,t,i,n,o){if(!Ko.missingOrEmpty(t))for(var r=0;r<t.length;r++){var s=t[r],a=s.hasChildren(),l=n&&!a,c=e.groupRemoveSingleChildren&&a&&1===s.childrenAfterGroup.length,u=e.groupRemoveLowestSingleChildren&&a&&s.leafGroup&&1===s.childrenAfterGroup.length,d=n&&s.leafGroup,p=e.hideOpenParents&&s.expanded&&!s.master&&!d,h=!l&&!p&&!c&&!u;if(h&&this.addRowNodeToRowsToDisplay(e,s,i,o),!n||!s.leafGroup)if(
18a){var f=c||u;if(s.expanded||f){var g=f?o:o+1;this.recursivelyAddToRowsToDisplay(e,s.childrenAfterSort,i,n,g);var v=e.getGroupIncludeFooter({node:s});v?(s.createFooter(),this.addRowNodeToRowsToDisplay(e,s.sibling,i,g)):s.destroyFooter()}}else if(s.master&&s.expanded){var y=this.createDetailNode(s);this.addRowNodeToRowsToDisplay(e,y,i,o)}}},t.prototype.addRowNodeToRowsToDisplay=function(e,t,i,n){i.push(t),t.setUiLevel(e.isGroupMultiAutoColumn?0:n)},t.prototype.createDetailNode=function(e){if(Ko.exists(e.detailNode))return e.detailNode;var t=new wa(this.beans);return t.detail=!0,t.selectable=!1,t.parent=e,Ko.exists(e.id)&&(t.id="detail_"+e.id),t.data=e.data,t.level=e.level+1,e.detailNode=t,t},GC([de("columnModel")],t.prototype,"columnModel",void 0),GC([de("beans")],t.prototype,"beans",void 0),t=GC([ue("flattenStage")],t),t}(st),BC=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),jC=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},HC=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return BC(t,e),t.prototype.sort=function(e,t,i,n,o,r){var s=this,a=this.gridOptionsService.get("groupMaintainOrder"),l=this.columnModel.getAllGridColumns().some((function(e){return e.isRowGroupActive()})),c={};i&&n&&(c=this.calculateDirtyNodes(n));var u=this.columnModel.isPivotMode(),d=this.gridOptionsService.getCallback("postSortRows"),p=function(n){s.pullDownGroupDataForHideOpenParents(n.childrenAfterAggFilter,!0);var p=u&&n.leafGroup,h=a&&l&&!n.leafGroup&&!r;if(h){var f=n.childrenAfterAggFilter.slice(0);if(n.childrenAfterSort){var g={};n.childrenAfterSort.forEach((function(e,t){g[e.id]=t})),f.sort((function(e,t){var i,n;return(null!==(i=g[e.id])&&void 0!==i?i:0)-(null!==(n=g[t.id])&&void 0!==n?n:0)}))}n.childrenAfterSort=f}else n.childrenAfterSort=!t||p?n.childrenAfterAggFilter.slice(0):i?s.doDeltaSort(n,c,o,e):s.rowNodeSorter.doFullSort(n.childrenAfterAggFilter,e);if(n.sibling&&(n.sibling.childrenAfterSort=n.childrenAfterSort),s.updateChildIndexes(n),d){var v={nodes:n.childrenAfterSort};d(v)}};o&&o.forEachChangedNodeDepthFirst(p),this.updateGroupDataForHideOpenParents(o)},t.prototype.calculateDirtyNodes=function(e){var t={},i=function(e){e&&e.forEach((function(e){return t[e.id]=!0}))};return e&&e.forEach((function(e){i(e.add),i(e.update),i(e.remove)})),t},t.prototype.doDeltaSort=function(e,t,i,n){var o=this,r=e.childrenAfterAggFilter,s=e.childrenAfterSort;if(!s)return this.rowNodeSorter.doFullSort(r,n);var a={},l=[];r.forEach((function(e){t[e.id]||!i.canSkip(e)?l.push(e):a[e.id]=!0}));var c=s.filter((function(e){return a[e.id]})),u=function(e,t){return{currentPos:t,rowNode:e}},d=l.map(u).sort((function(e,t){return o.rowNodeSorter.compareRowNodes(n,e,t)}));return this.mergeSortedArrays(n,d,c.map(u)).map((function(e){var t=e.rowNode;return t}))},t.prototype.mergeSortedArrays=function(e,t,i){var n=[],o=0,r=0;while(o<t.length&&r<i.length){var s=this.rowNodeSorter.compareRowNodes(e,t[o],i[r]);s<0?n.push(t[o++]):n.push(i[r++])}while(o<t.length)n.push(t[o++]);while(r<i.length)n.push(i[r++]);return n},t.prototype.updateChildIndexes=function(e){if(!Ko.missing(e.childrenAfterSort))for(var t=e.childrenAfterSort,i=0;i<t.length;i++){var n=t[i],o=0===i,r=i===e.childrenAfterSort.length-1;n.setFirstChild(o),n.setLastChild(r),n.setChildIndex(i)}},t.prototype.updateGroupDataForHideOpenParents=function(e){var t=this;if(this.gridOptionsService.get("groupHideOpenParents")){if(this.gridOptionsService.get("treeData"))return Ko.warnOnce("The property hideOpenParents dose not work with Tree Data. This is because Tree Data has values at the group level, it doesn't make sense to hide them."),!1;var i=function(e){t.pullDownGroupDataForHideOpenParents(e.childrenAfterSort,!1),e.childrenAfterSort.forEach((function(e){e.hasChildren()&&i(e)}))};e&&e.executeFromRootNode((function(e){return i(e)}))}},t.prototype.pullDownGroupDataForHideOpenParents=function(e,t){var i=this;this.gridOptionsService.get("groupHideOpenParents")&&!Ko.missing(e)&&e.forEach((function(e){var n=i.columnModel.getGroupDisplayColumns();
18n.forEach((function(n){var o=n.getColDef().showRowGroup;if("string"===typeof o){var r=o,s=i.columnModel.getPrimaryColumn(r),a=s===e.rowGroupColumn;if(!a)if(t)e.setGroupValue(n.getId(),void 0);else{var l=e.getFirstChildOfFirstChild(s);l&&e.setGroupValue(n.getId(),l.key)}}else console.error("AG Grid: groupHideOpenParents only works when specifying specific columns for colDef.showRowGroup")}))}))},jC([de("columnModel")],t.prototype,"columnModel",void 0),jC([de("rowNodeSorter")],t.prototype,"rowNodeSorter",void 0),t=jC([ue("sortService")],t),t}(st),WC=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),UC=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},zC=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return WC(t,e),t.prototype.filter=function(e){var t=this.filterManager.isChildFilterPresent();this.filterNodes(t,e)},t.prototype.filterNodes=function(e,t){var i=this,n=function(t,n){t.hasChildren()?t.childrenAfterFilter=e&&!n?t.childrenAfterGroup.filter((function(e){var t=e.childrenAfterFilter&&e.childrenAfterFilter.length>0,n=e.data&&i.filterManager.doesRowPassFilter({rowNode:e});return t||n})):t.childrenAfterGroup:t.childrenAfterFilter=t.childrenAfterGroup,t.sibling&&(t.sibling.childrenAfterFilter=t.childrenAfterFilter)};if(this.doingTreeDataFiltering()){var o=function(e,t){if(e.childrenAfterGroup)for(var r=0;r<e.childrenAfterGroup.length;r++){var s=e.childrenAfterGroup[r],a=t||i.filterManager.doesRowPassFilter({rowNode:s});s.childrenAfterGroup?o(e.childrenAfterGroup[r],a):n(s,a)}n(e,t)},r=function(e){return o(e,!1)};t.executeFromRootNode(r)}else{var s=function(e){return n(e,!1)};t.forEachChangedNodeDepthFirst(s,!0)}},t.prototype.doingTreeDataFiltering=function(){return this.gridOptionsService.get("treeData")&&!this.gridOptionsService.get("excludeChildrenWhenTreeDataFiltering")},UC([de("filterManager")],t.prototype,"filterManager",void 0),t=UC([ue("filterService")],t),t}(st),KC=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),YC=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},qC=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},XC=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return KC(t,e),t.prototype.postConstruct=function(){var e=this;"clientSide"===this.rowModel.getType()&&(this.clientSideRowModel=this.rowModel,this.addManagedPropertyListener("rowData",(function(){return e.onRowDataUpdated()})))},t.prototype.isActive=function(){var e=this.gridOptionsService.exists("getRowId"),t=this.gridOptionsService.get("resetRowDataOnUpdate");return!t&&e},t.prototype.setRowData=function(e){var t=this.createTransactionForRowData(e);if(t){var i=qC(t,2),n=i[0],o=i[1];this.clientSideRowModel.updateRowData(n,o)}},t.prototype.createTransactionForRowData=function(e){if(Ko.missing(this.clientSideRowModel))console.error("AG Grid: ImmutableService only works with ClientSideRowModel");else{var t=this.gridOptionsService.getCallback("getRowId");if(null!=t){var i={remove:[],update:[],add:[]},n=this.clientSideRowModel.getCopyOfNodesMap(),o=this.gridOptionsService.get("suppressMaintainUnsortedOrder"),r=o?void 0:{};return Ko.exists(e)&&e.forEach((function(e,o){var s=t({data:e,level:0}),a=n[s];if(r&&(r[s]=o),a){var l=a.data!==e;l&&i.update.push(e),n[s]=void 0}else i.add.push(e)}
18)),Ko.iterateObject(n,(function(e,t){t&&i.remove.push(t.data)})),[i,r]}console.error("AG Grid: ImmutableService requires getRowId() callback to be implemented, your row data needs IDs!")}},t.prototype.onRowDataUpdated=function(){var e=this.gridOptionsService.get("rowData");e&&(this.isActive()?this.setRowData(e):(this.selectionService.reset("rowDataChanged"),this.clientSideRowModel.setRowData(e)))},YC([de("rowModel")],t.prototype,"rowModel",void 0),YC([de("rowRenderer")],t.prototype,"rowRenderer",void 0),YC([de("selectionService")],t.prototype,"selectionService",void 0),YC([le],t.prototype,"postConstruct",null),t=YC([ue("immutableService")],t),t}(st),$C="31.0.0",ZC={version:$C,moduleName:J.ClientSideRowModelModule,rowModel:"clientSide",beans:[_C,kC,IC,VC,HC,zC,XC]},JC=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),QC=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},eb=function(e){function t(t,i,n){var o=e.call(this,t)||this;return o.parentCache=i,o.params=n,o.startRow=t*n.blockSize,o.endRow=o.startRow+n.blockSize,o}return JC(t,e),t.prototype.postConstruct=function(){this.createRowNodes()},t.prototype.getBlockStateJson=function(){return{id:""+this.getId(),state:{blockNumber:this.getId(),startRow:this.getStartRow(),endRow:this.getEndRow(),pageStatus:this.getState()}}},t.prototype.setDataAndId=function(e,t,i){Ko.exists(t)?e.setDataAndId(t,i.toString()):e.setDataAndId(void 0,void 0)},t.prototype.loadFromDatasource=function(){var e=this,t=this.createLoadParams();Ko.missing(this.params.datasource.getRows)?console.warn("AG Grid: datasource is missing getRows method"):window.setTimeout((function(){e.params.datasource.getRows(t)}),0)},t.prototype.processServerFail=function(){},t.prototype.createLoadParams=function(){var e={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.gridOptionsService.context};return e},t.prototype.forEachNode=function(e,t,i){var n=this;this.rowNodes.forEach((function(o,r){var s=n.startRow+r;s<i&&e(o,t.next())}))},t.prototype.getLastAccessed=function(){return this.lastAccessed},t.prototype.getRow=function(e,t){void 0===t&&(t=!1),t||(this.lastAccessed=this.params.lastAccessedSequence.next());var i=e-this.startRow;return this.rowNodes[i]},t.prototype.getStartRow=function(){return this.startRow},t.prototype.getEndRow=function(){return this.endRow},t.prototype.createRowNodes=function(){this.rowNodes=[];for(var e=0;e<this.params.blockSize;e++){var t=this.startRow+e,i=new wa(this.beans);i.setRowHeight(this.params.rowHeight),i.uiLevel=0,i.setRowIndex(t),i.setRowTop(this.params.rowHeight*t),this.rowNodes.push(i)}},t.prototype.processServerResult=function(e){var t=this;this.rowNodes.forEach((function(i,n){var o=e.rowData?e.rowData[n]:void 0;!i.id&&i.alreadyRendered&&o&&(t.rowNodes[n]=new wa(t.beans),t.rowNodes[n].setRowIndex(i.rowIndex),t.rowNodes[n].setRowTop(i.rowTop),t.rowNodes[n].setRowHeight(i.rowHeight),i.clearRowTopAndRowIndex()),t.setDataAndId(t.rowNodes[n],o,t.startRow+n)}));var i=null!=e.rowCount&&e.rowCount>=0?e.rowCount:void 0;this.parentCache.pageLoaded(this,i)},t.prototype.destroyRowNodes=function(){this.rowNodes.forEach((function(e){e.clearRowTopAndRowIndex()}))},QC([de("beans")],t.prototype,"beans",void 0),QC([le],t.prototype,"postConstruct",null),QC([ce],t.prototype,"destroyRowNodes",null),t}(tf),tb=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ib=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},nb=function(e,t){return function(i,n){t(i,n,e)}},ob=function(e){function t(t){var i=e.call(this)||this;return i.lastRowIndexKnown=!1,i.blocks={},i.blockCount=0,i.rowCount=t.initialRowCount,i.params=t,i}return tb(t,e),t.prototype.setBeans=function(e){this.logger=e.create("InfiniteCache")},t.prototype.getRow=function(e,t){void 0===t&&(t=!1);var i=Math.floor(e/this.params.blockSize),n=this.blocks[i];
18if(!n){if(t)return;n=this.createBlock(i)}return n.getRow(e)},t.prototype.createBlock=function(e){var t=this.createBean(new eb(e,this,this.params));return this.blocks[t.getId()]=t,this.blockCount++,this.purgeBlocksIfNeeded(t),this.params.rowNodeBlockLoader.addBlock(t),t},t.prototype.refreshCache=function(){var e=0==this.blockCount;e?this.purgeCache():(this.getBlocksInOrder().forEach((function(e){return e.setStateWaitingToLoad()})),this.params.rowNodeBlockLoader.checkBlockToLoad())},t.prototype.destroyAllBlocks=function(){var e=this;this.getBlocksInOrder().forEach((function(t){return e.destroyBlock(t)}))},t.prototype.getRowCount=function(){return this.rowCount},t.prototype.isLastRowIndexKnown=function(){return this.lastRowIndexKnown},t.prototype.pageLoaded=function(e,t){this.isAlive()&&(this.logger.log("onPageLoaded: page = ".concat(e.getId(),", lastRow = ").concat(t)),this.checkRowCount(e,t),this.onCacheUpdated())},t.prototype.purgeBlocksIfNeeded=function(e){var i=this,n=this.getBlocksInOrder().filter((function(t){return t!=e})),o=function(e,t){return t.getLastAccessed()-e.getLastAccessed()};n.sort(o);var r=this.params.maxBlocksInCache>0,s=r?this.params.maxBlocksInCache-1:null,a=t.MAX_EMPTY_BLOCKS_TO_KEEP-1;n.forEach((function(e,t){var n=e.getState()===eb.STATE_WAITING_TO_LOAD&&t>=a,o=!!r&&t>=s;if(n||o){if(i.isBlockCurrentlyDisplayed(e))return;if(i.isBlockFocused(e))return;i.removeBlockFromCache(e)}}))},t.prototype.isBlockFocused=function(e){var t=this.focusService.getFocusCellToUseAfterRefresh();if(!t)return!1;if(null!=t.rowPinned)return!1;var i=e.getStartRow(),n=e.getEndRow(),o=t.rowIndex>=i&&t.rowIndex<n;return o},t.prototype.isBlockCurrentlyDisplayed=function(e){var t=e.getStartRow(),i=e.getEndRow()-1;return this.rowRenderer.isRangeInRenderedViewport(t,i)},t.prototype.removeBlockFromCache=function(e){e&&this.destroyBlock(e)},t.prototype.checkRowCount=function(e,t){if("number"===typeof t&&t>=0)this.rowCount=t,this.lastRowIndexKnown=!0;else if(!this.lastRowIndexKnown){var i=(e.getId()+1)*this.params.blockSize,n=i+this.params.overflowSize;this.rowCount<n&&(this.rowCount=n)}},t.prototype.setRowCount=function(e,t){this.rowCount=e,Ko.exists(t)&&(this.lastRowIndexKnown=t),this.lastRowIndexKnown||this.rowCount%this.params.blockSize===0&&this.rowCount++,this.onCacheUpdated()},t.prototype.forEachNodeDeep=function(e){var t=this,i=new Yo;this.getBlocksInOrder().forEach((function(n){return n.forEachNode(e,i,t.rowCount)}))},t.prototype.getBlocksInOrder=function(){var e=function(e,t){return e.getId()-t.getId()},t=Ko.getAllValuesInObject(this.blocks).sort(e);return t},t.prototype.destroyBlock=function(e){delete this.blocks[e.getId()],this.destroyBean(e),this.blockCount--,this.params.rowNodeBlockLoader.removeBlock(e)},t.prototype.onCacheUpdated=function(){if(this.isAlive()){this.destroyAllBlocksPastVirtualRowCount();var e={type:ht.EVENT_STORE_UPDATED};this.eventService.dispatchEvent(e)}},t.prototype.destroyAllBlocksPastVirtualRowCount=function(){var e=this,t=[];this.getBlocksInOrder().forEach((function(i){var n=i.getId()*e.params.blockSize;n>=e.rowCount&&t.push(i)})),t.length>0&&t.forEach((function(t){return e.destroyBlock(t)}))},t.prototype.purgeCache=function(){var e=this;this.getBlocksInOrder().forEach((function(t){return e.removeBlockFromCache(t)})),this.lastRowIndexKnown=!1,0===this.rowCount&&(this.rowCount=this.params.initialRowCount),this.onCacheUpdated()},t.prototype.getRowNodesInRange=function(e,t){var i=this,n=[],o=-1,r=!1,s=new Yo;Ko.missing(e)&&(r=!0);var a=!1;this.getBlocksInOrder().forEach((function(l){a||(r&&o+1!==l.getId()?a=!0:(o=l.getId(),l.forEachNode((function(i){var o=i===e||i===t;(r||o)&&n.push(i),o&&(r=!r)}),s,i.rowCount)))}));var l=a||r;return l?[]:n},t.MAX_EMPTY_BLOCKS_TO_KEEP=2,ib([de("rowRenderer")],t.prototype,"rowRenderer",void 0),ib([de("focusService")],t.prototype,"focusService",void 0),ib([nb(0,fe("loggerFactory"))],t.prototype,"setBeans",null),ib([ce],t.prototype,"destroyAllBlocks",null),t}(st),rb=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),sb=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},ab=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return rb(t,e),t.prototype.getRowBounds=function(e){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*e}},t.prototype.ensureRowHeightsValid=function(e,t,i,n){return!1},t.prototype.init=function(){var e=this;this.gridOptionsService.isRowModelType("infinite")&&(this.rowHeight=this.gridOptionsService.getRowHeightAsNumber(),this.addEventListeners(),this.addDestroyFunc((function(){return e.destroyCache()})),this.verifyProps())},t.prototype.verifyProps=function(){this.gridOptionsService.exists("initialGroupOrderComparator")&&Ko.warnOnce("initialGroupOrderComparator cannot be used with Infinite Row Model as sorting is done on the server side")},t.prototype.start=function(){this.setDatasource(this.gridOptionsService.get("datasource"))},t.prototype.destroyDatasource=function(){this.datasource&&(this.getContext().destroyBean(this.datasource),this.rowRenderer.datasourceChanged(),this.datasource=null)},t.prototype.addEventListeners=function(){var e=this;this.addManagedListener(this.eventService,ht.EVENT_FILTER_CHANGED,this.onFilterChanged.bind(this)),this.addManagedListener(this.eventService,ht.EVENT_SORT_CHANGED,this.onSortChanged.bind(this)),this.addManagedListener(this.eventService,ht.EVENT_NEW_COLUMNS_LOADED,this.onColumnEverything.bind(this)),this.addManagedListener(this.eventService,ht.EVENT_STORE_UPDATED,this.onCacheUpdated.bind(this)),this.addManagedPropertyListener("datasource",(function(){return e.setDatasource(e.gridOptionsService.get("datasource"))})),this.addManagedPropertyListener("cacheBlockSize",(function(){return e.resetCache()})),this.addManagedPropertyListener("rowHeight",(function(){e.rowHeight=e.gridOptionsService.getRowHeightAsNumber(),e.cacheParams.rowHeight=e.rowHeight,e.updateRowHeights()}))},t.prototype.onFilterChanged=function(){this.reset()},t.prototype.onSortChanged=function(){this.reset()},t.prototype.onColumnEverything=function(){var e;e=!this.cacheParams||this.isSortModelDifferent(),e&&this.reset()},t.prototype.isSortModelDifferent=function(){return!Ko.jsonEquals(this.cacheParams.sortModel,this.sortController.getSortModel())},t.prototype.getType=function(){return"infinite"},t.prototype.setDatasource=function(e){this.destroyDatasource(),this.datasource=e,e&&this.reset()},t.prototype.isEmpty=function(){return!this.infiniteCache},t.prototype.isRowsToRender=function(){return!!this.infiniteCache},t.prototype.getNodesInRangeForSelection=function(e,t){return this.infiniteCache?this.infiniteCache.getRowNodesInRange(e,t):[]},t.prototype.reset=function(){if(this.datasource){var e=this.gridOptionsService.getCallback("getRowId"),t=null!=e;t||this.selectionService.reset("rowDataChanged"),this.resetCache()}},t.prototype.createModelUpdatedEvent=function(){return{type:ht.EVENT_MODEL_UPDATED,newPage:!1,newPageSize:!1,newData:!1,keepRenderedRows:!0,animate:!1}},t.prototype.resetCache=function(){this.destroyCache(),this.cacheParams={datasource:this.datasource,filterModel:this.filterManager.getFilterModel(),sortModel:this.sortController.getSortModel(),rowNodeBlockLoader:this.rowNodeBlockLoader,initialRowCount:this.gridOptionsService.get("infiniteInitialRowCount"),maxBlocksInCache:this.gridOptionsService.get("maxBlocksInCache"),rowHeight:this.gridOptionsService.getRowHeightAsNumber(),overflowSize:this.gridOptionsService.get("
18cacheOverflowSize"),blockSize:this.gridOptionsService.get("cacheBlockSize"),lastAccessedSequence:new Yo},this.infiniteCache=this.createBean(new ob(this.cacheParams)),this.eventService.dispatchEventOnce({type:ht.EVENT_ROW_COUNT_READY});var e=this.createModelUpdatedEvent();this.eventService.dispatchEvent(e)},t.prototype.updateRowHeights=function(){var e=this;this.forEachNode((function(t){t.setRowHeight(e.rowHeight),t.setRowTop(e.rowHeight*t.rowIndex)}));var t=this.createModelUpdatedEvent();this.eventService.dispatchEvent(t)},t.prototype.destroyCache=function(){this.infiniteCache&&(this.infiniteCache=this.destroyBean(this.infiniteCache))},t.prototype.onCacheUpdated=function(){var e=this.createModelUpdatedEvent();this.eventService.dispatchEvent(e)},t.prototype.getRow=function(e){if(this.infiniteCache&&!(e>=this.infiniteCache.getRowCount()))return this.infiniteCache.getRow(e)},t.prototype.getRowNode=function(e){var t;return this.forEachNode((function(i){i.id===e&&(t=i)})),t},t.prototype.forEachNode=function(e){this.infiniteCache&&this.infiniteCache.forEachNodeDeep(e)},t.prototype.getTopLevelRowCount=function(){return this.getRowCount()},t.prototype.getTopLevelRowDisplayedIndex=function(e){return e},t.prototype.getRowIndexAtPixel=function(e){if(0!==this.rowHeight){var t=Math.floor(e/this.rowHeight),i=this.getRowCount()-1;return t>i?i:t}return 0},t.prototype.getRowCount=function(){return this.infiniteCache?this.infiniteCache.getRowCount():0},t.prototype.isRowPresent=function(e){var t=this.getRowNode(e.id);return!!t},t.prototype.refreshCache=function(){this.infiniteCache&&this.infiniteCache.refreshCache()},t.prototype.purgeCache=function(){this.infiniteCache&&this.infiniteCache.purgeCache()},t.prototype.isLastRowIndexKnown=function(){return!!this.infiniteCache&&this.infiniteCache.isLastRowIndexKnown()},t.prototype.setRowCount=function(e,t){this.infiniteCache&&this.infiniteCache.setRowCount(e,t)},sb([de("filterManager")],t.prototype,"filterManager",void 0),sb([de("sortController")],t.prototype,"sortController",void 0),sb([de("selectionService")],t.prototype,"selectionService",void 0),sb([de("rowRenderer")],t.prototype,"rowRenderer",void 0),sb([de("rowNodeBlockLoader")],t.prototype,"rowNodeBlockLoader",void 0),sb([le],t.prototype,"init",null),sb([ce],t.prototype,"destroyDatasource",null),t=sb([ue("rowModel")],t),t}(st),lb="31.0.0",cb={version:lb,moduleName:J.InfiniteRowModelModule,rowModel:"infinite",beans:[ab]},ub=function(){function e(){}return e.prototype.setBeans=function(e){this.beans=e},e.prototype.getFileName=function(e){var t=this.getDefaultFileExtension();return null!=e&&e.length||(e=this.getDefaultFileName()),-1===e.indexOf(".")?"".concat(e,".").concat(t):e},e.prototype.getData=function(e){var t=this.createSerializingSession(e),i=this.beans.gridSerializer.serialize(t,e);return i},e.prototype.getDefaultFileName=function(){return"export.".concat(this.getDefaultFileExtension())},e}(),db=function(){function e(e){this.groupColumns=[];var t=e.columnModel,i=e.valueService,n=e.gridOptionsService,o=e.valueFormatterService,r=e.valueParserService,s=e.processCellCallback,a=e.processHeaderCallback,l=e.processGroupHeaderCallback,c=e.processRowGroupCallback;this.columnModel=t,this.valueService=i,this.gridOptionsService=n,this.valueFormatterService=o,this.valueParserService=r,this.processCellCallback=s,this.processHeaderCallback=a,this.processGroupHeaderCallback=l,this.processRowGroupCallback=c}return e.prototype.prepare=function(e){this.groupColumns=e.filter((function(e){return!!e.getColDef().showRowGroup}))},e.prototype.extractHeaderValue=function(e){var t=this.getHeaderName(this.processHeaderCallback,e);return null!=t?t:""},e.prototype.extractRowCellValue=function(e,t,i,n,o){var r=this.gridOptionsService.get("groupHideOpenParents"),s=r&&!o.footer||!this.shouldRenderGroupSummaryCell(o,e,t)?this.valueService.getValue(e,o):this.createValueForGroupNode(o),a=this.processCell({accumulatedRowIndex:i,rowNode:o,column:e,value:s,processCellCallback:this.processCellCallback,type:n});return a},e.prototype.shouldRenderGroupSummaryCell=function(e,t,i){var n,o=e&&e.group;if(!o)return!1;var r=this.groupColumns.indexOf(t);if(-1!==r){if(null!=(null===(n=e.groupData)||void 0===n?void 0:n[t.getId()]))return!0;
18if(this.gridOptionsService.isRowModelType("serverSide")&&e.group)return!0;if(e.footer&&-1===e.level){var s=t.getColDef(),a=null==s||!0===s.showRowGroup;return a||s.showRowGroup===this.columnModel.getRowGroupColumns()[0].getId()}}var l=this.gridOptionsService.isGroupUseEntireRow(this.columnModel.isPivotMode());return 0===i&&l},e.prototype.getHeaderName=function(e,t){return e?e({column:t,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context}):this.columnModel.getDisplayNameForColumn(t,"csv",!0)},e.prototype.createValueForGroupNode=function(e){if(this.processRowGroupCallback)return this.processRowGroupCallback({node:e,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context});var t=e.footer,i=[e.key];if(!this.gridOptionsService.isGroupMultiAutoColumn())while(e.parent)e=e.parent,i.push(e.key);var n=i.reverse().join(" -> ");return t?"Total ".concat(n):n},e.prototype.processCell=function(e){var t,i=this,n=e.accumulatedRowIndex,o=e.rowNode,r=e.column,s=e.value,a=e.processCellCallback,l=e.type;return a?{value:null!==(t=a({accumulatedRowIndex:n,column:r,node:o,value:s,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context,type:l,parseValue:function(e){return i.valueParserService.parseValue(r,o,e,i.valueService.getValue(r,o))},formatValue:function(e){var t;return null!==(t=i.valueFormatterService.formatValue(r,o,e))&&void 0!==t?t:e}}))&&void 0!==t?t:""}:!1!==r.getColDef().useValueFormatterForExport?{value:null!==s&&void 0!==s?s:"",valueFormatted:this.valueFormatterService.formatValue(r,o,s)}:{value:null!==s&&void 0!==s?s:""}},e}(),pb=function(){function e(){}return e.download=function(e,t){var i=document.defaultView||window;if(i){var n=document.createElement("a"),o=i.URL.createObjectURL(t);n.setAttribute("href",o),n.setAttribute("download",e),n.style.display="none",document.body.appendChild(n),n.dispatchEvent(new MouseEvent("click",{bubbles:!1,cancelable:!0,view:i})),document.body.removeChild(n),i.setTimeout((function(){i.URL.revokeObjectURL(o)}),0)}else console.warn("AG Grid: There is no `window` associated with the current `document`")},e}(),hb=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),fb="\r\n",gb=function(e){function t(t){var i=e.call(this,t)||this;i.isFirstLine=!0,i.result="";var n=t.suppressQuotes,o=t.columnSeparator;return i.suppressQuotes=n,i.columnSeparator=o,i}return hb(t,e),t.prototype.addCustomContent=function(e){var t=this;e&&("string"===typeof e?(/^\s*\n/.test(e)||this.beginNewLine(),e=e.replace(/\r?\n/g,fb),this.result+=e):e.forEach((function(e){t.beginNewLine(),e.forEach((function(e,i){0!==i&&(t.result+=t.columnSeparator),t.result+=t.putInQuotes(e.data.value||""),e.mergeAcross&&t.appendEmptyCells(e.mergeAcross)}))})))},t.prototype.onNewHeaderGroupingRow=function(){return this.beginNewLine(),{onColumn:this.onNewHeaderGroupingRowColumn.bind(this)}},t.prototype.onNewHeaderGroupingRowColumn=function(e,t,i,n){0!=i&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(t),this.appendEmptyCells(n)},t.prototype.appendEmptyCells=function(e){for(var t=1;t<=e;t++)this.result+=this.columnSeparator+this.putInQuotes("")},t.prototype.onNewHeaderRow=function(){return this.beginNewLine(),{onColumn:this.onNewHeaderRowColumn.bind(this)}},t.prototype.onNewHeaderRowColumn=function(e,t){0!=t&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(this.extractHeaderValue(e))},t.prototype.onNewBodyRow=function(){return this.beginNewLine(),{onColumn:this.onNewBodyRowColumn.bind(this)}},t.prototype.onNewBodyRowColumn=function(e,t,i){var n;0!=t&&(this.result+=this.columnSeparator);var o=this.extractRowCellValue(e,t,t,"csv",i);this.result+=this.putInQuotes(null!==(n=o.valueFormatted)&&void 0!==n?n:o.value)},t.prototype.putInQuotes=function(e){if(this.suppressQuotes)return e;if(null===e||void 0===e)return'""';var t;"string"===typeof e?t=e:"function"===typeof e.toString?t=e.toString():(console.warn("AG Grid: unknown value type during csv conversion"),t="");var i=t.replace(/"/g,'""');return'"'+i+'"'},t.prototype.parse=function(){return this.result},t.prototype.beginNewLine=function(){this.isFirstLine||(this.result+=fb),this.isFirstLine=!1},t}(db),vb=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),yb=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},mb=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return vb(t,e),t.prototype.postConstruct=function(){this.setBeans({gridSerializer:this.gridSerializer,gridOptionsService:this.gridOptionsService})},t.prototype.getMergedParams=function(e){var t=this.gridOptionsService.get("defaultCsvExportParams");return Object.assign({},t,e)}
18,t.prototype.export=function(e){if(this.isExportSuppressed())return console.warn("AG Grid: Export cancelled. Export is not allowed as per your configuration."),"";var t=this.getMergedParams(e),i=this.getData(t),n=new Blob(["\ufeff",i],{type:"text/plain"});return pb.download(this.getFileName(t.fileName),n),i},t.prototype.exportDataAsCsv=function(e){return this.export(e)},t.prototype.getDataAsCsv=function(e,t){void 0===t&&(t=!1);var i=t?Object.assign({},e):this.getMergedParams(e);return this.getData(i)},t.prototype.getDefaultFileExtension=function(){return"csv"},t.prototype.createSerializingSession=function(e){var t=this,i=t.columnModel,n=t.valueService,o=t.gridOptionsService,r=t.valueFormatterService,s=t.valueParserService,a=e,l=a.processCellCallback,c=a.processHeaderCallback,u=a.processGroupHeaderCallback,d=a.processRowGroupCallback,p=a.suppressQuotes,h=a.columnSeparator;return new gb({columnModel:i,valueService:n,gridOptionsService:o,valueFormatterService:r,valueParserService:s,processCellCallback:l||void 0,processHeaderCallback:c||void 0,processGroupHeaderCallback:u||void 0,processRowGroupCallback:d||void 0,suppressQuotes:p||!1,columnSeparator:h||","})},t.prototype.isExportSuppressed=function(){return this.gridOptionsService.get("suppressCsvExport")},yb([de("columnModel")],t.prototype,"columnModel",void 0),yb([de("valueService")],t.prototype,"valueService",void 0),yb([de("gridSerializer")],t.prototype,"gridSerializer",void 0),yb([de("gridOptionsService")],t.prototype,"gridOptionsService",void 0),yb([de("valueFormatterService")],t.prototype,"valueFormatterService",void 0),yb([de("valueParserService")],t.prototype,"valueParserService",void 0),yb([le],t.prototype,"postConstruct",null),t=yb([ue("csvCreator")],t),t}(ub),Cb=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),bb=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};(function(e){e[e["HEADER_GROUPING"]=0]="HEADER_GROUPING",e[e["HEADER"]=1]="HEADER",e[e["BODY"]=2]="BODY"})(AC||(AC={}));var wb=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Cb(t,e),t.prototype.serialize=function(e,t){void 0===t&&(t={});var i=t.allColumns,n=t.columnKeys,o=t.skipRowGroups,r=this.getColumnsToExport(i,o,n),s=Ko.compose(this.prepareSession(r),this.prependContent(t),this.exportColumnGroups(t,r),this.exportHeaders(t,r),this.processPinnedTopRows(t,r),this.processRows(t,r),this.processPinnedBottomRows(t,r),this.appendContent(t));return s(e).parse()},t.prototype.processRow=function(e,t,i,n){var o=t.shouldRowBeSkipped||function(){return!1},r=this.gridOptionsService.context,s=this.gridOptionsService.api,a=this.gridOptionsService.columnApi,l=this.gridOptionsService.get("groupRemoveSingleChildren"),c=this.gridOptionsService.get("groupRemoveLowestSingleChildren"),u=null!=t.rowPositions,d=u||!!t.onlySelected,p=this.gridOptionsService.get("groupHideOpenParents")&&!d,h=this.columnModel.isPivotMode()?n.leafGroup:!n.group,f=!!n.footer;t.skipRowGroups;var g=c&&n.leafGroup,v=1===n.allChildrenCount&&(l||g);if(!(!h&&!f&&(t.skipRowGroups||v||p)||t.onlySelected&&!n.isSelected()||t.skipPinnedTop&&"top"===n.rowPinned||t.skipPinnedBottom&&"bottom"===n.rowPinned)){var y=-1===n.level;if(!y||h||f){var m=o({node:n,api:s,columnApi:a,context:r});if(!m){var C=e.onNewBodyRow(n);if(i.forEach((function(e,t){C.onColumn(e,t,n)})),t.getCustomContentBelowRow){var b=t.getCustomContentBelowRow({node:n,api:s,columnApi:a,context:r});b&&e.addCustomContent(b)}}}}},t.prototype.appendContent=function(e){return function(t){var i=e.appendContent;return i&&t.addCustomContent(i),t}},t.prototype.prependContent=function(e){return function(t){var i=e.prependContent;return i&&t.addCustomContent(i),t}},t.prototype.prepareSession=function(e){return function(t){return t.prepare(e),t}}
18,t.prototype.exportColumnGroups=function(e,t){var i=this;return function(n){if(!e.skipColumnGroupHeaders){var o=new ft,r=i.displayedGroupCreator.createDisplayedGroups(t,o,null);i.recursivelyAddHeaderGroups(r,n,e.processGroupHeaderCallback)}return n}},t.prototype.exportHeaders=function(e,t){return function(i){if(!e.skipColumnHeaders){var n=i.onNewHeaderRow();t.forEach((function(e,t){n.onColumn(e,t,void 0)}))}return i}},t.prototype.processPinnedTopRows=function(e,t){var i=this;return function(n){var o=i.processRow.bind(i,n,e,t);return e.rowPositions?e.rowPositions.filter((function(e){return"top"===e.rowPinned})).sort((function(e,t){return e.rowIndex-t.rowIndex})).map((function(e){return i.pinnedRowModel.getPinnedTopRow(e.rowIndex)})).forEach(o):i.pinnedRowModel.forEachPinnedTopRow(o),n}},t.prototype.processRows=function(e,t){var i=this;return function(n){var o=i.rowModel,r=o.getType(),s="clientSide"===r,a="serverSide"===r,l=!s&&e.onlySelected,c=i.processRow.bind(i,n,e,t),u=e.exportedRows,d=void 0===u?"filteredAndSorted":u;if(e.rowPositions)e.rowPositions.filter((function(e){return null==e.rowPinned})).sort((function(e,t){return e.rowIndex-t.rowIndex})).map((function(e){return o.getRow(e.rowIndex)})).forEach(c);else if(i.columnModel.isPivotMode())s?o.forEachPivotNode(c,!0):a?o.forEachNodeAfterFilterAndSort(c,!0):o.forEachNode(c);else if(e.onlySelectedAllPages||l){var p=i.selectionService.getSelectedNodes();i.replicateSortedOrder(p),p.forEach(c)}else"all"===d?o.forEachNode(c):s||a?o.forEachNodeAfterFilterAndSort(c,!0):o.forEachNode(c);return n}},t.prototype.replicateSortedOrder=function(e){var t=this,i=this.sortController.getSortOptions(),n=function(e,o){var r,s,a,l;return null!=e.rowIndex&&null!=o.rowIndex?e.rowIndex-o.rowIndex:e.level===o.level?(null===(r=e.parent)||void 0===r?void 0:r.id)===(null===(s=o.parent)||void 0===s?void 0:s.id)?t.rowNodeSorter.compareRowNodes(i,{rowNode:e,currentPos:null!==(a=e.rowIndex)&&void 0!==a?a:-1},{rowNode:o,currentPos:null!==(l=o.rowIndex)&&void 0!==l?l:-1}):n(e.parent,o.parent):e.level>o.level?n(e.parent,o):n(e,o.parent)};e.sort(n)},t.prototype.processPinnedBottomRows=function(e,t){var i=this;return function(n){var o=i.processRow.bind(i,n,e,t);return e.rowPositions?e.rowPositions.filter((function(e){return"bottom"===e.rowPinned})).sort((function(e,t){return e.rowIndex-t.rowIndex})).map((function(e){return i.pinnedRowModel.getPinnedBottomRow(e.rowIndex)})).forEach(o):i.pinnedRowModel.forEachPinnedBottomRow(o),n}},t.prototype.getColumnsToExport=function(e,t,i){void 0===e&&(e=!1),void 0===t&&(t=!1);var n=this.columnModel.isPivotMode();if(i&&i.length)return this.columnModel.getGridColumns(i);var o=this.gridOptionsService.get("treeData"),r=[];if(e&&!n){var s=o?this.columnModel.getGridColumns([yt]):[];r=s.concat(this.columnModel.getAllGridColumns())}else r=this.columnModel.getAllDisplayedColumns();return t&&!o&&(r=r.filter((function(e){return e.getColId()!==yt}))),r},t.prototype.recursivelyAddHeaderGroups=function(e,t,i){var n=[];e.forEach((function(e){var t=e;
18t.getChildren&&t.getChildren().forEach((function(e){return n.push(e)}))})),e.length>0&&e[0]instanceof pt&&this.doAddHeaderHeader(t,e,i),n&&n.length>0&&this.recursivelyAddHeaderGroups(n,t,i)},t.prototype.doAddHeaderHeader=function(e,t,i){var n=this,o=e.onNewHeaderGroupingRow(),r=0;t.forEach((function(e){var t,s=e;t=i?i({columnGroup:s,api:n.gridOptionsService.api,columnApi:n.gridOptionsService.columnApi,context:n.gridOptionsService.context}):n.columnModel.getDisplayNameForColumnGroup(s,"header");var a=s.getLeafColumns().reduce((function(e,t,i,n){var o=Ko.last(e),r="open"===t.getColumnGroupShow();return r?o&&null==o[1]||(o=[i],e.push(o)):o&&null==o[1]&&(o[1]=i-1),i===n.length-1&&o&&null==o[1]&&(o[1]=i),e}),[]);o.onColumn(s,t||"",r++,s.getLeafColumns().length-1,a)}))},bb([de("displayedGroupCreator")],t.prototype,"displayedGroupCreator",void 0),bb([de("columnModel")],t.prototype,"columnModel",void 0),bb([de("rowModel")],t.prototype,"rowModel",void 0),bb([de("pinnedRowModel")],t.prototype,"pinnedRowModel",void 0),bb([de("selectionService")],t.prototype,"selectionService",void 0),bb([de("rowNodeSorter")],t.prototype,"rowNodeSorter",void 0),bb([de("sortController")],t.prototype,"sortController",void 0),t=bb([ue("gridSerializer")],t),t}(st),Sb="31.0.0",Eb={version:Sb,moduleName:J.CsvExportModule,beans:[mb,wb]},xb="\r\n",Ob=function(){function e(){}return e.createHeader=function(e){void 0===e&&(e={});var t="<?",i="?>",n=["version"];e.version||(e.version="1.0"),e.encoding&&n.push("encoding"),e.standalone&&n.push("standalone");var o=n.map((function(t){return"".concat(t,'="').concat(e[t],'"')})).join(" ");return"".concat(t,"xml ").concat(o," ").concat(i)},e.createXml=function(e,t){var i=this,n="";e.properties&&(e.properties.prefixedAttributes&&e.properties.prefixedAttributes.forEach((function(e){Object.keys(e.map).forEach((function(o){n+=i.returnAttributeIfPopulated(e.prefix+o,e.map[o],t)}))})),e.properties.rawMap&&Object.keys(e.properties.rawMap).forEach((function(o){n+=i.returnAttributeIfPopulated(o,e.properties.rawMap[o],t)})));var o="<"+e.name+n;return e.children||null!=e.textNode?null!=e.textNode?o+">"+e.textNode+"</"+e.name+">"+xb:(o+=">"+xb,e.children&&e.children.forEach((function(e){o+=i.createXml(e,t)})),o+"</"+e.name+">"+xb):o+"/>"+xb},e.returnAttributeIfPopulated=function(e,t,i){if(!t&&""!==t&&0!==t)return"";var n=t;return"boolean"===typeof t&&i&&(n=i(t))," ".concat(e,'="').concat(n,'"')},e}(),Tb=function(e){var t="function"===typeof Symbol&&Symbol.iterator,i=t&&e[t],n=0;if(i)return i.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Db=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]),Rb=function(){function e(){}return e.addFolders=function(e){e.forEach(this.addFolder.bind(this))},e.addFolder=function(e){this.folders.push({path:e,created:new Date,isBase64:!1})},e.addFile=function(e,t,i){void 0===i&&(i=!1),this.files.push({path:e,created:new Date,content:t,isBase64:i})},e.getContent=function(e){void 0===e&&(e="application/zip");var t=this.buildFileStream(),i=this.buildUint8Array(t);return this.clearStream(),new Blob([i],{type:e})},e.clearStream=function(){this.folders=[],this.files=[]},e.buildFileStream=function(e){var t,i;void 0===e&&(e="");var n=this.folders.concat(this.files),o=n.length,r="",s=0,a=0;try{for(var l=Tb(n),c=l.next();!c.done;c=l.next()){var u=c.value,d=this.getHeader(u,s),p=d.fileHeader,h=d.folderHeader,f=d.content;s+=p.length+f.length,a+=h.length,e+=p+f,r+=h}}
18catch(v){t={error:v}}finally{try{c&&!c.done&&(i=l.return)&&i.call(l)}finally{if(t)throw t.error}}var g=this.buildFolderEnd(o,a,s);return e+r+g},e.getHeader=function(e,t){var i=e.content,n=e.path,o=e.created,r=e.isBase64,s=Ko.utf8_encode,a=Ko.decToHex,l=s(n),c=l!==n,u=this.convertTime(o),d=this.convertDate(o),p="";if(c){var h=a(1,1)+a(this.getFromCrc32Table(l),4)+l;p="up"+a(h.length,2)+h}var f=i?this.getConvertedContent(i,r):{size:0,content:""},g=f.size,v=f.content,y="\n\0"+(c?"\0\b":"\0\0")+"\0\0"+a(u,2)+a(d,2)+a(g?this.getFromCrc32Table(v):0,4)+a(g,4)+a(g,4)+a(l.length,2)+a(p.length,2),m="PK��"+y+l+p,C="PK���\0"+y+"\0\0\0\0\0\0"+(i?"\0\0\0\0":"�\0\0\0")+a(t,4)+l+p;return{fileHeader:m,folderHeader:C,content:v||""}},e.getConvertedContent=function(e,t){return void 0===t&&(t=!1),t&&(e=e.split(";base64,")[1]),e=t?atob(e):e,{size:e.length,content:e}},e.buildFolderEnd=function(e,t,i){var n=Ko.decToHex;return"PK��\0\0\0\0"+n(e,2)+n(e,2)+n(t,4)+n(i,4)+"\0\0"},e.buildUint8Array=function(e){for(var t=new Uint8Array(e.length),i=0;i<t.length;i++)t[i]=e.charCodeAt(i);return t},e.getFromCrc32Table=function(e){if(!e.length)return 0;for(var t=e.length,i=new Uint8Array(t),n=0;n<t;n++)i[n]=e.charCodeAt(n);var o=-1,r=0,s=0,a=0;for(n=0;n<t;n++)r=i[n],s=255&(o^r),a=Db[s],o=o>>>8^a;return-1^o},e.convertTime=function(e){var t=e.getHours();return t<<=6,t|=e.getMinutes(),t<<=5,t|=e.getSeconds()/2,t},e.convertDate=function(e){var t=e.getFullYear()-1980;return t<<=4,t|=e.getMonth()+1,t<<=5,t|=e.getDate(),t},e.folders=[],e.files=[],e}(),Ab=[ZC,cb,Eb];ne.registerModules(Ab)},9481:function(e,t,i){i(2106);var n=i(5821),o=function(){function e(){this.ieCompatibility=!1}return e.prototype.init=function(){this.ieCompatibility="5d41402abc4b2a76b9719d911017c592"!=this.md5("hello")},e.prototype.md5cycle=function(e,t){var i=e[0],n=e[1],o=e[2],r=e[3];i=this.ff(i,n,o,r,t[0],7,-680876936),r=this.ff(r,i,n,o,t[1],12,-389564586),o=this.ff(o,r,i,n,t[2],17,606105819),n=this.ff(n,o,r,i,t[3],22,-1044525330),i=this.ff(i,n,o,r,t[4],7,-176418897),r=this.ff(r,i,n,o,t[5],12,1200080426),o=this.ff(o,r,i,n,t[6],17,-1473231341),n=this.ff(n,o,r,i,t[7],22,-45705983),i=this.ff(i,n,o,r,t[8],7,1770035416),r=this.ff(r,i,n,o,t[9],12,-1958414417),o=this.ff(o,r,i,n,t[10],17,-42063),n=this.ff(n,o,r,i,t[11],22,-1990404162),i=this.ff(i,n,o,r,t[12],7,1804603682),r=this.ff(r,i,n,o,t[13],12,-40341101),o=this.ff(o,r,i,n,t[14],17,-1502002290),n=this.ff(n,o,r,i,t[15],22,1236535329),i=this.gg(i,n,o,r,t[1],5,-165796510),r=this.gg(r,i,n,o,t[6],9,-1069501632),o=this.gg(o,r,i,n,t[11],14,643717713),n=this.gg(n,o,r,i,t[0],20,-373897302),i=this.gg(i,n,o,r,t[5],5,-701558691),r=this.gg(r,i,n,o,t[10],9,38016083),o=this.gg(o,r,i,n,t[15],14,-660478335),n=this.gg(n,o,r,i,t[4],20,-405537848),i=this.gg(i,n,o,r,t[9],5,568446438),r=this.gg(r,i,n,o,t[14],9,-1019803690),o=this.gg(o,r,i,n,t[3],14,-187363961),n=this.gg(n,o,r,i,t[8],20,1163531501),i=this.gg(i,n,o,r,t[13],5,-1444681467),r
18=this.gg(r,i,n,o,t[2],9,-51403784),o=this.gg(o,r,i,n,t[7],14,1735328473),n=this.gg(n,o,r,i,t[12],20,-1926607734),i=this.hh(i,n,o,r,t[5],4,-378558),r=this.hh(r,i,n,o,t[8],11,-2022574463),o=this.hh(o,r,i,n,t[11],16,1839030562),n=this.hh(n,o,r,i,t[14],23,-35309556),i=this.hh(i,n,o,r,t[1],4,-1530992060),r=this.hh(r,i,n,o,t[4],11,1272893353),o=this.hh(o,r,i,n,t[7],16,-155497632),n=this.hh(n,o,r,i,t[10],23,-1094730640),i=this.hh(i,n,o,r,t[13],4,681279174),r=this.hh(r,i,n,o,t[0],11,-358537222),o=this.hh(o,r,i,n,t[3],16,-722521979),n=this.hh(n,o,r,i,t[6],23,76029189),i=this.hh(i,n,o,r,t[9],4,-640364487),r=this.hh(r,i,n,o,t[12],11,-421815835),o=this.hh(o,r,i,n,t[15],16,530742520),n=this.hh(n,o,r,i,t[2],23,-995338651),i=this.ii(i,n,o,r,t[0],6,-198630844),r=this.ii(r,i,n,o,t[7],10,1126891415),o=this.ii(o,r,i,n,t[14],15,-1416354905),n=this.ii(n,o,r,i,t[5],21,-57434055),i=this.ii(i,n,o,r,t[12],6,1700485571),r=this.ii(r,i,n,o,t[3],10,-1894986606),o=this.ii(o,r,i,n,t[10],15,-1051523),n=this.ii(n,o,r,i,t[1],21,-2054922799),i=this.ii(i,n,o,r,t[8],6,1873313359),r=this.ii(r,i,n,o,t[15],10,-30611744),o=this.ii(o,r,i,n,t[6],15,-1560198380),n=this.ii(n,o,r,i,t[13],21,1309151649),i=this.ii(i,n,o,r,t[4],6,-145523070),r=this.ii(r,i,n,o,t[11],10,-1120210379),o=this.ii(o,r,i,n,t[2],15,718787259),n=this.ii(n,o,r,i,t[9],21,-343485551),e[0]=this.add32(i,e[0]),e[1]=this.add32(n,e[1]),e[2]=this.add32(o,e[2]),e[3]=this.add32(r,e[3])},e.prototype.cmn=function(e,t,i,n,o,r){return t=this.add32(this.add32(t,e),this.add32(n,r)),this.add32(t<<o|t>>>32-o,i)},e.prototype.ff=function(e,t,i,n,o,r,s){return this.cmn(t&i|~t&n,e,t,o,r,s)},e.prototype.gg=function(e,t,i,n,o,r,s){return this.cmn(t&n|i&~n,e,t,o,r,s)},e.prototype.hh=function(e,t,i,n,o,r,s){return this.cmn(t^i^n,e,t,o,r,s)},e.prototype.ii=function(e,t,i,n,o,r,s){return this.cmn(i^(t|~n),e,t,o,r,s)},e.prototype.md51=function(e){var t,i=e.length,n=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=e.length;t+=64)this.md5cycle(n,this.md5blk(e.substring(t-64,t)));e=e.substring(t-64);var o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<e.length;t++)o[t>>2]|=e.charCodeAt(t)<<(t%4<<3);if(o[t>>2]|=128<<(t%4<<3),t>55)for(this.md5cycle(n,o),t=0;t<16;t++)o[t]=0;return o[14]=8*i,this.md5cycle(n,o),n},e.prototype.md5blk=function(e){for(var t=[],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},e.prototype.rhex=function(e){for(var t="0123456789abcdef".split(""),i="",n=0;n<4;n++)i+=t[e>>8*n+4&15]+t[e>>8*n&15];return i},e.prototype.hex=function(e){for(var t=0;t<e.length;t++)e[t]=this.rhex(e[t]);return e.join("")},e.prototype.md5=function(e){return this.hex(this.md51(e))},e.prototype.add32=function(e,t){return this.ieCompatibility?this.add32Compat(e,t):this.add32Std(e,t)},e.prototype.add32Std=function(e,t){return e+t&4294967295},e.prototype.add32Compat=function(e,t){var i=(65535&e)+(65535&t),n=(e>>16)+(t>>16)+(i>>16);return n<<16|65535&i},e}(),r=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s};function s(e){return null==e||0===e.length}function a(e,t){return void 0===t&&(t=!1),null!=e&&(""!==e||t)}var l={"01":"GRID","02":"CHARTS","0102":"BOTH"},c=function(){function e(e){this.watermarkMessage=void 0,this.document=e,this.md5=new o,this.md5.init()}return e.prototype.validateLicense=function(){var t=this.getLicenseDetails(e.licenseKey);if(t.missing)this.isWebsiteUrl()&&!this.isForceWatermark()||this.outputMissingLicenseKey();else if(t.valid){if(t.isTrial&&t.trialExpired)this.outputExpiredTrialKey(t.expiry);else if(t.expired){var i=e.getGridReleaseDate(),n=e.formatDate(i);this.outputIncompatibleVersion(t.expiry,n)}}else this.outputInvalidLicenseKey(t.incorrectLicenseType,t.licenseType)},e.extractExpiry=function(t){var i=t.substring(t.lastIndexOf("_")+1,t.length);return new Date(parseInt(e.decode(i),10))},e.extractLicenseComponents=function(t){var 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};var n=i.length-32,o=i.substring(n),s=i.substring(0,n),a=r(e.extractBracketedInformation(i),3),l=a[0],c=a[1],u=a[2];return{md5:o,license:s,version:l,isTrial:c,type:u}},e.prototype.getLicenseDetails=function(t){if(s(t))return{licenseKey:t,valid:!1,missing:!0};var i=e.getGridReleaseDate(),n=e.extractLicenseComponents(t),o=n.md5,r=n.license,a=n.version,c=n.isTrial,u=n.type,d=o===this.md5.md5(r)&&-1===t.indexOf("For_Trialing_ag-Grid_Only"),p=void 0,h=void 0,f=null,g=void 0,v=void 0;function y(){var e=new Date;p=f<e,h=void 0}
18if(d&&(f=e.extractExpiry(r),d=!isNaN(f.getTime()),d))switch(h=i>f,a){case"legacy":case"2":c&&y();break;case"3":s(u)?d=!1:u!==l["01"]&&u!==l["0102"]?(d=!1,g=!0,v=u):c&&y()}return d?{licenseKey:t,valid:d,expiry:e.formatDate(f),expired:h,version:a,isTrial:c,trialExpired:p}:{licenseKey:t,valid:d,incorrectLicenseType:g,licenseType:v}},e.prototype.isDisplayWatermark=function(){return this.isForceWatermark()||!this.isLocalhost()&&!this.isWebsiteUrl()&&!s(this.watermarkMessage)},e.prototype.getWatermarkMessage=function(){return this.watermarkMessage||""},e.prototype.getHostname=function(){var e=this.document.defaultView||window,t=e.location,i=t.hostname,n=void 0===i?"":i;return n},e.prototype.isForceWatermark=function(){var e=this.document.defaultView||window,t=e.location,i=t.pathname;return!!i&&-1!==i.indexOf("forceWatermark")},e.prototype.isWebsiteUrl=function(){var e=this.getHostname();return null!==e.match(/^((?:\w+\.)?ag-grid\.com)$/)},e.prototype.isLocalhost=function(){var e=this.getHostname();return null!==e.match(/^(?:127\.0\.0\.1|localhost)$/)},e.formatDate=function(e){var t=["January","February","March","April","May","June","July","August","September","October","November","December"],i=e.getDate(),n=e.getMonth(),o=e.getFullYear();return i+" "+t[n]+" "+o},e.getGridReleaseDate=function(){return new Date(parseInt(e.decode(e.RELEASE_INFORMATION),10))},e.decode=function(t){var i,n,o,r,s,a,l,c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",u="",d=0,p=t.replace(/[^A-Za-z0-9+/=]/g,"");while(d<p.length)r=c.indexOf(p.charAt(d++)),s=c.indexOf(p.charAt(d++)),a=c.indexOf(p.charAt(d++)),l=c.indexOf(p.charAt(d++)),i=r<<2|s>>4,n=(15&s)<<4|a>>2,o=(3&a)<<6|l,u+=String.fromCharCode(i),64!=a&&(u+=String.fromCharCode(n)),64!=l&&(u+=String.fromCharCode(o));return u=e.utf8_decode(u),u},e.utf8_decode=function(e){e=e.replace(/rn/g,"n");for(var t="",i=0;i<e.length;i++){var n=e.charCodeAt(i);n<128?t+=String.fromCharCode(n):n>127&&n<2048?(t+=String.fromCharCode(n>>6|192),t+=String.fromCharCode(63&n|128)):(t+=String.fromCharCode(n>>12|224),t+=String.fromCharCode(n>>6&63|128),t+=String.fromCharCode(63&n|128))}return t},e.setLicenseKey=function(e){this.licenseKey=e},e.extractBracketedInformation=function(e){if(!e.includes("["))return["legacy",!1,void 0];var t=e.match(/\[(.*?)\]/g).map((function(e){return e.replace("[","").replace("]","")}));if(!t||0===t.length)return["legacy",!1,void 0];var i=1===t.filter((function(e){return"TRIAL"===e})).length,n=t.filter((function(e){return 0===e.indexOf("v")}))[0],o=n?n.replace("v",""):"legacy",r=l[t.filter((function(e){return l[e]}))[0]];return[o,i,r]},e.prototype.outputInvalidLicenseKey=function(e,t){console.error("*****************************************************************************************************************"),console.error("***************************************** AG Grid Enterprise License ********************************************"),console.error("********************************************* Invalid License ***************************************************"),a(e)&&e&&"CHARTS"===t&&console.error("* The license supplied is for AG Charts Enterprise Only and does not cover AG Grid Enterprise                   *"),console.error("* Your license for AG Grid Enterprise is not valid - please contact [email protected] to obtain a valid license. *"),console.error("*****************************************************************************************************************"),console.error("*****************************************************************************************************************"),this.watermarkMessage="Invalid License"},e.prototype.outputExpiredTrialKey=function(e){console.error("****************************************************************************************************************"),console.error("***************************************** AG Grid Enterprise License *******************************************"),console.error("*****************************************   Trial Period Expired.    *******************************************"),console.error("* Your license for AG Grid Enterprise expired on ".concat(e,".                                                *")),console.error("* Please email [email protected] to purchase a license.                                                         *"),console.error("****************************************************************************************************************"),console.error("****************************************************************************************************************"),this.watermarkMessage="Trial Period Expired"},e.prototype.outputMissingLicenseKey=function(){console.error("****************************************************************************************************************"),console.error("***************************************** AG Grid Enterprise License *******************************************"),console.error("****************************************** License Key Not Found ***********************************************"),console.error("* All AG Grid Enterprise features are unlocked.                                                                *"),console.error("* This is an evaluation only version, it is not licensed for development projects intended for production.     *"),console.error("* If you want to hide the watermark, please email [email protected] for a trial license.                        *"),console.error("****************************************************************************************************************"),console.error("****************************************************************************************************************"),this.watermarkMessage="For Trial Use Only"},e.prototype.outputIncompatibleVersion=function(e,t){console.error("****************************************************************************************************************************"),console.error("****************************************************************************************************************************"),console.error("*                                             AG Grid Enterprise License                                                   *"),console.error("*                           License not compatible with installed version of AG Grid Enterprise.                           *"),console.error("*                                                                                                                          *"),console.error("* Your AG Grid License entitles you to all versions of AG Grid that we release within the time covered by your license     *"),console.error("* - typically we provide one year licenses which entitles you to all releases / updates of AG Grid within that year.       *"),console.error("* Your license has an end (expiry) date which stops the license key working with versions of AG Grid released after the    *"),console.error("* license end date. The license key that you have expires on ".concat(e,", however the version of AG Grid you    *")),console.error("* are trying to use was released on ".concat(t,".                                                               *")),console.error("*                                                                                                                          *"),console.error("* Please contact [email protected] to renew your subscription to new versions and get a new license key to work with this   *"),console.error("* ver
18sion of AG Grid.                                                                                                      *"),console.error("****************************************************************************************************************************"),console.error("****************************************************************************************************************************"),this.watermarkMessage="License Expired"},e.RELEASE_INFORMATION="MTcwMTA3MzA3NTIwOQ==",e}(),u=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),d=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return u(t,e),t.prototype.validateLicense=function(){this.licenseManager=new c(this.gridOptionsService.getDocument()),this.licenseManager.validateLicense()},t.getLicenseDetails=function(e){return new c(null).getLicenseDetails(e)},t.prototype.isDisplayWatermark=function(){return this.licenseManager.isDisplayWatermark()},t.prototype.getWatermarkMessage=function(){return this.licenseManager.getWatermarkMessage()},t.setLicenseKey=function(e){c.setLicenseKey(e)},d([n.$j7],t.prototype,"validateLicense",null),t=d([(0,n.Vu6)("licenseManager")],t),t}(n.AS9),h=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),f=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},g=function(e){function t(){return e.call(this,'<div class="ag-watermark">\n                <div ref="eLicenseTextRef" class="ag-watermark-text"></div>\n            </div>')||this}return h(t,e),t.prototype.postConstruct=function(){var e=this,t=this.shouldDisplayWatermark();this.setDisplayed(t),t&&(this.eLicenseTextRef.innerText=this.licenseManager.getWatermarkMessage(),window.setTimeout((function(){return e.addCssClass("ag-opacity-zero")}),0),window.setTimeout((function(){return e.setDisplayed(!1)}),5e3))},t.prototype.shouldDisplayWatermark=function(){return this.licenseManager.isDisplayWatermark()},f([(0,n.fsG)("licenseManager")],t.prototype,"licenseManager",void 0),f([(0,n.cqo)("eLicenseTextRef")],t.prototype,"eLicenseTextRef",void 0),f([n.NqP],t.prototype,"postConstruct",null),t}(n.wA2),v="31.0.0",y={version:v,moduleName:n.GXE.EnterpriseCoreModule,beans:[p],agStackComponents:[{componentName:"AgWatermark",componentClass:g}]},m=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),C=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},b=function(e){function t(t){var i=e.call(this,'\n            <div class="ag-advanced-filter-header" role="row">\n            </div>')||this;return i.enabled=t,i}return m(t,e),t.prototype.postConstruct=function(){var e=this;this.setupAdvancedFilter(this.enabled),this.addDestroyFunc((function(){return e.destroyBean(e.eAdvancedFilter)})),this.addManagedListener(this.eventService,n.zW2.EVENT_GRID_COLUMNS_CHANGED,(function(){return e.onGridColumnsChanged()})),this.addGuiEventListener("keydown",(function(t){return e.onKeyDown(t)})),this.addGuiEventListener("focusout",(function(t){e.getFocusableElement().contains(t.relatedTarget)||e.focusService.clearAdvancedFilterColumn()}))},t.prototype.getFocusableElement=function(){var e,t;return null!==(t=null===(e=this.eAdvancedFilter)||void 0===e?void 0:e.getGui())&&void 0!==t?t:this.getGui()},t.prototype.setEnabled=function(e){e!==this.enabled&&this.setupAdvancedFilter(e)},t.prototype.refresh=function(){var e;null===(e=this.eAdvancedFilter)||void 0===e||e.refresh()},t.prototype.getHeight=function(){return this.height},t.prototype.setInputDisabled=function(e){var t;null===(t=this.eAdvancedFilter)||void 0===t||t.setInputDisabled(e)},t.prototype.setupAdvancedFilter=function(e){var t=this.getGui();if(e){this.eAdvancedFilter=this.createBean(new le);var i=this.eAdvancedFilter.getGui();this.eAdvancedFilter.addCssClass("ag-advanced-filter-header-cell"),this.height=this.columnModel.getFloatingFiltersHeight();var o="".concat(this.height,"px");t.style.height=o,t.style.minHeight=o,this.setAriaRowIndex(),n._.setAriaRole(i,"gridcell"),n._.setAriaColIndex(i,1),this.setAriaColumnCount(i),t.appendChild(i)}else n._.clearElement(t),this.destroyBean(this.eAdvancedFilter),this.height=0;n._.setDisplayed(t,e),this.enabled=e},t.prototype.setAriaColumnCount=function(e){n._.setAriaColSpan(e,this.columnModel.getAllGridColumns().length)},t.prototype.setAriaRowIndex=function(){n._.setAriaRowIndex(this.getGui(),this.headerNavigationService.getHeaderRowCount())},t.prototype.onGridColumnsChanged=function(){this.eAdvancedFilter&&(this.setAriaColumnCount(this.eAdvancedFilter.getGui()),this.setAriaRowIndex())},t.prototype.onKeyDown=function(e){switch(e.key){case n.VDZ.ENTER:this.hasFocus()&&this.focusService.focusInto(this.getFocusableElement())&&e.preventDefault();break;case n.VDZ.ESCAPE:this.hasFocus()||this.getFocusableElement().focus();break;case n.VDZ.UP:this.navigateUpDown(!0,e);break;case n.VDZ.DOWN:this.navigateUpDown(!1,e);break;case n.VDZ.TAB:if(this.hasFocus())this.navigateLeftRight(e);else{var t=this.focusService.findNextFocusableElement(this.getFocusableElement(),null,e.shiftKey);t?(e.preventDefault(),t.focus()):this.navigateLeftRight(e)}break}},t.prototype.navigateUpDown=function(e,t){this.hasFocus()&&this.focusService.focusNextFromAdvancedFilter(e)&&t.preventDefault()},t.prototype.navigateLeftRight=function(e){(e.shiftKey?this.focusService.focusLastHeader():this.focusService.focusNextFromAdvancedFilter(!1,!0))&&e.preventDefault()},t.prototype.hasFocus=function(){var e=this.gridOptionsService.getDocument();return e.activeElement===this.getFocusableElement()},C([(0,n.fsG)("columnModel")],t.prototype,"columnModel",void 0),C([(0,n.fsG)("focusService")],t.prototype,"focusService",void 0),C([(0,n.fsG)("headerNavigationService")],t.prototype,"headerNavigationService",void 0),C([n.NqP],t.prototype,"postConstruct",null),t}(n.wA2),w=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),S=function(){return S=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},S.apply(this,arguments)},E=function(e){function t(t){var i=e.call(this,S(S({},t),{template:'\n                <div class="ag-picker-field" role="presentation">\n                    <div ref="eLabel"></div>\n                    <div ref="eWrapper" class="ag-wrapper ag-picker-collapsed">\n                        <div ref="eDisplayField" class="ag-picker-field-display"></div>\n                        <ag-input-text-field ref="eInput" class="ag-rich-select-field-input"></ag-input-text-field>\n                        <div ref="eIcon" class="ag-picker-field-icon" aria-hidden="true"></div>\n                    </div>\n                </div>'}))||this;return i.params=t,i}return w(t,e),t.prototype.showPicker=function(){var t=this;setTimeout((function(){return e.prototype.showPicker.call(t)}))},t.prototype.hidePicker=function(){var t=this;setTimeout((function(){return e.prototype.hidePicker.call(t)}))},t.prototype.postConstruct=function(){e.prototype.postConstruct.call(this);var t=this.params,i=t.wrapperClassName,o=t.ariaLabel;n._.setDisplayed(this.eDisplayField,!1),i&&this.eWrapper.classList.add(i),n._.setAriaLabelledBy(this.eWrapper,""),n._.setAriaLabel(this.eWrapper,o)}
18,t.prototype.onEnterKeyDown=function(t){n._.stopPropagationForAgGrid(t),this.isPickerDisplayed?e.prototype.onEnterKeyDown.call(this,t):(t.preventDefault(),this.showPicker())},t}(n.LuV),x=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),O=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},T=function(e){function t(t,i){var n=e.call(this)||this;return n.comp=t,n.virtualList=i,n}return x(t,e),t.prototype.postConstruct=function(){var e=this;this.createManagedBean(new n.x$5(this.comp,this.virtualList,{dragSourceType:n.rvo.AdvancedFilterBuilder,listItemDragStartEvent:t.EVENT_DRAG_STARTED,listItemDragEndEvent:t.EVENT_DRAG_ENDED,eventSource:this,getCurrentDragValue:function(t){return e.getCurrentDragValue(t)},isMoveBlocked:function(){return!1},getNumRows:function(e){return e.getNumItems()},moveItem:function(t,i){return e.moveItem(t,i)}}))},t.prototype.getCurrentDragValue=function(e){return e.item},t.prototype.moveItem=function(e,t){this.comp.moveItem(e,t)},t.EVENT_DRAG_STARTED="advancedFilterBuilderDragStarted",t.EVENT_DRAG_ENDED="advancedFilterBuilderDragEnded",O([n.NqP],t.prototype,"postConstruct",null),t}(n.AS9),D=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),R=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},A=function(e){function t(t,i,n){var o=e.call(this)||this;return o.eGui=t,o.focusWrapper=i,o.eFocusableComp=n,o}return D(t,e),t.prototype.postConstruct=function(){var e=this;this.addManagedListener(this.eGui,"keydown",(function(t){switch(t.key){case n.VDZ.TAB:t.defaultPrevented||n._.stopPropagationForAgGrid(t);break;case n.VDZ.UP:case n.VDZ.DOWN:n._.stopPropagationForAgGrid(t);break;case n.VDZ.ESCAPE:if(n._.isStopPropagationForAgGrid(t))return;var i=e.gridOptionsService.getDocument();e.eGui.contains(i.activeElement)&&(t.preventDefault(),n._.stopPropagationForAgGrid(t),e.focusWrapper.focus());break}})),this.addManagedListener(this.focusWrapper,"keydown",(function(t){switch(t.key){case n.VDZ.ENTER:if(n._.isStopPropagationForAgGrid(t))return;var i=e.gridOptionsService.getDocument();i.activeElement===e.focusWrapper&&(t.preventDefault(),n._.stopPropagationForAgGrid(t),e.eFocusableComp.getFocusableElement().focus());break}})),this.addManagedListener(this.focusWrapper,"focusin",(function(){e.focusWrapper.classList.add("ag-advanced-filter-builder-virtual-list-item-highlight")})),this.addManagedListener(this.focusWrapper,"focusout",(function(t){e.focusWrapper.contains(t.relatedTarget)||e.focusWrapper.classList.remove("ag-advanced-filter-builder-virtual-list-item-highlight")}))},R([n.NqP],t.prototype,"postConstruct",null),t}(n.AS9);function _(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:function(e){var t;return null==e?null:null!==(t=e.displayValue)&&void 0!==t?t:e.key},pickerIcon:"advancedFilterBuilderAdd",maxPickerWidth:"".concat(null!==t&&void 0!==t?t:120,"px"),wrapperClassName:"ag-advanced-filter-builder
18-item-button",ariaLabel:e("advancedFilterBuilderAddButtonTooltip")}}var P=function(){function e(){}return e.EVENT_ADDED="advancedFilterBuilderAdded",e.EVENT_MOVED="advancedFilterBuilderMoved",e.EVENT_REMOVED="advancedFilterBuilderRemoved",e.EVENT_VALUE_CHANGED="advancedFilterBuilderValueChanged",e.EVENT_VALID_CHANGED="advancedFilterBuilderValidChanged",e}(),M=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),k=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},N=function(e){function t(){var t=e.call(this,'\n            <div class="ag-advanced-filter-builder-item-condition" role="presentation"></div>\n        ')||this;return t.validationMessage=null,t}return M(t,e),t.prototype.init=function(e){var t=this,i=e.item,n=e.createPill;this.item=i,this.createPill=n,this.filterModel=i.filterModel,this.setupColumnCondition(this.filterModel),this.validate(),this.addDestroyFunc((function(){return t.destroyBeans([t.eColumnPill,t.eOperatorPill,t.eOperandPill])}))},t.prototype.getDragName=function(){return this.filterModel.colId?this.advancedFilterExpressionService.parseColumnFilterModel(this.filterModel):this.getDefaultColumnDisplayValue()},t.prototype.getAriaLabel=function(){return"".concat(this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderFilterItem")," ").concat(this.getDragName())},t.prototype.getValidationMessage=function(){return this.validationMessage},t.prototype.getFocusableElement=function(){return this.eColumnPill.getFocusableElement()},t.prototype.setupColumnCondition=function(e){var t,i=this,o=this.advancedFilterExpressionService.getColumnDetails(e.colId);this.baseCellDataType=o.baseCellDataType,this.column=o.column,this.numOperands=this.getNumOperands(this.getOperatorKey()),this.eColumnPill=this.createPill({key:this.getColumnKey(),displayValue:null!==(t=this.getColumnDisplayValue())&&void 0!==t?t:this.getDefaultColumnDisplayValue(),cssClass:"ag-advanced-filter-builder-column-pill",isSelect:!0,getEditorParams:function(){return{values:i.advancedFilterExpressionService.getColumnAutocompleteEntries()}},update:function(e){return i.setColumnKey(e)},pickerAriaLabelKey:"ariaLabelAdvancedFilterBuilderColumnSelectField",pickerAriaLabelValue:"Advanced Filter Builder Column Select Field",ariaLabel:this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderColumn")}),this.getGui().appendChild(this.eColumnPill.getGui()),n._.exists(this.getColumnKey())&&(this.createOperatorPill(),this.hasOperand()&&this.createOperandPill())},t.prototype.createOperatorPill=function(){var e,t=this;this.eOperatorPill=this.createPill({key:this.getOperatorKey(),displayValue:null!==(e=this.getOperatorDisplayValue())&&void 0!==e?e:this.getDefaultOptionSelectValue(),cssClass:"ag-advanced-filter-builder-option-pill",isSelect:!0,getEditorParams:function(){return{values:t.getOperatorAutocompleteEntries()}},update:function(e){return t.setOperatorKey(e)},pickerAriaLabelKey:"ariaLabelAdvancedFilterBuilderOptionSelectField",pickerAriaLabelValue:"Advanced Filter Builder Option Select Field",ariaLabel:this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderOption")}),this.eColumnPill.getGui().insertAdjacentElement("afterend",this.eOperatorPill.getGui())},t.prototype.createOperandPill=function(){var e,t=this,i=null!==(e=this.getOperandDisplayValue())&&void 0!==e?e:"";this.eOperandPill=this.createPill({key:i,displayValue:i,baseCellDataType:this.baseCellDataType,cssClass:"ag-advanced-filter-builder
18-value-pill",isSelect:!1,update:function(e){return t.setOperand(e)},ariaLabel:this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderValue")}),this.getGui().appendChild(this.eOperandPill.getGui())},t.prototype.getColumnKey=function(){return this.filterModel.colId},t.prototype.getColumnDisplayValue=function(){return this.advancedFilterExpressionService.getColumnDisplayValue(this.filterModel)},t.prototype.getOperatorKey=function(){return this.filterModel.type},t.prototype.getOperatorDisplayValue=function(){return this.advancedFilterExpressionService.getOperatorDisplayValue(this.filterModel)},t.prototype.getOperandDisplayValue=function(){return this.advancedFilterExpressionService.getOperandDisplayValue(this.filterModel,!0)},t.prototype.hasOperand=function(){return this.numOperands>0},t.prototype.getOperatorAutocompleteEntries=function(){return this.column?this.advancedFilterExpressionService.getOperatorAutocompleteEntries(this.column,this.baseCellDataType):[]},t.prototype.setColumnKey=function(e){this.eOperatorPill||this.createOperatorPill();var t=this.advancedFilterExpressionService.getColumnDetails(e);this.column=t.column;var i=t.baseCellDataType;this.baseCellDataType!==i&&(this.baseCellDataType=i,this.setOperatorKey(void 0),this.eOperatorPill&&(n._.removeFromParent(this.eOperatorPill.getGui()),this.destroyBean(this.eOperatorPill),this.createOperatorPill()),this.validate()),this.filterModel.colId=e,this.filterModel.filterType=this.baseCellDataType},t.prototype.setOperatorKey=function(e){var 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()},t.prototype.setOperand=function(e){var t,i=e;this.column&&(i=null!==(t=this.advancedFilterExpressionService.getOperandModelValue(e,this.baseCellDataType,this.column))&&void 0!==t?t:""),this.filterModel.filter=i,this.validate()},t.prototype.getNumOperands=function(e){var t,i;return null!==(i=null===(t=this.advancedFilterExpressionService.getExpressionOperator(this.baseCellDataType,e))||void 0===t?void 0:t.numOperands)&&void 0!==i?i:0},t.prototype.destroyOperandPill=function(){delete this.filterModel.filter,this.getGui().removeChild(this.eOperandPill.getGui()),this.destroyBean(this.eOperandPill),this.eOperandPill=void 0},t.prototype.validate=function(){var e=null;n._.exists(this.getColumnKey())?n._.exists(this.getOperatorKey())?this.numOperands>0&&!n._.exists(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.dispatchEvent({type:P.EVENT_VALID_CHANGED}))},t.prototype.getDefaultColumnDisplayValue=function(){return this.advancedFilterExpressionService.translate("advancedFilterBuilderSelectColumn")},t.prototype.getDefaultOptionSelectValue=function(){return this.advancedFilterExpressionService.translate("advancedFilterBuilderSelectOption")},k([(0,n.fsG)("advancedFilterExpressionService")],t.prototype,"advancedFilterExpressionService",void 0),k([(0,n.fsG)("valueParserService")],t.prototype,"valueParserService",void 0),t}(n.wA2),L=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),I=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},F=function(e){function t(t){var i=e.call(this,'\n            <div class="ag-advanced-filter-builder
18-pill-wrapper" role="presentation">\n                <div ref="ePill" class="ag-advanced-filter-builder-pill" role="button">\n                    <span ref="eLabel" class="ag-advanced-filter-builder-pill-display"></span>\n                </div>\n            </div>\n        ')||this;return i.params=t,i.value=t.value,i}return L(t,e),t.prototype.postConstruct=function(){var e=this,t=this.params,i=t.cssClass,o=t.ariaLabel;this.ePill.classList.add(i),this.activateTabIndex([this.ePill]),this.eLabel.id="".concat(this.getCompId()),n._.setAriaDescribedBy(this.ePill,this.eLabel.id),n._.setAriaLabel(this.ePill,o),this.renderValue(),this.addManagedListener(this.ePill,"click",(function(t){t.preventDefault(),e.showEditor()})),this.addManagedListener(this.ePill,"keydown",(function(t){switch(t.key){case n.VDZ.ENTER:t.preventDefault(),n._.stopPropagationForAgGrid(t),e.showEditor();break}})),this.addDestroyFunc((function(){return e.destroyBean(e.eEditor)}))},t.prototype.getFocusableElement=function(){return this.ePill},t.prototype.showEditor=function(){var e=this;if(!this.eEditor){n._.setDisplayed(this.ePill,!1),this.eEditor=this.createEditorComp(this.params.type),this.eEditor.setValue(this.value);var t=this.eEditor.getGui();this.eEditor.addManagedListener(t,"keydown",(function(t){switch(t.key){case n.VDZ.ENTER:t.preventDefault(),n._.stopPropagationForAgGrid(t),e.updateValue(!0);break;case n.VDZ.ESCAPE:t.preventDefault(),n._.stopPropagationForAgGrid(t),e.hideEditor(!0);break}})),this.eEditor.addManagedListener(t,"focusout",(function(){e.updateValue(!1)})),this.getGui().appendChild(t),this.eEditor.getFocusableElement().focus()}},t.prototype.createEditorComp=function(e){var t;switch(e){case"text":t=new n.INo;break;case"number":t=new n.QKF;break;case"date":t=new n.KTj;break}return this.createBean(t)},t.prototype.hideEditor=function(e){var t=this.eEditor;t&&(this.eEditor=void 0,this.getGui().removeChild(t.getGui()),this.destroyBean(t),n._.setDisplayed(this.ePill,!0),e&&this.ePill.focus())},t.prototype.renderValue=function(){var e;this.eLabel.classList.remove("ag-advanced-filter-builder-value-empty","ag-advanced-filter-builder-value-number","ag-advanced-filter-builder-value-text"),n._.exists(this.value)?"number"===this.params.type?(e=this.value,this.eLabel.classList.add("ag-advanced-filter-builder-value-number")):(e='"'.concat(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},t.prototype.updateValue=function(e){var t;if(this.eEditor){var i=null!==(t=this.eEditor.getValue())&&void 0!==t?t:"";this.dispatchEvent({type:n.zW2.EVENT_FIELD_VALUE_CHANGED,value:i}),this.value=i,this.renderValue(),this.hideEditor(e)}},I([(0,n.cqo)("ePill")],t.prototype,"ePill",void 0),I([(0,n.cqo)("eLabel")],t.prototype,"eLabel",void 0),I([(0,n.fsG)("advancedFilterExpressionService")],t.prototype,"advancedFilterExpressionService",void 0),I([n.NqP],t.prototype,"postConstruct",null),t}(n.wA2),G=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),V=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},B=function(e){function t(){return e.call(this,'\n            <div class="ag-advanced-filter-builder-item-condition" role="presentation"></div>\n        ')||this}return G(t,e),t.prototype.init=function(e){var t=this,i=e.item,n=e.createPill,o=i.filterModel;this.filterModel=o,this.ePill=n({key:o.type,displayValue:this.advancedFilterExpressionService.parseJoinOperator(o),cssClass:"ag-advanced-filter-builder
18-join-pill",isSelect:!0,getEditorParams:function(){return{values:t.advancedFilterExpressionService.getJoinOperatorAutocompleteEntries()}},update:function(e){return o.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((function(){return t.destroyBean(t.ePill)}))},t.prototype.getDragName=function(){return this.advancedFilterExpressionService.parseJoinOperator(this.filterModel)},t.prototype.getAriaLabel=function(){return"".concat(this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderGroupItem")," ").concat(this.getDragName())},t.prototype.getValidationMessage=function(){return null},t.prototype.getFocusableElement=function(){return this.ePill.getFocusableElement()},V([(0,n.fsG)("advancedFilterExpressionService")],t.prototype,"advancedFilterExpressionService",void 0),t}(n.wA2),j=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),H=function(){return H=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},H.apply(this,arguments)},W=function(e){function t(t){var i=e.call(this,H(H({},t),{template:'\n                <div class="ag-picker-field ag-advanced-filter-builder-pill-wrapper" role="presentation">\n                    <div ref="eLabel"></div>\n                    <div ref="eWrapper" class="ag-wrapper ag-advanced-filter-builder-pill ag-picker-collapsed">\n                        <div ref="eDisplayField" class="ag-picker-field-display ag-advanced-filter-builder-pill-display"></div>\n                        <ag-input-text-field ref="eInput" class="ag-rich-select-field-input"></ag-input-text-field>\n                        <div ref="eIcon" class="ag-picker-field-icon" aria-hidden="true"></div>\n                    </div>\n                </div>'}))||this;return i.params=t,i}return j(t,e),t.prototype.getFocusableElement=function(){return this.eWrapper},t.prototype.showPicker=function(){var t=this;setTimeout((function(){return e.prototype.showPicker.call(t)}))},t.prototype.hidePicker=function(){var t=this;setTimeout((function(){return e.prototype.hidePicker.call(t)}))},t.prototype.postConstruct=function(){e.prototype.postConstruct.call(this);var t=this.params,i=t.wrapperClassName,o=t.ariaLabel;this.eWrapper.classList.add(i),n._.setAriaLabelledBy(this.eWrapper,""),n._.setAriaLabel(this.eWrapper,o)},t.prototype.createPickerComponent=function(){var t;if(!this.values){var i=this.params.getEditorParams().values;this.values=i;var n=this.value.key,o=null!==(t=i.find((function(e){return e.key===n})))&&void 0!==t?t:{key:n,displayValue:this.value.displayValue};this.value=o}return e.prototype.createPickerComponent.call(this)},t.prototype.onEnterKeyDown=function(t){n._.stopPropagationForAgGrid(t),this.isPickerDisplayed?e.prototype.onEnterKeyDown.call(this,t):(t.preventDefault(),this.showPicker())},t}(n.LuV),U=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),z=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},K=function(e){function t(t,i,n){var o=e.call(this,'\n            <div class="ag-advanced-filter-builder
18-item-wrapper" role="presentation">\n                <div ref="eItem" class="ag-advanced-filter-builder-item" role="presentation">\n                    <div ref="eTreeLines" class="ag-advanced-filter-builder-item-tree-lines" aria-hidden="true"></div>\n                    <span ref="eDragHandle" class="ag-drag-handle" aria-hidden="true"></span>\n                    <span ref="eValidation" class="ag-advanced-filter-builder-item-button ag-advanced-filter-builder-invalid" aria-hidden="true"></span>\n                </div>\n                <div ref="eButtons" class="ag-advanced-filter-builder-item-buttons">\n                    <span ref="eMoveUpButton" class="ag-advanced-filter-builder-item-button" role="button"></span>\n                    <span ref="eMoveDownButton" class="ag-advanced-filter-builder-item-button" role="button"></span>\n                    <div ref="eAddButton" role="presentation"></div>\n                    <span ref="eRemoveButton" class="ag-advanced-filter-builder-item-button" role="button"></span>\n                </div>\n            </div>\n        ')||this;return o.item=t,o.dragFeature=i,o.focusWrapper=n,o.moveUpDisabled=!1,o.moveDownDisabled=!1,o}return U(t,e),t.prototype.postConstruct=function(){var e=this,t=this.item,i=t.filterModel,o=t.level,r=t.showMove,s="join"===i.filterType;if(this.ePillWrapper=this.createManagedBean(s?new B:new N),this.ePillWrapper.init({item:this.item,createPill:function(t){return e.createPill(t)}}),this.eDragHandle.insertAdjacentElement("afterend",this.ePillWrapper.getGui()),0===o){var a=document.createElement("div");a.classList.add("ag-advanced-filter-builder-item-tree-line-vertical-bottom"),a.classList.add("ag-advanced-filter-builder-item-tree-line-root"),this.eTreeLines.appendChild(a),n._.setDisplayed(this.eDragHandle,!1),n._.setDisplayed(this.eButtons,!1),n._.setAriaExpanded(this.focusWrapper,!0)}else this.setupTreeLines(o),this.eDragHandle.appendChild(n._.createIconNoSpan("advancedFilterBuilderDrag",this.gridOptionsService)),this.setupValidation(),this.setupMoveButtons(r),this.setupAddButton(),this.setupRemoveButton(),this.setupDragging(),this.updateAriaExpanded();n._.setAriaLevel(this.focusWrapper,o+1),this.initialiseTabGuard({}),this.createManagedBean(new A(this.getGui(),this.focusWrapper,this.ePillWrapper)),this.updateAriaLabel(),this.addManagedListener(this.ePillWrapper,P.EVENT_VALUE_CHANGED,(function(){return e.dispatchEvent({type:P.EVENT_VALUE_CHANGED})})),this.addManagedListener(this.ePillWrapper,P.EVENT_VALID_CHANGED,(function(){return e.updateValidity()}))},t.prototype.setState=function(e){var t=this.item.level;if(0!==t){var i=this.item.showMove,o=e.disableMoveUp,r=e.disableMoveDown,s=e.treeLines,a=e.showStartTreeLine;this.updateTreeLines(s,a),this.updateAriaExpanded(),i&&(this.moveUpDisabled=!!o,this.moveDownDisabled=!!r,this.eMoveUpButton.classList.toggle("ag-advanced-filter-builder-item-button-disabled",o),this.eMoveDownButton.classList.toggle("ag-advanced-filter-builder-item-button-disabled",r),n._.setAriaDisabled(this.eMoveUpButton,!!o),n._.setAriaDisabled(this.eMoveDownButton,!!r),this.moveUpTooltipFeature.refreshToolTip(),this.moveDownTooltipFeature.refreshToolTip())}},t.prototype.focusMoveButton=function(e){(e?this.eMoveUpButton:this.eMoveDownButton).focus()},t.prototype.afterAdd=function(){this.ePillWrapper.getFocusableElement().focus()},t.prototype.setupTreeLines=function(e){for(var t=0;t<e;t++){var i=document.createElement("div");this.eTreeLines.appendChild(i)}},t.prototype.updateTreeLines=function(e,t){for(var i=e.length-1,n=this.eTreeLines.children,o=0;o<i;o++){var r=n.item(o);r&&r.classList.toggle("ag-advanced-filter-builder-item-tree-line-vertical",!e[o])}var s=n.item(i);if(s){s.classList.add("ag-advanced-filter-builder-item-tree-line-horizontal");var a=e[i];s.classList.toggle("ag-advanced-filter-builder-item-tree-line-vertical-top",a),s.classList.toggle("ag-advanced-filter-builder-item-tree-line-vertical",!a)}this.eDragHandle.classList.toggle("ag-advanced-filter-builder-item-tree-line-vertical-bottom",t)},t.prototype.setupValidation=function(){var e=this;this.eValidation.appendChild(n._.createIconNoSpan("advancedFilterBuilderInvalid",this.gridOptionsService)),this.validationTooltipFeature=this.createManagedBean(new n.w4P({getGui:function(){return e.eValidation},getLocation:function(){return"advancedFilter"},getTooltipValue:function(){return e.ePillWrapper.getValidationMessage()},getTooltipShowDelayOverride:function(){return 1e3}}
18,this.beans)),this.validationTooltipFeature.setComp(this.eValidation),this.updateValidity()},t.prototype.setupAddButton=function(){var e,t=this,i=_((function(e){return t.advancedFilterExpressionService.translate(e)}),null===(e=this.gridOptionsService.get("advancedFilterBuilderParams"))||void 0===e?void 0:e.addSelectWidth),o=this.createManagedBean(new E(i));this.addManagedListener(o,n.zW2.EVENT_FIELD_PICKER_VALUE_SELECTED,(function(e){var i=e.value;return t.dispatchEvent({type:P.EVENT_ADDED,item:t.item,isJoin:"join"===i.key})})),this.eAddButton.appendChild(o.getGui());var r=this.createManagedBean(new n.w4P({getGui:function(){return t.eAddButton},getLocation:function(){return"advancedFilter"},getTooltipValue:function(){return t.advancedFilterExpressionService.translate("advancedFilterBuilderAddButtonTooltip")}},this.beans));r.setComp(this.eAddButton)},t.prototype.setupRemoveButton=function(){var e=this;this.eRemoveButton.appendChild(n._.createIconNoSpan("advancedFilterBuilderRemove",this.gridOptionsService)),this.addManagedListener(this.eRemoveButton,"click",(function(){return e.removeItem()})),this.addManagedListener(this.eRemoveButton,"keydown",(function(t){switch(t.key){case n.VDZ.ENTER:t.preventDefault(),n._.stopPropagationForAgGrid(t),e.removeItem();break}}));var t=this.createManagedBean(new n.w4P({getGui:function(){return e.eRemoveButton},getLocation:function(){return"advancedFilter"},getTooltipValue:function(){return e.advancedFilterExpressionService.translate("advancedFilterBuilderRemoveButtonTooltip")}},this.beans));t.setComp(this.eRemoveButton),n._.setAriaLabel(this.eRemoveButton,this.advancedFilterExpressionService.translate("advancedFilterBuilderRemoveButtonTooltip")),this.activateTabIndex([this.eRemoveButton])},t.prototype.setupMoveButtons=function(e){var t=this;e?(this.eMoveUpButton.appendChild(n._.createIconNoSpan("advancedFilterBuilderMoveUp",this.gridOptionsService)),this.addManagedListener(this.eMoveUpButton,"click",(function(){return t.moveItem(!0)})),this.addManagedListener(this.eMoveUpButton,"keydown",(function(e){switch(e.key){case n.VDZ.ENTER:e.preventDefault(),n._.stopPropagationForAgGrid(e),t.moveItem(!0);break}})),this.moveUpTooltipFeature=this.createManagedBean(new n.w4P({getGui:function(){return t.eMoveUpButton},getLocation:function(){return"advancedFilter"},getTooltipValue:function(){return t.moveUpDisabled?null:t.advancedFilterExpressionService.translate("advancedFilterBuilderMoveUpButtonTooltip")}},this.beans)),this.moveUpTooltipFeature.setComp(this.eMoveUpButton),n._.setAriaLabel(this.eMoveUpButton,this.advancedFilterExpressionService.translate("advancedFilterBuilderMoveUpButtonTooltip")),this.eMoveDownButton.appendChild(n._.createIconNoSpan("advancedFilterBuilderMoveDown",this.gridOptionsService)),this.addManagedListener(this.eMoveDownButton,"click",(function(){return t.moveItem(!1)})),this.addManagedListener(this.eMoveDownButton,"keydown",(function(e){switch(e.key){case n.VDZ.ENTER:e.preventDefault(),n._.stopPropagationForAgGrid(e),t.moveItem(!1);break}})),this.moveDownTooltipFeature=this.createManagedBean(new n.w4P({getGui:function(){return t.eMoveDownButton},getLocation:function(){return"advancedFilter"},getTooltipValue:function(){return t.moveDownDisabled?null:t.advancedFilterExpressionService.translate("advancedFilterBuilderMoveDownButtonTooltip")}},this.beans)),this.moveDownTooltipFeature.setComp(this.eMoveDownButton),n._.setAriaLabel(this.eMoveDownButton,this.advancedFilterExpressionService.translate("advancedFilterBuilderMoveDownButtonTooltip")),this.activateTabIndex([this.eMoveUpButton,this.eMoveDownButton])):(n._.setDisplayed(this.eMoveUpButton,!1),n._.setDisplayed(this.eMoveDownButton,!1))},t.prototype.updateValidity=function(){n._.setVisible(this.eValidation,!this.item.valid),this.validationTooltipFeature.refreshToolTip(),this.updateAriaLabel()},t.prototype.createPill=function(e){var t,i,o=this,r=e.key,s=e.displayValue,a=e.cssClass,l=e.update,c=e.ariaLabel,u=function(e){null!=e&&(l(e),o.dispatchEvent({type:P.EVENT_VALUE_CHANGED}))};if(e.isSelect){var d=e.getEditorParams,p=e.pickerAriaLabelKey,h=e.pickerAriaLabelValue,f=this.gridOptionsService.get("advancedFilterBuilderParams"),g="".concat(null!==(t=null===f||void 0===f?void 0:f.pillSelectMinWidth)&&void 0!==t?t:140,"px"),v="".concat(null!==(i=null===f||void 0===f?void 0:f.pillSelectMaxWidth)&&void 0!==i?i:200,"px"),y=this.createBean(new W({pickerAriaLabelKey:p,pickerAriaLabelValue:h,pickerType:"ag-list",value:{key:r,displayValue:s},valueFormatter:function(e){var t;return null==e?null:null!==(t=e.displayValue)&&void 0!==t?t:e.key},variableWidth:!0,minPickerWidth:g,maxPickerWidth:v,getEditorParams:d,wrapperClassName:a,ariaLabel:c}));return this.addManagedListener(y,n.zW2.EVENT_FIELD_PICKER_VALUE_SELECTED,(function(e){var t=e.value;return u(null===t||void 0===t?void 0:t.key)})),y}y=this.createBean(new F({value:s,cssClass:a,type:this.getInputType(e.baseCellDataType),ariaLabel:c}));return this.addManagedListener(y,n.zW2.EVENT_FIELD_VALUE_CHANGED,(function(e){var t=e.value;return u(t)})),y},t.prototype.getInputType=function(e){switch(e){case"text":case"object":case"boolean":return"text";case"number":return"number";case"date":case"dateString":return"date"}},t.prototype.setupDragging=function(){var e=this,t={type:n.rvo.AdvancedFilterBuilder,eElement:this.eDragHandle,dragItemName:function(){return e.ePillWrapper.getDragName()},getDefaultIconName:function(){return n.jUB.ICON_NOT_ALLOWED},getDragItem:function(){return{}},onDragStarted:function(){return e.dragFeature.dispatchEvent({type:T.EVENT_DRAG_STARTED,item:e.item})},onDragStopped:function(){return e.dragFeature.dispatchEvent({type:T.EVENT_DRAG_ENDED})}};this.dragAndDropService.addDragSource(t,!0),this.addDestroyFunc((function(){return e.dragAndDropService.removeDragSource(t)}))},t.prototype.updateAriaLabel=function(){var e,t=this.ePillWrapper.getAriaLabel(),i="".concat(this.item.level
18+1),o=this.ePillWrapper.getValidationMessage();e=o?this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderItemValidation",[t,i,o]):this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderItem",[t,i]),n._.setAriaLabel(this.focusWrapper,e)},t.prototype.updateAriaExpanded=function(){n._.removeAriaExpanded(this.focusWrapper);var e=this.item.filterModel;"join"===(null===e||void 0===e?void 0:e.filterType)&&e.conditions.length&&n._.setAriaExpanded(this.focusWrapper,!0)},t.prototype.removeItem=function(){this.dispatchEvent({type:P.EVENT_REMOVED,item:this.item})},t.prototype.moveItem=function(e){this.dispatchEvent({type:P.EVENT_MOVED,item:this.item,backwards:e})},z([(0,n.cqo)("eTreeLines")],t.prototype,"eTreeLines",void 0),z([(0,n.cqo)("eDragHandle")],t.prototype,"eDragHandle",void 0),z([(0,n.cqo)("eItem")],t.prototype,"eItem",void 0),z([(0,n.cqo)("eButtons")],t.prototype,"eButtons",void 0),z([(0,n.cqo)("eValidation")],t.prototype,"eValidation",void 0),z([(0,n.cqo)("eMoveUpButton")],t.prototype,"eMoveUpButton",void 0),z([(0,n.cqo)("eMoveDownButton")],t.prototype,"eMoveDownButton",void 0),z([(0,n.cqo)("eAddButton")],t.prototype,"eAddButton",void 0),z([(0,n.cqo)("eRemoveButton")],t.prototype,"eRemoveButton",void 0),z([(0,n.fsG)("beans")],t.prototype,"beans",void 0),z([(0,n.fsG)("dragAndDropService")],t.prototype,"dragAndDropService",void 0),z([(0,n.fsG)("advancedFilterExpressionService")],t.prototype,"advancedFilterExpressionService",void 0),z([n.NqP],t.prototype,"postConstruct",null),t}(n.BxR),Y=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),q=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},X=function(e){function t(t,i){var n=e.call(this,'\n            <div class="ag-advanced-filter-builder-item-wrapper" role="presentation">\n                <div ref="eItem" class="ag-advanced-filter-builder-item" role="presentation">\n                    <div class="ag-advanced-filter-builder-item-tree-lines" aria-hidden="true">\n                        <div class="ag-advanced-filter-builder-item-tree-line-vertical-top ag-advanced-filter-builder-item-tree-line-horizontal"></div>\n                    </div>\n                </div>\n            </div>\n        ')||this;return n.item=t,n.focusWrapper=i,n}return Y(t,e),t.prototype.postConstruct=function(){var e,t=this;n._.setAriaLevel(this.focusWrapper,2);var i=_((function(e){return t.advancedFilterExpressionService.translate(e)}),null===(e=this.gridOptionsService.get("advancedFilterBuilderParams"))||void 0===e?void 0:e.addSelectWidth),o=this.createManagedBean(new E(i));this.addManagedListener(o,n.zW2.EVENT_FIELD_PICKER_VALUE_SELECTED,(function(e){var i=e.value;t.dispatchEvent({type:P.EVENT_ADDED,item:t.item,isJoin:"join"===i.key})})),this.eItem.appendChild(o.getGui());var r=this.createManagedBean(new n.w4P({getGui:function(){return o.getGui()},getLocation:function(){return"advancedFilter"},getTooltipValue:function(){return t.advancedFilterExpressionService.translate("advancedFilterBuilderAddButtonTooltip")}},this.beans));r.setComp(o.getGui()),this.createManagedBean(new A(this.getGui(),this.focusWrapper,o)),n._.setAriaLabel(this.focusWrapper,this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderItem",[this.advancedFilterExpressionService.translate("advancedFilterBuilderAddButtonTooltip"),"".concat(this.item.level+1)]))},t.prototype.afterAdd=function(){},q([(0,n.fsG)("beans")],t.prototype,"beans",void 0),q([(0,n.fsG)("advancedFilterExpressionService")],t.prototype,"advancedFilterExpressionService",void 0),q([(0,n.cqo)("eItem")],t.prototype,"eItem",void 0),q([n.NqP],t.prototype,"postConstruct",null),t}(n.wA2),$=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Z=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},J=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},Q=function(e,t,i){if(i||2===arguments.length)for(var n,o=0,r=t.length;o<r;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},ee=function(e){function t(){var t=e.call(this,'\n            <div role="presentation" class="ag-advanced-filter-builder" tabindex="-1">\n                <div role="presentation" class="ag-advanced-filter-builder
18-list" ref="eList"></div>\n                <div role="presentation" class="ag-advanced-filter-builder-button-panel">\n                    <button class="ag-button ag-standard-button ag-advanced-filter-builder-apply-button" ref="eApplyFilterButton"></button>\n                    <button class="ag-button ag-standard-button ag-advanced-filter-builder-cancel-button" ref="eCancelFilterButton"></button>\n                </div>\n            </div>')||this;return t.validationMessage=null,t}return $(t,e),t.prototype.postConstruct=function(){var e,t=this,i=(null!==(e=this.gridOptionsService.get("advancedFilterBuilderParams"))&&void 0!==e?e:{}).showMoveButtons;this.showMove=!!i,this.addManagedPropertyListener("advancedFilterBuilderParams",(function(e){var i=e.currentValue;t.showMove=!!(null===i||void 0===i?void 0:i.showMoveButtons),t.refreshList(!1)})),this.filterModel=this.setupFilterModel(),this.setupVirtualList(),this.dragFeature=this.createManagedBean(new T(this,this.virtualList)),this.setupButtons()},t.prototype.refresh=function(){var e=this.virtualList.getLastFocusedRow();this.setupFilterModel(),this.validateItems(),this.refreshList(!1),null!=e&&(this.virtualList.getComponentAt(e)||(e=0),this.virtualList.focusRow(e))},t.prototype.getNumItems=function(){return this.items.length},t.prototype.moveItem=function(e,t){t&&e&&this.moveItemToIndex(e,t.rowIndex,t.position)},t.prototype.afterGuiAttached=function(){this.virtualList.focusRow(0)},t.prototype.setupVirtualList=function(){var e=this;this.virtualList=this.createManagedBean(new n.CPJ({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:function(){return e.items.length},getRow:function(t){return e.items[t]},areRowsEqual:function(e,t){return e===t}}),this.buildList(),this.virtualList.refresh()},t.prototype.setupButtons=function(){var e=this;this.eApplyFilterButton.innerText=this.advancedFilterExpressionService.translate("advancedFilterBuilderApply"),this.activateTabIndex([this.eApplyFilterButton]),this.addManagedListener(this.eApplyFilterButton,"click",(function(){e.advancedFilterService.setModel(e.filterModel),e.filterManager.onFilterChanged({source:"advancedFilter"}),e.close()})),this.validationTooltipFeature=this.createManagedBean(new n.w4P({getGui:function(){return e.eApplyFilterButton},getLocation:function(){return"advancedFilter"},getTooltipValue:function(){return e.validationMessage},getTooltipShowDelayOverride:function(){return 1e3}},this.beans)),this.validationTooltipFeature.setComp(this.eApplyFilterButton),this.validate(),this.addManagedListener(this.eApplyFilterButton,"mouseenter",(function(){return e.addOrRemoveCssClass("ag-advanced-filter-builder-validation",!0)})),this.addManagedListener(this.eApplyFilterButton,"mouseleave",(function(){return e.addOrRemoveCssClass("ag-advanced-filter-builder-validation",!1)})),this.eCancelFilterButton.innerText=this.advancedFilterExpressionService.translate("advancedFilterBuilderCancel"),this.activateTabIndex([this.eCancelFilterButton]),this.addManagedListener(this.eCancelFilterButton,"click",(function(){return e.close()}))},t.prototype.removeItemFromParent=function(e){var t=e.parent.conditions.indexOf(e.filterModel);return e.parent.conditions.splice(t,1),t},t.prototype.moveItemToIndex=function(e,t,i){var n,o,r=this.items[t],s="join"===(null===(n=r.filterModel)||void 0===n?void 0:n.filterType)&&"bottom"===i,a=s?r.filterModel:r.parent;a&&(this.isChildOrSelf(a,e.filterModel)||r===e||(this.removeItemFromParent(e),s?o=0:(o=a.conditions.indexOf(r.filterModel),-1===o?o=a.conditions.length:"bottom"===i&&(o+=1)),a.conditions.splice(o,0,e.filterModel),this.refreshList(!1)))},t.prototype.isChildOrSelf=function(e,t){var i=this;return e===t||"join"===t.filterType&&t.conditions.some((function(t){return i.isChildOrSelf(e,t)}))},t.prototype.setupFilterModel=function(){var e=this.formatFilterModel(this.advancedFilterService.getModel());return this.stringifiedModel=JSON.stringify(e),e},t.prototype.formatFilterModel=function(e){return e=null!==e&&void 0!==e?e:{filterType:"join",type:"AND",conditions:[]},"join"!==e.filterType&&(e={filterType:"join",type:"AND",conditions:[e]}),e},t.prototype.buildList=function(){var e=this,t=function(i,n,o,r){n.push({f
18ilterModel:i,level:o,parent:r,valid:!0,showMove:e.showMove}),"join"===i.filterType&&(i.conditions.forEach((function(e){return t(e,n,o+1,i)})),0===o&&n.push({filterModel:null,level:o+1,parent:i,valid:!0}))};this.items=[],t(this.filterModel,this.items,0)},t.prototype.refreshList=function(e){if(!e){var t=[];this.items.forEach((function(e){e.valid||t.push(e.filterModel)})),this.buildList(),t.length&&this.items.forEach((function(e){e.filterModel&&t.includes(e.filterModel)&&(e.valid=!1)}))}this.virtualList.refresh(e),this.validate()},t.prototype.updateItemComponent=function(e,t){var i=this,n=this.items.indexOf(e),o=function(e,t){var n=i.items.find((function(t){return t.filterModel===e})),r=null===n||void 0===n?void 0:n.parent;if(r){var s=r.conditions;o(r,t),t.push(s[s.length-1]===e)}},r=[],s=e.filterModel;s&&(o(s,r),r[0]=!1);var a="join"===(null===s||void 0===s?void 0:s.filterType)&&!!s.conditions.length;t.setState({disableMoveUp:1===n,disableMoveDown:!this.canMoveDown(e,n),treeLines:r,showStartTreeLine:a})},t.prototype.createItemComponent=function(e,t){var i=this,n=this.createBean(e.filterModel?new K(e,this.dragFeature,t):new X(e,t));return n.addManagedListener(n,P.EVENT_REMOVED,(function(e){var t=e.item;return i.removeItem(t)})),n.addManagedListener(n,P.EVENT_VALUE_CHANGED,(function(){return i.validate()})),n.addManagedListener(n,P.EVENT_ADDED,(function(e){var t=e.item,n=e.isJoin;return i.addItem(t,n)})),n.addManagedListener(n,P.EVENT_MOVED,(function(e){var t=e.item,n=e.backwards;return i.moveItemUpDown(t,n)})),n instanceof K&&this.updateItemComponent(e,n),n},t.prototype.addItem=function(e,t){var i,n,o=e.parent,r=e.level,s=e.filterModel,a="join"===(null===s||void 0===s?void 0:s.filterType),l=t?{filterType:"join",type:"AND",conditions:[]}:{},c=a?s:o,u=a?0:c.conditions.indexOf(s);u>=0?(a||(u+=1),c.conditions.splice(u,0,l)):c.conditions.push(l);var d=this.items.indexOf(e),p=d>=0;if(p){e.filterModel&&d++;var h=[{filterModel:l,level:a?r+1:r,parent:c,valid:t,showMove:this.showMove}];(i=this.items).splice.apply(i,Q([d,0],J(h),!1))}this.refreshList(p),p&&(null===(n=this.virtualList.getComponentAt(d))||void 0===n||n.afterAdd())},t.prototype.removeItem=function(e){var t,i=e.parent,n=e.filterModel,o=i.conditions.indexOf(n);i.conditions.splice(o,1);var r="join"===(null===(t=e.filterModel)||void 0===t?void 0:t.filterType),s=this.items.indexOf(e),a=!r&&s>=0;a&&this.items.splice(s,1),this.refreshList(a),s>=0&&this.virtualList.focusRow(s)},t.prototype.moveItemUpDown=function(e,t){var i=this.items.indexOf(e),n=t?i-1:i+1;if(0!==n&&(t||this.canMoveDown(e,i))){var o=this.items[n],r=this.removeItemFromParent(e),s=e.level,a=e.filterModel,l=e.parent,c=o.level,u=o.filterModel,d=o.parent;if(t)if(c===s&&"join"===u.filterType)u.conditions.push(a);else if(c<=s){var p=d.conditions.indexOf(u);d.conditions.splice(p,0,a)}else{var h=l.conditions[r-1];h.conditions.push(a)}else if(c===s)if("join"===u.filterType)u.conditions.splice(0,0,a);else{var f=d.conditions.indexOf(u);d.conditions.splice(f+1,0,a)}else if(r<l.conditions.length)l.conditions.splice(r+1,0,a);else{var g=this.items.find((function(e){return e.filterModel===l})),v=g.parent.conditions.indexOf(g.filterModel)+1;g.parent.conditions.splice(v,0,a)}this.refreshList(!1);var y=this.items.findIndex((function(e){var t=e.filterModel;return t===a}));if(y>=0){var m=this.virtualList.getComponentAt(y);m instanceof K&&m.focusMoveButton(t)}}},t.prototype.canMoveDown=function(e,t){return!(1===e.level&&t===this.items.length-2||1===e.level&&e.parent.conditions[e.parent.conditions.length-1]===e.filterModel)},t.prototype.close=function(){this.advancedFilterService.getCtrl().toggleFilterBuilder("ui")},t.prototype.validate=function(){var e=!this.items.every((function(e){var t=e.valid;return t}));e?this.validationMessage=this.advancedFilterExpressionService.translate("advancedFilterBuilderValidationIncomplete"):(e=JSON.stringify(this.filterModel)===this.stringifiedModel,this.validationMessage=e?this.advancedFilterExpressionService.translate("advancedFilterBuilderValidationAlreadyApplied"):null),n._.setDisabled(this.eApplyFilterButton,e),this.validationTooltipFeature.refreshToolTip()},t.prototype.validateItems=function(){var e=this,t=function(e){e.type=void 0},i=function(e){delete e.filter};
18this.items.forEach((function(o){if(o.valid&&o.filterModel&&"join"!==o.filterModel.filterType){var r=o.filterModel,s=r.colId,a=e.advancedFilterExpressionService.getColumnAutocompleteEntries().find((function(e){var t=e.key;return t===s})),l=e.advancedFilterExpressionService.getColumnDetails(r.colId);if(!a||!l.column)return o.valid=!1,r.colId=void 0,t(r),void i(r);var c=e.advancedFilterExpressionService.getDataTypeExpressionOperator(l.baseCellDataType),u=c.operators[r.type];if(!u)return o.valid=!1,t(r),void i(r);u.numOperands>0&&!n._.exists(r.filter)&&(o.valid=!1)}}))},Z([(0,n.cqo)("eList")],t.prototype,"eList",void 0),Z([(0,n.cqo)("eApplyFilterButton")],t.prototype,"eApplyFilterButton",void 0),Z([(0,n.cqo)("eCancelFilterButton")],t.prototype,"eCancelFilterButton",void 0),Z([(0,n.fsG)("filterManager")],t.prototype,"filterManager",void 0),Z([(0,n.fsG)("advancedFilterService")],t.prototype,"advancedFilterService",void 0),Z([(0,n.fsG)("advancedFilterExpressionService")],t.prototype,"advancedFilterExpressionService",void 0),Z([(0,n.fsG)("beans")],t.prototype,"beans",void 0),Z([n.NqP],t.prototype,"postConstruct",null),t}(n.wA2),te=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ie=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},ne=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},oe=function(e,t,i){if(i||2===arguments.length)for(var n,o=0,r=t.length;o<r;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},re=function(e){function t(t){var i=e.call(this)||this;return i.enabled=t,i}return te(t,e),t.prototype.postConstruct=function(){var e=this;this.hasAdvancedFilterParent=!!this.gridOptionsService.get("advancedFilterParent"),this.ctrlsService.whenReady((function(){return e.setAdvancedFilterComp()})),this.addManagedListener(this.eventService,n.zW2.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,(function(t){var i=t.enabled;return e.onEnabledChanged(i)})),this.addManagedPropertyListener("advancedFilterParent",(function(){return e.updateComps()})),this.addDestroyFunc((function(){e.destroyAdvancedFilterComp(),e.destroyBean(e.eBuilderComp),e.eBuilderDialog&&e.eBuilderDialog.isAlive()&&e.destroyBean(e.eBuilderDialog)}))},t.prototype.setupHeaderComp=function(e){this.eHeaderComp=this.createManagedBean(new b(this.enabled&&!this.hasAdvancedFilterParent)),e.insertAdjacentElement("beforebegin",this.eHeaderComp.getGui())},t.prototype.focusHeaderComp=function(){return!!this.eHeaderComp&&(this.eHeaderComp.getFocusableElement().focus(),!0)},t.prototype.refreshComp=function(){var e,t;null===(e=this.eFilterComp)||void 0===e||e.refresh(),null===(t=this.eHeaderComp)||void 0===t||t.refresh()},t.prototype.refreshBuilderComp=function(){var e;null===(e=this.eBuilderComp)||void 0===e||e.refresh()},t.prototype.getHeaderHeight=function(){var e,t;return null!==(t=null===(e=this.eHeaderComp)||void 0===e?void 0:e.getHeight())&&void 0!==t?t:0},t.prototype.setInputDisabled=function(e){var t,i;null===(t=this.eFilterComp)||void 0===t||t.setInputDisabled(e),null===(i=this.eHeaderComp)||void 0===i||i.setInputDisabled(e)},t.prototype.toggleFilterBuilder=function(e,i){var o=this;if(!(i&&this.eBuilderDialog||!1===i&&!this.eBuilderDialog)){if(this.eBuilderDialog)return this.builderDestroySource=e,void this.destroyBean(this.eBuilderDialog);this.setInputDisabled(!0);var r=this.getBuilderDialogSize(),s=r.width,a=r.height,l=r.minWidth;this.eBuilderComp=this.createBean(new ee),this.eBuilderDialog=this.createBean(new n.$zI({title:this.advancedFilterExpressionService.translate("advancedFilterBuilderTitle"),component:this.eBuilderComp,width:s,height:a,resizable:!0,movable:!0,maximizable:!0,centered:!0,closable:!0,minWidth:l,afterGuiAttached:function(){var e;return null===(e=o.eBuilderComp)||void 0===e?void 0:e.afterGuiAttached()}})),this.dispatchFilterBuilderVisibleChangedEvent(e,!0),this.eBuilderDialog.addEventListener(n.$zI.EVENT_DESTROYED,(function(){var e;o.destroyBean(o.eBuilderComp),o.eBuilderComp=void 0,o.eBuilderDialog=void 0,o.setInputDisabled(!1),o.dispatchEvent({type:t.EVENT_BUILDER_CLOSED}),o.dispatchFilterBuilderVisibleChangedEvent(null!==(e=o.builderDestroySource)&&void 0!==e?e:"ui",!1),o.builderDestroySource=void 0}))}},t.prototype.dispatchFilterBuilderVisibleChangedEvent=function(e,t){var i={type:n.zW2.EVENT_ADVANCED_FILTER_BUILDER_VISIBLE_CHANGED,source:e,visible:t};this.eventService.dispatchEvent(i)},t.prototype.getBuilderDialogSize=function(){var e,t,i=null!==(t=null===(e=this.gridOptionsService.get("advancedFilterBuilderParams"))||void 0===e?void 0:e.minWidth)&&void 0!==t?t:500,o=this.popupService.getPopupParent(),r=Math.round(n._.getAbsoluteWidth(o))-2,s=Math.round(.75*n._.getAbsoluteHeight(o))-2,a=Math.min(Math.max(600,i),r),l=Math.min(600,s);return{width:a,height:l,minWidth:i}},t.prototype.onEnabledChanged=function(e){this.enabled=e,this.updateComps()},t.prototype.updateComps=function(){this.setAdvancedFilterComp(),this.setHeaderCompEnabled(),this.eventService.dispatchEvent({type:n.zW2.EVENT_HEADER_HEIGHT_CHANGED})},t.prototype.setAdvancedFilterComp=function(){var e;if(this.destroyAdvancedFilterComp(),this.enabled){var t=this.gridOptionsService.get("advancedFilterParent");
18if(this.hasAdvancedFilterParent=!!t,t){var i=this.createBean(new le),n=i.getGui(),o=this.environment.getTheme().allThemes;o.length&&(e=n.classList).add.apply(e,oe([],ne(o),!1)),n.classList.add(this.gridOptionsService.get("enableRtl")?"ag-rtl":"ag-ltr"),t.appendChild(n),this.eFilterComp=i}}},t.prototype.setHeaderCompEnabled=function(){var e;null===(e=this.eHeaderComp)||void 0===e||e.setEnabled(this.enabled&&!this.hasAdvancedFilterParent)},t.prototype.destroyAdvancedFilterComp=function(){this.eFilterComp&&(n._.removeFromParent(this.eFilterComp.getGui()),this.destroyBean(this.eFilterComp))},t.EVENT_BUILDER_CLOSED="advancedFilterBuilderClosed",ie([(0,n.fsG)("focusService")],t.prototype,"focusService",void 0),ie([(0,n.fsG)("ctrlsService")],t.prototype,"ctrlsService",void 0),ie([(0,n.fsG)("popupService")],t.prototype,"popupService",void 0),ie([(0,n.fsG)("advancedFilterExpressionService")],t.prototype,"advancedFilterExpressionService",void 0),ie([n.NqP],t.prototype,"postConstruct",null),t}(n.AS9),se=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ae=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},le=function(e){function t(){var t=e.call(this,'\n            <div class="ag-advanced-filter" role="presentation" tabindex="-1">\n                <ag-autocomplete ref="eAutocomplete"></ag-autocomplete>\n                <button class="ag-button ag-standard-button ag-advanced-filter-apply-button" ref="eApplyFilterButton"></button>\n                <button class="ag-advanced-filter-builder-button" ref="eBuilderFilterButton">\n                    <span ref="eBuilderFilterButtonIcon" aria-hidden="true"></span>\n                    <span class="ag-advanced-filter-builder-button-label" ref="eBuilderFilterButtonLabel"></span>\n                </button>\n            </div>')||this;return t.expressionParser=null,t.isApplyDisabled=!0,t.builderOpen=!1,t}return se(t,e),t.prototype.postConstruct=function(){var e=this;this.eAutocomplete.setListGenerator((function(t,i){return e.generateAutocompleteListParams(i)})).setValidator((function(){return e.validateValue()})).setForceLastSelection((function(t,i){return e.forceLastSelection(t,i)})).setInputAriaLabel(this.advancedFilterExpressionService.translate("ariaAdvancedFilterInput")).setListAriaLabel(this.advancedFilterExpressionService.translate("ariaLabelAdvancedFilterAutocomplete")),this.refresh(),this.addManagedListener(this.eAutocomplete,n.MiH.EVENT_VALUE_CHANGED,(function(t){var i=t.value;return e.onValueChanged(i)})),this.addManagedListener(this.eAutocomplete,n.MiH.EVENT_VALUE_CONFIRMED,(function(t){var i=t.isValid;return e.onValueConfirmed(i)})),this.addManagedListener(this.eAutocomplete,n.MiH.EVENT_OPTION_SELECTED,(function(t){var i=t.position,n=t.updateEntry,o=t.autocompleteType;return e.onOptionSelected(i,n,o)})),this.addManagedListener(this.eAutocomplete,n.MiH.EVENT_VALID_CHANGED,(function(t){var i=t.isValid,n=t.validationMessage;return e.onValidChanged(i,n)})),this.setupApplyButton(),this.setupBuilderButton()},t.prototype.refresh=function(){var e=this.advancedFilterService.getExpressionDisplayValue();this.eAutocomplete.setValue({value:null!==e&&void 0!==e?e:"",position:null===e||void 0===e?void 0:e.length,updateListOnlyIfOpen:!0})},t.prototype.setInputDisabled=function(e){this.eAutocomplete.setInputDisabled(e),n._.setDisabled(this.eApplyFilterButton,e||this.isApplyDisabled)},t.prototype.getTooltipParams=function(){var t=e.prototype.getTooltipParams.call(this);return t.location="advancedFilter",t},t.prototype.setupApplyButton=function(){var e=this;this.eApplyFilterButton.innerText=this.advancedFilterExpressionService.translate("advancedFilterApply"),this.activateTabIndex([this.eApplyFilterButton]),this.addManagedListener(this.eApplyFilterButton,"click",(function(){return e.onValueConfirmed(e.eAutocomplete.isValid())})),n._.setDisabled(this.eApplyFilterButton,this.isApplyDisabled)},t.prototype.setupBuilderButton=function(){var e=this;this.eBuilderFilterButtonIcon.appendChild(n._.createIconNoSpan("advancedFilterBuilder",this.gridOptionsService)),this.eBuilderFilterButtonLabel.innerText=this.advancedFilterExpressionService.translate("advancedFilterBuilder"),this.activateTabIndex([this.eBuilderFilterButton]),this.addManagedListener(this.eBuilderFilterButton,"click",(function(){return e.openBuilder()})),this.addManagedListener(this.advancedFilterService.getCtrl(),re.EVENT_BUILDER_CLOSED,(function(){return e.closeBuilder()}))},t.prototype.onValueChanged=function(e){var t;e=n._.makeNull(e),this.advancedFilterService.setExpressionDisplayValue(e),this.expressionParser=this.advancedFilterService.createExpressionParser(e);var i=null===(t=this.expressionParser)||void 0===t?void 0:t.parseExpression();i&&i!==e&&this.eAutocomplete.setValue({value:i,silent:!0,restoreFocus:!0})},t.prototype.onValueConfirmed=function(e){e&&!this.isApplyDisabled&&(n._.setDisabled(this.eApplyFilterButton,!0),this.advancedFilterService.applyExpression(),this.filterManager.onFilterChanged({source:"advancedFilter"}))},t.prototype.onOptionSelected=function(e,t,i){var n=this.updateExpression(e,t,i),o=n.updatedValue,r=n.updatedPosition,s=n.hideAutocomplete;this.eAutocomplete.setValue({value:o,position:r,updateListOnlyIfOpen:s,restoreFocus:!0})},t.prototype.validateValue=function(){var e,t,i;return(null===(e=this.expressionParser)||void 0===e?void 0:e.isValid())?null:null!==(i=null===(t=this.expressionParser)||void 0===t?void 0:t.getValidationMessage())&&void 0!==i?i:null},t.prototype.onValidChanged=function(e,t){this.isApplyDisabled=!e||this.advancedFilterService.isCurrentExpressionApplied(),n._.setDisabled(this.eApplyFilterButton,this.isApplyDisabled),this.setTooltip(t,1e3)}
18,t.prototype.generateAutocompleteListParams=function(e){return this.expressionParser?this.expressionParser.getAutocompleteListParams(e):this.advancedFilterExpressionService.getDefaultAutocompleteListParams("")},t.prototype.updateExpression=function(e,t,i){var n,o;return this.advancedFilterExpressionService.updateAutocompleteCache(t,i),null!==(o=null===(n=this.expressionParser)||void 0===n?void 0:n.updateExpression(e,t,i))&&void 0!==o?o:this.advancedFilterService.getDefaultExpression(t)},t.prototype.forceLastSelection=function(e,t){var i=e.key,n=e.displayValue;return!!t.toLocaleLowerCase().match("^".concat((null!==n&&void 0!==n?n:i).toLocaleLowerCase(),"\\s*$"))},t.prototype.openBuilder=function(){this.builderOpen||(this.builderOpen=!0,n._.setDisabled(this.eBuilderFilterButton,!0),this.advancedFilterService.getCtrl().toggleFilterBuilder("ui"))},t.prototype.closeBuilder=function(){this.builderOpen&&(this.builderOpen=!1,n._.setDisabled(this.eBuilderFilterButton,!1),this.eBuilderFilterButton.focus())},ae([(0,n.cqo)("eAutocomplete")],t.prototype,"eAutocomplete",void 0),ae([(0,n.cqo)("eApplyFilterButton")],t.prototype,"eApplyFilterButton",void 0),ae([(0,n.cqo)("eBuilderFilterButton")],t.prototype,"eBuilderFilterButton",void 0),ae([(0,n.cqo)("eBuilderFilterButtonIcon")],t.prototype,"eBuilderFilterButtonIcon",void 0),ae([(0,n.cqo)("eBuilderFilterButtonLabel")],t.prototype,"eBuilderFilterButtonLabel",void 0),ae([(0,n.fsG)("advancedFilterService")],t.prototype,"advancedFilterService",void 0),ae([(0,n.fsG)("advancedFilterExpressionService")],t.prototype,"advancedFilterExpressionService",void 0),ae([(0,n.fsG)("filterManager")],t.prototype,"filterManager",void 0),ae([n.NqP],t.prototype,"postConstruct",null),t}(n.wA2),ce={ariaAdvancedFilterBuilderItem:function(e){return"".concat(e[0],". Level ").concat(e[1],". Press ENTER to edit.")},ariaAdvancedFilterBuilderItemValidation:function(e){return"".concat(e[0],". Level ").concat(e[1],". ").concat(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:function(e){return"Expression has an error. ".concat(e[0]," - ").concat(e[1],".")},advancedFilterValidationMessageAtEnd:function(e){return"Expression has an error. ".concat(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 c
18onditions are complete.",advancedFilterBuilderValidationSelectColumn:"Must select a column.",advancedFilterBuilderValidationSelectOption:"Must select an option.",advancedFilterBuilderValidationEnterValue:"Must enter a value."};function ue(e,t,i){if(!e)return"";var n=i-t;return n?e.slice(0,e.length-n):e}function de(e,t,i,n,o,r,s){var a=i+(!e.length||s?0:1),l=0;o&&(" "===e[a]?l=1:(n+=" ",r&&(n+='"')));var c=e.slice(0,t)+n+e.slice(a);return{updatedValue:c,updatedPosition:t+n.length+l}}function pe(e,t,i){var n=t;while(n<i){var o=e[n];if(" "!==o)break;n++}return n}function he(e,t,i,n){var o=t,r=!1;while(o<e.length){var s=e[o];if("("===s){n&&" "===e[o-1]?r=!0:o-=1;break}if(" "===s||i&&")"===s){o-=1;break}o++}return{endPosition:o,isEmpty:r}}function fe(e,t,i,n){i!==t&&(e.expression=de(e.expression,n-t.length+1,n,i).updatedValue)}function ge(e){return e.replace(/(['"])/,"\\$1")}var ve=function(){return ve=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ve.apply(this,arguments)},ye=function(){function e(e,t){this.params=e,this.startPosition=t,this.type="column",this.valid=!0,this.hasStartChar=!1,this.hasEndChar=!1,this.colName=""}return e.prototype.parse=function(e,t){if(e!==be.COL_START_CHAR||this.colName)if(e===be.COL_END_CHAR&&this.hasStartChar){var i=this.parseColumn(!1,t);if(i)return this.hasEndChar=!0,!1;this.colName+=e}else this.colName+=e;else this.hasStartChar=!0},e.prototype.getDisplayValue=function(){return(this.hasStartChar?be.COL_START_CHAR:"")+this.colName+(this.hasEndChar?be.COL_END_CHAR:"")},e.prototype.getColId=function(){return this.colId},e.prototype.complete=function(e){this.parseColumn(!0,e)},e.prototype.getValidationError=function(){var e;return this.valid?null:{message:this.params.advancedFilterExpressionService.translate("advancedFilterValidationInvalidColumn"),startPosition:this.startPosition,endPosition:null!==(e=this.endPosition)&&void 0!==e?e:this.params.expression.length-1}},e.prototype.parseColumn=function(e,t){var i;this.endPosition=t;var n=this.params.advancedFilterExpressionService.getColId(this.colName);return n&&this.hasStartChar&&(this.colId=n.colId,fe(this.params,this.colName,n.columnName,t-1),this.colName=n.columnName,this.column=this.params.columnModel.getPrimaryColumn(this.colId),this.column)?(this.baseCellDataType=null!==(i=this.params.dataTypeService.getBaseDataType(this.column))&&void 0!==i?i:"text",!0):(e&&(this.valid=!1),this.baseCellDataType="text",!1)},e}(),me=function(){function e(e,t,i){this.params=e,this.startPosition=t,this.baseCellDataType=i,this.type="operator",this.valid=!0,this.expectedNumOperands=0,this.operator=""}return e.prototype.parse=function(e,t){if(" "===e||")"===e){var i=this.parseOperator(!1,t-1);if(i)return!0;this.operator+=e}else this.operator+=e},e.prototype.complete=function(e){this.parseOperator(!0,e)},e.prototype.getValidationError=function(){var e;return this.valid?null:{message:this.params.advancedFilterExpressionService.translate("advancedFilterValidationInvalidOption"),startPosition:this.startPosition,endPosition:null!==(e=this.endPosition)&&void 0!==e?e:this.params.expression.length-1}},e.prototype.getDisplayValue=function(){return this.operator},e.prototype.getOperatorKey=function(){return this.parsedOperator},e.prototype.parseOperator=function(e,t){var i=this.params.advancedFilterExpressionService.getDataTypeExpressionOperator(this.baseCellDataType),n=i.findOperator(this.operator);if(this.endPosition=t,n){this.parsedOperator=n;var o=i.operators[n];this.expectedNumOperands=o.numOperands;var r=o.displayValue;return fe(this.params,this.operator,r,t),this.operator=r,!0}var s=null===n;return!e&&s||(this.valid=!1),!1},e}(),Ce=function(){function e(e,t,i,n){this.params=e,this.startPosition=t,this.baseCellDataType=i,this.column=n,this.type="operand",this.valid=!0,this.operand="",this.validationMessage=null}return e.prototype.parse=function(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},e.prototype.complete=function(e){this.parseOperand(!0,e)},e.prototype.getValidationError=function(){var e;return this.validationMessage?{message:this.validationMessage,startPosition:this.startPosition,endPosition:null!==(e=this.endPosition)&&void 0!==e?e:this.params.expression.length-1}:null},e.prototype.getRawValue=function(){return this.operand},e.prototype.getModelValue=function(){return this.modelValue},e.prototype.parseOperand=function(e,t){var i=this.params.advancedFilterExpressionService;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{var n=i.getOperandModelValue(this.operand,this.baseCellDataType,this.column);switch(null!=n&&(this.modelValue=n),this.baseCellDataType){case"number":(this.quotes||isNaN(this.modelValue))&&(this.valid=!1,this.validationMessage=i.translate("advancedFilterValidationNotANumber"));break;case"date":case"dateString":null==n&&(this.valid=!1,this.validationMessage=i.translate("advancedFilterValidationInvalidDate"));break}}},e}(),be=function(){function e(e,t){this.params=e,this.startPosition=t,this.isAwaiting=!0}return e.prototype.parseExpression=function(){var e,t,i=this.startPosition,n=this.params.expression;while(i<n.length){var o=n[i];if(" "===o&&this.isAwaiting);else{if(this.isAwaiting=!1,!this.parser){var r=void 0;this.columnParser?this.operatorParser?(this.operandParser=new Ce(this.params,i,this.columnParser.baseCellDataType,this.columnParser.column),r=this.operandParser):(this.operatorParser=new me(this.params,i,this.columnParser.baseCellDataType),r=this.operatorParser):(this.columnParser=new ye(this.params,i),r=this.columnParser),this.parser=r}var s=this.parser.parse(o,i);if(null!=s){if(this.isComplete())return this.returnEndPosition(s?i-1:i,!0);this.parser=void 0,this.isAwaiting=!0}}i++}return null===(t=null===(e=this.parser)||void 0===e?void 0:e.complete)||void 0===t||t.call(e,i-1),this.returnEndPosition(i)},e.prototype.isValid=function(){return this.isComplete()&&this.columnParser.valid&&this.operatorParser.valid&&(!this.operandParser||this.operandParser.valid)},e.prototype.getValidationError=function(){var e,t,i,n,o,r=null!==(n=null!==(t=null===(e=this.columnParser)||void 0===e?void 0:e.getValidationError())&&void 0!==t?t:null===(i=this.operatorParser)||void 0===i?void 0:i.getValidationError())&&void 0!==n?n:null===(o=this.operandParser)||void 0===o?void 0:o.getValidationError();if(r)return r;var s,a=this.params.expression.length;return this.columnParser?this.operatorParser?this.operatorParser.expectedNumOperands&&!this.operandParser&&(s="advancedFilterValidationMissingValue"):s="advancedFilterValidationMissingOption":s="advancedFilterValidationMissingColumn",s?{message:this.params.advancedFilterExpressionService.translate(s),startPosition:a,endPosition:a}:null},e.prototype.getFunction=function(e){var t,i,n,o=this.columnParser.getColId(),r=ge(o),s=null===(t=this.operatorParser)||void 0===t?void 0:t.getOperatorKey(),a=e.operators,l=e.evaluatorParams,c=e.operands,u=this.params.advancedFilterExpressionService.getExpressionOperator(this.columnParser.baseCellDataType,s),d=this.addToListAndGetIndex(a,u),p=this.params.advancedFilterExpressionService.getExpressionEvaluatorParams(o),h=this.addToListAndGetIndex(l,p);if(0===(null===(i=this.operatorParser)||void 0===i?void 0:i.expectedNumOperands))n="";else{var f=this.addToListAndGetIndex(c,this.getOperandValue());n=", params.operands[".concat(f,"]")}return"params.operators[".concat(d,"].evaluator(expressionProxy.getValue('").concat(r,"', node), node, params.evaluatorParams[").concat(h,"]").concat(n,")")},e.prototype.getAutocompleteListParams=function(e){return this.isColumnPosition(e)?this.getColumnAutocompleteListParams(e):this.isOperatorPosition(e)?this.getOperatorAutocompleteListParams(e):this.isBeyondEndPosition(e)?void 0:{enabled:!1}},e.prototype.updateExpression=function(e,t,i){var n,o,r,s,a,l=this.params.expression;if(this.isColumnPosition(e))return de(this.params.expression,this.startPosition,(null===(n=this.columnParser)||void 0===n?void 0:n.getColId())?this.columnParser.endPosition:he(l,e).endPosition,this.params.advancedFilterExpressionService.getColumnValue(t),!0);if(this.isOperatorPosition(e)){var c=this.getBaseCellDataTypeFromOperatorAutocompleteType(i),u=this.hasOperand(c,t.key),d=u&&this.doesOperandNeedQuotes(c),p=void 0;if(null!=(null===(o=this.operatorParser)||void 0===o?void 0:o.startPosition)&&e<this.operatorParser.startPosition)p=de(l,e,e,null!==(r=t.displayValue)&&void 0!==r?r:t.key,u,d);else{var h=void 0,f=!1;if(null===(s=this.operatorParser)||void 0===s?void 0:s.getOperatorKey())h=this.operatorParser.endPosition;else{var g=he(l,e,!0,!0),v=g.endPosition,y=g.isEmpty;h=v,f=y}p=de(l,pe(l,this.columnParser.endPosition+1,h),h,null!==(a=t.displayValue)&&void 0!==a?a:t.key,u,d,f)}return ve(ve({},p),{hideAutocomplete:!u})}return null},e.prototype.getModel=function(){var 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},e.prototype.getOperandValue=function(){var e=this.operandParser.getRawValue(),t=this.columnParser,i=t.baseCellDataType,n=t.column;switch(i){case"number":e=Number(e);break;case"date":case"dateString":e=this.params.valueParserService.parseValue(n,null,e,void 0);break}return"dateString"===i?this.params.dataTypeService.getDateParserFunction()(e):e},e.prototype.isComplete=function(){return!(!this.operatorParser||!(!this.operatorParser.expectedNumOperands||this.operatorParser.expectedNumOperands&&this.operandParser))},e.prototype.isColumnPosition=function(e){return!this.columnParser||null==this.columnParser.endPosition||e<=this.columnParser.endPosition+1},e.prototype.isOperatorPosition=function(e){return!this.operatorParser||null==this.operatorParser.endPosition||e<=this.operatorParser.endPosition+1},e.prototype.isBeyondEndPosition=function(e){return this.isComplete()&&null!=this.endPosition&&e>this.endPosition+1&&this.endPosition+1<this.params.expression.length},e.prototype.returnEndPosition=function(e,t){return this.endPosition=t?e:e-1,e},e.prototype.getColumnAutocompleteListParams=function(e){return this.params.advancedFilterExpressionService.generateAutocompleteListParams(this.params.advancedFilterExpressionService.getColumnAutocompleteEntries(),"column",this.getColumnSearchString(e))},e.prototype.getColumnSearchString=function(e){var t,i,n,o,r,s=null!==(i=null===(t=this.columnParser)||void 0===t?void 0:t.getDisplayValue())&&void 0!==i?i:"",a=ue(s,e,null==(null===(n=this.columnParser)||void 0===n?void 0:n.endPosition)?this.params.expression.length:this.columnParser.endPosition+1),l=(null===(o=this.columnParser)||void 0===o?void 0:o.hasStartChar)&&a.length>0,c=(null===(r=this.columnParser)||void 0===r?void 0:r.hasEndChar)&&a.length===s.length+2;return l?a.slice(1,c?-1:void 0):a},e.prototype.getOperatorAutocompleteListParams=function(e){var t,i,n,o,r,s=null===(t=this.columnParser)||void 0===t?void 0:t.column;if(!s)return{enabled:!1};var a=this.columnParser.baseCellDataType,l=null!=(null===(i=this.operatorParser)||void 0===i?void 0:i.startPosition)&&e<this.operatorParser.startPosition?"":ue(null!==(o=null===(n=this.operatorParser)||void 0===n?void 0:n.getDisplayValue())&&void 0!==o?o:"",e,null==(null===(r=this.operatorParser)||void 0===r?void 0:r.endPosition)?this.params.expression.length:this.operatorParser.endPosition+1);return this.params.advancedFilterExpressionService.generateAutocompleteListParams(this.params.advancedFilterExpressionService.getOperatorAutocompleteEntries(s,a),"operator-".concat(a),l)},e.prototype.getBaseCellDataTypeFromOperatorAutocompleteType=function(e){return null===e||void 0===e?void 0:e.replace("operator-","")},e.prototype.hasOperand=function(e,t){var i,n;return!e||!t||(null!==(n=null===(i=this.params.advancedFilterExpressionService.getExpressionOperator(e,t))||void 0===i?void 0:i.numOperands)&&void 0!==n?n:0)>0},e.prototype.doesOperandNeedQuotes=function(e){return"number"!==e},e.prototype.addToListAndGetIndex=function(e,t){var i=e.length;return e.push(t),i},e.COL_START_CHAR="[",e.COL_END_CHAR="]",e}(),we=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s};function Se(e,t,i){var n=!1,o=e.toLocaleLowerCase(),r=o+" ",s=Object.entries(t).find((function(e){var t=we(e,2);t[0];var s=t[1],a=i(s).toLocaleLowerCase();return a.startsWith(r)&&(n=!0),a===o}));return s?s[0]:n?null:void 0}function Ee(e,t){var i=null!==t&&void 0!==t?t:Object.keys(e);return i.map((function(t){return{key:t,displayValue:e[t].displayValue}}))}var xe,Oe=function(){function e(e){this.params=e,this.initOperators()}return e.prototype.getEntries=function(e){return Ee(this.operators,e)},e.prototype.findOperator=function(e){return Se(e,this.operators,(function(e){var t=e.dis
18playValue;return t}))},e.prototype.initOperators=function(){var e=this,t=this.params.translate;this.operators={contains:{displayValue:t("advancedFilterContains"),evaluator:function(t,i,n,o){return e.evaluateExpression(t,i,n,o,!1,(function(e,t){return e.includes(t)}))},numOperands:1},notContains:{displayValue:t("advancedFilterNotContains"),evaluator:function(t,i,n,o){return e.evaluateExpression(t,i,n,o,!0,(function(e,t){return!e.includes(t)}))},numOperands:1},equals:{displayValue:t("advancedFilterTextEquals"),evaluator:function(t,i,n,o){return e.evaluateExpression(t,i,n,o,!1,(function(e,t){return e===t}))},numOperands:1},notEqual:{displayValue:t("advancedFilterTextNotEqual"),evaluator:function(t,i,n,o){return e.evaluateExpression(t,i,n,o,!0,(function(e,t){return e!=t}))},numOperands:1},startsWith:{displayValue:t("advancedFilterStartsWith"),evaluator:function(t,i,n,o){return e.evaluateExpression(t,i,n,o,!1,(function(e,t){return e.startsWith(t)}))},numOperands:1},endsWith:{displayValue:t("advancedFilterEndsWith"),evaluator:function(t,i,n,o){return e.evaluateExpression(t,i,n,o,!1,(function(e,t){return e.endsWith(t)}))},numOperands:1},blank:{displayValue:t("advancedFilterBlank"),evaluator:function(e){return null==e||"string"===typeof e&&0===e.trim().length},numOperands:0},notBlank:{displayValue:t("advancedFilterNotBlank"),evaluator:function(e){return null!=e&&("string"!==typeof e||e.trim().length>0)},numOperands:0}}},e.prototype.evaluateExpression=function(e,t,i,n,o,r){return null==e?o:i.caseSensitive?r(i.valueConverter(e,t),n):r(i.valueConverter(e,t).toLocaleLowerCase(),n.toLocaleLowerCase())},e}(),Te=function(){function e(e){this.params=e,this.initOperators()}return e.prototype.getEntries=function(e){return Ee(this.operators,e)},e.prototype.findOperator=function(e){return Se(e,this.operators,(function(e){var t=e.displayValue;return t}))},e.prototype.initOperators=function(){var e=this,t=this.params,i=t.translate,n=t.equals;this.operators={equals:{displayValue:i("advancedFilterEquals"),evaluator:function(t,i,o,r){return e.evaluateSingleOperandExpression(t,i,o,r,!!o.includeBlanksInEquals,n)},numOperands:1},notEqual:{displayValue:i("advancedFilterNotEqual"),evaluator:function(t,i,o,r){return e.evaluateSingleOperandExpression(t,i,o,r,!!o.includeBlanksInEquals,(function(e,t){return!n(e,t)}))},numOperands:1},greaterThan:{displayValue:i("advancedFilterGreaterThan"),evaluator:function(t,i,n,o){return e.evaluateSingleOperandExpression(t,i,n,o,!!n.includeBlanksInGreaterThan,(function(e,t){return e>t}))},numOperands:1},greaterThanOrEqual:{displayValue:i("advancedFilterGreaterThanOrEqual"),evaluator:function(t,i,n,o){return e.evaluateSingleOperandExpression(t,i,n,o,!!n.includeBlanksInGreaterThan,(function(e,t){return e>=t}))},numOperands:1},lessThan:{displayValue:i("advancedFilterLessThan"),evaluator:function(t,i,n,o){return e.evaluateSingleOperandExpression(t,i,n,o,!!n.includeBlanksInLessThan,(function(e,t){return e<t}))},numOperands:1},lessThanOrEqual:{displayValue:i("advancedFilterLessThanOrEqual"),evaluator:function(t,i,n,o){return e.evaluateSingleOperandExpression(t,i,n,o,!!n.includeBlanksInLessThan,(function(e,t){return e<=t}))},numOperands:1},blank:{displayValue:i("advancedFilterBlank"),evaluator:function(e){return null==e},numOperands:0},notBlank:{displayValue:i("advancedFilterNotBlank"),evaluator:function(e){return null!=e},numOperands:0}}},e.prototype.evaluateSingleOperandExpression=function(e,t,i,n,o,r){return null==e?o:r(i.valueConverter(e,t),n)},e}(),De=function(){function e(e){this.params=e,this.initOperators()}return e.prototype.getEntries=function(e){return Ee(this.operators,e)},e.prototype.findOperator=function(e){return Se(e,this.operators,(function(e){var t=e.displayValue;return t}))},e.prototype.initOperators=function(){var e=this.params.translate;this.operators={true:{displayValue:e("advancedFilterTrue"),evaluator:function(e){return!!e},numOperands:0},false:{displayValue:e("advancedFilterFalse"),evaluator:function(e){return!1===e},numOperands:0},blank:{displayValue:e("advancedFilterBlank"),evaluator:function(e){return null==e},numOperands:0},notBlank:{displayValue:e("advancedFilterNotBlank"),evaluator:function(e){return null!=e},numOperands:0}}},e}(),Re=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ae=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},_e=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},Pe=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.columnNameToIdMap={},t.columnAutocompleteEntries=null,t.expressionEvaluatorParams={},t}return Re(t,e),t.prototype.postConstruct=function(){this.expressionJoinOperators=this.generateExpressionJoinOperators(),this.expressionOperators=this.generateExpressionOperators()},t.prototype.parseJoinOperator=function(e){var t,i=e.type;return null!==(t=this.expressionJoinOperators[i])&&void 0!==t?t:i},t.prototype.getColumnDisplayValue=function(e){var t,i=e.colId,n=this.getColumnAutocompleteEntries(),o=n.find((function(e){var t=e.key;return t===i}));return o?(t=o.displayValue,this.columnNameToIdMap[t.toLocaleUpperCase()]={colId:i,columnName:t}):t=i,t},t.prototype.getOperatorDisplayValue=function(e){var t,i;return null!==(i=null===(t=this.getExpressionOperator(e.filterType,e.type))||void 0===t?void 0:t.displayValue)&&void 0!==i?i:e.type},t.prototype.getOperandModelValue=function(e,t,i){var o;switch(t){case"number":return n._.exists(e)?Number(e):null;case"date":return n._.serialiseDate(this.valueParserService.parseValue(i,null,e,void 0),!1);case"dateString":var r=this.valueParserService.parseValue(i,null,e,void 0);return n._.serialiseDate(null!==(o=this.dataTypeService.getDateParserFunction()(r))&&void 0!==o?o:null,!1)}return e},t.prototype.getOperandDisplayValue=function(e,t){var i,o,r=e,s=r.colId,a=r.filter,l=this.columnModel.getPrimaryColumn(s),c="";if(null!=a){var u=void 0;switch(e.filterType){case"number":u=null!==(i=n._.toStringOrNull(a))&&void 0!==i?i:"";break;case"date":var d=n._.parseDateTimeFromString(a);u=l?this.valueFormatterService.formatValue(l,null,d):null;break;case"dateString":var p=n._.parseDateTimeFromString(a),h=l?this.dataTypeService.getDateFormatterFunction()(null!==p&&void 0!==p?p:void 0):null;u=l?this.valueFormatterService.formatValue(l,null,h):null;break}"number"!==e.filterType&&(u=null!==(o=null!==u&&void 0!==u?u:n._.toStringOrNull(a))&&void 0!==o?o:"",t||(u='"'.concat(u,'"'))),c=t?u:" ".concat(u)}return c},t.prototype.parseColumnFilterModel=function(e){var t,i,n=null!==(t=this.getColumnDisplayValue(e))&&void 0!==t?t:"",o=null!==(i=this.getOperatorDisplayValue(e))&&void 0!==i?i:"",r=this.getOperandDisplayValue(e);return"[".concat(n,"] ").concat(o).concat(r)},t.prototype.updateAutocompleteCache=function(e,t){if("column"===t){var i=e.key,n=e.displayValue;this.columnNameToIdMap[e.displayValue.toLocaleUpperCase()]={colId:i,columnName:n}}},t.prototype.translate=function(e,t){var i=ce[e];return"function"===typeof i&&(i=i(t)),this.localeService.getLocaleTextFunc()(e,i,t)},t.prototype.generateAutocompleteListParams=function(e,t,i){return{enabled:!0,type:t,searchString:i,entries:e}},t.prototype.getColumnAutocompleteEntries=function(){var e,t=this;if(this.columnAutocompleteEntries)return this.columnAutocompleteEntries;var i=null!==(e=this.columnModel.getAllPrimaryColumns())&&void 0!==e?e:[],n=[],o=this.gridOptionsService.get("includeHiddenColumnsInAdvancedFilter");
18return i.forEach((function(e){e.getColDef().filter&&(o||e.isVisible()||e.isRowGroupActive())&&n.push({key:e.getColId(),displayValue:t.columnModel.getDisplayNameForColumn(e,"advancedFilter")})})),n.sort((function(e,t){var i,n,o=null!==(i=e.displayValue)&&void 0!==i?i:"",r=null!==(n=t.displayValue)&&void 0!==n?n:"";return o<r?-1:r>o?1:0})),n},t.prototype.getOperatorAutocompleteEntries=function(e,t){var i=this.getActiveOperators(e);return this.getDataTypeExpressionOperator(t).getEntries(i)},t.prototype.getJoinOperatorAutocompleteEntries=function(){return Object.entries(this.expressionJoinOperators).map((function(e){var t=_e(e,2),i=t[0],n=t[1];return{key:i,displayValue:n}}))},t.prototype.getDefaultAutocompleteListParams=function(e){return this.generateAutocompleteListParams(this.getColumnAutocompleteEntries(),"column",e)},t.prototype.getDataTypeExpressionOperator=function(e){return this.expressionOperators[e]},t.prototype.getExpressionOperator=function(e,t){var i,n;return null===(n=null===(i=this.getDataTypeExpressionOperator(e))||void 0===i?void 0:i.operators)||void 0===n?void 0:n[t]},t.prototype.getExpressionJoinOperators=function(){return this.expressionJoinOperators},t.prototype.getColId=function(e){var t=e.toLocaleUpperCase(),i=this.columnNameToIdMap[t];if(i)return i;var n=this.getColumnAutocompleteEntries(),o=n.find((function(e){var i=e.displayValue;return i.toLocaleUpperCase()===t}));if(o){var r=o.key,s=o.displayValue,a={colId:r,columnName:s};return this.columnNameToIdMap[t]=a,a}return null},t.prototype.getExpressionEvaluatorParams=function(e){var t=this,i=this.expressionEvaluatorParams[e];if(i)return i;var o=this.columnModel.getPrimaryColumn(e);if(!o)return{valueConverter:function(e){return e}};var r=this.dataTypeService.getBaseDataType(o);switch(r){case"dateString":i={valueConverter:this.dataTypeService.getDateParserFunction()};break;case"object":i=o.getColDef().filterValueGetter?{valueConverter:function(e){return e}}:{valueConverter:function(e,i){var n;return null!==(n=t.valueFormatterService.formatValue(o,i,e))&&void 0!==n?n:"function"===typeof e.toString?e.toString():""}};break;case"text":case void 0:i={valueConverter:function(e){return n._.toStringOrNull(e)}};break;default:i={valueConverter:function(e){return e}};break}var s=o.getColDef().filterParams;return s&&["caseSensitive","includeBlanksInEquals","includeBlanksInLessThan","includeBlanksInGreaterThan"].forEach((function(e){var t=s[e];t&&(i[e]=t)})),this.expressionEvaluatorParams[e]=i,i},t.prototype.getColumnDetails=function(e){var t,i,n=null!==(t=this.columnModel.getPrimaryColumn(e))&&void 0!==t?t:void 0,o=null!==(i=n?this.dataTypeService.getBaseDataType(n):void 0)&&void 0!==i?i:"text";return{column:n,baseCellDataType:o}},t.prototype.generateExpressionOperators=function(){var e=this,t=function(t,i){return e.translate(t,i)};return{text:new Oe({translate:t}),boolean:new De({translate:t}),object:new Oe({translate:t}),number:new Te({translate:t,equals:function(e,t){return e===t}}),date:new Te({translate:t,equals:function(e,t){return e.getTime()===t.getTime()}}),dateString:new Te({translate:t,equals:function(e,t){return e.getTime()===t.getTime()}})}},t.prototype.getColumnValue=function(e){var t=e.displayValue;return"".concat(be.COL_START_CHAR).concat(t).concat(be.COL_END_CHAR)},t.prototype.generateExpressionJoinOperators=function(){return{AND:this.translate("advancedFilterAnd"),OR:this.translate("advancedFilterOr")}},t.prototype.getActiveOperators=function(e){var t,i=null===(t=e.getColDef().filterParams)||void 0===t?void 0:t.filterOptions;if(i){var n=i.every((function(e){return"string"===typeof e}));return n?i:void 0}},t.prototype.resetColumnCaches=function(){this.columnAutocompleteEntries=null,this.columnNameToIdMap={},this.expressionEvaluatorParams={}},Ae([(0,n.fsG)("valueFormatterService")],t.prototype,"valueFormatterService",void 0),Ae([(0,n.fsG)("valueParserService")],t.prototype,"valueParserService",void 0),Ae([(0,n.fsG)("columnModel")],t.prototype,"columnModel",void 0),Ae([(0,n.fsG)("dataTypeService")],t.prototype,"dataTypeService",void 0),Ae([n.NqP],t.prototype,"postConstruct",null),t=Ae([(0,n.Vu6)("advancedFilterExpressionService")],t),t}(n.AS9),Me=function(){function e(e){this.params=e,this.operators=[],this.operatorStartPositions=[],this.operatorEndPositions=[],this.activeOperator=0,this.validationError=null}return e.prototype.parseExpression=function(e){this.operators.push(""),this.operatorStartPositions.push(e),this.operatorEndPositions.push(void 0);var t=this.params.expression;while(e<t.length){var i=t[e];if(" "===i){var n=this.parseOperator(e-1);if(n)return this.activeOperator++,e-1;this.operators[this.activeOperator]+=i}else this.operators[this.activeOperator]+=i;e++}return this.parseOperator(e-1),e},e.prototype.isValid=function(){return!this.validationError&&(!this.operators.length||!!this.parsedOperator)},e.prototype.getValidationError=function(){return this.validationError},e.prototype.getFunction=function(){return"OR"===this.parsedOperator?"||":"&&"},e.prototype.getModel=function(){return"OR"===this.parsedOperator?"OR":"AND"},e.prototype.getAutocompleteListParams=function(e,t){var i,n=this;if(null==t)i="";else{var o=this.operators[t],r=this.operatorEndPositions[t];i=ue(o,e,null==r?this.params.expression.length:r+1)}var s=this.params.advancedFilterExpressionService.getJoinOperatorAutocompleteEntries();return(t||null==t&&this.activeOperator)&&(s=s.filter((function(e){var t=e.key;return t===n.parsedOperator}))),this.params.advancedFilterExpressionService.generateAutocompleteListParams(s,"join",i)},e.prototype.updateExpression=function(e,t,i){var n,o,r=this.params.expression,s=null!==(n=t.displayValue)&&void 0!==n?n:t.key;if(0===i)for(var a=this.operatorEndPositions.length-1;a>0;a--){var l=this.operatorEndPositions[a];null!=l&&(r=de(r,this.operatorStartPositions[a],l,s).updatedValue)}var c=this.operatorStartPositions.length>i?this.operatorStartPositions[i]:e,u=null!==(o=this.operatorEndPositions.length>i?this.operatorEndPositions[i]:void 0)&&void 0!==o?o:he(r,e,!0).endPosition;
18return de(r,c,u,s,!0)},e.prototype.getNumOperators=function(){return this.operators.length},e.prototype.getLastOperatorEndPosition=function(){return this.operatorEndPositions[this.operatorEndPositions.length-1]},e.prototype.parseOperator=function(e){var t=this.operators.length>this.activeOperator?this.operators[this.activeOperator]:"",i=this.params.advancedFilterExpressionService.getExpressionJoinOperators(),n=Se(t,i,(function(e){return e}));if(n){this.operatorEndPositions[this.activeOperator]=e;var o=i[n];if(this.activeOperator){if(n!==this.parsedOperator)return this.validationError||(this.validationError={message:this.params.advancedFilterExpressionService.translate("advancedFilterValidationJoinOperatorMismatch"),startPosition:e-t.length+1,endPosition:e}),!1}else this.parsedOperator=n;return t!==o&&(fe(this.params,t,o,e),this.operators[this.activeOperator]=o),!0}return null!==n&&(this.validationError||(this.validationError={message:this.params.advancedFilterExpressionService.translate("advancedFilterValidationInvalidJoinOperator"),startPosition:e-t.length+1,endPosition:e}),!0)},e}(),ke=function(){function e(e,t){this.params=e,this.startPosition=t,this.expectingExpression=!0,this.expectingOperator=!1,this.expressionParsers=[],this.operatorParser=new Me(this.params),this.missingEndBracket=!1,this.extraEndBracket=!1}return e.prototype.parseExpression=function(){var t=this.startPosition,i=this.params.expression;while(t<i.length){var n=i[t];if("("!==n||this.expectingOperator){if(")"===n)return this.endPosition=t-1,0===this.startPosition&&(this.extraEndBracket=!0),t;if(" "===n);else if(this.expectingExpression){o=new be(this.params,t);t=o.parseExpression(),this.expressionParsers.push(o),this.expectingExpression=!1,this.expectingOperator=!0}else this.expectingOperator&&(t=this.operatorParser.parseExpression(t),this.expectingOperator=!1,this.expectingExpression=!0)}else{var o=new e(this.params,t+1);t=o.parseExpression(),this.expressionParsers.push(o),this.expectingExpression=!1,this.expectingOperator=!0}t++}return this.startPosition>0&&(this.missingEndBracket=!0),t},e.prototype.isValid=function(){return!this.missingEndBracket&&!this.extraEndBracket&&this.expressionParsers.length===this.operatorParser.getNumOperators()+1&&this.operatorParser.isValid()&&this.expressionParsers.every((function(e){return e.isValid()}))},e.prototype.getValidationError=function(){for(var e,t=this.operatorParser.getValidationError(),i=0;i<this.expressionParsers.length;i++){var n=this.expressionParsers[i].getValidationError();if(n)return t&&t.startPosition<n.startPosition?t:n}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))},e.prototype.getFunction=function(e){var t=this.expressionParsers.length>1,i=this.expressionParsers.map((function(t){return t.getFunction(e)})).join(" ".concat(this.operatorParser.getFunction()," "));return t?"(".concat(i,")"):i},e.prototype.getAutocompleteListParams=function(e){if(!(null!=this.endPosition&&e>this.endPosition+1)){if(!this.expressionParsers.length)return this.getColumnAutocompleteListParams();var t=this.getExpressionParserIndex(e);if(null==t)return"("===this.params.expression[e]?{enabled:!1}:this.getColumnAutocompleteListParams();var i=this.expressionParsers[t],n=i.getAutocompleteListParams(e);if(!n){if(t<this.expressionParsers.length-1)return this.operatorParser.getAutocompleteListParams(e,t);if(this.expressionParsers.length===this.operatorParser.getNumOperators()){var o=this.operatorParser.getLastOperatorEndPosition();return null==o||e<=o+1?this.operatorParser.getAutocompleteListParams(e,this.operatorParser.getNumOperators()-1):this.getColumnAutocompleteListParams()}return")"===this.params.expression[e-1]?{enabled:!1}:this.operatorParser.getAutocompleteListParams(e)}return n}},e.prototype.updateExpression=function(e,t,i){var n,o=this.params.expression,r=this.getExpressionParserIndex(e);if(null==r){var s="column"===i?this.params.advancedFilterExpressionService.getColumnValue(t):null!==(n=t.displayValue)&&void 0!==n?n:t.key;return de(o,this.startPosition,this.startPosition,s,!0)}var a=this.expressionParsers[r],l=a.updateExpression(e,t,i);return null==l?"column"===i?de(o,e,o.length-1,this.params.advancedFilterExpressionService.getColumnValue(t),!0):null!=this.endPosition&&e>this.endPosition+1?null:this.operatorParser.updateExpression(e,t,r):l},e.prototype.getModel=function(){return this.expressionParsers.length>1?{filterType:"join",type:this.operatorParser.getModel(),conditions:this.expressionParsers.map((function(e){return e.getModel()}))}:this.expressionParsers[0].getModel()},e.prototype.getColumnAutocompleteListParams=function(){return this.params.advancedFilterExpressionService.generateAutocompleteListParams(this.params.advancedFilterExpressionService.getColumnAutocompleteEntries(),"column","")},e.prototype.getExpressionParserIndex=function(e){for(var t,i=0;i<this.expressionParsers.length;i++){var n=this.expressionParsers[i];if(n.startPosition>e)break;t=i}return t},e}(),Ne=function(){function e(e){this.params=e,this.valid=!1}return e.prototype.parseExpression=function(){this.joinExpressionParser=new ke(this.params,0);var e=this.joinExpressionParser.parseExpression();return this.valid=e>=this.params.expression.length-1&&this.joinExpressionParser.isValid(),this.params.expression},e.prototype.isValid=function(){return this.valid},e.prototype.getValidationMessage=function(){var e=this.joinExpressionParser.getValidationError();if(!e)return null;var t=e.message,i=e.startPosition,n=e.endPosition;return i<this.params.expression.length?this.params.advancedFilterExpressionService.translate("advancedFilterValidationMessage",[t,this.params.expression.slice(i,n+1).trim()]):this.params.advancedFilterExpressionService.translate("advancedFilterValidationMessageAtEnd",[t])},e.prototype.getFunction=function(){var e={operands:[],operators:[],evaluatorParams:[]},t="return ".concat(this.joinExpressionParser.getFunction(e),";");return{functionBody:t,params:e}},e.prototype.getAutocompleteListParams=function(e){var t;return null!==(t=this.joinExpressionParser.getAutocompleteListParams(e))&&void 0!==t?t:{enabled:!1}},e.prototype.updateExpression=function(e,t,i){return this.joinExpressionParser.updateExpression(e,t,i)},e.prototype.getModel=function(){return this.isValid()?this.joinExpressionParser.getModel():null},e}(),Le=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ie=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Fe=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.appliedExpression=null,t.expression=null,t.isValid=!0,t}return Le(t,e),t.prototype.postConstruct=function(){var e=this;this.setEnabled(this.gridOptionsService.get("enableAdvancedFilter"),!0),this.ctrl=this.createManagedBean(new re(this.enabled)),this.expressionProxy={getValue:function(t,i){var n=e.columnModel.getPrimaryColumn(t);return n?e.valueService.getValue(n,i,!0):void 0}},this.addManagedPropertyListener("enableAdvancedFilter",(function(t){return e.setEnabled(!!t.currentValue)})),this.addManagedListener(this.eventService,n.zW2.EVENT_NEW_COLUMNS_LOADED,(function(t){return e.onNewColumnsLoaded(t)})),this.addManagedPropertyListener("includeHiddenColumnsInAdvancedFilter",(function(){return e.updateValidity()}))},t.prototype.isEnabled=function(){return this.enabled},t.prototype.isFilterPresent=function(){return!!this.expressionFunction},t.prototype.doesFilterPass=function(e){return this.expressionFunction(this.expressionProxy,e,this.expressionParams)},t.prototype.getModel=function(){var e,t=this.createExpressionParser(this.appliedExpression);return null===t||void 0===t||t.parseExpression(),null!==(e=null===t||void 0===t?void 0:t.getModel())&&void 0!==e?e:null},t.prototype.setModel=function(e){var t=this,i=function(e,o){if("join"===e.filterType){var r=t.advancedFilterExpressionService.parseJoinOperator(e),s=e.conditions.map((function(e){return i(e)})).filter((function(e){return n._.exists(e)})).join(" ".concat(r," "));return o||e.conditions.length<=1?s:"(".concat(s,")")}return t.advancedFilterExpressionService.parseColumnFilterModel(e)},o=e?i(e,!0):null;this.setExpressionDisplayValue(o),this.applyExpression(),this.ctrl.refreshComp(),this.ctrl.refreshBuilderComp()},t.prototype.getExpressionDisplayValue=function(){return this.expression},t.prototype.setExpressionDisplayValue=function(e){this.expression=e},t.prototype.isCurrentExpressionApplied=function(){return this.appliedExpression===this.expression},t.prototype.createExpressionParser=function(e){return e?new Ne({expression:e,columnModel:this.columnModel,dataTypeService:this.dataTypeService,valueParserService:this.valueParserService,advancedFilterExpressionService:this.advancedFilterExpressionService}):null},t.prototype.getDefaultExpression=function(e){var t=this.advancedFilterExpressionService.getColumnValue(e)+" ";return{updatedValue:t,updatedPosition:t.length}},t.prototype.isHeaderActive=function(){return!this.gridOptionsService.get("advancedFilterParent")},t.prototype.getCtrl=function(){return this.ctrl},t.prototype.setEnabled=function(e,t){var i=this.enabled,o=this.rowModel.getType(),r="clientSide"===o||"serverSide"===o;if(e&&!o&&n._.warnOnce("Advanced Filter is only supported with the Client-Side Row Model or Server-Side Row Model."),this.enabled=e&&r,!t&&this.enabled!==i){var s={type:n.zW2.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,enabled:this.enabled};this.eventService.dispatchEvent(s)}},t.prototype.applyExpression=function(){var e=this.createExpressionParser(this.expression);null===e||void 0===e||e.parseExpression(),this.applyExpressionFromParser(e)},t.prototype.applyExpressionFromParser=function(e){if(this.isValid=!e||e.isValid(),!e||!this.isValid)return this.expressionFunction=null,this.expressionParams=null,void(this.appliedExpression=null);var t=e.getFunction(),i=t.functionBody,n=t.params;this.expressionFunction=new Function("expressionProxy","node","params",i),this.expressionParams=n,this.appliedExpression=this.expression},t.prototype.updateValidity=function(){this.advancedFilterExpressionService.resetColumnCaches();var e=this.createExpressionParser(this.expression);null===e||void 0===e||e.parseExpression();var t=!e||e.isValid(),i=t!==this.isValid;return this.applyExpressionFromParser(e),this.ctrl.refreshComp(),this.ctrl.refreshBuilderComp(),i},t.prototype.onNewColumnsLoaded=function(e){var t=this;if("gridInitializing"===e.source&&this.dataTypeService.isPendingInference()){this.ctrl.
18setInputDisabled(!0);var i=this.addManagedListener(this.eventService,n.zW2.EVENT_DATA_TYPES_INFERRED,(function(){null===i||void 0===i||i(),t.ctrl.setInputDisabled(!1)}))}},Ie([(0,n.fsG)("valueService")],t.prototype,"valueService",void 0),Ie([(0,n.fsG)("columnModel")],t.prototype,"columnModel",void 0),Ie([(0,n.fsG)("dataTypeService")],t.prototype,"dataTypeService",void 0),Ie([(0,n.fsG)("valueParserService")],t.prototype,"valueParserService",void 0),Ie([(0,n.fsG)("rowModel")],t.prototype,"rowModel",void 0),Ie([(0,n.fsG)("advancedFilterExpressionService")],t.prototype,"advancedFilterExpressionService",void 0),Ie([n.NqP],t.prototype,"postConstruct",null),t=Ie([(0,n.Vu6)("advancedFilterService")],t),t}(n.AS9),Ge="31.0.0",Ve={version:Ge,moduleName:n.GXE.AdvancedFilterModule,beans:[Fe,Pe],agStackComponents:[{componentName:"agAdvancedFilter",componentClass:le}],dependantModules:[y]},Be=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),je=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},He=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},We=function(e,t,i){if(i||2===arguments.length)for(var n,o=0,r=t.length;o<r;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},Ue=function(e){var t="function"===typeof Symbol&&Symbol.iterator,i=t&&e[t],n=0;if(i)return i.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},ze="paste",Ke="dragCopy",Ye="clipboard";(function(e){e[e["CellRange"]=0]="CellRange",e[e["SelectedRows"]=1]="SelectedRows",e[e["FocusedCell"]=2]="FocusedCell"})(xe||(xe={}));var qe,Xe=function(e){return"AG Grid: Unable to use the Clipboard API (navigator.clipboard.".concat(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."},$e=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.lastPasteOperationTime=0,t.navigatorApiFailed=!1,t}var i;return Be(t,e),i=t,t.prototype.init=function(){var e=this;this.logger=this.loggerFactory.create("ClipboardService"),"clientSide"===this.rowModel.getType()&&(this.clientSideRowModel=this.rowModel),this.ctrlsService.whenReady((function(t){e.gridCtrl=t.gridCtrl}))},t.prototype.pasteFromClipboard=function(){var e=this;this.logger.log("pasteFromClipboard");var t=!this.gridOptionsService.get("suppressClipboardApi");t&&!this.navigatorApiFailed&&navigator.clipboard&&navigator.clipboard.readText?navigator.clipboard.readText().then(this.processClipboardData.bind(this)).catch((function(t){n._.doOnce((function(){console.warn(t),console.warn(Xe("readText"))}),"clipboardApiError"),e.navigatorApiFailed=!0,e.pasteFromClipboardLegacy()})):this.pasteFromClipboardLegacy()},t.prototype.pasteFromClipboardLegacy=function(){var e=this,t=!1,i=function(i){var n=(new Date).getTime();n-e.lastPasteOperationTime<50&&(t=!0,i.preventDefault()),e.lastPasteOperationTime=n};this.executeOnTempElement((function(e){e.addEventListener("paste",i),e.focus({preventScroll:!0})}),(function(n){var o=n.value;t?e.refocusLastFocusedCell():e.processClipboardData(o),n.removeEventListener("paste",i)}))},t.prototype.refocusLastFocusedCell=function(){var e=this.focusService.getFocusedCell();e&&this.focusService.setFocusedCell({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0})},t.prototype.getClipboardDelimiter=function(){var e=this.gridOptionsService.get("
18clipboardDelimiter");return n._.exists(e)?e:"\t"},t.prototype.processClipboardData=function(e){var t=this;if(null!=e){var n=i.stringToArray(e,this.getClipboardDelimiter()),o=this.gridOptionsService.getCallback("processDataFromClipboard");if(o&&(n=o({data:n})),null!=n){this.gridOptionsService.get("suppressLastEmptyLineOnPaste")&&this.removeLastLineIfBlank(n);var r=function(e,i,o,r){var s=t.rangeService&&t.rangeService.isMoreThanOneCell(),a=s&&!t.hasOnlyOneValueToPaste(n);a?t.pasteIntoActiveRange(n,e,i,r):t.pasteStartingFromFocusedCell(n,e,i,o,r)};this.doPasteOperation(r)}}},t.stringToArray=function(e,t){void 0===t&&(t=",");var i=[],n=function(e){return"\r"===e||"\n"===e},o=!1;if(""===e)return[[""]];for(var r,s,a,l=function(l,c,u){var d=e[u-1],p=e[u],h=e[u+1],f=function(){i[l]||(i[l]=[]),i[l][c]||(i[l][c]="")};if(f(),'"'===p&&(o?'"'===h?(i[l][c]+='"',u++):o=!1:(void 0===d||d===t||n(d))&&(o=!0)),!o&&'"'!==p){if(p===t)return c++,f(),r=l,s=c,a=u,"continue";if(n(p))return c=0,l++,f(),"\r"===p&&"\n"===h&&u++,r=l,s=c,a=u,"continue"}i[l][c]+=p,r=l,s=c,a=u},c=0,u=0,d=0;d<e.length;d++)l(c,u,d),c=r,u=s,d=a;return i},t.prototype.doPasteOperation=function(e){var t,i=this.gridOptionsService.api,o=this.gridOptionsService.columnApi,r="clipboard";if(this.eventService.dispatchEvent({type:n.zW2.EVENT_PASTE_START,api:i,columnApi:o,source:r}),this.clientSideRowModel){var s=this.gridOptionsService.get("aggregateOnlyChangedColumns");t=new n.Dkq(s,this.clientSideRowModel.getRootNode())}var a={},l=[],c=this.focusService.getFocusedCell();e(a,l,c,t);var u=We([],He(l),!1);t&&(this.clientSideRowModel.doAggregate(t),t.forEachChangedNodeDepthFirst((function(e){u.push(e)}))),this.rowRenderer.refreshCells({rowNodes:u}),this.dispatchFlashCells(a),this.fireRowChanged(l),this.refocusLastFocusedCell();var d={type:n.zW2.EVENT_PASTE_END,source:r};this.eventService.dispatchEvent(d)},t.prototype.pasteIntoActiveRange=function(e,t,i,n){var o=this,r=this.getRangeSize()%e.length!=0,s=0,a=0,l=function(l,c,u,d){var p=d-s>=e.length;if(p){if(r)return;s+=a,a=0}var h=e[d-s];i.push(c);var f=o.gridOptionsService.getCallback("processCellFromClipboard");u.forEach((function(e,i){if(e.isCellEditable(c)&&!e.isSuppressPaste(c)){i>=h.length&&(i%=h.length);var r=o.processCell(c,e,h[i],Ke,f,!0);c.setDataValue(e,r,ze),n&&n.addParentNode(c.parent,[e]);var s=l.rowIndex,a=l.rowPinned,u=o.cellPositionUtils.createIdFromValues({rowIndex:s,column:e,rowPinned:a});t[u]=!0}})),a++};this.iterateActiveRanges(!1,l)},t.prototype.pasteStartingFromFocusedCell=function(e,t,i,n,o){if(n){var r={rowIndex:n.rowIndex,rowPinned:n.rowPinned},s=this.columnModel.getDisplayedColumnsStartingAt(n.column);this.isPasteSingleValueIntoRange(e)?this.pasteSingleValueIntoRange(e,i,t,o):this.pasteMultipleValues(e,r,i,s,t,Ye,o)}},t.prototype.isPasteSingleValueIntoRange=function(e){return this.hasOnlyOneValueToPaste(e)&&null!=this.rangeService&&!this.rangeService.isEmpty()},t.prototype.pasteSingleValueIntoRange=function(e,t,i,n){var o=this,r=e[0][0],s=function(e,s,a){t.push(s),a.forEach((function(e){return o.updateCellValue(s,e,r,i,Ye,n)}))};this.iterateActiveRanges(!1,s)},t.prototype.hasOnlyOneValueToPaste=function(e){return 1===e.length&&1===e[0].length},t.prototype.copyRangeDown=function(){var e=this;if(this.rangeService&&!this.rangeService.isEmpty()){var t=[],i=function(i,n,o,r){var s=e.gridOptionsService.getCallback("processCellForClipboard"),a=e.gridOptionsService.getCallback("processCellFromClipboard"),l=function(o,l,c){t.length?(n.push(l),c.forEach((function(n,s){if(n.isCellEditable(l)&&!n.isSuppressPaste(l)){var c=e.processCell(l,n,t[s],Ke,a,!0);l.setDataValue(n,c,ze),r&&r.addParentNode(l.parent,[n]);var u=o.rowIndex,d=o.rowPinned,p=e.cellPositionUtils.createIdFromValues({rowIndex:u,column:n,rowPinned:d});i[p]=!0}}))):c.forEach((function(i){var n=e.processCell(l,i,e.valueService.getValue(i,l),Ke,s,!1,!0);t.push(n)}))};e.iterateActiveRanges(!0,l)};this.doPasteOperation(i)}},t.prototype.removeLastLineIfBlank=function(e){var t=n._.last(e),i=t&&1===t.length&&""===t[0];if(i){if(1===e.length)return;n._.removeFromArray(e,t)}},t.prototype.fireRowChanged=function(e){var t=this;"fullRow"===this.gridOptionsService.get("editType")&&e.forEach((function(e){var i={type:n.zW2.EVENT_ROW_VALUE_CHANGED,node:e,data:e.data,rowIndex:e.rowIndex,rowPinned:e.rowPinned};t.eventService.dispatchEvent(i)}))},t.prototype.pasteMultipleValues=function(e,t,i,n,o,r,s){var a=this,l=t,c=null!=this.clientSideRowModel&&!this.gridOptionsService.get("enableGroupEdit")&&!this.gridOptionsService.get("treeData"),u=function(){while(1){if(!l)return null;var e=a.rowPositionUtils.getRowNode(l);if(l=a.cellNavigationService.getRowBelow({rowPinned:l.rowPinned,rowIndex:l.rowIndex}),null==e)return null;var t=e.detail||e.footer||c&&e.group;if(!t)return e}};e.forEach((function(e){var t=u();t&&(e.forEach((function(e,i){return a.updateCellValue(t,n[i],e,o,r,s)})),i.push(t))}))},t.prototype.updateCellValue=function(e,t,i,n,o,r){if(e&&t&&t.isCellEditable(e)&&!t.isSuppressPaste(e)&&(!e.group||!t.isValueActive())){var s=this.processCell(e,t,i,o,this.gridOptionsService.getCallback("processCellFromClipboard"),!0);e.setDataValue(t,s,ze);var a=e.rowIndex,l=e.rowPinned,c=this.cellPositionUtils.createIdFromValues({rowIndex:a,column:t,rowPinned:l});n[c]=!0,r&&r.addParentNode(e.parent,[t])}},t.prototype.copyToClipboard=function(e){void 0===e&&(e={}),this.copyOrCutToClipboard(e)},t.prototype.cutToClipboard=function(e,t){if(void 0===e&&(e={}),void 0===t&&(t="api"),!this.gridOptionsService.get("suppressCutToClipboard")){var i={type:n.zW2.EVENT_CUT_START,source:t};this.eventService.dispatchEvent(i),this.copyOrCutToClipboard(e,!0);var o={type:n.zW2.EVENT_CUT_END,source:t};this.eventService.dispatchEvent(o)}},t.prototype.copyOrCutToClipboard=function(e,t){var i=e.includeHeaders,n=e.includeGroupHeaders;this.logger.log("copyToClipboard: includeHeaders = ".concat(i)),null==i&&(i=this.gridOptionsService.get("
18copyHeadersToClipboard")),null==n&&(n=this.gridOptionsService.get("copyGroupHeadersToClipboard"));var o={includeHeaders:i,includeGroupHeaders:n},r=!this.gridOptionsService.get("suppressCopyRowsToClipboard"),s=null;!this.rangeService||this.rangeService.isEmpty()||this.shouldSkipSingleCellRange()?r&&!this.selectionService.isEmpty()?(this.copySelectedRowsToClipboard(o),s=xe.SelectedRows):this.focusService.isAnyCellFocused()&&(this.copyFocusedCellToClipboard(o),s=xe.FocusedCell):(this.copySelectedRangeToClipboard(o),s=xe.CellRange),t&&null!==s&&this.clearCellsAfterCopy(s)},t.prototype.clearCellsAfterCopy=function(e){if(this.eventService.dispatchEvent({type:n.zW2.EVENT_KEY_SHORTCUT_CHANGED_CELL_START}),e===xe.CellRange)this.rangeService.clearCellRangeCellValues({cellEventSource:"clipboardService"});else if(e===xe.SelectedRows)this.clearSelectedRows();else{var t=this.focusService.getFocusedCell();if(null==t)return;var i=this.rowPositionUtils.getRowNode(t);i&&this.clearCellValue(i,t.column)}this.eventService.dispatchEvent({type:n.zW2.EVENT_KEY_SHORTCUT_CHANGED_CELL_END})},t.prototype.clearSelectedRows=function(){var e,t,i,n,o=this.selectionService.getSelectedNodes(),r=this.columnModel.getAllDisplayedColumns();try{for(var s=Ue(o),a=s.next();!a.done;a=s.next()){var l=a.value;try{for(var c=(i=void 0,Ue(r)),u=c.next();!u.done;u=c.next()){var d=u.value;this.clearCellValue(l,d)}}catch(p){i={error:p}}finally{try{u&&!u.done&&(n=c.return)&&n.call(c)}finally{if(i)throw i.error}}}}catch(h){e={error:h}}finally{try{a&&!a.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}}
18,t.prototype.clearCellValue=function(e,t){t.isCellEditable(e)&&e.setDataValue(t,null,"clipboardService")},t.prototype.shouldSkipSingleCellRange=function(){return this.gridOptionsService.get("suppressCopySingleCellRanges")&&!this.rangeService.isMoreThanOneCell()},t.prototype.iterateActiveRanges=function(e,t,i){var n=this;if(this.rangeService&&!this.rangeService.isEmpty()){var o=this.rangeService.getCellRanges();e?this.iterateActiveRange(o[0],t,i,!0):o.forEach((function(e,r){return n.iterateActiveRange(e,t,i,r===o.length-1)}))}},t.prototype.iterateActiveRange=function(e,t,i,n){if(this.rangeService){var o=this.rangeService.getRangeStartRow(e),r=this.rangeService.getRangeEndRow(e);i&&e.columns&&i(e.columns);var s=0,a=!1;while(!a&&null!=o){var l=this.rowPositionUtils.getRowNode(o);a=this.rowPositionUtils.sameRow(o,r),t(o,l,e.columns,s++,a&&n),o=this.cellNavigationService.getRowBelow(o)}}},t.prototype.copySelectedRangeToClipboard=function(e){if(void 0===e&&(e={}),this.rangeService&&!this.rangeService.isEmpty()){var t=this.rangeService.areAllRangesAbleToMerge(),i=t?this.buildDataFromMergedRanges(e):this.buildDataFromRanges(e),n=i.data,o=i.cellsToFlash;this.copyDataToClipboard(n),this.dispatchFlashCells(o)}},t.prototype.buildDataFromMergedRanges=function(e){var t=this,i=new Set,n=this.rangeService.getCellRanges(),o=new Map,r=[],s={};n.forEach((function(e){e.columns.forEach((function(e){return i.add(e)}));var n=t.getRangeRowPositionsAndCellsToFlash(e),a=n.rowPositions,l=n.cellsToFlash;a.forEach((function(e){var t="".concat(e.rowIndex,"-").concat(e.rowPinned||"null");o.get(t)||(o.set(t,!0),r.push(e))})),Object.assign(s,l)}));var a=this.columnModel.getAllDisplayedColumns(),l=Array.from(i);l.sort((function(e,t){var i=a.indexOf(e),n=a.indexOf(t);return i-n}));var c=this.buildExportParams({columns:l,rowPositions:r,includeHeaders:e.includeHeaders,includeGroupHeaders:e.includeGroupHeaders});return{data:c,cellsToFlash:s}},t.prototype.buildDataFromRanges=function(e){var t=this,i=this.rangeService.getCellRanges(),n=[],o={};return i.forEach((function(i){var r=t.getRangeRowPositionsAndCellsToFlash(i),s=r.rowPositions,a=r.cellsToFlash;Object.assign(o,a),n.push(t.buildExportParams({columns:i.columns,rowPositions:s,includeHeaders:e.includeHeaders,includeGroupHeaders:e.includeGroupHeaders}))})),{data:n.join("\n"),cellsToFlash:o}},t.prototype.getRangeRowPositionsAndCellsToFlash=function(e){var t=this,i=[],n={},o=this.rangeService.getRangeStartRow(e),r=this.rangeService.getRangeEndRow(e),s=o;while(s){if(i.push(s),e.columns.forEach((function(e){var i=s,o=i.rowIndex,r=i.rowPinned,a=t.cellPositionUtils.createIdFromValues({rowIndex:o,column:e,rowPinned:r});n[a]=!0})),this.rowPositionUtils.sameRow(s,r))break;s=this.cellNavigationService.getRowBelow(s)}return{rowPositions:i,cellsToFlash:n}},t.prototype.copyFocusedCellToClipboard=function(e){var t;void 0===e&&(e={});var i=this.focusService.getFocusedCell();if(null!=i){var n=this.cellPositionUtils.createId(i),o={rowPinned:i.rowPinned,rowIndex:i.rowIndex},r=i.column,s=this.buildExportParams({columns:[r],rowPositions:[o],includeHeaders:e.includeHeaders,includeGroupHeaders:e.includeGroupHeaders});this.copyDataToClipboard(s),this.dispatchFlashCells((t={},t[n]=!0,t))}},t.prototype.copySelectedRowsToClipboard=function(e){void 0===e&&(e={});var t=e.columnKeys,i=e.includeHeaders,n=e.includeGroupHeaders,o=this.buildExportParams({columns:t,includeHeaders:i,includeGroupHeaders:n});this.copyDataToClipboard(o)},t.prototype.buildExportParams=function(e){var t=this,i=e.columns,n=e.rowPositions,o=e.includeHeaders,r=void 0!==o&&o,s=e.includeGroupHeaders,a=void 0!==s&&s,l={columnKeys:i,rowPositions:n,skipColumnHeaders:!r,skipColumnGroupHeaders:!a,suppressQuotes:!0,columnSeparator:this.getClipboardDelimiter(),onlySelected:!n,processCellCallback:this.gridOptionsService.getCallback("processCellForClipboard"),processRowGroupCallback:function(e){return t.processRowGroupCallback(e)},processHeaderCallback:this.gridOptionsService.getCallback("processHeaderForClipboard"),processGroupHeaderCallback:this.gridOptionsService.getCallback("processGroupHeaderForClipboard")};return this.csvCreator.getDataAsCsv(l,!0)},t.prototype.processRowGroupCallback=function(e){var t=this,i=e.node,n=i.key,o=null!=n?n:"";if(e.node.footer){var r="";n&&n.length&&(r=" ".concat(n)),o="Total".concat(r)}var s=this.gridOptionsService.getCallback("processCellForClipboard");if(s){var a=i.rowGroupColumn;return!a&&i.footer&&-1===i.level&&(a=this.columnModel.getRowGroupColumns()[0]),s({value:o,node:i,column:a,type:"clipboard",formatValue:function(e){var n;return null!==(n=t.valueFormatterService.formatValue(a,i,e))&&void 0!==n?n:e},parseValue:function(e){return t.valueParserService.parseValue(a,i,e,t.valueService.getValue(a,i))}})}return o},t.prototype.dispatchFlashCells=function(e){var t=this;window.setTimeout((function(){var i={type:n.zW2.EVENT_FLASH_CELLS,cells:e};t.eventService.dispatchEvent(i)}),0)},t.prototype.processCell=function(e,t,i,n,o,r,s){var a,l=this;if(o){var c={column:t,node:e,value:i,type:n,formatValue:function(i){var n;return null!==(n=l.valueFormatterService.formatValue(t,null!==e&&void 0!==e?e:null,i))&&void 0!==n?n:i},parseValue:function(i){return l.valueParserService.parseValue(t,null!==e&&void 0!==e?e:null,i,l.valueService.getValue(t,e))}};return o(c)}return r&&!1!==t.getColDef().useValueParserForImport?this.valueParserService.parseValue(t,null!==e&&void 0!==e?e:null,i,this.valueService.getValue(t,e)):s&&!1!==t.getColDef().useValueFormatterForExport&&null!==(a=this.valueFormatterService.formatValue(t,null!==e&&void 0!==e?e:null,i))&&void 0!==a?a:i},t.prototype.copyDataToClipboard=function(e){var t=this,i=this.gridOptionsService.getCallback("sendToClipboard");if(i)i({data:e});else{var o=!this.gridOptionsService.get("suppressClipboardApi");o&&navigator.clipboard?navigator.clipboard.writeText(e).catch((function(i){n._.doOnce((function(){console.warn(i),console.warn(Xe("writeText"))}),"clipboardApiError"),t.copyDataToClipboardLegacy(e)})):this.copyDataToClipboardLegacy(e)}},t.prototype.copyDataToClipboardLegacy=function(e){var t=this;this.executeOnTempElement((function(i){var n=t.gridOptionsService.getDocument(),o=n.activeElement;i.value=e||" ",i.select(),i.focus({preventScroll:!0});var r=n.execCommand("copy");r||console.warn("AG Grid: 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!=o&&null!=o.focus&&o.focus({preventScroll:!0})}
18))},t.prototype.executeOnTempElement=function(e,t){var i=this.gridOptionsService.getDocument(),n=i.createElement("textarea");n.style.width="1px",n.style.height="1px",n.style.top=i.documentElement.scrollTop+"px",n.style.left=i.documentElement.scrollLeft+"px",n.style.position="absolute",n.style.opacity="0";var o=this.gridCtrl.getGui();o.appendChild(n);try{e(n)}catch(r){console.warn("AG Grid: Browser does not support document.execCommand('copy') for clipboard operations")}t?window.setTimeout((function(){t(n),o.removeChild(n)}),100):o.removeChild(n)},t.prototype.getRangeSize=function(){var e=this.rangeService.getCellRanges(),t=0,i=0;return e.length>0&&(t=this.rangeService.getRangeStartRow(e[0]).rowIndex,i=this.rangeService.getRangeEndRow(e[0]).rowIndex),t-i+1},je([(0,n.fsG)("csvCreator")],t.prototype,"csvCreator",void 0),je([(0,n.fsG)("loggerFactory")],t.prototype,"loggerFactory",void 0),je([(0,n.fsG)("selectionService")],t.prototype,"selectionService",void 0),je([(0,n.FiY)("rangeService")],t.prototype,"rangeService",void 0),je([(0,n.fsG)("rowModel")],t.prototype,"rowModel",void 0),je([(0,n.fsG)("ctrlsService")],t.prototype,"ctrlsService",void 0),je([(0,n.fsG)("valueService")],t.prototype,"valueService",void 0),je([(0,n.fsG)("focusService")],t.prototype,"focusService",void 0),je([(0,n.fsG)("rowRenderer")],t.prototype,"rowRenderer",void 0),je([(0,n.fsG)("columnModel")],t.prototype,"columnModel",void 0),je([(0,n.fsG)("cellNavigationService")],t.prototype,"cellNavigationService",void 0),je([(0,n.fsG)("cellPositionUtils")],t.prototype,"cellPositionUtils",void 0),je([(0,n.fsG)("rowPositionUtils")],t.prototype,"rowPositionUtils",void 0),je([(0,n.fsG)("valueFormatterService")],t.prototype,"valueFormatterService",void 0),je([(0,n.fsG)("valueParserService")],t.prototype,"valueParserService",void 0),je([n.NqP],t.prototype,"init",null),t=i=je([(0,n.Vu6)("clipboardService")],t),t}(n.AS9),Ze="31.0.0",Je={version:Ze,moduleName:n.GXE.ClipboardModule,beans:[$e],dependantModules:[y,n.jMC]},Qe=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),et=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};(function(e){e[e["EXPANDED"]=0]="EXPANDED",e[e["COLLAPSED"]=1]="COLLAPSED",e[e["INDETERMINATE"]=2]="INDETERMINATE"})(qe||(qe={}));var tt=function(e){function t(){return e.call(this,t.TEMPLATE)||this}return Qe(t,e),t.prototype.postConstruct=function(){var e=this;this.createExpandIcons(),this.addManagedListener(this.eExpand,"click",this.onExpandClicked.bind(this)),this.addManagedListener(this.eExpand,"keydown",(function(t){t.key===n.VDZ.SPACE&&(t.preventDefault(),e.onExpandClicked())})),this.addManagedListener(this.eSelect.getInputElement(),"click",this.onSelectClicked.bind(this)),this.addManagedPropertyListener("functionsReadOnly",(function(){return e.onFunctionsReadOnlyPropChanged()})),this.eFilterTextField.setAutoComplete(!1).onValueChange((function(){return e.onFilterTextChanged()})),this.addManagedListener(this.eFilterTextField.getInputElement(),"keydown",this.onMiniFilterKeyDown.bind(this)),this.addManagedListener(this.eventService,n.zW2.EVENT_NEW_COLUMNS_LOADED,this.showOrHideOptions.bind(this));var t=this.localeService.getLocaleTextFunc();this.eSelect.setInputAriaLabel(t("ariaColumnSelectAll","Toggle Select All Columns")),this.eFilterTextField.setInputAriaLabel(t("ariaFilterColumnsInput","Filter Columns Input")),this.activateTabIndex([this.eExpand])},t.prototype.onFunctionsReadOnlyPropChanged=function(){var e=this.gridOptionsService.get("functionsReadOnly");this.eSelect.setReadOnly(e),this.eSelect.addOrRemoveCssClass("ag-column-select-column-readonly",e)},t.prototype.init=function(e){this.params=e;var t=this.gridOptionsService.get("functionsReadOnly");this.eSelect.setReadOnly(t),this.eSelect.addOrRemoveCssClass("ag-column-select-column-readonly",t),this.columnModel.isReady()&&this.showOrHideOptions()},t.prototype.createExpandIcons=function(){this.eExpand.appendChild(this.eExpandChecked=n._.createIconNoSpan("columnSelectOpen",this.gridOptionsService)),this.eExpand.appendChild(this.eExpandUnchecked=n._.createIconNoSpan("columnSelectClosed",this.gridOptionsService)),this.eExpand.appendChild(this.eExpandIndeterminate=n._.createIconNoSpan("columnSelectIndeterminate",this.gridOptionsService)),this.setExpandState(qe.EXPANDED)},t.prototype.showOrHideOptions=function(){var e=!this.params.suppressColumnFilter,t=!this.params.suppressColumnSelectAll,i=!this.params.suppressColumnExpandAll,o=this.columnModel.isPrimaryColumnGroupsPresent(),r=this.localeService.getLocaleTextFunc();this.eFilterTextField.setInputPlaceholder(r("searchOoo","Search...")),n._.setDisplayed(this.eFilterTextField.getGui(),e),n._.setDisplayed(this.eSelect.getGui(),t),n._.setDisplayed(this.eExpand,i&&o)},t.prototype.onFilterTextChanged=function(){var e=this;this.onFilterTextChangedDebounced||(this.onFilterTextChangedDebounced=n._.debounce((function(){var t=e.eFilterTextField.getValue();e.dispatchEvent({type:"filterChanged",filterText:t})}),t.DEBOUNCE_DELAY)),this.onFilterTextChangedDebounced()},t.prototype.onMiniFilterKeyDown=function(e){var i=this;e.key===n.VDZ.ENTER&&setTimeout((function(){return i.onSelectClicked()}),t.DEBOUNCE_DELAY)},t.prototype.onSelectClicked=function(){this.dispatchEvent({type:this.selectState?"unselectAll":"selectAll"})},t.prototype.onExpandClicked=function(){this.dispatchEvent({type:this.expandState===qe.EXPANDED?"collapseAll":"exp
18andAll"})},t.prototype.setExpandState=function(e){this.expandState=e,n._.setDisplayed(this.eExpandChecked,this.expandState===qe.EXPANDED),n._.setDisplayed(this.eExpandUnchecked,this.expandState===qe.COLLAPSED),n._.setDisplayed(this.eExpandIndeterminate,this.expandState===qe.INDETERMINATE)},t.prototype.setSelectionState=function(e){this.selectState=e,this.eSelect.setValue(this.selectState)},t.DEBOUNCE_DELAY=300,t.TEMPLATE='<div class="ag-column-select-header" role="presentation">\n            <div ref="eExpand" class="ag-column-select-header-icon"></div>\n            <ag-checkbox ref="eSelect" class="ag-column-select-header-checkbox"></ag-checkbox>\n            <ag-input-text-field class="ag-column-select-header-filter-wrapper" ref="eFilterTextField"></ag-input-text-field>\n        </div>',et([(0,n.fsG)("columnModel")],t.prototype,"columnModel",void 0),et([(0,n.cqo)("eExpand")],t.prototype,"eExpand",void 0),et([(0,n.cqo)("eSelect")],t.prototype,"eSelect",void 0),et([(0,n.cqo)("eFilterTextField")],t.prototype,"eFilterTextField",void 0),et([n.NqP],t.prototype,"postConstruct",null),t}(n.wA2),it=function(){function e(e,t,i,o,r){void 0===o&&(o=!1),this.eventService=new n.POd,this.displayName=e,this.dept=i,this.group=o,o?(this.columnGroup=t,this.expanded=r,this.children=[]):this.column=t}return e.prototype.isGroup=function(){return this.group},e.prototype.getDisplayName=function(){return this.displayName},e.prototype.getColumnGroup=function(){return this.columnGroup},e.prototype.getColumn=function(){return this.column},e.prototype.getDept=function(){return this.dept},e.prototype.isExpanded=function(){return!!this.expanded},e.prototype.getChildren=function(){return this.children},e.prototype.isPassesFilter=function(){return this.passesFilter},e.prototype.setExpanded=function(t){t!==this.expanded&&(this.expanded=t,this.eventService.dispatchEvent({type:e.EVENT_EXPANDED_CHANGED}))},e.prototype.setPassesFilter=function(e){this.passesFilter=e},e.prototype.addEventListener=function(e,t){this.eventService.addEventListener(e,t)},e.prototype.removeEventListener=function(e,t){this.eventService.removeEventListener(e,t)},e.EVENT_EXPANDED_CHANGED="expandedChanged",e}(),nt=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ot=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},rt=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},st=function(e,t,i){if(i||2===arguments.length)for(var n,o=0,r=t.length;o<r;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},at=function(e){var t="function"===typeof Symbol&&Symbol.iterator,i=t&&e[t],n=0;if(i)return i.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},lt=function(e){function t(t,i,n){var o=e.call(this,'<div class="ag-menu"></div>')||this;return o.column=t,o.mouseEvent=i,o.parentEl=n,o.displayName=null,o}return nt(t,e),t.prototype.postConstruct=function(){if(this.initializeProperties(this.column),this.buildMenuItemMap(),this.column instanceof n.sgG?this.displayName=this.columnModel.getDisplayNameForColumn(this.column,"columnToolPanel"):this.displayName=this.columnModel.getDisplayNameForProvidedColumnGroup(null,this.column,"columnToolPanel"),this.isActive()){this.mouseEvent.preventDefault();var e=this.getMappedMenuItems();if(0===e.length)return;this.displayContextMenu(e)}},t.prototype.initializeProperties=function(e){e instanceof n.KTm?this.columns=e.getLeafColumns():this.columns=[e],this.allowGrouping=this.columns.some((function(e){return e.isPrimary()&&e.isAllowRowGroup()})),this.allowValues=this.columns.some((function(e){return e.isPrimary()&&e.isAllowValue()})),this.allowPivoting=this.columnModel.isPivotMode()&&this.columns.some((function(e){return e.isPrimary()&&e.isAllowPivot()}))},t.prototype.buildMenuItemMap=function(){var e=this,t=this.localeService.getLocaleTextFunc();this.menuItemMap=new Map,this.menuItemMap.set("rowGroup",{allowedFunction:function(t){return t.isPrimary()&&t.isAllowRowGroup()&&
18!e.columnModel.isColumnGroupingLocked(t)},activeFunction:function(e){return e.isRowGroupActive()},activateLabel:function(){return"".concat(t("groupBy","Group by")," ").concat(e.displayName)},deactivateLabel:function(){return"".concat(t("ungroupBy","Un-Group by")," ").concat(e.displayName)},activateFunction:function(){var t=e.columnModel.getRowGroupColumns();e.columnModel.setRowGroupColumns(e.addColumnsToList(t),"toolPanelUi")},deActivateFunction:function(){var t=e.columnModel.getRowGroupColumns();e.columnModel.setRowGroupColumns(e.removeColumnsFromList(t),"toolPanelUi")},addIcon:"menuAddRowGroup",removeIcon:"menuRemoveRowGroup"}),this.menuItemMap.set("value",{allowedFunction:function(e){return e.isPrimary()&&e.isAllowValue()},activeFunction:function(e){return e.isValueActive()},activateLabel:function(){return t("addToValues","Add ".concat(e.displayName," to values"),[e.displayName])},deactivateLabel:function(){return t("removeFromValues","Remove ".concat(e.displayName," from values"),[e.displayName])},activateFunction:function(){var t=e.columnModel.getValueColumns();e.columnModel.setValueColumns(e.addColumnsToList(t),"toolPanelUi")},deActivateFunction:function(){var t=e.columnModel.getValueColumns();e.columnModel.setValueColumns(e.removeColumnsFromList(t),"toolPanelUi")},addIcon:"valuePanel",removeIcon:"valuePanel"}),this.menuItemMap.set("pivot",{allowedFunction:function(t){return e.columnModel.isPivotMode()&&t.isPrimary()&&t.isAllowPivot()},activeFunction:function(e){return e.isPivotActive()},activateLabel:function(){return t("addToLabels","Add ".concat(e.displayName," to labels"),[e.displayName])},deactivateLabel:function(){return t("removeFromLabels","Remove ".concat(e.displayName," from labels"),[e.displayName])},activateFunction:function(){var t=e.columnModel.getPivotColumns();e.columnModel.setPivotColumns(e.addColumnsToList(t),"toolPanelUi")},deActivateFunction:function(){var t=e.columnModel.getPivotColumns();e.columnModel.setPivotColumns(e.removeColumnsFromList(t),"toolPanelUi")},addIcon:"pivotPanel",removeIcon:"pivotPanel"})},t.prototype.addColumnsToList=function(e){return st([],rt(e),!1).concat(this.columns.filter((function(t){return-1===e.indexOf(t)})))},t.prototype.removeColumnsFromList=function(e){var t=this;return e.filter((function(e){return-1===t.columns.indexOf(e)}))},t.prototype.displayContextMenu=function(e){var t=this,i=this.getGui(),o=this.createBean(new n.O_3),r=this.localeService.getLocaleTextFunc(),s=function(){};i.appendChild(o.getGui()),o.addMenuItems(e),o.addManagedListener(o,n.sJC.EVENT_MENU_ITEM_SELECTED,(function(){t.parentEl.focus(),s()}));var a=this.popupService.addPopup({modal:!0,eChild:i,closeOnEsc:!0,afterGuiAttached:function(){return t.focusService.focusInto(o.getGui())},ariaLabel:r("ariaLabelContextMenu","Context Menu"),closedCallback:function(e){e instanceof KeyboardEvent&&t.parentEl.focus(),t.destroyBean(o)}});a&&(s=a.hideFunc),this.popupService.positionPopupUnderMouseEvent({type:"columnContextMenu",mouseEvent:this.mouseEvent,ePopup:i})},t.prototype.isActive=function(){return this.allowGrouping||this.allowValues||this.allowPivoting},t.prototype.getMappedMenuItems=function(){var e,t,i=[],o=function(e){var t=r.columns.some((function(t){return e.allowedFunction(t)&&!e.activeFunction(t)})),o=r.columns.some((function(t){return e.allowedFunction(t)&&e.activeFunction(t)}));t&&i.push({name:e.activateLabel(r.displayName),icon:n._.createIconNoSpan(e.addIcon,r.gridOptionsService,null),action:function(){return e.activateFunction()}}),o&&i.push({name:e.deactivateLabel(r.displayName),icon:n._.createIconNoSpan(e.removeIcon,r.gridOptionsService,null),action:function(){return e.deActivateFunction()}})},r=this;try{for(var s=at(this.menuItemMap.values()),a=s.next();!a.done;a=s.next()){var l=a.value;o(l)}}catch(c){e={error:c}}finally{try{a&&!a.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}return i},ot([(0,n.fsG)("columnModel")],t.prototype,"columnModel",void 0),ot([(0,n.fsG)("popupService")],t.prototype,"popupService",void 0),ot([(0,n.fsG)("focusService")],t.prototype,"focusService",void 0),ot([n.NqP],t.prototype,"postConstruct",null),t}(n.wA2),ct=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ut=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},dt=function(e){function t(t,i,n,o){var r=e.call(this)||this;return r.modelItem=t,r.allowDragging=i,r.eventType=n,r.focusWrapper=o,r.processingColumnStateChange=!1,r.modelItem=t,r.columnGroup=t.getColumnGroup(),r.columnDept=t.getDept(),r.displayName=t.getDisplayName(),r.allowDragging=i,r}return ct(t,e),t.prototype.init=function(){var e=this;this.setTemplate(t.TEMPLATE),this.eDragHandle=n._.createIconNoSpan("columnDrag",this.gridOptionsService),this.eDragHandle.classList.add("ag-drag-handle","ag-column-select-column-group-drag-handle");
18var i=this.cbSelect.getGui(),o=this.cbSelect.getInputElement();i.insertAdjacentElement("afterend",this.eDragHandle),o.setAttribute("tabindex","-1"),this.eLabel.innerHTML=this.displayName?this.displayName:"",this.setupExpandContract(),this.addCssClass("ag-column-select-indent-"+this.columnDept),this.addManagedListener(this.eventService,n.zW2.EVENT_COLUMN_PIVOT_MODE_CHANGED,this.onColumnStateChanged.bind(this)),this.addManagedListener(this.eLabel,"click",this.onLabelClicked.bind(this)),this.addManagedListener(this.cbSelect,n.zW2.EVENT_FIELD_VALUE_CHANGED,this.onCheckboxChanged.bind(this)),this.addManagedListener(this.modelItem,it.EVENT_EXPANDED_CHANGED,this.onExpandChanged.bind(this)),this.addManagedListener(this.focusWrapper,"keydown",this.handleKeyDown.bind(this)),this.addManagedListener(this.focusWrapper,"contextmenu",this.onContextMenu.bind(this)),this.setOpenClosedIcons(),this.setupDragging(),this.onColumnStateChanged(),this.addVisibilityListenersToAllChildren(),this.refreshAriaExpanded(),this.refreshAriaLabel(),this.setupTooltip();var r=n.fQL.getToolPanelClassesFromColDef(this.columnGroup.getColGroupDef(),this.gridOptionsService,null,this.columnGroup);r.forEach((function(t){return e.addOrRemoveCssClass(t,!0)}))},t.prototype.getColumns=function(){return this.columnGroup.getLeafColumns()},t.prototype.setupTooltip=function(){var e=this,t=this.columnGroup.getColGroupDef();if(t){var i=function(){var i=t.headerTooltip;e.setTooltip(i)};i(),this.addManagedListener(this.eventService,n.zW2.EVENT_NEW_COLUMNS_LOADED,i)}},t.prototype.getTooltipParams=function(){var t=e.prototype.getTooltipParams.call(this);return t.location="columnToolPanelColumnGroup",t},t.prototype.handleKeyDown=function(e){switch(e.key){case n.VDZ.LEFT:e.preventDefault(),this.modelItem.setExpanded(!1);break;case n.VDZ.RIGHT:e.preventDefault(),this.modelItem.setExpanded(!0);break;case n.VDZ.SPACE:e.preventDefault(),this.isSelectable()&&this.onSelectAllChanged(!this.isSelected());break}},t.prototype.onContextMenu=function(e){var t=this,i=this,n=i.columnGroup,o=i.gridOptionsService;if(!o.get("functionsReadOnly")){var r=this.createBean(new lt(n,e,this.focusWrapper));this.addDestroyFunc((function(){r.isAlive()&&t.destroyBean(r)}))}},t.prototype.addVisibilityListenersToAllChildren=function(){var e=this;this.columnGroup.getLeafColumns().forEach((function(t){e.addManagedListener(t,n.sgG.EVENT_VISIBLE_CHANGED,e.onColumnStateChanged.bind(e)),e.addManagedListener(t,n.sgG.EVENT_VALUE_CHANGED,e.onColumnStateChanged.bind(e)),e.addManagedListener(t,n.sgG.EVENT_PIVOT_CHANGED,e.onColumnStateChanged.bind(e)),e.addManagedListener(t,n.sgG.EVENT_ROW_GROUP_CHANGED,e.onColumnStateChanged.bind(e))}))},t.prototype.setupDragging=function(){var e=this;if(this.allowDragging){var t=!this.gridOptionsService.get("suppressDragLeaveHidesColumns"),i={type:n.rvo.ToolPanel,eElement:this.eDragHandle,dragItemName:this.displayName,getDefaultIconName:function(){return t?n.jUB.ICON_HIDE:n.jUB.ICON_NOT_ALLOWED},getDragItem:function(){return e.createDragItem()},onDragStarted:function(){t=!e.gridOptionsService.get("suppressDragLeaveHidesColumns");var i={type:n.zW2.EVENT_COLUMN_PANEL_ITEM_DRAG_START,column:e.columnGroup};e.eventService.dispatchEvent(i)},onDragStopped:function(){var t={type:n.zW2.EVENT_COLUMN_PANEL_ITEM_DRAG_END};e.eventService.dispatchEvent(t)},onGridEnter:function(i){t&&e.modelItemUtils.updateColumns({columns:e.columnGroup.getLeafColumns(),visibleState:null===i||void 0===i?void 0:i.visibleState,pivotState:null===i||void 0===i?void 0:i.pivotState,eventType:e.eventType})},onGridExit:function(){t&&e.onChangeCommon(!1)}};this.dragAndDropService.addDragSource(i,!0),this.addDestroyFunc((function(){return e.dragAndDropService.removeDragSource(i)}))}else n._.setDisplayed(this.eDragHandle,!1)},t.prototype.createDragItem=function(){var e=this,t=this.columnGroup.getLeafColumns(),i={},n={};return t.forEach((function(t){var o=t.getId();i[o]=t.isVisible(),n[o]=e.modelItemUtils.createPivotState(t)})),{columns:t,visibleState:i,pivotState:n}},t.prototype.setupExpandContract=function(){this.eGroupClosedIcon.appendChild(n._.createIcon("columnSelectClosed",this.gridOptionsService,null)),this.eGroupOpenedIcon.appendChild(n._.createIcon("columnSelectOpen",this.gridOptionsService,null)),this.addManagedListener(this.eGroupClosedIcon,"click",this.onExpandOrContractClicked.bind(this)),this.addManagedListener(this.eGroupOpenedIcon,"click",this.onExpandOrContractClicked.bind(this));var e=new n.rwP(this.eColumnGroupIcons,!0);this.addManagedListener(e,n.rwP.EVENT_TAP,this.onExpandOrContractClicked.bind(this)),this.addDestroyFunc(e.destroy.bind(e))},t.prototype.onLabelClicked=function(){var e=!this.cbSelect.getValue();this.onChangeCommon(e)},t.prototype.onCheckboxChanged=function(e){this.onChangeCommon(e.selected)},t.prototype.getVisibleLeafColumns=function(){var e=[],t=function(i){i.forEac
18h((function(i){i.isPassesFilter()&&(i.isGroup()?t(i.getChildren()):e.push(i.getColumn()))}))};return t(this.modelItem.getChildren()),e},t.prototype.onChangeCommon=function(e){this.refreshAriaLabel(),this.processingColumnStateChange||this.modelItemUtils.selectAllChildren(this.modelItem.getChildren(),e,this.eventType)},t.prototype.refreshAriaLabel=function(){var e=this.localeService.getLocaleTextFunc(),t=e("ariaColumnGroup","Column Group"),i=this.cbSelect.getValue(),o=void 0===i?e("ariaIndeterminate","indeterminate"):i?e("ariaVisible","visible"):e("ariaHidden","hidden"),r=e("ariaToggleVisibility","Press SPACE to toggle visibility");n._.setAriaLabel(this.focusWrapper,"".concat(this.displayName," ").concat(t)),this.cbSelect.setInputAriaLabel("".concat(r," (").concat(o,")")),n._.setAriaDescribedBy(this.focusWrapper,this.cbSelect.getInputElement().id)},t.prototype.onColumnStateChanged=function(){var 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},t.prototype.workOutSelectedValue=function(){var e=this,t=this.columnModel.isPivotMode(),i=this.getVisibleLeafColumns(),n=0,o=0;if(i.forEach((function(i){!t&&i.getColDef().lockVisible||(e.isColumnChecked(i,t)?n++:o++)})),!(n>0&&o>0))return n>0},t.prototype.workOutReadOnlyValue=function(){var e=this.columnModel.isPivotMode(),t=0;return this.columnGroup.getLeafColumns().forEach((function(i){e?i.isAnyFunctionAllowed()&&t++:i.getColDef().lockVisible||t++})),0===t},t.prototype.isColumnChecked=function(e,t){if(t){var i=e.isPivotActive(),n=e.isRowGroupActive(),o=e.isValueActive();return i||n||o}return e.isVisible()},t.prototype.onExpandOrContractClicked=function(){var e=this.modelItem.isExpanded();this.modelItem.setExpanded(!e)},t.prototype.onExpandChanged=function(){this.setOpenClosedIcons(),this.refreshAriaExpanded()},t.prototype.setOpenClosedIcons=function(){var e=this.modelItem.isExpanded();n._.setDisplayed(this.eGroupClosedIcon,!e),n._.setDisplayed(this.eGroupOpenedIcon,e)},t.prototype.refreshAriaExpanded=function(){n._.setAriaExpanded(this.focusWrapper,this.modelItem.isExpanded())},t.prototype.getDisplayName=function(){return this.displayName},t.prototype.onSelectAllChanged=function(e){var t=this.cbSelect.getValue(),i=this.cbSelect.isReadOnly();!i&&(e&&!t||!e&&t)&&this.cbSelect.toggle()},t.prototype.isSelected=function(){return this.cbSelect.getValue()},t.prototype.isSelectable=function(){return!this.cbSelect.isReadOnly()},t.prototype.setSelected=function(e){this.cbSelect.setValue(e,!0)},t.TEMPLATE='<div class="ag-column-select-column-group" aria-hidden="true">\n            <span class="ag-column-group-icons" ref="eColumnGroupIcons" >\n                <span class="ag-column-group-closed-icon" ref="eGroupClosedIcon"></span>\n                <span class="ag-column-group-opened-icon" ref="eGroupOpenedIcon"></span>\n            </span>\n            <ag-checkbox ref="cbSelect" class="ag-column-select-checkbox"></ag-checkbox>\n            <span class="ag-column-select-column-label" ref="eLabel"></span>\n        </div>',ut([(0,n.fsG)("columnModel")],t.prototype,"columnModel",void 0),ut([(0,n.fsG)("dragAndDropService")],t.prototype,"dragAndDropService",void 0),ut([(0,n.fsG)("modelItemUtils")],t.prototype,"modelItemUtils",void 0),ut([(0,n.cqo)("cbSelect")],t.prototype,"cbSelect",void 0),ut([(0,n.cqo)("eLabel")],t.prototype,"eLabel",void 0),ut([(0,n.cqo)("eGroupOpenedIcon")],t.prototype,"eGroupOpenedIcon",void 0),ut([(0,n.cqo)("eGroupClosedIcon")],t.prototype,"eGroupClosedIcon",void 0),ut([(0,n.cqo)("eColumnGroupIcons")],t.prototype,"eColumnGroupIcons",void 0),ut([n.NqP],t.prototype,"init",null),t}(n.wA2),pt=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ht=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},ft=function(e){function t(t,i){var n=e.call(this)||this;return n.comp=t,n.virtualList=i,n}return pt(t,e),t.prototype.postConstruct=function(){var e=this;this.createManagedBean(new n.x$5(this.comp,this.virtualList,{dragSourceType:n.rvo.ToolPanel,listItemDragStartEvent:n.zW2.EVENT_COLUMN_PANEL_ITEM_DRAG_START,listItemDragEndEvent:n.zW2.EVENT_COLUMN_PANEL_ITEM_DRAG_END,eventSource:this.eventService,getCurrentDragValue:function(t){return e.getCurrentDragValue(t)},isMoveBlocked:function(t){return e.isMoveBlocked(t)},getNumRows:function(e){return e.getDisplayedColsList().length},moveItem:function(t,i){return e.moveItem(t,i)}}))},t.prototype.getCurrentDragValue=function(e){return e.column},t.prototype.isMoveBlocked=function(e){var t=this.gridOptionsService.get("suppressMovableColumns");if(t)return!0;var i=this.getCurrentColumns(e),n=i.find((function(e){var t=e.getColDef();return!!t.suppressMovable||!!t.lockPosition}));return!!n},t.prototype.moveItem=function(e,t){var i=this.getTargetIndex(e,t),n=this.getCurrentColumns(e);null!=i&&this.columnModel.moveColumns(n,i,"toolPanelUi")},t.prototype.getMoveDiff=function(e,t){var i=this.columnModel.getAllGridColumns(),n=this.getCurrentColumns(e),o=n[0],r=n.length,s=i.indexOf(o);return s<t?r:0},t.prototype.getCurrentColumns=function(e){return e instanceof n.KTm?e.getLeafColumns():[e]},t.prototype.getTargetIndex=function(e,t){if(!t)return null;var i,n=t.component,o="top"===t.position;if(n instanceof dt){var r=n.getColumns();i=r[0],o=!0}else i=n.getColumn();var s=this.getCurrentColumns(e);if(-1!==s.indexOf(i))return null;var a=this.columnModel.getAllGridColumns().indexOf(i),l=o?a:a+1,c=this.getMoveDiff(e,l);return l-c},ht([(0,n.fsG)("columnModel")],t.prototype,"columnModel",void 0),ht([(0,n.fsG)("gridOptionsService")],t.prototype,"gridOptionsService",void 0),ht([n.NqP],t.prototype,"postConstruct",null),t}(n.AS9),gt=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),vt=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},yt=function(e){function t(t,i,n,o){var r=e.call(this)||this;return r.allowDragging=i,r.groupsExist=n,r.focusWrapper=o,r.processingColumnStateChange=!1,r.column=t.getColumn(),r.columnDept=t.getDept(),r.displayName=t.getDisplayName(),r}return gt(t,e),t.prototype.init=function(){var e=this;this.setTemplate(t.TEMPLATE),this.eDragHandle=n._.createIconNoSpan("columnDrag",this.gridOptionsService),this.eDragHandle.classList.add("ag-drag-handle","ag-column-select-column-drag-handle");
18var i=this.cbSelect.getGui(),o=this.cbSelect.getInputElement();i.insertAdjacentElement("afterend",this.eDragHandle),o.setAttribute("tabindex","-1");var r=n._.escapeString(this.displayName);this.eLabel.innerHTML=r;var s=this.columnDept;this.groupsExist&&this.addCssClass("ag-column-select-add-group-indent"),this.addCssClass("ag-column-select-indent-".concat(s)),this.setupDragging(),this.addManagedListener(this.eventService,n.zW2.EVENT_COLUMN_PIVOT_MODE_CHANGED,this.onColumnStateChanged.bind(this)),this.addManagedListener(this.column,n.sgG.EVENT_VALUE_CHANGED,this.onColumnStateChanged.bind(this)),this.addManagedListener(this.column,n.sgG.EVENT_PIVOT_CHANGED,this.onColumnStateChanged.bind(this)),this.addManagedListener(this.column,n.sgG.EVENT_ROW_GROUP_CHANGED,this.onColumnStateChanged.bind(this)),this.addManagedListener(this.column,n.sgG.EVENT_VISIBLE_CHANGED,this.onColumnStateChanged.bind(this)),this.addManagedListener(this.focusWrapper,"keydown",this.handleKeyDown.bind(this)),this.addManagedListener(this.focusWrapper,"contextmenu",this.onContextMenu.bind(this)),this.addManagedPropertyListener("functionsReadOnly",this.onColumnStateChanged.bind(this)),this.addManagedListener(this.cbSelect,n.zW2.EVENT_FIELD_VALUE_CHANGED,this.onCheckboxChanged.bind(this)),this.addManagedListener(this.eLabel,"click",this.onLabelClicked.bind(this)),this.onColumnStateChanged(),this.refreshAriaLabel(),this.setupTooltip();var a=n.fQL.getToolPanelClassesFromColDef(this.column.getColDef(),this.gridOptionsService,this.column,null);a.forEach((function(t){return e.addOrRemoveCssClass(t,!0)}))},t.prototype.getColumn=function(){return this.column},t.prototype.setupTooltip=function(){var e=this,t=function(){var t=e.column.getColDef().headerTooltip;e.setTooltip(t)};t(),this.addManagedListener(this.eventService,n.zW2.EVENT_NEW_COLUMNS_LOADED,t)},t.prototype.getTooltipParams=function(){var t=e.prototype.getTooltipParams.call(this);return t.location="columnToolPanelColumn",t.colDef=this.column.getColDef(),t},t.prototype.onContextMenu=function(e){var t=this,i=this,n=i.column,o=i.gridOptionsService;if(!o.get("functionsReadOnly")){var r=this.createBean(new lt(n,e,this.focusWrapper));this.addDestroyFunc((function(){r.isAlive()&&t.destroyBean(r)}))}},t.prototype.handleKeyDown=function(e){e.key===n.VDZ.SPACE&&(e.preventDefault(),this.isSelectable()&&this.onSelectAllChanged(!this.isSelected()))},t.prototype.onLabelClicked=function(){if(!this.gridOptionsService.get("functionsReadOnly")){var e=!this.cbSelect.getValue();this.onChangeCommon(e)}},t.prototype.onCheckboxChanged=function(e){this.onChangeCommon(e.selected)},t.prototype.onChangeCommon=function(e){this.cbSelect.isReadOnly()||(this.refreshAriaLabel(),this.processingColumnStateChange||this.modelItemUtils.setColumn(this.column,e,"toolPanelUi"))},t.prototype.refreshAriaLabel=function(){var e=this.localeService.getLocaleTextFunc(),t=e("ariaColumn","Column"),i=this.cbSelect.getValue()?e("ariaVisible","visible"):e("ariaHidden","hidden"),o=e("ariaToggleVisibility","Press SPACE to toggle visibility");n._.setAriaLabel(this.focusWrapper,"".concat(this.displayName," ").concat(t)),this.cbSelect.setInputAriaLabel("".concat(o," (").concat(i,")")),n._.setAriaDescribedBy(this.focusWrapper,this.cbSelect.getInputElement().id)},t.prototype.setupDragging=function(){var e=this;if(this.allowDragging){var t=!this.gridOptionsService.get("suppressDragLeaveHidesColumns"),i={type:n.rvo.ToolPanel,eElement:this.eDragHandle,dragItemName:this.displayName,getDefaultIconName:function(){return t?n.jUB.ICON_HIDE:n.jUB.ICON_NOT_ALLOWED},getDragItem:function(){return e.createDragItem()},onDragStarted:function(){t=!e.gridOptionsService.get("suppressDragLeaveHidesColumns");var i={type:n.zW2.EVENT_COLUMN_PANEL_ITEM_DRAG_START,column:e.column};e.eventService.dispatchEvent(i)},onDragStopped:function(){var t={type:n.zW2.EVENT_COLUMN_PANEL_ITEM_DRAG_END};e.eventService.dispatchEvent(t)},onGridEnter:function(i){t&&e.modelItemUtils.updateColumns({columns:[e.column],visibleState:null===i||void 0===i?void 0:i.visibleState,pivotState:null===i||void 0===i?void 0:i.pivotState,eventType:"toolPanelUi"})}
18,onGridExit:function(){t&&e.onChangeCommon(!1)}};this.dragAndDropService.addDragSource(i,!0),this.addDestroyFunc((function(){return e.dragAndDropService.removeDragSource(i)}))}else n._.setDisplayed(this.eDragHandle,!1)},t.prototype.createDragItem=function(){var e,t,i=this.column.getColId(),n=(e={},e[i]=this.column.isVisible(),e),o=(t={},t[i]=this.modelItemUtils.createPivotState(this.column),t);return{columns:[this.column],visibleState:n,pivotState:o}},t.prototype.onColumnStateChanged=function(){this.processingColumnStateChange=!0;var e=this.columnModel.isPivotMode();if(e){var t=this.column.isAnyFunctionActive();this.cbSelect.setValue(t)}else this.cbSelect.setValue(this.column.isVisible());var i=!0,n=!0;if(e){var o=this.gridOptionsService.get("functionsReadOnly"),r=!this.column.isAnyFunctionAllowed();i=!o&&!r,n=i}else{var s=this.column.getColDef(),a=s.enableRowGroup,l=s.enableValue,c=s.lockPosition,u=s.suppressMovable,d=s.lockVisible,p=!!a||!!l,h=!!c||!!u;i=!d,n=p||!h}this.cbSelect.setReadOnly(!i),this.eDragHandle.classList.toggle("ag-column-select-column-readonly",!n),this.addOrRemoveCssClass("ag-column-select-column-readonly",!n&&!i);var f=e&&this.gridOptionsService.get("functionsPassive");this.cbSelect.setPassive(f),this.processingColumnStateChange=!1},t.prototype.getDisplayName=function(){return this.displayName},t.prototype.onSelectAllChanged=function(e){e!==this.cbSelect.getValue()&&(this.cbSelect.isReadOnly()||this.cbSelect.toggle())},t.prototype.isSelected=function(){return this.cbSelect.getValue()},t.prototype.isSelectable=function(){return!this.cbSelect.isReadOnly()},t.prototype.isExpandable=function(){return!1},t.prototype.setExpanded=function(e){console.warn("AG Grid: can not expand a column item that does not represent a column group header")},t.TEMPLATE='<div class="ag-column-select-column" aria-hidden="true">\n            <ag-checkbox ref="cbSelect" class="ag-column-select-checkbox"></ag-checkbox>\n            <span class="ag-column-select-column-label" ref="eLabel"></span>\n        </div>',vt([(0,n.fsG)("columnModel")],t.prototype,"columnModel",void 0),vt([(0,n.fsG)("dragAndDropService")],t.prototype,"dragAndDropService",void 0),vt([(0,n.fsG)("modelItemUtils")],t.prototype,"modelItemUtils",void 0),vt([(0,n.cqo)("eLabel")],t.prototype,"eLabel",void 0),vt([(0,n.cqo)("cbSelect")],t.prototype,"cbSelect",void 0),vt([n.NqP],t.prototype,"init",null),t}(n.wA2),mt=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ct=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},bt=function(){function e(e){this.items=e}return e.prototype.getRowCount=function(){return this.items.length},e.prototype.getRow=function(e){return this.items[e]},e}(),wt="ag-column-select-list",St=function(e){function t(){var i=e.call(this,t.TEMPLATE)||this;return i.destroyColumnItemFuncs=[],i.hasLoadedInitialState=!1,i.isInitialState=!1,i}return mt(t,e),t.prototype.destroyColumnTree=function(){this.allColsTree=[],this.destroyColumnItemFuncs.forEach((function(e){return e()})),this.destroyColumnItemFuncs=[]},t.prototype.init=function(e,t,i){var o=this;this.params=e,this.allowDragging=t,this.eventType=i,this.params.suppressSyncLayoutWithGrid||this.addManagedListener(this.eventService,n.zW2.EVENT_COLUMN_MOVED,this.onColumnsChanged.bind(this)),this.addManagedListener(this.eventService,n.zW2.EVENT_NEW_COLUMNS_LOADED,this.onColumnsChanged.bind(this));var r=[n.zW2.EVENT_COLUMN_PIVOT_CHANGED,n.zW2.EVENT_COLUMN_PIVOT_MODE_CHANGED,n.zW2.EVENT_COLUMN_ROW_GROUP_CHANGED,n.zW2.EVENT_COLUMN_VALUE_CHANGED,n.zW2.EVENT_COLUMN_VISIBLE,n.zW2.EVENT_NEW_COLUMNS_LOADED];r.forEach((function(e){o.addManagedListener(o.eventService,e,o.fireSelectionChangedEvent.bind(o))})),this.expandGroupsByDefault=!this.params.contractColumnSelection,this.virtualList=this.createManagedBean(new n.CPJ({cssIdentifier:"column-select",ariaRole:"tree"})),this.appendChild(this.virtualList.getGui());var s=this.virtualList.getAriaElement();n._.setAriaLive(s,"assertive"),n._.setAriaAtomic(s,!1),n._.setAriaRelevant(s,"text"),this.virtualList.setComponentCreator((function(e,t){return n._.setAriaLevel(t,e.getDept()+1),o.createComponentFromItem(e,t)})),this.columnModel.isReady()&&this.onColumnsChanged(),this.params.suppressColumnMove||(this.colsListPanelItemDragFeature=this.createManagedBean(new ft(this,this.virtualList)))},t.prototype.createComponentFromItem=function(e,t){if(e.isGroup()){var i=new dt(e,this.allowDragging,this.eventType,t);return this.getContext().createBean(i),i}var n=new yt(e,this.allowDragging,this.groupsExist,t);return this.getContext().createBean(n),n},t.prototype.onColumnsChanged=function(){this.hasLoadedInitialState||(this.hasLoadedInitialState=!0,this.isInitialState=!!this.params.initialState);var e=this.getExpandedStates(),t=this.columnModel.isPivotMode(),i=!this.params.suppressSyncLayoutWithGri
18d&&!t;i?this.buildTreeFromWhatGridIsDisplaying():this.buildTreeFromProvidedColumnDefs(),this.setExpandedStates(e),this.markFilteredColumns(),this.flattenAndFilterModel(),this.isInitialState=!1},t.prototype.getDisplayedColsList=function(){return this.displayedColsList},t.prototype.getExpandedStates=function(){var e={};if(this.isInitialState){var t=this.params.initialState.expandedGroupIds;return t.forEach((function(t){e[t]=!0})),e}return this.allColsTree?(this.forEachItem((function(t){if(t.isGroup()){var i=t.getColumnGroup();i&&(e[i.getId()]=t.isExpanded())}})),e):{}},t.prototype.setExpandedStates=function(e){if(this.allColsTree){var t=this.isInitialState;this.forEachItem((function(i){if(i.isGroup()){var n=i.getColumnGroup();if(n){var o=e[n.getId()],r=null!=o;(r||t)&&i.setExpanded(!!o)}}}))}},t.prototype.buildTreeFromWhatGridIsDisplaying=function(){this.colDefService.syncLayoutWithGrid(this.setColumnLayout.bind(this))},t.prototype.setColumnLayout=function(e){var t=this.colDefService.createColumnTree(e);this.buildListModel(t),this.groupsExist=e.some((function(e){return e&&"undefined"!==typeof e.children})),this.markFilteredColumns(),this.flattenAndFilterModel()},t.prototype.buildTreeFromProvidedColumnDefs=function(){this.buildListModel(this.columnModel.getPrimaryColumnTree()),this.groupsExist=this.columnModel.isPrimaryColumnGroupsPresent()},t.prototype.buildListModel=function(e){var t=this,i=this.onColumnExpanded.bind(this),o=function(e){e.addEventListener(it.EVENT_EXPANDED_CHANGED,i);var n=e.removeEventListener.bind(e,it.EVENT_EXPANDED_CHANGED,i);t.destroyColumnItemFuncs.push(n)},r=function(e,t,i){e.forEach((function(e){e instanceof n.KTm?s(e,t,i):a(e,t,i)}))},s=function(e,i,n){var s=e.getColGroupDef(),a=s&&s.suppressColumnsToolPanel;if(!a)if(e.isPadding())r(e.getChildren(),i,n);else{var l=t.columnModel.getDisplayNameForProvidedColumnGroup(null,e,"columnToolPanel"),c=new it(l,e,i,!0,t.expandGroupsByDefault);n.push(c),o(c),r(e.getChildren(),i+1,c.getChildren())}},a=function(e,i,n){var o=e.getColDef()&&e.getColDef().suppressColumnsToolPanel;if(!o){var r=t.columnModel.getDisplayNameForColumn(e,"columnToolPanel");n.push(new it(r,e,i))}};this.destroyColumnTree(),r(e,0,this.allColsTree)},t.prototype.onColumnExpanded=function(){this.flattenAndFilterModel()},t.prototype.flattenAndFilterModel=function(){var e=this;this.displayedColsList=[];var t=function(i){i.isPassesFilter()&&(e.displayedColsList.push(i),i.isGroup()&&i.isExpanded()&&i.getChildren().forEac
18h(t))};this.allColsTree.forEach(t),this.virtualList.setModel(new bt(this.displayedColsList));var i=this.virtualList.getLastFocusedRow();this.virtualList.refresh(),null!=i&&this.focusRowIfAlive(i),this.notifyListeners(),this.refreshAriaLabel()},t.prototype.refreshAriaLabel=function(){var e=this.localeService.getLocaleTextFunc(),t=e("ariaColumnPanelList","Column List"),i=e("columns","Columns"),o=this.displayedColsList.length;n._.setAriaLabel(this.virtualList.getAriaElement(),"".concat(t," ").concat(o," ").concat(i))},t.prototype.focusRowIfAlive=function(e){var t=this;window.setTimeout((function(){t.isAlive()&&t.virtualList.focusRow(e)}),0)},t.prototype.forEachItem=function(e){var t=function(i){i.forEach((function(i){e(i),i.isGroup()&&t(i.getChildren())}))};t(this.allColsTree)},t.prototype.doSetExpandedAll=function(e){this.forEachItem((function(t){t.isGroup()&&t.setExpanded(e)}))},t.prototype.setGroupsExpanded=function(e,t){if(t){var i=[];this.forEachItem((function(n){if(n.isGroup()){var o=n.getColumnGroup().getId();t.indexOf(o)>=0&&(n.setExpanded(e),i.push(o))}}));var o=t.filter((function(e){return!n._.includes(i,e)}));o.length>0&&console.warn("AG Grid: unable to find group(s) for supplied groupIds:",o)}else this.doSetExpandedAll(e)},t.prototype.getExpandState=function(){var e=0,t=0;return this.forEachItem((function(i){i.isGroup()&&(i.isExpanded()?e++:t++)})),e>0&&t>0?qe.INDETERMINATE:t>0?qe.COLLAPSED:qe.EXPANDED},t.prototype.doSetSelectedAll=function(e){this.modelItemUtils.selectAllChildren(this.allColsTree,e,this.eventType)},t.prototype.getSelectionState=function(){var e=0,t=0,i=this.columnModel.isPivotMode();if(this.forEachItem((function(n){if(!n.isGroup()&&n.isPassesFilter()){var o,r=n.getColumn(),s=r.getColDef();
18if(i){var a=!r.isAllowPivot()&&!r.isAllowRowGroup()&&!r.isAllowValue();if(a)return;o=r.isValueActive()||r.isPivotActive()||r.isRowGroupActive()}else{if(s.lockVisible)return;o=r.isVisible()}o?e++:t++}})),!(e>0&&t>0))return!(0===e||t>0)},t.prototype.setFilterText=function(e){this.filterText=n._.exists(e)?e.toLowerCase():null,this.markFilteredColumns(),this.flattenAndFilterModel()},t.prototype.markFilteredColumns=function(){var e=this,t=function(t){if(!n._.exists(e.filterText))return!0;var i=t.getDisplayName();return null==i||-1!==i.toLowerCase().indexOf(e.filterText)},i=function(e,n){var o=!1;if(e.isGroup()){var r=t(e);e.getChildren().forEach((function(e){var t=i(e,r||n);t&&(o=t)}))}var s=!(!n&&!o)||t(e);return e.setPassesFilter(s),s};this.allColsTree.forEach((function(e){return i(e,!1)}))},t.prototype.notifyListeners=function(){this.fireGroupExpandedEvent(),this.fireSelectionChangedEvent()},t.prototype.fireGroupExpandedEvent=function(){var e=this.getExpandState();this.dispatchEvent({type:"groupExpanded",state:e})},t.prototype.fireSelectionChangedEvent=function(){if(this.allColsTree){var e=this.getSelectionState();this.dispatchEvent({type:"selectionChanged",state:e})}},t.prototype.getExpandedGroups=function(){var e=[];return this.allColsTree?(this.forEachItem((function(t){t.isGroup()&&t.isExpanded()&&e.push(t.getColumnGroup().getId())})),e):e},t.TEMPLATE='<div class="'.concat(wt,'" role="presentation"></div>'),Ct([(0,n.fsG)("columnModel")],t.prototype,"columnModel",void 0),Ct([(0,n.fsG)("toolPanelColDefService")],t.prototype,"colDefService",void 0),Ct([(0,n.fsG)("modelItemUtils")],t.prototype,"modelItemUtils",void 0),Ct([n.FXL],t.prototype,"destroyColumnTree",null),t}(n.wA2),Et=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),xt=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Ot=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Et(t,e),t.prototype.createTemplate=function(){return'<div class="ag-pivot-mode-panel">\n                <ag-toggle-button ref="cbPivotMode" class="ag-pivot-mode-select"></ag-toggle-button>\n            </div>'},t.prototype.init=function(){this.setTemplate(this.createTemplate()),this.cbPivotMode.setValue(this.columnModel.isPivotMode());var e=this.localeService.getLocaleTextFunc();this.cbPivotMode.setLabel(e("pivotMode","Pivot Mode")),this.addManagedListener(this.cbPivotMode,n.zW2.EVENT_FIELD_VALUE_CHANGED,this.onBtPivotMode.bind(this)),this.addManagedListener(this.eventService,n.zW2.EVENT_NEW_COLUMNS_LOADED,this.onPivotModeChanged.bind(this)),this.addManagedListener(this.eventService,n.zW2.EVENT_COLUMN_PIVOT_MODE_CHANGED,this.onPivotModeChanged.bind(this))},t.prototype.onBtPivotMode=function(){var e=!!this.cbPivotMode.getValue();if(e!==this.columnModel.isPivotMode()){this.columnModel.setPivotMode(e,"toolPanelUi");var t=this.gridOptionsService.api;t&&t.refreshHeader()}},t.prototype.onPivotModeChanged=function(){var e=this.columnModel.isPivotMode();this.cbPivotMode.setValue(e)},xt([(0,n.fsG)("columnModel")],t.prototype,"columnModel",void 0),xt([(0,n.cqo)("cbPivotMode")],t.prototype,"cbPivotMode",void 0),xt([n.$j7],t.prototype,"init",null),t}(n.wA2),Tt=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Dt=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Rt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Tt(t,e),t.prototype.execute=function(e){var t=n._.missingOrEmpty(this.columnModel.getValueColumns()),i=!this.gridOptionsService.getCallback("getGroupRowAgg"),o=e.changedPath&&e.changedPath.isActive();if(!(t&&i&&o)){var r=this.createAggDetails(e);this.recursivelyCreateAggData(r)}},t.prototype.createAggDetails=function(e){var t=this.columnModel.isPivotActive(),i=this.columnModel.getValueColumns(),n=t?this.columnModel.getPivotColumns():[],o={alwaysAggregateAtRootLevel:this.gridOptionsService.get("alwaysAggregateAtRootLevel"),groupIncludeTotalFooter:this.gridOptionsService.get("groupIncludeTotalFooter"),changedPath:e.changedPath,valueColumns:i,pivotColumns:n,filteredOnly:!this.isSuppressAggFilteredOnly(),userAggFunc:this.gridOptionsService.getCallback("getGroupRowAgg")};return o},t.prototype.isSuppressAggFilteredOnly=function(){var e=void 0!==this.gridOptionsService.getGroupAggFiltering();return e||this.gridOptionsService.get("suppressAggFilteredOnly")},t.prototype.recursivelyCreateAggData=function(e){var t=this,i=function(i){var n=!i.hasChildren();if(n)i.aggData&&i.setAggData(null);else{var o=-1===i.level;if(o&&!e.groupIncludeTotalFooter){var r=!t.columnModel.isPivotMode();if(!e.alwaysAggregateAtRootLevel&&r)return void i.setAggData(null)}t.aggregateRowNode(i,e)}};e.changedPath.forEachChangedNodeDepthFirst(i,!0)},t.prototype.aggregateRowNode=function(e,t){var i,n=0===t.valueColumns.length,o=0===t.pivotColumns.length;i=t.userAggFunc?t.userAggFunc({nodes:e.childrenAfterFilter}):n?null:o?this.aggregateRowNodeUsingValuesOnly(e,t):this.aggregateRowNodeUsingValuesAndPivot(e),e.setAggData(i),e.sibling&&e.sibling.setAggData(i)},t.prototype.aggregateRowNodeUsingValuesAndPivot=function(e){var t,i=this,o={},r=null!==(t=this.columnModel.getSecondaryColumns())&&void 0!==t?t:[];return r.forEach((function(t){var r=t.getColDef(),s=r.pivotValueColumn,a=r.pivotTotalColumnIds,l=r.colId,c=r.pivotKeys;
18if(!n._.exists(a)){var u,d=null!==c&&void 0!==c?c:[];u=e.leafGroup?i.getValuesFromMappedSet(e.childrenMapped,d,s):i.getValuesPivotNonLeaf(e,l),o[l]=i.aggregateValues(u,s.getAggFunc(),s,e,t)}})),r.forEach((function(t){var r=t.getColDef(),s=r.pivotValueColumn,a=r.pivotTotalColumnIds,l=r.colId;if(n._.exists(a)){var c=[];a&&a.length&&(a.forEach((function(e){c.push(o[e])})),o[l]=i.aggregateValues(c,s.getAggFunc(),s,e,t))}})),o},t.prototype.aggregateRowNodeUsingValuesOnly=function(e,t){var i=this,n={},o=t.changedPath.isActive()?t.changedPath.getValueColumnsForNode(e,t.valueColumns):t.valueColumns,r=t.changedPath.isActive()?t.changedPath.getNotValueColumnsForNode(e,t.valueColumns):null,s=this.getValuesNormal(e,o,t.filteredOnly),a=e.aggData;return o.forEach((function(t,o){n[t.getId()]=i.aggregateValues(s[o],t.getAggFunc(),t,e)})),r&&a&&r.forEach((function(e){n[e.getId()]=a[e.getId()]})),n},t.prototype.getValuesPivotNonLeaf=function(e,t){var i=[];return e.childrenAfterFilter.forEach((function(e){var n=e.aggData[t];i.push(n)})),i},t.prototype.getValuesFromMappedSet=function(e,t,i){var n=this,o=e;if(t.forEach((function(e){return o=o?o[e]:null})),!o)return[];var r=[];return o.forEach((function(e){var t=n.valueService.getValue(i,e);r.push(t)})),r},t.prototype.getValuesNormal=function(e,t,i){var n=[];t.forEach((function(){return n.push([])}));for(var o=t.length,r=i?e.childrenAfterFilter:e.childrenAfterGroup,s=r.length,a=0;a<s;a++)for(var l=r[a],c=0;c<o;c++){var u=t[c],d=this.valueService.getValue(u,l);n[c].push(d)}return n},t.prototype.aggregateValues=function(e,t,i,n,o){var r="string"===typeof t?this.aggFuncService.getAggFunc(t):t;if("function"!==typeof r)return console.error("AG Grid: unrecognised aggregation function ".concat(t)),null;var s=r,a={values:e,column:i,colDef:i?i.getColDef():void 0,pivotResultColumn:o,rowNode:n,data:n?n.data:void 0,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context};return s(a)},Dt([(0,n.fsG)("columnModel")],t.prototype,"columnModel",void 0),Dt([(0,n.fsG)("valueService")],t.prototype,"valueService",void 0),Dt([(0,n.fsG)("aggFuncService")],t.prototype,"aggFuncService",void 0),t=Dt([(0,n.Vu6)("aggregationStage")],t),t}(n.AS9),At=function(){function e(){this.allSets={},this.allParents=[]}return e.prototype.removeFromChildrenAfterGroup=function(e,t){var i=this.getSet(e);i.removeFromChildrenAfterGroup[t.id]=!0},e.prototype.isRemoveFromAllLeafChildren=function(e,t){var i=this.getSet(e);return!!i.removeFromAllLeafChildren[t.id]},e.prototype.preventRemoveFromAllLeafChildren=function(e,t){var i=this.getSet(e);delete i.removeFromAllLeafChildren[t.id]},e.prototype.removeFromAllLeafChildren=function(e,t){var i=this.getSet(e);i.removeFromAllLeafChildren[t.id]=!0},e.prototype.getSet=function(e){return this.allSets[e.id]||(this.allSets[e.id]={removeFromAllLeafChildren:{},removeFromChildrenAfterGroup:{}},this.allParents.push(e)),this.allSets[e.id]},e.prototype.getAllParents=function(){return this.allParents},e.prototype.flush=function(){var e=this;this.allParents.forEach((function(t){var i=e.allSets[t.id];t.childrenAfterGroup=t.childrenAfterGroup.filter((function(e){return!i.removeFromChildrenAfterGroup[e.id]})),t.allLeafChildren=t.allLeafChildren.filter((function(e){return!i.removeFromAllLeafChildren[e.id]})),t.updateHasChildren(),t.sibling&&(t.sibling.childrenAfterGroup=t.childrenAfterGroup,t.sibling.allLeafChildren=t.allLeafChildren)})),this.allSets={},this.allParents.length=0},e}(),_t=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Pt=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Mt=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},kt=function(e,t,i){if(i||2===arguments.length)for(var n,o=0,r=t.length;o<r;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},Nt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _t(t,e),t.prototype.execute=function(e){var t=this.createGroupingDetails(e);if(t.transactions)this.handleTransaction(t);else{var i=!0===e.afterColumnsChanged;this.shotgunResetEverything(t,i)}t.usingTreeData||(this.positionLeafsAndGroups(e.changedPath),this.orderGroups(t)),this.selectableService.updateSelectableAfterGrouping()},t.prototype.positionLeafsAndGroups=function(e){e.forEachChangedNodeDepthFirst((function(e){if(e.childrenAfterGroup){var t,i=[],n=[];e.childrenAfterGroup.forEach((function(e){var o;(null===(o=e.childrenAfterGroup)||void 0===o?void 0:o.length)?""!==e.key||t?n.push(e):t=e:i.push(e)})),t&&n.push(t),e.childrenAfterGroup=kt(kt([],Mt(i),!1),Mt(n),!1)}}),!1)},t.prototype.createGroupingDetails=function(e){var t,i=e.rowNode,n=e.changedPath,o=e.rowNodeTransactions,r=e.rowNodeOrder,s=this.gridOptionsService.get("treeData"),a=s?null:this.columnModel.getRowGroupColumns(),l={includeParents:!this.gridOptionsService.get("suppressParentsInRowNodes"),expandByDefault:this.gridOptionsService.get("groupDefaultExpanded"),groupedCols:a,rootNode:i,pivotMode:this.columnModel.isPivotMode(),groupedColCount:s||!a?0:a.length,rowNodeOrder:r,transactions:o,changedPath:n,groupAllowUnbalanced:this.gridOptionsService.get("groupAllowUnbalanced"),isGroupOpenByDefault:this.gridOptionsService.getCallback("isGroupOpenByDefault"),initialGroupOrderComparator:this.gridOptionsService.getCallback("initialGroupOrderComparator"),usingTreeData:s,suppressGroupMaintainValueType:this.gridOptionsService.get("suppressGroupMaintainValueType"),getDataPath:s?this.gridOptionsService.get("getDataPath"):void 0,keyCreators:null!==(t=null===a||void 0===a?void 0:a.map((function(e){return e.getColDef().keyCreator})))&&void 0!==t?t:[]};return l},t.prototype.handleTransaction=function(e){var t=this;e.transactions.forEach((function(i){var o=e.usingTreeData?void 0:new At;if(n._.existsAndNotEmpty(i.remove)&&t.removeNodes(i.remove,e,o),n._.existsAndNotEmpty(i.update)&&t.moveNodesInWrongPath(i.update,e,o),n._.existsAndNotEmpty(i.add)&&t.insertN
18odes(i.add,e,!1),o){var r=o.getAllParents().slice();o.flush(),t.removeEmptyGroups(r,e)}})),e.rowNodeOrder&&this.sortChildren(e)},t.prototype.sortChildren=function(e){e.changedPath.forEachChangedNodeDepthFirst((function(t){if(t.childrenAfterGroup){var i=n._.sortRowNodesByOrder(t.childrenAfterGroup,e.rowNodeOrder);i&&e.changedPath.addParentNode(t)}}),!1,!0)},t.prototype.orderGroups=function(e){var t=e.initialGroupOrderComparator;function i(e){var o=n._.exists(e.childrenAfterGroup)&&!e.leafGroup;o&&(e.childrenAfterGroup.sort((function(e,i){return t({nodeA:e,nodeB:i})})),e.childrenAfterGroup.forEach((function(e){return i(e)})))}n._.exists(t)&&i(e.rootNode)},t.prototype.getExistingPathForNode=function(e,t){var i=[],n=t.usingTreeData?e:e.parent;while(n&&n!==t.rootNode)i.push({key:n.key,rowGroupColumn:n.rowGroupColumn,field:n.field}),n=n.parent;return i.reverse(),i},t.prototype.moveNodesInWrongPath=function(e,t,i){var o=this;e.forEach((function(e){t.changedPath.isActive()&&t.changedPath.addParentNode(e.parent);var r=function(e){return e.key},s=o.getExistingPathForNode(e,t).map(r),a=o.getGroupInfo(e,t).map(r),l=n._.areEqual(s,a);l||o.moveNode(e,t,i)}))},t.prototype.moveNode=function(e,t,i){if(this.removeNodesInStages([e],t,i),this.insertOneNode(e,t,!0,i),e.setData(e.data),t.changedPath.isActive()){var n=e.parent;t.changedPath.addParentNode(n)}},t.prototype.removeNodes=function(e,t,i){this.removeNodesInStages(e,t,i),t.changedPath.isActive()&&e.forEach((function(e){return t.changedPath.addParentNode(e.parent)}))},t.prototype.removeNodesInStages=function(e,t,i){if(this.removeNodesFromParents(e,t,i),t.usingTreeData){this.postRemoveCreateFillerNodes(e,t);var n=e.map((function(e){return e.parent}));this.removeEmptyGroups(n,t)}},t.prototype.forEachParentGroup=function(e,t,i){var n=t;while(n&&n!==e.rootNode)i(n),n=n.parent},t.prototype.removeNodesFromParents=function(e,t,i){var n=this,o=null==i,r=i||new At;e.forEach((function(e){n.removeFromParent(e,r),n.forEachParentGroup(t,e.parent,(function(t){r.removeFromAllLeafChildren(t,e)}))})),o&&r.flush()},t.prototype.postRemoveCreateFillerNodes=function(e,t){var i=this;e.forEach((function(e){var n=e.hasChildren();if(n){var o=i.getExistingPathForNode(e,t),r=i.findParentForNode(e,o,t);r.expanded=e.expanded,r.allLeafChildren=e.allLeafChildren,r.childrenAfterGroup=e.childrenAfterGroup,r.childrenMapped=e.childrenMapped,r.updateHasChildren(),r.childrenAfterGroup.forEach((function(e){return e.parent=r}))}}))},t.prototype.removeEmptyGroups=function(e,t){var i=this,n=!0,o=function(e){var t=i.getChildrenMappedKey(e.key,e.rowGroupColumn),n=e.parent,o=!n||!n.childrenMapped||!n.childrenMapped[t];return!o&&!!e.isEmptyRowGroupNode()},r=function(){n=!1;var r=new At;e.forEach((function(e){i.forEachParentGroup(t,e,(function(e){o(e)&&(n=!0,i.removeFromParent(e,r),e.setSelectedParams({newValue:!1,source:"rowGroupChanged"}))}))})),r.flush()};while(n)r()},t.prototype.removeFromParent=function(e,t){e.parent&&(t?t.removeFromChildrenAfterGroup(e.parent,e):(n._.removeFromArray(e.parent.childrenAfterGroup,e),e.parent.updateHasChildren()));var i=this.getChildrenMappedKey(e.key,e.rowGroupColumn);e.parent&&e.parent.childrenMapped&&(e.parent.childrenMapped[i]=void 0),e.setRowTop(null),e.setRowIndex(null)},t.prototype.addToParent=function(e,t){var i=this.getChildrenMappedKey(e.key,e.rowGroupColumn);if(t){var n=null!=t.childrenMapped;n&&(t.childrenMapped[i]=e),t.childrenAfterGroup.push(e),t.updateHasChildren()}},t.prototype.areGroupColsEqual=function(e,t){return null!=e&&null!=t&&e.pivotMode===t.pivotMode&&(n._.areEqual(e.groupedCols,t.groupedCols)&&n._.areEqual(e.keyCreators,t.keyCreators))},t.prototype.checkAllGroupDataAfterColsChanged=function(e){var t=this,i=function(n){n&&n.forEach((function(n){var o=!e.usingTreeData&&!n.group;if(!o){var r={field:n.field,key:n.key,rowGroupColumn:n.rowGroupColumn,leafNode:n.allLeafChildren[0]};t.setGroupData(n,r,e),i(n.childrenAfterGroup)}}))};i(e.rootNode.childrenAfterGroup)},t.prototype.shotgunResetEverything=function(e,t){if(!this.noChangeInGroupingColumns(e,t)){this.selectionService.filterFromSelection((function(e){return e&&!e.group}));var i=e.rootNode,n=e.groupedCols;i.leafGroup=!e.usingTreeData&&0===n.length,i.childrenAfterGroup=[],i.childrenMapped={},i.updateHasChildren();var o=i.sibling;o&&(o.childrenAfterGroup=i.childrenAfterGroup,o.childrenMapped=i.childrenMapped),this.insertNodes(i.allLeafChildren,e,!1)}},t.prototype.noChangeInGroupingColumns=function(e,t){var i=!1,n=this.columnModel.getGroupDisplayColumns(),o=n?n.map((function(e){return e.getId()})).join("-"):"";return t&&(i=e.usingTreeData||this.areGroupColsEqual(e,this.oldGroupingDetails),this.oldGroupDisplayColIds!==o&&this.checkAllGroupDataAfterColsChanged(e)),this.oldGroupingDetails=e,this.oldGroupDisplayColIds=o,i}
18,t.prototype.insertNodes=function(e,t,i){var n=this;e.forEach((function(e){n.insertOneNode(e,t,i),t.changedPath.isActive()&&t.changedPath.addParentNode(e.parent)}))},t.prototype.insertOneNode=function(e,t,i,n){var o=this.getGroupInfo(e,t),r=this.findParentForNode(e,o,t,n);r.group||console.warn("AG Grid: duplicate group keys for row data, keys should be unique",[r.data,e.data]),t.usingTreeData?this.swapGroupWithUserNode(r,e,i):(e.parent=r,e.level=o.length,r.childrenAfterGroup.push(e),r.updateHasChildren())},t.prototype.findParentForNode=function(e,t,i,n){var o=this,r=i.rootNode;return t.forEach((function(t,s){r=o.getOrCreateNextNode(r,t,s,i),(null===n||void 0===n?void 0:n.isRemoveFromAllLeafChildren(r,e))?null===n||void 0===n||n.preventRemoveFromAllLeafChildren(r,e):r.allLeafChildren.push(e)})),r},t.prototype.swapGroupWithUserNode=function(e,t,i){t.parent=e.parent,t.key=e.key,t.field=e.field,t.groupData=e.groupData,t.level=e.level,i||(t.expanded=e.expanded),t.leafGroup=e.leafGroup,t.rowGroupIndex=e.rowGroupIndex,t.allLeafChildren=e.allLeafChildren,t.childrenAfterGroup=e.childrenAfterGroup,t.childrenMapped=e.childrenMapped,t.sibling=e.sibling,t.updateHasChildren(),this.removeFromParent(e),t.childrenAfterGroup.forEach((function(e){return e.parent=t})),this.addToParent(t,e.parent)},t.prototype.getOrCreateNextNode=function(e,t,i,n){var o=this.getChildrenMappedKey(t.key,t.rowGroupColumn),r=e.childrenMapped?e.childrenMapped[o]:void 0;return r||(r=this.createGroup(t,e,i,n),this.addToParent(r,e)),r},t.prototype.createGroup=function(e,t,i,o){var r=new n.Fxk(this.beans);return r.group=!0,r.field=e.field,r.rowGroupColumn=e.rowGroupColumn,this.setGroupData(r,e,o),r.key=e.key,r.id=this.createGroupId(r,t,o.usingTreeData,i),r.level=i,r.leafGroup=!o.usingTreeData&&i===o.groupedColCount-1,r.allLeafChildren=[],r.setAllChildrenCount(0),r.rowGroupIndex=o.usingTreeData?null:i,r.childrenAfterGroup=[],r.childrenMapped={},r.updateHasChildren(),r.parent=o.includeParents?t:null,this.setExpandedInitialValue(o,r),r},t.prototype.createGroupId=function(e,t,i,o){var r;return r=i?function(e,t,i){if(i<0)return null;var n=t?r(t,t.parent,i-1):null;return"".concat(null==n?"":n+"-").concat(i,"-").concat(e.key)}:function(e,t){if(!e.rowGroupColumn)return null;var i=t?r(t,t.parent,0):null;return"".concat(null==i?"":i+"-").concat(e.rowGroupColumn.getColId(),"-").concat(e.key)},n.Fxk.ID_PREFIX_ROW_GROUP+r(e,t,o)},t.prototype.setGroupData=function(e,t,i){var n=this;e.groupData={};var o=this.columnModel.getGroupDisplayColumns();o.forEach((function(o){var r=i.usingTreeData;if(r)e.groupData[o.getColId()]=t.key;else{var s=e.rowGroupColumn,a=null!==s&&o.isRowGroupDisplayed(s.getId());a&&(i.suppressGroupMaintainValueType?e.groupData[o.getColId()]=t.key:e.groupData[o.getColId()]=n.valueService.getValue(s,t.leafNode))}}))},t.prototype.getChildrenMappedKey=function(e,t){return t?t.getId()+"-"+e:e},t.prototype.setExpandedInitialValue=function(e,t){if(e.pivotMode&&t.leafGroup)t.expanded=!1;else{var i=e.isGroupOpenByDefault;if(i){var n={rowNode:t,field:t.field,key:t.key,level:t.level,rowGroupColumn:t.rowGroupColumn};t.expanded=1==i(n)}else{var o=e.expandByDefault;-1!==e.expandByDefault?t.expanded=t.level<o:t.expanded=!0}}},t.prototype.getGroupInfo=function(e,t){return t.usingTreeData?this.getGroupInfoFromCallback(e,t):this.getGroupInfoFromGroupColumns(e,t)},t.prototype.getGroupInfoFromCallback=function(e,t){var i=t.getDataPath?t.getDataPath(e.data):null;null!==i&&void 0!==i&&0!==i.length||n._.warnOnce("getDataPath() should not return an empty path for data ".concat(e.data));var o=function(e){return{key:e,field:null,rowGroupColumn:null}};return i?i.map(o):[]},t.prototype.getGroupInfoFromGroupColumns=function(e,t){var i=this,n=[];return t.groupedCols.forEach((function(o){var r=i.valueService.getKeyForNode(o,e),s=null!==r&&void 0!==r&&""!==r,a=t.pivotMode||!t.groupAllowUnbalanced;if(a&&!s&&(r="",s=!0),s){var l={key:r,field:o.getColDef().field,rowGroupColumn:o,leafNode:e};n.push(l)}})),n},Pt([(0,n.fsG)("columnModel")],t.prototype,"columnModel",void 0),Pt([(0,n.fsG)("selectableService")],t.prototype,"selectableService",void 0),Pt([(0,n.fsG)("valueService")],t.prototype,"valueService",void 0),Pt([(0,n.fsG)("beans")],t.prototype,"beans",void 0),Pt([(0,n.fsG)("selectionService")],t.prototype,"selectionService",void 0),t=Pt([(0,n.Vu6)("groupStage")],t),t}(n.AS9),Lt=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),It=function(){return It=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},It.apply(this,arguments)},Ft=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Gt=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},Vt=function(e,t,i){if(i||2===arguments.length)for(var n,o=0,r=t.length;o<r;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},Bt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}var i;return Lt(t,e),i=t,t.prototype.init=function(){var e=this,t=function(){var t;return null!==(t=e.gos.get("serverSidePivotResultFieldSeparator"))&&void 0!==t?t:"_"};this.fieldSeparator=t(),this.addManagedPropertyListener("serverSidePivotResultFieldSeparator",(function(){e.fieldSeparator=t()}));var i=function(){return e.gos.get("pivotDefaultExpanded")};this.pivotDefaultExpanded=i(),this.addManagedPropertyListener("pivotDefaultExpanded",(function(){e.pivotDefaultExpanded=i()}))},t.prototype.createPivotColumnDefs=function(e){var t=this.createPivotColumnsFromUniqueValues(e);function i(e,t){return void 0===t&&(t=[]),e.forEach((function(e){void 0!==e.children?i(e.children,t):t.push(e)})),t}var o=i(t);this.addRowGroupTotals(t,o),this.addExpandablePivotGroups(t,o),this.addPivotTotalsToGroups(t,o);var r=o.map((function(e){return n._.cloneObject(e)}));return{pivotColumnGroupDefs:t,pivotColumnDefs:r}},t.prototype.createPivotColumnsFromUniqueValues=function(e){var t=this.columnModel.getPivotColumns(),i=t.length,n=this.recursivelyBuildGroup(0,e,[],i,t);return n},t.prototype.recursivelyBuildGroup=function(e,t,i,o,r){var s=this,a=this.columnModel.getValueColumns();if(e>=o)return this.buildMeasureCols(i);var l=r[e].getColDef(),c=this.headerNameComparator.bind(this,l.pivotComparator);if(1===a.length&&this.gridOptionsService.get("removePivotHeaderRowWhenSingleValueColumn")&&e===o-1){var u=[];
18return n._.iterateObject(t,(function(e){var t=Vt(Vt([],Gt(i),!1),[e],!1),n=s.createColDef(a[0],e,t);n.columnGroupShow="open",u.push(n)})),u.sort(c),u}var d=[];return n._.iterateObject(t,(function(t,n){var a=-1===s.pivotDefaultExpanded||e<s.pivotDefaultExpanded,l=Vt(Vt([],Gt(i),!1),[t],!1);d.push({children:s.recursivelyBuildGroup(e+1,n,l,o,r),headerName:t,pivotKeys:l,columnGroupShow:"open",openByDefault:a,groupId:s.generateColumnGroupId(l)})})),d.sort(c),d},t.prototype.buildMeasureCols=function(e){var t=this,i=this.columnModel.getValueColumns();return 0===i.length?[this.createColDef(null,"-",e)]:i.map((function(i){var n=t.columnModel.getDisplayNameForColumn(i,"header");return It(It({},t.createColDef(i,n,e)),{columnGroupShow:"open"})}))},t.prototype.addExpandablePivotGroups=function(e,t){var i=this;if(!this.gridOptionsService.get("suppressExpandablePivotGroups")&&!this.gridOptionsService.get("pivotColumnGroupTotals")){var n=function(e,t,o){var r=e;if(r.children){var s=new Map;r.children.forEach((function(e){n(e,t,s)}));var a=!r.children.some((function(e){return e.children}));i.columnModel.getValueColumns().forEach((function(n){var o=i.columnModel.getDisplayNameForColumn(n,"header"),r=i.createColDef(n,o,e.pivotKeys);if(r.pivotTotalColumnIds=s.get(n.getColId()),r.columnGroupShow="closed",r.aggFunc=n.getAggFunc(),!a){var l=e.children;l.push(r),t.push(r)}})),i.merge(o,s)}else{var l=e;if(!l.pivotValueColumn)return;var c=l.pivotValueColumn.getColId(),u=o.has(c)?o.get(c):[];u.push(l.colId),o.set(c,u)}};e.forEach((function(e){n(e,t,new Map)}))}},t.prototype.addPivotTotalsToGroups=function(e,t){var i=this;if(this.gridOptionsService.get("pivotColumnGroupTotals")){var n="after"===this.gridOptionsService.get("pivotColumnGroupTotals"),o=this.columnModel.getValueColumns(),r=o.map((function(e){return e.getAggFunc()}));if(r&&!(r.length<1)&&this.sameAggFuncs(r)){var s=o[0];e.forEach((function(e){i.recursivelyAddPivotTotal(e,t,s,n)}))}}},t.prototype.recursivelyAddPivotTotal=function(e,t,i,n){var o=this,r=e;if(!r.children){var s=e;return s.colId?[s.colId]:null}var a=[];if(r.children.forEach((function(e){var r=o.recursivelyAddPivotTotal(e,t,i,n);r&&(a=a.concat(r))})),r.children.length>1){var l=this.localeService.getLocaleTextFunc(),c=l("pivotColumnGroupTotals","Total"),u=this.createColDef(i,c,e.pivotKeys,!0);u.pivotTotalColumnIds=a,u.aggFunc=i.getAggFunc();var d=e.children;n?d.push(u):d.unshift(u),t.push(u)}return a},t.prototype.addRowGroupTotals=function(e,t){var i=this;if(this.gridOptionsService.get("pivotRowTotals"))for(var n="after"===this.gridOptionsService.get("pivotRowTotals"),o=this.columnModel.getValueColumns(),r=n?o.slice():o.slice().reverse(),s=function(o){var s=r[o],l=[];e.forEach((function(e){l=l.concat(i.extractColIdsForValueColumn(e,s))}));var c=r.length>1||!a.gridOptionsService.get("removePivotHeaderRowWhenSingleValueColumn");a.createRowGroupTotal(e,t,s,l,n,c)},a=this,l=0;l<r.length;l++)s(l)},t.prototype.extractColIdsForValueColumn=function(e,t){var i=this,n=e;if(!n.children){var o=n;return o.pivotValueColumn===t&&o.colId?[o.colId]:[]}var r=[];return n.children.forEach((function(e){i.extractColIdsForValueColumn(e,t);var n=i.extractColIdsForValueColumn(e,t);r=r.concat(n)})),r},t.prototype.createRowGroupTotal=function(e,t,n,o,r,s){var a,l=this.columnModel.getValueColumns();if(0===l.length)a=this.createColDef(null,"-",[]);else{var c=this.columnModel.getDisplayNameForColumn(n,"header");a=this.createColDef(n,c,[]),a.pivotTotalColumnIds=o}a.colId=i.PIVOT_ROW_TOTAL_PREFIX+a.colId,t.push(a);var u=s?{children:[a],pivotKeys:[],groupId:"".concat(i.PIVOT_ROW_TOTAL_PREFIX,"_pivotGroup_").concat(n.getColId())}:a;r?e.push(u):e.unshift(u)},t.prototype.createColDef=function(e,t,i,n){void 0===n&&(n=!1);var o={};if(e){var r=e.getColDef();Object.assign(o,r),o.hide=!1}return o.headerName=t,o.colId=this.generateColumnId(i||[],e&&!n?e.getColId():""),o.field=o.colId,o.valueGetter=function(e){var t;return null===(t=e.data)||void 0===t?void 0:t[e.colDef.field]},o.pivotKeys=i,o.pivotValueColumn=e,!0===o.filter&&(o.filter="agNumberColumnFilter"),o},t.prototype.sameAggFuncs=function(e){if(1==e.length)return!0;for(var t=1;t<e.length;t++)if(e[t]!==e[0])return!1;return!0},t.prototype.headerNameComparator=function(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},t.prototype.merge=function(e,t){t.forEach((function(t,i,n){var o=e.has(i)?e.get(i):[],r=Vt(Vt([],Gt(o),!1),Gt(t),!1);e.set(i,r)}))},t.prototype.generateColumnGroupId=function(e){var t=this.columnModel.getPivotColumns().map((function(e){return e.getColId()}));return"pivotGroup_".concat(t.join("-"),"_").concat(e.join("-"))},t.prototype.generateColumnId=function(e,t){var i=this.columnModel.getPivotColumns().map((function(e){return e.getColId()}));return"pivot_".concat(i.join("-"),"_").concat(e.join("-"),"_").concat(t)},t.prototype.createColDefsFromFields=function(e){for(var t=this,i={},n=0;n<e.length;n++)for(var o=e[n],r=o.split(this.fieldSeparator),s=i,a=0;a<r.length;a++){var l=r[a];null==s[l]&&(s[l]={}),s=s[l]}var c=function(e,i,n,o){var r,s=[];for(var a in n){var l=n[a],u=c("".concat(e).concat(t.fieldSeparator).concat(a),a,l,o+1);s.push(u)}if(0===s.length){var d={colId:e,headerName:i,valueGetter:function(t){var i;return null===(i=t.data)||void 0===i?void 0:i[e]}},p=t.columnModel.getPrimaryColumn(i);
18return p&&(d.headerName=null!==(r=t.columnModel.getDisplayNameForColumn(p,"header"))&&void 0!==r?r:i,d.aggFunc=p.getAggFunc(),d.pivotValueColumn=p),d}var h=t.gridOptionsService.get("removePivotHeaderRowWhenSingleValueColumn");if(h&&1===s.length&&"colId"in s[0])return s[0].headerName=i,s[0];var f={openByDefault:-1===t.pivotDefaultExpanded||o<t.pivotDefaultExpanded,groupId:e,headerName:i,children:s};return f},u=[];for(var d in i){var p=i[d],h=c(d,d,p,0);u.push(h)}return u},t.PIVOT_ROW_TOTAL_PREFIX="PivotRowTotal_",Ft([(0,n.fsG)("columnModel")],t.prototype,"columnModel",void 0),Ft([(0,n.fsG)("gridOptionsService")],t.prototype,"gos",void 0),Ft([n.NqP],t.prototype,"init",null),t=i=Ft([(0,n.Vu6)("pivotColDefService")],t),t}(n.AS9),jt=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ht=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Wt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.uniqueValues={},t}return jt(t,e),t.prototype.execute=function(e){var t=e.changedPath;this.columnModel.isPivotActive()?this.executePivotOn(t):this.executePivotOff(t)},t.prototype.executePivotOff=function(e){this.aggregationColumnsHashLastTime=null,this.uniqueValues={},this.columnModel.isSecondaryColumnsPresent()&&(this.columnModel.setSecondaryColumns(null,"rowModelUpdated"),e&&e.setInactive())},t.prototype.executePivotOn=function(e){var t=this.bucketUpRowNodes(e),i=this.setUniqueValues(t),n=this.columnModel.getValueColumns(),o=n.map((function(e){return"".concat(e.getId(),"-").concat(e.getColDef().headerName)})).join("#"),r=n.map((function(e){return e.getAggFunc().toString()})).join("#"),s=this.aggregationColumnsHashLastTime!==o,a=this.aggregationFuncsHashLastTime!==r;this.aggregationColumnsHashLastTime=o,this.aggregationFuncsHashLastTime=r;var l=this.columnModel.getRowGroupColumns().map((function(e){return e.getId()})).join("#"),c=l!==this.groupColumnsHashLastTime;this.groupColumnsHashLastTime=l;var u=this.gridOptionsService.get("pivotRowTotals"),d=this.gridOptionsService.get("pivotColumnGroupTotals"),p=this.gridOptionsService.get("suppressExpandablePivotGroups"),h=this.gridOptionsService.get("removePivotHeaderRowWhenSingleValueColumn"),f=u!==this.pivotRowTotalsLastTime||d!==this.pivotColumnGroupTotalsLastTime||p!==this.suppressExpandablePivotGroupsLastTime||h!==this.removePivotHeaderRowWhenSingleValueColumnLastTime;if(this.pivotRowTotalsLastTime=u,this.pivotColumnGroupTotalsLastTime=d,this.suppressExpandablePivotGroupsLastTime=p,this.removePivotHeaderRowWhenSingleValueColumnLastTime=h,i||s||c||a||f){var g=this.pivotColDefService.createPivotColumnDefs(this.uniqueValues),v=g.pivotColumnGroupDefs,y=g.pivotColumnDefs;this.pivotColumnDefs=y,this.columnModel.setSecondaryColumns(v,"rowModelUpdated"),e&&e.setInactive()}},t.prototype.setUniqueValues=function(e){var t=JSON.stringify(e),i=JSON.stringify(this.uniqueValues),n=t!==i;return!!n&&(this.uniqueValues=e,!0)},t.prototype.bucketUpRowNodes=function(e){var t=this,i={};e.forEachChangedNodeDepthFirst((function(e){e.leafGroup&&(e.childrenMapped=null)}));var n=function(e){var o;e.leafGroup?t.bucketRowNode(e,i):null===(o=e.childrenAfterFilter)||void 0===o||o.forEach(n)};return e.executeFromRootNode(n),i},t.prototype.bucketRowNode=function(e,t){var i=this.columnModel.getPivotColumns();0===i.length?e.childrenMapped=null:e.childrenMapped=this.bucketChildren(e.childrenAfterFilter,i,0,t),e.sibling&&(e.sibling.childrenMapped=e.childrenMapped)},t.prototype.bucketChildren=function(e,t,i,o){var r=this,s={},a=t[i];if(e.forEach((function(e){var t=r.valueService.getKeyForNode(a,e);n._.missing(t)&&(t=""),o[t]||(o[t]={}),s[t]||(s[t]=[]),s[t].push(e)})),i===t.length-1)return s;var l={};
18return n._.iterateObject(s,(function(e,n){l[e]=r.bucketChildren(n,t,i+1,o[e])})),l},t.prototype.getPivotColumnDefs=function(){return this.pivotColumnDefs},Ht([(0,n.fsG)("valueService")],t.prototype,"valueService",void 0),Ht([(0,n.fsG)("columnModel")],t.prototype,"columnModel",void 0),Ht([(0,n.fsG)("pivotColDefService")],t.prototype,"pivotColDefService",void 0),t=Ht([(0,n.Vu6)("pivotStage")],t),t}(n.AS9),Ut=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),zt=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Kt="undefined"===typeof BigInt?null:BigInt,Yt={sum:"Sum",first:"First",last:"Last",min:"Min",max:"Max",count:"Count",avg:"Average"},qt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.aggFuncsMap={},t.initialised=!1,t}var i;return Ut(t,e),i=t,t.prototype.init=function(){this.initialised||(this.initialiseWithDefaultAggregations(),this.addAggFuncs(this.gridOptionsService.get("aggFuncs")))},t.prototype.initialiseWithDefaultAggregations=function(){this.aggFuncsMap[i.AGG_SUM]=Xt,this.aggFuncsMap[i.AGG_FIRST]=$t,this.aggFuncsMap[i.AGG_LAST]=Zt,this.aggFuncsMap[i.AGG_MIN]=Jt,this.aggFuncsMap[i.AGG_MAX]=Qt,this.aggFuncsMap[i.AGG_COUNT]=ei,this.aggFuncsMap[i.AGG_AVG]=ti,this.initialised=!0},t.prototype.isAggFuncPossible=function(e,t){var i=this.getFuncNames(e),o=n._.includes(i,t),r=n._.exists(this.aggFuncsMap[t]);return o&&r},t.prototype.getDefaultFuncLabel=function(e){var t;return null!==(t=Yt[e])&&void 0!==t?t:e},t.prototype.getDefaultAggFunc=function(e){var t=e.getColDef().defaultAggFunc;if(n._.exists(t)&&this.isAggFuncPossible(e,t))return t;if(this.isAggFuncPossible(e,i.AGG_SUM))return i.AGG_SUM;var o=this.getFuncNames(e);return n._.existsAndNotEmpty(o)?o[0]:null},t.prototype.addAggFuncs=function(e){n._.iterateObject(e,this.addAggFunc.bind(this))},t.prototype.addAggFunc=function(e,t){this.init(),this.aggFuncsMap[e]=t},t.prototype.getAggFunc=function(e){return this.init(),this.aggFuncsMap[e]},t.prototype.getFuncNames=function(e){var t=e.getColDef().allowedAggFuncs;return null==t?Object.keys(this.aggFuncsMap).sort():t},t.prototype.clear=function(){this.aggFuncsMap={}},t.AGG_SUM="sum",t.AGG_FIRST="first",t.AGG_LAST="last",t.AGG_MIN="min",t.AGG_MAX="max",t.AGG_COUNT="count",t.AGG_AVG="avg",zt([n.NqP],t.prototype,"init",null),t=i=zt([(0,n.Vu6)("aggFuncService")],t),t}(n.AS9);function Xt(e){for(var t=e.values,i=null,n=0;n<t.length;n++){var o=t[n];"number"===typeof o?null===i?i=o:i+=Kt?"number"===typeof i?o:Kt(o):o:"bigint"===typeof o&&(i=null===i?o:("bigint"===typeof i?i:Kt(i))+o)}return i}function $t(e){return e.values.length>0?e.values[0]:null}function Zt(e){return e.values.length>0?n._.last(e.values):null}function Jt(e){for(var t=e.values,i=null,n=0;n<t.length;n++){var o=t[n];"number"!==typeof o&&"bigint"!==typeof o||!(null===i||i>o)||(i=o)}return i}function Qt(e){for(var t=e.values,i=null,n=0;n<t.length;n++){var o=t[n];"number"!==typeof o&&"bigint"!==typeof o||!(null===i||i<o)||(i=o)}return i}function ei(e){for(var t,i,n=e.values,o=0,r=0;r<n.length;r++){var s=n[r];o+=null!=s&&"number"===typeof s.value?s.value:1}var a=null===(i=null===(t=e.rowNode)||void 0===t?void 0:t.aggData)||void 0===i?void 0:i[e.column.getColId()];return a&&a.value===o?a:{value:o,toString:function(){return this.value.toString()},toNumber:function(){return this.value}}}function ti(e){for(var t,i,n,o=e.values,r=0,s=0,a=0;a<o.length;a++){var l=o[a],c=null;"number"===typeof l||"bigint"===typeof l?(c=l,s++):null==l||"number"!==typeof l.value&&"bigint"!==typeof l.value||"number"!==typeof l.count||(c=Kt?l.value*("number"===typeof l.value?l.count:Kt(l.count)):l.value*l.count,s+=l.count),"number"===typeof c?r+=Kt?"number"===typeof r?c:Kt(c):c:"bigint"===typeof c&&(r=("bigint"===typeof r?r:Kt(r))+c)}var u=null;s>0&&(u=Kt?r/("number"===typeof r?s:Kt(s)):r/s);var d=null===(i=null===(t=e.rowNode)||void 0===t?void 0:t.aggData)||void 0===i?void 0:i[null===(n=e.column)||void 0===n?void 0:n.getColId()];return d&&d.count===s&&d.value===u?d:{count:s,value:u,toString:function(){return"number"===typeof this.value||"bigint"===typeof this.value?this.value.toString():""},toNumber:function(){return this.value}}}var ii=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ni=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},oi=function(e){function t(t,i,n,o,r){var s=e.call(this)||this;return s.column=t,s.dragSourceDropTarget=i,s.ghost=n,s.dropZonePurpose=o,s.horizontal=r,s.popupShowing=!1,s}return ii(t,e),t.prototype.init=function(){var e=this;this.setTemplate(t.TEMPLATE);var i=this.getGui(),o=this.gridOptionsService.get("functionsReadOnly");this.addElementClasses(i),this.addElementClasses(this.eDragHandle,"drag-handle"),this.addElementClasses(this.eText,"text"),this.addElementClasses(this.eButton,"button"),this.eDragHandle.appendChild(n._.createIconNoSpan("columnDrag",this.gridOptionsService)),this.eButton.appendChild(n._.createIconNoSpan("cancel",this.gridOptionsService)),this.setupSort(),this.displayName=this.columnModel.getDisplayNameForColumn(this.column,"columnDrop"),this.setupComponents(),this.ghost||o||this.addDragSource(),this.setupAria(),this.addManagedListener(this.eventService,n.sgG.EVENT_SORT_CHANGED,(function(){e.setupAria()})),this.setupTooltip(),this.activateTabIndex();var r=function(){var t=e.isGroupingAndLocked();n._.setDisplayed(e.eButton,!t&&!e.gridOptionsService.get("functionsReadOnly")),e.eDragHandle.classList.toggle("ag-column-select-column-readonly",t),e.setupAria()};r(),this.isGroupingZone()&&this.addManagedPropertyListener("groupLockGroupColumns",(function(){return r()}))},t.prototype.setupAria=function(){var e=this.localeService.getLocaleTextFunc(),t=this.getColumnAndAggFuncName(),i=t.name,o=t.aggFuncName,r=e("ariaDropZoneColumnComponentAggFuncSeparator"," of "),s={asc:e("ariaDropZoneColumnComponentSortAscending","ascending"),desc:e("ariaDropZoneColumnComponentSortDescending","descending")},a=this.column.getSort(),l=this.gridOptionsService.get("rowGroupPanelSuppressSort"),c=[[o&&"".concat(o).concat(r),i,this.isGroupingZone()&&!l&&a&&", ".concat(s[a])].filter((function(e){return!!e})).join("")],u=this.gridOptionsService.get("functionsReadOnly");if(this.isAggregationZone()&&!u){var d=e("ariaDropZoneColumnValueItemDescription","Press ENTER to change the aggregation type");c.push(d)}if(this.isGroupingZone()&&this.column.isSortable()&&!l){var p=e("ariaDropZoneColumnGroupItemDescription","Press ENTER to sort");c.push(p)}if(!this.isGroupingAndLocked()){var h=e("ariaDropZoneColumnComponentDescription","Press DELETE to remove");c.push(h)}n._.setAriaLabel(this.getGui(),c.join(". "))},t.prototype.setupTooltip=function(){var e=this,t=function(){var t=e.column.getColDef().headerTooltip;e.setTooltip(t)};t(),this.addManagedListener(this.eventService,n.zW2.EVENT_NEW_COLUMNS_LOADED,t)},t.prototype.setupSort=function(){var e=this,t=this.column.isSortable(),i=this.isGroupingZone();if(t&&i&&!this.gridOptionsService.get("rowGroupPanelSuppressSort")){this.eSortIndicator.setupSort(this.column,!0);var o=function(t){t.preventDefault();var i="ctrl"===e.gridOptionsService.get("multiSortKey"),n=i?t.ctrlKey||t.metaKey:t.shiftKey;e.sortController.progressSort(e.column,n,"uiColumnSorted")};this.addGuiEventListener("click",o),this.addGuiEventListener("keydown",(function(t){var i=t.key===n.VDZ.ENTER;i&&e.isGroupingZone()&&o(t)}))}},t.prototype.addDragSource=function(){var e=this,t={type:n.rvo.ToolPanel,eElement:this.eDragHandle,getDefaultIconName:function(){return n.jUB.ICON_HIDE},getDragItem:function(){return e.createDragItem()},dragItemName:this.displayName,dragSourceDropTarget:this.dragSourceDropTarget};this.dragAndDropService.addDragSource(t,!0),this.addDestroyFunc((function(){return e.dragAndDropService.removeDragSource(t)}))},t.prototype.createDragItem=function(){var e={};return e[this.column.getId()]=this.column.isVisible(),{columns:[this.column],visibleState:e}},t.prototype.setupComponents=function(){this.setTextValue(),this.setupRemove(),this.ghost&&this.addCssClass("ag-column-drop-cell-ghost"),this.isAggregationZone()&&!this.gridOptionsService.get("functionsReadOnly")&&this.addGuiEventListener("click",this.onShowAggFuncSelection.bind(this))},t.prototype.isGroupingAndLocked=function(){return this.isGroupingZone()&&this.columnModel.isColumnGroupingLocked(this.column)},t.prototype.setupRemove=function(){var e=this;n._.setDisplayed(this.eButton,!this.isGroupingAndLocked()&&!this.gridOptionsService.get("functionsReadOnly"));var i={type:t.EVENT_COLUMN_REMOVE}
18;this.addGuiEventListener("keydown",(function(t){var o=t.key===n.VDZ.ENTER,r=t.key===n.VDZ.DELETE;r&&(e.isGroupingAndLocked()||(t.preventDefault(),e.dispatchEvent(i))),o&&e.isAggregationZone()&&!e.gridOptionsService.get("functionsReadOnly")&&(t.preventDefault(),e.onShowAggFuncSelection())})),this.addManagedListener(this.eButton,"click",(function(t){e.dispatchEvent(i),t.stopPropagation()}));var o=new n.rwP(this.eButton);this.addManagedListener(o,n.rwP.EVENT_TAP,(function(){e.dispatchEvent(i)})),this.addDestroyFunc(o.destroy.bind(o))},t.prototype.getColumnAndAggFuncName=function(){var e=this.displayName,t="";if(this.isAggregationZone()){var i=this.column.getAggFunc(),n="string"===typeof i?i:"agg",o=this.localeService.getLocaleTextFunc();t=o(n,n)}return{name:e,aggFuncName:t}},t.prototype.setTextValue=function(){var e=this.getColumnAndAggFuncName(),t=e.name,i=e.aggFuncName,o=this.isAggregationZone()?"".concat(i,"(").concat(t,")"):t,r=n._.escapeString(o);this.eText.innerHTML=r},t.prototype.onShowAggFuncSelection=function(){var e=this;if(!this.popupShowing){this.popupShowing=!0;var t=new n.CPJ({cssIdentifier:"select-agg-func"}),i=this.aggFuncService.getFuncNames(this.column),o=this.getGui(),r=t.getGui();t.setModel({getRow:function(e){return i[e]},getRowCount:function(){return i.length}}),this.getContext().createBean(t);var s=n._.loadTemplate('<div class="ag-select-agg-func-popup"></div>');s.style.top="0px",s.style.left="0px",s.appendChild(r),s.style.width="".concat(o.clientWidth,"px");var a=this.addManagedListener(s,"focusout",(function(e){!s.contains(e.relatedTarget)&&u&&u.hideFunc()})),l=function(i){e.destroyBean(t),e.popupShowing=!1,"Escape"===(null===i||void 0===i?void 0:i.key)&&o.focus(),a&&a()},c=this.localeService.getLocaleTextFunc(),u=this.popupService.addPopup({modal:!0,eChild:s,closeOnEsc:!0,closedCallback:l,ariaLabel:c("ariaLabelAggregationFunction","Aggregation Function")});u&&t.setComponentCreator(this.createAggSelect.bind(this,u.hideFunc)),t.addGuiEventListener("keydown",(function(e){if(e.key===n.VDZ.ENTER||e.key===n.VDZ.SPACE){var i=t.getLastFocusedRow();if(null==i)return;var o=t.getComponentAt(i);o&&o.selectItem()}})),this.popupService.positionPopupByComponent({type:"aggFuncSelect",eventSource:o,ePopup:s,keepWithinBounds:!0,column:this.column,position:"under"}),t.refresh();var d=i.findIndex((function(t){return t===e.column.getAggFunc()}));-1===d&&(d=0),t.focusRow(d)}},t.prototype.createAggSelect=function(e,t){var i=this,o=function(){if(e(),i.gridOptionsService.get("functionsPassive")){var o={type:n.zW2.EVENT_COLUMN_AGG_FUNC_CHANGE_REQUEST,columns:[i.column],aggFunc:t};i.eventService.dispatchEvent(o)}else i.columnModel.setColumnAggFunc(i.column,t,"toolPanelDragAndDrop")},r=this.localeService.getLocaleTextFunc(),s=t.toString(),a=r(s,s),l=new ri(o,a);return l},t.prototype.addElementClasses=function(e,t){t=t?"-".concat(t):"";var i=this.horizontal?"horizontal":"vertical";e.classList.add("ag-column-drop-cell".concat(t),"ag-column-drop-".concat(i,"-cell").concat(t))},t.prototype.isAggregationZone=function(){return"aggregation"===this.dropZonePurpose},t.prototype.isGroupingZone=function(){return"rowGroup"===this.dropZonePurpose},t.EVENT_COLUMN_REMOVE="columnRemove",t.TEMPLATE='<span role="option">\n          <span ref="eDragHandle" class="ag-drag-handle ag-column-drop-cell-drag-handle" role="presentation"></span>\n          <span ref="eText" class="ag-column-drop-cell-text" aria-hidden="true"></span>\n          <ag-sort-indicator ref="eSortIndicator"></ag-sort-indicator>\n          <span ref="eButton" class="ag-column-drop-cell-button" role="presentation"></span>\n        </span>',ni([(0,n.fsG)("dragAndDropService")],t.prototype,"dragAndDropService",void 0),ni([(0,n.fsG)("columnModel")],t.prototype,"columnModel",void 0),ni([(0,n.fsG)("popupService")],t.prototype,"popupService",void 0),ni([(0,n.FiY)("aggFuncService")],t.prototype,"aggFuncService",void 0),ni([(0,n.fsG)("sortController")],t.prototype,"sortController",void 0),ni([(0,n.cqo)("eText")],t.prototype,"eText",void 0),ni([(0,n.cqo)("eDragHandle")],t.prototype,"eDragHandle",void 0),ni([(0,n.cqo)("eButton")],t.prototype,"eButton",void 0),ni([(0,n.cqo)("eSortIndicator")],t.prototype,"eSortIndicator",void 0),ni([n.NqP],t.prototype,"init",null),t}(n.wA2),ri=function(e){function t(t,i){var n=e.call(this,'<div class="ag-select-agg-func-item"/>')||this;return n.selectItem=t,n.getGui().innerText=i,n.addGuiEventListener("click",n.selectItem),n}return ii(t,e),t}(n.wA2),si=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ai=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},li=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},ci=function(e,t,i){if(i||2===arguments.length)for(var n,o=0,r=t.length;o<r;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},ui=function(e){function t(i,o){var r=e.call(this,'<div class="ag-unselectable" role="presentation"></div>')||this;return r.horizontal=i,r.dropZonePurpose=o,r.state=t.STATE_NOT_DRAGGING,r.guiDestroyFunctions=[],r.childColumnComponents=[],r.resizeEnabled=!1,r.addElementClasses(r.getGui()),r.eColumnDropList=document.createElement("div"),r.addElementClasses(r.eColumnDropList,"list"),n._.setAriaRole(r.eColumnDropList,"listbox"),r}return si(t,e),t.prototype.isHorizontal=function(){return this.horizontal},t.prototype.toggleResizable=function(e){this.positionableFeature.setRe
18sizable(!!e&&{bottom:!0}),this.resizeEnabled=e},t.prototype.setBeans=function(e){this.beans=e},t.prototype.destroy=function(){this.destroyGui(),e.prototype.destroy.call(this)},t.prototype.destroyGui=function(){this.guiDestroyFunctions.forEach((function(e){return e()})),this.guiDestroyFunctions.length=0,this.childColumnComponents.length=0,n._.clearElement(this.getGui()),n._.clearElement(this.eColumnDropList)},t.prototype.init=function(e){this.params=e,this.createManagedBean(new n.D_6(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)})),this.addManagedListener(this.beans.eventService,n.zW2.EVENT_NEW_COLUMNS_LOADED,this.refreshGui.bind(this)),this.addManagedPropertyListeners(["functionsReadOnly","rowGroupPanelSuppressSort","groupLockGroupColumns"],this.refreshGui.bind(this)),this.setupDropTarget(),this.positionableFeature=new n.Gxm(this.getGui(),{minHeight:100}),this.createManagedBean(this.positionableFeature),this.refreshGui(),n._.setAriaLabel(this.eColumnDropList,this.getAriaLabel())},t.prototype.handleKeyDown=function(e){var t=!this.horizontal,i=e.key===n.VDZ.DOWN,o=e.key===n.VDZ.UP;if(!t){var r=this.gridOptionsService.get("enableRtl");i=!r&&e.key===n.VDZ.RIGHT||r&&e.key===n.VDZ.LEFT,o=!r&&e.key===n.VDZ.LEFT||r&&e.key===n.VDZ.RIGHT}if(i||o){var s=this.focusService.findNextFocusableElement(this.getFocusableElement(),!1,o);s&&(e.preventDefault(),s.focus())}},t.prototype.addElementClasses=function(e,t){t=t?"-".concat(t):"";var i=this.horizontal?"horizontal":"vertical";e.classList.add("ag-column-drop".concat(t),"ag-column-drop-".concat(i).concat(t))},t.prototype.setupDropTarget=function(){this.dropTarget={getContainer:this.getGui.bind(this),getIconName:this.getIconName.bind(this),onDragging:this.onDragging.bind(this),onDragEnter:this.onDragEnter.bind(this),onDragLeave:this.onDragLeave.bind(this),onDragStop:this.onDragStop.bind(this),isInterestedIn:this.isInterestedIn.bind(this)},this.beans.dragAndDropService.addDropTarget(this.dropTarget)},t.prototype.isInterestedIn=function(e){return e===n.rvo.HeaderCell||e===n.rvo.ToolPanel},t.prototype.minimumAllowedNewInsertIndex=function(){var e=this.gridOptionsService.get("groupLockGroupColumns"),t=this.colModel.getRowGroupColumns().length;return-1===e?t:Math.min(e,t)},t.prototype.checkInsertIndex=function(e){var t=this.getNewInsertIndex(e);if(t<0)return!1;var i=this.minimumAllowedNewInsertIndex(),n=Math.max(i,t),o=n!==this.insertIndex;return o&&(this.insertIndex=n),o},t.prototype.getNewInsertIndex=function(e){var t=this,i=e.event,n=this.horizontal?i.clientX:i.clientY,o=this.childColumnComponents.map((function(e){return e.getGui().getBoundingClientRect()})),r=o.findIndex((function(e){return t.horizontal?e.right>n&&e.left<n:e.top<n&&e.bottom>n}));if(-1===r){var s=this.beans.gridOptionsService.get("enableRtl"),a=o.every((function(e){return n>(t.horizontal?e.right:e.bottom)}));if(a)return s&&this.horizontal?0:this.childColumnComponents.length;var l=o.every((function(e){return n<(t.horizontal?e.left:e.top)}));return l?s&&this.horizontal?this.childColumnComponents.length:0:this.insertIndex}return this.insertIndex<=r?r+1:r},t.prototype.checkDragStartedBySelf=function(e){this.state===t.STATE_NOT_DRAGGING&&(this.state=t.STATE_REARRANGE_COLUMNS,this.potentialDndColumns=e.dragSource.getDragItem().columns||[],this.refreshGui(),this.checkInsertIndex(e),this.refreshGui())},t.prototype.onDragging=function(e){this.checkDragStartedBySelf(e),this.checkInsertIndex(e)&&this.refreshGui()},t.prototype.onDragEnter=function(e){var i=e.dragSource.getDragItem().columns||[];this.state=t.STATE_NEW_COLUMNS_IN;var n=i.filter(this.isColumnDroppable.bind(this));if(n.length>0){var o=this.isRowGroupPanel()&&!this.gridOptionsService.get("suppressRowGroupHidesColumns")&&!e.fromNudge;if(o){var r=e.dragSource.getDragItem(),s=r.columns;this.setColumnsVisible(s,!1,"uiColumnDragged")}this.potentialDndColumns=n,this.checkInsertIndex(e),this.refreshGui()}},t.prototype.setColumnsVisible=function(e,t,i){if(void 0===i&&(i="api"),e){var n=e.filter((function(e){return!e.getColDef().lockVisible}));this.colModel.setColumnsVisible(n,t,i)}},t.prototype.isPotentialDndColumns=function(){return n._.existsAndNotEmpty(this.potentialDndColumns)},t.prototype.isRowGroupPanel=function(){return"rowGroup"===this.dropZonePurpose},t.prototype.onDragLeave=function(e){if(this.state===t.STATE_REARRANGE_COLUMNS){var i=e.dragSource.getDragItem().columns||[];this.removeColumns(i)}if(this.isPotentialDndColumns()){var n=this.isRowGroupPanel()&&!this.gridOptionsService.get("suppressMakeColumnVisibleAfterUnGroup")&&!e.fromNudge;if(n){var o=e.dragSource.getDragItem();this.setColumnsVisible(o.columns,!0,"uiColumnDragged")}this.potentialDndColumns=[],this.refreshGui()}this.state=t.STATE_NOT_DRAGGING},t.prototype.onDragStop=function(){if(this.isPotentialDndColumns()){var e=!1;this.state===t.STATE_NEW_COLUMNS_IN?(this.addColumns(this.potentialDndColumns),e=!0):e=this.rearrangeColumns(this.potentialDndColumns),this.potentialDndColumns=[],this.beans.gridOptionsService.get("functionsPassive")&&e||this.refreshGui()}this.state=t.STATE_NOT_DRAGGING},t.prototype.removeColumns=function(e){var t=this.getExistingColumns().filter((function(t){return!n._.includes(e,t)}));this.updateColumns(t)},t.prototype.addColumns=function(e){if(e){var t=this.getExistingColumns().slice(),i=e.filter((function(e){return t.indexOf(e)<0}));n._.insertArrayIntoArray(t,i,this.insertIndex),this.updateColumns(t)}},t.prototype.rearrangeColumns=function(e){var t=this.getNonGhostColumns().slice();return n._.insertArrayIntoArray(t,e,this.insertIndex),!n._.areEqual(t,this.getExistingColumns())&&(this.updateColumns(t),!0)},t.prototype.refreshGui=function(){var e=this.eColumnDropList.scrollTop,t=this.resizeEnabled,i=this.getFocusedItem(),n=this.focusService.findNextFocusableElement();n||(n=this.focusService.findNextFocusableElement(void 0,!1,!0)),this.toggleResizable(!1),this.destroyGui(),this.addIconAndTitleToGui(),this.addEmptyMessageToGui(),this.addColumnsToGui(),this.isHorizontal()||(this.eColumnDropList.scrollTop=e),t&&this.toggleResizable(t),this.focusService.isKeyboardMode()&&this.restoreFocus(i,n)},t.prototype.getFocusedItem=function(){var e=this.getGui(),t=this.gridOptionsService.getDocument().activeElement;if(!e.contains(t))return-1;var i=Array.from(e.querySelectorAll(".ag-column-drop-cell"));return i.indexOf(t)},t.prototype.restoreFocus=function(e,t){var i=this.getGui(),n=Array.from(i.querySelectorAll(".ag-column-drop-cell"));
18if(-1!==e){0===n.length&&t.focus();var o=Math.min(n.length-1,e),r=n[o];r&&r.focus()}},t.prototype.getNonGhostColumns=function(){var e=this,t=this.getExistingColumns();return this.isPotentialDndColumns()?t.filter((function(t){return!n._.includes(e.potentialDndColumns,t)})):t},t.prototype.addColumnsToGui=function(){var e=this,t=this.getNonGhostColumns(),i=t.map((function(t){return e.createColumnComponent(t,!1)}));if(this.isPotentialDndColumns()){var n=this.potentialDndColumns.map((function(t){return e.createColumnComponent(t,!0)}));this.insertIndex>=i.length?i.push.apply(i,ci([],li(n),!1)):i.splice.apply(i,ci([this.insertIndex,0],li(n),!1))}this.appendChild(this.eColumnDropList),i.forEach((function(t,i){i>0&&e.addArrow(e.eColumnDropList),e.eColumnDropList.appendChild(t.getGui())})),this.addAriaLabelsToComponents()},t.prototype.addAriaLabelsToComponents=function(){var e=this;this.childColumnComponents.forEach((function(t,i){var o=t.getGui();n._.setAriaPosInSet(o,i+1),n._.setAriaSetSize(o,e.childColumnComponents.length)}))},t.prototype.createColumnComponent=function(e,t){var i=this,n=new oi(e,this.dropTarget,t,this.dropZonePurpose,this.horizontal);return n.addEventListener(oi.EVENT_COLUMN_REMOVE,this.removeColumns.bind(this,[e])),this.beans.context.createBean(n),this.guiDestroyFunctions.push((function(){return i.destroyBean(n)})),t||this.childColumnComponents.push(n),n},t.prototype.addIconAndTitleToGui=function(){var e=this.params.icon,t=document.createElement("div");if(n._.setAriaHidden(t,!0),this.addElementClasses(t,"title-bar"),this.addElementClasses(e,"icon"),this.addOrRemoveCssClass("ag-column-drop-empty",this.isExistingColumnsEmpty()),t.appendChild(e),!this.horizontal){var i=document.createElement("span");this.addElementClasses(i,"title"),i.innerHTML=this.params.title,t.appendChild(i)}this.appendChild(t)},t.prototype.isExistingColumnsEmpty=function(){return 0===this.getExistingColumns().length},t.prototype.addEmptyMessageToGui=function(){if(this.isExistingColumnsEmpty()&&!this.isPotentialDndColumns()){var e=document.createElement("span");e.innerHTML=this.params.emptyMessage,this.addElementClasses(e,"empty-message"),this.eColumnDropList.appendChild(e)}},t.prototype.addArrow=function(e){if(this.horizontal){var t=this.beans.gridOptionsService.get("enableRtl"),i=n._.createIconNoSpan(t?"smallLeft":"smallRight",this.beans.gridOptionsService);this.addElementClasses(i,"cell-separator"),e.appendChild(i)}},t.STATE_NOT_DRAGGING="notDragging",t.STATE_NEW_COLUMNS_IN="newColumnsIn",t.STATE_REARRANGE_COLUMNS="rearrangeColumns",ai([(0,n.fsG)("columnModel")],t.prototype,"colModel",void 0),ai([(0,n.fsG)("focusService")],t.prototype,"focusService",void 0),t}(n.wA2),di=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),pi=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},hi=function(e){function t(t){return e.call(this,t,"rowGroup")||this}return di(t,e),t.prototype.passBeansUp=function(){e.prototype.setBeans.call(this,{gridOptionsService:this.gridOptionsService,eventService:this.eventService,context:this.getContext(),loggerFactory:this.loggerFactory,dragAndDropService:this.dragAndDropService});var t=this.localeService.getLocaleTextFunc(),i=t("rowGroupColumnsEmptyMessage","Drag here to set row groups"),o=t("groups","Row Groups");e.prototype.init.call(this,{dragAndDropIcon:n.jUB.ICON_GROUP,icon:n._.createIconNoSpan("rowGroupPanel",this.gridOptionsService,null),emptyMessage:i,title:o}),this.addManagedListener(this.eventService,n.zW2.EVENT_COLUMN_ROW_GROUP_CHANGED,this.refreshGui.bind(this))},t.prototype.getAriaLabel=function(){var e=this.localeService.getLocaleTextFunc(),t=e("ariaRowGroupDropZonePanelLabel","Row Groups");return t},t.prototype.getTooltipParams=function(){var t=e.prototype.getTooltipParams.call(this);return t.location="rowGroupColumnsList",t},t.prototype.isColumnDroppable=function(e){return!(this.gridOptionsService.get("functionsReadOnly")||!e.isPrimary())&&(e.isAllowRowGroup()&&
18!e.isRowGroupActive())},t.prototype.updateColumns=function(e){if(this.gridOptionsService.get("functionsPassive")){var t={type:n.zW2.EVENT_COLUMN_ROW_GROUP_CHANGE_REQUEST,columns:e};this.eventService.dispatchEvent(t)}else this.columnModel.setRowGroupColumns(e,"toolPanelUi")},t.prototype.getIconName=function(){return this.isPotentialDndColumns()?n.jUB.ICON_GROUP:n.jUB.ICON_NOT_ALLOWED},t.prototype.getExistingColumns=function(){return this.columnModel.getRowGroupColumns()},pi([(0,n.fsG)("columnModel")],t.prototype,"columnModel",void 0),pi([(0,n.fsG)("loggerFactory")],t.prototype,"loggerFactory",void 0),pi([(0,n.fsG)("dragAndDropService")],t.prototype,"dragAndDropService",void 0),pi([n.NqP],t.prototype,"passBeansUp",null),t}(ui),fi=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),gi=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},vi=function(e){function t(t){return e.call(this,t,"pivot")||this}return fi(t,e),t.prototype.passBeansUp=function(){e.prototype.setBeans.call(this,{gridOptionsService:this.gridOptionsService,eventService:this.eventService,context:this.getContext(),loggerFactory:this.loggerFactory,dragAndDropService:this.dragAndDropService});var t=this.localeService.getLocaleTextFunc(),i=t("pivotColumnsEmptyMessage","Drag here to set column labels"),o=t("pivots","Column Labels");e.prototype.init.call(this,{dragAndDropIcon:n.jUB.ICON_GROUP,icon:n._.createIconNoSpan("pivotPanel",this.gridOptionsService,null),emptyMessage:i,title:o}),this.addManagedListener(this.eventService,n.zW2.EVENT_NEW_COLUMNS_LOADED,this.refresh.bind(this)),this.addManagedListener(this.eventService,n.zW2.EVENT_COLUMN_PIVOT_CHANGED,this.refresh.bind(this)),this.addManagedListener(this.eventService,n.zW2.EVENT_COLUMN_PIVOT_MODE_CHANGED,this.checkVisibility.bind(this)),this.refresh()},t.prototype.getAriaLabel=function(){var e=this.localeService.getLocaleTextFunc(),t=e("ariaPivotDropZonePanelLabel","Column Labels");return t},t.prototype.getTooltipParams=function(){var t=e.prototype.getTooltipParams.call(this);return t.location="pivotColumnsList",t},t.prototype.refresh=function(){this.checkVisibility(),this.refreshGui()},t.prototype.checkVisibility=function(){var e=this.columnModel.isPivotMode();if(this.isHorizontal())switch(this.gridOptionsService.get("pivotPanelShow")){case"always":this.setDisplayed(e);break;case"onlyWhenPivoting":var t=this.columnModel.isPivotActive();this.setDisplayed(e&&t);break;default:this.setDisplayed(!1);break}else this.setDisplayed(e)},t.prototype.isColumnDroppable=function(e){return!(this.gridOptionsService.get("functionsReadOnly")||!e.isPrimary())&&(e.isAllowPivot()&&!e.isPivotActive())},t.prototype.updateColumns=function(e){if(this.gridOptionsService.get("functionsPassive")){var t={type:n.zW2.EVENT_COLUMN_PIVOT_CHANGE_REQUEST,columns:e};this.eventService.dispatchEvent(t)}else this.columnModel.setPivotColumns(e,"toolPanelUi")},t.prototype.getIconName=function(){return this.isPotentialDndColumns()?n.jUB.ICON_PIVOT:n.jUB.ICON_NOT_ALLOWED},t.prototype.getExistingColumns=function(){return this.columnModel.getPivotColumns()},gi([(0,n.fsG)("columnModel")],t.prototype,"columnModel",void 0),gi([(0,n.fsG)("loggerFactory")],t.prototype,"loggerFactory",void 0),gi([(0,n.fsG)("dragAndDropService")],t.prototype,"dragAndDropService",void 0),gi([n.NqP],t.prototype,"passBeansUp",null),t}(ui),yi=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),mi=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Ci=function(e){function t(){return e.call(this)||this}return yi(t,e),t.prototype.postConstruct=function(){var e=this;this.setGui(this.createNorthPanel()),this.addManagedListener(this.eventService,n.zW2.EVENT_COLUMN_ROW_GROUP_CHANGED,(function(){return e.onRowGroupChanged()})),this.addManagedListener(this.eventService,n.zW2.EVENT_NEW_COLUMNS_LOADED,(function(){return e.onRowGroupChanged()})),this.addManagedPropertyListener("rowGroupPanelShow",(function(){return e.onRowGroupChanged()})),this.addManagedPropertyListener("pivotPanelShow",(function(){return e.onPivotPanelShow()})),this.onRowGroupChanged()},t.prototype.createNorthPanel=function(){var e=this,t=document.createElement("div");return t.classList.add("ag-column-drop-wrapper"),n._.setAriaRole(t,"presentation"),this.rowGroupComp=new hi(!0),this.createManagedBean(this.rowGroupComp),this.pivotComp=new vi(!0),this.createManagedBean(this.pivotComp),t.appendChild(this.rowGroupComp.getGui()),t.appendChild(this.pivotComp.getGui()),this.addManagedListener(this.rowGroupComp,n.wA2.EVENT_DISPLAYED_CHANGED,(function(){return e.onDropPanelVisible()})),this.addManagedListener(this.pivotComp,n.wA2.EVENT_DISPLAYED_CHANGED,(function(){return e.onDropPanelVisible()})),this.onDropPanelVisible(),t},t.prototype.onDropPanelVisible=function(){var e=this.rowGroupComp.isDisplayed()&&this.pivotComp.isDisplayed();this.rowGroupComp.addOrRemoveCssClass("ag-column-drop-horizontal-half-width",e),this.pivotComp.addOrRemoveCssClass("ag-column-drop-horizontal-half-width",e)},t.prototype.onRowGroupChanged=function(){if(this.rowGroupComp){var e=this.gridOptionsService.get("rowGroupPanelShow");if("always"===e)this.rowGroupComp.setDisplayed(!0);else if("onlyWhenGrouping"===e){var t=!this.columnModel.isRowGroupEmpty();this.rowGroupComp.setDisplayed(t)}else this.rowGroupComp.setDisplayed(!1)}},t.prototype.onPivotPanelShow=function(){if(this.pivotComp){var e=this.gridOptionsService.get("pivotPanelShow");if("always"===e)this.pivotComp.setDisplayed(!0);else if("onlyWhenPivoting"===e){var t=this.columnModel.isPivotActive();this.pivotComp.setDisplayed(t)}else this.pivotComp.setDisplayed(!1)}},mi([(0,n.fsG)("columnModel")],t.prototype,"columnModel",void 0),mi([n.NqP],t.prototype,"postConstruct",null),t}(n.wA2),bi=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),wi=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Si=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return bi(t,e),t.prototype.execute=function(e){var t=this,i=this.columnModel.isPivotMode(),n=this.filterManager.isAggregateFilterPresent()||this.filterManager.isAggregateQuickFilterPresent(),o=function(e){return!e.node.group}
18,r=function(e){return e.node.leafGroup},s=this.gridOptionsService.getGroupAggFiltering()||(i?r:o),a=e.changedPath,l=function(e,i){void 0===i&&(i=!1),e.childrenAfterFilter&&(e.childrenAfterAggFilter=e.childrenAfterFilter,i&&e.childrenAfterAggFilter.forEach((function(e){return l(e,i)})),t.setAllChildrenCount(e)),e.sibling&&(e.sibling.childrenAfterAggFilter=e.childrenAfterAggFilter)},c=function(e){var i;e.childrenAfterAggFilter=(null===(i=e.childrenAfterFilter)||void 0===i?void 0:i.filter((function(e){var i,n=s({node:e});if(n){var o=t.filterManager.doesRowPassAggregateFilters({rowNode:e});if(o)return l(e,!0),!0}var r=null===(i=e.childrenAfterAggFilter)||void 0===i?void 0:i.length;return r})))||null,t.setAllChildrenCount(e),e.sibling&&(e.sibling.childrenAfterAggFilter=e.childrenAfterAggFilter)};a.forEachChangedNodeDepthFirst(n?c:l,!0)},t.prototype.setAllChildrenCountTreeData=function(e){var t=0;e.childrenAfterAggFilter.forEach((function(e){t++,t+=e.allChildrenCount})),e.setAllChildrenCount(t)},t.prototype.setAllChildrenCountGridGrouping=function(e){var t=0;e.childrenAfterAggFilter.forEach((function(e){e.group?t+=e.allChildrenCount:t++})),e.setAllChildrenCount(t)},t.prototype.setAllChildrenCount=function(e){e.hasChildren()?this.gridOptionsService.get("treeData")?this.setAllChildrenCountTreeData(e):this.setAllChildrenCountGridGrouping(e):e.setAllChildrenCount(null)},wi([(0,n.fsG)("filterManager")],t.prototype,"filterManager",void 0),wi([(0,n.fsG)("columnModel")],t.prototype,"columnModel",void 0),t=wi([(0,n.Vu6)("filterAggregatesStage")],t),t}(n.AS9),Ei="31.0.0",xi=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Oi=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Ti=function(e){function t(){return e.call(this,'\n            <div class="ag-group-filter">\n                <div ref="eGroupField"></div>\n                <div ref="eUnderlyingFilter"></div>\n            </div>\n        ')||this}return xi(t,e),t.prototype.postConstruct=function(){this.initialiseTabGuard({})},t.prototype.init=function(e){var t=this;return this.params=e,this.validateParams(),this.updateGroups().then((function(){t.addManagedListener(t.eventService,n.zW2.EVENT_COLUMN_ROW_GROUP_CHANGED,(function(){return t.onColumnRowGroupChanged()}))}))},t.prototype.validateParams=function(){var e=this.params.colDef;e.field&&n._.warnOnce('Group Column Filter does not work with the colDef property "field". This property will be ignored.'),e.filterValueGetter&&n._.warnOnce('Group Column Filter does not work with the colDef property "filterValueGetter". This property will be ignored.'),e.filterParams&&n._.warnOnce('Group Column Filter does not work with the colDef property "filterParams". This property will be ignored.')},t.prototype.updateGroups=function(){var e=this.updateGroupField();return this.getUnderlyingFilters(e)},t.prototype.getSourceColumns=function(){if(this.groupColumn=this.params.column,this.gridOptionsService.get("treeData"))return n._.warnOnce("Group Column Filter does not work with Tree Data enabled. Please disable Tree Data, or use a different filter."),[];var e=this.columnModel.getSourceColumnsForGroupColumn(this.groupColumn);return e||(n._.warnOnce("Group Column Filter only works on group columns. Please use a different filter."),[])},t.prototype.updateGroupField=function(){var e=this;n._.clearElement(this.eGroupField),this.eGroupFieldSelect&&this.destroyBean(this.eGroupFieldSelect);var t=this.getSourceColumns(),i=t.filter((function(e){return e.isFilterAllowed()}));return i.length?(1===t.length?(this.selectedColumn=i[0],n._.setDisplayed(this.eGroupField,!1)):(this.selectedColumn&&i.some((function(t){return t.getId()===e.selectedColumn.getId()}))||(this.selectedColumn=i[0]),this.createGroupFieldSelectElement(i),this.eGroupField.appendChild(this.eGroupFieldSelect.getGui()),this.eGroupField.appendChild(n._.loadTemplate('<div class="ag-filter-separator"></div>')),n._.setDisplayed(this.eGroupField,!0)),i):(this.selectedColumn=void 0,n._.setDisplayed(this.eGroupField,!1),null)},t.prototype.createGroupFieldSelectElement=function(e){var t=this;this.eGroupFieldSelect=this.createManagedBean(new n.wGv);var i=this.localeService.getLocaleTextFunc();this.eGroupFieldSelect.setLabel(i("groupFilterSelect","Select field:")),this.eGroupFieldSelect.setLabelAlignment("top"),this.eGroupFieldSelect.addOptions(e.map((function(e){var i;return{value:e.getId(),text:null!==(i=t.columnModel.getDisplayNameForColumn(e,"groupFilter",!1))&&void 0!==i?i:void 0}}))),this.eGroupFieldSelect.setValue(this.selectedColumn.getId()),this.eGroupFieldSelect.onValueChange((function(e){return t.updateSelectedColumn(e)})),this.eGroupFieldSelect.addCssClass("ag-group-filter-field-select-wrapper"),1===e.length&&this.eGroupFieldSelect.setDisabled(!0)},t.prototype.getUnderlyingFilters=function(e){var t=this;if(!e)return this.filterColumnPairs=void 0,this.selectedFilter=void 0,this.groupColumn.setFilterActive(!1,"columnRowGroupChanged"),n.j_S.resolve();var i=[],o=[];return e.forEach((function(e){var n=t.filterManager.getOrCreateFilterWrapper(e,"COLUMN_MENU");(null===n||void 0===n?void 0:n.filterPromise)&&i.push(n.filterPromise.then((function(i){return i&&o.push({f
18ilter:i,column:e}),e.getId()===t.selectedColumn.getId()&&(t.selectedFilter=null!==i&&void 0!==i?i:void 0),i})))})),n.j_S.all(i).then((function(){t.filterColumnPairs=o,t.groupColumn.setFilterActive(t.isFilterActive(),"columnRowGroupChanged")}))},t.prototype.addUnderlyingFilterElement=function(){var e=this;if(n._.clearElement(this.eUnderlyingFilter),!this.selectedColumn)return n.j_S.resolve();var t=this.filterManager.getOrCreateFilterWrapper(this.selectedColumn,"COLUMN_MENU");return t?t.guiPromise.then((function(i){var n;e.eUnderlyingFilter.appendChild(i),null===(n=t.filterPromise)||void 0===n||n.then((function(t){var i,n;null===(i=null===t||void 0===t?void 0:t.afterGuiAttached)||void 0===i||i.call(t,e.afterGuiAttachedParams),(null===(n=e.afterGuiAttachedParams)||void 0===n?void 0:n.suppressFocus)||!e.eGroupFieldSelect||e.eGroupFieldSelect.isDisabled()||e.eGroupFieldSelect.getFocusableElement().focus()}))})):n.j_S.resolve()},t.prototype.updateSelectedColumn=function(e){var i,n;if(e){null===(n=null===(i=this.selectedFilter)||void 0===i?void 0:i.afterGuiDetached)||void 0===n||n.call(i);var o=this.getFilterColumnPair(e);this.selectedColumn=null===o||void 0===o?void 0:o.column,this.selectedFilter=null===o||void 0===o?void 0:o.filter,this.dispatchEvent({type:t.EVENT_SELECTED_COLUMN_CHANGED}),this.addUnderlyingFilterElement()}},t.prototype.isFilterActive=function(){var e;return!!(null===(e=this.filterColumnPairs)||void 0===e?void 0:e.some((function(e){var t=e.filter;return t.isFilterActive()})))},t.prototype.doesFilterPass=function(){return!0},t.prototype.getModel=function(){return null},t.prototype.setModel=function(){return n.j_S.resolve()},t.prototype.afterGuiAttached=function(e){this.afterGuiAttachedParams=e,this.addUnderlyingFilterElement()},t.prototype.afterGuiDetached=function(){var e,t;n._.clearElement(this.eUnderlyingFilter),null===(t=null===(e=this.selectedFilter)||void 0===e?void 0:e.afterGuiDetached)||void 0===t||t.call(e)},t.prototype.onColumnRowGroupChanged=function(){var e=this;this.updateGroups().then((function(){e.dispatchEvent({type:t.EVENT_COLUMN_ROW_GROUP_CHANGED}),e.eventService.dispatchEvent({type:"filterAllowedUpdated"})}))},t.prototype.getFilterColumnPair=function(e){var t;if(e)return null===(t=this.filterColumnPairs)||void 0===t?void 0:t.find((function(t){var i=t.column;return i.getId()===e}))},t.prototype.getSelectedFilter=function(){return this.selectedFilter},t.prototype.getSelectedColumn=function(){return this.selectedColumn},t.prototype.isFilterAllowed=function(){return!!this.selectedColumn},t.prototype.destroy=function(){e.prototype.destroy.call(this)},t.EVENT_COLUMN_ROW_GROUP_CHANGED="columnRowGroupChanged",t.EVENT_SELECTED_COLUMN_CHANGED="selectedColumnChanged",Oi([(0,n.fsG)("filterManager")],t.prototype,"filterManager",void 0),Oi([(0,n.fsG)("columnModel")],t.prototype,"columnModel",void 0),Oi([(0,n.cqo)("eGroupField")],t.prototype,"eGroupField",void 0),Oi([(0,n.cqo)("eUnderlyingFilter")],t.prototype,"eUnderlyingFilter",void 0),Oi([n.NqP],t.prototype,"postConstruct",null),t}(n.BxR),Di=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ri=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Ai=function(e){function t(){var t=e.call(this,'\n            <div ref="eFloatingFilter" class="ag-group-floating-filter ag-floating-filter-input" role="presentation"></div>\n        ')||this;return t.haveAddedColumnListeners=!1,t}return Di(t,e),t.prototype.init=function(e){var t=this;this.params=e;var i="multipleColumns"===this.gridOptionsService.get("groupDisplayType");return new n.j_S((function(e){t.params.parentFilterInstance((function(n){t.parentFilterInstance=n,i?t.setupUnderlyingFloatingFilterElement().then((function(){return e()})):(t.setupReadOnlyFloatingFilterElement(),e())}))})).then((function(){t.addManagedListener(t.parentFilterInstance,Ti.EVENT_SELECTED_COLUMN_CHANGED,(function(){return t.onSelectedColumnChanged()})),t.addManagedListener(t.parentFilterInstance,Ti.EVENT_COLUMN_ROW_GROUP_CHANGED,(function(){return t.onColumnRowGroupChanged()}))}))},t.prototype.onParamsUpdated=function(e){this.params=e,this.setParams()},t.prototype.setParams=function(){var e,t=this.columnModel.getDisplayNameForColumn(this.params.column,"header",!0),i=this.localeService.getLocaleTextFunc();null===(e=this.eFloatingFilterText)||void 0===e||e.setInputAriaLabel("".concat(t," ").concat(i("ariaFilterInput","Filter Input")))},t.prototype.setupReadOnlyFloatingFilterElement=function(){var e=this;this.eFloatingFilterText||(this.eFloatingFilterText=this.createManagedBean(new n.INo),this.eFloatingFilterText.setDisabled(!0).addGuiEventListener("click",(function(){return e.params.showParentFilter()})),this.setParams()),this.updateDisplayedValue(),this.eFloatingFilter.appendChild(this.eFloatingFilterText.getGui())},t.prototype.setupUnderlyingFloatingFilterElement=function(){var e=this;this.showingUnderlyingFloatingFilter=!1,this.underlyingFloatingFilter=void 0,n._.clearElement(this.eFloatingFilter);var t=this.parentFilterInstance.getSelectedColumn();if(t&&!t.isVisible()){var i=this.filterManager.getFloatingFilterCompDetail
18s(t,this.params.showParentFilter);if(i)return this.compDetails=i,this.haveAddedColumnListeners||(this.haveAddedColumnListeners=!0,this.addManagedListener(t,n.sgG.EVENT_VISIBLE_CHANGED,this.onColumnVisibleChanged.bind(this)),this.addManagedListener(t,n.sgG.EVENT_COL_DEF_CHANGED,this.onColDefChanged.bind(this))),i.newAgStackInstance().then((function(t){var i,n;e.underlyingFloatingFilter=t,null===(i=e.underlyingFloatingFilter)||void 0===i||i.onParentModelChanged(null===(n=e.parentFilterInstance.getSelectedFilter())||void 0===n?void 0:n.getModel()),e.appendChild(t.getGui()),e.showingUnderlyingFloatingFilter=!0}))}return this.setupReadOnlyFloatingFilterElement(),n.j_S.resolve()},t.prototype.onColumnVisibleChanged=function(){this.setupUnderlyingFloatingFilterElement()},t.prototype.onColDefChanged=function(e){var t,i;if(e.column){var n=this.filterManager.getFloatingFilterCompDetails(e.column,this.params.showParentFilter);n&&(null===(i=null===(t=this.underlyingFloatingFilter)||void 0===t?void 0:t.onParamsUpdated)||void 0===i||i.call(t,n.params))}},t.prototype.onParentModelChanged=function(e,t){var i,n;this.showingUnderlyingFloatingFilter?null===(i=this.underlyingFloatingFilter)||void 0===i||i.onParentModelChanged(null===(n=this.parentFilterInstance.getSelectedFilter())||void 0===n?void 0:n.getModel(),t):this.updateDisplayedValue()},t.prototype.updateDisplayedValue=function(){if(this.parentFilterInstance&&this.eFloatingFilterText){var e=this.parentFilterInstance.getSelectedFilter();if(!e)return this.eFloatingFilterText.setValue(""),void this.eFloatingFilterText.setDisplayed(!1);if(this.eFloatingFilterText.setDisplayed(!0),e.getModelAsString){var t=e.getModel();this.eFloatingFilterText.setValue(null==t?"":e.getModelAsString(t))}else this.eFloatingFilterText.setValue("")}},t.prototype.onSelectedColumnChanged=function(){this.showingUnderlyingFloatingFilter||this.updateDisplayedValue()},t.prototype.onColumnRowGroupChanged=function(){this.showingUnderlyingFloatingFilter||this.updateDisplayedValue()},t.prototype.destroy=function(){e.prototype.destroy.call(this)},Ri([(0,n.fsG)("columnModel")],t.prototype,"columnModel",void 0),Ri([(0,n.fsG)("filterManager")],t.prototype,"filterManager",void 0),Ri([(0,n.cqo)("eFloatingFilter")],t.prototype,"eFloatingFilter",void 0),t}(n.wA2),_i={version:Ei,moduleName:n.GXE.RowGroupingModule,beans:[Rt,Si,Nt,Bt,Wt,qt],agStackComponents:[{componentName:"AgGridHeaderDropZones",componentClass:Ci}],userComponents:[{componentName:"agGroupColumnFilter",componentClass:Ti},{componentName:"agGroupColumnFloatingFilter",componentClass:Ai}],dependantModules:[y]},Pi=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Mi=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},ki=function(e){function t(t){return e.call(this,t,"aggregation")||this}return Pi(t,e),t.prototype.passBeansUp=function(){e.prototype.setBeans.call(this,{gridOptionsService:this.gridOptionsService,eventService:this.eventService,context:this.getContext(),loggerFactory:this.loggerFactory,dragAndDropService:this.dragAndDropService});var t=this.localeService.getLocaleTextFunc(),i=t("valueColumnsEmptyMessage","Drag here to aggregate"),o=t("values","Values");e.prototype.init.call(this,{dragAndDropIcon:n.jUB.ICON_AGGREGATE,icon:n._.createIconNoSpan("valuePanel",this.gridOptionsService,null),emptyMessage:i,title:o}),this.addManagedListener(this.eventService,n.zW2.EVENT_COLUMN_VALUE_CHANGED,this.refreshGui.bind(this))},t.prototype.getAriaLabel=function(){var e=this.localeService.getLocaleTextFunc(),t=e("ariaValuesDropZonePanelLabel","Values");return t},t.prototype.getTooltipParams=function(){var t=e.prototype.getTooltipParams.call(this);return t.location="valueColumnsList",t},t.prototype.getIconName=function(){return this.isPotentialDndColumns()?n.jUB.ICON_AGGREGATE:n.jUB.ICON_NOT_ALLOWED},t.prototype.isColumnDroppable=function(e){return!(this.gridOptionsService.get("functionsReadOnly")||!e.isPrimary())&&(e.isAllowValue()&&!e.isValueActive())},t.prototype.updateColumns=function(e){if(this.gridOptionsService.get("functionsPassive")){var t={type:n.zW2.EVENT_COLUMN_VALUE_CHANGE_REQUEST,columns:e};this.eventService.dispatchEvent(t)}else this.columnModel.setValueColumns(e,"toolPanelUi")},t.prototype.getExistingColumns=function(){return this.columnModel.getValueColumns()},Mi([(0,n.fsG)("columnModel")],t.prototype,"columnModel",void 0),Mi([(0,n.fsG)("loggerFactory")],t.prototype,"loggerFactory",void 0),Mi([(0,n.fsG)("dragAndDropService")],t.prototype,"dragAndDropService",void 0),Mi([n.NqP],t.prototype,"passBeansUp",null),t}(ui),Ni=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Li=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Ii=function(e){function t(){return e.call(this,t.TEMPLATE)||this}return Ni(t,e),t.prototype.init=function(e,t,i){this.allowDragging=e,this.params=t,this.eventType=i,this.primaryColsHeaderPanel.init(this.params);var o=this.params.suppressColumnFilter,r=this.params.suppressColumnSelectAll,s=this.params.suppressColumnExpandAll;s&&o&&r&&this.primaryColsHeaderPanel.setDisplayed(!1),this.addManagedListener(this.primaryColsListPanel,"groupExpanded",this.onGroupExpanded.bind(this)),this.addManagedListener(this.primaryColsListPanel,"selectionChanged",this.onSelectionChange.bind(this)),this.primaryColsListPanel.init(this.params,this.allowDragging,this.eventType),this.addManagedListener(this.primaryColsHeaderPanel,"expandAll",this.onExpandAll.bind(this)),this.addManagedListener(this.primaryColsHeaderPanel,"collapseAll",this.onCollapseAll.bind(this)),this.addManagedListener(this.primaryColsHeaderPanel,"selectAll",this.onSelectAll.bind(this)),this.addManagedListener(this.primaryColsHeaderPanel,"unselectAll",this.onUnselectAll.bind(this)),this.addManagedListener(this.primaryColsHeaderPanel,"filterChanged",this.onFilterChanged.bind(this)),this.positionableFeature=new n.Gxm(this.getGui(),{minHeight:100}),this.createManagedBean(this.positionableFeature)},t.prototype.toggleResizable=function(e){this.positionableFeature.setRe
18sizable(!!e&&{bottom:!0})},t.prototype.onExpandAll=function(){this.primaryColsListPanel.doSetExpandedAll(!0)},t.prototype.onCollapseAll=function(){this.primaryColsListPanel.doSetExpandedAll(!1)},t.prototype.expandGroups=function(e){this.primaryColsListPanel.setGroupsExpanded(!0,e)},t.prototype.collapseGroups=function(e){this.primaryColsListPanel.setGroupsExpanded(!1,e)},t.prototype.setColumnLayout=function(e){this.primaryColsListPanel.setColumnLayout(e)},t.prototype.onFilterChanged=function(e){this.primaryColsListPanel.setFilterText(e.filterText)},t.prototype.syncLayoutWithGrid=function(){this.primaryColsListPanel.onColumnsChanged()},t.prototype.onSelectAll=function(){this.primaryColsListPanel.doSetSelectedAll(!0)},t.prototype.onUnselectAll=function(){this.primaryColsListPanel.doSetSelectedAll(!1)},t.prototype.onGroupExpanded=function(e){this.primaryColsHeaderPanel.setExpandState(e.state),this.params.onStateUpdated()},t.prototype.onSelectionChange=function(e){this.primaryColsHeaderPanel.setSelectionState(e.state)},t.prototype.getExpandedGroups=function(){return this.primaryColsListPanel.getExpandedGroups()},t.TEMPLATE='<div class="ag-column-select">\n            <ag-primary-cols-header ref="primaryColsHeaderPanel"></ag-primary-cols-header>\n            <ag-primary-cols-list ref="primaryColsListPanel"></ag-primary-cols-list>\n        </div>',Li([(0,n.cqo)("primaryColsHeaderPanel")],t.prototype,"primaryColsHeaderPanel",void 0),Li([(0,n.cqo)("primaryColsListPanel")],t.prototype,"primaryColsListPanel",void 0),t}(n.wA2),Fi=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Gi=function(){return Gi=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Gi.apply(this,arguments)},Vi=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Bi=function(e){function t(){var i=e.call(this,t.TEMPLATE)||this;return i.initialised=!1,i.childDestroyFuncs=[],i}return Fi(t,e),t.prototype.setVisible=function(t){e.prototype.setDisplayed.call(this,t),t&&!this.initialised&&this.init(this.params)},t.prototype.init=function(e){var t=this,i={suppressColumnMove:!1,suppressColumnSelectAll:!1,suppressColumnFilter:!1,suppressColumnExpandAll:!1,contractColumnSelection:!1,suppressPivotMode:!1,suppressRowGroups:!1,suppressValues:!1,suppressPivots:!1,suppressSyncLayoutWithGrid:!1,api:this.gridApi,columnApi:this.columnApi};if(this.params=Gi(Gi(Gi({},i),e),{context:this.gridOptionsService.context}),this.isRowGroupingModuleLoaded()&&!this.params.suppressPivotMode&&(this.pivotModePanel=this.createBean(new Ot),this.childDestroyFuncs.push((function(){return t.destroyBean(t.pivotModePanel)})),this.appendChild(this.pivotModePanel)),this.primaryColsPanel=this.createBean(new Ii),this.childDestroyFuncs.push((function(){return t.destroyBean(t.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 hi(!1)),this.childDestroyFuncs.push((function(){return t.destroyBean(t.rowGroupDropZonePanel)})),this.appendChild(this.rowGroupDropZonePanel)),this.params.suppressValues||(this.valuesDropZonePanel=this.createBean(new ki(!1)),this.childDestroyFuncs.push((function(){return t.destroyBean(t.valuesDropZonePanel)})),this.appendChild(this.valuesDropZonePanel)),this.params.suppressPivots||(this.pivotDropZonePanel=this.createBean(new vi(!1)),this.childDestroyFuncs.push((function(){return t.destroyBean(t.pivotDropZonePanel)})),this.appendChild(this.pivotDropZonePanel)),this.setLastVisible();var o=this.addManagedListener(this.eventService,n.zW2.EVENT_COLUMN_PIVOT_MODE_CHANGED,(function(){t.resetChildrenHeight(),t.setLastVisible()}));this.childDestroyFuncs.push((function(){return o()}))}this.initialised=!0},t.prototype.setPivotModeSectionVisible=function(e){var t=this;this.isRowGroupingModuleLoaded()&&(this.pivotModePanel?this.pivotModePanel.setDisplayed(e):e&&(this.pivotModePanel=this.createBean(new Ot),this.getGui().insertBefore(this.pivotModePanel.getGui(),this.getGui().firstChild),this.childDestroyFuncs.push((function(){return t.destroyBean(t.pivotModePanel)}))),this.setLastVisible())},t.prototype.setRowGroupsSectionVisible=function(e){this.isRowGroupingModuleLoaded()&&(this.rowGroupDropZonePanel?this.rowGroupDropZonePanel.setDisplayed(e):e&&(this.rowGroupDropZonePanel=this.createManagedBean(new hi(!1)),this.appendChild(this.rowGroupDropZonePanel)),this.setLastVisible())},t.prototype.setValuesSectionVisible=function(e){this.isRowGroupingModuleLoaded()&&(this.valuesDropZonePanel?this.valuesDropZonePanel.setDisplayed(e):e&&(this.valuesDropZonePanel=this.createManagedBean(new ki(!1)),this.appendChild(this.valuesDropZonePanel)),this.setLastVisible())},t.prototype.setPivotSectionVisible=function(e){this.isRowGroupingModuleLoaded()&&(this.pivotDropZonePanel?this.pivotDropZonePanel.setDisplayed(e):e&&(this.pivotDropZonePanel=this.createManagedBean(new vi(!1)),this.appendChild(this.pivotDropZonePanel),this.pivotDropZonePanel.setDisplayed(e)),this.setLastVisible())},t.prototype.setResizers=function(){[this.primaryColsPanel,this.rowGroupDropZonePanel,this.valuesDropZonePanel,this.pivotDropZonePanel].forEach((function(e){if(e){var t=e.getGui();e.toggleResizable(!t.classList.contains("ag-last-column-drop")&&!t.classList.contains("ag-hidden"))}}))},t.prototype.setLastVisible=function(){var e=this.getGui(),t=Array.prototype.slice.call(e.querySelectorAll(".ag-column-drop"));t.forEach((function(e){return e.classList.remove("ag-last-column-drop")}));var i=e.querySelectorAll(".ag-column-drop:not(.ag-hidden)"),o=n._.last(i);o&&o.classList.add("ag-last-column-drop"),this.setResizers()},t.prototype.resetChildrenHeight=function(){for(var e=this.getGui(),t=e.children,i=0;i<t.length;i++){var n=t[i];n.style.removeProperty("height"),n.style.removeProperty("flex")}},t.prototype.isRowGroupingModuleLoaded=function(){return n.O3h.__assertRegistered(n.GXE.RowGroupingModule,"Row Grouping",this.context.getGridId())},t.prototype.expandColumnGroups=function(e){this.primaryColsPanel.expandGroups(e)},t.prototype.collapseColumnGroups=function(e){this.primaryColsPanel.collapseGroups(e)},t.prototype.setColumnLayout=function(e){this.primaryColsPanel.setColumnLayout(e)}
18,t.prototype.syncLayoutWithGrid=function(){this.primaryColsPanel.syncLayoutWithGrid()},t.prototype.destroyChildren=function(){this.childDestroyFuncs.forEach((function(e){return e()})),this.childDestroyFuncs.length=0,n._.clearElement(this.getGui())},t.prototype.refresh=function(){this.destroyChildren(),this.init(this.params)},t.prototype.getState=function(){return{expandedGroupIds:this.primaryColsPanel.getExpandedGroups()}},t.prototype.destroy=function(){this.destroyChildren(),e.prototype.destroy.call(this)},t.TEMPLATE='<div class="ag-column-panel"></div>',Vi([(0,n.fsG)("gridApi")],t.prototype,"gridApi",void 0),Vi([(0,n.fsG)("columnApi")],t.prototype,"columnApi",void 0),t}(n.wA2),ji=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Hi=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Wi=function(e){function t(){var t=e.call(this,'<div class="ag-tool-panel-horizontal-resize"></div>')||this;return t.minWidth=100,t.maxWidth=null,t}return ji(t,e),t.prototype.setElementToResize=function(e){this.elementToResize=e},t.prototype.postConstruct=function(){var 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.gridOptionsService.get("enableRtl"))},t.prototype.dispatchResizeEvent=function(e,t,i){var o={type:n.zW2.EVENT_TOOL_PANEL_SIZE_CHANGED,width:i,started:e,ended:t};this.eventService.dispatchEvent(o)},t.prototype.onResizeStart=function(){this.startingWidth=this.elementToResize.offsetWidth,this.dispatchResizeEvent(!0,!1,this.startingWidth)},t.prototype.onResizeEnd=function(e){return this.onResizing(e,!0)},t.prototype.onResizing=function(e,t){void 0===t&&(t=!1);var i=this.inverted?-1:1,n=Math.max(this.minWidth,Math.floor(this.startingWidth-e*i));null!=this.maxWidth&&(n=Math.min(this.maxWidth,n)),this.elementToResize.style.width="".concat(n,"px"),this.dispatchResizeEvent(!1,t,n)},t.prototype.setInverted=function(e){this.inverted=e},t.prototype.setMaxWidth=function(e){this.maxWidth=e},t.prototype.setMinWidth=function(e){this.minWidth=null!=e?e:100},Hi([(0,n.fsG)("horizontalResizeService")],t.prototype,"horizontalResizeService",void 0),Hi([n.NqP],t.prototype,"postConstruct",null),t}(n.wA2),Ui=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),zi=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Ki=function(e){function t(t){var i=e.call(this)||this;return i.toolPanelDef=t,i}return Ui(t,e),t.prototype.getToolPanelId=function(){return this.toolPanelDef.id},t.prototype.postConstruct=function(){var e=this.createTemplate();this.setTemplate(e),this.setLabel(),this.setIcon(),this.addManagedListener(this.eToggleButton,"click",this.onButtonPressed.bind(this)),this.eToggleButton.setAttribute("id","ag-".concat(this.getCompId(),"-button"))},t.prototype.createTemplate=function(){var e='<div class="ag-side-button" role="presentation">\n                <button type="button" ref="eToggleButton" tabindex="-1" role="tab" aria-expanded="false" class="ag-button ag-side-button-button">\n                    <div ref="eIconWrapper" class="ag-side-button-icon-wrapper" aria-hidden="true"></div>
18\n                    <span ref ="eLabel" class="ag-side-button-label"></span>\n                </button>\n            </div>';return e},t.prototype.setLabel=function(){var e=this.localeService.getLocaleTextFunc(),t=this.toolPanelDef,i=e(t.labelKey,t.labelDefault);this.eLabel.innerText=i},t.prototype.setIcon=function(){this.eIconWrapper.insertAdjacentElement("afterbegin",n._.createIconNoSpan(this.toolPanelDef.iconKey,this.gridOptionsService))},t.prototype.onButtonPressed=function(){this.dispatchEvent({type:t.EVENT_TOGGLE_BUTTON_CLICKED})},t.prototype.setSelected=function(e){this.addOrRemoveCssClass("ag-selected",e),n._.setAriaExpanded(this.eToggleButton,e)},t.prototype.getButtonElement=function(){return this.eToggleButton},t.EVENT_TOGGLE_BUTTON_CLICKED="toggleButtonClicked",zi([(0,n.cqo)("eToggleButton")],t.prototype,"eToggleButton",void 0),zi([(0,n.cqo)("eIconWrapper")],t.prototype,"eIconWrapper",void 0),zi([(0,n.cqo)("eLabel")],t.prototype,"eLabel",void 0),zi([n.NqP],t.prototype,"postConstruct",null),t}(n.wA2),Yi=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),qi=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Xi=function(e){function t(){var i=e.call(this,t.TEMPLATE)||this;return i.buttonComps=[],i}return Yi(t,e),t.prototype.postConstruct=function(){this.addManagedListener(this.getFocusableElement(),"keydown",this.handleKeyDown.bind(this))},t.prototype.handleKeyDown=function(e){if(e.key===n.VDZ.TAB&&e.shiftKey){var t=n._.last(this.columnModel.getAllDisplayedColumns());this.focusService.focusGridView(t,!0)&&e.preventDefault()}},t.prototype.setActiveButton=function(e){this.buttonComps.forEach((function(t){t.setSelected(e===t.getToolPanelId())}))},t.prototype.addButtonComp=function(e){var i=this,n=this.createBean(new Ki(e));return this.buttonComps.push(n),this.appendChild(n),n.addEventListener(Ki.EVENT_TOGGLE_BUTTON_CLICKED,(function(){i.dispatchEvent({type:t.EVENT_SIDE_BAR_BUTTON_CLICKED,toolPanelId:e.id})})),n},t.prototype.clearButtons=function(){this.buttonComps=this.destroyBeans(this.buttonComps),n._.clearElement(this.getGui())},t.EVENT_SIDE_BAR_BUTTON_CLICKED="sideBarButtonClicked",t.TEMPLATE='<div class="ag-side-buttons" role="tablist"></div>',qi([(0,n.fsG)("focusService")],t.prototype,"focusService",void 0),qi([(0,n.fsG)("columnModel")],t.prototype,"columnModel",void 0),qi([n.NqP],t.prototype,"postConstruct",null),qi([n.FXL],t.prototype,"clearButtons",null),t}(n.wA2),$i=function(){function e(){}return e.parse=function(t){if(t){if(!0===t)return{toolPanels:[e.DEFAULT_COLUMN_COMP,e.DEFAULT_FILTER_COMP],defaultToolPanel:"columns"};if("string"===typeof t)return e.parse([t]);if(Array.isArray(t)){var i=[];if(t.forEach((function(t){var n=e.DEFAULT_BY_KEY[t];n?i.push(n):console.warn("AG Grid: the key ".concat(t," is not a valid key for specifying a tool panel, valid keys are: ").concat(Object.keys(e.DEFAULT_BY_KEY).join(",")))})),0===i.length)return;return{toolPanels:i,defaultToolPanel:i[0].id}}var n={toolPanels:e.parseComponents(t.toolPanels),defaultToolPanel:t.defaultToolPanel,hiddenByDefault:t.hiddenByDefault,position:t.position};return n}},e.parseComponents=function(t){var i=[];return t?(t.forEach((function(t){var n=null;if("string"===typeof t){var o=e.DEFAULT_BY_KEY[t];if(!o)return void console.warn("AG Grid: the key ".concat(t," is not a valid key for specifying a tool panel, valid keys are: ").concat(Object.keys(e.DEFAULT_BY_KEY).join(",")));n=o}else n=t;i.push(n)})),i):i},e.DEFAULT_COLUMN_COMP={id:"columns",labelDefault:"Columns",labelKey:"columns",iconKey:"columns",toolPanel:"agColumnsToolPanel"},e.DEFAULT_FILTER_COMP={id:"filters",labelDefault:"Filters",labelKey:"filters",iconKey:"filter",toolPanel:"agFiltersToolPanel"},e.DEFAULT_BY_KEY={columns:e.DEFAULT_COLUMN_COMP,filters:e.DEFAULT_FILTER_COMP},e}(),Zi=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ji=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Qi=function(e){function t(){return e.call(this,t.TEMPLATE)||this}return Zi(t,e),t.prototype.setupResize=function(){var e=this.getGui(),t=this.resizeBar=this.createManagedBean(new Wi);e.setAttribute("id","ag-".concat(this.getCompId())),t.setElementToResize(e),this.appendChild(t)},t.prototype.getToolPanelId=function(){return this.toolPanelId},t.prototype.setToolPanelDef=function(e,t){var i=e.id,n=e.minWidth,o=e.maxWidth,r=e.width;this.toolPanelId=i,this.width=r;
18var s=this.userComponentFactory.getToolPanelCompDetails(e,t),a=s.newAgStackInstance();null!=a?(a.then(this.setToolPanelComponent.bind(this)),null!=n&&this.resizeBar.setMinWidth(n),null!=o&&this.resizeBar.setMaxWidth(o)):console.warn("AG Grid: error processing tool panel component ".concat(i,". You need to specify 'toolPanel'"))},t.prototype.setToolPanelComponent=function(e){var t=this;this.toolPanelCompInstance=e,this.appendChild(e.getGui()),this.addDestroyFunc((function(){t.destroyBean(e)})),this.width&&(this.getGui().style.width="".concat(this.width,"px"))},t.prototype.getToolPanelInstance=function(){return this.toolPanelCompInstance},t.prototype.setResizerSizerSide=function(e){var t=this.gridOptionsService.get("enableRtl"),i="left"===e,n=t?i:!i;this.resizeBar.setInverted(n)},t.prototype.refresh=function(){this.toolPanelCompInstance.refresh()},t.TEMPLATE='<div class="ag-tool-panel-wrapper" role="tabpanel"/>',Ji([(0,n.fsG)("userComponentFactory")],t.prototype,"userComponentFactory",void 0),Ji([n.NqP],t.prototype,"setupResize",null),t}(n.wA2),en=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),tn=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},nn=function(e){var t="function"===typeof Symbol&&Symbol.iterator,i=t&&e[t],n=0;if(i)return i.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},on=function(e){function t(){var i=e.call(this,t.TEMPLATE)||this;return i.toolPanelWrappers=[],i}return en(t,e),t.prototype.postConstruct=function(){var e,t=this;this.sideBarButtonsComp.addEventListener(Xi.EVENT_SIDE_BAR_BUTTON_CLICKED,this.onToolPanelButtonClicked.bind(this));var i=(null!==(e=this.gridOptionsService.get("initialState"))&&void 0!==e?e:{}).sideBar;this.setSideBarDef(i),this.addManagedPropertyListener("sideBar",(function(){t.clearDownUi(),t.setSideBarDef()})),this.sideBarService.registerSideBarComp(this),this.createManagedBean(new n.D_6(this.getFocusableElement(),{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this)}))},t.prototype.onTabKeyDown=function(e){if(!e.defaultPrevented){var t=this,i=t.focusService,n=t.sideBarButtonsComp,o=this.getGui(),r=n.getGui(),s=this.gridOptionsService.getDocument(),a=s.activeElement,l=o.querySelector(".ag-tool-panel-wrapper:not(.ag-hidden)"),c=e.target;if(l)if(r.contains(a))i.focusInto(l,e.shiftKey)&&e.preventDefault();else if(e.shiftKey){var u=null;l.contains(a)?u=this.focusService.findNextFocusableElement(l,void 0,!0):i.isTargetUnderManagedComponent(l,c)&&e.shiftKey&&(u=this.focusService.findFocusableElementBeforeTabGuard(l,c)),u||(u=r.querySelector(".ag-selected button")),u&&(e.preventDefault(),u.focus())}}},t.prototype.handleKeyDown=function(e){var t=this.gridOptionsService.getDocument();if(this.sideBarButtonsComp.getGui().contains(t.activeElement)){var i=this.sideBarButtonsComp.getGui(),o=Array.prototype.slice.call(i.querySelectorAll(".ag-side-button")),r=t.activeElement,s=o.findIndex((function(e){return e.contains(r)})),a=null;switch(e.key){case n.VDZ.LEFT:case n.VDZ.UP:a=Math.max(0,s-1);break;case n.VDZ.RIGHT:case n.VDZ.DOWN:a=Math.min(s+1,o.length-1);break}if(null!==a){var l=o[a].querySelector("button");l&&(l.focus(),e.preventDefault())}}},t.prototype.onToolPanelButtonClicked=function(e){var t=e.toolPanelId,i=this.openedItem();i===t?this.openToolPanel(void 0,"sideBarButtonClicked"):this.openToolPanel(t,"sideBarButtonClicked")},t.prototype.clearDownUi=function(){this.sideBarButtonsComp.clearButtons(),this.destroyToolPanelWrappers()},t.prototype.setSideBarDef=function(e){this.setDisplayed(!1);var t=this.gridOptionsService.get("sideBar");if(this.sideBar=$i.parse(t),this.sideBar&&this.sideBar.toolPanels){var i=this.sideBar.toolPanels;if(this.createToolPanelsAndSideButtons(i,e),!this.toolPanelWrappers.length)return;var n=e?e.visible:!this.sideBar.hiddenByDefault;if(this.setDisplayed(n),this.setSideBarPosition(e?e.position:this.sideBar.position),n)if(e){var o=e.openToolPanel;o&&this.openToolPanel(o,"sideBarInitializing")}else this.openToolPanel(this.sideBar.defaultToolPanel,"sideBarInitializing")}},t.prototype.getDef=function(){return this.sideBar},t.prototype.setSideBarPosition=function(e){e||(e="right"),this.position=e;var t="left"===e,i=t?"right":"left";return this.addOrRemoveCssClass("ag-side-bar-left",t),this.addOrRemoveCssClass("ag-side-bar-right",!t),this.toolPanelWrappers.forEac
18h((function(e){e.setResizerSizerSide(i)})),this.eventService.dispatchEvent({type:n.zW2.EVENT_SIDE_BAR_UPDATED}),this},t.prototype.setDisplayed=function(t,i){e.prototype.setDisplayed.call(this,t,i),this.eventService.dispatchEvent({type:n.zW2.EVENT_SIDE_BAR_UPDATED})},t.prototype.getState=function(){var e={};return this.toolPanelWrappers.forEach((function(t){var i,n;e[t.getToolPanelId()]=null===(n=(i=t.getToolPanelInstance()).getState)||void 0===n?void 0:n.call(i)})),{visible:this.isDisplayed(),position:this.position,openToolPanel:this.openedItem(),toolPanels:e}},t.prototype.createToolPanelsAndSideButtons=function(e,t){var i,n,o;try{for(var r=nn(e),s=r.next();!s.done;s=r.next()){var a=s.value;this.createToolPanelAndSideButton(a,null===(o=null===t||void 0===t?void 0:t.toolPanels)||void 0===o?void 0:o[a.id])}}catch(l){i={error:l}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}},t.prototype.validateDef=function(e){if(null==e.id)return console.warn("AG Grid: please review all your toolPanel components, it seems like at least one of them doesn't have an id"),!1;if("agColumnsToolPanel"===e.toolPanel){var t=!n.O3h.__assertRegistered(n.GXE.ColumnsToolPanelModule,"Column Tool Panel",this.context.getGridId());if(t)return!1}if("agFiltersToolPanel"===e.toolPanel){t=!n.O3h.__assertRegistered(n.GXE.FiltersToolPanelModule,"Filters Tool Panel",this.context.getGridId());if(t)return!1;if(this.filterManager.isAdvancedFilterEnabled())return n._.warnOnce("Advanced Filter does not work with Filters Tool Panel. Filters Tool Panel has been disabled."),!1}return!0},t.prototype.createToolPanelAndSideButton=function(e,t){var i=this;if(this.validateDef(e)){var o=this.sideBarButtonsComp.addButtonComp(e),r=this.getContext().createBean(new Qi);r.setToolPanelDef(e,{initialState:t,onStateUpdated:function(){return i.eventService.dispatchEvent({type:n.zW2.EVENT_SIDE_BAR_UPDATED})}}),r.setDisplayed(!1);var s=r.getGui();this.appendChild(s),this.toolPanelWrappers.push(r),n._.setAriaControls(o.getButtonElement(),s)}},t.prototype.refresh=function(){this.toolPanelWrappers.forEach((function(e){return e.refresh()}))},t.prototype.openToolPanel=function(e,t){void 0===t&&(t="api");var i=this.openedItem();if(i!==e){this.toolPanelWrappers.forEach((function(t){var i=e===t.getToolPanelId();t.setDisplayed(i)}));var n=this.openedItem(),o=i!==n;o&&(this.sideBarButtonsComp.setActiveButton(e),this.raiseToolPanelVisibleEvent(e,null!==i&&void 0!==i?i:void 0,t))}},t.prototype.getToolPanelInstance=function(e){var t=this.toolPanelWrappers.filter((function(t){return t.getToolPanelId()===e}))[0];if(t)return t.getToolPanelInstance();console.warn("AG Grid: unable to lookup Tool Panel as invalid key supplied: ".concat(e))},t.prototype.raiseToolPanelVisibleEvent=function(e,t,i){var o=!!e&&!!t;if(t){var r={type:n.zW2.EVENT_TOOL_PANEL_VISIBLE_CHANGED,source:i,key:t,visible:!1,switchingToolPanel:o};this.eventService.dispatchEvent(r)}if(e){var s={type:n.zW2.EVENT_TOOL_PANEL_VISIBLE_CHANGED,source:i,key:e,visible:!0,switchingToolPanel:o};this.eventService.dispatchEvent(s)}},t.prototype.close=function(e){void 0===e&&(e="api"),this.openToolPanel(void 0,e)},t.prototype.isToolPanelShowing=function(){return!!this.openedItem()},t.prototype.openedItem=function(){var e=null;return this.toolPanelWrappers.forEach((function(t){t.isDisplayed()&&(e=t.getToolPanelId())})),e},t.prototype.destroyToolPanelWrappers=function(){var e=this;this.toolPanelWrappers.forEach((function(t){n._.removeFromParent(t.getGui()),e.destroyBean(t)})),this.toolPanelWrappers.length=0},t.prototype.destroy=function(){this.destroyToolPanelWrappers(),e.prototype.destroy.call(this)},t.TEMPLATE='<div class="ag-side-bar ag-unselectable">\n            <ag-side-bar-buttons ref="sideBarButtons"></ag-side-bar-buttons>\n        </div>',tn([(0,n.fsG)("focusService")],t.prototype,"focusService",void 0),tn([(0,n.fsG)("filterManager")],t.prototype,"filterManager",void 0),tn([(0,n.fsG)("sideBarService")],t.prototype,"sideBarService",void 0),tn([(0,n.cqo)("sideBarButtons")],t.prototype,"sideBarButtonsComp",void 0),tn([n.NqP],t.prototype,"postConstruct",null),t}(n.wA2),rn=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),sn=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},an=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.isColGroupDef=function(e){return e&&"undefined"!==typeof e.children},t.getId=function(e){return t.isColGroupDef(e)?e.groupId:e.colId},t}return rn(t,e),t.prototype.createColumnTree=function(e){var t=this,i=[],o=function(e,r){if(t.isColGroupDef(e)){var s=e,a="undefined"!==typeof s.groupId?s.groupId:s.headerName,l=ne
18w n.KTm(s,a,!1,r),c=[];return s.children.forEach((function(e){var t=o(e,r+1);t&&c.push(t)})),l.setChildren(c),l}var u=e,d=u.colId?u.colId:u.field,p=t.columnModel.getPrimaryColumn(d);return p||i.push(u),p},r=[];return e.forEach((function(e){var t=o(e,0);t&&r.push(t)})),i.length>0&&console.warn("AG Grid: unable to find grid columns for the supplied colDef(s):",i),r},t.prototype.syncLayoutWithGrid=function(e){var t=this.getLeafPathTrees(),i=this.mergeLeafPathTrees(t);e(i)},t.prototype.getLeafPathTrees=function(){var e=function(t,i){var o;if(t instanceof n.KTm)if(t.isPadding())o=i;else{var r=Object.assign({},t.getColGroupDef());r.groupId=t.getGroupId(),r.children=[i],o=r}else{var s=Object.assign({},t.getColDef());s.colId=t.getColId(),o=s}var a=t.getOriginalParent();return a?e(a,o):o},t=this.columnModel.getAllGridColumns(),i=t.filter((function(e){var t=e.getColDef();return e.isPrimary()&&!t.showRowGroup}));return i.map((function(t){return e(t,t.getColDef())}))},t.prototype.mergeLeafPathTrees=function(e){for(var t=this,i=function(e,i){var n=t.isColGroupDef(e)&&t.isColGroupDef(i);return n&&t.getId(e)===t.getId(i)},n=function(e,i){if(!t.isColGroupDef(i))return e;var o=e,r=i;if(r.children&&r.groupId){var s=t.addChildrenToGroup(o,r.groupId,r.children[0]);if(s)return o}return r.children.forEach((function(e){return n(o,e)})),o},o=[],r=1;r<=e.length;r++){var s=e[r-1],a=e[r];i(s,a)?e[r]=n(s,a):o.push(s)}return o},t.prototype.addChildrenToGroup=function(e,t,i){var o=this,r=function(e,t){var i=e.children.map(o.getId),r=n._.includes(i,o.getId(t)),s=n._.last(e.children),a=s&&o.getId(s)!==o.getId(t);return r&&a};if(!this.isColGroupDef(e))return!0;var s=e,a=i;if(r(s,a))return s.children.push(a),!0;if(s.groupId===t){var l=s.children.map(this.getId),c=n._.includes(l,this.getId(a));if(!c)return s.children.push(a),!0}return s.children.forEach((function(e){return o.addChildrenToGroup(e,t,i)})),!1},sn([(0,n.fsG)("columnModel")],t.prototype,"columnModel",void 0),t=sn([(0,n.Vu6)("toolPanelColDefService")],t),t}(n.AS9),ln="31.0.0",cn=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),un=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},dn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return cn(t,e),t.prototype.registerSideBarComp=function(e){this.sideBarComp=e},t.prototype.getSideBarComp=function(){return this.sideBarComp},t=un([(0,n.Vu6)("sideBarService")],t),t}(n.AS9),pn={version:ln,moduleName:n.GXE.SideBarModule,beans:[an,dn],agStackComponents:[{componentName:"AgHorizontalResize",componentClass:Wi},{componentName:"AgSideBar",componentClass:on},{componentName:"AgSideBarButtons",componentClass:Xi}],dependantModules:[y]},hn=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},fn=function(){function e(){}return e.prototype.selectAllChildren=function(e,t,i){var n=this.extractAllLeafColumns(e);this.setAllColumns(n,t,i)},e.prototype.setColumn=function(e,t,i){this.setAllColumns([e],t,i)},e.prototype.setAllColumns=function(e,t,i){this.columnModel.isPivotMode()?this.setAllPivot(e,t,i):this.setAllVisible(e,t,i)},e.prototype.extractAllLeafColumns=function(e){var t=[],i=function(e){e.forEach((function(e){e.isPassesFilter()&&(e.isGroup()?i(e.getChildren()):t.push(e.getColumn()))}))};return i(e),t},e.prototype.setAllVisible=function(e,t,i){var n=[];e.forEach((function(e){e.getColDef().lockVisible||e.isVisible()!=t&&n.push({colId:e.getId(),hide:!t})})),n.length>0&&this.columnModel.applyColumnState({state:n},i)},e.prototype.setAllPivot=function(e,t,i){this.gridOptionsService.get("functionsPassive")?this.setAllPivotPassive(e,t):this.setAllPivotActive(e,t,i)},e.prototype.setAllPivotPassive=function(e,t){var i=this.columnModel.getPivotColumns().slice(),o=this.columnModel.getValueColumns().slice(),r=this.columnModel.getRowGroupColumns().slice(),s=!1,a=!1,l=!1,c=function(e){e.isAnyFunctionActive()||(e.isAllowValue()?(o.push(e),a=!0):e.isAllowRowGroup()?(r.push(e),s=!0):e.isAllowPivot()&&(i.push(e),l=!0))},u=function(e){e.isAnyFunctionActive()&&(i.indexOf(e)>=0&&(n._.removeFromArray(i,e),s=!0),o.indexOf(e)>=0&&(n._.removeFromArray(o,e),a=!0),r.indexOf(e)>=0&&(n._.removeFromArray(r,e),l=!0))},d=t?c:u;if(e.forEach(d),s){var p={type:n.zW2.EVENT_COLUMN_PIVOT_CHANGE_REQUEST,columns:i};this.eventService.dispatchEvent(p)}if(l){var h={type:n.zW2.EVENT_COLUMN_ROW_GROUP_CHANGE_REQUEST,columns:r};this.eventService.dispatchEvent(h)}if(a){var f={type:n.zW2.EVENT_COLUMN_VALUE_CHANGE_REQUEST,columns:r};this.eventService.dispatchEvent(f)}},e.prototype.setAllPivotActive=function(e,t,i){var n=this,o=[],r=function(e){if(!e.isAnyFunctionActive())if(e.isAllowValue()){var t="string"===typeof e.getAggFunc()?e.getAggFunc():n.aggFuncService.getDefaultAggFunc(e);o.push({colId:e.getId(),aggFunc:t})}else e.isAllowRowGroup()?o.push({colId:e.getId(),rowGroup:!0}):e.isAllowPivot()&&o.push({colId:e.getId(),pivot:!0})},s=function(e){var t=e.isPivotActive()||e.isRowGroupActive()||e.isValueActive();t&&o.push({colId:e.getId(),pivot:!1,rowGroup:!1,aggFunc:null})},a=t?r:s;e.forEach(a),o.length>0&&this.columnModel.applyColumnState({state:o},i)},e.prototype.updateColumns=function(e){var t=this,i=e.columns,n=e.visibleState,o=e.pivotState,r=e.eventType,s=i.map((function(e){var i=e.getColId();if(t.columnModel.isPivotMode()){var r=null===o||void 0===o?void 0:o[i];return{colId:i,pivot:null===r||void 0===r?void 0:r.pivot,rowGroup:null===r||void 0===r?void 0:r.rowGroup,aggFunc:null===r||void 0===r?void 0:r.aggFunc}}return{colId:i,hide:!(null===n||void 0===n?void 0:n[i])}}));this.columnModel.applyColumnState({state:s},r)},e.prototype.createPivotState=function(e){return{pivot:e.isPivotActive(),rowGroup:e.isRowGroupActive(),aggFunc:e.isValueActive()?e.getAggFunc():void 0}},hn([(0,n.fsG)("aggFuncService")],e.prototype,"aggFuncService",void 0),hn([(0,n.fsG)("columnModel")],e.prototype,"columnModel",void 0),hn([(0,n.fsG)("gridOptionsService")],e.prototype,"gridOptionsService",void 0),hn([(0,n.fsG)("eventService")],e.prototype,"eventService",void 0),e=hn([(0,n.Vu6)("modelItemUtils")],e),e}(),gn="31.0.0",vn={version:gn,moduleName:n.GXE.ColumnsToolPanelModule,beans:[fn],agStackComponents:[{componentName:"AgPrimaryColsHeader",componentClass:tt},{componentName:"AgPrimaryColsList",componentClass:St},{componentName:"AgPrimaryCols",componentClass:Ii}],userComponents:[{componentName:"agColumnsToolPanel",componentClass:Bi}],dependantModules:[y,_i,pn]},yn={getTemplate:function(e){var t=new Date,i=t.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:i},{name:"dcterms:modified",properties:{rawMap:{"xsi:type":"dcterms:W3CDTF"}},textNode:i}]}}},mn={getTemplate:function(e){var t=e.name,i=e.ContentType,n=e.Extension,o=e.PartName;return{name:t,properties:{rawMap:{Extension:n,PartName:o,ContentType:i}}}}},Cn=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},bn=function(e,t,i){if(i||2===arguments.length)for(var n,o=0,r=t.length;o<r;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},wn={getTemplate:function(e){var t=new Array(e).fill(void 0).map((function(e,t){return{name:"Override",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml",PartName:"/xl/wor
18ksheets/sheet".concat(t+1,".xml")}})),i=Wr.worksheetImages.size,n={};Wr.workbookImageIds.forEach((function(e){n[e.type]=!0}));var o=new Array(i).fill(void 0).map((function(e,t){return{name:"Override",ContentType:"application/vnd.openxmlformats-officedocument.drawing+xml",PartName:"/xl/drawings/drawing".concat(t+1,".xml")}})),r=Object.keys(n).map((function(e){return{name:"Default",ContentType:"image/".concat(e),Extension:e}})),s=bn(bn(bn(bn(bn(bn([],Cn(r),!1),[{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"}],!1),Cn(t),!1),[{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"}],!1),Cn(o),!1),[{name:"Override",ContentType:"application/vnd.openxmlformats-package.core-properties+xml",PartName:"/docProps/core.xml"}],!1).map((function(e){return mn.getTemplate(e)}));return{name:"Types",properties:{rawMap:{xmlns:"http://schemas.openxmlformats.org/package/2006/content-types"}},children:s}}},Sn=9525,En={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},xn=function(e){return Math.round(72*e/96)},On=function(e){return Math.round(96*e/72)},Tn=function(e){return Math.ceil(e*Sn)},Dn=function(e){if(void 0!==e){var t=["Automatic","Roman","Swiss","Modern","Script","Decorative"],i=t.indexOf(e||"Automatic");return Math.max(i,0)}},Rn=function(e,t){if(t){var i;if("number"===typeof t)i=t;else{var n=t;i=n({rowIndex:e})}return xn(i)}},An=function(e,t){var i=e.position,n=i.colSpan,o=i.column;if(e.width)if(n)for(var r=t.slice(o-1,o+n-1),s=0,a=0;a<r.length;a++){var l=r[a].getActualWidth();if(e.width<s+l){e.position.colSpan=a+1,e.totalWidth=e.width,e.width=e.totalWidth-s;break}s+=l}else e.totalWidth=e.width},_n=function(e,t){var i=e.position,n=i.rowSpan,o=i.row;if(e.height)if(n)for(var r=0,s=0,a=o;a<o+n;a++){var l=On(Rn(a,t)||20);if(e.height<r+l){e.position.rowSpan=s+1,e.totalHeight=e.height,e.height=e.totalHeight-r;break}r+=l,s++}else e.totalHeight=e.height},Pn=function(e){var t=n.IUB.createHeader({encoding:"UTF-8",standalone:"yes"}),i=n.IUB.createXml(e);return"".concat(t).concat(i)},Mn=function(e){var t=65,i=26,n=String.fromCharCode,o=Math.floor(e/i),r=e%i;return o&&e!==i?r?o<i?n(t+o-1)+n(t+r-1):Mn(o)+n(t+r-1):Mn(o-1)+"Z":n(t+e-1)},kn=function(e,t){return{name:"xdr:".concat(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()}]}},Nn=function(e){var 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"}}}]}],i=e.recolor&&e.recolor.toLowerCase();switch(i){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}},Ln=function(e,t){return{name:"xdr:nvPicPr",children:[{name:"xdr:cNvPr",properties:{rawMap:{id:t,name:e.id,descr:null!=e.altText?e.altText:void 0}},children:[Nn(e)]},{name:"xdr:cNvPicPr",properties:{rawMap:{preferRelativeResize:"0"}},children:[{name:"a:picLocks"}]}]}},In=function(e){if(e.saturation||e.tint){var 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=function(e,t){return{name:"a:duotone",children:[{name:"a:prstClr",properties:{rawMap:{val:e.color}},children:In(e)},{name:"a:srgbClr",properties:{rawMap:{val:t.color}},children:In(t)}]}},Gn=function(e,t){var i;if(e.transparency){var n=Math.min(Math.max(e.transparency,0),100);i=[{name:"a:alphaModFix",properties:{rawMap:{amt:1e5-Math.round(1e3*n)}}}]}if(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"}}});break}return{name:"xdr:blipFill",children:[{name:"a:blip",properties:{rawMap:{cstate:"print","r:embed":"rId".concat(t),"xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships"}},children:i},{name:"a:stretch",children:[{name:"a:fillRect"}]}]}},Vn=function(e,t){var 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){var n=e.rotation;i.properties={rawMap:{rot:6e4*Math.min(Math.max(n,0),360)}}}var o={name:"a:prstGeom",properties:{rawMap:{prst:"rect"}},children:[{name:"a:avLst"}]},r={name:"xdr:spPr",children:[i,o]};return r},Bn=function(e){e.fitCell=!!e.fitCell||!e.width||!e.height;var t=e.position,i=void 0===t?{}:t,n=e.fitCell,o=e.width,r=void 0===o?0:o,s=e.height,a=void 0===s?0:s,l=e.totalHeight,c=e.totalWidth,u=i.offsetX,d=void 0===u?0:u,p=i.offsetY,h=void 0===p?0:p,f=i.row,g=void 0===f?1:f,v=i.rowSpan,y=void 0===v?1:v,m=i.column,C=void 0===m?1:m,b=i.colSpan,w=void 0===b?1:b;return{from:{row:g-1,col:C-1,offsetX:Tn(d),offsetY:Tn(h)},to:{row:g-1+(n?1:y-1),col:C-1+(n?1:w-1),offsetX:Tn(r+d),offsetY:Tn(a+
18h)},height:Tn(l||a),width:Tn(c||r)}},jn=function(e,t,i,n){return{name:"xdr:pic",children:[Ln(e,t+1),Gn(e,i+1),Vn(e,n)]}},Hn={getTemplate:function(e){var t=e.sheetIndex,i=Wr.worksheetImages.get(t),n=Wr.worksheetImageIds.get(t),o=i.map((function(e,t){var i=Bn(e);return{name:"xdr:twoCellAnchor",properties:{rawMap:{editAs:"absolute"}},children:[kn("from",i.from),kn("to",i.to),jn(e,t,n.get(e.id).index,i),{name:"xdr:clientData"}]}}));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:o}}},Wn=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},Un=function(e){var t=Wn(e,4),i=t[0],n=t[1],o=t[2],r=t[3];return{name:"a:".concat(i),children:[{name:"a:".concat(n),properties:{rawMap:{val:o,lastClr:r}}}]}},zn={getTemplate:function(){return{name:"a:clrScheme",properties:{rawMap:{name:"Office"}},children:[Un(["dk1","sysClr","windowText","000000"]),Un(["lt1","sysClr","window","FFFFFF"]),Un(["dk2","srgbClr","44546A"]),Un(["lt2","srgbClr","E7E6E6"]),Un(["accent1","srgbClr","4472C4"]),Un(["accent2","srgbClr","ED7D31"]),Un(["accent3","srgbClr","A5A5A5"]),Un(["accent4","srgbClr","FFC000"]),Un(["accent5","srgbClr","5B9BD5"]),Un(["accent6","srgbClr","70AD47"]),Un(["hlink","srgbClr","0563C1"]),Un(["folHlink","srgbClr","954F72"])]}}},Kn=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},Yn=function(e){var t=Kn(e,4),i=t[0],n=t[1],o=t[2],r=t[3];return{name:"a:".concat(i),properties:{rawMap:{script:o,typeface:n,panose:r}}}},qn={getTemplate:function(){var e=n._.utf8_encode;return{name:"a:fontScheme",properties:{rawMap:{name:"Office"}},children:[{name:"a:majorFont",children:[Yn(["latin","Calibri Light",void 0,"020F0302020204030204"]),Yn(["ea",""]),Yn(["cs",""]),Yn(["font",e("游ゴシック Light"),"Jpan"]),Yn(["font",e("맑은 고딕"),"Hang"]),Yn(["font",e("等线 Light"),"Hans"]),Yn(["font",e("新細明體"),"Hant"]),Yn(["font","Times New Roman","Arab"]),Yn(["font","Times New Roman","Hebr"]),Yn(["font","Tahoma","Thai"]),Yn(["font","Nyala","Ethi"]),Yn(["font","Vrinda","Beng"]),Yn(["font","Shruti","Gujr"]),Yn(["font","MoolBoran","Khmr"]),Yn(["font","Tunga","Knda"]),Yn(["font","Raavi","Guru"]),Yn(["font","Euphemia","Cans"]),Yn(["font","Plantagenet Cherokee","Cher"]),Yn(["font","Microsoft Yi Baiti","Yiii"]),Yn(["font","Microsoft Himalaya","Tibt"]),Yn(["font","MV Boli","Thaa"]),Yn(["font","Mangal","Deva"]),Yn(["font","Gautami","Telu"]),Yn(["font","Latha","Taml"]),Yn(["font","Estrangelo Edessa","Syrc"]),Yn(["font","Kalinga","Orya"]),Yn(["font","Kartika","Mlym"]),Yn(["font","DokChampa","Laoo"]),Yn(["font","Iskoola Pota","Sinh"]),Yn(["font","Mongolian Baiti","Mong"]),Yn(["font","Times New Roman","Viet"]),Yn(["font","Microsoft Uighur","Uigh"]),Yn(["font","Sylfaen","Geor"]),Yn(["font","Arial","Armn"]),Yn(["font","Leelawadee UI","Bugi"]),Yn(["font","Microsoft JhengHei","Bopo"]),Yn(["font","Javanese Text","Java"]),Yn(["font","Segoe UI","Lisu"]),Yn(["font","Myanmar Text","Mymr"]),Yn(["font","Ebrima","Nkoo"]),Yn(["font","Nirmala UI","Olck"]),Yn(["font","Ebrima","Osma"]),Yn(["font","Phagspa","Phag"]),Yn(["font","Estrangelo Edessa","Syrn"]),Yn(["font","Estrangelo Edessa","Syrj"]),Yn(["font","Estrangelo Edessa","Syre"]),Yn(["font","Nirmala UI","Sora"]),Yn(["font","Microsoft Tai Le","Tale"]),Yn(["font","Microsoft New Tai Lue","Talu"]),Yn(["font","Ebrima","Tfng"])]},{name:"a:minorFont",children:[Yn(["latin","Calibri",void 0,"020F0502020204030204"]),Yn(["ea",""]),Yn(["cs",""]),Yn(["font",e("游ゴシック"),"Jpan"]),Yn(["font",e("맑은 고딕"),"Hang"]),Yn(["font",e("等线"),"Hans"]),Yn(["font",e("新細明體"),"Hant"]),Yn(["font","Arial","Arab"]),Yn(["font","Arial","Hebr"]),Yn(["font","Tahoma","Thai"]),Yn(["font","Nyala","Ethi"]),Yn(["font","Vrinda","Beng"]),Yn(["font","Shruti","Gujr"]),Yn(["font","DaunPenh","Khmr"]),Yn(["font","Tunga","Knda"]),Yn(["font","Raavi","Guru"]),Yn(["font","Euphemia","Cans"]),Yn(["font","Plantagenet Cherokee","Cher"]),Yn(["font","Microsoft Yi Baiti","Yiii"]),Yn(["font","Microsoft Himalaya","Tibt"]),Yn(["font","MV Boli","Thaa"]),Yn(["font","Mangal","Deva"]),Yn(["font","Gautami","Telu"]),Yn(["font","Latha","Taml"]),Yn(["font","Estrangelo Edessa","Syrc"]),Yn(["font","Kalinga","Or
18ya"]),Yn(["font","Kartika","Mlym"]),Yn(["font","DokChampa","Laoo"]),Yn(["font","Iskoola Pota","Sinh"]),Yn(["font","Mongolian Baiti","Mong"]),Yn(["font","Arial","Viet"]),Yn(["font","Microsoft Uighur","Uigh"]),Yn(["font","Sylfaen","Geor"]),Yn(["font","Arial","Armn"]),Yn(["font","Leelawadee UI","Bugi"]),Yn(["font","Microsoft JhengHei","Bopo"]),Yn(["font","Javanese Text","Java"]),Yn(["font","Segoe UI","Lisu"]),Yn(["font","Myanmar Text","Mymr"]),Yn(["font","Ebrima","Nkoo"]),Yn(["font","Nirmala UI","Olck"]),Yn(["font","Ebrima","Osma"]),Yn(["font","Phagspa","Phag"]),Yn(["font","Estrangelo Edessa","Syrn"]),Yn(["font","Estrangelo Edessa","Syrj"]),Yn(["font","Estrangelo Edessa","Syre"]),Yn(["font","Nirmala UI","Sora"]),Yn(["font","Microsoft Tai Le","Tale"]),Yn(["font","Microsoft New Tai Lue","Talu"]),Yn(["font","Ebrima","Tfng"])]}]}}},Xn=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},$n=function(e,t,i){return{name:"a:".concat(e),properties:{rawMap:{val:t}},children:i}},Zn=function(e){var t=Xn(e,6),i=t[0],n=t[1],o=t[2],r=t[3],s=t[4],a=t[5],l=[];return l.push($n("satMod",o)),r&&l.push($n("lumMod",r)),s&&l.push($n("tint",s)),a&&l.push($n("shade",a)),{name:"a:gs",properties:{rawMap:{pos:i}},children:[{name:"a:schemeClr",properties:{rawMap:{val:n}},children:l}]}},Jn=function(e,t){return{name:"a:solidFill",children:[$n("schemeClr",e,t)]}},Qn=function(e){var t=Xn(e,5),i=t[0],n=t[1],o=t[2],r=t[3],s=t[4],a=Xn(s,2),l=a[0],c=a[1];return{name:"a:gradFill",properties:{rawMap:{rotWithShape:i}},children:[{name:"a:gsLst",children:[Zn(n),Zn(o),Zn(r)]},{name:"a:lin",properties:{rawMap:{ang:l,scaled:c}}}]}},eo=function(e){var t=Xn(e,4),i=t[0],n=t[1],o=t[2],r=t[3];return{name:"a:ln",properties:{rawMap:{w:i,cap:n,cmpd:o,algn:r}},children:[Jn("phClr"),$n("prstDash","solid"),{name:"a:miter",properties:{rawMap:{lim:"800000"}}}]}},to=function(e){var t=[];if(e){var i=Xn(e,5),n=i[0],o=i[1],r=i[2],s=i[3],a=i[4];t.push({name:"a:outerShdw",properties:{rawMap:{blurRad:n,dist:o,dir:r,algn:s,rotWithShape:a}},children:[$n("srgbClr","000000",[$n("alpha","63000")])]})}return{name:"a:effectStyle",children:[Object.assign({},{name:"a:effectLst"},t.length?{children:t}:{})]}},io=function(){return{name:"a:fillStyleLst",children:[Jn("phClr"),Qn(["1",["0","phClr","105000","110000","67000"],["50000","phClr","103000","105000","73000"],["100000","phClr","109000","105000","81000"],["5400000","0"]]),Qn(["1",["0","phClr","103000","102000","94000"],["50000","phClr","110000","100000",void 0,"100000"],["100000","phClr","120000","99000",void 0,"78000"],["5400000","0"]])]}},no=function(){return{name:"a:lnStyleLst",children:[eo(["6350","flat","sng","ctr"]),eo(["12700","flat","sng","ctr"]),eo(["19050","flat","sng","ctr"])]}},oo=function(){return{name:"a:effectStyleLst",children:[to(),to(),to(["57150","19050","5400000","ctr","0"])]}},ro=function(){return{name:"a:bgFillStyleLst",children:[Jn("phClr"),Jn("phClr",[$n("tint","95000"),$n("satMod","170000")]),Qn(["1",["0","phClr","150000","102000","93000","98000"],["50000","phClr","130000","103000","98000","90000"],["100000","phClr","120000",void 0,void 0,"63000"],["5400000","0"]])]}},so={getTemplate:function(){return{name:"a:fmtScheme",properties:{rawMap:{name:"Office"}},children:[io(),no(),oo(),ro()]}}},ao={getTemplate:function(){return{name:"a:themeElements",children:[zn.getTemplate(),qn.getTemplate(),so.getTemplate()]}}},lo={getTemplate:function(){return{name:"a:theme",properties:{prefixedAttributes:[{prefix:"xmlns:",map:{a:"http://schemas.openxmlformats.org/drawingml/2006/main"}}],rawMap:{name:"Office Theme"}},children:[ao.getTemplate(),{name:"a:objectDefaults"},{name:"a:extraClrSchemeLst"}]}}},co=function(e){var t=[];return e.forEach((function(e,i){var o=i.toString(),r={name:"t",textNode:n._.utf8_encode(n._.escapeString(o))},s=o.trim().length!==o.length;s&&(r.properties={rawMap:{"xml:space":"preserve"}}),t.push({name:"si",children:[r]})})),t},uo={getTemplate:function(e){return{name:"sst",properties:{rawMap:{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main",count:e.size,uniqueCount:e.size}},children:co(e)}}};function po(e){for(var t=e.split(/(\[[^\]]*\])/),i=0;i<t.length;i++){var o=t[i];o.length&&(o.startsWith("[")||(o=o.replace(/\$/g,'"$"')),t[i]=n._.escapeString(o))}return t.join("")}var ho,fo,go,vo,yo,mo,Co,bo,wo,So,Eo={getTemplate:function(e){var t=e.formatCode,i=e.numFmtId;return t.length&&(t=po(t)),{name:"numFmt",properties:{rawMap:{formatCode:t,numFmtId:i}}}}},xo={getTemplate:function(e){return{name:"numFmts",properties:{rawMap:{count:e.length}},children:e.map((function(e){return Eo.getTemplate(e)}
18))}}},Oo={getTemplate:function(e){var t=e.size,i=e.colorTheme,n=e.color,o=void 0===n?"FF000000":n,r=e.fontName,s=void 0===r?"Calibri":r,a=e.family,l=e.scheme,c=e.italic,u=e.bold,d=e.strikeThrough,p=e.outline,h=e.shadow,f=e.underline,g=e.verticalAlign,v=[{name:"sz",properties:{rawMap:{val:t}}},{name:"color",properties:{rawMap:{theme:i,rgb:o}}},{name:"name",properties:{rawMap:{val:s}}}];return a&&v.push({name:"family",properties:{rawMap:{val:a}}}),l&&v.push({name:"scheme",properties:{rawMap:{val:l}}}),c&&v.push({name:"i"}),u&&v.push({name:"b"}),d&&v.push({name:"strike"}),p&&v.push({name:"outline"}),h&&v.push({name:"shadow"}),f&&v.push({name:"u",properties:{rawMap:{val:f}}}),g&&v.push({name:"vertAlign",properties:{rawMap:{val:g}}}),{name:"font",children:v}}},To={getTemplate:function(e){return{name:"fonts",properties:{rawMap:{count:e.length}},children:e.map((function(e){return Oo.getTemplate(e)}))}}},Do={getTemplate:function(e){var t=e.patternType,i=e.fgTheme,n=e.fgTint,o=e.fgRgb,r=e.bgRgb,s=e.bgIndexed,a={name:"patternFill",properties:{rawMap:{patternType:t}}};return(i||n||o)&&(a.children=[{name:"fgColor",properties:{rawMap:{theme:i,tint:n,rgb:o}}}]),(s||r)&&(a.children||(a.children=[]),a.children.push({name:"bgColor",properties:{rawMap:{indexed:s,rgb:r}}})),{name:"fill",children:[a]}}},Ro={getTemplate:function(e){return{name:"fills",properties:{rawMap:{count:e.length}},children:e.map((function(e){return Do.getTemplate(e)}))}}},Ao=function(e){switch(e){case 1:return"thin";case 2:return"medium";case 3:return"thick";default:return"hair"}},_o={None:"None",Dot:"Dotted",Dash:"Dashed",Double:"Double",DashDot:"DashDot",DashDotDot:"DashDotDot",SlantDashDot:"SlantDashDot"},Po=["Dashed","DashDot","DashDotDot"],Mo={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"},ko={Automatic:"general",Left:"left",Center:"center",Right:"right",Fill:"fill",Justify:"justify",CenterAcrossSelection:"centerContinuous",Distributed:"distributed",JustifyDistributed:"justify"},No={Automatic:void 0,Top:"top",Bottom:"bottom",Center:"center",Justify:"justify",Distributed:"distributed",JustifyDistributed:"justify"},Lo=function(e){return e?Mo[e]||e:"none"},Io=function(e){return void 0==e?e:("#"===e.charAt(0)&&(e=e.substring(1)),6===e.length?"FF"+e:e)},Fo=function(e,t){if(!e)return"thin";var i=Ao(t),n=_o[e];return"Continuous"===e?i:"medium"===i&&-1!==Po.indexOf(n)?"medium".concat(n):n.charAt(0).toLowerCase()+n.substring(1)},Go=function(e){return ko[e]||"general"},Vo=function(e){return No[e]||void 0},Bo=function(e){return{name:"color",properties:{rawMap:{rgb:Io(e||"#000000")}}}},jo={getTemplate:function(e){var t=e.left,i=e.right,n=e.top,o=e.bottom,r=e.diagonal,s=t?[Bo(t.color)]:void 0,a=i?[Bo(i.color)]:void 0,l=n?[Bo(n.color)]:void 0,c=o?[Bo(o.color)]:void 0,u=r?[Bo(r.color)]:void 0;return{name:"border",children:[{name:"left",properties:{rawMap:{style:t&&t.style}},children:s},{name:"right",properties:{rawMap:{style:i&&i.style}},children:a},{name:"top",properties:{rawMap:{style:n&&n.style}},children:l},{name:"bottom",properties:{rawMap:{style:o&&o.style}},children:c},{name:"diagonal",properties:{rawMap:{style:r&&r.style}},children:u}]}}},Ho={getTemplate:function(e){return{name:"borders",properties:{rawMap:{count:e.length}},children:e.map((function(e){return jo.getTemplate(e)}))}}},Wo=function(e){var t=["Context","LeftToRight","RightToLeft"],i=t.indexOf(e);return Math.max(i,0)},Uo={getTemplate:function(e){var t=e.horizontal,i=e.indent,n=e.readingOrder,o=e.rotate,r=e.shrinkToFit,s=e.vertical,a=e.wrapText;return{name:"alignment",properties:{rawMap:{horizontal:t&&Go(t),indent:i,readingOrder:n&&Wo(n),textRotation:o,shrinkToFit:r,vertical:s&&Vo(s),wrapText:a}}}}},zo={getTemplate:function(e){var t=!1===e.protected?0:1,i=!0===e.hideFormula?1:0;return{name:"protection",properties:{rawMap:{hidden:i,locked:t}}}}},Ko={getTemplate:function(e){var t=e.alignment,i=e.borderId,n=e.fillId,o=e.fontId,r=e.numFmtId,s=e.protection,a=e.xfId,l=[];return t&&l.push(Uo.getTemplate(t)),s&&l.push(zo.getTemplate(s)),{name:"xf",properties:{rawMap:{applyAlignment:t?1:void 0,applyProtection:s?1:void 0,applyBorder:i?1:void 0,applyFill:n?1:void 0,borderId:i,fillId:n,applyFont:o?1:void 0,fontId:o,applyNumberFormat:r?1:void 0,numFmtId:r,xfId:a}},children:l.length?l:void 0}}},Yo={getTemplate:function(e){return{name:"cellStyleXfs",properties:{rawMap:{count:e.length}},children:e.map((function(e){return Ko.getTemplate(e)}
18))}}},qo={getTemplate:function(e){return{name:"cellXfs",properties:{rawMap:{count:e.length}},children:e.map((function(e){return Ko.getTemplate(e)}))}}},Xo={getTemplate:function(e){var t=e.builtinId,i=e.name,n=e.xfId;return{name:"cellStyle",properties:{rawMap:{builtinId:t,name:i,xfId:n}}}}},$o={getTemplate:function(e){return{name:"cellStyles",properties:{rawMap:{count:e.length}},children:e.map((function(e){return Xo.getTemplate(e)}))}}},Zo=function(){return Zo=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Zo.apply(this,arguments)},Jo=function(e,t){return-1!==e.indexOf("mixedStyle")&&t>1&&(e+="_".concat(t)),e},Qo=function(){ho={base:0},fo=[],go=[{fontName:"Calibri",colorTheme:"1",family:"2",scheme:"minor"}],vo=[{patternType:"none"},{patternType:"gray125"}],yo=[{left:void 0,right:void 0,top:void 0,bottom:void 0,diagonal:void 0}],mo=[{borderId:0,fillId:0,fontId:0,numFmtId:0}],Co=[{borderId:0,fillId:0,fontId:0,numFmtId:0,xfId:0}],bo=[{builtinId:0,name:"Normal",xfId:0}]},er=function(e){var t=Lo(e.pattern),i=Io(e.color),n=Io(e.patternColor),o=vo.findIndex((function(e){var o=e.patternType,r=e.fgRgb,s=e.bgRgb;return o==t&&r==i&&s==n}));return-1===o&&(o=vo.length,vo.push({patternType:t,fgRgb:i,bgRgb:n})),o},tr=function(e){if(e=n._.utf8_encode(e),En[e])return En[e];var t=fo.findIndex((function(t){return t.formatCode===e}));return-1===t?(t=fo.length+164,fo.push({formatCode:e,numFmtId:t})):t=fo[t].numFmtId,t},ir=function(e){var t,i,n,o,r,s,a,l,c=e.borderBottom,u=e.borderTop,d=e.borderLeft,p=e.borderRight;d&&(n=Fo(d.lineStyle,d.weight),a=Io(d.color)),p&&(o=Fo(p.lineStyle,p.weight),l=Io(p.color)),c&&(t=Fo(c.lineStyle,c.weight),r=Io(c.color)),u&&(i=Fo(u.lineStyle,u.weight),s=Io(u.color));var h=yo.findIndex((function(e){var c=e.left,u=e.right,d=e.top,p=e.bottom;if(!c&&(n||a))return!1;if(!u&&(o||l))return!1;if(!d&&(i||s))return!1;if(!p&&(t||r))return!1;var h=c||{},f=h.style,g=h.color,v=u||{},y=v.style,m=v.color,C=d||{},b=C.style,w=C.color,S=p||{},E=S.style,x=S.color;return f==n&&g==a&&(y==o&&m==l&&(b==i&&w==s&&(E==t&&x==r)))}));return-1===h&&(h=yo.length,yo.push({left:{style:n,color:a},right:{style:o,color:l},top:{style:i,color:s},bottom:{style:t,color:r},diagonal:{style:void 0,color:void 0}})),h},nr=function(e){var t=e.fontName,i=void 0===t?"Calibri":t,o=e.color,r=e.size,s=e.bold,a=e.italic,l=e.outline,c=e.shadow,u=e.strikeThrough,d=e.underline,p=e.family,h=e.verticalAlign,f=i?n._.utf8_encode(i):i,g=Io(o),v=Dn(p),y=d?d.toLocaleLowerCase():void 0,m=h?h.toLocaleLowerCase():void 0,C=go.findIndex((function(e){return e.fontName==f&&e.color==g&&e.size==r&&e.bold==s&&e.italic==a&&e.outline==l&&e.shadow==c&&e.strikeThrough==u&&e.underline==y&&e.verticalAlign==m&&e.family==v}));return-1===C&&(C=go.length,go.push({fontName:f,color:g,size:r,bold:s,italic:a,outline:l,shadow:c,strikeThrough:u,underline:y,verticalAlign:m,family:null!=v?v.toString():void 0})),C},or=function(e){var t=e.alignment,i=e.borders,n=e.font,o=e.interior,r=e.numberFormat,s=e.protection,a=e.id,l=0,c=0,u=0,d=0;a&&(a=Jo(a,wo),void 0==ho[a]&&(o&&(l=er(o)),i&&(c=ir(i)),n&&(u=nr(n)),r&&(d=tr(r.format)),ho[a]=Co.length,Co.push({alignment:t,borderId:c||0,fillId:l||0,fontId:u||0,numFmtId:d||0,protection:s,xfId:0})))},rr={getTemplate:function(e){var t=xo.getTemplate(fo),i=To.getTemplate(go.map((function(t){return Zo(Zo({},t),{size:null!=t.size?t.size:e})}))),n=Ro.getTemplate(vo),o=Ho.getTemplate(yo),r=Yo.getTemplate(mo),s=qo.getTemplate(Co),a=$o.getTemplate(bo);return Qo(),{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,n,o,r,s,a,{name:"tableStyles",properties:{rawMap:{count:0,defaultPivotStyle:"PivotStyleLight16",defaultTableStyle:"TableStyleMedium2"}}}]}}},sr=function(e,t){return ho[Jo(e,t)]||0},ar=function(e,t){wo=t,1===wo&&Qo(),e.forEach(or)},lr={getTemplate:function(e,t){var i=(t+1).toString();return{name:"sheet",properties:{rawMap:{name:e,sheetId:i,"r:id":"rId".concat(i)}}}}},cr={getTemplate:function(e){return{name:"sheets",children:e.map((function(e,t){return lr.getTemplate(e,t)}))}}},ur={getTemplate:function(e){return{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:[cr.getTemplate(e)]}}},dr=function(e){return Math.ceil((e-12)/7+1)},pr={getTemplate:function(e){var t=e.min,i=e.max,n=e.outlineLevel,o=e.s,r=e.width,s=e.hidden,a=e.bestFit,l=1,c="0";return r>1&&(l=dr(r),c="1"),{name:"col",properties:{rawMap:{min:t,max:i,outlineLevel:null!=n?n:void 0,width:l,style:o,hidden:s?"1":"0",bestFit:a?"1":"0",customWidth:c}}}}},hr=function(e){var t=e.charAt(0).toLowerCase();return"s"===t?"inlineStr":t},fr={getTemplate:function(e,t,i){var o=e.ref,r=e.data,s=e.styleId,a=r||{type:"empty",value:null},l=a.type,c=a.value,u=l;"f"===l?u="str":l.charAt(0)===l.charAt(0).toUpperCase()&&(u=hr(l));var d,p={name:"c",properties:{rawMap:{r:o,t:"empty"===u?void 0:u,s:s?sr(s,i):void 0}}};return"empty"===u?p:(d="str"===u&&"f"===l?[{name:"f",textNode:n._.escapeString(n._.utf8_encode(c))}]:"inlineStr"===u?[{name:"is",children:[{name:"t",textNode:n._.escapeString(n._.utf8_encode(c))}]}]:[{name:"v",textNode:c}],Object.assign({},p,{children:d}))}},gr=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},vr=function(e,t,i){if(i||2===arguments.length)for(var n,o=0,r=t.length;o<r;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},yr=function(e,t){for(var i=[],n=0,o=0;o<e.length;o++){var r=e[o];r.mergeAcross&&(i.push({pos:o,excelPos:n}),n+=r.mergeAcross),n++}if(i.length)for(o=i.length-1;o>=0;o--){for(var s=[],a=(r=e[i[o].pos],1);a<=r.mergeAcross;a++)s.push({ref:"".concat(Mn(i[o].excelPos+1+a)).concat(t+1),styleId:r.styleId,data:{type:"empty",value:null}});s.length&&e.splice.apply(e,vr([i[o].pos+1,0],gr(s),!1))}},mr=function(e){var t;return""!==(null===(t=e.data)||void 0===t?void 0:t.value)||void 0!==e.styleId},Cr={getTemplate:function(e,t,i){var n=e.collapsed,o=e.hidden,r=e.height,s=e.outlineLevel,a=e.cells,l=void 0===a?[]:a;yr(l,t);var c=l.filter(mr).map((function(e,t){return fr.getTemplate(e,t,i)}));return{name:"row",properties:{rawMap:{r:t+1,collapsed:n?"1":"0",hidden:o?"1":"0",ht:r,customHeight:null!=r?"1":"0",spans:"1:1",outlineLevel:s||void 0}},children:c}}},br={getTemplate:function(e){return{name:"mergeCell",properties:{rawMap:{ref:e}}}}},wr=function(e,t,i){var n=[],o=[];e.forEach((function(e,i){var r,s=e.cells,a=0;
18s.forEach((function(e,s){var l=s+a+1,c=Mn(l),u=i+1;if(e.mergeAcross){a+=e.mergeAcross;var d=Mn(s+a+1);n.push("".concat(c).concat(u,":").concat(d).concat(u))}t[l-1]||(t[l-1]={});var p=e.collapsibleRanges;p&&p.forEach((function(e){o.push([l+e[0],l+e[1]])})),r=t[l-1],r.min=l,r.max=l,e.ref="".concat(c).concat(u)}))})),o.sort((function(e,t){return e[0]!==t[0]?e[0]-t[0]:t[1]-e[1]}));var r=new Map,s=new Map;return o.filter((function(e){var t=e.toString(),i=r.get(t);return!i&&(r.set(t,!0),!0)})).forEach((function(e){var n=t.find((function(t){return t.min==e[0]&&t.max==e[1]})),o=s.get(e[0]);t.push({min:e[0],max:e[1],outlineLevel:i?void 0:o||1,width:(n||{width:100}).width}),s.set(e[0],(o||0)+1)})),n},Sr=function(e){return!e||"Portrait"!==e&&"Landscape"!==e?"portrait":e.toLocaleLowerCase()},Er=function(e){if(null==e)return 1;var 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"],i=t.indexOf(e);return-1===i?1:i+1},xr=function(e){return function(t){return e.length&&t.push({name:"cols",children:e.map((function(e){return pr.getTemplate(e)}))}),t}},Or=function(e,t){return function(i){return e.length&&i.push({name:"sheetData",children:e.map((function(e,i){return Cr.getTemplate(e,i,t)}))}),i}},Tr=function(e){return function(t){return e.length&&t.push({name:"mergeCells",properties:{rawMap:{count:e.length}},children:e.map((function(e){return br.getTemplate(e)}))}),t}},Dr=function(e){return function(t){var i=e.top,n=void 0===i?.75:i,o=e.right,r=void 0===o?.7:o,s=e.bottom,a=void 0===s?.75:s,l=e.left,c=void 0===l?.7:l,u=e.header,d=void 0===u?.3:u,p=e.footer,h=void 0===p?.3:p;return t.push({name:"pageMargins",properties:{rawMap:{bottom:a,footer:h,header:d,left:c,right:r,top:n}}}),t}},Rr=function(e){return function(t){return e&&t.push({name:"pageSetup",properties:{rawMap:{horizontalDpi:0,verticalDpi:0,orientation:Sr(e.orientation),paperSize:Er(e.pageSize)}}}),t}},Ar=function(e){var t={"&[Page]":"&P","&[Pages]":"&N","&[Date]":"&D","&[Time]":"&T","&[Tab]":"&A","&[Path]":"&Z","&[File]":"&F"};return n._.iterateObject(t,(function(t,i){e=e.replace(t,i)})),e},_r=function(e){return"Center"===e?"C":"Right"===e?"R":"L"},Pr=function(e,t){return t?(e+="&amp;&quot;",e+=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;".concat(t.size)),t.strikeThrough&&(e+="&amp;S"),t.underline&&(e+="&amp;".concat("Double"===t.underline?"E":"U")),t.color&&(e+="&amp;K".concat(t.color.replace("#","").toUpperCase())),e):e},Mr=function(e){return e.reduce((function(e,t){var i=_r(t.position),o=Pr("".concat(e,"&amp;").concat(i),t.font);return"".concat(o).concat(n._.escapeString(n._.utf8_encode(Ar(t.value))))}),"")},kr=function(e){var t=["all","first","even"],i=[];return t.forEach((function(t){var o=e[t],r="all"===t?"odd":t;o&&(o.header||o.footer)&&n._.iterateObject(o,(function(e,t){var n="".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));t&&i.push({name:"".concat(r).concat(n),properties:{rawMap:{"xml:space":"preserve"}},textNode:Mr(t)})}))})),i},Nr=function(e){return function(t){if(!e)return t;var i=null!=e.first?1:0,n=null!=e.even?1:0;return t.push({name:"headerFooter",properties:{rawMap:{differentFirst:i,differentOddEven:n}},children:kr(e)}),t}},Lr=function(e){return function(t){return Wr.worksheetImages.get(e)&&t.push({name:"drawing",properties:{rawMap:{"r:id":"rId1"}}}),t}},Ir=function(){return function(e){return e.push({name:"sheetPr",children:[{name:"outlinePr",properties:{rawMap:{summaryBelow:0}}}]}),e}},Fr=function(e){return function(t){var i=e.reduce((function(e,t){return t.outlineLevel&&t.outlineLevel>e?t.outlineLevel:e}),0);return t.push({name:"sheetFormatPr",properties:{rawMap:{baseColWidth:10,defaultRowHeight:16,outlineLevelRow:i||void 0}}}),t}},Gr={getTemplate:function(e){var t=e.worksheet,i=e.currentSheet,o=e.config,r=o.margins,s=void 0===r?{}:r,a=o.pageSetup,l=o.headerFooterConfig,c=o.suppressColumnOutline,u=t.table,d=u.rows,p=u.columns,h=p&&p.length?wr(d,p,!!c):[],f=n._.compose(Ir(),Fr(d),xr(p),Or(d,i+1),Tr(h),Dr(s),Rr(a),Nr(l),Lr(i)),g=f([]);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:g}}},Vr={getTemplate:function(e){var t=e.Id,i=e.Type,n=e.Target;return{name:"Relationship",properties:{rawMap:{Id:t,Type:i,Target:n}}}}},Br={getTemplate:function(e){var t=e.map((function(e){return Vr.getTemplate(e)}
18));return{name:"Relationships",properties:{rawMap:{xmlns:"http://schemas.openxmlformats.org/package/2006/relationships"}},children:t}}},jr=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},Hr=function(e,t,i){if(i||2===arguments.length)for(var n,o=0,r=t.length;o<r;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},Wr=function(){function e(){}return e.createExcel=function(e,t,i){return this.addSheetName(t),ar(e,this.sheetNames.length),this.createWorksheet(t,i)},e.buildImageMap=function(e,t,i,n,o){var r=this.sheetNames.length,s=this.images.get(e.id);e.position&&e.position.row&&e.position.column||(e.position||(e.position={}),e.position=Object.assign({},e.position,{row:t,column:n.indexOf(i)+1}));var a=e;if(An(a,n),_n(a,o),s){var l=s.find((function(e){return e.sheetId===r}));l?l.image.push(a):s.push({sheetId:r,image:[a]})}else this.images.set(a.id,[{sheetId:r,image:[a]}]),this.workbookImageIds.set(a.id,{type:a.imageType,index:this.workbookImageIds.size});this.buildSheetImageMap(r,a)},e.buildSheetImageMap=function(e,t){var i=this.worksheetImageIds.get(e);i||(i=new Map,this.worksheetImageIds.set(e,i));var n=this.worksheetImages.get(e);n?(n.push(t),i.get(t.id)||i.set(t.id,{index:i.size,type:t.imageType})):(this.worksheetImages.set(e,[t]),i.set(t.id,{index:0,type:t.imageType}))},e.addSheetName=function(e){var t=n._.escapeString(e.name)||"",i="";while(-1!==this.sheetNames.indexOf("".concat(t).concat(i)))if(""===i)i="_1";else{var o=parseInt(i.slice(1),10);i="_".concat(o+1)}e.name="".concat(t).concat(i),this.sheetNames.push(e.name)},e.getStringPosition=function(e){return this.sharedStrings.has(e)?this.sharedStrings.get(e):(this.sharedStrings.set(e,this.sharedStrings.size),this.sharedStrings.size-1)},e.resetFactory=function(){this.sharedStrings=new Map,this.images=new Map,this.worksheetImages=new Map,this.workbookImageIds=new Map,this.worksheetImageIds=new Map,this.sheetNames=[],this.factoryMode=n.nPL.SINGLE_SHEET},e.createWorkbook=function(){return Pn(ur.getTemplate(this.sheetNames))},e.createStylesheet=function(e){return Pn(rr.getTemplate(e))},e.createSharedStrings=function(){return Pn(uo.getTemplate(this.sharedStrings))},e.createCore=function(e){return Pn(yn.getTemplate(e))},e.createContentTypes=function(e){return Pn(wn.getTemplate(e))},e.createRels=function(){var e=Br.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"}]);return Pn(e)},e.createTheme=function(){return Pn(lo.getTemplate())},e.createWorkbookRels=function(e){var t=new Array(e).fill(void 0).map((function(e,t){return{Id:"rId".concat(t+1),Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet",Target:"worksheets/sheet".concat(t+1,".xml")}})),i=Br.getTemplate(Hr(Hr([],jr(t),!1),[{Id:"rId".concat(e+1),Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",Target:"theme/theme1.xml"},{Id:"rId".concat(e+2),Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",Target:"styles.xml"},{Id:"rId".concat(e+3),Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",Target:"sharedStrings.xml"}],!1));return Pn(i)},e.createDrawing=function(e){return Pn(Hn.getTemplate({sheetIndex:e}))},e.createDrawingRel=function(e){var t=this,i=this.worksheetImageIds.get(e),n=[];return i.forEach((function(e,i){n.push({Id:"rId".concat(e.index+1),Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",Target:"../media/image".concat(t.workbookImageIds.get(i).index+1,".").concat(e.type)})})),Pn(Br.getTemplate(n))},e.createWorksheetDrawingRel=function(e){var t=Br.getTemplate([{Id:"rId1",Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",Target:"../drawings/drawing".concat(e+1,".xml")}]);return Pn(t)},e.createWorksheet=function(e,t){return Pn(Gr.getTemplate({worksheet:e,currentSheet:this.sheetNames.length-1,config:t}))},e.sharedStrings=new Map,e.sheetNames=[],e.images=new Map,e.worksheetImages=new Map,e.workbookImageIds=new Map,e.worksheetImageIds=new Map,e.factoryMo
18de=n.nPL.SINGLE_SHEET,e}(),Ur=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),zr=function(){return zr=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},zr.apply(this,arguments)},Kr=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},Yr=function(e,t,i){if(i||2===arguments.length)for(var n,o=0,r=t.length;o<r;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},qr=function(e){function t(t){var i=e.call(this,t)||this;return i.mixedStyles={},i.mixedStyleCounter=0,i.rows=[],i.config=Object.assign({},t),i.stylesByIds={},i.config.baseExcelStyles.forEach((function(e){i.stylesByIds[e.id]=e})),i.excelStyles=Yr([],Kr(i.config.baseExcelStyles),!1),i}return Ur(t,e),t.prototype.addCustomContent=function(e){var t=this;e.forEach((function(e){var i,n=t.rows.length+1;t.config.suppressRowOutline||null==e.outlineLevel||(i=e.outlineLevel);var o={height:Rn(n,e.height||t.config.rowHeight),cells:(e.cells||[]).map((function(e,i){var o,r,s,a=t.addImage(n,t.columnsToExport[i],null===(o=e.data)||void 0===o?void 0:o.value),l=null;e.styleId&&(l="string"===typeof e.styleId?[e.styleId]:e.styleId);var c=t.getStyleId(l);if(a)return t.createCell(c,t.getDataTypeForValue(a.value),null==a.value?"":a.value);var u=null!==(s=null===(r=e.data)||void 0===r?void 0:r.value)&&void 0!==s?s:"",d=t.getDataTypeForValue(u);return e.mergeAcross?t.createMergedCell(c,d,u,e.mergeAcross):t.createCell(c,d,u)})),outlineLevel:i};null!=e.collapsed&&(o.collapsed=e.collapsed),null!=e.hidden&&(o.hidden=e.hidden),t.rows.push(o)}))},t.prototype.onNewHeaderGroupingRow=function(){var e=this,t=[];return this.rows.push({cells:t,height:Rn(this.rows.length+1,this.config.headerRowHeight)}),{onColumn:function(i,o,r,s,a){var l=e.config.styleLinker({rowType:n.aCu.HEADER_GROUPING,rowIndex:1,value:"grouping-".concat(o),columnGroup:i});t.push(zr(zr({},e.createMergedCell(e.getStyleId(l),e.getDataTypeForValue("string"),o,s)),{collapsibleRanges:a}))}}},t.prototype.onNewHeaderRow=function(){return this.onNewRow(this.onNewHeaderColumn,this.config.headerRowHeight)},t.prototype.onNewBodyRow=function(e){var t=this.onNewRow(this.onNewBodyColumn,this.config.rowHeight);return e&&this.addRowOutlineIfNecessary(e),t},t.prototype.prepare=function(t){var i=this;e.prototype.prepare.call(this,t),this.columnsToExport=Yr([],Kr(t),!1),this.cols=t.map((function(e,t){return i.convertColumnToExcel(e,t)}))},t.prototype.parse=function(){var e=this.rows.reduce((function(e,t){return Math.max(e,t.cells.length)}),0);while(this.cols.length<e)this.cols.push(this.convertColumnToExcel(null,this.cols.length+1));var t={name:this.config.sheetName,table:{columns:this.cols,rows:this.rows}};return this.createExcel(t)},t.prototype.addRowOutlineIfNecessary=function(e){var t=this.config,i=t.gridOptionsService,o=t.suppressRowOutline,r=t.rowGroupExpandState,s=void 0===r?"expanded":r,a=i.get("groupHideOpenParents");if(!a&&!o&&null!=e.level){var l=e.footer?1:0,c=n._.last(this.rows);if(c.outlineLevel=e.level+l,"expanded"!==s){var u="collapsed"===s;if(e.isExpandable()){var d=!u&&e.expanded;c.collapsed=!d}c.hidden=!!e.parent&&-1!==e.parent.level&&(u||this.isAnyParentCollapsed(e.parent))}}},t.prototype.isAnyParentCollapsed=function(e){while(e&&-1!==e.level){if(!e.expanded)return!0;e=e.parent}return!1},t.prototype.convertColumnToExcel=function(e,t){var i=this.config.columnWidth;
18if(i)return"number"===typeof i?{width:i}:{width:i({column:e,index:t})};if(e){var n=75;return{width:Math.max(e.getActualWidth(),n)}}return{}},t.prototype.onNewHeaderColumn=function(e,t){var i=this;return function(o,r){var s=i.extractHeaderValue(o),a=i.config.styleLinker({rowType:n.aCu.HEADER,rowIndex:e,value:s,column:o});t.push(i.createCell(i.getStyleId(a),i.getDataTypeForValue("string"),s))}},t.prototype.onNewBodyColumn=function(e,t){var i=this,o=0;return function(r,s,a){if(o>0)o-=1;else{var l=i.extractRowCellValue(r,s,e,"excel",a),c=l.value,u=l.valueFormatted,d=i.config.styleLinker({rowType:n.aCu.BODY,rowIndex:e,value:c,column:r,node:a}),p=i.getStyleId(d),h=r.getColSpan(a),f=i.addImage(e,r,c);f?t.push(i.createCell(p,i.getDataTypeForValue(f.value),null==f.value?"":f.value)):h>1?(o=h-1,t.push(i.createMergedCell(p,i.getDataTypeForValue(c),c,h-1))):t.push(i.createCell(p,i.getDataTypeForValue(c),c,u))}}},t.prototype.onNewRow=function(e,t){var i=[];return this.rows.push({cells:i,height:Rn(this.rows.length+1,t)}),{onColumn:e.bind(this,this.rows.length,i)()}},t.prototype.createExcel=function(e){var t=this,i=t.excelStyles,n=t.config;return Wr.createExcel(i,e,n)},t.prototype.getDataTypeForValue=function(e){return void 0===e?"empty":this.isNumerical(e)?"n":"s"},t.prototype.getType=function(e,t,i){if(this.isFormula(i))return"f";if(t&&t.dataType)switch(t.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:console.warn("AG Grid: Unrecognized data type for excel export [".concat(t.id,".dataType=").concat(t.dataType,"]"))}return e},t.prototype.addImage=function(e,t,i){if(this.config.addImageToCell){var n=this.config.addImageToCell(e,t,i);if(n)return Wr.buildImageMap(n.image,e,t,this.columnsToExport,this.config.rowHeight),n}},t.prototype.createCell=function(e,t,i,n){var o=this.getStyleById(e);!(null===o||void 0===o?void 0:o.dataType)&&"s"===t&&n&&(i=n);var r=this.getType(t,o,i)||t;return{styleId:o?e:void 0,data:{type:r,value:this.getCellValue(r,i)}}},t.prototype.createMergedCell=function(e,t,i,n){var o=null==i?"":i;return{styleId:this.getStyleById(e)?e:void 0,data:{type:t,value:"s"===t?Wr.getStringPosition(o).toString():i},mergeAcross:n}},t.prototype.getCellValue=function(e,t){if(null==t)return Wr.getStringPosition("").toString();switch(e){case"s":return""===t?"":Wr.getStringPosition(t).toString();case"f":return t.slice(1);case"n":return Number(t).toString();default:return t}},t.prototype.getStyleId=function(e){if(!e||!e.length)return null;if(1===e.length)return e[0];var t=e.join("-");return this.mixedStyles[t]||this.addNewMixedStyle(e),this.mixedStyles[t].excelID},t.prototype.addNewMixedStyle=function(e){var t=this;this.mixedStyleCounter+=1;var i="mixedStyle".concat(this.mixedStyleCounter),o={};e.forEach((function(e){t.excelStyles.forEach((function(t){t.id===e&&n._.mergeDeep(o,n._.deepCloneObject(t))}))})),o.id=i,o.name=i;var r=e.join("-");this.mixedStyles[r]={excelID:i,key:r,result:o},this.excelStyles.push(o),this.stylesByIds[i]=o},t.prototype.isFormula=function(e){return null!=e&&(this.config.autoConvertFormulas&&e.toString().startsWith("="))},t.prototype.isNumerical=function(e){return"bigint"===typeof e||isFinite(e)&&""!==e&&!isNaN(parseFloat(e))},t.prototype.getStyleById=function(e){return null==e?null:this.stylesByIds[e]||null},t}(n.WKU),Xr=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),$r=function(){return $r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},$r.apply(this,arguments)},Zr=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Jr=function(e){var t=e.data,i=e.fontSize,o=void 0===i?11:i,r=e.author,s=void 0===r?"AG Grid":r,a=Wr.images.size>0;if(n.EHG.addFolders(["_rels/","docProps/","xl/","xl/theme/","xl/_rels/","xl/worksheets/"]),a){n.EHG.addFolders(["xl/worksheets/_rels","xl/drawings/","xl/drawings/_rels","xl/media/"]);var l=0;
18Wr.images.forEach((function(e){var t=e[0].image[0],i=t.imageType;n.EHG.addFile("xl/media/image".concat(++l,".").concat(i),t.base64,!0)}))}if(!t||0===t.length)return console.warn("AG Grid: Invalid params supplied to getMultipleSheetsAsExcel() - `ExcelExportParams.data` is empty."),void Wr.resetFactory();var c=t.length,u=0;t.forEach((function(e,t){n.EHG.addFile("xl/worksheets/sheet".concat(t+1,".xml"),e),a&&Wr.worksheetImages.get(t)&&es(t,u++)})),n.EHG.addFile("xl/workbook.xml",Wr.createWorkbook()),n.EHG.addFile("xl/styles.xml",Wr.createStylesheet(o)),n.EHG.addFile("xl/sharedStrings.xml",Wr.createSharedStrings()),n.EHG.addFile("xl/theme/theme1.xml",Wr.createTheme()),n.EHG.addFile("xl/_rels/workbook.xml.rels",Wr.createWorkbookRels(c)),n.EHG.addFile("docProps/core.xml",Wr.createCore(s)),n.EHG.addFile("[Content_Types].xml",Wr.createContentTypes(c)),n.EHG.addFile("_rels/.rels",Wr.createRels()),Wr.resetFactory();var d=e.mimeType||"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";return n.EHG.getContent(d)},Qr=function(e){var t=e.fileName,i=void 0===t?"export.xlsx":t,o=Jr(e);o&&n.aVm.download(i,o)},es=function(e,t){var i="xl/drawings",o="".concat(i,"/drawing").concat(t+1,".xml"),r="".concat(i,"/_rels/drawing").concat(t+1,".xml.rels"),s="xl/worksheets/_rels/sheet".concat(e+1,".xml.rels");n.EHG.addFile(r,Wr.createDrawingRel(e)),n.EHG.addFile(o,Wr.createDrawing(e)),n.EHG.addFile(s,Wr.createWorksheetDrawingRel(t))},ts=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Xr(t,e),t.prototype.postConstruct=function(){this.setBeans({gridSerializer:this.gridSerializer,gridOptionsService:this.gridOptionsService})},t.prototype.getMergedParams=function(e){var t=this.gridOptionsService.get("defaultExcelExportParams");return Object.assign({},t,e)},t.prototype.export=function(e){if(this.isExportSuppressed())return console.warn("AG Grid: Export cancelled. Export is not allowed as per your configuration."),"";var t=this.getMergedParams(e),i=this.getData(t),o={data:[i],fontSize:t.fontSize,author:t.author,mimeType:t.mimeType},r=this.packageFile(o);return r&&n.aVm.download(this.getFileName(t.fileName),r),i},t.prototype.exportDataAsExcel=function(e){return this.export(e)},t.prototype.getDataAsExcel=function(e){var t=this.getMergedParams(e),i=this.getData(t),n={data:[i],fontSize:t.fontSize,author:t.author,mimeType:t.mimeType};return this.packageFile(n)}
18,t.prototype.setFactoryMode=function(e){Wr.factoryMode=e},t.prototype.getFactoryMode=function(){return Wr.factoryMode},t.prototype.getSheetDataForExcel=function(e){var t=this.getMergedParams(e),i=this.getData(t);return i},t.prototype.getMultipleSheetsAsExcel=function(e){return Jr(e)},t.prototype.exportMultipleSheetsAsExcel=function(e){return Qr(e)},t.prototype.getDefaultFileExtension=function(){return"xlsx"},t.prototype.createSerializingSession=function(e){var t=this,i=t.columnModel,o=t.valueService,r=t.gridOptionsService,s=t.valueFormatterService,a=t.valueParserService,l="ag-grid";null!=e.sheetName&&(l=n._.utf8_encode(String(e.sheetName).substring(0,31)));var c=$r($r({},e),{sheetName:l,columnModel:i,valueService:o,gridOptionsService:r,valueFormatterService:s,valueParserService:a,suppressRowOutline:e.suppressRowOutline||e.skipRowGroups,headerRowHeight:e.headerRowHeight||e.rowHeight,baseExcelStyles:this.gridOptionsService.get("excelStyles")||[],styleLinker:this.styleLinker.bind(this)});return new qr(c)},t.prototype.styleLinker=function(e){var t=e.rowType,i=e.rowIndex,o=e.value,r=e.column,s=e.columnGroup,a=e.node,l=t===n.aCu.HEADER,c=t===n.aCu.HEADER_GROUPING,u=l?r:s,d=[];if(l||c)return d.push("header"),c&&d.push("headerGroup"),u&&(d=d.concat(n.fQL.getHeaderClassesFromColDef(u.getDefinition(),this.gridOptionsService,r||null,s||null))),d;var p=this.gridOptionsService.get("excelStyles"),h=["cell"];if(!p||!p.length)return h;var f=p.map((function(e){return e.id}));return this.stylingService.processAllCellClasses(r.getDefinition(),{value:o,data:a.data,node:a,colDef:r.getDefinition(),column:r,rowIndex:i,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context},(function(e){f.indexOf(e)>-1&&h.push(e)})),h.sort((function(e,t){return f.indexOf(e)<f.indexOf(t)?-1:1}))},t.prototype.isExportSuppressed=function(){return this.gridOptionsService.get("suppressExcelExport")},t.prototype.packageFile=function(e){return Jr(e)},Zr([(0,n.fsG)("columnModel")],t.prototype,"columnModel",void 0),Zr([(0,n.fsG)("valueService")],t.prototype,"valueService",void 0),Zr([(0,n.fsG)("stylingService")],t.prototype,"stylingService",void 0),Zr([(0,n.fsG)("gridSerializer")],t.prototype,"gridSerializer",void 0),Zr([(0,n.fsG)("gridOptionsService")],t.prototype,"gridOptionsService",void 0),Zr([(0,n.fsG)("valueFormatterService")],t.prototype,"valueFormatterService",void 0),Zr([(0,n.fsG)("valueParserService")],t.prototype,"valueParserService",void 0),Zr([n.NqP],t.prototype,"postConstruct",null),t=Zr([(0,n.Vu6)("excelCreator")],t),t}(n.z0n),is="31.0.0",ns={version:is,moduleName:n.GXE.ExcelExportModule,beans:[ts,n.YaM,n.IFn],dependantModules:[n.jMC,y]},os=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),rs=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};(function(e){e[e["EXPANDED"]=0]="EXPANDED",e[e["COLLAPSED"]=1]="COLLAPSED",e[e["INDETERMINATE"]=2]="INDETERMINATE"})(So||(So={}));var ss=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return os(t,e),t.prototype.preConstruct=function(){this.setTemplate('<div class="ag-filter-toolpanel-search" role="presentation">\n                <div ref="eExpand" class="ag-filter-toolpanel-expand"></div>\n                <ag-input-text-field ref="eFilterTextField" class="ag-filter-toolpanel-search-input"></ag-input-text-field>\n            </div>')},t.prototype.postConstruct=function(){var e=this.localeService.getLocaleTextFunc();this.eFilterTextField.setAutoComplete(!1).setInputAriaLabel(e("ariaFilterColumnsInput","Filter Columns Input")).onValueChange(this.onSearchTextChanged.bind(this)),this.createExpandIcons(),this.setExpandState(So.EXPANDED),this.addManagedListener(this.eExpand,"click",this.onExpandClicked.bind(this)),this.addManagedListener(this.eventService,n.zW2.EVENT_NEW_COLUMNS_LOADED,this.showOrHideOptions.bind(this))},t.prototype.init=function(e){this.params=e,this.columnModel.isReady()&&this.showOrHideOptions()},t.prototype.createExpandIcons=function(){this.eExpand.appendChild(this.eExpandChecked=n._.createIconNoSpan("columnSelectOpen",this.gridOptionsService)),this.eExpand.appendChild(this.eExpandUnchecked=n._.createIconNoSpan("columnSelectClosed",this.gridOptionsService)),this.eExpand.appendChild(this.eExpandIndeterminate=n._.createIconNoSpan("columnSelectIndeterminate",this.gridOptionsService))},t.prototype.showOrHideOptions=function(){var e=!this.params.suppressFilterSearch,t=!this.params.suppressExpandAll,i=this.localeService.getLocaleTextFunc();this.eFilterTextField.setInputPlaceholder(i("searchOoo","Search..."));var o=function(e){return e.getOriginalParent()&&e.isFilterAllowed()},r=this.columnModel.getAllGridColumns().some(o);n._.setDisplayed(this.eFilterTextField.getGui(),e),n._.setDisplayed(this.eExpand,t&&r)},t.prototype.onSearchTextChanged=function(){var e=this;this.onSearchTextChangedDebounced||(this.onSearchTextChangedDebounced=n._.debounce((function(){e.dispatchEvent({type:"searchChanged",searchText:e.eFilterTextField.getValue()})}),300)),this.onSearchTextChangedDebounced()},t.prototype.onExpandClicked=function(){var e=this.currentExpandState===So.EXPANDED?{type:"collapseAll"}
18:{type:"expandAll"};this.dispatchEvent(e)},t.prototype.setExpandState=function(e){this.currentExpandState=e,n._.setDisplayed(this.eExpandChecked,this.currentExpandState===So.EXPANDED),n._.setDisplayed(this.eExpandUnchecked,this.currentExpandState===So.COLLAPSED),n._.setDisplayed(this.eExpandIndeterminate,this.currentExpandState===So.INDETERMINATE)},rs([(0,n.fsG)("columnModel")],t.prototype,"columnModel",void 0),rs([(0,n.cqo)("eExpand")],t.prototype,"eExpand",void 0),rs([(0,n.cqo)("eFilterTextField")],t.prototype,"eFilterTextField",void 0),rs([n.$j7],t.prototype,"preConstruct",null),rs([n.NqP],t.prototype,"postConstruct",null),t}(n.wA2),as=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ls=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},cs=function(e){function t(i,n){var o=e.call(this,t.TEMPLATE)||this;return o.expandedCallback=n,o.expanded=!1,o.hideHeader=i,o}return as(t,e),t.prototype.postConstruct=function(){this.eExpandChecked=n._.createIconNoSpan("columnSelectOpen",this.gridOptionsService),this.eExpandUnchecked=n._.createIconNoSpan("columnSelectClosed",this.gridOptionsService),this.eExpand.appendChild(this.eExpandChecked),this.eExpand.appendChild(this.eExpandUnchecked)},t.prototype.setColumn=function(e){var t=this;this.column=e,this.eFilterName.innerText=this.columnModel.getDisplayNameForColumn(this.column,"filterToolPanel",!1)||"",this.addManagedListener(this.eFilterToolPanelHeader,"click",this.toggleExpanded.bind(this)),this.addManagedListener(this.eFilterToolPanelHeader,"keydown",(function(e){e.key!==n.VDZ.ENTER&&e.key!==n.VDZ.SPACE||(e.preventDefault(),t.toggleExpanded())})),this.addManagedListener(this.eventService,n.zW2.EVENT_FILTER_OPENED,this.onFilterOpened.bind(this)),this.addInIcon("filter",this.eFilterIcon,this.column),n._.setDisplayed(this.eFilterIcon,this.isFilterActive(),{skipAriaHidden:!0}),n._.setDisplayed(this.eExpandChecked,!1),this.hideHeader?(n._.setDisplayed(this.eFilterToolPanelHeader,!1),this.eFilterToolPanelHeader.removeAttribute("tabindex")):this.eFilterToolPanelHeader.setAttribute("tabindex","0"),this.addManagedListener(this.column,n.sgG.EVENT_FILTER_CHANGED,this.onFilterChanged.bind(this)),this.addManagedListener(this.eventService,n.zW2.EVENT_FILTER_DESTROYED,this.onFilterDestroyed.bind(this))},t.prototype.getColumn=function(){return this.column},t.prototype.getColumnFilterName=function(){return this.columnModel.getDisplayNameForColumn(this.column,"filterToolPanel",!1)},t.prototype.addCssClassToTitleBar=function(e){this.eFilterToolPanelHeader.classList.add(e)},t.prototype.addInIcon=function(e,t,i){if(null!=t){var o=n._.createIconNoSpan(e,this.gridOptionsService,i);t.appendChild(o)}},t.prototype.isFilterActive=function(){return this.filterManager.isFilterActive(this.column)},t.prototype.onFilterChanged=function(){n._.setDisplayed(this.eFilterIcon,this.isFilterActive(),{skipAriaHidden:!0}),this.dispatchEvent({type:n.sgG.EVENT_FILTER_CHANGED})},t.prototype.onFilterDestroyed=function(e){this.expanded&&"api"===e.source&&e.column.getId()===this.column.getId()&&this.columnModel.getPrimaryColumn(this.column)&&(this.removeFilterElement(),this.addFilterElement())},t.prototype.toggleExpanded=function(){this.expanded?this.collapse():this.expand()},t.prototype.expand=function(){this.expanded||(this.expanded=!0,n._.setAriaExpanded(this.eFilterToolPanelHeader,!0),n._.setDisplayed(this.eExpandChecked,!0),n._.setDisplayed(this.eExpandUnchecked,!1),this.addFilterElement(),this.expandedCallback())},t.prototype.addFilterElement=function(){var e=this,t=n._.loadTemplate('<div class="ag-filter-toolpanel-instance-filter"></div>'),i=this.filterManager.getOrCreateFilterWrapper(this.column,"TOOLBAR");if(i){var o=i.filterPromise,r=i.guiPromise;null===o||void 0===o||o.then((function(i){e.underlyingFilter=i,i&&r.then((function(n){n&&t.appendChild(n),e.agFilterToolPanelBody.appendChild(t),i.afterGuiAttached&&i.afterGuiAttached({container:"toolPanel"})}))}))}},t.prototype.collapse=function(){var e,t;this.expanded&&(this.expanded=!1,n._.setAriaExpanded(this.eFilterToolPanelHeader,!1),this.removeFilterElement(),n._.setDisplayed(this.eExpandChecked,!1),n._.setDisplayed(this.eExpandUnchecked,!0),null===(t=null===(e=this.underlyingFilter)||void 0===e?void 0:e.afterGuiDetached)||void 0===t||t.call(e),this.expandedCallback())},t.prototype.removeFilterElement=function(){n._.clearElement(this.agFilterToolPanelBody)},t.prototype.isExpanded=function(){return this.expanded},t.prototype.refreshFilter=function(e){var t;if(this.expanded){var i=this.underlyingFilter;i&&(e?"function"===typeof i.refreshVirtualList&&i.refreshVirtualList():null===(t=i.afterGuiDetached)||void 0===t||t.call(i))}},t.prototype.onFilterOpened=function(e){"COLUMN_MENU"===e.source&&e.column===this.column&&this.expanded&&this.collapse()},t.TEMPLATE='\n        <div class="ag-filter-toolpanel-instance">\n            <div class="ag-filter-toolpanel-header ag-filter-toolpanel-instance-header" ref="eFilterToolPanelHeader" role="button" aria-expanded="false">\n                <div ref="eExpand" class="ag-filter-toolpanel-expand"></div>
18\n                <span ref="eFilterName" class="ag-header-cell-text"></span>\n                <span ref="eFilterIcon" class="ag-header-icon ag-filter-icon ag-filter-toolpanel-instance-header-icon" aria-hidden="true"></span>\n            </div>\n            <div class="ag-filter-toolpanel-instance-body ag-filter" ref="agFilterToolPanelBody"></div>\n        </div>',ls([(0,n.cqo)("eFilterToolPanelHeader")],t.prototype,"eFilterToolPanelHeader",void 0),ls([(0,n.cqo)("eFilterName")],t.prototype,"eFilterName",void 0),ls([(0,n.cqo)("agFilterToolPanelBody")],t.prototype,"agFilterToolPanelBody",void 0),ls([(0,n.cqo)("eFilterIcon")],t.prototype,"eFilterIcon",void 0),ls([(0,n.cqo)("eExpand")],t.prototype,"eExpand",void 0),ls([(0,n.fsG)("filterManager")],t.prototype,"filterManager",void 0),ls([(0,n.fsG)("columnModel")],t.prototype,"columnModel",void 0),ls([n.NqP],t.prototype,"postConstruct",null),t}(n.wA2),us=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ds=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},ps=function(e){function t(t,i,n,o,r){var s=e.call(this)||this;return s.columnGroup=t,s.childFilterComps=i,s.depth=o,s.expandedCallback=n,s.showingColumn=r,s}return us(t,e),t.prototype.preConstruct=function(){var e={cssIdentifier:"filter-toolpanel",direction:"vertical"};this.setTemplate(t.TEMPLATE,{filterGroupComp:e})},t.prototype.init=function(){var e=this;this.setGroupTitle(),this.filterGroupComp.setAlignItems("stretch"),this.filterGroupComp.addCssClass("ag-filter-toolpanel-group-level-".concat(this.depth)),this.filterGroupComp.addCssClassToTitleBar("ag-filter-toolpanel-group-level-".concat(this.depth,"-header")),this.childFilterComps.forEach((function(t){e.filterGroupComp.addItem(t),t.addCssClassToTitleBar("ag-filter-toolpanel-group-level-".concat(e.depth+1,"-header"))})),this.refreshFilterClass(),this.addExpandCollapseListeners(),this.addFilterChangedListeners(),this.setupTooltip()},t.prototype.setupTooltip=function(){var e=this;if(this.showingColumn){var t=function(){var t=e.columnGroup.getColDef().headerTooltip;e.setTooltip(t)};t(),this.addManagedListener(this.eventService,n.zW2.EVENT_NEW_COLUMNS_LOADED,t)}},t.prototype.getTooltipParams=function(){var t=e.prototype.getTooltipParams.call(this);return t.location="filterToolPanelColumnGroup",t},t.prototype.addCssClassToTitleBar=function(e){this.filterGroupComp.addCssClassToTitleBar(e)},t.prototype.refreshFilters=function(e){this.childFilterComps.forEach((function(i){i instanceof t?i.refreshFilters(e):i.refreshFilter(e)}))},t.prototype.isColumnGroup=function(){return this.columnGroup instanceof n.KTm},t.prototype.isExpanded=function(){return this.filterGroupComp.isExpanded()},t.prototype.getChildren=function(){return this.childFilterComps},t.prototype.getFilterGroupName=function(){return this.filterGroupName?this.filterGroupName:""},t.prototype.getFilterGroupId=function(){return this.columnGroup.getId()},t.prototype.hideGroupItem=function(e,t){this.filterGroupComp.hideItem(e,t)},t.prototype.hideGroup=function(e){this.setDisplayed(!e)},t.prototype.forEachToolPanelFilterChild=function(e){this.childFilterComps.forEach((function(t){t instanceof cs&&e(t)}))},t.prototype.addExpandCollapseListeners=function(){var e=this,t=this.isColumnGroup()?function(){return e.expandedCallback()}:function(){return e.forEachToolPanelFilterChild((function(e){return e.expand()}))},i=this.isColumnGroup()?function(){return e.expandedCallback()}:function(){return e.forEachToolPanelFilterChild((function(e){return e.collapse()}))};this.addManagedListener(this.filterGroupComp,n.H1u.EVENT_EXPANDED,t),this.addManagedListener(this.filterGroupComp,n.H1u.EVENT_COLLAPSED,i)},t.prototype.getColumns=function(){return this.columnGroup instanceof n.KTm?this.columnGroup.getLeafColumns():[this.columnGroup]},t.prototype.addFilterChangedListeners=function(){var e=this;
18this.getColumns().forEach((function(t){e.addManagedListener(t,n.sgG.EVENT_FILTER_CHANGED,(function(){return e.refreshFilterClass()}))})),this.columnGroup instanceof n.KTm||this.addManagedListener(this.eventService,n.zW2.EVENT_FILTER_OPENED,this.onFilterOpened.bind(this))},t.prototype.refreshFilterClass=function(){var e=this.getColumns(),t=function(){return e.some((function(e){return e.isFilterActive()}))};this.filterGroupComp.addOrRemoveCssClass("ag-has-filter",t())},t.prototype.onFilterOpened=function(e){"COLUMN_MENU"===e.source&&e.column===this.columnGroup&&this.isExpanded()&&this.collapse()},t.prototype.expand=function(){this.filterGroupComp.toggleGroupExpand(!0)},t.prototype.collapse=function(){this.filterGroupComp.toggleGroupExpand(!1)},t.prototype.setGroupTitle=function(){this.filterGroupName=this.columnGroup instanceof n.KTm?this.getColumnGroupName(this.columnGroup):this.getColumnName(this.columnGroup),this.filterGroupComp.setTitle(this.filterGroupName||"")},t.prototype.getColumnGroupName=function(e){return this.columnModel.getDisplayNameForProvidedColumnGroup(null,e,"filterToolPanel")},t.prototype.getColumnName=function(e){return this.columnModel.getDisplayNameForColumn(e,"filterToolPanel",!1)},t.prototype.destroyFilters=function(){this.childFilterComps=this.destroyBeans(this.childFilterComps),n._.clearElement(this.getGui())},t.prototype.destroy=function(){this.destroyFilters(),e.prototype.destroy.call(this)},t.TEMPLATE='<div class="ag-filter-toolpanel-group-wrapper">\n            <ag-group-component ref="filterGroupComp"></ag-group-component>\n        </div>',ds([(0,n.cqo)("filterGroupComp")],t.prototype,"filterGroupComp",void 0),ds([(0,n.fsG)("columnModel")],t.prototype,"columnModel",void 0),ds([n.$j7],t.prototype,"preConstruct",null),ds([n.NqP],t.prototype,"init",null),t}(n.wA2),hs=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),fs=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},gs=function(e){function t(){var i=e.call(this,t.TEMPLATE)||this;return i.initialised=!1,i.hasLoadedInitialState=!1,i.isInitialState=!1,i.filterGroupComps=[],i}return hs(t,e),t.prototype.init=function(e){var t=this;this.initialised=!0;var i={suppressExpandAll:!1,suppressFilterSearch:!1,suppressSyncLayoutWithGrid:!1,api:this.gridApi,columnApi:this.columnApi,context:this.gridOptionsService.context};n._.mergeDeep(i,e),this.params=i,this.params.suppressSyncLayoutWithGrid||this.addManagedListener(this.eventService,n.zW2.EVENT_COLUMN_MOVED,(function(){return t.onColumnsChanged()})),this.addManagedListener(this.eventService,n.zW2.EVENT_NEW_COLUMNS_LOADED,(function(){return t.onColumnsChanged()})),this.addManagedListener(this.eventService,n.zW2.EVENT_TOOL_PANEL_VISIBLE_CHANGED,(function(e){"filters"===e.key&&t.refreshFilters(e.visible)})),this.columnModel.isReady()&&this.onColumnsChanged();var o=this.getAriaElement();n._.setAriaLive(o,"assertive"),n._.setAriaAtomic(o,!1),n._.setAriaRelevant(o,"text")},t.prototype.onColumnsChanged=function(){var e=this.columnModel.isPivotMode(),t=!this.params.suppressSyncLayoutWithGrid&&!e;t?this.syncFilterLayout():this.buildTreeFromProvidedColumnDefs(),this.refreshAriaLabel()},t.prototype.syncFilterLayout=function(){this.toolPanelColDefService.syncLayoutWithGrid(this.setFiltersLayout.bind(this)),this.refreshAriaLabel()},t.prototype.buildTreeFromProvidedColumnDefs=function(){var e=this.columnModel.getPrimaryColumnTree();this.recreateFilters(e)},t.prototype.setFiltersLayout=function(e){var t=this.toolPanelColDefService.createColumnTree(e);this.recreateFilters(t)},t.prototype.recreateFilters=function(e){var t=this,i=this.gridOptionsService.getDocument().activeElement;this.hasLoadedInitialState||(this.hasLoadedInitialState=!0,this.isInitialState=!!this.params.initialState);var o=this.getExpansionState();this.destroyFilters(),this.filterGroupComps=this.recursivelyAddComps(e,0,o);var r=this.filterGroupComps.length;r&&(this.filterGroupComps.forEach((function(e){return t.appendChild(e)})),this.setFirstAndLastVisible(0,r-1)),n._.exists(this.searchFilterText)&&this.searchFilters(this.searchFilterText),this.fireExpandedEvent(),this.getGui().contains(i)&&i.focus(),this.isInitialState=!1,this.refreshAriaLabel()},t.prototype.recursivelyAddComps=function(e,t,i){var o=this;return n._.flatten(e.map((function(e){if(e instanceof n.KTm)return n._.flatten(o.recursivelyAddFilterGroupComps(e,t,i));var r=e;if(!o.shouldDisplayFilter(r))return[];var s=0===t,a=new cs(s,(function(){return o.onFilterExpanded()}));if(o.createBean(a),a.setColumn(r),i.get(r.getId())&&a.expand(),t>0)return a;var l=o.createBean(new ps(r,[a],o.onGroupExpanded.bind(o),t,!0));return l.addCssClassToTitleBar("ag-filter-toolpanel-header"),i.get(l.getFilterGroupId())||l.collapse(),l})))},t.prototype.refreshAriaLabel=function(){var e=this.localeService.getLocaleTextFunc(),t=e("ariaFilterPanelList","Filter List"),i=e("filters","Filters"),o=this.getGui(),r=".ag-filter-toolpanel-group-wrapper",s=".ag-filter-toolpanel-group-item",a=".ag-hidden",l=o.querySelectorAll("".concat(s,":not(").concat(r,", ").concat(a,")")),c=l.length;n._.setAriaLabel(this.getAriaElement(),"".concat(t," ").concat(c," ").concat(i))},t.prototype.recursivelyAddFilterGroupComps=function(e,t,i){if(this.filtersExistInChildren(e.getChildren())){var o=e.getColGroupDef();if(o&&o.suppressFiltersToolPanel)return[];var r=e.isPadding()?t:t+1,s=n._.flatten(this.recursivelyAddComps(e.getChildren(),r,i));if(e.isPadding())return s;var a=new ps(e,s,this.onGroupExpanded.bind(this),t,!1);this.createBean(a),a.addCssClassToTitleBar("ag-filter-toolpanel-header");var l=i.get(a.getFilterGroupId());return(this.isInitialState&&!l||!1===l)&&a.collapse(),[a]}},t.prototype.filtersExistInChildren=function(e){var t=this;return e.some((function(e){return e instanceof n.KTm?t.filtersExistInChildren(e.getChildren()):t.shouldDisplayFilter(e)}))},t.prototype.shouldDisplayFilter=function(e){var t=e.getColDef()&&e.getColDef().suppressFiltersToolPanel;return e.isFilterAllowed()&&!t},t.prototype.getExpansionState=function(){var e=new Map;if(this.isInitialState){var t=this.params.initialState,i=t.expandedColIds,n=t.expandedGroupIds;
18return i.forEach((function(t){return e.set(t,!0)})),n.forEach((function(t){return e.set(t,!0)})),e}var o=function(t){e.set(t.getFilterGroupId(),t.isExpanded()),t.getChildren().forEach((function(t){t instanceof ps?o(t):e.set(t.getColumn().getId(),t.isExpanded())}))};return this.filterGroupComps.forEach(o),e},t.prototype.refresh=function(){},t.prototype.setVisible=function(t){e.prototype.setDisplayed.call(this,t),t&&!this.initialised&&this.init(this.params)},t.prototype.expandFilterGroups=function(e,t){var i=[],o=function(r){var s=r.getFilterGroupId(),a=!t||n._.includes(t,s);a&&(e&&r.isColumnGroup()?r.expand():r.collapse(),i.push(s)),r.getChildren().forEach((function(e){e instanceof ps&&o(e)}))};if(this.filterGroupComps.forEach(o),this.onGroupExpanded(),t){var r=t.filter((function(e){return i.indexOf(e)<0}));r.length>0&&console.warn("AG Grid: unable to find groups for these supplied groupIds:",r)}},t.prototype.expandFilters=function(e,t){var i=[],o=function(r){if(r instanceof ps){var s=!1;return r.getChildren().forEach((function(t){var i=o(t);i&&(e?(r.expand(),s=!0):r.isColumnGroup()||r.collapse())})),s}var a=r.getColumn().getColId(),l=!t||n._.includes(t,a);return l&&(e?r.expand():r.collapse(),i.push(a)),l};if(this.filterGroupComps.forEach(o),this.onGroupExpanded(),t){var r=t.filter((function(e){return i.indexOf(e)<0}));r.length>0&&console.warn("AG Grid: unable to find columns for these supplied colIds:",r)}},t.prototype.onGroupExpanded=function(){this.fireExpandedEvent()},t.prototype.onFilterExpanded=function(){this.dispatchEvent({type:"filterExpanded"})},t.prototype.fireExpandedEvent=function(){var e,t=0,i=0,n=function(e){e.isColumnGroup()&&(e.isExpanded()?t++:i++,e.getChildren().forEac
18h((function(e){e instanceof ps&&n(e)})))};this.filterGroupComps.forEach(n),e=t>0&&i>0?So.INDETERMINATE:i>0?So.COLLAPSED:So.EXPANDED,this.dispatchEvent({type:"groupExpanded",state:e})},t.prototype.performFilterSearch=function(e){this.searchFilterText=n._.exists(e)?e.toLowerCase():null,this.searchFilters(this.searchFilterText)},t.prototype.searchFilters=function(e){var t,i,o=function(t){return!n._.exists(e)||-1!==t.toLowerCase().indexOf(e)},r=function(e,t){if(!(e instanceof ps))return o(e.getColumnFilterName()||"");var i=e.getChildren(),n=o(e.getFilterGroupName()),s=t||n;if(s){e.hideGroup(!1);for(var a=0;a<i.length;a++)r(i[a],s),e.hideGroupItem(!1,a);return!0}var l=!1;return i.forEach((function(i,n){var o=r(i,t);e.hideGroupItem(!o,n),o&&(l=!0)})),e.hideGroup(!l),l};this.filterGroupComps.forEach((function(e,n){r(e,!1),void 0===t?e.containsCssClass("ag-hidden")||(t=n,i=n):e.containsCssClass("ag-hidden")||i===n||(i=n)})),this.setFirstAndLastVisible(t,i),this.refreshAriaLabel()},t.prototype.setFirstAndLastVisible=function(e,t){this.filterGroupComps.forEach((function(i,n){i.removeCssClass("ag-first-group-visible"),i.removeCssClass("ag-last-group-visible"),n===e&&i.addCssClass("ag-first-group-visible"),n===t&&i.addCssClass("ag-last-group-visible")}))},t.prototype.refreshFilters=function(e){this.filterGroupComps.forEach((function(t){return t.refreshFilters(e)}))},t.prototype.getExpandedFiltersAndGroups=function(){var e=[],t=new Set,i=function(n){if(n instanceof ps){n.getChildren().forEac
18h((function(e){return i(e)}));var o=n.getFilterGroupId();n.isExpanded()&&!t.has(o)&&e.push(o)}else n.isExpanded()&&t.add(n.getColumn().getColId())};return this.filterGroupComps.forEach(i),{expandedGroupIds:e,expandedColIds:Array.from(t)}},t.prototype.destroyFilters=function(){this.filterGroupComps=this.destroyBeans(this.filterGroupComps),n._.clearElement(this.getGui())},t.prototype.destroy=function(){this.destroyFilters(),e.prototype.destroy.call(this)},t.TEMPLATE='<div class="ag-filter-list-panel"></div>',fs([(0,n.fsG)("gridApi")],t.prototype,"gridApi",void 0),fs([(0,n.fsG)("columnApi")],t.prototype,"columnApi",void 0),fs([(0,n.fsG)("toolPanelColDefService")],t.prototype,"toolPanelColDefService",void 0),fs([(0,n.fsG)("columnModel")],t.prototype,"columnModel",void 0),t}(n.wA2),vs=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ys=function(){return ys=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ys.apply(this,arguments)},ms=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Cs=function(e){function t(){var i=e.call(this,t.TEMPLATE)||this;return i.initialised=!1,i.listenerDestroyFuncs=[],i}return vs(t,e),t.prototype.init=function(e){this.initialised&&(this.listenerDestroyFuncs.forEach((function(e){return e()})),this.listenerDestroyFuncs=[]),this.initialised=!0;var t={suppressExpandAll:!1,suppressFilterSearch:!1,suppressSyncLayoutWithGrid:!1,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi};this.params=ys(ys(ys({},t),e),{context:this.gridOptionsService.context}),this.filtersToolPanelHeaderPanel.init(this.params),this.filtersToolPanelListPanel.init(this.params);var i=this.params.suppressExpandAll,n=this.params.suppressFilterSearch;i&&n&&this.filtersToolPanelHeaderPanel.setDisplayed(!1),this.listenerDestroyFuncs.push(this.addManagedListener(this.filtersToolPanelHeaderPanel,"expandAll",this.onExpandAll.bind(this)),this.addManagedListener(this.filtersToolPanelHeaderPanel,"collapseAll",this.onCollapseAll.bind(this)),this.addManagedListener(this.filtersToolPanelHeaderPanel,"searchChanged",this.onSearchChanged.bind(this)),this.addManagedListener(this.filtersToolPanelListPanel,"filterExpanded",this.onFilterExpanded.bind(this)),this.addManagedListener(this.filtersToolPanelListPanel,"groupExpanded",this.onGroupExpanded.bind(this)))},t.prototype.setVisible=function(t){e.prototype.setDisplayed.call(this,t),t&&!this.initialised&&this.init(this.params)},t.prototype.onExpandAll=function(){this.filtersToolPanelListPanel.expandFilterGroups(!0)},t.prototype.onCollapseAll=function(){this.filtersToolPanelListPanel.expandFilterGroups(!1)},t.prototype.onSearchChanged=function(e){this.filtersToolPanelListPanel.performFilterSearch(e.searchText)},t.prototype.setFilterLayout=function(e){this.filtersToolPanelListPanel.setFiltersLayout(e)},t.prototype.onFilterExpanded=function(){this.params.onStateUpdated()},t.prototype.onGroupExpanded=function(e){this.filtersToolPanelHeaderPanel.setExpandState(e.state),this.params.onStateUpdated()},t.prototype.expandFilterGroups=function(e){this.filtersToolPanelListPanel.expandFilterGroups(!0,e)},t.prototype.collapseFilterGroups=function(e){this.filtersToolPanelListPanel.expandFilterGroups(!1,e)},t.prototype.expandFilters=function(e){this.filtersToolPanelListPanel.expandFilters(!0,e)},t.prototype.collapseFilters=function(e){this.filtersToolPanelListPanel.expandFilters(!1,e)}
18,t.prototype.syncLayoutWithGrid=function(){this.filtersToolPanelListPanel.syncFilterLayout()},t.prototype.refresh=function(){this.init(this.params)},t.prototype.getState=function(){return this.filtersToolPanelListPanel.getExpandedFiltersAndGroups()},t.prototype.destroy=function(){e.prototype.destroy.call(this)},t.TEMPLATE='<div class="ag-filter-toolpanel">\n            <ag-filters-tool-panel-header ref="filtersToolPanelHeaderPanel"></ag-filters-tool-panel-header>\n            <ag-filters-tool-panel-list ref="filtersToolPanelListPanel"></ag-filters-tool-panel-list>\n         </div>',ms([(0,n.cqo)("filtersToolPanelHeaderPanel")],t.prototype,"filtersToolPanelHeaderPanel",void 0),ms([(0,n.cqo)("filtersToolPanelListPanel")],t.prototype,"filtersToolPanelListPanel",void 0),t}(n.wA2),bs="31.0.0",ws={version:bs,moduleName:n.GXE.FiltersToolPanelModule,beans:[],agStackComponents:[{componentName:"AgFiltersToolPanelHeader",componentClass:ss},{componentName:"AgFiltersToolPanelList",componentClass:gs}],userComponents:[{componentName:"agFiltersToolPanel",componentClass:Cs}],dependantModules:[pn,y]};class Ss{constructor(e,t,i){this._encode=e,this._decode=t,this._rangeCallback=i}floor(e){const t=new Date(e),i=this._encode(t);return this._decode(i)}ceil(e){const t=new Date(Number(e)-1),i=this._encode(t);return this._decode(i+1)}range(e,t,i){var n;const o=null===(n=this._rangeCallback)||void 0===n?void 0:n.call(this,e,t),r=this._encode(i?this.floor(e):this.ceil(e)),s=this._encode(i?this.ceil(t):this.floor(t));if(s<r)return[];const a=[];for(let l=r;l<=s;l++){const e=this._decode(l);a.push(e)}return null===o||void 0===o||o(),a}}class Es extends Ss{getOffset(e,t){const i="number"===typeof e||e instanceof Date?this._encode(new Date(e)):0;return Math.floor(i)%t}every(e,t){let i,n=0;const{snapTo:o="start"}=null!==t&&void 0!==t?t:{};if("string"===typeof o){const t=n;i=(i,r)=>{const s="start"===o?i:r;return n=this.getOffset(s,e),()=>n=t}}else"number"===typeof o?n=this.getOffset(new Date(o),e):o instanceof Date&&(n=this.getOffset(o,e));const r=t=>{const i=this._encode(t);return Math.floor((i-n)/e)},s=t=>this._decode(t*e+n);return new Ss(r,s,i)}}function xs(e){return e.getTime()}function Os(e){return new Date(e)}const Ts=new Es(xs,Os);new Date(0).getFullYear();const Ds=1e3,Rs=60*Ds,As=60*Rs,_s=24*As,Ps=7*_s,Ms=30*_s,ks=365*_s,Ns=(new Date).getTimezoneOffset()*Rs;function Ls(e){return Math.floor((e.getTime()-Ns)/Ds)}function Is(e){return new Date(Ns+e*Ds)}const Fs=new Es(Ls,Is),Gs=(new Date).getTimezoneOffset()*Rs;function Vs(e){return Math.floor((e.getTime()-Gs)/Rs)}function Bs(e){return new Date(Gs+e*Rs)}const js=new Es(Vs,Bs),Hs=(new Date).getTimezoneOffset()*Rs;function Ws(e){return Math.floor((e.getTime()-Hs)/As)}function Us(e){return new Date(Hs+e*As)}const zs=new Es(Ws,Us);function Ks(e){const t=6e4*e.getTimezoneOffset();return Math.floor((e.getTime()-t)/_s)}function Ys(e){const t=new Date(1970,0,1);return t.setDate(t.getDate()+e),t}const qs=new Es(Ks,Ys);function Xs(e){const t=new Date(2023,0,1+e).getTime();function i(e){const i=e.getTime();return Math.floor((i-t)/Ps)}function n(e){const i=new Date(t);return i.setDate(i.getDate()+7*e),i}return new Es(i,n)}const $s=Xs(0);Xs(1),Xs(2),Xs(3),Xs(4),Xs(5),Xs(6);function Zs(e){return 12*e.getFullYear()+e.getMonth()}function Js(e){const t=Math.floor(e/12),i=e-12*t;return new Date(t,i,1)}const Qs=new Es(Zs,Js);function ea(e){return e.getFullYear()}function ta(e){const t=new Date;return t.setFullYear(e),t.setMonth(0,1),t.setHours(0,0,0,0),t}const ia=new Es(ea,ta);function na(e){return Math.floor(e.getTime()/Rs)}function oa(e){return new Date(e*Rs)}new Es(na,oa);function ra(e){return Math.floor(e.getTime()/As)}function sa(e){return new Date(e*As)}new Es(ra,sa);function aa(e){return Math.floor(e.getTime()/_s)}function la(e){const t=new Date(0);return t.setUTCDate(t.getUTCDate()+e),t.setUTCHours(0,0,0,0),t}new Es(aa,la);function ca(e){return 12*e.getUTCFullYear()+e.getUTCMonth()}function ua(e){const t=Math.floor(e/12),i=e-12*t;return new Date(Date.UTC(t,i,1))}new Es(ca,ua);function da(e){return e.getUTCFullYear()}function pa(e){const t=new Date;return t.setUTCFullYear(e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0),t}new Es(da,pa);function ha(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(i[n[o]]=e[n[o]])}return i}function fa(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}function ga(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)}function va(e,t,i,n){function o(e){return e instanceof i?e:new i((function(t){t(e)}))}
18return new(i||(i=Promise))((function(i,r){function s(e){try{l(n.next(e))}catch(t){r(t)}}function a(e){try{l(n["throw"](e))}catch(t){r(t)}}function l(e){e.done?i(e.value):o(e.value).then(s,a)}l((n=n.apply(e,t||[])).next())}))}"function"===typeof SuppressedError&&SuppressedError;const ya={isEnterprise:!1};class ma{constructor(){this.destroyFns=[]}destroy(){for(const e of this.destroyFns)e()}}const Ca=[];function ba(e){const t=Ca.find((t=>e.type===t.type&&e.optionsKey===t.optionsKey&&e.identifier===t.identifier));if(t){if("enterprise"===e.packageType&&"community"===t.packageType){const i=Ca.indexOf(t);Ca.splice(i,1,e)}}else Ca.push(e)}function wa(){return Ca.some((e=>"enterprise"===e.packageType))}const Sa=new Map;function Ea(e,t){Sa.set(e,t)}function xa(e){const{length:t}=e;if(0===t)return;let i=1/0,n=-1/0;for(let r=0;r<t;r++){let t=e[r];t instanceof Date&&(t=t.getTime()),"number"===typeof t&&(t<i&&(i=t),t>n&&(n=t))}const o=[i,n];return o.some((e=>!isFinite(e)))?void 0:o}function Oa(e,t,i){return Ta(e,t,i).extent}function Ta(e,t,i){var n;let o=!1;return e.length>2&&(e=null!==(n=xa(e))&&void 0!==n?n:[NaN,NaN]),isNaN(t)||(o||(o=t>e[0]),e=[t,e[1]]),isNaN(i)||(o||(o=i<e[1]),e=[e[0],i]),e[0]>e[1]&&(e=[]),{extent:e,clipped:o}}function Da(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(!Da(e[i],t[i]))return!1}else if(e[i]!==t[i])return!1;return!0}function Ra(e){return"undefined"===typeof e?[]:Array.isArray(e)?e:[e]}const Aa={};function _a(e,t){Aa[t]||(e(),Aa[t]=!0)}const Pa={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){_a((()=>Pa.warn(e,...t)),`Logger.warn: ${e}`)},errorOnce(e,...t){_a((()=>Pa.error(e,...t)),`Logger.warn: ${e}`)}};function Ma(e){const t="undefined"!==typeof window?window:void 0;return null===t||void 0===t?void 0:t[e]}const ka=2e3;let Na=Date.now();const La=()=>{const e=Date.now()-Na;if(e>ka){const t=(Math.floor(e/100)/10).toFixed(1);Pa.log(`**** ${t}s since last log message ****`)}Na=Date.now()},Ia={create(...e){return(...t)=>{Ia.check(...e)&&("function"===typeof t[0]&&(t=Ra(t[0]())),La(),Pa.log(...t))}},check(...e){0===e.length&&e.push(!0);const t=Ra(Ma("agChartsDebug"));return t.some((t=>e.includes(t)))}},Fa=Symbol("BREAK"),Ga="__decorator_config";function Va(e,t,i,n){null==Object.getOwnPropertyDescriptor(e,Ga)&&Object.defineProperty(e,Ga,{value:{}});const o=e[Ga];if(null!=o[i])return o[i];o[i]={setters:[],getters:[]};const r=Object.getOwnPropertyDescriptor(e,t),s=null===r||void 0===r?void 0:r.set,a=null===r||void 0===r?void 0:r.get,l=function(){var e,r;let s=a?a.call(this):this[n];for(const n of null!==(r=null===(e=o[i])||void 0===e?void 0:e.getters)&&void 0!==r?r:[])if(s=n(this,t,s),s===Fa)return;return s},c=function(e){var r,l;const c=null!==(l=null===(r=o[i])||void 0===r?void 0:r.setters)&&void 0!==l?l:[];let u;c.some((e=>e.length>2))&&(u=a?a.call(this):this[n]);
18for(const i of c)if(e=i(this,t,e,u),e===Fa)return;s?s.call(this,e):this[n]=e};return Object.defineProperty(e,t,{set:c,get:l,enumerable:!0,configurable:!1}),o[i]}function Ba(e,t){return(i,n)=>{const o=n.toString(),r=`__${o}`,{getters:s,setters:a}=Va(i,n,o,r);a.push(e),t&&s.unshift(t)}}function ja(e){return"undefined"!==typeof e&&Ga in e}function Ha(e){const t=new Set;while(ja(e))t.add(null===e||void 0===e?void 0:e[Ga]),e=Object.getPrototypeOf(e);return Array.from(t).flatMap((e=>Object.keys(e)))}const Wa="class-instance";function Ua(e,t){const i=Za(e),n=Za(t);if("array"===n){const n=t;return"array"!==i||e.length!==n.length||n.some(((t,i)=>null!=Ua(null===e||void 0===e?void 0:e[i],t)))?[...n]:null}if("primitive"===n)return"primitive"!==i?Object.assign({},t):e!==t?t:null;const o=e||{},r=t||{},s=new Set([...Object.keys(o),...Object.keys(r)]);let a=0;const l={};for(const c of s){if(o[c]===r[c])continue;const e=e=>{l[c]=e,a++},t=Za(o[c]),i=Za(r[c]);if(t!==i){e(r[c]);continue}if("primitive"===i||null===i){e(r[c]);continue}if("array"===i&&o[c].length!==r[c].length){e(r[c]);continue}if(i===Wa){e(r[c]);continue}if("function"===i&&o[c]!==r[c]){e(r[c]);continue}const n=Ua(o[c],r[c]);null!==n&&e(n)}return 0===a?null:l}const za=Symbol("<delete-property>"),Ka=Symbol("<unspecified-property>");function Ya(e,t){var i;const n=null!==(i=null===t||void 0===t?void 0:t.avoidDeepClone)&&void 0!==i?i:[],o=e.map((e=>Za(e)));if(o.some((e=>"array"===e))){const i=e[e.length-1];return Array.isArray(i)?i.map((e=>{const i=Za(e);return"array"===i?Ya([[],e],t):"object"===i?Ya([{},e],t):e})):i}const r={},s=new Set(e.map((e=>null!=e?Object.keys(e):[])).reduce(((e,t)=>e.concat(t)),[]));for(const a of s){const i=e.map((e=>null!=e&&"object"===typeof e&&a in e?e[a]:Ka)).filter((e=>e!==Ka));if(0===i.length)continue;const o=i[i.length-1];if(o===za)continue;const s=i.map((e=>Za(e))),l=s[0];s.some((e=>e!==l))?r[a]=o:"array"!==l&&"object"!==l||n.includes(a)?r[a]="array"===l?[...o]:o:r[a]=Ya(i,t)}return r}function qa(e,t,i={}){var n,o,r;const{path:s,matcherPath:a=(s?s.replace(/(\[[0-9+]+])/i,"[]"):void 0),skip:l=[],constructors:c={},constructedArrays:u=new WeakMap,allowedTypes:d={},idx:p}=i;if(null==e)throw new Error(`AG Charts - target is uninitialised: ${null!==s&&void 0!==s?s:"<root>"}`);if(null==t)return e;const h=e;null!=p&&"_declarationOrder"in h&&(h["_declarationOrder"]=p);const f=Za(e);for(const v in t){const p=`${a?a+".":""}${v}`;if(l.indexOf(p)>=0)continue;const y=t[v],m=`${s?s+".":""}${v}`,C=h.constructor,b=h[v];let w=null!==(n=c[p])&&void 0!==n?n:c[v];try{const t=Za(b),n=Za(y);if(f===Wa&&!(v in e)&&!Object.prototype.hasOwnProperty.call(h,v)){Pa.warn(`unable to set [${m}] in ${null===C||void 0===C?void 0:C.name} - property is unknown`);continue}const s=null!==(o=d[p])&&void 0!==o?o:[t];if(t===Wa&&"object"===n);else if(null!=t&&null!=n&&!s.includes(n)){Pa.warn(`unable to set [${m}] in ${null===C||void 0===C?void 0:C.name} - can't apply type of [${n}], allowed types are: [${s}]`);continue}if("array"===n)if(w=null!==(r=null!==w&&void 0!==w?w:u.get(b))&&void 0!==r?r:c[`${p}[]`],null!=w){const e=y;h[v]=e.map(((e,t)=>qa(new w,e,Object.assign(Object.assign({},i),{path:m,matcherPath:p+"[]",idx:t}))))}else h[v]=y;else n===Wa?h[v]=y:"object"===n?null!=b?qa(b,y,Object.assign(Object.assign({},i),{path:m,matcherPath:p,idx:void 0})):h[v]=null!=w?qa(new w,y,Object.assign(Object.assign({},i),{path:m,matcherPath:p,idx:void 0})):y:h[v]=y}catch(g){Pa.warn(`unable to set [${m}] in [${null===C||void 0===C?void 0:C.name}]; nested error is: ${g.message}`)}}return e}function Xa(e,t,i,...n){const o=Za(e),{skip:r=[]}=null!==i&&void 0!==i?i:{};if("array"===o)return t(o,e,...n),void e.forEach(((e,o)=>{Xa(e,t,i,...(null!==n&&void 0!==n?n:[]).map((e=>null===e||void 0===e?void 0:e[o])))}));if("object"===o){t(o,e,...n);for(const o in e){if(r.includes(o))continue;const s=e[o],a=null===n||void 0===n?void 0:n.map((e=>null===e||void 0===e?void 0:e[o])),l=Za(s);"object"!==l&&"array"!==l||Xa(s,t,i,...a)}}}const $a="undefined"!==typeof window;function Za(e){return null==e?null:$a&&e instanceof HTMLElement?"primitive":Array.isArray(e)?"array":e instanceof Date?"primitive":"object"===typeof e&&e.constructor===Object?"object":"function"===typeof e?"function":"object"===typeof e&&null!=e.constructor?Wa:"primitive"}const Ja=2*Math.PI;function Qa(e){return e%=Ja,e+=Ja,e%=Ja,e}function el(e){return e%=Ja,e+=Ja,e!==Ja&&(e%=Ja),e}function tl(e){return e%=Ja,e<-Math.PI?e+=Ja:e>=Math.PI&&(e-=Ja),e}function il(e){return e/180*Math.PI}function nl(e){return e/Math.PI*180}function ol(e,t){return e=Qa(e),t=Qa(t),t-e+(e>t?2*Math.PI:0)}function rl(e,t,i){return Math.max(t,Math.min(i,e))}class sl{constructor(){this.type="band",this.cache=null,this.cacheProps=["_domain","range","_paddingInner","_paddingOuter","round","interval"],this.index=new Map,this.ordinalRange=[],this._domain=[],this.range=[0,1],this._bandwidth=1,this._rawBandwidth=1,this._paddingInner=0,this._paddingOuter=0,this.round=!1}didChange(){const{cache:e}=this,t=!e||this.cacheProps.some((t=>this[t]!==e[t]));return!!t&&(this.cache={},this.cacheProps.forEach((e=>this.cache[e]=this[e])),!0)}refresh(){this.didChange()&&this.update()}set domain(e){const t=[];this.index=new Map;const i=this.index;e.forEach((e=>{void 0===i.get(e)&&i.set(e,t.push(e)-1)})),this._domain=t}get domain(){return this._domain}ticks(){this.refresh();const{interval:e=1}=this,t=Math.abs(Math.round(e));return this._domain.filter(((e,i)=>i%t===0))}convert(e){this.refresh();const t=this.index.get(e);if(void 0===t)return NaN;const i=this.ordinalRange[t];return void 0===i?NaN:i}invert(e){this.refresh();const t=this.ordinalRange.findIndex((t=>t===e));return this.domain[t]}get bandwidth(){return this.refresh(),this._bandwidth}get rawBandwidth(){return this.refresh(),this._rawBandwidth}
18set padding(e){e=rl(e,0,1),this._paddingInner=e,this._paddingOuter=e}get padding(){return this._paddingInner}set paddingInner(e){this._paddingInner=rl(e,0,1)}get paddingInner(){return this._paddingInner}set paddingOuter(e){this._paddingOuter=rl(e,0,1)}get paddingOuter(){return this._paddingOuter}update(){const e=this._domain.length;if(0===e)return;const t=this.round,i=this._paddingInner,n=this._paddingOuter,[o,r]=this.range,s=r-o,a=s/Math.max(1,e+2*n-i),l=t?Math.floor(a):a,c=l*(e-i),u=o+(s-c)/2,d=t?Math.round(u):u,p=l*(1-i),h=t?Math.round(p):p,f=a*(1-i),g=[];for(let v=0;v<e;v++)g.push(d+l*v);this._bandwidth=h,this._rawBandwidth=f,this.ordinalRange=g}}function al(e,t,i){return Math.min(i,Math.max(e,t))}function ll(e,t,i=1e-10){return Math.abs(e-t)<i}function cl(e){return Math.sign(e)<0||Object.is(e,-0)}function ul(e,t=2){const i=Math.pow(10,t);return Math.round(e*i)/i}function dl(e,t=2){const 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 pl(e,t){return e>=0?Math.floor(e%t):Math.floor(e%t+t)}class hl{constructor(e,t,i,n=1){this.r=al(0,e||0,1),this.g=al(0,t||0,1),this.b=al(0,i||0,1),this.a=al(0,n||0,1)}static validColorString(e){return e.indexOf("#")>=0?!!hl.parseHex(e):e.indexOf("rgb")>=0?!!hl.stringToRgba(e):!!hl.nameToHex[e.toLowerCase()]}static fromString(e){if(e.indexOf("#")>=0)return hl.fromHexString(e);const t=hl.nameToHex[e.toLowerCase()];if(t)return hl.fromHexString(t);if(e.indexOf("rgb")>=0)return hl.fromRgbaString(e);throw new Error(`Invalid color string: '${e}'`)}static tryParseFromString(e){try{return hl.fromString(e)}catch(t){return Pa.warnOnce(`invalid color string: '${e}'.`),hl.fromArray([0,0,0])}}static parseHex(e){let t;switch(e=e.replace(/ /g,"").slice(1),e.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));break}if((null===t||void 0===t?void 0:t.length)>=3&&t.every((e=>e>=0)))return 3===t.length&&t.push(255),t}static fromHexString(e){const t=hl.parseHex(e);if(t){const[e,i,n,o]=t;return new hl(e/255,i/255,n/255,o/255)}throw new Error(`Malformed hexadecimal color string: '${e}'`)}static stringToRgba(e){let[t,i]=[NaN,NaN];for(let s=0;s<e.length;s++){const n=e[s];if(t||"("!==n){if(")"===n){i=s;break}}else t=s}const n=t&&i&&e.substring(t+1,i);if(!n)return;const o=n.split(","),r=[];for(let s=0;s<o.length;s++){const e=o[s];let t=parseFloat(e);if(isNaN(t))return;e.indexOf("%")>=0?(t=Math.max(0,Math.min(100,t)),t/=100):3===s?t=Math.max(0,Math.min(1,t)):(t=Math.max(0,Math.min(255,t)),t/=255),r.push(t)}return r}static fromRgbaString(e){const t=hl.stringToRgba(e);if(t){if(3===t.length)return new hl(t[0],t[1],t[2]);if(4===t.length)return new hl(t[0],t[1],t[2],t[3])}throw new Error(`Malformed rgb/rgba color string: '${e}'`)}static fromArray(e){if(4===e.length)return new hl(e[0],e[1],e[2],e[3]);if(3===e.length)return new hl(e[0],e[1],e[2]);throw new Error("The given array should contain 3 or 4 color components (numbers).")}static fromHSB(e,t,i,n=1){const o=hl.HSBtoRGB(e,t,i);return new hl(o[0],o[1],o[2],n)}static fromHSL(e,t,i,n=1){const o=hl.HSLtoRGB(e,t,i);return new hl(o[0],o[1],o[2],n)}static padHex(e){return 1===e.length?"0"+e:e}toHexString(){let e="#"+hl.padHex(Math.round(255*this.r).toString(16))+hl.padHex(Math.round(255*this.g).toString(16))+hl.padHex(Math.round(255*this.b).toString(16));return this.a<1&&(e+=hl.padHex(Math.round(255*this.a).toString(16))),e}toRgbaString(e=3){const 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 hl.RGBtoHSB(this.r,this.g,this.b)}static RGBtoHSL(e,t,i){const n=Math.min(e,t,i),o=Math.max(e,t,i),r=(o+n)/2;let s,a;if(o===n)s=NaN,a=0;else{const l=o-n;a=r>.5?l/(2-o-n):l/(o+n),s=o===e?(t-i)/l+(t<i?6:0):o===t?(i-e)/l+2:(e-t)/l+4,s*=60}return[s,a,r]}static HSLtoRGB(e,t,i){if(0===t)return[i,i,i];const n=i<.5?i*(1+t):i+t-i*t,o=2*i-n;function r(e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?o+6*(n-o)*e:e<.5?n:e<2/3?o+(n-o)*(2/3-e)*6:o}const s=r(e/360+1/3),a=r(e/360),l=r(e/360-1/3);return[s,a,l]}static RGBtoHSB(e,t,i){const n=Math.min(e,t,i),o=Math.max(e,t,i),r=0!==o?(o-n)/o:0;let s=NaN;if(n!==o){const r=o-n,a=(o-e)/r,l=(o-t)/r,c=(o-i)/r;s=e===o?c-l:t===o?2+a-c:4+l-a,s/=6,s<0&&(s+=1)}return[360*s,r,o]}static HSBtoRGB(e,t,i){isNaN(e)&&(e=0),e=(e%360+360)%360/360;let n=0,o=0,r=0;if(0===t)n=o=r=i;else{const s=6*(e-Math.floor(e)),a=s-Math.floor(s),l=i*(1-t),c=i*(1-t*a),u=i*(1-t*(1-a));switch(s>>0){case 0:n=i,o=u,r=l;break;case 1:n=c,o=i,r=l;break;case 2:n=l,o=i,r=u;break;case 3:n=l,o=c,r=i;break;case 4:n=u,o=l,r=i;break;case 5:n=i,o=l,r=c;break}}return[n,o,r]}derive(e,t,i,n){const o=hl.RGBtoHSB(this.r,this.g,this.b);let r=o[2];0==r&&i>1&&(r=.05);const s=((o[0]+e)%360+360)%360,a=Math.max(Math.min(o[1]*t,1),0);r=Math.max(Math.min(r*i,1),0);const l=Math.max(Math.min(this.a*n,1),0),c=hl.HSBtoRGB(s,a,r);return c.push(l),hl.fromArray(c)}brighter(){return this.derive(0,1,1/.7,1)}darker(){return this.derive(0,1,.7,1)}static interpolate(e,t){const i=hl.tryParseFromString(e),n=hl.tryParseFromString(t);return e=>{const t=(t,i)=>t*(1-e)+i*e,o=new hl(t(i.r,n.r),t(i.g,n.g),t(i.b,n.b),t(i.a,n.a));return o.toString()}}}function fl(e){return Ba(((t,i,n)=>{var o,r,s;if(e(n,{target:t}))return n;const a=i.toString().replace(/^_*/,"");let l=null!==(r=null===(o=t.constructor)||void 0===o?void 0:o.className)&&void 0!==r?r:null===(s=t.constructor)||void 0===s?void 0:s.name;(null===l||void 0===l?void 0:l.length)<3&&(l=null);const c=l?`of [${l}] `:"";return e.message?Pa.warn(`Property [${a}] ${c}cannot be set to [${gl(n)}]; ${e.message}, ignoring.`):Pa.warn(`Property [${a}] ${c}cannot be set to [${gl(n)}], ignoring.`),Fa}))}function gl(e){return"number"===typeof e&&isNaN(e)?"NaN":e===1/0?"Infinity":e===-1/0?"-Infinity":JSON.stringify(e)}function vl(e,t){return e.message=t,e}hl.nameToHex=Object.freeze({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:"#BA5
185D3",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"});const yl=(e,t,i)=>void 0===e||i(e,t),ml=(e,t)=>vl(((i,n)=>Array.isArray(i)&&(!e||i.length===e)&&(!t||i.every((e=>t(e,n))))),"expecting an Array"),Cl=e=>vl(((t,i)=>yl(t,i,ml(e))),"expecting an optional Array");vl((e=>Array.isArray(e)&&e.length>0),"expecting a non-empty Array");const bl=(...e)=>vl(((t,i)=>e.every((e=>e(t,i)))),e.map((e=>e.message)).filter((e=>null!=e)).join(" AND ")),wl=(...e)=>vl(((t,i)=>e.some((e=>e(t,i)))),e.map((e=>e.message)).filter((e=>null!=e)).join(" OR ")),Sl=e=>null!=e&&!isNaN(e),El=e=>vl(((t,i)=>!Sl(t)||!Sl(i.target[e])||t<i.target[e]),`expected to be less than ${e}`),xl=e=>vl(((t,i)=>!Sl(t)||!Sl(i.target[e])||t>i.target[e]),`expected to be greater than ${e}`),Ol=vl((e=>"function"===typeof e),"expecting a Function"),Tl=vl(((e,t)=>yl(e,t,Ol)),"expecting an optional Function"),Dl=vl((e=>!0===e||!1===e),"expecting a Boolean"),Rl=vl(((e,t)=>yl(e,t,Dl)),"expecting an optional Boolean"),Al=vl((e=>"string"===typeof e),"expecting a String"),_l=vl(((e,t)=>yl(e,t,Al)),"expecting an optional String"),Pl=vl((e=>e instanceof Date&&!isNaN(+e)),"expecting a Date object"),Ml=vl(((e,t)=>yl(e,t,Pl)),"expecting an optional Date");vl(ml(void 0,Pl),"expecting an Array of Date objects");const kl=Hl(0),Nl=vl(((e,t)=>yl(e,t,kl)),"expecting an optional number"),Ll=wl(Ml,Nl),Il="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",Fl=vl((e=>"string"===typeof e&&hl.validColorString(e)),`expecting a color String. ${Il}`),Gl=vl(((e,t)=>yl(e,t,Fl)),`expecting an optional color String. ${Il}`),Vl=vl(ml(void 0,Fl),`expecting an Array of color strings. ${Il}`),Bl=vl(((e,t)=>yl(e,t,Vl)),`expecting an optional Array of color strings. ${Il}`);function jl(e="expecting a finite Number",t,i){let n=e;return void 0!==t&&void 0!==i?n+=` between ${t} and ${i} inclusive`:void 0!==t?n+=` greater than or equal to ${t}`:void 0!==i&&(n+=` less than or equal to ${i}`),n}function Hl(e,t){const i=jl(void 0,e,t);return vl((i=>"number"===typeof i&&Number.isFinite(i)&&(void 0===e||i>=e)&&(void 0===t||i<=t)),i)}function Wl(e,t){const i=jl("expecting an optional finite Number",e,t);return vl(((i,n)=>yl(i,n,Hl(e,t))),i)}function Ul(e,t){const i=jl(void 0,e,t);return vl((i=>"number"===typeof i&&(isNaN(i)||Number.isFinite(i)&&(void 0===e||i>=e)&&(void 0===t||i<=t))),i)}const zl=vl(ml(void 0,Hl()),"expecting an Array of numbers"),Kl=vl(((e,t)=>yl(e,t,zl)),"expecting an optional Array of numbers"),Yl=vl(ml(void 0,Al),"expecting an Array of strings");function ql(...e){const t=`expecting one of: ${e.join(", ")}`;return vl((t=>"string"===typeof t&&e.indexOf(t)>=0),t)}vl(((e,t)=>yl(e,t,Yl)),"expecting an optional Array of strings");const Xl=vl(ml(void 0,Dl),"expecting an Array of boolean values");vl(((e,t)=>yl(e,t,Xl)),"expecting an optional Array of boolean values");const $l=["normal","bold","bolder","lighter"],Zl=vl((e=>"normal"===e||"italic"===e||"oblique"===e),"expecting a font style keyword such as 'normal', 'italic' or 'oblique'"),Jl=vl(((e,t)=>yl(e,t,Zl)),"expecting an optional font style keyword such as 'normal', 'italic' or 'oblique'"),Ql=vl((e=>$l.includes(e)||"number"===typeof e&&isFinite(e)),"expecting a font weight keyword such as 'normal', 'bold' or 'bolder' or a numeric value such as 100, 300 or 600"),ec=vl(((e,t)=>yl(e,t,Ql)),"expecting an optional font weight keyword such as 'normal', 'bold' or 'bolder' or a numeric value such as 100, 300 or 600"),tc=vl(ml(void 0,Hl(0)),"expecting an Array of 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."),ic=vl(((e,t)=>yl(e,t,tc)),"expecting an optional Array of 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."),nc=["butt","round","square"],oc=vl((e
18=>nc.includes(e)),"expecting a line cap keyword such as 'butt', 'round' or 'square'");vl(((e,t)=>yl(e,t,oc)),"expecting an optional line cap keyword such as 'butt', 'round' or 'square'");const rc=["round","bevel","miter"],sc=vl((e=>rc.includes(e)),"expecting a line join keyword such as 'round', 'bevel' or 'miter'");vl(((e,t)=>yl(e,t,sc)),"expecting an optional line join keyword such as 'round', 'bevel' or 'miter'");const ac=["top","right","bottom","left"],lc=vl((e=>ac.includes(e)),"expecting a position keyword such as 'top', 'right', 'bottom' or 'left"),cc=["exact","nearest"],uc=vl((e=>"number"===typeof e&&Number.isFinite(e)||cc.includes(e)),"expecting an interaction range of 'exact', 'nearest' or a number"),dc=["never","always","hyphenate","on-space"],pc=vl((e=>dc.includes(e)),"expecting a text wrap strategy keyword such as 'never', 'always', 'hyphenate', or 'on-space'"),hc=["ellipsis","hide"];vl((e=>hc.includes(e)),"expecting an overflow strategy keyword such as 'ellipsis', or 'hide'");const fc=["left","center","right"];vl((e=>fc.includes(e)),"expecting a text align keyword such as 'left', 'center', or 'right'");const gc=["top","middle","bottom"];vl((e=>gc.includes(e)),"expecting a text align keyword such as 'top', 'middle', or 'bottom'");const vc=["horizontal","vertical"],yc=vl((e=>vc.includes(e)),"expecting a direction keyword such as 'horizontal' or 'vertical'");var mc,Cc;function bc(){try{return new Function("return true"),!0}catch(e){return!1}}vl(((e,t)=>yl(e,t,yc)),"expecting an optional direction keyword such as 'horizontal' or 'vertical'"),function(e){e["X"]="x",e["Y"]="y"}(mc||(mc={})),function(e){e[e["NONE"]=0]="NONE",e[e["TRIVIAL"]=1]="TRIVIAL",e[e["MINOR"]=2]="MINOR",e[e["MAJOR"]=3]="MAJOR"}(Cc||(Cc={}));const wc=bc();function Sc(e){const{changeCb:t,convertor:i}=null!==e&&void 0!==e?e:{};return function(n,o){const r=`__${o}`;n[o]||(wc&&null==t&&null==i?Ec(n,o,r,e):xc(n,o,r,e))}}function Ec(e,t,i,n){const{redraw:o=Cc.TRIVIAL,type:r="normal",checkDirtyOnAssignment:s=!1}=null!==n&&void 0!==n?n:{},a=new Function("value",`\n        const oldValue = this.${i};\n        if (value !== oldValue) {\n            this.${i} = value;\n            ${"normal"===r?`this.markDirty(this, ${o});`:""}\n            ${"transform"===r?`this.markDirtyTransform(${o});`:""}\n            ${"path"===r?`if (!this._dirtyPath) { this._dirtyPath = true; this.markDirty(this, ${o}); }`:""}\n            ${"font"===r?`if (!this._dirtyFont) { this._dirtyFont = true; this.markDirty(this, ${o}); }`:""}\n        }\n        ${s?`if (value != null && value._dirty > ${Cc.NONE}) { this.markDirty(value, value._dirty); }`:""}\n`),l=new Function(`return this.${i};`);Object.defineProperty(e,t,{set:a,get:l,enumerable:!0,configurable:!0})}function xc(e,t,i,n){const{redraw:o=Cc.TRIVIAL,type:r="normal",changeCb:s,convertor:a,checkDirtyOnAssignment:l=!1}=null!==n&&void 0!==n?n:{},c=function(e){const t=this[i];e=a?a(e):e,e!==t&&(this[i]=e,"normal"===r&&this.markDirty(this,o),"transform"===r&&this.markDirtyTransform(o),"path"!==r||this._dirtyPath||(this._dirtyPath=!0,this.markDirty(this,o)),"font"!==r||this._dirtyFont||(this._dirtyFont=!0,this.markDirty(this,o)),s&&s(this)),l&&null!=e&&e._dirty>Cc.NONE&&this.markDirty(e,e._dirty)},u=function(){return this[i]};Object.defineProperty(e,t,{set:c,get:u,enumerable:!0,configurable:!0})}class Oc{constructor(){this._dirty=Cc.MAJOR}markDirty(e,t=Cc.TRIVIAL){this._dirty>t||(this._dirty=t)}markClean(e){this._dirty=Cc.NONE}isDirty(){return this._dirty>Cc.NONE}}const Tc={};function Dc(){for(const e in Tc)delete Tc[e]}function Rc(e){var t;const i=e.constructor,n=Object.prototype.hasOwnProperty.call(i,"className")?i.className:i.name;if(!n)throw new Error(`The ${i} is missing the 'className' property.`);const o=(null!==(t=Tc[n])&&void 0!==t?t:0)+1;return Tc[n]=o,n+"-"+o}function Ac(e,t,i=1/0){const n={nearest:void 0,distanceSquared:i};for(const o of t){const t=o.distanceSquared(e);if(0===t)return{nearest:o,distanceSquared:0};t<n.distanceSquared&&(n.nearest=o,n.distanceSquared=t)}return n}function _c(e,t,i=1/0){const n=t.transformPoint(e.x,e.y),o={nearest:void 0,distanceSquared:i};for(const r of t.children){const{nearest:e,distanceSquared:t}=r.nearestSquared(n,o.distanceSquared);if(0===t)return{nearest:e,distanceSquared:t};t<o.distanceSquared&&(o.nearest=e,o.distanceSquared=t)}return o}class Pc{constructor(e,t,i,n){this.x=e,this.y=t,this.width=i,this.height=n}clone(){const{x:e,y:t,width:i,height:n}=this;return new Pc(e,t,i,n)}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}collidesBBox(e){return this.x<e.x+e.width&&this.x+this.width>
18e.x&&this.y<e.y+e.height&&this.y+this.height>e.y}isInfinite(){return Math.abs(this.x)===1/0||Math.abs(this.y)===1/0||Math.abs(this.width)===1/0||Math.abs(this.height)===1/0}distanceSquared(e){if(this.containsPoint(e.x,e.y))return 0;const t=e.x-Math.max(this.x,Math.min(e.x,this.x+this.width)),i=e.y-Math.max(this.y,Math.min(e.y,this.y+this.height));return t*t+i*i}static nearestBox(e,t){return Ac(e,t)}shrink(e,t){const 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;break}};return"number"===typeof e?i(t,e):Object.entries(e).forEach((([e,t])=>i(e,t))),this}grow(e,t){if("number"===typeof e)this.shrink(-e,t);else{const t=Object.assign({},e);for(const e in t)t[e]*=-1;this.shrink(t)}return this}static merge(e){let t=1/0,i=1/0,n=-1/0,o=-1/0;return e.forEach((e=>{e.x<t&&(t=e.x),e.y<i&&(i=e.y),e.x+e.width>n&&(n=e.x+e.width),e.y+e.height>o&&(o=e.y+e.height)})),new Pc(t,i,n-t,o-i)}}Pc.zero=new Pc(0,0,0,0);class Mc{get e(){return[...this.elements]}constructor(e=[1,0,0,1,0,0]){this.elements=e}setElements(e){const 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(){const e=this.elements;return 1===e[0]&&0===e[1]&&0===e[2]&&1===e[3]&&0===e[4]&&0===e[5]}AxB(e,t,i){const n=e[0]*t[0]+e[2]*t[1],o=e[1]*t[0]+e[3]*t[1],r=e[0]*t[2]+e[2]*t[3],s=e[1]*t[2]+e[3]*t[3],a=e[0]*t[4]+e[2]*t[5]+e[4],l=e[1]*t[4]+e[3]*t[5]+e[5];i=null!==i&&void 0!==i?i:e,i[0]=n,i[1]=o,i[2]=r,i[3]=s,i[4]=a,i[5]=l}multiplySelf(e){return this.AxB(this.elements,e.elements),this}multiply(e){const t=new Array(6);return this.AxB(this.elements,e.elements,t),new Mc(t)}preMultiplySelf(e){return this.AxB(e.elements,this.elements,this.elements),this}inverse(){const e=this.elements;let t=e[0],i=e[1],n=e[2],o=e[3];const r=e[4],s=e[5],a=1/(t*o-i*n);return t*=a,i*=a,n*=a,o*=a,new Mc([o,-i,-n,t,n*s-o*r,i*r-t*s])}inverseTo(e){const t=this.elements;let i=t[0],n=t[1],o=t[2],r=t[3];const s=t[4],a=t[5],l=1/(i*r-n*o);return i*=l,n*=l,o*=l,r*=l,e.setElements([r,-n,-o,i,o*a-r*s,n*s-i*a]),this}invertSelf(){const e=this.elements;let t=e[0],i=e[1],n=e[2],o=e[3];const r=e[4],s=e[5],a=1/(t*o-i*n);return t*=a,i*=a,n*=a,o*=a,e[0]=o,e[1]=-i,e[2]=-n,e[3]=t,e[4]=n*s-o*r,e[5]=i*r-t*s,this}transformPoint(e,t){const 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){const i=this.elements,n=i[0],o=i[1],r=i[2],s=i[3],a=.5*e.width,l=.5*e.height,c=e.x+a,u=e.y+l,d=Math.abs(a*n)+Math.abs(l*r),p=Math.abs(a*o)+Math.abs(l*s);return t||(t=new Pc(0,0,0,0)),t.x=c*n+u*r+i[4]-d,t.y=c*o+u*s+i[5]-p,t.width=d+d,t.height=p+p,t}toContext(e){if(this.identity)return;const t=this.elements;e.transform(t[0],t[1],t[2],t[3],t[4],t[5])}static flyweight(e){return Mc.instance.setElements(e.elements)}static updateTransformMatrix(e,t,i,n,o,r,s){const[a,l]=[0,0],c=t,u=i;let d,p;1===c&&1===u?(d=0,p=0):(d=null==(null===s||void 0===s?void 0:s.scalingCenterX)?a:null===s||void 0===s?void 0:s.scalingCenterX,p=null==(null===s||void 0===s?void 0:s.scalingCenterY)?l:null===s||void 0===s?void 0:s.scalingCenterY);const h=n,f=Math.cos(h),g=Math.sin(h);let v,y;0===h?(v=0,y=0):(v=null==(null===s||void 0===s?void 0:s.rotationCenterX)?a:null===s||void 0===s?void 0:s.rotationCenterX,y=null==(null===s||void 0===s?void 0:s.rotationCenterY)?l:null===s||void 0===s?void 0:s.rotationCenterY);const m=o,C=r,b=d*(1-c)-v,w=p*(1-u)-y;return e.setElements([f*c,g*c,-g*u,f*u,f*b-g*w+v+m,g*b+f*w+y+C]),e}static fromContext(e){const t=e.getTransform();return new Mc([t.a,t.b,t.c,t.d,t.e,t.f])}}var kc;Mc.instance=new Mc,function(e){e[e["All"]=0]="All",e[e["None"]=1]="None"}(kc||(kc={}));const Nc=e=>{e.parent&&(e.parent.dirtyZIndex=!0),e.zIndexChanged()};class Lc extends Oc{get datum(){var e,t;return null!==(e=this._datum)&&void 0!==e?e:null===(t=this._parent)||void 0===t?void 0:t.datum}get previousDatum(){return this._previousDatum}set datum(e){this._datum!==e&&(this._previousDatum=this._datum),this._datum=e}_setLayerManager(e){this._layerManager=e,this._debug=null===e||void 0===e?void 0:e.debug;for(const t of this._children)t._setLayerManager(e);for(const t of this._virtualChildren)t._setLayerManager(e)}get layerManager(){return this._layerManager}get parent(){return this._parent}
18get children(){if(0===this._virtualChildren.length)return this._children;const e=[...this._children];for(const t of this._virtualChildren)e.push(...t.children);return e}get virtualChildren(){return this._virtualChildren}hasVirtualChildren(){return this._virtualChildren.length>0}setProperties(e,t){const i=null!==t&&void 0!==t?t:Object.keys(e);for(const n of i)this[n]=e[n];return this}append(e){Array.isArray(e)||(e=[e]);for(const t of e){if(t.parent)throw new Error(`${t} already belongs to another parent: ${t.parent}.`);if(t.layerManager)throw new Error(`${t} already belongs to a scene: ${t.layerManager}.`);if(this.childSet[t.id])throw new 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.dirtyZIndex=!0,this.markDirty(this,Cc.MAJOR)}appendChild(e){return this.append(e),e}removeChild(e){const t=()=>{throw new Error("The node to be removed is not a child of this node.")};if(e.parent!==this&&t(),e.isVirtual){const i=this._virtualChildren.indexOf(e);i<0&&t(),this._virtualChildren.splice(i,1)}else{const 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.dirtyZIndex=!0,this.markDirty(e,Cc.MAJOR),e}calculateCumulativeMatrix(){this.computeTransformMatrix();const e=Mc.flyweight(this.matrix);let t=this.parent;while(t)t.computeTransformMatrix(),e.preMultiplySelf(t.matrix),t=t.parent;return e}transformPoint(e,t){const i=this.calculateCumulativeMatrix();return i.invertSelf().transformPoint(e,t)}inverseTransformPoint(e,t){const i=this.calculateCumulativeMatrix();return i.transformPoint(e,t)}transformBBox(e){const t=this.calculateCumulativeMatrix();return t.invertSelf().transformBBox(e)}inverseTransformBBox(e){const t=this.calculateCumulativeMatrix();return t.transformBBox(e)}markDirtyTransform(){this.dirtyTransform=!0,this.markDirty(this,Cc.MAJOR)}constructor({isVirtual:e,tag:t}={}){super(),this.serialNumber=Lc._nextSerialNumber++,this.id=Rc(this),this.isContainerNode=!1,this._virtualChildren=[],this._children=[],this.childSet={},this.matrix=new Mc,this.inverseMatrix=new Mc,this.dirtyTransform=!1,this.scalingX=1,this.scalingY=1,this.scalingCenterX=null,this.scalingCenterY=null,this.rotationCenterX=null,this.rotationCenterY=null,this.rotation=0,this.translationX=0,this.translationY=0,this.visible=!0,this.dirtyZIndex=!1,this.zIndex=0,this.zIndexSubOrder=void 0,this.pointerEvents=kc.All,this.isVirtual=null!==e&&void 0!==e&&e,this.tag=null!==t&&void 0!==t?t:NaN}containsPoint(e,t){return!1}pickNode(e,t){var i;if(!this.visible||this.pointerEvents===kc.None||!this.containsPoint(e,t))return;const n=this.children;if(n.length>1e3)for(let o=n.length-1;o>=0;o--){const r=n[o],s=null===(i=r.computeTransformedBBox())||void 0===i?void 0:i.containsPoint(e,t),a=s?r.pickNode(e,t):void 0;if(a)return a}else if(n.length)for(let o=n.length-1;o>=0;o--){const i=n[o].pickNode(e,t);if(i)return i}else if(!this.isContainerNode)return this}findNodes(e){const t=e(this)?[this]:[];for(const i of this.children){const n=i.findNodes(e);n&&t.push(...n)}return t}computeBBox(){}computeTransformedBBox(){const e=this.computeBBox();if(!e)return;this.computeTransformMatrix();const t=Mc.flyweight(this.matrix);let i=this.parent;while(i)i.computeTransformMatrix(),t.preMultiplySelf(i.matrix),i=i.parent;return t.transformBBox(e,e),e}computeTransformMatrix(){if(!this.dirtyTransform)return;const{matrix:e,scalingX:t,scalingY:i,rotation:n,translationX:o,translationY:r,scalingCenterX:s,scalingCenterY:a,rotationCenterX:l,rotationCenterY:c}=this;Mc.updateTransformMatrix(e,t,i,n,o,r,{scalingCenterX:s,scalingCenterY:a,rotationCenterX:l,rotationCenterY:c}),e.inverseTo(this.inverseMatrix),this.dirtyTransform=!1}render(e){const{stats:t}=e;this._dirty=Cc.NONE,t&&t.nodesRendered++}clearBBox(e){const t=this.computeBBox();if(null==t)return;const{x:i,y:n,width:o,height:r}=t,s=this.transformPoint(i,n),a=this.transformPoint(i+o,n+r);e.clearRect(s.x,s.y,a.x-s.x,a.y-s.y)}markDirty(e,t=Cc.TRIVIAL,i=t){this._dirty>t||this._dirty===t&&t===i||(this._dirty=t,this.parent?this.parent.markDirty(this,i):this.layerManager&&this.layerManager.markDirty())}get dirty(){return this._dirty}markClean(e){const{force:t=!1,recursive:i=!0}=null!==e&&void 0!==e?e:{};if(this._dirty!==Cc.NONE||t){if(this._dirty=Cc.NONE,!1!==i)for(const e of this._virtualChildren)e.markClean({force:t});if(!0===i)for(const e of this._children)e.markClean({force:t})}}visibilityChanged(){}get nodeCount(){let e=1,t=this._dirty>=Cc.NONE||this.dirtyTransform?1:0,i=this.visible?1:0;const n=n=>{const{count:o,visibleCount:r,dirtyCount:s}=n.nodeCount;e+=o,i+=r,t+=s};for(const o of this._children)n(o);for(const o of this._virtualChildren)n(o);return{count:e,visibleCount:i,dirtyCount:t}}zIndexChanged(){}}Lc._nextSerialNumber=0,fa([Sc({type:"transform"}),ga("design:type",Number)],Lc.prototype,"scalingX",void 0),fa([Sc({type:"transform"}),ga("design:type",Number)],Lc.prototype,"scalingY",void 0),fa([Sc({type:"transform"}),ga("design:type",Object)],Lc.prototype,"scalingCenterX",void 0),fa([Sc({type:"transform"}),ga("design:type",Object)],Lc.prototype,"scalingCenterY",void 0),fa([Sc({type:"transform"}),ga("design:type",Object)],Lc.prototype,"rotationCenterX",void 0),fa([Sc({type:"transform"}),ga("design:type",Object)],Lc.prototype,"rotationCenterY",void 0),fa([Sc({type:"transform"}),ga("design:type",Number)],Lc.prototype,"rotation",void 0),fa([Sc({type:"transform"}),ga("design:type",Number)],Lc.prototype,"translationX",void 0),fa([Sc({type:"transform"}),ga("design:type",Number)],Lc.prototype,"translationY",void 0),fa([Sc({redraw:Cc.MAJOR,changeCb:e=>e.visibilityChanged()}),ga("design:type",Boolean)],Lc.prototype,"visible",void 0),fa([Sc({redraw:Cc.TRIVIAL,changeCb:Nc}),ga("design:type",Number)],Lc.prototype,"zIndex",void 0),fa([Sc({redraw:Cc.TRIVIAL,changeCb:Nc}),ga("design:type",Array)],Lc.prototype,"zIndexSubOrder",void 0);class Ic extends Oc{constructor(){super(...arguments),this.enabled=!0,this.color="rgba(0, 0, 0, 0.5)",this.xOffset=0,this.yOffset=0,this.blur=5}}fa([fl(Dl),Sc({redraw:Cc.MAJOR}),ga("design:type",Object)],Ic.prototype,"enabled",void 0),fa([fl(Fl),Sc({redraw:Cc.MAJOR}),ga("design:type",Object)],Ic.prototype,"color",void 0),fa([fl(Hl()),Sc({redraw:Cc.MAJOR}),ga("design:type",Object)],Ic.prototype,"xOffset",void 0),fa([fl(Hl()),Sc({redraw:Cc.MAJOR}),ga("design:type",Object)],Ic.prototype,"yOffset",void 0),fa([fl(Hl(0)),Sc({redraw:Cc.MAJOR}),ga("design:type",Object)],Ic.prototype,"blur",void 0);const Fc=[/Android/i,/webOS/i,/iPhone/i,/iPad/i,/iPod/i,/BlackBerry/i,/Windows Phone/i];function Gc(){if("undefined"===typeof navigator)return!0;const e=navigator.userAgent;return!Fc.some((t=>t.test(e)))}class Vc{constructor(e){this._enabled=!0,this._pixelRatio=NaN,this._width=0,this._height=0;const{document:t,window:i,width:n=600,height:o=300,domLayer:r=!1,zIndex:s=0,name:a,overrideDevicePixelRatio:l}=e;this.document=t,this.window=i,Vc.document=t,this.element=t.createElement("canvas"),this.element.width=n,this.element.height=o,this.realContext=this.element.getContext("2d"),this.imageSource=this.realContext.canvas;const{style:c}=this.element;c.userSelect="none",c.display="block",r&&(c.position="absolute",c.zIndex=String(s),c.top="0",c.left="0",c.pointerEvents="none",c.opacity="1",a&&(this.element.i
18d=a)),this.context=this.setPixelRatio(l),this.resize(n,o)}set container(e){this._container!==e&&(this.remove(),e&&e.appendChild(this.element),this._container=e)}get container(){return this._container}set enabled(e){this.element.style.display=e?"block":"none",this._enabled=!!e}get enabled(){return this._enabled}remove(){const{parentNode:e}=this.element;null!=e&&e.removeChild(this.element)}destroy(){this.element.remove(),this.element.width=0,this.element.height=0,this.context.clearRect(0,0,0,0),Object.freeze(this)}snapshot(){}clear(){this.context.save(),this.context.resetTransform(),this.context.clearRect(0,0,this.width,this.height),this.context.restore()}toImage(){const e=this.document.createElement("img");return e.src=this.getDataURL(),e}getDataURL(e){return this.element.toDataURL(e)}download(e,t="image/png"){e=(null!==e&&void 0!==e?e:"").trim()||"image";const i=this.getDataURL(t),n=this.document,o=n.createElement("a");o.href=i,o.download=e,o.style.display="none",n.body.appendChild(o),o.click(),n.body.removeChild(o)}get pixelRatio(){return this._pixelRatio}setPixelRatio(e){let t=null!==e&&void 0!==e?e:this.window.devicePixelRatio;return Gc()||(t=1),this._pixelRatio=t,Vc.overrideScale(this.realContext,t)}set pixelated(e){this.element.style.imageRendering=e?"pixelated":"auto"}get pixelated(){return"pixelated"===this.element.style.imageRendering}get width(){return this._width}get height(){return this._height}resize(e,t){if(!(e>0&&t>0))return;const{element:i,context:n,pixelRatio:o}=this;i.width=Math.round(e*o),i.height=Math.round(t*o),i.style.width=e+"px",i.style.height=t+"px",n.resetTransform(),this._width=e,this._height=t}static get textMeasuringContext(){if(this._textMeasuringContext)return this._textMeasuringContext;const e=this.document.createElement("canvas");return this._textMeasuringContext=e.getContext("2d"),this._textMeasuringContext}static get svgText(){if(this._svgText)return this._svgText;const e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"svg");t.setAttribute("width","100"),t.setAttribute("height","100"),t.classList?t.classList.add("text-measuring-svg"):t.setAttribute("class","text-measuring-svg"),t.style.position="absolute",t.style.top="-1000px",t.style.visibility="hidden";const i=document.createElementNS(e,"text");return i.setAttribute("x","0"),i.setAttribute("y","30"),i.setAttribute("text","black"),t.appendChild(i),document.body.appendChild(t),this._svgText=i,i}static get has(){if(this._has)return this._has;const e="undefined"===typeof navigator||navigator.userAgent.indexOf("Chrome")>-1,t="undefined"!==typeof navigator&&navigator.userAgent.indexOf("Firefox")>-1,i=!e&&"undefined"!==typeof navigator&&navigator.userAgent.indexOf("Safari")>-1;return this._has=Object.freeze({textMetrics:void 0!==this.textMeasuringContext.measureText("test").actualBoundingBoxDescent&&!t&&!i,getTransform:void 0!==this.textMeasuringContext.getTransform}),this._has}static measureText(e,t,i,n){const o=this.textMeasuringContext;return o.font=t,o.textBaseline=i,o.textAlign=n,o.measureText(e)}static getTextSize(e,t){if(this.has.textMetrics){const i=this.textMeasuringContext;i.font=t;const n=i.measureText(e);return{width:n.width,height:n.actualBoundingBoxAscent+n.actualBoundingBoxDescent}}return this.measureSvgText(e,t)}static measureSvgText(e,t){const i=this.textSizeCache,n=i[t];if(n){const t=n[e];if(t)return t}else i[t]={};const o=this.svgText;o.style.font=t,o.textContent=e;const r=o.getBBox(),s={width:r.width,height:r.height};return i[t][e]=s,s}static overrideScale(e,t){let i=0;const n={save(){this.$save(),i++},restore(){if(!(i>0))throw new Error("AG Charts - Unable to restore() past depth 0");this.$restore(),i--},setTransform(e,i,n,o,r,s){"object"===typeof e?this.$setTransform(e):this.$setTransform(e*t,i*t,n*t,o*t,r*t,s*t)},resetTransform(){this.$setTransform(t,0,0,t,0,0)},verifyDepthZero(){if(0!==i)throw new Error("AG Charts - Save/restore depth is non-zero: "+i)}};for(const o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e["$"+o]||(e["$"+o]=e[o]),e[o]=n[o]);return e}}Vc.document=globalThis.document,Vc.textSizeCache={};class Bc{constructor(){this.stops=[]}}class jc extends Bc{constructor(){super(...arguments),this.angle=0}createGradient(e,t){const i=90,{stops:n,angle:o}=this,r=Qa(il(o+i)),s=Math.cos(r),a=Math.sin(r),l=t.width,c=t.height,u=t.x+.5*l,d=t.y+.5*c;if(l>0&&c>0){const t=Math.sqrt(c*c+l*l)/2,i=Math.atan2(c,l);let o;o=r<Math.PI/2?r:r<Math.PI?Math.PI-r:r<3*Math.PI/2?r-Math.PI:2*Math.PI-r;const p=t*Math.abs(Math.cos(o-i)),h=e.createLinearGradient(u+s*p,d+a*p,u-s*p,d-a*p);
18return n.forEach((e=>{h.addColorStop(e.offset,e.color)})),h}return"black"}}const Hc=/^linear-gradient\((.*?)deg,\s*(.*?)\s*\)$/i;class Wc extends Lc{constructor(){super(...arguments),this.fillOpacity=1,this.strokeOpacity=1,this.fill=Wc.defaultStyles.fill,this.stroke=Wc.defaultStyles.stroke,this.strokeWidth=Wc.defaultStyles.strokeWidth,this.lineDash=Wc.defaultStyles.lineDash,this.lineDashOffset=Wc.defaultStyles.lineDashOffset,this.lineCap=Wc.defaultStyles.lineCap,this.lineJoin=Wc.defaultStyles.lineJoin,this.opacity=Wc.defaultStyles.opacity,this.fillShadow=Wc.defaultStyles.fillShadow}restoreOwnStyles(){const e=this.constructor.defaultStyles,t=Object.getOwnPropertyNames(e);for(let i=0,n=t.length;i<n;i++){const n=t[i];this[n]=e[n]}}updateGradient(){const{fill:e}=this;let t;if((null===e||void 0===e?void 0:e.startsWith("linear-gradient"))&&(t=Hc.exec(e))){const e=parseFloat(t[1]),i=[],n=t[2],o=/(#[0-9a-f]+)|(rgba?\(.+?\))|([a-z]+)/gi;let r;while(r=o.exec(n))i.push(r[0]);this.gradient=new jc,this.gradient.angle=e,this.gradient.stops=i.map(((e,t)=>{const n=t/(i.length-1);return{offset:n,color:e}}))}else this.gradient=void 0}align(e,t){var i,n,o;const r=null!==(o=null===(n=null===(i=this.layerManager)||void 0===i?void 0:i.canvas)||void 0===n?void 0:n.pixelRatio)&&void 0!==o?o:1,s=Math.round(e*r)/r;return void 0==t?s:0===t?0:t<1?Math.ceil(t*r)/r:Math.round((t+e)*r)/r-s}fillStroke(e){this.renderFill(e),this.renderStroke(e)}renderFill(e){if(this.fill){const{globalAlpha:t}=e;this.applyFill(e),this.applyFillAlpha(e),this.applyShadow(e),e.fill(),e.globalAlpha=t}e.shadowColor="rgba(0, 0, 0, 0)"}applyFill(e){this.gradient?e.fillStyle=this.gradient.createGradient(e,this.computeBBox()):e.fillStyle=this.fill}applyFillAlpha(e){const{globalAlpha:t}=e;e.globalAlpha=t*this.opacity*this.fillOpacity}applyShadow(e){var t,i;const n=null!==(i=null===(t=this.layerManager)||void 0===t?void 0:t.canvas.pixelRatio)&&void 0!==i?i:1,o=this.fillShadow;(null===o||void 0===o?void 0:o.enabled)&&(e.shadowColor=o.color,e.shadowOffsetX=o.xOffset*n,e.shadowOffsetY=o.yOffset*n,e.shadowBlur=o.blur*n)}renderStroke(e){if(this.stroke&&this.strokeWidth){const{globalAlpha:t}=e;e.strokeStyle=this.stroke,e.globalAlpha=t*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),e.stroke(),e.globalAlpha=t}}containsPoint(e,t){return this.isPointInPath(e,t)}}Wc.defaultStyles=Object.assign({},{fill:"black",stroke:void 0,strokeWidth:0,lineDash:void 0,lineDashOffset:0,lineCap:void 0,lineJoin:void 0,opacity:1,fillShadow:void 0}),fa([Sc({redraw:Cc.MINOR}),ga("design:type",Number)],Wc.prototype,"fillOpacity",void 0),fa([Sc({redraw:Cc.MINOR}),ga("design:type",Number)],Wc.prototype,"strokeOpacity",void 0),fa([Sc({redraw:Cc.MINOR,changeCb:e=>e.updateGradient()}),ga("design:type",Object)],Wc.prototype,"fill",void 0),fa([Sc({redraw:Cc.MINOR}),ga("design:type",Object)],Wc.prototype,"stroke",void 0),fa([Sc({redraw:Cc.MINOR}),ga("design:type",Number)],Wc.prototype,"strokeWidth",void 0),fa([Sc({redraw:Cc.MINOR}),ga("design:type",Object)],Wc.prototype,"lineDash",void 0),fa([Sc({redraw:Cc.MINOR}),ga("design:type",Number)],Wc.prototype,"lineDashOffset",void 0),fa([Sc({redraw:Cc.MINOR}),ga("design:type",String)],Wc.prototype,"lineCap",void 0),fa([Sc({redraw:Cc.MINOR}),ga("design:type",String)],Wc.prototype,"lineJoin",void 0),fa([Sc({redraw:Cc.MINOR,convertor:e=>Math.min(1,Math.max(0,e))}),ga("design:type",Number)],Wc.prototype,"opacity",void 0),fa([Sc({redraw:Cc.MINOR,checkDirtyOnAssignment:!0}),ga("design:type",Object)],Wc.prototype,"fillShadow",void 0);const Uc="…";function zc(e){const{redraw:t=Cc.MAJOR,changeCb:i}=null!==e&&void 0!==e?e:{};return Sc({redraw:t,type:"font",changeCb:i})}class Kc extends Wc{constructor(){super(...arguments),this.x=0,this.y=0,this.lines=[],this.text=void 0,this._dirtyFont=!0,this.fontSize=10,this.fontFamily="sans-serif",this.textAlign=Kc.defaultStyles.textAlign,this.textBaseline=Kc.defaultStyles.textBaseline,this.lineHeight=void 0}_setLines(){this.lines=Qc(this.text)}get font(){return(null==this._font||this._dirtyFont)&&(this._dirtyFont=!1,this._font=qc(this)),this._font}computeBBox(){return Vc.has.textMetrics?$c(this.lines,this.x,this.y,this):Zc(this.lines,this.x,this.y,this)}getLineHeight(e){var t,i;if(this.lineHeight)return this.lineHeight;if(Vc.has.textMetrics){const n=Vc.measureText(e,this.font,this.textBaseline,this.textAlign);return(null!==(t=n.fontBoundingBoxAscent)&&void 0!==t?t:n.emHeightAscent)+(null!==(i=n.fontBoundingBoxDescent)&&void 0!==i?i:n.emHeightDescent)}return Vc.getTextSize(e,this.font).height}isPointInPath(e,t){const i=this.transformPoint(e,t),n=this.computeBBox();return!!n&&n.containsPoint(i.x,i.y)}render(e){const{ctx:t,forceRender:i,stats:n}=e;if(this.dirty===Cc.NONE&&!i)return void(n&&(n.nodesSkipped+=this.nodeCount.count));if(!this.lines.length||!this.layerManager)return void(n&&(n.nodesSkipped+=this.nodeCount.count));this.computeTransformMatrix(),this.matrix.toContext(t);const{fill:o,stroke:r,strokeWidth:s}=this;t.font=this.font,t.textAlign=this.textAlign,t.textBaseline=this.textBaseline;const a=this.layerManager.canvas.pixelRatio||1,{globalAlpha:l}=t;if(o){t.fillStyle=o,t.globalAlpha=l*this.opacity*this.fillOpacity;const{fillShadow:e}=this;(null===e||void 0===e?void 0:e.enabled)&&(t.shadowColor=e.color,t.shadowOffsetX=e.xOffset*a,t.shadowOffsetY=e.yOffset*a,t.shadowBlur=e.blur*a),this.renderLines(((e,i,n)=>t.fillText(e,i,n)))}if(r&&s){t.strokeStyle=r,t.lineWidth=s,t.globalAlpha=l*this.opacity*this.strokeOpacity;const{lineDash:e,lineDashOffset:i,lineCap:n,lineJoin:o}=this;e&&t.setLineDash(e),i&&(t.lineDashOffset=i),n&&(t.lineCap=n),o&&(t.lineJoin=o),this.renderLines(((e,i,n)=>t.strokeText(e,i,n)))}super.render(e)}renderLines(e){const{lines:t,x:i,y:n}=this,o=this.lines.map((e=>this.getLineHeight(e))),r=o.reduce(((e,t)=>e+t),0);let s=-(r-o[0])*Jc(this.textBaseline);for(let a=0;a<t.length;a++)e(t[a],i,n+s),s+=o[a]}static wrap(e,t,i,n,o,r="ellipsis"){var s;const a="hide"!==r,l=qc(n),c=Yc(l),u=e.split(/\r?\n/g);if(0===u.length)return"";if("never"===o)return null!==(s=Kc.truncateLine(u[0],t,c,a?"auto":"never"))&&void 0!==s?s:"";const d=[];let p=0;for(const h of u){const e=Kc.wrapLine(h,t,i,c,n,o,p,a);if(null==e)return"";
18if(d.push(e.result),p=e.cumulativeHeight,e.truncated)break}return d.join("\n").trim()}static wrapLine(e,t,i,n,o,r,s,a){if(e=e.trim(),!e)return{result:"",truncated:!1,cumulativeHeight:s};const l=n.size(e);if(l.width<=t)return{result:e,truncated:!1,cumulativeHeight:s+l.height};if(l.height>i||n.width("W")>t)return a?{result:"",truncated:!0,cumulativeHeight:s}:void 0;const c=e.split(/\s+/g),u=Kc.wrapLineSequentially(c,t,i,n,o,r,s,a);if(null==u)return;s=u.cumulativeHeight;let{lines:d}=u;if(!u.wordsBrokenOrTruncated&&!u.linesTruncated){const e=u.lines.length,i=Kc.wrapLineBalanced(c,t,n,e);i.length===d.length&&(d=i)}const p=d.map((e=>e.join(" "))).join("\n");return{result:p,truncated:u.linesTruncated,cumulativeHeight:s}}static breakWord(e,t,i,n,o){const r=t=>Kc.punctuationMarks.includes(e[t]),s=n?o.width("-"):0,a=[];let l=0,c=0;for(let p=0;p<e.length;p++){const n=e[p],r=o.width(n),u=0===c?t:i;l+r+s>u&&(a.push(p),l=0,c++),l+=r}const u=[];let d=0;for(const p of a){let t=e.substring(d,p);n&&t.length>0&&!r(p-1)&&!r(p)&&(t+="-"),u.push(t),d=p}return u.push(e.substring(d)),u}static truncateLine(e,t,i,n){e=e.trimEnd();const o=i.width(e);if(o>t&&"never"===n)return;if(o<=t&&"force"!==n)return e;const r=i.width(Uc);let s=e,a=o;while(s.length>0&&a+r>t)s=s.slice(0,-1).trimEnd(),a=i.width(s);return a+r<=t?`${s}${Uc}`:void 0}static wrapLineSequentially(e,t,i,n,o,r,s,a){const{fontSize:l=0,lineHeight:c=l*Kc.defaultLineHeightRatio}=o,u="always"===r||"hyphenate"===r,d="hyphenate"===r,p=n.width(" ");let h=!1,f=!1;const g=[];let v=[],y=0;const m=()=>({lines:g,linesTruncated:f,wordsBrokenOrTruncated:h,cumulativeHeight:s}),C=()=>{if(!a)return;const e=v.join(" "),i=Kc.truncateLine(e,t,n,"force");return null!=i?(v.splice(0,v.length,i),f=!0,m()):void 0},b=()=>{const e=s+c;return!(e>=i)&&(v=[],y=0,s=e,g.push(v),!0)};if(!b())return C();for(let w=0;w<e.length;w++){const i=e[w],o=n.width(i),r=0===v.length?0:p,s=y+r+o;if(s<=t)v.push(i),y=s;else if(o<=t){if(!b())return C();v.push(i),y=o}else{if(h=!0,!u){if(a){if(!b())return C();const o=Kc.truncateLine(i,t,n,"force");if(null==o)return;v.push(o),w<e.length-1&&(f=!0);break}return}{const e=t-y-r,o=Kc.breakWord(i,e,t,d,n);for(let t=0;t<o.length;t++){const e=o[t];
18if(e&&v.push(e),t===o.length-1)y=n.width(e);else if(!b())return C()}}}}return m()}static wrapLineBalanced(e,t,i,n){const o=e.reduce(((e,t)=>e+i.width(t)),0),r=i.width(" "),s=r*(e.length-n-2),a=(o+s)/n,l=[];let c=[],u=i.width(e[0]),d=!0;for(const p of e){const e=i.width(p);if(d){c=[],c.push(p),u=e,d=!1,l.push(c);continue}const n=u+r+e;n<=a?(c.push(p),u=n):n<=t?(c.push(p),d=!0):(c=[p],u=e,l.push(c))}return l}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}}function Yc(e){const t=new Map,i=t=>Vc.getTextSize(t,e),n=e=>{if(t.has(e))return t.get(e);const{width:n}=i(e);return t.set(e,n),n};return{size:i,width:n}}function qc(e){const{fontFamily:t,fontSize:i,fontStyle:n,fontWeight:o}=e;return[null!==n&&void 0!==n?n:"",null!==o&&void 0!==o?o:"",i+"px",t].join(" ").trim()}function Xc(e,t,i,n){return Vc.has.textMetrics?$c(e,t,i,n):Zc(e,t,i,n)}function $c(e,t,i,n){var o,r;let s=0,a=0,l=0,c=0,u=0;const d=qc(n),{lineHeight:p,textBaseline:h=Kc.defaultStyles.textBaseline,textAlign:f=Kc.defaultStyles.textAlign}=n;for(let g=0;g<e.length;g++){const t=Vc.measureText(e[g],d,h,f);s=Math.max(s,t.actualBoundingBoxLeft),l=Math.max(l,t.width),0==g?(a+=t.actualBoundingBoxAscent,c+=t.actualBoundingBoxAscent):u+=null!==(o=t.fontBoundingBoxAscent)&&void 0!==o?o:t.emHeightAscent,g==e.length-1?c+=t.actualBoundingBoxDescent:u+=null!==(r=t.fontBoundingBoxDescent)&&void 0!==r?r:t.emHeightDescent}return void 0!==p&&(u=(e.length-1)*p),c+=u,a+=u*Jc(h),new Pc(t-s,i-a,l,c)}function Zc(e,t,i,n){let o=0,r=0,s=0;const a=qc(n),{lineHeight:l,textBaseline:c=Kc.defaultStyles.textBaseline,textAlign:u=Kc.defaultStyles.textAlign}=n;if(e.length>0){const t=Vc.getTextSize(e[0],a);o=t.width,r=t.height}for(let d=1;d<e.length;d++){const t=Vc.getTextSize(e[d],a);o=Math.max(o,t.width),s+=null!==l&&void 0!==l?l:t.height}switch(u){case"end":case"right":t-=o;break;case"center":t-=o/2}switch(c){case"alphabetic":i-=.7*r+.5*s;break;case"middle":i-=.45*r+.5*s;break;case"ideographic":i-=r+s;break;case"hanging":i-=.2*r+.5*s;break;case"bottom":i-=r+s;break}return new Pc(t,i,o,r+s)}function Jc(e){switch(e){case"top":case"hanging":return 0;case"bottom":case"alphabetic":case"ideographic":return 1;case"middle":return.5}}function Qc(e){return"string"===typeof e?e.split(/\r?\n/g):[]}function eu(e,t){return Ba(((i,n,o)=>(i[e][null!==t&&void 0!==t?t:n]=o,o)))}function tu(e){const{newValue:t,oldValue:i,changeValue:n}=e;return Ba(((e,o,r,s)=>(r!==s&&(void 0!==s&&(null===i||void 0===i||i.call(e,s)),void 0!==r&&(null===t||void 0===t||t.call(e,r)),null===n||void 0===n||n.call(e,r,s)),r)))}Kc.className="Text",Kc.defaultLineHeightRatio=1.15,Kc.defaultStyles=Object.assign({},Wc.defaultStyles,{textAlign:"start",fontStyle:void 0,fontWeight:void 0,fontSize:10,fontFamily:"sans-serif",textBaseline:"alphabetic"}),Kc.ellipsis=Uc,Kc.punctuationMarks=[".",",","-",":",";","!","?","'",'"',"(",")"],fa([Sc({redraw:Cc.MAJOR}),ga("design:type",Number)],Kc.prototype,"x",void 0),fa([Sc({redraw:Cc.MAJOR}),ga("design:type",Number)],Kc.prototype,"y",void 0),fa([Sc({redraw:Cc.MAJOR,changeCb:e=>e._setLines()}),ga("design:type",String)],Kc.prototype,"text",void 0),fa([zc(),ga("design:type",String)],Kc.prototype,"fontStyle",void 0),fa([zc(),ga("design:type",String)],Kc.prototype,"fontWeight",void 0),fa([zc(),ga("design:type",Number)],Kc.prototype,"fontSize",void 0),fa([zc(),ga("design:type",String)],Kc.prototype,"fontFamily",void 0),fa([Sc({redraw:Cc.MAJOR}),ga("design:type",String)],Kc.prototype,"textAlign",void 0),fa([Sc({redraw:Cc.MAJOR}),ga("design:type",String)],Kc.prototype,"textBaseline",void 0),fa([Sc({redraw:Cc.MAJOR}),ga("design:type",Number)],Kc.prototype,"lineHeight",void 0);class iu{constructor(){this.node=new Kc,this.enabled=!1,this.text=void 0,this.fontSize=10,this.fontFamily="sans-serif",this.maxWidth=void 0,this.maxHeight=void 0,this.wrapping="always";const e=this.node;e.textAlign="center",e.pointerEvents=kc.None}computeTextWrap(e,t){var i,n;const{text:o,wrapping:r}=this,s=Math.min(null!==(i=this.maxWidth)&&void 0!==i?i:1/0,e),a=null!==(n=this.maxHeight)&&void 0!==n?n:t;if(!isFinite(s)&&!isFinite(a))return void(this.node.text=o);const l=Kc.wrap(null!==o&&void 0!==o?o:"",s,a,this,r);this.node.text=l}}
18iu.SMALL_PADDING=10,iu.LARGE_PADDING=20,fa([fl(Dl),ga("design:type",Object)],iu.prototype,"enabled",void 0),fa([fl(_l),eu("node"),ga("design:type",String)],iu.prototype,"text",void 0),fa([fl(Jl),eu("node"),ga("design:type",Object)],iu.prototype,"fontStyle",void 0),fa([fl(ec),eu("node"),ga("design:type",Object)],iu.prototype,"fontWeight",void 0),fa([fl(Hl(0)),eu("node"),ga("design:type",Number)],iu.prototype,"fontSize",void 0),fa([fl(Al),eu("node"),ga("design:type",String)],iu.prototype,"fontFamily",void 0),fa([fl(Gl),eu("node","fill"),ga("design:type",Object)],iu.prototype,"color",void 0),fa([fl(Wl(0)),ga("design:type",Number)],iu.prototype,"spacing",void 0),fa([fl(Wl(0)),ga("design:type",Number)],iu.prototype,"lineHeight",void 0),fa([fl(Wl(0)),ga("design:type",Number)],iu.prototype,"maxWidth",void 0),fa([fl(Wl(0)),ga("design:type",Number)],iu.prototype,"maxHeight",void 0),fa([fl(pc),ga("design:type",String)],iu.prototype,"wrapping",void 0);class nu{constructor(){this.enabled=!1,this.text=void 0,this.spacing=iu.SMALL_PADDING,this.fontStyle=void 0,this.fontWeight=void 0,this.fontSize=10,this.fontFamily="sans-serif",this.wrapping="always",this.formatter=void 0}}function ou(e,t){const i={};if(Array.isArray(t))for(let n=0;n<e.length;n++)i[`${e[n]}`]=t[n];else for(let n=0;n<e.length;n++)i[`${e[n]}`]=t;return i}function ru(e,t){return i=>Number(e)*(1-i)+Number(t)*i}function su(e,t){if("string"===typeof e)try{e=hl.fromString(e)}catch(s){e=hl.fromArray([0,0,0])}if("string"===typeof t)try{t=hl.fromString(t)}catch(s){t=hl.fromArray([0,0,0])}const i=ru(e.r,t.r),n=ru(e.g,t.g),o=ru(e.b,t.b),r=ru(e.a,t.a);return e=>hl.fromArray([i(e),n(e),o(e),r(e)]).toRgbaString()}fa([fl(Dl),ga("design:type",Object)],nu.prototype,"enabled",void 0),fa([fl(_l),ga("design:type",String)],nu.prototype,"text",void 0),fa([fl(Wl(0)),ga("design:type",Number)],nu.prototype,"spacing",void 0),fa([fl(Jl),ga("design:type",String)],nu.prototype,"fontStyle",void 0),fa([fl(ec),ga("design:type",String)],nu.prototype,"fontWeight",void 0),fa([fl(Hl(0)),ga("design:type",Number)],nu.prototype,"fontSize",void 0),fa([fl(Al),ga("design:type",String)],nu.prototype,"fontFamily",void 0),fa([fl(Gl),ga("design:type",String)],nu.prototype,"color",void 0),fa([fl(pc),ga("design:type",String)],nu.prototype,"wrapping",void 0),fa([fl(Tl),ga("design:type",Function)],nu.prototype,"formatter",void 0);const au=e=>e,lu=e=>1-Math.cos(e*Math.PI/2),cu=e=>Math.sin(e*Math.PI/2),uu=e=>-(Math.cos(e*Math.PI)-1)/2,du=e=>e*e,pu=e=>1-Math.pow(1-e,2),hu=e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2;var fu=Object.freeze({__proto__:null,linear:au,easeIn:lu,easeOut:cu,easeInOut:uu,easeInQuad:du,easeOutQuad:pu,easeInOutQuad:hu});const gu=.2,vu={animationDuration:1,animationDelay:0},yu={animationDuration:.25,animationDelay:0},mu={animationDuration:.5,animationDelay:.25},Cu={animationDuration:.25,animationDelay:.75},bu={animationDuration:gu,animationDelay:1};var wu;function Su(e){return e.every((e=>e instanceof Lc))}(function(e){e["Loop"]="loop",e["Reverse"]="reverse"})(wu||(wu={}));class Eu{constructor(e){var t,i,n,o,r,s,a,l,c,u;this.elapsed=0,this.iteration=0,this.isPlaying=!1,this.isReverse=!1,this.id=e.id,this.groupId=e.groupId,this.autoplay=null===(t=e.autoplay)||void 0===t||t,this.delay=null!==(i=e.delay)&&void 0!==i?i:0,this.duration=null!==(n=e.duration)&&void 0!==n?n:1e3,this.ease=null!==(o=e.ease)&&void 0!==o?o:au,this.repeat=null!==(r=e.repeat)&&void 0!==r?r:0,this.repeatType=null!==(s=e.repeatType)&&void 0!==s?s:wu.Loop,this.onComplete=e.onComplete,this.onPlay=e.onPlay,this.onStop=e.onStop,this.onRepeat=e.onRepeat,this.onUpdate=e.onUpdate,this.interpolate=this.createInterpolator(e.from,e.to),!0===e.skip?(null===(a=this.onUpdate)||void 0===a||a.call(this,e.to,!1,this),null===(l=this.onStop)||void 0===l||l.call(this,this),null===(c=this.onComplete)||void 0===c||c.call(this,this)):this.autoplay&&(this.play(),null===(u=this.onUpdate)||void 0===u||u.call(this,e.from,!0,this))}play(){var e;return this.isPlaying||(this.isPlaying=!0,null===(e=this.onPlay)||void 0===e||e.call(this,this)),this}pause(){return this.isPlaying&&(this.isPlaying=!1),this}stop(){var e;return this.isPlaying&&(this.isPlaying=!1,null===(e=this.onStop)||void 0===e||e.call(this,this)),this}reset(e){const t=this.interpolate(this.isReverse?1-this.delta:this.delta);return this.interpolate=this.createInterpolator(t,e.to),this.elapsed=0,this.iteration=0,"number"===typeof e.delay&&(this.delay=e.delay),"number"===typeof e.duration&&(this.duration=e.duration),"function"===typeof e.ease&&(this.ease=e.ease),this}update(e){var t,i,n;if(this.elapsed+=e,this.elapsed<=this.delay)return this;const o=this.interpolate(this.isReverse?1-this.delta:this.delta);return null===(t=this.onUpdate)||void 0===t||t.call(this,o,!1,this),this.elapsed-this.delay>=this.duration&&(this.iteration<this.repeat?(this.iteration++,this.elapsed=(this.elapsed-this.delay)%this.duration+this.delay,this.repeatType===wu.Reverse&&(this.isReverse=!this.isReverse),null===(i=this.onRepeat)||void 0===i||i.call(this,this)):(this.stop(),null===(n=this.onComplete)||void 0===n||n.call(this,this))),this}get delta(){return this.ease(al(0,(this.elapsed-this.delay)/this.duration,1))}createInterpolator(e,t){if("object"!==typeof t)return this.interpolateValue(e,t);const i=Object.keys(t).map((i=>[i,this.interpolateValue(e[i],t[i])]));return e=>{const t={};for(const[n,o]of i)t[n]=o(e);return t}}interpolateValue(e,t){try{switch(typeof e){case"number":return ru(e,t);case"string":return su(e,t)}}catch(i){}throw new Error(`Unable to interpolate values: ${e}, ${t}`)}}const xu=["removed","updated","added"],Ou={added:Cu,updated:mu,removed:yu,unknown:vu};function Tu(e,t,i,n,o,r,s){const{defaultDuration:a}=i,{fromFn:l,toFn:c,intermediateFn:u}=o,d=Su(n),p=d?n:[],h=d?[]:n,f={added:{},removed:{}};r&&s&&(f.added=ou(s.added,!0),f.removed=ou(s.removed,!0));const g=(n,o)=>{var d,p;let h,g=0,v=0;for(const y of o){const m=n[g]===y,C={last:v>=o.length-1,lastLive:g>=n.length-1,prev:o[v-1],prevFromProps:h,prevLive:n[g-1],next:o[v+1],nextLive:n[g+(m?1:0)]},b=`${e}_${t}_${y.id}`;i.stopByAnimationId(b);let w="unknown";m?r&&s&&(w=Ru(y,y.datum,r,f)):w="removed";const S=l(y,y.datum,w,C),{animationDelay:E,animationDuration:x,start:O={},finish:T={}}=S,D=ha(S,["animationDelay","animationDuration","start","finish"]),R=c(y,y.datum,w,C),{animationDelay:A,animationDuration:_,start:P={},finish:M={}}=R,k=ha(R,["animationDelay","animationDuration","start","finish"]);i.animate({id:b,groupId:e,from:D,to:k,ease:cu,onPlay:()=>{y.setProperties(Object.assign(Object.assign({},O),P))},onUpdate(e){y.setProperties(e),u&&y.setProperties(u(y,y.datum,w,C))},onStop:()=>{y.setProperties(Object.assign(Object.assign(Object.assign({},k),T),M))},duration:(null!==(d=null!==x&&void 0!==x?x:_)&&void 0!==d?d:1)*a,delay:(null!==(p=null!==E&&void 0!==E?E:A)&&void 0!==p?p:0)*a}),m&&g++,v++,h=D}};let v=0;for(const y of h){const n=y.nodes(),o=n.filter((e=>!y.isGarbage(e)));g(o,n),i.animate({id:`${e}_${t}_selection_${v}`,groupId:e,from:0,to:1,ease:cu,onStop(){y.cleanup()}}),v++}g(p,p)}function Du(e,t,i,n,o,r,s={}){const a=Su(n),l=a?n:[],c=a?[]:n,{animationDelay:u=0,animationDuration:d=1,start:p={},finish:h={}}=s,{defaultDuration:f}=i;i.animate({id:`${e}_${t}`,groupId:e,from:o,to:r,ease:cu,onPlay:()=>{for(const e of l)e.setProperties(p);for(const e of c)for(const t of e.nodes())t.setProperties(p)},onUpdate(e){for(const t of l)t.setProperties(e);for(const t of c)for(const i of t.nodes())i.setProperties(e)},onStop:()=>{for(const e of l)e.setProperties(Object.assign(Object.assign({},r),h));for(const e of c)for(const t of e.nodes())t.setProperties(Object.assign(Object.assign({},r),h))},duration:d*f,delay:u*f})}function Ru(e,t,i,n){const o=i(e,t);return n.added[o]?"added":n.removed[o]?"removed":"updated"}var Au=Object.freeze({__proto__:null,NODE_UPDATE_PHASES:xu,FROM_TO_MIXINS:Ou,fromToMotion:Tu,staticFromToMotion:Du});const _u=e=>`(${e})`,Pu=e=>`${_u(e)}?`,Mu=e=>Pu(`?:${e}`),ku=(()=>{const e=".",t="[<>=^]",i="[+\\-( ]",n="[$€£¥₣₹#]",o="0",r="\\d+",s=",",a="\\d+",l="~",c="[%a-z]";return new RegExp(["^",Mu(`${Pu(e)}${_u(t)}`),Pu(i),Pu(n),Pu(o),Pu(r),Pu(s),Mu(`\\.${_u(a)}`),Pu(l),Pu(c),"$"].join(""),"i")})(),Nu=(()=>{const e=".*?",t=".+?",i=".*?";return new RegExp(["^",_u(e),`#\\{${_u(t)}\\}`,_u(i),"$"].join(""))})();function Lu(e){let t,i;const n=Nu.exec(e);n&&([,t,e,i]=n);const o=ku.exec(e);
18if(!o)throw new Error(`The number formatter is invalid: ${e}`);const[,r,s,a,l,c,u,d,p,h,f]=o;return{fill:r,align:s,sign:a,symbol:l,zero:c,width:parseInt(u),comma:d,precision:parseInt(p),trim:Boolean(h),type:f,prefix:t,suffix:i}}function Iu(e){const t="string"===typeof e?Lu(e):e,{fill:i,align:n,sign:o="-",symbol:r,zero:s,width:a,comma:l,type:c,prefix:u="",suffix:d="",precision:p}=t;let{trim:h}=t;const f=void 0===p||isNaN(p);let g,v;if(c)if(c in Vu&&c in Gu)g=f?Gu[c]:Vu[c];else if(c in Vu)g=Vu[c];else{if(!(c in Gu))throw new Error(`The number formatter type is invalid: ${c}`);g=Gu[c]}else g=Vu["g"],h=!0;return v=null==p||f?c?6:12:p,e=>{let t=g(e,v);return h&&(t=Bu(t)),l&&(t=ju(t,l)),t=qu(e,t,o),r&&"#"!==r&&(t=`${r}${t}`),"#"===r&&"x"===c&&(t=`0x${t}`),"s"===c&&(t=`${t}${Hu(e)}`),"%"!==c&&"p"!==c||(t=`${t}%`),null==a||isNaN(a)||(t=Xu(t,a,null!==i&&void 0!==i?i:s,n)),t=`${u}${t}${d}`,t}}const Fu=e=>Math.floor(Math.abs(e)),Gu={b:e=>Fu(e).toString(2),c:e=>String.fromCharCode(e),d:e=>Math.round(Math.abs(e)).toFixed(0),o:e=>Fu(e).toString(8),x:e=>Fu(e).toString(16),X:e=>Gu.x(e).toUpperCase(),n:e=>Gu.d(e),"%":e=>`${Fu(100*e).toFixed(0)}`},Vu={e:(e,t)=>Math.abs(e).toExponential(t),E:(e,t)=>Vu.e(e,t).toUpperCase(),f:(e,t)=>Math.abs(e).toFixed(t),F:(e,t)=>Vu.f(e,t).toUpperCase(),g:(e,t)=>{if(0===e)return"0";const i=Math.abs(e),n=Math.floor(Math.log10(i));return n>=-4&&n<t?i.toFixed(t-1-n):i.toExponential(t-1)},G:(e,t)=>Vu.g(e,t).toUpperCase(),n:(e,t)=>Vu.g(e,t),p:(e,t)=>Vu.r(100*e,t),r:(e,t)=>{if(0===e)return"0";const i=Math.abs(e),n=Math.floor(Math.log10(i)),o=n-(t-1);if(o<=0)return i.toFixed(-o);const r=Math.pow(10,o);return(Math.round(i/r)*r).toFixed()},s:(e,t)=>{const i=Wu(e);return Vu.r(e/Math.pow(10,i),t)},"%":(e,t)=>Vu.f(100*e,t)};function Bu(e){return e.replace(/\.0+$/,"").replace(/(\.[1-9])0+$/,"$1")}function ju(e,t){let i=e.indexOf(".");i<0&&(i=e.length);const n=e.substring(0,i).split(""),o=e.substring(i);for(let r=n.length-3;r>0;r-=3)n.splice(r,0,t);return`${n.join("")}${o}`}function Hu(e){return Ku[Wu(e)]}function Wu(e){const t=Math.log10(Math.abs(e)),i=3*Math.floor(t/3);return Math.max(Uu,Math.min(zu,i))}const Uu=-24,zu=24,Ku={[Uu]:"y",[-21]:"z",[-18]:"a",[-15]:"f",[-12]:"p",[-9]:"n",[-6]:"µ",[-3]:"m",[0]:"",[3]:"k",[6]:"M",[9]:"G",[12]:"T",[15]:"P",[18]:"E",[21]:"Z",[zu]:"Y"},Yu="−";function qu(e,t,i=""){if("("===i)return e>=0?t:`(${t})`;const n="+"===i?"+":"";return`${e>=0?n:Yu}${t}`}function Xu(e,t,i=" ",n=">"){let o=e;if(">"!==n&&n){if("<"===n)o=o.padEnd(t,i);else if("^"===n){const e=Math.max(0,t-o.length),n=Math.ceil(e/2),r=Math.floor(e/2);o=o.padStart(n+o.length,i),o=o.padEnd(r+o.length,i)}}else o=o.padStart(t,i);return o}function $u(e,t){const i=Lu(null!==t&&void 0!==t?t:",f"),{precision:n}=i;(null==n||isNaN(n))&&("f"===i.type||"%"===i.type?i.precision=Math.max(...e.map((e=>{if("number"!==typeof e||0===e)return 0;const t=Math.floor(Math.log10(Math.abs(e))),n=i.type?6:12,o=e.toExponential(n-1).replace(/\.?0+e/,"e"),r=o.indexOf(".");if(r<0)return t>=0?0:-t;const s=o.indexOf("e")-r;return Math.max(0,s-t-1)}))):i.type&&!(i.type in Vu)||(i.precision=Math.max(...e.map((e=>{if("number"!==typeof e)return 0;const t=e.toExponential((i.type?6:12)-1).replace(/\.?0+e/,"e");return t.substring(0,t.indexOf("e")).replace(".","").length})))));const o=Iu(i);return e=>o(Number(e))}function Zu(e,t,i,n,o){if(i<2)return id(e,t,t-e);const r=Qu(e,t,i,n,o);return isNaN(r)?new td(0):(e=Math.ceil(e/r)*r,t=Math.floor(t/r)*r,id(e,t,r))}const Ju=[1,2,5,10];function Qu(e,t,i,n=0,o=1/0){const r=(t-e)/i,s=Math.floor(Math.log10(r)),a=Math.pow(10,s),l=Ju.map((r=>{const s=r*a,l=Math.ceil((t-e)/s),c=l>=n&&l<=o,u=Math.abs(l-i);return{multiplier:r,isWithinBounds:c,diffCount:u}})).sort(((e,t)=>e.isWithinBounds!==t.isWithinBounds?e.isWithinBounds?-1:1:e.diffCount-t.diffCount))[0].multiplier;return!l||isNaN(l)?NaN:l*a}function ed(e,t){const i=Math.floor(Math.log10(t-e)),n=Math.pow(10,i);return Ju.map((i=>{const o=i*n,r=Math.floor(e/o)*o,s=Math.ceil(t/o)*o,a=1-(t-e)/(s-r),l=[r,s];return{error:a,domain:l}})).sort(((e,t)=>e.error-t.error))[0].domain}class td extends Array{constructor(e,t){if(super(),t)for(let i=0,n=t.length;i<n;i++)this[i]=t[i];this.fractionDigits=e}}function id(e,t,i){const n=e=>{var t,i;const n=e.split("e");return Math.max((null!==(i=null===(t=n[0].split(".")[1])||void 0===t?void 0:t.length)&&void 0!==i?i:0)-Number(n[1]),0)},o=n((i%1).toExponential()),r=Math.pow(10,o),s=Math.ceil((t-e)/i),a=new td(o);for(let l=0;l<=s;l++){const t=e+i*l;a.push(Math.round(t*r)/r)}return a}class nd{static is(e){return e instanceof nd}constructor(e,t){this.domain=e,this.range=t,this.nice=!1,this.tickCount=nd.defaultTickCount,this.minTickCount=0,this.maxTickCount=1/0,this.niceDomain=[],this.defaultClampMode="raw",this.cache=null,this.cacheProps=["domain","range","nice","tickCount","minTickCount","maxTickCount"]}transform(e){return e}transformInvert(e){return e}calcBandwidth(e=1){const t=this.getDomain(),i=Math.max(...this.range),n=(t[1]-t[0])/e+1,o=Math.floor(i),r=Math.min(n,o);return i/Math.max(1,r)}fromDomain(e){return"number"===typeof e?e:e instanceof Date?e.getTime():NaN}getDomain(){return this.nice&&(this.refresh(),this.niceDomain.length)?this.niceDomain:this.domain}convert(e,t){var i;const n=null!==(i=null===t||void 0===t?void 0:t.clampMode)&&void 0!==i?i:this.defaultClampMode;if(!this.domain||this.domain.length<2)return NaN;this.refresh();const o=this.getDomain().map((e=>this.transform(e))),[r,s]=o,{range:a}=this,[l,c]=a;if(e=this.transform(e),"clamped"===n){if(e<r)return l;if(e>s)return c}return r===s?(l+c)/2:e===r?l:e===s?c:l+(this.fromDomain(e)-this.fromDomain(r))/(this.fromDomain(s)-this.fromDomain(r))*(c-l)}invert(e){this.refresh();const t=this.getDomain().map((e=>this.transform(e))),[i,n]=t,{range:o}=this,[r,s]=o,a=r>s,l=a?s:r,c=a?r:s;let u;return e<l?a?n:i:e>c?a?i:n:(u=r===s?this.toDomain((this.fromDomain(i)+this.fromDomain(n))/2):this.toDomain(this.fromDomain(i)+(e-r)/(s-r)*(this.fromDomain(n)-this.fromDomain(i))),this.transformInvert(u))}didChange(){const{cache:e}=this,t=!e||this.cacheProps.some((t=>this[t]!==e[t]));return!!t&&(this.cache={},this.cacheProps.forEach((e=>this.cache[e]=this[e])),!0)}refresh(){this.didChange()&&this.update()}getPixelRange(){const e=this.range.slice().sort(((e,t)=>e-t));return e[1]-e[0]}isDenseInterval({start:e,stop:t,interval:i,count:n}){const o=t-e,r=this.getPixelRange(),s="number"===typeof i?i:1;return null!==n&&void 0!==n||(n=o/s),n>=r&&(Pa.warn("the configured tick interval results in more than 1 tick per pixel, ignoring. Supply a larger tick interval or omit this configuration."),!0)}}nd.defaultTickCount=5,nd.defaultMaxTickCount=6;class od extends nd{constructor(){super([0,1],[0,1]),this.type="linear"}toDomain(e){return e}ticks(){var e;const t=null!==(e=this.tickCount)&&void 0!==e?e:nd.defaultTickCount;if(!this.domain||this.domain.length<2||t<1||this.domain.some((e=>!isFinite(e))))return[];this.refresh();const[i,n]=this.getDomain(),{interval:o}=this;if(o){const e=Math.abs(o);if(!this.isDenseInterval({start:i,stop:n,interval:e}))return id(i,n,e)}return Zu(i,n,t,this.minTickCount,this.maxTickCount)}update(){!this.domain||this.domain.length<2||this.nice&&this.updateNiceDomain()}getTickStep(e,t){var i,n;const o=null!==(i=this.tickCount)&&void 0!==i?i:nd.defaultTickCount;return null!==(n=this.interval)&&void 0!==n?n:Qu(e,t,o,this.minTickCount,this.maxTickCount)}updateNiceDomain(){var e;const t=null!==(e=this.tickCount)&&void 0!==e?e:nd.defaultTickCount;let[i,n]=this.domain;if(t<1)return void(this.niceDomain=[i,n]);if(1===t)return void(this.niceDomain=ed(i,n));const o=4;let r=i,s=n;for(let a=0;a<o;a++){const e=this.getTickStep(i,n),[t,o]=this.domain;if(e>=1)i=Math.floor(t/e)*e,n=Math.ceil(o/e)*e;else{const r=1/e;i=Math.floor(t*r)/r,n=Math.ceil(o*r)/r}if(i===r&&n===s)break;r=i,s=n}this.niceDomain=[i,n]}tickFormat({ticks:e,specifier:t}){return $u(null!==e&&void 0!==e?e:this.ticks(),t)}}function rd(e,t){let i=0;return"number"===typeof e&&"number"===typeof t?i=e-t:"string"===typeof e&&"string"===typeof t?i=e.localeCompare(t):null==e&&null==t||(i=null==e?-1:null==t?1:String(e).localeCompare(String(t))),i}function sd(e,t,i){const n=e=>"function"===typeof e?e():e;for(const o in e){const r=i(n(e[o]),n(t[o]));if(0!==r)return r}return 0}class ad extends Lc{zIndexChanged(){var e;this.layer&&(null===(e=this._layerManager)||void 0===e||e.moveLayer(this.layer,this.zIndex,this.zIndexSubOrder))}isLayer(){return null!=this.layer}constructor(e){var t;super({isVirtual:null===e||void 0===e?void 0:e.isVirtual}),this.opts=e,this.opacity=1,this.lastBBox=void 0;const{zIndex:i,zIndexSubOrder:n}=null!==e&&void 0!==e?e:{};this.isContainerNode=!0,void 0!==i&&(this.zIndex=i),void 0!==n&&(this.zIndexSubOrder=n),this.name=null===(t=this.opts)||void 0===t?void 0:t.name}_setLayerManager(e){var t,i;if(this._layerManager&&this.layer&&(this._layerManager.removeLayer(this.layer),this.layer=void 0),this.layer)throw new Error("AG Charts - unable to deregister scene rendering layer!");if(super._setLayerManager(e),e&&(null===(t=this.opts)||void 0===t?void 0:t.layer)){const{zIndex:t,zIndexSubOrder:n,name:o}=null!==(i=this.opts)&&void 0!==i?i:{},r=()=>this.getComputedOpacity(),s=()=>this.getVisibility();this.layer=e.addLayer({zIndex:t,zIndexSubOrder:n,name:o,getComputedOpacity:r,getVisibility:s})}}getComputedOpacity(){let e=1,t=this;do{t instanceof ad&&(e*=t.opacity)}while(t=t.parent);return e}getVisibility(){let e=this,t=this.visible;while(e=e.parent)e.visible||(t=e.visible);return t}visibilityChanged(){this.layer&&(this.layer.enabled=this.visible)}markDirty(e,t=Cc.TRIVIAL){if(this.isVirtual)return void super.markDirty(e,t);let i=t;(t<Cc.MINOR||null!=this.layer)&&(i=Cc.TRIVIAL),super.markDirty(e,t,i)}containsPoint(e,t){return!0}computeBBox(){return this.computeTransformMatrix(),ad.computeBBox(this.children)}computeTransformedBBox(){return this.computeBBox()}render(e){var t,i;const{opts:{name:n}={},_debug:o=(()=>{})}=this,{dirty:r,dirtyZIndex:s,layer:a,children:l,clipRect:c,dirtyTransform:u}=this;let{ctx:d,forceRender:p,clipBBox:h}=e;const{resized:f,stats:g}=e,v=d.getTransform(),y=r>=Cc.MINOR||s||f;let m=y,C=!1;for(const O of l)if(m||(m=null==O.layerManager&&O.dirty>=Cc.TRIVIAL),C||(C=null!=O.layerManager&&O.dirty>=Cc.TRIVIAL),m)break;
18if(n&&o({name:n,group:this,isDirty:y,isChildDirty:m,dirtyTransform:u,renderCtx:e,forceRender:p}),u)p="dirtyTransform";else if(a){const e=this.computeBBox();void 0!==this.lastBBox&&this.lastBBox.equals(e)||(p="dirtyTransform",this.lastBBox=e)}if(!y&&!m&&!C&&!p)return n&&g&&o({name:n,result:"skipping",renderCtx:e,counts:this.nodeCount,group:this}),a&&g&&(g.layersSkipped++,g.nodesSkipped+=this.nodeCount.count),void this.markClean({recursive:!1});const b=this.visible;if(a){if(d=a.context,d.save(),d.resetTransform(),"dirtyTransform"!==p&&(p=m||s),p&&a.clear(),h){const{width:t,height:i,x:r,y:s}=h;o((()=>({name:n,clipBBox:h,ctxTransform:d.getTransform(),renderCtx:e,group:this}))),this.clipCtx(d,r,s,t,i)}d.setTransform(v)}else d.globalAlpha*=this.opacity;if(this.computeTransformMatrix(),this.matrix.toContext(d),c){const{x:t,y:i,width:r,height:s}=c;d.save(),o((()=>({name:n,clipRect:c,ctxTransform:d.getTransform(),renderCtx:e,group:this}))),this.clipCtx(d,t,i,r,s),h=this.matrix.transformBBox(c)}const w=this.hasVirtualChildren();s?(this.sortChildren(l),"dirtyTransform"!==p&&(p=!0)):w&&this.sortChildren(l);const S=p!==e.forceRender||h!==e.clipBBox||d!==e.ctx,E=S?Object.assign(Object.assign({},e),{ctx:d,forceRender:p,clipBBox:h}):e;let x=0;for(const O of l)O.visible&&b?p||O.dirty!==Cc.NONE?(d.save(),O.render(E),d.restore()):g&&(x+=O.nodeCount.count):(O.markClean(),g&&(x+=O.nodeCount.count));if(g&&(g.nodesSkipped+=x),super.render(e),c&&d.restore(),w)for(const O of this.virtualChildren)O.markClean({recursive:"virtual"});a&&(g&&g.layersRendered++,d.restore(),p&&a.snapshot(),null===(i=(t=a.context).verifyDepthZero)||void 0===i||i.call(t)),n&&g&&o({name:n,result:"rendered",skipped:x,renderCtx:e,counts:this.nodeCount,group:this})}sortChildren(e){this.dirtyZIndex=!1,e.sort(((e,t)=>{var i,n;return sd([e.zIndex,...null!==(i=e.zIndexSubOrder)&&void 0!==i?i:[void 0,void 0],e.serialNumber],[t.zIndex,...null!==(n=t.zIndexSubOrder)&&void 0!==n?n:[void 0,void 0],t.serialNumber],rd)}))}clipCtx(e,t,i,n,o){e.beginPath(),e.moveTo(t,i),e.lineTo(t+n,i),e.lineTo(t+n,i+o),e.lineTo(t,i+o),e.closePath(),e.clip()}static computeBBox(e){let t=1/0,i=-1/0,n=1/0,o=-1/0;return e.forEach((e=>{if(!e.visible)return;const r=e.computeTransformedBBox();if(!r)return;const s=r.x,a=r.y;s<t&&(t=s),a<n&&(n=a),s+r.width>i&&(i=s+r.width),a+r.height>o&&(o=a+r.height)})),new Pc(t,n,i-t,o-n)}setClipRectInGroupCoordinateSpace(e){this.clipRect=e?this.transformBBox(e):void 0}}ad.className="Group",fa([Sc({redraw:Cc.MAJOR,convertor:e=>Math.min(1,Math.max(0,e))}),ga("design:type",Number)],ad.prototype,"opacity",void 0);class ld{static select(e,t,i=!0){return new ld(e,t,i)}static selectAll(e,t){const i=[],n=e=>{t(e)&&i.push(e),e.children.forEach(n)};return n(e),i}static selectByClass(e,t){return ld.selectAll(e,(e=>e instanceof t))}static selectByTag(e,t){return ld.selectAll(e,(e=>e.tag===t))}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=Ia.create(!0,"scene","scene:selections"),this.nodeFactory=Object.prototype.isPrototypeOf.call(Lc,t)?()=>new t:t}createNode(e,t,i){const n=this.nodeFactory(e);return n.datum=e,null===t||void 0===t||t(n),null!=i?this._nodes.splice(i,0,n):this._nodes.push(n),this.parentNode.appendChild(n),n}update(e,t,i){if(this.garbageBin.size>0&&this.debug(`Selection - update() called with pending garbage: ${e}`),i){const n=new Map(e.map(((e,t)=>[i(e),[e,t]])));for(const[e,t]of this._nodesMap.entries())if(n.has(t)){const[i]=n.get(t);e.datum=i,this.garbageBin.delete(e),n.delete(t)}else this.garbageBin.add(e);for(const[e,[i,o]]of n.entries())this._nodesMap.set(this.createNode(i,t,o),e)}else{const i=Math.max(e.length,this.data.length);for(let n=0;n<i;n++)n>=e.length?this.garbageBin.add(this._nodes[n]):n>=this._nodes.length?this.createNode(e[n],t):(this._nodes[n].datum=e[n],this.garbageBin.delete(this._nodes[n]))}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),this.parentNode.removeChild(e),!1)))),this}clear(){return this.update([]),this}isGarbage(e){return this.garbageBin.has(e)}hasGarbage(){return this.garbageBin.size>0}
18each(e){return this._nodes.forEach(((t,i)=>e(t,t.datum,i))),this}*[Symbol.iterator](){for(let e=0;e<this._nodes.length;e++){const t=this._nodes[e],i=this._nodes[e].datum;yield{node:t,datum:i,index:e}}}select(e){return ld.selectAll(this.parentNode,e)}selectByClass(e){return ld.selectByClass(this.parentNode,e)}selectByTag(e){return ld.selectByTag(this.parentNode,e)}nodes(){return this._nodes}}class cd extends Wc{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 Pc(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){if(this.x1===this.x2||this.y1===this.y2){const{x:i,y:n}=this.transformPoint(e,t);return this.computeBBox().grow(this.strokeWidth/2).containsPoint(i,n)}return!1}render(e){var t;const{ctx:i,forceRender:n,stats:o}=e;if(this.dirty===Cc.NONE&&!n)return void(o&&(o.nodesSkipped+=this.nodeCount.count));this.computeTransformMatrix(),this.matrix.toContext(i);let{x1:r,y1:s,x2:a,y2:l}=this;if(r===a){const e=Math.round(r)+Math.floor(this.strokeWidth)%2/2;r=e,a=e}else if(s===l){const e=Math.round(s)+Math.floor(this.strokeWidth)%2/2;s=e,l=e}i.beginPath(),i.moveTo(r,s),i.lineTo(a,l),this.fillStroke(i),null===(t=this.fillShadow)||void 0===t||t.markClean(),super.render(e)}}function ud(e,t){const i=-t/e;return 0!==e&&i>=0&&i<=1?[i]:[]}function dd(e,t,i){if(0===e)return ud(t,i);const n=t*t-4*e*i,o=[];if(0===n){const i=-t/(2*e);i>=0&&i<=1&&o.push(i)}else if(n>0){const i=Math.sqrt(n),r=(-t-i)/(2*e),s=(-t+i)/(2*e);r>=0&&r<=1&&o.push(r),s>=0&&s<=1&&o.push(s)}return o}function pd(e,t,i,n){if(0===e)return dd(t,i,n);const o=t/e,r=i/e,s=n/e,a=(3*r-o*o)/9,l=(9*o*r-27*s-2*o*o*o)/54,c=a*a*a+l*l,u=1/3,d=[];if(c>=0){const e=Math.sqrt(c),t=Math.sign(l+e)*Math.pow(Math.abs(l+e),u),i=Math.sign(l-e)*Math.pow(Math.abs(l-e),u),n=Math.abs(Math.sqrt(3)*(t-i)/2),r=-u*o+(t+i);if(r>=0&&r<=1&&d.push(r),0===n){const e=-u*o-(t+i)/2;e>=0&&e<=1&&d.push(e)}}else{const e=Math.acos(l/Math.sqrt(-a*a*a)),t=u*o,i=2*Math.sqrt(-a),n=i*Math.cos(u*e)-t,r=i*Math.cos(u*(e+2*Math.PI))-t,s=i*Math.cos(u*(e+4*Math.PI))-t;n>=0&&n<=1&&d.push(n),r>=0&&r<=1&&d.push(r),s>=0&&s<=1&&d.push(s)}return d}function hd(e,t,i,n,o,r,s,a){const l=(i-e)*(a-r)-(n-t)*(s-o);if(0===l)return null;const c=((s-o)*(t-r)-(e-o)*(a-r))/l,u=((i-e)*(t-r)-(n-t)*(e-o))/l;return c>=0&&c<=1&&u>=0&&u<=1?{x:e+c*(i-e),y:t+c*(n-t)}:null}function fd(e,t,i,n,o,r,s,a,l,c,u,d){const p=[],h=c-d,f=u-l,g=l*(d-c)-c*(u-l),v=gd(e,i,o,s),y=gd(t,n,r,a),m=h*v[0]+f*y[0],C=h*v[1]+f*y[1],b=h*v[2]+f*y[2],w=h*v[3]+f*y[3]+g,S=pd(m,C,b,w);for(const E of S){const e=E*E,t=E*e,i=v[0]*t+v[1]*e+v[2]*E+v[3],n=y[0]*t+y[1]*e+y[2]*E+y[3];let o;o=l!==u?(i-l)/(u-l):(n-c)/(d-c),o>=0&&o<=1&&p.push({x:i,y:n})}return p}function gd(e,t,i,n){return[3*t-e-3*i+n,3*e-6*t+3*i,-3*e+3*t,e]}function vd(e,t,i,n,o,r,s,a,l,c){const u=(c-a)/(l-s),d=a-u*s,p=Math.pow(u,2)+1,h=2*(u*(d-t)-e),f=Math.pow(e,2)+Math.pow(d-t,2)-Math.pow(i,2),g=Math.pow(h,2)-4*p*f;if(g<0)return[];const v=(-h+Math.sqrt(g))/2/p,y=(-h-Math.sqrt(g))/2/p,m=[];return[v,y].forEach((e=>{const t=e>=Math.min(s,l)&&e<=Math.max(s,l);if(!t)return;const i=u*e+d,a=Qa(n);let c=Qa(o),p=Qa(Math.atan2(i,e));c<=a&&(c+=2*Math.PI),p<a&&(p+=2*Math.PI),r!==(p>=a&&p<=c)&&m.push({x:e,y:i})})),m}function yd(e,t,i){const n=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),{innerRadius:o,outerRadius:r}=i;if(i.startAngle===i.endAngle||n<Math.min(o,r)||n>Math.max(o,r))return!1;const s=tl(i.startAngle),a=tl(i.endAngle),l=Math.atan2(t,e);return s<a?l<=a&&l>=s:l<=a&&l>=-Math.PI||l>=s&&l<=Math.PI}function md(e,t){const{startAngle:i,endAngle:n,innerRadius:o,outerRadius:r}=t,s={x:r*Math.cos(i),y:r*Math.sin(i)},a={x:r*Math.cos(n),y:r*Math.sin(n)},l=0===o?{x:0,y:0}:{x:o*Math.cos(i),y:o*Math.sin(i)},c=0===o?{x:0,y:0}:{x:o*Math.cos(n),y:o*Math.sin(n)};return null!=hd(e.start.x,e.start.y,e.end.x,e.end.y,s.x,s.y,l.x,l.y)||null!=hd(e.start.x,e.start.y,e.end.x,e.end.y,a.x,a.y,c.x,c.y)||vd(0,0,r,i,n,!0,e.start.x,e.start.y,e.end.x,e.end.y).length>0}function Cd(e,t){const i={x:e.x,y:e.y},n={x:e.x+e.width,y:e.y},o={x:e.x,y:e.y+e.height},r={x:e.x+e.width,y:e.y+e.height};return md({start:i,end:n},t)||md({start:o,end:r},t)}var bd;cd.className="Line",cd.defaultStyles=Object.assign({},Wc.defaultStyles,{fill:void 0,strokeWidth:1}),fa([Sc({redraw:Cc.MAJOR}),ga("design:type",Number)],cd.prototype,"x1",void 0),fa([Sc({redraw:Cc.MAJOR}),ga("design:type",Number)],cd.prototype,"y1",void 0),fa([Sc({redraw:Cc.MAJOR}),ga("design:type",Number)],cd.prototype,"x2",void 0),fa([Sc({redraw:Cc.MAJOR}),ga("design:type",Number)],cd.prototype,"y2",void 0),function(e){e[e["Move"]=0]="Move",e[e["Line"]=1]="Line",e[e["Arc"]=2]="Arc",e[e["Curve"]=3]="Curve",e[e["ClosePath"]=4]="ClosePath"}(bd||(bd={}));class wd{constructor(){this.previousCommands=[],this.previousParams=[],this.previousClosedPath=!1,this.commands=[],this.params=[],this._closedPath=!1}
18isDirty(){if(this._closedPath!==this.previousClosedPath)return!0;if(this.previousCommands.length!==this.commands.length)return!0;if(this.previousParams.length!==this.params.length)return!0;for(let e=0;e<this.commands.length;e++)if(this.commands[e]!==this.previousCommands[e])return!0;for(let e=0;e<this.params.length;e++)if(this.params[e]!==this.previousParams[e])return!0;return!1}draw(e){const t=this.commands,i=this.params;let n=0;e.beginPath();for(const o of t)switch(o){case bd.Move:e.moveTo(i[n++],i[n++]);break;case bd.Line:e.lineTo(i[n++],i[n++]);break;case bd.Curve:e.bezierCurveTo(i[n++],i[n++],i[n++],i[n++],i[n++],i[n++]);break;case bd.Arc:e.arc(i[n++],i[n++],i[n++],i[n++],i[n++],1===i[n++]);break;case bd.ClosePath:e.closePath();break}0===t.length&&e.closePath()}moveTo(e,t){this.xy?(this.xy[0]=e,this.xy[1]=t):this.xy=[e,t],this.commands.push(bd.Move),this.params.push(e,t)}lineTo(e,t){this.xy?(this.commands.push(bd.Line),this.params.push(e,t),this.xy[0]=e,this.xy[1]=t):this.moveTo(e,t)}rect(e,t,i,n){this.moveTo(e,t),this.lineTo(e+i,t),this.lineTo(e+i,t+n),this.lineTo(e,t+n),this.closePath()}arc(e,t,i,n,o,r=!1){const s=e+i*Math.cos(o),a=t+i*Math.sin(o);this.xy?(this.xy[0]=s,this.xy[1]=a):this.xy=[s,a],this.commands.push(bd.Arc),this.params.push(e,t,i,n,o,r?1:0)}cubicCurveTo(e,t,i,n,o,r){this.xy||this.moveTo(e,t),this.commands.push(bd.Curve),this.params.push(e,t,i,n,o,r),this.xy&&(this.xy[0]=o,this.xy[1]=r)}get closedPath(){return this._closedPath}closePath(){this.xy&&(this.xy=void 0,this.commands.push(bd.ClosePath),this._closedPath=!0)}clear({trackChanges:e}={trackChanges:!1}){e?(this.previousCommands=this.commands,this.previousParams=this.params,this.previousClosedPath=this._closedPath,this.commands=[],this.params=[]):(this.commands.length=0,this.params.length=0),this.xy=void 0,this._closedPath=!1}isPointInPath(e,t){const i=this.commands,n=this.params,o=i.length,r=-1e4,s=-1e4;let a=NaN,l=NaN,c=0,u=0,d=0;for(let p=0,h=0;p<o;p++)switch(i[p]){case bd.Move:!isNaN(a)&&hd(a,l,c,u,r,s,e,t)&&d++,c=n[h++],a=c,u=n[h++],l=u;break;case bd.Line:hd(c,u,n[h++],n[h++],r,s,e,t)&&d++,c=n[h-2],u=n[h-1];break;case bd.Curve:d+=fd(c,u,n[h++],n[h++],n[h++],n[h++],n[h++],n[h++],r,s,e,t).length,c=n[h-2],u=n[h-1];break;case bd.Arc:const i=n[h++],o=n[h++],p=n[h++],f=n[h++],g=n[h++],v=Boolean(n[h++]);d+=vd(i,o,p,f,g,v,r,s,e,t).length,c=i+Math.cos(g)*p,u=o+Math.sin(g)*p;break;case bd.ClosePath:!isNaN(a)&&hd(a,l,c,u,r,s,e,t)&&d++;break}return d%2===1}getPoints(){const{commands:e,params:t}=this,i=[];let n=0;for(let o=0;o<e.length;o++)switch(e[o]){case bd.Move:case bd.Line:i.push({x:t[n++],y:t[n++]});break;case bd.Curve:n+=4,i.push({x:t[n++],y:t[n++]});break;case bd.Arc:i.push({x:t[n++],y:t[n++]}),n+=4;break;case bd.ClosePath:break}return i}}function Sd(e){const{redraw:t=Cc.MAJOR,changeCb:i,convertor:n}=null!==e&&void 0!==e?e:{};return Sc({redraw:t,type:"path",convertor:n,changeCb:i})}class Ed extends Wc{constructor(){super(...arguments),this.path=new wd,this.clipScalingX=1,this.clipScalingY=1,this._dirtyPath=!0}set dirtyPath(e){this._dirtyPath!==e&&(this._dirtyPath=e,e&&this.markDirty(this,Cc.MAJOR))}get dirtyPath(){return this._dirtyPath}checkPathDirty(){var e,t,i,n;this._dirtyPath||(this.dirtyPath=this.path.isDirty()||null!==(t=null===(e=this.fillShadow)||void 0===e?void 0:e.isDirty())&&void 0!==t&&t||null!==(n=null===(i=this.clipPath)||void 0===i?void 0:i.isDirty())&&void 0!==n&&n)}isPointInPath(e,t){const i=this.transformPoint(e,t);return this.path.closedPath&&this.path.isPointInPath(i.x,i.y)}isDirtyPath(){return!1}updatePath(){}clip(e,t){const i=e.getTransform(),n=1!==this.clipScalingX||1!==this.clipScalingY;n&&e.scale(this.clipScalingX,this.clipScalingY),t(),n&&e.setTransform(i)}render(e){var t;const{ctx:i,forceRender:n,stats:o}=e;this.dirty!==Cc.NONE||n?(this.computeTransformMatrix(),this.matrix.toContext(i),(this.dirtyPath||this.isDirtyPath())&&(this.updatePath(),this.dirtyPath=!1),this.clipPath&&null!=this.clipMode?(i.save(),"normal"===this.clipMode&&this.clip(i,(()=>{var e;null===(e=this.clipPath)||void 0===e||e.draw(i),i.clip()})),this.clipScalingX>0&&this.clipScalingY>0&&(this.path.draw(i),this.fillStroke(i)),"punch-out"===this.clipMode&&this.clip(i,(()=>{var e,t;null===(e=this.clipPath)||void 0===e||e.draw(i),i.clip();const{x:n=-1e4,y:o=-1e4,width:r=2e4,height:s=2e4}=null!==(t=this.computeBBox())&&void 0!==t?t:{};i.clearRect(n,o,r,s)}
18)),i.restore()):(this.path.draw(i),this.fillStroke(i)),null===(t=this.fillShadow)||void 0===t||t.markClean(),super.render(e)):o&&(o.nodesSkipped+=this.nodeCount.count)}}Ed.className="Path",fa([Sd(),ga("design:type",wd)],Ed.prototype,"clipPath",void 0),fa([Sd(),ga("design:type",String)],Ed.prototype,"clipMode",void 0),fa([Sd(),ga("design:type",Object)],Ed.prototype,"clipScalingX",void 0),fa([Sd(),ga("design:type",Object)],Ed.prototype,"clipScalingY",void 0);class xd extends Ed{constructor(){super(...arguments),this.centerX=0,this.centerY=0,this.innerRadius=10,this.outerRadius=20,this.startAngle=0,this.endAngle=2*Math.PI,this.angleOffset=0,this.inset=0}computeBBox(){const e=this.outerRadius;return new Pc(this.centerX-e,this.centerY-e,2*e,2*e)}updatePath(){const e=this.path,{angleOffset:t,inset:i}=this,n=this.startAngle+t,o=this.endAngle+t,r=Math.abs(this.endAngle-this.startAngle)>=2*Math.PI,s=this.centerX,a=this.centerY;if(e.clear(),r){const t=this.innerRadius<=0?0:this.innerRadius+i,r=Math.min(t,this.outerRadius-i),l=Math.max(t,this.outerRadius-i);e.arc(s,a,l,n,o),r>0&&(e.moveTo(s+r*Math.cos(o),a+r*Math.sin(o)),e.arc(s,a,r,o,n,!0))}else{const t=Math.min(this.innerRadius+i,this.outerRadius-i),r=Math.max(this.innerRadius+i,this.outerRadius-i),l=t>0?i/t:0,c=r>0?i/r:0,u=Math.abs(o-n),d=u<2*c;if(d)return;const p=t<=i||u<2*l;if(p){const l=Math.abs(u)<.5*Math.PI?i*(1+Math.cos(u))/Math.sin(u):NaN;let c;c=l>0&&l<r?Math.max(Math.hypot(i,l),t):t;const d=.5*(n+o);e.moveTo(s+c*Math.cos(d),a+c*Math.sin(d))}else e.moveTo(s+t*Math.cos(n+l),a+t*Math.sin(n+l));e.arc(s,a,r,n+c,o-c),p||(t>0?e.arc(s,a,t,o-l,n+l,!0):e.lineTo(s,a))}e.closePath(),this.dirtyPath=!1}isPointInPath(e,t){const{angleOffset:i}=this,n=this.startAngle+i,o=this.endAngle+i,r=Math.min(this.innerRadius,this.outerRadius),s=Math.max(this.innerRadius,this.outerRadius),a=this.transformPoint(e,t);return yd(a.x,a.y,{startAngle:n,endAngle:o,innerRadius:r,outerRadius:s})}}function Od(e,t){if(Rd(e)&&Rd(t)){const i={};return Object.keys(e).forEach((n=>{i[n]=n in t?Od(e[n],t[n]):e[n]})),Object.keys(t).forEach((n=>{n in e||(i[n]=t[n])})),i}return Array.isArray(e)&&!Array.isArray(t)||Td(e)&&!Td(t)?e:t}function Td(e){return"object"===typeof e&&null!==e}function Dd(e){return Td(e)&&!Array.isArray(e)}function Rd(e){return Dd(e)&&e.constructor===Object}function Ad(...e){var t;const i={};for(const n of e){if(!n)continue;const e=ja(n)?Ha(n):Object.keys(n);for(const o of e)Dd(i[o])&&Dd(n[o])?i[o]=Ad(i[o],n[o]):null!==(t=i[o])&&void 0!==t||(i[o]=n[o])}return i}xd.className="Sector",fa([Sd(),ga("design:type",Number)],xd.prototype,"centerX",void 0),fa([Sd(),ga("design:type",Number)],xd.prototype,"centerY",void 0),fa([Sd(),ga("design:type",Number)],xd.prototype,"innerRadius",void 0),fa([Sd(),ga("design:type",Number)],xd.prototype,"outerRadius",void 0),fa([Sd(),ga("design:type",Number)],xd.prototype,"startAngle",void 0),fa([Sd(),ga("design:type",Number)],xd.prototype,"endAngle",void 0),fa([Sd(),ga("design:type",Number)],xd.prototype,"angleOffset",void 0),fa([Sd(),ga("design:type",Number)],xd.prototype,"inset",void 0);let _d=null;function Pd(e){if(null!=e)return""===e?"":(null!==_d&&void 0!==_d||(_d=document.createElement("div")),_d.textContent=String(e),_d.innerHTML)}const Md=e=>"string"===typeof e,kd=e=>!!e&&Object.prototype.hasOwnProperty.call(e,"toString")&&Md(e.toString()),Nd=e=>e instanceof Date&&!isNaN(+e);function Ld(e){return Md(e)||kd(e)}function Id(e){const t=e=>!!e&&Object.prototype.hasOwnProperty.call(e,"valueOf")&&Gd(e.valueOf()),i=e=>e instanceof Date&&!isNaN(+e);return Gd(e)||t(e)||i(e)}function Fd(e,t){return t&&Id(e)?e:t?void 0:Ld(e)?e:String(e)}const Gd=e=>"number"===typeof e&&Number.isFinite(e),Vd=new Map;function Bd(e,t){var i,n,o;const r=JSON.stringify(e,null,0);return Vd.has(t)||Vd.set(t,new Map),(null===(i=Vd.get(t))||void 0===i?void 0:i.has(r))||null===(n=Vd.get(t))||void 0===n||n.set(r,t(e)),null===(o=Vd.get(t))||void 0===o?void 0:o.get(r)}const jd={type:"reducer",property:"smallestKeyInterval",initialValue:1/0,reducer:()=>{let e=NaN;return(t=1/0,i)=>{const n=i.keys[0],o=Math.abs(n-e);return e=n,!isNaN(o)&&o>0&&o<t?o:t}}},Hd={type:"processor",property:"sortedGroupDomain",calculate:({domain:{groups:e}})=>{if(null!=e)return[...e].sort(((e,t)=>{for(let i=0;i<e.length;i++){const n=e[i]-t[i];if(0!==n)return n}return 0}))}};function Wd({normaliseTo:e,mode:t}){const i=(t,i)=>{const n=t*e/i;return n>=0?Math.min(e,n):Math.max(-e,n)};return()=>()=>(e,n)=>{const o=[0,0];for(const i of n){const n=e[i],r=n<0?0:1;"sum"===t?o[r]+=n:o[r]=0===r?Math.min(o[r],n):Math.max(o[r],n)}const r=Math.max(Math.abs(o[0]),o[1]);for(const t of n)e[t]=i(e[t],r)}}function Ud(e,t,i,n="sum"){return{scopes:[e.id],type:"group-value-processor",matchGroupIds:t,adjust:Bd({normaliseTo:i,mode:n},Wd)}}function zd({normaliseTo:e,zeroDomain:t,rangeMin:i,rangeMax:n}){const o=e[1]-e[0],r=(i,n,r)=>
18{const s=e[0]+(i-n)/r*o;return 0===r?t:s>=e[1]?e[1]:s<e[0]?e[0]:s};return()=>(t,o)=>{let[s,a]=t.domain.values[o];null!=i&&(s=i),null!=n&&(a=n);const l=a-s;t.domain.values[o]=[e[0],e[1]];for(const e of t.data){let i=e.values;"ungrouped"===t.type&&(i=[i]);for(const e of i)e[o]=r(e[o],s,l)}}}function Kd(e,t,i,n,o,r){return{scopes:[e.id],type:"property-value-processor",property:t,adjust:Bd({normaliseTo:i,rangeMin:o,rangeMax:r,zeroDomain:n},zd)}}function Yd(e,t=[]){return{type:"processor",scopes:[e.id],property:"animationValidation",calculate(i){var n;const{keys:o,values:r}=i.defs,{input:s,data:a}=i;let l=!0,c=!0;const u=[];for(let p=0;p<r.length;p++)(null===(n=r[p].scopes)||void 0===n?void 0:n.some((t=>t===e.id)))&&t.some((e=>r[p].id===e))&&u.push([p,r[p]]);const d=(e,t,n)=>{var o;if("category"===t.valueType){const t=i.domain[n][e];return void(l&&(l=t.length===s.count))}let r=null===(o=a[0])||void 0===o?void 0:o[n][e];for(let i=1;(l||c)&&i<a.length;i++){const t=a[i][n][e];c&&(c=r<=t),l&&(l=r!==t),r=t}};for(let e=0;(l||c)&&e<o.length;e++)d(e,o[e],"keys");for(let e=0;(l||c)&&e<u.length;e++){const[t,i]=u[e];d(t,i,"values")}return{uniqueKeys:l,orderedKeys:c}}}}function qd({mode:e,separateNegative:t}){return()=>()=>(i,n)=>{const o=[0,0];for(const r of n){const n=i[r],s=cl(n)&&t?0:1;"number"!==typeof n||isNaN(n)||("normal"===e&&(o[s]+=n),i[r]=o[s],"trailing"===e&&(o[s]+=n))}}}function Xd({mode:e,sum:t}){return()=>{const i=[];let n=!0;return()=>(o,r)=>{let s=0;for(const a of r){const r=o[a],l=n&&"current"===t?0:i[a];i[a]=r;const c="current"===t?r:l;"number"!==typeof r||isNaN(r)?o[a]=s:"number"!==typeof l||isNaN(l)?o[a]=s:("normal"===e&&(s+=c),o[a]=s,"trailing"===e&&(s+=c))}n=!1}}}function $d(e,t,i,n,o=!1){let r;if(i.startsWith("window")){const e=i.endsWith("-trailing")?"trailing":"normal";r=Bd({mode:e,sum:n},Xd)}else r=Bd({mode:i,separateNegative:o},qd);return{scopes:[e.id],type:"group-value-processor",matchGroupIds:[t],adjust:r}}function Zd(e,t=!0){return{type:"processor",property:"diff",calculate:i=>{const n={changed:!1,moved:[],added:[],updated:[],removed:[],addedIndices:[],updatedIndices:[],removedIndices:[]},o=new Map,r=new Map,s=new Map,a=new Map,l=new Map,c=new Map,u=new Map;for(let d=0;d<Math.max(e.data.length,i.data.length);d++){const n=e.data[d],p=i.data[d],h=n?Jd(n.keys):"",f=p?Jd(p.keys):"";h!==f?(a.has(f)?(!t&&Da(a.get(f).values,p.values)||(s.set(f,p),c.set(f,d),o.set(f,p)),a.delete(f),u.delete(f)):p&&(r.set(f,p),l.set(f,d)),r.has(h)?(!t&&Da(r.get(h).values,n.values)||(s.set(h,n),c.set(h,d),o.set(h,n)),r.delete(h),l.delete(h)):n&&(s.delete(h),c.delete(h),a.set(h,n),u.set(h,d))):Da(n.values,p.values)||(s.set(f,p),c.set(f,d))}return n.added=Array.from(r.keys()),n.updated=Array.from(s.keys()),n.removed=Array.from(a.keys()),n.moved=Array.from(o.keys()),n.addedIndices=Array.from(l.values()),n.updatedIndices=Array.from(c.values()),n.removedIndices=Array.from(u.values()),n.changed=n.added.length>0||n.updated.length>0||n.removed.length>0,n}}}function Jd(e){return e.join("___")}class Qd{constructor(){this.enabled=!0,this.color="#464646",this.fontSize=12,this.fontFamily="Verdana, sans-serif"}getFont(){return qc(this)}}function ep(e){const{parallelFlipRotation:t=0,regularFlipRotation:i=0}=e,n=e.rotation?Qa(il(e.rotation)):0,o=!n&&t>=0&&t<=Math.PI?-1:1,r=!n&&i>=0&&i<=Math.PI?-1:1;let s=0;return e.parallel?s=o*Math.PI/2:-1===r&&(s=Math.PI),{configuredRotation:n,defaultRotation:s,parallelFlipFlag:o,regularFlipFlag:r}}function tp(e,t){return isNaN(e)?t?0:10:e}function ip(e,t,i,n){return e&&!t?i*n===-1?"hanging":"bottom":"middle"}function np(e,t,i,n,o){const r=t>0&&t<=Math.PI,s=i>0&&i<=Math.PI,a=r||s?-1:1;if(e){if(!t&&!i)return"center";if(n*a===-1)return"end"}else if(n*o===-1)return"end";return"start"}function op(e,t,i,n,o){const{width:r,height:s}=t,a=new Pc(i,n,0,0);o.transformBBox(a,t);const{x:l=0,y:c=0}=t;return t.width=r,t.height=s,{point:{x:l,y:c,size:0},label:{width:r,height:s,text:e}}}var rp;fa([fl(Dl),ga("design:type",Object)],Qd.prototype,"enabled",void 0),fa([fl(Fl),ga("design:type",Object)],Qd.prototype,"color",void 0),fa([fl(Jl),ga("design:type",String)],Qd.prototype,"fontStyle",void 0),fa([fl(ec),ga("design:type",String)],Qd.prototype,"fontWeight",void 0),fa([fl(Hl(0)),ga("design:type",Object)],Qd.prototype,"fontSize",void 0),fa([fl(Al),ga("design:type",Object)],Qd.prototype,"fontFamily",void 0),fa([fl(Tl),ga("design:type",Function)],Qd.prototype,"formatter",void 0),function(e){e[e["SERIES_BACKGROUND_ZINDEX"]=-10]="SERIES_BACKGROUND_ZINDEX",e[e["AXIS_GRID_ZINDEX"]=0]="AXIS_GRID_ZINDEX",e[e["AXIS_ZINDEX"]=20]="AXIS_ZINDEX",e[e["SERIES_CROSSLINE_RANGE_ZINDEX"]=30]="SERIES_CROSSLINE_RANGE_ZINDEX",e[e["SERIES_LAYER_ZINDEX"]=500]="SERIES_LAYER_ZINDEX",e[e["AXIS_FOREGROUND_ZINDEX"]=750]="AXIS_FOREGROUND_ZINDEX",e[e["SERIES_CROSSHAIR_ZINDEX"]=1e3]="SERIES_CROSSHAIR_ZINDEX",e[e["SERIES_LABEL_ZINDEX"]=1500]="SERIES_LABEL_ZINDEX",e[e["SERIES_CROSSLINE_LINE_ZINDEX"]=2500]="SERIES_CROSSLINE_LINE_ZINDEX",e[e["LEGEND_ZINDEX"]=3e3]="LEGEND_ZINDEX"}(rp||(rp={}));
18class sp extends Ed{constructor(){super(...arguments),this.x=0,this.y=0,this.size=12}computeBBox(){const{x:e,y:t,size:i}=this,n=i/2;return new Pc(e-n,t-n,i,i)}applyPath(e,t){const{path:i}=this;let{x:n,y:o}=this;i.clear();for(const{x:r,y:s,t:a}of t)n+=r*e,o+=s*e,"move"===a?i.moveTo(n,o):i.lineTo(n,o);i.closePath()}}fa([Sd(),ga("design:type",Number)],sp.prototype,"x",void 0),fa([Sd(),ga("design:type",Number)],sp.prototype,"y",void 0),fa([Sd({convertor:Math.abs}),ga("design:type",Number)],sp.prototype,"size",void 0);class ap extends sp{updatePath(){const{x:e,y:t,path:i,size:n}=this,o=n/2;i.clear(),i.arc(e,t,o,0,2*Math.PI),i.closePath()}}ap.className="Circle";const lp={BLUE:"#5090dc",ORANGE:"#ffa03a",GREEN:"#459d55",CYAN:"#34bfe1",YELLOW:"#e1cc00",VIOLET:"#9669cb",GRAY:"#b5b5b5",MAGENTA:"#bd5aa7",BROWN:"#8a6224",RED:"#ef5452"},cp={BLUE:"#2b5c95",ORANGE:"#cc6f10",GREEN:"#1e652e",CYAN:"#18859e",YELLOW:"#a69400",VIOLET:"#603c88",GRAY:"#575757",MAGENTA:"#7d2f6d",BROWN:"#4f3508",RED:"#a82529"};class up{constructor(e){this.modules={},this.parent=e}destroy(){for(const[e,t]of Object.entries(this.modules))t.instance.destroy(),delete this.modules[e],delete this.parent[e]}addModule(e){if(null!=this.modules[e.optionsKey])throw new Error("AG Charts - module already initialised: "+e.optionsKey);if(e.optionsKey in this.parent)throw new Error(`AG Charts - class already has option key '${e.optionsKey}'`);null==this.moduleContext&&(this.moduleContext=this.parent.createModuleContext());const t=new e.instanceConstructor(Object.assign({},this.moduleContext));this.modules[e.optionsKey]={instance:t},this.parent[e.optionsKey]=t}removeModule(e){var t,i;null===(i=null===(t=this.modules[e.optionsKey])||void 0===t?void 0:t.instance)||void 0===i||i.destroy(),delete this.modules[e.optionsKey],delete this.parent[e.optionsKey]}isModuleEnabled(e){return null!=this.modules[e.optionsKey]}*[Symbol.iterator](){for(const{instance:e}of Object.values(this.modules))yield e}}class dp{constructor(){this.registeredListeners=new Map}addListener(e,t,i){const n={symbol:Symbol(e),handler:t,meta:i};return this.registeredListeners.has(e)?this.registeredListeners.get(e).push(n):this.registeredListeners.set(e,[n]),()=>this.removeListener(n.symbol)}removeListener(e){for(const[t,i]of this.registeredListeners.entries()){const n=i.findIndex((t=>t.symbol===e));if(n>=0){i.splice(n,1),0===i.length&&this.registeredListeners.delete(t);break}}}dispatch(e,...t){class i{constructor(){this.results=void 0}push(e){var t;void 0!==e&&(null!==(t=this.results)&&void 0!==t||(this.results=[]),this.results.push(e))}}const n=new i;for(const r of this.getListenersByType(e))try{n.push(r.handler(...t))}catch(o){Pa.errorOnce(o)}return n.results}dispatchWrapHandlers(e,t,...i){for(const o of this.getListenersByType(e))try{t(o.handler,o.meta,...i)}catch(n){Pa.errorOnce(n)}}getListenersByType(e){var t;return null!==(t=this.registeredListeners.get(e))&&void 0!==t?t:[]}}class pp{constructor(){this.eventListeners=new Map}addEventListener(e,t){if("function"!==typeof t)throw new Error("AG Charts - listener must be a Function");const i=this.eventListeners.get(e);i?i.add(t):this.eventListeners.set(e,new Set([t]))}removeEventListener(e,t){var i;null===(i=this.eventListeners.get(e))||void 0===i||i.delete(t),0===this.eventListeners.size&&this.eventListeners.delete(e)}hasEventListener(e){return this.eventListeners.has(e)}clearEventListeners(){this.eventListeners.clear()}fireEvent(e){var t;null===(t=this.eventListeners.get(e.type))||void 0===t||t.forEach((t=>t(e)))}}function hp(e,t=[1/0,-1/0]){for(const i of e)"number"===typeof i&&(i<t[0]&&(t[0]=i),i>t[1]&&(t[1]=i));return t}function fp(e,t=[0,0]){for(const i of e)"number"===typeof i&&(i<0&&(t[0]+=i),i>0&&(t[1]+=i));return t}function gp(e,t,i){return{id:t,scopes:[e.id],type:"aggregate",matchGroupIds:i?[i]:void 0,aggregateFunction:e=>fp(e),groupAggregateFunction:(e,t=[0,0])=>{var i,n;return t[0]+=null!==(i=null===e||void 0===e?void 0:e[0])&&void 0!==i?i:0,t[1]+=null!==(n=null===e||void 0===e?void 0:e[1])&&void 0!==n?n:0,t}}}function vp(e,t){return{id:t,scopes:[e.id],type:"aggregate",aggregateFunction:()=>[0,1],groupAggregateFunction:(e,t=[0,0])=>{var i,n;return t[0]+=null!==(i=null===e||void 0===e?void 0:e[0])&&void 0!==i?i:0,t[1]+=null!==(n=null===e||void 0===e?void 0:e[1])&&void 0!==n?n:0,t}}}function yp(e,t,i){const n={id:t,scopes:[e.id],matchGroupIds:i?[
18i]:void 0,type:"aggregate",aggregateFunction:e=>fp(e),groupAggregateFunction:(e,t=[0,0,-1])=>{var i,n;return t[0]+=null!==(i=null===e||void 0===e?void 0:e[0])&&void 0!==i?i:0,t[1]+=null!==(n=null===e||void 0===e?void 0:e[1])&&void 0!==n?n:0,t[2]++,t},finalFunction:(e=[0,0,0])=>{const t=e[0]+e[1];return t>=0?[0,t/e[2]]:[t/e[2],0]}};return n}function mp(e,t,i,n){const o={id:t,scopes:[e.id],matchGroupIds:n?[n]:void 0,type:"aggregate",aggregateFunction:(e,t=[])=>{const n=t[1]-t[0];return i.aggregateFunction(e).map((e=>e/n))}};return i.groupAggregateFunction&&(o.groupAggregateFunction=i.groupAggregateFunction),o}function Cp(e){return()=>{let t=0;return i=>"number"!==typeof i||isNaN(i)?i:(t+=e?Math.max(0,i):i,t)}}var bp,wp;function Sp(e){return null!=Fd(e,!0)}function Ep(e){return null!=Fd(e,!1)}function xp(e,t,i,n={}){const o=Object.assign({scopes:[e.id],property:t,type:"key",valueType:i?"range":"category",validation:i?Sp:Ep},n);return o}function Op(e,t,i,n={}){const o=Object.assign({scopes:[e.id],property:t,type:"value",valueType:i?"range":"category",validation:i?Sp:Ep},n);return o}function Tp(e,t,i={}){const{min:n=-1/0,max:o=1/0}=i,r=ha(i,["min","max"]);return Object.assign({scopes:[e.id],type:"value",property:t,valueType:"range",validation:Sp,processor:()=>e=>"number"!==typeof e||isNaN(e)?e:Math.min(Math.max(e,n),o)},r)}function Dp(e,t,i,n={}){const{onlyPositive:o}=n,r=ha(n,["onlyPositive"]),s=Object.assign(Object.assign({},Op(e,t,i,r)),{processor:Cp(o)});return s}function Rp(e,t,i,n,o="current",r){return[Op(e,t,i,r),$d(e,r.groupId,n,o,r.separateNegative)]}(function(e){e[e["EXACT_SHAPE_MATCH"]=0]="EXACT_SHAPE_MATCH",e[e["NEAREST_BY_MAIN_AXIS_FIRST"]=1]="NEAREST_BY_MAIN_AXIS_FIRST",e[e["NEAREST_BY_MAIN_CATEGORY_AXIS_FIRST"]=2]="NEAREST_BY_MAIN_CATEGORY_AXIS_FIRST",e[e["NEAREST_NODE"]=3]="NEAREST_NODE"})(bp||(bp={}));class Ap{constructor(e,t,{datum:i},n){this.type=e,this.event=t,this.datum=i,this.seriesId=n.id}}class _p{constructor(){this.fill="yellow",this.fillOpacity=void 0,this.stroke=void 0,this.strokeWidth=void 0,this.strokeOpacity=void 0,this.lineDash=void 0,this.lineDashOffset=void 0}}fa([fl(Gl),ga("design:type",String)],_p.prototype,"fill",void 0),fa([fl(Wl(0,1)),ga("design:type",Number)],_p.prototype,"fillOpacity",void 0),fa([fl(Gl),ga("design:type",String)],_p.prototype,"stroke",void 0),fa([fl(Wl(0)),ga("design:type",Number)],_p.prototype,"strokeWidth",void 0),fa([fl(Wl(0,1)),ga("design:type",Number)],_p.prototype,"strokeOpacity",void 0),fa([fl(ic),ga("design:type",Array)],_p.prototype,"lineDash",void 0),fa([fl(Wl(0)),ga("design:type",Number)],_p.prototype,"lineDashOffset",void 0);class Pp{constructor(){this.strokeWidth=void 0,this.dimOpacity=void 0,this.enabled=void 0}}fa([fl(Wl(0)),ga("design:type",Number)],Pp.prototype,"strokeWidth",void 0),fa([fl(Wl(0,1)),ga("design:type",Number)],Pp.prototype,"dimOpacity",void 0),fa([fl(Rl),ga("design:type",Boolean)],Pp.prototype,"enabled",void 0);class Mp{constructor(){this.color="black"}}fa([fl(Gl),ga("design:type",String)],Mp.prototype,"color",void 0);class kp{constructor(){this.item=new _p,this.series=new Pp,this.text=new Mp}}(function(e){e[e["None"]=0]="None",e[e["This"]=1]="This",e[e["Other"]=2]="Other"})(wp||(wp={}));class Np extends pp{get type(){var e;return null!==(e=this.constructor.type)&&void 0!==e?e:""}set data(e){this._data=e,this.onDataChange()}get data(){var e;return null!==(e=this._data)&&void 0!==e?e:this._chartData}onDataChange(){this.nodeDataRefresh=!0}setChartData(e){this._chartData=e,this.data===e&&this.onDataChange()}hasData(){const{data:e}=this;return e&&(!Array.isArray(e)||e.length>0)}set visible(e){this._visible=e,this.visibleChanged()}get visible(){return this._visible}onSeriesGroupingChange(e,t){const{id:i,type:n,visible:o,rootGroup:r,highlightGroup:s,annotationGroup:a}=this;e&&this.ctx.seriesStateManager.deregisterSeries({id:i,type:n}),t&&this.ctx.seriesStateManager.registerSeries({id:i,type:n,visible:o,seriesGrouping:t}),null!=this.rootGroup.parent&&this.ctx.seriesLayerManager.changeGroup({id:i,type:n,rootGroup:r,highlightGroup:s,annotationGroup:a,getGroupZIndexSubOrder:e=>this.getGroupZIndexSubOrder(e),seriesGrouping:t,oldGrouping:e})}getBandScalePadding(){return{inner:1,outer:0}}constructor(e){super(),this.NodeClickEvent=Ap,this.id=Rc(this),this.rootGroup=new ad({name:"seriesRoot",isVirtual:!0}),this.axes={[mc.X]:void 0,[mc.Y]:void 0},this.directions=[mc.X,mc.Y],this.nodeDataRefresh=!0,this._visible=!0,this.showInLegend=!0,this.cursor="default",this.nodeClickRange="exact",this.seriesGrouping=void 0,this._declarationOrder=-1,this.seriesListeners=new dp,this.highlightStyle=new kp,this.moduleMap=new up(this),this.nodeDataDependencies={},this.ctx=e.moduleCtx;const{useLabelLayer:t=!1,pickModes:i=[bp.NEAREST_BY_MAIN_AXIS_FIRST],directionKeys:n={},directionNames:o={},contentGroupVirtual:r=!0,canHaveAxes:s=!1}=e;this.directionKeys=n,this.directionNames=o,this.canHaveAxes=s,this.contentGroup=this.rootGroup.appendChild(new ad({name:`${this.id}-content`,layer:!r,isVirtual:r,zIndex:rp.SERIES_LAYER_ZINDEX,zIndexSubOrder:this.getGroupZIndexSubOrder("data")})),this.highlightGroup=new ad({name:`${this.id}-highlight`,layer:!r,isVirtual:r,zIndex:rp.SERIES_LAYER_ZINDEX,zIndexSubOrder:this.getGroupZIndexSubOrder("highlight")}),this.highlightNode=this.highlightGroup.appendChild(new ad({name:"highlightNode",zIndex:0})),this.highlightLabel=this.highlightGroup.appendChild(new ad({name:"highlightLabel",zIndex:10})),this.pickModes=i,this.labelGroup=this.rootGroup.appendChild(new ad({name:`${this.id}-series-labels`,layer:t,zIndex:rp.SERIES_LABEL_ZINDEX}
18)),this.annotationGroup=new ad({name:`${this.id}-annotation`,layer:!r,isVirtual:r,zIndex:rp.SERIES_LAYER_ZINDEX,zIndexSubOrder:this.getGroupZIndexSubOrder("annotation")})}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;break}const n=()=>this._declarationOrder+i;return[n,t]}addListener(e,t){return this.seriesListeners.addListener(e,t)}dispatch(e,t){return this.seriesListeners.dispatch(e,t)}addChartEventListeners(){}destroy(){this.ctx.seriesStateManager.deregisterSeries(this),this.ctx.seriesLayerManager.releaseGroup(this)}getDirectionValues(e,t){const i=this.resolveKeyDirection(e),n=null===t||void 0===t?void 0:t[i],o=[];if(!n)return o;const r=(...e)=>{for(const t of e)Array.isArray(t)?r(...t):"object"===typeof t?r(...Object.values(t)):o.push(t)};return r(...n.map((e=>this[e]))),o}getKeys(e){return this.getDirectionValues(e,this.directionKeys)}getNames(e){return this.getDirectionValues(e,this.directionNames)}resolveKeyDirection(e){return e}getDomain(e){var t;const i=this.getSeriesDomain(e),n=null!==(t=this.dispatch("data-getDomain",{direction:e}))&&void 0!==t?t:[];return n.reduce(((e,t)=>e.concat(t)),i)}markNodeDataDirty(){this.nodeDataRefresh=!0}visibleChanged(){this.ctx.seriesStateManager.registerSeries(this)}getOpacity(){const e=1,{dimOpacity:t=1,enabled:i=!0}=this.highlightStyle.series;if(!i||t===e)return e;switch(this.isItemIdHighlighted()){case wp.None:case wp.This:return e;case wp.Other:default:return t}}getStrokeWidth(e){const{strokeWidth:t,enabled:i=!0}=this.highlightStyle.series;if(!i||void 0===t)return e;switch(this.isItemIdHighlighted()){case wp.This:return t;case wp.None:case wp.Other:return e}}isItemIdHighlighted(){var e,t;const{series:i}=null!==(t=null===(e=this.ctx.highlightManager)||void 0===e?void 0:e.getActiveHighlight())&&void 0!==t?t:{};return null==i?wp.None:i!==this?wp.Other:wp.This}getModuleTooltipParams(e){var t;const i=null!==(t=this.dispatch("tooltip-getParams",{datum:e}))&&void 0!==t?t:[];return i.reduce(((e,t)=>Object.assign(Object.assign({},t),e)),{})}pickNode(e,t){const{pickModes:i,visible:n,rootGroup:o}=this;if(n&&o.visible)for(const r of i){if(t&&!t.includes(r))continue;let i;switch(r){case bp.EXACT_SHAPE_MATCH:i=this.pickNodeExactShape(e);break;case bp.NEAREST_BY_MAIN_AXIS_FIRST:case bp.NEAREST_BY_MAIN_CATEGORY_AXIS_FIRST:i=this.pickNodeMainAxisFirst(e,r===bp.NEAREST_BY_MAIN_CATEGORY_AXIS_FIRST);break;case bp.NEAREST_NODE:i=this.pickNodeClosestDatum(e);break}if(i)return{pickMode:r,match:i.datum,distance:i.distance}}}pickNodeExactShape(e){const t=this.contentGroup.pickNode(e.x,e.y);return t&&{datum:t.datum,distance:0}}pickNodeClosestDatum(e){throw new Error("AG Charts - Series.pickNodeClosestDatum() not implemented")}pickNodeMainAxisFirst(e,t){throw new Error("AG Charts - Series.pickNodeMainAxisFirst() not implemented")}fireNodeClickEvent(e,t){this.fireEvent(new this.NodeClickEvent("nodeClick",e,t,this))}fireNodeDoubleClickEvent(e,t){this.fireEvent(new this.NodeClickEvent("nodeDoubleClick",e,t,this))}toggleSeriesItem(e,t){this.visible=t,this.nodeDataRefresh=!0,this.dispatch("visibility-changed",{itemId:e,enabled:t})}isEnabled(){return this.visible}getModuleMap(){return this.moduleMap}createModuleContext(){return Object.assign(Object.assign({},this.ctx),{series:this})}getLabelText(e,t,i=String){var n;return e.formatter&&null!==(n=this.ctx.callbackCache.call(e.formatter,Object.assign({seriesId:this.id},t)))&&void 0!==n?n:i(t.value)}getMarkerStyle(e,t,i=e.getStyle()){var n,o;const r={size:null!==(o=null===(n=t.datum.point)||void 0===n?void 0:n.size)&&void 0!==o?o:0},s=Ad(r,i);if(e.formatter){const i=this.ctx.callbackCache.call(e.formatter,Object.assign(Object.assign(Object.assign({seriesId:this.id},s),t),{datum:t.datum.datum}));return Ad(i,s)}return s}updateMarkerStyle(e,t,i,n=t.getStyle(),{applyTranslation:o=!0}={}){const{point:r}=i.datum,s=this.getMarkerStyle(t,i,n),a=this.visible&&s.size>0&&r&&!isNaN(r.x)&&!isNaN(r.y);o?e.setProperties(Object.assign(Object.assign({visible:a},s),{translationX:null===r||void 0===r?void 0:r.x,translationY:null===r||void 0===r?void 0:r.y})):e.setProperties(Object.assign({visible:a},s)),"function"!==typeof t.shape||e.dirtyPath||(e.path.clear({trackChanges:!0}),e.updatePath(),e.checkPathDirty())}getMinRect(){}checkResize(e){const t={seriesRectWidth:null===e||void 0===e?void 0:e.width,seriesRectHeight:null===e||void 0===e?void 0:e.he
18ight},i=null!=Ua(this.nodeDataDependencies,t);return i&&(this.nodeDataDependencies=t,this.markNodeDataDirty()),i}}function Lp({id:e},t,i,n){Du(e,t,i,n,{opacity:0},{opacity:1},bu)}function Ip({id:e},t,i,n){Du(e,t,i,n,{opacity:1},{opacity:0},bu)}function Fp(e){return{opacity:1}}Np.highlightedZIndex=1e12,fa([fl(Al),ga("design:type",Object)],Np.prototype,"id",void 0),fa([fl(Dl),ga("design:type",Object)],Np.prototype,"_visible",void 0),fa([fl(Dl),ga("design:type",Object)],Np.prototype,"showInLegend",void 0),fa([fl(Al),ga("design:type",Object)],Np.prototype,"cursor",void 0),fa([fl(uc),ga("design:type",Object)],Np.prototype,"nodeClickRange",void 0),fa([tu({changeValue:function(e,t){this.onSeriesGroupingChange(t,e)}}),ga("design:type",Object)],Np.prototype,"seriesGrouping",void 0);const Gp={periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]};function Vp(e,t=new Date(e.getFullYear(),0,1)){const i=e.getTimezoneOffset()-t.getTimezoneOffset(),n=e.getTime()-t.getTime()+6e4*i,o=864e5;return Math.floor(n/o)}function Bp(e,t){const i=new Date(e.getFullYear(),0,1),n=i.getDay(),o=(t-n+7)%7,r=new Date(e.getFullYear(),0,o+1);return r<=e?Math.floor(Vp(e,r)/7)+1:0}const jp=0,Hp=1,Wp=4;function Up(e,t=e.getFullYear()){const i=new Date(t,0,1),n=i.getDay(),o=(Wp-n+7)%7,r=new Date(t,0,o-(Wp-Hp)+1);return r<=e?Math.floor(Vp(e,r)/7)+1:Up(e,t-1)}function zp(e){const t=e.getTimezoneOffset(),i=Math.abs(t),n=t>0?"-":"+";return`${n}${qp(Math.floor(i/60),2,"0")}${qp(Math.floor(i%60),2,"0")}`}const Kp={a:e=>Gp.shortDays[e.getDay()],A:e=>Gp.days[e.getDay()],b:e=>Gp.shortMonths[e.getMonth()],B:e=>Gp.months[e.getMonth()],c:"%x, %X",d:(e,t)=>qp(e.getDate(),2,null!==t&&void 0!==t?t:"0"),e:"%_d",f:(e,t)=>qp(1e3*e.getMilliseconds(),6,null!==t&&void 0!==t?t:"0"),H:(e,t)=>qp(e.getHours(),2,null!==t&&void 0!==t?t:"0"),I:(e,t)=>{const i=e.getHours()%12;return 0===i?"12":qp(i,2,null!==t&&void 0!==t?t:"0")},j:(e,t)=>qp(Vp(e)+1,3,null!==t&&void 0!==t?t:"0"),m:(e,t)=>
18qp(e.getMonth()+1,2,null!==t&&void 0!==t?t:"0"),M:(e,t)=>qp(e.getMinutes(),2,null!==t&&void 0!==t?t:"0"),L:(e,t)=>qp(e.getMilliseconds(),3,null!==t&&void 0!==t?t:"0"),p:e=>e.getHours()<12?"AM":"PM",Q:e=>String(e.getTime()),s:e=>String(Math.floor(e.getTime()/1e3)),S:(e,t)=>qp(e.getSeconds(),2,null!==t&&void 0!==t?t:"0"),u:e=>{let t=e.getDay();return t<1&&(t+=7),String(t%7)},U:(e,t)=>qp(Bp(e,jp),2,null!==t&&void 0!==t?t:"0"),V:(e,t)=>qp(Up(e),2,null!==t&&void 0!==t?t:"0"),w:(e,t)=>qp(e.getDay(),2,null!==t&&void 0!==t?t:"0"),W:(e,t)=>qp(Bp(e,Hp),2,null!==t&&void 0!==t?t:"0"),x:"%-m/%-d/%Y",X:"%-I:%M:%S %p",y:(e,t)=>qp(e.getFullYear()%100,2,null!==t&&void 0!==t?t:"0"),Y:(e,t)=>qp(e.getFullYear(),4,null!==t&&void 0!==t?t:"0"),Z:e=>zp(e),"%":()=>"%"},Yp={_:" ",0:"0","-":""};function qp(e,t,i){const n=String(Math.floor(e));return n.length>=t?n:`${i.repeat(t-n.length)}${n}`}function Xp(e){const t=[];while(e.length>0){let i=e.indexOf("%");if(0!==i){const n=i>0?e.substring(0,i):e;t.push(n)}if(i<0)break;const n=e[i+1],o=Yp[n];null!=o&&i++;const r=e[i+1],s=Kp[r];if("function"===typeof s)t.push([s,o]);else if("string"===typeof s){const e=Xp(s);t.push([e,o])}else t.push(`${null!==o&&void 0!==o?o:""}${r}`);e=e.substring(i+2)}return e=>{const i="number"===typeof e?new Date(e):e;return t.map((e=>"string"===typeof e?e:e[0](i,e[1]))).join("")}}const $p=/(#\{(.*?)\})/g;function Zp(e,t,i){return e.replace($p,(function(...e){const n=e[2],[o,r]=n.split(":"),s=t[o];if("number"===typeof s){const e=r&&i&&i[r];if(e){const{locales:t,options:i}=e;return s.toLocaleString(t,i)}return String(s)}if(s instanceof Date){const e=r&&i&&i[r];if("string"===typeof e){const t=Xp(e);return t(s)}return s.toDateString()}return"string"===typeof s||(null===s||void 0===s?void 0:s.toString)?String(s):""}))}function Jp(e,t){const i=e.createElement("style");i.innerHTML=t,e.head.insertBefore(i,e.head.querySelector("style"))}const Qp="ag-chart-tooltip",eh="ag-chart-dark-tooltip",th=`\n.${Qp} {\n    transition: transform 0.1s ease;\n    display: table;\n    position: fixed;\n    left: 0px;\n    top: 0px;\n    white-space: nowrap;\n    z-index: 99999;\n    font: 12px Verdana, sans-serif;\n    color: rgb(70, 70, 70);\n    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);\n}\n\n.${Qp}-no-interaction {\n    pointer-events: none;\n    user-select: none;\n}\n\n.${Qp}-no-animation {\n    transition: none !important;\n}\n\n.${Qp}-hidden {\n    visibility: hidden;\n}\n\n.${Qp}-title {\n    position: relative;\n    padding: 8px 14px;\n    border-top-left-radius: 2px;\n    border-top-right-radius: 2px;\n    color: white;\n    background-color: #888888;\n    z-index: 1;\n}\n\n.${Qp}-title:only-child {\n    border-bottom-left-radius: 2px;\n    border-bottom-right-radius: 2px;\n}\n\n.${Qp}-content {\n    padding: 6px 14px;\n    line-height: 1.7em;\n    background: white;\n    border-bottom-left-radius: 2px;\n    border-bottom-right-radius: 2px;\n    border: 1px solid rgba(0, 0, 0, 0.15);\n    overflow: hidden;\n}\n\n.${Qp}-arrow::before {\n    content: "";\n\n    position: absolute;\n    top: 100%;\n    left: 50%;\n    transform: translateX(-50%);\n\n    border: 5px solid #d9d9d9;\n\n    border-left-color: transparent;\n    border-right-color: transparent;\n    border-bottom-color: transparent;\n\n    width: 0;\n    height: 0;\n\n    margin: 0 auto;\n}\n\n.${Qp}-arrow::after {\n    content: "";\n\n    position: absolute;\n    top: calc(100% - 1px);\n    left: 50%;\n    transform: translateX(-50%);\n\n    border: 5px solid white;\n\n    border-left-color: transparent;\n    border-right-color: transparent;\n    border-bottom-color: transparent;\n\n    width: 0;\n    height: 0;\n\n    margin: 0 auto;\n}\n\n.${Qp}.${eh} {\n    color: white;\n    background: #15181c;\n}\n\n.${Qp}.${eh} .${Qp}-content {\n    border-color: rgba(255, 255, 255, 0.15);\n}\n\n.ag-chart-wrapper {\n    box-sizing: border-box;\n    overflow: hidden;\n}\n`;function ih(e,t){var i,n,o;if("string"===typeof e)return e;const{content:r=(null!==(i=null===t||void 0===t?void 0:t.content)&&void 0!==i?i:""),title:s=(null===t||void 0===t?void 0:t.t
18itle),color:a=(null!==(n=null===t||void 0===t?void 0:t.color)&&void 0!==n?n:"white"),backgroundColor:l=(null!==(o=null===t||void 0===t?void 0:t.backgroundColor)&&void 0!==o?o:"#888")}=e,c=s?`<div class="${Qp}-title"\n        style="color: ${a}; background-color: ${l}">${s}</div>`:"",u=r?`<div class="${Qp}-content">${r}</div>`:"";return`${c}${u}`}const nh=["pointer","node"],oh=vl((e=>nh.includes(e)),"expecting a position type keyword such as 'pointer' or 'node'");class rh{constructor(){this.type="pointer",this.xOffset=0,this.yOffset=0}}fa([fl(oh),ga("design:type",String)],rh.prototype,"type",void 0),fa([fl(Hl()),ga("design:type",Number)],rh.prototype,"xOffset",void 0),fa([fl(Hl()),ga("design:type",Number)],rh.prototype,"yOffset",void 0);class sh{constructor(e,t,i,n){this.enableInteraction=!1,this.enabled=!0,this.showArrow=void 0,this.class=void 0,this.lastClass=void 0,this.delay=0,this.range="nearest",this.lastVisibilityChange=Date.now(),this.position=new rh,this.showTimeout=0,this._showArrow=!0,this.tooltipRoot=n,this.window=i;const o=t.createElement("div");if(this.element=this.tooltipRoot.appendChild(o),this.element.classList.add(Qp),this.canvasElement=e,"undefined"!==typeof IntersectionObserver){const e=new IntersectionObserver((e=>{for(const t of e)t.target===this.canvasElement&&0===t.intersectionRatio&&this.toggle(!1)}),{root:this.tooltipRoot});e.observe(this.canvasElement),this.observer=e}sh.tooltipDocuments.indexOf(t)<0&&(Jp(t,th),sh.tooltipDocuments.push(t))}destroy(){const{parentNode:e}=this.element;e&&e.removeChild(this.element),this.observer&&this.observer.unobserve(this.canvasElement)}isVisible(){const{element:e}=this;return!e.classList.contains(Qp+"-hidden")}updateClass(e,t){const{element:i,class:n,lastClass:o,enableInteraction:r,lastVisibilityChange:s}=this,a=this.isVisible(),l=!!e;let c=1/0;if(a!==l){const e=Date.now();c=e-s,this.lastVisibilityChange=e}const u=(e,t)=>{const n=`${Qp}-${e}`;t?i.classList.add(n):i.classList.remove(n)},d=100,p=5,h=!a&&l&&c>d;c>p&&u("no-animation",h),u("no-interaction",!r),u("hidden",!e),u("arrow",!!t),n!==o&&(o&&i.classList.remove(o),n&&i.classList.add(n),this.lastClass=n)}show(e,t,i=!1){var n,o,r,s,a,l,c;const{element:u,canvasElement:d}=this;if(void 0!==t)u.innerHTML=t;else if(!u.innerHTML)return void this.toggle(!1);const p=(e,t,i)=>Math.max(Math.min(t,i),e),h=null!==(o=null===(n=e.position)||void 0===n?void 0:n.xOffset)&&void 0!==o?o:0,f=null!==(s=null===(r=e.position)||void 0===r?void 0:r.yOffset)&&void 0!==s?s:0,g=d.getBoundingClientRect(),v=g.left+e.offsetX-u.clientWidth/2+h,y=g.top+e.offsetY-u.clientHeight-8+f,m=this.getWindowBoundingBox(),C=m.x+m.width-u.clientWidth-1,b=m.y+m.height-u.clientHeight,w=p(m.x,v,C),S=p(m.y,y,b),E=w!==v||S!==y,x=!E&&!h&&!f,O=null!==(l=null!==(a=e.showArrow)&&void 0!==a?a:this.showArrow)&&void 0!==l?l:x;if(this.updateShowArrow(O),u.style.transform=`translate(${Math.round(w)}px, ${Math.round(S)}px)`,this.enableInteraction=null!==(c=e.enableInteraction)&&void 0!==c&&c,this.delay>0&&!i)return this.toggle(!1),void(this.showTimeout=this.window.setTimeout((()=>{this.toggle(!0)}),this.delay));this.toggle(!0)}getWindowBoundingBox(){return new Pc(0,0,this.window.innerWidth,this.window.innerHeight)}toggle(e){e||this.window.clearTimeout(this.showTimeout),this.updateClass(e,this._showArrow)}pointerLeftOntoTooltip(e){var t;if(!this.enableInteraction)return!1;const i=null===(t=e.sourceEvent.relatedTarget)||void 0===t?void 0:t.classList,n=["","-title","-content"],o=Boolean(n.filter((e=>null===i||void 0===i?void 0:i.contains(`${Qp}${e}`))));return void 0!==i&&o}updateShowArrow(e){this._showArrow=e}}sh.tooltipDocuments=[],fa([fl(Dl),ga("design:type",Boolean)],sh.prototype,"enabled",void 0),fa([fl(Rl),ga("design:type",Boolean)],sh.prototype,"showArrow",void 0),fa([fl(_l),ga("design:type",String)],sh.prototype,"class",void 0),fa([fl(Hl(0)),ga("design:type",Number)],sh.prototype,"delay",void 0),fa([fl(uc),ga("design:type",Object)],sh.prototype,"range",void 0);class ah{constructor(){this.enabled=!1}}fa([fl(Dl),ga("design:type",Object)],ah.prototype,"enabled",void 0);class lh{constructor(){this.enabled=!0,this.showArrow=void 0,this.format=void 0,this.renderer=void 0,this.interaction=new ah,this.position=new rh}toTooltipHtml(e,t,i){var n,o;const r=null!==(n=null===i||void 0===i?void 0:i.format)&&void 0!==n?n:this.format,s=null!==(o=null===i||void 0===i?void 0:i.renderer)&&void 0!==o?o:this.renderer;return r?ih({content:Zp(r,t)},e):s?ih(s(t),e):ih(e)}}function ch(e,t,i,n){const o=[i.convert(0),i.convert(1)],r=[n.convert(0),n.convert(1)],s=Math.PI/-2+il(t),a=({radiu
18s:e})=>({innerRadius:o[0],outerRadius:o[0]+(o[1]-o[0])*e}),l=({radius:e})=>({innerRadius:r[0],outerRadius:r[0]+(r[1]-r[0])*e}),c=(t,i,n,{prevFromProps:o})=>{var r,a,c,u,d,p;let{startAngle:h,endAngle:f,innerRadius:g,outerRadius:v}=t,{fill:y,stroke:m}=i.sectorFormat;if("unknown"===n||"added"===n&&!o?(h=s,f=s,g=i.innerRadius,v=i.outerRadius):"added"===n&&o&&(h=null!==(r=o.endAngle)&&void 0!==r?r:s,f=null!==(a=o.endAngle)&&void 0!==a?a:s,g=null!==(c=o.innerRadius)&&void 0!==c?c:i.innerRadius,v=null!==(u=o.outerRadius)&&void 0!==u?u:i.outerRadius),"added"===n&&!e){const e=l(i);g=e.innerRadius,v=e.outerRadius}return"updated"===n&&(y=null!==(d=t.fill)&&void 0!==d?d:y,m=null!==(p=t.stroke)&&void 0!==p?p:m),{startAngle:h,endAngle:f,innerRadius:g,outerRadius:v,fill:y,stroke:m}},u=(e,t,i,{prevLive:n})=>{var o,r;let{startAngle:l,endAngle:c,innerRadius:u,outerRadius:d}=t;const{stroke:p,fill:h}=t.sectorFormat;if("removed"===i&&n?(l=null===(o=n.datum)||void 0===o?void 0:o.endAngle,c=null===(r=n.datum)||void 0===r?void 0:r.endAngle):"removed"!==i||n||(l=s,c=s),"removed"===i){const e=a(t);u=e.innerRadius,d=e.outerRadius}return{startAngle:l,endAngle:c,outerRadius:d,innerRadius:u,stroke:p,fill:h}},d={fromFn:(e,t)=>{var i,n,o;return{size:null!==(o=null!==(n=null===(i=e.previousDatum)||void 0===i?void 0:i.radius)&&void 0!==n?n:e.size)&&void 0!==o?o:0}},toFn:(e,t)=>{var i;return{size:null!==(i=t.radius)&&void 0!==i?i:0}}};return{nodes:{toFn:u,fromFn:c},innerCircle:d}}function uh(e,t){return{startAngle:t.startAngle,endAngle:t.endAngle,innerRadius:t.innerRadius,outerRadius:t.outerRadius,fill:t.sectorFormat.fill,stroke:t.sectorFormat.stroke}}function dh(e,t){const i=Su(e),n=i?e:[],o=i?[]:e;for(const r of o){for(const e of r.nodes()){const i=t(e,e.datum);e.setProperties(i)}r.cleanup()}for(const r of n){const e=t(r,r.datum);r.setProperties(e)}}fa([fl(Dl),ga("design:type",Object)],lh.prototype,"enabled",void 0),fa([fl(Rl),ga("design:type",Boolean)],lh.prototype,"showArrow",void 0),fa([fl(_l),ga("design:type",String)],lh.prototype,"format",void 0),fa([fl(Tl),ga("design:type",Function)],lh.prototype,"renderer",void 0);var ph,hh=Object.freeze({__proto__:null,resetMotion:dh});class fh{constructor(e,t,i){this.states=t,this.preTransitionCb=i,this.debug=Ia.create(!0,"animation"),this.state=e,this.debug(`%c${this.constructor.name} | init -> ${e}`,"color: green")}transition(e,t){var i,n;const o=this.states[this.state],r=null===o||void 0===o?void 0:o[e];if(!r)return void this.debug(`%c${this.constructor.name} | ${this.state} -> ${e} -> ${this.state}`,"color: grey");let s=this.state;return"string"===typeof r?s=r:"object"===typeof r&&(s=r.target),this.debug(`%c${this.constructor.name} | ${this.state} -> ${e} -> ${s}`,"color: green"),null===(i=this.preTransitionCb)||void 0===i||i.call(this,this.state,s),this.state=s,"function"===typeof r?r(t):"object"===typeof r&&(null===(n=r.action)||void 0===n||n.call(r,t)),this.state}}class gh extends Np{isContinuous(){var e,t;const i=nd.is(null===(e=this.axes[mc.X])||void 0===e?void 0:e.scale),n=nd.is(null===(t=this.axes[mc.Y])||void 0===t?void 0:t.scale);return{isContinuousX:i,isContinuousY:n}}requestDataModel(e,t,i){var n;return va(this,void 0,void 0,(function*(){const o=i.props,r=null!==(n=this.dispatch("data-prerequest",this.isContinuous()))&&void 0!==n?n:[];for(const e of r)o.push(...e);const{dataModel:s,processedData:a}=yield e.request(this.id,null!==t&&void 0!==t?t:[],Object.assign(Object.assign({},i),{props:o}));return this.dataModel=s,this.processedData=a,this.dispatch("data-processed",{dataModel:s,processedData:a}),{dataModel:s,processedData:a}}))}isProcessedDataAnimatable(){var e,t;const i=null===(t=null===(e=this.processedData)||void 0===e?void 0:e.reduced)||void 0===t?void 0:t.animationValidation;if(!i)return!0;const{orderedKeys:n,uniqueKeys:o}=i;return!!n&&!!o}checkProcessedDataAnimatable(){this.isProcessedDataAnimatable()||this.ctx.animationManager.skipCurrentBatch()}}class vh extends gh{constructor(e){var{useLabelLayer:t=!1,pickModes:i=[bp.EXACT_SHAPE_MATCH],canHaveAxes:n=!1,animationResetFns:o}=e,r=ha(e,["useLabelLayer","pickModes","canHaveAxes","animationResetFns"]);super(Object.assign(Object.assign({},r),{useLabelLayer:t,pickModes:i,contentGroupVirtual:!1,directionKeys:{[mc.X]:["angleKey"],[mc.Y]:["radiusKey"]},directionNames:{[mc.X]:["angleName"],[mc.Y]:["radiusName"]},canHaveAxes:n})),this.sectorGroup=this.contentGroup.appendChild(new ad),this.itemSelection=ld.select(this.sectorGroup,(()=>this.nodeFactory()),!1),this.labelSelection=ld.select(this.labelGroup,Kc,!1),this.highlightSelection=ld.select(this.highlightGroup,(()=>this.nodeFactory())),this.centerX=0,this.centerY=0,this.radius=0,this.sectorGroup.zIndexSubOrder=[()=>this._declarationOrder,1],this.animationResetFns=o,this.animationState=new fh("empty",{empty:{update:{target:"ready",action:e=>this.animateEmptyUpdateReady(e)}},ready:{updateData:"waiting",clear:"clearing",highlight:e=>this.animateReadyHighlight(e),highlightMarkers:e=>this.animateReadyHighlightMarkers(e),resize:e=>this.animateReadyResize(e)},waiting:{update:{target:"ready",action:e=>this.animateWaitingUpdateReady(e)}},clearing:{update:{target:"empty",action:e=>this.animateClearingUpdateEmpty(e)}}},(()=>this.checkProcessedDataAnimatable()))}getLabelData(){return[]}computeLabelsBBox(e,t){return null}resetAllAnimation(){var e;const{item:t,label:i}=null!==(e=this.animationResetFns)&&void 0!==e?e:{};this.ctx.animationManager.stopByAnimationGroupId(this.id),t&&dh([this.itemSelection,this.highlightSelection],t),i&&dh([this.labelSelection],i),this.itemSelection.cleanup(),this.labelSelection.cleanup(),this.highlightSelection.cleanup()}animateEmptyUpdateReady(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation()}animateWaitingUpdateReady(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation()}animateReadyHighlight(e){var t;const{item:i}=null!==(t=this.animationResetFns)&&void 0!==t?t:{};i&&dh([this.highlightSelection],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}}}class yh extends Ap{constructor(e,t,i,n){super(e,t,i,n),this.angleKey=n.angleKey,this.radiusKey=n.radiusKey,this.calloutLabelKey=n.calloutLabelKey,this.sectorLabelKey=n.sectorLabelKey}}(function(e){e[e["Sector"]=0]="Sector",e[e["Callout"]=1]="Callout",e[e["Label"]=2]="Label"})(ph||(ph={}));class mh extends Qd{constructor(){super(...arguments),this.offset=3,this.minAngle=0,this.minSpacing=4,this.maxCollisionOffset=50,this.avoidCollisions=!0}}fa([fl(Hl(0)),ga("design:type",Object)],mh.prototype,"offset",void 0),fa([fl(Hl(0)),ga("design:type",Object)],mh.prototype,"minAngle",void 0),fa([fl(Hl(0)),ga("design:type",Object)],mh.prototype,"minSpacing",void 0),fa([fl(Hl(0)),ga("design:type",Object)],mh.prototype,"maxCollisionOffset",void 0),fa([fl(Dl),ga("design:type",Object)],mh.prototype,"avoidCollisions",void 0);class Ch extends Qd{constructor(){super(...arguments),this.positionOffset=0,this.positionRatio=.5}}fa([fl(Hl()),ga("design:type",Object)],Ch.prototype,"positionOffset",void 0),fa([fl(Hl(0,1)),ga("design:type",Object)],Ch.prototype,"positionRatio",void 0);class bh{constructor(){this.length=10,this.strokeWidth=1}}fa([fl(Bl),ga("design:type",Array)],bh.prototype,"colors",void 0),fa([fl(Hl(0)),ga("design:type",Number)],bh.prototype,"length",void 0),fa([fl(Hl(0)),ga("design:type",Number)],bh.prototype,"strokeWidth",void 0);class wh extends iu{constructor(){super(...arguments),this.showInLegend=!1}}fa([fl(Dl),ga("design:type",Object)],wh.prototype,"showInLegend",void 0);class Sh extends Qd{constructor(){super(...arguments),this.text="",this.margin=2}}fa([fl(Al),ga("design:type",Object)],Sh.prototype,"text",void 0),fa([fl(Hl()),ga("design:type",Object)],Sh.prototype,"margin",void 0);class Eh{constructor(){this.fill="transparent",this.fillOpacity=1}}fa([fl(Fl),ga("design:type",Object)],Eh.prototype,"fill",void 0),fa([fl(Wl(0,1)),ga("design:type",Object)],Eh.prototype,"fillOpacity",void 0);class xh extends vh{constructor(e){super({moduleCtx:e,useLabelLayer:!0,animationResetFns:{item:uh,label:Fp}}),this.previousRadiusScale=new od,this.radiusScale=new od,this.backgroundGroup=this.rootGroup.appendChild(new ad({name:`${this.id}-background`,layer:!0,zIndex:rp.SERIES_BACKGROUND_ZINDEX}
18)),this.innertCircleGroup=this.backgroundGroup.appendChild(new ad({name:`${this.id}-innerCircle`})),this.nodeData=[],this.seriesItemEnabled=[],this.title=void 0,this.calloutLabel=new mh,this.sectorLabel=new Ch,this.calloutLine=new bh,this.tooltip=new lh,this.angleKey="",this.angleName="",this.innerLabels=[],this.innerCircle=void 0,this.radiusKey=void 0,this.radiusName=void 0,this.radiusMin=void 0,this.radiusMax=void 0,this.calloutLabelKey=void 0,this.calloutLabelName=void 0,this.sectorLabelKey=void 0,this.sectorLabelName=void 0,this.legendItemKey=void 0,this.fills=Object.values(lp),this.strokes=Object.values(cp),this.fillOpacity=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.formatter=void 0,this.rotation=0,this.outerRadiusOffset=0,this.outerRadiusRatio=1,this.innerRadiusOffset=0,this.innerRadiusRatio=1,this.strokeWidth=1,this.shadow=void 0,this.highlightStyle=new kp,this.surroundingRadius=void 0,this.NodeClickEvent=yh,this.angleScale=new od,this.angleScale.domain=[0,1],this.angleScale.range=[-Math.PI,Math.PI].map((e=>e+Math.PI/2));const t=new ad({name:"pieCalloutLabels"}),i=new ad({name:"pieSectorLabels"}),n=new ad({name:"innerLabels"});this.labelGroup.append(t),this.labelGroup.append(i),this.labelGroup.append(n),this.calloutLabelSelection=ld.select(t,ad),this.sectorLabelSelection=ld.select(i,Kc),this.innerLabelsSelection=ld.select(n,Kc),this.innerCircleSelection=ld.select(this.innertCircleGroup,ap)}addChartEventListeners(){var e;null===(e=this.ctx.chartEventManager)||void 0===e||e.addListener("legend-item-click",(e=>this.onLegendItemClick(e)))}visibleChanged(){this.processSeriesItemEnabled()}processSeriesItemEnabled(){var e;const{data:t,visible:i}=this;this.seriesItemEnabled=null!==(e=null===t||void 0===t?void 0:t.map((()=>i)))&&void 0!==e?e:[]}nodeFactory(){return new xd}getSeriesDomain(e){return e===mc.X?this.angleScale.domain:this.radiusScale.domain}processData(e){var t,i;return va(this,void 0,void 0,(function*(){let{data:n}=this;const{angleKey:o,radiusKey:r,calloutLabelKey:s,sectorLabelKey:a,legendItemKey:l,seriesItemEnabled:c}=this;if(null==o||null==n)return;const u=!this.ctx.animationManager.isSkipped(),d=[],p=[];l?d.push(xp(this,l,!1,{id:"legendItemKey"})):s?d.push(xp(this,s,!1,{id:"calloutLabelKey"})):a&&d.push(xp(this,a,!1,{id:"sectorLabelKey"})),r&&p.push(Tp(this,r,{id:"radiusValue",min:null!==(t=this.radiusMin)&&void 0!==t?t:0,max:this.radiusMax}),Op(this,r,!0,{id:"radiusRaw"}),Kd(this,{id:"radiusValue"},[0,1],1,null!==(i=this.radiusMin)&&void 0!==i?i:0,this.radiusMax)),s&&p.push(Op(this,s,!1,{id:"calloutLabelValue"})),a&&p.push(Op(this,a,!1,{id:"sectorLabelValue"})),l&&p.push(Op(this,l,!1,{id:"legendItemValue"})),u&&this.processedData&&d.length>0&&p.push(Zd(this.processedData)),p.push(Yd(this)),n=n.map(((e,t)=>c[t]?e:Object.assign(Object.assign({},e),{[o]:0}))),yield this.requestDataModel(e,n,{props:[...d,Dp(this,o,!0,{id:"angleValue",onlyPositive:!0}),Op(this,o,!0,{id:"angleRaw"}),Kd(this,{id:"angleValue"},[0,1],0,0),...p]}),this.animationState.transition("updateData")}))}maybeRefreshNodeData(){return va(this,void 0,void 0,(function*(){if(!this.nodeDataRefresh)return;const[{nodeData:e=[]}={}]=yield this.createNodeData();this.nodeData=e,this.nodeDataRefresh=!1}))}getProcessedDataIndexes(e){const t=e.resolveProcessedDataIndexById(this,"angleValue").index,i=this.radiusKey?e.resolveProcessedDataIndexById(this,"radiusValue").index:-1,n=this.calloutLabelKey?e.resolveProcessedDataIndexById(this,"calloutLabelValue").index:-1,o=this.sectorLabelKey?e.resolveProcessedDataIndexById(this,"sectorLabelValue").index:-1,r=this.legendItemKey?e.resolveProcessedDataIndexById(this,"legendItemValue").index:-1;return{angleIdx:t,radiusIdx:i,calloutLabelIdx:n,sectorLabelIdx:o,legendItemIdx:r}}createNodeData(){return va(this,void 0,void 0,(function*(){const{id:e,processedData:t,dataModel:i,rotation:n,angleScale:o}=this;if(!t||!i||"ungrouped"!==t.type)return[];const{angleIdx:r,radiusIdx:s,calloutLabelIdx:a,sectorLabelIdx:l,legendItemIdx:c}=this.getProcessedDataIndexes(i);let u=0;const d=t.data.map(((e,t)=>{var i;const{datum:d,values:p}=e,h=p[r],f=o.convert(u)+il(n);u=h;const g=o.convert(u)+il(n),v=Math.abs(g-f),y=f+v/2,m=p[r+1],C=s>=0&&null!==(i=p[s])&&void 0!==i?i:1,b=s>=0?p[s+1]:void 0,w=c>=0?p[c]:void 0,S=this.getLabels(d,y,v,!0,p[a],p[l],w),E=this.getSectorFormat(d,t,!1);return Object.assign({itemId:t,series:this,datum:d,index:t,angleValue:m,midAngle:y,midCos:Math.cos(y),midSin:Math.sin(y),startAngle:f,endAngle:g,sectorFormat:E,radiusValue:b,radius:C,innerRadius:Math.max(this.radiusScale.convert(0),0),outerRadius:Math.max(this.radiusScale.convert(C),0),legendItemValue:w},S)}));return[{itemId:e,nodeData:d,labelData:d}]}))}getLabels(e,t,i,n,o,r,s){const{calloutLabel:a,sectorLabel:l,legendItemKey:c}=this,u=!n||a.enabled?this.calloutLabelKey:void 0,d=!n||l.enabled?this.sectorLabelKey:void 0;if(!u&&!d&&!c)return{};const p={datum:e,angleKey:this.angleKey,angleName:this.angleName,radiusKey:this.radiusKey,radiusName:this.radiusName,calloutLabelKey:this.calloutLabelKey,calloutLabelName:this.calloutLabelName,sectorLabelKey:this.sectorLabelKey,sectorLabelName:this.sectorLabelName,legendItemKey:this.legendItemKey},h={};return u&&i>il(a.minAngle)&&(h.calloutLabel=Object.assign(Object.assign({},this.getTextAlignment(t)),{text:this.getLabelText(a,Object.assign(Object.assign({},p),{value:o})),hidden:!1,collisionTextAlign:void 0,collisionOffsetY:0,box:void 0})),d&&(h.sectorLabel={text:this.getLabelText(l,Object.assign(Object.assign({},p),{value:r}))}),null!=c&&null!=s&&(h.legendItem={key:c,text:s}),h}getTextAlignment(e){const t=[{textAlign:"center",textBaseline:"bottom"},{textAlign:"left",textBaseline:"middle"},{textAlign:"center",textBaseline:"hanging"},{textAlign:"right",textBaseline:"middle"}],i=tl(e),n=-3*Math.PI/4,o=i-n,r=Math.floor(o/(Math.PI/2)),s=pl(r,t.length);return t[s]}getSectorFormat(e,t,i){var n,o,r,s,a;
18const{angleKey:l,radiusKey:c,fills:u,strokes:d,formatter:p,id:h,ctx:{callbackCache:f,highlightManager:g}}=this,v=g.getActiveHighlight(),y=i&&(null===v||void 0===v?void 0:v.series)===this&&t===v.itemId,{fill:m,fillOpacity:C,stroke:b,strokeWidth:w,strokeOpacity:S}=Ad(y&&this.highlightStyle.item,{fill:u[t%u.length],fillOpacity:this.fillOpacity,stroke:d[t%d.length],strokeWidth:this.getStrokeWidth(this.strokeWidth),strokeOpacity:this.getOpacity()});let E;return p&&(E=f.call(p,{datum:e,angleKey:l,radiusKey:c,fill:m,stroke:b,fills:u,strokes:d,strokeWidth:w,highlighted:y,seriesId:h})),{fill:null!==(n=null===E||void 0===E?void 0:E.fill)&&void 0!==n?n:m,fillOpacity:null!==(o=null===E||void 0===E?void 0:E.fillOpacity)&&void 0!==o?o:C,stroke:null!==(r=null===E||void 0===E?void 0:E.stroke)&&void 0!==r?r:b,strokeWidth:null!==(s=null===E||void 0===E?void 0:E.strokeWidth)&&void 0!==s?s:w,strokeOpacity:null!==(a=null===E||void 0===E?void 0:E.strokeOpacity)&&void 0!==a?a:S}}getInnerRadius(){const{radius:e,innerRadiusRatio:t,innerRadiusOffset:i}=this,n=e*t+i;return n===e||n<0?0:n}getOuterRadius(){return Math.max(this.radius*this.outerRadiusRatio+this.outerRadiusOffset,0)}updateRadiusScale(e){const t=[this.getInnerRadius(),this.getOuterRadius()];this.radiusScale.range=t,e&&(this.previousRadiusScale.range=t),this.nodeData=this.nodeData.map((e=>{var{radius:t}=e,i=ha(e,["radius"]);return Object.assign(Object.assign({},i),{radius:t,innerRadius:Math.max(this.radiusScale.convert(0),0),outerRadius:Math.max(this.radiusScale.convert(t),0)})}))}getTitleTranslationY(){var e,t;const i=Math.max(0,this.radiusScale.range[1]);if(0===i)return NaN;const n=null!==(t=null===(e=this.title)||void 0===e?void 0:e.spacing)&&void 0!==t?t:0,o=2+n,r=Math.max(0,-i);return-i-o-r}update({seriesRect:e}){return va(this,void 0,void 0,(function*(){const{title:t}=this,i={seriesRectWidth:null===e||void 0===e?void 0:e.width,seriesRectHeight:null===e||void 0===e?void 0:e.height},n=null!=Ua(this.nodeDataDependencies,i);if(n&&(this.nodeDataDependencies=i),yield this.maybeRefreshNodeData(),this.updateTitleNodes(),this.updateRadiusScale(n),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){const e=this.getTitleTranslationY(),i=t.node.computeBBox();t.node.visible=t.enabled&&isFinite(e)&&!this.bboxIntersectsSurroundingSeries(i,0,e),t.node.translationY=isFinite(e)?e:0}this.updateNodeMidPoint(),yield this.updateSelections(),yield this.updateNodes(e)}))}updateTitleNodes(){var e,t;const{title:i,oldTitle:n}=this;n!==i&&(n&&(null===(e=this.labelGroup)||void 0===e||e.removeChild(n.node)),i&&(i.node.textBaseline="bottom",null===(t=this.labelGroup)||void 0===t||t.appendChild(i.node)),this.oldTitle=i)}updateNodeMidPoint(){this.nodeData.forEach((e=>{const t=e.innerRadius+(e.outerRadius-e.innerRadius)/2;e.midPoint={x:e.midCos*Math.max(0,t),y:e.midSin*Math.max(0,t)}}))}updateSelections(){return va(this,void 0,void 0,(function*(){yield this.updateGroupSelection(),this.updateInnerCircleSelection()}))}updateGroupSelection(){return va(this,void 0,void 0,(function*(){const{itemSelection:e,highlightSelection:t,calloutLabelSelection:i,sectorLabelSelection:n,innerLabelsSelection:o}=this,r=(e,t)=>{let i=this.nodeData;t&&(i=i.map((e=>Object.assign(Object.assign({},e),{sectorFormat:Object.assign({},e.sectorFormat)})))),e.update(i),this.ctx.animationManager.isSkipped()&&e.cleanup()};r(e,!1),r(t,!0),i.update(this.nodeData,(e=>{const t=new cd;t.tag=ph.Callout,t.pointerEvents=kc.None,e.appendChild(t);const i=new Kc;i.tag=ph.Label,i.pointerEvents=kc.None,e.appendChild(i)})),n.update(this.nodeData,(e=>{e.pointerEvents=kc.None})),o.update(this.innerLabels,(e=>{e.pointerEvents=kc.None}))}))}updateInnerCircleSelection(){const{innerCircle:e}=this;let t=0;const i=this.getInnerRadius();if(i>0){const e=Math.min(i,this.getOuterRadius()),n=1;t=Math.ceil(2*e+n)}const n=e?[{radius:t}]:[];this.innerCircleSelection.update(n)}updateNodes(e){return va(this,void 0,void 0,(function*(){const t=this.ctx.highlightManager.getActiveHighlight(),i=this.seriesItemEnabled.indexOf(!0)>=0;this.rootGroup.visible=i,this.backgroundGroup.visible=i,this.contentGroup.visible=i,this.highlightGroup.visible=i&&(null===t||void 0===t?void 0:t.series)===this,this.labelGroup&&(this.labelGroup.visible=i),this.contentGroup.opacity=this.getOpacity(),this.innerCircleSelection.each(((e,{radius:t})=>{var i,n;e.setProperties({fill:null===(i=this.innerCircle)||void 0===i?void 0:i.fill,opacity:null===(n=this.innerCircle)||void 0===n?void 0:n.fillOpacity,size:t})}));const n=(e,t,i,n)=>{const o=this.getSectorFormat(t.datum,t.itemId,n);t.sectorFormat.fill=o.fill,t.sectorFormat.stroke=o.stroke;const r=this.ctx.animationManager.isSkipped();r&&(e.startAngle=t.startAngle,e.endAngle=t.endAngle,e.innerRadius=t.
18innerRadius,e.outerRadius=t.outerRadius),(n||r)&&(e.fill=o.fill,e.stroke=o.stroke),e.strokeWidth=o.strokeWidth,e.fillOpacity=o.fillOpacity,e.strokeOpacity=this.strokeOpacity,e.lineDash=this.lineDash,e.lineDashOffset=this.lineDashOffset,e.fillShadow=this.shadow,e.lineJoin="round"};this.itemSelection.each(((e,t,i)=>n(e,t,i,!1))),this.highlightSelection.each(((e,i,o)=>{const r=(null===t||void 0===t?void 0:t.series)===this&&e.datum.itemId===t.itemId;n(e,i,o,r),e.visible=r})),this.updateCalloutLineNodes(),this.updateCalloutLabelNodes(e),this.updateSectorLabelNodes(),this.updateInnerLabelNodes(),this.animationState.transition("update")}))}updateCalloutLineNodes(){var e;const{calloutLine:t}=this,i=t.length,n=t.strokeWidth,o=null!==(e=t.colors)&&void 0!==e?e:this.strokes,{offset:r}=this.calloutLabel;this.calloutLabelSelection.selectByTag(ph.Callout).forEach(((e,t)=>{const s=e.datum,{calloutLabel:a,outerRadius:l}=s;if((null===a||void 0===a?void 0:a.text)&&!a.hidden&&0!==l){e.visible=!0,e.strokeWidth=n,e.stroke=o[t%o.length],e.fill=void 0;const c=s.midCos*l,u=s.midSin*l;let d=s.midCos*(l+i),p=s.midSin*(l+i);const h=a.collisionTextAlign||0!==a.collisionOffsetY;if(h&&null!=a.box){const e=a.box;let t=d,i=p;d<e.x?t=e.x:d>e.x+e.width&&(t=e.x+e.width),p<e.y?i=e.y:p>e.y+e.height&&(i=e.y+e.height);const n=t-d,o=i-p,s=Math.sqrt(Math.pow(n,2)+Math.pow(o,2)),l=s-r;l>0&&(d+=n*l/s,p+=o*l/s)}e.x1=c,e.y1=u,e.x2=d,e.y2=p}else e.visible=!1}))}getLabelOverflow(e,t,i){const n=i.x-this.centerX,o=i.x+i.width-this.centerX,r=i.y-this.centerY,s=i.y+i.height-this.centerY,a=1;let l=1;t.x+a<n?l=(t.x+t.width-n)/t.width:t.x+t.width-a>o&&(l=(o-t.x)/t.width);const c=t.y+a<r||t.y+t.height-a>s,u=1===l?e.length:Math.floor(e.length*l)-1,d=this.bboxIntersectsSurroundingSeries(t);return{textLength:u,hasVerticalOverflow:c,hasSurroundingSeriesOverflow:d}}bboxIntersectsSurroundingSeries(e,t=0,i=0){const{surroundingRadius:n}=this;if(null==n)return!1;const o=[{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}],r=Math.pow(n,2);return o.some((e=>Math.pow(e.x,2)+Math.pow(e.y,2)>r))}computeCalloutLabelCollisionOffsets(){const{radiusScale:e,calloutLabel:t,calloutLine:i}=this,{offset:n,minSpacing:o}=t,r=e.convert(0),s=e=>{const t=e.calloutLabel;return!t||0===e.outerRadius},a=this.nodeData,l=this.nodeData.filter((e=>!s(e)));if(l.forEach((e=>{const t=e.calloutLabel;null!=t&&(t.hidden=!1,t.collisionTextAlign=void 0,t.collisionOffsetY=0)})),l.length<=1)return;const c=l.filter((e=>e.midCos<0)).sort(((e,t)=>e.midSin-t.midSin)),u=l.filter((e=>e.midCos>=0)).sort(((e,t)=>e.midSin-t.midSin)),d=l.filter((e=>{var t;return e.midSin<0&&"center"===(null===(t=e.calloutLabel)||void 0===t?void 0:t.textAlign)})).sort(((e,t)=>e.midCos-t.midCos)),p=l.filter((e=>{var t;return e.midSin>=0&&"center"===(null===(t=e.calloutLabel)||void 0===t?void 0:t.textAlign)})).sort(((e,t)=>e.midCos-t.midCos)),h=new Kc,f=e=>{var t;const o=e.calloutLabel;if(null==o)return new Pc(0,0,0,0);const r=e.outerRadius+i.length+n,s=e.midCos*r,a=e.midSin*r+o.collisionOffsetY;return h.text=o.text,h.x=s,h.y=a,h.setFont(this.calloutLabel),h.setAlign({textAlign:null!==(t=o.collisionTextAlign)&&void 0!==t?t:o.textAlign,textBaseline:o.textBaseline}),h.computeBBox()},g=(e,t,i)=>{const n=f(e).grow(o/2),r=f(t).grow(o/2),s=n.x<r.x+r.width&&n.x+n.width>r.x&&("to-top"===i?n.y<r.y+r.height:n.y+n.height>r.y);if(s){const e="to-top"===i?n.y-r.y-r.height:n.y+n.height-r.y;t.calloutLabel.collisionOffsetY=e}},v=e=>{const t=e.slice().sort(((e,t)=>Math.abs(e.midSin)-Math.abs(t.midSin)))[0],i=e.indexOf(t);for(let n=i-1;n>=0;n--){const t=e[n+1],i=e[n];g(t,i,"to-top")}for(let n=i+1;n<e.length;n++){const t=e[n-1],i=e[n];g(t,i,"to-bottom")}},y=e=>{const t=l.some((e=>0!==e.calloutLabel.collisionOffsetY)),i=e.map((e=>f(e))),n=i.map((e=>e.clone().grow(o/2)));let s=!1;for(let o=0;o<n.length&&!s;o++){const t=n[o];for(let i=o+1;i<e.length;i++){const e=n[i];if(t.collidesBBox(e)){s=!0;break}}}const c=a.map((e=>{const{startAngle:t,endAngle:i,outerRadius:n}=e;return{startAngle:t,endAngle:i,innerRadius:r,outerRadius:n}})),u=i.some((e=>c.some((t=>Cd(e,t)))));(s||t||u)&&e.filter((e=>
18"center"===e.calloutLabel.textAlign)).forEach((e=>{const t=e.calloutLabel;e.midCos<0?t.collisionTextAlign="right":e.midCos>0?t.collisionTextAlign="left":t.collisionTextAlign="center"}))};v(c),v(u),y(d),y(p)}updateCalloutLabelNodes(e){const{radiusScale:t,calloutLabel:i,calloutLine:n}=this,o=n.length,{offset:r,color:s}=i,a=new Kc;this.calloutLabelSelection.selectByTag(ph.Label).forEach((n=>{var l;const{datum:c}=n,u=c.calloutLabel,d=t.convert(c.radius),p=Math.max(0,d);if(!(null===u||void 0===u?void 0:u.text)||0===p||u.hidden)return void(n.visible=!1);const h=p+o+r,f=c.midCos*h,g=c.midSin*h+u.collisionOffsetY,v={textAlign:null!==(l=u.collisionTextAlign)&&void 0!==l?l:u.textAlign,textBaseline:u.textBaseline};a.text=u.text,a.x=f,a.y=g,a.setFont(this.calloutLabel),a.setAlign(v);const y=a.computeBBox();let m=u.text,C=!0;if(i.avoidCollisions){const{textLength:t,hasVerticalOverflow:i}=this.getLabelOverflow(u.text,y,e);m=u.text.length===t?u.text:`${u.text.substring(0,t)}…`,C=!i}n.text=m,n.x=f,n.y=g,n.setFont(this.calloutLabel),n.setAlign(v),n.fill=s,n.visible=C}))}computeLabelsBBox(e,t){var i;return va(this,void 0,void 0,(function*(){const{calloutLabel:n,calloutLine:o}=this,r=o.length,{offset:s,maxCollisionOffset:a,minSpacing:l}=n;if(!n.avoidCollisions)return null;yield this.maybeRefreshNodeData(),this.updateRadiusScale(!1),this.computeCalloutLabelCollisionOffsets();const c=[],u=new Kc;let d;if((null===(i=this.title)||void 0===i?void 0:i.text)&&this.title.enabled){const e=this.getTitleTranslationY();isFinite(e)&&(u.text=this.title.text,u.x=0,u.y=e,u.setFont(this.title),u.setAlign({textBaseline:"bottom",textAlign:"center"}),d=u.computeBBox(),c.push(d))}return this.nodeData.forEach((i=>{var n;const o=i.calloutLabel;if(!o||0===i.outerRadius)return null;const p=i.outerRadius+r+s,h=i.midCos*p,f=i.midSin*p+o.collisionOffsetY;u.text=o.text,u.x=h,u.y=f,u.setFont(this.calloutLabel),u.setAlign({textAlign:null!==(n=o.collisionTextAlign)&&void 0!==n?n:o.textAlign,textBaseline:o.textBaseline});const g=u.computeBBox();if(o.box=g,Math.abs(o.collisionOffsetY)>a)o.hidden=!0;else{if(d){const e=t.y-this.centerY,i=new Pc(d.x-l,e,d.width+2*l,d.y+d.height+l-e);if(g.collidesBBox(i))return void(o.hidden=!0)}if(e.hideWhenNecessary){const{textLength:e,hasVerticalOverflow:i,hasSurroundingSeriesOverflow:n}=this.getLabelOverflow(o.text,g,t),r=o.text.length>2&&e<2;if(i||r||n)return void(o.hidden=!0)}o.hidden=!1,c.push(g)}})),0===c.length?null:Pc.merge(c)}))}updateSectorLabelNodes(){const{radiusScale:e}=this,t=e.convert(0),{fontSize:i,fontStyle:n,fontWeight:o,fontFamily:r,positionOffset:s,positionRatio:a,color:l}=this.sectorLabel,c=t>0,u=1===this.seriesItemEnabled.filter(Boolean).length;this.sectorLabelSelection.each(((e,d)=>{const{sectorLabel:p,outerRadius:h}=d;let f=!1;if(p&&0!==h){const g=t*(1-a)+h*a+s;e.fill=l,e.fontStyle=n,e.fontWeight=o,e.fontSize=i,e.fontFamily=r,e.text=p.text;const v=!c&&u;v?(e.x=0,e.y=0):(e.x=d.midCos*g,e.y=d.midSin*g),e.textAlign="center",e.textBaseline="middle";const y=e.computeBBox(),m=[[y.x,y.y],[y.x+y.width,y.y],[y.x+y.width,y.y+y.height],[y.x,y.y+y.height]],{startAngle:C,endAngle:b}=d,w={startAngle:C,endAngle:b,innerRadius:t,outerRadius:h};m.every((([e,t])=>yd(e,t,w)))&&(f=!0)}e.visible=f}))}updateInnerLabelNodes(){const e=[],t=[];this.innerLabelsSelection.each(((i,n)=>{const{fontStyle:o,fontWeight:r,fontSize:s,fontFamily:a,color:l}=n;i.fontStyle=o,i.fontWeight=r,i.fontSize=s,i.fontFamily=a,i.text=n.text,i.x=0,i.y=0,i.fill=l,i.textAlign="center",i.textBaseline="alphabetic",e.push(i.computeBBox()),t.push(n.margin)}));const i=e=>0===e?0:t[e],n=e=>e===t.length-1?0:t[e],o=e.reduce(((e,t,o)=>e+t.height+i(o)+n(o)),0),r=Math.max(...e.map((e=>e.width))),s=this.getInnerRadius(),a=Math.sqrt(Math.pow(r/2,2)+Math.pow(o/2,2)),l=a<=(s>0?s:this.getOuterRadius()),c=[];for(let u=0,d=-o/2;u<e.length;u++){const t=e[u],o=t.height+d+i(u);c.push(o),d=o+n(u)}this.innerLabelsSelection.each(((e,t,i)=>{e.y=c[i],e.visible=l}))}getDatumLegendName(e){const{angleKey:t,calloutLabelKey:i,sectorLabelKey:n,legendItemKey:o}=this,{sectorLabel:r,calloutLabel:s,legendItem:a}=e;return o&&void 0!==a?a.text:i&&i!==t&&void 0!==(null===s||void 0===s?void 0:s.text)?s.text:n&&n!==t&&void 0!==(null===r||void 0===r?void 0:r.text)?r.text:void 0}getTooltipHtml(e){var t;if(!this.angleKey)return"";const{datum:i,angleValue:n,sectorFormat:{fill:o}}=e,r=Pd(null===(t=this.title)||void 0===t?void 0:t.text),s=Gd(n)?dl(n):String(n),a=this.getDatumLegendName(e);return this.tooltip.toTooltipHtml({title:null!==r&&void 0!==r?r:a,content:r&&a?`${a}: ${s}`:s,backgroundColor:o},{datum:i,title:r,color:o,seriesId:this.id,angleKey:this.angleKey,angleName:this.angleName,radiusKey:this.radiusKey,radiusName:this.radiusName,calloutLabelKey:this.calloutLabelKey,calloutLabelName:this.calloutLabelName,sectorLabelKey:this.sectorLabelKey,sectorLabelName:this.sectorLabelName})}getLegendData(e){var t,i,n,o,r;const{processedData:s,angleKey:a,calloutLabelKey:l,sectorLabelKey:c,legendItemKey:u,id:d,dataModel:p}=this;if(!p||!s||0===s.data.length||"category"!==e)return[];if(!u&&(!l||l===a)&&(!c||c===a))return[];const{calloutLabelIdx:h,sectorLabelIdx:f,legendItemIdx:g}=this.getProcessedDataIndexes(p),v=(null===(t=this.title)||void 0===t?void 0:t.showInLegend
18)&&this.title.text,y=[];for(let m=0;m<s.data.length;m++){const{datum:e,values:t}=s.data[m],p=[];v&&p.push(v);const C=this.getLabels(e,2*Math.PI,2*Math.PI,!1,t[h],t[f],t[g]);if(u&&void 0!==C.legendItem?p.push(C.legendItem.text):l&&l!==a&&void 0!==(null===(i=C.calloutLabel)||void 0===i?void 0:i.text)?p.push(null===(n=C.calloutLabel)||void 0===n?void 0:n.text):c&&c!==a&&void 0!==(null===(o=C.sectorLabel)||void 0===o?void 0:o.text)&&p.push(null===(r=C.sectorLabel)||void 0===r?void 0:r.text),0===p.length)continue;const b=this.getSectorFormat(e,m,!1);y.push({legendType:"category",id:d,itemId:m,seriesId:d,enabled:this.seriesItemEnabled[m],label:{text:p.join(" - ")},marker:{fill:b.fill,stroke:b.stroke,fillOpacity:this.fillOpacity,strokeOpacity:this.strokeOpacity,strokeWidth:this.strokeWidth}})}return y}onLegendItemClick(e){const{enabled:t,itemId:i,series:n}=e;n.id===this.id?this.toggleSeriesItem(i,t):"pie"===n.type&&this.toggleOtherSeriesItems(n,i,t)}toggleSeriesItem(e,t){this.seriesItemEnabled[e]=t,this.nodeDataRefresh=!0}toggleOtherSeriesItems(e,t,i){var n,o;const{legendItemKey:r,dataModel:s}=this;if(!r||!s)return;const a=e.legendItemKey&&(null===(n=e.data)||void 0===n?void 0:n.find(((e,i)=>i===t))[e.legendItemKey]);if(!a)return;const l=s.resolveProcessedDataIndexById(this,"legendItemValue").index;null===(o=this.processedData)||void 0===o||o.data.forEach((({values:e},t)=>{e[l]===a&&this.toggleSeriesItem(t,i)}))}animateEmptyUpdateReady(e){const{animationManager:t}=this.ctx,i=ch(!0,this.rotation,this.radiusScale,this.previousRadiusScale);Tu(this.id,"nodes",t,[this.itemSelection,this.highlightSelection],i.nodes),Tu(this.id,"innerCircle",t,[this.innerCircleSelection],i.innerCircle),Lp(this,"callout",t,[this.calloutLabelSelection]),Lp(this,"sector",t,[this.sectorLabelSelection]),Lp(this,"inner",t,[this.innerLabelsSelection]),this.previousRadiusScale.range=this.radiusScale.range}animateWaitingUpdateReady(){var e,t,i,n,o,r;const{itemSelection:s,highlightSelection:a,processedData:l,radiusScale:c,previousRadiusScale:u}=this,{animationManager:d}=this.ctx,p=null===(e=null===l||void 0===l?void 0:l.reduced)||void 0===e?void 0:e.diff;this.ctx.animationManager.stopByAnimationGroupId(this.id);const h=0===(null!==(t=null===p||void 0===p?void 0:p.moved.length)&&void 0!==t?t:0)&&(null===p||void 0===p?void 0:p.addedIndices.every((e=>!p.removedIndices.includes(e)))),f=(null!==(i=null===l||void 0===l?void 0:l.defs.keys.length)&&void 0!==i?i:0)>0,g=null===(r=null===(o=null===(n=null===l||void 0===l?void 0:l.reduced)||void 0===n?void 0:n.animationValidation)||void 0===o?void 0:o.uniqueKeys)||void 0===r||r;h&&f&&g||this.ctx.animationManager.skipCurrentBatch();const v=ch(!1,this.rotation,c,u);Tu(this.id,"nodes",d,[s,a],v.nodes,((e,t)=>this.getDatumId(t)),p),Tu(this.id,"innerCircle",d,[this.innerCircleSelection],v.innerCircle),Lp(this,"callout",this.ctx.animationManager,[this.calloutLabelSelection]),Lp(this,"sector",this.ctx.animationManager,[this.sectorLabelSelection]),Lp(this,"inner",this.ctx.animationManager,[this.innerLabelsSelection]),this.previousRadiusScale.range=this.radiusScale.range}animateClearingUpdateEmpty(){const{itemSelection:e,highlightSelection:t,radiusScale:i,previousRadiusScale:n}=this,{animationManager:o}=this.ctx,r=ch(!1,this.rotation,i,n);Tu(this.id,"nodes",o,[e,t],r.nodes),Tu(this.id,"innerCircle",o,[this.innerCircleSelection],r.innerCircle),Ip(this,"callout",this.ctx.animationManager,[this.calloutLabelSelection]),Ip(this,"sector",this.ctx.animationManager,[this.sectorLabelSelection]),Ip(this,"inner",this.ctx.animationManager,[this.innerLabelsSelection]),this.previousRadiusScale.range=this.radiusScale.range}getDatumIdFromData(e){var t,i,n;const{calloutLabelKey:o,sectorLabelKey:r,legendItemKey:s}=this;if(null===(n=null===(i=null===(t=this.processedData)||void 0===t?void 0:t.reduced)||void 0===i?void 0:i.animationValidation)||void 0===n?void 0:n.uniqueKeys)return s?e[s]:o?e[o]:r?e[r]:void 0}getDatumId(e){var t;const{index:i}=e;return null!==(t=this.getDatumIdFromData(e.datum))&&void 0!==t?t:`${i}`}onDataChange(){this.processSeriesItemEnabled()}}xh.className="PieSeries",xh.type="pie",fa([fl(Al),ga("design:type",Object)],xh.prototype,"angleKey",void 0),fa([fl(Al),ga("design:type",Object)],xh.prototype,"angleName",void 0),fa([fl(_l),ga("design:type",String)],xh.prototype,"radiusKey",void 0),fa([fl(_l),ga("design:type",String)],xh.prototype,"radiusName",void 0),fa([fl(Wl(0)),ga("design:type",Number)],xh.prototype,"radiusMin",void 0),fa([fl(Wl(0)),ga("design:type",Number)],xh.prototype,"radiusMax",void 0),fa([fl(_l),ga("design:type",String)],xh.prototype,"calloutLabelKey",void 0),fa([fl(_l),ga("design:type",String)],xh.prototype,"calloutLabelName",void 0),fa([fl(_l),ga("design:type",String)],xh.prototype,"sectorLabelKey",void 0),fa([fl(_l),ga("design:type",String)],xh.prototype,"sectorLabelName",void 0),fa([fl(_l),ga("design:type",String)],xh.prototype,"legendItemKey",void 0),fa([fl(Vl),ga("design:type",Array)],xh.prototype,"fills",void 0),fa([fl(Vl),ga("design:type",Array)],xh.prototype,"strokes",void 0),fa([fl(Hl(0,1)),ga("design:type",Object)],xh.prototype,"fillOpacity",void 0),fa([fl(Hl(0,1)),ga("design:type",Object)],xh.prototype,"strokeOpacity",void 0),fa([fl(ic),ga("design:type",Array)],xh.prototype,"lineDash",void 0),fa([fl(Hl(0)),ga("design:type",Number)],xh.prototype,"lineDashOffset",void 0),fa([fl(Tl),ga("design:type",Function)],xh.prototype,"formatter",void 0),fa([fl(Hl(-360,360)),ga("design:type",Object)],xh.prototype,"rotation",void 0),fa([fl(Hl()),ga("design:type",Object)],xh.prototype,"outerRadiusOffset",void 0),fa([fl(Hl(0)),ga("design:type",Object)],xh.prototype,"outerRadiusRatio",void 0),fa([fl(Hl()),ga("design:type",Object)],xh.prototype,"innerRadiusOffset",void 0),fa([fl(Hl(0)),ga("design:type",Object)],xh.prototype,"innerRadiusRatio",void 0),fa([fl(Hl(0)),ga("design:type",Object)],xh.prototype,"strokeWidth",void 0);const Oh={constructors:{},constructedArrays:new WeakMap};function Th(e,t){var i;
18null===(i=Oh.constructedArrays)||void 0===i||i.set(e,t)}const Dh={constructors:{title:iu,subtitle:iu,footnote:iu,shadow:Ic,innerCircle:Eh,"axes[].title":nu,"series[].innerLabels[]":Sh},allowedTypes:{"legend.pagination.marker.shape":["primitive","function"],"series[].marker.shape":["primitive","function"],"axis[].tick.count":["primitive","class-instance"]}};function Rh(){return{constructors:Object.assign(Object.assign({},Dh.constructors),Oh.constructors),constructedArrays:Oh.constructedArrays,allowedTypes:Object.assign({},Dh.allowedTypes)}}class Ah extends Wc{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 Pc(this.x1,this.y1,this.x2-this.x1,this.y2-this.y1)}isPointInPath(e,t){return!1}render(e){var t;const{ctx:i,forceRender:n,stats:o}=e;if(this.dirty===Cc.NONE&&!n)return void(o&&(o.nodesSkipped+=this.nodeCount.count));this.computeTransformMatrix(),this.matrix.toContext(i);let{x1:r,y1:s,x2:a,y2:l}=this;r=this.align(r),s=this.align(s),a=this.align(a),l=this.align(l);const{fill:c,opacity:u,isRange:d}=this,p=!(!d||!c);if(p){const{fillOpacity:e}=this;i.fillStyle=c,i.globalAlpha=u*e,i.beginPath(),i.moveTo(r,s),i.lineTo(a,s),i.lineTo(a,l),i.lineTo(r,l),i.closePath(),i.fill()}const{stroke:h,strokeWidth:f,startLine:g,endLine:v}=this,y=!(!g&&!v||!h||!f);if(y){const{strokeOpacity:e,lineDash:t,lineDashOffset:n,lineCap:o,lineJoin:c}=this;i.strokeStyle=h,i.globalAlpha=u*e,i.lineWidth=f,t&&i.setLineDash(t),n&&(i.lineDashOffset=n),o&&(i.lineCap=o),c&&(i.lineJoin=c),i.beginPath(),g&&(i.moveTo(r,s),i.lineTo(a,s)),v&&(i.moveTo(a,l),i.lineTo(r,l)),i.stroke()}null===(t=this.fillShadow)||void 0===t||t.markClean(),super.render(e)}}Ah.className="Range",Ah.defaultStyles=Object.assign(Object.assign({},Wc.defaultStyles),{strokeWidth:1}),fa([Sc({redraw:Cc.MINOR}),ga("design:type",Number)],Ah.prototype,"x1",void 0),fa([Sc({redraw:Cc.MINOR}),ga("design:type",Number)],Ah.prototype,"y1",void 0),fa([Sc({redraw:Cc.MINOR}),ga("design:type",Number)],Ah.prototype,"x2",void 0),fa([Sc({redraw:Cc.MINOR}),ga("design:type",Number)],Ah.prototype,"y2",void 0),fa([Sc({redraw:Cc.MINOR}),ga("design:type",Boolean)],Ah.prototype,"startLine",void 0),fa([Sc({redraw:Cc.MINOR}),ga("design:type",Boolean)],Ah.prototype,"endLine",void 0),fa([Sc({redraw:Cc.MINOR}),ga("design:type",Boolean)],Ah.prototype,"isRange",void 0);const _h={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}},Ph={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 Mh({yDirection:e,padding:t=0,position:i="top",bbox:n}){const o=e?_h:Ph,{xTranslationDirection:r,yTranslationDirection:s}=o[i],a=e?n.width:n.height,l=e?n.height:n.width,c=r*(t+a/2),u=s*(t+l/2);return{xTranslation:c,yTranslation:u}}function kh({yDirection:e,bbox:t,padding:i=0,position:n="top"}){const o={};return n.startsWith("inside")||("top"!==n||e?"bottom"!==n||e?"left"===n&&e?o.left=i+t.width:"right"===n&&e&&(o.right=i+t.width):o.bottom=i+t.height:o.top=i+t.height),o}const Nh=({yDirection:e,xEnd:t,yStart:i,yEnd:n})=>e?{x:t/2,y:i}:{x:t,y:isNaN(n)?i:(i+n)/2},Lh=({yDirection:e,xStart:t,xEnd:i,yStart:n,yEnd:o})=>e?{x:t,y:isNaN(o)?n:(n+o)/2}:{x:i/2,y:n},Ih=({yDirection:e,xEnd:t,yStart:i,yEnd:n})=>e?{x:t,y:isNaN(n)?i:(i+n)/2}:{x:t/2,y:isNaN(n)?i:n},Fh=({yDirection:e,xStart:t,xEnd:i,yStart:n,yEnd:o})=>e?{x:i/2,y:isNaN(o)?n:o}:{x:t,y:isNaN(o)?n:(n+o)/2},Gh=({xEnd:e,yStart:t,yEnd:i})=>({x:e/2,y:isNaN(i)?t:(t+i)/2}),Vh=({yDirection:e,xStart:t,xEnd:i,yStart:n})=>e?{x:t/2,y:n}:{x:i,y:n},Bh=({yDirection:e,xStart:t,yStart:i,yEnd:n})=>e?{x:t,y:isNaN(n)?i:n}:{x:t,y:i},jh=({yDirection:e,xEnd:t,yStart:i,yEnd:n})=>e?{x:t,y:i}:{x:t,y:isNaN(n)?i:n},Hh=({yDirection:e,xStart:t,xEnd:i,yStart:n,yEnd:o})=>e?{x:i,y:isNaN(o)?n:o}:{x:t,y:isNaN(o)?n:o},Wh={top:{c:Nh},bottom:{c:Fh},left:{c:Lh},right:{c:Ih},topLeft:{c:Vh},topRight:{c:jh},bottomLeft:{c:Bh},bottomRight:{c:Hh},inside:{c:Gh},insideLeft:{c:Lh},insideRight:{c:Ih},insideTop:{c:Nh},insideBottom:{c:Fh},insideTopLeft:{c:Vh},insideBottomLeft:{c:Bh},insideTopRight:{c:jh},insideBottomRight:{c:Hh}},Uh=["top","left","right","bottom","topLeft","topRight","bottomLeft","bottomRight","inside","insideLeft","insideRight","insideTop","insideBottom","insideTopLeft","insideBottomLeft","insideTopRight","insideBottomRight"],zh=vl(((e,t)=>yl(e,t,(e=>Uh.includes(e)))),"expecting an optional crossLine label position keyword such as 'topLeft', 'topRight' or 'inside'"),Kh=vl(((e,t)=>yl(e,t,(e=>"range"===e||"line"===e))),"expecting a crossLine type keyword such as 'range' or 'line'");class Yh{constructor(){this.enabled=void 0,this.text=void 0,this.fontStyle=void 0,this.fontWeight=void 0,this.fontSize=14,this.fontFamily="Verdana, sans-serif",this.padding=5,this.color="rgba(87, 87, 87, 1)",this.position=void 0,this.rotation=void 0,this.parallel=void 0}}fa([fl(Rl),ga("design:type",Boolean)],Yh.prototype,"enabled",void 0),fa([fl(_l),ga("design:type",String)],Yh.prototype,"text",void 0),fa([fl(Jl),ga("design:type",String)],Yh.prototype,"fontStyle",void 0),fa([fl(ec),ga("design:type",String)],Yh.prototype,"fontWeight",void 0),fa([fl(Hl(0)),ga("design:type",Number)],Yh.prototype,"fontSize",void 0),fa([fl(Al),ga("design:type",String)],Yh.prototype,"fontFamily",void 0),fa([fl(Hl()),ga("design:type",Number)],Yh.prototype,"padding",void 0),fa([fl(Gl),ga("design:type",String)],Yh.prototype,"color",void 0),fa([fl(zh),ga("design:type",String)],Yh.prototype,"position",void 0),fa([fl(Wl(-360,360)),ga("design:type",Number)],Yh.prototype,"rotation",void 0),fa([fl(Rl),ga("design:type",Boolean)],Yh.prototype,"parallel",void 0);class qh{constructor(){this.id=Rc(this),this.enabled=void 0,this.type=void 0,this.range=void 0,this.value=void 0,this.fill=void 0,this.fillOpacity=void 0,this.stroke=void 0,this.strokeWidth=void 0,this.strokeOpacity=void 0,this.lineDash=void 0,this.label=new Yh,this.scale=void 0,this.clippedRange=[-1/0,1/0],this.gridLength=0,this.sideFlag=-1,this.parallelFlipRotation=0,this.regularFlipRotation=0,this.direction=mc.X,this.group=new ad({name:`${this.id}`,layer:!0,zIndex:qh.LINE_LAYER_ZINDEX}),this.crossLineRange=new Ah,this.crossLineLabel=new Kc,this.labelPoint=void 0,this.data=[],this.startLine=!1,this.endLine=!1,this.isRange=!1;const{group:e,crossLineRange:t,crossLineLabel:i}=this;e.append([t,i]),t.pointerEvents=kc.None}update(e){this.enabled&&e&&0!==this.data.length?(this.group.visible=!0,this.group.zIndex=this.getZIndex(this.isRange),this.updateNodes()):this.group.visible=!1}calculateLayout(e){if(!e)return;const t=this.createNodeData();if(!t)return;const{sideFlag:i,gridLength:n,data:o}=this,r=[],s=0,a=i*n,l=o[0],c=o[1],u=new Pc(Math.min(s,a),Math.min(l,c),Math.abs(s-a),Math.abs(l-c));r.push(u);const d=this.computeLabelBBox();return d&&r.push(d),Pc.merge(r)}updateNodes(){this.updateRangeNode(),this.label.enabled&&(this.updateLabel(),this.positionLabel())}createNodeData(){var e,t;const{scale:i,gridLength:n,sideFlag:o,direction:r,label:{position:s="top"},clippedRange:a,strokeWidth:l=0}=this;if(this.data=[],!i)return!1;const c=null!==(e=i.bandwidth)&&void 0!==e?e:0,u=e=>Math.max(Math.min(...a),Math.min(Math.max(...a),e)),[d,p]=[0,o*n];let[h,f]=this.getRange(),[g,v]=[Number(i.convert(h,{clampMode:"clamped"})),i.convert(f,{clampMode:"clamped"})+c];g=u(g),v=u(v),[h,f]=[Number(i.convert(h)),i.convert(f)+c];const y=!isNaN(g)&&!isNaN(v)&&(h===g||f===v||g!==v)&&Math.abs(v-g)>0;if(y){const e=g!==Math.min(g,v);e&&([g,v]=[Math.min(g,v),Math.max(g,v)],[h,f]=[f,h])}if(this.isRange=y,this.startLine=!isNaN(h)&&l>0&&h===g,this.endLine=!isNaN(f)&&l>0&&f===v,!y&&!this.startLine&&!this.endLine)return!1;if(this.data=[g,v],this.label.enabled){const e=r===mc.Y,{c:i=Nh}=null!==(t=Wh[s])&&void 0!==t?t:{},{x:n,y:o}=i({yDirection:e,xStart:d,xEnd:p,yStart:g,yEnd:v});this.labelPoint={x:n,y:o}}return!0}updateRangeNode(){var e;const{crossLineRange:t,sideFlag:i,gridLength:n,data:o,startLine:r,endLine:s,isRange:a,fill:l,fillOpacity:c,stroke:u,strokeWidth:d,lineDash:p}=this;t.x1=0,t.x2=i*n,t.y1=o[0],t.y2=o[1],t.startLine=r,t.endLine=s,t.isRange=a,t.fill=l,t.fillOpacity=null!==c&&void 0!==c?c:1,t.stroke=u,t.strokeWidth=null!==d&&void 0!==d?d:1,t.strokeOpacity=null!==(e=this.strokeOpacity)&&void 0!==e?e:1,t.lineDash=p}updateLabel(){const{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(){const{crossLineLabel:e,labelPoint:{x:t,y:i}={},label:{parallel:n,rotation:o,position:r="top",padding:s=0},direction:a,parallelFlipRotation:l,regularFlipRotation:c}=this;if(void 0===t||void 0===i)return;const{defaultRotation:u,configuredRotation:d}=ep({rotation:o,parallel:n,regularFlipRotation:c,parallelFlipRotation:l});e.rotation=u+d,e.textBaseline="middle",e.textAlign="center";const p=e.computeTransformedBBox();if(!p)return;const h=a===mc.Y,{xTranslation:f,yTranslation:g}=Mh({yDirection:h,padding:s,position:r,bbox:p});e.translationX=t+f,e.translationY=i+g}getZIndex(e=!1){return e?qh.RANGE_LAYER_ZINDEX:qh.LINE_LAYER_ZINDEX}getRange(){const{value:e,range:t,scale:i}=this,n=nd.is(i);let[o,r]=null!==t&&void 0!==t?t:[e,void 0];return n||void 0!==r||(r=o),o=null!=Fd(o,n)?o:void 0,r=null!=Fd(r,n)?r:void 0,n&&o===r&&(r=void 0),void 0===o&&void 0!==r&&(o=r,r=void 0),[o,r]}computeLabelBBox(){const{label:e}=this;if(!e.enabled)return;const t=new Kc;t.fontFamily=e.fontFamily,t.fontSize=e.fontSize,t.fontStyle=e.fontStyle,t.fontWeight=e.fontWeight,t.text=e.text;const{labelPoint:{x:i,y:n}={},label:{parallel:o,rotation:r,position:s="top",padding:a=0},direction:l,parallelFlipRotation:c,regularFlipRotation:u}=this;if(void 0===i||void 0===n)return;const{configuredRotation:d}=ep({rotation:r,parallel:o,regularFlipRotation:u,parallelFlipRotation:c});t.rotation=d,t.textBaseline="middle",t.textAlign="center";const p=t.computeTransformedBBox();if(!p)return;const h=l===mc.Y,{xTranslation:f,yTranslation:g}=Mh({yDirection:h,padding:a,position:s,bbox:p});return t.translationX=i+f,t.translationY=n+g,t.computeTransformedBBox()}calculatePadding(e){var t,i,n,o,r,s,a,l;const{isRange:c,startLine:u,endLine:d,direction:p,label:{padding:h=0,position:f="top"}}=this;if(!c&&!u&&!d)return;const g=this.computeLabelBBox(),v=null===g||void 0===g?void 0:g.x,y=null===g||void 0===g?void 0:g.y;if(!g||void 0==v||void 0==y)return;const m=kh({yDirection:p===mc.Y,padding:h,position:f,bbox:g});e.left=Math.max(null!==(t=e.left)&&void 0!==t?t:0,null!==(i=m.left)&&void 0!==i?i:0),e.right=Math.max(null!==(n=e.right)&&void 0!==n?n:0,null!==(o=m.right)&&void 0!==o?o:0),e.top=Math.max(null!==(r=e.top)&&void 0!==r?r:0,null!==(s=m.top)&&void 0!==s?s:0),e.bottom=Math.max(null!==(a=e.bottom)&&void 0!==a?a:0,null!==(l=m.bottom)&&void 0!==l?l:0)}}qh.LINE_LAYER_ZINDEX=rp.SERIES_CROSSLINE_LINE_ZINDEX,qh.RANGE_LAYER_ZINDEX=rp.SERIES_CROSSLINE_RANGE_ZINDEX,qh.className="CrossLine",fa([fl(Rl),ga("design:type",Boolean)],qh.prototype,"enabled",void 0),fa([fl(Kh),ga("design:type",String)],qh.prototype,"type",void 0),fa([fl(Cl(2)),ga("design:type",Array)],qh.prototype,"range",void 0),fa([fl(Gl),ga("design:type",String)],qh.prototype,"fill",void 0),fa([fl(Wl(0,1)),ga("design:type",Number)],qh.prototype,"fillOpacity",void 0),fa([fl(Gl),ga("design:type",String)],qh.prototype,"stroke",void 0),fa([fl(Wl()),ga("design:type",Number)],qh.prototype,"strokeWidth",void 0),fa([fl(Wl(0,1)),ga("design:type",Number)],qh.prototype,"strokeOpacity",void 0),fa([fl(ic),ga("design:type",Array)],qh.prototype,"lineDash",void 0);const Xh=e=>e;class $h extends nd{constructor(){super([1,10],[0,1]),this.type="log",this.base=10,this.cacheProps=["domain","range","nice","tickCount","base"],this.baseLog=Xh,this.basePow=Xh,this.log=e=>this.domain[0]>=0?this.baseLog(e):-this.baseLog(-e),this.pow=e=>this.domain[0]>=0?this.basePow(e):-this.basePow(-e),this.defaultClampMode="clamped"}toDomain(e){return e}transform(e){return this.domain[0]>=0?Math.log(e):-Math.log(-e)}transformInvert(e){return this.domain[0]>=0?Math.exp(e):-Math.exp(-e)}update(){!this.domain||this.domain.length<2||(this.updateLogFn(),this.updatePowFn(),this.nice&&this.updateNiceDomain())}updateLogFn(){const{base:e}=this;let t;if(10===e)t=Math.log10;else if(e===Math.E)t=Math.log;else if(2===e)t=Math.log2;else{const i=Math.log(e);t=e=>Math.log(e)/i}this.baseLog=t}updatePowFn(){const{base:e}=this;let t;t=10===e?$h.pow10:e===Math.E?Math.exp:t=>Math.pow(e,t),this.basePow=t}updateNiceDomain(){const[e,t]=this.domain,i=this.pow(Math.floor(this.log(e))),n=this.pow(Math.ceil(this.log(t)));this.niceDomain=[i,n]}static pow10(e){return e>=0?Math.pow(10,e):1/Math.pow(10,-e)}ticks(){var e;const t=null!==(e=this.tickCount)&&void 0!==e?e:10;if(!this.domain||this.domain.length<2||t<1)return[];this.refresh();const i=this.base,[n,o]=this.getDomain();let r=this.log(n),s=this.log(o);if(this.interval){const e=Math.abs(this.interval),t=Math.abs(s-r),i=id(r,s,Math.min(t,e)).map((e=>this.pow(e))).filter((e=>e>=n&&e<=o));if(!this.isDenseInterval({start:n,stop:o,interval:e,count:i.length}))return i}const a=i%1===0,l=s-r>=t;if(!a||l)return Zu(r,s,Math.min(s-r,t)).map((e=>this.pow(e)));const c=[],u=n>0;r=Math.floor(r)-1,s=Math.round(s)+1;const d=Math.min(...this.range),p=Math.max(...this.range),h=(p-d)/t;let f=1/0;for(let g=r;g<=s;g++){const e=this.convert(this.pow(g+1));for(let t=1;t<i;t++){const r=u?t:i-t+1,s=this.pow(g)*r,a=this.convert(s),l=Math.abs(f-a),d=Math.abs(a-e),p=l>=h&&d>=h;s>=n&&s<=o&&(1===t||p)&&(c.push(s),f=a)}}return c}tickFormat({count:e,ticks:t,specifier:i}){const{base:n}=this;return null==i&&(i=10===n?".0e":","),"string"===typeof i&&(i=Iu(i)),e===1/0?i:(null==t&&this.ticks(),e=>i(e))}}var Zh;fa([fl(Hl(0)),ga("design:type",Object)],$h.prototype,"base",void 0),function(e){e[e["MILLISECOND"]=0]="MILLISECOND",e[e["SECOND"]=1]="SECOND",e[e["MINUTE"]=2]="MINUTE",e[e["HOUR"]=3]="HOUR",e[e["WEEK_DAY"]=4]="WEEK_DAY",e[e["SHORT_MONTH"]=5]="SHORT_MONTH",e[e["MONTH"]=6]="MONTH",e[e["SHORT_YEAR"]=7]="SHORT_YEAR",e[e["YEAR"]=8]="YEAR"}(Zh||(Zh={}));const Jh={[Zh.MILLISECOND]:".%L",[Zh.SECOND]:":%S",[Zh.MINUTE]:"%I:%M",[Zh.HOUR]:"%I %p",[Zh.WEEK_DAY]:"%a",[Zh.SHORT_MONTH]:"%b %
18d",[Zh.MONTH]:"%B",[Zh.SHORT_YEAR]:"%y",[Zh.YEAR]:"%Y"};function Qh(e){return e instanceof Date?e.getTime():e}class ef extends nd{constructor(){super([new Date(2022,11,7),new Date(2022,11,8)],[0,1]),this.type="time",this.cacheProps=["domain","range","nice","tickCount","interval","minTickCount","maxTickCount"],this.year=ia,this.month=Qs,this.week=$s,this.day=qs,this.hour=zs,this.minute=js,this.second=Fs,this.millisecond=Ts,this.tickIntervals=[[this.second,1,Ds],[this.second,5,5*Ds],[this.second,15,15*Ds],[this.second,30,30*Ds],[this.minute,1,Rs],[this.minute,5,5*Rs],[this.minute,15,15*Rs],[this.minute,30,30*Rs],[this.hour,1,As],[this.hour,3,3*As],[this.hour,6,6*As],[this.hour,12,12*As],[this.day,1,_s],[this.day,2,2*_s],[this.week,1,Ps],[this.week,2,2*Ps],[this.week,3,3*Ps],[this.month,1,Ms],[this.month,2,2*Ms],[this.month,3,3*Ms],[this.month,4,4*Ms],[this.month,6,6*Ms],[this.year,1,ks]]}toDomain(e){return new Date(e)}calculateDefaultTickFormat(e=[]){let t=Zh.YEAR;const i=e=>{e<t&&(t=e)};for(const l of e){const e=this.getLowestGranularityFormat(l);i(e)}const n=Qh(e[0]),o=Qh(e[e.length-1]),r=new Date(n).getFullYear(),s=new Date(o).getFullYear(),a=s-r>0;return this.buildFormatString(t,a)}buildFormatString(e,t){let i=[Jh[e]],n=0;const o=this.getDomain(),r=Math.min(...o.map(Qh)),s=Math.max(...o.map(Qh)),a=s-r;switch(e){case Zh.SECOND:a/Rs>1&&i.push(Jh[Zh.MINUTE]);case Zh.MINUTE:a/As>1&&i.push(Jh[Zh.HOUR]);case Zh.HOUR:n=i.length,a/_s>1&&i.push(Jh[Zh.WEEK_DAY]);case Zh.WEEK_DAY:if(a/Ps>1||t){const e=i.indexOf(Jh[Zh.WEEK_DAY]);e>-1&&i.splice(e,1,Jh[Zh.SHORT_MONTH])}case Zh.SHORT_MONTH:case Zh.MONTH:(a/ks>1||t)&&i.push(Jh[Zh.YEAR])}return n<i.length&&(i=[...i.slice(0,n),i.slice(n).join(" ")]),n>0&&(i=[...i.slice(0,n).reverse(),...i.slice(n)],n<i.length&&i.splice(n,0," ")),i.join("")}getLowestGranularityFormat(e){return this.second.floor(e)<e?Zh.MILLISECOND:this.minute.floor(e)<e?Zh.SECOND:this.hour.floor(e)<e?Zh.MINUTE:this.day.floor(e)<e?Zh.HOUR:this.month.floor(e)<e?this.week.floor(e)<e?Zh.WEEK_DAY:Zh.SHORT_MONTH:this.year.floor(e)<e?Zh.MONTH:Zh.YEAR}defaultTickFormat(e){const t=this.calculateDefaultTickFormat(e);return e=>Xp(t)(e)}getTickInterval({start:e,stop:t,count:i,minCount:n,maxCount:o}){const{tickIntervals:r}=this;let s,a;const l=null!==i&&void 0!==i?i:nd.defaultTickCount,c=Math.abs(t-e)/Math.max(l,1);let u=0;while(u<r.length&&c>r[u][2])u++;if(0===u)a=Math.max(Qu(e,t,l,n,o),1),s=this.millisecond;else if(u===r.length){const i=e/ks,r=t/ks;a=Qu(i,r,l,n,o),s=this.year}else{const e=c-r[u-1][2],t=r[u][2]-c,i=e<t?u-1:u;[s,a]=r[i]}return s.every(a)}invert(e){return new Date(super.invert(e))}ticks(){if(!this.domain||this.domain.length<2)return[];this.refresh();const[e,t]=this.getDomain().map(Qh);if(void 0!==this.interval)return this.getTicksForInterval({start:e,stop:t});if(this.nice){const{tickCount:e}=this;if(2===e)return this.niceDomain;if(1===e)return this.niceDomain.slice(0,1)}return this.getDefaultTicks({start:e,stop:t})}getDefaultTicks({start:e,stop:t}){const i=this.getTickInterval({start:e,stop:t,count:this.tickCount,minCount:this.minTickCount,maxCount:this.maxTickCount});return i?i.range(new Date(e),new Date(t)):[]}getTicksForInterval({start:e,stop:t}){const{interval:i,tickIntervals:n}=this;if(!i)return[];if(i instanceof Ss){const n=i.range(new Date(e),new Date(t));return this.isDenseInterval({start:e,stop:t,interval:i,count:n.length})?this.getDefaultTicks({start:e,stop:t}):n}const o=Math.abs(i);if(this.isDenseInterval({start:e,stop:t,interval:o}))return this.getDefaultTicks({start:e,stop:t});const r=[...n];r.reverse();const s=r.find((e=>o%e[2]===0));if(s){const i=s[0].every(o/(s[2]/s[1]));return i.range(new Date(e),new Date(t))}let a=new Date(e);const l=new Date(t),c=[];while(a<=l)c.push(a),a=new Date(a),a.setMilliseconds(a.getMilliseconds()+o);return c}tickFormat({ticks:e,specifier:t}){return void 0==t?this.defaultTickFormat(e):Xp(t)}update(){!this.domain||this.domain.length<2||this.nice&&this.updateNiceDomain()}updateNiceDomain(){const e=4;let[t,i]=this.domain;for(let n=0;n<e;n++){this.updateNiceDomainIteration(t,i);const[e,n]=this.niceDomain;if(Qh(t)===Qh(e)&&Qh(i)===Qh(n))break;t=e,i=n}}updateNiceDomainIteration(e,t){const i=Qh(e),n=Qh(t),{interval:o}=this;let r;if(o instanceof Ss)r=o;else{const e="number"===typeof o?(n-i)/Math.max(o,1):this.tickCount;r=this.getTickInterval({start:i,stop:n,count:e,minCount:this.minTickCount,maxCount:this.maxTickCount})}if(r){const i=r.range(e,t,!0),n=i[0],o=i[i.length-1];this.niceDomain=[n,o]}}}class tf{constructor(e=0,t=e,i=e,n=t){this.top=e,this.right=t,this.bottom=i,this.left=n}clear(){this.top=this.right=this.bottom=this.left=0}}fa([fl(Hl(0)),ga("design:type",Number)],tf.prototype,"top",void 0),fa([fl(Hl(0)),ga("design:type",Number)],tf.prototype,"right",void 0),fa([fl(Hl(0)),ga("design:type",Number)],tf.prototype,"bottom",void 0),fa([fl(Hl(0)),ga("design:type",Number)],tf.prototype,"left",void 0);var nf=Object.freeze({__proto__:null,extent:xa,normalisedExtent:Oa,normalisedExtentWithMetadata:Ta,toFixed:dl,isNumberEqual:ll,tickFormat:$u,interpolateString:Zp,ticks:Zu,tickStep:Qu,range:id,Color:hl,isString:Md,isStringObject:kd,isDate:Nd,isDiscrete:Ld,isContinuous:Id,checkDatum:Fd,isNumber:Gd,resetIds:Dc,createId:Rc,Padding:tf,jsonDiff:Ua,DELETE:za,jsonMerge:Ya,jsonApply:qa,jsonWalk:Xa,normalizeAngle360:Qa,normalizeAngle360Inclusive:el,normalizeAngle180:tl,toRadians:il,toDegrees:nl,angleBetween:ol,zipObject:ou,clamp:al,isEqual:ll,isNegative:cl,round:ul,mod:pl,sanitizeHtml:Pd,Logger:Pa});function of(e,t){return e.length===t.length&&e.every(((e,i)=>Number(e)===Number(t[i])))}function rf(e,t,i,n,o){let r=e.x;e.x<t?r=t:e.x>t+n&&(r=t+n);let s=e.y;e.y<i?s=i:e.y>i+o&&(s=i+o);const a=e.x-r,l=e.y-s,c=Math.sqrt(a*a+l*l);return c<=.5*e.size}function sf(e,t,i,n,o){const r=e.x+e.width>t&&e.x<t+n,s=e.y+e.height>i&&e.y<i+o;return r&&s}function af(e,t,i,n,o){return t+n<e.x+e.width&&t>e.x&&i>e.y&&i+o<e.y+e.height}function lf(e){return null!=e&&"object"===typeof e.point&&"object"===typeof e.label}function cf(e,t,i=5){const n=[];e=e.map((e=>e.slice().sort(((e,t)=>t.point.size-e.point.size))));for(let o=0;o<e.length;o++){const r=n[o]=[],s=e[o];if((null===s||void 0===s?void 0:s.length)&&s[0].label)for(let o=0,a=s.length;o<a;o++){const a=s[o],l=a.label,c=.5*a.point.size,u=a.point.x-.5*l.width,d=a.point.y-c-l.height-i,{width:p,height:h}=l,f=!t||af(t,u,d,p,h);if(!f)continue;const g=e.some((e=>e.some((e=>rf(e.point,u,d,p,h)))));if(g)continue;const v=n.some((e=>e.some((e=>sf(e,u,d,p,h)))));v||r.push({index:o,text:l.text,x:u,y:d,width:p,height:h,datum:a})}}return n}function uf(e,t){const i=[];for(let n=0;n<e.length;n++){const o=e[n],{point:{x:r,y:s},label:{text:a}}=o;let{label:{width:l,height:c}}=o;l+=null!==t&&void 0!==t?t:0,c+=null!==t&&void 0!==t?t:0;const u=i.some((e=>sf(e,r,s,l,c)));if(u)return!0;
18i.push({index:n,text:a,x:r,y:s,width:l,height:c,datum:o})}return!1}const df=["stroke","lineDash"],pf=vl(ml(void 0,(e=>{for(const t in e)if(!df.includes(t))return!1;return!0})),"expecting an Array of objects with gridline style properties such as 'stroke' and 'lineDash'");class hf{constructor(){this.enabled=!0,this.width=1,this.style=[{stroke:void 0,lineDash:[]}]}}function ff(e,t=[void 0]){return Ba(((i,n,o)=>t.includes(o)?e:o))}fa([fl(Dl),ga("design:type",Object)],hf.prototype,"enabled",void 0),fa([fl(Hl(0)),ga("design:type",Number)],hf.prototype,"width",void 0),fa([fl(pf),ga("design:type",Array)],hf.prototype,"style",void 0);class gf{constructor(){this.enabled=!0,this.autoWrap=!1,this.maxWidth=void 0,this.maxHeight=void 0,this.fontStyle=void 0,this.fontWeight=void 0,this.fontSize=12,this.fontFamily="Verdana, sans-serif",this.padding=5,this.minSpacing=NaN,this.color="rgba(87, 87, 87, 1)",this.rotation=void 0,this.avoidCollisions=!0,this.mirrored=!1,this.parallel=!1,this.formatter=void 0}getSideFlag(){return this.mirrored?1:-1}getFont(){return qc(this)}}fa([fl(Dl),ga("design:type",Object)],gf.prototype,"enabled",void 0),fa([fl(Rl),ga("design:type",Boolean)],gf.prototype,"autoWrap",void 0),fa([fl(Wl(0)),ga("design:type",Number)],gf.prototype,"maxWidth",void 0),fa([fl(Wl(0)),ga("design:type",Number)],gf.prototype,"maxHeight",void 0),fa([fl(Jl),ga("design:type",String)],gf.prototype,"fontStyle",void 0),fa([fl(ec),ga("design:type",String)],gf.prototype,"fontWeight",void 0),fa([fl(Hl(1)),ga("design:type",Number)],gf.prototype,"fontSize",void 0),fa([fl(Al),ga("design:type",String)],gf.prototype,"fontFamily",void 0),fa([fl(Hl(0)),ga("design:type",Number)],gf.prototype,"padding",void 0),fa([fl(Ul()),ff(NaN),ga("design:type",Number)],gf.prototype,"minSpacing",void 0),fa([fl(Gl),ga("design:type",String)],gf.prototype,"color",void 0),fa([fl(Wl(-360,360)),ga("design:type",Number)],gf.prototype,"rotation",void 0),fa([fl(Dl),ga("design:type",Boolean)],gf.prototype,"avoidCollisions",void 0),fa([fl(Dl),ga("design:type",Boolean)],gf.prototype,"mirrored",void 0),fa([fl(Dl),ga("design:type",Boolean)],gf.prototype,"parallel",void 0),fa([fl(_l),ga("design:type",String)],gf.prototype,"format",void 0);class vf{constructor(){this.enabled=!0,this.width=1,this.color=void 0}}fa([fl(Dl),ga("design:type",Object)],vf.prototype,"enabled",void 0),fa([fl(Hl(0)),ga("design:type",Number)],vf.prototype,"width",void 0),fa([fl(Gl),ga("design:type",String)],vf.prototype,"color",void 0);const yf=vl(((e,t)=>yl(e,t,((e,t)=>0!==e&&Hl(0)(e,t)||e instanceof Ss))),"expecting an optional non-zero positive Number value or, for a time axis, a Time Interval such as 'agCharts.time.month'");class mf{constructor(){this.enabled=!0,this.width=1,this.size=6,this.color=void 0,this.interval=void 0,this.values=void 0,this.minSpacing=NaN}}function Cf(e){const t=Math.min(...e.range),i=Math.max(...e.range),n=Math.floor(t),o=Math.ceil(i),r=n!==o;return{min:n,max:o,visible:r}}fa([fl(Dl),ga("design:type",Object)],mf.prototype,"enabled",void 0),fa([fl(Hl(0)),ga("design:type",Number)],mf.prototype,"width",void 0),fa([fl(Hl(0)),ga("design:type",Number)],mf.prototype,"size",void 0),fa([fl(Gl),ga("design:type",String)],mf.prototype,"color",void 0),fa([fl(yf),ga("design:type",Object)],mf.prototype,"interval",void 0),fa([fl(Cl()),ga("design:type",Array)],mf.prototype,"values",void 0),fa([fl(bl(Ul(1),El("maxSpacing"))),ff(NaN),ga("design:type",Number)],mf.prototype,"minSpacing",void 0);const bf=2*Math.PI,wf=bf/2;function Sf(e,t){const i=Math.abs(t-e);return i<wf?t:e>t?t+bf:t-bf}function Ef(e){const t=t=>{var i,n;const o=Math.min(...null!==(i=t.range)&&void 0!==i?i:[e.min]),r=Math.max(...null!==(n=t.range)&&void 0!==n?n:[e.max]),s=Math.round(t.translationY);return s<o||s>r},i=(e,i,n)=>"removed"!==n&&t(e)?"removed":"added"!==n&&t(i)?"added":n,n=(e,t,n)=>{const o={translationY:Math.round(e.translationY),opacity:e.opacity};return n=i(t,e.datum,n),"added"===n&&(o.translationY=Math.round(t.translationY),o.opacity=0),Object.assign(Object.assign({},o),Ou[n])},o=(e,t,i)=>{const n={translationY:Math.round(t.translationY),opacity:1};return"removed"===i&&(n.opacity=0),n},r={fromFn:n,toFn:o,intermediateFn:(e,i,n)=>({visible:!t(e)})},s={fromFn:(e,t,i)=>{var o;const r=null!==(o=e.previousDatum)&&void 0!==o?o:t;let s=r.rotation;return"added"!==i&&"removed"!==i||(s=t.rotation),Object.assign(Object.assign({},n(e,t,i)),{x:r.x,y:r.y,rotation:s,rotationCenterX:r.rotationCenterX})},toFn:(e,t,i)=>{var n,r;let s;return s="added"===i||"removed"===i?t.rotation:Sf(null!==(r=null===(n=e.previousDatum)||void 0===n?void 0:n.rotation)&&void 0!==r?r:t.rotation,t.rotation),Object.assign(Object.assign({},o(e,t,i)),{x:t.x,y:t.y,rotation:s,rotationCenterX:t.rotationCenterX,finish:{rotation:t.rotation}})}},a={fromFn:(e,t)=>{var i,n;return Object.assign(Object.assign({},null!==(n=null!==(i=e.previousDatum)&&void 0!==i?i:t)&&void 0!==n?n:{y:e.y,x1:e.x1,x2:e.x2}),Ou["updated"])},toFn:(e,t)=>Object.assign({},t)},l={fromFn:(e,t)=>{const{rotation:i,translationX:n,translationY:o}=e;return Object.assign({rotation:i,translationX:n,translationY:o},Ou["updated"])},toFn:(e,t)=>{const{rotation:i,translationX:n,translationY:o}=t;return{rotation:i,translationX:n,translationY:o}}};return{tick:r,line:a,label:s,group:l}}function xf(){return(e,t)=>({rotation:t.rotation,rotationCenterX:t.rotationCenterX,rotationCenterY:t.rotationCenterY,translationX:t.translationX,translationY:t.translationY})}function Of(e){const{visible:t,min:i,max:n}=e;return(e,o)=>{const r=Math.round(o.translationY),s=t&&r>=i&&r<=n;return{translationY:r,opacity:1,visible:s}}}function Tf(){return(e,t)=>({x:t.x,y:t.y,translationY:t.translationY,rotation:t.rotation,rotationCenterX:t.rotationCenterX})}function Df(){return(e,t)=>Object.assign({},t)}var Rf,Af,_f;(function(e){e[e["TickLine"]=0]="TickLine",e[e["TickLabel"]=1]="TickLabel",e[e["GridLine"]=2]="GridLine",e[e["GridArc"]=3]="GridArc",e[e["AxisLine"]=4]="AxisLine"})(Rf||(Rf={})),function(e){e[e["CREATE"]=0]="CREATE",e[e["CREATE_SECONDARY"]=1]="CREATE_SECONDARY",e[e["FILTER"]=2]="FILTER",e[e["VALUES"]=3]="VALUES"}(Af||(Af={}));
18class Pf{get type(){var e;return null!==(e=this.constructor.type)&&void 0!==e?e:""}set crossLines(e){var t,i;null===(t=this._crossLines)||void 0===t||t.forEach((e=>this.detachCrossLine(e))),e&&this.assignCrossLineArrayConstructor(e),this._crossLines=e,null===(i=this._crossLines)||void 0===i||i.forEach((e=>{this.attachCrossLine(e),this.initCrossLine(e)}))}get crossLines(){return this._crossLines}constructor(e,t){let i;this.moduleCtx=e,this.scale=t,this.id=Rc(this),this.nice=!0,this.dataDomain={domain:[],clipped:!1},this.keys=[],this.boundSeries=[],this.includeInvisibleDomains=!1,this.axisGroup=new ad({name:`${this.id}-axis`,zIndex:rp.AXIS_ZINDEX}),this.lineNode=this.axisGroup.appendChild(new cd),this.tickLineGroup=this.axisGroup.appendChild(new ad({name:`${this.id}-Axis-tick-lines`,zIndex:rp.AXIS_ZINDEX})),this.tickLabelGroup=this.axisGroup.appendChild(new ad({name:`${this.id}-Axis-tick-labels`,zIndex:rp.AXIS_ZINDEX})),this.crossLineGroup=new ad({name:`${this.id}-CrossLines`}),this.gridGroup=new ad({name:`${this.id}-Axis-grid`}),this.gridLineGroup=this.gridGroup.appendChild(new ad({name:`${this.id}-gridLines`,zIndex:rp.AXIS_GRID_ZINDEX})),this.tickLineGroupSelection=ld.select(this.tickLineGroup,cd,!1),this.tickLabelGroupSelection=ld.select(this.tickLabelGroup,Kc,!1),this.gridLineGroupSelection=ld.select(this.gridLineGroup,cd,!1),this.line=new vf,this.tick=this.createTick(),this.gridLine=new hf,this.label=this.createLabel(),this.defaultTickMinSpacing=Pf.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=void 0,this._titleCaption=new iu,this._gridLength=0,this.fractionDigits=0,this.gridPadding=0,this.seriesAreaPadding=0,this.tickGenerationResult=void 0,this.maxThickness=1/0,this.moduleMap=new up(this),this.refreshScale(),this._titleCaption.node.rotation=-Math.PI/2,this.axisGroup.appendChild(this._titleCaption.node),this.destroyFns.push(e.interactionManager.addListener("hover",(e=>this.checkAxisHover(e)))),this.animationManager=e.animationManager,this.animationState=new fh("empty",{empty:{update:{target:"ready",action:()=>this.resetSelectionNodes()}},ready:{update:e=>this.animateReadyUpdate(e),resize:()=>this.resetSelectionNodes()}}),this._crossLines=[],this.assignCrossLineArrayConstructor(this._crossLines),this.destroyFns.push(e.layoutService.addListener("layout-complete",(e=>{null!=i&&null!=Ua(e.chart,i)&&this.animationState.transition("resize"),i=Object.assign({},e.chart)}))),this.destroyFns.push(e.updateService.addListener("update-complete",(e=>{this.minRect=e.minRect})))}attachCrossLine(e){this.crossLineGroup.appendChild(e.group)}detachCrossLine(e){this.crossLineGroup.removeChild(e.group)}destroy(){this.moduleMap.destroy(),this.destroyFns.forEach((e=>e()))}refreshScale(){var e;this.range=this.scale.range.slice(),null===(e=this.crossLines)||void 0===e||e.forEach((e=>{this.initCrossLine(e)}))}updateRange(){var e;const{range:t,visibleRange:i,scale:n}=this,o=(t[1]-t[0])/(i[1]-i[0]),r=o*i[0],s=t[0]-r;n.range=[s,s+o],null===(e=this.crossLines)||void 0===e||e.forEach((e=>{e.clippedRange=[t[0],t[1]]}))}setCrossLinesVisible(e){this.crossLineGroup.visible=e}attachAxis(e,t){t.appendChild(this.gridGroup),e.appendChild(this.axisGroup),e.appendChild(this.crossLineGroup)}detachAxis(e,t){t.removeChild(this.gridGroup),e.removeChild(this.axisGroup),e.removeChild(this.crossLineGroup)}inRange(e,t=0,i=0){const n=Math.min(...this.range),o=Math.max(...this.range);return e+t>=n-i&&e<=o+i}onLabelFormatChange(e,t){const{scale:i,fractionDigits:n}=this,o=i instanceof $h,r=!o&&n>0?e=>"number"===typeof e?e.toFixed(n):String(e):e=>String(e);if(t&&i&&i.tickFormat)try{this.labelFormatter=i.tickFormat({ticks:e,specifier:t})}catch(s){this.labelFormatter=r,Pa.warnOnce(`the axis label format string ${t} is invalid. No formatting will be applied`)}else this.labelFormatter=r}setDomain(){var e;const{scale:t,dataDomain:{domain:i},tick:{values:n}}=this;if(n&&nd.is(t)){const[o,r]=null!==(e=xa(n))&&void 0!==e?e:[1/0,-1/0],s=Math.min(t.fromDomain(i[0]),o),a=Math.max(t.fromDomain(i[1]),r);t.domain=[t.toDomain(s),t.toDomain(a)]}else t.domain=i}setTickInterval(e){var t;this.scale.interval=null!==(t=this.tick.interval)&&void 0!==t?t:e}setTickCount(e,t,i){const{scale:n}=this;if(e&&nd.is(n))return"number"===typeof e?(n.tickCount=e,n.minTickCount=null!==t&&void 0!==t?t:0,void(n.maxTickCount=null!==i&&void 0!==i?i:1/0)):void(n instanceof ef&&this.setTickInterval(e))}set gridLength(e){var t;(this._gridLength&&!e||!this._gridLength&&e)&&this.gridLineGroupSelection.clear(),this._gridLength=e,null===(t=this.crossLines)||void 0===t||t.forEach((e=>{this.initCrossLine(e)}))}get gridLength(){return this._gridLength}createTick(){return new mf}createLabel(){return new gf}checkAxisHover(e){const t=this.computeBBox(),i=t.containsPoint(e.offsetX,e.offsetY);i&&this.moduleCtx.chartEventManager.axisHover(this.id,this.direction)}update(e){if(!this.tickGenerationResult)return;const{rotation:t,parallelFlipRotation:i,regularFlipRotation:n}=this.calculateRotations(),o=this.label.getSideFlag();this.updatePosition();const r=this.getAxisLineCoordinates(),s=this.tickGenerationResult,{tickData:a,combinedRotation:l,textBaseline:c,textAlign:u}=s,d=ha(s,["tickData","combinedRotation","textBaseline","textAlign"]),p=this.tickLabelGroupSelection.nodes().map((e=>e.datum.tickId));if(this.updateSelections(r,a.ticks,{combinedRotation:l,textAlign:u,textBaseline:c,range:this.scale.range}),this.animationManager.isSkipped())this.resetSelectionNodes();else{const e=this.calculateUpdateDiff(p,a);this.animationState.transition("update",e)}return this.updateAxisLine(),this.updateLabels(),this.updateVisibility(),this.updateGridLines(o),this.updateTickLine
18s(),this.updateTitle({anyTickVisible:a.ticks.length>0}),this.updateCrossLines({rotation:t,parallelFlipRotation:i,regularFlipRotation:n}),this.updateLayoutState(),e=d.primaryTickCount,e}getAxisLineCoordinates(){const{range:[e,t]}=this,i=0,n=Math.min(e,t),o=Math.max(e,t);return{x:i,y1:n,y2:o}}getTickLineCoordinates(e){const{tick:t,label:i}=this,n=i.getSideFlag(),o=n*t.size,r=Math.min(0,o),s=r+Math.abs(o),a=Math.round(e.translationY);return{x1:r,x2:s,y:a}}getTickLabelProps(e,t){const{label:i}=this,{combinedRotation:n,textBaseline:o,textAlign:r,range:s}=t,a=e.tickLabel,l=i.getSideFlag(),c=this.tick.size,u=l*(c+i.padding+this.seriesAreaPadding),d=""!==a&&void 0!=a;return{tickId:e.tickId,translationY:e.translationY,fill:i.color,fontFamily:i.fontFamily,fontSize:i.fontSize,fontStyle:i.fontStyle,fontWeight:i.fontWeight,rotation:n,rotationCenterX:u,text:a,textAlign:r,textBaseline:o,visible:d,x:u,y:0,range:s}}setTitleProps(e,t){var i;const{title:n}=this;if(n){if(e.color=n.color,e.fontFamily=n.fontFamily,e.fontSize=n.fontSize,e.fontStyle=n.fontStyle,e.fontWeight=n.fontWeight,e.enabled=n.enabled,e.wrapping=n.wrapping,n.enabled){const o=e.node,{tickSpace:r}=t,s=(null!==(i=n.spacing)&&void 0!==i?i:0)+r,a=this.label.getSideFlag(),l=Qa(this.rotation),c=-1===a&&l>Math.PI&&l<2*Math.PI?-1:1,u=c*a*Math.PI/2,d=1===c?"bottom":"top",{range:p}=this,h=Math.floor(c*a*(p[0]+p[1])/2),f=-1===a?Math.floor(c*-s):Math.floor(-s),{callbackCache:g}=this.moduleCtx,{formatter:v=(e=>e.defaultValue)}=n,y=g.call(v,this.getTitleFormatterParams());o.setProperties({rotation:u,text:y,textBaseline:d,visible:!0,x:h,y:f})}}else e.enabled=!1}calculateLayout(e){var t;const{rotation:i,parallelFlipRotation:n,regularFlipRotation:o}=this.calculateRotations(),r=this.label.getSideFlag(),s=r*(this.tick.size+this.label.padding+this.seriesAreaPadding);this.updateScale(),this.tickGenerationResult=this.generateTicks({primaryTickCount:e,parallelFlipRotation:n,regularFlipRotation:o,labelX:s,sideFlag:r});const a=this.tickGenerationResult,{tickData:l,combinedRotation:c,textBaseline:u,textAlign:d}=a,p=ha(a,["tickData","combinedRotation","textBaseline","textAlign"]),h=[],{x:f,y1:g,y2:v}=this.getAxisLineCoordinates(),y=new Pc(f,g,0,v-g);h.push(y);const{tick:m}=this;m.enabled&&l.ticks.forEach((e=>{const{x1:t,x2:i,y:n}=this.getTickLineCoordinates(e),o=new Pc(t,n,i-t,0);h.push(o)}));const{label:C}=this;if(C.enabled){const e=new Kc;l.ticks.forEach((t=>{const i=this.getTickLabelProps(t,{combinedRotation:c,textAlign:d,textBaseline:u,range:this.scale.range});if(!i.visible)return;e.setProperties(Object.assign(Object.assign({},i),{translationY:Math.round(t.translationY)}));const n=e.computeTransformedBBox();n&&h.push(n)}))}const b=e=>{const t=new Mc,{rotation:i,translationX:n,translationY:o,rotationCenterX:r,rotationCenterY:s}=this.getAxisTransform();return Mc.updateTransformMatrix(t,1,1,i,n,o,{scalingCenterX:0,scalingCenterY:0,rotationCenterX:r,rotationCenterY:s}),t.transformBBox(e)},{title:w}=this;if(null===w||void 0===w?void 0:w.enabled){const e=new iu;let t=0;if(l.ticks.length>0){const e=Pc.merge(h),i=e.width;isFinite(i)&&(t+=i)}this.setTitleProps(e,{tickSpace:t});const i=e.node,n=i.computeTransformedBBox();n&&h.push(n)}const S=Pc.merge(h),E=b(S),x=this.isAnySeriesActive();return null===(t=this.crossLines)||void 0===t||t.forEach((e=>{var t;e.sideFlag=-r,e.direction=i===-Math.PI/2?mc.X:mc.Y,e instanceof qh&&(e.label.parallel=null!==(t=e.label.parallel)&&void 0!==t?t:this.label.parallel),e.parallelFlipRotation=n,e.regularFlipRotation=o,e.calculateLayout(x)})),this.updateLayoutState(),e=p.primaryTickCount,{primaryTickCount:e,bbox:E}}updateLayoutState(){this.layout.label={fractionDigits:this.fractionDigits,padding:this.label.padding,format:this.label.format}}updateScale(){this.updateRange(),this.calculateDomain(),this.setDomain(),this.setTickInterval(this.tick.interval);const{scale:e,nice:t}=this;nd.is(e)&&(e.nice=t,e.update())}calculateRotations(){const e=il(this.rotation),t=Qa(e),i=Qa(e-Math.PI/2);return{rotation:e,parallelFlipRotation:t,regularFlipRotation:i}}generateTicks({primaryTickCount:e,parallelFlipRotation:t,regularFlipRotation:i,labelX:n,sideFlag:o}){var r;const{scale:s,tick:a,label:{parallel:l,rotation:c,fontFamily:u,fontSize:d,fontStyle:p,fontWeight:h}}=this,f=void 0!==e,{defaultRotation:g,configuredRotation:v,parallelFlipFlag:y,regularFlipFlag:m}=ep({rotation:c,parallel:l,regularFlipRotation:i,parallelFlipRotation:t}),C=v+g,b=new Mc,{maxTickCount:w}
18=this.estimateTickCount({minSpacing:a.minSpacing,maxSpacing:null!==(r=a.maxSpacing)&&void 0!==r?r:NaN}),S=nd.is(s),E=!S||isNaN(w)?10:w;let x=np(l,v,0,o,m);const O=ip(l,v,o,y),T={fontFamily:u,fontSize:d,fontStyle:p,fontWeight:h,textBaseline:O,textAlign:x};let D={rawTicks:[],ticks:[],labelCount:0},R=0,A=0,_=!0,P=!1;while(_&&R<=E){if(P)break;A=0,x=np(l,v,0,o,m);const t=this.getTickStrategies({secondaryAxis:f,index:R});for(const i of t){({tickData:D,index:R,autoRotation:A,terminate:P}=i({index:R,tickData:D,textProps:T,labelOverlap:_,terminate:P,primaryTickCount:e}));const t=0!==v||0!==A,r=C+A;x=np(l,v,A,o,m),_=this.checkLabelOverlap(r,t,b,D.ticks,n,Object.assign(Object.assign({},T),{textAlign:x}))}}const M=g+v+A;return!f&&D.rawTicks.length>0&&(e=D.rawTicks.length),{tickData:D,primaryTickCount:e,combinedRotation:M,textBaseline:O,textAlign:x}}getTickStrategies({index:e,secondaryAxis:t}){const{scale:i,label:n,tick:o}=this,r=nd.is(i),s=n.enabled&&n.avoidCollisions,a=!r&&0!==e&&s,l=!0===n.autoRotate&&void 0===n.rotation,c=[];let u;u=this.tick.values?Af.VALUES:t?Af.CREATE_SECONDARY:a?Af.FILTER:Af.CREATE;const d=({index:e,tickData:t,primaryTickCount:i,terminate:n})=>this.createTickData(u,e,t,n,i);if(c.push(d),!r&&!isNaN(o.minSpacing)){const e=({index:e,tickData:t,primaryTickCount:i,terminate:n})=>this.createTickData(Af.FILTER,e,t,n,i);c.push(e)}if(!s)return c;if(n.autoWrap){const e=({index:e,tickData:t,textProps:i})=>this.wrapLabels(t,e,i);c.push(e)}else if(l){const e=({index:e,tickData:t,labelOverlap:i,terminate:n})=>({index:e,tickData:t,autoRotation:this.getAutoRotation(i),terminate:n});c.push(e)}return c}createTickData(e,t,i,n,o){var r;const{scale:s,tick:a}=this,{maxTickCount:l,minTickCount:c,defaultTickCount:u}=this.estimateTickCount({minSpacing:a.minSpacing,maxSpacing:null!==(r=a.maxSpacing)&&void 0!==r?r:NaN}),d=nd.is(s),p=!d||isNaN(l)?10:l;let h=d?Math.max(u-t,c):l;const f=void 0===a.interval&&void 0===a.values&&h>c&&(d||e===Af.FILTER);let g=!0;while(g&&t<=p){const n=i.rawTicks;h=d?Math.max(u-t,c):l;const{rawTicks:r,ticks:s,labelCount:a}=this.getTicks({tickGenerationType:e,previousTicks:n,tickCount:h,minTickCount:c,maxTickCount:l,primaryTickCount:o});i.rawTicks=r,i.ticks=s,i.labelCount=a,g=!!f&&of(r,n),t++}const v=void 0!==a.interval||void 0!==a.values;return n||(n=v),{tickData:i,index:t,autoRotation:0,terminate:n}}checkLabelOverlap(e,t,i,n,o,r){Mc.updateTransformMatrix(i,1,1,e,0,0);const s=this.createLabelData(n,o,r,i),a=tp(this.label.minSpacing,t);return uf(s,a)}createLabelData(e,t,i,n){const o=[];for(const r of e){const{tickLabel:e,translationY:s}=r;if(""===e||void 0==e)continue;const a=Qc(e),{width:l,height:c}=Xc(a,t,s,i),u=new Pc(t,s,l,c),d=op(e,u,t,s,n);o.push(d)}return o}getAutoRotation(e){var t;return e?Qa(il(null!==(t=this.label.autoRotateAngle)&&void 0!==t?t:0)):0}getTicks({tickGenerationType:e,previousTicks:t,tickCount:i,minTickCount:n,maxTickCount:o,primaryTickCount:r}){var s;const{range:a,scale:l,visibleRange:c}=this;let u=[];switch(e){case Af.VALUES:u=this.tick.values;break;case Af.CREATE_SECONDARY:u=this.updateSecondaryAxisTicks(r);break;case Af.FILTER:u=this.filterTicks(t,i);break;default:u=this.createTicks(i,n,o);break}this.onLabelFormatChange(u,this.label.format),this.fractionDigits=u.fractionDigits>=0?u.fractionDigits:0;const d=(null!==(s=l.bandwidth)&&void 0!==s?s:0)/2,p=[];let h=0;const f=new Map,g=Math.max(0,Math.floor(c[0]*u.length)),v=Math.min(u.length,Math.ceil(c[1]*u.length));for(let y=g;y<v;y++){const e=u[y],t=l.convert(e)+d;if(a.length>0&&!this.inRange(t,0,.001))continue;const i=this.formatTick(e,y);let n=i;if(f.has(n)){const e=f.get(n);f.set(n,e+1),n=`${n}_${e}`}else f.set(n,1);p.push({tick:e,tickId:n,tickLabel:i,translationY:t}),""!==i&&void 0!=i&&h++}return{rawTicks:u,ticks:p,labelCount:h}}filterTicks(e,t){var i;const n=!isNaN(this.tick.minSpacing)||!isNaN(null!==(i=this.tick.maxSpacing)&&void 0!==i?i:NaN),o=n?Math.ceil(e.length/t):2;return e.filter(((e,t)=>t%o===0))}createTicks(e,t,i){var n,o,r;return this.setTickCount(e,t,i),null!==(r=null===(o=(n=this.scale).ticks)||void 0===o?void 0:o.call(n))&&void 0!==r?r:[]}estimateTickCount({minSpacing:e,maxSpacing:t}){const{minRect:i}=this,n=this.calculateRangeWithBleed(),o=Math.max(this.defaultTickMinSpacing,n/nd.defaultMaxTickCount);let r=!isNaN(t);
18isNaN(e)&&(e=o),isNaN(t)&&(t=n),e>t&&(e===o?e=t:t=e);const s=i?this.direction===mc.X?i.width:i.height:1;r&&(r=s<o);const a=al(1,Math.floor(n/e),r?Math.floor(n/s):1/0),l=Math.min(a,Math.ceil(n/t)),c=al(l,nd.defaultTickCount,a);return{minTickCount:l,maxTickCount:a,defaultTickCount:c}}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}){var n;const o=this.label.getSideFlag(),r=this.isAnySeriesActive();null===(n=this.crossLines)||void 0===n||n.forEach((n=>{var s;n.sideFlag=-o,n.direction=e===-Math.PI/2?mc.X:mc.Y,n instanceof qh&&(n.label.parallel=null!==(s=n.label.parallel)&&void 0!==s?s:this.label.parallel),n.parallelFlipRotation=t,n.regularFlipRotation=i,n.update(r)}))}updateTickLines(){const{tick:e,label:t}=this,i=t.getSideFlag();this.tickLineGroupSelection.each((t=>{t.strokeWidth=e.width,t.stroke=e.color,t.x1=i*e.size,t.x2=0,t.y1=0,t.y2=0}))}calculateAvailableRange(){const{range:e}=this,t=Math.min(...e),i=Math.max(...e);return i-t}calculateRangeWithBleed(){const{visibleRange:e}=this,t=1/(e[1]-e[0]);return ul(this.calculateAvailableRange()*t,2)}calculateDomain(){if(this.linkedTo)this.dataDomain=this.linkedTo.dataDomain;else{const e=this.boundSeries.filter((e=>this.includeInvisibleDomains||e.isEnabled())),t=e.flatMap((e=>e.getDomain(this.direction)));this.dataDomain=this.normaliseDataDomain(t)}}getAxisTransform(){return{rotation:il(this.rotation),rotationCenterX:0,rotationCenterY:0,translationX:this.translation.x,translationY:this.translation.y}}updatePosition(){const{crossLineGroup:e,axisGroup:t,gridGroup:i,translation:n,gridLineGroupSelection:o,gridPadding:r,gridLength:s}=this,{rotation:a}=this.calculateRotations(),l=this.label.getSideFlag(),c=Math.floor(n.x),u=Math.floor(n.y);e.setProperties({rotation:a,translationX:c,translationY:u}),t.datum=this.getAxisTransform(),i.setProperties({rotation:a,translationX:c,translationY:u}),o.each((e=>{e.x1=r,e.x2=-l*s+r,e.y=0}))}updateSecondaryAxisTicks(e){throw new 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 cd({tag:Rf.GridLine}))),(e=>e.tickId)),this.tickLineGroupSelection.update(t,(e=>e.appendChild(new cd({tag:Rf.TickLine}))),(e=>e.tickId)),this.tickLabelGroupSelection.update(t.map((e=>this.getTickLabelProps(e,i))),(e=>e.appendChild(new Kc({tag:Rf.TickLabel}))),(e=>e.tickId))}updateAxisLine(){const{line:e}=this,t=e.enabled?e.width:0;this.lineNode.setProperties({stroke:e.color,strokeWidth:t})}updateGridLines(e){const{gridLine:{style:t,width:i},gridPadding:n,gridLength:o}=this;0!==o&&0!==t.length&&this.gridLineGroupSelection.each(((r,s,a)=>{const{stroke:l,lineDash:c}=t[a%t.length];r.setProperties({x1:n,x2:-e*o+n,y:0,fill:void 0,stroke:l,strokeWidth:i,lineDash:c})}))}updateLabels(){const{label:e}=this;e.enabled&&this.tickLabelGroupSelection.each(((e,t)=>{e.setProperties(t,["fill","fontFamily","fontSize","fontStyle","fontWeight","text","textAlign","textBaseline"])}))}wrapLabels(e,t,i){const{parallel:n,maxWidth:o,maxHeight:r}=this.label;let s=this.maxThickness,a=Math.round(this.calculateAvailableRange()/e.labelCount);return n&&([s,a]=[a,s]),e.ticks.forEach((e=>{e.tickLabel=Kc.wrap(e.tickLabel,null!==o&&void 0!==o?o:s,null!==r&&void 0!==r?r:a,i,"hyphenate")})),{tickData:e,index:t,autoRotation:0,terminate:!0}}updateTitle(e){const{rotation:t,title:i,_titleCaption:n,lineNode:o,tickLineGroup:r,tickLabelGroup:s}=this;if(!i)return void(n.enabled=!1);let a=0;const{anyTickVisible:l}=e;if(i.enabled&&l){const e=ad.computeBBox([r,s,o]),i=0===t?e.width:e.height;Math.abs(i)<1/0&&(a+=i)}this.setTitleProps(n,{tickSpace:a})}formatTick(e,t){var i,n;const{label:o,labelFormatter:r,fractionDigits:s,moduleCtx:{callbackCache:a}}=this;if(o.formatter){const n=s>0?e:String(e);return null!==(i=a.call(o.formatter,{value:n,index:t,fractionDigits:s,formatter:r}))&&void 0!==i?i:n}return r&&null!==(n=a.call(r,e))&&void 0!==n?n:String(e)}formatDatum(e){return String(e)}computeBBox(){return this.axisGroup.computeBBox()}initCrossLine(e){e.scale=this.scale,e.gridLength=this.gridLength}isAnySeriesActive(){return this.boundSeries.some((e=>this.includeInvisibleDomains||e.isEnabled()))}clipTickLines(e,t,i,n){this.tickLineGroup.setClipRectInGroupCoordinateSpace(new Pc(e,t,i,n))}clipGrid(e,t,i,n){this.gridGroup.setClipRectInGroupCoordinateSpace(new Pc(e,t,i,n))}calculatePadding(e,t){return[Math.abs(.01*e),Math.abs(.01*e)]}getTitleFormatterParams(){var e;const t=this.boundSeries.reduce(((e,t)=>{const i=t.getKeys(this.direction),n=t.getNames(this.direction);for(let o=0;o<i.length;
18o++)e.push({key:i[o],name:n[o]});return e}),[]);return{direction:this.direction,boundSeries:t,defaultValue:null===(e=this.title)||void 0===e?void 0:e.text}}normaliseDataDomain(e){return{domain:e,clipped:!1}}getLayoutState(){return Object.assign({rect:this.computeBBox(),gridPadding:this.gridPadding,seriesAreaPadding:this.seriesAreaPadding,tickSize:this.tick.size},this.layout)}getModuleMap(){return this.moduleMap}createModuleContext(){var e;return null!==(e=this.axisContext)&&void 0!==e||(this.axisContext=this.createAxisContext()),Object.assign(Object.assign({},this.moduleCtx),{parent:this.axisContext})}createAxisContext(){return{axisId:this.id,direction:this.direction,continuous:nd.is(this.scale),keys:()=>this.boundSeries.flatMap((e=>e.getKeys(this.direction))),scaleValueFormatter:e=>{var t,i;return null===(i=(t=this.scale).tickFormat)||void 0===i?void 0:i.call(t,{specifier:e})},scaleBandwidth:()=>{var e;return null!==(e=this.scale.bandwidth)&&void 0!==e?e:0},scaleConvert:e=>this.scale.convert(e),scaleInvert:e=>{var t,i;return null===(i=(t=this.scale).invert)||void 0===i?void 0:i.call(t,e)}}}animateReadyUpdate(e){const{animationManager:t}=this.moduleCtx,i=Cf(this),n=Ef(i);Tu(this.id,"axis-group",t,[this.axisGroup],n.group),Tu(this.id,"line",t,[this.lineNode],n.line),Tu(this.id,"line-paths",t,[this.gridLineGroupSelection,this.tickLineGroupSelection],n.tick,((e,t)=>t.tickId),e),Tu(this.id,"tick-labels",t,[this.tickLabelGroupSelection],n.label,((e,t)=>t.tickId),e)}resetSelectionNodes(){const{gridLineGroupSelection:e,tickLineGroupSelection:t,tickLabelGroupSelection:i,lineNode:n}=this,o=Cf(this);dh([this.axisGroup],xf()),dh([e,t],Of(o)),dh([i],Tf()),dh([n],Df())}calculateUpdateDiff(e,t){const i=new Set,n=new Set,o=Math.max(e.length,t.ticks.length);for(let r=0;r<o;r++){const o=t.ticks[r],s=e[r],a=null===o||void 0===o?void 0:o.tickId;s!==a&&(n.has(a)?n.delete(a):a&&i.add(a),i.has(s)?i.delete(s):s&&n.add(s))}return{changed:i.size>0||n.size>0,added:[...i.values()],removed:[...n.values()]}}}Pf.defaultTickMinSpacing=50,fa([fl(Dl),ga("design:type",Boolean)],Pf.prototype,"nice",void 0),fa([fl(Yl),ga("design:type",Array)],Pf.prototype,"keys",void 0);class Mf extends gf{constructor(){super(...arguments),this.autoRotateAngle=335}}fa([fl(Rl),ga("design:type",Boolean)],Mf.prototype,"autoRotate",void 0),fa([fl(Hl(-360,360)),ga("design:type",Number)],Mf.prototype,"autoRotateAngle",void 0);class kf extends Pf{constructor(){super(...arguments),this.thickness=0,this.position="left"}get direction(){return["top","bottom"].includes(this.position)?mc.X:mc.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;break}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 Object.assign(Object.assign({},super.createAxisContext()),{position:this.position})}assignCrossLineArrayConstructor(e){Th(e,qh)}createLabel(){return new Mf}}fa([fl(Hl(0)),ga("design:type",Number)],kf.prototype,"thickness",void 0),fa([fl(lc),ga("design:type",String)],kf.prototype,"position",void 0);class Nf extends kf{constructor(e){super(e,new sl),this._paddingOverrideEnabled=!1,this.groupPaddingInner=.1,this.includeInvisibleDomains=!0}set paddingInner(e){this._paddingOverrideEnabled=!0,this.scale.paddingInner=e}get paddingInner(){return this._paddingOverrideEnabled=!0,this.scale.paddingInner}set paddingOuter(e){this.scale.paddingOuter=e}get paddingOuter(){return this.scale.paddingOuter}normaliseDataDomain(e){const t=[],i=new Set;for(const n of e){const e=n instanceof Date?n.getTime():n;i.has(e)||(i.add(e),t.push(n))}return{domain:t,clipped:!1}}calculateDomain(){if(!this._paddingOverrideEnabled){const e=this.boundSeries.map((e=>{var t;return null===(t=e.getBandScalePadding)||void 0===t?void 0:t.call(e)})).filter((e=>null!=e));e.length>0&&(this.scale.paddingInner=Math.min(...e.map((e=>e.inner))),this.scale.paddingOuter=Math.max(...e.map((e=>e.outer))))}return super.calculateDomain()}}
18Nf.className="CategoryAxis",Nf.type="category",fa([fl(Hl(0,1)),ga("design:type",Number)],Nf.prototype,"groupPaddingInner",void 0);class Lf{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)):[]}}function If(e,t=!0){const i=new Lf;let n=0;return t&&e.forEach((e=>n=Math.max(n,e.labels.length))),e.forEach((e=>{if(t)while(e.labels.length<n)e.labels.unshift("");Ff(i,e)})),i}function Ff(e,t){const i=t.labels.slice().reverse(),n=i.length-1;i.forEach(((t,i)=>{const o=e.children,r=o.find((e=>e.label===t)),s=i!==n;if(r&&s)e=r;else{const i=new Lf(t,e);i.number=o.length,o.push(i),s&&(e=i)}}))}function Gf(e,t,i){const n=t.number-e.number,o=i/n;t.change-=o,t.shift+=i,e.change+=o,t.prelim+=i,t.mod+=i}function Vf(e,t,i){return t.getSiblings().indexOf(e.ancestor)>=0?e.ancestor:i}function Bf(e){const t=e.children;if(t){let e=0,i=0;for(let n=t.length-1;n>=0;n--){const o=t[n];o.prelim+=e,o.mod+=e,i+=o.change,e+=o.shift+i}}}function jf(e,t,i){const n=e.getLeftSibling();if(n){let o=e,r=e,s=n,a=r.getLeftmostSibling(),l=r.mod,c=o.mod,u=s.mod,d=a.mod;while(s.nextRight()&&r.nextLeft()){s=s.nextRight(),r=r.nextLeft(),a=a.nextLeft(),o=o.nextRight(),o.ancestor=e;const n=s.prelim+u-(r.prelim+l)+i;n>0&&(Gf(Vf(s,e,t),e,n),l+=n,c+=n),u+=s.mod,l+=r.mod,d+=a.mod,c+=o.mod}s.nextRight()&&!o.nextRight()?(o.thread=s.nextRight(),o.mod+=u-c):(r.nextLeft()&&!a.nextLeft()&&(a.thread=r.nextLeft(),a.mod+=l-d),t=e)}return t}function Hf(e,t){const i=e.children;if(i.length){let n=i[0];i.forEach((e=>{Hf(e,t),n=jf(e,n,t)})),Bf(e);const o=(i[0].prelim+i[i.length-1].prelim)/2,r=e.getLeftSibling();r?(e.prelim=r.prelim+t,e.mod=e.prelim-o):e.prelim=o}else{const i=e.getLeftSibling();e.prelim=i?i.prelim+t:0}}class Wf{constructor(){this.top=1/0,this.right=-1/0,this.bottom=-1/0,this.left=1/0}update(e,t){const{x:i,y:n}=t(e);i>this.right&&(this.right=i),i<this.left&&(this.left=i),n>this.bottom&&(this.bottom=n),n<this.top&&(this.top=n)}}function Uf(e,t,i){e.x=e.prelim+t,e.y=e.depth,i.update(e),e.children.forEach((n=>Uf(n,t+e.mod,i)))}function zf(e){const t=e.children;let i=0;t.forEach((e=>{zf(e),e.children.length?i+=e.leafCount:i++})),e.leafCount=i,t.length?(e.subtreeLeft=t[0].subtreeLeft,e.subtreeRight=t[e.children.length-1].subtreeRight,e.x=(e.subtreeLeft+e.subtreeRight)/2):(e.subtreeLeft=e.x,e.subtreeRight=e.x)}function Kf(e){const t=new Yf;return Hf(e,1),Uf(e,-e.prelim,t),zf(e),t}class Yf{constructor(){this.dimensions=new Wf,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,n=0,o=!1){const r=this.leafCount-1,s=this.depth,a=this.dimensions;let l=1,c=1;if(e>0&&r){const t=(a.right-a.left)/r,i=e/r;l=i/t,o&&(l=-l)}if(t>0&&s){const e=(a.bottom-a.top)/s,i=t/s;c=i/e}const u=new Wf;this.nodes.forEach((e=>{e.screenX=e.x*l,e.screenY=e.y*c,u.update(e,(e=>({x:e.screenX,y:e.screenY})))}));const d=-u.left,p=-u.top;this.nodes.forEach((e=>{e.screenX+=d+i,e.screenY+=p+n}))}}class qf extends gf{constructor(){super(...arguments),this.grid=!1}}fa([fl(Dl),ga("design:type",Boolean)],qf.prototype,"grid",void 0);class Xf extends kf{constructor(e){super(e,new sl),this.tickScale=new sl,this.line=new vf,this.label=new qf,this.labelColor="rgba(87, 87, 87, 1)",this.includeInvisibleDomains=!0;const{tickLineGroup:t,tickLabelGroup:i,gridLineGroup:n,tickScale:o,scale:r}=this;r.paddingOuter=.1,r.paddingInner=2*r.paddingOuter,this.range=r.range.slice(),this.refreshScale(),o.paddingInner=1,o.paddingOuter=0,this.gridLineSelection=ld.select(n,cd),this.axisLineSelection=ld.select(t,cd),this.separatorSelection=ld.select(t,cd),this.labelSelection=ld.select(i,Kc)}updateRange(){const{range:e,visibleRange:t,scale:i}=this,n=(e[1]-e[0])/(t[1]-t[0]),o=n*t[0],r=e[0]-o;this.tickScale.range=i.range=[r,r+n],this.resizeTickTree()}resizeTickTree(){var e;const t=this.scale,i=t.domain.length?[t.convert(t.domain[0]),t.convert(t.domain[t.domain.length-1])]:t.range,n=this.tickTreeLayout,o=this.lineHeight;n&&n.resize(Math.abs(i[1]-i[0]),n.depth*o,(Math.min(i[0],i[1])||0)+(null!==(e=t.bandwidth)&&void 0!==e?e:0)/2,-n.depth*o,i[1]-i[0]<0)}get lineHeight(){return 1.5*this.label.fontSize}set gridLength(e){(this._gridLength&&!e||!this._gridLength&&e)&&(this.gridLineSelection.clear(),this.labelSelection.clear()),this._gridLength=e}get gridLength(){return this._gridLength}calculateDomain(){var e;const{direction:t}=this,i=[];let n;this.boundSeries.filter((e=>
18e.visible)).forEach((e=>{if(t===mc.X)if(void 0===n){const o=e.getDomain(t);i.push(o),n="number"===typeof o[0]}else n&&i.push(e.getDomain(t));else i.push(e.getDomain(t))}));const o=(new Array).concat(...i),r=null!==(e=xa(o))&&void 0!==e?e:o;this.dataDomain=this.normaliseDataDomain(r),this.scale.domain=this.dataDomain.domain}normaliseDataDomain(e){const t=e.filter(((e,t,i)=>i.indexOf(e)===t)),i=If(t);this.tickTreeLayout=Kf(i);const n=t.slice();return n.push(""),this.tickScale.domain=n,this.resizeTickTree(),{domain:t,clipped:!1}}update(){this.computedLayout&&(this.updatePosition(),this.updateTitleCaption(),this.updateCategoryLabels(),this.updateSeparators(),this.updateAxisLines(),this.updateCategoryGridLines(),this.resetSelectionNodes())}updateTitleCaption(){const{_titleCaption:e}=this;e.node.visible=!1}updateCategoryLabels(){if(!this.computedLayout)return;const{tickLabelLayout:e}=this.computedLayout,t=this.labelSelection.update(e);t.each(((e,t)=>{e.setProperties(t)}))}updateSeparators(){if(!this.computedLayout)return;const{separatorLayout:e}=this.computedLayout,{range:t}=this,i=1e-7,n=this.separatorSelection.update(e);n.each(((e,n)=>{e.x1=n.x1,e.x2=n.x2,e.y1=n.y,e.y2=n.y,e.visible=n.y>=t[0]-i&&n.y<=t[1]+i,e.stroke=this.tick.color,e.fill=void 0,e.strokeWidth=1}))}
18updateAxisLines(){if(!this.computedLayout)return;const{axisLineLayout:e}=this.computedLayout,t=this.axisLineSelection.update(e);t.each(((e,t)=>{e.setProperties(Object.assign(Object.assign({},t),{stroke:this.line.color,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.color}))}updateCategoryGridLines(){const{gridLength:e,gridLine:t,label:i,range:n,tickScale:o}=this,r=o.ticks(),s=i.getSideFlag(),a=this.gridLineSelection.update(e?r:[]);if(e){const{width:i,style:r}=t,l=r.length;a.each(((t,a,c)=>{const u=Math.round(o.convert(a));t.x1=0,t.x2=-s*e,t.y1=u,t.y2=u,t.visible=u>=n[0]&&u<=n[1];const{stroke:d,lineDash:p}=r[c%l];t.stroke=d,t.strokeWidth=i,t.lineDash=p,t.fill=void 0}))}}computeLayout(){this.updateDirection(),this.calculateDomain(),this.updateRange();const{scale:e,label:t,label:{parallel:i},moduleCtx:{callbackCache:n},range:o,title:r,title:{formatter:s=(e=>e.defaultValue)}={}}=this,a=e.range[0],l=e.range[1],c=Math.abs(l-a),u=c/e.domain.length||0,d=il(this.rotation),p=Math.abs(Math.cos(d))<1e-8,h=t.getSideFlag(),f=this.lineHeight,g=this.tickTreeLayout,v=e.ticks(),y=g?g.nodes:[],m=!!g&&g.depth>1,{defaultRotation:C,configuredRotation:b,parallelFlipFlag:w}=ep({rotation:t.rotation,parallel:i,regularFlipRotation:Qa(d-Math.PI/2),parallelFlipRotation:Qa(d)}),S=[],E=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}),x=new Map;let O=0;const T=new Kc,D=(e,i)=>{var a;if(T.setProperties({fill:t.color,fontFamily:t.fontFamily,fontSize:t.fontSize,fontStyle:t.fontStyle,fontWeight:t.fontWeight,textAlign:"center",textBaseline:-1===w?"bottom":"hanging",translationX:e.screenY-.25*t.fontSize,translationY:e.screenX}),0===i){const i=(null===r||void 0===r?void 0:r.enabled)&&v.length>0;if(!i)return!1;const o=n.call(s,this.getTitleFormatterParams());T.setProperties({fill:r.color,fontFamily:r.fontFamily,fontSize:r.fontSize,fontStyle:r.fontStyle,fontWeight:r.fontWeight,text:o,textBaseline:"hanging",translationX:e.screenY-.25*t.fontSize,translationY:e.screenX})}else{const r=e.screenX>=o[0]&&e.screenX<=o[1];if(!r)return!1;t.formatter?T.text=null!==(a=n.call(t.formatter,{value:String(e.label),index:i}))&&void 0!==a?a:String(e.label):T.text=String(e.label)}return!0};y.forEach(((e,t)=>{const i=D(e,t);if(i){const e=T.computeTransformedBBox();e&&(x.set(t,e),e.width>O&&(O=e.width))}}));const R=h*t.padding,A=this.label.grid,_=[];y.forEach(((e,t)=>{let i=D(e,t);const n=t;T.x=R,T.rotationCenterX=R;const o=!e.children.length;if(o){T.rotation=b,T.textAlign="end",T.textBaseline="middle";const e=x.get(n);e&&e.height>u&&(i=!1,x.delete(n))}else{T.translationX-=O-f+this.label.padding;const t=e.leafCount*u,o=x.get(n);o&&o.width>t?(i=!1,x.delete(n)):T.rotation=p?C:-Math.PI/2}if(e.parent&&m){const t=o?e.screenX-u/2:e.screenX-e.leafCount*u/2;if(o)(e.number!==e.children.length-1||A)&&_.push({y:t,x1:0,x2:-O-2*this.label.padding});else{const i=-O-2*this.label.padding+e.screenY;_.push({y:t,x1:i+f,x2:i})}}let r;if(i){const e=T.computeTransformedBBox();e&&x.set(t,e),r=Object.assign(Object.assign({},E(T)),{visible:i})}else x.delete(t),r={visible:i};S.push(r)}));let P=0;_.forEach((e=>P=Math.min(P,e.x2))),_.push({y:Math.max(a,l),x1:0,x2:P});const M=[],k=[],N=1e-7;_.forEach((e=>{if(e.y>=o[0]-N&&e.y<=o[1]+N){const{x1:t,x2:i,y:n}=e,o=new Pc(Math.min(t,i),n,Math.abs(t-i),0);k.push(o),M.push({x1:t,x2:i,y:n})}}));const L=[],I=[],F=g?g.depth+1:1;for(let j=0;j<F;j++){const e=v.length>0&&(0===j||A&&m),t=j>0?-O-2*this.label.padding-(j-1)*f:0,i=new Pc(t,Math.min(...o),0,Math.abs(o[1]-o[0]));I.push(i),L.push({x:t,y1:o[0],y2:o[1],visible:e})}const G=e=>{const t=new Mc,{rotation:i,translationX:n,translationY:o,rotationCenterX:r,rotationCenterY:s}=this.getAxisTransform();return Mc.updateTransformMatrix(t,1,1,i,n,o,{scalingCenterX:0,scalingCenterY:0,rotationCenterX:r,rotationCenterY:s}),t.transformBBox(e)},V=Pc.merge([...x.values(),...k,...I]),B=G(V);return{bbox:B,tickLabelLayout:S,separatorLayout:M,axisLineLayout:L}}calculateLayout(){const{axisLineLayout:e,separatorLayout:t,tickLabelLayout:i,bbox:n}=this.computeLayout();return this.computedLayout={axisLineLayout:e,separatorLayout:t,tickLabelLayout:i},{bbox:n,primaryTickCount:void 0}}}Xf.className="GroupedCategoryAxis",Xf.type="grouped-category",fa([fl(Gl),ga("design:type",String)],Xf.prototype,"labelColor",void 0);class $f{static isSupported(){return"undefined"!==typeof OffscreenCanvas&&null!=OffscreenCanvas.prototype.transferToImageBitmap}constructor({width:e=600,height:t=300,overrideDevicePixelRatio:i}){this.enabled=!0,this._pixelRatio=NaN,this._width=0,this._height=0,this.canvas=new OffscreenCanvas(e,t),this.realContext=this.canvas.getContext("2d"),this.imageSource=this.canvas.transferToImageBitmap(),this.context=this.setPixelRatio(i),this.resize(e,t)}snapshot(){this.imageSource.close(),this.imageSource=this.canvas.transferToImageBitmap()}destroy(){this.imageSource.close(),this.canvas.width=0,this.canvas.height=0,this.context.clearRect(0,0,0,0)}clear(){this.context.save(),this.context.resetTransform(),this.context.clearRect(0,0,this.width,this.height),this.context.restore(
18)}get pixelRatio(){return this._pixelRatio}setPixelRatio(e){let t=null!==e&&void 0!==e?e:window.devicePixelRatio;return Gc()||(t=1),this._pixelRatio=t,Vc.overrideScale(this.realContext,t)}get width(){return this._width}get height(){return this._height}resize(e,t){if(!(e>0&&t>0))return;const{canvas:i,context:n,pixelRatio:o}=this;i.width=Math.round(e*o),i.height=Math.round(t*o),n.resetTransform(),this._width=e,this._height=t}}(function(e){e["SCENE"]="scene",e["SCENE_STATS"]="scene:stats",e["SCENE_STATS_VERBOSE"]="scene:stats:verbose",e["SCENE_DIRTY_TREE"]="scene:dirtyTree"})(_f||(_f={}));const Zf="adv-composite",Jf="dom-composite";class Qf{constructor(e){var t;this.id=Rc(this),this.layers=[],this._nextZIndex=0,this._nextLayerId=0,this._dirty=!1,this._root=null,this.debug=Ia.create(!0,_f.SCENE);const{document:i,window:n,mode:o=(null!==(t=Ma("agChartsSceneRenderModel"))&&void 0!==t?t:Zf),width:r,height:s,overrideDevicePixelRatio:a}=e;this.overrideDevicePixelRatio=a,this.opts={document:i,window:n,mode:o},this.canvas=new Vc({document:i,window:n,width:r,height:s,overrideDevicePixelRatio:a})}set container(e){this.canvas.container=e}get container(){return this.canvas.container}download(e,t){this.canvas.download(e,t)}getDataURL(e){return this.canvas.getDataURL(e)}get width(){return this.pendingSize?this.pendingSize[0]:this.canvas.width}get height(){return this.pendingSize?this.pendingSize[1]:this.canvas.height}resize(e,t){e=Math.round(e),t=Math.round(t);const i=e<=0||t<=0,n=isNaN(e)||isNaN(t),o=e===this.width&&t===this.height;return!(o||n||i)&&(this.pendingSize=[e,t],this.markDirty(),!0)}addLayer(e){var t;const{mode:i}=this.opts,n=["composite",Jf,Zf];if(!n.includes(i))return;const{zIndex:o=this._nextZIndex++,name:r,zIndexSubOrder:s,getComputedOpacity:a,getVisibility:l}=e,{width:c,height:u,overrideDevicePixelRatio:d}=this,p=i===Jf,h=i===Zf,f=h&&$f.isSupported()?new $f({width:c,height:u,overrideDevicePixelRatio:d}):new Vc({document:this.opts.document,window:this.opts.window,width:c,height:u,domLayer:p,zIndex:o,name:r,overrideDevicePixelRatio:d}),g={id:this._nextLayerId++,name:r,zIndex:o,zIndexSubOrder:s,canvas:f,getComputedOpacity:a,getVisibility:l};if(o>=this._nextZIndex&&(this._nextZIndex=o+1),this.layers.push(g),this.sortLayers(),p){const e=this.layers.map((e=>e.canvas)).filter((e=>e instanceof Vc)),i=e.findIndex((e=>e===f)),n=null!==(t=e[i-1])&&void 0!==t?t:this.canvas;n.element.insertAdjacentElement("afterend",f.element)}return this.debug("Scene.addLayer() - layers",this.layers),g.canvas}removeLayer(e){const t=this.layers.findIndex((t=>t.canvas===e));t>=0&&(this.layers.splice(t,1),e.destroy(),this.markDirty(),this.debug("Scene.removeLayer() -  layers",this.layers))}moveLayer(e,t,i){const n=this.layers.find((t=>t.canvas===e));n&&(n.zIndex=t,n.zIndexSubOrder=i,this.sortLayers(),this.markDirty(),this.debug("Scene.moveLayer() -  layers",this.layers))}sortLayers(){this.layers.sort(((e,t)=>{var i,n;return sd([e.zIndex,...null!==(i=e.zIndexSubOrder)&&void 0!==i?i:[void 0,void 0],e.id],[t.zIndex,...null!==(n=t.zIndexSubOrder)&&void 0!==n?n:[void 0,void 0],t.id],rd)}))}markDirty(){this._dirty=!0}get dirty(){return this._dirty}set root(e){var t;e!==this._root&&(null===(t=this._root)||void 0===t||t._setLayerManager(),this._root=e,e&&e._setLayerManager({addLayer:e=>this.addLayer(e),moveLayer:(...e)=>this.moveLayer(...e),removeLayer:(...e)=>this.removeLayer(...e),markDirty:()=>this.markDirty(),canvas:this.canvas,debug:Ia.create(_f.SCENE)}),this.markDirty())}get root(){return this._root}strip(){const{layers:e}=this;for(const t of e)t.canvas.destroy(),delete t["canvas"];e.splice(0,e.length),this.root=null,this._dirty=!1,this.canvas.context.resetTransform()}destroy(){this.container=void 0,this.strip(),this.canvas.destroy(),Object.assign(this,{canvas:void 0,ctx:void 0})}render(e){var t,i;return va(this,void 0,void 0,(function*(){const{debugSplitTimes:n={start:performance.now()},extraDebugStats:o={}}=null!==e&&void 0!==e?e:{},{canvas:r,canvas:{context:s},root:a,layers:l,pendingSize:c,opts:{mode:u}}=this;
18if(c&&(this.canvas.resize(...c),this.layers.forEach((e=>e.canvas.resize(...c))),this.pendingSize=void 0),a&&!a.visible)return void(this._dirty=!1);if(a&&!this.dirty)return this.debug("Scene.render() - no-op",{redrawType:Cc[a.dirty],tree:this.buildTree(a)}),void this.debugStats(n,s,void 0,o);const d={ctx:s,devicePixelRatio:null!==(t=this.canvas.pixelRatio)&&void 0!==t?t:1,forceRender:!0,resized:!!c,debugNodes:{}};Ia.check(_f.SCENE_STATS_VERBOSE)&&(d.stats={layersRendered:0,layersSkipped:0,nodesRendered:0,nodesSkipped:0});let p=!1;if((!a||a.dirty>=Cc.TRIVIAL)&&(p=!0,r.clear()),a){const{dirtyTree:e,paths:t}=this.buildDirtyTree(a);Ia.create(_f.SCENE_DIRTY_TREE)("Scene.render() - dirtyTree",{dirtyTree:e,paths:t})}a&&p&&(this.debug("Scene.render() - before",{redrawType:Cc[a.dirty],canvasCleared:p,tree:this.buildTree(a)}),a.visible&&(s.save(),a.render(d),s.restore())),n["✍️"]=performance.now(),u!==Jf&&l.length>0&&p&&(this.sortLayers(),s.save(),s.setTransform(1/r.pixelRatio,0,0,1/r.pixelRatio,0,0),l.forEach((({canvas:{imageSource:e,enabled:t},getComputedOpacity:i,getVisibility:n})=>{t&&n()&&(s.globalAlpha=i(),s.drawImage(e,0,0))})),s.restore(),n["⛙"]=performance.now()),null===(i=s.verifyDepthZero)||void 0===i||i.call(s),this._dirty=!1,this.debugStats(n,s,d.stats,o),this.debugSceneNodeHighlight(s,d.debugNodes),a&&this.debug("Scene.render() - after",{redrawType:Cc[a.dirty],canvasCleared:p,tree:this.buildTree(a)})}))}debugStats(e,t,i,n={}){if(Ia.check(_f.SCENE_STATS,_f.SCENE_STATS_VERBOSE)){const o=performance.now(),r=e["start"];e["end"]=performance.now();const s=(e,t)=>{const i=e+t;return`${e} / ${i} (${Math.round(100*e/i)}%)`},a=(e,t,i)=>`${e}: ${Math.round(100*(i-t))/100}ms`,{layersRendered:l=0,layersSkipped:c=0,nodesRendered:u=0,nodesSkipped:d=0}=null!==i&&void 0!==i?i:{};let p=0;const h=Object.entries(e).filter((([e])=>"end"!==e)).map((([e,t],i)=>{const n=i>0?a(e,p,t):null;return p=t,n})).filter((e=>null!=e)).join(" + "),f=Object.entries(n).map((([e,t])=>`${e}: ${t}`)).join(" ; "),g=Ia.check(_f.SCENE_STATS_VERBOSE),v=[`${a("⏱️",r,o)} (${h})`,`${f}`,`Layers: ${g?s(l,c):this.layers.length}`,g?`Nodes: ${s(u,d)}`:null].filter((e=>null!=e)),y=v.map((e=>[e,Vc.getTextSize(e,t.font)])),m=Math.max(...y.map((([,{width:e}])=>e))),C=y.reduce(((e,[,{height:t}])=>e+t),0);t.save(),t.fillStyle="white",t.fillRect(0,0,m,C),t.fillStyle="black";let b=0;for(const[e,i]of y)b+=i.height,t.fillText(e,2,b);t.restore()}}debugSceneNodeHighlight(e,t){var i;const n=e=>t=>!!e.test(t.id)||t instanceof ad&&null!=t.name&&e.test(t.name),o=e=>t=>e===t.id||t instanceof ad&&null!=t.name&&e===t.name,r=Ra(Ma("agChartsSceneDebug")).flatMap((e=>"layout"===e?["seriesRoot","legend","root",/.*Axis-\d+-axis.*/]:e));for(const s of r){if("string"===typeof s&&null!=t[s])continue;const e="string"===typeof s?o(s):n(s),r=null===(i=this.root)||void 0===i?void 0:i.findNodes(e);if(r&&0!==r.length)for(const i of r)i instanceof ad&&i.name?t[i.name]=i:t[i.id]=i;
18else Pa.log(`Scene.render() - no debugging node with id [${s}] in scene graph.`)}e.save();for(const[s,a]of Object.entries(t)){const t=a.computeTransformedBBox();t?(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(s,t.x,t.y,t.width),e.fillText(s,t.x,t.y,t.width)):Pa.log(`Scene.render() - no bbox for debugged node [${s}].`)}e.restore()}buildTree(e){var t,i;const n=null!==(t=e instanceof ad?e.name:null)&&void 0!==t?t:e.id;return Object.assign(Object.assign({name:n,node:e,dirty:Cc[e.dirty]},(null===(i=e.parent)||void 0===i?void 0:i.isVirtual)?{virtualParentDirty:Cc[e.parent.dirty],virtualParent:e.parent}:{}),e.children.map((e=>this.buildTree(e))).reduce(((e,t)=>{let{name:i}=t;const{node:{visible:n,opacity:o,zIndex:r,zIndexSubOrder:s},node:a,virtualParent:l}=t;(!n||o<=0)&&(i=`(${i})`),a instanceof ad&&a.isLayer()&&(i=`*${i}*`);const c=[`${null!==i&&void 0!==i?i:"<unknown>"}`,`z: ${r}`,s&&`zo: ${s.map((e=>"function"===typeof e?`${e()} (fn)`:e)).join(" / ")}`,l&&"(virtual parent)"].filter((e=>!!e)).join(" ");let u=c,d=1;while(null!=e[u]&&d<100)u=`${c} (${d++})`;return e[u]=t,e}),{}))}buildDirtyTree(e){var t;if(e.dirty===Cc.NONE)return{dirtyTree:{},paths:[]};const i=e.children.map((e=>this.buildDirtyTree(e))).filter((e=>e.paths.length>0)),n=null!==(t=e instanceof ad?e.name:null)&&void 0!==t?t:e.id,o=0===i.length?[n]:i.map((e=>e.paths)).reduce(((e,t)=>e.concat(t)),[]).map((e=>`${n}.${e}`));return{dirtyTree:Object.assign({name:n,node:e,dirty:Cc[e.dirty]},i.map((e=>e.dirtyTree)).filter((e=>void 0!==e.dirty)).reduce(((e,t)=>{var i;return e[null!==(i=t.name)&&void 0!==i?i:"<unknown>"]=t,e}),{})),paths:o}}}function eg(e){return new Promise((t=>{setTimeout((()=>t(void 0)),e)}))}Qf.className="Scene";class tg{constructor(){this.cache=new WeakMap}call(e,...t){let i,n=this.cache.get(e);const o=()=>{try{const o=e(...t);return n&&null!=i&&n.set(i,o),o}catch(o){return void Pa.warnOnce("User callback errored, ignoring",o)}};try{i=JSON.stringify(t)}catch(r){return o()}return null==n&&(n=new Map,this.cache.set(e,n)),n.has(i)?n.get(i):o()}invalidateCache(){this.cache=new WeakMap}}class ig{constructor(){this.available=!0,this.acquireQueue=[]}acquire(e){return new Promise((t=>{this.acquireQueue.push([e,t]),this.available&&this.dispatchNext()}))}acquireImmediately(e){return va(this,void 0,void 0,(function*(){return!!this.available&&(yield this.acquire(e),!0)}))}waitForClearAcquireQueue(){return va(this,void 0,void 0,(function*(){return this.acquire((()=>va(this,void 0,void 0,(function*(){}))))}))}dispatchNext(){var e,t;return va(this,void 0,void 0,(function*(){this.available=!1;let[i,n]=null!==(e=this.acquireQueue.shift())&&void 0!==e?e:[];while(i){try{yield i(),null===n||void 0===n||n()}catch(o){Pa.error("mutex callback error",o),null===n||void 0===n||n()}[i,n]=null!==(t=this.acquireQueue.shift())&&void 0!==t?t:[]}this.available=!0}))}}function ng(e){return rg(((e,t)=>requestAnimationFrame(e)),e)}function og(e){return rg(((e,t=0)=>setTimeout(e,t)),e)}function rg(e,t){let i,n,o=0,r=!1;const s=()=>r,a=()=>{r=!1,null===n||void 0===n||n(),n=void 0,i=void 0,o>0&&e(l)},l=()=>{const e=o;o=0,r=!0;const i=t({count:e});i?i.then(a).catch(a):a()};return{schedule(t){0!==o||s()||e(l,t),o++},await(){return va(this,void 0,void 0,(function*(){if(s()){null==i&&(i=new Promise((e=>{n=e})));while(s())yield i}}))}}}class sg{static init(e){if("undefined"!==typeof ResizeObserver)this.resizeObserver=new ResizeObserver((e=>{for(const t of e){const{width:e,height:i}=t.contentRect;this.checkSize(this.elements.get(t.target),t.target,e,i)}}));else{const e=()=>{this.elements.forEach(((e,t)=>{this.checkClientSize(t,e)}))};this.pollerHandler=window.setInterval(e,100)}this.ready=!0,this.documentReady="loading"!==e.readyState,this.documentReady||(this.readyEventFn=()=>{const t="loading"!==e.readyState,i=this.documentReady;if(this.documentReady=t,t&&t!==i){for(const[e,t]of this.queuedObserveRequests)this.observe(e,t);this.queuedObserveRequests.length=0}},e.addEventListener("DOMContentLoaded",this.readyEventFn))}static destroy(){var e;null!=this.pollerHandler&&(clearInterval(this.pollerHandler),this.pollerHandler=void 0),this.readyEventFn&&(document.removeEventListener("DOMContentLoaded",this.readyEventFn),this.readyEventFn=void 0),null===(e=this.resizeObserver)||void 0===e||e.disconnect(),this.resizeObserver=void 0,this.ready=!1}static checkSize(e,t,i,n){e&&(e.size&&i===e.size.width&&n===e.size.height||(e.size={width:i,height:n},e.cb(e.size,t)))}static observe(e,t){this.ready||this.init(e.ownerDocument),this.documentReady?(this.unobserve(e,!1),this.resizeObserver&&this.resizeObserver.observe(e),this.elements.set(e,{cb:t})):this.queuedObserveRequests.push([e,t])}static unobserve(e,t=!0){this.resizeObserver&&this.resizeObserver.unobserve(e),this.elements.delete(e),this.queuedObserveRequests=this.queuedObserveRequests.filter((([t])=>t===e)),t&&0===this.elements.size&&this.destroy()}static checkClientSize(e,t){const i=e.clientWidth?e.clientWidth:0,n=e.clientHeight?e.clientHeight:0;this.checkSize(t,e,i,n)}}sg.elements=new Map,sg.ready=!1,sg.documentReady=!1,sg.queuedObserveRequests=[];class ag{constructor(){this.range="tooltip"}}var lg;fa([fl(ql("tooltip","node")),ga("design:type",String)],ag.prototype,"range",void 0),function(e){e[e["FULL"]=0]="FULL",e[e["PROCESS_DATA"]=1]="PROCESS_DATA",e[e["PERFORM_LAYOUT"]=2]="PERFORM_LAYOUT",e[e["SERIES_UPDATE"]=3]="SERIES_UPDATE",e[e["TOOLTIP_RECALCULATION"]=4]="TOOLTIP_RECALCULATION",e[e["SCENE_RENDER"]=5]="SCENE_RENDER",e[e["NONE"]=6]="NONE"}(lg||(lg={}));class cg{constructor(e){this.type=e,this.continuousDomain=[1/0,-1/0],this.discreteDomain=new Set}extend(e){"discrete"===this.type?this.discreteDomain.add(e):"continuous"===this.type&&(this.continuousDomain[0]>e&&(this.continuousDomain[0]=e),this.continuousDomain[1]<e&&(this.continuousDomain[1]=e))}getDomain(){if("discrete"===this.type)return this.discreteDomain;if("continuous"===this.type)return this.continuousDomain;throw new Error("AG Charts - Unsupported data domain type: "+this.type)}}function ug(e){return e.map((e=>null==e||"number"===typeof e||"string"===typeof e||"boolean"===typeof e?e:"object"===typeof e?JSON.stringify(e):e)).join("-")}function dg(e){const t=1e4;return Number.isInteger(e)?e:Math.abs(e)>t?Math.trunc(e):Math.round(e*t)/t}function pg(e){if(void 0===e)return[];let[t,i]=e;return t=+t,i=+i,0===t&&0===i?[0,1]:t===1/0&&i===-1/0?[]:(t===1/0&&(t=0),i===-1/0&&(i=0),Gd(t)&&Gd(i)?[t,i]:[])}function hg(e,t){var i;const n=pg(e);
18if(0===n.length)return n;let[o,r]=n;if(o===r){const[e,n]=null!==(i=null===t||void 0===t?void 0:t.calculatePadding(o,r))&&void 0!==i?i:[1,1];o-=e,r+=n}return[o,r]}const fg=Symbol("invalid");class gg{constructor(e){const{props:t,mode:i="standalone"}=e;this.mode=i;let n=!0;for(const s of t){if("key"===s.type&&!n)throw new Error("AG Charts - internal config error: keys must come before values.");"value"===s.type&&n&&(n=!1)}this.opts=Object.assign({dataVisible:!0},e),this.keys=t.filter((e=>"key"===e.type)).map(((e,t)=>Object.assign(Object.assign({},e),{index:t,missing:0}))),this.values=t.filter((e=>"value"===e.type)).map(((e,t)=>Object.assign(Object.assign({},e),{index:t,missing:0}))),this.aggregates=t.filter((e=>"aggregate"===e.type)).map(((e,t)=>Object.assign(Object.assign({},e),{index:t}))),this.groupProcessors=t.filter((e=>"group-value-processor"===e.type)).map(((e,t)=>Object.assign(Object.assign({},e),{index:t}))),this.propertyProcessors=t.filter((e=>"property-value-processor"===e.type)).map(((e,t)=>Object.assign(Object.assign({},e),{index:t}))),this.reducers=t.filter((e=>"reducer"===e.type)).map(((e,t)=>Object.assign(Object.assign({},e),{index:t}))),this.processors=t.filter((e=>"processor"===e.type)).map(((e,t)=>Object.assign(Object.assign({},e),{index:t})));for(const s of this.values)if(null==s.property)throw new Error(`AG Charts - internal config error: no properties specified for value definitions: ${JSON.stringify(s)}`);const o=({matchGroupIds:e})=>{for(const t of null!==e&&void 0!==e?e:[])if(!this.values.some((e=>e.groupId===t)))throw new Error(`AG Charts - internal config error: matchGroupIds properties must match defined groups (${t}).`)},r=({matchIds:e})=>{for(const t of null!==e&&void 0!==e?e:[])if(!this.values.some((e=>{var i;return null===(i=e.ids)||void 0===i?void 0:i.some((([e,i])=>e===t[0]&&i===t[1]))})))throw new Error(`AG Charts - internal config error: matchGroupIds properties must match defined groups (${t}).`)};for(const s of[...this.groupProcessors,...this.aggregates])r(s),o(s)}resolveProcessedDataIndexById(e,t){var i;const{index:n,def:o}=null!==(i=this.resolveProcessedDataDefById(e,t))&&void 0!==i?i:{};return{index:n,def:o}}resolveProcessedDataIndicesById(e,t){return this.resolveProcessedDataDefsById(e,t).map((({index:e,def:t})=>({index:e,def:t})))}resolveProcessedDataDefById(e,t){return this.resolveProcessedDataDefsById(e,t)[0]}resolveProcessedDataDefsByIds(e,t){const i=[];for(const n of t)i.push([n,this.resolveProcessedDataDefsById(e,n)]);return i}resolveProcessedDataDefsValues(e,{keys:t,values:i}){const n={};for(const[o,[{index:r,def:s}]]of e){const e="key"===s.type?t:i;n[o]=e[r]}return n}resolveProcessedDataDefsById(e,t){const{keys:i,values:n,aggregates:o,groupProcessors:r,reducers:s}=this,a=i=>{const{ids:n,scopes:o}=i;return null!=n&&(!(null!=e&&!(null===o||void 0===o?void 0:o.some((t=>t===e.id))))&&n.some((([i,n])=>i===e.id&&("string"===typeof t?n===t:t.test(n)))))},l=[i,n,o,r,s],c=[];for(const u of l)c.push(...u.filter(a).map((e=>({index:e.index,def:e}))));if(c.length>0)return c;throw new Error(`AG Charts - didn't find property definition for [${t}, ${e.id}]`)}getDomain(e,t,i="value",n){var o,r,s,a;let l,c;try{l=this.resolveProcessedDataIndicesById(e,t)}catch(p){if("string"!==typeof t&&/didn't find property definition/.test(p.message))return[];throw p}switch(i){case"key":c="keys";break;case"value":c="values";break;case"aggregate":c="aggValues";break;case"group-value-processor":c="groups";break;default:return[]}const u=null!==(r=null===(o=n.domain[c])||void 0===o?void 0:o[l[0].index])&&void 0!==r?r:[];if(1===l.length)return u;const d=[...u];for(const h of l.slice(1))hp(null!==(a=null===(s=n.domain[c])||void 0===s?void 0:s[h.index])&&void 0!==a?a:[],d);return d}processData(e){const{opts:{groupByKeys:t,groupByFn:i},aggregates:n,groupProcessors:o,reducers:r,processors:s,propertyProcessors:a}=this,l=performance.now();for(const d of[...this.keys,...this.values])d.missing=0;if(t&&0===this.keys.length)return;let c=this.extractData(e);t?c=this.groupData(c):i&&(c=this.groupData(c,i(c))),o.length>0&&this.postProcessGroups(c),n.length>0&&this.aggregateData(c),a.length>0&&this.postProcessProperties(c),r.length>0&&this.reduceData(c),s.length>0&&this.postProcessData(c);for(const d of[...this.keys,...this.values])e.length>0&&d.missing>=e.length&&Pa.warnOnce(`the key '${d.property}' was not found in any data element.`);const u=performance.now();return c.time=u-l,Ia.check(!0,"data-model")&&vg(c),c}
18valueGroupIdxLookup({matchGroupIds:e,matchIds:t}){return this.values.map(((e,t)=>({def:e,index:t}))).filter((({def:i})=>!(e&&(null==i.groupId||!e.includes(i.groupId)))&&(!t||null!=i.ids&&t.some((([e,t])=>{var n;return null===(n=i.ids)||void 0===n?void 0:n.some((([i,n])=>i===e&&n===t))}))))).map((({index:e})=>e))}valueIdxLookup(e,t){const i=null==e||0===e.length,n=t=>{const n=null==t;if(n)return!0;const o=null==t||0===t.length;return i===o||(null===t||void 0===t?void 0:t.some((t=>e.includes(t))))},o="string"===typeof t?t:t.id,r=([e,t])=>n([e])&&t===o,s=this.values.findIndex((e=>{var t;return n(e.scopes)&&((null===(t=e.ids)||void 0===t?void 0:t.some((e=>r(e))))||e.property===o||e.id===o)}));if(s>=0)return s;throw new Error(`AG Charts - configuration error, unknown property ${JSON.stringify(t)} in scope(s) ${JSON.stringify(e)}`)}extractData(e){var t;const{keys:i,values:n,opts:{dataVisible:o}}=this,{dataDomain:r,processValue:s,scopes:a,allScopesHaveSameDefs:l}=this.initDataDomainProcessor(),c=new Array(o?e.length:0);let u=0,d=0;for(const h of e){const e=a.size>0?new Set(a):void 0,r=o?new Array(i.length):void 0;let p,f=0;for(const t of i){if(p=s(t,h,p),p===fg)break;r&&(r[f++]=p)}if(p===fg)continue;const g=o&&n.length>0?new Array(n.length):void 0;let v,y=0;for(const i of n)if(v=s(i,h,v),v===fg){if(l)break;for(const n of null!==(t=i.scopes)&&void 0!==t?t:a)null===e||void 0===e||e.delete(n);if(y++,0===(null===e||void 0===e?void 0:e.size))break}else g&&(g[y++]=v);if((v!==fg||!l)&&(0!==(null===e||void 0===e?void 0:e.size)&&o)){const t={datum:h,keys:r,values:g};!l&&e&&e.size<a.size&&(d++,t.validScopes=[...e]),c[u++]=t}}c.length=u;const p=e=>{const t=r.get(e).getDomain();return Array.isArray(t)&&t[0]>t[1]?[]:[...t]};return{type:"ungrouped",input:{count:e.length},data:c,domain:{keys:i.map((e=>p(e))),values:n.map((e=>p(e)))},defs:{allScopesHaveSameDefs:l,keys:i,values:n},partialValidDataCount:d,time:0}}groupData(e,t){var i,n,o,r;const s=new Map;for(const u of e.data){const{keys:e,values:a,datum:l,validScopes:c}=u,d=t?t(u):e,p=ug(d);if(s.has(p)){const e=s.get(p);if(e.values.push(a),e.datum.push(l),null!=c)for(let t=0;t<(null!==(n=null===(i=e.validScopes)||void 0===i?void 0:i.length)&&void 0!==n?n:0);t++){const i=null===(o=e.validScopes)||void 0===o?void 0:o[t];c.some((e=>e===i))||(null===(r=e.validScopes)||void 0===r||r.splice(t,1))}}else s.set(p,{keys:d,values:[a],datum:[l],validScopes:c})}const a=new Array(s.size),l=new Array(s.size);let c=0;for(const[,{keys:u,values:d,datum:p,validScopes:h}]of s.entries())0!==(null===h||void 0===h?void 0:h.length)&&(l[c]=u,a[c++]={keys:u,values:d,datum:p,validScopes:h});return Object.assign(Object.assign({},e),{type:"grouped",data:a,domain:Object.assign(Object.assign({},e.domain),{groups:l})})}aggregateData(e){var t,i,n,o,r,s,a,l;const{aggregates:c}=this;if(!c)return;const u=c.map((()=>[1/0,-1/0])),d=c.map((e=>this.valueGroupIdxLookup(e))),p=c.map((e=>e.aggregateFunction)),h=c.map((e=>e.groupAggregateFunction)),f=c.map((e=>e.finalFunction));for(const g of e.data){let{values:v}=g;const{validScopes:y}=g;null!==(t=g.aggValues)&&void 0!==t||(g.aggValues=new Array(d.length)),"ungrouped"===e.type&&(v=[v]);let m=0;for(const e of d){const t=null===(i=null===y||void 0===y?void 0:y.some((e=>{var t;return null===(t=c[m].matchScopes)||void 0===t?void 0:t.some((t=>e===t))})))||void 0===i||i;if(!t){m++;continue}let d=null!==(o=null===(n=h[m])||void 0===n?void 0:n.call(h))&&void 0!==o?o:hp([]);for(const i of v){const t=e.map((e=>i[e])),n=p[m](t,g.keys);n&&(d=null!==(s=null===(r=h[m])||void 0===r?void 0:r.call(h,n,d))&&void 0!==s?s:hp(n,d))}const C=(null!==(l=null===(a=f[m])||void 0===a?void 0:a.call(f,d))&&void 0!==l?l:d).map((e=>dg(e)));hp(C,u[m]),g.aggValues[m++]=C}}e.domain.aggValues=u}postProcessGroups(e){var t,i,n,o,r;const{groupProcessors:s}=this;if(!s)return;const a=new Set,l=new Map,c=new Map,u=new Map;for(const p of s){const e=this.valueGroupIdxLookup(p);c.set(p,e),u.set(p,p.adjust());for(const t of e){const e=this.values[t];a.add(t),l.set(t,new cg("category"===e.valueType?"discrete":"continuous"))}}const d=e=>{var t;for(const i of a)null===(t=l.get(i))||void 0===t||t.extend(e[i])};for(const p of e.data){for(const a of s){const s=null===(i=null===(t=p.validScopes)||void 0===t?void 0:t.some((e=>{var t;return null===(t=a.matchScopes)||void 0===t?void 0:t.some((t=>e===t))})))||void 0===i||i;if(!s)continue;const l=null!==(n=c.get(a))&&void 0!==n?n:[],d=null!==(r=null===(o=u.get(a))||void 0===o?void 0:o())&&void 0!==r?r:()=>{};if("grouped"!==e.type)p.values&&d(p.values,l);else for(const e of p.values)e&&d(e,l)}if("grouped"===e.type)for(const e of p.values)d(e);else d(p.values)}for(const[p,h]of l)e.domain.values[p]=[...h.getDomain()]}postProcessProperties(e){const{propertyProcessors:t}=this;if(t)for(const{adjust:i,property:n,scopes:o}of t)i()(e,this.valueIdxLookup(null!==o&&void 0!==o?o:[],n))}reduceData(e){var t,i,n;const{reducers:o}=this,r=o.map((e=>e.scopes)),s=o.map((e=>e.reducer())),a=o.map((e=>e.initialValue));for(const l of e.data){let e=0;for(const n of s){const o=null===(i=null===(t=l.validScopes)||void 0===t?void 0:t.some((t=>{var i;return null===(i=r[e])||void 0===i?void 0:i.some((e=>t===e))})))||void 0===i||i;o?(a[e]=n(a[e],l),e++):e++}}for(let l=0;l<a.length;l++)null!==(n=e.reduced)&&void 0!==n||(e.reduced={}),e.reduced[o[l].property]=a[l]}postProcessData(e){var t;const{processors:i}=this;for(const n of i)null!==(t=e.reduced)&&void 0!==t||(e.reduced={}),e.reduced[n.property]=n.calculate(e)}initDataDomainProcessor(){var e;const{keys:t,values:i}=this,n=new Set;for(const p of i)for(const t of null!==(e=p.scopes)&&void 0!==e?e:[])n.add(t);const o=n.size,r=new Map,s=new Map;let a=!0;const l=(e,t,i=r)=>{var n;"category"===t?i.set(e,new cg("discrete")):(i.set(e,new cg("continuous")),a&&(a=(null!==(n=e.scopes)&&void 0!==n?n:[]).length===o))},c=()=>{t.forEach((e=>
18l(e,e.valueType))),i.forEach((e=>l(e,e.valueType)))};c();const u=this.buildAccessors(...t,...i),d=(e,t,i)=>{var n,o,a,l;const d=e.property in u;let p,h=!1;if(d){try{p=u[e.property](t)}catch(g){}h=void 0!==p}else h=e.property in t,p=h?t[e.property]:e.missingValue;if(null!=e.forceValue){const t=h&&cl(p);p=t?-1*e.forceValue:e.forceValue,h=!0}const f="missingValue"in e;if(h||f||e.missing++,r.has(e)||c(),h){const i=null===(o=null===(n=e.validation)||void 0===n?void 0:n.call(e,p,t))||void 0===o||o;if(!i){if(!("invalidValue"in e))return fg;p=e.invalidValue}}return e.processor&&(s.has(e)||s.set(e,e.processor()),p=null===(a=s.get(e))||void 0===a?void 0:a(p,i!==fg?i:void 0)),null===(l=r.get(e))||void 0===l||l.extend(p),p};return{dataDomain:r,processValue:d,initDataDomain:c,scopes:n,allScopesHaveSameDefs:a}}buildAccessors(...e){const t={};if("integrated"===this.mode)return t;for(const i of e){const e=i.property.indexOf(".")>=0||i.property.indexOf("[")>=0;if(!e)continue;let n;n=i.property.startsWith("[")?`return datum${i.property};`:`return datum.${i.property};`,t[i.property]=new Function("datum",n)}return t}}function vg(e){var t,i;const n=(e,t)=>{t.length>0&&(Pa.log(`DataModel.processData() - ${e}`),Pa.table(t))};if(Pa.log("DataModel.processData() - processedData",e),n("Key Domains",e.domain.keys),n("Group Domains",null!==(t=e.domain.groups)&&void 0!==t?t:[]),n("Value Domains",e.domain.values),n("Aggregate Domains",null!==(i=e.domain.aggValues)&&void 0!==i?i:[]),"grouped"===e.type){const t=e.data.reduce(((e,t)=>{var i,n;const o=null!==(i=t.keys)&&void 0!==i?i:[],r=null!==(n=t.aggValues)&&void 0!==n?n:[],s=t.keys.map((()=>{})),a=null===r||void 0===r?void 0:r.map((()=>{}));return e.push(...t.values.map(((e,t)=>[...0===t?o:s,...null!==e&&void 0!==e?e:[],...0==t?r:a]))),e}),[]);n("Values",t)}else{const t=e.data.reduce(((e,t)=>{var i;const n=null!==(i=t.aggValues)&&void 0!==i?i:[];return e.push([...t.keys,...t.values,...n]),e}),[]);n("Values",t)}}class yg{constructor(e){this.mode=e,this.debug=Ia.create(!0,"data-model"),this.requested=[],this.status="setup"}request(e,t,i){return va(this,void 0,void 0,(function*(){if("setup"!==this.status)throw new Error("AG Charts - data request after data setup phase.");return new Promise(((n,o)=>{this.requested.push({id:e,opts:i,data:t,resultCb:n,reject:o})}))}))}execute(){return va(this,void 0,void 0,(function*(){if("setup"!==this.status)throw new Error("AG Charts - data request after data setup phase.");this.status="executed",this.debug("DataController.execute() - requested",this.requested);const e=this.mergeRequested();this.debug("DataController.execute() - merged",e);const t=Ia.check(!0,"data-model");t&&(window.processedData=[]);for(const{opts:n,data:o,resultCbs:r,rejects:s,ids:a}of e)try{const e=new gg(Object.assign(Object.assign({},n),{mode:this.mode})),i=e.processData(o);t&&window.processedData.push(i),i&&0===i.partialValidDataCount?r.forEach((t=>t({dataModel:e,processedData:i}))):i?this.splitResult(e,i,a,r):s.forEach((e=>e(new Error("AG Charts - no processed data generated"))))}catch(i){s.forEach((e=>e(i)))}}))}mergeRequested(){const e=[],t=e=>e.filter((e=>"key"===e.type)).map((e=>e.property)).join(";"),i=({opts:e,data:i})=>n=>n[0].data===i&&n[0].opts.groupByKeys===e.groupByKeys&&n[0].opts.dataVisible===e.dataVisible&&n[0].opts.groupByFn===e.groupByFn&&t(n[0].opts.props)===t(e.props),n=e=>t=>{var i;if(t.type!==e.type)return!1;const n=null!==(i=Ua(t,e))&&void 0!==i?i:{};return delete n["scopes"],delete n["id"],delete n["ids"],0===Object.keys(n).length},o=e=>Object.assign(Object.assign({},e[0]),{props:e.reduce(((e,t)=>{var i,o,r,s,a,l;for(const c of t.props){null!=c.id&&(null!==(i=c.ids)&&void 0!==i||(c.ids=[]),null===(o=c.scopes)||void 0===o||o.forEach((e=>{var t;return null===(t=c.ids)||void 0===t?void 0:t.push([e,c.id])})));const t=e.find(n(c));t?(null!==(r=t.scopes)&&void 0!==r||(t.scopes=[]),t.scopes.push(...null!==(s=c.scopes)&&void 0!==s?s:[]),"key"!==t.type&&"value"!==t.type||null===(a=t.ids)||void 0===a||a.push(...null!==(l=c.ids)&&void 0!==l?l:[])):e.push(c)}return e}),[])}),r=e=>({ids:e.map((({id:e})=>e)),resultCbs:e.map((({resultCb:e})=>e)),rejects:e.map((({reject:e})=>e)),data:e[0].data,opts:o(e.map((({opts:e})=>e)))});for(const s of this.requested){const t=e.find(i(s));
18t?t.push(s):e.push([s])}return e.map(r)}splitResult(e,t,i,n){for(let o=0;o<i.length;o++){const r=i[o],s=n[o];s({dataModel:e,processedData:Object.assign(Object.assign({},t),{data:t.data.filter((({validScopes:e})=>null==e||e.some((e=>e===r))))})})}}}class mg{constructor(e){this.getSeries=e}}class Cg{constructor(){this.listeners=new dp}addListener(e,t,i){return this.listeners.addListener(e,t,i)}removeListener(e){this.listeners.removeListener(e)}}const bg=[!0,"animation"];class wg extends Cg{constructor(e,t){super(),this.interactionManager=e,this.chartUpdateMutex=t,this.defaultDuration=1e3,this.batch=new Sg,this.debug=Ia.create(...bg),this.isPlaying=!1,this.requestId=null,this.skipAnimations=!1}animate(e){var t,i,{disableInteractions:n=!0,immutable:o=!0}=e,r=ha(e,["disableInteractions","immutable"]);const{batch:s}=this;try{if(null!=r.id&&s.controllers.has(r.id)){if(!o)return s.controllers.get(r.id).reset(r);s.controllers.get(r.id).stop(),this.debug(`Skipping animation batch due to update of existing animation: ${r.id}`),this.batch.skip()}}catch(c){return void this.failsafeOnError(c)}const a=null!==(t=r.id)&&void 0!==t?t:Math.random().toString(),l=this.isSkipped();return l&&this.debug("AnimationManager - skipping animation"),new Eu(Object.assign(Object.assign({},r),{id:a,skip:l,autoplay:!!this.isPlaying&&r.autoplay,duration:null!==(i=r.duration)&&void 0!==i?i:this.defaultDuration,onPlay:e=>{var t;s.controllers.set(a,e),this.requestAnimation(),n&&this.interactionManager.pause("animation"),null===(t=r.onPlay)||void 0===t||t.call(e,e)},onStop:e=>{var t;s.controllers.delete(a),n&&this.interactionManager.resume("animation"),null===(t=r.onStop)||void 0===t||t.call(e,e)}}))}play(){if(!this.isPlaying){this.isPlaying=!0,this.debug("AnimationManager.play()");for(const t of this.batch.controllers.values())try{t.play()}catch(e){this.failsafeOnError(e)}this.requestAnimation()}}pause(){if(this.isPlaying){this.isPlaying=!1,this.cancelAnimation(),this.debug("AnimationManager.pause()");for(const t of this.batch.controllers.values())try{t.pause()}catch(e){this.failsafeOnError(e)}}}stop(){this.isPlaying=!1,this.cancelAnimation(),this.debug("AnimationManager.stop()");for(const t of this.batch.controllers.values())try{t.stop()}catch(e){this.failsafeOnError(e,!1)}}stopByAnimationId(e){var t;try{null!=e&&this.batch.controllers.has(e)&&(null===(t=this.batch.controllers.get(e))||void 0===t||t.stop())}catch(i){return void this.failsafeOnError(i)}}stopByAnimationGroupId(e){for(const t of this.batch.controllers.values())t.groupId===e&&this.stopByAnimationId(t.id)}reset(){this.isPlaying?(this.stop(),this.play()):this.stop()}skip(e=!0){this.skipAnimations=e}isSkipped(){return this.skipAnimations||this.batch.isSkipped()}isActive(){return this.isPlaying&&this.batch.isActive()}skipCurrentBatch(){Ia.check(...bg)&&this.debug("AnimationManager - skipCurrentBatch()",{stack:(new Error).stack}),this.batch.skip()}isSkippingFrames(){return!0}scheduleAnimationFrame(e){this.requestId=requestAnimationFrame(e)}requestAnimation(){if(!this.batch.isActive()||null!==this.requestId)return;let e;const t=i=>va(this,void 0,void 0,(function*(){const n=()=>va(this,void 0,void 0,(function*(){const t=i-(null!==e&&void 0!==e?e:i);e=i,this.debug("AnimationManager - onAnimationFrame()",{controllersCount:this.batch.controllers.size});for(const e of this.batch.controllers.values())try{e.update(t)}catch(n){this.failsafeOnError(n)}this.listeners.dispatch("animation-frame",{type:"animation-frame",deltaMs:t})}));this.isSkippingFrames()?yield this.chartUpdateMutex.acquireImmediately(n):yield this.chartUpdateMutex.acquire(n),this.batch.isActive()&&this.scheduleAnimationFrame(t)}));this.scheduleAnimationFrame(t)}cancelAnimation(){null!==this.requestId&&(cancelAnimationFrame(this.requestId),this.requestId=null,this.startBatch())}failsafeOnError(e,t=!0){Pa.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 Sg,!0===e&&this.batch.skip()}endBatch(){this.debug(`AnimationManager - endBatch() with ${this.batch.controllers.size} animations; skipped: ${this.batch.isSkipped()}.`),this.batch.isSkipped()&&!this.batch.isActive()&&this.batch.skip(!1)}}class Sg{constructor(){this.controllers=new Map,this.skipAnimations=!1}isActive(){return this.controllers.size>0}skip(e=!0){if(!1===this.skipAnimations&&!0===e){for(const e of this.controllers.values())e.stop();this.controllers.clear()}this.skipAnimations=e}isSkipped(){return this.skipAnimations}destroy(){}}class Eg extends Cg{legendItemClick(e,t,i,n){const o={type:"legend-item-click",series:e,itemId:t,enabled:i,legendItemName:n};this.listeners.dispatch("legend-item-click",o)}legendItemDoubleClick(e,t,i,n,o){const r={type:"legend-item-double-click",series:e,itemId:t,enabled:i,legendItemName:o,numVisibleItems:n};this.listeners.dispatch("legend-item-double-click",r)}axisHover(e,t){const i={type:"axis-hover",axisId:e,direction:t};this.listeners.dispatch("axis-hover",i)}}class xg{constructor(e){this.states={},this.element=e}updateCursor(e,t){delete this.states[e],null!=t&&(this.states[e]={style:t}),this.applyStates()}applyStates(){let e="default";
18Object.entries(this.states).reverse().slice(0,1).forEach((([t,{style:i}])=>e=i)),this.element.style.cursor=e}getCursor(){return this.element.style.cursor}}class Og extends Cg{constructor(){super(...arguments),this.highlightStates=new Map,this.pickedStates=new Map}updateHighlight(e,t){this.highlightStates.delete(e),null!=t&&this.highlightStates.set(e,t),this.applyHighlightStates()}getActiveHighlight(){return this.activeHighlight}updatePicked(e,t){this.pickedStates.delete(e),null!=t&&this.pickedStates.set(e,t),this.applyPickedStates()}getActivePicked(){return this.activePicked}applyHighlightStates(){const{activeHighlight:e}=this;this.activeHighlight=Array.from(this.highlightStates.values()).pop(),this.isEqual(this.activeHighlight,e)||this.listeners.dispatch("highlight-change",{type:"highlight-change",currentHighlight:this.activeHighlight,previousHighlight:e})}applyPickedStates(){this.activePicked=Array.from(this.pickedStates.values()).pop()}isEqual(e,t){return e===t||(null===e||void 0===e?void 0:e.series)===(null===t||void 0===t?void 0:t.series)&&(null===e||void 0===e?void 0:e.itemId)===(null===t||void 0===t?void 0:t.itemId)&&(null===e||void 0===e?void 0:e.datum)===(null===t||void 0===t?void 0:t.datum)}}const Tg=["pagehide","mousemove","mouseup"],Dg=["click","dblclick","contextmenu","mousedown","mouseout","mouseenter","touchstart","touchmove","touchend","touchcancel","wheel"],Rg="\n.ag-chart-wrapper {\n    touch-action: none;\n}\n";class Ag extends Cg{constructor(e,t,i){super(),this.eventHandler=e=>this.processEvent(e),this.mouseDown=!1,this.touchDown=!1,this.pausers={animation:0,"context-menu":0},this.rootElement=t.body,this.element=e,this.window=i;for(const n of Dg)n.startsWith("touch")?e.addEventListener(n,this.eventHandler,{passive:!0}):"wheel"===n?e.addEventListener(n,this.eventHandler,{passive:!1}):e.addEventListener(n,this.eventHandler);for(const n of Tg)this.window.addEventListener(n,this.eventHandler);Ag.interactionDocuments.includes(t)||(Jp(t,Rg),Ag.interactionDocuments.push(t))}destroy(){for(const e of Tg)this.window.removeEventListener(e,this.eventHandler);for(const e of Dg)this.element.removeEventListener(e,this.eventHandler)}resume(e){this.pausers[e]--}pause(e){this.pausers[e]++}processEvent(e){const t=this.decideInteractionEventTypes(e);t.length>0&&this.dispatchEvent(e,t).catch((e=>Pa.errorOnce(e)))}dispatchEvent(e,t){return va(this,void 0,void 0,(function*(){const i=this.calculateCoordinates(e);if(null==i)return;const n=Object.entries(this.pausers).filter((([,e])=>e>0)).map((([e])=>e));for(const o of t)this.listeners.dispatchWrapHandlers(o,((e,t,i)=>{var o;n.length>0&&!(null===(o=null===t||void 0===t?void 0:t.bypassPause)||void 0===o?void 0:o.some((e=>n.includes(e))))||i.consumed||e(i)}),this.buildEvent(Object.assign({type:o,event:e,pauses:n},i)))}))}decideInteractionEventTypes(e){const t="drag-start";switch(e.type){case"click":return["click"];case"dblclick":return["dblclick"];case"contextmenu":return["contextmenu"];case"mousedown":return this.mouseDown=!0,this.dragStartElement=e.target,[t];case"touchstart":return this.touchDown=!0,this.dragStartElement=e.target,[t];case"touchmove":case"mousemove":return this.mouseDown||this.touchDown||this.isEventOverElement(e)?this.mouseDown||this.touchDown?["drag"]:["hover"]:[];case"mouseup":return this.mouseDown||this.isEventOverElement(e)?(this.mouseDown=!1,this.dragStartElement=void 0,["drag-end"]):[];case"touchend":return this.touchDown||this.isEventOverElement(e)?(this.touchDown=!1,this.dragStartElement=void 0,["drag-end"]):[];case"mouseout":case"touchcancel":return["leave"];case"mouseenter":const i=e instanceof MouseEvent&&1===(1&e.buttons);return this.mouseDown!==i?(this.mouseDown=i,[i?t:"drag-end"]):[];case"pagehide":return["page-left"];case"wheel":return["wheel"]}return[]}isEventOverElement(e){var t;return e.target===this.element||(null===(t=e.target)||void 0===t?void 0:t.parentElement)===this.element}calculateCoordinates(e){var t;if(e instanceof MouseEvent){const{clientX:t,clientY:i,pageX:n,pageY:o,offsetX:r,offsetY:s}=e;return this.fixOffsets(e,{clientX:t,clientY:i,pageX:n,pageY:o,offsetX:r,offsetY:s})}if("undefined"!==typeof TouchEvent&&e instanceof TouchEvent){const i=null!==(t=e.touches[0])&&void 0!==t?t:e.changedTouches[0],{clientX:n,clientY:o,pageX:r,pageY:s}=i;return Object.assign(Object.assign({},Ag.NULL_COORDS),{clientX:n,clientY:o,pageX:r,pageY:s})}if(e instanceof PageTransitionEvent){if(e.persisted)return;return Ag.NULL_COORDS}}fixOffsets(e,t){const i=e=>{let t=0,i=0;while(e)t+=e.offsetLeft,i+=e.offsetTop,e=e.offsetParent;return{x:t,y:i}};if(null!=this.dragStartElement&&e.target!==this.dragStartElement){const n=i(this.dragStartElement),o=i(e.target);t.offsetX-=n.x-o.x,t.offsetY-=n.y-o.y}return t}
18buildEvent(e){const{type:t,event:i,clientX:n,clientY:o,pauses:r}=e;let{offsetX:s,offsetY:a,pageX:l,pageY:c}=e;if(!Gd(s)||!Gd(a)){const e=this.element.getBoundingClientRect();s=n-e.left,a=o-e.top}if(!Gd(l)||!Gd(c)){const e=this.rootElement.getBoundingClientRect();l=n-e.left,c=o-e.top}const u={type:t,offsetX:s,offsetY:a,pageX:l,pageY:c,sourceEvent:i,consumed:!1,pauses:r,consume(){u.consumed=!0}};return u}}Ag.interactionDocuments=[],Ag.NULL_COORDS={clientX:-1/0,clientY:-1/0,pageX:-1/0,pageY:-1/0,offsetX:-1/0,offsetY:-1/0};class _g{constructor(e,t){this.states={},this.exclusiveAreas={},this.destroyFns=[],this.tooltip=e,this.destroyFns.push(t.addListener("hover",(e=>this.checkExclusiveRects(e))))}getRange(){return this.tooltip.range}updateTooltip(e,t,i){var n;null==i&&(i=null===(n=this.states[e])||void 0===n?void 0:n.content),this.states[e]={content:i,meta:t},this.applyStates()}updateExclusiveRect(e,t){t?this.exclusiveAreas[e]=t:delete this.exclusiveAreas[e]}removeTooltip(e){delete this.states[e],this.applyStates()}getTooltipMeta(e){var t;return null===(t=this.states[e])||void 0===t?void 0:t.meta}destroy(){for(const e of this.destroyFns)e()}checkExclusiveRects(e){let t;for(const[i,n]of Object.entries(this.exclusiveAreas))if(n.containsPoint(e.offsetX,e.offsetY)){t=i;break}t!==this.appliedExclusiveArea&&(this.appliedExclusiveArea=t,this.applyStates())}applyStates(){var e;const t=this.appliedExclusiveArea?[this.appliedExclusiveArea]:Object.keys(this.states);let i,n;if(t.reverse(),t.slice(0,1).forEach((e=>{var t;const{content:o,meta:r}=null!==(t=this.states[e])&&void 0!==t?t:{};i=o,n=r})),void 0===n||void 0===i)return this.appliedState=void 0,void this.tooltip.toggle(!1);if((null===(e=this.appliedState)||void 0===e?void 0:e.content)===i){const e=this.tooltip.isVisible();this.tooltip.show(n,void 0,e)}else this.tooltip.show(n,i);this.appliedState={content:i,meta:n}}static makeTooltipMeta(e,t,i,n){var o,r,s,a;const{pageX:l,pageY:c,offsetX:u,offsetY:d}=e,p={xOffset:i.series.tooltip.position.xOffset,yOffset:i.series.tooltip.position.yOffset},h={pageX:l,pageY:c,offsetX:u,offsetY:d,event:e,showArrow:i.series.tooltip.showArrow,position:p},f=null!==(r=null===(o=i.yBar)||void 0===o?void 0:o.upperPoint)&&void 0!==r?r:i.midPoint;if("node"===i.series.tooltip.position.type&&f){const{x:e,y:o}=f,r=i.series.contentGroup.inverseTransformPoint(e,o),s=t.element.getBoundingClientRect();return Object.assign(Object.assign({},h),{pageX:Math.round(s.left+n.scrollX+r.x),pageY:Math.round(s.top+n.scrollY+r.y),offsetX:Math.round(r.x),offsetY:Math.round(r.y)})}return h.enableInteraction=null!==(a=null===(s=i.series.tooltip.interaction)||void 0===s?void 0:s.enabled)&&void 0!==a&&a,h}}class Pg extends Cg{constructor(){super(...arguments),this.axes={}}updateAxes(e){var t;const i=new Set(Object.keys(this.axes));e.forEach((e=>{var t,n,o;i.delete(e.id),null!==(t=(n=this.axes)[o=e.id])&&void 0!==t||(n[o]=new Mg(e))})),i.forEach((e=>{delete this.axes[e]})),(null===(t=this.initialZoom)||void 0===t?void 0:t.newZoom)&&this.updateZoom(this.initialZoom.callerId,this.initialZoom.newZoom),this.initialZoom=void 0}updateZoom(e,t){0!==Object.keys(this.axes).length?(Object.values(this.axes).forEach((i=>{i.updateZoom(e,null===t||void 0===t?void 0:t[i.getDirection()])})),this.applyStates()):this.initialZoom={callerId:e,newZoom:t}}updateAxisZoom(e,t,i){var n;null===(n=this.axes[t])||void 0===n||n.updateZoom(e,i),this.applyStates()}getZoom(){let e,t;if(Object.values(this.axes).forEach((i=>{i.getDirection()===mc.X?e=i.getZoom():i.getDirection()===mc.Y&&(t=i.getZoom())})),e||t)return{x:e,y:t}}getAxisZoom(e){var t;return null===(t=this.axes[e])||void 0===t?void 0:t.getZoom()}getAxisZooms(){const e={};for(const[t,i]of Object.entries(this.axes))e[t]={direction:i.getDirection(),zoom:i.getZoom()};return e}applyStates(){const e=Object.values(this.axes).map((e=>e.applyStates())).some(Boolean);if(!e)return;const t=this.getZoom(),i={};for(const[n,o]of Object.entries(this.axes))i[n]=o.getZoom();this.listeners.dispatch("zoom-change",Object.assign(Object.assign({type:"zoom-change"},null!==t&&void 0!==t?t:{}),{axes:i}))}}class Mg{constructor(e){this.states={},this.axis=e;const[t=0,i=1]=e.visibleRange;this.currentZoom={min:t,max:i},this.states["__initial__"]=this.currentZoom}getDirection(){return this.axis.direction}updateZoom(e,t){delete this.states[e],null!=t&&(this.states[e]=Object.assign({},t))}getZoom(){return this.currentZoom}applyStates(){var e,t;const i=this.currentZoom,n=Object.keys(this.states)[Object.keys(this.states).length-1];return this.currentZoom=Object.assign({},this.states[n]),(null===i||void 0===i?void 0:i.min)!==(null===(e=this.currentZoom)||void 0===e?void 0:e.min)||(null===i||void 0===i?void 0:i.max)!==(null===(t=this.currentZoom)||void 0===t?void 0:t.max)}}class kg extends dp{constructor(){super(...arguments),this.layoutComplete="layout-complete"}addListener(e,t){if(this.isLayoutStage(e)||this.isLayoutComplete(e))return super.addListener(e,t);throw new Error(`AG Charts - unsupported listener type: ${e}`)}
18dispatchPerformLayout(e,t){return this.isLayoutStage(e)?this.getListenersByType(e).reduce(((e,t)=>{try{return t.handler(e)}catch(i){return Pa.errorOnce(i),e}}),t):t}dispatchLayoutComplete(e){this.dispatch(this.layoutComplete,e)}isLayoutStage(e){return e!==this.layoutComplete}isLayoutComplete(e){return e===this.layoutComplete}}function Ng({orientation:e,bboxes:t,maxHeight:i,maxWidth:n,itemPaddingY:o=0,itemPaddingX:r=0,forceResult:s=!1}){const a="horizontal"===e,l={max:a?n:i,fn:a?e=>e.width:e=>e.height,padding:a?r:o},c={max:a?i:n,fn:a?e=>e.height:e=>e.width,padding:a?o:r};let u=0;const d=[];while(u<t.length){const e=t.slice(u),i=Lg(e,u,l,c,s);if(!i)return;u+=i.processedBBoxCount,d.push(i.pageIndices)}return Fg(d,e,t,o,r)}function Lg(e,t,i,n,o){const r=1;let s=Vg(e,i);if(s<r){if(!o)return;s=r}for(let a=s;a>=r;a--){const s=Ig(e,t,a,i,n,o);if(null==s&&a<=r)return;if(null==s)continue;if("number"===typeof s){if(s<=r)return;a=s<a&&s>r?s:a;continue}const l=s.length*s[0].length;return{processedBBoxCount:l,pageIndices:s}}}function Ig(e,t,i,n,o,r){var s;const a=[];let l=0,c=0,u=[];const d=[];for(let p=0;p<e.length;p++){const h=(p+i)%i;0===h&&(l+=c,c=0,u.length>0&&a.push(u),u=[]);const f=n.fn(e[p])+n.padding;d[h]=Math.max(null!==(s=d[h])&&void 0!==s?s:0,f),c=Math.max(c,o.fn(e[p])+o.padding);const g=l+c,v=!r||a.length>0;if(g>o.max&&v){u=[];break}const y=d.reduce(((e,t)=>e+t),0);if(y>n.max&&!r)return d.length<i?d.length:void 0;u.push(p+t)}return u.length>0&&a.push(u),a.length>0?a:void 0}function Fg(e,t,i,n,o){let r=0,s=0;const a=e.map((e=>{"horizontal"===t&&(e=Gg(e));let a=0;const l=e.map((e=>{const t=e.map((e=>(a=Math.max(e,a),i[e])));let r=0,s=0;return t.forEach((e=>{r+=e.height+n,s=Math.max(s,e.width+o)})),{indices:e,bboxes:t,columnHeight:Math.ceil(r),columnWidth:Math.ceil(s)}}));let c=0,u=0;return l.forEach((e=>{c+=e.columnWidth,u=Math.max(u,e.columnHeight)})),r=Math.max(c,r),s=Math.max(u,s),{columns:l,startIndex:e[0][0],endIndex:a,pageWidth:c,pageHeight:u}}));return{pages:a,maxPageWidth:r,maxPageHeight:s}}function Gg(e){const t=[];for(const i of e[0])t.push([]);return e.forEach(((e,i)=>{e.forEach(((e,n)=>{t[n][i]=e}))})),t}function Vg(e,t){const i=e.length;let n=0;for(let o=0;o<i;o++)if(n+=t.fn(e[o])+t.padding,n>t.max){const e=i/o;return e<2?Math.ceil(i/2):o}return i}class Bg extends sp{updatePath(){const e=this.size/4.2;super.applyPath(e,Bg.moves)}}Bg.className="Cross",Bg.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}];class jg extends sp{updatePath(){const e=this.size/2;super.applyPath(e,jg.moves)}}jg.className="Diamond",jg.moves=[{x:0,y:-1,t:"move"},{x:1,y:1},{x:-1,y:1},{x:-1,y:-1},{x:1,y:-1}];class Hg extends sp{rad(e){return e/180*Math.PI}updatePath(){const{x:e,path:t,size:i,rad:n}=this,o=i/4,r=this.y+o/2;t.clear(),t.arc(e-o,r-o,o,n(130),n(330)),t.arc(e+o,r-o,o,n(220),n(50)),t.lineTo(e,r+o),t.closePath()}}Hg.className="Heart";class Wg extends sp{updatePath(){const e=this.size/3;super.applyPath(e,Wg.moves)}}Wg.className="Plus",Wg.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}];class Ug extends sp{updatePath(){const{path:e,x:t,y:i}=this,n=this.size/2;e.clear(),e.moveTo(this.align(t-n),this.align(i-n)),e.lineTo(this.align(t+n),this.align(i-n)),e.lineTo(this.align(t+n),this.align(i+n)),e.lineTo(this.align(t-n),this.align(i+n)),e.closePath()}}Ug.className="Square";class zg extends sp{updatePath(){const e=1.1*this.size;super.applyPath(e,zg.moves)}}zg.className="Triangle",zg.moves=[{x:0,y:-.48,t:"move"},{x:.5,y:.87},{x:-1,y:0}];const Kg={circle:ap,cross:Bg,diamond:jg,heart:Hg,plus:Wg,square:Ug,triangle:zg},Yg=Object.keys(Kg);function qg(e){return Yg.includes(e)}function Xg(e=Ug){return qg(e)?Kg[e]:"function"===typeof e?e:Ug}class $g extends ad{constructor(){super({name:"markerLabelGroup"}),this.label=new Kc,this._marker=new Ug,this._markerSize=15,this._spacing=8;const e=this.label;e.textBaseline="middle",e.fontSize=12,e.fontFamily="Verdana, sans-serif",e.fill="black",e.y=Vc.has.textMetrics?1:0,this.append([this.marker,e]),this.update()}set marker(e){this._marker!==e&&(this.removeChild(this._marker),this._marker=e,this.appendChild(e),this.update())}get marker(){return this._marker}set markerSize(e){this._markerSize!==e&&(this._markerSize=e,this.update())}get markerSize(){return this._markerSize}set spacing(e){this._spacing!==e&&(this._spacing=e,this.update())}get spacing(){return this._spacing}update(){const e=this.marker,t=this.markerSize;e.size=t,this.label.x=t/2+this.spacing}
18render(e){this.marker.opacity=this.opacity,this.label.opacity=this.opacity,super.render(e)}}$g.className="MarkerLabel",fa([eu("label"),ga("design:type",String)],$g.prototype,"text",void 0),fa([eu("label"),ga("design:type",String)],$g.prototype,"fontStyle",void 0),fa([eu("label"),ga("design:type",String)],$g.prototype,"fontWeight",void 0),fa([eu("label"),ga("design:type",Number)],$g.prototype,"fontSize",void 0),fa([eu("label"),ga("design:type",String)],$g.prototype,"fontFamily",void 0),fa([eu("label","fill"),ga("design:type",String)],$g.prototype,"color",void 0),fa([eu("marker","fill"),ga("design:type",String)],$g.prototype,"markerFill",void 0),fa([eu("marker","stroke"),ga("design:type",String)],$g.prototype,"markerStroke",void 0),fa([eu("marker","strokeWidth"),ga("design:type",Number)],$g.prototype,"markerStrokeWidth",void 0),fa([eu("marker","fillOpacity"),ga("design:type",Number)],$g.prototype,"markerFillOpacity",void 0),fa([eu("marker","strokeOpacity"),ga("design:type",Number)],$g.prototype,"markerStrokeOpacity",void 0);class Zg{constructor(){this.color="black",this.fontStyle=void 0,this.fontWeight=void 0,this.fontSize=12,this.fontFamily="Verdana, sans-serif"}}fa([fl(Fl),ga("design:type",String)],Zg.prototype,"color",void 0),fa([fl(Jl),ga("design:type",String)],Zg.prototype,"fontStyle",void 0),fa([fl(ec),ga("design:type",String)],Zg.prototype,"fontWeight",void 0),fa([fl(Hl(0)),ga("design:type",Number)],Zg.prototype,"fontSize",void 0),fa([fl(Al),ga("design:type",String)],Zg.prototype,"fontFamily",void 0);class Jg{constructor(){this.size=15,this.fill=void 0,this.fillOpacity=void 0,this.stroke=void 0,this.strokeWidth=1,this.strokeOpacity=1}}fa([fl(Hl(0)),ga("design:type",Object)],Jg.prototype,"size",void 0),fa([fl(Gl),ga("design:type",String)],Jg.prototype,"fill",void 0),fa([fl(Wl(0,1)),ga("design:type",Number)],Jg.prototype,"fillOpacity",void 0),fa([fl(Gl),ga("design:type",String)],Jg.prototype,"stroke",void 0),fa([fl(Hl(0)),ga("design:type",Number)],Jg.prototype,"strokeWidth",void 0),fa([fl(Hl(0,1)),ga("design:type",Number)],Jg.prototype,"strokeOpacity",void 0);class Qg{constructor(e){this.parent=e,this.shape=zg,this.size=15,this.padding=8}}fa([tu({changeValue(){this.parent.marker===this&&this.parent.onMarkerShapeChange()}}),ga("design:type",Object)],Qg.prototype,"shape",void 0),fa([fl(Hl(0)),ga("design:type",Object)],Qg.prototype,"size",void 0),fa([fl(Hl(0)),ga("design:type",Number)],Qg.prototype,"padding",void 0);class ev{constructor(e,t,i,n){this.chartUpdateCallback=e,this.pageUpdateCallback=t,this.interactionManager=i,this.cursorManager=n,this.id=Rc(this),this.group=new ad({name:"pagination"}),this.labelNode=new Kc,this.marker=new Qg(this),this.activeStyle=new Jg,this.inactiveStyle=new Jg,this.highlightStyle=new Jg,this.label=new Zg,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 zg,this._previousButton=new zg;const{labelNode:o}=this;o.textBaseline="middle",o.fontSize=12,o.fontFamily="Verdana, sans-serif",o.fill="black",o.y=Vc.has.textMetrics?1:0,this.group.append([this.nextButton,this.previousButton,o]),this.interactionManager.addListener("click",(e=>this.onPaginationClick(e))),this.interactionManager.addListener("hover",(e=>this.onPaginationMouseMove(e))),this.update(),this.updateMarkers()}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){switch(this._orientation=e,e){case"horizontal":this.previousButton.rotation=-Math.PI/2,this.nextButton.rotation=Math.PI/2;break;case"vertical":default: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(){const{size:e,padding:t}=this.marker;this.nextButton.size=e,this.previousButton.size=e,this.labelNode.x=e/2+t}updateNextButtonPosition(){const e=this.labelNode.computeBBox();this.nextButton.translationX=e.x+e.width+this.marker.size/2+this.marker.padding}updateLabel(){const{currentPage:e,totalPages:t,labelNode:i,label:{color:n,fontStyle:o,fontWeight:r,fontSize:s,fontFamily:a}}=this;i.text=`${e+1} / ${t}`,i.fill=n,i.fontStyle=o,i.fontWeight=r,i.fontSize=s,i.fontFamily=a}updateMarkers(){const{nextButton:e,previousButton:t,nextButtonDisabled:i,previousButtonDisabled:n,activeStyle:o,inactiveStyle:r,highlightStyle:s,highlightActive:a}=this,l=(e,t)=>
18t?r:e===a?s:o;this.updateMarker(e,l("next",i)),this.updateMarker(t,l("previous",n))}updateMarker(e,t){var i;const{size:n}=this.marker;e.size=n,e.fill=t.fill,e.fillOpacity=null!==(i=t.fillOpacity)&&void 0!==i?i:1,e.stroke=t.stroke,e.strokeWidth=t.strokeWidth,e.strokeOpacity=t.strokeOpacity}enableOrDisableButtons(){const{currentPage:e,totalPages:t}=this,i=0===t,n=e===t-1,o=0===e;this.nextButtonDisabled=n||i,this.previousButtonDisabled=o||i}nextButtonContainsPoint(e,t){return!this.nextButtonDisabled&&this.nextButton.containsPoint(e,t)}previousButtonContainsPoint(e,t){return!this.previousButtonDisabled&&this.previousButton.containsPoint(e,t)}onPaginationClick(e){const{offsetX:t,offsetY:i}=e;this.nextButtonContainsPoint(t,i)?(this.incrementPage(),this.onPaginationChanged(),e.consume()):this.previousButtonContainsPoint(t,i)&&(this.decrementPage(),this.onPaginationChanged(),e.consume())}onPaginationMouseMove(e){const{offsetX:t,offsetY:i}=e;this.nextButtonContainsPoint(t,i)?(this.cursorManager.updateCursor(this.id,"pointer"),this.highlightActive="next"):this.previousButtonContainsPoint(t,i)?(this.cursorManager.updateCursor(this.id,"pointer"),this.highlightActive="previous"):(this.cursorManager.updateCursor(this.id),this.highlightActive=void 0),this.updateMarkers(),this.chartUpdateCallback(lg.SCENE_RENDER)}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(){const e=Xg(this.marker.shape||zg);this.previousButton=new e,this.nextButton=new e,this.updatePositions(),this.updateMarkers(),this.chartUpdateCallback(lg.SCENE_RENDER)}attachPagination(e){e.append(this.group)}computeBBox(){return this.group.computeBBox()}}ev.className="Pagination";const tv=["horizontal","vertical"],iv=vl(((e,t)=>yl(e,t,(e=>tv.includes(e)))),"expecting an orientation keyword such as 'horizontal' or 'vertical'");class nv{constructor(){this.maxLength=void 0,this.color="black",this.fontStyle=void 0,this.fontWeight=void 0,this.fontSize=12,this.fontFamily="Verdana, sans-serif",this.formatter=void 0}}fa([fl(Wl(0)),ga("design:type",Number)],nv.prototype,"maxLength",void 0),fa([fl(Fl),ga("design:type",String)],nv.prototype,"color",void 0),fa([fl(Jl),ga("design:type",String)],nv.prototype,"fontStyle",void 0),fa([fl(ec),ga("design:type",String)],nv.prototype,"fontWeight",void 0),fa([fl(Hl(0)),ga("design:type",Number)],nv.prototype,"fontSize",void 0),fa([fl(Al),ga("design:type",String)],nv.prototype,"fontFamily",void 0),fa([fl(Tl),ga("design:type",Function)],nv.prototype,"formatter",void 0);class ov{constructor(){this.size=15,this._shape=void 0,this.padding=8,this.strokeWidth=void 0}set shape(e){var t;this._shape=e,null===(t=this.parent)||void 0===t||t.onMarkerShapeChange()}get shape(){return this._shape}}fa([fl(Hl(0)),ga("design:type",Object)],ov.prototype,"size",void 0),fa([fl(Hl(0)),ga("design:type",Number)],ov.prototype,"padding",void 0),fa([fl(Wl(0)),ga("design:type",Object)],ov.prototype,"strokeWidth",void 0);class rv{constructor(){this.marker=new ov,this.label=new nv,this.maxWidth=void 0,this.paddingX=16,this.paddingY=8,this.toggleSeriesVisible=!0}}fa([fl(Wl(0)),ga("design:type",Number)],rv.prototype,"maxWidth",void 0),fa([fl(Hl(0)),ga("design:type",Object)],rv.prototype,"paddingX",void 0),fa([fl(Hl(0)),ga("design:type",Object)],rv.prototype,"paddingY",void 0),fa([fl(Dl),ga("design:type",Boolean)],rv.prototype,"toggleSeriesVisible",void 0);class sv{constructor(){this.legendItemClick=void 0,this.legendItemDoubleClick=void 0}}fa([fl(Tl),ga("design:type",Function)],sv.prototype,"legendItemClick",void 0);class av{set data(e){this._data=e,this.updateGroupVisibility()}get data(){return this._data}set enabled(e){this._enabled=e,this.updateGroupVisibility()}get enabled(){return this._enabled}getOrientation(){if(void 0!==this.orientation)return this.orientation;switch(this.position){case"right":case"left":return"vertical";case"bottom":case"top":return"horizontal"}}constructor(e){this.ctx=e,this.id=Rc(this),this.group=new ad({name:"legend",layer:!0,zIndex:rp.LEGEND_ZINDEX}),this.itemSelection=ld.select(this.group,$g),this.oldSize=[0,0],this.pages=[],this.maxPageSize=[0,0],this.paginationTrackingIndex=0,this.item=new rv,this.listeners=new sv,this.truncatedItems=new Set,this._data=[],this._enabled=!0,this.position="bottom",this.maxWidth=void 0,this.maxHeight=void 0,this.reverseOrder=void 0,this.destroyFns=[],this.spacing=20,this.characterWidths=new Map,this.size=[0,0],this._visible=!0,this.item.marker.parent=this,this.pagination=new ev((t=>e.updateService.update(t)),(e=>this.updatePageNumber(e)),e.interactionManager,e.cursorManager),this.pagination.attachPagination(this.group),this.item.marker.parent=this;const t={bypassPause:["animation"]};this.destroyFns.push(e.interactionManager.addListener("click",(e=>this.checkLegendClick(e)),t),e.interactionManager.addListener("dblclick",(e=>this.checkLegendDoubleClick(e)),t),e.interactionManager.addListener("hover",(e=>this.handleLegendMouseMove(e))),e.layoutService.addListener("start-layout",(e=>this.positionLegend(e.shrinkRect))),(()=>this.detachLegend()))}destroy(){this.destroyFns.forEach((e=>e()))}onMarkerShapeChange(){this.itemSelection.clear(),this.group.markDirty(this.group,Cc.MINOR)}getCharacterWidths(e){const{characterWidths:t}=this;if(t.has(e))return t.get(e);const i={"...":Vc.getTextSize("...",e).width};return t.set(e,i),i}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.append(this.group)}detachLegend(){var e;null===(e=this.group.parent)||void 0===e||e.removeChild(this.group)}getItemLabel(e){const{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}performLayout(e,t){const{paddingX:i,paddingY:n,label:o,maxWidth:r,marker:{size:s,padding:a,shape:l},label:{maxLength:c=1/0,fontStyle:u,fontWeight:d,fontSize:p,fontFamily:h}}=this.item,f=[...this.data];this.reverseOrder&&f.reverse(),this.itemSelection.update(f);const g=[],v=qc(o),y=.8,m=null!==r&&void 0!==r?r:e*y,C=s+a+i;if(this.itemSelection.each(((e,t)=>{var i;const n=Xg(null!==l&&void 0!==l?l:t.marker.shape);e.marker&&e.marker instanceof n||(e.marker=new n),e.markerSize=s,e.spacing=a,e.fontStyle=u,e.fontWeight=d,e.fontSize=p,e.fontFamily=h;const o=null!==(i=t.itemId)&&void 0!==i?i:t.id,r=this.getItemLabel(t),f=(null!==r&&void 0!==r?r:"<unknown>").replace(/\r?\n/g," ");e.text=this.truncate(f,c,m,C,v,o),g.push(e.computeBBox())})),e=Math.max(1,e),t=Math.max(1,t),!isFinite(e))return!1;const b=this.size,w=this.oldSize;b[0]=e,b[1]=t,b[0]===w[0]&&b[1]===w[1]||(w[0]=b[0],w[1]=b[1]);const{pages:S,maxPageHeight:E,maxPageWidth:x}=this.updatePagination(g,e,t);this.pages=S,this.maxPageSize=[x-i,E-n];const O=this.pagination.currentPage,T=this.pages[O];this.pages.length<1||!T?this.visible=!1:(this.visible=!0,this.updatePositions(O),this.update())}truncate(e,t,i,n,o,r){const s="...",a=e.split("");let l=!1;e.length>t&&(e=`${e.substring(0,t)}`,l=!0);const c=Math.floor(n+Vc.getTextSize(e,o).width);if(c>i){let t="";const r=this.getCharacterWidths(o);let c=n+r[s];for(const e of a){if(r[e]||(r[e]=Vc.getTextSize(e,o).width),c+=r[e],c>i)break;t+=e}e=t,l=!0}return l?(e+=s,this.truncatedItems.add(r)):this.truncatedItems.delete(r),e}updatePagination(e,t,i){const n=this.getOrientation(),o=Math.min(this.paginationTrackingIndex,e.length);this.pagination.orientation=n,this.pagination.translationX=0,this.pagination.translationY=0;const{pages:r,maxPageHeight:s,maxPageWidth:a,paginationBBox:l,paginationVertical:c}=this.calculatePagination(e,t,i),u=r.findIndex((e=>e.endIndex>=o));this.pagination.currentPage=Math.min(Math.max(u,0),r.length-1);const{paddingX:d,paddingY:p}=this.item,h=8,f=a-d,g=s-p;let v=0,y=-l.y-this.item.marker.size/2;return c?y+=g+h:(v+=-l.x+f+h,y+=(g-l.height)/2),this.pagination.translationX=v,this.pagination.translationY=y,this.pagination.update(),this.pagination.updateMarkers(),{maxPageHeight:s,maxPageWidth:a,pages:r}}calculatePagination(e,t,i){var n,o,r;const{paddingX:s,paddingY:a}=this.item,l=this.getOrientation(),c=["left","right"].includes(this.position);let u=this.pagination.computeBBox(),d=new Pc(0,0,0,0),p=[],h=0,f=0,g=0;const v=e=>{const{width:t,height:i}=e;return t===u.width&&i===u.height},y=void 0!==this.maxWidth||void 0!==this.maxHeight;do{if(g++>10){Pa.warn("unable to find stable legend layout.");break}u=d;const v=t-(c?0:u.width),m=i-(c?u.height:0),C=Ng({orientation:l,bboxes:e,maxHeight:m,maxWidth:v,itemPaddingY:a,itemPaddingX:s,forceResult:y});p=null!==(n=null===C||void 0===C?void 0:C.pages)&&void 0!==n?n:[],h=null!==(o=null===C||void 0===C?void 0:C.maxPageWidth)&&void 0!==o?o:0,f=null!==(r=null===C||void 0===C?void 0:C.maxPageHeight)&&void 0!==r?r:0;const b=p.length;if(this.pagination.visible=b>1,this.pagination.totalPages=b,this.pagination.update(),d=this.pagination.computeBBox(),!this.pagination.visible)break}while(!v(d));return{maxPageWidth:h,maxPageHeight:f,pages:p,paginationBBox:u,paginationVertical:c}}updatePositions(e=0){const{item:{paddingY:t},itemSelection:i,pages:n}=this;if(n.length<1||!n[e])return;const{columns:o,startIndex:r,endIndex:s}=n[e];let a=0,l=0;const c=o.length,u=o[0].indices.length,d="horizontal"===this.getOrientation(),p=o[0].bboxes[0].height+t,h=[];i.each(((e,t,i)=>{var n,f;if(i<r||i>s)return void(e.visible=!1);const g=i-r;let v=0,y=0;d?(v=g%c,y=Math.floor(g/c)):(v=Math.floor(g/u),y=g%u),e.visible=!0;const m=o[v];m&&(l=p*y,a=null!==(n=h[y])&&void 0!==n?n:0,h[y]=(null!==(f=h[y])&&void 0!==f?f:0)+m.columnWidth,e.translationX=Math.floor(a),e.translationY=Math.floor(l))}))}updatePageNumber(e){const{pages:t}=this,{startIndex:i,endIndex:n}=t[e];0===i?this.paginationTrackingIndex=0:e===t.length-1?this.paginationTrackingIndex=n:this.paginationTrackingIndex=Math.floor((i+n)/2),this.pagination.update(),this.pagination.updateMarkers(),this.updatePositions(e),this.ctx.updateService.update(lg.SCENE_RENDER)}update(){const{label:{color:e},marker:t}=this.item;this.itemSelection.each(((i,n)=>{var o;const r=n.marker;i.markerFill=r.fill,i.markerStroke=r.stroke,i.markerStrokeWidth=null!==(o=t.strokeWidth)&&void 0!==o?o:Math.min(2,r.strokeWidth),i.markerFillOpacity=r.fillOpacity,i.markerStrokeOpacity=r.strokeOpacity,i.opacity=n.enabled?1:.5,i.color=e}))}getDatumForPoint(e,t){const i=[],n={dist:1/0,datum:void 0};for(const r of this.group.children){if(!r.visible)continue;if(!(r instanceof $g))continue;const o=r.computeBBox();if(o.grow(this.item.paddingX/2,"horizontal"),o.grow(this.item.paddingY/2,"vertical"),o.containsPoint(e,t))return r.datum;const s=e-o.x-this.item.paddingX/2,a=t-o.y-this.item.paddingY/2,l=Math.pow(s,2)+Math.pow(a,2),c=s>=0&&a>=0;c&&l<n.dist&&(n.dist=l,n.datum=r.datum),i.push(o)}const o=Pc.merge(i);if(o.containsPoint(e,t))return n.datum}computeBBox(){return this.group.computeBBox()}computePagedBBox(){const e=this.group.computeBBox();if(this.pages.length<=1)return e;const[t,i]=this.maxPageSize;return e.height=Math.max(i,e.height),e.width=Math.max(t,e.width),e}checkLegendClick(e){const{listeners:{legendItemClick:t},ctx:{dataService:i,highlightManager:n},item:{toggleSeriesVisible:o}}=this,{offsetX:r,offsetY:s}=e,a=this.computeBBox(),l=this.group.visible&&a.containsPoint(r,
18s),c=this.getDatumForPoint(r,s);if(!l||!c)return;const{id:u,itemId:d,enabled:p}=c,h=i.getSeries(),f=h.find((e=>e.id===u));if(!f)return;e.consume();let g=p;o&&(g=!p,this.ctx.chartEventManager.legendItemClick(f,d,g,c.legendItemName)),g?n.updateHighlight(this.id,{series:f,itemId:d,datum:void 0}):n.updateHighlight(this.id),this.ctx.updateService.update(lg.PROCESS_DATA,{forceNodeDataRefresh:!0}),null===t||void 0===t||t({type:"click",enabled:g,itemId:d,seriesId:f.id})}checkLegendDoubleClick(e){var t;const{listeners:{legendItemDoubleClick:i},ctx:{dataService:n},item:{toggleSeriesVisible:o}}=this,{offsetX:r,offsetY:s}=e;if("integrated"===this.ctx.mode)return;const a=this.computeBBox(),l=this.group.visible&&a.containsPoint(r,s),c=this.getDatumForPoint(r,s);if(!l||!c)return;const{id:u,itemId:d,seriesId:p}=c,h=n.getSeries(),f=h.find((e=>e.id===u));if(f){if(e.consume(),o){const e={},i=h.flatMap((e=>e.getLegendData("category")));i.forEach((t=>{var i,n;null!==(i=e[n=t.seriesId])&&void 0!==i||(e[n]=0),t.enabled&&e[t.seriesId]++}));const n=i.find((e=>e.itemId===d&&e.seriesId===p));this.ctx.chartEventManager.legendItemDoubleClick(f,d,null!==(t=null===n||void 0===n?void 0:n.enabled)&&void 0!==t&&t,e,null===n||void 0===n?void 0:n.legendItemName)}this.ctx.updateService.update(lg.PROCESS_DATA,{forceNodeDataRefresh:!0}),null===i||void 0===i||i({type:"dblclick",enabled:!0,itemId:d,seriesId:f.id})}}handleLegendMouseMove(e){var t;const{enabled:i,item:{toggleSeriesVisible:n},listeners:o}=this;if(!i)return;const r=this.computeBBox(),{pageX:s,pageY:a,offsetX:l,offsetY:c}=e,u=this.group.visible&&r.containsPoint(l,c);if(!u)return this.ctx.cursorManager.updateCursor(this.id),this.ctx.highlightManager.updateHighlight(this.id),void this.ctx.tooltipManager.removeTooltip(this.id);e.consume();const d=this.getDatumForPoint(l,c),p=u&&void 0!==d;if(!p)return this.ctx.cursorManager.updateCursor(this.id),void this.ctx.highlightManager.updateHighlight(this.id);const h=d?this.ctx.dataService.getSeries().find((e=>e.id===(null===d||void 0===d?void 0:d.id))):void 0;d&&this.truncatedItems.has(null!==(t=d.itemId)&&void 0!==t?t:d.id)?this.ctx.tooltipManager.updateTooltip(this.id,{pageX:s,pageY:a,offsetX:l,offsetY:c,event:e,showArrow:!1},ih({content:this.getItemLabel(d)})):this.ctx.tooltipManager.removeTooltip(this.id),(n||null!=o.legendItemClick||null!=o.legendItemDoubleClick)&&this.ctx.cursorManager.updateCursor(this.id,"pointer"),(null===d||void 0===d?void 0:d.enabled)&&h?this.ctx.highlightManager.updateHighlight(this.id,{series:h,itemId:null===d||void 0===d?void 0:d.itemId,datum:void 0}):this.ctx.highlightManager.updateHighlight(this.id)}positionLegend(e){const t=e.clone();if(!this.enabled||!this.data.length)return{shrinkRect:t};const[i,n]=this.calculateLegendDimensions(e);this.group.translationX=0,this.group.translationY=0,this.performLayout(i,n);const o=this.computePagedBBox(),r=()=>{switch(this.position){case"top":case"left":return 0;case"bottom":return e.height-o.height;case"right":default:return e.width-o.width}};if(this.visible){let i,n;switch(this.position){case"top":case"bottom":i=(e.width-o.width)/2,n=r(),t.shrink(o.height,this.position);break;case"left":case"right":default:i=r(),n=(e.height-o.height)/2,t.shrink(o.width,this.position)}this.group.translationX=Math.floor(-o.x+e.x+i),this.group.translationY=Math.floor(-o.y+e.y+n)}if(this.visible&&this.enabled&&this.data.length){const e=this.spacing;t.shrink(e,this.position);const i=o.clone();i.x+=this.group.translationX,i.y+=this.group.translationY,this.ctx.tooltipManager.updateExclusiveRect(this.id,i)}else this.ctx.tooltipManager.updateExclusiveRect(this.id);return{shrinkRect:t}}calculateLegendDimensions(e){const{width:t,height:i}=e,n=t/i,o=.5,r=.2,s=.25;let a,l;switch(this.position){case"top":case"bottom":const e=n<1?Math.min(o,r*(1/n)):r;a=this.maxWidth?Math.min(this.maxWidth,t):t,l=this.maxHeight?Math.min(this.maxHeight,i):Math.round(i*e);break;case"left":case"right":default:const c=n>1?Math.min(o,s*n):s;a=this.maxWidth?Math.min(this.maxWidth,t):Math.round(t*c),l=this.maxHeight?Math.min(this.maxHeight,i):i}return[a,l]}}av.className="Legend",fa([fl(Dl),ga("design:type",Object)],av.prototype,"_enabled",void 0),fa([fl(lc),ga("design:type",String)],av.prototype,"position",void 0),fa([fl(Wl(0)),ga("design:type",Number)],av.prototype,"maxWidth",void 0),fa([fl(Wl(0)),ga("design:type",Number)],av.prototype,"maxHeight",void 0),fa([fl(Rl),ga("design:type",Boolean)],av.prototype,"reverseOrder",void 0),fa([fl(iv),ga("design:type",String)],av.prototype,"orientation",void 0),fa([fl(Hl(0)),ga("design:type",Object)],av.prototype,"spacing",void 0);class lv{constructor(e,t,i){this.text=void 0,this.className=e,this.parentElement=t,this.document=i}show(e){var t,i;let n=this.element;if(n||(n=this.document.createElement("div"),n.className=this.className,this.element=n),n.style.position="absolute",n.style.left=`${e.x}px`,n.style.top=`${e.y}px`,n.style.width=`${e.width}px`,n.style.height=`${e.height}px`,this.renderer)n.innerHTML=this.renderer();else{const e=this.document.createElement("div");e.style.alignItems="center",e.style.boxSizing="border-box",e.style.display="flex",e.style.justifyContent="center",e.style.margin="8px",e.style.height="100%",e.style.font="12px Verdana, sans-serif",e.innerText=null!==(t=this.text)&&void 0!==t?t:"No data to display",n.append(e)}null===(i=this.parentElement)||void 0===i||i.append(n)}hide(){var e;null===(e=this.element)||void 0===e||e.remove(),this.element=void 0}}fa([fl(Tl),ga("design:type",Function)],lv.prototype,"renderer",void 0),fa([fl(_l),ga("design:type",String)],lv.prototype,"text",void 0);class cv{constructor(e){this.noData=new lv("ag-chart-no-data-overlay",e,e.ownerDocument)}}const uv=30;class dv{constructor(e){this.groups={},this.series={},this.expectedSeriesCount=1,this.mode="normal",this.rootGroup=e}setSeriesCount(e){this.expectedSeriesCount=e}requestGroup(e){var t,i,n,o;const{id:r,type:s,rootGroup:a,highlightGroup:l,annotationGroup:c,seriesGrouping:u}=e,{groupIndex:d=r}=null!==u&&void 0!==u?u:{};if(null!=this.series[r])throw new Error(`AG Charts - series already has an allocated layer: ${this.series[r]}`);0===Object.keys(this.series).length&&(this.mode=this.expectedSeriesCount>=uv?"aggressive-grouping":"normal"),null!==(t=(n=this.groups)[s])&&void 0!==t||(n[s]={});const p=this.lookupIdx(d);let h=this.groups[s][p];return h||(h=null!==(i=(o=this.groups[s])[p])&&void 0!==i?i:o[p]={seriesIds:[],group:this.rootGroup.appendChild(new ad({name:`${s}-content`,layer:!0,zIndex:rp.SERIES_LAYER_ZINDEX,zIndexSubOrder:e.getGroupZIndexSubOrder("data")})),highlight:this.rootGroup.appendChild(new ad({name:`${s}-highlight`,layer:!0,zIndex:rp.SERIES_LAYER_ZINDEX,zIndexSubOrder:e.getGroupZIndexSubOrder("highlight")})),annotation:this.rootGroup.appendChild(new ad({name:`${s}-annotation`,layer:!0,zIndex:rp.SERIES_LAYER_ZINDEX,zIndexSubOrder:e.getGroupZIndexSubOrder("annotation")}))}),this.series[r]={layerState:h,seriesConfig:e},h.seriesIds.push(r),h.group.appendChild(a),h.highlight.appendChild(l),h.annotation.appendChild(c),h.group}changeGroup(e){var t,i;const{id:n,seriesGrouping:o,type:r,rootGroup:s,highlightGroup:a,annotationGroup:l,oldGrouping:c}=e,{groupIndex:u=n}=null!==o&&void 0!==o?o:{};(null===(i=null===(t=this.groups[r])||void 0===t?void 0:t[u])||void 0===i?void 0:i.seriesIds.includes(n))||(null!=this.series[n]&&this.releaseGroup({id:n,seriesGrouping:c,type:r,rootGroup:s,highlightGroup:a,annotationGroup:l}),this.requestGroup(e))}releaseGroup(e){var t,i,n,o,r;const{id:s,seriesGrouping:a,rootGroup:l,highlightGroup:c,annotationGroup:u,type:d}=e,{groupIndex:p=s}=null!==a&&void 0!==a?a:{};if(null==this.series[s])throw new Error(`AG Charts - series doesn't have an allocated layer: ${s}`);const h=this.lookupIdx(p),f=null!==(i=null===(t=this.groups[d])||void 0===t?void 0:t[h])&&void 0!==i?i:null===(n=this.series[s])||void 0===n?void 0:n.layerState;if(f&&(f.seriesIds=f.seriesIds.filter((e=>e!==s)),f.group.removeChild(l),f.highlight.removeChild(c),f.annotation.removeChild(u)),0===(null===f||void 0===f?void 0:f.seriesIds.length))this.rootGroup.removeChild(f.group),this.rootGroup.removeChild(f.highlight),this.rootGroup.removeChild(f.annotation),delete this.groups[d][h],delete this.groups[d][s];else if((null===f||void 0===f?void 0:f.seriesIds.length)>0){const e=null===(r=this.series[null===(o=null===f||void 0===f?void 0:f.seriesIds)||void 0===o?void 0:o[0]])||void 0===r?void 0:r.seriesConfig;f.group.zIndexSubOrder=null===e||void 0===e?void 0:e.getGroupZIndexSubOrder("data"),f.highlight.zIndexSubOrder=null===e||void 0===e?void 0:e.getGroupZIndexSubOrder("highlight"),f.annotation.zIndexSubOrder=null===e||void 0===e?void 0:e.getGroupZIndexSubOrder("annotation")}delete this.series[s]}lookupIdx(e){return"normal"===this.mode?e:"string"!==typeof e||(e=Number(e.split("-").slice(-1)[0]),e)?Math.floor(Math.max(Math.min(e/this.expectedSeriesCount,1),0)*uv):0}destroy(){for(const e of Object.values(this.groups))for(const t of Object.values(e))this.rootGroup.removeChild(t.group),this.rootGroup.removeChild(t.highlight),this.rootGroup.removeChild(t.annotation);this.groups={},this.series={}}}class pv{constructor(){this.groups={}}registerSeries({id:e,seriesGrouping:t,visible:i,type:n}){var o,r;t&&(null!==(o=(r=this.groups)[n])&&void 0!==o||(r[n]={}),this.groups[n][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}){var i;if(!t)return{visibleGroupCount:1,index:0};const n=[...Object.entries(null!==(i=this.groups[e])&&void 0!==i?i:{}).filter((([e,t])=>t.visible)).reduce(((e,[t,i])=>(i.visible&&e.add(i.grouping.groupIndex),e)),new Set).values()];return n.sort(((e,t)=>e-t)),{visibleGroupCount:n.length,index:n.indexOf(t.groupIndex)}}}class hv{constructor(e,t){this.chartLike=e,this.layoutService=t,this.destroyFns=[],this.destroyFns.push(this.layoutService.addListener("layout-complete",(e=>this.layoutComplete(e))),this.layoutService.addListener("start-layout",(e=>this.positionPadding(e.shrinkRect))),this.layoutService.addListener("start-layout",(e=>this.positionCaptions(e.shrinkRect))))}destroy(){this.destroyFns.forEach((e=>e()))}layoutComplete({clipSeries:e,series:{paddedRect:t}}){const{seriesArea:i,seriesRoot:n}=this.chartLike;i.clip||e?n.setClipRectInGroupCoordinateSpace(t):n.setClipRectInGroupCoordinateSpace()}positionPadding(e){const{padding:t}=this.chartLike;return e.shrink(t.left,"left"),e.shrink(t.top,"top"),e.shrink(t.right,"right"),e.shrink(t.bottom,"bottom"),{shrinkRect:e}}positionCaptions(e){var t,i,n,o;const{title:r,subtitle:s,footnote:a}=this.chartLike,l=e.clone(),c=t=>{var i;const n=e.height/10,o=null!==(i=t.lineHeight)&&void 0!==i?i:t.fontSize*Kc.defaultLineHeightRatio,r=e.width,s=Math.max(o,n);t.computeTextWrap(r,s)},u=(e,t)=>
18{const i=l.y;e.node.x=l.x+l.width/2,e.node.y=i,e.node.textBaseline="top",c(e);const n=e.node.computeBBox(),o=Math.ceil(n.y-i+n.height+t);l.shrink(o,"top")},d=(e,t)=>{const i=l.y+l.height;e.node.x=l.x+l.width/2,e.node.y=i,e.node.textBaseline="bottom",c(e);const n=e.node.computeBBox(),o=Math.ceil(i-n.y+t);l.shrink(o,"bottom")};if(s&&(s.node.visible=null!==(t=s.enabled)&&void 0!==t&&t),r&&(r.node.visible=r.enabled,r.node.visible)){const e=(null===s||void 0===s?void 0:s.node.visible)?iu.SMALL_PADDING:iu.LARGE_PADDING,t=null!==(i=r.spacing)&&void 0!==i?i:e;u(r,t)}return s&&s.node.visible&&u(s,null!==(n=s.spacing)&&void 0!==n?n:0),a&&(a.node.visible=a.enabled,a.node.visible&&d(a,null!==(o=a.spacing)&&void 0!==o?o:0)),{shrinkRect:l}}}class fv extends dp{constructor(e){super(),this.updateCallback=e}update(e=lg.FULL,{forceNodeDataRefresh:t=!1,skipAnimations:i=!1}={}){this.updateCallback(e,{forceNodeDataRefresh:t,skipAnimations:i})}dispatchUpdateComplete(e){const t={type:"update-complete",minRect:e};this.dispatch("update-complete",t)}}function gv(e){let t,n;if(null!=e.window)t=e.window;else if("undefined"!==typeof window)t=window;else{if("undefined"===typeof i.g)throw new Error("AG Charts - unable to resolve global window");t=i.g.window}
18if(null!=e.document)n=e.document;else if("undefined"!==typeof document)n=document;else{if("undefined"===typeof i.g)throw new Error("AG Charts - unable to resolve global document");n=i.g.document}return{document:n,window:t,overrideDevicePixelRatio:e.overrideDevicePixelRatio,sceneMode:e.sceneMode}}class vv{constructor(){this.clip=void 0,this.padding=new tf(0)}}fa([fl(Rl),ga("design:type",Boolean)],vv.prototype,"clip",void 0);class yv extends pp{getOptions(){var e;const{queuedUserOptions:t}=this,i=null!==(e=t[t.length-1])&&void 0!==e?e:this.userOptions;return Ya([i])}autoSizeChanged(e){const{style:t}=this.element;if(e){if(t.display="block",t.width="100%",t.height="100%",!this._lastAutoSize)return;this.resize(void 0,void 0,"autoSize option")}else t.display="inline-block",t.width="auto",t.height="auto"}download(e,t){this.scene.download(e,t)}get destroyed(){return this._destroyed}constructor(e,t){var i;super(),this.id=Rc(this),this.processedOptions={},this.userOptions={},this.queuedUserOptions=[],this.seriesRoot=new ad({name:`${this.id}-Series-root`}),this.debug=Ia.create(),this.extraDebugStats={},this.container=void 0,this.data=[],this._firstAutoSize=!0,this.padding=new tf(20),this.seriesArea=new vv,this.title=void 0,this.subtitle=void 0,this.footnote=void 0,this.mode="standalone",this._destroyed=!1,this._destroyFns=[],this.modules={},this.legendModules={},this.processors=[],this.legends=new Map,this._pendingFactoryUpdatesCount=0,this._performUpdateNoRenderCount=0,this._performUpdateType=lg.NONE,this._performUpdateSkipAnimations=!1,this.updateShortcutCount=0,this.seriesToUpdate=new Set,this.updateMutex=new ig,this.updateRequestors={},this.performUpdateTrigger=og((({count:e})=>va(this,void 0,void 0,(function*(){this._destroyed||this.updateMutex.acquire((()=>va(this,void 0,void 0,(function*(){try{yield this.performUpdate(e)}catch(t){this._lastPerformUpdateError=t,Pa.error("update error",t)}}))))})))),this._axes=[],this._series=[],this.lastInteractionEvent=void 0,this.pointerScheduler=ng((()=>{this.lastInteractionEvent&&this.handlePointer(this.lastInteractionEvent),this.lastInteractionEvent=void 0})),this.onSeriesNodeClick=e=>{const t=Object.assign(Object.assign({},e),{type:"seriesNodeClick"});Object.defineProperty(t,"series",{enumerable:!1,get:()=>e.series}),this.fireEvent(t)},this.onSeriesNodeDoubleClick=e=>{const t=Object.assign(Object.assign({},e),{type:"seriesNodeDoubleClick"});this.fireEvent(t)},this.specialOverrides=gv(e);const{window:n,document:o}=this.specialOverrides,r=null===t||void 0===t?void 0:t.scene,s=null!==(i=null===t||void 0===t?void 0:t.element)&&void 0!==i?i:o.createElement("div"),a=null===t||void 0===t?void 0:t.container,l=new ad({name:"root"});l.visible=!1,l.append(this.seriesRoot),this.axisGridGroup=new ad({name:"Axes-Grids",layer:!0,zIndex:rp.AXIS_GRID_ZINDEX}),l.appendChild(this.axisGridGroup),this.axisGroup=new ad({name:"Axes",layer:!0,zIndex:rp.AXIS_ZINDEX}),l.appendChild(this.axisGroup),this.element=s,s.classList.add("ag-chart-wrapper"),s.style.position="relative",this.scene=null!==r&&void 0!==r?r:new Qf(this.specialOverrides),this.scene.root=l,this.scene.container=s,this.autoSize=!0,this.chartEventManager=new Eg,this.cursorManager=new xg(s),this.highlightManager=new Og,this.interactionManager=new Ag(s,o,n),this.zoomManager=new Pg,this.dataService=new mg((()=>this.series)),this.layoutService=new kg,this.updateService=new fv(((e=lg.FULL,{forceNo
18deDataRefresh:t,skipAnimations:i})=>this.update(e,{forceNodeDataRefresh:t,skipAnimations:i}))),this.seriesStateManager=new pv,this.seriesLayerManager=new dv(this.seriesRoot),this.callbackCache=new tg,this.animationManager=new wg(this.interactionManager,this.updateMutex),this.animationManager.skip(),this.animationManager.play(),this.processors=[new hv(this,this.layoutService)],this.tooltip=new sh(this.scene.canvas.element,o,n,o.body),this.tooltipManager=new _g(this.tooltip,this.interactionManager),this.overlays=new cv(this.element),this.highlight=new ag,this.container=a,sg.observe(this.element,(e=>this.rawResize(e))),this._destroyFns.push(this.interactionManager.addListener("click",(e=>this.onClick(e))),this.interactionManager.addListener("dblclick",(e=>this.onDoubleClick(e))),this.interactionManager.addListener("hover",(e=>this.onMouseMove(e))),this.interactionManager.addListener("leave",(e=>this.onLeave(e))),this.interactionManager.addListener("page-left",(()=>this.destroy())),this.interactionManager.addListener("wheel",(()=>this.disablePointer())),this.interactionManager.addListener("drag-start",(()=>this.disablePointer())),this.animationManager.addListener("animation-frame",(e=>{this.update(lg.SCENE_RENDER)})),this.highlightManager.addListener("highlight-change",(e=>this.changeHighlightDatum(e))),this.zoomManager.addListener("zoom-change",(e=>this.update(lg.PROCESS_DATA,{forceNodeDataRefresh:!0,skipAnimations:!0})))),this.legend=this.attachLegend("category",av)}addModule(e){if(null!=this.modules[e.optionsKey])throw new Error("AG Charts - module already initialised: "+e.optionsKey);const t=new e.instanceConstructor(this.getModuleContext());this.modules[e.optionsKey]={instance:t},this[e.optionsKey]=t}removeModule(e){var t;null===(t=this.modules[e.optionsKey])||void 0===t||t.instance.destroy(),delete this.modules[e.optionsKey],delete this[e.optionsKey]}attachLegend(e,t){const i=new t(this.getModuleContext());return this.legends.set(e,i),i.attachLegend(this.scene.root),i}addLegendModule(e){if(null!=this.modules[e.optionsKey])throw new Error("AG Charts - module already initialised: "+e.optionsKey);const t=this.attachLegend(e.identifier,e.instanceConstructor);this.modules[e.optionsKey]={instance:t},this[e.optionsKey]=t}removeLegendModule(e){this.legends.delete(e.identifier),this.removeModule(e)}isModuleEnabled(e){return null!=this.modules[e.optionsKey]}getModuleContext(){const{scene:e,animationManager:t,chartEventManager:i,cursorManager:n,highlightManager:o,interactionManager:r,tooltipManager:s,zoomManager:a,dataService:l,layoutService:c,updateService:u,seriesStateManager:d,seriesLayerManager:p,mode:h,callbackCache:f,specialOverrides:{window:g,document:v}}=this;return{window:g,document:v,scene:e,animationManager:t,chartEventManager:i,cursorManager:n,highlightManager:o,interactionManager:r,tooltipManager:s,zoomManager:a,dataService:l,layoutService:c,updateService:u,mode:h,seriesStateManager:d,seriesLayerManager:p,callbackCache:f}}destroy(e){if(this._destroyed)return;const t=null===e||void 0===e?void 0:e.keepTransferableResources;let i;this._performUpdateType=lg.NONE,this._destroyFns.forEach((e=>e())),this.processors.forEach((e=>e.destroy())),this.tooltipManager.destroy(),this.tooltip.destroy(),Object.values(this.legends).forEach((e=>e.destroy())),this.legends.clear(),this.overlays.noData.hide(),sg.unobserve(this.element);for(const n of Object.keys(this.modules))this.removeModule({optionsKey:n});return this.interactionManager.destroy(),this.animationManager.stop(),t?(this.scene.strip(),i={container:this.container,scene:this.scene,element:this.element}):(this.scene.destroy(),this.container=void 0),this.removeAllSeries(),this.seriesLayerManager.destroy(),this.axes.forEach((e=>e.destroy())),this.axes=[],this.callbackCache.invalidateCache(),this._destroyed=!0,i}disablePointer(e=!1){e||this.tooltipManager.removeTooltip(this.id),this.highlightManager.updateHighlight(this.id),this.lastInteractionEvent&&(this.lastInteractionEvent=void 0)}requestFactoryUpdate(e){this._pendingFactoryUpdatesCount++,this.updateMutex.acquire((()=>va(this,void 0,void 0,(function*(){yield e(),this._pendingFactoryUpdatesCount--}))))}get performUpdateType(){return this._performUpdateType}get lastPerformUpdateError(){return this._lastPerformUpdateError}update(e=lg.FULL,t){var i,n;
18const{forceNodeDataRefresh:o=!1,skipAnimations:r,seriesToUpdate:s=this.series,newAnimationBatch:a}=null!==t&&void 0!==t?t:{};o&&this.series.forEach((e=>e.markNodeDataDirty()));for(const l of s)this.seriesToUpdate.add(l);if(r&&(this.animationManager.skipCurrentBatch(),this._performUpdateSkipAnimations=!0),a&&(this.animationManager.isActive()?this._performUpdateSkipAnimations=!0:null!==(i=this._performUpdateSkipAnimations)&&void 0!==i||(this._performUpdateSkipAnimations=!1)),Ia.check(!0)){let t=null!==(n=(new Error).stack)&&void 0!==n?n:"<unknown>";t=t.replace(/\([^)]*/g,""),this.updateRequestors[t]=e}e<this._performUpdateType&&(this._performUpdateType=e,this.performUpdateTrigger.schedule(null===t||void 0===t?void 0:t.backOffMs))}performUpdate(e){var t;return va(this,void 0,void 0,(function*(){const{_performUpdateType:i,extraDebugStats:n}=this,o=[...this.seriesToUpdate];this._performUpdateType=lg.NONE,this.seriesToUpdate.clear(),0===this.updateShortcutCount&&i<lg.SCENE_RENDER&&this.animationManager.startBatch(this._performUpdateSkipAnimations),this.debug("Chart.performUpdate() - start",lg[i]);const r={start:performance.now()};switch(i){case lg.FULL:case lg.PROCESS_DATA:yield this.processData(),this.disablePointer(!0),r["🏭"]=performance.now();case lg.PERFORM_LAYOUT:if(this.checkUpdateShortcut(lg.PERFORM_LAYOUT))break;if(!this.checkFirstAutoSize(o))break;yield this.processLayout(),r["⌖"]=performance.now();case lg.SERIES_UPDATE:if(this.checkUpdateShortcut(lg.SERIES_UPDATE))break;const{seriesRect:e}=this,s=[...o].map((t=>t.update({seriesRect:e})));yield Promise.all(s),r["🤔"]=performance.now();case lg.TOOLTIP_RECALCULATION:if(this.checkUpdateShortcut(lg.TOOLTIP_RECALCULATION))break;const a=this.tooltipManager.getTooltipMeta(this.id),l="hover"===(null===(t=null===a||void 0===a?void 0:a.event)||void 0===t?void 0:t.type);i<=lg.SERIES_UPDATE&&l&&this.handlePointer(a.event),r["↖"]=performance.now();case lg.SCENE_RENDER:if(this.checkUpdateShortcut(lg.SCENE_RENDER))break;n["updateShortcutCount"]=this.updateShortcutCount,yield this.scene.render({debugSplitTimes:r,extraDebugStats:n}),this.extraDebugStats={};case lg.NONE:this.updateShortcutCount=0,this.updateRequestors={},this._performUpdateSkipAnimations=void 0,this.animationManager.endBatch()}this.updateService.dispatchUpdateComplete(this.getMinRect());const s=performance.now();this.debug("Chart.performUpdate() - end",{chart:this,durationMs:Math.round(100*(s-r["start"]))/100,count:e,performUpdateType:lg[i]})}))}checkUpdateShortcut(e){const t=3;return this.updateShortcutCount>t?(Pa.warn(`exceeded the maximum number of simultaneous updates (${t+1}), discarding changes and rendering`,this.updateRequestors),!1):this.performUpdateType<=e&&(this.updateShortcutCount++,!0)}checkFirstAutoSize(e){if(this.autoSize&&!this._lastAutoSize){const t=this._performUpdateNoRenderCount++,i=10*(2^t);if(t<8)return this.update(lg.PERFORM_LAYOUT,{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}set axes(e){const t=new Set;this._axes.forEach((e=>{e.detachAxis(this.axisGroup,this.axisGridGroup),t.add(e)})),this._axes=e.filter((e=>!e.linkedTo)).concat(e.filter((e=>e.linkedTo))),this._axes.forEach((e=>{e.attachAxis(this.axisGroup,this.axisGridGroup),t.delete(e)})),this.zoomManager.updateAxes(this._axes),t.forEach((e=>e.destroy()))}get axes(){return this._axes}set series(e){this.removeAllSeries(),this.seriesLayerManager.setSeriesCount(e.length),e.forEach((e=>this.addSeries(e)))}get series(){return this._series}addSeries(e){const{series:t}=this,i=t.indexOf(e)<0;return!!i&&(t.push(e),null==e.rootGroup.parent&&this.seriesLayerManager.requestGroup(e),this.initSeries(e),!0)}initSeries(e){const t=this;e.chart={get mode(){return t.mode},get seriesRect(){return t.seriesRect},placeLabels(){return t.placeLabels()}},e.setChartData(this.data),this.addSeriesListeners(e),e.addChartEventListeners()}removeAllSeries(){this.series.forEach((e=>{e.removeEventListener("nodeClick",this.onSeriesNodeClick),e.removeEventListener("nodeDoubleClick",this.onSeriesNodeDoubleClick),e.destroy(),e.chart=void 0})),this._series=[]}addSeriesListeners(e){this.hasEventListener("seriesNodeClick")&&e.addEventListener("nodeClick",this.onSeriesNodeClick),this.hasEventListener("seriesNodeDoubleClick")&&e.addEventListener("nodeDoubleClick",this.onSeriesNodeDoubleClick)}
18updateAllSeriesListeners(){this.series.forEach((e=>{e.removeEventListener("nodeClick",this.onSeriesNodeClick),e.removeEventListener("nodeDoubleClick",this.onSeriesNodeDoubleClick),this.addSeriesListeners(e)}))}assignSeriesToAxes(){this.axes.forEach((e=>{e.boundSeries=this.series.filter((t=>{const i=t.axes[e.direction];return i===e}))}))}assignAxesToSeries(){const e={};this.axes.forEach((t=>{var i;const n=t.direction,o=null!==(i=e[n])&&void 0!==i?i:e[n]=[];o.push(t)})),this.series.forEach((t=>{t.directions.forEach((i=>{const n=e[i];if(!n)return void Pa.warnOnce(`no available axis for direction [${i}]; check series and axes configuration.`);const o=t.getKeys(i),r=this.findMatchingAxis(n,o);r?t.axes[i]=r:Pa.warnOnce(`no matching axis for direction [${i}] and keys [${o}]; check series and axes configuration.`)}))}))}findMatchingAxis(e,t){for(const i of e){const e=i.keys;if(!e.length)return i;if(t)for(const n of t)if(e.indexOf(n)>=0)return i}}rawResize(e){var t;let{width:i,height:n}=e;if(i=Math.floor(i),n=Math.floor(n),!this.autoSize)return;if(0===i&&0===n)return;const[o=0,r=0]=null!==(t=this._lastAutoSize)&&void 0!==t?t:[];o===i&&r===n||(this._lastAutoSize=[i,n],this.resize(void 0,void 0,"SizeMonitor"))}resize(e,t,i){var n,o,r,s;if(null!==e&&void 0!==e||(e=null!==(n=this.width)&&void 0!==n?n:this.autoSize?null===(o=this._lastAutoSize)||void 0===o?void 0:o[0]:this.scene.canvas.width),null!==t&&void 0!==t||(t=null!==(r=this.height)&&void 0!==r?r:this.autoSize?null===(s=this._lastAutoSize)||void 0===s?void 0:s[1]:this.scene.canvas.height),this.debug(`Chart.resize() from ${i}`,{width:e,height:t,stack:(new Error).stack}),e&&t&&Number.isFinite(e)&&Number.isFinite(t)&&this.scene.resize(e,t)){this.disablePointer(),this.animationManager.reset();let e=!0;this.autoSize&&this._firstAutoSize&&(e=!1,this._firstAutoSize=!1),this.update(lg.PERFORM_LAYOUT,{forceNodeDataRefresh:!0,skipAnimations:e})}}processData(){return va(this,void 0,void 0,(function*(){this.series.some((e=>e.canHaveAxes))&&(this.assignAxesToSeries(),this.assignSeriesToAxes());const e=new yg(this.mode),t=this.series.map((t=>t.processData(e)));yield e.execute(),yield Promise.all(t),yield this.updateLegend()}))}placeLabels(){const e=[],t=[];for(const o of this.series){if(!o.visible)continue;const i=o.getLabelData();i&&lf(i[0])&&(t.push(i),e.push(o))}const{seriesRect:i}=this,n=i&&t.length>0?cf(t,{x:0,y:0,width:i.width,height:i.height}):[];return new Map(n.map(((t,i)=>[e[i],t])))}updateLegend(){return va(this,void 0,void 0,(function*(){this.legends.forEach(((e,t)=>{const i=e=>e.every((e=>"category"===e.legendType)),n=this.series.filter((e=>e.showInLegend)).flatMap((e=>e.getLegendData(t)));i(n)&&this.validateCategoryLegendData(n),e.data=n}))}))}validateCategoryLegendData(e){const t={};e.forEach((e=>{var i,n,o,r,s;const a=null===(i=this.series.find((t=>t.id===e.seriesId)))||void 0===i?void 0:i.type;a&&(null!==(n=t[a])&&void 0!==n||(t[a]={}),null!==(o=(r=t[a])[s=e.label.text])&&void 0!==o||(r[s]=new Set),null!=e.marker.fill&&t[a][e.label.text].add(e.marker.fill))}));for(const i of Object.values(t))for(const[e,t]of Object.entries(i))t.size>1&&Pa.warnOnce(`legend item '${e}' has multiple fill colors, this may cause unexpected behaviour.`)}processLayout(){var e;return va(this,void 0,void 0,(function*(){const t=this.animationRect;yield this.performLayout(),t&&!(null===(e=this.animationRect)||void 0===e?void 0:e.equals(t))&&this.animationManager.skipCurrentBatch(),this.handleNoDataOverlay(),this.debug("Chart.performUpdate() - seriesRect",this.seriesRect)}))}performLayout(){return va(this,void 0,void 0,(function*(){this.scene.root&&(this.scene.root.visible=!0);const{width:e,height:t}=this.scene;let i={shrinkRect:new Pc(0,0,e,t)};return i=this.layoutService.dispatchPerformLayout("start-layout",i),i=this.layoutService.dispatchPerformLayout("before-series",i),i.shrinkRect}))}pickSeriesNode(e,t,i){var n,o;const r=performance.now(),s=t?[bp.EXACT_SHAPE_MATCH]:void 0,a=[...this.series].reverse();let l;for(const c of a){if(!c.visible||!c.rootGroup.visible)continue;const{match:t,distance:o}=null!==(n=c.pickNode(e,s))&&void 0!==n?n:{};if(t&&null!=o&&((!l||l.distance>o)&&o<=(null!==i&&void 0!==i?i:1/0)&&(l={series:c,distance:o,datum:t}),0===o))break}return this.extraDebugStats["pickSeriesNode"]=Math.round((null!==(o=this.extraDebugStats["pickSeriesNode"])&&void 0!==o?o:0)+(performance.now()-r)),l}onMouseMove(e){this.lastInteractionEvent=e,this.pointerScheduler.schedule(),this.extraDebugStats["mouseX"]=e.offsetX,this.extraDebugStats["mouseY"]=e.offsetY,this.update(lg.SCENE_RENDER)}onLeave(e){this.tooltip.pointerLeftOntoTooltip(e)||this.disablePointer()}handlePointer(e){const{lastPick:t,hoverRect:i}=this,{offsetX:n,offsetY:o}=e,r=(e=!1)=>{t&&this.disablePointer(e)};(null===i||void 0===i?void 0:i.containsPoint(n,o))?(this.handlePointerTooltip(e,r),this.handlePointerNode(e)):r()}handlePointerTooltip(e,t){const{lastPick:i,tooltip:n}=this,{range:o}=n,{offsetX:r,offsetY:s}=e;let a;
18"number"===typeof o&&Number.isFinite(o)&&(a=o);const l=this.pickSeriesNode({x:r,y:s},"exact"===o,a);if(!l)return this.tooltipManager.removeTooltip(this.id),void("tooltip"===this.highlight.range&&t(!0));const c="node"===this.highlight.range||!i||i.datum!==l.datum;let u;c?(u=l.series.getTooltipHtml(l.datum),"tooltip"===this.highlight.range&&this.highlightManager.updateHighlight(this.id,l.datum)):i&&(i.event=e.sourceEvent);const d=null!=a,p=this.tooltip.enabled&&l.series.tooltip.enabled,h="exact"===o&&0===l.distance,f="nearest"===o||d||h,g=p&&f&&(!c||void 0!==u),v=_g.makeTooltipMeta(e,this.scene.canvas,l.datum,this.specialOverrides.window);g&&this.tooltipManager.updateTooltip(this.id,v,u)}handlePointerNode(e){const t=this.checkSeriesNodeRange(e,((e,t)=>{(e.hasEventListener("nodeClick")||e.hasEventListener("nodeDoubleClick"))&&this.cursorManager.updateCursor("chart","pointer"),"node"===this.highlight.range&&this.highlightManager.updateHighlight(this.id,t)}));t||(this.cursorManager.updateCursor("chart"),"node"===this.highlight.range&&this.highlightManager.updateHighlight(this.id))}onClick(e){this.checkSeriesNodeClick(e)?this.update(lg.SERIES_UPDATE):this.fireEvent({type:"click",event:e.sourceEvent})}onDoubleClick(e){this.checkSeriesNodeDoubleClick(e)?this.update(lg.SERIES_UPDATE):this.fireEvent({type:"doubleClick",event:e.sourceEvent})}checkSeriesNodeClick(e){return this.checkSeriesNodeRange(e,((t,i)=>t.fireNodeClickEvent(e.sourceEvent,i)))}checkSeriesNodeDoubleClick(e){return this.checkSeriesNodeRange(e,((t,i)=>t.fireNodeDoubleClickEvent(e.sourceEvent,i)))}checkSeriesNodeRange(e,t){const i=this.pickSeriesNode({x:e.offsetX,y:e.offsetY},!1),n=null===i||void 0===i?void 0:i.datum,o=null===n||void 0===n?void 0:n.series.nodeClickRange;let r;"number"===typeof o&&Number.isFinite(o)&&(r=o);let s=this.pickSeriesNode({x:e.offsetX,y:e.offsetY},!0);if(s?this.highlightManager.updatePicked(this.id,s.datum):this.highlightManager.updatePicked(this.id),n&&"nearest"===o)return t(n.series,n),!0;if("exact"!==o&&(s=this.pickSeriesNode({x:e.offsetX,y:e.offsetY},!1,r)),!s)return!1;const a=null!=r,l="exact"===o&&0===s.distance;return!(!a&&!l)&&(t(s.series,s.datum),!0)}changeHighlightDatum(e){var t,i;const n=new Set,{series:o,datum:r}=null!==(t=e.currentHighlight)&&void 0!==t?t:{},{series:s,datum:a}=null!==(i=e.previousHighlight)&&void 0!==i?i:{};s&&n.add(s),o&&n.add(o),(null===s||void 0===s?void 0:s.cursor)&&a&&this.cursorManager.updateCursor(s.id),(null===o||void 0===o?void 0:o.cursor)&&r&&this.cursorManager.updateCursor(o.id,o.cursor),this.lastPick=e.currentHighlight?{datum:e.currentHighlight}:void 0;const l=null==o||null==s;l?this.update(lg.SERIES_UPDATE):this.update(lg.SERIES_UPDATE,{seriesToUpdate:n})}waitForUpdate(e=5e3){return va(this,void 0,void 0,(function*(){const t=performance.now();this._pendingFactoryUpdatesCount>0&&(yield this.updateMutex.waitForClearAcquireQueue());while(this._performUpdateType!==lg.NONE){if(performance.now()-t>e)throw new Error("waitForUpdate() timeout reached.");yield eg(5)}yield this.updateMutex.waitForClearAcquireQueue()}))}handleNoDataOverlay(){const e=!this.series.some((e=>e.hasData()));e&&this.seriesRect?this.overlays.noData.show(this.seriesRect):this.overlays.noData.hide()}getMinRect(){const e=this.series.map((e=>e.getMinRect())).filter((e=>void 0!==e));if(e.length)return new Pc(0,0,e.reduce(((e,t)=>Math.max(e,t.width)),0),e.reduce(((e,t)=>Math.max(e,t.height)),0))}}var mv;fa([tu({newValue(e){this.destroyed||e.appendChild(this.element)},oldValue(e){e.removeChild(this.element)}}),ga("design:type",Object)],yv.prototype,"container",void 0),fa([tu({newValue(e){var t;null===(t=this.series)||void 0===t||t.forEach((t=>{t.setChartData(e)}))}}),ga("design:type",Object)],yv.prototype,"data",void 0),fa([tu({newValue(e){this.resize(e,void 0,"width option")}}),ga("design:type",Number)],yv.prototype,"width",void 0),fa([tu({newValue(e){this.resize(void 0,e,"height option")}}),ga("design:type",Number)],yv.prototype,"height",void 0),fa([tu({changeValue(e){this.autoSizeChanged(e)}}),fl(Dl),ga("design:type",Object)],yv.prototype,"autoSize",void 0),fa([tu({newValue(e){var t;null===(t=this.scene.root)||void 0===t||t.appendChild(e.node)},oldValue(e){var t;null===(t=this.scene.root)||void 0===t||t.removeChild(e.node)}}),ga("design:type",Function)],yv.prototype,"title",void 0),fa([tu({newValue(e){var t;null===(t=this.scene.root)||void 0===t||t.appendChild(e.node)},oldValue(e){var t;null===(t=this.scene.root)||void 0===t||t.removeChild(e.node)}}),ga("design:type",Function)],yv.prototype,"subtitle",void 0),fa([tu({newValue(e){var t;null===(t=this.scene.root)||void 0===t||t.appendChild(e.node)},oldValue(e){var t;null===(t=this.scene.root)||void 0===t||t.removeChild(e.node)}}),ga("design:type",Function)],yv.prototype,"footnote",void 0),fa([fl(ql("standalone","integrated")),ga("design:type",String)],yv.prototype,"mode",void 0),function(e){e[e["Open"]=0]="Open",e[e["Chord"]=1]="Chord",e[e["Round"]=2]="Round"}(mv||(mv={}));
18class Cv extends Ed{constructor(){super(),this.centerX=0,this.centerY=0,this.radius=10,this.startAngle=0,this.endAngle=2*Math.PI,this.counterClockwise=!1,this.type=mv.Open,this.restoreOwnStyles()}get fullPie(){return ll(Qa(this.startAngle),Qa(this.endAngle))}updatePath(){const e=this.path;e.clear(),e.arc(this.centerX,this.centerY,this.radius,this.startAngle,this.endAngle,this.counterClockwise),this.type===mv.Chord?e.closePath():this.type!==mv.Round||this.fullPie||(e.lineTo(this.centerX,this.centerY),e.closePath())}computeBBox(){return new Pc(this.centerX-this.radius,this.centerY-this.radius,2*this.radius,2*this.radius)}isPointInPath(e,t){const i=this.transformPoint(e,t),n=this.computeBBox();return this.type!==mv.Open&&n.containsPoint(i.x,i.y)&&this.path.isPointInPath(i.x,i.y)}}Cv.className="Arc",Cv.defaultStyles=Object.assign({},Wc.defaultStyles,{lineWidth:1,fillStyle:null}),fa([Sd(),ga("design:type",Number)],Cv.prototype,"centerX",void 0),fa([Sd(),ga("design:type",Number)],Cv.prototype,"centerY",void 0),fa([Sd(),ga("design:type",Number)],Cv.prototype,"radius",void 0),fa([Sd(),ga("design:type",Number)],Cv.prototype,"startAngle",void 0),fa([Sd(),ga("design:type",Number)],Cv.prototype,"endAngle",void 0),fa([Sd(),ga("design:type",Boolean)],Cv.prototype,"counterClockwise",void 0),fa([Sd(),ga("design:type",Number)],Cv.prototype,"type",void 0);const bv=e=>{const t=hl.fromString(e),[i,n,o]=hl.RGBtoHSL(t.r,t.g,t.b);return{h:i,s:n,l:o,a:t.a}},wv=(e,t,i)=>{let n,o;
18if(i=Math.min(Math.max(i,0),1),Number.isNaN(e.h)&&Number.isNaN(t.h))n=0,o=0;else if(Number.isNaN(e.h))n=t.h,o=t.s;else if(Number.isNaN(t.h))n=e.h,o=e.s;else{const r=e.h;let s=t.h;const a=t.h-e.h;a>180?s-=360:a<-180&&(s+=360),n=r*(1-i)+s*i,o=e.s*(1-i)+t.s*i}const r=e.l*(1-i)+t.l*i,s=e.a*(1-i)+t.a*i;return hl.fromHSL(n,o,r,s)};class Sv{constructor(){this.domain=[0,1],this.range=["red","blue"],this.parsedRange=this.range.map(bv)}update(){const{domain:e,range:t}=this;e.length<2&&(Pa.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 i=1;i<e.length;i++){const t=e[i-1],n=e[i];if(t>=n){Pa.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(bv)}convert(e){const{domain:t,range:i,parsedRange:n}=this,o=t[0],r=t[t.length-1],s=i[0],a=i[i.length-1];if(e<=o)return s;if(e>=r)return a;let l,c;if(2===t.length){const t=(e-o)/(r-o),n=1/(i.length-1);l=i.length<=2?0:Math.min(Math.floor(t*(i.length-1)),i.length-2),c=(t-l*n)/n}else{for(l=0;l<t.length-2;l++)if(e<t[l+1])break;const i=t[l],n=t[l+1];c=(e-i)/(n-i)}const u=n[l],d=n[l+1];return wv(u,d,c).toRgbaString()}}class Ev extends Wc{constructor(){super(...arguments),this.direction="to-right",this.stops=void 0,this._mask=void 0}get mask(){return this._mask}set mask(e){null!=this._mask&&this.removeChild(this._mask),null!=e&&this.appendChild(e),this._mask=e}isPointInPath(e,t){var i,n;return null!==(n=null===(i=this.mask)||void 0===i?void 0:i.isPointInPath(e,t))&&void 0!==n&&n}computeBBox(){var e;return null===(e=this.mask)||void 0===e?void 0:e.computeBBox()}render(e){const{mask:t,stops:i}=this,{ctx:n,devicePixelRatio:o}=e,r=1/o,s=null===t||void 0===t?void 0:t.computeTransformedBBox();if(null==t||null==i||null==s)return;t.dirtyPath&&(t.updatePath(),t.dirtyPath=!1),n.save(),n.beginPath(),t.path.draw(n),n.clip(),n.resetTransform();const a=Math.floor(s.x),l=Math.ceil(s.x+s.width),c=Math.floor(s.y),u=Math.ceil(s.y+s.height),d=new Sv,[p,h]="to-right"===this.direction?[a,l]:[c,u];if(d.domain=i.map(((e,t)=>p+(h-p)*t/(i.length-1))),d.range=i,d.update(),"to-right"===this.direction){const e=u-c;for(let t=a;t<=l;t+=r)n.fillStyle=d.convert(t),n.fillRect(t,c,r,e)}else{const e=l-a;for(let t=c;t<=u;t+=r)n.fillStyle=d.convert(t),n.fillRect(a,t,e,r)}n.restore()}}fa([Sc({redraw:Cc.MAJOR}),ga("design:type",String)],Ev.prototype,"direction",void 0),fa([Sc({redraw:Cc.MAJOR}),ga("design:type",Array)],Ev.prototype,"stops",void 0),fa([Sc({redraw:Cc.MAJOR}),ga("design:type",Function)],Ev.prototype,"_mask",void 0);class xv extends Ed{constructor(){super(...arguments),this.borderPath=new wd,this.x=0,this.y=0,this.width=10,this.height=10,this.radius=0,this.crisp=!1,this.lastUpdatePathStrokeWidth=Wc.defaultStyles.strokeWidth,this.effectiveStrokeWidth=Wc.defaultStyles.strokeWidth,this.microPixelEffectOpacity=1}isDirtyPath(){var e;return this.lastUpdatePathStrokeWidth!==this.strokeWidth||!!(this.path.isDirty()||this.borderPath.isDirty()||(null===(e=this.clipPath)||void 0===e?void 0:e.isDirty()))}updatePath(){var e,t,i;const{path:n,borderPath:o,crisp:r}=this;let{x:s,y:a,width:l,height:c,strokeWidth:u}=this;const d=null!==(t=null===(e=this.layerManager)||void 0===e?void 0:e.canvas.pixelRatio)&&void 0!==t?t:1,p=1/d;let h=1;if(n.clear({trackChanges:!0}),o.clear({trackChanges:!0}),r&&(l<=p&&(h*=l/p),c<=p&&(h*=c/p),l=this.align(s,l),c=this.align(a,c),s=this.align(s),a=this.align(a)),u)if(l<p){const e=s+p/2;o.moveTo(e,a),o.lineTo(e,a+c),u=p,this.borderClipPath=void 0}else if(c<p){const e=a+p/2;o.moveTo(s,e),o.lineTo(s+l,e),u=p,this.borderClipPath=void 0}else if(u<l&&u<c){const e=u/2;s+=e,a+=e,l-=u,c-=u,this.borderClipPath=void 0,n.rect(s,a,l,c),o.rect(s,a,l,c)}else this.borderClipPath=null!==(i=this.borderClipPath)&&void 0!==i?i:new wd,this.borderClipPath.clear({trackChanges:!0}),this.borderClipPath.rect(s,a,l,c),o.rect(s,a,l,c);else this.borderClipPath=void 0,n.rect(s,a,l,c);this.effectiveStrokeWidth=u,this.lastUpdatePathStrokeWidth=u,this.microPixelEffectOpacity=h}computeBBox(){const{x:e,y:t,width:i,height:n}=this;return new Pc(e,t,i,n)}isPointInPath(e,t){const i=this.transformPoint(e,t),n=this.computeBBox();return n.containsPoint(i.x,i.y)}applyFillAlpha(e){const{fillOpacity:t,microPixelEffectOpacity:i,opacity:n}=this,{globalAlpha:o}=e;e.globalAlpha=o*n*t*i}renderStroke(e){const{stroke:t,effectiveStrokeWidth:i,borderPath:n,borderClipPath:o,opacity:r,microPixelEffectOpacity:s}=this,a=!!t&&!!i;if(a){const{strokeOpacity:a,lineDash:l,lineDashOffset:c,lineCap:u,lineJoin:d}=this;o&&(o.draw(e),e.clip()),n.draw(e);const{globalAlpha:p}=e;
18e.strokeStyle=t,e.globalAlpha=p*r*a*s,e.lineWidth=i,l&&e.setLineDash(l),c&&(e.lineDashOffset=c),u&&(e.lineCap=u),d&&(e.lineJoin=d),e.stroke(),e.globalAlpha=p}}}xv.className="Rect",fa([Sd(),ga("design:type",Number)],xv.prototype,"x",void 0),fa([Sd(),ga("design:type",Number)],xv.prototype,"y",void 0),fa([Sd(),ga("design:type",Number)],xv.prototype,"width",void 0),fa([Sd(),ga("design:type",Number)],xv.prototype,"height",void 0),fa([Sd(),ga("design:type",Number)],xv.prototype,"radius",void 0),fa([Sd(),ga("design:type",Boolean)],xv.prototype,"crisp",void 0);class Ov extends Lc{constructor(e){super(),this.x=0,this.y=0,this.width=0,this.height=0,this.opacity=1,this.sourceImage=e}render(e){const{ctx:t,forceRender:i,stats:n}=e;if(this.dirty===Cc.NONE&&!i)return void(n&&n.nodesSkipped++);this.computeTransformMatrix(),this.matrix.toContext(t);const o=this.sourceImage;t.globalAlpha=this.opacity,t.drawImage(o,0,0,o.width,o.height,this.x,this.y,this.width,this.height),super.render(e)}}fa([Sc({redraw:Cc.MAJOR}),ga("design:type",Number)],Ov.prototype,"x",void 0),fa([Sc({redraw:Cc.MAJOR}),ga("design:type",Number)],Ov.prototype,"y",void 0),fa([Sc({redraw:Cc.MAJOR}),ga("design:type",Number)],Ov.prototype,"width",void 0),fa([Sc({redraw:Cc.MAJOR}),ga("design:type",Number)],Ov.prototype,"height",void 0),fa([Sc({redraw:Cc.MAJOR}),ga("design:type",Number)],Ov.prototype,"opacity",void 0);const Tv=Object.assign(Object.assign({},Au),hh);var Dv=Object.freeze({__proto__:null,motion:Tv,Caption:iu,DropShadow:Ic,Group:ad,Scene:Qf,Node:Lc,get PointerEvents(){return kc},get RedrawType(){return Cc},SceneChangeDetection:Sc,Selection:ld,Arc:Cv,Line:cd,LinearGradientFill:Ev,Path:Ed,ScenePathChangeDetection:Sd,Rect:xv,Sector:xd,Shape:Wc,Text:Kc,getFont:qc,ContinuousScale:nd,BandScale:sl,LinearScale:od,toRadians:il,Label:Qd,Marker:sp,getMarker:Xg,Cir
18cle:ap,Diamond:jg,Square:Ug,Triangle:zg,Tooltip:sh,toTooltipHtml:ih,BBox:Pc,nearestSquared:Ac,nearestSquaredInContainer:_c,HdpiCanvas:Vc,Image:Ov,Path2D:wd,easing:fu});const Rv={[mc.X]:["xKey"],[mc.Y]:["yKey"]},Av={[mc.X]:["xName"],[mc.Y]:["yName"]};class _v extends Ap{constructor(e,t,i,n){super(e,t,i,n),this.xKey=n.xKey,this.yKey=n.yKey}}class Pv extends gh{get contextNodeData(){return this._contextNodeData.slice()}constructor(e){var{pathsPerSeries:t=1,hasMarkers:i=!1,hasHighlightedLabels:n=!1,pathsZIndexSubOrderOffset:o=[],directionKeys:r=Rv,directionNames:s=Av,datumSelectionGarbageCollection:a=!0,markerSelectionGarbageCollection:l=!0,animationResetFns:c}=e,u=ha(e,["pathsPerSeries","hasMarkers","hasHighlightedLabels","pathsZIndexSubOrderOffset","directionKeys","directionNames","datumSelectionGarbageCollection","markerSelectionGarbageCollection","animationResetFns"]);super(Object.assign({directionKeys:r,directionNames:s,useSeriesGroupLayer:!0,canHaveAxes:!0},u)),this.legendItemName=void 0,this._contextNodeData=[],this.NodeClickEvent=_v,this.highlightSelection=ld.select(this.highlightNode,(()=>this.opts.hasMarkers?this.markerFactory():this.nodeFactory())),this.highlightLabelSelection=ld.select(this.highlightLabel,Kc),this.annotationSelections=new Set,this.subGroups=[],this.subGroupId=0,this.debug=Ia.create(),this.opts={pathsPerSeries:t,hasMarkers:i,hasHighlightedLabels:n,pathsZIndexSubOrderOffset:o,directionKeys:r,directionNames:s,animationResetFns:c,datumSelectionGarbageCollection:a,markerSelectionGarbageCollection:l},this.animationState=new fh("empty",{empty:{update:{target:"ready",action:e=>this.animateEmptyUpdateReady(e)}},ready:{updateData:"waiting",clear:"clearing",highlight:e=>this.animateReadyHighlight(e),highlightMarkers:e=>this.animateReadyHighlightMarkers(e),resize:e=>this.animateReadyResize(e)},waiting:{update:{target:"ready",action:e=>this.animateWaitingUpdateReady(e)}},clearing:{update:{target:"empty",action:e=>this.animateClearingUpdateEmpty(e)}}},(()=>this.checkProcessedDataAnimatable()))}addChartEventListeners(){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.splice(0,this._contextNodeData.length),this.subGroups.splice(0,this.subGroups.length)}update({seriesRect:e}){var t,i;return va(this,void 0,void 0,(function*(){const{visible:n,_contextNodeData:o}=this,{series:r}=null!==(i=null===(t=this.ctx.highlightManager)||void 0===t?void 0:t.getActiveHighlight())&&void 0!==i?i:{},s=r?r===this:void 0,a=this.checkResize(e),l=yield this.updateHighlightSelection(s);yield this.updateSelections(n),yield this.updateNodes(l,s,n);const c=this.getAnimationData(e,o);a&&this.animationState.transition("resize",c),this.animationState.transition("update",c)}))}updateSelections(e){return va(this,void 0,void 0,(function*(){if((e||!this.ctx.animationManager.isSkipped())&&(this.nodeDataRefresh||this.isPathOrSelectionDirty())){if(this.nodeDataRefresh){this.nodeDataRefresh=!1,this.debug("CartesianSeries.updateSelections() - calling createNodeData() for",this.id),this._contextNodeData=yield this.createNodeData();const e=this.isProcessedDataAnimatable();this._contextNodeData.forEach((t=>{var i;null!==(i=t.animationValid)&&void 0!==i||(t.animationValid=e)})),yield this.updateSeriesGroups();const{dataModel:t,processedData:i}=this;void 0!==t&&void 0!==i&&this.dispatch("data-update",{dataModel:t,processedData:i})}yield Promise.all(this.subGroups.map(((e,t)=>this.updateSeriesGroupSelections(e,t))))}}))}updateSeriesGroupSelections(e,t,i){return va(this,void 0,void 0,(function*(){const{datumSelection:n,labelSelection:o,markerSelection:r,paths:s}=e,a=this._contextNodeData[t],{nodeData:l,labelData:c,itemId:u}=a;yield this.updatePaths({seriesHighlighted:i,itemId:u,contextData:a,paths:s,seriesIdx:t}),e.datumSelection=yield this.updateDatumSelection({nodeData:l,datumSelection:n,seriesIdx:t}),e.labelSelection=yield this.updateLabelSelection({labelData:c,labelSelection:o,seriesIdx:t}),r&&(e.markerSelection=yield this.updateMarkerSelection({nodeData:l,markerSelection:r,seriesIdx:t}))}))}markerFactory(){const e=Xg();return new e}updateSeriesGroups(){return va(this,void 0,void 0,(function*(){const{_contextNodeData:e,contentGroup:t,subGroups:i,opts:{pathsPerSeries:n,hasMarkers:o,datumSelectionGarbageCollection:r,markerSelectionGarbageCollection:s}}=this;if(e.length===i.length)return;
18e.length<i.length&&i.splice(e.length).forEach((({dataNodeGroup:e,markerGroup:i,labelGroup:n,paths:o})=>{t.removeChild(e),i&&t.removeChild(i),n&&t.removeChild(n);for(const r of o)t.removeChild(r)}));const a=e.length;while(a>i.length){const e=!1,a=this.subGroupId++,l=new ad({name:`${this.id}-series-sub${a}-dataNodes`,layer:e,zIndex:rp.SERIES_LAYER_ZINDEX,zIndexSubOrder:this.getGroupZIndexSubOrder("data",a)}),c=o?new ad({name:`${this.id}-series-sub${this.subGroupId++}-markers`,layer:e,zIndex:rp.SERIES_LAYER_ZINDEX,zIndexSubOrder:this.getGroupZIndexSubOrder("marker",a)}):void 0,u=new ad({name:`${this.id}-series-sub${this.subGroupId++}-labels`,layer:e,zIndex:rp.SERIES_LABEL_ZINDEX,zIndexSubOrder:this.getGroupZIndexSubOrder("labels",a)});t.appendChild(l),t.appendChild(u),c&&t.appendChild(c);const d=[];for(let i=0;i<n;i++)d[i]=new Ed,d[i].zIndex=rp.SERIES_LAYER_ZINDEX,d[i].zIndexSubOrder=this.getGroupZIndexSubOrder("paths",i),t.appendChild(d[i]);i.push({paths:d,dataNodeGroup:l,markerGroup:c,labelGroup:u,labelSelection:ld.select(u,Kc),datumSelection:ld.select(l,(()=>this.nodeFactory()),r),markerSelection:c?ld.select(c,(()=>this.markerFactory()),s):void 0})}}))}getGroupZIndexSubOrder(e,t=0){var i;const n=super.getGroupZIndexSubOrder(e,t);if("paths"===e){const e=null!==(i=this.opts.pathsZIndexSubOrderOffset[t])&&void 0!==i?i:0,o=n[0];n[0]="function"===typeof o?()=>+o()+e:+o+e}return n}updateNodes(e,t,i){var n;return va(this,void 0,void 0,(function*(){const{highlightSelection:o,highlightLabelSelection:r,opts:{hasMarkers:s,hasHighlightedLabels:a}}=this,l=!this.ctx.animationManager.isSkipped(),c=this.visible&&(null===(n=this._contextNodeData)||void 0===n?void 0:n.length)>0&&i;this.rootGroup.visible=l||c,this.contentGroup.visible=l||c,this.highlightGroup.visible=(l||c)&&!!t;const u=this.getOpacity();s?(yield this.updateMarkerNodes({markerSelection:o,isHighlight:!0,seriesIdx:-1}),this.animationState.transition("highlightMarkers",o)):(yield this.updateDatumNodes({datumSelection:o,isHighlight:!0,seriesIdx:-1}),this.animationState.transition("highlight",o)),a&&(yield this.updateLabelNodes({labelSelection:r,seriesIdx:-1})),yield Promise.all(this.subGroups.map(((i,n)=>va(this,void 0,void 0,(function*(){const{dataNodeGroup:o,markerGroup:r,datumSelection:a,labelSelection:d,markerSelection:p,paths:h,labelGroup:f}=i,{itemId:g}=this.contextNodeData[n],v=c;o.opacity=u,o.visible=l||v,f.visible=v,r&&(r.opacity=u,r.zIndex=o.zIndex>=rp.SERIES_LAYER_ZINDEX?o.zIndex:o.zIndex+1,r.visible=v),f&&(f.opacity=u),yield this.updatePathNodes({seriesHighlighted:t,itemId:g,paths:h,seriesIdx:n,opacity:u,visible:v,animationEnabled:l}),o.visible&&(yield this.updateDatumNodes({datumSelection:a,highlightedItems:e,isHighlight:!1,seriesIdx:n}),yield this.updateLabelNodes({labelSelection:d,seriesIdx:n}),s&&p&&(yield this.updateMarkerNodes({markerSelection:p,isHighlight:!1,seriesIdx:n})))})))))}))}getHighlightLabelData(e,t){const i=e.find((e=>e.datum===t.datum&&e.itemId===t.itemId));return i?[i]:void 0}getHighlightData(e,t){return t?[t]:void 0}updateHighlightSelection(e){var t;return va(this,void 0,void 0,(function*(){const{highlightSelection:i,highlightLabelSelection:n,_contextNodeData:o}=this,r=null===(t=this.ctx.highlightManager)||void 0===t?void 0:t.getActiveHighlight(),s=e&&(null===r||void 0===r?void 0:r.datum)?r:void 0;let a,l;if(null!=s){const e=this.isLabelEnabled();for(const{labelData:t,nodeData:i}of o)if(l=this.getHighlightData(i,s),a=e?this.getHighlightLabelData(t,s):void 0,(!e||null!=a)&&null!=l)break}return this.highlightSelection=yield this.updateHighlightSelectionItem({items:l,highlightSelection:i}),this.highlightLabelSelection=yield this.updateHighlightSelectionLabel({items:a,highlightLabelSelection:n}),l}))}pickNodeExactShape(e){var t;const i=super.pickNodeExactShape(e);if(i)return i;const{x:n,y:o}=e,{opts:{hasMarkers:r}}=this;for(const{dataNodeGroup:s,markerGroup:a}of this.subGroups){let e=s.pickNode(n,o);if(!e&&r&&(e=null===a||void 0===a?void 0:a.pickNode(n,o)),e)break}for(const s of this.moduleMap){const{datum:i}=null!==(t=s.pickNodeExact(e))&&void 0!==t?t:{};if(void 0!==i)return{datum:i,distance:0}}}pickNodeClosestDatum(e){var t,i;const{x:n,y:o}=e,{axes:r,rootGroup:s,_contextNodeData:a}=this,l=r[mc.X],c=r[mc.Y],u=s.transformPoint(n,o);let d,p=1/0;for(const h of a)for(const e of h.nodeData){const{point:{x:t=NaN,y:i=NaN}={}}=e;if(isNaN(t)||isNaN(i))continue;const n=(null===l||void 0===l?void 0:l.inRange(t))&&(null===c||void 0===c?void 0:c.inRange(i));if(!n)continue;
18const o=Math.max(Math.pow(u.x-t,2)+Math.pow(u.y-i,2),0);o<p&&(p=o,d=e)}for(const h of this.moduleMap){const t=h.pickNodeNearest(e);if(void 0!==t&&t.distanceSquared<p){p=t.distanceSquared,d=t.datum;break}}if(d){const e=Math.max(Math.sqrt(p)-(null!==(i=null===(t=d.point)||void 0===t?void 0:t.size)&&void 0!==i?i:0),0);return{datum:d,distance:e}}}pickNodeMainAxisFirst(e,t){var i,n;const{x:o,y:r}=e,{axes:s,rootGroup:a,_contextNodeData:l}=this,c=s[mc.X],u=s[mc.Y],d=[c,u].filter((e=>e instanceof Nf)).map((e=>e.direction));if(t&&0===d.length)return;const[p=mc.X]=d,h=a.transformPoint(o,r),f=p===mc.X?[h.x,h.y]:[h.y,h.x],g=[1/0,1/0];let v;for(const y of l)for(const e of y.nodeData){const{point:{x:t=NaN,y:i=NaN}={}}=e;if(isNaN(t)||isNaN(i))continue;const n=(null===c||void 0===c?void 0:c.inRange(t))&&(null===u||void 0===u?void 0:u.inRange(i));if(!n)continue;const o=p===mc.X?[t,i]:[i,t];let r=!0;for(let e=0;e<o.length;e++){const t=Math.abs(o[e]-f[e]);if(t>g[e]){r=!1;break}t<g[e]&&(g[e]=t,g.fill(1/0,e+1,g.length))}r&&(v=e)}if(v){let t=Math.max(Math.pow(g[0],2)+Math.pow(g[1],2)-(null!==(n=null===(i=v.point)||void 0===i?void 0:i.size)&&void 0!==n?n:0),0);for(const i of this.moduleMap){const n=i.pickNodeMainAxisFirst(e);if(void 0!==n&&n.distanceSquared<t){v=n.datum,t=n.distanceSquared;break}}return{datum:v,distance:Math.sqrt(t)}}}onLegendItemClick(e){const{enabled:t,itemId:i,series:n,legendItemName:o}=e,r=null!=this.legendItemName&&this.legendItemName===o;(n.id===this.id||r)&&this.toggleSeriesItem(i,t)}onLegendItemDoubleClick(e){const{enabled:t,itemId:i,series:n,numVisibleItems:o,legendItemName:r}=e,s=Object.values(o).reduce(((e,t)=>e+t),0),a=null!=this.legendItemName&&this.legendItemName===r;n.id===this.id||a||t&&1===s?this.toggleSeriesItem(i,!0):this.toggleSeriesItem(i,!1)}isPathOrSelectionDirty(){return!1}getLabelData(){return[]}shouldFlipXY(){return!1}getMinRect(){const[e]=this._contextNodeData;if(!e||0==e.nodeData.length)return;const t=e.nodeData.map((({midPoint:e})=>{var t;return null!==(t=null===e||void 0===e?void 0:e.x)&&void 0!==t?t:0})).sort(((e,t)=>e-t)).reduce(((e,t,i,n)=>i>0?Math.max(e,t-n[i-1]):e),0),i=e.nodeData.map((({midPoint:e})=>{var t;return null!==(t=null===e||void 0===e?void 0:e.y)&&void 0!==t?t:0})).sort(((e,t)=>e-t)).reduce(((e,t,i,n)=>i>0?Math.max(e,t-n[i-1]):e),0);return new Pc(0,0,t,i)}updateHighlightSelectionItem(e){return va(this,void 0,void 0,(function*(){const{opts:{hasMarkers:t}}=this,{items:i,highlightSelection:n}=e,o=null!==i&&void 0!==i?i:[];if(t){const e=n;return this.updateMarkerSelection({nodeData:o,markerSelection:e,seriesIdx:-1})}return this.updateDatumSelection({nodeData:o,datumSelection:n,seriesIdx:-1})}))}updateHighlightSelectionLabel(e){return va(this,void 0,void 0,(function*(){const{items:t,highlightLabelSelection:i}=e,n=null!==t&&void 0!==t?t:[];return this.updateLabelSelection({labelData:n,labelSelection:i,seriesIdx:-1})}))}updateDatumSelection(e){return va(this,void 0,void 0,(function*(){return e.datumSelection}))}updateDatumNodes(e){return va(this,void 0,void 0,(function*(){}))}updateMarkerSelection(e){return va(this,void 0,void 0,(function*(){return e.markerSelection}))}updateMarkerNodes(e){return va(this,void 0,void 0,(function*(){}))}updatePaths(e){return va(this,void 0,void 0,(function*(){e.paths.forEach((e=>e.visible=!1))}))}updatePathNodes(e){return va(this,void 0,void 0,(function*(){const{paths:t,opacity:i,visible:n}=e;for(const e of t)e.opacity=i,e.visible=n}))}resetAllAnimation(e){var t,i;const{path:n,datum:o,label:r,marker:s}=null!==(i=null===(t=this.opts)||void 0===t?void 0:t.animationResetFns)&&void 0!==i?i:{};this.ctx.animationManager.stopByAnimationGroupId(this.id),n&&e.paths.forEach((e=>{dh(e,n)})),o&&dh(e.datumSelections,o),r&&dh(e.labelSelections,r),s&&dh(e.markerSelections,s),e.contextData.some((e=>!1===e.animationValid))&&this.ctx.animationManager.skipCurrentBatch()}animateEmptyUpdateReady(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(e)}animateWaitingUpdateReady(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(e)}animateReadyHighlight(e){var t,i;const{datum:n}=null!==(i=null===(t=this.opts)||void 0===t?void 0:t.animationResetFns)&&void 0!==i?i:{};n&&dh([e],n)}animateReadyHighlightMarkers(e){var t,i;const{marker:n}=null!==(i=null===(t=this.opts)||void 0===t?void 0:t.animationResetFns)&&void 0!==i?i:{};n&&dh([e],n)}animateReadyResize(e){this.resetAllAnimation(e)}animateClearingUpdateEmpty(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(e)}animationTransitionClear(){this.animationState.transition("clear",this.getAnimationData())}getAnimationData(e,t){const i={datumSelections:this.subGroups.map((({datumSelection:e})=>e)),markerSelections:this.subGroups.filter((({markerSelection:e})=>void 0!==e)).map((({markerSelection:e})=>e)),labelSelections:this.subGroups.map((({labelSelection:e})=>e)),annotationSelections:[...this.annotationSelections],contextData:this._contextNodeData,previousContextData:t,paths:this.subGroups.map((({paths:e})=>e)),seriesRect:e};return i}calculateScaling(){const e={},t=t=>{const i=this.axes[t];if(i)if(i.scale instanceof $h){const{range:n,domain:o}=i.scale;e[t]={type:"log",convert:e=>i.scale.convert(e),domain:[o[0],o[1]],range:[n[0],n[1]]}}else if(i.scale instanceof nd){const{range:n}=i.scale,o=i.scale.getDomain();e[t]={type:"continuous",domain:[o[0],o[1]],range:[n[0],n[1]]}}else if(i.scale){const{domain:n}=i.scale;e[t]={type:"category",domain:n,range:n.map((e=>i.scale.convert(e)))}}};return t(mc.X),t(mc.Y),e}}fa([fl(_l),ga("design:type",String)],Pv.prototype,"legendItemName",void 0);const Mv=["top","right","bottom","left"];class kv extends yv{constructor(e,t){super(e,t),this.paired=!0,this._lastAxisWidths={top:0,bottom:0,left:0,right:0},this._lastVisibility={crossLines:!0,series:!0}}performLayout(){const e=Object.create(null,{performLayout:{get:()=>super.performLayout}});return va(this,void 0,void 0,(function*(){const t=yield e.performLayout.call(this),{animationRect:i,seriesRect:n,visibility:o,clipSeries:r}=this.updateAxes(t);this.seriesRoot.visible=o.series,this.seriesRect=n,this.animationRect=i,this.seriesRoot.translationX=Math.floor(n.x),this.seriesRoot.translationY=Math.floor(n.y);const{seriesArea:{padding:s}}=this,a=n.clone().grow({top:s.top,right:s.right,bottom:s.bottom,left:s.left});return this.hoverRect=a,this.layoutService.dispatchLayoutComplete({type:"layout-complete",chart:{width:this.scene.width,height:this.scene.height},clipSeries:r,series:{rect:n,paddedRect:a,visible:o.series,shouldFlipXY:this.shouldFlipXY()},axes:this.axes.map((e=>Object.assign({id:e.id},e.getLayoutState())))}),t}))}updateAxes(e){var t;const i=Object.assign({},this._lastAxisWidths),n=Object.assign({},this._lastVisibility),o=new Set(this._axes.map((e=>e.position)));for(const f of Object.keys(i))o.has(f)||delete i[f];const r=(e,t)=>!Object.keys(e).some((e=>null==i[e]))&&(n.crossLines===t.crossLines&&n.series===t.series&&Object.entries(i).every((([t,i])=>{const n=e[t];return null==i&&null==n||i===n}))),s=e=>Object.entries(e).reduce(((e,[t,i])=>(i&&Math.abs(i)===1/0&&(i=0),e[t]=null!=i?Math.ceil(i):i,e)),{});let a={},l={},c=!1,u=null===(t=this.seriesRect)||void 0===t?void 0:t.clone(),d=0,p={};do{Object.assign(i,a),Object.assign(n,l);const t=this.updateAxesPass(i,e.clone(),u);if(a=s(t.axisWidths),l=t.visibility,c=t.clipSeries,u=t.seriesRect,p=t.primaryTickCounts,d++>10){Pa.warn("unable to find stable axis layout.");break}}while(!r(a,l));
18this.axes.forEach((e=>{const{direction:t}=e,i=p[t];e.update(i)}));const h=5;return this.axes.forEach((t=>{if(t.setCrossLinesVisible(n.crossLines),u)switch(t.clipGrid(u.x,u.y,u.width+h,u.height+h),t.position){case"left":case"right":t.clipTickLines(e.x,u.y,e.width+h,u.height+h);break;case"top":case"bottom":t.clipTickLines(u.x,e.y,u.width+h,e.height+h);break}})),this._lastAxisWidths=i,this._lastVisibility=n,{seriesRect:u,animationRect:e,visibility:n,clipSeries:c}}updateAxesPass(e,t,i){const{axes:n}=this,o={},r={},s={series:!0,crossLines:!0};let a=!1;const l={},c=this.applySeriesPadding(t),u=i?this.buildCrossLinePadding(e):{},d=this.buildAxisBound(c,e,u,s),p=this.buildSeriesRect(d,e);return n.forEach((t=>{var i,n;const{position:s="left"}=t,{clipSeries:u,axisThickness:h,axisOffset:f}=this.calculateAxisDimensions({axis:t,seriesRect:p,paddedBounds:c,axisWidths:e,newAxisWidths:r,primaryTickCounts:l,clipSeries:a,addInterAxisPadding:(null!==(i=o[s])&&void 0!==i?i:0)>0});o[s]=(null!==(n=o[s])&&void 0!==n?n:0)+1,a=a||u,this.positionAxis({axis:t,axisBound:d,axisOffset:f,axisThickness:h,axisWidths:e,primaryTickCounts:l,seriesRect:p})})),{clipSeries:a,seriesRect:p,axisWidths:r,visibility:s,primaryTickCounts:l}}buildCrossLinePadding(e){var t;const i={};this.axes.forEach((e=>{e.crossLines&&e.crossLines.forEach((e=>{e.calculatePadding(i)}))}));for(const[n,o=0]of Object.entries(i))i[n]=Math.max(o-(null!==(t=e[n])&&void 0!==t?t:0),0);return i}applySeriesPadding(e){const t=e.clone(),i=this.axes.slice().reverse();return Mv.forEach((e=>{const n=this.seriesArea.padding[e],o=i.find((t=>t.position===e));o?o.seriesAreaPadding=n:t.shrink(n,e)})),t}buildAxisBound(e,t,i,n){var o,r,s,a;const l=e.clone(),{top:c=0,right:u=0,bottom:d=0,left:p=0}=i,h=p+u,f=c+d,g=(null!==(o=t.left)&&void 0!==o?o:0)+(null!==(r=t.right)&&void 0!==r?r:0)+h,v=(null!==(s=t.top)&&void 0!==s?s:0)+(null!==(a=t.bottom)&&void 0!==a?a:0)+f;return l.width<=g||l.height<=v?(n.crossLines=!1,n.series=!1,l):(l.x+=p,l.y+=c,l.width-=h,l.height-=f,l)}buildSeriesRect(e,t){const i=e.clone(),{top:n,bottom:o,left:r,right:s}=t;return i.x+=null!==r&&void 0!==r?r:0,i.y+=null!==n&&void 0!==n?n:0,i.width-=(null!==r&&void 0!==r?r:0)+(null!==s&&void 0!==s?s:0),i.height-=(null!==n&&void 0!==n?n:0)+(null!==o&&void 0!==o?o:0),i.width=Math.max(0,i.width),i.height=Math.max(0,i.height),i}clampToOutsideSeriesRect(e,t,i,n){const{x:o,y:r,width:s,height:a}=e,l=[o,r,o+s,r+a],c=1===n?Math.min:Math.max,u=l[("x"===i?0:1)+(1===n?0:2)];return c(t,u)}calculateAxisDimensions(e){var t,i,n,o,r;const{axis:s,seriesRect:a,paddedBounds:l,axisWidths:c,newAxisWidths:u,primaryTickCounts:d,addInterAxisPadding:p}=e;let{clipSeries:h}=e;const{position:f="left",direction:g}=s,v=e=>e instanceof Nf||e instanceof Xf?[0,a.height]:[a.height,0],y=null!==(t=u[f])&&void 0!==t?t:0;switch(f){case"top":case"bottom":s.range=[0,a.width],s.gridLength=a.height;break;case"right":case"left":s.range=v(s),s.gridLength=a.width;break}const m=this.zoomManager.getAxisZoom(s.id),{min:C=0,max:b=1}=null!==m&&void 0!==m?m:{};s.visibleRange=[C,b];const w=s.dataDomain.clipped||s.visibleRange[0]>0||s.visibleRange[1]<1;h||(h=w);let S=s.nice?d[g]:void 0;const E=.3;null!=s.thickness&&s.thickness>0?s.maxThickness=s.thickness:g===mc.Y?s.maxThickness=l.width*E:s.maxThickness=l.height*E;const x=s.calculateLayout(S);S=x.primaryTickCount,d[g]=null!==(i=d[g])&&void 0!==i?i:S;let O=0;if(null!=s.thickness&&s.thickness>0)O=s.thickness;else{const{bbox:e}=x;O=g===mc.X?e.height:e.width}const T=15;return p&&(O+=T),O=Math.ceil(O),u[f]=(null!==(n=u[f])&&void 0!==n?n:0)+O,s.gridPadding=(null!==(o=c[f])&&void 0!==o?o:0)-(null!==(r=u[f])&&void 0!==r?r:0),{clipSeries:h,axisThickness:O,axisOffset:y,primaryTickCount:S}}positionAxis(e){var t,i,n,o;const{axis:r,axisBound:s,axisWidths:a,seriesRect:l,axisOffset:c,axisThickness:u}=e,{position:d}=r;switch(d){case"top":r.translation.x=s.x+(null!==(t=a.left)&&void 0!==t?t:0),r.translation.y=this.clampToOutsideSeriesRect(l,s.y+1+c+u,"y",1);break;case"bottom":r.translation.x=s.x+(null!==(i=a.left)&&void 0!==i?i:0),r.translation.y=this.clampToOutsideSeriesRect(l,s.y+s.height+1-u-c,"y",-1);break;case"left":r.translation.y=s.y+(null!==(n=a.top)&&void 0!==n?n:0),r.translation.x=this.clampToOutsideSeriesRect(l,s.x+c+u,"x",1);break;case"right":r.translation.y=s.y+(null!==(o=a.top)&&void 0!==o?o:0),r.translation.x=this.clampToOutsideSeriesRect(l,s.x+s.width-u-c,"x",-1);break}r.updatePosition({rotation:il(r.rotation),sideFlag:r.label.getSideFlag()})}shouldFlipXY(){return!this.series.some((e=>!(e instanceof Pv&&e.shouldFlipXY())))}}
18kv.className="CartesianChart",kv.type="cartesian";class Nv{static isInstance(e){var t;return e instanceof Nv||("AgChartInstanceProxy"===(null===(t=e.constructor)||void 0===t?void 0:t.name)&&null!=e.chart||null!=e.chart&&this.validateImplementation(e))}static validateImplementation(e){var t,i;const n=["getOptions","destroy"],o=Object.keys(null!==(i=null===(t=e.constructor)||void 0===t?void 0:t.prototype)&&void 0!==i?i:{});return n.every((e=>o.includes(e)))}constructor(e){this.chart=e}getOptions(){return this.chart.getOptions()}destroy(){this.chart.destroy()}}function Lv(e,t){let i=Math.floor(e[0]),n=e[1];i=Iv(i,n,t);const o=Gv(i,n,t),r=t-1;n=i+r*o;const s=[i,n],a=Fv(i,o,t);return[s,a]}function Iv(e,t,i){const n=Math.abs(t-e)/(i-1),o=Math.floor(Math.log10(n)),r=Math.pow(10,o);return Math.floor(e/r)*r}function Fv(e,t,i){const n=Math.floor(Math.log10(t)),o=t>0&&t<1?Math.abs(n):0,r=Math.pow(10,o),s=new td(o);for(let a=0;a<i;a++){const i=e+t*a;s[a]=Math.round(i*r)/r}return s}function Gv(e,t,i){const n=i-1,o=(t-e)/n;return Vv(o)}function Vv(e){const t=Math.floor(Math.log10(e)),i=Math.pow(10,t),n=e/i*10;return n>0&&n<=1?i/10:n>1&&n<=2?2*i/10:n>1&&n<=5?5*i/10:n>5&&n<=10?10*i/10:n>10&&n<=20?20*i/10:n>20&&n<=40?40*i/10:n>40&&n<=50?50*i/10:n>50&&n<=100?100*i/10:n}class Bv extends mf{constructor(){super(...arguments),this.maxSpacing=NaN}}fa([fl(bl(Ul(1),xl("minSpacing"))),ff(NaN),ga("design:type",Number)],Bv.prototype,"maxSpacing",void 0);class jv extends kf{constructor(e,t=new od){super(e,t),this.min=NaN,this.max=NaN}normaliseDataDomain(e){const{min:t,max:i}=this,{extent:n,clipped:o}=Ta(e,t,i);return{domain:n,clipped:o}}formatDatum(e){return"number"===typeof e?e.toFixed(2):(Pa.warnOnce("data contains Date objects which are being plotted against a number axis, please only use a number axis for numbers."),String(e))}createTick(){return new Bv}updateSecondaryAxisTicks(e){if(null==this.dataDomain)throw new Error("AG Charts - dataDomain not calculated, cannot perform tick calculation.");if(0===this.dataDomain.domain.length)return[];const[t,i]=Lv(this.dataDomain.domain,null!==e&&void 0!==e?e:0);return this.scale.nice=!1,this.scale.domain=t,this.scale.update(),i}}function Hv(){const e="expecting a non-zero Number";return vl((e=>"number"===typeof e&&0!==e),e)}jv.className="NumberAxis",jv.type="number",fa([fl(bl(Ul(),El("max"))),ff(NaN),ga("design:type",Number)],jv.prototype,"min",void 0),fa([fl(bl(Ul(),xl("min"))),ff(NaN),ga("design:type",Number)],jv.prototype,"max",void 0);class Wv extends jv{normaliseDataDomain(e){const{min:t,max:i}=this,{extent:n,clipped:o}=Ta(e,t,i),r=n[0]>n[1],s=n[0]<0&&n[1]>0,a=0===n[0]&&0===n[1],l=r||s||a;return l&&(e=[],s?Pa.warn("the data domain crosses zero, the chart data cannot be rendered. See log axis documentation for more information."):a&&Pa.warn("the data domain has 0 extent, no data is rendered.")),0===n[0]&&(n[0]=1),0===n[1]&&(n[1]=-1),{domain:n,clipped:o}}set base(e){this.scale.base=e}get base(){return this.scale.base}constructor(e){super(e,new $h),this.min=NaN,this.max=NaN}}Wv.className="LogAxis",Wv.type="log",fa([fl(bl(Ul(),El("max"),Hv())),ff(NaN),ga("design:type",Number)],Wv.prototype,"min",void 0),fa([fl(bl(Ul(),xl("min"),Hv())),ff(NaN),ga("design:type",Number)],Wv.prototype,"max",void 0);class Uv extends mf{constructor(){super(...arguments),this.maxSpacing=NaN}}fa([fl(bl(Ul(1),xl("minSpacing"))),ff(NaN),ga("design:type",Number)],Uv.prototype,"maxSpacing",void 0);class zv extends kf{constructor(e){super(e,new ef),this.datumFormat="%m/%d/%y, %H:%M:%S",this.min=void 0,this.max=void 0;const{scale:t}=this;this.refreshScale(),this.datumFormatter=t.tickFormat({specifier:this.datumFormat})}normaliseDataDomain(e){var t;let{min:i,max:n}=this,o=!1;return"number"===typeof i&&(i=new Date(i)),"number"===typeof n&&(n=new Date(n)),e.length>2&&(e=(null!==(t=xa(e))&&void 0!==t?t:[0,1e3]).map((e=>new Date(e)))),i instanceof Date&&(o||(o=i>e[0]),e=[i,e[1]]),n instanceof Date&&(o||(o=n<e[1]),e=[e[0],n]),e[0]>e[1]&&(e=[]),{domain:e,clipped:o}}createTick(){return new Uv}onLabelFormatChange(e,t){t?super.onLabelFormatChange(e,t):this.labelFormatter=this.scale.tickFormat({ticks:e})}formatDatum(e){var t;return null!==(t=this.moduleCtx.callbackCache.call(this.datumFormatter,e))&&void 0!==t?t:String(e)}calculatePadding(e,t){return[0,1]}}zv.className="TimeAxis",zv.type="time",fa([fl(bl(Ll,El("max"))),ga("design:type",Object)],zv.prototype,"min",void 0),fa([fl(bl(Ll,xl("min"))),ga("design:type",Object)],zv.prototype,"max",void 0);const Kv={[jv.type]:jv,[Nf.type]:Nf,[zv.type]:zv,[Xf.type]:Xf,[Wv.type]:Wv};function Yv(e,t){Kv[e]=t}function qv(e,t){const i=Kv[e];
18if(i)return new i(t);throw new Error(`AG Charts - unknown axis type: ${e}`)}const Xv={has(e){return Object.prototype.hasOwnProperty.call(Kv,e)},get axesTypes(){return Object.keys(Kv)}},$v={};function Zv(e,t){$v[e]=t}function Jv(e){var t;return null!==(t=$v[e])&&void 0!==t?t:{}}const Qv=[{type:"root",optionsKey:"animation",chartTypes:["cartesian","polar","hierarchy"]},{type:"root",optionsKey:"background",chartTypes:["cartesian","polar","hierarchy"],optionsInnerKey:"image"},{type:"root",optionsKey:"contextMenu",chartTypes:["cartesian","polar","hierarchy"]},{type:"root",optionsKey:"zoom",chartTypes:["cartesian"]},{type:"legend",optionsKey:"gradientLegend",chartTypes:["cartesian","polar","hierarchy"],identifier:"gradient"},{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-option",optionsKey:"crosshair",chartTypes:["cartesian"]},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"box-plot"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"bullet"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"heatmap"},{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:["cartesian"],identifier:"range-area"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"range-bar"},{type:"series",optionsKey:"series[]",chartTypes:["hierarchy"],identifier:"sunburst"},{type:"series",optionsKey:"series[]",chartTypes:["hierarchy"],identifier:"treemap"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"waterfall"},{type:"series-option",optionsKey:"errorBar",chartTypes:["cartesian"],identifier:"error-bars"}];function ey(e){return Qv.some((t=>"series"===t.type&&t.identifier===e))}function ty(e){var t;return null===(t=Qv.find((t=>"series"===t.type&&t.identifier===e)))||void 0===t?void 0:t.chartTypes}function iy(e){var t,i;return(null!==(i=null===(t=Qv.find((t=>"series"===t.type&&t.identifier===e)))||void 0===t?void 0:t.useCount)&&void 0!==i?i:0)>0}function ny(e){var t;const i=null===(t=ty(e))||void 0===t?void 0:t.find((e=>"cartesian"===e));return"cartesian"===i}function oy(e){var t;const i=null===(t=ty(e))||void 0===t?void 0:t.find((e=>"polar"===e));return"polar"===i}function ry(e){var t;const i=null===(t=ty(e))||void 0===t?void 0:t.find((e=>"hierarchy"===e));return"hierarchy"===i}function sy(e){var t;if("enterprise"!==e.packageType)throw new Error("AG Charts - internal configuration error, only enterprise modules need verification.");const i=Qv.find((t=>t.type===e.type&&t.optionsKey===e.optionsKey&&t.identifier===e.identifier&&e.chartTypes.every((e=>t.chartTypes.includes(e)))));return i&&(null!==(t=i.useCount)&&void 0!==t||(i.useCount=0),i.useCount++),null!=i}function ay(){return Qv.filter((({useCount:e})=>null==e||0===e))}const ly={category:"legend"};function cy(e,t,i,n){ly[e]=t,uy[t]=n}const uy={};function dy(){return uy}function py(){return ly}class hy extends ma{constructor(e){var t;super(),this.node=new ad({name:"background",zIndex:rp.SERIES_BACKGROUND_ZINDEX}),this.rectNode=new xv,this.visible=!0,this.fill="white",this.image=void 0,this.node.appendChild(this.rectNode),null===(t=e.scene.root)||void 0===t||t.appendChild(this.node),this.destroyFns.push((()=>{var t;return null===(t=e.scene.root)||void 0===t?void 0:t.removeChild(this.node)}),e.layoutService.addListener("layout-complete",(e=>this.onLayoutComplete(e))))}onLayoutComplete(e){const{width:t,height:i}=e.chart;this.rectNode.width=t,this.rectNode.height=i}}fa([fl(Dl),eu("node","visible"),ga("design:type",Boolean)],hy.prototype,"visible",void 0),fa([fl(Gl),eu("rectNode","fill"),ga("design:type",String)],hy.prototype,"fill",void 0);const fy={type:"root",optionsKey:"background",packageType:"community",chartTypes:["cartesian","polar","hierarchy"],instanceConstructor:hy};class gy{set fill(e){this.rh.fill=e}get fill(){return this.rh.fill}set stroke(e){this.rh.stroke=e}get stroke(){return this.rh.stroke}set strokeWidth(e){this.rh.strokeWidth=e}get strokeWidth(){return this.rh.strokeWidth}set width(e){this.rh.width=e}get width(){return this.rh.width}set height(e){this.rh.height=e}get height(){return this.rh.height}set gripLineGap(e){this.rh.gripLineGap=e}get gripLineGap(){return this.rh.gripLineGap}set gripLineLength(e){this.rh.gripLineLength=e}get gripLineLength(){return this.rh.gripLineLength}constructor(e){this.rh=e}}class vy{set fill(e){this.rm.fill=e}get fill(){return this.rm.fill}set stroke(e){this.rm.stroke=e}get stroke(){return this.rm.stroke}set strokeWidth(e){this.rm.strokeWidth=e}get strokeWidth(){return this.rm.strokeWidth}set fillOpacity(e){this.rm.fillOpacity=e}get fillOpacity(){return this.rm.fillOpacity}constructor(e){this.rm=e}}
18class yy extends Ed{constructor(){super(...arguments),this._fill="#f2f2f2",this._stroke="#999999",this._strokeWidth=1,this._lineCap="square",this._centerX=0,this._centerY=0,this._width=8,this._gripLineGap=2,this._gripLineLength=8,this._height=16}set centerX(e){this._centerX!==e&&(this._centerX=e,this.dirtyPath=!0)}get centerX(){return this._centerX}set centerY(e){this._centerY!==e&&(this._centerY=e,this.dirtyPath=!0)}get centerY(){return this._centerY}set width(e){this._width!==e&&(this._width=e,this.dirtyPath=!0)}get width(){return this._width}set gripLineGap(e){this._gripLineGap!==e&&(this._gripLineGap=e,this.dirtyPath=!0)}get gripLineGap(){return this._gripLineGap}set gripLineLength(e){this._gripLineLength!==e&&(this._gripLineLength=e,this.dirtyPath=!0)}get gripLineLength(){return this._gripLineLength}set height(e){this._height!==e&&(this._height=e,this.dirtyPath=!0)}get height(){return this._height}computeBBox(){const{centerX:e,centerY:t,width:i,height:n}=this,o=e-i/2,r=t-n/2;return new Pc(o,r,i,n)}isPointInPath(e,t){const i=this.transformPoint(e,t),n=this.computeBBox();return n.containsPoint(i.x,i.y)}updatePath(){const{path:e,centerX:t,centerY:i,width:n,height:o}=this;e.clear();const r=t-n/2,s=i-o/2,a=this.align(r),l=this.align(s),c=a+this.align(r,n),u=l+this.align(s,o);e.moveTo(a,l),e.lineTo(c,l),e.lineTo(c,u),e.lineTo(a,u),e.lineTo(a,l);const d=this.gripLineGap/2,p=this.gripLineLength/2;e.moveTo(this.align(t-d),this.align(i-p)),e.lineTo(this.align(t-d),this.align(i+p)),e.moveTo(this.align(t+d),this.align(i-p)),e.lineTo(this.align(t+d),this.align(i+p))}}function my(e,t){e!==t&&(this.dirtyPath=!0)}yy.className="RangeHandle",fa([fl(Fl),ga("design:type",Object)],yy.prototype,"_fill",void 0),fa([fl(Fl),ga("design:type",Object)],yy.prototype,"_stroke",void 0),fa([fl(Hl(0)),ga("design:type",Object)],yy.prototype,"_strokeWidth",void 0),fa([fl(oc),ga("design:type",Object)],yy.prototype,"_lineCap",void 0),fa([fl(Hl(0)),ga("design:type",Number)],yy.prototype,"_width",void 0),fa([fl(Hl(0)),ga("design:type",Number)],yy.prototype,"_gripLineGap",void 0),fa([fl(Hl(0)),ga("design:type",Number)],yy.prototype,"_gripLineLength",void 0),fa([fl(Hl(0)),ga("design:type",Number)],yy.prototype,"_height",void 0);
18class Cy extends Ed{constructor(){super(...arguments),this.x=0,this.y=0,this.width=200,this.height=30,this.minRange=.05,this._min=0,this._max=1}set min(e){var t;e=al(0,e,this.max-this.minRange),this._min===e||isNaN(e)||(this._min=e,this.dirtyPath=!0,null===(t=this.onRangeChange)||void 0===t||t.call(this))}get min(){return this._min}set max(e){var t;e=al(this.min+this.minRange,e,1),this._max===e||isNaN(e)||(this._max=e,this.dirtyPath=!0,null===(t=this.onRangeChange)||void 0===t||t.call(this))}get max(){return this._max}computeBBox(){const{x:e,y:t,width:i,height:n}=this;return new Pc(e,t,i,n)}computeVisibleRangeBBox(){const{x:e,y:t,width:i,height:n,min:o,max:r}=this,s=e+i*o,a=e+i*r;return new Pc(s,t,a-s,n)}updatePath(){const{path:e,x:t,y:i,width:n,height:o,min:r,max:s}=this;e.clear();const a=this.align(t),l=this.align(i),c=a+this.align(t,n),u=l+this.align(i,o);e.moveTo(a,l),e.lineTo(c,l),e.lineTo(c,u),e.lineTo(a,u),e.lineTo(a,l);const d=this.align(t+n*r),p=this.align(t+n*s);e.moveTo(d,l),e.lineTo(d,u),e.lineTo(p,u),e.lineTo(p,l),e.lineTo(d,l)}}Cy.className="RangeMask",fa([tu({changeValue:my}),fl(Hl(0)),ga("design:type",Object)],Cy.prototype,"x",void 0),fa([tu({changeValue:my}),fl(Hl(0)),ga("design:type",Object)],Cy.prototype,"y",void 0),fa([tu({changeValue:my}),fl(Hl(0)),ga("design:type",Object)],Cy.prototype,"width",void 0),fa([tu({changeValue:my}),fl(Hl(0)),ga("design:type",Object)],Cy.prototype,"height",void 0),fa([fl(Hl()),ga("design:type",Number)],Cy.prototype,"_min",void 0),fa([fl(Hl()),ga("design:type",Number)],Cy.prototype,"_max",void 0);class by extends ad{set x(e){this.mask.x=e,this.updateHandles()}get x(){return this.mask.x}set y(e){this.mask.y=e,this.updateHandles()}get y(){return this.mask.y}set width(e){this.mask.width=e,this.updateHandles()}get width(){return this.mask.width}set height(e){this.mask.height=e,this.updateHandles()}get height(){return this.mask.height}set min(e){this.mask.min=e}get min(){return this.mask.min}set max(e){this.mask.max=e}get max(){return this.mask.max}constructor(){super({name:"rangeSelectorGroup"}),this.minHandle=new yy,this.maxHandle=new yy,this.mask=(()=>{const{x:e,y:t,width:i,height:n,min:o,max:r}=by.defaults,s=new Cy;s.x=e,s.y=t,s.width=i,s.height=n,s.min=o,s.max=r;const{minHandle:a,maxHandle:l}=this;return a.centerX=e,l.centerX=e+i,a.centerY=l.centerY=t+n/2,this.append([s,a,l]),s.onRangeChange=()=>{var e;this.updateHandles(),null===(e=this.onRangeChange)||void 0===e||e.call(this)},s})(),this._x=by.defaults.x,this._y=by.defaults.y,this._width=by.defaults.width,this._height=by.defaults.height,this._min=by.defaults.min,this._max=by.defaults.max,this.isContainerNode=!0}updateHandles(){const{minHandle:e,maxHandle:t,x:i,y:n,width:o,height:r,mask:s}=this;e.centerX=i+o*s.min,t.centerX=i+o*s.max,e.centerY=t.centerY=n+r/2}computeBBox(){return this.mask.computeBBox()}computeVisibleRangeBBox(){return this.mask.computeVisibleRangeBBox()}render(e){const{ctx:t,forceRender:i,stats:n}=e;if(this.dirty===Cc.NONE&&!i)return void(n&&n.nodesSkipped++);this.computeTransformMatrix(),this.matrix.toContext(t);const{mask:o,minHandle:r,maxHandle:s}=this;[o,r,s].forEach((n=>{n.visible&&(i||n.dirty>Cc.NONE)&&(t.save(),n.render(Object.assign(Object.assign({},e),{ctx:t,forceRender:i})),t.restore())})),this.markClean({force:!0}),n&&n.nodesRendered++}}by.className="Range",by.defaults={x:0,y:0,width:200,height:30,min:0,max:1};class wy extends ma{set width(e){this.rs.width=e}get width(){return this.rs.width}set height(e){this.rs.height=e}get height(){return this.rs.height}set min(e){this.rs.min=e}get min(){return this.rs.min}set max(e){this.rs.max=e}get max(){return this.rs.max}set visible(e){this._visible=e,this.updateGroupVisibility()}get visible(){return this._visible}updateGroupVisibility(){const e=this.enabled&&this.visible;this.rs.visible=e,e?this.ctx.zoomManager.updateZoom("navigator",{x:{min:this.rs.min,max:this.rs.max},y:{min:0,max:1}}):this.ctx.zoomManager.updateZoom("navigator")}constructor(e){var t;super(),this.ctx=e,this.rs=new by,this.mask=new vy(this.rs.mask),this.minHandle=new gy(this.rs.minHandle),this.maxHandle=new gy(this.rs.maxHandle),this.minHandleDragging=!1,this.maxHandleDragging=!1,this.panH
18andleOffset=NaN,this.enabled=!1,this.margin=10,this._visible=!0,this.rs.onRangeChange=()=>e.zoomManager.updateZoom("navigator",{x:{min:this.rs.min,max:this.rs.max},y:{min:0,max:1}}),null===(t=e.scene.root)||void 0===t||t.appendChild(this.rs);const i={bypassPause:["animation"]};this.destroyFns.push(e.interactionManager.addListener("drag-start",(e=>this.onDragStart(e)),i),e.interactionManager.addListener("drag",(e=>this.onDrag(e)),i),e.interactionManager.addListener("hover",(e=>this.onDrag(e)),i),e.interactionManager.addListener("drag-end",(()=>this.onDragStop()),i),e.layoutService.addListener("before-series",(e=>this.layout(e))),e.layoutService.addListener("layout-complete",(e=>this.layoutComplete(e))),(()=>{var t;return null===(t=e.scene.root)||void 0===t?void 0:t.removeChild(this.rs)}),(()=>this.ctx.zoomManager.updateZoom("navigator"))),this.updateGroupVisibility()}layout({shrinkRect:e}){if(this.enabled){const t=this.rs.height+this.margin;e.shrink(t,"bottom"),this.rs.y=e.y+e.height+this.margin}return{shrinkRect:e}}layoutComplete({series:{rect:e,visible:t}}){this.enabled&&t&&(this.rs.x=e.x,this.rs.width=e.width),this.visible=t}onDragStart(e){if(!this.enabled)return;const{offsetX:t,offsetY:i}=e,{rs:n}=this,{minHandle:o,maxHandle:r,x:s,width:a,min:l}=n,c=n.computeVisibleRangeBBox();this.minHandleDragging||this.maxHandleDragging||(o.containsPoint(t,i)?this.minHandleDragging=!0:r.containsPoint(t,i)?this.maxHandleDragging=!0:c.containsPoint(t,i)&&(this.panHandleOffset=(t-s)/a-l))}onDrag(e){if(!this.enabled)return;const{rs:t,panHandleOffset:i}=this,{x:n,y:o,width:r,height:s,minHandle:a,maxHandle:l}=t,{offsetX:c,offsetY:u}=e,d=n+r*t.min,p=n+r*t.max,h=new Pc(d,o,p-d,s),f=()=>Math.min(Math.max((c-n)/r,0),1);if(a.containsPoint(c,u)||l.containsPoint(c,u)?this.ctx.cursorManager.updateCursor("navigator","ew-resize"):h.containsPoint(c,u)?this.ctx.cursorManager.updateCursor("navigator","grab"):this.ctx.cursorManager.updateCursor("navigator"),this.minHandleDragging)t.min=f();else if(this.maxHandleDragging)t.max=f();else if(!isNaN(i)){const e=t.max-t.min,n=Math.min(f()-i,1-e);n<=t.min?(t.min=n,t.max=t.min+e):(t.max=n+e,t.min=t.max-e)}}onDragStop(){this.stopHandleDragging()}stopHandleDragging(){this.minHandleDragging=this.maxHandleDragging=!1,this.panH
18andleOffset=NaN}}fa([tu({changeValue(e){e&&(this.min=0,this.max=1),this.updateGroupVisibility()}}),fl(Dl),ga("design:type",Object)],wy.prototype,"enabled",void 0),fa([fl(Hl(0)),ga("design:type",Object)],wy.prototype,"margin",void 0);const Sy={type:"root",optionsKey:"navigator",packageType:"community",chartTypes:["cartesian"],instanceConstructor:wy,themeTemplate:{navigator:{enabled:!1,height:30,mask:{fill:"#999999",stroke:"#999999",strokeWidth:1,fillOpacity:.2},minHandle:{fill:"#f2f2f2",stroke:"#999999",strokeWidth:1,width:8,height:16,gripLineGap:2,gripLineLength:8},maxHandle:{fill:"#f2f2f2",stroke:"#999999",strokeWidth:1,width:8,height:16,gripLineGap:2,gripLineLength:8}}}},Ey=({takeColors:e})=>{const{fills:[t],strokes:[i]}=e(1);return{fill:t,stroke:i}},xy=e=>{const{fill:t,stroke:i}=Ey(e);return{marker:{fill:t,stroke:i}}},Oy={SMALL:12,MEDIUM:13,LARGE:17},Ty="bold",Dy="normal",Ry="bottom",Ay="left",_y="top",Py={BOTTOM:Ry,LEFT:Ay,TOP:_y},My="category",ky="number",Ny="time",Ly="log",Iy={CATEGORY:My,NUMBER:ky,TIME:Ny,LOG:Ly},Fy="angle-category",Gy="angle-number",Vy="radius-category",By="radius-number",jy={ANGLE_CATEGORY:Fy,ANGLE_NUMBER:Gy,RADIUS_CATEGORY:Vy,RADIUS_NUMBER:By},Hy="circle",Wy={},Uy={},zy={has(e){return Object.prototype.hasOwnProperty.call(Wy,e)},isCartesian(e){return"cartesian"===Wy[e]},isPolar(e){return"polar"===Wy[e]},isHierarchy(e){return"hierarchy"===Wy[e]},get seriesTypes(){return Object.keys(Wy)},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)))}};function Ky(e,t){Wy[e]=t}function Yy(e,t){var i;Uy[e]=Ya([null!==(i=Uy[e])&&void 0!==i?i:{},t])}function qy(e){var t;return null!==(t=Uy[e])&&void 0!==t?t:{}}function Xy(e){var t;return null!==(t=Wy[e])&&void 0!==t?t:"unknown"}function $y(e){var t,i,n,o;return null!==(o=null!==(t=e.type)&&void 0!==t?t:null===(n=null===(i=e.series)||void 0===i?void 0:i[0])||void 0===n?void 0:n.type)&&void 0!==o?o:"line"}function Zy(e){const t=$y(e);return null==t||("cartesian"===t?(Pa.warnOnce(`type '${t}' is deprecated, use a series type instead`),!0):zy.isCartesian(t)||ny(t))}function Jy(e){const t=$y(e);return null!=t&&("hierarchy"===t?(Pa.warnOnce(`type '${t}' is deprecated, use a series type instead`),!0):zy.isHierarchy(t)||ry(t))}function Qy(e){const t=$y(e);return null!=t&&("polar"===t?(Pa.warnOnce(`type '${t}' is deprecated, use a series type instead`),!0):zy.isPolar(t)||oy(t))}function em(e){return null!=e&&zy.has(e)}function tm(e){return null!=e&&Xv.has(e)}const im={axes:[{type:Iy.NUMBER,position:Py.LEFT},{type:Iy.CATEGORY,position:Py.BOTTOM}]};function nm(e){var t;if(!Zy(e))return e;const[i,n]=null!==(t=e.axes)&&void 0!==t?t:[];return Object.assign(Object.assign({},e),{axes:[Object.assign(Object.assign({},i),{position:n.position}),Object.assign(Object.assign({},n),{position:i.position})]})}function om(e){var t,i,n,o;const r={};for(const[s,a]of Sa.entries())if(null!=e[s]&&a.length){null!==(t=r[s])&&void 0!==t||(r[s]={});for(const t of a)(null===(i=e[s])||void 0===i?void 0:i.enabled)&&(null===(n=e[t])||void 0===n?void 0:n.enabled)?(Pa.warnOnce(`the [${s}] module can not be used at the same time as [${t}], it will be disabled.`),r[s].enabled=!1):r[s].enabled=null===(o=e[s])||void 0===o?void 0:o.enabled}return r}const rm=Symbol("extends-chart-defaults"),sm=Symbol("extends-legend-defaults"),am=Symbol("extends-legend-item-defaults"),lm=Symbol("extends-legend-item-marker-defaults"),cm=Symbol("extends-axes-defaults"),um=Symbol("extends-axes-label-defaults"),dm=Symbol("extends-axes-line-defaults"),pm=Symbol("extends-axes-tick-defaults"),hm=Symbol("extends-axes-grid-line-defaults"),fm=Symbol("extends-series-defaults"),gm=Symbol("extends-cartesian-marker-defaults"),vm=Symbol("override-series-label-defaults"),ym=Symbol("default-font"),mm=Symbol("default-label-colour"),Cm=Symbol("default-inverted-label-colour"),bm=Symbol("default-inside-series-label-colour"),wm=Symbol("default-muted-label-colour"),Sm=Symbol("default-axis-grid-colour"),Em=Symbol("default-axis-line-colour"),xm=Symbol("default-cross-lines-colour"),Om=Symbol("default-background-colour"),Tm=Symbol("default-shadow-colour"),Dm=Symbol("default-waterfall-series-positive-colors"),Rm=Symbol("default-waterfall-series-negative-colors"),Am=Symbol("default-waterfall-series-total-colors"),_m=Symbol("default-waterfall-series-connector-line-stroke"),Pm=Symbol("default-polar-series-stroke"),Mm=Symbol("default-diverging-series-colour-range"),km=Symbol("default-hierarchy-fills"),Nm=Symbol("default-hierarchy-strokes");function Lm(e,t,i,n,o){const{defaultDuration:r}=i,{addPhaseFn:s,updatePhaseFn:a,removePhaseFn:l}=o,c=(n,o,s)=>{i.animate({id:`${e}_${t}_${o.id}_${n}`,groupId:e,from:0,to:1,ease:cu,onUpdate(e,t){t&&"removed"!==n||(o.path.
18clear({trackChanges:!0}),s(e,o),o.checkPathDirty())},onStop(){"added"===n&&(o.path.clear({trackChanges:!0}),s(1,o),o.checkPathDirty())},duration:Ou[n].animationDuration*r,delay:Ou[n].animationDelay*r})};for(const u of n)i.isSkipped()||(c("removed",u,l),c("updated",u,a)),c("added",u,s)}const Im=vl((e=>qg(e)||Object.getPrototypeOf(e)===sp),"expecting a marker shape keyword such as 'circle', 'diamond' or 'square' or an object extending the Marker class");class Fm extends Oc{constructor(){super(...arguments),this.enabled=!0,this.shape=ap,this.size=6,this.fillOpacity=1,this.strokeWidth=1,this.strokeOpacity=1}getStyle(){const{size:e,fill:t,fillOpacity:i,stroke:n,strokeWidth:o,strokeOpacity:r}=this;return{size:e,fill:t,fillOpacity:i,stroke:n,strokeWidth:o,strokeOpacity:r}}getDiameter(){return this.size+this.strokeWidth}}function Gm({id:e},t,i){Du(e,"markers",t,i,{scalingX:0,scalingY:0},{scalingX:1,scalingY:1}),i.forEach((e=>e.cleanup()))}function Vm({id:e},t,i,n){const o=.1,r=(e,t)=>{var i,r;const s=null!==(r=null===(i=t.midPoint)||void 0===i?void 0:i.x)&&void 0!==r?r:n,a=uu(s/n)-o,l=Math.max(Math.min(a,1),0);return{scalingX:0,scalingY:0,animationDelay:l,animationDuration:gu}},s=()=>({scalingX:1,scalingY:1});Tu(e,"markers",t,i,{fromFn:r,toFn:s})}function Bm(e){return{opacity:1,scalingX:1,scalingY:1}}function jm(e,t){var i,n,o,r;return{translationX:null!==(n=null===(i=t.point)||void 0===i?void 0:i.x)&&void 0!==n?n:NaN,translationY:null!==(r=null===(o=t.point)||void 0===o?void 0:o.y)&&void 0!==r?r:NaN}}function Hm(e,t){const i=(t,i)=>{const n=e[i][t];return Array.isArray(n)?n[0]:n},n=t=>{const{xValue:n}=t;return e.moved[n]?{point:i(n,"moved"),status:"updated"}:e.removed[n]?{point:i(n,"removed"),status:"removed"}:e.added[n]?{point:i(n,"added"),status:"added"}:{status:"unknown"}},o=(e,i)=>{var o,r,s,a,l,c;const{status:u,point:d}=n(i);if("unknown"===u)return{opacity:0}
18;const p=Object.assign({translationX:null!==(r=null===(o=null===d||void 0===d?void 0:d.from)||void 0===o?void 0:o.x)&&void 0!==r?r:e.translationX,translationY:null!==(a=null===(s=null===d||void 0===d?void 0:d.from)||void 0===s?void 0:s.y)&&void 0!==a?a:e.translationY,opacity:e.opacity},Ou[u]);return"added"===t?Object.assign(Object.assign(Object.assign({},p),{opacity:0,translationX:null===(l=null===d||void 0===d?void 0:d.to)||void 0===l?void 0:l.x,translationY:null===(c=null===d||void 0===d?void 0:d.to)||void 0===c?void 0:c.y}),Ou["added"]):("added"===u&&(p.opacity=0),p)},r=(e,i)=>{var o,r;const{status:s,point:a}=n(i);if("unknown"===s)return{opacity:0};const l=Object.assign({translationX:i.point.x,translationY:i.point.y,opacity:1},Ou[s]);return"removed"===s||"removed"===t?Object.assign(Object.assign(Object.assign({},l),{translationX:null===(o=null===a||void 0===a?void 0:a.to)||void 0===o?void 0:o.x,translationY:null===(r=null===a||void 0===a?void 0:a.to)||void 0===r?void 0:r.y,opacity:0}),Ou["removed"]):l};return{fromFn:o,toFn:r}}function Wm(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 Um(e,t,i){const n=(t.y-e.y)/(t.x-e.x),o=(i-e.x)*n+e.y;return{x:i,y:o}}function zm(e,t,i,n){let o=-1,r=0;const s=[];while(r<e.length)e[r].change!==t?e[r].change!==i?(s.length>0&&(n(s,o,r),s.length=0),o=r,r++):r++:(s.push(e[r]),r++);s.length>0&&n(s,o,r)}function Km(e,t){zm(e,"out","in",((i,n,o)=>{var r,s;-1===n&&e[o]?i.forEach((t=>t.to=e[o].from)):o===e.length&&e[n]?i.forEach((t=>t.to=e[n].from)):"intersect"===t&&(null===(r=e[n])||void 0===r?void 0:r.from)&&(null===(s=e[o])||void 0===s?void 0:s.from)?i.forEach((t=>t.to=Um(e[n].from,e[o].from,t.from.x))):i.forEach((e=>e.to=e.from))})),zm(e,"in","out",((i,n,o)=>{var r,s;-1===n&&e[o]?i.forEach((t=>t.from=e[o].to)):o===e.length&&e[n]?i.forEach((t=>t.from=e[n].to)):"intersect"===t&&(null===(r=e[n])||void 0===r?void 0:r.to)&&(null===(s=e[o])||void 0===s?void 0:s.to)?i.forEach((t=>t.from=Um(e[n].to,e[o].to,t.to.x))):i.forEach((e=>e.from=e.to))}))}function Ym(e,t,i){const n=isNaN(e.x)?t.x:e.x,o=isNaN(e.y)?t.y:e.y,r=t.x-e.x,s=t.y-e.y,a=isNaN(r)?0:r*i,l=isNaN(s)?0:s*i;return{x:n+a,y:o+l}}function qm(e,t,i){const{path:n}=i;let o;for(const r of e){const e=t[r.change];if(null==e)continue;const{from:i,to:s}=r;if(null==i||null==s)continue;const{x:a,y:l}=Ym(i,s,e);if(!1===r.moveTo)n.lineTo(a,l);else if(!0!==r.moveTo&&o){if(o){const t="in"===r.moveTo?e:1-e,{x:i,y:s}=Ym(o,{x:a,y:l},t);n.lineTo(i,s),n.moveTo(a,l)}}else n.moveTo(a,l);o={x:a,y:l}}}function Xm({id:e},t,i){Du(e,"path_properties",t,i,{clipScalingX:0},{clipScalingX:1},{start:{clipMode:"normal"},finish:{clipMode:void 0}})}function $m({id:e},t,i,n){Du(e,t,i,n,{opacity:0},{opacity:1},bu)}function Zm(e){return t=>({opacity:e.getOpacity(),clipScalingX:1,clipMode:void 0})}function Jm(e,t){if(!t)return NaN;if(e instanceof Date&&(e=e.getTime()),"continuous"===t.type&&"number"===typeof e){const i=(e-t.domain[0])/(t.domain[1]-t.domain[0]);return i*(t.range[1]-t.range[0])+t.range[0]}if("log"===t.type&&"number"===typeof e)return t.convert(e);const i=t.domain.findIndex((t=>t===e));return i>=0?t.range[i]:NaN}function Qm(e,t){const i=Number(e),n=Number(t);return isNaN(i)||isNaN(n)?e===t:Math.abs(n-i)<.25}function eC(e=!1,t=!1){return e===t?!!e:e?"in":"out"}function tC(e,t,i={}){var n,o,r,s;const{backfillSplitMode:a="intersect"}=i,l=t=>{var i,n;return{x:Jm(null!==(i=t.xValue)&&void 0!==i?i:NaN,e.scales.x),y:Jm(null!==(n=t.yValue)&&void 0!==n?n:NaN,e.scales.y)}},c=e=>{var i,n;return{x:Jm(null!==(i=e.xValue)&&void 0!==i?i:NaN,t.scales.x),y:Jm(null!==(n=e.yValue)&&void 0!==n?n:NaN,t.scales.y)}},u=[],d={added:{},moved:{},removed:{}},p=(e,t,i,n="move")=>{e&&(isNaN(e.point.x)||isNaN(e.point.y))&&(e=t);const o={from:null===e||void 0===e?void 0:e.point,to:null===t||void 0===t?void 0:t.point,moveTo:eC(null===e||void 0===e?void 0:e.point.moveTo,null===t||void 0===t?void 0:t.point.moveTo),change:n};"move"===n?(d.moved[i]=o,y++,m++):"in"===n?(d.added[i]=o,m++):"out"===n&&(d.removed[i]=o,y++),u.push(o)},{min:h,max:f}=Wm(t.nodeData),{min:g,max:v}=Wm(e.nodeData);let y=0,m=0;while(y<t.nodeData.length||m<e.nodeData.length){const i=t.nodeData[y],a=e.nodeData[m],u=i?l(i):void 0,d=a?c(a):void 0,C=void 0;if(u&&Qm(u.x,null===a||void 0===a?void 0:a.point.x))p(i,a,a.xValue,"move");else if(u&&u.x<(null!==(n=null===g||void 0===g?void 0:g.point.x)&&void 0!==n?n:-1/0))p(i,C,i.xValue,"out");else if(u&&u.x>(null!==(o=null===v||void 0===v?void 0:v.point.x)&&void 0!==o?o:1/0))p(i,C,i.xValue,"out");else if(d&&d.x<(null!==(r=null===h||void 0===h?void 0:h.point.x)&&void 0!==r?r:-1/0))p(C,a,a.xValue,"in");else if(d&&d.x>(null!==(s=null===f||void 0===f?void 0:f.point.x)&&void 0!==s?s:1/0))p(C,a,a.xValue,"in");else if(u&&u.x<(null===a||void 0===a?void 0:a.point.x))p(i,C,i.xValue,"out");else if(d&&d.x<(null===i||void 0===i?void 0:i.point.x))p(C,a,a.xValue,"in");else if(i)p(i,C,i.xValue,"out");else{if(!a)throw new Error("Unable to process points");p(C,a,a.xValue,"in")}}return Km(u,a),{result:u,resultMap:d}}function iC(e,t,i,n={}){var o,r,s;const{backfillSplitMode:a="intersect",multiDatum:l=!1}=n,c=[],u={added:{},moved:{},removed:{}},d={added:{},moved:{},removed:{}};let p,h;const f=(e,t)=>{var i,n;const o="move"===t.change?"moved":"in"===t.change?"added":"removed";l?(null!==(i=(n=d[o])[e])&&void 0!==i||(n[e]=[]),d[o][e].push(t)):u[o][e]=t,p=t,h=e};let g=0,v=0,y=!1;while(g<t.nodeData.length||v<e.nodeData.length){const n=t.nodeData[g],a=e.nodeData[v];let u;if((null===n||void 0===n?void 0:n.xValue)===(null===a||void 0===a?void 0:a.xValue))u={change:"move",moveTo:eC(null!==(o=n.point.moveTo)&&void 0!==o&&o,a.point.moveTo),from:n.point,to:a.point},f(n.xValue,u),g++,v++;else if(i.removed.indexOf(null===n||void 0===n?void 0:n.xValue)>=0)u={change:"out",moveTo:null!==(r=n.point.moveTo)&&void 0!==r&&r,from:n.point},f(n.xValue,u),g++;else if(i.added.indexOf(null===a||void 0===a?void 0:a.xValue)>=0)u={change:"in",moveTo:null!==(s=a.point.moveTo)&&void 0!==s&&s,to:a.point},f(a.xValue,u),v++;else if(l&&p&&h===(null===n||void 0===n?void 0:n.xValue))u=Object.assign({},p),f(n.xValue,u),g++;else{if(!l||!p||h!==(null===a||void 0===a?void 0:a.xValue)){y=!0;break}u=Object.assign({},p),f(a.xValue,u),v++}c.push(u)}let m=-1/0;return y||(y=c.some((e=>{const{change:t,to:{x:i=-1/0}={}}=e;if("out"===t)return;const n=i<m;return m=i,n}))),y?{result:void 0,resultMap:void 0}:(Km(c,a),l?{result:c,resultMap:d}:{result:c,resultMap:u})}function nC(e,t){let i="updated";const n=e=>e.visible;return!n(t)&&n(e)?i="added":n(t)&&!n(e)&&(i="removed"),i}function oC(e,t){const i="none"===t?"updated":e,n={fromFn:t=>{let n;return n="removed"===e?{finish:{visible:!1}}:"added"===e?{start:{visible:!0}}:{},Object.assign(Object.assign({},Ou[i]),n)},toFn:e=>Object.assign({},Ou[i])};return"fade"===t?{fromFn:t=>{const i="added"===e?0:t.opacity;return Object.assign({opacity:i},n.fromFn(t))},toFn:t=>{const i="removed"===e?0:1;return Object.assign({opacity:i},n.toFn(t))}}:n}function rC(e,t,i,n,o){const r=nC(e,t),s=(e,t)=>{o(i,{move:0,out:e},t)},a=(e,t)=>{o(i,{move:e},t)},l=(e,t)=>
18{o(i,{move:1,in:e},t)},c=oC(r,n);return{status:r,path:{addPhaseFn:l,updatePhaseFn:a,removePhaseFn:s},pathProperties:c}}function sC(e,t,i){var n;const o="category"===(null===(n=e.scales.x)||void 0===n?void 0:n.type),{result:r,resultMap:s}=o&&i?iC(e,t,i):tC(e,t);let a="updated";if(t.visible&&!e.visible?a="removed":!t.visible&&e.visible&&(a="added"),void 0===r||void 0===s)return;const l=rC(e,t,r,"fade",qm),c=Hm(s,a);return Object.assign(Object.assign({},l),{marker:c})}var aC;function lC(e){const{points:t}=e.fillData;return{top:t.slice(0,t.length/2),bottom:t.slice(t.length/2).reverse()}}function cC(e,t,i){return{scales:t.scales,nodeData:i[e],visible:t.visible}}function uC(e,t,i){const n=lC(t),o=lC(e),r={multiDatum:!0};return{top:iC(cC("top",e,o),cC("top",t,n),i,r),bottom:iC(cC("bottom",e,o),cC("bottom",t,n),i,r)}}function dC(e,t){const i=lC(t),n=lC(e);return{top:tC(cC("top",e,n),cC("top",t,i)),bottom:tC(cC("bottom",e,n),cC("bottom",t,i))}}function pC(e,t,i){var n;const o="category"===(null===(n=e.scales.x)||void 0===n?void 0:n.type);let r="updated";t.visible&&!e.visible?r="removed":!t.visible&&e.visible&&(r="added");const s=()=>o&&i?iC(e,t,i,{backfillSplitMode:"static",multiDatum:!0}):tC(e,t,{backfillSplitMode:"static"}),a=()=>o&&i?uC(e,t,i):dC(e,t),{resultMap:l}=s(),{top:c,bottom:u}=a();if(void 0===l||void 0===c.result||void 0===u.result)return;const d=[...c.result,...u.result.reverse()],p=rC(e,t,d,"none",qm),h=Hm(l,r);return{fill:p,marker:h}}fa([fl(Dl),Sc({redraw:Cc.MAJOR}),ga("design:type",Object)],Fm.prototype,"enabled",void 0),fa([fl(Im),Sc({redraw:Cc.MAJOR}),ga("design:type",Object)],Fm.prototype,"shape",void 0),fa([fl(Hl(0)),Sc({redraw:Cc.MAJOR}),ga("design:type",Number)],Fm.prototype,"size",void 0),fa([fl(Gl),Sc({redraw:Cc.MAJOR}),ga("design:type",String)],Fm.prototype,"fill",void 0),fa([fl(Wl(0,1)),Sc({redraw:Cc.MAJOR}),ga("design:type",Number)],Fm.prototype,"fillOpacity",void 0),fa([fl(Gl),Sc({redraw:Cc.MAJOR}),ga("design:type",String)],Fm.prototype,"stroke",void 0),fa([fl(Wl(0)),Sc({redraw:Cc.MAJOR}),ga("design:type",Number)],Fm.prototype,"strokeWidth",void 0),fa([fl(Wl(0,1)),Sc({redraw:Cc.MAJOR}),ga("design:type",Number)],Fm.prototype,"strokeOpacity",void 0),fa([fl(Tl),Sc({redraw:Cc.MAJOR}),ga("design:type",Function)],Fm.prototype,"formatter",void 0),function(e){e[e["Fill"]=0]="Fill",e[e["Stroke"]=1]="Stroke",e[e["Marker"]=2]="Marker",e[e["Label"]=3]="Label"}(aC||(aC={}));class hC extends Pv{constructor(e){super({moduleCtx:e,pathsPerSeries:2,pathsZIndexSubOrderOffset:[0,1e3],hasMarkers:!0,markerSelectionGarbageCollection:!1,pickModes:[bp.NEAREST_BY_MAIN_AXIS_FIRST,bp.EXACT_SHAPE_MATCH],animationResetFns:{path:Zm({getOpacity:()=>this.getOpacity()}),label:Fp,marker:(e,t)=>Object.assign(Object.assign({},Bm()),jm(e,t))}}),this.tooltip=new lh,this.marker=new Fm,this.label=new Qd,this.fill="#c16068",this.stroke="#874349",this.fillOpacity=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.xKey=void 0,this.xName=void 0,this.strokeWidth=2,this.shadow=void 0}processData(e){return va(this,void 0,void 0,(function*(){const{xKey:t,yKey:i,normalizedTo:n,data:o,visible:r,seriesGrouping:{groupIndex:s=this.id}={}}=this;if(null==t||null==i||null==o)return;const a=!this.ctx.animationManager.isSkipped(),{isContinuousX:l,isContinuousY:c}=this.isContinuous(),u=[`area-stack-${s}-yValues`,`area-stack-${s}-yValues-trailing`,`area-stack-${s}-yValues-prev`,`area-stack-${s}-yValues-trailing-prev`,`area-stack-${s}-yValues-marker`],d=[],p=n&&isFinite(n)?n:void 0;p&&(d.push(Ud(this,[u[0],u[1],u[4]],p,"range")),d.push(Ud(this,[u[2],u[3]],p,"range"))),!l&&a&&this.processedData&&d.push(Zd(this.processedData)),a&&d.push(Yd(this));const h={invalidValue:null};r||(h.forceValue=0),yield this.requestDataModel(e,o,{props:[xp(this,t,l,{id:"xValue"}),Op(this,i,c,Object.assign({id:"yValueRaw"},h)),...Rp(this,i,c,"window","current",Object.assign(Object.assign({id:"yValueEnd"},h),{groupId:u[0]})),...Rp(this,i,c,"window-trailing","current",Object.assign(Object.assign({id:"yValueStart"},h),{groupId:u[1]})),...Rp(this,i,c,"window","last",Object.assign(Object.assign({id:"yValuePreviousEnd"},h),{groupId:u[2]})),...Rp(this,i,c,"window-trailing","last",Object.assign(Object.assign({id:"yValuePreviousStart"},h),{groupId:u[3]})),...Rp(this,i,c,"normal","current",Object.assign(Object.assign({id:"yValueCumulative"},h),{groupId:u[4]})),...d],groupByKeys:!0}),this.animationState.transition("updateData")}))}getSeriesDomain(e){const{processedData:t,dataModel:i,axes:n}=this;if(!t||!i)return[];const o=n[mc.X],r=n[mc.Y],s=i.resolveProcessedDataDefById(this,"xValue"),a=i.getDomain(this,"xValue","key",t),l=i.getDomain(this,"yValueEnd","value",t);if(e===mc.X)return"key"===(null===s||void 0===s?void 0:s.def.type)&&"category"===s.def.valueType?a:hg(xa(a),o);if(r instanceof Wv||r instanceof zv)return hg(l,r);{const e=[l[0]>0?0:l[0],l[1]<0?0:l[1]];return hg(e,r)}}createNodeData(){const e=Object.create(null,{calculateScaling:{get:()=>super.calculateScaling}});var t;return va(this,void 0,void 0,(function*(){const{axes:i,data:n,processedData:{data:o}={},dataModel:r}=this,s=i[mc.X],a=i[mc.Y];
18if(!s||!a||!n||!r)return[];const{yKey:l="",xKey:c="",marker:u,label:d,fill:p,stroke:h}=this,{scale:f}=s,{scale:g}=a,v=nd.is(g),y=(null!==(t=f.bandwidth)&&void 0!==t?t:0)/2,m=r.resolveProcessedDataDefsByIds(this,["yValueStart","yValueEnd","yValueRaw","yValuePreviousStart","yValuePreviousEnd","yValueCumulative"]),C=e=>{const{point:t}=e,i=ha(e,["point"]);return Object.assign(Object.assign({},i),{point:Object.assign(Object.assign({},t),{moveTo:!0})})},b=(e,t,i)=>{const n=f.convert(e)+y,o=g.convert(t),r=g.convert(i);return[{point:{x:n,y:r},yValue:i,xValue:e},{point:{x:n,y:o},yValue:t,xValue:e}]},w=(e,t,i)=>{let n;const o=this.normalizedTo&&isFinite(this.normalizedTo),r=o&&v&&Id(i),s=!o&&!isNaN(i)||r;s&&(n=t);const a=f.convert(e)+y,l=g.convert(n);return{x:a,y:l,size:u.size}},S=l,E=[],x=[],O={itemId:S,fillData:{itemId:S,points:[]},strokeData:{itemId:S,points:[]},labelData:E,nodeData:x,scales:e.calculateScaling.call(this),visible:this.visible},T=O.fillData.points,D=[],R=O.strokeData.points;let A,_=-1,P=-1/0;return null===o||void 0===o||o.forEach((e=>{const{keys:t,keys:[i],datum:n,values:o}=e;o.forEach(((e,o)=>{var s,a,f;_++;const g=n[o],v=r.resolveProcessedDataDefsValues(m,{keys:t,values:e}),{yValueRaw:y,yValueCumulative:O}=v;let{yValueStart:M,yValueEnd:k,yValuePreviousStart:N,yValuePreviousEnd:L}=v;const I=null!=y,F=w(i,+O,y);if(I&&u&&x.push({index:_,series:this,itemId:S,datum:g,midPoint:{x:F.x,y:F.y},cumulativeValue:k,yValue:y,xValue:i,yKey:l,xKey:c,point:F,fill:null!==(s=u.fill)&&void 0!==s?s:p,stroke:null!==(a=u.stroke)&&void 0!==a?a:h,strokeWidth:null!==(f=u.strokeWidth)&&void 0!==f?f:this.getStrokeWidth(this.strokeWidth)}),I&&d){const e=this.getLabelText(d,{value:y,datum:g,xKey:c,yKey:l,xName:this.xName,yName:this.yName},(e=>Gd(e)?e.toFixed(2):String(e)));E.push({index:_,series:this,itemId:l,datum:g,x:F.x,y:F.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})}null!=P&&null!=y||(M=null!==M&&void 0!==M?M:0,k=null!==M&&void 0!==M?M:0,N=null!==N&&void 0!==N?N:0,L=null!==N&&void 0!==N?N:0);const[G,V]=b(A,N,L),[B,j]=b(i,M,k),H=null!=A&&null!=i;H&&(T.push(G),D.push(V),T.push(B),D.push(j)),I&&null!=P&&_>0&&(R.push(C(G)),R.push(B)),A=i,P=y}))})),R.length>0&&(R[0]=C(R[0])),D.reverse(),T.push(...D),[O]}))}isPathOrSelectionDirty(){return this.marker.isDirty()}markerFactory(){const{shape:e}=this.marker,t=Xg(e);return new t}updatePathNodes(e){return va(this,void 0,void 0,(function*(){const{opacity:t,visible:i,animationEnabled:n}=e,[o,r]=e.paths,{seriesRectHeight:s,seriesRectWidth:a}=this.nodeDataDependencies,l=this.getStrokeWidth(this.strokeWidth);r.setProperties({tag:aC.Stroke,fill:void 0,lineJoin:r.lineCap="round",pointerEvents:kc.None,stroke:this.stroke,strokeWidth:l,strokeOpacity:this.strokeOpacity,lineDash:this.lineDash,lineDashOffset:this.lineDashOffset,opacity:t,visible:i}),o.setProperties({tag:aC.Fill,stroke:void 0,lineJoin:"round",pointerEvents:kc.None,fill:this.fill,fillOpacity:this.fillOpacity,lineDash:this.lineDash,lineDashOffset:this.lineDashOffset,strokeOpacity:this.strokeOpacity,fillShadow:this.shadow,opacity:t,visible:i||n,strokeWidth:l});const c=e=>{var t,i;null==e.clipPath&&(e.clipPath=new wd,e.clipScalingX=1,e.clipScalingY=1),null===(t=e.clipPath)||void 0===t||t.clear({trackChanges:!0}),null===(i=e.clipPath)||void 0===i||i.rect(-25,-25,(null!==a&&void 0!==a?a:0)+50,(null!==s&&void 0!==s?s:0)+50)};c(r),c(o)}))}updatePaths(e){return va(this,void 0,void 0,(function*(){this.updateAreaPaths([e.paths],[e.contextData])}))}updateAreaPaths(e,t){this.updateFillPath(e,t),this.updateStrokePath(e,t)}updateFillPath(e,t){t.forEach((({fillData:t},i)=>{const[n]=e[i],{path:o}=n;o.clear({trackChanges:!0});for(const{point:e}of t.points)e.moveTo?o.moveTo(e.x,e.y):o.lineTo(e.x,e.y);o.closePath(),n.checkPathDirty()}))}updateStrokePath(e,t){t.forEach((({strokeData:t},i)=>{const[,n]=e[i],{path:o}=n;o.clear({trackChanges:!0});for(const{point:e}of t.points)e.moveTo?o.moveTo(e.x,e.y):o.lineTo(e.x,e.y);n.checkPathDirty()}))}updateMarkerSelection(e){return va(this,void 0,void 0,(function*(){const{nodeData:t,markerSelection:i}=e,{marker:{enabled:n}}=this,o=n&&t?t:[];return this.marker.isDirty()&&(i.clear(),i.cleanup()),i.update(o)}))}updateMarkerNodes(e){return va(this,void 0,void 0,(function*(){const{markerSelection:t,isHighlight:i}=e,{xKey:n="",yKey:o="",marker:r,fill:s,stroke:a,strokeWidth:l,fillOpacity:c,strokeOpacity:u}=this,d=Ad(i&&this.highlightStyle.item,r.getStyle(),{fill:s,stroke:a,strokeWidth:l,fillOpacity:c,strokeOpacity:u});t.each(((e,t)=>{this.updateMarkerStyle(e,r,{datum:t,highlighted:i,xKey:n,yKey:o},d)})),i||this.marker.markClean()}))}updateLabelSelection(e){return va(this,void 0,void 0,(function*(){const{labelData:t,labelSelection:i}=e;return i.update(t,(e=>{e.tag=aC.Label}))}))}updateLabelNodes(e){return va(this,void 0,void 0,(function*(){const{labelSelection:t}=e,{enabled:i,fontStyle:n,fontWeight:o,fontSize:r,fontFamily:s,color:a}=this.label;t.each(((e,t)=>{const{x:l,y:c,label:u}=t;u&&i&&this.visible?(e.fontStyle=n,e.fontWeight=o,e.fontSize=r,e.fontFamily=s,e.textAlign=u.textAlign,e.textBaseline=u.textBaseline,e.text=u.text,e.x=l,e.y=c-10,e.fill=a,e.visible=!0):e.visible=!1}))}))}getTooltipHtml(e){const{xKey:t,id:i,axes:n,xName:o,yName:r,tooltip:s,marker:a,dataModel:l}=this,{yKey:c,xValue:u,yValue:d,datum:p}=e,h=n[mc.X],f=n[mc.Y];
18if(!t||!c||!(h&&f&&Gd(d))||!l)return"";const g=h.formatDatum(u),v=f.formatDatum(d),y=Pd(r),m=Pd(g+": "+v),C=Ad({fill:this.fill},a.getStyle(),{stroke:this.stroke,strokeWidth:this.strokeWidth}),{fill:b}=this.getMarkerStyle(a,{datum:e,xKey:t,yKey:c,highlighted:!1},C);return s.toTooltipHtml({title:y,content:m,backgroundColor:b},{datum:p,xKey:t,xName:o,yKey:c,yName:r,color:b,title:y,seriesId:i})}getLegendData(e){var t,i,n,o,r;const{data:s,id:a,xKey:l,yKey:c,yName:u,marker:d,fill:p,stroke:h,fillOpacity:f,strokeOpacity:g,visible:v}=this;return(null===s||void 0===s?void 0:s.length)&&l&&c&&"category"===e?[{legendType:e,id:a,itemId:c,seriesId:a,enabled:v,label:{text:null!==u&&void 0!==u?u:c},marker:{shape:d.shape,fill:null!==(t=d.fill)&&void 0!==t?t:p,stroke:null!==(i=d.stroke)&&void 0!==i?i:h,fillOpacity:null!==(n=d.fillOpacity)&&void 0!==n?n:f,strokeOpacity:null!==(o=d.strokeOpacity)&&void 0!==o?o:g,strokeWidth:null!==(r=d.strokeWidth)&&void 0!==r?r:0}}]:[]}animateEmptyUpdateReady(e){const{markerSelections:t,labelSelections:i,contextData:n,paths:o}=e,{animationManager:r}=this.ctx,{seriesRectWidth:s=0}=this.nodeDataDependencies;this.updateAreaPaths(o,n),Xm(this,r,o.flat()),dh(t,jm),Vm(this,r,t,s),Lp(this,"labels",r,i)}animateReadyResize(e){const{contextData:t,paths:i}=e;this.updateAreaPaths(i,t),super.animateReadyResize(e)}animateWaitingUpdateReady(e){var t,i;const{animationManager:n}=this.ctx,{markerSelections:o,labelSelections:r,contextData:s,paths:a,previousContextData:l}=e;if(super.resetAllAnimation(e),0===s.length||!l||0===l.length)return n.skipCurrentBatch(),void this.updateAreaPaths(a,s);const[[c,u]]=a,[d]=s,[p]=l,h=pC(d,p,null===(i=null===(t=this.processedData)||void 0===t?void 0:t.reduced)||void 0===i?void 0:i.diff);if(void 0===h)return n.skipCurrentBatch(),void this.updateAreaPaths(a,s);Tu(this.id,"marker_update",n,o,h.marker),Tu(this.id,"fill_path_properties",n,[c],h.fill.pathProperties),Lm(this.id,"fill_path_update",n,[c],h.fill.path),this.updateStrokePath(a,s),$m(this,"stroke",n,[u]),Lp(this,"labels",n,r)}isLabelEnabled(){return this.label.enabled}nodeFactory(){return new ad}}hC.className="AreaSeries",hC.type="area",fa([fl(Fl),ga("design:type",String)],hC.prototype,"fill",void 0),fa([fl(Fl),ga("design:type",String)],hC.prototype,"stroke",void 0),fa([fl(Hl(0,1)),ga("design:type",Object)],hC.prototype,"fillOpacity",void 0),fa([fl(Hl(0,1)),ga("design:type",Object)],hC.prototype,"strokeOpacity",void 0),fa([fl(ic),ga("design:type",Array)],hC.prototype,"lineDash",void 0),fa([fl(Hl(0)),ga("design:type",Number)],hC.prototype,"lineDashOffset",void 0),fa([fl(_l),ga("design:type",String)],hC.prototype,"xKey",void 0),fa([fl(_l),ga("design:type",String)],hC.prototype,"xName",void 0),fa([fl(_l),ga("design:type",String)],hC.prototype,"yKey",void 0),fa([fl(_l),ga("design:type",String)],hC.prototype,"yName",void 0),fa([fl(Wl(0)),ga("design:type",Number)],hC.prototype,"normalizedTo",void 0),fa([fl(Hl(0)),ga("design:type",Object)],hC.prototype,"strokeWidth",void 0);const fC={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["cartesian"],identifier:"area",instanceConstructor:hC,stackable:!0,seriesDefaults:im,themeTemplate:{__extends__:fm,nodeClickRange:"nearest",tooltip:{position:{type:"node"}},fillOpacity:.8,strokeOpacity:1,strokeWidth:0,lineDash:[0],lineDashOffset:0,shadow:{enabled:!1,color:Tm,xOffset:3,yOffset:3,blur:5},marker:{__extends__:gm,enabled:!1,fillOpacity:1,strokeOpacity:1,strokeWidth:0},label:{enabled:!1,fontStyle:void 0,fontWeight:void 0,fontSize:12,fontFamily:ym,color:mm,formatter:void 0}},paletteFactory:e=>{const{marker:t}=xy(e);return{fill:t.fill,stroke:t.stroke,marker:t}}};class gC extends Pv{constructor(){super(...arguments),this.direction="vertical"}getBandScalePadding(){return{inner:.2,outer:.1}}shouldFlipXY(){return"horizontal"===this.direction}getBarDirection(){return this.shouldFlipXY()?mc.X:mc.Y}getCategoryDirection(){return this.shouldFlipXY()?mc.Y:mc.X}getValueAxis(){const e=this.getBarDirection();return this.axes[e]}getCategoryAxis(){const e=this.getCategoryDirection();return this.axes[e]}}function vC({rect:e,config:t}){const{crisp:i=!0,fill:n,stroke:o,strokeWidth:r,fillOpacity:s,strokeOpacity:a,lineDash:l,lineDashOffset:c,fillShadow:u,visible:d=!0}=t;e.crisp=i,e.fill=n,e.stroke=o,e.strokeWidth=r,e.fillOpacity=s,e.strokeOpacity=a,e.lineDash=l,e.lineDashOffset=c,e.fillShadow=u,e.visible=d}function yC(e){var t,i,n,o,r,{datum:s,isHighlighted:a,style:l,highlightStyle:c,formatter:u,seriesId:d,ctx:{callbackCache:p}}=e,h=ha(e,["datum","isHighlighted","style","highlightStyle","formatter","seriesId","ctx"]);const{fill:f,fillOpacity:g,stroke:v,strokeWidth:y}=Ad(a&&c,l),{strokeOpacity:m,fillShadow:C,lineDash:b,lineDashOffset:w}=l;let S;return u&&(S=p.call(u,Object.assign({datum:s.datum,xKey:s.xKey,fill:f,stroke:v,strokeWidth:y,highlighted:a,seriesId:d},h))),{fill:null!==(t=null===S||void 0===S?void 0:S.fill)&&void 0!==t?t:f,stroke:null!==(i=null===S||void 0===S?void 0:S.stroke)&&void 0!==i?i:v,strokeWidth:null!==(n=null===S||void 0===S?void 0:S.strokeWidth)&&void 0!==n?n:y,fillOpacity:null!==(o=null===S||void 0===S?void 0:S.fillOpacity)&&void 0!==o?o:g,strokeOpacity:null!==(r=null===S||void 0===S?void 0:S.strokeOpacity)&&void 0!==r?r:m,lineDash:b,lineDashOffset:w,fillShadow:C}
18}function mC(e=[]){const[t,i]=e,n=0!==t||1!==i;return!n}function CC(e,t){const{startingX:i,startingY:n}=wC(e,t),o=e=>{var t;return cl(null!==(t=e["yValue"])&&void 0!==t?t:0)},r=(t,r)=>{let s=e?t.x:i,a=e?n:t.y,l=e?t.width:0,c=e?0:t.height;return r&&(isNaN(s)||isNaN(a))&&(({x:s,y:a}=r),l=e?r.width:0,c=e?0:r.height,e&&!o(r)?a+=r.height:!e&&o(r)&&(s+=r.width)),{x:s,y:a,width:l,height:c}};return{isVertical:e,calculate:r}}function bC(e){const t=e=>null==e||isNaN(e.x)||isNaN(e.y),i=(i,n,o)=>{"updated"===o&&t(n)?o="removed":"updated"===o&&t(i.previousDatum)&&(o="added");let r={x:i.x,y:i.y,width:i.width,height:i.height};return"unknown"!==o&&"added"!==o||(r=e.calculate(n,i.previousDatum)),Object.assign(Object.assign({},r),Ou[o])},n=(i,n,o)=>"removed"===o||t(n)?e.calculate(n,i.previousDatum):{x:n.x,y:n.y,width:n.width,height:n.height};return{toFn:n,fromFn:i}}function wC(e,t){const i=t[e?mc.Y:mc.X];let n=1/0,o=0;return i?(e?o=i.scale.convert(nd.is(i.scale)?0:Math.max(...i.range)):n=i.scale.convert(nd.is(i.scale)?0:Math.min(...i.range)),{startingX:n,startingY:o}):{startingX:n,startingY:o}}function SC(e,{x:t,y:i,width:n,height:o}){return{x:t,y:i,width:n,height:o}}function EC(e,t,i){if(t.enabled&&i){const{x:n,y:o,text:r,textAlign:s,textBaseline:a}=i,{color:l,fontStyle:c,fontWeight:u,fontSize:d,fontFamily:p}=t;e.setProperties({visible:!0,x:n,y:o,text:r,fill:l,fontStyle:c,fontWeight:u,fontSize:d,fontFamily:p,textAlign:s,textBaseline:a})}else e.visible=!1}function xC({isPositive:e,isVertical:t,placement:i,padding:n=0,rect:o}){let r=o.x+o.width/2,s=o.y+o.height/2,a="center",l="middle";switch(i){case"start":t?(s=e?o.y+o.height+n:o.y-n,l=e?"top":"bottom"):(r=e?o.x-n:o.x+o.width+n,a=e?"start":"end");break;case"outside":case"end":t?(s=e?o.y-n:o.y+o.height+n,l=e?"bottom":"top"):(r=e?o.x+o.width+n:o.x-n,a=e?"start":"end");break}return{x:r,y:s,textAlign:a,textBaseline:l}}var OC;fa([fl(yc),ga("design:type",String)],gC.prototype,"direction",void 0),function(e){e[e["Bar"]=0]="Bar",e[e["Label"]=1]="Label"}(OC||(OC={}));class TC extends Qd{constructor(){super(...arguments),this.placement="inside"}}fa([fl(ql("inside","outside")),ga("design:type",String)],TC.prototype,"placement",void 0);class DC extends gC{constructor(e){super({moduleCtx:e,pickModes:[bp.EXACT_SHAPE_MATCH],pathsPerSeries:0,hasHighlightedLabels:!0,datumSelectionGarbageCollection:!1,animationResetFns:{datum:SC,label:Fp}}),this.label=new TC,this.tooltip=new lh,this.fill="#c16068",this.stroke="#874349",this.fillOpacity=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.formatter=void 0,this.xKey=void 0,this.xName=void 0,this.yKey=void 0,this.yName=void 0,this.stackGroup=void 0,this.strokeWidth=1,this.shadow=void 0,this.groupScale=new sl,this.smallestDataInterval=void 0}resolveKeyDirection(e){return this.getBarDirection()===mc.X?e===mc.X?mc.Y:mc.X:e}processData(e){var t,i,n,o;return va(this,void 0,void 0,(function*(){const{xKey:r,yKey:s,normalizedTo:a,seriesGrouping:{groupIndex:l=this.id}={},data:c=[]}=this;if(null==r||null==s||null==c)return;const u=!this.ctx.animationManager.isSkipped(),d=Math.abs(null!==a&&void 0!==a?a:NaN),p=nd.is(null===(t=this.getCategoryAxis())||void 0===t?void 0:t.scale),h=nd.is(null===(i=this.getValueAxis())||void 0===i?void 0:i.scale),f=`bar-stack-${l}-yValues`,g=`${f}-trailing`,v=d&&isFinite(d)?d:void 0,y=[];v&&y.push(Ud(this,[f,g],v,"range")),u&&this.processedData&&y.push(Zd(this.processedData)),u&&y.push(Yd(this));const m=this.visible?{}:{forceValue:0},{processedData:C}=yield this.requestDataModel(e,c,{props:[xp(this,r,p,{id:"xValue"}),Op(this,s,h,Object.assign({id:"yValue-raw",invalidValue:null},m)),...Rp(this,s,h,"normal","current",Object.assign({id:"yValue-end",invalidValue:null,missingValue:0,groupId:f,separateNegative:!0},m)),...Rp(this,s,h,"trailing","current",Object.assign({id:"yValue-start",invalidValue:null,missingValue:0,groupId:g,separateNegative:!0},m)),...p?[jd]:[],...y],groupByKeys:!0});this.smallestDataInterval={x:null!==(o=null===(n=C.reduced)||void 0===n?void 0:n.smallestKeyInterval)&&void 0!==o?o:1/0,y:1/0},this.animationState.transition("updateData")}))}getSeriesDomain(e){var t;const{processedData:i,dataModel:n}=this;if(!i||!n)return[];const{reduced:{[jd.property]:o}={}}=i,r=this.getCategoryAxis(),s=this.getValueAxis(),a=n.resolveProcessedDataDefById(this,"xValue"),l=n.getDomain(this,"xValue","key",i),c=n.getDomain(this,"yValue-end","value",i);
18if(e===this.getCategoryDirection()){if("key"===(null===a||void 0===a?void 0:a.def.type)&&"category"===(null===a||void 0===a?void 0:a.def.valueType))return l;const i=null!=o&&isFinite(o)?o:0,n=null!==(t=xa(l))&&void 0!==t?t:[NaN,NaN];return e===mc.Y?hg([n[0]+-i,n[1]],r):hg([n[0],n[1]+i],r)}if(this.getValueAxis()instanceof Wv)return hg(c,s);{const e=[c[0]>0?0:c[0],c[1]<0?0:c[1]];return hg(e,s)}}createNodeData(){const e=Object.create(null,{calculateScaling:{get:()=>super.calculateScaling}});return va(this,void 0,void 0,(function*(){const{dataModel:t}=this,i=this.getCategoryAxis(),n=this.getValueAxis();if(!(t&&i&&n))return[];const o=i.scale,r=n.scale,{groupScale:s,yKey:a="",xKey:l="",fill:c,stroke:u,strokeWidth:d,label:p,processedData:h,ctx:{seriesStateManager:f},smallestDataInterval:g}=this,v=nd.is(o)?o.calcBandwidth(null===g||void 0===g?void 0:g.x):o.bandwidth,y=[],{index:m,visibleGroupCount:C}=f.getVisiblePeerGroupIndex(this);for(let e=0;e<C;e++)y.push(String(e));s.domain=y,s.range=[0,null!==v&&void 0!==v?v:0],i instanceof Nf?s.paddingInner=i.groupPaddingInner:s.padding=i instanceof Xf?.1:0,s.round=0!==s.padding;const b=s.bandwidth>=1?s.bandwidth:s.rawBandwidth,w=t.resolveProcessedDataIndexById(this,"xValue").index,S=t.resolveProcessedDataIndexById(this,"yValue-raw").index,E=t.resolveProcessedDataIndexById(this,"yValue-start").index,x=t.resolveProcessedDataIndexById(this,"yValue-end").index,O=!this.ctx.animationManager.isSkipped(),T={itemId:a,nodeData:[],labelData:[],scales:e.calculateScaling.call(this),visible:this.visible||O};return null===h||void 0===h||h.data.forEach((({keys:e,datum:t,values:i})=>{const n=e[w],h=o.convert(n),f=+i[0][x],g=+i[0][E],v=i[0][S],y=h+s.convert(String(m));if(isNaN(f))return;const C=r.convert(f),O=r.convert(g),D=this.getBarDirection()===mc.X,R={x:D?Math.min(C,O):y,y:D?y:Math.min(C,O),width:D?Math.abs(O-C):b,height:D?b:Math.abs(O-C)},{fontStyle:A,fontWeight:_,fontSize:P,fontFamily:M,color:k,placement:N}=p,L=this.getLabelText(this.label,{datum:t[0],value:v,xKey:l,yKey:a,xName:this.xName,yName:this.yName,legendItemName:this.legendItemName},(e=>Gd(e)?e.toFixed(2):"")),I=L?Object.assign({text:L,fill:k,fontStyle:A,fontWeight:_,fontSize:P,fontFamily:M},xC({isPositive:v>=0,isVertical:!D,placement:N,rect:R})):void 0,F=this.shouldFlipXY()?R.height:R.width,G={series:this,itemId:a,datum:t[0],cumulativeValue:f,xValue:n,yValue:v,yKey:a,xKey:l,capDefaults:{lengthRatioMultiplier:F,lengthMax:F},x:R.x,y:R.y,width:R.width,height:R.height,midPoint:{x:R.x+R.width/2,y:R.y+R.height/2},fill:c,stroke:u,strokeWidth:d,label:I};T.nodeData.push(G),T.labelData.push(G)})),[T]}))}nodeFactory(){return new xv}updateDatumSelection(e){return va(this,void 0,void 0,(function*(){return e.datumSelection.update(e.nodeData,(e=>{e.tag=OC.Bar}),(e=>e.xValue))}))}updateDatumNodes(e){return va(this,void 0,void 0,(function*(){const{datumSelection:t,isHighlight:i}=e,{yKey:n="",fill:o,stroke:r,fillOpacity:s,strokeOpacity:a,lineDash:l,lineDashOffset:c,shadow:u,formatter:d,id:p,highlightStyle:{item:h},ctx:f,stackGroup:g}=this,v=this.axes[mc.X],y=mC(null===v||void 0===v?void 0:v.visibleRange),m=this.getCategoryDirection()===mc.X;t.each(((e,t)=>{const v={fill:o,stroke:r,fillOpacity:s,strokeOpacity:a,lineDash:l,lineDashOffset:c,fillShadow:u,strokeWidth:this.getStrokeWidth(this.strokeWidth)},C=m?t.width>0:t.height>0,b=yC({datum:t,isHighlighted:i,style:v,highlightStyle:h,formatter:d,seriesId:p,stackGroup:g,ctx:f,yKey:n});b.crisp=y,b.visible=C,vC({rect:e,config:b})}))}))}updateLabelSelection(e){return va(this,void 0,void 0,(function*(){const t=this.label.enabled?e.labelData:[];return e.labelSelection.update(t,(e=>{e.tag=OC.Label,e.pointerEvents=kc.None}))}))}updateLabelNodes(e){return va(this,void 0,void 0,(function*(){e.labelSelection.each(((e,t)=>{EC(e,this.label,t.label)}))}))}getTooltipHtml(e){var t;const{xKey:i,yKey:n,processedData:o,ctx:{callbackCache:r}}=this,s=this.getCategoryAxis(),a=this.getValueAxis(),{xValue:l,yValue:c,datum:u}=e;if(!o||!i||!n||!s||!a)return"";const{xName:d,yName:p,fill:h,stroke:f,tooltip:g,formatter:v,id:y,stackGroup:m}=this,C=this.getStrokeWidth(this.strokeWidth),b=s.formatDatum(l),w=a.formatDatum(c),S=Pd(p),E=Pd(b+": "+w);let x;v&&(x=r.call(v,{datum:u,fill:h,stroke:f,strokeWidth:C,highlighted:!1,xKey:i,yKey:n,seriesId:y,stackGroup:m}));const O=null!==(t=null===x||void 0===x?void 0:x.fill)&&void 0!==t?t:h;return g.toTooltipHtml({title:S,content:E,backgroundColor:O},Object.assign({datum:u,xKey:i,xName:d,yKey:n,yName:p,color:O,title:S,seriesId:y,stackGroup:m},this.getModuleTooltipParams(u)))}getLegendData(e){var t;const{id:i,data:n,xKey:o,yKey:r,yName:s,legendItemName:a,fill:l,stroke:c,strokeWidth:u,fillOpacity:d,strokeOpacity:p,visible:h,showInLegend:f}=this;return"category"===e&&f&&(null===n||void 0===n?void 0:n.length)&&o&&r?[{legendT
18ype:"category",id:i,itemId:r,seriesId:i,enabled:h,label:{text:null!==(t=null!==a&&void 0!==a?a:s)&&void 0!==t?t:r},marker:{fill:l,stroke:c,fillOpacity:d,strokeOpacity:p,strokeWidth:u},legendItemName:a}]:[]}animateEmptyUpdateReady({datumSelections:e,labelSelections:t,annotationSelections:i}){const n=bC(CC("vertical"===this.direction,this.axes));Tu(this.id,"nodes",this.ctx.animationManager,e,n),Lp(this,"labels",this.ctx.animationManager,t),Lp(this,"annotations",this.ctx.animationManager,i)}animateWaitingUpdateReady(e){var t,i;const{datumSelections:n,labelSelections:o,annotationSelections:r}=e;this.ctx.animationManager.stopByAnimationGroupId(this.id);const s=null===(i=null===(t=this.processedData)||void 0===t?void 0:t.reduced)||void 0===i?void 0:i.diff,a=bC(CC("vertical"===this.direction,this.axes));Tu(this.id,"nodes",this.ctx.animationManager,n,a,((e,t)=>String(t.xValue)),s),Lp(this,"labels",this.ctx.animationManager,o),Lp(this,"annotations",this.ctx.animationManager,r)}isLabelEnabled(){return this.label.enabled}}DC.className="BarSeries",DC.type="bar",fa([fl(Gl),ga("design:type",String)],DC.prototype,"fill",void 0),fa([fl(Gl),ga("design:type",String)],DC.prototype,"stroke",void 0),fa([fl(Hl(0,1)),ga("design:type",Object)],DC.prototype,"fillOpacity",void 0),fa([fl(Hl(0,1)),ga("design:type",Object)],DC.prototype,"strokeOpacity",void 0),fa([fl(ic),ga("design:type",Array)],DC.prototype,"lineDash",void 0),fa([fl(Hl(0)),ga("design:type",Number)],DC.prototype,"lineDashOffset",void 0),fa([fl(Tl),ga("design:type",Function)],DC.prototype,"formatter",void 0),fa([fl(_l),ga("design:type",String)],DC.prototype,"xKey",void 0),fa([fl(_l),ga("design:type",String)],DC.prototype,"xName",void 0),fa([fl(_l),ga("design:type",String)],DC.prototype,"yKey",void 0),fa([fl(_l),ga("design:type",String)],DC.prototype,"yName",void 0),fa([fl(_l),ga("design:type",String)],DC.prototype,"stackGroup",void 0),fa([fl(Wl()),ga("design:type",Number)],DC.prototype,"normalizedTo",void 0),fa([fl(Hl(0)),ga("design:type",Number)],DC.prototype,"strokeWidth",void 0);const RC={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["cartesian"],identifier:"bar",instanceConstructor:DC,stackable:!0,groupable:!0,seriesDefaults:{axes:[{type:Iy.NUMBER,position:Py.LEFT},{type:Iy.CATEGORY,position:Py.BOTTOM}]},swapDefaultAxesCondition:e=>"horizontal"===(null===e||void 0===e?void 0:e.direction),themeTemplate:{__extends__:fm,fillOpacity:1,strokeWidth:0,lineDash:[0],lineDashOffset:0,label:{enabled:!1,fontStyle:void 0,fontWeight:Dy,fontSize:12,fontFamily:ym,color:bm,formatter:void 0,placement:"inside"},shadow:{enabled:!1,color:Tm,xOffset:3,yOffset:3,blur:5}},enterpriseThemeTemplate:{errorBar:{cap:{lengthRatio:.3}}},paletteFactory:Ey};class AC extends _v{constructor(e,t,i,n){super(e,t,i,n),this.sizeKey=n.sizeKey}}class _C extends Fm{constructor(){super(...arguments),this.maxSize=30,this.domain=void 0}}fa([fl(Hl(0)),Sc({redraw:Cc.MAJOR}),ga("design:type",Object)],_C.prototype,"maxSize",void 0),fa([fl(Kl),Sc({redraw:Cc.MAJOR}),ga("design:type",Array)],_C.prototype,"domain",void 0);class PC extends Pv{constructor(e){super({moduleCtx:e,pickModes:[bp.NEAREST_BY_MAIN_CATEGORY_AXIS_FIRST,bp.NEAREST_NODE,bp.EXACT_SHAPE_MATCH],pathsPerSeries:0,hasMarkers:!0,markerSelectionGarbageCollection:!1,animationResetFns:{label:Fp,marker:Bm}}),this.NodeClickEvent=AC,this.sizeScale=new od,this.marker=new _C,this.label=new Qd,this.title=void 0,this.labelKey=void 0,this.xName=void 0,this.yName=void 0,this.sizeName="Size",this.labelName="Label",this.xKey=void 0,this.yKey=void 0,this.sizeKey=void 0,this.colorKey=void 0,this.colorName="Color",this.colorRange=["#ffff00","#00ff00","#0000ff"],this.colorScale=new Sv,this.tooltip=new lh}processData(e){var t,i;return va(this,void 0,void 0,(function*(){const{xKey:n,yKey:o,sizeKey:r,labelKey:s,colorScale:a,colorDomain:l,colorRange:c,colorKey:u,marker:d,data:p}=this;if(null==n||null==o||null==r||null==p)return;const{isContinuousX:h,isContinuousY:f}=this.isContinuous(),{dataModel:g,processedData:v}=yield this.requestDataModel(e,p,{props:[xp(this,n,h,{id:"xKey-raw"}),xp(this,o,f,{id:"yKey-raw"}),...s?[xp(this,s,!1,{id:"labelKey-raw"})]:[],Op(this,n,h,{id:"xValue"}),Op(this,o,f,{id:"yValue"}),Op(this,r,!0,{id:"sizeValue"}),...u?[Op(this,u,!0,{id:"colorValue"})]:[],...s?[Op(this,s,!1,{id:"labelValue"})]:[]],dataVisible:this.visible}),y=g.resolveProcessedDataIndexById(this,"sizeValue").index,m=null!==(t=v.domain.values[y])&&void 0!==t?t:[];if(this.sizeScale.domain=d.domain?d.domain:m,u){const e=g.resolveProcessedDataIndexById(this,"colorValue").index;a.domain=null!==(i=null!==l&&void 0!==l?l:v.domain.values[e])&&void 0!==i?i:[],a.range=c,a.update()}this.animationState.transition("updateData")}))}getSeriesDomain(e){const{dataModel:t,processedData:i}=this;if(!i||!t)return[];const n=e===mc.X?"xValue":"yValue",o=t.resolveProcessedDataDefById(this,n),r=t.getDomain(this,n,"value",i);if("value"===(null===o||void 0===o?void 0:o.def.type)&&"category"===(null===o||void 0===o?void 0:o.def.valueType))return r;const s=this.axes[e];return hg(xa(r),s)}createNodeData(){const e=Object.create(null,{calculateScaling:{get:()=>super.calculateScaling}});var t,i,n,o;return va(this,void 0,void 0,(function*(){const{visible:r,axes:s,yKey:a="",xKey:l="",label:c,labelKey:u,dataModel:d,processedData:p,colorScale:h,sizeKey:f="",colorKey:g}=this,v=s[mc.X],y=s[mc.Y];
18if(!(d&&p&&r&&v&&y))return[];const m=d.resolveProcessedDataIndexById(this,"xValue").index,C=d.resolveProcessedDataIndexById(this,"yValue").index,b=f?d.resolveProcessedDataIndexById(this,"sizeValue").index:-1,w=g?d.resolveProcessedDataIndexById(this,"colorValue").index:-1,S=u?d.resolveProcessedDataIndexById(this,"labelValue").index:-1,E=v.scale,x=y.scale,O=(null!==(t=E.bandwidth)&&void 0!==t?t:0)/2,T=(null!==(i=x.bandwidth)&&void 0!==i?i:0)/2,{sizeScale:D,marker:R}=this,A=[];D.range=[R.size,R.maxSize];const _=c.getFont();for(const{values:e,datum:t}of null!==(n=p.data)&&void 0!==n?n:[]){const i=e[m],n=e[C],o=E.convert(i)+O,r=x.convert(n)+T,s=this.getLabelText(c,{value:u?e[S]:n,datum:t,xKey:l,yKey:a,sizeKey:f,labelKey:u,xName:this.xName,yName:this.yName,sizeName:this.sizeName,labelName:this.labelName}),d=Vc.getTextSize(String(s),_),p=f?D.convert(e[b]):R.size,v=g?h.convert(e[w]):void 0;A.push({series:this,itemId:a,yKey:a,xKey:l,datum:t,xValue:i,yValue:n,sizeValue:e[b],point:{x:o,y:r,size:p},midPoint:{x:o,y:r},fill:v,label:Object.assign({text:s},d)})}return[{itemId:null!==(o=this.yKey)&&void 0!==o?o:this.id,nodeData:A,labelData:A,scales:e.calculateScaling.call(this),visible:this.visible}]}))}isPathOrSelectionDirty(){return this.marker.isDirty()}getLabelData(){var e;return null===(e=this.contextNodeData)||void 0===e?void 0:e.reduce(((e,t)=>e.concat(t.labelData)),[])}markerFactory(){const{shape:e}=this.marker,t=Xg(e);return new t}updateMarkerSelection(e){return va(this,void 0,void 0,(function*(){const{nodeData:t,markerSelection:i}=e;this.marker.isDirty()&&(i.clear(),i.cleanup());const n=this.marker.enabled?t:[];return i.update(n,void 0,(e=>this.getDatumId(e)))}))}updateMarkerNodes(e){return va(this,void 0,void 0,(function*(){const{markerSelection:t,isHighlight:i}=e,{xKey:n="",yKey:o="",sizeKey:r="",labelKey:s,marker:a}=this,l=Ad(i&&this.highlightStyle.item,a.getStyle());this.sizeScale.range=[a.size,a.maxSize],t.each(((e,t)=>{this.updateMarkerStyle(e,a,{datum:t,highlighted:i,xKey:n,yKey:o,sizeKey:r,labelKey:s},l)})),i||this.marker.markClean()}))}updateLabelSelection(e){var t,i;return va(this,void 0,void 0,(function*(){const{labelSelection:n}=e,{label:{enabled:o}}=this,r=o&&null!==(i=null===(t=this.chart)||void 0===t?void 0:t.placeLabels().get(this))&&void 0!==i?i:[],s=r.map((e=>Object.assign(Object.assign({},e.datum),{point:{x:e.x,y:e.y,size:e.datum.point.size}})));return n.update(s)}))}updateLabelNodes(e){return va(this,void 0,void 0,(function*(){const{labelSelection:t}=e,{label:i}=this;t.each(((e,t)=>{var n,o,r,s;e.text=t.label.text,e.fill=i.color,e.x=null!==(o=null===(n=t.point)||void 0===n?void 0:n.x)&&void 0!==o?o:0,e.y=null!==(s=null===(r=t.point)||void 0===r?void 0:r.y)&&void 0!==s?s:0,e.fontStyle=i.fontStyle,e.fontWeight=i.fontWeight,e.fontSize=i.fontSize,e.fontFamily=i.fontFamily,e.textAlign="left",e.textBaseline="top"}))}))}getTooltipHtml(e){var t;const{xKey:i,yKey:n,sizeKey:o,axes:r}=this,s=r[mc.X],a=r[mc.Y];if(!i||!n||!s||!a||!o)return"";const{marker:l,tooltip:c,xName:u,yName:d,sizeName:p,labelKey:h,labelName:f,id:g}=this,v=Ad({fill:e.fill,strokeWidth:this.getStrokeWidth(l.strokeWidth)},l.getStyle()),{fill:y="gray"}=this.getMarkerStyle(l,{datum:e,highlighted:!1,xKey:i,yKey:n,sizeKey:o,labelKey:h},v),m=null!==(t=this.title)&&void 0!==t?t:d,{datum:C,xValue:b,yValue:w,sizeValue:S,label:{text:E}}=e,x=Pd(s.formatDatum(b)),O=Pd(a.formatDatum(w));let T=`<b>${Pd(null!==u&&void 0!==u?u:i)}</b>: ${x}<br><b>${Pd(null!==d&&void 0!==d?d:n)}</b>: ${O}`;return o&&(T+=`<br><b>${Pd(null!==p&&void 0!==p?p:o)}</b>: ${Pd(String(S))}`),h&&(T=`<b>${Pd(null!==f&&void 0!==f?f:h)}</b>: ${Pd(E)}<br>`+T),c.toTooltipHtml({title:m,content:T,backgroundColor:y},{datum:C,xKey:i,xName:u,yKey:n,yName:d,sizeKey:o,sizeName:p,labelKey:h,labelName:f,title:m,color:y,seriesId:g})}getLegendData(){var e;const{id:t,data:i,xKey:n,yKey:o,sizeKey:r,yName:s,title:a,visible:l,marker:c}=this,{shape:u,fill:d,stroke:p,fillOpacity:h,strokeOpacity:f,strokeWidth:g}=c;return(null===i||void 0===i?void 0:i.length)&&n&&o&&r?[{legendType:"category",id:t,itemId:o,seriesId:t,enabled:l,label:{text:null!==(e=null!==a&&void 0!==a?a:s)&&void 0!==e?e:o},marker:{shape:u,fill:null!==d&&void 0!==d?d:"rgba(0, 0, 0, 0)",stroke:null!==p&&void 0!==p?p:"rgba(0, 0, 0, 0)",fillOpacity:null!==h&&void 0!==h?h:1,strokeOpacity:null!==f&&void 0!==f?f:1,strokeWidth:null!==g&&void 0!==g?g:0}}]:[]}animateEmptyUpdateReady({markerSelections:e,labelSelections:t}){Gm(this,this.ctx.animationManager,e),Lp(this,"labels",this.ctx.animationManager,t)}getDatumId(e){return Jd([`${e.xValue}`,`${e.yValue}`,e.label.text])}isLabelEnabled(){return this.label.enabled}nodeFactory(){return new ad}}PC.className="BubbleSeries",PC.type="bubble",fa([fl(_l),ga("design:type",String)],PC.prototype,"title",void 0),fa([fl(_l),ga("design:type",String)],PC.prototype,"labelKey",void 0),fa([fl(_l),ga("design:type",String)],PC.prototype,"xName",void 0),fa([fl(_l),ga("design:type",String)],PC.prototype,"yName",void 0),fa([fl(_l),ga("design:type",String)],PC.prototype,"sizeName",void 0),fa([fl(_l),ga("design:type",String)],PC.prototype,"labelName",void 0),fa([fl(_l),ga("design:type",String)],PC.prototype,"xKey",void 0),fa([fl(_l),ga("design:type",String)],PC.prototype,"yKey",void 0),fa([fl(_l),ga("design:type",String)],PC.prototype,"sizeKey",void 0),fa([fl(_l),ga("design:type",String)],PC.prototype,"colorKey",void 0),fa([fl(_l),ga("design:type",String)],PC.prototype,"colorName",void 0),fa([fl(Kl),ga("design:type",Array)],PC.prototype,"colorDomain",void 0),fa([fl(Vl),ga("design:type",Array)],PC.prototype,"colorRange",void 0);const MC={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["cartesian"],identifier:"bubble",instanceConstructor:PC,seriesDefaults:{axes:[{t
18ype:Iy.NUMBER,position:Py.BOTTOM},{type:Iy.NUMBER,position:Py.LEFT}]},themeTemplate:{__extends__:fm,tooltip:{position:{type:"node"}},marker:{__extends__:gm,maxSize:30,fillOpacity:.8},label:{enabled:!1,fontStyle:void 0,fontWeight:void 0,fontSize:12,fontFamily:ym,color:mm}},paletteFactory:xy},kC=["count","sum","mean"],NC=vl((e=>kC.includes(e)),"expecting a histogram aggregation keyword such as 'count', 'sum' or 'mean");var LC;(function(e){e[e["Bin"]=0]="Bin",e[e["Label"]=1]="Label"})(LC||(LC={}));const IC=10;class FC extends Pv{constructor(e){super({moduleCtx:e,pickModes:[bp.EXACT_SHAPE_MATCH],datumSelectionGarbageCollection:!1,animationResetFns:{datum:SC,label:Fp}}),this.label=new Qd,this.tooltip=new lh,this.fill=void 0,this.stroke=void 0,this.fillOpacity=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.xKey=void 0,this.areaPlot=!1,this.aggregation="sum",this.binCount=void 0,this.xName=void 0,this.yKey=void 0,this.yName=void 0,this.strokeWidth=1,this.shadow=void 0,this.calculatedBins=[]}deriveBins(e){if(void 0===this.binCount){const t=Zu(e[0],e[1],IC),i=Qu(e[0],e[1],IC),n=t[0],o=e=>[e,e+i];return[[n-i,n],...t.map(o)]}return this.calculateNiceBins(e,this.binCount)}calculateNiceBins(e,t){const i=Math.floor(e[0]),n=e[1],o=t||1,{start:r,binSize:s}=this.calculateNiceStart(i,n,o);return this.getBins(r,n,s,o)}getBins(e,t,i,n){const o=[];for(let r=0;r<n;r++){const s=Math.round(10*(e+r*i))/10;let a=Math.round(10*(e+(r+1)*i))/10;r===n-1&&(a=Math.max(a,t)),o[r]=[s,a]}return o}calculateNiceStart(e,t,i){const n=Math.abs(t-e)/i,o=Math.floor(Math.log10(n)),r=Math.pow(10,o),s=Math.floor(e/r)*r;return{start:s,binSize:n}}processData(e){return va(this,void 0,void 0,(function*(){const{xKey:t,yKey:i,data:n,areaPlot:o,aggregation:r}=this,s=[xp(this,t,!0),Hd];if(i){let e=vp(this,"groupCount");"count"===r||("sum"===r?e=gp(this,"groupAgg"):"mean"===r&&(e=yp(this,"groupAgg"))),o&&(e=mp(this,"groupAgg",e)),s.push(Op(this,i,!0,{invalidValue:void 0}),e)}else{let e=vp(this,"groupAgg");o&&(e=mp(this,"groupAgg",e)),s.push(e)}const a=e=>{var t;const i=hg(e.domain.keys[0]);if(0===i.length)return e.domain.groups=[],()=>[];const n=null!==(t=this.bins)&&void 0!==t?t:this.deriveBins(i),o=n.length;return this.calculatedBins=[...n],e=>{const t=e.keys[0];for(let i=0;i<o;i++){const e=n[i];if(t>=e[0]&&t<e[1])return e;if(i===o-1&&t<=e[1])return e}return[]}};!this.ctx.animationManager.isSkipped()&&this.processedData&&s.push(Zd(this.processedData,!1)),yield this.requestDataModel(e,null!==n&&void 0!==n?n:[],{props:s,dataVisible:this.visible,groupByFn:a}),this.animationState.transition("updateData")}))}getSeriesDomain(e){var t,i,n,o;const{processedData:r,dataModel:s}=this;if(!r||!s||!this.calculatedBins.length)return[];const a=s.getDomain(this,"groupAgg","aggregate",r),l=null===(t=this.calculatedBins)||void 0===t?void 0:t[0][0],c=null===(i=this.calculatedBins)||void 0===i?void 0:i[(null!==(o=null===(n=this.calculatedBins)||void 0===n?void 0:n.length)&&void 0!==o?o:0)-1][1];return e===mc.X?hg([l,c]):hg(a)}createNodeData(){const e=Object.create(null,{calculateScaling:{get:()=>super.calculateScaling}});var t;return va(this,void 0,void 0,(function*(){const{axes:i,processedData:n,ctx:{callbackCache:o}}=this,r=i[mc.X],s=i[mc.Y];if(!this.visible||!r||!s||!n||"grouped"!==n.type)return[];const{scale:a}=r,{scale:l}=s,{fill:c,stroke:u,strokeWidth:d,id:p,yKey:h="",xKey:f=""}=this,g=[],{label:{formatter:v=(e=>String(e.value)),fontStyle:y,fontWeight:m,fontSize:C,fontFamily:b,color:w}}=this;return n.data.forEach((e=>{var t;const{aggValues:[[i,n]]=[[0,0]],datum:r,datum:{length:s},keys:S,keys:[E,x]}=e,O=a.convert(E),T=a.convert(x),D=i+n,R=l.convert(0),A=l.convert(D),_=T-O,P=Math.abs(A-R),M=0!==D?{text:null!==(t=o.call(v,{value:D,datum:r,seriesId:p,xKey:f,yKey:h,xName:this.xName,yName:this.yName}))&&void 0!==t?t:String(D),fontStyle:y,fontWeight:m,fontSize:C,fontFamily:b,fill:w,x:O+_/2,y:A+P/2}:void 0,k={x:O+_/2,y:A+P/2};g.push({series:this,datum:r,aggregatedValue:D,frequency:s,domain:S,yKey:h,xKey:f,x:O,y:A,xValue:O,yValue:A,width:_,height:P,midPoint:k,fill:c,stroke:u,strokeWidth:d,label:M})})),[{itemId:null!==(t=this.yKey)&&void 0!==t?t:this.id,nodeData:g,labelData:g,scales:e.calculateScaling.call(this),animationValid:!0,visible:this.visible}]}))}nodeFactory(){return new xv}updateDatumSelection(e){return va(this,void 0,void 0,(function*(){const{nodeData:t,datumSelection:i}=e;return i.update(t,(e=>{e.tag=LC.Bin,e.crisp=!0}),(e=>e.domain.join("_")))}))}updateDatumNodes(e){return va(this,void 0,void 0,(function*(){const{datumSelection:t,isHighlight:i}=e,{fillOpacity:n,strokeOpacity:o,shadow:r,highlightStyle:{item:{fill:s,fillOpacity:a=n,stroke:l,strokeWidth:c}}}=this;t.each(((e,t,u)=>{var d,p;const h=i&&void 0!==c?c:t.strokeWidth,f=i?a:n;e.fill=null!==(d=i?s:void 0)&&void 0!==d?d:t.fill,e.stroke=null!==(p=i?l:void 0)&&void 0!==p?p:t.stroke,e.fillOpacity=f,e.strokeOpacity=o,e.strokeWidth=h,e.lineDash=this.lineDash,e.lineDashOffset=this.lineDashOffset,e.fillShadow=r,e.zIndex=i?Np.highlightedZIndex:u,e.visible=t.height>0}))}))}updateLabelSelection(e){return va(this,void 0,void 0,(function*(){const{labelData:t,labelSelection:i}=e;return i.update(t,(e=>{e.tag=LC.Label,e.pointerEvents=kc.None,e.textAlign="center",e.textBaseline="middle"}))}))}updateLabelNodes(e){return va(this,void 0,void 0,(function*(){const{labelSelection:t}=e,i=this.label.enabled;t.each(((e,t)=>{const n=t.label;n&&i?(e.text=n.text,e.x=n.x,e.y=n.y,e.fontStyle=n.fontStyle,e.fontWeight=n.fontWeight,e.fontSize=n.fontSize,e.fontFamily=n.fontFamily,e.fill=n.fill,e.visible=!0):e.visible=!1}))}))}getTooltipHtml(e){const{xKey:t,yKey:i="",axes:n}=this,o=n[mc.X],r=n[mc.Y];
18if(!t||!o||!r)return"";const{xName:s,yName:a,fill:l,tooltip:c,aggregation:u,id:d}=this,{aggregatedValue:p,frequency:h,domain:[f,g]}=e,v=`${Pd(null!==s&&void 0!==s?s:t)}: ${o.formatDatum(f)} - ${o.formatDatum(g)}`;let y=i?`<b>${Pd(null!==a&&void 0!==a?a:i)} (${u})</b>: ${r.formatDatum(p)}<br>`:"";y+=`<b>Frequency</b>: ${h}`;const m={title:v,backgroundColor:l,content:y};return c.toTooltipHtml(m,{datum:{data:e.datum,aggregatedValue:e.aggregatedValue,domain:e.domain,frequency:e.frequency},xKey:t,xName:s,yKey:i,yName:a,color:l,title:v,seriesId:d})}getLegendData(e){var t;const{id:i,data:n,xKey:o,yName:r,visible:s,fill:a,stroke:l,fillOpacity:c,strokeOpacity:u,strokeWidth:d}=this;return n&&0!==n.length&&"category"===e?[{legendType:"category",id:i,itemId:o,seriesId:i,enabled:s,label:{text:null!==(t=null!==r&&void 0!==r?r:o)&&void 0!==t?t:"Frequency"},marker:{fill:null!==a&&void 0!==a?a:"rgba(0, 0, 0, 0)",stroke:null!==l&&void 0!==l?l:"rgba(0, 0, 0, 0)",fillOpacity:c,strokeOpacity:u,strokeWidth:d}}]:[]}animateEmptyUpdateReady({datumSelections:e,labelSelections:t}){const i=bC(CC(!0,this.axes));Tu(this.id,"datums",this.ctx.animationManager,e,i),Lp(this,"labels",this.ctx.animationManager,t)}animateWaitingUpdateReady(e){var t,i;const n=null===(i=null===(t=this.processedData)||void 0===t?void 0:t.reduced)||void 0===i?void 0:i.diff,o=bC(CC(!0,this.axes));Tu(this.id,"datums",this.ctx.animationManager,e.datumSelections,o,((e,t)=>this.getDatumId(t)),n),Lp(this,"labels",this.ctx.animationManager,e.labelSelections)}getDatumId(e){return Jd(e.domain.map((e=>`${e}`)))}isLabelEnabled(){return this.label.enabled}}FC.className="HistogramSeries",FC.type="histogram",fa([fl(Gl),ga("design:type",String)],FC.prototype,"fill",void 0),fa([fl(Gl),ga("design:type",String)],FC.prototype,"stroke",void 0),fa([fl(Hl(0,1)),ga("design:type",Object)],FC.prototype,"fillOpacity",void 0),fa([fl(Hl(0,1)),ga("design:type",Object)],FC.prototype,"strokeOpacity",void 0),fa([fl(ic),ga("design:type",Array)],FC.prototype,"lineDash",void 0),fa([fl(Hl(0)),ga("design:type",Number)],FC.prototype,"lineDashOffset",void 0),fa([fl(_l),ga("design:type",String)],FC.prototype,"xKey",void 0),fa([fl(Dl),ga("design:type",Boolean)],FC.prototype,"areaPlot",void 0),fa([fl(Cl()),ga("design:type",Array)],FC.prototype,"bins",void 0),fa([fl(NC),ga("design:type",String)],FC.prototype,"aggregation",void 0),fa([fl(Wl(0)),ga("design:type",Number)],FC.prototype,"binCount",void 0),fa([fl(_l),ga("design:type",String)],FC.prototype,"xName",void 0),fa([fl(_l),ga("design:type",String)],FC.prototype,"yKey",void 0),fa([fl(_l),ga("design:type",String)],FC.prototype,"yName",void 0),fa([fl(Hl(0)),ga("design:type",Number)],FC.prototype,"strokeWidth",void 0);const GC={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["cartesian"],identifier:"histogram",instanceConstructor:FC,seriesDefaults:{axes:[{type:Iy.NUMBER,position:Py.BOTTOM},{type:Iy.NUMBER,position:Py.LEFT}]},themeTemplate:{__extends__:fm,strokeWidth:1,fillOpacity:1,strokeOpacity:1,lineDash:[0],lineDashOffset:0,label:{enabled:!1,fontStyle:void 0,fontWeight:void 0,fontSize:12,fontFamily:ym,color:bm,formatter:void 0},shadow:{enabled:!1,color:Tm,xOffset:3,yOffset:3,blur:5}},paletteFactory:({takeColors:e})=>{const{fills:[t],strokes:[i]}=e(1);return{fill:t,stroke:i}}};class VC extends Pv{constructor(e){super({moduleCtx:e,hasMarkers:!0,pickModes:[bp.NEAREST_BY_MAIN_CATEGORY_AXIS_FIRST,bp.NEAREST_NODE,bp.EXACT_SHAPE_MATCH],markerSelectionGarbageCollection:!1,animationResetFns:{path:Zm({getOpacity:()=>this.getOpacity()}),label:Fp,marker:(e,t)=>Object.assign(Object.assign({},Bm()),jm(e,t))}}),this.label=new Qd,this.marker=new Fm,this.tooltip=new lh,this.title=void 0,this.stroke="#874349",this.lineDash=[0],this.lineDashOffset=0,this.strokeWidth=2,this.strokeOpacity=1,this.xKey=void 0,this.xName=void 0,this.yKey=void 0,this.yName=void 0}processData(e){return va(this,void 0,void 0,(function*(){const{xKey:t,yKey:i,data:n}=this;if(null==t||null==i||null==n)return;const o=!this.ctx.animationManager.isSkipped(),{isContinuousX:r,isContinuousY:s}=this.isContinuous(),a=[];r||(a.push(xp(this,t,r,{id:"xKey"}
18)),o&&this.processedData&&a.push(Zd(this.processedData))),o&&a.push(Yd(this,r?["xValue"]:[])),a.push(Op(this,t,r,{id:"xValue"}),Op(this,i,s,{id:"yValue",invalidValue:void 0})),yield this.requestDataModel(e,n,{props:a}),this.animationState.transition("updateData")}))}getSeriesDomain(e){const{axes:t,dataModel:i,processedData:n}=this;if(!n||!i)return[];const o=t[mc.X],r=t[mc.Y],s=i.resolveProcessedDataDefById(this,"xValue");if(e===mc.X){const e=i.getDomain(this,"xValue","value",n);return"value"===(null===s||void 0===s?void 0:s.def.type)&&"category"===s.def.valueType?e:hg(xa(e),o)}{const e=i.getDomain(this,"yValue","value",n);return hg(e,r)}}createNodeData(){const e=Object.create(null,{calculateScaling:{get:()=>super.calculateScaling}});var t,i,n;return va(this,void 0,void 0,(function*(){const{processedData:o,dataModel:r,axes:s}=this,a=s[mc.X],l=s[mc.Y];if(!o||!r||!a||!l)return[];const{label:c,yKey:u="",xKey:d=""}=this,p=a.scale,h=l.scale,f=(null!==(t=p.bandwidth)&&void 0!==t?t:0)/2,g=(null!==(i=h.bandwidth)&&void 0!==i?i:0)/2,v=[],y=this.marker.enabled?this.marker.size:0,m=r.resolveProcessedDataIndexById(this,"xValue").index,C=r.resolveProcessedDataIndexById(this,"yValue").index;let b,w=!0;for(let e=0;e<o.data.length;e++){const{datum:t,values:i}=null!==b&&void 0!==b?b:o.data[e],r=i[m],s=i[C];if(void 0===s)w=!0;else{const i=p.convert(r)+f;if(isNaN(i)){w=!0,b=void 0;continue}b=void 0===(null===(n=o.data[e+1])||void 0===n?void 0:n.values[C])?void 0:o.data[e+1];const a=h.convert(s)+g,l=this.getLabelText(c,{value:s,datum:t,xKey:d,yKey:u,xName:this.xName,yName:this.yName},(e=>Gd(e)?e.toFixed(2):String(e)));v.push({series:this,datum:t,yKey:u,xKey:d,point:{x:i,y:a,moveTo:w,size:y},midPoint:{x:i,y:a},yValue:s,xValue:r,capDefaults:{lengthRatioMultiplier:this.marker.getDiameter(),lengthMax:1/0},label:l?{text:l,fontStyle:c.fontStyle,fontWeight:c.fontWeight,fontSize:c.fontSize,fontFamily:c.fontFamily,textAlign:"center",textBaseline:"bottom",fill:c.color}:void 0}),w=!1}}return[{itemId:u,nodeData:v,labelData:v,scales:e.calculateScaling.call(this),visible:this.visible}]}))}isPathOrSelectionDirty(){return this.marker.isDirty()}markerFactory(){const{shape:e}=this.marker,t=Xg(e);return new t}updatePathNodes(e){var t,i;return va(this,void 0,void 0,(function*(){const{paths:[n],opacity:o,visible:r,animationEnabled:s}=e,{seriesRectHeight:a,seriesRectWidth:l}=this.nodeDataDependencies;n.setProperties({fill:void 0,lineJoin:"round",pointerEvents:kc.None,opacity:o,stroke:this.stroke,strokeWidth:this.getStrokeWidth(this.strokeWidth),strokeOpacity:this.strokeOpacity,lineDash:this.lineDash,lineDashOffset:this.lineDashOffset}),s||(n.visible=r),null==n.clipPath&&(n.clipPath=new wd,n.clipScalingX=1,n.clipScalingY=1),null===(t=n.clipPath)||void 0===t||t.clear({trackChanges:!0}),null===(i=n.clipPath)||void 0===i||i.rect(-25,-25,(null!==l&&void 0!==l?l:0)+50,(null!==a&&void 0!==a?a:0)+50)}))}updateMarkerSelection(e){return va(this,void 0,void 0,(function*(){let{nodeData:t}=e;const{markerSelection:i}=e,{shape:n,enabled:o}=this.marker;return t=n&&o?t:[],this.marker.isDirty()&&(i.clear(),i.cleanup()),i.update(t,void 0,(e=>this.getDatumId(e)))}))}updateMarkerNodes(e){return va(this,void 0,void 0,(function*(){const{markerSelection:t,isHighlight:i}=e,{xKey:n="",yKey:o="",marker:r,stroke:s,strokeWidth:a,strokeOpacity:l}=this,c=Ad(i&&this.highlightStyle.item,r.getStyle(),{stroke:s,strokeWidth:a,strokeOpacity:l}),u=this.ctx.animationManager.isSkipped();t.each(((e,t)=>{this.updateMarkerStyle(e,r,{datum:t,highlighted:i,xKey:n,yKey:o},c,{applyTranslation:u})})),i||this.marker.markClean()}))}updateLabelSelection(e){return va(this,void 0,void 0,(function*(){let{labelData:t}=e;const{labelSelection:i}=e,{shape:n,enabled:o}=this.marker;return t=n&&o?t:[],i.update(t)}))}updateLabelNodes(e){return va(this,void 0,void 0,(function*(){const{labelSelection:t}=e,{enabled:i,fontStyle:n,fontWeight:o,fontSize:r,fontFamily:s,color:a}=this.label;t.each(((e,t)=>{const{point:l,label:c}=t;t&&c&&i?(e.fontStyle=n,e.fontWeight=o,e.fontSize=r,e.fontFamily=s,e.textAlign=c.textAlign,e.textBaseline=c.textBaseline,e.text=c.text,e.x=l.x,e.y=l.y-10,e.fill=a,e.visible=!0):e.visible=!1}))}))}getTooltipHtml(e){var t;const{xKey:i,yKey:n,axes:o}=this,r=o[mc.X],s=o[mc.Y];
18if(!i||!n||!r||!s)return"";const{xName:a,yName:l,tooltip:c,marker:u,id:d}=this,{datum:p,xValue:h,yValue:f}=e,g=r.formatDatum(h),v=s.formatDatum(f),y=Pd(null!==(t=this.title)&&void 0!==t?t:l),m=Pd(g+": "+v),C=Ad({fill:u.stroke},u.getStyle(),{strokeWidth:this.strokeWidth}),{fill:b}=this.getMarkerStyle(u,{datum:e,xKey:i,yKey:n,highlighted:!1},C);return c.toTooltipHtml({title:y,content:m,backgroundColor:b},Object.assign({datum:p,xKey:i,xName:a,yKey:n,yName:l,title:y,color:b,seriesId:d},this.getModuleTooltipParams(p)))}getLegendData(e){var t,i,n,o,r,s,a,l;const{id:c,data:u,xKey:d,yKey:p,yName:h,visible:f,title:g,marker:v,stroke:y,strokeOpacity:m}=this;return(null===u||void 0===u?void 0:u.length)&&d&&p&&"category"===e?[{legendType:"category",id:c,itemId:p,seriesId:c,enabled:f,label:{text:null!==(t=null!==g&&void 0!==g?g:h)&&void 0!==t?t:p},marker:{shape:v.shape,fill:null!==(i=v.fill)&&void 0!==i?i:"rgba(0, 0, 0, 0)",stroke:null!==(o=null!==(n=v.stroke)&&void 0!==n?n:y)&&void 0!==o?o:"rgba(0, 0, 0, 0)",fillOpacity:null!==(r=v.fillOpacity)&&void 0!==r?r:1,strokeOpacity:null!==(a=null!==(s=v.strokeOpacity)&&void 0!==s?s:m)&&void 0!==a?a:1,strokeWidth:null!==(l=v.strokeWidth)&&void 0!==l?l:0}}]:[]}updatePaths(e){return va(this,void 0,void 0,(function*(){this.updateLinePaths([e.paths],[e.contextData])}))}updateLinePaths(e,t){t.forEach((({nodeData:t},i)=>{const[n]=e[i],{path:o}=n;o.clear({trackChanges:!0});for(const e of t)e.point.moveTo?o.moveTo(e.point.x,e.point.y):o.lineTo(e.point.x,e.point.y);n.checkPathDirty()}))}animateEmptyUpdateReady(e){const{markerSelections:t,labelSelections:i,annotationSelections:n,contextData:o,paths:r}=e,{animationManager:s}=this.ctx,{seriesRectWidth:a=0}=this.nodeDataDependencies;this.updateLinePaths(r,o),Xm(this,s,r.flat()),dh(t,jm),Vm(this,s,t,a),Lp(this,"labels",s,i),Lp(this,"annotations",s,n)}animateReadyResize(e){const{contextData:t,paths:i}=e;this.updateLinePaths(i,t),super.animateReadyResize(e)}animateWaitingUpdateReady(e){var t,i;const{animationManager:n}=this.ctx,{markerSelections:o,labelSelections:r,annotationSelections:s,contextData:a,paths:l,previousContextData:c}=e;if(super.resetAllAnimation(e),0===a.length||!c||0===c.length)return n.skipCurrentBatch(),void this.updateLinePaths(l,a);const[u]=l,[d]=a,[p]=c,h=sC(d,p,null===(i=null===(t=this.processedData)||void 0===t?void 0:t.reduced)||void 0===i?void 0:i.diff);if(void 0===h)return n.skipCurrentBatch(),void this.updateLinePaths(l,a);Tu(this.id,"marker",n,o,h.marker),Tu(this.id,"path_properties",n,u,h.pathProperties),Lm(this.id,"path_update",n,u,h.path),Lp(this,"labels",n,r),Lp(this,"annotations",n,s)}getDatumId(e){return Jd([`${e.xValue}`])}isLabelEnabled(){return this.label.enabled}getBandScalePadding(){return{inner:1,outer:.1}}nodeFactory(){return new ad}}VC.className="LineSeries",VC.type="line",fa([fl(_l),ga("design:type",String)],VC.prototype,"title",void 0),fa([fl(Gl),ga("design:type",String)],VC.prototype,"stroke",void 0),fa([fl(ic),ga("design:type",Array)],VC.prototype,"lineDash",void 0),fa([fl(Hl(0)),ga("design:type",Number)],VC.prototype,"lineDashOffset",void 0),fa([fl(Hl(0)),ga("design:type",Number)],VC.prototype,"strokeWidth",void 0),fa([fl(Hl(0,1)),ga("design:type",Number)],VC.prototype,"strokeOpacity",void 0),fa([fl(_l),ga("design:type",String)],VC.prototype,"xKey",void 0),fa([fl(_l),ga("design:type",String)],VC.prototype,"xName",void 0),fa([fl(_l),ga("design:type",String)],VC.prototype,"yKey",void 0),fa([fl(_l),ga("design:type",String)],VC.prototype,"yName",void 0);const BC={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["cartesian"],identifier:"line",instanceConstructor:VC,seriesDefaults:im,themeTemplate:{__extends__:fm,tooltip:{position:{type:"node"}},strokeWidth:2,strokeOpacity:1,lineDash:[0],lineDashOffset:0,marker:{__extends__:gm,fillOpacity:1,strokeOpacity:1,strokeWidth:0},label:{enabled:!1,fontStyle:void 0,fontWeight:void 0,fontSize:12,fontFamily:ym,color:mm,formatter:void 0}},enterpriseThemeTemplate:{errorBar:{cap:{lengthRatio:1}}},paletteFactory:e=>{const{marker:t}=xy(e);return{stroke:t.fill,marker:t}}};
18class jC extends Pv{constructor(e){super({moduleCtx:e,pickModes:[bp.NEAREST_BY_MAIN_CATEGORY_AXIS_FIRST,bp.NEAREST_NODE,bp.EXACT_SHAPE_MATCH],pathsPerSeries:0,hasMarkers:!0,markerSelectionGarbageCollection:!1,animationResetFns:{marker:Bm,label:Fp}}),this.marker=new Fm,this.label=new Qd,this.title=void 0,this.labelKey=void 0,this.xName=void 0,this.yName=void 0,this.labelName="Label",this.xKey=void 0,this.yKey=void 0,this.colorKey=void 0,this.colorName="Color",this.colorRange=["#ffff00","#00ff00","#0000ff"],this.colorScale=new Sv,this.tooltip=new lh}processData(e){var t;return va(this,void 0,void 0,(function*(){const{xKey:i,yKey:n,labelKey:o,data:r}=this;if(null==i||null==n||null==r)return;const{isContinuousX:s,isContinuousY:a}=this.isContinuous(),{colorScale:l,colorDomain:c,colorRange:u,colorKey:d}=this,{dataModel:p,processedData:h}=yield this.requestDataModel(e,r,{props:[xp(this,i,s,{id:"xKey-raw"}),xp(this,n,a,{id:"yKey-raw"}),...o?[xp(this,o,!1,{id:"labelKey-raw"})]:[],Op(this,i,s,{id:"xValue"}),Op(this,n,a,{id:"yValue"}),...d?[Op(this,d,!0,{id:"colorValue"})]:[],...o?[Op(this,o,!1,{id:"labelValue"})]:[]],dataVisible:this.visible});if(d){const e=p.resolveProcessedDataIndexById(this,"colorValue").index;l.domain=null!==(t=null!==c&&void 0!==c?c:h.domain.values[e])&&void 0!==t?t:[],l.range=u,l.update()}this.animationState.transition("updateData")}))}getSeriesDomain(e){const{dataModel:t,processedData:i}=this;if(!i||!t)return[];const n=e===mc.X?"xValue":"yValue",o=t.resolveProcessedDataDefById(this,n),r=t.getDomain(this,n,"value",i);if("value"===(null===o||void 0===o?void 0:o.def.type)&&"category"===(null===o||void 0===o?void 0:o.def.valueType))return r;const s=this.axes[e];return hg(xa(r),s)}createNodeData(){const e=Object.create(null,{calculateScaling:{get:()=>super.calculateScaling}});var t,i,n,o;return va(this,void 0,void 0,(function*(){const{visible:r,axes:s,yKey:a="",xKey:l="",label:c,labelKey:u,dataModel:d,processedData:p}=this,h=s[mc.X],f=s[mc.Y];if(!(d&&p&&r&&h&&f))return[];const g=d.resolveProcessedDataIndexById(this,"xValue").index,v=d.resolveProcessedDataIndexById(this,"yValue").index,y=this.colorKey?d.resolveProcessedDataIndexById(this,"colorValue").index:-1,m=this.labelKey?d.resolveProcessedDataIndexById(this,"labelValue").index:-1,{colorScale:C,colorKey:b}=this,w=h.scale,S=f.scale,E=(null!==(t=w.bandwidth)&&void 0!==t?t:0)/2,x=(null!==(i=S.bandwidth)&&void 0!==i?i:0)/2,{marker:O}=this,T=[],D=c.getFont();for(const{values:e,datum:t}of null!==(n=p.data)&&void 0!==n?n:[]){const i=e[g],n=e[v],o=w.convert(i)+E,r=S.convert(n)+x,s=this.getLabelText(this.label,{value:u?e[m]:n,datum:t,xKey:l,yKey:a,labelKey:u,xName:this.xName,yName:this.yName,labelName:this.labelName}),c=Vc.getTextSize(s,D),d=b?C.convert(e[y]):void 0;T.push({series:this,itemId:a,yKey:a,xKey:l,datum:t,xValue:i,yValue:n,capDefaults:{lengthRatioMultiplier:this.marker.getDiameter(),lengthMax:1/0},point:{x:o,y:r,size:O.size},midPoint:{x:o,y:r},fill:d,label:Object.assign({text:s},c)})}return[{itemId:null!==(o=this.yKey)&&void 0!==o?o:this.id,nodeData:T,labelData:T,scales:e.calculateScaling.call(this),visible:this.visible}]}))}isPathOrSelectionDirty(){return this.marker.isDirty()}getLabelData(){var e;return null===(e=this.contextNodeData)||void 0===e?void 0:e.reduce(((e,t)=>e.concat(t.labelData)),[])}markerFactory(){const{shape:e}=this.marker,t=Xg(e);return new t}updateMarkerSelection(e){return va(this,void 0,void 0,(function*(){const{nodeData:t,markerSelection:i}=e,{marker:{enabled:n}}=this;this.marker.isDirty()&&(i.clear(),i.cleanup());const o=n?t:[];return i.update(o)}))}updateMarkerNodes(e){return va(this,void 0,void 0,(function*(){const{xKey:t="",yKey:i="",labelKey:n,marker:o}=this,{markerSelection:r,isHighlight:s}=e,a=Ad(s&&this.highlightStyle.item,o.getStyle());r.each(((e,r)=>{this.updateMarkerStyle(e,o,{datum:r,highlighted:s,xKey:t,yKey:i,labelKey:n},a)})),s||this.marker.markClean()}))}updateLabelSelection(e){var t,i;return va(this,void 0,void 0,(function*(){const{labelSelection:n}=e,{label:{enabled:o}}=this,r=o&&null!==(i=null===(t=this.chart)||void 0===t?void 0:t.placeLabels().get(this))&&void 0!==i?i:[],s=r.map((e=>Object.assign(Object.assign({},e.datum),{point:{x:e.x,y:e.y,size:e.datum.point.size}})));return n.update(s)}))}updateLabelNodes(e){return va(this,void 0,void 0,(function*(){const{labelSelection:t}=e,{label:i}=this;t.each(((e,t)=>{var n,o,r,s;e.text=t.label.text,e.fill=i.color,e.x=null!==(o=null===(n=t.point)||void 0===n?void 0:n.x)&&void 0!==o?o:0,e.y=null!==(s=null===(r=t.point)||void 0===r?void 0:r.y
18)&&void 0!==s?s:0,e.fontStyle=i.fontStyle,e.fontWeight=i.fontWeight,e.fontSize=i.fontSize,e.fontFamily=i.fontFamily,e.textAlign="left",e.textBaseline="top"}))}))}getTooltipHtml(e){const{xKey:t,yKey:i,axes:n}=this,o=n[mc.X],r=n[mc.Y];if(!t||!i||!o||!r)return"";const{marker:s,tooltip:a,xName:l,yName:c,labelKey:u,labelName:d,id:p,title:h=c}=this,f=Ad({fill:e.fill,strokeWidth:this.getStrokeWidth(s.strokeWidth)},s.getStyle()),{fill:g="gray"}=this.getMarkerStyle(s,{datum:e,highlighted:!1,xKey:t,yKey:i,labelKey:u},f),{datum:v,xValue:y,yValue:m,label:C}=e,b=Pd(o.formatDatum(y)),w=Pd(r.formatDatum(m));let S=`<b>${Pd(null!==l&&void 0!==l?l:t)}</b>: ${b}<br><b>${Pd(null!==c&&void 0!==c?c:i)}</b>: ${w}`;return u&&(S=`<b>${Pd(null!==d&&void 0!==d?d:u)}</b>: ${Pd(C.text)}<br>`+S),a.toTooltipHtml({title:h,content:S,backgroundColor:g},Object.assign({datum:v,xKey:t,xName:l,yKey:i,yName:c,labelKey:u,labelName:d,title:h,color:g,seriesId:p},this.getModuleTooltipParams(v)))}getLegendData(e){var t,i,n,o,r;const{id:s,data:a,xKey:l,yKey:c,yName:u,title:d,visible:p,marker:h}=this,{fill:f,stroke:g,fillOpacity:v,strokeOpacity:y,strokeWidth:m}=h;return(null===a||void 0===a?void 0:a.length)&&l&&c&&"category"===e?[{legendType:"category",id:s,itemId:c,seriesId:s,enabled:p,label:{text:null!==(t=null!==d&&void 0!==d?d:u)&&void 0!==t?t:c},marker:{shape:h.shape,fill:null!==(n=null!==(i=h.fill)&&void 0!==i?i:f)&&void 0!==n?n:"rgba(0, 0, 0, 0)",stroke:null!==(r=null!==(o=h.stroke)&&void 0!==o?o:g)&&void 0!==r?r:"rgba(0, 0, 0, 0)",fillOpacity:null!==v&&void 0!==v?v:1,strokeOpacity:null!==y&&void 0!==y?y:1,strokeWidth:null!==m&&void 0!==m?m:0}}]:[]}animateEmptyUpdateReady(e){const{markerSelections:t,labelSelections:i,annotationSelections:n}=e;Gm(this,this.ctx.animationManager,t),Lp(this,"labels",this.ctx.animationManager,i),Lp(this,"annotations",this.ctx.animationManager,n)}isLabelEnabled(){return this.label.enabled}nodeFactory(){return new ad}}jC.className="ScatterSeries",jC.type="scatter",fa([fl(_l),ga("design:type",String)],jC.prototype,"title",void 0),fa([fl(_l),ga("design:type",String)],jC.prototype,"labelKey",void 0),fa([fl(_l),ga("design:type",String)],jC.prototype,"xName",void 0),fa([fl(_l),ga("design:type",String)],jC.prototype,"yName",void 0),fa([fl(_l),ga("design:type",String)],jC.prototype,"labelName",void 0),fa([fl(_l),ga("design:type",String)],jC.prototype,"xKey",void 0),fa([fl(_l),ga("design:type",String)],jC.prototype,"yKey",void 0),fa([fl(_l),ga("design:type",String)],jC.prototype,"colorKey",void 0),fa([fl(_l),ga("design:type",String)],jC.prototype,"colorName",void 0),fa([fl(Kl),ga("design:type",Array)],jC.prototype,"colorDomain",void 0),fa([fl(Vl),ga("design:type",Array)],jC.prototype,"colorRange",void 0);const HC={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["cartesian"],identifier:"scatter",instanceConstructor:jC,seriesDefaults:{axes:[{type:Iy.NUMBER,position:Py.BOTTOM},{type:Iy.NUMBER,position:Py.LEFT}]},themeTemplate:{__extends__:fm,tooltip:{position:{type:"node"}},marker:{__extends__:gm,fillOpacity:.8},label:{enabled:!1,fontStyle:void 0,fontWeight:void 0,fontSize:12,fontFamily:ym,color:mm}},enterpriseThemeTemplate:{errorBar:{cap:{lengthRatio:1}}},paletteFactory:xy},WC={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["polar"],identifier:"pie",instanceConstructor:xh,seriesDefaults:{},themeTemplate:{__extends__:fm,title:{enabled:!0,fontStyle:void 0,fontWeight:Dy,fontSize:14,fontFamily:ym,color:wm,spacing:5},calloutLabel:{enabled:!0,fontStyle:void 0,fontWeight:void 0,fontSize:12,fontFamily:ym,color:mm,offset:3,minAngle:0},sectorLabel:{enabled:!0,fontStyle:void 0,fontWeight:Dy,fontSize:12,fontFamily:ym,color:bm,positionOffset:0,positionRatio:.5},calloutLine:{length:10,strokeWidth:2},fillOpacity:1,strokeOpacity:1,strokeWidth:1,lineDash:[0],lineDashOffset:0,rotation:0,outerRadiusOffset:0,innerRadiusOffset:0,shadow:{enabled:!1,color:Tm,xOffset:3,yOffset:3,blur:5},innerLabels:{fontStyle:void 0,fontWeight:void 0,fontSize:12,fontFamily:ym,color:mm,margin:2}},paletteFactory:({takeColors:e,colorsCount:t,userPalette:i})=>{const{fills:n,strokes:o}=e(t);return{fills:n,strokes:i?o:[Pm],calloutLine:{colors:o}}}};function UC(){ba(fy),ba(Sy),ba(fC),ba(RC),ba(MC),ba(BC),ba(HC),ba(WC),ba(GC)}class zC{constructor(e,t,i,n,o,r,s,a,l,c,u){this.series=e,this.index=t,this.datum=i,this.size=n,this.colorValue=o,this.fill=r,this.stroke=s,this.sumSize=a,this.depth=l,this.parent=c,this.children=u,this.midPoint={x:0,y:0}}contains(e){let t=e;while(null!=t&&t.index>=this.index){if(t===this)return!0;t=t.parent}return!1}walk(e,t=zC.Walk.PreOrder){t===zC.Walk.PreOrder&&e(this),this.children.forEac
18h((i=>{i.walk(e,t)})),t===zC.Walk.PostOrder&&e(this)}*[Symbol.iterator](){yield this;for(const e of this.children)yield*e}}zC.Walk={PreOrder:0,PostOrder:1};class KC extends Np{constructor(e){super({moduleCtx:e,pickModes:[bp.EXACT_SHAPE_MATCH],contentGroupVirtual:!1}),this.childrenKey="children",this.sizeKey=void 0,this.colorKey=void 0,this.colorName=void 0,this.fills=Object.values(lp),this.strokes=Object.values(cp),this.colorRange=void 0,this.rootNode=new zC(this,0,void 0,0,void 0,void 0,void 0,0,void 0,void 0,[]),this.colorDomain=[0,0],this.maxDepth=0,this.animationState=new fh("empty",{empty:{update:{target:"ready",action:e=>this.animateEmptyUpdateReady(e)}},ready:{updateData:"waiting",clear:"clearing",highlight:e=>this.animateReadyHighlight(e),resize:e=>this.animateReadyResize(e)},waiting:{update:{target:"ready",action:e=>this.animateWaitingUpdateReady(e)}},clearing:{update:{target:"empty",action:e=>this.animateClearingUpdateEmpty(e)}}},(()=>this.checkProcessedDataAnimatable()))}hasData(){return Array.isArray(this.data)&&this.data.length>0}processData(){var e,t;return va(this,void 0,void 0,(function*(){const{childrenKey:i,sizeKey:n,colorKey:o,fills:r,strokes:s,colorRange:a}=this;let l=0;const c=()=>(l+=1,l);let u=0,d=1/0,p=-1/0;const h=new Array((null!==(t=null===(e=this.data)||void 0===e?void 0:e.length)&&void 0!==t?t:0)+1).fill(void 0),f=(e,t)=>{const r=c(),s=null!=t.depth?t.depth+1:0,a=null!=i?e[i]:void 0,l=null==a||0===a.length;let f=null!=n?e[n]:void 0;f=Number.isFinite(f)?Math.max(f,0):l?1:0;const v=f;u=Math.max(u,s);const y=null!=o?e[o]:void 0;return"number"===typeof y&&(h[r]=y,d=Math.min(d,y),p=Math.max(p,y)),g(new zC(this,r,e,f,y,void 0,void 0,v,s,t,[]),a)},g=(e,t)=>(null===t||void 0===t||t.forEach((t=>{const i=f(t,e);e.children.push(i),e.sumSize+=i.sumSize})),e),v=g(new zC(this,0,void 0,0,void 0,void 0,void 0,0,void 0,void 0,[]),this.data),y=[d,p];let m;null!=a&&Number.isFinite(d)&&Number.isFinite(p)&&(m=new Sv,m.domain=y,m.range=a,m.update()),v.children.forEach(((e,t)=>{e.walk((e=>{let i;const n=h[e.index];null!=n&&(i=null===m||void 0===m?void 0:m.convert(n)),null!==i&&void 0!==i||(i=null===r||void 0===r?void 0:r[t%r.length]),e.fill=i,e.stroke=null==m?null===s||void 0===s?void 0:s[t%s.length]:"rgba(0, 0, 0, 0.2)"}))})),this.rootNode=v,this.maxDepth=u,this.colorDomain=y}))}update({seriesRect:e}){return va(this,void 0,void 0,(function*(){yield this.updateSelections(),yield this.updateNodes();const t=this.getAnimationData(),i=this.checkResize(e);i&&this.animationState.transition("resize",t),this.animationState.transition("update",t)}))}resetAllAnimation(e){var t;const i=null===(t=this.animationResetFns)||void 0===t?void 0:t.datum;this.ctx.animationManager.stopByAnimationGroupId(this.id),null!=i&&dh(e.datumSelections,i)}animateEmptyUpdateReady(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(e)}animateWaitingUpdateReady(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(e)}animateReadyHighlight(e){var t;const i=null===(t=this.animationResetFns)||void 0===t?void 0:t.datum;null!=i&&dh([e],i)}animateReadyResize(e){this.resetAllAnimation(e)}animateClearingUpdateEmpty(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(e)}animationTransitionClear(){this.animationState.transition("clear",this.getAnimationData())}getAnimationData(){const e={datumSelections:[this.groupSelection]};return e}isProcessedDataAnimatable(){return!0}checkProcessedDataAnimatable(){this.isProcessedDataAnimatable()||this.ctx.animationManager.skipCurrentBatch()}getLabelData(){return[]}getSeriesDomain(){return[NaN,NaN]}getLegendData(e){return"gradient"===e&&null!=this.colorKey&&null!=this.colorRange?[{legendType:"gradient",enabled:this.visible,seriesId:this.id,c
18olorName:this.colorName,colorDomain:this.colorDomain,colorRange:this.colorRange}]:[]}getDatumIdFromData(e){return`${e.index}`}getDatumId(e){return this.getDatumIdFromData(e)}}fa([fl(_l),ga("design:type",String)],KC.prototype,"childrenKey",void 0),fa([fl(_l),ga("design:type",String)],KC.prototype,"sizeKey",void 0),fa([fl(_l),ga("design:type",String)],KC.prototype,"colorKey",void 0),fa([fl(_l),ga("design:type",String)],KC.prototype,"colorName",void 0),fa([fl(Bl),ga("design:type",Array)],KC.prototype,"fills",void 0),fa([fl(Bl),ga("design:type",Array)],KC.prototype,"strokes",void 0),fa([fl(Bl),ga("design:type",Array)],KC.prototype,"colorRange",void 0);class YC extends Pf{constructor(){super(...arguments),this.shape="polygon",this.innerRadiusRatio=0,this.defaultTickMinSpacing=20}computeLabelsBBox(e,t){return null}}fa([fl(Hl(0,1)),ga("design:type",Number)],YC.prototype,"innerRadiusRatio",void 0);const qC={},XC={},$C={},ZC={},JC={},QC=new Set,eb=new Set,tb=new Set,ib=new Set,nb={},ob={};function rb(e,t,i,n,o,r,s,a,l,c,u,d,p){qC[e]=i,XC[e]=n,sb(e,o,r),s&&ub(e,s),a&&yb(e),l&&mb(e),c&&vb(e),u&&Cb(e),d&&bb(e,d),p&&wb(e,p),Ky(e,t)}function sb(e,t,i={}){const n=$C[e];$C[e]=Ya([n,t]),ZC[e]=Ya([n,t,i])}function ab(e,t){const i=qC[e];if(i)return new i(t);throw new Error(`AG Charts - unknown series type: ${e}`)}function lb(e){return XC[e]}function cb(e){return wa()?ZC[e]:$C[e]}function ub(e,t){JC[e]=t}function db(e){return JC[e]}function pb(e){return QC.has(e)}function hb(e){return eb.has(e)}function fb(e){return tb.has(e)}function gb(e){return ib.has(e)}function vb(e){tb.add(e)}function yb(e){QC.add(e)}function mb(e){eb.add(e)}function Cb(e){ib.add(e)}function bb(e,t){nb[e]=t}function wb(e,t){ob[e]=t}function Sb(e){var t,i;let n;for(const o of null!==(t=e.series)&&void 0!==t?t:[]){const{type:e="line"}=o,t=null===(i=nb[e])||void 0===i?void 0:i.call(nb,o);if(null!=t){if(null!=n&&n!=t)throw new Error("AG Charts - The provided series have incompatible directions");n=t}}return n}function Eb(e,t){var i;let n=t;for(const o of null!==(i=e.series)&&void 0!==i?i:[]){const{type:e}=o,t=null!=e?ob[e]:void 0;void 0!==t&&(n=Object.assign(Object.assign({},n),t(o)))}return n}function xb(){var e;for(const t of Ca){if("enterprise"!==t.packageType||sy(t)||Pa.errorOnce("Unexpected enterprise module registered: "+t.identifier),null!=Oh.constructors&&null!=t.optionConstructors&&Object.assign(Oh.constructors,t.optionConstructors),"root"===t.type&&t.themeTemplate)for(const e of t.chartTypes)Yy(e,t.themeTemplate);if("root"===t.type&&(null===(e=t.conflicts)||void 0===e?void 0:e.length)&&Ea(t.optionsKey,t.conflicts),"series"===t.type){if(t.chartTypes.length>1)throw new Error("AG Charts - Module definition error: "+t.identifier);rb(t.identifier,t.chartTypes[0],t.instanceConstructor,t.seriesDefaults,t.themeTemplate,t.enterpriseThemeTemplate,t.paletteFactory,t.solo,t.stackable,t.groupable,t.stackedByDefault,t.swapDefaultAxesCondition,t.customDefaultsFunction)}if("series-option"===t.type&&t.themeTemplate)for(const e of t.seriesTypes)sb(e,t.themeTemplate);if("axis-option"===t.type&&t.themeTemplate)for(const e of t.axisTypes){const i=t.themeTemplate[e],n=Object.assign(Object.assign({},t.themeTemplate),"object"===typeof i?i:{});for(const e of t.axisTypes)delete n[e];Zv(e,n)}"axis"===t.type&&(Yv(t.identifier,t.instanceConstructor),t.themeTemplate&&Zv(t.identifier,t.themeTemplate)),"legend"===t.type&&cy(t.identifier,t.optionsKey,t.instanceConstructor,t.themeTemplate)}if(wa()){const e=ay();e.length>0&&Pa.errorOnce("Enterprise modules expected but not registered: ",e)}}class Ob extends yv{constructor(e,t){super(e,t),this._data={}}performLayout(){const e=Object.create(null,{performLayout:{get:()=>super.performLayout}});return va(this,void 0,void 0,(function*(){const t=yield e.performLayout.call(this),{seriesArea:{padding:i},seriesRoot:n}=this,o=t.clone();return t.shrink(i.left,"left"),t.shrink(i.top,"top"),t.shrink(i.right,"right"),t.shrink(i.bottom,"bottom"),this.seriesRect=t,this.animationRect=t,this.hoverRect=t,n.translationX=Math.floor(t.x),n.translationY=Math.floor(t.y),yield Promise.all(this.series.map((e=>va(this,void 0,void 0,(function*(){yield e.update({seriesRect:t})}))))),n.visible=this.series[0].visible,n.setClipRectInGroupCoordinateSpace(new Pc(t.x,t.y,t.width,t.height)),this.layoutService.dispatchLayoutComplete({type:"layout-complete",chart:{width:this.scene.width,height:this.scene.height},clipSeries:!1,series:{rect:o,paddedRect:t,visible:!0},axes:[]}),t}))}}function Tb(e){var t,i,n,o;const r=[],s=Xy($y(e));for(const{type:a,chartTypes:l,optionsKey:c,optionsInnerKey:u,identifier:d}of Qv)if("unknown"===s||l.includes(s))if("root"===a||"legend"===a){const t=e[c];if(null==t)continue;u?t[u]&&(r.push(`${c}.${u}`),delete t[u]):(r.push(c),delete e[c])}else if("axis"===a){if(!("axes"in e)||!(null===(t=e.axes)||void 0===t?void 0:t.some((e=>e.type===d))))continue;r.push(`axis[type=${d}]`),e.axes=e.axes.filter((e=>e.type!==d))}else if("axis-option"===a){if(!("axes"in e)||!(null===(i=e.axes)||void 0===i?void 0:i.some((e=>e[c]))))continue;r.push(`axis.${c}
18`),e.axes.forEach((e=>{e[c]&&delete e[c]}))}else if("series"===a){if(!(null===(n=e.series)||void 0===n?void 0:n.some((e=>e.type===d))))continue;r.push(`series[type=${d}]`),e.series=e.series.filter((e=>e.type!==d))}else if("series-option"===a){if(!(null===(o=e.series)||void 0===o?void 0:o.some((e=>e[c]))))continue;r.push(`series.${c}`),e.series.forEach((e=>{e[c]&&delete e[c]}))}r.length>0&&Pa.warnOnce(["unable to use these enterprise features as 'ag-charts-enterprise' has not been loaded:","",...r,"","See: https://charts.ag-grid.com/javascript/installation/"].join("\n"))}function Db(e){var t,i,n,o;const r={},s={},a={},l="default-ag-charts-group",c=[];for(const u of e){const e=null!==(t=u.type)&&void 0!==t?t:"line",d=hb(e),p=fb(e);if(!d&&!p){c.push({type:"ungrouped",opts:[u]});continue}const{stacked:h,stackGroup:f,grouped:g,xKey:v}=u,y=null!=f||!0===h;null!==(i=a[e])&&void 0!==i||(a[e]=!1),a[e]||(a[e]=y&&d);const m=!0===g;let C=[null!==f&&void 0!==f?f:!0===h?"stacked":void 0,m?"grouped":void 0].filter((e=>null!=e)).join("-");C||(C=l);const b=`${e}-${v}-${C}`;if(y&&d){const e=null!==(n=s[b])&&void 0!==n?n:s[b]={type:"stack",opts:[]};0===e.opts.length&&c.push(e),e.opts.push(u)}else if(m&&p){const e=null!==(o=r[b])&&void 0!==o?o:r[b]={type:"group",opts:[]};0===e.opts.length&&c.push(e),e.opts.push(u)}else c.push({type:"ungrouped",opts:[u]})}return Object.values(a).some((e=>e)),c}function Rb(e,t){var i;const n=[],o=t.map((e=>{var t;const i=null!==(t=e.type)&&void 0!==t?t:"line",n=fb(i),o=hb(i),r=gb(i);if(e.grouped&&!n&&Pa.warnOnce(`unsupported grouping of series type: ${i}`),e.stacked&&!o&&Pa.warnOnce(`unsupported stacking of series type: ${i}`),!n&&!o)return e;let s=!1,a=!1;return void 0===e.stacked&&void 0===e.grouped?(s=o&&r,a=n&&!s):void 0===e.stacked?(s=o&&r&&!(e.grouped&&n),a=n&&!s&&!!e.grouped):void 0===e.grouped?(s=o&&e.stacked,a=n&&!s):(s=o&&e.stacked,a=n&&!s&&e.grouped),Object.assign(Object.assign({},e),{stacked:s,grouped:a})})),r=Db(o),s=r.reduce(((e,t)=>{var i,n;if("ungrouped"===t.type)return e;const o=null!==(i=t.opts[0].type)&&void 0!==i?i:"line";return null!==(n=e[o])&&void 0!==n||(e[o]=0),e[o]+="stack"===t.type?1:t.opts.length,e}),{}),a={},l=e=>{var t,i;let n=0;const o=null!==(t=e.opts[0].type)&&void 0!==t?t:"line";if(null!==(i=a[o])&&void 0!==i||(a[o]=0),"stack"===e.type){for(const t of e.opts)t.seriesGrouping={groupIndex:a[o],groupCount:s[o],stackIndex:n++,stackCount:e.opts.length};a[o]++}else if("group"===e.type)for(const r of e.opts)r.seriesGrouping={groupIndex:a[o],groupCount:s[o],stackIndex:0,stackCount:0},a[o]++;else for(const r of e.opts)r.seriesGrouping=void 0;return e.opts};Ia.create(!0,"opts")("processSeriesOptions() - series grouping: ",r);for(const c of r){const e=null!==(i=c.opts[0].type)&&void 0!==i?i:"line";fb(e)||hb(e)?n.push(...l(c)):n.push(...c.opts)}return n}Ob.className="HierarchyChart",Ob.type="hierarchy";const Ab="white",_b={fills:Array.from(Object.values(lp)),strokes:Array.from(Object.values(cp))},Pb={get cartesian(){return{seriesTypes:zy.cartesianTypes,commonOptions:["zoom","navigator"]}},get polar(){return{seriesTypes:zy.polarTypes,commonOptions:[]}},get hierarchy(){return{seriesTypes:zy.hierarchyTypes,commonOptions:[]}}},Mb=Object.values(Pb).reduce(((e,{commonOptions:t})=>[...e,...t]),[]);class kb{getPalette(){return _b}static getAxisDefaults(){return{top:{},right:{},bottom:{},left:{},title:{enabled:!1,text:"Axis Title",spacing:25,fontStyle:void 0,fontWeight:Dy,fontSize:Oy.MEDIUM,fontFamily:ym,color:mm},label:{fontStyle:void 0,fontWeight:void 0,fontSize:Oy.SMALL,fontFamily:ym,padding:5,rotation:void 0,color:mm,formatter:void 0,avoidCollisions:!0},line:{enabled:!0,width:1,color:Em},tick:{enabled:!1,width:1,color:Em},gridLine:{enabled:!0,style:[{stroke:Sm,lineDash:[]}]},crossLines:{enabled:!1,fill:xm,stroke:xm,fillOpacity:.1,strokeWidth:1,label:{enabled:!1,fontStyle:void 0,fontWeight:void 0,fontSize:Oy.SMALL,fontFamily:ym,padding:5,color:mm}}}}static getSeriesDefaults(){return{tooltip:{enabled:!0,renderer:void 0},visible:!0,showInLegend:!0,highlightStyle:{item:{fill:"rgba(255,255,255, 0.33)",stroke:"rgba(0, 0, 0, 0.4)",strokeWidth:2},series:{dimOpacity:1},text:{color:"black"}},nodeClickRange:"exact"}}static getCartesianSeriesMarkerDefaults(){return{enabled:!0,shape:"circle",size:7,strokeWidth:1,formatter:void 0}}static getLegendItemMarkerDefaults(){return{shape:void 0,size:15,padding:8}}static getCaptionWrappingDefaults(){return"hyphenate"}static getChartDefaults(){return{background:{visible:!0,fill:Om}
18,padding:{top:20,right:20,bottom:20,left:20},title:{enabled:!1,text:"Title",fontStyle:void 0,fontWeight:Dy,fontSize:Oy.LARGE,fontFamily:ym,color:mm,wrapping:kb.getCaptionWrappingDefaults()},subtitle:{enabled:!1,text:"Subtitle",spacing:20,fontStyle:void 0,fontWeight:void 0,fontSize:Oy.MEDIUM,fontFamily:ym,color:wm,wrapping:kb.getCaptionWrappingDefaults()},footnote:{enabled:!1,text:"Footnote",spacing:20,fontStyle:void 0,fontWeight:void 0,fontSize:Oy.MEDIUM,fontFamily:ym,color:"rgb(140, 140, 140)",wrapping:kb.getCaptionWrappingDefaults()},legend:{position:Ry,spacing:30,listeners:{},item:{paddingX:16,paddingY:8,marker:kb.getLegendItemMarkerDefaults(),label:{color:mm,fontStyle:void 0,fontWeight:void 0,fontSize:Oy.SMALL,fontFamily:ym,formatter:void 0}},reverseOrder:!1,pagination:{marker:{size:12},activeStyle:{fill:mm},inactiveStyle:{fill:wm},highlightStyle:{fill:mm},label:{color:mm}}},tooltip:{enabled:!0,range:"nearest",delay:0},listeners:{}}}constructor(e){e=Od({},null!==e&&void 0!==e?e:{});const{overrides:t=null,palette:i=null}=e,n=this.createChartConfigPerChartType(this.getDefaults());if(t){const{common:e}=t,i=(e,t)=>{if(t)for(const i of e){const e=i;n[e]=Od(n[e],t)}};for(const[,{seriesTypes:t,commonOptions:n}]of Object.entries(Pb)){const o=Object.assign({},e);for(const e of Mb)n.includes(e)||delete o[e];i(t,o)}zy.seriesTypes.forEach((e=>{const i=e;t[i]&&(n[i]=Od(n[i],t[i]))}))}this.palette=null!==i&&void 0!==i?i:this.getPalette(),this.config=Object.freeze(this.templateTheme(n))}createChartConfigPerChartType(e){return Object.entries(Pb).forEach((([t,{seriesTypes:i}])=>{const n=qy(t);i.forEach((t=>{const i=t;e[i]||(e[i]={},Od(e[i],n))}))})),e}getDefaults(){let e={};const t=e=>Object.assign(Object.assign(Object.assign({},dy()),kb.getChartDefaults()),qy(e)),i=(e,i)=>{var n,o,r,s;const a=t(e),l={};for(const t of i){null!==(n=l[t])&&void 0!==n||(l[t]=Od({},a));const i=null!==(o=(s=l[t]).axes)&&void 0!==o?o:s.axes={},c=cb(t);c&&(l[t].series=Od(l[t].series,c));for(const t of Xv.axesTypes){const n=Jv(t);"cartesian"===e&&(i[t]=Od(i[t],null!==(r=kb.cartesianAxisDefault[t])&&void 0!==r?r:{})),n&&(i[t]=Od(i[t],n))}}return l};return e=Od(e,i("cartesian",zy.cartesianTypes)),e=Od(e,i("polar",zy.polarTypes)),e=Od(e,i("hierarchy",zy.hierarchyTypes)),e}templateTheme(e){const t=Ya([e]),{extensions:i,properties:n}=this.getTemplateParameters();return Xa(t,((e,t)=>{if(t["__extends__"]){const e=t["__extends__"],n=i.get(e);if(null==n)throw new Error("AG Charts - no template variable provided for: "+e);Object.keys(n).forEach((e=>{e in t||(t[e]=n[e])})),delete t["__extends__"]}if(t["__overrides__"]){const e=t["__overrides__"],n=i.get(e);if(null==n)throw new Error("AG Charts - no template variable provided for: "+e);Object.assign(t,n),delete t["__overrides__"]}if(Array.isArray(t))for(let i=0;i<t.length;i++){const e=t[i];n.has(e)&&(t[i]=n.get(e))}else for(const[i,o]of Object.entries(t))n.has(o)&&(t[i]=n.get(o))})),t}static getWaterfallSeriesDefaultPositiveColors(){return{fill:lp.BLUE,stroke:cp.BLUE}}static getWaterfallSeriesDefaultNegativeColors(){return{fill:lp.ORANGE,stroke:cp.ORANGE}}static getWaterfallSeriesDefaultTotalColors(){return{fill:lp.GRAY,stroke:cp.GRAY}}getTemplateParameters(){const e=new Map;e.set(rm,kb.getChartDefaults()),e.set(cm,kb.getAxisDefaults()),e.set(sm,kb.getChartDefaults().legend),e.set(am,kb.getChartDefaults().legend.item),e.set(lm,kb.getLegendItemMarkerDefaults()),e.set(um,kb.getAxisDefaults().label),e.set(dm,kb.getAxisDefaults().line),e.set(pm,kb.getAxisDefaults().tick),e.set(hm,kb.getAxisDefaults().gridLine),e.set(fm,kb.getSeriesDefaults()),e.set(vm,{}),e.set(gm,kb.getCartesianSeriesMarkerDefaults());const t=new Map;return t.set(ym,"Verdana, sans-serif"),t.set(mm,"rgb(70, 70, 70)"),t.set(Cm,"white"),t.set(wm,"rgb(140, 140, 140)"),t.set(Sm,"rgb(224,234,241)"),t.set(Em,"rgb(195, 195, 195)"),t.set(xm,"rgb(70, 70, 70)"),t.set(bm,Ab),t.set(Om,Ab),t.set(Tm,"rgba(0, 0, 0, 0.5)"),t.set(Mm,[lp.ORANGE,lp.YELLOW,lp.GREEN]),t.set(km,["#ffffff","#e0e5ea","#c1ccd5","#a3b4c1","#859cad"]),t.set(Nm,["#ffffff","#c5cbd1","#a4b1bd","#8498a9","#648096"]),t.set(Pm,Ab),t.set(Dm,kb.getWaterfallSeriesDefaultPositiveColors()),t.set(Rm,kb.getWaterfallSeriesDefaultNegativeColors()),t.set(Am,kb.getWaterfallSeriesDefaultTotalColors()),t.set(_m,kb.getWaterfallSeriesDefaultTotalColors().stroke),{extensions:e,properties:t}}}kb.cartesianAxisDefault={number:Object.assign(Object.assign({},kb.getAxisDefaults()),{line:Object.assign(Object.assign({},kb.getAxisDefaults().line),{enabled:!1})}),log:Object.assign(Object.assign({},kb.getAxisDefaults()),{base:10,line:Object.assign(Object.assign({},kb.getAxisDefaults().line),{enabled:!1})}),category:Object.assign(Object.assign({},kb.getAxisDefaults()),{groupPaddingInner:.1,label:Object.assign(Object.assign({},kb.getAxisDefaults().label),{autoRotate:!0}),gridLine:Object.assign(Object.assign({},kb.getAxisDefaults().gridLine),{enabled:!1})}),"grouped-category":Object.assign({},kb.getAxisDefaults()),time:Object.assign(Object.assign({},kb.getAxisDefaults()),{gridLine:Object.assign(Object.assign({},kb.getAxisDefaults().gridLine),{enabled:!1})})};const Nb="#182732",Lb={BLUE:"#5090dc",ORANGE:"#ffa03a",GREEN:"#459d55",CYAN:"#34bfe1",YELLOW:"#e1cc00",VIOLET:"#9669cb",GRAY:"#b5b5b5",MAGENTA:"#bd5aa7",BROWN:"#8a6224",RED:"#ef5452"},Ib={BLUE:"#74a8e6",ORANGE:"#ffbe70",GREEN:"#6cb176",CYAN:"#75d4ef",YELLOW:"#f6e559",VIOLET:"#aa86d8",GRAY:"#a1a1a1",MAGENTA:"#ce7ab9",BROWN:"#997b52",RED:"#ff7872"},Fb={fills:Array.from(Object.values(Lb)),strokes:Array.from(Object.values(Ib))};class Gb extends kb{static getWaterfallSeriesDefaultPositiveColors(){return{fill:Lb.BLUE,stroke:Ib.BLUE}}static getWaterfallSeriesDefaultNegativeColors(){return{fill:Lb.ORANGE,stroke:Ib.ORANGE}}static getWaterfallSeriesDefaultTotalColors(){return{fill:Lb.GRAY,
18stroke:Ib.GRAY}}getTemplateParameters(){const e=super.getTemplateParameters();return e.properties.set(Dm,Gb.getWaterfallSeriesDefaultPositiveColors()),e.properties.set(Rm,Gb.getWaterfallSeriesDefaultNegativeColors()),e.properties.set(Am,Gb.getWaterfallSeriesDefaultTotalColors()),e.properties.set(_m,Gb.getWaterfallSeriesDefaultTotalColors().stroke),e.properties.set(Pm,Nb),e.properties.set(mm,"white"),e.properties.set(wm,"#7D91A0"),e.properties.set(Sm,"#545A6E"),e.properties.set(xm,"white"),e.properties.set(Mm,[Lb.ORANGE,Lb.YELLOW,Lb.GREEN]),e.properties.set(km,["#192834","#253746","#324859","#3f596c","#4d6a80"]),e.properties.set(Nm,["#192834","#3b5164","#496275","#577287","#668399"]),e.properties.set(Om,Nb),e.properties.set(bm,Nb),e}getPalette(){return Fb}constructor(e){super(e)}}const Vb={BLUE:"#2196F3",ORANGE:"#FF9800",GREEN:"#4CAF50",CYAN:"#00BCD4",YELLOW:"#FFEB3B",VIOLET:"#7E57C2",GRAY:"#9E9E9E",MAGENTA:"#F06292",BROWN:"#795548",RED:"#F44336"},Bb={BLUE:"#90CAF9",ORANGE:"#FFCC80",GREEN:"#A5D6A7",CYAN:"#80DEEA",YELLOW:"#FFF9C4",VIOLET:"#B39DDB",GRAY:"#E0E0E0",MAGENTA:"#F48FB1",BROWN:"#A1887F",RED:"#EF9A9A"},jb={fills:Array.from(Object.values(Vb)),strokes:Array.from(Object.values(Bb))};class Hb extends Gb{static getWaterfallSeriesDefaultPositiveColors(){return{fill:Vb.BLUE,stroke:Bb.BLUE}}static getWaterfallSeriesDefaultNegativeColors(){return{fill:Vb.RED,stroke:Bb.RED}}static getWaterfallSeriesDefaultTotalColors(){return{fill:Vb.GRAY,stroke:Bb.GRAY}}getTemplateParameters(){const e=super.getTemplateParameters();return e.properties.set(Dm,Hb.getWaterfallSeriesDefaultPositiveColors()),e.properties.set(Rm,Hb.getWaterfallSeriesDefaultNegativeColors()),e.properties.set(Am,Hb.getWaterfallSeriesDefaultTotalColors()),e.properties.set(Mm,[Vb.ORANGE,Vb.YELLOW,Vb.GREEN]),e.properties.set(_m,Hb.getWaterfallSeriesDefaultTotalColors().stroke),e}getPalette(){return jb}}const Wb={BLUE:"#2196F3",ORANGE:"#FF9800",GREEN:"#4CAF50",CYAN:"#00BCD4",YELLOW:"#FFEB3B",VIOLET:"#7E57C2",GRAY:"#9E9E9E",MAGENTA:"#F06292",BROWN:"#795548",RED:"#F44336"},Ub={BLUE:"#1565C0",ORANGE:"#E65100",GREEN:"#2E7D32",CYAN:"#00838F",YELLOW:"#F9A825",VIOLET:"#4527A0",GRAY:"#616161",MAGENTA:"#C2185B",BROWN:"#4E342E",RED:"#B71C1C"},zb={fills:Array.from(Object.values(Wb)),strokes:Array.from(Object.values(Ub))};class Kb extends kb{static getWaterfallSeriesDefaultPositiveColors(){return{fill:Wb.BLUE,stroke:Ub.BLUE}}static getWaterfallSeriesDefaultNegativeColors(){return{fill:Wb.RED,stroke:Ub.RED}}static getWaterfallSeriesDefaultTotalColors(){return{fill:Wb.GRAY,stroke:Ub.GRAY}}getTemplateParameters(){const e=super.getTemplateParameters();return e.properties.set(Dm,Kb.getWaterfallSeriesDefaultPositiveColors()),e.properties.set(Rm,Kb.getWaterfallSeriesDefaultNegativeColors()),e.properties.set(Am,Kb.getWaterfallSeriesDefaultTotalColors()),e.properties.set(Mm,[Wb.ORANGE,Wb.YELLOW,Wb.GREEN]),e.properties.set(_m,Kb.getWaterfallSeriesDefaultTotalColors().stroke),e}getPalette(){return zb}}const Yb={BLUE:"#436ff4",PURPLE:"#9a7bff",MAGENTA:"#d165d2",PINK:"#f0598b",RED:"#f47348",ORANGE:"#f2a602",YELLOW:"#e9e201",GREEN:"#21b448",CYAN:"#00b9a2",MODERATE_BLUE:"#00aee4"},qb={BLUE:"#6698ff",PURPLE:"#c0a3ff",MAGENTA:"#fc8dfc",PINK:"#ff82b1",RED:"#ff9b70",ORANGE:"#ffcf4e",YELLOW:"#ffff58",GREEN:"#58dd70",CYAN:"#51e2c9",MODERATE_BLUE:"#4fd7ff"},Xb="#bbbbbb",$b="#eeeeee",Zb={fills:Array.from(Object.values(Yb)),strokes:Array.from(Object.values(qb))};class Jb extends Gb{static getWaterfallSeriesDefaultPositiveColors(){return{fill:Yb.BLUE,stroke:qb.BLUE}}static getWaterfallSeriesDefaultNegativeColors(){return{fill:Yb.RED,stroke:qb.RED}}static getWaterfallSeriesDefaultTotalColors(){return{fill:Xb,stroke:$b}}getTemplateParameters(){const e=super.getTemplateParameters();return e.properties.set(Dm,Jb.getWaterfallSeriesDefaultPositiveColors()),e.properties.set(Rm,Jb.getWaterfallSeriesDefaultNegativeColors()),e.properties.set(Am,Jb.getWaterfallSeriesDefaultTotalColors()),e.properties.set(Mm,[Yb.BLUE,Yb.RED]),e.properties.set(_m,Jb.getWaterfallSeriesDefaultTotalColors().stroke),e}getPalette(){return Zb}}const Qb={BLUE:"#436ff4",PURPLE:"#9a7bff",MAGENTA:"#d165d2",PINK:"#f0598b",RED:"#f47348",ORANGE:"#f2a602",YELLOW:"#e9e201",GREEN:"#21b448",CYAN:"#00b9a2",MODERATE_BLUE:"#00aee4"},ew={BLUE:"#2346c9",PURPLE:"#7653d4",MAGENTA:"#a73da9",PINK:"#c32d66",RED:"#c84b1c",ORANGE:"#c87f00",YELLOW:"#c1b900",GREEN:"#008c1c",CYAN:"#00927c",MODERATE_BLUE:"#0087bb"},tw="#bbbbbb",iw="#888888",nw={fills:Array.from(Object.values(Qb)),strokes:Array.from(Object.values(ew))};class ow extends kb{static getWaterfallSeriesDefaultPositiveColors(){return{fill:Qb.BLUE,stroke:ew.BLUE}}static getWaterfallSeriesDefaultNegativeColors(){return{fill:Qb.RED,stroke:ew.RED}}static getWaterfallSeriesDefaultTotalColors(){return{fill:tw,stroke:iw}}getTemplateParameters(){const e=super.getTemplateParameters();return e.properties.set(Dm,ow.getWaterfallSeriesDefaultPositiveColors()),e.properties.set(Rm,ow.getWaterfallSeriesDefaultNegativeColors()),e.properties.set(Am,ow.getWaterfallSeriesDefaultTotalColors()),e.properties.set(Mm,[Qb.BLUE,Qb.RED]),e.properties.set(_m,ow.getWaterfallSeriesDefaultTotalColors().stroke),e}getPalette(){return nw}}const rw={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"},sw={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"},aw={fills:Array.from(Object.values(rw)),strokes:Array.from(Object.values(sw))};class lw extends Gb{static getWaterfallSeriesDefaultPositiveColors(){return{fill:rw.BLUE,stroke:sw.BLUE}}static getWaterfallSeriesDefaultNegativeColors(){return{fill:rw.ORANGE,stroke:sw.ORANGE}}static getWaterfallSeriesDefaultTotalColors(){return{fill:rw.GRAY,stroke:sw.GRAY}}getTemplateParameters(){const e=super.getTemplateParameters();return e.properties.set(Dm,lw.getWaterfallSeriesDefaultPositiveColors()),e.properties.set(Rm,lw.getWaterfallSeriesDefaultNegativeColors()),e.properties.set(Am,lw.getWaterfallSeriesDefaultTotalColors()),e.properties.set(Mm,[rw.ORANGE,rw.YELLOW,rw.GREEN]),e.properties.set(_m,lw.getWaterfallSeriesDefaultTotalColors().stroke),e}getPalette(){return aw}}const cw={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"},uw={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"},dw={fills:Array.from(Object.values(cw)),strokes:Array.from(Object.values(uw))};class pw extends kb{static getWaterfallSeriesDefaultPositiveColors(){return{fill:cw.BLUE,stroke:uw.BLUE}}static getWaterfallSeriesDefaultNegativeColors(){return{fill:cw.ORANGE,stroke:uw.ORANGE}}static getWaterfallSeriesDefaultTotalColors(){return{fill:cw.GRAY,stroke:uw.GRAY}}getTemplateParameters(){const e=super.getTemplateParameters();return e.properties.set(Dm,pw.getWaterfallSeriesDefaultPositiveColors()),e.properties.set(Rm,pw.getWaterfallSeriesDefaultNegativeColors()),e.properties.set(Am,pw.getWaterfallSeriesDefaultTotalColors()),e.properties.set(Mm,[cw.ORANGE,cw.YELLOW,cw.GREEN]),e.properties.set(_m,pw.getWaterfallSeriesDefaultTotalColors().stroke),e}getPalette(){return dw}}const hw={BLUE:"#0083ff",ORANGE:"#ff6600",GREEN:"#00af00",CYAN:"#00ccff",YELLOW:"#f7c700",VIOLET:"#ac26ff",GRAY:"#a7a7b7",MAGENTA:"#e800c5",BROWN:"#b54300",RED:"#ff0000"},fw={BLUE:"#67b7ff",ORANGE:"#ffc24d",GREEN:"#5cc86f",CYAN:"#54ebff",VIOLET:"#c18aff",YELLOW:"#fff653",GRAY:"#aeaeae",MAGENTA:"#f078d4",BROWN:"#ba8438",RED:"#ff726e"},gw={fills:Array.from(Object.values(hw)),strokes:Array.from(Object.values(fw))};class vw extends Gb{static getWaterfallSeriesDefaultPositiveColors(){return{fill:hw.BLUE,stroke:fw.BLUE}}static getWaterfallSeriesDefaultNegativeColors(){return{fill:hw.ORANGE,stroke:fw.ORANGE}}static getWaterfallSeriesDefaultTotalColors(){return{fill:hw.GRAY,stroke:fw.GRAY}}getTemplateParameters(){const e=super.getTemplateParameters();return e.properties.set(Dm,vw.getWaterfallSeriesDefaultPositiveColors()),e.properties.set(Rm,vw.getWaterfallSeriesDefaultNegativeColors()),e.properties.set(Am,vw.getWaterfallSeriesDefaultTotalColors()),e.properties.set(Mm,[hw.ORANGE,hw.YELLOW,hw.GREEN]),e.properties.set(_m,vw.getWaterfallSeriesDefaultTotalColors().stroke),e}getPalette(){return gw}}const yw={BLUE:"#0083ff",ORANGE:"#ff6600",GREEN:"#00af00",CYAN:"#00ccff",YELLOW:"#f7c700",VIOLET:"#ac26ff",GRAY:"#a7a7b7",MAGENTA:"#e800c5",BROWN:"#b54300",RED:"#ff0000"},mw={BLUE:"#0f68c0",ORANGE:"#d47100",GREEN:"#007922",CYAN:"#009ac2",VIOLET:"#bca400",YELLOW:"#753cac",GRAY:"#646464",MAGENTA:"#9b2685",BROWN:"#6c3b00",RED:"#cb0021"},Cw={fills:Array.from(Object.values(yw)),strokes:Array.from(Object.values(mw))};class bw extends kb{static getWaterfallSeriesDefaultPositiveColors(){return{fill:yw.BLUE,stroke:mw.BLUE}}static getWaterfallSeriesDefaultNegativeColors(){return{fill:yw.ORANGE,stroke:mw.ORANGE}}static getWaterfallSeriesDefaultTotalColors(){return{fill:yw.GRAY,stroke:mw.GRAY}}getTemplateParameters(){const e=super.getTemplateParameters();return e.properties.set(Dm,bw.getWaterfallSeriesDefaultPositiveColors()),e.properties.set(Rm,bw.getWaterfallSeriesDefaultNegativeColors()),e.properties.set(Am,bw.getWaterfallSeriesDefaultTotalColors()),e.properties.set(Mm,[yw.ORANGE,yw.YELLOW,yw.GREEN]),e.properties.set(_m,bw.getWaterfallSeriesDefaultTotalColors().stroke),e}getPalette(){return Cw}}const ww=()=>new kb,Sw=()=>new Gb,Ew={undefined:ww,null:ww,"ag-default":ww,"ag-sheets":()=>new pw,"ag-polychroma":()=>new ow,"ag-vivid":()=>new bw,"ag-material":()=>new Kb},xw={undefined:Sw,null:Sw,"ag-default-dark":Sw,"ag-sheets-dark":()=>new lw,"ag-polychroma-dark":()=>new Jb,"ag-vivid-dark":()=>new vw,"ag-material-dark":()=>new Hb},Ow=Object.assign(Object.assign({},xw),Ew);function Tw(e){if(null===e)return;let t=!0;const{baseTheme:i,palette:n,overrides:o}=e;if(void 0!==i&&"string"!==typeof i&&"object"!==typeof i&&(Pa.warn(`invali
18d theme.baseTheme type ${typeof i}, expected (string | object).`),t=!1),void 0!==o&&"object"!==typeof o&&(Pa.warn(`invalid theme.overrides type ${typeof o}, expected object.`),t=!1),"object"===typeof n){if(null!==n){const{fills:e,strokes:i}=n;Array.isArray(e)||(Pa.warn("theme.overrides.fills must be a defined array"),t=!1),Array.isArray(i)||(Pa.warn("theme.overrides.strokes must be a defined array"),t=!1)}}else void 0!==n&&(Pa.warn(`invalid theme.palette type ${typeof n}, expected object.`),t=!1);return t?e:void 0}function Dw(e){return void 0===e||"string"===typeof e||e instanceof kb?e:"object"===typeof e?Tw(e):void Pa.warn(`invalid theme value type ${typeof e}, expected object.`)}function Rw(e){var t;let i=Dw(e);if(i instanceof kb)return i;if(void 0===i||"string"===typeof i){const e=Ow[i];return e?e():(Pa.warnOnce(`the theme [${i}] is invalid, using [ag-default] instead.`),ww())}const n=[];let o;while("object"===typeof i)n.push(null!==(t=i.overrides)&&void 0!==t?t:{}),i.palette&&null==o&&(o=i.palette),i=i.baseTheme;n.reverse();const r=Object.assign({baseTheme:i,overrides:Ya(n)},o?{palette:o}:{}),s=r.baseTheme?Rw(r.baseTheme):ww();return new s.constructor(r)}function Aw(e,t,i){const n=[];for(let o=0;o<i;o++)n.push(t[(o+e.colourIndex)%t.length]);return n}const _w={avoidDeepClone:["data"]};function Pw(e){if(void 0===e||"object"!==typeof e||null===e)return{};const{type:t,xOffset:i,yOffset:n}=e,o={},r={pointer:!0,node:!0},s=e=>Object.keys(r).includes(e);return"string"===typeof t&&s(t)&&(o.type=t),"number"===typeof i&&!isNaN(i)&&isFinite(i)&&(o.xOffset=i),"number"===typeof n&&!isNaN(n)&&isFinite(n)&&(o.yOffset=n),o}function Mw(e){var t,i,n,o;kw(e);const r=$y(e),s=Pw(null===(t=e.tooltip)||void 0===t?void 0:t.position),a=e=>{if(null!=e&&!(em(e)||ey(e)||lb(e)))throw new Error(`AG Charts - unknown series type: ${e}; expected one of: ${zy.seriesTypes}`)};a(r);for(const{type:y}of null!==(i=e.series)&&void 0!==i?i:[])null!=y&&a(y);e=Lw(Object.assign(Object.assign({},e),{type:r}));let l="line";Zy(e)?l="line":Jy(e)?l="treemap":Qy(e)&&(l="pie");let c=lb(r);Sb(e)&&(c=nm(c)),c=Eb(e,c);const u=om(e);Hw(e);const{context:d,mergedOptions:p,axesThemes:h,seriesThemes:f,theme:g}=Fw(c,e,u);p.series=Rb(p,(null!==(n=p.series)&&void 0!==n?n:[]).map((e=>{var t;const i=null!==(t=e.type)&&void 0!==t?t:l,n=Iw(e,i,f,s);return"pie"===i&&zw(f.pie,e,n),n}))).map((e=>Vw(d,e))).map((e=>g.templateTheme(e)));const v=e=>{const t=tm(e);return t||Pa.warnOnce(`unknown axis type: ${e}; expected one of: ${Xv.axesTypes}, ignoring.`),t};if("axes"in p){let t=!0;for(const{type:e}of null!==(o=p.axes)&&void 0!==o?o:[])t&&(t=v(e));const i=t?p.axes:c.axes;p.axes=null===i||void 0===i?void 0:i.map((e=>{var i,n,o,r,s;const a=e.type;let l;t&&(l=null===(i=c.axes)||void 0===i?void 0:i.find((({type:e})=>e===a)));const u=Ya([null!==(n=h[a])&&void 0!==n?n:{},null!==(s=null===(o=h[a])||void 0===o?void 0:o[null!==(r=e.position)&&void 0!==r?r:"unknown"])&&void 0!==s?s:{},l]);return jw(e,u)})),Ww(e,p)}return Uw(e,p),p}function kw(e){const t={yKeys:"yKey",yNames:"yName"};Object.entries(t).forEach((([t,i])=>{var n;(null===(n=e.series)||void 0===n?void 0:n.some((e=>null!=e[t])))&&Pa.warnOnce(`Property [series.${t}] is deprecated, please use [series.${i}] and multiple series instead.`)}))}function Nw(e){for(const t of e)if(pb(t.type))return!0;return!1}function Lw(e){if(void 0===e.series||e.series.length<=1||!Nw(e.series))return e;let t=[...e.series];if(pb(t[0].type))Pa.warn(`series[0] of type '${t[0].type}' is incompatible with other series types. Only processing series[0]`),t=t.slice(0,1);else{const e=Array.from(new Set(t.filter((e=>pb(e.type))).map((e=>e.type))));Pa.warnOnce(`Unable to mix these series types with the lead series type: ${e}`),t=t.filter((e=>!pb(e.type)))}return Object.assign(Object.assign({},e),{series:t})}function Iw(e,t,i,n){var o,r;
18const s=Ya([Object.assign({},n),null===(o=e.tooltip)||void 0===o?void 0:o.position],_w);return Ya([null!==(r=i[t])&&void 0!==r?r:{},Object.assign(Object.assign({},e),{type:t,tooltip:Object.assign(Object.assign({},e.tooltip),{position:s})})],_w)}function Fw(e,t,i){const{theme:n,cleanedTheme:o,axesThemes:r,seriesThemes:s,userPalette:a}=Gw(t),l={colourIndex:0,palette:n.palette,userPalette:a,theme:n};e=n.templateTheme(e);const c=Ya([e,o,t,i],_w);return ya.isEnterprise||Tb(c),{context:l,mergedOptions:c,axesThemes:r,seriesThemes:s,theme:n}}function Gw(e){var t;const i=Rw(e.theme),n=i.config[$y(e)],o=Object.entries(i.config).reduce(((e,[t,{series:i}])=>(e[t]=i,e)),{}),r=e.theme,s="object"===typeof r&&r.palette?r.palette:null;return{theme:i,axesThemes:null!==(t=null===n||void 0===n?void 0:n["axes"])&&void 0!==t?t:{},seriesThemes:o,cleanedTheme:Ya([null!==n&&void 0!==n?n:{},{axes:za,series:za}]),userPalette:s}}function Vw(e,t,...i){const n=Bw(e,t),o={stacked:za,grouped:za};return Ya([...i,n,t,o],_w)}function Bw(e,t){const i=db(t.type);if(!i)return{};const{palette:{fills:n,strokes:o},userPalette:r,theme:s}=e,a=Math.max(n.length,o.length);return i({userPalette:r,themeTemplateParameters:s.getTemplateParameters(),colorsCount:a,takeColors:t=>{const i={fills:Aw(e,n,t),strokes:Aw(e,o,t)};return e.colourIndex+=t,i}})}function jw(e,t){const i={top:za,bottom:za,left:za,right:za};if(e.crossLines){Array.isArray(e.crossLines)||(Pa.warn("axis[].crossLines should be an array."),e.crossLines=[]);const{crossLines:i}=t;e.crossLines=e.crossLines.map((e=>Ya([i,e])))}const n={crossLines:za};return Ya([t,n,e,i],_w)}function Hw(e){Xa(e,((e,t)=>{!1===t.enabled&&Object.keys(t).forEach((e=>{"enabled"!==e&&delete t[e]}))}),{skip:["data","theme"]})}function Ww(e,t){var i,n,o,r;void 0===(null===(i=e.legend)||void 0===i?void 0:i.enabled)&&void 0===(null===(n=t.legend)||void 0===n?void 0:n.enabled)&&(null!==(o=t.legend)&&void 0!==o||(t.legend={}),(null!==(r=e.series)&&void 0!==r?r:[]).length>1?t.legend.enabled=!0:t.legend.enabled=!1)}function Uw(e,t){Xa(e,((e,t,i)=>{if(!i)return;const{_enabledFromTheme:n}=i;null!=n&&delete i._enabledFromTheme,"enabled"in i&&(n||null==t.enabled&&(i.enabled=!0))}),{skip:["data","theme"]},t),Xa(t,((e,t)=>{null!=t._enabledFromTheme&&delete t._enabledFromTheme}),{skip:["data","theme"]})}function zw(e,t,i){Array.isArray(t.innerLabels)?i.innerLabels=t.innerLabels.map((t=>Ya([e.innerLabels,t]))):i.innerLabels=za}class Kw extends yv{constructor(e,t){super(e,t),this.padding=new tf(40),this.axisGroup.zIndex=rp.AXIS_FOREGROUND_ZINDEX}performLayout(){const e=Object.create(null,{performLayout:{get:()=>super.performLayout}});return va(this,void 0,void 0,(function*(){const t=yield e.performLayout.call(this),i=t.clone();return this.computeSeriesRect(t),yield this.computeCircle(t),this.axes.forEach((e=>e.update())),this.hoverRect=t,this.layoutService.dispatchLayoutComplete({type:"layout-complete",chart:{width:this.scene.width,height:this.scene.height},clipSeries:!1,series:{rect:i,paddedRect:t,visible:!0},axes:[]}),t}))}updateAxes(e,t,i){var n,o;const r=this.axes.find((e=>e.direction===mc.X)),s=this.axes.find((e=>e.direction===mc.Y));if(!(r instanceof YC)||!(s instanceof YC))return;const a=r.scale,l=null===(n=a.ticks)||void 0===n?void 0:n.call(a).map((e=>a.convert(e))),c=s.innerRadiusRatio;r.innerRadiusRatio=c,null===(o=r.computeRange)||void 0===o||o.call(r),r.gridLength=i,s.gridAngles=l,s.gridRange=r.range,s.range=[i,i*c],[r,s].forEach((i=>{i.translation.x=e,i.translation.y=t,i.calculateLayout()}))}computeSeriesRect(e){const{seriesArea:{padding:t}}=this;e.shrink(t.left,"left"),e.shrink(t.top,"top"),e.shrink(t.right,"right"),e.shrink(t.bottom,"bottom"),this.seriesRect=e,this.animationRect=e}computeCircle(e){return va(this,void 0,void 0,(function*(){const t=this.series.filter((e=>e instanceof vh)),i=this.axes.filter((e=>e instanceof YC)),n=(e,i,n)=>{this.updateAxes(e,i,n),t.forEach((t=>{t.centerX=e,t.centerY=i,t.radius=n}));const o=t.filter((e=>e instanceof xh));if(o.length>1){const e=o.map((e=>{const t=e.getInnerRadius();return{series:e,innerRadius:t}})).sort(((e,t)=>e.innerRadius-t.innerRadius));e[e.length-1].series.surroundingRadius=void 0;for(let t=0;t<e.length-1;t++)e[t].series.surroundingRadius=e[t+1].innerRadius}},o=e.x+e.width/2,r=e.y+e.height/2,s=Math.max(0,Math.min(e.width,e.height)/2);let a=s;n(o,r,a);const l=({hideWhenNecessary:l=!1}={})=>va(this,void 0,void 0,(function*(){const c=[];for(const n of[...i,...t]){const t=yield n.computeLabelsBBox({hideWhenNecessary:l},e);t&&c.push(t)}if(0===c.length)return void n(o,r,s);const u=Pc.merge(c),d=this.refineCircle(u,a,e);n(d.centerX,d.centerY,d.radius),d.radius!==a&&(a=d.radius)}));return yield l(),yield l(),yield l(),yield l({hideWhenNecessary:!0}),yield l({hideWhenNecessary:!0}),{radius:a,centerX:o,centerY:r}}))}refineCircle(e,t,i){const n=.5,o=-t,r=-t,s=t,a=t;let l=Math.max(0,o-e.x),c=Math.max(0,r-e.y),u=Math.max(0,e.x+e.width-s),d=Math.max(0,e.y+e.height-a);l=u=Math.max(l,u),c=d=Math.max(c,d);const p=i.width-l-u,h=i.height-c-d;let f=Math.min(p,h)/2;const g=n*i.width/2,v=n*i.height/2,y=Math.min(g,v);if(f<y){f=y;const e=l+u,t=c+d;if(2*f+t>i.height){const e=i.height-2*f;2*Math.min(c,d)>e?(c=e/2,d=e/2):c>d?c=e-d:d=e-c}if(2*f+e>i.width){const e=i.width-2*f;2*Math.min(l,u)>e?(l=e/2,u=e/2):l>u?l=e-u:u=e-l}}const m=l+2*f+u,C=c+2*f+d;return{centerX:i.x+(i.width-m)/2+l+f,centerY:i.y+(i.height-C)/2+c+f,radius:f}}}Kw.className="PolarChart",Kw.type="polar";const Yw=Ia.create(!0,"opts");function qw(e){if(Zy(e))return"cartesian";if(Qy(e))return"polar";if(Jy(e))return"hierarchy";throw new Error(`AG Chart - unknown type of chart for options with type: ${e.type}`)}class Xw{static licenseCheck(e){var t,i,n;this.licenseChecked||(this.licenseManager=null===(t=ya.licenseManager)||void 0===t?void 0:t.call(ya,e),null===(i=this.licenseManager)||void 0===i||i.setLicenseKey(this.licenseKey),null===(n=this.licenseManager)||void 0===n||n.validateLicense(),this.licenseChecked=!0)}static setLicenseKey(e){this.licenseKey=e}static create(e){var t,i,n;this.licenseCheck(e);const o=$w.createOrUpdate(e);return(null===(t=this.licenseManager)||void 0===t?void 0:t.isDisplayWatermark())&&(null===(i=ya.injectWatermark)||void 0===i||i.call(ya,null!==(n=e.document)&&void 0!==n?n:document,o.chart.element,this.licenseManager.getWatermarkMessage())),o}static update(e,t){if(!Nv.isInstance(e))throw new Error(Xw.INVALID_CHART_REF_MESSAGE);$w.createOrUpdate(t,e)}static updateDelta(e,t){if(!Nv.isInstance(e))throw new Error(Xw.INVALID_CHART_REF_MESSAGE);$w.updateUserDelta(e,t)}static download(e,t){if(!(e instanceof Nv))throw new Error(Xw.INVALID_CHART_REF_MESSAGE);$w.download(e,t)}static getImageDataURL(e,t){if(!(e instanceof Nv))throw new Error(Xw.INVALID_CHART_REF_MESSAGE);return $w.getImageDataURL(e,t)}}Xw.INVALID_CHART_REF_MESSAGE="AG Charts - invalid chart reference passed",Xw.licenseChecked=!1;class $w{static initialiseModules(){$w.initialised||(UC(),xb(),$w.initialised=!0)}static createOrUpdate(e,t){var i,n;$w.initialiseModules(),Yw(">>> AgChartV2.createOrUpdate() user options",e);const{overrideDevicePixelRatio:o,document:r,window:s}=e,a=ha(e,["overrideDevicePixelRatio","document","window"]),l={overrideDevicePixelRatio:o,document:r,window:s},c=Mw(a);let u=null===t||void 0===t?void 0:t.chart;null!=u&&qw(a)===qw(u.processedOptions)||(u=$w.createChartInstance(c,l,u)),null==t?t=new Nv(u):t.chart=u,Ia.check()&&"undefined"!==typeof window&&(null!==(i=(n=window).agChartInstances)&&void 0!==i||(n.agChartInstances={}),window.agChartInstances[u.id]=u);const d=u;d.queuedUserOptions.push(a);const p=()=>{const e=d.queuedUserOptions.indexOf(a);d.queuedUserOptions.splice(0,e)};return d.requestFactoryUpdate((()=>va(this,void 0,void 0,(function*(){if(d.destroyed)return;const e=Ua(d.processedOptions,c);null!=e?(yield $w.updateDelta(d,e,a),p()):p()})))),t}static updateUserDelta(e,t){var i;const{chart:n,chart:{queuedUserOptions:o}}=e,r=null!==(i=o[o.length-1])&&void 0!==i?i:n.userOptions,s=Ya([r,t]);Yw(">>
18> AgChartV2.updateUserDelta() user delta",t),Yw("AgChartV2.updateUserDelta() - base options",r),$w.createOrUpdate(s,e)}static download(e,t){const i=()=>va(this,void 0,void 0,(function*(){const i=yield $w.prepareResizedChart(e,t),{chart:n}=i;n.scene.download(null===t||void 0===t?void 0:t.fileName,null===t||void 0===t?void 0:t.fileFormat),i!==e&&i.destroy()}));i().catch((e=>Pa.errorOnce(e)))}static getImageDataURL(e,t){return va(this,void 0,void 0,(function*(){const i=yield $w.prepareResizedChart(e,t),{chart:n}=i,o=n.scene.canvas.getDataURL(null===t||void 0===t?void 0:t.fileFormat);return i!==e&&i.destroy(),o}))}static prepareResizedChart(e,t){var i;return va(this,void 0,void 0,(function*(){const{chart:n}=e;let{width:o,height:r}=null!==t&&void 0!==t?t:{};const s=n.width,a=n.height,l=void 0===o&&void 0===r||1===n.scene.canvas.pixelRatio&&s===o&&a===r;if(l)return e;null!==o&&void 0!==o||(o=s),null!==r&&void 0!==r||(r=a);const c=Object.assign(Object.assign({},n.userOptions),{container:document.createElement("div"),width:o,height:r,autoSize:!1,overrideDevicePixelRatio:1});wa()&&(null!==(i=c.animation)&&void 0!==i||(c.animation={}),c.animation.enabled=!1);const u=$w.createOrUpdate(c);return yield u.chart.waitForUpdate(),u}))}static createChartInstance(e,t,i){const n=null===i||void 0===i?void 0:i.destroy({keepTransferableResources:!0});if(Zy(e))return new kv(t,n);if(Jy(e))return new Ob(t,n);if(Qy(e))return new Kw(t,n);throw new Error("AG Charts - couldn't apply configuration, check options are correctly structured and series types are specified")}static updateDelta(e,t,i){var n;return va(this,void 0,void 0,(function*(){null==t.type&&(t=Object.assign(Object.assign({},t),{type:null!==(n=e.processedOptions.type)&&void 0!==n?n:$y(t)})),e.destroyed||(Yw("AgChartV2.updateDelta() - applying delta",t),Zw(e,t,i))}))}}function Zw(e,t,i){var n,o,r,s;const a=Ya([null!==(n=e.processedOptions)&&void 0!==n?n:{},t],_w),l=Jw(e,a),c=["type","data","series","listeners","theme","legend.listeners"];if(Zy(t)||Qy(t))c.push("axes");else if(!Jy(t))throw new Error(`AG Charts - couldn't apply configuration, check type of options and chart: ${t["type"]}`);t.listeners&&rS(e,t.listeners),sS(e,t,{skip:c});let u=!1,d=!1;if(t.series&&t.series.length>0&&(d=Qw(e,t),u=!0),"axes"in a&&Array.isArray(a.axes)){const t=eS(e,a,d);t&&(u=!0)}const p=t.series,h=!!t.data||(null===p||void 0===p?void 0:p.some((e=>null!=e.data))),f=py(),g=Object.values(f).some((e=>null!=t[e])),v=null!=t.title&&null!=t.subtitle;u=u||h||g||v,t.data&&(e.data=t.data),(null===(o=t.legend)||void 0===o?void 0:o.listeners)&&Object.assign(e.legend.listeners,null!==(r=t.legend.listeners)&&void 0!==r?r:{}),t.listeners&&e.updateAllSeriesListeners(),e.processedOptions=a,e.userOptions=Ya([null!==(s=e.userOptions)&&void 0!==s?s:{},i],_w);const y=u||l,m=y?lg.PROCESS_DATA:lg.PERFORM_LAYOUT;Yw("AgChartV2.applyChartOptions() - update type",lg[m]),e.update(m,{forceNodeDataRefresh:u,newAnimationBatch:!0})}function Jw(e,t){const i=t=>e instanceof kv&&t.chartTypes.includes("cartesian")||e instanceof Kw&&t.chartTypes.includes("polar")||e instanceof Ob&&t.chartTypes.includes("hierarchy");let n=!1;const o=(o,r,s)=>{const a=Ca.filter((e=>e.type===o));for(const l of a){const o=i(l)&&null!=t[l.optionsKey],a=e.isModuleEnabled(l);o!==a&&(n=!0,o?r(l):s(l))}};return o("root",(t=>e.addModule(t)),(t=>e.removeModule(t))),o("legend",(t=>e.addLegendModule(t)),(t=>e.removeLegendModule(t))),n}function Qw(e,t){const i=t.series;if(!i)return!1;const n=["type","direction","xKey","yKey","sizeKey","angleKey","stacked","stackGroup"];let o=e.series.length===i.length;for(let r=0;r<e.series.length&&o;r++)for(const t of n)o&&(o=e.series[r][t]===i[r][t]);return o?(e.series.forEach(((t,n)=>{var o,r,s,a;const l=null!==(s=null===(r=null===(o=e.processedOptions)||void 0===o?void 0:o.series)||void 0===r?void 0:r[n])&&void 0!==s?s:{},c=Ua(l,null!==(a=i[n])&&void 0!==a?a:{});c&&(Yw(`AgChartV2.applySeries() - applying series diff idx ${n}`,c),aS(t,c,{path:`series[${n}]`,index:n}),t.markNodeDataDirty())})),!1):(Yw("AgChartV2.applySeries() - creating new series instances"),e.series=tS(e,i),!0)}function eS(e,t,i){const n=t.axes;if(!n)return!1;const o=!i&&e.axes.length===n.length&&e.axes.every(((e,t)=>e.type===n[t].type));if(o){const t=e.processedOptions;
18if(Zy(t))return e.axes.forEach(((e,i)=>{var o,r;const s=null!==(r=null===(o=t.axes)||void 0===o?void 0:o[i])&&void 0!==r?r:{},a=Ua(s,n[i]);Yw(`AgChartV2.applyAxes() - applying axis diff idx ${i}`,a);const l=`axes[${i}]`,c=["axes[].type"];sS(e,a,{path:l,skip:c})})),!0}return e.axes=nS(e,n),!0}function tS(e,t){var i;const n=[],o=e.getModuleContext();let r=0;for(const s of null!==t&&void 0!==t?t:[]){const e=`series[${r++}]`,t=null!==(i=s.type)&&void 0!==i?i:"unknown";if(ey(t)&&!iy(t))continue;const a=ab(t,o);iS(a,s),aS(a,s,{path:e,index:r}),n.push(a)}return n}function iS(e,t){const i=Ca.filter((e=>"series-option"===e.type));for(const n of i){const i=n.seriesTypes;n.optionsKey in t&&i.includes(e.type)&&e.getModuleMap().addModule(n)}}function nS(e,t){const i=[],n=["axes[].type"],o=e.getModuleContext();let r=0;for(const s of null!==t&&void 0!==t?t:[]){const e=qv(s.type,o),t=`axes[${r++}]`;oS(e,s),sS(e,s,{path:t,skip:n}),i.push(e)}return i}function oS(e,t){let i=!1;const n=Ca.filter((e=>"axis-option"===e.type));for(const o of n){const n=null!=t[o.optionsKey],r=e.getModuleMap(),s=r.isModuleEnabled(o);n!==s&&(i=!0,n?r.addModule(o):r.removeModule(o))}return i}function rS(e,t){e.clearEventListeners();const i=Object.entries(null!==t&&void 0!==t?t:{});for(const[n,o]of i)"function"===typeof o&&e.addEventListener(n,o)}function sS(e,t,{skip:i,path:n}={}){const o=Object.assign(Object.assign(Object.assign({},Rh()),{skip:i}),n?{path:n}:{});return qa(e,t,o)}function aS(e,t,{path:i,index:n}={}){var o,r;const s=["series[].listeners","series[].seriesGrouping"],a=Rh(),l=null!==(o=a.constructors)&&void 0!==o?o:{},c={constructors:Object.assign(Object.assign({},l),{title:"pie"===e.type?wh:l["title"]})},u=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},a),c),{skip:["series[].type",...null!==s&&void 0!==s?s:[]]}),i?{path:i}:{}),{idx:null!==n&&void 0!==n?n:-1}),d=qa(e,t,u);null!=(null===t||void 0===t?void 0:t.listeners)&&rS(e,t.listeners);const{seriesGrouping:p}=t;return"seriesGrouping"in(null!==t&&void 0!==t?t:{})&&(e.seriesGrouping=p?Object.freeze(Object.assign(Object.assign({},null!==(r=e.seriesGrouping)&&void 0!==r?r:{}),p)):p),d}$w.initialised=!1;const lS="9.0.0",cS=Object.entries(Ow).reduce(((e,[t,i])=>(e[t]=i(),e)),{});var uS=Object.freeze({__proto__:null,themes:cS,getChartTheme:Rw,ChartTheme:kb,EXTENDS_CHART_DEFAULTS:rm,EXTENDS_LEGEND_DEFAULTS:sm,EXTENDS_LEGEND_ITEM_DEFAULTS:am,EXTENDS_LEGEND_ITEM_MARKER_DEFAULTS:lm,EXTENDS_AXES_DEFAULTS:cm,EXTENDS_AXES_LABEL_DEFAULTS:um,EXTENDS_AXES_LINE_DEFAULTS:dm,EXTENDS_AXES_TICK_DEFAULTS:pm,EXTENDS_AXES_GRID_LINE_DEFAULTS:hm,EXTENDS_SERIES_DEFAULTS:fm,EXTENDS_CARTESIAN_MARKER_DEFAULTS:gm,OVERRIDE_SERIES_LABEL_DEFAULTS:vm,DEFAULT_FONT_FAMILY:ym,DEFAULT_LABEL_COLOUR:mm,DEFAULT_INVERTED_LABEL_COLOUR:Cm,DEFAULT_INSIDE_SERIES_LABEL_COLOUR:bm,DEFAULT_MUTED_LABEL_COLOUR:wm,DEFAULT_AXIS_GRID_COLOUR:Sm,DEFAULT_AXIS_LINE_COLOUR:Em,DEFAULT_CROSS_LINES_COLOUR:xm,DEFAULT_BACKGROUND_COLOUR:Om,DEFAULT_SHADOW_COLOUR:Tm,DEFAULT_WATERFALL_SERIES_POSITIVE_COLOURS:Dm,DEFAULT_WATERFALL_SERIES_NEGATIVE_COLOURS:Rm,DEFAULT_WATERFALL_SERIES_TOTAL_COLOURS:Am,DEFAULT_WATERFALL_SERIES_CONNECTOR_LINE_STROKE:_m,DEFAULT_POLAR_SERIES_STROKE:Pm,DEFAULT_DIVERGING_SERIES_COLOUR_RANGE:Mm,DEFAULT_HIERARCHY_FILLS:km,DEFAULT_HIERARCHY_STROKES:Nm,FONT_SIZE:Oy,BOLD:Ty,NORMAL:Dy,BOTTOM:Ry,CARTESIAN_AXIS_POSITIONS:Py,CARTESIAN_AXIS_TYPES:Iy,POLAR_AXIS_TYPES:jy,CIRCLE:Hy}),dS=["area","bar","column","histogram","line","pie","scatter","bubble"],pS=new Set(["bar","groupedBar","stackedBar","normalizedBar"]);function hS(e){return pS.has(e)}var fS=new Set(["stackedColumn","normalizedColumn","stackedBar","normalizedBar"]);function gS(e){return fS.has(e)}function vS(e){switch(e){case"bar":case"groupedBar":case"stackedBar":case"normalizedBar":return"bar";case"column":case"groupedColumn":case"stackedColumn":case"normalizedColumn":return"bar";case"line":return"line";case"area":case"stackedArea":case"normalizedArea":return"area";case"bubble":return"bubble";case"scatter":return"scatter";case"histogram":return"histogram";case"pie":case"doughnut":return"pie";default:return"cartesian"}}var yS=["number","category","grouped-category","log","time"];function mS(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}}var CS=function(){return CS=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},CS.apply(this,arguments)};function bS(e,t){var i,o=e.chartOptionsToRestore,r=e.chartPaletteToRestore,s=e.chartThemeToRestore,a=TS(e),l=SS(a),c=l?{baseTheme:a}:null!==(i=DS(e,a))&&void 0!==i?i:{},u=e.getGridOptionsChartThemeOverrides(),d=e.apiChartThemeOverrides,p=vS(e.chartType),h="pie"===p?"pie":"cartesian",f=e.crossFiltering?ES(t,e,h):void 0,g=CS({},null!==o&&void 0!==o?o:{}),v=function(){var e=function(e){return!!e&&Object.keys(e).some((function(t){return n._.get(e[t],"title.enabled",!1)}))};return e(u)||e(d)},y=[l?OS(e,v()):void 0,f,u,d,g],m=y.filter((function(e){return!!e})).reduce((function(e,t){return{baseTheme:e,overrides:t}}),c);if(r&&a===s){var C=uS.getChartTheme(c).palette;wS(r,C)||(m.palette=r)}return m}function wS(e,t){var i=function(e,t){return e.length===t.length&&e.every((function(e,i){return e===t[i]}))};return i(e.fills,t.fills)&&i(e.strokes,t.strokes)}function SS(e){return n._.includes(Object.keys(uS.themes),e)}function ES(e,t,i){var n,o={listeners:{legendItemClick:function(t){var i=e.getChart();
18i.series.forEach((function(e){e.toggleSeriesItem(t.itemId,t.enabled),e.toggleSeriesItem("".concat(t.itemId,"-filtered-out"),t.enabled)}))}}},r={};return n={},n[i]={tooltip:{delay:500},legend:o,listeners:{click:function(e){return t.crossFilterCallback(e,!0)}},series:r},n}var xS=yS.reduce((function(e,t){var i;return CS(CS({},e),(i={},i[t]={title:{_enabledFromTheme:!0}},i))}),{});function OS(e,t){var i=e.getExtraPaddingDirections();return{common:{axes:xS,padding:{top:!t&&i.includes("top")?40:20,right:i.includes("right")?30:20,bottom:i.includes("bottom")?40:20,left:i.includes("left")?30:20}},pie:{series:{title:{_enabledFromTheme:!0},calloutLabel:{_enabledFromTheme:!0},sectorLabel:{enabled:!1,_enabledFromTheme:!0}}}}}function TS(e){var t=e.getChartThemeName(),i=e.getChartThemes();return n._.includes(i,t)||(t=i[0]),t}function DS(e,t){var i=e.customChartThemes,n=i&&i[t];return n||console.warn("AG Grid: no stock theme exists with the name '".concat(t,"' and no ")+"custom chart theme with that name was supplied to 'customChartThemes'"),n}var RS=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},AS=function(e,t,i){if(i||2===arguments.length)for(var n,o=0,r=t.length;o<r;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},_S=function(e){var t="function"===typeof Symbol&&Symbol.iterator,i=t&&e[t],n=0;if(i)return i.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},PS=function(e){return function(t){return void 0===t||e(t)}},MS=function(e){return"string"===typeof e},kS=function(e){return"boolean"===typeof e},NS=function(e){return"object"===typeof e},LS=function(e,t){return function(i){return"AG Grid - unable to update chart as invalid params supplied:  `".concat(e,": ").concat(i,"`, expected ").concat(t,".")}},IS=function(){function e(){}return e.validateChartParams=function(t){var i=t;switch(i.type){case"rangeChartUpdate":return e.validateUpdateRangeChartParams(t);case"pivotChartUpdate":return e.validateUpdatePivotChartParams(t);case"crossFilterChartUpdate":return e.validateUpdateCrossFilterChartParams(t);default:return console.warn("AG Grid - Invalid value supplied for 'type': ".concat(t.type,". It must be either 'rangeChartUpdate', 'pivotChartUpdate', or 'crossFilterChartUpdate'.")),!1}},e.validateUpdateRangeChartParams=function(t){var i=AS(AS(AS([],RS(e.commonValidations),!1),RS(e.cellRangeValidations),!1),[{property:"seriesChartTypes",validationFn:function(e){return void 0===e||Array.isArray(e)&&e.every(NS)},warnMessage:LS("seriesChartTypes","Array of SeriesChartType")}],!1);return e.validateProperties(t,i,["type","chartId","chartType","chartThemeName","chartThemeOverrides","unlinkChart","cellRange","suppressChartRanges","aggFunc","seriesChartTypes"],"UpdateRangeChartParams")},e.validateUpdatePivotChartParams=function(t){var i=AS([],RS(e.commonValidations),!1);return e.validateProperties(t,i,["type","chartId","chartType","chartThemeName","chartThemeOverrides","unlinkChart"],"UpdatePivotChartParams")},e.validateUpdateCrossFilterChartParams=function(t){var i=AS(AS([],RS(e.commonValidations),!1),RS(e.cellRangeValidations),!1);return e.validateProperties(t,i,["type","chartId","chartType","chartThemeName","chartThemeOverrides","unlinkChart","cellRange","suppressChartRanges","aggFunc"],"UpdateCrossFilterChartParams")},e.validateProperties=function(e,t,i,n){var o,r;try{for(var s=_S(t),a=s.next();!a.done;a=s.next()){var l=a.value,c=l.property,u=l.validationFn,d=l.warnMessage;if(c in e){var p=e[c];if(!u(p))return console.warn(d(p)),!1}}}catch(h){o={error:h}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(o)throw o.error}}for(var c in e)if(!i.includes(c))return console.warn("AG Grid - 
18Unexpected property supplied. ".concat(n," does not contain: `").concat(c,"`.")),!1;return!0},e.validChartTypes=["column","groupedColumn","stackedColumn","normalizedColumn","bar","groupedBar","stackedBar","normalizedBar","line","scatter","bubble","pie","doughnut","area","stackedArea","normalizedArea","histogram","columnLineCombo","areaColumnCombo","customCombo"],e.validateChartType=PS((function(t){return e.validChartTypes.includes(t)})),e.validateAgChartThemeOverrides=PS((function(e){return"object"===typeof e})),e.validateChartParamsCellRange=PS((function(e){return"object"===typeof e})),e.validateAggFunc=PS((function(e){return"string"===typeof e||"function"===typeof e})),e.commonValidations=[{property:"chartId",validationFn:MS,warnMessage:LS("chartId","string")},{property:"chartType",validationFn:e.validateChartType,warnMessage:LS("chartType",e.validChartTypes.join(", "))},{property:"chartThemeName",validationFn:MS,warnMessage:LS("chartThemeName","string")},{property:"chartThemeOverrides",validationFn:e.validateAgChartThemeOverrides,warnMessage:LS("chartThemeOverrides","AgChartThemeOverrides")},{property:"unlinkChart",validationFn:kS,warnMessage:LS("unlinkChart","boolean")}],e.cellRangeValidations=[{property:"cellRange",validationFn:e.validateChartParamsCellRange,warnMessage:LS("cellRange","ChartParamsCellRange")},{property:"suppressChartRanges",validationFn:kS,warnMessage:LS("suppressChartRanges","boolean")},{property:"aggFunc",validationFn:e.validateAggFunc,warnMessage:LS("aggFunc","string or IAggFunc")}],e}(),FS=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),GS=function(){return GS=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},GS.apply(this,arguments)},VS=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},BS=["ag-default","ag-material","ag-sheets","ag-polychroma","ag-vivid"],jS=function(e){function t(t){var i=e.call(this)||this;return i.model=t,i}return FS(t,e),t.prototype.init=function(){var e=this;this.setChartRange(),this.addManagedListener(this.eventService,n.zW2.EVENT_RANGE_SELECTION_CHANGED,(function(t){t.id&&t.id===e.model.chartId&&e.updateForRangeChange()})),this.model.unlinked&&this.rangeService&&this.rangeService.setCellRanges([]),this.addManagedListener(this.eventService,n.zW2.EVENT_COLUMN_MOVED,this.updateForGridChange.bind(this)),this.addManagedListener(this.eventService,n.zW2.EVENT_COLUMN_PINNED,this.updateForGridChange.bind(this)),this.addManagedListener(this.eventService,n.zW2.EVENT_COLUMN_VISIBLE,this.updateForGridChange.bind(this)),this.addManagedListener(this.eventService,n.zW2.EVENT_COLUMN_ROW_GROUP_CHANGED,this.updateForGridChange.bind(this)),this.addManagedListener(this.eventService,n.zW2.EVENT_MODEL_UPDATED,this.updateForGridChange.bind(this)),this.addManagedListener(this.eventService,n.zW2.EVENT_CELL_VALUE_CHANGED,this.updateForDataChange.bind(this))},t.prototype.update=function(e){var t,i,n,o,r,s,a;if(!this.validUpdateType(e)||!IS.validateChartParams(e))return!1;var l=e.chartId,c=e.chartType,u=e.chartThemeName,d=e.unlinkChart,p={chartId:l,pivotChart:this.model.pivotChart,chartType:null!==c&&void 0!==c?c:this.model.chartType,chartThemeName:null!==u&&void 0!==u?u:this.model.chartThemeName,unlinkChart:null!==d&&void 0!==d?d:this.model.unlinked,cellRange:this.model.suppliedCellRange,aggFunc:this.model.aggFunc,seriesChartTypes:void 0,suppressChartRanges:!1,crossFiltering:!1},h=GS({},p);switch(e.type){case"rangeChartUpdate":h.cellRange=null!==(t=this.createCellRange(e))&&void 0!==t?t:this.model.suppliedCellRange,h.aggFunc=null!==(i=e.aggFunc)&&void 0!==i?i:this.model.aggFunc,h.seriesChartTypes=e.seriesChartTypes,h.suppressChartRanges=null!==(n=e.suppressChartRanges)&&void 0!==n?n:this.model.suppressChartRanges;break;case"crossFilterChartUpdate":h.cellRange=null!==(o=this.createCellRange(e))&&void 0!==o?o:this.model.suppliedCellRange,h.aggFunc=null!==(r=e.aggFunc)&&void 0!==r?r:this.model.aggFunc,h.crossFiltering=!0,h.suppressChartRanges=null!==(s=e.suppressChartRanges)&&void 0!==s?s:this.model.suppressChartRanges;break}this.model.updateModel(h);var f=h.unlinkChart||h.suppressChartRanges;return f?null===(a=this.rangeService)||void 0===a||a.setCellRanges([]):this.setChartRange(),!0},t.prototype.updateForGridChange=function(){this.model.unlinked||(this.model.updateCellRanges(),this.model.updateData(),this.setChartRange())},t.prototype.updateForDataChange=function(){this.model.unlinked||(this.model.updateData(),this.raiseChartModelUpdateEvent())},t.prototype.updateForRangeChange=function(){this.updateForGridChange(),this.raiseChartRangeSelectionChangedEvent()},t.prototype.updateForPanelChange=function(e){this.model.updateCellRanges(e),this.model.updateData(),this.setChartRange(),this.raiseChartRangeSelectionChangedEvent()},t.prototype.getChartUpdateParams=function(e){var t=this.getSelectedValueColState(),i=t.map((function(e){return{colId:e.colId,displayName:e.displayName}})),n=this.getChartData(),o=this.getSelectedDimension();
18return{data:n,grouping:this.isGrouping(),category:{id:o.colId,name:o.displayName,chartDataType:this.model.getChartDataType(o.colId)},fields:i,chartId:this.getChartId(),getCrossFilteringContext:function(){return{lastSelectedChartId:"xxx"}},seriesChartTypes:this.getSeriesChartTypes(),updatedOverrides:e}},t.prototype.getChartModel=function(){var 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(),suppressChartRanges:this.model.suppressChartRanges,aggFunc:this.model.aggFunc,unlinkChart:this.model.unlinked,seriesChartTypes:t}},t.prototype.getChartId=function(){return this.model.chartId},t.prototype.getChartData=function(){return this.model.chartData},t.prototype.getChartType=function(){return this.model.chartType},t.prototype.setChartType=function(e){this.model.chartType=e,this.model.comboChartModel.updateSeriesChartTypes(),this.raiseChartModelUpdateEvent(),this.raiseChartOptionsChangedEvent()},t.prototype.setChartThemeName=function(e,t){this.model.chartThemeName=e,t||(this.raiseChartModelUpdateEvent(),this.raiseChartOptionsChangedEvent())},t.prototype.getChartThemeName=function(){return this.model.chartThemeName},t.prototype.isPivotChart=function(){return this.model.pivotChart},t.prototype.isPivotMode=function(){return this.model.isPivotMode()},t.prototype.isGrouping=function(){return this.model.isGrouping()},t.prototype.isCrossFilterChart=function(){return this.model.crossFiltering},t.prototype.getThemes=function(){return this.gridOptionsService.get("chartThemes")||BS},t.prototype.getPalettes=function(){var e=this,t=this.getThemes();return t.map((function(t){var i=SS(t),n=i?t:e.chartProxy.lookupCustomChartTheme(t);return uS.getChartTheme(n).palette}))},t.prototype.getValueColState=function(){return this.model.valueColState.map(this.displayNameMapper.bind(this))},t.prototype.getSelectedValueColState=function(){return this.getValueColState().filter((function(e){return e.selected}))},t.prototype.getSelectedDimension=function(){return this.model.getSelectedDimension()},t.prototype.displayNameMapper=function(e){var t=this.model.columnNames[e.colId];return e.displayName=t?t.join(" - "):this.model.getColDisplayName(e.column),e},t.prototype.getColStateForMenu=function(){return{dimensionCols:this.model.dimensionColState,valueCols:this.getValueColState()}},t.prototype.setChartRange=function(e){void 0===e&&(e=!1),!this.rangeService||this.model.suppressChartRanges||this.model.unlinked||this.rangeService.setCellRanges(this.getCellRanges()),e||this.raiseChartModelUpdateEvent()},t.prototype.detachChartRange=function(){this.model.unlinked=!this.model.unlinked,this.model.unlinked?this.rangeService&&this.rangeService.setCellRanges([]):this.updateForGridChange()},t.prototype.setChartProxy=function(e){this.chartProxy=e},t.prototype.getChartProxy=function(){return this.chartProxy},t.prototype.isActiveXYChart=function(){return n._.includes(["scatter","bubble"],this.getChartType())},t.prototype.isChartLinked=function(){return!this.model.unlinked},t.prototype.customComboExists=function(){var e=this.model.comboChartModel.savedCustomSeriesChartTypes;return e&&e.length>0},t.prototype.getSeriesChartTypes=function(){return this.model.comboChartModel.seriesChartTypes},t.prototype.isComboChart=function(){return this.model.isComboChart()},t.prototype.updateSeriesChartType=function(e,i,n){var o=this.model.comboChartModel.seriesChartTypes.find((function(t){return t.colId===e}));if(o){var r="customCombo"!==this.model.chartType;r&&(this.model.chartType="customCombo");var s=o.chartType;null!=i&&(o.chartType=i),null!=n&&(o.secondaryAxis=n),this.model.comboChartModel.savedCustomSeriesChartTypes=this.model.comboChartModel.seriesChartTypes,this.model.comboChartModel.updateSeriesChartTypes(),this.updateForDataChange(),r&&this.dispatchEvent({type:t.EVENT_CHART_TYPE_CHANGED}),s!==i&&this.dispatchEvent({type:t.EVENT_CHART_SERIES_CHART_TYPE_CHANGED}),this.raiseChartOptionsChangedEvent()}},t.prototype.getActiveSeriesChartTypes=function(){var e=this.getSelectedValueColState().map((function(e){return e.colId}));
18return this.getSeriesChartTypes().filter((function(t){return e.includes(t.colId)}))},t.prototype.getChartSeriesTypes=function(){var e=["line","column","area"];return this.isComboChart()?e:[vS(this.getChartType())]},t.prototype.getCellRanges=function(){return[this.model.dimensionCellRange,this.model.valueCellRange].filter((function(e){return e}))},t.prototype.createCellRange=function(e){var t;return e.cellRange&&(null===(t=this.rangeService)||void 0===t?void 0:t.createCellRangeFromCellRangeParams(e.cellRange))},t.prototype.validUpdateType=function(e){var t,i=this;if(!e.type)return console.warn("AG Grid - Unable to update chart as the 'type' is missing. It must be either 'rangeChartUpdate', 'pivotChartUpdate', or 'crossFilterChartUpdate'."),!1;var n={"Range Chart":function(){return!i.isPivotChart()&&!i.isCrossFilterChart()},"Pivot Chart":function(){return i.isPivotChart()},"Cross Filter Chart":function(){return i.isCrossFilterChart()}},o=null!==(t=Object.keys(n).find((function(e){return n[e]()})))&&void 0!==t?t:"Range Chart",r=e.type==="".concat(o[0].toLowerCase()).concat(o.slice(1).replace(/ /g,""),"Update");return r||console.warn("AG Grid - Unable to update chart as a '".concat(e.type,"' update type is not permitted on a ").concat(o,".")),r},t.prototype.getCellRangeParams=function(){var e=this.getCellRanges(),t=e[0],i=t&&t.startRow||null,n=t&&t.endRow||null;return{rowStartIndex:i&&i.rowIndex,rowStartPinned:i&&i.rowPinned,rowEndIndex:n&&n.rowIndex,rowEndPinned:n&&n.rowPinned,columns:e.reduce((function(e,t){return e.concat(t.columns.map((function(e){return e.getId()})))}),[])}},t.prototype.raiseChartModelUpdateEvent=function(){var e={type:t.EVENT_CHART_MODEL_UPDATE};this.dispatchEvent(e)},t.prototype.raiseChartUpdatedEvent=function(){var e={type:t.EVENT_CHART_UPDATED};this.dispatchEvent(e)},t.prototype.raiseChartApiUpdateEvent=function(){var e={type:t.EVENT_CHART_API_UPDATE};this.dispatchEvent(e)},t.prototype.raiseChartOptionsChangedEvent=function(){var e=this.getChartModel(),t=e.chartId,i=e.chartType,o={type:n.zW2.EVENT_CHART_OPTIONS_CHANGED,chartId:t,chartType:i,chartThemeName:this.getChartThemeName(),chartOptions:this.chartProxy.getChartThemeOverrides()};this.eventService.dispatchEvent(o)},t.prototype.raiseChartRangeSelectionChangedEvent=function(){var e={type:n.zW2.EVENT_CHART_RANGE_SELECTION_CHANGED,id:this.model.chartId,chartId:this.model.chartId,cellRange:this.getCellRangeParams()};this.eventService.dispatchEvent(e)},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.rangeService&&this.rangeService.setCellRanges([])},t.EVENT_CHART_UPDATED="chartUpdated",t.EVENT_CHART_API_UPDATE="chartApiUpdate",t.EVENT_CHART_MODEL_UPDATE="chartModelUpdate",t.EVENT_CHART_TYPE_CHANGED="chartTypeChanged",t.EVENT_CHART_SERIES_CHART_TYPE_CHANGED="chartSeriesChartTypeChanged",VS([(0,n.fsG)("rangeService")],t.prototype,"rangeService",void 0),VS([n.NqP],t.prototype,"init",null),t}(n.AS9),HS=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),WS=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},US=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},zS=function(e,t,i){if(i||2===arguments.length)for(var n,o=0,r=t.length;o<r;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},KS=function(e){var t="function"===typeof Symbol&&Symbol.iterator,i=t&&e[t],n=0;if(i)return i.call(e);
18if(e&&"number"===typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},YS={groups:[{type:"categories",isOpen:!0},{type:"series",isOpen:!0},{type:"seriesChartType",isOpen:!0}]},qS=function(e){function t(i,n){var o=e.call(this,t.TEMPLATE)||this;return o.chartController=i,o.chartOptionsService=n,o.columnComps=new Map,o}return HS(t,e),t.prototype.init=function(){this.updatePanels(),this.addManagedListener(this.chartController,jS.EVENT_CHART_MODEL_UPDATE,this.updatePanels.bind(this)),this.addManagedListener(this.chartController,jS.EVENT_CHART_API_UPDATE,this.updatePanels.bind(this)),this.createAutoScrollService()},t.prototype.destroy=function(){this.clearComponents(),e.prototype.destroy.call(this)},t.prototype.updatePanels=function(){var e,t,i=this,o=this.chartType,r=this.chartController.getColStateForMenu(),s=r.dimensionCols,a=r.valueCols,l=s.map((function(e){return e.colId})).concat(a.map((function(e){return e.colId})));this.chartType=this.chartController.getChartType();var c=this.getGroupExpandedState();if(n._.areEqual(n._.keys(this.columnComps),l)&&this.chartType===o){if(zS(zS([],US(s),!1),US(a),!1).forEach((function(e){i.columnComps.get(e.colId).setValue(e.selected,!0)})),this.chartController.isActiveXYChart()){var u=this.generateGetSeriesLabel();a.forEach((function(e){i.columnComps.get(e.colId).setLabel(u(e))}))}n._.removeFromParent(this.getGui().querySelector("#seriesChartTypeGroup")),this.seriesChartTypeGroupComp=this.destroyBean(this.seriesChartTypeGroupComp);var d=null===(e=this.getDataPanelDef().groups)||void 0===e?void 0:e.reduce((function(e,t,i){var n=t.type;return"seriesChartType"===n?i:e}),-1);-1!==d&&this.createSeriesChartTypeGroup(a,d)}else this.clearComponents(),null===(t=this.getDataPanelDef().groups)||void 0===t||t.forEach((function(e){var t=e.type;"categories"===t?i.createCategoriesGroup(s):"series"===t?i.createSeriesGroup(a):"seriesChartType"===t?i.createSeriesChartTypeGroup(a):console.warn("AG Grid: invalid charts data panel group name supplied: '".concat(t,"'"))}));this.restoreGroupExpandedState(c)},t.prototype.getGroupExpandedState=function(){var e=this,t=[{groupType:"categories",comp:this.categoriesGroupComp},{groupType:"series",comp:this.seriesGroupComp},{groupType:"seriesChartType",comp:this.seriesChartTypeGroupComp}];return t.map((function(t){var i,n,o=t.groupType,r=t.comp,s=Boolean(null===(n=null===(i=e.getDataPanelDef().groups)||void 0===i?void 0:i.find((function(e){var t=e.type;return t===o})))||void 0===n?void 0:n.isOpen);return r?r.isExpanded():s}))},t.prototype.restoreGroupExpandedState=function(e){[this.categoriesGroupComp,this.seriesGroupComp,this.seriesChartTypeGroupComp].forEach((function(t,i){t&&t.toggleGroupExpand(e[i])}))},t.prototype.createAutoScrollService=function(){var e=this.getGui();this.autoScrollService=new n.Cvn({scrollContainer:e,scrollAxis:"y",getVerticalPosition:function(){return e.scrollTop},setVerticalPosition:function(t){return e.scrollTop=t}})},t.prototype.createComponent=function(e,t){var i=document.createElement("div");return i.id=t,i.className="ag-chart-data-section",i.appendChild(e.getGui()),i},t.prototype.addComponent=function(e,t,i){var n=this.createComponent(t,i);e.appendChild(n)},t.prototype.addComponentAtIndex=function(e,t,i,n){var o=this.createComponent(t,i);e.insertBefore(o,e.children[n])},t.prototype.addChangeListener=function(e,t){var i=this;this.addManagedListener(e,n.zW2.EVENT_FIELD_VALUE_CHANGED,(function(){t.selected=e.getValue(),i.chartController.updateForPanelChange(t)}))},t.prototype.createCategoriesGroup=function(e){var t=this;this.categoriesGroupComp=this.createBean(new n.H1u({title:this.getCategoryGroupTitle(),enabled:!0,suppressEnabledCheckbox:!0,suppressOpenCloseIcons:!1,cssIdentifier:"charts-data"}));var i="chartDimension".concat(this.getCompId());e.forEach((function(e){var o=t.categoriesGroupComp.createManagedBean(new n.LQq);o.setLabel(n._.escapeString(e.displayName)),o.setValue(e.selected),o.setInputName(i),t.addChangeListener(o,e),t.categoriesGroupComp.addItem(o),t.columnComps.set(e.colId,o)})),this.addComponent(this.getGui(),this.categoriesGroupComp,"categoriesGroup")},t.prototype.createSeriesGroup=function(e){var t=this;if(this.seriesGroupComp=this.createManagedBean(new n.H1u({title:this.getSeriesGroupTitle(),enabled:!0,suppressEnabledCheckbox:!0,suppressOpenCloseIcons:!1,cssIdentifier:"charts-data"})),this.chartController.isActiveXYChart()){var i=this.seriesGroupComp.createManagedBean(new n.nN0);i.setLabel(this.chartTranslationService.translate("paired")).setLabelAlignment("left").setLabelWidth("flex").setInputWidth("flex").setValue(this.chartOptionsService.getPairedMode()).onValueChange((function(e){t.chartOptionsService.setPairedMode(!!e),t.chartController.updateForGridChange()})),this.seriesGroupComp.addItem(i)}var o=this.generateGetSeriesLabel();e.forEach((function(e){var i=t.seriesGroupComp.createManagedBean(new n.jkc);i.addCssClass("ag-data-select-checkbox");var r=o(e);i.setLabel(r),i.setValue(e.selected),t.addChangeListener(i,e),t.seriesGroupComp.addItem(i),t.columnComps.set(e.colId,i),t.addDragHandle(i,e)}));var r=this.getGui(),s=this.seriesGroupComp.getGui();this.addComponent(r,this.seriesGroupComp,"seriesGroup");var a={getIconName:function(){return n.jUB.ICON_MOVE},getContainer:function(){return s},onDragging:function(e){return t.onDragging(e)},onDragLeave:function(){return t.onDragLeave()},isInterestedIn:this.isInterestedIn.bind(this),targetContainsSource:!0};this.dragAndDropService.addDropTarget(a),this.addDestroyFunc((function(){return t.dragAndDropService.removeDropTarget(a)}))},t.prototype.createSeriesChartTypeGroup=function(e,t){var i=this;if(this.chartController.isComboChart()){this.seriesChartTypeGroupComp=this.createManagedBean(new n.H1u({title:this.chartTranslationService.translate("seriesChartType"),enabled:!0,suppressEnabledCheckbox:!0,suppressOpenCloseIcons:!1,cssIdentifier:"charts-data"}));var o=this.chartController.getSeriesChartTypes();e.forEach((function(e){if(e.selected){var t=o.filter((function(t){return t.colId===e.colId}))[0];if(t){var r=i.seriesChartTypeGroupComp.createManagedBean(new n.H1u({title:e.displayName,enabled:!0,suppressEnabledCheckbox:!0,suppressOpenCloseIcons:!0,cssIdentifier:"charts-format-sub-level"})),s=i.seriesChartTypeGroupComp.createManagedBean(new n.jkc).setLabel(i.chartTranslationService.translate("secondaryAxis")).setLabelWidth("flex").setDisabled(["groupedColumn","stackedColumn","stackedArea"].includes(t.chartType)).setValue(!!t.secondaryAxis).onValueChange((function(t){return i.chartController.updateSeriesChartType(e.colId,void 0,t)}));r.addItem(s);var a=function(e,t){return i.chartTranslationService.translate(e,t)},l=[{value:"line",text:a("line","Line")},{value:"area",text:a("area","Area")},{value:"stackedArea",text:a("stackedArea","StackedArea")},{value:"groupedColumn",text:a("groupedColumn","Grouped Column")},{value:"stackedColumn",text:a("stackedColumn","Stacked Column")}],c=r.createManagedBean(new n.wGv);c.setLabelAlignment("left").setLabelWidth("flex").addOptions(l).setValue(t.chartType).onValueChange((function(t){return i.chartController.updateSeriesChartType(e.colId,t)})),r.addItem(c),i.seriesChartTypeGroupComp.addItem(r)}}})),void 0===t?this.addComponent(this.getGui(),this.seriesChartTypeGroupComp,"seriesChartTypeGroup"):this.addComponentAtIndex(this.getGui(),this.seriesChartTypeGroupComp,"seriesChartTypeGroup",t)}},t.prototype.addDragHandle=function(e,t){var i=this,o=n._.createIconNoSpan("columnDrag",this.gridOptionsService);o.classList.add("ag-drag-handle","ag-chart-data-column-drag-handle"),e.getGui().insertAdjacentElement("beforeend",o);var r={type:n.rvo.ChartPanel,eElement:o,dragItemName:t.displayName,getDragItem:function(){return{columns:[t.column]}},onDragStopped:function(){return i.onDragStop()}};this.dragAndDropService.addDragSource(r,!0),this.addDestroyFunc((function(){return i.dragAndDropService.removeDragSource(r)}))},t.prototype.generateGetSeriesLabel=function(){if(!this.chartController.isActiveXYChart())return function(e){return n._.escapeString(e.dis
18playName)};var e="bubble"===this.chartType,t=this.isInPairedMode(),i=0,o=new Map;return o.set(0,"X"),o.set(1,"Y"),o.set(2,"size"),function(r){var s,a=n._.escapeString(r.displayName);return r.selected?(s=t?o.get(i%(e?3:2)):0===i?"X":e&&i%2===0?"size":"Y",i++,"".concat(a," (").concat(s,")")):a}},t.prototype.getCategoryGroupTitle=function(){return this.chartTranslationService.translate(this.chartController.isActiveXYChart()?"labels":"categories")},t.prototype.getSeriesGroupTitle=function(){return this.chartTranslationService.translate(this.chartController.isActiveXYChart()?"xyValues":"series")},t.prototype.getDataPanelDef=function(){var e,t=null===(e=this.gridOptionsService.get("chartToolPanelsDef"))||void 0===e?void 0:e.dataPanel;return t||YS},t.prototype.isInPairedMode=function(){return this.chartController.isActiveXYChart()&&this.chartOptionsService.getSeriesOption("paired","scatter")},t.prototype.clearComponents=function(){n._.clearElement(this.getGui()),this.categoriesGroupComp=this.destroyBean(this.categoriesGroupComp),this.seriesGroupComp=this.destroyBean(this.seriesGroupComp),this.seriesChartTypeGroupComp=this.destroyBean(this.seriesChartTypeGroupComp),this.columnComps.clear()},t.prototype.onDragging=function(e){var t=this.checkHoveredItem(e);if(t){this.lastDraggedColumn=e.dragItem.columns[0];var i=t.comp,n=t.position,o=this.lastHoveredItem||{},r=o.comp,s=o.position;if(i!==r||n!==s){this.autoScrollService.check(e.event),this.clearHoveredItems(),this.lastHoveredItem={comp:i,position:n};var a=i.getGui();a.classList.add("ag-list-item-hovered","ag-item-highlight-".concat(n))}}},t.prototype.checkHoveredItem=function(e){var t,i;if(n._.missing(e.vDirection))return null;var o=e.event;try{for(var r=KS(this.columnComps.values()),s=r.next();!s.done;s=r.next()){var a=s.value,l=a.getGui();if(l.querySelector(".ag-chart-data-column-drag-handle")){var c=l.getBoundingClientRect(),u=o.clientY>=c.top&&o.clientY<=c.bottom;if(u){var d=l.clientHeight,p=o.clientY>c.top+d/2?"bottom":"top";return{comp:a,position:p}}}}}catch(h){t={error:h}}finally{try{s&&!s.done&&(i=r.return)&&i.call(r)}finally{if(t)throw t.error}}return null},t.prototype.onDragLeave=function(){this.clearHoveredItems()},t.prototype.onDragStop=function(){var e=this;if(this.lastHoveredItem){var t=this.chartController.getColStateForMenu(),i=t.dimensionCols,n=t.valueCols,o=zS(zS([],US(i),!1),US(n),!1).find((function(t){return t.column===e.lastDraggedColumn}));if(o){var r=Array.from(this.columnComps.values()).indexOf(this.lastHoveredItem.comp);"bottom"===this.lastHoveredItem.position&&r++,o.order=r,this.chartController.updateForPanelChange(o)}}this.clearHoveredItems(),this.lastDraggedColumn=void 0,this.autoScrollService.ensureCleared()},t.prototype.clearHoveredItems=function(){this.columnComps.forEach((function(e){e.getGui().classList.remove("ag-list-item-hovered","ag-item-highlight-top","ag-item-highlight-bottom")})),this.lastHoveredItem=void 0},t.prototype.isInterestedIn=function(e){return e===n.rvo.ChartPanel},t.TEMPLATE='<div class="ag-chart-data-wrapper ag-scrollable-container"></div>',WS([(0,n.fsG)("dragAndDropService")],t.prototype,"dragAndDropService",void 0),WS([(0,n.fsG)("chartTranslationService")],t.prototype,"chartTranslationService",void 0),WS([n.NqP],t.prototype,"init",null),t}(n.wA2),XS=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),$S=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},ZS=function(e){function t(t){var i=e.call(this)||this;return i.activeComps=[],i.params=t,i}return XS(t,e),t.prototype.init=function(){var e={cssIdentifier:"charts-format-sub-level",direction:"vertical",suppressOpenCloseIcons:!0};this.setTemplate(t.TEMPLATE,{fontGroup:e}),this.initGroup(),this.initFontFamilySelect(),this.initFontWeightStyleSelect(),this.initFontSizeSelect(),this.initFontColorPicker()},t.prototype.addCompToPanel=function(e){this.fontGroup.addItem(e),this.activeComps.push(e)},t.prototype.setEnabled=function(e){this.fontGroup.setEnabled(e)},t.prototype.initGroup=function(){var e=this;this.fontGroup.setTitle(this.params.name||this.chartTranslationService.translate("font")).setEnabled(this.params.enabled).hideEnabledCheckbox(!!this.params.suppressEnabledCheckbox).hideOpenCloseIcons(!0).onEnableChange((function(t){e.params.setEnabled&&e.params.setEnabled(t)}))},t.prototype.initFontFamilySelect=function(){var e=this,t=["Arial, sans-serif","Aria Black, sans-serif","Book Antiqua,  serif","Charc
18oal, 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"],i=this.params.initialFont.family,o=t[0];if(i){var r=t.map((function(e){return e.toLowerCase()})),s=r.indexOf(i.toLowerCase());if(s>=0)o=t[s];else{var a=n._.capitalise(i);t.push(a),o=a}}var l=t.sort().map((function(e){return{value:e,text:e}}));this.familySelect.addOptions(l).setInputWidth("flex").setValue("".concat(o)).onValueChange((function(t){return e.params.setFont({family:t})}))},t.prototype.initFontSizeSelect=function(){var e=this,t=[8,10,12,14,16,18,20,22,24,26,28,30,32,34,36],i=this.params.initialFont.size;n._.includes(t,i)||t.push(i);var o=t.sort((function(e,t){return e-t})).map((function(e){return{value:"".concat(e),text:"".concat(e)}}));this.sizeSelect.addOptions(o).setInputWidth("flex").setValue("".concat(i)).onValueChange((function(t){return e.params.setFont({size:parseInt(t,10)})})),this.sizeSelect.setLabel(this.chartTranslationService.translate("size"))},t.prototype.initFontWeightStyleSelect=function(){var e=this,t=this.params.initialFont,i=t.weight,n=void 0===i?"normal":i,o=t.style,r=void 0===o?"normal":o,s=[{name:"normal",weight:"normal",style:"normal"},{name:"bold",weight:"bold",style:"normal"},{name:"italic",weight:"normal",style:"italic"},{name:"boldItalic",weight:"bold",style:"italic"}],a=s.find((function(e){return e.weight===n&&e.style===r}));a||(a={name:"predefined",weight:n,style:r},s.unshift(a));var l=s.map((function(t){return{value:t.name,text:e.chartTranslationService.translate(t.name)}}));this.weightStyleSelect.addOptions(l).setInputWidth("flex").setValue(a.name).onValueChange((function(t){var i=s.find((function(e){return e.name===t}));e.params.setFont({weight:i.weight,style:i.style})}))},t.prototype.initFontColorPicker=function(){var e=this;this.colorPicker.setLabel(this.chartTranslationService.translate("color")).setInputWidth("flex").setValue("".concat(this.params.initialFont.color)).onValueChange((function(t){return e.params.setFont({color:t})}))},t.prototype.addItemToPanel=function(e){this.fontGroup.addItem(e),this.activeComps.push(e)},t.prototype.destroyActiveComps=function(){var e=this;this.activeComps.forEach((function(t){n._.removeFromParent(t.getGui()),e.destroyBean(t)}))},t.prototype.destroy=function(){this.destroyActiveComps(),e.prototype.destroy.call(this)},t.TEMPLATE='<div class="ag-font-panel">\n            <ag-group-component ref="fontGroup">\n                <ag-select ref="familySelect"></ag-select>\n                <ag-select ref="weightStyleSelect"></ag-select>\n                <div class="ag-charts-font-size-color">\n                    <ag-select ref="sizeSelect"></ag-select>\n                    <ag-color-picker ref="colorPicker"></ag-color-picker>\n                </div>\n            </ag-group-component>\n        </div>',$S([(0,n.cqo)("fontGroup")],t.prototype,"fontGroup",void 0),$S([(0,n.cqo)("familySelect")],t.prototype,"familySelect",void 0),$S([(0,n.cqo)("weightStyleSelect")],t.prototype,"weightStyleSelect",void 0),$S([(0,n.cqo)("sizeSelect")],t.prototype,"sizeSelect",void 0),$S([(0,n.cqo)("colorPicker")],t.prototype,"colorPicker",void 0),$S([(0,n.fsG)("chartTranslationService")],t.prototype,"chartTranslationService",void 0),$S([n.NqP],t.prototype,"init",null),t}(n.wA2),JS=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),QS=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},eE=function(e){function t(t){var i=t.chartOptionsService,n=t.isExpandedOnInit,o=void 0!==n&&n,r=e.call(this)||this;return r.activePanels=[],r.chartOptionsService=i,r.isExpandedOnInit=o,r}return JS(t,e),t.prototype.init=function(){var e={cssIdentifier:"charts-format-top-level",direction:"vertical"};this.setTemplate(t.TEMPLATE,{legendGroup:e}),this.initLegendGroup(),this.initLegendPosition(),this.initLegendPadding(),this.initLegendItems(),this.initLabelPanel()},t.prototype.initLegendGroup=function(){var e=this;this.legendGroup.setTitle(this.chartTranslationService.translate("legend")).hideEnabledCheckbox(!1).setEnabled(this.chartOptionsService.getChartOption("legend.enabled")||!1).toggleGroupExpand(this.isExpandedOnInit).onEnableChange((function(t){e.chartOptionsService.setChartOption("legend.enabled",t),e.legendGroup.toggleGroupExpand(!0)}))},t.prototype.initLegendPosition=function(){var e=this,t=["top","right","bottom","left"];this.legendPositionSelect.setLabel(this.chartTranslationService.translate("position")).setLabelWidth("flex").setInputWidth("flex").addOptions(t.map((function(t){return{value:t,text:e.chartTranslationService.translate(t)}
18}))).setValue(this.chartOptionsService.getChartOption("legend.position")).onValueChange((function(t){return e.chartOptionsService.setChartOption("legend.position",t)}))},t.prototype.initLegendPadding=function(){var e=this,t=this.chartOptionsService.getChartOption("legend.spacing");this.legendPaddingSlider.setLabel(this.chartTranslationService.translate("spacing")).setMaxValue(BE(t,200)).setValue("".concat(t)).setTextFieldWidth(45).onValueChange((function(t){return e.chartOptionsService.setChartOption("legend.spacing",t)}))},t.prototype.initLegendItems=function(){var e=this,t=function(t,i,n,o){var r=e.chartOptionsService.getChartOption("legend.".concat(t));n.setLabel(e.chartTranslationService.translate(i)).setMaxValue(BE(r,o)).setValue("".concat(r)).setTextFieldWidth(45).onValueChange((function(i){e.chartOptionsService.setChartOption("legend.".concat(t),i)}))};t("item.marker.size","markerSize",this.markerSizeSlider,40),t("item.marker.strokeWidth","markerStroke",this.markerStrokeSlider,10),t("item.marker.padding","itemSpacing",this.markerPaddingSlider,20),t("item.paddingX","layoutHorizontalSpacing",this.itemPaddingXSlider,50),t("item.paddingY","layoutVerticalSpacing",this.itemPaddingYSlider,50)},t.prototype.initLabelPanel=function(){var e=this,t=this.chartOptionsService,i={family:t.getChartOption("legend.item.label.fontFamily"),style:t.getChartOption("legend.item.label.fontStyle"),weight:t.getChartOption("legend.item.label.fontWeight"),size:t.getChartOption("legend.item.label.fontSize"),color:t.getChartOption("legend.item.label.color")},n=function(t){var i=e.chartOptionsService;t.family&&i.setChartOption("legend.item.label.fontFamily",t.family),t.weight&&i.setChartOption("legend.item.label.fontWeight",t.weight),t.style&&i.setChartOption("legend.item.label.fontStyle",t.style),t.size&&i.setChartOption("legend.item.label.fontSize",t.size),t.color&&i.setChartOption("legend.item.label.color",t.color)},o={enabled:!0,suppressEnabledCheckbox:!0,initialFont:i,setFont:n},r=this.createBean(new ZS(o));this.legendGroup.addItem(r),this.activePanels.push(r)},t.prototype.destroyActivePanels=function(){var e=this;this.activePanels.forEach((function(t){n._.removeFromParent(t.getGui()),e.destroyBean(t)}))},t.prototype.destroy=function(){this.destroyActivePanels(),e.prototype.destroy.call(this)},t.TEMPLATE='<div>\n            <ag-group-component ref="legendGroup">\n                <ag-select ref="legendPositionSelect"></ag-select>\n                <ag-slider ref="legendPaddingSlider"></ag-slider>\n                <ag-slider ref="markerSizeSlider"></ag-slider>\n                <ag-slider ref="markerStrokeSlider"></ag-slider>\n                <ag-slider ref="markerPaddingSlider"></ag-slider>\n                <ag-slider ref="itemPaddingXSlider"></ag-slider>\n                <ag-slider ref="itemPaddingYSlider"></ag-slider>\n            </ag-group-component>\n        </div>',QS([(0,n.cqo)("legendGroup")],t.prototype,"legendGroup",void 0),QS([(0,n.cqo)("legendPositionSelect")],t.prototype,"legendPositionSelect",void 0),QS([(0,n.cqo)("legendPaddingSlider")],t.prototype,"legendPaddingSlider",void 0),QS([(0,n.cqo)("markerSizeSlider")],t.prototype,"markerSizeSlider",void 0),QS([(0,n.cqo)("markerStrokeSlider")],t.prototype,"markerStrokeSlider",void 0),QS([(0,n.cqo)("markerPaddingSlider")],t.prototype,"markerPaddingSlider",void 0),QS([(0,n.cqo)("itemPaddingXSlider")],t.prototype,"itemPaddingXSlider",void 0),QS([(0,n.cqo)("itemPaddingYSlider")],t.prototype,"itemPaddingYSlider",void 0),QS([(0,n.fsG)("chartTranslationService")],t.prototype,"chartTranslationService",void 0),QS([n.NqP],t.prototype,"init",null),t}(n.wA2),tE=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),iE=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},nE=function(e){function t(t){var i=e.call(this)||this;return i.chartOptionsService=t,i}return tE(t,e),t.prototype.init=function(){var e={cssIdentifier:"charts-format-sub-level",direction:"vertical",suppressOpenCloseIcons:!0};this.setTemplate(t.TEMPLATE,{axisTicksGroup:e}),this.initAxisTicks()},t.prototype.initAxisTicks=function(){var e=this;this.axisTicksGroup.setTitle(this.chartTranslationService.translate("ticks")).hideOpenCloseIcons(!0).hideEnabledCheckbox(!0),this.axisTicksColorPicker.setLabel(this.chartTranslationService.translate("color")).setLabelWidth("flex").setInputWidth("flex").setValue(this.chartOptionsService.getAxisProperty("tick.color")).onValueChange((function(t){return e.chartOptionsService.setAxisProperty("tick.color",t)}));var t=function(t,i,n,o){var r=e.chartOptionsService.getAxisProperty(t);i.setLabel(n).setMaxValue(BE(r,o)).setValue("".concat(r)).setTextFieldWidth(45).onValueChange((function(i){return e.chartOptionsService.setAxisProperty(t,i)}))};t("tick.width",this.axisTicksWidthSlider,this.chartTranslationService.translate("width"),10),t("tick.size",this.axisTicksSizeSlider,this.chartTranslationService.translate("length"),30)},t.TEMPLATE='<div>\n            <ag-group-component ref="axisTicksGroup">\n                <ag-color-picker ref="axisTicksColorPicker"></ag-color-picker>\n                <ag-slider ref="axisTicksWidthSlider"></ag-slider>\n                <ag-slider ref="axisTicksSizeSlider"></ag-slider>\n            </ag-group-component>\n        </div>',iE([(0,n.cqo)("axisTicksGroup")],t.prototype,"axisTicksGroup",void 0),iE([(0,n.cqo)("axisTicksColorPicker")],t.prototype,"axisTicksColorPicker",void 0),iE([(0,n.cqo)("axisTicksWidthSlider")],t.prototype,"axisTicksWidthSlider",void 0),iE([(0,n.cqo)("axisTicksSizeSlider")],t.prototype,"axisTicksSizeSlider",void 0),iE([(0,n.fsG)("chartTranslationService")],t.prototype,"chartTranslationService",void 0),iE([n.NqP],t.prototype,"init",null),t}(n.wA2),oE=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),rE=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},sE=function(e){function t(i){var n=e.call(this,i,t.TEMPLATE)||this;return n.radius=0,n.offsetX=0,n.offsetY=0,n}return oE(t,e),t.prototype.postConstruct=function(){var t=this;e.prototype.postConstruct.call(this),this.dragListener={eElement:this.eParentCircle,dragStartPixels:0,onDragStart:function(e){t.parentCircleRect=t.eParentCircle.getBoundingClientRect()},onDragging:function(e){return t.calculateAngleDrag(e)},onDragStop:function(){}},this.dragService.addDragSource(this.dragListener),this.eAngleValue.setLabel("").setLabelWidth(5).setInputWidth(45).setMin(0).setMax(360).setValue("".concat(this.degrees)).onValueChange((function(e){null!=e&&""!==e||(e="0"),e=t.eAngleValue.normalizeValue(e);var i=parseFloat(e);i>180&&(i-=360),t.setValue(i)})),this.updateNumberInput(),n._.exists(this.getValue())&&this.eAngleValue.setValue(this.normalizeNegativeValue(this.getValue()).toString()),this.addManagedListener(this,n.zW2.EVENT_FIELD_VALUE_CHANGED,(function(){var e=t.gridOptionsService.getDocument();t.eAngleValue.getInputElement().contains(e.activeElement)||t.updateNumberInput()}))},t.prototype.updateNumberInput=function(){var e=this.normalizeNegativeValue(this.getValue());this.eAngleValue.setValue(e.toString())},t.prototype.positionChildCircle=function(e){var t=this.parentCircleRect||{width:24,height:24},i=this.eChildCircle,n=t.width/2,o=t.height/2;i.style.left="".concat(n+8*Math.cos(e),"px"),i.style.top="".concat(o+8*Math.sin(e),"px")}
18,t.prototype.calculatePolar=function(){var 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)},t.prototype.calculateCartesian=function(){var e=this.toRadians(this.getValue()),t=this.getRadius();this.setOffsetX(Math.cos(e)*t).setOffsetY(Math.sin(e)*t)},t.prototype.setOffsetX=function(e){return this.offsetX!==e&&(this.offsetX=e,this.calculatePolar()),this},t.prototype.setOffsetY=function(e){return this.offsetY!==e&&(this.offsetY=e,this.calculatePolar()),this},t.prototype.calculateAngleDrag=function(e){var t=this.parentCircleRect,i=t.width/2,n=t.height/2,o=e.clientX-t.left,r=e.clientY-t.top,s=o-i,a=r-n,l=Math.atan2(a,s);this.setValue(l,!0)},t.prototype.toDegrees=function(e){return e/Math.PI*180},t.prototype.toRadians=function(e){return e/180*Math.PI},t.prototype.normalizeNegativeValue=function(e){return e<0?360+e:e},t.prototype.normalizeAngle180=function(e){return e%=2*Math.PI,e<-Math.PI?e+=2*Math.PI:e>=Math.PI&&(e-=2*Math.PI),e},t.prototype.getRadius=function(){return this.radius},t.prototype.setRadius=function(e){return this.radius===e||(this.radius=e,this.calculateCartesian()),this},t.prototype.onValueChange=function(e){var t=this;return this.addManagedListener(this,n.zW2.EVENT_FIELD_VALUE_CHANGED,(function(){e(t.degrees)})),this},t.prototype.getValue=function(e){return e?this.toRadians(this.degrees):this.degrees},t.prototype.setValue=function(e,t){var i;return i=t?e:this.normalizeAngle180(this.toRadians(e)),e=this.toDegrees(i),this.degrees!==e&&(this.degrees=Math.floor(e),this.calculateCartesian(),this.positionChildCircle(i),this.dispatchEvent({type:n.zW2.EVENT_FIELD_VALUE_CHANGED})),this},t.prototype.setWidth=function(e){return n._.setFixedWidth(this.getGui(),e),this},t.prototype.setDisabled=function(t){return e.prototype.setDisabled.call(this,t),this.eAngleValue.setDisabled(t),this},t.prototype.destroy=function(){this.dragService.removeDragSource(this.dragListener),e.prototype.destroy.call(this)},t.TEMPLATE='<div class="ag-angle-select">\n            <div ref="eLabel"></div>\n            <div class="ag-wrapper ag-angle-select-wrapper">\n                <div ref="eAngleSelectField" class="ag-angle-select-field">\n                    <div ref="eParentCircle" class="ag-angle-select-parent-circle">\n                        <div ref="eChildCircle" class="ag-angle-select-child-circle"></div>\n                    </div>\n                </div>\n                <ag-input-number-field ref="eAngleValue"></ag-input-number-field>\n            </div>\n        </div>',rE([(0,n.cqo)("eLabel")],t.prototype,"eLabel",void 0),rE([(0,n.cqo)("eParentCircle")],t.prototype,"eParentCircle",void 0),rE([(0,n.cqo)("eChildCircle")],t.prototype,"eChildCircle",void 0),rE([(0,n.cqo)("eAngleValue")],t.prototype,"eAngleValue",void 0),rE([(0,n.fsG)("dragService")],t.prototype,"dragService",void 0),t}(n.ZST),aE=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),lE=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},cE=function(e){function t(t){var i=t.chartController,n=t.chartOptionsService,o=t.isExpandedOnInit,r=void 0!==o&&o,s=e.call(this)||this;return s.activePanels=[],s.axisLabelUpdateFuncs=[],s.prevXRotation=0,s.prevYRotation=0,s.chartController=i,s.chartOptionsService=n,s.isExpandedOnInit=r,s}return aE(t,e),t.prototype.init=function(){var e=this,i={cssIdentifier:"charts-format-top-level",direction:"vertical"};this.setTemplate(t.TEMPLATE,{axisGroup:i}),this.initAxis(),this.initAxisTicks(),this.initAxisLabels();var n=function(){return e.axisLabelUpdateFuncs.forEach((function(e){return e()}))};this.addManagedListener(this.chartController,jS.EVENT_CHART_UPDATED,n)},t.prototype.initAxis=function(){var e=this;this.axisGroup.setTitle(this.translate("axis")).toggleGroupExpand(this.isExpandedOnInit).hideEnabledCheckbox(!0),this.axisColorInput.setLabel(this.translate("color")).setLabelWidth("flex").setInputWidth("flex").setValue(this.chartOptionsService.getAxisProperty("line.color")).onValueChange((function(t){return e.chartOptionsService.setAxisProperty("line.color",t)}));var t=this.chartOptionsService.getAxisProperty("line.width");
18this.axisLineWidthSlider.setMaxValue(BE(t,10)).setLabel(this.translate("thickness")).setTextFieldWidth(45).setValue("".concat(t)).onValueChange((function(t){return e.chartOptionsService.setAxisProperty("line.width",t)}))},t.prototype.initAxisTicks=function(){var e=this.createBean(new nE(this.chartOptionsService));this.axisGroup.addItem(e),this.activePanels.push(e)},t.prototype.initAxisLabels=function(){var e=this,t={family:this.chartOptionsService.getAxisProperty("label.fontFamily"),style:this.chartOptionsService.getAxisProperty("label.fontStyle"),weight:this.chartOptionsService.getAxisProperty("label.fontWeight"),size:this.chartOptionsService.getAxisProperty("label.fontSize"),color:this.chartOptionsService.getAxisProperty("label.color")},i=function(t){t.family&&e.chartOptionsService.setAxisProperty("label.fontFamily",t.family),t.weight&&e.chartOptionsService.setAxisProperty("label.fontWeight",t.weight),t.style&&e.chartOptionsService.setAxisProperty("label.fontStyle",t.style),t.size&&e.chartOptionsService.setAxisProperty("label.fontSize",t.size),t.color&&e.chartOptionsService.setAxisProperty("label.color",t.color)},n={name:this.translate("labels"),enabled:!0,suppressEnabledCheckbox:!0,initialFont:t,setFont:i},o=this.createBean(new ZS(n));this.axisGroup.addItem(o),this.activePanels.push(o),this.addAdditionalLabelComps(o)},t.prototype.addAdditionalLabelComps=function(e){this.addLabelPadding(e);var t=this.createRotationWidgets(),i=t.xRotationComp,n=t.yRotationComp,o=this.initLabelRotations(i,n);e.addCompToPanel(o),e.addCompToPanel(i),e.addCompToPanel(n)},t.prototype.initLabelRotations=function(e,t){var i=this,o=function(e){return i.chartOptionsService.getLabelRotation(e)},r=function(e,t){i.chartOptionsService.setLabelRotation(e,t)},s=function(n){i.chartOptionsService.setAxisProperty("label.autoRotate",n),n?(i.prevXRotation=o("xAxis"),i.prevYRotation=o("yAxis"),r("xAxis",void 0),r("yAxis",void 0)):(r("xAxis",i.prevXRotation),r("yAxis",i.prevYRotation)),e.setDisabled(n),t.setDisabled(n)},a=function(){var e=o("xAxis"),t=o("yAxis");return void 0==e&&void 0==t&&i.chartOptionsService.getAxisProperty("label.autoRotate")},l=a(),c=this.createBean(new n.jkc).setLabel(this.translate("autoRotate")).setValue(l).onValueChange(s);return e.setDisabled(l),t.setDisabled(l),c},t.prototype.createRotationWidgets=function(){var e=this,t=String.fromCharCode(176),i=function(i,n){var o="".concat(e.chartTranslationService.translate(i)," ").concat(t),r=e.chartOptionsService.getLabelRotation(n),s=(new sE).setLabel(o).setLabelWidth("flex").setValue(r||0).onValueChange((function(t){return e.chartOptionsService.setLabelRotation(n,t)}));return e.axisLabelUpdateFuncs.push((function(){var t=e.chartOptionsService.getLabelRotation(n);s.setValue(t||0)})),e.createBean(s)};return{xRotationComp:i("xRotation","xAxis"),yRotationComp:i("yRotation","yAxis")}},t.prototype.addLabelPadding=function(e){var t=this,i=this.createBean(new n.h7_),o=this.chartOptionsService.getAxisProperty("label.padding");i.setLabel(this.chartTranslationService.translate("padding")).setMaxValue(BE(o,30)).setValue("".concat(o)).setTextFieldWidth(45).onValueChange((function(e){return t.chartOptionsService.setAxisProperty("label.padding",e)})),e.addCompToPanel(i)},t.prototype.translate=function(e,t){return this.chartTranslationService.translate(e,t)},t.prototype.destroyActivePanels=function(){var e=this;this.activePanels.forEach((function(t){n._.removeFromParent(t.getGui()),e.destroyBean(t)}))},t.prototype.destroy=function(){this.destroyActivePanels(),e.prototype.destroy.call(this)},t.TEMPLATE='<div>\n            <ag-group-component ref="axisGroup">\n                <ag-color-picker ref="axisColorInput"></ag-color-picker>\n                <ag-slider ref="axisLineWidthSlider"></ag-slider>\n            </ag-group-component>\n        </div>',lE([(0,n.cqo)("axisGroup")],t.prototype,"axisGroup",void 0),lE([(0,n.cqo)("axisColorInput")],t.prototype,"axisColorInput",void 0),lE([(0,n.cqo)("axisLineWidthSlider")],t.prototype,"axisLineWidthSlider",void 0),lE([(0,n.fsG)("chartTranslationService")],t.prototype,"chartTranslationService",void 0),lE([n.NqP],t.prototype,"init",null),t}(n.wA2),uE=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),dE=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},pE=function(e){function t(t){var i=t.chartOptionsService,n=t.isExpandedOnInit,o=void 0!==n&&n,r=e.call(this)||this;return r.chartOptionsService=i,r.isExpandedOnInit=o,r}return uE(t,e),t.prototype.init=function(){var e={cssIdentifier:"charts-format-top-level",direction:"vertical"};this.setTemplate(t.TEMPLATE,{navigatorGroup:e}),this.initNavigator()},t.prototype.initNavigator=function(){var e=this,t=this.chartTranslationService;this.navigatorGroup.setTitle(t.translate("navigator")).hideEnabledCheckbox(!1).setEnabled(this.chartOptionsService.getChartOption("navigator.enabled")||!1).onEnableChange((function(t){e.chartOptionsService.setChartOption("navigator.enabled",t),e.navigatorGroup.toggleGroupExpand(!0)})).toggleGroupExpand(this.isExpandedOnInit);var i=this.chartOptionsService.getChartOption("navigator.height");this.navigatorHeightSlider.setLabel(t.translate("height")).setMinValue(10).setMaxValue(BE(i,60)).setTextFieldWidth(45).setValue("".concat(i||30)).onValueChange((function(t){return e.chartOptionsService.setChartOption("navigator.height",t)}))},t.prototype.destroy=function(){e.prototype.destroy.call(this)},t.TEMPLATE='<div>\n            <ag-group-component ref="navigatorGroup">\n                <ag-slider ref="navigatorHeightSlider"></ag-slider>\n            </ag-group-component>\n        </div>',dE([(0,n.cqo)("navigatorGroup")],t.prototype,"navigatorGroup",void 0),dE([(0,n.cqo)("navigatorHeightSlider")],t.prototype,"navigatorHeightSlider",void 0),dE([(0,n.fsG)("chartTranslationService")],t.prototype,"chartTranslationService",void 0),dE([n.NqP],t.prototype,"init",null),t}(n.wA2),hE=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),fE=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},gE=function(e){function t(t,i){var n=e.call(this)||this;return n.chartOptionsService=t,n.chartController=i,n}return hE(t,e),t.prototype.init=function(){var e=this,i={cssIdentifier:"charts-format-sub-level",direction:"vertical",suppressOpenCloseIcons:!0};this.setTemplate(t.TEMPLATE,{chartPaddingGroup:i}),this.addManagedListener(this.eventService,n.zW2.EVENT_CHART_OPTIONS_CHANGED,(function(t){e.updateTopPadding(t.chartOptions)})),this.initGroup(),this.initChartPaddingItems()},t.prototype.initGroup=function(){this.chartPaddingGroup.setTitle(this.chartTranslationService.translate("padding")).hideOpenCloseIcons(!0).hideEnabledCheckbox(!0)},t.prototype.initChartPaddingItems=function(){var e=this,t=function(t,i){var n=e.chartOptionsService.getChartOption("padding."+t);i.setLabel(e.chartTranslationService.translate(t)).setMaxValue(BE(n,200)).setValue("".concat(n)).setTextFieldWidth(45).onValueChange((function(i){return e.chartOptionsService.setChartOption("padding."+t,i)}))};t("top",this.paddingTopSlider),t("right",this.paddingRightSlider),t("bottom",this.paddingBottomSlider),t("left",this.paddingLeftSlider)},t.prototype.updateTopPadding=function(e){var t,i,n=this.chartController.getChartSeriesTypes()[0],o=null===(i=null===(t=e[n])||void 0===t?void 0:t.padding)||void 0===i?void 0:i.top;null!=o&&this.paddingTopSlider.setValue(o)},t.TEMPLATE='<div>\n            <ag-group-component ref="chartPaddingGroup">\n                <ag-slider ref="paddingTopSlider"></ag-slider>\n                <ag-slider ref="paddingRightSlider"></ag-slider>\n                <ag-slider ref="paddingBottomSlider"></ag-slider>\n                <ag-slider ref="paddingLeftSlider"></ag-slider>\n            </ag-group-component>\n        <div>',fE([(0,n.cqo)("chartPaddingGroup")],t.prototype,"chartPaddingGroup",void 0),fE([(0,n.cqo)("paddingTopSlider")],t.prototype,"paddingTopSlider",void 0),fE([(0,n.cqo)("paddingRightSlider")],t.prototype,"paddingRightSlider",void 0),fE([(0,n.cqo)("paddingBottomSlider")],t.prototype,"paddingBottomSlider",void 0),fE([(0,n.cqo)("paddingLeftSlider")],t.prototype,"paddingLeftSlider",void 0),fE([(0,n.fsG)("chartTranslationService")],t.prototype,"chartTranslationService",void 0),fE([n.NqP],t.prototype,"init",null),t}(n.wA2),vE=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),yE=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},mE=function(e){function t(t){var i=e.call(this)||this;return i.chartOptionsService=t,i}return vE(t,e),t.prototype.init=function(){var e={cssIdentifier:"charts-format-sub-level",direction:"vertical",suppressOpenCloseIcons:!0};
18this.setTemplate(t.TEMPLATE,{chartBackgroundGroup:e}),this.initGroup(),this.initColorPicker()},t.prototype.initGroup=function(){var e=this;this.group.setTitle(this.chartTranslationService.translate("background")).setEnabled(this.chartOptionsService.getChartOption("background.visible")).hideOpenCloseIcons(!0).hideEnabledCheckbox(!1).onEnableChange((function(t){return e.chartOptionsService.setChartOption("background.visible",t)}))},t.prototype.initColorPicker=function(){var e=this;this.colorPicker.setLabel(this.chartTranslationService.translate("color")).setLabelWidth("flex").setInputWidth("flex").setValue(this.chartOptionsService.getChartOption("background.fill")).onValueChange((function(t){return e.chartOptionsService.setChartOption("background.fill",t)}))},t.TEMPLATE='<div>\n            <ag-group-component ref="chartBackgroundGroup">\n                <ag-color-picker ref="colorPicker"></ag-color-picker>\n            </ag-group-component>\n        <div>',yE([(0,n.cqo)("chartBackgroundGroup")],t.prototype,"group",void 0),yE([(0,n.cqo)("colorPicker")],t.prototype,"colorPicker",void 0),yE([(0,n.fsG)("chartTranslationService")],t.prototype,"chartTranslationService",void 0),yE([n.NqP],t.prototype,"init",null),t}(n.wA2),CE=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),bE=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},wE=function(e){function t(i){var n=e.call(this,t.TEMPLATE)||this;return n.chartOptionsService=i,n.activePanels=[],n}return CE(t,e),t.prototype.init=function(){this.initFontPanel(),this.titlePlaceholder=this.chartTranslationService.translate("titlePlaceholder")},t.prototype.hasTitle=function(){var e=this.getOption("title");return e&&e.enabled&&e.text&&e.text.length>0},t.prototype.initFontPanel=function(){var e=this,t=this.hasTitle(),i=function(t,i){t.family&&e.setOption("title.fontFamily",t.family,i),t.weight&&e.setOption("title.fontWeight",t.weight,i),t.style&&e.setOption("title.fontStyle",t.style,i),t.size&&e.setOption("title.fontSize",t.size,i),t.color&&e.setOption("title.color",t.color,i)},n={family:this.getOption("title.fontFamily"),style:this.getOption("title.fontStyle"),weight:this.getOption("title.fontWeight"),size:this.getOption("title.fontSize"),color:this.getOption("title.color")};t||i(n,!0);var o={name:this.chartTranslationService.translate("title"),enabled:t,suppressEnabledCheckbox:!1,initialFont:n,setFont:i,setEnabled:function(t){if(e.toolbarExists()){var i=e.getOption("padding.top");e.setOption("padding.top",t?i-20:i+20)}e.setOption("title.enabled",t);var n=e.getOption("title.text"),o="Title"===n||0===(null===n||void 0===n?void 0:n.trim().length);t&&o&&e.setOption("title.text",e.titlePlaceholder)}},r=this.createBean(new ZS(o));r.addItemToPanel(this.createSpacingSlicer()),this.getGui().appendChild(r.getGui()),this.activePanels.push(r),this.addManagedListener(this.eventService,"chartTitleEdit",(function(){r.setEnabled(e.hasTitle())}))},t.prototype.createSpacingSlicer=function(){var e=this,t=this.createBean(new n.h7_),i=this.chartOptionsService.getChartOption("title.spacing")||10;return t.setLabel(this.chartTranslationService.translate("spacing")).setMaxValue(Math.max(i,100)).setValue("".concat(i)).setTextFieldWidth(45).onValueChange((function(t){return e.chartOptionsService.setChartOption("title.spacing",t)})),t},t.prototype.toolbarExists=function(){var e=this.gridOptionsService.getCallback("getChartToolbarItems");if(!e)return!0;var t={defaultItems:["chartUnlink","chartDownload"]},i=["chartLink","chartUnlink","chartDownload"];return i.some((function(i){var n;return null===(n=e&&e(t))||void 0===n?void 0:n.includes(i)}))},t.prototype.getOption=function(e){return this.chartOptionsService.getChartOption(e)},t.prototype.setOption=function(e,t,i){this.chartOptionsService.setChartOption(e,t,i)},t.prototype.destroyActivePanels=function(){var e=this;
18this.activePanels.forEach((function(t){n._.removeFromParent(t.getGui()),e.destroyBean(t)}))},t.prototype.destroy=function(){this.destroyActivePanels(),e.prototype.destroy.call(this)},t.TEMPLATE="<div></div>",bE([(0,n.fsG)("chartTranslationService")],t.prototype,"chartTranslationService",void 0),bE([n.NqP],t.prototype,"init",null),t}(n.wA2),SE=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),EE=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},xE=function(e){function t(t){var i=t.chartController,n=t.chartOptionsService,o=t.isExpandedOnInit,r=void 0!==o&&o,s=e.call(this)||this;return s.activePanels=[],s.chartController=i,s.chartOptionsService=n,s.isExpandedOnInit=r,s}return SE(t,e),t.prototype.init=function(){var e={cssIdentifier:"charts-format-top-level",direction:"vertical"};this.setTemplate(t.TEMPLATE,{chartGroup:e}),this.initGroup(),this.initTitles(),this.initPaddingPanel(),this.initBackgroun
18dPanel()},t.prototype.initGroup=function(){this.chartGroup.setTitle(this.chartTranslationService.translate("chart")).toggleGroupExpand(this.isExpandedOnInit).hideEnabledCheckbox(!0)},t.prototype.initTitles=function(){var e=this.createBean(new wE(this.chartOptionsService));this.chartGroup.addItem(e),this.activePanels.push(e)},t.prototype.initPaddingPanel=function(){var e=this.createBean(new gE(this.chartOptionsService,this.chartController));this.chartGroup.addItem(e),this.activePanels.push(e)},t.prototype.initBackgroundPanel=function(){var e=this.createBean(new mE(this.chartOptionsService));this.chartGroup.addItem(e),this.activePanels.push(e)},t.prototype.destroyActivePanels=function(){var e=this;this.activePanels.forEach((function(t){n._.removeFromParent(t.getGui()),e.destroyBean(t)}))},t.prototype.destroy=function(){this.destroyActivePanels(),e.prototype.destroy.call(this)},t.TEMPLATE='<div>\n            <ag-group-component ref="chartGroup"></ag-group-component>\n        </div>',EE([(0,n.cqo)("chartGroup")],t.prototype,"chartGroup",void 0),EE([(0,n.fsG)("chartTranslationService")],t.prototype,"chartTranslationService",void 0),EE([n.NqP],t.prototype,"init",null),t}(n.wA2),OE=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),TE=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},DE=function(e){function t(t,i){var n=e.call(this)||this;return n.chartOptionsService=t,n.getSelectedSeries=i,n}return OE(t,e),t.prototype.init=function(){var e={cssIdentifier:"charts-format-sub-level",direction:"vertical",suppressOpenCloseIcons:!0};this.setTemplate(t.TEMPLATE,{shadowGroup:e}),this.shadowBlurSlider.setTextFieldWidth(45),this.shadowXOffsetSlider.setTextFieldWidth(45),this.shadowYOffsetSlider.setTextFieldWidth(45),this.initSeriesShadow()},t.prototype.initSeriesShadow=function(){var e=this;this.shadowGroup.setTitle(this.chartTranslationService.translate("shadow")).setEnabled(this.chartOptionsService.getSeriesOption("shadow.enabled",this.getSelectedSeries())).hideOpenCloseIcons(!0).hideEnabledCheckbox(!1).onEnableChange((function(t){return e.chartOptionsService.setSeriesOption("shadow.enabled",t,e.getSelectedSeries())})),this.shadowColorPicker.setLabel(this.chartTranslationService.translate("color")).setLabelWidth("flex").setInputWidth("flex").setValue(this.chartOptionsService.getSeriesOption("shadow.color",this.getSelectedSeries())).onValueChange((function(t){return e.chartOptionsService.setSeriesOption("shadow.color",t,e.getSelectedSeries())}));var t=function(t,i,n,o){var r=e.chartOptionsService.getSeriesOption("shadow.".concat(i),e.getSelectedSeries());t.setLabel(e.chartTranslationService.translate(i)).setMinValue(n).setMaxValue(BE(r,o)).setValue("".concat(r)).onValueChange((function(t){return e.chartOptionsService.setSeriesOption("shadow.".concat(i),t,e.getSelectedSeries())}))};t(this.shadowBlurSlider,"blur",0,20),t(this.shadowXOffsetSlider,"xOffset",-10,10),t(this.shadowYOffsetSlider,"yOffset",-10,10)},t.TEMPLATE='<div>\n            <ag-group-component ref="shadowGroup">\n                <ag-color-picker ref="shadowColorPicker"></ag-color-picker>\n                <ag-slider ref="shadowBlurSlider"></ag-slider>\n                <ag-slider ref="shadowXOffsetSlider"></ag-slider>\n                <ag-slider ref="shadowYOffsetSlider"></ag-slider>\n            </ag-group-component>\n        </div>',TE([(0,n.cqo)("shadowGroup")],t.prototype,"shadowGroup",void 0),TE([(0,n.cqo)("shadowColorPicker")],t.prototype,"shadowColorPicker",void 0),TE([(0,n.cqo)("shadowBlurSlider")],t.prototype,"shadowBlurSlider",void 0),TE([(0,n.cqo)("shadowXOffsetSlider")],t.prototype,"shadowXOffsetSlider",void 0),TE([(0,n.cqo)("shadowYOffsetSlider")],t.prototype,"shadowYOffsetSlider",void 0),TE([(0,n.fsG)("chartTranslationService")],t.prototype,"chartTranslationService",void 0),TE([n.NqP],t.prototype,"init",null),t}(n.wA2);function RE(e){var t=e.labelName,i=e.chartOptionsService,n=e.getSelectedSeries,o=e.seriesOptionLabelProperty,r=function(e){return"".concat(o,".").concat(e)},s=function(e){var t=r(e);return i.getSeriesOption(t,n())},a=function(e,t){var o=r(e);i.setSeriesOption(o,t,n())},l={family:s("fontFamily"),style:s("fontStyle"),weight:s("fontWeight"),size:s("fontSize"),color:s("color")},c=function(e){e.family&&a("fontFamily",e.family),e.weight&&a("fontWeight",e.weight),e.style&&a("fontStyle",e.style),e.size&&a("fontSize",e.size),e.color&&a("color",e.color)},u={name:t,enabled:s("enabled")||!1,setEnabled:function(e){return a("enabled",e)},suppressEnabledCheckbox:!1,initialFont:l,setFont:c};return u}var AE=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),_E=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},PE=function(e){function t(t,i){var n=e.call(this)||this;return n.chartOptionsService=t,n.getSelectedSeries=i,n}return AE(t,e),t.prototype.init=function(){var e={cssIdentifier:"charts-format-sub-level",direction:"vertical"};this.setTemplate(t.TEMPLATE,{seriesMarkersGroup:e}),this.initMarkers()},t.prototype.initMarkers=function(){var e=this,t=[{value:"square",text:"Square"},{value:"circle",text:"Circle"},{value:"cross",text:"Cross"},{value:"diamond",text:"Diamond"},{value:"plus",text:"Plus"},{value:"triangle",text:"Triangle"},{value:"heart",text:"Heart"}];this.seriesMarkerShapeSelect.addOptions(t).setLabel(this.chartTranslationService.translate("shape")).setValue(this.getSeriesOption("marker.shape")).onValueChange((function(t){return e.setSeriesOption("marker.shape",t)}));var i=this.chartOptionsService.getChartType(),o=n._.includes(["scatter","bubble"],i);this.seriesMarkersGroup.setTitle(this.chartTranslationService.translate("markers")).hideEnabledCheckbox(o).setEnabled(this.getSeriesOption("marker.enabled")||!1).hideOpenCloseIcons(!0).onEnableChange((function(t){return e.setSeriesOption("marker.enabled",t)}));var r=function(t,i,n,o){var r=e.getSeriesOption(t);
18i.setLabel(e.chartTranslationService.translate(n)).setMaxValue(BE(r,o)).setValue("".concat(r)).setTextFieldWidth(45).onValueChange((function(i){return e.setSeriesOption(t,i)}))};"bubble"===i?(r("marker.maxSize",this.seriesMarkerMinSizeSlider,"maxSize",60),r("marker.size",this.seriesMarkerSizeSlider,"minSize",60)):(this.seriesMarkerMinSizeSlider.setDisplayed(!1),r("marker.size",this.seriesMarkerSizeSlider,"size",60)),r("marker.strokeWidth",this.seriesMarkerStrokeWidthSlider,"strokeWidth",10)},t.prototype.getSeriesOption=function(e){return this.chartOptionsService.getSeriesOption(e,this.getSelectedSeries())},t.prototype.setSeriesOption=function(e,t){this.chartOptionsService.setSeriesOption(e,t,this.getSelectedSeries())},t.TEMPLATE='<div>\n            <ag-group-component ref="seriesMarkersGroup">\n                <ag-select ref="seriesMarkerShapeSelect"></ag-select>\n                <ag-slider ref="seriesMarkerMinSizeSlider"></ag-slider>\n                <ag-slider ref="seriesMarkerSizeSlider"></ag-slider>\n                <ag-slider ref="seriesMarkerStrokeWidthSlider"></ag-slider>\n            </ag-group-component>\n        </div>',_E([(0,n.cqo)("seriesMarkersGroup")],t.prototype,"seriesMarkersGroup",void 0),_E([(0,n.cqo)("seriesMarkerShapeSelect")],t.prototype,"seriesMarkerShapeSelect",void 0),_E([(0,n.cqo)("seriesMarkerSizeSlider")],t.prototype,"seriesMarkerSizeSlider",void 0),_E([(0,n.cqo)("seriesMarkerMinSizeSlider")],t.prototype,"seriesMarkerMinSizeSlider",void 0),_E([(0,n.cqo)("seriesMarkerStrokeWidthSlider")],t.prototype,"seriesMarkerStrokeWidthSlider",void 0),_E([(0,n.fsG)("chartTranslationService")],t.prototype,"chartTranslationService",void 0),_E([n.NqP],t.prototype,"init",null),t}(n.wA2),ME=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),kE=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},NE=function(e){function t(t,i){var n=e.call(this)||this;return n.chartOptionsService=t,n.getSelectedSeries=i,n}return ME(t,e),t.prototype.init=function(){var e={cssIdentifier:"charts-format-sub-level",direction:"vertical"};this.setTemplate(t.TEMPLATE,{calloutGroup:e}),this.initCalloutOptions()},t.prototype.initCalloutOptions=function(){var e=this;this.calloutGroup.setTitle(this.chartTranslationService.translate("callout")).setEnabled(!0).hideOpenCloseIcons(!0).hideEnabledCheckbox(!0);var t=function(t,i,n,o){var r=e.chartOptionsService.getSeriesOption(t,e.getSelectedSeries());i.setLabel(e.chartTranslationService.translate(n)).setMaxValue(BE(r,o)).setValue("".concat(r)).setTextFieldWidth(45).onValueChange((function(i){return e.chartOptionsService.setSeriesOption(t,i,e.getSelectedSeries())}))};t("calloutLine.length",this.calloutLengthSlider,"length",40),t("calloutLine.strokeWidth",this.calloutStrokeWidthSlider,"strokeWidth",10),t("calloutLabel.offset",this.labelOffsetSlider,"offset",30)},t.TEMPLATE='<div>\n            <ag-group-component ref="calloutGroup">\n                <ag-slider ref="calloutLengthSlider"></ag-slider>\n                <ag-slider ref="calloutStrokeWidthSlider"></ag-slider>\n                <ag-slider ref="labelOffsetSlider"></ag-slider>\n            </ag-group-component>\n        </div>',kE([(0,n.cqo)("calloutGroup")],t.prototype,"calloutGroup",void 0),kE([(0,n.cqo)("calloutLengthSlider")],t.prototype,"calloutLengthSlider",void 0),kE([(0,n.cqo)("calloutStrokeWidthSlider")],t.prototype,"calloutStrokeWidthSlider",void 0),kE([(0,n.cqo)("labelOffsetSlider")],t.prototype,"labelOffsetSlider",void 0),kE([(0,n.fsG)("chartTranslationService")],t.prototype,"chartTranslationService",void 0),kE([n.NqP],t.prototype,"init",null),t}(n.wA2),LE=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),IE=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},FE=function(e){function t(t){var i=t.chartController,n=t.chartOptionsService,o=t.seriesType,r=t.isExpandedOnInit,s=void 0!==r&&r,a=e.call(this)||this;return a.activePanels=[],a.widgetFuncs={lineWidth:function(){return a.initLineWidth()},strokeWidth:function(){return a.initStrokeWidth()},lineDash:function(){return a.initLineDash()},lineOpacity:function(){return a.initLineOpacity()},fillOpacity:function(){return a.initFillOpacity()},markers:function(){return a.initMarkers()},labels:function(){return a.initLabels()},shadow:function(){return a.initShadow()},tooltips:function(){return a.initTooltips()},bins:function(){return a.initBins()}},a.seriesWidgetMappings={area:["tooltips","lineWidth","lineDash","lineOpacity","fillOpacity","markers","labels","shadow"],bar:["tooltips","strokeWidth","lineDash","lineOpacity","fillOpacity","labels","shadow"],column:["tooltips","strokeWidth","lineDash","lineOpacity","fillOpacity","labels","shadow"],line:["tooltips","lineWidth","lineDash","lineOpacity","markers","labels"],histogram:["tooltips","bins","strokeWidth","lineDash","lineOpacity","fillOpacity","labels","shadow"],scatter:["tooltips","markers","labels"],bubble:["tooltips","markers","labels"],pie:["tooltips","strokeWidth","lineOpacity","fillOpacity","labels","shadow"]},a.chartController=i,a.chartOptionsService=n,a.seriesType=o||a.getChartSeriesType(),a.isExpandedOnInit=s,a}return LE(t,e),t.prototype.init=function(){var e={cssIdentifier:"charts-format-top-level",direction:"vertical"};this.setTemplate(t.TEMPLATE,{seriesGroup:e}),this.seriesGroup.setTitle(this.translate("series")).toggleGroupExpand(this.isExpandedOnInit).hideEnabledCheckbox(!0),this.addManagedListener(this.chartController,jS.EVENT_CHART_SERIES_CHART_TYPE_CHANGED,this.refreshWidgets.bind(this)),this.refreshWidgets()},t.prototype.refreshWidgets=function(){var e=this;this.destroyActivePanels();var t=this.chartController.getChartProxy().getChart();t.waitForUpdate().then((function(){e.chartController.isComboChart()&&(e.updateSeriesType(),e.initSeriesSelect()),e.seriesWidgetMappings[e.seriesType].forEach((function(t){return e.widgetFuncs[t]()}))})).catch((function(e){return console.error("AG Grid - chart rendering failed",e)}))},t.prototype.initSeriesSelect=function(){var e=this,t=this.seriesGroup.createManagedBean(new n.wGv);t.setLabel(this.translate("seriesType")).setLabelAlignment("left").setLabelWidth("flex").setInputWidth("flex").addOptions(this.getSeriesSelectOptions()).setValue("".concat(this.seriesType)).onValueChange((function(t){e.seriesType=t,e.refreshWidgets()})),this.seriesGroup.addItem(t),this.activePanels.push(t)},t.prototype.initTooltips=function(){var e=this,t=this.createBean(new n.nN0);t.setLabel(this.translate("tooltips")).setLabelAlignment("left").setLabelWidth("flex").setInputWidth("flex").setValue(this.getSeriesOption("tooltip.enabled")||!1).onValueChange((function(t){return e.setSeriesOption("tooltip.enabled",t)})),this.addWidget(t)},t.prototype.initStrokeWidth=function(){var e=this,t=this.getSeriesOption("strokeWidth"),i=this.createBean(new n.h7_);i.setLabel(this.translate("strokeWidth")).setMaxValue(BE(t,10)).setTextFieldWidth(45).setValue("".concat(t)).onValueChange((function(t){return e.setSeriesOption("strokeWidth",t)})),this.addWidget(i)},t.prototype.initLineWidth=function(){var e=this,t=this.getSeriesOption("strokeWidth"),i=this.createBean(new n.h7_);i.setLabel(this.translate("lineWidth")).setMaxValue(BE(t,10)).setTextFieldWidth(45).setValue("".concat(t)).onValueChange((function(t){return e.setSeriesOption("strokeWidth",t)})),this.addWidget(i)},t.prototype.initLineDash=function(){var e=this,t=this.getSeriesOption("lineDash"),i=t?t[0]:0,o=this.createBean(new n.h7_);o.setLabel(this.translate("lineDash")).setMaxValue(BE(i,30)).setTextFieldWidth(45).setValue("".concat(i)).onValueChange((function(t){return e.setSeriesOption("lineDash",[t])})),this.addWidget(o)},t.prototype.initLineOpacity=function(){var e=this,t=this.getSeriesOption("strokeOpacity"),i=this.createBean(new n.h7_);
18i.setLabel(this.translate("strokeOpacity")).setStep(.05).setMaxValue(BE(t,1)).setTextFieldWidth(45).setValue("".concat(t)).onValueChange((function(t){return e.setSeriesOption("strokeOpacity",t)})),this.addWidget(i)},t.prototype.initFillOpacity=function(){var e=this,t=this.getSeriesOption("fillOpacity"),i=this.createBean(new n.h7_);i.setLabel(this.translate("fillOpacity")).setStep(.05).setMaxValue(BE(t,1)).setTextFieldWidth(45).setValue("".concat(t)).onValueChange((function(t){return e.setSeriesOption("fillOpacity",t)})),this.addWidget(i)},t.prototype.initLabels=function(){var e=this,t="pie"===this.seriesType?"calloutLabel":"label",i="pie"===this.seriesType?this.chartTranslationService.translate("calloutLabels"):this.chartTranslationService.translate("labels"),n=RE({labelName:i,chartOptionsService:this.chartOptionsService,getSelectedSeries:function(){return e.seriesType},seriesOptionLabelProperty:t}),o=this.createBean(new ZS(n));if("pie"===this.seriesType){var r=this.createBean(new NE(this.chartOptionsService,(function(){return e.seriesType})));o.addCompToPanel(r),this.activePanels.push(r)}if(this.addWidget(o),"pie"===this.seriesType){var s=RE({labelName:this.chartTranslationService.translate("sectorLabels"),chartOptionsService:this.chartOptionsService,getSelectedSeries:function(){return e.seriesType},seriesOptionLabelProperty:"sectorLabel"}),a=this.createBean(new ZS(s)),l=this.getSectorLabelPositionRatio();a.addCompToPanel(l),this.addWidget(a)}},t.prototype.getSectorLabelPositionRatio=function(){var e=this,t="sectorLabel.positionRatio",i=this.chartOptionsService.getSeriesOption(t,this.seriesType),o=this.createBean(new n.h7_);return o.setLabel(this.translate("positionRatio")).setStep(.05).setMaxValue(BE(i,1)).setTextFieldWidth(45).setValue("".concat(i)).onValueChange((function(i){return e.chartOptionsService.setSeriesOption(t,i,e.seriesType)}))},t.prototype.initShadow=function(){var e=this,t=this.createBean(new DE(this.chartOptionsService,(function(){return e.seriesType})));this.addWidget(t)},t.prototype.initMarkers=function(){var e=this,t=this.createBean(new PE(this.chartOptionsService,(function(){return e.seriesType})));this.addWidget(t)},t.prototype.initBins=function(){var e,t=this,i=(null!==(e=this.getSeriesOption("bins"))&&void 0!==e?e:this.getSeriesOption("calculatedBins")).length,o=this.createBean(new n.h7_);o.setLabel(this.translate("histogramBinCount")).setMinValue(0).setMaxValue(BE(i,20)).setTextFieldWidth(45).setValue("".concat(i)).onValueChange((function(e){return t.setSeriesOption("binCount",e)})),this.addWidget(o)},t.prototype.addWidget=function(e){this.seriesGroup.addItem(e),this.activePanels.push(e)},t.prototype.getSeriesOption=function(e){return this.chartOptionsService.getSeriesOption(e,this.seriesType)},t.prototype.setSeriesOption=function(e,t){this.chartOptionsService.setSeriesOption(e,t,this.seriesType)},t.prototype.getChartSeriesType=function(){if(0===this.chartController.getSeriesChartTypes().length)return"column";var e=this.chartController.getSeriesChartTypes()[0].chartType;return"columnLineCombo"===e?"column":"areaColumnCombo"===e?"area":vS(e)},t.prototype.getSeriesSelectOptions=function(){var e=this;this.seriesSelectOptions||(this.seriesSelectOptions=new Map([["area",{value:"area",text:this.translate("area","Area")}],["bar",{value:"bar",text:this.translate("bar","Bar")}],["column",{value:"column",text:this.translate("column","Column")}],["line",{value:"line",text:this.translate("line","Line")}],["scatter",{value:"scatter",text:this.translate("scatter","Scatter")}],["histogram",{value:"histogram",text:this.translate("histogram","Histogram")}],["pie",{value:"pie",text:this.translate("pie","Pie")}]]));var t=new Set;return this.chartController.getActiveSeriesChartTypes().forEach((function(i){var n=vS(i.chartType);t.add(e.seriesSelectOptions.get(n))})),Array.from(t)},t.prototype.updateSeriesType=function(){var e=this.chartController.getActiveSeriesChartTypes().map((function(e){return vS(e.chartType)})),t=!e.includes(this.seriesType);t&&e.length>0&&(this.seriesType=e[0])},t.prototype.translate=function(e,t){return this.chartTranslationService.translate(e,t)},t.prototype.destroyActivePanels=function(){var e=this;
18this.activePanels.forEach((function(t){n._.removeFromParent(t.getGui()),e.destroyBean(t)}))},t.prototype.destroy=function(){this.destroyActivePanels(),e.prototype.destroy.call(this)},t.TEMPLATE='<div>\n            <ag-group-component ref="seriesGroup">\n            </ag-group-component>\n        </div>',IE([(0,n.cqo)("seriesGroup")],t.prototype,"seriesGroup",void 0),IE([(0,n.fsG)("chartTranslationService")],t.prototype,"chartTranslationService",void 0),IE([n.NqP],t.prototype,"init",null),t}(n.wA2),GE=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),VE=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};function BE(e,t){return Math.max(e,t)}var jE={groups:[{type:"chart"},{type:"legend"},{type:"series"},{type:"axis"},{type:"navigator"}]},HE=function(e){function t(i,n){var o=e.call(this,t.TEMPLATE)||this;return o.chartController=i,o.chartOptionsService=n,o.panels=[],o.isGroupPanelShownInSeries=function(e,t){var i=["chart","legend","series"];if(i.includes(e))return!0;var n=["axis","navigator"],o=["bar","column","line","area","scatter","bubble","histogram","cartesian"];return!(!n.includes(e)||!o.includes(t))},o}return GE(t,e),t.prototype.init=function(){var e=this;this.createPanels(),this.addManagedListener(this.chartController,jS.EVENT_CHART_UPDATED,(function(){return e.createPanels(!0)})),this.addManagedListener(this.chartController,jS.EVENT_CHART_API_UPDATE,(function(){return e.createPanels(!1)}))},t.prototype.createPanels=function(e){var t,i=this,n=this.chartController.getChartType(),o=this.chartController.isGrouping(),r=vS(n);e&&n===this.chartType&&o===this.isGrouping||(this.destroyPanels(),null===(t=this.getFormatPanelDef().groups)||void 0===t||t.forEach((function(e){var t=e.type;if(i.isGroupPanelShownInSeries(t,r)){var n={chartController:i.chartController,chartOptionsService:i.chartOptionsService,isExpandedOnInit:e.isOpen,seriesType:r};"chart"===t?i.addComponent(new xE(n)):"legend"===t?i.addComponent(new eE(n)):"axis"===t?i.addComponent(new cE(n)):"series"===t?i.addComponent(new FE(n)):"navigator"===t?i.addComponent(new pE(n)):console.warn("AG Grid: invalid charts format panel group name supplied: '".concat(e.type,"'"))}})),this.chartType=n,this.isGrouping=o)},t.prototype.getFormatPanelDef=function(){var e,t=null===(e=this.gridOptionsService.get("chartToolPanelsDef"))||void 0===e?void 0:e.formatPanel;return t||jE},t.prototype.addComponent=function(e){this.createBean(e),this.panels.push(e),e.addCssClass("ag-chart-format-section"),this.getGui().appendChild(e.getGui())},t.prototype.destroyPanels=function(){var e=this;this.panels.forEach((function(t){n._.removeFromParent(t.getGui()),e.destroyBean(t)}))},t.prototype.destroy=function(){this.destroyPanels(),e.prototype.destroy.call(this)},t.TEMPLATE='<div class="ag-chart-format-wrapper"></div>',VE([n.NqP],t.prototype,"init",null),t}(n.wA2),WE=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),UE=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},zE="ag-chart-mini-thumbnail-canvas",KE="AG Grid - chart update failed",YE=function(e){function t(t,i){var n=e.call(this)||this;n.size=58,n.padding=5,n.root=new Dv.Group;var o=new Dv.Scene({window:window,document:window.document,width:n.size,height:n.size});return o.canvas.element.classList.add(zE),o.root=n.root,o.container=t,n.scene=o,n.tooltipName=i,n}return WE(t,e),t.prototype.init=function(){this.scene.canvas.element.title=this.chartTranslationService.translate(this.tooltipName),this.scene.render().catch((function(e){console.error("".concat(KE),e)}))},UE([(0,n.fsG)("chartTranslationService")],t.prototype,"chartTranslationService",void 0),UE([n.NqP],t.prototype,"init",null),t}(n.wA2),qE=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),XE=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},$E=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.stroke="gray",n.axisOvershoot=3,n}return qE(t,e),t.prototype.addAxes=function(){var e=this.size,t=this.padding,i=new Dv.Line;i.x1=t,i.y1=t,i.x2=t,i.y2=e-t+this.axisOvershoot,i.stroke=this.stroke;var n=new Dv.Line;n.x1=t-this.axisOvershoot+1,n.y1=e-t,n.x2=e-t+1,n.y2=e-t,n.stroke=this.stroke;var o=this.root;o.append(i),o.append(n)},XE([n.NqP],t.prototype,"addAxes",null),t}(YE);function ZE(e){var t=e.stacked,i=e.size,n=e.padding,o=e.xScalePadding,r=e.xScaleDomain,s=e.yScaleDomain,a=new Dv.BandScale;a.domain=r,a.range=[n,i-n],a.paddingInner=o,a.paddingOuter=o;var l=new Dv.LinearScale;l.domain=s,l.range=[i-n,n];var c=function(e,t,i){return e.map((function(e,n){var o=i.convert(e),r=new Dv.Rect;return r.x=t.convert(n),r.y=o,r.width=t.bandwidth,r.height=i.convert(0)-o,r.strokeWidth=1,r.crisp=!0,r}))};return t?e.data.map((function(e){return c(e,a,l)})):c(e.data,a,l)}function JE(e,t,i,n){var o=new Dv.LinearScale;o.domain=[0,4],o.range=[n,i-n];var r=new Dv.LinearScale;r.domain=[0,10],r.range=[i-n,n];var s=t.map((function(e){var t=new Dv.Path;return t.strokeWidth=3,t.lineCap="round",t.fill=void 0,e.forEach((function(e,i){t.path[i>0?"lineTo":"moveTo"](o.convert(i),r.convert(e))})),t})),a=new Dv.Group;return a.setClipRectInGroupCoordinateSpace(new Dv.BBox(n,n,i-2*n,i-2*n)),a.append(s),e.append(a),s}var QE=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ex=function(e){function t(t,i,n){var o=e.call(this,t,"groupedColumnTooltip")||this;o.columnData=[2,3,4];var r=o,s=r.root,a=r.columnData,l=r.size,c=r.padding;return o.columns=ZE({stacked:!1,root:s,data:a,size:l,padding:c,xScaleDomain:[0,1,2],yScaleDomain:[0,4],xScalePadding:.3}),s.append(o.columns),o.updateColors(i,n),o}return QE(t,e),t.prototype.updateColors=function(e,t){this.columns.forEach((function(i,n){i.fill=e[n],i.stroke=t[n]}))},t.chartType="groupedColumn",t}($E),tx=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ix=function(e){function t(i,n,o,r,s,a){void 0===r&&(r=t.data),void 0===s&&(s=[0,16]),void 0===a&&(a="stackedColumnTooltip");var l=e.call(this,i,a)||this,c=l,u=c.root,d=c.size,p=c.padding;return l.stackedColumns=ZE({stacked:!0,root:u,data:r,size:d,padding:p,xScaleDomain:[0,1,2],yScaleDomain:s,xScalePadding:.3}),u.append([].concat.apply([],l.stackedColumns)),l.updateColors(n,o),l}return tx(t,e),t.prototype.updateColors=function(e,t){this.stackedColumns.forEach((function(i,n){return i.forEac
18h((function(i){i.fill=e[n],i.stroke=t[n]}))}))},t.chartType="stackedColumn",t.data=[[8,12,16],[6,9,12],[2,3,4]],t}($E),nx=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ox=function(e){function t(i,n,o){return e.call(this,i,n,o,t.data,[0,10],"normalizedColumnTooltip")||this}return nx(t,e),t.chartType="normalizedColumn",t.data=[[10,10,10],[6,7,8],[2,4,6]],t}(ix),rx=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),sx=function(e){function t(t,i,n){var o=e.call(this,t,"groupedBarTooltip")||this,r=o.padding,s=o.size,a=[2,3,4],l=new Dv.BandScale;l.domain=[0,1,2],l.range=[r,s-r],l.paddingInner=.3,l.paddingOuter=.3;var c=new Dv.LinearScale;c.domain=[0,4],c.range=[s-r,r];var u=c.convert(0),d=l.bandwidth;return o.bars=a.map((function(e,t){var i=new Dv.Rect;return i.x=r,i.y=l.convert(t),i.width=u-c.convert(e),i.height=d,i.strokeWidth=1,i.crisp=!0,i})),o.updateColors(i,n),o.root.append(o.bars),o}return rx(t,e),t.prototype.updateColors=function(e,t){this.bars.forEach((function(i,n){i.fill=e[n],i.stroke=t[n]}))},t.chartType="groupedBar",t}($E),ax=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),lx=function(e){function t(i,n,o,r,s,a){void 0===r&&(r=t.data),void 0===s&&(s=[0,16]),void 0===a&&(a="stackedBarTooltip");var l=e.call(this,i,a)||this,c=l.size,u=l.padding,d=new Dv.BandScale;d.domain=[0,1,2],d.range=[u,c-u],d.paddingInner=.3,d.paddingOuter=.3;var p=new Dv.LinearScale;p.domain=s,p.range=[c-u,u];var h=p.convert(0),f=d.bandwidth;return l.bars=r.map((function(e){return e.map((function(e,t){var i=new Dv.Rect;return i.x=u,i.y=d.convert(t),i.width=h-p.convert(e),i.height=f,i.strokeWidth=1,i.crisp=!0,i}))})),l.updateColors(n,o),l.root.append([].concat.apply([],l.bars)),l}return ax(t,e),t.prototype.updateColors=function(e,t){this.bars.forEach((function(i,n){return i.forEach((function(i){i.fill=e[n],i.stroke=t[n]}))}))},t.chartType="stackedBar",t.data=[[8,12,16],[6,9,12],[2,3,4]],t}($E),cx=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ux=function(e){function t(i,n,o){return e.call(this,i,n,o,t.data,[0,10],"normalizedBarTooltip")||this}return cx(t,e),t.chartType="normalizedBar",t.data=[[10,10,10],[6,7,8],[2,4,6]],t}(lx),dx=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),px=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},hx=Dv.toRadians,fx=function(e){function t(t,i,n,o,r){void 0===o&&(o=.6),void 0===r&&(r="doughnutTooltip");var s=e.call(this,t,r)||this,a=(s.size-2*s.padding)/2,l=a+s.padding,c=[[hx(-90),hx(30)],[hx(30),hx(120
18)],[hx(120),hx(180)],[hx(180),hx(210)],[hx(210),hx(240)],[hx(240),hx(270)]];return s.sectors=c.map((function(e){var t=px(e,2),i=t[0],n=t[1],r=new Dv.Sector;return r.centerX=l,r.centerY=l,r.innerRadius=a*o,r.outerRadius=a,r.startAngle=i,r.endAngle=n,r.stroke=void 0,r.strokeWidth=1,r})),s.updateColors(i,n),s.root.append(s.sectors),s}return dx(t,e),t.prototype.updateColors=function(e,t){this.sectors.forEach((function(i,n){i.fill=e[n%e.length],i.stroke=t[n%t.length]}))},t.chartType="doughnut",t}(YE),gx=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),vx=function(e){function t(t,i,n){return e.call(this,t,i,n,0,"pieTooltip")||this}return gx(t,e),t.chartType="pie",t}(fx),yx=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),mx=function(e){function t(t,i,n){var o=e.call(this,t,"lineTooltip")||this;return o.data=[[9,7,8,5,6],[5,6,3,4,1],[1,3,4,8,7]],o.lines=JE(o.root,o.data,o.size,o.padding),o.updateColors(i,n),o}return yx(t,e),t.prototype.updateColors=function(e,t){this.lines.forEach((function(t,i){t.stroke=e[i]}))},t.chartType="line",t}($E),Cx=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),bx=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},wx=function(e){function t(t,i,n){var o=e.call(this,t,"scatterTooltip")||this,r=o.size,s=o.padding,a=[[[.3,3],[1.1,.9],[2,.4],[3.4,2.4]],[[0,.3],[1,2],[2.4,1.4],[3,0]]],l=new Dv.LinearScale;l.domain=[-.5,4],l.range=[2*s,r-s];var c=new Dv.LinearScale;c.domain=[-.5,3.5],c.range=[r-s,s];var u=[];a.forEach((function(e){e.forEach((function(e){var t=bx(e,2),i=t[0],n=t[1],o=new Dv.Arc;o.strokeWidth=1,o.centerX=l.convert(i),o.centerY=c.convert(n),o.radius=2.5,u.push(o)}))})),o.points=u,o.updateColors(i,n);var d=new Dv.Group;return d.setClipRectInGroupCoordinateSpace(new Dv.BBox(s,s,r-2*s,r-2*s)),d.append(o.points),o.root.append(d),o}return Cx(t,e),t.prototype.updateColors=function(e,t){this.points.forEach((function(i,n){i.stroke=t[n%t.length],i.fill=e[n%e.length]}))},t.chartType="scatter",t}($E),Sx=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ex=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},xx=function(e){function t(t,i,n){var o=e.call(this,t,"bubbleTooltip")||this,r=o.size,s=o.padding,a=[[[.1,.3,5],[.5,.4,7],[.2,.8,7]],[[.8,.7,5],[.7,.3,9]]],l=new Dv.LinearScale;l.domain=[0,1],l.range=[2*s,r-s];var c=new Dv.LinearScale;c.domain=[0,1],c.range=[r-s,s];var u=[];a.forEach((function(e){e.forEach((function(e){var t=Ex(e,3),i=t[0],n=t[1],o=t[2],r=new Dv.Arc;r.strokeWidth=1,r.centerX=l.convert(i),r.centerY=c.convert(n),r.radius=o,r.fillOpacity=.7,u.push(r)}))}
18)),o.points=u,o.updateColors(i,n);var d=new Dv.Group;return d.setClipRectInGroupCoordinateSpace(new Dv.BBox(s,s,r-2*s,r-2*s)),d.append(o.points),o.root.append(d),o}return Sx(t,e),t.prototype.updateColors=function(e,t){this.points.forEach((function(i,n){i.stroke=t[n%t.length],i.fill=e[n%e.length]}))},t.chartType="bubble",t}($E),Ox=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Tx=function(e){function t(i,n,o,r){void 0===r&&(r=t.data);var s=e.call(this,i,"groupedAreaTooltip")||this,a=s.size,l=s.padding,c=new Dv.BandScale;c.domain=[0,1,2],c.paddingInner=1,c.paddingOuter=0,c.range=[l+.5,a-l-.5];var u=new Dv.LinearScale;u.domain=[0,6],u.range=[a-l+.5,l];var d=r.length,p=2*d-1,h=[],f=u.convert(0);return r.forEach((function(e,t){var i=c.convert(t);e.forEach((function(e,n){var o=u.convert(e),r=h[n]||(h[n]=[]);r[t]={x:i,y:o},r[p-t]={x:i,y:f}}))})),s.areas=h.reverse().map((function(e){var t=new Dv.Path;t.strokeWidth=1,t.fillOpacity=.7;var i=t.path;return i.clear(),e.forEach((function(e,t){return i[t>0?"lineTo":"moveTo"](e.x,e.y)})),i.closePath(),t})),s.updateColors(n,o),s.root.append(s.areas),s}return Ox(t,e),t.prototype.updateColors=function(e,t){this.areas.forEach((function(i,n){i.fill=e[n],i.stroke=t[n]}))},t.chartType="area",t.data=[[1,3,5],[2,6,4],[5,3,1]],t}($E),Dx=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Rx=function(e){function t(i,n,o,r,s){void 0===r&&(r=t.data),void 0===s&&(s="stackedAreaTooltip");var a=e.call(this,i,s)||this,l=a.size,c=a.padding,u=new Dv.BandScale;u.domain=[0,1,2],u.paddingInner=1,u.paddingOuter=0,u.range=[c+.5,l-c-.5];var d=new Dv.LinearScale;d.domain=[0,16],d.range=[l-c+.5,c+.5];var p=r.length,h=2*p-1,f=[];return r.forEach((function(e,t){var i=u.convert(t),n=0;e.forEach((function(e,o){var r=d.convert(n+e),s=f[o]||(f[o]=[]);s[t]={x:i,y:r},s[h-t]={x:i,y:d.convert(n)},n+=e}))})),a.areas=f.map((function(e){var t=new Dv.Path;t.strokeWidth=1;var i=t.path;return i.clear(),e.forEach((function(e,t){return i[t>0?"lineTo":"moveTo"](e.x,e.y)})),i.closePath(),t})),a.updateColors(n,o),a.root.append(a.areas),a}return Dx(t,e),t.prototype.updateColors=function(e,t){this.areas.forEach((function(i,n){i.fill=e[n],i.stroke=t[n]}))},t.chartType="stackedArea",t.data=[[2,3,2],[3,6,5],[6,2,2]],t}($E),Ax=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),_x=function(e){function t(i,n,o,r){return void 0===r&&(r=t.data),e.call(this,i,n,o,r,"normalizedAreaTooltip")||this}return Ax(t,e),t.chartType="normalizedArea",t.data=Rx.data.map((function(e){var t=e.reduce((function(e,t){return e+t}),0);return e.map((function(e){return e/t*16}))})),t}(Rx),Px=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Mx=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},kx=function(e){function t(t,i,n){var o=e.call(this,t,"histogramTooltip")||this,r=o.padding,s=o.size,a=[2,5,11,13,10,6,1],l=new Dv.LinearScale;l.domain=[0,a.length],l.range=[r,s-r];var c=new Dv.LinearScale;c.domain=[0,a.reduce((function(e,t){return Math.max(e,t)}),0)],c.range=[s-r,r];
18var u=c.convert(0);return o.bars=a.map((function(e,t){var i=c.convert(e),n=l.convert(t),o=l.convert(t+1),r=new Dv.Rect;return r.x=n,r.y=i,r.width=o-n,r.height=u-i,r.strokeWidth=1,r.crisp=!0,r})),o.updateColors(i,n),o.root.append(o.bars),o}return Px(t,e),t.prototype.updateColors=function(e,t){var i=Mx(e,1),n=i[0],o=Mx(t,1),r=o[0];this.bars.forEach((function(e){e.fill=n,e.stroke=r}))},t.chartType="histogram",t}($E),Nx=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Lx=function(e){function t(t,i,n){var o=e.call(this,t,"columnLineComboTooltip")||this;o.columnData=[3,4],o.lineData=[[5,4,6,5,4]];var r=o,s=r.root,a=r.columnData,l=r.lineData,c=r.size,u=r.padding;return o.columns=ZE({stacked:!1,root:s,data:a,size:c,padding:u,xScaleDomain:[0,1],yScaleDomain:[0,4],xScalePadding:.5}),s.append(o.columns),o.lines=JE(s,l,c,u),o.updateColors(i,n),o}return Nx(t,e),t.prototype.updateColors=function(e,t){this.columns.forEach((function(i,n){i.fill=e[n],i.stroke=t[n]})),this.lines.forEach((function(t,i){t.stroke=e[i+2]}))},t.chartType="columnLineCombo",t}($E),Ix=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Fx=function(e){function t(t,i,n){var o=e.call(this,t,"areaColumnComboTooltip")||this;o.columnData=[3,4.5],o.areaData=[[5,4,6,5,4]];var r=o,s=r.root,a=r.columnData,l=r.areaData,c=r.size,u=r.padding;o.columns=ZE({stacked:!1,root:s,data:a,size:c,padding:u,xScaleDomain:[0,1],yScaleDomain:[0,6],xScalePadding:.5});var d=new Dv.BandScale;d.range=[u,c-u],d.domain=[0,1,2,3,4],d.paddingInner=1,d.paddingOuter=0;var p=new Dv.LinearScale;p.range=[c-u,u],p.domain=[0,6];var h=[],f=p.convert(0),g=d.convert(0);return l.forEach((function(e,t){var i=h[t]||(h[t]=[]);e.forEach((function(e,t){var n=e,o=t,r=d.convert(o),s=p.convert(n);i[t]={x:r,y:s}}));var n=d.convert(e.length-1);h[t].push({x:n,y:f},{x:g,y:f})})),o.areas=h.map((function(e){var t=new Dv.Path;t.strokeWidth=1,t.fillOpacity=.8;var i=t.path;return e.forEach((function(e,t){return i[t>0?"lineTo":"moveTo"](e.x,e.y)})),t})),s.append(o.areas),s.append([].concat.apply([],o.columns)),o.updateColors(i,n),o}return Ix(t,e),t.prototype.updateColors=function(e,t){this.areas.forEach((function(i,n){i.fill=e[n],i.stroke=t[n]})),this.columns.forEach((function(i,n){i.fill=e[n+1],i.stroke=t[n+1]}))},t.chartType="areaColumnCombo",t}($E),Gx=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Vx=function(e){function t(t,i,n){var o=e.call(this,t,"customComboTooltip")||this;o.columnData=[3,4],o.lineData=[[5,4,6,5,4]];var r=o,s=r.root,a=r.columnData,l=r.lineData,c=r.size,u=r.padding;o.columns=ZE({stacked:!1,root:s,data:a,size:c,padding:u,xScaleDomain:[0,1],yScaleDomain:[0,4],xScalePadding:.5}),s.append(o.columns),o.lines=JE(s,l,c,u);var d="grey",p=3,h=new Dv.Line;h.x1=u,h.y1=u,h.x2=u,h.y2=c-u+p,h.stroke=d;var f=new Dv.Line;f.x1=u-p+1,f.y1=c-u,f.x2=c-u+1,f.y2=c-u,f.stroke=d;var g=new Dv.Path;return o.buildPenIconPath(g),g.fill="whitesmoke",g.stroke="darkslategrey",g.strokeWidth=1,s.append([f,h,g]),o.updateColors(i,n),o}return Gx(t,e),t.prototype.updateColors=function(e,t){this.columns.forEach((function(i,n){i.fill=e[n],i.stroke=t[n]}
18)),this.lines.forEach((function(t,i){t.stroke=e[i+2]}))},t.prototype.buildPenIconPath=function(e){var t=e.path;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)},t.chartType="customCombo",t}(YE),Bx=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),jx=function(){return jx=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},jx.apply(this,arguments)},Hx=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Wx={columnGroup:{column:ex,stackedColumn:ix,normalizedColumn:ox},barGroup:{bar:sx,stackedBar:lx,normalizedBar:ux},pieGroup:{pie:vx,doughnut:fx},lineGroup:{line:mx},scatterGroup:{scatter:wx,bubble:xx},areaGroup:{area:Tx,stackedArea:Rx,normalizedArea:_x},histogramGroup:{histogram:kx},combinationGroup:{columnLineCombo:Lx,areaColumnCombo:Fx,customCombo:Vx}},Ux=function(e){function t(i,o,r,s){void 0===s&&(s=n.hhW);var a=e.call(this,t.TEMPLATE)||this;return a.wrappers={},a.chartController=i,a.fills=o,a.strokes=r,a.chartGroups=jx({},s),a}return Bx(t,e),t.prototype.init=function(){var e=this;!this.chartController.customComboExists()&&this.chartGroups.combinationGroup&&(this.chartGroups.combinationGroup=this.chartGroups.combinationGroup.filter((function(e){return"customCombo"!==e})));var t=this.getGui();Object.keys(this.chartGroups).forEach((function(i){var o=e.chartGroups[i],r=e.createBean(new n.H1u({title:e.chartTranslationService.translate(i),suppressEnabledCheckbox:!0,enabled:!0,suppressOpenCloseIcons:!0,cssIdentifier:"charts-settings",direction:"horizontal"}));o.forEach((function(t){var o,s=null===(o=Wx[i])||void 0===o?void 0:o[t];if(s){var a=document.createElement("div");a.classList.add("ag-chart-mini-thumbnail");var l=s.chartType;e.addManagedListener(a,"click",(function(){e.chartController.setChartType(l),e.updateSelectedMiniChart()})),e.wrappers[l]=a,e.createBean(new s(a,e.fills,e.strokes)),r.addItem(a)}else n._.warnOnce("invalid chartGroupsDef config '".concat(i).concat(Wx[i]?".".concat(t):"","'"))})),t.appendChild(r.getGui())})),this.updateSelectedMiniChart()},t.prototype.updateSelectedMiniChart=function(){var e=this.chartController.getChartType();for(var t in this.wrappers){var i=this.wrappers[t],n=t===e;i.classList.toggle("ag-selected",n)}},t.TEMPLATE='<div class="ag-chart-settings-mini-wrapper"></div>',Hx([(0,n.fsG)("chartTranslationService")],t.prototype,"chartTranslationService",void 0),Hx([n.NqP],t.prototype,"init",null),t}(n.wA2),zx=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Kx=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Yx=function(e){function t(i){var n=e.call(this,t.TEMPLATE)||this;return n.miniChartsContainers=[],n.cardItems=[],n.activePaletteIndex=0,n.palettes=[],n.themes=[],n.chartController=i,n}return zx(t,e),t.prototype.postConstruct=function(){var e=this;this.resetPalettes(),this.ePrevBtn.insertAdjacentElement("afterbegin",n._.createIconNoSpan("previous",this.gridOptionsService)),this.eNextBtn.insertAdjacentElement("afterbegin",n._.createIconNoSpan("next",this.gridOptionsService)),this.addManagedListener(this.ePrevBtn,"click",(function(){return e.setActivePalette
18(e.getPrev(),"left")})),this.addManagedListener(this.eNextBtn,"click",(function(){return e.setActivePalette(e.getNext(),"right")})),this.addManagedListener(this.chartController,jS.EVENT_CHART_TYPE_CHANGED,(function(){return e.resetPalettes(!0)})),this.addManagedListener(this.chartController,jS.EVENT_CHART_API_UPDATE,(function(){return e.resetPalettes(!0)})),this.scrollSelectedIntoView()},t.prototype.scrollSelectedIntoView=function(){var e=this;setTimeout((function(){var t=function(e){return!e.getGui().classList.contains("ag-hidden")},i=e.miniChartsContainers.find(t),n=i.getGui().querySelector(".ag-selected");if(n){var o=n.offsetParent;o&&e.eMiniChartsContainer.scrollTo(0,o.offsetTop)}}),250)},t.prototype.resetPalettes=function(e){var t,i,o=this,r=this.chartController.getPalettes(),s=null===(i=null===(t=this.gridOptionsService.get("chartToolPanelsDef"))||void 0===t?void 0:t.settingsPanel)||void 0===i?void 0:i.chartGroupsDef;n._.shallowCompare(r,this.palettes)&&!e||this.isAnimating||(this.palettes=r,this.themes=this.chartController.getThemes(),this.activePaletteIndex=this.themes.findIndex((function(e){return e===o.chartController.getChartThemeName()})),this.cardItems=[],n._.clearElement(this.eCardSelector),this.destroyMiniCharts(),this.palettes.forEach((function(e,t){var i=o.activePaletteIndex===t,n=e.fills,r=e.strokes,a=o.createBean(new Ux(o.chartController,n,r,s));o.miniChartsContainers.push(a),o.eMiniChartsContainer.appendChild(a.getGui()),o.addCardLink(t),i?a.updateSelectedMiniChart():a.setDisplayed(!1)})),n._.setDisplayed(this.eNavBar,this.palettes.length>1),n._.radioCssClass(this.cardItems[this.activePaletteIndex],"ag-selected","ag-not-selected"))},t.prototype.addCardLink=function(e){var t=this,i=document.createElement("div");i.classList.add("ag-chart-settings-card-item"),this.addManagedListener(i,"click",(function(){t.setActivePalette(e,e<t.activePaletteIndex?"left":"right")})),this.eCardSelector.appendChild(i),this.cardItems.push(i)},t.prototype.getPrev=function(){var e=this.activePaletteIndex-1;return e<0&&(e=this.palettes.length-1),e},t.prototype.getNext=function(){var e=this.activePaletteIndex+1;return e>=this.palettes.length&&(e=0),e},t.prototype.setActivePalette=function(e,t){var i=this;if(!this.isAnimating&&this.activePaletteIndex!==e){n._.radioCssClass(this.cardItems[e],"ag-selected","ag-not-selected");var o=this.miniChartsContainers[this.activePaletteIndex],r=o.getGui(),s=this.miniChartsContainers[e],a=s.getGui();o.updateSelectedMiniChart(),s.updateSelectedMiniChart();var l="left"===t?-1:1,c=a.style.left="".concat(n._.getAbsoluteWidth(this.getGui())*l,"px");this.activePaletteIndex=e,this.isAnimating=!0;var u="ag-animating";s.setDisplayed(!0),o.addCssClass(u),s.addCssClass(u),this.chartController.setChartThemeName(this.themes[e]),window.setTimeout((function(){r.style.left="".concat(-parseFloat(c),"px"),a.style.left="0px"}),0),window.setTimeout((function(){i.isAnimating=!1,o.removeCssClass(u),s.removeCssClass(u),o.setDisplayed(!1)}),300)}},t.prototype.destroyMiniCharts=function(){n._.clearElement(this.eMiniChartsContainer),this.miniChartsContainers=this.destroyBeans(this.miniChartsContainers)},t.prototype.destroy=function(){this.destroyMiniCharts(),e.prototype.destroy.call(this)},t.TEMPLATE='<div class="ag-chart-settings-wrapper">\n            <div ref="eMiniChartsContainer" class="ag-chart-settings-mini-charts-container ag-scrollable-container"></div>\n            <div ref="eNavBar" class="ag-chart-settings-nav-bar">\n                <div ref="ePrevBtn" class="ag-chart-settings-prev">\n                    <button type="button" class="ag-button ag-chart-settings-prev-button"></button>\n                </div>\n                <div ref="eCardSelector" class="ag-chart-settings-card-selector"></div>\n                <div ref="eNextBtn" class="ag-chart-settings-next">\n                    <button type="button" class="ag-button ag-chart-settings-next-button"></button>\n                </div>\n            </div>\n        </div>',Kx([(0,n.fsG)("resizeObserverService")],t.prototype,"resizeObserverService",void 0),Kx([(0,n.cqo)("eMiniChartsContainer")],t.prototype,"eMiniChartsContainer",void 0),Kx([(0,n.cqo)("eNavBar")],t.prototype,"eNavBar",void 0),Kx([(0,n.cqo)("eCardSelector")],t.prototype,"eCardSelector",void 0),Kx([(0,n.cqo)("ePrevBtn")],t.prototype,"ePrevBtn",void 0),Kx([(0,n.cqo)("eNextBtn")],t.prototype,"eNextBtn",void 0),Kx([n.NqP],t.prototype,"postConstruct",null),t}(n.wA2),qx=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Xx=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},$x=function(e){function t(t){var i=e.call(this)||this;i.tabs=[];var n=t.controller,o=t.panels,r=t.chartOptionsService;return i.chartController=n,i.chartOptionsService=r,i.panels=o,i}return qx(t,e),t.prototype.init=function(){var e=this;
18this.panels.forEach((function(t){var i=t.replace("chart","").toLowerCase(),n=e.createTab(t,i,e.getPanelClass(i)),o=n.comp,r=n.tab;e.tabs.push(r),e.addDestroyFunc((function(){return e.destroyBean(o)}))})),this.tabbedLayout=new n.WD6({items:this.tabs,cssClass:"ag-chart-tabbed-menu",keepScrollPosition:!0}),this.getContext().createBean(this.tabbedLayout)},t.prototype.createTab=function(e,t,i){var o=document.createElement("div");o.classList.add("ag-chart-tab","ag-chart-".concat(t));var r=new i(this.chartController,this.chartOptionsService);this.getContext().createBean(r),o.appendChild(r.getGui());var s=document.createElement("div"),a=this.chartTranslationService.translate(t);return s.innerText=a,{comp:r,tab:{title:s,titleLabel:a,bodyPromise:n.j_S.resolve(o),getScrollableContainer:function(){var e=o.querySelector(".ag-scrollable-container");return e||o},name:e}}},t.prototype.showTab=function(e){var t=this.tabs[e];this.tabbedLayout.showItem(t)},t.prototype.getGui=function(){return this.tabbedLayout&&this.tabbedLayout.getGui()},t.prototype.destroy=function(){this.parentComponent&&this.parentComponent.isAlive()&&this.destroyBean(this.parentComponent),e.prototype.destroy.call(this)},t.prototype.getPanelClass=function(e){switch(e){case t.TAB_DATA:return qS;case t.TAB_FORMAT:return HE;default:return Yx}},t.TAB_DATA="data",t.TAB_FORMAT="format",Xx([(0,n.fsG)("chartTranslationService")],t.prototype,"chartTranslationService",void 0),Xx([n.NqP],t.prototype,"init",null),t}(n.wA2),Zx=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Jx=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Qx=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},eO=function(e,t,i){if(i||2===arguments.length)for(var n,o=0,r=t.length;o<r;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},tO=function(e){function t(i,n,o,r){var s=e.call(this,t.TEMPLATE)||this;return s.eChartContainer=i,s.eMenuPanelContainer=n,s.chartController=o,s.chartOptionsService=r,s.buttons={chartSettings:["menu",function(){return s.showMenu(s.defaultPanel)}],chartData:["menu",function(){return s.showMenu("chartData")}],chartFormat:["menu",function(){return s.showMenu("chartFormat")}],chartLink:["linked",function(e){return s.toggleDetached(e)}],chartUnlink:["unlinked",function(e){return s.toggleDetached(e)}],chartDownload:["save",function(){return s.saveChart()}]},s.panels=[],s.buttonListenersDestroyFuncs=[],s.menuVisible=!1,s}return Zx(t,e),t.prototype.postConstruct=function(){var e=this;this.createButtons(),this.addManagedListener(this.eventService,n.zW2.EVENT_CHART_CREATED,(function(t){var i;if(t.chartId===e.chartController.getChartId()){var n=Boolean(null===(i=e.gridOptionsService.get("chartToolPanelsDef"))||void 0===i?void 0:i.defaultToolPanel);n&&e.showMenu(e.defaultPanel,!1)}})),this.refreshMenuClasses(),!this.gridOptionsService.get("suppressChartToolPanelsButton")&&this.panels.length>0&&(this.getGui().classList.add("ag-chart-tool-panel-button-enable"),this.addManagedListener(this.eHideButton,"click",this.toggleMenu.bind(this))),this.addManagedListener(this.chartController,jS.EVENT_CHART_API_UPDATE,this.createButtons.bind(this))},t.prototype.isVisible=function(){return this.menuVisible},t.prototype.getExtraPaddingDirections=function(){var e=this,t=["chartLink","chartUnlink","chartDownload"],i=["chartSettings","chartData","chartFormat"],n=[];return t.some((function(t){return e.chartToolbarOptions.includes(t)}))&&n.push("top"),i.some((function(t){return e.chartToolbarOptions.includes(t)}))&&n.push(this.gridOptionsService.get("enableRtl")?"left":"right"),n},t.prototype.getToolbarOptions=function(){var e,t,i,o=this,r=Boolean(this.gridOptionsService.get("
18chartToolPanelsDef"));if(r){var s=[this.chartController.isChartLinked()?"chartLink":"chartUnlink","chartDownload"],a=this.gridOptionsService.getCallback("getChartToolbarItems"),l={defaultItems:s},c=a?a(l).filter((function(e){if(!n.WU2.includes(e)){var t=n.sO1.includes(e)?"AG Grid: '".concat(e,"' is a Chart Tool Panel option and will be ignored since 'chartToolPanelsDef' is used. Please use 'chartToolPanelsDef.panels' grid option instead"):"AG Grid: '".concat(e,"' is not a valid Chart Toolbar Option");return console.warn(t),!1}return!0})):s,u=null===(t=null===(e=this.gridOptionsService.get("chartToolPanelsDef"))||void 0===e?void 0:e.panels)||void 0===t?void 0:t.map((function(e){var t=n.d2Z[e];return t||console.warn("AG Grid - invalid panel in chartToolPanelsDef.panels: '".concat(e,"'")),t})).filter((function(e){return Boolean(e)}));this.panels=u||Object.values(n.d2Z),this.chartController.isPivotChart()&&(this.panels=this.panels.filter((function(e){return"chartData"!==e})));var d=null===(i=this.gridOptionsService.get("chartToolPanelsDef"))||void 0===i?void 0:i.defaultToolPanel;return this.defaultPanel=d&&n.d2Z[d]||this.panels[0],this.panels.length>0?eO([this.panels[0]],Qx(c),!1):c}var p=["chartSettings","chartData","chartFormat",this.chartController.isChartLinked()?"chartLink":"chartUnlink","chartDownload"];a=this.gridOptionsService.getCallback("getChartToolbarItems");if(a){var h=this.gridOptionsService.get("suppressChartToolPanelsButton");l={defaultItems:h?p:n.WU2};p=a(l).filter((function(e){if(!o.buttons[e])return console.warn("AG Grid: '".concat(e,"' is not a valid Chart Toolbar Option")),!1;if(!h&&n.sO1.includes(e)){var t="AG Grid: '".concat(e,"' is a Chart Tool Panel option and will be ignored. Please use 'chartToolPanelsDef.panels' grid option instead");return console.warn(t),!1}return!0})),h||(p=p.concat(n.sO1))}this.chartController.isPivotChart()&&(p=p.filter((function(e){return"chartData"!==e})));var f=["chartUnlink","chartLink","chartDownload"];return this.panels=p.filter((function(e){return-1===f.indexOf(e)})),this.defaultPanel=this.panels[0],p.filter((function(e){return-1!==f.indexOf(e)||o.panels.length&&e===o.panels[0]}))},t.prototype.toggleDetached=function(e){var t=e.target,i=t.classList.contains("ag-icon-linked");t.classList.toggle("ag-icon-linked",!i),t.classList.toggle("ag-icon-unlinked",i);var n=i?"chartUnlinkToolbarTooltip":"chartLinkToolbarTooltip",o=this.chartTranslationService.translate(n);o&&(t.title=o),this.chartController.detachChartRange()},t.prototype.createButtons=function(){var e=this;this.buttonListenersDestroyFuncs.forEach((function(e){return e()})),this.buttonListenersDestroyFuncs=[],this.chartToolbarOptions=this.getToolbarOptions();var t=this.eMenu;n._.clearElement(t),this.chartToolbarOptions.forEach((function(i){var o=e.buttons[i],r=Qx(o,2),s=r[0],a=r[1],l=n._.createIconNoSpan(s,e.gridOptionsService,void 0,!0);l.classList.add("ag-chart-menu-icon");var c=e.chartTranslationService.translate(i+"ToolbarTooltip");c&&l instanceof HTMLElement&&(l.title=c),e.buttonListenersDestroyFuncs.push(e.addManagedListener(l,"click",a)),t.appendChild(l)}))},t.prototype.saveChart=function(){var e={type:t.EVENT_DOWNLOAD_CHART};this.dispatchEvent(e)},t.prototype.createMenuPanel=function(e){var t=this,i=this.environment.chartMenuPanelWidth(),o=this.menuPanel=this.createBean(new n.wSp({minWidth:i,width:i,height:"100%",closable:!0,hideTitleBar:!0,cssIdentifier:"chart-menu"}));return o.setParentComponent(this),this.eMenuPanelContainer.appendChild(o.getGui()),this.tabbedMenu=this.createBean(new $x({controller:this.chartController,type:this.chartController.getChartType(),panels:this.panels,chartOptionsService:this.chartOptionsService})),this.addManagedListener(o,n.wA2.EVENT_DESTROYED,(function(){return t.destroyBean(t.tabbedMenu)})),new n.j_S((function(i){window.setTimeout((function(){o.setBodyComponent(t.tabbedMenu),t.tabbedMenu.showTab(e),i(o),t.addManagedListener(t.eChartContainer,"click",(function(e){t.getGui().contains(e.target)||t.menuVisible&&t.hideMenu()}))}),100)}))},t.prototype.showContainer=function(){this.menuPanel&&(this.menuVisible=!0,this.showParent(this.menuPanel.getWidth()),this.refreshMenuClasses())},t.prototype.toggleMenu=function(){this.menuVisible?this.hideMenu():this.showMenu()},t.prototype.showMenu=function(e,t){var i=this;if(void 0===t&&(t=!0),t||this.eMenuPanelContainer.classList.add("ag-no-transition"),this.menuPanel&&!e)this.showContainer();else{var n=e||this.defaultPanel,o=this.panels.indexOf(n);o<0&&(console.warn("AG Grid: '".concat(e,"' is not a valid Chart Tool Panel name")),o=this.panels.indexOf(this.defaultPanel)),this.menuPanel?(this.tabbedMenu.showTab(o),this.showContainer()):this.createMenuPanel(o).then(this.showContainer.bind(this))}t||setTimeout((function(){i.isAlive()&&i.eMenuPanelContainer.classList.remove("ag-no-transition")}),500)},t.prototype.hideMenu=function(){var e=this;this.hideParent(),window.setTimeout((function(){e.menuVisible=!1,e.refreshMenuClasses()}),500)},t.prototype.refreshMenuClasses=function(){this.eChartContainer.classList.toggle("ag-chart-menu-visible",this.menuVisible),this.eChartContainer.classList.toggle("ag-chart-menu-hidden",!this.menuVisible),this.gridOptionsService.get("suppressChartToolPanelsButton")||(this.eHideButtonIcon.classList.toggle("ag-icon-contracted",this.menuVisible),this.eHideButtonIcon.classList.toggle("ag-icon-expanded",!this.menuVisible))},t.prototype.showParent=function(e){this.eMenuPanelContainer.style.minWidth="".concat(e,"px")},t.prototype.hideParent=function(){this.eMenuPanelContainer.style.minWidth="0"},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.menuPanel&&this.menuPanel.isAlive()&&this.destroyBean(this.menuPanel),this.tabbedMenu&&this.tabbedMenu.isAlive()&&this.destroyBean(this.tabbedMenu)},t.EVENT_DOWNLOAD_CHART="downloadChart",t.TEMPLATE='<div>\n        <div class="ag-chart-menu" ref="eMenu"></div>\n        <button class="ag-button ag-chart-menu-close" ref="eHideButton">
18\n            <span class="ag-icon ag-icon-contracted" ref="eHideButtonIcon"></span>\n        </button>\n    </div>',Jx([(0,n.fsG)("chartTranslationService")],t.prototype,"chartTranslationService",void 0),Jx([(0,n.cqo)("eMenu")],t.prototype,"eMenu",void 0),Jx([(0,n.cqo)("eHideButton")],t.prototype,"eHideButton",void 0),Jx([(0,n.cqo)("eHideButtonIcon")],t.prototype,"eHideButtonIcon",void 0),Jx([n.NqP],t.prototype,"postConstruct",null),t}(n.wA2),iO=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),nO=function(){return nO=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},nO.apply(this,arguments)},oO=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},rO=function(e){var t="function"===typeof Symbol&&Symbol.iterator,i=t&&e[t],n=0;if(i)return i.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},sO=function(e){function t(i){var n=e.call(this,t.TEMPLATE)||this;return n.chartMenu=i,n.destroyableChartListeners=[],n.editing=!1,n}return iO(t,e),t.prototype.init=function(){var e=this;this.addManagedListener(this.getGui(),"keydown",(function(t){e.editing&&"Enter"===t.key&&!t.shiftKey&&(e.handleEndEditing(),t.preventDefault())})),this.addManagedListener(this.getGui(),"input",(function(){e.editing&&e.updateHeight()})),this.addManagedListener(this.getGui(),"blur",(function(){return e.endEditing()}))},t.prototype.refreshTitle=function(e,t){var i,n,o=this;this.chartController=e,this.chartOptionsService=t;try{for(var r=rO(this.destroyableChartListeners),s=r.next();!s.done;s=r.next()){var a=s.value;a()}}catch(f){i={error:f}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}this.destroyableChartListeners=[];var l=this.chartController.getChartProxy(),c=l.getChart(),u=c.scene.canvas.element,d=this.addManagedListener(u,"dblclick",(function(e){var t=c.title;if(t&&t.node.containsPoint(e.offsetX,e.offsetY)){var i=t.node.computeBBox(),n=t.node.inverseTransformPoint(i.x,i.y);o.startEditing(nO(nO({},i),n),u.width)}})),p=!1,h=this.addManagedListener(u,"mousemove",(function(e){var t=c.title,i=!!(t&&t.enabled&&t.node.containsPoint(e.offsetX,e.offsetY));p!==i&&(u.style.cursor=i?"pointer":""),p=i}));this.destroyableChartListeners=[d,h]},t.prototype.startEditing=function(e,t){if((!this.chartMenu||!this.chartMenu.isVisible())&&!this.editing){this.editing=!0;var i=300,n=Math.max(Math.min(e.width+20,t),i),o=this.getGui();o.classList.add("currently-editing");var r=o.style;r.fontFamily=this.chartOptionsService.getChartOption("title.fontFamily"),r.fontWeight=this.chartOptionsService.getChartOption("title.fontWeight"),r.fontStyle=this.chartOptionsService.getChartOption("title.fontStyle"),r.fontSize=this.chartOptionsService.getChartOption("title.fontSize")+"px",r.color=this.chartOptionsService.getChartOption("title.color");var s=this.chartOptionsService.getChartOption("title.text"),a=s===this.chartTranslationService.translate("titlePlaceholder");o.value=a?"":s;var l=s.split(/\r?\n/g).length;r.left=Math.round(e.x+e.width/2-n/2-1)+"px",r.top=Math.round(e.y+e.height/2-l*this.getLineHeight()/2-2)+"px",r.width=Math.round(n)+"px",r.lineHeight=this.getLineHeight()+"px",this.updateHeight(),o.focus()}},t.prototype.updateHeight=function(){var e=this.getGui(),t=this.chartOptionsService.getChartOption("title.text").split(/\r?\n/g).length,i=e.value.split(/\r?\n/g).length;e.style.height=Math.round(Math.max(t,i)*this.getLineHeight())+4+"px"},t.prototype.getLineHeight=function(){var e=this.chartOptionsService.getChartOption("title.lineHeight");return e?parseInt(e):Math.round(1.2*parseInt(this.chartOptionsService.getChartOption("title.fontSize")))},t.prototype.handleEndEditing=function(){var e=this,t=this.chartOptionsService.getChartOption("title.color"),i="rgba(0, 0, 0, 0)";this.chartOptionsService.setChartOption("title.color",i),this.chartOptionsService.awaitChartOptionUpdate((function(){return e.endEditing()})),this.chartOptionsService.awaitChartOptionUpdate((function(){e.chartOptionsService.setChartOption("title.color",t)}))},t.prototype.endEditing=function(){var e=this;if(this.editing){this.editing=!1;var t=this.getGui().value;t&&""!==t.trim()?(this.chartOptionsService.setChartOption("title.text",t),this.chartOptionsService.setChartOption("title.enabled",!0)):(this.chartOptionsService.setChartOption("title.text",""),this.chartOptionsService.setChartOption("title.enabled",!1)),this.getGui().classList.remove("currently-editing"),this.chartOptionsService.awaitChartOptionUpdate((function(){e.eventService.dispatchEvent({type:"chartTitleEdit"})}))}},t.TEMPLATE='<textarea\n             class="ag-chart-title-edit"\n             style="padding:0; border:none; border-radius: 0; min-height: 0; text-align: center; resize: none;" />\n        ',oO([(0,n.fsG)("chartTranslationService")],t.prototype,"chartTranslationService",void 0),oO([n.NqP],t.prototype,"init",null),t}(n.wA2),aO=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),lO=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},cO=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return aO(t,e),t.prototype.getData=function(e){if(e.crossFiltering){if(e.grouping)return console.warn("AG Grid: crossing filtering with row grouping is not supported."),{chartData:[],columnNames:{}};if(!this.gridOptionsService.isRowModelType("clientSide"))return console.warn("AG Grid: crossing filtering is only supported in the client side row model."),{chartData:[],columnNames:{}}}var t=this.gridOptionsService.isRowModelType("serverSide");t&&e.pivoting&&this.updatePivotKeysForSSRM();var i=this.extractRowsFromGridRowModel(e);return i.chartData=this.aggregateRowsByDimension(e,i.chartData),i},t.prototype.extractRowsFromGridRowModel=function(e){var i,o=this,r=[],s={},a={},l={},c={},u=[];
18if(e.crossFiltering)c=this.getFilteredRowNodes(),u=this.getAllRowNodes(),i=u.length;else{var d=this.gridRowModel.getRowCount()-1,p=e.endRow>=0?Math.min(e.endRow,d):d;i=p-e.startRow+1}for(var h=function(i){var n={},d=e.crossFiltering?u[i]:f.gridRowModel.getRow(i+e.startRow);e.dimensionCols.forEach((function(r){var s=r.colId,c=o.columnModel.getGridColumn(s);if(c){var u=o.valueService.getValue(c,d);if(e.grouping){var p=u&&u.toString?String(u.toString()):"",h=t.getGroupLabels(d,p);n[s]={labels:h,toString:function(){return this.labels.filter((function(e){return!!e})).reverse().join(" - ")}},d.group&&(a[h.toString()]=i);var f=h.slice(1,h.length).toString();f&&(l[f]=a[f])}else n[s]=u}else n[wO.DEFAULT_CATEGORY]=i+1})),e.valueCols.forEach((function(t){var i=[],r=t.getColDef().pivotKeys;r&&(i=r.slice());var a=t.getColDef().headerName;a&&i.push(a),i.length>0&&(s[t.getId()]=i);var l=t.getColId();if(e.crossFiltering){var u=l+"-filtered-out",p=o.valueService.getValue(t,d),h=null!=p&&"function"===typeof p.toNumber?p.toNumber():p;c[d.id]?(n[l]=h,n[u]=e.aggFunc||e.isScatter?void 0:0):(n[l]=e.aggFunc||e.isScatter?void 0:0,n[u]=h)}else{p=o.valueService.getValue(t,d);p&&p.hasOwnProperty("toString")&&(p=parseFloat(p.toString())),n[l]=null!=p&&"function"===typeof p.toNumber?p.toNumber():p}})),d.footer&&(n.footer=!0),r.push(n)},f=this,g=0;g<i;g++)h(g);if(e.grouping){var v=n._.values(l),y=function(e,t){return!e.footer&&!n._.includes(v,t)};r=r.filter(y)}return{chartData:r,columnNames:s}},t.prototype.aggregateRowsByDimension=function(e,t){var i=this,o=e.dimensionCols;if(!e.aggFunc||0===o.length)return t;var r=n._.last(o),s=r&&r.colId,a={},l=[];return t.forEach((function(e){var t=a;o.forEach((function(i){var n=i.colId,r=e[n];if(n===s){var a=t[r];a||(a={__children:[]},o.forEach((function(t){var i=t.colId;a[i]=e[i]})),t[r]=a,l.push(a)),a.__children.push(e)}else t[r]||(t[r]={}),t=t[r]}))})),n.O3h.__assertRegistered(n.GXE.RowGroupingModule,"Charting Aggregation",this.context.getGridId())&&l.forEach((function(t){return e.valueCols.forEach((function(o){if(e.crossFiltering)e.valueCols.forEach((function(n){var o=n.getColId(),r=t.__children.filter((function(e){return"undefined"!==typeof e[o]})).map((function(e){return e[o]})),s=i.aggregationStage.aggregateValues(r,e.aggFunc);t[n.getId()]=s&&"undefined"!==typeof s.value?s.value:s;var a="".concat(o,"-filtered-out"),l=t.__children.filter((function(e){return"undefined"!==typeof e[a]})).map((function(e){return e[a]})),c=i.aggregationStage.aggregateValues(l,e.aggFunc);t[a]=c&&"undefined"!==typeof c.value?c.value:c}));else{var r=t.__children.map((function(e){return e[o.getId()]})),s=0;n.O3h.__assertRegistered(n.GXE.RowGroupingModule,"Charting Aggregation",i.context.getGridId())&&(s=i.aggregationStage.aggregateValues(r,e.aggFunc)),t[o.getId()]=s&&"undefined"!==typeof s.value?s.value:s}}))})),l},t.prototype.updatePivotKeysForSSRM=function(){var e=this.columnModel.getSecondaryColumns();if(e){var t=this.extractPivotKeySeparator(e);e.forEach((function(e){if(""===t)e.getColDef().pivotKeys=[];else{var i=e.getColId().split(t);e.getColDef().pivotKeys=i.slice(0,i.length-1)}}))}},t.prototype.extractPivotKeySeparator=function(e){if(0===e.length)return"";var t=function(e,i){var n=e.getGroupId();return e.getParent()?t(e.getParent(),n):i.split(n)[1][0]},i=e[0];return null==i.getParent()?"":t(i.getParent(),i.getColId())},t.getGroupLabels=function(e,t){var i=[t];while(e&&0!==e.level)e=e.parent,e&&i.push(e.key);return i},t.prototype.getFilteredRowNodes=function(){var e={};return this.gridRowModel.forEachNodeAfterFilterAndSort((function(t){e[t.id]=t})),e},t.prototype.getAllRowNodes=function(){var e=[];return this.gridRowModel.forEachNode((function(t){e.push(t)})),this.sortRowNodes(e)},t.prototype.sortRowNodes=function(e){var t=this.sortController.getSortOptions(),i=!t||0==t.length;return i?e:this.rowNodeSorter.doFullSort(e,t)},lO([(0,n.fsG)("rowModel")],t.prototype,"gridRowModel",void 0),lO([(0,n.fsG)("valueService")],t.prototype,"valueService",void 0),lO([(0,n.fsG)("columnModel")],t.prototype,"columnModel",void 0),lO([(0,n.fsG)("rowNodeSorter")],t.prototype,"rowNodeSorter",void 0),lO([(0,n.fsG)("sortController")],t.prototype,"sortController",void 0),lO([(0,n.FiY)("aggregationStage")],t.prototype,"aggregationStage",void 0),t}(n.AS9),uO=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),dO=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},pO=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return uO(t,e),t.prototype.getColumn=function(e){return this.columnModel.getPrimaryColumn(e)},t.prototype.getAllDisplayedColumns=function(){return this.columnModel.getAllDisplayedColumns()},t.prototype.getColDisplayName=function(e){return this.columnModel.getDisplayNameForColumn(e,"chart")},t.prototype.getRowGroupColumns=function(){return this.columnModel.getRowGroupColumns()},t.prototype.getGroupDisplayColumns=function(){return this.columnModel.getGroupDisplayColumns()},t.prototype.isPivotMode=function(){return this.columnModel.isPivotMode()},t.prototype.isPivotActive=function(){return this.columnModel.isPivotActive()},t.prototype.getChartColumns=function(){var e=this,t=this.columnModel.getAllDisplayedColumns(),i=new Set,n=new Set;return t.forEach((function(t){var o=t.getColDef(),r=o.chartDataType;if(r)switch(r){case"category":case"time":return void i.add(t);case"series":return void n.add(t);case"excluded":return;default:console.warn("AG Grid: unexpected chartDataType value '".concat(r,"' supplied, instead use 'category', 'series' or 'excluded'"));break}"ag-Grid-AutoColumn"!==o.colId?t.isPrimary()?(e.isNumberCol(t)?n:i).add(t):n.add(t):i.add(t)})),{dimensionCols:i,valueCols:n}},t.prototype.isNumberCol=function(e){if("ag-Grid-AutoColumn"===e.getColId())return!1;var t=this.rowRenderer.getRowNode({rowIndex:0,rowPinned:null});if(!t)return!1;var i=this.valueService.getValue(e,t);return null==i&&(i=this.extractLeafData(t,e)),null!=i&&"function"===typeof i.toNumber&&(i=i.toNumber()),"number"===typeof i},t.prototype.extractLeafData=function(e,t){if(!e.allLeafChildren)return null;for(var i=0;i<e.allLeafChildren.length;i++){var n=e.allLeafChildren[i],o=this.valueService.getValue(t,n);if(null!=o)return o}return null},dO([(0,n.fsG)("columnModel")],t.prototype,"columnModel",void 0),dO([(0,n.fsG)("valueService")],t.prototype,"valueService",void 0),dO([(0,n.fsG)("rowRenderer")],t.prototype,"rowRenderer",void 0),t=dO([(0,n.Vu6)("chartColumnService")],t),t}(n.AS9),hO=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),fO=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},gO=function(e){function t(t){var i,n=this;return n=e.call(this)||this,n.suppressComboChartWarnings=!1,n.chartDataModel=t,n.seriesChartTypes=null!==(i=t.params.seriesChartTypes)&&void 0!==i?i:[],n}return hO(t,e),t.prototype.init=function(){this.initComboCharts()},t.prototype.update=function(e){this.seriesChartTypes=null!==e&&void 0!==e?e:this.seriesChartTypes,this.initComboCharts(),this.updateSeriesChartTypes()},t.prototype.initComboCharts=function(){var e=this.seriesChartTypes&&this.seriesChartTypes.length>0,t="customCombo"===this.chartDataModel.chartType||e;t&&(this.chartDataModel.chartType="customCombo",this.savedCustomSeriesChartTypes=this.seriesChartTypes||[])},t.prototype.updateSeriesChartTypes=function(){this.chartDataModel.isComboChart()&&(this.seriesChartTypes=this.seriesChartTypes.map((function(e){var t=["groupedColumn","stackedColumn","stackedArea"].includes(e.chartType);return e.secondaryAxis=!t&&e.secondaryAxis,e})),"customCombo"!==this.chartDataModel.chartType?this.updateChartSeriesTypesForBuiltInCombos():this.updateSeriesChartTypesForCustomCombo())},t.prototype.updateSeriesChartTypesForCustomCombo=function(){var e=this,i=this.seriesChartTypes&&this.seriesChartTypes.length>0;i||this.suppressComboChartWarnings||console.warn("AG Grid: 'seriesChartTypes' are required when the 'customCombo' chart type is specified."),this.seriesChartTypes=this.seriesChartTypes.map((function(e){return t.SUPPORTED_COMBO_CHART_TYPES.includes(e.chartType)||(console.warn("AG Grid: invali
18d chartType '".concat(e.chartType,"' supplied in 'seriesChartTypes', converting to 'line' instead.")),e.chartType="line"),e}));var n=function(t){e.savedCustomSeriesChartTypes&&0!==e.savedCustomSeriesChartTypes.length||(e.savedCustomSeriesChartTypes=e.seriesChartTypes);var i=e.savedCustomSeriesChartTypes.find((function(e){return e.colId===t.colId}));return i||(t.selected&&!e.suppressComboChartWarnings&&console.warn("AG Grid: no 'seriesChartType' found for colId = '".concat(t.colId,"', defaulting to 'line'.")),{colId:t.colId,chartType:"line",secondaryAxis:!1})},o=this.chartDataModel.valueColState.map(n);this.seriesChartTypes=o,this.savedCustomSeriesChartTypes=o,this.suppressComboChartWarnings=!0},t.prototype.updateChartSeriesTypesForBuiltInCombos=function(){var e=this.chartDataModel,t=e.chartType,i=e.valueColState,n="columnLineCombo"===t?"groupedColumn":"stackedArea",o="columnLineCombo"===t?"line":"groupedColumn",r=i.filter((function(e){return e.selected})),s=Math.ceil(r.length/2);this.seriesChartTypes=r.map((function(e,t){var i=t>=s?o:n;return{colId:e.colId,chartType:i,secondaryAxis:!1}}))},t.SUPPORTED_COMBO_CHART_TYPES=["line","groupedColumn","stackedColumn","area","stackedArea"],fO([n.NqP],t.prototype,"init",null),t}(n.AS9),vO=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),yO=function(){return yO=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},yO.apply(this,arguments)},mO=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},CO=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},bO=function(e,t,i){if(i||2===arguments.length)for(var n,o=0,r=t.length;o<r;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},wO=function(e){function t(t){var i=e.call(this)||this;return i.unlinked=!1,i.chartData=[],i.valueColState=[],i.dimensionColState=[],i.columnNames={},i.crossFiltering=!1,i.grouping=!1,i.params=t,i.chartId=t.chartId,i.chartType=t.chartType,i.pivotChart=t.pivotChart,i.chartThemeName=t.chartThemeName,i.aggFunc=t.aggFunc,i.referenceCellRange=t.cellRange,i.suppliedCellRange=t.cellRange,i.suppressChartRanges=t.suppressChartRanges,i.unlinked=!!t.unlinkChart,i.crossFiltering=!!t.crossFiltering,i}return vO(t,e),t.prototype.init=function(){this.datasource=this.createManagedBean(new cO),this.chartColumnService=this.createManagedBean(new pO),this.comboChartModel=this.createManagedBean(new gO(this)),this.updateCellRanges(),this.updateData()},t.prototype.updateModel=function(e){var t=e.cellRange,i=e.chartType,n=e.pivotChart,o=e.chartThemeName,r=e.aggFunc,s=e.suppressChartRanges,a=e.unlinkChart,l=e.crossFiltering,c=e.seriesChartTypes;t!==this.suppliedCellRange&&(this.dimensionCellRange=void 0,this.valueCellRange=void 0),this.chartType=i,this.pivotChart=n,this.chartThemeName=o,this.aggFunc=r,this.referenceCellRange=t,this.suppliedCellRange=t,this.suppressChartRanges=s,this.unlinked=!!a,this.crossFiltering=!!l,this.updateSelectedDimension(null===t||void 0===t?void 0:t.columns),this.updateCellRanges();var u=this.isComboChart()||c;u&&this.comboChartModel.update(c),this.unlinked||this.updateData()},t.prototype.updateCellRanges=function(e){this.valueCellRange&&(this.referenceCellRange=this.valueCellRange);var t=this.chartColumnService.getChartColumns(),i=t.dimensionCols,n=t.valueCols,o=this.getAllColumnsFromRanges();e&&this.updateColumnState(e),this.setDimensionCellRange(i,o,e),this.setValueCellRange(n,o,e),e||(this.resetColumnState(),this.syncDimensionCellRange()),this.comboChartModel.updateSeriesChartTypes()},t.prototype.updateData=function(){var e=this.getRowIndexes(),t=e.startRow,i=e.endRow;this.pivotChart&&this.resetColumnState(),this.grouping=this.isGrouping();
18var o={aggFunc:this.aggFunc,dimensionCols:[this.getSelectedDimension()],grouping:this.grouping,pivoting:this.isPivotActive(),crossFiltering:this.crossFiltering,valueCols:this.getSelectedValueCols(),startRow:t,endRow:i,isScatter:n._.includes(["scatter","bubble"],this.chartType)},r=this.datasource.getData(o),s=r.chartData,a=r.columnNames;this.chartData=s,this.columnNames=a},t.prototype.isGrouping=function(){var e=this.gridOptionsService.get("treeData"),t=e?null:this.chartColumnService.getRowGroupColumns(),i=e||t&&t.length>0,n=this.getSelectedDimension().colId,o=this.chartColumnService.getGroupDisplayColumns(),r=o.map((function(e){return e.getColId()})).some((function(e){return e===n}));return!!i&&r},t.prototype.getSelectedValueCols=function(){return this.valueColState.filter((function(e){return e.selected})).map((function(e){return e.column}))},t.prototype.getSelectedDimension=function(){return this.dimensionColState.filter((function(e){return e.selected}))[0]},t.prototype.getColDisplayName=function(e){return this.chartColumnService.getColDisplayName(e)},t.prototype.isPivotMode=function(){return this.chartColumnService.isPivotMode()},t.prototype.getChartDataType=function(e){var t=this.chartColumnService.getColumn(e);return t?t.getColDef().chartDataType:void 0},t.prototype.isPivotActive=function(){return this.chartColumnService.isPivotActive()},t.prototype.createCellRange=function(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];return{id:this.chartId,startRow:this.referenceCellRange.startRow,endRow:this.referenceCellRange.endRow,columns:t,startColumn:e===n.StC.DIMENSION?t[0]:this.referenceCellRange.startColumn,type:e}},t.prototype.getAllColumnsFromRanges=function(){if(this.pivotChart)return n._.convertToSet(this.chartColumnService.getAllDisplayedColumns());var e=this.dimensionCellRange||this.valueCellRange?[]:this.referenceCellRange.columns;return this.dimensionCellRange&&e.push.apply(e,bO([],CO(this.dimensionCellRange.columns),!1)),this.valueCellRange&&e.push.apply(e,bO([],CO(this.valueCellRange.columns),!1)),n._.convertToSet(e)},t.prototype.getRowIndexes=function(){var e=0,t=0,i=this,n=i.rangeService,o=i.valueCellRange;if(n&&o){e=n.getRangeStartRow(o).rowIndex;var r=n.getRangeEndRow(o);t="bottom"===r.rowPinned?-1:r.rowIndex}return{startRow:e,endRow:t}},t.prototype.resetColumnState=function(){var e=this,i=this.chartColumnService.getChartColumns(),o=i.dimensionCols,r=i.valueCols,s=this.getAllColumnsFromRanges(),a=this.valueColState.length<1;this.dimensionColState=[],this.valueColState=[];var l=!1,c=1,u=this.suppliedCellRange.columns[0];o.forEach((function(t){var i="ag-Grid-AutoColumn"===t.getColId(),n=!1;e.crossFiltering&&e.aggFunc?u.getColId()===t.getColId()&&(n=!0):n=!!i||!l&&s.has(t),e.dimensionColState.push({column:t,colId:t.getColId(),displayName:e.getColDisplayName(t),selected:n,order:c++}),n&&(l=!0)}));var d={colId:t.DEFAULT_CATEGORY,displayName:this.chartTranslationService.translate("defaultCategory"),selected:!l,order:0};this.dimensionColState.unshift(d);var p=this.referenceCellRange.columns.filter((function(e){return r.has(e)}));r.forEach((function(t){a&&n._.includes(e.referenceCellRange.columns,t)&&(t=p.shift()),e.valueColState.push({column:t,colId:t.getColId(),displayName:e.getColDisplayName(t),selected:s.has(t),order:c++})}))},t.prototype.updateColumnState=function(e){var t=function(t){return t.colId===e.colId},i=this,n=i.dimensionColState,o=i.valueColState;n.filter(t).length>0?n.forEach((function(e){return e.selected=t(e)})):o.filter(t).forEach((function(t){return t.selected=e.selected}));var r=bO(bO([],CO(n),!1),CO(o),!1),s=[];r.forEach((function(t,i){i===e.order&&s.push(e.colId),t.colId!==e.colId&&s.push(t.colId)})),r.forEach((function(e){var t=s.indexOf(e.colId);e.order=t>=0?s.indexOf(e.colId):r.length-1})),this.reorderColState()},t.prototype.reorderColState=function(){var e=function(e,t){return e.order-t.order};this.dimensionColState.sort(e),this.valueColState.sort(e)},t.prototype.setDimensionCellRange=function(e,i,o){var r=this;if(this.dimensionCellRange=void 0,o||this.dimensionColState.length){var s=o;if(this.crossFiltering&&this.aggFunc){var a=this.suppliedCellRange.columns[0];s=this.dimensionColState.filter((function(e){return e.colId===a.getColId()}))[0]}else s&&e.has(s.column)||(s=this.dimensionColState.filter((function(e){return e.selected}))[0]);s&&s.colId!==t.DEFAULT_CATEGORY&&(this.dimensionCellRange=this.createCellRange(n.StC.DIMENSION,s.column))}else e.forEach((function(e){!r.dimensionCellRange&&i.has(e)&&(r.dimensionCellRange=r.createCellRange(n.StC.DIMENSION,e))}))},t.prototype.setValueCellRange=function(e,t,i){this.valueCellRange=void 0;var o=[];
18if(e.forEach((function(e){i&&i.colId===e.getColId()?i.selected&&o.push(i.column):t.has(e)&&o.push(e)})),o.length>0){var r=[];this.valueColState.length>0?r=this.valueColState.map((function(e){return e.colId})):t.forEach((function(e){return r.push(e.getColId())})),o.sort((function(e,t){return r.indexOf(e.getColId())-r.indexOf(t.getColId())})),this.valueCellRange=this.createCellRange.apply(this,bO([n.StC.VALUE],CO(o),!1))}},t.prototype.updateSelectedDimension=function(e){var t=new Set(e.map((function(e){return e.getColId()}))),i=this.dimensionColState.find((function(e){return t.has(e.colId)}))||this.dimensionColState[0];this.dimensionColState=this.dimensionColState.map((function(e){return yO(yO({},e),{selected:e.colId===i.colId})}))},t.prototype.syncDimensionCellRange=function(){var e=this.getSelectedDimension();e&&e.column&&(this.dimensionCellRange=this.createCellRange(n.StC.DIMENSION,e.column))},t.prototype.isComboChart=function(){return["columnLineCombo","areaColumnCombo","customCombo"].includes(this.chartType)},t.DEFAULT_CATEGORY="AG-GRID-DEFAULT-CATEGORY",mO([(0,n.fsG)("rangeService")],t.prototype,"rangeService",void 0),mO([(0,n.fsG)("chartTranslationService")],t.prototype,"chartTranslationService",void 0),mO([n.NqP],t.prototype,"init",null),t}(n.AS9);function SO(e){return null!=e.chart?e.chart:e}var EO=function(){return EO=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},EO.apply(this,arguments)},xO=function(){function e(e){this.chartProxyParams=e,this.clearThemeOverrides=!1,this.chart=e.chartInstance,this.chartType=e.chartType,this.crossFiltering=e.crossFiltering,this.crossFilterCallback=e.crossFilterCallback,this.standaloneChartType=vS(this.chartType),null==this.chart?this.chart=Xw.create(this.getCommonChartOptions()):this.clearThemeOverrides=!0}return e.prototype.getChart=function(){return SO(this.chart)},e.prototype.getChartRef=function(){return this.chart},e.prototype.downloadChart=function(e,t,i){var n=this.chart,o=SO(n),r=t||(o.title?o.title.text:"chart"),s=e||{},a=s.width,l=s.height;Xw.download(n,{width:a,height:l,fileName:r,fileFormat:i})},e.prototype.getChartImageDataURL=function(e){return this.getChart().scene.getDataURL(e)},e.prototype.getChartOptions=function(){return this.chart.getOptions()},e.prototype.getChartThemeOverrides=function(){var e,t=this.getChartOptions().theme;return null!==(e=t.overrides)&&void 0!==e?e:{}},e.prototype.getChartPalette=function(){return uS.getChartTheme(this.getChartOptions().theme).palette},e.prototype.setPaired=function(e){var t,i=vS(this.chartProxyParams.chartType);Xw.updateDelta(this.chart,{theme:{overrides:(t={},t[i]={paired:e},t)}})},e.prototype.isPaired=function(){var e=vS(this.chartProxyParams.chartType);return n._.get(this.getChartThemeOverrides(),"".concat(e,".paired"),!0)},e.prototype.lookupCustomChartTheme=function(e){return DS(this.chartProxyParams,e)},e.prototype.transformData=function(e,t,i){return i?e.map((function(e,i){var n=e[t],o=n&&n.toString?n.toString():"",r=EO({},e);return r[t]={id:i,value:n,toString:function(){return o}},r})):e},e.prototype.getCommonChartOptions=function(e){var t,i,n=this.clearThemeOverrides?{}:null!==(i=null===(t=this.chart)||void 0===t?void 0:t.getOptions())&&void 0!==i?i:{},o=null!=this.chart?{overrides:this.getActiveFormattingPanelOverrides()}:{};return this.clearThemeOverrides=!1,EO(EO({},n),{theme:EO(EO({},bS(this.chartProxyParams,this)),e?{overrides:e}:o),container:this.chartProxyParams.parentElement,mode:"integrated"})},e.prototype.getActiveFormattingPanelOverrides=function(){var e,t;if(this.clearThemeOverrides)return{};var i=null===(e=this.chart)||void 0===e?void 0:e.getOptions().theme;return null!==(t=null===i||void 0===i?void 0:i.overrides)&&void 0!==t?t:{}},e.prototype.destroy=function(e){var t=void 0===e?{}:e,i=t.keepChartInstance,n=void 0!==i&&i;if(n)return this.chart;this.destroyChart()},e.prototype.destroyChart=function(){this.chart&&(this.chart.destroy(),this.chart=void 0)},e}(),OO=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),TO=function(){return TO=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},TO.apply(this,arguments)},DO=function(e){function t(t){var i=e.call(this,t)||this;return i.crossFilteringAllPoints=new Set,i.crossFilteringSelectedPoints=[],i}return OO(t,e),t.prototype.update=function(e){var t=this.getAxes(e),i=TO(TO({},this.getCommonChartOptions(e.updatedOverrides)),{data:this.getData(e,t),axes:t,series:this.getSeries(e)});Xw.update(this.getChartRef(),i)},t.prototype.getData=function(e,t){var i,n=["area","line"].includes(this.standaloneChartType),o="category"===(null===(i=t.filter((function(e){return"bottom"===e.position}))[0])||void 0===i?void 0:i.type);return this.crossFiltering&&n?this.getCrossFilterData(e):this.getDataTransformedData(e,o)},t.prototype.getDataTransformedData=function(e,t){return this.transformData(e.data,e.category.id,t)},t.prototype.getXAxisType=function(e){return e.grouping?"grouped-category":t.isTimeAxis(e)?"time":"category"},t.isTimeAxis=function(e){if(e.category&&e.category.chartDataType)return"time"===e.category.chartDataType;var t=e.data[0];return(t&&t[e.category.id])instanceof Date},t.prototype.crossFilteringReset=function(){this.crossFilteringSelectedPoints=[],this.crossFilteringAllPoints.clear()},t.prototype.crossFilteringPointSelected=function(e){return 0==this.crossFilteringSelectedPoints.length||this.crossFilteringSelectedPoints.includes(e)},t.prototype.crossFilteringDeselectedPoints=function(){return this.crossFilteringSelectedPoints.length>0&&this.crossFilteringAllPoints.size!==this.crossFilteringSelectedPoints.length},t.prototype.extractLineAreaCrossFilterSeries=function(e,t){var i=this,n=function(e){if("area"===i.standaloneChartType){var n=t.getCrossFilteringContext().lastSelectedChartId;return n===t.chartId?e+"-total":e}return e+"-total"};return e.map((function(e){return e.yKey=n(e.yKey),e.listeners={nodeClick:function(t){var n=t.datum[e.xKey],o=t.event.metaKey||t.event.ctrlKey;i.crossFilteringAddSelectedPoint(o,n),i.crossFilterCallback(t)}},e.marker={formatter:function(e){var n=e.datum[t.category.id];return{fill:e.highlighted?"yellow":e.fill,size:e.highlighted?14:i.crossFilteringPointSelected(n)?8:0}}},"area"===i.standaloneChartType&&(e.fillOpacity=i.crossFilteringDeselectedPoints()?.3:1),"line"===i.standaloneChartType&&(e.strokeOpacity=i.crossFilteringDeselectedPoints()?.3:1),e}))},t.prototype.getCrossFilterData=function(e){var t=this;this.crossFilteringAllPoints.clear();var i=e.fields[0].colId,n="".concat(i,"-filtered-out"),o=e.getCrossFilteringContext().lastSelectedChartId;return e.data.map((function(r){var s=r[e.category.id];t.crossFilteringAllPoints.add(s);var a=t.crossFilteringPointSelected(s);return"area"===t.standaloneChartType&&o===e.chartId&&(r["".concat(i,"-total")]=a?r[i]:r[i]+r[n]),"line"===t.standaloneChartType&&(r["".concat(i,"-total")]=a?r[i]:r[i]+r[n]),r}))},t.prototype.crossFilteringAddSelectedPoint=function(e,t){e?this.crossFilteringSelectedPoints.push(t):this.crossFilteringSelectedPoints=[t]},t}(xO);function RO(e){return Array.isArray(e)?[]:{}}function AO(e,t){return!1!==t.clone&&t.isMergeableObject(e)?BO(RO(e),e,t):e}function _O(e,t,i){return e.concat(t).map((function(e){return AO(e,i
18)}))}function PO(e,t){if(!t.customMerge)return BO;var i=t.customMerge(e);return"function"===typeof i?i:BO}function MO(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return e.propertyIsEnumerable(t)})):[]}function kO(e){return Object.keys(e).concat(MO(e))}function NO(e,t){try{return t in e}catch(i){return!1}}function LO(e,t){return NO(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function IO(e,t,i){void 0===e&&(e={}),void 0===t&&(t={});var n={};return i.isMergeableObject(e)&&kO(e).forEach((function(t){n[t]=AO(e[t],i)})),kO(t).forEach((function(o){LO(e,o)||(NO(e,o)&&i.isMergeableObject(t[o])?n[o]=PO(o,i)(e[o],t[o],i):n[o]=AO(t[o],i))})),n}function FO(e){return GO(e)&&!VO(e)}function GO(e){return!!e&&"object"===typeof e}function VO(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t}function BO(e,t,i){i=i||{},i.arrayMerge=i.arrayMerge||_O,i.isMergeableObject=i.isMergeableObject||FO,i.cloneUnlessOtherwiseSpecified=AO;var n=Array.isArray(t),o=Array.isArray(e),r=n===o;return r?n?i.arrayMerge(e,t,i):IO(e,t,i):AO(t,i)}function jO(e,t){var i=parseInt(e.slice(1,3),16),n=parseInt(e.slice(3,5),16),o=parseInt(e.slice(5,7),16);return t?"rgba(".concat(i,", ").concat(n,", ").concat(o,", ").concat(t,")"):"rgba(".concat(i,", ").concat(n,", ").concat(o,")")}function HO(e,t){return e.map((function(e){var i=nf.Color.fromString(e);return new nf.Color(i.r,i.g,i.b,t).toHexString()}))}var WO=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),UO=function(){return UO=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},UO.apply(this,arguments)},zO=function(e){function t(t){return e.call(this,t)||this}return WO(t,e),t.prototype.getAxes=function(e){var t=[{type:this.getXAxisType(e),position:hS(this.chartType)?"left":"bottom"},{type:"number",position:hS(this.chartType)?"bottom":"left"}];if(this.isNormalised()){var i=t[1];i.label=UO(UO({},i.label),{formatter:function(e){return Math.round(e.value)+"%"}})}return t},t.prototype.getSeries=function(e){var t=this,i=e.fields.map((function(i){return{type:t.standaloneChartType,direction:hS(t.chartType)?"horizontal":"vertical",stacked:t.crossFiltering||gS(t.chartType),normalizedTo:t.isNormalised()?100:void 0,xKey:e.category.id,xName:e.category.name,yKey:i.colId,yName:i.displayName}}));return this.crossFiltering?this.extractCrossFilterSeries(i):i},t.prototype.extractCrossFilterSeries=function(e){for(var t=this,i=this.getChartPalette(),n=function(e,n){return UO(UO({},e),{highlightStyle:{item:{fill:void 0}},fill:null===i||void 0===i?void 0:i.fills[n],stroke:null===i||void 0===i?void 0:i.strokes[n],listeners:{nodeClick:t.crossFilterCallback}})},o=function(e){var t=e.yKey+"-filtered-out";return UO(UO({},BO({},e)),{yKey:t,fill:jO(e.fill,"0.3"),stroke:jO(e.stroke,"0.3"),showInLegend:!1})},r=[],s=0;s<e.length;s++){var a=n(e[s],s);r.push(a),r.push(o(a))}return r},t.prototype.isNormalised=function(){var e=["normalizedColumn","normalizedBar"];return!this.crossFiltering&&n._.includes(e,this.chartType)},t}(DO),KO=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),YO=function(){return YO=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},YO.apply(this,arguments)},qO=function(e){function t(t){return e.call(this,t)||this}return KO(t,e),t.prototype.getAxes=function(e){var t=[{type:this.getXAxisType(e),position:"bottom"},{type:"number",position:"left"}];if(this.isNormalised()){var i=t[1];i.label=YO(YO({},i.label),{formatter:function(e){return Math.round(e.value)+"%"}})}return t},t.prototype.getSeries=function(e){var t=this,i=e.fields.map((function(i){return{type:t.standaloneChartType,xKey:e.category.id,xName:e.category.name,yKey:i.colId,yName:i.displayName,normalizedTo:"normalizedArea"===t.chartType?100:void 0,stacked:["normalizedArea","stackedArea"].includes(t.chartType)}}));return this.crossFiltering?this.extractLineAreaCrossFilterSeries(i,e):i},t.prototype.isNormalised=function(){return!this.crossFiltering&&"normalizedArea"===this.chartType},t}(DO),XO=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),$O=function(e){function t(t){return e.call(this,t)||this}return XO(t,e),t.prototype.getAxes=function(e){return[{type:this.getXAxisType(e),position:"bottom"},{type:"number",position:"left"}]},t.prototype.getSeries=function(e){var t=this,i=e.fields.map((function(i){return{type:t.standaloneChartType,xKey:e.category.id,xName:e.category.name,yKey:i.colId,yName:i.displayName}}));return this.crossFiltering?this.extractLineAreaCrossFilterSeries(i,e):i},t}(DO),ZO=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),JO=function(){return JO=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},JO.apply(this,arguments)},QO=function(e){function t(t){return e.call(this,t)||this}return ZO(t,e),t.prototype.update=function(e){var t=e.data,i=e.category,n=JO(JO({},this.getCommonChartOptions(e.updatedOverrides)),{data:this.crossFiltering?this.getCrossFilterData(e):this.transformData(t,i.id),series:this.getSeries(e)});Xw.update(this.getChartRef(),n)},t.prototype.getSeries=function(e){var i=this,n=e.fields.length,o={currentOffset:0,offsetAmount:n>1?20:40},r=this.getFields(e).map((function(r){var s,a={type:i.standaloneChartType,angleKey:r.colId,angleName:r.displayName,sectorLabelKey:r.colId,legendItemKey:e.category.id,calloutLabelName:e.category.name,calloutLabelKey:e.category.id};if("doughnut"===i.chartType){var l=t.calculateOffsets(o),c=l.outerRadiusOffset,u=l.innerRadiusOffset,d=r.displayName?{title:{text:r.displayName,showInLegend:n>1}}:void 0;return JO(JO(JO(JO({},a),{outerRadiusOffset:c,innerRadiusOffset:u}),d),{calloutLine:{colors:null===(s=i.getChartPalette())||void 0===s?void 0:s.strokes}})}return a}));return this.crossFiltering?this.extractCrossFilterSeries(r):r},t.prototype.getCrossFilterData=function(e){var t=e.fields[0].colId,i="".concat(t,"-filtered-out");return e.data.map((function(e){var n=e[t]+e[i];return e["".concat(t,"-total")]=n,e[i]=1,e[t]=e[t]/n,e}))},t.prototype.extractCrossFilterSeries=function(e){var t=this,i=this.getChartPalette(),n=function(e){return JO(JO({},e),{calloutLabel:{enabled:!1},highlightStyle:{item:{fill:void 0}}
18,radiusKey:e.angleKey,angleKey:e.angleKey+"-total",radiusMin:0,radiusMax:1,listeners:{nodeClick:t.crossFilterCallback}})},o=function(e,t){var n,o;return JO(JO({},BO({},a)),{radiusKey:t+"-filtered-out",fills:HO(null!==(n=e.fills)&&void 0!==n?n:i.fills,.3),strokes:HO(null!==(o=e.strokes)&&void 0!==o?o:i.strokes,.3),showInLegend:!1})},r=e[0],s=r.angleKey,a=n(r);return[o(r,s),a]},t.calculateOffsets=function(e){var t=e.currentOffset;e.currentOffset-=e.offsetAmount;var i=e.currentOffset;return e.currentOffset-=e.offsetAmount,{outerRadiusOffset:t,innerRadiusOffset:i}},t.prototype.getFields=function(e){return"pie"===this.chartType?e.fields.slice(0,1):e.fields},t.prototype.crossFilteringReset=function(){},t}(xO),eT=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),tT=function(){return tT=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},tT.apply(this,arguments)},iT=function(e){var t="function"===typeof Symbol&&Symbol.iterator,i=t&&e[t],n=0;if(i)return i.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},nT=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},oT=function(e,t,i){if(i||2===arguments.length)for(var n,o=0,r=t.length;o<r;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},rT=function(e){function t(t){return e.call(this,t)||this}return eT(t,e),t.prototype.getAxes=function(e){return[{type:"number",position:"bottom"},{type:"number",position:"left"}]},t.prototype.getSeries=function(e){var t=this.isPaired(),i=this.getSeriesDefinitions(e.fields,t),n=e.category.id===wO.DEFAULT_CATEGORY?void 0:e.category,o=i.map((function(e){var t,i,o,r,s;if(null===e||void 0===e?void 0:e.sizeField){var a={type:"bubble",xKey:e.xField.colId,xName:null!==(t=e.xField.displayName)&&void 0!==t?t:void 0,yKey:e.yField.colId,yName:null!==(i=e.yField.displayName)&&void 0!==i?i:void 0,title:"".concat(e.yField.displayName," vs ").concat(e.xField.displayName),sizeKey:e.sizeField.colId,sizeName:null!==(o=e.sizeField.displayName)&&void 0!==o?o:"",labelKey:n?n.id:e.yField.colId,labelName:n?n.name:void 0};return a}var l={type:"scatter",xKey:e.xField.colId,xName:null!==(r=e.xField.displayName)&&void 0!==r?r:void 0,yKey:e.yField.colId,yName:null!==(s=e.yField.displayName)&&void 0!==s?s:void 0,title:"".concat(e.yField.displayName," vs ").concat(e.xField.displayName),labelKey:n?n.id:e.yField.colId,labelName:n?n.name:void 0};return l}));return this.crossFiltering?this.extractCrossFilterSeries(o,e):o},t.prototype.extractCrossFilterSeries=function(e,t){var i=this,n=t.data,o=this.getChartPalette(),r=function(e){return"".concat(e,"-filtered-out")},s=function(e,t){var i,n,o,s=[1/0,-1/0];if(null!=t)try{for(var a=iT(e),l=a.next();!l.done;l=a.next()){var c=l.value,u=null!==(o=c[t])&&void 0!==o?o:c[r(t)];u<s[0]&&(s[0]=u),u>s[1]&&(s[1]=u)}}catch(d){i={error:d}}finally{try{l&&!l.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}if(s[0]<=s[1])return s},a=function(e,t){var r=null===o||void 0===o?void 0:o.fills[t],a=null===o||void 0===o?void 0:o.strokes[t],l=void 0;if("bubble"===e.type){var c=e.sizeKey;l=s(n,c)}var u=tT(tT({},e.marker),{fill:r,stroke:a,domain:l});return tT(tT({},e),{marker:u,highlightStyle:{item:{fill:"yellow"}},listeners:tT(tT({},e.listeners),{nodeClick:i.crossFilterCallback})})},l=function(e){var t=e.yKey,n=e.xKey,o={};return"bubble"===e.type&&(o={sizeKey:r(e.sizeKey)}),tT(tT(tT({},e),o),{yKey:r(t),xKey:r(n),marker:tT(tT({},e.marker),{fillOpacity:.3,strokeOpacity:.3}),showInLegend:!1,listeners:tT(tT({},e.listeners),{nodeClick:function(e){var t,o=e.datum[r(n)],s=tT(tT({},e),{xKey:n,datum:tT(tT({},e.datum),(t={},t[n]=o,t))});i.crossFilterCallback(s)}})})},c=e.map(a);return oT(oT([],nT(c),!1),nT(c.map(l)),!1)},t.prototype.getSeriesDefinitions=function(e,t){if(e.length<2)return[];var i="bubble"===this.chartType;
18if(t)return i?e.map((function(t,i){return i%3===0?{xField:t,yField:e[i+1],sizeField:e[i+2]}:null})).filter((function(e){return e&&e.yField&&e.sizeField})):e.map((function(t,i){return i%2===0?{xField:t,yField:e[i+1]}:null})).filter((function(e){return e&&e.yField}));var n=e[0];return i?e.map((function(t,i){return i%2===1?{xField:n,yField:t,sizeField:e[i+1]}:null})).filter((function(e){return e&&e.sizeField})):e.filter((function(e,t){return t>0})).map((function(e){return{xField:n,yField:e}}))},t}(DO),sT=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),aT=function(e){function t(t){return e.call(this,t)||this}return sT(t,e),t.prototype.getSeries=function(e){var t=e.fields[0];return[{type:this.standaloneChartType,xKey:t.colId,xName:t.displayName,yName:this.chartProxyParams.translate("histogramFrequency"),areaPlot:!1}]},t.prototype.getAxes=function(e){return[{type:"number",position:"bottom"},{type:"number",position:"left"}]},t}(DO),lT=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),cT=function(e){function t(t){var i=e.call(this)||this;return i.chartController=t,i}return lT(t,e),t.prototype.getChartOption=function(e){return n._.get(this.getChart(),e,void 0)},t.prototype.setChartOption=function(e,t,i){var n=this,o=this.chartController.getChartSeriesTypes();this.chartController.isComboChart()&&o.push("cartesian");var r={};o.forEach((function(i){r=BO(r,n.createChartOptions({seriesType:i,expression:e,value:t}))})),this.updateChart(r),i||this.raiseChartOptionsChangedEvent()},t.prototype.awaitChartOptionUpdate=function(e){var t=this.chartController.getChartProxy().getChart();t.waitForUpdate().then((function(){return e()})).catch((function(e){return console.error("AG Grid - chart update failed",e)}))},t.prototype.getAxisProperty=function(e){var t;return n._.get(null===(t=this.getChart().axes)||void 0===t?void 0:t[0],e,void 0)},t.prototype.setAxisProperty=function(e,t){var i,n=this,o=this.getChart(),r={};null===(i=o.axes)||void 0===i||i.forEach((function(i){r=BO(r,n.getUpd
18ateAxisOptions(i,e,t))})),this.updateChart(r),this.raiseChartOptionsChangedEvent()},t.prototype.getLabelRotation=function(e){var t=this.getAxis(e);return n._.get(t,"label.rotation",void 0)},t.prototype.setLabelRotation=function(e,t){var i=this.getAxis(e);if(i){var n=this.getUpdateAxisOptions(i,"label.rotation",t);this.updateChart(n),this.raiseChartOptionsChangedEvent()}},t.prototype.getSeriesOption=function(e,i){var o=this.getChart().series.find((function(e){return t.isMatchingSeries(i,e)}));return n._.get(o,e,void 0)},t.prototype.setSeriesOption=function(e,t,i){var n=this.createChartOptions({seriesType:i,expression:"series.".concat(e),value:t});this.updateChart(n),this.raiseChartOptionsChangedEvent()},t.prototype.getPairedMode=function(){return this.chartController.getChartProxy().isPaired()},t.prototype.setPairedMode=function(e){this.chartController.getChartProxy().setPaired(e)},t.prototype.getAxis=function(e){var t=this.getChart();if(t.axes&&!(t.axes.length<1))return"xAxis"===e?t.axes&&"x"===t.axes[0].direction?t.axes[0]:t.axes[1]:t.axes&&"y"===t.axes[1].direction?t.axes[1]:t.axes[0]},t.prototype.getUpdateAxisOptions=function(e,t,i){var n=vS(this.getChartType()),o=["number","category","time","grouped-category"];return o.includes(e.type)?this.createChartOptions({seriesType:n,expression:"axes.".concat(e.type,".").concat(t),value:i}):{}},t.prototype.getChartType=function(){return this.chartController.getChartType()},t.prototype.getChart=function(){return this.chartController.getChartProxy().getChart()},t.prototype.updateChart=function(e){var t=this.chartController.getChartProxy().getChartRef();Xw.updateDelta(t,e)},t.prototype.createChartOptions=function(e){var t=e.seriesType,i=e.expression,o=e.value,r={},s={theme:{overrides:r}};return n._.set(r,"".concat(t,".").concat(i),o),s},t.prototype.raiseChartOptionsChangedEvent=function(){var e=this.chartController.getChartModel(),t={type:n.zW2.EVENT_CHART_OPTIONS_CHANGED,chartId:e.chartId,chartType:e.chartType,chartThemeName:this.chartController.getChartThemeName(),chartOptions:e.chartOptions};this.eventService.dispatchEvent(t)},t.isMatchingSeries=function(e,t){return dS.includes(e)&&t.type===e},t.prototype.destroy=function(){e.prototype.destroy.call(this)},t}(n.AS9),uT=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),dT=function(){return dT=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},dT.apply(this,arguments)},pT=function(e){function t(t){return e.call(this,t)||this}return uT(t,e),t.prototype.getAxes=function(e){var t=e?e.fields:[],i=new Map(t.map((function(e){return[e.colId,e]}))),n=this.getYKeys(t,e.seriesChartTypes),o=n.primaryYKeys,r=n.secondaryYKeys,s=[{type:this.getXAxisType(e),position:"bottom"}];return o.length>0&&s.push({type:"number",keys:o,position:"left"}),r.length>0&&r.forEach((function(e){var t=i.get(e),n=t&&t.colId===e;if(n){var o={type:"number",keys:[e],position:"right"};s.push(o)}})),s},t.prototype.getSeries=function(e){var t=e.fields,i=e.category,n=e.seriesChartTypes;return t.map((function(e){var t=n.find((function(t){return t.colId===e.colId}));if(t){var o=t.chartType,r=["groupedColumn","groupedBar"].includes(o),s=r?{grouped:!0}:{};return dT({type:vS(o),xKey:i.id,yKey:e.colId,yName:e.displayName,stacked:["stackedArea","stackedColumn"].includes(o)},s)}}))},t.prototype.getYKeys=function(e,t){var i=[],n=[];return e.forEach((function(e){var o=e.colId,r=t.find((function(e){return e.colId===o}));r&&(r.secondaryAxis?n.push(o):i.push(o))})),{primaryYKeys:i,secondaryYKeys:n}},t}(DO),hT=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),fT=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},gT=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},vT=function(e){function t(i){var n=e.call(this,t.TEMPLATE)||this;return n.params=i,n}return hT(t,e),t.prototype.init=function(){var e=this,t={chartId:this.params.chartId,pivotChart:this.params.pivotChart,chartType:this.params.chartType,chartThemeName:this.getThemeName(),aggFunc:this.params.aggFunc,cellRange:this.params.cellRange,suppressChartRanges:this.params.suppressChartRanges,unlinkChart:this.params.unlinkChart,crossFiltering:this.params.crossFiltering,
18seriesChartTypes:this.params.seriesChartTypes},i=this.gridOptionsService.get("enableRtl");this.addCssClass(i?"ag-rtl":"ag-ltr");var n=this.createBean(new wO(t));this.chartController=this.createManagedBean(new jS(n)),this.validateCustomThemes(),this.createChart(),this.params.insideDialog&&this.addDialog(),this.addMenu(),this.addTitleEditComp(),this.addManagedListener(this.getGui(),"focusin",this.setActiveChartCellRange.bind(this)),this.addManagedListener(this.chartController,jS.EVENT_CHART_MODEL_UPDATE,this.update.bind(this)),this.addManagedPropertyListeners(["chartThemeOverrides","chartThemes"],this.reactivePropertyUpdate.bind(this)),this.chartMenu&&this.addManagedListener(this.chartMenu,tO.EVENT_DOWNLOAD_CHART,(function(){return e.downloadChart()})),this.update(),this.raiseChartCreatedEvent()},t.prototype.createChart=function(){var e=this,i=void 0;this.chartProxy&&(i=this.chartProxy.destroy({keepChartInstance:!0}));var n=function(t,i){var n=e.params.crossFilteringContext;n.lastSelectedChartId=i?"":e.chartController.getChartId(),i&&e.params.crossFilteringResetCallback(),e.crossFilterService.filter(t,i)},o=this.chartController.getChartType(),r={chartType:o,chartInstance:i,getChartThemeName:this.getChartThemeName.bind(this),getChartThemes:this.getChartThemes.bind(this),customChartThemes:this.gridOptionsService.get("customChartThemes"),getGridOptionsChartThemeOverrides:function(){return e.getGridOptionsChartThemeOverrides()},getExtraPaddingDirections:function(){var t,i;return null!==(i=null===(t=e.chartMenu)||void 0===t?void 0:t.getExtraPaddingDirections())&&void 0!==i?i:[]},apiChartThemeOverrides:this.params.chartThemeOverrides,crossFiltering:this.params.crossFiltering,crossFilterCallback:n,parentElement:this.eChart,grouping:this.chartController.isGrouping(),chartThemeToRestore:this.params.chartThemeName,chartOptionsToRestore:this.params.chartOptionsToRestore,chartPaletteToRestore:this.params.chartPaletteToRestore,seriesChartTypes:this.chartController.getSeriesChartTypes(),translate:function(t,i){return e.chartTranslationService.translate(t,i)}};if(this.params.chartOptionsToRestore=void 0,this.chartType=o,this.chartProxy=t.createChartProxy(r),this.chartProxy){var s=this.eChart.querySelector("canvas");s&&s.classList.add("ag-charts-canvas"),this.chartController.setChartProxy(this.chartProxy),this.chartOptionsService=this.createBean(new cT(this.chartController)),this.titleEdit&&this.titleEdit.refreshTitle(this.chartController,this.chartOptionsService)}else console.warn("AG Grid: invalid chart type supplied: ",r.chartType)},t.prototype.getChartThemeName=function(){return this.chartController.getChartThemeName()},t.prototype.getChartThemes=function(){return this.chartController.getThemes()},t.prototype.getGridOptionsChartThemeOverrides=function(){return this.gridOptionsService.get("chartThemeOverrides")},t.createChartProxy=function(e){switch(e.chartType){case"column":case"bar":case"groupedColumn":case"stackedColumn":case"normalizedColumn":case"groupedBar":case"stackedBar":case"normalizedBar":return new zO(e);case"pie":case"doughnut":return new QO(e);case"area":case"stackedArea":case"normalizedArea":return new qO(e);case"line":return new $O(e);case"scatter":case"bubble":return new rT(e);case"histogram":return new aT(e);case"columnLineCombo":case"areaColumnCombo":case"customCombo":return new pT(e);default:throw"AG Grid: Unable to create chart as an invalid chartType = '".concat(e.chartType,"' was supplied.")}},t.prototype.addDialog=function(){var e=this,t=this.chartTranslationService.translate(this.params.pivotChart?"pivotChartTitle":"rangeChartTitle"),i=this.getBestDialogSize(),o=i.width,r=i.height;this.chartDialog=new n.$zI({resizable:!0,movable:!0,maximizable:!0,title:t,width:o,height:r,component:this,centered:!0,closable:!0}),this.getContext().createBean(this.chartDialog),this.chartDialog.addEventListener(n.$zI.EVENT_DESTROYED,(function(){return e.destroy()}))},t.prototype.getBestDialogSize=function(){var e=this.popupService.getPopupParent(),t=.75*n._.getAbsoluteWidth(e),i=.75*n._.getAbsoluteHeight(e),o=.553,r=this.chartProxy.getChart(),s=this.params.insideDialog?850:r.width,a=this.params.insideDialog?470:r.height;return(s>t||a>i)&&(s=Math.min(s,t),a=Math.round(s*o),a>i&&(a=i,s=Math.min(s,Math.round(a/o)))),{width:s,height:a}},t.prototype.addMenu=function(){this.params.crossFiltering||(this.chartMenu=this.createBean(new tO(this.eChartContainer,this.eMenuContainer,this.chartController,this.chartOptionsService)),this.eChartContainer.appendChild(this.chartMenu.getGui()))},t.prototype.addTitleEditComp=function(){this.titleEdit=this.createBean(new sO(this.chartMenu)),this.eTitleEditContainer.appendChild(this.titleEdit.getGui()),this.chartProxy&&this.titleEdit.refreshTitle(this.chartController,this.chartOptionsService)},t.prototype.update=function(e){var t=this;if(null===e||void 0===e?void 0:e.chartId){var i=this.chartController.update(e);if(!i)return}var n=this.chartTypeChanged(e);n&&this.createChart(),this.updateChart(null===e||void 0===e?void 0:e.chartThemeOverrides),(null===e||void 0===e?void 0:e.chartId)&&this.chartProxy.getChart().waitForUpdate().then((function(){t.chartController.raiseChartApiUpdateEvent()}))},t.prototype.updateChart=function(e){var t=this,i=this.chartProxy,n=this.chartController.getSelectedValueColState(),o=n.map((function(e){return{colId:e.colId,displayName:e.displayName}})),r=this.chartController.getChartData(),s=this.handleEmptyChart(r,o);if(!s){var a=this.chartController.getChartUpdateParams(e);i.update(a),this.chartProxy.getChart().waitForUpdate().then((function(){t.chartController.raiseChartUpdatedEvent()})),this.titleEdit.refreshTitle(this.chartController,this.chartOptionsService)}},t.prototype.chartTypeChanged=function(e){var t=gT([this.chartController.getChartType(),null===e||void 0===e?void 0:e.chartType],2),i=t[0],n=t[1];return this.chartType!==i||!!n&&this.chartType!==n},t.prototype.getChartModel=function(){return this.chartController.getChartModel()},t.prototype.getChartImageDataURL=function(e){return this.chartProxy.getChartImageDataURL(e)},t.prototype.handleEmptyChart=function(e,t){var i=this.chartController.isPivotChart()&&!this.chartController.isPivotMode(),o=1;this.chartController.isActiveXYChart()&&(o="bubble"===this.chartController.getChartType()?3:2);var r=t.length<o||0===e.length;if(this.eChart){var s=i||r;n._.setDisplayed(this.eChart,!s),n._.setDisplayed(this.eEmpty,s)}return i?(this.eEmpty.innerText=this.chartTranslationService.translate("pivotChartRequiresPivotMode"),!0):!!r&&(this.eEmpty.innerText=this.chartTranslationService.translate("noDataToChart"),!0)},t.prototype.downloadChart=function(e,t,i){this.chartProxy.downloadChart(e,t,i)},t.prototype.openChartToolPanel=function(e){var t=e?n.d2Z[e]:e;this.chartMenu.showMenu(t)},t.prototype.closeChartToolPanel=function(){this.chartMenu.hideMenu()},t.prototype.getChartId=function(){return this.chartController.getChartId()},t.prototype.getUnderlyingChart=function(){return this.chartProxy.getChartRef()},t.prototype.crossFilteringReset=function(){this.chartProxy.crossFilteringReset()},t.prototype.setActiveChartCellRange=function(e){this.getGui().contains(e.relatedTarget)||(this.chartController.setChartRange(!0),this.gridApi.focusService.clearFocusedCell())},t.prototype.getThemeName=function(){var e=this.gridOptionsService.get("
18chartThemes")||BS;if(0===e.length)throw new Error("Cannot create chart: no chart themes available.");var t=this.params.chartThemeName;return n._.includes(e,t)?t:e[0]},t.prototype.validateCustomThemes=function(){var e=this.getChartThemes(),t=this.gridOptionsService.get("customChartThemes");t&&n._.getAllKeysInObjects([t]).forEach((function(t){n._.includes(e,t)||console.warn("AG Grid: a custom chart theme with the name '"+t+"' has been supplied but not added to the 'chartThemes' list")}))},t.prototype.reactivePropertyUpdate=function(){this.chartController.setChartThemeName(this.getThemeName(),!0);var e=this.getChartId(),t=this.chartController.isCrossFilterChart()?"crossFilter":this.getChartModel().modelType,i=this.gridOptionsService.get("chartThemeOverrides")||{};this.update({type:"".concat(t,"ChartUpdate"),chartId:e,chartThemeOverrides:i})},t.prototype.raiseChartCreatedEvent=function(){var e=this,t={type:n.zW2.EVENT_CHART_CREATED,chartId:this.chartController.getChartId()};this.chartProxy.getChart().waitForUpdate().then((function(){e.eventService.dispatchEvent(t)}))},t.prototype.raiseChartDestroyedEvent=function(){var e={type:n.zW2.EVENT_CHART_DESTROYED,chartId:this.chartController.getChartId()};this.eventService.dispatchEvent(e)},t.prototype.destroy=function(){var t;e.prototype.destroy.call(this),this.chartProxy&&this.chartProxy.destroy(),this.destroyBean(this.chartMenu),this.destroyBean(this.titleEdit),this.chartDialog&&this.chartDialog.isAlive()&&this.destroyBean(this.chartDialog),null===(t=this.onDestroyColorSchemeChangeListener)||void 0===t||t.call(this);var i=this.getGui();n._.clearElement(i),n._.removeFromParent(i),this.raiseChartDestroyedEvent()},t.TEMPLATE='<div class="ag-chart" tabindex="-1">\n            <div ref="eChartContainer" tabindex="-1" class="ag-chart-components-wrapper">\n                <div ref="eChart" class="ag-chart-canvas-wrapper"></div>\n                <div ref="eEmpty" class="ag-chart-empty-text ag-unselectable"></div>\n            </div>\n            <div ref="eTitleEditContainer"></div>\n            <div ref="eMenuContainer" class="ag-chart-docked-container" style="min-width: 0px;"></div>\n        </div>',fT([(0,n.cqo)("eChart")],t.prototype,"eChart",void 0),fT([(0,n.cqo)("eChartContainer")],t.prototype,"eChartContainer",void 0),fT([(0,n.cqo)("eMenuContainer")],t.prototype,"eMenuContainer",void 0),fT([(0,n.cqo)("eEmpty")],t.prototype,"eEmpty",void 0),fT([(0,n.cqo)("eTitleEditContainer")],t.prototype,"eTitleEditContainer",void 0),fT([(0,n.fsG)("chartCrossFilterService")],t.prototype,"crossFilterService",void 0),fT([(0,n.fsG)("chartTranslationService")],t.prototype,"chartTranslationService",void 0),fT([(0,n.fsG)("gridApi")],t.prototype,"gridApi",void 0),fT([(0,n.fsG)("popupService")],t.prototype,"popupService",void 0),fT([n.NqP],t.prototype,"init",null),t}(n.wA2),yT="31.0.0",mT=function(){return mT=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},mT.apply(this,arguments)},CT=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(i[n[o]]=e[n[o]])}return i},bT=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},wT=function(e){var t="function"===typeof Symbol&&Symbol.iterator,i=t&&e[t],n=0;if(i)return i.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function ST(e){return e.version,null==e.version&&(e.version=FT(e)),e=GT("23.0.0",e,ET),e=GT("24.0.0",e,xT),e=GT("25.1.0",e,OT),e=GT("26.0.0",e,TT),e=GT("26.1.0",e,DT),e=GT("26.2.0",e,RT),e=GT("28.0.0",e,AT),e=GT("28.2.0",e,_T),e=GT("29.0.0",e,PT),e=GT("29.1.0",e,MT),e=GT("29.2.0",e,kT),e=GT("30.0.0",e,NT),e=GT("31.0.0",e,LT),e=IT(e),e=GT(yT,e,(function(e){return e})),e}function ET(e){return e=KT("chartOptions.legend.item.marker.type","shape",e),e=KT("chartOptions.seriesDefaults.marker.type","shape",e),e=KT("chartOptions.legend.padding","spacing",e),e}function xT(e){var t;e=YT("chartOptions.seriesDefaults.marker.minSize",e);var i=e,n=i.chartType,o=i.chartPalette,r=i.chartOptions,s=r.xAxis,a=r.yAxis,l=CT(r,["xAxis","yAxis"]),c=CT(i,["chartType","chartPalette","chartOptions"]),u=mS(n),d=null===u||void 0===u?void 0:u.map((function(e,t){return mT({type:e},0===t?s:a)})),p={borneo:"ag-default",material:"ag-material",bright:"ag-vivid"};return mT({chartType:n,chartThemeName:null!==(t=p[o])&&void 0!==t?t:"ag-default",chartOptions:mT(mT({},l),{axes:d,xAxis:s,yAxis:a})},c)}function OT(e){return e=KT("chartOptions.seriesDefaults.label.minRequiredA
18ngle","minAngle",e),e}function TT(e){var t=function(e){var t=e.dimOpacity,i=CT(e,["dimOpacity"]);return mT(mT({},i),null!=t?{series:{dimOpacity:t}}:{})};return e=XT("chartOptions.seriesDefaults.highlightStyle",e,t),e=YT("chart",e),e=YT("chartOptions.seriesDefaults.tooltipClass",e),e=YT("chartOptions.seriesDefaults.tooltipTracking",e),e=jT("chartOptions.axes[].label.rotation",0,e),e=jT("chartOptions.axes[].label.rotation",335,e),e}function DT(e){var t=function(e){var t=e.item,i=e.series,n=CT(e,["item","series"]);return mT({item:mT(mT({},n),t)},i?{series:i}:{})};return e=XT("chartOptions.seriesDefaults.highlightStyle",e,t),e=XT("chartOptions.series[].highlightStyle",e,t),e}function RT(e){e=UT("chartOptions.seriesDefaults.fill.opacity","chartOptions.seriesDefaults.fillOpacity",e),e=UT("chartOptions.seriesDefaults.stroke.opacity","chartOptions.seriesDefaults.strokeOpacity",e),e=UT("chartOptions.seriesDefaults.stroke.width","chartOptions.seriesDefaults.strokeWidth",e),e=YT("chartOptions.seriesDefaults.fill",e),e=YT("chartOptions.seriesDefaults.stroke",e),e=YT("chartOptions.seriesDefaults.callout.colors",e),e=YT("chartOptions.xAxis",e),e=YT("chartOptions.yAxis",e);var t=e,i=t.chartType,n=t.chartOptions,o=n.axes;n.series;var r=n.seriesDefaults,s=CT(n,["axes","series","seriesDefaults"]),a=CT(t,["chartType","chartOptions"]),l=[vS(i)],c={};if(!l.includes("pie")){var u={top:{},bottom:{},left:{},right:{}},d=o.map((function(e){var t,i=e.type,n=CT(e,["type"]);return t={},t[i]=mT(mT({},u),n),t})).reduce($T,{});yS.filter((function(e){return null==d[e]})).forEach((function(e){d[e]=mT({},u)})),c.axes=d}var p=l.map((function(e){var t;return t={},t[e]=mT(mT(mT({},c),{series:r}),s),t})).reduce($T,{});return e=mT(mT({},a),{chartType:i,chartOptions:p}),e}function AT(e){return e=YT("chartOptions.*.title.padding",e),e=YT("chartOptions.*.subtitle.padding",e),e=YT("chartOptions.*.axes.*.title.padding",e),e=HT("chartOptions.*.axes.*.title.enabled",!1,e),e}function _T(e){return e=KT("chartOptions.pie.series.callout","calloutLine",e),e=KT("chartOptions.pie.series.label","calloutLabel",e),e=KT("chartOptions.pie.series.labelKey","sectorLabelKey",e),e=KT("chartOptions.pie.series.labelName","sectorLabelName",e),e}function PT(e){return e=zT("chartOptions.scatter.series.fill","chartOptions.scatter.series.marker.fill",e),e=zT("chartOptions.scatter.series.fillOpacity","chartOptions.scatter.series.marker.fillOpacity",e),e=zT("chartOptions.scatter.series.stroke","chartOptions.scatter.series.marker.stroke",e),e=zT("chartOptions.scatter.series.strokeOpacity","chartOptions.scatter.series.marker.strokeOpacity",e),e=zT("chartOptions.scatter.series.strokeWidth","chartOptions.scatter.series.marker.strokeWidth",e),e=UT("chartOptions.scatter.series.paired","chartOptions.scatter.paired",e),e}function MT(e){return e=YT("chartOptions.axes[].tick.count",e),e}function kT(e){var t=function(e){var t,i,n,o,r=e.tracking,s=CT(e,["tracking"]),a=mT({},s);return!1===r?(null!==(t=a.position)&&void 0!==t||(a.position={type:"pointer"}),null!==(i=a.range)&&void 0!==i||(a.range="nearest")):!0===r&&(null!==(n=a.position)&&void 0!==n||(a.position={type:"node"}),null!==(o=a.range)&&void 0!==o||(a.range="nearest")),a};return e=XT("chartOptions.*.tooltip",e,t),e}function NT(e){return e=KT("chartOptions.pie.series.labelKey","sectorLabelKey",e),e=KT("chartOptions.pie.series.labelName","sectorLabelName",e),e=MT(e),e=kT(e),e=YT("chartOptions.*.series.flipXY",e),e=WT("chartOptions.common.legend.enabled",!0,e),e=HT("chartOptions.common.legend.position","right",e),e}function LT(e){var t={"ag-pastel":"ag-sheets","ag-solar":"ag-polychroma"},i=KT("chartOptions.column","bar",e),n=t[i.chartThemeName]||i.chartThemeName;return mT(mT({},i),{chartThemeName:n})}function IT(e){return e=YT("chartOptions.*.width",e),e=YT("chartOptions.*.height",e),e=HT("chartOptions.*.axes.category.label.autoRotate",!0,e),e}function FT(e){var t,i,n=e;if(null!=e.version)return e.version;var o=function(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];return Object.keys(e||{}).some((function(e){return t.includes(e)}))},r=n.chartOptions,s=o(r,"seriesDefaults")?null===r||void 0===r?void 0:r.seriesDefaults:null===r||void 0===r?void 0:r[Object.keys(r)[0]],a={"27.0.0":o(n,"seriesChartTypes"),"26.2.0":!o(r,"seriesDefaults"),"26.1.0":o(null===s||void 0===s?void 0:s.highlightStyle,"item"),"26.0.0":o(null===s||void 0===s?void 0:s.highlightStyle,"series"),"25.1.0":o(null===s||void 0===s?void 0:s.label,"minAngle"),"25.0.0":o(n,"modelType","aggFunc","unlinkChart","suppressChartRanges")||o(s,"lineDash","lineDashOffset"),"24.0.0":o(n,"chartThemeName","chart")||o(r,"series"),"23.2.0":o(r,"navigator"),"23.0.0":o(null===(i=null===(t=null===r||void 0===r?void 0:r.legend)||void 0===t?void 0:t.item)||void 0===i?void 0:i.marker,"shape"),"22.1.0":o(n,"chartPalette","chartType")},l="27.1.0",c=Object.entries(a).filter((function(e){var t=bT(e,2);t[0];var i=t[1];return i}
18)),u=bT(c[0],1),d=u[0],p=void 0===d?l:d;return p}function GT(e,t,i){if(BT(e)>BT(t.version)){var n=i(t);return n.version=e,n}return t}function VT(e){var t="string"===typeof e?e.split(".").map((function(e){return Number(e)})):[];if(3!==t.length||t.some((function(e){return isNaN(e)})))throw new Error("AG Grid - Illegal version string: "+e);return{major:t[0],minor:t[1],patch:t[2]}}function BT(e){var t=VT(e),i=t.major,n=t.minor,o=t.patch;return 1e4*i+100*n+o}function jT(e,t,i){return qT(e,!0,i,(function(e,i){e[i]===t&&delete e[i]}))}function HT(e,t,i){return qT(e,!1,i,(function(e,i){null==e[i]&&(e[i]=t)}))}function WT(e,t,i){var n;"string"===typeof e&&(e=e.split("."));var o=e[0];e.length>1&&(i[o]=WT(e.slice(1),t,null!==(n=i[o])&&void 0!==n?n:{}));var r=Object.keys(i).includes(o);return r||(i[o]=t),i}function UT(e,t,i){var n=void 0,o=!1;return i=qT(e,!0,i,(function(e,t){o=!0,n=e[t],delete e[t]})),o?qT(t,!1,i,(function(e,t){e[t]=n})):i}function zT(e,t,i){var n=void 0,o=!1;return i=qT(e,!0,i,(function(e,t){o=!0,n=e[t],delete e[t]})),o?qT(t,!1,i,(function(e,t){void 0===e[t]&&(e[t]=n)})):i}function KT(e,t,i){return qT(e,!0,i,(function(e,i){e[t]=e[i],delete e[i]}))}function YT(e,t){return qT(e,!0,t,(function(e,t){return delete e[t]}))}function qT(e,t,i,n){var o=e instanceof Array?e:e.split("."),r=o.slice(0,o.length-1),s=o[o.length-1];return XT(r,i,(function(e){var i=Object.keys(e).includes(s);if(t&&!i)return e;var o=mT({},e);return n(o,s),o}))}function XT(e,t,i){var n,o,r=e instanceof Array?e:e.split(".");if(t=mT({},t),0===r.length)return i(t);if(r[0].startsWith("{")){var s=r[0].substring(1,r[0].lastIndexOf("}")).split(",");try{for(var a=wT(s),l=a.next();!l.done;l=a.next()){var c=l.value;null!=t[c]&&(t[c]=XT(r.slice(1),t[c],i))}}catch(p){n={error:p}}finally{try{l&&!l.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}}else if(r[0].endsWith("[]")){var u=r[0].substring(0,e[0].indexOf("["));t[u]instanceof Array&&(t[u]=t[u].map((function(e){return XT(r.slice(1),e,i)})))}else if("*"===r[0])for(var d in t)t[d]=XT(r.slice(1),t[d],i);else null!=t[r[0]]&&(t[r[0]]=XT(r.slice(1),t[r[0]],i));return t}var $T=function(e,t){return mT(mT({},e),t)},ZT=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),JT=function(){return JT=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},JT.apply(this,arguments)},QT=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},eD=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},tD=function(e,t,i){if(i||2===arguments.length)for(var n,o=0,r=t.length;o<r;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},iD=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.activeCharts=new Set,t.activeChartComps=new Set,t.crossFilteringContext={lastSelectedChartId:""},t}return ZT(t,e),t.prototype.updateChart=function(e){if(0!==this.activeChartComps.size){var t=tD([],eD(this.activeChartComps),!1).find((function(t){return t.getChartId()===e.chartId}));t?t.update(e):console.warn("AG Grid - Unable to update chart. No active chart found with ID: ".concat(e.chartId,"."))}else console.warn("AG Grid - No active charts to update.")},t.prototype.getChartModels=function(){var e=[],t=function(e){return JT(JT
18({},e),{version:yT})};return this.activeChartComps.forEach((function(i){return e.push(t(i.getChartModel()))})),e},t.prototype.getChartRef=function(e){var t;return this.activeCharts.forEach((function(i){i.chartId===e&&(t=i)})),t},t.prototype.getChartComp=function(e){var t;return this.activeChartComps.forEach((function(i){i.getChartId()===e&&(t=i)})),t},t.prototype.getChartImageDataURL=function(e){var t;return this.activeChartComps.forEach((function(i){i.getChartId()===e.chartId&&(t=i.getChartImageDataURL(e.fileFormat))})),t},t.prototype.downloadChart=function(e){var t=Array.from(this.activeChartComps).find((function(t){return t.getChartId()===e.chartId}));null===t||void 0===t||t.downloadChart(e.dimensions,e.fileName,e.fileFormat)},t.prototype.openChartToolPanel=function(e){var t=Array.from(this.activeChartComps).find((function(t){return t.getChartId()===e.chartId}));null===t||void 0===t||t.openChartToolPanel(e.panel)},t.prototype.closeChartToolPanel=function(e){var t=Array.from(this.activeChartComps).find((function(t){return t.getChartId()===e}));null===t||void 0===t||t.closeChartToolPanel()},t.prototype.createChartFromCurrentRange=function(e){void 0===e&&(e="groupedColumn");var t=this.getSelectedRange();return this.createChart(t,e)},t.prototype.restoreChart=function(e,t){var i=this;if(e){e.version!==yT&&(e=ST(e));var n={cellRange:e.cellRange,chartType:e.chartType,chartThemeName:e.chartThemeName,chartContainer:t,suppressChartRanges:e.suppressChartRanges,aggFunc:e.aggFunc,unlinkChart:e.unlinkChart,seriesChartTypes:e.seriesChartTypes},o=function(e){return i.rangeService?i.rangeService.createCellRangeFromCellRangeParams(e):void 0};if("pivot"===e.modelType){this.columnModel.isPivotMode()||this.columnModel.setPivotMode(!0,"pivotChart");var r=this.columnModel.getAllDisplayedColumns().map((function(e){return e.getColId()})),s={rowStartIndex:null,rowStartPinned:void 0,rowEndIndex:null,rowEndPinned:void 0,columns:r},a=o(s);return a?this.createChart(a,n.chartType,n.chartThemeName,!0,!0,n.chartContainer,void 0,void 0,n.unlinkChart,!1,e.chartOptions):void console.warn("AG Grid - unable to create chart as there are no columns in the grid.")}var l=o(n.cellRange);if(l)return this.createChart(l,n.chartType,n.chartThemeName,!1,n.suppressChartRanges,n.chartContainer,n.aggFunc,void 0,n.unlinkChart,!1,e.chartOptions,e.chartPalette,n.seriesChartTypes);console.warn("AG Grid - unable to create chart as no range is selected")}else console.warn("AG Grid - unable to restore chart as no chart model is provided")},t.prototype.createRangeChart=function(e){var t,i=null===(t=this.rangeService)||void 0===t?void 0:t.createCellRangeFromCellRangeParams(e.cellRange);if(i)return this.createChart(i,e.chartType,e.chartThemeName,!1,e.suppressChartRanges,e.chartContainer,e.aggFunc,e.chartThemeOverrides,e.unlinkChart,void 0,void 0,void 0,e.seriesChartTypes);console.warn("AG Grid - unable to create chart as no range is selected")},t.prototype.createPivotChart=function(e){this.columnModel.isPivotMode()||this.columnModel.setPivotMode(!0,"pivotChart");var t={rowStartIndex:null,rowStartPinned:void 0,rowEndIndex:null,rowEndPinned:void 0,columns:this.columnModel.getAllDisplayedColumns().map((function(e){return e.getColId()}))},i=this.rangeService?this.rangeService.createCellRangeFromCellRangeParams(t):void 0;if(i)return this.createChart(i,e.chartType,e.chartThemeName,!0,!0,e.chartContainer,void 0,e.chartThemeOverrides,e.unlinkChart);console.warn("AG Grid - unable to create chart as there are no columns in the grid.")},t.prototype.createCrossFilterChart=function(e){var t,i=null===(t=this.rangeService)||void 0===t?void 0:t.createCellRangeFromCellRangeParams(e.cellRange);if(i){var n=!0,o="undefined"!==typeof e.suppressChartRanges&&null!==e.suppressChartRanges,r=!o||e.suppressChartRanges;return this.createChart(i,e.chartType,e.chartThemeName,!1,r,e.chartContainer,e.aggFunc,e.chartThemeOverrides,e.unlinkChart,n)}console.warn("AG Grid - unable to create chart as no range is selected")},t.prototype.createChart=function(e,t,i,n,o,r,s,a,l,c,u,d,p){var h=this;void 0===n&&(n=!1),void 0===o&&(o=!1),void 0===l&&(l=!1),void 0===c&&(c=!1);var f=this.gridOptionsService.getCallback("createChartContainer"),g={chartId:this.generateId(),pivotChart:n,cellRange:e,chartType:t,chartThemeName:i,insideDialog:!(r||f),suppressChartRanges:o,aggFunc:s,chartThemeOverrides:a,unlinkChart:l,crossFiltering:c,crossFilteringContext:this.crossFilteringContext,chartOptionsToRestore:u,chartPaletteToRestore:d,seriesChartTypes:p,crossFilteringResetCallback:function(){return h.activeChartComps.forEach((function(e){return e.crossFilteringReset()}))}},v=new vT(g);this.context.createBean(v);var y=this.createChartRef(v);if(r){r.appendChild(v.getGui());var m=this.environment.getTheme();m.el&&!m.el.contains(r)&&r.classList.add(m.theme)}else f?f(y):v.addEventListener(vT.EVENT_DESTROYED,(function(){h.activeChartComps.delete(v),h.activeCharts.delete(y)}));return y},t.prototype.createChartRef=function(e){var t=this,i={destroyChart:function(){t.activeCharts.has(i)&&(t.context.destroyBean(e),t.activeChartComps.delete(e),t.activeCharts.delete(i))},chartElement:e.getGui(),chart:e.getUnderlyingChart(),chartId:e.getChartModel().chartId};return this.activeCharts.add(i),this.activeChartComps.add(e),i},t.prototype.getSelectedRange=function(){var e=this.rangeService.getCellRanges();return e.length>0?e[0]:{}},t.prototype.generateId=function(){return"id-".concat(Math.random().toString(36).substring(2,18))},t.prototype.destroyAllActiveCharts=function(){this.activeCharts.forEac
18h((function(e){return e.destroyChart()}))},t.CHARTS_VERSION=lS,QT([(0,n.FiY)("rangeService")],t.prototype,"rangeService",void 0),QT([(0,n.fsG)("columnModel")],t.prototype,"columnModel",void 0),QT([n.FXL],t.prototype,"destroyAllActiveCharts",null),t=QT([(0,n.Vu6)("chartService")],t),t}(n.AS9),nD=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),oD=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},rD=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}var i;return nD(t,e),i=t,t.prototype.translate=function(e,t){var n=this.localeService.getLocaleTextFunc(),o=i.DEFAULT_TRANSLATIONS[e]||t;return n(e,o)},t.DEFAULT_TRANSLATIONS={pivotChartTitle:"Pivot Chart",rangeChartTitle:"Range Chart",settings:"Settings",data:"Data",format:"Format",categories:"Categories",defaultCategory:"(None)",series:"Series",xyValues:"X Y Values",paired:"Paired Mode",axis:"Axis",navigator:"Navigator",color:"Color",thickness:"Thickness",xType:"X Type",automatic:"Automatic",category:"Category",number:"Number",time:"Time",autoRotate:"Auto Rotate",xRotation:"X Rotation",yRotation:"Y Rotation",ticks:"Ticks",width:"Width",height:"Height",length:"Length",padding:"Padding",spacing:"Spacing",chart:"Chart",title:"Title",titlePlaceholder:"Chart title - double click to edit",background:"Backgroun
18d",font:"Font",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",normal:"Normal",bold:"Bold",italic:"Italic",boldItalic:"Bold Italic",predefined:"Predefined",fillOpacity:"Fill Opacity",strokeOpacity:"Line Opacity",histogramBinCount:"Bin count",columnGroup:"Column",barGroup:"Bar",pieGroup:"Pie",lineGroup:"Line",scatterGroup:"X Y (Scatter)",areaGroup:"Area",histogramGroup:"Histogram",combinationGroup:"Combination",groupedColumnTooltip:"Grouped",stackedColumnTooltip:"Stacked",normalizedColumnTooltip:"100% Stacked",groupedBarTooltip:"Grouped",stackedBarTooltip:"Stacked",normalizedBarTooltip:"100% Stacked",pieTooltip:"Pie",doughnutTooltip:"Doughnut",lineTooltip:"Line",groupedAreaTooltip:"Area",stackedAreaTooltip:"Stacked",normalizedAreaTooltip:"100% Stacked",scatterTooltip:"Scatter",bubbleTooltip:"Bubble",histogramTooltip:"Histogram",columnLineComboTooltip:"Column & Line",areaColumnComboTooltip:"Area & Column",customComboTooltip:"Custom Combination",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",histogramFrequency:"Frequency",seriesChartType:"Series Chart Type",seriesType:"Series Type",secondaryAxis:"Secondary Axis"},t=i=oD([(0,n.Vu6)("chartTranslationService")],t),t}(n.AS9),sD=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),aD=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},lD=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}var i;return sD(t,e),i=t,t.prototype.filter=function(e,t){void 0===t&&(t=!1);var n=this.gridApi.getFilterModel();if(t)this.resetFilters(n);else{var o=i.extractFilterColId(e);this.isValidColumnFilter(o)?this.updateFilters(n,e,o):console.warn("AG Grid: cross filtering requires a 'agSetColumnFilter' or 'agMultiColumnFilter' to be defined on the column with id: '"+o+"'")}},t.prototype.resetFilters=function(e){var t=Object.keys(e).length>0;t&&(this.gridApi.setFilterModel(null),this.gridApi.onFilterChanged())},t.prototype.updateFilters=function(e,t,o){var r,s=i.extractFilterColId(t),a=t.datum[s];if(void 0!==a){var l=a.toString();if(t.event.metaKey||t.event.ctrlKey){var c=this.getCurrentGridValuesForCategory(o),u=n._.includes(c,l),d=void 0;u?d=c.filter((function(e){return e!==l})):(d=c,d.push(l)),e[o]=this.getUpdatedFilterModel(o,d)}else{d=[l];r={},r[o]=this.getUpdatedFilterModel(o,d),e=r}this.gridApi.setFilterModel(e)}},t.prototype.getUpdatedFilterModel=function(e,t){var i=this.getColumnFilterType(e);return"agMultiColumnFilter"===i?{filterType:"multi",filterModels:[null,{filterType:"set",values:t}]}:{filterType:"set",values:t}},t.prototype.getCurrentGridValuesForCategory=function(e){var t=this,i=[],n=this.getColumnById(e);return this.gridApi.forEachNodeAfterFilter((function(e){if(n&&!e.group){var o=t.valueService.getValue(n,e)+"";i.includes(o)||i.push(o)}})),i},t.extractFilterColId=function(e){return e.xKey||e.calloutLabelKey},t.prototype.isValidColumnFilter=function(e){e.indexOf("-filtered-out")&&(e=e.replace("-filtered-out",""));var t=this.getColumnFilterType(e);return"boolean"===typeof t?t:n._.includes(["agSetColumnFilter","agMultiColumnFilter"],t)},t.prototype.getColumnFilterType=function(e){var t=this.getColumnById(e);if(t){var i=t.getColDef();return i.filter}},t.prototype.getColumnById=function(e){return this.columnModel.getGridColumn(e)},aD([(0,n.fsG)("gridApi")],t.prototype,"gridApi",void 0),aD([(0,n.fsG)("columnModel")],t.prototype,"columnModel",void 0),aD([(0,n.fsG)("valueService")],t.prototype,"valueService",void 0),t=i=aD([(0,n.Vu6)("chartCrossFilterService")],t),t}(n.AS9),cD=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),uD=function(){return uD=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},uD.apply(this,arguments)},dD=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},pD=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},hD=function(e,t,i){if(i||2===arguments.length)for(var n,o=0,r=t.length;o<r;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},fD=function(e){var t="function"===typeof Symbol&&Symbol.iterator,i=t&&e[t],n=0;if(i)return i.call(e);
18if(e&&"number"===typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},gD=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.cellRanges=[],t.bodyScrollListener=t.onBodyScroll.bind(t),t.dragging=!1,t.intersectionRange=!1,t}return cD(t,e),t.prototype.init=function(){var e=this;this.addManagedListener(this.eventService,n.zW2.EVENT_NEW_COLUMNS_LOADED,(function(){return e.onColumnsChanged()})),this.addManagedListener(this.eventService,n.zW2.EVENT_COLUMN_VISIBLE,this.onColumnsChanged.bind(this)),this.addManagedListener(this.eventService,n.zW2.EVENT_COLUMN_VALUE_CHANGED,this.onColumnsChanged.bind(this)),this.addManagedListener(this.eventService,n.zW2.EVENT_COLUMN_PIVOT_MODE_CHANGED,(function(){return e.removeAllCellRanges()})),this.addManagedListener(this.eventService,n.zW2.EVENT_COLUMN_ROW_GROUP_CHANGED,(function(){return e.removeAllCellRanges()})),this.addManagedListener(this.eventService,n.zW2.EVENT_COLUMN_PIVOT_CHANGED,(function(){return e.removeAllCellRanges()})),this.addManagedListener(this.eventService,n.zW2.EVENT_COLUMN_GROUP_OPENED,this.refreshLastRangeStart.bind(this)),this.addManagedListener(this.eventService,n.zW2.EVENT_COLUMN_MOVED,this.refreshLastRangeStart.bind(this)),this.addManagedListener(this.eventService,n.zW2.EVENT_COLUMN_PINNED,this.refreshLastRangeStart.bind(this)),this.ctrlsService.whenReady((function(){var t=e.ctrlsService.getGridBodyCtrl();e.autoScrollService=new n.Cvn({scrollContainer:t.getBodyViewportElement(),scrollAxis:"xy",getVerticalPosition:function(){return t.getScrollFeature().getVScrollPosition().top},setVerticalPosition:function(e){return t.getScrollFeature().setVerticalScrollPosition(e)},getHorizontalPosition:function(){return t.getScrollFeature().getHScrollPosition().left},setHorizontalPosition:function(e){return t.getScrollFeature().setHorizontalScrollPosition(e)},shouldSkipVerticalScroll:function(){return!e.gridOptionsService.isDomLayout("normal")},shouldSkipHorizontalScroll:function(){return!t.getScrollFeature().isHorizontalScrollShowing()}})}))},t.prototype.onColumnsChanged=function(){var e=this;this.refreshLastRangeStart();var t=this.columnModel.getAllDisplayedColumns();
18this.cellRanges.forEach((function(i){var o=i.columns;i.columns=i.columns.filter((function(e){return e.isVisible()&&-1!==t.indexOf(e)}));var r=!n._.areEqual(o,i.columns);r&&e.dispatchChangedEvent(!1,!0,i.id)}));var i=this.cellRanges.length;this.cellRanges=this.cellRanges.filter((function(e){return e.columns.length>0})),i>this.cellRanges.length&&this.dispatchChangedEvent(!1,!0)},t.prototype.refreshLastRangeStart=function(){var e=n._.last(this.cellRanges);e&&this.refreshRangeStart(e)},t.prototype.isContiguousRange=function(e){var t=e.columns;if(!t.length)return!1;var i=this.columnModel.getAllDisplayedColumns(),o=t.map((function(e){return i.indexOf(e)})).sort((function(e,t){return e-t}));return n._.last(o)-o[0]+1===t.length},t.prototype.getRangeStartRow=function(e){if(e.startRow&&e.endRow)return this.rowPositionUtils.before(e.startRow,e.endRow)?e.startRow:e.endRow;var t=this.pinnedRowModel.getPinnedTopRowCount()>0?"top":null;return{rowIndex:0,rowPinned:t}},t.prototype.getRangeEndRow=function(e){if(e.startRow&&e.endRow)return this.rowPositionUtils.before(e.startRow,e.endRow)?e.endRow:e.startRow;var t=this.pinnedRowModel.getPinnedBottomRowCount(),i=t>0;return i?{rowIndex:t-1,rowPinned:"bottom"}:{rowIndex:this.rowModel.getRowCount()-1,rowPinned:null}},t.prototype.setRangeToCell=function(e,t){if(void 0===t&&(t=!1),this.gridOptionsService.get("enableRangeSelection")){var i=this.calculateColumnsBetween(e.column,e.column);if(i){var o=this.gridOptionsService.get("suppressMultiRangeSelection");(o||!t||n._.missing(this.cellRanges))&&this.removeAllCellRanges(!0);var 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)}}},t.prototype.extendLatestRangeToCell=function(e){if(!this.isEmpty()&&this.newestRangeStartCell){var t=n._.last(this.cellRanges);this.updateRangeEnd(t,e)}},t.prototype.updateRangeEnd=function(e,t,i){void 0===i&&(i=!1);var n=t.column,o=this.calculateColumnsBetween(e.startColumn,n);o&&!this.isLastCellOfRange(e,t)&&(e.columns=o,e.endRow={rowIndex:t.rowIndex,rowPinned:t.rowPinned},i||this.dispatchChangedEvent(!0,!0,e.id))},t.prototype.refreshRangeStart=function(e){var t=e.startColumn,i=e.columns,o=function(t,i){var n=e.columns.filter((function(e){return e!==t}));t?(e.startColumn=t,e.columns=i?hD([t],pD(n),!1):hD(hD([],pD(n),!1),[t],!1)):e.columns=n},r=this.getRangeEdgeColumns(e),s=r.left,a=r.right,l=t===i[0]&&t!==s;if(l)o(s,!0);else{var c=t===n._.last(i)&&t===a;c&&o(a,!1)}},t.prototype.getRangeEdgeColumns=function(e){var t=this.columnModel.getAllDisplayedColumns(),i=e.columns.map((function(e){return t.indexOf(e)})).filter((function(e){return e>-1})).sort((function(e,t){return e-t}));return{left:t[i[0]],right:t[n._.last(i)]}},t.prototype.extendLatestRangeInDirection=function(e){if(!this.isEmpty()&&this.newestRangeStartCell){var t=e.key,i=e.ctrlKey||e.metaKey,o=n._.last(this.cellRanges),r=this.newestRangeStartCell,s=o.columns[0],a=n._.last(o.columns),l=o.endRow.rowIndex,c=o.endRow.rowPinned,u=r.column===s?a:s,d={column:u,rowIndex:l,rowPinned:c},p=this.cellNavigationService.getNextCellToFocus(t,d,i);if(p)return this.setCellRange({rowStartIndex:r.rowIndex,rowStartPinned:r.rowPinned,rowEndIndex:p.rowIndex,rowEndPinned:p.rowPinned,columnStart:r.column,columnEnd:p.column}),p}},t.prototype.setCellRange=function(e){this.gridOptionsService.get("enableRangeSelection")&&(this.removeAllCellRanges(!0),this.addCellRange(e))},t.prototype.setCellRanges=function(e){var t=this;n._.shallowCompare(this.cellRanges,e)||(this.removeAllCellRanges(!0),e.forEach((function(e){e.columns&&e.startRow&&t.setNewestRangeStartCell({rowIndex:e.startRow.rowIndex,rowPinned:e.startRow.rowPinned,column:e.columns[0]}),t.cellRanges.push(e)})),this.dispatchChangedEvent(!1,!0))},t.prototype.setNewestRangeStartCell=function(e){this.newestRangeStartCell=e},t.prototype.clearCellRangeCellValues=function(e){var t=this,i=e.cellRanges,o=e.cellEventSource,r=void 0===o?"rangeService":o,s=e.dispatchWrapperEvents,a=e.wrapperEventSource,l=void 0===a?"deleteKey":a;
18if(s){var c={type:n.zW2.EVENT_RANGE_DELETE_START,source:l};this.eventService.dispatchEvent(c)}if(i||(i=this.cellRanges),i.forEach((function(e){t.forEachRowInRange(e,(function(i){var n=t.rowPositionUtils.getRowNode(i);if(n)for(var o=0;o<e.columns.length;o++){var s=t.columnModel.getGridColumn(e.columns[o]);if(!s||!s.isCellEditable(n))return;n.setDataValue(s,null,r)}}))})),s){var u={type:n.zW2.EVENT_RANGE_DELETE_END,source:l};this.eventService.dispatchEvent(u)}},t.prototype.createCellRangeFromCellRangeParams=function(e){var t,i=this,o=!1;if(e.columns)t=e.columns.map((function(e){return i.columnModel.getColumnWithValidation(e)})).filter((function(e){return e}));else{var r=this.columnModel.getColumnWithValidation(e.columnStart),s=this.columnModel.getColumnWithValidation(e.columnEnd);if(!r||!s)return;t=this.calculateColumnsBetween(r,s),t&&t.length&&(o=t[0]!==r)}if(t){var a=null!=e.rowStartIndex?{rowIndex:e.rowStartIndex,rowPinned:e.rowStartPinned||null}:void 0,l=null!=e.rowEndIndex?{rowIndex:e.rowEndIndex,rowPinned:e.rowEndPinned||null}:void 0;return{startRow:a,endRow:l,columns:t,startColumn:o?n._.last(t):t[0]}}},t.prototype.addCellRange=function(e){if(this.gridOptionsService.get("enableRangeSelection")){var t=this.createCellRangeFromCellRangeParams(e);t&&(t.startRow&&this.setNewestRangeStartCell({rowIndex:t.startRow.rowIndex,rowPinned:t.startRow.rowPinned,column:t.startColumn}),this.cellRanges.push(t),this.dispatchChangedEvent(!1,!0,t.id))}},t.prototype.getCellRanges=function(){return this.cellRanges},t.prototype.isEmpty=function(){return 0===this.cellRanges.length},t.prototype.isMoreThanOneCell=function(){var e=this.cellRanges.length;if(0===e)return!1;if(e>1)return!0;var t=this.cellRanges[0],i=this.getRangeStartRow(t),n=this.getRangeEndRow(t);return i.rowPinned!==n.rowPinned||i.rowIndex!==n.rowIndex||1!==t.columns.length},t.prototype.areAllRangesAbleToMerge=function(){var e,t,i,n=this,o=new Map,r=this.cellRanges.length;if(r<=1)return!0;
18this.cellRanges.forEach((function(e){n.forEachRowInRange(e,(function(t){var i="".concat(t.rowPinned||"normal","_").concat(t.rowIndex),n=o.get(i),r=e.columns.map((function(e){return e.getId()}));if(n){var s=r.filter((function(e){return-1===n.indexOf(e)}));n.push.apply(n,hD([],pD(s),!1))}else o.set(i,r)}))}));try{for(var s=fD(o.values()),a=s.next();!a.done;a=s.next()){var l=a.value,c=l.sort().join();if(void 0!==i){if(i!==c)return!1}else i=c}}catch(u){e={error:u}}finally{try{a&&!a.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}return!0},t.prototype.forEachRowInRange=function(e,t){var i=this.getRangeStartRow(e),n=this.getRangeEndRow(e),o=i;while(o){if(t(o),this.rowPositionUtils.sameRow(o,n))break;o=this.cellNavigationService.getRowBelow(o)}},t.prototype.removeAllCellRanges=function(e){this.isEmpty()||(this.onDragStop(),this.cellRanges.length=0,e||this.dispatchChangedEvent(!1,!0))},t.prototype.onBodyScroll=function(){this.dragging&&this.lastMouseEvent&&this.onDragging(this.lastMouseEvent)},t.prototype.isCellInAnyRange=function(e){return this.getCellRangeCount(e)>0},t.prototype.isCellInSpecificRange=function(e,t){var i=null!==t.columns&&n._.includes(t.columns,e.column),o=this.isRowInRange(e.rowIndex,e.rowPinned,t);return i&&o},t.prototype.isLastCellOfRange=function(e,t){var i=e.startRow,o=e.endRow,r=this.rowPositionUtils.before(i,o)?o:i,s=t.rowIndex===r.rowIndex&&t.rowPinned===r.rowPinned,a=e.columns[0],l=n._.last(e.columns),c=e.startColumn===a?l:a,u=t.column===c;return u&&s},t.prototype.isBottomRightCell=function(e,t){var i=this.columnModel.getAllDisplayedColumns(),o=e.columns.map((function(e){return i.indexOf(e)})).sort((function(e,t){return e-t})),r=e.startRow,s=e.endRow,a=this.rowPositionUtils.before(r,s)?s:r,l=i.indexOf(t.column)===n._.last(o),c=t.rowIndex===a.rowIndex&&n._.makeNull(t.rowPinned)===n._.makeNull(a.rowPinned);return l&&c},t.prototype.getCellRangeCount=function(e){var t=this;return this.isEmpty()?0:this.cellRanges.filter((function(i){return t.isCellInSpecificRange(e,i)})).length},t.prototype.isRowInRange=function(e,t,i){var n=this.getRangeStartRow(i),o=this.getRangeEndRow(i),r={rowIndex:e,rowPinned:t||null},s=r.rowIndex===n.rowIndex&&r.rowPinned==n.rowPinned,a=r.rowIndex===o.rowIndex&&r.rowPinned==o.rowPinned;if(s||a)return!0;var l=!this.rowPositionUtils.before(r,n),c=this.rowPositionUtils.before(r,o);return l&&c},t.prototype.getDraggingRange=function(){return this.draggingRange},t.prototype.onDragStart=function(e){if(this.gridOptionsService.get("enableRangeSelection")){var t=e.ctrlKey,i=e.metaKey,o=e.shiftKey,r=t||i,s=!this.gridOptionsService.get("suppressMultiRangeSelection"),a=!!s&&r,l=o&&n._.existsAndNotEmpty(this.cellRanges);a||l&&!n._.exists(n._.last(this.cellRanges).type)||this.removeAllCellRanges(!0);var c=this.dragService.getStartTarget();if(c&&this.updateValuesOnMove(c),this.lastCellHovered){if(this.dragging=!0,this.lastMouseEvent=e,this.intersectionRange=a&&this.getCellRangeCount(this.lastCellHovered)>1,l||this.setNewestRangeStartCell(this.lastCellHovered),this.cellRanges.length>0)this.draggingRange=n._.last(this.cellRanges);else{var u={rowIndex:this.lastCellHovered.rowIndex,rowPinned:this.lastCellHovered.rowPinned};this.draggingRange={startRow:u,endRow:u,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)}}},t.prototype.intersectLastRange=function(e){var t=this;if((!e||!this.dragging)&&!this.gridOptionsService.get("suppressMultiRangeSelection")&&!this.isEmpty()){var i=n._.last(this.cellRanges),o=this.getRangeStartRow(i),r=this.getRangeEndRow(i),s=[];this.cellRanges.slice(0,-1).forEach((function(e){var a=t.getRangeStartRow(e),l=t.getRangeEndRow(e),c=e.columns,u=c.filter((function(e){return-1===i.columns.indexOf(e)}));if(u.length!==c.length)if(t.rowPositionUtils.before(r,a)||t.rowPositionUtils.before(l,o))s.push(e);else{var d=s.length;if(t.rowPositionUtils.before(a,o)){var p={columns:hD([],pD(c),!1),startColumn:i.startColumn,startRow:uD({},a),endRow:t.cellNavigationService.getRowAbove(o)};s.push(p)}if(u.length>0){var h={columns:u,startColumn:n._.includes(u,i.startColumn)?i.startColumn:u[0],startRow:t.rowPositionUtils.rowMax([uD({},o),uD({},a)]),endRow:t.rowPositionUtils.rowMin([uD({},r),uD({},l)])};s.push(h)}t.rowPositionUtils.before(r,l)&&s.push({columns:hD([],pD(c),!1),startColumn:i.startColumn,startRow:t.cellNavigationService.getRowBelow(r),endRow:uD({},l)}),s.length-d===1&&(s[s.length-1].id=e.id)}else s.push(e)})),this.cellRanges=s,e&&this.dispatchChangedEvent(!1,!0)}},t.prototype.updateValuesOnMove=function(e){var t=n._.getCtrlForEventTarget(this.gridOptionsService,e,n.Ekq.DOM_DATA_KEY_CELL_CTRL),i=null===t||void 0===t?void 0:t.getCellPosition();this.cellHasChanged=!1,!i||this.lastCellHovered&&this.cellPositionUtils.equals(i,this.lastCellHovered)||(this.lastCellHovered&&(this.cellHasChanged=!0),this.lastCellHovered=i)},t.prototype.onDragging=function(e){var t=this;
18if(this.dragging&&e){this.updateValuesOnMove(e.target),this.lastMouseEvent=e;var i=this.lastCellHovered,n=function(e){return i&&i.rowPinned===e&&t.newestRangeStartCell.rowPinned===e},o=n("top")||n("bottom");if(this.autoScrollService.check(e,o),this.cellHasChanged){var r=this.calculateColumnsBetween(this.newestRangeStartCell.column,i.column);r&&(this.draggingRange.endRow={rowIndex:i.rowIndex,rowPinned:i.rowPinned},this.draggingRange.columns=r,this.dispatchChangedEvent(!1,!1,this.draggingRange.id))}}},t.prototype.onDragStop=function(){if(this.dragging){var e=this.draggingRange.id;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)}},t.prototype.dispatchChangedEvent=function(e,t,i){var o={type:n.zW2.EVENT_RANGE_SELECTION_CHANGED,started:e,finished:t,id:i};this.eventService.dispatchEvent(o)},t.prototype.calculateColumnsBetween=function(e,t){var i=this.columnModel.getAllDisplayedColumns(),n=e===t,o=i.indexOf(e);if(o<0)console.warn("AG Grid: column ".concat(e.getId()," is not visible"));else{var r=n?o:i.indexOf(t);if(!(r<0)){if(n)return[e];for(var s=Math.min(o,r),a=s===o?r:o,l=[],c=s;c<=a;c++)l.push(i[c]);return l}console.warn("AG Grid: column ".concat(t.getId()," is not visible"))}},dD([(0,n.fsG)("rowModel")],t.prototype,"rowModel",void 0),dD([(0,n.fsG)("dragService")],t.prototype,"dragService",void 0),dD([(0,n.fsG)("columnModel")],t.prototype,"columnModel",void 0),dD([(0,n.fsG)("cellNavigationService")],t.prototype,"cellNavigationService",void 0),dD([(0,n.fsG)("pinnedRowModel")],t.prototype,"pinnedRowModel",void 0),dD([(0,n.fsG)("rowPositionUtils")],t.prototype,"rowPositionUtils",void 0),dD([(0,n.fsG)("cellPositionUtils")],t.prototype,"cellPositionUtils",void 0),dD([(0,n.fsG)("ctrlsService")],t.prototype,"ctrlsService",void 0),dD([n.NqP],t.prototype,"init",null),t=dD([(0,n.Vu6)("rangeService")],t),t}(n.AS9),vD=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),yD=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},mD=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.changedCalculatedValues=!1,t.dragging=!1,t.shouldDestroyOnEndDragging=!1,t}return vD(t,e),t.prototype.init=function(){var e=this;this.dragService.addDragSource({dragStartPixels:0,eElement:this.getGui(),onDragStart:this.onDragStart.bind(this),onDragging:function(t){e.dragging=!0,e.rangeService.autoScrollService.check(t),e.changedCalculatedValues&&(e.onDrag(t),e.changedCalculatedValues=!1)},onDragStop:function(t){e.dragging=!1,e.onDragEnd(t),e.clearValues(),e.rangeService.autoScrollService.ensureCleared(),document.body.classList.remove(e.getDraggingCssClass()),e.shouldDestroyOnEndDragging&&e.destroy()}}),this.addManagedListener(this.getGui(),"mousedown",this.preventRangeExtension.bind(this))},t.prototype.isDragging=function(){return this.dragging},t.prototype.getCellCtrl=function(){return this.cellCtrl},t.prototype.setCellCtrl=function(e){this.cellCtrl=e},t.prototype.getCellRange=function(){return this.cellRange},t.prototype.setCellRange=function(e){this.cellRange=e},t.prototype.getRangeStartRow=function(){return this.rangeStartRow},t.prototype.setRangeStartRow=function(e){this.rangeStartRow=e},t.prototype.getRangeEndRow=function(){return this.rangeEndRow},t.prototype.setRangeEndRow=function(e){this.rangeEndRow=e},t.prototype.getLastCellHovered=function(){return this.lastCellHovered},t.prototype.preventRangeExtension=function(e){e.stopPropagation()},t.prototype.onDragStart=function(e){this.cellHoverListener=this.addManagedListener(this.ctrlsService.getGridCtrl().getGui(),"mousemove",this.updateV
18aluesOnMove.bind(this)),document.body.classList.add(this.getDraggingCssClass())},t.prototype.getDraggingCssClass=function(){return"ag-dragging-".concat(this.type===n.Lm6.FILL?"fill":"range","-handle")},t.prototype.updateValuesOnMove=function(e){var t=this.mouseEventService.getCellPositionForEvent(e);!t||this.lastCellHovered&&this.cellPositionUtils.equals(t,this.lastCellHovered)||(this.lastCellHovered=t,this.changedCalculatedValues=!0)},t.prototype.getType=function(){return this.type},t.prototype.refresh=function(e){var t=this.getCellCtrl(),i=this.getGui(),o=n._.last(this.rangeService.getCellRanges()),r=o.startRow,s=o.endRow;if(r&&s){var a=this.rowPositionUtils.before(s,r);a?(this.setRangeStartRow(s),this.setRangeEndRow(r)):(this.setRangeStartRow(r),this.setRangeEndRow(s))}if(t!==e||!n._.isVisible(i)){this.setCellCtrl(e);var l=e.getComp().getParentOfValue();l&&l.appendChild(i)}this.setCellRange(o)},t.prototype.clearValues=function(){this.lastCellHovered=void 0,this.removeListeners()},t.prototype.removeListeners=function(){this.cellHoverListener&&(this.cellHoverListener(),this.cellHoverListener=void 0)},t.prototype.destroy=function(){if(!this.shouldDestroyOnEndDragging&&this.isDragging())return n._.setDisplayed(this.getGui(),!1),void(this.shouldDestroyOnEndDragging=!0);this.shouldDestroyOnEndDragging=!1,e.prototype.destroy.call(this),this.removeListeners();var t=this.getGui();t.parentElement&&t.parentElement.removeChild(t)},yD([(0,n.fsG)("rowRenderer")],t.prototype,"rowRenderer",void 0),yD([(0,n.fsG)("dragService")],t.prototype,"dragService",void 0),yD([(0,n.fsG)("rangeService")],t.prototype,"rangeService",void 0),yD([(0,n.fsG)("mouseEventService")],t.prototype,"mouseEventService",void 0),yD([(0,n.fsG)("columnModel")],t.prototype,"columnModel",void 0),yD([(0,n.fsG)("cellNavigationService")],t.prototype,"cellNavigationService",void 0),yD([(0,n.fsG)("navigationService")],t.prototype,"navigationService",void 0),yD([(0,n.fsG)("rowPositionUtils")],t.prototype,"rowPositionUtils",void 0),yD([(0,n.fsG)("cellPositionUtils")],t.prototype,"cellPositionUtils",void 0),yD([(0,n.fsG)("ctrlsService")],t.prototype,"ctrlsService",void 0),yD([n.NqP],t.prototype,"init",null),t}(n.wA2);function CD(e){var t=e.length,i=0;if(t<=1)return e;for(var n=0;n<e.length;n++){var o=e[n],r=o.toString().split("e-");r.length>1?i=Math.max(i,parseInt(r[1],10)):Math.floor(o)!==o&&(i=Math.max(i,o.toString().split(".")[1].length))}for(var s=0,a=0,l=0,c=0,u=0,d=0;d<t;d++)u=e[d],s+=d,a+=u,c+=d*d,l+=d*u;var p=(t*l-s*a)/(t*c-s*s),h=a/t-p*s/t,f=[];for(d=0;d<=t;d++)f.push(parseFloat((d*p+h).toFixed(i)));return f}var bD=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),wD=function(){return wD=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},wD.apply(this,arguments)},SD=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},ED=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},xD=function(e,t,i){if(i||2===arguments.length)for(var n,o=0,r=t.length;o<r;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},OD=function(e){function t(){var i=e.call(this,t.TEMPLATE)||this;return i.markedCells=[],i.cellValues=[],i.isUp=!1,i.isLeft=!1,i.isReduce=!1,i.type=n.Lm6.FILL,i}return bD(t,e),t.prototype.updateValuesOnMove=function(t){e.prototype.updateValuesOnMove.call(this,t),this.initialXY||(this.initialXY=this.mouseEventService.getNormalisedPosition(t));var i,n=this.initialXY,o=n.x,r=n.y,s=this.mouseEventService.getNormalisedPosition(t),a=s.x,l=s.y,c=Math.abs(o-a),u=Math.abs(r-l),d=this.getFillHandleDirection();i="xy"===d?c>u?"x":"y":d,i!==this.dragAxis&&(this.dragAxis=i,this.changedCalculatedValues=!0)},t.prototype.onDrag=function(e){if(!this.initialPosition){var t=this.getCellCtrl();if(!t)return;this.initialPosition=t.getCellPosition()}var i=this.getLastCellHovered();i&&this.markPathFrom(this.initialPosition,i)},t.prototype.onDragEnd=function(e){if(this.initialXY=null,this.markedCells.length){var t,i="x"===this.dragAxis,n=this.getCellRange(),o=n.columns.length,r=this.getRangeStartRow(),s=this.getRangeEndRow();if(this.isUp||this.isLeft){var a=i?r:this.lastCellMarked;t=this.rangeService.createCellRangeFromCellRangeParams({rowStartIndex:a.rowIndex,rowStartPinned:a.rowPinned,columnStart:i?this.lastCellMarked.column:n.columns[0],rowEndIndex:s.rowIndex,rowEndPinned:s.rowPinned,columnEnd:n.columns[o-1]})}else t=this.rangeService.createCellRangeFromCellRangeParams({rowStartIndex:r.rowIndex,rowStartPinned:r.rowPinned,columnStart:n.columns[0],rowEndIndex:i?s.rowIndex:this.lastCellMarked.rowIndex,rowEndPinned:i?s.rowPinned:this.lastCellMarked.rowPinned,columnEnd:i?this.lastCellMarked.column:n.columns[o-1]});t&&(this.raiseFillStartEvent(),this.handleValueChanged(n,t,e),this.rangeService.setCellRanges([t]),this.raiseFillEndEvent(n,t))}},t.prototype.getFillHandleDirection=function(){var e=this.gridOptionsService.get("fillHandleDirection");return e?"x"!==e&&"y"!==e&&"xy"!==e?(n._.warnOnce("valid values for fillHandleDirection are 'x', 'y' and 'xy'. Default to 'xy'."),"xy"):e:"xy"},t.prototype.raiseFillStartEvent=function(){var e={type:n.zW2.EVENT_FILL_START};this.eventService.dispatchEvent(e)},t.prototype.raiseFillEndEvent=function(e,t){var i={type:n.zW2.EVENT_FILL_END,initialRange:e,f
18inalRange:t};this.eventService.dispatchEvent(i)},t.prototype.handleValueChanged=function(e,t,i){var o=this,r=this.rangeService.getRangeEndRow(e),s=this.rangeService.getRangeStartRow(e),a=this.rangeService.getRangeEndRow(t),l=this.rangeService.getRangeStartRow(t),c="y"===this.dragAxis;if(!this.isReduce||this.gridOptionsService.get("suppressClearOnFillReduction")){var u=!0,d=[],p=[],h=0,f=function(){d.length=0,p.length=0,h=0},g=function(t,i){var p=o.isUp?r:s,h=!1;c&&(u=!0,f());var g=function(){var g=o.rowPositionUtils.getRowNode(p);if(!g)return"break";c&&t?v(d,t,g,(function(){return!o.rowPositionUtils.sameRow(p,o.isUp?s:r)})):i&&(u=!0,f(),i.forEach((function(t){return v(d,t,g,(function(){return t!==(o.isLeft?e.columns[0]:n._.last(e.columns))}))}))),h=o.rowPositionUtils.sameRow(p,o.isUp?l:a),p=o.isUp?o.cellNavigationService.getRowAbove(p):o.cellNavigationService.getRowBelow(p)};while(!h&&p){var y=g();if("break"===y)break}},v=function(e,t,r,s){var a,l,c,d=!1;if(u)c=o.valueService.getValue(t,r),p.push(c),u=s();else{var f=o.processValues(i,e,p,t,r,h++),g=f.value,v=f.fromUserFunction,y=f.sourceCol,m=f.sourceRowNode;if(c=g,t.isCellEditable(r)){var C=o.valueService.getValue(t,r);v||(y&&!1!==(null===(a=y.getColDef())||void 0===a?void 0:a.useValueFormatterForExport)&&(c=null!==(l=o.valueFormatterService.formatValue(y,m,c))&&void 0!==l?l:c),!1!==t.getColDef().useValueParserForImport&&(c=o.valueParserService.parseValue(t,r,y?c:n._.toStringOrNull(c),C))),v&&C===c?d=!0:r.setDataValue(t,c,"rangeService")}}d||e.push({value:c,column:t,rowNode:r})};if(c)e.columns.forEach((function(e){g(e)}));else{y=this.isLeft?xD([],ED(t.columns),!1).reverse():t.columns;g(void 0,y)}}else{var y=c?e.columns:e.columns.filter((function(e){return t.columns.indexOf(e)<0})),m=c?this.cellNavigationService.getRowBelow(a):l;m&&this.clearCellsInRange(m,r,y)}},t.prototype.clearCellsInRange=function(e,t,i){var n={startRow:e,endRow:t,columns:i,startColumn:i[0]};this.rangeService.clearCellRangeCellValues({cellRanges:[n]})},t.prototype.processValues=function(e,t,i,o,r,s){var a,l=this.gridOptionsService.getCallback("fillOperation"),c="y"===this.dragAxis;if(a=c?this.isUp?"up":"down":this.isLeft?"left":"right",l){var u={event:e,values:t.map((function(e){var t=e.value;return t})),initialValues:i,currentIndex:s,currentCellValue:this.valueService.getValue(o,r),direction:a,column:o,rowNode:r},d=l(u);if(!1!==d)return{value:d,fromUserFunction:!0}}var p=!t.some((function(e){var t=e.value,i=parseFloat(t);return isNaN(i)||i.toString()!==t.toString()}));if(e.altKey||!p){if(p&&1===i.length){var h=this.isUp||this.isLeft?-1:1;return{value:parseFloat(n._.last(t).value)+1*h,fromUserFunction:!1}}var f=t[s%t.length],g=f.value,v=f.column,y=f.rowNode;return{value:g,fromUserFunction:!1,sourceCol:v,sourceRowNode:y}}return{value:n._.last(CD(t.map((function(e){var t=e.value;return Number(t)})))),fromUserFunction:!1}},t.prototype.clearValues=function(){this.clearMarkedPath(),this.clearCellValues(),this.lastCellMarked=void 0,e.prototype.clearValues.call(this)},t.prototype.clearMarkedPath=function(){this.markedCells.forEach((function(e){if(e.isAlive()){var 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}
18,t.prototype.clearCellValues=function(){this.cellValues.length=0},t.prototype.markPathFrom=function(e,t){if(this.clearMarkedPath(),this.clearCellValues(),"y"===this.dragAxis){if(this.rowPositionUtils.sameRow(t,e))return;var i=this.rowPositionUtils.before(t,e),n=this.getRangeStartRow(),o=this.getRangeEndRow();i&&(t.rowPinned==n.rowPinned&&t.rowIndex>=n.rowIndex||n.rowPinned!=o.rowPinned&&t.rowPinned==o.rowPinned&&t.rowIndex<=o.rowIndex)?(this.reduceVertical(e,t),this.isReduce=!0):(this.extendVertical(e,t,i),this.isReduce=!1)}else{var r=e.column,s=t.column;if(r===s)return;var a=this.columnModel.getAllDisplayedColumns(),l=a.indexOf(r),c=a.indexOf(s);c<=l&&c>=a.indexOf(this.getCellRange().columns[0])?(this.reduceHorizontal(e,t),this.isReduce=!0):(this.extendHorizontal(e,t,c<l),this.isReduce=!1)}this.lastCellMarked=t},t.prototype.extendVertical=function(e,t,i){var n=this,o=n.navigationService,r=n.rangeService,s=e;do{for(var a=this.getCellRange(),l=a.columns.length,c=0;c<l;c++){var u=a.columns[c],d={rowIndex:s.rowIndex,rowPinned:s.rowPinned},p=wD(wD({},d),{column:u}),h=r.isCellInSpecificRange(p,a),f=this.rowPositionUtils.sameRow(s,e);if(i&&(this.isUp=!0),!f){var g=o.getCellByPosition(p);if(g){this.markedCells.push(g);var v=g.getComp();h||(v.addOrRemoveCssClass("ag-selection-fill-left",0===c),v.addOrRemoveCssClass("ag-selection-fill-right",c===l-1)),v.addOrRemoveCssClass(i?"ag-selection-fill-top":"ag-selection-fill-bottom",this.rowPositionUtils.sameRow(s,t))}}}if(this.rowPositionUtils.sameRow(s,t))break}while(s=i?this.cellNavigationService.getRowAbove(s):this.cellNavigationService.getRowBelow(s))},t.prototype.reduceVertical=function(e,t){var i=e;do{for(var n=this.getCellRange(),o=n.columns.length,r=this.rowPositionUtils.sameRow(i,t),s=0;s<o;s++){var a={rowIndex:i.rowIndex,rowPinned:i.rowPinned},l=wD(wD({},a),{column:n.columns[s]}),c=this.navigationService.getCellByPosition(l);if(c){this.markedCells.push(c);var u=c.getComp();u.addOrRemoveCssClass("ag-selection-fill-bottom",this.rowPositionUtils.sameRow(i,t))}}if(r)break}while(i=this.cellNavigationService.getRowAbove(i))},t.prototype.extendHorizontal=function(e,t,i){var o=this,r=this.columnModel.getAllDisplayedColumns(),s=r.indexOf(i?t.column:e.column),a=r.indexOf(i?this.getCellRange().columns[0]:t.column),l=i?0:1,c=r.slice(s+l,a+l),u=this.getRangeStartRow(),d=this.getRangeEndRow();c.forEach((function(e){var t=u,r=!1;do{r=o.rowPositionUtils.sameRow(t,d);var s=o.navigationService.getCellByPosition({rowIndex:t.rowIndex,rowPinned:t.rowPinned,column:e});if(s){o.markedCells.push(s);var a=s.getComp();a.addOrRemoveCssClass("ag-selection-fill-top",o.rowPositionUtils.sameRow(t,u)),a.addOrRemoveCssClass("ag-selection-fill-bottom",o.rowPositionUtils.sameRow(t,d)),i?(o.isLeft=!0,a.addOrRemoveCssClass("ag-selection-fill-left",e===c[0])):a.addOrRemoveCssClass("ag-selection-fill-right",e===n._.last(c))}t=o.cellNavigationService.getRowBelow(t)}while(!r)}))},t.prototype.reduceHorizontal=function(e,t){var i=this,n=this.columnModel.getAllDisplayedColumns(),o=n.indexOf(t.column),r=n.indexOf(e.column),s=n.slice(o,r),a=this.getRangeStartRow(),l=this.getRangeEndRow();s.forEach((function(e){var t=a,n=!1;do{n=i.rowPositionUtils.sameRow(t,l);var o=i.navigationService.getCellByPosition({rowIndex:t.rowIndex,rowPinned:t.rowPinned,column:e});if(o){i.markedCells.push(o);var r=o.getComp();r.addOrRemoveCssClass("ag-selection-fill-right",e===s[0])}t=i.cellNavigationService.getRowBelow(t)}while(!n)}))},t.prototype.refresh=function(t){var i=this.rangeService.getCellRanges()[0],n=!i.startRow||!i.endRow;n?this.destroy():e.prototype.refresh.call(this,t)},t.TEMPLATE='<div class="ag-fill-handle"></div>',SD([(0,n.fsG)("valueService")],t.prototype,"valueService",void 0),SD([(0,n.fsG)("valueParserService")],t.prototype,"valueParserService",void 0),SD([(0,n.fsG)("valueFormatterService")],t.prototype,"valueFormatterService",void 0),t}(mD),TD=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),DD=function(){return DD=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},DD.apply(this,arguments)},RD=function(e){function t(){var i=e.call(this,t.TEMPLATE)||this;return i.type=n.Lm6.RANGE,i.rangeFixed=!1,i}return TD(t,e),t.prototype.onDrag=function(e){var t=this.getLastCellHovered();if(t){var i=this.rangeService.getCellRanges(),o=n._.last(i);if(this.rangeFixed||(this.fixRangeStartEnd(o),this.rangeFixed=!0),this.endPosition={rowIndex:t.rowIndex,rowPinned:t.rowPinned,column:t.column},2===i.length&&i[0].type===n.StC.DIMENSION&&o.type===n.StC.VALUE){var r=!this.rowPositionUtils.sameRow(this.endPosition,this.rangeService.getRangeEndRow(o));r&&this.rangeService.updateRangeEnd(i[0],DD(DD({},this.endPosition),{column:i[0].columns[0]}),!0)}this.rangeService.extendLatestRangeToCell(this.endPosition)}},t.prototype.onDragEnd=function(e){var t=n._.last(this.rangeService.getCellRanges());this.fixRangeStartEnd(t),this.rangeFixed=!1},t.prototype.fixRangeStartEnd=function(e){var t=this.rangeService.getRangeStartRow(e),i=this.rangeService.getRangeEndRow(e),n=e.columns[0];e.startRow=t,e.endRow=i,e.startColumn=n},t.TEMPLATE='<div class="ag-range-handle"></div>',t}(mD),AD=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),_D=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},PD=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return AD(t,e),t.prototype.createSelectionHandle=function(e){return this.createBean(e===n.Lm6.RANGE?new RD:new OD)},t=_D([(0,n.Vu6)("selectionHandleFactory")],t),t}(n.AS9),MD="31.0.0",kD={version:MD,moduleName:n.GXE.RangeSelectionModule,beans:[gD,PD],agStackComponents:[{componentName:"AgFillHandle",componentClass:OD},{componentName:"AgRangeHandle",componentClass:RD}],dependantModules:[y]},ND=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),LD=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},ID=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},FD=function(e){function t(i){var n=e.call(this,t.TEMPLATE)||this;
18return n.H=1,n.S=1,n.B=1,n.A=1,n.isSpectrumDragging=!1,n.isSpectrumHueDragging=!1,n.isSpectrumAlphaDragging=!1,n.colorChanged=!1,n.picker=i.picker,n}return ND(t,e),t.prototype.postConstruct=function(){var e=this;this.initTabIndex(),this.initRecentColors(),this.addGuiEventListener("focus",(function(){return e.spectrumColor.focus()})),this.addGuiEventListener("keydown",(function(t){t.key!==n.VDZ.ENTER||t.defaultPrevented||e.destroy()})),this.addManagedListener(this.spectrumColor,"keydown",(function(t){return e.moveDragger(t)})),this.addManagedListener(this.spectrumAlphaSlider,"keydown",(function(t){return e.moveAlphaSlider(t)})),this.addManagedListener(this.spectrumHueSlider,"keydown",(function(t){return e.moveHueSlider(t)})),this.addManagedListener(this.spectrumVal,"mousedown",this.onSpectrumDraggerDown.bind(this)),this.addManagedListener(this.spectrumHue,"mousedown",this.onSpectrumHueDown.bind(this)),this.addManagedListener(this.spectrumAlpha,"mousedown",this.onSpectrumAlphaDown.bind(this)),this.addGuiEventListener("mousemove",(function(t){e.onSpectrumDraggerMove(t),e.onSpectrumHueMove(t),e.onSpectrumAlphaMove(t)})),this.addManagedListener(document,"mouseup",this.onMouseUp.bind(this)),this.addManagedListener(this.recentColors,"click",this.onRecentColorClick.bind(this)),this.addManagedListener(this.recentColors,"keydown",(function(t){t.key!==n.VDZ.ENTER&&t.key!==n.VDZ.SPACE||(t.preventDefault(),e.onRecentColorClick(t))}))},t.prototype.initTabIndex=function(){var e=this.tabIndex=this.gridOptionsService.get("tabIndex").toString();this.spectrumColor.setAttribute("tabindex",e),this.spectrumHueSlider.setAttribute("tabindex",e),this.spectrumAlphaSlider.setAttribute("tabindex",e)},t.prototype.refreshSpectrumRect=function(){return this.spectrumValRect=this.spectrumVal.getBoundingClientRect()},t.prototype.refreshHueRect=function(){return this.spectrumHueRect=this.spectrumHue.getBoundingClientRect()},t.prototype.refreshAlphaRect=function(){return this.spectrumAlphaRect=this.spectrumAlpha.getBoundingClientRect()},t.prototype.onSpectrumDraggerDown=function(e){this.refreshSpectrumRect(),this.isSpectrumDragging=!0,this.moveDragger(e)},t.prototype.onSpectrumDraggerMove=function(e){this.isSpectrumDragging&&this.moveDragger(e)},t.prototype.onSpectrumHueDown=function(e){this.refreshHueRect(),this.isSpectrumHueDragging=!0,this.moveHueSlider(e)},t.prototype.onSpectrumHueMove=function(e){this.isSpectrumHueDragging&&this.moveHueSlider(e)},t.prototype.onSpectrumAlphaDown=function(e){this.refreshAlphaRect(),this.isSpectrumAlphaDragging=!0,this.moveAlphaSlider(e)},t.prototype.onSpectrumAlphaMove=function(e){this.isSpectrumAlphaDragging&&this.moveAlphaSlider(e)},t.prototype.onMouseUp=function(){this.isSpectrumDragging=!1,this.isSpectrumHueDragging=!1,this.isSpectrumAlphaDragging=!1},t.prototype.moveDragger=function(e){var t=this.spectrumValRect;if(t){var i,o;if(e instanceof MouseEvent)i=e.clientX-t.left,o=e.clientY-t.top;else{var r=e.key===n.VDZ.LEFT,s=e.key===n.VDZ.RIGHT,a=e.key===n.VDZ.UP,l=e.key===n.VDZ.DOWN,c=a||l,u=r||s;if(!c&&!u)return;e.preventDefault();var d=this.getSpectrumValue(),p=d.x,h=d.y;i=p+(u?r?-5:5:0),o=h+(c?a?-5:5:0)}i=Math.max(i,0),i=Math.min(i,t.width),o=Math.max(o,0),o=Math.min(o,t.height),this.setSpectrumValue(i/t.width,1-o/t.height)}},t.prototype.moveHueSlider=function(e){var t=this.spectrumHueRect;if(t){var i=this.moveSlider(this.spectrumHueSlider,e);null!=i&&(this.H=1-i/t.width,this.update())}},t.prototype.moveAlphaSlider=function(e){var t=this.spectrumAlphaRect;if(t){var i=this.moveSlider(this.spectrumAlphaSlider,e);null!=i&&(this.A=i/t.width,this.update())}},t.prototype.moveSlider=function(e,t){var i,o,r=e.getBoundingClientRect(),s=null===(i=e.parentElement)||void 0===i?void 0:i.getBoundingClientRect();if(!e||!s)return null;if(t instanceof MouseEvent)o=t.clientX-s.left;else{var a=t.key===n.VDZ.LEFT,l=t.key===n.VDZ.RIGHT;if(!a&&!l)return null;t.preventDefault();var c=a?-5:5;o=parseFloat(e.style.left)-r.width/2+c}return o=Math.max(o,0),o=Math.min(o,s.width),e.style.left=o+r.width/2+"px",o},t.prototype.update=function(){var e=nf.Color.fromHSB(360*this.H,this.S,this.B,this.A),t=nf.Color.fromHSB(360*this.H,1,1),i=e.toRgbaString(),n=this.picker,o=nf.Color.fromString(n.getValue());o.toRgbaString()!==i&&(this.colorChanged=!0),n.setValue(i),this.spectrumColor.style.backgroundColor=t.toRgbaString(),this.spectrumDragger.style.backgroundColor=i},t.prototype.setSpectrumValue=function(e,t){var i=this.spectrumValRect||this.refreshSpectrumRect
18();if(null!=i){var n=this.spectrumDragger,o=n.getBoundingClientRect();e=Math.max(0,e),e=Math.min(1,e),t=Math.max(0,t),t=Math.min(1,t),this.S=e,this.B=t,n.style.left=e*i.width-o.width/2+"px",n.style.top=(1-t)*i.height-o.height/2+"px",this.update()}},t.prototype.getSpectrumValue=function(){var e=this.spectrumDragger,t=e.getBoundingClientRect(),i=parseFloat(e.style.left)+t.width/2,n=parseFloat(e.style.top)+t.height/2;return{x:i,y:n}},t.prototype.initRecentColors=function(){var e=this,i=t.recentColors,n=i.map((function(t,i){return'<div class="ag-recent-color" id='.concat(i,' style="background-color: ').concat(t,'; width: 15px; height: 15px;" recent-color="').concat(t,'" tabIndex="').concat(e.tabIndex,'"></div>')}));this.recentColors.innerHTML=n.join("")},t.prototype.setValue=function(e){var t=nf.Color.fromString(e),i=ID(t.toHSB(),3),n=i[0],o=i[1],r=i[2];this.H=(isNaN(n)?0:n)/360,this.A=t.a;var s=this.spectrumHueRect||this.refreshHueRect(),a=this.spectrumAlphaRect||this.refreshAlphaRect();this.spectrumHueSlider.style.left="".concat((this.H-1)*-s.width,"px"),this.spectrumAlphaSlider.style.left="".concat(this.A*a.width,"px"),this.setSpectrumValue(o,r)},t.prototype.onRecentColorClick=function(e){var i=e.target;if(n._.exists(i.id)){var o=parseInt(i.id,10);this.setValue(t.recentColors[o]),this.destroy()}},t.prototype.addRecentColor=function(){var e=nf.Color.fromHSB(360*this.H,this.S,this.B,this.A),i=e.toRgbaString(),n=t.recentColors;this.colorChanged&&n[0]!==i&&(n=n.filter((function(e){return e!=i})),n=[i].concat(n),n.length>t.maxRecentColors&&(n=n.slice(0,t.maxRecentColors)),t.recentColors=n)},t.prototype.destroy=function(){this.addRecentColor(),e.prototype.destroy.call(this)},t.maxRecentColors=8,t.recentColors=[],t.TEMPLATE='<div class="ag-color-panel" tabindex="-1">\n            <div ref="spectrumColor" class="ag-spectrum-color">\n                <div class="ag-spectrum-sat ag-spectrum-fill">\n                    <div ref="spectrumVal" class="ag-spectrum-val ag-spectrum-fill">\n                        <div ref="spectrumDragger" class="ag-spectrum-dragger"></div>\n                    </div>\n                </div>\n            </div>\n            <div class="ag-spectrum-tools">\n                <div ref="spectrumHue" class="ag-spectrum-hue ag-spectrum-tool">\n                    <div class="ag-spectrum-hue-background"></div>\n                    <div ref="spectrumHueSlider" class="ag-spectrum-slider"></div>\n                </div>\n                <div ref="spectrumAlpha" class="ag-spectrum-alpha ag-spectrum-tool">\n                    <div class="ag-spectrum-alpha-background"></div>\n                    <div ref="spectrumAlphaSlider" class="ag-spectrum-slider"></div>\n                </div>\n                <div ref="recentColors" class="ag-recent-colors"></div>\n            </div>\n        </div>',LD([(0,n.cqo)("spectrumColor")],t.prototype,"spectrumColor",void 0),LD([(0,n.cqo)("spectrumVal")],t.prototype,"spectrumVal",void 0),LD([(0,n.cqo)("spectrumDragger")],t.prototype,"spectrumDragger",void 0),LD([(0,n.cqo)("spectrumHue")],t.prototype,"spectrumHue",void 0),LD([(0,n.cqo)("spectrumHueSlider")],t.prototype,"spectrumHueSlider",void 0),LD([(0,n.cqo)("spectrumAlpha")],t.prototype,"spectrumAlpha",void 0),LD([(0,n.cqo)("spectrumAlphaSlider")],t.prototype,"spectrumAlphaSlider",void 0),LD([(0,n.cqo)("recentColors")],t.prototype,"recentColors",void 0),LD([n.NqP],t.prototype,"postConstruct",null),t}(n.wA2),GD=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),VD=function(){return VD=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},VD.apply(this,arguments)},BD=function(e){function t(t){var i=e.call(this,VD({pickerAriaLabelKey:"ariaLabelColorPicker",pickerAriaLabelValue:"Color Picker",pickerType:"ag-list",className:"ag-color-picker",pickerIcon:"colorPicker"},t))||this;return t&&t.color&&(i.value=t.color),i}return GD(t,e),t.prototype.postConstruct=function(){e.prototype.postConstruct.call(this),this.value&&this.setValue(this.value)},t.prototype.createPickerComponent=function(){var e=this.getGui().getBoundingClientRect(),t=this.createBean(new n.$zI({closable:!1,modal:!0,hideTitleBar:!0,minWidth:190,width:190,height:250,x:e.right-190,y:e.top-250}));return t},t.prototype.renderAndPositionPicker=function(){var e=this,t=this.pickerComponent,i=this.createBean(new FD({picker:this}));return t.addCssClass("ag-color-dialog"),i.addDestroyFunc((function(){t.isAlive()&&e.destroyBean(t)})),t.setParentComponent(this),t.setBodyComponent(i),i.setValue(this.getValue()),i.getGui().focus(),t.addDestroyFunc((function(){e.isDestroyingPicker?e.isDestroyingPicker=!1:(e.beforeHidePicker(),e.isDestroyingPicker=!0,i.isAlive()&&e.destroyBean(i),e.isAlive()&&e.getFocusableElement().focus())})),function(){var t;return null===(t=e.pickerComponent)||void 0===t?void 0:t.close()}},t.prototype.setValue=function(t){return this.value===t?this:(this.eDisplayField.style.backgroundColor=t,e.prototype.setValue.call(this,t))},t.prototype.getValue=function(){return this.value},t}(n.MQo),jD=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},HD=28,WD=6;function UD(e){return e&&e.match(/\d+\.\d+\.\d+/)}function zD(e){var t=e.gridMajorVersion,i=e.chartsMajorVersion,n=parseInt(t,10),o=parseInt(i,10),r=n-HD,s=o-WD,a=r>=0;return r===s&&a}function KD(e){if(e&&UD(e)){var t=jD(e.split(".")||[],2),i=t[0],n=t[1],o="".concat(i,".").concat(n,".x"),r=parseInt(i,10),s=r-HD+WD;if(!(s<0)){var a=n,l="".concat(s,".").concat(a,".x");return{gridMajorMinor:o,chartsMajorMinor:l}}}}function YD(e){var t=e.type,i=e.gridVersion,n=e.chartsVersion,o="AG Grid: AG Grid version is incompatible. Please see https://www.ag-grid.com/javascript-data-grid/modules/ for more information.";if(!i)return o;var r=KD(i);if(!r)return o;var s=r.gridMajorMinor,a=r.chartsMajorMinor;return"incompatible"===t?"AG Grid version ".concat(i," and AG Charts version ").concat(n," is not supported. AG Grid version ").concat(s," should be used with AG Chart ").concat(a,". Please see https://www.ag-grid.com/javascript-data-grid/modules/ for more information."):"invalidCharts"===t?"AG Grid version ".concat(s," should be used with AG Chart ").concat(a,". Please see https://www.ag-grid.com/javascript-data-grid/modules/ for more information."):o}function qD(e){var t=e.gridVersion,i=e.chartsVersion;if(!UD(i))return{isValid:!1,message:YD({type:"invalidCharts",gridVersion:t,chartsVersion:i})};if(!UD(t))return{isValid:!1,message:YD({type:"invalidGrid",gridVersion:t,chartsVersion:i})};var n=jD(t.split(".")||[],2),o=n[0],r=n[1],s=jD(i.split(".")||[],2),a=s[0],l=s[1],c=zD({gridMajorVersion:o,chartsMajorVersion:a});return c&&r===l?{isValid:!0}:c&&r===l?{isValid:!1,message:YD({type:"invalid",gridVersion:t,chartsVersion:i})}:{isValid:!1,message:YD({type:"incompatible",gridVersion:t,chartsVersion:i})}}var XD,$D={version:yT,validate:function(){return qD({gridVersion:yT,chartsVersion:iD.CHARTS_VERSION})},moduleName:n.GXE.GridChartsModule,beans:[iD,rD,lD],agStackComponents:[{componentName:"AgColorPicker",componentClass:BD},{componentName:"AgAngleSelect",componentClass:sE}],dependantModules:[kD,y]},ZD=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),JD=function(){return JD=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},JD.apply(this,arguments)},QD=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},eR=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.loadRowDataVersion=0,t}return ZD(t,e),t.prototype.init=function(e,t){this.params=t,this.comp=e;var i=null!=t.pinned;i||(this.setAutoHeightClasses(),this.setupRefreshStrategy(),this.addThemeToDetailGrid(),this.createDetailGrid(),this.loadRowData(),this.addManagedListener(this.eventService,n.zW2.EVENT_FULL_WIDTH_ROW_FOCUSED,this.onFullWidthRowFocused.bind(this)))},t.prototype.onFullWidthRowFocused=function(e){var t=this.params,i={rowIndex:t.node.rowIndex,rowPinned:t.node.rowPinned},n={rowIndex:e.rowIndex,rowPinned:e.rowPinned},o=this.rowPositionUtils.sameRow(i,n);o&&this.focusService.focusInto(this.comp.getGui(),e.fromBelow)},t.prototype.setAutoHeightClasses=function(){var e=this.gridOptionsService.get("detailRowAutoHeight"),t=e?"ag-details-row-auto-height":"ag-details-row-fixed-height",i=e?"ag-details-grid-auto-height":"ag-details-grid-fixed-height";this.comp.addOrRemoveCssClass(t,!0),this.comp.addOrRemoveDetailGridCssClass(i,!0)},t.prototype.setupRefreshStrategy=function(){var e=this.params.refreshStrategy,t="everything"==e||"nothing"==e||"rows"==e;t?this.refreshStrategy=e:(null!=e&&console.warn("AG Grid: invali
18d cellRendererParams.refreshStrategy = '"+e+"' supplied, defaulting to refreshStrategy = 'rows'."),this.refreshStrategy="rows")},t.prototype.addThemeToDetailGrid=function(){var e=this.environment.getTheme().theme;e&&this.comp.addOrRemoveDetailGridCssClass(e,!0)},t.prototype.createDetailGrid=function(){if(n._.missing(this.params.detailGridOptions))console.warn("AG Grid: could not find detail grid options for master detail, please set gridOptions.detailCellRendererParams.detailGridOptions");else{var e=this.gridOptionsService.get("detailRowAutoHeight"),t=JD({},this.params.detailGridOptions);e&&(t.domLayout="autoHeight"),this.comp.setDetailGrid(t)}},t.prototype.registerDetailWithMaster=function(e,t){var i=this.params.node.id,n=this.params.api,o={id:i,api:e,columnApi:t},r=this.params.node;n.addDetailGridInfo(i,o),r.detailGridInfo=o,this.addDestroyFunc((function(){r.detailGridInfo===o&&(n.removeDetailGridInfo(i),r.detailGridInfo=null)}))},t.prototype.loadRowData=function(){var e=this;this.loadRowDataVersion++;var t=this.loadRowDataVersion,i=this.params.getDetailRowData;if(i){var n=function(i){var n=e.loadRowDataVersion===t;n&&e.comp.setRowData(i)},o={node:this.params.node,data:this.params.node.data,successCallback:n,context:this.gridOptionsService.context};i(o)}else console.warn("AG Grid: could not find getDetailRowData for master / detail, please set gridOptions.detailCellRendererParams.getDetailRowData")},t.prototype.refresh=function(){var e=!1,t=!0;switch(this.refreshStrategy){case"nothing":return t;case"everything":return e}return this.loadRowData(),t},QD([(0,n.fsG)("rowPositionUtils")],t.prototype,"rowPositionUtils",void 0),QD([(0,n.fsG)("focusService")],t.prototype,"focusService",void 0),t}(n.AS9),tR=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),iR=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},nR=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return tR(t,e),t.prototype.init=function(e){var t=this;this.params=e,this.selectAndSetTemplate();var i={addOrRemoveCssClass:function(e,i){return t.addOrRemoveCssClass(e,i)},addOrRemoveDetailGridCssClass:function(e,i){return t.eDetailGrid.classList.toggle(e,i)},setDetailGrid:function(e){return t.setDetailGrid(e)},setRowData:function(e){return t.setRowData(e)},getGui:function(){return t.eDetailGrid}};this.ctrl=this.createManagedBean(new eR),this.ctrl.init(i,e)},t.prototype.refresh=function(){return this.ctrl&&this.ctrl.refresh()},t.prototype.destroy=function(){e.prototype.destroy.call(this)},t.prototype.selectAndSetTemplate=function(){var e=this;if(this.params.pinned)this.setTemplate('<div class="ag-details-row"></div>');else{var i=function(){e.setTemplate(t.TEMPLATE)};if(n._.missing(this.params.template))i();else if("string"===typeof this.params.template)this.setTemplate(this.params.template);else if("function"===typeof this.params.template){var o=this.params.template,r=o(this.params);this.setTemplate(r)}else console.warn("AG Grid: detailCellRendererParams.template should be function or string"),i();null==this.eDetailGrid&&console.warn('AG Grid: reference to eDetailGrid was missing from the details template. Please add ref="eDetailGrid" to the template.')}},t.prototype.setDetailGrid=function(e){if(this.eDetailGrid){var t=this.context.getBean("agGridReact"),i=t?n._.cloneObject(t):void 0,o=this.context.getBean("frameworkComponentWrapper"),r=this.getFrameworkOverrides(),s=(0,n.uIV)(this.eDetailGrid,e,{frameworkOverrides:r,providedBeanInstances:{agGridReact:i,frameworkComponentWrapper:o},modules:n.O3h.__getGridRegisteredModules(this.params.api.getGridId())});this.detailApi=s,this.ctrl.registerDetailWithMaster(s,new n.juH(s)),this.addDestroyFunc((function(){null===s||void 0===s||s.destroy()}))}},t.prototype.setRowData=function(e){this.detailApi&&this.detailApi.setGridOption("rowData",e)},t.TEMPLATE='<div class="ag-details-row" role="gridcell">\n            <div ref="eDetailGrid" class="ag-details-grid" role="presentation"></div>\n        </div>',iR([(0,n.cqo)("eDetailGrid")],t.prototype,"eDetailGrid",void 0),t}(n.wA2),oR="31.0.0",rR={version:oR,moduleName:n.GXE.MasterDetailModule,beans:[],userComponents:[{componentName:"agDetailCellRenderer",componentClass:nR}],controllers:[{controllerName:"detailCellRenderer",controllerClass:eR}],dependantModules:[y]},sR=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),aR=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},lR=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return sR(t,e),t.prototype.hideActiveMenu=function(){this.destroyBean(this.activeMenu)},t.prototype.showMenuAfterMouseEvent=function(e,t,i){var n=this;this.showMenu(e,(function(o){var r=o.getGui();n.popupService.positionPopupUnderMouseEvent({type:"columnMenu",column:e,mouseEvent:t,ePopup:r}),i&&o.showTab(i)}),"columnMenu",i,void 0,t.target)},t.prototype.showMenuAfterButtonClick=function(e,t,i,n,o){var r=this,s=-1,a="left";this.gridOptionsService.get("enableRtl")&&(s=1,a="right"),this.showMenu(e,(function(o){var l=o.getGui();r.popupService.positionPopupByComponent({type:i,column:e,eventSource:t,ePopup:l,alignSide:a,nudgeX:9*s,nudgeY:-23,position:"under",keepWithinBounds:!0}),n&&o.showTab(n)}),i,n,o,t)},t.prototype.showMenu=function(e,t,i,o,r,s){var a=this,l=this.getMenuParams(e,r,s),c=l.menu,u=l.eMenuGui,d=l.currentHeaderPosition,p=l.currentColumnIndex,h=l.anchorToElement,f=[];f.push(this.getClosedCallback(e,c,d,p,s));var g=this.localeService.getLocaleTextFunc();
18this.popupService.addPopup({modal:!0,eChild:u,closeOnEsc:!0,closedCallback:function(e){f.forEach((function(t){return t(e)}))},afterGuiAttached:function(e){return c.afterGuiAttached(Object.assign({},{container:i},e))},positionCallback:o?function(){return t(c)}:void 0,ariaLabel:g("ariaLabelColumnMenu","Column Menu")}),o||(c.showTabBasedOnPreviousSelection(),t(c));var v=this.popupService.setPopupPositionRelatedToElement(u,h);v&&this.addStopAnchoring(v,e,f),c.addEventListener(cR.EVENT_TAB_SELECTED,(function(e){a.lastSelectedTab=e.key})),e.setMenuVisible(!0,"contextMenu"),this.activeMenu=c,c.addEventListener(n.AS9.EVENT_DESTROYED,(function(){a.activeMenu===c&&(a.activeMenu=null)}))},t.prototype.addStopAnchoring=function(e,t,i){e.then((function(e){t.addEventListener("leftChanged",e),t.addEventListener("visibleChanged",e),i.push((function(){t.removeEventListener("leftChanged",e),t.removeEventListener("visibleChanged",e)}))}))},t.prototype.getClosedCallback=function(e,t,i,o,r){var s=this;return function(a){s.destroyBean(t),e.setMenuVisible(!1,"contextMenu");var l=a instanceof KeyboardEvent;if(l&&r){var c=s.columnModel.getAllDisplayedColumns().some((function(t){return t===e}));if(c&&n._.isVisible(r)){var u=s.focusService.findTabbableParent(r);u&&(e&&s.headerNavigationService.scrollToColumn(e),u.focus())}else if(i&&-1!==o){var d=s.columnModel.getAllDisplayedColumns(),p=d[o]||n._.last(d);p&&s.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:i.headerRowIndex,column:p}})}}}},t.prototype.getMenuParams=function(e,t,i){var n=this.createBean(new cR(e,this.lastSelectedTab,t));return{menu:n,eMenuGui:n.getGui(),currentHeaderPosition:this.focusService.getFocusedHeader(),currentColumnIndex:this.columnModel.getAllDisplayedColumns().indexOf(e),anchorToElement:i||this.ctrlsService.getGridBodyCtrl().getGui()}},t.prototype.isMenuEnabled=function(e){var t=!this.filterManager.isFilterAllowed(e),i=e.getMenuTabs(cR.TABS_DEFAULT),n=t&&i.includes(cR.TAB_FILTER)?i.length-1:i.length;return n>0},aR([(0,n.fsG)("popupService")],t.prototype,"popupService",void 0),aR([(0,n.fsG)("focusService")],t.prototype,"focusService",void 0),aR([(0,n.fsG)("headerNavigationService")],t.prototype,"headerNavigationService",void 0),aR([(0,n.fsG)("ctrlsService")],t.prototype,"ctrlsService",void 0),aR([(0,n.fsG)("columnModel")],t.prototype,"columnModel",void 0),aR([(0,n.fsG)("filterManager")],t.prototype,"filterManager",void 0),t=aR([(0,n.Vu6)("menuFactory")],t),t}(n.AS9),cR=function(e){function t(i,n,o){var r=e.call(this)||this;return r.tabFactories={},r.includeChecks={},r.column=i,r.initialSelection=n,r.tabFactories[t.TAB_GENERAL]=r.createMainPanel.bind(r),r.tabFactories[t.TAB_FILTER]=r.createFilterPanel.bind(r),r.tabFactories[t.TAB_COLUMNS]=r.createColumnsPanel.bind(r),r.includeChecks[t.TAB_GENERAL]=function(){return!0},r.includeChecks[t.TAB_FILTER]=function(){return r.filterManager.isFilterAllowed(i)},r.includeChecks[t.TAB_COLUMNS]=function(){return!0},r.restrictTo=o,r}return sR(t,e),t.prototype.init=function(){var e=this,t=this.getTabsToCreate().map((function(t){return e.createTab(t)}));this.tabbedLayout=new n.WD6({items:t,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((function(){return e.destroyBean(e.tabbedLayout)}))},t.prototype.getTabsToCreate=function(){var e=this;return this.restrictTo?this.restrictTo:this.column.getMenuTabs(t.TABS_DEFAULT).filter((function(t){return e.isValidMenuTabItem(t)})).filter((function(t){return e.isNotSuppressed(t)})).filter((function(t){return e.isModuleLoaded(t)}))},t.prototype.isModuleLoaded=function(e){return e!==t.TAB_COLUMNS||n.O3h.__isRegistered(n.GXE.ColumnsToolPanelModule,this.context.getGridId())},t.prototype.isValidMenuTabItem=function(e){var i=!0,n=t.TABS_DEFAULT;return null!=this.restrictTo&&(i=this.restrictTo.indexOf(e)>-1,n=this.restrictTo),i=i&&t.TABS_DEFAULT.indexOf(e)>
18-1,i||console.warn("AG Grid: Trying to render an invalid menu item '".concat(e,"'. Check that your 'menuTabs' contains one of [").concat(n,"]")),i},t.prototype.isNotSuppressed=function(e){return this.includeChecks[e]()},t.prototype.createTab=function(e){return this.tabFactories[e]()},t.prototype.showTabBasedOnPreviousSelection=function(){this.showTab(this.initialSelection)},t.prototype.showTab=function(e){this.tabItemColumns&&e===t.TAB_COLUMNS?this.tabbedLayout.showItem(this.tabItemColumns):this.tabItemFilter&&e===t.TAB_FILTER?this.tabbedLayout.showItem(this.tabItemFilter):this.tabItemGeneral&&e===t.TAB_GENERAL?this.tabbedLayout.showItem(this.tabItemGeneral):this.tabbedLayout.showFirstItem()},t.prototype.onTabItemClicked=function(e){var i=null;switch(e.item){case this.tabItemColumns:i=t.TAB_COLUMNS;break;case this.tabItemFilter:i=t.TAB_FILTER;break;case this.tabItemGeneral:i=t.TAB_GENERAL;break}i&&this.activateTab(i)},t.prototype.activateTab=function(e){var i={type:t.EVENT_TAB_SELECTED,key:e};this.dispatchEvent(i)},t.prototype.getMenuItems=function(){var e,i=this.getDefaultMenuOptions(),o=this.gridOptionsService.getCallback("getMainMenuItems");return e=o?o({column:this.column,defaultItems:i}):i,n._.removeRepeatsFromArray(e,t.MENU_ITEM_SEPARATOR),e},t.prototype.getDefaultMenuOptions=function(){var e=[],i=!this.column.getColDef().lockPinned,n=this.columnModel.getRowGroupColumns().length,o=n>0,r=this.column.isAllowValue(),s=this.column.isAllowRowGroup(),a=this.column.isPrimary(),l=this.columnModel.isPivotMode(),c="clientSide"===this.rowModel.getType(),u=this.gridOptionsService.get("treeData"),d=a&&o&&r||!a;i&&e.push("pinSubMenu"),d&&e.push("valueAggSubMenu"),(i||d)&&e.push(t.MENU_ITEM_SEPARATOR),e.push("autoSizeThis"),e.push("autoSizeAll"),e.push(t.MENU_ITEM_SEPARATOR);var p=this.column.getColDef().showRowGroup;if(p)e.push("rowUnGroup");else if(s&&this.column.isPrimary())if(this.column.isRowGroupActive()){var h=this.columnModel.isColumnGroupingLocked(this.column);h||e.push("rowUnGroup")}else e.push("rowGroup");e.push(t.MENU_ITEM_SEPARATOR),e.push("resetColumns");var f=c&&(u||n>(l?1:0));return f&&(e.push("expandAll"),e.push("contractAll")),e},t.prototype.createMainPanel=function(){this.mainMenuList=this.createManagedBean(new n.O_3);var e=this.getMenuItems(),i=this.menuItemMapper.mapWithStockItems(e,this.column);return this.mainMenuList.addMenuItems(i),this.mainMenuList.addEventListener(n.sJC.EVENT_MENU_ITEM_SELECTED,this.onHidePopup.bind(this)),this.tabItemGeneral={title:n._.createIconNoSpan("menu",this.gridOptionsService,this.column),titleLabel:t.TAB_GENERAL.replace("MenuTab",""),bodyPromise:n.j_S.resolve(this.mainMenuList.getGui()),name:t.TAB_GENERAL},this.tabItemGeneral},t.prototype.onHidePopup=function(e){var t;e&&e.event&&e.event instanceof KeyboardEvent&&(t=e.event),this.hidePopupFunc(t&&{keyboardEvent:t});var i=this.focusService.getFocusedCell(),n=this.gridOptionsService.getDocument();if(n.activeElement===n.body&&i){var o=i.rowIndex,r=i.rowPinned,s=i.column;this.focusService.setFocusedCell({rowIndex:o,column:s,rowPinned:r,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}},t.prototype.createFilterPanel=function(){var e=this.filterManager.getOrCreateFilterWrapper(this.column,"COLUMN_MENU");if(!e)throw new Error("AG Grid - Unable to instantiate filter");var i=function(t){(null===e||void 0===e?void 0:e.filterPromise)&&e.filterPromise.then((function(e){e&&e.afterGuiAttached&&e.afterGuiAttached(t)}))},o=function(){var t;return null===(t=null===e||void 0===e?void 0:e.filterPromise)||void 0===t?void 0:t.then((function(e){var t;return null===(t=null===e||void 0===e?void 0:e.afterGuiDetached)||void 0===t?void 0:t.call(e)}))};return this.tabItemFilter={title:n._.createIconNoSpan("filter",this.gridOptionsService,this.column),titleLabel:t.TAB_FILTER.replace("MenuTab",""),bodyPromise:null===e||void 0===e?void 0:e.guiPromise,afterAttachedCallback:i,afterDetachedCallback:o,name:t.TAB_FILTER},this.tabItemFilter},t.prototype.createColumnsPanel=function(){var e=document.createElement("div");e.classList.add("ag-menu-column-select-wrapper");var i=this.createManagedBean(new Ii),o=this.column.getColDef().columnsMenuParams;o||(o={});var r=o.contractColumnSelection,s=o.suppressColumnExpandAll,a=o.suppressColumnFilter,l=o.suppressColumnSelectAll,c=o.suppressSyncLayoutWithGri
18d,u=o.columnLayout;i.init(!1,{suppressColumnMove:!1,suppressValues:!1,suppressPivots:!1,suppressRowGroups:!1,suppressPivotMode:!1,contractColumnSelection:!!r,suppressColumnExpandAll:!!s,suppressColumnFilter:!!a,suppressColumnSelectAll:!!l,suppressSyncLayoutWithGrid:!!u||!!c,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context,onStateUpdated:function(){}},"columnMenu"),u&&i.setColumnLayout(u);var d=i.getGui();return d.classList.add("ag-menu-column-select"),e.appendChild(d),this.tabItemColumns={title:n._.createIconNoSpan("columns",this.gridOptionsService,this.column),titleLabel:t.TAB_COLUMNS.replace("MenuTab",""),bodyPromise:n.j_S.resolve(e),name:t.TAB_COLUMNS},this.tabItemColumns},t.prototype.afterGuiAttached=function(e){var t=e.container,i=e.hidePopup;this.tabbedLayout.setAfterAttachedParams({container:t,hidePopup:i}),i&&(this.hidePopupFunc=i,this.addDestroyFunc(i))},t.prototype.getGui=function(){return this.tabbedLayout.getGui()},t.EVENT_TAB_SELECTED="tabSelected",t.TAB_FILTER="filterMenuTab",t.TAB_GENERAL="generalMenuTab",t.TAB_COLUMNS="columnsMenuTab",t.TABS_DEFAULT=[t.TAB_GENERAL,t.TAB_FILTER,t.TAB_COLUMNS],t.MENU_ITEM_SEPARATOR="separator",aR([(0,n.fsG)("columnModel")],t.prototype,"columnModel",void 0),aR([(0,n.fsG)("filterManager")],t.prototype,"filterManager",void 0),aR([(0,n.fsG)("menuItemMapper")],t.prototype,"menuItemMapper",void 0),aR([(0,n.fsG)("rowModel")],t.prototype,"rowModel",void 0),aR([(0,n.fsG)("focusService")],t.prototype,"focusService",void 0),aR([n.NqP],t.prototype,"init",null),t}(n.AS9),uR=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),dR=function(){return dR=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},dR.apply(this,arguments)},pR=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},hR="ag-menu",fR="ag-context-menu-open",gR=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return uR(t,e),t.prototype.hideActiveMenu=function(){this.destroyBean(this.activeMenu)},t.prototype.getMenuItems=function(e,t,i){var o=[];if(n._.exists(e)&&n.O3h.__isRegistered(n.GXE.ClipboardModule,this.context.getGridId())&&t&&(this.gridOptionsService.get("suppressCutToClipboard")||o.push("cut"),o.push("copy","copyWithHeaders","copyWithGroupHeaders","paste","separator")),this.gridOptionsService.get("enableCharts")&&n.O3h.__isRegistered(n.GXE.GridChartsModule,this.context.getGridId())&&(this.columnModel.isPivotMode()&&o.push("pivotChart"),this.rangeService&&!this.rangeService.isEmpty()&&o.push("chartRange")),n._.exists(e)){var r=!n.O3h.__isRegistered(n.GXE.CsvExportModule,this.context.getGridId()),s=!n.O3h.__isRegistered(n.GXE.ExcelExportModule,this.context.getGridId()),a=this.gridOptionsService.get("suppressExcelExport")||s,l=this.gridOptionsService.get("suppressCsvExport")||r,c=n._.isIOSUserAgent(),u=!c&&(!a||!l);u&&o.push("export")}var d=this.gridOptionsService.getCallback("getContextMenuItems");if(d){var p={node:e,column:t,value:i,defaultItems:o.length?o:void 0};return d(p)}return o},t.prototype.onContextMenu=function(e,t,i,n,o,r){if((this.gridOptionsService.get("allowContextMenuWithControlKey")||!e||!e.ctrlKey&&!e.metaKey)&&(e&&this.blockMiddleClickScrollsIfNeeded(e),!this.gridOptionsService.get("suppressContextMenu"))){var s=e||t.touches[0];if(this.showMenu(i,n,o,s,r)){var a=e||t;a.preventDefault()}}},t.prototype.blockMiddleClickScrollsIfNeeded=function(e){var t=this.gridOptionsService,i=e.which;t.get("suppressMiddleClickScrolls")&&2===i&&e.preventDefault()},t.prototype.showMenu=function(e,t,i,o,r){var s=this,a=this.getMenuItems(e,t,i),l=this.ctrlsService.getGridBodyCtrl().getGui();if(void 0===a||n._.missingOrEmpty(a))return!1;var c=new vR(a);this.createBean(c);var u=c.getGui(),d={column:t,rowNode:e,type:"contextMenu",mouseEvent:o,ePopup:u,nudgeY:1},p=this.localeService.getLocaleTextFunc(),h=this.popupService.addPopup({modal:!0,e
18Child:u,closeOnEsc:!0,closedCallback:function(){l.classList.remove(fR),s.destroyBean(c)},click:o,positionCallback:function(){var e=s.gridOptionsService.get("enableRtl");s.popupService.positionPopupUnderMouseEvent(dR(dR({},d),{nudgeX:e?-1*(u.offsetWidth+1):1}))},anchorToElement:r,ariaLabel:p("ariaLabelContextMenu","Context Menu")});return h&&(l.classList.add(fR),c.afterGuiAttached({container:"contextMenu",hidePopup:h.hideFunc})),this.activeMenu&&this.hideActiveMenu(),this.activeMenu=c,c.addEventListener(n.AS9.EVENT_DESTROYED,(function(){s.activeMenu===c&&(s.activeMenu=null)})),h&&c.addEventListener(n.sJC.EVENT_MENU_ITEM_SELECTED,h.hideFunc),!0},pR([(0,n.fsG)("popupService")],t.prototype,"popupService",void 0),pR([(0,n.FiY)("rangeService")],t.prototype,"rangeService",void 0),pR([(0,n.fsG)("ctrlsService")],t.prototype,"ctrlsService",void 0),pR([(0,n.fsG)("columnModel")],t.prototype,"columnModel",void 0),t=pR([(0,n.Vu6)("contextMenuFactory")],t),t}(n.AS9),vR=function(e){function t(t){var i=e.call(this,'<div class="'.concat(hR,'" role="presentation"></div>'))||this;return i.menuList=null,i.focusedCell=null,i.menuItems=t,i}return uR(t,e),t.prototype.addMenuItems=function(){var e=this,t=this.createManagedBean(new n.O_3),i=this.menuItemMapper.mapWithStockItems(this.menuItems,null);t.addMenuItems(i),this.appendChild(t),this.menuList=t,t.addEventListener(n.sJC.EVENT_MENU_ITEM_SELECTED,(function(t){return e.dispatchEvent(t)}))},t.prototype.afterGuiAttached=function(e){e.hidePopup&&this.addDestroyFunc(e.hidePopup),this.focusedCell=this.focusService.getFocusedCell(),this.menuList&&this.focusService.focusInto(this.menuList.getGui())},t.prototype.restoreFocusedCell=function(){var e=this.focusService.getFocusedCell();if(e&&this.focusedCell&&this.cellPositionUtils.equals(e,this.focusedCell)){var t=this.focusedCell,i=t.rowIndex,n=t.rowPinned,o=t.column,r=this.gridOptionsService.getDocument();r.activeElement===r.body&&this.focusService.setFocusedCell({rowIndex:i,column:o,rowPinned:n,forceBrowserFocus:!0})}},t.prototype.destroy=function(){this.restoreFocusedCell(),e.prototype.destroy.call(this)},pR([(0,n.fsG)("menuItemMapper")],t.prototype,"menuItemMapper",void 0),pR([(0,n.fsG)("focusService")],t.prototype,"focusService",void 0),pR([(0,n.fsG)("cellPositionUtils")],t.prototype,"cellPositionUtils",void 0),pR([n.NqP],t.prototype,"addMenuItems",null),t}(n.wA2),yR=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),mR=function(){return mR=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},mR.apply(this,arguments)},CR=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},bR=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return yR(t,e),t.prototype.mapWithStockItems=function(e,t){var i=this;if(!e)return[];var n=[];return e.forEach((function(e){var o;if(o="string"===typeof e?i.getStockMenuItem(e,t):mR({},e),o){var r=o,s=r.subMenu;s&&s instanceof Array&&(r.subMenu=i.mapWithStockItems(s,t)),null!=o&&n.push(o)}})),n},t.prototype.getStockMenuItem=function(e,t){var i,o=this,r=this.localeService.getLocaleTextFunc(),s=this.gridOptionsService.get("skipHeaderOnAutoSize");switch(e){case"pinSubMenu":return{name:r("pinColumn","Pin Column"),icon:n._.createIconNoSpan("menuPin",this.gridOptionsService,null),subMenu:["clearPinned","pinLeft","pinRight"]};case"pinLeft":return{name:r("pinLeft","Pin Left"),action:function(){return o.columnModel.setColumnPinned(t,"left","contextMenu")},checked:!!t&&t.isPinnedLeft()};case"pinRight":return{name:r("pinRight","Pin Right"),action:function(){return o.columnModel.setColumnPinned(t,"right","contextMenu")},checked:!!t&&t.isPinnedRight()};case"clearPinned":return{name:r("noPin","No Pin"),action:function(){return o.columnModel.setColumnPinned(t,null,"contextMenu")},checked:!!t&&!t.isPinned()};case"valueAggSubMenu":return n.O3h.__assertRegistered(n.GXE.RowGroupingModule,"Aggregation from Menu",this.context.getGridId())&&((null===t||void 0===t?void 0:t.isPrimary())||(null===t||void 0===t?void 0:t.getColDef().pivotValueColumn))?{name:r("valueAggregation","Value Aggregation"),icon:n._.createIconNoSpan("menuValue",this.gridOptionsService,null),subMenu:this.createAggregationSubMenu(t)}:null;case"autoSizeThis":return{name:r("autosizeThiscolumn","Autosize This Column"),action:function(){return o.columnModel.autoSizeColumn(t,s,"contextMenu")}};case"autoSizeAll":return{name:r("autosizeAllColumns","Autosize All Columns"),action:function(){return o.columnModel.autoSizeAllColumns(s,"contextMenu")}};case"rowGroup":return{name:r("groupBy","Group by")+" "+n._.escapeString(this.columnModel.getDisplayNameForColumn(t,"header")),disabled:(null===t||void 0===t?void 0:t.isRowGroupActive())||!(null===t||void 0===t?void 0:t.getColDef().enableRowGroup),action:function(){return o.columnModel.addRowGroupColumn(t,"contextMenu")},icon:n._.createIconNoSpan("menuAddRowGroup",this.gridOptionsService,null)};case"rowUnGroup":var a=n._.createIconNoSpan("menuRemoveRowGroup",this.gridOptionsService,null),l=null===t||void 0===t?void 0:t.getColDef().showRowGroup,c=this.gridOptionsService.get("groupLockGroupColumns");if(!0===l)return{name:r("ungroupAll","Un-Group All"),disabled:-1===c||c>=this.columnModel.getRowGroupColumns().length,action:function(){return o.columnModel.setRowGroupColumns(o.columnModel.getRowGroupColumns().slice(0,c),"contextMenu")},icon:a};if("string"===typeof l){var u=this.columnModel.getPrimaryColumn(l),d=null!=u?n._.escapeString(this.columnModel.getDisplayNameForColumn(u,"header")):l;return{name:r("ungroupBy","Un-Group by")+" "+d,disabled:null!=u&&this.columnModel.isColumnGroupingLocked(u),action:function(){return o.columnModel.removeRowGroupColumn(l,"contextMenu")},icon:a}}return{name:r("ungroupBy","Un-Group by")+" "+n._.escapeString(this.columnModel.getDisplayNameForColumn(t,"header")),disabled:!(null===t||void 0===t?void 0:t.isRowGroupActive())||!(null===t||void 0===t?void 0:t.getColDef().enableRowGroup)||this.columnModel.isColumnGroupingLocked(t),action:function(){return o.columnModel.removeRowGroupColumn(t,"contextMenu")},icon:a};case"resetColumns":return{name:r("resetColumns","Reset Columns"),action:function(){return o.columnModel.resetColumnState("contextMenu")}};
18case"expandAll":return{name:r("expandAll","Expand All Row Groups"),action:function(){return o.gridApi.expandAll()}};case"contractAll":return{name:r("collapseAll","Collapse All Row Groups"),action:function(){return o.gridApi.collapseAll()}};case"copy":return n.O3h.__assertRegistered(n.GXE.ClipboardModule,"Copy from Menu",this.context.getGridId())?{name:r("copy","Copy"),shortcut:r("ctrlC","Ctrl+C"),icon:n._.createIconNoSpan("clipboardCopy",this.gridOptionsService,null),action:function(){return o.clipboardService.copyToClipboard()}}:null;case"copyWithHeaders":return n.O3h.__assertRegistered(n.GXE.ClipboardModule,"Copy with Headers from Menu",this.context.getGridId())?{name:r("copyWithHeaders","Copy with Headers"),icon:n._.createIconNoSpan("clipboardCopy",this.gridOptionsService,null),action:function(){return o.clipboardService.copyToClipboard({includeHeaders:!0})}}:null;case"copyWithGroupHeaders":return n.O3h.__assertRegistered(n.GXE.ClipboardModule,"Copy with Group Headers from Menu",this.context.getGridId())?{name:r("copyWithGroupHeaders","Copy with Group Headers"),icon:n._.createIconNoSpan("clipboardCopy",this.gridOptionsService,null),action:function(){return o.clipboardService.copyToClipboard({includeHeaders:!0,includeGroupHeaders:!0})}}:null;case"cut":if(n.O3h.__assertRegistered(n.GXE.ClipboardModule,"Cut from Menu",this.context.getGridId())){var p=this.focusService.getFocusedCell(),h=p?this.rowPositionUtils.getRowNode(p):null,f=!!h&&(null===p||void 0===p?void 0:p.column.isCellEditable(h));return{name:r("cut","Cut"),shortcut:r("ctrlX","Ctrl+X"),icon:n._.createIconNoSpan("clipboardCut",this.gridOptionsService,null),disabled:!f||this.gridOptionsService.get("suppressCutToClipboard"),action:function(){return o.clipboardService.cutToClipboard(void 0,"contextMenu")}}}return null;case"paste":return n.O3h.__assertRegistered(n.GXE.ClipboardModule,"Paste from Clipboard",this.context.getGridId())?{name:r("paste","Paste"),shortcut:r("ctrlV","Ctrl+V"),disabled:!0,icon:n._.createIconNoSpan("clipboardPaste",this.gridOptionsService,null),action:function(){return o.clipboardService.pasteFromClipboard()}}:null;case"export":var g=[],v=n.O3h.__isRegistered(n.GXE.CsvExportModule,this.context.getGridId()),y=n.O3h.__isRegistered(n.GXE.ExcelExportModule,this.context.getGridId());return!this.gridOptionsService.get("suppressCsvExport")&&v&&g.push("csvExport"),!this.gridOptionsService.get("suppressExcelExport")&&y&&g.push("excelExport"),{name:r("export","Export"),subMenu:g,icon:n._.createIconNoSpan("save",this.gridOptionsService,null)};case"csvExport":return{name:r("csvExport","CSV Export"),icon:n._.createIconNoSpan("csvExport",this.gridOptionsService,null),action:function(){return o.gridApi.exportDataAsCsv({})}};case"excelExport":return{name:r("excelExport","Excel Export"),icon:n._.createIconNoSpan("excelExport",this.gridOptionsService,null),action:function(){return o.gridApi.exportDataAsExcel()}};case"separator":return"separator";case"pivotChart":case"chartRange":return null!==(i=this.chartMenuItemMapper.getChartItems(e))&&void 0!==i?i:null;default:return console.warn("AG Grid: unknown menu item type ".concat(e)),null}},t.prototype.createAggregationSubMenu=function(e){var t,i=this,o=this.localeService.getLocaleTextFunc();if(e.isPrimary())t=e;else{var r=e.getColDef().pivotValueColumn;t=n._.exists(r)?r:void 0}var s=[];if(t){var a=t.isValueActive(),l=this.aggFuncService.getFuncNames(t);s.push({name:o("noAggregation","None"),action:function(){i.columnModel.removeValueColumn(t,"contextMenu"),i.columnModel.setColumnAggFunc(t,void 0,"contextMenu")},checked:!a}),l.forEach((function(e){s.push({name:o(e,i.aggFuncService.getDefaultFuncLabel(e)),action:function(){i.columnModel.setColumnAggFunc(t,e,"contextMenu"),i.columnModel.addValueColumn(t,"contextMenu")},checked:a&&t.getAggFunc()===e})}))}return s},CR([(0,n.fsG)("columnModel")],t.prototype,"columnModel",void 0),CR([(0,n.fsG)("gridApi")],t.prototype,"gridApi",void 0),CR([(0,n.FiY)("clipboardService")],t.prototype,"clipboardService",void 0),CR([(0,n.FiY)("aggFuncService")],t.prototype,"aggFuncService",void 0),CR([(0,n.fsG)("focusService")],t.prototype,"focusService",void 0),CR([(0,n.fsG)("rowPositionUtils")],t.prototype,"rowPositionUtils",void 0),CR([(0,n.fsG)("chartMenuItemMapper")],t.prototype,"chartMenuItemMapper",void 0),t=CR([(0,n.Vu6)("menuItemMapper")],t),t}(n.AS9),wR="31.0.0",SR=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ER=function(){return ER=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ER.apply(this,arguments)},xR=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},OR=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},TR=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}var i;return SR(t,e),i=t,t.prototype.getChartItems=function(e){var t,o;if(this.chartService){var r="pivotChart"===e?new DR(this.gridOptionsService,this.chartService,this.localeService):new RR(this.gridOptionsService,this.chartService,this.localeService),s=r.getMenuItem(),a=null===(o=null===(t=this.gridOptionsService.get("
18chartToolPanelsDef"))||void 0===t?void 0:t.settingsPanel)||void 0===o?void 0:o.chartGroupsDef;return a&&(s=i.filterAndOrderChartMenu(s,a,r.getConfigLookup())),this.cleanInternals(s)}n.O3h.__assertRegistered(n.GXE.GridChartsModule,'the Context Menu key "'.concat(e,'"'),this.context.getGridId())},t.prototype.cleanInternals=function(e){if(!e)return e;var t=function(e){var i;return null===e||void 0===e||delete e._key,null===(i=null===e||void 0===e?void 0:e.subMenu)||void 0===i||i.forEach((function(e){return t(e)})),e};return t(e)},t.buildLookup=function(e){var t={},i=function(e){t[e._key]=e,e.subMenu&&e.subMenu.forEach((function(e){return i(e)}))};return i(e),t},t.filterAndOrderChartMenu=function(e,t,i){var o,r=this.buildLookup(e),s=ER(ER({},e),{subMenu:[]});if(Object.entries(t).forEach((function(e){var t,o,a=OR(e,2),l=a[0],c=a[1],u=i[l];if(void 0!=u){var d=r[u._key];if(d)if(d.subMenu){var p=c.map((function(e){var t=u[e];if(void 0!=t)return r[t];n._.warnOnce("invalid chartGroupsDef config '".concat(l,".").concat(e,"'"))})).filter((function(e){return void 0!==e}));p.length>0&&(d.subMenu=p,null===(t=s.subMenu)||void 0===t||t.push(d))}else null===(o=s.subMenu)||void 0===o||o.push(d)}else n._.warnOnce("invalid chartGroupsDef config '".concat(l,"'"))})),0!=(null===(o=s.subMenu)||void 0===o?void 0:o.length))return s},xR([(0,n.FiY)("chartService")],t.prototype,"chartService",void 0),t=i=xR([(0,n.Vu6)("chartMenuItemMapper")],t),t}(n.AS9),DR=function(){function e(e,t,i){this.gridOptionsService=e,this.chartService=t,this.localeService=i}return e.prototype.getMenuItem=function(){var e=this,t=this.localeService.getLocaleTextFunc(),i=function(i,n,o,r){return{name:t(i,n),action:function(){return e.chartService.createPivotChart({chartType:o})},_key:r}};return{name:t("pivotChart","Pivot Chart"),_key:"pivotChart",subMenu:[{_key:"pivotColumnChart",name:t("columnChart","Column"),subMenu:[i("groupedColumn","Grouped&lrm;","groupedColumn","pivotGroupedColumn"),i("stackedColumn","Stacked&lrm;","stackedColumn","pivotStackedColumn"),i("normalizedColumn","100% Stacked&lrm;","normalizedColumn","pivotNormalizedColumn")]},{_key:"pivotBarChart",name:t("barChart","Bar"),subMenu:[i("groupedBar","Grouped&lrm;","groupedBar","pivotGroupedBar"),i("stackedBar","Stacked&lrm;","stackedBar","pivotStackedBar"),i("normalizedBar","100% Stacked&lrm;","normalizedBar","pivotNormalizedBar")]},{_key:"pivotPieChart",name:t("pieChart","Pie"),subMenu:[i("pie","Pie&lrm;","pie","pivotPie"),i("doughnut","Doughnut&lrm;","doughnut","pivotDoughnut")]},i("line","Line&lrm;","line","pivotLineChart"),{_key:"pivotXYChart",name:t("xyChart","X Y (Scatter)"),subMenu:[i("scatter","Scatter&lrm;","scatter","pivotScatter"),i("bubble","Bubble&lrm;","bubble","pivotBubble")]},{_key:"pivotAreaChart",name:t("areaChart","Area"),subMenu:[i("area","Area&lrm;","area","pivotArea"),i("stackedArea","Stacked&lrm;","stackedArea","pivotStackedArea"),i("normalizedArea","100% Stacked&lrm;","normalizedArea","pivotNormalizedArea")]},i("histogramChart","Histogram&lrm;","histogram","pivotHistogramChart"),{_key:"pivotCombinationChart",name:t("combinationChart","Combination"),subMenu:[i("columnLineCombo","Column & Line&lrm;","columnLineCombo","pivotColumnLineCombo"),i("AreaColumnCombo","Area & Column&lrm;","areaColumnCombo","pivotAreaColumnCombo")]}],icon:n._.createIconNoSpan("chart",this.gridOptionsService,void 0)}},e.prototype.getConfigLookup=function(){return{columnGroup:{_key:"pivotColumnChart",column:"pivotGroupedColumn",stackedColumn:"pivotStackedColumn",normalizedColumn:"pivotNormalizedColumn"},barGroup:{_key:"pivotBarChart",bar:"pivotGroupedBar",stackedBar:"pivotStackedBar",normalizedBar:"pivotNormalizedBar"},pieGroup:{_key:"pivotPieChart",pie:"pivotPie",doughnut:"pivotDoughnut"},lineGroup:{_key:"pivotLineChart",line:"pivotLineChart"},scatterGroup:{_key:"pivotXYChart",bubble:"pivotBubble",scatter:"pivotScatter"},areaGroup:{_key:"pivotAreaChart",area:"pivotArea",stackedArea:"pivotStackedArea",normalizedArea:"pivotNormalizedArea"},histogramGroup:{_key:"pivotHistogramChart",histogram:"pivotHistogramChart"},combinationGroup:{_key:"pivotCombinationChart",columnLineCombo:"pivotColumnLineCombo",areaColumnCombo:"pivotAreaColumnCombo",customCombo:""}}},e}(),RR=function(){function e(e,t,i){this.gridOptionsService=e,this.chartService=t,this.localeService=i}return e.prototype.getMenuItem=function(){var e=this,t=this.localeService.getLocaleTextFunc(),i=function(i,n,o,r){return{name:t(i,n),action:function(){return e.chartService.createChartFromCurrentRange(o)},_key:r}};return{name:t("chartRange","Chart Range"),_key:"chartRange",subMenu:[{name:t("columnChart","Column"),subMenu:[i("groupedColumn","Grouped&lrm;","groupedColumn","rangeGroupedColumn"),i("stackedColumn","Stacked&lrm;","stackedColumn","rangeStackedColumn"),i("normalizedColumn","100% Stacked&lrm;","normalizedColumn","rangeNormalizedColumn")],_key:"rangeColumnChart"},{name:t("barChart","Bar"),subMenu:[i("groupedBar","Grouped&lrm;","groupedBar","rangeGroupedBar"),i("stackedBar","Stacked&lrm;","stackedBar","rangeStackedBar"),i("normalizedBar","100% Stacked&lrm;","normalizedBar","rangeNormalizedBar")],_key:"rangeBarChart"},{name:t("pieChart","Pie"),subMenu:[i("pie","Pie&lrm;","pie","rangePie"),i("doughnut","Doughnut&lrm;","doughnut","rangeDoughnut")],_key:"rangePieChart"},i("line","Line&lrm;","line","rangeLineChart"),{name:t("xyChart","X Y (Scatter)"),subMenu:[i("scatter","Scatter&lrm;","scatter","rangeScatter"),i("bubble","Bubble&lrm;","bubble","rangeBubble")],_key:"rangeXYChart"},{name:t("areaChart","Area"),subMenu:[i("area","Area&lrm;","area","rangeArea"),i("stackedArea","Stacked&lrm;","stackedArea","rangeStackedArea"),i("normalizedArea","100% Stacked&lrm;","normalizedArea","rangeNormalizedArea")],_key:"rangeAreaChart"},i("histogramChart","Histogram&lrm;","histogram","rangeHistogramChart"),{name:t("combinationChart","Combination"),subMenu:[i("columnLineCombo","Column & Line&lrm;","columnLineCombo","rangeColumnLineCombo"),i("AreaColumnCombo","Area & Column&lrm;","areaColumnCombo","rangeAreaColumnCombo")],_key:"rangeCombinationChart"}],icon:n._.createIconNoSpan("chart",this.gridOptionsService,void 0)}},e.prototype.getConfigLookup=function(){return{columnGroup:{_key:"rangeColumnChart",column:"rangeGroupedColumn",stackedColumn:"rangeStackedColumn",normalizedColumn:"rangeNormalizedColumn"},barGroup:{_key:"rangeBarChart",bar:"rangeGroupedBar",stackedBar:"rangeStackedBar",normalizedBar:"rangeNormalizedBar"},pieGroup:{_key:"rangePieChart",pie:"rangePie",doughnut:"rangeDoughnut"},lineGroup:{_key:"rangeLineChart",line:"rangeLineChart"},scatterGroup:{_key:"rangeXYChart",bubble:"rangeBubble",scatter:"rangeScatter"},areaGroup:{_key:"rangeAreaChart",area:"rangeArea",stackedArea:"rangeStackedArea",normalizedArea:"rangeNormalizedArea"},histogramGroup:{_key:"rangeHistogramChart",histogram:"rangeHistogramChart"},combinationGroup:{_key:"rangeCombinationChart",columnLineCombo:"rangeColumnLineCombo",areaColumnCombo:"rangeAreaColumnCombo",customCombo:""}}},e}(),AR={version:wR,moduleName:n.GXE.MenuModule,beans:[lR,gR,bR,TR],dependantModules:[y]},_R=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),PR=function(){return PR=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},PR.apply(this,arguments)},MR=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},kR=function(e){function t(){var t=e.call(this,'<div class="ag-multi-filter ag-menu-list-compact"></div>')||this;return t.filterDefs=[],t.filters=[],t.guiDestroyFuncs=[],t.activeFilterIndices=[],t.lastActivatedMenuItem=null,t.afterFiltersReadyFuncs=[],t}return _R(t,e),t.prototype.postConstruct=function(){var e=this;this.initialiseTabGuard({onFocusIn:function(t){return e.onFocusIn(t)}})}
18,t.getFilterDefs=function(e){var t=e.filters;return t&&t.length>0?t:[{filter:"agTextColumnFilter"},{filter:"agSetColumnFilter"}]},t.prototype.init=function(e){var i=this;this.params=e,this.filterDefs=t.getFilterDefs(e);var o=e.column,r=e.filterChangedCallback;this.column=o,this.filterChangedCallback=r;var s=[];return this.filterDefs.forEach((function(e,t){var n=i.createFilter(e,t);null!=n&&s.push(n)})),n.j_S.all(s).then((function(e){i.filters=e,i.refreshGui("columnMenu"),i.afterFiltersReadyFuncs.forEach((function(e){return e()})),i.afterFiltersReadyFuncs.length=0}))},t.prototype.refreshGui=function(e){var t=this;e!==this.lastOpenedInContainer&&(this.removeAllChildrenExceptTabGuards(),this.destroyChildren(),this.filters.forEach((function(i,o){o>0&&t.appendChild(n._.loadTemplate('<div class="ag-filter-separator"></div>'));var r,s=t.filterDefs[o],a=t.getFilterTitle(i,s);if("subMenu"===s.display&&"toolPanel"!==e){var l=t.insertFilterMenu(i,a);r=l.getGui()}else if("subMenu"===s.display||"accordion"===s.display){var c=t.insertFilterGroup(i,a);r=c.getGui()}else r=i.getGui();t.appendChild(r)})),this.lastOpenedInContainer=e)},t.prototype.getFilterTitle=function(e,t){if(null!=t.title)return t.title;var i=e;return"function"===typeof i.getFilterTitle?i.getFilterTitle():"Filter"},t.prototype.destroyChildren=function(){this.guiDestroyFuncs.forEach((function(e){return e()})),this.guiDestroyFuncs.length=0},t.prototype.insertFilterMenu=function(e,t){var i=this,o=this.createBean(new n.sJC({name:t,subMenu:e,cssClasses:["ag-multi-filter-menu-item"],isCompact:!0,isAnotherSubMenuOpen:function(){return!1}}));return o.setParentComponent(this),this.guiDestroyFuncs.push((function(){return i.destroyBean(o)})),this.addManagedListener(o,n.sJC.EVENT_MENU_ITEM_ACTIVATED,(function(e){i.lastActivatedMenuItem&&i.lastActivatedMenuItem!==e.menuItem&&i.lastActivatedMenuItem.deactivate(),i.lastActivatedMenuItem=e.menuItem})),o.addGuiEventListener("focusin",(function(){return o.activate()})),o.addGuiEventListener("focusout",(function(){o.isSubMenuOpen()||o.deactivate()})),o},t.prototype.insertFilterGroup=function(e,t){var i=this,o=this.createBean(new n.H1u({title:t,cssIdentifier:"multi-filter"}));return this.guiDestroyFuncs.push((function(){return i.destroyBean(o)})),o.addItem(e.getGui()),o.toggleGroupExpand(!1),e.afterGuiAttached&&o.addManagedListener(o,n.H1u.EVENT_EXPANDED,(function(){return e.afterGuiAttached({container:i.lastOpenedInContainer,suppressFocus:!0,hidePopup:i.hidePopup})})),o},t.prototype.isFilterActive=function(){return this.filters.some((function(e){return e.isFilterActive()}))},t.prototype.getLastActiveFilterIndex=function(){return this.activeFilterIndices.length>0?this.activeFilterIndices[this.activeFilterIndices.length-1]:null},t.prototype.doesFilterPass=function(e,t){var i=!0;return this.filters.forEach((function(n){i&&n!==t&&n.isFilterActive()&&(i=n.doesFilterPass(e))})),i},t.prototype.getFilterType=function(){return"multi"},t.prototype.getModelFromUi=function(){var e={filterType:this.getFilterType(),filterModels:this.filters.map((function(e){var t=e;return"function"===typeof t.getModelFromUi?t.getModelFromUi():null}))};return e},t.prototype.getModel=function(){if(!this.isFilterActive())return null;var e={filterType:this.getFilterType(),filterModels:this.filters.map((function(e){return e.isFilterActive()?e.getModel():null}))};return e},t.prototype.setModel=function(e){var t=this,i=function(e,t){return new n.j_S((function(i){var n=e.setModel(t);n?n.then((function(){return i()})):i()}))},o=[];return null==e?o=this.filters.map((function(e,n){var o=i(e,null).then((function(){t.updateActiveList(n)}));return o})):this.filters.forEach((function(n,r){var s=e.filterModels.length>r?e.filterModels[r]:null,a=i(n,s).then((function(){t.updateActiveList(r)}));o.push(a)})),n.j_S.all(o).then((function(){}))},t.prototype.applyModel=function(e){void 0===e&&(e="api");var t=!1;return this.filters.forEach((function(i){i instanceof n.AGU&&(t=i.applyModel(e)||t)})),t},t.prototype.getChildFilterInstance=function(e){return this.filters[e]},t.prototype.afterGuiAttached=function(e){e?(this.hidePopup=e.hidePopup,this.refreshGui(e.container)):this.hidePopup=void 0;var t=this.params.filters,i=t&&t.some((function(e){return e.display&&"inline"!==e.display}));this.executeFunctionIfExists("afterGuiAttached",PR(PR({},e||{}),{suppressFocus:i}));var n=this.gridOptionsService.getDocument(),o=n.activeElement;i&&(o===n.body||this.getGui().contains(o))&&this.forceFocusOutOfContainer(!0)},t.prototype.afterGuiDetached=function(){this.executeFunctionIfExists("afterGuiDetached")},t.prototype.onAnyFilterChanged=function(){this.executeFunctionIfExists("onAnyFilterChanged")},t.prototype.onNewRowsLoaded=function(){this.executeFunctionIfExists("onNewRowsLoaded")},t.prototype.destroy=function(){var t=this;
18this.filters.forEach((function(e){e.setModel(null),t.destroyBean(e)})),this.filters.length=0,this.destroyChildren(),this.hidePopup=void 0,e.prototype.destroy.call(this)},t.prototype.executeFunctionIfExists=function(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];n._.forEachReverse(this.filters,(function(i){var n=i[e];"function"===typeof n&&n.apply(i,t)}))},t.prototype.createFilter=function(e,t){var i,n=this,o=this.params,r=o.filterModifiedCallback,s=o.doesRowPassOtherFilter,a=PR(PR({},this.filterManager.createFilterParams(this.column,this.column.getColDef())),{filterModifiedCallback:r,filterChangedCallback:function(e){n.executeWhenAllFiltersReady((function(){return n.filterChanged(t,e)}))},doesRowPassOtherFilter:function(e){return s(e)&&n.doesFilterPass({node:e,data:e.data},i)}}),l=this.userComponentFactory.getFilterDetails(e,a,"agTextColumnFilter");if(!l)return null;var c=l.newAgStackInstance();return c&&c.then((function(e){return i=e})),c},t.prototype.executeWhenAllFiltersReady=function(e){this.filters&&this.filters.length>0?e():this.afterFiltersReadyFuncs.push(e)},t.prototype.updateActiveList=function(e){var t=this.filters[e];n._.removeFromArray(this.activeFilterIndices,e),t.isFilterActive()&&this.activeFilterIndices.push(e)},t.prototype.filterChanged=function(e,t){this.updateActiveList(e),this.filterChangedCallback(t);var i=this.filters[e];this.filters.forEach((function(e){e!==i&&"function"===typeof e.onAnyFilterChanged&&e.onAnyFilterChanged()}))},t.prototype.onFocusIn=function(e){return null==this.lastActivatedMenuItem||this.lastActivatedMenuItem.getGui().contains(e.target)||(this.lastActivatedMenuItem.deactivate(),this.lastActivatedMenuItem=null),!0},t.prototype.getModelAsString=function(e){var t,i,n,o;if(!this.filters||!(null===(t=null===e||void 0===e?void 0:e.filterModels)||void 0===t?void 0:t.length))return"";var r=null!==(i=this.getLastActiveFilterIndex())&&void 0!==i?i:0,s=this.filters[r];return null!==(o=null===(n=s.getModelAsString)||void 0===n?void 0:n.call(s,e.filterModels[r]))&&void 0!==o?o:""},MR([(0,n.fsG)("filterManager")],t.prototype,"filterManager",void 0),MR([(0,n.fsG)("userComponentFactory")],t.prototype,"userComponentFactory",void 0),MR([n.NqP],t.prototype,"postConstruct",null),t}(n.BxR),NR=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),LR=function(){return LR=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},LR.apply(this,arguments)},IR=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},FR=function(e){function t(){var t=e.call(this,'<div class="ag-multi-floating-filter ag-floating-filter-input"></div>')||this;return t.floatingFilters=[],t.compDetailsList=[],t}return NR(t,e),t.prototype.init=function(e){this.params=e;var t=this.getCompDetailsList(e).compDetailsList;return this.setParams(t)},t.prototype.setParams=function(e){var t=this,i=[];return e.forEach((function(e){var n=null===e||void 0===e?void 0:e.newAgStackInstance();null!=n&&(t.compDetailsList.push(e),i.push(n))})),n.j_S.all(i).then((function(e){e.forEach((function(e,i){t.floatingFilters.push(e);var o=e.getGui();t.appendChild(o),i>0&&n._.setDisplayed(o,!1)}))}))},t.prototype.onParamsUpdated=function(e){var t=this;this.params=e;var i=this.getCompDetailsList(e),o=i.compDetailsList,r=i.floatingFilterParamsList,s=o.length===this.compDetail
18sList.length&&o.every((function(e,i){return!t.filterManager.areFilterCompsDifferent(t.compDetailsList[i],e)}));s?r.forEach((function(e,i){var n,o=t.floatingFilters[i];null===(n=o.onParamsUpdated)||void 0===n||n.call(o,e)})):(n._.clearElement(this.getGui()),this.destroyBeans(this.floatingFilters),this.floatingFilters=[],this.compDetailsList=[],this.setParams(o))},t.prototype.getCompDetailsList=function(e){var t=this,i=[],o=[],r=e.filterParams;return kR.getFilterDefs(r).forEach((function(r,s){var a=LR(LR({},e),{parentFilterInstance:function(e){t.parentMultiFilterInstance((function(t){var i=t.getChildFilterInstance(s);null!=i&&e(i)}))}});n._.mergeDeep(a.filterParams,r.filterParams);var l=t.getCompDetails(r,a);l&&(i.push(l),o.push(a))})),{compDetailsList:i,floatingFilterParamsList:o}},t.prototype.onParentModelChanged=function(e,t){var i=this;t&&t.afterFloatingFilter||this.parentMultiFilterInstance((function(o){if(null==e)i.floatingFilters.forEach((function(e,i){e.onParentModelChanged(null,t),n._.setDisplayed(e.getGui(),0===i)}));else{var r=o.getLastActiveFilterIndex();i.floatingFilters.forEach((function(i,o){var s=e.filterModels.length>o?e.filterModels[o]:null;i.onParentModelChanged(s,t);var a=null==r?0===o:o===r;n._.setDisplayed(i.getGui(),a)}))}}))},t.prototype.destroy=function(){this.destroyBeans(this.floatingFilters),this.floatingFilters.length=0,e.prototype.destroy.call(this)},t.prototype.getCompDetails=function(e,t){var i,n=this,o=null!==(i=this.userComponentFactory.getDefaultFloatingFilterType(e,(function(){return n.filterManager.getDefaultFloatingFilter(n.params.column)})))&&void 0!==i?i:"agReadOnlyFloatingFilter";return this.userComponentFactory.getFloatingFilterCompDetails(e,t,o)},t.prototype.parentMultiFilterInstance=function(e){this.params.parentFilterInstance((function(t){if(!(t instanceof kR))throw new Error("AG Grid - MultiFloatingFilterComp expects MultiFilter as its parent");e(t)}))},IR([(0,n.fsG)("userComponentFactory")],t.prototype,"userComponentFactory",void 0),IR([(0,n.fsG)("filterManager")],t.prototype,"filterManager",void 0),t}(n.wA2),GR="31.0.0",VR={version:GR,moduleName:n.GXE.MultiFilterModule,beans:[],userComponents:[{componentName:"agMultiColumnFilter",componentClass:kR},{componentName:"agMultiColumnFloatingFilter",componentClass:FR}],dependantModules:[y]},BR=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),jR=function(e){function t(){return e.call(this,'<div class="ag-cell-edit-wrapper"></div>')||this}return BR(t,e),t.prototype.init=function(e){var t=this;this.params=e;var i=e.cellStartedEdit,o=e.cellHeight,r=e.values;n._.missing(r)&&console.warn("AG Grid: agRichSelectCellEditor requires cellEditorParams.values to be set");var s=this.buildRichSelectParams(),a=s.params,l=s.valuesPromise;this.richSelect=this.createManagedBean(new n.LuV(a)),this.richSelect.addCssClass("ag-cell-editor"),this.appendChild(this.richSelect),l&&l.then((function(e){t.richSelect.setValueList({valueList:e,refresh:!0});var i=t.getSearchStringCallback(e);i&&t.richSelect.setSearchStringCreator(i)})),this.addManagedListener(this.richSelect,n.zW2.EVENT_FIELD_PICKER_VALUE_SELECTED,this.onEditorPickerValueSelected.bind(this)),this.addManagedListener(this.richSelect.getGui(),"focusout",this.onEditorFocusOut.bind(this)),this.focusAfterAttached=i,n._.exists(o)&&this.richSelect.setRowHeight(o)},t.prototype.onEditorPickerValueSelected=function(e){this.params.stopEditing(!e.fromEnterKey)},t.prototype.onEditorFocusOut=function(e){this.richSelect.getGui().contains(e.relatedTarget)||this.params.stopEditing(!0)},t.prototype.buildRichSelectParams=function(){var e,t,i=this.params,n=i.cellRenderer,o=i.value,r=i.values,s=i.formatValue,a=i.searchDebounceDelay,l=i.valueListGap,c=i.valueListMaxHeight,u=i.valueListMaxWidth,d=i.allowTyping,p=i.filterList,h=i.searchType,f=i.highlightMatch,g=i.valuePlaceholder,v=i.eventKey,y={value:o,cellRenderer:n,searchDebounceDelay:a,valueFormatter:s,pickerAriaLabelKey:"ariaLabelRichSelectField",pickerAriaLabelValue:"Rich Select Field",pickerType:"virtual-list",pickerGap:l,allowTyping:d,filterList:p,searchType:h,highlightMatch:f,maxPickerHeight:c,maxPickerWidth:u,placeholder:g,initialInputValue:1===(null===v||void 0===v?void 0:v.length)?v:void 0};return e="function"===typeof r?r(this.params):null!==r&&void 0!==r?r:[],Array.isArray(e)?(y.valueList=e,y.searchStringCreator=this.getSearchStringCallback(e)):t=e,{params:y,valuesPromise:t}},t.prototype.getSearchStringCallback=function(e){var t=this,i=this.params.colDef;if("object"===typeof e[0]&&i.keyCreator)return function(e){return e.map((function(e){var n={value:e,colDef:t.params.colDef,column:t.params.column,node:t.params.node,data:t.params.data,api:t.gridOptionsService.api,columnApi:t.gridOptionsService.columnApi,context:t.gridOptionsService.context};return i.keyCreator(n)}))}},t.prototype.afterGuiAttached=function(){var e=this,t=this,i=t.focusAfterAttached,n=t.params;setTimeout((function(){if(e.isAlive()){if(i){var t=e.richSelect.getFocusableElement();t.focus();var o=e.params,r=o.allowTyping,s=o.eventKey;!r||s&&1===s.length||t.select()}e.richSelect.showPicker();var a=n.eventKey;
18a&&1===(null===a||void 0===a?void 0:a.length)&&e.richSelect.searchTextFromString(a)}}))},t.prototype.getValue=function(){return this.richSelect.getValue()},t.prototype.isPopup=function(){return!1},t}(n.RXH),HR="31.0.0",WR={version:HR,moduleName:n.GXE.RichSelectModule,beans:[],userComponents:[{componentName:"agRichSelect",componentClass:jR},{componentName:"agRichSelectCellEditor",componentClass:jR}],dependantModules:[y]},UR=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),zR=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},KR=function(e){function t(t,i,o){var r=e.call(this,0)||this;return r.nodeIdSequence=new n.at1,r.info={},r.ssrmParams=t,r.parentRowNode=o,r.level=o.level+1,r.groupLevel=t.rowGroupCols?r.level<t.rowGroupCols.length:void 0,r.leafGroup=!!t.rowGroupCols&&r.level===t.rowGroupCols.length-1,r}return UR(t,e),t.prototype.postConstruct=function(){var e=this;if(this.usingTreeData=this.gridOptionsService.get("treeData"),this.nodeIdPrefix=this.blockUtils.createNodeIdPrefix(this.parentRowNode),!this.usingTreeData&&this.groupLevel){var t=this.ssrmParams.rowGroupCols[this.level];this.groupField=t.field,this.rowGroupColumn=this.columnModel.getRowGroupColumns()[this.level]}var i=1,o=-1===this.parentRowNode.level,r=this.storeUtils.getServerSideInitialRowCount();o&&null!=r&&(i=r),this.initialiseRowNodes(i),this.rowNodeBlockLoader.addBlock(this),this.addDestroyFunc((function(){return e.rowNodeBlockLoader.removeBlock(e)})),this.postSortFunc=this.gridOptionsService.getCallback("postSortRows"),null!=r&&this.eventService.dispatchEventOnce({type:n.zW2.EVENT_ROW_COUNT_READY})},t.prototype.destroyRowNodes=function(){this.blockUtils.destroyRowNodes(this.allRowNodes),this.allRowNodes=[],this.nodesAfterSort=[],this.nodesAfterFilter=[],this.allNodesMap={}},t.prototype.initialiseRowNodes=function(e,t){void 0===t&&(t=!1),this.destroyRowNodes();for(var i=0;i<e;i++){var n=this.blockUtils.createRowNode({field:this.groupField,group:this.groupLevel,leafGroup:this.leafGroup,level:this.level,parent:this.parentRowNode,rowGroupColumn:this.rowGroupColumn});t&&(n.failedLoad=!0),this.allRowNodes.push(n),this.nodesAfterFilter.push(n),this.nodesAfterSort.push(n)}},t.prototype.getBlockStateJson=function(){return{id:this.nodeIdPrefix?this.nodeIdPrefix:"",state:this.getState()}},t.prototype.loadFromDatasource=function(){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())})},t.prototype.getStartRow=function(){return 0},t.prototype.getEndRow=function(){return this.nodesAfterSort.length},t.prototype.createDataNode=function(e,t){var i=this.blockUtils.createRowNode({field:this.groupField,group:this.groupLevel,leafGroup:this.leafGroup,level:this.level,parent:this.parentRowNode,rowGroupColumn:this.rowGroupColumn});null!=t?n._.insertIntoArray(this.allRowNodes,i,t):this.allRowNodes.push(i);var o=this.prefixId(this.nodeIdSequence.next());return this.blockUtils.setDataIntoRowNode(i,e,o,void 0),this.nodeManager.addRowNode(i),this.blockUtils.checkOpenByDefault(i),this.allNodesMap[i.id]=i,i},t.prototype.prefixId=function(e){return this.nodeIdPrefix?this.nodeIdPrefix+"-"+e:e.toString()},t.prototype.processServerFail=function(){this.initialiseRowNodes(1,!0),this.fireStoreUpdatedEvent(),this.flushAsyncTransactions()},t.prototype.processServerResult=function(e){if(this.isAlive()){var t=e.groupLevelInfo;t&&Object.assign(this.info,t),e.pivotResultFields&&this.serverSideRowModel.generateSecondaryColumns(e.pivotResultFields);var i=this.allRowNodes.length>0?this.allNodesMap:void 0;this.allRowNodes=[],this.nodesAfterSort=[],this.nodesAfterFilter=[],this.allNodesMap={},e.rowData||n._.warnOnce('"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(n._.getAllValuesInObject(i)),0===this.level&&this.eventService.dispatchEventOnce({type:n.zW2.EVENT_ROW_COUNT_READY}),this.filterAndSortNodes(),this.fireStoreUpdatedEvent(),this.flushAsyncTransactions()}},t.prototype.createOrRecycleNodes=function(e,t){var i=this;if(t){var n=function(t){if(e){var n=i.gridOptionsService.getCallback("getRowId");if(n){var o=i.parentRowNode.getGroupKeys(),r=i.level,s=n({data:t,parentKeys:o.length>0?o:void 0,level:r}),a=e[s];if(a)return delete e[s],a}}},o=function(e,t){i.allNodesMap[e.id]=e,i.blockUtils.updateDataIntoRowNode(e,t),i.allRowNodes.push(e)};t.forEach((function(e){var t=n(e);t?o(t,e):i.createDataNode(e)}))}},t.prototype.flushAsyncTransactions=function(){var e=this;window.setTimeout((function(){return e.transactionManager.flushAsyncTransactions()}),0)},t.prototype.filterAndSortNodes=function(){this.filterRowNodes(),this.sortRowNodes()},t.prototype.sortRowNodes=function(){var e=this.storeUtils.isServerSideSortAllLevels()||this.storeUtils.isServerSideSortOnServer(),t=this.sortController.getSortOptions(),i=!t||0==t.length;if(e||i)this.nodesAfterSort=this.nodesAfterFilter;else if(this.nodesAfterSort=this.rowNodeSorter.doFullSort(this.nodesAfterFilter,t),this.postSortFunc){var n={nodes:this.nodesAfterSort};this.postSortFunc(n)}},t.prototype.filterRowNodes=function(){var e=this,t=!this.storeUtils.isServerSideOnlyRefreshFilteredGroups()||this.storeUtils.isServerSideFilterOnServer(),i=this.groupLevel;this.nodesAfterFilter=t||i?this.allRowNodes:this.allRowNodes.filter((function(t){return e.filterManager.doesRowPassFilter({rowNode:t})}))},t.prototype.clearDisplayIndexes=function(){var e=this;this.displayIndexStart=void 0,this.displayIndexEnd=void 0,this.allRowNodes.forEac
18h((function(t){return e.blockUtils.clearDisplayIndex(t)}))},t.prototype.getDisplayIndexEnd=function(){return this.displayIndexEnd},t.prototype.isDisplayIndexInStore=function(e){return 0!==this.getRowCount()&&(e>=this.displayIndexStart&&e<this.displayIndexEnd)},t.prototype.setDisplayIndexes=function(e,t){var i=this;this.displayIndexStart=e.peek(),this.topPx=t.value;var n={};this.nodesAfterSort.forEach((function(o){i.blockUtils.setDisplayIndex(o,e,t),n[o.id]=!0})),this.allRowNodes.forEach((function(e){n[e.id]||i.blockUtils.clearDisplayIndex(e)})),this.displayIndexEnd=e.peek(),this.heightPx=t.value-this.topPx},t.prototype.forEachStoreDeep=function(e,t){void 0===t&&(t=new n.at1),e(this,t.next()),this.allRowNodes.forEach((function(i){var n=i.childStore;n&&n.forEachStoreDeep(e,t)}))},t.prototype.forEachNodeDeep=function(e,t){void 0===t&&(t=new n.at1),this.allRowNodes.forEach((function(i){e(i,t.next());var n=i.childStore;n&&n.forEachNodeDeep(e,t)}))},t.prototype.forEachNodeDeepAfterFilterAndSort=function(e,t,i){void 0===t&&(t=new n.at1),void 0===i&&(i=!1),this.nodesAfterSort.forEach((function(n){e(n,t.next());var o=n.childStore;o&&o.forEachNodeDeepAfterFilterAndSort(e,t,i)})),i&&this.parentRowNode.sibling&&e(this.parentRowNode.sibling,t.next())},t.prototype.getRowUsingDisplayIndex=function(e){if(this.isDisplayIndexInStore(e)){var t=this.blockUtils.binarySearchForDisplayIndex(e,this.nodesAfterSort);return t}},t.prototype.getRowBounds=function(e){for(var t=0;t<this.nodesAfterSort.length;t++){var i=this.nodesAfterSort[t],n=this.blockUtils.extractRowBounds(i,e);if(n)return n}return null},t.prototype.isPixelInRange=function(e){return e>=this.topPx&&e<this.topPx+this.heightPx},t.prototype.getRowIndexAtPixel=function(e){var t=this,i=e<=this.topPx;if(i){var n=this.nodesAfterSort[0];return n.rowIndex}var o=e>=this.topPx+this.heightPx;if(o){var r=this.nodesAfterSort[this.nodesAfterSort.length-1],s=r.rowTop+r.rowHeight;if(e>=s&&r.expanded){if(r.childStore&&r.childStore.getRowCount()>0)return r.childStore.getRowIndexAtPixel(e);if(r.detailNode)return r.detailNode.rowIndex}return r.rowIndex}var a=null;this.nodesAfterSort.forEach((function(i){var n=t.blockUtils.getIndexAtPixel(i,e);null!=n&&(a=n)}));var l=null==a;return l?this.displayIndexEnd-1:a},t.prototype.getChildStore=function(e){var t=this;return this.storeUtils.getChildStore(e,this,(function(e){var i=t.allRowNodes.find((function(t){return t.key==e}));return i}))},t.prototype.forEachChildStoreShallow=function(e){this.allRowNodes.forEach((function(t){var i=t.childStore;i&&e(i)}))},t.prototype.refreshAfterFilter=function(e){var t=this.storeUtils.isServerSideFilterOnServer(),i=this.storeUtils.isServerRefreshNeeded(this.parentRowNode,this.ssrmParams.rowGroupCols,e),n=!this.storeUtils.isServerSideOnlyRefreshFilteredGroups();if(n||t&&i)return this.refreshStore(!0),void this.sortRowNodes();this.filterRowNodes(),this.sortRowNodes(),this.forEachChildStoreShallow((function(t){return t.refreshAfterFilter(e)}))},t.prototype.refreshAfterSort=function(e){var t=this.storeUtils.isServerSideSortOnServer(),i=this.storeUtils.isServerRefreshNeeded(this.parentRowNode,this.ssrmParams.rowGroupCols,e),n=this.storeUtils.isServerSideSortAllLevels();if(n||t&&i)return this.refreshStore(!0),void this.filterRowNodes();this.filterRowNodes(),this.sortRowNodes(),this.forEachChildStoreShallow((function(t){return t.refreshAfterSort(e)}))},t.prototype.applyTransaction=function(e){switch(this.getState()){case n.NlK.STATE_FAILED:return{status:n.Qk6.StoreLoadingFailed};case n.NlK.STATE_LOADING:return{status:n.Qk6.StoreLoading};case n.NlK.STATE_WAITING_TO_LOAD:return{status:n.Qk6.StoreWaitingToLoad}}var t=this.gridOptionsService.getCallback("isApplyServerSideTransaction");if(t){var i={transaction:e,parentNode:this.parentRowNode,groupLevelInfo:this.info},o=t(i);if(!o)return{status:n.Qk6.Cancelled}}var r={status:n.Qk6.Applied,remove:[],update:[],add:[]},s=[];return this.executeAdd(e,r),this.executeRemove(e,r,s),this.executeUpdate(e,r,s),this.filterAndSortNodes(),this.updateSelection(s),r},t.prototype.updateSelection=function(e){var t=e.length>0;if(t){this.selectionService.setNodesSelected({newValue:!1,nodes:e,suppressFinishActions:!0,clearSelection:!1,source:"rowDataChanged"});var i={type:n.zW2.EVENT_SELECTION_CHANGED,source:"rowDataChanged"};this.eventService.dispatchEvent(i)}},t.prototype.executeAdd=function(e,t){var i=this,o=e.add,r=e.addIndex;if(!n._.missingOrEmpty(o)){var s="number"===typeof r&&r>=0;
18s?o.reverse().forEach((function(e){var n=i.createDataNode(e,r);t.add.push(n)})):o.forEach((function(e){var n=i.createDataNode(e);t.add.push(n)}))}},t.prototype.executeRemove=function(e,t,i){var n=this,o=e.remove;if(null!=o){var r={};o.forEach((function(e){var o=n.lookupRowNode(e);o&&(o.isSelected()&&i.push(o),o.clearRowTopAndRowIndex(),r[o.id]=!0,delete n.allNodesMap[o.id],t.remove.push(o),n.nodeManager.removeNode(o))})),this.allRowNodes=this.allRowNodes.filter((function(e){return!r[e.id]}))}},t.prototype.executeUpdate=function(e,t,i){var n=this,o=e.update;null!=o&&o.forEach((function(e){var o=n.lookupRowNode(e);o&&(n.blockUtils.updateDataIntoRowNode(o,e),!o.selectable&&o.isSelected()&&i.push(o),t.update.push(o))}))},t.prototype.lookupRowNode=function(e){var t,i=this.gridOptionsService.getCallback("getRowId");if(null!=i){var n=this.level,o=this.parentRowNode.getGroupKeys(),r=i({data:e,parentKeys:o.length>0?o:void 0,level:n});if(t=this.allNodesMap[r],!t)return console.error("AG Grid: could not find row id=".concat(r,", data item was not found for this id")),null}else if(t=this.allRowNodes.find((function(t){return t.data===e})),!t)return console.error("AG Grid: could not find data item as object was not found",e),null;return t},t.prototype.addStoreStates=function(e){e.push({suppressInfiniteScroll:!0,route:this.parentRowNode.getGroupKeys(),rowCount:this.allRowNodes.length,info:this.info}),this.forEachChildStoreShallow((function(t){return t.addStoreStates(e)}))},t.prototype.refreshStore=function(e){if(e){var t=this.nodesAfterSort?this.nodesAfterSort.length:1;this.initialiseRowNodes(t)}this.scheduleLoad(),this.fireStoreUpdatedEvent()},t.prototype.retryLoads=function(){this.getState()===n.NlK.STATE_FAILED&&(this.initialiseRowNodes(1),this.scheduleLoad()),this.forEachChildStoreShallow((function(e){return e.retryLoads()}))},t.prototype.scheduleLoad=function(){this.setStateWaitingToLoad(),this.rowNodeBlockLoader.checkBlockToLoad()},t.prototype.fireStoreUpdatedEvent=function(){var e={type:n.zW2.EVENT_STORE_UPDATED};this.eventService.dispatchEvent(e)},t.prototype.getRowCount=function(){return this.nodesAfterSort.length},t.prototype.getTopLevelRowDisplayedIndex=function(e){var t=this.nodesAfterSort[e];return t.rowIndex},t.prototype.isLastRowIndexKnown=function(){return this.getState()==n.NlK.STATE_LOADED},t.prototype.getRowNodesInRange=function(e,t){var i=[],o=!1;n._.missing(e)&&(o=!0),this.nodesAfterSort.forEach((function(n){var r=n===e||n===t;(o||r)&&i.push(n),r&&(o=!o)}));var r=o;return r?[]:i},t.prototype.getStoreBounds=function(){return{topPx:this.topPx,heightPx:this.heightPx}},zR([(0,n.fsG)("ssrmStoreUtils")],t.prototype,"storeUtils",void 0),zR([(0,n.fsG)("ssrmBlockUtils")],t.prototype,"blockUtils",void 0),zR([(0,n.fsG)("columnModel")],t.prototype,"columnModel",void 0),zR([(0,n.fsG)("rowNodeBlockLoader")],t.prototype,"rowNodeBlockLoader",void 0),zR([(0,n.fsG)("rowNodeSorter")],t.prototype,"rowNodeSorter",void 0),zR([(0,n.fsG)("sortController")],t.prototype,"sortController",void 0),zR([(0,n.fsG)("selectionService")],t.prototype,"selectionService",void 0),zR([(0,n.fsG)("ssrmNodeManager")],t.prototype,"nodeManager",void 0),zR([(0,n.fsG)("filterManager")],t.prototype,"filterManager",void 0),zR([(0,n.fsG)("ssrmTransactionManager")],t.prototype,"transactionManager",void 0),zR([(0,n.fsG)("rowModel")],t.prototype,"serverSideRowModel",void 0),zR([n.NqP],t.prototype,"postConstruct",null),zR([n.FXL],t.prototype,"destroyRowNodes",null),t}(n.NlK),YR=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),qR=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},XR=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},$R=function(e){function t(t,i,n){var o=e.call(this)||this;return o.loadingNodes=new Set,o.checkForLoadQueued=!1,o.loaderTimeout=void 0,o.nextBlockToLoad=void 0,o.parentNode=i,o.cache=t,o.storeParams=n,o}return YR(t,e),t.prototype.init=function(){var e=this;this.addManagedListener(this.rowNodeBlockLoader,n.fKL.BLOCK_LOADED_EVENT,(function(){return e.queueLoadAction()}))},t.prototype.isRowLoading=function(e){return this.loadingNodes.has(e)},t.prototype.getBlockToLoad=function(){for(var e,t=this,i=this.api.getFirstDisplayedRow(),n=this.api.getLastDisplayedRow(),o=i;o<=n;o++){var r=this.cache.getNodeCachedByDisplayIndex(o);if(r){var s=this.cache.getNodes().getBy("node",r);if(s&&!this.isRowLoading(s.index)&&(r.__needsRefreshWhenVisible||r.stub&&!r.failedLoad))return this.getBlockStartIndexForIndex(s.index)}}var a=this.cache.getNodesToRefresh(),l=null,c=Number.MAX_SAFE_INTEGER;a.forEach((function(e){if(null!=e.rowIndex){if(!t.isRowLoading(e.rowIndex)){var o=Math.abs(i-e.rowIndex),r=Math.abs(e.rowIndex-n);o<c&&(l=e,c=o),r<c&&(l=e,c=r)}}else l=e}));var u=null===(e=this.cache.getNodes().getBy("node",l))||void 0===e?void 0:e.index;return null==u?void 0:this.getBlockStartIndexForIndex(u)},t.prototype.reset=function(){this.loadingNodes.clear(),clearTimeout(this.loaderTimeout),this.loaderTimeout=void 0},t.prototype.executeLoad=function(e,t){var i,n=this,o=this.cache.getSsrmParams(),r={startRow:e,endRow:t,rowGroupCols:o.rowGroupCols,valueCols:o.valueCols,pivotCols:o.pivotCols,pivotMode:o.pivotMode,groupKeys:this.parentNode.getGroupKeys(),filterModel:o.filterModel,sortModel:o.sortModel},s=function(){for(var i=0;i<t-e;i++)n.loadingNodes.delete(e+i)},a=function(){for(var i=0;i<t-e;i++)n.loadingNodes.add(e+i)},l=function(i){n.rowNodeBlockLoader.loadComplete(),n.cache.onLoadSuccess(e,t-e,i),s(),n.queueLoadAction()},c=function(){n.rowNodeBlockLoader.loadComplete(),n.cache.onLoadFailed(e,t-e),s(),n.queueLoadAction()}
18,u={request:r,success:l,fail:c,parentNode:this.parentNode,api:this.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context};a(),null===(i=this.cache.getSsrmParams().datasource)||void 0===i||i.getRows(u)},t.prototype.getNextBlockToLoad=function(){var e=this.getBlockToLoad();return null!=e?[String(e),e+this.getBlockSize()]:null},t.prototype.queueLoadCheck=function(){var e=this;this.checkForLoadQueued||(this.checkForLoadQueued=!0,window.queueMicrotask((function(){e.checkForLoadQueued=!1,e.queueLoadAction()})))},t.prototype.queueLoadAction=function(){var e=this,t=this.getNextBlockToLoad();if(!t)return window.clearTimeout(this.loaderTimeout),this.loaderTimeout=void 0,void(this.nextBlockToLoad=void 0);if(!this.nextBlockToLoad||this.nextBlockToLoad[0]!==t[0]&&this.nextBlockToLoad[1]!==t[1]){this.nextBlockToLoad=t,window.clearTimeout(this.loaderTimeout);var i=XR(this.nextBlockToLoad,2),n=i[0],o=i[1],r=Number(n);this.loaderTimeout=window.setTimeout((function(){e.cache.isAlive()&&(e.loaderTimeout=void 0,e.attemptLoad(r,o),e.nextBlockToLoad=void 0)}),this.gridOptionsService.get("blockLoadDebounceMillis"))}},t.prototype.attemptLoad=function(e,t){var i=this.rowNodeBlockLoader.getAvailableLoadingCount();null!=i&&0===i||(this.rowNodeBlockLoader.registerLoads(1),this.executeLoad(e,t),this.queueLoadAction())},t.prototype.getBlockSize=function(){return this.storeParams.cacheBlockSize||t.DEFAULT_BLOCK_SIZE},t.prototype.getBlockStartIndexForIndex=function(e){var t=this.getBlockSize();return e-e%t},t.prototype.getBlockBoundsForIndex=function(e){var t=this.getBlockStartIndexForIndex(e),i=this.getBlockSize();return[t,t+i]},t.DEFAULT_BLOCK_SIZE=100,qR([(0,n.fsG)("gridApi")],t.prototype,"api",void 0),qR([(0,n.fsG)("rowNodeBlockLoader")],t.prototype,"rowNodeBlockLoader",void 0),qR([n.NqP],t.prototype,"init",null),t}(n.AS9),ZR=function(){function e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(e.length<1)throw new Error("AG Grid: At least one index must be provided.");this.indexes=e,this.maps=new Map(this.indexes.map((function(e){return[e,new Map]})))}return e.prototype.getBy=function(e,t){var i=this.maps.get(e);if(!i)throw new Error("AG Grid: ".concat(String(e)," not found"));return i.get(t)},e.prototype.set=function(e){var t=this;this.indexes.forEach((function(i){var n=t.maps.get(i);if(!n)throw new Error("AG Grid: ".concat(String(i)," not found"));n.set(e[i],e)}))},e.prototype.delete=function(e){var t=this;this.indexes.forEach((function(i){var n=t.maps.get(i);if(!n)throw new Error("AG Grid: ".concat(String(i)," not found"));n.delete(e[i])}))},e.prototype.clear=function(){this.maps.forEach((function(e){return e.clear()}))},e.prototype.getIterator=function(e){var t=this.maps.get(e);if(!t)throw new Error("AG Grid: ".concat(String(e)," not found"));return t.values()},e.prototype.forEach=function(e){var t,i=this.getIterator(this.indexes[0]);while(t=i.next()){if(t.done)break;e(t.value)}},e.prototype.find=function(e){var t,i=this.getIterator(this.indexes[0]);while(t=i.next()){if(t.done)break;if(e(t.value))return t.value}},e.prototype.filter=function(e){var t,i=this.getIterator(this.indexes[0]),n=[];while(t=i.next()){if(t.done)break;e(t.value)&&n.push(t.value)}return n},e}(),JR=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),QR=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},eA=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},tA=function(e,t,i){if(i||2===arguments.length)for(var n,o=0,r=t.length;o<r;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},iA=function(e){function t(t,i,n){var o=e.call(this)||this;return o.live=!0,o.removedNodeCache=new Map,o.store=t,o.numberOfRows=i,o.isLastRowKnown=!1,o.storeParams=n,o}return JR(t,e),t.prototype.init=function(){this.nodeMap=new ZR("index","id","node"),this.nodeDisplayIndexMap=new Map,this.nodesToRefresh=new Set,this.defaultNodeIdPrefix=this.blockUtils.createNodeIdPrefix(this.store.getParentNode()),this.rowLoader=this.createManagedBean(new $R(this,this.store.getParentNode(),this.storeParams)),this.getRowIdFunc=this.gridOptionsService.getCallback("getRowId"),this.isMasterDetail=this.gridOptionsService.get("masterDetail")},t.prototype.destroyRowNodes=function(){var e=this;
18this.numberOfRows=0,this.nodeMap.forEach((function(t){return e.blockUtils.destroyRowNode(t.node)})),this.nodeMap.clear(),this.nodeDisplayIndexMap.clear(),this.nodesToRefresh.clear(),this.live=!1},t.prototype.getRowByDisplayIndex=function(e){var t,i,n,o;if(this.store.isDisplayIndexInStore(e)){var r=this.nodeDisplayIndexMap.get(e);if(r)return(r.stub||r.__needsRefreshWhenVisible)&&this.rowLoader.queueLoadCheck(),r;if(e===this.store.getDisplayIndexStart())return this.createStubNode(0,e);var s=this.nodeDisplayIndexMap.get(e-1);if(s){if(this.isMasterDetail&&s.master&&s.expanded)return s.detailNode;if(s.expanded&&(null===(t=s.childStore)||void 0===t?void 0:t.isDisplayIndexInStore(e)))return null===(i=s.childStore)||void 0===i?void 0:i.getRowUsingDisplayIndex(e);var a=this.nodeMap.getBy("node",s);return this.createStubNode(a.index+1,e)}var l=this.getSurroundingNodesByDisplayIndex(e);if(null==l){var c=this.store.getRowCount()-(this.store.getDisplayIndexEnd()-e);return this.createStubNode(c,e)}var u=l.previousNode,d=l.nextNode;if(u&&u.node.expanded&&(null===(n=u.node.childStore)||void 0===n?void 0:n.isDisplayIndexInStore(e)))return null===(o=u.node.childStore)||void 0===o?void 0:o.getRowUsingDisplayIndex(e);if(d){var p=d.node.rowIndex-e,h=d.index-p;return this.createStubNode(h,e)}var f=this.store.getRowCount()-(this.store.getDisplayIndexEnd()-e);return this.createStubNode(f,e)}},t.prototype.createStubNode=function(e,t){var i=this,n=this.store.getRowBounds(t),o=this.createRowAtIndex(e,null,(function(e){e.setRowIndex(t),e.setRowTop(n.rowTop),i.nodeDisplayIndexMap.set(t,e)}));return this.rowLoader.queueLoadCheck(),o},t.prototype.getRowByStoreIndex=function(e){var t;return null===(t=this.nodeMap.getBy("index",e))||void 0===t?void 0:t.node},t.prototype.skipDisplayIndexes=function(e,t,i){if(0!==e){var n=this.gridOptionsService.getRowHeightAsNumber();t.skip(e),i.value+=e*n}},t.prototype.setDisplayIndexes=function(e,t){this.nodeDisplayIndexMap.clear();var i={};
18this.nodeMap.forEach((function(e){i[e.index]=e.node}));var n=-1;for(var o in i){var r=i[o],s=Number(o),a=s-1-n;this.skipDisplayIndexes(a,e,t),this.blockUtils.setDisplayIndex(r,e,t),this.nodeDisplayIndexMap.set(r.rowIndex,r),n=s}var l=this.numberOfRows-1-n;this.skipDisplayIndexes(l,e,t),this.purgeExcessRows()},t.prototype.getRowCount=function(){return this.numberOfRows},t.prototype.setRowCount=function(e,t){if(e<0)throw new 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()},t.prototype.getNodes=function(){return this.nodeMap},t.prototype.getNodeCachedByDisplayIndex=function(e){var t;return null!==(t=this.nodeDisplayIndexMap.get(e))&&void 0!==t?t:null},t.prototype.getNodesToRefresh=function(){return this.nodesToRefresh},t.prototype.getSurroundingNodesByDisplayIndex=function(e){var t,i;return this.nodeMap.forEach((function(n){e>n.node.rowIndex?(null==i||i.node.rowIndex<n.node.rowIndex)&&(i=n):(null==t||t.node.rowIndex>n.node.rowIndex)&&(t=n)})),i||t?{previousNode:i,nextNode:t}:null},t.prototype.getDisplayIndexFromStoreIndex=function(e){var t,i,n,o,r=this.nodeMap.getBy("index",e);if(r)return r.node.rowIndex;
18if(this.nodeMap.forEach((function(t){e>t.index?(null==o||o.index<t.index)&&(o=t):(null==n||n.index>t.index)&&(n=t)})),!n)return this.store.getDisplayIndexEnd()-(this.numberOfRows-e);if(!o)return this.store.getDisplayIndexStart()+e;var s=e-o.index,a=null!==(i=null===(t=o.node.childStore)||void 0===t?void 0:t.getDisplayIndexEnd())&&void 0!==i?i:o.node.rowIndex;return a+s},t.prototype.createRowAtIndex=function(e,t,i){var n,o,r=this.nodeMap.getBy("index",e);if(r){var s=r.node;if(s.__needsRefreshWhenVisible=!1,this.doesNodeMatch(t,s))return this.blockUtils.updateDataIntoRowNode(s,t),this.nodesToRefresh.delete(s),s;if(null==this.getRowIdFunc&&s.hasChildren()&&s.expanded)return this.nodesToRefresh.delete(s),s;this.destroyRowAtIndex(e)}if(t&&null!=this.getRowIdFunc){var a=this.getRowId(t),l=a&&(null===(n=this.removedNodeCache)||void 0===n?void 0:n.get(a));if(l)return null===(o=this.removedNodeCache)||void 0===o||o.delete(a),this.blockUtils.updateDataIntoRowNode(l,t),this.nodeMap.set({id:l.id,node:l,index:e}),l;var c=this.nodeMap.getBy("id",a);if(c){this.nodeMap.delete(c);s=c.node;var u=c.index;return this.blockUtils.updateDataIntoRowNode(s,t),this.nodeMap.set({id:s.id,node:s,index:e}),this.nodesToRefresh.delete(s),this.rowLoader.getBlockStartIndexForIndex(u)===this.rowLoader.getBlockStartIndexForIndex(e)?s:(this.markBlockForVerify(u),s)}}var d=this.blockUtils.createRowNode(this.store.getRowDetails());if(null!=t){var p=this.getPrefixedId(this.store.getIdSequence().next());this.blockUtils.setDataIntoRowNode(d,t,p,void 0),this.blockUtils.checkOpenByDefault(d),this.nodeManager.addRowNode(d)}return this.nodeMap.set({id:d.id,node:d,index:e}),i&&i(d),d},t.prototype.getBlockStates=function(){var e=this,t={},i={};
18this.nodeMap.forEach((function(n){var o,r=n.node,s=n.index,a=e.rowLoader.getBlockStartIndexForIndex(s);r.stub||r.failedLoad||(t[a]=(null!==(o=t[a])&&void 0!==o?o:0)+1);var l="loaded";r.failedLoad?l="failed":e.rowLoader.isRowLoading(a)?l="loading":(e.nodesToRefresh.has(r)||r.stub)&&(l="needsLoading"),i[a]||(i[a]=new Set),i[a].add(l)}));var n={loading:4,failed:3,needsLoading:2,loaded:1},o=this.blockUtils.createNodeIdPrefix(this.store.getParentNode()),r={};return Object.entries(i).forEach((function(i){var s,a=eA(i,2),l=a[0],c=a[1],u=tA([],eA(c),!1).sort((function(e,t){var i,o;return(null!==(i=n[e])&&void 0!==i?i:0)-(null!==(o=n[t])&&void 0!==o?o:0)})),d=u[0],p=Number(l)/e.rowLoader.getBlockSize(),h=o?"".concat(o,"-").concat(p):String(p);r[h]={blockNumber:p,startRow:Number(l),endRow:Number(l)+e.rowLoader.getBlockSize(),pageStatus:d,loadedRowCount:null!==(s=t[l])&&void 0!==s?s:0}})),r},t.prototype.destroyRowAtIndex=function(e){var t=this.nodeMap.getBy("index",e);t&&(this.nodeMap.delete(t),this.nodeDisplayIndexMap.delete(t.node.rowIndex),t.node.hasChildren()&&this.nodesToRefresh.size>0?this.removedNodeCache.set(t.node.id,t.node):this.blockUtils.destroyRowNode(t.node),this.nodesToRefresh.delete(t.node))},t.prototype.getSsrmParams=function(){return this.store.getSsrmParams()},t.prototype.getPrefixedId=function(e){return this.defaultNodeIdPrefix?this.defaultNodeIdPrefix+"-"+e:e.toString()},t.prototype.markBlockForVerify=function(e){var t=eA(this.rowLoader.getBlockBoundsForIndex(e),2),i=t[0],n=t[1],o=this.nodeMap.filter((function(e){return e.index>=i&&e.index<n}));o.forEach((function(e){var t=e.node;t.__needsRefreshWhenVisible=!0}))},t.prototype.doesNodeMatch=function(e,t){if(t.stub)return!1;if(null!=this.getRowIdFunc){var i=this.getRowId(e);return t.id===i}return t.data===e},t.prototype.purgeStubsOutsideOfViewport=function(){var e=this,t=this.api.getFirstDisplayedRow(),i=this.api.getLastDisplayedRow(),n=this.rowLoader.getBlockStartIndexForIndex(t),o=eA(this.rowLoader.getBlockBoundsForIndex(i),2);o[0];var r=o[1];
18this.nodeMap.forEach((function(t){e.rowLoader.isRowLoading(t.index)||t.node.failedLoad||t.node.stub&&(t.index<n||t.index>r)&&e.destroyRowAtIndex(t.index)}))},t.prototype.getBlocksDistanceFromRow=function(e,t){var i=this,n={};return e.forEach((function(e){var o=e.node,r=e.index,s=eA(i.rowLoader.getBlockBoundsForIndex(r),2),a=s[0],l=s[1];if(!(a in n)){var c,u=Math.abs(o.rowIndex-t),d=i.nodeMap.getBy("index",[l-1]);d&&(c=Math.abs(d.node.rowIndex-t));var p=null==c||u<c?u:c;n[a]=p}})),Object.entries(n)},t.prototype.purgeExcessRows=function(){var e,t=this;if(this.purgeStubsOutsideOfViewport(),null!=this.store.getDisplayIndexEnd()&&null!=this.storeParams.maxBlocksInCache){var i=this.api.getFirstDisplayedRow(),n=this.api.getLastDisplayedRow(),o=new Set,r=new Set;this.nodeMap.forEach((function(e){var s=e.index,a=e.node,l=t.rowLoader.getBlockStartIndexForIndex(s);o.add(l);var c=a.rowIndex>=i&&a.rowIndex<=n;c&&r.add(l)}));var s=Math.max(r.size,null!==(e=this.storeParams.maxBlocksInCache)&&void 0!==e?e:0),a=o.size,l=a-s;if(!(l<=0)){var c=Number.MAX_SAFE_INTEGER,u=Number.MIN_SAFE_INTEGER;r.forEach((function(e){c>e&&(c=e),u<e&&(u=e)}));var d=this.nodeMap.filter((function(e){var i=e.node,n=e.index,o=t.rowLoader.getBlockStartIndexForIndex(n),r=o>=c&&o<=u;return!r&&!t.isNodeCached(i)}));if(0!==d.length){var p=i+(n-i)/2,h=this.getBlocksDistanceFromRow(d,p),f=this.rowLoader.getBlockSize();h.sort((function(e,t){return Math.sign(t[1]-e[1])}));for(var g=0;g<Math.min(l,h.length);g++)for(var v=Number(h[g][0]),y=v;y<v+f;y++){var m=this.nodeMap.getBy("index",y);m&&!this.isNodeCached(m.node)&&this.destroyRowAtIndex(y)}}}}},t.prototype.isNodeFocused=function(e){var t=this.focusService.getFocusCellToUseAfterRefresh();if(!t)return!1;if(null!=t.rowPinned)return!1;var i=t.rowIndex===e.rowIndex;return i},t.prototype.isNodeCached=function(e){return e.isExpandable()&&e.expanded||this.isNodeFocused(e)},t.prototype.extractDuplicateIds=function(e){var t=this;if(null!=this.getRowIdFunc)return[];var i=new Set,n=new Set;return e.forEach((function(e){var o=t.getRowId(e);i.has(o)?n.add(o):i.add(o)})),tA([],eA(n),!1)},t.prototype.onLoadSuccess=function(e,t,i){var n=this;if(this.live){var o=i.groupLevelInfo;if(this.store.setStoreInfo(o),null!=this.getRowIdFunc){var r=this.extractDuplicateIds(i.rowData);if(r.length>0){var s=r.join(", ");return console.warn("AG Grid: Unable to display rows as duplicate row ids (".concat(s,") were returned by the getRowId callback. Please modify the getRowId callback to provide unique ids.")),void this.onLoadFailed(e,t)}}i.pivotResultFields&&this.serverSideRowModel.generateSecondaryColumns(i.pivotResultFields);var a=this.nodesToRefresh.size>0;i.rowData.forEach((function(t,i){var o,r=e+i,s=n.nodeMap.getBy("index",r);if(!(null===(o=null===s||void 0===s?void 0:s.node)||void 0===o?void 0:o.stub))return s&&n.doesNodeMatch(t,s.node)?(n.blockUtils.updateDataIntoRowNode(s.node,t),n.nodesToRefresh.delete(s.node),void(s.node.__needsRefreshWhenVisible=!1)):void n.createRowAtIndex(r,t);
18n.createRowAtIndex(r,t)}));var l=0===this.nodesToRefresh.size;if(a&&l&&this.fireRefreshFinishedEvent(),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){var c=e+i.rowData.length+1;c>this.numberOfRows&&(this.numberOfRows=c)}if(this.isLastRowKnown){var u=this.nodeMap.filter((function(e){return e.index>=n.numberOfRows}));u.forEach((function(e){return n.destroyRowAtIndex(e.index)}))}this.fireStoreUpdatedEvent()}},t.prototype.fireRefreshFinishedEvent=function(){var e=this,t=0===this.nodesToRefresh.size;t&&(this.removedNodeCache.forEach((function(t){e.blockUtils.destroyRowNode(t)})),this.removedNodeCache=new Map,this.store.fireRefreshFinishedEvent())},t.prototype.isLastRowIndexKnown=function(){return this.isLastRowKnown},t.prototype.onLoadFailed=function(e,t){var i;if(this.live){for(var n=this.nodesToRefresh.size>0,o=e;o<e+t&&o<this.getRowCount();o++){var r=(null!==(i=this.nodeMap.getBy("index",o))&&void 0!==i?i:{}).node;r&&this.nodesToRefresh.delete(r),r&&r.stub||(r&&!r.stub&&this.destroyRowAtIndex(o),r=this.createRowAtIndex(o)),r.__needsRefreshWhenVisible=!1,r.failedLoad=!0}var s=0===this.nodesToRefresh.size;n&&s&&this.fireRefreshFinishedEvent(),this.fireStoreUpdatedEvent()}},t.prototype.markNodesForRefresh=function(){var e=this;
18this.nodeMap.forEach((function(t){t.node.stub&&!t.node.failedLoad||e.nodesToRefresh.add(t.node)})),this.rowLoader.queueLoadCheck(),this.isLastRowKnown&&0===this.numberOfRows&&(this.numberOfRows=1,this.isLastRowKnown=!1,this.fireStoreUpdatedEvent())},t.prototype.isNodeInCache=function(e){return!!this.nodeMap.getBy("id",e)},t.prototype.fireStoreUpdatedEvent=function(){this.live&&this.store.fireStoreUpdatedEvent()},t.prototype.getRowId=function(e){if(null==this.getRowIdFunc)return null;var t=this.store.getRowDetails().level,i=this.store.getParentNode().getGroupKeys(),n=this.getRowIdFunc({data:e,parentKeys:i.length>0?i:void 0,level:t});return String(n)},t.prototype.updateRowNodes=function(e){var t=this;if(null==this.getRowIdFunc)throw new Error("AG Grid: Transactions can only be applied when row ids are supplied.");var i=[];return e.forEach((function(e){var n=t.getRowId(e),o=t.nodeMap.getBy("id",n);o&&(t.blockUtils.updateDataIntoRowNode(o.node,e),i.push(o.node))})),i},t.prototype.insertRowNodes=function(e,t){var i=this,n=this.store.getRowCount()-(this.store.getParentNode().sibling?1:0),o=null==t&&this.isLastRowKnown?n:t;if(null==o||n<o)return[];if(null==this.getRowIdFunc)throw new Error("AG Grid: Transactions can only be applied when row ids are supplied.");var r={};e.forEach((function(e){var t=i.getRowId(e);t&&i.isNodeInCache(t)||(r[t]=e)}));var s=Object.values(r),a=s.length;if(0===a)return[];var l=this.nodeMap.filter((function(e){return e.index>=o}));return l.forEach((function(e){return i.nodeMap.delete(e)})),l.forEach((function(e){i.nodeMap.set({node:e.node,index:e.index+a,id:e.id})})),this.numberOfRows+=a,s.map((function(e,t){return i.createRowAtIndex(o+t,e)}))},t.prototype.getOrderedNodeMap=function(){var e={};
18return this.nodeMap.forEach((function(t){return e[t.index]=t})),e},t.prototype.clearDisplayIndexes=function(){this.nodeDisplayIndexMap.clear()},t.prototype.removeRowNodes=function(e){if(null==this.getRowIdFunc)throw new Error("AG Grid: Transactions can only be applied when row ids are supplied.");var t=[],i=[],n=0,o=tA([],eA(e),!1),r=this.getOrderedNodeMap(),s=-1,a=function(e){s+=1;var a=r[e],c=o.findIndex((function(e){return e===a.id}));if(-1!==c)return o.splice(c,1),l.destroyRowAtIndex(Number(e)),t.push(a.node),n+=1,"continue";if(0===n)return"continue";var u=Number(e);s!==u&&i.push(a.node),l.nodeMap.delete(r[e]),l.nodeMap.set({id:a.id,node:a.node,index:u-n})},l=this;for(var c in r)a(c);return this.numberOfRows-=this.isLastRowIndexKnown()?e.length:n,o.length>0&&i.length>0&&(i.forEach((function(e){return e.__needsRefreshWhenVisible=!0})),this.rowLoader.queueLoadCheck()),t},QR([(0,n.fsG)("gridApi")],t.prototype,"api",void 0),QR([(0,n.fsG)("ssrmBlockUtils")],t.prototype,"blockUtils",void 0),QR([(0,n.fsG)("focusService")],t.prototype,"focusService",void 0),QR([(0,n.fsG)("ssrmNodeManager")],t.prototype,"nodeManager",void 0),QR([(0,n.fsG)("rowModel")],t.prototype,"serverSideRowModel",void 0),QR([n.NqP],t.prototype,"init",null),QR([n.FXL],t.prototype,"destroyRowNodes",null),t}(n.AS9),nA=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),oA=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},rA=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},sA=function(e,t,i){if(i||2===arguments.length)for(var n,o=0,r=t.length;o<r;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},aA=function(e){function t(t,i,o){var r=e.call(this)||this;return r.idSequence=new n.at1,r.ssrmParams=t,r.parentRowNode=o,r.storeParams=i,r.level=o.level+1,r.group=!!t.rowGroupCols&&r.level<t.rowGroupCols.length,r.leafGroup=!!t.rowGroupCols&&r.level===t.rowGroupCols.length-1,r.info={},r}return nA(t,e),t.prototype.init=function(){var e,t=1;0===this.level&&(t=null!==(e=this.storeUtils.getServerSideInitialRowCount())&&void 0!==e?e:1,this.eventService.dispatchEventOnce({type:n.zW2.EVENT_ROW_COUNT_READY})),this.cache=this.createManagedBean(new iA(this,t,this.storeParams));var i=this.gridOptionsService.get("treeData");if(!i&&this.group){var o=this.ssrmParams.rowGroupCols[this.level];this.groupField=o.field,this.rowGroupColumn=this.columnModel.getRowGroupColumns()[this.level]}},t.prototype.destroyRowNodes=function(){this.displayIndexStart=void 0,this.displayIndexEnd=void 0,this.destroyBean(this.cache)},t.prototype.applyRowData=function(e,t,i){this.cache.onLoadSuccess(t,i,e)},t.prototype.applyTransaction=function(e){var t,i,o,r=this,s=this.gridOptionsService.getCallback("getRowId");if(!s)return console.warn("AG Grid: getRowId callback must be implemented for transactions to work. Transaction was ignored."),{status:n.Qk6.Cancelled};var a=this.gridOptionsService.getCallback("isApplyServerSideTransaction");if(a){var l={transaction:e,parentNode:this.parentRowNode,groupLevelInfo:this.info},c=a(l);if(!c)return{status:n.Qk6.Cancelled}}var u=void 0;(null===(t=e.update)||void 0===t?void 0:t.length)&&(u=this.cache.updateRowNodes(e.update));var d=void 0;if(null===(i=e.add)||void 0===i?void 0:i.length){var p=e.addIndex;null!=p&&p<0&&(p=void 0),d=this.cache.insertRowNodes(e.add,p)}var h=void 0;if(null===(o=e.remove)||void 0===o?void 0:o.length){var f=e.remove.map((function(e){return s({level:r.level,parentKeys:r.parentRowNode.getGroupKeys(),data:e})})),g=sA([],rA(new Set(f)),!1);h=this.cache.removeRowNodes(g)}return this.updateSelectionAfterTransaction(u,h),{status:n.Qk6.Applied,update:u,add:d,remove:h}},t.prototype.updateSelectionAfterTransaction=function(e,t){var i=[];null===e||void 0===e||e.forEach((function(e){e.isSelected()&&!e.selectable&&i.push(e)})),null===t||void 0===t||t.forEach((function(e){e.isSelected()&&i.push(e)})),i.length&&this.selectionService.setNodesSelected({newValue:!1,clearSelection:!1,nodes:i,source:"rowDataChanged"})},t.prototype.clearDisplayIndexes=function(){var e=this;this.displayIndexStart=void 0,this.displayIndexEnd=void 0,this.cache.getNodes().forEac
18h((function(t){return e.blockUtils.clearDisplayIndex(t.node)})),this.parentRowNode.sibling&&this.blockUtils.clearDisplayIndex(this.parentRowNode.sibling),this.cache.clearDisplayIndexes()},t.prototype.getDisplayIndexStart=function(){return this.displayIndexStart},t.prototype.getDisplayIndexEnd=function(){return this.displayIndexEnd},t.prototype.getRowCount=function(){return this.parentRowNode.sibling?this.cache.getRowCount()+1:this.cache.getRowCount()},t.prototype.setRowCount=function(e,t){this.cache.setRowCount(e,t)},t.prototype.isDisplayIndexInStore=function(e){return 0!==this.cache.getRowCount()&&(this.displayIndexStart<=e&&e<this.getDisplayIndexEnd())},t.prototype.setDisplayIndexes=function(e,t){this.displayIndexStart=e.peek(),this.topPx=t.value,this.cache.setDisplayIndexes(e,t),this.parentRowNode.sibling&&this.blockUtils.setDisplayIndex(this.parentRowNode.sibling,e,t),this.displayIndexEnd=e.peek(),this.heightPx=t.value-this.topPx},t.prototype.forEachStoreDeep=function(e,t){void 0===t&&(t=new n.at1),e(this,t.next()),this.cache.getNodes().forEach((function(i){var n=i.node.childStore;n&&n.forEachStoreDeep(e,t)}))},t.prototype.forEachNodeDeep=function(e,t){void 0===t&&(t=new n.at1),this.cache.getNodes().forEach((function(i){e(i.node,t.next());var n=i.node.childStore;n&&n.forEachNodeDeep(e,t)}))},t.prototype.forEachNodeDeepAfterFilterAndSort=function(e,t,i){void 0===t&&(t=new n.at1),void 0===i&&(i=!1);var o=this.cache.getOrderedNodeMap();for(var r in o){var s=o[r];e(s.node,t.next());var a=s.node.childStore;a&&a.forEachNodeDeepAfterFilterAndSort(e,t,i)}i&&this.parentRowNode.sibling&&e(this.parentRowNode.sibling,t.next())},t.prototype.retryLoads=function(){this.cache.getNodes().forEach((function(e){var t=e.node;t.failedLoad&&(t.failedLoad=!1,t.__needsRefreshWhenVisible=!0,t.stub=!0)})),this.forEachChildStoreShallow((function(e){return e.retryLoads()})),this.fireStoreUpdatedEvent()},t.prototype.getRowUsingDisplayIndex=function(e){return this.parentRowNode.sibling&&e===this.parentRowNode.sibling.rowIndex?this.parentRowNode.sibling:this.cache.getRowByDisplayIndex(e)},t.prototype.getRowBounds=function(e){var t;if(!this.isDisplayIndexInStore(e))return null;var i=this.cache.getNodeCachedByDisplayIndex(e);if(i){var n=this.blockUtils.extractRowBounds(i,e);if(n)return n}var o=null!==(t=this.cache.getSurroundingNodesByDisplayIndex(e))&&void 0!==t?t:{},r=o.previousNode,s=o.nextNode;if(r){n=this.blockUtils.extractRowBounds(r.node,e);if(null!=n)return n}var a=this.gridOptionsService.getRowHeightAsNumber();if(s){var l=(s.node.rowIndex-e)*a;return{rowTop:s.node.rowTop-l,rowHeight:a}}var c=this.topPx+this.heightPx,u=(this.getDisplayIndexEnd()-e)*a;return{rowTop:c-u,rowHeight:a}},t.prototype.isPixelInRange=function(e){return e>=this.topPx&&e<this.topPx+this.heightPx},t.prototype.getRowIndexAtPixel=function(e){if(e<this.topPx)return this.getDisplayIndexStart();if(e>=this.topPx+this.heightPx)return this.getDisplayIndexEnd()-1;var t=Number.MAX_SAFE_INTEGER,i=null,n=Number.MAX_SAFE_INTEGER,o=null;if(this.cache.getNodes().forEach((function(r){var s=r.node,a=Math.abs(e-s.rowTop);s.rowTop<e?a<t&&(t=a,i=s):a<n&&(n=a,o=s)})),i){var r=this.blockUtils.getIndexAtPixel(i,e);if(null!=r)return r}var s=this.gridOptionsService.getRowHeightAsNumber();if(o){var a=o.rowTop,l=Math.ceil((a-e)/s);return o.rowIndex-l}var c=this.topPx+this.heightPx,u=Math.floor((c-e)/s);return this.getDisplayIndexEnd()-u},t.prototype.getChildStore=function(e){var t=this;return this.storeUtils.getChildStore(e,this,(function(e){var i=t.cache.getNodes().find((function(t){return t.node.key==e}));return i?i.node:null}))},t.prototype.forEachChildStoreShallow=function(e){this.cache.getNodes().forEach((function(t){var i=t.node;i.childStore&&e(i.childStore)}))},t.prototype.refreshAfterSort=function(e){var t=this.storeUtils.isServerSideSortAllLevels();if(t||this.storeUtils.isServerRefreshNeeded(this.parentRowNode,this.ssrmParams.rowGroupCols,e)){var i=this.cache.getRowCount();return this.destroyBean(this.cache),this.cache=this.createManagedBean(new iA(this,i,this.storeParams)),void this.fireStoreUpdatedEvent()}this.forEachChildStoreShallow((function(t){return t.refreshAfterSort(e)}))},t.prototype.refreshAfterFilter=function(e){var t=!this.storeUtils.isServerSideOnlyRefreshFilteredGroups();t||this.storeUtils.isServerRefreshNeeded(this.parentRowNode,this.ssrmParams.rowGroupCols,e)?this.refreshStore(!0):this.forEachChildStoreShallow((function(t){return t.refreshAfterFilter(e)}))},t.prototype.refreshStore=function(e){if(e)return this.destroyBean(this.cache),this.cache=this.createManagedBean(new iA(this,1,this.storeParams)),void this.fireStoreUpdatedEvent();this.cache.markNodesForRefresh()},t.prototype.getTopLevelRowDisplayedIndex=function(e){var t=this.cache.getDisplayIndexFromStoreIndex(e);return null!==t&&void 0!==t?t:e},t.prototype.isLastRowIndexKnown=function(){return this.cache.isLastRowIndexKnown()},t.prototype.getRowNodesInRange=function(e,t){return n._.missing(e),this.cache.getNodes().filter((function(i){var n=i.node;return n.rowIndex>=e.rowIndex&&n.rowIndex<=t.rowIndex})).map((function(e){var t=e.node;return t}))},t.prototype.addStoreStates=function(e){e.push({suppressInfiniteScroll:!1,route:this.parentRowNode.getGroupKeys(),rowCount:this.getRowCount(),lastRowIndexKnown:this.isLastRowIndexKnown(),info:this.info,maxBlocksInCache:this.storeParams.maxBlocksInCache,cacheBlockSize:this.storeParams.cacheBlockSize}),this.forEachChildStoreShallow((function(t){return t.addStoreStates(e)}))},t.prototype.getIdSequence=function(){return this.idSequence},t.prototype.getParentNode=function(){return this.parentRowNode}
18,t.prototype.getRowDetails=function(){return{field:this.groupField,group:this.group,leafGroup:this.leafGroup,level:this.level,parent:this.parentRowNode,rowGroupColumn:this.rowGroupColumn}},t.prototype.getSsrmParams=function(){return this.ssrmParams},t.prototype.setStoreInfo=function(e){e&&Object.assign(this.info,e)},t.prototype.fireStoreUpdatedEvent=function(){var e={type:n.zW2.EVENT_STORE_UPDATED};this.eventService.dispatchEvent(e)},t.prototype.fireRefreshFinishedEvent=function(){var e={type:n.zW2.EVENT_STORE_REFRESHED,route:this.parentRowNode.getRoute()};this.eventService.dispatchEvent(e)},t.prototype.getBlockStates=function(){return this.cache.getBlockStates()},t.prototype.getStoreBounds=function(){return{topPx:this.topPx,heightPx:this.heightPx}},oA([(0,n.fsG)("ssrmBlockUtils")],t.prototype,"blockUtils",void 0),oA([(0,n.fsG)("ssrmStoreUtils")],t.prototype,"storeUtils",void 0),oA([(0,n.fsG)("columnModel")],t.prototype,"columnModel",void 0),oA([(0,n.fsG)("selectionService")],t.prototype,"selectionService",void 0),oA([n.NqP],t.prototype,"init",null),oA([n.FXL],t.prototype,"destroyRowNodes",null),t}(n.AS9),lA=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),cA=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},uA=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},dA=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onRowHeightChanged_debounced=n._.debounce(t.onRowHeightChanged.bind(t),100),t.pauseStoreUpdateListening=!1,t.started=!1,t.managingPivotResultColumns=!1,t}return lA(t,e),t.prototype.ensureRowHeightsValid=function(){return!1},t.prototype.start=function(){this.started=!0,this.updateDatasource()},t.prototype.destroyDatasource=function(){this.datasource&&(this.datasource.destroy&&this.datasource.destroy(),this.rowRenderer.datasourceChanged(),this.datasource=void 0)},t.prototype.addEventListeners=function(){var e=this;this.addManagedListener(this.eventService,n.zW2.EVENT_NEW_COLUMNS_LOADED,this.onColumnEverything.bind(this)),this.addManagedListener(this.eventService,n.zW2.EVENT_STORE_UPDATED,this.onStoreUpdated.bind(this));var t=this.resetRootStore.bind(this);this.addManagedListener(this.eventService,n.zW2.EVENT_COLUMN_VALUE_CHANGED,t),this.addManagedListener(this.eventService,n.zW2.EVENT_COLUMN_PIVOT_CHANGED,t),this.addManagedListener(this.eventService,n.zW2.EVENT_COLUMN_ROW_GROUP_CHANGED,t),this.addManagedListener(this.eventService,n.zW2.EVENT_COLUMN_PIVOT_MODE_CHANGED,t),this.addManagedPropertyListeners(["masterDetail","treeData","removePivotHeaderRowWhenSingleValueColumn","suppressServerSideInfiniteScroll","cacheBlockSize"],t),this.addManagedPropertyListener("rowHeight",(function(){return e.resetRowHeights()})),this.verifyProps(),this.addManagedPropertyListener("serverSideDatasource",(function(){return e.updateDatasource()}))},t.prototype.updateDatasource=function(){var e=this.gridOptionsService.get("serverSideDatasource");e&&this.setDatasource(e)},t.prototype.verifyProps=function(){this.gridOptionsService.exists("initialGroupOrderComparator")&&n._.warnOnce("initialGroupOrderComparator cannot be used with Server Side Row Model."),this.gridOptionsService.isRowSelection()&&
18!this.gridOptionsService.exists("getRowId")&&n._.warnOnce("getRowId callback must be provided for Server Side Row Model selection to work correctly.")},t.prototype.setDatasource=function(e){this.started&&(this.destroyDatasource(),this.datasource=e,this.resetRootStore())},t.prototype.applyRowData=function(e,t,i){var n=this.getRootStore();if(n){var o=n.getChildStore(i);o&&(o instanceof aA?o.applyRowData(e,t,e.rowData.length):o instanceof KR&&o.processServerResult(e))}},t.prototype.isLastRowIndexKnown=function(){var e=this.getRootStore();return!!e&&e.isLastRowIndexKnown()},t.prototype.onColumnEverything=function(){if(this.storeParams){var e=this.columnsToValueObjects(this.columnModel.getRowGroupColumns()),t=this.columnsToValueObjects(this.columnModel.getValueColumns()),i=this.columnsToValueObjects(this.columnModel.getPivotColumns()),o=function(e){var t={};e.oldCols.forEach((function(e){return t[e.id]=e}));var i=e.newCols.every((function(e){var i=t[e.id];return i&&delete t[e.id],i&&i.field===e.field&&i.aggFunc===e.aggFunc})),n=!e.allowRemovedColumns&&!!Object.values(t).length;return i&&!n},r=!n._.jsonEquals(this.storeParams.sortModel,this.sortController.getSortModel()),s=!o({oldCols:this.storeParams.rowGroupCols,newCols:e}),a=!o({oldCols:this.storeParams.pivotCols,newCols:i}),l=!!(null===e||void 0===e?void 0:e.length)&&!o({oldCols:this.storeParams.valueCols,newCols:t,allowRemovedColumns:!0}),c=r||s||a||l;if(c)this.resetRootStore();else{var u=this.createStoreParams();this.storeParams.rowGroupCols=u.rowGroupCols,this.storeParams.pivotCols=u.pivotCols,this.storeParams.valueCols=u.valueCols}}else this.resetRootStore()},t.prototype.destroyRootStore=function(){this.rootNode&&this.rootNode.childStore&&(this.rootNode.childStore=this.destroyBean(this.rootNode.childStore),this.nodeManager.clear())},t.prototype.refreshAfterSort=function(e,t){this.storeParams&&(this.storeParams.sortModel=e);var i=this.getRootStore();i&&(i.refreshAfterSort(t),this.onStoreUpdated())},t.prototype.generateSecondaryColumns=function(e){var t=this.pivotColDefService.createColDefsFromFields(e);this.managingPivotResultColumns=!0,this.columnModel.setSecondaryColumns(t,"rowModelUpdated")},t.prototype.resetRowHeights=function(){var e=this.resetRowHeightsForAllRowNodes(),t=this.gridOptionsService.getRowHeightForNode(this.rootNode);if(this.rootNode.setRowHeight(t.height,t.estimated),this.rootNode.sibling){var i=this.gridOptionsService.getRowHeightForNode(this.rootNode.sibling);this.rootNode.sibling.setRowHeight(i.height,i.estimated)}e&&this.onRowHeightChanged()},t.prototype.resetRowHeightsForAllRowNodes=function(){var e=this,t=!1;return this.forEachNode((function(i){var n=e.gridOptionsService.getRowHeightForNode(i);i.setRowHeight(n.height,n.estimated);var o=i.detailNode;if(o){var r=e.gridOptionsService.getRowHeightForNode(o);o.setRowHeight(r.height,r.estimated)}if(i.sibling){var s=e.gridOptionsService.getRowHeightForNode(i.sibling);o.setRowHeight(s.height,s.estimated)}t=!0})),t},t.prototype.resetRootStore=function(){this.destroyRootStore(),this.rootNode=new n.Fxk(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.columnModel.setSecondaryColumns(null),this.managingPivotResultColumns=!1),this.dispatchModelUpdated(!0)},t.prototype.columnsToValueObjects=function(e){var t=this;return e.map((function(e){return{id:e.getId(),aggFunc:e.getAggFunc(),displayName:t.columnModel.getDisplayNameForColumn(e,"model"),field:e.getColDef().field}}))},t.prototype.createStoreParams=function(){var e=this.columnsToValueObjects(this.columnModel.getRowGroupColumns()),t=this.columnsToValueObjects(this.columnModel.getValueColumns()),i=this.columnsToValueObjects(this.columnModel.getPivotColumns()),o=this.gridOptionsService.isGetRowHeightFunction(),r={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 n.at1,dynamicRowHeight:o};return r},t.prototype.getParams=function(){return this.storeParams},t.prototype.dispatchModelUpdated=function(e){void 0===e&&(e=!1);var t={type:n.zW2.EVENT_MODEL_UPDATED,animate:!e,keepRenderedRows:!e,newPage:!1,newData:!1};this.eventService.dispatchEvent(t)},t.prototype.onStoreUpdated=function(){this.pauseStoreUpdateListening||(this.updateRowIndexesAndBounds(),this.dispatchModelUpdated())},t.prototype.onRowHeightChangedDebounced=function(){this.onRowHeightChanged_debounced()},t.prototype.onRowHeightChanged=function(){this.updateRowIndexesAndBounds(),this.dispatchModelUpdated()},t.prototype.updateRowIndexesAndBounds=function(){var e=this.getRootStore();e&&e.setDisplayIndexes(new n.at1,{value:0})},t.prototype.retryLoads=function(){var e=this.getRootStore();e&&(e.retryLoads(),this.onStoreUpdated())},t.prototype.getRow=function(e){var t=this.getRootStore();if(t)return t.getRowUsingDisplayIndex(e)},t.prototype.expandAll=function(e){this.pauseStoreUpdateListening=!0,this.forEachNode((function(t){t.stub||t.hasChildren()&&t.setExpanded(e)})),this.pauseStoreUpdateListening=!1,this.onStoreUpdated()},t.prototype.refreshAfterFilter=function(e,t){this.storeParams&&(this.storeParams.filterModel=e);var i=this.getRootStore();i&&(i.refreshAfterFilter(t),this.onStoreUpdated())},t.prototype.getRootStore=function(){if(this.rootNode&&this.rootNode.childStore)return this.rootNode.childStore},t.prototype.getRowCount=function(){var e=this.getRootStore();return e?e.getDisplayIndexEnd():0},t.prototype.getTopLevelRowCount=function(){var e=this.getRootStore();return e?e.getRowCount():1},t.prototype.getTopLevelRowDisplayedIndex=function(e){var t=this.getRootStore();return t?t.getTopLevelRowDisplayedIndex(e):e},t.prototype.getRowBounds=function(e){var t=this.getRootStore();if(!t){var i=this.gridOptionsService.getRowHeightAsNumber();return{rowTop:0,rowHeight:i}}return t.getRowBounds(e)},t.prototype.getBlockStates=function(){var e=this.getRootStore();if(e){var t={};return e.forEachStoreDeep((function(e){if(e instanceof KR){var i=e.getBlockStateJson(),n=i.id,o=i.state;t[n]=o}else{if(!(e instanceof aA))throw new Error("AG Grid: Unsupported store type");
18Object.entries(e.getBlockStates()).forEach((function(e){var i=uA(e,2),n=i[0],o=i[1];t[n]=o}))}})),t}},t.prototype.getRowIndexAtPixel=function(e){var t=this.getRootStore();return e<=0||!t?0:t.getRowIndexAtPixel(e)},t.prototype.isEmpty=function(){return!1},t.prototype.isRowsToRender=function(){return null!=this.getRootStore()&&this.getRowCount()>0},t.prototype.getType=function(){return"serverSide"},t.prototype.forEachNode=function(e){var t=this.getRootStore();t&&t.forEachNodeDeep(e)},t.prototype.forEachNodeAfterFilterAndSort=function(e,t){void 0===t&&(t=!1);var i=this.getRootStore();i&&i.forEachNodeDeepAfterFilterAndSort(e,void 0,t)},t.prototype.executeOnStore=function(e,t){if(!this.started)return!1;var i=this.getRootStore();if(!i)return!0;var n=i.getChildStore(e);return n&&t(n),!0},t.prototype.refreshStore=function(e){void 0===e&&(e={});var t=e.route?e.route:[];this.executeOnStore(t,(function(t){return t.refreshStore(1==e.purge)}))},t.prototype.getStoreState=function(){var e=[],t=this.getRootStore();return t&&t.addStoreStates(e),e},t.prototype.getNodesInRangeForSelection=function(e,t){if(!n._.exists(e))return[];if(!t)return[e];var i=e.rowIndex,o=t.rowIndex;if(null===i||null===o)return[e];var r=[],s=uA([i,o].sort((function(e,t){return e-t})),2),a=s[0],l=s[1];return this.forEachNode((function(e){var t=e.rowIndex;null==t||e.stub||t>=a&&t<=l&&r.push(e)})),r.length!==l-a+1?[e]:r},t.prototype.getRowNode=function(e){var t;return this.forEachNode((function(i){i.id===e&&(t=i),i.detailNode&&i.detailNode.id===e&&(t=i.detailNode)})),t},t.prototype.isRowPresent=function(e){var t=this.getRowNode(e.id);return!!t},t.prototype.setRowCount=function(e,t){var i=this.getRootStore();if(i){if(i instanceof aA)return void i.setRowCount(e,t);console.error("AG Grid: Infinite scrolling must be enabled in order to set the row count.")}},cA([(0,n.fsG)("columnModel")],t.prototype,"columnModel",void 0),cA([(0,n.fsG)("filterManager")],t.prototype,"filterManager",void 0),cA([(0,n.fsG)("sortController")],t.prototype,"sortController",void 0),cA([(0,n.fsG)("rowRenderer")],t.prototype,"rowRenderer",void 0),cA([(0,n.fsG)("ssrmSortService")],t.prototype,"sortListener",void 0),cA([(0,n.fsG)("ssrmNodeManager")],t.prototype,"nodeManager",void 0),cA([(0,n.fsG)("ssrmStoreFactory")],t.prototype,"storeFactory",void 0),cA([(0,n.fsG)("beans")],t.prototype,"beans",void 0),cA([(0,n.FiY)("pivotColDefService")],t.prototype,"pivotColDefService",void 0),cA([n.FXL],t.prototype,"destroyDatasource",null),cA([n.NqP],t.prototype,"addEventListeners",null),cA([n.FXL],t.prototype,"destroyRootStore",null),t=cA([(0,n.Vu6)("rowModel")],t),t}(n.AS9),pA=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),hA=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},fA=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return pA(t,e),t.prototype.loadFromDatasource=function(e){var t=e.storeParams,i=e.parentBlock,n=e.parentNode,o=n.getGroupKeys();if(t.datasource){var r={startRow:e.startRow,endRow:e.endRow,rowGroupCols:t.rowGroupCols,valueCols:t.valueCols,pivotCols:t.pivotCols,pivotMode:t.pivotMode,groupKeys:o,filterModel:t.filterModel,sortModel:t.sortModel},s={success:e.success,fail:e.fail,request:r,parentNode:e.parentNode,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context};window.setTimeout((function(){t.datasource&&i.isAlive()?t.datasource.getRows(s):e.fail()}),0)}},t.prototype.getChildStore=function(e,t,i){if(n._.missingOrEmpty(e))return t;var o=e[0],r=i(o);if(r){if(1===e.length&&!r.childStore){var s=this.serverSideRowModel.getParams();r.childStore=this.createBean(this.storeFactory.createStore(s,r))}var a=e.slice(1,e.length),l=r.childStore;
18return l?l.getChildStore(a):null}return null},t.prototype.isServerRefreshNeeded=function(e,t,i){if(i.valueColChanged||i.secondaryColChanged)return!0;var n=e.level+1,o=n<t.length,r=!o;if(r)return!0;var s=t[n].id,a=i.changedColumns.indexOf(s)>-1;if(a)return!0;var l=this.columnModel.getAllGridColumns(),c=l.filter((function(e){return e.getColDef().showRowGroup&&i.changedColumns.includes(e.getId())})).map((function(e){return e.getColDef().showRowGroup})).some((function(e){return!0===e||e===s}));return c},t.prototype.getServerSideInitialRowCount=function(){return this.gridOptionsService.get("serverSideInitialRowCount")},t.prototype.assertRowModelIsServerSide=function(e){return!!this.gridOptionsService.isRowModelType("serverSide")||(n._.warnOnce("The '".concat(e,"' property can only be used with the Server Side Row Model.")),!1)},t.prototype.assertNotTreeData=function(e){return!this.gridOptionsService.get("treeData")||(n._.warnOnce("The '".concat(e,"' property cannot be used while using tree data.")),!1)},t.prototype.isServerSideSortAllLevels=function(){return this.gridOptionsService.get("serverSideSortAllLevels")&&this.assertRowModelIsServerSide("serverSideSortAllLevels")},t.prototype.isServerSideOnlyRefreshFilteredGroups=function(){return this.gridOptionsService.get("serverSideOnlyRefreshFilteredGroups")&&this.assertRowModelIsServerSide("serverSideOnlyRefreshFilteredGroups")},t.prototype.isServerSideSortOnServer=function(){return this.gridOptionsService.get("serverSideSortOnServer")&&this.assertRowModelIsServerSide("serverSideSortOnServer")&&this.assertNotTreeData("serverSideSortOnServer")},t.prototype.isServerSideFilterOnServer=function(){return this.gridOptionsService.get("serverSideFilterOnServer")&&this.assertRowModelIsServerSide("serverSideFilterOnServer")&&this.assertNotTreeData("serverSideFilterOnServer")},hA([(0,n.fsG)("columnModel")],t.prototype,"columnModel",void 0),hA([(0,n.fsG)("rowModel")],t.prototype,"serverSideRowModel",void 0),hA([(0,n.fsG)("ssrmStoreFactory")],t.prototype,"storeFactory",void 0),t=hA([(0,n.Vu6)("ssrmStoreUtils")],t),t}(n.AS9),gA=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),vA=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},yA="ag-Grid-MissingKey",mA=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return gA(t,e),t.prototype.createRowNode=function(e){var t=new n.Fxk(this.beans),i=null!=e.rowHeight?e.rowHeight:this.gridOptionsService.getRowHeightAsNumber();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},t.prototype.destroyRowNodes=function(e){var t=this;e&&e.forEach((function(e){return t.destroyRowNode(e)}))},t.prototype.destroyRowNode=function(e,t){void 0===t&&(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)},t.prototype.setTreeGroupInfo=function(e){e.updateHasChildren();var t=this.gridOptionsService.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)},t.prototype.setRowGroupInfo=function(e){e.key=this.valueService.getValue(e.rowGroupColumn,e),null!==e.key&&void 0!==e.ke
18y||n._.doOnce((function(){console.warn("AG Grid: null and undefined values are not allowed for server side row model keys"),e.rowGroupColumn&&console.warn("column = ".concat(e.rowGroupColumn.getId())),console.warn("data is ",e.data)}),"ServerSideBlock-CannotHaveNullOrUndefinedForKey");var t=this.beans.gridOptionsService.getGroupIncludeFooter(),i=t({node:e});i&&(e.createFooter(),e.sibling&&(e.sibling.uiLevel=e.uiLevel+1))},t.prototype.setMasterDetailInfo=function(e){var t=this.gridOptionsService.get("isRowMaster");e.master=null==t||t(e.data)},t.prototype.updateDataIntoRowNode=function(e,t){if(e.updateData(t),this.gridOptionsService.get("treeData"))this.setTreeGroupInfo(e),this.setChildCountIntoRowNode(e);else if(e.group){if(this.setChildCountIntoRowNode(e),!e.footer){var i=this.beans.gridOptionsService.getGroupIncludeFooter(),n=i({node:e});n?e.sibling?e.sibling.updateData(t):e.createFooter():e.sibling&&e.destroyFooter()}}else this.gridOptionsService.get("masterDetail")},t.prototype.setDataIntoRowNode=function(e,t,i,o){var r;e.stub=!1;var s=this.gridOptionsService.get("treeData");n._.exists(t)?(e.setDataAndId(t,i),s?this.setTreeGroupInfo(e):e.group?this.setRowGroupInfo(e):this.gridOptionsService.get("masterDetail")&&this.setMasterDetailInfo(e)):(e.setDataAndId(void 0,void 0),e.key=null),(s||e.group)&&(this.setGroupDataIntoRowNode(e),this.setChildCountIntoRowNode(e)),n._.exists(t)&&(e.setRowHeight(this.gridOptionsService.getRowHeightForNode(e,!1,o).height),null===(r=e.sibling)||void 0===r||r.setRowHeight(this.gridOptionsService.getRowHeightForNode(e.sibling,!1,o).height))},t.prototype.setChildCountIntoRowNode=function(e){var t=this.gridOptionsService.get("getChildCount");t&&e.setAllChildrenCount(t(e.data))},t.prototype.setGroupDataIntoRowNode=function(e){var t=this,i=this.columnModel.getGroupDisplayColumns(),n=this.gridOptionsService.get("treeData");i.forEach((function(i){if(null==e.groupData&&(e.groupData={}),n)e.groupData[i.getColId()]=e.key;else if(i.isRowGroupDisplayed(e.rowGroupColumn.getId())){var o=t.valueService.getValue(e.rowGroupColumn,e);e.groupData[i.getColId()]=o}}))},t.prototype.clearDisplayIndex=function(e){e.clearRowTopAndRowIndex();var t=e.hasChildren()&&n._.exists(e.childStore);if(t){var i=e.childStore;i.clearDisplayIndexes()}var o=e.master&&e.detailNode;o&&e.detailNode.clearRowTopAndRowIndex()},t.prototype.setDisplayIndex=function(e,t,i){if(e.setRowIndex(t.next()),e.setRowTop(i.value),i.value+=e.rowHeight,!e.footer){var o=e.master;o&&(e.expanded&&e.detailNode?(e.detailNode.setRowIndex(t.next()),e.detailNode.setRowTop(i.value),i.value+=e.detailNode.rowHeight):e.detailNode&&e.detailNode.clearRowTopAndRowIndex());var r=e.hasChildren()&&n._.exists(e.childStore);if(r){var s=e.childStore;e.expanded?s.setDisplayIndexes(t,i):s.clearDisplayIndexes()}}},t.prototype.binarySearchForDisplayIndex=function(e,t){var i=0,o=t.length-1;if(n._.missing(o)||n._.missing(i))console.warn("AG Grid: error: topPointer = ".concat(o,", bottomPointer = ").concat(i));else while(1){var r=Math.floor((i+o)/2),s=t[r];
18if(s.rowIndex===e)return s;var a=s.master&&s.expanded,l=s.detailNode;if(a&&l&&l.rowIndex===e)return s.detailNode;var c=s.childStore;if(s.expanded&&c&&c.isDisplayIndexInStore(e))return c.getRowUsingDisplayIndex(e);if(s.rowIndex<e)i=r+1;else{if(!(s.rowIndex>e))return void console.warn("AG Grid: error: unable to locate rowIndex = ".concat(e," in cache"));o=r-1}}},t.prototype.extractRowBounds=function(e,t){var i=function(e){return{rowHeight:e.rowHeight,rowTop:e.rowTop}};if(e.rowIndex===t)return i(e);if(e.hasChildren()&&e.expanded&&n._.exists(e.childStore)){var o=e.childStore;if(o.isDisplayIndexInStore(t))return o.getRowBounds(t)}else if(e.master&&e.expanded&&n._.exists(e.detailNode)&&e.detailNode.rowIndex===t)return i(e.detailNode)},t.prototype.getIndexAtPixel=function(e,t){if(e.isPixelInRange(t))return e.rowIndex;var i=e.master&&e.expanded,o=e.detailNode;if(i&&o&&o.isPixelInRange(t))return e.detailNode.rowIndex;if(e.hasChildren()&&e.expanded&&n._.exists(e.childStore)){var r=e.childStore;if(r.isPixelInRange(t))return r.getRowIndexAtPixel(t)}return null},t.prototype.createNodeIdPrefix=function(e){var t=[],i=e;while(i&&i.level>=0)""===i.key?t.push(yA):t.push(i.key),i=i.parent;if(t.length>0)return t.reverse().join("-")},t.prototype.checkOpenByDefault=function(e){return this.expansionService.checkOpenByDefault(e)},vA([(0,n.fsG)("valueService")],t.prototype,"valueService",void 0),vA([(0,n.fsG)("columnModel")],t.prototype,"columnModel",void 0),vA([(0,n.fsG)("ssrmNodeManager")],t.prototype,"nodeManager",void 0),vA([(0,n.fsG)("beans")],t.prototype,"beans",void 0),vA([(0,n.fsG)("expansionService")],t.prototype,"expansionService",void 0),t=vA([(0,n.Vu6)("ssrmBlockUtils")],t),t}(n.AS9),CA=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},bA=function(){function e(){this.rowNodes={}}return e.prototype.addRowNode=function(e){var t=e.id;this.rowNodes[t]&&(console.warn("AG Grid: Duplicate node id ".concat(e.id,". Row ID's are provided via the getRowId() callback. Please modify the getRowId() callback code to provide unique row id values.")),console.warn("first instance",this.rowNodes[t].data),console.warn("second instance",e.data)),this.rowNodes[t]=e},e.prototype.removeNode=function(e){var t=e.id;this.rowNodes[t]&&(this.rowNodes[t]=void 0)},e.prototype.clear=function(){this.rowNodes={}},CA([n.FXL],e.prototype,"clear",null),e=CA([(0,n.Vu6)("ssrmNodeManager")],e),e}(),wA=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),SA=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},EA=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.asyncTransactions=[],t}return wA(t,e),t.prototype.postConstruct=function(){this.gridOptionsService.isRowModelType("serverSide")},t.prototype.applyTransactionAsync=function(e,t){null==this.asyncTransactionsTimeout&&this.scheduleExecuteAsync(),this.asyncTransactions.push({transaction:e,callback:t})},t.prototype.scheduleExecuteAsync=function(){var e=this,t=this.gridOptionsService.getAsyncTransactionWaitMillis();this.asyncTransactionsTimeout=window.setTimeout((function(){e.executeAsyncTransactions()}),t)},t.prototype.executeAsyncTransactions=function(){var e=this;if(this.asyncTransactions){var t=[],i=[],o=[],r=!1;if(this.asyncTransactions.forEach((function(s){var a,l=e.serverSideRowModel.executeOnStore(s.transaction.route,(function(e){a=e.applyTransaction(s.transaction)}));l?void 0==a&&(a={status:n.Qk6.StoreNotFound}):a={status:n.Qk6.StoreNotStarted},i.push(a);var c=a.status==n.Qk6.StoreLoading;c?o.push(s):(s.callback&&t.push((function(){return s.callback(a)})),a.status===n.Qk6.Applied&&(r=!0))})),t.length>0&&window.setTimeout((function(){t.forEach((function(e){return e()}))}),0),this.asyncTransactionsTimeout=void 0,this.asyncTransactions=o,r&&(this.valueCache.onDataChanged(),this.eventService.dispatchEvent({type:n.zW2.EVENT_STORE_UPDATED})),i.length>0){var s={type:n.zW2.EVENT_ASYNC_TRANSACTIONS_FLUSHED,results:i};this.eventService.dispatchEvent(s)}}},t.prototype.flushAsyncTransactions=function(){null!=this.asyncTransactionsTimeout&&clearTimeout(this.asyncTransactionsTimeout),this.executeAsyncTransactions()},t.prototype.applyTransaction=function(e){var t,i=this.serverSideRowModel.executeOnStore(e.route,(function(i){t=i.applyTransaction(e)}));if(i){if(t){if(this.valueCache.onDataChanged(),t.remove){var o=t.remove.map((function(e){return e.id}));this.selectionService.deleteSelectionStateFromParent(e.route||[],o)}return this.eventService.dispatchEvent({type:n.zW2.EVENT_STORE_UPDATED}),t}return{status:n.Qk6.StoreNotFound}}return{status:n.Qk6.StoreNotStarted}},SA([(0,n.fsG)("rowNodeBlockLoader")],t.prototype,"rowNodeBlockLoader",void 0),SA([(0,n.fsG)("valueCache")],t.prototype,"valueCache",void 0),SA([(0,n.fsG)("rowModel")],t.prototype,"serverSideRowModel",void 0),SA([(0,n.fsG)("rowRenderer")],t.prototype,"rowRenderer",void 0),SA([(0,n.fsG)("selectionService")],t.prototype,"selectionService",void 0),SA([n.NqP],t.prototype,"postConstruct",null),t=SA([(0,n.Vu6)("ssrmTransactionManager")],t),t}
18(n.AS9),xA=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),OA=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},TA=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return xA(t,e),t.prototype.postConstruct=function(){this.gridOptionsService.isRowModelType("serverSide")&&this.addManagedListener(this.eventService,n.zW2.EVENT_ROW_GROUP_OPENED,this.onRowGroupOpened.bind(this))},t.prototype.onRowGroupOpened=function(e){var t=e.node;if(t.expanded){if(t.master)this.createDetailNode(t);else if(n._.missing(t.childStore)){var i=this.serverSideRowModel.getParams();t.childStore=this.createBean(this.storeFactory.createStore(i,t))}}else this.gridOptionsService.get("purgeClosedRowNodes")&&n._.exists(t.childStore)&&(t.childStore=this.destroyBean(t.childStore));var o={type:n.zW2.EVENT_STORE_UPDATED};this.eventService.dispatchEvent(o)},t.prototype.createDetailNode=function(e){if(n._.exists(e.detailNode))return e.detailNode;var t=new n.Fxk(this.beans);t.detail=!0,t.selectable=!1,t.parent=e,n._.exists(e.id)&&(t.id="detail_"+e.id),t.data=e.data,t.level=e.level+1;var i=200,o=this.gridOptionsService.getRowHeightForNode(t).height;return t.rowHeight=o||i,e.detailNode=t,t},OA([(0,n.fsG)("rowModel")],t.prototype,"serverSideRowModel",void 0),OA([(0,n.fsG)("ssrmStoreFactory")],t.prototype,"storeFactory",void 0),OA([(0,n.fsG)("beans")],t.prototype,"beans",void 0),OA([n.NqP],t.prototype,"postConstruct",null),t=OA([(0,n.Vu6)("ssrmExpandListener")],t),t}(n.AS9),DA=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),RA=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},AA=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return DA(t,e),t.prototype.postConstruct=function(){this.gridOptionsService.isRowModelType("serverSide")&&this.addManagedListener(this.eventService,n.zW2.EVENT_SORT_CHANGED,this.onSortChanged.bind(this))},t.prototype.onSortChanged=function(){var e=this.serverSideRowModel.getParams();if(e){var t=this.sortController.getSortModel(),i=e.sortModel,n=this.findChangedColumnsInSort(t,i),o=this.listenerUtils.isSortingWithValueColumn(n),r=this.listenerUtils.isSortingWithSecondaryColumn(n),s={valueColChanged:o,secondaryColChanged:r,changedColumns:n};this.serverSideRowModel.refreshAfterSort(t,s)}},t.prototype.findChangedColumnsInSort=function(e,t){var i=[];[e,t].forEach((function(e){if(e){var t=e.map((function(e){return e.colId}));i=i.concat(t)}}));var n=function(e,t){var i=e?e.sort:null,n=t?t.sort:null;return i!==n},o=function(i,n){var o=i?t.indexOf(i):-1,r=n?e.indexOf(n):-1;return o!==r};return i.filter((function(i){var r=t.find((function(e){return e.colId===i})),s=e.find((function(e){return e.colId===i}));return n(r,s)||o(r,s)}))},RA([(0,n.fsG)("sortController")],t.prototype,"sortController",void 0),RA([(0,n.fsG)("rowModel")],t.prototype,"serverSideRowModel",void 0),RA([(0,n.fsG)("ssrmListenerUtils")],t.prototype,"listenerUtils",void 0),RA([n.NqP],t.prototype,"postConstruct",null),t=RA([(0,n.Vu6)("ssrmSortService")],t),t}(n.AS9),_A=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),PA=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},MA=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _A(t,e),t.prototype.postConstruct=function(){var e=this;this.gridOptionsService.isRowModelType("serverSide")&&(this.addManagedListener(this.eventService,n.zW2.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,(function(){return e.onFilterChanged(!0)})),this.addManagedListener(this.eventService,n.zW2.EVENT_FILTER_CHANGED,(function(){return e.onFilterChanged()})))},t.prototype.onFilterChanged=function(e){var t=this.serverSideRowModel.getParams();if(t){var i,n,o=t.filterModel;if(this.filterManager.isAdvancedFilterEnabled()){i=this.filterManager.getAdvancedFilterModel();var r=e?Object.keys(null!==o&&void 0!==o?o:{}):this.getAdvancedFilterColumns(o),s=this.getAdvancedFilterColumns(i);r.forEach((function(e){return s.add(e)})),n=Array.from(s)}else if(i=this.filterManager.getFilterModel(),e){var a=this.getAdvancedFilterColumns(o);
18Object.keys(i).forEach((function(e){return a.add(e)})),n=Array.from(a)}else n=this.findChangedColumns(o,i);var l=this.listenerUtils.isSortingWithValueColumn(n),c=this.listenerUtils.isSortingWithSecondaryColumn(n),u={valueColChanged:l,secondaryColChanged:c,changedColumns:n};this.serverSideRowModel.refreshAfterFilter(i,u)}},t.prototype.findChangedColumns=function(e,t){var i={};Object.keys(e).forEach((function(e){return i[e]=!0})),Object.keys(t).forEach((function(e){return i[e]=!0}));var n=[];return Object.keys(i).forEach((function(i){var o=JSON.stringify(e[i]),r=JSON.stringify(t[i]),s=o!=r;s&&n.push(i)})),n},t.prototype.getAdvancedFilterColumns=function(e){var t=new Set;if(!e)return t;var i=function(e){"join"===e.filterType?e.conditions.forEach((function(e){return i(e)})):t.add(e.colId)};return i(e),t},PA([(0,n.fsG)("rowModel")],t.prototype,"serverSideRowModel",void 0),PA([(0,n.fsG)("filterManager")],t.prototype,"filterManager",void 0),PA([(0,n.fsG)("ssrmListenerUtils")],t.prototype,"listenerUtils",void 0),PA([n.NqP],t.prototype,"postConstruct",null),t=PA([(0,n.Vu6)("ssrmFilterListener")],t),t}(n.AS9),kA=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},NA=function(){function e(){}return e.prototype.createStore=function(e,t){var i=this.getStoreParams(e,t),n=i.suppressInfiniteScroll?KR:aA;return new n(e,i,t)},e.prototype.getStoreParams=function(e,t){var i=this.getLevelSpecificParams(t),n=this.isInfiniteScroll(i),o=this.getBlockSize(n,i),r=this.getMaxBlocksInCache(n,e,i),s={suppressInfiniteScroll:!n,cacheBlockSize:o,maxBlocksInCache:r};return s},e.prototype.getMaxBlocksInCache=function(e,t,i){if(e){var o=i&&null!=i.maxBlocksInCache?i.maxBlocksInCache:this.gridOptionsService.get("maxBlocksInCache"),r=null!=o&&o>=0;if(r)if(t.dynamicRowHeight){var s="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.";n._.warnOnce(s)}else{if(!this.columnModel.isAutoRowHeightActive())return o;s="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.";n._.warnOnce(s)}}},e.prototype.getBlockSize=function(e,t){if(e){var i=t&&null!=t.cacheBlockSize?t.cacheBlockSize:this.gridOptionsService.get("cacheBlockSize");return null!=i&&i>0?i:100}},e.prototype.getLevelSpecificParams=function(e){var t=this.gridOptionsService.getCallback("getServerSideGroupLevelParams");if(t){var i={level:e.level+1,parentRowNode:e.level>=0?e:void 0,rowGroupColumns:this.columnModel.getRowGroupColumns(),pivotColumns:this.columnModel.getPivotColumns(),pivotMode:this.columnModel.isPivotMode()},n=t(i);return n}},e.prototype.isInfiniteScroll=function(e){var t=e&&null!=e.suppressInfiniteScroll?e.suppressInfiniteScroll:this.isSuppressServerSideInfiniteScroll();return!t},e.prototype.isSuppressServerSideInfiniteScroll=function(){return this.gridOptionsService.get("suppressServerSideInfiniteScroll")},kA([(0,n.fsG)("gridOptionsService")],e.prototype,"gridOptionsService",void 0),kA([(0,n.fsG)("columnModel")],e.prototype,"columnModel",void 0),e=kA([(0,n.Vu6)("ssrmStoreFactory")],e),e}(),LA=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},IA=function(){function e(){}return e.prototype.isSortingWithValueColumn=function(e){for(var t=this.columnModel.getValueColumns().map((function(e){return e.getColId()})),i=0;i<e.length;i++)if(t.indexOf(e[i])>-1)return!0;return!1},e.prototype.isSortingWithSecondaryColumn=function(e){if(!this.columnModel.getSecondaryColumns())return!1;for(var t=this.columnModel.getSecondaryColumns().map((function(e){return e.getColId()})),i=0;i<e.length;i++)if(t.indexOf(e[i])>-1)return!0;return!1},LA([(0,n.fsG)("columnModel")],e.prototype,"columnModel",void 0),e=LA([(0,n.Vu6)("ssrmListenerUtils")],e),e}(),FA=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),GA=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},VA=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},BA=function(e,t,i){if(i||2===arguments.length)for(var n,o=0,r=t.length;o<r;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},jA=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.selectedState={selectAll:!1,toggledNodes:new Set},t.lastSelected=null,t.selectAllUsed=!1,t.selectedNodes={},t}return FA(t,e),t.prototype.init=function(){var e=this;this.rowSelection=this.gridOptionsService.get("rowSelection"),this.addManagedPropertyListener("rowSelection",(function(t){e.rowSelection=t.currentValue}))},t.prototype.getSelectedState=function(){return{selectAll:this.selectedState.selectAll,toggledNodes:BA([],VA(this.selectedState.toggledNodes),!1)}},t.prototype.setSelectedState=function(e){var t={selectAll:!1,toggledNodes:new Set};"object"===typeof e?"selectAll"in e&&"boolean"===typeof e.selectAll?(t.selectAll=e.selectAll,"toggledNodes"in e&&Array.isArray(e.toggledNodes)?(e.toggledNodes.forEac
18h((function(e){"string"===typeof e?t.toggledNodes.add(e):console.warn("AG Grid: Provided ids must be of string type. Invalid id provided: ".concat(e))})),this.selectedState=t):console.error("AG Grid: `toggledNodes` must be an array of string ids.")):console.error("AG Grid: Select all status should be of boolean type."):console.error("AG Grid: The provided selection state should be an object.")},t.prototype.deleteSelectionStateFromParent=function(e,t){var i=this;if(0===this.selectedState.toggledNodes.size)return!1;var n=!1;return t.forEach((function(e){i.selectedState.toggledNodes.delete(e)&&(n=!0)})),n},t.prototype.setNodesSelected=function(e){var t,i=this;if(0===e.nodes.length)return 0;var n=e.clearSelection&&e.newValue&&!e.rangeSelect;if("multiple"!==this.rowSelection||n){if(e.nodes.length>1)throw new Error("AG Grid: cannot select multiple rows when rowSelection is set to 'single'");var o=e.nodes[0];return e.newValue?(this.selectedNodes=(t={},t[o.id]=o,t),this.selectedState={selectAll:!1,toggledNodes:new Set([o.id])}):(this.selectedNodes={},this.selectedState={selectAll:!1,toggledNodes:new Set}),this.lastSelected=o.id,1}var r=function(t){e.newValue?i.selectedNodes[t.id]=t:delete i.selectedNodes[t.id];var n=t.selectable,o=e.newValue===i.selectedState.selectAll;!o&&n?i.selectedState.toggledNodes.add(t.id):i.selectedState.toggledNodes.delete(t.id)};if(e.rangeSelect&&this.lastSelected){if(e.nodes.length>1)throw new Error("AG Grid: cannot select multiple rows when using rangeSelect");o=e.nodes[0];var s=this.rowModel.getRowNode(this.lastSelected);return this.rowModel.getNodesInRangeForSelection(o,null!==s&&void 0!==s?s:null).forEach(r),this.lastSelected=o.id,1}return e.nodes.forEach(r),this.lastSelected=e.nodes[e.nodes.length-1].id,1},t.prototype.processNewRow=function(e){this.selectedNodes[e.id]&&(this.selectedNodes[e.id]=e)},t.prototype.isNodeSelected=function(e){var t=this.selectedState.toggledNodes.has(e.id);return this.selectedState.selectAll?!t:t},t.prototype.getSelectedNodes=function(){return this.selectAllUsed&&console.warn("AG Grid: getSelectedNodes and getSelectedRows functions cannot be used with select all functionality with the server-side row model.\n                Use `api.getServerSideSelectionState()` instead."),Object.values(this.selectedNodes)},t.prototype.getSelectedRows=function(){return this.getSelectedNodes().map((function(e){return e.data}))},t.prototype.getSelectionCount=function(){return this.selectedState.selectAll?-1:this.selectedState.toggledNodes.size},t.prototype.clearOtherNodes=function(e,t){var i=this.selectedState.selectAll?1:this.selectedState.toggledNodes.size-1;this.selectedState={selectAll:!1,toggledNodes:new Set([e.id])},this.rowModel.forEachNode((function(i){i!==e&&i.selectThisNode(!1,void 0,t)}));var o={type:n.zW2.EVENT_SELECTION_CHANGED,source:t};return this.eventService.dispatchEvent(o),i},t.prototype.isEmpty=function(){var e;return!this.selectedState.selectAll&&!(null===(e=this.selectedState.toggledNodes)||void 0===e?void 0:e.size)},t.prototype.selectAllRowNodes=function(e){this.selectedState={selectAll:!0,toggledNodes:new Set},this.selectedNodes={},this.selectAllUsed=!0},t.prototype.deselectAllRowNodes=function(e){this.selectedState={selectAll:!1,toggledNodes:new Set},this.selectedNodes={}},t.prototype.getSelectAllState=function(e,t){return this.selectedState.selectAll?!(this.selectedState.toggledNodes.size>0)||null:this.selectedState.toggledNodes.size>0&&null},GA([(0,n.fsG)("rowModel")],t.prototype,"rowModel",void 0),GA([n.NqP],t.prototype,"init",null),t}(n.AS9),HA=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),WA=function(){return WA=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},WA.apply(this,arguments)},UA=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},zA=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(i[n[o]]=e[n[o]])}return i},KA=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},YA=function(e,t,i){if(i||2===arguments.length)for(var n,o=0,r=t.length;o<r;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},qA=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.selectedState={selectAllChildren:!1,toggledNodes:new Map},t.lastSelected=null,t}return HA(t,e),t.prototype.init=function(){var e=this;this.addManagedListener(this.eventService,n.zW2.EVENT_MODEL_UPDATED,(function(){return e.removeRedundantState()})),this.addManagedListener(this.eventService,n.zW2.EVENT_COLUMN_ROW_GROUP_CHANGED,(function(){return e.selectionService.reset("rowGroupChanged")}))},t.prototype.getSelectedState=function(){var e=this,t=function(i,n,o){var r={
18nodeId:o};if(n<=e.columnModel.getRowGroupColumns().length&&(r.selectAllChildren=i.selectAllChildren),i.toggledNodes.size){var s=[];i.toggledNodes.forEach((function(e,i){var o=t(e,n+1,i);s.push(o)})),r.toggledNodes=s}return r};return t(this.selectedState,0)},t.prototype.setSelectedState=function(e){var t=function(e,i){var n,o;if("object"!==typeof e)throw new Error("AG Grid: Each provided state object must be an object.");if("selectAllChildren"in e&&"boolean"!==typeof e.selectAllChildren)throw new Error("AG Grid: `selectAllChildren` must be a boolean value or undefined.");if("toggledNodes"in e){if(!Array.isArray(e.toggledNodes))throw new Error("AG Grid: `toggledNodes` must be an array.");var r=e.toggledNodes.every((function(e){return"object"===typeof e&&"nodeId"in e&&"string"===typeof e.nodeId}));if(!r)throw new Error("AG Grid: Every `toggledNode` requires an associated string id.")}var s=null!==(n=e.selectAllChildren)&&void 0!==n?n:!i,a=null===(o=e.toggledNodes)||void 0===o?void 0:o.map((function(e){return[e.nodeId,t(e,s)]})),l=null===a||void 0===a?void 0:a.some((function(e){var t=KA(e,2);t[0];var i=t[1];return s===i.selectAllChildren&&0===i.toggledNodes.size}));if(l)throw new Error("\n                    AG Grid: AG Grid: 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.\n                    Please rebuild the selection state and reapply it.\n                ");return{selectAllChildren:s,toggledNodes:new Map(a)}};try{this.selectedState=t(e,!!e.selectAllChildren)}catch(i){console.error(i.message)}},t.prototype.deleteSelectionStateFromParent=function(e,t){var i=this.selectedState,n=YA([],KA(e),!1);while(i&&n.length)i=i.toggledNodes.get(n.pop());if(!i)return!1;var o=!1;return t.forEach((function(e){(null===i||void 0===i?void 0:i.toggledNodes.delete(e))&&(o=!0)})),o&&this.removeRedundantState(),o},t.prototype.setNodesSelected=function(e){var t=this,i=e.nodes,n=zA(e,["nodes"]);if(0===i.length)return 0;if(e.rangeSelect){if(i.length>1)throw new Error("AG Grid: cannot select multiple rows when using rangeSelect");var o=i[0],r=this.rowModel.getNodesInRangeForSelection(o,this.lastSelected),s=r.map(this.getRouteToNode).sort((function(e,t){return t.length-e.length})),a=new Set;return s.forEach((function(e){a.has(e[e.length-1])||(e.forEach((function(e){return a.add(e)})),t.recursivelySelectNode(e,t.selectedState,WA({node:o},n)))})),this.removeRedundantState(),this.lastSelected=o,1}return e.nodes.forEach((function(e){var i=t.getRouteToNode(e);t.recursivelySelectNode(i,t.selectedState,WA(WA({},n),{node:e}))})),this.removeRedundantState(),this.lastSelected=e.nodes[e.nodes.length-1],1},t.prototype.isNodeSelected=function(e){var t=this.getRouteToNode(e);return this.isNodePathSelected(t,this.selectedState)},t.prototype.isNodePathSelected=function(e,t){var i=KA(e),n=i[0],o=i.slice(1);if(0===o.length){var r=t.toggledNodes.has(n.id);if(n.hasChildren()){var s=t.toggledNodes.get(n.id);if(s&&s.toggledNodes.size)return}return t.selectAllChildren?!r:r}if(t.toggledNodes.has(n.id)){var a=t.toggledNodes.get(n.id);if(a)return this.isNodePathSelected(o,a)}return!!t.selectAllChildren},t.prototype.getRouteToNode=function(e){var t=[],i=e;while(i.parent)t.push(i),i=i.parent;return t.reverse()},t.prototype.removeRedundantState=function(){var e=this;if(!this.filterManager.isAnyFilterPresent()){var t=function(i,n,o){void 0===i&&(i=e.selectedState),void 0===n&&(n=e.serverSideRowModel.getRootStore());var r=!0,s=!0;return i.toggledNodes.forEach((function(n,o){var a=e.rowModel.getRowNode(o);a||(r=!1);var l=null===a||void 0===a?void 0:a.childStore;l?(t(n,l,a)&&i.selectAllChildren===n.selectAllChildren&&i.toggledNodes.delete(o),n.toggledNodes.size>0&&(s=!1)):n.toggledNodes.size>0&&(s=!1)})),!(!n||!n.isLastRowIndexKnown()||n.getRowCount()!==i.toggledNodes.size)&&(!(!s||!r)&&(i.toggledNodes.clear(),i.selectAllChildren=!i.selectAllChildren,o&&(null===o||void 0===o?void 0:o.isSelected())!==i.selectAllChildren&&o.selectThisNode(i.selectAllChildren,void 0,"api"),!0))};t()}},t.prototype.recursivelySelectNode=function(e,t,i){var n=KA(e),o=n[0],r=n.slice(1);if(o){var s=!r.length;if(s){var a=o.selectable,l=t.selectAllChildren===i.newValue;if(l||!a)return void t.toggledNodes.delete(o.id);var c={selectAllChildren:i.newValue,toggledNodes:new Map};t.toggledNodes.set(o.id,c)}else{var u=t.toggledNodes.has(o.id),d=u?t.toggledNodes.get(o.id):{selectAllChildren:t.selectAllChildren,toggledNodes:new Map};u||t.toggledNodes.set(o.id,d),this.recursivelySelectNode(r,d,i),t.selectAllChildren===d.selectAllChildren&&0===d.toggledNodes.size&&t.toggledNodes.delete(o.id)}}},t.prototype.getSelectedNodes=function(){console.warn("AG Grid: `getSelectedNodes` and `getSelectedRows` functions cannot be used with `groupSelectsChildren` and the server-side row model.\n            Use `api.getServerSideSelectionState()` instead.");var e=[];return this.rowModel.forEachNode((function(t){t.isSelected()&&e.push(t)})),e},t.prototype.processNewRow=function(e){}
18,t.prototype.getSelectedRows=function(){return this.getSelectedNodes().map((function(e){return e.data}))},t.prototype.getSelectionCount=function(){return-1},t.prototype.isEmpty=function(){var e;return!this.selectedState.selectAllChildren&&!(null===(e=this.selectedState.toggledNodes)||void 0===e?void 0:e.size)},t.prototype.selectAllRowNodes=function(e){this.selectedState={selectAllChildren:!0,toggledNodes:new Map}},t.prototype.deselectAllRowNodes=function(e){this.selectedState={selectAllChildren:!1,toggledNodes:new Map}},t.prototype.getSelectAllState=function(e,t){return this.selectedState.selectAllChildren?!(this.selectedState.toggledNodes.size>0)||null:this.selectedState.toggledNodes.size>0&&null},UA([(0,n.fsG)("rowModel")],t.prototype,"rowModel",void 0),UA([(0,n.fsG)("columnModel")],t.prototype,"columnModel",void 0),UA([(0,n.fsG)("filterManager")],t.prototype,"filterManager",void 0),UA([(0,n.fsG)("rowModel")],t.prototype,"serverSideRowModel",void 0),UA([(0,n.fsG)("selectionService")],t.prototype,"selectionService",void 0),UA([n.NqP],t.prototype,"init",null),t}(n.AS9),XA=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),$A=function(){return $A=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},$A.apply(this,arguments)},ZA=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},JA=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(i[n[o]]=e[n[o]])}return i},QA=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return XA(t,e),t.prototype.init=function(){var e=this,t=this.gridOptionsService.get("groupSelectsChildren");this.addManagedPropertyListener("groupSelectsChildren",(function(t){e.destroyBean(e.selectionStrategy);var i=t.currentValue?qA:jA;e.selectionStrategy=e.createManagedBean(new i),e.shotgunResetNodeSelectionState();var o={type:n.zW2.EVENT_SELECTION_CHANGED,source:"api"};e.eventService.dispatchEvent(o)})),this.addManagedPropertyListener("rowSelection",(function(){return e.deselectAllRowNodes({source:"api"})}));var i=t?qA:jA;this.selectionStrategy=this.createManagedBean(new i)},t.prototype.getSelectionState=function(){return this.selectionStrategy.getSelectedState()},t.prototype.setSelectionState=function(e,t){if(!Array.isArray(e)){this.selectionStrategy.setSelectedState(e),this.shotgunResetNodeSelectionState();var i={type:n.zW2.EVENT_SELECTION_CHANGED,source:t};this.eventService.dispatchEvent(i)}},t.prototype.setNodesSelected=function(e){var t=e.nodes,i=JA(e,["nodes"]),o=this.gridOptionsService.get("rowSelection");if(t.length>1&&"multiple"!==o)return console.warn("AG Grid: cannot multi select while rowSelection='single'"),0;if(t.length>1&&e.rangeSelect)return console.warn("AG Grid: cannot use range selection when multi selecting rows"),0;var r=$A({nodes:t.filter((function(e){return e.selectable}))},i);if(!r.nodes.length)return 0;var s=this.selectionStrategy.setNodesSelected(r);this.shotgunResetNodeSelectionState(r.source);var a={type:n.zW2.EVENT_SELECTION_CHANGED,source:r.source};return this.eventService.dispatchEvent(a),s},t.prototype.deleteSelectionStateFromParent=function(e,t){var i=this.selectionStrategy.deleteSelectionStateFromParent(e,t);
18if(i){this.shotgunResetNodeSelectionState();var o={type:n.zW2.EVENT_SELECTION_CHANGED,source:"api"};this.eventService.dispatchEvent(o)}},t.prototype.shotgunResetNodeSelectionState=function(e){var t=this;this.rowModel.forEachNode((function(i){if(!i.stub){var n=t.selectionStrategy.isNodeSelected(i);n!==i.isSelected()&&i.selectThisNode(n,void 0,e)}}))},t.prototype.getSelectedNodes=function(){return this.selectionStrategy.getSelectedNodes()},t.prototype.getSelectedRows=function(){return this.selectionStrategy.getSelectedRows()},t.prototype.getSelectionCount=function(){return this.selectionStrategy.getSelectionCount()},t.prototype.syncInRowNode=function(e,t){this.selectionStrategy.processNewRow(e);var i=this.selectionStrategy.isNodeSelected(e);if(0==i||e.selectable)e.setSelectedInitialValue(i);else{this.selectionStrategy.setNodesSelected({nodes:[e],newValue:!1,source:"api"}),this.shotgunResetNodeSelectionState();var o={type:n.zW2.EVENT_SELECTION_CHANGED,source:"api"};this.eventService.dispatchEvent(o)}},t.prototype.reset=function(){this.selectionStrategy.deselectAllRowNodes({source:"api"})},t.prototype.isEmpty=function(){return this.selectionStrategy.isEmpty()},t.prototype.selectAllRowNodes=function(e){(e.justCurrentPage||e.justFiltered)&&console.warn("AG Grid: selecting just filtered only works when gridOptions.rowModelType='clientSide'"),this.selectionStrategy.selectAllRowNodes(e),this.rowModel.forEachNode((function(t){t.stub||t.selectThisNode(!0,void 0,e.source)}));var t={type:n.zW2.EVENT_SELECTION_CHANGED,source:e.source};this.eventService.dispatchEvent(t)},t.prototype.deselectAllRowNodes=function(e){(e.justCurrentPage||e.justFiltered)&&console.warn("AG Grid: selecting just filtered only works when gridOptions.rowModelType='clientSide'"),this.selectionStrategy.deselectAllRowNodes(e),this.rowModel.forEachNode((function(t){t.stub||t.selectThisNode(!1,void 0,e.source)}));var t={type:n.zW2.EVENT_SELECTION_CHANGED,source:e.source};this.eventService.dispatchEvent(t)},t.prototype.getSelectAllState=function(e,t){return this.selectionStrategy.getSelectAllState(e,t)},t.prototype.updateGroupsFromChildrenSelections=function(e,t){return!1},t.prototype.getBestCostNodeSelection=function(){console.warn("AG Grid: calling gridApi.getBestCostNodeSelection() is only possible when using rowModelType=`clientSide`.")},t.prototype.filterFromSelection=function(){},ZA([(0,n.fsG)("rowModel")],t.prototype,"rowModel",void 0),ZA([n.NqP],t.prototype,"init",null),t=ZA([(0,n.Vu6)("selectionService")],t),t}(n.AS9),e_="31.0.0",t_=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),i_=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},n_=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.queuedRowIds=new Set,t}return t_(t,e),t.prototype.postConstruct=function(){var t=this;e.prototype.postConstruct.call(this),this.addManagedListener(this.eventService,n.zW2.EVENT_COLUMN_ROW_GROUP_CHANGED,(function(){t.queuedRowIds.clear()}))},t.prototype.checkOpenByDefault=function(e){if(e.isExpandable()){var t=function(){window.setTimeout((function(){return e.setExpanded(!0)}),0)};if(this.queuedRowIds.has(e.id))return this.queuedRowIds.delete(e.id),void t();var i=this.gridOptionsService.getCallback("isServerSideGroupOpenByDefault");if(i){var n={data:e.data,rowNode:e},o=i(n);o&&t()}}},t.prototype.expandRows=function(e){var t=this;e.forEach((function(e){var i=t.serverSideRowModel.getRowNode(e);i?i.setExpanded(!0):t.queuedRowIds.add(e)}))},t.prototype.expandAll=function(e){this.serverSideRowModel.expandAll(e)},t.prototype.onGroupExpandedOrCollapsed=function(){},i_([(0,n.fsG)("rowModel")],t.prototype,"serverSideRowModel",void 0),t=i_([(0,n.Vu6)("expansionService")],t),t}(n.rYX),o_={version:e_,moduleName:n.GXE.ServerSideRowModelModule,rowModel:"serverSide",beans:[dA,TA,AA,fA,mA,bA,EA,MA,NA,IA,QA,n_],dependantModules:[y]},r_=function(){function e(e,t,i,n,o,r,s,a,l,c,u){this.rowModel=e,this.filterParams=t,this.createKey=i,this.caseFormat=n,this.columnModel=o,this.valueService=r,this.treeDataOrGrouping=s,this.treeData=a,this.getDataPath=l,this.groupAllowUnbalanced=c,this.addManagedListener=u}return e.prototype.extractUniqueValuesAsync=function(e,t){var i=this;
18return new n.j_S((function(o){if(i.rowModel.isRowDataLoaded())o(i.extractUniqueValues(e,t));else var r=i.addManagedListener(n.zW2.EVENT_ROW_COUNT_READY,(function(){null===r||void 0===r||r(),o(i.extractUniqueValues(e,t))}))}))},e.prototype.extractUniqueValues=function(e,t){var i=this,o=new Map,r=this.extractExistingFormattedKeys(t),s=new Set,a=this.treeData&&!!this.getDataPath,l=this.columnModel.getRowGroupColumns(),c=function(e,a){var l=i.caseFormat(e);if(!s.has(l)){s.add(l);var c=e,u=n._.makeNull(a),d=null===r||void 0===r?void 0:r.get(l);null!=d&&(c=d,u=t.get(d)),o.set(c,u)}};return this.rowModel.forEachLeafNode((function(t){if(t.data&&e(t))if(i.treeDataOrGrouping)i.addValueForTreeDataOrGrouping(t,a,l,c);else{var n=i.getValue(t);i.filterParams.convertValuesToStrings?i.addValueForConvertValuesToString(t,n,c):null!=n&&Array.isArray(n)?(n.forEach((function(e){c(i.createKey(e,t),e)})),0===n.length&&c(null,null)):c(i.createKey(n,t),n)}})),o},e.prototype.addValueForConvertValuesToString=function(e,t,i){var o=this.createKey(t,e);null!=o&&Array.isArray(o)?(o.forEach((function(e){var t=n._.toStringOrNull(n._.makeNull(e));i(t,t)})),0===o.length&&i(null,null)):i(o,o)},e.prototype.addValueForTreeDataOrGrouping=function(e,t,i,o){var r,s,a=this;if(t){if(null===(r=e.childrenAfterGroup)||void 0===r?void 0:r.length)return;s=this.getDataPath(e.data)}else s=i.map((function(t){return a.valueService.getKeyForNode(t,e)})),s.push(this.getValue(e));s&&(s=s.map((function(e){return n._.toStringOrNull(n._.makeNull(e))}))),!t&&this.groupAllowUnbalanced&&(null===s||void 0===s?void 0:s.some((function(e){return null==e})))&&(s=s.filter((function(e){return null!=e}))),o(this.createKey(s),s)},e.prototype.getValue=function(e){return this.filterParams.getValue(e)},e.prototype.extractExistingFormattedKeys=function(e){var t=this;if(!e)return null;var i=new Map;return e.forEach((function(e,n){i.set(t.caseFormat(n),n)})),i},e}(),s_=function(){function e(){}return e.SELECT_ALL="__AG_SELECT_ALL__",e.ADD_SELECTION_TO_FILTER="__AG_ADD_SELECTION_TO_FILTER__",e}(),a_=function(e){var t="function"===typeof Symbol&&Symbol.iterator,i=t&&e[t],n=0;if(i)return i.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},l_=function(){function e(e,t,i,n){this.valueFormatterService=e,this.valueFormatter=t,this.formatter=i,this.column=n,this.displayedKeys=[]}return e.prototype.updateDisplayedValuesToAllAvailable=function(e,t,i){this.displayedKeys=Array.from(i)},e.prototype.updateDisplayedValuesToMatchMiniFilter=function(e,t,i,n,o){var r,s;this.displayedKeys=[];try{for(var a=a_(i),l=a.next();!l.done;l=a.next()){var c=l.value;if(null==c)o&&this.displayedKeys.push(c);else{var u=e(c),d=this.valueFormatterService.formatValue(this.column,null,u,this.valueFormatter,!1),p=this.formatter(d);n(p)&&this.displayedKeys.push(c)}}}catch(h){r={error:h}}finally{try{l&&!l.done&&(s=a.return)&&s.call(a)}finally{if(r)throw r.error}}},e.prototype.getDisplayedValueCount=function(){return this.displayedKeys.length},e.prototype.getDisplayedItem=function(e){return this.displayedKeys[e]},e.prototype.getSelectAllItem=function(){return s_.SELECT_ALL},e.prototype.getAddSelectionToFilterItem=function(){return s_.ADD_SELECTION_TO_FILTER},e.prototype.getDisplayedKeys=function(){return this.displayedKeys},e.prototype.forEachDisplayedKey=function(e){this.displayedKeys.forEach(e)},e.prototype.someDisplayedKey=function(e){return this.displayedKeys.some(e)},e.prototype.hasGroups=function(){return!1},e.prototype.refresh=function(){},e}(),c_=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},u_=function(e,t,i){if(i||2===arguments.length)for(var n,o=0,r=t.length;o<r;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},d_=function(e){var t="function"===typeof Symbol&&Symbol.iterator,i=t&&e[t],n=0;if(i)return i.call(e);
18if(e&&"number"===typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},p_=function(){function e(e,t,i,n){this.formatter=e,this.treeListPathGetter=t,this.treeListFormatter=i,this.treeDataOrGrouping=n,this.allDisplayedItemsTree=[],this.activeDisplayedItemsFlat=[],this.selectAllItem={depth:0,filterPasses:!0,available:!0,treeKey:s_.SELECT_ALL,children:this.allDisplayedItemsTree,expanded:!0,key:s_.SELECT_ALL,parentTreeKeys:[]},this.addSelectionToFilterItem={depth:0,filterPasses:!0,available:!0,treeKey:s_.ADD_SELECTION_TO_FILTER,expanded:!0,key:s_.ADD_SELECTION_TO_FILTER,parentTreeKeys:[]}}return e.prototype.updateDisplayedValuesToAllAvailable=function(e,t,i,n){"reload"===n?this.generateItemTree(e,t,i):"otherFilter"===n?(this.updateAvailable(i),this.updateExpandAll()):"miniFilter"===n&&(this.resetFilter(),this.updateExpandAll()),this.flattenItems()},e.prototype.updateDisplayedValuesToMatchMiniFilter=function(e,t,i,n,o,r){"reload"===r?this.generateItemTree(e,t,i):"otherFilter"===r&&this.updateAvailable(i),this.updateFilter(n,o),this.updateExpandAll(),this.flattenItems()},e.prototype.generateItemTree=function(e,t,i){var n,o,r;this.allDisplayedItemsTree=[],this.groupsExist=!1;var s=this.getTreeListPathGetter(e,i),a=function(t){var n=e(t),o=null!==(r=s(n))&&void 0!==r?r:[null];o.length>1&&(l.groupsExist=!0);var a,c=i.has(t),u=l.allDisplayedItemsTree,d=[];o.forEach((function(e,i){u||(u=[],a.children=u),a=u.find((function(t){var i;return(null===(i=t.treeKey)||void 0===i?void 0:i.toUpperCase())===(null===e||void 0===e?void 0:e.toUpperCase())})),a||(a={treeKey:e,depth:i,filterPasses:!0,expanded:!1,available:c,parentTreeKeys:d},i===o.length-1&&(a.key=t),u.push(a)),u=a.children,d=u_(u_([],c_(d),!1),[e],!1)}))},l=this;try{for(var c=d_(t),u=c.next();!u.done;u=c.next()){var d=u.value;a(d)}}catch(p){n={error:p}}finally{try{u&&!u.done&&(o=c.return)&&o.call(c)}finally{if(n)throw n.error}}this.updateAvailable(i),this.selectAllItem.children=this.allDisplayedItemsTree,this.selectAllItem.expanded=!1},e.prototype.getTreeListPathGetter=function(t,i){var o,r;if(this.treeListPathGetter)return this.treeListPathGetter;if(this.treeDataOrGrouping)return function(e){return e};var s=!1;try{for(var a=d_(i),l=a.next();!l.done;l=a.next()){var c=l.value,u=t(c);if(u instanceof Date){s=!0;break}if(null!=u)break}}catch(d){o={error:d}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(o)throw o.error}}return s?e.DATE_TREE_LIST_PATH_GETTER:(n._.warnOnce("property treeList=true for Set Filter params, but you did not provide a treeListPathGetter or values of type Date."),function(e){return[String(e)]})},e.prototype.flattenItems=function(){var e=this;this.activeDisplayedItemsFlat=[];var t=function(i){i.forEach((function(i){i.filterPasses&&i.available&&(e.activeDisplayedItemsFlat.push(i),i.children&&i.expanded&&t(i.children))}))};t(this.allDisplayedItemsTree)},e.prototype.resetFilter=function(){var e=function(t){t.children&&t.children.forEach((function(t){e(t)})),t.filterPasses=!0};this.allDisplayedItemsTree.forEach((function(t){return e(t)}))},e.prototype.updateFilter=function(e,t){var i=this,n=function(n){return!!n.available&&(null==n.treeKey?t:e(i.formatter(i.treeListFormatter?i.treeListFormatter(n.treeKey,n.depth,n.parentTreeKeys):n.treeKey)))};this.allDisplayedItemsTree.forEach((function(e){return i.recursiveItemCheck(e,!1,n,"filterPasses")}))},e.prototype.getDisplayedValueCount=function(){return this.activeDisplayedItemsFlat.length},e.prototype.getDisplayedItem=function(e){return this.activeDisplayedItemsFlat[e]},e.prototype.getSelectAllItem=function(){return this.selectAllItem},e.prototype.getAddSelectionToFilterItem=function(){return this.addSelectionToFilterItem},e.prototype.getDisplayedKeys=function(){var e=[];return this.forEachDisplayedKey((function(t){return e.push(t)})),e},e.prototype.forEachDisplayedKey=function(e){var t=function(i,n){i.children?i.expanded&&n||i.children.forEach((function(e){e.filterPasses&&t(e,!1)})):e(i.key)};this.activeDisplayedItemsFlat.forEach((function(e){return t(e,!0)}))},e.prototype.someDisplayedKey=function(e){var t=function(i,n){return i.children?(!i.expanded||!n)&&i.children.some((function(e){return!!e.filterPasse
18s&&t(e,!1)})):e(i.key)};return this.activeDisplayedItemsFlat.some((function(e){return t(e,!0)}))},e.prototype.hasGroups=function(){return this.groupsExist},e.prototype.refresh=function(){this.updateExpandAll(),this.flattenItems()},e.prototype.updateExpandAll=function(){var e=function(t,i,n){var o,r;try{for(var s=d_(t),a=s.next();!a.done;a=s.next()){var l=a.value;if(l.filterPasses&&l.available&&l.children){if(i=i||!!l.expanded,n=n||!l.expanded,i&&n)return;var c=e(l.children,i,n);if(void 0===c)return;c?i=!0:n=!0}}}catch(u){o={error:u}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(o)throw o.error}}return i&&n?void 0:i},t=this.getSelectAllItem();t.expanded=e(t.children,!1,!1)},e.prototype.recursiveItemCheck=function(e,t,i,n){var o=this,r=!1;e.children&&e.children.forEach((function(s){var a=o.recursiveItemCheck(s,t||i(e),i,n);r=r||a}));var s=t||r||i(e);return e[n]=s,s},e.prototype.updateAvailable=function(e){var t=this,i=function(t){return e.has(t.key)};this.allDisplayedItemsTree.forEach((function(e){return t.recursiveItemCheck(e,!1,i,"available")}))},e.DATE_TREE_LIST_PATH_GETTER=function(e){return e?[String(e.getFullYear()),String(e.getMonth()+1),String(e.getDate())]:null},e}(),h_=function(){function e(e){var t=e.caseFormat;this.filteringKeys=null,this.filteringKeysCaseFormatted=null,this.hasNoAppliedFilteringKeys=!1,this.caseFormat=t}return e.prototype.allFilteringKeys=function(){return this.filteringKeys},e.prototype.allFilteringKeysCaseFormatted=function(){return this.filteringKeysCaseFormatted},e.prototype.noAppliedFilteringKeys=function(){return this.hasNoAppliedFilteringKeys},e.prototype.setFilteringKeys=function(e){var t=this;this.filteringKeys=new Set(e),this.hasNoAppliedFilteringKeys=!this.filteringKeys||0===this.filteringKeys.size,this.filteringKeysCaseFormatted=new Set,this.filteringKeys.forEach((function(e){return t.filteringKeysCaseFormatted.add(t.caseFormat(e))}))},e.prototype.addFilteringKey=function(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)},e.prototype.hasCaseFormattedFilteringKey=function(e){return this.filteringKeysCaseFormatted.has(this.caseFormat(e))},e.prototype.hasFilteringKey=function(e){return this.filteringKeys.has(e)},e.prototype.reset=function(){this.filteringKeys=null,this.filteringKeysCaseFormatted=null,this.hasNoAppliedFilteringKeys=!1},e}(),f_=function(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{while((void 0===t||t-- >0)&&!(n=r.next()).done)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(o)throw o.error}}return s},g_=function(e,t,i){if(i||2===arguments.length)for(var n,o=0,r=t.length;o<r;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))};(function(e){e[e["PROVIDED_LIST"]=0]="PROVIDED_LIST",e[e["PROVIDED_CALLBACK"]=1]="PROVIDED_CALLBACK",e[e["TAKEN_FROM_GRID_VALUES"]=2]="TAKEN_FROM_GRID_VALUES"})(XD||(XD={}));var v_=function(){function e(e){var t,i=this;this.localEventService=new n.POd,this.miniFilterText=null,this.addCurrentSelectionToFilter=!1,this.providedValues=null,this.allValues=new Map,this.availableKeys=new Set,this.selectedKeys=new Set,this.initialised=!1;var o=e.usingComplexObjects,r=e.columnModel,s=e.valueService,a=e.treeDataTreeList,l=e.groupingTreeList,c=e.filterParams,u=e.gridOptionsService,d=e.valueFormatterService,p=e.valueFormatter,h=e.addManagedListener,f=c.column,g=c.colDef,v=c.textFormatter,y=c.doesRowPassOtherFilter,m=c.suppressSorting,C=c.comparator,b=c.rowModel,w=c.values,S=c.caseSensitive,E=c.convertValuesToStrings,x=c.treeList,O=c.treeListPathGetter,T=c.treeListFormatter;this.filterParams=c,this.gridOptionsService=u,this.setIsLoading=e.setIsLoading,this.translate=e.translate,this.caseFormat=e.caseFormat,this.createKey=e.createKey,this.usingComplexObjects=!!e.usingComplexObjects,this.formatter=v||n.QVL.DEFAULT_FORMATTER,this.doesRowPassOtherFilters=y,this.suppressSorting=m||!1,this.convertValuesToStrings=!!E,this.filteringKeys=new h_({caseFormat:this.caseFormat});var D=null!==C&&void 0!==C?C:g.comparator,R=!!a||!!l;this.compareByValue=!!(o&&D||R||x&&!O),this.entryComparator=R&&!D?this.createTreeDataOrGroupingComparator():!x||O||D?function(e,t){var i=f_(e,2);i[0];var n=i[1],o=f_(t,2);o[0];var r=o[1];return D(n,r)}:function(e,t){var i=f_(e,2);i[0];var o=i[1],r=f_(t,2);r[0];var s=r[1];return n._.defaultComparator(o,s)},this.keyComparator=null!==(t=D)&&void 0!==t?t:n._.defaultComparator,this.caseSensitive=!!S;var A=u.get("getDataPath"),_=u.get("groupAllowUnbalanced");"clientSide"===b.getType()&&(this.clientSideValuesExtractor=new r_(b,this.filterParams,this.createKey,this.caseFormat,r,s,R,!!a,A,_,h)),null==w?this.valuesType=XD.TAKEN_FROM_GRID_VALUES:(this.valuesType=Array.isArray(w)?XD.PROVIDED_LIST:XD.PROVIDED_CALLBACK,this.providedValues=w),this.displayValueModel=x?new p_(this.formatter,O,T,a||l):new l_(d,p,this.formatter,f),this.updateAllValues().then((function(e){return i.resetSelectionState(e||[])}))}return e.prototype.addEventListener=function(e,t,i){this.localEventService.addEventListener(e,t,i)},e.prototype.removeEventListener=function(e,t,i){this.localEventService.removeEventListener(e,t,i)},e.prototype.updateOnParamsChange=function(e){var t=this;return new n.j_S((function(i){var o=e.values,r=e.textFormatter,s=e.suppressSorting,a=t.providedValues,l=t.suppressSorting;if(t.filterParams=e,t.formatter=r||n.QVL.DEFAULT_FORMATTER,t.suppressSorting=s||!1,t.providedValues=null!==o&&void 0!==o?o:null,t.providedValues!==a||t.suppressSorting!==l){if(o&&0!==o.length){var c=Array.isArray(o)&&o.length>0&&"function"===typeof o[0];t.valuesType=c?XD.PROVIDED_CALLBACK:XD.PROVIDED_LIST}else t.valuesType=XD.TAKEN_FROM_GRID_VALUES,t.providedValues=null;var u=t.getModel();t.updateAllValues().then((function(e){t.setModel(u).then((function(){return i()}))}))}else i()}))},e.prototype.refreshValues=function(){var e=this;
18return new n.j_S((function(t){e.allValuesPromise.then((function(){var i=e.getModel();e.updateAllValues(),e.setModel(i).then((function(){return t()}))}))}))},e.prototype.overrideValues=function(e){var t=this;return new n.j_S((function(i){t.allValuesPromise.then((function(){t.valuesType=XD.PROVIDED_LIST,t.providedValues=e,t.refreshValues().then((function(){return i()}))}))}))},e.prototype.refreshAfterAnyFilterChanged=function(){var e=this;return this.showAvailableOnly()?this.allValuesPromise.then((function(t){return e.updateAvailableKeys(null!==t&&void 0!==t?t:[],"otherFilter"),!0})):n.j_S.resolve(!1)},e.prototype.isInitialised=function(){return this.initialised},e.prototype.updateAllValues=function(){var e=this;return this.allValuesPromise=new n.j_S((function(t){switch(e.valuesType){case XD.TAKEN_FROM_GRID_VALUES:e.getValuesFromRowsAsync(!1).then((function(i){return t(e.processAllValues(i))}));break;case XD.PROVIDED_LIST:t(e.processAllValues(e.uniqueValues(e.validateProvidedValues(e.providedValues))));break;case XD.PROVIDED_CALLBACK:e.setIsLoading(!0);var i=e.providedValues,n=e.filterParams,o=n.columnApi,r=n.api,s=n.column,a=n.colDef,l=e.gridOptionsService.context,c={success:function(i){e.setIsLoading(!1),t(e.processAllValues(e.uniqueValues(e.validateProvidedValues(i))))},colDef:a,column:s,columnApi:o,api:r,context:l};window.setTimeout((function(){return i(c)}),0);break;default:throw new Error("Unrecognised valuesType")}})),this.allValuesPromise.then((function(t){return e.updateAvailableKeys(t||[],"reload")})).then((function(){return e.initialised=!0})),this.allValuesPromise},e.prototype.processAllValues=function(e){var t=this.sortKeys(e);return this.allValues=null!==e&&void 0!==e?e:new Map,t},e.prototype.validateProvidedValues=function(e){if(this.usingComplexObjects&&(null===e||void 0===e?void 0:e.length)){var t=e[0];if(t&&"object"!==typeof t&&"function"!==typeof t){var i=this.createKey(t);null==i?n._.warnOnce("Set Filter Key Creator is returning null for provided values and provided values are primitives. Please provide complex objects or set convertValuesToStrings=true in the filterParams. See https://www.ag-grid.com/javascript-data-grid/filter-set-filter-list/#filter-value-types"):n._.warnOnce("Set Filter has a Key Creator, but provided values are primitives. Did you mean to provide complex objects or enable convertValuesToStrings?")}}return e},e.prototype.setValuesType=function(e){this.valuesType=e},e.prototype.getValuesType=function(){return this.valuesType},e.prototype.isKeyAvailable=function(e){return this.availableKeys.has(e)},e.prototype.showAvailableOnly=function(){return this.valuesType===XD.TAKEN_FROM_GRID_VALUES},e.prototype.updateAvailableKeys=function(t,i){var n=this.showAvailableOnly()?this.sortKeys(this.getValuesFromRows(!0)):t;this.availableKeys=new Set(n),this.localEventService.dispatchEvent({type:e.EVENT_AVAILABLE_VALUES_CHANGED}),this.updateDisplayedValues(i,t)},e.prototype.sortKeys=function(e){var t,i=null!==e&&void 0!==e?e:new Map;return this.suppressSorting?Array.from(i.keys()):(t=this.compareByValue?Array.from(i.entries()).sort(this.entryComparator).map((function(e){var t=f_(e,1),i=t[0];return i})):Array.from(i.keys()).sort(this.keyComparator),this.filterParams.excelMode&&i.has(null)&&(t=t.filter((function(e){return null!=e})),t.push(null)),t)},e.prototype.getParamsForValuesFromRows=function(e){var t=this;if(void 0===e&&(e=!1),!this.clientSideValuesExtractor)return n._.doOnce((function(){console.error("AG Grid: 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")}),"setFilterValueNotCSRM"),null;var i=function(i){return!e||t.doesRowPassOtherFilters(i)},o=e&&!this.caseSensitive?this.allValues:void 0;return{predicate:i,existingValues:o}},e.prototype.getValuesFromRows=function(e){void 0===e&&(e=!1);var t=this.getParamsForValuesFromRows(e);return t?this.clientSideValuesExtractor.extractUniqueValues(t.predicate,t.existingV
18alues):null},e.prototype.getValuesFromRowsAsync=function(e){void 0===e&&(e=!1);var t=this.getParamsForValuesFromRows(e);return t?this.clientSideValuesExtractor.extractUniqueValuesAsync(t.predicate,t.existingValues):n.j_S.resolve(null)},e.prototype.setMiniFilter=function(e){return e=n._.makeNull(e),this.miniFilterText!==e&&(null===e&&this.setAddCurrentSelectionToFilter(!1),this.miniFilterText=e,this.updateDisplayedValues("miniFilter"),!0)},e.prototype.getMiniFilter=function(){return this.miniFilterText},e.prototype.updateDisplayedValues=function(e,t){var i=this;if("expansion"!==e)if(null!=this.miniFilterText){var n=this.caseFormat(this.formatter(this.miniFilterText)||""),o=function(e){return null!=e&&i.caseFormat(e).indexOf(n)>=0},r=!!this.filterParams.excelMode&&o(this.translate("blanks"));this.displayValueModel.updateDisplayedValuesToMatchMiniFilter((function(e){return i.getValue(e)}),t,this.availableKeys,o,r,e)}else this.displayValueModel.updateDisplayedValuesToAllAvailable((function(e){return i.getValue(e)}),t,this.availableKeys,e);else this.displayValueModel.refresh()},e.prototype.getDisplayedValueCount=function(){return this.displayValueModel.getDisplayedValueCount()},e.prototype.getDisplayedItem=function(e){return this.displayValueModel.getDisplayedItem(e)},e.prototype.getSelectAllItem=function(){return this.displayValueModel.getSelectAllItem()},e.prototype.getAddSelectionToFilterItem=function(){return this.displayValueModel.getAddSelectionToFilterItem()},e.prototype.hasSelections=function(){return this.filterParams.defaultToNothingSelected?this.selectedKeys.size>0:this.allValues.size!==this.selectedKeys.size},e.prototype.getKeys=function(){return Array.from(this.allValues.keys())},e.prototype.getValues=function(){return Array.from(this.allValues.values())},e.prototype.getValue=function(e){return this.allValues.get(e)},e.prototype.setAddCurrentSelectionToFilter=function(e){this.addCurrentSelectionToFilter=e},e.prototype.isInWindowsExcelMode=function(){return"windows"===this.filterParams.excelMode},e.prototype.isAddCurrentSelectionToFilterChecked=function(){return this.isInWindowsExcelMode()&&this.addCurrentSelectionToFilter},e.prototype.showAddCurrentSelectionToFilter=function(){return this.isInWindowsExcelMode()&&n._.exists(this.miniFilterText)&&this.miniFilterText.length>0},e.prototype.selectAllMatchingMiniFilter=function(e){var t=this;void 0===e&&(e=!1),null==this.miniFilterText?this.selectedKeys=new Set(this.allValues.keys()):(e&&this.selectedKeys.clear(),this.displayValueModel.forEachDisplayedKey((function(e){return t.selectedKeys.add(e)})))},e.prototype.deselectAllMatchingMiniFilter=function(){var e=this;null==this.miniFilterText?this.selectedKeys.clear():this.displayValueModel.forEachDisplayedKey((function(t){return e.selectedKeys.delete(t)}))},e.prototype.selectKey=function(e){this.selectedKeys.add(e)},e.prototype.deselectKey=function(e){this.filterParams.excelMode&&this.isEverythingVisibleSelected()&&this.resetSelectionState(this.displayValueModel.getDisplayedKeys()),this.selectedKeys.delete(e)},e.prototype.isKeySelected=function(e){return this.selectedKeys.has(e)},e.prototype.isEverythingVisibleSelected=function(){var e=this;return!this.displayValueModel.someDisplayedKey((function(t){return!e.isKeySelected(t)}))},e.prototype.isNothingVisibleSelected=function(){var e=this;return!this.displayValueModel.someDisplayedKey((function(t){return e.isKeySelected(t)}))},e.prototype.getModel=function(){if(!this.hasSelections())return null;var e=this.isAddCurrentSelectionToFilterChecked()?this.filteringKeys.allFilteringKeys():null;if(e&&e.size>0){if(this.selectedKeys){var t=new Set(g_(g_([],f_(Array.from(e)),!1),f_(Array.from(this.selectedKeys).filter((function(t){return!e.has(t)}))),!1));return Array.from(t)}return Array.from(e)}return Array.from(this.selectedKeys)},e.prototype.setModel=function(e){var t=this;return this.allValuesPromise.then((function(i){if(null==e)t.resetSelectionState(null!==i&&void 0!==i?i:[]);else{t.selectedKeys.clear();var o=new Map;t.allValues.forEach((function(e,i){o.set(t.caseFormat(i),i)})),e.forEach((function(e){var i=t.caseFormat(n._.makeNull(e)),r=o.get(i);void 0!==r&&t.selectKey(r)}))}}))},e.prototype.uniqueValues=function(e){var t=this,i=new Map,o=new Set;
18return(null!==e&&void 0!==e?e:[]).forEach((function(e){var r=n._.makeNull(e),s=t.convertAndGetKey(r),a=t.caseFormat(s);o.has(a)||(o.add(a),i.set(s,r))})),i},e.prototype.convertAndGetKey=function(e){return this.convertValuesToStrings?e:this.createKey(e)},e.prototype.resetSelectionState=function(e){this.filterParams.defaultToNothingSelected?this.selectedKeys.clear():this.selectedKeys=new Set(e)},e.prototype.hasGroups=function(){return this.displayValueModel.hasGroups()},e.prototype.createTreeDataOrGroupingComparator=function(){return function(e,t){var i=f_(e,2);i[0];var o=i[1],r=f_(t,2);r[0];var s=r[1];if(null==o)return null==s?0:-1;if(null==s)return 1;for(var a=0;a<o.length;a++){if(a>=s.length)return 1;var l=n._.defaultComparator(o[a],s[a]);if(0!==l)return l}return 0}},e.prototype.setAppliedModelKeys=function(e){this.filteringKeys.setFilteringKeys(e)},e.prototype.addToAppliedModelKeys=function(e){this.filteringKeys.addFilteringKey(e)},e.prototype.getAppliedModelKeys=function(){return this.filteringKeys.allFilteringKeys()},e.prototype.getCaseFormattedAppliedModelKeys=function(){return this.filteringKeys.allFilteringKeysCaseFormatted()},e.prototype.hasAppliedModelKey=function(e){return this.filteringKeys.hasCaseFormattedFilteringKey(e)},e.prototype.hasAnyAppliedModelKey=function(){return!this.filteringKeys.noAppliedFilteringKeys()},e.EVENT_AVAILABLE_VALUES_CHANGED="availableValuesChanged",e}(),y_=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),m_=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},C_=function(e){function t(i){var n,o=this;return o=e.call(this,i.isGroup?t.GROUP_TEMPLATE:t.TEMPLATE)||this,o.focusWrapper=i.focusWrapper,o.value=i.value,o.params=i.params,o.translate=i.translate,o.valueFormatter=i.valueFormatter,o.item=i.item,o.isSelected=i.isSelected,o.isTree=i.isTree,o.depth=null!==(n=i.depth)&&void 0!==n?n:0,o.isGroup=i.isGroup,o.groupsExist=i.groupsExist,o.isExpanded=i.isExpanded,o.hasIndeterminateExpandState=i.hasIndeterminateExpandState,o}return y_(t,e),t.prototype.init=function(){var e=this;this.addDestroyFunc((function(){var t;return null===(t=e.destroyCellRendererComponent)||void 0===t?void 0:t.call(e)})),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.isGroup?this.setupExpansion():this.groupsExist&&this.addCssClass("ag-set-filter-add-group-indent"),n._.setAriaLevel(this.getAriaElement(),this.depth+1)),this.refreshAriaChecked(),this.params.readOnly||this.eCheckbox.onValueChange((function(t){return e.onCheckboxChanged(!!t)}))},t.prototype.getFocusableElement=function(){return this.focusWrapper},t.prototype.setupExpansion=function(){this.eGroupClosedIcon.appendChild(n._.createIcon("setFilterGroupClosed",this.gridOptionsService,null)),this.eGroupOpenedIcon.appendChild(n._.createIcon("setFilterGroupOpen",this.gridOptionsService,null)),this.addManagedListener(this.eGroupClosedIcon,"click",this.onExpandOrContractClicked.bind(this)),this.addManagedListener(this.eGroupOpenedIcon,"click",this.onExpandOrContractClicked.bind(this)),this.hasIndeterminateExpandState&&(this.eGroupIndeterminateIcon.appendChild(n._.createIcon("setFilterGroupIndeterminate",this.gridOptionsService,null)),this.addManagedListener(this.eGroupIndeterminateIcon,"click",this.onExpandOrContractClicked.bind(this))),this.setExpandedIcons(),this.refreshAriaExpanded()},t.prototype.onExpandOrContractClicked=function(){this.setExpanded(!this.isExpanded)},t.prototype.setExpanded=function(e,i){if(this.isGroup&&e!==this.isExpanded){this.isExpanded=e;var n={type:t.EVENT_EXPANDED_CHANGED,isExpanded:!!e,item:this.item};i||this.dispatchEvent(n),this.setExpandedIcons(),this.refreshAriaExpanded()}},t.prototype.setExpandedIcons=function(){n._.setDisplayed(this.eGroupClosedIcon,this.hasIndeterminateExpandState?!1===this.isExpanded:!this.isExpanded),n._.setDisplayed(this.eGroupOpenedIcon,!0===this.isExpanded),this.hasIndeterminateExpandState&&n._.setDisplayed(this.eGroupIndeterminateIcon,void 0===this.isExpanded)},t.prototype.onCheckboxChanged=function(e){this.isSelected=e;var i={type:t.EVENT_SELECTION_CHANGED,isSelected:e,item:this.item};this.dispatchEvent(i),this.refreshVariableAriaLabels(),this.refreshAriaChecked()},t.prototype.toggleSelected=function(){this.params.readOnly||this.setSelected(!this.isSelected)},t.prototype.setSelected=function(e,t){this.isSelected=e,this.eCheckbox.setValue(e,t),this.refreshAriaChecked()},t.prototype.refreshVariableAriaLabels=function(){if(this.isTree){var e=this.localeService.getLocaleTextFunc(),t=this.eCheckbox.getValue(),i=void 0===t?e("ariaIndeterminate","indeterminate"):t?e("ariaVisible","visible"):e("ariaHidden","hidden"),o=e("ariaToggleVisibility","Press SPACE to toggle visibility");n._.setAriaLabelledBy(this.eCheckbox.getInputElement(),void 0),this.eCheckbox.setInputAriaLabel("".concat(o," (").concat(i,")"))}},t.prototype.setupFixedAriaLabels=function(e){if(this.isTree){var t=this.localeService.getLocaleTextFunc(),i=t("ariaFilterValue","Filter Value"),o=this.getAriaElement();n._.setAriaLabel(o,"".concat(e," ").concat(i)),n._.setAriaDescribedBy(o,this.eCheckbox.getInputElement().id)}},t.prototype.refreshAriaChecked=function(){var e=this.getAriaElement();n._.setAriaChecked(e,this.eCheckbox.getValue())},t.prototype.refreshAriaExpanded=function(){n._.setAriaExpanded(this.getAriaElement(),!!this.isExpanded)},t.prototype.refresh=function(e,t,i){var n,o;if(this.item=e,t!==this.isSelected&&this.setSelected(t,!0),this.setExpanded(i,!0),this.valueFunction){var r=this.valueFunction();this.setTooltipAndCellRendererParams(r,r),this.cellRendererComponent||this.renderCellWithoutCellRenderer()}if(this.cellRendererComponent){var s=null===(o=(n=this.cellRendererComponent).refresh)||void 0===o?void 0:o.call(n,this.cellRendererParams);if(!s){var a=this.cellRendererComponent;this.renderCell(),this.destroyBean(a)}}},t.prototype.render=function(){var e=this.params.column,t=this.value,i=null;"function"===typeof t?(this.valueFunction=t,i=this.valueFunction(),t=i):i=this.isTree?n._.toStringOrNull(t):this.getFormattedValue(e,t),this.setTooltipAndCellRendererParams(t,i),this.renderCell()},t.prototype.setTooltipAndCellRendererParams=function(e,t){if(this.params.showTooltips){var i=null!=t?t:n._.toStringOrNull(e);this.setTooltip(i)}this.cellRendererParams={value:e,valueFormatted:t,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context,colDef:this.params.colDef,column:this.params.column}},t.prototype.getTooltipParams=function(){var t=e.prototype.getTooltipParams.call(this);return t.location="setFilterValue",t.colDef=this.getComponentHolder(),this.isTree&&(t.level=this.depth),t},t.prototype.getFormattedValue=function(e,t){return this.valueFormatterService.formatValue(e,null,t,this.valueFormatter,!1)},t.prototype.renderCell=function(){var e=this,t=this.userComponentFactory.getSetFilterCellRendererDetails(this.params,this.cellRendererParams),i=t?t.newAgStackInstance():void 0;null!=i?i.then((function(t){t&&(e.cellRendererComponent=t,e.eCheckbox.setLabel(t.getGui()),e.destroyCellRendererComponent=function(){return e.destroyBean(t)})})):this.renderCellWithoutCellRenderer()},t.prototype.renderCellWithoutCellRenderer=function(){var e,t=null!==(e=null==this.cellRendererParams.valueFormatted?this.cellRendererParams.value:this.cellRendererParams.valueFormatted)&&void 0!==e?e:this.translate("blanks");"string"!==typeof t&&(n._.warnOnce("Set Filter Value Formatter must return string values. Please ensure the Set Filter Value Formatter returns string values for complex objects, or set convertValuesToStrings=true in the filterParams. See ".concat(this.getFrameworkOverrides().getDocLink("filter-set-filter-list/#filter-value-types"))),t=""),this.eCheckbox.setLabel(t),this.setupFixedAriaLabels(t)},t.prototype.getComponentHolder=function(){return this.params.column.getColDef()},t.EVENT_SELECTION_CHANGED="selectionChanged",t.EVENT_EXPANDED_CHANGED="expandedChanged",t.GROUP_TEMPLATE='\n        <div class="ag-set-filter-item" aria-hidden="true">
18\n            <span class="ag-set-filter-group-icons">\n                <span class="ag-set-filter-group-closed-icon" ref="eGroupClosedIcon"></span>\n                <span class="ag-set-filter-group-opened-icon" ref="eGroupOpenedIcon"></span>\n                <span class="ag-set-filter-group-indeterminate-icon" ref="eGroupIndeterminateIcon"></span>\n            </span>\n            <ag-checkbox ref="eCheckbox" class="ag-set-filter-item-checkbox"></ag-checkbox>\n        </div>',t.TEMPLATE='\n        <div class="ag-set-filter-item">\n            <ag-checkbox ref="eCheckbox" class="ag-set-filter-item-checkbox"></ag-checkbox>\n        </div>',m_([(0,n.fsG)("valueFormatterService")],t.prototype,"valueFormatterService",void 0),m_([(0,n.fsG)("userComponentFactory")],t.prototype,"userComponentFactory",void 0),m_([(0,n.cqo)("eCheckbox")],t.prototype,"eCheckbox",void 0),m_([(0,n.cqo)("eGroupOpenedIcon")],t.prototype,"eGroupOpenedIcon",void 0),m_([(0,n.cqo)("eGroupClosedIcon")],t.prototype,"eGroupClosedIcon",void 0),m_([(0,n.cqo)("eGroupIndeterminateIcon")],t.prototype,"eGroupIndeterminateIcon",void 0),m_([n.NqP],t.prototype,"init",null),t}(n.wA2),b_={loadingOoo:"Loading...",blanks:"(Blanks)",searchOoo:"Search...",selectAll:"(Select All)",selectAllSearchResults:"(Select All Search Results)",addCurrentSelectionToFilter:"Add current selection to filter",noMatches:"No matches."},w_=function(){function e(){}return e.prototype.getModelAsString=function(e,t){var i=(e||t.getModel()||{}).values,n=t.getValueModel();if(null==i||null==n)return"";var o=i.filter((function(e){return n.isKeyAvailable(e)})),r=o.length,s=o.slice(0,10).map((function(e){return t.getFormattedValue(e)}));return"(".concat(r,") ").concat(s.join(",")).concat(r>10?",...":"")},e}(),S_=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),E_=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},x_=function(e){function t(){var t=e.call(this,"setFilter")||this;return t.valueModel=null,t.setFilterParams=null,t.virtualList=null,t.caseSensitive=!1,t.convertValuesToStrings=!1,t.treeDataTreeList=!1,t.groupingTreeList=!1,t.hardRefreshVirtualList=!1,t.noValueFormatterSupplied=!1,t.filterModelFormatter=new w_,t.updateSetFilterOnParamsChange=function(e){var i;t.setFilterParams=e,t.convertValuesToStrings=!!e.convertValuesToStrings,t.caseSensitive=!!e.caseSensitive;var o=null!==(i=e.keyCreator)&&void 0!==i?i:e.colDef.keyCreator;t.setValueFormatter(e.valueFormatter,o,t.convertValuesToStrings,!!e.treeList,!!e.colDef.refData);var r=e.column.getId().startsWith(n.eHy);t.treeDataTreeList=t.gridOptionsService.get("treeData")&&!!e.treeList&&r,t.getDataPath=t.gridOptionsService.get("getDataPath"),t.groupingTreeList=!!t.columnModel.getRowGroupColumns().length&&!!e.treeList&&r,t.createKey=t.generateCreateKey(o,t.convertValuesToStrings,t.treeDataTreeList||t.groupingTreeList)},t}return S_(t,e),t.prototype.postConstruct=function(){e.prototype.postConstruct.call(this)},t.prototype.updateUiVisibility=function(){},t.prototype.createBodyTemplate=function(){return'\n            <div class="ag-set-filter">\n                <div ref="eFilterLoading" class="ag-filter-loading ag-hidden">'.concat(this.translateForSetFilter("loadingOoo"),'</div>\n                <ag-input-text-field class="ag-mini-filter" ref="eMiniFilter"></ag-input-text-field>\n                <div ref="eFilterNoMatches" class="ag-filter-no-matches ag-hidden">').concat(this.translateForSetFilter("noMatches"),'</div>\n                <div ref="eSetFilterList" class="ag-set-filter-list" role="presentation"></div>\n            </div>')},t.prototype.handleKeyDown=function(t){if(e.prototype.handleKeyDown.call(this,t),!t.defaultPrevented)switch(t.key){case n.VDZ.SPACE:this.handleKeySpace(t);break;case n.VDZ.ENTER:this.handleKeyEnter(t);break;case n.VDZ.LEFT:this.handleKeyLeft(t);break;case n.VDZ.RIGHT:this.handleKeyRight(t);break}},t.prototype.handleKeySpace=function(e){var t;null===(t=this.getComponentForKeyEvent(e))||void 0===t||t.toggleSelected()},t.prototype.handleKeyEnter=function(e){if(this.setFilterParams){var t=this.setFilterParams||{},i=t.excelMode,n=t.readOnly;i&&!n&&(e.preventDefault(),this.onBtApply(!1,!1,e),"mac"===this.setFilterParams.excelMode&&this.eMiniFilter.getInputElement().select())}},t.prototype.handleKeyLeft=function(e){var t;null===(t=this.getComponentForKeyEvent(e))||void 0===t||t.setExpanded(!1)},t.prototype.handleKeyRight=function(e){var t;null===(t=this.getComponentForKeyEvent(e))||void 0===t||t.setExpanded(!0)},t.prototype.getComponentForKeyEvent=function(e){var t,i=this.gridOptionsService.getDocument();if(this.eSetFilterList.contains(i.activeElement)&&this.virtualList){var n=this.virtualList.getLastFocusedRow();if(null!=n){var o=this.virtualList.getComponentAt(n);if(null!=o){e.preventDefault();var r=(null!==(t=this.setFilterParams)&&void 0!==t?t:{}).readOnly;if(!r)return o}}}},t.prototype.getCssIdentifier=function(){return"set-filter"},t.prototype.setModel=function(t){var i;return null==t&&null==(null===(i=this.valueModel)||void 0===i?void 0:i.getModel())?(this.setMiniFilter(null),n.j_S.resolve()):e.prototype.setModel.call(this,t)},t.prototype.refresh=function(t){var i,n,o,r=this;if(!e.prototype.refresh.call(this,t))return!1;var s=["treeList","treeListFormatter","treeListPathGetter","keyCreator","convertValuesToStrings","caseSensitive","comparator","suppressSelectAll","excelMode"];return!s.some((function(e){var i;return t[e]!==(null===(i=r.setFilterParams)||void 0===i?void 0:i[e])}))&&(!this.haveColDefParamsChanged(t.colDef)&&(e.prototype.updateParams.call(this,t),this.updateSetFilterOnParamsChange(t),this.updateMiniFilter(),t.cellRenderer===(null===(i=this.setFilterParams)||void 0===i?void 0:i.cellRenderer)&&t.valueFormatter===(null===(n=this.setFilterParams)||void 0===n?void 0:n.valueFormatter)||this.checkAndRefreshVirtualList(),null===(o=this.valueModel)||void 0===o||o.updateOnParamsChange(t).then((function(){var e;(null===(e=r.valueModel)||void 0===e?void 0:e.hasSelections())&&r.refreshFilterValues()})),!0))},t.prototype.haveColDefParamsChanged=function(e){var t,i=["keyCreator","filterValueGetter"],n=null===(t=this.setFilterParams)||void 0===t?void 0:t.colDef;return i.some((function(t){return e[t]!==(null===n||void 0===n?void 0:n[t])}))},t.prototype.setModelAndRefresh=function(e){var t=this;return this.valueModel?this.valueModel.setModel(e).then((function(){return t.checkAndRefreshVirtualList()})):n.j_S.resolve()},t.prototype.resetUiToDefaults=function(){return this.setMiniFilter(null),this.setModelAndRefresh(null)},t.prototype.setModelIntoUi=function(e){this.setMiniFilter(null);var t=null==e?null:e.values;return this.setModelAndRefresh(t)},t.prototype.getModelFromUi=function(){if(!this.valueModel)throw new Error("Value model has not been created.");var e=this.valueModel.getModel();return e?{values:e,filterType:this.getFilterType()}:null},t.prototype.getFilterType=function(){return"set"},t.prototype.getValueModel=function(){return this.valueModel},t.prototype.areModelsEqual=function(e,t){return null==e&&null==t||null!=e&&null!=t&&n._.areEqual(e.values,t.values)},t.prototype.setParams=function(t){var i,n=this;this.applyExcelModeOptions(t),e.prototype.setParams.call(this,t),this.updateSetFilterOnParamsChange(t);var o=null!==(i=t.keyCreator)&&void 0!==i?i:t.colDef.keyCreator;this.valueModel=new v_({filterParams:t,setIsLoading:function(e){return n.setIsLoading(e)},valueFormatterService:this.valueFormatterService,translate:function(e){return n.translateForSetFilter(e)},caseFormat:function(e){return n.caseFormat(e)},createKey:this.createKey,valueFormatter:this.valueFormatter,usingComplexObjects:!!o,gridOptionsService:this.gridOptionsService,columnModel:this.columnModel,valueService:this.valueService,treeDataTreeList:this.treeDataTreeList,groupingTreeList:this.groupingTreeList,addManagedListener:function(e,t){return n.addManagedListener(n.eventService,e,t)}}),this.initialiseFilterBodyUi(),this.addEventListenersForDataChanges()},t.prototype.onAddCurrentSelectionToFilterChange=function(e){if(!this.valueModel)throw new Error("Value model has not been created.");this.valueModel.setAddCurrentSelectionToFilter(e)},t.prototype.setValueFormatter=function(e,t,i,o,r){var s=e;
18if(!s){if(t&&!i&&!o)throw new Error("AG Grid: Must supply a Value Formatter in Set Filter params when using a Key Creator unless convertValuesToStrings is enabled");this.noValueFormatterSupplied=!0,r||(s=function(e){return n._.toStringOrNull(e.value)})}this.valueFormatter=s},t.prototype.generateCreateKey=function(e,t,i){var o=this;if(i&&!e)throw new 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?function(t,i){void 0===i&&(i=null);var r=o.getKeyCreatorParams(t,i);return n._.makeNull(e(r))}:t?function(e){return Array.isArray(e)?e:n._.makeNull(n._.toStringOrNull(e))}:function(e){return n._.makeNull(n._.toStringOrNull(e))}},t.prototype.getFormattedValue=function(e){var t,i=this.valueModel.getValue(e);this.noValueFormatterSupplied&&(this.treeDataTreeList||this.groupingTreeList)&&Array.isArray(i)&&(i=n._.last(i));var o=this.valueFormatterService.formatValue(this.setFilterParams.column,null,i,this.valueFormatter,!1);return null!==(t=null==o?n._.toStringOrNull(i):o)&&void 0!==t?t:this.translateForSetFilter("blanks")},t.prototype.applyExcelModeOptions=function(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,n._.warnOnce('The Set Filter Parameter "defaultToNothingSelected" value was ignored because it does not work when "excelMode" is used.'))},t.prototype.addEventListenersForDataChanges=function(){var e=this;this.isValuesTakenFromGrid()&&(this.addManagedListener(this.eventService,n.zW2.EVENT_CELL_VALUE_CHANGED,(function(t){e.setFilterParams&&t.column===e.setFilterParams.column&&e.syncAfterDataChange()})),this.addManagedPropertyListeners(["treeData","getDataPath","groupAllowUnbalanced"],(function(){e.syncAfterDataChange()})))},t.prototype.syncAfterDataChange=function(){var e=this;if(!this.valueModel)throw new Error("Value model has not been created.");var t=this.valueModel.refreshValues();return t.then((function(){e.checkAndRefreshVirtualList(),e.onBtApply(!1,!0)}))},t.prototype.setIsLoading=function(e){n._.setDisplayed(this.eFilterLoading,e),e||(this.hardRefreshVirtualList=!0)},t.prototype.initialiseFilterBodyUi=function(){this.initVirtualList(),this.initMiniFilter()},t.prototype.initVirtualList=function(){var e=this;if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");var t=this.localeService.getLocaleTextFunc(),i=t("ariaFilterList","Filter List"),o=!!this.setFilterParams.treeList,r=this.virtualList=this.createBean(new n.CPJ({cssIdentifier:"filter",ariaRole:o?"tree":"listbox",listName:i})),s=this.getRefElement("eSetFilterList");o&&s.classList.add("ag-set-filter-tree-list"),s&&s.appendChild(r.getGui());var a=this.setFilterParams.cellHeight;null!=a&&r.setRowHeight(a);var l=function(t,i){return e.createSetListItem(t,o,i)};r.setComponentCreator(l);var c,u=function(t,i){return e.updateSetListItem(t,i)};r.setComponentUpdater(u),c=this.setFilterParams.suppressSelectAll?new O_(this.valueModel):new T_(this.valueModel,(function(){return e.isSelectAllSelected()})),o&&(c=new D_(c)),r.setModel(c)},t.prototype.getSelectAllLabel=function(){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");var e=null!=this.valueModel.getMiniFilter()&&this.setFilterParams.excelMode?"selectAllSearchResults":"selectAll";return this.translateForSetFilter(e)},t.prototype.getAddSelectionToFilterLabel=function(){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");return this.translateForSetFilter("addCurrentSelectionToFilter")},t.prototype.createSetListItem=function(e,t,i){var n=this;if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");var o=this.valueModel.hasGroups(),r=this.isSelectedExpanded(e),s=r.isSelected,a=r.isExpanded,l=this.newSetListItemAttributes(e,t),c=l.value,u=l.depth,d=l.isGroup,p=l.hasIndeterminateExpandState,h=l.selectedListener,f=l.expandedListener,g={focusWrapper:i,value:c,params:this.setFilterParams,translate:function(e){return n.translateForSetFilter(e)},valueFormatter:this.valueFormatter,item:e,isSelected:s,isTree:t,depth:u,groupsExist:o,isGroup:d,isExpanded:a,hasIndeterminateExpandState:p},v=this.createBean(new C_(g));return v.addEventListener(C_.EVENT_SELECTION_CHANGED,h),f&&v.addEventListener(C_.EVENT_EXPANDED_CHANGED,f),v},t.prototype.newSetTreeItemAttributes=function(e,t){var i,n,o,r,s,a,l=this;if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");var c=this.valueModel.hasGroups();return e.key===s_.SELECT_ALL?{value:function(){return l.getSelectAllLabel()},isGroup:c,depth:e.depth,hasIndeterminateExpandState:!0,selectedListener:function(e){return l.onSelectAll(e.isSelected)},expandedListener:function(e){return l.onExpandAll(e.item,e.isExpanded)}}:e.key===s_.ADD_SELECTION_TO_FILTER?{value:function(){return l.getAddSelectionToFilterLabel()},depth:e.depth,isGroup:!1,hasIndeterminateExpandState:!1,selectedListener:function(e){l.onAddCurrentSelectionToFilterChange(e.isSelected)}}:e.children?{value:null!==(o=null===(n=(i=this.setFilterParams).treeListFormatter)||void 0===n?void 0:n.call(i,e.treeKey,e.depth,e.parentTreeKeys))&&void 0!==o?o:e.treeKey,depth:e.depth,isGroup:!0,selectedListener:function(e){return l.onGroupItemSelected(e.item,e.isSelected)},expandedListener:function(e){return l.onExpandedChanged(e.item,e.isExpanded)}}:{value:null!==(a=null===(s=(r=this.setFilterParams).treeListFormatter)||void 0===s?void 0:s.call(r,e.treeKey,e.depth,e.parentTreeKeys))&&void 0!==a?a:e.treeKey,depth:e.depth,selectedListener:function(e){return l.onItemSelected(e.item.key,e.isSelected)}}},t.prototype.newSetListItemAttributes=function(e,t){var i=this;if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");return this.isSetFilterModelTreeItem(e)?this.newSetTreeItemAttributes(e,t):e===s_.SELECT_ALL?{value:function(){return i.getSelectAllLabel()},selectedListener:function(e){return i.onSelectAll(e.isSelected)}}:e===s_.ADD_SELECTION_TO_FILTER?{value:function(){return i.getAddSelectionToFilterLabel()},selectedListener:function(e){i.onAddCurrentSelectionToFilterChange(e.isSelected)}}:{value:this.valueModel.getValue(e),selectedListener:function(e){return i.onItemSelected(e.item,e.isSelected)}}},t.prototype.updateSetListItem=function(e,t){var i=this.isSelectedExpanded(e),n=i.isSelected,o=i.isExpanded;t.refresh(e,n,o)},t.prototype.isSelectedExpanded=function(e){var t,i;return this.isSetFilterModelTreeItem(e)?(i=e.expanded,t=e.key===s_.SELECT_ALL?this.isSelectAllSelected():e.key===s_.ADD_SELECTION_TO_FILTER?this.valueModel.isAddCurrentSelectionToFilterChecked():e.children?this.areAllChildrenSelected(e):this.valueModel.isKeySelected(e.key)):t=e===s_.SELECT_ALL?this.isSelectAllSelected():e===s_.ADD_SELECTION_TO_FILTER?this.valueModel.isAddCurrentSelectionToFilterChecked():this.valueModel.isKeySelected(e),{isSelected:t,isExpanded:i}},t.prototype.isSetFilterModelTreeItem=function(e){return void 0!==(null===e||void 0===e?void 0:e.treeKey)},t.prototype.initMiniFilter=function(){var e=this;if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");var t=this,i=t.eMiniFilter,n=t.localeService,o=n.getLocaleTextFunc();i.setDisplayed(!this.setFilterParams.suppressMiniFilter),i.setValue(this.valueModel.getMiniFilter()),i.onValueChange((function(){return e.onMiniFilterInput()}
18)),i.setInputAriaLabel(o("ariaSearchFilterValues","Search filter values")),this.addManagedListener(i.getInputElement(),"keydown",(function(t){return e.onMiniFilterKeyDown(t)}))},t.prototype.updateMiniFilter=function(){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");var e=this.eMiniFilter;e.isDisplayed()!==!this.setFilterParams.suppressMiniFilter&&e.setDisplayed(!this.setFilterParams.suppressMiniFilter);var t=this.valueModel.getMiniFilter();e.getValue()!==t&&e.setValue(t)},t.prototype.afterGuiAttached=function(t){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");e.prototype.afterGuiAttached.call(this,t),this.resetExpansion(),this.refreshVirtualList();var i=this.eMiniFilter;i.setInputPlaceholder(this.translateForSetFilter("searchOoo")),t&&t.suppressFocus||i.getFocusableElement().focus()},t.prototype.afterGuiDetached=function(){var t,i;e.prototype.afterGuiDetached.call(this),(null===(t=this.setFilterParams)||void 0===t?void 0:t.excelMode)&&this.resetMiniFilter();var n=this.getModel();!(null===(i=this.setFilterParams)||void 0===i?void 0:i.excelMode)&&this.areModelsEqual(n,this.getModelFromUi())||(this.resetUiToActiveModel(n),this.showOrHideResults())},t.prototype.applyModel=function(t){var i=this;if(void 0===t&&(t="api"),!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");this.setFilterParams.excelMode&&"rowDataUpdated"!==t&&this.valueModel.isEverythingVisibleSelected()&&this.valueModel.selectAllMatchingMiniFilter();var n=this.valueModel.showAddCurrentSelectionToFilter()&&this.valueModel.isAddCurrentSelectionToFilterChecked();if(n&&!this.getModel())return!1;var o=e.prototype.applyModel.call(this,t),r=this.getModel();return r?(n||this.valueModel.setAppliedModelKeys(new Set),r.values.forEach((function(e){i.valueModel.addToAppliedModelKeys(e)}))):n||this.valueModel.setAppliedModelKeys(null),o},t.prototype.isModelValid=function(e){return!this.setFilterParams||!this.setFilterParams.excelMode||(null==e||e.values.length>0)},t.prototype.doesFilterPass=function(e){var t=this;if(!this.setFilterParams||!this.valueModel||!this.valueModel.getCaseFormattedAppliedModelKeys())return!0;if(!this.valueModel.hasAnyAppliedModelKey())return!1;var i=e.node,n=e.data;if(this.treeDataTreeList)return this.doesFilterPassForTreeData(i,n);if(this.groupingTreeList)return this.doesFilterPassForGrouping(i);var o=this.getValueFromNode(i);return this.convertValuesToStrings?this.doesFilterPassForConvertValuesToString(i,o):null!=o&&Array.isArray(o)?0===o.length?this.valueModel.hasAppliedModelKey(null):o.some((function(e){return t.isInAppliedModel(t.createKey(e,i))})):this.isInAppliedModel(this.createKey(o,i))},t.prototype.doesFilterPassForConvertValuesToString=function(e,t){var i=this,n=this.createKey(t,e);return null!=n&&Array.isArray(n)?0===n.length?this.valueModel.hasAppliedModelKey(null):n.some((function(e){return i.isInAppliedModel(e)})):this.isInAppliedModel(n)},t.prototype.doesFilterPassForTreeData=function(e,t){var i;return!(null===(i=e.childrenAfterGroup)||void 0===i?void 0:i.length)&&this.isInAppliedModel(this.createKey(this.checkMakeNullDataPath(this.getDataPath(t))))},t.prototype.doesFilterPassForGrouping=function(e){var t=this,i=this.columnModel.getRowGroupColumns().map((function(i){return t.valueService.getKeyForNode(i,e)}));return i.push(this.getValueFromNode(e)),this.isInAppliedModel(this.createKey(this.checkMakeNullDataPath(i)))},t.prototype.checkMakeNullDataPath=function(e){return e&&(e=e.map((function(e){return n._.toStringOrNull(n._.makeNull(e))}))),(null===e||void 0===e?void 0:e.some((function(e){return null==e})))?null:e},t.prototype.isInAppliedModel=function(e){return this.valueModel.hasAppliedModelKey(e)},t.prototype.getValueFromNode=function(e){return this.setFilterParams.getValue(e)},t.prototype.getKeyCreatorParams=function(e,t){return void 0===t&&(t=null),{value:e,colDef:this.setFilterParams.colDef,column:this.setFilterParams.column,node:t,data:null===t||void 0===t?void 0:t.data,api:this.setFilterParams.api,columnApi:this.setFilterParams.columnApi,context:this.setFilterParams.context}},t.prototype.onNewRowsLoaded=function(){this.isValuesTakenFromGrid()&&this.syncAfterDataChange()},t.prototype.isValuesTakenFromGrid=function(){if(!this.valueModel)return!1;var e=this.valueModel.getValuesType();return e===XD.TAKEN_FROM_GRID_VALUES},t.prototype.setFilterValues=function(e){var t=this;if(!this.valueModel)throw new Error("Value model has not been created.");this.valueModel.overrideValues(e).then((function(){t.checkAndRefreshVirtualList(),t.onUiChanged()}))},t.prototype.resetFilterValues=function(){if(!this.valueModel)throw new Error("Value model has not been created.");this.valueModel.setValuesType(XD.TAKEN_FROM_GRID_VALUES),this.syncAfterDataChange()},t.prototype.refreshFilterValues=function(){var e=this;if(!this.valueModel)throw new Error("Value model has not been created.");this.valueModel.isInitialised()&&this.valueModel.refreshValues().then((function(){e.checkAndRefreshVirtualList(),e.onUiChanged()}))},t.prototype.onAnyFilterChanged=function(){var e=this;setTimeout((function(){if(e.isAlive()){if(!e.valueModel)throw new Error("Value model has not been created.");e.valueModel.refreshAfterAnyFilterChanged().then((function(t){t&&(e.checkAndRefreshVirtualList(),e.showOrHideResults())}))}}),0)},t.prototype.onMiniFilterInput=function(){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");
18if(this.valueModel.setMiniFilter(this.eMiniFilter.getValue())){var e=this.setFilterParams||{},t=e.applyMiniFilterWhileTyping,i=e.readOnly;!i&&t?this.filterOnAllVisibleValues(!1):this.updateUiAfterMiniFilterChange()}},t.prototype.updateUiAfterMiniFilterChange=function(){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");var e=this.setFilterParams||{},t=e.excelMode,i=e.readOnly;null==t||i?this.checkAndRefreshVirtualList():null==this.valueModel.getMiniFilter()?this.resetUiToActiveModel(this.getModel()):(this.valueModel.selectAllMatchingMiniFilter(!0),this.checkAndRefreshVirtualList(),this.onUiChanged()),this.showOrHideResults()},t.prototype.showOrHideResults=function(){if(!this.valueModel)throw new Error("Value model has not been created.");var e=null!=this.valueModel.getMiniFilter()&&this.valueModel.getDisplayedValueCount()<1;n._.setDisplayed(this.eNoMatches,e),n._.setDisplayed(this.eSetFilterList,!e)},t.prototype.resetMiniFilter=function(){var e;this.eMiniFilter.setValue(null,!0),null===(e=this.valueModel)||void 0===e||e.setMiniFilter(null)},t.prototype.resetUiToActiveModel=function(e,t){var i=this;this.setModelAndRefresh(null==e?null:e.values).then((function(){i.onUiChanged(!1,"prevent"),null===t||void 0===t||t()}))},t.prototype.handleCancelEnd=function(t){this.setMiniFilter(null),e.prototype.handleCancelEnd.call(this,t)},t.prototype.onMiniFilterKeyDown=function(e){var t=this.setFilterParams||{},i=t.excelMode,o=t.readOnly;e.key!==n.VDZ.ENTER||i||o||this.filterOnAllVisibleValues()},t.prototype.filterOnAllVisibleValues=function(e){void 0===e&&(e=!0);var t=(this.setFilterParams||{}).readOnly;if(!this.valueModel)throw new Error("Value model has not been created.");if(t)throw new Error("Unable to filter in readOnly mode.");this.valueModel.selectAllMatchingMiniFilter(!0),this.checkAndRefreshVirtualList(),this.onUiChanged(!1,e?"immediately":"debounce"),this.showOrHideResults()},t.prototype.focusRowIfAlive=function(e){var t=this;null!=e&&window.setTimeout((function(){if(!t.virtualList)throw new Error("Virtual list has not been created.");t.isAlive()&&t.virtualList.focusRow(e)}),0)},t.prototype.onSelectAll=function(e){if(!this.valueModel)throw new Error("Value model has not been created.");if(!this.virtualList)throw new Error("Virtual list has not been created.");e?this.valueModel.selectAllMatchingMiniFilter():this.valueModel.deselectAllMatchingMiniFilter(),this.refreshAfterSelection()},t.prototype.onGroupItemSelected=function(e,t){var i=this,n=function(e){e.children?e.children.forEach((function(e){return n(e)})):i.selectItem(e.key,t)};n(e),this.refreshAfterSelection()},t.prototype.onItemSelected=function(e,t){if(!this.valueModel)throw new Error("Value model has not been created.");if(!this.virtualList)throw new Error("Virtual list has not been created.");this.selectItem(e,t),this.refreshAfterSelection()},t.prototype.selectItem=function(e,t){t?this.valueModel.selectKey(e):this.valueModel.deselectKey(e)},t.prototype.onExpandAll=function(e,t){var i=function(e){e.filterPasses&&e.available&&e.children&&(e.children.forEach((function(e){return i(e)})),e.expanded=t)};i(e),this.refreshAfterExpansion()},t.prototype.onExpandedChanged=function(e,t){e.expanded=t,this.refreshAfterExpansion()},t.prototype.refreshAfterExpansion=function(){var e=this.virtualList.getLastFocusedRow();this.valueModel.updateDisplayedValues("expansion"),this.checkAndRefreshVirtualList(),this.focusRowIfAlive(e)},t.prototype.refreshAfterSelection=function(){var e=this.virtualList.getLastFocusedRow();this.checkAndRefreshVirtualList(),this.onUiChanged(),this.focusRowIfAlive(e)},t.prototype.setMiniFilter=function(e){this.eMiniFilter.setValue(e),this.onMiniFilterInput()},t.prototype.getMiniFilter=function(){return this.valueModel?this.valueModel.getMiniFilter():null},t.prototype.checkAndRefreshVirtualList=function(){if(!this.virtualList)throw new Error("Virtual list has not been created.");this.virtualList.refresh(!this.hardRefreshVirtualList),this.hardRefreshVirtualList&&(this.hardRefreshVirtualList=!1)},t.prototype.getFilterKeys=function(){return this.valueModel?this.valueModel.getKeys():[]},t.prototype.getFilterValues=function(){return this.valueModel?this.valueModel.getValues():[]},t.prototype.getValues=function(){return this.getFilterKeys()},t.prototype.refreshVirtualList=function(){this.setFilterParams&&this.setFilterParams.refreshValuesOnOpen?this.refreshFilterValues():this.checkAndRefreshVirtualList()},t.prototype.translateForSetFilter=function(e){var t=this.localeService.getLocaleTextFunc();return t(e,b_[e])},t.prototype.isSelectAllSelected=function(){if(!this.setFilterParams||!this.valueModel)return!1;if(this.setFilterParams.defaultToNothingSelected){if(this.valueModel.hasSelections()&&this.valueModel.isEverythingVisibleSelected())return!0;
18if(this.valueModel.isNothingVisibleSelected())return!1}else{if(this.valueModel.hasSelections()&&this.valueModel.isNothingVisibleSelected())return!1;if(this.valueModel.isEverythingVisibleSelected())return!0}},t.prototype.areAllChildrenSelected=function(e){var t=this,i=function(e){if(e.children){var n=!1,o=!1,r=e.children.some((function(e){if(!e.filterPasses||!e.available)return!1;var t=i(e);return void 0===t||(t?n=!0:o=!0,n&&o)}));return r?void 0:n}return t.valueModel.isKeySelected(e.key)};return this.setFilterParams.defaultToNothingSelected?this.valueModel.hasSelections()&&i(e):i(e)},t.prototype.destroy=function(){null!=this.virtualList&&(this.virtualList.destroy(),this.virtualList=null),e.prototype.destroy.call(this)},t.prototype.caseFormat=function(e){return null==e||"string"!==typeof e||this.caseSensitive?e:e.toUpperCase()},t.prototype.resetExpansion=function(){var e,t;if(null===(e=this.setFilterParams)||void 0===e?void 0:e.treeList){var i=null===(t=this.valueModel)||void 0===t?void 0:t.getSelectAllItem();if(this.isSetFilterModelTreeItem(i)){var n=function(e){e.children&&(e.children.forEach((function(e){return n(e)})),e.expanded=!1)};n(i),this.valueModel.updateDisplayedValues("expansion")}}},t.prototype.getModelAsString=function(e){return this.filterModelFormatter.getModelAsString(e,this)},t.prototype.getPositionableElement=function(){return this.eSetFilterList},E_([(0,n.cqo)("eMiniFilter")],t.prototype,"eMiniFilter",void 0),E_([(0,n.cqo)("eFilterLoading")],t.prototype,"eFilterLoading",void 0),E_([(0,n.cqo)("eSetFilterList")],t.prototype,"eSetFilterList",void 0),E_([(0,n.cqo)("eFilterNoMatches")],t.prototype,"eNoMatches",void 0),E_([(0,n.fsG)("valueFormatterService")],t.prototype,"valueFormatterService",void 0),E_([(0,n.fsG)("columnModel")],t.prototype,"columnModel",void 0),E_([(0,n.fsG)("valueService")],t.prototype,"valueService",void 0),t}(n.AGU),O_=function(){function e(e){this.model=e}return e.prototype.getRowCount=function(){return this.model.getDisplayedValueCount()},e.prototype.getRow=function(e){return this.model.getDisplayedItem(e)},e.prototype.areRowsEqual=function(e,t){return e===t},e}(),T_=function(){function e(e,t){this.model=e,this.isSelectAllSelected=t}return e.prototype.getRowCount=function(){var e=this.model.showAddCurrentSelectionToFilter(),t=e?2:1;return this.model.getDisplayedValueCount()+t},e.prototype.getRow=function(e){if(0===e)return this.model.getSelectAllItem();var t=this.model.showAddCurrentSelectionToFilter(),i=t?2:1;return 1===e&&t?this.model.getAddSelectionToFilterItem():this.model.getDisplayedItem(e-i)},e.prototype.areRowsEqual=function(e,t){return e===t},e}(),D_=function(){function e(e){this.model=e}return e.prototype.getRowCount=function(){return this.model.getRowCount()},e.prototype.getRow=function(e){return this.model.getRow(e)},e.prototype.areRowsEqual=function(e,t){return null==e&&null==t||null!=e&&null!=t&&e.treeKey===t.treeKey&&e.depth===t.depth},e}(),R_=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),A_=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},__=function(e){function t(){var t=e.call(this,'\n            <div class="ag-floating-filter-input ag-set-floating-filter-input" role="presentation">\n                <ag-input-text-field ref="eFloatingFilterText"></ag-input-text-field>\n            </div>')||this;return t.availableValuesListenerAdded=!1,t.filterModelFormatter=new w_,t}return R_(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this)},t.prototype.init=function(e){var t=this;this.params=e,this.eFloatingFilterText.setDisabled(!0).addGuiEventListener("click",(function(){return t.params.showParentFilter()})),this.setParams(e)},t.prototype.setParams=function(e){var t=this.columnModel.getDisplayNameForColumn(e.column,"header",!0),i=this.localeService.getLocaleTextFunc();this.eFloatingFilterText.setInputAriaLabel("".concat(t," ").concat(i("ariaFilterInput","Filter Input")))},t.prototype.onParamsUpdated=function(e){this.params=e,this.setParams(e)},t.prototype.onParentModelChanged=function(e){this.updateFloatingFilterText(e)},t.prototype.parentSetFilterInstance=function(e){this.params.parentFilterInstance((function(t){if(!(t instanceof x_))throw new Error("AG Grid - SetFloatingFilter expects SetFilter as its parent");e(t)}))},t.prototype.addAvailableValuesListener=function(){var e=this;this.parentSetFilterInstance((function(t){var i=t.getValueModel();i&&e.addManagedListener(i,v_.EVENT_AVAILABLE_VALUES_CHANGED,(function(){return e.updateFloatingFilterText()}))})),this.availableValuesListenerAdded=!0},t.prototype.updateFloatingFilterText=function(e){var t=this;this.availableValuesListenerAdded||this.addAvailableValuesListener(),this.parentSetFilterInstance((function(i){t.eFloatingFilterText.setValue(t.filterModelFormatter.getModelAsString(e,i))}))},A_([(0,n.cqo)("eFloatingFilterText")],t.prototype,"eFloatingFilterText",void 0),A_([(0,n.fsG)("columnModel")],t.prototype,"columnModel",void 0),t}(n.wA2),P_="31.0.0",M_={version:P_,moduleName:n.GXE.SetFilterModule,beans:[],userComponents:[{componentName:"agSetColumnFilter",componentClass:x_},{componentName:"agSetColumnFloatingFilter",componentClass:__}],dependantModules:[y]},k_=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),N_=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},L_=function(e){function t(){var t=e.call(this)||this;return t.allComponents={},t}return k_(t,e),t.prototype.registerStatusPanel=function(e,t){this.allComponents[e]=t},t.prototype.unregisterStatusPanel=function(e){delete this.allComponents[e]},t.prototype.unregisterAllComponents=function(){this.allComponents={}},t.prototype.getStatusPanel=function(e){return this.allComponents[e]},t=N_([(0,n.Vu6)("statusBarService")],t),t}(n.AS9),I_=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),F_=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},G_=function(e){function t(){var i=e.call(this,t.TEMPLATE)||this;return i.compDestroyFunctions=[],i}return I_(t,e),t.prototype.postConstruct=function(){this.processStatusPanels(),this.addManagedPropertyListeners(["statusBar"],this.handleStatusBarChanged.bind(this))},t.prototype.processStatusPanels=function(){var e,t=null===(e=this.gridOptionsService.get("statusBar"))||void 0===e?void 0:e.statusPanels;if(t){var i=t.filter((function(e){return"left"===e.align}));this.createAndRenderComponents(i,this.eStatusBarLeft);var n=t.filter((function(e){return"center"===e.align}));this.createAndRenderComponents(n,this.eStatusBarCenter);var o=t.filter((function(e){return!e.align||"right"===e.align}));this.createAndRenderComponents(o,this.eStatusBarRight)}else this.setDisplayed(!1)},t.prototype.handleStatusBarChanged=function(){var e,t=null===(e=this.gridOptionsService.get("statusBar"))||void 0===e?void 0:e.statusPanels,i=Array.isArray(t)&&t.length>0;this.setDisplayed(i),this.resetStatusBar(),i&&this.processStatusPanels()},t.prototype.resetStatusBar=function(){this.eStatusBarLeft.innerHTML="",this.eStatusBarCenter.innerHTML="",this.eStatusBarRight.innerHTML="",this.destroyComponents(),this.statusBarService.unregisterAllComponents()},t.prototype.destroyComponents=function(){this.compDestroyFunctions.forEach((function(e){return e()})),this.compDestroyFunctions=[]},t.prototype.createAndRenderComponents=function(e,t){var i=this,o=[];e.forEach((function(e){var t={}
vendor: 12,799 bytes, line 18
18,n=i.userComponentFactory.getStatusPanelCompDetails(e,t),r=n.newAgStackInstance();r&&o.push({key:e.key||e.statusPanel,promise:r})})),n.j_S.all(o.map((function(e){return e.promise}))).then((function(){o.forEach((function(e){e.promise.then((function(n){var o=function(){i.getContext().destroyBean(n)};i.isAlive()?(i.statusBarService.registerStatusPanel(e.key,n),t.appendChild(n.getGui()),i.compDestroyFunctions.push(o)):o()}))}))}))},t.TEMPLATE='<div class="ag-status-bar">\n            <div ref="eStatusBarLeft" class="ag-status-bar-left" role="status"></div>\n            <div ref="eStatusBarCenter" class="ag-status-bar-center" role="status"></div>\n            <div ref="eStatusBarRight" class="ag-status-bar-right" role="status"></div>\n        </div>',F_([(0,n.fsG)("userComponentFactory")],t.prototype,"userComponentFactory",void 0),F_([(0,n.fsG)("statusBarService")],t.prototype,"statusBarService",void 0),F_([(0,n.cqo)("eStatusBarLeft")],t.prototype,"eStatusBarLeft",void 0),F_([(0,n.cqo)("eStatusBarCenter")],t.prototype,"eStatusBarCenter",void 0),F_([(0,n.cqo)("eStatusBarRight")],t.prototype,"eStatusBarRight",void 0),F_([n.NqP],t.prototype,"postConstruct",null),F_([n.FXL],t.prototype,"destroyComponents",null),t}(n.wA2),V_=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),B_=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},j_=function(e){function t(){return e.call(this,t.TEMPLATE)||this}return V_(t,e),t.prototype.setLabel=function(e,t){this.setDisplayed(!1);var i=this.localeService.getLocaleTextFunc();this.eLabel.innerHTML=i(e,t)},t.prototype.setValue=function(e){this.eValue.innerHTML=e},t.TEMPLATE='<div class="ag-status-name-value">\n            <span ref="eLabel"></span>:&nbsp;\n            <span ref="eValue" class="ag-status-name-value-value"></span>\n        </div>',B_([(0,n.cqo)("eLabel")],t.prototype,"eLabel",void 0),B_([(0,n.cqo)("eValue")],t.prototype,"eValue",void 0),t}(n.wA2),H_=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),W_=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},U_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return H_(t,e),t.prototype.postConstruct=function(){"clientSide"===this.gridApi.getModel().getType()?(this.setLabel("totalAndFilteredRows","Rows"),this.addCssClass("ag-status-panel"),this.addCssClass("ag-status-panel-total-and-filtered-row-count"),this.setDisplayed(!0),this.addManagedListener(this.eventService,n.zW2.EVENT_MODEL_UPDATED,this.onDataChanged.bind(this)),this.onDataChanged()):console.warn("AG Grid: agTotalAndFilteredRowCountComponent should only be used with the client side row model.")},t.prototype.onDataChanged=function(){var e=this.localeService.getLocaleTextFunc(),t=e("thousandSeparator",","),i=e("decimalSeparator","."),o=n._.formatNumberCommas(this.getFilteredRowCountValue(),t,i),r=n._.formatNumberCommas(this.getTotalRowCount(),t,i);if(o===r)this.setValue(o);else{var s=this.localeService.getLocaleTextFunc();this.setValue("".concat(o," ").concat(s("of","of")," ").concat(r))}},t.prototype.getFilteredRowCountValue=function(){var e=0;return this.gridApi.forEachNodeAfterFilter((function(t){t.group||e++})),e},t.prototype.getTotalRowCount=function(){var e=0;return this.gridApi.forEachNode((function(t){t.group||e++})),e},t.prototype.init=function(){},t.prototype.destroy=function(){e.prototype.destroy.call(this)},W_([(0,n.fsG)("gridApi")],t.prototype,"gridApi",void 0),W_([n.NqP],t.prototype,"postConstruct",null),t}(j_),z_=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),K_=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Y_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z_(t,e),t.prototype.postConstruct=function(){if(this.setLabel("filteredRows","Filtered"),"clientSide"===this.gridApi.getModel().getType()){this.addCssClass("ag-status-panel"),this.addCssClass("ag-status-panel-filtered-row-count"),this.setDisplayed(!0);var e=this.onDataChanged.bind(this);this.addManagedListener(this.eventService,n.zW2.EVENT_MODEL_UPDATED,e),e()}else console.warn("AG Grid: agFilteredRowCountComponent should only be used with the client side row model.")},t.prototype.onDataChanged=function(){var e=this.getTotalRowCountValue(),t=this.getFilteredRowCountValue(),i=this.localeService.getLocaleTextFunc(),o=i("thousandSeparator",","),r=i("decimalSeparator",".");this.setValue(n._.formatNumberCommas(t,o,r)),this.setDisplayed(e!==t)},t.prototype.getTotalRowCountValue=function(){var e=0;return this.gridApi.forEachNode((function(t){return e+=1})),e},t.prototype.getFilteredRowCountValue=function(){var e=0;return this.gridApi.forEachNodeAfterFilter((function(t){t.group||(e+=1)})),e},t.prototype.init=function(){},t.prototype.destroy=function(){e.prototype.destroy.call(this)},K_([(0,n.fsG)("gridApi")],t.prototype,"gridApi",void 0),K_([n.NqP],t.prototype,"postConstruct",null),t}(j_),q_=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),X_=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},$_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return q_(t,e),t.prototype.postConstruct=function(){this.setLabel("totalRows","Total Rows"),"clientSide"===this.gridApi.getModel().getType()?(this.addCssClass("ag-status-panel"),this.addCssClass("ag-status-panel-total-row-count"),this.setDisplayed(!0),this.addManagedListener(this.eventService,n.zW2.EVENT_MODEL_UPDATED,this.onDataChanged.bind(this)),this.onDataChanged()):console.warn("AG Grid: agTotalRowCountComponent should only be used with the client side row model.")},t.prototype.onDataChanged=function(){var e=this.localeService.getLocaleTextFunc(),t=e("thousandSeparator",","),i=e("decimalSeparator",".");this.setValue(n._.formatNumberCommas(this.getRowCountValue(),t,i))},t.prototype.getRowCountValue=function(){var e=0;return this.gridApi.forEachLeafNode((function(t){return e+=1})),e},t.prototype.init=function(){},t.prototype.destroy=function(){e.prototype.destroy.call(this)},X_([(0,n.fsG)("gridApi")],t.prototype,"gridApi",void 0),X_([n.NqP],t.prototype,"postConstruct",null),t}(j_),Z_=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),J_=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Q_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Z_(t,e),t.prototype.postConstruct=function(){if(this.isValidRowModel()){this.setLabel("selectedRows","Selected"),this.addCssClass("ag-status-panel"),this.addCssClass("ag-status-panel-selected-row-count"),this.onRowSelectionChanged();var e=this.onRowSelectionChanged.bind(this);this.addManagedListener(this.eventService,n.zW2.EVENT_MODEL_UPDATED,e),this.addManagedListener(this.eventService,n.zW2.EVENT_SELECTION_CHANGED,e)}else console.warn("AG Grid: agSelectedRowCountComponent should only be used with the client and server side row model.")},t.prototype.isValidRowModel=function(){var e=this.gridApi.getModel().getType();return"clientSide"===e||"serverSide"===e},t.prototype.onRowSelectionChanged=function(){var e=this.selectionService.getSelectionCount();if(e<0)return this.setValue("?"),void this.setDisplayed(!0);var t=this.localeService.getLocaleTextFunc(),i=t("thousandSeparator",","),o=t("decimalSeparator",".");this.setValue(n._.formatNumberCommas(e,i,o)),this.setDisplayed(e>0)},t.prototype.init=function(){},t.prototype.destroy=function(){e.prototype.destroy.call(this)},J_([(0,n.fsG)("gridApi")],t.prototype,"gridApi",void 0),J_([(0,n.fsG)("selectionService")],t.prototype,"selectionService",void 0),J_([n.NqP],t.prototype,"postConstruct",null),t}(j_),eP=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),tP=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},iP=function(e){function t(){return e.call(this,t.TEMPLATE)||this}return eP(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this)},t.prototype.postConstruct=function(){this.isValidRowModel()?(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.addManagedListener(this.eventService,n.zW2.EVENT_RANGE_SELECTION_CHANGED,this.onRangeSelectionChanged.bind(this)),this.addManagedListener(this.eventService,n.zW2.EVENT_MODEL_UPDATED,this.onRangeSelectionChanged.bind(this))):console.warn("AG Grid: agAggregationComponent should only be used with the client and server side row model.")},t.prototype.isValidRowModel=function(){var e=this.gridApi.getModel().getType();return"clientSide"===e||"serverSide"===e},t.prototype.init=function(){},t.prototype.setAggregationComponentValue=function(e,t,i){var o=this.getAggregationValueComponent(e);
18if(n._.exists(o)&&o){var r=this.localeService.getLocaleTextFunc(),s=r("thousandSeparator",","),a=r("decimalSeparator",".");o.setValue(n._.formatNumberTwoDecimalPlacesAndCommas(t,s,a)),o.setDisplayed(i)}},t.prototype.getAggregationValueComponent=function(e){var t="".concat(e,"AggregationComp"),i=null,o=this.gridOptionsService.get("statusBar"),r=n._.exists(o)&&o?o.statusPanels.find((function(e){return"agAggregationComponent"===e.statusPanel})):null;return n._.exists(r)&&r?(!n._.exists(r.statusPanelParams)||n._.exists(r.statusPanelParams)&&n._.exists(r.statusPanelParams.aggFuncs)&&n._.exists(r.statusPanelParams.aggFuncs.find((function(t){return t===e}))))&&(i=this[t]):i=this[t],i},t.prototype.onRangeSelectionChanged=function(){var e=this,t=this.rangeService?this.rangeService.getCellRanges():void 0,i=0,o=0,r=0,s=null,a=null,l={};t&&!n._.missingOrEmpty(t)&&t.forEach((function(t){var c=e.rangeService.getRangeStartRow(t),u=e.rangeService.getRangeEndRow(t);while(1){var d=n._.missing(c)||!c||e.rowPositionUtils.before(u,c);if(d||!c||!t.columns)break;t.columns.forEach((function(t){if(null!==c){var u=e.cellPositionUtils.createId({rowPinned:c.rowPinned,column:t,rowIndex:c.rowIndex});if(!l[u]){l[u]=!0;var d=e.rowRenderer.getRowNode(c);if(!n._.missing(d)){var p=e.valueService.getValue(t,d);n._.missing(p)||""===p||(o++,"object"===typeof p&&"value"in p&&(p=p.value,""===p)||("string"===typeof p&&(p=Number(p)),"number"!==typeof p||isNaN(p)||(i+=p,(null===a||p>a)&&(a=p),(null===s||p<s)&&(s=p),r++)))}}}})),c=e.cellNavigationService.getRowBelow(c)}}));var c=o>1,u=r>1;this.setAggregationComponentValue("count",o,c),this.setAggregationComponentValue("sum",i,u),this.setAggregationComponentValue("min",s,u),this.setAggregationComponentValue("max",a,u),this.setAggregationComponentValue("avg",i/r,u)},t.TEMPLATE='<div class="ag-status-panel ag-status-panel-aggregations">\n            <ag-name-value ref="avgAggregationComp"></ag-name-value>\n            <ag-name-value ref="countAggregationComp"></ag-name-value>\n            <ag-name-value ref="minAggregationComp"></ag-name-value>\n            <ag-name-value ref="maxAggregationComp"></ag-name-value>\n            <ag-name-value ref="sumAggregationComp"></ag-name-value>\n        </div>',tP([(0,n.FiY)("rangeService")],t.prototype,"rangeService",void 0),tP([(0,n.fsG)("valueService")],t.prototype,"valueService",void 0),tP([(0,n.fsG)("cellNavigationService")],t.prototype,"cellNavigationService",void 0),tP([(0,n.fsG)("rowRenderer")],t.prototype,"rowRenderer",void 0),tP([(0,n.fsG)("gridApi")],t.prototype,"gridApi",void 0),tP([(0,n.fsG)("cellPositionUtils")],t.prototype,"cellPositionUtils",void 0),tP([(0,n.fsG)("rowPositionUtils")],t.prototype,"rowPositionUtils",void 0),tP([(0,n.cqo)("sumAggregationComp")],t.prototype,"sumAggregationComp",void 0),tP([(0,n.cqo)("countAggregationComp")],t.prototype,"countAggregationComp",void 0),tP([(0,n.cqo)("minAggregationComp")],t.prototype,"minAggregationComp",void 0),tP([(0,n.cqo)("maxAggregationComp")],t.prototype,"maxAggregationComp",void 0),tP([(0,n.cqo)("avgAggregationComp")],t.prototype,"avgAggregationComp",void 0),tP([n.NqP],t.prototype,"postConstruct",null),t}(n.wA2),nP="31.0.0",oP={version:nP,moduleName:n.GXE.StatusBarModule,beans:[L_],agStackComponents:[{componentName:"AgStatusBar",componentClass:G_},{componentName:"AgNameValue",componentClass:j_}],userComponents:[{componentName:"agAggregationComponent",componentClass:iP},{componentName:"agSelectedRowCountComponent",componentClass:Q_},{componentName:"agTotalRowCountComponent",componentClass:$_},{componentName:"agFilteredRowCountComponent",componentClass:Y_},{componentName:"agTotalAndFilteredRowCountComponent",componentClass:U_}],dependantModules:[y]},rP="31.0.0",sP=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),aP=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},lP=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.firstRow=-1,t.lastRow=-1,t.rowCount=-1,t.rowNodesByIndex={},t}return sP(t,e),t.prototype.ensureRowHeightsValid=function(e,t,i,n){return!1},t.prototype.init=function(){var e=this;this.rowHeight=this.gridOptionsService.getRowHeightAsNumber(),this.addManagedListener(this.eventService,n.zW2.EVENT_VIEWPORT_CHANGED,this.onViewportChanged.bind(this)),this.addManagedPropertyListener("viewportDatasource",(function(){return e.updateDatasource()})),this.addManagedPropertyListener("rowHeight",(function(){e.rowHeight=e.gridOptionsService.getRowHeightAsNumber(),e.updateRowHeights()}))},t.prototype.start=function(){this.updateDatasource()},t.prototype.isLastRowIndexKnown=function(){return!0},t.prototype.destroyDatasource=function(){this.viewportDatasource&&(this.viewportDatasource.destroy&&this.viewportDatasource.destroy(),this.rowRenderer.datasourceChanged(),this.firstRow=-1,this.lastRow=-1)},t.prototype.updateDatasource=function(){var e=this.gridOptionsService.get("viewportDatasource");e&&this.setViewportDatasource(e)},t.prototype.getViewportRowModelPageSize=function(){return this.gridOptionsService.get("viewportRowModelPageSize")},t.prototype.getViewportRowModelBufferSize=function(){return this.gridOptionsService.get("viewportRowModelBufferSize")},t.prototype.calculateFirstRow=function(e){var t=this.getViewportRowModelBufferSize(),i=this.getViewportRowModelPageSize(),n=e-t;return n<0?0:Math.floor(n/i)*i},t.prototype.calculateLastRow=function(e){if(-1===e)return e;var t=this.getViewportRowModelBufferSize(),i=this.getViewportRowModelPageSize(),n=e+t,o=Math.ceil(n/i)*i,r=this.rowCount-1;return Math.min(o,r)},t.prototype.onViewportChanged=function(e){var 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))},t.prototype.purgeRowsNotInViewport=function(){var e=this;
18Object.keys(this.rowNodesByIndex).forEach((function(t){var i=parseInt(t,10);if(i<e.firstRow||i>e.lastRow){if(e.isRowFocused(i))return;delete e.rowNodesByIndex[i]}}))},t.prototype.isRowFocused=function(e){var t=this.focusService.getFocusCellToUseAfterRefresh();if(!t)return!1;if(null!=t.rowPinned)return!1;var i=t.rowIndex===e;return i},t.prototype.setViewportDatasource=function(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)}):console.warn("AG Grid: viewport is missing init method.")},t.prototype.getType=function(){return"viewport"},t.prototype.getRow=function(e){return this.rowNodesByIndex[e]||(this.rowNodesByIndex[e]=this.createBlankRowNode(e)),this.rowNodesByIndex[e]},t.prototype.getRowNode=function(e){var t;return this.forEachNode((function(i){i.id===e&&(t=i)})),t},t.prototype.getRowCount=function(){return-1===this.rowCount?0:this.rowCount},t.prototype.getRowIndexAtPixel=function(e){return 0!==this.rowHeight?Math.floor(e/this.rowHeight):0},t.prototype.getRowBounds=function(e){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*e}},t.prototype.updateRowHeights=function(){var e=this;this.forEachNode((function(t){t.setRowHeight(e.rowHeight),t.setRowTop(e.rowHeight*t.rowIndex)}));var t={type:n.zW2.EVENT_MODEL_UPDATED,newData:!1,newPage:!1,keepRenderedRows:!0,animate:!1};this.eventService.dispatchEvent(t)},t.prototype.getTopLevelRowCount=function(){return this.getRowCount()},t.prototype.getTopLevelRowDisplayedIndex=function(e){return e},t.prototype.isEmpty=function(){return this.rowCount>0},t.prototype.isRowsToRender=function(){return this.rowCount>0},t.prototype.getNodesInRangeForSelection=function(e,t){var i=n._.missing(e)?0:e.rowIndex,o=t.rowIndex,r=i<this.firstRow||i>this.lastRow,s=o<this.firstRow||o>this.lastRow;if(r||s)return[];for(var a=[],l=i<=o?i:o,c=i<=o?o:i,u=l;u<=c;u++)a.push(this.rowNodesByIndex[u]);return a},t.prototype.forEachNode=function(e){var t=this,i=0;Object.keys(this.rowNodesByIndex).forEach((function(n){var o=parseInt(n,10),r=t.rowNodesByIndex[o];e(r,i),i++}))},t.prototype.setRowData=function(e){var t=this;n._.iterateObject(e,(function(e,i){var o=parseInt(e,10);if(o>=t.firstRow&&o<=t.lastRow){var r=t.rowNodesByIndex[o];n._.missing(r)&&(r=t.createBlankRowNode(o),t.rowNodesByIndex[o]=r),r.setDataAndId(i,o.toString())}}))},t.prototype.createBlankRowNode=function(e){var t=new n.Fxk(this.beans);return t.setRowHeight(this.rowHeight),t.setRowTop(this.rowHeight*e),t.setRowIndex(e),t},t.prototype.setRowCount=function(e,t){if(void 0===t&&(t=!1),e!==this.rowCount){this.rowCount=e,this.eventService.dispatchEventOnce({type:n.zW2.EVENT_ROW_COUNT_READY});var i={type:n.zW2.EVENT_MODEL_UPDATED,newData:!1,newPage:!1,keepRenderedRows:t,animate:!1};this.eventService.dispatchEvent(i)}},t.prototype.isRowPresent=function(e){var t=this.getRowNode(e.id);return!!t},aP([(0,n.fsG)("rowRenderer")],t.prototype,"rowRenderer",void 0),aP([(0,n.fsG)("focusService")],t.prototype,"focusService",void 0),aP([(0,n.fsG)("beans")],t.prototype,"beans",void 0),aP([n.NqP],t.prototype,"init",null),aP([n.FXL],t.prototype,"destroyDatasource",null),t=aP([(0,n.Vu6)("rowModel")],t),t}(n.AS9),cP={version:rP,moduleName:n.GXE.ViewportRowModelModule,rowModel:"viewport",beans:[lP],dependantModules:[y]};class uP{constructor(e,t,i){this._encode=e,this._decode=t,this._rangeCallback=i}floor(e){const t=new Date(e),i=this._encode(t);return this._decode(i)}ceil(e){const t=new Date(Number(e)-1),i=this._encode(t);return this._decode(i+1)}range(e,t,i){var n;const o=null===(n=this._rangeCallback)||void 0===n?void 0:n.call(this,e,t),r=this._encode(i?this.floor(e):this.ceil(e)),s=this._encode(i?this.ceil(t):this.floor(t));if(s<r)return[];const a=[];for(let l=r;l<=s;l++){const e=this._decode(l);a.push(e)}return null===o||void 0===o||o(),a}}class dP extends uP{getOffset(e,t){const i="number"===typeof e||e instanceof Date?this._encode(new Date(e)):0;return Math.floor(i)%t}every(e,t){let i,n=0;const{snapTo:o="start"}=null!==t&&void 0!==t?t:{};if("string"===typeof o){const t=n;i=(i,r)=>{const s="start"===o?i:r;return n=this.getOffset(s,e),()=>n=t}}else"number"===typeof o?n=this.getOffset(new Date(o),e):o instanceof Date&&(n=this.getOffset(o,e));const r=t=>{const i=this._encode(t);return Math.floor((i-n)/e)},s=t=>this._decode(t*e+n);return new uP(r,s,i)}}function pP(e){return e.getTime()}function hP(e){return new Date(e)}const fP=new dP(pP,hP);new Date(0).getFullYear();const gP=1e3,vP=60*gP,yP=60*vP,mP=24*yP,CP=7*mP,bP=30*mP,wP=365*mP,SP=(new Date).getTimezoneOffset()*vP;function EP(e){return Math.floor((e.getTime()-SP)/gP)}function xP(e){return new Date(SP+e*gP)}const OP=new dP(EP,xP),TP=(new Date).getTimezoneOffset()*vP;function DP(e){return Math.floor((e.getTime()-TP)/vP)}function RP(e){return new Date(TP+e*vP)}const AP=new dP(DP,RP),_P=(new Date).getTimezoneOffset()*vP;function PP(e){return Math.floor((e.getTime()-_P)/yP)}function MP(e){return new Date(_P+e*yP)}const kP=new dP(PP,MP);function NP(e){const t=6e4*e.getTimezoneOffset();return Math.floor((e.getTime()-t)/mP)}function LP(e){const t=new Date(1970,0,1);return t.setDate(t.getDate()+e),t}const IP=new dP(NP,LP);function FP(e){const t=new Date(2023,0,1+e).getTime();function i(e){const i=e.getTime();return Math.floor((i-t)/CP)}function n(e){const i=new Date(t);return i.setDate(i.getDate()+7*e),i}return new dP(i,n)}const GP=FP(0);function VP(e){return 12*e.getFullYear()+e.getMonth()}function BP(e){const t=Math.floor(e/12),i=e-12*t;return new Date(t,i,1)}FP(1),FP(2),FP(3),FP(4),FP(5),FP(6);const jP=new dP(VP,BP);function HP(e){return e.getFullYear()}function WP(e){const t=new Date;return t.setFullYear(e),t.setMonth(0,1),t.setHours(0,0,0,0),t}const UP=new dP(HP,WP);function zP(e){return Math.floor(e.getTime()/vP)}function KP(e){return new Date(e*vP)}function YP(e){return Math.floor(e.getTime()/yP)}function qP(e){return new Date(e*yP)}function XP(e){return Math.floor(e.getTime()/mP)}function $P(e){const t=new Date(0);return t.setUTCDate(t.getUTCDate()+e),t.setUTCHours(0,0,0,0),t}function ZP(e){return 12*e.getUTCFullYear()+e.getUTCMonth()}function JP(e){const t=Math.floor(e/12),i=e-12*t;return new Date(Date.UTC(t,i,1))}function QP(e){return e.getUTCFullYear()}function eM(e){const t=new Date;return t.setUTCFullYear(e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0),t}function tM(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(i[n[o]]=e[n[o]])}return i}function iM(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}function nM(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)}function oM(e,t,i,n){function o(e){return e instanceof i?e:new i((function(t){t(e)}))}
18return new(i||(i=Promise))((function(i,r){function s(e){try{l(n.next(e))}catch(t){r(t)}}function a(e){try{l(n["throw"](e))}catch(t){r(t)}}function l(e){e.done?i(e.value):o(e.value).then(s,a)}l((n=n.apply(e,t||[])).next())}))}new dP(zP,KP),new dP(YP,qP),new dP(XP,$P),new dP(ZP,JP),new dP(QP,eM),"function"===typeof SuppressedError&&SuppressedError;class rM{constructor(){this.destroyFns=[]}destroy(){for(const e of this.destroyFns)e()}}const sM=[];function aM(){return sM.some((e=>"enterprise"===e.packageType))}function lM(e){const{length:t}=e;if(0===t)return;let i=1/0,n=-1/0;for(let r=0;r<t;r++){let t=e[r];t instanceof Date&&(t=t.getTime()),"number"===typeof t&&(t<i&&(i=t),t>n&&(n=t))}const o=[i,n];return o.some((e=>!isFinite(e)))?void 0:o}function cM(e,t,i){return uM(e,t,i).extent}function uM(e,t,i){var n;let o=!1;return e.length>2&&(e=null!==(n=lM(e))&&void 0!==n?n:[NaN,NaN]),isNaN(t)||(o||(o=t>e[0]),e=[t,e[1]]),isNaN(i)||(o||(o=i<e[1]),e=[e[0],i]),e[0]>e[1]&&(e=[]),{extent:e,clipped:o}}function dM(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(!dM(e[i],t[i]))return!1}else if(e[i]!==t[i])return!1;return!0}function pM(e){return"undefined"===typeof e?[]:Array.isArray(e)?e:[e]}const hM={};function fM(e,t){hM[t]||(e(),hM[t]=!0)}const gM={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){fM((()=>gM.warn(e,...t)),`Logger.warn: ${e}`)},errorOnce(e,...t){fM((()=>gM.error(e,...t)),`Logger.warn: ${e}`)}};function vM(e){const t="undefined"!==typeof window?window:void 0;return null===t||void 0===t?void 0:t[e]}const yM=2e3;let mM=Date.now();const CM=()=>{const e=Date.now()-mM;if(e>yM){const t=(Math.floor(e/100)/10).toFixed(1);gM.log(`**** ${t}s since last log message ****`)}mM=Date.now()},bM={create(...e){return(...t)=>{bM.check(...e)&&("function"===typeof t[0]&&(t=pM(t[0]())),CM(),gM.log(...t))}},check(...e){0===e.length&&e.push(!0);const t=pM(vM("agChartsDebug"));return t.some((t=>e.includes(t)))}},wM=Symbol("BREAK"),SM="__decorator_config";function EM(e,t,i,n){null==Object.getOwnPropertyDescriptor(e,SM)&&Object.defineProperty(e,SM,{value:{}});const o=e[SM];if(null!=o[i])return o[i];o[i]={setters:[],getters:[]};const r=Object.getOwnPropertyDescriptor(e,t),s=null===r||void 0===r?void 0:r.set,a=null===r||void 0===r?void 0:r.get,l=function(){var e,r;let s=a?a.call(this):this[n];for(const n of null!==(r=null===(e=o[i])||void 0===e?void 0:e.getters)&&void 0!==r?r:[])if(s=n(this,t,s),s===wM)return;return s},c=function(e){var r,l;const c=null!==(l=null===(r=o[i])||void 0===r?void 0:r.setters)&&void 0!==l?l:[];let u;c.some((e=>e.length>2))&&(u=a?a.call(this):this[n]);for(const i of c)if(e=i(this,t,e,u),e===wM)return;s?s.call(this,e):this[n]=e};return Object.defineProperty(e,t,{set:c,get:l,enumerable:!0,configurable:!1}),o[i]}function xM(e,t){return(i,n)=>{const o=n.toString(),r=`__${o}`,{getters:s,setters:a}=EM(i,n,o,r);a.push(e),t&&s.unshift(t)}}function OM(e){return"undefined"!==typeof e&&SM in e}function TM(e){const t=new Set;while(OM(e))t.add(null===e||void 0===e?void 0:e[SM]),e=Object.getPrototypeOf(e);return Array.from(t).flatMap((e=>Object.keys(e)))}const DM="class-instance";function RM(e,t){const i=LM(e),n=LM(t);if("array"===n){const n=t;return"array"!==i||e.length!==n.length||n.some(((t,i)=>null!=RM(null===e||void 0===e?void 0:e[i],t)))?[...n]:null}if("primitive"===n)return"primitive"!==i?Object.assign({},t):e!==t?t:null;const o=e||{},r=t||{},s=new Set([...Object.keys(o),...Object.keys(r)]);let a=0;const l={};for(const c of s){if(o[c]===r[c])continue;const e=e=>{l[c]=e,a++},t=LM(o[c]),i=LM(r[c]);if(t!==i){e(r[c]);continue}if("primitive"===i||null===i){e(r[c]);continue}if("array"===i&&o[c].length!==r[c].length){e(r[c]);continue}if(i===DM){e(r[c]);continue}if("function"===i&&o[c]!==r[c]){e(r[c]);continue}const n=RM(o[c],r[c]);null!==n&&e(n)}return 0===a?null:l}const AM=Symbol("<delete-property>"),_M=Symbol("<unspecified-property>");function PM(e,t){var i;const n=null!==(i=null===t||void 0===t?void 0:t.avoidDeepClone)&&void 0!==i?i:[],o=e.map((e=>LM(e)));if(o.some((e=>"array"===e))){const i=e[e.length-1];return Array.isArray(i)?i.map((e=>{const i=LM(e);return"array"===i?PM([[],e],t):"object"===i?PM([{},e],t):e})):i}const r={},s=new Set(e.map((e=>null!=e?Object.keys(e):[])).reduce(((e,t)=>e.concat(t)),[]));for(const a of s){const i=e.map((e=>null!=e&&"object"===typeof e&&a in e?e[a]:_M)).filter((e=>e!==_M));if(0===i.length)continue;const o=i[i.length-1];if(o===AM)continue;const s=i.map((e=>LM(e))),l=s[0];s.some((e=>e!==l))?r[a]=o:"array"!==l&&"object"!==l||n.includes(a)?r[a]="array"===l?[...o]:o:r[a]=PM(i,t)}return r}function MM(e,t,i={}){var n,o,r;const{path:s,matcherPath:a=(s?s.replace(/(\[[0-9+]+])/i,"[]"):void 0),skip:l=[],constructors:c={},constructedArrays:u=new WeakMap,allowedTypes:d={},idx:p}=i;if(null==e)throw new Error(`AG Charts - target is uninitialised: ${null!==s&&void 0!==s?s:"<root>"}`);if(null==t)return e;const h=e;null!=p&&"_declarationOrder"in h&&(h["_declarationOrder"]=p);const f=LM(e);for(const v in t){const p=`${a?a+".":""}${v}`;if(l.indexOf(p)>=0)continue;const y=t[v],m=`${s?s+".":""}${v}`,C=h.constructor,b=h[v];let w=null!==(n=c[p])&&void 0!==n?n:c[v];try{const t=LM(b),n=LM(y);if(f===DM&&!(v in e)&&!Object.prototype.hasOwnProperty.call(h,v)){gM.warn(`unable to set [${m}] in ${null===C||void 0===C?void 0:C.name} - property is unknown`);continue}const s=null!==(o=d[p])&&void 0!==o?o:[t];if(t===DM&&"object"===n);else if(null!=t&&null!=n&&!s.includes(n)){gM.warn(`unable to set [${m}] in ${null===C||void 0===C?void 0:C.name} - can't apply type of [${n}], allowed types are: [${s}]`);continue}if("array"===n)if(w=null!==(r=null!==w&&void 0!==w?w:u.get(b))&&void 0!==r?r:c[`${p}[]`],null!=w){const e=y;h[v]=e.map(((e,t)=>MM(new w,e,Object.assign(Object.assign({},i),{path:m,matcherPath:p+"[]",idx:t}))))}else h[v]=y;else n===DM?h[v]=y:"object"===n?null!=b?MM(b,y,Object.assign(Object.assign({},i),{path:m,matcherPath:p,idx:void 0})):h[v]=null!=w?MM(new w,y,Object.assign(Object.assign({},i),{path:m,matcherPath:p,idx:void 0})):y:h[v]=y}catch(g){gM.warn(`unable to set [${m}] in [${null===C||void 0===C?void 0:C.name}]; nested error is: ${g.message}`)}}return e}function kM(e,t,i,...n){const o=LM(e),{skip:r=[]}=null!==i&&void 0!==i?i:{};if("array"===o)return t(o,e,...n),void e.forEach(((e,o)=>{kM(e,t,i,...(null!==n&&void 0!==n?n:[]).map((e=>null===e||void 0===e?void 0:e[o])))}));if("object"===o){t(o,e,...n);for(const o in e){if(r.includes(o))continue;const s=e[o],a=null===n||void 0===n?void 0:n.map((e=>null===e||void 0===e?void 0:e[o])),l=LM(s);"object"!==l&&"array"!==l||kM(s,t,i,...a)}}}const NM="undefined"!==typeof window;function LM(e){return null==e?null:NM&&e instanceof HTMLElement?"primitive":Array.isArray(e)?"array":e instanceof Date?"primitive":"object"===typeof e&&e.constructor===Object?"object":"function"===typeof e?"function":"object"===typeof e&&null!=e.constructor?DM:"primitive"}const IM=2*Math.PI;function FM(e){return e%=IM,e+=IM,e%=IM,e}function GM(e){return e%=IM,e+=IM,e!==IM&&(e%=IM),e}
18function VM(e){return e%=IM,e<-Math.PI?e+=IM:e>=Math.PI&&(e-=IM),e}function BM(e){return e/180*Math.PI}function jM(e){return e/Math.PI*180}function HM(e,t){return e=FM(e),t=FM(t),t-e+(e>t?2*Math.PI:0)}function WM(e,t,i){return Math.max(t,Math.min(i,e))}class UM{constructor(){this.type="band",this.cache=null,this.cacheProps=["_domain","range","_paddingInner","_paddingOuter","round","interval"],this.index=new Map,this.ordinalRange=[],this._domain=[],this.range=[0,1],this._bandwidth=1,this._rawBandwidth=1,this._paddingInner=0,this._paddingOuter=0,this.round=!1}didChange(){const{cache:e}=this,t=!e||this.cacheProps.some((t=>this[t]!==e[t]));return!!t&&(this.cache={},this.cacheProps.forEach((e=>this.cache[e]=this[e])),!0)}refresh(){this.didChange()&&this.update()}set domain(e){const t=[];this.index=new Map;const i=this.index;e.forEach((e=>{void 0===i.get(e)&&i.set(e,t.push(e)-1)})),this._domain=t}get domain(){return this._domain}ticks(){this.refresh();const{interval:e=1}=this,t=Math.abs(Math.round(e));return this._domain.filter(((e,i)=>i%t===0))}convert(e){this.refresh();const t=this.index.get(e);if(void 0===t)return NaN;const i=this.ordinalRange[t];return void 0===i?NaN:i}invert(e){this.refresh();const t=this.ordinalRange.findIndex((t=>t===e));return this.domain[t]}get bandwidth(){return this.refresh(),this._bandwidth}get rawBandwidth(){return this.refresh(),this._rawBandwidth}set padding(e){e=WM(e,0,1),this._paddingInner=e,this._paddingOuter=e}get padding(){return this._paddingInner}set paddingInner(e){this._paddingInner=WM(e,0,1)}get paddingInner(){return this._paddingInner}set paddingOuter(e){this._paddingOuter=WM(e,0,1)}get paddingOuter(){return this._paddingOuter}update(){const e=this._domain.length;if(0===e)return;const t=this.round,i=this._paddingInner,n=this._paddingOuter,[o,r]=this.range,s=r-o,a=s/Math.max(1,e+2*n-i),l=t?Math.floor(a):a,c=l*(e-i),u=o+(s-c)/2,d=t?Math.round(u):u,p=l*(1-i),h=t?Math.round(p):p,f=a*(1-i),g=[];for(let v=0;v<e;v++)g.push(d+l*v);this._bandwidth=h,this._rawBandwidth=f,this.ordinalRange=g}}function zM(e,t,i){return Math.min(i,Math.max(e,t))}function KM(e,t,i=1e-10){return Math.abs(e-t)<i}function YM(e){return Math.sign(e)<0||Object.is(e,-0)}function qM(e,t=2){const i=Math.pow(10,t);return Math.round(e*i)/i}function XM(e,t=2){const 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 $M(e,t){return e>=0?Math.floor(e%t):Math.floor(e%t+t)}class ZM{constructor(e,t,i,n=1){this.r=zM(0,e||0,1),this.g=zM(0,t||0,1),this.b=zM(0,i||0,1),this.a=zM(0,n||0,1)}static validColorString(e){return e.indexOf("#")>=0?!!ZM.parseHex(e):e.indexOf("rgb")>=0?!!ZM.stringToRgba(e):!!ZM.nameToHex[e.toLowerCase()]}static fromString(e){if(e.indexOf("#")>=0)return ZM.fromHexString(e);const t=ZM.nameToHex[e.toLowerCase()];if(t)return ZM.fromHexString(t);if(e.indexOf("rgb")>=0)return ZM.fromRgbaString(e);throw new Error(`Invalid color string: '${e}'`)}static tryParseFromString(e){try{return ZM.fromString(e)}catch(t){return gM.warnOnce(`invalid color string: '${e}'.`),ZM.fromArray([0,0,0])}}static parseHex(e){let t;switch(e=e.replace(/ /g,"").slice(1),e.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));break}if((null===t||void 0===t?void 0:t.length)>=3&&t.every((e=>e>=0)))return 3===t.length&&t.push(255),t}static fromHexString(e){const t=ZM.parseHex(e);if(t){const[e,i,n,o]=t;return new ZM(e/255,i/255,n/255,o/255)}throw new Error(`Malformed hexadecimal color string: '${e}'`)}static stringToRgba(e){let[t,i]=[NaN,NaN];for(let s=0;s<e.length;s++){const n=e[s];if(t||"("!==n){if(")"===n){i=s;break}}else t=s}const n=t&&i&&e.substring(t+1,i);if(!n)return;const o=n.split(","),r=[];for(let s=0;s<o.length;s++){const e=o[s];let t=parseFloat(e);if(isNaN(t))return;e.indexOf("%")>=0?(t=Math.max(0,Math.min(100,t)),t/=100):3===s?t=Math.max(0,Math.min(1,t)):(t=Math.max(0,Math.min(255,t)),t/=255),r.push(t)}return r}static fromRgbaString(e){const t=ZM.stringToRgba(e);if(t){if(3===t.length)return new ZM(t[0],t[1],t[2]);if(4===t.length)return new ZM(t[0],t[1],t[2],t[3])}throw new Error(`Malformed rgb/rgba color string: '${e}'`)}static fromArray(e){if(4===e.length)return new ZM(e[0],e[1],e[2],e[3]);if(3===e.length)return new ZM(e[0],e[1],e[2]);throw new Error("The given array should contain 3 or 4 color components (numbers).")}static fromHSB(e,t,i,n=1){const o=ZM.HSBtoRGB(e,t,i);return new ZM(o[0],o[1],o[2],n)}static fromHSL(e,t,i,n=1){const o=ZM.HSLtoRGB(e,t,i);return new ZM(o[0],o[1],o[2],n)}static padHex(e){return 1===e.length?"0"+e:e}toHexString(){let e="#"+ZM.padHex(Math.round(255*this.r).toString(16))+ZM.padHex(Math.round(255*this.g).toString(16))+ZM.padHex(Math.round(255*this.b).toString(16));return this.a<1&&(e+=ZM.padHex(Math.round(255*this.a).toString(16))),e}toRgbaString(e=3){const 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 ZM.RGBtoHSB(this.r,this.g,this.b)}static RGBtoHSL(e,t,i){const n=Math.min(e,t,i),o=Math.max(e,t,i),r=(o+n)/2;let s,a;if(o===n)s=NaN,a=0;else{const l=o-n;a=r>.5?l/(2-o-n):l/(o+n),s=o===e?(t-i)/l+(t<i?6:0):o===t?(i-e)/l+2:(e-t)/l+4,s*=60}return[s,a,r]}static HSLtoRGB(e,t,i){if(0===t)return[i,i,i];const n=i<.5?i*(1+t):i+t-i*t,o=2*i-n;function r(e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?o+6*(n-o)*e:e<.5?n:e<2/3?o+(n-o)*(2/3-e)*6:o}const s=r(e/360+1/3),a=r(e/360),l=r(e/360-1/3);return[s,a,l]}static RGBtoHSB(e,t,i){const n=Math.min(e,t,i),o=Math.max(e,t,i),r=0!==o?(o-n)/o:0;let s=NaN;if(n!==o){const r=o-n,a=(o-e)/r,l=(o-t)/r,c=(o-i)/r;s=e===o?c-l:t===o?2+a-c:4+l-a,s/=6,s<0&&(s+=1)}return[360*s,r,o]}static HSBtoRGB(e,t,i){isNaN(e)&&(e=0),e=(e%360+360)%360/360;let n=0,o=0,r=0;if(0===t)n=o=r=i;else{const s=6*(e-Math.floor(e)),a=s-Math.floor(s),l=i*(1-t),c=i*(1-t*a),u=i*(1-t*(1-a));switch(s>>0){case 0:n=i,o=u,r=l;break;case 1:n=c,o=i,r=l;break;case 2:n=l,o=i,r=u;break;case 3:n=l,o=c,r=i;break;case 4:n=u,o=l,r=i;break;case 5:n=i,o=l,r=c;break}}return[n,o,r]}derive(e,t,i,n){const o=ZM.RGBtoHSB(this.r,this.g,this.b);let r=o[2];0==r&&i>1&&(r=.05);const s=((o[0]+e)%360+360)%360,a=Math.max(Math.min(o[1]*t,1),0);r=Math.max(Math.min(r*i,1),0);const l=Math.max(Math.min(this.a*n,1),0),c=ZM.HSBtoRGB(s,a,r);return c.push(l),ZM.fromArray(c)}brighter(){return this.derive(0,1,1/.7,1)}darker(){return this.derive(0,1,.7,1)}static interpolate(e,t){const i=ZM.tryParseFromString(e),n=ZM.tryParseFromString(t);return e=>{const t=(t,i)=>t*(1-e)+i*e,o=new ZM(t(i.r,n.r),t(i.g,n.g),t(i.b,n.b),t(i.a,n.a));return o.toString()}}}function JM(e){return xM(((t,i,n)=>{var o,r,s;if(e(n,{target:t}))return n;const a=i.toString().replace(/^_*/,"");let l=null!==(r=null===(o=t.constructor)||void 0===o?void 0:o.className)&&void 0!==r?r:null===(s=t.constructor)||void 0===s?void 0:s.name;(null===l||void 0===l?void 0:l.length)<3&&(l=null);const c=l?`of [${l}] `:"";return e.message?gM.warn(`Property [${a}] ${c}cannot be set to [${QM(n)}]; ${e.message}, ignoring.`):gM.warn(`Property [${a}] ${c}cannot be set to [${QM(n)}], ignoring.`),wM}))}function QM(e){return"number"===typeof e&&isNaN(e)?"NaN":e===1/0?"Infinity":e===-1/0?"-Infinity":JSON.stringify(e)}function ek(e,t){return e.message=t,e}ZM.nameToHex=Object.freeze({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:"#BA5
185D3",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"});const tk=(e,t,i)=>void 0===e||i(e,t),ik=(e,t)=>ek(((i,n)=>Array.isArray(i)&&(!e||i.length===e)&&(!t||i.every((e=>t(e,n))))),"expecting an Array"),nk=e=>ek(((t,i)=>tk(t,i,ik(e))),"expecting an optional Array");ek((e=>Array.isArray(e)&&e.length>0),"expecting a non-empty Array");const ok=(...e)=>ek(((t,i)=>e.every((e=>e(t,i)))),e.map((e=>e.message)).filter((e=>null!=e)).join(" AND ")),rk=(...e)=>ek(((t,i)=>e.some((e=>e(t,i)))),e.map((e=>e.message)).filter((e=>null!=e)).join(" OR ")),sk=e=>null!=e&&!isNaN(e),ak=e=>ek(((t,i)=>!sk(t)||!sk(i.target[e])||t<i.target[e]),`expected to be less than ${e}`),lk=e=>ek(((t,i)=>!sk(t)||!sk(i.target[e])||t>i.target[e]),`expected to be greater than ${e}`),ck=ek((e=>"function"===typeof e),"expecting a Function"),uk=ek(((e,t)=>tk(e,t,ck)),"expecting an optional Function"),dk=ek((e=>!0===e||!1===e),"expecting a Boolean"),pk=ek(((e,t)=>tk(e,t,dk)),"expecting an optional Boolean"),hk=ek((e=>"string"===typeof e),"expecting a String"),fk=ek(((e,t)=>tk(e,t,hk)),"expecting an optional String"),gk=ek((e=>e instanceof Date&&!isNaN(+e)),"expecting a Date object"),vk=ek(((e,t)=>tk(e,t,gk)),"expecting an optional Date");ek(ik(void 0,gk),"expecting an Array of Date objects");const yk=Tk(0),mk=ek(((e,t)=>tk(e,t,yk)),"expecting an optional number"),Ck=rk(vk,mk),bk="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",wk=ek((e=>"string"===typeof e&&ZM.validColorString(e)),`expecting a color String. ${bk}`),Sk=ek(((e,t)=>tk(e,t,wk)),`expecting an optional color String. ${bk}`),Ek=ek(ik(void 0,wk),`expecting an Array of color strings. ${bk}`),xk=ek(((e,t)=>tk(e,t,Ek)),`expecting an optional Array of color strings. ${bk}`);function Ok(e="expecting a finite Number",t,i){let n=e;return void 0!==t&&void 0!==i?n+=` between ${t} and ${i} inclusive`:void 0!==t?n+=` greater than or equal to ${t}`:void 0!==i&&(n+=` less than or equal to ${i}`),n}function Tk(e,t){const i=Ok(void 0,e,t);return ek((i=>"number"===typeof i&&Number.isFinite(i)&&(void 0===e||i>=e)&&(void 0===t||i<=t)),i)}function Dk(e,t){const i=Ok("expecting an optional finite Number",e,t);return ek(((i,n)=>tk(i,n,Tk(e,t))),i)}function Rk(e,t){const i=Ok(void 0,e,t);return ek((i=>"number"===typeof i&&(isNaN(i)||Number.isFinite(i)&&(void 0===e||i>=e)&&(void 0===t||i<=t))),i)}const Ak=ek(ik(void 0,Tk()),"expecting an Array of numbers"),_k=ek(((e,t)=>tk(e,t,Ak)),"expecting an optional Array of numbers"),Pk=ek(ik(void 0,hk),"expecting an Array of strings");function Mk(...e){const t=`expecting one of: ${e.join(", ")}`;return ek((t=>"string"===typeof t&&e.indexOf(t)>=0),t)}ek(((e,t)=>tk(e,t,Pk)),"expecting an optional Array of strings");const kk=ek(ik(void 0,dk),"expecting an Array of boolean values");ek(((e,t)=>tk(e,t,kk)),"expecting an optional Array of boolean values");const Nk=["normal","bold","bolder","lighter"],Lk=ek((e=>"normal"===e||"italic"===e||"oblique"===e),"expecting a font style keyword such as 'normal', 'italic' or 'oblique'"),Ik=ek(((e,t)=>tk(e,t,Lk)),"expecting an optional font style keyword such as 'normal', 'italic' or 'oblique'"),Fk=ek((e=>Nk.includes(e)||"number"===typeof e&&isFinite(e)),"expecting a font weight keyword such as 'normal', 'bold' or 'bolder' or a numeric value such as 100, 300 or 600"),Gk=ek(((e,t)=>tk(e,t,Fk)),"expecting an optional font weight keyword such as 'normal', 'bold' or 'bolder' or a numeric value such as 100, 300 or 600"),Vk=ek(ik(void 0,Tk(0)),"expecting an Array of 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."),Bk=ek(((e,t)=>tk(e,t,Vk)),"expecting an optional Array of 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."),jk=["butt","round","square"],Hk=ek((e=>jk.includes(e)),"expecting a line cap keyword such as 'butt', 'round' or 'square'");ek(((e,t)=>tk(e,t,Hk)),"expecting an optional line cap keyword such as 'butt', 'round' or 'square'");const Wk=["round","bevel","miter"],Uk=ek((e=>Wk.includes(e)),"expecting a line join keyword such as 'round', 'bevel' or 'miter'");ek(((e,t)=>tk(e,t,Uk)),"expecting an optional line join keyword such as 'round', 'bevel' or 'miter'");const zk=["top","right","bottom","left"],Kk=ek((e=>zk.includes(e)),"expecting a position keyword such as 'top', 'right', 'bottom' or 'left"),Yk=["exact","nearest"],qk=ek((e=>"number"===typeof e&&Number.isFinite(e)||Yk.includes(e)),"expecting an interaction range of 'exact', 'nearest' or a number"),Xk=["never","always","hyphenate","on-space"],$k=ek((e=>Xk.includes(e)),"expecting a text wrap strategy keyword such as 'never', 'always', 'hyphenate', or 'on-space'"),Zk=["ellipsis","hide"];ek((e=>Zk.includes(e)),"expecting an overflow strategy keyword such as 'ellipsis', or 'hide'");const Jk=["left","center","right"];ek((e=>Jk.includes(e)),"expecting a text align keyword such as 'left', 'center', or 'right'");const Qk=["top","middle","bottom"];ek((e=>Qk.includes(e)),"expecting a text align keyword such as 'top', 'middle', or 'bottom'");const eN=["horizontal","vertical"],tN=ek((e=>eN.includes(e)),"expecting a direction keyword such as 'horizontal' or 'vertical'");var iN,nN;function oN(){try{return new Function("return true"),!0}catch(e){return!1}}ek(((e,t)=>tk(e,t,tN)),"expecting an optional direction keyword such as 'horizontal' or 'vertical'"),function(e){e["X"]="x",e["Y"]="y"}(iN||(iN={})),function(e){e[e["NONE"]=0]="NONE",e[e["TRIVIAL"]=1]="TRIVIAL",e[e["MINOR"]=2]="MINOR",e[e["MAJOR"]=3]="MAJOR"}(nN||(nN={}));const rN=oN();function sN(e){const{changeCb:t,convertor:i}=null!==e&&void 0!==e?e:{};return function(n,o){const r=`__${o}`;n[o]||(rN&&null==t&&null==i?aN(n,o,r,e):lN(n,o,r,e))}}function aN(e,t,i,n){const{redraw:o=nN.TRIVIAL,type:r="normal",checkDirtyOnAssignment:s=!1}=null!==n&&void 0!==n?n:{},a=new Function("value",`\n        const oldValue = this.${i};\n        if (value !== oldValue) {\n            this.${i} = value;\n            ${"normal"===r?`this.markDirty(this, ${o});`:""}\n            ${"transform"===r?`this.markDirtyTransform(${o});`:""}\n            ${"path"===r?`if (!this._dirtyPath) { this._dirtyPath = true; this.markDirty(this, ${o}); }`:""}\n            ${"font"===r?`if (!this._dirtyFont) { this._dirtyFont = true; this.markDirty(this, ${o}); }`:""}\n        }\n        ${s?`if (value != null && value._dirty > ${nN.NONE}) { this.markDirty(value, value._dirty); }`:""}\n`),l=new Function(`return this.${i};`);
18Object.defineProperty(e,t,{set:a,get:l,enumerable:!0,configurable:!0})}function lN(e,t,i,n){const{redraw:o=nN.TRIVIAL,type:r="normal",changeCb:s,convertor:a,checkDirtyOnAssignment:l=!1}=null!==n&&void 0!==n?n:{},c=function(e){const t=this[i];e=a?a(e):e,e!==t&&(this[i]=e,"normal"===r&&this.markDirty(this,o),"transform"===r&&this.markDirtyTransform(o),"path"!==r||this._dirtyPath||(this._dirtyPath=!0,this.markDirty(this,o)),"font"!==r||this._dirtyFont||(this._dirtyFont=!0,this.markDirty(this,o)),s&&s(this)),l&&null!=e&&e._dirty>nN.NONE&&this.markDirty(e,e._dirty)},u=function(){return this[i]};Object.defineProperty(e,t,{set:c,get:u,enumerable:!0,configurable:!0})}class cN{constructor(){this._dirty=nN.MAJOR}markDirty(e,t=nN.TRIVIAL){this._dirty>t||(this._dirty=t)}markClean(e){this._dirty=nN.NONE}isDirty(){return this._dirty>nN.NONE}}const uN={};function dN(){for(const e in uN)delete uN[e]}function pN(e){var t;const i=e.constructor,n=Object.prototype.hasOwnProperty.call(i,"className")?i.className:i.name;if(!n)throw new Error(`The ${i} is missing the 'className' property.`);const o=(null!==(t=uN[n])&&void 0!==t?t:0)+1;return uN[n]=o,n+"-"+o}function hN(e,t,i=1/0){const n={nearest:void 0,distanceSquared:i};for(const o of t){const t=o.distanceSquared(e);if(0===t)return{nearest:o,distanceSquared:0};t<n.distanceSquared&&(n.nearest=o,n.distanceSquared=t)}return n}function fN(e,t,i=1/0){const n=t.transformPoint(e.x,e.y),o={nearest:void 0,distanceSquared:i};for(const r of t.children){const{nearest:e,distanceSquared:t}=r.nearestSquared(n,o.distanceSquared);if(0===t)return{nearest:e,distanceSquared:t};t<o.distanceSquared&&(o.nearest=e,o.distanceSquared=t)}return o}class gN{constructor(e,t,i,n){this.x=e,this.y=t,this.width=i,this.height=n}clone(){const{x:e,y:t,width:i,height:n}=this;return new gN(e,t,i,n)}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}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}isInfinite(){return Math.abs(this.x)===1/0||Math.abs(this.y)===1/0||Math.abs(this.width)===1/0||Math.abs(this.height)===1/0}distanceSquared(e){if(this.containsPoint(e.x,e.y))return 0;const t=e.x-Math.max(this.x,Math.min(e.x,this.x+this.width)),i=e.y-Math.max(this.y,Math.min(e.y,this.y+this.height));return t*t+i*i}static nearestBox(e,t){return hN(e,t)}shrink(e,t){const 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;break}};return"number"===typeof e?i(t,e):Object.entries(e).forEach((([e,t])=>i(e,t))),this}grow(e,t){if("number"===typeof e)this.shrink(-e,t);else{const t=Object.assign({},e);for(const e in t)t[e]*=-1;this.shrink(t)}return this}static merge(e){let t=1/0,i=1/0,n=-1/0,o=-1/0;return e.forEach((e=>{e.x<t&&(t=e.x),e.y<i&&(i=e.y),e.x+e.width>n&&(n=e.x+e.width),e.y+e.height>o&&(o=e.y+e.height)})),new gN(t,i,n-t,o-i)}}gN.zero=new gN(0,0,0,0);class vN{get e(){return[...this.elements]}constructor(e=[1,0,0,1,0,0]){this.elements=e}setElements(e){const 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(){const e=this.elements;return 1===e[0]&&0===e[1]&&0===e[2]&&1===e[3]&&0===e[4]&&0===e[5]}AxB(e,t,i){const n=e[0]*t[0]+e[2]*t[1],o=e[1]*t[0]+e[3]*t[1],r=e[0]*t[2]+e[2]*t[3],s=e[1]*t[2]+e[3]*t[3],a=e[0]*t[4]+e[2]*t[5]+e[4],l=e[1]*t[4]+e[3]*t[5]+e[5];i=null!==i&&void 0!==i?i:e,i[0]=n,i[1]=o,i[2]=r,i[3]=s,i[4]=a,i[5]=l}multiplySelf(e){return this.AxB(this.elements,e.elements),this}multiply(e){const t=new Array(6);return this.AxB(this.elements,e.elements,t),new vN(t)}preMultiplySelf(e){return this.AxB(e.elements,this.elements,this.elements),this}inverse(){const e=this.elements;let t=e[0],i=e[1],n=e[2],o=e[3];const r=e[4],s=e[5],a=1/(t*o-i*n);return t*=a,i*=a,n*=a,o*=a,new vN([o,-i,-n,t,n*s-o*r,i*r-t*s])}inverseTo(e){const t=this.elements;let i=t[0],n=t[1],o=t[2],r=t[3];const s=t[4],a=t[5],l=1/(i*r-n*o);return i*=l,n*=l,o*=l,r*=l,e.setElements([r,-n,-o,i,o*a-r*s,n*s-i*a]),this}invertSelf(){const e=this.elements;let t=e[0],i=e[1],n=e[2],o=e[3];const r=e[4],s=e[5],a=1/(t*o-i*n);return t*=a,i*=a,n*=a,o*=a,e[0]=o,e[1]=-i,e[2]=-n,e[3]=t,e[4]=n*s-o*r,e[5]=i*r-t*s,this}transformPoint(e,t){const 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){const i=this.elements,n=i[0],o=i[1],r=i[2],s=i[3],a=.5*e.width,l=.5*e.height,c=e.x+a,u=e.y+l,d=Math.abs(a*n)+Math.abs(l*r),p=Math.abs(a*o)+Math.abs(l*s);return t||(t=new gN(0,0,0,0)),t.x=c*n+u*r+i[4]-d,t.y=c*o+u*s+i[5]-p,t.width=d+d,t.height=p+p,t}toContext(e){if(this.identity)return;const t=this.elements;e.transform(t[0],t[1],t[2],t[3],t[4],t[5])}static flyweight(e){return vN.instance.setElements(e.elements)}static updateTransformMatrix(e,t,i,n,o,r,s){const[a,l]=[0,0],c=t,u=i;let d,p;1===c&&1===u?(d=0,p=0):(d=null==(null===s||void 0===s?void 0:s.scalingCenterX)?a:null===s||void 0===s?void 0:s.scalingCenterX,p=null==(null===s||void 0===s?void 0:s.scalingCenterY)?l:null===s||void 0===s?void 0:s.scalingCenterY);const h=n,f=Math.cos(h),g=Math.sin(h);let v,y;0===h?(v=0,y=0):(v=null==(null===s||void 0===s?void 0:s.rotationCenterX)?a:null===s||void 0===s?void 0:s.rotationCenterX,y=null==(null===s||void 0===s?void 0:s.rotationCenterY)?l:null===s||void 0===s?void 0:s.rotationCenterY);const m=o,C=r,b=d*(1-c)-v,w=p*(1-u)-y;return e.setElements([f*c,g*c,-g*u,f*u,f*b-g*w+v+m,g*b+f*w+y+C]),e}static fromContext(e){const t=e.getTransform();return new vN([t.a,t.b,t.c,t.d,t.e,t.f])}}var yN;vN.instance=new vN,function(e){e[e["All"]=0]="All",e[e["None"]=1]="None"}(yN||(yN={}));const mN=e=>{e.parent&&(e.parent.dirtyZIndex=!0),e.zIndexChanged()};class CN extends cN{get datum(){var e,t;return null!==(e=this._datum)&&void 0!==e?e:null===(t=this._parent)||void 0===t?void 0:t.datum}get previousDatum(){return this._previousDatum}set datum(e){this._datum!==e&&(this._previousDatum=this._datum),this._datum=e}_setLayerManager(e){this._layerManager=e,this._debug=null===e||void 0===e?void 0:e.debug;for(const t of this._children)t._setLayerManager(e);for(const t of this._virtualChildren)t._setLayerManager(e)}get layerManager(){return this._layerManager}get parent(){return this._parent}
18get children(){if(0===this._virtualChildren.length)return this._children;const e=[...this._children];for(const t of this._virtualChildren)e.push(...t.children);return e}get virtualChildren(){return this._virtualChildren}hasVirtualChildren(){return this._virtualChildren.length>0}setProperties(e,t){const i=null!==t&&void 0!==t?t:Object.keys(e);for(const n of i)this[n]=e[n];return this}append(e){Array.isArray(e)||(e=[e]);for(const t of e){if(t.parent)throw new Error(`${t} already belongs to another parent: ${t.parent}.`);if(t.layerManager)throw new Error(`${t} already belongs to a scene: ${t.layerManager}.`);if(this.childSet[t.id])throw new 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.dirtyZIndex=!0,this.markDirty(this,nN.MAJOR)}appendChild(e){return this.append(e),e}removeChild(e){const t=()=>{throw new Error("The node to be removed is not a child of this node.")};if(e.parent!==this&&t(),e.isVirtual){const i=this._virtualChildren.indexOf(e);i<0&&t(),this._virtualChildren.splice(i,1)}else{const 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.dirtyZIndex=!0,this.markDirty(e,nN.MAJOR),e}calculateCumulativeMatrix(){this.computeTransformMatrix();const e=vN.flyweight(this.matrix);let t=this.parent;while(t)t.computeTransformMatrix(),e.preMultiplySelf(t.matrix),t=t.parent;return e}transformPoint(e,t){const i=this.calculateCumulativeMatrix();return i.invertSelf().transformPoint(e,t)}inverseTransformPoint(e,t){const i=this.calculateCumulativeMatrix();return i.transformPoint(e,t)}transformBBox(e){const t=this.calculateCumulativeMatrix();return t.invertSelf().transformBBox(e)}inverseTransformBBox(e){const t=this.calculateCumulativeMatrix();return t.transformBBox(e)}markDirtyTransform(){this.dirtyTransform=!0,this.markDirty(this,nN.MAJOR)}constructor({isVirtual:e,tag:t}={}){super(),this.serialNumber=CN._nextSerialNumber++,this.id=pN(this),this.isContainerNode=!1,this._virtualChildren=[],this._children=[],this.childSet={},this.matrix=new vN,this.inverseMatrix=new vN,this.dirtyTransform=!1,this.scalingX=1,this.scalingY=1,this.scalingCenterX=null,this.scalingCenterY=null,this.rotationCenterX=null,this.rotationCenterY=null,this.rotation=0,this.translationX=0,this.translationY=0,this.visible=!0,this.dirtyZIndex=!1,this.zIndex=0,this.zIndexSubOrder=void 0,this.pointerEvents=yN.All,this.isVirtual=null!==e&&void 0!==e&&e,this.tag=null!==t&&void 0!==t?t:NaN}containsPoint(e,t){return!1}pickNode(e,t){var i;if(!this.visible||this.pointerEvents===yN.None||!this.containsPoint(e,t))return;const n=this.children;if(n.length>1e3)for(let o=n.length-1;o>=0;o--){const r=n[o],s=null===(i=r.computeTransformedBBox())||void 0===i?void 0:i.containsPoint(e,t),a=s?r.pickNode(e,t):void 0;if(a)return a}else if(n.length)for(let o=n.length-1;o>=0;o--){const i=n[o].pickNode(e,t);if(i)return i}else if(!this.isContainerNode)return this}findNodes(e){const t=e(this)?[this]:[];for(const i of this.children){const n=i.findNodes(e);n&&t.push(...n)}return t}computeBBox(){}computeTransformedBBox(){const e=this.computeBBox();if(!e)return;this.computeTransformMatrix();const t=vN.flyweight(this.matrix);let i=this.parent;while(i)i.computeTransformMatrix(),t.preMultiplySelf(i.matrix),i=i.parent;return t.transformBBox(e,e),e}computeTransformMatrix(){if(!this.dirtyTransform)return;const{matrix:e,scalingX:t,scalingY:i,rotation:n,translationX:o,translationY:r,scalingCenterX:s,scalingCenterY:a,rotationCenterX:l,rotationCenterY:c}=this;vN.updateTransformMatrix(e,t,i,n,o,r,{scalingCenterX:s,scalingCenterY:a,rotationCenterX:l,rotationCenterY:c}),e.inverseTo(this.inverseMatrix),this.dirtyTransform=!1}render(e){const{stats:t}=e;this._dirty=nN.NONE,t&&t.nodesRendered++}clearBBox(e){const t=this.computeBBox();if(null==t)return;const{x:i,y:n,width:o,height:r}=t,s=this.transformPoint(i,n),a=this.transformPoint(i+o,n+r);e.clearRect(s.x,s.y,a.x-s.x,a.y-s.y)}markDirty(e,t=nN.TRIVIAL,i=t){this._dirty>t||this._dirty===t&&t===i||(this._dirty=t,this.parent?this.parent.markDirty(this,i):this.layerManager&&this.layerManager.markDirty())}get dirty(){return this._dirty}markClean(e){const{force:t=!1,recursive:i=!0}=null!==e&&void 0!==e?e:{};if(this._dirty!==nN.NONE||t){if(this._dirty=nN.NONE,!1!==i)for(const e of this._virtualChildren)e.markClean({force:t});if(!0===i)for(const e of this._children)e.markClean({force:t})}}visibilityChanged(){}get nodeCount(){let e=1,t=this._dirty>=nN.NONE||this.dirtyTransform?1:0,i=this.visible?1:0;const n=n=>{const{count:o,visibleCount:r,dirtyCount:s}=n.nodeCount;e+=o,i+=r,t+=s};for(const o of this._children)n(o);for(const o of this._virtualChildren)n(o);return{count:e,visibleCount:i,dirtyCount:t}}zIndexChanged(){}}CN._nextSerialNumber=0,iM([sN({type:"transform"}
18),nM("design:type",Number)],CN.prototype,"scalingX",void 0),iM([sN({type:"transform"}),nM("design:type",Number)],CN.prototype,"scalingY",void 0),iM([sN({type:"transform"}),nM("design:type",Object)],CN.prototype,"scalingCenterX",void 0),iM([sN({type:"transform"}),nM("design:type",Object)],CN.prototype,"scalingCenterY",void 0),iM([sN({type:"transform"}),nM("design:type",Object)],CN.prototype,"rotationCenterX",void 0),iM([sN({type:"transform"}),nM("design:type",Object)],CN.prototype,"rotationCenterY",void 0),iM([sN({type:"transform"}),nM("design:type",Number)],CN.prototype,"rotation",void 0),iM([sN({type:"transform"}),nM("design:type",Number)],CN.prototype,"translationX",void 0),iM([sN({type:"transform"}),nM("design:type",Number)],CN.prototype,"translationY",void 0),iM([sN({redraw:nN.MAJOR,changeCb:e=>e.visibilityChanged()}),nM("design:type",Boolean)],CN.prototype,"visible",void 0),iM([sN({redraw:nN.TRIVIAL,changeCb:mN}),nM("design:type",Number)],CN.prototype,"zIndex",void 0),iM([sN({redraw:nN.TRIVIAL,changeCb:mN}),nM("design:type",Array)],CN.prototype,"zIndexSubOrder",void 0);class bN extends cN{constructor(){super(...arguments),this.enabled=!0,this.color="rgba(0, 0, 0, 0.5)",this.xOffset=0,this.yOffset=0,this.blur=5}}iM([JM(dk),sN({redraw:nN.MAJOR}),nM("design:type",Object)],bN.prototype,"enabled",void 0),iM([JM(wk),sN({redraw:nN.MAJOR}),nM("design:type",Object)],bN.prototype,"color",void 0),iM([JM(Tk()),sN({redraw:nN.MAJOR}),nM("design:type",Object)],bN.prototype,"xOffset",void 0),iM([JM(Tk()),sN({redraw:nN.MAJOR}),nM("design:type",Object)],bN.prototype,"yOffset",void 0),iM([JM(Tk(0)),sN({redraw:nN.MAJOR}),nM("design:type",Object)],bN.prototype,"blur",void 0);const wN=[/Android/i,/webOS/i,/iPhone/i,/iPad/i,/iPod/i,/BlackBerry/i,/Windows Phone/i];function SN(){if("undefined"===typeof navigator)return!0;const e=navigator.userAgent;return!wN.some((t=>t.test(e)))}class EN{constructor(e){this._enabled=!0,this._pixelRatio=NaN,this._width=0,this._height=0;const{document:t,window:i,width:n=600,height:o=300,domLayer:r=!1,zIndex:s=0,name:a,overrideDevicePixelRatio:l}=e;this.document=t,this.window=i,EN.document=t,this.element=t.createElement("canvas"),this.element.width=n,this.element.height=o,this.realContext=this.element.getContext("2d"),this.imageSource=this.realContext.canvas;const{style:c}=this.element;c.userSelect="none",c.display="block",r&&(c.position="absolute",c.zIndex=String(s),c.top="0",c.left="0",c.pointerEvents="none",c.opacity="1",a&&(this.element.id=a)),this.context=this.setPixelRatio(l),this.resize(n,o)}set container(e){this._container!==e&&(this.remove(),e&&e.appendChild(this.element),this._container=e)}get container(){return this._container}set enabled(e){this.element.style.display=e?"block":"none",this._enabled=!!e}get enabled(){return this._enabled}remove(){const{parentNode:e}=this.element;null!=e&&e.removeChild(this.element)}destroy(){this.element.remove(),this.element.width=0,this.element.height=0,this.context.clearRect(0,0,0,0),Object.freeze(this)}snapshot(){}clear(){this.context.save(),this.context.resetTransform(),this.context.clearRect(0,0,this.width,this.height),this.context.restore()}toImage(){const e=this.document.createElement("img");return e.src=this.getDataURL(),e}getDataURL(e){return this.element.toDataURL(e)}download(e,t="image/png"){e=(null!==e&&void 0!==e?e:"").trim()||"image";const i=this.getDataURL(t),n=this.document,o=n.createElement("a");o.href=i,o.download=e,o.style.display="none",n.body.appendChild(o),o.click(),n.body.removeChild(o)}get pixelRatio(){return this._pixelRatio}setPixelRatio(e){let t=null!==e&&void 0!==e?e:this.window.devicePixelRatio;return SN()||(t=1),this._pixelRatio=t,EN.overrideScale(this.realContext,t)}set pixelated(e){this.element.style.imageRendering=e?"pixelated":"auto"}get pixelated(){return"pixelated"===this.element.style.imageRendering}get width(){return this._width}get height(){return this._height}resize(e,t){if(!(e>0&&t>0))return;const{element:i,context:n,pixelRatio:o}=this;i.width=Math.round(e*o),i.height=Math.round(t*o),i.style.width=e+"px",i.style.height=t+"px",n.resetTransform(),this._width=e,this._height=t}static get textMeasuringContext(){if(this._textMeasuringContext)return this._textMeasuringContext;const e=this.document.createElement("canvas");return this._textMeasuringContext=e.getContext("2d"),this._textMeasuringContext}static get svgText(){if(this._svgText)return this._svgText;const e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"svg");t.setAttribute("width","100"),t.setAttribute("height","100"),t.classList?t.classList.add("text-measuring-svg"):t.setAttribute("class","text-measuring-svg"),t.style.position="absolute",t.style.top="-1000px",t.style.visibility="hidden";const i=document.createElementNS(e,"text");return i.setAttribute("x","0"),i.setAttribute("y","30"),i.setAttribute("text","black"),t.appendChild(i),document.body.appendChild(t),this._svgText=i,i}static get has(){if(this._has)return this._has;const e="undefined"===typeof navigator||navigator.userAgent.indexOf("Chrome")>-1,t="undefined"!==typeof navigator&&navigator.userAgent.indexOf("Firefox")>-1,i=!e&&"undefined"!==typeof navigator&&navigator.userAgent.indexOf("Safari")>-1;return this._has=Object.freeze({textMetrics:void 0!==this.textMeasuringContext.measureText("test").actualBoundingBoxDescent&&!t&&!i,getTransform:void 0!==this.textMeasuringContext.getTransform}),this._has}static measureText(e,t,i,n){const o=this.textMeasuringContext;return o.font=t,o.textBaseline=i,o.textAlign=n,o.measureText(e)}static getTextSize(e,t){if(this.has.textMetrics){const i=this.textMeasuringContext;i.font=t;const n=i.measureText(e);return{width:n.width,height:n.actualBoundingBoxAscent+n.actualBoundingBoxDescent}}return this.measureSvgText(e,t)}static measureSvgText(e,t){const i=this.textSizeCache,n=i[t];if(n){const t=n[e];if(t)return t}else i[t]={};const o=this.svgText;o.style.font=t,o.textContent=e;const r=o.getBBox(),s={width:r.width,height:r.height};return i[t][e]=s,s}static overrideScale(e,t){let i=0;const n={save(){this.$save(),i++}
18,restore(){if(!(i>0))throw new Error("AG Charts - Unable to restore() past depth 0");this.$restore(),i--},setTransform(e,i,n,o,r,s){"object"===typeof e?this.$setTransform(e):this.$setTransform(e*t,i*t,n*t,o*t,r*t,s*t)},resetTransform(){this.$setTransform(t,0,0,t,0,0)},verifyDepthZero(){if(0!==i)throw new Error("AG Charts - Save/restore depth is non-zero: "+i)}};for(const o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e["$"+o]||(e["$"+o]=e[o]),e[o]=n[o]);return e}}EN.document=globalThis.document,EN.textSizeCache={};class xN{constructor(){this.stops=[]}}class ON extends xN{constructor(){super(...arguments),this.angle=0}createGradient(e,t){const i=90,{stops:n,angle:o}=this,r=FM(BM(o+i)),s=Math.cos(r),a=Math.sin(r),l=t.width,c=t.height,u=t.x+.5*l,d=t.y+.5*c;if(l>0&&c>0){const t=Math.sqrt(c*c+l*l)/2,i=Math.atan2(c,l);let o;o=r<Math.PI/2?r:r<Math.PI?Math.PI-r:r<3*Math.PI/2?r-Math.PI:2*Math.PI-r;const p=t*Math.abs(Math.cos(o-i)),h=e.createLinearGradient(u+s*p,d+a*p,u-s*p,d-a*p);return n.forEach((e=>{h.addColorStop(e.offset,e.color)})),h}return"black"}}const TN=/^linear-gradient\((.*?)deg,\s*(.*?)\s*\)$/i;class DN extends CN{constructor(){super(...arguments),this.fillOpacity=1,this.strokeOpacity=1,this.fill=DN.defaultStyles.fill,this.stroke=DN.defaultStyles.stroke,this.strokeWidth=DN.defaultStyles.strokeWidth,this.lineDash=DN.defaultStyles.lineDash,this.lineDashOffset=DN.defaultStyles.lineDashOffset,this.lineCap=DN.defaultStyles.lineCap,this.lineJoin=DN.defaultStyles.lineJoin,this.opacity=DN.defaultStyles.opacity,this.fillShadow=DN.defaultStyles.fillShadow}restoreOwnStyles(){const e=this.constructor.defaultStyles,t=Object.getOwnPropertyNames(e);for(let i=0,n=t.length;i<n;i++){const n=t[i];this[n]=e[n]}}updateGradient(){const{fill:e}=this;let t;if((null===e||void 0===e?void 0:e.startsWith("linear-gradient"))&&(t=TN.exec(e))){const e=parseFloat(t[1]),i=[],n=t[2],o=/(#[0-9a-f]+)|(rgba?\(.+?\))|([a-z]+)/gi;let r;while(r=o.exec(n))i.push(r[0]);this.gradient=new ON,this.gradient.angle=e,this.gradient.stops=i.map(((e,t)=>{const n=t/(i.length-1);return{offset:n,color:e}}))}else this.gradient=void 0}align(e,t){var i,n,o;const r=null!==(o=null===(n=null===(i=this.layerManager)||void 0===i?void 0:i.canvas)||void 0===n?void 0:n.pixelRatio)&&void 0!==o?o:1,s=Math.round(e*r)/r;return void 0==t?s:0===t?0:t<1?Math.ceil(t*r)/r:Math.round((t+e)*r)/r-s}fillStroke(e){this.renderFill(e),this.renderStroke(e)}renderFill(e){if(this.fill){const{globalAlpha:t}=e;this.applyFill(e),this.applyFillAlpha(e),this.applyShadow(e),e.fill(),e.globalAlpha=t}e.shadowColor="rgba(0, 0, 0, 0)"}applyFill(e){this.gradient?e.fillStyle=this.gradient.createGradient(e,this.computeBBox()):e.fillStyle=this.fill}applyFillAlpha(e){const{globalAlpha:t}=e;e.globalAlpha=t*this.opacity*this.fillOpacity}applyShadow(e){var t,i;const n=null!==(i=null===(t=this.layerManager)||void 0===t?void 0:t.canvas.pixelRatio)&&void 0!==i?i:1,o=this.fillShadow;(null===o||void 0===o?void 0:o.enabled)&&(e.shadowColor=o.color,e.shadowOffsetX=o.xOffset*n,e.shadowOffsetY=o.yOffset*n,e.shadowBlur=o.blur*n)}renderStroke(e){if(this.stroke&&this.strokeWidth){const{globalAlpha:t}=e;e.strokeStyle=this.stroke,e.globalAlpha=t*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),e.stroke(),e.globalAlpha=t}}containsPoint(e,t){return this.isPointInPath(e,t)}}DN.defaultStyles=Object.assign({},{fill:"black",stroke:void 0,strokeWidth:0,lineDash:void 0,lineDashOffset:0,lineCap:void 0,lineJoin:void 0,opacity:1,fillShadow:void 0}),iM([sN({redraw:nN.MINOR}),nM("design:type",Number)],DN.prototype,"fillOpacity",void 0),iM([sN({redraw:nN.MINOR}),nM("design:type",Number)],DN.prototype,"strokeOpacity",void 0),iM([sN({redraw:nN.MINOR,changeCb:e=>e.updateGradient()}),nM("design:type",Object)],DN.prototype,"fill",void 0),iM([sN({redraw:nN.MINOR}),nM("design:type",Object)],DN.prototype,"stroke",void 0),iM([sN({redraw:nN.MINOR}),nM("design:type",Number)],DN.prototype,"strokeWidth",void 0),iM([sN({redraw:nN.MINOR}),nM("design:type",Object)],DN.prototype,"lineDash",void 0),iM([sN({redraw:nN.MINOR}),nM("design:type",Number)],DN.prototype,"lineDashOffset",void 0),iM([sN({redraw:nN.MINOR}),nM("design:type",String)],DN.prototype,"lineCap",void 0),iM([sN({redraw:nN.MINOR}),nM("design:type",String)],DN.prototype,"lineJoin",void 0),iM([sN({redraw:nN.MINOR,convertor:e=>Math.min(1,Math.max(0,e))}),nM("design:type",Number)],DN.prototype,"opacity",void 0),iM([sN({redraw:nN.MINOR,checkDirtyOnAssignment:!0}),nM("design:type",Object)],DN.prototype,"fillShadow",void 0);const RN="…";function AN(e){const{redraw:t=nN.MAJOR,changeCb:i}=null!==e&&void 0!==e?e:{};return sN({redraw:t,type:"font",changeCb:i})}class _N extends DN{constructor(){super(...arguments),this.x=0,this.y=0,this.lines=[],this.text=void 0,this._dirtyFont=!0,this.fontSize=10,this.fontFamily="sans-serif",this.textAlign=_N.defaultStyles.textAlign,this.textBaseline=_N.defaultStyles.textBaseline,this.lineHeight=void 0}_setLines(){this.lines=FN(this.text)}get font(){return(null==this._font||this._dirtyFont)&&(this._dirtyFont=!1,this._font=MN(this)),this._font}computeBBox(){return EN.has.textMetrics?NN(this.lines,this.x,this.y,this):LN(this.lines,this.x,this.y,this)}getLineHeight(e){var t,i;if(this.lineHeight)return this.lineHeight;if(EN.has.textMetrics){const n=EN.measureText(e,this.font,this.textBaseline,this.textAlign);return(null!==(t=n.fontBoundingBoxAscent)&&void 0!==t?t:n.emHeightAscent)+(null!==(i=n.fontBoundingBoxDescent)&&void 0!==i?i:n.emHeightDescent)}return EN.getTextSize(e,this.font).height}isPointInPath(e,t){const i=this.transformPoint(e,t),n=this.computeBBox();return!!n&&n.containsPoint(i.x,i.y)}render(e){const{ctx:t,forceRender:i,stats:n}=e;if(this.dirty===nN.NONE&&!i)return void(n&&(n.nodesSkipped+=this.nodeCount.count));if(!this.lines.length||!this.layerManager)return void(n&&(n.nodesSkipped+=this.nodeCount.count));this.computeTransformMatrix(),this.matrix.toContext(t);const{fill:o,stroke:r,strokeWidth:s}=this;t.font=this.font,t.textAlign=this.textAlign,t.textBaseline=this.textBaseline;const a=this.layerManager.canvas.pixelRatio||1,{globalAlpha:l}=t;if(o){t.fillStyle=o,t.globalAlpha=l*this.opacity*this.fillOpacity;const{fillShadow:e}=this;(null===e||void 0===e?void 0:e.enabled)&&(t.shadowColor=e.color,t.shadowOffsetX=e.xOffset*a,t.shadowOffsetY=e.yOffset*a,t.shadowBlur=e.blur*a),this.renderLines(((e,i,n)=>t.fillText(e,i,n)))}if(r&&s){t.strokeStyle=r,t.lineWidth=s,t.globalAlpha=l*this.opacity*this.strokeOpacity;const{lineDash:e,lineDashOffset:i,lineCap:n,lineJoin:o}=this;e&&t.setLineDash(e),i&&(t.lineDashOffset=i),n&&(t.lineCap=n),o&&(t.lineJoin=o),this.renderLines(((e,i,n)=>t.strokeText(e,i,n)))}super.render(e)}renderLines(e){const{lines:t,x:i,y:n}=this,o=this.lines.map((e=>this.getLineHeight(e))),r=o.reduce(((e,t)=>e+t),0);let s=-(r-o[0])*IN(this.textBaseline);for(let a=0;a<t.length;a++)e(t[a],i,n+s),s+=o[a]}static wrap(e,t,i,n,o,r="ellipsis"){var s;const a="hide"!==r,l=MN(n),c=PN(l),u=e.split(/\r?\n/g);if(0===u.length)return"";if("never"===o)return null!==(s=_N.truncateLine(u[0],t,c,a?"auto":"never"))&&void 0!==s?s:"";const d=[];let p=0;for(const h of u){const e=_N.wrapLine(h,t,i,c,n,o,p,a);if(null==e)return"";
18if(d.push(e.result),p=e.cumulativeHeight,e.truncated)break}return d.join("\n").trim()}static wrapLine(e,t,i,n,o,r,s,a){if(e=e.trim(),!e)return{result:"",truncated:!1,cumulativeHeight:s};const l=n.size(e);if(l.width<=t)return{result:e,truncated:!1,cumulativeHeight:s+l.height};if(l.height>i||n.width("W")>t)return a?{result:"",truncated:!0,cumulativeHeight:s}:void 0;const c=e.split(/\s+/g),u=_N.wrapLineSequentially(c,t,i,n,o,r,s,a);if(null==u)return;s=u.cumulativeHeight;let{lines:d}=u;if(!u.wordsBrokenOrTruncated&&!u.linesTruncated){const e=u.lines.length,i=_N.wrapLineBalanced(c,t,n,e);i.length===d.length&&(d=i)}const p=d.map((e=>e.join(" "))).join("\n");return{result:p,truncated:u.linesTruncated,cumulativeHeight:s}}static breakWord(e,t,i,n,o){const r=t=>_N.punctuationMarks.includes(e[t]),s=n?o.width("-"):0,a=[];let l=0,c=0;for(let p=0;p<e.length;p++){const n=e[p],r=o.width(n),u=0===c?t:i;l+r+s>u&&(a.push(p),l=0,c++),l+=r}const u=[];let d=0;for(const p of a){let t=e.substring(d,p);n&&t.length>0&&!r(p-1)&&!r(p)&&(t+="-"),u.push(t),d=p}return u.push(e.substring(d)),u}static truncateLine(e,t,i,n){e=e.trimEnd();const o=i.width(e);if(o>t&&"never"===n)return;if(o<=t&&"force"!==n)return e;const r=i.width(RN);let s=e,a=o;while(s.length>0&&a+r>t)s=s.slice(0,-1).trimEnd(),a=i.width(s);return a+r<=t?`${s}${RN}`:void 0}static wrapLineSequentially(e,t,i,n,o,r,s,a){const{fontSize:l=0,lineHeight:c=l*_N.defaultLineHeightRatio}=o,u="always"===r||"hyphenate"===r,d="hyphenate"===r,p=n.width(" ");let h=!1,f=!1;const g=[];let v=[],y=0;const m=()=>({lines:g,linesTruncated:f,wordsBrokenOrTruncated:h,cumulativeHeight:s}),C=()=>{if(!a)return;const e=v.join(" "),i=_N.truncateLine(e,t,n,"force");return null!=i?(v.splice(0,v.length,i),f=!0,m()):void 0},b=()=>{const e=s+c;return!(e>=i)&&(v=[],y=0,s=e,g.push(v),!0)};if(!b())return C();for(let w=0;w<e.length;w++){const i=e[w],o=n.width(i),r=0===v.length?0:p,s=y+r+o;if(s<=t)v.push(i),y=s;else if(o<=t){if(!b())return C();v.push(i),y=o}else{if(h=!0,!u){if(a){if(!b())return C();const o=_N.truncateLine(i,t,n,"force");if(null==o)return;v.push(o),w<e.length-1&&(f=!0);break}return}{const e=t-y-r,o=_N.breakWord(i,e,t,d,n);for(let t=0;t<o.length;t++){const e=o[t];
18if(e&&v.push(e),t===o.length-1)y=n.width(e);else if(!b())return C()}}}}return m()}static wrapLineBalanced(e,t,i,n){const o=e.reduce(((e,t)=>e+i.width(t)),0),r=i.width(" "),s=r*(e.length-n-2),a=(o+s)/n,l=[];let c=[],u=i.width(e[0]),d=!0;for(const p of e){const e=i.width(p);if(d){c=[],c.push(p),u=e,d=!1,l.push(c);continue}const n=u+r+e;n<=a?(c.push(p),u=n):n<=t?(c.push(p),d=!0):(c=[p],u=e,l.push(c))}return l}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}}function PN(e){const t=new Map,i=t=>EN.getTextSize(t,e),n=e=>{if(t.has(e))return t.get(e);const{width:n}=i(e);return t.set(e,n),n};return{size:i,width:n}}function MN(e){const{fontFamily:t,fontSize:i,fontStyle:n,fontWeight:o}=e;return[null!==n&&void 0!==n?n:"",null!==o&&void 0!==o?o:"",i+"px",t].join(" ").trim()}function kN(e,t,i,n){return EN.has.textMetrics?NN(e,t,i,n):LN(e,t,i,n)}function NN(e,t,i,n){var o,r;let s=0,a=0,l=0,c=0,u=0;const d=MN(n),{lineHeight:p,textBaseline:h=_N.defaultStyles.textBaseline,textAlign:f=_N.defaultStyles.textAlign}=n;for(let g=0;g<e.length;g++){const t=EN.measureText(e[g],d,h,f);s=Math.max(s,t.actualBoundingBoxLeft),l=Math.max(l,t.width),0==g?(a+=t.actualBoundingBoxAscent,c+=t.actualBoundingBoxAscent):u+=null!==(o=t.fontBoundingBoxAscent)&&void 0!==o?o:t.emHeightAscent,g==e.length-1?c+=t.actualBoundingBoxDescent:u+=null!==(r=t.fontBoundingBoxDescent)&&void 0!==r?r:t.emHeightDescent}return void 0!==p&&(u=(e.length-1)*p),c+=u,a+=u*IN(h),new gN(t-s,i-a,l,c)}function LN(e,t,i,n){let o=0,r=0,s=0;const a=MN(n),{lineHeight:l,textBaseline:c=_N.defaultStyles.textBaseline,textAlign:u=_N.defaultStyles.textAlign}=n;if(e.length>0){const t=EN.getTextSize(e[0],a);o=t.width,r=t.height}for(let d=1;d<e.length;d++){const t=EN.getTextSize(e[d],a);o=Math.max(o,t.width),s+=null!==l&&void 0!==l?l:t.height}switch(u){case"end":case"right":t-=o;break;case"center":t-=o/2}switch(c){case"alphabetic":i-=.7*r+.5*s;break;case"middle":i-=.45*r+.5*s;break;case"ideographic":i-=r+s;break;case"hanging":i-=.2*r+.5*s;break;case"bottom":i-=r+s;break}return new gN(t,i,o,r+s)}function IN(e){switch(e){case"top":case"hanging":return 0;case"bottom":case"alphabetic":case"ideographic":return 1;case"middle":return.5}}function FN(e){return"string"===typeof e?e.split(/\r?\n/g):[]}function GN(e,t){return xM(((i,n,o)=>(i[e][null!==t&&void 0!==t?t:n]=o,o)))}function VN(e){const{newValue:t,oldValue:i,changeValue:n}=e;return xM(((e,o,r,s)=>(r!==s&&(void 0!==s&&(null===i||void 0===i||i.call(e,s)),void 0!==r&&(null===t||void 0===t||t.call(e,r)),null===n||void 0===n||n.call(e,r,s)),r)))}_N.className="Text",_N.defaultLineHeightRatio=1.15,_N.defaultStyles=Object.assign({},DN.defaultStyles,{textAlign:"start",fontStyle:void 0,fontWeight:void 0,fontSize:10,fontFamily:"sans-serif",textBaseline:"alphabetic"}),_N.ellipsis=RN,_N.punctuationMarks=[".",",","-",":",";","!","?","'",'"',"(",")"],iM([sN({redraw:nN.MAJOR}),nM("design:type",Number)],_N.prototype,"x",void 0),iM([sN({redraw:nN.MAJOR}),nM("design:type",Number)],_N.prototype,"y",void 0),iM([sN({redraw:nN.MAJOR,changeCb:e=>e._setLines()}),nM("design:type",String)],_N.prototype,"text",void 0),iM([AN(),nM("design:type",String)],_N.prototype,"fontStyle",void 0),iM([AN(),nM("design:type",String)],_N.prototype,"fontWeight",void 0),iM([AN(),nM("design:type",Number)],_N.prototype,"fontSize",void 0),iM([AN(),nM("design:type",String)],_N.prototype,"fontFamily",void 0),iM([sN({redraw:nN.MAJOR}),nM("design:type",String)],_N.prototype,"textAlign",void 0),iM([sN({redraw:nN.MAJOR}),nM("design:type",String)],_N.prototype,"textBaseline",void 0),iM([sN({redraw:nN.MAJOR}),nM("design:type",Number)],_N.prototype,"lineHeight",void 0);class BN{constructor(){this.node=new _N,this.enabled=!1,this.text=void 0,this.fontSize=10,this.fontFamily="sans-serif",this.maxWidth=void 0,this.maxHeight=void 0,this.wrapping="always";const e=this.node;e.textAlign="center",e.pointerEvents=yN.None}computeTextWrap(e,t){var i,n;const{text:o,wrapping:r}=this,s=Math.min(null!==(i=this.maxWidth)&&void 0!==i?i:1/0,e),a=null!==(n=this.maxHeight)&&void 0!==n?n:t;if(!isFinite(s)&&!isFinite(a))return void(this.node.text=o);const l=_N.wrap(null!==o&&void 0!==o?o:"",s,a,this,r);this.node.text=l}}
18BN.SMALL_PADDING=10,BN.LARGE_PADDING=20,iM([JM(dk),nM("design:type",Object)],BN.prototype,"enabled",void 0),iM([JM(fk),GN("node"),nM("design:type",String)],BN.prototype,"text",void 0),iM([JM(Ik),GN("node"),nM("design:type",Object)],BN.prototype,"fontStyle",void 0),iM([JM(Gk),GN("node"),nM("design:type",Object)],BN.prototype,"fontWeight",void 0),iM([JM(Tk(0)),GN("node"),nM("design:type",Number)],BN.prototype,"fontSize",void 0),iM([JM(hk),GN("node"),nM("design:type",String)],BN.prototype,"fontFamily",void 0),iM([JM(Sk),GN("node","fill"),nM("design:type",Object)],BN.prototype,"color",void 0),iM([JM(Dk(0)),nM("design:type",Number)],BN.prototype,"spacing",void 0),iM([JM(Dk(0)),nM("design:type",Number)],BN.prototype,"lineHeight",void 0),iM([JM(Dk(0)),nM("design:type",Number)],BN.prototype,"maxWidth",void 0),iM([JM(Dk(0)),nM("design:type",Number)],BN.prototype,"maxHeight",void 0),iM([JM($k),nM("design:type",String)],BN.prototype,"wrapping",void 0);class jN{constructor(){this.enabled=!1,this.text=void 0,this.spacing=BN.SMALL_PADDING,this.fontStyle=void 0,this.fontWeight=void 0,this.fontSize=10,this.fontFamily="sans-serif",this.wrapping="always",this.formatter=void 0}}function HN(e,t){const i={};if(Array.isArray(t))for(let n=0;n<e.length;n++)i[`${e[n]}`]=t[n];else for(let n=0;n<e.length;n++)i[`${e[n]}`]=t;return i}function WN(e,t){return i=>Number(e)*(1-i)+Number(t)*i}function UN(e,t){if("string"===typeof e)try{e=ZM.fromString(e)}catch(s){e=ZM.fromArray([0,0,0])}if("string"===typeof t)try{t=ZM.fromString(t)}catch(s){t=ZM.fromArray([0,0,0])}const i=WN(e.r,t.r),n=WN(e.g,t.g),o=WN(e.b,t.b),r=WN(e.a,t.a);return e=>ZM.fromArray([i(e),n(e),o(e),r(e)]).toRgbaString()}iM([JM(dk),nM("design:type",Object)],jN.prototype,"enabled",void 0),iM([JM(fk),nM("design:type",String)],jN.prototype,"text",void 0),iM([JM(Dk(0)),nM("design:type",Number)],jN.prototype,"spacing",void 0),iM([JM(Ik),nM("design:type",String)],jN.prototype,"fontStyle",void 0),iM([JM(Gk),nM("design:type",String)],jN.prototype,"fontWeight",void 0),iM([JM(Tk(0)),nM("design:type",Number)],jN.prototype,"fontSize",void 0),iM([JM(hk),nM("design:type",String)],jN.prototype,"fontFamily",void 0),iM([JM(Sk),nM("design:type",String)],jN.prototype,"color",void 0),iM([JM($k),nM("design:type",String)],jN.prototype,"wrapping",void 0),iM([JM(uk),nM("design:type",Function)],jN.prototype,"formatter",void 0);const zN=e=>e,KN=e=>1-Math.cos(e*Math.PI/2),YN=e=>Math.sin(e*Math.PI/2),qN=e=>-(Math.cos(e*Math.PI)-1)/2,XN=e=>e*e,$N=e=>1-Math.pow(1-e,2),ZN=e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2;var JN=Object.freeze({__proto__:null,linear:zN,easeIn:KN,easeOut:YN,easeInOut:qN,easeInQuad:XN,easeOutQuad:$N,easeInOutQuad:ZN});const QN=.2,eL={animationDuration:1,animationDelay:0},tL={animationDuration:.25,animationDelay:0},iL={animationDuration:.5,animationDelay:.25},nL={animationDuration:.25,animationDelay:.75},oL={animationDuration:QN,animationDelay:1};var rL;function sL(e){return e.every((e=>e instanceof CN))}(function(e){e["Loop"]="loop",e["Reverse"]="reverse"})(rL||(rL={}));class aL{constructor(e){var t,i,n,o,r,s,a,l,c,u;this.elapsed=0,this.iteration=0,this.isPlaying=!1,this.isReverse=!1,this.id=e.id,this.groupId=e.groupId,this.autoplay=null===(t=e.autoplay)||void 0===t||t,this.delay=null!==(i=e.delay)&&void 0!==i?i:0,this.duration=null!==(n=e.duration)&&void 0!==n?n:1e3,this.ease=null!==(o=e.ease)&&void 0!==o?o:zN,this.repeat=null!==(r=e.repeat)&&void 0!==r?r:0,this.repeatType=null!==(s=e.repeatType)&&void 0!==s?s:rL.Loop,this.onComplete=e.onComplete,this.onPlay=e.onPlay,this.onStop=e.onStop,this.onRepeat=e.onRepeat,this.onUpdate=e.onUpdate,this.interpolate=this.createInterpolator(e.from,e.to),!0===e.skip?(null===(a=this.onUpdate)||void 0===a||a.call(this,e.to,!1,this),null===(l=this.onStop)||void 0===l||l.call(this,this),null===(c=this.onComplete)||void 0===c||c.call(this,this)):this.autoplay&&(this.play(),null===(u=this.onUpdate)||void 0===u||u.call(this,e.from,!0,this))}play(){var e;return this.isPlaying||(this.isPlaying=!0,null===(e=this.onPlay)||void 0===e||e.call(this,this)),this}pause(){return this.isPlaying&&(this.isPlaying=!1),this}stop(){var e;return this.isPlaying&&(this.isPlaying=!1,null===(e=this.onStop)||void 0===e||e.call(this,this)),this}reset(e){const t=this.interpolate(this.isReverse?1-this.delta:this.delta);return this.interpolate=this.createInterpolator(t,e.to),this.elapsed=0,this.iteration=0,"number"===typeof e.delay&&(this.delay=e.delay),"number"===typeof e.duration&&(this.duration=e.duration),"function"===typeof e.ease&&(this.ease=e.ease),this}update(e){var t,i,n;if(this.elapsed+=e,this.elapsed<=this.delay)return this;const o=this.interpolate(this.isReverse?1-this.delta:this.delta);return null===(t=this.onUpdate)||void 0===t||t.call(this,o,!1,this),this.elapsed-this.delay>=this.duration&&(this.iteration<this.repeat?(this.iteration++,this.elapsed=(this.elapsed-this.delay)%this.duration+this.delay,this.repeatType===rL.Rever
18se&&(this.isReverse=!this.isReverse),null===(i=this.onRepeat)||void 0===i||i.call(this,this)):(this.stop(),null===(n=this.onComplete)||void 0===n||n.call(this,this))),this}get delta(){return this.ease(zM(0,(this.elapsed-this.delay)/this.duration,1))}createInterpolator(e,t){if("object"!==typeof t)return this.interpolateValue(e,t);const i=Object.keys(t).map((i=>[i,this.interpolateValue(e[i],t[i])]));return e=>{const t={};for(const[n,o]of i)t[n]=o(e);return t}}interpolateValue(e,t){try{switch(typeof e){case"number":return WN(e,t);case"string":return UN(e,t)}}catch(i){}throw new Error(`Unable to interpolate values: ${e}, ${t}`)}}const lL=["removed","updated","added"],cL={added:nL,updated:iL,removed:tL,unknown:eL};function uL(e,t,i,n,o,r,s){const{defaultDuration:a}=i,{fromFn:l,toFn:c,intermediateFn:u}=o,d=sL(n),p=d?n:[],h=d?[]:n,f={added:{},removed:{}};r&&s&&(f.added=HN(s.added,!0),f.removed=HN(s.removed,!0));const g=(n,o)=>{var d,p;let h,g=0,v=0;for(const y of o){const m=n[g]===y,C={last:v>=o.length-1,lastLive:g>=n.length-1,prev:o[v-1],prevFromProps:h,prevLive:n[g-1],next:o[v+1],nextLive:n[g+(m?1:0)]},b=`${e}_${t}_${y.id}`;i.stopByAnimationId(b);let w="unknown";m?r&&s&&(w=pL(y,y.datum,r,f)):w="removed";const S=l(y,y.datum,w,C),{animationDelay:E,animationDuration:x,start:O={},finish:T={}}=S,D=tM(S,["animationDelay","animationDuration","start","finish"]),R=c(y,y.datum,w,C),{animationDelay:A,animationDuration:_,start:P={},finish:M={}}=R,k=tM(R,["animationDelay","animationDuration","start","finish"]);i.animate({id:b,groupId:e,from:D,to:k,ease:YN,onPlay:()=>{y.setProperties(Object.assign(Object.assign({},O),P))},onUpdate(e){y.setProperties(e),u&&y.setProperties(u(y,y.datum,w,C))},onStop:()=>{y.setProperties(Object.assign(Object.assign(Object.assign({},k),T),M))},duration:(null!==(d=null!==x&&void 0!==x?x:_)&&void 0!==d?d:1)*a,delay:(null!==(p=null!==E&&void 0!==E?E:A)&&void 0!==p?p:0)*a}),m&&g++,v++,h=D}};let v=0;for(const y of h){const n=y.nodes(),o=n.filter((e=>!y.isGarbage(e)));g(o,n),i.animate({id:`${e}_${t}_selection_${v}`,groupId:e,from:0,to:1,ease:YN,onStop(){y.cleanup()}}),v++}g(p,p)}function dL(e,t,i,n,o,r,s={}){const a=sL(n),l=a?n:[],c=a?[]:n,{animationDelay:u=0,animationDuration:d=1,start:p={},finish:h={}}=s,{defaultDuration:f}=i;i.animate({id:`${e}_${t}`,groupId:e,from:o,to:r,ease:YN,onPlay:()=>{for(const e of l)e.setProperties(p);for(const e of c)for(const t of e.nodes())t.setProperties(p)},onUpdate(e){for(const t of l)t.setProperties(e);for(const t of c)for(const i of t.nodes())i.setProperties(e)},onStop:()=>{for(const e of l)e.setProperties(Object.assign(Object.assign({},r),h));for(const e of c)for(const t of e.nodes())t.setProperties(Object.assign(Object.assign({},r),h))},duration:d*f,delay:u*f})}function pL(e,t,i,n){const o=i(e,t);return n.added[o]?"added":n.removed[o]?"removed":"updated"}var hL=Object.freeze({__proto__:null,NODE_UPDATE_PHASES:lL,FROM_TO_MIXINS:cL,fromToMotion:uL,staticFromToMotion:dL});const fL=e=>`(${e})`,gL=e=>`${fL(e)}?`,vL=e=>gL(`?:${e}`),yL=(()=>{const e=".",t="[<>=^]",i="[+\\-( ]",n="[$€£¥₣₹#]",o="0",r="\\d+",s=",",a="\\d+",l="~",c="[%a-z]";return new RegExp(["^",vL(`${gL(e)}${fL(t)}`),gL(i),gL(n),gL(o),gL(r),gL(s),vL(`\\.${fL(a)}`),gL(l),gL(c),"$"].join(""),"i")})(),mL=(()=>{const e=".*?",t=".+?",i=".*?";return new RegExp(["^",fL(e),`#\\{${fL(t)}\\}`,fL(i),"$"].join(""))})();function CL(e){let t,i;const n=mL.exec(e);n&&([,t,e,i]=n);const o=yL.exec(e);if(!o)throw new Error(`The number formatter is invalid: ${e}`);const[,r,s,a,l,c,u,d,p,h,f]=o;return{fill:r,align:s,sign:a,symbol:l,zero:c,width:parseInt(u),comma:d,precision:parseInt(p),trim:Boolean(h),type:f,prefix:t,suffix:i}}function bL(e){const t="string"===typeof e?CL(e):e,{fill:i,align:n,sign:o="-",symbol:r,zero:s,width:a,comma:l,type:c,prefix:u="",suffix:d="",precision:p}=t;let{trim:h}=t;const f=void 0===p||isNaN(p);let g,v;if(c)if(c in EL&&c in SL)g=f?SL[c]:EL[c];else if(c in EL)g=EL[c];else{if(!(c in SL))throw new Error(`The number formatter type is invalid: ${c}`);g=SL[c]}else g=EL["g"],h=!0;return v=null==p||f?c?6:12:p,e=>{let t=g(e,v);return h&&(t=xL(t)),l&&(t=OL(t,l)),t=ML(e,t,o),r&&"#"!==r&&(t=`${r}${t}`),"#"===r&&"x"===c&&(t=`0x${t}`),"s"===c&&(t=`${t}${TL(e)}`),"%"!==c&&"p"!==c||(t=`${t}
18%`),null==a||isNaN(a)||(t=kL(t,a,null!==i&&void 0!==i?i:s,n)),t=`${u}${t}${d}`,t}}const wL=e=>Math.floor(Math.abs(e)),SL={b:e=>wL(e).toString(2),c:e=>String.fromCharCode(e),d:e=>Math.round(Math.abs(e)).toFixed(0),o:e=>wL(e).toString(8),x:e=>wL(e).toString(16),X:e=>SL.x(e).toUpperCase(),n:e=>SL.d(e),"%":e=>`${wL(100*e).toFixed(0)}`},EL={e:(e,t)=>Math.abs(e).toExponential(t),E:(e,t)=>EL.e(e,t).toUpperCase(),f:(e,t)=>Math.abs(e).toFixed(t),F:(e,t)=>EL.f(e,t).toUpperCase(),g:(e,t)=>{if(0===e)return"0";const i=Math.abs(e),n=Math.floor(Math.log10(i));return n>=-4&&n<t?i.toFixed(t-1-n):i.toExponential(t-1)},G:(e,t)=>EL.g(e,t).toUpperCase(),n:(e,t)=>EL.g(e,t),p:(e,t)=>EL.r(100*e,t),r:(e,t)=>{if(0===e)return"0";const i=Math.abs(e),n=Math.floor(Math.log10(i)),o=n-(t-1);if(o<=0)return i.toFixed(-o);const r=Math.pow(10,o);return(Math.round(i/r)*r).toFixed()},s:(e,t)=>{const i=DL(e);return EL.r(e/Math.pow(10,i),t)},"%":(e,t)=>EL.f(100*e,t)};function xL(e){return e.replace(/\.0+$/,"").replace(/(\.[1-9])0+$/,"$1")}function OL(e,t){let i=e.indexOf(".");i<0&&(i=e.length);const n=e.substring(0,i).split(""),o=e.substring(i);for(let r=n.length-3;r>0;r-=3)n.splice(r,0,t);return`${n.join("")}${o}`}function TL(e){return _L[DL(e)]}function DL(e){const t=Math.log10(Math.abs(e)),i=3*Math.floor(t/3);return Math.max(RL,Math.min(AL,i))}const RL=-24,AL=24,_L={[RL]:"y",[-21]:"z",[-18]:"a",[-15]:"f",[-12]:"p",[-9]:"n",[-6]:"µ",[-3]:"m",[0]:"",[3]:"k",[6]:"M",[9]:"G",[12]:"T",[15]:"P",[18]:"E",[21]:"Z",[AL]:"Y"},PL="−";function ML(e,t,i=""){if("("===i)return e>=0?t:`(${t})`;const n="+"===i?"+":"";return`${e>=0?n:PL}${t}`}function kL(e,t,i=" ",n=">"){let o=e;if(">"!==n&&n){if("<"===n)o=o.padEnd(t,i);else if("^"===n){const e=Math.max(0,t-o.length),n=Math.ceil(e/2),r=Math.floor(e/2);o=o.padStart(n+o.length,i),o=o.padEnd(r+o.length,i)}}else o=o.padStart(t,i);return o}function NL(e,t){const i=CL(null!==t&&void 0!==t?t:",f"),{precision:n}=i;(null==n||isNaN(n))&&("f"===i.type||"%"===i.type?i.precision=Math.max(...e.map((e=>{if("number"!==typeof e||0===e)return 0;const t=Math.floor(Math.log10(Math.abs(e))),n=i.type?6:12,o=e.toExponential(n-1).replace(/\.?0+e/,"e"),r=o.indexOf(".");if(r<0)return t>=0?0:-t;const s=o.indexOf("e")-r;return Math.max(0,s-t-1)}))):i.type&&!(i.type in EL)||(i.precision=Math.max(...e.map((e=>{if("number"!==typeof e)return 0;const t=e.toExponential((i.type?6:12)-1).replace(/\.?0+e/,"e");return t.substring(0,t.indexOf("e")).replace(".","").length})))));const o=bL(i);return e=>o(Number(e))}function LL(e,t,i,n,o){if(i<2)return BL(e,t,t-e);const r=FL(e,t,i,n,o);return isNaN(r)?new VL(0):(e=Math.ceil(e/r)*r,t=Math.floor(t/r)*r,BL(e,t,r))}const IL=[1,2,5,10];function FL(e,t,i,n=0,o=1/0){const r=(t-e)/i,s=Math.floor(Math.log10(r)),a=Math.pow(10,s),l=IL.map((r=>{const s=r*a,l=Math.ceil((t-e)/s),c=l>=n&&l<=o,u=Math.abs(l-i);return{multiplier:r,isWithinBounds:c,diffCount:u}})).sort(((e,t)=>e.isWithinBounds!==t.isWithinBounds?e.isWithinBounds?-1:1:e.diffCount-t.diffCount))[0].multiplier;return!l||isNaN(l)?NaN:l*a}function GL(e,t){const i=Math.floor(Math.log10(t-e)),n=Math.pow(10,i);return IL.map((i=>{const o=i*n,r=Math.floor(e/o)*o,s=Math.ceil(t/o)*o,a=1-(t-e)/(s-r),l=[r,s];return{error:a,domain:l}})).sort(((e,t)=>e.error-t.error))[0].domain}class VL extends Array{constructor(e,t){if(super(),t)for(let i=0,n=t.length;i<n;i++)this[i]=t[i];this.fractionDigits=e}}function BL(e,t,i){const n=e=>{var t,i;const n=e.split("e");return Math.max((null!==(i=null===(t=n[0].split(".")[1])||void 0===t?void 0:t.length)&&void 0!==i?i:0)-Number(n[1]),0)},o=n((i%1).toExponential()),r=Math.pow(10,o),s=Math.ceil((t-e)/i),a=new VL(o);for(let l=0;l<=s;l++){const t=e+i*l;a.push(Math.round(t*r)/r)}return a}class jL{static is(e){return e instanceof jL}constructor(e,t){this.domain=e,this.range=t,this.nice=!1,this.tickCount=jL.defaultTickCount,this.minTickCount=0,this.maxTickCount=1/0,this.niceDomain=[],this.defaultClampMode="raw",this.cache=null,this.cacheProps=["domain","range","nice","tickCount","minTickCount","maxTickCount"]}transform(e){return e}transformInvert(e){return e}calcBandwidth(e=1){const t=this.getDomain(),i=Math.max(...this.range),n=(t[1]-t[0])/e+1,o=Math.floor(i),r=Math.min(n,o);return i/Math.max(1,r)}fromDomain(e){return"number"===typeof e?e:e instanceof Date?e.getTime():NaN}getDomain(){return this.nice&&(this.refresh(),this.niceDomain.length)?this.niceDomain:this.domain}convert(e,t){var i;const n=null!==(i=null===t||void 0===t?void 0:t.clampMode)&&void 0!==i?i:this.defaultClampMode;if(!this.domain||this.domain.length<2)return NaN;this.refresh();const o=this.getDomain().map((e=>this.transform(e))),[r,s]=o,{range:a}=this,[l,c]=a;if(e=this.transform(e),"clamped"===n){if(e<r)return l;if(e>s)return c}return r===s?(l+c)/2:e===r?l:e===s?c:l+(this.fromDomain(e)-this.fromDomain(r))/(this.fromDomain(s)-this.fromDomain(r))*(c-l)}invert(e){this.refresh();const t=this.getDomain().map((e=>this.transform(e))),[i,n]=t,{range:o}=this,[r,s]=o,a=r>s,l=a?s:r,c=a?r:s;let u;return e<l?a?n:i:e>c?a?i:n:(u=r===s?this.toDomain((this.fromDomain(i)+this.fromDomain(n))/2):this.toDomain(this.fromDomain(i)+(e-r)/(s-r)*(this.fromDomain(n)-this.fromDomain(i))),this.transformInvert(u))}didChange(){const{cache:e}=this,t=!e||this.cacheProps.some((t=>this[t]!==e[t]));return!!t&&(this.cache={},this.cacheProps.forEach((e=>this.cache[e]=this[e])),!0)}refresh(){this.didChange()&&this.update()}getPixelRange(){const e=this.range.slice().sort(((e,t)=>e-t));return e[1]-e[0]}isDenseInterval({start:e,stop:t,interval:i,count:n}){const o=t-e,r=this.getPixelRange(),s="number"===typeof i?i:1;return null!==n&&void 0!==n||(n=o/s),n>=r&&(gM.warn("the configured tick interval results in more than 1 tick per pixel, ignoring. Supply a larger tick interval or omit this configuration."),!0)}}jL.defaultTickCount=5,jL.defaultMaxTickCount=6;class HL extends jL{constructor(){super([0,1],[0,1]),this.type="linear"}toDomain(e){return e}ticks(){var e;const t=null!==(e=this.tickCount)&&void 0!==e?e:jL.defaultTickCount;if(!this.domain||this.domain.length<2||t<1||this.domain.some((e=>!isFinite(e))))return[];this.refresh();const[i,n]=this.getDomain(),{interval:o}=this;if(o){const e=Math.abs(o);if(!this.isDenseInterval({start:i,stop:n,interval:e}))return BL(i,n,e)}return LL(i,n,t,this.minTickCount,this.maxTickCount)}update(){!this.domain||this.domain.length<2||this.nice&&this.updateNiceDomain()}getTickStep(e,t){var i,n;const o=null!==(i=this.tickCount)&&void 0!==i?i:jL.defaultTickCount;return null!==(n=this.interval)&&void 0!==n?n:FL(e,t,o,this.minTickCount,this.maxTickCount)}updateNiceDomain(){var e;const t=null!==(e=this.tickCount)&&void 0!==e?e:jL.defaultTickCount;let[i,n]=this.domain;if(t<1)return void(this.niceDomain=[i,n]);if(1===t)return void(this.niceDomain=GL(i,n));const o=4;let r=i,s=n;for(let a=0;a<o;a++){const e=this.getTickStep(i,n),[t,o]=this.domain;if(e>=1)i=Math.floor(t/e)*e,n=Math.ceil(o/e)*e;else{const r=1/e;i=Math.floor(t*r)/r,n=Math.ceil(o*r)/r}if(i===r&&n===s)break;r=i,s=n}this.niceDomain=[i,n]}tickFormat({ticks:e,specifier:t}){return NL(null!==e&&void 0!==e?e:this.ticks(),t)}}function WL(e,t){let i=0;return"number"===typeof e&&"number"===typeof t?i=e-t:"string"===typeof e&&"string"===typeof t?i=e.localeCompare(t):null==e&&null==t||(i=null==e?-1:null==t?1:String(e).localeCompare(String(t))),i}function UL(e,t,i){const n=e=>"function"===typeof e?e():e;for(const o in e){const r=i(n(e[o]),n(t[o]));if(0!==r)return r}return 0}class zL extends CN{zIndexChanged(){var e;this.layer&&(null===(e=this._layerManager)||void 0===e||e.moveLayer(this.layer,this.zIndex,this.zIndexSubOrder))}isLayer(){return null!=this.layer}constructor(e){var t;super({isVirtual:null===e||void 0===e?void 0:e.isVirtual}),this.opts=e,this.opacity=1,this.lastBBox=void 0;const{zIndex:i,zIndexSubOrder:n}=null!==e&&void 0!==e?e:{};this.isContainerNode=!0,void 0!==i&&(this.zIndex=i),void 0!==n&&(this.zIndexSubOrder=n),this.name=null===(t=this.opts)||void 0===t?void 0:t.name}_setLayerManager(e){var t,i;if(this._layerManager&&this.layer&&(this._layerManager.removeLayer(this.layer),this.layer=void 0),this.layer)throw new Error("AG Charts - unable to deregister scene rendering layer!");if(super._setLayerManager(e),e&&(null===(t=this.opts)||void 0===t?void 0:t.layer)){const{zIndex:t,zIndexSubOrder:n,name:o}=null!==(i=this.opts)&&void 0!==i?i:{},r=()=>this.getComputedOpacity(),s=()=>this.getVisibility();this.layer=e.addLayer({zIndex:t,zIndexSubOrder:n,name:o,getComputedOpacity:r,getVisibility:s})}}getComputedOpacity(){let e=1,t=this;do{t instanceof zL&&(e*=t.opacity)}while(t=t.parent);return e}getVisibility(){let e=this,t=this.visible;while(e=e.parent)e.visible||(t=e.visible);return t}visibilityChanged(){this.layer&&(this.layer.enabled=this.visible)}markDirty(e,t=nN.TRIVIAL){if(this.isVirtual)return void super.markDirty(e,t);let i=t;(t<nN.MINOR||null!=this.layer)&&(i=nN.TRIVIAL),super.markDirty(e,t,i)}containsPoint(e,t){return!0}computeBBox(){return this.computeTransformMatrix(),zL.computeBBox(this.children)}computeTransformedBBox(){return this.computeBBox()}render(e){var t,i;const{opts:{name:n}={},_debug:o=(()=>{})}=this,{dirty:r,dirtyZIndex:s,layer:a,children:l,clipRect:c,dirtyTransform:u}=this;let{ctx:d,forceRender:p,clipBBox:h}=e;const{resized:f,stats:g}=e,v=d.getTransform(),y=r>=nN.MINOR||s||f;let m=y,C=!1;for(const O of l)if(m||(m=null==O.layerManager&&O.dirty>=nN.TRIVIAL),C||(C=null!=O.layerManager&&O.dirty>=nN.TRIVIAL),m)break;
18if(n&&o({name:n,group:this,isDirty:y,isChildDirty:m,dirtyTransform:u,renderCtx:e,forceRender:p}),u)p="dirtyTransform";else if(a){const e=this.computeBBox();void 0!==this.lastBBox&&this.lastBBox.equals(e)||(p="dirtyTransform",this.lastBBox=e)}if(!y&&!m&&!C&&!p)return n&&g&&o({name:n,result:"skipping",renderCtx:e,counts:this.nodeCount,group:this}),a&&g&&(g.layersSkipped++,g.nodesSkipped+=this.nodeCount.count),void this.markClean({recursive:!1});const b=this.visible;if(a){if(d=a.context,d.save(),d.resetTransform(),"dirtyTransform"!==p&&(p=m||s),p&&a.clear(),h){const{width:t,height:i,x:r,y:s}=h;o((()=>({name:n,clipBBox:h,ctxTransform:d.getTransform(),renderCtx:e,group:this}))),this.clipCtx(d,r,s,t,i)}d.setTransform(v)}else d.globalAlpha*=this.opacity;if(this.computeTransformMatrix(),this.matrix.toContext(d),c){const{x:t,y:i,width:r,height:s}=c;d.save(),o((()=>({name:n,clipRect:c,ctxTransform:d.getTransform(),renderCtx:e,group:this}))),this.clipCtx(d,t,i,r,s),h=this.matrix.transformBBox(c)}const w=this.hasVirtualChildren();s?(this.sortChildren(l),"dirtyTransform"!==p&&(p=!0)):w&&this.sortChildren(l);const S=p!==e.forceRender||h!==e.clipBBox||d!==e.ctx,E=S?Object.assign(Object.assign({},e),{ctx:d,forceRender:p,clipBBox:h}):e;let x=0;for(const O of l)O.visible&&b?p||O.dirty!==nN.NONE?(d.save(),O.render(E),d.restore()):g&&(x+=O.nodeCount.count):(O.markClean(),g&&(x+=O.nodeCount.count));if(g&&(g.nodesSkipped+=x),super.render(e),c&&d.restore(),w)for(const O of this.virtualChildren)O.markClean({recursive:"virtual"});a&&(g&&g.layersRendered++,d.restore(),p&&a.snapshot(),null===(i=(t=a.context).verifyDepthZero)||void 0===i||i.call(t)),n&&g&&o({name:n,result:"rendered",skipped:x,renderCtx:e,counts:this.nodeCount,group:this})}sortChildren(e){this.dirtyZIndex=!1,e.sort(((e,t)=>{var i,n;return UL([e.zIndex,...null!==(i=e.zIndexSubOrder)&&void 0!==i?i:[void 0,void 0],e.serialNumber],[t.zIndex,...null!==(n=t.zIndexSubOrder)&&void 0!==n?n:[void 0,void 0],t.serialNumber],WL)}))}clipCtx(e,t,i,n,o){e.beginPath(),e.moveTo(t,i),e.lineTo(t+n,i),e.lineTo(t+n,i+o),e.lineTo(t,i+o),e.closePath(),e.clip()}static computeBBox(e){let t=1/0,i=-1/0,n=1/0,o=-1/0;return e.forEach((e=>{if(!e.visible)return;const r=e.computeTransformedBBox();if(!r)return;const s=r.x,a=r.y;s<t&&(t=s),a<n&&(n=a),s+r.width>i&&(i=s+r.width),a+r.height>o&&(o=a+r.height)})),new gN(t,n,i-t,o-n)}setClipRectInGroupCoordinateSpace(e){this.clipRect=e?this.transformBBox(e):void 0}}zL.className="Group",iM([sN({redraw:nN.MAJOR,convertor:e=>Math.min(1,Math.max(0,e))}),nM("design:type",Number)],zL.prototype,"opacity",void 0);class KL{static select(e,t,i=!0){return new KL(e,t,i)}static selectAll(e,t){const i=[],n=e=>{t(e)&&i.push(e),e.children.forEach(n)};return n(e),i}static selectByClass(e,t){return KL.selectAll(e,(e=>e instanceof t))}static selectByTag(e,t){return KL.selectAll(e,(e=>e.tag===t))}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=bM.create(!0,"scene","scene:selections"),this.nodeFactory=Object.prototype.isPrototypeOf.call(CN,t)?()=>new t:t}createNode(e,t,i){const n=this.nodeFactory(e);return n.datum=e,null===t||void 0===t||t(n),null!=i?this._nodes.splice(i,0,n):this._nodes.push(n),this.parentNode.appendChild(n),n}update(e,t,i){if(this.garbageBin.size>0&&this.debug(`Selection - update() called with pending garbage: ${e}`),i){const n=new Map(e.map(((e,t)=>[i(e),[e,t]])));for(const[e,t]of this._nodesMap.entries())if(n.has(t)){const[i]=n.get(t);e.datum=i,this.garbageBin.delete(e),n.delete(t)}else this.garbageBin.add(e);for(const[e,[i,o]]of n.entries())this._nodesMap.set(this.createNode(i,t,o),e)}else{const i=Math.max(e.length,this.data.length);for(let n=0;n<i;n++)n>=e.length?this.garbageBin.add(this._nodes[n]):n>=this._nodes.length?this.createNode(e[n],t):(this._nodes[n].datum=e[n],this.garbageBin.delete(this._nodes[n]))}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),this.parentNode.removeChild(e),!1)))),this}clear(){return this.update([]),this}isGarbage(e){return this.garbageBin.has(e)}hasGarbage(){return this.garbageBin.size>0}
18each(e){return this._nodes.forEach(((t,i)=>e(t,t.datum,i))),this}*[Symbol.iterator](){for(let e=0;e<this._nodes.length;e++){const t=this._nodes[e],i=this._nodes[e].datum;yield{node:t,datum:i,index:e}}}select(e){return KL.selectAll(this.parentNode,e)}selectByClass(e){return KL.selectByClass(this.parentNode,e)}selectByTag(e){return KL.selectByTag(this.parentNode,e)}nodes(){return this._nodes}}class YL extends DN{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 gN(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){if(this.x1===this.x2||this.y1===this.y2){const{x:i,y:n}=this.transformPoint(e,t);return this.computeBBox().grow(this.strokeWidth/2).containsPoint(i,n)}return!1}render(e){var t;const{ctx:i,forceRender:n,stats:o}=e;if(this.dirty===nN.NONE&&!n)return void(o&&(o.nodesSkipped+=this.nodeCount.count));this.computeTransformMatrix(),this.matrix.toContext(i);let{x1:r,y1:s,x2:a,y2:l}=this;if(r===a){const e=Math.round(r)+Math.floor(this.strokeWidth)%2/2;r=e,a=e}else if(s===l){const e=Math.round(s)+Math.floor(this.strokeWidth)%2/2;s=e,l=e}i.beginPath(),i.moveTo(r,s),i.lineTo(a,l),this.fillStroke(i),null===(t=this.fillShadow)||void 0===t||t.markClean(),super.render(e)}}function qL(e,t){const i=-t/e;return 0!==e&&i>=0&&i<=1?[i]:[]}function XL(e,t,i){if(0===e)return qL(t,i);const n=t*t-4*e*i,o=[];if(0===n){const i=-t/(2*e);i>=0&&i<=1&&o.push(i)}else if(n>0){const i=Math.sqrt(n),r=(-t-i)/(2*e),s=(-t+i)/(2*e);r>=0&&r<=1&&o.push(r),s>=0&&s<=1&&o.push(s)}return o}function $L(e,t,i,n){if(0===e)return XL(t,i,n);const o=t/e,r=i/e,s=n/e,a=(3*r-o*o)/9,l=(9*o*r-27*s-2*o*o*o)/54,c=a*a*a+l*l,u=1/3,d=[];if(c>=0){const e=Math.sqrt(c),t=Math.sign(l+e)*Math.pow(Math.abs(l+e),u),i=Math.sign(l-e)*Math.pow(Math.abs(l-e),u),n=Math.abs(Math.sqrt(3)*(t-i)/2),r=-u*o+(t+i);if(r>=0&&r<=1&&d.push(r),0===n){const e=-u*o-(t+i)/2;e>=0&&e<=1&&d.push(e)}}else{const e=Math.acos(l/Math.sqrt(-a*a*a)),t=u*o,i=2*Math.sqrt(-a),n=i*Math.cos(u*e)-t,r=i*Math.cos(u*(e+2*Math.PI))-t,s=i*Math.cos(u*(e+4*Math.PI))-t;n>=0&&n<=1&&d.push(n),r>=0&&r<=1&&d.push(r),s>=0&&s<=1&&d.push(s)}return d}function ZL(e,t,i,n,o,r,s,a){const l=(i-e)*(a-r)-(n-t)*(s-o);if(0===l)return null;const c=((s-o)*(t-r)-(e-o)*(a-r))/l,u=((i-e)*(t-r)-(n-t)*(e-o))/l;return c>=0&&c<=1&&u>=0&&u<=1?{x:e+c*(i-e),y:t+c*(n-t)}:null}function JL(e,t,i,n,o,r,s,a,l,c,u,d){const p=[],h=c-d,f=u-l,g=l*(d-c)-c*(u-l),v=QL(e,i,o,s),y=QL(t,n,r,a),m=h*v[0]+f*y[0],C=h*v[1]+f*y[1],b=h*v[2]+f*y[2],w=h*v[3]+f*y[3]+g,S=$L(m,C,b,w);for(const E of S){const e=E*E,t=E*e,i=v[0]*t+v[1]*e+v[2]*E+v[3],n=y[0]*t+y[1]*e+y[2]*E+y[3];let o;o=l!==u?(i-l)/(u-l):(n-c)/(d-c),o>=0&&o<=1&&p.push({x:i,y:n})}return p}function QL(e,t,i,n){return[3*t-e-3*i+n,3*e-6*t+3*i,-3*e+3*t,e]}function eI(e,t,i,n,o,r,s,a,l,c){const u=(c-a)/(l-s),d=a-u*s,p=Math.pow(u,2)+1,h=2*(u*(d-t)-e),f=Math.pow(e,2)+Math.pow(d-t,2)-Math.pow(i,2),g=Math.pow(h,2)-4*p*f;if(g<0)return[];const v=(-h+Math.sqrt(g))/2/p,y=(-h-Math.sqrt(g))/2/p,m=[];return[v,y].forEach((e=>{const t=e>=Math.min(s,l)&&e<=Math.max(s,l);if(!t)return;const i=u*e+d,a=FM(n);let c=FM(o),p=FM(Math.atan2(i,e));c<=a&&(c+=2*Math.PI),p<a&&(p+=2*Math.PI),r!==(p>=a&&p<=c)&&m.push({x:e,y:i})})),m}function tI(e,t,i){const n=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),{innerRadius:o,outerRadius:r}=i;if(i.startAngle===i.endAngle||n<Math.min(o,r)||n>Math.max(o,r))return!1;const s=VM(i.startAngle),a=VM(i.endAngle),l=Math.atan2(t,e);return s<a?l<=a&&l>=s:l<=a&&l>=-Math.PI||l>=s&&l<=Math.PI}function iI(e,t){const{startAngle:i,endAngle:n,innerRadius:o,outerRadius:r}=t,s={x:r*Math.cos(i),y:r*Math.sin(i)},a={x:r*Math.cos(n),y:r*Math.sin(n)},l=0===o?{x:0,y:0}:{x:o*Math.cos(i),y:o*Math.sin(i)},c=0===o?{x:0,y:0}:{x:o*Math.cos(n),y:o*Math.sin(n)};return null!=ZL(e.start.x,e.start.y,e.end.x,e.end.y,s.x,s.y,l.x,l.y)||null!=ZL(e.start.x,e.start.y,e.end.x,e.end.y,a.x,a.y,c.x,c.y)||eI(0,0,r,i,n,!0,e.start.x,e.start.y,e.end.x,e.end.y).length>0}function nI(e,t){const i={x:e.x,y:e.y},n={x:e.x+e.width,y:e.y},o={x:e.x,y:e.y+e.height},r={x:e.x+e.width,y:e.y+e.height};return iI({start:i,end:n},t)||iI({start:o,end:r},t)}var oI;YL.className="Line",YL.defaultStyles=Object.assign({},DN.defaultStyles,{fill:void 0,strokeWidth:1}),iM([sN({redraw:nN.MAJOR}),nM("design:type",Number)],YL.prototype,"x1",void 0),iM([sN({redraw:nN.MAJOR}),nM("design:type",Number)],YL.prototype,"y1",void 0),iM([sN({redraw:nN.MAJOR}),nM("design:type",Number)],YL.prototype,"x2",void 0),iM([sN({redraw:nN.MAJOR}),nM("design:type",Number)],YL.prototype,"y2",void 0),function(e){e[e["Move"]=0]="Move",e[e["Line"]=1]="Line",e[e["Arc"]=2]="Arc",e[e["Curve"]=3]="Curve",e[e["ClosePath"]=4]="ClosePath"}(oI||(oI={}));class rI{constructor(){this.previousCommands=[],this.previousParams=[],this.previousClosedPath=!1,this.commands=[],this.params=[],this._closedPath=!1}
18isDirty(){if(this._closedPath!==this.previousClosedPath)return!0;if(this.previousCommands.length!==this.commands.length)return!0;if(this.previousParams.length!==this.params.length)return!0;for(let e=0;e<this.commands.length;e++)if(this.commands[e]!==this.previousCommands[e])return!0;for(let e=0;e<this.params.length;e++)if(this.params[e]!==this.previousParams[e])return!0;return!1}draw(e){const t=this.commands,i=this.params;let n=0;e.beginPath();for(const o of t)switch(o){case oI.Move:e.moveTo(i[n++],i[n++]);break;case oI.Line:e.lineTo(i[n++],i[n++]);break;case oI.Curve:e.bezierCurveTo(i[n++],i[n++],i[n++],i[n++],i[n++],i[n++]);break;case oI.Arc:e.arc(i[n++],i[n++],i[n++],i[n++],i[n++],1===i[n++]);break;case oI.ClosePath:e.closePath();break}0===t.length&&e.closePath()}moveTo(e,t){this.xy?(this.xy[0]=e,this.xy[1]=t):this.xy=[e,t],this.commands.push(oI.Move),this.params.push(e,t)}lineTo(e,t){this.xy?(this.commands.push(oI.Line),this.params.push(e,t),this.xy[0]=e,this.xy[1]=t):this.moveTo(e,t)}rect(e,t,i,n){this.moveTo(e,t),this.lineTo(e+i,t),this.lineTo(e+i,t+n),this.lineTo(e,t+n),this.closePath()}arc(e,t,i,n,o,r=!1){const s=e+i*Math.cos(o),a=t+i*Math.sin(o);this.xy?(this.xy[0]=s,this.xy[1]=a):this.xy=[s,a],this.commands.push(oI.Arc),this.params.push(e,t,i,n,o,r?1:0)}cubicCurveTo(e,t,i,n,o,r){this.xy||this.moveTo(e,t),this.commands.push(oI.Curve),this.params.push(e,t,i,n,o,r),this.xy&&(this.xy[0]=o,this.xy[1]=r)}get closedPath(){return this._closedPath}closePath(){this.xy&&(this.xy=void 0,this.commands.push(oI.ClosePath),this._closedPath=!0)}clear({trackChanges:e}={trackChanges:!1}){e?(this.previousCommands=this.commands,this.previousParams=this.params,this.previousClosedPath=this._closedPath,this.commands=[],this.params=[]):(this.commands.length=0,this.params.length=0),this.xy=void 0,this._closedPath=!1}isPointInPath(e,t){const i=this.commands,n=this.params,o=i.length,r=-1e4,s=-1e4;let a=NaN,l=NaN,c=0,u=0,d=0;for(let p=0,h=0;p<o;p++)switch(i[p]){case oI.Move:!isNaN(a)&&ZL(a,l,c,u,r,s,e,t)&&d++,c=n[h++],a=c,u=n[h++],l=u;break;case oI.Line:ZL(c,u,n[h++],n[h++],r,s,e,t)&&d++,c=n[h-2],u=n[h-1];break;case oI.Curve:d+=JL(c,u,n[h++],n[h++],n[h++],n[h++],n[h++],n[h++],r,s,e,t).length,c=n[h-2],u=n[h-1];break;case oI.Arc:const i=n[h++],o=n[h++],p=n[h++],f=n[h++],g=n[h++],v=Boolean(n[h++]);d+=eI(i,o,p,f,g,v,r,s,e,t).length,c=i+Math.cos(g)*p,u=o+Math.sin(g)*p;break;case oI.ClosePath:!isNaN(a)&&ZL(a,l,c,u,r,s,e,t)&&d++;break}return d%2===1}getPoints(){const{commands:e,params:t}=this,i=[];let n=0;for(let o=0;o<e.length;o++)switch(e[o]){case oI.Move:case oI.Line:i.push({x:t[n++],y:t[n++]});break;case oI.Curve:n+=4,i.push({x:t[n++],y:t[n++]});break;case oI.Arc:i.push({x:t[n++],y:t[n++]}),n+=4;break;case oI.ClosePath:break}return i}}function sI(e){const{redraw:t=nN.MAJOR,changeCb:i,convertor:n}=null!==e&&void 0!==e?e:{};return sN({redraw:t,type:"path",convertor:n,changeCb:i})}class aI extends DN{constructor(){super(...arguments),this.path=new rI,this.clipScalingX=1,this.clipScalingY=1,this._dirtyPath=!0}set dirtyPath(e){this._dirtyPath!==e&&(this._dirtyPath=e,e&&this.markDirty(this,nN.MAJOR))}get dirtyPath(){return this._dirtyPath}checkPathDirty(){var e,t,i,n;this._dirtyPath||(this.dirtyPath=this.path.isDirty()||null!==(t=null===(e=this.fillShadow)||void 0===e?void 0:e.isDirty())&&void 0!==t&&t||null!==(n=null===(i=this.clipPath)||void 0===i?void 0:i.isDirty())&&void 0!==n&&n)}isPointInPath(e,t){const i=this.transformPoint(e,t);return this.path.closedPath&&this.path.isPointInPath(i.x,i.y)}isDirtyPath(){return!1}updatePath(){}clip(e,t){const i=e.getTransform(),n=1!==this.clipScalingX||1!==this.clipScalingY;n&&e.scale(this.clipScalingX,this.clipScalingY),t(),n&&e.setTransform(i)}render(e){var t;const{ctx:i,forceRender:n,stats:o}=e;this.dirty!==nN.NONE||n?(this.computeTransformMatrix(),this.matrix.toContext(i),(this.dirtyPath||this.isDirtyPath())&&(this.updatePath(),this.dirtyPath=!1),this.clipPath&&null!=this.clipMode?(i.save(),"normal"===this.clipMode&&this.clip(i,(()=>{var e;null===(e=this.clipPath)||void 0===e||e.draw(i),i.clip()})),this.clipScalingX>0&&this.clipScalingY>0&&(this.path.draw(i),this.fillStroke(i)),"punch-out"===this.clipMode&&this.clip(i,(()=>{var e,t;null===(e=this.clipPath)||void 0===e||e.draw(i),i.clip();const{x:n=-1e4,y:o=-1e4,width:r=2e4,height:s=2e4}=null!==(t=this.computeBBox())&&void 0!==t?t:{};i.clearRect(n,o,r,s)}
18)),i.restore()):(this.path.draw(i),this.fillStroke(i)),null===(t=this.fillShadow)||void 0===t||t.markClean(),super.render(e)):o&&(o.nodesSkipped+=this.nodeCount.count)}}aI.className="Path",iM([sI(),nM("design:type",rI)],aI.prototype,"clipPath",void 0),iM([sI(),nM("design:type",String)],aI.prototype,"clipMode",void 0),iM([sI(),nM("design:type",Object)],aI.prototype,"clipScalingX",void 0),iM([sI(),nM("design:type",Object)],aI.prototype,"clipScalingY",void 0);class lI extends aI{constructor(){super(...arguments),this.centerX=0,this.centerY=0,this.innerRadius=10,this.outerRadius=20,this.startAngle=0,this.endAngle=2*Math.PI,this.angleOffset=0,this.inset=0}computeBBox(){const e=this.outerRadius;return new gN(this.centerX-e,this.centerY-e,2*e,2*e)}updatePath(){const e=this.path,{angleOffset:t,inset:i}=this,n=this.startAngle+t,o=this.endAngle+t,r=Math.abs(this.endAngle-this.startAngle)>=2*Math.PI,s=this.centerX,a=this.centerY;if(e.clear(),r){const t=this.innerRadius<=0?0:this.innerRadius+i,r=Math.min(t,this.outerRadius-i),l=Math.max(t,this.outerRadius-i);e.arc(s,a,l,n,o),r>0&&(e.moveTo(s+r*Math.cos(o),a+r*Math.sin(o)),e.arc(s,a,r,o,n,!0))}else{const t=Math.min(this.innerRadius+i,this.outerRadius-i),r=Math.max(this.innerRadius+i,this.outerRadius-i),l=t>0?i/t:0,c=r>0?i/r:0,u=Math.abs(o-n),d=u<2*c;if(d)return;const p=t<=i||u<2*l;if(p){const l=Math.abs(u)<.5*Math.PI?i*(1+Math.cos(u))/Math.sin(u):NaN;let c;c=l>0&&l<r?Math.max(Math.hypot(i,l),t):t;const d=.5*(n+o);e.moveTo(s+c*Math.cos(d),a+c*Math.sin(d))}else e.moveTo(s+t*Math.cos(n+l),a+t*Math.sin(n+l));e.arc(s,a,r,n+c,o-c),p||(t>0?e.arc(s,a,t,o-l,n+l,!0):e.lineTo(s,a))}e.closePath(),this.dirtyPath=!1}isPointInPath(e,t){const{angleOffset:i}=this,n=this.startAngle+i,o=this.endAngle+i,r=Math.min(this.innerRadius,this.outerRadius),s=Math.max(this.innerRadius,this.outerRadius),a=this.transformPoint(e,t);return tI(a.x,a.y,{startAngle:n,endAngle:o,innerRadius:r,outerRadius:s})}}function cI(e,t){if(pI(e)&&pI(t)){const i={};return Object.keys(e).forEach((n=>{i[n]=n in t?cI(e[n],t[n]):e[n]})),Object.keys(t).forEach((n=>{n in e||(i[n]=t[n])})),i}return Array.isArray(e)&&!Array.isArray(t)||uI(e)&&!uI(t)?e:t}function uI(e){return"object"===typeof e&&null!==e}function dI(e){return uI(e)&&!Array.isArray(e)}function pI(e){return dI(e)&&e.constructor===Object}function hI(...e){var t;const i={};for(const n of e){if(!n)continue;const e=OM(n)?TM(n):Object.keys(n);for(const o of e)dI(i[o])&&dI(n[o])?i[o]=hI(i[o],n[o]):null!==(t=i[o])&&void 0!==t||(i[o]=n[o])}return i}lI.className="Sector",iM([sI(),nM("design:type",Number)],lI.prototype,"centerX",void 0),iM([sI(),nM("design:type",Number)],lI.prototype,"centerY",void 0),iM([sI(),nM("design:type",Number)],lI.prototype,"innerRadius",void 0),iM([sI(),nM("design:type",Number)],lI.prototype,"outerRadius",void 0),iM([sI(),nM("design:type",Number)],lI.prototype,"startAngle",void 0),iM([sI(),nM("design:type",Number)],lI.prototype,"endAngle",void 0),iM([sI(),nM("design:type",Number)],lI.prototype,"angleOffset",void 0),iM([sI(),nM("design:type",Number)],lI.prototype,"inset",void 0);let fI=null;function gI(e){if(null!=e)return""===e?"":(null!==fI&&void 0!==fI||(fI=document.createElement("div")),fI.textContent=String(e),fI.innerHTML)}const vI=e=>"string"===typeof e,yI=e=>!!e&&Object.prototype.hasOwnProperty.call(e,"toString")&&vI(e.toString()),mI=e=>e instanceof Date&&!isNaN(+e);function CI(e){return vI(e)||yI(e)}function bI(e){const t=e=>!!e&&Object.prototype.hasOwnProperty.call(e,"valueOf")&&SI(e.valueOf()),i=e=>e instanceof Date&&!isNaN(+e);return SI(e)||t(e)||i(e)}function wI(e,t){return t&&bI(e)?e:t?void 0:CI(e)?e:String(e)}const SI=e=>"number"===typeof e&&Number.isFinite(e),EI=new Map;function xI(e,t){var i,n,o;const r=JSON.stringify(e,null,0);return EI.has(t)||EI.set(t,new Map),(null===(i=EI.get(t))||void 0===i?void 0:i.has(r))||null===(n=EI.get(t))||void 0===n||n.set(r,t(e)),null===(o=EI.get(t))||void 0===o?void 0:o.get(r)}const OI={type:"reducer",property:"smallestKeyInterval",initialValue:1/0,reducer:()=>{let e=NaN;return(t=1/0,i)=>{const n=i.keys[0],o=Math.abs(n-e);return e=n,!isNaN(o)&&o>0&&o<t?o:t}}},TI={type:"processor",property:"sortedGroupDomain",calculate:({domain:{groups:e}})=>{if(null!=e)return[...e].sort(((e,t)=>{for(let i=0;i<e.length;i++){const n=e[i]-t[i];if(0!==n)return n}return 0}))}};function DI({normaliseTo:e,mode:t}){const i=(t,i)=>{const n=t*e/i;return n>=0?Math.min(e,n):Math.max(-e,n)};return()=>()=>(e,n)=>{const o=[0,0];for(const i of n){const n=e[i],r=n<0?0:1;"sum"===t?o[r]+=n:o[r]=0===r?Math.min(o[r],n):Math.max(o[r],n)}const r=Math.max(Math.abs(o[0]),o[1]);for(const t of n)e[t]=i(e[t],r)}}function RI(e,t,i,n="sum"){return{scopes:[e.id],type:"group-value-processor",matchGroupIds:t,adjust:xI({n
18ormaliseTo:i,mode:n},DI)}}function AI({normaliseTo:e,zeroDomain:t,rangeMin:i,rangeMax:n}){const o=e[1]-e[0],r=(i,n,r)=>{const s=e[0]+(i-n)/r*o;return 0===r?t:s>=e[1]?e[1]:s<e[0]?e[0]:s};return()=>(t,o)=>{let[s,a]=t.domain.values[o];null!=i&&(s=i),null!=n&&(a=n);const l=a-s;t.domain.values[o]=[e[0],e[1]];for(const e of t.data){let i=e.values;"ungrouped"===t.type&&(i=[i]);for(const e of i)e[o]=r(e[o],s,l)}}}function _I(e,t,i,n,o,r){return{scopes:[e.id],type:"property-value-processor",property:t,adjust:xI({normaliseTo:i,rangeMin:o,rangeMax:r,zeroDomain:n},AI)}}function PI(e,t=[]){return{type:"processor",scopes:[e.id],property:"animationValidation",calculate(i){var n;const{keys:o,values:r}=i.defs,{input:s,data:a}=i;let l=!0,c=!0;const u=[];for(let p=0;p<r.length;p++)(null===(n=r[p].scopes)||void 0===n?void 0:n.some((t=>t===e.id)))&&t.some((e=>r[p].id===e))&&u.push([p,r[p]]);const d=(e,t,n)=>{var o;if("category"===t.valueType){const t=i.domain[n][e];return void(l&&(l=t.length===s.count))}let r=null===(o=a[0])||void 0===o?void 0:o[n][e];for(let i=1;(l||c)&&i<a.length;i++){const t=a[i][n][e];c&&(c=r<=t),l&&(l=r!==t),r=t}};for(let e=0;(l||c)&&e<o.length;e++)d(e,o[e],"keys");for(let e=0;(l||c)&&e<u.length;e++){const[t,i]=u[e];d(t,i,"values")}return{uniqueKeys:l,orderedKeys:c}}}}function MI({mode:e,separateNegative:t}){return()=>()=>(i,n)=>{const o=[0,0];for(const r of n){const n=i[r],s=YM(n)&&t?0:1;"number"!==typeof n||isNaN(n)||("normal"===e&&(o[s]+=n),i[r]=o[s],"trailing"===e&&(o[s]+=n))}}}function kI({mode:e,sum:t}){return()=>{const i=[];let n=!0;return()=>(o,r)=>{let s=0;for(const a of r){const r=o[a],l=n&&"current"===t?0:i[a];i[a]=r;const c="current"===t?r:l;"number"!==typeof r||isNaN(r)?o[a]=s:"number"!==typeof l||isNaN(l)?o[a]=s:("normal"===e&&(s+=c),o[a]=s,"trailing"===e&&(s+=c))}n=!1}}}function NI(e,t,i,n,o=!1){let r;if(i.startsWith("window")){const e=i.endsWith("-trailing")?"trailing":"normal";r=xI({mode:e,sum:n},kI)}else r=xI({mode:i,separateNegative:o},MI);return{scopes:[e.id],type:"group-value-processor",matchGroupIds:[t],adjust:r}}function LI(e,t=!0){return{type:"processor",property:"diff",calculate:i=>{const n={changed:!1,moved:[],added:[],updated:[],removed:[],addedIndices:[],updatedIndices:[],removedIndices:[]},o=new Map,r=new Map,s=new Map,a=new Map,l=new Map,c=new Map,u=new Map;for(let d=0;d<Math.max(e.data.length,i.data.length);d++){const n=e.data[d],p=i.data[d],h=n?II(n.keys):"",f=p?II(p.keys):"";h!==f?(a.has(f)?(!t&&dM(a.get(f).values,p.values)||(s.set(f,p),c.set(f,d),o.set(f,p)),a.delete(f),u.delete(f)):p&&(r.set(f,p),l.set(f,d)),r.has(h)?(!t&&dM(r.get(h).values,n.values)||(s.set(h,n),c.set(h,d),o.set(h,n)),r.delete(h),l.delete(h)):n&&(s.delete(h),c.delete(h),a.set(h,n),u.set(h,d))):dM(n.values,p.values)||(s.set(f,p),c.set(f,d))}return n.added=Array.from(r.keys()),n.updated=Array.from(s.keys()),n.removed=Array.from(a.keys()),n.moved=Array.from(o.keys()),n.addedIndices=Array.from(l.values()),n.updatedIndices=Array.from(c.values()),n.removedIndices=Array.from(u.values()),n.changed=n.added.length>0||n.updated.length>0||n.removed.length>0,n}}}function II(e){return e.join("___")}class FI{constructor(){this.enabled=!0,this.color="#464646",this.fontSize=12,this.fontFamily="Verdana, sans-serif"}getFont(){return MN(this)}}function GI(e){const{parallelFlipRotation:t=0,regularFlipRotation:i=0}=e,n=e.rotation?FM(BM(e.rotation)):0,o=!n&&t>=0&&t<=Math.PI?-1:1,r=!n&&i>=0&&i<=Math.PI?-1:1;let s=0;return e.parallel?s=o*Math.PI/2:-1===r&&(s=Math.PI),{configuredRotation:n,defaultRotation:s,parallelFlipFlag:o,regularFlipFlag:r}}function VI(e,t){return isNaN(e)?t?0:10:e}function BI(e,t,i,n){return e&&!t?i*n===-1?"hanging":"bottom":"middle"}function jI(e,t,i,n,o){const r=t>0&&t<=Math.PI,s=i>0&&i<=Math.PI,a=r||s?-1:1;if(e){if(!t&&!i)return"center";if(n*a===-1)return"end"}else if(n*o===-1)return"end";return"start"}function HI(e,t,i,n,o){const{width:r,height:s}=t,a=new gN(i,n,0,0);o.transformBBox(a,t);const{x:l=0,y:c=0}=t;return t.width=r,t.height=s,{point:{x:l,y:c,size:0},label:{width:r,height:s,text:e}}}var WI;iM([JM(dk),nM("design:type",Object)],FI.prototype,"enabled",void 0),iM([JM(wk),nM("design:type",Object)],FI.prototype,"color",void 0),iM([JM(Ik),nM("design:type",String)],FI.prototype,"fontStyle",void 0),iM([JM(Gk),nM("design:type",String)],FI.prototype,"fontWeight",void 0),iM([JM(Tk(0)),nM("design:type",Object)],FI.prototype,"fontSize",void 0),iM([JM(hk),nM("design:type",Object)],FI.prototype,"fontFamily",void 0),iM([JM(uk),nM("design:type",Function)],FI.prototype,"formatter",void 0),function(e){e[e["SERIES_BACKGROUND_ZINDEX"]=-10]="SERIES_BACKGROUND_ZINDEX",e[e["AXIS_GRID_ZINDEX"]=0]="AXIS_GRID_ZINDEX",e[e["AXIS_ZINDEX"]=20]="AXIS_ZINDEX",e[e["SERIES_CROSSLINE_RANGE_ZINDEX"]=30]="SERIES_CROSSLINE_RANGE_ZINDEX",e[e["SERIES_LAYER_ZINDEX"]=500]="SERIES_LAYER_ZINDEX",e[e["AXIS_FOREGROUND_ZINDEX"]=750]="AXIS_FOREGROUND_ZINDEX",e[e["SERIES_CROSSHAIR_ZINDEX"]=1e3]="SERIES_CROSSHAIR_ZINDEX",e[e["SERIES_LABEL_ZINDEX"]=1500]="SERIES_LABEL_ZINDEX",e[e["SERIES_CROSSLINE_LINE_ZINDEX"]=2500]="SERIES_CROSSLINE_LINE_ZINDEX",e[e["LEGEND_ZINDEX"]=3e3]="LEGEND_ZINDEX"}(WI||(WI={}));class UI extends aI{constructor(){super(...arguments),this.x=0,this.y=0,this.size=12}computeBBox(){const{x:e,y:t,size:i}=this,n=i/2;return new gN(e-n,t-n,i,i)}applyPath(e,t){const{path:i}=this;let{x:n,y:o}=this;i.clear();for(const{x:r,y:s,t:a}of t)n+=r*e,o+=s*e,"move"===a?i.moveTo(n,o):i.lineTo(n,o);i.closePath()}}iM([sI(),nM("design:type",Number)],UI.prototype,"x",void 0),iM([sI(),nM("design:type",Number)],UI.prototype,"y",void 0),iM([sI({convertor:Math.abs}),nM("design:type",Number)],UI.prototype,"size",void 0);class zI extends UI{updatePath(){const{x:e,y:t,path:i,size:n}=this,o=n/2;i.clear(),i.arc(e,t,o,0,2*Math.PI),i.closePath()}}zI.className="Circle";const KI={BLUE:"#5090dc",ORANGE:"#ffa03a",GREEN:"#459d55",CYAN:"#34bfe1",YELLOW:"#e1cc00",VIOLET:"#9669cb",GRAY:"#b5b5b5",MAGENTA:"#bd5aa7",BROWN:"#8a6224",RED:"#ef5452"},YI={BLUE:"#2b5c95",ORANGE:"#cc6f10",GREEN:"#1e652e",CYAN:"#18859e",YELLOW:"#a69400",VIOLET:"#603c88",GRAY:"#575757",MAGENTA:"#7d2f6d",BROWN:"#4f3508",RED:"#a82529"};class qI{constructor(e){this.modules={},this.parent=e}destroy(){for(const[e,t]of Object.entries(this.modules))t.instance.destroy(),delete this.modules[e],delete this.parent[e]}addModule(e){if(null!=this.modules[e.optionsKey])throw new Error("AG Charts - module already initialised: "+e.optionsKey);if(e.optionsKey in this.parent)throw new Error(`AG Charts - class already has option key '${e.optionsKey}'`);null==this.moduleContext&&(this.moduleContext=this.parent.createModuleContext());const t=new e.instanceConstructor(Object.assign({},this.moduleContext));this.modules[e.optionsKey]={instance:t},this.parent[e.optionsKey]=t}removeModule(e){var t,i;null===(i=null===(t=this.modules[e.optionsKey])||void 0===t?void 0:t.instance)||void 0===i||i.destroy(),delete this.modules[e.optionsKey],delete this.parent[e.optionsKey]}isModuleEnabled(e){return null!=this.modules[e.optionsKey]}*[Symbol.iterator](){for(const{instance:e}of Object.values(this.modules))yield e}}class XI{constructor(){this.registeredListeners=new Map}
18addListener(e,t,i){const n={symbol:Symbol(e),handler:t,meta:i};return this.registeredListeners.has(e)?this.registeredListeners.get(e).push(n):this.registeredListeners.set(e,[n]),()=>this.removeListener(n.symbol)}removeListener(e){for(const[t,i]of this.registeredListeners.entries()){const n=i.findIndex((t=>t.symbol===e));if(n>=0){i.splice(n,1),0===i.length&&this.registeredListeners.delete(t);break}}}dispatch(e,...t){class i{constructor(){this.results=void 0}push(e){var t;void 0!==e&&(null!==(t=this.results)&&void 0!==t||(this.results=[]),this.results.push(e))}}const n=new i;for(const r of this.getListenersByType(e))try{n.push(r.handler(...t))}catch(o){gM.errorOnce(o)}return n.results}dispatchWrapHandlers(e,t,...i){for(const o of this.getListenersByType(e))try{t(o.handler,o.meta,...i)}catch(n){gM.errorOnce(n)}}getListenersByType(e){var t;return null!==(t=this.registeredListeners.get(e))&&void 0!==t?t:[]}}class $I{constructor(){this.eventListeners=new Map}addEventListener(e,t){if("function"!==typeof t)throw new Error("AG Charts - listener must be a Function");const i=this.eventListeners.get(e);i?i.add(t):this.eventListeners.set(e,new Set([t]))}removeEventListener(e,t){var i;null===(i=this.eventListeners.get(e))||void 0===i||i.delete(t),0===this.eventListeners.size&&this.eventListeners.delete(e)}hasEventListener(e){return this.eventListeners.has(e)}clearEventListeners(){this.eventListeners.clear()}fireEvent(e){var t;null===(t=this.eventListeners.get(e.type))||void 0===t||t.forEach((t=>t(e)))}}function ZI(e,t=[1/0,-1/0]){for(const i of e)"number"===typeof i&&(i<t[0]&&(t[0]=i),i>t[1]&&(t[1]=i));return t}function JI(e,t=[0,0]){for(const i of e)"number"===typeof i&&(i<0&&(t[0]+=i),i>0&&(t[1]+=i));return t}function QI(e,t,i){return{id:t,scopes:[e.id],type:"aggregate",matchGroupIds:i?[i]:void 0,aggregateFunction:e=>JI(e),groupAggregateFunction:(e,t=[0,0])=>{var i,n;return t[0]+=null!==(i=null===e||void 0===e?void 0:e[0])&&void 0!==i?i:0,t[1]+=null!==(n=null===e||void 0===e?void 0:e[1])&&void 0!==n?n:0,t}}}function eF(e,t){return{id:t,scopes:[e.id],type:"aggregate",aggregateFunction:()=>[0,1],groupAggregateFunction:(e,t=[0,0])=>{var i,n;return t[0]+=null!==(i=null===e||void 0===e?void 0:e[0])&&void 0!==i?i:0,t[1]+=null!==(n=null===e||void 0===e?void 0:e[1])&&void 0!==n?n:0,t}}}function tF(e,t,i){const n={id:t,scopes:[e.id],matchGroupIds:i?[i]:void 0,type:"aggregate",aggregateFunction:e=>JI(e),groupAggregateFunction:(e,t=[0,0,-1])=>{var i,n;return t[0]+=null!==(i=null===e||void 0===e?void 0:e[0])&&void 0!==i?i:0,t[1]+=null!==(n=null===e||void 0===e?void 0:e[1])&&void 0!==n?n:0,t[2]++,t},finalFunction:(e=[0,0,0])=>{const t=e[0]+e[1];return t>=0?[0,t/e[2]]:[t/e[2],0]}};return n}function iF(e,t,i,n){const o={id:t,scopes:[e.id],matchGroupIds:n?[n]:void 0,type:"aggregate",aggregateFunction:(e,t=[])=>{const n=t[1]-t[0];return i.aggregateFunction(e).map((e=>e/n))}};return i.groupAggregateFunction&&(o.groupAggregateFunction=i.groupAggregateFunction),o}function nF(e){return()=>{let t=0;return i=>"number"!==typeof i||isNaN(i)?i:(t+=e?Math.max(0,i):i,t)}}var oF,rF;function sF(e){return null!=wI(e,!0)}function aF(e){return null!=wI(e,!1)}function lF(e,t,i,n={}){const o=Object.assign({scopes:[e.id],property:t,type:"key",valueType:i?"range":"category",validation:i?sF:aF},n);return o}function cF(e,t,i,n={}){const o=Object.assign({scopes:[e.id],property:t,type:"value",valueType:i?"range":"category",validation:i?sF:aF},n);return o}function uF(e,t,i={}){const{min:n=-1/0,max:o=1/0}=i,r=tM(i,["min","max"]);return Object.assign({scopes:[e.id],type:"value",property:t,valueType:"range",validation:sF,processor:()=>e=>"number"!==typeof e||isNaN(e)?e:Math.min(Math.max(e,n),o)},r)}function dF(e,t,i,n={}){const{onlyPositive:o}=n,r=tM(n,["onlyPositive"]),s=Object.assign(Object.assign({},cF(e,t,i,r)),{processor:nF(o)});return s}function pF(e,t,i,n,o="current",r){return[cF(e,t,i,r),NI(e,r.groupId,n,o,r.separateNegative)]}(function(e){e[e["EXACT_SHAPE_MATCH"]=0]="EXACT_SHAPE_MATCH",e[e["NEAREST_BY_MAIN_AXIS_FIRST"]=1]="NEAREST_BY_MAIN_AXIS_FIRST",e[e["NEAREST_BY_MAIN_CATEGORY_AXIS_FIRST"]=2]="NEAREST_BY_MAIN_CATEGORY_AXIS_FIRST",e[e["NEAREST_NODE"]=3]="NEAREST_NODE"})(oF||(oF={}));class hF{constructor(e,t,{datum:i},n){this.type=e,this.event=t,this.datum=i,this.seriesId=n.id}}class fF{constructor(){this.fill="yellow",this.fillOpacity=void 0,this.stroke=void 0,this.strokeWidth=void 0,this.strokeOpacity=void 0,this.lineDash=void 0,this.lineDashOffset=void 0}}iM([JM(Sk),nM("design:type",String)],fF.prototype,"fill",void 0),iM([JM(Dk(0,1)),nM("design:type",Number)],fF.prototype,"fillOpacity",void 0),iM([JM(Sk),nM("design:type",String)],fF.prototype,"stroke",void 0),iM([JM(Dk(0)),nM("design:type",Number)],fF.prototype,"strokeWidth",void 0),iM([JM(Dk(0,1)),nM("design:type",Number)],fF.prototype,"strokeOpacity",void 0),iM([JM(Bk),nM("design:type",Array)],fF.prototype,"lineDash",void 0),iM([JM(Dk(0)),nM("design:type",Number)],fF.prototype,"lineDashOffset",void 0);class gF{constructor(){this.strokeWidth=void 0,this.dimOpacity=void 0,this.enabled=void 0}}iM([JM(Dk(0)),nM("design:type",Number)],gF.prototype,"strokeWidth",void 0),iM([JM(Dk(0,1)),nM("design:type",Number)],gF.prototype,"dimOpacity",void 0),iM([JM(pk),nM("design:type",Boolean)],gF.prototype,"enabled",void 0);class vF{constructor(){this.color="black"}}iM([JM(Sk),nM("design:type",String)],vF.prototype,"color",void 0);class yF{constructor(){this.item=new fF,this.series=new gF,this.text=new vF}}(function(e){e[e["None"]=0]="None",e[e["This"]=1]="This",e[e["Other"]=2]="Other"})(rF||(rF={}));class mF extends $I{get type(){var e;return null!==(e=this.constructor.type)&&void 0!==e?e:""}set data(e){this._data=e,this.onDataChange()}get data(){var e;return null!==(e=this._data)&&void 0!==e?e:this._chartData}onDataChange(){this.nodeDataRefresh=!0}setChartData(e){this._chartData=e,this.data===e&&this.onDataChange()}hasData(){const{data:e}=this;return e&&(!Array.isArray(e)||e.length>0)}set visible(e){this._visible=e,this.visibleChanged()}get visible(){return this._visible}onSeriesGroupingChange(e,t){const{id:i,type:n,visible:o,rootGroup:r,highlightGroup:s,annotationGroup:a}=this;e&&this.ctx.seriesStateManager.deregisterSeries({id:i,type:n}),t&&this.ctx.seriesStateManager.registerSeries({id:i,type:n,visible:o,seriesGrouping:t}),null!=this.rootGroup.parent&&this.ctx.seriesLayerManager.changeGroup({id:i,type:n,rootGroup:r,highlightGroup:s,annotationGroup:a,getGroupZIndexSubOrder:e=>this.getGroupZIndexSubOrder(e),seriesGrouping:t,oldGrouping:e})}getBandScalePadding(){return{inner:1,outer:0}}constructor(e){super(),this.NodeClickEvent=hF,this.id=pN(this),this.rootGroup=new zL({name:"seriesRoot",isVirtual:!0}),this.axes={[iN.X]:void 0,[iN.Y]:void 0},this.directions=[iN.X,iN.Y],this.nodeDataRefresh=!0,this._visible=!0,this.showInLegend=!0,this.cursor="default",this.nodeClickRange="exact",this.seriesGrouping=void 0,this._declarationOrder=-1,this.seriesListeners=new XI,this.highlightStyle=new yF,this.moduleMap=new qI(this),this.nodeDataDependencies={},this.ctx=e.moduleCtx;const{useLabelLayer:t=!1,pickModes:i=[oF.NEAREST_BY_MAIN_AXIS_FIRST],directionKeys:n={},directionNames:o={},contentGroupVirtual:r=!0,canHaveAxes:s=!1}=e;this.directionKeys=n,this.directionNames=o,this.canHaveAxes=s,this.contentGroup=this.rootGroup.appendChild(new zL({name:`${this.id}-content`,layer:!r,isVirtual:r,zIndex:WI.SERIES_LAYER_ZINDEX,zIndexSubOrder:this.getGroupZIndexSubOrder("data")})),this.highlightGroup=new zL({name:`${this.id}-highlight`,layer:!r,isVirtual:r,zIndex:WI.SERIES_LAYER_ZINDEX,zIndexSubOrder:this.getGroupZIndexSubOrder("highlight")}),this.highlightNode=this.highlightGroup.appendChild(new zL({name:"highlightNode",zIndex:0})),this.highlightLabel=this.highlightGroup.appendChild(new zL({name:"highlightLabel",zIndex:10})),this.pickModes=i,this.labelGroup=this.rootGroup.appendChild(new zL({name:`${this.id}-series-labels`,layer:t,zIndex:WI.SERIES_LABEL_ZINDEX}
18)),this.annotationGroup=new zL({name:`${this.id}-annotation`,layer:!r,isVirtual:r,zIndex:WI.SERIES_LAYER_ZINDEX,zIndexSubOrder:this.getGroupZIndexSubOrder("annotation")})}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;break}const n=()=>this._declarationOrder+i;return[n,t]}addListener(e,t){return this.seriesListeners.addListener(e,t)}dispatch(e,t){return this.seriesListeners.dispatch(e,t)}addChartEventListeners(){}destroy(){this.ctx.seriesStateManager.deregisterSeries(this),this.ctx.seriesLayerManager.releaseGroup(this)}getDirectionValues(e,t){const i=this.resolveKeyDirection(e),n=null===t||void 0===t?void 0:t[i],o=[];if(!n)return o;const r=(...e)=>{for(const t of e)Array.isArray(t)?r(...t):"object"===typeof t?r(...Object.values(t)):o.push(t)};return r(...n.map((e=>this[e]))),o}getKeys(e){return this.getDirectionValues(e,this.directionKeys)}getNames(e){return this.getDirectionValues(e,this.directionNames)}resolveKeyDirection(e){return e}getDomain(e){var t;const i=this.getSeriesDomain(e),n=null!==(t=this.dispatch("data-getDomain",{direction:e}))&&void 0!==t?t:[];return n.reduce(((e,t)=>e.concat(t)),i)}markNodeDataDirty(){this.nodeDataRefresh=!0}visibleChanged(){this.ctx.seriesStateManager.registerSeries(this)}getOpacity(){const e=1,{dimOpacity:t=1,enabled:i=!0}=this.highlightStyle.series;if(!i||t===e)return e;switch(this.isItemIdHighlighted()){case rF.None:case rF.This:return e;case rF.Other:default:return t}}getStrokeWidth(e){const{strokeWidth:t,enabled:i=!0}=this.highlightStyle.series;if(!i||void 0===t)return e;switch(this.isItemIdHighlighted()){case rF.This:return t;case rF.None:case rF.Other:return e}}isItemIdHighlighted(){var e,t;const{series:i}=null!==(t=null===(e=this.ctx.highlightManager)||void 0===e?void 0:e.getActiveHighlight())&&void 0!==t?t:{};return null==i?rF.None:i!==this?rF.Other:rF.This}getModuleTooltipParams(e){var t;const i=null!==(t=this.dispatch("tooltip-getParams",{datum:e}))&&void 0!==t?t:[];return i.reduce(((e,t)=>Object.assign(Object.assign({},t),e)),{})}pickNode(e,t){const{pickModes:i,visible:n,rootGroup:o}=this;if(n&&o.visible)for(const r of i){if(t&&!t.includes(r))continue;let i;switch(r){case oF.EXACT_SHAPE_MATCH:i=this.pickNodeExactShape(e);break;case oF.NEAREST_BY_MAIN_AXIS_FIRST:case oF.NEAREST_BY_MAIN_CATEGORY_AXIS_FIRST:i=this.pickNodeMainAxisFirst(e,r===oF.NEAREST_BY_MAIN_CATEGORY_AXIS_FIRST);break;case oF.NEAREST_NODE:i=this.pickNodeClosestDatum(e);break}if(i)return{pickMode:r,match:i.datum,distance:i.distance}}}pickNodeExactShape(e){const t=this.contentGroup.pickNode(e.x,e.y);return t&&{datum:t.datum,distance:0}}pickNodeClosestDatum(e){throw new Error("AG Charts - Series.pickNodeClosestDatum() not implemented")}pickNodeMainAxisFirst(e,t){throw new Error("AG Charts - Series.pickNodeMainAxisFirst() not implemented")}fireNodeClickEvent(e,t){this.fireEvent(new this.NodeClickEvent("nodeClick",e,t,this))}fireNodeDoubleClickEvent(e,t){this.fireEvent(new this.NodeClickEvent("nodeDoubleClick",e,t,this))}toggleSeriesItem(e,t){this.visible=t,this.nodeDataRefresh=!0,this.dispatch("visibility-changed",{itemId:e,enabled:t})}isEnabled(){return this.visible}getModuleMap(){return this.moduleMap}createModuleContext(){return Object.assign(Object.assign({},this.ctx),{series:this})}getLabelText(e,t,i=String){var n;return e.formatter&&null!==(n=this.ctx.callbackCache.call(e.formatter,Object.assign({seriesId:this.id},t)))&&void 0!==n?n:i(t.value)}getMarkerStyle(e,t,i=e.getStyle()){var n,o;const r={size:null!==(o=null===(n=t.datum.point)||void 0===n?void 0:n.size)&&void 0!==o?o:0},s=hI(r,i);if(e.formatter){const i=this.ctx.callbackCache.call(e.formatter,Object.assign(Object.assign(Object.assign({seriesId:this.id},s),t),{datum:t.datum.datum}));return hI(i,s)}return s}updateMarkerStyle(e,t,i,n=t.getStyle(),{applyTranslation:o=!0}={}){const{point:r}=i.datum,s=this.getMarkerStyle(t,i,n),a=this.visible&&s.size>0&&r&&!isNaN(r.x)&&!isNaN(r.y);o?e.setProperties(Object.assign(Object.assign({visible:a},s),{translationX:null===r||void 0===r?void 0:r.x,translationY:null===r||void 0===r?void 0:r.y})):e.setProperties(Object.assign({visible:a},s)),"function"!==typeof t.shape||e.dirtyPath||(e.path.clear({trackChanges:!0}),e.updatePath(),e.checkPathDirty())}getMinRect(){}checkResize(e){const t={seriesRectWidth:null===e||void 0===e?void 0:e.width,seriesRectHeight:null===e||void 0===e?void 0:e.he
18ight},i=null!=RM(this.nodeDataDependencies,t);return i&&(this.nodeDataDependencies=t,this.markNodeDataDirty()),i}}function CF({id:e},t,i,n){dL(e,t,i,n,{opacity:0},{opacity:1},oL)}function bF({id:e},t,i,n){dL(e,t,i,n,{opacity:1},{opacity:0},oL)}function wF(e){return{opacity:1}}mF.highlightedZIndex=1e12,iM([JM(hk),nM("design:type",Object)],mF.prototype,"id",void 0),iM([JM(dk),nM("design:type",Object)],mF.prototype,"_visible",void 0),iM([JM(dk),nM("design:type",Object)],mF.prototype,"showInLegend",void 0),iM([JM(hk),nM("design:type",Object)],mF.prototype,"cursor",void 0),iM([JM(qk),nM("design:type",Object)],mF.prototype,"nodeClickRange",void 0),iM([VN({changeValue:function(e,t){this.onSeriesGroupingChange(t,e)}}),nM("design:type",Object)],mF.prototype,"seriesGrouping",void 0);const SF={periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]};function EF(e,t=new Date(e.getFullYear(),0,1)){const i=e.getTimezoneOffset()-t.getTimezoneOffset(),n=e.getTime()-t.getTime()+6e4*i,o=864e5;return Math.floor(n/o)}function xF(e,t){const i=new Date(e.getFullYear(),0,1),n=i.getDay(),o=(t-n+7)%7,r=new Date(e.getFullYear(),0,o+1);return r<=e?Math.floor(EF(e,r)/7)+1:0}const OF=0,TF=1,DF=4;function RF(e,t=e.getFullYear()){const i=new Date(t,0,1),n=i.getDay(),o=(DF-n+7)%7,r=new Date(t,0,o-(DF-TF)+1);return r<=e?Math.floor(EF(e,r)/7)+1:RF(e,t-1)}function AF(e){const t=e.getTimezoneOffset(),i=Math.abs(t),n=t>0?"-":"+";return`${n}${MF(Math.floor(i/60),2,"0")}${MF(Math.floor(i%60),2,"0")}`}const _F={a:e=>SF.shortDays[e.getDay()],A:e=>SF.days[e.getDay()],b:e=>SF.shortMonths[e.getMonth()],B:e=>SF.months[e.getMonth()],c:"%x, %X",d:(e,t)=>MF(e.getDate(),2,null!==t&&void 0!==t?t:"0"),e:"%_d",f:(e,t)=>MF(1e3*e.getMilliseconds(),6,null!==t&&void 0!==t?t:"0"),H:(e,t)=>MF(e.getHours(),2,null!==t&&void 0!==t?t:"0"),I:(e,t)=>{const i=e.getHours()%12;return 0===i?"12":MF(i,2,null!==t&&void 0!==t?t:"0")},j:(e,t)=>MF(EF(e)+1,3,null!==t&&void 0!==t?t:"0"),m:(e,t)=>
18MF(e.getMonth()+1,2,null!==t&&void 0!==t?t:"0"),M:(e,t)=>MF(e.getMinutes(),2,null!==t&&void 0!==t?t:"0"),L:(e,t)=>MF(e.getMilliseconds(),3,null!==t&&void 0!==t?t:"0"),p:e=>e.getHours()<12?"AM":"PM",Q:e=>String(e.getTime()),s:e=>String(Math.floor(e.getTime()/1e3)),S:(e,t)=>MF(e.getSeconds(),2,null!==t&&void 0!==t?t:"0"),u:e=>{let t=e.getDay();return t<1&&(t+=7),String(t%7)},U:(e,t)=>MF(xF(e,OF),2,null!==t&&void 0!==t?t:"0"),V:(e,t)=>MF(RF(e),2,null!==t&&void 0!==t?t:"0"),w:(e,t)=>MF(e.getDay(),2,null!==t&&void 0!==t?t:"0"),W:(e,t)=>MF(xF(e,TF),2,null!==t&&void 0!==t?t:"0"),x:"%-m/%-d/%Y",X:"%-I:%M:%S %p",y:(e,t)=>MF(e.getFullYear()%100,2,null!==t&&void 0!==t?t:"0"),Y:(e,t)=>MF(e.getFullYear(),4,null!==t&&void 0!==t?t:"0"),Z:e=>AF(e),"%":()=>"%"},PF={_:" ",0:"0","-":""};function MF(e,t,i){const n=String(Math.floor(e));return n.length>=t?n:`${i.repeat(t-n.length)}${n}`}function kF(e){const t=[];while(e.length>0){let i=e.indexOf("%");if(0!==i){const n=i>0?e.substring(0,i):e;t.push(n)}if(i<0)break;const n=e[i+1],o=PF[n];null!=o&&i++;const r=e[i+1],s=_F[r];if("function"===typeof s)t.push([s,o]);else if("string"===typeof s){const e=kF(s);t.push([e,o])}else t.push(`${null!==o&&void 0!==o?o:""}${r}`);e=e.substring(i+2)}return e=>{const i="number"===typeof e?new Date(e):e;return t.map((e=>"string"===typeof e?e:e[0](i,e[1]))).join("")}}const NF=/(#\{(.*?)\})/g;function LF(e,t,i){return e.replace(NF,(function(...e){const n=e[2],[o,r]=n.split(":"),s=t[o];if("number"===typeof s){const e=r&&i&&i[r];if(e){const{locales:t,options:i}=e;return s.toLocaleString(t,i)}return String(s)}if(s instanceof Date){const e=r&&i&&i[r];if("string"===typeof e){const t=kF(e);return t(s)}return s.toDateString()}return"string"===typeof s||(null===s||void 0===s?void 0:s.toString)?String(s):""}))}function IF(e,t){const i=e.createElement("style");i.innerHTML=t,e.head.insertBefore(i,e.head.querySelector("style"))}const FF="ag-chart-tooltip",GF="ag-chart-dark-tooltip",VF=`\n.${FF} {\n    transition: transform 0.1s ease;\n    display: table;\n    position: fixed;\n    left: 0px;\n    top: 0px;\n    white-space: nowrap;\n    z-index: 99999;\n    font: 12px Verdana, sans-serif;\n    color: rgb(70, 70, 70);\n    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);\n}\n\n.${FF}-no-interaction {\n    pointer-events: none;\n    user-select: none;\n}\n\n.${FF}-no-animation {\n    transition: none !important;\n}\n\n.${FF}-hidden {\n    visibility: hidden;\n}\n\n.${FF}-title {\n    position: relative;\n    padding: 8px 14px;\n    border-top-left-radius: 2px;\n    border-top-right-radius: 2px;\n    color: white;\n    background-color: #888888;\n    z-index: 1;\n}\n\n.${FF}-title:only-child {\n    border-bottom-left-radius: 2px;\n    border-bottom-right-radius: 2px;\n}\n\n.${FF}-content {\n    padding: 6px 14px;\n    line-height: 1.7em;\n    background: white;\n    border-bottom-left-radius: 2px;\n    border-bottom-right-radius: 2px;\n    border: 1px solid rgba(0, 0, 0, 0.15);\n    overflow: hidden;\n}\n\n.${FF}-arrow::before {\n    content: "";\n\n    position: absolute;\n    top: 100%;\n    left: 50%;\n    transform: translateX(-50%);\n\n    border: 5px solid #d9d9d9;\n\n    border-left-color: transparent;\n    border-right-color: transparent;\n    border-bottom-color: transparent;\n\n    width: 0;\n    height: 0;\n\n    margin: 0 auto;\n}\n\n.${FF}-arrow::after {\n    content: "";\n\n    position: absolute;\n    top: calc(100% - 1px);\n    left: 50%;\n    transform: translateX(-50%);\n\n    border: 5px solid white;\n\n    border-left-color: transparent;\n    border-right-color: transparent;\n    border-bottom-color: transparent;\n\n    width: 0;\n    height: 0;\n\n    margin: 0 auto;\n}\n\n.${FF}.${GF} {\n    color: white;\n    background: #15181c;\n}\n\n.${FF}.${GF} .${FF}-content {\n    border-color: rgba(255, 255, 255, 0.15);\n}\n\n.ag-chart-wrapper {\n    box-sizing: border-box;\n    overflow: hidden;\n}\n`;function BF(e,t){var i,n,o;if("string"===typeof e)return e;const{content:r=(null!==(i=null===t||void 0===t?void 0:t.content)&&void 0!==i?i:""),title:s=(null===t||void 0===t?void 0:t.t
18itle),color:a=(null!==(n=null===t||void 0===t?void 0:t.color)&&void 0!==n?n:"white"),backgroundColor:l=(null!==(o=null===t||void 0===t?void 0:t.backgroundColor)&&void 0!==o?o:"#888")}=e,c=s?`<div class="${FF}-title"\n        style="color: ${a}; background-color: ${l}">${s}</div>`:"",u=r?`<div class="${FF}-content">${r}</div>`:"";return`${c}${u}`}const jF=["pointer","node"],HF=ek((e=>jF.includes(e)),"expecting a position type keyword such as 'pointer' or 'node'");class WF{constructor(){this.type="pointer",this.xOffset=0,this.yOffset=0}}iM([JM(HF),nM("design:type",String)],WF.prototype,"type",void 0),iM([JM(Tk()),nM("design:type",Number)],WF.prototype,"xOffset",void 0),iM([JM(Tk()),nM("design:type",Number)],WF.prototype,"yOffset",void 0);class UF{constructor(e,t,i,n){this.enableInteraction=!1,this.enabled=!0,this.showArrow=void 0,this.class=void 0,this.lastClass=void 0,this.delay=0,this.range="nearest",this.lastVisibilityChange=Date.now(),this.position=new WF,this.showTimeout=0,this._showArrow=!0,this.tooltipRoot=n,this.window=i;const o=t.createElement("div");if(this.element=this.tooltipRoot.appendChild(o),this.element.classList.add(FF),this.canvasElement=e,"undefined"!==typeof IntersectionObserver){const e=new IntersectionObserver((e=>{for(const t of e)t.target===this.canvasElement&&0===t.intersectionRatio&&this.toggle(!1)}),{root:this.tooltipRoot});e.observe(this.canvasElement),this.observer=e}UF.tooltipDocuments.indexOf(t)<0&&(IF(t,VF),UF.tooltipDocuments.push(t))}destroy(){const{parentNode:e}=this.element;e&&e.removeChild(this.element),this.observer&&this.observer.unobserve(this.canvasElement)}isVisible(){const{element:e}=this;return!e.classList.contains(FF+"-hidden")}updateClass(e,t){const{element:i,class:n,lastClass:o,enableInteraction:r,lastVisibilityChange:s}=this,a=this.isVisible(),l=!!e;let c=1/0;if(a!==l){const e=Date.now();c=e-s,this.lastVisibilityChange=e}const u=(e,t)=>{const n=`${FF}-${e}`;t?i.classList.add(n):i.classList.remove(n)},d=100,p=5,h=!a&&l&&c>d;c>p&&u("no-animation",h),u("no-interaction",!r),u("hidden",!e),u("arrow",!!t),n!==o&&(o&&i.classList.remove(o),n&&i.classList.add(n),this.lastClass=n)}show(e,t,i=!1){var n,o,r,s,a,l,c;const{element:u,canvasElement:d}=this;if(void 0!==t)u.innerHTML=t;else if(!u.innerHTML)return void this.toggle(!1);const p=(e,t,i)=>Math.max(Math.min(t,i),e),h=null!==(o=null===(n=e.position)||void 0===n?void 0:n.xOffset)&&void 0!==o?o:0,f=null!==(s=null===(r=e.position)||void 0===r?void 0:r.yOffset)&&void 0!==s?s:0,g=d.getBoundingClientRect(),v=g.left+e.offsetX-u.clientWidth/2+h,y=g.top+e.offsetY-u.clientHeight-8+f,m=this.getWindowBoundingBox(),C=m.x+m.width-u.clientWidth-1,b=m.y+m.height-u.clientHeight,w=p(m.x,v,C),S=p(m.y,y,b),E=w!==v||S!==y,x=!E&&!h&&!f,O=null!==(l=null!==(a=e.showArrow)&&void 0!==a?a:this.showArrow)&&void 0!==l?l:x;if(this.updateShowArrow(O),u.style.transform=`translate(${Math.round(w)}px, ${Math.round(S)}px)`,this.enableInteraction=null!==(c=e.enableInteraction)&&void 0!==c&&c,this.delay>0&&!i)return this.toggle(!1),void(this.showTimeout=this.window.setTimeout((()=>{this.toggle(!0)}),this.delay));this.toggle(!0)}getWindowBoundingBox(){return new gN(0,0,this.window.innerWidth,this.window.innerHeight)}toggle(e){e||this.window.clearTimeout(this.showTimeout),this.updateClass(e,this._showArrow)}pointerLeftOntoTooltip(e){var t;if(!this.enableInteraction)return!1;const i=null===(t=e.sourceEvent.relatedTarget)||void 0===t?void 0:t.classList,n=["","-title","-content"],o=Boolean(n.filter((e=>null===i||void 0===i?void 0:i.contains(`${FF}${e}`))));return void 0!==i&&o}updateShowArrow(e){this._showArrow=e}}UF.tooltipDocuments=[],iM([JM(dk),nM("design:type",Boolean)],UF.prototype,"enabled",void 0),iM([JM(pk),nM("design:type",Boolean)],UF.prototype,"showArrow",void 0),iM([JM(fk),nM("design:type",String)],UF.prototype,"class",void 0),iM([JM(Tk(0)),nM("design:type",Number)],UF.prototype,"delay",void 0),iM([JM(qk),nM("design:type",Object)],UF.prototype,"range",void 0);class zF{constructor(){this.enabled=!1}}iM([JM(dk),nM("design:type",Object)],zF.prototype,"enabled",void 0);class KF{constructor(){this.enabled=!0,this.showArrow=void 0,this.format=void 0,this.renderer=void 0,this.interaction=new zF,this.position=new WF}toTooltipHtml(e,t,i){var n,o;const r=null!==(n=null===i||void 0===i?void 0:i.format)&&void 0!==n?n:this.format,s=null!==(o=null===i||void 0===i?void 0:i.renderer)&&void 0!==o?o:this.renderer;return r?BF({content:LF(r,t)},e):s?BF(s(t),e):BF(e)}}function YF(e,t,i,n){const o=[i.convert(0),i.convert(1)],r=[n.convert(0),n.convert(1)],s=Math.PI/-2+BM(t),a=({radiu
18s:e})=>({innerRadius:o[0],outerRadius:o[0]+(o[1]-o[0])*e}),l=({radius:e})=>({innerRadius:r[0],outerRadius:r[0]+(r[1]-r[0])*e}),c=(t,i,n,{prevFromProps:o})=>{var r,a,c,u,d,p;let{startAngle:h,endAngle:f,innerRadius:g,outerRadius:v}=t,{fill:y,stroke:m}=i.sectorFormat;if("unknown"===n||"added"===n&&!o?(h=s,f=s,g=i.innerRadius,v=i.outerRadius):"added"===n&&o&&(h=null!==(r=o.endAngle)&&void 0!==r?r:s,f=null!==(a=o.endAngle)&&void 0!==a?a:s,g=null!==(c=o.innerRadius)&&void 0!==c?c:i.innerRadius,v=null!==(u=o.outerRadius)&&void 0!==u?u:i.outerRadius),"added"===n&&!e){const e=l(i);g=e.innerRadius,v=e.outerRadius}return"updated"===n&&(y=null!==(d=t.fill)&&void 0!==d?d:y,m=null!==(p=t.stroke)&&void 0!==p?p:m),{startAngle:h,endAngle:f,innerRadius:g,outerRadius:v,fill:y,stroke:m}},u=(e,t,i,{prevLive:n})=>{var o,r;let{startAngle:l,endAngle:c,innerRadius:u,outerRadius:d}=t;const{stroke:p,fill:h}=t.sectorFormat;if("removed"===i&&n?(l=null===(o=n.datum)||void 0===o?void 0:o.endAngle,c=null===(r=n.datum)||void 0===r?void 0:r.endAngle):"removed"!==i||n||(l=s,c=s),"removed"===i){const e=a(t);u=e.innerRadius,d=e.outerRadius}return{startAngle:l,endAngle:c,outerRadius:d,innerRadius:u,stroke:p,fill:h}},d={fromFn:(e,t)=>{var i,n,o;return{size:null!==(o=null!==(n=null===(i=e.previousDatum)||void 0===i?void 0:i.radius)&&void 0!==n?n:e.size)&&void 0!==o?o:0}},toFn:(e,t)=>{var i;return{size:null!==(i=t.radius)&&void 0!==i?i:0}}};return{nodes:{toFn:u,fromFn:c},innerCircle:d}}function qF(e,t){return{startAngle:t.startAngle,endAngle:t.endAngle,innerRadius:t.innerRadius,outerRadius:t.outerRadius,fill:t.sectorFormat.fill,stroke:t.sectorFormat.stroke}}function XF(e,t){const i=sL(e),n=i?e:[],o=i?[]:e;for(const r of o){for(const e of r.nodes()){const i=t(e,e.datum);e.setProperties(i)}r.cleanup()}for(const r of n){const e=t(r,r.datum);r.setProperties(e)}}iM([JM(dk),nM("design:type",Object)],KF.prototype,"enabled",void 0),iM([JM(pk),nM("design:type",Boolean)],KF.prototype,"showArrow",void 0),iM([JM(fk),nM("design:type",String)],KF.prototype,"format",void 0),iM([JM(uk),nM("design:type",Function)],KF.prototype,"renderer",void 0);var $F,ZF=Object.freeze({__proto__:null,resetMotion:XF});class JF{constructor(e,t,i){this.states=t,this.preTransitionCb=i,this.debug=bM.create(!0,"animation"),this.state=e,this.debug(`%c${this.constructor.name} | init -> ${e}`,"color: green")}transition(e,t){var i,n;const o=this.states[this.state],r=null===o||void 0===o?void 0:o[e];if(!r)return void this.debug(`%c${this.constructor.name} | ${this.state} -> ${e} -> ${this.state}`,"color: grey");let s=this.state;return"string"===typeof r?s=r:"object"===typeof r&&(s=r.target),this.debug(`%c${this.constructor.name} | ${this.state} -> ${e} -> ${s}`,"color: green"),null===(i=this.preTransitionCb)||void 0===i||i.call(this,this.state,s),this.state=s,"function"===typeof r?r(t):"object"===typeof r&&(null===(n=r.action)||void 0===n||n.call(r,t)),this.state}}class QF extends mF{isContinuous(){var e,t;const i=jL.is(null===(e=this.axes[iN.X])||void 0===e?void 0:e.scale),n=jL.is(null===(t=this.axes[iN.Y])||void 0===t?void 0:t.scale);return{isContinuousX:i,isContinuousY:n}}requestDataModel(e,t,i){var n;return oM(this,void 0,void 0,(function*(){const o=i.props,r=null!==(n=this.dispatch("data-prerequest",this.isContinuous()))&&void 0!==n?n:[];for(const e of r)o.push(...e);const{dataModel:s,processedData:a}=yield e.request(this.id,null!==t&&void 0!==t?t:[],Object.assign(Object.assign({},i),{props:o}));return this.dataModel=s,this.processedData=a,this.dispatch("data-processed",{dataModel:s,processedData:a}),{dataModel:s,processedData:a}}))}isProcessedDataAnimatable(){var e,t;const i=null===(t=null===(e=this.processedData)||void 0===e?void 0:e.reduced)||void 0===t?void 0:t.animationValidation;if(!i)return!0;const{orderedKeys:n,uniqueKeys:o}=i;return!!n&&!!o}checkProcessedDataAnimatable(){this.isProcessedDataAnimatable()||this.ctx.animationManager.skipCurrentBatch()}}class eG extends QF{constructor(e){var{useLabelLayer:t=!1,pickModes:i=[oF.EXACT_SHAPE_MATCH],canHaveAxes:n=!1,animationResetFns:o}=e,r=tM(e,["useLabelLayer","pickModes","canHaveAxes","animationResetFns"]);super(Object.assign(Object.assign({},r),{useLabelLayer:t,pickModes:i,contentGroupVirtual:!1,directionKeys:{[iN.X]:["angleKey"],[iN.Y]:["radiusKey"]},directionNames:{[iN.X]:["angleName"],[iN.Y]:["radiusName"]},canHaveAxes:n})),this.sectorGroup=this.contentGroup.appendChild(new zL),this.itemSelection=KL.select(this.sectorGroup,(()=>this.nodeFactory()),!1),this.labelSelection=KL.select(this.labelGroup,_N,!1),this.highlightSelection=KL.select(this.highlightGroup,(()=>this.nodeFactory())),this.centerX=0,this.centerY=0,this.radius=0,this.sectorGroup.zIndexSubOrder=[()=>this._declarationOrder,1],this.animationResetFns=o,this.animationState=new JF("empty",{empty:{update:{target:"ready",action:e=>this.animateEmptyUpdateReady(e)}},ready:{updateData:"waiting",clear:"clearing",highlight:e=>this.animateReadyHighlight(e),highlightMarkers:e=>this.animateReadyHighlightMarkers(e),resize:e=>this.animateReadyResize(e)},waiting:{update:{target:"ready",action:e=>this.animateWaitingUpdateReady(e)}},clearing:{update:{target:"empty",action:e=>this.animateClearingUpdateEmpty(e)}}},(()=>this.checkProcessedDataAnimatable()))}getLabelData(){return[]}computeLabelsBBox(e,t){return null}resetAllAnimation(){var e;const{item:t,label:i}=null!==(e=this.animationResetFns)&&void 0!==e?e:{};this.ctx.animationManager.stopByAnimationGroupId(this.id),t&&XF([this.itemSelection,this.highlightSelection],t),i&&XF([this.labelSelection],i),this.itemSelection.cleanup(),this.labelSelection.cleanup(),this.highlightSelection.cleanup()}animateEmptyUpdateReady(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation()}animateWaitingUpdateReady(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation()}animateReadyHighlight(e){var t;const{item:i}=null!==(t=this.animationResetFns)&&void 0!==t?t:{};i&&XF([this.highlightSelection],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}}}class tG extends hF{constructor(e,t,i,n){super(e,t,i,n),this.angleKey=n.angleKey,this.radiusKey=n.radiusKey,this.calloutLabelKey=n.calloutLabelKey,this.sectorLabelKey=n.sectorLabelKey}}(function(e){e[e["Sector"]=0]="Sector",e[e["Callout"]=1]="Callout",e[e["Label"]=2]="Label"})($F||($F={}));class iG extends FI{constructor(){super(...arguments),this.offset=3,this.minAngle=0,this.minSpacing=4,this.maxCollisionOffset=50,this.avoidCollisions=!0}}iM([JM(Tk(0)),nM("design:type",Object)],iG.prototype,"offset",void 0),iM([JM(Tk(0)),nM("design:type",Object)],iG.prototype,"minAngle",void 0),iM([JM(Tk(0)),nM("design:type",Object)],iG.prototype,"minSpacing",void 0),iM([JM(Tk(0)),nM("design:type",Object)],iG.prototype,"maxCollisionOffset",void 0),iM([JM(dk),nM("design:type",Object)],iG.prototype,"avoidCollisions",void 0);
18class nG extends FI{constructor(){super(...arguments),this.positionOffset=0,this.positionRatio=.5}}iM([JM(Tk()),nM("design:type",Object)],nG.prototype,"positionOffset",void 0),iM([JM(Tk(0,1)),nM("design:type",Object)],nG.prototype,"positionRatio",void 0);class oG{constructor(){this.length=10,this.strokeWidth=1}}iM([JM(xk),nM("design:type",Array)],oG.prototype,"colors",void 0),iM([JM(Tk(0)),nM("design:type",Number)],oG.prototype,"length",void 0),iM([JM(Tk(0)),nM("design:type",Number)],oG.prototype,"strokeWidth",void 0);class rG extends BN{constructor(){super(...arguments),this.showInLegend=!1}}iM([JM(dk),nM("design:type",Object)],rG.prototype,"showInLegend",void 0);class sG extends FI{constructor(){super(...arguments),this.text="",this.margin=2}}iM([JM(hk),nM("design:type",Object)],sG.prototype,"text",void 0),iM([JM(Tk()),nM("design:type",Object)],sG.prototype,"margin",void 0);class aG{constructor(){this.fill="transparent",this.fillOpacity=1}}iM([JM(wk),nM("design:type",Object)],aG.prototype,"fill",void 0),iM([JM(Dk(0,1)),nM("design:type",Object)],aG.prototype,"fillOpacity",void 0);class lG extends eG{constructor(e){super({moduleCtx:e,useLabelLayer:!0,animationResetFns:{item:qF,label:wF}}),this.previousRadiusScale=new HL,this.radiusScale=new HL,this.backgroundGroup=this.rootGroup.appendChild(new zL({name:`${this.id}-background`,layer:!0,zIndex:WI.SERIES_BACKGROUND_ZINDEX})),this.innertCircleGroup=this.backgroundGroup.appendChild(new zL({name:`${this.id}-innerCircle`})),this.nodeData=[],this.seriesItemEnabled=[],this.title=void 0,this.calloutLabel=new iG,this.sectorLabel=new nG,this.calloutLine=new oG,this.tooltip=new KF,this.angleKey="",this.angleName="",this.innerLabels=[],this.innerCircle=void 0,this.radiusKey=void 0,this.radiusName=void 0,this.radiusMin=void 0,this.radiusMax=void 0,this.calloutLabelKey=void 0,this.calloutLabelName=void 0,this.sectorLabelKey=void 0,this.sectorLabelName=void 0,this.legendItemKey=void 0,this.fills=Object.values(KI),this.strokes=Object.values(YI),this.fillOpacity=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.formatter=void 0,this.rotation=0,this.outerRadiusOffset=0,this.outerRadiusRatio=1,this.innerRadiusOffset=0,this.innerRadiusRatio=1,this.strokeWidth=1,this.shadow=void 0,this.highlightStyle=new yF,this.surroundingRadius=void 0,this.NodeClickEvent=tG,this.angleScale=new HL,this.angleScale.domain=[0,1],this.angleScale.range=[-Math.PI,Math.PI].map((e=>e+Math.PI/2));const t=new zL({name:"pieCalloutLabels"}),i=new zL({name:"pieSectorLabels"}),n=new zL({name:"innerLabels"});this.labelGroup.append(t),this.labelGroup.append(i),this.labelGroup.append(n),this.calloutLabelSelection=KL.select(t,zL),this.sectorLabelSelection=KL.select(i,_N),this.innerLabelsSelection=KL.select(n,_N),this.innerCircleSelection=KL.select(this.innertCircleGroup,zI)}addChartEventListeners(){var e;null===(e=this.ctx.chartEventManager)||void 0===e||e.addListener("legend-item-click",(e=>this.onLegendItemClick(e)))}visibleChanged(){this.processSeriesItemEnabled()}processSeriesItemEnabled(){var e;const{data:t,visible:i}=this;this.seriesItemEnabled=null!==(e=null===t||void 0===t?void 0:t.map((()=>i)))&&void 0!==e?e:[]}nodeFactory(){return new lI}getSeriesDomain(e){return e===iN.X?this.angleScale.domain:this.radiusScale.domain}processData(e){var t,i;return oM(this,void 0,void 0,(function*(){let{data:n}=this;const{angleKey:o,radiusKey:r,calloutLabelKey:s,sectorLabelKey:a,legendItemKey:l,seriesItemEnabled:c}=this;if(null==o||null==n)return;const u=!this.ctx.animationManager.isSkipped(),d=[],p=[];l?d.push(lF(this,l,!1,{id:"legendItemKey"})):s?d.push(lF(this,s,!1,{id:"calloutLabelKey"})):a&&d.push(lF(this,a,!1,{id:"sectorLabelKey"})),r&&p.push(uF(this,r,{id:"radiusValue",min:null!==(t=this.radiusMin)&&void 0!==t?t:0,max:this.radiusMax}),cF(this,r,!0,{id:"radiusRaw"}),_I(this,{id:"radiusValue"},[0,1],1,null!==(i=this.radiusMin)&&void 0!==i?i:0,this.radiusMax)),s&&p.push(cF(this,s,!1,{id:"calloutLabelValue"})),a&&p.push(cF(this,a,!1,{id:"sectorLabelValue"})),l&&p.push(cF(this,l,!1,{id:"legendItemValue"})),u&&this.processedData&&d.length>0&&p.push(LI(this.processedData)),p.push(PI(this)),n=n.map(((e,t)=>c[t]?e:Object.assign(Object.assign({},e),{[o]:0}))),yield this.requestDataModel(e,n,{props:[...d,dF(this,o,!0,{id:"angleValue",onlyPositive:!0}),cF(this,o,!0,{id:"angleRaw"}),_I(this,{id:"angleValue"},[0,1],0,0),...p]}),this.animationState.transition("updateData")}))}maybeRefreshNodeData(){return oM(this,void 0,void 0,(function*(){if(!this.nodeDataRefresh)return;const[{nodeData:e=[]}={}]=yield this.createNodeData();this.nodeData=e,this.nodeDataRefresh=!1}))}getProcessedDataIndexes(e){const t=e.resolveProcessedDataIndexById(this,"angleValue").index,i=this.radiusKey?e.resolveProcessedDataIndexById(this,"radiu
18sValue").index:-1,n=this.calloutLabelKey?e.resolveProcessedDataIndexById(this,"calloutLabelValue").index:-1,o=this.sectorLabelKey?e.resolveProcessedDataIndexById(this,"sectorLabelValue").index:-1,r=this.legendItemKey?e.resolveProcessedDataIndexById(this,"legendItemValue").index:-1;return{angleIdx:t,radiusIdx:i,calloutLabelIdx:n,sectorLabelIdx:o,legendItemIdx:r}}createNodeData(){return oM(this,void 0,void 0,(function*(){const{id:e,processedData:t,dataModel:i,rotation:n,angleScale:o}=this;if(!t||!i||"ungrouped"!==t.type)return[];const{angleIdx:r,radiusIdx:s,calloutLabelIdx:a,sectorLabelIdx:l,legendItemIdx:c}=this.getProcessedDataIndexes(i);let u=0;const d=t.data.map(((e,t)=>{var i;const{datum:d,values:p}=e,h=p[r],f=o.convert(u)+BM(n);u=h;const g=o.convert(u)+BM(n),v=Math.abs(g-f),y=f+v/2,m=p[r+1],C=s>=0&&null!==(i=p[s])&&void 0!==i?i:1,b=s>=0?p[s+1]:void 0,w=c>=0?p[c]:void 0,S=this.getLabels(d,y,v,!0,p[a],p[l],w),E=this.getSectorFormat(d,t,!1);return Object.assign({itemId:t,series:this,datum:d,index:t,angleValue:m,midAngle:y,midCos:Math.cos(y),midSin:Math.sin(y),startAngle:f,endAngle:g,sectorFormat:E,radiusValue:b,radius:C,innerRadius:Math.max(this.radiusScale.convert(0),0),outerRadius:Math.max(this.radiusScale.convert(C),0),legendItemValue:w},S)}));return[{itemId:e,nodeData:d,labelData:d}]}))}getLabels(e,t,i,n,o,r,s){const{calloutLabel:a,sectorLabel:l,legendItemKey:c}=this,u=!n||a.enabled?this.calloutLabelKey:void 0,d=!n||l.enabled?this.sectorLabelKey:void 0;if(!u&&!d&&!c)return{};const p={datum:e,angleKey:this.angleKey,angleName:this.angleName,radiusKey:this.radiusKey,radiusName:this.radiusName,calloutLabelKey:this.calloutLabelKey,calloutLabelName:this.calloutLabelName,sectorLabelKey:this.sectorLabelKey,sectorLabelName:this.sectorLabelName,legendItemKey:this.legendItemKey},h={};return u&&i>BM(a.minAngle)&&(h.calloutLabel=Object.assign(Object.assign({},this.getTextAlignment(t)),{text:this.getLabelText(a,Object.assign(Object.assign({},p),{value:o})),hidden:!1,collisionTextAlign:void 0,collisionOffsetY:0,box:void 0})),d&&(h.sectorLabel={text:this.getLabelText(l,Object.assign(Object.assign({},p),{value:r}))}),null!=c&&null!=s&&(h.legendItem={key:c,text:s}),h}getTextAlignment(e){const t=[{textAlign:"center",textBaseline:"bottom"},{textAlign:"left",textBaseline:"middle"},{textAlign:"center",textBaseline:"hanging"},{textAlign:"right",textBaseline:"middle"}],i=VM(e),n=-3*Math.PI/4,o=i-n,r=Math.floor(o/(Math.PI/2)),s=$M(r,t.length);return t[s]}getSectorFormat(e,t,i){var n,o,r,s,a;
18const{angleKey:l,radiusKey:c,fills:u,strokes:d,formatter:p,id:h,ctx:{callbackCache:f,highlightManager:g}}=this,v=g.getActiveHighlight(),y=i&&(null===v||void 0===v?void 0:v.series)===this&&t===v.itemId,{fill:m,fillOpacity:C,stroke:b,strokeWidth:w,strokeOpacity:S}=hI(y&&this.highlightStyle.item,{fill:u[t%u.length],fillOpacity:this.fillOpacity,stroke:d[t%d.length],strokeWidth:this.getStrokeWidth(this.strokeWidth),strokeOpacity:this.getOpacity()});let E;return p&&(E=f.call(p,{datum:e,angleKey:l,radiusKey:c,fill:m,stroke:b,fills:u,strokes:d,strokeWidth:w,highlighted:y,seriesId:h})),{fill:null!==(n=null===E||void 0===E?void 0:E.fill)&&void 0!==n?n:m,fillOpacity:null!==(o=null===E||void 0===E?void 0:E.fillOpacity)&&void 0!==o?o:C,stroke:null!==(r=null===E||void 0===E?void 0:E.stroke)&&void 0!==r?r:b,strokeWidth:null!==(s=null===E||void 0===E?void 0:E.strokeWidth)&&void 0!==s?s:w,strokeOpacity:null!==(a=null===E||void 0===E?void 0:E.strokeOpacity)&&void 0!==a?a:S}}getInnerRadius(){const{radius:e,innerRadiusRatio:t,innerRadiusOffset:i}=this,n=e*t+i;return n===e||n<0?0:n}getOuterRadius(){return Math.max(this.radius*this.outerRadiusRatio+this.outerRadiusOffset,0)}updateRadiusScale(e){const t=[this.getInnerRadius(),this.getOuterRadius()];this.radiusScale.range=t,e&&(this.previousRadiusScale.range=t),this.nodeData=this.nodeData.map((e=>{var{radius:t}=e,i=tM(e,["radius"]);return Object.assign(Object.assign({},i),{radius:t,innerRadius:Math.max(this.radiusScale.convert(0),0),outerRadius:Math.max(this.radiusScale.convert(t),0)})}))}getTitleTranslationY(){var e,t;const i=Math.max(0,this.radiusScale.range[1]);if(0===i)return NaN;const n=null!==(t=null===(e=this.title)||void 0===e?void 0:e.spacing)&&void 0!==t?t:0,o=2+n,r=Math.max(0,-i);return-i-o-r}update({seriesRect:e}){return oM(this,void 0,void 0,(function*(){const{title:t}=this,i={seriesRectWidth:null===e||void 0===e?void 0:e.width,seriesRectHeight:null===e||void 0===e?void 0:e.height},n=null!=RM(this.nodeDataDependencies,i);if(n&&(this.nodeDataDependencies=i),yield this.maybeRefreshNodeData(),this.updateTitleNodes(),this.updateRadiusScale(n),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){const e=this.getTitleTranslationY(),i=t.node.computeBBox();t.node.visible=t.enabled&&isFinite(e)&&!this.bboxIntersectsSurroundingSeries(i,0,e),t.node.translationY=isFinite(e)?e:0}this.updateNodeMidPoint(),yield this.updateSelections(),yield this.updateNodes(e)}))}updateTitleNodes(){var e,t;const{title:i,oldTitle:n}=this;n!==i&&(n&&(null===(e=this.labelGroup)||void 0===e||e.removeChild(n.node)),i&&(i.node.textBaseline="bottom",null===(t=this.labelGroup)||void 0===t||t.appendChild(i.node)),this.oldTitle=i)}updateNodeMidPoint(){this.nodeData.forEach((e=>{const t=e.innerRadius+(e.outerRadius-e.innerRadius)/2;e.midPoint={x:e.midCos*Math.max(0,t),y:e.midSin*Math.max(0,t)}}))}updateSelections(){return oM(this,void 0,void 0,(function*(){yield this.updateGroupSelection(),this.updateInnerCircleSelection()}))}updateGroupSelection(){return oM(this,void 0,void 0,(function*(){const{itemSelection:e,highlightSelection:t,calloutLabelSelection:i,sectorLabelSelection:n,innerLabelsSelection:o}=this,r=(e,t)=>{let i=this.nodeData;t&&(i=i.map((e=>Object.assign(Object.assign({},e),{sectorFormat:Object.assign({},e.sectorFormat)})))),e.update(i),this.ctx.animationManager.isSkipped()&&e.cleanup()};r(e,!1),r(t,!0),i.update(this.nodeData,(e=>{const t=new YL;t.tag=$F.Callout,t.pointerEvents=yN.None,e.appendChild(t);const i=new _N;i.tag=$F.Label,i.pointerEvents=yN.None,e.appendChild(i)})),n.update(this.nodeData,(e=>{e.pointerEvents=yN.None})),o.update(this.innerLabels,(e=>{e.pointerEvents=yN.None}))}))}updateInnerCircleSelection(){const{innerCircle:e}=this;let t=0;const i=this.getInnerRadius();if(i>0){const e=Math.min(i,this.getOuterRadius()),n=1;t=Math.ceil(2*e+n)}const n=e?[{radius:t}]:[];this.innerCircleSelection.update(n)}updateNodes(e){return oM(this,void 0,void 0,(function*(){const t=this.ctx.highlightManager.getActiveHighlight(),i=this.seriesItemEnabled.indexOf(!0)>=0;this.rootGroup.visible=i,this.backgroundGroup.visible=i,this.contentGroup.visible=i,this.highlightGroup.visible=i&&(null===t||void 0===t?void 0:t.series)===this,this.labelGroup&&(this.labelGroup.visible=i),this.contentGroup.opacity=this.getOpacity(),this.innerCircleSelection.each(((e,{radius:t})=>{var i,n;e.setProperties({fill:null===(i=this.innerCircle)||void 0===i?void 0:i.fill,opacity:null===(n=this.innerCircle)||void 0===n?void 0:n.fillOpacity,size:t})}));const n=(e,t,i,n)=>{const o=this.getSectorFormat(t.datum,t.itemId,n);t.sectorFormat.fill=o.fill,t.sectorFormat.stroke=o.stroke;const r=this.ctx.animationManager.isSkipped();r&&(e.startAngle=t.startAngle,e.endAngle=t.endAngle,e.innerRadius=t.
18innerRadius,e.outerRadius=t.outerRadius),(n||r)&&(e.fill=o.fill,e.stroke=o.stroke),e.strokeWidth=o.strokeWidth,e.fillOpacity=o.fillOpacity,e.strokeOpacity=this.strokeOpacity,e.lineDash=this.lineDash,e.lineDashOffset=this.lineDashOffset,e.fillShadow=this.shadow,e.lineJoin="round"};this.itemSelection.each(((e,t,i)=>n(e,t,i,!1))),this.highlightSelection.each(((e,i,o)=>{const r=(null===t||void 0===t?void 0:t.series)===this&&e.datum.itemId===t.itemId;n(e,i,o,r),e.visible=r})),this.updateCalloutLineNodes(),this.updateCalloutLabelNodes(e),this.updateSectorLabelNodes(),this.updateInnerLabelNodes(),this.animationState.transition("update")}))}updateCalloutLineNodes(){var e;const{calloutLine:t}=this,i=t.length,n=t.strokeWidth,o=null!==(e=t.colors)&&void 0!==e?e:this.strokes,{offset:r}=this.calloutLabel;this.calloutLabelSelection.selectByTag($F.Callout).forEach(((e,t)=>{const s=e.datum,{calloutLabel:a,outerRadius:l}=s;if((null===a||void 0===a?void 0:a.text)&&!a.hidden&&0!==l){e.visible=!0,e.strokeWidth=n,e.stroke=o[t%o.length],e.fill=void 0;const c=s.midCos*l,u=s.midSin*l;let d=s.midCos*(l+i),p=s.midSin*(l+i);const h=a.collisionTextAlign||0!==a.collisionOffsetY;if(h&&null!=a.box){const e=a.box;let t=d,i=p;d<e.x?t=e.x:d>e.x+e.width&&(t=e.x+e.width),p<e.y?i=e.y:p>e.y+e.height&&(i=e.y+e.height);const n=t-d,o=i-p,s=Math.sqrt(Math.pow(n,2)+Math.pow(o,2)),l=s-r;l>0&&(d+=n*l/s,p+=o*l/s)}e.x1=c,e.y1=u,e.x2=d,e.y2=p}else e.visible=!1}))}getLabelOverflow(e,t,i){const n=i.x-this.centerX,o=i.x+i.width-this.centerX,r=i.y-this.centerY,s=i.y+i.height-this.centerY,a=1;let l=1;t.x+a<n?l=(t.x+t.width-n)/t.width:t.x+t.width-a>o&&(l=(o-t.x)/t.width);const c=t.y+a<r||t.y+t.height-a>s,u=1===l?e.length:Math.floor(e.length*l)-1,d=this.bboxIntersectsSurroundingSeries(t);return{textLength:u,hasVerticalOverflow:c,hasSurroundingSeriesOverflow:d}}bboxIntersectsSurroundingSeries(e,t=0,i=0){const{surroundingRadius:n}=this;if(null==n)return!1;const o=[{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}],r=Math.pow(n,2);return o.some((e=>Math.pow(e.x,2)+Math.pow(e.y,2)>r))}computeCalloutLabelCollisionOffsets(){const{radiusScale:e,calloutLabel:t,calloutLine:i}=this,{offset:n,minSpacing:o}=t,r=e.convert(0),s=e=>{const t=e.calloutLabel;return!t||0===e.outerRadius},a=this.nodeData,l=this.nodeData.filter((e=>!s(e)));if(l.forEach((e=>{const t=e.calloutLabel;null!=t&&(t.hidden=!1,t.collisionTextAlign=void 0,t.collisionOffsetY=0)})),l.length<=1)return;const c=l.filter((e=>e.midCos<0)).sort(((e,t)=>e.midSin-t.midSin)),u=l.filter((e=>e.midCos>=0)).sort(((e,t)=>e.midSin-t.midSin)),d=l.filter((e=>{var t;return e.midSin<0&&"center"===(null===(t=e.calloutLabel)||void 0===t?void 0:t.textAlign)})).sort(((e,t)=>e.midCos-t.midCos)),p=l.filter((e=>{var t;return e.midSin>=0&&"center"===(null===(t=e.calloutLabel)||void 0===t?void 0:t.textAlign)})).sort(((e,t)=>e.midCos-t.midCos)),h=new _N,f=e=>{var t;const o=e.calloutLabel;if(null==o)return new gN(0,0,0,0);const r=e.outerRadius+i.length+n,s=e.midCos*r,a=e.midSin*r+o.collisionOffsetY;return h.text=o.text,h.x=s,h.y=a,h.setFont(this.calloutLabel),h.setAlign({textAlign:null!==(t=o.collisionTextAlign)&&void 0!==t?t:o.textAlign,textBaseline:o.textBaseline}),h.computeBBox()},g=(e,t,i)=>{const n=f(e).grow(o/2),r=f(t).grow(o/2),s=n.x<r.x+r.width&&n.x+n.width>r.x&&("to-top"===i?n.y<r.y+r.height:n.y+n.height>r.y);if(s){const e="to-top"===i?n.y-r.y-r.height:n.y+n.height-r.y;t.calloutLabel.collisionOffsetY=e}},v=e=>{const t=e.slice().sort(((e,t)=>Math.abs(e.midSin)-Math.abs(t.midSin)))[0],i=e.indexOf(t);for(let n=i-1;n>=0;n--){const t=e[n+1],i=e[n];g(t,i,"to-top")}for(let n=i+1;n<e.length;n++){const t=e[n-1],i=e[n];g(t,i,"to-bottom")}},y=e=>{const t=l.some((e=>0!==e.calloutLabel.collisionOffsetY)),i=e.map((e=>f(e))),n=i.map((e=>e.clone().grow(o/2)));let s=!1;for(let o=0;o<n.length&&!s;o++){const t=n[o];for(let i=o+1;i<e.length;i++){const e=n[i];if(t.collidesBBox(e)){s=!0;break}}}const c=a.map((e=>{const{startAngle:t,endAngle:i,outerRadius:n}=e;return{startAngle:t,endAngle:i,innerRadius:r,outerRadius:n}})),u=i.some((e=>c.some((t=>nI(e,t)))));(s||t||u)&&e.filter((e=>
18"center"===e.calloutLabel.textAlign)).forEach((e=>{const t=e.calloutLabel;e.midCos<0?t.collisionTextAlign="right":e.midCos>0?t.collisionTextAlign="left":t.collisionTextAlign="center"}))};v(c),v(u),y(d),y(p)}updateCalloutLabelNodes(e){const{radiusScale:t,calloutLabel:i,calloutLine:n}=this,o=n.length,{offset:r,color:s}=i,a=new _N;this.calloutLabelSelection.selectByTag($F.Label).forEach((n=>{var l;const{datum:c}=n,u=c.calloutLabel,d=t.convert(c.radius),p=Math.max(0,d);if(!(null===u||void 0===u?void 0:u.text)||0===p||u.hidden)return void(n.visible=!1);const h=p+o+r,f=c.midCos*h,g=c.midSin*h+u.collisionOffsetY,v={textAlign:null!==(l=u.collisionTextAlign)&&void 0!==l?l:u.textAlign,textBaseline:u.textBaseline};a.text=u.text,a.x=f,a.y=g,a.setFont(this.calloutLabel),a.setAlign(v);const y=a.computeBBox();let m=u.text,C=!0;if(i.avoidCollisions){const{textLength:t,hasVerticalOverflow:i}=this.getLabelOverflow(u.text,y,e);m=u.text.length===t?u.text:`${u.text.substring(0,t)}…`,C=!i}n.text=m,n.x=f,n.y=g,n.setFont(this.calloutLabel),n.setAlign(v),n.fill=s,n.visible=C}))}computeLabelsBBox(e,t){var i;return oM(this,void 0,void 0,(function*(){const{calloutLabel:n,calloutLine:o}=this,r=o.length,{offset:s,maxCollisionOffset:a,minSpacing:l}=n;if(!n.avoidCollisions)return null;yield this.maybeRefreshNodeData(),this.updateRadiusScale(!1),this.computeCalloutLabelCollisionOffsets();const c=[],u=new _N;let d;if((null===(i=this.title)||void 0===i?void 0:i.text)&&this.title.enabled){const e=this.getTitleTranslationY();isFinite(e)&&(u.text=this.title.text,u.x=0,u.y=e,u.setFont(this.title),u.setAlign({textBaseline:"bottom",textAlign:"center"}),d=u.computeBBox(),c.push(d))}return this.nodeData.forEach((i=>{var n;const o=i.calloutLabel;if(!o||0===i.outerRadius)return null;const p=i.outerRadius+r+s,h=i.midCos*p,f=i.midSin*p+o.collisionOffsetY;u.text=o.text,u.x=h,u.y=f,u.setFont(this.calloutLabel),u.setAlign({textAlign:null!==(n=o.collisionTextAlign)&&void 0!==n?n:o.textAlign,textBaseline:o.textBaseline});const g=u.computeBBox();if(o.box=g,Math.abs(o.collisionOffsetY)>a)o.hidden=!0;else{if(d){const e=t.y-this.centerY,i=new gN(d.x-l,e,d.width+2*l,d.y+d.height+l-e);if(g.collidesBBox(i))return void(o.hidden=!0)}if(e.hideWhenNecessary){const{textLength:e,hasVerticalOverflow:i,hasSurroundingSeriesOverflow:n}=this.getLabelOverflow(o.text,g,t),r=o.text.length>2&&e<2;if(i||r||n)return void(o.hidden=!0)}o.hidden=!1,c.push(g)}})),0===c.length?null:gN.merge(c)}))}updateSectorLabelNodes(){const{radiusScale:e}=this,t=e.convert(0),{fontSize:i,fontStyle:n,fontWeight:o,fontFamily:r,positionOffset:s,positionRatio:a,color:l}=this.sectorLabel,c=t>0,u=1===this.seriesItemEnabled.filter(Boolean).length;this.sectorLabelSelection.each(((e,d)=>{const{sectorLabel:p,outerRadius:h}=d;let f=!1;if(p&&0!==h){const g=t*(1-a)+h*a+s;e.fill=l,e.fontStyle=n,e.fontWeight=o,e.fontSize=i,e.fontFamily=r,e.text=p.text;const v=!c&&u;v?(e.x=0,e.y=0):(e.x=d.midCos*g,e.y=d.midSin*g),e.textAlign="center",e.textBaseline="middle";const y=e.computeBBox(),m=[[y.x,y.y],[y.x+y.width,y.y],[y.x+y.width,y.y+y.height],[y.x,y.y+y.height]],{startAngle:C,endAngle:b}=d,w={startAngle:C,endAngle:b,innerRadius:t,outerRadius:h};m.every((([e,t])=>tI(e,t,w)))&&(f=!0)}e.visible=f}))}updateInnerLabelNodes(){const e=[],t=[];this.innerLabelsSelection.each(((i,n)=>{const{fontStyle:o,fontWeight:r,fontSize:s,fontFamily:a,color:l}=n;i.fontStyle=o,i.fontWeight=r,i.fontSize=s,i.fontFamily=a,i.text=n.text,i.x=0,i.y=0,i.fill=l,i.textAlign="center",i.textBaseline="alphabetic",e.push(i.computeBBox()),t.push(n.margin)}));const i=e=>0===e?0:t[e],n=e=>e===t.length-1?0:t[e],o=e.reduce(((e,t,o)=>e+t.height+i(o)+n(o)),0),r=Math.max(...e.map((e=>e.width))),s=this.getInnerRadius(),a=Math.sqrt(Math.pow(r/2,2)+Math.pow(o/2,2)),l=a<=(s>0?s:this.getOuterRadius()),c=[];for(let u=0,d=-o/2;u<e.length;u++){const t=e[u],o=t.height+d+i(u);c.push(o),d=o+n(u)}this.innerLabelsSelection.each(((e,t,i)=>{e.y=c[i],e.visible=l}))}getDatumLegendName(e){const{angleKey:t,calloutLabelKey:i,sectorLabelKey:n,legendItemKey:o}=this,{sectorLabel:r,calloutLabel:s,legendItem:a}=e;return o&&void 0!==a?a.text:i&&i!==t&&void 0!==(null===s||void 0===s?void 0:s.text)?s.text:n&&n!==t&&void 0!==(null===r||void 0===r?void 0:r.text)?r.text:void 0}getTooltipHtml(e){var t;if(!this.angleKey)return"";const{datum:i,angleValue:n,sectorFormat:{fill:o}}=e,r=gI(null===(t=this.title)||void 0===t?void 0:t.text),s=SI(n)?XM(n):String(n),a=this.getDatumLegendName(e);return this.tooltip.toTooltipHtml({title:null!==r&&void 0!==r?r:a,content:r&&a?`${a}: ${s}`:s,backgroundColor:o},{datum:i,title:r,color:o,seriesId:this.id,angleKey:this.angleKey,angleName:this.angleName,radiusKey:this.radiusKey,radiusName:this.radiusName,calloutLabelKey:this.calloutLabelKey,calloutLabelName:this.calloutLabelName,sectorLabelKey:this.sectorLabelKey,sectorLabelName:this.sectorLabelName})}getLegendData(e){var t,i,n,o,r;const{processedData:s,angleKey:a,calloutLabelKey:l,sectorLabelKey:c,legendItemKey:u,id:d,dataModel:p}=this;if(!p||!s||0===s.data.length||"category"!==e)return[];if(!u&&(!l||l===a)&&(!c||c===a))return[];const{calloutLabelIdx:h,sectorLabelIdx:f,legendItemIdx:g}=this.getProcessedDataIndexes(p),v=(null===(t=this.title)||void 0===t?void 0:t.showInLegend
18)&&this.title.text,y=[];for(let m=0;m<s.data.length;m++){const{datum:e,values:t}=s.data[m],p=[];v&&p.push(v);const C=this.getLabels(e,2*Math.PI,2*Math.PI,!1,t[h],t[f],t[g]);if(u&&void 0!==C.legendItem?p.push(C.legendItem.text):l&&l!==a&&void 0!==(null===(i=C.calloutLabel)||void 0===i?void 0:i.text)?p.push(null===(n=C.calloutLabel)||void 0===n?void 0:n.text):c&&c!==a&&void 0!==(null===(o=C.sectorLabel)||void 0===o?void 0:o.text)&&p.push(null===(r=C.sectorLabel)||void 0===r?void 0:r.text),0===p.length)continue;const b=this.getSectorFormat(e,m,!1);y.push({legendType:"category",id:d,itemId:m,seriesId:d,enabled:this.seriesItemEnabled[m],label:{text:p.join(" - ")},marker:{fill:b.fill,stroke:b.stroke,fillOpacity:this.fillOpacity,strokeOpacity:this.strokeOpacity,strokeWidth:this.strokeWidth}})}return y}onLegendItemClick(e){const{enabled:t,itemId:i,series:n}=e;n.id===this.id?this.toggleSeriesItem(i,t):"pie"===n.type&&this.toggleOtherSeriesItems(n,i,t)}toggleSeriesItem(e,t){this.seriesItemEnabled[e]=t,this.nodeDataRefresh=!0}toggleOtherSeriesItems(e,t,i){var n,o;const{legendItemKey:r,dataModel:s}=this;if(!r||!s)return;const a=e.legendItemKey&&(null===(n=e.data)||void 0===n?void 0:n.find(((e,i)=>i===t))[e.legendItemKey]);if(!a)return;const l=s.resolveProcessedDataIndexById(this,"legendItemValue").index;null===(o=this.processedData)||void 0===o||o.data.forEach((({values:e},t)=>{e[l]===a&&this.toggleSeriesItem(t,i)}))}animateEmptyUpdateReady(e){const{animationManager:t}=this.ctx,i=YF(!0,this.rotation,this.radiusScale,this.previousRadiusScale);uL(this.id,"nodes",t,[this.itemSelection,this.highlightSelection],i.nodes),uL(this.id,"innerCircle",t,[this.innerCircleSelection],i.innerCircle),CF(this,"callout",t,[this.calloutLabelSelection]),CF(this,"sector",t,[this.sectorLabelSelection]),CF(this,"inner",t,[this.innerLabelsSelection]),this.previousRadiusScale.range=this.radiusScale.range}animateWaitingUpdateReady(){var e,t,i,n,o,r;const{itemSelection:s,highlightSelection:a,processedData:l,radiusScale:c,previousRadiusScale:u}=this,{animationManager:d}=this.ctx,p=null===(e=null===l||void 0===l?void 0:l.reduced)||void 0===e?void 0:e.diff;this.ctx.animationManager.stopByAnimationGroupId(this.id);const h=0===(null!==(t=null===p||void 0===p?void 0:p.moved.length)&&void 0!==t?t:0)&&(null===p||void 0===p?void 0:p.addedIndices.every((e=>!p.removedIndices.includes(e)))),f=(null!==(i=null===l||void 0===l?void 0:l.defs.keys.length)&&void 0!==i?i:0)>0,g=null===(r=null===(o=null===(n=null===l||void 0===l?void 0:l.reduced)||void 0===n?void 0:n.animationValidation)||void 0===o?void 0:o.uniqueKeys)||void 0===r||r;h&&f&&g||this.ctx.animationManager.skipCurrentBatch();const v=YF(!1,this.rotation,c,u);uL(this.id,"nodes",d,[s,a],v.nodes,((e,t)=>this.getDatumId(t)),p),uL(this.id,"innerCircle",d,[this.innerCircleSelection],v.innerCircle),CF(this,"callout",this.ctx.animationManager,[this.calloutLabelSelection]),CF(this,"sector",this.ctx.animationManager,[this.sectorLabelSelection]),CF(this,"inner",this.ctx.animationManager,[this.innerLabelsSelection]),this.previousRadiusScale.range=this.radiusScale.range}animateClearingUpdateEmpty(){const{itemSelection:e,highlightSelection:t,radiusScale:i,previousRadiusScale:n}=this,{animationManager:o}=this.ctx,r=YF(!1,this.rotation,i,n);uL(this.id,"nodes",o,[e,t],r.nodes),uL(this.id,"innerCircle",o,[this.innerCircleSelection],r.innerCircle),bF(this,"callout",this.ctx.animationManager,[this.calloutLabelSelection]),bF(this,"sector",this.ctx.animationManager,[this.sectorLabelSelection]),bF(this,"inner",this.ctx.animationManager,[this.innerLabelsSelection]),this.previousRadiusScale.range=this.radiusScale.range}getDatumIdFromData(e){var t,i,n;const{calloutLabelKey:o,sectorLabelKey:r,legendItemKey:s}=this;if(null===(n=null===(i=null===(t=this.processedData)||void 0===t?void 0:t.reduced)||void 0===i?void 0:i.animationValidation)||void 0===n?void 0:n.uniqueKeys)return s?e[s]:o?e[o]:r?e[r]:void 0}getDatumId(e){var t;const{index:i}=e;return null!==(t=this.getDatumIdFromData(e.datum))&&void 0!==t?t:`${i}`}onDataChange(){this.processSeriesItemEnabled()}}lG.className="PieSeries",lG.type="pie",iM([JM(hk),nM("design:type",Object)],lG.prototype,"angleKey",void 0),iM([JM(hk),nM("design:type",Object)],lG.prototype,"angleName",void 0),iM([JM(fk),nM("design:type",String)],lG.prototype,"radiusKey",void 0),iM([JM(fk),nM("design:type",String)],lG.prototype,"radiusName",void 0),iM([JM(Dk(0)),nM("design:type",Number)],lG.prototype,"radiusMin",void 0),iM([JM(Dk(0)),nM("design:type",Number)],lG.prototype,"radiusMax",void 0),iM([JM(fk),nM("design:type",String)],lG.prototype,"calloutLabelKey",void 0),iM([JM(fk),nM("design:type",String)],lG.prototype,"calloutLabelName",void 0),iM([JM(fk),nM("design:type",String)],lG.prototype,"sectorLabelKey",void 0),iM([JM(fk),nM("design:type",String)],lG.prototype,"sectorLabelName",void 0),iM([JM(fk),nM("design:type",String)],lG.prototype,"legendItemKey",void 0),iM([JM(Ek),nM("design:type",Array)],lG.prototype,"fills",void 0),iM([JM(Ek),nM("design:type",Array)],lG.prototype,"strokes",void 0),iM([JM(Tk(0,1)),nM("design:type",Object)],lG.prototype,"fillOpacity",void 0),iM([JM(Tk(0,1)),nM("design:type",Object)],lG.prototype,"strokeOpacity",void 0),iM([JM(Bk),nM("design:type",Array)],lG.prototype,"lineDash",void 0),iM([JM(Tk(0)),nM("design:type",Number)],lG.prototype,"lineDashOffset",void 0),iM([JM(uk),nM("design:type",Function)],lG.prototype,"formatter",void 0),iM([JM(Tk(-360,360)),n
18M("design:type",Object)],lG.prototype,"rotation",void 0),iM([JM(Tk()),nM("design:type",Object)],lG.prototype,"outerRadiusOffset",void 0),iM([JM(Tk(0)),nM("design:type",Object)],lG.prototype,"outerRadiusRatio",void 0),iM([JM(Tk()),nM("design:type",Object)],lG.prototype,"innerRadiusOffset",void 0),iM([JM(Tk(0)),nM("design:type",Object)],lG.prototype,"innerRadiusRatio",void 0),iM([JM(Tk(0)),nM("design:type",Object)],lG.prototype,"strokeWidth",void 0);const cG={constructors:{},constructedArrays:new WeakMap};function uG(e,t){var i;null===(i=cG.constructedArrays)||void 0===i||i.set(e,t)}class dG extends DN{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 gN(this.x1,this.y1,this.x2-this.x1,this.y2-this.y1)}isPointInPath(e,t){return!1}render(e){var t;const{ctx:i,forceRender:n,stats:o}=e;if(this.dirty===nN.NONE&&!n)return void(o&&(o.nodesSkipped+=this.nodeCount.count));this.computeTransformMatrix(),this.matrix.toContext(i);let{x1:r,y1:s,x2:a,y2:l}=this;r=this.align(r),s=this.align(s),a=this.align(a),l=this.align(l);const{fill:c,opacity:u,isRange:d}=this,p=!(!d||!c);if(p){const{fillOpacity:e}=this;i.fillStyle=c,i.globalAlpha=u*e,i.beginPath(),i.moveTo(r,s),i.lineTo(a,s),i.lineTo(a,l),i.lineTo(r,l),i.closePath(),i.fill()}const{stroke:h,strokeWidth:f,startLine:g,endLine:v}=this,y=!(!g&&!v||!h||!f);if(y){const{strokeOpacity:e,lineDash:t,lineDashOffset:n,lineCap:o,lineJoin:c}=this;i.strokeStyle=h,i.globalAlpha=u*e,i.lineWidth=f,t&&i.setLineDash(t),n&&(i.lineDashOffset=n),o&&(i.lineCap=o),c&&(i.lineJoin=c),i.beginPath(),g&&(i.moveTo(r,s),i.lineTo(a,s)),v&&(i.moveTo(a,l),i.lineTo(r,l)),i.stroke()}null===(t=this.fillShadow)||void 0===t||t.markClean(),super.render(e)}}dG.className="Range",dG.defaultStyles=Object.assign(Object.assign({},DN.defaultStyles),{strokeWidth:1}),iM([sN({redraw:nN.MINOR}),nM("design:type",Number)],dG.prototype,"x1",void 0),iM([sN({redraw:nN.MINOR}),nM("design:type",Number)],dG.prototype,"y1",void 0),iM([sN({redraw:nN.MINOR}),nM("design:type",Number)],dG.prototype,"x2",void 0),iM([sN({redraw:nN.MINOR}),nM("design:type",Number)],dG.prototype,"y2",void 0),iM([sN({redraw:nN.MINOR}),nM("design:type",Boolean)],dG.prototype,"startLine",void 0),iM([sN({redraw:nN.MINOR}),nM("design:type",Boolean)],dG.prototype,"endLine",void 0),iM([sN({redraw:nN.MINOR}),nM("design:type",Boolean)],dG.prototype,"isRange",void 0);const pG={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}},hG={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 fG({yDirection:e,padding:t=0,position:i="top",bbox:n}){const o=e?pG:hG,{xTranslationDirection:r,yTranslationDirection:s}=o[i],a=e?n.width:n.height,l=e?n.height:n.width,c=r*(t+a/2),u=s*(t+l/2);return{xTranslation:c,yTranslation:u}}function gG({yDirection:e,bbox:t,padding:i=0,position:n="top"}){const o={};return n.startsWith("inside")||("top"!==n||e?"bottom"!==n||e?"left"===n&&e?o.left=i+t.width:"right"===n&&e&&(o.right=i+t.width):o.bottom=i+t.height:o.top=i+t.height),o}const vG=({yDirection:e,xEnd:t,yStart:i,yEnd:n})=>e?{x:t/2,y:i}:{x:t,y:isNaN(n)?i:(i+n)/2},yG=({yDirection:e,xStart:t,xEnd:i,yStart:n,yEnd:o})=>e?{x:t,y:isNaN(o)?n:(n+o)/2}:{x:i/2,y:n},mG=({yDirection:e,xEnd:t,yStart:i,yEnd:n})=>e?{x:t,y:isNaN(n)?i:(i+n)/2}:{x:t/2,y:isNaN(n)?i:n},CG=({yDirection:e,xStart:t,xEnd:i,yStart:n,yEnd:o})=>e?{x:i/2,y:isNaN(o)?n:o}:{x:t,y:isNaN(o)?n:(n+o)/2},bG=({xEnd:e,yStart:t,yEnd:i})=>({x:e/2,y:isNaN(i)?t:(t+i)/2}),wG=({yDirection:e,xStart:t,xEnd:i,yStart:n})=>e?{x:t/2,y:n}:{x:i,y:n},SG=({yDirection:e,xStart:t,yStart:i,yEnd:n})=>e?{x:t,y:isNaN(n)?i:n}:{x:t,y:i},EG=({yDirection:e,xEnd:t,yStart:i,yEnd:n})=>e?{x:t,y:i}:{x:t,y:isNaN(n)?i:n},xG=({yDirection:e,xStart:t,xEnd:i,yStart:n,yEnd:o})=>e?{x:i,y:isNaN(o)?n:o}:{x:t,y:isNaN(o)?n:o},OG={top:{c:vG},bottom:{c:CG},left:{c:yG},right:{c:mG},topLeft:{c:wG},topRight:{c:EG},bottomLeft:{c:SG},bottomRight:{c:xG},inside:{c:bG},insideLeft:{c:yG},insideRight:{c:mG},insideTop:{c:vG},insideBottom:{c:CG},insideTopLeft:{c:wG},insideBottomLeft:{c:SG},insideTopRight:{c:EG},insideBottomRight:{c:xG}},TG=["top","left","right","bottom","topLeft","topRight","bottomLeft","bottomRight","inside","insideLeft","insideRight","insideTop","insideBottom","insideTopLeft","insideBottomLeft","insideTopRight","insideBottomRight"],DG=ek(((e,t)=>tk(e,t,(e=>TG.includes(e)))),"expecting an optional crossLine label position keyword such as 'topLeft', 'topRight' or 'inside'"),RG=ek(((e,t)=>tk(e,t,(e=>"range"===e||"line"===e))),"expecting a crossLine type keyword such as 'range' or 'line'");class AG{constructor(){this.enabled=void 0,this.text=void 0,this.fontStyle=void 0,this.fontWeight=void 0,this.fontSize=14,this.fontFamily="Verdana, sans-serif",this.padding=5,this.color="rgba(87, 87, 87, 1)",this.position=void 0,this.rotation=void 0,this.parallel=void 0}}iM([JM(pk),nM("design:type",Boolean)],AG.prototype,"enabled",void 0),iM([JM(fk),nM("design:type",String)],AG.prototype,"text",void 0),iM([JM(Ik),nM("design:type",String)],AG.prototype,"fontStyle",void 0),iM([JM(Gk),nM("design:type",String)],AG.prototype,"fontWeight",void 0),iM([JM(Tk(0)),nM("design:type",Number)],AG.prototype,"fontSize",void 0),iM([JM(hk),nM("design:type",String)],AG.prototype,"fontFamily",void 0),iM([JM(Tk()),nM("design:type",Number)],AG.prototype,"padding",void 0),iM([JM(Sk),nM("design:type",String)],AG.prototype,"color",void 0),iM([JM(DG),nM("design:type",String)],AG.prototype,"position",void 0),iM([JM(Dk(-360,360)),n
18M("design:type",Number)],AG.prototype,"rotation",void 0),iM([JM(pk),nM("design:type",Boolean)],AG.prototype,"parallel",void 0);class _G{constructor(){this.id=pN(this),this.enabled=void 0,this.type=void 0,this.range=void 0,this.value=void 0,this.fill=void 0,this.fillOpacity=void 0,this.stroke=void 0,this.strokeWidth=void 0,this.strokeOpacity=void 0,this.lineDash=void 0,this.label=new AG,this.scale=void 0,this.clippedRange=[-1/0,1/0],this.gridLength=0,this.sideFlag=-1,this.parallelFlipRotation=0,this.regularFlipRotation=0,this.direction=iN.X,this.group=new zL({name:`${this.id}`,layer:!0,zIndex:_G.LINE_LAYER_ZINDEX}),this.crossLineRange=new dG,this.crossLineLabel=new _N,this.labelPoint=void 0,this.data=[],this.startLine=!1,this.endLine=!1,this.isRange=!1;const{group:e,crossLineRange:t,crossLineLabel:i}=this;e.append([t,i]),t.pointerEvents=yN.None}update(e){this.enabled&&e&&0!==this.data.length?(this.group.visible=!0,this.group.zIndex=this.getZIndex(this.isRange),this.updateNodes()):this.group.visible=!1}calculateLayout(e){if(!e)return;const t=this.createNodeData();if(!t)return;const{sideFlag:i,gridLength:n,data:o}=this,r=[],s=0,a=i*n,l=o[0],c=o[1],u=new gN(Math.min(s,a),Math.min(l,c),Math.abs(s-a),Math.abs(l-c));r.push(u);const d=this.computeLabelBBox();return d&&r.push(d),gN.merge(r)}updateNodes(){this.updateRangeNode(),this.label.enabled&&(this.updateLabel(),this.positionLabel())}createNodeData(){var e,t;const{scale:i,gridLength:n,sideFlag:o,direction:r,label:{position:s="top"},clippedRange:a,strokeWidth:l=0}=this;if(this.data=[],!i)return!1;const c=null!==(e=i.bandwidth)&&void 0!==e?e:0,u=e=>Math.max(Math.min(...a),Math.min(Math.max(...a),e)),[d,p]=[0,o*n];let[h,f]=this.getRange(),[g,v]=[Number(i.convert(h,{clampMode:"clamped"})),i.convert(f,{clampMode:"clamped"})+c];g=u(g),v=u(v),[h,f]=[Number(i.convert(h)),i.convert(f)+c];const y=!isNaN(g)&&!isNaN(v)&&(h===g||f===v||g!==v)&&Math.abs(v-g)>0;if(y){const e=g!==Math.min(g,v);e&&([g,v]=[Math.min(g,v),Math.max(g,v)],[h,f]=[f,h])}if(this.isRange=y,this.startLine=!isNaN(h)&&l>0&&h===g,this.endLine=!isNaN(f)&&l>0&&f===v,!y&&!this.startLine&&!this.endLine)return!1;if(this.data=[g,v],this.label.enabled){const e=r===iN.Y,{c:i=vG}=null!==(t=OG[s])&&void 0!==t?t:{},{x:n,y:o}=i({yDirection:e,xStart:d,xEnd:p,yStart:g,yEnd:v});this.labelPoint={x:n,y:o}}return!0}updateRangeNode(){var e;const{crossLineRange:t,sideFlag:i,gridLength:n,data:o,startLine:r,endLine:s,isRange:a,fill:l,fillOpacity:c,stroke:u,strokeWidth:d,lineDash:p}=this;t.x1=0,t.x2=i*n,t.y1=o[0],t.y2=o[1],t.startLine=r,t.endLine=s,t.isRange=a,t.fill=l,t.fillOpacity=null!==c&&void 0!==c?c:1,t.stroke=u,t.strokeWidth=null!==d&&void 0!==d?d:1,t.strokeOpacity=null!==(e=this.strokeOpacity)&&void 0!==e?e:1,t.lineDash=p}updateLabel(){const{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(){const{crossLineLabel:e,labelPoint:{x:t,y:i}={},label:{parallel:n,rotation:o,position:r="top",padding:s=0},direction:a,parallelFlipRotation:l,regularFlipRotation:c}=this;if(void 0===t||void 0===i)return;const{defaultRotation:u,configuredRotation:d}=GI({rotation:o,parallel:n,regularFlipRotation:c,parallelFlipRotation:l});e.rotation=u+d,e.textBaseline="middle",e.textAlign="center";const p=e.computeTransformedBBox();if(!p)return;const h=a===iN.Y,{xTranslation:f,yTranslation:g}=fG({yDirection:h,padding:s,position:r,bbox:p});e.translationX=t+f,e.translationY=i+g}getZIndex(e=!1){return e?_G.RANGE_LAYER_ZINDEX:_G.LINE_LAYER_ZINDEX}getRange(){const{value:e,range:t,scale:i}=this,n=jL.is(i);let[o,r]=null!==t&&void 0!==t?t:[e,void 0];return n||void 0!==r||(r=o),o=null!=wI(o,n)?o:void 0,r=null!=wI(r,n)?r:void 0,n&&o===r&&(r=void 0),void 0===o&&void 0!==r&&(o=r,r=void 0),[o,r]}computeLabelBBox(){const{label:e}=this;if(!e.enabled)return;const t=new _N;t.fontFamily=e.fontFamily,t.fontSize=e.fontSize,t.fontStyle=e.fontStyle,t.fontWeight=e.fontWeight,t.text=e.text;const{labelPoint:{x:i,y:n}={},label:{parallel:o,rotation:r,position:s="top",padding:a=0},direction:l,parallelFlipRotation:c,regularFlipRotation:u}=this;if(void 0===i||void 0===n)return;const{configuredRotation:d}=GI({rotation:r,parallel:o,regularFlipRotation:u,parallelFlipRotation:c});t.rotation=d,t.textBaseline="middle",t.textAlign="center";const p=t.computeTransformedBBox();if(!p)return;const h=l===iN.Y,{xTranslation:f,yTranslation:g}=fG({yDirection:h,padding:a,position:s,bbox:p});return t.translationX=i+f,t.translationY=n+g,t.computeTransformedBBox()}calculatePadding(e){var t,i,n,o,r,s,a,l;const{isRange:c,startLine:u,endLine:d,direction:p,label:{padding:h=0,position:f="top"}}=this;if(!c&&!u&&!d)return;const g=this.computeLabelBBox(),v=null===g||void 0===g?void 0:g.x,y=null===g||void 0===g?void 0:g.y;if(!g||void 0==v||void 0==y)return;const m=gG({yDirection:p===iN.Y,padding:h,position:f,bbox:g});e.left=Math.max(null!==(t=e.left)&&void 0!==t?t:0,null!==(i=m.left)&&void 0!==i?i:0),e.right=Math.max(null!==(n=e.right)&&void 0!==n?n:0,null!==(o=m.right)&&void 0!==o?o:0),e.top=Math.max(null!==(r=e.top)&&void 0!==r?r:0,null!==(s=m.top)&&void 0!==s?s:0),e.bottom=Math.max(null!==(a=e.bottom)&&void 0!==a?a:0,null!==(l=m.bottom)&&void 0!==l?l:0)}}_G.LINE_LAYER_ZINDEX=WI.SERIES_CROSSLINE_LINE_ZINDEX,_G.RANGE_LAYER_ZINDEX=WI.SERIES_CROSSLINE_RANGE_ZINDEX,_G.className="CrossLine",iM([JM(pk),nM("design:type",Boolean)],_G.prototype,"enabled",void 0),iM([JM(RG),nM("design:type",String)],_G.prototype,"type",void 0),iM([JM(nk(2)),nM("design:type",Array)],_G.prototype,"range",void 0),iM([JM(Sk),nM("design:type",String)],_G.prototype,"fill",void 0),iM([JM(Dk(0,1)),nM("design:type",Number)],_G.prototype,"fillOpacity",void 0),iM([JM(Sk),nM("design:type",String)],_G.prototype,"stroke",void 0),iM([JM(Dk()),nM("design:type",Number)],_G.prototype,"strokeWidth",void 0),iM([JM(Dk(0,1)),nM("design:type",Number)],_G.prototype,"strokeOpacity",void 0),iM([JM(Bk),nM("design:type",Array)],_G.prototype,"lineDash",void 0);const PG=e=>e;class MG extends jL{constructor(){super([1,10],[0,1]),this.type="log",this.base=10,this.cacheProps=["domain","range","nice","tickCount","base"],this.baseLog=PG,this.basePow=PG,this.log=e=>this.domain[0]>=0?this.baseLog(e):-this.baseLog(-e),this.pow=e=>this.domain[0]>=0?this.basePow(e):-this.basePow(-e),this.defaultClampMode="clamped"}toDomain(e){return e}transform(e){return this.domain[0]>=0?Math.log(e):-Math.log(-e)}transformInvert(e){return this.domain[0]>=0?Math.exp(e):-Math.exp(-e)}update(){!this.domain||this.domain.length<2||(this.updateLogFn(),this.updatePowFn(),this.nice&&this.updateNiceDomain())}updateLogFn(){const{base:e}=this;let t;if(10===e)t=Math.log10;else if(e===Math.E)t=Math.log;else if(2===e)t=Math.log2;else{const i=Math.log(e);t=e=>Math.log(e)/i}this.baseLog=t}updatePowFn(){const{base:e}=this;let t;t=10===e?MG.pow10:e===Math.E?Math.exp:t=>Math.pow(e,t),this.basePow=t}updateNiceDomain(){const[e,t]=this.domain,i=this.pow(Math.floor(this.log(e))),n=this.pow(Math.ceil(this.log(t)));this.niceDomain=[i,n]}static pow10(e){return e>=0?Math.pow(10,e):1/Math.pow(10,-e)}ticks(){var e;const t=null!==(e=this.tickCount)&&void 0!==e?e:10;if(!this.domain||this.domain.length<2||t<1)return[];this.refresh();const i=this.base,[n,o]=this.getDomain();let r=this.log(n),s=this.log(o);if(this.interval){const e=Math.abs(this.interval),t=Math.abs(s-r),i=BL(r,s,Math.min(t,e)).map((e=>this.pow(e))).filter((e=>e>=n&&e<=o));if(!this.isDenseInterval({start:n,stop:o,interval:e,count:i.length}))return i}const a=i%1===0,l=s-r>=t;if(!a||l)return LL(r,s,Math.min(s-r,t)).map((e=>this.pow(e)));const c=[],u=n>0;r=Math.floor(r)-1,s=Math.round(s)+1;const d=Math.min(...this.range),p=Math.max(...this.range),h=(p-d)/t;let f=1/0;for(let g=r;g<=s;g++){const e=this.convert(this.pow(g+1));for(let t=1;t<i;t++){const r=u?t:i-t+1,s=this.pow(g)*r,a=this.convert(s),l=Math.abs(f-a),d=Math.abs(a-e),p=l>=h&&d>=h;s>=n&&s<=o&&(1===t||p)&&(c.push(s),f=a)}}return c}tickFormat({count:e,ticks:t,specifier:i}){const{base:n}=this;return null==i&&(i=10===n?".0e":","),"string"===typeof i&&(i=bL(i)),e===1/0?i:(null==t&&this.ticks(),e=>i(e))}}var kG;iM([JM(Tk(0)),nM("design:type",Object)],MG.prototype,"base",void 0),function(e){e[e["MILLISECOND"]=0]="MILLISECOND",e[e["SECOND"]=1]="SECOND",e[e["MINUTE"]=2]="MINUTE",e[e["HOUR"]=3]="HOUR",e[e["WEEK_DAY"]=4]="WEEK_DAY",e[e["SHORT_MONTH"]=5]="SHORT_MONTH",e[e["MONTH"]=6]="MONTH",e[e["SHORT_YEAR"]=7]="SHORT_YEAR",e[e["YEAR"]=8]="YEAR"}(kG||(kG={}));const NG={[kG.MILLISECOND]:".%L",[kG.SECOND]:":%S",[kG.MINUTE]:"%I:%M",[kG.HOUR]:"%I %p",[kG.WEEK_DAY]:"%a",[kG.SHORT_MONTH]:"%b %
18d",[kG.MONTH]:"%B",[kG.SHORT_YEAR]:"%y",[kG.YEAR]:"%Y"};function LG(e){return e instanceof Date?e.getTime():e}class IG extends jL{constructor(){super([new Date(2022,11,7),new Date(2022,11,8)],[0,1]),this.type="time",this.cacheProps=["domain","range","nice","tickCount","interval","minTickCount","maxTickCount"],this.year=UP,this.month=jP,this.week=GP,this.day=IP,this.hour=kP,this.minute=AP,this.second=OP,this.millisecond=fP,this.tickIntervals=[[this.second,1,gP],[this.second,5,5*gP],[this.second,15,15*gP],[this.second,30,30*gP],[this.minute,1,vP],[this.minute,5,5*vP],[this.minute,15,15*vP],[this.minute,30,30*vP],[this.hour,1,yP],[this.hour,3,3*yP],[this.hour,6,6*yP],[this.hour,12,12*yP],[this.day,1,mP],[this.day,2,2*mP],[this.week,1,CP],[this.week,2,2*CP],[this.week,3,3*CP],[this.month,1,bP],[this.month,2,2*bP],[this.month,3,3*bP],[this.month,4,4*bP],[this.month,6,6*bP],[this.year,1,wP]]}toDomain(e){return new Date(e)}calculateDefaultTickFormat(e=[]){let t=kG.YEAR;const i=e=>{e<t&&(t=e)};for(const l of e){const e=this.getLowestGranularityFormat(l);i(e)}const n=LG(e[0]),o=LG(e[e.length-1]),r=new Date(n).getFullYear(),s=new Date(o).getFullYear(),a=s-r>0;return this.buildFormatString(t,a)}buildFormatString(e,t){let i=[NG[e]],n=0;const o=this.getDomain(),r=Math.min(...o.map(LG)),s=Math.max(...o.map(LG)),a=s-r;switch(e){case kG.SECOND:a/vP>1&&i.push(NG[kG.MINUTE]);case kG.MINUTE:a/yP>1&&i.push(NG[kG.HOUR]);case kG.HOUR:n=i.length,a/mP>1&&i.push(NG[kG.WEEK_DAY]);case kG.WEEK_DAY:if(a/CP>1||t){const e=i.indexOf(NG[kG.WEEK_DAY]);e>-1&&i.splice(e,1,NG[kG.SHORT_MONTH])}case kG.SHORT_MONTH:case kG.MONTH:(a/wP>1||t)&&i.push(NG[kG.YEAR])}return n<i.length&&(i=[...i.slice(0,n),i.slice(n).join(" ")]),n>0&&(i=[...i.slice(0,n).reverse(),...i.slice(n)],n<i.length&&i.splice(n,0," ")),i.join("")}getLowestGranularityFormat(e){return this.second.floor(e)<e?kG.MILLISECOND:this.minute.floor(e)<e?kG.SECOND:this.hour.floor(e)<e?kG.MINUTE:this.day.floor(e)<e?kG.HOUR:this.month.floor(e)<e?this.week.floor(e)<e?kG.WEEK_DAY:kG.SHORT_MONTH:this.year.floor(e)<e?kG.MONTH:kG.YEAR}defaultTickFormat(e){const t=this.calculateDefaultTickFormat(e);return e=>kF(t)(e)}getTickInterval({start:e,stop:t,count:i,minCount:n,maxCount:o}){const{tickIntervals:r}=this;let s,a;const l=null!==i&&void 0!==i?i:jL.defaultTickCount,c=Math.abs(t-e)/Math.max(l,1);let u=0;while(u<r.length&&c>r[u][2])u++;if(0===u)a=Math.max(FL(e,t,l,n,o),1),s=this.millisecond;else if(u===r.length){const i=e/wP,r=t/wP;a=FL(i,r,l,n,o),s=this.year}else{const e=c-r[u-1][2],t=r[u][2]-c,i=e<t?u-1:u;[s,a]=r[i]}return s.every(a)}invert(e){return new Date(super.invert(e))}ticks(){if(!this.domain||this.domain.length<2)return[];this.refresh();const[e,t]=this.getDomain().map(LG);if(void 0!==this.interval)return this.getTicksForInterval({start:e,stop:t});if(this.nice){const{tickCount:e}=this;if(2===e)return this.niceDomain;if(1===e)return this.niceDomain.slice(0,1)}return this.getDefaultTicks({start:e,stop:t})}getDefaultTicks({start:e,stop:t}){const i=this.getTickInterval({start:e,stop:t,count:this.tickCount,minCount:this.minTickCount,maxCount:this.maxTickCount});return i?i.range(new Date(e),new Date(t)):[]}getTicksForInterval({start:e,stop:t}){const{interval:i,tickIntervals:n}=this;if(!i)return[];if(i instanceof uP){const n=i.range(new Date(e),new Date(t));return this.isDenseInterval({start:e,stop:t,interval:i,count:n.length})?this.getDefaultTicks({start:e,stop:t}):n}const o=Math.abs(i);if(this.isDenseInterval({start:e,stop:t,interval:o}))return this.getDefaultTicks({start:e,stop:t});const r=[...n];r.reverse();const s=r.find((e=>o%e[2]===0));if(s){const i=s[0].every(o/(s[2]/s[1]));return i.range(new Date(e),new Date(t))}let a=new Date(e);const l=new Date(t),c=[];while(a<=l)c.push(a),a=new Date(a),a.setMilliseconds(a.getMilliseconds()+o);return c}tickFormat({ticks:e,specifier:t}){return void 0==t?this.defaultTickFormat(e):kF(t)}update(){!this.domain||this.domain.length<2||this.nice&&this.updateNiceDomain()}updateNiceDomain(){const e=4;let[t,i]=this.domain;for(let n=0;n<e;n++){this.updateNiceDomainIteration(t,i);const[e,n]=this.niceDomain;if(LG(t)===LG(e)&&LG(i)===LG(n))break;t=e,i=n}}updateNiceDomainIteration(e,t){const i=LG(e),n=LG(t),{interval:o}=this;let r;if(o instanceof uP)r=o;else{const e="number"===typeof o?(n-i)/Math.max(o,1):this.tickCount;r=this.getTickInterval({start:i,stop:n,count:e,minCount:this.minTickCount,maxCount:this.maxTickCount})}if(r){const i=r.range(e,t,!0),n=i[0],o=i[i.length-1];this.niceDomain=[n,o]}}}class FG{constructor(e=0,t=e,i=e,n=t){this.top=e,this.right=t,this.bottom=i,this.left=n}clear(){this.top=this.right=this.bottom=this.left=0}}iM([JM(Tk(0)),nM("design:type",Number)],FG.prototype,"top",void 0),iM([JM(Tk(0)),nM("design:type",Number)],FG.prototype,"right",void 0),iM([JM(Tk(0)),nM("design:type",Number)],FG.prototype,"bottom",void 0),iM([JM(Tk(0)),nM("design:type",Number)],FG.prototype,"left",void 0);var GG=Object.freeze({__proto__:null,extent:lM,normalisedExtent:cM,normalisedExtentWithMetadata:uM,toFixed:XM,isNumberEqual:KM,tickFormat:NL,interpolateString:LF,ticks:LL,tickStep:FL,range:BL,Color:ZM,isString:vI,isStringObject:yI,isDate:mI,isDiscrete:CI,isContinuous:bI,checkDatum:wI,isNumber:SI,resetIds:dN,createId:pN,Padding:FG,jsonDiff:RM,DELETE:AM,jsonMerge:PM,jsonApply:MM,jsonWalk:kM,normalizeAngle360:FM,normalizeAngle360Inclusive:GM,normalizeAngle180:VM,toRadians:BM,toDegrees:jM,angleBetween:HM,zipObject:HN,clamp:zM,isEqual:KM,isNegative:YM,round:qM,mod:$M,sanitizeHtml:gI,Logger:gM});function VG(e,t){return e.length===t.length&&e.every(((e,i)=>Number(e)===Number(t[i])))}function BG(e,t,i,n,o){let r=e.x;e.x<t?r=t:e.x>t+n&&(r=t+n);let s=e.y;e.y<i?s=i:e.y>i+o&&(s=i+o);const a=e.x-r,l=e.y-s,c=Math.sqrt(a*a+l*l);return c<=.5*e.size}function jG(e,t,i,n,o){const r=e.x+e.width>t&&e.x<t+n,s=e.y+e.height>i&&e.y<i+o;return r&&s}function HG(e,t,i,n,o){return t+n<e.x+e.width&&t>e.x&&i>e.y&&i+o<e.y+e.height}function WG(e){return null!=e&&"object"===typeof e.point&&"object"===typeof e.label}function UG(e,t,i=5){const n=[];e=e.map((e=>e.slice().sort(((e,t)=>t.point.size-e.point.size))));for(let o=0;o<e.length;o++){const r=n[o]=[],s=e[o];if((null===s||void 0===s?void 0:s.length)&&s[0].label)for(let o=0,a=s.length;o<a;o++){const a=s[o],l=a.label,c=.5*a.point.size,u=a.point.x-.5*l.width,d=a.point.y-c-l.height-i,{width:p,height:h}=l,f=!t||HG(t,u,d,p,h);if(!f)continue;const g=e.some((e=>e.some((e=>BG(e.point,u,d,p,h)))));if(g)continue;const v=n.some((e=>e.some((e=>jG(e,u,d,p,h)))));v||r.push({index:o,text:l.text,x:u,y:d,width:p,height:h,datum:a})}}return n}function zG(e,t){const i=[];for(let n=0;n<e.length;n++){const o=e[n],{point:{x:r,y:s},label:{text:a}}=o;let{label:{width:l,height:c}}=o;l+=null!==t&&void 0!==t?t:0,c+=null!==t&&void 0!==t?t:0;const u=i.some((e=>jG(e,r,s,l,c)));if(u)return!0;
18i.push({index:n,text:a,x:r,y:s,width:l,height:c,datum:o})}return!1}const KG=["stroke","lineDash"],YG=ek(ik(void 0,(e=>{for(const t in e)if(!KG.includes(t))return!1;return!0})),"expecting an Array of objects with gridline style properties such as 'stroke' and 'lineDash'");class qG{constructor(){this.enabled=!0,this.width=1,this.style=[{stroke:void 0,lineDash:[]}]}}function XG(e,t=[void 0]){return xM(((i,n,o)=>t.includes(o)?e:o))}iM([JM(dk),nM("design:type",Object)],qG.prototype,"enabled",void 0),iM([JM(Tk(0)),nM("design:type",Number)],qG.prototype,"width",void 0),iM([JM(YG),nM("design:type",Array)],qG.prototype,"style",void 0);class $G{constructor(){this.enabled=!0,this.autoWrap=!1,this.maxWidth=void 0,this.maxHeight=void 0,this.fontStyle=void 0,this.fontWeight=void 0,this.fontSize=12,this.fontFamily="Verdana, sans-serif",this.padding=5,this.minSpacing=NaN,this.color="rgba(87, 87, 87, 1)",this.rotation=void 0,this.avoidCollisions=!0,this.mirrored=!1,this.parallel=!1,this.formatter=void 0}getSideFlag(){return this.mirrored?1:-1}getFont(){return MN(this)}}iM([JM(dk),nM("design:type",Object)],$G.prototype,"enabled",void 0),iM([JM(pk),nM("design:type",Boolean)],$G.prototype,"autoWrap",void 0),iM([JM(Dk(0)),nM("design:type",Number)],$G.prototype,"maxWidth",void 0),iM([JM(Dk(0)),nM("design:type",Number)],$G.prototype,"maxHeight",void 0),iM([JM(Ik),nM("design:type",String)],$G.prototype,"fontStyle",void 0),iM([JM(Gk),nM("design:type",String)],$G.prototype,"fontWeight",void 0),iM([JM(Tk(1)),nM("design:type",Number)],$G.prototype,"fontSize",void 0),iM([JM(hk),nM("design:type",String)],$G.prototype,"fontFamily",void 0),iM([JM(Tk(0)),nM("design:type",Number)],$G.prototype,"padding",void 0),iM([JM(Rk()),XG(NaN),nM("design:type",Number)],$G.prototype,"minSpacing",void 0),iM([JM(Sk),nM("design:type",String)],$G.prototype,"color",void 0),iM([JM(Dk(-360,360)),nM("design:type",Number)],$G.prototype,"rotation",void 0),iM([JM(dk),nM("design:type",Boolean)],$G.prototype,"avoidCollisions",void 0),iM([JM(dk),nM("design:type",Boolean)],$G.prototype,"mirrored",void 0),iM([JM(dk),nM("design:type",Boolean)],$G.prototype,"parallel",void 0),iM([JM(fk),nM("design:type",String)],$G.prototype,"format",void 0);class ZG{constructor(){this.enabled=!0,this.width=1,this.color=void 0}}iM([JM(dk),nM("design:type",Object)],ZG.prototype,"enabled",void 0),iM([JM(Tk(0)),nM("design:type",Number)],ZG.prototype,"width",void 0),iM([JM(Sk),nM("design:type",String)],ZG.prototype,"color",void 0);const JG=ek(((e,t)=>tk(e,t,((e,t)=>0!==e&&Tk(0)(e,t)||e instanceof uP))),"expecting an optional non-zero positive Number value or, for a time axis, a Time Interval such as 'agCharts.time.month'");class QG{constructor(){this.enabled=!0,this.width=1,this.size=6,this.color=void 0,this.interval=void 0,this.values=void 0,this.minSpacing=NaN}}function eV(e){const t=Math.min(...e.range),i=Math.max(...e.range),n=Math.floor(t),o=Math.ceil(i),r=n!==o;return{min:n,max:o,visible:r}}iM([JM(dk),nM("design:type",Object)],QG.prototype,"enabled",void 0),iM([JM(Tk(0)),nM("design:type",Number)],QG.prototype,"width",void 0),iM([JM(Tk(0)),nM("design:type",Number)],QG.prototype,"size",void 0),iM([JM(Sk),nM("design:type",String)],QG.prototype,"color",void 0),iM([JM(JG),nM("design:type",Object)],QG.prototype,"interval",void 0),iM([JM(nk()),nM("design:type",Array)],QG.prototype,"values",void 0),iM([JM(ok(Rk(1),ak("maxSpacing"))),XG(NaN),nM("design:type",Number)],QG.prototype,"minSpacing",void 0);const tV=2*Math.PI,iV=tV/2;function nV(e,t){const i=Math.abs(t-e);return i<iV?t:e>t?t+tV:t-tV}function oV(e){const t=t=>{var i,n;const o=Math.min(...null!==(i=t.range)&&void 0!==i?i:[e.min]),r=Math.max(...null!==(n=t.range)&&void 0!==n?n:[e.max]),s=Math.round(t.translationY);return s<o||s>r},i=(e,i,n)=>"removed"!==n&&t(e)?"removed":"added"!==n&&t(i)?"added":n,n=(e,t,n)=>{const o={translationY:Math.round(e.translationY),opacity:e.opacity};return n=i(t,e.datum,n),"added"===n&&(o.translationY=Math.round(t.translationY),o.opacity=0),Object.assign(Object.assign({},o),cL[n])},o=(e,t,i)=>{const n={translationY:Math.round(t.translationY),opacity:1};return"removed"===i&&(n.opacity=0),n},r={fromFn:n,toFn:o,intermediateFn:(e,i,n)=>({visible:!t(e)})},s={fromFn:(e,t,i)=>{var o;const r=null!==(o=e.previousDatum)&&void 0!==o?o:t;let s=r.rotation;return"added"!==i&&"removed"!==i||(s=t.rotation),Object.assign(Object.assign({},n(e,t,i)),{x:r.x,y:r.y,rotation:s,rotationCenterX:r.rotationCenterX})},toFn:(e,t,i)=>{var n,r;let s;return s="added"===i||"removed"===i?t.rotation:nV(null!==(r=null===(n=e.previousDatum)||void 0===n?void 0:n.rotation)&&void 0!==r?r:t.rotation,t.rotation),Object.assign(Object.assign({},o(e,t,i)),{x:t.x,y:t.y,rotation:s,rotationCenterX:t.rotationCenterX,finish:{rotation:t.rotation}})}},a={fromFn:(e,t)=>{var i,n;return Object.assign(Object.assign({},null!==(n=null!==(i=e.previousDatum)&&void 0!==i?i:t)&&void 0!==n?n:{y:e.y,x1:e.x1,x2:e.x2}),cL["updated"])},toFn:(e,t)=>Object.assign({},t)},l={fromFn:(e,t)=>{const{rotation:i,translationX:n,translationY:o}=e;return Object.assign({rotation:i,translationX:n,translationY:o},cL["updated"])},toFn:(e,t)=>{const{rotation:i,translationX:n,translationY:o}=t;return{rotation:i,translationX:n,translationY:o}}};return{tick:r,line:a,label:s,group:l}}function rV(){return(e,t)=>({rotation:t.rotation,rotationCenterX:t.rotationCenterX,rotationCenterY:t.rotationCenterY,translationX:t.translationX,translationY:t.translationY})}function sV(e){const{visible:t,min:i,max:n}=e;return(e,o)=>{const r=Math.round(o.translationY),s=t&&r>=i&&r<=n;return{translationY:r,opacity:1,visible:s}}}function aV(){return(e,t)=>({x:t.x,y:t.y,translationY:t.translationY,rotation:t.rotation,rotationCenterX:t.rotationCenterX})}function lV(){return(e,t)=>Object.assign({},t)}var cV,uV,dV;(function(e){e[e["TickLine"]=0]="TickLine",e[e["TickLabel"]=1]="TickLabel",e[e["GridLine"]=2]="GridLine",e[e["GridArc"]=3]="GridArc",e[e["AxisLine"]=4]="AxisLine"})(cV||(cV={})),function(e){e[e["CREATE"]=0]="CREATE",e[e["CREATE_SECONDARY"]=1]="CREATE_SECONDARY",e[e["FILTER"]=2]="FILTER",e[e["VALUES"]=3]="VALUES"}(uV||(uV={}));class pV{get type(){var e;return null!==(e=this.constructor.type)&&void 0!==e?e:""}set crossLines(e){var t,i;null===(t=this._crossLines)||void 0===t||t.forEach((e=>this.detachCrossLine(e))),e&&this.assignCrossLineArrayConstructor(e),this._crossLines=e,null===(i=this._crossLines)||void 0===i||i.forEac
18h((e=>{this.attachCrossLine(e),this.initCrossLine(e)}))}get crossLines(){return this._crossLines}constructor(e,t){let i;this.moduleCtx=e,this.scale=t,this.id=pN(this),this.nice=!0,this.dataDomain={domain:[],clipped:!1},this.keys=[],this.boundSeries=[],this.includeInvisibleDomains=!1,this.axisGroup=new zL({name:`${this.id}-axis`,zIndex:WI.AXIS_ZINDEX}),this.lineNode=this.axisGroup.appendChild(new YL),this.tickLineGroup=this.axisGroup.appendChild(new zL({name:`${this.id}-Axis-tick-lines`,zIndex:WI.AXIS_ZINDEX})),this.tickLabelGroup=this.axisGroup.appendChild(new zL({name:`${this.id}-Axis-tick-labels`,zIndex:WI.AXIS_ZINDEX})),this.crossLineGroup=new zL({name:`${this.id}-CrossLines`}),this.gridGroup=new zL({name:`${this.id}-Axis-grid`}),this.gridLineGroup=this.gridGroup.appendChild(new zL({name:`${this.id}-gridLines`,zIndex:WI.AXIS_GRID_ZINDEX})),this.tickLineGroupSelection=KL.select(this.tickLineGroup,YL,!1),this.tickLabelGroupSelection=KL.select(this.tickLabelGroup,_N,!1),this.gridLineGroupSelection=KL.select(this.gridLineGroup,YL,!1),this.line=new ZG,this.tick=this.createTick(),this.gridLine=new qG,this.label=this.createLabel(),this.defaultTickMinSpacing=pV.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=void 0,this._titleCaption=new BN,this._gridLength=0,this.fractionDigits=0,this.gridPadding=0,this.seriesAreaPadding=0,this.tickGenerationResult=void 0,this.maxThickness=1/0,this.moduleMap=new qI(this),this.refreshScale(),this._titleCaption.node.rotation=-Math.PI/2,this.axisGroup.appendChild(this._titleCaption.node),this.destroyFns.push(e.interactionManager.addListener("hover",(e=>this.checkAxisHover(e)))),this.animationManager=e.animationManager,this.animationState=new JF("empty",{empty:{update:{target:"ready",action:()=>this.resetSelectionNodes()}},ready:{update:e=>this.animateReadyUpdate(e),resize:()=>this.resetSelectionNodes()}}),this._crossLines=[],this.assignCrossLineArrayConstructor(this._crossLines),this.destroyFns.push(e.layoutService.addListener("layout-complete",(e=>{null!=i&&null!=RM(e.chart,i)&&this.animationState.transition("resize"),i=Object.assign({},e.chart)}))),this.destroyFns.push(e.updateService.addListener("update-complete",(e=>{this.minRect=e.minRect})))}attachCrossLine(e){this.crossLineGroup.appendChild(e.group)}detachCrossLine(e){this.crossLineGroup.removeChild(e.group)}destroy(){this.moduleMap.destroy(),this.destroyFns.forEach((e=>e()))}refreshScale(){var e;this.range=this.scale.range.slice(),null===(e=this.crossLines)||void 0===e||e.forEach((e=>{this.initCrossLine(e)}))}updateRange(){var e;const{range:t,visibleRange:i,scale:n}=this,o=(t[1]-t[0])/(i[1]-i[0]),r=o*i[0],s=t[0]-r;n.range=[s,s+o],null===(e=this.crossLines)||void 0===e||e.forEach((e=>{e.clippedRange=[t[0],t[1]]}))}setCrossLinesVisible(e){this.crossLineGroup.visible=e}attachAxis(e,t){t.appendChild(this.gridGroup),e.appendChild(this.axisGroup),e.appendChild(this.crossLineGroup)}detachAxis(e,t){t.removeChild(this.gridGroup),e.removeChild(this.axisGroup),e.removeChild(this.crossLineGroup)}inRange(e,t=0,i=0){const n=Math.min(...this.range),o=Math.max(...this.range);return e+t>=n-i&&e<=o+i}onLabelFormatChange(e,t){const{scale:i,fractionDigits:n}=this,o=i instanceof MG,r=!o&&n>0?e=>"number"===typeof e?e.toFixed(n):String(e):e=>String(e);if(t&&i&&i.tickFormat)try{this.labelFormatter=i.tickFormat({ticks:e,specifier:t})}catch(s){this.labelFormatter=r,gM.warnOnce(`the axis label format string ${t} is invalid. No formatting will be applied`)}else this.labelFormatter=r}setDomain(){var e;const{scale:t,dataDomain:{domain:i},tick:{values:n}}=this;if(n&&jL.is(t)){const[o,r]=null!==(e=lM(n))&&void 0!==e?e:[1/0,-1/0],s=Math.min(t.fromDomain(i[0]),o),a=Math.max(t.fromDomain(i[1]),r);t.domain=[t.toDomain(s),t.toDomain(a)]}else t.domain=i}setTickInterval(e){var t;this.scale.interval=null!==(t=this.tick.interval)&&void 0!==t?t:e}setTickCount(e,t,i){const{scale:n}=this;if(e&&jL.is(n))return"number"===typeof e?(n.tickCount=e,n.minTickCount=null!==t&&void 0!==t?t:0,void(n.maxTickCount=null!==i&&void 0!==i?i:1/0)):void(n instanceof IG&&this.setTickInterval(e))}set gridLength(e){var t;(this._gridLength&&!e||!this._gridLength&&e)&&this.gridLineGroupSelection.clear(),this._gridLength=e,null===(t=this.crossLines)||void 0===t||t.forEach((e=>{this.initCrossLine(e)}))}get gridLength(){return this._gridLength}createTick(){return new QG}createLabel(){return new $G}checkAxisHover(e){const t=this.computeBBox(),i=t.containsPoint(e.offsetX,e.offsetY);i&&this.moduleCtx.chartEventManager.axisHover(this.id,this.direction)}update(e){if(!this.tickGenerationResult)return;const{rotation:t,parallelFlipRotation:i,regularFlipRotation:n}=this.calculateRotations(),o=this.label.getSideFlag();this.updatePosition();const r=this.getAxisLineCoordinates(),s=this.tickGenerationResult,{tickData:a,combinedRotation:l,textBaseline:c,textAlign:u}=s,d=tM(s,["tickData","combinedRotation","textBaseline","textAlign"]),p=this.tickLabelGroupSelection.nodes().map((e=>e.datum.tickId));if(this.updateSelections(r,a.ticks,{combinedRotation:l,textAlign:u,textBaseline:c,range:this.scale.range}),this.animationManager.isSkipped())this.resetSelectionNodes();else{const e=this.calculateUpdateDiff(p,a);this.animationState.transition("update",e)}return this.updateAxisLine(),this.updateLabels(),this.updateVisibility(),this.updateGridLines(o),this.updateTickLine
18s(),this.updateTitle({anyTickVisible:a.ticks.length>0}),this.updateCrossLines({rotation:t,parallelFlipRotation:i,regularFlipRotation:n}),this.updateLayoutState(),e=d.primaryTickCount,e}getAxisLineCoordinates(){const{range:[e,t]}=this,i=0,n=Math.min(e,t),o=Math.max(e,t);return{x:i,y1:n,y2:o}}getTickLineCoordinates(e){const{tick:t,label:i}=this,n=i.getSideFlag(),o=n*t.size,r=Math.min(0,o),s=r+Math.abs(o),a=Math.round(e.translationY);return{x1:r,x2:s,y:a}}getTickLabelProps(e,t){const{label:i}=this,{combinedRotation:n,textBaseline:o,textAlign:r,range:s}=t,a=e.tickLabel,l=i.getSideFlag(),c=this.tick.size,u=l*(c+i.padding+this.seriesAreaPadding),d=""!==a&&void 0!=a;return{tickId:e.tickId,translationY:e.translationY,fill:i.color,fontFamily:i.fontFamily,fontSize:i.fontSize,fontStyle:i.fontStyle,fontWeight:i.fontWeight,rotation:n,rotationCenterX:u,text:a,textAlign:r,textBaseline:o,visible:d,x:u,y:0,range:s}}setTitleProps(e,t){var i;const{title:n}=this;if(n){if(e.color=n.color,e.fontFamily=n.fontFamily,e.fontSize=n.fontSize,e.fontStyle=n.fontStyle,e.fontWeight=n.fontWeight,e.enabled=n.enabled,e.wrapping=n.wrapping,n.enabled){const o=e.node,{tickSpace:r}=t,s=(null!==(i=n.spacing)&&void 0!==i?i:0)+r,a=this.label.getSideFlag(),l=FM(this.rotation),c=-1===a&&l>Math.PI&&l<2*Math.PI?-1:1,u=c*a*Math.PI/2,d=1===c?"bottom":"top",{range:p}=this,h=Math.floor(c*a*(p[0]+p[1])/2),f=-1===a?Math.floor(c*-s):Math.floor(-s),{callbackCache:g}=this.moduleCtx,{formatter:v=(e=>e.defaultValue)}=n,y=g.call(v,this.getTitleFormatterParams());o.setProperties({rotation:u,text:y,textBaseline:d,visible:!0,x:h,y:f})}}else e.enabled=!1}calculateLayout(e){var t;const{rotation:i,parallelFlipRotation:n,regularFlipRotation:o}=this.calculateRotations(),r=this.label.getSideFlag(),s=r*(this.tick.size+this.label.padding+this.seriesAreaPadding);this.updateScale(),this.tickGenerationResult=this.generateTicks({primaryTickCount:e,parallelFlipRotation:n,regularFlipRotation:o,labelX:s,sideFlag:r});const a=this.tickGenerationResult,{tickData:l,combinedRotation:c,textBaseline:u,textAlign:d}=a,p=tM(a,["tickData","combinedRotation","textBaseline","textAlign"]),h=[],{x:f,y1:g,y2:v}=this.getAxisLineCoordinates(),y=new gN(f,g,0,v-g);h.push(y);const{tick:m}=this;m.enabled&&l.ticks.forEach((e=>{const{x1:t,x2:i,y:n}=this.getTickLineCoordinates(e),o=new gN(t,n,i-t,0);h.push(o)}));const{label:C}=this;if(C.enabled){const e=new _N;l.ticks.forEach((t=>{const i=this.getTickLabelProps(t,{combinedRotation:c,textAlign:d,textBaseline:u,range:this.scale.range});if(!i.visible)return;e.setProperties(Object.assign(Object.assign({},i),{translationY:Math.round(t.translationY)}));const n=e.computeTransformedBBox();n&&h.push(n)}))}const b=e=>{const t=new vN,{rotation:i,translationX:n,translationY:o,rotationCenterX:r,rotationCenterY:s}=this.getAxisTransform();return vN.updateTransformMatrix(t,1,1,i,n,o,{scalingCenterX:0,scalingCenterY:0,rotationCenterX:r,rotationCenterY:s}),t.transformBBox(e)},{title:w}=this;if(null===w||void 0===w?void 0:w.enabled){const e=new BN;let t=0;if(l.ticks.length>0){const e=gN.merge(h),i=e.width;isFinite(i)&&(t+=i)}this.setTitleProps(e,{tickSpace:t});const i=e.node,n=i.computeTransformedBBox();n&&h.push(n)}const S=gN.merge(h),E=b(S),x=this.isAnySeriesActive();return null===(t=this.crossLines)||void 0===t||t.forEach((e=>{var t;e.sideFlag=-r,e.direction=i===-Math.PI/2?iN.X:iN.Y,e instanceof _G&&(e.label.parallel=null!==(t=e.label.parallel)&&void 0!==t?t:this.label.parallel),e.parallelFlipRotation=n,e.regularFlipRotation=o,e.calculateLayout(x)})),this.updateLayoutState(),e=p.primaryTickCount,{primaryTickCount:e,bbox:E}}updateLayoutState(){this.layout.label={fractionDigits:this.fractionDigits,padding:this.label.padding,format:this.label.format}}updateScale(){this.updateRange(),this.calculateDomain(),this.setDomain(),this.setTickInterval(this.tick.interval);const{scale:e,nice:t}=this;jL.is(e)&&(e.nice=t,e.update())}calculateRotations(){const e=BM(this.rotation),t=FM(e),i=FM(e-Math.PI/2);return{rotation:e,parallelFlipRotation:t,regularFlipRotation:i}}generateTicks({primaryTickCount:e,parallelFlipRotation:t,regularFlipRotation:i,labelX:n,sideFlag:o}){var r;const{scale:s,tick:a,label:{parallel:l,rotation:c,fontFamily:u,fontSize:d,fontStyle:p,fontWeight:h}}=this,f=void 0!==e,{defaultRotation:g,configuredRotation:v,parallelFlipFlag:y,regularFlipFlag:m}=GI({rotation:c,parallel:l,regularFlipRotation:i,parallelFlipRotation:t}),C=v+g,b=new vN,{maxTickCount:w}
18=this.estimateTickCount({minSpacing:a.minSpacing,maxSpacing:null!==(r=a.maxSpacing)&&void 0!==r?r:NaN}),S=jL.is(s),E=!S||isNaN(w)?10:w;let x=jI(l,v,0,o,m);const O=BI(l,v,o,y),T={fontFamily:u,fontSize:d,fontStyle:p,fontWeight:h,textBaseline:O,textAlign:x};let D={rawTicks:[],ticks:[],labelCount:0},R=0,A=0,_=!0,P=!1;while(_&&R<=E){if(P)break;A=0,x=jI(l,v,0,o,m);const t=this.getTickStrategies({secondaryAxis:f,index:R});for(const i of t){({tickData:D,index:R,autoRotation:A,terminate:P}=i({index:R,tickData:D,textProps:T,labelOverlap:_,terminate:P,primaryTickCount:e}));const t=0!==v||0!==A,r=C+A;x=jI(l,v,A,o,m),_=this.checkLabelOverlap(r,t,b,D.ticks,n,Object.assign(Object.assign({},T),{textAlign:x}))}}const M=g+v+A;return!f&&D.rawTicks.length>0&&(e=D.rawTicks.length),{tickData:D,primaryTickCount:e,combinedRotation:M,textBaseline:O,textAlign:x}}getTickStrategies({index:e,secondaryAxis:t}){const{scale:i,label:n,tick:o}=this,r=jL.is(i),s=n.enabled&&n.avoidCollisions,a=!r&&0!==e&&s,l=!0===n.autoRotate&&void 0===n.rotation,c=[];let u;u=this.tick.values?uV.VALUES:t?uV.CREATE_SECONDARY:a?uV.FILTER:uV.CREATE;const d=({index:e,tickData:t,primaryTickCount:i,terminate:n})=>this.createTickData(u,e,t,n,i);if(c.push(d),!r&&!isNaN(o.minSpacing)){const e=({index:e,tickData:t,primaryTickCount:i,terminate:n})=>this.createTickData(uV.FILTER,e,t,n,i);c.push(e)}if(!s)return c;if(n.autoWrap){const e=({index:e,tickData:t,textProps:i})=>this.wrapLabels(t,e,i);c.push(e)}else if(l){const e=({index:e,tickData:t,labelOverlap:i,terminate:n})=>({index:e,tickData:t,autoRotation:this.getAutoRotation(i),terminate:n});c.push(e)}return c}createTickData(e,t,i,n,o){var r;const{scale:s,tick:a}=this,{maxTickCount:l,minTickCount:c,defaultTickCount:u}=this.estimateTickCount({minSpacing:a.minSpacing,maxSpacing:null!==(r=a.maxSpacing)&&void 0!==r?r:NaN}),d=jL.is(s),p=!d||isNaN(l)?10:l;let h=d?Math.max(u-t,c):l;const f=void 0===a.interval&&void 0===a.values&&h>c&&(d||e===uV.FILTER);let g=!0;while(g&&t<=p){const n=i.rawTicks;h=d?Math.max(u-t,c):l;const{rawTicks:r,ticks:s,labelCount:a}=this.getTicks({tickGenerationType:e,previousTicks:n,tickCount:h,minTickCount:c,maxTickCount:l,primaryTickCount:o});i.rawTicks=r,i.ticks=s,i.labelCount=a,g=!!f&&VG(r,n),t++}const v=void 0!==a.interval||void 0!==a.values;return n||(n=v),{tickData:i,index:t,autoRotation:0,terminate:n}}checkLabelOverlap(e,t,i,n,o,r){vN.updateTransformMatrix(i,1,1,e,0,0);const s=this.createLabelData(n,o,r,i),a=VI(this.label.minSpacing,t);return zG(s,a)}createLabelData(e,t,i,n){const o=[];for(const r of e){const{tickLabel:e,translationY:s}=r;if(""===e||void 0==e)continue;const a=FN(e),{width:l,height:c}=kN(a,t,s,i),u=new gN(t,s,l,c),d=HI(e,u,t,s,n);o.push(d)}return o}getAutoRotation(e){var t;return e?FM(BM(null!==(t=this.label.autoRotateAngle)&&void 0!==t?t:0)):0}getTicks({tickGenerationType:e,previousTicks:t,tickCount:i,minTickCount:n,maxTickCount:o,primaryTickCount:r}){var s;const{range:a,scale:l,visibleRange:c}=this;let u=[];switch(e){case uV.VALUES:u=this.tick.values;break;case uV.CREATE_SECONDARY:u=this.updateSecondaryAxisTicks(r);break;case uV.FILTER:u=this.filterTicks(t,i);break;default:u=this.createTicks(i,n,o);break}this.onLabelFormatChange(u,this.label.format),this.fractionDigits=u.fractionDigits>=0?u.fractionDigits:0;const d=(null!==(s=l.bandwidth)&&void 0!==s?s:0)/2,p=[];let h=0;const f=new Map,g=Math.max(0,Math.floor(c[0]*u.length)),v=Math.min(u.length,Math.ceil(c[1]*u.length));for(let y=g;y<v;y++){const e=u[y],t=l.convert(e)+d;if(a.length>0&&!this.inRange(t,0,.001))continue;const i=this.formatTick(e,y);let n=i;if(f.has(n)){const e=f.get(n);f.set(n,e+1),n=`${n}_${e}`}else f.set(n,1);p.push({tick:e,tickId:n,tickLabel:i,translationY:t}),""!==i&&void 0!=i&&h++}return{rawTicks:u,ticks:p,labelCount:h}}filterTicks(e,t){var i;const n=!isNaN(this.tick.minSpacing)||!isNaN(null!==(i=this.tick.maxSpacing)&&void 0!==i?i:NaN),o=n?Math.ceil(e.length/t):2;return e.filter(((e,t)=>t%o===0))}createTicks(e,t,i){var n,o,r;return this.setTickCount(e,t,i),null!==(r=null===(o=(n=this.scale).ticks)||void 0===o?void 0:o.call(n))&&void 0!==r?r:[]}estimateTickCount({minSpacing:e,maxSpacing:t}){const{minRect:i}=this,n=this.calculateRangeWithBleed(),o=Math.max(this.defaultTickMinSpacing,n/jL.defaultMaxTickCount);let r=!isNaN(t);
18isNaN(e)&&(e=o),isNaN(t)&&(t=n),e>t&&(e===o?e=t:t=e);const s=i?this.direction===iN.X?i.width:i.height:1;r&&(r=s<o);const a=zM(1,Math.floor(n/e),r?Math.floor(n/s):1/0),l=Math.min(a,Math.ceil(n/t)),c=zM(l,jL.defaultTickCount,a);return{minTickCount:l,maxTickCount:a,defaultTickCount:c}}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}){var n;const o=this.label.getSideFlag(),r=this.isAnySeriesActive();null===(n=this.crossLines)||void 0===n||n.forEach((n=>{var s;n.sideFlag=-o,n.direction=e===-Math.PI/2?iN.X:iN.Y,n instanceof _G&&(n.label.parallel=null!==(s=n.label.parallel)&&void 0!==s?s:this.label.parallel),n.parallelFlipRotation=t,n.regularFlipRotation=i,n.update(r)}))}updateTickLines(){const{tick:e,label:t}=this,i=t.getSideFlag();this.tickLineGroupSelection.each((t=>{t.strokeWidth=e.width,t.stroke=e.color,t.x1=i*e.size,t.x2=0,t.y1=0,t.y2=0}))}calculateAvailableRange(){const{range:e}=this,t=Math.min(...e),i=Math.max(...e);return i-t}calculateRangeWithBleed(){const{visibleRange:e}=this,t=1/(e[1]-e[0]);return qM(this.calculateAvailableRange()*t,2)}calculateDomain(){if(this.linkedTo)this.dataDomain=this.linkedTo.dataDomain;else{const e=this.boundSeries.filter((e=>this.includeInvisibleDomains||e.isEnabled())),t=e.flatMap((e=>e.getDomain(this.direction)));this.dataDomain=this.normaliseDataDomain(t)}}getAxisTransform(){return{rotation:BM(this.rotation),rotationCenterX:0,rotationCenterY:0,translationX:this.translation.x,translationY:this.translation.y}}updatePosition(){const{crossLineGroup:e,axisGroup:t,gridGroup:i,translation:n,gridLineGroupSelection:o,gridPadding:r,gridLength:s}=this,{rotation:a}=this.calculateRotations(),l=this.label.getSideFlag(),c=Math.floor(n.x),u=Math.floor(n.y);e.setProperties({rotation:a,translationX:c,translationY:u}),t.datum=this.getAxisTransform(),i.setProperties({rotation:a,translationX:c,translationY:u}),o.each((e=>{e.x1=r,e.x2=-l*s+r,e.y=0}))}updateSecondaryAxisTicks(e){throw new 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 YL({tag:cV.GridLine}))),(e=>e.tickId)),this.tickLineGroupSelection.update(t,(e=>e.appendChild(new YL({tag:cV.TickLine}))),(e=>e.tickId)),this.tickLabelGroupSelection.update(t.map((e=>this.getTickLabelProps(e,i))),(e=>e.appendChild(new _N({tag:cV.TickLabel}))),(e=>e.tickId))}updateAxisLine(){const{line:e}=this,t=e.enabled?e.width:0;this.lineNode.setProperties({stroke:e.color,strokeWidth:t})}updateGridLines(e){const{gridLine:{style:t,width:i},gridPadding:n,gridLength:o}=this;0!==o&&0!==t.length&&this.gridLineGroupSelection.each(((r,s,a)=>{const{stroke:l,lineDash:c}=t[a%t.length];r.setProperties({x1:n,x2:-e*o+n,y:0,fill:void 0,stroke:l,strokeWidth:i,lineDash:c})}))}updateLabels(){const{label:e}=this;e.enabled&&this.tickLabelGroupSelection.each(((e,t)=>{e.setProperties(t,["fill","fontFamily","fontSize","fontStyle","fontWeight","text","textAlign","textBaseline"])}))}wrapLabels(e,t,i){const{parallel:n,maxWidth:o,maxHeight:r}=this.label;let s=this.maxThickness,a=Math.round(this.calculateAvailableRange()/e.labelCount);return n&&([s,a]=[a,s]),e.ticks.forEach((e=>{e.tickLabel=_N.wrap(e.tickLabel,null!==o&&void 0!==o?o:s,null!==r&&void 0!==r?r:a,i,"hyphenate")})),{tickData:e,index:t,autoRotation:0,terminate:!0}}updateTitle(e){const{rotation:t,title:i,_titleCaption:n,lineNode:o,tickLineGroup:r,tickLabelGroup:s}=this;if(!i)return void(n.enabled=!1);let a=0;const{anyTickVisible:l}=e;if(i.enabled&&l){const e=zL.computeBBox([r,s,o]),i=0===t?e.width:e.height;Math.abs(i)<1/0&&(a+=i)}this.setTitleProps(n,{tickSpace:a})}formatTick(e,t){var i,n;const{label:o,labelFormatter:r,fractionDigits:s,moduleCtx:{callbackCache:a}}=this;if(o.formatter){const n=s>0?e:String(e);return null!==(i=a.call(o.formatter,{value:n,index:t,fractionDigits:s,formatter:r}))&&void 0!==i?i:n}return r&&null!==(n=a.call(r,e))&&void 0!==n?n:String(e)}formatDatum(e){return String(e)}computeBBox(){return this.axisGroup.computeBBox()}initCrossLine(e){e.scale=this.scale,e.gridLength=this.gridLength}isAnySeriesActive(){return this.boundSeries.some((e=>this.includeInvisibleDomains||e.isEnabled()))}clipTickLines(e,t,i,n){this.tickLineGroup.setClipRectInGroupCoordinateSpace(new gN(e,t,i,n))}clipGrid(e,t,i,n){this.gridGroup.setClipRectInGroupCoordinateSpace(new gN(e,t,i,n))}calculatePadding(e,t){return[Math.abs(.01*e),Math.abs(.01*e)]}getTitleFormatterParams(){var e;const t=this.boundSeries.reduce(((e,t)=>{const i=t.getKeys(this.direction),n=t.getNames(this.direction);for(let o=0;o<i.length;
18o++)e.push({key:i[o],name:n[o]});return e}),[]);return{direction:this.direction,boundSeries:t,defaultValue:null===(e=this.title)||void 0===e?void 0:e.text}}normaliseDataDomain(e){return{domain:e,clipped:!1}}getLayoutState(){return Object.assign({rect:this.computeBBox(),gridPadding:this.gridPadding,seriesAreaPadding:this.seriesAreaPadding,tickSize:this.tick.size},this.layout)}getModuleMap(){return this.moduleMap}createModuleContext(){var e;return null!==(e=this.axisContext)&&void 0!==e||(this.axisContext=this.createAxisContext()),Object.assign(Object.assign({},this.moduleCtx),{parent:this.axisContext})}createAxisContext(){return{axisId:this.id,direction:this.direction,continuous:jL.is(this.scale),keys:()=>this.boundSeries.flatMap((e=>e.getKeys(this.direction))),scaleValueFormatter:e=>{var t,i;return null===(i=(t=this.scale).tickFormat)||void 0===i?void 0:i.call(t,{specifier:e})},scaleBandwidth:()=>{var e;return null!==(e=this.scale.bandwidth)&&void 0!==e?e:0},scaleConvert:e=>this.scale.convert(e),scaleInvert:e=>{var t,i;return null===(i=(t=this.scale).invert)||void 0===i?void 0:i.call(t,e)}}}animateReadyUpdate(e){const{animationManager:t}=this.moduleCtx,i=eV(this),n=oV(i);uL(this.id,"axis-group",t,[this.axisGroup],n.group),uL(this.id,"line",t,[this.lineNode],n.line),uL(this.id,"line-paths",t,[this.gridLineGroupSelection,this.tickLineGroupSelection],n.tick,((e,t)=>t.tickId),e),uL(this.id,"tick-labels",t,[this.tickLabelGroupSelection],n.label,((e,t)=>t.tickId),e)}resetSelectionNodes(){const{gridLineGroupSelection:e,tickLineGroupSelection:t,tickLabelGroupSelection:i,lineNode:n}=this,o=eV(this);XF([this.axisGroup],rV()),XF([e,t],sV(o)),XF([i],aV()),XF([n],lV())}calculateUpdateDiff(e,t){const i=new Set,n=new Set,o=Math.max(e.length,t.ticks.length);for(let r=0;r<o;r++){const o=t.ticks[r],s=e[r],a=null===o||void 0===o?void 0:o.tickId;s!==a&&(n.has(a)?n.delete(a):a&&i.add(a),i.has(s)?i.delete(s):s&&n.add(s))}return{changed:i.size>0||n.size>0,added:[...i.values()],removed:[...n.values()]}}}pV.defaultTickMinSpacing=50,iM([JM(dk),nM("design:type",Boolean)],pV.prototype,"nice",void 0),iM([JM(Pk),nM("design:type",Array)],pV.prototype,"keys",void 0);class hV extends $G{constructor(){super(...arguments),this.autoRotateAngle=335}}iM([JM(pk),nM("design:type",Boolean)],hV.prototype,"autoRotate",void 0),iM([JM(Tk(-360,360)),nM("design:type",Number)],hV.prototype,"autoRotateAngle",void 0);class fV extends pV{constructor(){super(...arguments),this.thickness=0,this.position="left"}get direction(){return["top","bottom"].includes(this.position)?iN.X:iN.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;break}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 Object.assign(Object.assign({},super.createAxisContext()),{position:this.position})}assignCrossLineArrayConstructor(e){uG(e,_G)}createLabel(){return new hV}}iM([JM(Tk(0)),nM("design:type",Number)],fV.prototype,"thickness",void 0),iM([JM(Kk),nM("design:type",String)],fV.prototype,"position",void 0);class gV extends fV{constructor(e){super(e,new UM),this._paddingOverrideEnabled=!1,this.groupPaddingInner=.1,this.includeInvisibleDomains=!0}set paddingInner(e){this._paddingOverrideEnabled=!0,this.scale.paddingInner=e}get paddingInner(){return this._paddingOverrideEnabled=!0,this.scale.paddingInner}set paddingOuter(e){this.scale.paddingOuter=e}get paddingOuter(){return this.scale.paddingOuter}normaliseDataDomain(e){const t=[],i=new Set;for(const n of e){const e=n instanceof Date?n.getTime():n;i.has(e)||(i.add(e),t.push(n))}return{domain:t,clipped:!1}}calculateDomain(){if(!this._paddingOverrideEnabled){const e=this.boundSeries.map((e=>{var t;return null===(t=e.getBandScalePadding)||void 0===t?void 0:t.call(e)})).filter((e=>null!=e));e.length>0&&(this.scale.paddingInner=Math.min(...e.map((e=>e.inner))),this.scale.paddingOuter=Math.max(...e.map((e=>e.outer))))}return super.calculateDomain()}}
18gV.className="CategoryAxis",gV.type="category",iM([JM(Tk(0,1)),nM("design:type",Number)],gV.prototype,"groupPaddingInner",void 0);class vV{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)):[]}}function yV(e,t=!0){const i=new vV;let n=0;return t&&e.forEach((e=>n=Math.max(n,e.labels.length))),e.forEach((e=>{if(t)while(e.labels.length<n)e.labels.unshift("");mV(i,e)})),i}function mV(e,t){const i=t.labels.slice().reverse(),n=i.length-1;i.forEach(((t,i)=>{const o=e.children,r=o.find((e=>e.label===t)),s=i!==n;if(r&&s)e=r;else{const i=new vV(t,e);i.number=o.length,o.push(i),s&&(e=i)}}))}function CV(e,t,i){const n=t.number-e.number,o=i/n;t.change-=o,t.shift+=i,e.change+=o,t.prelim+=i,t.mod+=i}function bV(e,t,i){return t.getSiblings().indexOf(e.ancestor)>=0?e.ancestor:i}function wV(e){const t=e.children;if(t){let e=0,i=0;for(let n=t.length-1;n>=0;n--){const o=t[n];o.prelim+=e,o.mod+=e,i+=o.change,e+=o.shift+i}}}function SV(e,t,i){const n=e.getLeftSibling();if(n){let o=e,r=e,s=n,a=r.getLeftmostSibling(),l=r.mod,c=o.mod,u=s.mod,d=a.mod;while(s.nextRight()&&r.nextLeft()){s=s.nextRight(),r=r.nextLeft(),a=a.nextLeft(),o=o.nextRight(),o.ancestor=e;const n=s.prelim+u-(r.prelim+l)+i;n>0&&(CV(bV(s,e,t),e,n),l+=n,c+=n),u+=s.mod,l+=r.mod,d+=a.mod,c+=o.mod}s.nextRight()&&!o.nextRight()?(o.thread=s.nextRight(),o.mod+=u-c):(r.nextLeft()&&!a.nextLeft()&&(a.thread=r.nextLeft(),a.mod+=l-d),t=e)}return t}function EV(e,t){const i=e.children;if(i.length){let n=i[0];i.forEach((e=>{EV(e,t),n=SV(e,n,t)})),wV(e);const o=(i[0].prelim+i[i.length-1].prelim)/2,r=e.getLeftSibling();r?(e.prelim=r.prelim+t,e.mod=e.prelim-o):e.prelim=o}else{const i=e.getLeftSibling();e.prelim=i?i.prelim+t:0}}class xV{constructor(){this.top=1/0,this.right=-1/0,this.bottom=-1/0,this.left=1/0}update(e,t){const{x:i,y:n}=t(e);i>this.right&&(this.right=i),i<this.left&&(this.left=i),n>this.bottom&&(this.bottom=n),n<this.top&&(this.top=n)}}function OV(e,t,i){e.x=e.prelim+t,e.y=e.depth,i.update(e),e.children.forEach((n=>OV(n,t+e.mod,i)))}function TV(e){const t=e.children;let i=0;t.forEach((e=>{TV(e),e.children.length?i+=e.leafCount:i++})),e.leafCount=i,t.length?(e.subtreeLeft=t[0].subtreeLeft,e.subtreeRight=t[e.children.length-1].subtreeRight,e.x=(e.subtreeLeft+e.subtreeRight)/2):(e.subtreeLeft=e.x,e.subtreeRight=e.x)}function DV(e){const t=new RV;return EV(e,1),OV(e,-e.prelim,t),TV(e),t}class RV{constructor(){this.dimensions=new xV,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,n=0,o=!1){const r=this.leafCount-1,s=this.depth,a=this.dimensions;let l=1,c=1;if(e>0&&r){const t=(a.right-a.left)/r,i=e/r;l=i/t,o&&(l=-l)}if(t>0&&s){const e=(a.bottom-a.top)/s,i=t/s;c=i/e}const u=new xV;this.nodes.forEach((e=>{e.screenX=e.x*l,e.screenY=e.y*c,u.update(e,(e=>({x:e.screenX,y:e.screenY})))}));const d=-u.left,p=-u.top;this.nodes.forEach((e=>{e.screenX+=d+i,e.screenY+=p+n}))}}class AV extends $G{constructor(){super(...arguments),this.grid=!1}}iM([JM(dk),nM("design:type",Boolean)],AV.prototype,"grid",void 0);class _V extends fV{constructor(e){super(e,new UM),this.tickScale=new UM,this.line=new ZG,this.label=new AV,this.labelColor="rgba(87, 87, 87, 1)",this.includeInvisibleDomains=!0;const{tickLineGroup:t,tickLabelGroup:i,gridLineGroup:n,tickScale:o,scale:r}=this;r.paddingOuter=.1,r.paddingInner=2*r.paddingOuter,this.range=r.range.slice(),this.refreshScale(),o.paddingInner=1,o.paddingOuter=0,this.gridLineSelection=KL.select(n,YL),this.axisLineSelection=KL.select(t,YL),this.separatorSelection=KL.select(t,YL),this.labelSelection=KL.select(i,_N)}updateRange(){const{range:e,visibleRange:t,scale:i}=this,n=(e[1]-e[0])/(t[1]-t[0]),o=n*t[0],r=e[0]-o;this.tickScale.range=i.range=[r,r+n],this.resizeTickTree()}resizeTickTree(){var e;const t=this.scale,i=t.domain.length?[t.convert(t.domain[0]),t.convert(t.domain[t.domain.length-1])]:t.range,n=this.tickTreeLayout,o=this.lineHeight;n&&n.resize(Math.abs(i[1]-i[0]),n.depth*o,(Math.min(i[0],i[1])||0)+(null!==(e=t.bandwidth)&&void 0!==e?e:0)/2,-n.depth*o,i[1]-i[0]<0)}get lineHeight(){return 1.5*this.label.fontSize}set gridLength(e){(this._gridLength&&!e||!this._gridLength&&e)&&(this.gridLineSelection.clear(),this.labelSelection.clear()),this._gridLength=e}get gridLength(){return this._gridLength}calculateDomain(){var e;const{direction:t}=this,i=[];let n;this.boundSeries.filter((e=>
18e.visible)).forEach((e=>{if(t===iN.X)if(void 0===n){const o=e.getDomain(t);i.push(o),n="number"===typeof o[0]}else n&&i.push(e.getDomain(t));else i.push(e.getDomain(t))}));const o=(new Array).concat(...i),r=null!==(e=lM(o))&&void 0!==e?e:o;this.dataDomain=this.normaliseDataDomain(r),this.scale.domain=this.dataDomain.domain}normaliseDataDomain(e){const t=e.filter(((e,t,i)=>i.indexOf(e)===t)),i=yV(t);this.tickTreeLayout=DV(i);const n=t.slice();return n.push(""),this.tickScale.domain=n,this.resizeTickTree(),{domain:t,clipped:!1}}update(){this.computedLayout&&(this.updatePosition(),this.updateTitleCaption(),this.updateCategoryLabels(),this.updateSeparators(),this.updateAxisLines(),this.updateCategoryGridLines(),this.resetSelectionNodes())}updateTitleCaption(){const{_titleCaption:e}=this;e.node.visible=!1}updateCategoryLabels(){if(!this.computedLayout)return;const{tickLabelLayout:e}=this.computedLayout,t=this.labelSelection.update(e);t.each(((e,t)=>{e.setProperties(t)}))}updateSeparators(){if(!this.computedLayout)return;const{separatorLayout:e}=this.computedLayout,{range:t}=this,i=1e-7,n=this.separatorSelection.update(e);n.each(((e,n)=>{e.x1=n.x1,e.x2=n.x2,e.y1=n.y,e.y2=n.y,e.visible=n.y>=t[0]-i&&n.y<=t[1]+i,e.stroke=this.tick.color,e.fill=void 0,e.strokeWidth=1}))}
18updateAxisLines(){if(!this.computedLayout)return;const{axisLineLayout:e}=this.computedLayout,t=this.axisLineSelection.update(e);t.each(((e,t)=>{e.setProperties(Object.assign(Object.assign({},t),{stroke:this.line.color,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.color}))}updateCategoryGridLines(){const{gridLength:e,gridLine:t,label:i,range:n,tickScale:o}=this,r=o.ticks(),s=i.getSideFlag(),a=this.gridLineSelection.update(e?r:[]);if(e){const{width:i,style:r}=t,l=r.length;a.each(((t,a,c)=>{const u=Math.round(o.convert(a));t.x1=0,t.x2=-s*e,t.y1=u,t.y2=u,t.visible=u>=n[0]&&u<=n[1];const{stroke:d,lineDash:p}=r[c%l];t.stroke=d,t.strokeWidth=i,t.lineDash=p,t.fill=void 0}))}}computeLayout(){this.updateDirection(),this.calculateDomain(),this.updateRange();const{scale:e,label:t,label:{parallel:i},moduleCtx:{callbackCache:n},range:o,title:r,title:{formatter:s=(e=>e.defaultValue)}={}}=this,a=e.range[0],l=e.range[1],c=Math.abs(l-a),u=c/e.domain.length||0,d=BM(this.rotation),p=Math.abs(Math.cos(d))<1e-8,h=t.getSideFlag(),f=this.lineHeight,g=this.tickTreeLayout,v=e.ticks(),y=g?g.nodes:[],m=!!g&&g.depth>1,{defaultRotation:C,configuredRotation:b,parallelFlipFlag:w}=GI({rotation:t.rotation,parallel:i,regularFlipRotation:FM(d-Math.PI/2),parallelFlipRotation:FM(d)}),S=[],E=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}),x=new Map;let O=0;const T=new _N,D=(e,i)=>{var a;if(T.setProperties({fill:t.color,fontFamily:t.fontFamily,fontSize:t.fontSize,fontStyle:t.fontStyle,fontWeight:t.fontWeight,textAlign:"center",textBaseline:-1===w?"bottom":"hanging",translationX:e.screenY-.25*t.fontSize,translationY:e.screenX}),0===i){const i=(null===r||void 0===r?void 0:r.enabled)&&v.length>0;if(!i)return!1;const o=n.call(s,this.getTitleFormatterParams());T.setProperties({fill:r.color,fontFamily:r.fontFamily,fontSize:r.fontSize,fontStyle:r.fontStyle,fontWeight:r.fontWeight,text:o,textBaseline:"hanging",translationX:e.screenY-.25*t.fontSize,translationY:e.screenX})}else{const r=e.screenX>=o[0]&&e.screenX<=o[1];if(!r)return!1;t.formatter?T.text=null!==(a=n.call(t.formatter,{value:String(e.label),index:i}))&&void 0!==a?a:String(e.label):T.text=String(e.label)}return!0};y.forEach(((e,t)=>{const i=D(e,t);if(i){const e=T.computeTransformedBBox();e&&(x.set(t,e),e.width>O&&(O=e.width))}}));const R=h*t.padding,A=this.label.grid,_=[];y.forEach(((e,t)=>{let i=D(e,t);const n=t;T.x=R,T.rotationCenterX=R;const o=!e.children.length;if(o){T.rotation=b,T.textAlign="end",T.textBaseline="middle";const e=x.get(n);e&&e.height>u&&(i=!1,x.delete(n))}else{T.translationX-=O-f+this.label.padding;const t=e.leafCount*u,o=x.get(n);o&&o.width>t?(i=!1,x.delete(n)):T.rotation=p?C:-Math.PI/2}if(e.parent&&m){const t=o?e.screenX-u/2:e.screenX-e.leafCount*u/2;if(o)(e.number!==e.children.length-1||A)&&_.push({y:t,x1:0,x2:-O-2*this.label.padding});else{const i=-O-2*this.label.padding+e.screenY;_.push({y:t,x1:i+f,x2:i})}}let r;if(i){const e=T.computeTransformedBBox();e&&x.set(t,e),r=Object.assign(Object.assign({},E(T)),{visible:i})}else x.delete(t),r={visible:i};S.push(r)}));let P=0;_.forEach((e=>P=Math.min(P,e.x2))),_.push({y:Math.max(a,l),x1:0,x2:P});const M=[],k=[],N=1e-7;_.forEach((e=>{if(e.y>=o[0]-N&&e.y<=o[1]+N){const{x1:t,x2:i,y:n}=e,o=new gN(Math.min(t,i),n,Math.abs(t-i),0);k.push(o),M.push({x1:t,x2:i,y:n})}}));const L=[],I=[],F=g?g.depth+1:1;for(let j=0;j<F;j++){const e=v.length>0&&(0===j||A&&m),t=j>0?-O-2*this.label.padding-(j-1)*f:0,i=new gN(t,Math.min(...o),0,Math.abs(o[1]-o[0]));I.push(i),L.push({x:t,y1:o[0],y2:o[1],visible:e})}const G=e=>{const t=new vN,{rotation:i,translationX:n,translationY:o,rotationCenterX:r,rotationCenterY:s}=this.getAxisTransform();return vN.updateTransformMatrix(t,1,1,i,n,o,{scalingCenterX:0,scalingCenterY:0,rotationCenterX:r,rotationCenterY:s}),t.transformBBox(e)},V=gN.merge([...x.values(),...k,...I]),B=G(V);return{bbox:B,tickLabelLayout:S,separatorLayout:M,axisLineLayout:L}}calculateLayout(){const{axisLineLayout:e,separatorLayout:t,tickLabelLayout:i,bbox:n}=this.computeLayout();return this.computedLayout={axisLineLayout:e,separatorLayout:t,tickLabelLayout:i},{bbox:n,primaryTickCount:void 0}}}
18_V.className="GroupedCategoryAxis",_V.type="grouped-category",iM([JM(Sk),nM("design:type",String)],_V.prototype,"labelColor",void 0);class PV{static isSupported(){return"undefined"!==typeof OffscreenCanvas&&null!=OffscreenCanvas.prototype.transferToImageBitmap}constructor({width:e=600,height:t=300,overrideDevicePixelRatio:i}){this.enabled=!0,this._pixelRatio=NaN,this._width=0,this._height=0,this.canvas=new OffscreenCanvas(e,t),this.realContext=this.canvas.getContext("2d"),this.imageSource=this.canvas.transferToImageBitmap(),this.context=this.setPixelRatio(i),this.resize(e,t)}snapshot(){this.imageSource.close(),this.imageSource=this.canvas.transferToImageBitmap()}destroy(){this.imageSource.close(),this.canvas.width=0,this.canvas.height=0,this.context.clearRect(0,0,0,0)}clear(){this.context.save(),this.context.resetTransform(),this.context.clearRect(0,0,this.width,this.height),this.context.restore()}get pixelRatio(){return this._pixelRatio}setPixelRatio(e){let t=null!==e&&void 0!==e?e:window.devicePixelRatio;return SN()||(t=1),this._pixelRatio=t,EN.overrideScale(this.realContext,t)}get width(){return this._width}get height(){return this._height}resize(e,t){if(!(e>0&&t>0))return;const{canvas:i,context:n,pixelRatio:o}=this;i.width=Math.round(e*o),i.height=Math.round(t*o),n.resetTransform(),this._width=e,this._height=t}}(function(e){e["SCENE"]="scene",e["SCENE_STATS"]="scene:stats",e["SCENE_STATS_VERBOSE"]="scene:stats:verbose",e["SCENE_DIRTY_TREE"]="scene:dirtyTree"})(dV||(dV={}));const MV="adv-composite",kV="dom-composite";class NV{constructor(e){var t;this.id=pN(this),this.layers=[],this._nextZIndex=0,this._nextLayerId=0,this._dirty=!1,this._root=null,this.debug=bM.create(!0,dV.SCENE);const{document:i,window:n,mode:o=(null!==(t=vM("agChartsSceneRenderModel"))&&void 0!==t?t:MV),width:r,height:s,overrideDevicePixelRatio:a}=e;this.overrideDevicePixelRatio=a,this.opts={document:i,window:n,mode:o},this.canvas=new EN({document:i,window:n,width:r,height:s,overrideDevicePixelRatio:a})}set container(e){this.canvas.container=e}get container(){return this.canvas.container}download(e,t){this.canvas.download(e,t)}getDataURL(e){return this.canvas.getDataURL(e)}get width(){return this.pendingSize?this.pendingSize[0]:this.canvas.width}get height(){return this.pendingSize?this.pendingSize[1]:this.canvas.height}resize(e,t){e=Math.round(e),t=Math.round(t);const i=e<=0||t<=0,n=isNaN(e)||isNaN(t),o=e===this.width&&t===this.height;return!(o||n||i)&&(this.pendingSize=[e,t],this.markDirty(),!0)}addLayer(e){var t;const{mode:i}=this.opts,n=["composite",kV,MV];if(!n.includes(i))return;const{zIndex:o=this._nextZIndex++,name:r,zIndexSubOrder:s,getComputedOpacity:a,getVisibility:l}=e,{width:c,height:u,overrideDevicePixelRatio:d}=this,p=i===kV,h=i===MV,f=h&&PV.isSupported()?new PV({width:c,height:u,overrideDevicePixelRatio:d}):new EN({document:this.opts.document,window:this.opts.window,width:c,height:u,domLayer:p,zIndex:o,name:r,overrideDevicePixelRatio:d}),g={id:this._nextLayerId++,name:r,zIndex:o,zIndexSubOrder:s,canvas:f,getComputedOpacity:a,getVisibility:l};if(o>=this._nextZIndex&&(this._nextZIndex=o+1),this.layers.push(g),this.sortLayers(),p){const e=this.layers.map((e=>e.canvas)).filter((e=>e instanceof EN)),i=e.findIndex((e=>e===f)),n=null!==(t=e[i-1])&&void 0!==t?t:this.canvas;n.element.insertAdjacentElement("afterend",f.element)}return this.debug("Scene.addLayer() - layers",this.layers),g.canvas}removeLayer(e){const t=this.layers.findIndex((t=>t.canvas===e));t>=0&&(this.layers.splice(t,1),e.destroy(),this.markDirty(),this.debug("Scene.removeLayer() -  layers",this.layers))}moveLayer(e,t,i){const n=this.layers.find((t=>t.canvas===e));n&&(n.zIndex=t,n.zIndexSubOrder=i,this.sortLayers(),this.markDirty(),this.debug("Scene.moveLayer() -  layers",this.layers))}sortLayers(){this.layers.sort(((e,t)=>{var i,n;return UL([e.zIndex,...null!==(i=e.zIndexSubOrder)&&void 0!==i?i:[void 0,void 0],e.id],[t.zIndex,...null!==(n=t.zIndexSubOrder)&&void 0!==n?n:[void 0,void 0],t.id],WL)}))}markDirty(){this._dirty=!0}get dirty(){return this._dirty}set root(e){var t;e!==this._root&&(null===(t=this._root)||void 0===t||t._setLayerManager(),this._root=e,e&&e._setLayerManager({addLayer:e=>this.addLayer(e),moveLayer:(...e)=>this.moveLayer(...e),removeLayer:(...e)=>this.removeLayer(...e),markDirty:()=>this.markDirty(),canvas:this.canvas,debug:bM.create(dV.SCENE)}),this.markDirty())}get root(){return this._root}strip(){const{layers:e}=this;for(const t of e)t.canvas.destroy(),delete t["canvas"];e.splice(0,e.length),this.root=null,this._dirty=!1,this.canvas.context.resetTransform()}destroy(){this.container=void 0,this.strip(),this.canvas.destroy(),Object.assign(this,{canvas:void 0,ctx:void 0})}render(e){var t,i;return oM(this,void 0,void 0,(function*(){const{debugSplitTimes:n={start:performance.now()},extraDebugStats:o={}}=null!==e&&void 0!==e?e:{},{canvas:r,canvas:{context:s},root:a,layers:l,pendingSize:c,opts:{mode:u}}=this;
18if(c&&(this.canvas.resize(...c),this.layers.forEach((e=>e.canvas.resize(...c))),this.pendingSize=void 0),a&&!a.visible)return void(this._dirty=!1);if(a&&!this.dirty)return this.debug("Scene.render() - no-op",{redrawType:nN[a.dirty],tree:this.buildTree(a)}),void this.debugStats(n,s,void 0,o);const d={ctx:s,devicePixelRatio:null!==(t=this.canvas.pixelRatio)&&void 0!==t?t:1,forceRender:!0,resized:!!c,debugNodes:{}};bM.check(dV.SCENE_STATS_VERBOSE)&&(d.stats={layersRendered:0,layersSkipped:0,nodesRendered:0,nodesSkipped:0});let p=!1;if((!a||a.dirty>=nN.TRIVIAL)&&(p=!0,r.clear()),a){const{dirtyTree:e,paths:t}=this.buildDirtyTree(a);bM.create(dV.SCENE_DIRTY_TREE)("Scene.render() - dirtyTree",{dirtyTree:e,paths:t})}a&&p&&(this.debug("Scene.render() - before",{redrawType:nN[a.dirty],canvasCleared:p,tree:this.buildTree(a)}),a.visible&&(s.save(),a.render(d),s.restore())),n["✍️"]=performance.now(),u!==kV&&l.length>0&&p&&(this.sortLayers(),s.save(),s.setTransform(1/r.pixelRatio,0,0,1/r.pixelRatio,0,0),l.forEach((({canvas:{imageSource:e,enabled:t},getComputedOpacity:i,getVisibility:n})=>{t&&n()&&(s.globalAlpha=i(),s.drawImage(e,0,0))})),s.restore(),n["⛙"]=performance.now()),null===(i=s.verifyDepthZero)||void 0===i||i.call(s),this._dirty=!1,this.debugStats(n,s,d.stats,o),this.debugSceneNodeHighlight(s,d.debugNodes),a&&this.debug("Scene.render() - after",{redrawType:nN[a.dirty],canvasCleared:p,tree:this.buildTree(a)})}))}debugStats(e,t,i,n={}){if(bM.check(dV.SCENE_STATS,dV.SCENE_STATS_VERBOSE)){const o=performance.now(),r=e["start"];e["end"]=performance.now();const s=(e,t)=>{const i=e+t;return`${e} / ${i} (${Math.round(100*e/i)}%)`},a=(e,t,i)=>`${e}: ${Math.round(100*(i-t))/100}ms`,{layersRendered:l=0,layersSkipped:c=0,nodesRendered:u=0,nodesSkipped:d=0}=null!==i&&void 0!==i?i:{};let p=0;const h=Object.entries(e).filter((([e])=>"end"!==e)).map((([e,t],i)=>{const n=i>0?a(e,p,t):null;return p=t,n})).filter((e=>null!=e)).join(" + "),f=Object.entries(n).map((([e,t])=>`${e}: ${t}`)).join(" ; "),g=bM.check(dV.SCENE_STATS_VERBOSE),v=[`${a("⏱️",r,o)} (${h})`,`${f}`,`Layers: ${g?s(l,c):this.layers.length}`,g?`Nodes: ${s(u,d)}`:null].filter((e=>null!=e)),y=v.map((e=>[e,EN.getTextSize(e,t.font)])),m=Math.max(...y.map((([,{width:e}])=>e))),C=y.reduce(((e,[,{height:t}])=>e+t),0);t.save(),t.fillStyle="white",t.fillRect(0,0,m,C),t.fillStyle="black";let b=0;for(const[e,i]of y)b+=i.height,t.fillText(e,2,b);t.restore()}}debugSceneNodeHighlight(e,t){var i;const n=e=>t=>!!e.test(t.id)||t instanceof zL&&null!=t.name&&e.test(t.name),o=e=>t=>e===t.id||t instanceof zL&&null!=t.name&&e===t.name,r=pM(vM("agChartsSceneDebug")).flatMap((e=>"layout"===e?["seriesRoot","legend","root",/.*Axis-\d+-axis.*/]:e));for(const s of r){if("string"===typeof s&&null!=t[s])continue;const e="string"===typeof s?o(s):n(s),r=null===(i=this.root)||void 0===i?void 0:i.findNodes(e);if(r&&0!==r.length)for(const i of r)i instanceof zL&&i.name?t[i.name]=i:t[i.id]=i;
18else gM.log(`Scene.render() - no debugging node with id [${s}] in scene graph.`)}e.save();for(const[s,a]of Object.entries(t)){const t=a.computeTransformedBBox();t?(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(s,t.x,t.y,t.width),e.fillText(s,t.x,t.y,t.width)):gM.log(`Scene.render() - no bbox for debugged node [${s}].`)}e.restore()}buildTree(e){var t,i;const n=null!==(t=e instanceof zL?e.name:null)&&void 0!==t?t:e.id;return Object.assign(Object.assign({name:n,node:e,dirty:nN[e.dirty]},(null===(i=e.parent)||void 0===i?void 0:i.isVirtual)?{virtualParentDirty:nN[e.parent.dirty],virtualParent:e.parent}:{}),e.children.map((e=>this.buildTree(e))).reduce(((e,t)=>{let{name:i}=t;const{node:{visible:n,opacity:o,zIndex:r,zIndexSubOrder:s},node:a,virtualParent:l}=t;(!n||o<=0)&&(i=`(${i})`),a instanceof zL&&a.isLayer()&&(i=`*${i}*`);const c=[`${null!==i&&void 0!==i?i:"<unknown>"}`,`z: ${r}`,s&&`zo: ${s.map((e=>"function"===typeof e?`${e()} (fn)`:e)).join(" / ")}`,l&&"(virtual parent)"].filter((e=>!!e)).join(" ");let u=c,d=1;while(null!=e[u]&&d<100)u=`${c} (${d++})`;return e[u]=t,e}),{}))}buildDirtyTree(e){var t;if(e.dirty===nN.NONE)return{dirtyTree:{},paths:[]};const i=e.children.map((e=>this.buildDirtyTree(e))).filter((e=>e.paths.length>0)),n=null!==(t=e instanceof zL?e.name:null)&&void 0!==t?t:e.id,o=0===i.length?[n]:i.map((e=>e.paths)).reduce(((e,t)=>e.concat(t)),[]).map((e=>`${n}.${e}`));return{dirtyTree:Object.assign({name:n,node:e,dirty:nN[e.dirty]},i.map((e=>e.dirtyTree)).filter((e=>void 0!==e.dirty)).reduce(((e,t)=>{var i;return e[null!==(i=t.name)&&void 0!==i?i:"<unknown>"]=t,e}),{})),paths:o}}}function LV(e){return new Promise((t=>{setTimeout((()=>t(void 0)),e)}))}NV.className="Scene";class IV{constructor(){this.cache=new WeakMap}call(e,...t){let i,n=this.cache.get(e);const o=()=>{try{const o=e(...t);return n&&null!=i&&n.set(i,o),o}catch(o){return void gM.warnOnce("User callback errored, ignoring",o)}};try{i=JSON.stringify(t)}catch(r){return o()}return null==n&&(n=new Map,this.cache.set(e,n)),n.has(i)?n.get(i):o()}invalidateCache(){this.cache=new WeakMap}}class FV{constructor(){this.available=!0,this.acquireQueue=[]}acquire(e){return new Promise((t=>{this.acquireQueue.push([e,t]),this.available&&this.dispatchNext()}))}acquireImmediately(e){return oM(this,void 0,void 0,(function*(){return!!this.available&&(yield this.acquire(e),!0)}))}waitForClearAcquireQueue(){return oM(this,void 0,void 0,(function*(){return this.acquire((()=>oM(this,void 0,void 0,(function*(){}))))}))}dispatchNext(){var e,t;return oM(this,void 0,void 0,(function*(){this.available=!1;let[i,n]=null!==(e=this.acquireQueue.shift())&&void 0!==e?e:[];while(i){try{yield i(),null===n||void 0===n||n()}catch(o){gM.error("mutex callback error",o),null===n||void 0===n||n()}[i,n]=null!==(t=this.acquireQueue.shift())&&void 0!==t?t:[]}this.available=!0}))}}function GV(e){return BV(((e,t)=>requestAnimationFrame(e)),e)}function VV(e){return BV(((e,t=0)=>setTimeout(e,t)),e)}function BV(e,t){let i,n,o=0,r=!1;const s=()=>r,a=()=>{r=!1,null===n||void 0===n||n(),n=void 0,i=void 0,o>0&&e(l)},l=()=>{const e=o;o=0,r=!0;const i=t({count:e});i?i.then(a).catch(a):a()};return{schedule(t){0!==o||s()||e(l,t),o++},await(){return oM(this,void 0,void 0,(function*(){if(s()){null==i&&(i=new Promise((e=>{n=e})));while(s())yield i}}))}}}class jV{static init(e){if("undefined"!==typeof ResizeObserver)this.resizeObserver=new ResizeObserver((e=>{for(const t of e){const{width:e,height:i}=t.contentRect;this.checkSize(this.elements.get(t.target),t.target,e,i)}}));else{const e=()=>{this.elements.forEach(((e,t)=>{this.checkClientSize(t,e)}))};this.pollerHandler=window.setInterval(e,100)}this.ready=!0,this.documentReady="loading"!==e.readyState,this.documentReady||(this.readyEventFn=()=>{const t="loading"!==e.readyState,i=this.documentReady;if(this.documentReady=t,t&&t!==i){for(const[e,t]of this.queuedObserveRequests)this.observe(e,t);this.queuedObserveRequests.length=0}},e.addEventListener("DOMContentLoaded",this.readyEventFn))}static destroy(){var e;null!=this.pollerHandler&&(clearInterval(this.pollerHandler),this.pollerHandler=void 0),this.readyEventFn&&(document.removeEventListener("DOMContentLoaded",this.readyEventFn),this.readyEventFn=void 0),null===(e=this.resizeObserver)||void 0===e||e.disconnect(),this.resizeObserver=void 0,this.ready=!1}static checkSize(e,t,i,n){e&&(e.size&&i===e.size.width&&n===e.size.height||(e.size={width:i,height:n},e.cb(e.size,t)))}static observe(e,t){this.ready||this.init(e.ownerDocument),this.documentReady?(this.unobserve(e,!1),this.resizeObserver&&this.resizeObserver.observe(e),this.elements.set(e,{cb:t})):this.queuedObserveRequests.push([e,t])}static unobserve(e,t=!0){this.resizeObserver&&this.resizeObserver.unobserve(e),this.elements.delete(e),this.queuedObserveRequests=this.queuedObserveRequests.filter((([t])=>t===e)),t&&0===this.elements.size&&this.destroy()}static checkClientSize(e,t){const i=e.clientWidth?e.clientWidth:0,n=e.clientHeight?e.clientHeight:0;this.checkSize(t,e,i,n)}}jV.elements=new Map,jV.ready=!1,jV.documentReady=!1,jV.queuedObserveRequests=[];class HV{constructor(){this.range="tooltip"}}var WV;iM([JM(Mk("tooltip","node")),nM("design:type",String)],HV.prototype,"range",void 0),function(e){e[e["FULL"]=0]="FULL",e[e["PROCESS_DATA"]=1]="PROCESS_DATA",e[e["PERFORM_LAYOUT"]=2]="PERFORM_LAYOUT",e[e["SERIES_UPDATE"]=3]="SERIES_UPDATE",e[e["TOOLTIP_RECALCULATION"]=4]="TOOLTIP_RECALCULATION",e[e["SCENE_RENDER"]=5]="SCENE_RENDER",e[e["NONE"]=6]="NONE"}(WV||(WV={}));class UV{constructor(e){this.type=e,this.continuousDomain=[1/0,-1/0],this.discreteDomain=new Set}extend(e){"discrete"===this.type?this.discreteDomain.add(e):"continuous"===this.type&&(this.continuousDomain[0]>e&&(this.continuousDomain[0]=e),this.continuousDomain[1]<e&&(this.continuousDomain[1]=e))}getDomain(){if("discrete"===this.type)return this.discreteDomain;if("continuous"===this.type)return this.continuousDomain;throw new Error("AG Charts - Unsupported data domain type: "+this.type)}}function zV(e){return e.map((e=>null==e||"number"===typeof e||"string"===typeof e||"boolean"===typeof e?e:"object"===typeof e?JSON.stringify(e):e)).join("-")}function KV(e){const t=1e4;return Number.isInteger(e)?e:Math.abs(e)>t?Math.trunc(e):Math.round(e*t)/t}function YV(e){if(void 0===e)return[];let[t,i]=e;return t=+t,i=+i,0===t&&0===i?[0,1]:t===1/0&&i===-1/0?[]:(t===1/0&&(t=0),i===-1/0&&(i=0),SI(t)&&SI(i)?[t,i]:[])}function qV(e,t){var i;const n=YV(e);if(0===n.length)return n;let[o,r]=n;if(o===r){const[e,n]=null!==(i=null===t||void 0===t?void 0:t.calculatePadding(o,r))&&void 0!==i?i:[1,1];o-=e,r+=n}return[o,r]}const XV=Symbol("invalid");class $V{constructor(e){const{props:t,mode:i="standalone"}=e;this.mode=i;let n=!0;for(const s of t){if("key"===s.type&&!n)throw new Error("AG Charts - internal 
18config error: keys must come before values.");"value"===s.type&&n&&(n=!1)}this.opts=Object.assign({dataVisible:!0},e),this.keys=t.filter((e=>"key"===e.type)).map(((e,t)=>Object.assign(Object.assign({},e),{index:t,missing:0}))),this.values=t.filter((e=>"value"===e.type)).map(((e,t)=>Object.assign(Object.assign({},e),{index:t,missing:0}))),this.aggregates=t.filter((e=>"aggregate"===e.type)).map(((e,t)=>Object.assign(Object.assign({},e),{index:t}))),this.groupProcessors=t.filter((e=>"group-value-processor"===e.type)).map(((e,t)=>Object.assign(Object.assign({},e),{index:t}))),this.propertyProcessors=t.filter((e=>"property-value-processor"===e.type)).map(((e,t)=>Object.assign(Object.assign({},e),{index:t}))),this.reducers=t.filter((e=>"reducer"===e.type)).map(((e,t)=>Object.assign(Object.assign({},e),{index:t}))),this.processors=t.filter((e=>"processor"===e.type)).map(((e,t)=>Object.assign(Object.assign({},e),{index:t})));for(const s of this.values)if(null==s.property)throw new Error(`AG Charts - internal config error: no properties specified for value definitions: ${JSON.stringify(s)}`);const o=({matchGroupIds:e})=>{for(const t of null!==e&&void 0!==e?e:[])if(!this.values.some((e=>e.groupId===t)))throw new Error(`AG Charts - internal config error: matchGroupIds properties must match defined groups (${t}).`)},r=({matchIds:e})=>{for(const t of null!==e&&void 0!==e?e:[])if(!this.values.some((e=>{var i;return null===(i=e.ids)||void 0===i?void 0:i.some((([e,i])=>e===t[0]&&i===t[1]))})))throw new Error(`AG Charts - internal config error: matchGroupIds properties must match defined groups (${t}).`)};for(const s of[...this.groupProcessors,...this.aggregates])r(s),o(s)}resolveProcessedDataIndexById(e,t){var i;const{index:n,def:o}=null!==(i=this.resolveProcessedDataDefById(e,t))&&void 0!==i?i:{};return{index:n,def:o}}resolveProcessedDataIndicesById(e,t){return this.resolveProcessedDataDefsById(e,t).map((({index:e,def:t})=>({index:e,def:t})))}resolveProcessedDataDefById(e,t){return this.resolveProcessedDataDefsById(e,t)[0]}resolveProcessedDataDefsByIds(e,t){const i=[];for(const n of t)i.push([n,this.resolveProcessedDataDefsById(e,n)]);return i}resolveProcessedDataDefsValues(e,{keys:t,values:i}){const n={};for(const[o,[{index:r,def:s}]]of e){const e="key"===s.type?t:i;n[o]=e[r]}return n}resolveProcessedDataDefsById(e,t){const{keys:i,values:n,aggregates:o,groupProcessors:r,reducers:s}=this,a=i=>{const{ids:n,scopes:o}=i;return null!=n&&(!(null!=e&&!(null===o||void 0===o?void 0:o.some((t=>t===e.id))))&&n.some((([i,n])=>i===e.id&&("string"===typeof t?n===t:t.test(n)))))},l=[i,n,o,r,s],c=[];for(const u of l)c.push(...u.filter(a).map((e=>({index:e.index,def:e}))));if(c.length>0)return c;throw new Error(`AG Charts - didn't find property definition for [${t}, ${e.id}]`)}getDomain(e,t,i="value",n){var o,r,s,a;let l,c;try{l=this.resolveProcessedDataIndicesById(e,t)}catch(p){if("string"!==typeof t&&/didn't find property definition/.test(p.message))return[];throw p}switch(i){case"key":c="keys";break;case"value":c="values";break;case"aggregate":c="aggValues";break;case"group-value-processor":c="groups";break;default:return[]}const u=null!==(r=null===(o=n.domain[c])||void 0===o?void 0:o[l[0].index])&&void 0!==r?r:[];if(1===l.length)return u;const d=[...u];for(const h of l.slice(1))ZI(null!==(a=null===(s=n.domain[c])||void 0===s?void 0:s[h.index])&&void 0!==a?a:[],d);return d}processData(e){const{opts:{groupByKeys:t,groupByFn:i},aggregates:n,groupProcessors:o,reducers:r,processors:s,propertyProcessors:a}=this,l=performance.now();for(const d of[...this.keys,...this.values])d.missing=0;if(t&&0===this.keys.length)return;let c=this.extractData(e);t?c=this.groupData(c):i&&(c=this.groupData(c,i(c))),o.length>0&&this.postProcessGroups(c),n.length>0&&this.aggregateData(c),a.length>0&&this.postProcessProperties(c),r.length>0&&this.reduceData(c),s.length>0&&this.postProcessData(c);for(const d of[...this.keys,...this.values])e.length>0&&d.missing>=e.length&&gM.warnOnce(`the key '${d.property}' was not found in any data element.`);const u=performance.now();return c.time=u-l,bM.check(!0,"data-model")&&ZV(c),c}
18valueGroupIdxLookup({matchGroupIds:e,matchIds:t}){return this.values.map(((e,t)=>({def:e,index:t}))).filter((({def:i})=>!(e&&(null==i.groupId||!e.includes(i.groupId)))&&(!t||null!=i.ids&&t.some((([e,t])=>{var n;return null===(n=i.ids)||void 0===n?void 0:n.some((([i,n])=>i===e&&n===t))}))))).map((({index:e})=>e))}valueIdxLookup(e,t){const i=null==e||0===e.length,n=t=>{const n=null==t;if(n)return!0;const o=null==t||0===t.length;return i===o||(null===t||void 0===t?void 0:t.some((t=>e.includes(t))))},o="string"===typeof t?t:t.id,r=([e,t])=>n([e])&&t===o,s=this.values.findIndex((e=>{var t;return n(e.scopes)&&((null===(t=e.ids)||void 0===t?void 0:t.some((e=>r(e))))||e.property===o||e.id===o)}));if(s>=0)return s;throw new Error(`AG Charts - configuration error, unknown property ${JSON.stringify(t)} in scope(s) ${JSON.stringify(e)}`)}extractData(e){var t;const{keys:i,values:n,opts:{dataVisible:o}}=this,{dataDomain:r,processValue:s,scopes:a,allScopesHaveSameDefs:l}=this.initDataDomainProcessor(),c=new Array(o?e.length:0);let u=0,d=0;for(const h of e){const e=a.size>0?new Set(a):void 0,r=o?new Array(i.length):void 0;let p,f=0;for(const t of i){if(p=s(t,h,p),p===XV)break;r&&(r[f++]=p)}if(p===XV)continue;const g=o&&n.length>0?new Array(n.length):void 0;let v,y=0;for(const i of n)if(v=s(i,h,v),v===XV){if(l)break;for(const n of null!==(t=i.scopes)&&void 0!==t?t:a)null===e||void 0===e||e.delete(n);if(y++,0===(null===e||void 0===e?void 0:e.size))break}else g&&(g[y++]=v);if((v!==XV||!l)&&(0!==(null===e||void 0===e?void 0:e.size)&&o)){const t={datum:h,keys:r,values:g};!l&&e&&e.size<a.size&&(d++,t.validScopes=[...e]),c[u++]=t}}c.length=u;const p=e=>{const t=r.get(e).getDomain();return Array.isArray(t)&&t[0]>t[1]?[]:[...t]};return{type:"ungrouped",input:{count:e.length},data:c,domain:{keys:i.map((e=>p(e))),values:n.map((e=>p(e)))},defs:{allScopesHaveSameDefs:l,keys:i,values:n},partialValidDataCount:d,time:0}}groupData(e,t){var i,n,o,r;const s=new Map;for(const u of e.data){const{keys:e,values:a,datum:l,validScopes:c}=u,d=t?t(u):e,p=zV(d);if(s.has(p)){const e=s.get(p);if(e.values.push(a),e.datum.push(l),null!=c)for(let t=0;t<(null!==(n=null===(i=e.validScopes)||void 0===i?void 0:i.length)&&void 0!==n?n:0);t++){const i=null===(o=e.validScopes)||void 0===o?void 0:o[t];c.some((e=>e===i))||(null===(r=e.validScopes)||void 0===r||r.splice(t,1))}}else s.set(p,{keys:d,values:[a],datum:[l],validScopes:c})}const a=new Array(s.size),l=new Array(s.size);let c=0;for(const[,{keys:u,values:d,datum:p,validScopes:h}]of s.entries())0!==(null===h||void 0===h?void 0:h.length)&&(l[c]=u,a[c++]={keys:u,values:d,datum:p,validScopes:h});return Object.assign(Object.assign({},e),{type:"grouped",data:a,domain:Object.assign(Object.assign({},e.domain),{groups:l})})}aggregateData(e){var t,i,n,o,r,s,a,l;const{aggregates:c}=this;if(!c)return;const u=c.map((()=>[1/0,-1/0])),d=c.map((e=>this.valueGroupIdxLookup(e))),p=c.map((e=>e.aggregateFunction)),h=c.map((e=>e.groupAggregateFunction)),f=c.map((e=>e.finalFunction));for(const g of e.data){let{values:v}=g;const{validScopes:y}=g;null!==(t=g.aggValues)&&void 0!==t||(g.aggValues=new Array(d.length)),"ungrouped"===e.type&&(v=[v]);let m=0;for(const e of d){const t=null===(i=null===y||void 0===y?void 0:y.some((e=>{var t;return null===(t=c[m].matchScopes)||void 0===t?void 0:t.some((t=>e===t))})))||void 0===i||i;if(!t){m++;continue}let d=null!==(o=null===(n=h[m])||void 0===n?void 0:n.call(h))&&void 0!==o?o:ZI([]);for(const i of v){const t=e.map((e=>i[e])),n=p[m](t,g.keys);n&&(d=null!==(s=null===(r=h[m])||void 0===r?void 0:r.call(h,n,d))&&void 0!==s?s:ZI(n,d))}const C=(null!==(l=null===(a=f[m])||void 0===a?void 0:a.call(f,d))&&void 0!==l?l:d).map((e=>KV(e)));ZI(C,u[m]),g.aggValues[m++]=C}}e.domain.aggValues=u}postProcessGroups(e){var t,i,n,o,r;const{groupProcessors:s}=this;if(!s)return;const a=new Set,l=new Map,c=new Map,u=new Map;for(const p of s){const e=this.valueGroupIdxLookup(p);c.set(p,e),u.set(p,p.adjust());for(const t of e){const e=this.values[t];a.add(t),l.set(t,new UV("category"===e.valueType?"discrete":"continuous"))}}const d=e=>{var t;for(const i of a)null===(t=l.get(i))||void 0===t||t.extend(e[i])};for(const p of e.data){for(const a of s){const s=null===(i=null===(t=p.validScopes)||void 0===t?void 0:t.some((e=>{var t;return null===(t=a.matchScopes)||void 0===t?void 0:t.some((t=>e===t))})))||void 0===i||i;if(!s)continue;const l=null!==(n=c.get(a))&&void 0!==n?n:[],d=null!==(r=null===(o=u.get(a))||void 0===o?void 0:o())&&void 0!==r?r:()=>{};if("grouped"!==e.type)p.values&&d(p.values,l);else for(const e of p.values)e&&d(e,l)}if("grouped"===e.type)for(const e of p.values)d(e);else d(p.values)}for(const[p,h]of l)e.domain.values[p]=[...h.getDomain()]}postProcessProperties(e){const{propertyProcessors:t}=this;if(t)for(const{adjust:i,property:n,scopes:o}of t)i()(e,this.valueIdxLookup(null!==o&&void 0!==o?o:[],n))}reduceData(e){var t,i,n;const{reducers:o}=this,r=o.map((e=>e.scopes)),s=o.map((e=>e.reducer())),a=o.map((e=>e.initialValue));for(const l of e.data){let e=0;for(const n of s){const o=null===(i=null===(t=l.validScopes)||void 0===t?void 0:t.some((t=>{var i;return null===(i=r[e])||void 0===i?void 0:i.some((e=>t===e))})))||void 0===i||i;o?(a[e]=n(a[e],l),e++):e++}}for(let l=0;l<a.length;l++)null!==(n=e.reduced)&&void 0!==n||(e.reduced={}),e.reduced[o[l].property]=a[l]}postProcessData(e){var t;const{processors:i}=this;for(const n of i)null!==(t=e.reduced)&&void 0!==t||(e.reduced={}),e.reduced[n.property]=n.calculate(e)}initDataDomainProcessor(){var e;const{keys:t,values:i}=this,n=new Set;for(const p of i)for(const t of null!==(e=p.scopes)&&void 0!==e?e:[])n.add(t);const o=n.size,r=new Map,s=new Map;let a=!0;const l=(e,t,i=r)=>{var n;"category"===t?i.set(e,new UV("discrete")):(i.set(e,new UV("continuous")),a&&(a=(null!==(n=e.scopes)&&void 0!==n?n:[]).length===o))},c=()=>{t.forEach((e=>
18l(e,e.valueType))),i.forEach((e=>l(e,e.valueType)))};c();const u=this.buildAccessors(...t,...i),d=(e,t,i)=>{var n,o,a,l;const d=e.property in u;let p,h=!1;if(d){try{p=u[e.property](t)}catch(g){}h=void 0!==p}else h=e.property in t,p=h?t[e.property]:e.missingValue;if(null!=e.forceValue){const t=h&&YM(p);p=t?-1*e.forceValue:e.forceValue,h=!0}const f="missingValue"in e;if(h||f||e.missing++,r.has(e)||c(),h){const i=null===(o=null===(n=e.validation)||void 0===n?void 0:n.call(e,p,t))||void 0===o||o;if(!i){if(!("invalidValue"in e))return XV;p=e.invalidValue}}return e.processor&&(s.has(e)||s.set(e,e.processor()),p=null===(a=s.get(e))||void 0===a?void 0:a(p,i!==XV?i:void 0)),null===(l=r.get(e))||void 0===l||l.extend(p),p};return{dataDomain:r,processValue:d,initDataDomain:c,scopes:n,allScopesHaveSameDefs:a}}buildAccessors(...e){const t={};if("integrated"===this.mode)return t;for(const i of e){const e=i.property.indexOf(".")>=0||i.property.indexOf("[")>=0;if(!e)continue;let n;n=i.property.startsWith("[")?`return datum${i.property};`:`return datum.${i.property};`,t[i.property]=new Function("datum",n)}return t}}function ZV(e){var t,i;const n=(e,t)=>{t.length>0&&(gM.log(`DataModel.processData() - ${e}`),gM.table(t))};if(gM.log("DataModel.processData() - processedData",e),n("Key Domains",e.domain.keys),n("Group Domains",null!==(t=e.domain.groups)&&void 0!==t?t:[]),n("Value Domains",e.domain.values),n("Aggregate Domains",null!==(i=e.domain.aggValues)&&void 0!==i?i:[]),"grouped"===e.type){const t=e.data.reduce(((e,t)=>{var i,n;const o=null!==(i=t.keys)&&void 0!==i?i:[],r=null!==(n=t.aggValues)&&void 0!==n?n:[],s=t.keys.map((()=>{})),a=null===r||void 0===r?void 0:r.map((()=>{}));return e.push(...t.values.map(((e,t)=>[...0===t?o:s,...null!==e&&void 0!==e?e:[],...0==t?r:a]))),e}),[]);n("Values",t)}else{const t=e.data.reduce(((e,t)=>{var i;const n=null!==(i=t.aggValues)&&void 0!==i?i:[];return e.push([...t.keys,...t.values,...n]),e}),[]);n("Values",t)}}class JV{constructor(e){this.mode=e,this.debug=bM.create(!0,"data-model"),this.requested=[],this.status="setup"}request(e,t,i){return oM(this,void 0,void 0,(function*(){if("setup"!==this.status)throw new Error("AG Charts - data request after data setup phase.");return new Promise(((n,o)=>{this.requested.push({id:e,opts:i,data:t,resultCb:n,reject:o})}))}))}execute(){return oM(this,void 0,void 0,(function*(){if("setup"!==this.status)throw new Error("AG Charts - data request after data setup phase.");this.status="executed",this.debug("DataController.execute() - requested",this.requested);const e=this.mergeRequested();this.debug("DataController.execute() - merged",e);const t=bM.check(!0,"data-model");t&&(window.processedData=[]);for(const{opts:n,data:o,resultCbs:r,rejects:s,ids:a}of e)try{const e=new $V(Object.assign(Object.assign({},n),{mode:this.mode})),i=e.processData(o);t&&window.processedData.push(i),i&&0===i.partialValidDataCount?r.forEach((t=>t({dataModel:e,processedData:i}))):i?this.splitResult(e,i,a,r):s.forEach((e=>e(new Error("AG Charts - no processed data generated"))))}catch(i){s.forEach((e=>e(i)))}}))}mergeRequested(){const e=[],t=e=>e.filter((e=>"key"===e.type)).map((e=>e.property)).join(";"),i=({opts:e,data:i})=>n=>n[0].data===i&&n[0].opts.groupByKeys===e.groupByKeys&&n[0].opts.dataVisible===e.dataVisible&&n[0].opts.groupByFn===e.groupByFn&&t(n[0].opts.props)===t(e.props),n=e=>t=>{var i;if(t.type!==e.type)return!1;const n=null!==(i=RM(t,e))&&void 0!==i?i:{};return delete n["scopes"],delete n["id"],delete n["ids"],0===Object.keys(n).length},o=e=>Object.assign(Object.assign({},e[0]),{props:e.reduce(((e,t)=>{var i,o,r,s,a,l;for(const c of t.props){null!=c.id&&(null!==(i=c.ids)&&void 0!==i||(c.ids=[]),null===(o=c.scopes)||void 0===o||o.forEach((e=>{var t;return null===(t=c.ids)||void 0===t?void 0:t.push([e,c.id])})));const t=e.find(n(c));t?(null!==(r=t.scopes)&&void 0!==r||(t.scopes=[]),t.scopes.push(...null!==(s=c.scopes)&&void 0!==s?s:[]),"key"!==t.type&&"value"!==t.type||null===(a=t.ids)||void 0===a||a.push(...null!==(l=c.ids)&&void 0!==l?l:[])):e.push(c)}return e}),[])}),r=e=>({ids:e.map((({id:e})=>e)),resultCbs:e.map((({resultCb:e})=>e)),rejects:e.map((({reject:e})=>e)),data:e[0].data,opts:o(e.map((({opts:e})=>e)))});for(const s of this.requested){const t=e.find(i(s));
18t?t.push(s):e.push([s])}return e.map(r)}splitResult(e,t,i,n){for(let o=0;o<i.length;o++){const r=i[o],s=n[o];s({dataModel:e,processedData:Object.assign(Object.assign({},t),{data:t.data.filter((({validScopes:e})=>null==e||e.some((e=>e===r))))})})}}}class QV{constructor(e){this.getSeries=e}}class eB{constructor(){this.listeners=new XI}addListener(e,t,i){return this.listeners.addListener(e,t,i)}removeListener(e){this.listeners.removeListener(e)}}const tB=[!0,"animation"];class iB extends eB{constructor(e,t){super(),this.interactionManager=e,this.chartUpdateMutex=t,this.defaultDuration=1e3,this.batch=new nB,this.debug=bM.create(...tB),this.isPlaying=!1,this.requestId=null,this.skipAnimations=!1}animate(e){var t,i,{disableInteractions:n=!0,immutable:o=!0}=e,r=tM(e,["disableInteractions","immutable"]);const{batch:s}=this;try{if(null!=r.id&&s.controllers.has(r.id)){if(!o)return s.controllers.get(r.id).reset(r);s.controllers.get(r.id).stop(),this.debug(`Skipping animation batch due to update of existing animation: ${r.id}`),this.batch.skip()}}catch(c){return void this.failsafeOnError(c)}const a=null!==(t=r.id)&&void 0!==t?t:Math.random().toString(),l=this.isSkipped();return l&&this.debug("AnimationManager - skipping animation"),new aL(Object.assign(Object.assign({},r),{id:a,skip:l,autoplay:!!this.isPlaying&&r.autoplay,duration:null!==(i=r.duration)&&void 0!==i?i:this.defaultDuration,onPlay:e=>{var t;s.controllers.set(a,e),this.requestAnimation(),n&&this.interactionManager.pause("animation"),null===(t=r.onPlay)||void 0===t||t.call(e,e)},onStop:e=>{var t;s.controllers.delete(a),n&&this.interactionManager.resume("animation"),null===(t=r.onStop)||void 0===t||t.call(e,e)}}))}play(){if(!this.isPlaying){this.isPlaying=!0,this.debug("AnimationManager.play()");for(const t of this.batch.controllers.values())try{t.play()}catch(e){this.failsafeOnError(e)}this.requestAnimation()}}pause(){if(this.isPlaying){this.isPlaying=!1,this.cancelAnimation(),this.debug("AnimationManager.pause()");for(const t of this.batch.controllers.values())try{t.pause()}catch(e){this.failsafeOnError(e)}}}stop(){this.isPlaying=!1,this.cancelAnimation(),this.debug("AnimationManager.stop()");for(const t of this.batch.controllers.values())try{t.stop()}catch(e){this.failsafeOnError(e,!1)}}stopByAnimationId(e){var t;try{null!=e&&this.batch.controllers.has(e)&&(null===(t=this.batch.controllers.get(e))||void 0===t||t.stop())}catch(i){return void this.failsafeOnError(i)}}stopByAnimationGroupId(e){for(const t of this.batch.controllers.values())t.groupId===e&&this.stopByAnimationId(t.id)}reset(){this.isPlaying?(this.stop(),this.play()):this.stop()}skip(e=!0){this.skipAnimations=e}isSkipped(){return this.skipAnimations||this.batch.isSkipped()}isActive(){return this.isPlaying&&this.batch.isActive()}skipCurrentBatch(){bM.check(...tB)&&this.debug("AnimationManager - skipCurrentBatch()",{stack:(new Error).stack}),this.batch.skip()}isSkippingFrames(){return!0}scheduleAnimationFrame(e){this.requestId=requestAnimationFrame(e)}requestAnimation(){if(!this.batch.isActive()||null!==this.requestId)return;let e;const t=i=>oM(this,void 0,void 0,(function*(){const n=()=>oM(this,void 0,void 0,(function*(){const t=i-(null!==e&&void 0!==e?e:i);e=i,this.debug("AnimationManager - onAnimationFrame()",{controllersCount:this.batch.controllers.size});for(const e of this.batch.controllers.values())try{e.update(t)}catch(n){this.failsafeOnError(n)}this.listeners.dispatch("animation-frame",{type:"animation-frame",deltaMs:t})}));this.isSkippingFrames()?yield this.chartUpdateMutex.acquireImmediately(n):yield this.chartUpdateMutex.acquire(n),this.batch.isActive()&&this.scheduleAnimationFrame(t)}));this.scheduleAnimationFrame(t)}cancelAnimation(){null!==this.requestId&&(cancelAnimationFrame(this.requestId),this.requestId=null,this.startBatch())}failsafeOnError(e,t=!0){gM.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 nB,!0===e&&this.batch.skip()}endBatch(){this.debug(`AnimationManager - endBatch() with ${this.batch.controllers.size} animations; skipped: ${this.batch.isSkipped()}.`),this.batch.isSkipped()&&!this.batch.isActive()&&this.batch.skip(!1)}}class nB{constructor(){this.controllers=new Map,this.skipAnimations=!1}isActive(){return this.controllers.size>0}skip(e=!0){if(!1===this.skipAnimations&&!0===e){for(const e of this.controllers.values())e.stop();this.controllers.clear()}this.skipAnimations=e}isSkipped(){return this.skipAnimations}destroy(){}}class oB extends eB{legendItemClick(e,t,i,n){const o={type:"legend-item-click",series:e,itemId:t,enabled:i,legendItemName:n};this.listeners.dispatch("legend-item-click",o)}legendItemDoubleClick(e,t,i,n,o){const r={type:"legend-item-double-click",series:e,itemId:t,enabled:i,legendItemName:o,numVisibleItems:n};this.listeners.dispatch("legend-item-double-click",r)}axisHover(e,t){const i={type:"axis-hover",axisId:e,direction:t};this.listeners.dispatch("axis-hover",i)}}class rB{constructor(e){this.states={},this.element=e}updateCursor(e,t){delete this.states[e],null!=t&&(this.states[e]={style:t}),this.applyStates()}applyStates(){let e="default";
18Object.entries(this.states).reverse().slice(0,1).forEach((([t,{style:i}])=>e=i)),this.element.style.cursor=e}getCursor(){return this.element.style.cursor}}class sB extends eB{constructor(){super(...arguments),this.highlightStates=new Map,this.pickedStates=new Map}updateHighlight(e,t){this.highlightStates.delete(e),null!=t&&this.highlightStates.set(e,t),this.applyHighlightStates()}getActiveHighlight(){return this.activeHighlight}updatePicked(e,t){this.pickedStates.delete(e),null!=t&&this.pickedStates.set(e,t),this.applyPickedStates()}getActivePicked(){return this.activePicked}applyHighlightStates(){const{activeHighlight:e}=this;this.activeHighlight=Array.from(this.highlightStates.values()).pop(),this.isEqual(this.activeHighlight,e)||this.listeners.dispatch("highlight-change",{type:"highlight-change",currentHighlight:this.activeHighlight,previousHighlight:e})}applyPickedStates(){this.activePicked=Array.from(this.pickedStates.values()).pop()}isEqual(e,t){return e===t||(null===e||void 0===e?void 0:e.series)===(null===t||void 0===t?void 0:t.series)&&(null===e||void 0===e?void 0:e.itemId)===(null===t||void 0===t?void 0:t.itemId)&&(null===e||void 0===e?void 0:e.datum)===(null===t||void 0===t?void 0:t.datum)}}const aB=["pagehide","mousemove","mouseup"],lB=["click","dblclick","contextmenu","mousedown","mouseout","mouseenter","touchstart","touchmove","touchend","touchcancel","wheel"],cB="\n.ag-chart-wrapper {\n    touch-action: none;\n}\n";class uB extends eB{constructor(e,t,i){super(),this.eventHandler=e=>this.processEvent(e),this.mouseDown=!1,this.touchDown=!1,this.pausers={animation:0,"context-menu":0},this.rootElement=t.body,this.element=e,this.window=i;for(const n of lB)n.startsWith("touch")?e.addEventListener(n,this.eventHandler,{passive:!0}):"wheel"===n?e.addEventListener(n,this.eventHandler,{passive:!1}):e.addEventListener(n,this.eventHandler);for(const n of aB)this.window.addEventListener(n,this.eventHandler);uB.interactionDocuments.includes(t)||(IF(t,cB),uB.interactionDocuments.push(t))}destroy(){for(const e of aB)this.window.removeEventListener(e,this.eventHandler);for(const e of lB)this.element.removeEventListener(e,this.eventHandler)}resume(e){this.pausers[e]--}pause(e){this.pausers[e]++}processEvent(e){const t=this.decideInteractionEventTypes(e);t.length>0&&this.dispatchEvent(e,t).catch((e=>gM.errorOnce(e)))}dispatchEvent(e,t){return oM(this,void 0,void 0,(function*(){const i=this.calculateCoordinates(e);if(null==i)return;const n=Object.entries(this.pausers).filter((([,e])=>e>0)).map((([e])=>e));for(const o of t)this.listeners.dispatchWrapHandlers(o,((e,t,i)=>{var o;n.length>0&&!(null===(o=null===t||void 0===t?void 0:t.bypassPause)||void 0===o?void 0:o.some((e=>n.includes(e))))||i.consumed||e(i)}),this.buildEvent(Object.assign({type:o,event:e,pauses:n},i)))}))}decideInteractionEventTypes(e){const t="drag-start";switch(e.type){case"click":return["click"];case"dblclick":return["dblclick"];case"contextmenu":return["contextmenu"];case"mousedown":return this.mouseDown=!0,this.dragStartElement=e.target,[t];case"touchstart":return this.touchDown=!0,this.dragStartElement=e.target,[t];case"touchmove":case"mousemove":return this.mouseDown||this.touchDown||this.isEventOverElement(e)?this.mouseDown||this.touchDown?["drag"]:["hover"]:[];case"mouseup":return this.mouseDown||this.isEventOverElement(e)?(this.mouseDown=!1,this.dragStartElement=void 0,["drag-end"]):[];case"touchend":return this.touchDown||this.isEventOverElement(e)?(this.touchDown=!1,this.dragStartElement=void 0,["drag-end"]):[];case"mouseout":case"touchcancel":return["leave"];case"mouseenter":const i=e instanceof MouseEvent&&1===(1&e.buttons);return this.mouseDown!==i?(this.mouseDown=i,[i?t:"drag-end"]):[];case"pagehide":return["page-left"];case"wheel":return["wheel"]}return[]}isEventOverElement(e){var t;return e.target===this.element||(null===(t=e.target)||void 0===t?void 0:t.parentElement)===this.element}calculateCoordinates(e){var t;if(e instanceof MouseEvent){const{clientX:t,clientY:i,pageX:n,pageY:o,offsetX:r,offsetY:s}=e;return this.fixOffsets(e,{clientX:t,clientY:i,pageX:n,pageY:o,offsetX:r,offsetY:s})}if("undefined"!==typeof TouchEvent&&e instanceof TouchEvent){const i=null!==(t=e.touches[0])&&void 0!==t?t:e.changedTouches[0],{clientX:n,clientY:o,pageX:r,pageY:s}=i;return Object.assign(Object.assign({},uB.NULL_COORDS),{clientX:n,clientY:o,pageX:r,pageY:s})}if(e instanceof PageTransitionEvent){if(e.persisted)return;return uB.NULL_COORDS}}fixOffsets(e,t){const i=e=>{let t=0,i=0;while(e)t+=e.offsetLeft,i+=e.offsetTop,e=e.offsetParent;return{x:t,y:i}};if(null!=this.dragStartElement&&e.target!==this.dragStartElement){const n=i(this.dragStartElement),o=i(e.target);t.offsetX-=n.x-o.x,t.offsetY-=n.y-o.y}return t}
18buildEvent(e){const{type:t,event:i,clientX:n,clientY:o,pauses:r}=e;let{offsetX:s,offsetY:a,pageX:l,pageY:c}=e;if(!SI(s)||!SI(a)){const e=this.element.getBoundingClientRect();s=n-e.left,a=o-e.top}if(!SI(l)||!SI(c)){const e=this.rootElement.getBoundingClientRect();l=n-e.left,c=o-e.top}const u={type:t,offsetX:s,offsetY:a,pageX:l,pageY:c,sourceEvent:i,consumed:!1,pauses:r,consume(){u.consumed=!0}};return u}}uB.interactionDocuments=[],uB.NULL_COORDS={clientX:-1/0,clientY:-1/0,pageX:-1/0,pageY:-1/0,offsetX:-1/0,offsetY:-1/0};class dB{constructor(e,t){this.states={},this.exclusiveAreas={},this.destroyFns=[],this.tooltip=e,this.destroyFns.push(t.addListener("hover",(e=>this.checkExclusiveRects(e))))}getRange(){return this.tooltip.range}updateTooltip(e,t,i){var n;null==i&&(i=null===(n=this.states[e])||void 0===n?void 0:n.content),this.states[e]={content:i,meta:t},this.applyStates()}updateExclusiveRect(e,t){t?this.exclusiveAreas[e]=t:delete this.exclusiveAreas[e]}removeTooltip(e){delete this.states[e],this.applyStates()}getTooltipMeta(e){var t;return null===(t=this.states[e])||void 0===t?void 0:t.meta}destroy(){for(const e of this.destroyFns)e()}checkExclusiveRects(e){let t;for(const[i,n]of Object.entries(this.exclusiveAreas))if(n.containsPoint(e.offsetX,e.offsetY)){t=i;break}t!==this.appliedExclusiveArea&&(this.appliedExclusiveArea=t,this.applyStates())}applyStates(){var e;const t=this.appliedExclusiveArea?[this.appliedExclusiveArea]:Object.keys(this.states);let i,n;if(t.reverse(),t.slice(0,1).forEach((e=>{var t;const{content:o,meta:r}=null!==(t=this.states[e])&&void 0!==t?t:{};i=o,n=r})),void 0===n||void 0===i)return this.appliedState=void 0,void this.tooltip.toggle(!1);if((null===(e=this.appliedState)||void 0===e?void 0:e.content)===i){const e=this.tooltip.isVisible();this.tooltip.show(n,void 0,e)}else this.tooltip.show(n,i);this.appliedState={content:i,meta:n}}static makeTooltipMeta(e,t,i,n){var o,r,s,a;const{pageX:l,pageY:c,offsetX:u,offsetY:d}=e,p={xOffset:i.series.tooltip.position.xOffset,yOffset:i.series.tooltip.position.yOffset},h={pageX:l,pageY:c,offsetX:u,offsetY:d,event:e,showArrow:i.series.tooltip.showArrow,position:p},f=null!==(r=null===(o=i.yBar)||void 0===o?void 0:o.upperPoint)&&void 0!==r?r:i.midPoint;if("node"===i.series.tooltip.position.type&&f){const{x:e,y:o}=f,r=i.series.contentGroup.inverseTransformPoint(e,o),s=t.element.getBoundingClientRect();return Object.assign(Object.assign({},h),{pageX:Math.round(s.left+n.scrollX+r.x),pageY:Math.round(s.top+n.scrollY+r.y),offsetX:Math.round(r.x),offsetY:Math.round(r.y)})}return h.enableInteraction=null!==(a=null===(s=i.series.tooltip.interaction)||void 0===s?void 0:s.enabled)&&void 0!==a&&a,h}}class pB extends eB{constructor(){super(...arguments),this.axes={}}updateAxes(e){var t;const i=new Set(Object.keys(this.axes));e.forEach((e=>{var t,n,o;i.delete(e.id),null!==(t=(n=this.axes)[o=e.id])&&void 0!==t||(n[o]=new hB(e))})),i.forEach((e=>{delete this.axes[e]})),(null===(t=this.initialZoom)||void 0===t?void 0:t.newZoom)&&this.updateZoom(this.initialZoom.callerId,this.initialZoom.newZoom),this.initialZoom=void 0}updateZoom(e,t){0!==Object.keys(this.axes).length?(Object.values(this.axes).forEach((i=>{i.updateZoom(e,null===t||void 0===t?void 0:t[i.getDirection()])})),this.applyStates()):this.initialZoom={callerId:e,newZoom:t}}updateAxisZoom(e,t,i){var n;null===(n=this.axes[t])||void 0===n||n.updateZoom(e,i),this.applyStates()}getZoom(){let e,t;if(Object.values(this.axes).forEach((i=>{i.getDirection()===iN.X?e=i.getZoom():i.getDirection()===iN.Y&&(t=i.getZoom())})),e||t)return{x:e,y:t}}getAxisZoom(e){var t;return null===(t=this.axes[e])||void 0===t?void 0:t.getZoom()}getAxisZooms(){const e={};for(const[t,i]of Object.entries(this.axes))e[t]={direction:i.getDirection(),zoom:i.getZoom()};return e}applyStates(){const e=Object.values(this.axes).map((e=>e.applyStates())).some(Boolean);if(!e)return;const t=this.getZoom(),i={};for(const[n,o]of Object.entries(this.axes))i[n]=o.getZoom();this.listeners.dispatch("zoom-change",Object.assign(Object.assign({type:"zoom-change"},null!==t&&void 0!==t?t:{}),{axes:i}))}}class hB{constructor(e){this.states={},this.axis=e;const[t=0,i=1]=e.visibleRange;this.currentZoom={min:t,max:i},this.states["__initial__"]=this.currentZoom}getDirection(){return this.axis.direction}updateZoom(e,t){delete this.states[e],null!=t&&(this.states[e]=Object.assign({},t))}getZoom(){return this.currentZoom}applyStates(){var e,t;const i=this.currentZoom,n=Object.keys(this.states)[Object.keys(this.states).length-1];return this.currentZoom=Object.assign({},this.states[n]),(null===i||void 0===i?void 0:i.min)!==(null===(e=this.currentZoom)||void 0===e?void 0:e.min)||(null===i||void 0===i?void 0:i.max)!==(null===(t=this.currentZoom)||void 0===t?void 0:t.max)}}class fB extends XI{constructor(){super(...arguments),this.layoutComplete="layout-complete"}addListener(e,t){if(this.isLayoutStage(e)||this.isLayoutComplete(e))return super.addListener(e,t);throw new Error(`AG Charts - unsupported listener type: ${e}`)}
18dispatchPerformLayout(e,t){return this.isLayoutStage(e)?this.getListenersByType(e).reduce(((e,t)=>{try{return t.handler(e)}catch(i){return gM.errorOnce(i),e}}),t):t}dispatchLayoutComplete(e){this.dispatch(this.layoutComplete,e)}isLayoutStage(e){return e!==this.layoutComplete}isLayoutComplete(e){return e===this.layoutComplete}}function gB({orientation:e,bboxes:t,maxHeight:i,maxWidth:n,itemPaddingY:o=0,itemPaddingX:r=0,forceResult:s=!1}){const a="horizontal"===e,l={max:a?n:i,fn:a?e=>e.width:e=>e.height,padding:a?r:o},c={max:a?i:n,fn:a?e=>e.height:e=>e.width,padding:a?o:r};let u=0;const d=[];while(u<t.length){const e=t.slice(u),i=vB(e,u,l,c,s);if(!i)return;u+=i.processedBBoxCount,d.push(i.pageIndices)}return mB(d,e,t,o,r)}function vB(e,t,i,n,o){const r=1;let s=bB(e,i);if(s<r){if(!o)return;s=r}for(let a=s;a>=r;a--){const s=yB(e,t,a,i,n,o);if(null==s&&a<=r)return;if(null==s)continue;if("number"===typeof s){if(s<=r)return;a=s<a&&s>r?s:a;continue}const l=s.length*s[0].length;return{processedBBoxCount:l,pageIndices:s}}}function yB(e,t,i,n,o,r){var s;const a=[];let l=0,c=0,u=[];const d=[];for(let p=0;p<e.length;p++){const h=(p+i)%i;0===h&&(l+=c,c=0,u.length>0&&a.push(u),u=[]);const f=n.fn(e[p])+n.padding;d[h]=Math.max(null!==(s=d[h])&&void 0!==s?s:0,f),c=Math.max(c,o.fn(e[p])+o.padding);const g=l+c,v=!r||a.length>0;if(g>o.max&&v){u=[];break}const y=d.reduce(((e,t)=>e+t),0);if(y>n.max&&!r)return d.length<i?d.length:void 0;u.push(p+t)}return u.length>0&&a.push(u),a.length>0?a:void 0}function mB(e,t,i,n,o){let r=0,s=0;const a=e.map((e=>{"horizontal"===t&&(e=CB(e));let a=0;const l=e.map((e=>{const t=e.map((e=>(a=Math.max(e,a),i[e])));let r=0,s=0;return t.forEach((e=>{r+=e.height+n,s=Math.max(s,e.width+o)})),{indices:e,bboxes:t,columnHeight:Math.ceil(r),columnWidth:Math.ceil(s)}}));let c=0,u=0;return l.forEach((e=>{c+=e.columnWidth,u=Math.max(u,e.columnHeight)})),r=Math.max(c,r),s=Math.max(u,s),{columns:l,startIndex:e[0][0],endIndex:a,pageWidth:c,pageHeight:u}}));return{pages:a,maxPageWidth:r,maxPageHeight:s}}function CB(e){const t=[];for(const i of e[0])t.push([]);return e.forEach(((e,i)=>{e.forEach(((e,n)=>{t[n][i]=e}))})),t}function bB(e,t){const i=e.length;let n=0;for(let o=0;o<i;o++)if(n+=t.fn(e[o])+t.padding,n>t.max){const e=i/o;return e<2?Math.ceil(i/2):o}return i}class wB extends UI{updatePath(){const e=this.size/4.2;super.applyPath(e,wB.moves)}}wB.className="Cross",wB.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}];class SB extends UI{updatePath(){const e=this.size/2;super.applyPath(e,SB.moves)}}SB.className="Diamond",SB.moves=[{x:0,y:-1,t:"move"},{x:1,y:1},{x:-1,y:1},{x:-1,y:-1},{x:1,y:-1}];class EB extends UI{rad(e){return e/180*Math.PI}updatePath(){const{x:e,path:t,size:i,rad:n}=this,o=i/4,r=this.y+o/2;t.clear(),t.arc(e-o,r-o,o,n(130),n(330)),t.arc(e+o,r-o,o,n(220),n(50)),t.lineTo(e,r+o),t.closePath()}}EB.className="Heart";class xB extends UI{updatePath(){const e=this.size/3;super.applyPath(e,xB.moves)}}xB.className="Plus",xB.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}];class OB extends UI{updatePath(){const{path:e,x:t,y:i}=this,n=this.size/2;e.clear(),e.moveTo(this.align(t-n),this.align(i-n)),e.lineTo(this.align(t+n),this.align(i-n)),e.lineTo(this.align(t+n),this.align(i+n)),e.lineTo(this.align(t-n),this.align(i+n)),e.closePath()}}OB.className="Square";class TB extends UI{updatePath(){const e=1.1*this.size;super.applyPath(e,TB.moves)}}TB.className="Triangle",TB.moves=[{x:0,y:-.48,t:"move"},{x:.5,y:.87},{x:-1,y:0}];const DB={circle:zI,cross:wB,diamond:SB,heart:EB,plus:xB,square:OB,triangle:TB},RB=Object.keys(DB);function AB(e){return RB.includes(e)}function _B(e=OB){return AB(e)?DB[e]:"function"===typeof e?e:OB}class PB extends zL{constructor(){super({name:"markerLabelGroup"}),this.label=new _N,this._marker=new OB,this._markerSize=15,this._spacing=8;const e=this.label;e.textBaseline="middle",e.fontSize=12,e.fontFamily="Verdana, sans-serif",e.fill="black",e.y=EN.has.textMetrics?1:0,this.append([this.marker,e]),this.update()}set marker(e){this._marker!==e&&(this.removeChild(this._marker),this._marker=e,this.appendChild(e),this.update())}get marker(){return this._marker}set markerSize(e){this._markerSize!==e&&(this._markerSize=e,this.update())}get markerSize(){return this._markerSize}set spacing(e){this._spacing!==e&&(this._spacing=e,this.update())}get spacing(){return this._spacing}update(){const e=this.marker,t=this.markerSize;e.size=t,this.label.x=t/2+this.spacing}
18render(e){this.marker.opacity=this.opacity,this.label.opacity=this.opacity,super.render(e)}}PB.className="MarkerLabel",iM([GN("label"),nM("design:type",String)],PB.prototype,"text",void 0),iM([GN("label"),nM("design:type",String)],PB.prototype,"fontStyle",void 0),iM([GN("label"),nM("design:type",String)],PB.prototype,"fontWeight",void 0),iM([GN("label"),nM("design:type",Number)],PB.prototype,"fontSize",void 0),iM([GN("label"),nM("design:type",String)],PB.prototype,"fontFamily",void 0),iM([GN("label","fill"),nM("design:type",String)],PB.prototype,"color",void 0),iM([GN("marker","fill"),nM("design:type",String)],PB.prototype,"markerFill",void 0),iM([GN("marker","stroke"),nM("design:type",String)],PB.prototype,"markerStroke",void 0),iM([GN("marker","strokeWidth"),nM("design:type",Number)],PB.prototype,"markerStrokeWidth",void 0),iM([GN("marker","fillOpacity"),nM("design:type",Number)],PB.prototype,"markerFillOpacity",void 0),iM([GN("marker","strokeOpacity"),nM("design:type",Number)],PB.prototype,"markerStrokeOpacity",void 0);class MB{constructor(){this.color="black",this.fontStyle=void 0,this.fontWeight=void 0,this.fontSize=12,this.fontFamily="Verdana, sans-serif"}}iM([JM(wk),nM("design:type",String)],MB.prototype,"color",void 0),iM([JM(Ik),nM("design:type",String)],MB.prototype,"fontStyle",void 0),iM([JM(Gk),nM("design:type",String)],MB.prototype,"fontWeight",void 0),iM([JM(Tk(0)),nM("design:type",Number)],MB.prototype,"fontSize",void 0),iM([JM(hk),nM("design:type",String)],MB.prototype,"fontFamily",void 0);class kB{constructor(){this.size=15,this.fill=void 0,this.fillOpacity=void 0,this.stroke=void 0,this.strokeWidth=1,this.strokeOpacity=1}}iM([JM(Tk(0)),nM("design:type",Object)],kB.prototype,"size",void 0),iM([JM(Sk),nM("design:type",String)],kB.prototype,"fill",void 0),iM([JM(Dk(0,1)),nM("design:type",Number)],kB.prototype,"fillOpacity",void 0),iM([JM(Sk),nM("design:type",String)],kB.prototype,"stroke",void 0),iM([JM(Tk(0)),nM("design:type",Number)],kB.prototype,"strokeWidth",void 0),iM([JM(Tk(0,1)),nM("design:type",Number)],kB.prototype,"strokeOpacity",void 0);class NB{constructor(e){this.parent=e,this.shape=TB,this.size=15,this.padding=8}}iM([VN({changeValue(){this.parent.marker===this&&this.parent.onMarkerShapeChange()}}),nM("design:type",Object)],NB.prototype,"shape",void 0),iM([JM(Tk(0)),nM("design:type",Object)],NB.prototype,"size",void 0),iM([JM(Tk(0)),nM("design:type",Number)],NB.prototype,"padding",void 0);class LB{constructor(e,t,i,n){this.chartUpdateCallback=e,this.pageUpdateCallback=t,this.interactionManager=i,this.cursorManager=n,this.id=pN(this),this.group=new zL({name:"pagination"}),this.labelNode=new _N,this.marker=new NB(this),this.activeStyle=new kB,this.inactiveStyle=new kB,this.highlightStyle=new kB,this.label=new MB,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 TB,this._previousButton=new TB;const{labelNode:o}=this;o.textBaseline="middle",o.fontSize=12,o.fontFamily="Verdana, sans-serif",o.fill="black",o.y=EN.has.textMetrics?1:0,this.group.append([this.nextButton,this.previousButton,o]),this.interactionManager.addListener("click",(e=>this.onPaginationClick(e))),this.interactionManager.addListener("hover",(e=>this.onPaginationMouseMove(e))),this.update(),this.updateMarkers()}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){switch(this._orientation=e,e){case"horizontal":this.previousButton.rotation=-Math.PI/2,this.nextButton.rotation=Math.PI/2;break;case"vertical":default: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(){const{size:e,padding:t}=this.marker;this.nextButton.size=e,this.previousButton.size=e,this.labelNode.x=e/2+t}updateNextButtonPosition(){const e=this.labelNode.computeBBox();this.nextButton.translationX=e.x+e.width+this.marker.size/2+this.marker.padding}updateLabel(){const{currentPage:e,totalPages:t,labelNode:i,label:{color:n,fontStyle:o,fontWeight:r,fontSize:s,fontFamily:a}}=this;i.text=`${e+1} / ${t}`,i.fill=n,i.fontStyle=o,i.fontWeight=r,i.fontSize=s,i.fontFamily=a}updateMarkers(){const{nextButton:e,previousButton:t,nextButtonDisabled:i,previousButtonDisabled:n,activeStyle:o,inactiveStyle:r,highlightStyle:s,highlightActive:a}=this,l=(e,t)=>
18t?r:e===a?s:o;this.updateMarker(e,l("next",i)),this.updateMarker(t,l("previous",n))}updateMarker(e,t){var i;const{size:n}=this.marker;e.size=n,e.fill=t.fill,e.fillOpacity=null!==(i=t.fillOpacity)&&void 0!==i?i:1,e.stroke=t.stroke,e.strokeWidth=t.strokeWidth,e.strokeOpacity=t.strokeOpacity}enableOrDisableButtons(){const{currentPage:e,totalPages:t}=this,i=0===t,n=e===t-1,o=0===e;this.nextButtonDisabled=n||i,this.previousButtonDisabled=o||i}nextButtonContainsPoint(e,t){return!this.nextButtonDisabled&&this.nextButton.containsPoint(e,t)}previousButtonContainsPoint(e,t){return!this.previousButtonDisabled&&this.previousButton.containsPoint(e,t)}onPaginationClick(e){const{offsetX:t,offsetY:i}=e;this.nextButtonContainsPoint(t,i)?(this.incrementPage(),this.onPaginationChanged(),e.consume()):this.previousButtonContainsPoint(t,i)&&(this.decrementPage(),this.onPaginationChanged(),e.consume())}onPaginationMouseMove(e){const{offsetX:t,offsetY:i}=e;this.nextButtonContainsPoint(t,i)?(this.cursorManager.updateCursor(this.id,"pointer"),this.highlightActive="next"):this.previousButtonContainsPoint(t,i)?(this.cursorManager.updateCursor(this.id,"pointer"),this.highlightActive="previous"):(this.cursorManager.updateCursor(this.id),this.highlightActive=void 0),this.updateMarkers(),this.chartUpdateCallback(WV.SCENE_RENDER)}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(){const e=_B(this.marker.shape||TB);this.previousButton=new e,this.nextButton=new e,this.updatePositions(),this.updateMarkers(),this.chartUpdateCallback(WV.SCENE_RENDER)}attachPagination(e){e.append(this.group)}computeBBox(){return this.group.computeBBox()}}LB.className="Pagination";const IB=["horizontal","vertical"],FB=ek(((e,t)=>tk(e,t,(e=>IB.includes(e)))),"expecting an orientation keyword such as 'horizontal' or 'vertical'");class GB{constructor(){this.maxLength=void 0,this.color="black",this.fontStyle=void 0,this.fontWeight=void 0,this.fontSize=12,this.fontFamily="Verdana, sans-serif",this.formatter=void 0}}iM([JM(Dk(0)),nM("design:type",Number)],GB.prototype,"maxLength",void 0),iM([JM(wk),nM("design:type",String)],GB.prototype,"color",void 0),iM([JM(Ik),nM("design:type",String)],GB.prototype,"fontStyle",void 0),iM([JM(Gk),nM("design:type",String)],GB.prototype,"fontWeight",void 0),iM([JM(Tk(0)),nM("design:type",Number)],GB.prototype,"fontSize",void 0),iM([JM(hk),nM("design:type",String)],GB.prototype,"fontFamily",void 0),iM([JM(uk),nM("design:type",Function)],GB.prototype,"formatter",void 0);class VB{constructor(){this.size=15,this._shape=void 0,this.padding=8,this.strokeWidth=void 0}set shape(e){var t;this._shape=e,null===(t=this.parent)||void 0===t||t.onMarkerShapeChange()}get shape(){return this._shape}}iM([JM(Tk(0)),nM("design:type",Object)],VB.prototype,"size",void 0),iM([JM(Tk(0)),nM("design:type",Number)],VB.prototype,"padding",void 0),iM([JM(Dk(0)),nM("design:type",Object)],VB.prototype,"strokeWidth",void 0);class BB{constructor(){this.marker=new VB,this.label=new GB,this.maxWidth=void 0,this.paddingX=16,this.paddingY=8,this.toggleSeriesVisible=!0}}iM([JM(Dk(0)),nM("design:type",Number)],BB.prototype,"maxWidth",void 0),iM([JM(Tk(0)),nM("design:type",Object)],BB.prototype,"paddingX",void 0),iM([JM(Tk(0)),nM("design:type",Object)],BB.prototype,"paddingY",void 0),iM([JM(dk),nM("design:type",Boolean)],BB.prototype,"toggleSeriesVisible",void 0);class jB{constructor(){this.legendItemClick=void 0,this.legendItemDoubleClick=void 0}}iM([JM(uk),nM("design:type",Function)],jB.prototype,"legendItemClick",void 0);class HB{set data(e){this._data=e,this.updateGroupVisibility()}get data(){return this._data}set enabled(e){this._enabled=e,this.updateGroupVisibility()}get enabled(){return this._enabled}getOrientation(){if(void 0!==this.orientation)return this.orientation;switch(this.position){case"right":case"left":return"vertical";case"bottom":case"top":return"horizontal"}}constructor(e){this.ctx=e,this.id=pN(this),this.group=new zL({name:"legend",layer:!0,zIndex:WI.LEGEND_ZINDEX}),this.itemSelection=KL.select(this.group,PB),this.oldSize=[0,0],this.pages=[],this.maxPageSize=[0,0],this.paginationTrackingIndex=0,this.item=new BB,this.listeners=new jB,this.truncatedItems=new Set,this._data=[],this._enabled=!0,this.position="bottom",this.maxWidth=void 0,this.maxHeight=void 0,this.reverseOrder=void 0,this.destroyFns=[],this.spacing=20,this.characterWidths=new Map,this.size=[0,0],this._visible=!0,this.item.marker.parent=this,this.pagination=new LB((t=>e.updateService.update(t)),(e=>this.updatePageNumber(e)),e.interactionManager,e.cursorManager),this.pagination.attachPagination(this.group),this.item.marker.parent=this;const t={bypassPause:["animation"]};this.destroyFns.push(e.interactionManager.addListener("click",(e=>this.checkLegendClick(e)),t),e.interactionManager.addListener("dblclick",(e=>this.checkLegendDoubleClick(e)),t),e.interactionManager.addListener("hover",(e=>this.handleLegendMouseMove(e))),e.layoutService.addListener("start-layout",(e=>this.positionLegend(e.shrinkRect))),(()=>this.detachLegend()))}destroy(){this.destroyFns.forEach((e=>e()))}onMarkerShapeChange(){this.itemSelection.clear(),this.group.markDirty(this.group,nN.MINOR)}getCharacterWidths(e){const{characterWidths:t}=this;if(t.has(e))return t.get(e);const i={"...":EN.getTextSize("...",e).width};return t.set(e,i),i}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.append(this.group)}detachLegend(){var e;null===(e=this.group.parent)||void 0===e||e.removeChild(this.group)}getItemLabel(e){const{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}performLayout(e,t){const{paddingX:i,paddingY:n,label:o,maxWidth:r,marker:{size:s,padding:a,shape:l},label:{maxLength:c=1/0,fontStyle:u,fontWeight:d,fontSize:p,fontFamily:h}}=this.item,f=[...this.data];this.reverseOrder&&f.reverse(),this.itemSelection.update(f);const g=[],v=MN(o),y=.8,m=null!==r&&void 0!==r?r:e*y,C=s+a+i;if(this.itemSelection.each(((e,t)=>{var i;const n=_B(null!==l&&void 0!==l?l:t.marker.shape);e.marker&&e.marker instanceof n||(e.marker=new n),e.markerSize=s,e.spacing=a,e.fontStyle=u,e.fontWeight=d,e.fontSize=p,e.fontFamily=h;const o=null!==(i=t.itemId)&&void 0!==i?i:t.id,r=this.getItemLabel(t),f=(null!==r&&void 0!==r?r:"<unknown>").replace(/\r?\n/g," ");e.text=this.truncate(f,c,m,C,v,o),g.push(e.computeBBox())})),e=Math.max(1,e),t=Math.max(1,t),!isFinite(e))return!1;const b=this.size,w=this.oldSize;b[0]=e,b[1]=t,b[0]===w[0]&&b[1]===w[1]||(w[0]=b[0],w[1]=b[1]);const{pages:S,maxPageHeight:E,maxPageWidth:x}=this.updatePagination(g,e,t);this.pages=S,this.maxPageSize=[x-i,E-n];const O=this.pagination.currentPage,T=this.pages[O];this.pages.length<1||!T?this.visible=!1:(this.visible=!0,this.updatePositions(O),this.update())}truncate(e,t,i,n,o,r){const s="...",a=e.split("");let l=!1;e.length>t&&(e=`${e.substring(0,t)}`,l=!0);const c=Math.floor(n+EN.getTextSize(e,o).width);if(c>i){let t="";const r=this.getCharacterWidths(o);let c=n+r[s];for(const e of a){if(r[e]||(r[e]=EN.getTextSize(e,o).width),c+=r[e],c>i)break;t+=e}e=t,l=!0}return l?(e+=s,this.truncatedItems.add(r)):this.truncatedItems.delete(r),e}updatePagination(e,t,i){const n=this.getOrientation(),o=Math.min(this.paginationTrackingIndex,e.length);this.pagination.orientation=n,this.pagination.translationX=0,this.pagination.translationY=0;const{pages:r,maxPageHeight:s,maxPageWidth:a,paginationBBox:l,paginationVertical:c}=this.calculatePagination(e,t,i),u=r.findIndex((e=>e.endIndex>=o));this.pagination.currentPage=Math.min(Math.max(u,0),r.length-1);const{paddingX:d,paddingY:p}=this.item,h=8,f=a-d,g=s-p;let v=0,y=-l.y-this.item.marker.size/2;return c?y+=g+h:(v+=-l.x+f+h,y+=(g-l.height)/2),this.pagination.translationX=v,this.pagination.translationY=y,this.pagination.update(),this.pagination.updateMarkers(),{maxPageHeight:s,maxPageWidth:a,pages:r}}calculatePagination(e,t,i){var n,o,r;const{paddingX:s,paddingY:a}=this.item,l=this.getOrientation(),c=["left","right"].includes(this.position);let u=this.pagination.computeBBox(),d=new gN(0,0,0,0),p=[],h=0,f=0,g=0;const v=e=>{const{width:t,height:i}=e;return t===u.width&&i===u.height},y=void 0!==this.maxWidth||void 0!==this.maxHeight;do{if(g++>10){gM.warn("unable to find stable legend layout.");break}u=d;const v=t-(c?0:u.width),m=i-(c?u.height:0),C=gB({orientation:l,bboxes:e,maxHeight:m,maxWidth:v,itemPaddingY:a,itemPaddingX:s,forceResult:y});p=null!==(n=null===C||void 0===C?void 0:C.pages)&&void 0!==n?n:[],h=null!==(o=null===C||void 0===C?void 0:C.maxPageWidth)&&void 0!==o?o:0,f=null!==(r=null===C||void 0===C?void 0:C.maxPageHeight)&&void 0!==r?r:0;const b=p.length;if(this.pagination.visible=b>1,this.pagination.totalPages=b,this.pagination.update(),d=this.pagination.computeBBox(),!this.pagination.visible)break}while(!v(d));return{maxPageWidth:h,maxPageHeight:f,pages:p,paginationBBox:u,paginationVertical:c}}updatePositions(e=0){const{item:{paddingY:t},itemSelection:i,pages:n}=this;if(n.length<1||!n[e])return;const{columns:o,startIndex:r,endIndex:s}=n[e];let a=0,l=0;const c=o.length,u=o[0].indices.length,d="horizontal"===this.getOrientation(),p=o[0].bboxes[0].height+t,h=[];i.each(((e,t,i)=>{var n,f;if(i<r||i>s)return void(e.visible=!1);const g=i-r;let v=0,y=0;d?(v=g%c,y=Math.floor(g/c)):(v=Math.floor(g/u),y=g%u),e.visible=!0;const m=o[v];m&&(l=p*y,a=null!==(n=h[y])&&void 0!==n?n:0,h[y]=(null!==(f=h[y])&&void 0!==f?f:0)+m.columnWidth,e.translationX=Math.floor(a),e.translationY=Math.floor(l))}))}updatePageNumber(e){const{pages:t}=this,{startIndex:i,endIndex:n}=t[e];0===i?this.paginationTrackingIndex=0:e===t.length-1?this.paginationTrackingIndex=n:this.paginationTrackingIndex=Math.floor((i+n)/2),this.pagination.update(),this.pagination.updateMarkers(),this.updatePositions(e),this.ctx.updateService.update(WV.SCENE_RENDER)}update(){const{label:{color:e},marker:t}=this.item;this.itemSelection.each(((i,n)=>{var o;const r=n.marker;i.markerFill=r.fill,i.markerStroke=r.stroke,i.markerStrokeWidth=null!==(o=t.strokeWidth)&&void 0!==o?o:Math.min(2,r.strokeWidth),i.markerFillOpacity=r.fillOpacity,i.markerStrokeOpacity=r.strokeOpacity,i.opacity=n.enabled?1:.5,i.color=e}))}getDatumForPoint(e,t){const i=[],n={dist:1/0,datum:void 0};for(const r of this.group.children){if(!r.visible)continue;if(!(r instanceof PB))continue;const o=r.computeBBox();if(o.grow(this.item.paddingX/2,"horizontal"),o.grow(this.item.paddingY/2,"vertical"),o.containsPoint(e,t))return r.datum;const s=e-o.x-this.item.paddingX/2,a=t-o.y-this.item.paddingY/2,l=Math.pow(s,2)+Math.pow(a,2),c=s>=0&&a>=0;c&&l<n.dist&&(n.dist=l,n.datum=r.datum),i.push(o)}const o=gN.merge(i);if(o.containsPoint(e,t))return n.datum}computeBBox(){return this.group.computeBBox()}computePagedBBox(){const e=this.group.computeBBox();if(this.pages.length<=1)return e;const[t,i]=this.maxPageSize;return e.height=Math.max(i,e.height),e.width=Math.max(t,e.width),e}checkLegendClick(e){const{listeners:{legendItemClick:t},ctx:{dataService:i,highlightManager:n},item:{toggleSeriesVisible:o}}=this,{offsetX:r,offsetY:s}=e,a=this.computeBBox(),l=this.group.visible&&a.containsPoint(r,
18s),c=this.getDatumForPoint(r,s);if(!l||!c)return;const{id:u,itemId:d,enabled:p}=c,h=i.getSeries(),f=h.find((e=>e.id===u));if(!f)return;e.consume();let g=p;o&&(g=!p,this.ctx.chartEventManager.legendItemClick(f,d,g,c.legendItemName)),g?n.updateHighlight(this.id,{series:f,itemId:d,datum:void 0}):n.updateHighlight(this.id),this.ctx.updateService.update(WV.PROCESS_DATA,{forceNodeDataRefresh:!0}),null===t||void 0===t||t({type:"click",enabled:g,itemId:d,seriesId:f.id})}checkLegendDoubleClick(e){var t;const{listeners:{legendItemDoubleClick:i},ctx:{dataService:n},item:{toggleSeriesVisible:o}}=this,{offsetX:r,offsetY:s}=e;if("integrated"===this.ctx.mode)return;const a=this.computeBBox(),l=this.group.visible&&a.containsPoint(r,s),c=this.getDatumForPoint(r,s);if(!l||!c)return;const{id:u,itemId:d,seriesId:p}=c,h=n.getSeries(),f=h.find((e=>e.id===u));if(f){if(e.consume(),o){const e={},i=h.flatMap((e=>e.getLegendData("category")));i.forEach((t=>{var i,n;null!==(i=e[n=t.seriesId])&&void 0!==i||(e[n]=0),t.enabled&&e[t.seriesId]++}));const n=i.find((e=>e.itemId===d&&e.seriesId===p));this.ctx.chartEventManager.legendItemDoubleClick(f,d,null!==(t=null===n||void 0===n?void 0:n.enabled)&&void 0!==t&&t,e,null===n||void 0===n?void 0:n.legendItemName)}this.ctx.updateService.update(WV.PROCESS_DATA,{forceNodeDataRefresh:!0}),null===i||void 0===i||i({type:"dblclick",enabled:!0,itemId:d,seriesId:f.id})}}handleLegendMouseMove(e){var t;const{enabled:i,item:{toggleSeriesVisible:n},listeners:o}=this;if(!i)return;const r=this.computeBBox(),{pageX:s,pageY:a,offsetX:l,offsetY:c}=e,u=this.group.visible&&r.containsPoint(l,c);if(!u)return this.ctx.cursorManager.updateCursor(this.id),this.ctx.highlightManager.updateHighlight(this.id),void this.ctx.tooltipManager.removeTooltip(this.id);e.consume();const d=this.getDatumForPoint(l,c),p=u&&void 0!==d;if(!p)return this.ctx.cursorManager.updateCursor(this.id),void this.ctx.highlightManager.updateHighlight(this.id);const h=d?this.ctx.dataService.getSeries().find((e=>e.id===(null===d||void 0===d?void 0:d.id))):void 0;d&&this.truncatedItems.has(null!==(t=d.itemId)&&void 0!==t?t:d.id)?this.ctx.tooltipManager.updateTooltip(this.id,{pageX:s,pageY:a,offsetX:l,offsetY:c,event:e,showArrow:!1},BF({content:this.getItemLabel(d)})):this.ctx.tooltipManager.removeTooltip(this.id),(n||null!=o.legendItemClick||null!=o.legendItemDoubleClick)&&this.ctx.cursorManager.updateCursor(this.id,"pointer"),(null===d||void 0===d?void 0:d.enabled)&&h?this.ctx.highlightManager.updateHighlight(this.id,{series:h,itemId:null===d||void 0===d?void 0:d.itemId,datum:void 0}):this.ctx.highlightManager.updateHighlight(this.id)}positionLegend(e){const t=e.clone();if(!this.enabled||!this.data.length)return{shrinkRect:t};const[i,n]=this.calculateLegendDimensions(e);this.group.translationX=0,this.group.translationY=0,this.performLayout(i,n);const o=this.computePagedBBox(),r=()=>{switch(this.position){case"top":case"left":return 0;case"bottom":return e.height-o.height;case"right":default:return e.width-o.width}};if(this.visible){let i,n;switch(this.position){case"top":case"bottom":i=(e.width-o.width)/2,n=r(),t.shrink(o.height,this.position);break;case"left":case"right":default:i=r(),n=(e.height-o.height)/2,t.shrink(o.width,this.position)}this.group.translationX=Math.floor(-o.x+e.x+i),this.group.translationY=Math.floor(-o.y+e.y+n)}if(this.visible&&this.enabled&&this.data.length){const e=this.spacing;t.shrink(e,this.position);const i=o.clone();i.x+=this.group.translationX,i.y+=this.group.translationY,this.ctx.tooltipManager.updateExclusiveRect(this.id,i)}else this.ctx.tooltipManager.updateExclusiveRect(this.id);return{shrinkRect:t}}calculateLegendDimensions(e){const{width:t,height:i}=e,n=t/i,o=.5,r=.2,s=.25;let a,l;switch(this.position){case"top":case"bottom":const e=n<1?Math.min(o,r*(1/n)):r;a=this.maxWidth?Math.min(this.maxWidth,t):t,l=this.maxHeight?Math.min(this.maxHeight,i):Math.round(i*e);break;case"left":case"right":default:const c=n>1?Math.min(o,s*n):s;a=this.maxWidth?Math.min(this.maxWidth,t):Math.round(t*c),l=this.maxHeight?Math.min(this.maxHeight,i):i}return[a,l]}}HB.className="Legend",iM([JM(dk),nM("design:type",Object)],HB.prototype,"_enabled",void 0),iM([JM(Kk),nM("design:type",String)],HB.prototype,"position",void 0),iM([JM(Dk(0)),nM("design:type",Number)],HB.prototype,"maxWidth",void 0),iM([JM(Dk(0)),nM("design:type",Number)],HB.prototype,"maxHeight",void 0),iM([JM(pk),nM("design:type",Boolean)],HB.prototype,"reverseOrder",void 0),iM([JM(FB),nM("design:type",String)],HB.prototype,"orientation",void 0),iM([JM(Tk(0)),nM("design:type",Object)],HB.prototype,"spacing",void 0);class WB{constructor(e,t,i){this.text=void 0,this.className=e,this.parentElement=t,this.document=i}show(e){var t,i;let n=this.element;if(n||(n=this.document.createElement("div"),n.className=this.className,this.element=n),n.style.position="absolute",n.style.left=`${e.x}px`,n.style.top=`${e.y}px`,n.style.width=`${e.width}px`,n.style.height=`${e.height}px`,this.renderer)n.innerHTML=this.renderer();else{const e=this.document.createElement("div");e.style.alignItems="center",e.style.boxSizing="border-box",e.style.display="flex",e.style.justifyContent="center",e.style.margin="8px",e.style.height="100%",e.style.font="12px Verdana, sans-serif",e.innerText=null!==(t=this.text)&&void 0!==t?t:"No data to display",n.append(e)}null===(i=this.parentElement)||void 0===i||i.append(n)}hide(){var e;null===(e=this.element)||void 0===e||e.remove(),this.element=void 0}}iM([JM(uk),nM("design:type",Function)],WB.prototype,"renderer",void 0),iM([JM(fk),nM("design:type",String)],WB.prototype,"text",void 0);class UB{constructor(e){this.noData=new WB("ag-chart-no-data-overlay",e,e.ownerDocument)}}const zB=30;class KB{constructor(e){this.groups={},this.series={},this.expectedSeriesCount=1,this.mode="normal",this.rootGroup=e}setSeriesCount(e){this.expectedSeriesCount=e}requestGroup(e){var t,i,n,o;const{id:r,type:s,rootGroup:a,highlightGroup:l,annotationGroup:c,seriesGrouping:u}=e,{groupIndex:d=r}=null!==u&&void 0!==u?u:{};if(null!=this.series[r])throw new Error(`AG Charts - series already has an allocated layer: ${this.series[r]}`);0===Object.keys(this.series).length&&(this.mode=this.expectedSeriesCount>=zB?"aggressive-grouping":"normal"),null!==(t=(n=this.groups)[s])&&void 0!==t||(n[s]={});const p=this.lookupIdx(d);let h=this.groups[s][p];return h||(h=null!==(i=(o=this.groups[s])[p])&&void 0!==i?i:o[p]={seriesIds:[],group:this.rootGroup.appendChild(new zL({name:`${s}-content`,layer:!0,zIndex:WI.SERIES_LAYER_ZINDEX,zIndexSubOrder:e.getGroupZIndexSubOrder("data")})),highlight:this.rootGroup.appendChild(new zL({name:`${s}-highlight`,layer:!0,zIndex:WI.SERIES_LAYER_ZINDEX,zIndexSubOrder:e.getGroupZIndexSubOrder("highlight")})),annotation:this.rootGroup.appendChild(new zL({name:`${s}-annotation`,layer:!0,zIndex:WI.SERIES_LAYER_ZINDEX,zIndexSubOrder:e.getGroupZIndexSubOrder("annotation")}))}),this.series[r]={layerState:h,seriesConfig:e},h.seriesIds.push(r),h.group.appendChild(a),h.highlight.appendChild(l),h.annotation.appendChild(c),h.group}changeGroup(e){var t,i;const{id:n,seriesGrouping:o,type:r,rootGroup:s,highlightGroup:a,annotationGroup:l,oldGrouping:c}=e,{groupIndex:u=n}=null!==o&&void 0!==o?o:{};(null===(i=null===(t=this.groups[r])||void 0===t?void 0:t[u])||void 0===i?void 0:i.seriesIds.includes(n))||(null!=this.series[n]&&this.releaseGroup({id:n,seriesGrouping:c,type:r,rootGroup:s,highlightGroup:a,annotationGroup:l}),this.requestGroup(e))}releaseGroup(e){var t,i,n,o,r;const{id:s,seriesGrouping:a,rootGroup:l,highlightGroup:c,annotationGroup:u,type:d}=e,{groupIndex:p=s}=null!==a&&void 0!==a?a:{};if(null==this.series[s])throw new Error(`AG Charts - series doesn't have an allocated layer: ${s}`);const h=this.lookupIdx(p),f=null!==(i=null===(t=this.groups[d])||void 0===t?void 0:t[h])&&void 0!==i?i:null===(n=this.series[s])||void 0===n?void 0:n.layerState;if(f&&(f.seriesIds=f.seriesIds.filter((e=>e!==s)),f.group.removeChild(l),f.highlight.removeChild(c),f.annotation.removeChild(u)),0===(null===f||void 0===f?void 0:f.seriesIds.length))this.rootGroup.removeChild(f.group),this.rootGroup.removeChild(f.highlight),this.rootGroup.removeChild(f.annotation),delete this.groups[d][h],delete this.groups[d][s];else if((null===f||void 0===f?void 0:f.seriesIds.length)>0){const e=null===(r=this.series[null===(o=null===f||void 0===f?void 0:f.seriesIds)||void 0===o?void 0:o[0]])||void 0===r?void 0:r.seriesConfig;f.group.zIndexSubOrder=null===e||void 0===e?void 0:e.getGroupZIndexSubOrder("data"),f.highlight.zIndexSubOrder=null===e||void 0===e?void 0:e.getGroupZIndexSubOrder("highlight"),f.annotation.zIndexSubOrder=null===e||void 0===e?void 0:e.getGroupZIndexSubOrder("annotation")}delete this.series[s]}lookupIdx(e){return"normal"===this.mode?e:"string"!==typeof e||(e=Number(e.split("-").slice(-1)[0]),e)?Math.floor(Math.max(Math.min(e/this.expectedSeriesCount,1),0)*zB):0}destroy(){for(const e of Object.values(this.groups))for(const t of Object.values(e))this.rootGroup.removeChild(t.group),this.rootGroup.removeChild(t.highlight),this.rootGroup.removeChild(t.annotation);this.groups={},this.series={}}}class YB{constructor(){this.groups={}}registerSeries({id:e,seriesGrouping:t,visible:i,type:n}){var o,r;t&&(null!==(o=(r=this.groups)[n])&&void 0!==o||(r[n]={}),this.groups[n][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}){var i;if(!t)return{visibleGroupCount:1,index:0};const n=[...Object.entries(null!==(i=this.groups[e])&&void 0!==i?i:{}).filter((([e,t])=>t.visible)).reduce(((e,[t,i])=>(i.visible&&e.add(i.grouping.groupIndex),e)),new Set).values()];return n.sort(((e,t)=>e-t)),{visibleGroupCount:n.length,index:n.indexOf(t.groupIndex)}}}class qB{constructor(e,t){this.chartLike=e,this.layoutService=t,this.destroyFns=[],this.destroyFns.push(this.layoutService.addListener("layout-complete",(e=>this.layoutComplete(e))),this.layoutService.addListener("start-layout",(e=>this.positionPadding(e.shrinkRect))),this.layoutService.addListener("start-layout",(e=>this.positionCaptions(e.shrinkRect))))}destroy(){this.destroyFns.forEach((e=>e()))}layoutComplete({clipSeries:e,series:{paddedRect:t}}){const{seriesArea:i,seriesRoot:n}=this.chartLike;i.clip||e?n.setClipRectInGroupCoordinateSpace(t):n.setClipRectInGroupCoordinateSpace()}positionPadding(e){const{padding:t}=this.chartLike;return e.shrink(t.left,"left"),e.shrink(t.top,"top"),e.shrink(t.right,"right"),e.shrink(t.bottom,"bottom"),{shrinkRect:e}}positionCaptions(e){var t,i,n,o;const{title:r,subtitle:s,footnote:a}=this.chartLike,l=e.clone(),c=t=>{var i;const n=e.height/10,o=null!==(i=t.lineHeight)&&void 0!==i?i:t.fontSize*_N.defaultLineHeightRatio,r=e.width,s=Math.max(o,n);t.computeTextWrap(r,s)},u=(e,t)=>
18{const i=l.y;e.node.x=l.x+l.width/2,e.node.y=i,e.node.textBaseline="top",c(e);const n=e.node.computeBBox(),o=Math.ceil(n.y-i+n.height+t);l.shrink(o,"top")},d=(e,t)=>{const i=l.y+l.height;e.node.x=l.x+l.width/2,e.node.y=i,e.node.textBaseline="bottom",c(e);const n=e.node.computeBBox(),o=Math.ceil(i-n.y+t);l.shrink(o,"bottom")};if(s&&(s.node.visible=null!==(t=s.enabled)&&void 0!==t&&t),r&&(r.node.visible=r.enabled,r.node.visible)){const e=(null===s||void 0===s?void 0:s.node.visible)?BN.SMALL_PADDING:BN.LARGE_PADDING,t=null!==(i=r.spacing)&&void 0!==i?i:e;u(r,t)}return s&&s.node.visible&&u(s,null!==(n=s.spacing)&&void 0!==n?n:0),a&&(a.node.visible=a.enabled,a.node.visible&&d(a,null!==(o=a.spacing)&&void 0!==o?o:0)),{shrinkRect:l}}}class XB extends XI{constructor(e){super(),this.updateCallback=e}update(e=WV.FULL,{forceNodeDataRefresh:t=!1,skipAnimations:i=!1}={}){this.updateCallback(e,{forceNodeDataRefresh:t,skipAnimations:i})}dispatchUpdateComplete(e){const t={type:"update-complete",minRect:e};this.dispatch("update-complete",t)}}function $B(e){let t,n;if(null!=e.window)t=e.window;else if("undefined"!==typeof window)t=window;else{if("undefined"===typeof i.g)throw new Error("AG Charts - unable to resolve global window");t=i.g.window}
18if(null!=e.document)n=e.document;else if("undefined"!==typeof document)n=document;else{if("undefined"===typeof i.g)throw new Error("AG Charts - unable to resolve global document");n=i.g.document}return{document:n,window:t,overrideDevicePixelRatio:e.overrideDevicePixelRatio,sceneMode:e.sceneMode}}class ZB{constructor(){this.clip=void 0,this.padding=new FG(0)}}iM([JM(pk),nM("design:type",Boolean)],ZB.prototype,"clip",void 0);class JB extends $I{getOptions(){var e;const{queuedUserOptions:t}=this,i=null!==(e=t[t.length-1])&&void 0!==e?e:this.userOptions;return PM([i])}autoSizeChanged(e){const{style:t}=this.element;if(e){if(t.display="block",t.width="100%",t.height="100%",!this._lastAutoSize)return;this.resize(void 0,void 0,"autoSize option")}else t.display="inline-block",t.width="auto",t.height="auto"}download(e,t){this.scene.download(e,t)}get destroyed(){return this._destroyed}constructor(e,t){var i;super(),this.id=pN(this),this.processedOptions={},this.userOptions={},this.queuedUserOptions=[],this.seriesRoot=new zL({name:`${this.id}-Series-root`}),this.debug=bM.create(),this.extraDebugStats={},this.container=void 0,this.data=[],this._firstAutoSize=!0,this.padding=new FG(20),this.seriesArea=new ZB,this.title=void 0,this.subtitle=void 0,this.footnote=void 0,this.mode="standalone",this._destroyed=!1,this._destroyFns=[],this.modules={},this.legendModules={},this.processors=[],this.legends=new Map,this._pendingFactoryUpdatesCount=0,this._performUpdateNoRenderCount=0,this._performUpdateType=WV.NONE,this._performUpdateSkipAnimations=!1,this.updateShortcutCount=0,this.seriesToUpdate=new Set,this.updateMutex=new FV,this.updateRequestors={},this.performUpdateTrigger=VV((({count:e})=>oM(this,void 0,void 0,(function*(){this._destroyed||this.updateMutex.acquire((()=>oM(this,void 0,void 0,(function*(){try{yield this.performUpdate(e)}catch(t){this._lastPerformUpdateError=t,gM.error("update error",t)}}))))})))),this._axes=[],this._series=[],this.lastInteractionEvent=void 0,this.pointerScheduler=GV((()=>{this.lastInteractionEvent&&this.handlePointer(this.lastInteractionEvent),this.lastInteractionEvent=void 0})),this.onSeriesNodeClick=e=>{const t=Object.assign(Object.assign({},e),{type:"seriesNodeClick"});Object.defineProperty(t,"series",{enumerable:!1,get:()=>e.series}),this.fireEvent(t)},this.onSeriesNodeDoubleClick=e=>{const t=Object.assign(Object.assign({},e),{type:"seriesNodeDoubleClick"});this.fireEvent(t)},this.specialOverrides=$B(e);const{window:n,document:o}=this.specialOverrides,r=null===t||void 0===t?void 0:t.scene,s=null!==(i=null===t||void 0===t?void 0:t.element)&&void 0!==i?i:o.createElement("div"),a=null===t||void 0===t?void 0:t.container,l=new zL({name:"root"});l.visible=!1,l.append(this.seriesRoot),this.axisGridGroup=new zL({name:"Axes-Grids",layer:!0,zIndex:WI.AXIS_GRID_ZINDEX}),l.appendChild(this.axisGridGroup),this.axisGroup=new zL({name:"Axes",layer:!0,zIndex:WI.AXIS_ZINDEX}),l.appendChild(this.axisGroup),this.element=s,s.classList.add("ag-chart-wrapper"),s.style.position="relative",this.scene=null!==r&&void 0!==r?r:new NV(this.specialOverrides),this.scene.root=l,this.scene.container=s,this.autoSize=!0,this.chartEventManager=new oB,this.cursorManager=new rB(s),this.highlightManager=new sB,this.interactionManager=new uB(s,o,n),this.zoomManager=new pB,this.dataService=new QV((()=>this.series)),this.layoutService=new fB,this.updateService=new XB(((e=WV.FULL,{forceNo
18deDataRefresh:t,skipAnimations:i})=>this.update(e,{forceNodeDataRefresh:t,skipAnimations:i}))),this.seriesStateManager=new YB,this.seriesLayerManager=new KB(this.seriesRoot),this.callbackCache=new IV,this.animationManager=new iB(this.interactionManager,this.updateMutex),this.animationManager.skip(),this.animationManager.play(),this.processors=[new qB(this,this.layoutService)],this.tooltip=new UF(this.scene.canvas.element,o,n,o.body),this.tooltipManager=new dB(this.tooltip,this.interactionManager),this.overlays=new UB(this.element),this.highlight=new HV,this.container=a,jV.observe(this.element,(e=>this.rawResize(e))),this._destroyFns.push(this.interactionManager.addListener("click",(e=>this.onClick(e))),this.interactionManager.addListener("dblclick",(e=>this.onDoubleClick(e))),this.interactionManager.addListener("hover",(e=>this.onMouseMove(e))),this.interactionManager.addListener("leave",(e=>this.onLeave(e))),this.interactionManager.addListener("page-left",(()=>this.destroy())),this.interactionManager.addListener("wheel",(()=>this.disablePointer())),this.interactionManager.addListener("drag-start",(()=>this.disablePointer())),this.animationManager.addListener("animation-frame",(e=>{this.update(WV.SCENE_RENDER)})),this.highlightManager.addListener("highlight-change",(e=>this.changeHighlightDatum(e))),this.zoomManager.addListener("zoom-change",(e=>this.update(WV.PROCESS_DATA,{forceNodeDataRefresh:!0,skipAnimations:!0})))),this.legend=this.attachLegend("category",HB)}addModule(e){if(null!=this.modules[e.optionsKey])throw new Error("AG Charts - module already initialised: "+e.optionsKey);const t=new e.instanceConstructor(this.getModuleContext());this.modules[e.optionsKey]={instance:t},this[e.optionsKey]=t}removeModule(e){var t;null===(t=this.modules[e.optionsKey])||void 0===t||t.instance.destroy(),delete this.modules[e.optionsKey],delete this[e.optionsKey]}attachLegend(e,t){const i=new t(this.getModuleContext());return this.legends.set(e,i),i.attachLegend(this.scene.root),i}addLegendModule(e){if(null!=this.modules[e.optionsKey])throw new Error("AG Charts - module already initialised: "+e.optionsKey);const t=this.attachLegend(e.identifier,e.instanceConstructor);this.modules[e.optionsKey]={instance:t},this[e.optionsKey]=t}removeLegendModule(e){this.legends.delete(e.identifier),this.removeModule(e)}isModuleEnabled(e){return null!=this.modules[e.optionsKey]}getModuleContext(){const{scene:e,animationManager:t,chartEventManager:i,cursorManager:n,highlightManager:o,interactionManager:r,tooltipManager:s,zoomManager:a,dataService:l,layoutService:c,updateService:u,seriesStateManager:d,seriesLayerManager:p,mode:h,callbackCache:f,specialOverrides:{window:g,document:v}}=this;return{window:g,document:v,scene:e,animationManager:t,chartEventManager:i,cursorManager:n,highlightManager:o,interactionManager:r,tooltipManager:s,zoomManager:a,dataService:l,layoutService:c,updateService:u,mode:h,seriesStateManager:d,seriesLayerManager:p,callbackCache:f}}destroy(e){if(this._destroyed)return;const t=null===e||void 0===e?void 0:e.keepTransferableResources;let i;this._performUpdateType=WV.NONE,this._destroyFns.forEach((e=>e())),this.processors.forEach((e=>e.destroy())),this.tooltipManager.destroy(),this.tooltip.destroy(),Object.values(this.legends).forEach((e=>e.destroy())),this.legends.clear(),this.overlays.noData.hide(),jV.unobserve(this.element);for(const n of Object.keys(this.modules))this.removeModule({optionsKey:n});return this.interactionManager.destroy(),this.animationManager.stop(),t?(this.scene.strip(),i={container:this.container,scene:this.scene,element:this.element}):(this.scene.destroy(),this.container=void 0),this.removeAllSeries(),this.seriesLayerManager.destroy(),this.axes.forEach((e=>e.destroy())),this.axes=[],this.callbackCache.invalidateCache(),this._destroyed=!0,i}disablePointer(e=!1){e||this.tooltipManager.removeTooltip(this.id),this.highlightManager.updateHighlight(this.id),this.lastInteractionEvent&&(this.lastInteractionEvent=void 0)}requestFactoryUpdate(e){this._pendingFactoryUpdatesCount++,this.updateMutex.acquire((()=>oM(this,void 0,void 0,(function*(){yield e(),this._pendingFactoryUpdatesCount--}))))}get performUpdateType(){return this._performUpdateType}get lastPerformUpdateError(){return this._lastPerformUpdateError}update(e=WV.FULL,t){var i,n;
18const{forceNodeDataRefresh:o=!1,skipAnimations:r,seriesToUpdate:s=this.series,newAnimationBatch:a}=null!==t&&void 0!==t?t:{};o&&this.series.forEach((e=>e.markNodeDataDirty()));for(const l of s)this.seriesToUpdate.add(l);if(r&&(this.animationManager.skipCurrentBatch(),this._performUpdateSkipAnimations=!0),a&&(this.animationManager.isActive()?this._performUpdateSkipAnimations=!0:null!==(i=this._performUpdateSkipAnimations)&&void 0!==i||(this._performUpdateSkipAnimations=!1)),bM.check(!0)){let t=null!==(n=(new Error).stack)&&void 0!==n?n:"<unknown>";t=t.replace(/\([^)]*/g,""),this.updateRequestors[t]=e}e<this._performUpdateType&&(this._performUpdateType=e,this.performUpdateTrigger.schedule(null===t||void 0===t?void 0:t.backOffMs))}performUpdate(e){var t;return oM(this,void 0,void 0,(function*(){const{_performUpdateType:i,extraDebugStats:n}=this,o=[...this.seriesToUpdate];this._performUpdateType=WV.NONE,this.seriesToUpdate.clear(),0===this.updateShortcutCount&&i<WV.SCENE_RENDER&&this.animationManager.startBatch(this._performUpdateSkipAnimations),this.debug("Chart.performUpdate() - start",WV[i]);const r={start:performance.now()};switch(i){case WV.FULL:case WV.PROCESS_DATA:yield this.processData(),this.disablePointer(!0),r["🏭"]=performance.now();case WV.PERFORM_LAYOUT:if(this.checkUpdateShortcut(WV.PERFORM_LAYOUT))break;if(!this.checkFirstAutoSize(o))break;yield this.processLayout(),r["⌖"]=performance.now();case WV.SERIES_UPDATE:if(this.checkUpdateShortcut(WV.SERIES_UPDATE))break;const{seriesRect:e}=this,s=[...o].map((t=>t.update({seriesRect:e})));yield Promise.all(s),r["🤔"]=performance.now();case WV.TOOLTIP_RECALCULATION:if(this.checkUpdateShortcut(WV.TOOLTIP_RECALCULATION))break;const a=this.tooltipManager.getTooltipMeta(this.id),l="hover"===(null===(t=null===a||void 0===a?void 0:a.event)||void 0===t?void 0:t.type);i<=WV.SERIES_UPDATE&&l&&this.handlePointer(a.event),r["↖"]=performance.now();case WV.SCENE_RENDER:if(this.checkUpdateShortcut(WV.SCENE_RENDER))break;n["updateShortcutCount"]=this.updateShortcutCount,yield this.scene.render({debugSplitTimes:r,extraDebugStats:n}),this.extraDebugStats={};case WV.NONE:this.updateShortcutCount=0,this.updateRequestors={},this._performUpdateSkipAnimations=void 0,this.animationManager.endBatch()}this.updateService.dispatchUpdateComplete(this.getMinRect());const s=performance.now();this.debug("Chart.performUpdate() - end",{chart:this,durationMs:Math.round(100*(s-r["start"]))/100,count:e,performUpdateType:WV[i]})}))}checkUpdateShortcut(e){const t=3;return this.updateShortcutCount>t?(gM.warn(`exceeded the maximum number of simultaneous updates (${t+1}), discarding changes and rendering`,this.updateRequestors),!1):this.performUpdateType<=e&&(this.updateShortcutCount++,!0)}checkFirstAutoSize(e){if(this.autoSize&&!this._lastAutoSize){const t=this._performUpdateNoRenderCount++,i=10*(2^t);if(t<8)return this.update(WV.PERFORM_LAYOUT,{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}set axes(e){const t=new Set;this._axes.forEach((e=>{e.detachAxis(this.axisGroup,this.axisGridGroup),t.add(e)})),this._axes=e.filter((e=>!e.linkedTo)).concat(e.filter((e=>e.linkedTo))),this._axes.forEach((e=>{e.attachAxis(this.axisGroup,this.axisGridGroup),t.delete(e)})),this.zoomManager.updateAxes(this._axes),t.forEach((e=>e.destroy()))}get axes(){return this._axes}set series(e){this.removeAllSeries(),this.seriesLayerManager.setSeriesCount(e.length),e.forEach((e=>this.addSeries(e)))}get series(){return this._series}addSeries(e){const{series:t}=this,i=t.indexOf(e)<0;return!!i&&(t.push(e),null==e.rootGroup.parent&&this.seriesLayerManager.requestGroup(e),this.initSeries(e),!0)}initSeries(e){const t=this;e.chart={get mode(){return t.mode},get seriesRect(){return t.seriesRect},placeLabels(){return t.placeLabels()}},e.setChartData(this.data),this.addSeriesListeners(e),e.addChartEventListeners()}removeAllSeries(){this.series.forEach((e=>{e.removeEventListener("nodeClick",this.onSeriesNodeClick),e.removeEventListener("nodeDoubleClick",this.onSeriesNodeDoubleClick),e.destroy(),e.chart=void 0})),this._series=[]}addSeriesListeners(e){this.hasEventListener("seriesNodeClick")&&e.addEventListener("nodeClick",this.onSeriesNodeClick),this.hasEventListener("seriesNodeDoubleClick")&&e.addEventListener("nodeDoubleClick",this.onSeriesNodeDoubleClick)}
18updateAllSeriesListeners(){this.series.forEach((e=>{e.removeEventListener("nodeClick",this.onSeriesNodeClick),e.removeEventListener("nodeDoubleClick",this.onSeriesNodeDoubleClick),this.addSeriesListeners(e)}))}assignSeriesToAxes(){this.axes.forEach((e=>{e.boundSeries=this.series.filter((t=>{const i=t.axes[e.direction];return i===e}))}))}assignAxesToSeries(){const e={};this.axes.forEach((t=>{var i;const n=t.direction,o=null!==(i=e[n])&&void 0!==i?i:e[n]=[];o.push(t)})),this.series.forEach((t=>{t.directions.forEach((i=>{const n=e[i];if(!n)return void gM.warnOnce(`no available axis for direction [${i}]; check series and axes configuration.`);const o=t.getKeys(i),r=this.findMatchingAxis(n,o);r?t.axes[i]=r:gM.warnOnce(`no matching axis for direction [${i}] and keys [${o}]; check series and axes configuration.`)}))}))}findMatchingAxis(e,t){for(const i of e){const e=i.keys;if(!e.length)return i;if(t)for(const n of t)if(e.indexOf(n)>=0)return i}}rawResize(e){var t;let{width:i,height:n}=e;if(i=Math.floor(i),n=Math.floor(n),!this.autoSize)return;if(0===i&&0===n)return;const[o=0,r=0]=null!==(t=this._lastAutoSize)&&void 0!==t?t:[];o===i&&r===n||(this._lastAutoSize=[i,n],this.resize(void 0,void 0,"SizeMonitor"))}resize(e,t,i){var n,o,r,s;if(null!==e&&void 0!==e||(e=null!==(n=this.width)&&void 0!==n?n:this.autoSize?null===(o=this._lastAutoSize)||void 0===o?void 0:o[0]:this.scene.canvas.width),null!==t&&void 0!==t||(t=null!==(r=this.height)&&void 0!==r?r:this.autoSize?null===(s=this._lastAutoSize)||void 0===s?void 0:s[1]:this.scene.canvas.height),this.debug(`Chart.resize() from ${i}`,{width:e,height:t,stack:(new Error).stack}),e&&t&&Number.isFinite(e)&&Number.isFinite(t)&&this.scene.resize(e,t)){this.disablePointer(),this.animationManager.reset();let e=!0;this.autoSize&&this._firstAutoSize&&(e=!1,this._firstAutoSize=!1),this.update(WV.PERFORM_LAYOUT,{forceNodeDataRefresh:!0,skipAnimations:e})}}processData(){return oM(this,void 0,void 0,(function*(){this.series.some((e=>e.canHaveAxes))&&(this.assignAxesToSeries(),this.assignSeriesToAxes());const e=new JV(this.mode),t=this.series.map((t=>t.processData(e)));yield e.execute(),yield Promise.all(t),yield this.updateLegend()}))}placeLabels(){const e=[],t=[];for(const o of this.series){if(!o.visible)continue;const i=o.getLabelData();i&&WG(i[0])&&(t.push(i),e.push(o))}const{seriesRect:i}=this,n=i&&t.length>0?UG(t,{x:0,y:0,width:i.width,height:i.height}):[];return new Map(n.map(((t,i)=>[e[i],t])))}updateLegend(){return oM(this,void 0,void 0,(function*(){this.legends.forEach(((e,t)=>{const i=e=>e.every((e=>"category"===e.legendType)),n=this.series.filter((e=>e.showInLegend)).flatMap((e=>e.getLegendData(t)));i(n)&&this.validateCategoryLegendData(n),e.data=n}))}))}validateCategoryLegendData(e){const t={};e.forEach((e=>{var i,n,o,r,s;const a=null===(i=this.series.find((t=>t.id===e.seriesId)))||void 0===i?void 0:i.type;a&&(null!==(n=t[a])&&void 0!==n||(t[a]={}),null!==(o=(r=t[a])[s=e.label.text])&&void 0!==o||(r[s]=new Set),null!=e.marker.fill&&t[a][e.label.text].add(e.marker.fill))}));for(const i of Object.values(t))for(const[e,t]of Object.entries(i))t.size>1&&gM.warnOnce(`legend item '${e}' has multiple fill colors, this may cause unexpected behaviour.`)}processLayout(){var e;return oM(this,void 0,void 0,(function*(){const t=this.animationRect;yield this.performLayout(),t&&!(null===(e=this.animationRect)||void 0===e?void 0:e.equals(t))&&this.animationManager.skipCurrentBatch(),this.handleNoDataOverlay(),this.debug("Chart.performUpdate() - seriesRect",this.seriesRect)}))}performLayout(){return oM(this,void 0,void 0,(function*(){this.scene.root&&(this.scene.root.visible=!0);const{width:e,height:t}=this.scene;let i={shrinkRect:new gN(0,0,e,t)};return i=this.layoutService.dispatchPerformLayout("start-layout",i),i=this.layoutService.dispatchPerformLayout("before-series",i),i.shrinkRect}))}pickSeriesNode(e,t,i){var n,o;const r=performance.now(),s=t?[oF.EXACT_SHAPE_MATCH]:void 0,a=[...this.series].reverse();let l;for(const c of a){if(!c.visible||!c.rootGroup.visible)continue;const{match:t,distance:o}=null!==(n=c.pickNode(e,s))&&void 0!==n?n:{};if(t&&null!=o&&((!l||l.distance>o)&&o<=(null!==i&&void 0!==i?i:1/0)&&(l={series:c,distance:o,datum:t}),0===o))break}return this.extraDebugStats["pickSeriesNode"]=Math.round((null!==(o=this.extraDebugStats["pickSeriesNode"])&&void 0!==o?o:0)+(performance.now()-r)),l}onMouseMove(e){this.lastInteractionEvent=e,this.pointerScheduler.schedule(),this.extraDebugStats["mouseX"]=e.offsetX,this.extraDebugStats["mouseY"]=e.offsetY,this.update(WV.SCENE_RENDER)}onLeave(e){this.tooltip.pointerLeftOntoTooltip(e)||this.disablePointer()}handlePointer(e){const{lastPick:t,hoverRect:i}=this,{offsetX:n,offsetY:o}=e,r=(e=!1)=>{t&&this.disablePointer(e)};(null===i||void 0===i?void 0:i.containsPoint(n,o))?(this.handlePointerTooltip(e,r),this.handlePointerNode(e)):r()}handlePointerTooltip(e,t){const{lastPick:i,tooltip:n}=this,{range:o}=n,{offsetX:r,offsetY:s}=e;let a;
18"number"===typeof o&&Number.isFinite(o)&&(a=o);const l=this.pickSeriesNode({x:r,y:s},"exact"===o,a);if(!l)return this.tooltipManager.removeTooltip(this.id),void("tooltip"===this.highlight.range&&t(!0));const c="node"===this.highlight.range||!i||i.datum!==l.datum;let u;c?(u=l.series.getTooltipHtml(l.datum),"tooltip"===this.highlight.range&&this.highlightManager.updateHighlight(this.id,l.datum)):i&&(i.event=e.sourceEvent);const d=null!=a,p=this.tooltip.enabled&&l.series.tooltip.enabled,h="exact"===o&&0===l.distance,f="nearest"===o||d||h,g=p&&f&&(!c||void 0!==u),v=dB.makeTooltipMeta(e,this.scene.canvas,l.datum,this.specialOverrides.window);g&&this.tooltipManager.updateTooltip(this.id,v,u)}handlePointerNode(e){const t=this.checkSeriesNodeRange(e,((e,t)=>{(e.hasEventListener("nodeClick")||e.hasEventListener("nodeDoubleClick"))&&this.cursorManager.updateCursor("chart","pointer"),"node"===this.highlight.range&&this.highlightManager.updateHighlight(this.id,t)}));t||(this.cursorManager.updateCursor("chart"),"node"===this.highlight.range&&this.highlightManager.updateHighlight(this.id))}onClick(e){this.checkSeriesNodeClick(e)?this.update(WV.SERIES_UPDATE):this.fireEvent({type:"click",event:e.sourceEvent})}onDoubleClick(e){this.checkSeriesNodeDoubleClick(e)?this.update(WV.SERIES_UPDATE):this.fireEvent({type:"doubleClick",event:e.sourceEvent})}checkSeriesNodeClick(e){return this.checkSeriesNodeRange(e,((t,i)=>t.fireNodeClickEvent(e.sourceEvent,i)))}checkSeriesNodeDoubleClick(e){return this.checkSeriesNodeRange(e,((t,i)=>t.fireNodeDoubleClickEvent(e.sourceEvent,i)))}checkSeriesNodeRange(e,t){const i=this.pickSeriesNode({x:e.offsetX,y:e.offsetY},!1),n=null===i||void 0===i?void 0:i.datum,o=null===n||void 0===n?void 0:n.series.nodeClickRange;let r;"number"===typeof o&&Number.isFinite(o)&&(r=o);let s=this.pickSeriesNode({x:e.offsetX,y:e.offsetY},!0);if(s?this.highlightManager.updatePicked(this.id,s.datum):this.highlightManager.updatePicked(this.id),n&&"nearest"===o)return t(n.series,n),!0;if("exact"!==o&&(s=this.pickSeriesNode({x:e.offsetX,y:e.offsetY},!1,r)),!s)return!1;const a=null!=r,l="exact"===o&&0===s.distance;return!(!a&&!l)&&(t(s.series,s.datum),!0)}changeHighlightDatum(e){var t,i;const n=new Set,{series:o,datum:r}=null!==(t=e.currentHighlight)&&void 0!==t?t:{},{series:s,datum:a}=null!==(i=e.previousHighlight)&&void 0!==i?i:{};s&&n.add(s),o&&n.add(o),(null===s||void 0===s?void 0:s.cursor)&&a&&this.cursorManager.updateCursor(s.id),(null===o||void 0===o?void 0:o.cursor)&&r&&this.cursorManager.updateCursor(o.id,o.cursor),this.lastPick=e.currentHighlight?{datum:e.currentHighlight}:void 0;const l=null==o||null==s;l?this.update(WV.SERIES_UPDATE):this.update(WV.SERIES_UPDATE,{seriesToUpdate:n})}waitForUpdate(e=5e3){return oM(this,void 0,void 0,(function*(){const t=performance.now();this._pendingFactoryUpdatesCount>0&&(yield this.updateMutex.waitForClearAcquireQueue());while(this._performUpdateType!==WV.NONE){if(performance.now()-t>e)throw new Error("waitForUpdate() timeout reached.");yield LV(5)}yield this.updateMutex.waitForClearAcquireQueue()}))}handleNoDataOverlay(){const e=!this.series.some((e=>e.hasData()));e&&this.seriesRect?this.overlays.noData.show(this.seriesRect):this.overlays.noData.hide()}getMinRect(){const e=this.series.map((e=>e.getMinRect())).filter((e=>void 0!==e));if(e.length)return new gN(0,0,e.reduce(((e,t)=>Math.max(e,t.width)),0),e.reduce(((e,t)=>Math.max(e,t.height)),0))}}var QB;iM([VN({newValue(e){this.destroyed||e.appendChild(this.element)},oldValue(e){e.removeChild(this.element)}}),nM("design:type",Object)],JB.prototype,"container",void 0),iM([VN({newValue(e){var t;null===(t=this.series)||void 0===t||t.forEach((t=>{t.setChartData(e)}))}}),nM("design:type",Object)],JB.prototype,"data",void 0),iM([VN({newValue(e){this.resize(e,void 0,"width option")}}),nM("design:type",Number)],JB.prototype,"width",void 0),iM([VN({newValue(e){this.resize(void 0,e,"height option")}}),nM("design:type",Number)],JB.prototype,"height",void 0),iM([VN({changeValue(e){this.autoSizeChanged(e)}}),JM(dk),nM("design:type",Object)],JB.prototype,"autoSize",void 0),iM([VN({newValue(e){var t;null===(t=this.scene.root)||void 0===t||t.appendChild(e.node)},oldValue(e){var t;null===(t=this.scene.root)||void 0===t||t.removeChild(e.node)}}),nM("design:type",Function)],JB.prototype,"title",void 0),iM([VN({newValue(e){var t;null===(t=this.scene.root)||void 0===t||t.appendChild(e.node)},oldValue(e){var t;null===(t=this.scene.root)||void 0===t||t.removeChild(e.node)}}),nM("design:type",Function)],JB.prototype,"subtitle",void 0),iM([VN({newValue(e){var t;null===(t=this.scene.root)||void 0===t||t.appendChild(e.node)},oldValue(e){var t;null===(t=this.scene.root)||void 0===t||t.removeChild(e.node)}}),nM("design:type",Function)],JB.prototype,"footnote",void 0),iM([JM(Mk("standalone","integrated")),nM("design:type",String)],JB.prototype,"mode",void 0),function(e){e[e["Open"]=0]="Open",e[e["Chord"]=1]="Chord",e[e["Round"]=2]="Round"}(QB||(QB={}));class ej extends aI{constructor(){super(),this.centerX=0,this.centerY=0,this.radius=10,this.startAngle=0,this.endAngle=2*Math.PI,this.counterClockwise=!1,this.type=QB.Open,this.restoreOwnStyles()}get fullPie(){return KM(FM(this.startAngle),FM(this.endAngle))}updatePath(){const e=this.path;e.clear(),e.arc(this.centerX,this.centerY,this.radius,this.startAngle,this.endAngle,this.counterClockwise),this.type===QB.Chord?e.closePath():this.type!==QB.Round||this.fullPie||(e.lineTo(this.centerX,this.centerY),e.closePath())}computeBBox(){return new gN(this.centerX-this.radius,this.centerY-this.radius,2*this.radius,2*this.radius)}isPointInPath(e,t){const i=this.transformPoint(e,t),n=this.computeBBox();return this.type!==QB.Open&&n.containsPoint(i.x,i.y)&&this.path.isPointInPath(i.x,i.y)}}ej.className="Arc",ej.defaultStyles=Object.assign({},DN.defaultStyles,{lineWidth:1,fillStyle:null}),iM([sI(),nM("design:type",Number)],ej.prototype,"centerX",void 0),iM([sI(),nM("design:type",Number)],ej.prototype,"centerY",void 0),iM([sI(),nM("design:type",Number)],ej.prototype,"radius",void 0),iM([sI(),nM("design:type",Number)],ej.prototype,"startAngle",void 0),iM([sI(),nM("design:type",Number)],ej.prototype,"endAngle",void 0),iM([sI(),nM("design:type",Boolean)],ej.prototype,"counterClockwise",void 0),iM([sI(),nM("design:type",Number)],ej.prototype,"type",void 0);const tj=e=>{const t=ZM.fromString(e),[i,n,o]=ZM.RGBtoHSL(t.r,t.g,t.b);return{h:i,s:n,l:o,a:t.a}},ij=(e,t,i)=>{let n,o;
18if(i=Math.min(Math.max(i,0),1),Number.isNaN(e.h)&&Number.isNaN(t.h))n=0,o=0;else if(Number.isNaN(e.h))n=t.h,o=t.s;else if(Number.isNaN(t.h))n=e.h,o=e.s;else{const r=e.h;let s=t.h;const a=t.h-e.h;a>180?s-=360:a<-180&&(s+=360),n=r*(1-i)+s*i,o=e.s*(1-i)+t.s*i}const r=e.l*(1-i)+t.l*i,s=e.a*(1-i)+t.a*i;return ZM.fromHSL(n,o,r,s)};class nj{constructor(){this.domain=[0,1],this.range=["red","blue"],this.parsedRange=this.range.map(tj)}update(){const{domain:e,range:t}=this;e.length<2&&(gM.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 i=1;i<e.length;i++){const t=e[i-1],n=e[i];if(t>=n){gM.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(tj)}convert(e){const{domain:t,range:i,parsedRange:n}=this,o=t[0],r=t[t.length-1],s=i[0],a=i[i.length-1];if(e<=o)return s;if(e>=r)return a;let l,c;if(2===t.length){const t=(e-o)/(r-o),n=1/(i.length-1);l=i.length<=2?0:Math.min(Math.floor(t*(i.length-1)),i.length-2),c=(t-l*n)/n}else{for(l=0;l<t.length-2;l++)if(e<t[l+1])break;const i=t[l],n=t[l+1];c=(e-i)/(n-i)}const u=n[l],d=n[l+1];return ij(u,d,c).toRgbaString()}}class oj extends DN{constructor(){super(...arguments),this.direction="to-right",this.stops=void 0,this._mask=void 0}get mask(){return this._mask}set mask(e){null!=this._mask&&this.removeChild(this._mask),null!=e&&this.appendChild(e),this._mask=e}isPointInPath(e,t){var i,n;return null!==(n=null===(i=this.mask)||void 0===i?void 0:i.isPointInPath(e,t))&&void 0!==n&&n}computeBBox(){var e;return null===(e=this.mask)||void 0===e?void 0:e.computeBBox()}render(e){const{mask:t,stops:i}=this,{ctx:n,devicePixelRatio:o}=e,r=1/o,s=null===t||void 0===t?void 0:t.computeTransformedBBox();if(null==t||null==i||null==s)return;t.dirtyPath&&(t.updatePath(),t.dirtyPath=!1),n.save(),n.beginPath(),t.path.draw(n),n.clip(),n.resetTransform();const a=Math.floor(s.x),l=Math.ceil(s.x+s.width),c=Math.floor(s.y),u=Math.ceil(s.y+s.height),d=new nj,[p,h]="to-right"===this.direction?[a,l]:[c,u];if(d.domain=i.map(((e,t)=>p+(h-p)*t/(i.length-1))),d.range=i,d.update(),"to-right"===this.direction){const e=u-c;for(let t=a;t<=l;t+=r)n.fillStyle=d.convert(t),n.fillRect(t,c,r,e)}else{const e=l-a;for(let t=c;t<=u;t+=r)n.fillStyle=d.convert(t),n.fillRect(a,t,e,r)}n.restore()}}iM([sN({redraw:nN.MAJOR}),nM("design:type",String)],oj.prototype,"direction",void 0),iM([sN({redraw:nN.MAJOR}),nM("design:type",Array)],oj.prototype,"stops",void 0),iM([sN({redraw:nN.MAJOR}),nM("design:type",Function)],oj.prototype,"_mask",void 0);class rj extends aI{constructor(){super(...arguments),this.borderPath=new rI,this.x=0,this.y=0,this.width=10,this.height=10,this.radius=0,this.crisp=!1,this.lastUpdatePathStrokeWidth=DN.defaultStyles.strokeWidth,this.effectiveStrokeWidth=DN.defaultStyles.strokeWidth,this.microPixelEffectOpacity=1}isDirtyPath(){var e;return this.lastUpdatePathStrokeWidth!==this.strokeWidth||!!(this.path.isDirty()||this.borderPath.isDirty()||(null===(e=this.clipPath)||void 0===e?void 0:e.isDirty()))}updatePath(){var e,t,i;const{path:n,borderPath:o,crisp:r}=this;let{x:s,y:a,width:l,height:c,strokeWidth:u}=this;const d=null!==(t=null===(e=this.layerManager)||void 0===e?void 0:e.canvas.pixelRatio)&&void 0!==t?t:1,p=1/d;let h=1;if(n.clear({trackChanges:!0}),o.clear({trackChanges:!0}),r&&(l<=p&&(h*=l/p),c<=p&&(h*=c/p),l=this.align(s,l),c=this.align(a,c),s=this.align(s),a=this.align(a)),u)if(l<p){const e=s+p/2;o.moveTo(e,a),o.lineTo(e,a+c),u=p,this.borderClipPath=void 0}else if(c<p){const e=a+p/2;o.moveTo(s,e),o.lineTo(s+l,e),u=p,this.borderClipPath=void 0}else if(u<l&&u<c){const e=u/2;s+=e,a+=e,l-=u,c-=u,this.borderClipPath=void 0,n.rect(s,a,l,c),o.rect(s,a,l,c)}else this.borderClipPath=null!==(i=this.borderClipPath)&&void 0!==i?i:new rI,this.borderClipPath.clear({trackChanges:!0}),this.borderClipPath.rect(s,a,l,c),o.rect(s,a,l,c);else this.borderClipPath=void 0,n.rect(s,a,l,c);this.effectiveStrokeWidth=u,this.lastUpdatePathStrokeWidth=u,this.microPixelEffectOpacity=h}computeBBox(){const{x:e,y:t,width:i,height:n}=this;return new gN(e,t,i,n)}isPointInPath(e,t){const i=this.transformPoint(e,t),n=this.computeBBox();return n.containsPoint(i.x,i.y)}applyFillAlpha(e){const{fillOpacity:t,microPixelEffectOpacity:i,opacity:n}=this,{globalAlpha:o}=e;e.globalAlpha=o*n*t*i}renderStroke(e){const{stroke:t,effectiveStrokeWidth:i,borderPath:n,borderClipPath:o,opacity:r,microPixelEffectOpacity:s}=this,a=!!t&&!!i;if(a){const{strokeOpacity:a,lineDash:l,lineDashOffset:c,lineCap:u,lineJoin:d}=this;o&&(o.draw(e),e.clip()),n.draw(e);const{globalAlpha:p}=e;
18e.strokeStyle=t,e.globalAlpha=p*r*a*s,e.lineWidth=i,l&&e.setLineDash(l),c&&(e.lineDashOffset=c),u&&(e.lineCap=u),d&&(e.lineJoin=d),e.stroke(),e.globalAlpha=p}}}rj.className="Rect",iM([sI(),nM("design:type",Number)],rj.prototype,"x",void 0),iM([sI(),nM("design:type",Number)],rj.prototype,"y",void 0),iM([sI(),nM("design:type",Number)],rj.prototype,"width",void 0),iM([sI(),nM("design:type",Number)],rj.prototype,"height",void 0),iM([sI(),nM("design:type",Number)],rj.prototype,"radius",void 0),iM([sI(),nM("design:type",Boolean)],rj.prototype,"crisp",void 0);class sj extends CN{constructor(e){super(),this.x=0,this.y=0,this.width=0,this.height=0,this.opacity=1,this.sourceImage=e}render(e){const{ctx:t,forceRender:i,stats:n}=e;if(this.dirty===nN.NONE&&!i)return void(n&&n.nodesSkipped++);this.computeTransformMatrix(),this.matrix.toContext(t);const o=this.sourceImage;t.globalAlpha=this.opacity,t.drawImage(o,0,0,o.width,o.height,this.x,this.y,this.width,this.height),super.render(e)}}iM([sN({redraw:nN.MAJOR}),nM("design:type",Number)],sj.prototype,"x",void 0),iM([sN({redraw:nN.MAJOR}),nM("design:type",Number)],sj.prototype,"y",void 0),iM([sN({redraw:nN.MAJOR}),nM("design:type",Number)],sj.prototype,"width",void 0),iM([sN({redraw:nN.MAJOR}),nM("design:type",Number)],sj.prototype,"height",void 0),iM([sN({redraw:nN.MAJOR}),nM("design:type",Number)],sj.prototype,"opacity",void 0);const aj=Object.assign(Object.assign({},hL),ZF);var lj=Object.freeze({__proto__:null,motion:aj,Caption:BN,DropShadow:bN,Group:zL,Scene:NV,Node:CN,get PointerEvents(){return yN},get RedrawType(){return nN},SceneChangeDetection:sN,Selection:KL,Arc:ej,Line:YL,LinearGradientFill:oj,Path:aI,ScenePathChangeDetection:sI,Rect:rj,Sector:lI,Shape:DN,Text:_N,getFont:MN,ContinuousScale:jL,BandScale:UM,LinearScale:HL,toRadians:BM,Label:FI,Marker:UI,getMarker:_B,Circle:zI,Diamond:SB,Square:OB,Triangle:TB,Tooltip:UF,toTooltipHtml:BF,BBox:gN,nearestSquared:hN,nearestSquaredInContainer:fN,HdpiCanvas:EN,Image:sj,Path2D:rI,easing:J
18N});const cj={[iN.X]:["xKey"],[iN.Y]:["yKey"]},uj={[iN.X]:["xName"],[iN.Y]:["yName"]};class dj extends hF{constructor(e,t,i,n){super(e,t,i,n),this.xKey=n.xKey,this.yKey=n.yKey}}class pj extends QF{get contextNodeData(){return this._contextNodeData.slice()}constructor(e){var{pathsPerSeries:t=1,hasMarkers:i=!1,hasHighlightedLabels:n=!1,pathsZIndexSubOrderOffset:o=[],directionKeys:r=cj,directionNames:s=uj,datumSelectionGarbageCollection:a=!0,markerSelectionGarbageCollection:l=!0,animationResetFns:c}=e,u=tM(e,["pathsPerSeries","hasMarkers","hasHighlightedLabels","pathsZIndexSubOrderOffset","directionKeys","directionNames","datumSelectionGarbageCollection","markerSelectionGarbageCollection","animationResetFns"]);super(Object.assign({directionKeys:r,directionNames:s,useSeriesGroupLayer:!0,canHaveAxes:!0},u)),this.legendItemName=void 0,this._contextNodeData=[],this.NodeClickEvent=dj,this.highlightSelection=KL.select(this.highlightNode,(()=>this.opts.hasMarkers?this.markerFactory():this.nodeFactory())),this.highlightLabelSelection=KL.select(this.highlightLabel,_N),this.annotationSelections=new Set,this.subGroups=[],this.subGroupId=0,this.debug=bM.create(),this.opts={pathsPerSeries:t,hasMarkers:i,hasHighlightedLabels:n,pathsZIndexSubOrderOffset:o,directionKeys:r,directionNames:s,animationResetFns:c,datumSelectionGarbageCollection:a,markerSelectionGarbageCollection:l},this.animationState=new JF("empty",{empty:{update:{target:"ready",action:e=>this.animateEmptyUpdateReady(e)}},ready:{updateData:"waiting",clear:"clearing",highlight:e=>this.animateReadyHighlight(e),highlightMarkers:e=>this.animateReadyHighlightMarkers(e),resize:e=>this.animateReadyResize(e)},waiting:{update:{target:"ready",action:e=>this.animateWaitingUpdateReady(e)}},clearing:{update:{target:"empty",action:e=>this.animateClearingUpdateEmpty(e)}}},(()=>this.checkProcessedDataAnimatable()))}addChartEventListeners(){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.splice(0,this._contextNodeData.length),this.subGroups.splice(0,this.subGroups.length)}update({seriesRect:e}){var t,i;return oM(this,void 0,void 0,(function*(){const{visible:n,_contextNodeData:o}=this,{series:r}=null!==(i=null===(t=this.ctx.highlightManager)||void 0===t?void 0:t.getActiveHighlight())&&void 0!==i?i:{},s=r?r===this:void 0,a=this.checkResize(e),l=yield this.updateHighlightSelection(s);yield this.updateSelections(n),yield this.updateNodes(l,s,n);const c=this.getAnimationData(e,o);a&&this.animationState.transition("resize",c),this.animationState.transition("update",c)}))}updateSelections(e){return oM(this,void 0,void 0,(function*(){if((e||!this.ctx.animationManager.isSkipped())&&(this.nodeDataRefresh||this.isPathOrSelectionDirty())){if(this.nodeDataRefresh){this.nodeDataRefresh=!1,this.debug("CartesianSeries.updateSelections() - calling createNodeData() for",this.id),this._contextNodeData=yield this.createNodeData();const e=this.isProcessedDataAnimatable();this._contextNodeData.forEach((t=>{var i;null!==(i=t.animationValid)&&void 0!==i||(t.animationValid=e)})),yield this.updateSeriesGroups();const{dataModel:t,processedData:i}=this;void 0!==t&&void 0!==i&&this.dispatch("data-update",{dataModel:t,processedData:i})}yield Promise.all(this.subGroups.map(((e,t)=>this.updateSeriesGroupSelections(e,t))))}}))}updateSeriesGroupSelections(e,t,i){return oM(this,void 0,void 0,(function*(){const{datumSelection:n,labelSelection:o,markerSelection:r,paths:s}=e,a=this._contextNodeData[t],{nodeData:l,labelData:c,itemId:u}=a;yield this.updatePaths({seriesHighlighted:i,itemId:u,contextData:a,paths:s,seriesIdx:t}),e.datumSelection=yield this.updateDatumSelection({nodeData:l,datumSelection:n,seriesIdx:t}),e.labelSelection=yield this.updateLabelSelection({labelData:c,labelSelection:o,seriesIdx:t}),r&&(e.markerSelection=yield this.updateMarkerSelection({nodeData:l,markerSelection:r,seriesIdx:t}))}))}markerFactory(){const e=_B();return new e}updateSeriesGroups(){return oM(this,void 0,void 0,(function*(){const{_contextNodeData:e,contentGroup:t,subGroups:i,opts:{pathsPerSeries:n,hasMarkers:o,datumSelectionGarbageCollection:r,markerSelectionGarbageCollection:s}}=this;if(e.length===i.length)return;
18e.length<i.length&&i.splice(e.length).forEach((({dataNodeGroup:e,markerGroup:i,labelGroup:n,paths:o})=>{t.removeChild(e),i&&t.removeChild(i),n&&t.removeChild(n);for(const r of o)t.removeChild(r)}));const a=e.length;while(a>i.length){const e=!1,a=this.subGroupId++,l=new zL({name:`${this.id}-series-sub${a}-dataNodes`,layer:e,zIndex:WI.SERIES_LAYER_ZINDEX,zIndexSubOrder:this.getGroupZIndexSubOrder("data",a)}),c=o?new zL({name:`${this.id}-series-sub${this.subGroupId++}-markers`,layer:e,zIndex:WI.SERIES_LAYER_ZINDEX,zIndexSubOrder:this.getGroupZIndexSubOrder("marker",a)}):void 0,u=new zL({name:`${this.id}-series-sub${this.subGroupId++}-labels`,layer:e,zIndex:WI.SERIES_LABEL_ZINDEX,zIndexSubOrder:this.getGroupZIndexSubOrder("labels",a)});t.appendChild(l),t.appendChild(u),c&&t.appendChild(c);const d=[];for(let i=0;i<n;i++)d[i]=new aI,d[i].zIndex=WI.SERIES_LAYER_ZINDEX,d[i].zIndexSubOrder=this.getGroupZIndexSubOrder("paths",i),t.appendChild(d[i]);i.push({paths:d,dataNodeGroup:l,markerGroup:c,labelGroup:u,labelSelection:KL.select(u,_N),datumSelection:KL.select(l,(()=>this.nodeFactory()),r),markerSelection:c?KL.select(c,(()=>this.markerFactory()),s):void 0})}}))}getGroupZIndexSubOrder(e,t=0){var i;const n=super.getGroupZIndexSubOrder(e,t);if("paths"===e){const e=null!==(i=this.opts.pathsZIndexSubOrderOffset[t])&&void 0!==i?i:0,o=n[0];n[0]="function"===typeof o?()=>+o()+e:+o+e}return n}updateNodes(e,t,i){var n;return oM(this,void 0,void 0,(function*(){const{highlightSelection:o,highlightLabelSelection:r,opts:{hasMarkers:s,hasHighlightedLabels:a}}=this,l=!this.ctx.animationManager.isSkipped(),c=this.visible&&(null===(n=this._contextNodeData)||void 0===n?void 0:n.length)>0&&i;this.rootGroup.visible=l||c,this.contentGroup.visible=l||c,this.highlightGroup.visible=(l||c)&&!!t;const u=this.getOpacity();s?(yield this.updateMarkerNodes({markerSelection:o,isHighlight:!0,seriesIdx:-1}),this.animationState.transition("highlightMarkers",o)):(yield this.updateDatumNodes({datumSelection:o,isHighlight:!0,seriesIdx:-1}),this.animationState.transition("highlight",o)),a&&(yield this.updateLabelNodes({labelSelection:r,seriesIdx:-1})),yield Promise.all(this.subGroups.map(((i,n)=>oM(this,void 0,void 0,(function*(){const{dataNodeGroup:o,markerGroup:r,datumSelection:a,labelSelection:d,markerSelection:p,paths:h,labelGroup:f}=i,{itemId:g}=this.contextNodeData[n],v=c;o.opacity=u,o.visible=l||v,f.visible=v,r&&(r.opacity=u,r.zIndex=o.zIndex>=WI.SERIES_LAYER_ZINDEX?o.zIndex:o.zIndex+1,r.visible=v),f&&(f.opacity=u),yield this.updatePathNodes({seriesHighlighted:t,itemId:g,paths:h,seriesIdx:n,opacity:u,visible:v,animationEnabled:l}),o.visible&&(yield this.updateDatumNodes({datumSelection:a,highlightedItems:e,isHighlight:!1,seriesIdx:n}),yield this.updateLabelNodes({labelSelection:d,seriesIdx:n}),s&&p&&(yield this.updateMarkerNodes({markerSelection:p,isHighlight:!1,seriesIdx:n})))})))))}))}getHighlightLabelData(e,t){const i=e.find((e=>e.datum===t.datum&&e.itemId===t.itemId));return i?[i]:void 0}getHighlightData(e,t){return t?[t]:void 0}updateHighlightSelection(e){var t;return oM(this,void 0,void 0,(function*(){const{highlightSelection:i,highlightLabelSelection:n,_contextNodeData:o}=this,r=null===(t=this.ctx.highlightManager)||void 0===t?void 0:t.getActiveHighlight(),s=e&&(null===r||void 0===r?void 0:r.datum)?r:void 0;let a,l;if(null!=s){const e=this.isLabelEnabled();for(const{labelData:t,nodeData:i}of o)if(l=this.getHighlightData(i,s),a=e?this.getHighlightLabelData(t,s):void 0,(!e||null!=a)&&null!=l)break}return this.highlightSelection=yield this.updateHighlightSelectionItem({items:l,highlightSelection:i}),this.highlightLabelSelection=yield this.updateHighlightSelectionLabel({items:a,highlightLabelSelection:n}),l}))}pickNodeExactShape(e){var t;const i=super.pickNodeExactShape(e);if(i)return i;const{x:n,y:o}=e,{opts:{hasMarkers:r}}=this;for(const{dataNodeGroup:s,markerGroup:a}of this.subGroups){let e=s.pickNode(n,o);if(!e&&r&&(e=null===a||void 0===a?void 0:a.pickNode(n,o)),e)break}for(const s of this.moduleMap){const{datum:i}=null!==(t=s.pickNodeExact(e))&&void 0!==t?t:{};if(void 0!==i)return{datum:i,distance:0}}}pickNodeClosestDatum(e){var t,i;const{x:n,y:o}=e,{axes:r,rootGroup:s,_contextNodeData:a}=this,l=r[iN.X],c=r[iN.Y],u=s.transformPoint(n,o);let d,p=1/0;for(const h of a)for(const e of h.nodeData){const{point:{x:t=NaN,y:i=NaN}={}}=e;if(isNaN(t)||isNaN(i))continue;const n=(null===l||void 0===l?void 0:l.inRange(t))&&(null===c||void 0===c?void 0:c.inRange(i));if(!n)continue;
18const o=Math.max(Math.pow(u.x-t,2)+Math.pow(u.y-i,2),0);o<p&&(p=o,d=e)}for(const h of this.moduleMap){const t=h.pickNodeNearest(e);if(void 0!==t&&t.distanceSquared<p){p=t.distanceSquared,d=t.datum;break}}if(d){const e=Math.max(Math.sqrt(p)-(null!==(i=null===(t=d.point)||void 0===t?void 0:t.size)&&void 0!==i?i:0),0);return{datum:d,distance:e}}}pickNodeMainAxisFirst(e,t){var i,n;const{x:o,y:r}=e,{axes:s,rootGroup:a,_contextNodeData:l}=this,c=s[iN.X],u=s[iN.Y],d=[c,u].filter((e=>e instanceof gV)).map((e=>e.direction));if(t&&0===d.length)return;const[p=iN.X]=d,h=a.transformPoint(o,r),f=p===iN.X?[h.x,h.y]:[h.y,h.x],g=[1/0,1/0];let v;for(const y of l)for(const e of y.nodeData){const{point:{x:t=NaN,y:i=NaN}={}}=e;if(isNaN(t)||isNaN(i))continue;const n=(null===c||void 0===c?void 0:c.inRange(t))&&(null===u||void 0===u?void 0:u.inRange(i));if(!n)continue;const o=p===iN.X?[t,i]:[i,t];let r=!0;for(let e=0;e<o.length;e++){const t=Math.abs(o[e]-f[e]);if(t>g[e]){r=!1;break}t<g[e]&&(g[e]=t,g.fill(1/0,e+1,g.length))}r&&(v=e)}if(v){let t=Math.max(Math.pow(g[0],2)+Math.pow(g[1],2)-(null!==(n=null===(i=v.point)||void 0===i?void 0:i.size)&&void 0!==n?n:0),0);for(const i of this.moduleMap){const n=i.pickNodeMainAxisFirst(e);if(void 0!==n&&n.distanceSquared<t){v=n.datum,t=n.distanceSquared;break}}return{datum:v,distance:Math.sqrt(t)}}}onLegendItemClick(e){const{enabled:t,itemId:i,series:n,legendItemName:o}=e,r=null!=this.legendItemName&&this.legendItemName===o;(n.id===this.id||r)&&this.toggleSeriesItem(i,t)}onLegendItemDoubleClick(e){const{enabled:t,itemId:i,series:n,numVisibleItems:o,legendItemName:r}=e,s=Object.values(o).reduce(((e,t)=>e+t),0),a=null!=this.legendItemName&&this.legendItemName===r;n.id===this.id||a||t&&1===s?this.toggleSeriesItem(i,!0):this.toggleSeriesItem(i,!1)}isPathOrSelectionDirty(){return!1}getLabelData(){return[]}shouldFlipXY(){return!1}getMinRect(){const[e]=this._contextNodeData;if(!e||0==e.nodeData.length)return;const t=e.nodeData.map((({midPoint:e})=>{var t;return null!==(t=null===e||void 0===e?void 0:e.x)&&void 0!==t?t:0})).sort(((e,t)=>e-t)).reduce(((e,t,i,n)=>i>0?Math.max(e,t-n[i-1]):e),0),i=e.nodeData.map((({midPoint:e})=>{var t;return null!==(t=null===e||void 0===e?void 0:e.y)&&void 0!==t?t:0})).sort(((e,t)=>e-t)).reduce(((e,t,i,n)=>i>0?Math.max(e,t-n[i-1]):e),0);return new gN(0,0,t,i)}updateHighlightSelectionItem(e){return oM(this,void 0,void 0,(function*(){const{opts:{hasMarkers:t}}=this,{items:i,highlightSelection:n}=e,o=null!==i&&void 0!==i?i:[];if(t){const e=n;return this.updateMarkerSelection({nodeData:o,markerSelection:e,seriesIdx:-1})}return this.updateDatumSelection({nodeData:o,datumSelection:n,seriesIdx:-1})}))}updateHighlightSelectionLabel(e){return oM(this,void 0,void 0,(function*(){const{items:t,highlightLabelSelection:i}=e,n=null!==t&&void 0!==t?t:[];return this.updateLabelSelection({labelData:n,labelSelection:i,seriesIdx:-1})}))}updateDatumSelection(e){return oM(this,void 0,void 0,(function*(){return e.datumSelection}))}updateDatumNodes(e){return oM(this,void 0,void 0,(function*(){}))}updateMarkerSelection(e){return oM(this,void 0,void 0,(function*(){return e.markerSelection}))}updateMarkerNodes(e){return oM(this,void 0,void 0,(function*(){}))}updatePaths(e){return oM(this,void 0,void 0,(function*(){e.paths.forEach((e=>e.visible=!1))}))}updatePathNodes(e){return oM(this,void 0,void 0,(function*(){const{paths:t,opacity:i,visible:n}=e;for(const e of t)e.opacity=i,e.visible=n}))}resetAllAnimation(e){var t,i;const{path:n,datum:o,label:r,marker:s}=null!==(i=null===(t=this.opts)||void 0===t?void 0:t.animationResetFns)&&void 0!==i?i:{};this.ctx.animationManager.stopByAnimationGroupId(this.id),n&&e.paths.forEach((e=>{XF(e,n)})),o&&XF(e.datumSelections,o),r&&XF(e.labelSelections,r),s&&XF(e.markerSelections,s),e.contextData.some((e=>!1===e.animationValid))&&this.ctx.animationManager.skipCurrentBatch()}animateEmptyUpdateReady(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(e)}animateWaitingUpdateReady(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(e)}animateReadyHighlight(e){var t,i;const{datum:n}=null!==(i=null===(t=this.opts)||void 0===t?void 0:t.animationResetFns)&&void 0!==i?i:{};n&&XF([e],n)}animateReadyHighlightMarkers(e){var t,i;const{marker:n}=null!==(i=null===(t=this.opts)||void 0===t?void 0:t.animationResetFns)&&void 0!==i?i:{};n&&XF([e],n)}animateReadyResize(e){this.resetAllAnimation(e)}animateClearingUpdateEmpty(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(e)}animationTransitionClear(){this.animationState.transition("clear",this.getAnimationData())}getAnimationData(e,t){const i={datumSelections:this.subGroups.map((({datumSelection:e})=>e)),markerSelections:this.subGroups.filter((({markerSelection:e})=>void 0!==e)).map((({markerSelection:e})=>e)),labelSelections:this.subGroups.map((({labelSelection:e})=>e)),annotationSelections:[...this.annotationSelections],contextData:this._contextNodeData,previousContextData:t,paths:this.subGroups.map((({paths:e})=>e)),seriesRect:e};return i}calculateScaling(){const e={},t=t=>{const i=this.axes[t];if(i)if(i.scale instanceof MG){const{range:n,domain:o}=i.scale;e[t]={type:"log",convert:e=>i.scale.convert(e),domain:[o[0],o[1]],range:[n[0],n[1]]}}else if(i.scale instanceof jL){const{range:n}=i.scale,o=i.scale.getDomain();e[t]={type:"continuous",domain:[o[0],o[1]],range:[n[0],n[1]]}}else if(i.scale){const{domain:n}=i.scale;e[t]={type:"category",domain:n,range:n.map((e=>i.scale.convert(e)))}}};return t(iN.X),t(iN.Y),e}}iM([JM(fk),nM("design:type",String)],pj.prototype,"legendItemName",void 0);const hj=["top","right","bottom","left"];class fj extends JB{constructor(e,t){super(e,t),this.paired=!0,this._lastAxisWidths={top:0,bottom:0,left:0,right:0},this._lastVisibility={crossLines:!0,series:!0}}performLayout(){const e=Object.create(null,{performLayout:{get:()=>super.performLayout}});return oM(this,void 0,void 0,(function*(){const t=yield e.performLayout.call(this),{animationRect:i,seriesRect:n,visibility:o,clipSeries:r}=this.updateAxes(t);this.seriesRoot.visible=o.series,this.seriesRect=n,this.animationRect=i,this.seriesRoot.translationX=Math.floor(n.x),this.seriesRoot.translationY=Math.floor(n.y);const{seriesArea:{padding:s}}=this,a=n.clone().grow({top:s.top,right:s.right,bottom:s.bottom,left:s.left});return this.hoverRect=a,this.layoutService.dispatchLayoutComplete({type:"layout-complete",chart:{width:this.scene.width,height:this.scene.height},clipSeries:r,series:{rect:n,paddedRect:a,visible:o.series,shouldFlipXY:this.shouldFlipXY()},axes:this.axes.map((e=>Object.assign({id:e.id},e.getLayoutState())))}),t}))}updateAxes(e){var t;const i=Object.assign({},this._lastAxisWidths),n=Object.assign({},this._lastVisibility),o=new Set(this._axes.map((e=>e.position)));for(const f of Object.keys(i))o.has(f)||delete i[f];const r=(e,t)=>!Object.keys(e).some((e=>null==i[e]))&&(n.crossLines===t.crossLines&&n.series===t.series&&Object.entries(i).every((([t,i])=>{const n=e[t];return null==i&&null==n||i===n}))),s=e=>Object.entries(e).reduce(((e,[t,i])=>(i&&Math.abs(i)===1/0&&(i=0),e[t]=null!=i?Math.ceil(i):i,e)),{});let a={},l={},c=!1,u=null===(t=this.seriesRect)||void 0===t?void 0:t.clone(),d=0,p={};do{Object.assign(i,a),Object.assign(n,l);const t=this.updateAxesPass(i,e.clone(),u);if(a=s(t.axisWidths),l=t.visibility,c=t.clipSeries,u=t.seriesRect,p=t.primaryTickCounts,d++>10){gM.warn("unable to find stable axis layout.");break}}while(!r(a,l));
18this.axes.forEach((e=>{const{direction:t}=e,i=p[t];e.update(i)}));const h=5;return this.axes.forEach((t=>{if(t.setCrossLinesVisible(n.crossLines),u)switch(t.clipGrid(u.x,u.y,u.width+h,u.height+h),t.position){case"left":case"right":t.clipTickLines(e.x,u.y,e.width+h,u.height+h);break;case"top":case"bottom":t.clipTickLines(u.x,e.y,u.width+h,e.height+h);break}})),this._lastAxisWidths=i,this._lastVisibility=n,{seriesRect:u,animationRect:e,visibility:n,clipSeries:c}}updateAxesPass(e,t,i){const{axes:n}=this,o={},r={},s={series:!0,crossLines:!0};let a=!1;const l={},c=this.applySeriesPadding(t),u=i?this.buildCrossLinePadding(e):{},d=this.buildAxisBound(c,e,u,s),p=this.buildSeriesRect(d,e);return n.forEach((t=>{var i,n;const{position:s="left"}=t,{clipSeries:u,axisThickness:h,axisOffset:f}=this.calculateAxisDimensions({axis:t,seriesRect:p,paddedBounds:c,axisWidths:e,newAxisWidths:r,primaryTickCounts:l,clipSeries:a,addInterAxisPadding:(null!==(i=o[s])&&void 0!==i?i:0)>0});o[s]=(null!==(n=o[s])&&void 0!==n?n:0)+1,a=a||u,this.positionAxis({axis:t,axisBound:d,axisOffset:f,axisThickness:h,axisWidths:e,primaryTickCounts:l,seriesRect:p})})),{clipSeries:a,seriesRect:p,axisWidths:r,visibility:s,primaryTickCounts:l}}buildCrossLinePadding(e){var t;const i={};this.axes.forEach((e=>{e.crossLines&&e.crossLines.forEach((e=>{e.calculatePadding(i)}))}));for(const[n,o=0]of Object.entries(i))i[n]=Math.max(o-(null!==(t=e[n])&&void 0!==t?t:0),0);return i}applySeriesPadding(e){const t=e.clone(),i=this.axes.slice().reverse();return hj.forEach((e=>{const n=this.seriesArea.padding[e],o=i.find((t=>t.position===e));o?o.seriesAreaPadding=n:t.shrink(n,e)})),t}buildAxisBound(e,t,i,n){var o,r,s,a;const l=e.clone(),{top:c=0,right:u=0,bottom:d=0,left:p=0}=i,h=p+u,f=c+d,g=(null!==(o=t.left)&&void 0!==o?o:0)+(null!==(r=t.right)&&void 0!==r?r:0)+h,v=(null!==(s=t.top)&&void 0!==s?s:0)+(null!==(a=t.bottom)&&void 0!==a?a:0)+f;return l.width<=g||l.height<=v?(n.crossLines=!1,n.series=!1,l):(l.x+=p,l.y+=c,l.width-=h,l.height-=f,l)}buildSeriesRect(e,t){const i=e.clone(),{top:n,bottom:o,left:r,right:s}=t;return i.x+=null!==r&&void 0!==r?r:0,i.y+=null!==n&&void 0!==n?n:0,i.width-=(null!==r&&void 0!==r?r:0)+(null!==s&&void 0!==s?s:0),i.height-=(null!==n&&void 0!==n?n:0)+(null!==o&&void 0!==o?o:0),i.width=Math.max(0,i.width),i.height=Math.max(0,i.height),i}clampToOutsideSeriesRect(e,t,i,n){const{x:o,y:r,width:s,height:a}=e,l=[o,r,o+s,r+a],c=1===n?Math.min:Math.max,u=l[("x"===i?0:1)+(1===n?0:2)];return c(t,u)}calculateAxisDimensions(e){var t,i,n,o,r;const{axis:s,seriesRect:a,paddedBounds:l,axisWidths:c,newAxisWidths:u,primaryTickCounts:d,addInterAxisPadding:p}=e;let{clipSeries:h}=e;const{position:f="left",direction:g}=s,v=e=>e instanceof gV||e instanceof _V?[0,a.height]:[a.height,0],y=null!==(t=u[f])&&void 0!==t?t:0;switch(f){case"top":case"bottom":s.range=[0,a.width],s.gridLength=a.height;break;case"right":case"left":s.range=v(s),s.gridLength=a.width;break}const m=this.zoomManager.getAxisZoom(s.id),{min:C=0,max:b=1}=null!==m&&void 0!==m?m:{};s.visibleRange=[C,b];const w=s.dataDomain.clipped||s.visibleRange[0]>0||s.visibleRange[1]<1;h||(h=w);let S=s.nice?d[g]:void 0;const E=.3;null!=s.thickness&&s.thickness>0?s.maxThickness=s.thickness:g===iN.Y?s.maxThickness=l.width*E:s.maxThickness=l.height*E;const x=s.calculateLayout(S);S=x.primaryTickCount,d[g]=null!==(i=d[g])&&void 0!==i?i:S;let O=0;if(null!=s.thickness&&s.thickness>0)O=s.thickness;else{const{bbox:e}=x;O=g===iN.X?e.height:e.width}const T=15;return p&&(O+=T),O=Math.ceil(O),u[f]=(null!==(n=u[f])&&void 0!==n?n:0)+O,s.gridPadding=(null!==(o=c[f])&&void 0!==o?o:0)-(null!==(r=u[f])&&void 0!==r?r:0),{clipSeries:h,axisThickness:O,axisOffset:y,primaryTickCount:S}}positionAxis(e){var t,i,n,o;const{axis:r,axisBound:s,axisWidths:a,seriesRect:l,axisOffset:c,axisThickness:u}=e,{position:d}=r;switch(d){case"top":r.translation.x=s.x+(null!==(t=a.left)&&void 0!==t?t:0),r.translation.y=this.clampToOutsideSeriesRect(l,s.y+1+c+u,"y",1);break;case"bottom":r.translation.x=s.x+(null!==(i=a.left)&&void 0!==i?i:0),r.translation.y=this.clampToOutsideSeriesRect(l,s.y+s.height+1-u-c,"y",-1);break;case"left":r.translation.y=s.y+(null!==(n=a.top)&&void 0!==n?n:0),r.translation.x=this.clampToOutsideSeriesRect(l,s.x+c+u,"x",1);break;case"right":r.translation.y=s.y+(null!==(o=a.top)&&void 0!==o?o:0),r.translation.x=this.clampToOutsideSeriesRect(l,s.x+s.width-u-c,"x",-1);break}r.updatePosition({rotation:BM(r.rotation),sideFlag:r.label.getSideFlag()})}shouldFlipXY(){return!this.series.some((e=>!(e instanceof pj&&e.shouldFlipXY())))}}function gj(e,t){let i=Math.floor(e[0]),n=e[1];i=vj(i,n,t);const o=mj(i,n,t),r=t-1;n=i+r*o;const s=[i,n],a=yj(i,o,t);return[s,a]}function vj(e,t,i){const n=Math.abs(t-e)/(i-1),o=Math.floor(Math.log10(n)),r=Math.pow(10,o);return Math.floor(e/r)*r}function yj(e,t,i){const n=Math.floor(Math.log10(t)),o=t>0&&t<1?Math.abs(n):0,r=Math.pow(10,o),s=new VL(o);for(let a=0;a<i;a++){const i=e+t*a;s[a]=Math.round(i*r)/r}return s}function mj(e,t,i){const n=i-1,o=(t-e)/n;return Cj(o)}function Cj(e){const t=Math.floor(Math.log10(e)),i=Math.pow(10,t),n=e/i*10;return n>0&&n<=1?i/10:n>1&&n<=2?2*i/10:n>1&&n<=5?5*i/10:n>5&&n<=10?10*i/10:n>10&&n<=20?20*i/10:n>20&&n<=40?40*i/10:n>40&&n<=50?50*i/10:n>50&&n<=100?100*i/10:n}
18fj.className="CartesianChart",fj.type="cartesian";class bj extends QG{constructor(){super(...arguments),this.maxSpacing=NaN}}iM([JM(ok(Rk(1),lk("minSpacing"))),XG(NaN),nM("design:type",Number)],bj.prototype,"maxSpacing",void 0);class wj extends fV{constructor(e,t=new HL){super(e,t),this.min=NaN,this.max=NaN}normaliseDataDomain(e){const{min:t,max:i}=this,{extent:n,clipped:o}=uM(e,t,i);return{domain:n,clipped:o}}formatDatum(e){return"number"===typeof e?e.toFixed(2):(gM.warnOnce("data contains Date objects which are being plotted against a number axis, please only use a number axis for numbers."),String(e))}createTick(){return new bj}updateSecondaryAxisTicks(e){if(null==this.dataDomain)throw new Error("AG Charts - dataDomain not calculated, cannot perform tick calculation.");if(0===this.dataDomain.domain.length)return[];const[t,i]=gj(this.dataDomain.domain,null!==e&&void 0!==e?e:0);return this.scale.nice=!1,this.scale.domain=t,this.scale.update(),i}}function Sj(){const e="expecting a non-zero Number";return ek((e=>"number"===typeof e&&0!==e),e)}wj.className="NumberAxis",wj.type="number",iM([JM(ok(Rk(),ak("max"))),XG(NaN),nM("design:type",Number)],wj.prototype,"min",void 0),iM([JM(ok(Rk(),lk("min"))),XG(NaN),nM("design:type",Number)],wj.prototype,"max",void 0);class Ej extends wj{normaliseDataDomain(e){const{min:t,max:i}=this,{extent:n,clipped:o}=uM(e,t,i),r=n[0]>n[1],s=n[0]<0&&n[1]>0,a=0===n[0]&&0===n[1],l=r||s||a;return l&&(e=[],s?gM.warn("the data domain crosses zero, the chart data cannot be rendered. See log axis documentation for more information."):a&&gM.warn("the data domain has 0 extent, no data is rendered.")),0===n[0]&&(n[0]=1),0===n[1]&&(n[1]=-1),{domain:n,clipped:o}}set base(e){this.scale.base=e}get base(){return this.scale.base}constructor(e){super(e,new MG),this.min=NaN,this.max=NaN}}Ej.className="LogAxis",Ej.type="log",iM([JM(ok(Rk(),ak("max"),Sj())),XG(NaN),nM("design:type",Number)],Ej.prototype,"min",void 0),iM([JM(ok(Rk(),lk("min"),Sj())),XG(NaN),nM("design:type",Number)],Ej.prototype,"max",void 0);class xj extends QG{constructor(){super(...arguments),this.maxSpacing=NaN}}iM([JM(ok(Rk(1),lk("minSpacing"))),XG(NaN),nM("design:type",Number)],xj.prototype,"maxSpacing",void 0);class Oj extends fV{constructor(e){super(e,new IG),this.datumFormat="%m/%d/%y, %H:%M:%S",this.min=void 0,this.max=void 0;const{scale:t}=this;this.refreshScale(),this.datumFormatter=t.tickFormat({specifier:this.datumFormat})}normaliseDataDomain(e){var t;let{min:i,max:n}=this,o=!1;return"number"===typeof i&&(i=new Date(i)),"number"===typeof n&&(n=new Date(n)),e.length>2&&(e=(null!==(t=lM(e))&&void 0!==t?t:[0,1e3]).map((e=>new Date(e)))),i instanceof Date&&(o||(o=i>e[0]),e=[i,e[1]]),n instanceof Date&&(o||(o=n<e[1]),e=[e[0],n]),e[0]>e[1]&&(e=[]),{domain:e,clipped:o}}createTick(){return new xj}onLabelFormatChange(e,t){t?super.onLabelFormatChange(e,t):this.labelFormatter=this.scale.tickFormat({ticks:e})}formatDatum(e){var t;return null!==(t=this.moduleCtx.callbackCache.call(this.datumFormatter,e))&&void 0!==t?t:String(e)}calculatePadding(e,t){return[0,1]}}Oj.className="TimeAxis",Oj.type="time",iM([JM(ok(Ck,ak("max"))),nM("design:type",Object)],Oj.prototype,"min",void 0),iM([JM(ok(Ck,lk("min"))),nM("design:type",Object)],Oj.prototype,"max",void 0);const Tj={[wj.type]:wj,[gV.type]:gV,[Oj.type]:Oj,[_V.type]:_V,[Ej.type]:Ej},Dj={has(e){return Object.prototype.hasOwnProperty.call(Tj,e)},get axesTypes(){return Object.keys(Tj)}},Rj={};function Aj(e){var t;return null!==(t=Rj[e])&&void 0!==t?t:{}}const _j={};function Pj(){return _j}class Mj extends rM{constructor(e){var t;super(),this.node=new zL({name:"background",zIndex:WI.SERIES_BACKGROUND_ZINDEX}),this.rectNode=new rj,this.visible=!0,this.fill="white",this.image=void 0,this.node.appendChild(this.rectNode),null===(t=e.scene.root)||void 0===t||t.appendChild(this.node),this.destroyFns.push((()=>{var t;return null===(t=e.scene.root)||void 0===t?void 0:t.removeChild(this.node)}),e.layoutService.addListener("layout-complete",(e=>this.onLayoutComplete(e))))}onLayoutComplete(e){const{width:t,height:i}=e.chart;this.rectNode.width=t,this.rectNode.height=i}}iM([JM(dk),GN("node","visible"),nM("design:type",Boolean)],Mj.prototype,"visible",void 0),iM([JM(Sk),GN("rectNode","fill"),nM("design:type",String)],Mj.prototype,"fill",void 0);class kj{set fill(e){this.rh.fill=e}get fill(){return this.rh.fill}set stroke(e){this.rh.stroke=e}get stroke(){return this.rh.stroke}set strokeWidth(e){this.rh.strokeWidth=e}get strokeWidth(){return this.rh.strokeWidth}set width(e){this.rh.width=e}get width(){return this.rh.width}set height(e){this.rh.height=e}get height(){return this.rh.height}set gripLineGap(e){this.rh.gripLineGap=e}get gripLineGap(){return this.rh.gripLineGap}set gripLineLength(e){this.rh.gripLineLength=e}get gripLineLength(){return this.rh.gripLineLength}constructor(e){this.rh=e}}class Nj{set fill(e){this.rm.fill=e}get fill(){return this.rm.fill}set stroke(e){this.rm.stroke=e}get stroke(){return this.rm.stroke}set strokeWidth(e){this.rm.strokeWidth=e}get strokeWidth(){return this.rm.strokeWidth}set fillOpacity(e){this.rm.fillOpacity=e}get fillOpacity(){return this.rm.fillOpacity}constructor(e){this.rm=e}}class Lj extends aI{constructor(){super(...arguments),this._fill="#f2f2f2",this._stroke="#999999",this._strokeWidth=1,this._lineCap="square",this._centerX=0,this._centerY=0,this._width=8,this._gripLineGap=2,this._gripLineLength=8,this._height=16}set centerX(e){this._centerX!==e&&(this._centerX=e,this.dirtyPath=!0)}get centerX(){return this._centerX}set centerY(e){this._centerY!==e&&(this._centerY=e,this.dirtyPath=!0)}get centerY(){return this._centerY}set width(e){this._width!==e&&(this._width=e,this.dirtyPath=!0)}get width(){return this._width}set gripLineGap(e){this._gripLineGap!==e&&(this._gripLineGap=e,this.dirtyPath=!0)}get gripLineGap(){return this._gripLineGap}set gripLineLength(e){this._gripLineLength!==e&&(this._gripLineLength=e,this.dirtyPath=!0)}get gripLineLength(){return this._gripLineLength}set height(e){this._height!==e&&(this._height=e,this.dirtyPath=!0)}get height(){return this._height}computeBBox(){const{centerX:e,centerY:t,width:i,height:n}=this,o=e-i/2,r=t-n/2;return new gN(o,r,i,n)}isPointInPath(e,t){const i=this.transformPoint(e,t),n=this.computeBBox();return n.containsPoint(i.x,i.y)}updatePath(){const{path:e,centerX:t,centerY:i,width:n,height:o}=this;e.clear();const r=t-n/2,s=i-o/2,a=this.align(r),l=this.align(s),c=a+this.align(r,n),u=l+this.align(s,o);e.moveTo(a,l),e.lineTo(c,l),e.lineTo(c,u),e.lineTo(a,u),e.lineTo(a,l);const d=this.gripLineGap/2,p=this.gripLineLength/2;e.moveTo(this.align(t-d),this.align(i-p)),e.lineTo(this.align(t-d),this.align(i+p)),e.moveTo(this.align(t+d),this.align(i-p)),e.lineTo(this.align(t+d),this.align(i+p))}}function Ij(e,t){e!==t&&(this.dirtyPath=!0)}Lj.className="RangeHandle",iM([JM(wk),nM("design:type",Object)],Lj.prototype,"_fill",void 0),iM([JM(wk),nM("design:type",Object)],Lj.prototype,"_stroke",void 0),iM([JM(Tk(0)),nM("design:type",Object)],Lj.prototype,"_strokeWidth",void 0),iM([JM(Hk),nM("design:type",Object)],Lj.prototype,"_lineCap",void 0),iM([JM(Tk(0)),nM("design:type",Number)],Lj.prototype,"_width",void 0),iM([JM(Tk(0)),nM("design:type",Number)],Lj.prototype,"_gripLineGap",void 0),iM([JM(Tk(0)),nM("design:type",Number)],Lj.prototype,"_gripLineLength",void 0),iM([JM(Tk(0)),nM("design:type",Number)],Lj.prototype,"_height",void 0);class Fj extends aI{constructor(){super(...arguments),this.x=0,this.y=0,this.width=200,this.height=30,this.minRange=.05,this._min=0,this._max=1}set min(e){var t;e=zM(0,e,this.max-this.minRange),this._min===e||isNaN(e)||(this._min=e,this.dirtyPath=!0,null===(t=this.onRangeChange)||void 0===t||t.call(this))}get min(){return this._min}set max(e){var t;e=zM(this.min+this.minRange,e,1),this._max===e||isNaN(e)||(this._max=e,this.dirtyPath=!0,null===(t=this.onRangeChange)||void 0===t||t.call(this))}get max(){return this._max}computeBBox(){const{x:e,y:t,width:i,height:n}=this;return new gN(e,t,i,n)}computeVisibleRangeBBox(){const{x:e,y:t,width:i,height:n,min:o,max:r}=this,s=e+i*o,a=e+i*r;return new gN(s,t,a-s,n)}updatePath(){const{path:e,x:t,y:i,width:n,height:o,min:r,max:s}=this;e.clear();const a=this.align(t),l=this.align(i),c=a+this.align(t,n),u=l+this.align(i,o);e.moveTo(a,l),e.lineTo(c,l),e.lineTo(c,u),e.lineTo(a,u),e.lineTo(a,l);const d=this.align(t+n*r),p=this.align(t+n*s);e.moveTo(d,l),e.lineTo(d,u),e.lineTo(p,u),e.lineTo(p,l),e.lineTo(d,l)}}Fj.className="RangeMask",iM([VN({changeValue:Ij}),JM(Tk(0)),nM("design:type",Object)],Fj.prototype,"x",void 0),iM([VN({changeValue:Ij}),JM(Tk(0)),nM("design:type",Object)],Fj.prototype,"y",void 0),iM([VN({changeValue:Ij}),JM(Tk(0)),nM("design:type",Object)],Fj.prototype,"width",void 0),iM([VN({changeValue:Ij}),JM(Tk(0)),nM("design:type",Object)],Fj.prototype,"height",void 0),iM([JM(Tk()),nM("design:type",Number)],Fj.prototype,"_min",void 0),iM([JM(Tk()),nM("design:type",Number)],Fj.prototype,"_max",void 0);class Gj extends zL{set x(e){this.mask.x=e,this.updateHandles()}get x(){return this.mask.x}set y(e){this.mask.y=e,this.updateHandles()}get y(){return this.mask.y}set width(e){this.mask.width=e,this.updateHandles()}get width(){return this.mask.width}set height(e){this.mask.height=e,this.updateHandles()}get height(){return this.mask.height}set min(e){this.mask.min=e}get min(){return this.mask.min}set max(e){this.mask.max=e}get max(){return this.mask.max}constructor(){super({name:"rangeSelectorGroup"}),this.minHandle=new Lj,this.maxHandle=new Lj,this.mask=(()=>{const{x:e,y:t,width:i,height:n,min:o,max:r}=Gj.defaults,s=new Fj;s.x=e,s.y=t,s.width=i,s.height=n,s.min=o,s.max=r;const{minHandle:a,maxHandle:l}=this;return a.centerX=e,l.centerX=e+i,a.centerY=l.centerY=t+n/2,this.append([s,a,l]),s.onRangeChange=()=>{var e;this.updateHandles(),null===(e=this.onRangeChange)||void 0===e||e.call(this)},s})(),this._x=Gj.defaults.x,this._y=Gj.defaults.y,this._width=Gj.defaults.width,this._height=Gj.defaults.height,this._min=Gj.defaults.min,this._max=Gj.defaults.max,this.isContainerNode=!0}updateHandles(){const{minHandle:e,maxHandle:t,x:i,y:n,width:o,height:r,mask:s}=this;e.centerX=i+o*s.min,t.centerX=i+o*s.max,e.centerY=t.centerY=n+r/2}computeBBox(){return this.mask.computeBBox()}computeVisibleRangeBBox(){return this.mask.computeVisibleRangeBBox()}render(e){const{ctx:t,forceRender:i,stats:n}=e;if(this.dirty===nN.NONE&&!i)return void(n&&n.nodesSkipped++);this.computeTransformMatrix(),this.matrix.toContext(t);const{mask:o,minHandle:r,maxHandle:s}=this;
18[o,r,s].forEach((n=>{n.visible&&(i||n.dirty>nN.NONE)&&(t.save(),n.render(Object.assign(Object.assign({},e),{ctx:t,forceRender:i})),t.restore())})),this.markClean({force:!0}),n&&n.nodesRendered++}}Gj.className="Range",Gj.defaults={x:0,y:0,width:200,height:30,min:0,max:1};class Vj extends rM{set width(e){this.rs.width=e}get width(){return this.rs.width}set height(e){this.rs.height=e}get height(){return this.rs.height}set min(e){this.rs.min=e}get min(){return this.rs.min}set max(e){this.rs.max=e}get max(){return this.rs.max}set visible(e){this._visible=e,this.updateGroupVisibility()}get visible(){return this._visible}updateGroupVisibility(){const e=this.enabled&&this.visible;this.rs.visible=e,e?this.ctx.zoomManager.updateZoom("navigator",{x:{min:this.rs.min,max:this.rs.max},y:{min:0,max:1}}):this.ctx.zoomManager.updateZoom("navigator")}constructor(e){var t;super(),this.ctx=e,this.rs=new Gj,this.mask=new Nj(this.rs.mask),this.minHandle=new kj(this.rs.minHandle),this.maxHandle=new kj(this.rs.maxHandle),this.minHandleDragging=!1,this.maxHandleDragging=!1,this.panH
18andleOffset=NaN,this.enabled=!1,this.margin=10,this._visible=!0,this.rs.onRangeChange=()=>e.zoomManager.updateZoom("navigator",{x:{min:this.rs.min,max:this.rs.max},y:{min:0,max:1}}),null===(t=e.scene.root)||void 0===t||t.appendChild(this.rs);const i={bypassPause:["animation"]};this.destroyFns.push(e.interactionManager.addListener("drag-start",(e=>this.onDragStart(e)),i),e.interactionManager.addListener("drag",(e=>this.onDrag(e)),i),e.interactionManager.addListener("hover",(e=>this.onDrag(e)),i),e.interactionManager.addListener("drag-end",(()=>this.onDragStop()),i),e.layoutService.addListener("before-series",(e=>this.layout(e))),e.layoutService.addListener("layout-complete",(e=>this.layoutComplete(e))),(()=>{var t;return null===(t=e.scene.root)||void 0===t?void 0:t.removeChild(this.rs)}),(()=>this.ctx.zoomManager.updateZoom("navigator"))),this.updateGroupVisibility()}layout({shrinkRect:e}){if(this.enabled){const t=this.rs.height+this.margin;e.shrink(t,"bottom"),this.rs.y=e.y+e.height+this.margin}return{shrinkRect:e}}layoutComplete({series:{rect:e,visible:t}}){this.enabled&&t&&(this.rs.x=e.x,this.rs.width=e.width),this.visible=t}onDragStart(e){if(!this.enabled)return;const{offsetX:t,offsetY:i}=e,{rs:n}=this,{minHandle:o,maxHandle:r,x:s,width:a,min:l}=n,c=n.computeVisibleRangeBBox();this.minHandleDragging||this.maxHandleDragging||(o.containsPoint(t,i)?this.minHandleDragging=!0:r.containsPoint(t,i)?this.maxHandleDragging=!0:c.containsPoint(t,i)&&(this.panHandleOffset=(t-s)/a-l))}onDrag(e){if(!this.enabled)return;const{rs:t,panHandleOffset:i}=this,{x:n,y:o,width:r,height:s,minHandle:a,maxHandle:l}=t,{offsetX:c,offsetY:u}=e,d=n+r*t.min,p=n+r*t.max,h=new gN(d,o,p-d,s),f=()=>Math.min(Math.max((c-n)/r,0),1);if(a.containsPoint(c,u)||l.containsPoint(c,u)?this.ctx.cursorManager.updateCursor("navigator","ew-resize"):h.containsPoint(c,u)?this.ctx.cursorManager.updateCursor("navigator","grab"):this.ctx.cursorManager.updateCursor("navigator"),this.minHandleDragging)t.min=f();else if(this.maxHandleDragging)t.max=f();else if(!isNaN(i)){const e=t.max-t.min,n=Math.min(f()-i,1-e);n<=t.min?(t.min=n,t.max=t.min+e):(t.max=n+e,t.min=t.max-e)}}onDragStop(){this.stopHandleDragging()}stopHandleDragging(){this.minHandleDragging=this.maxHandleDragging=!1,this.panH
18andleOffset=NaN}}iM([VN({changeValue(e){e&&(this.min=0,this.max=1),this.updateGroupVisibility()}}),JM(dk),nM("design:type",Object)],Vj.prototype,"enabled",void 0),iM([JM(Tk(0)),nM("design:type",Object)],Vj.prototype,"margin",void 0);const Bj={SMALL:12,MEDIUM:13,LARGE:17},jj="normal",Hj="bottom",Wj="left",Uj="top",zj={BOTTOM:Hj,LEFT:Wj,TOP:Uj},Kj="category",Yj="number",qj="time",Xj="log",$j={CATEGORY:Kj,NUMBER:Yj,TIME:qj,LOG:Xj},Zj={},Jj={},Qj={has(e){return Object.prototype.hasOwnProperty.call(Zj,e)},isCartesian(e){return"cartesian"===Zj[e]},isPolar(e){return"polar"===Zj[e]},isHierarchy(e){return"hierarchy"===Zj[e]},get seriesTypes(){return Object.keys(Zj)},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)))}};function eH(e){var t;return null!==(t=Jj[e])&&void 0!==t?t:{}}$j.NUMBER,zj.LEFT,$j.CATEGORY,zj.BOTTOM;const tH=Symbol("extends-chart-defaults"),iH=Symbol("extends-legend-defaults"),nH=Symbol("extends-legend-item-defaults"),oH=Symbol("extends-legend-item-marker-defaults"),rH=Symbol("extends-axes-defaults"),sH=Symbol("extends-axes-label-defaults"),aH=Symbol("extends-axes-line-defaults"),lH=Symbol("extends-axes-tick-defaults"),cH=Symbol("extends-axes-grid-line-defaults"),uH=Symbol("extends-series-defaults"),dH=Symbol("extends-cartesian-marker-defaults"),pH=Symbol("override-series-label-defaults"),hH=Symbol("default-font"),fH=Symbol("default-label-colour"),gH=Symbol("default-inverted-label-colour"),vH=Symbol("default-inside-series-label-colour"),yH=Symbol("default-muted-label-colour"),mH=Symbol("default-axis-grid-colour"),CH=Symbol("default-axis-line-colour"),bH=Symbol("default-cross-lines-colour"),wH=Symbol("default-background-colour"),SH=Symbol("default-shadow-colour"),EH=Symbol("default-waterfall-series-positive-colors"),xH=Symbol("default-waterfall-series-negative-colors"),OH=Symbol("default-waterfall-series-total-colors"),TH=Symbol("default-waterfall-series-connector-line-stroke"),DH=Symbol("default-polar-series-stroke"),RH=Symbol("default-diverging-series-colour-range"),AH=Symbol("default-hierarchy-fills"),_H=Symbol("default-hierarchy-strokes");function PH(e,t,i,n,o){const{defaultDuration:r}=i,{addPhaseFn:s,updatePhaseFn:a,removePhaseFn:l}=o,c=(n,o,s)=>{i.animate({id:`${e}_${t}_${o.id}_${n}`,groupId:e,from:0,to:1,ease:YN,onUpdate(e,t){t&&"removed"!==n||(o.path.clear({trackChanges:!0}),s(e,o),o.checkPathDirty())},onStop(){"added"===n&&(o.path.clear({trackChanges:!0}),s(1,o),o.checkPathDirty())},duration:cL[n].animationDuration*r,delay:cL[n].animationDelay*r})};for(const u of n)i.isSkipped()||(c("removed",u,l),c("updated",u,a)),c("added",u,s)}const MH=ek((e=>AB(e)||Object.getPrototypeOf(e)===UI),"expecting a marker shape keyword such as 'circle', 'diamond' or 'square' or an object extending the Marker class");class kH extends cN{constructor(){super(...arguments),this.enabled=!0,this.shape=zI,this.size=6,this.fillOpacity=1,this.strokeWidth=1,this.strokeOpacity=1}getStyle(){const{size:e,fill:t,fillOpacity:i,stroke:n,strokeWidth:o,strokeOpacity:r}=this;return{size:e,fill:t,fillOpacity:i,stroke:n,strokeWidth:o,strokeOpacity:r}}getDiameter(){return this.size+this.strokeWidth}}function NH({id:e},t,i){dL(e,"markers",t,i,{scalingX:0,scalingY:0},{scalingX:1,scalingY:1}),i.forEach((e=>e.cleanup()))}function LH({id:e},t,i,n){const o=.1,r=(e,t)=>{var i,r;const s=null!==(r=null===(i=t.midPoint)||void 0===i?void 0:i.x)&&void 0!==r?r:n,a=qN(s/n)-o,l=Math.max(Math.min(a,1),0);return{scalingX:0,scalingY:0,animationDelay:l,animationDuration:QN}},s=()=>({scalingX:1,scalingY:1});uL(e,"markers",t,i,{fromFn:r,toFn:s})}function IH(e){return{opacity:1,scalingX:1,scalingY:1}}function FH(e,t){var i,n,o,r;return{translationX:null!==(n=null===(i=t.point)||void 0===i?void 0:i.x)&&void 0!==n?n:NaN,translationY:null!==(r=null===(o=t.point)||void 0===o?void 0:o.y)&&void 0!==r?r:NaN}}function GH(e,t){const i=(t,i)=>{const n=e[i][t];return Array.isArray(n)?n[0]:n},n=t=>{const{xValue:n}=t;return e.moved[n]?{point:i(n,"moved"),status:"updated"}:e.removed[n]?{point:i(n,"removed"),status:"removed"}:e.added[n]?{point:i(n,"added"),status:"added"}:{status:"unknown"}},o=(e,i)=>{var o,r,s,a,l,c;const{status:u,point:d}=n(i);if("unknown"===u)return{opacity:0}
18;const p=Object.assign({translationX:null!==(r=null===(o=null===d||void 0===d?void 0:d.from)||void 0===o?void 0:o.x)&&void 0!==r?r:e.translationX,translationY:null!==(a=null===(s=null===d||void 0===d?void 0:d.from)||void 0===s?void 0:s.y)&&void 0!==a?a:e.translationY,opacity:e.opacity},cL[u]);return"added"===t?Object.assign(Object.assign(Object.assign({},p),{opacity:0,translationX:null===(l=null===d||void 0===d?void 0:d.to)||void 0===l?void 0:l.x,translationY:null===(c=null===d||void 0===d?void 0:d.to)||void 0===c?void 0:c.y}),cL["added"]):("added"===u&&(p.opacity=0),p)},r=(e,i)=>{var o,r;const{status:s,point:a}=n(i);if("unknown"===s)return{opacity:0};const l=Object.assign({translationX:i.point.x,translationY:i.point.y,opacity:1},cL[s]);return"removed"===s||"removed"===t?Object.assign(Object.assign(Object.assign({},l),{translationX:null===(o=null===a||void 0===a?void 0:a.to)||void 0===o?void 0:o.x,translationY:null===(r=null===a||void 0===a?void 0:a.to)||void 0===r?void 0:r.y,opacity:0}),cL["removed"]):l};return{fromFn:o,toFn:r}}function VH(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 BH(e,t,i){const n=(t.y-e.y)/(t.x-e.x),o=(i-e.x)*n+e.y;return{x:i,y:o}}function jH(e,t,i,n){let o=-1,r=0;const s=[];while(r<e.length)e[r].change!==t?e[r].change!==i?(s.length>0&&(n(s,o,r),s.length=0),o=r,r++):r++:(s.push(e[r]),r++);s.length>0&&n(s,o,r)}function HH(e,t){jH(e,"out","in",((i,n,o)=>{var r,s;-1===n&&e[o]?i.forEach((t=>t.to=e[o].from)):o===e.length&&e[n]?i.forEach((t=>t.to=e[n].from)):"intersect"===t&&(null===(r=e[n])||void 0===r?void 0:r.from)&&(null===(s=e[o])||void 0===s?void 0:s.from)?i.forEach((t=>t.to=BH(e[n].from,e[o].from,t.from.x))):i.forEach((e=>e.to=e.from))})),jH(e,"in","out",((i,n,o)=>{var r,s;-1===n&&e[o]?i.forEach((t=>t.from=e[o].to)):o===e.length&&e[n]?i.forEach((t=>t.from=e[n].to)):"intersect"===t&&(null===(r=e[n])||void 0===r?void 0:r.to)&&(null===(s=e[o])||void 0===s?void 0:s.to)?i.forEach((t=>t.from=BH(e[n].to,e[o].to,t.to.x))):i.forEach((e=>e.from=e.to))}))}function WH(e,t,i){const n=isNaN(e.x)?t.x:e.x,o=isNaN(e.y)?t.y:e.y,r=t.x-e.x,s=t.y-e.y,a=isNaN(r)?0:r*i,l=isNaN(s)?0:s*i;return{x:n+a,y:o+l}}function UH(e,t,i){const{path:n}=i;let o;for(const r of e){const e=t[r.change];if(null==e)continue;const{from:i,to:s}=r;if(null==i||null==s)continue;const{x:a,y:l}=WH(i,s,e);if(!1===r.moveTo)n.lineTo(a,l);else if(!0!==r.moveTo&&o){if(o){const t="in"===r.moveTo?e:1-e,{x:i,y:s}=WH(o,{x:a,y:l},t);n.lineTo(i,s),n.moveTo(a,l)}}else n.moveTo(a,l);o={x:a,y:l}}}function zH({id:e},t,i){dL(e,"path_properties",t,i,{clipScalingX:0},{clipScalingX:1},{start:{clipMode:"normal"},finish:{clipMode:void 0}})}function KH({id:e},t,i,n){dL(e,t,i,n,{opacity:0},{opacity:1},oL)}function YH(e){return t=>({opacity:e.getOpacity(),clipScalingX:1,clipMode:void 0})}function qH(e,t){if(!t)return NaN;if(e instanceof Date&&(e=e.getTime()),"continuous"===t.type&&"number"===typeof e){const i=(e-t.domain[0])/(t.domain[1]-t.domain[0]);return i*(t.range[1]-t.range[0])+t.range[0]}if("log"===t.type&&"number"===typeof e)return t.convert(e);const i=t.domain.findIndex((t=>t===e));return i>=0?t.range[i]:NaN}function XH(e,t){const i=Number(e),n=Number(t);return isNaN(i)||isNaN(n)?e===t:Math.abs(n-i)<.25}function $H(e=!1,t=!1){return e===t?!!e:e?"in":"out"}function ZH(e,t,i={}){var n,o,r,s;const{backfillSplitMode:a="intersect"}=i,l=t=>{var i,n;return{x:qH(null!==(i=t.xValue)&&void 0!==i?i:NaN,e.scales.x),y:qH(null!==(n=t.yValue)&&void 0!==n?n:NaN,e.scales.y)}},c=e=>{var i,n;return{x:qH(null!==(i=e.xValue)&&void 0!==i?i:NaN,t.scales.x),y:qH(null!==(n=e.yValue)&&void 0!==n?n:NaN,t.scales.y)}},u=[],d={added:{},moved:{},removed:{}},p=(e,t,i,n="move")=>{e&&(isNaN(e.point.x)||isNaN(e.point.y))&&(e=t);const o={from:null===e||void 0===e?void 0:e.point,to:null===t||void 0===t?void 0:t.point,moveTo:$H(null===e||void 0===e?void 0:e.point.moveTo,null===t||void 0===t?void 0:t.point.moveTo),change:n};"move"===n?(d.moved[i]=o,y++,m++):"in"===n?(d.added[i]=o,m++):"out"===n&&(d.removed[i]=o,y++),u.push(o)},{min:h,max:f}=VH(t.nodeData),{min:g,max:v}=VH(e.nodeData);let y=0,m=0;while(y<t.nodeData.length||m<e.nodeData.length){const i=t.nodeData[y],a=e.nodeData[m],u=i?l(i):void 0,d=a?c(a):void 0,C=void 0;if(u&&XH(u.x,null===a||void 0===a?void 0:a.point.x))p(i,a,a.xValue,"move");else if(u&&u.x<(null!==(n=null===g||void 0===g?void 0:g.point.x)&&void 0!==n?n:-1/0))p(i,C,i.xValue,"out");else if(u&&u.x>(null!==(o=null===v||void 0===v?void 0:v.point.x)&&void 0!==o?o:1/0))p(i,C,i.xValue,"out");else if(d&&d.x<(null!==(r=null===h||void 0===h?void 0:h.point.x)&&void 0!==r?r:-1/0))p(C,a,a.xValue,"in");else if(d&&d.x>(null!==(s=null===f||void 0===f?void 0:f.point.x)&&void 0!==s?s:1/0))p(C,a,a.xValue,"in");else if(u&&u.x<(null===a||void 0===a?void 0:a.point.x))p(i,C,i.xValue,"out");else if(d&&d.x<(null===i||void 0===i?void 0:i.point.x))p(C,a,a.xValue,"in");else if(i)p(i,C,i.xValue,"out");else{if(!a)throw new Error("Unable to process points");p(C,a,a.xValue,"in")}}return HH(u,a),{result:u,resultMap:d}}function JH(e,t,i,n={}){var o,r,s;const{backfillSplitMode:a="intersect",multiDatum:l=!1}=n,c=[],u={added:{},moved:{},removed:{}},d={added:{},moved:{},removed:{}};let p,h;const f=(e,t)=>{var i,n;const o="move"===t.change?"moved":"in"===t.change?"added":"removed";l?(null!==(i=(n=d[o])[e])&&void 0!==i||(n[e]=[]),d[o][e].push(t)):u[o][e]=t,p=t,h=e};let g=0,v=0,y=!1;while(g<t.nodeData.length||v<e.nodeData.length){const n=t.nodeData[g],a=e.nodeData[v];let u;if((null===n||void 0===n?void 0:n.xValue)===(null===a||void 0===a?void 0:a.xValue))u={change:"move",moveTo:$H(null!==(o=n.point.moveTo)&&void 0!==o&&o,a.point.moveTo),from:n.point,to:a.point},f(n.xValue,u),g++,v++;else if(i.removed.indexOf(null===n||void 0===n?void 0:n.xValue)>=0)u={change:"out",moveTo:null!==(r=n.point.moveTo)&&void 0!==r&&r,from:n.point},f(n.xValue,u),g++;else if(i.added.indexOf(null===a||void 0===a?void 0:a.xValue)>=0)u={change:"in",moveTo:null!==(s=a.point.moveTo)&&void 0!==s&&s,to:a.point},f(a.xValue,u),v++;else if(l&&p&&h===(null===n||void 0===n?void 0:n.xValue))u=Object.assign({},p),f(n.xValue,u),g++;else{if(!l||!p||h!==(null===a||void 0===a?void 0:a.xValue)){y=!0;break}u=Object.assign({},p),f(a.xValue,u),v++}c.push(u)}let m=-1/0;return y||(y=c.some((e=>{const{change:t,to:{x:i=-1/0}={}}=e;if("out"===t)return;const n=i<m;return m=i,n}))),y?{result:void 0,resultMap:void 0}:(HH(c,a),l?{result:c,resultMap:d}:{result:c,resultMap:u})}function QH(e,t){let i="updated";const n=e=>e.visible;return!n(t)&&n(e)?i="added":n(t)&&!n(e)&&(i="removed"),i}function eW(e,t){const i="none"===t?"updated":e,n={fromFn:t=>{let n;return n="removed"===e?{finish:{visible:!1}}:"added"===e?{start:{visible:!0}}:{},Object.assign(Object.assign({},cL[i]),n)},toFn:e=>Object.assign({},cL[i])};return"fade"===t?{fromFn:t=>{const i="added"===e?0:t.opacity;return Object.assign({opacity:i},n.fromFn(t))},toFn:t=>{const i="removed"===e?0:1;return Object.assign({opacity:i},n.toFn(t))}}:n}function tW(e,t,i,n,o){const r=QH(e,t),s=(e,t)=>{o(i,{move:0,out:e},t)},a=(e,t)=>{o(i,{move:e},t)},l=(e,t)=>
18{o(i,{move:1,in:e},t)},c=eW(r,n);return{status:r,path:{addPhaseFn:l,updatePhaseFn:a,removePhaseFn:s},pathProperties:c}}function iW(e,t,i){var n;const o="category"===(null===(n=e.scales.x)||void 0===n?void 0:n.type),{result:r,resultMap:s}=o&&i?JH(e,t,i):ZH(e,t);let a="updated";if(t.visible&&!e.visible?a="removed":!t.visible&&e.visible&&(a="added"),void 0===r||void 0===s)return;const l=tW(e,t,r,"fade",UH),c=GH(s,a);return Object.assign(Object.assign({},l),{marker:c})}var nW,oW;function rW(e){const{points:t}=e.fillData;return{top:t.slice(0,t.length/2),bottom:t.slice(t.length/2).reverse()}}function sW(e,t,i){return{scales:t.scales,nodeData:i[e],visible:t.visible}}function aW(e,t,i){const n=rW(t),o=rW(e),r={multiDatum:!0};return{top:JH(sW("top",e,o),sW("top",t,n),i,r),bottom:JH(sW("bottom",e,o),sW("bottom",t,n),i,r)}}function lW(e,t){const i=rW(t),n=rW(e);return{top:ZH(sW("top",e,n),sW("top",t,i)),bottom:ZH(sW("bottom",e,n),sW("bottom",t,i))}}function cW(e,t,i){var n;const o="category"===(null===(n=e.scales.x)||void 0===n?void 0:n.type);let r="updated";t.visible&&!e.visible?r="removed":!t.visible&&e.visible&&(r="added");const s=()=>o&&i?JH(e,t,i,{backfillSplitMode:"static",multiDatum:!0}):ZH(e,t,{backfillSplitMode:"static"}),a=()=>o&&i?aW(e,t,i):lW(e,t),{resultMap:l}=s(),{top:c,bottom:u}=a();if(void 0===l||void 0===c.result||void 0===u.result)return;const d=[...c.result,...u.result.reverse()],p=tW(e,t,d,"none",UH),h=GH(l,r);return{fill:p,marker:h}}iM([JM(dk),sN({redraw:nN.MAJOR}),nM("design:type",Object)],kH.prototype,"enabled",void 0),iM([JM(MH),sN({redraw:nN.MAJOR}),nM("design:type",Object)],kH.prototype,"shape",void 0),iM([JM(Tk(0)),sN({redraw:nN.MAJOR}),nM("design:type",Number)],kH.prototype,"size",void 0),iM([JM(Sk),sN({redraw:nN.MAJOR}),nM("design:type",String)],kH.prototype,"fill",void 0),iM([JM(Dk(0,1)),sN({redraw:nN.MAJOR}),nM("design:type",Number)],kH.prototype,"fillOpacity",void 0),iM([JM(Sk),sN({redraw:nN.MAJOR}),nM("design:type",String)],kH.prototype,"stroke",void 0),iM([JM(Dk(0)),sN({redraw:nN.MAJOR}),nM("design:type",Number)],kH.prototype,"strokeWidth",void 0),iM([JM(Dk(0,1)),sN({redraw:nN.MAJOR}),nM("design:type",Number)],kH.prototype,"strokeOpacity",void 0),iM([JM(uk),sN({redraw:nN.MAJOR}),nM("design:type",Function)],kH.prototype,"formatter",void 0),function(e){e[e["Fill"]=0]="Fill",e[e["Stroke"]=1]="Stroke",e[e["Marker"]=2]="Marker",e[e["Label"]=3]="Label"}(nW||(nW={}));class uW extends pj{constructor(e){super({moduleCtx:e,pathsPerSeries:2,pathsZIndexSubOrderOffset:[0,1e3],hasMarkers:!0,markerSelectionGarbageCollection:!1,pickModes:[oF.NEAREST_BY_MAIN_AXIS_FIRST,oF.EXACT_SHAPE_MATCH],animationResetFns:{path:YH({getOpacity:()=>this.getOpacity()}),label:wF,marker:(e,t)=>Object.assign(Object.assign({},IH()),FH(e,t))}}),this.tooltip=new KF,this.marker=new kH,this.label=new FI,this.fill="#c16068",this.stroke="#874349",this.fillOpacity=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.xKey=void 0,this.xName=void 0,this.strokeWidth=2,this.shadow=void 0}processData(e){return oM(this,void 0,void 0,(function*(){const{xKey:t,yKey:i,normalizedTo:n,data:o,visible:r,seriesGrouping:{groupIndex:s=this.id}={}}=this;if(null==t||null==i||null==o)return;const a=!this.ctx.animationManager.isSkipped(),{isContinuousX:l,isContinuousY:c}=this.isContinuous(),u=[`area-stack-${s}-yValues`,`area-stack-${s}-yValues-trailing`,`area-stack-${s}-yValues-prev`,`area-stack-${s}-yValues-trailing-prev`,`area-stack-${s}-yValues-marker`],d=[],p=n&&isFinite(n)?n:void 0;p&&(d.push(RI(this,[u[0],u[1],u[4]],p,"range")),d.push(RI(this,[u[2],u[3]],p,"range"))),!l&&a&&this.processedData&&d.push(LI(this.processedData)),a&&d.push(PI(this));const h={invalidValue:null};r||(h.forceValue=0),yield this.requestDataModel(e,o,{props:[lF(this,t,l,{id:"xValue"}),cF(this,i,c,Object.assign({id:"yValueRaw"},h)),...pF(this,i,c,"window","current",Object.assign(Object.assign({id:"yValueEnd"},h),{groupId:u[0]})),...pF(this,i,c,"window-trailing","current",Object.assign(Object.assign({id:"yValueStart"},h),{groupId:u[1]})),...pF(this,i,c,"window","last",Object.assign(Object.assign({id:"yValuePreviousEnd"},h),{groupId:u[2]})),...pF(this,i,c,"window-trailing","last",Object.assign(Object.assign({id:"yValuePreviousStart"},h),{groupId:u[3]})),...pF(this,i,c,"normal","current",Object.assign(Object.assign({id:"yValueCumulative"},h),{groupId:u[4]})),...d],groupByKeys:!0}),this.animationState.transition("updateData")}))}getSeriesDomain(e){const{processedData:t,dataModel:i,axes:n}=this;if(!t||!i)return[];const o=n[iN.X],r=n[iN.Y],s=i.resolveProcessedDataDefById(this,"xValue"),a=i.getDomain(this,"xValue","key",t),l=i.getDomain(this,"yValueEnd","value",t);if(e===iN.X)return"key"===(null===s||void 0===s?void 0:s.def.type)&&"category"===s.def.valueType?a:qV(lM(a),o);if(r instanceof Ej||r instanceof Oj)return qV(l,r);{const e=[l[0]>0?0:l[0],l[1]<0?0:l[1]];return qV(e,r)}}createNodeData(){const e=Object.create(null,{calculateScaling:{get:()=>super.calculateScaling}});var t;return oM(this,void 0,void 0,(function*(){const{axes:i,data:n,processedData:{data:o}={},dataModel:r}=this,s=i[iN.X],a=i[iN.Y];if(!s||!a||!n||!r)return[];const{yKey:l="",xKey:c="",marker:u,label:d,fill:p,stroke:h}=this,{scale:f}=s,{scale:g}=a,v=jL.is(g),y=(null!==(t=f.bandwidth)&&void 0!==t?t:0)/2,m=r.resolveProcessedDataDefsByIds(this,["yValueStart","yValueEnd","yValueRaw","yValuePreviousStart","yValuePreviousEnd","yValueCumulative"]),C=e=>{const{point:t}=e,i=tM(e,["point"]);return Object.assign(Object.assign({},i),{point:Object.assign(Object.assign({},t),{moveTo:!0})})},b=(e,t,i)=>{const n=f.convert(e)+y,o=g.convert(t),r=g.convert(i);return[{point:{x:n,y:r},yValue:i,xValue:e},{point:{x:n,y:o},yValue:t,xValue:e}]},w=(e,t,i)=>{let n;const o=this.normalizedTo&&isFinite(this.normalizedTo),r=o&&v&&bI(i),s=!o&&!isNaN(i)||r;s&&(n=t);const a=f.convert(e)+y,l=g.convert(n);return{x:a,y:l,size:u.size}},S=l,E=[],x=[],O={itemId:S,fillData:{itemId:S,points:[]},strokeData:{itemId:S,points:[]},labelData:E,nodeData:x,scales:e.calculateScaling.call(this),visible:this.visible},T=O.fillData.points,D=[],R=O.strokeData.points;let A,_=-1,P=-1/0;return null===o||void 0===o||o.forEach((e=>{const{keys:t,keys:[i],datum:n,values:o}=e;o.forEach(((e,o)=>{var s,a,f;_++;const g=n[o],v=r.resolveProcessedDataDefsValues(m,{keys:t,values:e}),{yValueRaw:y,yValueCumulative:O}=v;let{yValueStart:M,yValueEnd:k,yValuePreviousStart:N,yValuePreviousEnd:L}=v;const I=null!=y,F=w(i,+O,y);if(I&&u&&x.push({index:_,series:this,itemId:S,datum:g,midPoint:{x:F.x,y:F.y},cumulativeValue:k,yValue:y,xValue:i,yKey:l,xKey:c,point:F,fill:null!==(s=u.fill)&&void 0!==s?s:p,stroke:null!==(a=u.stroke)&&void 0!==a?a:h,strokeWidth:null!==(f=u.strokeWidth)&&void 0!==f?f:this.getStrokeWidth(this.strokeWidth)}),I&&d){const e=this.getLabelText(d,{value:y,datum:g,xKey:c,yKey:l,xName:this.xName,yName:this.yName},(e=>SI(e)?e.toFixed(2):String(e)));E.push({index:_,series:this,itemId:l,datum:g,x:F.x,y:F.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})}null!=P&&null!=y||(M=null!==M&&void 0!==M?M:0,k=null!==M&&void 0!==M?M:0,N=null!==N&&void 0!==N?N:0,L=null!==N&&void 0!==N?N:0);const[G,V]=b(A,N,L),[B,j]=b(i,M,k),H=null!=A&&null!=i;
18H&&(T.push(G),D.push(V),T.push(B),D.push(j)),I&&null!=P&&_>0&&(R.push(C(G)),R.push(B)),A=i,P=y}))})),R.length>0&&(R[0]=C(R[0])),D.reverse(),T.push(...D),[O]}))}isPathOrSelectionDirty(){return this.marker.isDirty()}markerFactory(){const{shape:e}=this.marker,t=_B(e);return new t}updatePathNodes(e){return oM(this,void 0,void 0,(function*(){const{opacity:t,visible:i,animationEnabled:n}=e,[o,r]=e.paths,{seriesRectHeight:s,seriesRectWidth:a}=this.nodeDataDependencies,l=this.getStrokeWidth(this.strokeWidth);r.setProperties({tag:nW.Stroke,fill:void 0,lineJoin:r.lineCap="round",pointerEvents:yN.None,stroke:this.stroke,strokeWidth:l,strokeOpacity:this.strokeOpacity,lineDash:this.lineDash,lineDashOffset:this.lineDashOffset,opacity:t,visible:i}),o.setProperties({tag:nW.Fill,stroke:void 0,lineJoin:"round",pointerEvents:yN.None,fill:this.fill,fillOpacity:this.fillOpacity,lineDash:this.lineDash,lineDashOffset:this.lineDashOffset,strokeOpacity:this.strokeOpacity,fillShadow:this.shadow,opacity:t,visible:i||n,strokeWidth:l});const c=e=>{var t,i;null==e.clipPath&&(e.clipPath=new rI,e.clipScalingX=1,e.clipScalingY=1),null===(t=e.clipPath)||void 0===t||t.clear({trackChanges:!0}),null===(i=e.clipPath)||void 0===i||i.rect(-25,-25,(null!==a&&void 0!==a?a:0)+50,(null!==s&&void 0!==s?s:0)+50)};c(r),c(o)}))}updatePaths(e){return oM(this,void 0,void 0,(function*(){this.updateAreaPaths([e.paths],[e.contextData])}))}updateAreaPaths(e,t){this.updateFillPath(e,t),this.updateStrokePath(e,t)}updateFillPath(e,t){t.forEach((({fillData:t},i)=>{const[n]=e[i],{path:o}=n;o.clear({trackChanges:!0});for(const{point:e}of t.points)e.moveTo?o.moveTo(e.x,e.y):o.lineTo(e.x,e.y);o.closePath(),n.checkPathDirty()}))}updateStrokePath(e,t){t.forEach((({strokeData:t},i)=>{const[,n]=e[i],{path:o}=n;o.clear({trackChanges:!0});for(const{point:e}of t.points)e.moveTo?o.moveTo(e.x,e.y):o.lineTo(e.x,e.y);n.checkPathDirty()}))}updateMarkerSelection(e){return oM(this,void 0,void 0,(function*(){const{nodeData:t,markerSelection:i}=e,{marker:{enabled:n}}=this,o=n&&t?t:[];return this.marker.isDirty()&&(i.clear(),i.cleanup()),i.update(o)}))}updateMarkerNodes(e){return oM(this,void 0,void 0,(function*(){const{markerSelection:t,isHighlight:i}=e,{xKey:n="",yKey:o="",marker:r,fill:s,stroke:a,strokeWidth:l,fillOpacity:c,strokeOpacity:u}=this,d=hI(i&&this.highlightStyle.item,r.getStyle(),{fill:s,stroke:a,strokeWidth:l,fillOpacity:c,strokeOpacity:u});t.each(((e,t)=>{this.updateMarkerStyle(e,r,{datum:t,highlighted:i,xKey:n,yKey:o},d)})),i||this.marker.markClean()}))}updateLabelSelection(e){return oM(this,void 0,void 0,(function*(){const{labelData:t,labelSelection:i}=e;return i.update(t,(e=>{e.tag=nW.Label}))}))}updateLabelNodes(e){return oM(this,void 0,void 0,(function*(){const{labelSelection:t}=e,{enabled:i,fontStyle:n,fontWeight:o,fontSize:r,fontFamily:s,color:a}=this.label;t.each(((e,t)=>{const{x:l,y:c,label:u}=t;u&&i&&this.visible?(e.fontStyle=n,e.fontWeight=o,e.fontSize=r,e.fontFamily=s,e.textAlign=u.textAlign,e.textBaseline=u.textBaseline,e.text=u.text,e.x=l,e.y=c-10,e.fill=a,e.visible=!0):e.visible=!1}))}))}getTooltipHtml(e){const{xKey:t,id:i,axes:n,xName:o,yName:r,tooltip:s,marker:a,dataModel:l}=this,{yKey:c,xValue:u,yValue:d,datum:p}=e,h=n[iN.X],f=n[iN.Y];if(!t||!c||!(h&&f&&SI(d))||!l)return"";const g=h.formatDatum(u),v=f.formatDatum(d),y=gI(r),m=gI(g+": "+v),C=hI({fill:this.fill},a.getStyle(),{stroke:this.stroke,strokeWidth:this.strokeWidth}),{fill:b}=this.getMarkerStyle(a,{datum:e,xKey:t,yKey:c,highlighted:!1},C);return s.toTooltipHtml({title:y,content:m,backgroundColor:b},{datum:p,xKey:t,xName:o,yKey:c,yName:r,color:b,title:y,seriesId:i})}getLegendData(e){var t,i,n,o,r;const{data:s,id:a,xKey:l,yKey:c,yName:u,marker:d,fill:p,stroke:h,fillOpacity:f,strokeOpacity:g,visible:v}=this;return(null===s||void 0===s?void 0:s.length)&&l&&c&&"category"===e?[{legendType:e,id:a,itemId:c,seriesId:a,enabled:v,label:{text:null!==u&&void 0!==u?u:c},marker:{shape:d.shape,fill:null!==(t=d.fill)&&void 0!==t?t:p,stroke:null!==(i=d.stroke)&&void 0!==i?i:h,fillOpacity:null!==(n=d.fillOpacity)&&void 0!==n?n:f,strokeOpacity:null!==(o=d.strokeOpacity)&&void 0!==o?o:g,strokeWidth:null!==(r=d.strokeWidth)&&void 0!==r?r:0}}]:[]}animateEmptyUpdateReady(e){const{markerSelections:t,labelSelections:i,contextData:n,paths:o}=e,{animationManager:r}=this.ctx,{seriesRectWidth:s=0}=this.nodeDataDependencies;this.updateAreaPaths(o,n),zH(this,r,o.flat()),XF(t,FH),LH(this,r,t,s),CF(this,"labels",r,i)}animateReadyResize(e){const{contextData:t,paths:i}=e;this.updateAreaPaths(i,t),super.animateReadyResize(e)}animateWaitingUpdateReady(e){var t,i;const{animationManager:n}=this.ctx,{markerSelections:o,labelSelections:r,contextData:s,paths:a,previousContextData:l}=e;if(super.resetAllAnimation(e),0===s.length||!l||0===l.length)return n.skipCurrentBatch(),void this.updateAreaPaths(a,s);const[[c,u]]=a,[d]=s,[p]=l,h=cW(d,p,null===(i=null===(t=this.processedData)||void 0===t?void 0:t.reduced)||void 0===i?void 0:i.diff);if(void 0===h)return n.skipCurrentBatch(),void this.updateAreaPaths(a,s);uL(this.id,"marker_update",n,o,h.marker),uL(this.id,"fill_path_properties",n,[c],h.fill.pathProperties),PH(this.id,"fill_path_update",n,[c],h.fill.path),this.updateStrokePath(a,s),KH(this,"stroke",n,[u]),CF(this,"labels",n,r)}isLabelEnabled(){return this.label.enabled}nodeFactory(){return new zL}}uW.className="AreaSeries",uW.type="area",iM([JM(wk),nM("design:type",String)],uW.prototype,"fill",void 0),iM([JM(wk),nM("design:type",String)],uW.prototype,"stroke",void 0),iM([JM(Tk(0,1)),nM("design:type",Object)],uW.prototype,"fillOpacity",void 0),iM([JM(Tk(0,1)),nM("design:type",Object)],uW.prototype,"strokeOpacity",void 0),iM([JM(Bk),nM("design:type",Array)],uW.prototype,"lineDash",void 0),iM([JM(Tk(0)),nM("design:type",Number)],uW.prototype,"lineDashOffset",void 0),iM([JM(fk),nM("design:type",String)],uW.prototype,"xKey",void 0),iM([JM(fk),nM("design:type",String)],uW.prototype,"xName",void 0),iM([JM(fk),nM("design:type",String)],uW.prototype,"yKey",void 0),iM([JM(fk),nM("design:type",String)],uW.prototype,"yName",void 0),iM([JM(Dk(0)),nM("design:type",Number)],uW.prototype,"normalizedTo",void 0),iM([JM(Tk(0)),nM("design:type",Object)],uW.prototype,"strokeWidth",void 0);class dW extends pj{constructor(){super(...arguments),this.direction="vertical"}getBandScalePadding(){return{inner:.2,outer:.1}}shouldFlipXY(){return"horizontal"===this.direction}getBarDirection(){return this.shouldFlipXY()?iN.X:iN.Y}getCategoryDirection(){return this.shouldFlipXY()?iN.Y:iN.X}getValueAxis(){const e=this.getBarDirection();return this.axes[e]}getCategoryAxis(){const e=this.getCategoryDirection();return this.axes[e]}}function pW({rect:e,config:t}){const{crisp:i=!0,fill:n,stroke:o,strokeWidth:r,fillOpacity:s,strokeOpacity:a,lineDash:l,lineDashOffset:c,fillShadow:u,visible:d=!0}=t;e.crisp=i,e.fill=n,e.stroke=o,e.strokeWidth=r,e.fillOpacity=s,e.strokeOpacity=a,e.lineDash=l,e.lineDashOffset=c,e.fillShadow=u,e.visible=d}function hW(e){var t,i,n,o,r,{datum:s,isHighlighted:a,style:l,highlightStyle:c,formatter:u,seriesId:d,ctx:{callbackCache:p}}=e,h=tM(e,["datum","isHighlighted","style","highlightStyle","formatter","seriesId","ctx"]);const{fill:f,fillOpacity:g,stroke:v,strokeWidth:y}=hI(a&&c,l),{strokeOpacity:m,fillShadow:C,lineDash:b,lineDashOffset:w}=l;let S;return u&&(S=p.call(u,Object.assign({datum:s.datum,xKey:s.xKey,fill:f,stroke:v,strokeWidth:y,highlighted:a,seriesId:d},h))),{fill:null!==(t=null===S||void 0===S?void 0:S.fill)&&void 0!==t?t:f,stroke:null!==(i=null===S||void 0===S?void 0:S.stroke)&&void 0!==i?i:v,strokeWidth:null!==(n=null===S||void 0===S?void 0:S.strokeWidth)&&void 0!==n?n:y,fillOpacity:null!==(o=null===S||void 0===S?void 0:S.fillOpacity)&&void 0!==o?o:g,strokeOpacity:null!==(r=null===S||void 0===S?void 0:S.strokeOpacity)&&void 0!==r?r:m,lineDash:b,lineDashOffset:w,fillShadow:C}
18}function fW(e=[]){const[t,i]=e,n=0!==t||1!==i;return!n}function gW(e,t){const{startingX:i,startingY:n}=yW(e,t),o=e=>{var t;return YM(null!==(t=e["yValue"])&&void 0!==t?t:0)},r=(t,r)=>{let s=e?t.x:i,a=e?n:t.y,l=e?t.width:0,c=e?0:t.height;return r&&(isNaN(s)||isNaN(a))&&(({x:s,y:a}=r),l=e?r.width:0,c=e?0:r.height,e&&!o(r)?a+=r.height:!e&&o(r)&&(s+=r.width)),{x:s,y:a,width:l,height:c}};return{isVertical:e,calculate:r}}function vW(e){const t=e=>null==e||isNaN(e.x)||isNaN(e.y),i=(i,n,o)=>{"updated"===o&&t(n)?o="removed":"updated"===o&&t(i.previousDatum)&&(o="added");let r={x:i.x,y:i.y,width:i.width,height:i.height};return"unknown"!==o&&"added"!==o||(r=e.calculate(n,i.previousDatum)),Object.assign(Object.assign({},r),cL[o])},n=(i,n,o)=>"removed"===o||t(n)?e.calculate(n,i.previousDatum):{x:n.x,y:n.y,width:n.width,height:n.height};return{toFn:n,fromFn:i}}function yW(e,t){const i=t[e?iN.Y:iN.X];let n=1/0,o=0;return i?(e?o=i.scale.convert(jL.is(i.scale)?0:Math.max(...i.range)):n=i.scale.convert(jL.is(i.scale)?0:Math.min(...i.range)),{startingX:n,startingY:o}):{startingX:n,startingY:o}}function mW(e,{x:t,y:i,width:n,height:o}){return{x:t,y:i,width:n,height:o}}function CW(e,t,i){if(t.enabled&&i){const{x:n,y:o,text:r,textAlign:s,textBaseline:a}=i,{color:l,fontStyle:c,fontWeight:u,fontSize:d,fontFamily:p}=t;e.setProperties({visible:!0,x:n,y:o,text:r,fill:l,fontStyle:c,fontWeight:u,fontSize:d,fontFamily:p,textAlign:s,textBaseline:a})}else e.visible=!1}function bW({isPositive:e,isVertical:t,placement:i,padding:n=0,rect:o}){let r=o.x+o.width/2,s=o.y+o.height/2,a="center",l="middle";switch(i){case"start":t?(s=e?o.y+o.height+n:o.y-n,l=e?"top":"bottom"):(r=e?o.x-n:o.x+o.width+n,a=e?"start":"end");break;case"outside":case"end":t?(s=e?o.y-n:o.y+o.height+n,l=e?"bottom":"top"):(r=e?o.x+o.width+n:o.x-n,a=e?"start":"end");break}return{x:r,y:s,textAlign:a,textBaseline:l}}iM([JM(tN),nM("design:type",String)],dW.prototype,"direction",void 0),function(e){e[e["Bar"]=0]="Bar",e[e["Label"]=1]="Label"}(oW||(oW={}));class wW extends FI{constructor(){super(...arguments),this.placement="inside"}}iM([JM(Mk("inside","outside")),nM("design:type",String)],wW.prototype,"placement",void 0);class SW extends dW{constructor(e){super({moduleCtx:e,pickModes:[oF.EXACT_SHAPE_MATCH],pathsPerSeries:0,hasHighlightedLabels:!0,datumSelectionGarbageCollection:!1,animationResetFns:{datum:mW,label:wF}}),this.label=new wW,this.tooltip=new KF,this.fill="#c16068",this.stroke="#874349",this.fillOpacity=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.formatter=void 0,this.xKey=void 0,this.xName=void 0,this.yKey=void 0,this.yName=void 0,this.stackGroup=void 0,this.strokeWidth=1,this.shadow=void 0,this.groupScale=new UM,this.smallestDataInterval=void 0}resolveKeyDirection(e){return this.getBarDirection()===iN.X?e===iN.X?iN.Y:iN.X:e}processData(e){var t,i,n,o;return oM(this,void 0,void 0,(function*(){const{xKey:r,yKey:s,normalizedTo:a,seriesGrouping:{groupIndex:l=this.id}={},data:c=[]}=this;if(null==r||null==s||null==c)return;const u=!this.ctx.animationManager.isSkipped(),d=Math.abs(null!==a&&void 0!==a?a:NaN),p=jL.is(null===(t=this.getCategoryAxis())||void 0===t?void 0:t.scale),h=jL.is(null===(i=this.getValueAxis())||void 0===i?void 0:i.scale),f=`bar-stack-${l}-yValues`,g=`${f}-trailing`,v=d&&isFinite(d)?d:void 0,y=[];v&&y.push(RI(this,[f,g],v,"range")),u&&this.processedData&&y.push(LI(this.processedData)),u&&y.push(PI(this));const m=this.visible?{}:{forceValue:0},{processedData:C}=yield this.requestDataModel(e,c,{props:[lF(this,r,p,{id:"xValue"}),cF(this,s,h,Object.assign({id:"yValue-raw",invalidValue:null},m)),...pF(this,s,h,"normal","current",Object.assign({id:"yValue-end",invalidValue:null,missingValue:0,groupId:f,separateNegative:!0},m)),...pF(this,s,h,"trailing","current",Object.assign({id:"yValue-start",invalidValue:null,missingValue:0,groupId:g,separateNegative:!0},m)),...p?[OI]:[],...y],groupByKeys:!0});this.smallestDataInterval={x:null!==(o=null===(n=C.reduced)||void 0===n?void 0:n.smallestKeyInterval)&&void 0!==o?o:1/0,y:1/0},this.animationState.transition("updateData")}))}getSeriesDomain(e){var t;const{processedData:i,dataModel:n}=this;if(!i||!n)return[];const{reduced:{[OI.property]:o}={}}=i,r=this.getCategoryAxis(),s=this.getValueAxis(),a=n.resolveProcessedDataDefById(this,"xValue"),l=n.getDomain(this,"xValue","key",i),c=n.getDomain(this,"yValue-end","value",i);
18if(e===this.getCategoryDirection()){if("key"===(null===a||void 0===a?void 0:a.def.type)&&"category"===(null===a||void 0===a?void 0:a.def.valueType))return l;const i=null!=o&&isFinite(o)?o:0,n=null!==(t=lM(l))&&void 0!==t?t:[NaN,NaN];return e===iN.Y?qV([n[0]+-i,n[1]],r):qV([n[0],n[1]+i],r)}if(this.getValueAxis()instanceof Ej)return qV(c,s);{const e=[c[0]>0?0:c[0],c[1]<0?0:c[1]];return qV(e,s)}}createNodeData(){const e=Object.create(null,{calculateScaling:{get:()=>super.calculateScaling}});return oM(this,void 0,void 0,(function*(){const{dataModel:t}=this,i=this.getCategoryAxis(),n=this.getValueAxis();if(!(t&&i&&n))return[];const o=i.scale,r=n.scale,{groupScale:s,yKey:a="",xKey:l="",fill:c,stroke:u,strokeWidth:d,label:p,processedData:h,ctx:{seriesStateManager:f},smallestDataInterval:g}=this,v=jL.is(o)?o.calcBandwidth(null===g||void 0===g?void 0:g.x):o.bandwidth,y=[],{index:m,visibleGroupCount:C}=f.getVisiblePeerGroupIndex(this);for(let e=0;e<C;e++)y.push(String(e));s.domain=y,s.range=[0,null!==v&&void 0!==v?v:0],i instanceof gV?s.paddingInner=i.groupPaddingInner:s.padding=i instanceof _V?.1:0,s.round=0!==s.padding;const b=s.bandwidth>=1?s.bandwidth:s.rawBandwidth,w=t.resolveProcessedDataIndexById(this,"xValue").index,S=t.resolveProcessedDataIndexById(this,"yValue-raw").index,E=t.resolveProcessedDataIndexById(this,"yValue-start").index,x=t.resolveProcessedDataIndexById(this,"yValue-end").index,O=!this.ctx.animationManager.isSkipped(),T={itemId:a,nodeData:[],labelData:[],scales:e.calculateScaling.call(this),visible:this.visible||O};return null===h||void 0===h||h.data.forEach((({keys:e,datum:t,values:i})=>{const n=e[w],h=o.convert(n),f=+i[0][x],g=+i[0][E],v=i[0][S],y=h+s.convert(String(m));if(isNaN(f))return;const C=r.convert(f),O=r.convert(g),D=this.getBarDirection()===iN.X,R={x:D?Math.min(C,O):y,y:D?y:Math.min(C,O),width:D?Math.abs(O-C):b,height:D?b:Math.abs(O-C)},{fontStyle:A,fontWeight:_,fontSize:P,fontFamily:M,color:k,placement:N}=p,L=this.getLabelText(this.label,{datum:t[0],value:v,xKey:l,yKey:a,xName:this.xName,yName:this.yName,legendItemName:this.legendItemName},(e=>SI(e)?e.toFixed(2):"")),I=L?Object.assign({text:L,fill:k,fontStyle:A,fontWeight:_,fontSize:P,fontFamily:M},bW({isPositive:v>=0,isVertical:!D,placement:N,rect:R})):void 0,F=this.shouldFlipXY()?R.height:R.width,G={series:this,itemId:a,datum:t[0],cumulativeValue:f,xValue:n,yValue:v,yKey:a,xKey:l,capDefaults:{lengthRatioMultiplier:F,lengthMax:F},x:R.x,y:R.y,width:R.width,height:R.height,midPoint:{x:R.x+R.width/2,y:R.y+R.height/2},fill:c,stroke:u,strokeWidth:d,label:I};T.nodeData.push(G),T.labelData.push(G)})),[T]}))}nodeFactory(){return new rj}updateDatumSelection(e){return oM(this,void 0,void 0,(function*(){return e.datumSelection.update(e.nodeData,(e=>{e.tag=oW.Bar}),(e=>e.xValue))}))}updateDatumNodes(e){return oM(this,void 0,void 0,(function*(){const{datumSelection:t,isHighlight:i}=e,{yKey:n="",fill:o,stroke:r,fillOpacity:s,strokeOpacity:a,lineDash:l,lineDashOffset:c,shadow:u,formatter:d,id:p,highlightStyle:{item:h},ctx:f,stackGroup:g}=this,v=this.axes[iN.X],y=fW(null===v||void 0===v?void 0:v.visibleRange),m=this.getCategoryDirection()===iN.X;t.each(((e,t)=>{const v={fill:o,stroke:r,fillOpacity:s,strokeOpacity:a,lineDash:l,lineDashOffset:c,fillShadow:u,strokeWidth:this.getStrokeWidth(this.strokeWidth)},C=m?t.width>0:t.height>0,b=hW({datum:t,isHighlighted:i,style:v,highlightStyle:h,formatter:d,seriesId:p,stackGroup:g,ctx:f,yKey:n});b.crisp=y,b.visible=C,pW({rect:e,config:b})}))}))}updateLabelSelection(e){return oM(this,void 0,void 0,(function*(){const t=this.label.enabled?e.labelData:[];return e.labelSelection.update(t,(e=>{e.tag=oW.Label,e.pointerEvents=yN.None}))}))}updateLabelNodes(e){return oM(this,void 0,void 0,(function*(){e.labelSelection.each(((e,t)=>{CW(e,this.label,t.label)}))}))}getTooltipHtml(e){var t;const{xKey:i,yKey:n,processedData:o,ctx:{callbackCache:r}}=this,s=this.getCategoryAxis(),a=this.getValueAxis(),{xValue:l,yValue:c,datum:u}=e;if(!o||!i||!n||!s||!a)return"";const{xName:d,yName:p,fill:h,stroke:f,tooltip:g,formatter:v,id:y,stackGroup:m}=this,C=this.getStrokeWidth(this.strokeWidth),b=s.formatDatum(l),w=a.formatDatum(c),S=gI(p),E=gI(b+": "+w);let x;v&&(x=r.call(v,{datum:u,fill:h,stroke:f,strokeWidth:C,highlighted:!1,xKey:i,yKey:n,seriesId:y,stackGroup:m}));const O=null!==(t=null===x||void 0===x?void 0:x.fill)&&void 0!==t?t:h;return g.toTooltipHtml({title:S,content:E,backgroundColor:O},Object.assign({datum:u,xKey:i,xName:d,yKey:n,yName:p,color:O,title:S,seriesId:y,stackGroup:m},this.getModuleTooltipParams(u)))}getLegendData(e){var t;const{id:i,data:n,xKey:o,yKey:r,yName:s,legendItemName:a,fill:l,stroke:c,strokeWidth:u,fillOpacity:d,strokeOpacity:p,visible:h,showInLegend:f}=this;return"category"===e&&f&&(null===n||void 0===n?void 0:n.length)&&o&&r?[{legendT
18ype:"category",id:i,itemId:r,seriesId:i,enabled:h,label:{text:null!==(t=null!==a&&void 0!==a?a:s)&&void 0!==t?t:r},marker:{fill:l,stroke:c,fillOpacity:d,strokeOpacity:p,strokeWidth:u},legendItemName:a}]:[]}animateEmptyUpdateReady({datumSelections:e,labelSelections:t,annotationSelections:i}){const n=vW(gW("vertical"===this.direction,this.axes));uL(this.id,"nodes",this.ctx.animationManager,e,n),CF(this,"labels",this.ctx.animationManager,t),CF(this,"annotations",this.ctx.animationManager,i)}animateWaitingUpdateReady(e){var t,i;const{datumSelections:n,labelSelections:o,annotationSelections:r}=e;this.ctx.animationManager.stopByAnimationGroupId(this.id);const s=null===(i=null===(t=this.processedData)||void 0===t?void 0:t.reduced)||void 0===i?void 0:i.diff,a=vW(gW("vertical"===this.direction,this.axes));uL(this.id,"nodes",this.ctx.animationManager,n,a,((e,t)=>String(t.xValue)),s),CF(this,"labels",this.ctx.animationManager,o),CF(this,"annotations",this.ctx.animationManager,r)}isLabelEnabled(){return this.label.enabled}}SW.className="BarSeries",SW.type="bar",iM([JM(Sk),nM("design:type",String)],SW.prototype,"fill",void 0),iM([JM(Sk),nM("design:type",String)],SW.prototype,"stroke",void 0),iM([JM(Tk(0,1)),nM("design:type",Object)],SW.prototype,"fillOpacity",void 0),iM([JM(Tk(0,1)),nM("design:type",Object)],SW.prototype,"strokeOpacity",void 0),iM([JM(Bk),nM("design:type",Array)],SW.prototype,"lineDash",void 0),iM([JM(Tk(0)),nM("design:type",Number)],SW.prototype,"lineDashOffset",void 0),iM([JM(uk),nM("design:type",Function)],SW.prototype,"formatter",void 0),iM([JM(fk),nM("design:type",String)],SW.prototype,"xKey",void 0),iM([JM(fk),nM("design:type",String)],SW.prototype,"xName",void 0),iM([JM(fk),nM("design:type",String)],SW.prototype,"yKey",void 0),iM([JM(fk),nM("design:type",String)],SW.prototype,"yName",void 0),iM([JM(fk),nM("design:type",String)],SW.prototype,"stackGroup",void 0),iM([JM(Dk()),nM("design:type",Number)],SW.prototype,"normalizedTo",void 0),iM([JM(Tk(0)),nM("design:type",Number)],SW.prototype,"strokeWidth",void 0),$j.NUMBER,zj.LEFT,$j.CATEGORY,zj.BOTTOM;class EW extends dj{constructor(e,t,i,n){super(e,t,i,n),this.sizeKey=n.sizeKey}}class xW extends kH{constructor(){super(...arguments),this.maxSize=30,this.domain=void 0}}iM([JM(Tk(0)),sN({redraw:nN.MAJOR}),nM("design:type",Object)],xW.prototype,"maxSize",void 0),iM([JM(_k),sN({redraw:nN.MAJOR}),nM("design:type",Array)],xW.prototype,"domain",void 0);class OW extends pj{constructor(e){super({moduleCtx:e,pickModes:[oF.NEAREST_BY_MAIN_CATEGORY_AXIS_FIRST,oF.NEAREST_NODE,oF.EXACT_SHAPE_MATCH],pathsPerSeries:0,hasMarkers:!0,markerSelectionGarbageCollection:!1,animationResetFns:{label:wF,marker:IH}}),this.NodeClickEvent=EW,this.sizeScale=new HL,this.marker=new xW,this.label=new FI,this.title=void 0,this.labelKey=void 0,this.xName=void 0,this.yName=void 0,this.sizeName="Size",this.labelName="Label",this.xKey=void 0,this.yKey=void 0,this.sizeKey=void 0,this.colorKey=void 0,this.colorName="Color",this.colorRange=["#ffff00","#00ff00","#0000ff"],this.colorScale=new nj,this.tooltip=new KF}processData(e){var t,i;return oM(this,void 0,void 0,(function*(){const{xKey:n,yKey:o,sizeKey:r,labelKey:s,colorScale:a,colorDomain:l,colorRange:c,colorKey:u,marker:d,data:p}=this;if(null==n||null==o||null==r||null==p)return;const{isContinuousX:h,isContinuousY:f}=this.isContinuous(),{dataModel:g,processedData:v}=yield this.requestDataModel(e,p,{props:[lF(this,n,h,{id:"xKey-raw"}),lF(this,o,f,{id:"yKey-raw"}),...s?[lF(this,s,!1,{id:"labelKey-raw"})]:[],cF(this,n,h,{id:"xValue"}),cF(this,o,f,{id:"yValue"}),cF(this,r,!0,{id:"sizeValue"}),...u?[cF(this,u,!0,{id:"colorValue"})]:[],...s?[cF(this,s,!1,{id:"labelValue"})]:[]],dataVisible:this.visible}),y=g.resolveProcessedDataIndexById(this,"sizeValue").index,m=null!==(t=v.domain.values[y])&&void 0!==t?t:[];if(this.sizeScale.domain=d.domain?d.domain:m,u){const e=g.resolveProcessedDataIndexById(this,"colorValue").index;a.domain=null!==(i=null!==l&&void 0!==l?l:v.domain.values[e])&&void 0!==i?i:[],a.range=c,a.update()}this.animationState.transition("updateData")}))}getSeriesDomain(e){const{dataModel:t,processedData:i}=this;if(!i||!t)return[];const n=e===iN.X?"xValue":"yValue",o=t.resolveProcessedDataDefById(this,n),r=t.getDomain(this,n,"value",i);if("value"===(null===o||void 0===o?void 0:o.def.type)&&"category"===(null===o||void 0===o?void 0:o.def.valueType))return r;const s=this.axes[e];return qV(lM(r),s)}createNodeData(){const e=Object.create(null,{calculateScaling:{get:()=>super.calculateScaling}});var t,i,n,o;return oM(this,void 0,void 0,(function*(){const{visible:r,axes:s,yKey:a="",xKey:l="",label:c,labelKey:u,dataModel:d,processedData:p,colorScale:h,sizeKey:f="",colorKey:g}=this,v=s[iN.X],y=s[iN.Y];if(!(d&&p&&r&&v&&y))return[];const m=d.resolveProcessedDataIndexById(this,"xValue").index,C=d.resolveProcessedDataIndexById(this,"yValue").index,b=f?d.resolveProcessedDataIndexById(this,"sizeValue").index:-1,w=g?d.resolveProcessedDataIndexById(this,"colorValue").index:-1,S=u?d.resolveProcessedDataIndexById(this,"labelValue").index:-1,E=v.scale,x=y.scale,O=(null!==(t=E.bandwidth)&&void 0!==t?t:0)/2,T=(null!==(i=x.bandwidth)&&void 0!==i?i:0)/2,{sizeScale:D,marker:R}=this,A=[];D.range=[R.size,R.maxSize];const _=c.getFont();for(const{values:e,datum:t}of null!==(n=p.data)&&void 0!==n?n:[]){const i=e[m],n=e[C],o=E.convert(i)+O,r=x.convert(n)+T,s=this.getLabelText(c,{value:u?e[S]:n,datum:t,xKey:l,yKey:a,sizeKey:f,labelKey:u,xName:this.xName,yName:this.yName,sizeName:this.sizeName,labelName:this.labelName}),d=EN.getTextSize(String(s),_),p=f?D.convert(e[b]):R.size,v=g?h.convert(e[w]):void 0;A.push({series:this,itemId:a,yKey:a,xKey:l,datum:t,xValue:i,yValue:n,sizeValue:e[b],point:{x:o,y:r,size:p},midPoint:{x:o,y:r},fill:v,label:Object.assign({text:s},d)})}return[{itemId:null!==(o=this.yKey)&&void 0!==o?o:this.id,nodeData:A,labelData:A,scales:e.calculateScaling.call(this),visible:this.visible}]}))}isPathOrSelectionDirty(){return this.marker.isDirty()}getLabelData(){var e;return null===(e=this.contextNodeData)||void 0===e?void 0:e.reduce(((e,t)=>e.concat(t.labelData)),[])}markerFactory(){const{shape:e}=this.marker,t=_B(e);return new t}updateMarkerSelection(e){return oM(this,void 0,void 0,(function*(){const{nodeData:t,markerSelection:i}=e;this.marker.isDirty()&&(i.clear(),i.cleanup());const n=this.marker.enabled?t:[];return i.update(n,void 0,(e=>this.getDatumId(e)))}))}updateMarkerNodes(e){return oM(this,void 0,void 0,(function*(){const{markerSelection:t,isHighlight:i}=e,{xKey:n="",yKey:o="",sizeKey:r="",labelKey:s,marker:a}
18=this,l=hI(i&&this.highlightStyle.item,a.getStyle());this.sizeScale.range=[a.size,a.maxSize],t.each(((e,t)=>{this.updateMarkerStyle(e,a,{datum:t,highlighted:i,xKey:n,yKey:o,sizeKey:r,labelKey:s},l)})),i||this.marker.markClean()}))}updateLabelSelection(e){var t,i;return oM(this,void 0,void 0,(function*(){const{labelSelection:n}=e,{label:{enabled:o}}=this,r=o&&null!==(i=null===(t=this.chart)||void 0===t?void 0:t.placeLabels().get(this))&&void 0!==i?i:[],s=r.map((e=>Object.assign(Object.assign({},e.datum),{point:{x:e.x,y:e.y,size:e.datum.point.size}})));return n.update(s)}))}updateLabelNodes(e){return oM(this,void 0,void 0,(function*(){const{labelSelection:t}=e,{label:i}=this;t.each(((e,t)=>{var n,o,r,s;e.text=t.label.text,e.fill=i.color,e.x=null!==(o=null===(n=t.point)||void 0===n?void 0:n.x)&&void 0!==o?o:0,e.y=null!==(s=null===(r=t.point)||void 0===r?void 0:r.y)&&void 0!==s?s:0,e.fontStyle=i.fontStyle,e.fontWeight=i.fontWeight,e.fontSize=i.fontSize,e.fontFamily=i.fontFamily,e.textAlign="left",e.textBaseline="top"}))}))}getTooltipHtml(e){var t;const{xKey:i,yKey:n,sizeKey:o,axes:r}=this,s=r[iN.X],a=r[iN.Y];if(!i||!n||!s||!a||!o)return"";const{marker:l,tooltip:c,xName:u,yName:d,sizeName:p,labelKey:h,labelName:f,id:g}=this,v=hI({fill:e.fill,strokeWidth:this.getStrokeWidth(l.strokeWidth)},l.getStyle()),{fill:y="gray"}=this.getMarkerStyle(l,{datum:e,highlighted:!1,xKey:i,yKey:n,sizeKey:o,labelKey:h},v),m=null!==(t=this.title)&&void 0!==t?t:d,{datum:C,xValue:b,yValue:w,sizeValue:S,label:{text:E}}=e,x=gI(s.formatDatum(b)),O=gI(a.formatDatum(w));let T=`<b>${gI(null!==u&&void 0!==u?u:i)}</b>: ${x}<br><b>${gI(null!==d&&void 0!==d?d:n)}</b>: ${O}`;return o&&(T+=`<br><b>${gI(null!==p&&void 0!==p?p:o)}</b>: ${gI(String(S))}`),h&&(T=`<b>${gI(null!==f&&void 0!==f?f:h)}</b>: ${gI(E)}<br>`+T),c.toTooltipHtml({title:m,content:T,backgroundColor:y},{datum:C,xKey:i,xName:u,yKey:n,yName:d,sizeKey:o,sizeName:p,labelKey:h,labelName:f,title:m,color:y,seriesId:g})}getLegendData(){var e;const{id:t,data:i,xKey:n,yKey:o,sizeKey:r,yName:s,title:a,visible:l,marker:c}=this,{shape:u,fill:d,stroke:p,fillOpacity:h,strokeOpacity:f,strokeWidth:g}=c;return(null===i||void 0===i?void 0:i.length)&&n&&o&&r?[{legendType:"category",id:t,itemId:o,seriesId:t,enabled:l,label:{text:null!==(e=null!==a&&void 0!==a?a:s)&&void 0!==e?e:o},marker:{shape:u,fill:null!==d&&void 0!==d?d:"rgba(0, 0, 0, 0)",stroke:null!==p&&void 0!==p?p:"rgba(0, 0, 0, 0)",fillOpacity:null!==h&&void 0!==h?h:1,strokeOpacity:null!==f&&void 0!==f?f:1,strokeWidth:null!==g&&void 0!==g?g:0}}]:[]}animateEmptyUpdateReady({markerSelections:e,labelSelections:t}){NH(this,this.ctx.animationManager,e),CF(this,"labels",this.ctx.animationManager,t)}getDatumId(e){return II([`${e.xValue}`,`${e.yValue}`,e.label.text])}isLabelEnabled(){return this.label.enabled}nodeFactory(){return new zL}}OW.className="BubbleSeries",OW.type="bubble",iM([JM(fk),nM("design:type",String)],OW.prototype,"title",void 0),iM([JM(fk),nM("design:type",String)],OW.prototype,"labelKey",void 0),iM([JM(fk),nM("design:type",String)],OW.prototype,"xName",void 0),iM([JM(fk),nM("design:type",String)],OW.prototype,"yName",void 0),iM([JM(fk),nM("design:type",String)],OW.prototype,"sizeName",void 0),iM([JM(fk),nM("design:type",String)],OW.prototype,"labelName",void 0),iM([JM(fk),nM("design:type",String)],OW.prototype,"xKey",void 0),iM([JM(fk),nM("design:type",String)],OW.prototype,"yKey",void 0),iM([JM(fk),nM("design:type",String)],OW.prototype,"sizeKey",void 0),iM([JM(fk),nM("design:type",String)],OW.prototype,"colorKey",void 0),iM([JM(fk),nM("design:type",String)],OW.prototype,"colorName",void 0),iM([JM(_k),nM("design:type",Array)],OW.prototype,"colorDomain",void 0),iM([JM(Ek),nM("design:type",Array)],OW.prototype,"colorRange",void 0),$j.NUMBER,zj.BOTTOM,$j.NUMBER,zj.LEFT;const TW=["count","sum","mean"],DW=ek((e=>TW.includes(e)),"expecting a histogram aggregation keyword such as 'count', 'sum' or 'mean");var RW;(function(e){e[e["Bin"]=0]="Bin",e[e["Label"]=1]="Label"})(RW||(RW={}));const AW=10;class _W extends pj{constructor(e){super({moduleCtx:e,pickModes:[oF.EXACT_SHAPE_MATCH],datumSelectionGarbageCollection:!1,animationResetFns:{datum:mW,label:wF}}),this.label=new FI,this.tooltip=new KF,this.fill=void 0,this.stroke=void 0,this.fillOpacity=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.xKey=void 0,this.areaPlot=!1,this.aggregation="sum",this.binCount=void 0,this.xName=void 0,this.yKey=void 0,this.yName=void 0,this.strokeWidth=1,this.shadow=void 0,this.calculatedBins=[]}deriveBins(e){if(void 0===this.binCount){const t=LL(e[0],e[1],AW),i=FL(e[0],e[1],AW),n=t[0],o=e=>[e,e+i];return[[n-i,n],...t.map(o)]}return this.calculateNiceBins(e,this.binCount)}calculateNiceBins(e,t){const i=Math.floor(e[0]),n=e[1],o=t||1,{start:r,binSize:s}=this.calculateNiceStart(i,n,o);return this.getBins(r,n,s,o)}getBins(e,t,i,n){const o=[];for(let r=0;r<n;r++){const s=Math.round(10*(e+r*i))/10;let a=Math.round(10*(e+(r+1)*i))/10;r===n-1&&(a=Math.max(a,t)),o[r]=[s,a]}return o}calculateNiceStart(e,t,i){const n=Math.abs(t-e)/i,o=Math.floor(Math.log10(n)),r=Math.pow(10,o),s=Math.floor(e/r)*r;return{start:s,binSize:n}}processData(e){return oM(this,void 0,void 0,(function*(){const{xKey:t,yKey:i,data:n,areaPlot:o,aggregation:r}=this,s=[lF(this,t,!0),TI];if(i){let e=eF(this,"groupCount");"count"===r||("sum"===r?e=QI(this,"groupAgg"):"mean"===r&&(e=tF(this,"groupAgg"))),o&&(e=iF(this,"groupAgg",e)),s.push(cF(this,i,!0,{invalidValue:void 0}),e)}else{let e=eF(this,"groupAgg");o&&(e=iF(this,"groupAgg",e)),s.push(e)}const a=e=>{var t;const i=qV(e.domain.keys[0]);if(0===i.length)return e.domain.groups=[],()=>[];const n=null!==(t=this.bins)&&void 0!==t?t:this.deriveBins(i),o=n.length;return this.calculatedBins=[...n],e=>{const t=e.keys[0];for(let i=0;i<o;i++){const e=n[i];if(t>=e[0]&&t<e[1])return e;if(i===o-1&&t<=e[1])return e}return[]}};!this.ctx.animationManager.isSkipped()&&this.processedData&&s.push(LI(this.processedData,!1)),yield this.requestDataModel(e,null!==n&&void 0!==n?n:[],{props:s,dataVisible:this.visible,groupByFn:a}),this.animationState.transition("updateData")}))}getSeriesDomain(e){var t,i,n,o;const{processedData:r,dataModel:s}=this;if(!r||!s||!this.calculatedBins.length)return[];const a=s.getDomain(this,"groupAgg","aggregate",r),l=null===(t=this.calculatedBins)||void 0===t?void 0:t[0][0],c=null===(i=this.calculatedBins)||void 0===i?void 0:i[(null!==(o=null===(n=this.calculatedBins)||void 0===n?void 0:n.length)&&void 0!==o?o:0)-1][1];return e===iN.X?qV([l,c]):qV(a)}createNodeData(){const e=Object.create(null,{calculateScaling:{get:()=>super.calculateScaling}});var t;return oM(this,void 0,void 0,(function*(){const{axes:i,processedData:n,ctx:{callbackCache:o}}=this,r=i[iN.X],s=i[iN.Y];if(!this.visible||!r||!s||!n||"grouped"!==n.type)return[];const{scale:a}=r,{scale:l}=s,{fill:c,stroke:u,strokeWidth:d,id:p,yKey:h="",xKey:f=""}=this,g=[],{label:{formatter:v=(e=>String(e.value)),fontStyle:y,fontWeight:m,fontSize:C,fontFamily:b,color:w}}=this;return n.data.forEach((e=>{var t;const{aggValues:[[i,n]]=[[0,0]],datum:r,datum:{length:s},keys:S,keys:[E,x]}=e,O=a.convert(E),T=a.convert(x),D=i+n,R=l.convert(0),A=l.convert(D),_=T-O,P=Math.abs(A-R),M=0!==D?{text:null!==(t=o.call(v,{value:D,datum:r,seriesId:p,xKey:f,yKey:h,xName:this.xName,yName:this.yName}))&&void 0!==t?t:String(D),fontStyle:y,fontWeight:m,fontSize:C,fontFamily:b,fill:w,x:O+_/2,y:A+P/2}:void 0,k={x:O+_/2,y:A+P/2};g.push({series:this,datum:r,aggregatedValue:D,frequency:s,domain:S,yKey:h,xKey:f,x:O,y:A,xValue:O,yValue:A,width:_,height:P,midPoint:k,fill:c,stroke:u,strokeWidth:d,label:M})})),[{itemId:null!==(t=this.yKey)&&void 0!==t?t:this.id,nodeData:g,labelData:g,scales:e.calculateScaling.call(this),animationValid:!0,visible:this.visible}]}))}nodeFactory(){return new rj}updateDatumSelection(e){return oM(this,void 0,void 0,(function*(){const{nodeData:t,datumSelection:i}=e;return i.update(t,(e=>{e.tag=RW.Bin,e.crisp=!0}),(e=>e.domain.join("_")))}))}updateDatumNodes(e){return oM(this,void 0,void 0,(function*(){const{datumSelection:t,isHighlight:i}=e,{fillOpacity:n,strokeOpacity:o,shadow:r,highlightStyle:{item:{fill:s,fillOpacity:a=n,stroke:l,strokeWidth:c}}}=this;t.each(((e,t,u)=>{var d,p;const h=i&&void 0!==c?c:t.strokeWidth,f=i?a:n;e.fill=null!==(d=i?s:void 0)&&void 0!==d?d:t.fill,e.stroke=null!==(p=i?l:void 0)&&void 0!==p?p:t.stroke,e.fillOpacity=f,e.strokeOpacity=o,e.strokeWidth=h,e.lineDash=this.lineDash,e.lineDashOffset=this.lineDashOffset,e.fillShadow=r,e.zIndex=i?mF.highlightedZIndex:u,e.visible=t.height>0}))}))}updateLabelSelection(e){return oM(this,void 0,void 0,(function*(){const{labelData:t,labelSelection:i}=e;return i.update(t,(e=>{e.tag=RW.Label,e.pointerEvents=yN.None,e.textAlign="center",e.textBaseline="middle"}))}))}updateLabelNodes(e){return oM(this,void 0,void 0,(function*(){const{labelSelection:t}=e,i=this.label.enabled;t.each(((e,t)=>{const n=t.label;n&&i?(e.text=n.text,e.x=n.x,e.y=n.y,e.fontStyle=n.fontStyle,e.fontWeight=n.fontWeight,e.fontSize=n.fontSize,e.fontFamily=n.fontFamily,e.fill=n.fill,e.visible=!0):e.visible=!1}))}))}getTooltipHtml(e){const{xKey:t,yKey:i="",axes:n}=this,o=n[iN.X],r=n[iN.Y];if(!t||!o||!r)return"";const{xName:s,yName:a,fill:l,tooltip:c,aggregation:u,id:d}=this,{aggregatedValue:p,frequency:h,domain:[f,g]}=e,v=`${gI(null!==s&&void 0!==s?s:t)}: ${o.formatDatum(f)} - ${o.formatDatum(g)}`;let y=i?`<b>${gI(null!==a&&void 0!==a?a:i)} (${u})</b>: ${r.formatDatum(p)}<br>`:"";y+=`<b>Frequency</b>: ${h}`;const m={title:v,backgroundColor:l,content:y};return c.toTooltipHtml(m,{datum:{data:e.datum,aggregatedValue:e.aggregatedValue,domain:e.domain,frequency:e.frequency},xKey:t,xName:s,yKey:i,yName:a,color:l,title:v,seriesId:d})}getLegendData(e){var t;const{id:i,data:n,xKey:o,yName:r,visible:s,fill:a,stroke:l,fillOpacity:c,strokeOpacity:u,strokeWidth:d}=this;
18return n&&0!==n.length&&"category"===e?[{legendType:"category",id:i,itemId:o,seriesId:i,enabled:s,label:{text:null!==(t=null!==r&&void 0!==r?r:o)&&void 0!==t?t:"Frequency"},marker:{fill:null!==a&&void 0!==a?a:"rgba(0, 0, 0, 0)",stroke:null!==l&&void 0!==l?l:"rgba(0, 0, 0, 0)",fillOpacity:c,strokeOpacity:u,strokeWidth:d}}]:[]}animateEmptyUpdateReady({datumSelections:e,labelSelections:t}){const i=vW(gW(!0,this.axes));uL(this.id,"datums",this.ctx.animationManager,e,i),CF(this,"labels",this.ctx.animationManager,t)}animateWaitingUpdateReady(e){var t,i;const n=null===(i=null===(t=this.processedData)||void 0===t?void 0:t.reduced)||void 0===i?void 0:i.diff,o=vW(gW(!0,this.axes));uL(this.id,"datums",this.ctx.animationManager,e.datumSelections,o,((e,t)=>this.getDatumId(t)),n),CF(this,"labels",this.ctx.animationManager,e.labelSelections)}getDatumId(e){return II(e.domain.map((e=>`${e}`)))}isLabelEnabled(){return this.label.enabled}}_W.className="HistogramSeries",_W.type="histogram",iM([JM(Sk),nM("design:type",String)],_W.prototype,"fill",void 0),iM([JM(Sk),nM("design:type",String)],_W.prototype,"stroke",void 0),iM([JM(Tk(0,1)),nM("design:type",Object)],_W.prototype,"fillOpacity",void 0),iM([JM(Tk(0,1)),nM("design:type",Object)],_W.prototype,"strokeOpacity",void 0),iM([JM(Bk),nM("design:type",Array)],_W.prototype,"lineDash",void 0),iM([JM(Tk(0)),nM("design:type",Number)],_W.prototype,"lineDashOffset",void 0),iM([JM(fk),nM("design:type",String)],_W.prototype,"xKey",void 0),iM([JM(dk),nM("design:type",Boolean)],_W.prototype,"areaPlot",void 0),iM([JM(nk()),nM("design:type",Array)],_W.prototype,"bins",void 0),iM([JM(DW),nM("design:type",String)],_W.prototype,"aggregation",void 0),iM([JM(Dk(0)),nM("design:type",Number)],_W.prototype,"binCount",void 0),iM([JM(fk),nM("design:type",String)],_W.prototype,"xName",void 0),iM([JM(fk),nM("design:type",String)],_W.prototype,"yKey",void 0),iM([JM(fk),nM("design:type",String)],_W.prototype,"yName",void 0),iM([JM(Tk(0)),nM("design:type",Number)],_W.prototype,"strokeWidth",void 0),$j.NUMBER,zj.BOTTOM,$j.NUMBER,zj.LEFT;class PW extends pj{constructor(e){super({moduleCtx:e,hasMarkers:!0,pickModes:[oF.NEAREST_BY_MAIN_CATEGORY_AXIS_FIRST,oF.NEAREST_NODE,oF.EXACT_SHAPE_MATCH],markerSelectionGarbageCollection:!1,animationResetFns:{path:YH({getOpacity:()=>this.getOpacity()}),label:wF,marker:(e,t)=>Object.assign(Object.assign({},IH()),FH(e,t))}}),this.label=new FI,this.marker=new kH,this.tooltip=new KF,this.title=void 0,this.stroke="#874349",this.lineDash=[0],this.lineDashOffset=0,this.strokeWidth=2,this.strokeOpacity=1,this.xKey=void 0,this.xName=void 0,this.yKey=void 0,this.yName=void 0}processData(e){return oM(this,void 0,void 0,(function*(){const{xKey:t,yKey:i,data:n}=this;if(null==t||null==i||null==n)return;const o=!this.ctx.animationManager.isSkipped(),{isContinuousX:r,isContinuousY:s}=this.isContinuous(),a=[];r||(a.push(lF(this,t,r,{id:"xKey"})),o&&this.processedData&&a.push(LI(this.processedData))),o&&a.push(PI(this,r?["xValue"]:[])),a.push(cF(this,t,r,{id:"xValue"}),cF(this,i,s,{id:"yValue",invalidValue:void 0})),yield this.requestDataModel(e,n,{props:a}),this.animationState.transition("updateData")}))}getSeriesDomain(e){const{axes:t,dataModel:i,processedData:n}=this;if(!n||!i)return[];const o=t[iN.X],r=t[iN.Y],s=i.resolveProcessedDataDefById(this,"xValue");if(e===iN.X){const e=i.getDomain(this,"xValue","value",n);return"value"===(null===s||void 0===s?void 0:s.def.type)&&"category"===s.def.valueType?e:qV(lM(e),o)}{const e=i.getDomain(this,"yValue","value",n);return qV(e,r)}}createNodeData(){const e=Object.create(null,{calculateScaling:{get:()=>super.calculateScaling}});var t,i,n;return oM(this,void 0,void 0,(function*(){const{processedData:o,dataModel:r,axes:s}=this,a=s[iN.X],l=s[iN.Y];if(!o||!r||!a||!l)return[];const{label:c,yKey:u="",xKey:d=""}=this,p=a.scale,h=l.scale,f=(null!==(t=p.bandwidth)&&void 0!==t?t:0)/2,g=(null!==(i=h.bandwidth)&&void 0!==i?i:0)/2,v=[],y=this.marker.enabled?this.marker.size:0,m=r.resolveProcessedDataIndexById(this,"xValue").index,C=r.resolveProcessedDataIndexById(this,"yValue").index;let b,w=!0;for(let e=0;e<o.data.length;e++){const{datum:t,values:i}=null!==b&&void 0!==b?b:o.data[e],r=i[m],s=i[C];if(void 0===s)w=!0;else{const i=p.convert(r)+f;if(isNaN(i)){w=!0,b=void 0;continue}b=void 0===(null===(n=o.data[e+1])||void 0===n?void 0:n.values[C])?void 0:o.data[e+1];const a=h.convert(s)+g,l=this.getLabelText(c,{value:s,datum:t,xKey:d,yKey:u,xName:this.xName,yName:this.yName},(e=>SI(e)?e.toFixed(2):String(e)));v.push({series:this,datum:t,yKey:u,xKey:d,point:{x:i,y:a,moveTo:w,size:y},midPoint:{x:i,y:a},yValue:s,xValue:r,capDefaults:{lengthRatioMultiplier:this.marker.getDiameter(),lengthMax:1/0},label:l?{text:l,fontStyle:c.fontStyle,fontWeight:c.fontWeight,fontSize:c.fontSize,fontFamily:c.fontFamily,textAlign:"center",textBaseline:"bottom",fill:c.color}:void 0}),w=!1}}return[{itemId:u,nodeData:v,labelData:v,scales:e.calculateScaling.call(this),visible:this.visible}]}))}isPathOrSelectionDirty(){return this.marker.isDirty()}markerFactory(){const{shape:e}=this.marker,t=_B(e);return new t}updatePathNodes(e){var t,i;return oM(this,void 0,void 0,(function*(){const{paths:[n],opacity:o,visible:r,animationEnabled:s}=e,{seriesRectHeight:a,seriesRectWidth:l}=this.nodeDataDependencies;n.setProperties({fill:void 0,lineJoin:"round",pointerEvents:yN.None,opacity:o,stroke:this.stroke,strokeWidth:this.getStrokeWidth(this.strokeWidth),strokeOpacity:this.strokeOpacity,lineDash:this.lineDash,lineDashOffset:this.lineDashOffset}),s||(n.visible=r),null==n.clipPath&&(n.clipPath=new rI,n.clipScalingX=1,n.clipScalingY=1),null===(t=n.clipPath)||void 0===t||t.clear({trackChanges:!0}),null===(i=n.clipPath)||void 0===i||i.rect(-25,-25,(null!==l&&void 0!==l?l:0)+50,(null!==a&&void 0!==a?a:0)+50)}))}updateMarkerSelection(e){return oM(this,void 0,void 0,(function*(){let{nodeData:t}=e;const{markerSelection:i}=e,{shape:n,enabled:o}=this.marker;return t=n&&o?t:[],this.marker.isDirty()&&(i.clear(),i.cleanup()),i.update(t,void 0,(e=>this.getDatumId(e)))}))}updateMarkerNodes(e){return oM(this,void 0,void 0,(function*(){const{markerSelection:t,isHighlight:i}=e,{xKey:n="",yKey:o="",marker:r,stroke:s,strokeWidth:a,strokeOpacity:l}=this,c=hI(i&&this.highlightStyle.item,r.getStyle(),{stroke:s,strokeWidth:a,strokeOpacity:l}),u=this.ctx.animationManager.isSkipped();t.each(((e,t)=>{this.updateMarkerStyle(e,r,{datum:t,highlighted:i,xKey:n,yKey:o},c,{applyTranslation:u})})),i||this.marker.markClean()}))}updateLabelSelection(e){return oM(this,void 0,void 0,(function*(){let{labelData:t}=e;const{labelSelection:i}=e,{shape:n,enabled:o}=this.marker;return t=n&&o?t:[],i.update(t)}))}updateLabelNodes(e){return oM(this,void 0,void 0,(function*(){const{labelSelection:t}=e,{enabled:i,fontStyle:n,fontWeight:o,fontSize:r,fontFamily:s,color:a}=this.label;t.each(((e,t)=>{const{point:l,label:c}=t;t&&c&&i?(e.fontStyle=n,e.fontWeight=o,e.fontSize=r,e.fontFamily=s,e.textAlign=c.textAlign,e.textBaseline=c.textBaseline,e.text=c.text,e.x=l.x,e.y=l.y-10,e.fill=a,e.visible=!0):e.visible=!1}))}))}getTooltipHtml(e){var t;const{xKey:i,yKey:n,axes:o}=this,r=o[iN.X],s=o[iN.Y];if(!i||!n||!r||!s)return"";const{xName:a,yName:l,tooltip:c,marker:u,id:d}=this,{datum:p,xValue:h,yValue:f}=e,g=r.formatDatum(h),v=s.formatDatum(f),y=gI(null!==(t=this.title)&&void 0!==t?t:l),m=gI(g+": "+v),C=hI({fill:u.stroke},u.getStyle(),{strokeWidth:this.strokeWidth}),{fill:b}=this.getMarkerStyle(u,{datum:e,xKey:i,yKey:n,highlighted:!1},C);return c.toTooltipHtml({title:y,content:m,backgroundColor:b},Object.assign({datum:p,xKey:i,xName:a,yKey:n,yName:l,title:y,color:b,seriesId:d},this.getModuleTooltipParams(p)))}getLegendData(e){var t,i,n,o,r,s,a,l;const{id:c,data:u,xKey:d,yKey:p,yName:h,visible:f,title:g,marker:v,stroke:y,strokeOpacity:m}=this;return(null===u||void 0===u?void 0:u.length)&&d&&p&&"category"===e?[{legendT
18ype:"category",id:c,itemId:p,seriesId:c,enabled:f,label:{text:null!==(t=null!==g&&void 0!==g?g:h)&&void 0!==t?t:p},marker:{shape:v.shape,fill:null!==(i=v.fill)&&void 0!==i?i:"rgba(0, 0, 0, 0)",stroke:null!==(o=null!==(n=v.stroke)&&void 0!==n?n:y)&&void 0!==o?o:"rgba(0, 0, 0, 0)",fillOpacity:null!==(r=v.fillOpacity)&&void 0!==r?r:1,strokeOpacity:null!==(a=null!==(s=v.strokeOpacity)&&void 0!==s?s:m)&&void 0!==a?a:1,strokeWidth:null!==(l=v.strokeWidth)&&void 0!==l?l:0}}]:[]}updatePaths(e){return oM(this,void 0,void 0,(function*(){this.updateLinePaths([e.paths],[e.contextData])}))}updateLinePaths(e,t){t.forEach((({nodeData:t},i)=>{const[n]=e[i],{path:o}=n;o.clear({trackChanges:!0});for(const e of t)e.point.moveTo?o.moveTo(e.point.x,e.point.y):o.lineTo(e.point.x,e.point.y);n.checkPathDirty()}))}animateEmptyUpdateReady(e){const{markerSelections:t,labelSelections:i,annotationSelections:n,contextData:o,paths:r}=e,{animationManager:s}=this.ctx,{seriesRectWidth:a=0}=this.nodeDataDependencies;this.updateLinePaths(r,o),zH(this,s,r.flat()),XF(t,FH),LH(this,s,t,a),CF(this,"labels",s,i),CF(this,"annotations",s,n)}animateReadyResize(e){const{contextData:t,paths:i}=e;this.updateLinePaths(i,t),super.animateReadyResize(e)}animateWaitingUpdateReady(e){var t,i;const{animationManager:n}=this.ctx,{markerSelections:o,labelSelections:r,annotationSelections:s,contextData:a,paths:l,previousContextData:c}=e;if(super.resetAllAnimation(e),0===a.length||!c||0===c.length)return n.skipCurrentBatch(),void this.updateLinePaths(l,a);const[u]=l,[d]=a,[p]=c,h=iW(d,p,null===(i=null===(t=this.processedData)||void 0===t?void 0:t.reduced)||void 0===i?void 0:i.diff);if(void 0===h)return n.skipCurrentBatch(),void this.updateLinePaths(l,a);uL(this.id,"marker",n,o,h.marker),uL(this.id,"path_properties",n,u,h.pathProperties),PH(this.id,"path_update",n,u,h.path),CF(this,"labels",n,r),CF(this,"annotations",n,s)}getDatumId(e){return II([`${e.xValue}`])}isLabelEnabled(){return this.label.enabled}getBandScalePadding(){return{inner:1,outer:.1}}nodeFactory(){return new zL}}PW.className="LineSeries",PW.type="line",iM([JM(fk),nM("design:type",String)],PW.prototype,"title",void 0),iM([JM(Sk),nM("design:type",String)],PW.prototype,"stroke",void 0),iM([JM(Bk),nM("design:type",Array)],PW.prototype,"lineDash",void 0),iM([JM(Tk(0)),nM("design:type",Number)],PW.prototype,"lineDashOffset",void 0),iM([JM(Tk(0)),nM("design:type",Number)],PW.prototype,"strokeWidth",void 0),iM([JM(Tk(0,1)),nM("design:type",Number)],PW.prototype,"strokeOpacity",void 0),iM([JM(fk),nM("design:type",String)],PW.prototype,"xKey",void 0),iM([JM(fk),nM("design:type",String)],PW.prototype,"xName",void 0),iM([JM(fk),nM("design:type",String)],PW.prototype,"yKey",void 0),iM([JM(fk),nM("design:type",String)],PW.prototype,"yName",void 0);class MW extends pj{constructor(e){super({moduleCtx:e,pickModes:[oF.NEAREST_BY_MAIN_CATEGORY_AXIS_FIRST,oF.NEAREST_NODE,oF.EXACT_SHAPE_MATCH],pathsPerSeries:0,hasMarkers:!0,markerSelectionGarbageCollection:!1,animationResetFns:{marker:IH,label:wF}}),this.marker=new kH,this.label=new FI,this.title=void 0,this.labelKey=void 0,this.xName=void 0,this.yName=void 0,this.labelName="Label",this.xKey=void 0,this.yKey=void 0,this.colorKey=void 0,this.colorName="Color",this.colorRange=["#ffff00","#00ff00","#0000ff"],this.colorScale=new nj,this.tooltip=new KF}processData(e){var t;return oM(this,void 0,void 0,(function*(){const{xKey:i,yKey:n,labelKey:o,data:r}=this;if(null==i||null==n||null==r)return;const{isContinuousX:s,isContinuousY:a}=this.isContinuous(),{colorScale:l,colorDomain:c,colorRange:u,colorKey:d}=this,{dataModel:p,processedData:h}=yield this.requestDataModel(e,r,{props:[lF(this,i,s,{id:"xKey-raw"}),lF(this,n,a,{id:"yKey-raw"}),...o?[lF(this,o,!1,{id:"labelKey-raw"})]:[],cF(this,i,s,{id:"xValue"}),cF(this,n,a,{id:"yValue"}),...d?[cF(this,d,!0,{id:"colorValue"})]:[],...o?[cF(this,o,!1,{id:"labelValue"})]:[]],dataVisible:this.visible});if(d){const e=p.resolveProcessedDataIndexById(this,"colorValue").index;l.domain=null!==(t=null!==c&&void 0!==c?c:h.domain.values[e])&&void 0!==t?t:[],l.range=u,l.update(
18)}this.animationState.transition("updateData")}))}getSeriesDomain(e){const{dataModel:t,processedData:i}=this;if(!i||!t)return[];const n=e===iN.X?"xValue":"yValue",o=t.resolveProcessedDataDefById(this,n),r=t.getDomain(this,n,"value",i);if("value"===(null===o||void 0===o?void 0:o.def.type)&&"category"===(null===o||void 0===o?void 0:o.def.valueType))return r;const s=this.axes[e];return qV(lM(r),s)}createNodeData(){const e=Object.create(null,{calculateScaling:{get:()=>super.calculateScaling}});var t,i,n,o;return oM(this,void 0,void 0,(function*(){const{visible:r,axes:s,yKey:a="",xKey:l="",label:c,labelKey:u,dataModel:d,processedData:p}=this,h=s[iN.X],f=s[iN.Y];if(!(d&&p&&r&&h&&f))return[];const g=d.resolveProcessedDataIndexById(this,"xValue").index,v=d.resolveProcessedDataIndexById(this,"yValue").index,y=this.colorKey?d.resolveProcessedDataIndexById(this,"colorValue").index:-1,m=this.labelKey?d.resolveProcessedDataIndexById(this,"labelValue").index:-1,{colorScale:C,colorKey:b}=this,w=h.scale,S=f.scale,E=(null!==(t=w.bandwidth)&&void 0!==t?t:0)/2,x=(null!==(i=S.bandwidth)&&void 0!==i?i:0)/2,{marker:O}=this,T=[],D=c.getFont();for(const{values:e,datum:t}of null!==(n=p.data)&&void 0!==n?n:[]){const i=e[g],n=e[v],o=w.convert(i)+E,r=S.convert(n)+x,s=this.getLabelText(this.label,{value:u?e[m]:n,datum:t,xKey:l,yKey:a,labelKey:u,xName:this.xName,yName:this.yName,labelName:this.labelName}),c=EN.getTextSize(s,D),d=b?C.convert(e[y]):void 0;T.push({series:this,itemId:a,yKey:a,xKey:l,datum:t,xValue:i,yValue:n,capDefaults:{lengthRatioMultiplier:this.marker.getDiameter(),lengthMax:1/0},point:{x:o,y:r,size:O.size},midPoint:{x:o,y:r},fill:d,label:Object.assign({text:s},c)})}return[{itemId:null!==(o=this.yKey)&&void 0!==o?o:this.id,nodeData:T,labelData:T,scales:e.calculateScaling.call(this),visible:this.visible}]}))}isPathOrSelectionDirty(){return this.marker.isDirty()}getLabelData(){var e;return null===(e=this.contextNodeData)||void 0===e?void 0:e.reduce(((e,t)=>e.concat(t.labelData)),[])}markerFactory(){const{shape:e}=this.marker,t=_B(e);return new t}updateMarkerSelection(e){return oM(this,void 0,void 0,(function*(){const{nodeData:t,markerSelection:i}=e,{marker:{enabled:n}}=this;this.marker.isDirty()&&(i.clear(),i.cleanup());const o=n?t:[];return i.update(o)}))}updateMarkerNodes(e){return oM(this,void 0,void 0,(function*(){const{xKey:t="",yKey:i="",labelKey:n,marker:o}=this,{markerSelection:r,isHighlight:s}=e,a=hI(s&&this.highlightStyle.item,o.getStyle());r.each(((e,r)=>{this.updateMarkerStyle(e,o,{datum:r,highlighted:s,xKey:t,yKey:i,labelKey:n},a)})),s||this.marker.markClean()}))}updateLabelSelection(e){var t,i;return oM(this,void 0,void 0,(function*(){const{labelSelection:n}=e,{label:{enabled:o}}=this,r=o&&null!==(i=null===(t=this.chart)||void 0===t?void 0:t.placeLabels().get(this))&&void 0!==i?i:[],s=r.map((e=>Object.assign(Object.assign({},e.datum),{point:{x:e.x,y:e.y,size:e.datum.point.size}})));return n.update(s)}))}updateLabelNodes(e){return oM(this,void 0,void 0,(function*(){const{labelSelection:t}=e,{label:i}=this;t.each(((e,t)=>{var n,o,r,s;e.text=t.label.text,e.fill=i.color,e.x=null!==(o=null===(n=t.point)||void 0===n?void 0:n.x)&&void 0!==o?o:0,e.y=null!==(s=null===(r=t.point)||void 0===r?void 0:r.y)&&void 0!==s?s:0,e.fontStyle=i.fontStyle,e.fontWeight=i.fontWeight,e.fontSize=i.fontSize,e.fontFamily=i.fontFamily,e.textAlign="left",e.textBaseline="top"}))}))}getTooltipHtml(e){const{xKey:t,yKey:i,axes:n}=this,o=n[iN.X],r=n[iN.Y];if(!t||!i||!o||!r)return"";const{marker:s,tooltip:a,xName:l,yName:c,labelKey:u,labelName:d,id:p,title:h=c}=this,f=hI({fill:e.fill,strokeWidth:this.getStrokeWidth(s.strokeWidth)},s.getStyle()),{fill:g="gray"}=this.getMarkerStyle(s,{datum:e,highlighted:!1,xKey:t,yKey:i,labelKey:u},f),{datum:v,xValue:y,yValue:m,label:C}=e,b=gI(o.formatDatum(y)),w=gI(r.formatDatum(m));let S=`<b>${gI(null!==l&&void 0!==l?l:t)}</b>: ${b}<br><b>${gI(null!==c&&void 0!==c?c:i)}</b>: ${w}`;return u&&(S=`<b>${gI(null!==d&&void 0!==d?d:u)}</b>: ${gI(C.text)}<br>`+S),a.toTooltipHtml({title:h,content:S,backgroundColor:g},Object.assign({datum:v,xKey:t,xName:l,yKey:i,yName:c,labelKey:u,labelName:d,title:h,color:g,seriesId:p},this.getModuleTooltipParams(v)))}getLegendData(e){var t,i,n,o,r;const{id:s,data:a,xKey:l,yKey:c,yName:u,title:d,visible:p,marker:h}=this,{fill:f,stroke:g,fillOpacity:v,strokeOpacity:y,strokeWidth:m}=h;return(null===a||void 0===a?void 0:a.length)&&l&&c&&"category"===e?[{legendT
18ype:"category",id:s,itemId:c,seriesId:s,enabled:p,label:{text:null!==(t=null!==d&&void 0!==d?d:u)&&void 0!==t?t:c},marker:{shape:h.shape,fill:null!==(n=null!==(i=h.fill)&&void 0!==i?i:f)&&void 0!==n?n:"rgba(0, 0, 0, 0)",stroke:null!==(r=null!==(o=h.stroke)&&void 0!==o?o:g)&&void 0!==r?r:"rgba(0, 0, 0, 0)",fillOpacity:null!==v&&void 0!==v?v:1,strokeOpacity:null!==y&&void 0!==y?y:1,strokeWidth:null!==m&&void 0!==m?m:0}}]:[]}animateEmptyUpdateReady(e){const{markerSelections:t,labelSelections:i,annotationSelections:n}=e;NH(this,this.ctx.animationManager,t),CF(this,"labels",this.ctx.animationManager,i),CF(this,"annotations",this.ctx.animationManager,n)}isLabelEnabled(){return this.label.enabled}nodeFactory(){return new zL}}MW.className="ScatterSeries",MW.type="scatter",iM([JM(fk),nM("design:type",String)],MW.prototype,"title",void 0),iM([JM(fk),nM("design:type",String)],MW.prototype,"labelKey",void 0),iM([JM(fk),nM("design:type",String)],MW.prototype,"xName",void 0),iM([JM(fk),nM("design:type",String)],MW.prototype,"yName",void 0),iM([JM(fk),nM("design:type",String)],MW.prototype,"labelName",void 0),iM([JM(fk),nM("design:type",String)],MW.prototype,"xKey",void 0),iM([JM(fk),nM("design:type",String)],MW.prototype,"yKey",void 0),iM([JM(fk),nM("design:type",String)],MW.prototype,"colorKey",void 0),iM([JM(fk),nM("design:type",String)],MW.prototype,"colorName",void 0),iM([JM(_k),nM("design:type",Array)],MW.prototype,"colorDomain",void 0),iM([JM(Ek),nM("design:type",Array)],MW.prototype,"colorRange",void 0),$j.NUMBER,zj.BOTTOM,$j.NUMBER,zj.LEFT;class kW{constructor(e,t,i,n,o,r,s,a,l,c,u){this.series=e,this.index=t,this.datum=i,this.size=n,this.colorValue=o,this.fill=r,this.stroke=s,this.sumSize=a,this.depth=l,this.parent=c,this.children=u,this.midPoint={x:0,y:0}}contains(e){let t=e;while(null!=t&&t.index>=this.index){if(t===this)return!0;t=t.parent}return!1}walk(e,t=kW.Walk.PreOrder){t===kW.Walk.PreOrder&&e(this),this.children.forEach((i=>{i.walk(e,t)})),t===kW.Walk.PostOrder&&e(this)}*[Symbol.iterator](){yield this;for(const e of this.children)yield*e}}kW.Walk={PreOrder:0,PostOrder:1};class NW extends mF{constructor(e){super({moduleCtx:e,pickModes:[oF.EXACT_SHAPE_MATCH],contentGroupVirtual:!1}),this.childrenKey="children",this.sizeKey=void 0,this.colorKey=void 0,this.colorName=void 0,this.fills=Object.values(KI),this.strokes=Object.values(YI),this.colorRange=void 0,this.rootNode=new kW(this,0,void 0,0,void 0,void 0,void 0,0,void 0,void 0,[]),this.colorDomain=[0,0],this.maxDepth=0,this.animationState=new JF("empty",{empty:{update:{target:"ready",action:e=>this.animateEmptyUpdateReady(e)}},ready:{updateData:"waiting",clear:"clearing",highlight:e=>this.animateReadyHighlight(e),resize:e=>this.animateReadyResize(e)},waiting:{update:{target:"ready",action:e=>this.animateWaitingUpdateReady(e)}},clearing:{update:{target:"empty",action:e=>this.animateClearingUpdateEmpty(e)}}},(()=>this.checkProcessedDataAnimatable()))}hasData(){return Array.isArray(this.data)&&this.data.length>0}processData(){var e,t;return oM(this,void 0,void 0,(function*(){const{childrenKey:i,sizeKey:n,colorKey:o,fills:r,strokes:s,colorRange:a}=this;let l=0;const c=()=>(l+=1,l);let u=0,d=1/0,p=-1/0;const h=new Array((null!==(t=null===(e=this.data)||void 0===e?void 0:e.length)&&void 0!==t?t:0)+1).fill(void 0),f=(e,t)=>{const r=c(),s=null!=t.depth?t.depth+1:0,a=null!=i?e[i]:void 0,l=null==a||0===a.length;let f=null!=n?e[n]:void 0;f=Number.isFinite(f)?Math.max(f,0):l?1:0;const v=f;u=Math.max(u,s);const y=null!=o?e[o]:void 0;return"number"===typeof y&&(h[r]=y,d=Math.min(d,y),p=Math.max(p,y)),g(new kW(this,r,e,f,y,void 0,void 0,v,s,t,[]),a)},g=(e,t)=>(null===t||void 0===t||t.forEach((t=>{const i=f(t,e);e.children.push(i),e.sumSize+=i.sumSize})),e),v=g(new kW(this,0,void 0,0,void 0,void 0,void 0,0,void 0,void 0,[]),this.data),y=[d,p];let m;null!=a&&Number.isFinite(d)&&Number.isFinite(p)&&(m=new nj,m.domain=y,m.range=a,m.update()),v.children.forEach(((e,t)=>{e.walk((e=>{let i;const n=h[e.index];null!=n&&(i=null===m||void 0===m?void 0:m.convert(n)),null!==i&&void 0!==i||(i=null===r||void 0===r?void 0:r[t%r.length]),e.fill=i,e.stroke=null==m?null===s||void 0===s?void 0:s[t%s.length]:"rgba(0, 0, 0, 0.2)"}))})),this.rootNode=v,this.maxDepth=u,this.colorDomain=y}))}update({seriesRect:e}){return oM(this,void 0,void 0,(function*(){yield this.updateSelections(),yield this.updateNodes();const t=this.getAnimationData(),i=this.checkResize(e);i&&this.animationState.transition("resize",t),this.animationState.transition("update",t)}))}resetAllAnimation(e){var t;const i=null===(t=this.animationResetFns)||void 0===t?void 0:t.datum;this.ctx.animationManager.stopByAnimationGroupId(this.id),null!=i&&XF(e.datumSelections,i)}animateEmptyUpdateReady(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(e)}animateWaitingUpdateReady(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(e)}animateReadyHighlight(e){var t;const i=null===(t=this.animationResetFns)||void 0===t?void 0:t.datum;null!=i&&XF([e],i)}animateReadyResize(e){this.resetAllAnimation(e)}animateClearingUpdateEmpty(e){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(e)}animationTransitionClear(){this.animationState.transition("clear",this.getAnimationData())}getAnimationData(){const e={datumSelections:[this.groupSelection]};return e}isProcessedDataAnimatable(){return!0}checkProcessedDataAnimatable(){this.isProcessedDataAnimatable()||this.ctx.animationManager.skipCurrentBatch()}getLabelData(){return[]}getSeriesDomain(){return[NaN,NaN]}getLegendData(e){return"gradient"===e&&null!=this.colorKey&&null!=this.colorRange?[{legendT
18ype:"gradient",enabled:this.visible,seriesId:this.id,colorName:this.colorName,colorDomain:this.colorDomain,colorRange:this.colorRange}]:[]}getDatumIdFromData(e){return`${e.index}`}getDatumId(e){return this.getDatumIdFromData(e)}}iM([JM(fk),nM("design:type",String)],NW.prototype,"childrenKey",void 0),iM([JM(fk),nM("design:type",String)],NW.prototype,"sizeKey",void 0),iM([JM(fk),nM("design:type",String)],NW.prototype,"colorKey",void 0),iM([JM(fk),nM("design:type",String)],NW.prototype,"colorName",void 0),iM([JM(xk),nM("design:type",Array)],NW.prototype,"fills",void 0),iM([JM(xk),nM("design:type",Array)],NW.prototype,"strokes",void 0),iM([JM(xk),nM("design:type",Array)],NW.prototype,"colorRange",void 0);class LW extends pV{constructor(){super(...arguments),this.shape="polygon",this.innerRadiusRatio=0,this.defaultTickMinSpacing=20}computeLabelsBBox(e,t){return null}}iM([JM(Tk(0,1)),nM("design:type",Number)],LW.prototype,"innerRadiusRatio",void 0);const IW={},FW={};function GW(e){return aM()?FW[e]:IW[e]}class VW extends JB{constructor(e,t){super(e,t),this._data={}}performLayout(){const e=Object.create(null,{performLayout:{get:()=>super.performLayout}});return oM(this,void 0,void 0,(function*(){const t=yield e.performLayout.call(this),{seriesArea:{padding:i},seriesRoot:n}=this,o=t.clone();return t.shrink(i.left,"left"),t.shrink(i.top,"top"),t.shrink(i.right,"right"),t.shrink(i.bottom,"bottom"),this.seriesRect=t,this.animationRect=t,this.hoverRect=t,n.translationX=Math.floor(t.x),n.translationY=Math.floor(t.y),yield Promise.all(this.series.map((e=>oM(this,void 0,void 0,(function*(){yield e.update({seriesRect:t})}))))),n.visible=this.series[0].visible,n.setClipRectInGroupCoordinateSpace(new gN(t.x,t.y,t.width,t.height)),this.layoutService.dispatchLayoutComplete({type:"layout-complete",chart:{width:this.scene.width,height:this.scene.height},clipSeries:!1,series:{rect:o,paddedRect:t,visible:!0},axes:[]}),t}))}}VW.className="HierarchyChart",VW.type="hierarchy";const BW="white",jW={fills:Array.from(Object.values(KI)),strokes:Array.from(Object.values(YI))},HW={get cartesian(){return{seriesTypes:Qj.cartesianTypes,commonOptions:["zoom","navigator"]}},get polar(){return{seriesTypes:Qj.polarTypes,commonOptions:[]}},get hierarchy(){return{seriesTypes:Qj.hierarchyTypes,commonOptions:[]}}},WW=Object.values(HW).reduce(((e,{commonOptions:t})=>[...e,...t]),[]);class UW{getPalette(){return jW}static getAxisDefaults(){return{top:{},right:{},bottom:{},left:{},title:{enabled:!1,text:"Axis Title",spacing:25,fontStyle:void 0,fontWeight:jj,fontSize:Bj.MEDIUM,fontFamily:hH,color:fH},label:{fontStyle:void 0,fontWeight:void 0,fontSize:Bj.SMALL,fontFamily:hH,padding:5,rotation:void 0,color:fH,formatter:void 0,avoidCollisions:!0},line:{enabled:!0,width:1,color:CH},tick:{enabled:!1,width:1,color:CH},gridLine:{enabled:!0,style:[{stroke:mH,lineDash:[]}]},crossLines:{enabled:!1,fill:bH,stroke:bH,fillOpacity:.1,strokeWidth:1,label:{enabled:!1,fontStyle:void 0,fontWeight:void 0,fontSize:Bj.SMALL,fontFamily:hH,padding:5,color:fH}}}}static getSeriesDefaults(){return{tooltip:{enabled:!0,renderer:void 0},visible:!0,showInLegend:!0,highlightStyle:{item:{fill:"rgba(255,255,255, 0.33)",stroke:"rgba(0, 0, 0, 0.4)",strokeWidth:2},series:{dimOpacity:1},text:{color:"black"}},nodeClickRange:"exact"}}static getCartesianSeriesMarkerDefaults(){return{enabled:!0,shape:"circle",size:7,strokeWidth:1,formatter:void 0}}static getLegendItemMarkerDefaults(){return{shape:void 0,size:15,padding:8}}static getCaptionWrappingDefaults(){return"hyphenate"}static getChartDefaults(){return{background:{visible:!0,fill:wH},padding:{top:20,right:20,bottom:20,left:20},title:{enabled:!1,text:"Title",fontStyle:void 0,fontWeight:jj,fontSize:Bj.LARGE,fontFamily:hH,color:fH,wrapping:UW.getCaptionWrappingDefaults()},subtitle:{enabled:!1,text:"Subtitle",spacing:20,fontStyle:void 0,fontWeight:void 0,fontSize:Bj.MEDIUM,fontFamily:hH,color:yH,wrapping:UW.getCaptionWrappingDefaults()},footnote:{enabled:!1,text:"Footnote",spacing:20,fontStyle:void 0,fontWeight:void 0,fontSize:Bj.MEDIUM,fontFamily:hH,color:"rgb(140, 140, 140)",wrapping:UW.getCaptionWrappingDefaults()},legend:{position:Hj,spacing:30,listeners:{},item:{paddingX:16,paddingY:8,marker:UW.getLegendItemMarkerDefaults(),label:{color:fH,fontStyle:void 0,fontWeight:void 0,fontSize:Bj.SMALL,fontFamily:hH,formatter:void 0}},reverseOrder:!1,pagination:{marker:{size:12},activeStyle:{fill:fH},inactiveStyle:{fill:yH},highlightStyle:{fill:fH},label:{color:fH}}},tooltip:{enabled:!0,range:"nearest",delay:0},listeners:{}}}constructor(e){e=cI({},null!==e&&void 0!==e?e:{});const{overrides:t=null,palette:i=null}=e,n=this.createChartConfigPerChartType(this.getDefaults());if(t){const{common:e}=t,i=(e,t)=>{if(t)for(const i of e){const e=i;n[e]=cI(n[e],t)}};for(const[,{seriesTypes:t,commonOptions:n}]of Object.entries(HW)){const o=Object.assign({},e);for(const e of WW)n.includes(e)||delete o[e];i(t,o)}
18Qj.seriesTypes.forEach((e=>{const i=e;t[i]&&(n[i]=cI(n[i],t[i]))}))}this.palette=null!==i&&void 0!==i?i:this.getPalette(),this.config=Object.freeze(this.templateTheme(n))}createChartConfigPerChartType(e){return Object.entries(HW).forEach((([t,{seriesTypes:i}])=>{const n=eH(t);i.forEach((t=>{const i=t;e[i]||(e[i]={},cI(e[i],n))}))})),e}getDefaults(){let e={};const t=e=>Object.assign(Object.assign(Object.assign({},Pj()),UW.getChartDefaults()),eH(e)),i=(e,i)=>{var n,o,r,s;const a=t(e),l={};for(const t of i){null!==(n=l[t])&&void 0!==n||(l[t]=cI({},a));const i=null!==(o=(s=l[t]).axes)&&void 0!==o?o:s.axes={},c=GW(t);c&&(l[t].series=cI(l[t].series,c));for(const t of Dj.axesTypes){const n=Aj(t);"cartesian"===e&&(i[t]=cI(i[t],null!==(r=UW.cartesianAxisDefault[t])&&void 0!==r?r:{})),n&&(i[t]=cI(i[t],n))}}return l};return e=cI(e,i("cartesian",Qj.cartesianTypes)),e=cI(e,i("polar",Qj.polarTypes)),e=cI(e,i("hierarchy",Qj.hierarchyTypes)),e}templateTheme(e){const t=PM([e]),{extensions:i,properties:n}=this.getTemplateParameters();return kM(t,((e,t)=>{if(t["__extends__"]){const e=t["__extends__"],n=i.get(e);if(null==n)throw new Error("AG Charts - no template variable provided for: "+e);Object.keys(n).forEach((e=>{e in t||(t[e]=n[e])})),delete t["__extends__"]}if(t["__overrides__"]){const e=t["__overrides__"],n=i.get(e);if(null==n)throw new Error("AG Charts - no template variable provided for: "+e);Object.assign(t,n),delete t["__overrides__"]}if(Array.isArray(t))for(let i=0;i<t.length;i++){const e=t[i];n.has(e)&&(t[i]=n.get(e))}else for(const[i,o]of Object.entries(t))n.has(o)&&(t[i]=n.get(o))})),t}static getWaterfallSeriesDefaultPositiveColors(){return{fill:KI.BLUE,stroke:YI.BLUE}}static getWaterfallSeriesDefaultNegativeColors(){return{fill:KI.ORANGE,stroke:YI.ORANGE}}static getWaterfallSeriesDefaultTotalColors(){return{fill:KI.GRAY,stroke:YI.GRAY}}getTemplateParameters(){const e=new Map;e.set(tH,UW.getChartDefaults()),e.set(rH,UW.getAxisDefaults()),e.set(iH,UW.getChartDefaults().legend),e.set(nH,UW.getChartDefaults().legend.item),e.set(oH,UW.getLegendItemMarkerDefaults()),e.set(sH,UW.getAxisDefaults().label),e.set(aH,UW.getAxisDefaults().line),e.set(lH,UW.getAxisDefaults().tick),e.set(cH,UW.getAxisDefaults().gridLine),e.set(uH,UW.getSeriesDefaults()),e.set(pH,{}),e.set(dH,UW.getCartesianSeriesMarkerDefaults());const t=new Map;return t.set(hH,"Verdana, sans-serif"),t.set(fH,"rgb(70, 70, 70)"),t.set(gH,"white"),t.set(yH,"rgb(140, 140, 140)"),t.set(mH,"rgb(224,234,241)"),t.set(CH,"rgb(195, 195, 195)"),t.set(bH,"rgb(70, 70, 70)"),t.set(vH,BW),t.set(wH,BW),t.set(SH,"rgba(0, 0, 0, 0.5)"),t.set(RH,[KI.ORANGE,KI.YELLOW,KI.GREEN]),t.set(AH,["#ffffff","#e0e5ea","#c1ccd5","#a3b4c1","#859cad"]),t.set(_H,["#ffffff","#c5cbd1","#a4b1bd","#8498a9","#648096"]),t.set(DH,BW),t.set(EH,UW.getWaterfallSeriesDefaultPositiveColors()),t.set(xH,UW.getWaterfallSeriesDefaultNegativeColors()),t.set(OH,UW.getWaterfallSeriesDefaultTotalColors()),t.set(TH,UW.getWaterfallSeriesDefaultTotalColors().stroke),{extensions:e,properties:t}}}UW.cartesianAxisDefault={number:Object.assign(Object.assign({},UW.getAxisDefaults()),{line:Object.assign(Object.assign({},UW.getAxisDefaults().line),{enabled:!1})}),log:Object.assign(Object.assign({},UW.getAxisDefaults()),{base:10,line:Object.assign(Object.assign({},UW.getAxisDefaults().line),{enabled:!1})}),category:Object.assign(Object.assign({},UW.getAxisDefaults()),{groupPaddingInner:.1,label:Object.assign(Object.assign({},UW.getAxisDefaults().label),{autoRotate:!0}),gridLine:Object.assign(Object.assign({},UW.getAxisDefaults().gridLine),{enabled:!1})}),"grouped-category":Object.assign({},UW.getAxisDefaults()),time:Object.assign(Object.assign({},UW.getAxisDefaults()),{gridLine:Object.assign(Object.assign({},UW.getAxisDefaults().gridLine),{enabled:!1})})};const zW="#182732",KW={BLUE:"#5090dc",ORANGE:"#ffa03a",GREEN:"#459d55",CYAN:"#34bfe1",YELLOW:"#e1cc00",VIOLET:"#9669cb",GRAY:"#b5b5b5",MAGENTA:"#bd5aa7",BROWN:"#8a6224",RED:"#ef5452"},YW={BLUE:"#74a8e6",ORANGE:"#ffbe70",GREEN:"#6cb176",CYAN:"#75d4ef",YELLOW:"#f6e559",VIOLET:"#aa86d8",GRAY:"#a1a1a1",MAGENTA:"#ce7ab9",BROWN:"#997b52",RED:"#ff7872"},qW={fills:Array.from(Object.values(KW)),strokes:Array.from(Object.values(YW))};class XW extends UW{static getWaterfallSeriesDefaultPositiveColors(){return{fill:KW.BLUE,stroke:YW.BLUE}}static getWaterfallSeriesDefaultNegativeColors(){return{fill:KW.ORANGE,stroke:YW.ORANGE}}static getWaterfallSeriesDefaultTotalColors(){return{fill:KW.GRAY,
18stroke:YW.GRAY}}getTemplateParameters(){const e=super.getTemplateParameters();return e.properties.set(EH,XW.getWaterfallSeriesDefaultPositiveColors()),e.properties.set(xH,XW.getWaterfallSeriesDefaultNegativeColors()),e.properties.set(OH,XW.getWaterfallSeriesDefaultTotalColors()),e.properties.set(TH,XW.getWaterfallSeriesDefaultTotalColors().stroke),e.properties.set(DH,zW),e.properties.set(fH,"white"),e.properties.set(yH,"#7D91A0"),e.properties.set(mH,"#545A6E"),e.properties.set(bH,"white"),e.properties.set(RH,[KW.ORANGE,KW.YELLOW,KW.GREEN]),e.properties.set(AH,["#192834","#253746","#324859","#3f596c","#4d6a80"]),e.properties.set(_H,["#192834","#3b5164","#496275","#577287","#668399"]),e.properties.set(wH,zW),e.properties.set(vH,zW),e}getPalette(){return qW}constructor(e){super(e)}}const $W={BLUE:"#2196F3",ORANGE:"#FF9800",GREEN:"#4CAF50",CYAN:"#00BCD4",YELLOW:"#FFEB3B",VIOLET:"#7E57C2",GRAY:"#9E9E9E",MAGENTA:"#F06292",BROWN:"#795548",RED:"#F44336"},ZW={BLUE:"#90CAF9",ORANGE:"#FFCC80",GREEN:"#A5D6A7",CYAN:"#80DEEA",YELLOW:"#FFF9C4",VIOLET:"#B39DDB",GRAY:"#E0E0E0",MAGENTA:"#F48FB1",BROWN:"#A1887F",RED:"#EF9A9A"},JW={fills:Array.from(Object.values($W)),strokes:Array.from(Object.values(ZW))};class QW extends XW{static getWaterfallSeriesDefaultPositiveColors(){return{fill:$W.BLUE,stroke:ZW.BLUE}}static getWaterfallSeriesDefaultNegativeColors(){return{fill:$W.RED,stroke:ZW.RED}}static getWaterfallSeriesDefaultTotalColors(){return{fill:$W.GRAY,stroke:ZW.GRAY}}getTemplateParameters(){const e=super.getTemplateParameters();return e.properties.set(EH,QW.getWaterfallSeriesDefaultPositiveColors()),e.properties.set(xH,QW.getWaterfallSeriesDefaultNegativeColors()),e.properties.set(OH,QW.getWaterfallSeriesDefaultTotalColors()),e.properties.set(RH,[$W.ORANGE,$W.YELLOW,$W.GREEN]),e.properties.set(TH,QW.getWaterfallSeriesDefaultTotalColors().stroke),e}getPalette(){return JW}}const eU={BLUE:"#2196F3",ORANGE:"#FF9800",GREEN:"#4CAF50",CYAN:"#00BCD4",YELLOW:"#FFEB3B",VIOLET:"#7E57C2",GRAY:"#9E9E9E",MAGENTA:"#F06292",BROWN:"#795548",RED:"#F44336"},tU={BLUE:"#1565C0",ORANGE:"#E65100",GREEN:"#2E7D32",CYAN:"#00838F",YELLOW:"#F9A825",VIOLET:"#4527A0",GRAY:"#616161",MAGENTA:"#C2185B",BROWN:"#4E342E",RED:"#B71C1C"},iU={fills:Array.from(Object.values(eU)),strokes:Array.from(Object.values(tU))};class nU extends UW{static getWaterfallSeriesDefaultPositiveColors(){return{fill:eU.BLUE,stroke:tU.BLUE}}static getWaterfallSeriesDefaultNegativeColors(){return{fill:eU.RED,stroke:tU.RED}}static getWaterfallSeriesDefaultTotalColors(){return{fill:eU.GRAY,stroke:tU.GRAY}}getTemplateParameters(){const e=super.getTemplateParameters();return e.properties.set(EH,nU.getWaterfallSeriesDefaultPositiveColors()),e.properties.set(xH,nU.getWaterfallSeriesDefaultNegativeColors()),e.properties.set(OH,nU.getWaterfallSeriesDefaultTotalColors()),e.properties.set(RH,[eU.ORANGE,eU.YELLOW,eU.GREEN]),e.properties.set(TH,nU.getWaterfallSeriesDefaultTotalColors().stroke),e}getPalette(){return iU}}const oU={BLUE:"#436ff4",PURPLE:"#9a7bff",MAGENTA:"#d165d2",PINK:"#f0598b",RED:"#f47348",ORANGE:"#f2a602",YELLOW:"#e9e201",GREEN:"#21b448",CYAN:"#00b9a2",MODERATE_BLUE:"#00aee4"},rU={BLUE:"#6698ff",PURPLE:"#c0a3ff",MAGENTA:"#fc8dfc",PINK:"#ff82b1",RED:"#ff9b70",ORANGE:"#ffcf4e",YELLOW:"#ffff58",GREEN:"#58dd70",CYAN:"#51e2c9",MODERATE_BLUE:"#4fd7ff"},sU="#bbbbbb",aU="#eeeeee",lU={fills:Array.from(Object.values(oU)),strokes:Array.from(Object.values(rU))};class cU extends XW{static getWaterfallSeriesDefaultPositiveColors(){return{fill:oU.BLUE,stroke:rU.BLUE}}static getWaterfallSeriesDefaultNegativeColors(){return{fill:oU.RED,stroke:rU.RED}}static getWaterfallSeriesDefaultTotalColors(){return{fill:sU,stroke:aU}}getTemplateParameters(){const e=super.getTemplateParameters();return e.properties.set(EH,cU.getWaterfallSeriesDefaultPositiveColors()),e.properties.set(xH,cU.getWaterfallSeriesDefaultNegativeColors()),e.properties.set(OH,cU.getWaterfallSeriesDefaultTotalColors()),e.properties.set(RH,[oU.BLUE,oU.RED]),e.properties.set(TH,cU.getWaterfallSeriesDefaultTotalColors().stroke),e}getPalette(){return lU}}const uU={BLUE:"#436ff4",PURPLE:"#9a7bff",MAGENTA:"#d165d2",PINK:"#f0598b",RED:"#f47348",ORANGE:"#f2a602",YELLOW:"#e9e201",GREEN:"#21b448",CYAN:"#00b9a2",MODERATE_BLUE:"#00aee4"},dU={BLUE:"#2346c9",PURPLE:"#7653d4",MAGENTA:"#a73da9",PINK:"#c32d66",RED:"#c84b1c",ORANGE:"#c87f00",YELLOW:"#c1b900",GREEN:"#008c1c",CYAN:"#00927c",MODERATE_BLUE:"#0087bb"},pU="#bbbbbb",hU="#888888",fU={fills:Array.from(Object.values(uU)),strokes:Array.from(Object.values(dU))};class gU extends UW{static getWaterfallSeriesDefaultPositiveColors(){return{fill:uU.BLUE,stroke:dU.BLUE}}static getWaterfallSeriesDefaultNegativeColors(){return{fill:uU.RED,stroke:dU.RED}}static getWaterfallSeriesDefaultTotalColors(){return{fill:pU,stroke:hU}}getTemplateParameters(){const e=super.getTemplateParameters();return e.properties.set(EH,gU.getWaterfallSeriesDefaultPositiveColors()),e.properties.set(
18xH,gU.getWaterfallSeriesDefaultNegativeColors()),e.properties.set(OH,gU.getWaterfallSeriesDefaultTotalColors()),e.properties.set(RH,[uU.BLUE,uU.RED]),e.properties.set(TH,gU.getWaterfallSeriesDefaultTotalColors().stroke),e}getPalette(){return fU}}const vU={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"},yU={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"},mU={fills:Array.from(Object.values(vU)),strokes:Array.from(Object.values(yU))};class CU extends XW{static getWaterfallSeriesDefaultPositiveColors(){return{fill:vU.BLUE,stroke:yU.BLUE}}static getWaterfallSeriesDefaultNegativeColors(){return{fill:vU.ORANGE,stroke:yU.ORANGE}}static getWaterfallSeriesDefaultTotalColors(){return{fill:vU.GRAY,stroke:yU.GRAY}}getTemplateParameters(){const e=super.getTemplateParameters();return e.properties.set(EH,CU.getWaterfallSeriesDefaultPositiveColors()),e.properties.set(xH,CU.getWaterfallSeriesDefaultNegativeColors()),e.properties.set(OH,CU.getWaterfallSeriesDefaultTotalColors()),e.properties.set(RH,[vU.ORANGE,vU.YELLOW,vU.GREEN]),e.properties.set(TH,CU.getWaterfallSeriesDefaultTotalColors().stroke),e}getPalette(){return mU}}const bU={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"},wU={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"},SU={fills:Array.from(Object.values(bU)),strokes:Array.from(Object.values(wU))};class EU extends UW{static getWaterfallSeriesDefaultPositiveColors(){return{fill:bU.BLUE,stroke:wU.BLUE}}static getWaterfallSeriesDefaultNegativeColors(){return{fill:bU.ORANGE,stroke:wU.ORANGE}}static getWaterfallSeriesDefaultTotalColors(){return{fill:bU.GRAY,stroke:wU.GRAY}}getTemplateParameters(){const e=super.getTemplateParameters();return e.properties.set(EH,EU.getWaterfallSeriesDefaultPositiveColors()),e.properties.set(xH,EU.getWaterfallSeriesDefaultNegativeColors()),e.properties.set(OH,EU.getWaterfallSeriesDefaultTotalColors()),e.properties.set(RH,[bU.ORANGE,bU.YELLOW,bU.GREEN]),e.properties.set(TH,EU.getWaterfallSeriesDefaultTotalColors().stroke),e}getPalette(){return SU}}const xU={BLUE:"#0083ff",ORANGE:"#ff6600",GREEN:"#00af00",CYAN:"#00ccff",YELLOW:"#f7c700",VIOLET:"#ac26ff",GRAY:"#a7a7b7",MAGENTA:"#e800c5",BROWN:"#b54300",RED:"#ff0000"},OU={BLUE:"#67b7ff",ORANGE:"#ffc24d",GREEN:"#5cc86f",CYAN:"#54ebff",VIOLET:"#c18aff",YELLOW:"#fff653",GRAY:"#aeaeae",MAGENTA:"#f078d4",BROWN:"#ba8438",RED:"#ff726e"},TU={fills:Array.from(Object.values(xU)),strokes:Array.from(Object.values(OU))};class DU extends XW{static getWaterfallSeriesDefaultPositiveColors(){return{fill:xU.BLUE,stroke:OU.BLUE}}static getWaterfallSeriesDefaultNegativeColors(){return{fill:xU.ORANGE,stroke:OU.ORANGE}}static getWaterfallSeriesDefaultTotalColors(){return{fill:xU.GRAY,stroke:OU.GRAY}}getTemplateParameters(){const e=super.getTemplateParameters();return e.properties.set(EH,DU.getWaterfallSeriesDefaultPositiveColors()),e.properties.set(xH,DU.getWaterfallSeriesDefaultNegativeColors()),e.properties.set(OH,DU.getWaterfallSeriesDefaultTotalColors()),e.properties.set(RH,[xU.ORANGE,xU.YELLOW,xU.GREEN]),e.properties.set(TH,DU.getWaterfallSeriesDefaultTotalColors().stroke),e}getPalette(){return TU}}const RU={BLUE:"#0083ff",ORANGE:"#ff6600",GREEN:"#00af00",CYAN:"#00ccff",YELLOW:"#f7c700",VIOLET:"#ac26ff",GRAY:"#a7a7b7",MAGENTA:"#e800c5",BROWN:"#b54300",RED:"#ff0000"},AU={BLUE:"#0f68c0",ORANGE:"#d47100",GREEN:"#007922",CYAN:"#009ac2",VIOLET:"#bca400",YELLOW:"#753cac",GRAY:"#646464",MAGENTA:"#9b2685",BROWN:"#6c3b00",RED:"#cb0021"},_U={fills:Array.from(Object.values(RU)),strokes:Array.from(Object.values(AU))};class PU extends UW{static getWaterfallSeriesDefaultPositiveColors(){return{fill:RU.BLUE,stroke:AU.BLUE}}static getWaterfallSeriesDefaultNegativeColors(){return{fill:RU.ORANGE,stroke:AU.ORANGE}}static getWaterfallSeriesDefaultTotalColors(){return{fill:RU.GRAY,stroke:AU.GRAY}}getTemplateParameters(){const e=super.getTemplateParameters();return e.properties.set(EH,PU.getWaterfallSeriesDefaultPositiveColors()),e.properties.set(
18xH,PU.getWaterfallSeriesDefaultNegativeColors()),e.properties.set(OH,PU.getWaterfallSeriesDefaultTotalColors()),e.properties.set(RH,[RU.ORANGE,RU.YELLOW,RU.GREEN]),e.properties.set(TH,PU.getWaterfallSeriesDefaultTotalColors().stroke),e}getPalette(){return _U}}const MU=()=>new UW,kU=()=>new XW,NU={undefined:MU,null:MU,"ag-default":MU,"ag-sheets":()=>new EU,"ag-polychroma":()=>new gU,"ag-vivid":()=>new PU,"ag-material":()=>new nU},LU={undefined:kU,null:kU,"ag-default-dark":kU,"ag-sheets-dark":()=>new CU,"ag-polychroma-dark":()=>new cU,"ag-vivid-dark":()=>new DU,"ag-material-dark":()=>new QW},IU=Object.assign(Object.assign({},LU),NU);class FU extends JB{constructor(e,t){super(e,t),this.padding=new FG(40),this.axisGroup.zIndex=WI.AXIS_FOREGROUND_ZINDEX}performLayout(){const e=Object.create(null,{performLayout:{get:()=>super.performLayout}});return oM(this,void 0,void 0,(function*(){const t=yield e.performLayout.call(this),i=t.clone();return this.computeSeriesRect(t),yield this.computeCircle(t),this.axes.forEach((e=>e.update())),this.hoverRect=t,this.layoutService.dispatchLayoutComplete({type:"layout-complete",chart:{width:this.scene.width,height:this.scene.height},clipSeries:!1,series:{rect:i,paddedRect:t,visible:!0},axes:[]}),t}))}updateAxes(e,t,i){var n,o;const r=this.axes.find((e=>e.direction===iN.X)),s=this.axes.find((e=>e.direction===iN.Y));if(!(r instanceof LW)||!(s instanceof LW))return;const a=r.scale,l=null===(n=a.ticks)||void 0===n?void 0:n.call(a).map((e=>a.convert(e))),c=s.innerRadiusRatio;r.innerRadiusRatio=c,null===(o=r.computeRange)||void 0===o||o.call(r),r.gridLength=i,s.gridAngles=l,s.gridRange=r.range,s.range=[i,i*c],[r,s].forEach((i=>{i.translation.x=e,i.translation.y=t,i.calculateLayout()}))}computeSeriesRect(e){const{seriesArea:{padding:t}}=this;e.shrink(t.left,"left"),e.shrink(t.top,"top"),e.shrink(t.right,"right"),e.shrink(t.bottom,"bottom"),this.seriesRect=e,this.animationRect=e}computeCircle(e){return oM(this,void 0,void 0,(function*(){const t=this.series.filter((e=>e instanceof eG)),i=this.axes.filter((e=>e instanceof LW)),n=(e,i,n)=>{this.updateAxes(e,i,n),t.forEach((t=>{t.centerX=e,t.centerY=i,t.radius=n}));const o=t.filter((e=>e instanceof lG));if(o.length>1){const e=o.map((e=>{const t=e.getInnerRadius();return{series:e,innerRadius:t}})).sort(((e,t)=>e.innerRadius-t.innerRadius));e[e.length-1].series.surroundingRadius=void 0;for(let t=0;t<e.length-1;t++)e[t].series.surroundingRadius=e[t+1].innerRadius}},o=e.x+e.width/2,r=e.y+e.height/2,s=Math.max(0,Math.min(e.width,e.height)/2);let a=s;n(o,r,a);const l=({hideWhenNecessary:l=!1}={})=>oM(this,void 0,void 0,(function*(){const c=[];for(const n of[...i,...t]){const t=yield n.computeLabelsBBox({hideWhenNecessary:l},e);t&&c.push(t)}if(0===c.length)return void n(o,r,s);const u=gN.merge(c),d=this.refineCircle(u,a,e);n(d.centerX,d.centerY,d.radius),d.radius!==a&&(a=d.radius)}));return yield l(),yield l(),yield l(),yield l({hideWhenNecessary:!0}),yield l({hideWhenNecessary:!0}),{radius:a,centerX:o,centerY:r}}))}refineCircle(e,t,i){const n=.5,o=-t,r=-t,s=t,a=t;let l=Math.max(0,o-e.x),c=Math.max(0,r-e.y),u=Math.max(0,e.x+e.width-s),d=Math.max(0,e.y+e.height-a);l=u=Math.max(l,u),c=d=Math.max(c,d);const p=i.width-l-u,h=i.height-c-d;let f=Math.min(p,h)/2;const g=n*i.width/2,v=n*i.height/2,y=Math.min(g,v);if(f<y){f=y;const e=l+u,t=c+d;if(2*f+t>i.height){const e=i.height-2*f;2*Math.min(c,d)>e?(c=e/2,d=e/2):c>d?c=e-d:d=e-c}if(2*f+e>i.width){const e=i.width-2*f;2*Math.min(l,u)>e?(l=e/2,u=e/2):l>u?l=e-u:u=e-l}}const m=l+2*f+u,C=c+2*f+d;return{centerX:i.x+(i.width-m)/2+l+f,centerY:i.y+(i.height-C)/2+c+f,radius:f}}}FU.className="PolarChart",FU.type="polar",Object.entries(IU).reduce(((e,[t,i])=>(e[t]=i(),e)),{});var GU,VU=Object.freeze({__proto__:null,TimeScale:IG,BandScale:UM,ContinuousScale:jL,ColorScale:nj,LinearScale:HL}),BU="\n.ag-sparkline-tooltip-wrapper {\n    position: absolute;\n    user-select: none;\n    pointer-events: none;\n}\n\n.ag-sparkline-tooltip {\n    position: relative;\n    font: 12px arial,sans-serif;\n    border-radius: 2px;\n    box-shadow: 0 1px 3px rgb(0 0 0 / 20%), 0 1px 1px rgb(0 0 0 / 14%);\n    line-height: 1.7em;\n    overflow: hidden;\n    white-space: nowrap;\n    z-index: 99999;\n    background-color: rgb(255, 255, 255);\n    color: rgba(0,0,0, 0.67);\n}\n\n.ag-sparkline-tooltip-content {\n    padding: 0 7px;\n    opacity: 1;\n}\n\n.ag-sparkline-tooltip-title {\n    padding-left: 7px;\n    opacity: 1;\n}\n\n.ag-sparkline-tooltip-wrapper-hidden {\n    top: -10000px !important;\n}\n\n.ag-sparkline-wrapper {\n    box-sizing: border-box;\n    overflow: hidden;\n}\n",jU=function(e){var t="function"===typeof Symbol&&Symbol.iterator,i=t&&e[t],n=0;if(i)return i.call(e);
18if(e&&"number"===typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},HU=GG.extent,WU=GG.isNumber,UU=GG.isString,zU=GG.isStringObject,KU=GG.isDate,YU=GG.createId,qU=GG.Padding,XU=VU.LinearScale,$U=VU.BandScale,ZU=VU.TimeScale;(function(e){e[e["SERIES_FILL_ZINDEX"]=50]="SERIES_FILL_ZINDEX",e[e["AXIS_LINE_ZINDEX"]=500]="AXIS_LINE_ZINDEX",e[e["SERIES_STROKE_ZINDEX"]=1e3]="SERIES_STROKE_ZINDEX",e[e["SERIES_LABEL_ZINDEX"]=1500]="SERIES_LABEL_ZINDEX",e[e["CROSSHAIR_ZINDEX"]=2e3]="CROSSHAIR_ZINDEX",e[e["SERIES_MARKERS_ZINDEX"]=2500]="SERIES_MARKERS_ZINDEX"})(GU||(GU={}));var JU=function(){function e(){this.type="category",this.stroke="rgb(204, 214, 235)",this.strokeWidth=1}return e}(),QU=function(){function e(){this.id=YU(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 qU(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 XU,this.axis=new JU,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);var t=new lj.Group;this.rootGroup=t;var i=document.createElement("div");i.setAttribute("class","ag-sparkline-wrapper");var n=new lj.Scene({window:window,document:document});this.scene=n,this.canvasElement=n.canvas.element,n.root=t,n.container=i,this.resizeAndSetDimensions(this.width,this.height),e.tooltipDocuments.includes(document)||this.initialiseTooltipStyles(),this.setupDomEventListeners(this.canvasElement)}return Object.defineProperty(e.prototype,"context",{get:function(){return this._context},set:function(e){this._context!==e&&(this._context=e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"container",{get:function(){return this._container},set:function(e){if(this._container!==e){var t=this.canvasElement.parentNode;null!=t&&t.removeChild(this.canvasElement),e&&e.appendChild(this.canvasElement),this._container=e}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"data",{get:function(){return this._data},set:function(e){this._data!==e&&(this._data=e,this.processData(),this.mouseMoveEvent&&this.highlightedDatum&&this.updateHitPoint(this.mouseMoveEvent))},enumerable:!1,configurable:!0}),e.prototype.resizeAndSetDimensions=function(e,t){this.scene.resize(e,t),this.seriesRect.width=e,this.seriesRect.height=t},e.prototype.initialiseTooltipStyles=function(){var t=document.createElement("style");t.innerHTML=BU,document.head.insertBefore(t,document.head.querySelector("style")),e.tooltipDocuments.push(document)},Object.defineProperty(e.prototype,"width",{get:function(){return this._width},set:function(e){this._width!==e&&(this._width=e,this.scene.resize(e,this.height),this.scheduleLayout())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},set:function(e){this._height!==e&&(this._height=e,this.scene.resize(this.width,e),this.scheduleLayout())},enumerable:!1,configurable:!0}),e.prototype.update=function(){},e.prototype.updateYScale=function(){this.updateYScaleRange(),this.updateYScaleDomain()},e.prototype.updateYScaleDomain=function(){},e.prototype.updateYScaleRange=function(){var e=this,t=e.yScale,i=e.seriesRect;t.range=[i.height,0]},e.prototype.updateXScale=function(){var e=this.axis.type;this.xScale=this.getXScale(e),this.updateXScaleRange(),this.updateXScaleDomain()},e.prototype.updateXScaleRange=function(){this.xScale.range=[0,this.seriesRect.width]},e.prototype.updateXScaleDomain=function(){var e,t=this,i=t.xData,n=t.xScale;(n instanceof XU||n instanceof ZU)&&(e=HU(i)),this.xScale.domain=e?e.slice():i},e.prototype.getXScale=function(e){switch(void 0===e&&(e="category"),e){case"number":return new XU;case"time":return new ZU;case"category":default:return new $U}},e.prototype.updateAxisLine=function(){},e.prototype.updateAxes=function(){this.updateYScale(),this.updateXScale(),this.updateAxisLine()},e.prototype.updateCrosshairs=function(){this.updateXCrosshairLine(),this.updateYCrosshairLine()},e.prototype.generateNodeData=function(){return[]},e.prototype.getNodeData=function(){return[]},e.prototype.updateNodes=function(){},e.prototype.updateXCrosshairLine=function(){},e.prototype.updateYCrosshairLine=function(){},e.prototype.highlightDatum=function(e){this.updateNodes()},e.prototype.dehighlightDatum=function(){this.highlightedDatum=void 0,this.updateNodes(),this.updateCrosshairs()},e.prototype.onMouseMove=function(e){this.mouseMoveEvent=e,this.updateHitPoint(e)},e.prototype.updateHitPoint=function(e){var t,i,n,o=this.pickClose
18stSeriesNodeDatum(e.offsetX,e.offsetY);if(o){var r=this.highlightedDatum;this.highlightedDatum=o,(this.highlightedDatum&&!r||this.highlightedDatum&&r&&this.highlightedDatum!==r)&&(this.highlightDatum(o),this.updateCrosshairs(),this.scene.render().catch((function(e){return console.error("AG Grid - chart rendering failed",e)})));var s=null===(n=null===(i=null===(t=this.processedOptions)||void 0===t?void 0:t.tooltip)||void 0===i?void 0:i.enabled)||void 0===n||n;s&&this.handleTooltip(e,o)}},e.prototype.onMouseOut=function(e){this.dehighlightDatum(),this.tooltip.toggle(!1),this.scene.render().catch((function(e){return console.error("AG Grid - chart rendering failed",e)}))},e.prototype.processData=function(){var e=this,t=this,i=t.data,n=t.yData,o=t.xData;if(i&&!this.invalidData(this.data)){n.length=0,o.length=0;var r=i.length,s=this.getDataType(i);this.dataType=s;var a,l=this.axis.type,c="number"!==l&&"time"!==l?"category":l,u="number"===c||"time"===c,d=function(t,i){void 0==e.smallestInterval&&(e.smallestInterval={x:1/0,y:1/0});var n=e.smallestInterval.x,o=Math.abs(t-i);o>0&&o<n&&(e.smallestInterval.x=o)};if("number"===s)for(var p=0;p<r;
18p++){var h=p,f=i[p],g=this.getDatum(h,c),v=this.getDatum(f,"number");u&&d(g,a),o.push(g),n.push(v),a=g}else if("array"===s)for(p=0;p<r;p++){var y=i[p];if(Array.isArray(y)){h=y[0],f=y[1],g=this.getDatum(h,c),v=this.getDatum(f,"number");if(void 0==g)continue;u&&d(g,a),o.push(g),n.push(v),a=g}}else if("object"===s){var m=this,C=m.yKey,b=m.xKey;for(p=0;p<r;p++){y=i[p];if("object"===typeof y&&!Array.isArray(y)){h=y[b],f=y[C],g=this.getDatum(h,c),v=this.getDatum(f,"number");if(void 0==g)continue;u&&d(g,a),o.push(g),n.push(v),a=g}}}this.updateAxes(),this.immediateLayout()}},e.prototype.getDataType=function(e){var t,i;try{for(var n=jU(e),o=n.next();!o.done;o=n.next()){var r=o.value;if(void 0!=r){if(WU(r))return"number";if(Array.isArray(r))return"array";if("object"===typeof r)return"object"}}}catch(s){t={error:s}}finally{try{o&&!o.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}},e.prototype.getDatum=function(e,t){if("number"===t&&WU(e)||"time"===t&&(WU(e)||KU(e)))return e;if("category"===t){if(UU(e)||KU(e)||WU(e))return{toString:function(){return String(e)}};if(zU(e))return e}},Object.defineProperty(e.prototype,"layoutScheduled",{get:function(){return!!this.layoutId},enumerable:!1,configurable:!0}),e.prototype.scheduleLayout=function(){var e=this;this.layoutId&&cancelAnimationFrame(this.layoutId),this.layoutId=requestAnimationFrame((function(){e.immediateLayout(),e.layoutId=0}))},e.prototype.immediateLayout=function(){this.setSparklineDimensions(),this.invalidData(this.data)||(this.updateXScaleRange(),this.updateYScaleRange(),this.updateAxisLine(),this.update(),this.scene.render().catch((function(e){return console.error("AG Grid - chart rendering failed",e)})))},e.prototype.setSparklineDimensions=function(){var e=this,t=e.width,i=e.height,n=e.padding,o=e.seriesRect,r=e.rootGroup,s=t-n.left-n.right,a=i-n.top-n.bottom;o.width=s,o.height=a,o.x=n.left,o.y=n.top,r.translationX=o.x,r.translationY=o.y},e.prototype.pickClosestSeriesNodeDatum=function(e,t){for(var i,n=1/0,o=this.rootGroup.transformPoint(e,t),r=this.getNodeData(),s=0;s<r.length;s++){var a=r[s];if(!a.point)return;var l=this.getDistance(o,a.point);l<=n&&(n=l,i=a)}return i},e.prototype.getDistance=function(e,t){return Math.abs(e.x-t.x)},e.prototype.handleTooltip=function(e,t){var i,n,o=t.seriesDatum,r=this.canvasElement,s=e.clientX,a=e.clientY,l=null===(i=this.processedOptions)||void 0===i?void 0:i.tooltip,c={pageX:s,pageY:a,position:{xOffset:null===l||void 0===l?void 0:l.xOffset,yOffset:null===l||void 0===l?void 0:l.yOffset},container:null===l||void 0===l?void 0:l.container};void 0==c.container&&(c.container=r);var u=o.y,d=o.x,p=null===(n=null===l||void 0===l?void 0:l.enabled)||void 0===n||n,h=null===l||void 0===l?void 0:l.renderer;if(h){var f=h({context:this.context,datum:o,yValue:u,xValue:d});p="string"!==typeof f&&void 0!==f.enabled?f.enabled:p}var g=p&&void 0!==o.y&&this.getTooltipHtml(t);g&&this.tooltip.show(c,g)},e.prototype.formatNumericDatum=function(e){return String(Math.round(10*e)/10)},e.prototype.formatDatum=function(e){var t=this.axis.type||"category";return"number"===t&&"number"===typeof e?this.formatNumericDatum(e):"time"===t&&(e instanceof Date||WU(e))?this.defaultDateFormatter.format(e):String(e)},e.prototype.setupDomEventListeners=function(e){e.addEventListener("mousemove",this._onMouseMove),e.addEventListener("mouseout",this._onMouseOut)},e.prototype.cleanupDomEventListeners=function(e){e.removeEventListener("mousemove",this._onMouseMove),e.removeEventListener("mouseout",this._onMouseOut)},e.prototype.invalidData=function(e){return!e||!Array.isArray(e)||0===e.length},e.prototype.destroy=function(){this.scene.container=void 0,this.container=void 0,this.cleanupDomEventListeners(this.scene.canvas.element)},e.tooltipDocuments=[],e}();function ez(e,t){var i,n,o;if("string"===typeof e)return e;t=null!==t&&void 0!==t?t:{};var r,s,a=e.content,l=void 0===a?null!==(i=t.content)&&void 0!==i?i:"":a,c=e.title,u=void 0===c?null!==(n=t.title)&&void 0!==n?n:void 0:c,d=e.color,p=void 0===d?t.color:d,h=e.backgroundColor,f=void 0===h?t.backgroundColor:h,g=e.opacity,v=void 0===g?null!==(o=t.opacity)&&void 0!==o?o:1:g;p?(r=u?'<span class="'.concat(tz.class,'-title"; style="color: ').concat(p,'">').concat(u,"</span>"):"",s='<span class="'.concat(tz.class,'-content" style="color: ').concat(p,'">').concat(l,"</span>")):(r=u?'<span class="'.concat(tz.class,'-title">').concat(u,"</span>"):"",s='<span class="'.concat(tz.class,'-content">').concat(l,"</span>"));var y="opacity: ".concat(v);return f&&(y+="; background-color: ".concat(f.toLowerCase())),'<div class="'.concat(tz.class,'" style="').concat(y,'">\n                ').concat(r,"\n                ").concat(s,"\n            </div>")}var tz=function(){function e(){this.element=document.createElement("div");var e=document.body;e.appendChild(this.element)}return e.prototype.isVisible=function(){var t=this.element;if(t.classList)return!t.classList.contains("".concat(e.class,"-wrapper-hidden"));var i=t.getAttribute("class");return!!i&&i.split(" ").indexOf("".concat(e.class,"-wrapper-hidden"))<0},e.prototype.updateClass=function(t){var i=["".concat(e.class,"-wrapper")];!0!==t&&i.push("".concat(e.class,"-wrapper-hidden")),this.element.setAttribute("class",i.join(" "))},e.prototype.show=function(e,t){var i,n,o,r;this.toggle(!1);var s=this.element;if(void 0!==t)s.innerHTML=t;else if(!s.innerHTML)return;var a=null!==(n=null===(i=e.position)||void 0===i?void 0:i.xOffset)&&void 0!==n?n:10,l=null!==(r=null===(o=e.position)||void 0===o?void 0:o.yOffset)&&void 0!==r?r:0,c=e.pageX+a,u=e.pageY+l,d=s.getBoundingClientRect(),p=window.innerWidth-d.width;if(e.container){var h=e.container.getBoundingClientRect();p=h.left+(h.width-d.width)}c>
18p&&(c=e.pageX-s.clientWidth-a),"undefined"!==typeof scrollX&&(c+=scrollX),"undefined"!==typeof scrollY&&(u+=scrollY),s.style.left="".concat(Math.round(c),"px"),s.style.top="".concat(Math.round(u),"px"),this.toggle(!0)},e.prototype.toggle=function(e){this.updateClass(e)},e.prototype.destroy=function(){var e=this.element.parentNode;e&&e.removeChild(this.element)},e.class="ag-sparkline-tooltip",e}();function iz(e){switch(e){case"circle":return lj.Circle;case"square":return lj.Square;case"diamond":return lj.Diamond;default:return lj.Circle}}function nz(e,t){void 0===t&&(t="solid");var 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]},n={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==n[t]?(console.warn("'".concat(t,"' is not a valid 'lineDash' option.")),n.solid):n[t]:void 0==i[t]?(console.warn("'".concat(t,"' is not a valid 'lineDash' option.")),i.solid):i[t]}var oz,rz,sz=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),az=GG.extent,lz=VU.BandScale,cz=function(){function e(){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}return e}(),uz=function(){function e(){this.stroke="rgb(124, 181, 236)",this.strokeWidth=1}return e}(),dz=function(){function e(){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}}return e}(),pz=function(e){function t(){var t=e.call(this)||this;return t.fill="rgba(124, 181, 236, 0.25)",t.strokePath=new lj.Path,t.fillPath=new lj.Path,t.xCrosshairLine=new lj.Line,t.yCrosshairLine=new lj.Line,t.areaSparklineGroup=new lj.Group,t.xAxisLine=new lj.Line,t.markers=new lj.Group,t.markerSelection=lj.Selection.select(t.markers,(function(){return t.markerFactory()})),t.markerSelectionData=[],t.marker=new cz,t.line=new uz,t.crosshairs=new dz,t.rootGroup.append(t.areaSparklineGroup),t.xAxisLine.zIndex=GU.AXIS_LINE_ZINDEX,t.fillPath.zIndex=GU.SERIES_FILL_ZINDEX,t.strokePath.zIndex=GU.SERIES_STROKE_ZINDEX,t.xCrosshairLine.zIndex=GU.CROSSHAIR_ZINDEX,t.yCrosshairLine.zIndex=GU.CROSSHAIR_ZINDEX,t.markers.zIndex=GU.SERIES_MARKERS_ZINDEX,t.areaSparklineGroup.append([t.fillPath,t.xAxisLine,t.strokePath,t.xCrosshairLine,t.yCrosshairLine,t.markers]),t}return sz(t,e),t.prototype.markerFactory=function(){var e=this.marker.shape,t=iz(e);return new t},t.prototype.getNodeData=function(){return this.markerSelectionData},t.prototype.update=function(){var e=this.generateNodeData();if(e){var t=e.nodeData,i=e.fillData,n=e.strokeData;this.markerSelectionData=t,this.updateSelection(t),this.updateNodes(),this.updateStroke(n),this.updateFill(i)}},t.prototype.updateYScaleDomain=function(){var e=this,t=e.yData,i=e.yScale,n=az(t),o=0,r=1;void 0!==n&&(o=this.min=n[0],r=this.max=n[1]),o=o<0?o:0,r=r<0?0:r,i.domain=[o,r]},t.prototype.generateNodeData=function(){var e=this,t=e.data,i=e.yData,n=e.xData,o=e.xScale,r=e.yScale;if(t){for(var s,a,l,c,u=!(o instanceof lz),d=u?0:o.bandwidth/2,p=i.length,h=[],f=[],g=[],v=r.convert(0),y=0;y<p;y++){var m=i[y],C=n[y],b=o.convert(u?o.toDomain(C):C)+d,w=void 0===m?NaN:r.convert(m);y+1<p&&(c=o.convert(u?o.toDomain(n[y+1]):n[y+1])+d),g.push({seriesDatum:{x:C,y:m},point:{x:b,y:w}}),void 0===m&&void 0!==l?(f.push({seriesDatum:void 0,point:{x:l,y:v}}),void 0!==c&&f.push({seriesDatum:void 0,point:{x:c,y:v}})):void 0!==m&&(f.push({seriesDatum:{x:C,y:m},point:{x:b,y:w}}),h.push({seriesDatum:{x:C,y:m},point:{x:b,y:w}}),s=void 0!==s?s:b,a=b),l=b}return f.push({seriesDatum:void 0,point:{x:a,y:v}},{seriesDatum:void 0,point:{x:s,y:v}}),{nodeData:h,fillData:f,strokeData:g}}},t.prototype.updateAxisLine=function(){var e=this,t=e.xScale,i=e.yScale,n=e.axis,o=e.xAxisLine;o.x1=t.range[0],o.x2=t.range[1],o.y1=o.y2=0,o.stroke=n.stroke,o.strokeWidth=n.strokeWidth;var r=i.convert(0);o.translationY=r},t.prototype.updateSelection=function(e){this.markerSelection.update(e)},t.prototype.updateNodes=function(){var e=this,t=this,i=t.highlightedDatum,n=t.highlightStyle,o=t.marker,r=n.size,s=n.fill,a=n.stroke,l=n.strokeWidth,c=o.formatter;this.markerSelection.each((function(t,n,u){var d=n.point,p=n.seriesDatum;if(d){var h,f=n===i,g=f&&void 0!==s?s:o.fill,v=f&&void 0!==a?a:o.stroke,y=f&&void 0!==l?l:o.strokeWidth,m=f&&void 0!==r?r:o.size;if(c){var C=0===u,b=u===e.markerSelectionData.length-1,w=p.y===e.min,S=p.y===e.max;h=c({datum:n,xValue:p.x,yValue:p.y,min:w,max:S,first:C,last:b,fill:g,stroke:v,strokeWidth:y,size:m,highlighted:f})}t.size=h&&void 0!=h.size?h.size:m,t.fill=h&&void 0!=h.fill?h.fill:g,t.stroke=h&&void 0!=h.stroke?h.stroke:v,t.strokeWidth=h&&void 0!=h.strokeWidth?h.strokeWidth:y,t.translationX=d.x,t.translationY=d.y,t.visible=h&&void 0!=h.enabled?h.enabled:o.enabled&&t.size>0}}))},t.prototype.updateStroke=function(e){var t=this,i=t.strokePath,n=t.yData,o=t.line;if(!(n.length<2)){var r=i.path,s=e.length,a=!0;r.clear();for(var l=0;l<s;l++){var c=e[l],u=c.point,d=c.seriesDatum,p=u.x,h=u.y;void 0==d.y?a=!0:a?(r.moveTo(p,h),a=!1):r.lineTo(p,h)}i.lineJoin=i.lineCap="round",i.fill=void 0,i.stroke=o.stroke,i.strokeWidth=o.strokeWidth}},t.prototype.updateFill=function(e){var t=this,i=t.fillPath,n=t.yData,o=t.fill,r=i.path,s=e.length;if(r.clear(),!(n.length<2)){for(var a=0;a<s;a++){var l=e[a].point,c=l.x,u=l.y;a>0?r.lineTo(c,u):r.moveTo(c,u)}r.closePath(),i.lineJoin="round",i.stroke=void 0,i.fill=o}},t.prototype.updateXCrosshairLine=function(){var e,t=this,i=t.yScale,n=t.xCrosshairLine,o=t.highlightedDatum,r=t.crosshairs.xLine;if(r.enabled&&void 0!=o){n.y1=i.range[0],n.y2=i.range[1],n.x1=n.x2=0,n.stroke=r.stroke,n.strokeWidth=null!==(e=r.strokeWidth)&&void 0!==e?e:1,n.lineCap="round"===r.lineCap||"square"===r.lineCap?r.lineCap:void 0;var s=r.lineDash;n.lineDash=Array.isArray(s)?s:nz(n.lineCap,r.lineDash),n.translationX=o.point.x}else n.strokeWidth=0},t.prototype.updateYCrosshairLine=function(){var e,t=this,i=t.xScale,n=t.yCrosshairLine,o=t.highlightedDatum,r=t.crosshairs.yLine;if(r.enabled&&void 0!=o){n.x1=i.range[0],n.x2=i.range[1],n.y1=n.y2=0,n.stroke=r.stroke,n.strokeWidth=null!==(e=r.strokeWidth)&&void 0!==e?e:1,n.lineCap="round"===r.lineCap||"square"===r.lineCap?r.lineCap:void 0;var s=r.lineDash;n.lineDash=Array.isArray(s)?s:nz(n.lineCap,r.lineDash),n.translationY=o.point.y}else n.strokeWidth=0},t.prototype.getTooltipHtml=function(e){var t,i,n=this.dataType,o=e.seriesDatum,r=o.y,s=o.x,a=this.formatNumericDatum(r),l="array"===n||"object"===n?this.formatDatum(s):void 0,c={content:a,title:l},u=null===(i=null===(t=this.processedOptions)||void 0===t?void 0:t.tooltip)||void 0===i?void 0:i.renderer;return u?ez(u({context:this.context,datum:o,yValue:r,xValue:s}),c):ez(c)},t.className="AreaSparkline",t}(QU),hz=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),fz=GG.extent,gz=VU.BandScale,vz=function(){function e(){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}return e}(),yz=function(){function e(){this.stroke="rgb(124, 181, 236)",this.strokeWidth=1}return e}(),mz=function(){function e(){this.xLine={enabled:!0,stroke:"rgba(0,0,0, 0.54)",
18strokeWidth:1,lineDash:"solid",lineCap:void 0},this.yLine={enabled:!1,stroke:"rgba(0,0,0, 0.54)",strokeWidth:1,lineDash:"solid",lineCap:void 0}}return e}(),Cz=function(e){function t(){var t=e.call(this)||this;return t.linePath=new lj.Path,t.xCrosshairLine=new lj.Line,t.yCrosshairLine=new lj.Line,t.lineSparklineGroup=new lj.Group,t.markers=new lj.Group,t.markerSelection=lj.Selection.select(t.markers,(function(){return t.markerFactory()})),t.markerSelectionData=[],t.marker=new vz,t.line=new yz,t.crosshairs=new mz,t.rootGroup.append(t.lineSparklineGroup),t.linePath.zIndex=GU.SERIES_STROKE_ZINDEX,t.xCrosshairLine.zIndex=GU.CROSSHAIR_ZINDEX,t.yCrosshairLine.zIndex=GU.CROSSHAIR_ZINDEX,t.markers.zIndex=GU.SERIES_MARKERS_ZINDEX,t.lineSparklineGroup.append([t.linePath,t.xCrosshairLine,t.yCrosshairLine,t.markers]),t}return hz(t,e),t.prototype.getNodeData=function(){return this.markerSelectionData},t.prototype.markerFactory=function(){var e=this.marker.shape,t=iz(e);return new t},t.prototype.onMarkerShapeChange=function(){this.markerSelection=this.markerSelection.clear(),this.scheduleLayout()},t.prototype.update=function(){var e=this.generateNodeData();e&&(this.markerSelectionData=e,this.updateSelection(e),this.updateNodes(),this.updateLine())},t.prototype.updateYScaleDomain=function(){var e=this,t=e.yData,i=e.yScale,n=fz(t),o=0,r=1;if(void 0!==n&&(o=this.min=n[0],r=this.max=n[1]),o===r){var s=Math.abs(.01*o);o-=s,r+=s}i.domain=[o,r]},t.prototype.generateNodeData=function(){var e=this,t=e.data,i=e.yData,n=e.xData,o=e.xScale,r=e.yScale;if(t){for(var s=!(o instanceof gz),a=s?0:o.bandwidth/2,l=[],c=0;c<i.length;c++){var u=i[c],d=n[c];if(void 0!=u){var p=o.convert(s?o.toDomain(d):d)+a,h=void 0===u?NaN:r.convert(u);l.push({seriesDatum:{x:d,y:u},point:{x:p,y:h}})}}return l}},t.prototype.updateSelection=function(e){this.markerSelection.update(e)},t.prototype.updateNodes=function(){var e=this,t=this,i=t.highlightedDatum,n=t.highlightStyle,o=t.marker,r=n.size,s=n.fill,a=n.stroke,l=n.strokeWidth,c=o.formatter;this.markerSelection.each((function(t,n,u){var d,p=n===i,h=p&&void 0!==s?s:o.fill,f=p&&void 0!==a?a:o.stroke,g=p&&void 0!==l?l:o.strokeWidth,v=p&&void 0!==r?r:o.size,y=n.seriesDatum,m=n.point;if(c){var C=0===u,b=u===e.markerSelectionData.length-1,w=y.y===e.min,S=y.y===e.max;d=c({datum:n,xValue:y.x,yValue:y.y,min:w,max:S,first:C,last:b,fill:h,stroke:f,strokeWidth:g,size:v,highlighted:p})}t.size=d&&void 0!=d.size?d.size:v,t.fill=d&&void 0!=d.fill?d.fill:h,t.stroke=d&&void 0!=d.stroke?d.stroke:f,t.strokeWidth=d&&void 0!=d.strokeWidth?d.strokeWidth:g,t.translationX=m.x,t.translationY=m.y,t.visible=d&&void 0!=d.enabled?d.enabled:o.enabled&&t.size>0}))},t.prototype.updateLine=function(){var e=this,t=e.linePath,i=e.yData,n=e.xData,o=e.xScale,r=e.yScale,s=e.line;if(!(i.length<2)){var a=!(o instanceof gz),l=t.path,c=i.length,u=a?0:o.bandwidth/2,d=!0;l.clear();for(var p=0;p<c;p++){var h=n[p],f=i[p],g=o.convert(a?o.toDomain(h):h)+u,v=void 0===f?NaN:r.convert(f);void 0==f?d=!0:d?(l.moveTo(g,v),d=!1):l.lineTo(g,v)}t.fill=void 0,t.stroke=s.stroke,t.strokeWidth=s.strokeWidth}},t.prototype.updateXCrosshairLine=function(){var e,t=this,i=t.yScale,n=t.xCrosshairLine,o=t.highlightedDatum,r=t.crosshairs.xLine;if(r.enabled&&void 0!=o){n.y1=i.range[0],n.y2=i.range[1],n.x1=n.x2=0,n.stroke=r.stroke,n.strokeWidth=null!==(e=r.strokeWidth)&&void 0!==e?e:1,n.lineCap="round"===r.lineCap||"square"===r.lineCap?r.lineCap:void 0;var s=r.lineDash;n.lineDash=Array.isArray(s)?s:nz(n.lineCap,r.lineDash),n.translationX=o.point.x}else n.strokeWidth=0},t.prototype.updateYCrosshairLine=function(){var e,t=this,i=t.xScale,n=t.yCrosshairLine,o=t.highlightedDatum,r=t.crosshairs.yLine;if(r.enabled&&void 0!=o){n.x1=i.range[0],n.x2=i.range[1],n.y1=n.y2=0,n.stroke=r.stroke,n.strokeWidth=null!==(e=r.strokeWidth)&&void 0!==e?e:1,n.lineCap="round"===r.lineCap||"square"===r.lineCap?r.lineCap:void 0;var s=r.lineDash;n.lineDash=Array.isArray(s)?s:nz(n.lineCap,r.lineDash),n.translationY=o.point.y}else n.strokeWidth=0},t.prototype.getTooltipHtml=function(e){var t,i,n=this.dataType,o=e.seriesDatum,r=o.y,s=o.x,a=this.formatNumericDatum(r),l="array"===n||"object"===n?this.formatDatum(s):void 0,c={content:a,title:l},u=null===(i=null===(t=this.processedOptions)||void 0===t?void 0:t.tooltip)||void 0===i?void 0:i.renderer;return u?ez(u({context:this.context,datum:o,yValue:r,xValue:s}),c):ez(c)},t.className="LineSparkline",t}(QU),bz=function(){function e(){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)"}return e}(),wz=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Sz=GG.extent;(function(e){e[e["Rect"]=0]="Rect",e[e["Label"]=1]="Label"})(oz||(oz={})),function(e){e["InsideBase"]="insideBase",e["InsideEnd"]="insideEnd",e["Center"]="center",e["OutsideEnd"]="outsideEnd"}(rz||(rz={}));var Ez=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.formatter=void 0,t.placement=rz.InsideEnd,t}return wz(t,e),t}(bz),xz=function(e){function t(){var t=e.call(this)||this;return t.fill="rgb(124, 181, 236)",t.stroke="silver",t.strokeWidth=0,t.paddingInner=.1,t.paddingOuter=.2,t.valueAxisDomain=void 0,t.formatter=void 0,t.axisLine=new lj.Line,t.bandWidth=0,t.sparklineGroup=new lj.Group,t.rectGroup=new lj.Group,t.labelGroup=new lj.Group,t.rectSelection=lj.Selection.select(t.rectGroup,lj.Rect),t.labelSelection=lj.Selection.select(t.labelGroup,lj.Text),t.nodeSelectionData=[],t.label=new Ez,t.rootGroup.append(t.sparklineGroup),t.rectGroup.zIndex=GU.SERIES_FILL_ZINDEX,t.axisLine.zIndex=GU.AXIS_LINE_ZINDEX,t.labelGroup.zIndex=GU.SERIES_LABEL_ZINDEX,t.sparklineGroup.append([t.rectGroup,t.axisLine,t.labelGroup]),t.axisLine.lineCap="round",t.label.enabled=!1,t}return wz(t,e),t.prototype.getNodeData=function(){return this.nodeSelectionData},t.prototype.update=function(){this.updateSelections(),this.updateNodes()},t.prototype.updateSelections=function(){var e=this.generateNodeData();e&&(this.nodeSelectionData=e,this.updateRectSelection(e),this.updateLabelSelection(e))},t.prototype.updateNodes=function(){this.updateRectNodes(),this.updateLabelNodes()},t.prototype.calculateStep=function(e){var t,i=this,n=i.xScale,o=i.paddingInner,r=i.paddingOuter,s=i.smallestInterval,a=n.domain[1]-n.domain[0],l=a/(null!==(t=null===s||void 0===s?void 0:s.x)&&void 0!==t?t:1)+1,c=50,u=Math.min(l,c),d=u-1,p=e/Math.max(1,2*r+d*o+u);return p},t.prototype.updateYScaleDomain=function(){var e=this,t=e.yScale,i=e.yData,n=e.valueAxisDomain,o=Sz(i),r=0,s=1;void 0!==o&&(r=this.min=o[0],s=this.max=o[1]),r=r<0?r:0,s=s<0?0:s,n&&(n[1]<s&&(n[1]=s),n[0]>r&&(n[0]=r)),t.domain=n||[r,s]},t.prototype.updateRectSelection=function(e){this.rectSelection.update(e)},t.prototype.updateRectNodes=function(){var e=this,t=this,i=t.highlightedDatum,n=t.formatter,o=t.fill,r=t.stroke,s=t.strokeWidth,a=this.highlightStyle,l=a.fill,c=a.stroke,u=a.strokeWidth;this.rectSelection.each((function(t,a,d){var p,h=a===i,f=h&&void 0!==l?l:o,g=h&&void 0!==c?c:r,v=h&&void 0!==u?u:s,y=a.x,m=a.y,C=a.width,b=a.height,w=a.seriesDatum;if(n){var S=0===d,E=d===e.nodeSelectionData.length-1,x=w.y===e.min,O=w.y===e.max;p=n({datum:a,xValue:w.x,yValue:w.y,width:C,height:b,min:x,max:O,first:S,last:E,fill:f,stroke:g,strokeWidth:v,highlighted:h})}t.fill=p&&p.fill||f,t.stroke=p&&p.stroke||g,t.strokeWidth=p&&p.strokeWidth||v,t.x=t.y=0,t.width=C,t.height=b,t.visible=t.height>0,t.translationX=y,t.translationY=m}))},t.prototype.updateLabelSelection=function(e){this.labelSelection.update(e,(function(e){e.tag=oz.
18Label,e.pointerEvents=lj.PointerEvents.None}))},t.prototype.updateLabelNodes=function(){var e=this.label,t=e.enabled,i=e.fontStyle,n=e.fontWeight,o=e.fontSize,r=e.fontFamily,s=e.color;this.labelSelection.each((function(e,a){var l=a.label;l&&t?(e.fontStyle=i,e.fontWeight=n,e.fontSize=o,e.fontFamily=r,e.textAlign=l.textAlign,e.textBaseline=l.textBaseline,e.text=l.text,e.x=l.x,e.y=l.y,e.fill=s,e.visible=!0):e.visible=!1}))},t.prototype.getTooltipHtml=function(e){var t,i,n=this.dataType,o=e.seriesDatum,r=o.y,s=o.x,a=this.formatNumericDatum(r),l="array"===n||"object"===n?this.formatDatum(s):void 0,c={content:a,title:l},u=null===(i=null===(t=this.processedOptions)||void 0===t?void 0:t.tooltip)||void 0===i?void 0:i.renderer;return u?ez(u({context:this.context,datum:o,yValue:r,xValue:s}),c):ez(c)},t.prototype.formatLabelValue=function(e){return e%1!==0?e.toFixed(1):e.toFixed(0)},t}(QU),Oz=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Tz=GG.isNumber,Dz=VU.BandScale,Rz=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Oz(t,e),t.prototype.updateYScaleRange=function(){var e=this,t=e.seriesRect,i=e.yScale;i.range=[0,t.width]},t.prototype.updateXScaleRange=function(){var e=this,t=e.xScale,i=e.seriesRect,n=e.paddingOuter,o=e.paddingInner;if(t instanceof Dz)t.range=[0,i.height],t.paddingInner=o,t.paddingOuter=n;else{var r=this.calculateStep(i.height),s=r*n;this.bandWidth=r*(1-o),t.range=[s,i.height-s-this.bandWidth]}},t.prototype.updateAxisLine=function(){var e=this,t=e.yScale,i=e.axis,n=e.axisLine,o=e.seriesRect,r=i.strokeWidth;n.x1=0,n.x2=0,n.y1=0,n.y2=o.height,n.stroke=i.stroke,n.strokeWidth=r+(r%2===1?1:0);var s=t.convert(0);n.translationX=s},t.prototype.generateNodeData=function(){var e=this,t=e.data,i=e.yData,n=e.xData,o=e.xScale,r=e.yScale,s=e.fill,a=e.stroke,l=e.strokeWidth,c=e.label;if(t){for(var u=c.fontStyle,d=c.fontWeight,p=c.fontSize,h=c.fontFamily,f=c.color,g=c.formatter,v=c.placement,y=[],m=r.convert(0),C=!(o instanceof Dz),b=0,w=i.length;b<w;b++){var S=i[b],E=n[b],x=void 0===S;x&&(S=0);var O=o.convert(C?o.toDomain(E):E),T=Math.min(void 0===S?NaN:r.convert(S),m),D=Math.max(void 0===S?NaN:r.convert(S),m),R=C?this.bandWidth:o.bandwidth,A=D-T,_={x:m,y:O},P=void 0;P=g?g({value:S}):void 0!==S&&Tz(S)?this.formatLabelValue(S):"";var M=O+R/2,k=void 0,N="middle",L=void 0,I=void 0!==S&&S>=0,F=4;if(v===rz.Center)k=T+A/2,L="center";else if(v===rz.OutsideEnd)k=T+(I?A+F:-F),L=I?"start":"end";else if(v===rz.InsideEnd){k=T+(I?A-F:F),L=I?"end":"start";var G=lj.HdpiCanvas.getTextSize(P,h),V=G.width||20,B=m+V,j=m-V,H=I&&k<B||!I&&k>j;H&&(k=m+F*(I?1:-1),L=I?"start":"end")}else k=m+F*(I?1:-1),L=I?"start":"end";y.push({x:T,y:O,width:A,height:R,fill:s,stroke:a,strokeWidth:l,seriesDatum:{x:E,y:x?void 0:S},point:_,label:{x:k,y:M,text:P,fontStyle:u,fontWeight:d,fontSize:p,fontFamily:h,textAlign:L,textBaseline:N,fill:f}})}return y}},t.prototype.getDistance=function(e,t){return Math.abs(e.y-t.y)},t.className="BarSparkline",t}(xz),Az=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),_z=GG.isNumber,Pz=VU.BandScale,Mz=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Az(t,e),t.prototype.updateYScaleRange=function(){var e=this,t=e.seriesRect,i=e.yScale;i.range=[t.height,0]},t.prototype.updateXScaleRange=function(){var e=this,t=e.xScale,i=e.seriesRect,n=e.paddingOuter,o=e.paddingInner;if(t instanceof Pz)t.range=[0,i.width],t.paddingInner=o,t.paddingOuter=n;else{var r=this.calculateStep(i.width),s=r*n;this.bandWidth=r*(1-o),t.range=[s,i.width-s-this.bandWidth]}},t.prototype.updateAxisLine=function(){var e=this,t=e.yScale,i=e.axis,n=e.axisLine,o=e.seriesRect,r=i.strokeWidth;n.x1=0,n.x2=o.width,n.y1=0,n.y2=0,n.stroke=i.stroke,n.strokeWidth=r+(r%2===1?1:0);var s=t.convert(0);n.translationY=s},t.prototype.generateNodeData=function(){var e=this,t=e.data,i=e.yData,n=e.xData,o=e.xScale,r=e.yScale,s=e.fill,a=e.stroke,l=e.strokeWidth,c=e.label;if(t){for(var u=c.fontStyle,d=c.fontWeight,p=c.fontSize,h=c.fontFamily,f=c.color,g=c.formatter,v=c.placement,y=[],m=r.convert(0),C=!(o instanceof Pz),b=0,w=i.length;b<w;b++){var S=i[b],E=n[b],x=void 0===S;x&&(S=0);var O=Math.min(void 0===S?NaN:r.convert(S),m),T=o.convert(C?o.toDomain(E):E),D=Math.max(void 0===S?NaN:r.convert(S),m),R=C?this.bandWidth:o.bandwidth,A=D-O,_={x:T+R/2,y:m},P=void 0;P=g?g({value:S}):void 0!==S&&_z(S)?this.formatLabelValue(S):"";var M=T+R/2,k=void 0,N="center",L=void 0,I=void 0!==S&&S>=0,F=2;if(v===rz.Center)k=O+A/2,L="middle";else if(v===rz.OutsideEnd)k=O+(I?-F:A+F),L=I?"bottom":"top";else if(v===rz.InsideEnd){k=O+(I?F:A-F),L=I?"top":"bottom";var G=lj.HdpiCanvas.getTextSize(P,h),V=G.height||10,B=m-V,j=m+V,H=I&&k>B||!I&&k<j;H&&(k=m+F*(I?-1:1),L=I?"bottom":"top")}else k=m+F*(I?-1:1),L=I?"bottom":"top";y.push({x:T,y:O,width:R,height:A,fill:s,stroke:a,strokeWidth:l,seriesDatum:{x:E,y:x?void 0:S},point:_,label:{x:M,y:k,text:P,fontStyle:u,fontWeight:d,fontSize:p,fontFamily:h,textAlign:N,textBaseline:L,fill:f}})}return y}},t.className="ColumnSparkline",t}(xz),kz=GG.isNumber,Nz=function(){function e(){}return e.create=function(e,t){e=GG.jsonMerge([e]);var i=Lz(e.type);return t&&(i.tooltip=t),Fz(i,e),Iz(i,e),e.data&&(i.data=e.data),i.processedOptions=e,i},e}();function Lz(e){switch(void 0===e&&(e="line"),e){case"column":return new Mz;case"bar":return new Rz;case"area":return new pz;case"line":default:return new Cz}}function Iz(e,t){switch(t.type){case"bar":Bz(e,t);break;case"column":Bz(e,t);break;case"area":Vz(e,t);break;case"line":default:Gz(e,t);break}}function Fz(e,t){Qz(e,"context",t.context,t),Qz(e,"width",t.width,t),Qz(e,"height",t.height,t),Qz(e,"container",t.container,t),Qz(e,"xKey",t.xKey,t),Qz(e,"yKey",t.yKey,t),t.padding&&jz(e.padding,t.padding),t.axis&&zz(e.axis,t.axis),t.highlightStyle&&Kz(e.highlightStyle,t.highlightStyle)}function Gz(e,t){t.marker&&Hz(e.marker,t.marker),t.line&&Uz(e.line,t.line),t.crosshairs&&Yz(e.crosshairs,t.crosshairs)}function Vz(e,t){Qz(e,"fill",t.fill,t),t.marker&&Hz(e.marker,t.marker),t.line&&Uz(e.line,t.line),t.crosshairs&&Yz(e.crosshairs,t.crosshairs)}function Bz(e,t){Qz(e,"valueAxisDomain",t.valueAxisDomain,t),Qz(e,"fill",t.fill,t),Qz(e,"stroke",t.stroke,t),Qz(e,"strokeWidth",t.strokeWidth,t),Qz(e,"paddingInner",t.paddingInner,t),Qz(e,"paddingOuter",t.paddingOuter,t),Qz(e,"formatter",t.formatter,t),t.label&&Wz(e.label,t.label)}function jz(e,t){Qz(e,"top",t.top,t),Qz(e,"right",t.right,t),Qz(e,"bottom",t.bottom,t),Qz(e,"left",t.left,t)}function Hz(e,t){Qz(e,"enabled",t.enabled,t),Qz(e,"size",t.size,t),Qz(e,"shape",t.shape,t),Qz(e,"fill",t.fill,t),Qz(e,"stroke",t.stroke,t),Qz(e,"strokeWidth",t.strokeWidth,t),Qz(e,"formatter",t.formatter,t)}function Wz(e,t){Qz(e,"enabled",t.enabled,t),Qz(e,"fontStyle",t.fontStyle,t),Qz(e,"fontWeight",t.fontWeight,t),Qz(e,"fontSize",t.fontSize,t),Qz(e,"fontFamily",t.fontFamily,t),Qz(e,"textAlign",t.textAlign,t),Qz(e,"textBaseline",t.textBaseline,t),Qz(e,"color",t.color,t),Qz(e,"formatter",t.formatter,t),Qz(e,"placement",t.placement,t)}function Uz(e,t){Qz(e,"stroke",t.stroke,t),Qz(e,"strokeWidth",t.strokeWidth,t)}function zz(e,t){Qz(e,"type",t.type,t),Qz(e,"stroke",t.stroke,t),Qz(e,"strokeWidth",t.strokeWidth,t)}function Kz(e,t){Qz(e,"fill",t.fill,t),Qz(e,"size",t.size,t),Qz(e,"stroke",t.stroke,t),Qz(e,"strokeWidth",t.strokeWidth,t)}function Yz(e,t){e.xLine&&t.xLine&&qz(e.xLine,t.xLine),e.yLine&&t.yLine&&qz(e.yLine,t.yLine)}function qz(e,t){Qz(e,"enabled",t.enabled,t),Qz(e,"stroke",t.stroke,t),Qz(e,"strokeWidth",t.strokeWidth,t),Qz(e,"lineDash",t.lineDash,t),Qz(e,"lineCap",t.lineCap,t)}var Xz={};function $z(e,t){Xz[t]||(e(),Xz[t]=!0)}var Zz=function(e,t,i){if(kz(t))return!0;var n="AG Charts: ".concat(e," must be a number, the value you provided is not a valid number. Using the default of ").concat(i,"px.");return $z((function(){return console.warn(n)}),"".concat(e," not a number")),!1},Jz={xOffset:Zz,yOffset:Zz};function Qz(e,t,i,n){if(t in n)if(t in e){var o=Jz[t],r=!o||o(t,i,e[t]);r&&e[t]!==i&&(e[t]=i)}else console.warn("Property ".concat(t," does not exist on the target object."))}var eK=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),tK=function(){return tK=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},tK.apply(this,arguments)},iK=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},nK=function(e){function t(){return e.call(this,t.TEMPLATE)||this}return eK(t,e),t.prototype.init=function(e){var t=this,i=!0,n=function(){var n=t.getGui(),o=n.clientWidth,r=n.clientHeight;if(0!==o&&0!==r)if(i){var s=tK({data:e.value,width:o,height:r,context:{data:e.data}},e.sparklineOptions);
18t.sparkline=Nz.create(s,t.sparklineTooltipSingleton.getSparklineTooltip()),t.eSparkline.appendChild(t.sparkline.canvasElement),i=!1}else t.sparkline.width=o,t.sparkline.height=r},o=this.resizeObserverService.observeResize(this.getGui(),n);this.addDestroyFunc((function(){return o()}))},t.prototype.refresh=function(e){return!!this.sparkline&&(this.sparkline.data=e.value,!0)},t.prototype.destroy=function(){this.sparkline&&this.sparkline.destroy(),e.prototype.destroy.call(this)},t.TEMPLATE='<div class="ag-sparkline-wrapper">\n            <span ref="eSparkline"></span>\n        </div>',iK([(0,n.cqo)("eSparkline")],t.prototype,"eSparkline",void 0),iK([(0,n.fsG)("resizeObserverService")],t.prototype,"resizeObserverService",void 0),iK([(0,n.fsG)("sparklineTooltipSingleton")],t.prototype,"sparklineTooltipSingleton",void 0),t}(n.wA2),oK=function(){var e=function(t,i){return e=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,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),rK=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},sK=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oK(t,e),t.prototype.postConstruct=function(){this.tooltip=new tz},t.prototype.getSparklineTooltip=function(){return this.tooltip},t.prototype.destroyTooltip=function(){this.tooltip&&this.tooltip.destroy()},rK([n.NqP],t.prototype,"postConstruct",null),rK([n.FXL],t.prototype,"destroyTooltip",null),t=rK([(0,n.Vu6)("sparklineTooltipSingleton")],t),t}(n.AS9),aK="31.0.0",lK={version:aK,moduleName:n.GXE.SparklinesModule,beans:[sK],userComponents:[{componentName:"agSparklineCellRenderer",componentClass:nK}],dependantModules:[y]};const cK=[Ve,Je,vn,ns,ws,$D,rR,AR,VR,kD,WR,_i,o_,M_,pn,oP,cP,lK];n.F$j.concat(cK);n.O3h.registerModules(cK)},6268:function(e,t){t.Z=(e,t)=>{const i=e.__vccOpts||e;for(const[n,o]of t)i[n]=o;return i}},1504:function(e,t,i){i(2106),i(7074),i(4289),i(7226),i(2509);var n=function(e){try{return!!e()}catch(e){return!0}},o=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof i.g?i.g:"undefined"!=typeof self?self:{};function s(e,t,i){return e(i={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&i.path)}},i.exports),i.exports}var a=function(e){return e&&e.Math==Math&&e},l=a("object"==typeof globalThis&&globalThis)||a("object"==typeof window&&window)||a("object"==typeof self&&self)||a("object"==typeof r&&r)||Function("return this")(),c=function(e){return"object"==typeof e?null!==e:"function"==typeof e},u=l.document,d=c(u)&&c(u.createElement),p=function(e){return d?u.createElement(e):{}},h=!o&&!n((function(){return 7!=Object.defineProperty(p("div"),"a",{get:function(){return 7}}).a})),f=function(e){if(!c(e))throw TypeError(String(e)+" is not an object");return e},g=function(e,t){if(!c(e))return e;var i,n;if(t&&"function"==typeof(i=e.toString)&&!c(n=i.call(e)))return n;if("function"==typeof(i=e.valueOf)&&!c(n=i.call(e)))return n;if(!t&&"function"==typeof(i=e.toString)&&!c(n=i.call(e)))return n;throw TypeError("Can't convert object to primitive value")},v=Object.defineProperty,y={f:o?v:function(e,t,i){if(f(e),t=g(t,!0),f(i),h)try{return v(e,t,i)}catch(e){}if("get"in i||"set"in i)throw TypeError("Accessors not supported");return"value"in i&&(e[t]=i.value),e}},m=y.f,C=Function.prototype,b=C.toString,w=/^\s*function ([^ (]*)/;o&&!("name"in C)&&m(C,"name",{configurable:!0,get:function(){try{return b.call(this).match(w)[1]}catch(n){return""}}});var S={}.propertyIsEnumerable,E=Object.getOwnPropertyDescriptor,x={f:E&&!S.call({1:2},1)?function(e){var t=E(this,e);return!!t&&t.enumerable}:S},O=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},T={}.toString,D=function(e){return T.call(e).slice(8,-1)},R="".split,A=n((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==D(e)?R.call(e,""):Object(e)}:Object,_=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},P=function(e){return A(_(e))},M={}.hasOwnProperty,k=function(e,t){return M.call(e,t)},N=Object.getOwnPropertyDescriptor,L={f:o?N:function(e,t){if(e=P(e),t=g(t,!0),h)try{return N(e,t)}catch(e){}if(k(e,t))return O(!x.f.call(e,t),e[t])}},I=o?function(e,t,i){return y.f(e,t,O(1,i))}:function(e,t,i){return e[t]=i,e},F=function(e,t){try{I(l,e,t)}catch(r){l[e]=t}return t}
vendor: 2,315 bytes, line 18
18,G=l["__core-js_shared__"]||F("__core-js_shared__",{}),V=Function.toString;"function"!=typeof G.inspectSource&&(G.inspectSource=function(e){return V.call(e)});var B,j,H,W=G.inspectSource,U=l.WeakMap,z="function"==typeof U&&/native code/.test(W(U)),K=s((function(e){(e.exports=function(e,t){return G[e]||(G[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.5",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),Y=0,q=Math.random(),X=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++Y+q).toString(36)},$=K("keys"),Z=function(e){return $[e]||($[e]=X(e))},J={},Q=l.WeakMap;if(z){var ee=new Q,te=ee.get,ie=ee.has,ne=ee.set;B=function(e,t){return ne.call(ee,e,t),t},j=function(e){return te.call(ee,e)||{}},H=function(e){return ie.call(ee,e)}}else{var oe=Z("state");J[oe]=!0,B=function(e,t){return I(e,oe,t),t},j=function(e){return k(e,oe)?e[oe]:{}},H=function(e){return k(e,oe)}}var re,se={set:B,get:j,has:H,enforce:function(e){return H(e)?j(e):B(e,{})},getterFor:function(e){return function(t){var i;if(!c(t)||(i=j(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return i}}},ae=s((function(e){var t=se.get,i=se.enforce,n=String(String).split("String");(e.exports=function(e,t,o,r){var s=!!r&&!!r.unsafe,a=!!r&&!!r.enumerable,c=!!r&&!!r.noTargetGet;"function"==typeof o&&("string"!=typeof t||k(o,"name")||I(o,"name",t),i(o).source=n.join("string"==typeof t?t:"")),e!==l?(s?!c&&e[t]&&(a=!0):delete e[t],a?e[t]=o:I(e,t,o)):a?e[t]=o:F(t,o)})(Function.prototype,"toString",(function(){return"function"==typeof this&&t(this).source||W(this)}))})),le=l,ce=function(e){return"function"==typeof e?e:void 0},ue=function(e,t){return arguments.length<2?ce(le[e])||ce(l[e]):le[e]&&le[e][t]||l[e]&&l[e][t]},de=Math.ceil,pe=Math.floor,he=function(e){return isNaN(e=+e)?0:(e>0?pe:de)(e)},fe=Math.min,ge=function(e){return e>0?fe(he(e),9007199254740991):0},ve=Math.max,ye=Math.min,me=function(e,t){var i=he(e);return i<0?ve(i+t,0):ye(i,t)},Ce=function(e){return function(t,i,n){var o,r=P(t),s=ge(r.length),a=me(n,s);if(e&&i!=i){for(;s>a;)if((o=r[a++])!=o)return!0}else for(;s>a;a++)if((e||a in r)&&r[a]===i)return e||a||0;return!e&&-1}},be={includes:Ce(!0),indexOf:Ce(!1)},we=be.indexOf,Se=function(e,t){var i,n=P(e),o=0,r=[];for(i in n)!k(J,i)&&k(n,i)&&r.push(i);for(;t.length>o;
vendor: 5,227 bytes, line 18
18)k(n,i=t[o++])&&(~we(r,i)||r.push(i));return r},Ee=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],xe=Ee.concat("length","prototype"),Oe={f:Object.getOwnPropertyNames||function(e){return Se(e,xe)}},Te={f:Object.getOwnPropertySymbols},De=ue("Reflect","ownKeys")||function(e){var t=Oe.f(f(e)),i=Te.f;return i?t.concat(i(e)):t},Re=function(e,t){for(var i=De(t),n=y.f,o=L.f,r=0;r<i.length;r++){var s=i[r];k(e,s)||n(e,s,o(t,s))}},Ae=/#|\.prototype\./,_e=function(e,t){var i=Me[Pe(e)];return i==Ne||i!=ke&&("function"==typeof t?n(t):!!t)},Pe=_e.normalize=function(e){return String(e).replace(Ae,".").toLowerCase()},Me=_e.data={},ke=_e.NATIVE="N",Ne=_e.POLYFILL="P",Le=_e,Ie=L.f,Fe=function(e,t){var i,n,o,r,s,a=e.target,c=e.global,u=e.stat;if(i=c?l:u?l[a]||F(a,{}):(l[a]||{}).prototype)for(n in t){if(r=t[n],o=e.noTargetGet?(s=Ie(i,n))&&s.value:i[n],!Le(c?n:a+(u?".":"#")+n,e.forced)&&void 0!==o){if(typeof r==typeof o)continue;Re(r,o)}(e.sham||o&&o.sham)&&I(r,"sham",!0),ae(i,n,r,e)}},Ge=!!Object.getOwnPropertySymbols&&!n((function(){return!String(Symbol())})),Ve=Ge&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Be=Array.isArray||function(e){return"Array"==D(e)},je=function(e){return Object(_(e))},He=Object.keys||function(e){return Se(e,Ee)},We=o?Object.defineProperties:function(e,t){f(e);for(var i,n=He(t),o=n.length,r=0;o>r;)y.f(e,i=n[r++],t[i]);return e},Ue=ue("document","documentElement"),ze=Z("IE_PROTO"),Ke=function(){},Ye=function(e){return"<script>"+e+"<\/script>"},qe=function(){try{re=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t;qe=re?function(e){e.write(Ye("")),e.close();var t=e.parentWindow.Object;return e=null,t}(re):((t=p("iframe")).style.display="none",Ue.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(Ye("document.F=Object")),e.close(),e.F);for(var i=Ee.length;i--;)delete qe.prototype[Ee[i]];return qe()};J[ze]=!0;var Xe=Object.create||function(e,t){var i;return null!==e?(Ke.prototype=f(e),i=new Ke,Ke.prototype=null,i[ze]=e):i=qe(),void 0===t?i:We(i,t)},$e=Oe.f,Ze={}.toString,Je="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Qe={f:function(e){return Je&&"[object Window]"==Ze.call(e)?function(e){try{return $e(e)}catch(e){return Je.slice()}}(e):$e(P(e))}},et=K("wks"),tt=l.Symbol,it=Ve?tt:tt&&tt.withoutSetter||X,nt=function(e){return k(et,e)||(Ge&&k(tt,e)?et[e]=tt[e]:et[e]=it("Symbol."+e)),et[e]},ot={f:nt},rt=y.f,st=function(e){var t=le.Symbol||(le.Symbol={});k(t,e)||rt(t,e,{value:ot.f(e)})},at=y.f,lt=nt("toStringTag"),ct=function(e,t,i){e&&!k(e=i?e:e.prototype,lt)&&at(e,lt,{configurable:!0,value:t})},ut=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e},dt=function(e,t,i){if(ut(e),void 0===t)return e;switch(i){case 0:return function(){return e.call(t)};case 1:return function(i){return e.call(t,i)};case 2:return function(i,n){return e.call(t,i,n)};case 3:return function(i,n,o){return e.call(t,i,n,o)}}return function(){return e.apply(t,arguments)}},pt=nt("species"),ht=function(e,t){var i;return Be(e)&&("function"!=typeof(i=e.constructor)||i!==Array&&!Be(i.prototype)?c(i)&&null===(i=i[pt])&&(i=void 0):i=void 0),new(void 0===i?Array:i)(0===t?0:t)},ft=[].push,gt=function(e){var t=1==e,i=2==e,n=3==e,o=4==e,r=6==e,s=5==e||r;return function(a,l,c,u){for(var d,p,h=je(a),f=A(h),g=dt(l,c,3),v=ge(f.length),y=0,m=u||ht,C=t?m(a,v):i?m(a,0):void 0;v>y;y++)if((s||y in f)&&(p=g(d=f[y],y,h),e))if(t)C[y]=p;else if(p)switch(e){case 3:return!0;case 5:return d;case 6:return y;case 2:ft.call(C,d)}else if(o)return!1;return r?-1:n||o?o:C}},vt={forEach:gt(0),map:gt(1),filter:gt(2),some:gt(3),every:gt(4),find:gt(5),findIndex:gt(6)},yt=vt.forEach,mt=Z("hidden"),Ct=nt("toPrimitive"),bt=se.set,wt=se.getterFor("Symbol"),St=Object.prototype,Et=l.Symbol,xt=ue("JSON","stringify"),Ot=L.f,Tt=y.f,Dt=Qe.f,Rt=x.f,At=K("symbols"),_t=K("op-symbols"),Pt=K("string-to-symbol-registry"),Mt=K("symbol-to-string-registry"),kt=K("wks"),Nt=l.QObject,Lt=!Nt||!Nt.prototype||!Nt.prototype.findChild,It=o&&n((function(){return 7!=Xe(Tt({},"a",{get:function(){return Tt(this,"a",{value:7}).a}})).a}))?function(e,t,i){var n=Ot(St,t);n&&delete St[t],Tt(e,t,i),n&&e!==St&&Tt(St,t,n)}:Tt,Ft=function(e,t){var i=At[e]=Xe(Et.prototype);return bt(i,{type:"Symbol",tag:e,description:t}),o||(i.description=t),i},Gt=Ve?function(e){return"symbol"==typeof e}:function(e){return Object(e)instanceof Et},Vt=function(e,t,i){e===St&&Vt(_t,t,i),f(e);var n=g(t,!0);return f(i),k(At,n)?(i.enumerable?(k(e,mt)&&e[mt][n]&&(e[mt][n]=!1),i=Xe(i,{enumerable:O(0,!1)})):(k(e,mt)||Tt(e,mt,O(1,{})),e[mt][n]=!0),It(e,n,i)):Tt(e,n,i)},Bt=function(e,t){f(e);var i=P(t),n=He(i).concat(Ut(i));return yt(n,(function(t){o&&!jt.call(i,t)||Vt(e,t,i[t])})),e},jt=function(e){var t=g(e,!0),i=Rt.call(this,t);return!(this===St&&k(At,t)&&!k(_t,t))&&(!(i||!k(this,t)||!k(At,t)||k(this,mt)&&this[mt][t])||i)},Ht=function(e,t){var i=P(e),n=g(t,!0);if(i!==St||!k(At,n)||k(_t,n)){var o=Ot(i,n);return!o||!k(At,n)||k(i,mt)&&i[mt][n]||(o.enumerable=!0),o}},Wt=function(e){var t=Dt(P(e)),i=[];return yt(t,(function(e){k(At,e)||k(J,e)||i.push(e)})),i}
vendor: 8,450 bytes, line 18
18,Ut=function(e){var t=e===St,i=Dt(t?_t:P(e)),n=[];return yt(i,(function(e){!k(At,e)||t&&!k(St,e)||n.push(At[e])})),n};if(Ge||(ae((Et=function(){if(this instanceof Et)throw TypeError("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,t=X(e),i=function(e){this===St&&i.call(_t,e),k(this,mt)&&k(this[mt],t)&&(this[mt][t]=!1),It(this,t,O(1,e))};return o&&Lt&&It(St,t,{configurable:!0,set:i}),Ft(t,e)}).prototype,"toString",(function(){return wt(this).tag})),ae(Et,"withoutSetter",(function(e){return Ft(X(e),e)})),x.f=jt,y.f=Vt,L.f=Ht,Oe.f=Qe.f=Wt,Te.f=Ut,ot.f=function(e){return Ft(nt(e),e)},o&&(Tt(Et.prototype,"description",{configurable:!0,get:function(){return wt(this).description}}),ae(St,"propertyIsEnumerable",jt,{unsafe:!0}))),Fe({global:!0,wrap:!0,forced:!Ge,sham:!Ge},{Symbol:Et}),yt(He(kt),(function(e){st(e)})),Fe({target:"Symbol",stat:!0,forced:!Ge},{for:function(e){var t=String(e);if(k(Pt,t))return Pt[t];var i=Et(t);return Pt[t]=i,Mt[i]=t,i},keyFor:function(e){if(!Gt(e))throw TypeError(e+" is not a symbol");if(k(Mt,e))return Mt[e]},useSetter:function(){Lt=!0},useSimple:function(){Lt=!1}}),Fe({target:"Object",stat:!0,forced:!Ge,sham:!o},{create:function(e,t){return void 0===t?Xe(e):Bt(Xe(e),t)},defineProperty:Vt,defineProperties:Bt,getOwnPropertyDescriptor:Ht}),Fe({target:"Object",stat:!0,forced:!Ge},{getOwnPropertyNames:Wt,getOwnPropertySymbols:Ut}),Fe({target:"Object",stat:!0,forced:n((function(){Te.f(1)}))},{getOwnPropertySymbols:function(e){return Te.f(je(e))}}),xt){var zt=!Ge||n((function(){var e=Et();return"[null]"!=xt([e])||"{}"!=xt({a:e})||"{}"!=xt(Object(e))}));Fe({target:"JSON",stat:!0,forced:zt},{stringify:function(e,t,i){for(var n,o=[e],r=1;arguments.length>r;)o.push(arguments[r++]);if(n=t,(c(t)||void 0!==e)&&!Gt(e))return Be(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!Gt(t))return t}),o[1]=t,xt.apply(null,o)}})}Et.prototype[Ct]||I(Et.prototype,Ct,Et.prototype.valueOf),ct(Et,"Symbol"),J[mt]=!0;var Kt,Yt,qt=ue("navigator","userAgent")||"",Xt=l.process,$t=Xt&&Xt.versions,Zt=$t&&$t.v8;Zt?Yt=(Kt=Zt.split("."))[0]+Kt[1]:qt&&(!(Kt=qt.match(/Edge\/(\d+)/))||Kt[1]>=74)&&(Kt=qt.match(/Chrome\/(\d+)/))&&(Yt=Kt[1]);var Jt=Yt&&+Yt,Qt=nt("species"),ei=function(e){return Jt>=51||!n((function(){var t=[];return(t.constructor={})[Qt]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},ti=Object.defineProperty,ii={},ni=function(e){throw e},oi=function(e,t){if(k(ii,e))return ii[e];t||(t={});var i=[][e],r=!!k(t,"ACCESSORS")&&t.ACCESSORS,s=k(t,0)?t[0]:ni,a=k(t,1)?t[1]:void 0;return ii[e]=!!i&&!n((function(){if(r&&!o)return!0;var e={length:-1};r?ti(e,1,{enumerable:!0,get:ni}):e[1]=1,i.call(e,s,a)}))},ri=vt.filter,si=ei("filter"),ai=oi("filter");Fe({target:"Array",proto:!0,forced:!si||!ai},{filter:function(e){return ri(this,e,arguments.length>1?arguments[1]:void 0)}});var li=function(e,t){var i=[][e];return!!i&&n((function(){i.call(null,t||function(){throw 1},1)}))},ci=vt.forEach,ui=li("forEach"),di=oi("forEach"),pi=ui&&di?[].forEach:function(e){return ci(this,e,arguments.length>1?arguments[1]:void 0)};Fe({target:"Array",proto:!0,forced:[].forEach!=pi},{forEach:pi});var hi=L.f,fi=n((function(){hi(1)}));Fe({target:"Object",stat:!0,forced:!o||fi,sham:!o},{getOwnPropertyDescriptor:function(e,t){return hi(P(e),t)}});var gi=function(e,t,i){var n=g(t);n in e?y.f(e,n,O(0,i)):e[n]=i};Fe({target:"Object",stat:!0,sham:!o},{getOwnPropertyDescriptors:function(e){for(var t,i,n=P(e),o=L.f,r=De(n),s={},a=0;r.length>a;)void 0!==(i=o(n,t=r[a++]))&&gi(s,t,i);return s}});var vi=n((function(){He(1)}));Fe({target:"Object",stat:!0,forced:vi},{keys:function(e){return He(je(e))}});var yi={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0};for(var mi in yi){var Ci=l[mi],bi=Ci&&Ci.prototype;if(bi&&bi.forEach!==pi)try{I(bi,"forEach",pi)}catch(n){bi.forEach=pi}}function wi(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function Si(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Ei(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Si(Object(i),!0).forEach((function(t){wi(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Si(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var xi=y.f,Oi=l.Symbol;if(o&&"function"==typeof Oi&&(!("description"in Oi.prototype)||void 0!==Oi().description)){var Ti={},Di=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),t=this instanceof Di?new Oi(e):void 0===e?Oi():Oi(e);return""===e&&(Ti[t]=!0),t};Re(Di,Oi);var Ri=Di.prototype=Oi.prototype;Ri.constructor=Di;var Ai=Ri.toString,_i="Symbol(test)"==String(Oi("test")),Pi=/^Symbol\((.*)\)[^)]+$/;xi(Ri,"description",{configurable:!0,get:function(){var e=c(this)?this.valueOf():this,t=Ai.call(e);if(k(Ti,e))return"";var i=_i?t.slice(7,-1):t.replace(Pi,"$1");return""===i?void 0:i}}),Fe({global:!0,forced:!0},{Symbol:Di})}st("iterator");var Mi=nt("isConcatSpreadable"),ki=Jt>=51||!n((function(){var e=[];return e[Mi]=!1,e.concat()[0]!==e})),Ni=ei("concat"),Li=function(e){if(!c(e))return!1;var t=e[Mi];return void 0!==t?!!t:Be(e)};Fe({target:"Array",proto:!0,forced:!ki||!Ni},{concat:function(e){var t,i,n,o,r,s=je(this),a=ht(s,0),l=0;for(t=-1,n=arguments.length;t<n;t++)if(Li(r=-1===t?s:arguments[t])){if(l+(o=ge(r.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(i=0;i<o;i++,l++)i in r&&gi(a,l,r[i])}else{if(l>=9007199254740991)throw TypeError("Maximum allowed index exceeded");gi(a,l++,r)}return a.length=l,a}});var Ii=vt.every,Fi=li("every"),Gi=oi("every");Fe({target:"Array",proto:!0,forced:!Fi||!Gi},{every:function(e){return Ii(this,e,arguments.length>1?arguments[1]:void 0)}});var Vi=nt("unscopables"),Bi=Array.prototype;null==Bi[Vi]&&y.f(Bi,Vi,{configurable:!0,value:Xe(null)});var ji=function(e){Bi[Vi][e]=!0},Hi=vt.find,Wi=!0,Ui=oi("find");"find"in[]&&Array(1).find((function(){Wi=!1})),Fe({target:"Array",proto:!0,forced:Wi||!Ui},{find:function(e){return Hi(this,e,arguments.length>1?arguments[1]:void 0)}}),ji("find");var zi=vt.findIndex,Ki=!0,Yi=oi("findIndex");"findIndex"in[]&&Array(1).findIndex((function(){Ki=!1})),Fe({target:"Array",proto:!0,forced:Ki||!Yi},{findIndex:function(e){return zi(this,e,arguments.length>1?arguments[1]:void 0)}}),ji("findIndex");var qi=function(e,t,i,n){try{return n?t(f(i)[0],i[1]):t(i)}catch(t){var o=e.return;throw void 0!==o&&f(o.call(e)),t}},Xi={},$i=nt("iterator"),Zi=Array.prototype,Ji=function(e){return void 0!==e&&(Xi.Array===e||Zi[$i]===e)},Qi={};Qi[nt("toStringTag")]="z";var en="[object z]"===String(Qi),tn=nt("toStringTag"),nn="Arguments"==D(function(){return arguments}()),on=en?D:function(e){var t,i,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(i=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),tn))?i:nn?D(t):"Object"==(n=D(t))&&"function"==typeof t.callee?"Arguments":n},rn=nt("iterator"),sn=function(e){if(null!=e)return e[rn]||e["@@iterator"]||Xi[on(e)]},an=function(e){var t,i,n,o,r,s,a=je(e),l="function"==typeof this?this:Array,c=arguments.length,u=c>1?arguments[1]:void 0,d=void 0!==u,p=sn(a),h=0;if(d&&(u=dt(u,c>2?arguments[2]:void 0,2)),null==p||l==Array&&Ji(p))for(i=new l(t=ge(a.length));t>h;h++)s=d?u(a[h],h):a[h],gi(i,h,s);else for(r=(o=p.call(a)).next,i=new l;!(n=r.call(o)).done;h++)s=d?qi(o,u,[n.value,h],!0):n.value,gi(i,h,s);return i.length=h,i},ln=nt("iterator"),cn=!1;try{var un=0,dn={next:function(){return{done:!!un++}},return:function(){cn=!0}};dn[ln]=function(){return this},Array.from(dn,(function(){throw 2}))}catch(n){}var pn=function(e,t){if(!t&&!cn)return!1;var i=!1;try{var n={};n[ln]=function(){return{next:function(){return{done:i=!0}
vendor: 14,417 bytes, line 18
18}}},e(n)}catch(e){}return i},hn=!pn((function(e){Array.from(e)}));Fe({target:"Array",stat:!0,forced:hn},{from:an});var fn=be.includes,gn=oi("indexOf",{ACCESSORS:!0,1:0});Fe({target:"Array",proto:!0,forced:!gn},{includes:function(e){return fn(this,e,arguments.length>1?arguments[1]:void 0)}}),ji("includes");var vn=be.indexOf,yn=[].indexOf,mn=!!yn&&1/[1].indexOf(1,-0)<0,Cn=li("indexOf"),bn=oi("indexOf",{ACCESSORS:!0,1:0});Fe({target:"Array",proto:!0,forced:mn||!Cn||!bn},{indexOf:function(e){return mn?yn.apply(this,arguments)||0:vn(this,e,arguments.length>1?arguments[1]:void 0)}});var wn=[].join,Sn=A!=Object,En=li("join",",");Fe({target:"Array",proto:!0,forced:Sn||!En},{join:function(e){return wn.call(P(this),void 0===e?",":e)}});var xn=Math.min,On=[].lastIndexOf,Tn=!!On&&1/[1].lastIndexOf(1,-0)<0,Dn=li("lastIndexOf"),Rn=oi("indexOf",{ACCESSORS:!0,1:0}),An=!Tn&&Dn&&Rn?On:function(e){if(Tn)return On.apply(this,arguments)||0;var t=P(this),i=ge(t.length),n=i-1;for(arguments.length>1&&(n=xn(n,he(arguments[1]))),n<0&&(n=i+n);n>=0;n--)if(n in t&&t[n]===e)return n||0;return-1};Fe({target:"Array",proto:!0,forced:An!==[].lastIndexOf},{lastIndexOf:An});var _n=vt.map,Pn=ei("map"),Mn=oi("map");Fe({target:"Array",proto:!0,forced:!Pn||!Mn},{map:function(e){return _n(this,e,arguments.length>1?arguments[1]:void 0)}});var kn=function(e){return function(t,i,n,o){ut(i);var r=je(t),s=A(r),a=ge(r.length),l=e?a-1:0,c=e?-1:1;if(n<2)for(;;){if(l in s){o=s[l],l+=c;break}if(l+=c,e?l<0:a<=l)throw TypeError("Reduce of empty array with no initial value")}for(;e?l>=0:a>l;l+=c)l in s&&(o=i(o,s[l],l,r));return o}},Nn={left:kn(!1),right:kn(!0)}.left,Ln=li("reduce"),In=oi("reduce",{1:0});Fe({target:"Array",proto:!0,forced:!Ln||!In},{reduce:function(e){return Nn(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}});var Fn=ei("slice"),Gn=oi("slice",{ACCESSORS:!0,0:0,1:2}),Vn=nt("species"),Bn=[].slice,jn=Math.max;Fe({target:"Array",proto:!0,forced:!Fn||!Gn},{slice:function(e,t){var i,n,o,r=P(this),s=ge(r.length),a=me(e,s),l=me(void 0===t?s:t,s);if(Be(r)&&("function"!=typeof(i=r.constructor)||i!==Array&&!Be(i.prototype)?c(i)&&null===(i=i[Vn])&&(i=void 0):i=void 0,i===Array||void 0===i))return Bn.call(r,a,l);for(n=new(void 0===i?Array:i)(jn(l-a,0)),o=0;a<l;a++,o++)a in r&&gi(n,o,r[a]);return n.length=o,n}});var Hn=vt.some,Wn=li("some"),Un=oi("some");Fe({target:"Array",proto:!0,forced:!Wn||!Un},{some:function(e){return Hn(this,e,arguments.length>1?arguments[1]:void 0)}});var zn=ei("splice"),Kn=oi("splice",{ACCESSORS:!0,0:0,1:2}),Yn=Math.max,qn=Math.min;Fe({target:"Array",proto:!0,forced:!zn||!Kn},{splice:function(e,t){var i,n,o,r,s,a,l=je(this),c=ge(l.length),u=me(e,c),d=arguments.length;if(0===d?i=n=0:1===d?(i=0,n=c-u):(i=d-2,n=qn(Yn(he(t),0),c-u)),c+i-n>9007199254740991)throw TypeError("Maximum allowed length exceeded");for(o=ht(l,n),r=0;r<n;r++)(s=u+r)in l&&gi(o,r,l[s]);if(o.length=n,i<n){for(r=u;r<c-n;r++)a=r+i,(s=r+n)in l?l[a]=l[s]:delete l[a];for(r=c;r>c-n+i;r--)delete l[r-1]}else if(i>n)for(r=c-n;r>u;r--)a=r+i-1,(s=r+n-1)in l?l[a]=l[s]:delete l[a];for(r=0;r<i;r++)l[r+u]=arguments[r+2];return l.length=c-n+i,o}}),Fe({global:!0},{globalThis:l});var Xn=Math.sign||function(e){return 0==(e=+e)||e!=e?e:e<0?-1:1};Fe({target:"Math",stat:!0},{sign:Xn});var $n=Math.ceil,Zn=Math.floor;Fe({target:"Math",stat:!0},{trunc:function(e){return(e>0?Zn:$n)(e)}});var Jn=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,i={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(i,[]),t=i instanceof Array}catch(e){}return function(i,n){return f(i),function(e){if(!c(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype")}(n),t?e.call(i,n):i.__proto__=n,i}}():void 0),Qn=function(e,t,i){var n,o;return Jn&&"function"==typeof(n=t.constructor)&&n!==i&&c(o=n.prototype)&&o!==i.prototype&&Jn(e,o),e},eo="\t\n\v\f\r                 \u2028\u2029\ufeff",to="["+eo+"]",io=RegExp("^"+to+to+"*"),no=RegExp(to+to+"*$"),oo=function(e){return function(t){var i=String(_(t));return 1&e&&(i=i.replace(io,"")),2&e&&(i=i.replace(no,"")),i}},ro={start:oo(1),end:oo(2),trim:oo(3)},so=Oe.f,ao=L.f,lo=y.f,co=ro.trim,uo=l.Number,po=uo.prototype,ho="Number"==D(Xe(po)),fo=function(e){var t,i,n,o,r,s,a,l,c=g(e,!1);if("string"==typeof c&&c.length>2)if(43===(t=(c=co(c)).charCodeAt(0))||45===t){if(88===(i=c.charCodeAt(2))||120===i)return NaN}else if(48===t){switch(c.charCodeAt(1)){case 66:case 98:n=2,o=49;break;case 79:case 111:n=8,o=55;break;default:return+c}for(s=(r=c.slice(2)).length,a=0;a<s;a++)if((l=r.charCodeAt(a))<48||l>o)return NaN;return parseInt(r,n)}return+c};if(Le("Number",!uo(" 0o1")||!uo("0b1")||uo("+0x1"))){for(var go,vo=function(e){var t=arguments.length<1?0:e,i=this;return i instanceof vo&&(ho?n((function(){po.valueOf.call(i)})):"Number"!=D(i))?Qn(new uo(fo(t)),i,vo):fo(t)},yo=o?so(uo):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),mo=0;yo.length>mo;mo++)k(uo,go=yo[mo])&&!k(vo,go)&&lo(vo,go,ao(uo,go));vo.prototype=po,po.constructor=vo,ae(l,"Number",vo)}Fe({target:"Number",stat:!0},{isNaN:function(e){return e!=e}});var Co="".repeat||function(e){var t=String(_(this)),i="",n=he(e);if(n<0||n==1/0)throw RangeError("Wrong number of repetitions");for(;n>0;(n>>>=1)&&(t+=t))1&n&&(i+=t);return i},bo=1..toFixed,wo=Math.floor,So=function(e,t,i){return 0===t?i:t%2==1?So(e,t-1,i*e):So(e*e,t/2,i)},Eo=bo&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!n((function(){bo.call({})}));Fe({target:"Number",proto:!0,forced:Eo},{toFixed:function(e){var t,i,n,o,r=function(e){if("number"!=typeof e&&"Number"!=D(e))throw TypeError("Incorrect invocation");return+e}(this),s=he(e),a=[0,0,0,0,0,0],l="",c="0",u=function(e,t){for(var i=-1,n=t;++i<6;)n+=e*a[i],a[i]=n%1e7,n=wo(n/1e7)},d=function(e){for(var t=6,i=0;--t>=0;)i+=a[t],a[t]=wo(i/e),i=i%e*1e7},p=function(){for(var e=6,t="";--e>=0;)if(""!==t||0===e||0!==a[e]){var i=String(a[e]);t=""===t?i:t+Co.call("0",7-i.length)+i}return t};if(s<0||s>20)throw RangeError("Incorrect fraction digits");if(r!=r)return"NaN";if(r<=-1e21||r>=1e21)return String(r);if(r<0&&(l="-",r=-r),r>1e-21)if(i=(t=function(e){for(var t=0,i=e;i>=4096;)t+=12,i/=4096;for(;i>=2;)t+=1,i/=2;return t}(r*So(2,69,1))-69)<0?r*So(2,-t,1):r/So(2,t,1),i*=4503599627370496,(t=52-t)>0){for(u(0,i),n=s;n>=7;)u(1e7,0),n-=7;for(u(So(10,n,1),0),n=t-1;n>=23;)d(1<<23),n-=23;d(1<<n),u(1,1),d(2),c=p()}else u(0,i),u(1<<-t,0),c=p()+Co.call("0",s);return s>0?l+((o=c.length)<=s?"0."+Co.call("0",s-o)+c:c.slice(0,o-s)+"."+c.slice(o-s)):l+c}});var xo=x.f,Oo=function(e){return function(t){for(var i,n=P(t),r=He(n),s=r.length,a=0,l=[];s>a;)i=r[a++],o&&!xo.call(n,i)||l.push(e?[i,n[i]]:n[i]);return l}},To={entries:Oo(!0),values:Oo(!1)},Do=To.entries;Fe({target:"Object",stat:!0},{entries:function(e){return Do(e)}});var Ro=en?{}.toString:function(){return"[object "+on(this)+"]"};en||ae(Object.prototype,"toString",Ro,{unsafe:!0});var Ao=To.values;Fe({target:"Object",stat:!0},{values:function(e){return Ao(e)}});var _o=nt("match"),Po=function(e){var t;return c(e)&&(void 0!==(t=e[_o])?!!t:"RegExp"==D(e))},Mo=function(){var e=f(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t};function ko(e,t){return RegExp(e,t)}var No={UNSUPPORTED_Y:n((function(){var e=ko("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),BROKEN_CARET:n((function(){var e=ko("^r","gy");return e.lastIndex=2,null!=e.exec("str")}))},Lo=nt("species"),Io=y.f,Fo=Oe.f,Go=se.set,Vo=nt("match"),Bo=l.RegExp,jo=Bo.prototype,Ho=/a/g,Wo=/a/g,Uo=new Bo(Ho)!==Ho,zo=No.UNSUPPORTED_Y;if(o&&Le("RegExp",!Uo||zo||n((function(){return Wo[Vo]=!1,Bo(Ho)!=Ho||Bo(Wo)==Wo||"/a/i"!=Bo(Ho,"i")})))){for(var Ko=function(e,t){var i,n=this instanceof Ko,o=Po(e),r=void 0===t;if(!n&&o&&e.constructor===Ko&&r)return e;Uo?o&&!r&&(e=e.source):e instanceof Ko&&(r&&(t=Mo.call(e)),e=e.source),zo&&(i=!!t&&t.indexOf("y")>-1)&&(t=t.replace(/y/g,""));var s=Qn(Uo?new Bo(e,t):Bo(e,t),n?this:jo,Ko);return zo&&i&&Go(s,{sticky:i}),s},Yo=function(e){e in Ko||Io(Ko,e,{configurable:!0,get:function(){return Bo[e]},set:function(t){Bo[e]=t}})},qo=Fo(Bo),Xo=0;qo.length>Xo;)Yo(qo[Xo++]);jo.constructor=Ko,Ko.prototype=jo,ae(l,"RegExp",Ko)}!function(e){var t=ue(e),i=y.f;o&&t&&!t[Lo]&&i(t,Lo,{configurable:!0,get:function(){return this}})}("RegExp");var $o=RegExp.prototype.exec,Zo=String.prototype.replace,Jo=$o,Qo=function(){var e=/a/,t=/b*/g;return $o.call(e,"a"),$o.call(t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),er=No.UNSUPPORTED_Y||No.BROKEN_CARET,tr=void 0!==/()??/.exec("")[1];(Qo||tr||er)&&(Jo=function(e){var t,i,n,o,r=this,s=er&&r.sticky,a=Mo.call(r),l=r.source,c=0,u=e;return s&&(-1===(a=a.replace("y","")).indexOf("g")&&(a+="g"),u=String(e).slice(r.lastIndex),r.lastIndex>0&&(!r.multiline||r.multiline&&"\n"!==e[r.lastIndex-1])&&(l="(?: "+l+")",u=" "+u,c++),i=new RegExp("^(?:"+l+")",a)),tr&&(i=new RegExp("^"+l+"$(?!\\s)",a)),Qo&&(t=r.lastIndex),n=$o.call(s?i:r,u),s?n?(n.input=n.input.slice(c),n[0]=n[0].slice(c),n.index=r.lastIndex,r.lastIndex+=n[0].length):r.lastIndex=0:Qo&&n&&(r.lastIndex=r.global?n.index+n[0].length:t),tr&&n&&n.length>1&&Zo.call(n[0],i,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(n[o]=void 0)})),n});var ir=Jo;Fe({target:"RegExp",proto:!0,forced:/./.exec!==ir},{exec:ir});var nr=RegExp.prototype,or=nr.toString,rr=n((function(){return"/a/b"!=or.call({source:"a",flags:"b"})})),sr="toString"!=or.name;(rr||sr)&&ae(RegExp.prototype,"toString",(function(){var e=f(this),t=String(e.source),i=e.flags;return"/"+t+"/"+String(void 0===i&&e instanceof RegExp&&!("flags"in nr)?Mo.call(e):i)}),{unsafe:!0});var ar=function(e){if(Po(e))throw TypeError("The method doesn't accept regular expressions");return e},lr=nt("match"),cr=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[lr]=!1,"/./"[e](t)}catch(e){}}return!1};Fe({target:"String",proto:!0,forced:!cr("includes")},{includes:function(e){return!!~String(_(this)).indexOf(ar(e),arguments.length>1?arguments[1]:void 0)}});var ur,dr,pr,hr=function(e){return function(t,i){var n,o,r=String(_(t)),s=he(i),a=r.length;return s<0||s>=a?e?"":void 0:(n=r.charCodeAt(s))<55296||n>56319||s+1===a||(o=r.charCodeAt(s+1))<56320||o>57343?e?r.charAt(s):n:e?r.slice(s,s+2):o-56320+(n-55296<<10)+65536}},fr={codeAt:hr(!1),charAt:hr(!0)},gr=!n((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),vr=Z("IE_PROTO"),yr=Object.prototype,mr=gr?Object.getPrototypeOf:function(e){return e=je(e),k(e,vr)?e[vr]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?yr:null},Cr=nt("iterator"),br=!1;[].keys&&("next"in(pr=[].keys())?(dr=mr(mr(pr)))!==Object.prototype&&(ur=dr):br=!0),null==ur&&(ur={}),k(ur,Cr)||I(ur,Cr,(function(){return this}));var wr={IteratorPrototype:ur,BUGGY_SAFARI_ITERATORS:br},Sr=wr.IteratorPrototype,Er=function(){return this},xr=function(e,t,i){var n=t+" Iterator";return e.prototype=Xe(Sr,{next:O(1,i)}),ct(e,n,!1),Xi[n]=Er,e},Or=wr.IteratorPrototype,Tr=wr.BUGGY_SAFARI_ITERATORS,Dr=nt("iterator"),Rr=function(){return this},Ar=function(e,t,i,n,o,r,s){xr(i,t,n);var a,l,c,u=function(e){if(e===o&&g)return g;if(!Tr&&e in h)return h[e];switch(e){case"keys":case"values":case"entries":return function(){return new i(this,e)}}return function(){return new i(this)}},d=t+" Iterator",p=!1,h=e.prototype,f=h[Dr]||h["@@iterator"]||o&&h[o],g=!Tr&&f||u(o),v="Array"==t&&h.entries||f;if(v&&(a=mr(v.call(new e)),Or!==Object.prototype&&a.next&&(mr(a)!==Or&&(Jn?Jn(a,Or):"function"!=typeof a[Dr]&&I(a,Dr,Rr)),ct(a,d,!0))),"values"==o&&f&&"values"!==f.name&&(p=!0,g=function(){return f.call(this)}),h[Dr]!==g&&I(h,Dr,g),Xi[t]=g,o)if(l={values:u("values"),keys:r?g:u("keys"),entries:u("entries")},s)for(c in l)(Tr||p||!(c in h))&&ae(h,c,l[c]);else Fe({target:t,proto:!0,forced:Tr||p},l);return l},_r=fr.charAt,Pr=se.set,Mr=se.getterFor("String Iterator");Ar(String,"String",(function(e){Pr(this,{type:"String Iterator",string:String(e),index:0})}),(function(){var e,t=Mr(this),i=t.string,n=t.index;return n>=i.length?{value:void 0,done:!0}:(e=_r(i,n),t.index+=e.length,{value:e,done:!1})}));var kr=nt("species"),Nr=!n((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),Lr="$0"==="a".replace(/./,"$0"),Ir=nt("replace"),Fr=!!/./[Ir]&&""===/./[Ir]("a","$0"),Gr=!n((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var i="ab".split(e);return 2!==i.length||"a"!==i[0]||"b"!==i[1]})),Vr=function(e,t,i,o){var r=nt(e),s=!n((function(){var t={};return t[r]=function(){return 7},7!=""[e](t)})),a=s&&!n((function(){var t=!1,i=/a/;return"split"===e&&((i={}).constructor={},i.constructor[kr]=function(){return i},i.flags="",i[r]=/./[r]),i.exec=function(){return t=!0,null},i[r](""),!t}));if(!s||!a||"replace"===e&&(!Nr||!Lr||Fr)||"split"===e&&!Gr){var l=/./[r],c=i(r,""[e],(function(e,t,i,n,o){return t.exec===ir?s&&!o?{done:!0,value:l.call(t,i,n)}:{done:!0,value:e.call(i,t,n)}:{done:!1}}),{REPLACE_KEEPS_$0:Lr,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:Fr}),u=c[0],d=c[1];ae(String.prototype,e,u),ae(RegExp.prototype,r,2==t?function(e,t){return d.call(e,this,t)}:function(e){return d.call(e,this)})}o&&I(RegExp.prototype[r],"sham",!0)},Br=fr.charAt,jr=function(e,t,i){return t+(i?Br(e,t).length:1)},Hr=function(e,t){var i=e.exec;if("function"==typeof i){var n=i.call(e,t);if("object"!=typeof n)throw TypeError("RegExp exec method returned something other than an Object or null");return n}if("RegExp"!==D(e))throw TypeError("RegExp#exec called on incompatible receiver");return ir.call(e,t)};Vr("match",1,(function(e,t,i){return[function(t){var i=_(this),n=null==t?void 0:t[e];return void 0!==n?n.call(t,i):new RegExp(t)[e](String(i))},function(e){var n=i(t,e,this);if(n.done)return n.value;var o=f(e),r=String(this);if(!o.global)return Hr(o,r);var s=o.unicode;o.lastIndex=0;for(var a,l=[],c=0;null!==(a=Hr(o,r));){var u=String(a[0]);l[c]=u,""===u&&(o.lastIndex=jr(r,ge(o.lastIndex),s)),c++}return 0===c?null:l}]}));var Wr=Math.max,Ur=Math.min,zr=Math.floor,Kr=/\$([$&'`]|\d\d?|<[^>]*>
vendor: 9,126 bytes, line 18
18)/g,Yr=/\$([$&'`]|\d\d?)/g;Vr("replace",2,(function(e,t,i,n){var o=n.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,r=n.REPLACE_KEEPS_$0,s=o?"$":"$0";return[function(i,n){var o=_(this),r=null==i?void 0:i[e];return void 0!==r?r.call(i,o,n):t.call(String(o),i,n)},function(e,n){if(!o&&r||"string"==typeof n&&-1===n.indexOf(s)){var l=i(t,e,this,n);if(l.done)return l.value}var c=f(e),u=String(this),d="function"==typeof n;d||(n=String(n));var p=c.global;if(p){var h=c.unicode;c.lastIndex=0}for(var g=[];;){var v=Hr(c,u);if(null===v)break;if(g.push(v),!p)break;""===String(v[0])&&(c.lastIndex=jr(u,ge(c.lastIndex),h))}for(var y,m="",C=0,b=0;b<g.length;b++){v=g[b];for(var w=String(v[0]),S=Wr(Ur(he(v.index),u.length),0),E=[],x=1;x<v.length;x++)E.push(void 0===(y=v[x])?y:String(y));var O=v.groups;if(d){var T=[w].concat(E,S,u);void 0!==O&&T.push(O);var D=String(n.apply(void 0,T))}else D=a(w,u,S,E,O,n);S>=C&&(m+=u.slice(C,S)+D,C=S+w.length)}return m+u.slice(C)}];function a(e,i,n,o,r,s){var a=n+e.length,l=o.length,c=Yr;return void 0!==r&&(r=je(r),c=Kr),t.call(s,c,(function(t,s){var c;switch(s.charAt(0)){case"$":return"$";case"&":return e;case"`":return i.slice(0,n);case"'":return i.slice(a);case"<":c=r[s.slice(1,-1)];break;default:var u=+s;if(0===u)return t;if(u>l){var d=zr(u/10);return 0===d?t:d<=l?void 0===o[d-1]?s.charAt(1):o[d-1]+s.charAt(1):t}c=o[u-1]}return void 0===c?"":c}))}}));var qr=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};Vr("search",1,(function(e,t,i){return[function(t){var i=_(this),n=null==t?void 0:t[e];return void 0!==n?n.call(t,i):new RegExp(t)[e](String(i))},function(e){var n=i(t,e,this);if(n.done)return n.value;var o=f(e),r=String(this),s=o.lastIndex;qr(s,0)||(o.lastIndex=0);var a=Hr(o,r);return qr(o.lastIndex,s)||(o.lastIndex=s),null===a?-1:a.index}]}));var Xr=nt("species"),$r=[].push,Zr=Math.min,Jr=!n((function(){return!RegExp(4294967295,"y")}));Vr("split",2,(function(e,t,i){var n;return n="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,i){var n=String(_(this)),o=void 0===i?4294967295:i>>>0;if(0===o)return[];if(void 0===e)return[n];if(!Po(e))return t.call(n,e,o);for(var r,s,a,l=[],c=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),u=0,d=new RegExp(e.source,c+"g");(r=ir.call(d,n))&&!((s=d.lastIndex)>u&&(l.push(n.slice(u,r.index)),r.length>1&&r.index<n.length&&$r.apply(l,r.slice(1)),a=r[0].length,u=s,l.length>=o));)d.lastIndex===r.index&&d.lastIndex++;return u===n.length?!a&&d.test("")||l.push(""):l.push(n.slice(u)),l.length>o?l.slice(0,o):l}:"0".split(void 0,0).length?function(e,i){return void 0===e&&0===i?[]:t.call(this,e,i)}:t,[function(t,i){var o=_(this),r=null==t?void 0:t[e];return void 0!==r?r.call(t,o,i):n.call(String(o),t,i)},function(e,o){var r=i(n,e,this,o,n!==t);if(r.done)return r.value;var s=f(e),a=String(this),l=function(e,t){var i,n=f(e).constructor;return void 0===n||null==(i=f(n)[Xr])?t:ut(i)}(s,RegExp),c=s.unicode,u=(s.ignoreCase?"i":"")+(s.multiline?"m":"")+(s.unicode?"u":"")+(Jr?"y":"g"),d=new l(Jr?s:"^(?:"+s.source+")",u),p=void 0===o?4294967295:o>>>0;if(0===p)return[];if(0===a.length)return null===Hr(d,a)?[a]:[];for(var h=0,g=0,v=[];g<a.length;){d.lastIndex=Jr?g:0;var y,m=Hr(d,Jr?a:a.slice(g));if(null===m||(y=Zr(ge(d.lastIndex+(Jr?0:g)),a.length))===h)g=jr(a,g,c);else{if(v.push(a.slice(h,g)),v.length===p)return v;for(var C=1;C<=m.length-1;C++)if(v.push(m[C]),v.length===p)return v;g=h=y}}return v.push(a.slice(h)),v}]}),!Jr);var Qr,es=L.f,ts="".startsWith,is=Math.min,ns=cr("startsWith"),os=!(ns||(Qr=es(String.prototype,"startsWith"),!Qr||Qr.writable));Fe({target:"String",proto:!0,forced:!os&&!ns},{startsWith:function(e){var t=String(_(this));ar(e);var i=ge(is(arguments.length>1?arguments[1]:void 0,t.length)),n=String(e);return ts?ts.call(t,n,i):t.slice(i,i+n.length)===n}});var rs=ro.trim;Fe({target:"String",proto:!0,forced:function(e){return n((function(){return!!eo[e]()||"​…᠎"!="​…᠎"[e]()||eo[e].name!==e}))}("trim")},{trim:function(){return rs(this)}});var ss=function(e,t,i){for(var n in t)ae(e,n,t[n],i);return e},as=!n((function(){return Object.isExtensible(Object.preventExtensions({}))})),ls=s((function(e){var t=y.f,i=X("meta"),n=0,o=Object.isExtensible||function(){return!0},r=function(e){t(e,i,{value:{objectID:"O"+ ++n,weakData:{}}})},s=e.exports={REQUIRED:!1,fastKey:function(e,t){if(!c(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!k(e,i)){if(!o(e))return"F";if(!t)return"E";r(e)}return e[i].objectID},getWeakData:function(e,t){if(!k(e,i)){if(!o(e))return!0;if(!t)return!1;r(e)}return e[i].weakData},onFreeze:function(e){return as&&s.REQUIRED&&o(e)&&!k(e,i)&&r(e),e}};J[i]=!0})),cs=s((function(e){var t=function(e,t){this.stopped=e,this.result=t};(e.exports=function(e,i,n,o,r){var s,a,l,c,u,d,p,h=dt(i,n,o?2:1);if(r)s=e;else{if("function"!=typeof(a=sn(e)))throw TypeError("Target is not iterable");if(Ji(a)){for(l=0,c=ge(e.length);c>l;l++)if((u=o?h(f(p=e[l])[0],p[1]):h(e[l]))&&u instanceof t)return u;return new t(!1)}s=a.call(e)}for(d=s.next;!(p=d.call(s)).done;)if("object"==typeof(u=qi(s,h,p.value,o))&&u&&u instanceof t)return u;return new t(!1)}).stop=function(e){return new t(!0,e)}})),us=function(e,t,i){if(!(e instanceof t))throw TypeError("Incorrect "+(i?i+" ":"")+"invocation");return e},ds=ls.getWeakData,ps=se.set,hs=se.getterFor,fs=vt.find,gs=vt.findIndex,vs=0,ys=function(e){return e.frozen||(e.frozen=new ms)},ms=function(){this.entries=[]},Cs=function(e,t){return fs(e.entries,(function(e){return e[0]===t}))};ms.prototype={get:function(e){var t=Cs(this,e);if(t)return t[1]},has:function(e){return!!Cs(this,e)},set:function(e,t){var i=Cs(this,e);i?i[1]=t:this.entries.push([e,t])},delete:function(e){var t=gs(this.entries,(function(t){return t[0]===e}));return~t&&this.entries.splice(t,1),!!~t}};var bs={getConstructor:function(e,t,i,n){var o=e((function(e,r){us(e,o,t),ps(e,{type:t,id:vs++,frozen:void 0}),null!=r&&cs(r,e[n],e,i)})),r=hs(t),s=function(e,t,i){var n=r(e),o=ds(f(t),!0);return!0===o?ys(n).set(t,i):o[n.id]=i,e};return ss(o.prototype,{delete:function(e){var t=r(this);if(!c(e))return!1;var i=ds(e);return!0===i?ys(t).delete(e):i&&k(i,t.id)&&delete i[t.id]},has:function(e){var t=r(this);if(!c(e))return!1;var i=ds(e);return!0===i?ys(t).has(e):i&&k(i,t.id)}}),ss(o.prototype,i?{get:function(e){var t=r(this);if(c(e)){var i=ds(e);return!0===i?ys(t).get(e):i?i[t.id]:void 0}},set:function(e,t){return s(this,e,t)}}:{add:function(e){return s(this,e,!0)}}),o}},ws=(s((function(e){var t,i=se.enforce,o=!l.ActiveXObject&&"ActiveXObject"in l,r=Object.isExtensible,s=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},a=e.exports=function(e,t,i){var o=-1!==e.indexOf("Map"),r=-1!==e.indexOf("Weak"),s=o?"set":"add",a=l[e],u=a&&a.prototype,d=a,p={},h=function(e){var t=u[e];ae(u,e,"add"==e?function(e){return t.call(this,0===e?0:e),this}:"delete"==e?function(e){return!(r&&!c(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return r&&!c(e)?void 0:t.call(this,0===e?0:e)}:"has"==e?function(e){return!(r&&!c(e))&&t.call(this,0===e?0:e)}:function(e,i){return t.call(this,0===e?0:e,i),this})};if(Le(e,"function"!=typeof a||!(r||u.forEach&&!n((function(){(new a).entries().next()})))))d=i.getConstructor(t,e,o,s),ls.REQUIRED=!0;else if(Le(e,!0)){var f=new d,g=f[s](r?{}:-0,1)!=f,v=n((function(){f.has(1)})),y=pn((function(e){new a(e)})),m=!r&&n((function(){for(var e=new a,t=5;t--;)e[s](t,t);return!e.has(-0)}));y||((d=t((function(t,i){us(t,d,e);var n=Qn(new a,t,d);return null!=i&&cs(i,n[s],n,o),n}))).prototype=u,u.constructor=d),(v||m)&&(h("delete"),h("has"),o&&h("get")),(m||g)&&h(s),r&&u.clear&&delete u.clear}return p[e]=d,Fe({global:!0,forced:d!=a},p),ct(d,e),r||i.setStrong(d,e,o),d}("WeakMap",s,bs);if(z&&o){t=bs.getConstructor(s,"WeakMap",!0),ls.REQUIRED=!0;var u=a.prototype,d=u.delete,p=u.has,h=u.get,f=u.set;ss(u,{delete:function(e){if(c(e)&&!r(e)){var n=i(this);return n.frozen||(n.frozen=new t),d.call(this,e)||n.frozen.delete(e)}return d.call(this,e)},has:function(e){if(c(e)&&!r(e)){var n=i(this);return n.frozen||(n.frozen=new t),p.call(this,e)||n.frozen.has(e)}return p.call(this,e)},get:function(e){if(c(e)&&!r(e)){var n=i(this);return n.frozen||(n.frozen=new t),p.call(this,e)?h.call(this,e):n.frozen.get(e)}return h.call(this,e)},set:function(e,n){if(c(e)&&!r(e)){var o=i(this);o.frozen||(o.frozen=new t),p.call(this,e)?f.call(this,e,n):o.frozen.set(e,n)}else f.call(this,e,n);return this}})}})),se.set),Ss=se.getterFor("Array Iterator"),Es=Ar(Array,"Array",(function(e,t){ws(this,{type:"Array Iterator",target:P(e),index:0,kind:t})}),(function(){var e=Ss(this),t=e.target,i=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==i?{value:n,done:!1}:"values"==i?{value:t[n],done:!1}:{value:[n,t[n]],done:!1}}),"values");Xi.Arguments=Xi.Array,ji("keys"),ji("values"),ji("entries");var xs=nt("iterator"),Os=nt("toStringTag"),Ts=Es.values;for(var Ds in yi){var Rs=l[Ds],As=Rs&&Rs.prototype;
vendor: 10,108 bytes, line 18
18if(As){if(As[xs]!==Ts)try{I(As,xs,Ts)}catch(n){As[xs]=Ts}if(As[Os]||I(As,Os,Ds),yi[Ds])for(var _s in Es)if(As[_s]!==Es[_s])try{I(As,_s,Es[_s])}catch(n){As[_s]=Es[_s]}}}var Ps=nt("iterator"),Ms=!n((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,i="";return e.pathname="c%20d",t.forEach((function(e,n){t.delete("b"),i+=n+e})),!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[Ps]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==i||"x"!==new URL("http://x",void 0).host})),ks=Object.assign,Ns=Object.defineProperty,Ls=!ks||n((function(){if(o&&1!==ks({b:1},ks(Ns({},"a",{enumerable:!0,get:function(){Ns(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},i=Symbol(),n="abcdefghijklmnopqrst";return e[i]=7,n.split("").forEach((function(e){t[e]=e})),7!=ks({},e)[i]||He(ks({},t)).join("")!=n}))?function(e,t){for(var i=je(e),n=arguments.length,r=1,s=Te.f,a=x.f;n>r;)for(var l,c=A(arguments[r++]),u=s?He(c).concat(s(c)):He(c),d=u.length,p=0;d>p;)l=u[p++],o&&!a.call(c,l)||(i[l]=c[l]);return i}:ks,Is=/[^\0-\u007E]/,Fs=/[.\u3002\uFF0E\uFF61]/g,Gs="Overflow: input needs wider integers to process",Vs=Math.floor,Bs=String.fromCharCode,js=function(e){return e+22+75*(e<26)},Hs=function(e,t,i){var n=0;for(e=i?Vs(e/700):e>>1,e+=Vs(e/t);e>455;n+=36)e=Vs(e/35);return Vs(n+36*e/(e+38))},Ws=function(e){var t,i,n=[],o=(e=function(e){for(var t=[],i=0,n=e.length;i<n;){var o=e.charCodeAt(i++);if(o>=55296&&o<=56319&&i<n){var r=e.charCodeAt(i++);56320==(64512&r)?t.push(((1023&o)<<10)+(1023&r)+65536):(t.push(o),i--)}else t.push(o)}return t}(e)).length,r=128,s=0,a=72;for(t=0;t<e.length;t++)(i=e[t])<128&&n.push(Bs(i));var l=n.length,c=l;for(l&&n.push("-");c<o;){var u=2147483647;for(t=0;t<e.length;t++)(i=e[t])>=r&&i<u&&(u=i);var d=c+1;if(u-r>Vs((2147483647-s)/d))throw RangeError(Gs);for(s+=(u-r)*d,r=u,t=0;t<e.length;t++){if((i=e[t])<r&&++s>2147483647)throw RangeError(Gs);if(i==r){for(var p=s,h=36;;h+=36){var f=h<=a?1:h>=a+26?26:h-a;if(p<f)break;var g=p-f,v=36-f;n.push(Bs(js(f+g%v))),p=Vs(g/v)}n.push(Bs(js(p))),a=Hs(s,d,c==l),s=0,++c}}++s,++r}return n.join("")},Us=function(e){var t=sn(e);if("function"!=typeof t)throw TypeError(String(e)+" is not iterable");return f(t.call(e))},zs=ue("fetch"),Ks=ue("Headers"),Ys=nt("iterator"),qs=se.set,Xs=se.getterFor("URLSearchParams"),$s=se.getterFor("URLSearchParamsIterator"),Zs=/\+/g,Js=Array(4),Qs=function(e){return Js[e-1]||(Js[e-1]=RegExp("((?:%[\\da-f]{2}){"+e+"})","gi"))},ea=function(e){try{return decodeURIComponent(e)}catch(o){return e}},ta=function(e){var t=e.replace(Zs," "),i=4;try{return decodeURIComponent(t)}catch(e){for(;i;)t=t.replace(Qs(i--),ea);return t}},ia=/[!'()~]|%20/g,na={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},oa=function(e){return na[e]},ra=function(e){return encodeURIComponent(e).replace(ia,oa)},sa=function(e,t){if(t)for(var i,n,o=t.split("&"),r=0;r<o.length;)(i=o[r++]).length&&(n=i.split("="),e.push({key:ta(n.shift()),value:ta(n.join("="))}))},aa=function(e){this.entries.length=0,sa(this.entries,e)},la=function(e,t){if(e<t)throw TypeError("Not enough arguments")},ca=xr((function(e,t){qs(this,{type:"URLSearchParamsIterator",iterator:Us(Xs(e).entries),kind:t})}),"Iterator",(function(){var e=$s(this),t=e.kind,i=e.iterator.next(),n=i.value;return i.done||(i.value="keys"===t?n.key:"values"===t?n.value:[n.key,n.value]),i})),ua=function(){us(this,ua,"URLSearchParams");var e,t,i,n,o,r,s,a,l,u=arguments.length>0?arguments[0]:void 0,d=this,p=[];if(qs(d,{type:"URLSearchParams",entries:p,updateURL:function(){},updateSearchParams:aa}),void 0!==u)if(c(u))if("function"==typeof(e=sn(u)))for(i=(t=e.call(u)).next;!(n=i.call(t)).done;){if((s=(r=(o=Us(f(n.value))).next).call(o)).done||(a=r.call(o)).done||!r.call(o).done)throw TypeError("Expected sequence with length 2");p.push({key:s.value+"",value:a.value+""})}else for(l in u)k(u,l)&&p.push({key:l,value:u[l]+""});else sa(p,"string"==typeof u?"?"===u.charAt(0)?u.slice(1):u:u+"")},da=ua.prototype;ss(da,{append:function(e,t){la(arguments.length,2);var i=Xs(this);i.entries.push({key:e+"",value:t+""}),i.updateURL()},delete:function(e){la(arguments.length,1);for(var t=Xs(this),i=t.entries,n=e+"",o=0;o<i.length;)i[o].key===n?i.splice(o,1):o++;t.updateURL()},get:function(e){la(arguments.length,1);for(var t=Xs(this).entries,i=e+"",n=0;n<t.length;n++)if(t[n].key===i)return t[n].value;return null},getAll:function(e){la(arguments.length,1);for(var t=Xs(this).entries,i=e+"",n=[],o=0;o<t.length;o++)t[o].key===i&&n.push(t[o].value);return n},has:function(e){la(arguments.length,1);for(var t=Xs(this).entries,i=e+"",n=0;n<t.length;)if(t[n++].key===i)return!0;return!1},set:function(e,t){la(arguments.length,1);for(var i,n=Xs(this),o=n.entries,r=!1,s=e+"",a=t+"",l=0;l<o.length;l++)(i=o[l]).key===s&&(r?o.splice(l--,1):(r=!0,i.value=a));r||o.push({key:s,value:a}),n.updateURL()},sort:function(){var e,t,i,n=Xs(this),o=n.entries,r=o.slice();for(o.length=0,i=0;i<r.length;i++){for(e=r[i],t=0;t<i;t++)if(o[t].key>e.key){o.splice(t,0,e);break}t===i&&o.push(e)}n.updateURL()},forEach:function(e){for(var t,i=Xs(this).entries,n=dt(e,arguments.length>1?arguments[1]:void 0,3),o=0;o<i.length;)n((t=i[o++]).value,t.key,this)},keys:function(){return new ca(this,"keys")},values:function(){return new ca(this,"values")},entries:function(){return new ca(this,"entries")}},{enumerable:!0}),ae(da,Ys,da.entries),ae(da,"toString",(function(){for(var e,t=Xs(this).entries,i=[],n=0;n<t.length;)e=t[n++],i.push(ra(e.key)+"="+ra(e.value));return i.join("&")}),{enumerable:!0}),ct(ua,"URLSearchParams"),Fe({global:!0,forced:!Ms},{URLSearchParams:ua}),Ms||"function"!=typeof zs||"function"!=typeof Ks||Fe({global:!0,enumerable:!0,forced:!0},{fetch:function(e){var t,i,n,o=[e];return arguments.length>1&&(c(t=arguments[1])&&(i=t.body,"URLSearchParams"===on(i)&&((n=t.headers?new Ks(t.headers):new Ks).has("content-type")||n.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),t=Xe(t,{body:O(0,String(i)),headers:O(0,n)}))),o.push(t)),zs.apply(this,o)}});var pa,ha={URLSearchParams:ua,getState:Xs},fa=fr.codeAt,ga=l.URL,va=ha.URLSearchParams,ya=ha.getState,ma=se.set,Ca=se.getterFor("URL"),ba=Math.floor,wa=Math.pow,Sa=/[A-Za-z]/,Ea=/[\d+-.A-Za-z]/,xa=/\d/,Oa=/^(0x|0X)/,Ta=/^[0-7]+$/,Da=/^\d+$/,Ra=/^[\dA-Fa-f]+$/,Aa=/[\u0000\u0009\u000A\u000D #%/:?@[\\]]/,_a=/[\u0000\u0009\u000A\u000D #/:?@[\\]]/,Pa=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,Ma=/[\u0009\u000A\u000D]/g,ka=function(e,t){var i,n,o;if("["==t.charAt(0)){if("]"!=t.charAt(t.length-1))return"Invalid host";if(!(i=La(t.slice(1,-1))))return"Invalid host";e.host=i}else if(Wa(e)){if(t=function(e){var t,i,n=[],o=e.toLowerCase().replace(Fs,".").split(".");for(t=0;t<o.length;t++)i=o[t],n.push(Is.test(i)?"xn--"+Ws(i):i);return n.join(".")}(t),Aa.test(t))return"Invalid host";if(null===(i=Na(t)))return"Invalid host";e.host=i}else{if(_a.test(t))return"Invalid host";for(i="",n=an(t),o=0;o<n.length;o++)i+=ja(n[o],Fa);e.host=i}},Na=function(e){var t,i,n,o,r,s,a,l=e.split(".");if(l.length&&""==l[l.length-1]&&l.pop(),(t=l.length)>4)return e;for(i=[],n=0;n<t;n++){if(""==(o=l[n]))return e;if(r=10,o.length>1&&"0"==o.charAt(0)&&(r=Oa.test(o)?16:8,o=o.slice(8==r?1:2)),""===o)s=0;else{if(!(10==r?Da:8==r?Ta:Ra).test(o))return e;s=parseInt(o,r)}i.push(s)}for(n=0;n<t;n++)if(s=i[n],n==t-1){if(s>=wa(256,5-t))return null}else if(s>255)return null;for(a=i.pop(),n=0;n<i.length;n++)a+=i[n]*wa(256,3-n);return a},La=function(e){var t,i,n,o,r,s,a,l=[0,0,0,0,0,0,0,0],c=0,u=null,d=0,p=function(){return e.charAt(d)};if(":"==p()){if(":"!=e.charAt(1))return;d+=2,u=++c}for(;p();){if(8==c)return;if(":"!=p()){for(t=i=0;i<4&&Ra.test(p());)t=16*t+parseInt(p(),16),d++,i++;if("."==p()){if(0==i)return;if(d-=i,c>6)return;for(n=0;p();){if(o=null,n>0){if(!("."==p()&&n<4))return;d++}if(!xa.test(p()))return;for(;xa.test(p());){if(r=parseInt(p(),10),null===o)o=r;else{if(0==o)return;o=10*o+r}if(o>255)return;d++}l[c]=256*l[c]+o,2!=++n&&4!=n||c++}if(4!=n)return;break}if(":"==p()){if(d++,!p())return}else if(p())return;l[c++]=t}else{if(null!==u)return;d++,u=++c}}if(null!==u)for(s=c-u,c=7;0!=c&&s>0;)a=l[c],l[c--]=l[u+s-1],l[u+--s]=a;else if(8!=c)return;return l},Ia=function(e){var t,i,n,o;if("number"==typeof e){for(t=[],i=0;i<4;i++)t.unshift(e%256),e=ba(e/256);return t.join(".")}if("object"==typeof e){for(t="",n=function(e){for(var t=null,i=1,n=null,o=0,r=0;r<8;r++)0!==e[r]?(o>i&&(t=n,i=o),n=null,o=0):(null===n&&(n=r),++o);return o>i&&(t=n,i=o),t}(e),i=0;i<8;i++)o&&0===e[i]||(o&&(o=!1),n===i?(t+=i?":":"::",o=!0):(t+=e[i].toString(16),i<7&&(t+=":")));return"["+t+"]"}return e},Fa={},Ga=Ls({},Fa,{" ":1,'"':1,"<":1,">":1,"`":1}),Va=Ls({},Ga,{"#":1,"?":1,"{":1,"}":1}),Ba=Ls({},Va,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),ja=function(e,t){var i=fa(e,0);return i>32&&i<127&&!k(t,e)?e:encodeURIComponent(e)},Ha={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Wa=function(e){return k(Ha,e.scheme)},Ua=function(e){return""!=e.username||""!=e.password},za=function(e){return!e.host||e.cannotBeABaseURL||"file"==e.scheme},Ka=function(e,t){var i;return 2==e.length&&Sa.test(e.charAt(0))&&(":"==(i=e.charAt(1))||!t&&"|"==i)},Ya=function(e){var t;return e.length>1&&Ka(e.slice(0,2))&&(2==e.length||"/"===(t=e.charAt(2))||"\\"===t||"?"===t||"#"===t)},qa=function(e){var t=e.path,i=t.length;!i||"file"==e.scheme&&1==i&&Ka(t[0],!0)||t.pop()},Xa=function(e){return"."===e||"%2e"===e.toLowerCase()},$a={},Za={},Ja={},Qa={},el={},tl={},il={},nl={},ol={},rl={},sl={},al={},ll={},cl={},ul={},dl={},pl={},hl={},fl={},gl={},vl={},yl=function(e,t,i,n){var o,r,s,a,l,c=i||$a,u=0,d="",p=!1,h=!1,f=!1;for(i||(e.scheme="",e.username="",e.password="",e.host=null,e.port=null,e.path=[],e.query=null,e.fragment=null,e.cannotBeABaseURL=!1,t=t.replace(Pa,"")),t=t.replace(Ma,""),o=an(t);u<=o.length;){switch(r=o[u],c){case $a:if(!r||!Sa.test(r)){if(i)return"Invalid scheme";c=Ja;continue}
vendor: 8,362 bytes, line 18
18d+=r.toLowerCase(),c=Za;break;case Za:if(r&&(Ea.test(r)||"+"==r||"-"==r||"."==r))d+=r.toLowerCase();else{if(":"!=r){if(i)return"Invalid scheme";d="",c=Ja,u=0;continue}if(i&&(Wa(e)!=k(Ha,d)||"file"==d&&(Ua(e)||null!==e.port)||"file"==e.scheme&&!e.host))return;if(e.scheme=d,i)return void(Wa(e)&&Ha[e.scheme]==e.port&&(e.port=null));d="","file"==e.scheme?c=cl:Wa(e)&&n&&n.scheme==e.scheme?c=Qa:Wa(e)?c=nl:"/"==o[u+1]?(c=el,u++):(e.cannotBeABaseURL=!0,e.path.push(""),c=fl)}break;case Ja:if(!n||n.cannotBeABaseURL&&"#"!=r)return"Invalid scheme";if(n.cannotBeABaseURL&&"#"==r){e.scheme=n.scheme,e.path=n.path.slice(),e.query=n.query,e.fragment="",e.cannotBeABaseURL=!0,c=vl;break}c="file"==n.scheme?cl:tl;continue;case Qa:if("/"!=r||"/"!=o[u+1]){c=tl;continue}c=ol,u++;break;case el:if("/"==r){c=rl;break}c=hl;continue;case tl:if(e.scheme=n.scheme,r==pa)e.username=n.username,e.password=n.password,e.host=n.host,e.port=n.port,e.path=n.path.slice(),e.query=n.query;else if("/"==r||"\\"==r&&Wa(e))c=il;else if("?"==r)e.username=n.username,e.password=n.password,e.host=n.host,e.port=n.port,e.path=n.path.slice(),e.query="",c=gl;else{if("#"!=r){e.username=n.username,e.password=n.password,e.host=n.host,e.port=n.port,e.path=n.path.slice(),e.path.pop(),c=hl;continue}e.username=n.username,e.password=n.password,e.host=n.host,e.port=n.port,e.path=n.path.slice(),e.query=n.query,e.fragment="",c=vl}break;case il:if(!Wa(e)||"/"!=r&&"\\"!=r){if("/"!=r){e.username=n.username,e.password=n.password,e.host=n.host,e.port=n.port,c=hl;continue}c=rl}else c=ol;break;case nl:if(c=ol,"/"!=r||"/"!=d.charAt(u+1))continue;u++;break;case ol:if("/"!=r&&"\\"!=r){c=rl;continue}break;case rl:if("@"==r){p&&(d="%40"+d),p=!0,s=an(d);for(var g=0;g<s.length;g++){var v=s[g];if(":"!=v||f){var y=ja(v,Ba);f?e.password+=y:e.username+=y}else f=!0}d=""}else if(r==pa||"/"==r||"?"==r||"#"==r||"\\"==r&&Wa(e)){if(p&&""==d)return"Invalid authority";u-=an(d).length+1,d="",c=sl}else d+=r;break;case sl:case al:if(i&&"file"==e.scheme){c=dl;continue}if(":"!=r||h){if(r==pa||"/"==r||"?"==r||"#"==r||"\\"==r&&Wa(e)){if(Wa(e)&&""==d)return"Invalid host";if(i&&""==d&&(Ua(e)||null!==e.port))return;if(a=ka(e,d))return a;if(d="",c=pl,i)return;continue}"["==r?h=!0:"]"==r&&(h=!1),d+=r}else{if(""==d)return"Invalid host";if(a=ka(e,d))return a;if(d="",c=ll,i==al)return}break;case ll:if(!xa.test(r)){if(r==pa||"/"==r||"?"==r||"#"==r||"\\"==r&&Wa(e)||i){if(""!=d){var m=parseInt(d,10);if(m>65535)return"Invalid port";e.port=Wa(e)&&m===Ha[e.scheme]?null:m,d=""}if(i)return;c=pl;continue}return"Invalid port"}d+=r;break;case cl:if(e.scheme="file","/"==r||"\\"==r)c=ul;else{if(!n||"file"!=n.scheme){c=hl;continue}if(r==pa)e.host=n.host,e.path=n.path.slice(),e.query=n.query;else if("?"==r)e.host=n.host,e.path=n.path.slice(),e.query="",c=gl;else{if("#"!=r){Ya(o.slice(u).join(""))||(e.host=n.host,e.path=n.path.slice(),qa(e)),c=hl;continue}e.host=n.host,e.path=n.path.slice(),e.query=n.query,e.fragment="",c=vl}}break;case ul:if("/"==r||"\\"==r){c=dl;break}n&&"file"==n.scheme&&!Ya(o.slice(u).join(""))&&(Ka(n.path[0],!0)?e.path.push(n.path[0]):e.host=n.host),c=hl;continue;case dl:if(r==pa||"/"==r||"\\"==r||"?"==r||"#"==r){if(!i&&Ka(d))c=hl;else if(""==d){if(e.host="",i)return;c=pl}else{if(a=ka(e,d))return a;if("localhost"==e.host&&(e.host=""),i)return;d="",c=pl}continue}d+=r;break;case pl:if(Wa(e)){if(c=hl,"/"!=r&&"\\"!=r)continue}else if(i||"?"!=r)if(i||"#"!=r){if(r!=pa&&(c=hl,"/"!=r))continue}else e.fragment="",c=vl;else e.query="",c=gl;break;case hl:if(r==pa||"/"==r||"\\"==r&&Wa(e)||!i&&("?"==r||"#"==r)){if(".."===(l=(l=d).toLowerCase())||"%2e."===l||".%2e"===l||"%2e%2e"===l?(qa(e),"/"==r||"\\"==r&&Wa(e)||e.path.push("")):Xa(d)?"/"==r||"\\"==r&&Wa(e)||e.path.push(""):("file"==e.scheme&&!e.path.length&&Ka(d)&&(e.host&&(e.host=""),d=d.charAt(0)+":"),e.path.push(d)),d="","file"==e.scheme&&(r==pa||"?"==r||"#"==r))for(;e.path.length>1&&""===e.path[0];)e.path.shift();"?"==r?(e.query="",c=gl):"#"==r&&(e.fragment="",c=vl)}else d+=ja(r,Va);break;case fl:"?"==r?(e.query="",c=gl):"#"==r?(e.fragment="",c=vl):r!=pa&&(e.path[0]+=ja(r,Fa));break;case gl:i||"#"!=r?r!=pa&&("'"==r&&Wa(e)?e.query+="%27":e.query+="#"==r?"%23":ja(r,Fa)):(e.fragment="",c=vl);break;case vl:r!=pa&&(e.fragment+=ja(r,Ga))}u++}},ml=function(e){var t,i,n=us(this,ml,"URL"),r=arguments.length>1?arguments[1]:void 0,s=String(e),a=ma(n,{type:"URL"});if(void 0!==r)if(r instanceof ml)t=Ca(r);else if(i=yl(t={},String(r)))throw TypeError(i);if(i=yl(a,s,null,t))throw TypeError(i);var l=a.searchParams=new va,c=ya(l);c.updateSearchParams(a.query),c.updateURL=function(){a.query=String(l)||null},o||(n.href=bl.call(n),n.origin=wl.call(n),n.protocol=Sl.call(n),n.username=El.call(n),n.password=xl.call(n),n.host=Ol.call(n),n.hostname=Tl.call(n),n.port=Dl.call(n),n.pathname=Rl.call(n),n.search=Al.call(n),n.searchParams=_l.call(n),n.hash=Pl.call(n))},Cl=ml.prototype,bl=function(){var e=Ca(this),t=e.scheme,i=e.username,n=e.password,o=e.host,r=e.port,s=e.path,a=e.query,l=e.fragment,c=t+":";return null!==o?(c+="//",Ua(e)&&(c+=i+(n?":"+n:"")+"@"),c+=Ia(o),null!==r&&(c+=":"+r)):"file"==t&&(c+="//"),c+=e.cannotBeABaseURL?s[0]:s.length?"/"+s.join("/"):"",null!==a&&(c+="?"+a),null!==l&&(c+="#"+l),c},wl=function(){var e=Ca(this),t=e.scheme,i=e.port;if("blob"==t)try{return new URL(t.path[0]).origin}catch(e){return"null"}return"file"!=t&&Wa(e)?t+"://"+Ia(e.host)+(null!==i?":"+i:""):"null"},Sl=function(){return Ca(this).scheme+":"},El=function(){return Ca(this).username},xl=function(){return Ca(this).password},Ol=function(){var e=Ca(this),t=e.host,i=e.port;return null===t?"":null===i?Ia(t):Ia(t)+":"+i},Tl=function(){var e=Ca(this).host;return null===e?"":Ia(e)},Dl=function(){var e=Ca(this).port;return null===e?"":String(e)},Rl=function(){var e=Ca(this),t=e.path;return e.cannotBeABaseURL?t[0]:t.length?"/"+t.join("/"):""},Al=function(){var e=Ca(this).query;return e?"?"+e:""},_l=function(){return Ca(this).searchParams},Pl=function(){var e=Ca(this).fragment;return e?"#"+e:""},Ml=function(e,t){return{get:e,set:t,configurable:!0,enumerable:!0}};if(o&&We(Cl,{href:Ml(bl,(function(e){var t=Ca(this),i=String(e),n=yl(t,i);if(n)throw TypeError(n);ya(t.searchParams).updateSearchParams(t.query)})),origin:Ml(wl),protocol:Ml(Sl,(function(e){var t=Ca(this);yl(t,String(e)+":",$a)})),username:Ml(El,(function(e){var t=Ca(this),i=an(String(e));if(!za(t)){t.username="";for(var n=0;n<i.length;n++)t.username+=ja(i[n],Ba)}})),password:Ml(xl,(function(e){var t=Ca(this),i=an(String(e));if(!za(t)){t.password="";for(var n=0;n<i.length;n++)t.password+=ja(i[n],Ba)}})),host:Ml(Ol,(function(e){var t=Ca(this);t.cannotBeABaseURL||yl(t,String(e),sl)})),hostname:Ml(Tl,(function(e){var t=Ca(this);t.cannotBeABaseURL||yl(t,String(e),al)})),port:Ml(Dl,(function(e){var t=Ca(this);za(t)||(""==(e=String(e))?t.port=null:yl(t,e,ll))})),pathname:Ml(Rl,(function(e){var t=Ca(this);t.cannotBeABaseURL||(t.path=[],yl(t,e+"",pl))})),search:Ml(Al,(function(e){var t=Ca(this);""==(e=String(e))?t.query=null:("?"==e.charAt(0)&&(e=e.slice(1)),t.query="",yl(t,e,gl)),ya(t.searchParams).updateSearchParams(t.query)})),searchParams:Ml(_l),hash:Ml(Pl,(function(e){var t=Ca(this);""!=(e=String(e))?("#"==e.charAt(0)&&(e=e.slice(1)),t.fragment="",yl(t,e,vl)):t.fragment=null}))}),ae(Cl,"toJSON",(function(){return bl.call(this)}),{enumerable:!0}),ae(Cl,"toString",(function(){return bl.call(this)}),{enumerable:!0}),ga){var kl=ga.createObjectURL,Nl=ga.revokeObjectURL;kl&&ae(ml,"createObjectURL",(function(e){return kl.apply(ga,arguments)})),Nl&&ae(ml,"revokeObjectURL",(function(e){return Nl.apply(ga,arguments)}))}function Ll(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Il(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Fl(e,t,i){return t&&Il(e.prototype,t),i&&Il(e,i),e}function Gl(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function Vl(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Bl(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};
vendor: 10,894 bytes, lines 18-19
18t%2?Vl(Object(i),!0).forEach((function(t){Gl(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Vl(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function jl(e,t){if(null==e)return{};var i,n,o=function(e,t){if(null==e)return{};var i,n,o={},r=Object.keys(e);for(n=0;n<r.length;n++)i=r[n],t.indexOf(i)>=0||(o[i]=e[i]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n<r.length;n++)i=r[n],t.indexOf(i)>=0||Object.prototype.propertyIsEnumerable.call(e,i)&&(o[i]=e[i])}return o}function Hl(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var i=[],n=!0,o=!1,r=void 0;try{for(var s,a=e[Symbol.iterator]();!(n=(s=a.next()).done)&&(i.push(s.value),!t||i.length!==t);n=!0);}catch(e){o=!0,r=e}finally{try{n||null==a.return||a.return()}finally{if(o)throw r}}return i}}(e,t)||Ul(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Wl(e){return function(e){if(Array.isArray(e))return zl(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Ul(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ul(e,t){if(e){if("string"==typeof e)return zl(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?zl(e,t):void 0}}function zl(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}function Kl(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Yl(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function ql(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Xl(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?ql(Object(i),!0).forEach((function(t){Yl(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):ql(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}ct(ml,"URL"),Fe({global:!0,forced:!Ms,sham:!o},{URL:ml});var $l={addCSS:!0,thumbWidth:15,watch:!0};function Zl(e,t){return function(){return Array.from(document.querySelectorAll(t)).includes(this)}.call(e,t)}var Jl=function(e){return null!=e?e.constructor:null},Ql=function(e,t){return!!(e&&t&&e instanceof t)},ec=function(e){return null==e},tc=function(e){return Jl(e)===Object},ic=function(e){return Jl(e)===String},nc=function(e){return Array.isArray(e)},oc=function(e){return Ql(e,NodeList)},rc=ic,sc=nc,ac=oc,lc=function(e){return Ql(e,Element)},cc=function(e){return Ql(e,Event)},uc=function(e){return ec(e)||(ic(e)||nc(e)||oc(e))&&!e.length||tc(e)&&!Object.keys(e).length};function dc(e,t){if(1>t){var i=function(e){var t="".concat(e).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return t?Math.max(0,(t[1]?t[1].length:0)-(t[2]?+t[2]:0)):0}(t);return parseFloat(e.toFixed(i))}return Math.round(e/t)*t}var pc,hc,fc,gc=function(){function e(t,i){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),lc(t)?this.element=t:rc(t)&&(this.element=document.querySelector(t)),lc(this.element)&&uc(this.element.rangeTouch)&&(this.config=Xl({},$l,{},i),this.init())}return function(e,t,i){t&&Kl(e.prototype,t),i&&Kl(e,i)}(e,[{key:"init",value:function(){e.enabled&&(this.config.addCSS&&(this.element.style.userSelect="none",this.element.style.webKitUserSelect="none",this.element.style.touchAction="manipulation"),this.listeners(!0),this.element.rangeTouch=this)}},{key:"destroy",value:function(){e.enabled&&(this.config.addCSS&&(this.element.style.userSelect="",this.element.style.webKitUserSelect="",this.element.style.touchAction=""),this.listeners(!1),this.element.rangeTouch=null)}},{key:"listeners",value:function(e){var t=this,i=e?"addEventListener":"removeEventListener";["touchstart","touchmove","touchend"].forEach((function(e){t.element[i](e,(function(e){return t.set(e)}),!1)}))}},{key:"get",value:function(t){if(!e.enabled||!cc(t))return null;var i,n=t.target,o=t.changedTouches[0],r=parseFloat(n.getAttribute("min"))||0,s=parseFloat(n.getAttribute("max"))||100,a=parseFloat(n.getAttribute("step"))||1,l=n.getBoundingClientRect(),c=100/l.width*(this.config.thumbWidth/2)/100;return 0>(i=100/l.width*(o.clientX-l.left))?i=0:100<i&&(i=100),50>i?i-=(100-2*i)*c:50<i&&(i+=2*(i-50)*c),r+dc(i/100*(s-r),a)}},{key:"set",value:function(t){e.enabled&&cc(t)&&!t.target.disabled&&(t.preventDefault(),t.target.value=this.get(t),function(e,t){if(e&&t){var i=new Event(t,{bubbles:!0});e.dispatchEvent(i)}}(t.target,"touchend"===t.type?"change":"input"))}}],[{key:"setup",value:function(t){var i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=null;if(uc(t)||rc(t)?n=Array.from(document.querySelectorAll(rc(t)?t:'input[type="range"]')):lc(t)?n=[t]:ac(t)?n=Array.from(t):sc(t)&&(n=t.filter(lc)),uc(n))return null;var o=Xl({},$l,{},i);if(rc(t)&&o.watch){var r=new MutationObserver((function(i){Array.from(i).forEach((function(i){Array.from(i.addedNodes).forEach((function(i){lc(i)&&Zl(i,t)&&new e(i,o)}))}))}));r.observe(document.body,{childList:!0,subtree:!0})}return n.map((function(t){return new e(t,i)}))}},{key:"enabled",get:function(){return"ontouchstart"in document.documentElement}}]),e}(),vc=function(e){return null!=e?e.constructor:null},yc=function(e,t){return Boolean(e&&t&&e instanceof t)},mc=function(e){return null==e},Cc=function(e){return vc(e)===Object},bc=function(e){return vc(e)===String},wc=function(e){return vc(e)===Function},Sc=function(e){return Array.isArray(e)},Ec=function(e){return yc(e,NodeList)},xc=function(e){return mc(e)||(bc(e)||Sc(e)||Ec(e))&&!e.length||Cc(e)&&!Object.keys(e).length},Oc=mc,Tc=Cc,Dc=function(e){return vc(e)===Number&&!Number.isNaN(e)},Rc=bc,Ac=function(e){return vc(e)===Boolean},_c=wc,Pc=Sc,Mc=Ec,kc=function(e){return yc(e,Element)},Nc=function(e){return yc(e,Event)},Lc=function(e){return yc(e,KeyboardEvent)},Ic=function(e){return yc(e,TextTrack)||!mc(e)&&bc(e.kind)},Fc=function(e){return yc(e,Promise)&&wc(e.then)},Gc=function(e){if(yc(e,window.URL))return!0;if(!bc(e))return!1;var t=e;e.startsWith("http://")&&e.startsWith("https://")||(t="http://".concat(e));try{return!xc(new URL(t).hostname)}catch(e){return!1}},Vc=xc,Bc=(pc=document.createElement("span"),hc={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},fc=Object.keys(hc).find((function(e){return void 0!==pc.style[e]})),!!Rc(fc)&&hc[fc]);function jc(e,t){setTimeout((function(){try{e.hidden=!0,e.offsetHeight,e.hidden=!1}catch(e){}}),t)}var Hc={isIE:/* @cc_on!@ */
19!!document.documentMode,isEdge:window.navigator.userAgent.includes("Edge"),isWebkit:"WebkitAppearance"in document.documentElement.style&&!/Edge/.test(navigator.userAgent),isIPhone:/(iPhone|iPod)/gi.test(navigator.platform),isIos:/(iPad|iPhone|iPod)/gi.test(navigator.platform)};function Wc(e,t){return t.split(".").reduce((function(e,t){return e&&e[t]}),e)}function Uc(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];if(!i.length)return e;var o=i.shift();return Tc(o)?(Object.keys(o).forEach((function(t){Tc(o[t])?(Object.keys(e).includes(t)||Object.assign(e,Gl({},t,{})),Uc(e[t],o[t])):Object.assign(e,Gl({},t,o[t]))})),Uc.apply(void 0,[e].concat(i))):e}function zc(e,t){var i=e.length?e:[e];Array.from(i).reverse().forEach((function(e,i){var n=i>0?t.cloneNode(!0):t,o=e.parentNode,r=e.nextSibling;n.appendChild(e),r?o.insertBefore(n,r):o.appendChild(n)}))}function Kc(e,t){kc(e)&&!Vc(t)&&Object.entries(t).filter((function(e){var t=Hl(e,2)[1];return!Oc(t)})).forEach((function(t){var i=Hl(t,2),n=i[0],o=i[1];return e.setAttribute(n,o)}))}function Yc(e,t,i){var n=document.createElement(e);return Tc(t)&&Kc(n,t),Rc(i)&&(n.innerText=i),n}function qc(e,t,i,n){kc(t)&&t.appendChild(Yc(e,i,n))}function Xc(e){Mc(e)||Pc(e)?Array.from(e).forEach(Xc):kc(e)&&kc(e.parentNode)&&e.parentNode.removeChild(e)}function $c(e){if(kc(e))for(var t=e.childNodes.length;t>0;)e.removeChild(e.lastChild),t-=1}function Zc(e,t){return kc(t)&&kc(t.parentNode)&&kc(e)?(t.parentNode.replaceChild(e,t),e):null}function Jc(e,t){if(!Rc(e)||Vc(e))return{};var i={},n=Uc({},t);return e.split(",").forEach((function(e){var t=e.trim(),o=t.replace(".",""),r=t.replace(/[[\]]/g,"").split("="),s=Hl(r,1)[0],a=r.length>1?r[1].replace(/["']/g,""):"";switch(t.charAt(0)){case".":Rc(n.class)?i.class="".concat(n.class," ").concat(o):i.class=o;break;case"#":i.id=t.replace("#","");break;case"[":i[s]=a}})),Uc(n,i)}function Qc(e,t){if(kc(e)){var i=t;Ac(i)||(i=!e.hidden),e.hidden=i}}function eu(e,t,i){if(Mc(e))return Array.from(e).map((function(e){return eu(e,t,i)}));if(kc(e)){var n="toggle";return void 0!==i&&(n=i?"add":"remove"),e.classList[n](t),e.classList.contains(t)}return!1}function tu(e,t){return kc(e)&&e.classList.contains(t)}function iu(e,t){var i=Element.prototype;return(i.matches||i.webkitMatchesSelector||i.mozMatchesSelector||i.msMatchesSelector||function(){return Array.from(document.querySelectorAll(t)).includes(this)}).call(e,t)}function nu(e){return this.elements.container.querySelectorAll(e)}function ou(e){return this.elements.container.querySelector(e)}function ru(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];kc(e)&&(e.focus({preventScroll:!0}),t&&eu(e,this.config.classNames.tabFocus))}var su={"audio/ogg":"vorbis","audio/wav":"1","video/webm":"vp8, vorbis","video/mp4":"avc1.42E01E, mp4a.40.2","video/ogg":"theora"},au={audio:"canPlayType"in document.createElement("audio"),video:"canPlayType"in document.createElement("video"),check:function(e,t,i){var n=Hc.isIPhone&&i&&au.playsinline,o=au[e]||"html5"!==t;return{api:o,ui:o&&au.rangeInput&&("video"!==e||!Hc.isIPhone||n)}},pip:!(Hc.isIPhone||!_c(Yc("video").webkitSetPresentationMode)&&(!document.pictureInPictureEnabled||Yc("video").disablePictureInPicture)),airplay:_c(window.WebKitPlaybackTargetAvailabilityEvent),playsinline:"playsInl
19ine"in document.createElement("video"),mime:function(e){if(Vc(e))return!1;var t=Hl(e.split("/"),1)[0],i=e;if(!this.isHTML5||t!==this.type)return!1;Object.keys(su).includes(i)&&(i+='; codecs="'.concat(su[e],'"'));try{return Boolean(i&&this.media.canPlayType(i).replace(/no/,""))}catch(e){return!1}},textTracks:"textTracks"in document.createElement("video"),rangeInput:function(){var e=document.createElement("input");return e.type="range","range"===e.type}(),touch:"ontouchstart"in document.documentElement,transitions:!1!==Bc,reducedMotion:"matchMedia"in window&&window.matchMedia("(prefers-reduced-motion)").matches},lu=function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){return e=!0,null}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(e){}return e}();function cu(e,t,i){var n=this,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],s=arguments.length>5&&void 0!==arguments[5]&&arguments[5];if(e&&"addEventListener"in e&&!Vc(t)&&_c(i)){var a=t.split(" "),l=s;lu&&(l={passive:r,capture:s}),a.forEach((function(t){n&&n.eventListeners&&o&&n.eventListeners.push({element:e,type:t,callback:i,options:l}),e[o?"addEventListener":"removeEventListener"](t,i,l)}))}}function uu(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2?arguments[2]:void 0,n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];cu.call(this,e,t,i,!0,n,o)}function du(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2?arguments[2]:void 0,n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];cu.call(this,e,t,i,!1,n,o)}function pu(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],r=arguments.length>4&&void 0!==arguments[4]&&arguments[4],s=function s(){du(e,i,s,o,r);for(var a=arguments.length,l=new Array(a),c=0;c<a;c++)l[c]=arguments[c];n.apply(t,l)};cu.call(this,e,i,s,!0,o,r)}function hu(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(kc(e)&&!Vc(t)){var o=new CustomEvent(t,{bubbles:i,detail:Bl(Bl({},n),{},{plyr:this})});e.dispatchEvent(o)}}function fu(){this&&this.eventListeners&&(this.eventListeners.forEach((function(e){var t=e.element,i=e.type,n=e.callback,o=e.options;t.removeEventListener(i,n,o)})),this.eventListeners=[])}function gu(){var e=this;return new Promise((function(t){return e.ready?setTimeout(t,0):uu.call(e,e.elements.container,"ready",t)})).then((function(){}))}function vu(e){Fc(e)&&e.then(null,(function(){}))}function yu(e){return!!(Pc(e)||Rc(e)&&e.includes(":"))&&(Pc(e)?e:e.split(":")).map(Number).every(Dc)}function mu(e){if(!Pc(e)||!e.every(Dc))return null;var t=Hl(e,2),i=t[0],n=t[1],o=function e(t,i){return 0===i?t:e(i,t%i)}(i,n);return[i/o,n/o]}function Cu(e){var t=function(e){return yu(e)?e.split(":").map(Number):null},i=t(e);if(null===i&&(i=t(this.config.ratio)),null===i&&!Vc(this.embed)&&Pc(this.embed.ratio)&&(i=this.embed.ratio),null===i&&this.isHTML5){var n=this.media;i=mu([n.videoWidth,n.videoHeight])}return i}function bu(e){if(!this.isVideo)return{};var t=this.elements.wrapper,i=Cu.call(this,e),n=Hl(Pc(i)?i:[0,0],2),o=100/n[0]*n[1];if(t.style.paddingBottom="".concat(o,"%"),this.isVimeo&&!this.config.vimeo.premium&&this.supported.ui){var r=100/this.media.offsetWidth*parseInt(window.getComputedStyle(this.media).paddingBottom,10),s=(r-o)/(r/50);this.fullscreen.active?t.style.paddingBottom=null:this.media.style.transform="translateY(-".concat(s,"%)")}else this.isHTML5&&t.classList.toggle(this.config.classNames.videoFixedRatio,null!==i);return{padding:o,ratio:i}}var wu={getSources:function(){var e=this;return this.isHTML5?Array.from(this.media.querySelectorAll("source")).filter((function(t){var i=t.getAttribute("type");return!!Vc(i)||au.mime.call(e,i)})):[]},getQualityOptions:function(){return this.config.quality.forced?this.config.quality.options:wu.getSources.call(this).map((function(e){return Number(e.getAttribute("size"))}
vendor: 21,364 bytes, line 19
19)).filter(Boolean)},setup:function(){if(this.isHTML5){var e=this;e.options.speed=e.config.speed.options,Vc(this.config.ratio)||bu.call(e),Object.defineProperty(e.media,"quality",{get:function(){var t=wu.getSources.call(e).find((function(t){return t.getAttribute("src")===e.source}));return t&&Number(t.getAttribute("size"))},set:function(t){if(e.quality!==t){if(e.config.quality.forced&&_c(e.config.quality.onChange))e.config.quality.onChange(t);else{var i=wu.getSources.call(e).find((function(e){return Number(e.getAttribute("size"))===t}));if(!i)return;var n=e.media,o=n.currentTime,r=n.paused,s=n.preload,a=n.readyState,l=n.playbackRate;e.media.src=i.getAttribute("src"),("none"!==s||a)&&(e.once("loadedmetadata",(function(){e.speed=l,e.currentTime=o,r||vu(e.play())})),e.media.load())}hu.call(e,e.media,"qualitychange",!1,{quality:t})}}})}},cancelRequests:function(){this.isHTML5&&(Xc(wu.getSources.call(this)),this.media.setAttribute("src",this.config.blankVideo),this.media.load(),this.debug.log("Cancelled network requests"))}};function Su(e){return Pc(e)?e.filter((function(t,i){return e.indexOf(t)===i})):e}function Eu(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];return Vc(e)?e:e.toString().replace(/{(\d+)}/g,(function(e,t){return i[t].toString()}))}var xu=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return e.replace(new RegExp(t.toString().replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1"),"g"),i.toString())},Ou=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.toString().replace(/\w\S*/g,(function(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()}))};function Tu(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=e.toString();return t=xu(t,"-"," "),t=xu(t,"_"," "),t=Ou(t),xu(t," ","")}function Du(e){var t=document.createElement("div");return t.appendChild(e),t.innerHTML}var Ru={pip:"PIP",airplay:"AirPlay",html5:"HTML5",vimeo:"Vimeo",youtube:"YouTube"},Au=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Vc(e)||Vc(t))return"";var i=Wc(t.i18n,e);if(Vc(i))return Object.keys(Ru).includes(e)?Ru[e]:"";var n={"{seektime}":t.seekTime,"{title}":t.title};return Object.entries(n).forEach((function(e){var t=Hl(e,2),n=t[0],o=t[1];i=xu(i,n,o)})),i},_u=function(){function e(t){Ll(this,e),this.enabled=t.config.storage.enabled,this.key=t.config.storage.key}return Fl(e,[{key:"get",value:function(t){if(!e.supported||!this.enabled)return null;var i=window.localStorage.getItem(this.key);if(Vc(i))return null;var n=JSON.parse(i);return Rc(t)&&t.length?n[t]:n}},{key:"set",value:function(t){if(e.supported&&this.enabled&&Tc(t)){var i=this.get();Vc(i)&&(i={}),Uc(i,t),window.localStorage.setItem(this.key,JSON.stringify(i))}}}],[{key:"supported",get:function(){try{if(!("localStorage"in window))return!1;var e="___test";return window.localStorage.setItem(e,e),window.localStorage.removeItem(e),!0}catch(e){return!1}}}]),e}();function Pu(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"text";return new Promise((function(i,n){try{var o=new XMLHttpRequest;if(!("withCredentials"in o))return;o.addEventListener("load",(function(){if("text"===t)try{i(JSON.parse(o.responseText))}catch(e){i(o.responseText)}else i(o.response)})),o.addEventListener("error",(function(){throw new Error(o.status)})),o.open("GET",e,!0),o.responseType=t,o.send()}catch(e){n(e)}}))}function Mu(e,t){if(Rc(e)){var i="cache",n=Rc(t),o=function(){return null!==document.getElementById(t)},r=function(e,t){e.innerHTML=t,n&&o()||document.body.insertAdjacentElement("afterbegin",e)};if(!n||!o()){var s=_u.supported,a=document.createElement("div");if(a.setAttribute("hidden",""),n&&a.setAttribute("id",t),s){var l=window.localStorage.getItem("".concat(i,"-").concat(t));if(null!==l){var c=JSON.parse(l);r(a,c.content)}}Pu(e).then((function(e){Vc(e)||(s&&window.localStorage.setItem("".concat(i,"-").concat(t),JSON.stringify({content:e})),r(a,e))})).catch((function(){}))}}}var ku=function(e){return Math.trunc(e/60/60%60,10)},Nu=function(e){return Math.trunc(e/60%60,10)},Lu=function(e){return Math.trunc(e%60,10)};function Iu(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!Dc(e))return Iu(void 0,t,i);var n=function(e){return"0".concat(e).slice(-2)},o=ku(e),r=Nu(e),s=Lu(e);return o=t||o>0?"".concat(o,":"):"","".concat(i&&e>0?"-":"").concat(o).concat(n(r),":").concat(n(s))}var Fu={getIconUrl:function(){var e=new URL(this.config.iconUrl,window.location).host!==window.location.host||Hc.isIE&&!window.svg4everybody;return{url:this.config.iconUrl,cors:e}},findElements:function(){try{return this.elements.controls=ou.call(this,this.config.selectors.controls.wrapper),this.elements.buttons={play:nu.call(this,this.config.selectors.buttons.play),pause:ou.call(this,this.config.selectors.buttons.pause),restart:ou.call(this,this.config.selectors.buttons.restart),rewind:ou.call(this,this.config.selectors.buttons.rewind),fastForward:ou.call(this,this.config.selectors.buttons.fastForward),mute:ou.call(this,this.config.selectors.buttons.mute),pip:ou.call(this,this.config.selectors.buttons.pip),airplay:ou.call(this,this.config.selectors.buttons.airplay),settings:ou.call(this,this.config.selectors.buttons.settings),captions:ou.call(this,this.config.selectors.buttons.captions),fullscreen:ou.call(this,this.config.selectors.buttons.fullscreen)},this.elements.progress=ou.call(this,this.config.selectors.progress),this.elements.inputs={seek:ou.call(this,this.config.selectors.inputs.seek),volume:ou.call(this,this.config.selectors.inputs.volume)},this.elements.display={buffer:ou.call(this,this.config.selectors.display.buffer),currentTime:ou.call(this,this.config.selectors.display.currentTime),duration:ou.call(this,this.config.selectors.display.duration)},kc(this.elements.progress)&&(this.elements.display.seekTooltip=this.elements.progress.querySelector(".".concat(this.config.classNames.tooltip))),!0}catch(n){return this.debug.warn("It looks like there is a problem with your custom controls HTML",n),this.toggleNativeControls(!0),!1}},createIcon:function(e,t){var i="http://www.w3.org/2000/svg",n=Fu.getIconUrl.call(this),o="".concat(n.cors?"":n.url,"#").concat(this.config.iconPrefix),r=document.createElementNS(i,"svg");Kc(r,Uc(t,{"aria-hidden":"true",focusable:"false"}));var s=document.createElementNS(i,"use"),a="".concat(o,"-").concat(e);return"href"in s&&s.setAttributeNS("http://www.w3.org/1999/xlink","href",a),s.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a),r.appendChild(s),r},createLabel:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=Au(e,this.config),n=Bl(Bl({},t),{},{class:[t.class,this.config.classNames.hidden].filter(Boolean).join(" ")});return Yc("span",n,i)},createBadge:function(e){if(Vc(e))return null;var t=Yc("span",{class:this.config.classNames.menu.value});return t.appendChild(Yc("span",{class:this.config.classNames.menu.badge},e)),t},createButton:function(e,t){var i=this,n=Uc({},t),o=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toString();return(e=Tu(e)).charAt(0).toLowerCase()+e.slice(1)}(e),r={element:"button",toggle:!1,label:null,icon:null,labelPressed:null,iconPressed:null};switch(["element","icon","label"].forEach((function(e){Object.keys(n).includes(e)&&(r[e]=n[e],delete n[e])})),"button"!==r.element||Object.keys(n).includes("type")||(n.type="button"),Object.keys(n).includes("class")?n.class.split(" ").some((function(e){return e===i.config.classNames.control}))||Uc(n,{class:"".concat(n.class," ").concat(this.config.classNames.control)}):n.class=this.config.classNames.control,e){case"play":r.toggle=!0,r.label="play",r.labelPressed="pause",r.icon="play",r.iconPressed="pause";break;case"mute":r.toggle=!0,r.label="mute",r.labelPressed="unmute",r.icon="volume",r.iconPressed="muted";break;case"captions":r.toggle=!0,r.label="enableCaptions",r.labelPressed="disableCaptions",r.icon="captions-off",r.iconPressed="captions-on";break;case"fullscreen":r.toggle=!0,r.label="enterFullscreen",r.labelPressed="exitFullscreen",r.icon="enter-fullscreen",r.iconPressed="exit-fullscreen";break;case"play-large":n.class+=" ".concat(this.config.classNames.control,"--overlaid"),o="play",r.label="play",r.icon="play";break;default:Vc(r.label)&&(r.label=o),Vc(r.icon)&&(r.icon=e)}var s=Yc(r.element);return r.toggle?(s.appendChild(Fu.createIcon.call(this,r.iconPressed,{class:"icon--pressed"})),s.appendChild(Fu.createIcon.call(this,r.icon,{class:"icon--not-pressed"})),s.appendChild(Fu.createLabel.call(this,r.labelPressed,{class:"label--pressed"})),s.appendChild(Fu.createLabel.call(this,r.label,{class:"label--not-pressed"}))):(s.appendChild(Fu.createIcon.call(this,r.icon)),s.appendChild(Fu.createLabel.call(this,r.label))),Uc(n,Jc(this.config.selectors.buttons[o],n)),Kc(s,n),"play"===o?(Pc(this.elements.buttons[o])||(this.elements.buttons[o]=[]),this.elements.buttons[o].push(s)):this.elements.buttons[o]=s,s},createRange:function(e,t){var i=Yc("input",Uc(Jc(this.config.selectors.inputs[e]),{type:"range",min:0,max:100,step:.01,value:0,autocomplete:"off",role:"slider","aria-label":Au(e,this.config),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":0},t));return this.elements.inputs[e]=i,Fu.updateRangeFill.call(this,i),gc.setup(i),i},createProgress:function(e,t){var i=Yc("progress",Uc(Jc(this.config.selectors.display[e]),{min:0,max:100,value:0,role:"progressbar","aria-hidden":!0},t));if("volume"!==e){i.appendChild(Yc("span",null,"0"));var n={played:"played",buffer:"buffered"}[e],o=n?Au(n,this.config):"";i.innerText="% ".concat(o.toLowerCase())}return this.elements.display[e]=i,i},createTime:function(e,t){var i=Jc(this.config.selectors.display[e],t),n=Yc("div",Uc(i,{class:"".concat(i.class?i.class:""," ").concat(this.config.classNames.display.time," ").trim(),"aria-label":Au(e,this.config)}),"00:00");return this.elements.display[e]=n,n},bindMenuItemShortcuts:function(e,t){var i=this;uu.call(this,e,"keydown keyup",(function(n){if([32,38,39,40].includes(n.which)&&(n.preventDefault(),n.stopPropagation(),"keydown"!==n.type)){var o,r=iu(e,'[role="menuitemradio"]');!r&&[32,39].includes(n.which)?Fu.showMenuPanel.call(i,t,!0):32!==n.which&&(40===n.which||r&&39===n.which?(o=e.nextElementSibling,kc(o)||(o=e.parentNode.firstElementChild)):(o=e.previousElementSibling,kc(o)||(o=e.parentNode.lastElementChild)),ru.call(i,o,!0))}}),!1),uu.call(this,e,"keyup",(function(e){13===e.which&&Fu.focusFirstMenuItem.call(i,null,!0)}))},createMenuItem:function(e){var t=this,i=e.value,n=e.list,o=e.type,r=e.title,s=e.badge,a=void 0===s?null:s,l=e.checked,c=void 0!==l&&l,u=Jc(this.config.selectors.inputs[o]),d=Yc("button",Uc(u,{type:"button",role:"menuitemradio",class:"".concat(this.config.classNames.control," ").concat(u.class?u.class:"").trim(),"aria-checked":c,value:i})),p=Yc("span");p.innerHTML=r,kc(a)&&p.appendChild(a),d.appendChild(p),Object.defineProperty(d,"checked",{enumerable:!0,get:function(){return"true"===d.getAttribute("aria-checked")},set:function(e){e&&Array.from(d.parentNode.children).filter((function(e){return iu(e,'[role="menuitemradio"]')})).forEach((function(e){return e.setAttribute("aria-checked","false")})),d.setAttribute("aria-checked",e?"true":"false")}}),this.listeners.bind(d,"click keyup",(function(e){if(!Lc(e)||32===e.which){switch(e.preventDefault(),e.stopPropagation(),d.checked=!0,o){case"language":t.currentTrack=Number(i);break;case"quality":t.quality=i;break;case"speed":t.speed=parseFloat(i)}Fu.showMenuPanel.call(t,"home",Lc(e))}}),o,!1),Fu.bindMenuItemShortcuts.call(this,d,o),n.appendChild(d)},formatTime:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!Dc(e))return e;var i=ku(this.duration)>0;return Iu(e,i,t)},updateTimeDisplay:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];kc(e)&&Dc(t)&&(e.innerText=Fu.formatTime(t,i))},updateVolume:function(){this.supported.ui&&(kc(this.elements.inputs.volume)&&Fu.setRange.call(this,this.elements.inputs.volume,this.muted?0:this.volume),kc(this.elements.buttons.mute)&&(this.elements.buttons.mute.pressed=this.muted||0===this.volume))},setRange:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;kc(e)&&(e.value=t,Fu.updateRangeFill.call(this,e))},updateProgress:function(e){var t=this;if(this.supported.ui&&Nc(e)){var i=0;if(e)switch(e.type){case"timeupdate":case"seeking":case"seeked":i=function(e,t){return 0===e||0===t||Number.isNaN(e)||Number.isNaN(t)?0:(e/t*100).toFixed(2)}(this.currentTime,this.duration),"timeupdate"===e.type&&Fu.setRange.call(this,this.elements.inputs.seek,i);break;case"playing":case"progress":!function(e,i){var n=Dc(i)?i:0,o=kc(e)?e:t.elements.display.buffer;if(kc(o)){o.value=n;var r=o.getElementsByTagName("span")[0];kc(r)&&(r.childNodes[0].nodeValue=n)}}(this.elements.display.buffer,100*this.buffered)}}},updateRangeFill:function(e){var t=Nc(e)?e.target:e;if(kc(t)&&"range"===t.getAttribute("type")){if(iu(t,this.config.selectors.inputs.seek)){t.setAttribute("aria-valuenow",this.currentTime);var i=Fu.formatTime(this.currentTime),n=Fu.formatTime(this.duration),o=Au("seekLabel",this.config);t.setAttribute("aria-valuetext",o.replace("{currentTime}",i).replace("{duration}",n))}else if(iu(t,this.config.selectors.inputs.volume)){var r=100*t.value;t.setAttribute("aria-valuenow",r),t.setAttribute("aria-valuetext","".concat(r.toFixed(1),"%"))}else t.setAttribute("aria-valuenow",t.value);Hc.isWebkit&&t.style.setProperty("--value","".concat(t.value/t.max*100,"%"))}},updateSeekTooltip:function(e){var t=this;if(this.config.tooltips.seek&&kc(this.elements.inputs.seek)&&kc(this.elements.display.seekTooltip)&&0!==this.duration){var i="".concat(this.config.classNames.tooltip,"--visible"),n=function(e){return eu(t.elements.display.seekTooltip,i,e)};if(this.touch)n(!1);else{var o=0,r=this.elements.progress.getBoundingClientRect();if(Nc(e))o=100/r.width*(e.pageX-r.left);else{if(!tu(this.elements.display.seekTooltip,i))return;o=parseFloat(this.elements.display.seekTooltip.style.left,10)}o<0?o=0:o>100&&(o=100),Fu.updateTimeDisplay.call(this,this.elements.display.seekTooltip,this.duration/100*o),this.elements.display.seekTooltip.style.left="".concat(o,"%"),Nc(e)&&["mouseenter","mouseleave"].includes(e.type)&&n("mouseenter"===e.type)}}},timeUpdate:function(e){var t=!kc(this.elements.display.duration)&&this.config.invertTime;Fu.updateTimeDisplay.call(this,this.elements.display.currentTime,t?this.duration-this.currentTime:this.currentTime,t),e&&"timeupdate"===e.type&&this.media.seeking||Fu.updateProgress.call(this,e)},durationUpdate:function(){if(this.supported.ui&&(this.config.invertTime||!this.currentTime)){if(this.duration>=Math.pow(2,32))return Qc(this.elements.display.currentTime,!0),void Qc(this.elements.progress,!0);kc(this.elements.inputs.seek)&&this.elements.inputs.seek.setAttribute("aria-valuemax",this.duration);var e=kc(this.elements.display.duration);!e&&this.config.displayDuration&&this.paused&&Fu.updateTimeDisplay.call(this,this.elements.display.currentTime,this.duration),e&&Fu.updateTimeDisplay.call(this,this.elements.display.duration,this.duration),Fu.updateSeekTooltip.call(this)}},toggleMenuButton:function(e,t){Qc(this.elements.settings.buttons[e],!t)},updateSetting:function(e,t,i){var n=this.elements.settings.panels[e],o=null,r=t;if("captions"===e)o=this.currentTrack;else{if(o=Vc(i)?this[e]:i,Vc(o)&&(o=this.config[e].default),!Vc(this.options[e])&&!this.options[e].includes(o))return void this.debug.warn("Unsupported value of '".concat(o,"' for ").concat(e));if(!this.config[e].options.includes(o))return void this.debug.warn("Disabled value of '".concat(o,"' for ").concat(e))}if(kc(r)||(r=n&&n.querySelector('[role="menu"]')),kc(r)){this.elements.settings.buttons[e].querySelector(".".concat(this.config.classNames.menu.value)).innerHTML=Fu.getLabel.call(this,e,o);var s=r&&r.querySelector('[value="'.concat(o,'"]'));kc(s)&&(s.checked=!0)}},getLabel:function(e,t){switch(e){case"speed":return 1===t?Au("normal",this.config):"".concat(t,"&times;");case"quality":if(Dc(t)){var i=Au("qualityLabel.".concat(t),this.config);return i.length?i:"".concat(t,"p")}return Ou(t);case"captions":return Bu.getLabel.call(this);default:return null}},setQualityMenu:function(e){var t=this;if(kc(this.elements.settings.panels.quality)){var i="quality",n=this.elements.settings.panels.quality.querySelector('[role="menu"]');Pc(e)&&(this.options.quality=Su(e).filter((function(e){return t.config.quality.options.includes(e)})));var o=!Vc(this.options.quality)&&this.options.quality.length>1;if(Fu.toggleMenuButton.call(this,i,o),$c(n),Fu.checkMenu.call(this),o){var r=function(e){var i=Au("qualityBadge.".concat(e),t.config);return i.length?Fu.createBadge.call(t,i):null};this.options.quality.sort((function(e,i){var n=t.config.quality.options;return n.indexOf(e)>n.indexOf(i)?1:-1})).forEach((function(e){Fu.createMenuItem.call(t,{value:e,list:n,type:i,title:Fu.getLabel.call(t,"quality",e),badge:r(e)})})),Fu.updateSetting.call(this,i,n)}}},setCaptionsMenu:function(){var e=this;if(kc(this.elements.settings.panels.captions)){var t="captions",i=this.elements.settings.panels.captions.querySelector('[role="menu"]'),n=Bu.getTracks.call(this),o=Boolean(n.length);if(Fu.toggleMenuButton.call(this,t,o),$c(i),Fu.checkMenu.call(this),o){var r=n.map((function(t,n){return{value:n,checked:e.captions.toggled&&e.currentTrack===n,title:Bu.getLabel.call(e,t),badge:t.language&&Fu.createBadge.call(e,t.language.toUpperCase()),list:i,type:"language"}}));r.unshift({value:-1,checked:!this.captions.toggled,title:Au("disabled",this.config),list:i,type:"language"}),r.forEach(Fu.createMenuItem.bind(this)),Fu.updateSetting.call(this,t,i)}}},setSpeedMenu:function(){var e=this;if(kc(this.elements.settings.panels.speed)){var t="speed",i=this.elements.settings.panels.speed.querySelector('[role="menu"]');this.options.speed=this.options.speed.filter((function(t){return t>=e.minimumSpeed&&t<=e.maximumSpeed}));var n=!Vc(this.options.speed)&&this.options.speed.length>1;Fu.toggleMenuButton.call(this,t,n),$c(i),Fu.checkMenu.call(this),n&&(this.options.speed.forEach((function(n){Fu.createMenuItem.call(e,{value:n,list:i,type:t,title:Fu.getLabel.call(e,"speed",n)})})),Fu.updateSetting.call(this,t,i))}},checkMenu:function(){var e=this.elements.settings.buttons,t=!Vc(e)&&Object.values(e).some((function(e){return!e.hidden}));Qc(this.elements.settings.menu,!t)},focusFirstMenuItem:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.elements.settings.popup.hidden){var i=e;kc(i)||(i=Object.values(this.elements.settings.panels).find((function(e){return!e.hidden})));var n=i.querySelector('[role^="menuitem"]');ru.call(this,n,t)}},toggleMenu:function(e){var t=this.elements.settings.popup,i=this.elements.buttons.settings;if(kc(t)&&kc(i)){var n=t.hidden,o=n;if(Ac(e))o=e;else if(Lc(e)&&27===e.which)o=!1;else if(Nc(e)){var r=_c(e.composedPath)?e.composedPath()[0]:e.target,s=t.contains(r);if(s||!s&&e.target!==i&&o)return}i.setAttribute("aria-expanded",o),Qc(t,!o),eu(this.elements.container,this.config.classNames.menu.open,o),o&&Lc(e)?Fu.focusFirstMenuItem.call(this,null,!0):o||n||ru.call(this,i,Lc(e))}},getMenuSize:function(e){var t=e.cloneNode(!0);t.style.position="absolute",t.style.opacity=0,t.removeAttribute("hidden"),e.parentNode.appendChild(t);var i=t.scrollWidth,n=t.scrollHeight;return Xc(t),{width:i,height:n}},showMenuPanel:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.elements.container.querySelector("#plyr-settings-".concat(this.id,"-").concat(t));if(kc(n)){var o=n.parentNode,r=Array.from(o.children).find((function(e){return!e.hidden}));if(au.transitions&&!au.reducedMotion){o.style.width="".concat(r.scrollWidth,"px"),o.style.height="".concat(r.scrollHeight,"px");var s=Fu.getMenuSize.call(this,n),a=function t(i){i.target===o&&["width","height"].includes(i.propertyName)&&(o.style.width="",o.style.height="",du.call(e,o,Bc,t))};uu.call(this,o,Bc,a),o.style.width="".concat(s.width,"px"),o.style.height="".concat(s.height,"px")}Qc(r,!0),Qc(n,!1),Fu.focusFirstMenuItem.call(this,n,i)}},setDownloadUrl:function(){var e=this.elements.buttons.download;kc(e)&&e.setAttribute("href",this.download)},create:function(e){var t=this,i=Fu.bindMenuItemShortcuts,n=Fu.createButton,o=Fu.createProgress,r=Fu.createRange,s=Fu.createTime,a=Fu.setQualityMenu,l=Fu.setSpeedMenu,c=Fu.showMenuPanel;this.elements.controls=null,Pc(this.config.controls)&&this.config.controls.includes("play-large")&&this.elements.container.appendChild(n.call(this,"play-large"));var u=Yc("div",Jc(this.config.selectors.controls.wrapper));this.elements.controls=u;var d={class:"plyr__controls__item"};return Su(Pc(this.config.controls)?this.config.controls:[]).forEac
19h((function(a){if("restart"===a&&u.appendChild(n.call(t,"restart",d)),"rewind"===a&&u.appendChild(n.call(t,"rewind",d)),"play"===a&&u.appendChild(n.call(t,"play",d)),"fast-forward"===a&&u.appendChild(n.call(t,"fast-forward",d)),"progress"===a){var l=Yc("div",{class:"".concat(d.class," plyr__progress__container")}),p=Yc("div",Jc(t.config.selectors.progress));if(p.appendChild(r.call(t,"seek",{id:"plyr-seek-".concat(e.id)})),p.appendChild(o.call(t,"buffer")),t.config.tooltips.seek){var h=Yc("span",{class:t.config.classNames.tooltip},"00:00");p.appendChild(h),t.elements.display.seekTooltip=h}t.elements.progress=p,l.appendChild(t.elements.progress),u.appendChild(l)}if("current-time"===a&&u.appendChild(s.call(t,"currentTime",d)),"duration"===a&&u.appendChild(s.call(t,"duration",d)),"mute"===a||"volume"===a){var f=t.elements.volume;if(kc(f)&&u.contains(f)||(f=Yc("div",Uc({},d,{class:"".concat(d.class," plyr__volume").trim()})),t.elements.volume=f,u.appendChild(f)),"mute"===a&&f.appendChild(n.call(t,"mute")),"volume"===a&&!Hc.isIos){var g={max:1,step:.05,value:t.config.volume};f.appendChild(r.call(t,"volume",Uc(g,{id:"plyr-volume-".concat(e.id)})))}}if("captions"===a&&u.appendChild(n.call(t,"captions",d)),"settings"===a&&!Vc(t.config.settings)){var v=Yc("div",Uc({},d,{class:"".concat(d.class," plyr__menu").trim(),hidden:""}));v.appendChild(n.call(t,"settings",{"aria-haspopup":!0,"aria-controls":"plyr-settings-".concat(e.id),"aria-expanded":!1}));var y=Yc("div",{class:"plyr__menu__container",id:"plyr-settings-".concat(e.id),hidden:""}),m=Yc("div"),C=Yc("div",{id:"plyr-settings-".concat(e.id,"-home")}),b=Yc("div",{role:"menu"});C.appendChild(b),m.appendChild(C),t.elements.settings.panels.home=C,t.config.settings.forEach((function(n){var o=Yc("button",Uc(Jc(t.config.selectors.buttons.settings),{type:"button",class:"".concat(t.config.classNames.control," ").concat(t.config.classNames.control,"--forward"),role:"menuitem","aria-haspopup":!0,hidden:""}));i.call(t,o,n),uu.call(t,o,"click",(function(){c.call(t,n,!1)}));var r=Yc("span",null,Au(n,t.config)),s=Yc("span",{class:t.config.classNames.menu.value});s.innerHTML=e[n],r.appendChild(s),o.appendChild(r),b.appendChild(o);var a=Yc("div",{id:"plyr-settings-".concat(e.id,"-").concat(n),hidden:""}),l=Yc("button",{type:"button",class:"".concat(t.config.classNames.control," ").concat(t.config.classNames.control,"--back")});l.appendChild(Yc("span",{"aria-hidden":!0},Au(n,t.config))),l.appendChild(Yc("span",{class:t.config.classNames.hidden},Au("menuBack",t.config))),uu.call(t,a,"keydown",(function(e){37===e.which&&(e.preventDefault(),e.stopPropagation(),c.call(t,"home",!0))}),!1),uu.call(t,l,"click",(function(){c.call(t,"home",!1)})),a.appendChild(l),a.appendChild(Yc("div",{role:"menu"})),m.appendChild(a),t.elements.settings.buttons[n]=o,t.elements.settings.panels[n]=a})),y.appendChild(m),v.appendChild(y),u.appendChild(v),t.elements.settings.popup=y,t.elements.settings.menu=v}if("pip"===a&&au.pip&&u.appendChild(n.call(t,"pip",d)),"airplay"===a&&au.airplay&&u.appendChild(n.call(t,"airplay",d)),"download"===a){var w=Uc({},d,{element:"a",href:t.download,target:"_blank"});t.isHTML5&&(w.download="");var S=t.config.urls.download;!Gc(S)&&t.isEmbed&&Uc(w,{icon:"logo-".concat(t.provider),label:t.provider}),u.appendChild(n.call(t,"download",w))}"fullscreen"===a&&u.appendChild(n.call(t,"fullscreen",d))})),this.isHTML5&&a.call(this,wu.getQualityOptions.call(this)),l.call(this),u},inject:function(){var e=this;if(this.config.loadSprite){var t=Fu.getIconUrl.call(this);t.cors&&Mu(t.url,"sprite-plyr")}this.id=Math.floor(1e4*Math.random());var i=null;this.elements.controls=null;var n,o,r={id:this.id,seektime:this.config.seekTime,title:this.config.title},s=!0;if(_c(this.config.controls)&&(this.config.controls=this.config.controls.call(this,r)),this.config.controls||(this.config.controls=[]),kc(this.config.controls)||Rc(this.config.controls)?i=this.config.controls:(i=Fu.create.call(this,{id:this.id,seektime:this.config.seekTime,speed:this.speed,quality:this.quality,captions:Bu.getLabel.call(this)}
19),s=!1),s&&Rc(this.config.controls)&&(n=i,Object.entries(r).forEach((function(e){var t=Hl(e,2),i=t[0],o=t[1];n=xu(n,"{".concat(i,"}"),o)})),i=n),Rc(this.config.selectors.controls.container)&&(o=document.querySelector(this.config.selectors.controls.container)),kc(o)||(o=this.elements.container),o[kc(i)?"insertAdjacentElement":"insertAdjacentHTML"]("afterbegin",i),kc(this.elements.controls)||Fu.findElements.call(this),!Vc(this.elements.buttons)){var a=function(t){var i=e.config.classNames.controlPressed;Object.defineProperty(t,"pressed",{enumerable:!0,get:function(){return tu(t,i)},set:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];eu(t,i,e)}})};Object.values(this.elements.buttons).filter(Boolean).forEach((function(e){Pc(e)||Mc(e)?Array.from(e).filter(Boolean).forEach(a):a(e)}))}if(Hc.isEdge&&jc(o),this.config.tooltips.controls){var l=this.config,c=l.classNames,u=l.selectors,d="".concat(u.controls.wrapper," ").concat(u.labels," .").concat(c.hidden),p=nu.call(this,d);Array.from(p).forEach((function(t){eu(t,e.config.classNames.hidden,!1),eu(t,e.config.classNames.tooltip,!0)}))}}};function Gu(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=e;if(t){var n=document.createElement("a");n.href=i,i=n.href}try{return new URL(i)}catch(e){return null}}function Vu(e){var t=new URLSearchParams;return Tc(e)&&Object.entries(e).forEach((function(e){var i=Hl(e,2),n=i[0],o=i[1];t.set(n,o)})),t}var Bu={setup:function(){if(this.supported.ui)if(!this.isVideo||this.isYouTube||this.isHTML5&&!au.textTracks)Pc(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&Fu.setCaptionsMenu.call(this);else{if(kc(this.elements.captions)||(this.elements.captions=Yc("div",Jc(this.config.selectors.captions)),function(e,t){kc(e)&&kc(t)&&t.parentNode.insertBefore(e,t.nextSibling)}(this.elements.captions,this.elements.wrapper)),Hc.isIE&&window.URL){var e=this.media.querySelectorAll("track");Array.from(e).forEach((function(e){var t=e.getAttribute("src"),i=Gu(t);null!==i&&i.hostname!==window.location.href.hostname&&["http:","https:"].includes(i.protocol)&&Pu(t,"blob").then((function(t){e.setAttribute("src",window.URL.createObjectURL(t))})).catch((function(){Xc(e)}))}))}var t=Su((navigator.languages||[navigator.language||navigator.userLanguage||"en"]).map((function(e){return e.split("-")[0]}))),i=(this.storage.get("language")||this.config.captions.language||"auto").toLowerCase();"auto"===i&&(i=Hl(t,1)[0]);var n=this.storage.get("captions");if(Ac(n)||(n=this.config.captions.active),Object.assign(this.captions,{toggled:!1,active:n,language:i,languages:t}),this.isHTML5){var o=this.config.captions.update?"addtrack removetrack":"removetrack";uu.call(this,this.media.textTracks,o,Bu.update.bind(this))}setTimeout(Bu.update.bind(this),0)}},update:function(){var e=this,t=Bu.getTracks.call(this,!0),i=this.captions,n=i.active,o=i.language,r=i.meta,s=i.currentTrackNode,a=Boolean(t.find((function(e){return e.language===o})));this.isHTML5&&this.isVideo&&t.filter((function(e){return!r.get(e)})).forEach((function(t){e.debug.log("Track added",t),r.set(t,{default:"showing"===t.mode}),"showing"===t.mode&&(t.mode="hidden"),uu.call(e,t,"cuechange",(function(){return Bu.updateCues.call(e)}))})),(a&&this.language!==o||!t.includes(s))&&(Bu.setLanguage.call(this,o),Bu.toggle.call(this,n&&a)),eu(this.elements.container,this.config.classNames.captions.enabled,!Vc(t)),Pc(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&Fu.setCaptionsMenu.call(this)},toggle:function(e){var t=this,i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.supported.ui){var n=this.captions.toggled,o=this.config.classNames.captions.active,r=Oc(e)?!n:e;if(r!==n){if(i||(this.captions.active=r,this.storage.set({captions:r})),!this.language&&r&&!i){var s=Bu.getTracks.call(this),a=Bu.findTrack.call(this,[this.captions.language].concat(Wl(this.captions.languages)),!0);return this.captions.language=a.language,void Bu.set.call(this,s.indexOf(a))}this.elements.buttons.captions&&(this.elements.buttons.captions.pressed=r),eu(this.elements.container,o,r),this.captions.toggled=r,Fu.updateSetting.call(this,"captions"),hu.call(this,this.media,r?"captionsenabled":"captionsdisabled")}setTimeout((function(){r&&t.captions.toggled&&(t.captions.currentTrackNode.mode="hidden")}))}},set:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=Bu.getTracks.call(this);
vendor: 4,102 bytes, line 19
19if(-1!==e)if(Dc(e))if(e in i){if(this.captions.currentTrack!==e){this.captions.currentTrack=e;var n=i[e],o=n||{},r=o.language;this.captions.currentTrackNode=n,Fu.updateSetting.call(this,"captions"),t||(this.captions.language=r,this.storage.set({language:r})),this.isVimeo&&this.embed.enableTextTrack(r),hu.call(this,this.media,"languagechange")}Bu.toggle.call(this,!0,t),this.isHTML5&&this.isVideo&&Bu.updateCues.call(this)}else this.debug.warn("Track not found",e);else this.debug.warn("Invalid caption argument",e);else Bu.toggle.call(this,!1,t)},setLanguage:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(Rc(e)){var i=e.toLowerCase();this.captions.language=i;var n=Bu.getTracks.call(this),o=Bu.findTrack.call(this,[i]);Bu.set.call(this,n.indexOf(o),t)}else this.debug.warn("Invalid language argument",e)},getTracks:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=Array.from((this.media||{}).textTracks||[]);return i.filter((function(i){return!e.isHTML5||t||e.captions.meta.has(i)})).filter((function(e){return["captions","subtitles"].includes(e.kind)}))},findTrack:function(e){var t,i=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=Bu.getTracks.call(this),r=function(e){return Number((i.captions.meta.get(e)||{}).default)},s=Array.from(o).sort((function(e,t){return r(t)-r(e)}));return e.every((function(e){return!(t=s.find((function(t){return t.language===e})))})),t||(n?s[0]:void 0)},getCurrentTrack:function(){return Bu.getTracks.call(this)[this.currentTrack]},getLabel:function(e){var t=e;return!Ic(t)&&au.textTracks&&this.captions.toggled&&(t=Bu.getCurrentTrack.call(this)),Ic(t)?Vc(t.label)?Vc(t.language)?Au("enabled",this.config):e.language.toUpperCase():t.label:Au("disabled",this.config)},updateCues:function(e){if(this.supported.ui)if(kc(this.elements.captions))if(Oc(e)||Array.isArray(e)){var t=e;if(!t){var i=Bu.getCurrentTrack.call(this);t=Array.from((i||{}).activeCues||[]).map((function(e){return e.getCueAsHTML()})).map(Du)}var n=t.map((function(e){return e.trim()})).join("\n");if(n!==this.elements.captions.innerHTML){$c(this.elements.captions);var o=Yc("span",Jc(this.config.selectors.caption));o.innerHTML=n,this.elements.captions.appendChild(o),hu.call(this,this.media,"cuechange")}}else this.debug.warn("updateCues: Invalid input",e);else this.debug.warn("No captions element to render to")}},ju={enabled:!0,title:"",debug:!1,autoplay:!1,autopause:!0,playsinline:!0,seekTime:10,volume:1,muted:!1,duration:null,displayDuration:!0,invertTime:!0,toggleInvert:!0,ratio:null,clickToPlay:!0,hideControls:!0,resetOnEnd:!1,disableContextMenu:!0,loadSprite:!0,iconPrefix:"plyr",iconUrl:"https://cdn.plyr.io/3.6.1/plyr.svg",blankVideo:"https://cdn.plyr.io/static/blank.mp4",quality:{default:576,options:[4320,2880,2160,1440,1080,720,576,480,360,240],forced:!1,onChange:null},loop:{active:!1},speed:{selected:1,options:[.5,.75,1,1.25,1.5,1.75,2,4]},keyboard:{focused:!0,global:!1},tooltips:{controls:!1,seek:!0},captions:{active:!1,language:"auto",update:!1},fullscreen:{enabled:!0,fallback:!0,iosNative:!1},storage:{enabled:!0,key:"plyr"},controls:["play-large","play","progress","current-time","mute","volume","captions","settings","pip","airplay","fullscreen"],settings:["captions","quality","speed"],i18n:{restart:"Restart",rewind:"Rewind {seektime}s",play:"Play",pause:"Pause",fastForward:"Forward {seektime}s",seek:"Seek",seekLabel:"{currentTime} of {duration}",played:"Played",buffered:"Buffered",currentTime:"Current time",duration:"Duration",volume:"Volume",mute:"Mute",unmute:"Unmute",enableCaptions:"Enable captions",disableCaptions:"Disable captions",download:"Download",enterFullscreen:"Enter fullscreen",exitFullscreen:"Exit fullscreen",frameTitle:"Player for {title}",captions:"Captions",settings:"Settings",pip:"PIP",menuBack:"Go back to previous menu",speed:"Speed",normal:"Normal",quality:"Quality",loop:"Loop",start:"Start",end:"End",all:"All",reset:"Reset",disabled:"Disabled",enabled:"Enabled",advertisement:"Ad",qualityBadge:{2160:"4K",1440:"HD",1080:"HD",720:"HD",576:"SD",480:"S
19D"}},urls:{download:null,vimeo:{sdk:"https://player.vimeo.com/api/player.js",iframe:"https://player.vimeo.com/video/{0}?{1}",api:"https://vimeo.com/api/v2/video/{0}.json"},youtube:{sdk:"https://www.youtube.com/iframe_api",api:"https://noembed.com/embed?url=https://www.youtube.com/watch?v={0}"},googleIMA:{sdk:"https://imasdk.googleapis.com/js/sdkloader/ima3.js"}},listeners:{seek:null,play:null,pause:null,restart:null,rewind:null,fastForward:null,mute:null,volume:null,captions:null,download:null,fullscreen:null,pip:null,airplay:null,speed:null,quality:null,loop:null,language:null},events:["ended","progress","stalled","playing","waiting","canplay","canplaythrough","loadstart","loadeddata","loadedmetadata","timeupdate","volumechange","play","pause","error","seeking","seeked","emptied","ratechange","cuechange","download","enterfullscreen","exitfullscreen","captionsenabled","captionsdisabled","languagechange","controlshidden","controlsshown","ready","statechange","qualitychange","adsloaded","adscontentpause","adscontentresume","adstarted","adsmidpoint","adscomplete","adsallcomplete","adsimpression","adsclick"],selectors:{editable:"input, textarea, select, [contenteditable]",container:".plyr",controls:{container:null,wrapper:".plyr__controls"},labels:"[data-plyr]",buttons:{play:'[data-plyr="play"]',pause:'[data-plyr="pause"]',restart:'[data-plyr="restart"]',rewind:'[data-plyr="rewind"]',fastForward:'[data-plyr="fast-forward"]',mute:'[data-plyr="mute"]',captions:'[data-plyr="captions"]',download:'[data-plyr="download"]',fullscreen:'[data-plyr="fullscreen"]',pip:'[data-plyr="pip"]',airplay:'[data-plyr="airplay"]',settings:'[data-plyr="settings"]',loop:'[data-plyr="loop"]'},inputs:{seek:'[data-plyr="seek"]',volume:'[data-plyr="volume"]',speed:'[data-plyr="speed"]',language:'[data-plyr="language"]',quality:'[data-plyr="quality"]'},display:{currentTime:".plyr__time--current",duration:".plyr__time--duration",buffer:".plyr__progress__buffer",loop:".plyr__progress__loop",volume:".plyr__volume--display"},progress:".plyr__progress",captions:".plyr__captions",caption:".plyr__caption"},classNames:{type:"plyr--{0}",provider:"plyr--{0}",video:"plyr__video-wrapper",embed:"plyr__video-embed",videoFixedRatio:"plyr__video-wrapper--fixed-ratio",embedContainer:"plyr__video-embed__container",poster:"plyr__poster",posterEnabled:"plyr__poster-enabled",ads:"plyr__ads",control:"plyr__control",controlPressed:"plyr__control--pressed",playing:"plyr--playing",paused:"plyr--paused",stopped:"plyr--stopped",loading:"plyr--loading",hover:"plyr--hover",tooltip:"plyr__tooltip",cues:"plyr__cues",hidden:"plyr__sr-only",hideControls:"plyr--hide-controls",isIos:"plyr--is-ios",isTouch:"plyr--is-touch",uiSupported:"plyr--full-ui",noTransition:"plyr--no-transition",display:{time:"plyr__time"},menu:{value:"plyr__menu__value",badge:"plyr__badge",open:"plyr--menu-open"},captions:{enabled:"plyr--captions-enabled",active:"plyr--captions-active"},fullscreen:{enabled:"plyr--fullscreen-enabled",fallback:"plyr--fullscreen-fallback"},pip:{supported:"plyr--pip-supported",active:"plyr--pip-active"},airplay:{supported:"plyr--airplay-supported",active:"plyr--airplay-active"},tabFocus:"plyr__tab-focus",previewThumbnails:{thumbContainer:"plyr__preview-thumb",thumbContainerShown:"plyr__preview-thumb--is-shown",imageContainer:"plyr__preview-thumb__image-container",timeContainer:"plyr__preview-thumb__time-container",scrubbingContainer:"plyr__preview-scrubbing",scrubbingContainerShown:"plyr__preview-scrubbing--is-shown"}},attributes:{embed:{provider:"data-plyr-provider",id:"data-plyr-embed-id"}},ads:{enabled:!1,publisherId:"",tagUrl:""},previewThumbnails:{enabled:!1,src:""},vimeo:{byline:!1,portrait:!1,title:!1,speed:!0,transparent:!1,premium:!1,referrerPolicy:null},youtube:{noCookie:!0,rel:0,showinfo:0,iv_load_policy:3,modestbranding:1}},Hu="picture-in-picture",Wu="inline",Uu={html5:"html5",youtube:"youtube",vimeo:"vimeo"},zu="audio",Ku="video",Yu=function(){},qu=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];Ll(this,e),this.enabled=window.console&&t,this.enabled&&this.log("Debugging enabled")}return Fl(e,[{key:"log",get:function(){return this.enabled?Function.prototype.bind.call(console.log,console):Yu}},{key:"warn",get:function(){return this.enabled?Function.prototype.bind.call(console.warn,console):Yu}},{key:"error",get:function(){return this.enabled?Function.prototype.bind.call(console.error,console):Yu}}]),e}(),Xu=function(){function e(t){var i=this;Ll(this,e),this.player=t,this.prefix=e.prefix,this.property=e.property,this.scrollPosition={x:0,y:0},this.forceFallback="force"===t.config.fullscreen.fallback,this.player.elements.fullscreen=t.config.fullscreen.container&&function(e,t){return(Element.prototype.closest||function(){var e=this;do{if(iu.matches(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}).call(e,t)}(this.player.elements.container,t.config.fullscreen.container),uu.call(this.player,document,"ms"===this.prefix?"MSFullscreenChange":"".concat(this.prefix,"fullscreenchange"),(function(){i.onChange()})),uu.call(this.player,this.player.elements.container,"dblclick",(function(e){kc(i.player.elements.controls)&&i.player.elements.controls.contains(e.target)||i.toggle()})),uu.call(this,this.player.elements.container,"keydown",(function(e){return i.trapFocus(e)})),this.update()}return Fl(e,[{key:"onChange",value:function(){if(this.enabled){var e=this.player.elements.buttons.fullscreen;kc(e)&&(e.pressed=this.active);var t=this.target===this.player.media?this.target:this.player.elements.container;hu.call(this.player,t,this.active?"enterfullscreen":"exitfullscreen",!0)}}},{key:"toggleFallback",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(e?this.scrollPosition={x:window.scrollX||0,y:window.scrollY||0}:window.scrollTo(this.scrollPosition.x,this.scrollPosition.y),document.body.style.overflow=e?"hidden":"",eu(this.target,this.player.config.classNames.fullscreen.fallback,e),Hc.isIos){var t=document.head.querySelector('meta[name="viewport"]'),i="viewport-fit=cover";t||(t=document.createElement("meta")).setAttribute("name","viewport");var n=Rc(t.content)&&t.content.includes(i);e?(this.cleanupViewport=!n,n||(t.content+=",".concat(i))):this.cleanupViewport&&(t.content=t.content.split(",").filter((function(e){return e.trim()!==i})).join(","))}this.onChange()}},{key:"trapFocus",value:function(e){if(!Hc.isIos&&this.active&&"Tab"===e.key&&9===e.keyCode){var t=document.activeElement,i=nu.call(this.player,"a[href], button:not(:disabled), input:not(:disabled), [tabindex]"),n=Hl(i,1)[0],o=i[i.length-1];t!==o||e.shiftKey?t===n&&e.shiftKey&&(o.focus(),e.preventDefault()):(n.focus(),e.preventDefault())}}},{key:"update",value:function(){var t;this.enabled?(t=this.forceFallback?"Fallback (forced)":e.native?"Native":"Fallback",this.player.debug.log("".concat(t," fullscreen enabled"))):this.player.debug.log("Fullscreen not supported and fallback disabled"),eu(this.player.elements.container,this.player.config.classNames.fullscreen.enabled,this.enabled)}},{key:"enter",value:function(){this.enabled&&(Hc.isIos&&this.player.config.fullscreen.iosNative?this.target.webkitEnterFullscreen():!e.native||this.forceFallback?this.toggleFallback(!0):this.prefix?Vc(this.prefix)||this.target["".concat(this.prefix,"Request").concat(this.property)]():this.target.requestFullscreen({navigationUI:"hide"}))}},{key:"exit",value:function(){if(this.enabled)if(Hc.isIos&&this.player.config.fullscreen.iosNative)this.target.webkitExitFullscreen(),vu(this.player.play());else if(!e.native||this.forceFallback)this.toggleFallback(!1);else if(this.prefix){if(!Vc(this.prefix)){var t="moz"===this.prefix?"Cancel":"Exit";document["".concat(this.prefix).concat(t).concat(this.property)]()}}else(document.cancelFullScreen||document.exitFullscreen).call(document)}},{key:"toggle",value:function(){this.active?this.exit():this.enter()}},{key:"usingNative",get:function(){return e.native&&!this.forceFallback}},{key:"enabled",get:function(){return(e.native||this.player.config.fullscreen.fallback)&&this.player.config.fullscreen.enabled&&this.player.supported.ui&&this.player.isVideo}},{key:"active",get:function(){if(!this.enabled)return!1;if(!e.native||this.forceFallback)return tu(this.target,this.player.config.classNames.fullscreen.fallback);var t=this.prefix?document["".concat(this.prefix).concat(this.property,"Element")]:document.fullscreenElement;return t&&t.shadowRoot?t===this.target.getRootNode().host:t===this.target}},{key:"target",get:function(){return Hc.isIos&&this.player.config.fullscreen.iosNative?this.player.media:this.player.elements.fullscreen||this.player.elements.container}}
vendor: 16,738 bytes, line 19
19],[{key:"native",get:function(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}},{key:"prefix",get:function(){if(_c(document.exitFullscreen))return"";var e="";return["webkit","moz","ms"].some((function(t){return!(!_c(document["".concat(t,"ExitFullscreen")])&&!_c(document["".concat(t,"CancelFullScreen")])||(e=t,0))})),e}},{key:"property",get:function(){return"moz"===this.prefix?"FullScreen":"Fullscreen"}}]),e}();function $u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return new Promise((function(i,n){var o=new Image,r=function(){delete o.onload,delete o.onerror,(o.naturalWidth>=t?i:n)(o)};Object.assign(o,{onload:r,onerror:r,src:e})}))}var Zu={addStyleHook:function(){eu(this.elements.container,this.config.selectors.container.replace(".",""),!0),eu(this.elements.container,this.config.classNames.uiSupported,this.supported.ui)},toggleNativeControls:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];e&&this.isHTML5?this.media.setAttribute("controls",""):this.media.removeAttribute("controls")},build:function(){var e=this;if(this.listeners.media(),!this.supported.ui)return this.debug.warn("Basic support only for ".concat(this.provider," ").concat(this.type)),void Zu.toggleNativeControls.call(this,!0);kc(this.elements.controls)||(Fu.inject.call(this),this.listeners.controls()),Zu.toggleNativeControls.call(this),this.isHTML5&&Bu.setup.call(this),this.volume=null,this.muted=null,this.loop=null,this.quality=null,this.speed=null,Fu.updateVolume.call(this),Fu.timeUpdate.call(this),Zu.checkPlaying.call(this),eu(this.elements.container,this.config.classNames.pip.supported,au.pip&&this.isHTML5&&this.isVideo),eu(this.elements.container,this.config.classNames.airplay.supported,au.airplay&&this.isHTML5),eu(this.elements.container,this.config.classNames.isIos,Hc.isIos),eu(this.elements.container,this.config.classNames.isTouch,this.touch),this.ready=!0,setTimeout((function(){hu.call(e,e.media,"ready")}),0),Zu.setTitle.call(this),this.poster&&Zu.setPoster.call(this,this.poster,!1).catch((function(){})),this.config.duration&&Fu.durationUpdate.call(this)},setTitle:function(){var e=Au("play",this.config);if(Rc(this.config.title)&&!Vc(this.config.title)&&(e+=", ".concat(this.config.title)),Array.from(this.elements.buttons.play||[]).forEach((function(t){t.setAttribute("aria-label",e)})),this.isEmbed){var t=ou.call(this,"iframe");if(!kc(t))return;var i=Vc(this.config.title)?"video":this.config.title,n=Au("frameTitle",this.config);t.setAttribute("title",n.replace("{title}",i))}},togglePoster:function(e){eu(this.elements.container,this.config.classNames.posterEnabled,e)},setPoster:function(e){var t=this,i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return i&&this.poster?Promise.reject(new Error("Poster already set")):(this.media.setAttribute("data-poster",e),gu.call(this).then((function(){return $u(e)})).catch((function(i){throw e===t.poster&&Zu.togglePoster.call(t,!1),i})).then((function(){if(e!==t.poster)throw new Error("setPoster cancelled by later call to setPoster")})).then((function(){return Object.assign(t.elements.poster.style,{backgroundImage:"url('".concat(e,"')"),backgroundSize:""}),Zu.togglePoster.call(t,!0),e})))},checkPlaying:function(e){var t=this;eu(this.elements.container,this.config.classNames.playing,this.playing),eu(this.elements.container,this.config.classNames.paused,this.paused),eu(this.elements.container,this.config.classNames.stopped,this.stopped),Array.from(this.elements.buttons.play||[]).forEach((function(e){Object.assign(e,{pressed:t.playing}),e.setAttribute("aria-label",Au(t.playing?"pause":"play",t.config))})),Nc(e)&&"timeupdate"===e.type||Zu.toggleControls.call(this)},checkLoading:function(e){var t=this;this.loading=["stalled","waiting"].includes(e.type),clearTimeout(this.timers.loading),this.timers.loading=setTimeout((function(){eu(t.elements.container,t.config.classNames.loading,t.loading),Zu.toggleControls.call(t)}),this.loading?250:0)},toggleControls:function(e){var t=this.elements.controls;if(t&&this.config.hideControls){var i=this.touch&&this.lastSeekTime+2e3>Date.now();this.toggleControls(Boolean(e||this.loading||this.paused||t.pressed||t.hover||i))}},migrateStyles:function(){var e=this;Object.values(Bl({},this.media.style)).filter((function(e){return!Vc(e)&&Rc(e)&&e.startsWith("--plyr")})).forEach((function(t){e.elements.container.style.setProperty(t,e.media.style.getPropertyValue(t)),e.media.style.removeProperty(t)})),Vc(this.media.style)&&this.media.removeAttribute("style")}},Ju=function(){function e(t){Ll(this,e),this.player=t,this.lastKey=null,this.focusTimer=null,this.lastKeyDown=null,this.handleKey=this.handleKey.bind(this),this.toggleMenu=this.toggleMenu.bind(this),this.setTabFocus=this.setTabFocus.bind(this),this.firstTouch=this.firstTouch.bind(this)}return Fl(e,[{key:"handleKey",value:function(e){var t=this.player,i=t.elements,n=e.keyCode?e.keyCode:e.which,o="keydown"===e.type,r=o&&n===this.lastKey;if(!(e.altKey||e.ctrlKey||e.metaKey||e.shiftKey)&&Dc(n))if(o){var s=document.activeElement;if(kc(s)){var a=t.config.selectors.editable;if(s!==i.inputs.seek&&iu(s,a))return;if(32===e.which&&iu(s,'button, [role^="menuitem"]'))return}switch([32,37,38,39,40,48,49,50,51,52,53,54,56,57,67,70,73,75,76,77,79].includes(n)&&(e.preventDefault(),e.stopPropagation()),n){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:r||(t.currentTime=t.duration/10*(n-48));break;case 32:case 75:r||vu(t.togglePlay());break;case 38:t.increaseVolume(.1);break;case 40:t.decreaseVolume(.1);break;case 77:r||(t.muted=!t.muted);break;case 39:t.forward();break;case 37:t.rewind();break;case 70:t.fullscreen.toggle();break;case 67:r||t.toggleCaptions();break;case 76:t.loop=!t.loop}27===n&&!t.fullscreen.usingNative&&t.fullscreen.active&&t.fullscreen.toggle(),this.lastKey=n}else this.lastKey=null}},{key:"toggleMenu",value:function(e){Fu.toggleMenu.call(this.player,e)}},{key:"firstTouch",value:function(){var e=this.player,t=e.elements;e.touch=!0,eu(t.container,e.config.classNames.isTouch,!0)}},{key:"setTabFocus",value:function(e){var t=this.player,i=t.elements;if(clearTimeout(this.focusTimer),"keydown"!==e.type||9===e.which){"keydown"===e.type&&(this.lastKeyDown=e.timeStamp);var n,o=e.timeStamp-this.lastKeyDown<=20;("focus"!==e.type||o)&&(n=t.config.classNames.tabFocus,eu(nu.call(t,".".concat(n)),n,!1),"focusout"!==e.type&&(this.focusTimer=setTimeout((function(){var e=document.activeElement;i.container.contains(e)&&eu(document.activeElement,t.config.classNames.tabFocus,!0)}),10)))}}},{key:"global",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=this.player;t.config.keyboard.global&&cu.call(t,window,"keydown keyup",this.handleKey,e,!1),cu.call(t,document.body,"click",this.toggleMenu,e),pu.call(t,document.body,"touchstart",this.firstTouch),cu.call(t,document.body,"keydown focus blur focusout",this.setTabFocus,e,!1,!0)}},{key:"container",value:function(){var e=this.player,t=e.config,i=e.elements,n=e.timers;!t.keyboard.global&&t.keyboard.focused&&uu.call(e,i.container,"keydown keyup",this.handleKey,!1),uu.call(e,i.container,"mousemove mouseleave touchstart touchmove enterfullscreen exitfullscreen",(function(t){var o=i.controls;o&&"enterfullscreen"===t.type&&(o.pressed=!1,o.hover=!1);var r=0;["touchstart","touchmove","mousemove"].includes(t.type)&&(Zu.toggleControls.call(e,!0),r=e.touch?3e3:2e3),clearTimeout(n.controls),n.controls=setTimeout((function(){return Zu.toggleControls.call(e,!1)}),r)}));var o=function(t){if(!t)return bu.call(e);var n=i.container.getBoundingClientRect(),o=n.width,r=n.height;return bu.call(e,"".concat(o,":").concat(r))},r=function(){clearTimeout(n.resized),n.resized=setTimeout(o,50)};uu.call(e,i.container,"enterfullscreen exitfullscreen",(function(t){var n=e.fullscreen,s=n.target,a=n.usingNative;if(s===i.container&&(e.isEmbed||!Vc(e.config.ratio))){var l="enterfullscreen"===t.type,c=o(l);c.padding,function(t,i,n){if(e.isVimeo&&!e.config.vimeo.premium){var o=e.elements.wrapper.firstChild,r=Hl(t,2)[1],s=Hl(Cu.call(e),2),a=s[0],l=s[1];o.style.maxWidth=n?"".concat(r/l*a,"px"):null,o.style.margin=n?"0 auto":null}}(c.ratio,0,l),a||(l?uu.call(e,window,"resize",r):du.call(e,window,"resize",r))}}))}},{key:"media",value:function(){var e=this,t=this.player,i=t.elements;if(uu.call(t,t.media,"timeupdate seeking seeked",(function(e){return Fu.timeUpdate.call(t,e)})),uu.call(t,t.media,"durationchange loadeddata loadedmetadata",(function(e){return Fu.durationUpdate.call(t,e)})),uu.call(t,t.media,"ended",(function(){t.isHTML5&&t.isVideo&&t.config.resetOnEnd&&(t.restart(),t.pause())})),uu.call(t,t.media,"progress playing seeking seeked",(function(e){return Fu.updateProgress.call(t,e)})),uu.call(t,t.media,"volumechange",(function(e){return Fu.updateVolume.call(t,e)})),uu.call(t,t.media,"playing play pause ended emptied timeupdate",(function(e){return Zu.checkPlaying.call(t,e)})),uu.call(t,t.media,"waiting canplay seeked playing",(function(e){return Zu.checkLoading.call(t,e)})),t.supported.ui&&t.config.clickToPlay&&!t.isAudio){var n=ou.call(t,".".concat(t.config.classNames.video));if(!kc(n))return;uu.call(t,i.container,"click",(function(o){([i.container,n].includes(o.target)||n.contains(o.target))&&(t.touch&&t.config.hideControls||(t.ended?(e.proxy(o,t.restart,"restart"),e.proxy(o,(function(){vu(t.play())}),"play")):e.proxy(o,(function(){vu(t.togglePlay())}),"play")))}))}t.supported.ui&&t.config.disableContextMenu&&uu.call(t,i.wrapper,"contextmenu",(function(e){e.preventDefault()}),!1),uu.call(t,t.media,"volumechange",(function(){t.storage.set({volume:t.volume,muted:t.muted})})),uu.call(t,t.media,"ratechange",(function(){Fu.updateSetting.call(t,"speed"),t.storage.set({speed:t.speed})})),uu.call(t,t.media,"qualitychange",(function(e){Fu.updateSetting.call(t,"quality",null,e.detail.quality)})),uu.call(t,t.media,"ready qualitychange",(function(){Fu.setDownloadUrl.call(t)}));var o=t.config.events.concat(["keyup","keydown"]).join(" ");uu.call(t,t.media,o,(function(e){var n=e.detail,o=void 0===n?{}:n;"error"===e.type&&(o=t.media.error),hu.call(t,i.container,e.type,!0,o)}))}},{key:"proxy",value:function(e,t,i){var n=this.player,o=n.config.listeners[i],r=!0;_c(o)&&(r=o.call(n,e)),!1!==r&&_c(t)&&t.call(n,e)}},{key:"bind",value:function(e,t,i,n){var o=this,r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],s=this.player,a=s.config.listeners[n],l=_c(a);uu.call(s,e,t,(function(e){return o.proxy(e,i,n)}),r&&!l)}},{key:"controls",value:function(){var e=this,t=this.player,i=t.elements,n=Hc.isIE?"change":"input";if(i.buttons.play&&Array.from(i.buttons.play).forEach((function(i){e.bind(i,"click",(function(){vu(t.togglePlay())}),"play")})),this.bind(i.buttons.restart,"click",t.restart,"restart"),this.bind(i.buttons.rewind,"click",t.rewind,"rewind"),this.bind(i.buttons.fastForward,"click",t.forward,"fastForward"),this.bind(i.buttons.mute,"click",(function(){t.muted=!t.muted}),"mute"),this.bind(i.buttons.captions,"click",(function(){return t.toggleCaptions()})),this.bind(i.buttons.download,"click",(function(){hu.call(t,t.media,"download")}),"download"),this.bind(i.buttons.fullscreen,"click",(function(){t.fullscreen.toggle()}),"fullscreen"),this.bind(i.buttons.pip,"click",(function(){t.pip="toggle"}),"pip"),this.bind(i.buttons.airplay,"click",t.airplay,"airplay"),this.bind(i.buttons.settings,"click",(function(e){e.stopPropagation(),e.preventDefault(),Fu.toggleMenu.call(t,e)}),null,!1),this.bind(i.buttons.settings,"keyup",(function(e){var i=e.which;[13,32].includes(i)&&(13!==i?(e.preventDefault(),e.stopPropagation(),Fu.toggleMenu.call(t,e)):Fu.focusFirstMenuItem.call(t,null,!0))}),null,!1),this.bind(i.settings.menu,"keydown",(function(e){27===e.which&&Fu.toggleMenu.call(t,e)})),this.bind(i.inputs.seek,"mousedown mousemove",(function(e){var t=i.progress.getBoundingClientRect(),n=100/t.width*(e.pageX-t.left);e.currentTarget.setAttribute("seek-value",n)})),this.bind(i.inputs.seek,"mousedown mouseup keydown keyup touchstart touchend",(function(e){var i=e.currentTarget,n=e.keyCode?e.keyCode:e.which,o="play-on-seeked";if(!Lc(e)||39===n||37===n){t.lastSeekTime=Date.now();var r=i.hasAttribute(o),s=["mouseup","touchend","keyup"].includes(e.type);r&&s?(i.removeAttribute(o),vu(t.play())):!s&&t.playing&&(i.setAttribute(o,""),t.pause())}})),Hc.isIos){var o=nu.call(t,'input[type="range"]');Array.from(o).forEach((function(t){return e.bind(t,n,(function(e){return jc(e.target)}))}))}this.bind(i.inputs.seek,n,(function(e){var i=e.currentTarget,n=i.getAttribute("seek-value");Vc(n)&&(n=i.value),i.removeAttribute("seek-value"),t.currentTime=n/i.max*t.duration}),"seek"),this.bind(i.progress,"mouseenter mouseleave mousemove",(function(e){return Fu.updateSeekTooltip.call(t,e)})),this.bind(i.progress,"mousemove touchmove",(function(e){var i=t.previewThumbnails;i&&i.loaded&&i.startMove(e)})),this.bind(i.progress,"mouseleave touchend click",(function(){var e=t.previewThumbnails;e&&e.loaded&&e.endMove(!1,!0)})),this.bind(i.progress,"mousedown touchstart",(function(e){var i=t.previewThumbnails;i&&i.loaded&&i.startScrubbing(e)})),this.bind(i.progress,"mouseup touchend",(function(e){var i=t.previewThumbnails;i&&i.loaded&&i.endScrubbing(e)})),Hc.isWebkit&&Array.from(nu.call(t,'input[type="range"]')).forEach((function(i){e.bind(i,"input",(function(e){return Fu.updateRangeFill.call(t,e.target)}))})),t.config.toggleInvert&&!kc(i.display.duration)&&this.bind(i.display.currentTime,"click",(function(){0!==t.currentTime&&(t.config.invertTime=!t.config.invertTime,Fu.timeUpdate.call(t))})),this.bind(i.inputs.volume,n,(function(e){t.volume=e.target.value}),"volume"),this.bind(i.controls,"mouseenter mouseleave",(function(e){i.controls.hover=!t.touch&&"mouseenter"===e.type})),i.fullscreen&&Array.from(i.fullscreen.children).filter((function(e){return!e.contains(i.container)})).forEach((function(n){e.bind(n,"mouseenter mouseleave",(function(e){i.controls.hover=!t.touch&&"mouseenter"===e.type}))})),this.bind(i.controls,"mousedown mouseup touchstart touchend touchcancel",(function(e){i.controls.pressed=["mousedown","touchstart"].includes(e.type)})),this.bind(i.controls,"focusin",(function(){var n=t.config,o=t.timers;eu(i.controls,n.classNames.noTransition,!0),Zu.toggleControls.call(t,!0),setTimeout((function(){eu(i.controls,n.classNames.noTransition,!1)}),0);var r=e.touch?3e3:4e3;clearTimeout(o.controls),o.controls=setTimeout((function(){return Zu.toggleControls.call(t,!1)}),r)})),this.bind(i.inputs.volume,"wheel",(function(e){var i=e.webkitDirectionInvertedFromDevice,n=Hl([e.deltaX,-e.deltaY].map((function(e){return i?-e:e})),2),o=n[0],r=n[1],s=Math.sign(Math.abs(o)>Math.abs(r)?o:r);t.increaseVolume(s/50);var a=t.media.volume;(1===s&&a<1||-1===s&&a>0)&&e.preventDefault()}),"volume",!1)}}]),e}(),Qu=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e,t){e.exports=function(){var e=function(){},t={},i={},n={};function o(e,t){if(e){var o=n[e];if(i[e]=t,o)for(;o.length;)o[0](e,t),o.splice(0,1)}}function r(t,i){t.call&&(t={success:t}),i.length?(t.error||e)(i):(t.success||e)(t)}function s(t,i,n,o){var r,a,l=document,c=n.async,u=(n.numRetries||0)+1,d=n.before||e,p=t.replace(/[\?|#].*$/,""),h=t.replace(/^(css|img)!/,"");o=o||0,/(^css!|\.css$)/.test(p)?((a=l.createElement("link")).rel="stylesheet",a.href=h,(r="hideFocus"in a)&&a.relList&&(r=0,a.rel="preload",a.as="style")):/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(p)?(a=l.createElement("img")).src=h:((a=l.createElement("script")).src=t,a.async=void 0===c||c),a.onload=a.onerror=a.onbeforeload=function(e){var l=e.type[0];if(r)try{a.sheet.cssText.length||(l="e")}catch(e){18!=e.code&&(l="e")}if("e"==l){if((o+=1)<u)return s(t,i,n,o)}else if("preload"==a.rel&&"style"==a.as)return a.rel="stylesheet";i(t,l,e.defaultPrevented)},!1!==d(t,a)&&l.head.appendChild(a)}function a(e,t,i){var n,o,r=(e=e.push?e:[e]).length,a=r,l=[];for(n=function(e,i,n){if("e"==i&&l.push(e),"b"==i){if(!n)return;l.push(e)}--r||t(l)},o=0;o<a;o++)s(e[o],n,i)}function l(e,i,n){var s,l;if(i&&i.trim&&(s=i),l=(s?n:i)||{},s){if(s in t)throw"LoadJS";t[s]=!0}function c(t,i){a(e,(function(e){r(l,e),t&&r({success:t,error:i},e),o(s,e)}),l)}if(l.returnPromise)return new Promise(c);c()}return l.ready=function(e,t){return function(e,t){e=e.push?e:[e];var o,r,s,a=[],l=e.length,c=l;for(o=function(e,i){i.length&&a.push(e),--c||t(a)};l--;)r=e[l],(s=i[r])?o(r,s):(n[r]=n[r]||[]).push(o)}(e,(function(e){r(t,e)})),l},l.done=function(e){o(e,[])},l.reset=function(){t={},i={},n={}},l.isDefined=function(e){return e in t},l}()}));function ed(e){return new Promise((function(t,i){Qu(e,{success:t,error:i})}
19))}function td(e){e&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===e&&(this.media.paused=!e,hu.call(this,this.media,e?"play":"pause"))}var id={setup:function(){var e=this;eu(e.elements.wrapper,e.config.classNames.embed,!0),e.options.speed=e.config.speed.options,bu.call(e),Tc(window.Vimeo)?id.ready.call(e):ed(e.config.urls.vimeo.sdk).then((function(){id.ready.call(e)})).catch((function(t){e.debug.warn("Vimeo SDK (player.js) failed to load",t)}))},ready:function(){var e=this,t=this,i=t.config.vimeo,n=i.premium,o=i.referrerPolicy,r=jl(i,["premium","referrerPolicy"]);n&&Object.assign(r,{controls:!1,sidedock:!1});var s=Vu(Bl({loop:t.config.loop.active,autoplay:t.autoplay,muted:t.muted,gesture:"media",playsinline:!this.config.fullscreen.iosNative},r)),a=t.media.getAttribute("src");Vc(a)&&(a=t.media.getAttribute(t.config.attributes.embed.id));var l=function(e){return Vc(e)?null:Dc(Number(e))?e:e.match(/^.*(vimeo.com\/|video\/)(\d+).*/)?RegExp.$2:e}(a),c=Yc("iframe"),u=Eu(t.config.urls.vimeo.iframe,l,s);c.setAttribute("src",u),c.setAttribute("allowfullscreen",""),c.setAttribute("allow","autoplay,fullscreen,picture-in-picture"),Vc(o)||c.setAttribute("referrerPolicy",o);var d=t.poster;if(n)c.setAttribute("data-poster",d),t.media=Zc(c,t.media);else{var p=Yc("div",{class:t.config.classNames.embedContainer,"data-poster":d});p.appendChild(c),t.media=Zc(p,t.media)}Pu(Eu(t.config.urls.vimeo.api,l),"json").then((function(e){if(!Vc(e)){var i=new URL(e[0].thumbnail_large);i.pathname="".concat(i.pathname.split("_")[0],".jpg"),Zu.setPoster.call(t,i.href).catch((function(){}))}})),t.embed=new window.Vimeo.Player(c,{autopause:t.config.autopause,muted:t.muted}),t.media.paused=!0,t.media.currentTime=0,t.supported.ui&&t.embed.disableTextTrack(),t.media.play=function(){return td.call(t,!0),t.embed.play()},t.media.pause=function(){return td.call(t,!1),t.embed.pause()},t.media.stop=function(){t.pause(),t.currentTime=0};var h=t.media.currentTime;Object.defineProperty(t.media,"currentTime",{get:function(){return h},set:function(e){var i=t.embed,n=t.media,o=t.paused,r=t.volume,s=o&&!i.hasPlayed;n.seeking=!0,hu.call(t,n,"seeking"),Promise.resolve(s&&i.setVolume(0)).then((function(){return i.setCurrentTime(e)})).then((function(){return s&&i.pause()})).then((function(){return s&&i.setVolume(r)})).catch((function(){}))}});var f=t.config.speed.selected;Object.defineProperty(t.media,"playbackRate",{get:function(){return f},set:function(e){t.embed.setPlaybackRate(e).then((function(){f=e,hu.call(t,t.media,"ratechange")})).catch((function(){t.options.speed=[1]}))}});var g=t.config.volume;Object.defineProperty(t.media,"volume",{get:function(){return g},set:function(e){t.embed.setVolume(e).then((function(){g=e,hu.call(t,t.media,"volumechange")}))}});var v=t.config.muted;Object.defineProperty(t.media,"muted",{get:function(){return v},set:function(e){var i=!!Ac(e)&&e;t.embed.setVolume(i?0:t.config.volume).then((function(){v=i,hu.call(t,t.media,"volumechange")}))}});var y,m=t.config.loop;Object.defineProperty(t.media,"loop",{get:function(){return m},set:function(e){var i=Ac(e)?e:t.config.loop.active;t.embed.setLoop(i).then((function(){m=i}))}}),t.embed.getVideoUrl().then((function(e){y=e,Fu.setDownloadUrl.call(t)})).catch((function(t){e.debug.warn(t)})),Object.defineProperty(t.media,"currentSrc",{get:function(){return y}}),Object.defineProperty(t.media,"ended",{get:function(){return t.currentTime===t.duration}}),Promise.all([t.embed.getVideoWidth(),t.embed.getVideoHeight()]).then((function(i){var n=Hl(i,2),o=n[0],r=n[1];t.embed.ratio=[o,r],bu.call(e)})),t.embed.setAutopause(t.config.autopause).then((function(e){t.config.autopause=e})),t.embed.getVideoTitle().then((function(i){t.config.title=i,Zu.setTitle.call(e)})),t.embed.getCurrentTime().then((function(e){h=e,hu.call(t,t.media,"timeupdate")})),t.embed.getDuration().then((function(e){t.media.duration=e,hu.call(t,t.media,"durationchange")})),t.embed.getTextTracks().then((function(e){t.media.textTracks=e,Bu.setup.call(t)})),t.embed.on("cuechange",(function(e){var i=e.cues,n=(void 0===i?[]:i).map((function(e){return function(e){var t=document.createDocumentFragment(),i=document.createElement("div");return t.appendChild(i),i.innerHTML=e,t.firstChild.innerText}(e.text)}));Bu.updateCues.call(t,n)})),t.embed.on("loaded",(function(){t.embed.getPaused().then((function(e){td.call(t,!e),e||hu.call(t,t.media,"playing")})),kc(t.embed.element)&&t.supported.ui&&t.embed.element.setAttribute("tabindex",-1)})),t.embed.on("bufferstart",(function(){hu.call(t,t.media,"waiting")})),t.embed.on("bufferend",(function(){hu.call(t,t.media,"playing")})),t.embed.on("play",(function(){td.call(t,!0),hu.call(t,t.media,"playing")})),t.embed.on("pause",(function(){td.call(t,!1)})),t.embed.on("timeupdate",(function(e){t.media.seeking=!1,h=e.seconds,hu.call(t,t.media,"timeupdate")})),t.embed.on("progress",(function(e){t.media.buffered=e.percent,hu.call(t,t.media,"progress"),1===parseInt(e.percent,10)&&hu.call(t,t.media,"canplaythrough"),t.embed.getDuration().then((function(e){e!==t.media.duration&&(t.media.duration=e,hu.call(t,t.media,"durationchange"))}))})),t.embed.on("seeked",(function(){t.media.seeking=!1,hu.call(t,t.media,"seeked")})),t.embed.on("ended",(function(){t.media.paused=!0,hu.call(t,t.media,"ended")})),t.embed.on("error",(function(e){t.media.error=e,hu.call(t,t.media,"error")})),setTimeout((function(){return Zu.build.call(t)}),0)}};
19function nd(e){e&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===e&&(this.media.paused=!e,hu.call(this,this.media,e?"play":"pause"))}function od(e){return e.noCookie?"https://www.youtube-nocookie.com":"http:"===window.location.protocol?"http://www.youtube.com":void 0}var rd={setup:function(){var e=this;if(eu(this.elements.wrapper,this.config.classNames.embed,!0),Tc(window.YT)&&_c(window.YT.Player))rd.ready.call(this);else{var t=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=function(){_c(t)&&t(),rd.ready.call(e)},ed(this.config.urls.youtube.sdk).catch((function(t){e.debug.warn("YouTube API failed to load",t)}))}},getTitle:function(e){var t=this;Pu(Eu(this.config.urls.youtube.api,e)).then((function(e){if(Tc(e)){var i=e.title,n=e.height,o=e.width;t.config.title=i,Zu.setTitle.call(t),t.embed.ratio=[o,n]}bu.call(t)})).catch((function(){bu.call(t)}))},ready:function(){var e=this,t=e.media&&e.media.getAttribute("id");if(Vc(t)||!t.startsWith("youtube-")){var i=e.media.getAttribute("src");Vc(i)&&(i=e.media.getAttribute(this.config.attributes.embed.id));var n=function(e){return Vc(e)?null:e.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/)?RegExp.$2:e}(i),o=function(e){return"".concat(e,"-").concat(Math.floor(1e4*Math.random()))}(e.provider),r=Yc("div",{id:o,"data-poster":e.poster});e.media=Zc(r,e.media);var s=function(e){return"https://i.ytimg.com/vi/".concat(n,"/").concat(e,"default.jpg")};$u(s("maxres"),121).catch((function(){return $u(s("sd"),121)})).catch((function(){return $u(s("hq"))})).then((function(t){return Zu.setPoster.call(e,t.src)})).then((function(t){t.includes("maxres")||(e.elements.poster.style.backgroundSize="cover")})).catch((function(){}));var a=e.config.youtube;e.embed=new window.YT.Player(o,{videoId:n,host:od(a),playerVars:Uc({},{autoplay:e.config.autoplay?1:0,hl:e.config.hl,controls:e.supported.ui?0:1,disablekb:1,playsinline:e.config.fullscreen.iosNative?0:1,cc_load_policy:e.captions.active?1:0,cc_lang_pref:e.config.captions.language,widget_referrer:window?window.location.href:null},a),events:{onError:function(t){if(!e.media.error){var i=t.data,n={2:"The request contains an invalid parameter value. For example, this error occurs if you specify a video ID that does not have 11 characters, or if the video ID contains invalid characters, such as exclamation points or asterisks.",5:"The requested content cannot be played in an HTML5 player or another error related to the HTML5 player has occurred.",100:"The video requested was not found. This error occurs when a video has been removed (for any reason) or has been marked as private.",101:"The owner of the requested video does not allow it to be played in embedded players.",150:"The owner of the requested video does not allow it to be played in embedded players."}[i]||"An unknown error occured";e.media.error={code:i,message:n},hu.call(e,e.media,"error")}},onPlaybackRateChange:function(t){var i=t.target;e.media.playbackRate=i.getPlaybackRate(),hu.call(e,e.media,"ratechange")},onReady:function(t){if(!_c(e.media.play)){var i=t.target;rd.getTitle.call(e,n),e.media.play=function(){nd.call(e,!0),i.playVideo()},e.media.pause=function(){nd.call(e,!1),i.pauseVideo()},e.media.stop=function(){i.stopVideo()},e.media.duration=i.getDuration(),e.media.paused=!0,e.media.currentTime=0,Object.defineProperty(e.media,"currentTime",{get:function(){return Number(i.getCurrentTime())},set:function(t){e.paused&&!e.embed.hasPlayed&&e.embed.mute(),e.media.seeking=!0,hu.call(e,e.media,"seeking"),i.seekTo(t)}}),Object.defineProperty(e.media,"playbackRate",{get:function(){return i.getPlaybackRate()},set:function(e){i.setPlaybackRate(e)}});var o=e.config.volume;Object.defineProperty(e.media,"volume",{get:function(){return o},set:function(t){o=t,i.setVolume(100*o),hu.call(e,e.media,"volumechange")}});var r=e.config.muted;Object.defineProperty(e.media,"muted",{get:function(){return r},set:function(t){var n=Ac(t)?t:r;r=n,i[n?"mute":"unMute"](),hu.call(e,e.media,"volumechange")}}),Object.defineProperty(e.media,"currentSrc",{get:function(){return i.getVideoUrl()}}),Object.defineProperty(e.media,"ended",{get:function(){return e.currentTime===e.duration}});var s=i.getAvailablePlaybackRates();e.options.speed=s.filter((function(t){return e.config.speed.options.includes(t)})),e.supported.ui&&e.media.setAttribute("tabindex",-1),hu.call(e,e.media,"timeupdate"),hu.call(e,e.media,"durationchange"),clearInterval(e.timers.buffering),e.timers.buffering=setInterval((function(){e.media.buffered=i.getVideoLoadedFraction(),(null===e.media.lastBuffered||e.media.lastBuffered<e.media.buffered)&&hu.call(e,e.media,"progress"),e.media.lastBuffered=e.media.buffered,1===e.media.buffered&&(clearInterval(e.timers.buffering),hu.call(e,e.media,"canplaythrough"))}),200),setTimeout((function(){return Zu.build.call(e)}),50)}},onStateChange:function(t){var i=t.target;switch(clearInterval(e.timers.playing),e.media.seeking&&[1,2].includes(t.data)&&(e.media.seeking=!1,hu.call(e,e.media,"seeked")),t.data){case-1:hu.call(e,e.media,"timeupdate"),e.media.buffered=i.getVideoLoadedFraction(),hu.call(e,e.media,"progress");break;case 0:nd.call(e,!1),e.media.loop?(i.stopVideo(),i.playVideo()):hu.call(e,e.media,"ended");break;
19case 1:e.config.autoplay||!e.media.paused||e.embed.hasPlayed?(nd.call(e,!0),hu.call(e,e.media,"playing"),e.timers.playing=setInterval((function(){hu.call(e,e.media,"timeupdate")}),50),e.media.duration!==i.getDuration()&&(e.media.duration=i.getDuration(),hu.call(e,e.media,"durationchange"))):e.media.pause();break;case 2:e.muted||e.embed.unMute(),nd.call(e,!1);break;case 3:hu.call(e,e.media,"waiting")}hu.call(e,e.elements.container,"statechange",!1,{code:t.data})}}})}}},sd={setup:function(){this.media?(eu(this.elements.container,this.config.classNames.type.replace("{0}",this.type),!0),eu(this.elements.container,this.config.classNames.provider.replace("{0}",this.provider),!0),this.isEmbed&&eu(this.elements.container,this.config.classNames.type.replace("{0}","video"),!0),this.isVideo&&(this.elements.wrapper=Yc("div",{class:this.config.classNames.video}),zc(this.media,this.elements.wrapper),this.elements.poster=Yc("div",{class:this.config.classNames.poster}),this.elements.wrapper.appendChild(this.elements.poster)),this.isHTML5?wu.setup.call(this):this.isYouTube?rd.setup.call(this):this.isVimeo&&id.setup.call(this)):this.debug.warn("No media element found!")}},ad=function(){function e(t){var i=this;Ll(this,e),this.player=t,this.config=t.config.ads,this.playing=!1,this.initialized=!1,this.elements={container:null,displayContainer:null},this.manager=null,this.loader=null,this.cuePoints=null,this.events={},this.safetyTimer=null,this.countdownTimer=null,this.managerPromise=new Promise((function(e,t){i.on("loaded",e),i.on("error",t)})),this.load()}return Fl(e,[{key:"load",value:function(){var e=this;this.enabled&&(Tc(window.google)&&Tc(window.google.ima)?this.ready():ed(this.player.config.urls.googleIMA.sdk).then((function(){e.ready()})).catch((function(){e.trigger("error",new Error("Google IMA SDK failed to load"))})))}},{key:"ready",value:function(){var e=this;this.enabled||function(e){e.manager&&e.manager.destroy(),e.elements.displayContainer&&e.elements.displayContainer.destroy(),e.elements.container.remove()}(this),this.startSafetyTimer(12e3,"ready()"),this.managerPromise.then((function(){e.clearSafetyTimer("onAdsManagerLoaded()")})),this.listeners(),this.setupIMA()}},{key:"setupIMA",value:function(){var e=this;this.elements.container=Yc("div",{class:this.player.config.classNames.ads}),this.player.elements.container.appendChild(this.elements.container),google.ima.settings.setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.ENABLED),google.ima.settings.setLocale(this.player.config.ads.language),google.ima.settings.setDisableCustomPlaybackForIOS10Plus(this.player.config.playsinline),this.elements.displayContainer=new google.ima.AdDisplayContainer(this.elements.container,this.player.media),this.loader=new google.ima.AdsLoader(this.elements.displayContainer),this.loader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,(function(t){return e.onAdsManagerLoaded(t)}),!1),this.loader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,(function(t){return e.onAdError(t)}),!1),this.requestAds()}},{key:"requestAds",value:function(){var e=this.player.elements.container;try{var t=new google.ima.AdsRequest;t.adTagUrl=this.tagUrl,t.linearAdSlotWidth=e.offsetWidth,t.linearAdSlotHeight=e.offsetHeight,t.nonLinearAdSlotWidth=e.offsetWidth,t.nonLinearAdSlotHeight=e.offsetHeight,t.forceNonLinearFullSlot=!1,t.setAdWillPlayMuted(!this.player.muted),this.loader.requestAds(t)}catch(e){this.onAdError(e)}}},{key:"pollCountdown",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!t)return clearInterval(this.countdownTimer),void this.elements.container.removeAttribute("data-badge-text");var i=function(){var t=Iu(Math.max(e.manager.getRemainingTime(),0)),i="".concat(Au("advertisement",e.player.config)," - ").concat(t);e.elements.container.setAttribute("data-badge-text",i)};this.countdownTimer=setInterval(i,100)}},{key:"onAdsManagerLoaded",value:function(e){var t=this;if(this.enabled){var i=new google.ima.AdsRenderingSettings;i.restoreCustomPlaybackStateOnAdBreakComplete=!0,i.enablePreloading=!0,this.manager=e.getAdsManager(this.player,i),this.cuePoints=this.manager.getCuePoints(),this.manager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,(function(e){return t.onAdError(e)})),Object.keys(google.ima.AdEvent.Type).forEach((function(e){t.manager.addEventListener(google.ima.AdEvent.Type[e],(function(e){return t.onAdEvent(e)}))})),this.trigger("loaded")}}},{key:"addCuePoints",value:function(){var e=this;
19Vc(this.cuePoints)||this.cuePoints.forEach((function(t){if(0!==t&&-1!==t&&t<e.player.duration){var i=e.player.elements.progress;if(kc(i)){var n=100/e.player.duration*t,o=Yc("span",{class:e.player.config.classNames.cues});o.style.left="".concat(n.toString(),"%"),i.appendChild(o)}}}))}},{key:"onAdEvent",value:function(e){var t,i=this.player.elements.container,n=e.getAd(),o=e.getAdData();switch(t=e.type,hu.call(this.player,this.player.media,"ads".concat(t.replace(/_/g,"").toLowerCase())),e.type){case google.ima.AdEvent.Type.LOADED:this.trigger("loaded"),this.pollCountdown(!0),n.isLinear()||(n.width=i.offsetWidth,n.height=i.offsetHeight);break;case google.ima.AdEvent.Type.STARTED:this.manager.setVolume(this.player.volume);break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:this.player.ended?this.loadAds():this.loader.contentComplete();break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:this.pauseContent();break;case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:this.pollCountdown(),this.resumeContent();break;case google.ima.AdEvent.Type.LOG:o.adError&&this.player.debug.warn("Non-fatal ad error: ".concat(o.adError.getMessage()))}}},{key:"onAdError",value:function(e){this.cancel(),this.player.debug.warn("Ads error",e)}},{key:"listeners",value:function(){var e,t=this,i=this.player.elements.container;this.player.on("canplay",(function(){t.addCuePoints()})),this.player.on("ended",(function(){t.loader.contentComplete()})),this.player.on("timeupdate",(function(){e=t.player.currentTime})),this.player.on("seeked",(function(){var i=t.player.currentTime;Vc(t.cuePoints)||t.cuePoints.forEach((function(n,o){e<n&&n<i&&(t.manager.discardAdBreak(),t.cuePoints.splice(o,1))}))})),window.addEventListener("resize",(function(){t.manager&&t.manager.resize(i.offsetWidth,i.offsetHeight,google.ima.ViewMode.NORMAL)}))}},{key:"play",value:function(){var e=this,t=this.player.elements.container;this.managerPromise||this.resumeContent(),this.managerPromise.then((function(){e.manager.setVolume(e.player.volume),e.elements.displayContainer.initialize();try{e.initialized||(e.manager.init(t.offsetWidth,t.offsetHeight,google.ima.ViewMode.NORMAL),e.manager.start()),e.initialized=!0}catch(t){e.onAdError(t)}})).catch((function(){}))}},{key:"resumeContent",value:function(){this.elements.container.style.zIndex="",this.playing=!1,vu(this.player.media.play())}},{key:"pauseContent",value:function(){this.elements.container.style.zIndex=3,this.playing=!0,this.player.media.pause()}},{key:"cancel",value:function(){this.initialized&&this.resumeContent(),this.trigger("error"),this.loadAds()}},{key:"loadAds",value:function(){var e=this;this.managerPromise.then((function(){e.manager&&e.manager.destroy(),e.managerPromise=new Promise((function(t){e.on("loaded",t),e.player.debug.log(e.manager)})),e.initialized=!1,e.requestAds()})).catch((function(){}))}},{key:"trigger",value:function(e){for(var t=this,i=arguments.length,n=new Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];var r=this.events[e];Pc(r)&&r.forEach((function(e){_c(e)&&e.apply(t,n)}))}},{key:"on",value:function(e,t){return Pc(this.events[e])||(this.events[e]=[]),this.events[e].push(t),this}},{key:"startSafetyTimer",value:function(e,t){var i=this;this.player.debug.log("Safety timer invoked from: ".concat(t)),this.safetyTimer=setTimeout((function(){i.cancel(),i.clearSafetyTimer("startSafetyTimer()")}),e)}},{key:"clearSafetyTimer",value:function(e){Oc(this.safetyTimer)||(this.player.debug.log("Safety timer cleared from: ".concat(e)),clearTimeout(this.safetyTimer),this.safetyTimer=null)}},{key:"enabled",get:function(){var e=this.config;return this.player.isHTML5&&this.player.isVideo&&e.enabled&&(!Vc(e.publisherId)||Gc(e.tagUrl))}},{key:"tagUrl",get:function(){var e=this.config;if(Gc(e.tagUrl))return e.tagUrl;var t={AV_PUBLISHERID:"58c25bb0073ef448b1087ad6",AV_CHANNELID:"5a0458dc28a06145e4519d21",AV_URL:window.location.hostname,cb:Date.now(),AV_WIDTH:640,AV_HEIGHT:480,AV_CDIM2:e.publisherId};return"".concat("https://go.aniview.com/api/adserver6/vast/","?").concat(Vu(t))}}]),e}(),ld=function(e){var t=[];
19return e.split(/\r\n\r\n|\n\n|\r\r/).forEach((function(e){var i={};e.split(/\r\n|\n|\r/).forEach((function(e){if(Dc(i.startTime)){if(!Vc(e.trim())&&Vc(i.text)){var t=e.trim().split("#xywh="),n=Hl(t,1);if(i.text=n[0],t[1]){var o=Hl(t[1].split(","),4);i.x=o[0],i.y=o[1],i.w=o[2],i.h=o[3]}}}else{var r=e.match(/([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})( ?--> ?)([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})/);r&&(i.startTime=60*Number(r[1]||0)*60+60*Number(r[2])+Number(r[3])+Number("0.".concat(r[4])),i.endTime=60*Number(r[6]||0)*60+60*Number(r[7])+Number(r[8])+Number("0.".concat(r[9])))}})),i.text&&t.push(i)})),t},cd=function(e,t){var i={};return e>t.width/t.height?(i.width=t.width,i.height=1/e*t.width):(i.height=t.height,i.width=e*t.height),i},ud=function(){function e(t){Ll(this,e),this.player=t,this.thumbnails=[],this.loaded=!1,this.lastMouseMoveTime=Date.now(),this.mouseDown=!1,this.loadedImages=[],this.elements={thumb:{},scrubbing:{}},this.load()}return Fl(e,[{key:"load",value:function(){var e=this;this.player.elements.display.seekTooltip&&(this.player.elements.display.seekTooltip.hidden=this.enabled),this.enabled&&this.getThumbnails().then((function(){e.enabled&&(e.render(),e.determineContainerAutoSizing(),e.loaded=!0)}))}},{key:"getThumbnails",value:function(){var e=this;return new Promise((function(t){var i=e.player.config.previewThumbnails.src;if(Vc(i))throw new Error("Missing previewThumbnails.src config attribute");var n=function(){e.thumbnails.sort((function(e,t){return e.height-t.height})),e.player.debug.log("Preview thumbnails",e.thumbnails),t()};if(_c(i))i((function(t){e.thumbnails=t,n()}));else{var o=(Rc(i)?[i]:i).map((function(t){return e.getThumbnail(t)}));Promise.all(o).then(n)}}))}},{key:"getThumbnail",value:function(e){var t=this;return new Promise((function(i){Pu(e).then((function(n){var o={frames:ld(n),height:null,urlPrefix:""};o.frames[0].text.startsWith("/")||o.frames[0].text.startsWith("http://")||o.frames[0].text.startsWith("https://")||(o.urlPrefix=e.substring(0,e.lastIndexOf("/")+1));var r=new Image;r.onload=function(){o.height=r.naturalHeight,o.width=r.naturalWidth,t.thumbnails.push(o),i()},r.src=o.urlPrefix+o.frames[0].text}))}))}},{key:"startMove",value:function(e){if(this.loaded&&Nc(e)&&["touchmove","mousemove"].includes(e.type)&&this.player.media.duration){if("touchmove"===e.type)this.seekTime=this.player.media.duration*(this.player.elements.inputs.seek.value/100);else{var t=this.player.elements.progress.getBoundingClientRect(),i=100/t.width*(e.pageX-t.left);this.seekTime=this.player.media.duration*(i/100),this.seekTime<0&&(this.seekTime=0),this.seekTime>this.player.media.duration-1&&(this.seekTime=this.player.media.duration-1),this.mousePosX=e.pageX,this.elements.thumb.time.innerText=Iu(this.seekTime)}this.showImageAtCurrentTime()}}},{key:"endMove",value:function(){this.toggleThumbContainer(!1,!0)}},{key:"startScrubbing",value:function(e){(Oc(e.button)||!1===e.button||0===e.button)&&(this.mouseDown=!0,this.player.media.duration&&(this.toggleScrubbingContainer(!0),this.toggleThumbContainer(!1,!0),this.showImageAtCurrentTime()))}},{key:"endScrubbing",value:function(){var e=this;this.mouseDown=!1,Math.ceil(this.lastTime)===Math.ceil(this.player.media.currentTime)?this.toggleScrubbingContainer(!1):pu.call(this.player,this.player.media,"timeupdate",(function(){e.mouseDown||e.toggleScrubbingContainer(!1)}))}},{key:"listeners",value:function(){var e=this;this.player.on("play",(function(){e.toggleThumbContainer(!1,!0)})),this.player.on("seeked",(function(){e.toggleThumbContainer(!1)})),this.player.on("timeupdate",(function(){e.lastTime=e.player.media.currentTime}))}},{key:"render",value:function(){this.elements.thumb.container=Yc("div",{class:this.player.config.classNames.previewThumbnails.thumbContainer}),this.elements.thumb.imageContainer=Yc("div",{class:this.player.config.classNames.previewThumbnails.imageContainer}),this.elements.thumb.container.appendChild(this.elements.thumb.imageContainer);var e=Yc("div",{class:this.player.config.classNames.previewThumbnails.timeContainer});this.elements.thumb.time=Yc("span",{},"00:00"),e.appendChild(this.elements.thumb.time),this.elements.thumb.container.appendChild(e),kc(this.player.elements.progress)&&this.player.elements.progress.appendChild(this.elements.thumb.container),this.elements.scrubbing.container=Yc("div",{class:this.player.config.classNames.previewThumbnails.scrubbingContainer}),this.player.elements.wrapper.appendChild(this.elements.scrubbing.container)}},{key:"destroy",value:function(){this.elements.thumb.container&&this.elements.thumb.container.remove(),this.elements.scrubbing.container&&this.elements.scrubbing.container.remove()}},{key:"showImageAtCurrentTime",value:function(){var e=this;this.mouseDown?this.setScrubbingContainerSize():this.setThumbContainerSizeAndPos();
vendor: 9,853 bytes, line 19
19var t=this.thumbnails[0].frames.findIndex((function(t){return e.seekTime>=t.startTime&&e.seekTime<=t.endTime})),i=t>=0,n=0;this.mouseDown||this.toggleThumbContainer(i),i&&(this.thumbnails.forEach((function(i,o){e.loadedImages.includes(i.frames[t].text)&&(n=o)})),t!==this.showingThumb&&(this.showingThumb=t,this.loadImage(n)))}},{key:"loadImage",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=this.showingThumb,n=this.thumbnails[t],o=n.urlPrefix,r=n.frames[i],s=n.frames[i].text,a=o+s;if(this.currentImageElement&&this.currentImageElement.dataset.filename===s)this.showImage(this.currentImageElement,r,t,i,s,!1),this.currentImageElement.dataset.index=i,this.removeOldImages(this.currentImageElement);else{this.loadingImage&&this.usingSprites&&(this.loadingImage.onload=null);var l=new Image;l.src=a,l.dataset.index=i,l.dataset.filename=s,this.showingThumbFilename=s,this.player.debug.log("Loading image: ".concat(a)),l.onload=function(){return e.showImage(l,r,t,i,s,!0)},this.loadingImage=l,this.removeOldImages(l)}}},{key:"showImage",value:function(e,t,i,n,o){var r=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];this.player.debug.log("Showing thumb: ".concat(o,". num: ").concat(n,". qual: ").concat(i,". newimg: ").concat(r)),this.setImageSizeAndOffset(e,t),r&&(this.currentImageContainer.appendChild(e),this.currentImageElement=e,this.loadedImages.includes(o)||this.loadedImages.push(o)),this.preloadNearby(n,!0).then(this.preloadNearby(n,!1)).then(this.getHigherQuality(i,e,t,o))}},{key:"removeOldImages",value:function(e){var t=this;Array.from(this.currentImageContainer.children).forEach((function(i){if("img"===i.tagName.toLowerCase()){var n=t.usingSprites?500:1e3;if(i.dataset.index!==e.dataset.index&&!i.dataset.deleting){i.dataset.deleting=!0;var o=t.currentImageContainer;setTimeout((function(){o.removeChild(i),t.player.debug.log("Removing thumb: ".concat(i.dataset.filename))}),n)}}}))}},{key:"preloadNearby",value:function(e){var t=this,i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return new Promise((function(n){setTimeout((function(){var o=t.thumbnails[0].frames[e].text;if(t.showingThumbFilename===o){var r;r=i?t.thumbnails[0].frames.slice(e):t.thumbnails[0].frames.slice(0,e).reverse();var s=!1;r.forEach((function(e){var i=e.text;if(i!==o&&!t.loadedImages.includes(i)){s=!0,t.player.debug.log("Preloading thumb filename: ".concat(i));var r=t.thumbnails[0].urlPrefix+i,a=new Image;a.src=r,a.onload=function(){t.player.debug.log("Preloaded thumb filename: ".concat(i)),t.loadedImages.includes(i)||t.loadedImages.push(i),n()}}})),s||n()}}),300)}))}},{key:"getHigherQuality",value:function(e,t,i,n){var o=this;if(e<this.thumbnails.length-1){var r=t.naturalHeight;this.usingSprites&&(r=i.h),r<this.thumbContainerHeight&&setTimeout((function(){o.showingThumbFilename===n&&(o.player.debug.log("Showing higher quality thumb for: ".concat(n)),o.loadImage(e+1))}),300)}}},{key:"toggleThumbContainer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=this.player.config.classNames.previewThumbnails.thumbContainerShown;this.elements.thumb.container.classList.toggle(i,e),!e&&t&&(this.showingThumb=null,this.showingThumbFilename=null)}},{key:"toggleScrubbingContainer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.player.config.classNames.previewThumbnails.scrubbingContainerShown;this.elements.scrubbing.container.classList.toggle(t,e),e||(this.showingThumb=null,this.showingThumbFilename=null)}},{key:"determineContainerAutoSizing",value:function(){(this.elements.thumb.imageContainer.clientHeight>20||this.elements.thumb.imageContainer.clientWidth>20)&&(this.sizeSpecifiedInCSS=!0)}},{key:"setThumbContainerSizeAndPos",value:function(){if(this.sizeSpecifiedInCSS){if(this.elements.thumb.imageContainer.clientHeight>20&&this.elements.thumb.imageContainer.clientWidth<20){var e=Math.floor(this.elements.thumb.imageContainer.clientHeight*this.thumbAspectRatio);this.elements.thumb.imageContainer.style.width="".concat(e,"px")}else if(this.elements.thumb.imageContainer.clientHeight<20&&this.elements.thumb.imageContainer.clientWidth>20){var t=Math.floor(this.elements.thumb.imageContainer.clientWidth/this.thumbAspectRatio);this.elements.thumb.imageContainer.style.height="".concat(t,"px")}}else{var i=Math.floor(this.thumbContainerHeight*this.thumbAspectRatio);this.elements.thumb.imageContainer.style.height="".concat(this.thumbContainerHeight,"px"),this.elements.thumb.imageContainer.style.width="".concat(i,"px")}this.setThumbContainerPos()}},{key:"setThumbContainerPos",value:function(){var e=this.player.elements.progress.getBoundingClientRect(),t=this.player.elements.container.getBoundingClientRect(),i=this.elements.thumb.container,n=t.left-e.left+10,o=t.right-e.left-i.clientWidth-10,r=this.mousePosX-e.left-i.clientWidth/2;r<n&&(r=n),r>o&&(r=o),i.style.left="".concat(r,"px")}},{key:"setScrubbingContainerSize",value:function(){var e=cd(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight}),t=e.width,i=e.height;this.elements.scrubbing.container.style.width="".concat(t,"px"),this.elements.scrubbing.container.style.height="".concat(i,"px")}},{key:"setImageSizeAndOffset",value:function(e,t){if(this.usingSprites){var i=this.thumbContainerHeight/t.h;e.style.height="".concat(e.naturalHeight*i,"px"),e.style.width="".concat(e.naturalWidth*i,"px"),e.style.left="-".concat(t.x*i,"px"),e.style.top="-".concat(t.y*i,"px")}}},{key:"enabled",get:function(){return this.player.isHTML5&&this.player.isVideo&&this.player.config.previewThumbnails.enabled}},{key:"currentImageContainer",get:function(){return this.mouseDown?this.elements.scrubbing.container:this.elements.thumb.imageContainer}},{key:"usingSprites",get:function(){return Object.keys(this.thumbnails[0].frames[0]).includes("w")}},{key:"thumbAspectRatio",get:function(){return this.usingSprites?this.thumbnails[0].frames[0].w/this.thumbnails[0].frames[0].h:this.thumbnails[0].width/this.thumbnails[0].height}},{key:"thumbContainerHeight",get:function(){return this.mouseDown?cd(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight}).height:this.sizeSpecifiedInCSS?this.elements.thumb.imageContainer.clientHeight:Math.floor(this.player.media.clientWidth/this.thumbAspectRatio/4)}},{key:"currentImageElement",get:function(){return this.mouseDown?this.currentScrubbingImageElement:this.currentThumbnailImageElement},set:function(e){this.mouseDown?this.currentScrubbingImageElement=e:this.currentThumbnailImageElement=e}}]),e}(),dd={insertElements:function(e,t){var i=this;Rc(t)?qc(e,this.media,{src:t}):Pc(t)&&t.forEach((function(t){qc(e,i.media,t)}))},change:function(e){var t=this;Wc(e,"sources.length")?(wu.cancelRequests.call(this),this.destroy.call(this,(function(){t.options.quality=[],Xc(t.media),t.media=null,kc(t.elements.container)&&t.elements.container.removeAttribute("class");var i=e.sources,n=e.type,o=Hl(i,1)[0],r=o.provider,s=void 0===r?Uu.html5:r,a=o.src,l="html5"===s?n:"div",c="html5"===s?{}:{src:a};Object.assign(t,{provider:s,type:n,supported:au.check(n,s,t.config.playsinline),media:Yc(l,c)}),t.elements.container.appendChild(t.media),Ac(e.autoplay)&&(t.config.autoplay=e.autoplay),t.isHTML5&&(t.config.crossorigin&&t.media.setAttribute("crossorigin",""),t.config.autoplay&&t.media.setAttribute("autoplay",""),Vc(e.poster)||(t.poster=e.poster),t.config.loop.active&&t.media.setAttribute("loop",""),t.config.muted&&t.media.setAttribute("muted",""),t.config.playsinline&&t.media.setAttribute("playsinline","")),Zu.addStyleHook.call(t),t.isHTML5&&dd.insertElements.call(t,"source",i),t.config.title=e.title,sd.setup.call(t),t.isHTML5&&Object.keys(e).includes("tracks")&&dd.insertElements.call(t,"track",e.tracks),(t.isHTML5||t.isEmbed&&!t.supported.ui)&&Zu.build.call(t),t.isHTML5&&t.media.load(),Vc(e.previewThumbnails)||(Object.assign(t.config.previewThumbnails,e.previewThumbnails),t.previewThumbnails&&t.previewThumbnails.loaded&&(t.previewThumbnails.destroy(),t.previewThumbnails=null),t.config.previewThumbnails.enabled&&(t.previewThumbnails=new ud(t))),t.fullscreen.update()}),!0)):this.debug.warn("Invalid source format")}},pd=function(){function e(t,i){var n=this;if(Ll(this,e),this.timers={},this.ready=!1,this.loading=!1,this.failed=!1,this.touch=au.touch,this.media=t,Rc(this.media)&&(this.media=document.querySelectorAll(this.media)),(window.jQuery&&this.media instanceof jQuery||Mc(this.media)||Pc(this.media))&&(this.media=this.media[0]),this.config=Uc({},ju,e.defaults,i||{},function(){try{return JSON.parse(n.media.getAttribute("data-plyr-config"))}catch(e){return{}}}()),this.elements={container:null,fullscreen:null,captions:null,buttons:{},display:{},progress:{},inputs:{},settings:{popup:null,menu:null,panels:{},buttons:{}}},this.captions={active:null,currentTrack:-1,meta:new WeakMap},this.fullscreen={active:!1},this.options={speed:[],quality:[]},this.debug=new qu(this.config.debug),this.debug.log("Config",this.config),this.debug.log("Support",au),!Oc(this.media)&&kc(this.media))if(this.media.plyr)this.debug.warn("Target already setup");else if(this.config.enabled)if(au.check().api){var o=this.media.cloneNode(!0);o.autoplay=!1,this.elements.original=o;var r=this.media.tagName.toLowerCase(),s=null,a=null;switch(r){case"div":if(s=this.media.querySelector("iframe"),kc(s)){if(a=Gu(s.getAttribute("src")),this.provider=function(e){return/^(https?:\/\/)?(www\.)?(youtube\.com|youtube-nocookie\.com|youtu\.?be)\/.+$/.test(e)?Uu.youtube:/^https?:\/\/player.vimeo.com\/video\/\d{0,9}(?=\b|\/)/.test(e)?Uu.vimeo:null}(a.toString()),this.elements.container=this.media,this.media=s,this.elements.container.className="",a.search.length){var l=["1","true"];
19l.includes(a.searchParams.get("autoplay"))&&(this.config.autoplay=!0),l.includes(a.searchParams.get("loop"))&&(this.config.loop.active=!0),this.isYouTube?(this.config.playsinline=l.includes(a.searchParams.get("playsinline")),this.config.youtube.hl=a.searchParams.get("hl")):this.config.playsinline=!0}}else this.provider=this.media.getAttribute(this.config.attributes.embed.provider),this.media.removeAttribute(this.config.attributes.embed.provider);if(Vc(this.provider)||!Object.keys(Uu).includes(this.provider))return void this.debug.error("Setup failed: Invalid provider");this.type=Ku;break;case"video":case"audio":this.type=r,this.provider=Uu.html5,this.media.hasAttribute("crossorigin")&&(this.config.crossorigin=!0),this.media.hasAttribute("autoplay")&&(this.config.autoplay=!0),(this.media.hasAttribute("playsinline")||this.media.hasAttribute("webkit-playsinline"))&&(this.config.playsinline=!0),this.media.hasAttribute("muted")&&(this.config.muted=!0),this.media.hasAttribute("loop")&&(this.config.loop.active=!0);break;default:return void this.debug.error("Setup failed: unsupported type")}this.supported=au.check(this.type,this.provider,this.config.playsinline),this.supported.api?(this.eventListeners=[],this.listeners=new Ju(this),this.storage=new _u(this),this.media.plyr=this,kc(this.elements.container)||(this.elements.container=Yc("div",{tabindex:0}),zc(this.media,this.elements.container)),Zu.migrateStyles.call(this),Zu.addStyleHook.call(this),sd.setup.call(this),this.config.debug&&uu.call(this,this.elements.container,this.config.events.join(" "),(function(e){n.debug.log("event: ".concat(e.type))})),this.fullscreen=new Xu(this),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&Zu.build.call(this),this.listeners.container(),this.listeners.global(),this.config.ads.enabled&&(this.ads=new ad(this)),this.isHTML5&&this.config.autoplay&&this.once("canplay",(function(){return vu(n.play())})),this.lastSeekTime=0,this.config.previewThumbnails.enabled&&(this.previewThumbnails=new ud(this))):this.debug.error("Setup failed: no support")}else this.debug.error("Setup failed: no support");else this.debug.error("Setup failed: disabled by config");else this.debug.error("Setup failed: no suitable element passed")}return Fl(e,[{key:"play",value:function(){var e=this;return _c(this.media.play)?(this.ads&&this.ads.enabled&&this.ads.managerPromise.then((function(){return e.ads.play()})).catch((function(){return vu(e.media.play())})),this.media.play()):null}},{key:"pause",value:function(){return this.playing&&_c(this.media.pause)?this.media.pause():null}},{key:"togglePlay",value:function(e){return(Ac(e)?e:!this.playing)?this.play():this.pause()}},{key:"stop",value:function(){this.isHTML5?(this.pause(),this.restart()):_c(this.media.stop)&&this.media.stop()}},{key:"restart",value:function(){this.currentTime=0}},{key:"rewind",value:function(e){this.currentTime-=Dc(e)?e:this.config.seekTime}},{key:"forward",value:function(e){this.currentTime+=Dc(e)?e:this.config.seekTime}},{key:"increaseVolume",value:function(e){var t=this.media.muted?0:this.volume;this.volume=t+(Dc(e)?e:0)}},{key:"decreaseVolume",value:function(e){this.increaseVolume(-e)}},{key:"toggleCaptions",value:function(e){Bu.toggle.call(this,e,!1)}},{key:"airplay",value:function(){au.airplay&&this.media.webkitShowPlaybackTargetPicker()}},{key:"toggleControls",value:function(e){if(this.supported.ui&&!this.isAudio){var t=tu(this.elements.container,this.config.classNames.hideControls),i=void 0===e?void 0:!e,n=eu(this.elements.container,this.config.classNames.hideControls,i);if(n&&Pc(this.config.controls)&&this.config.controls.includes("settings")&&!Vc(this.config.settings)&&Fu.toggleMenu.call(this,!1),n!==t){var o=n?"controlshidden":"controlsshown";hu.call(this,this.media,o)}return!n}return!1}},{key:"on",value:function(e,t){uu.call(this,this.elements.container,e,t)}},{key:"once",value:function(e,t){pu.call(this,this.elements.container,e,t)}},{key:"off",value:function(e,t){du(this.elements.container,e,t)}},{key:"destroy",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.ready){var n=function(){document.body.style.overflow="",t.embed=null,i?(Object.keys(t.elements).length&&(Xc(t.elements.buttons.play),Xc(t.elements.captions),Xc(t.elements.controls),Xc(t.elements.wrapper),t.elements.buttons.play=null,t.elements.captions=null,t.elements.controls=null,t.elements.wrapper=null),_c(e)&&e()):(fu.call(t),wu.cancelRequests.call(t),Zc(t.elements.original,t.elements.container),hu.call(t,t.elements.original,"destroyed",!0),_c(e)&&e.call(t.elements.original),t.ready=!1,setTimeout((function(){t.elements=null,t.media=null}),200))};this.stop(),clearTimeout(this.timers.loading),clearTimeout(this.timers.controls),clearTimeout(this.timers.resized),this.isHTML5?(Zu.toggleNativeControls.call(this,!0),n()):this.isYouTube?(clearInterval(this.timers.buffering),clearInterval(this.timers.playing),null!==this.embed&&_c(this.embed.destroy)&&this.embed.destroy(),n()):this.isVimeo&&(null!==this.embed&&this.embed.unload().then(n),setTimeout(n,200))}}},{key:"supports",value:function(e){return au.mime.call(this,e)}},{key:"isHTML5",get:function(){return this.provider===Uu.html5}},{key:"isEmbed",get:function(){return this.isYouTube||this.isVimeo}},{key:"isYouTube",get:function(){return this.provider===Uu.youtube}},{key:"isVimeo",get:function(){return this.provider===Uu.vimeo}},{key:"isVideo",get:function(){return this.type===Ku}},{key:"isAudio",get:function(){return this.type===zu}},{key:"playing",get:function(){return Boolean(this.ready&&!this.paused&&!this.ended)}},{key:"paused",get:function(){return Boolean(this.media.paused)}},{key:"stopped",get:function(){return Boolean(this.paused&&0===this.currentTime)}},{key:"ended",get:function(){return Boolean(this.media.ended)}},{key:"currentTime",set:function(e){if(this.duration){var t=Dc(e)&&e>0;this.media.currentTime=t?Math.min(e,this.duration):0,this.debug.log("Seeking to ".concat(this.currentTime," seconds"))}},get:function(){return Number(this.media.currentTime)}},{key:"buffered",get:function(){var e=this.media.buffered;return Dc(e)?e:e&&e.length&&this.duration>0?e.end(0)/this.duration:0}},{key:"seeking",get:function(){return Boolean(this.media.seeking)}},{key:"duration",get:function(){var e=parseFloat(this.config.duration),t=(this.media||{}).duration,i=Dc(t)&&t!==1/0?t:0;return e||i}},{key:"volume",set:function(e){var t=e;Rc(t)&&(t=Number(t)),Dc(t)||(t=this.storage.get("volume")),Dc(t)||(t=this.config.volume),t>1&&(t=1),t<0&&(t=0),this.config.volume=t,this.media.volume=t,!Vc(e)&&this.muted&&t>0&&(this.muted=!1)},get:function(){return Number(this.media.volume)}},{key:"muted",set:function(e){var t=e;Ac(t)||(t=this.storage.get("muted")),Ac(t)||(t=this.config.muted),this.config.muted=t,this.media.muted=t},get:function(){return Boolean(this.media.muted)}},{key:"hasAudio",get:function(){return!this.isHTML5||!!this.isAudio||Boolean(this.media.mozHasAudio)||Boolean(this.media.webkitAudioDecodedByteCount)||Boolean(this.media.audioTracks&&this.media.audioTracks.length)}},{key:"speed",set:function(e){var t=this,i=null;Dc(e)&&(i=e),Dc(i)||(i=this.storage.get("speed")),Dc(i)||(i=this.config.speed.selected);var n=this.minimumSpeed,o=this.maximumSpeed;i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:255;return Math.min(Math.max(e,t),i)}(i,n,o),this.config.speed.selected=i,setTimeout((function(){t.media.playbackRate=i}),0)},get:function(){return Number(this.media.playbackRate)}},{key:"minimumSpeed",get:function(){return this.isYouTube?Math.min.apply(Math,Wl(this.options.speed)):this.isVimeo?.5:.0625}},{key:"maximumSpeed",get:function(){return this.isYouTube?Math.max.apply(Math,Wl(this.options.speed)):this.isVimeo?2:16}},{key:"quality",set:function(e){var t=this.config.quality,i=this.options.quality;if(i.length){var n=[!Vc(e)&&Number(e),this.storage.get("quality"),t.selected,t.default].find(Dc),o=!0;if(!i.includes(n)){var r=function(e,t){return Pc(e)&&e.length?e.reduce((function(e,i){return Math.abs(i-t)<Math.abs(e-t)?i:e})):null}(i,n);this.debug.warn("Unsupported quality option: ".concat(n,", using ").concat(r," instead")),n=r,o=!1}
19t.selected=n,this.media.quality=n,o&&this.storage.set({quality:n})}},get:function(){return this.media.quality}},{key:"loop",set:function(e){var t=Ac(e)?e:this.config.loop.active;this.config.loop.active=t,this.media.loop=t},get:function(){return Boolean(this.media.loop)}},{key:"source",set:function(e){dd.change.call(this,e)},get:function(){return this.media.currentSrc}},{key:"download",get:function(){var e=this.config.urls.download;return Gc(e)?e:this.source},set:function(e){Gc(e)&&(this.config.urls.download=e,Fu.setDownloadUrl.call(this))}},{key:"poster",set:function(e){this.isVideo?Zu.setPoster.call(this,e,!1).catch((function(){})):this.debug.warn("Poster can only be set for video")},get:function(){return this.isVideo?this.media.getAttribute("poster")||this.media.getAttribute("data-poster"):null}},{key:"ratio",get:function(){if(!this.isVideo)return null;var e=mu(Cu.call(this));return Pc(e)?e.join(":"):e},set:function(e){this.isVideo?Rc(e)&&yu(e)?(this.config.ratio=e,bu.call(this)):this.debug.error("Invalid aspect ratio specified (".concat(e,")")):this.debug.warn("Aspect ratio can only be set for video")}},{key:"autoplay",set:function(e){var t=Ac(e)?e:this.config.autoplay;this.config.autoplay=t},get:function(){return Boolean(this.config.autoplay)}},{key:"currentTrack",set:function(e){Bu.set.call(this,e,!1)},get:function(){var e=this.captions,t=e.toggled,i=e.currentTrack;return t?i:-1}},{key:"language",set:function(e){Bu.setLanguage.call(this,e,!1)},get:function(){return(Bu.getCurrentTrack.call(this)||{}).language}},{key:"pip",set:function(e){if(au.pip){var t=Ac(e)?e:!this.pip;_c(this.media.webkitSetPresentationMode)&&this.media.webkitSetPresentationMode(t?Hu:Wu),_c(this.media.requestPictureInPicture)&&(!this.pip&&t?this.media.requestPictureInPicture():this.pip&&!t&&document.exitPictureInPicture())}},get:function(){return au.pip?Vc(this.media.webkitPresentationMode)?this.media===document.pictureInPictureElement:this.media.webkitPresentationMode===Hu:null}}],[{key:"supported",value:function(e,t,i){return au.check(e,t,i)}},{key:"loadSprite",value:function(e,t){return Mu(e,t)}},{key:"setup",value:function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null;return Rc(t)?n=Array.from(document.querySelectorAll(t)):Mc(t)?n=Array.from(t):Pc(t)&&(n=t.filter(kc)),Vc(n)?null:n.map((function(t){return new e(t,i)}))}}]),e}();pd.defaults=function(e){return JSON.parse(JSON.stringify(e))}(ju);var hd={name:"VuePlyr",props:{options:{type:Object,required:!1,default:function(){return{}}}},data:function(){return{player:{}}},computed:{opts:function(){var e=this.options;return Object.prototype.hasOwnProperty.call(this.options,"hideYouTubeDOMError")||(e.hideYouTubeDOMError=!0),e}},mounted:function(){this.player=new pd(this.$el,this.opts)},beforeUnmount:function(){try{this.player.destroy()}catch(n){this.opts.hideYouTubeDOMError&&"The YouTube player is not attached to the DOM."===n.message||console.error(n)}},render:function(){var e=this.$slots.default;return"function"==typeof e?e()[0]:e},install:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.plyr&&(hd.props.options.default=function(){return Ei({},t.plyr)}),e.component(hd.name,hd)}};t.Z=hd},9841:function(e,t,i){var n=i(5677),o=i(6907);async function r(e,...t){for(const i of t)switch(typeof i){case"string":await s(e,i);break;case"number":await a(i);break;case"function":await i(e,...t);break;default:await i}}async function s(e,t){const i=function(e,[...t]){return[...e,NaN].findIndex(((e,i)=>t[i]!==e))}(e.textContent,t);await async function(e,t,i=60){for(const n of function*(e){for(const t of e)yield e=>requestAnimationFrame((()=>e.textContent=t))}(t))n(e),await a(i+i*(Math.random()-.5))}(e,[...c(e.textContent,i),...l(t,i)])}async function a(e){await new Promise((t=>setTimeout(t,e)))}function*l([...e],t=0,i=e.length){for(;t<i;)yield e.slice(0,++t).join("")}function*c([...e],t=0,i=e.length){for(;i>t;)yield e.slice(0,--i).join("")}const u=r;var d=(0,n.aZ)({name:"Typical",props:{steps:{type:Array,required:!0},wrapper:{type:String,default:"div"},loop:{type:Number,default:1}},render(){return(0,n.h)(this.wrapper,{ref:"myRef"})},setup:({steps:e,loop:t})=>{const i=(0,o.iH)(null);return(0,n.bv)((()=>{const n=i.value;t===1/0?r(n,...e,u):"number"==typeof t&&t>0?r(n,...Array(t).fill(e).flat()):r(n,...e)})),{myRef:i}}});t.Z=d},7364:function(e,t,i){i.d(t,{MT:function(){return te},oR:function(){return y}});i(2106);var n=i(5677),o=i(6907);function r(){return s().__VUE_DEVTOOLS_GLOBAL_HOOK__}function s(){return"undefined"!==typeof navigator&&"undefined"!==typeof window?window:"undefined"!==typeof i.g?i.g:{}}const a="function"===typeof Proxy,l="devtools-plugin:setup",c="plugin:settings:set";let u,d;function p(){var e;return void 0!==u||("undefined"!==typeof window&&window.performance?(u=!0,d=window.performance):"undefined"!==typeof i.g&&(null===(e=i.g.perf_hooks)||void 0===e?void 0:e.performance)?(u=!0,d=i.g.perf_hooks.performance):u=!1),u}function h(){return p()?d.now():Date.now()}class f{constructor(e,t){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=e,this.hook=t;const i={};if(e.settings)for(const s in e.settings){const t=e.settings[s];i[s]=t.defaultValue}const n=`__vue-devtools-plugin-settings__${e.id}`;let o=Object.assign({},i);try{const e=localStorage.getItem(n),t=JSON.parse(e);Object.assign(o,t)}catch(r){}this.fallbacks={getSettings(){return o},setSettings(e){try{localStorage.setItem(n,JSON.stringify(e))}catch(r){}o=e},now(){return h()}},t&&t.on(c,((e,t)=>{e===this.plugin.id&&this.fallbacks.setSettings(t)})),this.proxiedOn=new Proxy({},{get:(e,t)=>this.target?this.target.on[t]:(...e)=>{this.onQueue.push({method:t,args:e})}}),this.proxiedTarget=new Proxy({},{get:(e,t)=>this.target?this.target[t]:"on"===t?this.proxiedOn:Object.keys(this.fallbacks).includes(t)?(...e)=>(this.targetQueue.push({method:t,args:e,resolve:()=>{}}),this.fallbacks[t](...e)):(...e)=>new Promise((i=>{this.targetQueue.push({method:t,args:e,resolve:i})}))})}async setRealTarget(e){this.target=e;for(const t of this.onQueue)this.target.on[t.method](...t.args);for(const t of this.targetQueue)t.resolve(await this.target[t.method](...t.args))}}function g(e,t){const i=e,n=s(),o=r(),c=a&&i.enableEarlyProxy;if(!o||!n.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__&&c){const e=c?new f(i,o):null,r=n.__VUE_DEVTOOLS_PLUGINS__=n.__VUE_DEVTOOLS_PLUGINS__||[];r.push({pluginDescriptor:i,setupFn:t,proxy:e}),e&&t(e.proxiedTarget)}else o.emit(l,e,t)}
20/*!
21 * vuex v4.1.0
22 * (c) 2022 Evan You
23 * @license MIT
24 */
25var v="store";function y(e){return void 0===e&&(e=null),(0,n.f3)(null!==e?e:v)}function m(e,t){Object.keys(e).forEach((function(i){return t(e[i],i)}))}function C(e){return null!==e&&"object"===typeof e}function b(e){return e&&"function"===typeof e.then}function w(e,t){return function(){return e(t)}}function S(e,t,i){return t.indexOf(e)<0&&(i&&i.prepend?t.unshift(e):t.push(e)),function(){var i=t.indexOf(e);i>-1&&t.splice(i,1)}}function E(e,t){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var i=e.state;O(e,i,[],e._modules.root,!0),x(e,i,t)}function x(e,t,i){var r=e._state,s=e._scope;e.getters={},e._makeLocalGettersCache=Object.create(null);var a=e._wrappedGetters,l={},c={},u=(0,o.B)(!0);u.run((function(){m(a,(function(t,i){l[i]=w(t,e),c[i]=(0,n.Fl)((function(){return l[i]()})),Object.defineProperty(e.getters,i,{get:function(){return c[i].value},enumerable:!0})}
vendor: 8,694 bytes, line 25
25))})),e._state=(0,o.qj)({data:t}),e._scope=u,e.strict&&P(e),r&&i&&e._withCommit((function(){r.data=null})),s&&s.stop()}function O(e,t,i,n,o){var r=!i.length,s=e._modules.getNamespace(i);if(n.namespaced&&(e._modulesNamespaceMap[s],e._modulesNamespaceMap[s]=n),!r&&!o){var a=M(t,i.slice(0,-1)),l=i[i.length-1];e._withCommit((function(){a[l]=n.state}))}var c=n.context=T(e,s,i);n.forEachMutation((function(t,i){var n=s+i;R(e,n,t,c)})),n.forEachAction((function(t,i){var n=t.root?i:s+i,o=t.handler||t;A(e,n,o,c)})),n.forEachGetter((function(t,i){var n=s+i;_(e,n,t,c)})),n.forEachChild((function(n,r){O(e,t,i.concat(r),n,o)}))}function T(e,t,i){var n=""===t,o={dispatch:n?e.dispatch:function(i,n,o){var r=k(i,n,o),s=r.payload,a=r.options,l=r.type;return a&&a.root||(l=t+l),e.dispatch(l,s)},commit:n?e.commit:function(i,n,o){var r=k(i,n,o),s=r.payload,a=r.options,l=r.type;a&&a.root||(l=t+l),e.commit(l,s,a)}};return Object.defineProperties(o,{getters:{get:n?function(){return e.getters}:function(){return D(e,t)}},state:{get:function(){return M(e.state,i)}}}),o}function D(e,t){if(!e._makeLocalGettersCache[t]){var i={},n=t.length;Object.keys(e.getters).forEach((function(o){if(o.slice(0,n)===t){var r=o.slice(n);Object.defineProperty(i,r,{get:function(){return e.getters[o]},enumerable:!0})}})),e._makeLocalGettersCache[t]=i}return e._makeLocalGettersCache[t]}function R(e,t,i,n){var o=e._mutations[t]||(e._mutations[t]=[]);o.push((function(t){i.call(e,n.state,t)}))}function A(e,t,i,n){var o=e._actions[t]||(e._actions[t]=[]);o.push((function(t){var o=i.call(e,{dispatch:n.dispatch,commit:n.commit,getters:n.getters,state:n.state,rootGetters:e.getters,rootState:e.state},t);return b(o)||(o=Promise.resolve(o)),e._devtoolHook?o.catch((function(t){throw e._devtoolHook.emit("vuex:error",t),t})):o}))}function _(e,t,i,n){e._wrappedGetters[t]||(e._wrappedGetters[t]=function(e){return i(n.state,n.getters,e.state,e.getters)})}function P(e){(0,n.YP)((function(){return e._state.data}),(function(){0}),{deep:!0,flush:"sync"})}function M(e,t){return t.reduce((function(e,t){return e[t]}),e)}function k(e,t,i){return C(e)&&e.type&&(i=t,t=e,e=e.type),{type:e,payload:t,options:i}}var N="vuex bindings",L="vuex:mutations",I="vuex:actions",F="vuex",G=0;function V(e,t){g({id:"org.vuejs.vuex",app:e,label:"Vuex",homepage:"https://next.vuex.vuejs.org/",logo:"https://vuejs.org/images/icons/favicon-96x96.png",packageName:"vuex",componentStateTypes:[N]},(function(i){i.addTimelineLayer({id:L,label:"Vuex Mutations",color:B}),i.addTimelineLayer({id:I,label:"Vuex Actions",color:B}),i.addInspector({id:F,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),i.on.getInspectorTree((function(i){if(i.app===e&&i.inspectorId===F)if(i.filter){var n=[];K(n,t._modules.root,i.filter,""),i.rootNodes=n}else i.rootNodes=[z(t._modules.root,"")]})),i.on.getInspectorState((function(i){if(i.app===e&&i.inspectorId===F){var n=i.nodeId;D(t,n),i.state=Y(X(t._modules,n),"root"===n?t.getters:t._makeLocalGettersCache,n)}})),i.on.editInspectorState((function(i){if(i.app===e&&i.inspectorId===F){var n=i.nodeId,o=i.path;"root"!==n&&(o=n.split("/").filter(Boolean).concat(o)),t._withCommit((function(){i.set(t._state.data,o,i.state.value)}))}})),t.subscribe((function(e,t){var n={};e.payload&&(n.payload=e.payload),n.state=t,i.notifyComponentUpdate(),i.sendInspectorTree(F),i.sendInspectorState(F),i.addTimelineEvent({layerId:L,event:{time:Date.now(),title:e.type,data:n}})})),t.subscribeAction({before:function(e,t){var n={};e.payload&&(n.payload=e.payload),e._id=G++,e._time=Date.now(),n.state=t,i.addTimelineEvent({layerId:I,event:{time:e._time,title:e.type,groupId:e._id,subtitle:"start",data:n}})},after:function(e,t){var n={},o=Date.now()-e._time;n.duration={_custom:{type:"duration",display:o+"ms",tooltip:"Action duration",value:o}},e.payload&&(n.payload=e.payload),n.state=t,i.addTimelineEvent({layerId:I,event:{time:Date.now(),title:e.type,groupId:e._id,subtitle:"end",data:n}})}})}))}var B=8702998,j=6710886,H=16777215,W={label:"namespaced",textColor:H,backgroundColor:j};function U(e){return e&&"root"!==e?e.split("/").slice(-2,-1)[0]:"Root"}function z(e,t){return{id:t||"root",label:U(t),tags:e.namespaced?[W]:[],children:Object.keys(e._children).map((function(i){return z(e._children[i],t+i+"/")}))}}function K(e,t,i,n){n.includes(i)&&e.push({id:n||"root",label:n.endsWith("/")?n.slice(0,n.length-1):n||"Root",tags:t.namespaced?[W]:[]}),Object.keys(t._children).forEach((function(o){K(e,t._children[o],i,n+o+"/")}))}function Y(e,t,i){t="root"===i?t:t[i];var n=Object.keys(t),o={state:Object.keys(e.state).map((function(t){return{key:t,editable:!0,value:e.state[t]}}))};if(n.length){var r=q(t);o.getters=Object.keys(r).map((function(e){return{key:e.endsWith("/")?U(e):e,editable:!1,value:$((function(){return r[e]}))}}))}return o}function q(e){var t={};return Object.keys(e).forEach((function(i){var n=i.split("/");if(n.length>1){var o=t,r=n.pop();n.forEach((function(e){o[e]||(o[e]={_custom:{value:{},display:e,tooltip:"Module",abstract:!0}}),o=o[e]._custom.value})),o[r]=$((function(){return e[i]}))}else t[i]=$((function(){return e[i]}))})),t}function X(e,t){var i=t.split("/").filter((function(e){return e}));return i.reduce((function(e,n,o){var r=e[n];if(!r)throw new Error('Missing module "'+n+'" for path "'+t+'".');return o===i.length-1?r:r._children}),"root"===t?e:e.root._children)}function $(e){try{return e()}catch(t){return t}}var Z=function(e,t){this.runtime=t,this._children=Object.create(null),this._rawModule=e;var i=e.state;this.state=("function"===typeof i?i():i)||{}},J={namespaced:{configurable:!0}};J.namespaced.get=function(){return!!this._rawModule.namespaced},Z.prototype.addChild=function(e,t){this._children[e]=t},Z.prototype.removeChild=function(e){delete this._children[e]},Z.prototype.getChild=function(e){return this._children[e]},Z.prototype.hasChild=function(e){return e in this._children},Z.prototype.update=function(e){this._rawModule.namespaced=e.namespaced,e.actions&&(this._rawModule.actions=e.actions),e.mutations&&(this._rawModule.mutations=e.mutations),e.getters&&(this._rawModule.getters=e.getters)},Z.prototype.forEachChild=function(e){m(this._children,e)},Z.prototype.forEachGetter=function(e){this._rawModule.getters&&m(this._rawModule.getters,e)},Z.prototype.forEachAction=function(e){this._rawModule.actions&&m(this._rawModule.actions,e)},Z.prototype.forEachMutation=function(e){this._rawModule.mutations&&m(this._rawModule.mutations,e)},Object.defineProperties(Z.prototype,J);var Q=function(e){this.register([],e,!1)};function ee(e,t,i){if(t.update(i),i.modules)for(var n in i.modules){if(!t.getChild(n))return void 0;ee(e.concat(n),t.getChild(n),i.modules[n])}}Q.prototype.get=function(e){return e.reduce((function(e,t){return e.getChild(t)}),this.root)},Q.prototype.getNamespace=function(e){var t=this.root;return e.reduce((function(e,i){return t=t.getChild(i),e+(t.namespaced?i+"/":"")}),"")},Q.prototype.update=function(e){ee([],this.root,e)},Q.prototype.register=function(e,t,i){var n=this;void 0===i&&(i=!0);var o=new Z(t,i);if(0===e.length)this.root=o;else{var r=this.get(e.slice(0,-1));r.addChild(e[e.length-1],o)}t.modules&&m(t.modules,(function(t,o){n.register(e.concat(o),t,i)}))},Q.prototype.unregister=function(e){var t=this.get(e.slice(0,-1)),i=e[e.length-1],n=t.getChild(i);n&&n.runtime&&t.removeChild(i)},Q.prototype.isRegistered=function(e){var t=this.get(e.slice(0,-1)),i=e[e.length-1];return!!t&&t.hasChild(i)};function te(e){return new ie(e)}var ie=function(e){var t=this;void 0===e&&(e={});var i=e.plugins;void 0===i&&(i=[]);var n=e.strict;void 0===n&&(n=!1);var o=e.devtools;this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new Q(e),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._scope=null,this._devtools=o;var r=this,s=this,a=s.dispatch,l=s.commit;this.dispatch=function(e,t){return a.call(r,e,t)},this.commit=function(e,t,i){return l.call(r,e,t,i)},this.strict=n;var c=this._modules.root.state;O(this,c,[],this._modules.root),x(this,c),i.forEach((function(e){return e(t)}))},ne={state:{configurable:!0}};ie.prototype.install=function(e,t){e.provide(t||v,this),e.config.globalProperties.$store=this;var i=void 0!==this._devtools&&this._devtools;i&&V(e,this)},ne.state.get=function(){return this._state.data},ne.state.set=function(e){0},ie.prototype.commit=function(e,t,i){var n=this,o=k(e,t,i),r=o.type,s=o.payload,a=(o.options,{type:r,payload:s}),l=this._mutations[r];l&&(this._withCommit((function(){l.forEach((function(e){e(s)}))}
vendor: 9,987 bytes, line 25
25)),this._subscribers.slice().forEach((function(e){return e(a,n.state)})))},ie.prototype.dispatch=function(e,t){var i=this,n=k(e,t),o=n.type,r=n.payload,s={type:o,payload:r},a=this._actions[o];if(a){try{this._actionSubscribers.slice().filter((function(e){return e.before})).forEach((function(e){return e.before(s,i.state)}))}catch(c){0}var l=a.length>1?Promise.all(a.map((function(e){return e(r)}))):a[0](r);return new Promise((function(e,t){l.then((function(t){try{i._actionSubscribers.filter((function(e){return e.after})).forEach((function(e){return e.after(s,i.state)}))}catch(c){0}e(t)}),(function(e){try{i._actionSubscribers.filter((function(e){return e.error})).forEach((function(t){return t.error(s,i.state,e)}))}catch(c){0}t(e)}))}))}},ie.prototype.subscribe=function(e,t){return S(e,this._subscribers,t)},ie.prototype.subscribeAction=function(e,t){var i="function"===typeof e?{before:e}:e;return S(i,this._actionSubscribers,t)},ie.prototype.watch=function(e,t,i){var o=this;return(0,n.YP)((function(){return e(o.state,o.getters)}),t,Object.assign({},i))},ie.prototype.replaceState=function(e){var t=this;this._withCommit((function(){t._state.data=e}))},ie.prototype.registerModule=function(e,t,i){void 0===i&&(i={}),"string"===typeof e&&(e=[e]),this._modules.register(e,t),O(this,this.state,e,this._modules.get(e),i.preserveState),x(this,this.state)},ie.prototype.unregisterModule=function(e){var t=this;"string"===typeof e&&(e=[e]),this._modules.unregister(e),this._withCommit((function(){var i=M(t.state,e.slice(0,-1));delete i[e[e.length-1]]})),E(this)},ie.prototype.hasModule=function(e){return"string"===typeof e&&(e=[e]),this._modules.isRegistered(e)},ie.prototype.hotUpdate=function(e){this._modules.update(e),E(this,!0)},ie.prototype._withCommit=function(e){var t=this._committing;this._committing=!0,e(),this._committing=t},Object.defineProperties(ie.prototype,ne);se((function(e,t){var i={};return oe(t).forEach((function(t){var n=t.key,o=t.val;i[n]=function(){var t=this.$store.state,i=this.$store.getters;if(e){var n=ae(this.$store,"mapState",e);if(!n)return;t=n.context.state,i=n.context.getters}return"function"===typeof o?o.call(this,t,i):t[o]},i[n].vuex=!0})),i})),se((function(e,t){var i={};return oe(t).forEach((function(t){var n=t.key,o=t.val;i[n]=function(){var t=[],i=arguments.length;while(i--)t[i]=arguments[i];var n=this.$store.commit;if(e){var r=ae(this.$store,"mapMutations",e);if(!r)return;n=r.context.commit}return"function"===typeof o?o.apply(this,[n].concat(t)):n.apply(this.$store,[o].concat(t))}})),i})),se((function(e,t){var i={};return oe(t).forEach((function(t){var n=t.key,o=t.val;o=e+o,i[n]=function(){if(!e||ae(this.$store,"mapGetters",e))return this.$store.getters[o]},i[n].vuex=!0})),i})),se((function(e,t){var i={};return oe(t).forEach((function(t){var n=t.key,o=t.val;i[n]=function(){var t=[],i=arguments.length;while(i--)t[i]=arguments[i];var n=this.$store.dispatch;if(e){var r=ae(this.$store,"mapActions",e);if(!r)return;n=r.context.dispatch}return"function"===typeof o?o.apply(this,[n].concat(t)):n.apply(this.$store,[o].concat(t))}})),i}));function oe(e){return re(e)?Array.isArray(e)?e.map((function(e){return{key:e,val:e}})):Object.keys(e).map((function(t){return{key:t,val:e[t]}})):[]}function re(e){return Array.isArray(e)||C(e)}function se(e){return function(t,i){return"string"!==typeof t?(i=t,t=""):"/"!==t.charAt(t.length-1)&&(t+="/"),e(t,i)}}function ae(e,t,i){var n=e._modulesNamespaceMap[i];return n}},1216:function(e,t,i){var n=i(1051),o=i(7674),r=TypeError;e.exports=function(e){if(n(e))return e;throw new r(o(e)+" is not a function")}},993:function(e,t,i){var n=i(1051),o=String,r=TypeError;e.exports=function(e){if("object"==typeof e||n(e))return e;throw new r("Can't set "+o(e)+" as a prototype")}},6036:function(e,t,i){var n=i(9479),o=TypeError;e.exports=function(e,t){if(n(t,e))return e;throw new o("Incorrect invocation")}},7033:function(e,t,i){var n=i(1203),o=String,r=TypeError;e.exports=function(e){if(n(e))return e;throw new r(o(e)+" is not an object")}},6762:function(e){e.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},6221:function(e,t,i){var n,o,r,s=i(6762),a=i(7233),l=i(8386),c=i(1051),u=i(1203),d=i(4592),p=i(3242),h=i(7674),f=i(7917),g=i(6511),v=i(2917),y=i(9479),m=i(3587),C=i(4205),b=i(4525),w=i(6482),S=i(2657),E=S.enforce,x=S.get,O=l.Int8Array,T=O&&O.prototype,D=l.Uint8ClampedArray,R=D&&D.prototype,A=O&&m(O),_=T&&m(T),P=Object.prototype,M=l.TypeError,k=b("toStringTag"),N=w("TYPED_ARRAY_TAG"),L="TypedArrayConstructor",I=s&&!!C&&"Opera"!==p(l.opera),F=!1,G={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},V={BigInt64Array:8,BigUint64Array:8},B=function(e){if(!u(e))return!1;var t=p(e);return"DataView"===t||d(G,t)||d(V,t)},j=function(e){var t=m(e);if(u(t)){var i=x(t);return i&&d(i,L)?i[L]:j(t)}},H=function(e){if(!u(e))return!1;var t=p(e);return d(G,t)||d(V,t)},W=function(e){if(H(e))return e;throw new M("Target is not a typed array")},U=function(e){if(c(e)&&(!C||y(A,e)))return e;throw new M(h(e)+" is not a typed array constructor")},z=function(e,t,i,n){if(a){if(i)for(var o in G){var r=l[o];if(r&&d(r.prototype,e))try{delete r.prototype[e]}catch(s){try{r.prototype[e]=t}catch(c){}}}_[e]&&!i||g(_,e,i?t:I&&T[e]||t,n)}},K=function(e,t,i){var n,o;if(a){if(C){if(i)for(n in G)if(o=l[n],o&&d(o,e))try{delete o[e]}catch(r){}if(A[e]&&!i)return;try{return g(A,e,i?t:I&&A[e]||t)}catch(r){}}for(n in G)o=l[n],!o||o[e]&&!i||g(o,e,t)}};for(n in G)o=l[n],r=o&&o.prototype,r?E(r)[L]=o:I=!1;for(n in V)o=l[n],r=o&&o.prototype,r&&(E(r)[L]=o);if((!I||!c(A)||A===Function.prototype)&&(A=function(){throw new M("Incorrect invocation")},I))for(n in G)l[n]&&C(l[n],A);if((!I||!_||_===P)&&(_=A.prototype,I))for(n in G)l[n]&&C(l[n].prototype,_);if(I&&m(R)!==_&&C(R,_),a&&!d(_,k))for(n in F=!0,v(_,k,{configurable:!0,get:function(){return u(this)?this[N]:void 0}}),G)l[n]&&f(l[n],N,n);e.exports={NATIVE_ARRAY_BUFFER_VIEWS:I,TYPED_ARRAY_TAG:F&&N,aTypedArray:W,aTypedArrayConstructor:U,exportTypedArrayMethod:z,exportTypedArrayStaticMethod:K,getTypedArrayConstructor:j,isView:B,isTypedArray:H,TypedArray:A,TypedArrayPrototype:_}},3320:function(e,t,i){var n=i(8109);e.exports=function(e,t,i){var o=0,r=arguments.length>2?i:n(t),s=new e(r);while(r>o)s[o]=t[o++];return s}},7156:function(e,t,i){var n=i(2235),o=i(655),r=i(8109),s=function(e){return function(t,i,s){var a,l=n(t),c=r(l),u=o(s,c);if(e&&i!==i){while(c>u)if(a=l[u++],a!==a)return!0}else for(;c>u;u++)if((e||u in l)&&l[u]===i)return e||u||0;return!e&&-1}};e.exports={includes:s(!0),indexOf:s(!1)}},7665:function(e,t,i){var n=i(7233),o=i(7487),r=TypeError,s=Object.getOwnPropertyDescriptor,a=n&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();e.exports=a?function(e,t){if(o(e)&&!s(e,"length").writable)throw new r("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},9554:function(e,t,i){var n=i(3930);e.exports=n([].slice)},2740:function(e,t,i){var n=i(8109);e.exports=function(e,t){for(var i=n(e),o=new t(i),r=0;r<i;r++)o[r]=e[i-r-1];return o}},6210:function(e,t,i){var n=i(8109),o=i(5342),r=RangeError;e.exports=function(e,t,i,s){var a=n(e),l=o(i),c=l<0?a+l:l;if(c>=a||c<0)throw new r("Incorrect index");for(var u=new t(a),d=0;d<a;d++)u[d]=d===c?s:e[d];return u}},7850:function(e,t,i){var n=i(3930),o=n({}.toString),r=n("".slice);e.exports=function(e){return r(o(e),8,-1)}},3242:function(e,t,i){var n=i(8049),o=i(1051),r=i(7850),s=i(4525),a=s("toStringTag"),l=Object,c="Arguments"===r(function(){return arguments}()),u=function(e,t){try{return e[t]}catch(i){}};e.exports=n?r:function(e){var t,i,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(i=u(t=l(e),a))?i:c?r(t):"Object"===(n=r(t))&&o(t.callee)?"Arguments":n}},4838:function(e,t,i){var n=i(4592),o=i(3753),r=i(2888),s=i(7567);e.exports=function(e,t,i){for(var a=o(t),l=s.f,c=r.f,u=0;u<a.length;u++){var d=a[u];n(e,d)||i&&n(i,d)||l(e,d,c(t,d))}}},6366:function(e,t,i){var n=i(6261);e.exports=!n((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},7917:function(e,t,i){var n=i(7233),o=i(7567),r=i(5711);e.exports=n?function(e,t,i){return o.f(e,t,r(1,i))}:function(e,t,i){return e[t]=i,e}},5711:function(e){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},2917:function(e,t,i){var n=i(9107),o=i(7567);e.exports=function(e,t,i){return i.get&&n(i.get,t,{getter:!0}),i.set&&n(i.set,t,{setter:!0}),o.f(e,t,i)}},6511:function(e,t,i){var n=i(1051),o=i(7567),r=i(9107),s=i(9883);e.exports=function(e,t,i,a){a||(a={});var l=a.enumerable,c=void 0!==a.name?a.name:t;if(n(i)&&r(i,c,a),a.global)l?e[t]=i:s(t,i);else{try{a.unsafe?e[t]&&(l=!0):delete e[t]}catch(u){}l?e[t]=i:o.f(e,t,{value:i,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return e}},9883:function(e,t,i){var n=i(8386),o=Object.defineProperty;e.exports=function(e,t){try{o(n,e,{value:t,configurable:!0,writable:!0})}catch(i){n[e]=t}return t}},7233:function(e,t,i){var n=i(6261);e.exports=!n((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},5955:function(e){var t="object"==typeof document&&document.all,i="undefined"==typeof t&&void 0!==t;e.exports={all:t,IS_HTMLDDA:i}},4995:function(e,t,i){var n=i(8386),o=i(1203),r=n.document,s=o(r)&&o(r.createElement);e.exports=function(e){return s?r.createElement(e):{}}},9920:function(e){var t=TypeError,i=9007199254740991;e.exports=function(e){if(e>i)throw t("Maximum allowed index exceeded");return e}},6066:function(e){e.exports={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1}
25,NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}}},118:function(e){e.exports="function"==typeof Bun&&Bun&&"string"==typeof Bun.version},8415:function(e,t,i){var n=i(6715);
vendor: 4,283 bytes, line 25
25e.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(n)},7695:function(e,t,i){var n=i(8386),o=i(7850);e.exports="process"===o(n.process)},6715:function(e){e.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},293:function(e,t,i){var n,o,r=i(8386),s=i(6715),a=r.process,l=r.Deno,c=a&&a.versions||l&&l.version,u=c&&c.v8;u&&(n=u.split("."),o=n[0]>0&&n[0]<4?1:+(n[0]+n[1])),!o&&s&&(n=s.match(/Edge\/(\d+)/),(!n||n[1]>=74)&&(n=s.match(/Chrome\/(\d+)/),n&&(o=+n[1]))),e.exports=o},288:function(e){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},6389:function(e,t,i){var n=i(3930),o=Error,r=n("".replace),s=function(e){return String(new o(e).stack)}("zxcasd"),a=/\n\s*at [^:]*:[^\n]*/,l=a.test(s);e.exports=function(e,t){if(l&&"string"==typeof e&&!o.prepareStackTrace)while(t--)e=r(e,a,"");return e}},6589:function(e,t,i){var n=i(8386),o=i(2888).f,r=i(7917),s=i(6511),a=i(9883),l=i(4838),c=i(6463);e.exports=function(e,t){var i,u,d,p,h,f,g=e.target,v=e.global,y=e.stat;if(u=v?n:y?n[g]||a(g,{}):(n[g]||{}).prototype,u)for(d in t){if(h=t[d],e.dontCallGetSet?(f=o(u,d),p=f&&f.value):p=u[d],i=c(v?d:g+(y?".":"#")+d,e.forced),!i&&void 0!==p){if(typeof h==typeof p)continue;l(h,p)}(e.sham||p&&p.sham)&&r(h,"sham",!0),s(u,d,h,e)}}},6261:function(e){e.exports=function(e){try{return!!e()}catch(t){return!0}}},7987:function(e,t,i){var n=i(366),o=Function.prototype,r=o.apply,s=o.call;e.exports="object"==typeof Reflect&&Reflect.apply||(n?s.bind(r):function(){return s.apply(r,arguments)})},9873:function(e,t,i){var n=i(641),o=i(1216),r=i(366),s=n(n.bind);e.exports=function(e,t){return o(e),void 0===t?e:r?s(e,t):function(){return e.apply(t,arguments)}}},366:function(e,t,i){var n=i(6261);e.exports=!n((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},8789:function(e,t,i){var n=i(366),o=Function.prototype.call;e.exports=n?o.bind(o):function(){return o.apply(o,arguments)}},5832:function(e,t,i){var n=i(7233),o=i(4592),r=Function.prototype,s=n&&Object.getOwnPropertyDescriptor,a=o(r,"name"),l=a&&"something"===function(){}.name,c=a&&(!n||n&&s(r,"name").configurable);e.exports={EXISTS:a,PROPER:l,CONFIGURABLE:c}},4447:function(e,t,i){var n=i(3930),o=i(1216);e.exports=function(e,t,i){try{return n(o(Object.getOwnPropertyDescriptor(e,t)[i]))}catch(r){}}},641:function(e,t,i){var n=i(7850),o=i(3930);e.exports=function(e){if("Function"===n(e))return o(e)}},3930:function(e,t,i){var n=i(366),o=Function.prototype,r=o.call,s=n&&o.bind.bind(r,r);e.exports=n?s:function(e){return function(){return r.apply(e,arguments)}}},521:function(e,t,i){var n=i(8386),o=i(1051),r=function(e){return o(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?r(n[e]):n[e]&&n[e][t]}},8285:function(e,t,i){var n=i(1216),o=i(5582);e.exports=function(e,t){var i=e[t];return o(i)?void 0:n(i)}},8386:function(e,t,i){var n=function(e){return e&&e.Math===Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof i.g&&i.g)||n("object"==typeof this&&this)||function(){return this}()||Function("return this")()},4592:function(e,t,i){var n=i(3930),o=i(1953),r=n({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return r(o(e),t)}},2164:function(e){e.exports={}},6592:function(e,t,i){var n=i(521);e.exports=n("document","documentElement")},5304:function(e,t,i){var n=i(7233),o=i(6261),r=i(4995);e.exports=!n&&!o((function(){return 7!==Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a}))},9984:function(e,t,i){var n=i(3930),o=i(6261),r=i(7850),s=Object,a=n("".split);e.exports=o((function(){return!s("z").propertyIsEnumerable(0)}))?function(e){return"String"===r(e)?a(e,""):s(e)}:s},9976:function(e,t,i){var n=i(1051),o=i(1203),r=i(4205);e.exports=function(e,t,i){var s,a;return r&&n(s=t.constructor)&&s!==i&&o(a=s.prototype)&&a!==i.prototype&&r(e,a),e}},8840:function(e,t,i){var n=i(3930),o=i(1051),r=i(9304),s=n(Function.toString);o(r.inspectSource)||(r.inspectSource=function(e){return s(e)}),e.exports=r.inspectSource},2657:function(e,t,i){var n,o,r,s=i(6084),a=i(8386),l=i(1203),c=i(7917),u=i(4592),d=i(9304),p=i(1004),h=i(2164),f="Object already initialized",g
vendor: 4,796 bytes, line 25
25=a.TypeError,v=a.WeakMap,y=function(e){return r(e)?o(e):n(e,{})},m=function(e){return function(t){var i;if(!l(t)||(i=o(t)).type!==e)throw new g("Incompatible receiver, "+e+" required");return i}};if(s||d.state){var C=d.state||(d.state=new v);C.get=C.get,C.has=C.has,C.set=C.set,n=function(e,t){if(C.has(e))throw new g(f);return t.facade=e,C.set(e,t),t},o=function(e){return C.get(e)||{}},r=function(e){return C.has(e)}}else{var b=p("state");h[b]=!0,n=function(e,t){if(u(e,b))throw new g(f);return t.facade=e,c(e,b,t),t},o=function(e){return u(e,b)?e[b]:{}},r=function(e){return u(e,b)}}e.exports={set:n,get:o,has:r,enforce:y,getterFor:m}},7487:function(e,t,i){var n=i(7850);e.exports=Array.isArray||function(e){return"Array"===n(e)}},3113:function(e,t,i){var n=i(3242);e.exports=function(e){var t=n(e);return"BigInt64Array"===t||"BigUint64Array"===t}},1051:function(e,t,i){var n=i(5955),o=n.all;e.exports=n.IS_HTMLDDA?function(e){return"function"==typeof e||e===o}:function(e){return"function"==typeof e}},6463:function(e,t,i){var n=i(6261),o=i(1051),r=/#|\.prototype\./,s=function(e,t){var i=l[a(e)];return i===u||i!==c&&(o(t)?n(t):!!t)},a=s.normalize=function(e){return String(e).replace(r,".").toLowerCase()},l=s.data={},c=s.NATIVE="N",u=s.POLYFILL="P";e.exports=s},5582:function(e){e.exports=function(e){return null===e||void 0===e}},1203:function(e,t,i){var n=i(1051),o=i(5955),r=o.all;e.exports=o.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:n(e)||e===r}:function(e){return"object"==typeof e?null!==e:n(e)}},1876:function(e){e.exports=!1},9934:function(e,t,i){var n=i(521),o=i(1051),r=i(9479),s=i(2806),a=Object;e.exports=s?function(e){return"symbol"==typeof e}:function(e){var t=n("Symbol");return o(t)&&r(t.prototype,a(e))}},8109:function(e,t,i){var n=i(6177);e.exports=function(e){return n(e.length)}},9107:function(e,t,i){var n=i(3930),o=i(6261),r=i(1051),s=i(4592),a=i(7233),l=i(5832).CONFIGURABLE,c=i(8840),u=i(2657),d=u.enforce,p=u.get,h=String,f=Object.defineProperty,g=n("".slice),v=n("".replace),y=n([].join),m=a&&!o((function(){return 8!==f((function(){}),"length",{value:8}).length})),C=String(String).split("String"),b=e.exports=function(e,t,i){"Symbol("===g(h(t),0,7)&&(t="["+v(h(t),/^Symbol\(([^)]*)\)/,"$1")+"]"),i&&i.getter&&(t="get "+t),i&&i.setter&&(t="set "+t),(!s(e,"name")||l&&e.name!==t)&&(a?f(e,"name",{value:t,configurable:!0}):e.name=t),m&&i&&s(i,"arity")&&e.length!==i.arity&&f(e,"length",{value:i.arity});try{i&&s(i,"constructor")&&i.constructor?a&&f(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(o){}var n=d(e);return s(n,"source")||(n.source=y(C,"string"==typeof t?t:"")),e};Function.prototype.toString=b((function(){return r(this)&&p(this).source||c(this)}),"toString")},1108:function(e){var t=Math.ceil,i=Math.floor;e.exports=Math.trunc||function(e){var n=+e;return(n>0?i:t)(n)}},8955:function(e,t,i){var n=i(6516);e.exports=function(e,t){return void 0===e?arguments.length<2?"":t:n(e)}},7567:function(e,t,i){var n=i(7233),o=i(5304),r=i(9850),s=i(7033),a=i(5612),l=TypeError,c=Object.defineProperty,u=Object.getOwnPropertyDescriptor,d="enumerable",p="configurable",h="writable";t.f=n?r?function(e,t,i){if(s(e),t=a(t),s(i),"function"===typeof e&&"prototype"===t&&"value"in i&&h in i&&!i[h]){var n=u(e,t);n&&n[h]&&(e[t]=i.value,i={configurable:p in i?i[p]:n[p],enumerable:d in i?i[d]:n[d],writable:!1})}return c(e,t,i)}:c:function(e,t,i){if(s(e),t=a(t),s(i),o)try{return c(e,t,i)}catch(n){}if("get"in i||"set"in i)throw new l("Accessors not supported");return"value"in i&&(e[t]=i.value),e}},2888:function(e,t,i){var n=i(7233),o=i(8789),r=i(6737),s=i(5711),a=i(2235),l=i(5612),c=i(4592),u=i(5304),d=Object.getOwnPropertyDescriptor;t.f=n?d:function(e,t){if(e=a(e),t=l(t),u)try{return d(e,t)}catch(i){}if(c(e,t))return s(!o(r.f,e,t),e[t])}},6153:function(e,t,i){var n=i(6474),o=i(288),r=o.concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return n(e,r)}},3998:function(e,t){t.f=Object.getOwnPropertySymbols},3587:function(e,t,i){var n=i(4592),o=i(1051),r=i(1953),s=i(1004),a=i(6366),l=s("IE_PROTO"),c=Object,u=c.prototype;e.exports=a?c.getPrototypeOf:function(e){var t=r(e);if(n(t,l))return t[l];var i=t.constructor;return o(i)&&t instanceof i?i.prototype:t instanceof c?u:null}},9479:function(e,t,i){var n=i(3930);e.exports=n({}.isPrototypeOf)},6474:function(e,t,i){var n=i(3930),o=i(4592),r=i(2235),s=i(7156).indexOf,a=i(2164),l=n([].push);e.exports=function(e,t){var i,n=r(e),c=0,u=[];for(i in n)!o(a,i)&&o(n,i)&&l(u,i);while(t.length>c)o(n,i=t[c++])&&(~s(u,i)||l(u,i));return u}},6737:function(e,t){var i={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,o=n&&!i.call({1:2},1);t.f=o?function(e){var t=n(this,e);return!!t&&t.enumerable}:i},4205:function(e,t,i){var n=i(4447),o=i(7033),r=i(993);
vendor: 6,668 bytes, line 25
25e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,i={};try{e=n(Object.prototype,"__proto__","set"),e(i,[]),t=i instanceof Array}catch(s){}return function(i,n){return o(i),r(n),t?e(i,n):i.__proto__=n,i}}():void 0)},3402:function(e,t,i){var n=i(8789),o=i(1051),r=i(1203),s=TypeError;e.exports=function(e,t){var i,a;if("string"===t&&o(i=e.toString)&&!r(a=n(i,e)))return a;if(o(i=e.valueOf)&&!r(a=n(i,e)))return a;if("string"!==t&&o(i=e.toString)&&!r(a=n(i,e)))return a;throw new s("Can't convert object to primitive value")}},3753:function(e,t,i){var n=i(521),o=i(3930),r=i(6153),s=i(3998),a=i(7033),l=o([].concat);e.exports=n("Reflect","ownKeys")||function(e){var t=r.f(a(e)),i=s.f;return i?l(t,i(e)):t}},9780:function(e,t,i){var n=i(7033);e.exports=function(){var e=n(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t}},1628:function(e,t,i){var n=i(5582),o=TypeError;e.exports=function(e){if(n(e))throw new o("Can't call method on "+e);return e}},3745:function(e,t,i){var n=i(8386),o=i(7987),r=i(1051),s=i(118),a=i(6715),l=i(9554),c=i(3107),u=n.Function,d=/MSIE .\./.test(a)||s&&function(){var e=n.Bun.version.split(".");return e.length<3||"0"===e[0]&&(e[1]<3||"3"===e[1]&&"0"===e[2])}();e.exports=function(e,t){var i=t?2:1;return d?function(n,s){var a=c(arguments.length,1)>i,d=r(n)?n:u(n),p=a?l(arguments,i):[],h=a?function(){o(d,this,p)}:d;return t?e(h,s):e(h)}:e}},1004:function(e,t,i){var n=i(8688),o=i(6482),r=n("keys");e.exports=function(e){return r[e]||(r[e]=o(e))}},9304:function(e,t,i){var n=i(8386),o=i(9883),r="__core-js_shared__",s=n[r]||o(r,{});e.exports=s},8688:function(e,t,i){var n=i(1876),o=i(9304);(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.34.0",mode:n?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.34.0/LICENSE",source:"https://github.com/zloirock/core-js"})},3293:function(e,t,i){var n=i(293),o=i(6261),r=i(8386),s=r.String;e.exports=!!Object.getOwnPropertySymbols&&!o((function(){var e=Symbol("symbol detection");return!s(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},7982:function(e,t,i){var n,o,r,s,a=i(8386),l=i(7987),c=i(9873),u=i(1051),d=i(4592),p=i(6261),h=i(6592),f=i(9554),g=i(4995),v=i(3107),y=i(8415),m=i(7695),C=a.setImmediate,b=a.clearImmediate,w=a.process,S=a.Dispatch,E=a.Function,x=a.MessageChannel,O=a.String,T=0,D={},R="onreadystatechange";p((function(){n=a.location}));var A=function(e){if(d(D,e)){var t=D[e];delete D[e],t()}},_=function(e){return function(){A(e)}},P=function(e){A(e.data)},M=function(e){a.postMessage(O(e),n.protocol+"//"+n.host)};C&&b||(C=function(e){v(arguments.length,1);var t=u(e)?e:E(e),i=f(arguments,1);return D[++T]=function(){l(t,void 0,i)},o(T),T},b=function(e){delete D[e]},m?o=function(e){w.nextTick(_(e))}:S&&S.now?o=function(e){S.now(_(e))}:x&&!y?(r=new x,s=r.port2,r.port1.onmessage=P,o=c(s.postMessage,s)):a.addEventListener&&u(a.postMessage)&&!a.importScripts&&n&&"file:"!==n.protocol&&!p(M)?(o=M,a.addEventListener("message",P,!1)):o=R in g("script")?function(e){h.appendChild(g("script"))[R]=function(){h.removeChild(this),A(e)}}:function(e){setTimeout(_(e),0)}),e.exports={set:C,clear:b}},655:function(e,t,i){var n=i(5342),o=Math.max,r=Math.min;e.exports=function(e,t){var i=n(e);return i<0?o(i+t,0):r(i,t)}},2355:function(e,t,i){var n=i(9022),o=TypeError;e.exports=function(e){var t=n(e,"number");if("number"==typeof t)throw new o("Can't convert number to bigint");return BigInt(t)}},2235:function(e,t,i){var n=i(9984),o=i(1628);e.exports=function(e){return n(o(e))}},5342:function(e,t,i){var n=i(1108);e.exports=function(e){var t=+e;return t!==t||0===t?0:n(t)}},6177:function(e,t,i){var n=i(5342),o=Math.min;e.exports=function(e){return e>0?o(n(e),9007199254740991):0}},1953:function(e,t,i){var n=i(1628),o=Object;e.exports=function(e){return o(n(e))}},9022:function(e,t,i){var n=i(8789),o=i(1203),r=i(9934),s=i(8285),a=i(3402),l=i(4525),c=TypeError,u=l("toPrimitive");e.exports=function(e,t){if(!o(e)||r(e))return e;var i,l=s(e,u);if(l){if(void 0===t&&(t="default"),i=n(l,e,t),!o(i)||r(i))return i;throw new c("Can't convert object to primitive value")}return void 0===t&&(t="number"),a(e,t)}},5612:function(e,t,i){var n=i(9022),o=i(9934);e.exports=function(e){var t=n(e,"string");return o(t)?t:t+""}},8049:function(e,t,i){var n=i(4525),o=n("toStringTag"),r={};r[o]="z",e.exports="[object z]"===String(r)},6516:function(e,t,i){var n=i(3242),o=String;e.exports=function(e){if("Symbol"===n(e))throw new TypeError("Cannot convert a Symbol value to a string");return o(e)}},7674:function(e){var t=String;e.exports=function(e){try{return t(e)}catch(i){return"Object"}}},6482:function(e,t,i){var n=i(3930),o=0,r=Math.random(),s=n(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+s(++o+r,36)}},2806:function(e,t,i){var n=i(3293);e.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},9850:function(e,t,i){var n=i(7233),o=i(6261);e.exports=n&&o((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},3107:function(e){var t=TypeError;e.exports=function(e,i){if(e<i)throw new t("Not enough arguments");return e}},6084:function(e,t,i){var n=i(8386),o=i(1051),r=n.WeakMap;e.exports=o(r)&&/native code/.test(String(r))},4525:function(e,t,i){var n=i(8386),o=i(8688),r=i(4592),s=i(6482),a=i(3293),l=i(2806),c=n.Symbol,u=o("wks"),d=l?c["for"]||c:c&&c.withoutSetter||s;e.exports=function(e){return r(u,e)||(u[e]=a&&r(c,e)?c[e]:d("Symbol."+e)),u[e]}},2106:function(e,t,i){var n=i(6589),o=i(1953),r=i(8109),s=i(7665),a=i(9920),l=i(6261),c=l((function(){return 4294967297!==[].push.call({length:4294967296},1)})),u=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}},d=c||!u();n({target:"Array",proto:!0,arity:1,forced:d},{push:function(e){var t=o(this),i=r(t),n=arguments.length;a(i+n);for(var l=0;l<n;l++)t[i]=arguments[l],i++;return s(t,i),i}})},7074:function(e,t,i){var n=i(8386),o=i(7233),r=i(2917),s=i(9780),a=i(6261),l=n.RegExp,c=l.prototype,u=o&&a((function(){var e=!0;try{l(".","d")}catch(u){e=!1}var t={},i="",n=e?"dgimsy":"gimsy",o=function(e,n){Object.defineProperty(t,e,{get:function(){return i+=n,!0}})},r={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(var s in e&&(r.hasIndices="d"),r)o(s,r[s]);var a=Object.getOwnPropertyDescriptor(c,"flags").get.call(t);return a!==n||i!==n}));u&&r(c,"flags",{configurable:!0,get:s})}
25,8453:function(e,t,i){var n=i(2740),o=i(6221),r=o.aTypedArray,s=o.exportTypedArrayMethod,a=o.getTypedArrayConstructor;s("toReversed",(function(){return n(r(this),a(this))}))},6895:function(e,t,i){var n=i(6221),o=i(3930),r=i(1216),s=i(3320),a=n.aTypedArray,l=n.getTypedArrayConstructor,c=n.exportTypedArrayMethod,u=o(n.TypedArrayPrototype.sort);c("toSorted",(function(e){void 0!==e&&r(e);var t=a(this),i=s(l(t),t);return u(i,e)}))},2530:function(e,t,i){var n=i(6210),o=i(6221),r=i(3113),s=i(5342),a=i(2355),l=o.aTypedArray,c=o.getTypedArrayConstructor,u=o.exportTypedArrayMethod,d=!!function(){try{new Int8Array(1)["with"](2,{valueOf:function(){throw 8}})}catch(e){return 8===e}}();u("with",{with:function(e,t){var i=l(this),o=s(e),u=r(i)?a(t):+t;return n(i,c(i),o,u)}}["with"],!d)},7098:function(e,t,i){var n=i(6589),o=i(8386),r=i(7982).clear;n({global:!0,bind:!0,enumerable:!0,forced:o.clearImmediate!==r},{clearImmediate:r})},7763:function(e,t,i){var n=i(6589),o=i(8386),r=i(521),s=i(5711),a=i(7567).f,l=i(4592),c=i(6036),u=i(9976),d=i(8955),p=i(6066),h=i(6389),f=i(7233),g=i(1876),v="DOMException",y=r("Error"),m=r(v),C=function(){c(this,b);var e=arguments.length,t=d(e<1?void 0:arguments[0]),i=d(e<2?void 0:arguments[1],"Error"),n=new m(t,i),o=new y(t);return o.name=v,a(n,"stack",s(1,h(o.stack,1))),u(n,this,C),n},b=C.prototype=m.prototype,w="stack"in new y(v),S="stack"in new m(1,2),E=m&&f&&Object.getOwnPropertyDescriptor(o,v),x=!!E&&!(E.writable&&E.configurable),O=w&&!x&&!S;n({global:!0,constructor:!0,forced:g||O},{DOMException:O?C:m});var T=r(v),D=T.prototype;if(D.constructor!==T)for(var R in g||a(D,"constructor",s(1,T)),p)if(l(p,R)){var A=p[R],_=A.s;l(T,_)||a(T,_,s(6,A.c))}},6828:function(e,t,i){i(7098),i(1124)},1124:function(e,t,i){var n=i(6589),o=i(8386),r=i(7982).set,s=i(3745),a=o.setImmediate?s(r,!1):r;n({global:!0,bind:!0,enumerable:!0,forced:o.setImmediate!==a},{setImmediate:a})},4289:function(e,t,i){var n=i(6511),o=i(3930),r=i(6516),s=i(3107),a=URLSearchParams,l=a.prototype,c=o(l.append),u=o(l["delete"]),d=o(l.forEach),p=o([].push),h=new a("a=1&a=2&b=3");h["delete"]("a",1),h["delete"]("b",void 0),h+""!=="a=2"&&n(l,"delete",(function(e){var t=arguments.length,i=t<2?void 0:arguments[1];if(t&&void 0===i)return u(this,e);var n=[];d(this,(function(e,t){p(n,{key:t,value:e})})),s(t,1);var o,a=r(e),l=r(i),h=0,f=0,g=!1,v=n.length;while(h<v)o=n[h++],g||o.key===a?(g=!0,u(this,o.key)):f++;while(f<v)o=n[f++],o.key===a&&o.value===l||c(this,o.key,o.value)}),{enumerable:!0,unsafe:!0})},7226:function(e,t,i){var n=i(6511),o=i(3930),r=i(6516),s=i(3107),a=URLSearchParams,l=a.prototype,c=o(l.getAll),u=o(l.has),d=new a("a=1");!d.has("a",2)&&d.has("a",void 0)||n(l,"has",(function(e){var t=arguments.length,i=t<2?void 0:arguments[1];if(t&&void 0===i)return u(this,e);var n=c(this,e);s(t,1);var o=r(i),a=0;while(a<n.length)if(n[a++]===o)return!0;return!1}),{enumerable:!0,unsafe:!0})},2509:function(e,t,i){var n=i(7233),o=i(3930),r=i(2917),s=URLSearchParams.prototype,a=o(s.forEach);n&&!("size"in s)&&r(s,"size",{get:function(){var e=0;return a(this,(function(){e++})),e},configurable:!0,enumerable:!0})},1925:function(e,t,i){i.d(t,{Z:function(){return o}});var n=i(9146);function o(e,t,i){return t=(0,n.Z)(t),t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}},9146:function(e,t,i){i.d(t,{Z:function(){return r}});var n=i(9306);function o(e,t){if("object"!==(0,n.Z)(e)||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var o=i.call(e,t||"default");if("object"!==(0,n.Z)(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function r(e){var t=o(e,"string");return"symbol"===(0,n.Z)(t)?t:String(t)}},9306:function(e,t,i){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}i.d(t,{Z:function(){return n}})},3422:function(e,t,i){i.d(t,{Z:function(){return ll}});i(2106);var n=i(5677),o=i(6907),r=i(1437),s=i(5220),a=i(9306);function l(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function c(e){return l(1,arguments),e instanceof Date||"object"===(0,a.Z)(e)&&"[object Date]"===Object.prototype.toString.call(e)}function u(e){l(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===(0,a.Z)(e)&&"[object Date]"===t?new Date(e.getTime()):"number"===typeof e||"[object Number]"===t?new Date(e):("string"!==typeof e&&"[object String]"!==t||"undefined"===typeof console||(console.warn("Starting with v2.0.0-beta.
251 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function d(e){if(l(1,arguments),!c(e)&&"number"!==typeof e)return!1;var t=u(e);return!isNaN(Number(t))}function p(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function h(e,t){l(2,arguments);var i=u(e).getTime(),n=p(t);return new Date(i+n)}function f(e,t){l(2,arguments);var i=p(t);return h(e,-i)}var g=864e5;function v(e){l(1,arguments);var t=u(e),i=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var n=t.getTime(),o=i-n;return Math.floor(o/g)+1}function y(e){l(1,arguments);var t=1,i=u(e),n=i.getUTCDay(),o=(n<t?7:0)+n-t;return i.setUTCDate(i.getUTCDate()-o),i.setUTCHours(0,0,0,0),i}function m(e){l(1,arguments);var t=u(e),i=t.getUTCFullYear(),n=new Date(0);n.setUTCFullYear(i+1,0,4),n.setUTCHours(0,0,0,0);var o=y(n),r=new Date(0);r.setUTCFullYear(i,0,4),r.setUTCHours(0,0,0,0);var s=y(r);return t.getTime()>=o.getTime()?i+1:t.getTime()>=s.getTime()?i:i-1}function C(e){l(1,arguments);var t=m(e),i=new Date(0);i.setUTCFullYear(t,0,4),i.setUTCHours(0,0,0,0);var n=y(i);return n}var b=6048e5;function w(e){l(1,arguments);var t=u(e),i=y(t).getTime()-C(t).getTime();return Math.round(i/b)+1}var S={};function E(){return S}function x(e,t){var i,n,o,r,s,a,c,d;l(1,arguments);var h=E(),f=p(null!==(i=null!==(n=null!==(o=null!==(r=null===t||void 0===t?void 0:t.weekStartsOn)&&void 0!==r?r:null===t||void 0===t||null===(s=t.locale)||void 0===s||null===(a=s.options)||void 0===a?void 0:a.weekStartsOn)&&void 0!==o?o:h.weekStartsOn)&&void 0!==n?n:null===(c=h.locale)||void 0===c||null===(d=c.options)||void 0===d?void 0:d.weekStartsOn)&&void 0!==i?i:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var g=u(e),v=g.getUTCDay(),y=(v<f?7:0)+v-f;return g.setUTCDate(g.getUTCDate()-y),g.setUTCHours(0,0,0,0),g}function O(e,t){var i,n,o,r,s,a,c,d;l(1,arguments);var h=u(e),f=h.getUTCFullYear(),g=E(),v=p(null!==(i=null!==(n=null!==(o=null!==(r=null===t||void 0===t?void 0:t.firstWeekContainsDate)&&void 0!==r?r:null===t||void 0===t||null===(s=t.locale)||void 0===s||null===(a=s.options)||void 0===a?void 0:a.firstWeekContainsDate)&&void 0!==o?o:g.firstWeekContainsDate)&&void 0!==n?n:null===(c=g.locale)||void 0===c||null===(d=c.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==i?i:1);if(!(v>=1&&v<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var y=new Date(0);y.setUTCFullYear(f+1,0,v),y.setUTCHours(0,0,0,0);var m=x(y,t),C=new Date(0);C.setUTCFullYear(f,0,v),C.setUTCHours(0,0,0,0);var b=x(C,t);return h.getTime()>=m.getTime()?f+1:h.getTime()>=b.getTime()?f:f-1}function T(e,t){var i,n,o,r,s,a,c,u;l(1,arguments);var d=E(),h=p(null!==(i=null!==(n=null!==(o=null!==(r=null===t||void 0===t?void 0:t.firstWeekContainsDate)&&void 0!==r?r:null===t||void 0===t||null===(s=t.locale)||void 0===s||null===(a=s.options)||void 0===a?void 0:a.firstWeekContainsDate)&&void 0!==o?o:d.firstWeekContainsDate)&&void 0!==n?n:null===(c=d.locale)||void 0===c||null===(u=c.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==i?i:1),f=O(e,t),g=new Date(0);g.setUTCFullYear(f,0,h),g.setUTCHours(0,0,0,0);var v=x(g,t);return v}var D=6048e5;function R(e,t){l(1,arguments);var i=u(e),n=x(i,t).getTime()-T(i,t).getTime();return Math.round(n/D)+1}function A(e,t){var i=e<0?"-":"",n=Math.abs(e).toString();while(n.length<t)n="0"+n;return i+n}var _={y:function(e,t){var i=e.getUTCFullYear(),n=i>0?i:1-i;return A("yy"===t?n%100:n,t.length)},M:function(e,t){var i=e.getUTCMonth();return"M"===t?String(i+1):A(i+1,2)},d:function(e,t){return A(e.getUTCDate(),t.length)},a:function(e,t){var i=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return i.toUpperCase();case"aaa":return i;case"aaaaa":return i[0];case"aaaa":default:return"am"===i?"a.m.":"p.m."}},h:function(e,t){return A(e.getUTCHours()%12||12,t.length)},H:function(e,t){return A(e.getUTCHours(),t.length)},m:function(e,t){return A(e.getUTCMinutes(),t.length)},s:function(e,t){return A(e.getUTCSeconds(),t.length)},S:function(e,t){var i=t.length,n=e.getUTCMilliseconds(),o=Math.floor(n*Math.pow(10,i-3));return A(o,t.length)}},P=_,M={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},k={G:function(e,t,i){var n=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return i.era(n,{width:"abbreviated"});case"GGGGG":return i.era(n,{width:"narrow"});case"GGGG":default:return i.era(n,{width:"wide"})}},y:function(e,t,i){if("yo"===t){var n=e.getUTCFullYear(),o=n>0?n:1-n;return i.ordinalNumber(o,{unit:"year"})}return P.y(e,t)},Y:function(e,t,i,n){var o=O(e,n),r=o>0?o:1-o;if("YY"===t){var s=r%100;return A(s,2)}return"Yo"===t?i.ordinalNumber(r,{unit:"year"}):A(r,t.length)},R:function(e,t){var i=m(e);return A(i,t.length)},u:function(e,t){var i=e.getUTCFullYear();return A(i,t.length)},Q:function(e,t,i){var n=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return A(n,2);case"Qo":return i.ordinalNumber(n,{unit:"quarter"});case"QQQ":return i.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return i.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,i){var n=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return A(n,2);case"qo":return i.ordinalNumber(n,{unit:"quarter"});case"qqq":return i.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return i.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,i){var n=e.getUTCMonth();switch(t){case"M":case"MM":return P.M(e,t);case"Mo":return i.ordinalNumber(n+1,{unit:"month"});case"MMM":return i.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return i.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,i){var n=e.getUTCMonth();switch(t){case"L":return String(n+1);case"LL":return A(n+1,2);case"Lo":return i.ordinalNumber(n+1,{unit:"month"});case"LLL":return i.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return i.month(n,{width:"wide",context:"standalone"})}}
vendor: 4,560 bytes, line 25
25,w:function(e,t,i,n){var o=R(e,n);return"wo"===t?i.ordinalNumber(o,{unit:"week"}):A(o,t.length)},I:function(e,t,i){var n=w(e);return"Io"===t?i.ordinalNumber(n,{unit:"week"}):A(n,t.length)},d:function(e,t,i){return"do"===t?i.ordinalNumber(e.getUTCDate(),{unit:"date"}):P.d(e,t)},D:function(e,t,i){var n=v(e);return"Do"===t?i.ordinalNumber(n,{unit:"dayOfYear"}):A(n,t.length)},E:function(e,t,i){var n=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return i.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(n,{width:"short",context:"formatting"});case"EEEE":default:return i.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,i,n){var o=e.getUTCDay(),r=(o-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(r);case"ee":return A(r,2);case"eo":return i.ordinalNumber(r,{unit:"day"});case"eee":return i.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(o,{width:"short",context:"formatting"});case"eeee":default:return i.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,i,n){var o=e.getUTCDay(),r=(o-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(r);case"cc":return A(r,t.length);case"co":return i.ordinalNumber(r,{unit:"day"});case"ccc":return i.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(o,{width:"narrow",context:"standalone"});case"cccccc":return i.day(o,{width:"short",context:"standalone"});case"cccc":default:return i.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,i){var n=e.getUTCDay(),o=0===n?7:n;switch(t){case"i":return String(o);case"ii":return A(o,t.length);case"io":return i.ordinalNumber(o,{unit:"day"});case"iii":return i.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(n,{width:"short",context:"formatting"});case"iiii":default:return i.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,i){var n=e.getUTCHours(),o=n/12>=1?"pm":"am";switch(t){case"a":case"aa":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,i){var n,o=e.getUTCHours();switch(n=12===o?M.noon:0===o?M.midnight:o/12>=1?"pm":"am",t){case"b":case"bb":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbb":default:return i.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(e,t,i){var n,o=e.getUTCHours();switch(n=o>=17?M.evening:o>=12?M.afternoon:o>=4?M.morning:M.night,t){case"B":case"BB":case"BBB":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBB":default:return i.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(e,t,i){if("ho"===t){var n=e.getUTCHours()%12;return 0===n&&(n=12),i.ordinalNumber(n,{unit:"hour"})}return P.h(e,t)},H:function(e,t,i){return"Ho"===t?i.ordinalNumber(e.getUTCHours(),{unit:"hour"}):P.H(e,t)},K:function(e,t,i){var n=e.getUTCHours()%12;return"Ko"===t?i.ordinalNumber(n,{unit:"hour"}):A(n,t.length)},k:function(e,t,i){var n=e.getUTCHours();return 0===n&&(n=24),"ko"===t?i.ordinalNumber(n,{unit:"hour"}):A(n,t.length)},m:function(e,t,i){return"mo"===t?i.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):P.m(e,t)},s:function(e,t,i){return"so"===t?i.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):P.s(e,t)},S:function(e,t){return P.S(e,t)},X:function(e,t,i,n){var o=n._originalDate||e,r=o.getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return L(r);case"XXXX":case"XX":return I(r);case"XXXXX":case"XXX":default:return I(r,":")}},x:function(e,t,i,n){var o=n._originalDate||e,r=o.getTimezoneOffset();switch(t){case"x":return L(r);case"xxxx":case"xx":return I(r);case"xxxxx":case"xxx":default:return I(r,":")}},O:function(e,t,i,n){var o=n._originalDate||e,r=o.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+N(r,":");case"OOOO":default:return"GMT"+I(r,":")}},z:function(e,t,i,n){var o=n._originalDate||e,r=o.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+N(r,":");
25case"zzzz":default:return"GMT"+I(r,":")}},t:function(e,t,i,n){var o=n._originalDate||e,r=Math.floor(o.getTime()/1e3);return A(r,t.length)},T:function(e,t,i,n){var o=n._originalDate||e,r=o.getTime();return A(r,t.length)}};function N(e,t){var i=e>0?"-":"+",n=Math.abs(e),o=Math.floor(n/60),r=n%60;if(0===r)return i+String(o);var s=t||"";return i+String(o)+s+A(r,2)}function L(e,t){if(e%60===0){var i=e>0?"-":"+";return i+A(Math.abs(e)/60,2)}return I(e,t)}function I(e,t){var i=t||"",n=e>0?"-":"+",o=Math.abs(e),r=A(Math.floor(o/60),2),s=A(o%60,2);return n+r+i+s}var F=k,G=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},V=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},B=function(e,t){var i,n=e.match(/(P+)(p+)?/)||[],o=n[1],r=n[2];if(!r)return G(e,t);switch(o){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",G(o,t)).replace("{{time}}",V(r,t))},j={p:V,P:B},H=j;function W(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}var U=["D","DD"],z=["YY","YYYY"];function K(e){return-1!==U.indexOf(e)}function Y(e){return-1!==z.indexOf(e)}function q(e,t,i){if("YYYY"===e)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").
25concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===e)throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===e)throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===e)throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var X={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},$=function(e,t,i){var n,o=X[e];return n="string"===typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),null!==i&&void 0!==i&&i.addSuffix?i.comparison&&i.comparison>0?"in "+n:n+" ago":n},Z=$;function J(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=t.width?String(t.width):e.defaultWidth,n=e.formats[i]||e.formats[e.defaultWidth];return n}}var Q={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},ee={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},te={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},ie={date:J({formats:Q,defaultWidth:"full"}),time:J({formats:ee,defaultWidth:"full"}),dateTime:J({formats:te,defaultWidth:"full"})},ne=ie,oe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},re=function(e,t,i,n){return oe[e]},se=re;function ae(e){return function(t,i){var n,o=null!==i&&void 0!==i&&i.context?String(i.context):"standalone";if("formatting"===o&&e.formattingValues){var r=e.defaultFormattingWidth||e.defaultWidth,s=null!==i&&void 0!==i&&i.width?String(i.width):r;n=e.formattingValues[s]||e.formattingValues[r]}else{var a=e.defaultWidth,l=null!==i&&void 0!==i&&i.width?String(i.width):e.defaultWidth;n=e.values[l]||e.values[a]}var c=e.argumentCallback?e.argumentCallback(t):t;return n[c]}}var le={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},ce={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},ue={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},de={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},pe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}}
vendor: 1,268 bytes, line 25
25,he={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},fe=function(e,t){var i=Number(e),n=i%100;if(n>20||n<10)switch(n%10){case 1:return i+"st";case 2:return i+"nd";case 3:return i+"rd"}return i+"th"},ge={ordinalNumber:fe,era:ae({values:le,defaultWidth:"wide"}),quarter:ae({values:ce,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:ae({values:ue,defaultWidth:"wide"}),day:ae({values:de,defaultWidth:"wide"}),dayPeriod:ae({values:pe,defaultWidth:"wide",formattingValues:he,defaultFormattingWidth:"wide"})},ve=ge;function ye(e){return function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=i.width,o=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],r=t.match(o);if(!r)return null;var s,a=r[0],l=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?Ce(l,(function(e){return e.test(a)}
25)):me(l,(function(e){return e.test(a)}));s=e.valueCallback?e.valueCallback(c):c,s=i.valueCallback?i.valueCallback(s):s;var u=t.slice(a.length);return{value:s,rest:u}}}function me(e,t){for(var i in e)if(e.hasOwnProperty(i)&&t(e[i]))return i}function Ce(e,t){for(var i=0;i<e.length;i++)if(t(e[i]))return i}function be(e){return function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.match(e.matchPattern);if(!n)return null;var o=n[0],r=t.match(e.parsePattern);if(!r)return null;var s=e.valueCallback?e.valueCallback(r[0]):r[0];s=i.valueCallback?i.valueCallback(s):s;var a=t.slice(o.length);return{value:s,rest:a}}}var we=/^(\d+)(th|st|nd|rd)?/i,Se=/\d+/i,Ee={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},xe={any:[/^b/i,/^(a|c)/i]},Oe={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Te={any:[/1/i,/2/i,/3/i,/4/i]},De={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Re={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Ae={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},_e={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Pe={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Me={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},ke={ordinalNumber:be({matchPattern:we,parsePattern:Se,valueCallback:function(e){return parseInt(e,10)}}),era:ye({matchPatterns:Ee,defaultMatchWidth:"wide",parsePatterns:xe,defaultParseWidth:"any"}),quarter:ye({matchPatterns:Oe,defaultMatchWidth:"wide",parsePatterns:Te,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:ye({matchPatterns:De,defaultMatchWidth:"wide",parsePatterns:Re,defaultParseWidth:"any"}),day:ye({matchPatterns:Ae,defaultMatchWidth:"wide",parsePatterns:_e,defaultParseWidth:"any"}),dayPeriod:ye({matchPatterns:Pe,defaultMatchWidth:"any",parsePatterns:Me,defaultParseWidth:"any"})},Ne=ke,Le={code:"en-US",formatDistance:Z,formatLong:ne,formatRelative:se,localize:ve,match:Ne,options:{weekStartsOn:0,firstWeekContainsDate:1}},Ie=Le,Fe=Ie,Ge=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ve=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Be=/^'([^]*?)'?$/,je=/''/g,He=/[a-zA-Z]/;function We(e,t,i){var n,o,r,s,a,c,h,g,v,y,m,C,b,w,S,x,O,T;l(2,arguments);var D=String(t),R=E(),A=null!==(n=null!==(o=null===i||void 0===i?void 0:i.locale)&&void 0!==o?o:R.locale)&&void 0!==n?n:Fe,_=p(null!==(r=null!==(s=null!==(a=null!==(c=null===i||void 0===i?void 0:i.firstWeekContainsDate)&&void 0!==c?c:null===i||void 0===i||null===(h=i.locale)||void 0===h||null===(g=h.options)||void 0===g?void 0:g.firstWeekContainsDate)&&void 0!==a?a:R.firstWeekContainsDate)&&void 0!==s?s:null===(v=R.locale)||void 0===v||null===(y=v.options)||void 0===y?void 0:y.firstWeekContainsDate)&&void 0!==r?r:1);if(!(_>=1&&_<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var P=p(null!==(m=null!==(C=null!==(b=null!==(w=null===i||void 0===i?void 0:i.weekStartsOn)&&void 0!==w?w:null===i||void 0===i||null===(S=i.locale)||void 0===S||null===(x=S.options)||void 0===x?void 0:x.weekStartsOn)&&void 0!==b?b:R.weekStartsOn)&&void 0!==C?C:null===(O=R.locale)||void 0===O||null===(T=O.options)||void 0===T?void 0:T.weekStartsOn)&&void 0!==m?m:0);if(!(P>=0&&P<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!A.localize)throw new RangeError("locale must contain localize property");if(!A.formatLong)throw new RangeError("locale must contain formatLong property");var M=u(e);if(!d(M))throw new RangeError("Invalid time value");var k=W(M),N=f(M,k),L={firstWeekContainsDate:_,weekStartsOn:P,locale:A,_originalDate:M},I=D.match(Ve).map((function(e){var t=e[0];if("p"===t||"P"===t){var i=H[t];return i(e,A.formatLong)}return e})).join("").match(Ge).map((function(n){if("''"===n)return"'";var o=n[0];if("'"===o)return Ue(n);var r=F[o];if(r)return null!==i&&void 0!==i&&i.useAdditionalWeekYearTokens||!Y(n)||q(n,t,String(e)),null!==i&&void 0!==i&&i.useAdditionalDayOfYearTokens||!K(n)||q(n,t,String(e)),r(N,n,A.localize,L);
25if(o.match(He))throw new RangeError("Format string contains an unescaped latin alphabet character `"+o+"`");return n})).join("");return I}function Ue(e){var t=e.match(Be);return t?t[1].replace(je,"'"):e}function ze(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}function Ke(e,t){if(e){if("string"===typeof e)return ze(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?ze(e,t):void 0}}function Ye(e,t){var i="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=Ke(e))||t&&e&&"number"===typeof e.length){i&&(e=i);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,s=!0,a=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return s=e.done,e},e:function(e){a=!0,r=e},f:function(){try{s||null==i["return"]||i["return"]()}finally{if(a)throw r}}}}function qe(e,t){if(null==e)throw new TypeError("assign requires that input parameter not be null or undefined");for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}function Xe(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $e(e,t){return $e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},$e(e,t)}function Ze(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$e(e,t)}function Je(e){return Je=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Je(e)}function Qe(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function et(e,t){if(t&&("object"===(0,a.Z)(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Xe(e)}function tt(e){var t=Qe();return function(){var i,n=Je(e);if(t){var o=Je(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return et(this,i)}}function it(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var nt=i(9146);function ot(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(0,nt.Z)(n.key),n)}}function rt(e,t,i){return t&&ot(e.prototype,t),i&&ot(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e}var st=i(1925),at=10,lt=function(){function e(){it(this,e),(0,st.Z)(this,"priority",void 0),(0,st.Z)(this,"subPriority",0)}return rt(e,[{key:"validate",value:function(e,t){return!0}}]),e}(),ct=function(e){Ze(i,e);var t=tt(i);function i(e,n,o,r,s){var a;return it(this,i),a=t.call(this),a.value=e,a.validateValue=n,a.setValue=o,a.priority=r,s&&(a.subPriority=s),a}return rt(i,[{key:"validate",value:function(e,t){return this.validateValue(e,this.value,t)}},{key:"set",value:function(e,t,i){return this.setValue(e,t,this.value,i)}}]),i}(lt),ut=function(e){Ze(i,e);var t=tt(i);function i(){var e;it(this,i);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return e=t.call.apply(t,[this].concat(o)),(0,st.Z)(Xe(e),"priority",at),(0,st.Z)(Xe(e),"subPriority",-1),e}return rt(i,[{key:"set",value:function(e,t){if(t.timestampIsSet)return e;var i=new Date(0);return i.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),i.setHours(e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),i}}]),i}(lt),dt=function(){function e(){it(this,e),(0,st.Z)(this,"incompatibleTokens",void 0),(0,st.Z)(this,"priority",void 0),(0,st.Z)(this,"subPriority",void 0)}return rt(e,[{key:"run",value:function(e,t,i,n){var o=this.parse(e,t,i,n);return o?{setter:new ct(o.value,this.validate,this.set,this.priority,this.subPriority),rest:o.rest}:null}},{key:"validate",value:function(e,t,i){return!0}}]),e}(),pt=function(e){Ze(i,e);var t=tt(i);function i(){var e;it(this,i);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return e=t.call.apply(t,[this].concat(o)),(0,st.Z)(Xe(e),"priority",140),(0,st.Z)(Xe(e),"incompatibleTokens",["R","u","t","T"]),e}return rt(i,[{key:"parse",value:function(e,t,i){switch(t){case"G":case"GG":case"GGG":return i.era(e,{width:"abbreviated"})||i.era(e,{width:"narrow"});case"GGGGG":return i.era(e,{width:"narrow"});case"GGGG":default:return i.era(e,{width:"wide"})||i.era(e,{width:"abbreviated"})||i.era(e,{width:"narrow"})}}},{key:"set",value:function(e,t,i){return t.era=i,e.setUTCFullYear(i,0,1),e.setUTCHours(0,0,0,0),e}}]),i}(dt),ht=(Math.pow(10,8),6e4),ft=36e5,gt=1e3,vt={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/}
vendor: 8,397 bytes, line 25
25,yt={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function mt(e,t){return e?{value:t(e.value),rest:e.rest}:e}function Ct(e,t){var i=t.match(e);return i?{value:parseInt(i[0],10),rest:t.slice(i[0].length)}:null}function bt(e,t){var i=t.match(e);if(!i)return null;if("Z"===i[0])return{value:0,rest:t.slice(1)};var n="+"===i[1]?1:-1,o=i[2]?parseInt(i[2],10):0,r=i[3]?parseInt(i[3],10):0,s=i[5]?parseInt(i[5],10):0;return{value:n*(o*ft+r*ht+s*gt),rest:t.slice(i[0].length)}}function wt(e){return Ct(vt.anyDigitsSigned,e)}function St(e,t){switch(e){case 1:return Ct(vt.singleDigit,t);case 2:return Ct(vt.twoDigits,t);case 3:return Ct(vt.threeDigits,t);case 4:return Ct(vt.fourDigits,t);default:return Ct(new RegExp("^\\d{1,"+e+"}"),t)}}function Et(e,t){switch(e){case 1:return Ct(vt.singleDigitSigned,t);case 2:return Ct(vt.twoDigitsSigned,t);case 3:return Ct(vt.threeDigitsSigned,t);case 4:return Ct(vt.fourDigitsSigned,t);default:return Ct(new RegExp("^-?\\d{1,"+e+"}"),t)}}function xt(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Ot(e,t){var i,n=t>0,o=n?t:1-t;if(o<=50)i=e||100;else{var r=o+50,s=100*Math.floor(r/100),a=e>=r%100;i=e+s-(a?100:0)}return n?i:1-i}function Tt(e){return e%400===0||e%4===0&&e%100!==0}var Dt=function(e){Ze(i,e);var t=tt(i);function i(){var e;it(this,i);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return e=t.call.apply(t,[this].concat(o)),(0,st.Z)(Xe(e),"priority",130),(0,st.Z)(Xe(e),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),e}return rt(i,[{key:"parse",value:function(e,t,i){var n=function(e){return{year:e,isTwoDigitYear:"yy"===t}};switch(t){case"y":return mt(St(4,e),n);case"yo":return mt(i.ordinalNumber(e,{unit:"year"}),n);default:return mt(St(t.length,e),n)}}},{key:"validate",value:function(e,t){return t.isTwoDigitYear||t.year>0}},{key:"set",value:function(e,t,i){var n=e.getUTCFullYear();if(i.isTwoDigitYear){var o=Ot(i.year,n);return e.setUTCFullYear(o,0,1),e.setUTCHours(0,0,0,0),e}var r="era"in t&&1!==t.era?1-i.year:i.year;return e.setUTCFullYear(r,0,1),e.setUTCHours(0,0,0,0),e}}]),i}(dt),Rt=function(e){Ze(i,e);var t=tt(i);function i(){var e;it(this,i);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return e=t.call.apply(t,[this].concat(o)),(0,st.Z)(Xe(e),"priority",130),(0,st.Z)(Xe(e),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),e}return rt(i,[{key:"parse",value:function(e,t,i){var n=function(e){return{year:e,isTwoDigitYear:"YY"===t}};switch(t){case"Y":return mt(St(4,e),n);case"Yo":return mt(i.ordinalNumber(e,{unit:"year"}),n);default:return mt(St(t.length,e),n)}}},{key:"validate",value:function(e,t){return t.isTwoDigitYear||t.year>0}},{key:"set",value:function(e,t,i,n){var o=O(e,n);if(i.isTwoDigitYear){var r=Ot(i.year,o);return e.setUTCFullYear(r,0,n.firstWeekContainsDate),e.setUTCHours(0,0,0,0),x(e,n)}var s="era"in t&&1!==t.era?1-i.year:i.year;return e.setUTCFullYear(s,0,n.firstWeekContainsDate),e.setUTCHours(0,0,0,0),x(e,n)}}]),i}(dt),At=function(e){Ze(i,e);var t=tt(i);function i(){var e;it(this,i);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return e=t.call.apply(t,[this].concat(o)),(0,st.Z)(Xe(e),"priority",130),(0,st.Z)(Xe(e),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),e}return rt(i,[{key:"parse",value:function(e,t){return Et("R"===t?4:t.length,e)}},{key:"set",value:function(e,t,i){var n=new Date(0);return n.setUTCFullYear(i,0,4),n.setUTCHours(0,0,0,0),y(n)}}]),i}(dt),_t=function(e){Ze(i,e);var t=tt(i);function i(){var e;it(this,i);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return e=t.call.apply(t,[this].concat(o)),(0,st.Z)(Xe(e),"priority",130),(0,st.Z)(Xe(e),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),e}return rt(i,[{key:"parse",value:function(e,t){return Et("u"===t?4:t.length,e)}},{key:"set",value:function(e,t,i){return e.setUTCFullYear(i,0,1),e.setUTCHours(0,0,0,0),e}}]),i}(dt),Pt=function(e){Ze(i,e);var t=tt(i);function i(){var e;it(this,i);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return e=t.call.apply(t,[this].concat(o)),(0,st.Z)(Xe(e),"priority",120),(0,st.Z)(Xe(e),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),e}return rt(i,[{key:"parse",value:function(e,t,i){switch(t){case"Q":case"QQ":return St(t.length,e);case"Qo":return i.ordinalNumber(e,{unit:"quarter"});case"QQQ":return i.quarter(e,{width:"abbreviated",context:"formatting"})||i.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return i.quarter(e,{width:"narrow",context:"formatting"});case"QQQQ":default:return i.quarter(e,{width:"wide",context:"formatting"})||i.quarter(e,{width:"abbreviated",context:"formatting"})||i.quarter(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,t){return t>=1&&t<=4}},{key:"set",value:function(e,t,i){return e.setUTCMonth(3*(i-1),1),e.setUTCHours(0,0,0,0),e}}]),i}(dt),Mt=function(e){Ze(i,e);var t=tt(i);function i(){var e;it(this,i);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return e=t.call.apply(t,[this].concat(o)),(0,st.Z)(Xe(e),"priority",120),(0,st.Z)(Xe(e),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),e}return rt(i,[{key:"parse",value:function(e,t,i){switch(t){case"q":case"qq":return St(t.length,e);case"qo":return i.ordinalNumber(e,{unit:"quarter"});case"qqq":return i.quarter(e,{width:"abbreviated",context:"standalone"})||i.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return i.quarter(e,{width:"narrow",context:"standalone"});case"qqqq":default:return i.quarter(e,{width:"wide",context:"standalone"})||i.quarter(e,{width:"abbreviated",context:"standalone"})||i.quarter(e,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(e,t){return t>=1&&t<=4}},{key:"set",value:function(e,t,i){return e.setUTCMonth(3*(i-1),1),e.setUTCHours(0,0,0,0),e}}]),i}(dt),kt=function(e){Ze(i,e);var t=tt(i);function i(){var e;it(this,i);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return e=t.call.apply(t,[this].concat(o)),(0,st.Z)(Xe(e),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),(0,st.Z)(Xe(e),"priority",110),e}return rt(i,[{key:"parse",value:function(e,t,i){var n=function(e){return e-1};switch(t){case"M":return mt(Ct(vt.month,e),n);case"MM":return mt(St(2,e),n);case"Mo":return mt(i.ordinalNumber(e,{unit:"month"}),n);case"MMM":return i.month(e,{width:"abbreviated",context:"formatting"})||i.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return i.month(e,{width:"narrow",context:"formatting"});case"MMMM":default:return i.month(e,{width:"wide",context:"formatting"})||i.month(e,{width:"abbreviated",context:"formatting"})||i.month(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,t){return t>=0&&t<=11}},{key:"set",value:function(e,t,i){return e.setUTCMonth(i,1),e.setUTCHours(0,0,0,0),e}}]),i}(dt),Nt=function(e){Ze(i,e);var t=tt(i);function i(){var e;it(this,i);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return e=t.call.apply(t,[this].concat(o)),(0,st.Z)(Xe(e),"priority",110),(0,st.Z)(Xe(e),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),e}return rt(i,[{key:"parse",value:function(e,t,i){var n=function(e){return e-1};switch(t){case"L":return mt(Ct(vt.month,e),n);case"LL":return mt(St(2,e),n);case"Lo":return mt(i.ordinalNumber(e,{unit:"month"}),n);case"LLL":return i.month(e,{width:"abbreviated",context:"standalone"})||i.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return i.month(e,{width:"narrow",context:"standalone"});case"LLLL":default:return i.month(e,{width:"wide",context:"standalone"})||i.month(e,{width:"abbreviated",context:"standalone"})||i.month(e,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(e,t){return t>=0&&t<=11}},{key:"set",value:function(e,t,i){return e.setUTCMonth(i,1),e.setUTCHours(0,0,0,0),e}}]),i}(dt);function Lt(e,t,i){l(2,arguments);
vendor: 8,407 bytes, line 25
25var n=u(e),o=p(t),r=R(n,i)-o;return n.setUTCDate(n.getUTCDate()-7*r),n}var It=function(e){Ze(i,e);var t=tt(i);function i(){var e;it(this,i);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return e=t.call.apply(t,[this].concat(o)),(0,st.Z)(Xe(e),"priority",100),(0,st.Z)(Xe(e),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),e}return rt(i,[{key:"parse",value:function(e,t,i){switch(t){case"w":return Ct(vt.week,e);case"wo":return i.ordinalNumber(e,{unit:"week"});default:return St(t.length,e)}}},{key:"validate",value:function(e,t){return t>=1&&t<=53}},{key:"set",value:function(e,t,i,n){return x(Lt(e,i,n),n)}}]),i}(dt);function Ft(e,t){l(2,arguments);var i=u(e),n=p(t),o=w(i)-n;return i.setUTCDate(i.getUTCDate()-7*o),i}var Gt=function(e){Ze(i,e);var t=tt(i);function i(){var e;it(this,i);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return e=t.call.apply(t,[this].concat(o)),(0,st.Z)(Xe(e),"priority",100),(0,st.Z)(Xe(e),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),e}return rt(i,[{key:"parse",value:function(e,t,i){switch(t){case"I":return Ct(vt.week,e);case"Io":return i.ordinalNumber(e,{unit:"week"});default:return St(t.length,e)}}},{key:"validate",value:function(e,t){return t>=1&&t<=53}},{key:"set",value:function(e,t,i){return y(Ft(e,i))}}]),i}(dt),Vt=[31,28,31,30,31,30,31,31,30,31,30,31],Bt=[31,29,31,30,31,30,31,31,30,31,30,31],jt=function(e){Ze(i,e);var t=tt(i);function i(){var e;it(this,i);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return e=t.call.apply(t,[this].concat(o)),(0,st.Z)(Xe(e),"priority",90),(0,st.Z)(Xe(e),"subPriority",1),(0,st.Z)(Xe(e),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),e}return rt(i,[{key:"parse",value:function(e,t,i){switch(t){case"d":return Ct(vt.date,e);case"do":return i.ordinalNumber(e,{unit:"date"});default:return St(t.length,e)}}},{key:"validate",value:function(e,t){var i=e.getUTCFullYear(),n=Tt(i),o=e.getUTCMonth();return n?t>=1&&t<=Bt[o]:t>=1&&t<=Vt[o]}},{key:"set",value:function(e,t,i){return e.setUTCDate(i),e.setUTCHours(0,0,0,0),e}}]),i}(dt),Ht=function(e){Ze(i,e);var t=tt(i);function i(){var e;it(this,i);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return e=t.call.apply(t,[this].concat(o)),(0,st.Z)(Xe(e),"priority",90),(0,st.Z)(Xe(e),"subpriority",1),(0,st.Z)(Xe(e),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),e}return rt(i,[{key:"parse",value:function(e,t,i){switch(t){case"D":case"DD":return Ct(vt.dayOfYear,e);case"Do":return i.ordinalNumber(e,{unit:"date"});default:return St(t.length,e)}}},{key:"validate",value:function(e,t){var i=e.getUTCFullYear(),n=Tt(i);return n?t>=1&&t<=366:t>=1&&t<=365}},{key:"set",value:function(e,t,i){return e.setUTCMonth(0,i),e.setUTCHours(0,0,0,0),e}}]),i}(dt);function Wt(e,t,i){var n,o,r,s,a,c,d,h;l(2,arguments);var f=E(),g=p(null!==(n=null!==(o=null!==(r=null!==(s=null===i||void 0===i?void 0:i.weekStartsOn)&&void 0!==s?s:null===i||void 0===i||null===(a=i.locale)||void 0===a||null===(c=a.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==r?r:f.weekStartsOn)&&void 0!==o?o:null===(d=f.locale)||void 0===d||null===(h=d.options)||void 0===h?void 0:h.weekStartsOn)&&void 0!==n?n:0);if(!(g>=0&&g<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var v=u(e),y=p(t),m=v.getUTCDay(),C=y%7,b=(C+7)%7,w=(b<g?7:0)+y-m;return v.setUTCDate(v.getUTCDate()+w),v}var Ut=function(e){Ze(i,e);var t=tt(i);function i(){var e;it(this,i);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return e=t.call.apply(t,[this].concat(o)),(0,st.Z)(Xe(e),"priority",90),(0,st.Z)(Xe(e),"incompatibleTokens",["D","i","e","c","t","T"]),e}return rt(i,[{key:"parse",value:function(e,t,i){switch(t){case"E":case"EE":case"EEE":return i.day(e,{width:"abbreviated",context:"formatting"})||i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return i.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"});case"EEEE":default:return i.day(e,{width:"wide",context:"formatting"})||i.day(e,{width:"abbreviated",context:"formatting"})||i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,t){return t>=0&&t<=6}},{key:"set",value:function(e,t,i,n){return e=Wt(e,i,n),e.setUTCHours(0,0,0,0),e}}]),i}(dt),zt=function(e){Ze(i,e);var t=tt(i);function i(){var e;it(this,i);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return e=t.call.apply(t,[this].concat(o)),(0,st.Z)(Xe(e),"priority",90),(0,st.Z)(Xe(e),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),e}return rt(i,[{key:"parse",value:function(e,t,i,n){var o=function(e){var t=7*Math.floor((e-1)/7);return(e+n.weekStartsOn+6)%7+t};switch(t){case"e":case"ee":return mt(St(t.length,e),o);case"eo":return mt(i.ordinalNumber(e,{unit:"day"}),o);case"eee":return i.day(e,{width:"abbreviated",context:"formatting"})||i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"});case"eeeee":return i.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"});case"eeee":default:return i.day(e,{width:"wide",context:"formatting"})||i.day(e,{width:"abbreviated",context:"formatting"})||i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,t){return t>=0&&t<=6}},{key:"set",value:function(e,t,i,n){return e=Wt(e,i,n),e.setUTCHours(0,0,0,0),e}}]),i}(dt),Kt=function(e){Ze(i,e);var t=tt(i);function i(){var e;it(this,i);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return e=t.call.apply(t,[this].concat(o)),(0,st.Z)(Xe(e),"priority",90),(0,st.Z)(Xe(e),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),e}return rt(i,[{key:"parse",value:function(e,t,i,n){var o=function(e){var t=7*Math.floor((e-1)/7);return(e+n.weekStartsOn+6)%7+t};switch(t){case"c":case"cc":return mt(St(t.length,e),o);case"co":return mt(i.ordinalNumber(e,{unit:"day"}),o);case"ccc":return i.day(e,{width:"abbreviated",context:"standalone"})||i.day(e,{width:"short",context:"standalone"})||i.day(e,{width:"narrow",context:"standalone"});case"ccccc":return i.day(e,{width:"narrow",context:"standalone"});case"cccccc":return i.day(e,{width:"short",context:"standalone"})||i.day(e,{width:"narrow",context:"standalone"});case"cccc":default:return i.day(e,{width:"wide",context:"standalone"})||i.day(e,{width:"abbreviated",context:"standalone"})||i.day(e,{width:"short",context:"standalone"})||i.day(e,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(e,t){return t>=0&&t<=6}},{key:"set",value:function(e,t,i,n){return e=Wt(e,i,n),e.setUTCHours(0,0,0,0),e}}]),i}(dt);function Yt(e,t){l(2,arguments);var i=p(t);i%7===0&&(i-=7);var n=1,o=u(e),r=o.getUTCDay(),s=i%7,a=(s+7)%7,c=(a<n?7:0)+i-r;return o.setUTCDate(o.getUTCDate()+c),o}var qt=function(e){Ze(i,e);var t=tt(i);function i(){var e;it(this,i);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return e=t.call.apply(t,[this].concat(o)),(0,st.Z)(Xe(e),"priority",90),(0,st.Z)(Xe(e),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),e}return rt(i,[{key:"parse",value:function(e,t,i){var n=function(e){return 0===e?7:e};switch(t){case"i":case"ii":return St(t.length,e);case"io":return i.ordinalNumber(e,{unit:"day"});case"iii":return mt(i.day(e,{width:"abbreviated",context:"formatting"})||i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"}),n);case"iiiii":return mt(i.day(e,{width:"narrow",context:"formatting"}),n);case"iiiiii":return mt(i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"}),n);case"iiii":default:return mt(i.day(e,{width:"wide",context:"formatting"})||i.day(e,{width:"abbreviated",context:"formatting"})||i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"}),n)}}},{key:"validate",value:function(e,t){return t>=1&&t<=7}}
vendor: 10,931 bytes, line 25
25,{key:"set",value:function(e,t,i){return e=Yt(e,i),e.setUTCHours(0,0,0,0),e}}]),i}(dt),Xt=function(e){Ze(i,e);var t=tt(i);function i(){var e;it(this,i);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return e=t.call.apply(t,[this].concat(o)),(0,st.Z)(Xe(e),"priority",80),(0,st.Z)(Xe(e),"incompatibleTokens",["b","B","H","k","t","T"]),e}return rt(i,[{key:"parse",value:function(e,t,i){switch(t){case"a":case"aa":case"aaa":return i.dayPeriod(e,{width:"abbreviated",context:"formatting"})||i.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return i.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaa":default:return i.dayPeriod(e,{width:"wide",context:"formatting"})||i.dayPeriod(e,{width:"abbreviated",context:"formatting"})||i.dayPeriod(e,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(e,t,i){return e.setUTCHours(xt(i),0,0,0),e}}]),i}(dt),$t=function(e){Ze(i,e);var t=tt(i);function i(){var e;it(this,i);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return e=t.call.apply(t,[this].concat(o)),(0,st.Z)(Xe(e),"priority",80),(0,st.Z)(Xe(e),"incompatibleTokens",["a","B","H","k","t","T"]),e}return rt(i,[{key:"parse",value:function(e,t,i){switch(t){case"b":case"bb":case"bbb":return i.dayPeriod(e,{width:"abbreviated",context:"formatting"})||i.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return i.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbb":default:return i.dayPeriod(e,{width:"wide",context:"formatting"})||i.dayPeriod(e,{width:"abbreviated",context:"formatting"})||i.dayPeriod(e,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(e,t,i){return e.setUTCHours(xt(i),0,0,0),e}}]),i}(dt),Zt=function(e){Ze(i,e);var t=tt(i);function i(){var e;it(this,i);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return e=t.call.apply(t,[this].concat(o)),(0,st.Z)(Xe(e),"priority",80),(0,st.Z)(Xe(e),"incompatibleTokens",["a","b","t","T"]),e}return rt(i,[{key:"parse",value:function(e,t,i){switch(t){case"B":case"BB":case"BBB":return i.dayPeriod(e,{width:"abbreviated",context:"formatting"})||i.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return i.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBB":default:return i.dayPeriod(e,{width:"wide",context:"formatting"})||i.dayPeriod(e,{width:"abbreviated",context:"formatting"})||i.dayPeriod(e,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(e,t,i){return e.setUTCHours(xt(i),0,0,0),e}}]),i}(dt),Jt=function(e){Ze(i,e);var t=tt(i);function i(){var e;it(this,i);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return e=t.call.apply(t,[this].concat(o)),(0,st.Z)(Xe(e),"priority",70),(0,st.Z)(Xe(e),"incompatibleTokens",["H","K","k","t","T"]),e}return rt(i,[{key:"parse",value:function(e,t,i){switch(t){case"h":return Ct(vt.hour12h,e);case"ho":return i.ordinalNumber(e,{unit:"hour"});default:return St(t.length,e)}}},{key:"validate",value:function(e,t){return t>=1&&t<=12}},{key:"set",value:function(e,t,i){var n=e.getUTCHours()>=12;return n&&i<12?e.setUTCHours(i+12,0,0,0):n||12!==i?e.setUTCHours(i,0,0,0):e.setUTCHours(0,0,0,0),e}}]),i}(dt),Qt=function(e){Ze(i,e);var t=tt(i);function i(){var e;it(this,i);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return e=t.call.apply(t,[this].concat(o)),(0,st.Z)(Xe(e),"priority",70),(0,st.Z)(Xe(e),"incompatibleTokens",["a","b","h","K","k","t","T"]),e}return rt(i,[{key:"parse",value:function(e,t,i){switch(t){case"H":return Ct(vt.hour23h,e);case"Ho":return i.ordinalNumber(e,{unit:"hour"});default:return St(t.length,e)}}},{key:"validate",value:function(e,t){return t>=0&&t<=23}},{key:"set",value:function(e,t,i){return e.setUTCHours(i,0,0,0),e}}]),i}(dt),ei=function(e){Ze(i,e);var t=tt(i);function i(){var e;it(this,i);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return e=t.call.apply(t,[this].concat(o)),(0,st.Z)(Xe(e),"priority",70),(0,st.Z)(Xe(e),"incompatibleTokens",["h","H","k","t","T"]),e}return rt(i,[{key:"parse",value:function(e,t,i){switch(t){case"K":return Ct(vt.hour11h,e);case"Ko":return i.ordinalNumber(e,{unit:"hour"});default:return St(t.length,e)}}},{key:"validate",value:function(e,t){return t>=0&&t<=11}},{key:"set",value:function(e,t,i){var n=e.getUTCHours()>=12;return n&&i<12?e.setUTCHours(i+12,0,0,0):e.setUTCHours(i,0,0,0),e}}]),i}(dt),ti=function(e){Ze(i,e);var t=tt(i);function i(){var e;it(this,i);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return e=t.call.apply(t,[this].concat(o)),(0,st.Z)(Xe(e),"priority",70),(0,st.Z)(Xe(e),"incompatibleTokens",["a","b","h","H","K","t","T"]),e}return rt(i,[{key:"parse",value:function(e,t,i){switch(t){case"k":return Ct(vt.hour24h,e);case"ko":return i.ordinalNumber(e,{unit:"hour"});default:return St(t.length,e)}}},{key:"validate",value:function(e,t){return t>=1&&t<=24}},{key:"set",value:function(e,t,i){var n=i<=24?i%24:i;return e.setUTCHours(n,0,0,0),e}}]),i}(dt),ii=function(e){Ze(i,e);var t=tt(i);function i(){var e;it(this,i);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return e=t.call.apply(t,[this].concat(o)),(0,st.Z)(Xe(e),"priority",60),(0,st.Z)(Xe(e),"incompatibleTokens",["t","T"]),e}return rt(i,[{key:"parse",value:function(e,t,i){switch(t){case"m":return Ct(vt.minute,e);case"mo":return i.ordinalNumber(e,{unit:"minute"});default:return St(t.length,e)}}},{key:"validate",value:function(e,t){return t>=0&&t<=59}},{key:"set",value:function(e,t,i){return e.setUTCMinutes(i,0,0),e}}]),i}(dt),ni=function(e){Ze(i,e);var t=tt(i);function i(){var e;it(this,i);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return e=t.call.apply(t,[this].concat(o)),(0,st.Z)(Xe(e),"priority",50),(0,st.Z)(Xe(e),"incompatibleTokens",["t","T"]),e}return rt(i,[{key:"parse",value:function(e,t,i){switch(t){case"s":return Ct(vt.second,e);case"so":return i.ordinalNumber(e,{unit:"second"});default:return St(t.length,e)}}},{key:"validate",value:function(e,t){return t>=0&&t<=59}},{key:"set",value:function(e,t,i){return e.setUTCSeconds(i,0),e}}]),i}(dt),oi=function(e){Ze(i,e);var t=tt(i);function i(){var e;it(this,i);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return e=t.call.apply(t,[this].concat(o)),(0,st.Z)(Xe(e),"priority",30),(0,st.Z)(Xe(e),"incompatibleTokens",["t","T"]),e}return rt(i,[{key:"parse",value:function(e,t){var i=function(e){return Math.floor(e*Math.pow(10,3-t.length))};return mt(St(t.length,e),i)}},{key:"set",value:function(e,t,i){return e.setUTCMilliseconds(i),e}}]),i}(dt),ri=function(e){Ze(i,e);var t=tt(i);function i(){var e;it(this,i);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return e=t.call.apply(t,[this].concat(o)),(0,st.Z)(Xe(e),"priority",10),(0,st.Z)(Xe(e),"incompatibleTokens",["t","T","x"]),e}return rt(i,[{key:"parse",value:function(e,t){switch(t){case"X":return bt(yt.basicOptionalMinutes,e);case"XX":return bt(yt.basic,e);case"XXXX":return bt(yt.basicOptionalSeconds,e);case"XXXXX":return bt(yt.extendedOptionalSeconds,e);case"XXX":default:return bt(yt.extended,e)}}},{key:"set",value:function(e,t,i){return t.timestampIsSet?e:new Date(e.getTime()-i)}}]),i}(dt),si=function(e){Ze(i,e);var t=tt(i);function i(){var e;it(this,i);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return e=t.call.apply(t,[this].concat(o)),(0,st.Z)(Xe(e),"priority",10),(0,st.Z)(Xe(e),"incompatibleTokens",["t","T","X"]),e}return rt(i,[{key:"parse",value:function(e,t){switch(t){case"x":return bt(yt.basicOptionalMinutes,e);case"xx":return bt(yt.basic,e);case"xxxx":return bt(yt.basicOptionalSeconds,e);case"xxxxx":return bt(yt.extendedOptionalSeconds,e);case"xxx":default:return bt(yt.extended,e)}}},{key:"set",value:function(e,t,i){return t.timestampIsSet?e:new Date(e.getTime()-i)}}]),i}(dt),ai=function(e){Ze(i,e);var t=tt(i);function i(){var e;it(this,i);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return e=t.call.apply(t,[this].concat(o)),(0,st.Z)(Xe(e),"priority",40),(0,st.Z)(Xe(e),"incompatibleTokens","*"),e}return rt(i,[{key:"parse",value:function(e){return wt(e)}},{key:"set",value:function(e,t,i){return[new Date(1e3*i),{timestampIsSet:!0}]}}]),i}(dt),li=function(e){Ze(i,e);var t=tt(i);function i(){var e;it(this,i);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return e=t.call.apply(t,[this].concat(o)),(0,st.Z)(Xe(e),"priority",20),(0,st.Z)(Xe(e),"incompatibleTokens","*"),e}return rt(i,[{key:"parse",value:function(e){return wt(e)}},{key:"set",value:function(e,t,i){return[new Date(i),{timestampIsSet:!0}]}}]),i}(dt),ci={G:new pt,y:new Dt,Y:new Rt,R:new At,u:new _t,Q:new Pt,q:new Mt,M:new kt,L:new Nt,w:new It,I:new Gt,d:new jt,D:new Ht,E:new Ut,e:new zt,c:new Kt,i:new qt,a:new Xt,b:new $t,B:new Zt,h:new Jt,H:new Qt,K:new ei,k:new ti,m:new ii,s:new ni,S:new oi,X:new ri,x:new si,t:new ai,T:new li},ui=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,di=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,pi=/^'([^]*?)'?$/,hi=/''/g,fi=/\S/,gi=/[a-zA-Z]/;function vi(e,t,i,n){var o,r,s,c,d,h,g,v,y,m,C,b,w,S,x,O,T,D;l(3,arguments);var R=String(e),A=String(t),_=E(),P=null!==(o=null!==(r=null===n||void 0===n?void 0:n.locale)&&void 0!==r?r:_.locale)&&void 0!==o?o:Fe;if(!P.match)throw new RangeError("locale must contain match property");var M=p(null!==(s=null!==(c=null!==(d=null!==(h=null===n||void 0===n?void 0:n.firstWeekContainsDate)&&void 0!==h?h:null===n||void 0===n||null===(g=n.locale)||void 0===g||null===(v=g.options)||void 0===v?void 0:v.firstWeekContainsDate)&&void 0!==d?d:_.firstWeekContainsDate)&&void 0!==c?c:null===(y=_.locale)||void 0===y||null===(m=y.options)||void 0===m?void 0:m.firstWeekContainsDate)&&void 0!==s?s:1);if(!(M>=1&&M<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var k=p(null!==(C=null!==(b=null!==(w=null!==(S=null===n||void 0===n?void 0:n.weekStartsOn)&&void 0!==S?S:null===n||void 0===n||null===(x=n.locale)||void 0===x||null===(O=x.options)||void 0===O?void 0:O.weekStartsOn)&&void 0!==w?w:_.weekStartsOn)&&void 0!==b?b:null===(T=_.locale)||void 0===T||null===(D=T.options)||void 0===D?void 0:D.weekStartsOn)&&void 0!==C?C:0);if(!(k>=0&&k<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(""===A)return""===R?u(i):new Date(NaN);var N,L={firstWeekContainsDate:M,weekStartsOn:k,locale:P},I=[new ut],F=A.match(di).map((function(e){var t=e[0];if(t in H){var i=H[t];return i(e,P.formatLong)}return e})).join("").match(ui),G=[],V=Ye(F);try{var B=function(){var t=N.value;null!==n&&void 0!==n&&n.useAdditionalWeekYearTokens||!Y(t)||q(t,A,e),null!==n&&void 0!==n&&n.useAdditionalDayOfYearTokens||!K(t)||q(t,A,e);var i=t[0],o=ci[i];if(o){var r=o.incompatibleTokens;if(Array.isArray(r)){var s=G.find((function(e){return r.includes(e.token)||e.token===i}));
vendor: 4,370 bytes, line 25
25if(s)throw new RangeError("The format string mustn't contain `".concat(s.fullToken,"` and `").concat(t,"` at the same time"))}else if("*"===o.incompatibleTokens&&G.length>0)throw new RangeError("The format string mustn't contain `".concat(t,"` and any other token at the same time"));G.push({token:i,fullToken:t});var a=o.run(R,t,P.match,L);if(!a)return{v:new Date(NaN)};I.push(a.setter),R=a.rest}else{if(i.match(gi))throw new RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");if("''"===t?t="'":"'"===i&&(t=yi(t)),0!==R.indexOf(t))return{v:new Date(NaN)};R=R.slice(t.length)}};for(V.s();!(N=V.n()).done;){var j=B();if("object"===(0,a.Z)(j))return j.v}}catch(te){V.e(te)}finally{V.f()}if(R.length>0&&fi.test(R))return new Date(NaN);var U=I.map((function(e){return e.priority})).sort((function(e,t){return t-e})).filter((function(e,t,i){return i.indexOf(e)===t})).map((function(e){return I.filter((function(t){return t.priority===e})).sort((function(e,t){return t.subPriority-e.subPriority}))})).map((function(e){return e[0]})),z=u(i);if(isNaN(z.getTime()))return new Date(NaN);var X,$=f(z,W(z)),Z={},J=Ye(U);try{for(J.s();!(X=J.n()).done;){var Q=X.value;if(!Q.validate($,L))return new Date(NaN);var ee=Q.set($,Z,L);Array.isArray(ee)?($=ee[0],qe(Z,ee[1])):$=ee}}catch(te){J.e(te)}finally{J.f()}return $}function yi(e){return e.match(pi)[1].replace(hi,"'")}function mi(e){l(1,arguments);var t=u(e),i=t.getFullYear(),n=t.getMonth(),o=new Date(0);return o.setFullYear(i,n+1,0),o.setHours(0,0,0,0),o.getDate()}function Ci(e,t){l(2,arguments);var i=u(e),n=p(t),o=i.getFullYear(),r=i.getDate(),s=new Date(0);s.setFullYear(o,n,15),s.setHours(0,0,0,0);var a=mi(s);return i.setMonth(n,Math.min(r,a)),i}function bi(e,t){if(l(2,arguments),"object"!==(0,a.Z)(t)||null===t)throw new RangeError("values parameter must be an object");var i=u(e);return isNaN(i.getTime())?new Date(NaN):(null!=t.year&&i.setFullYear(t.year),null!=t.month&&(i=Ci(i,t.month)),null!=t.date&&i.setDate(p(t.date)),null!=t.hours&&i.setHours(p(t.hours)),null!=t.minutes&&i.setMinutes(p(t.minutes)),null!=t.seconds&&i.setSeconds(p(t.seconds)),null!=t.milliseconds&&i.setMilliseconds(p(t.milliseconds)),i)}function wi(e,t){l(2,arguments);var i=u(e),n=p(t);return i.setHours(n),i}function Si(e,t){l(2,arguments);var i=u(e),n=p(t);return i.setMinutes(n),i}function Ei(e,t){l(2,arguments);var i=u(e),n=p(t);return i.setSeconds(n),i}function xi(e,t){l(2,arguments);var i=u(e),n=p(t);return i.setMilliseconds(n),i}function Oi(e,t){l(2,arguments);var i=u(e),n=u(t);return i.getTime()<n.getTime()}function Ti(e,t){l(2,arguments);var i=u(e),n=u(t);return i.getTime()===n.getTime()}function Di(e,t){l(2,arguments);var i=u(e),n=u(t);return i.getTime()>n.getTime()}function Ri(e){l(1,arguments);var t=u(e),i=t.getHours();return i}function Ai(e){l(1,arguments);var t=u(e),i=t.getMinutes();return i}function _i(e){l(1,arguments);var t=u(e),i=t.getSeconds();return i}function Pi(e){return l(1,arguments),u(e).getFullYear()}function Mi(e){l(1,arguments);var t=u(e),i=t.getMonth();return i}function ki(e,t){var i;l(1,arguments);var n=p(null!==(i=null===t||void 0===t?void 0:t.additionalDigits)&&void 0!==i?i:2);if(2!==n&&1!==n&&0!==n)throw new RangeError("additionalDigits must be 0, 1 or 2");if("string"!==typeof e&&"[object String]"!==Object.prototype.toString.call(e))return new Date(NaN);var o,r=Gi(e);if(r.date){var s=Vi(r.date,n);o=Bi(s.restDateString,s.year)}if(!o||isNaN(o.getTime()))return new Date(NaN);var a,c=o.getTime(),u=0;if(r.time&&(u=Hi(r.time),isNaN(u)))return new Date(NaN);if(!r.timezone){var d=new Date(c+u),h=new Date(0);return h.setFullYear(d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate()),h.setHours(d.getUTCHours(),d.getUTCMinutes(),d.getUTCSeconds(),d.getUTCMilliseconds()),h}return a=Ui(r.timezone),isNaN(a)?new Date(NaN):new Date(c+u+a)}var Ni={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Li=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Ii=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Fi=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Gi(e){var t,i={},n=e.split(Ni.dateTimeDelimiter);if(n.length>2)return i;if(/:/.test(n[0])?t=n[0]:(i.date=n[0],t=n[1],Ni.timeZoneDelimiter.test(i.date)&&(i.date=e.split(Ni.timeZoneDelimiter)[0],t=e.substr(i.date.length,e.length))),t){var o=Ni.timezone.exec(t);
25o?(i.time=t.replace(o[1],""),i.timezone=o[1]):i.time=t}return i}function Vi(e,t){var i=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),n=e.match(i);if(!n)return{year:NaN,restDateString:""};var o=n[1]?parseInt(n[1]):null,r=n[2]?parseInt(n[2]):null;return{year:null===r?o:100*r,restDateString:e.slice((n[1]||n[2]).length)}}function Bi(e,t){if(null===t)return new Date(NaN);var i=e.match(Li);if(!i)return new Date(NaN);var n=!!i[4],o=ji(i[1]),r=ji(i[2])-1,s=ji(i[3]),a=ji(i[4]),l=ji(i[5])-1;if(n)return $i(t,a,l)?zi(t,a,l):new Date(NaN);var c=new Date(0);return qi(t,r,s)&&Xi(t,o)?(c.setUTCFullYear(t,r,Math.max(o,s)),c):new Date(NaN)}function ji(e){return e?parseInt(e):1}function Hi(e){var t=e.match(Ii);if(!t)return NaN;var i=Wi(t[1]),n=Wi(t[2]),o=Wi(t[3]);return Zi(i,n,o)?i*ft+n*ht+1e3*o:NaN}function Wi(e){return e&&parseFloat(e.replace(",","."))||0}function Ui(e){if("Z"===e)return 0;var t=e.match(Fi);if(!t)return 0;var i="+"===t[1]?-1:1,n=parseInt(t[2]),o=t[3]&&parseInt(t[3])||0;return Ji(n,o)?i*(n*ft+o*ht):NaN}function zi(e,t,i){var n=new Date(0);n.setUTCFullYear(e,0,4);var o=n.getUTCDay()||7,r=7*(t-1)+i+1-o;return n.setUTCDate(n.getUTCDate()+r),n}var Ki=[31,null,31,30,31,30,31,31,30,31,30,31];function Yi(e){return e%400===0||e%4===0&&e%100!==0}function qi(e,t,i){return t>=0&&t<=11&&i>=1&&i<=(Ki[t]||(Yi(e)?29:28))}function Xi(e,t){return t>=1&&t<=(Yi(e)?366:365)}function $i(e,t,i){return t>=1&&t<=53&&i>=0&&i<=6}function Zi(e,t,i){return 24===e?0===t&&0===i:i>=0&&i<60&&t>=0&&t<60&&e>=0&&e<25}function Ji(e,t){return t>=0&&t<=59}function Qi(e,t){var i;l(1,arguments);var n=e||{},o=u(n.start),r=u(n.end),s=r.getTime();if(!(o.getTime()<=s))throw new RangeError("Invalid interval");var a=[],c=o;c.setHours(0,0,0,0);var d=Number(null!==(i=null===t||void 0===t?void 0:t.step)&&void 0!==i?i:1);if(d<1||isNaN(d))throw new RangeError("`options.step` must be a number greater than 1");while(c.getTime()<=s)a.push(u(c)),c.setDate(c.getDate()+d),c.setHours(0,0,0,0);return a}function en(e,t){l(2,arguments);var i=u(e),n=p(t);if(isNaN(n))return new Date(NaN);if(!n)return i;var o=i.getDate(),r=new Date(i.getTime());r.setMonth(i.getMonth()+n+1,0);var s=r.getDate();return o>=s?r:(i.setFullYear(r.getFullYear(),r.getMonth(),o),i)}function tn(e,t){var i,n,o,r,s,a,c,d;l(1,arguments);var h=E(),f=p(null!==(i=null!==(n=null!==(o=null!==(r=null===t||void 0===t?void 0:t.weekStartsOn)&&void 0!==r?r:null===t||void 0===t||null===(s=t.locale)||void 0===s||null===(a=s.options)||void 0===a?void 0:a.weekStartsOn)&&void 0!==o?o:h.weekStartsOn)&&void 0!==n?n:null===(c=h.locale)||void 0===c||null===(d=c.options)||void 0===d?void 0:d.weekStartsOn)&&void 0!==i?i:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var g=u(e),v=g.getDay(),y=(v<f?7:0)+v-f;return g.setDate(g.getDate()-y),g.setHours(0,0,0,0),g}function nn(e,t){var i,n,o,r,s,a,c,d;l(1,arguments);var h=E(),f=p(null!==(i=null!==(n=null!==(o=null!==(r=null===t||void 0===t?void 0:t.weekStartsOn)&&void 0!==r?r:null===t||void 0===t||null===(s=t.locale)||void 0===s||null===(a=s.options)||void 0===a?void 0:a.weekStartsOn)&&void 0!==o?o:h.weekStartsOn)&&void 0!==n?n:null===(c=h.locale)||void 0===c||null===(d=c.options)||void 0===d?void 0:d.weekStartsOn)&&void 0!==i?i:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var g=u(e),v=g.getDay(),y=6+(v<f?-7:0)-(v-f);return g.setDate(g.getDate()+y),g.setHours(23,59,59,999),g}function on(e,t){l(2,arguments);var i=u(e),n=p(t);return isNaN(i.getTime())?new Date(NaN):(i.setFullYear(n),i)}function rn(e,t){l(2,arguments);var i=p(t);return en(e,-i)}function sn(e,t){l(2,arguments);var i=p(t);return en(e,12*i)}function an(e,t){l(2,arguments);var i=p(t);return sn(e,-i)}function ln(e,t){l(2,arguments);var i=u(e),n=p(t);return isNaN(n)?new Date(NaN):n?(i.setDate(i.getDate()+n),i):i}function cn(e){l(1,arguments);var t=u(e),i=t.getDay();return i}function un(e){l(1,arguments);var t=u(e);return t.setHours(0,0,0,0),t}var dn=864e5;function pn(e,t){l(2,arguments);var i=un(e),n=un(t),o=i.getTime()-W(i),r=n.getTime()-W(n);return Math.round((o-r)/dn)}function hn(e,t){if(l(2,arguments),!t||"object"!==(0,a.Z)(t))return new Date(NaN);var i=t.years?p(t.years):0,n=t.months?p(t.months):0,o=t.weeks?p(t.weeks):0,r=t.days?p(t.days):0,s=t.hours?p(t.hours):0,c=t.minutes?p(t.minutes):0,d=t.seconds?p(t.seconds):0,h=u(e),f=n||i?en(h,n+12*i):h,g=r||o?ln(f,r+7*o):f,v=c+60*s,y=d+60*v,m=1e3*y,C=new Date(g.getTime()+m);return C}function fn(e,t){l(2,arguments);var i=p(t);
25return ln(e,-i)}function gn(e,t){if(l(2,arguments),!t||"object"!==(0,a.Z)(t))return new Date(NaN);var i=t.years?p(t.years):0,n=t.months?p(t.months):0,o=t.weeks?p(t.weeks):0,r=t.days?p(t.days):0,s=t.hours?p(t.hours):0,c=t.minutes?p(t.minutes):0,u=t.seconds?p(t.seconds):0,d=rn(e,n+12*i),h=fn(d,r+7*o),f=c+60*s,g=u+60*f,v=1e3*g,y=new Date(h.getTime()-v);return y}function vn(e,t){var i,n,o,r,s,a,c,d;l(1,arguments);var h=u(e),f=h.getFullYear(),g=E(),v=p(null!==(i=null!==(n=null!==(o=null!==(r=null===t||void 0===t?void 0:t.firstWeekContainsDate)&&void 0!==r?r:null===t||void 0===t||null===(s=t.locale)||void 0===s||null===(a=s.options)||void 0===a?void 0:a.firstWeekContainsDate)&&void 0!==o?o:g.firstWeekContainsDate)&&void 0!==n?n:null===(c=g.locale)||void 0===c||null===(d=c.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==i?i:1);if(!(v>=1&&v<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var y=new Date(0);y.setFullYear(f+1,0,v),y.setHours(0,0,0,0);var m=tn(y,t),C=new Date(0);C.setFullYear(f,0,v),C.setHours(0,0,0,0);var b=tn(C,t);return h.getTime()>=m.getTime()?f+1:h.getTime()>=b.getTime()?f:f-1}function yn(e,t){var i,n,o,r,s,a,c,u;l(1,arguments);var d=E(),h=p(null!==(i=null!==(n=null!==(o=null!==(r=null===t||void 0===t?void 0:t.firstWeekContainsDate)&&void 0!==r?r:null===t||void 0===t||null===(s=t.locale)||void 0===s||null===(a=s.options)||void 0===a?void 0:a.firstWeekContainsDate)&&void 0!==o?o:d.firstWeekContainsDate)&&void 0!==n?n:null===(c=d.locale)||void 0===c||null===(u=c.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==i?i:1),f=vn(e,t),g=new Date(0);g.setFullYear(f,0,h),g.setHours(0,0,0,0);var v=tn(g,t);return v}var mn=6048e5;function Cn(e,t){l(1,arguments);var i=u(e),n=tn(i,t).getTime()-yn(i,t).getTime();return Math.round(n/mn)+1}function bn(e){return l(1,arguments),tn(e,{weekStartsOn:1})}function wn(e){l(1,arguments);var t=u(e),i=t.getFullYear(),n=new Date(0);n.setFullYear(i+1,0,4),n.setHours(0,0,0,0);var o=bn(n),r=new Date(0);r.setFullYear(i,0,4),r.setHours(0,0,0,0);var s=bn(r);return t.getTime()>=o.getTime()?i+1:t.getTime()>=s.getTime()?i:i-1}function Sn(e){l(1,arguments);var t=wn(e),i=new Date(0);i.setFullYear(t,0,4),i.setHours(0,0,0,0);var n=bn(i);return n}var En=6048e5;function xn(e){l(1,arguments);var t=u(e),i=bn(t).getTime()-Sn(t).getTime();return Math.round(i/En)+1}function On(e){l(1,arguments);var t=u(e),i=t.getMonth(),n=i-i%3;return t.setMonth(n,1),t.setHours(0,0,0,0),t}function Tn(e,t){l(2,arguments);var i=On(e),n=On(t);return i.getTime()===n.getTime()}function Dn(e,t){l(2,arguments);var i=p(t),n=3*i;return en(e,n)}function Rn(e){l(1,arguments);var t=e||{},i=u(t.start),n=u(t.end),o=n.getTime();if(!(i.getTime()<=o))throw new RangeError("Invalid interval");var r=On(i),s=On(n);o=s.getTime();var a=[],c=r;while(c.getTime()<=o)a.push(u(c)),c=Dn(c,1);return a}function An(e){l(1,arguments);var t=u(e),i=new Date(0);return i.setFullYear(t.getFullYear(),0,1),i.setHours(0,0,0,0),i}function _n(e){l(1,arguments);var t=u(e),i=t.getFullYear();return t.setFullYear(i+1,0,0),t.setHours(23,59,59,999),t}function Pn(e){l(1,arguments);var t=u(e),i=t.getMonth(),n=i-i%3+3;return t.setMonth(n,0),t.setHours(23,59,59,999),t}function Mn(e){l(1,arguments);var t=u(e),i=Math.floor(t.getMonth()/3)+1;return i}function kn(){return(0,n.wg)(),(0,n.iD)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[(0,n._)("path",{d:"M29.333 8c0-2.208-1.792-4-4-4h-18.667c-2.208 0-4 1.792-4 4v18.667c0 2.208 1.792 4 4 4h18.667c2.208 0 4-1.792 4-4v-18.667zM26.667 8v18.667c0 0.736-0.597 1.333-1.333 1.333 0 0-18.667 0-18.667 0-0.736 0-1.333-0.597-1.333-1.333 0 0 0-18.667 0-18.667 0-0.736 0.597-1.333 1.333-1.333 0 0 18.667 0 18.667 0 0.736 0 1.333 0.597 1.333 1.333z"}),(0,n._)("path",{d:"M20 2.667v5.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-5.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"}),(0,n._)("path",{d:"M9.333 2.667v5.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-5.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"}),(0,n._)("path",{d:"M4 14.667h24c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333h-24c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333z"})])}function Nn(){return(0,n.wg)(),(0,n.iD)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"
25currentColor","aria-hidden":"true",class:"dp__icon"},[(0,n._)("path",{d:"M23.057 7.057l-16 16c-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0l16-16c0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0z"}),(0,n._)("path",{d:"M7.057 8.943l16 16c0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885l-16-16c-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885z"})])}function Ln(){return(0,n.wg)(),(0,n.iD)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[(0,n._)("path",{d:"M20.943 23.057l-7.057-7.057c0 0 7.057-7.057 7.057-7.057 0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0l-8 8c-0.521 0.521-0.521 1.365 0 1.885l8 8c0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885z"})])}function In(){return(0,n.wg)(),(0,n.iD)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[(0,n._)("path",{d:"M12.943 24.943l8-8c0.521-0.521 0.521-1.365 0-1.885l-8-8c-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885l7.057 7.057c0 0-7.057 7.057-7.057 7.057-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0z"})])}function Fn(){return(0,n.wg)(),(0,n.iD)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[(0,n._)("path",{d:"M16 1.333c-8.095 0-14.667 6.572-14.667 14.667s6.572 14.667 14.667 14.667c8.095 0 14.667-6.572 14.667-14.667s-6.572-14.667-14.667-14.667zM16 4c6.623 0 12 5.377 12 12s-5.377 12-12 12c-6.623 0-12-5.377-12-12s5.377-12 12-12z"}),(0,n._)("path",{d:"M14.667 8v8c0 0.505 0.285 0.967 0.737 1.193l5.333 2.667c0.658 0.329 1.46 0.062 1.789-0.596s0.062-1.46-0.596-1.789l-4.596-2.298c0 0 0-7.176 0-7.176 0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"})])}function Gn(){return(0,n.wg)(),(0,n.iD)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[(0,n._)("path",{d:"M24.943 19.057l-8-8c-0.521-0.521-1.365-0.521-1.885 0l-8 8c-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0l7.057-7.057c0 0 7.057 7.057 7.057 7.057 0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885z"})])}function Vn(){return(0,n.wg)(),(0,n.iD)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[(0,n._)("path",{d:"M7.057 12.943l8 8c0.521 0.521 1.365 0.521 1.885 0l8-8c0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0l-7.057 7.057c0 0-7.057-7.057-7.057-7.057-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885z"})])}function Bn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}kn.compatConfig={MODE:3},Nn.compatConfig={MODE:3},Ln.compatConfig={MODE:3},In.compatConfig={MODE:3},Fn.compatConfig={MODE:3},Gn.compatConfig={MODE:3},Vn.compatConfig={MODE:3};var jn={exports:{}};(function(e){function t(e){return e&&e.__esModule?e:{default:e}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(jn);var Hn=jn.exports,Wn={exports:{}};(function(e,t){function i(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i,e.exports=t.default})(Wn,Wn.exports);var Un=Wn.exports;const zn=Bn(Un);var Kn={exports:{}};(function(e,t){function i(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i,e.exports=t.default})(Kn,Kn.exports);var Yn=Kn.exports;const qn=Bn(Yn);function Xn(e,t){var i=eo(t);return i.formatToParts?Zn(i,e):Jn(i,e)}var $n={year:0,month:1,day:2,hour:3,minute:4,second:5};function Zn(e,t){try{for(var i=e.formatToParts(t),n=[],o=0;o<i.length;o++){var r=$n[i[o].type];r>=0&&(n[r]=parseInt(i[o].value,10))}return n}catch(s){if(s instanceof RangeError)return[NaN];throw s}}function Jn(e,t){var i=e.format(t).replace(/\u200E/g,""),n=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(i);return[n[3],n[1],n[2],n[4],n[5],n[6]]}var Qn={};function eo(e){if(!Qn[e]){var t=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:"America/Ne
25w_York",year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),i="06/25/2014, 00:00:00"===t||"‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00"===t;Qn[e]=i?new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}return Qn[e]}function to(e,t,i,n,o,r,s){var a=new Date(0);return a.setUTCFullYear(e,t,i),a.setUTCHours(n,o,r,s),a}var io=36e5,no=6e4,oo={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-]\d{2}):?(\d{2})$/};function ro(e,t,i){var n,o,r;if(""===e||(n=oo.timezoneZ.exec(e),n))return 0;if(n=oo.timezoneHH.exec(e),n)return r=parseInt(n[1],10),co(r)?-r*io:NaN;if(n=oo.timezoneHHMM.exec(e),n){r=parseInt(n[1],10);var s=parseInt(n[2],10);return co(r,s)?(o=Math.abs(r)*io+s*no,r>0?-o:o):NaN}if(po(e)){t=new Date(t||Date.now());var a=i?t:so(t),l=ao(a,e),c=i?l:lo(t,l,e);return-c}return NaN}function so(e){return to(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}function ao(e,t){var i=Xn(e,t),n=to(i[0],i[1]-1,i[2],i[3]%24,i[4],i[5],0).getTime(),o=e.getTime(),r=o%1e3;return o-=r>=0?r:1e3+r,n-o}function lo(e,t,i){var n=e.getTime(),o=n-t,r=ao(new Date(o),i);if(t===r)return t;o-=r-t;var s=ao(new Date(o),i);return r===s?r:Math.max(r,s)}function co(e,t){return-23<=e&&e<=23&&(null==t||0<=t&&t<=59)}var uo={};function po(e){if(uo[e])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:e}),uo[e]=!0,!0}catch{return!1}}var ho=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,fo=36e5,go=6e4,vo=2,yo={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,plainTime:/:/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:ho};function mo(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(null===e)return new Date(NaN);var i=t||{},n=null==i.additionalDigits?vo:zn(i.additionalDigits);if(2!==n&&1!==n&&0!==n)throw new RangeError("additionalDigits must be 0, 1 or 2");if(e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e))return new Date(e.getTime());if("number"==typeof e||"[object Number]"===Object.prototype.toString.call(e))return new Date(e);if("string"!=typeof e&&"[object String]"!==Object.prototype.toString.call(e))return new Date(NaN);var o=Co(e),r=bo(o.date,n),s=r.year,a=r.restDateString,l=wo(a,s);if(isNaN(l))return new Date(NaN);if(l){var c,u=l.getTime(),d=0;if(o.time&&(d=So(o.time),isNaN(d)))return new Date(NaN);if(o.timeZone||i.timeZone){if(c=ro(o.timeZone||i.timeZone,new Date(u+d)),isNaN(c))return new Date(NaN)}else c=qn(new Date(u+d)),c=qn(new Date(u+d+c));return new Date(u+d+c)}return new Date(NaN)}function Co(e){var t,i={},n=yo.dateTimePattern.exec(e);if(n?(i.date=n[1],t=n[3]):(n=yo.datePattern.exec(e),n?(i.date=n[1],t=n[2]):(i.date=null,t=e)),t){var o=yo.timeZone.exec(t);
25o?(i.time=t.replace(o[1],""),i.timeZone=o[1].trim()):i.time=t}return i}function bo(e,t){var i,n=yo.YYY[t],o=yo.YYYYY[t];if(i=yo.YYYY.exec(e)||o.exec(e),i){var r=i[1];return{year:parseInt(r,10),restDateString:e.slice(r.length)}}if(i=yo.YY.exec(e)||n.exec(e),i){var s=i[1];return{year:100*parseInt(s,10),restDateString:e.slice(s.length)}}return{year:null}}function wo(e,t){if(null===t)return null;var i,n,o,r;if(0===e.length)return n=new Date(0),n.setUTCFullYear(t),n;if(i=yo.MM.exec(e),i)return n=new Date(0),o=parseInt(i[1],10)-1,Do(t,o)?(n.setUTCFullYear(t,o),n):new Date(NaN);if(i=yo.DDD.exec(e),i){n=new Date(0);var s=parseInt(i[1],10);return Ro(t,s)?(n.setUTCFullYear(t,0,s),n):new Date(NaN)}if(i=yo.MMDD.exec(e),i){n=new Date(0),o=parseInt(i[1],10)-1;var a=parseInt(i[2],10);return Do(t,o,a)?(n.setUTCFullYear(t,o,a),n):new Date(NaN)}if(i=yo.Www.exec(e),i)return r=parseInt(i[1],10)-1,Ao(t,r)?Eo(t,r):new Date(NaN);if(i=yo.WwwD.exec(e),i){r=parseInt(i[1],10)-1;var l=parseInt(i[2],10)-1;return Ao(t,r,l)?Eo(t,r,l):new Date(NaN)}return null}function So(e){var t,i,n;if(t=yo.HH.exec(e),t)return i=parseFloat(t[1].replace(",",".")),_o(i)?i%24*fo:NaN;if(t=yo.HHMM.exec(e),t)return i=parseInt(t[1],10),n=parseFloat(t[2].replace(",",".")),_o(i,n)?i%24*fo+n*go:NaN;if(t=yo.HHMMSS.exec(e),t){i=parseInt(t[1],10),n=parseInt(t[2],10);var o=parseFloat(t[3].replace(",","."));return _o(i,n,o)?i%24*fo+n*go+1e3*o:NaN}return null}function Eo(e,t,i){t=t||0,i=i||0;var n=new Date(0);n.setUTCFullYear(e,0,4);var o=n.getUTCDay()||7,r=7*t+i+1-o;return n.setUTCDate(n.getUTCDate()+r),n}var xo=[31,28,31,30,31,30,31,31,30,31,30,31],Oo=[31,29,31,30,31,30,31,31,30,31,30,31];function To(e){return e%400===0||e%4===0&&e%100!==0}function Do(e,t,i){if(t<0||t>11)return!1;if(null!=i){if(i<1)return!1;var n=To(e);if(n&&i>Oo[t]||!n&&i>xo[t])return!1}return!0}function Ro(e,t){if(t<1)return!1;var i=To(e);return!(i&&t>366||!i&&t>365)}function Ao(e,t,i){return!(t<0||t>52||null!=i&&(i<0||i>6))}function _o(e,t,i){return!(null!=e&&(e<0||e>=25)||null!=t&&(t<0||t>=60)||null!=i&&(i<0||i>=60))}var Po={exports:{}},Mo={exports:{}};(function(e,t){function i(e,t){if(null==e)throw new TypeError("assign requires that input parameter not be null or undefined");for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i,e.exports=t.default})(Mo,Mo.exports);var ko=Mo.exports;(function(e,t){var i=Hn.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var n=i(ko);function o(e){return(0,n.default)({},e)}e.exports=t.default})(Po,Po.exports);var No=Po.exports;const Lo=Bn(No);function Io(e,t,i){var n=mo(e,i),o=ro(t,n,!0),r=new Date(n.getTime()-o),s=new Date(0);return s.setFullYear(r.getUTCFullYear(),r.getUTCMonth(),r.getUTCDate()),s.setHours(r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds(),r.getUTCMilliseconds()),s}function Fo(e,t,i){if("string"==typeof e&&!e.match(ho)){var n=Lo(i);return n.timeZone=t,mo(e,n)}var o=mo(e,i),r=to(o.getFullYear(),o.getMonth(),o.getDate(),o.getHours(),o.getMinutes(),o.getSeconds(),o.getMilliseconds()).getTime(),s=ro(t,new Date(r));return new Date(r+s)}function Go(e){return t=>new Intl.DateTimeFormat(e,{weekday:"short",timeZone:"UTC"}).format(new Date(`2017-01-0${t}T00:00:00+00:00`)).slice(0,2)}function Vo(e){return t=>We(new Date(`2017-01-0${t}T00:00:00+00:00`),"EEEEEE",{locale:e})}const Bo=(e,t,i)=>{const n=[1,2,3,4,5,6,7];let o;if(null!==e)try{o=n.map(Vo(e))}catch{o=n.map(Go(t))}else o=n.map(Go(t));const r=o.slice(0,i),s=o.slice(i+1,o.length);return[o[i]].concat(...s).concat(...r)},jo=(e,t)=>{const i=[];for(let n=+e[0];n<=+e[1];n++)i.push({value:+n,text:`${n}`});return t?i.reverse():i},Ho=(e,t,i)=>{const n=[1,2,3,4,5,6,7,8,9,10,11,12].map((e=>{const t=e<10?`0${e}`:e;return new Date(`2017-${t}-01T00:00:00+00:00`)}));if(null!==e)try{const t="long"===i?"MMMM":"MMM";return n.map(((i,n)=>{const o=We(i,t,{locale:e});return{text:o.charAt(0).toUpperCase()+o.substring(1),value:n}}))}catch{}const o=new Intl.DateTimeFormat(t,{month:i,timeZone:"UTC"});return n.map(((e,t)=>{const i=o.format(e);return{text:i.charAt(0).toUpperCase()+i.substring(1),value:t}}))},Wo=e=>[12,1,2,3,4,5,6,7,8,9,10,11,12,1,2,3,4,5,6,7,8,9,10,11][e],Uo=e=>{const t=(0,o.SU)(e);return null!=t&&t.$el?null==t?void 0:t.$el:t},zo=e=>Object.assign({type:"dot"},e),Ko=e=>!!Array.isArray(e)&&(!!e[0]&&!!e[1]),Yo={prop:e=>`"${e}" prop must be enabled!`,dateArr:e=>`You need to use array as "model-value" binding in order to supp
25ort "${e}"`},qo=e=>e,Xo=e=>0===e?e:!e||isNaN(+e)?null:+e,$o=e=>null===e,Zo=e=>{if(e)return[...e.querySelectorAll("input, button, select, textarea, a[href]")][0]},Jo=e=>{const t=[],i=e=>e.filter((e=>e));for(let n=0;n<e.length;n+=3){const o=[e[n],e[n+1],e[n+2]];t.push(i(o))}return t},Qo=(e,t,i)=>{const n=i??0===i,o=t??0===t;if(!n&&!o)return!1;const r=+i,s=+t;return n&&o?+e>r||+e<s:n?+e>r:!!o&&+e<s},er=(e,t)=>Jo(e).map((e=>e.map((e=>{const{active:i,disabled:n,isBetween:o,highlighted:r}=t(e);return{...e,active:i,disabled:n,className:{dp__overlay_cell_active:i,dp__overlay_cell:!i,dp__overlay_cell_disabled:n,dp__overlay_cell_pad:!0,dp__overlay_cell_active_disabled:n&&i,dp__cell_in_between:o,"dp--highlighted":r}}})))),tr=(e,t,i=!1)=>{e&&t.allowStopPropagation&&(i&&e.stopImmediatePropagation(),e.stopPropagation())},ir=()=>["a[href]","area[href]","input:not([disabled]):not([type='hidden'])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","[tabindex]:not([tabindex='-1'])","[data-datepicker-instance]"].join(", ");function nr(e,t){let i=[...document.querySelectorAll(ir())];i=i.filter((t=>!e.contains(t)||t.hasAttribute("data-datepicker-instance")));const n=i.indexOf(e);if(n>=0&&(t?n-1>=0:n+1<=i.length))return i[n+(t?-1:1)]}const or=(e,t)=>{let i;return function(...n){clearTimeout(i),i=setTimeout((()=>{e(...n)}),t)}},rr=(e,t,i,n,o)=>{const r=vi(e,t.slice(0,e.length),new Date);return d(r)&&c(r)?n||o?r:bi(r,{hours:+i.hours,minutes:+(null==i?void 0:i.minutes),seconds:+(null==i?void 0:i.seconds),milliseconds:0}):null},sr=(e,t,i,n,o)=>{const r=Array.isArray(i)?i[0]:i;if("string"==typeof t)return rr(e,t,r,n,o);if(Array.isArray(t)){let i=null;for(const s of t)if(i=rr(e,s,r,n,o),i)break;return i}return"function"==typeof t?t(e):null},ar=e=>e?new Date(e):new Date,lr=(e,t,i)=>{if(t){const t=(e.getMonth()+1).toString().padStart(2,"0"),n=e.getDate().toString().padStart(2,"0"),o=e.getHours().toString().padStart(2,"0"),r=e.getMinutes().toString().padStart(2,"0"),s=i?e.getSeconds().toString().padStart(2,"0"):"00";return`${e.getFullYear()}-${t}-${n}T${o}:${r}:${s}.000Z`}const n=Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds());return new Date(n).toISOString()},cr=e=>{let t=ar(JSON.parse(JSON.stringify(e)));return t=wi(t,0),t=Si(t,0),t=Ei(t,0),t=xi(t,0),t},ur=(e,t,i,n)=>{let o=e?ar(e):ar();return(t||0===t)&&(o=wi(o,+t)),(i||0===i)&&(o=Si(o,+i)),(n||0===n)&&(o=Ei(o,+n)),xi(o,0)},dr=(e,t)=>!(!e||!t)&&Oi(cr(e),cr(t)),pr=(e,t)=>!(!e||!t)&&Ti(cr(e),cr(t)),hr=(e,t)=>!(!e||!t)&&Di(cr(e),cr(t)),fr=(e,t,i)=>null!=e&&e[0]&&null!=e&&e[1]?hr(i,e[0])&&dr(i,e[1]):!(null==e||!e[0]||!t)&&(hr(i,e[0])&&dr(i,t)||dr(i,e[0])&&hr(i,t)),gr=e=>{const t=bi(new Date(e),{date:1});return cr(t)},vr=(e,t,i)=>t&&(i||0===i)?Object.fromEntries(["hours","minutes","seconds"].map((n=>n===t?[n,i]:[n,isNaN(+e[n])?void 0:+e[n]]))):{hours:isNaN(+e.hours)?void 0:+e.hours,minutes:isNaN(+e.minutes)?void 0:+e.minutes,seconds:isNaN(+e.seconds)?void 0:+e.seconds},yr=e=>({hours:Ri(e),minutes:Ai(e),seconds:_i(e)}),mr=(e,t)=>{if(t){const i=Pi(ar(t));if(i>e)return 12;if(i===e)return Mi(ar(t))}},Cr=(e,t)=>{if(t){const i=Pi(ar(t));return i<e?-1:i===e?Mi(ar(t)):void 0}},br=e=>{if(e)return Pi(ar(e))},wr=(e,t)=>
25t?Io(e,t):e,Sr=(e,t)=>t?Fo(e,t):e,Er=e=>e instanceof Date?e:ki(e),xr=(e,t)=>{const i=hr(e,t)?t:e,n=hr(t,e)?t:e;return Qi({start:i,end:n})},Or=e=>{const t=en(e,1);return{month:Mi(t),year:Pi(t)}},Tr=(e,t,i)=>{const n=tn(wr(e,t),{weekStartsOn:+i}),o=nn(wr(e,t),{weekStartsOn:+i});return[n,o]},Dr=(e,t)=>{const i={hours:Ri(ar()),minutes:Ai(ar()),seconds:t?_i(ar()):0};return Object.assign(i,e)},Rr=(e,t,i)=>[bi(ar(e),{date:1}),bi(ar(),{month:t,year:i,date:1})],Ar=(e,t,i)=>{let n=e?ar(e):ar();return(t||0===t)&&(n=Ci(n,t)),i&&(n=on(n,i)),n},_r=(e,t,i,n,o)=>{if(!n||o&&!t||!o&&!i)return!1;const r=o?en(e,1):rn(e,1),s=[Mi(r),Pi(r)];return o?!Mr(...s,t):!Pr(...s,i)},Pr=(e,t,i)=>dr(...Rr(i,e,t))||pr(...Rr(i,e,t)),Mr=(e,t,i)=>hr(...Rr(i,e,t))||pr(...Rr(i,e,t)),kr=(e,t,i,n,o,r,s)=>{if("function"==typeof t&&!s)return t(e);const a=i?{locale:i}:void 0;return Array.isArray(e)?`${We(e[0],r,a)}${o&&!e[1]?"":n}${e[1]?We(e[1],r,a):""}`:We(e,r,a)},Nr=e=>{if(e)return null;throw new Error(Yo.prop("partial-range"))},Lr=(e,t)=>{if(t)return e();throw new Error(Yo.prop("range"))},Ir=e=>Array.isArray(e)?d(e[0])&&(!e[1]||d(e[1])):!!e&&d(e),Fr=(e,t)=>bi(t??ar(),{hours:+e.hours||0,minutes:+e.minutes||0,seconds:+e.seconds||0}),Gr=(e,t,i,n)=>{if(!e)return!0;if(n){const n="max"===i?Oi(e,t):Di(e,t),o={seconds:0,milliseconds:0};return n||Ti(bi(e,o),bi(t,o))}return"max"===i?e.getTime()<=t.getTime():e.getTime()>=t.getTime()},Vr=(e,t,i)=>e?Fr(e,t):ar(i??t),Br=(e,t,i,n,o)=>{if(Array.isArray(n)){const r=Vr(e,n[0],t),s=Vr(e,n[1],t);return Gr(n[0],r,i,!!t)&&Gr(n[1],s,i,!!t)&&o}const r=Vr(e,n,t);return Gr(n,r,i,!!t)&&o},jr=e=>bi(ar(),yr(e)),Hr=(e,t)=>Array.isArray(e)?e.map((e=>ar(e))).filter((e=>Pi(ar(e))===t)).map((e=>Mi(e))):[],Wr=(e,t,i)=>"function"==typeof e?e({month:t,year:i}):!!e.months.find((e=>e.month===t&&e.year===i)),Ur=(e,t)=>"function"==typeof e?e(t):e.years.includes(t),zr=(0,o.qj)({menuFocused:!1,shiftKeyInMenu:!1}),Kr=()=>{const e=e=>{zr.menuFocused=e},t=e=>{zr.shiftKeyInMenu!==e&&(zr.shiftKeyInMenu=e)};return{control:(0,n.Fl)((()=>({shiftKeyInMenu:zr.shiftKeyInMenu,menuFocused:zr.menuFocused}))),setMenuFocused:e,setShiftKey:t}},Yr=(0,o.qj)({monthYear:[],calendar:[],time:[],actionRow:[],selectionGrid:[],timePicker:{0:[],1:[]},monthPicker:[]}),qr=(0,o.iH)(null),Xr=(0,o.iH)(!1),$r=(0,o.iH)(!1),Zr=(0,o.iH)(!1),Jr=(0,o.iH)(!1),Qr=(0,o.iH)(0),es=(0,o.iH)(0),ts=()=>{const e=(0,n.Fl)((()=>Xr.value?[...Yr.selectionGrid,Yr.actionRow].filter((e=>e.length)):$r.value?[...Yr.timePicker[0],...Yr.timePicker[1],Jr.value?[]:[qr.value],Yr.actionRow].filter((e=>e.length)):Zr.value?[...Yr.monthPicker,Yr.actionRow]:[Yr.monthYear,...Yr.calendar,Yr.time,Yr.actionRow].filter((e=>e.length)))),t=t=>{Qr.value=t?Qr.value+1:Qr.value-1;let i=null;e.value[es.value]&&(i=e.value[es.value][Qr.value]),i||(Qr.value=t?Qr.value-1:Qr.value+1)},i=t=>{0===es.value&&!t||es.value===e.value.length&&t||(es.value=t?es.value+1:es.value-1,e.value[es.value]?e.value[es.value]&&!e.value[es.value][Qr.value]&&0!==Qr.value&&(Qr.value=e.value[es.value].length-1):es.value=t?es.value-1:es.value+1)},o=t=>{let i=null;e.value[es.value]&&(i=e.value[es.value][Qr.value]),i?i.focus({preventScroll:!Xr.value}):Qr.value=t?Qr.value-1:Qr.value+1},r=()=>{t(!0),o(!0)},s=()=>{t(!1),o(!1)},a=()=>{i(!1),o(!0)},l=()=>{i(!0),o(!0)},c=(e,t)=>{Yr[t]=e},u=(e,t)=>{Yr[t]=e},d=()=>{Qr.value=0,es.value=0};return{buildMatrix:c,buildMultiLevelMatrix:u,setTimePickerBackRef:e=>{qr.value=e},setSelectionGrid:e=>{Xr.value=e,d(),e||(Yr.selectionGrid=[])},setTimePicker:(e,t=!1)=>{$r.value=e,Jr.value=t,d(),e||(Yr.timePicker[0]=[],Yr.timePicker[1]=[])},setTimePickerElements:(e,t=0)=>{Yr.timePicker[t]=e},arrowRight:r,arrowLeft:s,arrowUp:a,arrowDown:l,clearArrowNav:()=>{Yr.monthYear=[],Yr.calendar=[],Yr.time=[],Yr.actionRow=[],Yr.selectionGrid=[],Yr.timePicker[0]=[],Yr.timePicker[1]=[],Xr.value=!1,$r.value=!1,Jr.value=!1,Zr.value=!1,d(),qr.value=null},setMonthPicker:e=>{Zr.value=e,d()},refSets:Yr}},is=e=>({menuAppearTop:"dp-menu-appear-top",menuAppearBottom:"dp-menu-appear-bottom",open:"dp-slide-down",close:"dp-slide-up",next:"calendar-next",previous:"calendar-prev",vNext:"dp-slide-up",vPrevious:"dp-slide-down",...e??{}}),ns=e=>({toggleOverlay:"Toggle overlay",menu:"Datepicker menu",input:"Datepicker input",calendarWrap:"Calendar wrapper",calendarDays:"Calendar days",openTimePicker:"Open time picker",closeTimePicker:"Close time Picker",incrementValue:e=>`Increment ${e}`,decrementValue:e=>`Decrement ${e}`,openTpOverlay:e=>`Open ${e} overlay`,amPmButton:"Switch AM/PM mode",openYearsOverlay:"Open years overlay",openMonthsOverlay:"Open months overlay",nextMonth:"Next month",prevMonth:"Previous month",nextYear:"Next year",prevYear:"Previous year",day:()=>"",...e??{}}),os=e=>e?"boolean"==typeof e?e?2:0:+e>=2?+e:2:0,rs=e=>{const t="object"==typeof e&&e,i={static:!0,solo:!1};if(!e)return{...i,count:os(!1)};const n=t?e:{}
25,o=t?n.count??!0:e,r=os(o);return Object.assign(i,n,{count:r})},ss=(e,t,i)=>e||("string"==typeof i?i:t),as=e=>"boolean"==typeof e?!!e&&is({}):is(e),ls=e=>{const t={enterSubmit:!0,tabSubmit:!0,openMenu:!0,selectOnFocus:!1,rangeSeparator:" - "};return"object"==typeof e?{...t,...e??{},enabled:!0}:{...t,enabled:e}},cs=e=>({months:[],years:[],times:{hours:[],minutes:[],seconds:[]},...e??{}}),us=e=>({showSelect:!0,showCancel:!0,showNow:!1,showPreview:!0,...e??{}}),ds=e=>{const t={input:!1};return"object"==typeof e?{...t,...e??{},enabled:!0}:{enabled:e,...t}},ps=e=>({allowStopPropagation:!0,closeOnScroll:!1,modeHeight:255,allowPreventDefault:!1,closeOnClearValue:!0,closeOnAutoApply:!0,noSwipe:!1,keepActionRow:!1,onClickOutside:void 0,tabOutClosesMenu:!0,...e??{}}),hs=(e,t,i)=>{const n={dates:Array.isArray(e)?e.map((e=>ar(e))):[],years:[],months:[],quarters:[],weeks:[],weekdays:t,options:{highlightDisabled:i}};return"function"==typeof e?e:{...n,...e??{}}},fs=e=>"object"==typeof e?{type:e.type,hideOnOffsetDates:e.hideOnOffsetDates??!1}:{type:e,hideOnOffsetDates:!1},gs=e=>{const t=()=>{const t=e.enableSeconds?":ss":"";return e.is24?`HH:mm${t}`:`hh:mm${t} aa`},i=()=>e.format?e.format:e.monthPicker?"MM/yyyy":e.timePicker?t():e.weekPicker?"MM/dd/yyyy":e.yearPicker?"yyyy":e.quarterPicker?"QQQ/yyyy":e.enableTimePicker?`MM/dd/yyyy, ${t()}`:"MM/dd/yyyy",o=t=>Dr(t,e.enableSeconds),r=()=>e.range?e.startTime&&Array.isArray(e.startTime)?[o(e.startTime[0]),o(e.startTime[1])]:null:e.startTime&&!Array.isArray(e.startTime)?o(e.startTime):null,s=(0,n.Fl)((()=>rs(e.multiCalendars))),a=(0,n.Fl)((()=>r())),l=(0,n.Fl)((()=>ns(e.ariaLabels))),c=(0,n.Fl)((()=>cs(e.filters))),u=(0,n.Fl)((()=>as(e.transitions))),d=(0,n.Fl)((()=>us(e.actionRow))),p=(0,n.Fl)((()=>ss(e.previewFormat,e.format,i()))),h=(0,n.Fl)((()=>ls(e.textInput))),f=(0,n.Fl)((()=>ds(e.inline))),g=(0,n.Fl)((()=>ps(e.config))),v=(0,n.Fl)((()=>hs(e.highlight,e.highlightWeekDays,e.highlightDisabledDays))),y=(0,n.Fl)((()=>fs(e.weekNumbers)));return{defaultedTransitions:u,defaultedMultiCalendars:s,defaultedStartTime:a,defaultedAriaLabels:l,defaultedFilters:c,defaultedActionRow:d,defaultedPreviewFormat:p,defaultedTextInput:h,defaultedInline:f,defaultedConfig:g,defaultedHighlight:v,defaultedWeekNumbers:y,getDefaultPattern:i,getDefaultStartTime:r}},vs=(e,t,i)=>{const r=(0,o.iH)(),{defaultedTextInput:s,getDefaultPattern:a}=gs(t),l=(0,o.iH)(""),c=(0,o.Vh)(t,"format");(0,n.YP)(r,(()=>{e("internal-model-change",r.value)})),(0,n.YP)(c,(()=>{M()}));const u=e=>Sr(e,t.timezone),d=e=>wr(e,t.timezone),p=(e,i,n=!1)=>kr(e,t.format,t.formatLocale,s.value.rangeSeparator,t.modelAuto,i??a(),n),h=e=>e?t.modelType?N(e):{hours:Ri(e),minutes:Ai(e),seconds:t.enableSeconds?_i(e):0}:null,f=e=>t.modelType?N(e):{month:Mi(e),year:Pi(e)},g=e=>Array.isArray(e)?t.multiDates?e.map((e=>v(e,on(ar(),e)))):Lr((()=>[on(ar(),e[0]),e[1]?on(ar(),e[1]):Nr(t.partialRange)]),t.range):on(ar(),+e),v=(e,i)=>"string"!=typeof e&&"number"!=typeof e||!t.modelType?i:k(e),y=e=>Array.isArray(e)?[v(e[0],ur(null,+e[0].hours,+e[0].minutes,e[0].seconds)),v(e[1],ur(null,+e[1].hours,+e[1].minutes,e[1].seconds))]:v(e,ur(null,e.hours,e.minutes,e.seconds)),m=e=>Array.isArray(e)?t.multiDates?e.map((e=>v(e,Ar(null,+e.month,+e.year)))):Lr((()=>[v(e[0],Ar(null,+e[0].month,+e[0].year)),v(e[1],e[1]?Ar(null,+e[1].month,+e[1].year):Nr(t.partialRange))]),t.range):v(e,Ar(null,+e.month,+e.year)),C=e=>{if(Array.isArray(e))return e.map((e=>k(e)));throw new Error(Yo.dateArr("multi-dates"))},b=e=>{if(Array.isArray(e))return[ar(e[0]),ar(e[1])];throw new Error(Yo.dateArr("week-picker"))},w=e=>t.modelAuto?Array.isArray(e)?[k(e[0]),k(e[1])]:t.autoApply?[k(e)]:[k(e),null]:Array.isArray(e)?Lr((()=>[k(e[0]),e[1]?k(e[1]):Nr(t.partialRange)]),t.range):k(e),S=()=>{Array.isArray(r.value)&&t.range&&1===r.value.length&&r.value.push(Nr(t.partialRange))},E=()=>{const e=r.value;return[N(e[0]),e[1]?N(e[1]):Nr(t.partialRange)]},x=()=>r.value[1]?E():N(qo(r.value[0])),O=()=>(r.value||[]).map((e=>N(e))),T=()=>(S(),t.modelAuto?x():t.multiDates?O():Array.isArray(r.value)?Lr((()=>E()),t.range):N(qo(r.value))),D=e=>!e||Array.isArray(e)&&!e.length?null:t.timePicker?y(qo(e)):t.monthPicker?m(qo(e)):t.yearPicker?g(qo(e)):t.multiDates?C(qo(e)):t.
25weekPicker?b(qo(e)):w(qo(e)),R=e=>{const t=D(e);Ir(qo(t))?(r.value=qo(t),M()):(r.value=null,l.value="")},A=()=>{const e=e=>We(e,s.value.format);return`${e(r.value[0])} ${s.value.rangeSeparator} ${r.value[1]?e(r.value[1]):""}`},_=()=>i.value&&r.value?Array.isArray(r.value)?A():We(r.value,s.value.format):p(r.value),P=()=>r.value?t.multiDates?r.value.map((e=>p(e))).join("; "):s.value.enabled&&"string"==typeof s.value.format?_():p(r.value):"",M=()=>{!t.format||"string"==typeof t.format||s.value.enabled&&"string"==typeof s.value.format?l.value=P():l.value=t.format(r.value)},k=e=>{if(t.utc){const i=new Date(e);return"preserve"===t.utc?new Date(i.getTime()+6e4*i.getTimezoneOffset()):i}return t.modelType?"date"===t.modelType||"timestamp"===t.modelType?d(new Date(e)):"format"!==t.modelType||"string"!=typeof t.format&&t.format?d(vi(e,t.modelType,new Date)):vi(e,a(),new Date):d(new Date(e))},N=e=>e?t.utc?lr(e,"preserve"===t.utc,t.enableSeconds):t.modelType?"timestamp"===t.modelType?+u(e):"format"!==t.modelType||"string"!=typeof t.format&&t.format?p(u(e),t.modelType,!0):p(u(e)):u(e):"",L=(i,n=!1)=>{if(e("update:model-value",i),t.emitTimezone&&n){const n=Array.isArray(i)?i.map((e=>wr(qo(e))),t.emitTimezone):wr(qo(i),t.emitTimezone);e("update:model-timezone-value",n)}},I=e=>Array.isArray(r.value)?t.multiDates?r.value.map((t=>e(t))):[e(r.value[0]),r.value[1]?e(r.value[1]):Nr(t.partialRange)]:e(qo(r.value)),F=e=>L(qo(I(e)));return{inputValue:l,internalModelValue:r,checkBeforeEmit:()=>!!r.value&&(t.range?t.partialRange?r.value.length>=1:2===r.value.length:!!r.value),parseExternalModelValue:R,formatInputValue:M,emitModelValue:()=>(M(),t.monthPicker?F(f):t.timePicker?F(h):t.yearPicker?F(Pi):t.weekPicker?L(r.value.map((e=>N(e))),!0):L(T(),!0))}},ys=(e,t)=>{const{defaultedFilters:i}=gs(e),{validateMonthYearInRange:o}=Ps(e),r=(e,t)=>{let n=e;return i.value.months.includes(Mi(n))?(n=t?en(e,1):rn(e,1),r(n,t)):n},s=(e,t)=>{let n=e;return i.value.years.includes(Pi(n))?(n=t?sn(e,1):an(e,1),s(n,t)):n},a=(t,n=!1)=>{const a=bi(new Date,{month:e.month,year:e.year});let c=t?en(a,1):rn(a,1);e.disableYearSelect&&(c=on(c,e.year));let u=Mi(c),d=Pi(c);i.value.months.includes(u)&&(c=r(c,t),u=Mi(c),d=Pi(c)),i.value.years.includes(d)&&(c=s(c,t),d=Pi(c)),o(u,d,t,e.preventMinMaxNavigation)&&l(u,d,n)},l=(e,i,n)=>{t("update-month-year",{month:e,year:i,fromNav:n})},c=(0,n.Fl)((()=>t=>_r(bi(new Date,{month:e.month,year:e.year}),e.maxDate,e.minDate,e.preventMinMaxNavigation,t)));return{handleMonthYearChange:a,isDisabled:c,updateMonthYear:l}};var ms=(e=>(e.center="center",e.left="left",e.right="right",e))(ms||{}),Cs=(e=>(e.month="month",e.year="year",e))(Cs||{}),bs=(e=>(e.top="top",e.bottom="bottom",e))(bs||{}),ws=(e=>(e.header="header",e.calendar="calendar",e.timePicker="timePicker",e))(ws||{}),Ss=(e=>(e.month="month",e.year="year",e.calendar="calendar",e.time="time",e.minutes="minutes",e.hours="hours",e.seconds="seconds",e))(Ss||{});const Es=({menuRef:e,menuRefInner:t,inputRef:i,pickerWrapperRef:s,inline:a,emit:l,props:c,slots:u})=>{const d=(0,o.iH)({}),p=(0,o.iH)(!1),h=(0,o.iH)({top:"0",left:"0"}),f=(0,o.iH)(!1),g=(0,o.Vh)(c,"teleportCenter");(0,n.YP)(g,(()=>{h.value=JSON.parse(JSON.stringify({})),E()}));const v=e=>{if(c.teleport){const t=e.getBoundingClientRect();return{left:t.left+window.scrollX,top:t.top+window.scrollY}}return{top:0,left:0}},y=(e,t)=>{h.value.left=e+t-d.value.width+"px"},m=e=>{h.value.left=`${e}px`},C=(e,t)=>{c.position===ms.left&&m(e),c.position===ms.right&&y(e,t),c.position===ms.center&&(h.value.left=e+t/2-d.value.width/2+"px")},b=e=>{const{width:t,height:i}=e.getBoundingClientRect(),{top:n,left:o}=c.altPosition?c.altPosition(e):v(e);return{top:+n,left:+o,width:t,height:i}},w=()=>{h.value.left="50%",h.value.top="50%",h.value.transform="translate(-50%, -50%)",h.value.position="fixed",delete h.value.opacity},S=()=>{const e=Uo(i),{top:t,left:n,transform:o}=c.altPosition(e);h.value={top:`${t}px`,left:`${n}px`,transform:o??""}},E=(i=!0)=>{var n;if(!a.value.enabled){if(g.value)return w();if(null!==c.altPosition)return S();if(i){const i=c.teleport?null==(n=t.value)?void 0:n.$el:e.value;i&&(d.value=i.getBoundingClientRect()),l("recalculate-position")}return _()}},x=({inputEl:e,left:t,width:i})=>{window.screen.width>768&&!p.value&&C(t,i),D(e)},O=e=>{const{top:t,left:i,height:n,width:o}=b(e);h.value.top=`${n+t+ +c.offset}px`,f.value=!1,p.value||(h.value.left=i+o/2-d.value.width/2+"px"),x({inputEl:e,left:i,width:o})},T=e=>{const{top:t,left:i,width:n}=b(e);h.value.top=t-+c.offset-d.value.height+"px",f.value=!0,x({inputEl:e,left:i,width:n})},D=e=>{if(c.autoPosition){const{left:t,width:i}=b(e),{left:n,right:o}=d.value;if(!p.value){if(Math.abs(n)!==Math.abs(o)){if(n<=0)return p.value=!0,m(t);if(o>=document.documentElement.clientWidth)return p.value=!0,y(t,i)}return C(t,i)}}},R=()=>{const e=Uo(i);if(e){const{height:t}=d.value,{top:i,height:n}=e.getBoundingClientRect(),o=window.innerHeight-i-n,r=i;return t<=o?bs.bottom:t>o&&t<=r?bs.top:o>=r?bs.bottom:bs.top}return bs.bottom},A=e=>R()===bs.bottom?O(e):T(e),_=()=>{const e=Uo(i);if(e)return c.autoPosition?A(e):O(e)},P=function(e){if(e){const t=e.scrollHeight>e.clientHeight,i=-1!==window.getComputedStyle(e).overflowY.indexOf("hidden");return t&&!i}return!0},M=function(e){return e&&e!==document.body&&e.nodeType!==Node.DOCUMENT_FRAGMENT_NODE?P(e)?e:M(e.parentNode):window},k=e=>
25{if(e)switch(c.position){case ms.left:return{left:0,transform:"translateX(0)"};case ms.right:return{left:`${e.width}px`,transform:"translateX(-100%)"};default:return{left:e.width/2+"px",transform:"translateX(-50%)"}}return{}};return{openOnTop:f,menuStyle:h,xCorrect:p,setMenuPosition:E,getScrollableParent:M,shadowRender:(e,t)=>{var o,a,l;const c=document.createElement("div"),p=null==(o=Uo(i))?void 0:o.getBoundingClientRect();c.setAttribute("id","dp--temp-container");const h=null!=(a=s.value)&&a.clientWidth?s.value:document.body;h.append(c);const f=k(p),g=(0,n.h)(e,{...t,shadow:!0,style:{opacity:0,position:"absolute",...f}},Object.fromEntries(Object.keys(u).filter((e=>["right-sidebar","left-sidebar"].includes(e))).map((e=>[e,u[e]]))));(0,r.sY)(g,c),d.value=null==(l=g.el)?void 0:l.getBoundingClientRect(),(0,r.sY)(null,c),h.removeChild(c)}}},xs=[{name:"clock-icon",use:["time","calendar","shared"]},{name:"arrow-left",use:["month-year","calendar","shared","year-mode"]},{name:"arrow-right",use:["month-year","calendar","shared","year-mode"]},{name:"arrow-up",use:["time","calendar","month-year","shared"]},{name:"arrow-down",use:["time","calendar","month-year","shared"]},{name:"calendar-icon",use:["month-year","time","calendar","shared","year-mode"]},{name:"day",use:["calendar","shared"]},{name:"month-overlay-value",use:["calendar","month-year","shared"]},{name:"year-overlay-value",use:["calendar","month-year","shared","year-mode"]},{name:"year-overlay",use:["month-year","shared"]},{name:"month-overlay",use:["month-year","shared"]},{name:"month-overlay-header",use:["month-year","shared"]},{name:"year-overlay-header",use:["month-year","shared"]},{name:"hours-overlay-value",use:["calendar","time","shared"]},{name:"minutes-overlay-value",use:["calendar","time","shared"]},{name:"seconds-overlay-value",use:["calendar","time","shared"]},{name:"hours",use:["calendar","time","shared"]},{name:"minutes",use:["calendar","time","shared"]},{name:"month",use:["calendar","month-year","shared"]},{name:"year",use:["calendar","month-year","shared","year-mode"]},{name:"action-buttons",use:["action"]},{name:"action-preview",use:["action"]},{name:"calendar-header",use:["calendar","shared"]},{name:"marker-tooltip",use:["calendar","shared"]},{name:"action-extra",use:["menu"]},{name:"time-picker-overlay",use:["calendar","time","shared"]},{name:"am-pm-button",use:["calendar","time","shared"]},{name:"left-sidebar",use:["menu"]},{name:"right-sidebar",use:["menu"]},{name:"month-year",use:["month-year","shared"]},{name:"time-picker",use:["menu","shared"]},{name:"action-row",use:["action"]},{name:"marker",use:["calendar","shared"]},{name:"quarter",use:["shared"]}],Os=[{name:"trigger"},{name:"input-icon"},{name:"clear-icon"},{name:"dp-input"}],Ts={all:()=>xs,monthYear:()=>xs.filter((e=>e.use.includes("month-year"))),input:()=>Os,timePicker:()=>xs.filter((e=>e.use.includes("time"))),action:()=>xs.filter((e=>e.use.includes("action"))),calendar:()=>xs.filter((e=>e.use.includes("calendar"))),menu:()=>xs.filter((e=>e.use.includes("menu"))),shared:()=>xs.filter((e=>e.use.includes("shared"))),yearMode:()=>xs.filter((e=>e.use.includes("year-mode")))},Ds=(e,t,i)=>{const n=[];return Ts[t]().forEach((t=>{e[t.name]&&n.push(t.name)})),null!=i&&i.length&&i.forEach((e=>{e.slot&&n.push(e.slot)})),n},Rs=e=>{const t=(0,n.Fl)((()=>t=>e.value?t?e.value.open:e.value.close:"")),i=(0,n.Fl)((()=>t=>e.value?t?e.value.menuAppearTop:e.value.menuAppearBottom:""));return{transitionName:t,showTransition:!!e.value,menuTransition:i}},As=(e,t)=>{const i=ar(wr(new Date,e.timezone)),r=(0,o.iH)([{month:Mi(i),year:Pi(i)}]),s=(0,o.qj)({hours:e.range?[Ri(i),Ri(i)]:Ri(i),minutes:e.range?[Ai(i),Ai(i)]:Ai(i),seconds:e.range?[0,0]:0}),a=(0,n.Fl)({get:()=>e.internalModelValue,set:i=>{!e.readonly&&!e.disabled&&t("update:internal-model-value",i)}}),l=(0,n.Fl)((()=>e=>r.value[e]?r.value[e].month:0)),c=(0,n.Fl)((()=>e=>r.value[e]?r.value[e].year:0));return{calendars:r,time:s,modelValue:a,month:l,year:c}},_s=(e,t)=>{const{defaultedMultiCalendars:i,defaultedHighlight:n}=gs(t),{isDisabled:r,matchDate:s}=Ps(t),a=(0,o.iH)(null),l=(0,o.iH)(ar(wr(new Date,t.timezone))),c=e=>{!e.current&&t.hideOffsetDates||(a.value=e.value)},u=()=>{a.value=null},d=i=>!(Array.isArray(e.value)&&t.range&&e.value[0]&&a.value)||(i?hr(a.value,e.value[0]):dr(a.value,e.value[0])),p=(t,i)=>{const n=()=>e.value?i?e.value[0]||null:e.value[1]:null,o=e.value&&Array.isArray(e.value)?n():null;return pr(ar(t.value),o)},h=t=>{const i=Array.isArray(e.value)?e.value[0]:null;return!t||!dr(a.value??null,i)},f=(i,n=!0)=>(t.range||t.weekPicker)&&Array.isArray(e.value)&&2===e.value.length?!(t.hideOffsetDates&&!i.current)&&pr(ar(i.value),e.value[n?0:1]):!!t.range&&(p(i,n)&&h(n)||pr(i.value,Array.isArray(e.value)?e.value[0]:null)&&d(n)),g=(t,i,n)=>!(!Array.isArray(e.value)||!e.value[0]||1!==e.value.length)&&(!t&&(n?hr(e.value[0],i.value):dr(e.value[0],i.value))),v=i=>!(!e.value||t.hideOffsetDates&&!i.current)&&(t.range?!(!t.modelAuto||!Array.isArray(e.value))&&pr(i.value,e.value[0]?e.value[0]:l.value):t.multiDates&&Array.isArray(e.value)?e.value.some((e=>pr(e,i.value))):pr(i.value,e.value?e.value:l.value)),y=e=>{if(t.autoRange||t.weekPicker){if(a.value){if(t.hideOffsetDates&&!e.current)return!1;const i=ln(a.value,+t.autoRange),n=Tr(ar(a.value),t.timezone,t.weekStart);return t.weekPicker?pr(n[1],ar(e.value)):pr(i,ar(e.value))}return!1}return!1},m=e=>{if(t.autoRange||t.weekPicker){if(a.value){const i=ln(a.value,+t.autoRange);
25if(t.hideOffsetDates&&!e.current)return!1;const n=Tr(ar(a.value),t.timezone,t.weekStart);return t.weekPicker?hr(e.value,n[0])&&dr(e.value,n[1]):hr(e.value,a.value)&&dr(e.value,i)}return!1}return!1},C=e=>{if(t.autoRange||t.weekPicker){if(a.value){if(t.hideOffsetDates&&!e.current)return!1;const i=Tr(ar(a.value),t.timezone,t.weekStart);return t.weekPicker?pr(i[0],e.value):pr(a.value,e.value)}return!1}return!1},b=t=>fr(e.value,a.value,t.value),w=()=>!(!t.modelAuto||!Array.isArray(t.internalModelValue))&&!!t.internalModelValue[0],S=()=>!t.modelAuto||Ko(t.internalModelValue),E=i=>{if(Array.isArray(e.value)&&e.value.length||t.weekPicker)return!1;const n=!t.range||!f(i)&&!f(i,!1);return!r(i.value)&&!v(i)&&!(!i.current&&t.hideOffsetDates)&&n},x=e=>t.range?!!t.modelAuto&&(w()&&v(e)):v(e),O=e=>{var i;return!!n.value&&("function"==typeof n.value?n.value(e.value):s(e.value,null!=(i=t.arrMapValues)&&i.highlightedDates?t.arrMapValues.highlightedDates:n.value.dates))},T=e=>{const t=r(e.value);return t&&("function"==typeof n.value?!n.value(e.value,t):!n.value.options.highlightDisabled)},D=e=>{var t;return"function"==typeof n.value?n.value(e.value):null==(t=n.value.weekdays)?void 0:t.includes(e.value.getDay())},R=e=>!(!t.range&&!t.weekPicker||i.value.count>0&&!e.current||!S()||!e.current&&t.hideOffsetDates||v(e))&&b(e),A=e=>{const{isRangeStart:i,isRangeEnd:n}=M(e),o=!!t.range&&(i||n);return{dp__cell_offset:!e.current,dp__pointer:!t.disabled&&!(!e.current&&t.hideOffsetDates)&&!r(e.value),dp__cell_disabled:r(e.value),dp__cell_highlight:!T(e)&&(O(e)||D(e))&&!x(e)&&!o&&!C(e)&&!(R(e)&&t.weekPicker)&&!n,dp__cell_highlight_active:!T(e)&&(O(e)||D(e))&&x(e),dp__today:!t.noToday&&pr(e.value,l.value)&&e.current}},_=e=>({dp__active_date:x(e),dp__date_hover:E(e)}),P=e=>({...k(e),...N(e),dp__range_between_week:R(e)&&t.weekPicker}),M=e=>{const t=i.value.count>0?e.current&&f(e)&&S():f(e)&&S(),n=i.value.count>0?e.current&&f(e,!1)&&S():f(e,!1)&&S();return{isRangeStart:t,isRangeEnd:n}},k=e=>{const{isRangeStart:i,isRangeEnd:n}=M(e);return{dp__range_start:i,dp__range_end:n,dp__range_between:R(e)&&!t.weekPicker,dp__date_hover_start:g(E(e),e,!0),dp__date_hover_end:g(E(e),e,!1)}},N=e=>({...k(e),dp__cell_auto_range:m(e),dp__cell_auto_range_start:C(e),dp__cell_auto_range_end:y(e)}),L=e=>t.range?t.autoRange?N(e):t.modelAuto?{..._(e),...k(e)}:k(e):t.weekPicker?P(e):_(e);return{setHoverDate:c,clearHoverDate:u,getDayClassData:e=>t.hideOffsetDates&&!e.current?{}:{...A(e),...L(e),[t.dayClass?t.dayClass(e.value):""]:!0,[t.calendarCellClassName]:!!t.calendarCellClassName}}},Ps=e=>{const{defaultedFilters:t,defaultedHighlight:i}=gs(e),n=()=>e.timezone?e.timezone:e.utc?"UTC":void 0,o=e=>{const t=cr(r(ar(e))).toISOString(),[i]=t.split("T");return i},r=t=>"preserve"===e.utc?Sr(t,n()):wr(t,n()),s=i=>{var n;const o=!!e.maxDate&&hr(i,r(ar(e.maxDate))),s=!!e.minDate&&dr(i,r(ar(e.minDate))),a=u(r(i),null!=(n=e.arrMapValues)&&n.disabledDates?e.arrMapValues.disabledDates:e.disabledDates),l=t.value.months.map((e=>+e)).includes(Mi(i)),c=!!e.disabledWeekDays.length&&e.disabledWeekDays.some((e=>+e===cn(i))),d=p(i),h=Pi(i),f=h<+e.yearRange[0]||h>+e.yearRange[1];return!(o||s||a||l||f||c||d)},a=(t,i)=>dr(...Rr(e.minDate,t,i))||pr(...Rr(e.minDate,t,i)),l=(t,i)=>hr(...Rr(e.maxDate,t,i))||pr(...Rr(e.maxDate,t,i)),c=(t,i,n)=>{let o=!1;return e.maxDate&&n&&l(t,i)&&(o=!0),e.minDate&&!n&&a(t,i)&&(o=!0),o},u=(e,t)=>!e||(t instanceof Map?!!t.get(o(e)):Array.isArray(t)?t.some((t=>pr(r(ar(t)),e))):!!t&&t(ar(JSON.parse(JSON.stringify(e))))),d=(t,i,n,o)=>{let r=!1;return o?e.minDate&&e.maxDate?r=c(t,i,n):(e.minDate&&a(t,i)||e.maxDate&&l(t,i))&&(r=!0):r=!0,r},p=t=>{var i,n,o,s,a;return!(!Array.isArray(e.allowedDates)||null!=(i=e.allowedDates)&&i.length)||(null!=(n=e.arrMapValues)&&n.allowedDates?!u(t,null==(o=e.arrMapValues)?void 0:o.allowedDates):!(null==(s=e.allowedDates)||!s.length)&&!(null!=(a=e.allowedDates)&&a.some((e=>pr(r(ar(e)),r(t))))))},h=e=>!s(e),f=t=>
25!e.noDisabledRange||!Qi({start:t[0],end:t[1]}).some((e=>h(e))),g=(t,i,n=0)=>{if(Array.isArray(i)&&i[n]){const o=pn(t,i[n]),r=xr(i[n],t),s=1===r.length?0:r.filter((e=>h(e))).length,a=Math.abs(o)-s;if(e.minRange&&e.maxRange)return a>=+e.minRange&&a<=+e.maxRange;if(e.minRange)return a>=+e.minRange;if(e.maxRange)return a<=+e.maxRange}return!0},v=e=>new Map(e.map((e=>[o(e),!0]))),y=e=>Array.isArray(e)&&e.length>0,m=()=>{const t={disabledDates:null,allowedDates:null,highlightedDates:null};return y(e.allowedDates)&&(t.allowedDates=v(e.allowedDates)),"function"!=typeof i.value&&y(i.value.dates)&&(t.highlightedDates=v(i.value.dates)),y(e.disabledDates)&&(t.disabledDates=v(e.disabledDates)),t},C=()=>!e.enableTimePicker||e.monthPicker||e.yearPicker||e.ignoreTimeValidation,b=e=>Array.isArray(e)?[e[0]?jr(e[0]):null,e[1]?jr(e[1]):null]:jr(e),w=(e,t,i)=>e.find((e=>+e.hours===Ri(t)&&"*"===e.minutes||+e.minutes===Ai(t)&&+e.hours===Ri(t)))&&i,S=(e,t,i)=>{const[n,o]=e,[r,s]=t;return!w(n,r,i)&&!w(o,s,i)&&i},E=(t,i)=>{const n=Array.isArray(i)?i:[i];return Array.isArray(e.disabledTimes)?Array.isArray(e.disabledTimes[0])?S(e.disabledTimes,n,t):!n.some((i=>w(e.disabledTimes,i,t))):t},x=(t,i)=>{const n=Array.isArray(i)?[yr(i[0]),i[1]?yr(i[1]):void 0]:yr(i),o=!e.disabledTimes(n);return t&&o},O=(t,i)=>e.disabledTimes?Array.isArray(e.disabledTimes)?E(i,t):x(i,t):i;return{isDisabled:h,validateDate:s,validateMonthYearInRange:d,isDateRangeAllowed:f,checkMinMaxRange:g,matchDate:u,mapDatesArrToMap:m,isValidTime:t=>{let i=!0;if(!t||C())return!0;const n=e.minDate||e.maxDate?t:b(t);return(e.maxTime||e.maxDate)&&(i=Br(e.maxTime,e.maxDate,"max",qo(n),i)),(e.minTime||e.minDate)&&(i=Br(e.minTime,e.minDate,"min",qo(n),i)),O(t,i)}}},Ms=()=>{const e=(0,n.Fl)((()=>(e,t)=>null==e?void 0:e.includes(t))),t=(0,n.Fl)((()=>(e,t)=>!e.count||(!!e.solo||0===t))),i=(0,n.Fl)((()=>(e,t)=>!e.count||(!!e.solo||t===e.count-1)));return{hideNavigationButtons:e,showLeftIcon:t,showRightIcon:i}},ks=(e,t,i)=>{const r=(0,o.iH)(0),s=(0,o.qj)({[ws.timePicker]:!e.enableTimePicker||e.timePicker||e.monthPicker,[ws.calendar]:!1,[ws.header]:!1}),a=(0,n.Fl)((()=>e.monthPicker)),l=t=>{var i;if(null!=(i=e.flow)&&i.length){if(!t&&a.value)return p();s[t]=!0,Object.keys(s).filter((e=>!s[e])).length||p()}},c=()=>{var i;null!=(i=e.flow)&&i.length&&-1!==r.value&&(r.value+=1,t("flow-step",r.value),p())},u=()=>{r.value=-1},d=(t,n,...o)=>{e.flow[r.value]===t&&i.value&&i.value[n](...o)},p=()=>{d(Ss.month,"toggleMonthPicker",!0),d(Ss.year,"toggleYearPicker",!0),d(Ss.calendar,"toggleTimePicker",!1,!0),d(Ss.time,"toggleTimePicker",!0,!0);const t=e.flow[r.value];(t===Ss.hours||t===Ss.minutes||t===Ss.seconds)&&d(t,"toggleTimePicker",!0,!0,t)};return{childMount:l,updateFlowStep:c,resetFlow:u,flowStep:r}},Ns={multiCalendars:{type:[Boolean,Number,String,Object],default:void 0},modelValue:{type:[String,Date,Array,Object,Number],default:null},modelType:{type:String,default:null},position:{type:String,default:"center"},dark:{type:Boolean,default:!1},format:{type:[String,Function],default:()=>null},autoPosition:{type:Boolean,default:!0},altPosition:{type:Function,default:null},transitions:{type:[Boolean,Object],default:!0},formatLocale:{type:Object,default:null},utc:{type:[Boolean,String],default:!1},ariaLabels:{type:Object,default:()=>({})},offset:{type:[Number,String],default:10},hideNavigation:{type:Array,default:()=>[]},timezone:{type:String,default:null},emitTimezone:{type:String,default:null},vertical:{type:Boolean,default:!1},disableMonthYearSelect:{type:Boolean,default:!1},disableYearSelect:{type:Boolean,default:!1},menuClassName:{type:String,default:null},dayClass:{type:Function,default:null},yearRange:{type:Array,default:()=>[1900,2100]},calendarCellClassName:{type:String,default:null},enableTimePicker:{type:Boolean,default:!0},autoApply:{type:Boolean,default:!1},disabledDates:{type:[Array,Function],default:()=>[]},monthNameFormat:{type:String,default:"short"},startDate:{type:[Date,String],default:null},startTime:{type:[Object,Array],default:null},hideOffsetDates:{type:Boolean,default:!1},autoRange:{type:[Number,String],default:null},noToday:{type:Boolean,default:!1},disabledWeekDays:{type:Array,default:()=>[]},allowedDates:{type:Array,default:null},nowButtonLabel:{type:String,default:"Now"},markers:{type:Array,default:()=>[]},escClose:{type:Boolean,default:!0},spaceConfirm:{type:Boolean,default:!0}
25,monthChangeOnArrows:{type:Boolean,default:!0},presetDates:{type:Array,default:()=>[]},flow:{type:Array,default:()=>[]},partialFlow:{type:Boolean,default:!1},preventMinMaxNavigation:{type:Boolean,default:!1},minRange:{type:[Number,String],default:null},maxRange:{type:[Number,String],default:null},multiDatesLimit:{type:[Number,String],default:null},reverseYears:{type:Boolean,default:!1},weekPicker:{type:Boolean,default:!1},filters:{type:Object,default:()=>({})},arrowNavigation:{type:Boolean,default:!1},disableTimeRangeValidation:{type:Boolean,default:!1},highlight:{type:[Array,Function,Object],default:null},highlightWeekDays:{type:Array,default:null},highlightDisabledDays:{type:Boolean,default:!1},teleport:{type:[String,Boolean,Object],default:null},teleportCenter:{type:Boolean,default:!1},locale:{type:String,default:"en-Us"},weekNumName:{type:String,default:"W"},weekStart:{type:[Number,String],default:1},weekNumbers:{type:[String,Function,Object],default:null},calendarClassName:{type:String,default:null},monthChangeOnScroll:{type:[Boolean,String],default:!0},dayNames:{type:[Function,Array],default:null},monthPicker:{type:Boolean,default:!1},customProps:{type:Object,default:null},yearPicker:{type:Boolean,default:!1},modelAuto:{type:Boolean,default:!1},selectText:{type:String,default:"Select"},cancelText:{type:String,default:"Cancel"},previewFormat:{type:[String,Function],default:()=>""},multiDates:{type:Boolean,default:!1},partialRange:{type:Boolean,default:!0},ignoreTimeValidation:{type:Boolean,default:!1},minDate:{type:[Date,String],default:null},maxDate:{type:[Date,String],default:null},minTime:{type:Object,default:null},maxTime:{type:Object,default:null},name:{type:String,default:null},placeholder:{type:String,default:""},hideInputIcon:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},state:{type:Boolean,default:null},required:{type:Boolean,default:!1},autocomplete:{type:String,default:"off"},inputClassName:{type:String,default:null},fixedStart:{type:Boolean,default:!1},fixedEnd:{type:Boolean,default:!1},timePicker:{type:Boolean,default:!1},enableSeconds:{type:Boolean,default:!1},is24:{type:Boolean,default:!0},noHoursOverlay:{type:Boolean,default:!1},noMinutesOverlay:{type:Boolean,default:!1},noSecondsOverlay:{type:Boolean,default:!1},hoursGridIncrement:{type:[String,Number],default:1},minutesGridIncrement:{type:[String,Number],default:5},secondsGridIncrement:{type:[String,Number],default:5},hoursIncrement:{type:[Number,String],default:1},minutesIncrement:{type:[Number,String],default:1},secondsIncrement:{type:[Number,String],default:1},range:{type:Boolean,default:!1},uid:{type:String,default:null},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},inline:{type:[Boolean,Object],default:!1},textInput:{type:[Boolean,Object],default:!1},noDisabledRange:{type:Boolean,default:!1},sixWeeks:{type:[Boolean,String],default:!1},actionRow:{type:Object,default:()=>({})},focusStartDate:{type:Boolean,default:!1},disabledTimes:{type:[Function,Array],default:void 0},showLastInRange:{type:Boolean,default:!0},timePickerInline:{type:Boolean,default:!1},calendar:{type:Function,default:null},config:{type:Object,default:void 0},quarterPicker:{type:Boolean,default:!1},yearFirst:{type:Boolean,default:!1}},Ls={...Ns,shadow:{type:Boolean,default:!1},flowStep:{type:Number,default:0},internalModelValue:{type:[Date,Array],default:null},arrMapValues:{type:Object,default:()=>({})},noOverlayFocus:{type:Boolean,default:!1}},Is={key:1,class:"dp__input_wrap"},Fs=["id","name","inputmode","placeholder","disabled","readonly","required","value","autocomplete","aria-label","aria-disabled","aria-invalid"],Gs={key:2,class:"dp__clear_icon"},Vs=(0,n.aZ)({compatConfig:{MODE:3},__name:"DatepickerInput",props:{isMenuOpen:{type:Boolean,default:!1},inputValue:{type:String,default:""},...Ns},emits:["clear","open","update:input-value","set-input-date","close","select-date","set-empty-date","toggle","focus-prev","focus","blur","real-blur"],setup(e,{expose:t,emit:i}){const a=i,l=e,{defaultedTextInput:c,defaultedAriaLabels:u,defaultedInline:d,defaultedConfig:p,getDefaultPattern:h,getDefaultStartTime:f}=gs(l),{checkMinMaxRange:g}=Ps(l),v=(0,o.iH)(),y=(0,o.iH)(null),m=(0,o.iH)(!1),C=(0,o.iH)(!1),b=(0,n.Fl)((()=>({dp__pointer:!l.disabled&&!l.readonly&&!c.value.enabled,dp__disabled:l.disabled,dp__input_readonly:!c.value.enabled,dp__input:!0,dp__input_icon_pad:!l.hideInputIcon,dp__input_valid:!!l.state,dp__input_invalid:!1===l.state,dp__input_focus:m.value||l.
25isMenuOpen,dp__input_reg:!c.value.enabled,[l.inputClassName]:!!l.inputClassName}))),w=()=>{a("set-input-date",null),l.autoApply&&(a("set-empty-date"),v.value=null)},S=e=>{const t=f();return sr(e,c.value.format??h(),t??Dr({},l.enableSeconds),l.inputValue,C.value)},E=e=>{const{rangeSeparator:t}=c.value,[i,n]=e.split(`${t}`);if(i){const e=S(i.trim()),t=n?S(n.trim()):null,o=e&&t?[e,t]:[e];g(t,o,0)&&(v.value=e?o:null)}},x=()=>{C.value=!0},O=e=>{if(l.range)E(e);else if(l.multiDates){const t=e.split(";");v.value=t.map((e=>S(e.trim()))).filter((e=>e))}else v.value=S(e)},T=e=>{var t;const i="string"==typeof e?e:null==(t=e.target)?void 0:t.value;""!==i?(c.value.openMenu&&!l.isMenuOpen&&a("open"),O(i),a("set-input-date",v.value)):w(),C.value=!1,a("update:input-value",i)},D=e=>{c.value.enabled?(O(e.target.value),c.value.enterSubmit&&Ir(v.value)&&""!==l.inputValue?(a("set-input-date",v.value,!0),v.value=null):c.value.enterSubmit&&""===l.inputValue&&(v.value=null,a("clear"))):_(e)},R=e=>{c.value.enabled&&c.value.tabSubmit&&O(e.target.value),c.value.tabSubmit&&Ir(v.value)&&""!==l.inputValue?(a("set-input-date",v.value,!0,!0),v.value=null):c.value.tabSubmit&&""===l.inputValue&&(v.value=null,a("clear",!0))},A=()=>{var e;m.value=!0,a("focus"),c.value.enabled&&c.value.selectOnFocus&&(null==(e=y.value)||e.select())},_=e=>{e.preventDefault(),tr(e,p.value,!0),c.value.enabled&&c.value.openMenu&&!d.value.input&&!l.isMenuOpen?a("open"):c.value.enabled||a("toggle")},P=()=>{a("real-blur"),m.value=!1,(!l.isMenuOpen||d.value.enabled&&d.value.input)&&a("blur"),l.autoApply&&c.value.enabled&&v.value&&!l.isMenuOpen&&(a("set-input-date",v.value),a("select-date"),v.value=null)},M=e=>{tr(e,p.value,!0),a("clear")},k=e=>{if(!c.value.enabled){if("Tab"===e.code)return;e.preventDefault()}};return t({focusInput:()=>{var e;null==(e=y.value)||e.focus({preventScroll:!0})},setParsedDate:e=>{v.value=e}}),(t,i)=>{var l;return(0,n.wg)(),(0,n.iD)("div",{onClick:_},[!t.$slots.trigger||t.$slots["dp-input"]||(0,o.SU)(d).enabled?(0,n.kq)("",!0):(0,n.WI)(t.$slots,"trigger",{key:0}),t.$slots.trigger||(0,o.SU)(d).enabled&&!(0,o.SU)(d).input?(0,n.kq)("",!0):((0,n.wg)(),(0,n.iD)("div",Is,[!t.$slots["dp-input"]||t.$slots.trigger||(0,o.SU)(d).enabled?(0,n.kq)("",!0):(0,n.WI)(t.$slots,"dp-input",{key:0,value:e.inputValue,isMenuOpen:e.isMenuOpen,onInput:T,onEnter:D,onTab:R,onClear:M,onBlur:P,onKeypress:k,onPaste:x,openMenu:()=>t.$emit("open"),closeMenu:()=>t.$emit("close"),toggleMenu:()=>t.$emit("toggle")}),t.$slots["dp-input"]?(0,n.kq)("",!0):((0,n.wg)(),(0,n.iD)("input",{key:1,id:t.uid?`dp-input-${t.uid}`:void 0,ref_key:"inputRef",ref:y,name:t.name,class:(0,s.C_)(b.value),inputmode:(0,o.SU)(c).enabled?"text":"none",placeholder:t.placeholder,disabled:t.disabled,readonly:t.readonly,required:t.required,value:e.inputValue,autocomplete:t.autocomplete,"aria-label":null==(l=(0,o.SU)(u))?void 0:l.input,"aria-disabled":t.disabled||void 0,"aria-invalid":!1===t.state||void 0,onInput:T,onKeydown:[(0,r.D2)(D,["enter"]),(0,r.D2)(R,["tab"]),k],onBlur:P,onFocus:A,onKeypress:k,onPaste:x},null,42,Fs)),(0,n._)("div",{onClick:i[2]||(i[2]=e=>a("toggle"))},[t.$slots["input-icon"]&&!t.hideInputIcon?((0,n.wg)(),(0,n.iD)("span",{key:0,class:"dp__input_icon",onClick:i[0]||(i[0]=e=>a("toggle"))},[(0,n.WI)(t.$slots,"input-icon")])):(0,n.kq)("",!0),t.$slots["input-icon"]||t.hideInputIcon||t.$slots["dp-input"]?(0,n.kq)("",!0):((0,n.wg)(),(0,n.j4)((0,o.SU)(kn),{key:1,class:"dp__input_icon dp__input_icons",onClick:i[1]||(i[1]=e=>a("toggle"))}))]),t.$slots["clear-icon"]&&e.inputValue&&t.clearable&&!t.disabled&&!t.readonly?((0,n.wg)(),(0,n.iD)("span",Gs,[(0,n.WI)(t.$slots,"clear-icon",{clear:M})])):(0,n.kq)("",!0),!t.clearable||t.$slots["clear-icon"]||!e.inputValue||t.disabled||t.readonly?(0,n.kq)("",!0):((0,n.wg)(),(0,n.j4)((0,o.SU)(Nn),{key:3,class:"dp__clear_icon dp__input_icons",onClick:i[3]||(i[3]=(0,r.iM)((e=>M(e)),["prevent"]))}))]))])}}}),Bs=["title"],js={class:"dp__action_buttons"},Hs=["disabled"],Ws=(0,n.aZ)({compatConfig:{MODE:3},__name:"ActionRow",props:{menuMount:{type:Boolean,default:!1},calendarWidth:{type:Number,default:0},...Ls}
25,emits:["close-picker","select-date","select-now","invalid-select"],setup(e,{emit:t}){const i=t,a=e,{defaultedActionRow:l,defaultedPreviewFormat:c,defaultedMultiCalendars:u,defaultedTextInput:d,defaultedInline:p,getDefaultPattern:h}=gs(a),{isValidTime:f}=Ps(a),{buildMatrix:g}=ts(),v=(0,o.iH)(null),y=(0,o.iH)(null);(0,n.bv)((()=>{a.arrowNavigation&&g([Uo(v),Uo(y)],"actionRow")}));const m=(0,n.Fl)((()=>!(a.range&&!a.partialRange&&a.internalModelValue)||2===a.internalModelValue.length)),C=(0,n.Fl)((()=>!b.value||!w.value||!m.value)),b=(0,n.Fl)((()=>!(a.enableTimePicker&&!a.ignoreTimeValidation)||f(a.internalModelValue))),w=(0,n.Fl)((()=>!a.monthPicker||(a.range&&Array.isArray(a.internalModelValue)?!a.internalModelValue.filter((e=>!R(e))).length:R(a.internalModelValue)))),S=()=>{const e=c.value;return a.timePicker||a.monthPicker,e(qo(a.internalModelValue))},E=()=>{const e=a.internalModelValue;return u.value.count>0?`${x(e[0])} - ${x(e[1])}`:[x(e[0]),x(e[1])]},x=e=>kr(e,c.value,a.formatLocale,d.value.rangeSeparator,a.modelAuto,h()),O=(0,n.Fl)((()=>a.internalModelValue&&a.menuMount?"string"==typeof c.value?Array.isArray(a.internalModelValue)?2===a.internalModelValue.length&&a.internalModelValue[1]?E():a.multiDates?a.internalModelValue.map((e=>`${x(e)}`)):a.modelAuto?`${x(a.internalModelValue[0])}`:`${x(a.internalModelValue[0])} -`:x(a.internalModelValue):S():"")),T=()=>a.multiDates?"; ":" - ",D=(0,n.Fl)((()=>Array.isArray(O.value)?O.value.join(T()):O.value)),R=e=>{if(!a.monthPicker)return!0;let t=!0;const i=ar(gr(e));if(a.minDate&&a.maxDate){const e=ar(gr(a.minDate)),t=ar(gr(a.maxDate));return hr(i,e)&&dr(i,t)||pr(i,e)||pr(i,t)}if(a.minDate){const e=ar(gr(a.minDate));t=hr(i,e)||pr(i,e)}if(a.maxDate){const e=ar(gr(a.maxDate));t=dr(i,e)||pr(i,e)}return t},A=()=>{b.value&&w.value&&m.value?i("select-date"):i("invalid-select")};return(t,i)=>((0,n.wg)(),(0,n.iD)("div",{class:"dp__action_row",style:(0,s.j5)(e.calendarWidth?{width:`${e.calendarWidth}px`}:{})},[t.$slots["action-row"]?(0,n.WI)(t.$slots,"action-row",(0,s.vs)((0,n.dG)({key:0},{internalModelValue:t.internalModelValue,disabled:C.value,selectDate:()=>t.$emit("select-date"),closePicker:()=>t.$emit("close-picker")}))):((0,n.wg)(),(0,n.iD)(n.HY,{key:1},[(0,o.SU)(l).showPreview?((0,n.wg)(),(0,n.iD)("div",{key:0,class:"dp__selection_preview",title:D.value},[t.$slots["action-preview"]?(0,n.WI)(t.$slots,"action-preview",{key:0,value:t.internalModelValue}):(0,n.kq)("",!0),t.$slots["action-preview"]?(0,n.kq)("",!0):((0,n.wg)(),(0,n.iD)(n.HY,{key:1},[(0,n.Uk)((0,s.zw)(D.value),1)],64))],8,Bs)):(0,n.kq)("",!0),(0,n._)("div",js,[t.$slots["action-buttons"]?(0,n.WI)(t.$slots,"action-buttons",{key:0,value:t.internalModelValue}):(0,n.kq)("",!0),t.$slots["action-buttons"]?(0,n.kq)("",!0):((0,n.wg)(),(0,n.iD)(n.HY,{key:1},[!(0,o.SU)(p).enabled&&(0,o.SU)(l).showCancel?((0,n.wg)(),(0,n.iD)("button",{key:0,ref_key:"cancelButtonRef",ref:v,type:"button",class:"dp__action_button dp__action_cancel",onClick:i[0]||(i[0]=e=>t.$emit("close-picker")),onKeydown:[i[1]||(i[1]=(0,r.D2)((e=>t.$emit("close-picker")),["enter"])),i[2]||(i[2]=(0,r.D2)((e=>t.$emit("close-picker")),["space"]))]},(0,s.zw)(t.cancelText),545)):(0,n.kq)("",!0),(0,o.SU)(l).showNow?((0,n.wg)(),(0,n.iD)("button",{key:1,ref_key:"cancelButtonRef",ref:v,type:"button",class:"dp__action_button dp__action_cancel",onClick:i[3]||(i[3]=e=>t.$emit("select-now")),onKeydown:[i[4]||(i[4]=(0,r.D2)((e=>t.$emit("select-now")),["enter"])),i[5]||(i[5]=(0,r.D2)((e=>t.$emit("select-now")),["space"]))]},(0,s.zw)(t.nowButtonLabel),545)):(0,n.kq)("",!0),(0,o.SU)(l).showSelect?((0,n.wg)(),(0,n.iD)("button",{key:2,ref_key:"selectButtonRef",ref:y,type:"button",class:"dp__action_button dp__action_select",disabled:C.value,onKeydown:[(0,r.D2)(A,["enter"]),(0,r.D2)(A,["space"])],onClick:A},(0,s.zw)(t.selectText),41,Hs)):(0,n.kq)("",!0)],64))])],64))],4))}}),Us=["onKeydown"],zs={class:"dp__selection_grid_header"},Ks=["aria-selected","aria-disabled","onClick","onKeydown","onMouseover"],Ys=["aria-label"],qs=(0,n.aZ)({__name:"SelectionOverlay",props:{items:{},type:{},isLast:{type:Boolean},arrowNavigation:{type:Boolean},skipButtonRef:{type:Boolean},headerRefs:{},hideNavigation:{},escClose:{type:Boolean},useRelative:{type:Boolean},height:{},textInput:{type:[Boolean,Object]},config:{},noOverlayFocus:{type:Boolean},focusValue:{}},emits:["selected","toggle","reset-flow","hover-value"],setup(e,{expose:t,emit:i}){const{setSelectionGrid:a,buildMultiLevelMatrix:l,setMonthPicker:c}=ts(),u=i,d=e,{defaultedAriaLabels:p,defaultedTextInput:h,defaultedConfig:f}=gs(d),{hideNavigationButtons:g}=Ms(),v=(0,o.iH)(!1),y=(0,o.iH)(null),m=(0,o.iH)(null),C=(0,o.iH)([]),b=(0,o.iH)(),w=(0,o.iH)(null),S=(0,o.iH)(0),E=(0,o.iH)(null);(0,n.Xn)((()=>{y.value=null})),(0,n.bv)((()=>{(0,n.Y3)().then((()=>P())),d.noOverlayFocus||O(),x(!0)})),(0,n.Ah)((()=>x(!1)));const x=e=>{var t;d.arrowNavigation&&(null!=(t=d.headerRefs)&&t.length?c(e):a(e))},O=()=>{var e;const t=Uo(m);t&&(h.value.enabled||(y.value?null==(e=y.value)||e.focus({preventScroll:!0}):t.focus({preventScroll:!0})),v.value=t.clientHeight<t.scrollHeight)},T=(0,n.Fl)((()=>({dp__overlay:!0,"dp--overlay-absolute":!d.useRelative,"dp--overlay-relative":d.useRelative}))),D=(0,n.Fl)((()=>d.useRelative?{height:`${d.height}px`,width:"260px"}:void 0)),R=(0,n.Fl)((()=>({dp__overlay_col:!0}))),A=(0,n.Fl)((()=>({dp__btn:!0,dp__button:!0,dp__overlay_action:!0,dp__over_action_scroll:v.value,dp__button_bottom:d.isLast}))),_=(0,n.Fl)((()=>{var e,t;
25return{dp__overlay_container:!0,dp__container_flex:(null==(e=d.items)?void 0:e.length)<=6,dp__container_block:(null==(t=d.items)?void 0:t.length)>6}}));(0,n.YP)((()=>d.items),(()=>P()),{deep:!0});const P=()=>{(0,n.Y3)().then((()=>{const e=Uo(y),t=Uo(m),i=Uo(w),n=Uo(E),o=i?i.getBoundingClientRect().height:0;t&&(t.getBoundingClientRect().height?S.value=t.getBoundingClientRect().height-o:S.value=f.value.modeHeight-o),e&&n&&(n.scrollTop=e.offsetTop-n.offsetTop-(S.value/2-e.getBoundingClientRect().height)-o)}))},M=e=>{e.disabled||u("selected",e.value)},k=()=>{u("toggle"),u("reset-flow")},N=()=>{d.escClose&&k()},L=(e,t,i,n)=>{e&&((t.active||t.value===d.focusValue)&&(y.value=e),d.arrowNavigation&&(Array.isArray(C.value[i])?C.value[i][n]=e:C.value[i]=[e],I()))},I=()=>{var e,t;const i=null!=(e=d.headerRefs)&&e.length?[d.headerRefs].concat(C.value):C.value.concat([d.skipButtonRef?[]:[w.value]]);l(qo(i),null!=(t=d.headerRefs)&&t.length?"monthPicker":"selectionGrid")},F=e=>{d.arrowNavigation||tr(e,f.value,!0)},G=e=>{b.value=e,u("hover-value",e)};return t({focusGrid:O}),(e,t)=>{var i;return(0,n.wg)(),(0,n.iD)("div",{ref_key:"gridWrapRef",ref:m,class:(0,s.C_)(T.value),style:(0,s.j5)(D.value),role:"dialog",tabindex:"0",onKeydown:[(0,r.D2)((0,r.iM)(N,["prevent"]),["esc"]),t[0]||(t[0]=(0,r.D2)((0,r.iM)((e=>F(e)),["prevent"]),["left"])),t[1]||(t[1]=(0,r.D2)((0,r.iM)((e=>F(e)),["prevent"]),["up"])),t[2]||(t[2]=(0,r.D2)((0,r.iM)((e=>F(e)),["prevent"]),["down"])),t[3]||(t[3]=(0,r.D2)((0,r.iM)((e=>F(e)),["prevent"]),["right"]))]},[(0,n._)("div",{ref_key:"containerRef",ref:E,class:(0,s.C_)(_.value),role:"grid",style:(0,s.j5)({height:`${S.value}px`})},[(0,n._)("div",zs,[(0,n.WI)(e.$slots,"header")]),e.$slots.overlay?(0,n.WI)(e.$slots,"overlay",{key:0}):((0,n.wg)(!0),(0,n.iD)(n.HY,{key:1},(0,n.Ko)(e.items,((t,i)=>((0,n.wg)(),(0,n.iD)("div",{key:i,class:(0,s.C_)(["dp__overlay_row",{dp__flex_row:e.items.length>=3}]),role:"row"},[((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(t,((t,o)=>((0,n.wg)(),(0,n.iD)("div",{key:t.value,ref_for:!0,ref:e=>L(e,t,i,o),role:"gridcell",class:(0,s.C_)(R.value),"aria-selected":t.active,"aria-disabled":t.disabled||void 0,tabindex:"0",onClick:e=>M(t),onKeydown:[(0,r.D2)((0,r.iM)((e=>M(t)),["prevent"]),["enter"]),(0,r.D2)((0,r.iM)((e=>M(t)),["prevent"]),["space"])],onMouseover:e=>G(t.value)},[(0,n._)("div",{class:(0,s.C_)(t.className)},[e.$slots.item?(0,n.WI)(e.$slots,"item",{key:0,item:t}):(0,n.kq)("",!0),e.$slots.item?(0,n.kq)("",!0):((0,n.wg)(),(0,n.iD)(n.HY,{key:1},[(0,n.Uk)((0,s.zw)(t.text),1)],64))],2)],42,Ks)))),128))],2)))),128))],6),e.$slots["button-icon"]?(0,n.wy)(((0,n.wg)(),(0,n.iD)("button",{key:0,ref_key:"toggleButton",ref:w,type:"button","aria-label":null==(i=(0,o.SU)(p))?void 0:i.toggleOverlay,class:(0,s.C_)(A.value),tabindex:"0",onClick:k,onKeydown:[(0,r.D2)(k,["enter"]),(0,r.D2)(k,["tab"])]},[(0,n.WI)(e.$slots,"button-icon")],42,Ys)),[[r.F8,!(0,o.SU)(g)(e.hideNavigation,e.type)]]):(0,n.kq)("",!0)],46,Us)}}}),Xs=(0,n.aZ)({__name:"InstanceWrap",props:{multiCalendars:{},stretch:{type:Boolean}},setup(e){const t=e,i=(0,n.Fl)((()=>t.multiCalendars>0?[...Array(t.multiCalendars).keys()]:[0])),o=(0,n.Fl)((()=>({dp__instance_calendar:t.multiCalendars>0})));return(e,t)=>((0,n.wg)(),(0,n.iD)("div",{class:(0,s.C_)({dp__menu_inner:!e.stretch,"dp--menu--inner-stretched":e.stretch,dp__flex_display:e.multiCalendars>0})},[((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(i.value,((t,i)=>((0,n.wg)(),(0,n.iD)("div",{key:t,class:(0,s.C_)(o.value)},[(0,n.WI)(e.$slots,"default",{instance:t,index:i})],2)))),128))],2))}}),$s=["aria-label","aria-disabled"],Zs=(0,n.aZ)({compatConfig:{MODE:3},__name:"ArrowBtn",props:{ariaLabel:{},disabled:{type:Boolean}},emits:["activate","set-ref"],setup(e,{emit:t}){const i=t,a=(0,o.iH)(null);return(0,n.bv)((()=>i("set-ref",a))),(e,t)=>((0,n.wg)(),(0,n.iD)("button",{ref_key:"elRef",ref:a,type:"button",class:"dp__btn dp--arrow-btn-nav",tabindex:"0","aria-label":e.ariaLabel,"aria-disabled":e.disabled||void 0,onClick:t[0]||(t[0]=t=>e.$emit("activate")),onKeydown:[t[1]||(t[1]=(0,r.D2)((0,r.iM)((t=>e.$emit("activate")),["prevent"]),["enter"])),t[2]||(t[2]=(0,r.D2)((0,r.iM)((t=>e.$emit("activate")),["prevent"]),["space"]))]},[(0,n._)("span",{class:(0,s.C_)(["dp__inner_nav",{dp__inner_nav_disabled:e.disabled}])},[(0,n.WI)(e.$slots,"default")],2)],40,$s))}}),Js={class:"dp--year-mode-picker"},Qs=["aria-label"],ea=(0,n.aZ)({__name:"YearModePicker",props:{...Ls,showYearPicker:{type:Boolean,default:!1},items:{type:Array,default:()=>[]},instance:{type:Number,default:0},year:{type:Number,default:0},isDisabled:{type:Function,default:()=>!1}},emits:["toggle-year-picker","year-select","handle-year"],setup(e,{emit:t}){const i=t,a=e,{showRightIcon:l,showLeftIcon:c}=Ms(),{defaultedConfig:u,defaultedMultiCalendars:d,defaultedAriaLabels:p,defaultedTransitions:h}=gs(a),{showTransition:f,transitionName:g}=Rs(h),v=(e=!1,t)=>{i("toggle-year-picker",{flow:e,show:t})},y=e=>{i("year-select",e)},m=(e=!1)=>{i("handle-year",e)};return(t,i)=>{var a,h,C;return(0,n.wg)(),(0,n.iD)("div",Js,[(0,o.SU)(c)((0,o.SU)(d),e.instance)?((0,n.wg)(),(0,n.j4)(Zs,{key:0,ref:"mpPrevIconRef","aria-label":null==(a=(0,o.SU)(p))?void 0:a.prevYear,disabled:e.isDisabled(!1),onActivate:i[0]||(i[0]=e=>m(!1))},{default:(0,n.w5)((()=>[t.$slots["arrow-left"]?(0,n.WI)(t.$slots,"arrow-left",{key:0}):(0,n.kq)("",!0),t.$slots["arrow-left"]?(0,n.kq)("",!0):((0,n.wg)(),(0,n.j4)((0,o.SU)(Ln),{key:1}))])),_:3},8,["aria-label","disabled"])):(0,n.kq)("",!0),(0,n._)("button",{ref:"mpYearButtonRef",class:"dp__btn dp--year-select",type:"button","aria-label":null==(h=(0,o.SU)(p))?void 0:h.openYearsOverlay,onClick:i[1]||(i[1]=()=>v(!1)),onKeydown:i[2]||(i[2]=(0,r.D2)((()=>v(!1)),["enter"]))},[t.$slots.year?(0,n.WI)(t.$slots,"year",{key:0,year:e.year}):(0,n.kq)("",!0),t.$slots.year?(0,n.kq)("",!0):((0,n.wg)(),(0,n.iD)(n.HY,{key:1},[(0,n.Uk)((0,s.zw)(e.year),1)],64))],40,Qs),(0,o.SU)(l)((0,o.SU)(d),e.instance)?((0,n.wg)(),(0,n.j4)(Zs,{key:1,ref:"mpNextIconRef","aria-label":null==(C=(0,o.SU)(p))?void 0:C.nextYear,disabled:e.isDisabled(!0),onActivate:i[3]||(i[3]=e=>m(!0))},{default:(0,n.w5)((()=>[t.$slots["arrow-right"]?(0,n.WI)(t.$slots,"arrow-right",{key:0}):(0,n.kq)("",!0),t.$slots["arrow-right"]?(0,n.kq)("",!0):((0,n.wg)(),(0,n.j4)((0,o.SU)(In),{key:1}))])),_:3},8,["aria-label","disabled"])):(0,n.kq)("",!0),(0,n.Wm)(r.uT,{name:(0,o.SU)(g)(e.showYearPicker),css:(0,o.SU)(f)},{default:(0,n.w5)((()=>[e.showYearPicker?((0,n.wg)(),(0,n.j4)(qs,{key:0,items:e.items,"text-input"
25:t.textInput,"esc-close":t.escClose,config:t.config,"is-last":t.autoApply&&!(0,o.SU)(u).keepActionRow,type:"year",onToggle:v,onSelected:i[4]||(i[4]=e=>y(e))},(0,n.Nv)({"button-icon":(0,n.w5)((()=>[t.$slots["calendar-icon"]?(0,n.WI)(t.$slots,"calendar-icon",{key:0}):(0,n.kq)("",!0),t.$slots["calendar-icon"]?(0,n.kq)("",!0):((0,n.wg)(),(0,n.j4)((0,o.SU)(kn),{key:1}))])),_:2},[t.$slots["year-overlay-value"]?{name:"item",fn:(0,n.w5)((({item:e})=>[(0,n.WI)(t.$slots,"year-overlay-value",{text:e.text,value:e.value})])),key:"0"}:void 0]),1032,["items","text-input","esc-close","config","is-last"])):(0,n.kq)("",!0)])),_:3},8,["name","css"])])}}}),ta=(e,t,i)=>{if(t.value&&Array.isArray(t.value))if(t.value.some((t=>pr(e,t)))){const i=t.value.filter((t=>!pr(t,e)));t.value=i.length?i:null}else(i&&+i>t.value.length||!i)&&t.value.push(e);else t.value=[e]},ia=(e,t,i)=>{let n=e.value?e.value.slice():[];return 2===n.length&&null!==n[1]&&(n=[]),n.length?dr(t,n[0])?(n.unshift(t),i("range-start",n[0]),i("range-start",n[1])):(n[1]=t,i("range-end",t)):(n=[t],i("range-start",t)),e.value=n,n},na=(e,t,i,n)=>{e[0]&&e[1]&&i&&t("auto-apply"),e[0]&&!e[1]&&n&&i&&t("auto-apply")},oa=e=>{Array.isArray(e.value)&&e.value.length<=2&&e.range?e.modelValue.value=e.value.map((t=>wr(ar(t),e.timezone))):Array.isArray(e.value)||(e.modelValue.value=wr(ar(e.value),e.timezone))},ra=({multiCalendars:e,highlight:t,calendars:i,modelValue:r,props:s,year:a,month:l,emit:c})=>{const u=(0,n.Fl)((()=>jo(s.yearRange,s.reverseYears))),d=(0,o.iH)([!1]),p=(0,n.Fl)((()=>(e,t)=>{const i=bi(gr(new Date),{month:l.value(e),year:a.value(e)});return _r(i,s.maxDate,s.minDate,s.preventMinMaxNavigation,t)})),h=()=>{for(let t=0;t<e.value.count;t++)if(0===t)i.value[t]=i.value[0];else{const e=bi(ar(),i.value[t-1]);i.value[t]={month:Mi(e),year:Pi(sn(e,1))}}},f=t=>{if(!t)return h();const n=bi(ar(),i.value[t]);return i.value[0].year=Pi(an(n,e.value.count-1)),h()},g=e=>s.focusStartDate?e[0]:e[1]?e[1]:e[0],v=()=>{if(r.value){const e=Array.isArray(r.value)?g(r.value):r.value;i.value[0]={month:Mi(e),year:Pi(e)}}};(0,n.bv)((()=>{v(),e.value.count&&h()}));const y=(t,n)=>{i.value[n].year=t,e.value.count&&!e.value.solo&&f(n)},m=(0,n.Fl)((()=>e=>er(u.value,(i=>{const n=a.value(e)===i.value,o=Qo(i.value,br(s.minDate),br(s.maxDate)),r=Ur(t.value,i.value);return{active:n,disabled:o,highlighted:r}})))),C=(e,t)=>{y(e,t),w(t)},b=(e,t=!1)=>{if(!p.value(e,t)){const i=t?a.value(e)+1:a.value(e)-1;y(i,e)}},w=(e,t=!1,i)=>{t||c("reset-flow"),d.value[e]=void 0!==i?i:!d.value[e],d.value||c("overlay-closed")};return{isDisabled:p,groupedYears:m,showYearPicker:d,selectYear:y,toggleYearPicker:w,handleYearSelect:C,handleYear:b}},sa=(e,t)=>{const{defaultedMultiCalendars:i,defaultedAriaLabels:r,defaultedTransitions:s,defaultedConfig:a,defaultedHighlight:l}=gs(e),{modelValue:c,year:u,month:d,calendars:p}=As(e,t),h=(0,n.Fl)((()=>Ho(e.formatLocale,e.locale,e.monthNameFormat))),f=(0,o.iH)(null),{selectYear:g,groupedYears:v,showYearPicker:y,toggleYearPicker:m,handleYearSelect:C,handleYear:b,isDisabled:w}=ra({modelValue:c,multiCalendars:i,highlight:l,calendars:p,year:u,month:d,props:e,emit:t});(0,n.bv)((()=>{e.startDate&&(c.value&&e.focusStartDate||!c.value)&&g(Pi(ar(e.startDate)),0)}));const S=e=>e?{month:Mi(e),year:Pi(e)}:{month:null,year:null},E=()=>c.value?Array.isArray(c.value)?c.value.map((e=>S(e))):S(c.value):S(),x=(e,t)=>{const i=p.value[e],n=E();return Array.isArray(n)?n.some((e=>e.year===(null==i?void 0:i.year)&&e.month===t)):(null==i?void 0:i.year)===n.year&&t===n.month},O=(e,t,i)=>{var n,o;const r=E();return!!Array.isArray(r)&&(u.value(t)===(null==(n=r[i])?void 0:n.year)&&e===(null==(o=r[i])?void 0:o.month))},T=(t,i)=>{if(e.range){const e=E();if(Array.isArray(c.value)&&Array.isArray(e)){const e=O(t,i,0)||O(t,i,1),n=Ar(gr(ar()),t,u.value(i));return fr(c.value,f.value,n)&&!e}return!1}return!1},D=(0,n.Fl)((()=>t=>er(h.value,(i=>{const n=x(t,i.value),o=Qo(i.value,mr(u.value(t),e.minDate),Cr(u.value(t),e.maxDate))||Hr(e.disabledDates,u.value(t)).includes(i.value),r=T(i.value,t),s=Wr(l.value,i.value,u.value(t));return{active:n,disabled:o,isBetween:r,highlighted:s}})))),R=(e,t)=>Ar(gr(ar()),e,u.value(t)),A=(e,i)=>{const n=c.value?c.value:gr(new Date);c.value=Ar(n,e,u.value(i)),t("auto-apply")},_=(i,n)=>{const o=ia(c,R(i,n),t);na(o,t,e.autoApply,e.modelAuto)},P=(i,n)=>{ta(R(i,n),c,e.multiDatesLimit),t("auto-apply",!0)},M=(t,i)=>(p.value[i].month=t,N(i,p.value[i].year,t),e.multiDates?P(t,i):e.range?_(t,i):A(t,i)),k=(e,t)=>{g(e,t),N(t,e,null)},N=(e,i,n)=>{let o=n;if(!o){const t=E();o=Array.isArray(t)?t[e].month:t.month}
25t("update-month-year",{instance:e,year:i,month:o})};return{groupedMonths:D,groupedYears:v,year:u,isDisabled:w,defaultedMultiCalendars:i,defaultedAriaLabels:r,defaultedTransitions:s,defaultedConfig:a,showYearPicker:y,modelValue:c,presetDate:(i,n)=>{oa({value:i,modelValue:c,range:e.range,timezone:n?void 0:e.timezone}),t("auto-apply")},setHoverDate:(e,t)=>{f.value=R(e,t)},selectMonth:M,selectYear:k,toggleYearPicker:m,handleYearSelect:C,handleYear:b,getModelMonthYear:E}},aa=(0,n.aZ)({compatConfig:{MODE:3},__name:"MonthPicker",props:{...Ls},emits:["update:internal-model-value","overlay-closed","reset-flow","range-start","range-end","auto-apply","update-month-year","mount"],setup(e,{expose:t,emit:i}){const r=i,a=(0,n.Rr)(),l=Ds(a,"yearMode"),c=e;(0,n.bv)((()=>{c.shadow||r("mount",null)}));const{groupedMonths:u,groupedYears:d,year:p,isDisabled:h,defaultedMultiCalendars:f,defaultedConfig:g,showYearPicker:v,modelValue:y,presetDate:m,setHoverDate:C,selectMonth:b,selectYear:w,toggleYearPicker:S,handleYearSelect:E,handleYear:x,getModelMonthYear:O}=sa(c,r);return t({getSidebarProps:()=>({modelValue:y,year:p,getModelMonthYear:O,selectMonth:b,selectYear:w,handleYear:x}),presetDate:m,toggleYearPicker:e=>S(0,e)}),(e,t)=>((0,n.wg)(),(0,n.j4)(Xs,{"multi-calendars":(0,o.SU)(f).count,stretch:""},{default:(0,n.w5)((({instance:t})=>[e.$slots["month-year"]?(0,n.WI)(e.$slots,"month-year",(0,s.vs)((0,n.dG)({key:0},{year:(0,o.SU)(p),months:(0,o.SU)(u)(t),years:(0,o.SU)(d)(t),selectMonth:(0,o.SU)(b),selectYear:(0,o.SU)(w),instance:t}))):((0,n.wg)(),(0,n.j4)(qs,{key:1,items:(0,o.SU)(u)(t),"arrow-navigation":e.arrowNavigation,"is-last":e.autoApply&&!(0,o.SU)(g).keepActionRow,"esc-close":e.escClose,height:(0,o.SU)(g).modeHeight,config:e.config,"no-overlay-focus":e.noOverlayFocus,"use-relative":"",type:"month",onSelected:e=>(0,o.SU)(b)(e,t),onHoverValue:e=>(0,o.SU)(C)(e,t)},{header:(0,n.w5)((()=>[(0,n.Wm)(ea,(0,n.dG)(e.$props,{items:(0,o.SU)(d)(t),instance:t,"show-year-picker":(0,o.SU)(v)[t],year:(0,o.SU)(p)(t),"is-disabled":e=>(0,o.SU)(h)(t,e),onHandleYear:e=>(0,o.SU)(x)(t,e),onYearSelect:e=>(0,o.SU)(E)(e,t),onToggleYearPicker:e=>(0,o.SU)(S)(t,null==e?void 0:e.flow,null==e?void 0:e.show)}),(0,n.Nv)({_:2},[(0,n.Ko)((0,o.SU)(l),((t,i)=>({name:t,fn:(0,n.w5)((i=>[(0,n.WI)(e.$slots,t,(0,s.vs)((0,n.F4)(i)))]))})))]),1040,["items","instance","show-year-picker","year","is-disabled","onHandleYear","onYearSelect","onToggleYearPicker"])])),_:2},1032,["items","arrow-navigation","is-last","esc-close","height","config","no-overlay-focus","onSelected","onHoverValue"]))])),_:3},8,["multi-calendars"]))}}),la=(e,t)=>{const{modelValue:i}=As(e,t),r=(0,o.iH)(null),{defaultedHighlight:s}=gs(e),a=(0,o.iH)();(0,n.bv)((()=>{e.startDate&&(i.value&&e.focusStartDate||!i.value)&&(a.value=Pi(ar(e.startDate)))}));const l=e=>Array.isArray(i.value)?i.value.some((t=>Pi(t)===e)):!!i.value&&Pi(i.value)===e,c=t=>!(!e.range||!Array.isArray(i.value))&&fr(i.value,r.value,d(t)),u=(0,n.Fl)((()=>er(jo(e.yearRange,e.reverseYears),(t=>{const i=l(t.value),n=Qo(t.value,br(e.minDate),br(e.maxDate)),o=c(t.value),r=Ur(s.value,t.value);return{active:i,disabled:n,isBetween:o,highlighted:r}})))),d=e=>on(gr(new Date),e);return{groupedYears:u,modelValue:i,focusYear:a,setHoverValue:e=>{r.value=on(gr(new Date),e)},selectYear:n=>{var o;if(e.multiDates)return i.value?Array.isArray(i.value)&&((null==(o=i.value)?void 0:o.map((e=>Pi(e)))).includes(n)?i.value=i.value.filter((e=>Pi(e)!==n)):i.value.push(on(cr(ar()),n))):i.value=[on(cr(ar()),n)],t("auto-apply",!0);if(e.range){const o=ia(i,d(n),t);return na(o,t,e.autoApply,e.modelAuto)}i.value=d(n),t("auto-apply")}}},ca=(0,n.aZ)({compatConfig:{MODE:3},__name:"YearPicker",props:{...Ls},emits:["update:internal-model-value","reset-flow","range-start","range-end","auto-apply"],setup(e,{expose:t,emit:i}){const r=i,a=e,{groupedYears:l,modelValue:c,focusYear:u,selectYear:d,setHoverValue:p}=la(a,r),{defaultedConfig:h}=gs(a);return t({getSidebarProps:()=>({modelValue:c,selectYear:d})}),(e,t)=>((0,n.wg)(),(0,n.iD)("div",null,[e.$slots["month-year"]?(0,n.WI)(e.$slots,"month-year",(0,s.vs)((0,n.dG)({key:0},{years:(0,o.SU)(l),selectYear:(0,o.SU)(d)}))):((0,n.wg)(),(0,n.j4)(qs,{key:1,items:(0,o.SU)(l),"is-last":e.autoApply&&!(0,o.SU)(h).keepActionRow,height:(0,o.SU)(h).modeHeight,config:e.config,"no-overlay-focus":e.noOverlayFocus,"focus-value":(0,o.SU)(u),type:"year","use-relative":"",onSelected:(0,o.SU)(d),onHoverValue:(0,o.SU)(p)},(0,n.Nv)({_:2},[e.$slots["year-overlay-value"]?{name:"item",fn:(0,n.w5)((({item:t})=>[(0,n.WI)(e.$slots,"year-overlay-value",{text:t.text,value:t.value})])),key:"0"}:void 0]),1032,["items","is-last","height","config","no-overlay-focus","focus-value","onSelected","onHoverValue"]))]))}}),ua={key:0,class:"dp__time_input"},da=["aria-label","onKeydown","onClick"],pa=(0,n._)("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_l"},null,-1),ha=(0,n._)("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_r"},null,-1),fa=["aria-label","disabled","onKeydown","onClick"],ga=["aria-label","onKeydown","onClick"],va=(0,n._)("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_l"},null,-1),ya=(0,n._)("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_r"},null,-1),ma={key:0},Ca=["aria-label","onKeydown"],ba=(0,n.aZ)({compatConfig:{MODE:3},__name:"TimeInput",props:{hours:{type:Number,default:0},minutes:{type:Number,default:0},seconds:{type:Number,default:0},closeTimePickerBtn:{type:Object,default:null},order:{type:Number,default:0},disabledTimesConfig:{type:Function,default:null},validateTime:{type:Function,default:()=>!1},...Ls},emits:["set-hours","set-minutes","update:hours","update:minutes","update:seconds","reset-flow","mounted","overlay-closed","am-pm-change"],setup(e,{expose:t,emit:i}){const a=i,l=e,{setTimePickerElements:c,setTimePickerBackRef:u}=ts(),{defaultedAriaLabels:d,defaultedTransitions:p,defaultedFilters:h,defaultedConfig:f}=gs(l),{transitionName:g,showTransition:v}
25=Rs(p),y=(0,o.qj)({hours:!1,minutes:!1,seconds:!1}),m=(0,o.iH)("AM"),C=(0,o.iH)(null),b=(0,o.iH)([]);(0,n.bv)((()=>{a("mounted")}));const w=e=>bi(new Date,{hours:e.hours,minutes:e.minutes,seconds:l.enableSeconds?e.seconds:0,milliseconds:0}),S=(0,n.Fl)((()=>e=>N(e,l[e])||x(e,l[e]))),E=(0,n.Fl)((()=>({hours:l.hours,minutes:l.minutes,seconds:l.seconds}))),x=(e,t)=>!(!l.range||l.disableTimeRangeValidation)&&!l.validateTime(e,t),O=(e,t)=>{if(l.range&&!l.disableTimeRangeValidation){const i=t?+l[`${e}Increment`]:-+l[`${e}Increment`],n=l[e]+i;return!l.validateTime(e,n)}return!1},T=(0,n.Fl)((()=>e=>!I(+l[e]+ +l[`${e}Increment`],e)||O(e,!0))),D=(0,n.Fl)((()=>e=>!I(+l[e]-+l[`${e}Increment`],e)||O(e,!1))),R=(e,t)=>hn(bi(ar(),e),t),A=(e,t)=>gn(bi(ar(),e),t),_=(0,n.Fl)((()=>({dp__time_col:!0,dp__time_col_block:!l.timePickerInline,dp__time_col_reg_block:!l.enableSeconds&&l.is24&&!l.timePickerInline,dp__time_col_reg_inline:!l.enableSeconds&&l.is24&&l.timePickerInline,dp__time_col_reg_with_button:!l.enableSeconds&&!l.is24,dp__time_col_sec:l.enableSeconds&&l.is24,dp__time_col_sec_with_button:l.enableSeconds&&!l.is24}))),P=(0,n.Fl)((()=>{const e=[{type:"hours"},{type:"",separator:!0},{type:"minutes"}];return l.enableSeconds?e.concat([{type:"",separator:!0},{type:"seconds"}]):e})),M=(0,n.Fl)((()=>P.value.filter((e=>!e.separator)))),k=(0,n.Fl)((()=>e=>{if("hours"===e){const e=j(+l.hours);return{text:e<10?`0${e}`:`${e}`,value:e}}return{text:l[e]<10?`0${l[e]}`:`${l[e]}`,value:l[e]}})),N=(e,t)=>{var i;if(!l.disabledTimesConfig)return!1;const n=l.disabledTimesConfig(l.order,"hours"===e?t:void 0);return!n[e]||!(null==(i=n[e])||!i.includes(t))},L=e=>{const t=l.is24?24:12,i="hours"===e?t:60,n=+l[`${e}GridIncrement`],o="hours"!==e||l.is24?0:n,r=[];for(let s=o;s<i;s+=n)r.push({value:s,text:s<10?`0${s}`:`${s}`});return"hours"===e&&!l.is24&&r.push({value:0,text:"12"}),er(r,(t=>({active:!1,disabled:h.value.times[e].includes(t.value)||!I(t.value,e)||N(e,t.value)||x(e,t.value)})))},I=(e,t)=>{const i=l.minTime?w(vr(l.minTime)):null,n=l.maxTime?w(vr(l.maxTime)):null,o=w(vr(E.value,t,e));return i&&n?(Oi(o,n)||Ti(o,n))&&(Di(o,i)||Ti(o,i)):i?Di(o,i)||Ti(o,i):!n||(Oi(o,n)||Ti(o,n))},F=e=>l[`no${e[0].toUpperCase()+e.slice(1)}Overlay`],G=e=>{F(e)||(y[e]=!y[e],y[e]||a("overlay-closed"))},V=e=>"hours"===e?Ri:"minutes"===e?Ai:_i,B=(e,t=!0)=>{const i=t?R:A,n=t?+l[`${e}Increment`]:-+l[`${e}Increment`];I(+l[e]+n,e)&&a(`update:${e}`,V(e)(i({[e]:+l[e]},{[e]:+l[`${e}Increment`]})))},j=e=>l.is24?e:(m.value=e>=12?"PM":"AM",Wo(e)),H=()=>{"PM"===m.value?(m.value="AM",a("update:hours",l.hours-12)):(m.value="PM",a("update:hours",l.hours+12)),a("am-pm-change",m.value)},W=e=>{y[e]=!0},U=(e,t,i)=>{if(e&&l.arrowNavigation){Array.isArray(b.value[t])?b.value[t][i]=e:b.value[t]=[e];const n=b.value.reduce(((e,t)=>t.map(((i,n)=>[...e[n]||[],t[n]]))),[]);u(l.closeTimePickerBtn),C.value&&(n[1]=n[1].concat(C.value)),c(n,l.order)}},z=(e,t)=>(G(e),"hours"!==e||l.is24?a(`update:${e}`,t):a(`update:${e}`,"PM"===m.value?t+12:t));return t({openChildCmp:W}),(e,t)=>{var i;return e.disabled?(0,n.kq)("",!0):((0,n.wg)(),(0,n.iD)("div",ua,[((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(P.value,((t,i)=>{var a,c,u;return(0,n.wg)(),(0,n.iD)("div",{key:i,class:(0,s.C_)(_.value)},[t.separator?((0,n.wg)(),(0,n.iD)(n.HY,{key:0},[(0,n.Uk)(" : ")],64)):((0,n.wg)(),(0,n.iD)(n.HY,{key:1},[(0,n._)("button",{ref_for:!0,ref:e=>U(e,i,0),type:"button",class:(0,s.C_)({dp__btn:!0,dp__inc_dec_button:!e.timePickerInline,dp__inc_dec_button_inline:e.timePickerInline,dp__tp_inline_btn_top:e.timePickerInline,dp__inc_dec_button_disabled:T.value(t.type)}),"aria-label":null==(a=(0,o.SU)(d))?void 0:a.incrementValue(t.type),tabindex:"0",onKeydown:[(0,r.D2)((0,r.iM)((e=>B(t.type)),["prevent"]),["enter"]),(0,r.D2)((0,r.iM)((e=>B(t.type)),["prevent"]),["space"])],onClick:e=>B(t.type)},[l.timePickerInline?((0,n.wg)(),(0,n.iD)(n.HY,{key:1},[pa,ha],64)):((0,n.wg)(),(0,n.iD)(n.HY,{key:0},[e.$slots["arrow-up"]?(0,n.WI)(e.$slots,"arrow-up",{key:0}):(0,n.kq)("",!0),e.$slots["arrow-up"]?(0,n.kq)("",!0):((0,n.wg)(),(0,n.j4)((0,o.SU)(Gn),{key:1}))],64))],42,da),(0,n._)("button",{ref_for:!0,ref:e=>U(e,i,1),type:"button","aria-label":null==(c=(0,o.SU)(d))?void 0:c.openTpOverlay(t.type),class:(0,s.C_)({dp__time_display:!0,dp__time_display_block:!e.timePickerInline,dp__time_display_inline:e.timePickerInline,"dp--time-invalid":S.value(t.type),"dp--time-overlay-btn":!S.value(t.type)}),disabled:F(t.type),tabindex:"0",onKeydown:[(0,r.D2)((0,r.iM)((e=>G(t.type)),["prevent"]),["enter"]),(0,r.D2)((0,r.iM)((e=>G(t.type)),["prevent"]),["space"])],onClick:e=>G(t.type)},[e.$slots[t.type]?(0,n.WI)(e.$slots,t.type,{key:0,text:k.value(t.type).text,value:k.value(t.type).value}):(0,n.kq)("",!0),e.$slots[t.type]?(0,n.kq)("",!0):((0,n.wg)(),(0,n.iD)(n.HY,{key:1},[(0,n.Uk)((0,s.zw)(k.value(t.type).text),1)],64))],42,fa),(0,n._)("button",{ref_for:!0,ref:e=>U(e,i,2),type:"button",class:(0,s.C_)({dp__btn:!0,dp__inc_dec_button:!e.timePickerInline,dp__inc_dec_button_inline:e.timePickerInline,dp__tp_inline_btn_bottom:e.timePickerInline,dp__inc_dec_button_disabled:D.value(t.type)}),"aria-label":null==(u=(0,o.SU)(d))?void 0:u.decrementValue(t.type),tabindex:"0",onKeydown:[(0,r.D2)((0,r.iM)((e=>B(t.type,!1)),["prevent"]),["enter"]),(0,r.D2)((0,r.iM)((e=>B(t.type,!1)),["prevent"]),["space"])],onClick:e=>B(t.type,!1)},[l.timePickerInline?((0,n.wg)(),(0,n.iD)(n.HY,{key:1},[va,ya],64)):((0,n.wg)(),(0,n.iD)(n.HY,{key:0},[e.$slots["arrow-down"]?(0,n.WI)(e.$slots,"arrow-down",{key:0}):(0,n.kq)("",!0),e.$slots["arrow-down"]?(0,n.kq)("",!0):((0,n.wg)(),(0,n.j4)((0,o.SU)(Vn),{key:1}))],64))],42,ga)],64))],2)}
25)),128)),e.is24?(0,n.kq)("",!0):((0,n.wg)(),(0,n.iD)("div",ma,[e.$slots["am-pm-button"]?(0,n.WI)(e.$slots,"am-pm-button",{key:0,toggle:H,value:m.value}):(0,n.kq)("",!0),e.$slots["am-pm-button"]?(0,n.kq)("",!0):((0,n.wg)(),(0,n.iD)("button",{key:1,ref_key:"amPmButton",ref:C,type:"button",class:"dp__pm_am_button",role:"button","aria-label":null==(i=(0,o.SU)(d))?void 0:i.amPmButton,tabindex:"0",onClick:H,onKeydown:[(0,r.D2)((0,r.iM)(H,["prevent"]),["enter"]),(0,r.D2)((0,r.iM)(H,["prevent"]),["space"])]},(0,s.zw)(m.value),41,Ca))])),((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(M.value,((i,s)=>((0,n.wg)(),(0,n.j4)(r.uT,{key:s,name:(0,o.SU)(g)(y[i.type]),css:(0,o.SU)(v)},{default:(0,n.w5)((()=>[y[i.type]?((0,n.wg)(),(0,n.j4)(qs,{key:0,items:L(i.type),"is-last":e.autoApply&&!(0,o.SU)(f).keepActionRow,"esc-close":e.escClose,type:i.type,"text-input":e.textInput,config:e.config,"arrow-navigation":e.arrowNavigation,onSelected:e=>z(i.type,e),onToggle:e=>G(i.type),onResetFlow:t[0]||(t[0]=t=>e.$emit("reset-flow"))},(0,n.Nv)({"button-icon":(0,n.w5)((()=>[e.$slots["clock-icon"]?(0,n.WI)(e.$slots,"clock-icon",{key:0}):(0,n.kq)("",!0),e.$slots["clock-icon"]?(0,n.kq)("",!0):((0,n.wg)(),(0,n.j4)((0,o.SU)(Fn),{key:1}))])),_:2},[e.$slots[`${i.type}-overlay-value`]?{name:"item",fn:(0,n.w5)((({item:t})=>[(0,n.WI)(e.$slots,`${i.type}-overlay-value`,{text:t.text,value:t.value})])),key:"0"}:void 0]),1032,["items","is-last","esc-close","type","text-input","config","arrow-navigation","onSelected","onToggle"])):(0,n.kq)("",!0)])),_:2},1032,["name","css"])))),128))]))}}}),wa={class:"dp--tp-wrap"},Sa=["aria-label","tabindex"],Ea=["tabindex"],xa=["aria-label"],Oa=(0,n.aZ)({compatConfig:{MODE:3},__name:"TimePicker",props:{hours:{type:[Number,Array],default:0},minutes:{type:[Number,Array],default:0},seconds:{type:[Number,Array],default:0},disabledTimesConfig:{type:Function,default:null},validateTime:{type:Function,default:()=>!1},...Ls},emits:["update:hours","update:minutes","update:seconds","mount","reset-flow","overlay-opened","overlay-closed","am-pm-change"],setup(e,{expose:t,emit:i}){const a=i,l=e,{buildMatrix:c,setTimePicker:u}=ts(),d=(0,n.Rr)(),{defaultedTransitions:p,defaultedAriaLabels:h,defaultedTextInput:f,defaultedConfig:g}=gs(l),{transitionName:v,showTransition:y}=Rs(p),{hideNavigationButtons:m}=Ms(),C=(0,o.iH)(null),b=(0,o.iH)(null),w=(0,o.iH)([]),S=(0,o.iH)(null);(0,n.bv)((()=>{a("mount"),!l.timePicker&&l.arrowNavigation?c([Uo(C.value)],"time"):u(!0,l.timePicker)}));const E=(0,n.Fl)((()=>!l.range||!l.modelAuto||Ko(l.internalModelValue))),x=(0,o.iH)(!1),O=e=>({hours:Array.isArray(l.hours)?l.hours[e]:l.hours,minutes:Array.isArray(l.minutes)?l.minutes[e]:l.minutes,seconds:Array.isArray(l.seconds)?l.seconds[e]:l.seconds}),T=(0,n.Fl)((()=>{const e=[];if(l.range)for(let t=0;t<2;t++)e.push(O(t));else e.push(O(0));return e})),D=(e,t=!1,i="")=>{t||a("reset-flow"),x.value=e,a(e?"overlay-opened":"overlay-closed"),l.arrowNavigation&&u(e),(0,n.Y3)((()=>{""!==i&&w.value[0]&&w.value[0].openChildCmp(i)}))},R=(0,n.Fl)((()=>({dp__btn:!0,dp__button:!0,dp__button_bottom:l.autoApply&&!g.value.keepActionRow}))),A=Ds(d,"timePicker"),_=(e,t,i)=>l.range?0===t?[e,T.value[1][i]]:[T.value[0][i],e]:e,P=e=>{a("update:hours",e)},M=e=>{a("update:minutes",e)},k=e=>{a("update:seconds",e)},N=()=>{if(S.value&&!f.value.enabled&&!l.noOverlayFocus){const e=Zo(S.value);e&&e.focus({preventScroll:!0})}};return t({toggleTimePicker:D}),(t,i)=>{var a;return(0,n.wg)(),(0,n.iD)("div",wa,[t.timePicker||t.timePickerInline?(0,n.kq)("",!0):(0,n.wy)(((0,n.wg)(),(0,n.iD)("button",{key:0,ref_key:"openTimePickerBtn",ref:C,type:"button",class:(0,s.C_)(R.value),"aria-label":null==(a=(0,o.SU)(h))?void 0:a.openTimePicker,tabindex:t.noOverlayFocus?void 0:0,onKeydown:[i[0]||(i[0]=(0,r.D2)((e=>D(!0)),["enter"])),i[1]||(i[1]=(0,r.D2)((e=>D(!0)),["space"]))],onClick:i[2]||(i[2]=e=>D(!0))},[t.$slots["clock-icon"]?(0,n.WI)(t.$slots,"clock-icon",{key:0}):(0,n.kq)("",!0),t.$slots["clock-icon"]?(0,n.kq)("",!0):((0,n.wg)(),(0,n.j4)((0,o.SU)(Fn),{key:1}))],42,Sa)),[[r.F8,!(0,o.SU)(m)(t.hideNavigation,"time")]]),(0,n.Wm)(r.uT,{name:(0,o.SU)(v)(x.value),
25css:(0,o.SU)(y)&&!t.timePickerInline},{default:(0,n.w5)((()=>{var a;return[x.value||t.timePicker||t.timePickerInline?((0,n.wg)(),(0,n.iD)("div",{key:0,ref_key:"overlayRef",ref:S,class:(0,s.C_)({dp__overlay:!t.timePickerInline,"dp--overlay-absolute":!l.timePicker&&!t.timePickerInline,"dp--overlay-relative":l.timePicker}),style:(0,s.j5)(t.timePicker?{height:`${(0,o.SU)(g).modeHeight}px`}:void 0),tabindex:t.timePickerInline?void 0:0},[(0,n._)("div",{class:(0,s.C_)(t.timePickerInline?"dp__time_picker_inline_container":"dp__overlay_container dp__container_flex dp__time_picker_overlay_container"),style:{display:"flex"}},[t.$slots["time-picker-overlay"]?(0,n.WI)(t.$slots,"time-picker-overlay",{key:0,hours:e.hours,minutes:e.minutes,seconds:e.seconds,setHours:P,setMinutes:M,setSeconds:k}):(0,n.kq)("",!0),t.$slots["time-picker-overlay"]?(0,n.kq)("",!0):((0,n.wg)(),(0,n.iD)("div",{key:1,class:(0,s.C_)(t.timePickerInline?"dp__flex":"dp__overlay_row dp__flex_row")},[((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(T.value,((a,l)=>(0,n.wy)(((0,n.wg)(),(0,n.j4)(ba,(0,n.dG)({key:l},{...t.$props,order:l,hours:a.hours,minutes:a.minutes,seconds:a.seconds,closeTimePickerBtn:b.value,disabledTimesConfig:e.disabledTimesConfig,disabled:0===l?t.fixedStart:t.fixedEnd},{ref_for:!0,ref_key:"timeInputRefs",ref:w,"validate-time":(t,i)=>e.validateTime(t,_(i,l,t)),"onUpdate:hours":e=>P(_(e,l,"hours")),"onUpdate:minutes":e=>M(_(e,l,"minutes")),"onUpdate:seconds":e=>k(_(e,l,"seconds")),onMounted:N,onOverlayClosed:N,onAmPmChange:i[3]||(i[3]=e=>t.$emit("am-pm-change",e))}),(0,n.Nv)({_:2},[(0,n.Ko)((0,o.SU)(A),((e,i)=>({name:e,fn:(0,n.w5)((i=>[(0,n.WI)(t.$slots,e,(0,s.vs)((0,n.F4)(i)))]))})))]),1040,["validate-time","onUpdate:hours","onUpdate:minutes","onUpdate:seconds"])),[[r.F8,0===l||E.value]]))),128))],2)),t.timePicker||t.timePickerInline?(0,n.kq)("",!0):(0,n.wy)(((0,n.wg)(),(0,n.iD)("button",{key:2,ref_key:"closeTimePickerBtn",ref:b,type:"button",class:(0,s.C_)(R.value),"aria-label":null==(a=(0,o.SU)(h))?void 0:a.closeTimePicker,tabindex:"0",onKeydown:[i[4]||(i[4]=(0,r.D2)((e=>D(!1)),["enter"])),i[5]||(i[5]=(0,r.D2)((e=>D(!1)),["space"]))],onClick:i[6]||(i[6]=e=>D(!1))},[t.$slots["calendar-icon"]?(0,n.WI)(t.$slots,"calendar-icon",{key:0}):(0,n.kq)("",!0),t.$slots["calendar-icon"]?(0,n.kq)("",!0):((0,n.wg)(),(0,n.j4)((0,o.SU)(kn),{key:1}))],42,xa)),[[r.F8,!(0,o.SU)(m)(t.hideNavigation,"time")]])],2)],14,Ea)):(0,n.kq)("",!0)]})),_:3},8,["name","css"])])}}}),Ta=(e,t,i,o)=>{const r=(e,i)=>Array.isArray(t[e])?t[e][i]:t[e],s=i=>e.enableSeconds?Array.isArray(t.seconds)?t.seconds[i]:t.seconds:0,a=(e,i)=>e?void 0!==i?ur(e,r("hours",i),r("minutes",i),s(i)):ur(e,t.hours,t.minutes,s()):Ei(ar(),s(i)),l=(e,i)=>{t[e]=i},c=(n,o)=>{const r=Object.fromEntries(Object.keys(t).map((e=>e===n?[e,o]:[e,t[e]].slice())));if(e.range&&!e.disableTimeRangeValidation){const e=e=>i.value?ur(i.value[e],r.hours[e],r.minutes[e],r.seconds[e]):null,t=e=>xi(i.value[e],0);return!(pr(e(0),e(1))&&(Di(e(0),t(1))||Oi(e(1),t(0))))}return!0},u=(e,t)=>{c(e,t)&&(l(e,t),o&&o())},d=e=>{u("hours",e)},p=e=>{u("minutes",e)},h=e=>{u("seconds",e)},f=(e,t,n,o)=>{t&&d(e),!t&&!n&&p(e),n&&h(e),i.value&&o(i.value)},g=t=>{if(t){const i=Array.isArray(t),n=i?[+t[0].hours,+t[1].hours]:+t.hours,o=i?[+t[0].minutes,+t[1].minutes]:+t.minutes,r=i?[+t[0].seconds,+t[1].seconds]:+t.seconds;l("hours",n),l("minutes",o),e.enableSeconds&&l("seconds",r)}},v=(i,n)=>{const o={hours:Array.isArray(t.hours)?t.hours[i]:t.hours,disabledArr:[]};return(n||0===n)&&(o.hours=n),Array.isArray(e.disabledTimes)&&(o.disabledArr=e.range&&Array.isArray(e.disabledTimes[i])?e.disabledTimes[i]:e.disabledTimes),o},y=(0,n.Fl)((()=>(t,i)=>{var n;if(Array.isArray(e.disabledTimes)){const{disabledArr:e,hours:o}=v(t,i),r=e.filter((e=>+e.hours===o));return"*"===(null==(n=r[0])?void 0:n.minutes)?{hours:[o],minutes:void 0,seconds:void 0}:{hours:[],minutes:(null==r?void 0:r.map((e=>+e.minutes)))??[],seconds:(null==r?void 0:r.map((e=>e.seconds?+e.seconds:void 0)))??[]}}return{hours:[],minutes:[],seconds:[]}}));return{setTime:l,updateHours:d,updateMinutes:p,updateSeconds:h,getSetDateTime:a,updateTimeValues:f,getSecondsValue:s,assignStartTime:g,validateTime:c,disabledTimesConfig:y}},Da=(e,t)=>{const{modelValue:i,time:o}=As(e,t),{defaultedStartTime:r}=gs(e),{updateTimeValues:s,getSetDateTime:a,setTime:l,assignStartTime:c,disabledTimesConfig:u,validateTime:d}=Ta(e,o,i),p=e=>{const{hours:t,minutes:i,seconds:n}=e;return{hours:+t,minutes:+i,seconds:n?+n:0}},h=()=>
25{if(e.startTime){if(Array.isArray(e.startTime)){const t=p(e.startTime[0]),i=p(e.startTime[1]);return[bi(ar(),t),bi(ar(),i)]}const t=p(e.startTime);return bi(ar(),t)}return e.range?[null,null]:null},f=()=>{if(e.range){const[e,t]=h();i.value=[a(e,0),a(t,1)]}else i.value=a(h())},g=e=>Array.isArray(e)?[yr(ar(e[0])),yr(ar(e[1]))]:[yr(e??ar())],v=(t,i,n)=>{l("hours",t),l("minutes",i),l("seconds",e.enableSeconds?n:0)},y=()=>{const[t,n]=g(i.value);return e.range?v([t.hours,n.hours],[t.minutes,n.minutes],[t.seconds,n.minutes]):v(t.hours,t.minutes,t.seconds)};(0,n.bv)((()=>{if(!e.shadow)return c(r.value),i.value?y():f()}));const m=()=>{Array.isArray(i.value)?i.value=i.value.map(((e,t)=>e&&a(e,t))):i.value=a(i.value),t("time-update")};return{modelValue:i,time:o,disabledTimesConfig:u,updateTime:(e,t=!0,i=!1)=>{s(e,t,i,m)},validateTime:d}},Ra=(0,n.aZ)({compatConfig:{MODE:3},__name:"TimePickerSolo",props:{...Ls},emits:["update:internal-model-value","time-update","am-pm-change"],setup(e,{expose:t,emit:i}){const r=i,a=e,l=(0,n.Rr)(),c=Ds(l,"timePicker"),{time:u,modelValue:d,disabledTimesConfig:p,updateTime:h,validateTime:f}=Da(a,r);return t({getSidebarProps:()=>({modelValue:d,time:u,updateTime:h})}),(e,t)=>((0,n.wg)(),(0,n.j4)(Xs,{"multi-calendars":0,stretch:""},{default:(0,n.w5)((()=>[(0,n.Wm)(Oa,(0,n.dG)(e.$props,{hours:(0,o.SU)(u).hours,minutes:(0,o.SU)(u).minutes,seconds:(0,o.SU)(u).seconds,"internal-model-value":e.internalModelValue,"disabled-times-config":(0,o.SU)(p),"validate-time":(0,o.SU)(f),"onUpdate:hours":t[0]||(t[0]=e=>(0,o.SU)(h)(e)),"onUpdate:minutes":t[1]||(t[1]=e=>(0,o.SU)(h)(e,!1)),"onUpdate:seconds":t[2]||(t[2]=e=>(0,o.SU)(h)(e,!1,!0)),onAmPmChange:t[3]||(t[3]=t=>e.$emit("am-pm-change",t))}),(0,n.Nv)({_:2},[(0,n.Ko)((0,o.SU)(c),((t,i)=>({name:t,fn:(0,n.w5)((i=>[(0,n.WI)(e.$slots,t,(0,s.vs)((0,n.F4)(i)))]))})))]),1040,["hours","minutes","seconds","internal-model-value","disabled-times-config","validate-time"])])),_:3}))}}),Aa={class:"dp__month_year_row"},_a=["aria-label","onClick","onKeydown"],Pa=(0,n.aZ)({compatConfig:{MODE:3},__name:"DpHeader",props:{month:{type:Number,default:0},year:{type:Number,default:0},instance:{type:Number,default:0},years:{type:Array,default:()=>[]},months:{type:Array,default:()=>[]},...Ls},emits:["update-month-year","mount","reset-flow","overlay-closed"],setup(e,{expose:t,emit:i}){const a=i,l=e,{defaultedTransitions:c,defaultedAriaLabels:u,defaultedMultiCalendars:d,defaultedFilters:p,defaultedConfig:h,defaultedHighlight:f}=gs(l),{transitionName:g,showTransition:v}=Rs(c),{buildMatrix:y}=ts(),{handleMonthYearChange:m,isDisabled:C,updateMonthYear:b}=ys(l,a),{showLeftIcon:w,showRightIcon:S}=Ms(),E=(0,o.iH)(!1),x=(0,o.iH)(!1),O=(0,o.iH)([null,null,null,null]);(0,n.bv)((()=>{a("mount")}));const T=e=>({get:()=>l[e],set:t=>{const i=e===Cs.month?Cs.year:Cs.month;a("update-month-year",{[e]:t,[i]:l[i]}),e===Cs.month?N(!0):L(!0)}}),D=(0,n.Fl)(T(Cs.month)),R=(0,n.Fl)(T(Cs.year)),A=(0,n.Fl)((()=>e=>({month:l.month,year:l.year,items:e===Cs.month?l.months:l.years,instance:l.instance,updateMonthYear:b,toggle:e===Cs.month?N:L}))),_=(0,n.Fl)((()=>{const e=l.months.find((e=>e.value===l.month));return e||{text:"",value:0}})),P=(0,n.Fl)((()=>er(l.months,(e=>{const t=l.month===e.value,i=Qo(e.value,mr(l.year,l.minDate),Cr(l.year,l.maxDate))||p.value.months.includes(e.value),n=Wr(f.value,e.value,l.year);return{active:t,disabled:i,highlighted:n}})))),M=(0,n.Fl)((()=>er(l.years,(e=>{const t=l.year===e.value,i=Qo(e.value,br(l.minDate),br(l.maxDate))||p.value.years.includes(e.value),n=Ur(f.value,e.value);return{active:t,disabled:i,highlighted:n}})))),k=(e,t)=>{e.value=void 0!==t?t:!e.value,e.value||a("overlay-closed")},N=(e=!1,t)=>{I(e),k(E,t)},L=(e=!1,t)=>{I(e),k(x,t)},I=e=>{e||a("reset-flow")},F=(e,t)=>{l.arrowNavigation&&(O.value[t]=Uo(e),y(O.value,"monthYear"))},G=(0,n.Fl)((()=>{var e,t;return[{type:Cs.month,index:1,toggle:N,modelValue:D.value,updateModelValue:e=>D.value=e,text:_.value.text,showSelectionGrid:E.value,items:P.value,ariaLabel:null==(e=u.value)?void 0:e.openMonthsOverlay},{type:Cs.year,index:2,toggle:L,modelValue:R.value,updateModelValue:e=>R.value=e,text:l.year,showSelectionGrid:x.value,items:M.value,ariaLabel:null==(t=u.value)?void 0:t.openYearsOverlay}]})),V=(0,n.Fl)((()=>l.disableYearSelect?[G.value[0]]:l.yearFirst?[...G.value].reverse():G.value));return t({toggleMonthPicker:N,toggleYearPicker:L,handleMonthYearChange:m}),(t,i)=>{var a,c,p;return(0,n.wg)(),(0,n.iD)("div",Aa,[t.$slots["month-year"]?(0,n.WI)(t.$slots,"month-year",(0,s.vs)((0,n.dG)({key:0},{month:e.month,year:e.year,months:e.months,years:e.years,updateMonthYear:(0,o.SU)(b),handleMonthYearChange:(0,o.SU)(m),instance:e.instance}))):((0,n.wg)(),(0,n.iD)(n.HY,{key:1},[(0,o.SU)(w)((0,o.SU)(d),e.instance)&&!t.vertical?((0,n.wg)(),(0,n.j4)(Zs,{key:0,"aria-label":null==(a=(0,o.SU)(u))?void 0:a.prevMonth,disabled:(0,o.SU)(C)(!1),onActivate:i[0]||(i[0]=e=>(0,o.SU)(m)(!1,!0)),onSetRef:i[1]||(i[1]=e=>F(e,0))},{default:(0,n.w5)((()=>[t.$slots["arrow-left"]?(0,n.WI)(t.$slots,"arrow-left",{key:0}):(0,n.kq)("",!0),t.$slots["arrow-left"]?(0,n.kq)("",!0):((0,n.wg)(),(0,n.j4)((0,o.SU)(Ln),{key:1}))])),_:3},8,["aria-label","disabled"])):(0,n.kq)("",!0),(0,n._)("div",{class:(0,s.C_)(["dp__month_year_wrap",{dp__year_disable_select:t.disableYearSelect}])},[((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(V.value,((e,i)=>((0,n.wg)(),(0,n.iD)(n.HY,{key:e.type},[(0,n._)("button",{ref_for:!0,ref:e=>F(e,i+1),type:"button",class:"dp__btn dp__month_year_select",tabindex:"0","aria-label":e.ariaLabel,onClick:e.toggle,onKeydown:[(0,r.D2)((0,r.iM)(e.toggle,["prevent"]),["enter"]),(0,r.D2)((0,r.iM)(e.toggle,["prevent"]),["space"])]},[t.$slots[e.type]?(0,n.WI)(t.$slots,e.type,{key:0,text:e.text,value:l[e.type]}):(0,n.kq)("",!0),t.$slots[e.type]?(0,n.kq)("",!0):((0,n.wg)(),(0,n.iD)(n.HY,{key:1},[(0,n.Uk)((0,s.zw)(e.text),1)],64))],40,_a),(0,n.Wm)(r.uT,{name:(0,o.SU)(g)(e.showSelectionGrid),css:(0,o.SU)(v)},{default:(0,n.w5)((()=>[e.showSelectionGrid?((0,n.wg)(),(0,n.j4)(qs,{key:0,items:e.items,"arrow-navigation":t.arrowNavigation,"hide-navigation":t.hideNavigation,"is-last":t.autoApply&&!(0,o.SU)(h).keepActionRow,"skip-button-ref":!1,config:t.config,type:e.type,"header-refs":[],"esc-close":t.escClose,"text-input"
25:t.textInput,onSelected:e.updateModelValue,onToggle:e.toggle},(0,n.Nv)({"button-icon":(0,n.w5)((()=>[t.$slots["calendar-icon"]?(0,n.WI)(t.$slots,"calendar-icon",{key:0}):(0,n.kq)("",!0),t.$slots["calendar-icon"]?(0,n.kq)("",!0):((0,n.wg)(),(0,n.j4)((0,o.SU)(kn),{key:1}))])),_:2},[t.$slots[`${e.type}-overlay-value`]?{name:"item",fn:(0,n.w5)((({item:i})=>[(0,n.WI)(t.$slots,`${e.type}-overlay-value`,{text:i.text,value:i.value})])),key:"0"}:void 0,t.$slots[`${e.type}-overlay`]?{name:"overlay",fn:(0,n.w5)((()=>[(0,n.WI)(t.$slots,`${e.type}-overlay`,(0,s.vs)((0,n.F4)(A.value(e.type))))])),key:"1"}:void 0,t.$slots[`${e.type}-overlay-header`]?{name:"header",fn:(0,n.w5)((()=>[(0,n.WI)(t.$slots,`${e.type}-overlay-header`,{toggle:e.toggle})])),key:"2"}:void 0]),1032,["items","arrow-navigation","hide-navigation","is-last","config","type","esc-close","text-input","onSelected","onToggle"])):(0,n.kq)("",!0)])),_:2},1032,["name","css"])],64)))),128))],2),(0,o.SU)(w)((0,o.SU)(d),e.instance)&&t.vertical?((0,n.wg)(),(0,n.j4)(Zs,{key:1,"aria-label":null==(c=(0,o.SU)(u))?void 0:c.prevMonth,disabled:(0,o.SU)(C)(!1),onActivate:i[2]||(i[2]=e=>(0,o.SU)(m)(!1,!0))},{default:(0,n.w5)((()=>[t.$slots["arrow-up"]?(0,n.WI)(t.$slots,"arrow-up",{key:0}):(0,n.kq)("",!0),t.$slots["arrow-up"]?(0,n.kq)("",!0):((0,n.wg)(),(0,n.j4)((0,o.SU)(Gn),{key:1}))])),_:3},8,["aria-label","disabled"])):(0,n.kq)("",!0),(0,o.SU)(S)((0,o.SU)(d),e.instance)?((0,n.wg)(),(0,n.j4)(Zs,{key:2,ref:"rightIcon",disabled:(0,o.SU)(C)(!0),"aria-label":null==(p=(0,o.SU)(u))?void 0:p.nextMonth,onActivate:i[3]||(i[3]=e=>(0,o.SU)(m)(!0,!0)),onSetRef:i[4]||(i[4]=e=>F(e,t.disableYearSelect?2:3))},{default:(0,n.w5)((()=>[t.$slots[t.vertical?"arrow-down":"arrow-right"]?(0,n.WI)(t.$slots,t.vertical?"arrow-down":"arrow-right",{key:0}):(0,n.kq)("",!0),t.$slots[t.vertical?"arrow-down":"arrow-right"]?(0,n.kq)("",!0):((0,n.wg)(),(0,n.j4)((0,n.LL)(t.vertical?(0,o.SU)(Vn):(0,o.SU)(In)),{key:1}))])),_:3},8,["disabled","aria-label"])):(0,n.kq)("",!0)],64))])}}}),Ma=["aria-label"],ka={class:"dp__calendar_header",role:"row"},Na={key:0,class:"dp__calendar_header_item",role:"gridcell"},La=(0,n._)("div",{class:"dp__calendar_header_separator"},null,-1),Ia=["aria-label"],Fa={key:0,role:"gridcell",class:"dp__calendar_item dp__week_num"},Ga={class:"dp__cell_inner"},Va=["id","aria-selected","aria-disabled","aria-label","onClick","onKeydown","onMouseenter","onMouseleave"],Ba=(0,n.aZ)({compatConfig:{MODE:3},__name:"DpCalendar",props:{mappedDates:{type:Array,default:()=>[]},instance:{type:Number,default:0},month:{type:Number,default:0},year:{type:Number,default:0},...Ls},emits:["select-date","set-hover-date","handle-scroll","mount","handle-swipe","handle-space","tooltip-open","tooltip-close"],setup(e,{expose:t,emit:i}){const a=i,l=e,{buildMultiLevelMatrix:c}=ts(),{defaultedTransitions:u,defaultedConfig:d,defaultedAriaLabels:p,defaultedMultiCalendars:h,defaultedWeekNumbers:f}=gs(l),g=(0,o.iH)(null),v=(0,o.iH)({bottom:"",left:"",transform:""}),y=(0,o.iH)([]),m=(0,o.iH)(null),C=(0,o.iH)(!0),b=(0,o.iH)(""),w=(0,o.iH)({startX:0,endX:0,startY:0,endY:0}),S=(0,o.iH)([]),E=(0,o.iH)({left:"50%"}),x=(0,n.Fl)((()=>l.calendar?l.calendar(l.mappedDates):l.mappedDates)),O=(0,n.Fl)((()=>l.dayNames?Array.isArray(l.dayNames)?l.dayNames:l.dayNames(l.locale,+l.weekStart):Bo(l.formatLocale,l.locale,+l.weekStart)));(0,n.bv)((()=>{a("mount",{cmp:"calendar",refs:y}),d.value.noSwipe||m.value&&(m.value.addEventListener("touchstart",L,{passive:!1}),m.value.addEventListener("touchend",I,{passive:!1}),m.value.addEventListener("touchmove",F,{passive:!1})),l.monthChangeOnScroll&&m.value&&m.value.addEventListener("wheel",B,{passive:!1})}));const T=e=>e?l.vertical?"vNext":"next":l.vertical?"vPrevious":"previous",D=(e,t)=>{if(l.transitions){const i=cr(Ar(ar(),l.month,l.year));b.value=hr(cr(Ar(ar(),e,t)),i)?u.value[T(!0)]:u.value[T(!1)],C.value=!1,(0,n.Y3)((()=>{C.value=!0}))}},R=(0,n.Fl)((()=>({[l.calendarClassName]:!!l.calendarClassName}))),A=(0,n.Fl)((()=>e=>{const t=zo(e);return{dp__marker_dot:"dot"===t.type,dp__marker_line:"line"===t.type}})),_=(0,n.Fl)((()=>e=>pr(e,g.value))),P=(0,n.Fl)((()=>({dp__calendar:!0,dp__calendar_next:h.value.count>0&&0!==l.instance}))),M=(0,n.Fl)((()=>e=>!l.hideOffsetDates||e.current)),k=async(e,t,i)=>{var o,r;if(a("set-hover-date",e),null!=(r=null==(o=e.marker)?void 0:o.tooltip)&&r.length){const o=Uo(y.value[t][i]);if(o){const{width:t,height:i}=o.getBoundingClientRect();g.value=e.value;let r={left:t/2+"px"},s=-50;if(await(0,n.Y3)(),S.value[0]){const{left:e,width:i}=S.value[0].getBoundingClientRect();e<0&&(r={left:"0"},s=0,E.value.left=t/2+"px"),window.innerWidth<e+i&&(r={right:"0"},s=0,E.value.left=i-t/2+"px")}v.value={bottom:`${i}px`,...r,transform:`translateX(${s}%)`},a("tooltip-open",e.marker)}}},N=e=>{g.value&&(g.value=null,v.value=JSON.parse(JSON.stringify({bottom:"",left:"",transform:""})),a("tooltip-close",e.marker))},L=e=>{w.value.startX=e.changedTouches[0].screenX,w.value.startY=e.changedTouches[0].screenY},I=e=>{w.value.endX=e.changedTouches[0].screenX,w.value.endY=e.changedTouches[0].screenY,G()},F=e=>{l.vertical&&!l.inline&&e.preventDefault()},G=()=>{const e=l.vertical?"Y":"X";Math.abs(w.value[`start${e}`]-w.value[`end${e}`])>10&&a("handle-swipe",w.value[`start${e}`]>w.value[`end${e}`]?"right":"left")},V=(e,t,i)=>{e&&(Array.isArray(y.value[t])?y.value[t][i]=e:y.value[t]=[e]),l.arrowNavigation&&c(y.value,"calendar")},B=e=>
25{l.monthChangeOnScroll&&(e.preventDefault(),a("handle-scroll",e))},j=e=>"local"===f.value.type?Cn(e.value,{weekStartsOn:+l.weekStart}):"iso"===f.value.type?xn(e.value):"function"==typeof f.value.type?f.value.type(e.value):"",H=e=>{const t=e[0];return f.value.hideOnOffsetDates?e.some((e=>e.current))?j(t):"":j(t)},W=(e,t)=>{tr(e,d.value),a("select-date",t)},U=e=>{tr(e,d.value)};return t({triggerTransition:D}),(e,t)=>{var i;return(0,n.wg)(),(0,n.iD)("div",{class:(0,s.C_)(P.value)},[(0,n._)("div",{ref_key:"calendarWrapRef",ref:m,role:"grid",class:(0,s.C_)(R.value),"aria-label":null==(i=(0,o.SU)(p))?void 0:i.calendarWrap},[((0,n.wg)(),(0,n.iD)(n.HY,{key:0},[(0,n._)("div",ka,[e.weekNumbers?((0,n.wg)(),(0,n.iD)("div",Na,(0,s.zw)(e.weekNumName),1)):(0,n.kq)("",!0),((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(O.value,((t,i)=>((0,n.wg)(),(0,n.iD)("div",{key:i,class:"dp__calendar_header_item",role:"gridcell"},[e.$slots["calendar-header"]?(0,n.WI)(e.$slots,"calendar-header",{key:0,day:t,index:i}):(0,n.kq)("",!0),e.$slots["calendar-header"]?(0,n.kq)("",!0):((0,n.wg)(),(0,n.iD)(n.HY,{key:1},[(0,n.Uk)((0,s.zw)(t),1)],64))])))),128))]),La,(0,n.Wm)(r.uT,{name:b.value,css:!!e.transitions},{default:(0,n.w5)((()=>{var t;return[C.value?((0,n.wg)(),(0,n.iD)("div",{key:0,class:"dp__calendar",role:"rowgroup","aria-label":(null==(t=(0,o.SU)(p))?void 0:t.calendarDays)||void 0},[((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(x.value,((t,i)=>((0,n.wg)(),(0,n.iD)("div",{key:i,class:"dp__calendar_row",role:"row"},[e.weekNumbers?((0,n.wg)(),(0,n.iD)("div",Fa,[(0,n._)("div",Ga,(0,s.zw)(H(t.days)),1)])):(0,n.kq)("",!0),((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(t.days,((t,a)=>{var l,c,u;return(0,n.wg)(),(0,n.iD)("div",{id:t.value.toISOString().split("T")[0],ref_for:!0,ref:e=>V(e,i,a),key:a+i,role:"gridcell",class:"dp__calendar_item","aria-selected":t.classData.dp__active_date||t.classData.dp__range_start||t.classData.dp__range_start,"aria-disabled":t.classData.dp__cell_disabled||void 0,"aria-label":null==(c=null==(l=(0,o.SU)(p))?void 0:l.day)?void 0:c.call(l,t),tabindex:"0",onClick:(0,r.iM)((e=>W(e,t)),["prevent"]),onKeydown:[(0,r.D2)((i=>e.$emit("select-date",t)),["enter"]),(0,r.D2)((i=>e.$emit("handle-space",t)),["space"])],onMouseenter:e=>k(t,i,a),onMouseleave:e=>N(t)},[(0,n._)("div",{class:(0,s.C_)(["dp__cell_inner",t.classData])},[e.$slots.day&&M.value(t)?(0,n.WI)(e.$slots,"day",{key:0,day:+t.text,date:t.value}):(0,n.kq)("",!0),e.$slots.day?(0,n.kq)("",!0):((0,n.wg)(),(0,n.iD)(n.HY,{key:1},[(0,n.Uk)((0,s.zw)(t.text),1)],64)),t.marker&&M.value(t)?((0,n.wg)(),(0,n.iD)(n.HY,{key:2},[e.$slots.marker?(0,n.WI)(e.$slots,"marker",{key:0,marker:t.marker,day:+t.text,date:t.value}):((0,n.wg)(),(0,n.iD)("div",{key:1,class:(0,s.C_)(A.value(t.marker)),style:(0,s.j5)(t.marker.color?{backgroundColor:t.marker.color}:{})},null,6))],64)):(0,n.kq)("",!0),_.value(t.value)?((0,n.wg)(),(0,n.iD)("div",{key:3,ref_for:!0,ref_key:"activeTooltip",ref:S,class:"dp__marker_tooltip",style:(0,s.j5)(v.value)},[null!=(u=t.marker)&&u.tooltip?((0,n.wg)(),(0,n.iD)("div",{key:0,class:"dp__tooltip_content",onClick:U},[((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(t.marker.tooltip,((i,o)=>((0,n.wg)(),(0,n.iD)("div",{key:o,class:"dp__tooltip_text"},[e.$slots["marker-tooltip"]?(0,n.WI)(e.$slots,"marker-tooltip",{key:0,tooltip:i,day:t.value}):(0,n.kq)("",!0),e.$slots["marker-tooltip"]?(0,n.kq)("",!0):((0,n.wg)(),(0,n.iD)(n.HY,{key:1},[(0,n._)("div",{class:"dp__tooltip_mark",style:(0,s.j5)(i.color?{backgroundColor:i.color}:{})},null,4),(0,n._)("div",null,(0,s.zw)(i.text),1)],64))])))),128)),(0,n._)("div",{class:"dp__arrow_bottom_tp",style:(0,s.j5)(E.value)},null,4)])):(0,n.kq)("",!0)],4)):(0,n.kq)("",!0)],2)],40,Va)})),128))])))),128))],8,Ia)):(0,n.kq)("",!0)]})),_:3},8,["name","css"])],64))],10,Ma)],2)}}}),ja=e=>Array.isArray(e),Ha=(e,t,i,r)=>{const s=(0,o.iH)([]),{modelValue:a,calendars:l,time:c}=As(e,t),{defaultedMultiCalendars:u,defaultedStartTime:d}=gs(e),{validateMonthYearInRange:p,isDisabled:h,isDateRangeAllowed:f,checkMinMaxRange:g}=Ps(e),{updateTimeValues:v,getSetDateTime:y,setTime:m,assignStartTime:C,validateTime:b,disabledTimesConfig:w}=Ta(e,c,a,r),S=(0,n.Fl)((()=>e=>l.value[e]?l.value[e].month:0)),E=(0,n.Fl)((()=>e=>l.value[e]?l.value[e].year:0)),x=(e,t,i)=>{var n,o;l.value[e]||(l.value[e]={month:0,year:0}),l.value[e].month=$o(t)?null==(n=l.value[e])?void 0:n.month:t,l.value[e].year=$o(i)?null==(o=l.value[e])?void 0:o.year:i},O=()=>{e.autoApply&&t("select-date")};(0,n.YP)(a,((e,t)=>{JSON.stringify(e)!==JSON.stringify(t)&&R()})),(0,n.bv)((()=>{e.shadow||(a.value||(G(),d.value&&C(d.value)),R(!0),e.focusStartDate&&e.startDate&&G())}));const T=(0,n.Fl)((()=>{var t;return!(null!=(t=e.flow)&&t.length&&!e.partialFlow)||e.flowStep===e.flow.length})),D=()=>{e.autoApply&&T.value&&t("auto-apply",e.partialFlow)},R=(t=!1)=>a.value?Array.isArray(a.value)?(s.value=a.value,N(t)):_(a.value,t):u.value.count&&t&&!e.startDate?A(ar(
25),t):void 0,A=(e,t=!1)=>{if((!u.value.count||!u.value.static||t)&&x(0,Mi(e),Pi(e)),u.value.count&&!u.value.solo)for(let i=1;i<u.value.count;i++){const e=bi(ar(),{month:S.value(i-1),year:E.value(i-1)}),t=hn(e,{months:1});l.value[i]={month:Mi(t),year:Pi(t)}}},_=(e,t)=>{A(e),m("hours",Ri(e)),m("minutes",Ai(e)),m("seconds",_i(e)),u.value.count&&t&&F()},P=e=>{if(u.value.count){if(u.value.solo)return 0;const t=Mi(e[0]),i=Mi(e[1]);return Math.abs(i-t)<u.value.count?0:1}return 1},M=(t,i)=>{t[1]&&e.showLastInRange?A(t[P(t)],i):A(t[0],i);const n=(e,i)=>[e(t[0]),t[1]?e(t[1]):c[i][1]];m("hours",n(Ri,"hours")),m("minutes",n(Ai,"minutes")),m("seconds",n(_i,"seconds"))},k=(t,i)=>{if((e.range||e.weekPicker)&&!e.multiDates)return M(t,i);if(e.multiDates&&i){const e=t[t.length-1];return _(e,i)}},N=e=>{const t=a.value;k(t,e),u.value.count&&u.value.solo&&F()},L=(n,o)=>{const r=bi(ar(),{month:S.value(o),year:E.value(o)}),s=n<0?en(r,1):rn(r,1);p(Mi(s),Pi(s),n<0,e.preventMinMaxNavigation)&&(x(o,Mi(s),Pi(s)),t("update-month-year",{instance:o,month:Mi(s),year:Pi(s)}),u.value.count&&!u.value.solo&&I(o),i())},I=e=>{for(let t=e-1;t>=0;t--){const e=rn(bi(ar(),{month:S.value(t+1),year:E.value(t+1)}),1);x(t,Mi(e),Pi(e))}for(let t=e+1;t<=u.value.count-1;t++){const e=en(bi(ar(),{month:S.value(t-1),year:E.value(t-1)}),1);x(t,Mi(e),Pi(e))}},F=()=>{if(Array.isArray(a.value)&&2===a.value.length){const e=ar(ar(a.value[1]?a.value[1]:en(a.value[0],1))),[t,i]=[Mi(a.value[0]),Pi(a.value[0])],[n,o]=[Mi(a.value[1]),Pi(a.value[1])];(t!==n||t===n&&i!==o)&&u.value.solo&&x(1,Mi(e),Pi(e))}else a.value&&!Array.isArray(a.value)&&(x(0,Mi(a.value),Pi(a.value)),A(ar()))},G=()=>{e.startDate&&(x(0,Mi(ar(e.startDate)),Pi(ar(e.startDate))),u.value.count&&I(0))},V=or(((t,i)=>{e.monthChangeOnScroll&&L("inverse"!==e.monthChangeOnScroll?-t.deltaY:t.deltaY,i)}),50),B=(t,i,n=!1)=>{e.monthChangeOnArrows&&e.vertical===n&&j(t,i)},j=(e,t)=>{L("right"===e?-1:1,t)},H=t=>e.markers.find((i=>pr(Er(t.value),wr(ar(i.date),e.timezone)))),W=(t,i)=>{switch(!0===e.sixWeeks?"append":e.sixWeeks){case"prepend":return[!0,!1];case"center":return[0==t,!0];case"fair":return[0==t||i>t,!0];case"append":return[!1,!1];default:return[!1,!1]}},U=(t,i,n,o)=>{if(e.sixWeeks&&t.length<6){const e=6-t.length,r=(i.getDay()+7-o)%7,s=6-(n.getDay()+7-o)%7,[a,l]=W(r,s);for(let n=1;n<=e;n++)if(l?!!(n%2)==a:a){const e=t[0].days[0],n=z(ln(e.value,-7),Mi(i));t.unshift({days:n})}else{const e=t[t.length-1],n=e.days[e.days.length-1],o=z(ln(n.value,1),Mi(i));t.push({days:o})}}return t},z=(t,i)=>{const n=ar(t),o=[];for(let r=0;r<7;r++){const t=ln(n,r),s=Mi(t)!==i;o.push({text:e.hideOffsetDates&&s?"":t.getDate(),value:t,current:!s,classData:{}})}return o},K=(t,i)=>{const n=[],o=new Date(i,t),r=new Date(i,t+1,0),s=e.weekStart,a=tn(o,{weekStartsOn:s}),l=e=>{const i=z(e,t);if(n.push({days:i}),!n[n.length-1].days.some((e=>pr(cr(e.value),cr(r))))){const t=ln(e,7);l(t)}};return l(a),U(n,o,r,s)},Y=i=>(a.value=Tr(ar(i.value),e.timezone,e.weekStart),t("date-update",i.value),D()),q=i=>{const o=ur(ar(i.value),c.hours,c.minutes,ie());t("date-update",o),e.multiDates?ta(o,a,e.multiDatesLimit):a.value=o,r(),(0,n.Y3)().then((()=>{D()}))},X=t=>!!e.noDisabledRange&&xr(s.value[0],t).some((e=>h(e))),$=()=>{s.value=a.value?a.value.slice():[],2===s.value.length&&!e.fixedStart&&!e.fixedEnd&&(s.value=[])},Z=(i,n)=>{const o=[ar(i.value),ln(ar(i.value),+e.autoRange)];f(o)?(n&&J(i.value),s.value=o):t("invalid-date",i.value)},J=e=>{const t=Mi(ar(e)),i=Pi(ar(e));if(x(0,t,i),u.value.count>0)for(let n=1;n<u.value.count;n++){const t=Or(bi(ar(e),{year:S.value(n-1),month:E.value(n-1)}));x(n,t.month,t.year)}},Q=i=>Array.isArray(a.value)&&2===a.value.length?e.fixedStart&&(hr(i,a.value[0])||pr(i,a.value[0]))?[a.value[0],i]:e.fixedEnd&&(dr(i,a.value[1])||pr(i,a.value[1]))?[i,a.value[1]]:(t("invalid-fixed-range",i),a.value):[],ee=i=>{if(X(i.value)||!g(i.value,a.value,e.fixedStart?0:1))return t("invalid-date",i.value);s.value=Q(ar(i.value))},te=(i,n)=>($(),e.autoRange?Z(i,n):e.fixedStart||e.fixedEnd?ee(i):void(s.value[0]?g(ar(i.value),a.value)&&!X(i.value)?dr(ar(i.value),ar(s.value[0]))?(s.value.unshift(ar(i.value)),t("range-end",s.value[0])):(s.value[1]=ar(i.value),t("range-end",s.value[1])):(e.autoApply&&t("auto-apply-invalid",i.value),t("invalid-date",i.value)):(s.value[0]=ar(i.value),t("range-start",s.value[0])))),ie=(t=!0)=>e.enableSeconds?Array.isArray(c.seconds)?t?c.seconds[0]:c.seconds[1]:c.seconds:0,ne=e=>{s.value[e]=ur(s.value[e],c.hours[e],c.minutes[e],ie(1!==e))},oe=()=>{var e,i;s.value[0]&&s.value[1]&&+(null==(e=s.value)?void 0:e[0])>+(null==(i=s.value)?void 0:i[1])&&(s.value.reverse(),t("range-start",s.value[0]),t("range-end",s.value[1]))},re=()=>{s.value.length&&(s.value[0]&&!s.value[1]?ne(0):(ne(0),ne(1),r()),oe(),a.value=s.value.slice(),na(s.value,t,e.autoApply,e.modelAuto))},se=(i,n=!1)=>h(i.value)||!i.current&&e.hideOffsetDates?t("invalid-date",i.value):e.weekPicker?Y(i):e.range?void(ja(c.hours)&&ja(c.minutes)&&!e.multiDates&&(te(i,n),re())):q(i),ae=(n,o)=>{var s;x(n,o.month,o.year),u.value.count&&!u.value.solo&&I(n),t("update-month-year",{instance:n,month:o.month,year:o.year}),i(u.value.solo?n:void 0);const a=null!=(s=e.flow)&&s.length?e.flow[e.flowStep]:void 0;!o.fromNav&&(a===Ss.month||a===Ss.year)&&r()},le=(t,i)=>{oa({value:t,modelValue:a,range:e.range,timezone:i?void 0:e.timezone}),O(),e.multiCalendars&&(0,n.Y3)().then((()=>R(!0)))},ce=()=>{e.range?a.value&&Array.isArray(a.value)&&a.value[0]?a.value=dr(ar(
25),a.value[0])?[ar(),a.value[0]]:[a.value[0],ar()]:a.value=[ar()]:a.value=ar(),O()},ue=()=>{if(Array.isArray(a.value))if(e.multiDates){const e=de();a.value[a.value.length-1]=y(e)}else a.value=a.value.map(((e,t)=>e&&y(e,t)));else a.value=y(a.value);t("time-update")},de=()=>Array.isArray(a.value)&&a.value.length?a.value[a.value.length-1]:null;return{calendars:l,modelValue:a,month:S,year:E,time:c,disabledTimesConfig:w,validateTime:b,getCalendarDays:K,getMarker:H,handleScroll:V,handleSwipe:j,handleArrow:B,selectDate:se,updateMonthYear:ae,presetDate:le,selectCurrentDate:ce,updateTime:(e,t=!0,i=!1)=>{v(e,t,i,ue)}}},Wa={key:0},Ua=(0,n.aZ)({__name:"DatePicker",props:{...Ls},emits:["tooltip-open","tooltip-close","mount","update:internal-model-value","update-flow-step","reset-flow","auto-apply","focus-menu","select-date","range-start","range-end","invalid-fixed-range","time-update","am-pm-change","time-picker-open","time-picker-close","recalculate-position","update-month-year","auto-apply-invalid","date-update","invalid-date"],setup(e,{expose:t,emit:i}){const r=i,a=e,{calendars:l,month:c,year:u,modelValue:d,time:p,disabledTimesConfig:h,validateTime:f,getCalendarDays:g,getMarker:v,handleArrow:y,handleScroll:m,handleSwipe:C,selectDate:b,updateMonthYear:w,presetDate:S,selectCurrentDate:E,updateTime:x}=Ha(a,r,G,V),O=(0,n.Rr)(),{setHoverDate:T,getDayClassData:D,clearHoverDate:R}=_s(d,a),{defaultedMultiCalendars:A}=gs(a),_=(0,o.iH)([]),P=(0,o.iH)([]),M=(0,o.iH)(null),k=Ds(O,"calendar"),N=Ds(O,"monthYear"),L=Ds(O,"timePicker"),I=e=>{a.shadow||r("mount",e)}
25;(0,n.YP)(l,(()=>{a.shadow||setTimeout((()=>{r("recalculate-position")}),0)}),{deep:!0});const F=(0,n.Fl)((()=>e=>g(c.value(e),u.value(e)).map((e=>({...e,days:e.days.map((e=>(e.marker=v(e),e.classData=D(e),e)))})))));function G(e){var t;e||0===e?null==(t=P.value[e])||t.triggerTransition(c.value(e),u.value(e)):P.value.forEach(((e,t)=>e.triggerTransition(c.value(t),u.value(t))))}function V(){r("update-flow-step")}const B=(e,t=!1)=>{b(e,t),a.spaceConfirm&&r("select-date")};return t({clearHoverDate:R,presetDate:S,selectCurrentDate:E,toggleMonthPicker:(e,t,i=0)=>{var n;null==(n=_.value[i])||n.toggleMonthPicker(e,t)},toggleYearPicker:(e,t,i=0)=>{var n;null==(n=_.value[i])||n.toggleYearPicker(e,t)},toggleTimePicker:(e,t,i)=>{var n;null==(n=M.value)||n.toggleTimePicker(e,t,i)},handleArrow:y,updateMonthYear:w,getSidebarProps:()=>({modelValue:d,month:c,year:u,time:p,updateTime:x,updateMonthYear:w,selectDate:b,presetDate:S})}),(e,t)=>((0,n.wg)(),(0,n.iD)(n.HY,null,[(0,n.Wm)(Xs,{"multi-calendars":(0,o.SU)(A).count},{default:(0,n.w5)((({instance:i,index:r})=>[e.disableMonthYearSelect?(0,n.kq)("",!0):((0,n.wg)(),(0,n.j4)(Pa,(0,n.dG)({key:0,ref:e=>{e&&(_.value[r]=e)},months:(0,o.SU)(Ho)(e.formatLocale,e.locale,e.monthNameFormat),years:(0,o.SU)(jo)(e.yearRange,e.reverseYears),month:(0,o.SU)(c)(i),year:(0,o.SU)(u)(i),instance:i},e.$props,{onMount:t[0]||(t[0]=e=>I((0,o.SU)(ws).header)),onResetFlow:t[1]||(t[1]=t=>e.$emit("reset-flow")),onUpdateMonthYear:e=>(0,o.SU)(w)(i,e),onOverlayClosed:t[2]||(t[2]=t=>e.$emit("focus-menu"))}),(0,n.Nv)({_:2},[(0,n.Ko)((0,o.SU)(N),((t,i)=>({name:t,fn:(0,n.w5)((i=>[(0,n.WI)(e.$slots,t,(0,s.vs)((0,n.F4)(i)))]))})))]),1040,["months","years","month","year","instance","onUpdateMonthYear"])),(0,n.Wm)(Ba,(0,n.dG)({ref:e=>{e&&(P.value[r]=e)},"mapped-dates":F.value(i),month:(0,o.SU)(c)(i),year:(0,o.SU)(u)(i),instance:i},e.$props,{onSelectDate:e=>(0,o.SU)(b)(e,1!==i),onHandleSpace:e=>B(e,1!==i),onSetHoverDate:t[3]||(t[3]=e=>(0,o.SU)(T)(e)),onHandleScroll:e=>(0,o.SU)(m)(e,i),onHandleSwipe:e=>(0,o.SU)(C)(e,i),onMount:t[4]||(t[4]=e=>I((0,o.SU)(ws).calendar)),onResetFlow:t[5]||(t[5]=t=>e.$emit("reset-flow")),onTooltipOpen:t[6]||(t[6]=t=>e.$emit("tooltip-open",t)),onTooltipClose:t[7]||(t[7]=t=>e.$emit("tooltip-close",t))}),(0,n.Nv)({_:2},[(0,n.Ko)((0,o.SU)(k),((t,i)=>({name:t,fn:(0,n.w5)((i=>[(0,n.WI)(e.$slots,t,(0,s.vs)((0,n.F4)({...i})))]))})))]),1040,["mapped-dates","month","year","instance","onSelectDate","onHandleSpace","onHandleScroll","onHandleSwipe"])])),_:3},8,["multi-calendars"]),e.enableTimePicker?((0,n.wg)(),(0,n.iD)("div",Wa,[e.$slots["time-picker"]?(0,n.WI)(e.$slots,"time-picker",(0,s.vs)((0,n.dG)({key:0},{time:(0,o.SU)(p),updateTime:(0,o.SU)(x)}))):((0,n.wg)(),(0,n.j4)(Oa,(0,n.dG)({key:1,ref_key:"timePickerRef",ref:M},e.$props,{hours:(0,o.SU)(p).hours,minutes:(0,o.SU)(p).minutes,seconds:(0,o.SU)(p).seconds,"internal-model-value":e.internalModelValue,"disabled-times-config":(0,o.SU)(h),"validate-time":(0,o.SU)(f),onMount:t[8]||(t[8]=e=>I((0,o.SU)(ws).timePicker)),"onUpdate:hours":t[9]||(t[9]=e=>(0,o.SU)(x)(e)),"onUpdate:minutes":t[10]||(t[10]=e=>(0,o.SU)(x)(e,!1)),"onUpdate:seconds":t[11]||(t[11]=e=>(0,o.SU)(x)(e,!1,!0)),onResetFlow:t[12]||(t[12]=t=>e.$emit("reset-flow")),onOverlayClosed:t[13]||(t[13]=t=>e.$emit("time-picker-close")),onOverlayOpened:t[14]||(t[14]=t=>e.$emit("time-picker-open",t)),onAmPmChange:t[15]||(t[15]=t=>e.$emit("am-pm-change",t))}),(0,n.Nv)({_:2},[(0,n.Ko)((0,o.SU)(L),((t,i)=>({name:t,fn:(0,n.w5)((i=>[(0,n.WI)(e.$slots,t,(0,s.vs)((0,n.F4)(i)))]))})))]),1040,["hours","minutes","seconds","internal-model-value","disabled-times-config","validate-time"]))])):(0,n.kq)("",!0)],64))}}),za=(e,t)=>{const i=(0,o.iH)(),{defaultedMultiCalendars:r,defaultedConfig:s,defaultedHighlight:a}=gs(e),{modelValue:l,year:c,month:u,calendars:d}=As(e,t),{isDisabled:p}=Ps(e),{selectYear:h,groupedYears:f,showYearPicker:g,isDisabled:v,toggleYearPicker:y,handleYearSelect:m,handleYear:C}=ra({modelValue:l,multiCalendars:r,highlight:a,calendars:d,month:u,year:c,props:e,emit:t}),b=(t,i)=>[t,i].map((t=>We(t,"MMMM",{locale:e.formatLocale}))).join("-"),w=(0,n.Fl)((()=>e=>!!l.value&&(Array.isArray(l.value)?l.value.some((t=>Tn(e,t))):Tn(l.value,e)))),S=t=>{if(e.range){if(Array.isArray(l.value)){const e=pr(t,l.value[0])||pr(t,l.value[1]);return fr(l.value,i.value,t)&&!e}return!1}return!1},E=(0,n.Fl)((()=>e=>{const t=bi(new Date,{year:c.value(e)});return Rn({start:An(t),end:_n(t)}).map((e=>{const t=On(e),i=Pn(e),n=p(e),o=S(t),r="function"==typeof a.value?a.value({quarter:Mn(t),year:Pi(t)}):!!a.value.quarters.find((e=>e.quarter===Mn(t)&&e.year===Pi(t)));return{text:b(t,i),value:t,active:w.value(t),highlighted:r,disabled:n,isBetween:o}}))})),x=i=>{ta(i,l,e.multiDatesLimit),t("auto-apply",!0)},O=i=>{const n=ia(l,i,t);na(n,t,e.autoApply,e.modelAuto)},T=e=>{l.value=e,t("auto-apply")};return{defaultedConfig:s,defaultedMultiCalendars:r,groupedYears:f,year:c,isDisabled:v,quarters:E,showYearPicker:g,modelValue:l,setHoverDate:e=>{i.value=e},selectYear:h,selectQuarter:(t,i,n)=>{if(!n)return d.value[i].month=Mi(Pn(t)),e.multiDates?x(t):e.range?O(t):T(t)},toggleYearPicker:y,handleYearSelect:m,handleYear:C}},Ka={class:"dp--quarter-items"},Ya=["disabled","onClick","onMouseover"],qa=(0,n.aZ)({compatConfig:{MODE:3},__name:"QuarterPicker",props:{...Ls},emits:["update:internal-model-value","reset-flow","overlay-closed","auto-apply","range-start","range-end"],setup(e,{expose:t,emit:i}){const r=i,a=e,l=(0,n.Rr)(),c=Ds(l,"yearMode"),{defaultedMultiCalendars:u,defaultedConfig:d,groupedYears:p,year:h,isDisabled:f,quarters:g,modelValue:v,showYearPicker:y,setHoverDate:m,selectQuarter:C,toggleYearPicker:b,handleYearSelect:w,handleYear:S}=za(a,r);return t({getSidebarProps:()=>({modelValue:v,year:h,selectQuarter:C,handleYearSelect:w,handleYear:S})}),(e,t)=>((0,n.wg)(),(0,n.j4)(Xs,{"multi-calendars":(0,o.SU)(u).count,stretch:""},{default:(0,n.w5)((({instance:t})=>[(0,n._)("div",{class:"dp-quarter-picker-wrap",style:(0,s.j5)({minHeight:`${(0,o.SU)(d).modeHeight}px`})},[(0,n._)("div",null,[(0,n.Wm)(ea,(0,n.dG)(e.$props,{items:(0,o.SU)(p)(t),instance:t,"show-year-picker":(0,o.SU)(y)[t],year:(0,o.SU)(h)(t),"is-disabled":e=>(0,o.SU)(f)(t,e),onHandleYear:e=>(0,o.SU)(S)(t,e),onYearSelect:e=>(0,o.SU)(w)(e,t),onToggleYearPicker:e=>(0,o.SU)(b)(t,null==e?void 0:e.flow,null==e?void 0:e.show)}),(0,n.Nv)({_:2},[(0,n.Ko)((0,o.SU)(c),((t,i)=>({name:t,fn:(0,n.w5)((i=>[(0,n.WI)(e.$slots,t,(0,s.vs)((0,n.F4)(i)))]))})))]),1040,["items","instance","show-year-picker","year","is-disabled","onHandleYear","onYearSelect","onToggleYearPicker"])]),(0,n._)("div",Ka,[((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)((0,o.SU)(g)(t),((i,r)=>((0,n.wg)(),(0,n.iD)("div",{key:r},[(0,n._)("button",{type:"button",class:(0,s.C_)(["dp--qr-btn",{"dp--qr-btn-active":i.active,"dp--qr-btn-between":i.isBetween,"dp--qr-btn-disabled":i.disabled,"dp--highlighted":i.highlighted}]),disabled:i.disabled,onClick:e=>(0,o.SU)(C)(i.value,t,i.disabled),onMouseover:e=>(0,o.SU)(m)(i.value)},[e.$slots.quarter?(0,n.WI)(e.$slots,"quarter",{key:0,value:i.value,text:i.text}):((0,n.wg)(),(0,n.iD)(n.HY,{key:1},[(0,n.Uk)((0,s.zw)(i.text),1)],64))],42,Ya)])))),128))])],4)])),_:3},8,["multi-calendars"]))}}),Xa=["id"],$a={key:0,class:"dp__sidebar_left"},Za={key:1,class:"dp--preset-dates"},Ja=["onClick","onKeydown"],Qa={key:2,class:"dp__sidebar_right"},el={key:3,class:"dp__action_extra"},tl=(0,n.aZ)({compatConfig:{MODE:3},__name:"DatepickerMenu",props:{...Ns,shadow:{type:Boolean,default:!1},openOnTop:{type:Boolean,default:!1},internalModelValue:{type:[Date,Array],default:null},arrMapValues:{type:Object,default:()=>({})},noOverlayFocus:{type:Boolean,default:!1}},emits:["close-picker","select-date","auto-apply","time-update","flow-step","update-month-year","invali
25d-select","update:internal-model-value","recalculate-position","invalid-fixed-range","tooltip-open","tooltip-close","time-picker-open","time-picker-close","am-pm-change","range-start","range-end","auto-apply-invalid","date-update","invalid-date"],setup(e,{expose:t,emit:i}){const a=i,l=e,c=(0,n.Fl)((()=>{const{openOnTop:e,...t}=l;return{...t,flowStep:R.value,noOverlayFocus:l.noOverlayFocus}})),{setMenuFocused:u,setShiftKey:d,control:p}=Kr(),h=(0,n.Rr)(),{defaultedTextInput:f,defaultedInline:g,defaultedConfig:v}=gs(l),y=(0,o.iH)(null),m=(0,o.iH)(0),C=(0,o.iH)(null),b=(0,o.iH)(null),w=(0,o.iH)(!1),S=(0,o.iH)(null);(0,n.bv)((()=>{if(!l.shadow){w.value=!0,E(),window.addEventListener("resize",E);const e=Uo(C);if(e&&!f.value.enabled&&!g.value.enabled&&(u(!0),k()),e){const t=e=>{v.value.allowPreventDefault&&e.preventDefault(),tr(e,v.value,!0)};e.addEventListener("pointerdown",t),e.addEventListener("mousedown",t)}}})),(0,n.Ah)((()=>{window.removeEventListener("resize",E)}));const E=()=>{const e=Uo(b);e&&(m.value=e.getBoundingClientRect().width)},{arrowRight:x,arrowLeft:O,arrowDown:T,arrowUp:D}=ts(),{flowStep:R,updateFlowStep:A,childMount:_,resetFlow:P}=ks(l,a,S),M=(0,n.Fl)((()=>l.monthPicker?aa:l.yearPicker?ca:l.timePicker?Ra:l.quarterPicker?qa:Ua)),k=()=>{const e=Uo(C);e&&e.focus({preventScroll:!0})},N=(0,n.Fl)((()=>{var e;return(null==(e=S.value)?void 0:e.getSidebarProps())||{}})),L=()=>{l.openOnTop&&a("recalculate-position")},I=Ds(h,"action"),F=(0,n.Fl)((()=>l.monthPicker||l.yearPicker?Ds(h,"monthYear"):l.timePicker?Ds(h,"timePicker"):Ds(h,"shared"))),G=(0,n.Fl)((()=>l.openOnTop?"dp__arrow_bottom":"dp__arrow_top")),V=(0,n.Fl)((()=>({dp__menu_disabled:l.disabled,dp__menu_readonly:l.readonly}))),B=(0,n.Fl)((()=>({dp__menu:!0,dp__menu_index:!g.value.enabled,dp__relative:g.value.enabled,[l.menuClassName]:!!l.menuClassName}))),j=e=>{tr(e,v.value,!0)},H=()=>{l.escClose&&a("close-picker")},W=e=>{if(l.arrowNavigation){if("up"===e)return D();if("down"===e)return T();if("left"===e)return O();if("right"===e)return x()}else"left"===e||"up"===e?q("handleArrow","left",0,"up"===e):q("handleArrow","right",0,"down"===e)},U=e=>{d(e.shiftKey),!l.disableMonthYearSelect&&"Tab"===e.code&&e.target.classList.contains("dp__menu")&&p.value.shiftKeyInMenu&&(e.preventDefault(),tr(e,v.value,!0),a("close-picker"))},z=()=>{k(),a("time-picker-close")},K=e=>{var t,i,n;null==(t=S.value)||t.toggleTimePicker(!1,!1),null==(i=S.value)||i.toggleMonthPicker(!1,!1,e),null==(n=S.value)||n.toggleYearPicker(!1,!1,e)},Y=(e,t=0)=>{var i,n,o;return"month"===e?null==(i=S.value)?void 0:i.toggleMonthPicker(!1,!0,t):"year"===e?null==(n=S.value)?void 0:n.toggleYearPicker(!1,!0,t):"time"===e?null==(o=S.value)?void 0:o.toggleTimePicker(!0,!1):K(t)},q=(e,...t)=>{var i,n;null!=(i=S.value)&&i[e]&&(null==(n=S.value)||n[e](...t))},X=()=>{q("selectCurrentDate")},$=(e,t)=>{q("presetDate",e,t)},Z=()=>{q("clearHoverDate")};return t({updateMonthYear:(e,t)=>{q("updateMonthYear",e,t)},switchView:Y}),(e,t)=>{var i;return(0,n.wg)(),(0,n.iD)("div",{id:e.uid?`dp-menu-${e.uid}`:void 0,ref_key:"dpMenuRef",ref:C,tabindex:"0",role:"dialog",class:(0,s.C_)(B.value),onMouseleave:Z,onClick:j,onKeydown:[(0,r.D2)(H,["esc"]),t[18]||(t[18]=(0,r.D2)((0,r.iM)((e=>W("left")),["prevent"]),["left"])),t[19]||(t[19]=(0,r.D2)((0,r.iM)((e=>W("up")),["prevent"]),["up"])),t[20]||(t[20]=(0,r.D2)((0,r.iM)((e=>W("down")),["prevent"]),["down"])),t[21]||(t[21]=(0,r.D2)((0,r.iM)((e=>W("right")),["prevent"]),["right"])),U]},[(e.disabled||e.readonly)&&(0,o.SU)(g).enabled?((0,n.wg)(),(0,n.iD)("div",{key:0,class:(0,s.C_)(V.value)},null,2)):(0,n.kq)("",!0),(0,o.SU)(g).enabled||e.teleportCenter?(0,n.kq)("",!0):((0,n.wg)(),(0,n.iD)("div",{key:1,class:(0,s.C_)(G.value)},null,2)),(0,n._)("div",{ref_key:"innerMenuRef",ref:b,class:(0,s.C_)({dp__menu_content_wrapper:(null==(i=e.presetDates)?void 0:i.length)||!!e.$slots["left-sidebar"]||!!e.$slots["right-sidebar"]}),style:(0,s.j5)({"--dp-menu-width":`${m.value}px`})},[e.$slots["left-sidebar"]?((0,n.wg)(),(0,n.iD)("div",$a,[(0,n.WI)(e.$slots,"left-sidebar",(0,s.vs)((0,n.F4)(N.value)))])):(0,n.kq)("",!0),e.presetDates.length?((0,n.wg)(),(0,n.iD)("div",Za,[((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(e.presetDates,((t,i)=>((0,n.wg)(),(0,n.iD)(n.HY,{key:i},[t.slot?(0,n.WI)(e.$slots,t.slot,{key:0,presetDate:$,label:t.label,value:t.value}):((0,n.wg)(),(0,n.iD)("button",{key:1,type:"button",style:(0,s.j5)(t.style||{}),class:"dp__btn dp--preset-range",onClick:(0,r.iM)((e=>$(t.value,t.noTz)),["prevent"]),onKeydown:[(0,r.D2)((0,r.iM)((e=>$(t.value,t.noTz)),["prevent"]),["enter"]),(0,r.D2)((0,r.iM)((e=>$(t.value,t.noTz)),["prevent"]),["space"])]},(0,s.zw)(t.label),45,Ja))],64)))),128))])):(0,n.kq)("",!0),(0,n._)("div",{ref_key:"calendarWrapperRef",ref:y,class:"dp__instance_calendar",role:"document"},[((0,n.wg)(),(0,n.j4)((0,n.LL)(M.value),(0,n.dG)({ref_key:"dynCmpRef",ref:S},c.value,{"flow-step":(0,o.SU)(R),onMount:(0,o.SU)(_),onUpdateFlowStep:(0,o.SU)(A),onResetFlow:(0,o.SU)(P),onFocusMenu:k,onSelectDate:t[0]||(t[0]=t=>e.$emit("select-date")),onDateUpdate:t[1]||(t[1]=t=>e.$emit("date-update",t)),onTooltipOpen:t[2]||(t[2]=t=>e.$emit("tooltip-open",t)),onTooltipClose:t[3]||(t[3]=t=>e.$emit("tooltip-close",t)),onAutoApply:t[4]||(t[4]=t=>e.$emit("auto-apply",t)),onRangeStart:t[5]||(t[5]=t=>e.$emit("range-start",t)),onRangeEnd:t[6]||(t[6]=t=>e.$emit("range-end",t)),onInvalidFixedRange:t[7]||(t[7]=t=>e.$emit("invalid-fixed-range",t)),onTimeUpdate:t[8]||(t[8]=t=>e.$emit("time-update")),onAmPmChange:t[9]||(t[9]=t=>e.$emit("am-pm-change",t)),onTimePickerOpen:t[10]||(t[10]=t=>e.$emit("time-picker-open",t)),onTimePickerClose:z,onRecalculatePosition:L,onUpdateMonthYear:t[11]||(t[11]=t=>e.$emit("update-month-year",t)),onAutoApplyInvalid:t[12]||(t[12]=t=>e.$emit("auto-apply-invalid",t)),onInvalidDate:t[13]||(t[13]=t=>e.$emit("invalid-date",t)),"onUpdate:internalModelValue":t[14]||(t[14]=t=>e.$emit("update:internal-model-value",t))}),(0,n.Nv)({_:2},[(0,n.Ko)(F.value,((t,i)=>({name:t,fn:(0,n.w5)((i=>[(0,n.WI)(e.$slots,t,(0,s.vs)((0,n.F4)({...i})))]))})))]),1040,["flow-step","onMount","onUpdateFlowStep","onResetFlow"]))],512),e.$slots["right-sidebar"]?((0,n.wg)(),(0,n.iD)("div",Qa,[(0,n.WI)(e.$slots,"right-sidebar",(0,s.vs)((0,n.F4)(N.value)))])):(0,n.kq)("",!0),e.$slots["action-extra"]?((0,n.wg)(),(0,n.iD)("div",el,[e.$slots["action-extra"]?(0,n.WI)(e.$slots,"action-extra",{key:0,selectCurrentDate:X}):(0,n.kq)("",!0)])):(0,n.kq)("",!0)],6),!e.autoApply||(0,o.SU)(v).keepActionRow?((0,n.wg)(),(0,n.j4)(Ws,(0,n.dG)({key:2,"menu-mount":w.value},c.value,{"calendar-width":m.value,onClosePicker:t[15]||(t[15]=t=>e.$emit("close-picker")),onSelectDate:t[16]||(t[16]=t=>e.$emit("select-date")),onInvalidSelect:t[17]||(t[17]=t=>e.$emit("invalid-select")),onSelectNow:X}),(0,n.Nv)({_:2},[(0,n.Ko)((0,o.SU)(I),((t,i)=>({name:t,fn:(0,n.w5)((i=>[(0,n.WI)(e.$slots,t,(0,s.vs)((0,n.F4)({...i})))]))})))]),1040,["menu-mount","calendar-width"])):(0,n.kq)("",!0)],42,Xa)}}}),il=typeof window<"u"?window:void 0,nl=()=>{},ol=e=>!!(0,o.nZ)()&&((0,o.EB)(e),!0),rl=(e,t,i,r)=>{if(!e)return nl;let s=nl;const a=(0,n.YP)((()=>(0,o.SU)(e)),(e=>{s(),e&&(e.addEventListener(t,i,r),s=()=>{e.removeEventListener(t,i,r),s=nl})}),{immediate:!0,flush:"post"}),l=()=>{a(),s()};return ol(l),l},sl=(e,t,i,n={})=>{const{window:o=il,event:r="pointerdown"}=n;return o?rl(o,r,(n=>{const o=Uo(e),r=Uo(t);!o||!r||o===n.target||n.composedPath().includes(o)||n.composedPath().includes(r)||i(n)}),{passive:!0}):void 0},al=(0,n.aZ)({compatConfig:{MODE:3},__name:"VueDatePicker",props:{...Ns},emits:["update:model-value","update:model-timezone-value","text-submit","closed","cleared","open","focus","blur","internal-model-change","recalculate-position","flow-step","update-month-year","invali
25d-select","invalid-fixed-range","tooltip-open","tooltip-close","time-picker-open","time-picker-close","am-pm-change","range-start","range-end","date-update","invalid-date"],setup(e,{expose:t,emit:i}){const a=i,l=e,c=(0,n.Rr)(),u=(0,o.iH)(!1),d=(0,o.Vh)(l,"modelValue"),p=(0,o.Vh)(l,"timezone"),h=(0,o.iH)(null),f=(0,o.iH)(null),g=(0,o.iH)(null),v=(0,o.iH)(!1),y=(0,o.iH)(null),m=(0,o.iH)(!1),C=(0,o.iH)(!1),{setMenuFocused:b,setShiftKey:w}=Kr(),{clearArrowNav:S}=ts(),{mapDatesArrToMap:E,validateDate:x,isValidTime:O}=Ps(l),{defaultedTransitions:T,defaultedTextInput:D,defaultedInline:R,defaultedConfig:A}=gs(l),{menuTransition:_,showTransition:P}=Rs(T);(0,n.bv)((()=>{W(l.modelValue),(0,n.Y3)().then((()=>{if(!R.value.enabled){const e=V(y.value);null==e||e.addEventListener("scroll",Z),null==window||window.addEventListener("resize",J)}})),R.value.enabled&&(u.value=!0),null==window||window.addEventListener("keyup",Q),null==window||window.addEventListener("keydown",ee)}));const M=(0,n.Fl)((()=>E()));(0,n.Ah)((()=>{if(!R.value.enabled){const e=V(y.value);null==e||e.removeEventListener("scroll",Z),null==window||window.removeEventListener("resize",J)}null==window||window.removeEventListener("keyup",Q),null==window||window.removeEventListener("keydown",ee)}));const k=Ds(c,"all",l.presetDates),N=Ds(c,"input");(0,n.YP)([d,p],(()=>{W(d.value)}),{deep:!0});const{openOnTop:L,menuStyle:I,xCorrect:F,setMenuPosition:G,getScrollableParent:V,shadowRender:B}=Es({menuRef:h,menuRefInner:f,inputRef:g,pickerWrapperRef:y,inline:R,emit:a,props:l,slots:c}),{inputValue:j,internalModelValue:H,parseExternalModelValue:W,emitModelValue:U,formatInputValue:z,checkBeforeEmit:K}=vs(a,l,v),Y=(0,n.Fl)((()=>({dp__main:!0,dp__theme_dark:l.dark,dp__theme_light:!l.dark,dp__flex_display:R.value.enabled,dp__flex_display_with_input:R.value.input}))),q=(0,n.Fl)((()=>l.dark?"dp__theme_dark":"dp__theme_light")),X=(0,n.Fl)((()=>l.teleport?{to:"boolean"==typeof l.teleport?"body":l.teleport,disabled:R.value.enabled}:{class:"dp__outer_menu_wrap"})),$=(0,n.Fl)((()=>R.value.enabled&&(l.timePicker||l.monthPicker||l.yearPicker||l.quarterPicker))),Z=()=>{u.value&&(A.value.closeOnScroll?ce():G())},J=()=>{u.value&&G()},Q=e=>{"Tab"===e.key&&!R.value.enabled&&!l.teleport&&A.value.tabOutClosesMenu&&(y.value.contains(document.activeElement)||ce()),C.value=e.shiftKey},ee=e=>{C.value=e.shiftKey},te=()=>{!l.disabled&&!l.readonly&&(B(tl,l),G(!1),u.value=!0,u.value&&a("open"),u.value||le(),W(l.modelValue))},ie=()=>{var e;j.value="",le(),null==(e=g.value)||e.setParsedDate(null),a("update:model-value",null),a("update:model-timezone-value",null),a("cleared"),A.value.closeOnClearValue&&ce()},ne=()=>{const e=H.value;return!(e&&(Array.isArray(e)||!x(e)))||!!Array.isArray(e)&&(!!(l.multiDates||2===e.length&&x(e[0])&&x(e[1]))||!(!l.partialRange||l.timePicker)&&x(e[0]))},oe=()=>{K()&&ne()?(U(),ce()):a("invalid-select",H.value)},re=e=>{se(),U(),A.value.closeOnAutoApply&&!e&&ce()},se=()=>{g.value&&D.value.enabled&&g.value.setParsedDate(H.value)},ae=(e=!1)=>{l.autoApply&&O(H.value)&&ne()&&(l.range&&Array.isArray(H.value)?(l.partialRange||2===H.value.length)&&re(e):re(e))},le=()=>{D.value.enabled||(H.value=null)},ce=()=>{R.value.enabled||(u.value&&(u.value=!1,F.value=!1,b(!1),w(!1),S(),a("closed"),j.value&&W(d.value)),le(),a("blur"))},ue=(e,t,i=!1)=>
25{if(!e)return void(H.value=null);const n=Array.isArray(e)?!e.some((e=>!x(e))):x(e),o=O(e);n&&o&&(H.value=e,t&&(m.value=i,oe(),a("text-submit")))},de=()=>{l.autoApply&&O(H.value)&&U(),se()},pe=()=>u.value?ce():te(),he=e=>{H.value=e},fe=()=>{D.value.enabled&&(v.value=!0,z()),a("focus")},ge=()=>{if(D.value.enabled&&(v.value=!1,W(l.modelValue),m.value)){const e=nr(y.value,C.value);null==e||e.focus()}a("blur")},ve=e=>{f.value&&f.value.updateMonthYear(0,{month:Xo(e.month),year:Xo(e.year)})},ye=e=>{W(e??l.modelValue)},me=(e,t)=>{var i;null==(i=f.value)||i.switchView(e,t)},Ce=e=>A.value.onClickOutside?A.value.onClickOutside(e):ce();return sl(h,g,(()=>Ce(ne))),t({closeMenu:ce,selectDate:oe,clearValue:ie,openMenu:te,onScroll:Z,formatInputValue:z,updateInternalModelValue:he,setMonthYear:ve,parseModel:ye,switchView:me,toggleMenu:pe}),(e,t)=>((0,n.wg)(),(0,n.iD)("div",{ref_key:"pickerWrapperRef",ref:y,class:(0,s.C_)(Y.value),"data-datepicker-instance":""},[(0,n.Wm)(Vs,(0,n.dG)({ref_key:"inputRef",ref:g,"input-value":(0,o.SU)(j),"onUpdate:inputValue":t[0]||(t[0]=e=>(0,o.dq)(j)?j.value=e:null),"is-menu-open":u.value},e.$props,{onClear:ie,onOpen:te,onSetInputDate:ue,onSetEmptyDate:(0,o.SU)(U),onSelectDate:oe,onToggle:pe,onClose:ce,onFocus:fe,onBlur:ge,onRealBlur:t[1]||(t[1]=e=>v.value=!1)}),(0,n.Nv)({_:2},[(0,n.Ko)((0,o.SU)(N),((t,i)=>({name:t,fn:(0,n.w5)((i=>[(0,n.WI)(e.$slots,t,(0,s.vs)((0,n.F4)(i)))]))})))]),1040,["input-value","is-menu-open","onSetEmptyDate"]),(0,n.Wm)(r.uT,{name:(0,o.SU)(_)((0,o.SU)(L)),css:(0,o.SU)(P)&&!(0,o.SU)(R).enabled},{default:(0,n.w5)((()=>[u.value?((0,n.wg)(),(0,n.j4)((0,n.LL)(e.teleport?n.lR:"div"),(0,n.dG)({key:0,ref_key:"dpWrapMenuRef",ref:h},X.value,{class:{"dp--menu-wrapper":!(0,o.SU)(R).enabled},style:(0,o.SU)(R).enabled?void 0:(0,o.SU)(I)}),{default:(0,n.w5)((()=>[(0,n.Wm)(tl,(0,n.dG)({ref_key:"dpMenuRef",ref:f},e.$props,{"internal-model-value":(0,o.SU)(H),"onUpdate:internalModelValue":t[2]||(t[2]=e=>(0,o.dq)(H)?H.value=e:null),class:{[q.value]:!0,"dp--menu-wrapper":e.teleport},style:e.teleport?(0,o.SU)(I):void 0,"open-on-top":(0,o.SU)(L),"arr-map-values":M.value,"no-overlay-focus":$.value,onClosePicker:ce,onSelectDate:oe,onAutoApply:ae,onTimeUpdate:de,onFlowStep:t[3]||(t[3]=t=>e.$emit("flow-step",t)),onUpdateMonthYear:t[4]||(t[4]=t=>e.$emit("update-month-year",t)),onInvalidSelect:t[5]||(t[5]=t=>e.$emit("invalid-select",(0,o.SU)(H))),onAutoApplyInvalid:t[6]||(t[6]=t=>e.$emit("invalid-select",t)),onInvalidFixedRange:t[7]||(t[7]=t=>e.$emit("invalid-fixed-range",t)),onRecalculatePosition:(0,o.SU)(G),onTooltipOpen:t[8]||(t[8]=t=>e.$emit("tooltip-open",t)),onTooltipClose:t[9]||(t[9]=t=>e.$emit("tooltip-close",t)),onTimePickerOpen:t[10]||(t[10]=t=>e.$emit("time-picker-open",t)),onTimePickerClose:t[11]||(t[11]=t=>e.$emit("time-picker-close",t)),onAmPmChange:t[12]||(t[12]=t=>e.$emit("am-pm-change",t)),onRangeStart:t[13]||(t[13]=t=>e.$emit("range-start",t)),onRangeEnd:t[14]||(t[14]=t=>e.$emit("range-end",t)),onDateUpdate:t[15]||(t[15]=t=>e.$emit("date-update",t)),onInvalidDate:t[16]||(t[16]=t=>e.$emit("invalid-date",t))}),(0,n.Nv)({_:2},[(0,n.Ko)((0,o.SU)(k),((t,i)=>({name:t,fn:(0,n.w5)((i=>[(0,n.WI)(e.$slots,t,(0,s.vs)((0,n.F4)({...i})))]))})))]),1040,["internal-model-value","class","style","open-on-top","arr-map-values","no-overlay-focus","onRecalculatePosition"])])),_:3},16,["class","style"])):(0,n.kq)("",!0)])),_:3},8,["name","css"])],2))}}),ll=(()=>{const e=al;return e.install=t=>{t.component("Vue3DatePicker",e)},e})(),cl=Object.freeze(Object.defineProperty({__proto__:null,default:ll},Symbol.toStringTag,{value:"Module"}));Object.entries(cl).forEach((([e,t])=>{"default"!==e&&(ll[e]=t)}))},9157:function(e,t,i){i.d(t,{Z:function(){return Ht}});var n={};i.r(n),i.d(n,{hasBrowserEnv:function(){return Me},hasStandardBrowserEnv:function(){return ke},hasStandardBrowserWebWorkerEnv:function(){return Ne}});i(8453),i(6895),i(2530),i(2106);function o(e,t){return function(){return e.apply(t,arguments)}}const{toString:r}=Object.prototype,{getPrototypeOf:s}=Object,a=(e=>t=>{const i=r.call(t);return e[i]||(e[i]=i.slice(8,-1).toLowerCase())})(Object.create(null)),l=e=>(e=e.toLowerCase(),t=>a(t)===e),c=e=>t=>typeof t===e,{isArray:u}=Array,d=c("undefined");function p(e){return null!==e&&!d(e)&&null!==e.constructor&&!d(e.constructor)&&v(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const h=l("ArrayBuffer");function f(e){let t;return t="undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&h(e.buffer),t}const g=c("string"),v=c("function"),y=c("number"),m=e=>null!==e&&"object"===typeof e,C=e=>!0===e||!1===e,b=e=>{if("object"!==a(e))return!1;const t=s(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},w=l("Date"),S=l("File"),E=l("Blob"),x=l("FileList"),O=e=>m(e)&&v(e.pipe),T=e=>{let t;return e&&("function"===typeof FormData&&e instanceof FormData||v(e.append)&&("formdata"===(t=a(e))||"object"===t&&v(e.toString)&&"[object FormData]"===e.toString()))},D=l("URLSearchParams"),R=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function A(e,t,{allOwnKeys:i=!1}
vendor: 4,656 bytes, line 25
25={}){if(null===e||"undefined"===typeof e)return;let n,o;if("object"!==typeof e&&(e=[e]),u(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{const o=i?Object.getOwnPropertyNames(e):Object.keys(e),r=o.length;let s;for(n=0;n<r;n++)s=o[n],t.call(null,e[s],s,e)}}function _(e,t){t=t.toLowerCase();const i=Object.keys(e);let n,o=i.length;while(o-- >0)if(n=i[o],t===n.toLowerCase())return n;return null}const P=(()=>"undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:"undefined"!==typeof window?window:global)(),M=e=>!d(e)&&e!==P;function k(){const{caseless:e}=M(this)&&this||{},t={},i=(i,n)=>{const o=e&&_(t,n)||n;b(t[o])&&b(i)?t[o]=k(t[o],i):b(i)?t[o]=k({},i):u(i)?t[o]=i.slice():t[o]=i};for(let n=0,o=arguments.length;n<o;n++)arguments[n]&&A(arguments[n],i);return t}const N=(e,t,i,{allOwnKeys:n}={})=>(A(t,((t,n)=>{i&&v(t)?e[n]=o(t,i):e[n]=t}),{allOwnKeys:n}),e),L=e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),I=(e,t,i,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),i&&Object.assign(e.prototype,i)},F=(e,t,i,n)=>{let o,r,a;const l={};if(t=t||{},null==e)return t;do{o=Object.getOwnPropertyNames(e),r=o.length;while(r-- >0)a=o[r],n&&!n(a,e,t)||l[a]||(t[a]=e[a],l[a]=!0);e=!1!==i&&s(e)}while(e&&(!i||i(e,t))&&e!==Object.prototype);return t},G=(e,t,i)=>{e=String(e),(void 0===i||i>e.length)&&(i=e.length),i-=t.length;const n=e.indexOf(t,i);return-1!==n&&n===i},V=e=>{if(!e)return null;if(u(e))return e;let t=e.length;if(!y(t))return null;const i=new Array(t);while(t-- >0)i[t]=e[t];return i},B=(e=>t=>e&&t instanceof e)("undefined"!==typeof Uint8Array&&s(Uint8Array)),j=(e,t)=>{const i=e&&e[Symbol.iterator],n=i.call(e);let o;while((o=n.next())&&!o.done){const i=o.value;t.call(e,i[0],i[1])}},H=(e,t)=>{let i;const n=[];while(null!==(i=e.exec(t)))n.push(i);return n},W=l("HTMLFormElement"),U=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,i){return t.toUpperCase()+i})),z=(({hasOwnProperty:e})=>(t,i)=>e.call(t,i))(Object.prototype),K=l("RegExp"),Y=(e,t)=>{const i=Object.getOwnPropertyDescriptors(e),n={};A(i,((i,o)=>{let r;!1!==(r=t(i,o,e))&&(n[o]=r||i)})),Object.defineProperties(e,n)},q=e=>{Y(e,((t,i)=>{if(v(e)&&-1!==["arguments","caller","callee"].indexOf(i))return!1;const n=e[i];v(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+i+"'")}))}))},X=(e,t)=>{const i={},n=e=>{e.forEach((e=>{i[e]=!0}))};return u(e)?n(e):n(String(e).split(t)),i},$=()=>{},Z=(e,t)=>(e=+e,Number.isFinite(e)?e:t),J="abcdefghijklmnopqrstuvwxyz",Q="0123456789",ee={DIGIT:Q,ALPHA:J,ALPHA_DIGIT:J+J.toUpperCase()+Q},te=(e=16,t=ee.ALPHA_DIGIT)=>{let i="";const{length:n}=t;while(e--)i+=t[Math.random()*n|0];return i};function ie(e){return!!(e&&v(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])}const ne=e=>{const t=new Array(10),i=(e,n)=>{if(m(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[n]=e;const o=u(e)?[]:{};return A(e,((e,t)=>{const r=i(e,n+1);!d(r)&&(o[t]=r)})),t[n]=void 0,o}}return e};return i(e,0)},oe=l("AsyncFunction"),re=e=>e&&(m(e)||v(e))&&v(e.then)&&v(e.catch);var se={isArray:u,isArrayBuffer:h,isBuffer:p,isFormData:T,isArrayBufferView:f,isString:g,isNumber:y,isBoolean:C,isObject:m,isPlainObject:b,isUndefined:d,isDate:w,isFile:S,isBlob:E,isRegExp:K,isFunction:v,isStream:O,isURLSearchParams:D,isTypedArray:B,isFileList:x,forEach:A,merge:k,extend:N,trim:R,stripBOM:L,inherits:I,toFlatObject:F,kindOf:a,kindOfTest:l,endsWith:G,toArray:V,forEachEntry:j,matchAll:H,isHTMLForm:W,hasOwnProperty:z,hasOwnProp:z,reduceDescriptors:Y,freezeMethods:q,toObjectSet:X,toCamelCase:U,noop:$,toFiniteNumber:Z,findKey:_,global:P,isContextDefined:M,ALPHABET:ee,generateString:te,isSpecCompliantForm:ie,toJSONObject:ne,isAsyncFn:oe,isThenable:re};function ae(e,t,i,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),i&&(this.config=i),n&&(this.request=n),o&&(this.response=o)}se.inherits(ae,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:se.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const le=ae.prototype,ce={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","E
25RR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{ce[e]={value:e}})),Object.defineProperties(ae,ce),Object.defineProperty(le,"isAxiosError",{value:!0}),ae.from=(e,t,i,n,o,r)=>{const s=Object.create(le);return se.toFlatObject(e,s,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),ae.call(s,e.message,t,i,n,o),s.cause=e,s.name=e.name,r&&Object.assign(s,r),s};var ue=ae,de=null;function pe(e){return se.isPlainObject(e)||se.isArray(e)}function he(e){return se.endsWith(e,"[]")?e.slice(0,-2):e}function fe(e,t,i){return e?e.concat(t).map((function(e,t){return e=he(e),!i&&t?"["+e+"]":e})).join(i?".":""):t}function ge(e){return se.isArray(e)&&!e.some(pe)}const ve=se.toFlatObject(se,{},null,(function(e){return/^is[A-Z]/.test(e)}));function ye(e,t,i){if(!se.isObject(e))throw new TypeError("target must be an object");t=t||new(de||FormData),i=se.toFlatObject(i,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!se.isUndefined(t[e])}));const n=i.metaTokens,o=i.visitor||u,r=i.dots,s=i.indexes,a=i.Blob||"undefined"!==typeof Blob&&Blob,l=a&&se.isSpecCompliantForm(t);if(!se.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(se.isDate(e))return e.toISOString();if(!l&&se.isBlob(e))throw new ue("Blob is not supported. Use a Buffer instead.");return se.isArrayBuffer(e)||se.isTypedArray(e)?l&&"function"===typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,i,o){let a=e;if(e&&!o&&"object"===typeof e)if(se.endsWith(i,"{}"))i=n?i:i.slice(0,-2),e=JSON.stringify(e);else if(se.isArray(e)&&ge(e)||(se.isFileList(e)||se.endsWith(i,"[]"))&&(a=se.toArray(e)))return i=he(i),a.forEach((function(e,n){!se.isUndefined(e)&&null!==e&&t.append(!0===s?fe([i],n,r):null===s?i:i+"[]",c(e))})),!1;return!!pe(e)||(t.append(fe(o,i,r),c(e)),!1)}const d=[],p=Object.assign(ve,{defaultVisitor:u,convertValue:c,isVisitable:pe});function h(e,i){if(!se.isUndefined(e)){if(-1!==d.indexOf(e))throw Error("Circular reference detected in "+i.join("."));d.push(e),se.forEach(e,(function(e,n){const r=!(se.isUndefined(e)||null===e)&&o.call(t,e,se.isString(n)?n.trim():n,i,p);!0===r&&h(e,i?i.concat(n):[n])})),d.pop()}}if(!se.isObject(e))throw new TypeError("data must be an object");return h(e),t}var me=ye;function Ce(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function be(e,t){this._pairs=[],e&&me(e,this,t)}const we=be.prototype;we.append=function(e,t){this._pairs.push([e,t])},we.toString=function(e){const t=e?function(t){return e.call(this,t,Ce)}:Ce;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var Se=be;function Ee(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function xe(e,t,i){if(!t)return e;const n=i&&i.encode||Ee,o=i&&i.serialize;let r;if(r=o?o(t,i):se.isURLSearchParams(t)?t.toString():new Se(t,i).toString(n),r){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+r}return e}class Oe{constructor(){this.handlers=[]}use(e,t,i){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!i&&i.synchronous,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){se.forEach(this.handlers,(function(t){null!==t&&e(t)}))}}var Te=Oe,De={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Re=(i(4289),i(7226),i(2509),"undefined"!==typeof URLSearchParams?URLSearchParams:Se),Ae="undefined"!==typeof FormData?FormData:null,_e="undefined"!==typeof Blob?Blob:null,Pe={isBrowser:!0,classes:{URLSearchParams:Re,FormData:Ae,Blob:_e},protocols:["http","https","file","blob","url","data"]};const Me="undefined"!==typeof window&&"undefined"!==typeof document,ke=(e=>Me&&["ReactNative","NativeScript","NS"].indexOf(e)<0)("undefined"!==typeof navigator&&navigator.product),Ne=(()=>"undefined"!==typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"===typeof self.importScripts)();var Le={...n,...Pe};function Ie(e,t){return me(e,new Le.classes.URLSearchParams,Object.assign({visitor:function(e,t,i,n){return Le.isNode&&se.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}function Fe(e){return se.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}function Ge(e){const t={},i=Object.keys(e);let n;const o=i.length;let r;for(n=0;n<o;n++)r=i[n],t[r]=e[r];return t}function Ve(e){function t(e,i,n,o){let r=e[o++];const s=Number.isFinite(+r),a=o>=e.length;if(r=!r&&se.isArray(n)?n.length:r,a)return se.hasOwnProp(n,r)?n[r]=[n[r],i]:n[r]=i,!s;n[r]&&se.isObject(n[r])||(n[r]=[]);const l=t(e,i,n[r],o);return l&&se.isArray(n[r])&&(n[r]=Ge(n[r])),!s}if(se.isFormData(e)&&se.isFunction(e.entries)){const i={};return se.forEachEntry(e,((e,n)=>{t(Fe(e),n,i,0)})),i}return null}var Be=Ve;function je(e,t,i){if(se.isString(e))try{return(t||JSON.parse)(e),se.trim(e)}catch(n){if("SyntaxError"!==n.name)throw n}return(i||JSON.stringify)(e)}const He={transitional:De,adapter:["xhr","http"],transformRequest:[function(e,t){const i=t.getContentType()||"",n=i.indexOf("application/json")>-1,o=se.isObject(e);
vendor: 16,308 bytes, line 25
25o&&se.isHTMLForm(e)&&(e=new FormData(e));const r=se.isFormData(e);if(r)return n&&n?JSON.stringify(Be(e)):e;if(se.isArrayBuffer(e)||se.isBuffer(e)||se.isStream(e)||se.isFile(e)||se.isBlob(e))return e;if(se.isArrayBufferView(e))return e.buffer;if(se.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(o){if(i.indexOf("application/x-www-form-urlencoded")>-1)return Ie(e,this.formSerializer).toString();if((s=se.isFileList(e))||i.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return me(s?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||n?(t.setContentType("application/json",!1),je(e)):e}],transformResponse:[function(e){const t=this.transitional||He.transitional,i=t&&t.forcedJSONParsing,n="json"===this.responseType;if(e&&se.isString(e)&&(i&&!this.responseType||n)){const i=t&&t.silentJSONParsing,r=!i&&n;try{return JSON.parse(e)}catch(o){if(r){if("SyntaxError"===o.name)throw ue.from(o,ue.ERR_BAD_RESPONSE,this,null,this.response);throw o}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Le.classes.FormData,Blob:Le.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};se.forEach(["delete","get","head","post","put","patch"],(e=>{He.headers[e]={}}));var We=He;const Ue=se.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var ze=e=>{const t={};let i,n,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),i=e.substring(0,o).trim().toLowerCase(),n=e.substring(o+1).trim(),!i||t[i]&&Ue[i]||("set-cookie"===i?t[i]?t[i].push(n):t[i]=[n]:t[i]=t[i]?t[i]+", "+n:n)})),t};const Ke=Symbol("internals");function Ye(e){return e&&String(e).trim().toLowerCase()}function qe(e){return!1===e||null==e?e:se.isArray(e)?e.map(qe):String(e)}function Xe(e){const t=Object.create(null),i=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;while(n=i.exec(e))t[n[1]]=n[2];return t}const $e=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ze(e,t,i,n,o){return se.isFunction(n)?n.call(this,t,i):(o&&(t=i),se.isString(t)?se.isString(n)?-1!==t.indexOf(n):se.isRegExp(n)?n.test(t):void 0:void 0)}function Je(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,i)=>t.toUpperCase()+i))}function Qe(e,t){const i=se.toCamelCase(" "+t);["get","set","has"].forEach((n=>{Object.defineProperty(e,n+i,{value:function(e,i,o){return this[n].call(this,t,e,i,o)},configurable:!0})}))}class et{constructor(e){e&&this.set(e)}set(e,t,i){const n=this;function o(e,t,i){const o=Ye(t);if(!o)throw new Error("header name must be a non-empty string");const r=se.findKey(n,o);(!r||void 0===n[r]||!0===i||void 0===i&&!1!==n[r])&&(n[r||t]=qe(e))}const r=(e,t)=>se.forEach(e,((e,i)=>o(e,i,t)));return se.isPlainObject(e)||e instanceof this.constructor?r(e,t):se.isString(e)&&(e=e.trim())&&!$e(e)?r(ze(e),t):null!=e&&o(t,e,i),this}get(e,t){if(e=Ye(e),e){const i=se.findKey(this,e);if(i){const e=this[i];if(!t)return e;if(!0===t)return Xe(e);if(se.isFunction(t))return t.call(this,e,i);if(se.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Ye(e),e){const i=se.findKey(this,e);return!(!i||void 0===this[i]||t&&!Ze(this,this[i],i,t))}return!1}delete(e,t){const i=this;let n=!1;function o(e){if(e=Ye(e),e){const o=se.findKey(i,e);!o||t&&!Ze(i,i[o],o,t)||(delete i[o],n=!0)}}return se.isArray(e)?e.forEach(o):o(e),n}clear(e){const t=Object.keys(this);let i=t.length,n=!1;while(i--){const o=t[i];e&&!Ze(this,this[o],o,e,!0)||(delete this[o],n=!0)}return n}normalize(e){const t=this,i={};return se.forEach(this,((n,o)=>{const r=se.findKey(i,o);if(r)return t[r]=qe(n),void delete t[o];const s=e?Je(o):String(o).trim();s!==o&&delete t[o],t[s]=qe(n),i[s]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return se.forEach(this,((i,n)=>{null!=i&&!1!==i&&(t[n]=e&&se.isArray(i)?i.join(", "):i)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const i=new this(e);return t.forEach((e=>i.set(e))),i}static accessor(e){const t=this[Ke]=this[Ke]={accessors:{}},i=t.accessors,n=this.prototype;function o(e){const t=Ye(e);i[t]||(Qe(n,e),i[t]=!0)}return se.isArray(e)?e.forEach(o):o(e),this}}et.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),se.reduceDescriptors(et.prototype,(({value:e},t)=>{let i=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[i]=e}}})),se.freezeMethods(et);var tt=et;function it(e,t){const i=this||We,n=t||i,o=tt.from(n.headers);let r=n.data;return se.forEach(e,(function(e){r=e.call(i,r,o.normalize(),t?t.status:void 0)})),o.normalize(),r}function nt(e){return!(!e||!e.__CANCEL__)}function ot(e,t,i){ue.call(this,null==e?"canceled":e,ue.ERR_CANCELED,t,i),this.name="CanceledError"}se.inherits(ot,ue,{__CANCEL__:!0});var rt=ot;i(7763);function st(e,t,i){const n=i.config.validateStatus;i.status&&n&&!n(i.status)?t(new ue("Request failed with status code "+i.status,[ue.ERR_BAD_REQUEST,ue.ERR_BAD_RESPONSE][Math.floor(i.status/100)-4],i.config,i.request,i)):e(i)}var at=Le.hasStandardBrowserEnv?{write(e,t,i,n,o,r){const s=[e+"="+encodeURIComponent(t)];se.isNumber(i)&&s.push("expires="+new Date(i).toGMTString()),se.isString(n)&&s.push("path="+n),se.isString(o)&&s.push("domain="+o),!0===r&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function lt(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function ct(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function ut(e,t){return e&&!lt(t)?ct(e,t):t}var dt=Le.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let i;function n(i){let n=i;return e&&(t.setAttribute("href",n),n=t.href),t.setAttribute("href",n),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return i=n(window.location.href),function(e){const t=se.isString(e)?n(e):e;return t.protocol===i.protocol&&t.host===i.host}}():function(){return function(){return!0}}();function pt(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function ht(e,t){e=e||10;const i=new Array(e),n=new Array(e);let o,r=0,s=0;return t=void 0!==t?t:1e3,function(a){const l=Date.now(),c=n[s];o||(o=l),i[r]=a,n[r]=l;let u=s,d=0;while(u!==r)d+=i[u++],u%=e;if(r=(r+1)%e,r===s&&(s=(s+1)%e),l-o<t)return;const p=c&&l-c;return p?Math.round(1e3*d/p):void 0}}var ft=ht;function gt(e,t){let i=0;const n=ft(50,250);return o=>{const r=o.loaded,s=o.lengthComputable?o.total:void 0,a=r-i,l=n(a),c=r<=s;i=r;const u={loaded:r,total:s,progress:s?r/s:void 0,bytes:a,rate:l||void 0,estimated:l&&s&&c?(s-r)/l:void 0,event:o};u[t?"download":"upload"]=!0,e(u)}}const vt="undefined"!==typeof XMLHttpRequest;var yt=vt&&function(e){return new Promise((function(t,i){let n=e.data;const o=tt.from(e.headers).normalize();let r,s,{responseType:a,withXSRFToken:l}=e;function c(){e.cancelToken&&e.cancelToken.unsubscribe(r),e.signal&&e.signal.removeEventListener("abort",r)}if(se.isFormData(n))if(Le.hasStandardBrowserEnv||Le.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if(!1!==(s=o.getContentType())){const[e,...t]=s?s.split(";").map((e=>e.trim())).filter(Boolean):[];o.setContentType([e||"multipart/form-data",...t].join("; "))}let u=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",i=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(t+":"+i))}const d=ut(e.baseURL,e.url);function p(){if(!u)return;const n=tt.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders()),o=a&&"text"!==a&&"json"!==a?u.response:u.responseText,r={data:o,status:u.status,statusText:u.statusText,headers:n,config:e,request:u};st((function(e){t(e),c()}),(function(e){i(e),c()}),r),u=null}if(u.open(e.method.toUpperCase(),xe(d,e.params,e.paramsSerializer),!0),u.timeout=e.timeout,"onloadend"in u?u.onloadend=p:u.onreadystatechange=function(){u&&4===u.readyState&&(0!==u.status||u.responseURL&&0===u.responseURL.indexOf("file:"))&&setTimeout(p)},u.onabort=function(){u&&(i(new ue("Request aborted",ue.ECONNABORTED,e,u)),u=null)},u.onerror=function(){i(new ue("Network Error",ue.ERR_NETWORK,e,u)),u=null},u.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const n=e.transitional||De;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),i(new ue(t,n.clarifyTimeoutError?ue.ETIMEDOUT:ue.ECONNABORTED,e,u)),u=null},Le.hasStandardBrowserEnv&&(l&&se.isFunction(l)&&(l=l(e)),l||!1!==l&&dt(d))){const t=e.xsrfHeaderName&&e.xsrfCookieName&&at.read(e.xsrfCookieName);t&&o.set(e.xsrfHeaderName,t)}void 0===n&&o.setContentType(null),"setRequestHeader"in u&&se.forEach(o.toJSON(),(function(e,t){u.setRequestHeader(t,e)})),se.isUndefined(e.withCredentials)||(u.withCredentials=!!e.withCredentials),a&&"json"!==a&&(u.responseType=e.responseType),"function"===typeof e.onDownloadProgress&&u.addEventListener("progress",gt(e.onDownloadProgress,!0)),"function"===typeof e.onUploadProgress&&u.upload&&u.upload.addEventListener("progress",gt(e.onUploadProgress)),(e.cancelToken||e.signal)&&(r=t=>{u&&(i(!t||t.type?new rt(null,e,u):t),u.abort(),u=null)},e.cancelToken&&e.cancelToken.subscribe(r),e.signal&&(e.signal.aborted?r():e.signal.addEventListener("abort",r)));const h=pt(d);h&&-1===Le.protocols.indexOf(h)?i(new ue("Unsupported protocol "+h+":",ue.ERR_BAD_REQUEST,e)):u.send(n||null)}))};const mt={http:de,xhr:yt};se.forEach(mt,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(i){}Object.defineProperty(e,"adapterName",{value:t})}}));const Ct=e=>`- ${e}`,bt=e=>se.isFunction(e)||null===e||!1===e;var wt={getAdapter:e=>{e=se.isArray(e)?e:[e];const{length:t}=e;let i,n;const o={};for(let r=0;r<t;r++){let t;if(i=e[r],n=i,!bt(i)&&(n=mt[(t=String(i)).toLowerCase()],void 0===n))throw new ue(`Unknown adapter '${t}'`);if(n)break;o[t||"#"+r]=n}if(!n){const e=Object.entries(o).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));let i=t?e.length>1?"since :\n"+e.map(Ct).join("\n"):" "+Ct(e[0]):"as no adapter specified";throw new ue("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return n},adapters:mt};function St(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new rt(null,e)}function Et(e){St(e),e.headers=tt.from(e.headers),e.data=it.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);const t=wt.getAdapter(e.adapter||We.adapter);return t(e).then((function(t){return St(e),t.data=it.call(e,e.transformResponse,t),t.headers=tt.from(t.headers),t}),(function(t){return nt(t)||(St(e),t&&t.response&&(t.response.data=it.call(e,e.transformResponse,t.response),t.response.headers=tt.from(t.response.headers))),Promise.reject(t)}))}const xt=e=>e instanceof tt?e.toJSON():e;function Ot(e,t){t=t||{};const i={};function n(e,t,i){return se.isPlainObject(e)&&se.isPlainObject(t)?se.merge.call({caseless:i},e,t):se.isPlainObject(t)?se.merge({},t):se.isArray(t)?t.slice():t}function o(e,t,i){return se.isUndefined(t)?se.isUndefined(e)?void 0:n(void 0,e,i):n(e,t,i)}function r(e,t){if(!se.isUndefined(t))return n(void 0,t)}function s(e,t){return se.isUndefined(t)?se.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function a(i,o,r){return r in t?n(i,o):r in e?n(void 0,i):void 0}const l={url:r,method:r,data:r,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(e,t)=>o(xt(e),xt(t),!0)};return se.forEach(Object.keys(Object.assign({},e,t)),(function(n){const r=l[n]||o,s=r(e[n],t[n],n);se.isUndefined(s)&&r!==a||(i[n]=s)})),i}const Tt="1.6.2",Dt={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Dt[e]=function(i){return typeof i===e||"a"+(t<1?"n ":" ")+e}}));const Rt={};function At(e,t,i){if("object"!==typeof e)throw new ue("options must be an object",ue.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;while(o-- >0){const r=n[o],s=t[r];if(s){const t=e[r],i=void 0===t||s(t,r,e);if(!0!==i)throw new ue("option "+r+" must be "+i,ue.ERR_BAD_OPTION_VALUE)}else if(!0!==i)throw new ue("Unknown option "+r,ue.ERR_BAD_OPTION)}}Dt.transitional=function(e,t,i){function n(e,t){return"[Axios v"+Tt+"] Transitional option '"+e+"'"+t+(i?". "+i:"")}return(i,o,r)=>{if(!1===e)throw new ue(n(o," has been removed"+(t?" in "+t:"")),ue.ERR_DEPRECATED);return t&&!Rt[o]&&(Rt[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(i,o,r)}};var _t={assertOptions:At,validators:Dt};const Pt=_t.validators;class Mt{constructor(e){this.defaults=e,this.interceptors={request:new Te,response:new Te}}request(e,t){"string"===typeof e?(t=t||{},t.url=e):t=e||{},t=Ot(this.defaults,t);const{transitional:i,paramsSerializer:n,headers:o}=t;void 0!==i&&_t.assertOptions(i,{silentJSONParsing:Pt.transitional(Pt.boolean),forcedJSONParsing:Pt.transitional(Pt.boolean),clarifyTimeoutError:Pt.transitional(Pt.boolean)},!1),null!=n&&(se.isFunction(n)?t.paramsSerializer={serialize:n}:_t.assertOptions(n,{encode:Pt.function,serialize:Pt.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let r=o&&se.merge(o.common,o[t.method]);o&&se.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=tt.concat(r,o);const s=[];let a=!0;this.interceptors.request.forEach((function(e){"function"===typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,s.unshift(e.fulfilled,e.rejected))}));const l=[];let c;this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)}));let u,d=0;if(!a){const e=[Et.bind(this),void 0];e.unshift.apply(e,s),e.push.apply(e,l),u=e.length,c=Promise.resolve(t);while(d<u)c=c.then(e[d++],e[d++]);return c}u=s.length;let p=t;d=0;while(d<u){const e=s[d++],t=s[d++];try{p=e(p)}catch(h){t.call(this,h);break}}try{c=Et.call(this,p)}catch(h){return Promise.reject(h)}d=0,u=l.length;while(d<u)c=c.then(l[d++],l[d++]);return c}getUri(e){e=Ot(this.defaults,e);const t=ut(e.baseURL,e.url);return xe(t,e.params,e.paramsSerializer)}}se.forEach(["delete","get","head","options"],(function(e){Mt.prototype[e]=function(t,i){return this.request(Ot(i||{},{method:e,url:t,data:(i||{}).data}))}})),se.forEach(["post","put","patch"],(function(e){function t(t){return function(i,n,o){return this.request(Ot(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:i,data:n}))}}Mt.prototype[e]=t(),Mt.prototype[e+"Form"]=t(!0)}));var kt=Mt;class Nt{constructor(e){if("function"!==typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const i=this;this.promise.then((e=>{if(!i._listeners)return;let t=i._listeners.length;while(t-- >0)i._listeners[t](e);i._listeners=null})),this.promise.then=e=>{let t;const n=new Promise((e=>{i.subscribe(e),t=e})).then(e);return n.cancel=function(){i.unsubscribe(t)},n},e((function(e,n,o){i.reason||(i.reason=new rt(e,n,o),t(i.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}
25subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;const t=new Nt((function(t){e=t}));return{token:t,cancel:e}}}var Lt=Nt;function It(e){return function(t){return e.apply(null,t)}}function Ft(e){return se.isObject(e)&&!0===e.isAxiosError}const Gt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Gt).forEach((([e,t])=>{Gt[t]=e}));var Vt=Gt;function Bt(e){const t=new kt(e),i=o(kt.prototype.request,t);return se.extend(i,kt.prototype,t,{allOwnKeys:!0}),se.extend(i,t,null,{allOwnKeys:!0}),i.create=function(t){return Bt(Ot(e,t))},i}const jt=Bt(We);jt.Axios=kt,jt.CanceledError=rt,jt.CancelToken=Lt,jt.isCancel=nt,jt.VERSION=Tt,jt.toFormData=me,jt.AxiosError=ue,jt.Cancel=jt.CanceledError,jt.all=function(e){return Promise.all(e)},jt.spread=It,jt.isAxiosError=Ft,jt.mergeConfig=Ot,jt.AxiosHeaders=tt,jt.formToJSON=e=>Be(se.isHTMLForm(e)?new FormData(e):e),jt.getAdapter=wt.getAdapter,jt.HttpStatusCode=Vt,jt.default=jt;var Ht=jt},4529:function(e,t,i){i.d(t,{Yf:function(){return B}});i(2106);var n=i(6907),o=i(5677),r=i(1437),s=i(5220);Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;const a="undefined"!==typeof window;function l(e,t="px"){return null==e||""===e?void 0:isNaN(+e)?String(e):isFinite(+e)?`${Number(e)}${t}`:void 0}const c=e=>{if(!e||e.nodeType!==Node.ELEMENT_NODE)return!1;const t=window.getComputedStyle(e);return["auto","scroll"].includes(t.overflowY)&&e.scrollHeight>e.clientHeight},u=(e,t)=>0===e.scrollTop&&t<0||e.scrollTop+e.clientHeight===e.scrollHeight&&t>0,d=(e,t)=>{const i=e.composedPath(),n=e.deltaY;for(let o=0;o<i.length;o++){const e=i[o];if(e===document)return!0;if(e===document.documentElement)return!0;if(e===t)return!0;if(c(e))return u(e,n)}return!0},p=()=>{const e=document.createElement("div");e.style.visibility="hidden",e.style.overflow="scroll";const t=document.createElement("div");e.appendChild(t),document.body.appendChild(e);const i=e.offsetWidth-t.offsetWidth;return document.body.removeChild(e),i},h=(0,n.iH)([]);function f(e){const t=(0,o.FN)();let i;(0,o.YP)(e,(e=>{e?(i=(0,n.B)(),i.run((()=>{h.value.push(t),(0,n.EB)((()=>{const e=h.value.indexOf(t);h.value.splice(e,1)}))}))):null==i||i.stop()}),{immediate:!0});const r=(0,o.Fl)((()=>(0,n.IU)(h.value[h.value.length-1])===t));return{isTop:r}}const g=(0,n.iH)([]),v=1e3;function y(e){const t=(0,o.FN)().uid,i=(0,n.iH)(0);return(0,o.YP)(e,(e=>{e?(g.value.push(t),i.value=v+2*(g.value.indexOf(t)+1)):g.value=g.value.filter((e=>e!==t))}),{immediate:!0}),{zIndex:i}}const m=e=>{const t=(0,n.iH)(!1),i=(0,n.iH)(!1);return e.value&&(t.value=!0,(0,o.Y3)((()=>{i.value=!0}))),(0,o.YP)(e,(e=>{if(!t.value)return t.value=!0,void(0,o.Y3)((()=>{i.value=e}));i.value=e})),{activatedOnce:t,active:i}},C=({overlay:e,content:t,contentActiveClass:i,fullscreen:n,contentFullscreenClass:o})=>{if(!a)return{disableScroll:()=>{},enableScroll:()=>{}};let r,s=!1;const l=i=>{(i.target===e.value||i.target===document.body||d(i,t.value))&&i.preventDefault()},c=p(),u=0===c,h=()=>{s||(u||n?(r="byOverflow",document.documentElement.classList.add("overflow-y-hidden")):(r="byEvents",window.addEventListener("wheel",l,{passive:!1})),s=!0)},f=()=>{if(s){if("byEvents"===r)window.removeEventListener("wheel",l);else if("byOverflow"===r){const e=document.getElementsByClassName(i),t=document.getElementsByClassName(o);(!u&&n&&1===t.length||1===e.length)&&document.documentElement.classList.remove("overflow-y-hidden")}s=!1}};return{disableScroll:h,enableScroll:f}};function b(e,t,i){(0,o.bv)((()=>{window.addEventListener(e,t,i)})),(0,o.Ah)((()=>{window.removeEventListener(e,t)}))}var w=(e,t)=>{const i=e.__vccOpts||e;for(const[n,o]of t)i[n]=o;return i};const S=(0,o.aZ)({name:"GDialogOverlay",props:{active:{type:Boolean,required:!0},zIndex:{type:Number,required:!0},background:{type:[Boolean,String],required:!0},local:{type:Boolean,required:!0}},emits:["click"],setup(e,{emit:t}){const i=(0,o.Fl)((()=>({zIndex:e.zIndex-1}))),r=(0,n.iH)(e.active),s=(0,n.iH)(!1);(0,o.YP)((()=>e.active),(e=>{s.value=!e,e?r.value=!0:(0,o.Y3)((()=>{r.value=!1}))}));const a=(0,o.Fl)((()=>["g-dialog-overlay",{"g-dialog-overlay--active":!s.value,"g-dialog-overlay--local":e.local}])),l=(0,o.Fl)((()=>"string"===typeof e.background?e.background:e.background?"var(--overlay-bg)":"transparent")),c=()=>{t("click")};
25return{activeProxy:r,styles:i,classes:a,computedBackground:l,onClick:c}}}),E=()=>{(0,r.sj)((e=>({"6eaca59a":e.computedBackground})))},x=S.setup;S.setup=x?(e,t)=>(E(),x(e,t)):E;const O=S;function T(e,t,i,n,a,l){return(0,o.wg)(),(0,o.j4)(r.uT,{name:"fade"},{default:(0,o.w5)((()=>[e.activeProxy?((0,o.wg)(),(0,o.iD)("div",{key:0,class:(0,s.C_)(e.classes),style:(0,s.j5)(e.styles),onClick:t[0]||(t[0]=(...t)=>e.onClick&&e.onClick(...t))},null,6)):(0,o.kq)("",!0)])),_:1})}var D=w(O,[["render",T]]);const R=e=>{const t=(0,o.Fl)((()=>({maxWidth:"none"===e.maxWidth?void 0:l(e.maxWidth),width:"auto"===e.width?void 0:l(e.width),height:"auto"===e.height?void 0:l(e.height)})));return{sizeStyles:t}};const A=(0,o.aZ)({name:"GDialogContent",props:{background:{type:[Boolean,String],required:!0},borderRadius:{type:[Boolean,Number,String],required:!0},class:{type:String,required:!0},depressed:{type:Boolean,required:!0},fullscreen:Boolean,height:{type:[String,Number],required:!0},maxWidth:{type:[String,Number],required:!0},scrollable:{type:Boolean,required:!0},width:{type:[String,Number],required:!0}},setup(e){const{sizeStyles:t}=R(e),i=(0,o.Fl)((()=>["g-dialog-content",e.class,{"g-dialog-content--scrollable":e.scrollable,"g-dialog-content--depressed":e.depressed,"g-dialog-content--fullscreen":e.fullscreen}])),n=(0,o.Fl)((()=>"string"===typeof e.background?e.background:e.background?"var(--content-bg)":"transparent")),r=(0,o.Fl)((()=>"string"===typeof e.borderRadius?l(e.borderRadius):e.borderRadius?"var(--content-border-radius)":"0"));return{styles:t,classes:i,computedBackground:n,computedBorderRadius:r}}}),_=()=>{(0,r.sj)((e=>({"889a571a":e.computedBackground,"023a843a":e.computedBorderRadius})))},P=A.setup;A.setup=P?(e,t)=>(_(),P(e,t)):_;const M=A;function k(e,t,i,n,r,a){return(0,o.wg)(),(0,o.iD)("div",{class:(0,s.C_)(e.classes),style:(0,s.j5)(e.styles)},[(0,o.WI)(e.$slots,"default")],6)}var N=w(M,[["render",k]]);const L=(0,o.aZ)({name:"GDialogFrame",components:{GDialogContent:N},inheritAttrs:!1,props:{isActive:{type:Boolean,required:!0},zIndex:{type:Number,required:!0},background:{type:[Boolean,String],required:!0},borderRadius:{type:[Boolean,Number,String],required:!0},contentClass:{type:String,required:!0},depressed:{type:Boolean,required:!0},fullscreen:{type:Boolean,required:!0},height:{type:[String,Number],required:!0},local:{type:Boolean,required:!0},maxWidth:{type:[String,Number],required:!0},scrollable:{type:Boolean,required:!0},transition:{type:String,required:!0},width:{type:[String,Number],required:!0}},setup(e){const t=(0,n.iH)(),i=()=>{var e,i;null==(i=null==(e=t.value)?void 0:e.animate)||i.call(e,[{transformOrigin:"center"},{transform:"scale(1.03)"},{transformOrigin:"center"}],{duration:150,easing:"cubic-bezier(0.4, 0, 0.2, 1)"})},r=(0,o.Fl)((()=>["g-dialog-frame",{"g-dialog-frame--active":e.isActive,"g-dialog-frame--local":e.local}])),s=(0,o.Fl)((()=>({zIndex:e.zIndex})));return{frameElement:t,classes:r,styles:s,animateClick:i}}});function I(e,t,i,n,a,l){const c=(0,o.up)("GDialogContent");return(0,o.wg)(),(0,o.j4)(r.uT,{name:e.transition},{default:(0,o.w5)((()=>[(0,o.wy)((0,o._)("div",{ref:"frameElement",class:(0,s.C_)(e.classes),style:(0,s.j5)(e.styles)},[(0,o.Wm)(c,{class:(0,s.C_)(e.contentClass),"max-width":e.maxWidth,width:e.width,height:e.height,scrollable:e.scrollable,depressed:e.depressed,fullscreen:e.fullscreen,background:e.background,"border-radius":e.borderRadius},{default:(0,o.w5)((()=>[(0,o.WI)(e.$slots,"default")])),_:3},8,["class","max-width","width","height","scrollable","depressed","fullscreen","background","border-radius"])],6),[[r.F8,e.isActive]])])),_:3},8,["name"])}var F=w(L,[["render",I]]);const G=(0,o.aZ)({name:"GDialog",components:{GDialogOverlay:D,GDialogFrame:F},inheritAttrs:!1,props:{background:{type:[Boolean,String],default:!0},borderRadius:{type:[Boolean,Number,String],default:!0},contentClass:{type:String,default:""},depressed:Boolean,fullscreen:Boolean,height:{type:[String,Number],default:"auto"},local:Boolean,maxWidth:{type:[String,Number],default:"none"},modelValue:{type:Boolean,default:void 0}
25,noClickAnimation:Boolean,overlayBackground:{type:[Boolean,String],default:!0},persistent:Boolean,scrollable:Boolean,teleportTo:{type:String,default:"body"},disableTeleport:Boolean,transition:{type:String,default:"g-dialog-transition"},width:{type:[String,Number],default:"auto"},closeOnBack:{type:Boolean,default:!1}},emits:{"update:modelValue":e=>!0},setup(e,{emit:t}){const i=(0,n.iH)(null),r=(0,n.iH)(null),s=(0,o.Fl)((()=>{var e;return null==(e=i.value)?void 0:e.$el})),l=(0,o.Fl)((()=>{var e;return null==(e=r.value)?void 0:e.$el})),c=void 0!==e.modelValue,u=(0,n.iH)(!1);(0,o.YP)((()=>e.modelValue),(e=>{u.value=!!e}));const{isTop:d}=f(u);a&&e.modelValue&&(0,o.Y3)((()=>{u.value=!0}));const p=()=>{c||(u.value=!1),t("update:modelValue",!1)},h=()=>{c||(u.value=!1),t("update:modelValue",!0)},{activatedOnce:g,active:v}=m(u),{zIndex:w}=y(v),S=()=>{var t;e.noClickAnimation||null==(t=r.value)||t.animateClick()};b("keyup",(t=>{"Escape"===t.key&&d.value&&(e.persistent?S():p())}),{passive:!0});const{enableScroll:E,disableScroll:x}=C({overlay:s,content:l,contentActiveClass:"g-dialog-frame--active",fullscreen:e.fullscreen,contentFullscreenClass:"g-dialog-frame--fullscreen"});(0,o.YP)(v,(t=>{e.local||(t?x():E())})),(0,o.Jd)((()=>{E()}));const O=()=>{e.persistent?S():p()};if(a&&e.closeOnBack){const e=(0,o.FN)();let t=`dialog-${e.uid}`;window.location.hash&&(t=`${window.location.hash.slice(1)}-${t}`);const i=()=>{!window.location.hash.includes(t)&&u.value&&p()};(0,o.bv)((()=>{u.value&&(window.location.hash=t),window.addEventListener("popstate",i)})),(0,o.Ah)((()=>{window.removeEventListener("popstate",i)})),(0,o.YP)(u,(i=>{!i&&window.location.hash.includes(t)?window.history.back():i&&(t=window.location.hash?`${window.location.hash.slice(1)}-dialog-${e.uid}`:`dialog-${e.uid}`,window.location.hash=`#${t}`)}))}const T={onClick(){h()}};return{overlayComponent:i,frameComponent:r,activatedOnce:g,zIndex:w,isActive:v,activatorAttrs:T,onClickOutside:O,onClose:p}}});function V(e,t,i,n,r,a){const l=(0,o.up)("GDialogOverlay"),c=(0,o.up)("GDialogFrame");return(0,o.wg)(),(0,o.iD)(o.HY,null,[(0,o.WI)(e.$slots,"activator",(0,s.vs)((0,o.F4)(e.activatorAttrs))),e.activatedOnce?((0,o.wg)(),(0,o.iD)(o.HY,{key:0},[((0,o.wg)(),(0,o.j4)(o.lR,{to:e.teleportTo,disabled:e.local||e.disableTeleport},[e.fullscreen?(0,o.kq)("",!0):((0,o.wg)(),(0,o.j4)(l,{key:0,ref:"overlayComponent",active:e.isActive,"z-index":e.zIndex,background:e.overlayBackground,local:e.local,onClick:e.onClickOutside},null,8,["active","z-index","background","local","onClick"]))],8,["to","disabled"])),((0,o.wg)(),(0,o.j4)(o.lR,{to:e.teleportTo,disabled:e.local||e.disableTeleport},[(0,o.Wm)(c,{ref:"frameComponent","is-active":e.isActive,"z-index":e.zIndex,"max-width":e.maxWidth,width:e.width,height:e.height,scrollable:e.scrollable,transition:e.transition,depressed:e.depressed,fullscreen:e.fullscreen,background:e.background,"border-radius":e.borderRadius,"content-class":e.contentClass,local:e.local,persistent:e.persistent},{default:(0,o.w5)((()=>[(0,o.WI)(e.$slots,"default",{onClose:e.onClose})])),_:3},8,["is-active","z-index","max-width","width","height","scrollable","transition","depressed","fullscreen","background","border-radius","content-class","local","persistent"])],8,["to","disabled"]))],64)):(0,o.kq)("",!0)],64)}var B=w(G,[["render",V]]);(0,n.Um)([]);const j={pluginIsNotInitialized(){console.error("The gitart-vue-dialog plugin is not initialized. Read how to solve: https://gitart-vue-dialog.gitart.org/guide/usage/plugin-usage.html#installation")}},H=Symbol("GDialog"),W={dialogs:[],addDialog:()=>(j.pluginIsNotInitialized(),null),removeDialog:()=>{j.pluginIsNotInitialized()}};(0,o.aZ)({name:"GDialogRoot",setup(){const{dialogs:e,removeDialog:t}=(0,o.f3)(H,W);function i(e){t(e)}return e===W.dialogs&&j.pluginIsNotInitialized(),{dialogs:e,onClose:i}}})},6808:function(e,t,i){i.d(t,{PO:function(){return V},iS:function(){return We},p7:function(){return nt},tv:function(){return rt}});i(2106);var n=i(5677),o=i(6907);
26/*!
27  * vue-router v4.2.5
28  * (c) 2023 Eduardo San Martin Morote
29  * @license MIT
30  */
31const r="undefined"!==typeof window;
31function s(e){return e.__esModule||"Module"===e[Symbol.toStringTag]}const a=Object.assign;function l(e,t){const i={};for(const n in t){const o=t[n];i[n]=u(o)?o.map(e):e(o)}return i}const c=()=>{},u=Array.isArray;const d=/\/$/,p=e=>e.replace(d,"");function h(e,t,i="/"){let n,o={},r="",s="";const a=t.indexOf("#");let l=t.indexOf("?");return a<l&&a>=0&&(l=-1),l>-1&&(n=t.slice(0,l),r=t.slice(l+1,a>-1?a:t.length),o=e(r)),a>-1&&(n=n||t.slice(0,a),s=t.slice(a,t.length)),n=w(null!=n?n:t,i),{fullPath:n+(r&&"?")+r+s,path:n,query:o,hash:s}}function f(e,t){const i=t.query?e(t.query):"";return t.path+(i&&"?")+i+(t.hash||"")}function g(e,t){return t&&e.toLowerCase().startsWith(t.toLowerCase())?e.slice(t.length)||"/":e}function v(e,t,i){const n=t.matched.length-1,o=i.matched.length-1;return n>-1&&n===o&&y(t.matched[n],i.matched[o])&&m(t.params,i.params)&&e(t.query)===e(i.query)&&t.hash===i.hash}function y(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function m(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const i in e)if(!C(e[i],t[i]))return!1;return!0}function C(e,t){return u(e)?b(e,t):u(t)?b(t,e):e===t}function b(e,t){return u(t)?e.length===t.length&&e.every(((e,i)=>e===t[i])):1===e.length&&e[0]===t}function w(e,t){if(e.startsWith("/"))return e;if(!e)return t;const i=t.split("/"),n=e.split("/"),o=n[n.length-1];".."!==o&&"."!==o||n.push("");let r,s,a=i.length-1;for(r=0;r<n.length;r++)if(s=n[r],"."!==s){if(".."!==s)break;a>1&&a--}return i.slice(0,a).join("/")+"/"+n.slice(r-(r===n.length?1:0)).join("/")}var S,E;(function(e){e["pop"]="pop",e["push"]="push"})(S||(S={})),function(e){e["back"]="back",e["forward"]="forward",e["unknown"]=""}(E||(E={}));function x(e){if(!e)if(r){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return"/"!==e[0]&&"#"!==e[0]&&(e="/"+e),p(e)}const O=/^[^#]+#/;function T(e,t){return e.replace(O,"#")+t}function D(e,t){const i=document.documentElement.getBoundingClientRect(),n=e.getBoundingClientRect();return{behavior:t.behavior,left:n.left-i.left-(t.left||0),top:n.top-i.top-(t.top||0)}}const R=()=>({left:window.pageXOffset,top:window.pageYOffset});function A(e){let t;if("el"in e){const i=e.el,n="string"===typeof i&&i.startsWith("#");0;const o="string"===typeof i?n?document.getElementById(i.slice(1)):document.querySelector(i):i;if(!o)return;t=D(o,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(null!=t.left?t.left:window.pageXOffset,null!=t.top?t.top:window.pageYOffset)}function _(e,t){const i=history.state?history.state.position-t:-1;return i+e}const P=new Map;function M(e,t){P.set(e,t)}function k(e){const t=P.get(e);return P.delete(e),t}let N=()=>location.protocol+"//"+location.host;function L(e,t){const{pathname:i,search:n,hash:o}=t,r=e.indexOf("#");if(r>-1){let t=o.includes(e.slice(r))?e.slice(r).length:1,i=o.slice(t);return"/"!==i[0]&&(i="/"+i),g(i,"")}const s=g(i,e);return s+n+o}function I(e,t,i,n){let o=[],r=[],s=null;const l=({state:r})=>{const a=L(e,location),l=i.value,c=t.value;let u=0;if(r){if(i.value=a,t.value=r,s&&s===l)return void(s=null);u=c?r.position-c.position:0}else n(a);o.forEach((e=>{e(i.value,l,{delta:u,type:S.pop,direction:u?u>0?E.forward:E.back:E.unknown})}))};function c(){s=i.value}function u(e){o.push(e);const t=()=>{const t=o.indexOf(e);t>-1&&o.splice(t,1)};return r.push(t),t}function d(){const{history:e}=window;e.state&&e.replaceState(a({},e.state,{scroll:R()}),"")}function p(){for(const e of r)e();r=[],window.removeEventListener("popstate",l),window.removeEventListener("beforeunload",d)}return window.addEventListener("popstate",l),window.addEventListener("beforeunload",d,{passive:!0}),{pauseListeners:c,listen:u,destroy:p}}function F(e,t,i,n=!1,o=!1){return{back:e,current:t,forward:i,replaced:n,position:window.history.length,scroll:o?R():null}}function G(e){const{history:t,location:i}=window,n={value:L(e,i)},o={value:t.state};function r(n,r,s){const a=e.indexOf("#"),l=a>-1?(i.host&&document.querySelector("base")?e:e.slice(a))+n:N()+e+n;try{t[s?"replaceState":"pushState"](r,"",l),o.value=r}catch(c){console.error(c),i[s?"replace":"assign"](l)}}function s(e,i){const s=a({},t.state,F(o.value.back,e,o.value.forward,!0),i,{position:o.value.position});r(e,s,!0),n.value=e}function l(e,i){const s=a({},o.value,t.state,{forward:e,scroll:R()});r(s.current,s,!0);const l=a({},F(n.value,e,null),{position:s.position+1},i);r(e,l,!1),n.value=e}return o.value||r(n.value,{back:null,current:n.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0),{location:n,state:o,push:l,replace:s}}function V(e){e=x(e);const t=G(e),i=I(e,t.state,t.location,t.replace);function n(e,t=!0){t||i.pauseListeners(),history.go(e)}const o=a({location:"",base:e,go:n,createHref:T.bind(null,e)},t,i);return Object.defineProperty(o,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(o,"state",{enumerable:!0,get:()=>t.state.value}),o}function B(e){return"string"===typeof e||e&&"object"===typeof e}function j(e){return"string"===typeof e||"symbol"===typeof e}const H={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},W=Symbol("");var U;(function(e){e[e["aborted"]=4]="aborted",e[e["cancelled"]=8]="cancelled",e[e["duplicated"]=16]="duplicated"})(U||(U={}));function z(e,t){return a(new Error,{type:e,[W]:!0},t)}function K(e,t){return e instanceof Error&&W in e&&(null==t||!!(e.type&t))}const Y="[^/]+?",q={sensitive:!1,strict:!1,start:!0,end:!0},X=/[.+*?^${}()[\]/\\]/g;function $(e,t){const i=a({},q,t),n=[];let o=i.start?"^":"";const r=[];for(const a of e){const e=a.length?[]:[90];i.strict&&!a.length&&(o+="/");for(let t=0;t<a.length;t++){const n=a[t];let s=40+(i.sensitive?.25:0);if(0===n.type)t||(o+="/"),o+=n.value.replace(X,"\\$&"),s+=40;else if(1===n.type){const{value:e,repeatable:i,optional:l,regexp:c}=n;r.push({name:e,repeatable:i,optional:l});const u=c||Y;if(u!==Y){s+=10;try{new RegExp(`(${u})`)}catch(d){throw new Error(`Invalid custom RegExp for param "${e}" (${u}): `+d.message)}}let p=i?`((?:${u}
31)(?:/(?:${u}))*)`:`(${u})`;t||(p=l&&a.length<2?`(?:/${p})`:"/"+p),l&&(p+="?"),o+=p,s+=20,l&&(s+=-8),i&&(s+=-20),".*"===u&&(s+=-50)}e.push(s)}n.push(e)}if(i.strict&&i.end){const e=n.length-1;n[e][n[e].length-1]+=.7000000000000001}i.strict||(o+="/?"),i.end?o+="$":i.strict&&(o+="(?:/|$)");const s=new RegExp(o,i.sensitive?"":"i");function l(e){const t=e.match(s),i={};if(!t)return null;for(let n=1;n<t.length;n++){const e=t[n]||"",o=r[n-1];i[o.name]=e&&o.repeatable?e.split("/"):e}return i}function c(t){let i="",n=!1;for(const o of e){n&&i.endsWith("/")||(i+="/"),n=!1;for(const e of o)if(0===e.type)i+=e.value;else if(1===e.type){const{value:r,repeatable:s,optional:a}=e,l=r in t?t[r]:"";if(u(l)&&!s)throw new Error(`Provided param "${r}" is an array but it is not repeatable (* or + modifiers)`);const c=u(l)?l.join("/"):l;if(!c){if(!a)throw new Error(`Missing required param "${r}"`);o.length<2&&(i.endsWith("/")?i=i.slice(0,-1):n=!0)}i+=c}}return i||"/"}return{re:s,score:n,keys:r,parse:l,stringify:c}}function Z(e,t){let i=0;while(i<e.length&&i<t.length){const n=t[i]-e[i];if(n)return n;i++}return e.length<t.length?1===e.length&&80===e[0]?-1:1:e.length>t.length?1===t.length&&80===t[0]?1:-1:0}function J(e,t){let i=0;const n=e.score,o=t.score;while(i<n.length&&i<o.length){const e=Z(n[i],o[i]);if(e)return e;i++}if(1===Math.abs(o.length-n.length)){if(Q(n))return 1;if(Q(o))return-1}return o.length-n.length}function Q(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const ee={type:0,value:""},te=/[a-zA-Z0-9_]/;function ie(e){if(!e)return[[]];if("/"===e)return[[ee]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(e){throw new Error(`ERR (${i})/"${c}": ${e}`)}let i=0,n=i;const o=[];let r;function s(){r&&o.push(r),r=[]}let a,l=0,c="",u="";function d(){c&&(0===i?r.push({type:0,value:c}):1===i||2===i||3===i?(r.length>1&&("*"===a||"+"===a)&&t(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),r.push({type:1,value:c,regexp:u,repeatable:"*"===a||"+"===a,optional:"*"===a||"?"===a})):t("Invalid state to consume buffer"),c="")}function p(){c+=a}while(l<e.length)if(a=e[l++],"\\"!==a||2===i)switch(i){case 0:"/"===a?(c&&d(),s()):":"===a?(d(),i=1):p();break;case 4:p(),i=n;break;case 1:"("===a?i=2:te.test(a)?p():(d(),i=0,"*"!==a&&"?"!==a&&"+"!==a&&l--);break;case 2:")"===a?"\\"==u[u.length-1]?u=u.slice(0,-1)+a:i=3:u+=a;break;case 3:d(),i=0,"*"!==a&&"?"!==a&&"+"!==a&&l--,u="";break;default:t("Unknown state");break}else n=i,i=4;return 2===i&&t(`Unfinished custom RegExp for param "${c}"`),d(),s(),o}function ne(e,t,i){const n=$(ie(e.path),i);const o=a(n,{record:e,parent:t,children:[],alias:[]});return t&&!o.record.aliasOf===!t.record.aliasOf&&t.children.push(o),o}function oe(e,t){const i=[],n=new Map;function o(e){return n.get(e)}function r(e,i,n){const o=!n,l=se(e);l.aliasOf=n&&n.record;const d=ue(t,e),p=[l];if("alias"in e){const t="string"===typeof e.alias?[e.alias]:e.alias;for(const e of t)p.push(a({},l,{components:n?n.record.components:l.components,path:e,aliasOf:n?n.record:l}))}let h,f;for(const t of p){const{path:a}=t;if(i&&"/"!==a[0]){const e=i.record.path,n="/"===e[e.length-1]?"":"/";t.path=i.record.path+(a&&n+a)}if(h=ne(t,i,d),n?n.alias.push(h):(f=f||h,f!==h&&f.alias.push(h),o&&e.name&&!le(h)&&s(e.name)),l.children){const e=l.children;for(let t=0;t<e.length;t++)r(e[t],h,n&&n.children[t])}n=n||h,(h.record.components&&Object.keys(h.record.components).length||h.record.name||h.record.redirect)&&u(h)}return f?()=>{s(f)}:c}function s(e){if(j(e)){const t=n.get(e);t&&(n.delete(e),i.splice(i.indexOf(t),1),t.children.forEach(s),t.alias.forEach(s))}else{const t=i.indexOf(e);t>-1&&(i.splice(t,1),e.record.name&&n.delete(e.record.name),e.children.forEach(s),e.alias.forEach(s))}}function l(){return i}function u(e){let t=0;while(t<i.length&&J(e,i[t])>=0&&(e.record.path!==i[t].record.path||!de(e,i[t])))t++;i.splice(t,0,e),e.record.name&&!le(e)&&n.set(e.record.name,e)}function d(e,t){let o,r,s,l={};if("name"in e&&e.name){if(o=n.get(e.name),!o)throw z(1,{location:e});0,s=o.record.name,l=a(re(t.params,o.keys.filter((e=>!e.optional)).map((e=>e.name))),e.params&&re(e.params,o.keys.map((e=>e.name)))),r=o.stringify(l)}else if("path"in e)r=e.path,o=i.find((e=>e.re.test(r))),o&&(l=o.parse(r),s=o.record.name);else{if(o=t.name?n.get(t.name):i.find((e=>e.re.test(t.path))),!o)throw z(1,{location:e,currentLocation:t});s=o.record.name,l=a({},t.params,e.params),r=o.stringify(l)}const c=[];let u=o;while(u)c.unshift(u.record),u=u.parent;return{name:s,path:r,params:l,matched:c,meta:ce(c)}}return t=ue({strict:!1,end:!0,sensitive:!1},t),e.forEach((e=>r(e))),{addRoute:r,resolve:d,removeRoute:s,getRoutes:l,getRecordMatcher:o}}function re(e,t){const i={};for(const n of t)n in e&&(i[n]=e[n]);return i}function se(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:ae(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}}}function ae(e){const t={},i=e.props||!1;if("component"in e)t.default=i;else for(const n in e.components)t[n]="object"===typeof i?i[n]:i;return t}function le(e){while(e){if(e.record.aliasOf)return!0;e=e.parent}return!1}function ce(e){return e.reduce(((e,t)=>a(e,t.meta)),{})}function ue(e,t){const i={};for(const n in e)i[n]=n in t?t[n]:e[n];return i}function de(e,t){return t.children.some((t=>t===e||de(e,t)))}const pe=/#/g,he=/&/g,fe=/\//g,ge=/=/g,ve=/\?/g,ye=/\+/g,me=/%5B/g,Ce=/%5D/g,be=/%5E/g,we=/%60/g,Se=/%7B/g,Ee=/%7C/g,xe=/%7D/g,Oe=/%20/g;function Te(e){return encodeURI(""+e).replace(Ee,"|").replace(me,"[").replace(Ce,"]")}function De(e){return Te(e).replace(Se,"{").replace(xe,"}").replace(be,"^")}function Re(e){return Te(e).replace(ye,"%2B").replace(Oe,"+").replace(pe,"%23").replace(he,"%26").replace(we,"`").replace(Se,"{").replace(xe,"}").replace(be,"^")}function Ae(e){return Re(e).replace(ge,"%3D")}function _e(e){return Te(e).replace(pe,"%23").replace(ve,"%3F")}function Pe(e){return null==e?"":_e(e).replace(fe,"%2F")}function Me(e){try{return decodeURIComponent(""+e)}catch(t){}return""+e}function ke(e){const t={};if(""===e||"?"===e)return t;const i="?"===e[0],n=(i?e.slice(1):e).split("&");for(let o=0;o<n.length;++o){const e=n[o].replace(ye," "),i=e.indexOf("="),r=Me(i<0?e:e.slice(0,i)),s=i<0?null:Me(e.slice(i+1));if(r in t){let e=t[r];u(e)||(e=t[r]=[e]),e.push(s)}else t[r]=s}return t}function Ne(e){let t="";for(let i in e){const n=e[i];if(i=Ae(i),null==n){void 0!==n&&(t+=(t.length?"&":"")+i);continue}const o=u(n)?n.map((e=>e&&Re(e))):[n&&Re(n)];o.forEach((e=>{void 0!==e&&(t+=(t.length?"&":"")+i,null!=e&&(t+="="+e))}))}return t}function Le(e){const t={};for(const i in e){const n=e[i];void 0!==n&&(t[i]=u(n)?n.map((e=>null==e?null:""+e)):null==n?n:""+n)}return t}const Ie=Symbol(""),Fe=Symbol(""),Ge=Symbol(""),Ve=Symbol(""),Be=Symbol("");function je(){let e=[];function t(t){return e.push(t),()=>{const i=e.indexOf(t);i>-1&&e.splice(i,1)}}function i(){e=[]}return{add:t,list:()=>e.slice(),reset:i}}function He(e,t,i){const o=()=>{e[t].delete(i)};(0,n.Ah)(o),(0,n.se)(o),(0,n.dl)((()=>{e[t].add(i)})),e[t].add(i)}function We(e){const t=(0,n.f3)(Ie,{}).value;t&&He(t,"leaveGuards",e)}function Ue(e,t,i,n,o){const r=n&&(n.enterCallbacks[o]=n.enterCallbacks[o]||[]);return()=>new Promise(((s,a)=>{const l=e=>{!1===e?a(z(4,{from:i,to:t})):e instanceof Error?a(e):B(e)?a(z(2,{from:t,to:e})):(r&&n.enterCallbacks[o]===r&&"function"===typeof e&&r.push(e),s())},c=e.call(n&&n.instances[o],t,i,l);let u=Promise.resolve(c);e.length<3&&(u=u.then(l)),u.catch((e=>a(e)))}))}function ze(e,t,i,n){const o=[];for(const r of e){0;for(const e in r.components){let a=r.components[e];if("beforeRouteEnter"===t||r.instances[e])if(Ke(a)){const s=a.__vccOpts||a,l=s[t];l&&o.push(Ue(l,i,n,r,e))}else{let l=a();0,o.push((()=>l.then((o=>
31{if(!o)return Promise.reject(new Error(`Couldn't resolve component "${e}" at "${r.path}"`));const a=s(o)?o.default:o;r.components[e]=a;const l=a.__vccOpts||a,c=l[t];return c&&Ue(c,i,n,r,e)()}))))}}}return o}function Ke(e){return"object"===typeof e||"displayName"in e||"props"in e||"__vccOpts"in e}function Ye(e){const t=(0,n.f3)(Ge),i=(0,n.f3)(Ve),r=(0,n.Fl)((()=>t.resolve((0,o.SU)(e.to)))),s=(0,n.Fl)((()=>{const{matched:e}=r.value,{length:t}=e,n=e[t-1],o=i.matched;if(!n||!o.length)return-1;const s=o.findIndex(y.bind(null,n));if(s>-1)return s;const a=Je(e[t-2]);return t>1&&Je(n)===a&&o[o.length-1].path!==a?o.findIndex(y.bind(null,e[t-2])):s})),a=(0,n.Fl)((()=>s.value>-1&&Ze(i.params,r.value.params))),l=(0,n.Fl)((()=>s.value>-1&&s.value===i.matched.length-1&&m(i.params,r.value.params)));function u(i={}){return $e(i)?t[(0,o.SU)(e.replace)?"replace":"push"]((0,o.SU)(e.to)).catch(c):Promise.resolve()}return{route:r,href:(0,n.Fl)((()=>r.value.href)),isActive:a,isExactActive:l,navigate:u}}const qe=(0,n.aZ)({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:Ye,setup(e,{slots:t}){const i=(0,o.qj)(Ye(e)),{options:r}=(0,n.f3)(Ge),s=(0,n.Fl)((()=>({[Qe(e.activeClass,r.linkActiveClass,"router-link-active")]:i.isActive,[Qe(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:i.isExactActive})));return()=>{const o=t.default&&t.default(i);return e.custom?o:(0,n.h)("a",{"aria-current":i.isExactActive?e.ariaCurrentValue:null,href:i.href,onClick:i.navigate,class:s.value},o)}}}),Xe=qe;function $e(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&(void 0===e.button||0===e.button)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function Ze(e,t){for(const i in t){const n=t[i],o=e[i];if("string"===typeof n){if(n!==o)return!1}else if(!u(o)||o.length!==n.length||n.some(((e,t)=>e!==o[t])))return!1}return!0}function Je(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Qe=(e,t,i)=>null!=e?e:null!=t?t:i,et=(0,n.aZ)({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:i}){const r=(0,n.f3)(Be),s=(0,n.Fl)((()=>e.route||r.value)),l=(0,n.f3)(Fe,0),c=(0,n.Fl)((()=>{let e=(0,o.SU)(l);const{matched:t}=s.value;let i;while((i=t[e])&&!i.components)e++;return e})),u=(0,n.Fl)((()=>s.value.matched[c.value]));(0,n.JJ)(Fe,(0,n.Fl)((()=>c.value+1))),(0,n.JJ)(Ie,u),(0,n.JJ)(Be,s);const d=(0,o.iH)();return(0,n.YP)((()=>[d.value,u.value,e.name]),(([e,t,i],[n,o,r])=>{t&&(t.instances[i]=e,o&&o!==t&&e&&e===n&&(t.leaveGuards.size||(t.leaveGuards=o.leaveGuards),t.updateGuards.size||(t.updateGuards=o.updateGuards))),!e||!t||o&&y(t,o)&&n||(t.enterCallbacks[i]||[]).forEach((t=>t(e)))}),{flush:"post"}),()=>{const o=s.value,r=e.name,l=u.value,c=l&&l.components[r];if(!c)return tt(i.default,{Component:c,route:o});
31const p=l.props[r],h=p?!0===p?o.params:"function"===typeof p?p(o):p:null,f=e=>{e.component.isUnmounted&&(l.instances[r]=null)},g=(0,n.h)(c,a({},h,t,{onVnodeUnmounted:f,ref:d}));return tt(i.default,{Component:g,route:o})||g}}});function tt(e,t){if(!e)return null;const i=e(t);return 1===i.length?i[0]:i}const it=et;function nt(e){const t=oe(e.routes,e),i=e.parseQuery||ke,s=e.stringifyQuery||Ne,d=e.history;const p=je(),g=je(),y=je(),m=(0,o.XI)(H);let C=H;r&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const b=l.bind(null,(e=>""+e)),w=l.bind(null,Pe),E=l.bind(null,Me);function x(e,i){let n,o;return j(e)?(n=t.getRecordMatcher(e),o=i):o=e,t.addRoute(o,n)}function O(e){const i=t.getRecordMatcher(e);i&&t.removeRoute(i)}function T(){return t.getRoutes().map((e=>e.record))}function D(e){return!!t.getRecordMatcher(e)}function P(e,n){if(n=a({},n||m.value),"string"===typeof e){const o=h(i,e,n.path),r=t.resolve({path:o.path},n),s=d.createHref(o.fullPath);return a(o,r,{params:E(r.params),hash:Me(o.hash),redirectedFrom:void 0,href:s})}let o;if("path"in e)o=a({},e,{path:h(i,e.path,n.path).path});else{const t=a({},e.params);for(const e in t)null==t[e]&&delete t[e];o=a({},e,{params:w(t)}),n.params=w(n.params)}const r=t.resolve(o,n),l=e.hash||"";r.params=b(E(r.params));const c=f(s,a({},e,{hash:De(l),path:r.path})),u=d.createHref(c);return a({fullPath:c,hash:l,query:s===Ne?Le(e.query):e.query||{}},r,{redirectedFrom:void 0,href:u})}function N(e){return"string"===typeof e?h(i,e,m.value.path):a({},e)}function L(e,t){if(C!==e)return z(8,{from:t,to:e})}function I(e){return V(e)}function F(e){return I(a(N(e),{replace:!0}))}function G(e){const t=e.matched[e.matched.length-1];if(t&&t.redirect){const{redirect:i}=t;let n="function"===typeof i?i(e):i;return"string"===typeof n&&(n=n.includes("?")||n.includes("#")?n=N(n):{path:n},n.params={}),a({query:e.query,hash:e.hash,params:"path"in n?{}:e.params},n)}}function V(e,t){const i=C=P(e),n=m.value,o=e.state,r=e.force,l=!0===e.replace,c=G(i);if(c)return V(a(N(c),{state:"object"===typeof c?a({},o,c.state):o,force:r,replace:l}),t||i);const u=i;let d;return u.redirectedFrom=t,!r&&v(s,n,i)&&(d=z(16,{to:u,from:n}),ne(n,n,!0,!1)),(d?Promise.resolve(d):U(u,n)).catch((e=>K(e)?K(e,2)?e:ie(e):ee(e,u,n))).then((e=>{if(e){if(K(e,2))return V(a({replace:l},N(e.to),{state:"object"===typeof e.to?a({},o,e.to.state):o,force:r}),t||u)}else e=q(u,n,!0,l,o);return Y(u,n,e),e}))}function B(e,t){const i=L(e,t);return i?Promise.reject(i):Promise.resolve()}function W(e){const t=ae.values().next().value;return t&&"function"===typeof t.runWithContext?t.runWithContext(e):e()}function U(e,t){let i;const[n,o,r]=ot(e,t);i=ze(n.reverse(),"beforeRouteLeave",e,t);for(const a of n)a.leaveGuards.forEach((n=>{i.push(Ue(n,e,t))}));const s=B.bind(null,e,t);return i.push(s),ce(i).then((()=>{i=[];for(const n of p.list())i.push(Ue(n,e,t));return i.push(s),ce(i)})).then((()=>{i=ze(o,"beforeRouteUpdate",e,t);for(const n of o)n.updateGuards.forEach((n=>{i.push(Ue(n,e,t))}));return i.push(s),ce(i)})).then((()=>{i=[];for(const n of r)if(n.beforeEnter)if(u(n.beforeEnter))for(const o of n.beforeEnter)i.push(Ue(o,e,t));else i.push(Ue(n.beforeEnter,e,t));return i.push(s),ce(i)})).then((()=>(e.matched.forEach((e=>e.enterCallbacks={})),i=ze(r,"beforeRouteEnter",e,t),i.push(s),ce(i)))).then((()=>{i=[];for(const n of g.list())i.push(Ue(n,e,t));return i.push(s),ce(i)})).catch((e=>K(e,8)?e:Promise.reject(e)))}function Y(e,t,i){y.list().forEach((n=>W((()=>n(e,t,i)))))}function q(e,t,i,n,o){const s=L(e,t);if(s)return s;const l=t===H,c=r?history.state:{};i&&(n||l?d.replace(e.fullPath,a({scroll:l&&c&&c.scroll},o)):d.push(e.fullPath,o)),m.value=e,ne(e,t,i,l),ie()}let X;function $(){X||(X=d.listen(((e,t,i)=>{if(!le.listening)return;const n=P(e),o=G(n);if(o)return void V(a(o,{replace:!0}),n).catch(c);C=n;const s=m.value;r&&M(_(s.fullPath,i.delta),R()),U(n,s).catch((e=>K(e,12)?e:K(e,2)?(V(e.to,n).then((e=>{K(e,20)&&!i.delta&&i.type===S.pop&&d.go(-1,!1)})).catch(c),Promise.reject()):(i.delta&&d.go(-i.delta,!1),ee(e,n,s)))).then((e=>{e=e||q(n,s,!1),e&&(i.delta&&!K(e,8)?d.go(-i.delta,!1):i.type===S.pop&&K(e,20)&&d.go(-1,!1)),Y(n,s,e)})).catch(c)})))}let Z,J=je(),Q=je();function ee(e,t,i){ie(e);const n=Q.list();
31return n.length?n.forEach((n=>n(e,t,i))):console.error(e),Promise.reject(e)}function te(){return Z&&m.value!==H?Promise.resolve():new Promise(((e,t)=>{J.add([e,t])}))}function ie(e){return Z||(Z=!e,$(),J.list().forEach((([t,i])=>e?i(e):t())),J.reset()),e}function ne(t,i,o,s){const{scrollBehavior:a}=e;if(!r||!a)return Promise.resolve();const l=!o&&k(_(t.fullPath,0))||(s||!o)&&history.state&&history.state.scroll||null;return(0,n.Y3)().then((()=>a(t,i,l))).then((e=>e&&A(e))).catch((e=>ee(e,t,i)))}const re=e=>d.go(e);let se;const ae=new Set,le={currentRoute:m,listening:!0,addRoute:x,removeRoute:O,hasRoute:D,getRoutes:T,resolve:P,options:e,push:I,replace:F,go:re,back:()=>re(-1),forward:()=>re(1),beforeEach:p.add,beforeResolve:g.add,afterEach:y.add,onError:Q.add,isReady:te,install(e){const t=this;e.component("RouterLink",Xe),e.component("RouterView",it),e.config.globalProperties.$router=t,Object.defineProperty(e.config.globalProperties,"$route",{enumerable:!0,get:()=>(0,o.SU)(m)}),r&&!se&&m.value===H&&(se=!0,I(d.location).catch((e=>{0})));const i={};for(const o in H)Object.defineProperty(i,o,{get:()=>m.value[o],enumerable:!0});e.provide(Ge,t),e.provide(Ve,(0,o.Um)(i)),e.provide(Be,m);const n=e.unmount;ae.add(e),e.unmount=function(){ae.delete(e),ae.size<1&&(C=H,X&&X(),X=null,m.value=H,se=!1,Z=!1),n()}}};function ce(e){return e.reduce(((e,t)=>e.then((()=>W(t)))),Promise.resolve())}return le}function ot(e,t){const i=[],n=[],o=[],r=Math.max(t.matched.length,e.matched.length);for(let s=0;s<r;s++){const r=t.matched[s];r&&(e.matched.find((e=>y(e,r)))?n.push(r):i.push(r));const a=e.matched[s];a&&(t.matched.find((e=>y(e,a)))||o.push(a))}return[i,n,o]}function rt(){return(0,n.f3)(Ge)}}}]);
32//# sourceMappingURL=chunk-vendors.58ba0cf4.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.