(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,67532,(t,e,r)=>{e.exports=function(t){return null==t}},41641,(t,e,r)=>{var n=t.r(35564),i=t.r(90514);e.exports=function(t){if(!i(t))return!1;var e=n(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},7398,(t,e,r)=>{var n=Math.ceil,i=Math.max;e.exports=function(t,e,r,o){for(var a=-1,l=i(n((e-t)/(r||1)),0),u=Array(l);l--;)u[o?l:++a]=t,t+=r;return u}},69449,(t,e,r)=>{e.exports=function(t,e){return t===e||t!=t&&e!=e}},29435,(t,e,r)=>{e.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=0x1fffffffffffff}},31403,(t,e,r)=>{var n=t.r(41641),i=t.r(29435);e.exports=function(t){return null!=t&&i(t.length)&&!n(t)}},17947,(t,e,r)=>{var n=/^(?:0|[1-9]\d*)$/;e.exports=function(t,e){var r=typeof t;return!!(e=null==e?0x1fffffffffffff:e)&&("number"==r||"symbol"!=r&&n.test(t))&&t>-1&&t%1==0&&t{var n=t.r(69449),i=t.r(31403),o=t.r(17947),a=t.r(90514);e.exports=function(t,e,r){if(!a(r))return!1;var l=typeof e;return("number"==l?!!(i(r)&&o(e,r.length)):"string"==l&&e in r)&&n(r[e],t)}},96297,(t,e,r)=>{var n=t.r(98536),i=1/0;e.exports=function(t){return t?(t=n(t))===i||t===-i?(t<0?-1:1)*17976931348623157e292:t==t?t:0:0===t?t:0}},23175,(t,e,r)=>{var n=t.r(7398),i=t.r(96506),o=t.r(96297);e.exports=function(t){return function(e,r,a){return a&&"number"!=typeof a&&i(e,r,a)&&(r=a=void 0),e=o(e),void 0===r?(r=e,e=0):r=o(r),a=void 0===a?e{e.exports=t.r(23175)()},11339,(t,e,r)=>{e.exports=Array.isArray},14084,(t,e,r)=>{var n=t.r(11339),i=t.r(26535),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;e.exports=function(t,e){if(n(t))return!1;var r=typeof t;return!!("number"==r||"symbol"==r||"boolean"==r||null==t||i(t))||a.test(t)||!o.test(t)||null!=e&&t in Object(e)}},61437,(t,e,r)=>{e.exports=t.r(31049)["__core-js_shared__"]},21927,(t,e,r)=>{var n,i=t.r(61437),o=(n=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";e.exports=function(t){return!!o&&o in t}},81219,(t,e,r)=>{var n=Function.prototype.toString;e.exports=function(t){if(null!=t){try{return n.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},12876,(t,e,r)=>{var n=t.r(41641),i=t.r(21927),o=t.r(90514),a=t.r(81219),l=/^\[object .+?Constructor\]$/,u=Object.prototype,s=Function.prototype.toString,c=u.hasOwnProperty,f=RegExp("^"+s.call(c).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(t){return!(!o(t)||i(t))&&(n(t)?f:l).test(a(t))}},27144,(t,e,r)=>{e.exports=function(t,e){return null==t?void 0:t[e]}},16495,(t,e,r)=>{var n=t.r(12876),i=t.r(27144);e.exports=function(t,e){var r=i(t,e);return n(r)?r:void 0}},98562,(t,e,r)=>{e.exports=t.r(16495)(Object,"create")},57644,(t,e,r)=>{var n=t.r(98562);e.exports=function(){this.__data__=n?n(null):{},this.size=0}},41650,(t,e,r)=>{e.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=!!e,e}},85862,(t,e,r)=>{var n=t.r(98562),i=Object.prototype.hasOwnProperty;e.exports=function(t){var e=this.__data__;if(n){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return i.call(e,t)?e[t]:void 0}},11962,(t,e,r)=>{var n=t.r(98562),i=Object.prototype.hasOwnProperty;e.exports=function(t){var e=this.__data__;return n?void 0!==e[t]:i.call(e,t)}},21233,(t,e,r)=>{var n=t.r(98562);e.exports=function(t,e){var r=this.__data__;return this.size+=+!this.has(t),r[t]=n&&void 0===e?"__lodash_hash_undefined__":e,this}},82317,(t,e,r)=>{var n=t.r(57644),i=t.r(41650),o=t.r(85862),a=t.r(11962),l=t.r(21233);function u(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e{e.exports=function(){this.__data__=[],this.size=0}},68025,(t,e,r)=>{var n=t.r(69449);e.exports=function(t,e){for(var r=t.length;r--;)if(n(t[r][0],e))return r;return -1}},62200,(t,e,r)=>{var n=t.r(68025),i=Array.prototype.splice;e.exports=function(t){var e=this.__data__,r=n(e,t);return!(r<0)&&(r==e.length-1?e.pop():i.call(e,r,1),--this.size,!0)}},61376,(t,e,r)=>{var n=t.r(68025);e.exports=function(t){var e=this.__data__,r=n(e,t);return r<0?void 0:e[r][1]}},16942,(t,e,r)=>{var n=t.r(68025);e.exports=function(t){return n(this.__data__,t)>-1}},61785,(t,e,r)=>{var n=t.r(68025);e.exports=function(t,e){var r=this.__data__,i=n(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this}},42093,(t,e,r)=>{var n=t.r(40631),i=t.r(62200),o=t.r(61376),a=t.r(16942),l=t.r(61785);function u(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e{e.exports=t.r(16495)(t.r(31049),"Map")},68724,(t,e,r)=>{var n=t.r(82317),i=t.r(42093),o=t.r(65436);e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(o||i),string:new n}}},72031,(t,e,r)=>{e.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},66818,(t,e,r)=>{var n=t.r(72031);e.exports=function(t,e){var r=t.__data__;return n(e)?r["string"==typeof e?"string":"hash"]:r.map}},43473,(t,e,r)=>{var n=t.r(66818);e.exports=function(t){var e=n(this,t).delete(t);return this.size-=!!e,e}},93320,(t,e,r)=>{var n=t.r(66818);e.exports=function(t){return n(this,t).get(t)}},65649,(t,e,r)=>{var n=t.r(66818);e.exports=function(t){return n(this,t).has(t)}},58735,(t,e,r)=>{var n=t.r(66818);e.exports=function(t,e){var r=n(this,t),i=r.size;return r.set(t,e),this.size+=+(r.size!=i),this}},4182,(t,e,r)=>{var n=t.r(68724),i=t.r(43473),o=t.r(93320),a=t.r(65649),l=t.r(58735);function u(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e{var n=t.r(4182);function i(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw TypeError("Expected a function");var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=t.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(i.Cache||n),r}i.Cache=n,e.exports=i},48050,(t,e,r)=>{var n=t.r(58568);e.exports=function(t){var e=n(t,function(t){return 500===r.size&&r.clear(),t}),r=e.cache;return e}},32939,(t,e,r)=>{var n=t.r(48050),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g;e.exports=n(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(i,function(t,r,n,i){e.push(n?i.replace(o,"$1"):r||t)}),e})},86028,(t,e,r)=>{e.exports=function(t,e){for(var r=-1,n=null==t?0:t.length,i=Array(n);++r{var n=t.r(57201),i=t.r(86028),o=t.r(11339),a=t.r(26535),l=1/0,u=n?n.prototype:void 0,s=u?u.toString:void 0;e.exports=function t(e){if("string"==typeof e)return e;if(o(e))return i(e,t)+"";if(a(e))return s?s.call(e):"";var r=e+"";return"0"==r&&1/e==-l?"-0":r}},99431,(t,e,r)=>{var n=t.r(83895);e.exports=function(t){return null==t?"":n(t)}},32040,(t,e,r)=>{var n=t.r(11339),i=t.r(14084),o=t.r(32939),a=t.r(99431);e.exports=function(t,e){return n(t)?t:i(t,e)?[t]:o(a(t))}},83768,(t,e,r)=>{var n=t.r(26535),i=1/0;e.exports=function(t){if("string"==typeof t||n(t))return t;var e=t+"";return"0"==e&&1/t==-i?"-0":e}},91903,(t,e,r)=>{var n=t.r(32040),i=t.r(83768);e.exports=function(t,e){e=n(e,t);for(var r=0,o=e.length;null!=t&&r{var n=t.r(91903);e.exports=function(t,e,r){var i=null==t?void 0:n(t,e);return void 0===i?r:i}},56775,(t,e,r)=>{e.exports=function(t,e){for(var r=-1,n=e.length,i=t.length;++r{var n=t.r(35564),i=t.r(38934);e.exports=function(t){return i(t)&&"[object Arguments]"==n(t)}},99680,(t,e,r)=>{var n=t.r(4365),i=t.r(38934),o=Object.prototype,a=o.hasOwnProperty,l=o.propertyIsEnumerable;e.exports=n(function(){return arguments}())?n:function(t){return i(t)&&a.call(t,"callee")&&!l.call(t,"callee")}},862,(t,e,r)=>{var n=t.r(57201),i=t.r(99680),o=t.r(11339),a=n?n.isConcatSpreadable:void 0;e.exports=function(t){return o(t)||i(t)||!!(a&&t&&t[a])}},67433,(t,e,r)=>{var n=t.r(56775),i=t.r(862);e.exports=function t(e,r,o,a,l){var u=-1,s=e.length;for(o||(o=i),l||(l=[]);++u0&&o(c)?r>1?t(c,r-1,o,a,l):n(l,c):a||(l[l.length]=c)}return l}},24896,(t,e,r)=>{var n=t.r(42093);e.exports=function(){this.__data__=new n,this.size=0}},93643,(t,e,r)=>{e.exports=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}},43282,(t,e,r)=>{e.exports=function(t){return this.__data__.get(t)}},77772,(t,e,r)=>{e.exports=function(t){return this.__data__.has(t)}},247,(t,e,r)=>{var n=t.r(42093),i=t.r(65436),o=t.r(4182);e.exports=function(t,e){var r=this.__data__;if(r instanceof n){var a=r.__data__;if(!i||a.length<199)return a.push([t,e]),this.size=++r.size,this;r=this.__data__=new o(a)}return r.set(t,e),this.size=r.size,this}},61342,(t,e,r)=>{var n=t.r(42093),i=t.r(24896),o=t.r(93643),a=t.r(43282),l=t.r(77772),u=t.r(247);function s(t){var e=this.__data__=new n(t);this.size=e.size}s.prototype.clear=i,s.prototype.delete=o,s.prototype.get=a,s.prototype.has=l,s.prototype.set=u,e.exports=s},68461,(t,e,r)=>{e.exports=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}},87215,(t,e,r)=>{e.exports=function(t){return this.__data__.has(t)}},27140,(t,e,r)=>{var n=t.r(4182),i=t.r(68461),o=t.r(87215);function a(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new n;++e{e.exports=function(t,e){for(var r=-1,n=null==t?0:t.length;++r{e.exports=function(t,e){return t.has(e)}},14425,(t,e,r)=>{var n=t.r(27140),i=t.r(95067),o=t.r(55902);e.exports=function(t,e,r,a,l,u){var s=1&r,c=t.length,f=e.length;if(c!=f&&!(s&&f>c))return!1;var d=u.get(t),p=u.get(e);if(d&&p)return d==e&&p==t;var h=-1,y=!0,m=2&r?new n:void 0;for(u.set(t,e),u.set(e,t);++h{e.exports=t.r(31049).Uint8Array},47296,(t,e,r)=>{e.exports=function(t){var e=-1,r=Array(t.size);return t.forEach(function(t,n){r[++e]=[n,t]}),r}},92456,(t,e,r)=>{e.exports=function(t){var e=-1,r=Array(t.size);return t.forEach(function(t){r[++e]=t}),r}},45169,(t,e,r)=>{var n=t.r(57201),i=t.r(20792),o=t.r(69449),a=t.r(14425),l=t.r(47296),u=t.r(92456),s=n?n.prototype:void 0,c=s?s.valueOf:void 0;e.exports=function(t,e,r,n,s,f,d){switch(r){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)break;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":if(t.byteLength!=e.byteLength||!f(new i(t),new i(e)))break;return!0;case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var p=l;case"[object Set]":var h=1&n;if(p||(p=u),t.size!=e.size&&!h)break;var y=d.get(t);if(y)return y==e;n|=2,d.set(t,e);var m=a(p(t),p(e),n,s,f,d);return d.delete(t),m;case"[object Symbol]":if(c)return c.call(t)==c.call(e)}return!1}},37919,(t,e,r)=>{var n=t.r(56775),i=t.r(11339);e.exports=function(t,e,r){var o=e(t);return i(t)?o:n(o,r(t))}},42668,(t,e,r)=>{e.exports=function(t,e){for(var r=-1,n=null==t?0:t.length,i=0,o=[];++r{e.exports=function(){return[]}},38467,(t,e,r)=>{var n=t.r(42668),i=t.r(56876),o=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols;e.exports=a?function(t){return null==t?[]:n(a(t=Object(t)),function(e){return o.call(t,e)})}:i},17491,(t,e,r)=>{e.exports=function(t,e){for(var r=-1,n=Array(t);++r{e.exports=function(){return!1}},88920,(t,e,r)=>{var n=t.r(31049),i=t.r(95464),o=r&&!r.nodeType&&r,a=o&&e&&!e.nodeType&&e,l=a&&a.exports===o?n.Buffer:void 0;e.exports=(l?l.isBuffer:void 0)||i},59217,(t,e,r)=>{var n=t.r(35564),i=t.r(29435),o=t.r(38934),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(t){return o(t)&&i(t.length)&&!!a[n(t)]}},85292,(t,e,r)=>{e.exports=function(t){return function(e){return t(e)}}},66665,(t,e,r)=>{var n=t.r(19258),i=r&&!r.nodeType&&r,o=i&&e&&!e.nodeType&&e,a=o&&o.exports===i&&n.process;e.exports=function(){try{var t=o&&o.require&&o.require("util").types;if(t)return t;return a&&a.binding&&a.binding("util")}catch(t){}}()},25168,(t,e,r)=>{var n=t.r(59217),i=t.r(85292),o=t.r(66665),a=o&&o.isTypedArray;e.exports=a?i(a):n},41016,(t,e,r)=>{var n=t.r(17491),i=t.r(99680),o=t.r(11339),a=t.r(88920),l=t.r(17947),u=t.r(25168),s=Object.prototype.hasOwnProperty;e.exports=function(t,e){var r=o(t),c=!r&&i(t),f=!r&&!c&&a(t),d=!r&&!c&&!f&&u(t),p=r||c||f||d,h=p?n(t.length,String):[],y=h.length;for(var m in t)(e||s.call(t,m))&&!(p&&("length"==m||f&&("offset"==m||"parent"==m)||d&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||l(m,y)))&&h.push(m);return h}},72384,(t,e,r)=>{var n=Object.prototype;e.exports=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||n)}},21981,(t,e,r)=>{e.exports=function(t,e){return function(r){return t(e(r))}}},30632,(t,e,r)=>{e.exports=t.r(21981)(Object.keys,Object)},18628,(t,e,r)=>{var n=t.r(72384),i=t.r(30632),o=Object.prototype.hasOwnProperty;e.exports=function(t){if(!n(t))return i(t);var e=[];for(var r in Object(t))o.call(t,r)&&"constructor"!=r&&e.push(r);return e}},48632,(t,e,r)=>{var n=t.r(41016),i=t.r(18628),o=t.r(31403);e.exports=function(t){return o(t)?n(t):i(t)}},3032,(t,e,r)=>{var n=t.r(37919),i=t.r(38467),o=t.r(48632);e.exports=function(t){return n(t,o,i)}},33658,(t,e,r)=>{var n=t.r(3032),i=Object.prototype.hasOwnProperty;e.exports=function(t,e,r,o,a,l){var u=1&r,s=n(t),c=s.length;if(c!=n(e).length&&!u)return!1;for(var f=c;f--;){var d=s[f];if(!(u?d in e:i.call(e,d)))return!1}var p=l.get(t),h=l.get(e);if(p&&h)return p==e&&h==t;var y=!0;l.set(t,e),l.set(e,t);for(var m=u;++f{e.exports=t.r(16495)(t.r(31049),"DataView")},87764,(t,e,r)=>{e.exports=t.r(16495)(t.r(31049),"Promise")},76952,(t,e,r)=>{e.exports=t.r(16495)(t.r(31049),"Set")},17783,(t,e,r)=>{e.exports=t.r(16495)(t.r(31049),"WeakMap")},7926,(t,e,r)=>{var n=t.r(71616),i=t.r(65436),o=t.r(87764),a=t.r(76952),l=t.r(17783),u=t.r(35564),s=t.r(81219),c="[object Map]",f="[object Promise]",d="[object Set]",p="[object WeakMap]",h="[object DataView]",y=s(n),m=s(i),v=s(o),g=s(a),b=s(l),x=u;(n&&x(new n(new ArrayBuffer(1)))!=h||i&&x(new i)!=c||o&&x(o.resolve())!=f||a&&x(new a)!=d||l&&x(new l)!=p)&&(x=function(t){var e=u(t),r="[object Object]"==e?t.constructor:void 0,n=r?s(r):"";if(n)switch(n){case y:return h;case m:return c;case v:return f;case g:return d;case b:return p}return e}),e.exports=x},51986,(t,e,r)=>{var n=t.r(61342),i=t.r(14425),o=t.r(45169),a=t.r(33658),l=t.r(7926),u=t.r(11339),s=t.r(88920),c=t.r(25168),f="[object Arguments]",d="[object Array]",p="[object Object]",h=Object.prototype.hasOwnProperty;e.exports=function(t,e,r,y,m,v){var g=u(t),b=u(e),x=g?d:l(t),w=b?d:l(e);x=x==f?p:x,w=w==f?p:w;var O=x==p,j=w==p,S=x==w;if(S&&s(t)){if(!s(e))return!1;g=!0,O=!1}if(S&&!O)return v||(v=new n),g||c(t)?i(t,e,r,y,m,v):o(t,e,x,r,y,m,v);if(!(1&r)){var k=O&&h.call(t,"__wrapped__"),P=j&&h.call(e,"__wrapped__");if(k||P){var E=k?t.value():t,A=P?e.value():e;return v||(v=new n),m(E,A,r,y,v)}}return!!S&&(v||(v=new n),a(t,e,r,y,m,v))}},93770,(t,e,r)=>{var n=t.r(51986),i=t.r(38934);e.exports=function t(e,r,o,a,l){return e===r||(null!=e&&null!=r&&(i(e)||i(r))?n(e,r,o,a,t,l):e!=e&&r!=r)}},6715,(t,e,r)=>{var n=t.r(61342),i=t.r(93770);e.exports=function(t,e,r,o){var a=r.length,l=a,u=!o;if(null==t)return!l;for(t=Object(t);a--;){var s=r[a];if(u&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++a{var n=t.r(90514);e.exports=function(t){return t==t&&!n(t)}},18479,(t,e,r)=>{var n=t.r(31116),i=t.r(48632);e.exports=function(t){for(var e=i(t),r=e.length;r--;){var o=e[r],a=t[o];e[r]=[o,a,n(a)]}return e}},42521,(t,e,r)=>{e.exports=function(t,e){return function(r){return null!=r&&r[t]===e&&(void 0!==e||t in Object(r))}}},85102,(t,e,r)=>{var n=t.r(6715),i=t.r(18479),o=t.r(42521);e.exports=function(t){var e=i(t);return 1==e.length&&e[0][2]?o(e[0][0],e[0][1]):function(r){return r===t||n(r,t,e)}}},55338,(t,e,r)=>{e.exports=function(t,e){return null!=t&&e in Object(t)}},95085,(t,e,r)=>{var n=t.r(32040),i=t.r(99680),o=t.r(11339),a=t.r(17947),l=t.r(29435),u=t.r(83768);e.exports=function(t,e,r){e=n(e,t);for(var s=-1,c=e.length,f=!1;++s{var n=t.r(55338),i=t.r(95085);e.exports=function(t,e){return null!=t&&i(t,e,n)}},43417,(t,e,r)=>{var n=t.r(93770),i=t.r(95284),o=t.r(51190),a=t.r(14084),l=t.r(31116),u=t.r(42521),s=t.r(83768);e.exports=function(t,e){return a(t)&&l(e)?u(s(t),e):function(r){var a=i(r,t);return void 0===a&&a===e?o(r,t):n(e,a,3)}}},82230,(t,e,r)=>{e.exports=function(t){return t}},39908,(t,e,r)=>{e.exports=function(t){return function(e){return null==e?void 0:e[t]}}},71930,(t,e,r)=>{var n=t.r(91903);e.exports=function(t){return function(e){return n(e,t)}}},11110,(t,e,r)=>{var n=t.r(39908),i=t.r(71930),o=t.r(14084),a=t.r(83768);e.exports=function(t){return o(t)?n(a(t)):i(t)}},7936,(t,e,r)=>{var n=t.r(85102),i=t.r(43417),o=t.r(82230),a=t.r(11339),l=t.r(11110);e.exports=function(t){return"function"==typeof t?t:null==t?o:"object"==typeof t?a(t)?i(t[0],t[1]):n(t):l(t)}},41711,(t,e,r)=>{e.exports=function(t){return function(e,r,n){for(var i=-1,o=Object(e),a=n(e),l=a.length;l--;){var u=a[t?l:++i];if(!1===r(o[u],u,o))break}return e}}},87910,(t,e,r)=>{e.exports=t.r(41711)()},25444,(t,e,r)=>{var n=t.r(87910),i=t.r(48632);e.exports=function(t,e){return t&&n(t,e,i)}},63404,(t,e,r)=>{var n=t.r(31403);e.exports=function(t,e){return function(r,i){if(null==r)return r;if(!n(r))return t(r,i);for(var o=r.length,a=e?o:-1,l=Object(r);(e?a--:++a{var n=t.r(25444);e.exports=t.r(63404)(n)},18670,(t,e,r)=>{var n=t.r(33610),i=t.r(31403);e.exports=function(t,e){var r=-1,o=i(t)?Array(t.length):[];return n(t,function(t,n,i){o[++r]=e(t,n,i)}),o}},12192,(t,e,r)=>{e.exports=function(t,e){var r=t.length;for(t.sort(e);r--;)t[r]=t[r].value;return t}},96951,(t,e,r)=>{var n=t.r(26535);e.exports=function(t,e){if(t!==e){var r=void 0!==t,i=null===t,o=t==t,a=n(t),l=void 0!==e,u=null===e,s=e==e,c=n(e);if(!u&&!c&&!a&&t>e||a&&l&&s&&!u&&!c||i&&l&&s||!r&&s||!o)return 1;if(!i&&!a&&!c&&t{var n=t.r(96951);e.exports=function(t,e,r){for(var i=-1,o=t.criteria,a=e.criteria,l=o.length,u=r.length;++i=u)return s;return s*("desc"==r[i]?-1:1)}}return t.index-e.index}},43938,(t,e,r)=>{var n=t.r(86028),i=t.r(91903),o=t.r(7936),a=t.r(18670),l=t.r(12192),u=t.r(85292),s=t.r(22024),c=t.r(82230),f=t.r(11339);e.exports=function(t,e,r){e=e.length?n(e,function(t){return f(t)?function(e){return i(e,1===t.length?t[0]:t)}:t}):[c];var d=-1;return e=n(e,u(o)),l(a(t,function(t,r,i){return{criteria:n(e,function(e){return e(t)}),index:++d,value:t}}),function(t,e){return s(t,e,r)})}},7148,(t,e,r)=>{e.exports=function(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}},60688,(t,e,r)=>{var n=t.r(7148),i=Math.max;e.exports=function(t,e,r){return e=i(void 0===e?t.length-1:e,0),function(){for(var o=arguments,a=-1,l=i(o.length-e,0),u=Array(l);++a{e.exports=function(t){return function(){return t}}},66026,(t,e,r)=>{var n=t.r(16495);e.exports=function(){try{var t=n(Object,"defineProperty");return t({},"",{}),t}catch(t){}}()},4528,(t,e,r)=>{var n=t.r(55688),i=t.r(66026),o=t.r(82230);e.exports=i?function(t,e){return i(t,"toString",{configurable:!0,enumerable:!1,value:n(e),writable:!0})}:o},30113,(t,e,r)=>{var n=Date.now;e.exports=function(t){var e=0,r=0;return function(){var i=n(),o=16-(i-r);if(r=i,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}},19627,(t,e,r)=>{var n=t.r(4528);e.exports=t.r(30113)(n)},61977,(t,e,r)=>{var n=t.r(82230),i=t.r(60688),o=t.r(19627);e.exports=function(t,e){return o(i(t,e,n),t+"")}},15694,(t,e,r)=>{var n=t.r(67433),i=t.r(43938),o=t.r(61977),a=t.r(96506);e.exports=o(function(t,e){if(null==t)return[];var r=e.length;return r>1&&a(t,e[0],e[1])?e=[]:r>2&&a(e[0],e[1],e[2])&&(e=[e[0]]),i(t,n(e,1),[])})},40758,(t,e,r)=>{var n=t.r(75551),i=t.r(90514);e.exports=function(t,e,r){var o=!0,a=!0;if("function"!=typeof t)throw TypeError("Expected a function");return i(r)&&(o="leading"in r?!!r.leading:o,a="trailing"in r?!!r.trailing:a),n(t,e,{leading:o,maxWait:e,trailing:a})}},37696,(t,e,r)=>{var n=t.r(35564),i=t.r(11339),o=t.r(38934);e.exports=function(t){return"string"==typeof t||!i(t)&&o(t)&&"[object String]"==n(t)}},10962,(t,e,r)=>{"use strict";var n,i=Symbol.for("react.element"),o=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),c=Symbol.for("react.context"),f=Symbol.for("react.server_context"),d=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),y=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen");function g(t){if("object"==typeof t&&null!==t){var e=t.$$typeof;switch(e){case i:switch(t=t.type){case a:case u:case l:case p:case h:return t;default:switch(t=t&&t.$$typeof){case f:case c:case d:case m:case y:case s:return t;default:return e}}case o:return e}}}n=Symbol.for("react.module.reference"),r.ContextConsumer=c,r.ContextProvider=s,r.Element=i,r.ForwardRef=d,r.Fragment=a,r.Lazy=m,r.Memo=y,r.Portal=o,r.Profiler=u,r.StrictMode=l,r.Suspense=p,r.SuspenseList=h,r.isAsyncMode=function(){return!1},r.isConcurrentMode=function(){return!1},r.isContextConsumer=function(t){return g(t)===c},r.isContextProvider=function(t){return g(t)===s},r.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===i},r.isForwardRef=function(t){return g(t)===d},r.isFragment=function(t){return g(t)===a},r.isLazy=function(t){return g(t)===m},r.isMemo=function(t){return g(t)===y},r.isPortal=function(t){return g(t)===o},r.isProfiler=function(t){return g(t)===u},r.isStrictMode=function(t){return g(t)===l},r.isSuspense=function(t){return g(t)===p},r.isSuspenseList=function(t){return g(t)===h},r.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===a||t===u||t===l||t===p||t===h||t===v||"object"==typeof t&&null!==t&&(t.$$typeof===m||t.$$typeof===y||t.$$typeof===s||t.$$typeof===c||t.$$typeof===d||t.$$typeof===n||void 0!==t.getModuleId)||!1},r.typeOf=g},88312,(t,e,r)=>{"use strict";e.exports=t.r(10962)},29369,(t,e,r)=>{var n=t.r(35564),i=t.r(38934);e.exports=function(t){return"number"==typeof t||i(t)&&"[object Number]"==n(t)}},57877,(t,e,r)=>{var n=t.r(29369);e.exports=function(t){return n(t)&&t!=+t}},80647,(t,e,r)=>{e.exports=function(t,e,r,n){for(var i=t.length,o=r+(n?1:-1);n?o--:++o{e.exports=function(t){return t!=t}},15373,(t,e,r)=>{e.exports=function(t,e,r){for(var n=r-1,i=t.length;++n{var n=t.r(80647),i=t.r(57068),o=t.r(15373);e.exports=function(t,e,r){return e==e?o(t,e,r):n(t,i,r)}},65814,(t,e,r)=>{var n=t.r(42309);e.exports=function(t,e){return!!(null==t?0:t.length)&&n(t,e,0)>-1}},75795,(t,e,r)=>{e.exports=function(t,e,r){for(var n=-1,i=null==t?0:t.length;++n{e.exports=function(){}},2945,(t,e,r)=>{var n=t.r(76952),i=t.r(40636),o=t.r(92456);e.exports=n&&1/o(new n([,-0]))[1]==1/0?function(t){return new n(t)}:i},40918,(t,e,r)=>{var n=t.r(27140),i=t.r(65814),o=t.r(75795),a=t.r(55902),l=t.r(2945),u=t.r(92456);e.exports=function(t,e,r){var s=-1,c=i,f=t.length,d=!0,p=[],h=p;if(r)d=!1,c=o;else if(f>=200){var y=e?null:l(t);if(y)return u(y);d=!1,c=a,h=new n}else h=e?[]:p;t:for(;++s{var n=t.r(7936),i=t.r(40918);e.exports=function(t,e){return t&&t.length?i(t,n(e,2)):[]}},58788,(t,e,r)=>{e.exports=function(t,e,r){var n=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(r=r>i?i:r)<0&&(r+=i),i=e>r?0:r-e>>>0,e>>>=0;for(var o=Array(i);++n{var n=t.r(58788);e.exports=function(t,e,r){var i=t.length;return r=void 0===r?i:r,!e&&r>=i?t:n(t,e,r)}},72125,(t,e,r)=>{var n=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(t){return n.test(t)}},61136,(t,e,r)=>{e.exports=function(t){return t.split("")}},37773,(t,e,r)=>{var n="\\ud800-\\udfff",i="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",o="\\ud83c[\\udffb-\\udfff]",a="[^"+n+"]",l="(?:\\ud83c[\\udde6-\\uddff]){2}",u="[\\ud800-\\udbff][\\udc00-\\udfff]",s="(?:"+i+"|"+o+")?",c="[\\ufe0e\\ufe0f]?",f="(?:\\u200d(?:"+[a,l,u].join("|")+")"+c+s+")*",d=RegExp(o+"(?="+o+")|"+("(?:"+[a+i+"?",i,l,u,"["+n+"]"].join("|"))+")"+(c+s+f),"g");e.exports=function(t){return t.match(d)||[]}},63698,(t,e,r)=>{var n=t.r(61136),i=t.r(72125),o=t.r(37773);e.exports=function(t){return i(t)?o(t):n(t)}},64508,(t,e,r)=>{var n=t.r(11683),i=t.r(72125),o=t.r(63698),a=t.r(99431);e.exports=function(t){return function(e){var r=i(e=a(e))?o(e):void 0,l=r?r[0]:e.charAt(0),u=r?n(r,1).join(""):e.slice(1);return l[t]()+u}}},93153,(t,e,r)=>{e.exports=t.r(64508)("toUpperCase")},49211,(t,e,r)=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},59395,(t,e,r)=>{"use strict";var n=t.r(49211);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function t(t,e,r,i,o,a){if(a!==n){var l=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function e(){return t}t.isRequired=t;var r={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:o,resetWarningCache:i};return r.PropTypes=r,r}},6229,(t,e,r)=>{e.exports=t.r(59395)()},81714,(t,e,r)=>{var n=t.r(26535);e.exports=function(t,e,r){for(var i=-1,o=t.length;++i{e.exports=function(t,e){return t>e}},56877,(t,e,r)=>{var n=t.r(81714),i=t.r(78640),o=t.r(82230);e.exports=function(t){return t&&t.length?n(t,o,i):void 0}},92166,(t,e,r)=>{e.exports=function(t,e){return t{var n=t.r(81714),i=t.r(92166),o=t.r(82230);e.exports=function(t){return t&&t.length?n(t,o,i):void 0}},4379,(t,e,r)=>{var n=t.r(86028),i=t.r(7936),o=t.r(18670),a=t.r(11339);e.exports=function(t,e){return(a(t)?n:o)(t,i(e,3))}},94904,(t,e,r)=>{var n=t.r(67433),i=t.r(4379);e.exports=function(t,e){return n(i(t,e),1)}},7863,(t,e,r)=>{var n=t.r(93770);e.exports=function(t,e){return n(t,e)}},27590,(t,e,r)=>{!function(r){"use strict";var n,i={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},o=!0,a="[DecimalError] ",l=a+"Invalid argument: ",u=a+"Exponent out of range: ",s=Math.floor,c=Math.pow,f=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,d=s(1286742750677284.5),p={};function h(t,e){var r,n,i,a,l,u,s,c,f=t.constructor,d=f.precision;if(!t.s||!e.s)return e.s||(e=new f(t)),o?S(e,d):e;if(s=t.d,c=e.d,l=t.e,i=e.e,s=s.slice(),a=l-i){for(a<0?(n=s,a=-a,u=c.length):(n=c,i=l,u=s.length),a>(u=(l=Math.ceil(d/7))>u?l+1:u+1)&&(a=u,n.length=1),n.reverse();a--;)n.push(0);n.reverse()}for((u=s.length)-(a=c.length)<0&&(a=u,n=c,c=s,s=n),r=0;a;)r=(s[--a]=s[a]+c[a]+r)/1e7|0,s[a]%=1e7;for(r&&(s.unshift(r),++i),u=s.length;0==s[--u];)s.pop();return e.d=s,e.e=i,o?S(e,d):e}function y(t,e,r){if(t!==~~t||tr)throw Error(l+t)}function m(t){var e,r,n,i=t.length-1,o="",a=t[0];if(i>0){for(o+=a,e=1;et.e^this.s<0?1:-1;for(e=0,r=(n=this.d.length)<(i=t.d.length)?n:i;et.d[e]^this.s<0?1:-1;return n===i?0:n>i^this.s<0?1:-1},p.decimalPlaces=p.dp=function(){var t=this.d.length-1,e=(t-this.e)*7;if(t=this.d[t])for(;t%10==0;t/=10)e--;return e<0?0:e},p.dividedBy=p.div=function(t){return v(this,new this.constructor(t))},p.dividedToIntegerBy=p.idiv=function(t){var e=this.constructor;return S(v(this,new e(t),0,1),e.precision)},p.equals=p.eq=function(t){return!this.cmp(t)},p.exponent=function(){return b(this)},p.greaterThan=p.gt=function(t){return this.cmp(t)>0},p.greaterThanOrEqualTo=p.gte=function(t){return this.cmp(t)>=0},p.isInteger=p.isint=function(){return this.e>this.d.length-2},p.isNegative=p.isneg=function(){return this.s<0},p.isPositive=p.ispos=function(){return this.s>0},p.isZero=function(){return 0===this.s},p.lessThan=p.lt=function(t){return 0>this.cmp(t)},p.lessThanOrEqualTo=p.lte=function(t){return 1>this.cmp(t)},p.logarithm=p.log=function(t){var e,r=this.constructor,i=r.precision,l=i+5;if(void 0===t)t=new r(10);else if((t=new r(t)).s<1||t.eq(n))throw Error(a+"NaN");if(this.s<1)throw Error(a+(this.s?"NaN":"-Infinity"));return this.eq(n)?new r(0):(o=!1,e=v(O(this,l),O(t,l),l),o=!0,S(e,i))},p.minus=p.sub=function(t){return t=new this.constructor(t),this.s==t.s?k(this,t):h(this,(t.s=-t.s,t))},p.modulo=p.mod=function(t){var e,r=this.constructor,n=r.precision;if(!(t=new r(t)).s)throw Error(a+"NaN");return this.s?(o=!1,e=v(this,t,0,1).times(t),o=!0,this.minus(e)):S(new r(this),n)},p.naturalExponential=p.exp=function(){return g(this)},p.naturalLogarithm=p.ln=function(){return O(this)},p.negated=p.neg=function(){var t=new this.constructor(this);return t.s=-t.s||0,t},p.plus=p.add=function(t){return t=new this.constructor(t),this.s==t.s?h(this,t):k(this,(t.s=-t.s,t))},p.precision=p.sd=function(t){var e,r,n;if(void 0!==t&&!!t!==t&&1!==t&&0!==t)throw Error(l+t);if(e=b(this)+1,r=7*(n=this.d.length-1)+1,n=this.d[n]){for(;n%10==0;n/=10)r--;for(n=this.d[0];n>=10;n/=10)r++}return t&&e>r?e:r},p.squareRoot=p.sqrt=function(){var t,e,r,n,i,l,u,c=this.constructor;if(this.s<1){if(!this.s)return new c(0);throw Error(a+"NaN")}for(t=b(this),o=!1,0==(i=Math.sqrt(+this))||i==1/0?(((e=m(this.d)).length+t)%2==0&&(e+="0"),i=Math.sqrt(e),t=s((t+1)/2)-(t<0||t%2),n=new c(e=i==1/0?"5e"+t:(e=i.toExponential()).slice(0,e.indexOf("e")+1)+t)):n=new c(i.toString()),i=u=(r=c.precision)+3;;)if(n=(l=n).plus(v(this,l,u+2)).times(.5),m(l.d).slice(0,u)===(e=m(n.d)).slice(0,u)){if(e=e.slice(u-3,u+1),i==u&&"4999"==e){if(S(l,r+1,0),l.times(l).eq(this)){n=l;break}}else if("9999"!=e)break;u+=4}return o=!0,S(n,r)},p.times=p.mul=function(t){var e,r,n,i,a,l,u,s,c,f=this.constructor,d=this.d,p=(t=new f(t)).d;if(!this.s||!t.s)return new f(0);for(t.s*=this.s,r=this.e+t.e,(s=d.length)<(c=p.length)&&(a=d,d=p,p=a,l=s,s=c,c=l),a=[],n=l=s+c;n--;)a.push(0);for(n=c;--n>=0;){for(e=0,i=s+n;i>n;)u=a[i]+p[n]*d[i-n-1]+e,a[i--]=u%1e7|0,e=u/1e7|0;a[i]=(a[i]+e)%1e7|0}for(;!a[--l];)a.pop();return e?++r:a.shift(),t.d=a,t.e=r,o?S(t,f.precision):t},p.toDecimalPlaces=p.todp=function(t,e){var r=this,n=r.constructor;return(r=new n(r),void 0===t)?r:(y(t,0,1e9),void 0===e?e=n.rounding:y(e,0,8),S(r,t+b(r)+1,e))},p.toExponential=function(t,e){var r,n=this,i=n.constructor;return void 0===t?r=P(n,!0):(y(t,0,1e9),void 0===e?e=i.rounding:y(e,0,8),r=P(n=S(new i(n),t+1,e),!0,t+1)),r},p.toFixed=function(t,e){var r,n,i=this.constructor;return void 0===t?P(this):(y(t,0,1e9),void 0===e?e=i.rounding:y(e,0,8),r=P((n=S(new i(this),t+b(this)+1,e)).abs(),!1,t+b(n)+1),this.isneg()&&!this.isZero()?"-"+r:r)},p.toInteger=p.toint=function(){var t=this.constructor;return S(new t(this),b(this)+1,t.rounding)},p.toNumber=function(){return+this},p.toPower=p.pow=function(t){var e,r,i,l,u,c,f=this,d=f.constructor,p=+(t=new d(t));if(!t.s)return new d(n);if(!(f=new d(f)).s){if(t.s<1)throw Error(a+"Infinity");return f}if(f.eq(n))return f;if(i=d.precision,t.eq(n))return S(f,i);if(c=(e=t.e)>=(r=t.d.length-1),u=f.s,c){if((r=p<0?-p:p)<=0x1fffffffffffff){for(l=new d(n),e=Math.ceil(i/7+4),o=!1;r%2&&E((l=l.times(f)).d,e),0!==(r=s(r/2));)E((f=f.times(f)).d,e);return o=!0,t.s<0?new d(n).div(l):S(l,i)}}else if(u<0)throw Error(a+"NaN");return u=u<0&&1&t.d[Math.max(e,r)]?-1:1,f.s=1,o=!1,l=t.times(O(f,i+12)),o=!0,(l=g(l)).s=u,l},p.toPrecision=function(t,e){var r,n,i=this,o=i.constructor;return void 0===t?(r=b(i),n=P(i,r<=o.toExpNeg||r>=o.toExpPos)):(y(t,1,1e9),void 0===e?e=o.rounding:y(e,0,8),r=b(i=S(new o(i),t,e)),n=P(i,t<=r||r<=o.toExpNeg,t)),n},p.toSignificantDigits=p.tosd=function(t,e){var r=this.constructor;return void 0===t?(t=r.precision,e=r.rounding):(y(t,1,1e9),void 0===e?e=r.rounding:y(e,0,8)),S(new r(this),t,e)},p.toString=p.valueOf=p.val=p.toJSON=function(){var t=b(this),e=this.constructor;return P(this,t<=e.toExpNeg||t>=e.toExpPos)};var v=function(){function t(t,e){var r,n=0,i=t.length;for(t=t.slice();i--;)r=t[i]*e+n,t[i]=r%1e7|0,n=r/1e7|0;return n&&t.unshift(n),t}function e(t,e,r,n){var i,o;if(r!=n)o=r>n?1:-1;else for(i=o=0;ie[i]?1:-1;break}return o}function r(t,e,r){for(var n=0;r--;)t[r]-=n,n=+(t[r]1;)t.shift()}return function(n,i,o,l){var u,s,c,f,d,p,h,y,m,v,g,x,w,O,j,k,P,E,A=n.constructor,M=n.s==i.s?1:-1,C=n.d,T=i.d;if(!n.s)return new A(n);if(!i.s)throw Error(a+"Division by zero");for(c=0,s=n.e-i.e,P=T.length,j=C.length,y=(h=new A(M)).d=[];T[c]==(C[c]||0);)++c;if(T[c]>(C[c]||0)&&--s,(x=null==o?o=A.precision:l?o+(b(n)-b(i))+1:o)<0)return new A(0);if(x=x/7+2|0,c=0,1==P)for(f=0,T=T[0],x++;(c1&&(T=t(T,f),C=t(C,f),P=T.length,j=C.length),O=P,v=(m=C.slice(0,P)).length;v=1e7/2&&++k;do f=0,(u=e(T,m,P,v))<0?(g=m[0],P!=v&&(g=1e7*g+(m[1]||0)),(f=g/k|0)>1?(f>=1e7&&(f=1e7-1),p=(d=t(T,f)).length,v=m.length,1==(u=e(d,m,p,v))&&(f--,r(d,P16)throw Error(u+b(t));if(!t.s)return new p(n);for(null==e?(o=!1,s=h):s=e,l=new p(.03125);t.abs().gte(.1);)t=t.times(l),d+=5;for(s+=Math.log(c(2,d))/Math.LN10*2+5|0,r=i=a=new p(n),p.precision=s;;){if(i=S(i.times(t),s),r=r.times(++f),m((l=a.plus(v(i,r,s))).d).slice(0,s)===m(a.d).slice(0,s)){for(;d--;)a=S(a.times(a),s);return p.precision=h,null==e?(o=!0,S(a,h)):a}a=l}}function b(t){for(var e=7*t.e,r=t.d[0];r>=10;r/=10)e++;return e}function x(t,e,r){if(e>t.LN10.sd())throw o=!0,r&&(t.precision=r),Error(a+"LN10 precision limit exceeded");return S(new t(t.LN10),e)}function w(t){for(var e="";t--;)e+="0";return e}function O(t,e){var r,i,l,u,s,c,f,d,p,h=1,y=t,g=y.d,w=y.constructor,j=w.precision;if(y.s<1)throw Error(a+(y.s?"NaN":"-Infinity"));if(y.eq(n))return new w(0);if(null==e?(o=!1,d=j):d=e,y.eq(10))return null==e&&(o=!0),x(w,d);if(w.precision=d+=10,i=(r=m(g)).charAt(0),!(15e14>Math.abs(u=b(y))))return f=x(w,d+2,j).times(u+""),y=O(new w(i+"."+r.slice(1)),d-10).plus(f),w.precision=j,null==e?(o=!0,S(y,j)):y;for(;i<7&&1!=i||1==i&&r.charAt(1)>3;)i=(r=m((y=y.times(t)).d)).charAt(0),h++;for(u=b(y),i>1?(y=new w("0."+r),u++):y=new w(i+"."+r.slice(1)),c=s=y=v(y.minus(n),y.plus(n),d),p=S(y.times(y),d),l=3;;){if(s=S(s.times(p),d),m((f=c.plus(v(s,new w(l),d))).d).slice(0,d)===m(c.d).slice(0,d))return c=c.times(2),0!==u&&(c=c.plus(x(w,d+2,j).times(u+""))),c=v(c,new w(h),d),w.precision=j,null==e?(o=!0,S(c,j)):c;c=f,l+=2}}function j(t,e){var r,n,i;for((r=e.indexOf("."))>-1&&(e=e.replace(".","")),(n=e.search(/e/i))>0?(r<0&&(r=n),r+=+e.slice(n+1),e=e.substring(0,n)):r<0&&(r=e.length),n=0;48===e.charCodeAt(n);)++n;for(i=e.length;48===e.charCodeAt(i-1);)--i;if(e=e.slice(n,i)){if(i-=n,t.e=s((r=r-n-1)/7),t.d=[],n=(r+1)%7,r<0&&(n+=7),nd||t.e<-d))throw Error(u+r)}else t.s=0,t.e=0,t.d=[0];return t}function S(t,e,r){var n,i,a,l,f,p,h,y,m=t.d;for(l=1,a=m[0];a>=10;a/=10)l++;if((n=e-l)<0)n+=7,i=e,h=m[y=0];else{if((y=Math.ceil((n+1)/7))>=(a=m.length))return t;for(l=1,h=a=m[y];a>=10;a/=10)l++;n%=7,i=n-7+l}if(void 0!==r&&(f=h/(a=c(10,l-i-1))%10|0,p=e<0||void 0!==m[y+1]||h%a,p=r<4?(f||p)&&(0==r||r==(t.s<0?3:2)):f>5||5==f&&(4==r||p||6==r&&(n>0?i>0?h/c(10,l-i):0:m[y-1])%10&1||r==(t.s<0?8:7))),e<1||!m[0])return p?(a=b(t),m.length=1,e=e-a-1,m[0]=c(10,(7-e%7)%7),t.e=s(-e/7)||0):(m.length=1,m[0]=t.e=t.s=0),t;if(0==n?(m.length=y,a=1,y--):(m.length=y+1,a=c(10,7-n),m[y]=i>0?(h/c(10,l-i)%c(10,i)|0)*a:0),p)for(;;)if(0==y){1e7==(m[0]+=a)&&(m[0]=1,++t.e);break}else{if(m[y]+=a,1e7!=m[y])break;m[y--]=0,a=1}for(n=m.length;0===m[--n];)m.pop();if(o&&(t.e>d||t.e<-d))throw Error(u+b(t));return t}function k(t,e){var r,n,i,a,l,u,s,c,f,d,p=t.constructor,h=p.precision;if(!t.s||!e.s)return e.s?e.s=-e.s:e=new p(t),o?S(e,h):e;if(s=t.d,d=e.d,n=e.e,c=t.e,s=s.slice(),l=c-n){for((f=l<0)?(r=s,l=-l,u=d.length):(r=d,n=c,u=s.length),l>(i=Math.max(Math.ceil(h/7),u)+2)&&(l=i,r.length=1),r.reverse(),i=l;i--;)r.push(0);r.reverse()}else{for((f=(i=s.length)<(u=d.length))&&(u=i),i=0;i0;--i)s[u++]=0;for(i=d.length;i>l;){if(s[--i]0?o=o.charAt(0)+"."+o.slice(1)+w(n):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+w(-i-1)+o,r&&(n=r-a)>0&&(o+=w(n))):i>=a?(o+=w(i+1-a),r&&(n=r-i-1)>0&&(o=o+"."+w(n))):((n=i+1)0&&(i+1===a&&(o+="."),o+=w(n))),t.s<0?"-"+o:o}function E(t,e){if(t.length>e)return t.length=e,!0}function A(t){if(!t||"object"!=typeof t)throw Error(a+"Object expected");var e,r,n,i=["precision",1,1e9,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(e=0;e=i[e+1]&&n<=i[e+2])this[r]=n;else throw Error(l+r+": "+n);if(void 0!==(n=t[r="LN10"]))if(n==Math.LN10)this[r]=new this(n);else throw Error(l+r+": "+n);return this}if((i=function t(e){var r,n,i;function o(t){if(!(this instanceof o))return new o(t);if(this.constructor=o,t instanceof o){this.s=t.s,this.e=t.e,this.d=(t=t.d)?t.slice():t;return}if("number"==typeof t){if(0*t!=0)throw Error(l+t);if(t>0)this.s=1;else if(t<0)t=-t,this.s=-1;else{this.s=0,this.e=0,this.d=[0];return}if(t===~~t&&t<1e7){this.e=0,this.d=[t];return}return j(this,t.toString())}if("string"!=typeof t)throw Error(l+t);if(45===t.charCodeAt(0)?(t=t.slice(1),this.s=-1):this.s=1,f.test(t))j(this,t);else throw Error(l+t)}if(o.prototype=p,o.ROUND_UP=0,o.ROUND_DOWN=1,o.ROUND_CEIL=2,o.ROUND_FLOOR=3,o.ROUND_HALF_UP=4,o.ROUND_HALF_DOWN=5,o.ROUND_HALF_EVEN=6,o.ROUND_HALF_CEIL=7,o.ROUND_HALF_FLOOR=8,o.clone=t,o.config=o.set=A,void 0===e&&(e={}),e)for(r=0,i=["precision","rounding","toExpNeg","toExpPos","LN10"];rtypeof self&&self&&self.self==self?self:Function("return this")()),r.Decimal=i)}(t.e)},51600,(t,e,r)=>{var n=t.r(66026);e.exports=function(t,e,r){"__proto__"==e&&n?n(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}},7226,(t,e,r)=>{var n=t.r(51600),i=t.r(25444),o=t.r(7936);e.exports=function(t,e){var r={};return e=o(e,3),i(t,function(t,i,o){n(r,i,e(t,i,o))}),r}},75958,(t,e,r)=>{e.exports=function(t,e){for(var r=-1,n=null==t?0:t.length;++r{var n=t.r(33610);e.exports=function(t,e){var r=!0;return n(t,function(t,n,i){return r=!!e(t,n,i)}),r}},93840,(t,e,r)=>{var n=t.r(75958),i=t.r(93926),o=t.r(7936),a=t.r(11339),l=t.r(96506);e.exports=function(t,e,r){var u=a(t)?n:i;return r&&l(t,e,r)&&(e=void 0),u(t,o(e,3))}},27232,(t,e,r)=>{e.exports=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}},21606,(t,e,r)=>{e.exports=t.r(21981)(Object.getPrototypeOf,Object)},13492,(t,e,r)=>{var n=t.r(35564),i=t.r(21606),o=t.r(38934),a=Object.prototype,l=Function.prototype.toString,u=a.hasOwnProperty,s=l.call(Object);e.exports=function(t){if(!o(t)||"[object Object]"!=n(t))return!1;var e=i(t);if(null===e)return!0;var r=u.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&l.call(r)==s}},75659,(t,e,r)=>{var n=t.r(35564),i=t.r(38934);e.exports=function(t){return!0===t||!1===t||i(t)&&"[object Boolean]"==n(t)}},2532,(t,e,r)=>{var n=t.r(33610);e.exports=function(t,e){var r;return n(t,function(t,n,i){return!(r=e(t,n,i))}),!!r}},79665,(t,e,r)=>{var n=t.r(95067),i=t.r(7936),o=t.r(2532),a=t.r(11339),l=t.r(96506);e.exports=function(t,e,r){var u=a(t)?n:o;return r&&l(t,e,r)&&(e=void 0),u(t,i(e,3))}},15704,(t,e,r)=>{var n=t.r(7936),i=t.r(31403),o=t.r(48632);e.exports=function(t){return function(e,r,a){var l=Object(e);if(!i(e)){var u=n(r,3);e=o(e),r=function(t){return u(l[t],t,l)}}var s=t(e,r,a);return s>-1?l[u?e[s]:s]:void 0}}},78018,(t,e,r)=>{var n=t.r(96297);e.exports=function(t){var e=n(t),r=e%1;return e==e?r?e-r:e:0}},90352,(t,e,r)=>{var n=t.r(80647),i=t.r(7936),o=t.r(78018),a=Math.max;e.exports=function(t,e,r){var l=null==t?0:t.length;if(!l)return -1;var u=null==r?0:o(r);return u<0&&(u=a(l+u,0)),n(t,i(e,3),u)}},60783,(t,e,r)=>{e.exports=t.r(15704)(t.r(90352))},61397,(t,e,r)=>{"use strict";var n=Object.prototype.hasOwnProperty,i="~";function o(){}function a(t,e,r){this.fn=t,this.context=e,this.once=r||!1}function l(t,e,r,n,o){if("function"!=typeof r)throw TypeError("The listener must be a function");var l=new a(r,n||t,o),u=i?i+e:e;return t._events[u]?t._events[u].fn?t._events[u]=[t._events[u],l]:t._events[u].push(l):(t._events[u]=l,t._eventsCount++),t}function u(t,e){0==--t._eventsCount?t._events=new o:delete t._events[e]}function s(){this._events=new o,this._eventsCount=0}Object.create&&(o.prototype=Object.create(null),new o().__proto__||(i=!1)),s.prototype.eventNames=function(){var t,e,r=[];if(0===this._eventsCount)return r;for(e in t=this._events)n.call(t,e)&&r.push(i?e.slice(1):e);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(t)):r},s.prototype.listeners=function(t){var e=i?i+t:t,r=this._events[e];if(!r)return[];if(r.fn)return[r.fn];for(var n=0,o=r.length,a=Array(o);n{"use strict";var e,r,n,i,o,a,l,u,s,c,f,d,p,h,y,m,v,g,b,x,w,O,j,S,k=t.i(60498),P=t.i(49311);t.i(26128);var E=t.i(91830),A=t.i(70917),M=t.i(74035),C=t.i(37106),T=t.i(21984),_=t.i(56604),N=t.i(81817);function D({title:t,value:e,icon:r,trend:n,loading:i}){return i?(0,k.jsxs)(N.Card,{className:"bg-white dark:bg-[#2a2a2e] border-gray-200 dark:border-gray-700 shadow-sm hover:shadow-md transition-all duration-300",children:[(0,k.jsxs)(N.CardHeader,{className:"flex flex-row items-center justify-between space-y-0 pb-3",children:[(0,k.jsx)(N.CardTitle,{className:"text-sm font-medium text-gray-600 dark:text-gray-400",children:t}),(0,k.jsx)("div",{className:"h-10 w-10 rounded-lg bg-gradient-to-br from-blue-50 to-blue-100 dark:from-blue-900/30 dark:to-blue-800/30 flex items-center justify-center",children:(0,k.jsx)("div",{className:"h-5 w-5 text-blue-600 dark:text-blue-400",children:r})})]}),(0,k.jsxs)(N.CardContent,{children:[(0,k.jsx)("div",{className:"h-9 w-28 bg-gray-200 dark:bg-gray-700 animate-pulse rounded"}),(0,k.jsx)("div",{className:"h-4 w-20 bg-gray-100 dark:bg-gray-800 animate-pulse rounded mt-2"})]})]}):(0,k.jsxs)(N.Card,{className:"bg-white dark:bg-[#2a2a2e] border-gray-200 dark:border-gray-700 shadow-sm hover:shadow-md transition-all duration-300 group",children:[(0,k.jsxs)(N.CardHeader,{className:"flex flex-row items-center justify-between space-y-0 pb-3",children:[(0,k.jsx)(N.CardTitle,{className:"text-sm font-medium text-gray-600 dark:text-gray-400",children:t}),(0,k.jsx)("div",{className:"h-10 w-10 rounded-lg bg-gradient-to-br from-blue-50 to-blue-100 dark:from-blue-900/30 dark:to-blue-800/30 flex items-center justify-center group-hover:scale-110 transition-transform duration-300",children:(0,k.jsx)("div",{className:"h-5 w-5 text-blue-600 dark:text-blue-400",children:r})})]}),(0,k.jsxs)(N.CardContent,{children:[(0,k.jsx)("div",{className:"text-3xl font-bold text-gray-900 dark:text-white mb-2",children:e}),n&&(0,k.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,k.jsxs)("span",{className:`inline-flex items-center gap-1 text-xs font-medium px-2 py-0.5 rounded-full ${"up"===n.direction?"bg-green-50 text-green-700 dark:bg-green-900/30 dark:text-green-400":"bg-red-50 text-red-700 dark:bg-red-900/30 dark:text-red-400"}`,children:[(0,k.jsx)("svg",{className:"w-3 h-3",fill:"currentColor",viewBox:"0 0 20 20",children:"up"===n.direction?(0,k.jsx)("path",{fillRule:"evenodd",d:"M5.293 9.707a1 1 0 010-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 01-1.414 1.414L11 7.414V15a1 1 0 11-2 0V7.414L6.707 9.707a1 1 0 01-1.414 0z",clipRule:"evenodd"}):(0,k.jsx)("path",{fillRule:"evenodd",d:"M14.707 10.293a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 111.414-1.414L9 12.586V5a1 1 0 012 0v7.586l2.293-2.293a1 1 0 011.414 0z",clipRule:"evenodd"})}),Math.abs(n.value),"%"]}),(0,k.jsx)("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:"vs previous period"})]})]})]})}t.i(71483);var I=t.i(67532),L=t.i(41641),B=t.i(3201),R=t.i(95284),z=t.i(15694),U=t.i(40758),$=t.i(25411);function F(t,e){if(!t)throw Error("Invariant failed")}var H=t.i(37696),V=t.i(90514),W=t.i(88312),q=t.i(57877),X=t.i(29369),G=function(t){return 0===t?0:t>0?1:-1},Y=function(t){return(0,H.default)(t)&&t.indexOf("%")===t.length-1},K=function(t){return(0,X.default)(t)&&!(0,q.default)(t)},Z=function(t){return K(t)||(0,H.default)(t)},J=0,Q=function(t){var e=++J;return"".concat(t||"").concat(e)},tt=function(t,e){var r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!K(t)&&!(0,H.default)(t))return n;if(Y(t)){var o=t.indexOf("%");r=e*parseFloat(t.slice(0,o))/100}else r=+t;return(0,q.default)(r)&&(r=n),i&&r>e&&(r=e),r},te=function(t){if(!t)return null;var e=Object.keys(t);return e&&e.length?t[e[0]]:null},tr=function(t){if(!Array.isArray(t))return!1;for(var e=t.length,r={},n=0;n=0)continue;r[n]=t[n]}return r}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}function tv(t){return(tv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var tg={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},tb=function(t){return"string"==typeof t?t:t?t.displayName||t.name||"Component":""},tx=null,tw=null,tO=function t(e){if(e===tx&&Array.isArray(tw))return tw;var r=[];return P.Children.forEach(e,function(e){(0,I.default)(e)||((0,W.isFragment)(e)?r=r.concat(t(e.props.children)):r.push(e))}),tw=r,tx=e,r};function tj(t,e){var r=[],n=[];return n=Array.isArray(e)?e.map(function(t){return tb(t)}):[tb(e)],tO(t).forEach(function(t){var e=(0,R.default)(t,"type.displayName")||(0,R.default)(t,"type.name");-1!==n.indexOf(e)&&r.push(t)}),r}function tS(t,e){var r=tj(t,e);return r&&r[0]}var tk=function(t){if(!t||!t.props)return!1;var e=t.props,r=e.width,n=e.height;return!!K(r)&&!(r<=0)&&!!K(n)&&!(n<=0)},tP=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],tE=function(t,e,r,n){var i,o=null!=(i=null==tc?void 0:tc[n])?i:[];return e.startsWith("data-")||!(0,L.default)(t)&&(n&&o.includes(e)||tu.includes(e))||r&&tf.includes(e)},tA=function(t,e,r){if(!t||"function"==typeof t||"boolean"==typeof t)return null;var n=t;if((0,P.isValidElement)(t)&&(n=t.props),!(0,V.default)(n))return null;var i={};return Object.keys(n).forEach(function(t){var o;tE(null==(o=n)?void 0:o[t],t,e,r)&&(i[t]=n[t])}),i},tM=function t(e,r){if(e===r)return!0;var n=P.Children.count(e);if(n!==P.Children.count(r))return!1;if(0===n)return!0;if(1===n)return tC(Array.isArray(e)?e[0]:e,Array.isArray(r)?r[0]:r);for(var i=0;i=0)r.push(t);else if(t){var o=tb(t.type),a=e[o]||{},l=a.handler,u=a.once;if(l&&(!u||!n[o])){var s=l(t,o,i);r.push(s),n[o]=!0}}}),r},t_=function(t){var e=t&&t.type;return e&&tg[e]?tg[e]:null},tN=["children","width","height","viewBox","className","style","title","desc"];function tD(){return(tD=Object.assign.bind()).apply(this,arguments)}function tI(t){var e=t.children,r=t.width,n=t.height,i=t.viewBox,o=t.className,a=t.style,l=t.title,u=t.desc,s=function(t,e){if(null==t)return{};var r,n,i=function(t,e){if(null==t)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}(t,tN),c=i||{width:r,height:n,x:0,y:0},f=(0,$.default)("recharts-surface",o);return P.default.createElement("svg",tD({},tA(s,!0,"svg"),{className:f,width:r,height:n,style:a,viewBox:"".concat(c.x," ").concat(c.y," ").concat(c.width," ").concat(c.height)}),P.default.createElement("title",null,l),P.default.createElement("desc",null,u),e)}var tL=["children","className"];function tB(){return(tB=Object.assign.bind()).apply(this,arguments)}var tR=P.default.forwardRef(function(t,e){var r=t.children,n=t.className,i=function(t,e){if(null==t)return{};var r,n,i=function(t,e){if(null==t)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}(t,tL),o=(0,$.default)("recharts-layer",n);return P.default.createElement("g",tB({className:o},tA(i,!0),{ref:e}),r)});function tz(t){return(tz="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function tU(){return(tU=Object.assign.bind()).apply(this,arguments)}function t$(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);rtypeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,o,a,l=[],u=!0,s=!1;try{o=(r=r.call(t)).next,!1;for(;!(u=(n=o.call(r)).done)&&(l.push(n.value),2!==l.length);u=!0);}catch(t){s=!0,i=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw i}}return l}}(d,2)||function(t,e){if(t){if("string"==typeof t)return t$(t,2);var r=Object.prototype.toString.call(t).slice(8,-1);if("Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return t$(t,2)}}(d,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();c=p[0],f=p[1]}else c=d}return P.default.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(e),style:n},Z(f)?P.default.createElement("span",{className:"recharts-tooltip-item-name"},f):null,Z(f)?P.default.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,P.default.createElement("span",{className:"recharts-tooltip-item-value"},c),P.default.createElement("span",{className:"recharts-tooltip-item-unit"},t.unit||""))});return P.default.createElement("ul",{className:"recharts-tooltip-item-list",style:{padding:0,margin:0}},t)}return null}())};function tq(t){return(tq="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function tX(t,e,r){var n;return(n=function(t,e){if("object"!=tq(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=tq(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==tq(n)?n:n+"")in t)?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var tG="recharts-tooltip-wrapper",tY={visibility:"hidden"};function tK(t){var e=t.allowEscapeViewBox,r=t.coordinate,n=t.key,i=t.offsetTopLeft,o=t.position,a=t.reverseDirection,l=t.tooltipDimension,u=t.viewBox,s=t.viewBoxDimension;if(o&&K(o[n]))return o[n];var c=r[n]-l-i,f=r[n]+i;return e[n]?a[n]?c:f:a[n]?cu[n]+s?Math.max(c,u[n]):Math.max(f,u[n])}function tZ(t){return(tZ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function tJ(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function tQ(t){for(var e=1;e1||Math.abs(t.height-this.state.lastBoundingBox.height)>1)&&this.setState({lastBoundingBox:{width:t.width,height:t.height}})}else(-1!==this.state.lastBoundingBox.width||-1!==this.state.lastBoundingBox.height)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var t,e;this.props.active&&this.updateBBox(),this.state.dismissed&&((null==(t=this.props.coordinate)?void 0:t.x)!==this.state.dismissedAtCoordinate.x||(null==(e=this.props.coordinate)?void 0:e.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var t,e,r,n,i,o,a,l,u,s,c,f,d,p,h,y,m,v,g,b=this,x=this.props,w=x.active,O=x.allowEscapeViewBox,j=x.animationDuration,S=x.animationEasing,k=x.children,E=x.coordinate,A=x.hasPayload,M=x.isAnimationActive,C=x.offset,T=x.position,_=x.reverseDirection,N=x.useTranslate3d,D=x.viewBox,I=x.wrapperStyle,L=(f=(t={allowEscapeViewBox:O,coordinate:E,offsetTopLeft:C,position:T,reverseDirection:_,tooltipBox:this.state.lastBoundingBox,useTranslate3d:N,viewBox:D}).allowEscapeViewBox,d=t.coordinate,p=t.offsetTopLeft,h=t.position,y=t.reverseDirection,m=t.tooltipBox,v=t.useTranslate3d,g=t.viewBox,m.height>0&&m.width>0&&d?(r=(e={translateX:s=tK({allowEscapeViewBox:f,coordinate:d,key:"x",offsetTopLeft:p,position:h,reverseDirection:y,tooltipDimension:m.width,viewBox:g,viewBoxDimension:g.width}),translateY:c=tK({allowEscapeViewBox:f,coordinate:d,key:"y",offsetTopLeft:p,position:h,reverseDirection:y,tooltipDimension:m.height,viewBox:g,viewBoxDimension:g.height}),useTranslate3d:v}).translateX,n=e.translateY,u={transform:e.useTranslate3d?"translate3d(".concat(r,"px, ").concat(n,"px, 0)"):"translate(".concat(r,"px, ").concat(n,"px)")}):u=tY,{cssProperties:u,cssClasses:(o=(i={translateX:s,translateY:c,coordinate:d}).coordinate,a=i.translateX,l=i.translateY,(0,$.default)(tG,tX(tX(tX(tX({},"".concat(tG,"-right"),K(a)&&o&&K(o.x)&&a>=o.x),"".concat(tG,"-left"),K(a)&&o&&K(o.x)&&a=o.y),"".concat(tG,"-top"),K(l)&&o&&K(o.y)&&ltypeof window&&window.document&&window.document.createElement&&window.setTimeout),get:function(t){return t6[t]},set:function(t,e){if("string"==typeof t)t6[t]=e;else{var r=Object.keys(t);r&&r.length&&r.forEach(function(e){t6[e]=t[e]})}}},t8=t.i(34727);function t7(t,e,r){return!0===e?(0,t8.default)(t,r):(0,L.default)(e)?(0,t8.default)(t,e):t}function t9(t){return(t9="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function et(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function ee(t){for(var e=1;e0;return P.default.createElement(t5,{allowEscapeViewBox:i,animationDuration:o,animationEasing:a,isAnimationActive:c,active:n,coordinate:u,hasPayload:x,offset:f,position:h,reverseDirection:y,useTranslate3d:m,viewBox:v,wrapperStyle:g},(t=ee(ee({},this.props),{},{payload:b}),P.default.isValidElement(l)?P.default.cloneElement(l,t):"function"==typeof l?P.default.createElement(l,t):P.default.createElement(tW,t)))}}],function(t,e){for(var r=0;r2?r-2:0),i=2;i=0))throw Error(`invalid digits: ${t}`);if(e>15)return ey;let r=10**e;return function(t){this._+=t[0];for(let e=1,n=t.length;e1e-6)if(Math.abs(c*l-u*s)>1e-6&&i){let d=r-o,p=n-a,h=l*l+u*u,y=Math.sqrt(h),m=Math.sqrt(f),v=i*Math.tan((ed-Math.acos((h+f-(d*d+p*p))/(2*y*m)))/2),g=v/m,b=v/y;Math.abs(g-1)>1e-6&&this._append`L${t+g*s},${e+g*c}`,this._append`A${i},${i},0,0,${+(c*d>s*p)},${this._x1=t+b*l},${this._y1=e+b*u}`}else this._append`L${this._x1=t},${this._y1=e}`}arc(t,e,r,n,i,o){if(t*=1,e*=1,r*=1,o=!!o,r<0)throw Error(`negative radius: ${r}`);let a=r*Math.cos(n),l=r*Math.sin(n),u=t+a,s=e+l,c=1^o,f=o?n-i:i-n;null===this._x1?this._append`M${u},${s}`:(Math.abs(this._x1-u)>1e-6||Math.abs(this._y1-s)>1e-6)&&this._append`L${u},${s}`,r&&(f<0&&(f=f%ep+ep),f>eh?this._append`A${r},${r},0,1,${c},${t-a},${e-l}A${r},${r},0,1,${c},${this._x1=u},${this._y1=s}`:f>1e-6&&this._append`A${r},${r},0,${+(f>=ed)},${c},${this._x1=t+r*Math.cos(i)},${this._y1=e+r*Math.sin(i)}`)}rect(t,e,r,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${r*=1}v${+n}h${-r}Z`}toString(){return this._}}function ev(t){let e=3;return t.digits=function(r){if(!arguments.length)return e;if(null==r)e=null;else{let t=Math.floor(r);if(!(t>=0))throw RangeError(`invalid digits: ${r}`);e=t}return t},()=>new em(e)}em.prototype;let eg=Math.cos,eb=Math.sin,ex=Math.sqrt,ew=Math.PI,eO=2*ew;ex(3);let ej={draw(t,e){let r=ex(e/ew);t.moveTo(r,0),t.arc(0,0,r,0,eO)}},eS=ex(1/3),ek=2*eS,eP=eb(ew/10)/eb(7*ew/10),eE=eb(eO/10)*eP,eA=-eg(eO/10)*eP,eM=ex(3);ex(3);let eC=ex(3)/2,eT=1/ex(12),e_=(eT/2+1)*3;function eN(t){return(eN="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var eD=["type","size","sizeType"];function eI(){return(eI=Object.assign.bind()).apply(this,arguments)}function eL(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function eB(t){for(var e=1;e=0)continue;r[n]=t[n]}return r}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}(t,eD)),{},{type:n,size:o,sizeType:l}),s=u.className,c=u.cx,f=u.cy,d=tA(u,!0);return c===+c&&f===+f&&o===+o?P.default.createElement("path",eI({},d,{className:(0,$.default)("recharts-symbols",s),transform:"translate(".concat(c,", ").concat(f,")"),d:(e=eR["symbol".concat((0,ec.default)(n))]||ej,(function(t,e){let r=null,n=ev(i);function i(){let i;if(r||(r=i=n()),t.apply(this,arguments).draw(r,+e.apply(this,arguments)),i)return r=null,i+""||null}return t="function"==typeof t?t:ef(t||ej),e="function"==typeof e?e:ef(void 0===e?64:+e),i.type=function(e){return arguments.length?(t="function"==typeof e?e:ef(e),i):t},i.size=function(t){return arguments.length?(e="function"==typeof t?t:ef(+t),i):e},i.context=function(t){return arguments.length?(r=null==t?null:t,i):r},i})().type(e).size(eU(o,l,n))())})):null};function eF(t){return(eF="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function eH(){return(eH=Object.assign.bind()).apply(this,arguments)}function eV(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}e$.registerSymbol=function(t,e){eR["symbol".concat((0,ec.default)(t))]=e};function eW(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(eW=function(){return!!t})()}function eq(t){return(eq=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function eX(t,e){return(eX=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function eG(t,e,r){return(e=eY(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function eY(t){var e=function(t,e){if("object"!=eF(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=eF(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==eF(e)?e:e+""}var eK=function(t){var e;function r(){var t,e;if(!(this instanceof r))throw TypeError("Cannot call a class as a function");return t=r,e=arguments,t=eq(t),function(t,e){if(e&&("object"===eF(e)||"function"==typeof e))return e;if(void 0!==e)throw TypeError("Derived constructors may only return object or undefined");var r=t;if(void 0===r)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(this,eW()?Reflect.construct(t,e||[],eq(this).constructor):t.apply(this,e))}if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");return r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),t&&eX(r,t),e=[{key:"renderIcon",value:function(t){var e=this.props.inactiveColor,r=32/6,n=32/3,i=t.inactive?e:t.color;if("plainline"===t.type)return P.default.createElement("line",{strokeWidth:4,fill:"none",stroke:i,strokeDasharray:t.payload.strokeDasharray,x1:0,y1:16,x2:32,y2:16,className:"recharts-legend-icon"});if("line"===t.type)return P.default.createElement("path",{strokeWidth:4,fill:"none",stroke:i,d:"M0,".concat(16,"h").concat(n,"\n A").concat(r,",").concat(r,",0,1,1,").concat(2*n,",").concat(16,"\n H").concat(32,"M").concat(2*n,",").concat(16,"\n A").concat(r,",").concat(r,",0,1,1,").concat(n,",").concat(16),className:"recharts-legend-icon"});if("rect"===t.type)return P.default.createElement("path",{stroke:"none",fill:i,d:"M0,".concat(4,"h").concat(32,"v").concat(24,"h").concat(-32,"z"),className:"recharts-legend-icon"});if(P.default.isValidElement(t.legendIcon)){var o=function(t){for(var e=1;e');var d=e.inactive?a:e.color;return P.default.createElement("li",eH({className:c,style:u,key:"legend-item-".concat(r)},tp(t.props,e,r)),P.default.createElement(tI,{width:n,height:n,viewBox:l,style:s},t.renderIcon(e)),P.default.createElement("span",{className:"recharts-legend-item-text",style:{color:d}},i?i(f,e,r):f))})}},{key:"render",value:function(){var t=this.props,e=t.payload,r=t.layout,n=t.align;return e&&e.length?P.default.createElement("ul",{className:"recharts-default-legend",style:{padding:0,margin:0,textAlign:"horizontal"===r?n:"left"}},this.renderItems()):null}}],function(t,e){for(var r=0;r1||Math.abs(e.height-this.lastBoundingBox.height)>1)&&(this.lastBoundingBox.width=e.width,this.lastBoundingBox.height=e.height,t&&t(e)):(-1!==this.lastBoundingBox.width||-1!==this.lastBoundingBox.height)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,t&&t(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?e0({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(t){var e,r,n=this.props,i=n.layout,o=n.align,a=n.verticalAlign,l=n.margin,u=n.chartWidth,s=n.chartHeight;return t&&(void 0!==t.left&&null!==t.left||void 0!==t.right&&null!==t.right)||(e="center"===o&&"vertical"===i?{left:((u||0)-this.getBBoxSnapshot().width)/2}:"right"===o?{right:l&&l.right||0}:{left:l&&l.left||0}),t&&(void 0!==t.top&&null!==t.top||void 0!==t.bottom&&null!==t.bottom)||(r="middle"===a?{top:((s||0)-this.getBBoxSnapshot().height)/2}:"bottom"===a?{bottom:l&&l.bottom||0}:{top:l&&l.top||0}),e0(e0({},e),r)}},{key:"render",value:function(){var t=this,e=this.props,r=e.content,n=e.width,i=e.height,o=e.wrapperStyle,a=e.payloadUniqBy,l=e.payload,u=e0(e0({position:"absolute",width:n||"auto",height:i||"auto"},this.getDefaultPosition(o)),o);return P.default.createElement("div",{className:"recharts-legend-wrapper",style:u,ref:function(e){t.wrapperNode=e}},function(t,e){if(P.default.isValidElement(t))return P.default.cloneElement(t,e);if("function"==typeof t)return P.default.createElement(t,e);e.ref;var r=function(t,e){if(null==t)return{};var r,n,i=function(t,e){if(null==t)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}(e,eJ);return P.default.createElement(eK,r)}(r,e0(e0({},this.props),{},{payload:t7(l,a,e8)})))}}],r=[{key:"getWithHeight",value:function(t,e){var r=e0(e0({},this.defaultProps),t.props).layout;return"vertical"===r&&K(t.props.height)?{height:t.props.height}:"horizontal"===r?{width:t.props.width||e}:null}}],e&&e1(n.prototype,e),r&&e1(n,r),Object.defineProperty(n,"prototype",{writable:!1}),n}(P.PureComponent);function e9(){return(e9=Object.assign.bind()).apply(this,arguments)}e5(e7,"displayName","Legend"),e5(e7,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var rt=function(t){var e=t.cx,r=t.cy,n=t.r,i=t.className,o=(0,$.default)("recharts-dot",i);return e===+e&&r===+r&&n===+n?P.createElement("circle",e9({},tA(t,!1),td(t),{className:o,cx:e,cy:r,r:n})):null},re=t.i(6229);let{getOwnPropertyNames:rr,getOwnPropertySymbols:rn}=Object,{hasOwnProperty:ri}=Object.prototype;function ro(t,e){return function(r,n,i){return t(r,n,i)&&e(r,n,i)}}function ra(t){return function(e,r,n){if(!e||!r||"object"!=typeof e||"object"!=typeof r)return t(e,r,n);let{cache:i}=n,o=i.get(e),a=i.get(r);if(o&&a)return o===r&&a===e;i.set(e,r),i.set(r,e);let l=t(e,r,n);return i.delete(e),i.delete(r),l}}function rl(t){return rr(t).concat(rn(t))}let ru=Object.hasOwn||((t,e)=>ri.call(t,e));function rs(t,e){return t===e||!t&&!e&&t!=t&&e!=e}let{getOwnPropertyDescriptor:rc,keys:rf}=Object;function rd(t,e){return t.byteLength===e.byteLength&&rS(new Uint8Array(t),new Uint8Array(e))}function rp(t,e,r){let n=t.length;if(e.length!==n)return!1;for(;n-- >0;)if(!r.equals(t[n],e[n],n,n,t,e,r))return!1;return!0}function rh(t,e){return t.byteLength===e.byteLength&&rS(new Uint8Array(t.buffer,t.byteOffset,t.byteLength),new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}function ry(t,e){return rs(t.getTime(),e.getTime())}function rm(t,e){return t.name===e.name&&t.message===e.message&&t.cause===e.cause&&t.stack===e.stack}function rv(t,e){return t===e}function rg(t,e,r){let n,i,o=t.size;if(o!==e.size)return!1;if(!o)return!0;let a=Array(o),l=t.entries(),u=0;for(;(n=l.next())&&!n.done;){let o=e.entries(),l=!1,s=0;for(;(i=o.next())&&!i.done;){if(a[s]){s++;continue}let o=n.value,c=i.value;if(r.equals(o[0],c[0],u,s,t,e,r)&&r.equals(o[1],c[1],o[0],c[0],t,e,r)){l=a[s]=!0;break}s++}if(!l)return!1;u++}return!0}function rb(t,e,r){let n=rf(t),i=n.length;if(rf(e).length!==i)return!1;for(;i-- >0;)if(!rP(t,e,r,n[i]))return!1;return!0}function rx(t,e,r){let n,i,o,a=rl(t),l=a.length;if(rl(e).length!==l)return!1;for(;l-- >0;)if(!rP(t,e,r,n=a[l])||(i=rc(t,n),o=rc(e,n),(i||o)&&(!i||!o||i.configurable!==o.configurable||i.enumerable!==o.enumerable||i.writable!==o.writable)))return!1;return!0}function rw(t,e){return rs(t.valueOf(),e.valueOf())}function rO(t,e){return t.source===e.source&&t.flags===e.flags}function rj(t,e,r){let n,i,o=t.size;if(o!==e.size)return!1;if(!o)return!0;let a=Array(o),l=t.values();for(;(n=l.next())&&!n.done;){let o=e.values(),l=!1,u=0;for(;(i=o.next())&&!i.done;){if(!a[u]&&r.equals(n.value,i.value,n.value,i.value,t,e,r)){l=a[u]=!0;break}u++}if(!l)return!1}return!0}function rS(t,e){let r=t.byteLength;if(e.byteLength!==r||t.byteOffset!==e.byteOffset)return!1;for(;r-- >0;)if(t[r]!==e[r])return!1;return!0}function rk(t,e){return t.hostname===e.hostname&&t.pathname===e.pathname&&t.protocol===e.protocol&&t.port===e.port&&t.hash===e.hash&&t.username===e.username&&t.password===e.password}function rP(t,e,r,n){return("_owner"===n||"__o"===n||"__v"===n)&&(!!t.$$typeof||!!e.$$typeof)||ru(e,n)&&r.equals(t[n],e[n],n,n,t,e,r)}let rE={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},rA=Object.prototype.toString,rM=rC();function rC(t={}){let{circular:e=!1,createInternalComparator:r,createState:n,strict:i=!1}=t,o=function({areArrayBuffersEqual:t,areArraysEqual:e,areDataViewsEqual:r,areDatesEqual:n,areErrorsEqual:i,areFunctionsEqual:o,areMapsEqual:a,areNumbersEqual:l,areObjectsEqual:u,arePrimitiveWrappersEqual:s,areRegExpsEqual:c,areSetsEqual:f,areTypedArraysEqual:d,areUrlsEqual:p,unknownTagComparators:h}){return function(y,m,v){if(y===m)return!0;if(null==y||null==m)return!1;let g=typeof y;if(g!==typeof m)return!1;if("object"!==g)return"number"===g?l(y,m,v):"function"===g&&o(y,m,v);let b=y.constructor;if(b!==m.constructor)return!1;if(b===Object)return u(y,m,v);if(Array.isArray(y))return e(y,m,v);if(b===Date)return n(y,m,v);if(b===RegExp)return c(y,m,v);if(b===Map)return a(y,m,v);if(b===Set)return f(y,m,v);let x=rA.call(y);if("[object Date]"===x)return n(y,m,v);if("[object RegExp]"===x)return c(y,m,v);if("[object Map]"===x)return a(y,m,v);if("[object Set]"===x)return f(y,m,v);if("[object Object]"===x)return"function"!=typeof y.then&&"function"!=typeof m.then&&u(y,m,v);if("[object URL]"===x)return p(y,m,v);if("[object Error]"===x)return i(y,m,v);if("[object Arguments]"===x)return u(y,m,v);if(rE[x])return d(y,m,v);if("[object ArrayBuffer]"===x)return t(y,m,v);if("[object DataView]"===x)return r(y,m,v);if("[object Boolean]"===x||"[object Number]"===x||"[object String]"===x)return s(y,m,v);if(h){let t=h[x];if(!t){let e=null!=y?y[Symbol.toStringTag]:void 0;e&&(t=h[e])}if(t)return t(y,m,v)}return!1}}(function({circular:t,createCustomConfig:e,strict:r}){let n={areArrayBuffersEqual:rd,areArraysEqual:r?rx:rp,areDataViewsEqual:rh,areDatesEqual:ry,areErrorsEqual:rm,areFunctionsEqual:rv,areMapsEqual:r?ro(rg,rx):rg,areNumbersEqual:rs,areObjectsEqual:r?rx:rb,arePrimitiveWrappersEqual:rw,areRegExpsEqual:rO,areSetsEqual:r?ro(rj,rx):rj,areTypedArraysEqual:r?ro(rS,rx):rS,areUrlsEqual:rk,unknownTagComparators:void 0};if(e&&(n=Object.assign({},n,e(n))),t){let t=ra(n.areArraysEqual),e=ra(n.areMapsEqual),r=ra(n.areObjectsEqual),i=ra(n.areSetsEqual);n=Object.assign({},n,{areArraysEqual:t,areMapsEqual:e,areObjectsEqual:r,areSetsEqual:i})}return n}(t)),a=r?r(o):function(t,e,r,n,i,a,l){return o(t,e,l)};return function({circular:t,comparator:e,createState:r,equals:n,strict:i}){if(r)return function(o,a){let{cache:l=t?new WeakMap:void 0,meta:u}=r();return e(o,a,{cache:l,equals:n,meta:u,strict:i})};if(t)return function(t,r){return e(t,r,{cache:new WeakMap,equals:n,meta:void 0,strict:i})};let o={cache:void 0,equals:n,meta:void 0,strict:i};return function(t,r){return e(t,r,o)}}({circular:e,comparator:o,createState:n,equals:a,strict:i})}function rT(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=-1;requestAnimationFrame(function n(i){if(r<0&&(r=i),i-r>e)t(i),r=-1;else{var o;o=n,"u">typeof requestAnimationFrame&&requestAnimationFrame(o)}})}function r_(t){return(r_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function rN(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);rrs}),rC({strict:!0,createInternalComparator:()=>rs}),rC({circular:!0,createInternalComparator:()=>rs}),rC({circular:!0,createInternalComparator:()=>rs,strict:!0});var rR=function(t){return t},rz=function(t,e){return Object.keys(e).reduce(function(r,n){return rL(rL({},r),{},rB({},n,t(n,e[n])))},{})},rU=function(t,e,r){return t.map(function(t){return"".concat(t.replace(/([A-Z])/g,function(t){return"-".concat(t.toLowerCase())})," ").concat(e,"ms ").concat(r)}).join(",")},r$=function(t,e,r,n,i,o,a,l){};function rF(t,e){if(t){if("string"==typeof t)return rH(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if("Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return rH(t,e)}}function rH(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);rtypeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,o,a,l=[],u=!0,s=!1;try{o=(r=r.call(t)).next,!1;for(;!(u=(n=o.call(r)).done)&&(l.push(n.value),4!==l.length);u=!0);}catch(t){s=!0,i=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw i}}return l}}(c,4)||rF(c,4)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();o=f[0],a=f[1],l=f[2],u=f[3]}else r$(!1,"[configBezier]: arguments should be one of oneOf 'linear', 'ease', 'ease-in', 'ease-out', 'ease-in-out','cubic-bezier(x1,y1,x2,y2)', instead received %s",n)}r$([o,l,a,u].every(function(t){return"number"==typeof t&&t>=0&&t<=1}),"[configBezier]: arguments should be x1, y1, x2, y2 of [0, 1] instead received %s",n);var d=rq(o,l),p=rq(a,u),h=(t=o,e=l,function(r){var n;return rW([].concat(function(t){if(Array.isArray(t))return rH(t)}(n=rV(t,e).map(function(t,e){return t*e}).slice(1))||function(t){if("u">typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(n)||rF(n)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),[0]),r)}),y=function(t){for(var e=t>1?1:t,r=e,n=0;n<8;++n){var i,o=d(r)-e,a=h(r);if(1e-4>Math.abs(o-e)||a<1e-4)break;r=(i=r-o/a)>1?1:i<0?0:i}return p(r)};return y.isStepper=!1,y},rG=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.stiff,r=void 0===e?100:e,n=t.damping,i=void 0===n?8:n,o=t.dt,a=void 0===o?17:o,l=function(t,e,n){var o=n+(-(t-e)*r-n*i)*a/1e3,l=n*a/1e3+t;return 1e-4>Math.abs(l-e)&&1e-4>Math.abs(o)?[e,0]:[l,o]};return l.isStepper=!0,l.dt=a,l},rY=function(){for(var t=arguments.length,e=Array(t),r=0;rtypeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||r1(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function rJ(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function rQ(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=Array(e);rtypeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,o,a,l=[],u=!0,s=!1;try{o=(r=r.call(t)).next,!1;for(;!(u=(n=o.call(r)).done)&&(l.push(n.value),2!==l.length);u=!0);}catch(t){s=!0,i=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw i}}return l}}(n,2)||r1(n,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),o=i[0],a=i[1];return rQ(rQ({},r),{},{from:o,velocity:a})}return r},r);return n<1?rz(function(t,e){return r4(e)?rQ(rQ({},e),{},{velocity:r3(e.velocity,i[t].velocity,n),from:r3(e.from,i[t].from,n)}):e},r):t(e,i,n-1)};let r6=function(t,e,r,n,i){var o,a,l=[Object.keys(t),Object.keys(e)].reduce(function(t,e){return t.filter(function(t){return e.includes(t)})}),u=l.reduce(function(r,n){return rQ(rQ({},r),{},r0({},n,[t[n],e[n]]))},{}),s=l.reduce(function(r,n){return rQ(rQ({},r),{},r0({},n,{from:t[n],velocity:0,to:e[n]}))},{}),c=-1,f=function(){return null};return f=r.isStepper?function(n){o||(o=n);var a=(n-o)/r.dt;s=r5(r,s,a),i(rQ(rQ(rQ({},t),e),rz(function(t,e){return e.from},s))),o=n,Object.values(s).filter(r4).length&&(c=requestAnimationFrame(f))}:function(o){a||(a=o);var l=(o-a)/n,s=rz(function(t,e){return r3.apply(void 0,rZ(e).concat([r(l)]))},u);if(i(rQ(rQ(rQ({},t),e),s)),l<1)c=requestAnimationFrame(f);else{var d=rz(function(t,e){return r3.apply(void 0,rZ(e).concat([r(1)]))},u);i(rQ(rQ(rQ({},t),e),d))}},function(){return requestAnimationFrame(f),function(){cancelAnimationFrame(c)}}};function r8(t){return(r8="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var r7=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function r9(t){return function(t){if(Array.isArray(t))return nt(t)}(t)||function(t){if("u">typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return nt(t,void 0);var r=Object.prototype.toString.call(t).slice(8,-1);if("Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return nt(t,void 0)}}(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function nt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r0?r[i-1]:n,d=s||Object.keys(u);if("function"==typeof l||"spring"===l)return[].concat(r9(t),[e.runJSAnimation.bind(e,{from:f.style,to:u,duration:o,easing:l}),o]);var p=rU(d,o,l),h=nr(nr(nr({},f.style),u),{},{transition:p});return[].concat(r9(t),[h,o,c]).filter(rR)},[a,Math.max(void 0===l?0:l,n)])),[t.onAnimationEnd]))}},{key:"runAnimation",value:function(t){this.manager||(this.manager=(e=function(){return null},r=!1,n=function t(n){if(!r){if(Array.isArray(n)){if(!n.length)return;var i=function(t){if(Array.isArray(t))return t}(n)||function(t){if("u">typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(n)||function(t,e){if(t){if("string"==typeof t)return rN(t,void 0);var r=Object.prototype.toString.call(t).slice(8,-1);if("Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return rN(t,void 0)}}(n)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),o=i[0],a=i.slice(1);return"number"==typeof o?void rT(t.bind(null,a),o):(t(o),void rT(t.bind(null,a)))}"object"===r_(n)&&e(n),"function"==typeof n&&n()}},{stop:function(){r=!0},start:function(t){r=!1,n(t)},subscribe:function(t){return e=t,function(){e=function(){return null}}}}));var e,r,n,i=t.begin,o=t.duration,a=t.attributeName,l=t.to,u=t.easing,s=t.onAnimationStart,c=t.onAnimationEnd,f=t.steps,d=t.children,p=this.manager;if(this.unSubscribe=p.subscribe(this.handleStyleChange),"function"==typeof u||"function"==typeof d||"spring"===u)return void this.runJSAnimation(t);if(f.length>1)return void this.runStepAnimation(t);var h=a?nn({},a,l):l,y=rU(Object.keys(h),o,u);p.start([s,i,nr(nr({},h),{},{transition:y}),o,c])}},{key:"render",value:function(){var t=this.props,e=t.children,r=(t.begin,t.duration),n=(t.attributeName,t.easing,t.isActive),i=(t.steps,t.from,t.to,t.canBegin,t.onAnimationEnd,t.shouldReAnimate,t.onAnimationReStart,function(t,e){if(null==t)return{};var r,n,i=function(t,e){if(null==t)return{};var r,n,i={},o=Object.keys(t);for(n=0;n=0||(i[r]=t[r]);return i}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}(t,r7)),o=P.Children.count(e),a=this.state.style;if("function"==typeof e)return e(a);if(!n||0===o||r<=0)return e;var l=function(t){var e=t.props,r=e.style,n=e.className;return(0,P.cloneElement)(t,nr(nr({},i),{},{style:nr(nr({},void 0===r?{}:r),a),className:n}))};return 1===o?l(P.Children.only(e)):P.default.createElement("div",null,P.Children.map(e,function(t){return l(t)}))}}],function(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{},e=t.steps,r=t.duration;return e&&e.length?e.reduce(function(t,e){return t+(Number.isFinite(e.duration)&&e.duration>0?e.duration:0)},0):Number.isFinite(r)?r:0},nR=function(t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");i.prototype=Object.create(t&&t.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),Object.defineProperty(i,"prototype",{writable:!1}),t&&n_(i,t);var e,r,n=(e=function(){if("u"=0||(i[r]=t[r]);return i}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}(e,nE));return P.default.createElement(nk,nM({},n,{onEnter:this.handleEnter,onExit:this.handleExit,timeout:this.parseTimeout()}),function(){return P.default.createElement(ns,t.state,P.Children.only(r))})}}],function(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,n=Array(e);r=0?1:-1,u=r>=0?1:-1,s=+(n>=0&&r>=0||n<0&&r<0);if(a>0&&i instanceof Array){for(var c=[0,0,0,0],f=0;f<4;f++)c[f]=i[f]>a?a:i[f];o="M".concat(t,",").concat(e+l*c[0]),c[0]>0&&(o+="A ".concat(c[0],",").concat(c[0],",0,0,").concat(s,",").concat(t+u*c[0],",").concat(e)),o+="L ".concat(t+r-u*c[1],",").concat(e),c[1]>0&&(o+="A ".concat(c[1],",").concat(c[1],",0,0,").concat(s,",\n ").concat(t+r,",").concat(e+l*c[1])),o+="L ".concat(t+r,",").concat(e+n-l*c[2]),c[2]>0&&(o+="A ".concat(c[2],",").concat(c[2],",0,0,").concat(s,",\n ").concat(t+r-u*c[2],",").concat(e+n)),o+="L ".concat(t+u*c[3],",").concat(e+n),c[3]>0&&(o+="A ".concat(c[3],",").concat(c[3],",0,0,").concat(s,",\n ").concat(t,",").concat(e+n-l*c[3])),o+="Z"}else if(a>0&&i===+i&&i>0){var d=Math.min(a,i);o="M ".concat(t,",").concat(e+l*d,"\n A ").concat(d,",").concat(d,",0,0,").concat(s,",").concat(t+u*d,",").concat(e,"\n L ").concat(t+r-u*d,",").concat(e,"\n A ").concat(d,",").concat(d,",0,0,").concat(s,",").concat(t+r,",").concat(e+l*d,"\n L ").concat(t+r,",").concat(e+n-l*d,"\n A ").concat(d,",").concat(d,",0,0,").concat(s,",").concat(t+r-u*d,",").concat(e+n,"\n L ").concat(t+u*d,",").concat(e+n,"\n A ").concat(d,",").concat(d,",0,0,").concat(s,",").concat(t,",").concat(e+n-l*d," Z")}else o="M ".concat(t,",").concat(e," h ").concat(r," v ").concat(n," h ").concat(-r," Z");return o},nq=function(t,e){if(!t||!e)return!1;var r=t.x,n=t.y,i=e.x,o=e.y,a=e.width,l=e.height;if(Math.abs(a)>0&&Math.abs(l)>0){var u=Math.min(i,i+a),s=Math.max(i,i+a),c=Math.min(o,o+l),f=Math.max(o,o+l);return r>=u&&r<=s&&n>=c&&n<=f}return!1},nX={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},nG=function(t){var e,r=nV(nV({},nX),t),n=(0,P.useRef)(),i=function(t){if(Array.isArray(t))return t}(e=(0,P.useState)(-1))||function(t,e){var r=null==t?null:"u">typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,o,a,l=[],u=!0,s=!1;try{o=(r=r.call(t)).next,!1;for(;!(u=(n=o.call(r)).done)&&(l.push(n.value),2!==l.length);u=!0);}catch(t){s=!0,i=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw i}}return l}}(e,2)||function(t,e){if(t){if("string"==typeof t)return nF(t,2);var r=Object.prototype.toString.call(t).slice(8,-1);if("Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return nF(t,2)}}(e,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),o=i[0],a=i[1];(0,P.useEffect)(function(){if(n.current&&n.current.getTotalLength)try{var t=n.current.getTotalLength();t&&a(t)}catch(t){}},[]);var l=r.x,u=r.y,s=r.width,c=r.height,f=r.radius,d=r.className,p=r.animationEasing,h=r.animationDuration,y=r.animationBegin,m=r.isAnimationActive,v=r.isUpdateAnimationActive;if(l!==+l||u!==+u||s!==+s||c!==+c||0===s||0===c)return null;var g=(0,$.default)("recharts-rectangle",d);return v?P.default.createElement(ns,{canBegin:o>0,from:{width:s,height:c,x:l,y:u},to:{width:s,height:c,x:l,y:u},duration:h,animationEasing:p,isActive:v},function(t){var e=t.width,i=t.height,a=t.x,l=t.y;return P.default.createElement(ns,{canBegin:o>0,from:"0px ".concat(-1===o?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:h,isActive:m,easing:p},P.default.createElement("path",n$({},tA(r,!0),{className:g,d:nW(a,l,e,i,f),ref:n})))}):P.default.createElement("path",n$({},tA(r,!0),{className:g,d:nW(l,u,s,c,f)}))};function nY(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function nK(t,e){switch(arguments.length){case 0:break;case 1:"function"==typeof t?this.interpolator(t):this.range(t);break;default:this.domain(t),"function"==typeof e?this.interpolator(e):this.range(e)}return this}t.s([],1005);class nZ extends Map{constructor(t,e=nQ){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[e,r]of t)this.set(e,r)}get(t){return super.get(nJ(this,t))}has(t){return super.has(nJ(this,t))}set(t,e){return super.set(function({_intern:t,_key:e},r){let n=e(r);return t.has(n)?t.get(n):(t.set(n,r),r)}(this,t),e)}delete(t){return super.delete(function({_intern:t,_key:e},r){let n=e(r);return t.has(n)&&(r=t.get(n),t.delete(n)),r}(this,t))}}function nJ({_intern:t,_key:e},r){let n=e(r);return t.has(n)?t.get(n):r}function nQ(t){return null!==t&&"object"==typeof t?t.valueOf():t}let n0=Symbol("implicit");function n1(){var t=new nZ,e=[],r=[],n=n0;function i(i){let o=t.get(i);if(void 0===o){if(n!==n0)return n;t.set(i,o=e.push(i)-1)}return r[o%r.length]}return i.domain=function(r){if(!arguments.length)return e.slice();for(let n of(e=[],t=new nZ,r))t.has(n)||t.set(n,e.push(n)-1);return i},i.range=function(t){return arguments.length?(r=Array.from(t),i):r.slice()},i.unknown=function(t){return arguments.length?(n=t,i):n},i.copy=function(){return n1(e,r).unknown(n)},nY.apply(i,arguments),i}function n2(){var t,e,r=n1().unknown(void 0),n=r.domain,i=r.range,o=0,a=1,l=!1,u=0,s=0,c=.5;function f(){var r=n().length,f=a1&&void 0!==arguments[1]?arguments[1]:{};if(null==t||t6.isSsr)return{width:0,height:0};var n=(Object.keys(e=n6({},r)).forEach(function(t){e[t]||delete e[t]}),e),i=JSON.stringify({text:t,copyStyle:n});if(n8.widthCache[i])return n8.widthCache[i];try{var o=document.getElementById(n9);o||((o=document.createElement("span")).setAttribute("id",n9),o.setAttribute("aria-hidden","true"),document.body.appendChild(o));var a=n6(n6({},n7),n);Object.assign(o.style,a),o.textContent="".concat(t);var l=o.getBoundingClientRect(),u={width:l.width,height:l.height};return n8.widthCache[i]=u,++n8.cacheCount>2e3&&(n8.cacheCount=0,n8.widthCache={}),u}catch(t){return{width:0,height:0}}};function ie(t){return(ie="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ir(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"u">typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,o,a,l=[],u=!0,s=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(l.push(n.value),l.length!==e);u=!0);}catch(t){s=!0,i=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw i}}return l}}(t,e)||function(t,e){if(t){if("string"==typeof t)return ii(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if("Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ii(t,e)}}(t,e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ii(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r=0)continue;r[n]=t[n]}return r}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}function iw(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"u">typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,o,a,l=[],u=!0,s=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(l.push(n.value),l.length!==e);u=!0);}catch(t){s=!0,i=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw i}}return l}}(t,e)||function(t,e){if(t){if("string"==typeof t)return iO(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if("Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return iO(t,e)}}(t,e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function iO(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r0&&void 0!==arguments[0]?arguments[0]:[];return t.reduce(function(t,e){var o=e.word,a=e.width,l=t[t.length-1];return l&&(null==n||i||l.width+a+ra||e.reduce(function(t,e){return t.width>e.width?t:e}).width>Number(n),e]},h=0,y=l.length-1,m=0;h<=y&&m<=l.length-1;){var v=Math.floor((h+y)/2),g=iw(p(v-1),2),b=g[0],x=g[1],w=iw(p(v),1)[0];if(b||w||(h=v+1),b&&w&&(y=v-1),!b&&w){o=x;break}m++}return o||d},iP=function(t){return[{words:(0,I.default)(t)?[]:t.toString().split(ij)}]},iE=function(t){var e=t.width,r=t.scaleToFit,n=t.children,i=t.style,o=t.breakAll,a=t.maxLines;if((e||r)&&!t6.isSsr){var l=iS({breakAll:o,children:n,style:i});if(!l)return iP(n);var u=l.wordsWithComputedWidth,s=l.spaceWidth;return ik({breakAll:o,children:n,maxLines:a,style:i},u,s,e,r)}return iP(n)},iA="#808080",iM=function(t){var e,r=t.x,n=void 0===r?0:r,i=t.y,o=void 0===i?0:i,a=t.lineHeight,l=void 0===a?"1em":a,u=t.capHeight,s=void 0===u?"0.71em":u,c=t.scaleToFit,f=void 0!==c&&c,d=t.textAnchor,p=t.verticalAnchor,h=t.fill,y=void 0===h?iA:h,m=ix(t,iv),v=(0,P.useMemo)(function(){return iE({breakAll:m.breakAll,children:m.children,maxLines:m.maxLines,scaleToFit:f,style:m.style,width:m.width})},[m.breakAll,m.children,m.maxLines,f,m.style,m.width]),g=m.dx,b=m.dy,x=m.angle,w=m.className,O=m.breakAll,j=ix(m,ig);if(!Z(n)||!Z(o))return null;var S=n+(K(g)?g:0),k=o+(K(b)?b:0);switch(void 0===p?"end":p){case"start":e=im("calc(".concat(s,")"));break;case"middle":e=im("calc(".concat((v.length-1)/2," * -").concat(l," + (").concat(s," / 2))"));break;default:e=im("calc(".concat(v.length-1," * -").concat(l,")"))}var E=[];if(f){var A=v[0].width,M=m.width;E.push("scale(".concat((K(M)?M/A:1)/A,")"))}return x&&E.push("rotate(".concat(x,", ").concat(S,", ").concat(k,")")),E.length&&(j.transform=E.join(" ")),P.default.createElement("text",ib({},tA(j,!0),{x:S,y:k,className:(0,$.default)("recharts-text",w),textAnchor:void 0===d?"start":d,fill:y.includes("url")?iA:y}),v.map(function(t,r){var n=t.words.join(O?"":" ");return P.default.createElement("tspan",{x:S,dy:0===r?e:l,key:"".concat(n,"-").concat(r)},n)}))};t.i(1005),t.s([],59481),t.i(59481);let iC=Math.sqrt(50),iT=Math.sqrt(10),i_=Math.sqrt(2);function iN(t,e,r){let n,i,o,a=(e-t)/Math.max(0,r),l=Math.floor(Math.log10(a)),u=a/Math.pow(10,l),s=u>=iC?10:u>=iT?5:u>=i_?2:1;return(l<0?(n=Math.round(t*(o=Math.pow(10,-l)/s)),i=Math.round(e*o),n/oe&&--i,o=-o):(n=Math.round(t/(o=Math.pow(10,l)*s)),i=Math.round(e/o),n*oe&&--i),i0))return[];if(t===e)return[t];let n=e=i))return[];let l=o-i+1,u=Array(l);if(n)if(a<0)for(let t=0;te?1:t>=e?0:NaN}function iR(t,e){return null==t||null==e?NaN:et?1:e>=t?0:NaN}function iz(t){let e,r,n;function i(t,n,o=0,a=t.length){if(o>>1;0>r(t[e],n)?o=e+1:a=e}while(oiB(t(e),r),n=(e,r)=>t(e)-r):(e=t===iB||t===iR?t:iU,r=t,n=t),{left:i,center:function(t,e,r=0,o=t.length){let a=i(t,e,r,o-1);return a>r&&n(t[a-1],e)>-n(t[a],e)?a-1:a},right:function(t,n,i=0,o=t.length){if(i>>1;0>=r(t[e],n)?i=e+1:o=e}while(i>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===r?i7(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===r?i7(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=iZ.exec(t))?new ot(e[1],e[2],e[3],1):(e=iJ.exec(t))?new ot(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=iQ.exec(t))?i7(e[1],e[2],e[3],e[4]):(e=i0.exec(t))?i7(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=i1.exec(t))?oa(e[1],e[2]/100,e[3]/100,1):(e=i2.exec(t))?oa(e[1],e[2]/100,e[3]/100,e[4]):i3.hasOwnProperty(t)?i8(i3[t]):"transparent"===t?new ot(NaN,NaN,NaN,0):null}function i8(t){return new ot(t>>16&255,t>>8&255,255&t,1)}function i7(t,e,r,n){return n<=0&&(t=e=r=NaN),new ot(t,e,r,n)}function i9(t,e,r,n){var i;return 1==arguments.length?((i=t)instanceof iq||(i=i6(i)),i)?new ot((i=i.rgb()).r,i.g,i.b,i.opacity):new ot:new ot(t,e,r,null==n?1:n)}function ot(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}function oe(){return`#${oo(this.r)}${oo(this.g)}${oo(this.b)}`}function or(){let t=on(this.opacity);return`${1===t?"rgb(":"rgba("}${oi(this.r)}, ${oi(this.g)}, ${oi(this.b)}${1===t?")":`, ${t})`}`}function on(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function oi(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function oo(t){return((t=oi(t))<16?"0":"")+t.toString(16)}function oa(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new ou(t,e,r,n)}function ol(t){if(t instanceof ou)return new ou(t.h,t.s,t.l,t.opacity);if(t instanceof iq||(t=i6(t)),!t)return new ou;if(t instanceof ou)return t;var e=(t=t.rgb()).r/255,r=t.g/255,n=t.b/255,i=Math.min(e,r,n),o=Math.max(e,r,n),a=NaN,l=o-i,u=(o+i)/2;return l?(a=e===o?(r-n)/l+(r0&&u<1?0:a,new ou(a,l,u,t.opacity)}function ou(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}function os(t){return(t=(t||0)%360)<0?t+360:t}function oc(t){return Math.max(0,Math.min(1,t||0))}function of(t,e,r){return(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)*255}function od(t,e,r,n,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*r+(1+3*t+3*o-3*a)*n+a*i)/6}iV(iq,i6,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:i4,formatHex:i4,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return ol(this).formatHsl()},formatRgb:i5,toString:i5}),iV(ot,i9,iW(iq,{brighter(t){return t=null==t?1.4285714285714286:Math.pow(1.4285714285714286,t),new ot(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new ot(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new ot(oi(this.r),oi(this.g),oi(this.b),on(this.opacity))},displayable(){return -.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:oe,formatHex:oe,formatHex8:function(){return`#${oo(this.r)}${oo(this.g)}${oo(this.b)}${oo((isNaN(this.opacity)?1:this.opacity)*255)}`},formatRgb:or,toString:or})),iV(ou,function(t,e,r,n){return 1==arguments.length?ol(t):new ou(t,e,r,null==n?1:n)},iW(iq,{brighter(t){return t=null==t?1.4285714285714286:Math.pow(1.4285714285714286,t),new ou(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new ou(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*e,i=2*r-n;return new ot(of(t>=240?t-240:t+120,i,n),of(t,i,n),of(t<120?t+240:t-120,i,n),this.opacity)},clamp(){return new ou(os(this.h),oc(this.s),oc(this.l),on(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let t=on(this.opacity);return`${1===t?"hsl(":"hsla("}${os(this.h)}, ${100*oc(this.s)}%, ${100*oc(this.l)}%${1===t?")":`, ${t})`}`}}));let op=t=>()=>t;function oh(t,e){var r=e-t;return r?function(e){return t+e*r}:op(isNaN(t)?e:t)}let oy=function t(e){var r,n=1==(r=+e)?oh:function(t,e){var n,i,o;return e-t?(n=t,i=e,n=Math.pow(n,o=r),i=Math.pow(i,o)-n,o=1/o,function(t){return Math.pow(n+t*i,o)}):op(isNaN(t)?e:t)};function i(t,e){var r=n((t=i9(t)).r,(e=i9(e)).r),i=n(t.g,e.g),o=n(t.b,e.b),a=oh(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=o(e),t.opacity=a(e),t+""}}return i.gamma=t,i}(1);function om(t){return function(e){var r,n,i=e.length,o=Array(i),a=Array(i),l=Array(i);for(r=0;r=1?(r=1,e-1):Math.floor(r*e),i=t[n],o=t[n+1],a=n>0?t[n-1]:2*i-o,l=nl&&(a=e.slice(l,a),s[u]?s[u]+=a:s[++u]=a),(i=i[0])===(o=o[0])?s[u]?s[u]+=o:s[++u]=o:(s[++u]=null,c.push({i:u,x:ov(i,o)})),l=ob.lastIndex;return le&&(r=t,t=e,e=r),s=function(r){return Math.max(t,Math.min(e,r))}),n=u>2?oE:oP,i=o=null,f}function f(e){return null==e||isNaN(e*=1)?r:(i||(i=n(a.map(t),l,u)))(t(s(e)))}return f.invert=function(r){return s(e((o||(o=n(l,a.map(t),ov)))(r)))},f.domain=function(t){return arguments.length?(a=Array.from(t,oO),c()):a.slice()},f.range=function(t){return arguments.length?(l=Array.from(t),c()):l.slice()},f.rangeRound=function(t){return l=Array.from(t),u=ow,c()},f.clamp=function(t){return arguments.length?(s=!!t||oS,c()):s!==oS},f.interpolate=function(t){return arguments.length?(u=t,c()):u},f.unknown=function(t){return arguments.length?(r=t,f):r},function(r,n){return t=r,e=n,c()}}function oC(){return oM()(oS,oS)}function oT(t,e){if(!isFinite(t)||0===t)return null;var r=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"),n=t.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+t.slice(r+1)]}function o_(t){return(t=oT(Math.abs(t)))?t[1]:NaN}var oN=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function oD(t){var e;if(!(e=oN.exec(t)))throw Error("invalid format: "+t);return new oI({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function oI(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function oL(t,e){var r=oT(t,e);if(!r)return t+"";var n=r[0],i=r[1];return i<0?"0."+Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+Array(i-n.length+2).join("0")}oD.prototype=oI.prototype,oI.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};let oB={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>oL(100*t,e),r:oL,s:function(t,e){var r=oT(t,e);if(!r)return g=void 0,t.toPrecision(e);var n=r[0],i=r[1],o=i-(g=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=n.length;return o===a?n:o>a?n+Array(o-a+1).join("0"):o>0?n.slice(0,o)+"."+n.slice(o):"0."+Array(1-o).join("0")+oT(t,Math.max(0,e+o-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function oR(t){return t}var oz=Array.prototype.map,oU=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function o$(t,e,r,n){var i,o,a=iL(t,e,r);switch((n=oD(null==n?",f":n)).type){case"s":var l=Math.max(Math.abs(t),Math.abs(e));return null!=n.precision||isNaN(o=Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(o_(l)/3)))-o_(Math.abs(a))))||(n.precision=o),w(n,l);case"":case"e":case"g":case"p":case"r":null!=n.precision||isNaN(o=Math.max(0,o_(Math.abs(Math.max(Math.abs(t),Math.abs(e)))-(i=Math.abs(i=a)))-o_(i))+1)||(n.precision=o-("e"===n.type));break;case"f":case"%":null!=n.precision||isNaN(o=Math.max(0,-o_(Math.abs(a))))||(n.precision=o-("%"===n.type)*2)}return x(n)}function oF(t){var e=t.domain;return t.ticks=function(t){var r=e();return iD(r[0],r[r.length-1],null==t?10:t)},t.tickFormat=function(t,r){var n=e();return o$(n[0],n[n.length-1],null==t?10:t,r)},t.nice=function(r){null==r&&(r=10);var n,i,o=e(),a=0,l=o.length-1,u=o[a],s=o[l],c=10;for(s0;){if((i=iI(u,s,r))===n)return o[a]=u,o[l]=s,e(o);if(i>0)u=Math.floor(u/i)*i,s=Math.ceil(s/i)*i;else if(i<0)u=Math.ceil(u*i)/i,s=Math.floor(s*i)/i;else break;n=i}return t},t}function oH(){var t=oC();return t.copy=function(){return oA(t,oH())},nY.apply(t,arguments),oF(t)}function oV(t){var e;function r(t){return null==t||isNaN(t*=1)?e:t}return r.invert=r,r.domain=r.range=function(e){return arguments.length?(t=Array.from(e,oO),r):t.slice()},r.unknown=function(t){return arguments.length?(e=t,r):e},r.copy=function(){return oV(t).unknown(e)},t=arguments.length?Array.from(t,oO):[0,1],oF(r)}function oW(t,e){t=t.slice();var r,n=0,i=t.length-1,o=t[n],a=t[i];return a-t(-e,r)}function oJ(t){let e,r,n=t(oq,oX),i=n.domain,o=10;function a(){var a,l;return e=(a=o)===Math.E?Math.log:10===a&&Math.log10||2===a&&Math.log2||(a=Math.log(a),t=>Math.log(t)/a),r=10===(l=o)?oK:l===Math.E?Math.exp:t=>Math.pow(l,t),i()[0]<0?(e=oZ(e),r=oZ(r),t(oG,oY)):t(oq,oX),n}return n.base=function(t){return arguments.length?(o=+t,a()):o},n.domain=function(t){return arguments.length?(i(t),a()):i()},n.ticks=t=>{let n,a,l=i(),u=l[0],s=l[l.length-1],c=s0){for(;f<=d;++f)for(n=1;ns)break;h.push(a)}}else for(;f<=d;++f)for(n=o-1;n>=1;--n)if(!((a=f>0?n/r(-f):n*r(f))s)break;h.push(a)}2*h.length{if(null==t&&(t=10),null==i&&(i=10===o?"s":","),"function"!=typeof i&&(o%1||null!=(i=oD(i)).precision||(i.trim=!0),i=x(i)),t===1/0)return i;let a=Math.max(1,o*t/n.ticks().length);return t=>{let n=t/r(Math.round(e(t)));return n*oi(oW(i(),{floor:t=>r(Math.floor(e(t))),ceil:t=>r(Math.ceil(e(t)))})),n}function oQ(){let t=oJ(oM()).domain([1,10]);return t.copy=()=>oA(t,oQ()).base(t.base()),nY.apply(t,arguments),t}function o0(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function o1(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function o2(t){var e=1,r=t(o0(1),o1(e));return r.constant=function(r){return arguments.length?t(o0(e=+r),o1(e)):e},oF(r)}function o3(){var t=o2(oM());return t.copy=function(){return oA(t,o3()).constant(t.constant())},nY.apply(t,arguments)}function o4(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function o5(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function o6(t){return t<0?-t*t:t*t}function o8(t){var e=t(oS,oS),r=1;return e.exponent=function(e){return arguments.length?1==(r=+e)?t(oS,oS):.5===r?t(o5,o6):t(o4(r),o4(1/r)):r},oF(e)}function o7(){var t=o8(oM());return t.copy=function(){return oA(t,o7()).exponent(t.exponent())},nY.apply(t,arguments),t}function o9(){return o7.apply(null,arguments).exponent(.5)}function at(t){return Math.sign(t)*t*t}function ae(){var t,e=oC(),r=[0,1],n=!1;function i(r){var i,o=Math.sign(i=e(r))*Math.sqrt(Math.abs(i));return isNaN(o)?t:n?Math.round(o):o}return i.invert=function(t){return e.invert(at(t))},i.domain=function(t){return arguments.length?(e.domain(t),i):e.domain()},i.range=function(t){return arguments.length?(e.range((r=Array.from(t,oO)).map(at)),i):r.slice()},i.rangeRound=function(t){return i.range(t).round(!0)},i.round=function(t){return arguments.length?(n=!!t,i):n},i.clamp=function(t){return arguments.length?(e.clamp(t),i):e.clamp()},i.unknown=function(e){return arguments.length?(t=e,i):t},i.copy=function(){return ae(e.domain(),r).round(n).clamp(e.clamp()).unknown(t)},nY.apply(i,arguments),oF(i)}function ar(t,e){let r;if(void 0===e)for(let e of t)null!=e&&(r=e)&&(r=e);else{let n=-1;for(let i of t)null!=(i=e(i,++n,t))&&(r=i)&&(r=i)}return r}function an(t,e){let r;if(void 0===e)for(let e of t)null!=e&&(r>e||void 0===r&&e>=e)&&(r=e);else{let n=-1;for(let i of t)null!=(i=e(i,++n,t))&&(r>i||void 0===r&&i>=i)&&(r=i)}return r}function ai(t,e){return(null==t||!(t>=t))-(null==e||!(e>=e))||(te))}function ao(t,e,r){let n=t[e];t[e]=t[r],t[r]=n}function aa(){var t,e=[],r=[],n=[];function i(){var t=0,i=Math.max(1,r.length);for(n=Array(i-1);++t=1)return+r(t[n-1],n-1,t);var n,i=(n-1)*e,o=Math.floor(i),a=+r(t[o],o,t);return a+(r(t[o+1],o+1,t)-a)*(i-o)}}(e,t/i);return o}function o(e){return null==e||isNaN(e*=1)?t:r[iH(n,e)]}return o.invertExtent=function(t){var i=r.indexOf(t);return i<0?[NaN,NaN]:[i>0?n[i-1]:e[0],i=n?[i[n-1],r]:[i[a-1],i[a]]},a.unknown=function(e){return arguments.length&&(t=e),a},a.thresholds=function(){return i.slice()},a.copy=function(){return al().domain([e,r]).range(o).unknown(t)},nY.apply(oF(a),arguments)}function au(){var t,e=[.5],r=[0,1],n=1;function i(i){return null!=i&&i<=i?r[iH(e,i,0,n)]:t}return i.domain=function(t){return arguments.length?(n=Math.min((e=Array.from(t)).length,r.length-1),i):e.slice()},i.range=function(t){return arguments.length?(r=Array.from(t),n=Math.min(e.length,r.length-1),i):r.slice()},i.invertExtent=function(t){var n=r.indexOf(t);return[e[n-1],e[n]]},i.unknown=function(e){return arguments.length?(t=e,i):t},i.copy=function(){return au().domain(e).range(r).unknown(t)},nY.apply(i,arguments)}x=(b=function(t){var e,r,n,i=void 0===t.grouping||void 0===t.thousands?oR:(e=oz.call(t.grouping,Number),r=t.thousands+"",function(t,n){for(var i=t.length,o=[],a=0,l=e[0],u=0;i>0&&l>0&&(u+l+1>n&&(l=Math.max(1,n-u)),o.push(t.substring(i-=l,i+l)),!((u+=l+1)>n));)l=e[a=(a+1)%e.length];return o.reverse().join(r)}),o=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",l=void 0===t.decimal?".":t.decimal+"",u=void 0===t.numerals?oR:(n=oz.call(t.numerals,String),function(t){return t.replace(/[0-9]/g,function(t){return n[+t]})}),s=void 0===t.percent?"%":t.percent+"",c=void 0===t.minus?"−":t.minus+"",f=void 0===t.nan?"NaN":t.nan+"";function d(t,e){var r=(t=oD(t)).fill,n=t.align,d=t.sign,p=t.symbol,h=t.zero,y=t.width,m=t.comma,v=t.precision,b=t.trim,x=t.type;"n"===x?(m=!0,x="g"):oB[x]||(void 0===v&&(v=12),b=!0,x="g"),(h||"0"===r&&"="===n)&&(h=!0,r="0",n="=");var w=(e&&void 0!==e.prefix?e.prefix:"")+("$"===p?o:"#"===p&&/[boxX]/.test(x)?"0"+x.toLowerCase():""),O=("$"===p?a:/[%p]/.test(x)?s:"")+(e&&void 0!==e.suffix?e.suffix:""),j=oB[x],S=/[defgprs%]/.test(x);function k(t){var e,o,a,s=w,p=O;if("c"===x)p=j(t)+p,t="";else{var k=(t*=1)<0||1/t<0;if(t=isNaN(t)?f:j(Math.abs(t),v),b&&(t=function(t){e:for(var e,r=t.length,n=1,i=-1;n0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),k&&0==+t&&"+"!==d&&(k=!1),s=(k?"("===d?d:c:"-"===d||"("===d?"":d)+s,p=("s"!==x||isNaN(t)||void 0===g?"":oU[8+g/3])+p+(k&&"("===d?")":""),S){for(e=-1,o=t.length;++e(a=t.charCodeAt(e))||a>57){p=(46===a?l+t.slice(e+1):t.slice(e))+p,t=t.slice(0,e);break}}}m&&!h&&(t=i(t,1/0));var P=s.length+t.length+p.length,E=P>1)+s+t+p+E.slice(P);break;default:t=E+s+t+p}return u(t)}return v=void 0===v?6:/[gprs]/.test(x)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v)),k.toString=function(){return t+""},k}return{format:d,formatPrefix:function(t,e){var r=3*Math.max(-8,Math.min(8,Math.floor(o_(e)/3))),n=Math.pow(10,-r),i=d(((t=oD(t)).type="f",t),{suffix:oU[8+r/3]});return function(t){return i(n*t)}}}}({thousands:",",grouping:[3],currency:["$",""]})).format,w=b.formatPrefix;let as=new Date,ac=new Date;function af(t,e,r,n){function i(e){return t(e=0==arguments.length?new Date:new Date(+e)),e}return i.floor=e=>(t(e=new Date(+e)),e),i.ceil=r=>(t(r=new Date(r-1)),e(r,1),t(r),r),i.round=t=>{let e=i(t),r=i.ceil(t);return t-e(e(t=new Date(+t),null==r?1:Math.floor(r)),t),i.range=(r,n,o)=>{let a,l=[];if(r=i.ceil(r),o=null==o?1:Math.floor(o),!(r0))return l;do l.push(a=new Date(+r)),e(r,o),t(r);while(aaf(e=>{if(e>=e)for(;t(e),!r(e);)e.setTime(e-1)},(t,n)=>{if(t>=t)if(n<0)for(;++n<=0;)for(;e(t,-1),!r(t););else for(;--n>=0;)for(;e(t,1),!r(t););}),r&&(i.count=(e,n)=>(as.setTime(+e),ac.setTime(+n),t(as),t(ac),Math.floor(r(as,ac))),i.every=t=>isFinite(t=Math.floor(t))&&t>0?t>1?i.filter(n?e=>n(e)%t==0:e=>i.count(0,e)%t==0):i:null),i}let ad=af(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());ad.every=t=>isFinite(t=Math.floor(t))&&t>0?af(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,r)=>{e.setFullYear(e.getFullYear()+r*t)}):null,ad.range;let ap=af(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());ap.every=t=>isFinite(t=Math.floor(t))&&t>0?af(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCFullYear(e.getUTCFullYear()+r*t)}):null,ap.range;let ah=af(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());ah.range;let ay=af(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());ay.range;function am(t){return af(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(t,e)=>{t.setDate(t.getDate()+7*e)},(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*6e4)/6048e5)}let av=am(0),ag=am(1),ab=am(2),ax=am(3),aw=am(4),aO=am(5),aj=am(6);function aS(t){return af(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+7*e)},(t,e)=>(e-t)/6048e5)}av.range,ag.range,ab.range,ax.range,aw.range,aO.range,aj.range;let ak=aS(0),aP=aS(1),aE=aS(2),aA=aS(3),aM=aS(4),aC=aS(5),aT=aS(6);ak.range,aP.range,aE.range,aA.range,aM.range,aC.range,aT.range;let a_=af(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*6e4)/864e5,t=>t.getDate()-1);a_.range;let aN=af(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>t.getUTCDate()-1);aN.range;let aD=af(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>Math.floor(t/864e5));aD.range;let aI=af(t=>{t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds()-6e4*t.getMinutes())},(t,e)=>{t.setTime(+t+36e5*e)},(t,e)=>(e-t)/36e5,t=>t.getHours());aI.range;let aL=af(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+36e5*e)},(t,e)=>(e-t)/36e5,t=>t.getUTCHours());aL.range;let aB=af(t=>{t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds())},(t,e)=>{t.setTime(+t+6e4*e)},(t,e)=>(e-t)/6e4,t=>t.getMinutes());aB.range;let aR=af(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+6e4*e)},(t,e)=>(e-t)/6e4,t=>t.getUTCMinutes());aR.range;let az=af(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+1e3*e)},(t,e)=>(e-t)/1e3,t=>t.getUTCSeconds());az.range;let aU=af(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);function a$(t,e,r,n,i,o){let a=[[az,1,1e3],[az,5,5e3],[az,15,15e3],[az,30,3e4],[o,1,6e4],[o,5,3e5],[o,15,9e5],[o,30,18e5],[i,1,36e5],[i,3,108e5],[i,6,216e5],[i,12,432e5],[n,1,864e5],[n,2,1728e5],[r,1,6048e5],[e,1,2592e6],[e,3,7776e6],[t,1,31536e6]];function l(e,r,n){let i=Math.abs(r-e)/n,o=iz(([,,t])=>t).right(a,i);if(o===a.length)return t.every(iL(e/31536e6,r/31536e6,n));if(0===o)return aU.every(Math.max(iL(e,r,n),1));let[l,u]=a[i/a[o-1][2]isFinite(t=Math.floor(t))&&t>0?t>1?af(e=>{e.setTime(Math.floor(e/t)*t)},(e,r)=>{e.setTime(+e+r*t)},(e,r)=>(r-e)/t):aU:null,aU.range;let[aF,aH]=a$(ap,ay,ak,aD,aL,aR),[aV,aW]=a$(ad,ah,av,a_,aI,aB);function aq(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function aX(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function aG(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}var aY={"-":"",_:" ",0:"0"},aK=/^\s*\d+/,aZ=/^%/,aJ=/[\\^$*+?|[\]().{}]/g;function aQ(t,e,r){var n=t<0?"-":"",i=(n?-t:t)+"",o=i.length;return n+(o[t.toLowerCase(),e]))}function a3(t,e,r){var n=aK.exec(e.slice(r,r+1));return n?(t.w=+n[0],r+n[0].length):-1}function a4(t,e,r){var n=aK.exec(e.slice(r,r+1));return n?(t.u=+n[0],r+n[0].length):-1}function a5(t,e,r){var n=aK.exec(e.slice(r,r+2));return n?(t.U=+n[0],r+n[0].length):-1}function a6(t,e,r){var n=aK.exec(e.slice(r,r+2));return n?(t.V=+n[0],r+n[0].length):-1}function a8(t,e,r){var n=aK.exec(e.slice(r,r+2));return n?(t.W=+n[0],r+n[0].length):-1}function a7(t,e,r){var n=aK.exec(e.slice(r,r+4));return n?(t.y=+n[0],r+n[0].length):-1}function a9(t,e,r){var n=aK.exec(e.slice(r,r+2));return n?(t.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function lt(t,e,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6));return n?(t.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function le(t,e,r){var n=aK.exec(e.slice(r,r+1));return n?(t.q=3*n[0]-3,r+n[0].length):-1}function lr(t,e,r){var n=aK.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function ln(t,e,r){var n=aK.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function li(t,e,r){var n=aK.exec(e.slice(r,r+3));return n?(t.m=0,t.d=+n[0],r+n[0].length):-1}function lo(t,e,r){var n=aK.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function la(t,e,r){var n=aK.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function ll(t,e,r){var n=aK.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function lu(t,e,r){var n=aK.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function ls(t,e,r){var n=aK.exec(e.slice(r,r+6));return n?(t.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function lc(t,e,r){var n=aZ.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function lf(t,e,r){var n=aK.exec(e.slice(r));return n?(t.Q=+n[0],r+n[0].length):-1}function ld(t,e,r){var n=aK.exec(e.slice(r));return n?(t.s=+n[0],r+n[0].length):-1}function lp(t,e){return aQ(t.getDate(),e,2)}function lh(t,e){return aQ(t.getHours(),e,2)}function ly(t,e){return aQ(t.getHours()%12||12,e,2)}function lm(t,e){return aQ(1+a_.count(ad(t),t),e,3)}function lv(t,e){return aQ(t.getMilliseconds(),e,3)}function lg(t,e){return lv(t,e)+"000"}function lb(t,e){return aQ(t.getMonth()+1,e,2)}function lx(t,e){return aQ(t.getMinutes(),e,2)}function lw(t,e){return aQ(t.getSeconds(),e,2)}function lO(t){var e=t.getDay();return 0===e?7:e}function lj(t,e){return aQ(av.count(ad(t)-1,t),e,2)}function lS(t){var e=t.getDay();return e>=4||0===e?aw(t):aw.ceil(t)}function lk(t,e){return t=lS(t),aQ(aw.count(ad(t),t)+(4===ad(t).getDay()),e,2)}function lP(t){return t.getDay()}function lE(t,e){return aQ(ag.count(ad(t)-1,t),e,2)}function lA(t,e){return aQ(t.getFullYear()%100,e,2)}function lM(t,e){return aQ((t=lS(t)).getFullYear()%100,e,2)}function lC(t,e){return aQ(t.getFullYear()%1e4,e,4)}function lT(t,e){var r=t.getDay();return aQ((t=r>=4||0===r?aw(t):aw.ceil(t)).getFullYear()%1e4,e,4)}function l_(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+aQ(e/60|0,"0",2)+aQ(e%60,"0",2)}function lN(t,e){return aQ(t.getUTCDate(),e,2)}function lD(t,e){return aQ(t.getUTCHours(),e,2)}function lI(t,e){return aQ(t.getUTCHours()%12||12,e,2)}function lL(t,e){return aQ(1+aN.count(ap(t),t),e,3)}function lB(t,e){return aQ(t.getUTCMilliseconds(),e,3)}function lR(t,e){return lB(t,e)+"000"}function lz(t,e){return aQ(t.getUTCMonth()+1,e,2)}function lU(t,e){return aQ(t.getUTCMinutes(),e,2)}function l$(t,e){return aQ(t.getUTCSeconds(),e,2)}function lF(t){var e=t.getUTCDay();return 0===e?7:e}function lH(t,e){return aQ(ak.count(ap(t)-1,t),e,2)}function lV(t){var e=t.getUTCDay();return e>=4||0===e?aM(t):aM.ceil(t)}function lW(t,e){return t=lV(t),aQ(aM.count(ap(t),t)+(4===ap(t).getUTCDay()),e,2)}function lq(t){return t.getUTCDay()}function lX(t,e){return aQ(aP.count(ap(t)-1,t),e,2)}function lG(t,e){return aQ(t.getUTCFullYear()%100,e,2)}function lY(t,e){return aQ((t=lV(t)).getUTCFullYear()%100,e,2)}function lK(t,e){return aQ(t.getUTCFullYear()%1e4,e,4)}function lZ(t,e){var r=t.getUTCDay();return aQ((t=r>=4||0===r?aM(t):aM.ceil(t)).getUTCFullYear()%1e4,e,4)}function lJ(){return"+0000"}function lQ(){return"%"}function l0(t){return+t}function l1(t){return Math.floor(t/1e3)}function l2(t){return new Date(t)}function l3(t){return t instanceof Date?+t:+new Date(+t)}function l4(t,e,r,n,i,o,a,l,u,s){var c=oC(),f=c.invert,d=c.domain,p=s(".%L"),h=s(":%S"),y=s("%I:%M"),m=s("%I %p"),v=s("%a %d"),g=s("%b %d"),b=s("%B"),x=s("%Y");function w(t){return(u(t)e(n/(t.length-1)))},r.quantiles=function(e){return Array.from({length:e+1},(r,n)=>(function(t,e,r){if(!(!(n=(t=Float64Array.from(function*(t,e){if(void 0===e)for(let e of t)null!=e&&(e*=1)>=e&&(yield e);else{let r=-1;for(let n of t)null!=(n=e(n,++r,t))&&(n*=1)>=n&&(yield n)}}(t,void 0))).length)||isNaN(e*=1))){if(e<=0||n<2)return an(t);if(e>=1)return ar(t);var n,i=(n-1)*e,o=Math.floor(i),a=ar((function t(e,r,n=0,i=1/0,o){if(r=Math.floor(r),n=Math.floor(Math.max(0,n)),i=Math.floor(Math.min(e.length-1,i)),!(n<=r&&r<=i))return e;for(o=void 0===o?ai:function(t=iB){if(t===iB)return ai;if("function"!=typeof t)throw TypeError("compare is not a function");return(e,r)=>{let n=t(e,r);return n||0===n?n:(0===t(r,r))-(0===t(e,e))}}(o);i>n;){if(i-n>600){let a=i-n+1,l=r-n+1,u=Math.log(a),s=.5*Math.exp(2*u/3),c=.5*Math.sqrt(u*s*(a-s)/a)*(l-a/2<0?-1:1),f=Math.max(n,Math.floor(r-l*s/a+c)),d=Math.min(i,Math.floor(r+(a-l)*s/a+c));t(e,r,f,d,o)}let a=e[r],l=n,u=i;for(ao(e,n,r),o(e[i],a)>0&&ao(e,n,i);lo(e[l],a);)++l;for(;o(e[u],a)>0;)--u}0===o(e[n],a)?ao(e,n,u):ao(e,++u,i),u<=r&&(n=u+1),r<=u&&(i=u-1)}return e})(t,o).subarray(0,o+1));return a+(an(t.subarray(o+1))-a)*(i-o)}})(t,n/e))},r.copy=function(){return ui(e).domain(t)},nK.apply(r,arguments)}function uo(){var t,e,r,n,i,o,a,l=0,u=.5,s=1,c=1,f=oS,d=!1;function p(t){return isNaN(t*=1)?a:(t=.5+((t=+o(t))-e)*(c*t=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:l0,s:l1,S:lw,u:lO,U:lj,V:lk,w:lP,W:lE,x:null,X:null,y:lA,Y:lC,Z:l_,"%":lQ},x={a:function(t){return a[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return u[t.getUTCMonth()]},B:function(t){return l[t.getUTCMonth()]},c:null,d:lN,e:lN,f:lR,g:lY,G:lZ,H:lD,I:lI,j:lL,L:lB,m:lz,M:lU,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:l0,s:l1,S:l$,u:lF,U:lH,V:lW,w:lq,W:lX,x:null,X:null,y:lG,Y:lK,Z:lJ,"%":lQ},w={a:function(t,e,r){var n=p.exec(e.slice(r));return n?(t.w=h.get(n[0].toLowerCase()),r+n[0].length):-1},A:function(t,e,r){var n=f.exec(e.slice(r));return n?(t.w=d.get(n[0].toLowerCase()),r+n[0].length):-1},b:function(t,e,r){var n=v.exec(e.slice(r));return n?(t.m=g.get(n[0].toLowerCase()),r+n[0].length):-1},B:function(t,e,r){var n=y.exec(e.slice(r));return n?(t.m=m.get(n[0].toLowerCase()),r+n[0].length):-1},c:function(t,r,n){return S(t,e,r,n)},d:ln,e:ln,f:ls,g:a9,G:a7,H:lo,I:lo,j:li,L:lu,m:lr,M:la,p:function(t,e,r){var n=s.exec(e.slice(r));return n?(t.p=c.get(n[0].toLowerCase()),r+n[0].length):-1},q:le,Q:lf,s:ld,S:ll,u:a4,U:a5,V:a6,w:a3,W:a8,x:function(t,e,n){return S(t,r,e,n)},X:function(t,e,r){return S(t,n,e,r)},y:a9,Y:a7,Z:lt,"%":lc};function O(t,e){return function(r){var n,i,o,a=[],l=-1,u=0,s=t.length;for(r instanceof Date||(r=new Date(+r));++l53)return null;"w"in o||(o.w=1),"Z"in o?(n=(i=(n=aX(aG(o.y,0,1))).getUTCDay())>4||0===i?aP.ceil(n):aP(n),n=aN.offset(n,(o.V-1)*7),o.y=n.getUTCFullYear(),o.m=n.getUTCMonth(),o.d=n.getUTCDate()+(o.w+6)%7):(n=(i=(n=aq(aG(o.y,0,1))).getDay())>4||0===i?ag.ceil(n):ag(n),n=a_.offset(n,(o.V-1)*7),o.y=n.getFullYear(),o.m=n.getMonth(),o.d=n.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:+("W"in o)),i="Z"in o?aX(aG(o.y,0,1)).getUTCDay():aq(aG(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,aX(o)):aq(o)}}function S(t,e,r,n){for(var i,o,a=0,l=e.length,u=r.length;a=u)return -1;if(37===(i=e.charCodeAt(a++))){if(!(o=w[(i=e.charAt(a++))in aY?e.charAt(a++):i])||(n=o(t,r,n))<0)return -1}else if(i!=r.charCodeAt(n++))return -1}return n}return b.x=O(r,b),b.X=O(n,b),b.c=O(e,b),x.x=O(r,x),x.X=O(n,x),x.c=O(e,x),{format:function(t){var e=O(t+="",b);return e.toString=function(){return t},e},parse:function(t){var e=j(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=O(t+="",x);return e.toString=function(){return t},e},utcParse:function(t){var e=j(t+="",!0);return e.toString=function(){return t},e}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",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"]})).format,O.parse,S=O.utcFormat,O.utcParse,t.s(["scaleBand",()=>n2,"scaleDiverging",()=>ua,"scaleDivergingLog",()=>ul,"scaleDivergingPow",()=>us,"scaleDivergingSqrt",()=>uc,"scaleDivergingSymlog",()=>uu,"scaleIdentity",()=>oV,"scaleImplicit",0,n0,"scaleLinear",()=>oH,"scaleLog",()=>oQ,"scaleOrdinal",()=>n1,"scalePoint",()=>n3,"scalePow",()=>o7,"scaleQuantile",()=>aa,"scaleQuantize",()=>al,"scaleRadial",()=>ae,"scaleSequential",()=>l9,"scaleSequentialLog",()=>ut,"scaleSequentialPow",()=>ur,"scaleSequentialQuantile",()=>ui,"scaleSequentialSqrt",()=>un,"scaleSequentialSymlog",()=>ue,"scaleSqrt",()=>o9,"scaleSymlog",()=>o3,"scaleThreshold",()=>au,"scaleTime",()=>l5,"scaleUtc",()=>l6,"tickFormat",()=>o$],66902),t.i(66902),t.s(["scaleBand",()=>n2,"scaleDiverging",()=>ua,"scaleDivergingLog",()=>ul,"scaleDivergingPow",()=>us,"scaleDivergingSqrt",()=>uc,"scaleDivergingSymlog",()=>uu,"scaleIdentity",()=>oV,"scaleImplicit",0,n0,"scaleLinear",()=>oH,"scaleLog",()=>oQ,"scaleOrdinal",()=>n1,"scalePoint",()=>n3,"scalePow",()=>o7,"scaleQuantile",()=>aa,"scaleQuantize",()=>al,"scaleRadial",()=>ae,"scaleSequential",()=>l9,"scaleSequentialLog",()=>ut,"scaleSequentialPow",()=>ur,"scaleSequentialQuantile",()=>ui,"scaleSequentialSqrt",()=>un,"scaleSequentialSymlog",()=>ue,"scaleSqrt",()=>o9,"scaleSymlog",()=>o3,"scaleThreshold",()=>au,"scaleTime",()=>l5,"scaleUtc",()=>l6,"tickFormat",()=>o$],78319);var uf=t.i(78319);function ud(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function up(t,e){if((i=t.length)>1)for(var r,n,i,o=1,a=t[e[0]],l=a.length;o=0;)r[e]=e;return r}function uy(t,e){return t[e]}function um(t){let e=[];return e.key=t,e}Array.prototype.slice;var uv=t.i(56877),ug=t.i(34050),ub=t.i(94904),ux=t.i(7863),uw=t.i(27590);function uO(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r=e?r.apply(void 0,i):t(e-a,uP(function(){for(var t=arguments.length,e=Array(t),n=0;ntypeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(o)||function(t,e){if(t){if("string"==typeof t)return uO(t,void 0);var r=Object.prototype.toString.call(t).slice(8,-1);if("Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return uO(t,void 0)}}(o)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat(e))}))})}(t.length,t)},uA=function(t,e){for(var r=[],n=t;ntypeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||uB(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function uL(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("u">typeof Symbol&&Symbol.iterator in Object(t)){var r=[],n=!0,i=!1,o=void 0;try{for(var a,l=t[Symbol.iterator]();!(n=(a=l.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){i=!0,o=t}finally{try{n||null==l.return||l.return()}finally{if(i)throw o}}return r}}(t,e)||uB(t,e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function uB(t,e){if(t){if("string"==typeof t)return uR(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if("Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return uR(t,e)}}function uR(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);rn&&(i=n,o=r),[i,o]}function uU(t,e,r){if(t.lte(0))return new uw.default(0);var n=uD(t.toNumber()),i=new uw.default(10).pow(n),o=t.div(i),a=1!==n?.05:.1,l=new uw.default(Math.ceil(o.div(a).toNumber())).add(r).mul(a).mul(i);return e?l:new uw.default(Math.ceil(l))}function u$(t,e,r){var n=1,i=new uw.default(t);if(!i.isint()&&r){var o=Math.abs(t);o<1?(n=new uw.default(10).pow(uD(t)-1),i=new uw.default(Math.floor(i.div(n).toNumber())).mul(n)):o>1&&(i=new uw.default(Math.floor(t)))}else 0===t?i=new uw.default(Math.floor((e-1)/2)):r||(i=new uw.default(Math.floor(t)));var a=Math.floor((e-1)/2);return uC(uM(function(t){return i.add(new uw.default(t-a).mul(n)).toNumber()}),uA)(0,e)}var uF=u_(function(t){var e=uL(t,2),r=e[0],n=e[1],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6,o=!(arguments.length>2)||void 0===arguments[2]||arguments[2],a=Math.max(i,2),l=uL(uz([r,n]),2),u=l[0],s=l[1];if(u===-1/0||s===1/0){var c=s===1/0?[u].concat(uI(uA(0,i-1).map(function(){return 1/0}))):[].concat(uI(uA(0,i-1).map(function(){return-1/0})),[s]);return r>n?uT(c):c}if(u===s)return u$(u,i,o);var f=function t(e,r,n,i){var o,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(!Number.isFinite((r-e)/(n-1)))return{step:new uw.default(0),tickMin:new uw.default(0),tickMax:new uw.default(0)};var l=uU(new uw.default(r).sub(e).div(n-1),i,a),u=Math.ceil((o=e<=0&&r>=0?new uw.default(0):(o=new uw.default(e).add(r).div(2)).sub(new uw.default(o).mod(l))).sub(e).div(l).toNumber()),s=Math.ceil(new uw.default(r).sub(o).div(l).toNumber()),c=u+s+1;return c>n?t(e,r,n,i,a+1):(c0?s+(n-c):s,u=r>0?u:u+(n-c)),{step:l,tickMin:o.sub(new uw.default(u).mul(l)),tickMax:o.add(new uw.default(s).mul(l))})}(u,s,a,o),d=f.step,p=uN(f.tickMin,f.tickMax.add(new uw.default(.1).mul(d)),d);return r>n?uT(p):p});u_(function(t){var e=uL(t,2),r=e[0],n=e[1],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6,o=!(arguments.length>2)||void 0===arguments[2]||arguments[2],a=Math.max(i,2),l=uL(uz([r,n]),2),u=l[0],s=l[1];if(u===-1/0||s===1/0)return[r,n];if(u===s)return u$(u,i,o);var c=uU(new uw.default(s).sub(u).div(a-1),o,0),f=uC(uM(function(t){return new uw.default(u).add(new uw.default(t).mul(c)).toNumber()}),uA)(0,a).filter(function(t){return t>=u&&t<=s});return r>n?uT(f):f});var uH=u_(function(t,e){var r=uL(t,2),n=r[0],i=r[1],o=!(arguments.length>2)||void 0===arguments[2]||arguments[2],a=uL(uz([n,i]),2),l=a[0],u=a[1];if(l===-1/0||u===1/0)return[n,i];if(l===u)return[l];var s=Math.max(e,2),c=uU(new uw.default(u).sub(l).div(s-1),o,0),f=[].concat(uI(uN(new uw.default(l),new uw.default(u).sub(new uw.default(.99).mul(c)),c)),[u]);return n>i?uT(f):f}),uV=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function uW(t){return(uW="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function uq(){return(uq=Object.assign.bind()).apply(this,arguments)}function uX(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r=0)continue;r[n]=t[n]}return r}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}(t,uV),!1);"x"===this.props.direction&&"number"!==l.type&&F(!1);var c=o.map(function(t){var o,c,f=a(t,i),d=f.x,p=f.y,h=f.value,y=f.errorVal;if(!y)return null;var m=[];if(Array.isArray(y)){var v=function(t){if(Array.isArray(t))return t}(y)||function(t,e){var r=null==t?null:"u">typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,o,a,l=[],u=!0,s=!1;try{o=(r=r.call(t)).next,!1;for(;!(u=(n=o.call(r)).done)&&(l.push(n.value),2!==l.length);u=!0);}catch(t){s=!0,i=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw i}}return l}}(y,2)||function(t,e){if(t){if("string"==typeof t)return uX(t,2);var r=Object.prototype.toString.call(t).slice(8,-1);if("Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return uX(t,2)}}(y,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();o=v[0],c=v[1]}else o=c=y;if("vertical"===r){var g=l.scale,b=p+e,x=b+n,w=b-n,O=g(h-o),j=g(h+c);m.push({x1:j,y1:x,x2:j,y2:w}),m.push({x1:O,y1:b,x2:j,y2:b}),m.push({x1:O,y1:x,x2:O,y2:w})}else if("horizontal"===r){var S=u.scale,k=d+e,E=k-n,A=k+n,M=S(h-o),C=S(h+c);m.push({x1:E,y1:C,x2:A,y2:C}),m.push({x1:k,y1:M,x2:k,y2:C}),m.push({x1:E,y1:M,x2:A,y2:M})}return P.default.createElement(tR,uq({className:"recharts-errorBar",key:"bar-".concat(m.map(function(t){return"".concat(t.x1,"-").concat(t.x2,"-").concat(t.y1,"-").concat(t.y2)}))},s),m.map(function(t){return P.default.createElement("line",uq({},t,{key:"line-".concat(t.x1,"-").concat(t.x2,"-").concat(t.y1,"-").concat(t.y2)}))}))});return P.default.createElement(tR,{className:"recharts-errorBars"},c)}}],function(t,e){for(var r=0;rtypeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return u6(t,void 0);var r=Object.prototype.toString.call(t).slice(8,-1);if("Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return u6(t,void 0)}}(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u6(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=-1,a=null!=(e=null==r?void 0:r.length)?e:0;if(a<=1)return 0;if(i&&"angleAxis"===i.axisType&&1e-6>=Math.abs(Math.abs(i.range[1]-i.range[0])-360))for(var l=i.range,u=0;u0?n[u-1].coordinate:n[a-1].coordinate,c=n[u].coordinate,f=u>=a-1?n[0].coordinate:n[u+1].coordinate,d=void 0;if(G(c-s)!==G(f-c)){var p=[];if(G(f-c)===G(l[1]-l[0])){d=f;var h=c+l[1]-l[0];p[0]=Math.min(h,(h+s)/2),p[1]=Math.max(h,(h+s)/2)}else{d=s;var y=f+l[1]-l[0];p[0]=Math.min(c,(y+c)/2),p[1]=Math.max(c,(y+c)/2)}var m=[Math.min(c,(d+c)/2),Math.max(c,(d+c)/2)];if(t>m[0]&&t<=m[1]||t>=p[0]&&t<=p[1]){o=n[u].index;break}}else{var v=Math.min(s,f),g=Math.max(s,f);if(t>(v+c)/2&&t<=(g+c)/2){o=n[u].index;break}}}else for(var b=0;b0&&b(r[b].coordinate+r[b-1].coordinate)/2&&t<=(r[b].coordinate+r[b+1].coordinate)/2||b===a-1&&t>(r[b].coordinate+r[b-1].coordinate)/2){o=r[b].index;break}return o},sn=function(t){var e,r,n=t.type.displayName,i=null!=(e=t.type)&&e.defaultProps?u7(u7({},t.type.defaultProps),t.props):t.props,o=i.stroke,a=i.fill;switch(n){case"Line":r=o;break;case"Area":case"Radar":r=o&&"none"!==o?o:a;break;default:r=a}return r},si=function(t){var e=t.barSize,r=t.totalSize,n=t.stackGroups,i=void 0===n?{}:n;if(!i)return{};for(var o={},a=Object.keys(i),l=0,u=a.length;l=0});if(m&&m.length){var v=m[0].type.defaultProps,g=void 0!==v?u7(u7({},v),m[0].props):m[0].props,b=g.barSize,x=g[y];o[x]||(o[x]=[]);var w=(0,I.default)(b)?e:b;o[x].push({item:m[0],stackList:m.slice(1),barSize:(0,I.default)(w)?void 0:tt(w,r,0)})}}return o},so=function(t){var e,r=t.barGap,n=t.barCategoryGap,i=t.bandSize,o=t.sizeList,a=void 0===o?[]:o,l=t.maxBarSize,u=a.length;if(u<1)return null;var s=tt(r,i,0,!0),c=[];if(a[0].barSize===+a[0].barSize){var f=!1,d=i/u,p=a.reduce(function(t,e){return t+e.barSize||0},0);(p+=(u-1)*s)>=i&&(p-=(u-1)*s,s=0),p>=i&&d>0&&(f=!0,d*=.9,p=u*d);var h={offset:((i-p)/2|0)-s,size:0};e=a.reduce(function(t,e){var r={item:e.item,position:{offset:h.offset+h.size+s,size:f?d:e.barSize}},n=[].concat(u5(t),[r]);return h=n[n.length-1].position,e.stackList&&e.stackList.length&&e.stackList.forEach(function(t){n.push({item:t,position:h})}),n},c)}else{var y=tt(n,i,0,!0);i-2*y-(u-1)*s<=0&&(s=0);var m=(i-2*y-(u-1)*s)/u;m>1&&(m>>=0);var v=l===+l?Math.min(m,l):m;e=a.reduce(function(t,e,r){var n=[].concat(u5(t),[{item:e.item,position:{offset:y+(m+s)*r+(m-v)/2,size:v}}]);return e.stackList&&e.stackList.length&&e.stackList.forEach(function(t){n.push({item:t,position:n[n.length-1].position})}),n},c)}return e},sa=function(t,e,r,n){var i=r.children,o=r.width,a=r.margin,l=u3({children:i,legendWidth:o-(a.left||0)-(a.right||0)});if(l){var u=n||{},s=u.width,c=u.height,f=l.align,d=l.verticalAlign,p=l.layout;if(("vertical"===p||"horizontal"===p&&"middle"===d)&&"center"!==f&&K(t[f]))return u7(u7({},t),{},u9({},f,t[f]+(s||0)));if(("horizontal"===p||"vertical"===p&&"center"===f)&&"middle"!==d&&K(t[d]))return u7(u7({},t),{},u9({},d,t[d]+(c||0)))}return t},sl=function(t,e,r,n,i){var o=tj(e.props.children,uQ).filter(function(t){var e;return e=t.props.direction,!!(0,I.default)(i)||("horizontal"===n?"yAxis"===i:"vertical"===n||"x"===e?"xAxis"===i:"y"!==e||"yAxis"===i)});if(o&&o.length){var a=o.map(function(t){return t.props.dataKey});return t.reduce(function(t,e){var n=st(e,r);if((0,I.default)(n))return t;var i=Array.isArray(n)?[(0,ug.default)(n),(0,uv.default)(n)]:[n,n],o=a.reduce(function(t,r){var n=st(e,r,0),o=i[0]-Math.abs(Array.isArray(n)?n[0]:n),a=i[1]+Math.abs(Array.isArray(n)?n[1]:n);return[Math.min(o,t[0]),Math.max(a,t[1])]},[1/0,-1/0]);return[Math.min(o[0],t[0]),Math.max(o[1],t[1])]},[1/0,-1/0])}return null},su=function(t,e,r,n,i){var o=e.map(function(e){return sl(t,e,r,i,n)}).filter(function(t){return!(0,I.default)(t)});return o&&o.length?o.reduce(function(t,e){return[Math.min(t[0],e[0]),Math.max(t[1],e[1])]},[1/0,-1/0]):null},ss=function(t,e,r,n,i){var o=e.map(function(e){var o=e.props.dataKey;return"number"===r&&o&&sl(t,e,o,n)||se(t,o,r,i)});if("number"===r)return o.reduce(function(t,e){return[Math.min(t[0],e[0]),Math.max(t[1],e[1])]},[1/0,-1/0]);var a={};return o.reduce(function(t,e){for(var r=0,n=e.length;r=2?2*G(a[0]-a[1])*u:u,e&&(t.ticks||t.niceTicks))?(t.ticks||t.niceTicks).map(function(t){return{coordinate:n(i?i.indexOf(t):t)+u,value:t,offset:u}}).filter(function(t){return!(0,q.default)(t.coordinate)}):t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(t,e){return{coordinate:n(t)+u,value:t,index:e,offset:u}}):n.ticks&&!r?n.ticks(t.tickCount).map(function(t){return{coordinate:n(t)+u,value:t,offset:u}}):n.domain().map(function(t,e){return{coordinate:n(t)+u,value:i?i[t]:t,index:e,offset:u}})},sp=new WeakMap,sh=function(t,e){if("function"!=typeof e)return t;sp.has(t)||sp.set(t,new WeakMap);var r=sp.get(t);if(r.has(e))return r.get(e);var n=function(){t.apply(void 0,arguments),e.apply(void 0,arguments)};return r.set(e,n),n},sy=function(t,e,r){var n=t.scale,i=t.type,o=t.layout,a=t.axisType;if("auto"===n)return"radial"===o&&"radiusAxis"===a?{scale:uf.scaleBand(),realScaleType:"band"}:"radial"===o&&"angleAxis"===a?{scale:uf.scaleLinear(),realScaleType:"linear"}:"category"===i&&e&&(e.indexOf("LineChart")>=0||e.indexOf("AreaChart")>=0||e.indexOf("ComposedChart")>=0&&!r)?{scale:uf.scalePoint(),realScaleType:"point"}:"category"===i?{scale:uf.scaleBand(),realScaleType:"band"}:{scale:uf.scaleLinear(),realScaleType:"linear"};if((0,H.default)(n)){var l="scale".concat((0,ec.default)(n));return{scale:(uf[l]||uf.scalePoint)(),realScaleType:uf[l]?l:"point"}}return(0,L.default)(n)?{scale:n}:{scale:uf.scalePoint(),realScaleType:"point"}},sm=function(t){var e=t.domain();if(e&&!(e.length<=2)){var r=e.length,n=t.range(),i=Math.min(n[0],n[1])-1e-4,o=Math.max(n[0],n[1])+1e-4,a=t(e[0]),l=t(e[r-1]);(ao||lo)&&t.domain([e[0],e[r-1]])}},sv=function(t,e){if(!t)return null;for(var r=0,n=t.length;rn)&&(i[1]=n),i[0]>n&&(i[0]=n),i[1]=0?(t[a][r][0]=i,t[a][r][1]=i+l,i=t[a][r][1]):(t[a][r][0]=o,t[a][r][1]=o+l,o=t[a][r][1])}},expand:function(t,e){if((n=t.length)>0){for(var r,n,i,o=0,a=t[0].length;o0){for(var r,n=0,i=t[e[0]],o=i.length;n0&&(n=(r=t[e[0]]).length)>0){for(var r,n,i,o=0,a=1;a=0?(t[o][r][0]=i,t[o][r][1]=i+a,i=t[o][r][1]):(t[o][r][0]=0,t[o][r][1]=0)}}},sx=function(t,e,r){var n=e.map(function(t){return t.props.dataKey}),i=sb[r];return(function(){var t=ef([]),e=uh,r=up,n=uy;function i(i){var o,a,l=Array.from(t.apply(this,arguments),um),u=l.length,s=-1;for(let t of i)for(o=0,++s;o=0?0:i<0?i:n}return r[0]},sP=function(t,e){var r,n=(null!=(r=t.type)&&r.defaultProps?u7(u7({},t.type.defaultProps),t.props):t.props).stackId;if(Z(n)){var i=e[n];if(i){var o=i.items.indexOf(t);return o>=0?i.stackedData[o]:null}}return null},sE=function(t,e,r){return Object.keys(t).reduce(function(n,i){var o=t[i].stackedData.reduce(function(t,n){var i=n.slice(e,r+1).reduce(function(t,e){return[(0,ug.default)(e.concat([t[0]]).filter(K)),(0,uv.default)(e.concat([t[1]]).filter(K))]},[1/0,-1/0]);return[Math.min(t[0],i[0]),Math.max(t[1],i[1])]},[1/0,-1/0]);return[Math.min(o[0],n[0]),Math.max(o[1],n[1])]},[1/0,-1/0]).map(function(t){return t===1/0||t===-1/0?0:t})},sA=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,sM=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,sC=function(t,e,r){if((0,L.default)(t))return t(e,r);if(!Array.isArray(t))return e;var n=[];if(K(t[0]))n[0]=r?t[0]:Math.min(t[0],e[0]);else if(sA.test(t[0])){var i=+sA.exec(t[0])[1];n[0]=e[0]-i}else(0,L.default)(t[0])?n[0]=t[0](e[0]):n[0]=e[0];if(K(t[1]))n[1]=r?t[1]:Math.max(t[1],e[1]);else if(sM.test(t[1])){var o=+sM.exec(t[1])[1];n[1]=e[1]+o}else(0,L.default)(t[1])?n[1]=t[1](e[1]):n[1]=e[1];return n},sT=function(t,e,r){if(t&&t.scale&&t.scale.bandwidth){var n=t.scale.bandwidth();if(!r||n>0)return n}if(t&&e&&e.length>=2){for(var i=(0,z.default)(e,function(t){return t.coordinate}),o=1/0,a=1,l=i.length;a0&&e.handleDrag(t.changedTouches[0])}),sG(e,"handleDragEnd",function(){e.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var t=e.props,r=t.endIndex,n=t.onDragEnd,i=t.startIndex;null==n||n({endIndex:r,startIndex:i})}),e.detachDragEndListener()}),sG(e,"handleLeaveWrapper",function(){(e.state.isTravellerMoving||e.state.isSlideMoving)&&(e.leaveTimer=window.setTimeout(e.handleDragEnd,e.props.leaveTimeOut))}),sG(e,"handleEnterSlideOrTraveller",function(){e.setState({isTextActive:!0})}),sG(e,"handleLeaveSlideOrTraveller",function(){e.setState({isTextActive:!1})}),sG(e,"handleSlideDragStart",function(t){var r=sZ(t)?t.changedTouches[0]:t;e.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:r.pageX}),e.attachDragEndListener()}),e.travellerDragStartHandlers={startX:e.handleTravellerDragStart.bind(e,"startX"),endX:e.handleTravellerDragStart.bind(e,"endX")},e.state={},e}if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");return n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),t&&sX(n,t),e=[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(t){var e=t.startX,r=t.endX,i=this.state.scaleValues,o=this.props,a=o.gap,l=o.data.length-1,u=Math.min(e,r),s=Math.max(e,r),c=n.getIndexInRange(i,u),f=n.getIndexInRange(i,s);return{startIndex:c-c%a,endIndex:f===l?l:f-f%a}}},{key:"getTextOfTick",value:function(t){var e=this.props,r=e.data,n=e.tickFormatter,i=e.dataKey,o=st(r[t],i,t);return(0,L.default)(n)?n(o,t):o}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(t){var e=this.state,r=e.slideMoveStartX,n=e.startX,i=e.endX,o=this.props,a=o.x,l=o.width,u=o.travellerWidth,s=o.startIndex,c=o.endIndex,f=o.onChange,d=t.pageX-r;d>0?d=Math.min(d,a+l-u-i,a+l-u-n):d<0&&(d=Math.max(d,a-n,a-i));var p=this.getIndex({startX:n+d,endX:i+d});(p.startIndex!==s||p.endIndex!==c)&&f&&f(p),this.setState({startX:n+d,endX:i+d,slideMoveStartX:t.pageX})}},{key:"handleTravellerDragStart",value:function(t,e){var r=sZ(e)?e.changedTouches[0]:e;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:t,brushMoveStartX:r.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(t){var e=this.state,r=e.brushMoveStartX,n=e.movingTravellerId,i=e.endX,o=e.startX,a=this.state[n],l=this.props,u=l.x,s=l.width,c=l.travellerWidth,f=l.onChange,d=l.gap,p=l.data,h={startX:this.state.startX,endX:this.state.endX},y=t.pageX-r;y>0?y=Math.min(y,u+s-c-a):y<0&&(y=Math.max(y,u-a)),h[n]=a+y;var m=this.getIndex(h),v=m.startIndex,g=m.endIndex,b=function(){var t=p.length-1;return"startX"===n&&(i>o?v%d==0:g%d==0)||!!(io?g%d==0:v%d==0)||!!(i>o)&&g===t};this.setState(sG(sG({},n,a+y),"brushMoveStartX",t.pageX),function(){f&&b()&&f(m)})}},{key:"handleTravellerMoveKeyboard",value:function(t,e){var r=this,n=this.state,i=n.scaleValues,o=n.startX,a=n.endX,l=this.state[e],u=i.indexOf(l);if(-1!==u){var s=u+t;if(-1!==s&&!(s>=i.length)){var c=i[s];"startX"===e&&c>=a||"endX"===e&&c<=o||this.setState(sG({},e,c),function(){r.props.onChange(r.getIndex({startX:r.state.startX,endX:r.state.endX}))})}}}},{key:"renderBackground",value:function(){var t=this.props,e=t.x,r=t.y,n=t.width,i=t.height,o=t.fill,a=t.stroke;return P.default.createElement("rect",{stroke:a,fill:o,x:e,y:r,width:n,height:i})}},{key:"renderPanorama",value:function(){var t=this.props,e=t.x,r=t.y,n=t.width,i=t.height,o=t.data,a=t.children,l=t.padding,u=P.Children.only(a);return u?P.default.cloneElement(u,{x:e,y:r,width:n,height:i,margin:l,compact:!0,data:o}):null}},{key:"renderTravellerLayer",value:function(t,e){var r,i,o=this,a=this.props,l=a.y,u=a.travellerWidth,s=a.height,c=a.traveller,f=a.ariaLabel,d=a.data,p=a.startIndex,h=a.endIndex,y=Math.max(t,this.props.x),m=sH(sH({},tA(this.props,!1)),{},{x:y,y:l,width:u,height:s}),v=f||"Min value: ".concat(null==(r=d[p])?void 0:r.name,", Max value: ").concat(null==(i=d[h])?void 0:i.name);return P.default.createElement(tR,{tabIndex:0,role:"slider","aria-label":v,"aria-valuenow":t,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[e],onTouchStart:this.travellerDragStartHandlers[e],onKeyDown:function(t){["ArrowLeft","ArrowRight"].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),o.handleTravellerMoveKeyboard("ArrowRight"===t.key?1:-1,e))},onFocus:function(){o.setState({isTravellerFocused:!0})},onBlur:function(){o.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},n.renderTraveller(c,m))}},{key:"renderSlide",value:function(t,e){var r=this.props,n=r.y,i=r.height,o=r.stroke,a=r.travellerWidth,l=Math.min(t,e)+a,u=Math.max(Math.abs(e-t)-a,0);return P.default.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:o,fillOpacity:.2,x:l,y:n,width:u,height:i})}},{key:"renderText",value:function(){var t=this.props,e=t.startIndex,r=t.endIndex,n=t.y,i=t.height,o=t.travellerWidth,a=t.stroke,l=this.state,u=l.startX,s=l.endX,c={pointerEvents:"none",fill:a};return P.default.createElement(tR,{className:"recharts-brush-texts"},P.default.createElement(iM,s$({textAnchor:"end",verticalAnchor:"middle",x:Math.min(u,s)-5,y:n+i/2},c),this.getTextOfTick(e)),P.default.createElement(iM,s$({textAnchor:"start",verticalAnchor:"middle",x:Math.max(u,s)+o+5,y:n+i/2},c),this.getTextOfTick(r)))}},{key:"render",value:function(){var t=this.props,e=t.data,r=t.className,n=t.children,i=t.x,o=t.y,a=t.width,l=t.height,u=t.alwaysShowText,s=this.state,c=s.startX,f=s.endX,d=s.isTextActive,p=s.isSlideMoving,h=s.isTravellerMoving,y=s.isTravellerFocused;if(!e||!e.length||!K(i)||!K(o)||!K(a)||!K(l)||a<=0||l<=0)return null;var m=(0,$.default)("recharts-brush",r),v=1===P.default.Children.count(n),g=sz("userSelect","none");return P.default.createElement(tR,{className:m,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:g},this.renderBackground(),v&&this.renderPanorama(),this.renderSlide(c,f),this.renderTravellerLayer(c,"startX"),this.renderTravellerLayer(f,"endX"),(d||p||h||y||u)&&this.renderText())}}],r=[{key:"renderDefaultTraveller",value:function(t){var e=t.x,r=t.y,n=t.width,i=t.height,o=t.stroke,a=Math.floor(r+i/2)-1;return P.default.createElement(P.default.Fragment,null,P.default.createElement("rect",{x:e,y:r,width:n,height:i,fill:o,stroke:"none"}),P.default.createElement("line",{x1:e+1,y1:a,x2:e+n-1,y2:a,fill:"none",stroke:"#fff"}),P.default.createElement("line",{x1:e+1,y1:a+2,x2:e+n-1,y2:a+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(t,e){return P.default.isValidElement(t)?P.default.cloneElement(t,e):(0,L.default)(t)?t(e):n.renderDefaultTraveller(e)}},{key:"getDerivedStateFromProps",value:function(t,e){var r=t.data,n=t.width,i=t.x,o=t.travellerWidth,a=t.updateId,l=t.startIndex,u=t.endIndex;if(r!==e.prevData||a!==e.prevUpdateId)return sH({prevData:r,prevTravellerWidth:o,prevUpdateId:a,prevX:i,prevWidth:n},r&&r.length?sK({data:r,width:n,x:i,travellerWidth:o,startIndex:l,endIndex:u}):{scale:null,scaleValues:null});if(e.scale&&(n!==e.prevWidth||i!==e.prevX||o!==e.prevTravellerWidth)){e.scale.range([i,i+n-o]);var s=e.scale.domain().map(function(t){return e.scale(t)});return{prevData:r,prevTravellerWidth:o,prevUpdateId:a,prevX:i,prevWidth:n,startX:e.scale(t.startIndex),endX:e.scale(t.endIndex),scaleValues:s}}return null}},{key:"getIndexInRange",value:function(t,e){for(var r=t.length,n=0,i=r-1;i-n>1;){var o=Math.floor((n+i)/2);t[o]>e?i=o:n=o}return e>=t[i]?i:n}}],e&&sV(n.prototype,e),r&&sV(n,r),Object.defineProperty(n,"prototype",{writable:!1}),n}(P.PureComponent);function sQ(t){return(sQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s0(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function s1(t){for(var e=1;eo&&(l=2*Math.PI-l),{radius:a,angle:180*l/Math.PI,angleInRadian:l}},s6=function(t){var e=t.startAngle,r=t.endAngle,n=Math.min(Math.floor(e/360),Math.floor(r/360));return{startAngle:e-360*n,endAngle:r-360*n}},s8=function(t,e){var r,n=s5({x:t.x,y:t.y},e),i=n.radius,o=n.angle,a=e.innerRadius,l=e.outerRadius;if(il)return!1;if(0===i)return!0;var u=s6(e),s=u.startAngle,c=u.endAngle,f=o;if(s<=c){for(;f>c;)f-=360;for(;f=s&&f<=c}else{for(;f>s;)f-=360;for(;f=c&&f<=s}return r?s1(s1({},e),{},{radius:i,angle:f+360*Math.min(Math.floor(e.startAngle/360),Math.floor(e.endAngle/360))}):null};function s7(t){return(s7="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var s9=["offset"];function ct(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r=0?1:-1;"insideStart"===o?(n=p+g*l,i=y):"insideEnd"===o?(n=h-g*l,i=!y):"end"===o&&(n=h+g*l,i=y),i=v<=0?i:!i;var b=s3(s,c,m,n),x=s3(s,c,m,n+(i?1:-1)*359),w="M".concat(b.x,",").concat(b.y,"\n A").concat(m,",").concat(m,",0,1,").concat(+!i,",\n ").concat(x.x,",").concat(x.y),O=(0,I.default)(t.id)?Q("recharts-radial-line-"):t.id;return P.default.createElement("text",cn({},r,{dominantBaseline:"central",className:(0,$.default)("recharts-radial-bar-label",u)}),P.default.createElement("defs",null,P.default.createElement("path",{id:O,d:w})),P.default.createElement("textPath",{xlinkHref:"#".concat(O)},e))},ca=function(t){var e=t.viewBox,r=t.offset,n=t.position,i=e.cx,o=e.cy,a=e.innerRadius,l=e.outerRadius,u=(e.startAngle+e.endAngle)/2;if("outside"===n){var s=s3(i,o,l+r,u),c=s.x;return{x:c,y:s.y,textAnchor:c>=i?"start":"end",verticalAnchor:"middle"}}if("center"===n)return{x:i,y:o,textAnchor:"middle",verticalAnchor:"middle"};if("centerTop"===n)return{x:i,y:o,textAnchor:"middle",verticalAnchor:"start"};if("centerBottom"===n)return{x:i,y:o,textAnchor:"middle",verticalAnchor:"end"};var f=s3(i,o,(a+l)/2,u);return{x:f.x,y:f.y,textAnchor:"middle",verticalAnchor:"middle"}},cl=function(t){var e=t.viewBox,r=t.parentViewBox,n=t.offset,i=t.position,o=e.x,a=e.y,l=e.width,u=e.height,s=u>=0?1:-1,c=s*n,f=s>0?"end":"start",d=s>0?"start":"end",p=l>=0?1:-1,h=p*n,y=p>0?"end":"start",m=p>0?"start":"end";if("top"===i)return cr(cr({},{x:o+l/2,y:a-s*n,textAnchor:"middle",verticalAnchor:f}),r?{height:Math.max(a-r.y,0),width:l}:{});if("bottom"===i)return cr(cr({},{x:o+l/2,y:a+u+c,textAnchor:"middle",verticalAnchor:d}),r?{height:Math.max(r.y+r.height-(a+u),0),width:l}:{});if("left"===i){var v={x:o-h,y:a+u/2,textAnchor:y,verticalAnchor:"middle"};return cr(cr({},v),r?{width:Math.max(v.x-r.x,0),height:u}:{})}if("right"===i){var g={x:o+l+h,y:a+u/2,textAnchor:m,verticalAnchor:"middle"};return cr(cr({},g),r?{width:Math.max(r.x+r.width-g.x,0),height:u}:{})}var b=r?{width:l,height:u}:{};return"insideLeft"===i?cr({x:o+h,y:a+u/2,textAnchor:m,verticalAnchor:"middle"},b):"insideRight"===i?cr({x:o+l-h,y:a+u/2,textAnchor:y,verticalAnchor:"middle"},b):"insideTop"===i?cr({x:o+l/2,y:a+c,textAnchor:"middle",verticalAnchor:d},b):"insideBottom"===i?cr({x:o+l/2,y:a+u-c,textAnchor:"middle",verticalAnchor:f},b):"insideTopLeft"===i?cr({x:o+h,y:a+c,textAnchor:m,verticalAnchor:d},b):"insideTopRight"===i?cr({x:o+l-h,y:a+c,textAnchor:y,verticalAnchor:d},b):"insideBottomLeft"===i?cr({x:o+h,y:a+u-c,textAnchor:m,verticalAnchor:f},b):"insideBottomRight"===i?cr({x:o+l-h,y:a+u-c,textAnchor:y,verticalAnchor:f},b):(0,V.default)(i)&&(K(i.x)||Y(i.x))&&(K(i.y)||Y(i.y))?cr({x:o+tt(i.x,l),y:a+tt(i.y,u),textAnchor:"end",verticalAnchor:"end"},b):cr({x:o+l/2,y:a+u/2,textAnchor:"middle",verticalAnchor:"middle"},b)};function cu(t){var e,r=t.offset,n=cr({offset:void 0===r?5:r},function(t,e){if(null==t)return{};var r,n,i=function(t,e){if(null==t)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}(t,s9)),i=n.viewBox,o=n.position,a=n.value,l=n.children,u=n.content,s=n.className,c=n.textBreakAll;if(!i||(0,I.default)(a)&&(0,I.default)(l)&&!(0,P.isValidElement)(u)&&!(0,L.default)(u))return null;if((0,P.isValidElement)(u))return(0,P.cloneElement)(u,n);if((0,L.default)(u)){if(e=(0,P.createElement)(u,n),(0,P.isValidElement)(e))return e}else e=ci(n);var f="cx"in i&&K(i.cx),d=tA(n,!0);if(f&&("insideStart"===o||"insideEnd"===o||"end"===o))return co(n,e,d);var p=f?ca(n):cl(n);return P.default.createElement(iM,cn({className:(0,$.default)("recharts-label",void 0===s?"":s)},d,p,{breakAll:c}),e)}cu.displayName="Label";var cs=function(t){var e=t.cx,r=t.cy,n=t.angle,i=t.startAngle,o=t.endAngle,a=t.r,l=t.radius,u=t.innerRadius,s=t.outerRadius,c=t.x,f=t.y,d=t.top,p=t.left,h=t.width,y=t.height,m=t.clockWise,v=t.labelViewBox;if(v)return v;if(K(h)&&K(y)){if(K(c)&&K(f))return{x:c,y:f,width:h,height:y};if(K(d)&&K(p))return{x:d,y:p,width:h,height:y}}return K(c)&&K(f)?{x:c,y:f,width:0,height:0}:K(e)&&K(r)?{cx:e,cy:r,startAngle:i||n||0,endAngle:o||n||0,innerRadius:u||0,outerRadius:s||l||a||0,clockWise:m}:t.viewBox?t.viewBox:{}};cu.parseViewBox=cs,cu.renderCallByParent=function(t,e){var r,n,i=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(!t||!t.children&&i&&!t.label)return null;var o=t.children,a=cs(t),l=tj(o,cu).map(function(t,r){return(0,P.cloneElement)(t,{viewBox:e||a,key:"label-".concat(r)})});if(!i)return l;return[(r=t.label,n=e||a,!r?null:!0===r?P.default.createElement(cu,{key:"label-implicit",viewBox:n}):Z(r)?P.default.createElement(cu,{key:"label-implicit",viewBox:n,value:r}):(0,P.isValidElement)(r)?r.type===cu?(0,P.cloneElement)(r,{key:"label-implicit",viewBox:n}):P.default.createElement(cu,{key:"label-implicit",content:r,viewBox:n}):(0,L.default)(r)?P.default.createElement(cu,{key:"label-implicit",content:r,viewBox:n}):(0,V.default)(r)?P.default.createElement(cu,cn({viewBox:n},r,{key:"label-implicit"})):null)].concat(function(t){if(Array.isArray(t))return ct(t)}(l)||function(t){if("u">typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(l)||function(t,e){if(t){if("string"==typeof t)return ct(t,void 0);var r=Object.prototype.toString.call(t).slice(8,-1);if("Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ct(t,void 0)}}(l)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())};var cc=function(t,e){var r=t.alwaysShow,n=t.ifOverflow;return r&&(n="extendDomain"),n===e},cf=t.i(7226),cd=t.i(93840),cp=function(t){return null};cp.displayName="Cell";var ch=t.i(27232);function cy(t){return(cy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var cm=["valueAccessor"],cv=["data","dataKey","clockWise","id","textBreakAll"];function cg(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r=0)continue;r[n]=t[n]}return r}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}var cj=function(t){return Array.isArray(t.value)?(0,ch.default)(t.value):t.value};function cS(t){var e=t.valueAccessor,r=void 0===e?cj:e,n=cO(t,cm),i=n.data,o=n.dataKey,a=n.clockWise,l=n.id,u=n.textBreakAll,s=cO(n,cv);return i&&i.length?P.default.createElement(tR,{className:"recharts-label-list"},i.map(function(t,e){var n=(0,I.default)(o)?r(t,e):st(t&&t.payload,o),i=(0,I.default)(l)?{}:{id:"".concat(l,"-").concat(e)};return P.default.createElement(cu,cb({},tA(t,!0),s,i,{parentViewBox:t.parentViewBox,value:n,textBreakAll:u,viewBox:cu.parseViewBox((0,I.default)(a)?t:cw(cw({},t),{},{clockWise:a})),key:"label-".concat(e),index:e}))})):null}cS.displayName="LabelList",cS.renderCallByParent=function(t,e){var r,n=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(!t||!t.children&&n&&!t.label)return null;var i=tj(t.children,cS).map(function(t,r){return(0,P.cloneElement)(t,{data:e,key:"labelList-".concat(r)})});return n?[(r=t.label,!r?null:!0===r?P.default.createElement(cS,{key:"labelList-implicit",data:e}):P.default.isValidElement(r)||(0,L.default)(r)?P.default.createElement(cS,{key:"labelList-implicit",data:e,content:r}):(0,V.default)(r)?P.default.createElement(cS,cb({data:e},r,{key:"labelList-implicit"})):null)].concat(function(t){if(Array.isArray(t))return cg(t)}(i)||function(t){if("u">typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(i)||function(t,e){if(t){if("string"==typeof t)return cg(t,void 0);var r=Object.prototype.toString.call(t).slice(8,-1);if("Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return cg(t,void 0)}}(i)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()):i};var ck=t.i(13492),cP=t.i(75659);function cE(t){return(cE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function cA(){return(cA=Object.assign.bind()).apply(this,arguments)}function cM(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);rtypeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,o,a,l=[],u=!0,s=!1;try{o=(r=r.call(t)).next,!1;for(;!(u=(n=o.call(r)).done)&&(l.push(n.value),2!==l.length);u=!0);}catch(t){s=!0,i=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw i}}return l}}(e,2)||function(t,e){if(t){if("string"==typeof t)return cM(t,2);var r=Object.prototype.toString.call(t).slice(8,-1);if("Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return cM(t,2)}}(e,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),o=i[0],a=i[1];(0,P.useEffect)(function(){if(n.current&&n.current.getTotalLength)try{var t=n.current.getTotalLength();t&&a(t)}catch(t){}},[]);var l=r.x,u=r.y,s=r.upperWidth,c=r.lowerWidth,f=r.height,d=r.className,p=r.animationEasing,h=r.animationDuration,y=r.animationBegin,m=r.isUpdateAnimationActive;if(l!==+l||u!==+u||s!==+s||c!==+c||f!==+f||0===s&&0===c||0===f)return null;var v=(0,$.default)("recharts-trapezoid",d);return m?P.default.createElement(ns,{canBegin:o>0,from:{upperWidth:0,lowerWidth:0,height:f,x:l,y:u},to:{upperWidth:s,lowerWidth:c,height:f,x:l,y:u},duration:h,animationEasing:p,isActive:m},function(t){var e=t.upperWidth,i=t.lowerWidth,a=t.height,l=t.x,u=t.y;return P.default.createElement(ns,{canBegin:o>0,from:"0px ".concat(-1===o?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:h,easing:p},P.default.createElement("path",cA({},tA(r,!0),{className:v,d:c_(l,u,e,i,a),ref:n})))}):P.default.createElement("g",null,P.default.createElement("path",cA({},tA(r,!0),{className:v,d:c_(l,u,s,c,f)})))};function cI(t){return(cI="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function cL(){return(cL=Object.assign.bind()).apply(this,arguments)}function cB(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function cR(t){for(var e=1;e180),",").concat(+(o>u),",\n ").concat(c.x,",").concat(c.y,"\n ");if(n>0){var d=s3(e,r,n,o),p=s3(e,r,n,u);f+="L ".concat(p.x,",").concat(p.y,"\n A ").concat(n,",").concat(n,",0,\n ").concat(+(Math.abs(l)>180),",").concat(+(o<=u),",\n ").concat(d.x,",").concat(d.y," Z")}else f+="L ".concat(e,",").concat(r," Z");return f},c$=function(t){var e=t.cx,r=t.cy,n=t.innerRadius,i=t.outerRadius,o=t.cornerRadius,a=t.forceCornerRadius,l=t.cornerIsExternal,u=t.startAngle,s=t.endAngle,c=G(s-u),f=cz({cx:e,cy:r,radius:i,angle:u,sign:c,cornerRadius:o,cornerIsExternal:l}),d=f.circleTangency,p=f.lineTangency,h=f.theta,y=cz({cx:e,cy:r,radius:i,angle:s,sign:-c,cornerRadius:o,cornerIsExternal:l}),m=y.circleTangency,v=y.lineTangency,g=y.theta,b=l?Math.abs(u-s):Math.abs(u-s)-h-g;if(b<0)return a?"M ".concat(p.x,",").concat(p.y,"\n a").concat(o,",").concat(o,",0,0,1,").concat(2*o,",0\n a").concat(o,",").concat(o,",0,0,1,").concat(-(2*o),",0\n "):cU({cx:e,cy:r,innerRadius:n,outerRadius:i,startAngle:u,endAngle:s});var x="M ".concat(p.x,",").concat(p.y,"\n A").concat(o,",").concat(o,",0,0,").concat(+(c<0),",").concat(d.x,",").concat(d.y,"\n A").concat(i,",").concat(i,",0,").concat(+(b>180),",").concat(+(c<0),",").concat(m.x,",").concat(m.y,"\n A").concat(o,",").concat(o,",0,0,").concat(+(c<0),",").concat(v.x,",").concat(v.y,"\n ");if(n>0){var w=cz({cx:e,cy:r,radius:n,angle:u,sign:c,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),O=w.circleTangency,j=w.lineTangency,S=w.theta,k=cz({cx:e,cy:r,radius:n,angle:s,sign:-c,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),P=k.circleTangency,E=k.lineTangency,A=k.theta,M=l?Math.abs(u-s):Math.abs(u-s)-S-A;if(M<0&&0===o)return"".concat(x,"L").concat(e,",").concat(r,"Z");x+="L".concat(E.x,",").concat(E.y,"\n A").concat(o,",").concat(o,",0,0,").concat(+(c<0),",").concat(P.x,",").concat(P.y,"\n A").concat(n,",").concat(n,",0,").concat(+(M>180),",").concat(+(c>0),",").concat(O.x,",").concat(O.y,"\n A").concat(o,",").concat(o,",0,0,").concat(+(c<0),",").concat(j.x,",").concat(j.y,"Z")}else x+="L".concat(e,",").concat(r,"Z");return x},cF={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},cH=function(t){var e,r=cR(cR({},cF),t),n=r.cx,i=r.cy,o=r.innerRadius,a=r.outerRadius,l=r.cornerRadius,u=r.forceCornerRadius,s=r.cornerIsExternal,c=r.startAngle,f=r.endAngle,d=r.className;if(a0&&360>Math.abs(c-f)?c$({cx:n,cy:i,innerRadius:o,outerRadius:a,cornerRadius:Math.min(y,h/2),forceCornerRadius:u,cornerIsExternal:s,startAngle:c,endAngle:f}):cU({cx:n,cy:i,innerRadius:o,outerRadius:a,startAngle:c,endAngle:f}),P.default.createElement("path",cL({},tA(r,!0),{className:p,d:e,role:"img"}))},cV=["option","shapeType","propTransformer","activeClassName","isActive"];function cW(t){return(cW="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function cq(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function cX(t){for(var e=1;e=0)continue;r[n]=t[n]}return r}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}(t,cV);if((0,P.isValidElement)(r))e=(0,P.cloneElement)(r,cX(cX({},l),(0,P.isValidElement)(r)?r.props:r));else if((0,L.default)(r))e=r(l);else if((0,ck.default)(r)&&!(0,cP.default)(r)){var u=(void 0===i?function(t,e){return cX(cX({},e),t)}:i)(r,l);e=P.default.createElement(cG,{shapeType:n,elementProps:u})}else e=P.default.createElement(cG,{shapeType:n,elementProps:l});return a?P.default.createElement(tR,{className:void 0===o?"recharts-active-shape":o},e):e}function cK(t,e){return null!=e&&"trapezoids"in t.props}function cZ(t,e){return null!=e&&"sectors"in t.props}function cJ(t,e){return null!=e&&"points"in t.props}function cQ(t,e){var r,n,i=t.x===(null==e||null==(r=e.labelViewBox)?void 0:r.x)||t.x===e.x,o=t.y===(null==e||null==(n=e.labelViewBox)?void 0:n.y)||t.y===e.y;return i&&o}function c0(t,e){var r=t.endAngle===e.endAngle,n=t.startAngle===e.startAngle;return r&&n}function c1(t,e){var r=t.x===e.x,n=t.y===e.y,i=t.z===e.z;return r&&n&&i}var c2=["x","y"];function c3(t){return(c3="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function c4(){return(c4=Object.assign.bind()).apply(this,arguments)}function c5(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function c6(t){for(var e=1;e=0)continue;r[n]=t[n]}return r}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}(t,c2),o=parseInt("".concat(r),10),a=parseInt("".concat(n),10),l=parseInt("".concat(e.height||i.height),10),u=parseInt("".concat(e.width||i.width),10);return c6(c6(c6(c6(c6({},e),i),o?{x:o}:{}),a?{y:a}:{}),{},{height:l,width:u,name:e.name,radius:e.radius})}function c7(t){return P.default.createElement(cY,c4({shapeType:"rectangle",propTransformer:c8,activeClassName:"recharts-active-bar"},t))}var c9=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return function(r,n){if("number"==typeof t)return t;var i=K(r)||(0,I.default)(r);return i?t(r,n):(i||F(!1),e)}},ft=["value","background"];function fe(t){return(fe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function fr(){return(fr=Object.assign.bind()).apply(this,arguments)}function fn(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function fi(t){for(var e=1;e=0)continue;r[n]=t[n]}return r}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}(e,ft);if(!a)return null;var u=fi(fi(fi(fi(fi({},l),{},{fill:"#eee"},a),o),tp(t.props,e,r)),{},{onAnimationStart:t.handleAnimationStart,onAnimationEnd:t.handleAnimationEnd,dataKey:n,index:r,className:"recharts-bar-background-rectangle"});return P.default.createElement(c7,fr({key:"background-bar-".concat(r),option:t.props.background,isActive:r===i},u))})}},{key:"renderErrorBar",value:function(t,e){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var r=this.props,n=r.data,i=r.xAxis,o=r.yAxis,a=r.layout,l=tj(r.children,uQ);if(!l)return null;var u="vertical"===a?n[0].height/2:n[0].width/2,s=function(t,e){var r=Array.isArray(t.value)?t.value[1]:t.value;return{x:t.x,y:t.y,value:r,errorVal:st(t,e)}};return P.default.createElement(tR,{clipPath:t?"url(#clipPath-".concat(e,")"):null},l.map(function(t){return P.default.cloneElement(t,{key:"error-bar-".concat(e,"-").concat(t.props.dataKey),data:n,xAxis:i,yAxis:o,layout:a,offset:u,dataPointFormatter:s})}))}},{key:"render",value:function(){var t=this.props,e=t.hide,r=t.data,n=t.className,i=t.xAxis,o=t.yAxis,a=t.left,l=t.top,u=t.width,s=t.height,c=t.isAnimationActive,f=t.background,d=t.id;if(e||!r||!r.length)return null;var p=this.state.isAnimationFinished,h=(0,$.default)("recharts-bar",n),y=i&&i.allowDataOverflow,m=o&&o.allowDataOverflow,v=y||m,g=(0,I.default)(d)?this.id:d;return P.default.createElement(tR,{className:h},y||m?P.default.createElement("defs",null,P.default.createElement("clipPath",{id:"clipPath-".concat(g)},P.default.createElement("rect",{x:y?a:a-u/2,y:m?l:l-s/2,width:y?u:2*u,height:m?s:2*s}))):null,P.default.createElement(tR,{className:"recharts-bar-rectangles",clipPath:v?"url(#clipPath-".concat(g,")"):null},f?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(v,g),(!c||p)&&cS.renderCallByParent(this.props,r))}}],r=[{key:"getDerivedStateFromProps",value:function(t,e){return t.animationId!==e.prevAnimationId?{prevAnimationId:t.animationId,curData:t.data,prevData:e.curData}:t.data!==e.curData?{curData:t.data}:null}}],e&&fo(n.prototype,e),r&&fo(n,r),Object.defineProperty(n,"prototype",{writable:!1}),n}(P.PureComponent);function fd(t){return(fd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function fp(t,e){for(var r=0;r0&&Math.abs(g)0&&Math.abs(m)1&&void 0!==arguments[1]?arguments[1]:{},r=e.bandAware,n=e.position;if(void 0!==t){if(n)switch(n){case"start":default:return this.scale(t);case"middle":var i=this.bandwidth?this.bandwidth()/2:0;return this.scale(t)+i;case"end":var o=this.bandwidth?this.bandwidth():0;return this.scale(t)+o}if(r){var a=this.bandwidth?this.bandwidth()/2:0;return this.scale(t)+a}return this.scale(t)}}},{key:"isInRange",value:function(t){var e=this.range(),r=e[0],n=e[e.length-1];return r<=n?t>=r&&t<=n:t>=n&&t<=r}}],e=[{key:"create",value:function(t){return new r(t)}}],t&&fp(r.prototype,t),e&&fp(r,e),Object.defineProperty(r,"prototype",{writable:!1}),r}();fm(fb,"EPS",1e-4);var fx=function(t){var e=Object.keys(t).reduce(function(e,r){return fy(fy({},e),{},fm({},r,fb.create(t[r])))},{});return fy(fy({},e),{},{apply:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.bandAware,i=r.position;return(0,cf.default)(t,function(t,r){return e[r].apply(t,{bandAware:n,position:i})})},isInRange:function(t){return(0,cd.default)(t,function(t,r){return e[r].isInRange(t)})}})},fw=function(t){var e=t.width,r=t.height,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=(n%180+180)%180*Math.PI/180,o=Math.atan(r/e);return Math.abs(i>o&&it.length)&&(e=t.length);for(var r=0,n=Array(e);rtypeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,o,a,l=[],u=!0,s=!1;try{o=(r=r.call(t)).next,!1;for(;!(u=(n=o.call(r)).done)&&(l.push(n.value),2!==l.length);u=!0);}catch(t){s=!0,i=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw i}}return l}}(h,2)||function(t,e){if(t){if("string"==typeof t)return f3(t,2);var r=Object.prototype.toString.call(t).slice(8,-1);if("Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return f3(t,2)}}(h,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),m=y[0],v=m.x,g=m.y,b=y[1],x=b.x,w=b.y,O=f0(f0({clipPath:cc(t,"hidden")?"url(#".concat(c,")"):void 0},tA(t,!0)),{},{x1:v,y1:g,x2:x,y2:w});return P.default.createElement(tR,{className:(0,$.default)("recharts-reference-line",u)},f5(l,O),cu.renderCallByParent(t,fg({x:(e={x1:v,y1:g,x2:x,y2:w}).x1,y:e.y1},{x:e.x2,y:e.y2})))}var f7=function(t){var e;function r(){var t,e;if(!(this instanceof r))throw TypeError("Cannot call a class as a function");return t=r,e=arguments,t=fZ(t),function(t,e){if(e&&("object"===fY(e)||"function"==typeof e))return e;if(void 0!==e)throw TypeError("Derived constructors may only return object or undefined");var r=t;if(void 0===r)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(this,fK()?Reflect.construct(t,e||[],fZ(this).constructor):t.apply(this,e))}if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");return r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),t&&fJ(r,t),e=[{key:"render",value:function(){return P.default.createElement(f8,this.props)}}],function(t,e){for(var r=0;rtypeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return dd(t,void 0);var r=Object.prototype.toString.call(t).slice(8,-1);if("Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return dd(t,void 0)}}(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function dd(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r=f;--d)l.point(v[d],g[d]);l.lineEnd(),l.areaEnd()}m&&(v[c]=+t(p,c,s),g[c]=+e(p,c,s),l.point(n?+n(p,c,s):v[c],r?+r(p,c,s):g[c]))}if(h)return l=null,h+""||null}function c(){return dS().defined(i).curve(a).context(o)}return t="function"==typeof t?t:void 0===t?dO:ef(+t),e="function"==typeof e?e:void 0===e?ef(0):ef(+e),r="function"==typeof r?r:void 0===r?dj:ef(+r),s.x=function(e){return arguments.length?(t="function"==typeof e?e:ef(+e),n=null,s):t},s.x0=function(e){return arguments.length?(t="function"==typeof e?e:ef(+e),s):t},s.x1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:ef(+t),s):n},s.y=function(t){return arguments.length?(e="function"==typeof t?t:ef(+t),r=null,s):e},s.y0=function(t){return arguments.length?(e="function"==typeof t?t:ef(+t),s):e},s.y1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:ef(+t),s):r},s.lineX0=s.lineY0=function(){return c().x(t).y(e)},s.lineY1=function(){return c().x(t).y(r)},s.lineX1=function(){return c().x(n).y(e)},s.defined=function(t){return arguments.length?(i="function"==typeof t?t:ef(!!t),s):i},s.curve=function(t){return arguments.length?(a=t,null!=o&&(l=a(o)),s):a},s.context=function(t){return arguments.length?(null==t?o=l=null:l=a(o=t),s):o},s}function dP(){}function dE(t,e,r){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+r)/6)}function dA(t){this._context=t}function dM(t){this._context=t}function dC(t){this._context=t}dx.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t*=1,e*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}},dA.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:dE(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t*=1,e*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:dE(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},dM.prototype={areaStart:dP,areaEnd:dP,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t*=1,e*=1,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:dE(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},dC.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t*=1,e*=1,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+t)/6,n=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:dE(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};class dT{constructor(t,e){this._context=t,this._x=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(t,e){switch(t*=1,e*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,e,t,e):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+e)/2,t,this._y0,t,e)}this._x0=t,this._y0=e}}function d_(t){this._context=t}d_.prototype={areaStart:dP,areaEnd:dP,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t*=1,e*=1,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function dN(t,e,r){var n=t._x1-t._x0,i=e-t._x1,o=(t._y1-t._y0)/(n||i<0&&-0),a=(r-t._y1)/(i||n<0&&-0);return((o<0?-1:1)+(a<0?-1:1))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs((o*i+a*n)/(n+i)))||0}function dD(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function dI(t,e,r){var n=t._x0,i=t._y0,o=t._x1,a=t._y1,l=(o-n)/3;t._context.bezierCurveTo(n+l,i+l*e,o-l,a-l*r,o,a)}function dL(t){this._context=t}function dB(t){this._context=new dR(t)}function dR(t){this._context=t}function dz(t){this._context=t}function dU(t){var e,r,n=t.length-1,i=Array(n),o=Array(n),a=Array(n);for(i[0]=0,o[0]=2,a[0]=t[0]+2*t[1],e=1;e=0;--e)i[e]=(a[e]-i[e+1])/o[e];for(e=0,o[n-1]=(t[n]+i[n-1])/2;e=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t*=1,e*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var r=this._x*(1-this._t)+t*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,e)}}this._x=t,this._y=e}};var dq={curveBasisClosed:function(t){return new dM(t)},curveBasisOpen:function(t){return new dC(t)},curveBasis:function(t){return new dA(t)},curveBumpX:function(t){return new dT(t,!0)},curveBumpY:function(t){return new dT(t,!1)},curveLinearClosed:function(t){return new d_(t)},curveLinear:dw,curveMonotoneX:function(t){return new dL(t)},curveMonotoneY:function(t){return new dB(t)},curveNatural:function(t){return new dz(t)},curveStep:function(t){return new d$(t,.5)},curveStepAfter:function(t){return new d$(t,1)},curveStepBefore:function(t){return new d$(t,0)}},dX=function(t){return t.x===+t.x&&t.y===+t.y},dG=function(t){return t.x},dY=function(t){return t.y},dK=function(t,e){if((0,L.default)(t))return t;var r="curve".concat((0,ec.default)(t));return("curveMonotone"===r||"curveBump"===r)&&e?dq["".concat(r).concat("vertical"===e?"Y":"X")]:dq[r]||dw},dZ=function(t){var e,r=t.type,n=t.points,i=void 0===n?[]:n,o=t.baseLine,a=t.layout,l=t.connectNulls,u=void 0!==l&&l,s=dK(void 0===r?"linear":r,a),c=u?i.filter(function(t){return dX(t)}):i;if(Array.isArray(o)){var f=u?o.filter(function(t){return dX(t)}):o,d=c.map(function(t,e){return dW(dW({},t),{},{base:f[e]})});return(e="vertical"===a?dk().y(dY).x1(dG).x0(function(t){return t.base.x}):dk().x(dG).y1(dY).y0(function(t){return t.base.y})).defined(dX).curve(s),e(d)}return(e="vertical"===a&&K(o)?dk().y(dY).x1(dG).x0(o):K(o)?dk().x(dG).y1(dY).y0(o):dS().x(dG).y(dY)).defined(dX).curve(s),e(c)},dJ=function(t){var e=t.className,r=t.points,n=t.path,i=t.pathRef;if((!r||!r.length)&&!n)return null;var o=r&&r.length?dZ(t):n;return P.createElement("path",dH({},tA(t,!1),td(t),{className:(0,$.default)("recharts-curve",e),d:o,ref:i}))};function dQ(t){return(dQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var d0=["x","y","top","left","width","height","className"];function d1(){return(d1=Object.assign.bind()).apply(this,arguments)}function d2(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}var d3=function(t){var e=t.x,r=void 0===e?0:e,n=t.y,i=void 0===n?0:n,o=t.top,a=void 0===o?0:o,l=t.left,u=void 0===l?0:l,s=t.width,c=void 0===s?0:s,f=t.height,d=void 0===f?0:f,p=t.className,h=function(t){for(var e=1;e=0)continue;r[n]=t[n]}return r}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}(t,d0));return K(r)&&K(i)&&K(c)&&K(d)&&K(a)&&K(u)?P.default.createElement("path",d1({},tA(h,!0),{className:(0,$.default)("recharts-cross",p),d:"M".concat(r,",").concat(a,"v").concat(d,"M").concat(u,",").concat(i,"h").concat(c)})):null};function d4(t){var e=t.cx,r=t.cy,n=t.radius,i=t.startAngle,o=t.endAngle;return{points:[s3(e,r,n,i),s3(e,r,n,o)],cx:e,cy:r,radius:n,startAngle:i,endAngle:o}}function d5(t){return(d5="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function d6(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function d8(t){for(var e=1;etypeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,o,a,l=[],u=!0,s=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(l.push(n.value),l.length!==e);u=!0);}catch(t){s=!0,i=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw i}}return l}}(t,e)||ps(t,e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function pi(t,e){if(null==t)return{};var r,n,i=function(t,e){if(null==t)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}function po(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(po=function(){return!!t})()}function pa(t){return(pa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function pl(t,e){return(pl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function pu(t){return function(t){if(Array.isArray(t))return pc(t)}(t)||function(t){if("u">typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||ps(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ps(t,e){if(t){if("string"==typeof t)return pc(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if("Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return pc(t,e)}}function pc(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r0?o:t&&t.length&&K(n)&&K(i)?t.slice(n,i+1):[]};function pw(t){return"number"===t?[0,"auto"]:void 0}var pO=function(t,e,r,n){var i=t.graphicalItems,o=t.tooltipAxis,a=px(e,t);return r<0||!i||!i.length||r>=a.length?null:i.reduce(function(i,l){var u,s,c=null!=(u=l.props.data)?u:e;return(c&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(c=c.slice(t.dataStartIndex,t.dataEndIndex+1)),s=o.dataKey&&!o.allowDuplicatedCategory?ti(void 0===c?a:c,o.dataKey,n):c&&c[r]||a[r])?[].concat(pu(i),[sN(l,s)]):i},[])},pj=function(t,e,r,n){var i=n||{x:t.chartX,y:t.chartY},o="horizontal"===r?i.x:"vertical"===r?i.y:"centric"===r?i.angle:i.radius,a=t.orderedTooltipTicks,l=t.tooltipAxis,u=t.tooltipTicks,s=sr(o,a,u,l);if(s>=0&&u){var c=u[s]&&u[s].value,f=pO(t,e,s,c),d=pb(r,a,s,i);return{activeTooltipIndex:s,activeLabel:c,activePayload:f,activeCoordinate:d}}return null},pS=function(t,e){var r=e.axes,n=e.graphicalItems,i=e.axisType,o=e.axisIdKey,a=e.stackGroups,l=e.dataStartIndex,u=e.dataEndIndex,s=t.layout,c=t.children,f=t.stackOffset,d=sc(s,i);return r.reduce(function(e,r){var p=void 0!==r.type.defaultProps?pd(pd({},r.type.defaultProps),r.props):r.props,h=p.type,y=p.dataKey,m=p.allowDataOverflow,v=p.allowDuplicatedCategory,g=p.scale,b=p.ticks,x=p.includeHidden,w=p[o];if(e[w])return e;var O=px(t.data,{graphicalItems:n.filter(function(t){var e;return(o in t.props?t.props[o]:null==(e=t.type.defaultProps)?void 0:e[o])===w}),dataStartIndex:l,dataEndIndex:u}),j=O.length;(function(t,e,r){if("number"===r&&!0===e&&Array.isArray(t)){var n=null==t?void 0:t[0],i=null==t?void 0:t[1];if(n&&i&&K(n)&&K(i))return!0}return!1})(p.domain,m,h)&&(P=sC(p.domain,null,m),d&&("number"===h||"auto"!==g)&&(A=se(O,y,"category")));var S=pw(h);if(!P||0===P.length){var k,P,E,A,M,C=null!=(M=p.domain)?M:S;if(y){if(P=se(O,y,h),"category"===h&&d){var T=tr(P);v&&T?(E=P,P=(0,B.default)(0,j)):v||(P=s_(C,P,r).reduce(function(t,e){return t.indexOf(e)>=0?t:[].concat(pu(t),[e])},[]))}else if("category"===h)P=v?P.filter(function(t){return""!==t&&!(0,I.default)(t)}):s_(C,P,r).reduce(function(t,e){return t.indexOf(e)>=0||""===e||(0,I.default)(e)?t:[].concat(pu(t),[e])},[]);else if("number"===h){var _=su(O,n.filter(function(t){var e,r,n=o in t.props?t.props[o]:null==(e=t.type.defaultProps)?void 0:e[o],i="hide"in t.props?t.props.hide:null==(r=t.type.defaultProps)?void 0:r.hide;return n===w&&(x||!i)}),y,i,s);_&&(P=_)}d&&("number"===h||"auto"!==g)&&(A=se(O,y,"category"))}else P=d?(0,B.default)(0,j):a&&a[w]&&a[w].hasStack&&"number"===h?"expand"===f?[0,1]:sE(a[w].stackGroups,l,u):ss(O,n.filter(function(t){var e=o in t.props?t.props[o]:t.type.defaultProps[o],r="hide"in t.props?t.props.hide:t.type.defaultProps.hide;return e===w&&(x||!r)}),h,s,!0);"number"===h?(P=dp(c,P,w,i,b),C&&(P=sC(C,P,m))):"category"===h&&C&&P.every(function(t){return C.indexOf(t)>=0})&&(P=C)}return pd(pd({},e),{},pp({},w,pd(pd({},p),{},{axisType:i,domain:P,categoricalDomain:A,duplicateDomain:E,originalDomain:null!=(k=p.domain)?k:S,isCategorical:d,layout:s})))},{})},pk=function(t,e){var r=e.graphicalItems,n=e.Axis,i=e.axisType,o=e.axisIdKey,a=e.stackGroups,l=e.dataStartIndex,u=e.dataEndIndex,s=t.layout,c=t.children,f=px(t.data,{graphicalItems:r,dataStartIndex:l,dataEndIndex:u}),d=f.length,p=sc(s,i),h=-1;return r.reduce(function(t,e){var y,m=(void 0!==e.type.defaultProps?pd(pd({},e.type.defaultProps),e.props):e.props)[o],v=pw("number");return t[m]?t:(h++,y=p?(0,B.default)(0,d):a&&a[m]&&a[m].hasStack?dp(c,y=sE(a[m].stackGroups,l,u),m,i):dp(c,y=sC(v,ss(f,r.filter(function(t){var e,r,n=o in t.props?t.props[o]:null==(e=t.type.defaultProps)?void 0:e[o],i="hide"in t.props?t.props.hide:null==(r=t.type.defaultProps)?void 0:r.hide;return n===m&&!i}),"number",s),n.defaultProps.allowDataOverflow),m,i),pd(pd({},t),{},pp({},m,pd(pd({axisType:i},n.defaultProps),{},{hide:!0,orientation:(0,R.default)(py,"".concat(i,".").concat(h%2),null),domain:y,originalDomain:v,isCategorical:p,layout:s}))))},{})},pP=function(t,e){var r=e.axisType,n=void 0===r?"xAxis":r,i=e.AxisComp,o=e.graphicalItems,a=e.stackGroups,l=e.dataStartIndex,u=e.dataEndIndex,s=t.children,c="".concat(n,"Id"),f=tj(s,i),d={};return f&&f.length?d=pS(t,{axes:f,graphicalItems:o,axisType:n,axisIdKey:c,stackGroups:a,dataStartIndex:l,dataEndIndex:u}):o&&o.length&&(d=pk(t,{Axis:i,graphicalItems:o,axisType:n,axisIdKey:c,stackGroups:a,dataStartIndex:l,dataEndIndex:u})),d},pE=function(t){var e=te(t),r=sd(e,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:(0,z.default)(r,function(t){return t.coordinate}),tooltipAxis:e,tooltipAxisBandSize:sT(e,r)}},pA=function(t){var e=t.children,r=t.defaultShowTooltip,n=tS(e,sJ),i=0,o=0;return t.data&&0!==t.data.length&&(o=t.data.length-1),n&&n.props&&(n.props.startIndex>=0&&(i=n.props.startIndex),n.props.endIndex>=0&&(o=n.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:i,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!r}},pM=function(t){return"horizontal"===t?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:"vertical"===t?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:"centric"===t?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},pC=function(t,e){var r=t.props,n=t.graphicalItems,i=t.xAxisMap,o=void 0===i?{}:i,a=t.yAxisMap,l=void 0===a?{}:a,u=r.width,s=r.height,c=r.children,f=r.margin||{},d=tS(c,sJ),p=tS(c,e7),h=Object.keys(l).reduce(function(t,e){var r=l[e],n=r.orientation;return r.mirror||r.hide?t:pd(pd({},t),{},pp({},n,t[n]+r.width))},{left:f.left||0,right:f.right||0}),y=Object.keys(o).reduce(function(t,e){var r=o[e],n=r.orientation;return r.mirror||r.hide?t:pd(pd({},t),{},pp({},n,(0,R.default)(t,"".concat(n))+r.height))},{top:f.top||0,bottom:f.bottom||0}),m=pd(pd({},y),h),v=m.bottom;d&&(m.bottom+=d.props.height||sJ.defaultProps.height),p&&e&&(m=sa(m,n,r,e));var g=u-m.left-m.right,b=s-m.top-m.bottom;return pd(pd({brushBottom:v},m),{},{width:Math.max(g,0),height:Math.max(b,0)})},pT=["layout","type","stroke","connectNulls","isRange","ref"],p_=["key"];function pN(t){return(pN="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function pD(t,e){if(null==t)return{};var r,n,i=function(t,e){if(null==t)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}function pI(){return(pI=Object.assign.bind()).apply(this,arguments)}function pL(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function pB(t){for(var e=1;e0||!(0,ux.default)(l,n)||!(0,ux.default)(u,i))?this.renderAreaWithAnimation(t,e):this.renderAreaStatically(n,i,t,e)}},{key:"render",value:function(){var t,e=this.props,r=e.hide,n=e.dot,i=e.points,o=e.className,a=e.top,l=e.left,u=e.xAxis,s=e.yAxis,c=e.width,f=e.height,d=e.isAnimationActive,p=e.id;if(r||!i||!i.length)return null;var h=this.state.isAnimationFinished,y=1===i.length,m=(0,$.default)("recharts-area",o),v=u&&u.allowDataOverflow,g=s&&s.allowDataOverflow,b=v||g,x=(0,I.default)(p)?this.id:p,w=null!=(t=tA(n,!1))?t:{r:3,strokeWidth:2},O=w.r,j=w.strokeWidth,S=(n&&"object"===tv(n)&&"clipDot"in n?n:{}).clipDot,k=void 0===S||S,E=2*(void 0===O?3:O)+(void 0===j?2:j);return P.default.createElement(tR,{className:m},v||g?P.default.createElement("defs",null,P.default.createElement("clipPath",{id:"clipPath-".concat(x)},P.default.createElement("rect",{x:v?l:l-c/2,y:g?a:a-f/2,width:v?c:2*c,height:g?f:2*f})),!k&&P.default.createElement("clipPath",{id:"clipPath-dots-".concat(x)},P.default.createElement("rect",{x:l-E/2,y:a-E/2,width:c+E,height:f+E}))):null,y?null:this.renderArea(b,x),(n||y)&&this.renderDots(b,k,x),(!d||h)&&cS.renderCallByParent(this.props,i))}}],r=[{key:"getDerivedStateFromProps",value:function(t,e){return t.animationId!==e.prevAnimationId?{prevAnimationId:t.animationId,curPoints:t.points,curBaseLine:t.baseLine,prevPoints:e.curPoints,prevBaseLine:e.curBaseLine}:t.points!==e.curPoints||t.baseLine!==e.curBaseLine?{curPoints:t.points,curBaseLine:t.baseLine}:null}}],e&&pR(n.prototype,e),r&&pR(n,r),Object.defineProperty(n,"prototype",{writable:!1}),n}(P.PureComponent);function pW(t,e,r){if(e<1)return[];if(1===e&&void 0===r)return t;for(var n=[],i=0;it*i)return!1;var o=r();return t*(e-t*o/2-n)>=0&&t*(e+t*o/2-i)<=0}function pX(t){return(pX="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function pG(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function pY(t){for(var e=1;e=2?G(s[1].coordinate-s[0].coordinate):1,w=(n="width"===v,i=c.x,o=c.y,a=c.width,l=c.height,1===x?{start:n?i:o,end:n?i+a:o+l}:{start:n?i+a:o+l,end:n?i:o});return"equidistantPreserveStart"===p?function(t,e,r,n,i){for(var o,a=(n||[]).slice(),l=e.start,u=e.end,s=0,c=1,f=l;c<=a.length;)if(o=function(){var e,o=null==n?void 0:n[s];if(void 0===o)return{v:pW(n,c)};var a=s,d=function(){return void 0===e&&(e=r(o,a)),e},p=o.coordinate,h=0===s||pq(t,p,d,f,u);h||(s=0,f=l,c+=1),h&&(f=p+t*(d()/2+i),s+=c)}())return o.v;return[]}(x,w,b,s,f):("preserveStart"===p||"preserveStartEnd"===p?function(t,e,r,n,i,o){var a=(n||[]).slice(),l=a.length,u=e.start,s=e.end;if(o){var c=n[l-1],f=r(c,l-1),d=t*(c.coordinate+t*f/2-s);a[l-1]=c=pY(pY({},c),{},{tickCoord:d>0?c.coordinate-d*t:c.coordinate}),pq(t,c.tickCoord,function(){return f},u,s)&&(s=c.tickCoord-t*(f/2+i),a[l-1]=pY(pY({},c),{},{isShow:!0}))}for(var p=o?l-1:l,h=function(e){var n,o=a[e],l=function(){return void 0===n&&(n=r(o,e)),n};if(0===e){var c=t*(o.coordinate-t*l()/2-u);a[e]=o=pY(pY({},o),{},{tickCoord:c<0?o.coordinate-c*t:o.coordinate})}else a[e]=o=pY(pY({},o),{},{tickCoord:o.coordinate});pq(t,o.tickCoord,l,u,s)&&(u=o.tickCoord+t*(l()/2+i),a[e]=pY(pY({},o),{},{isShow:!0}))},y=0;y0?s.coordinate-f*t:s.coordinate})}else o[e]=s=pY(pY({},s),{},{tickCoord:s.coordinate});pq(t,s.tickCoord,c,l,u)&&(u=s.tickCoord-t*(c()/2+i),o[e]=pY(pY({},s),{},{isShow:!0}))},c=a-1;c>=0;c--)s(c);return o}(x,w,b,s,f)).filter(function(t){return t.isShow})}pF(pV,"displayName","Area"),pF(pV,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!t6.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"}),pF(pV,"getBaseValue",function(t,e,r,n){var i=t.layout,o=t.baseValue,a=e.props.baseValue,l=null!=a?a:o;if(K(l)&&"number"==typeof l)return l;var u="horizontal"===i?n:r,s=u.scale.domain();if("number"===u.type){var c=Math.max(s[0],s[1]),f=Math.min(s[0],s[1]);return"dataMin"===l?f:"dataMax"===l||c<0?c:Math.max(Math.min(s[0],s[1]),0)}return"dataMin"===l?s[0]:"dataMax"===l?s[1]:s[0]}),pF(pV,"getComposedData",function(t){var e,r=t.props,n=t.item,i=t.xAxis,o=t.yAxis,a=t.xAxisTicks,l=t.yAxisTicks,u=t.bandSize,s=t.dataKey,c=t.stackedData,f=t.dataStartIndex,d=t.displayedData,p=t.offset,h=r.layout,y=c&&c.length,m=pV.getBaseValue(r,n,i,o),v="horizontal"===h,g=!1,b=d.map(function(t,e){y?r=c[f+e]:Array.isArray(r=st(t,s))?g=!0:r=[m,r];var r,n=null==r[1]||y&&null==st(t,s);return v?{x:sj({axis:i,ticks:a,bandSize:u,entry:t,index:e}),y:n?null:o.scale(r[1]),value:r,payload:t}:{x:n?null:i.scale(r[1]),y:sj({axis:o,ticks:l,bandSize:u,entry:t,index:e}),value:r,payload:t}});return e=y||g?b.map(function(t){var e=Array.isArray(t.value)?t.value[0]:null;return v?{x:t.x,y:null!=e&&null!=t.y?o.scale(e):null}:{x:null!=e?i.scale(e):null,y:t.y}}):v?o.scale(m):i.scale(m),pB({points:b,baseLine:e,layout:h,isRange:g},p)}),pF(pV,"renderDotItem",function(t,e){var r;if(P.default.isValidElement(t))r=P.default.cloneElement(t,e);else if((0,L.default)(t))r=t(e);else{var n=(0,$.default)("recharts-area-dot","boolean"!=typeof t?t.className:""),i=e.key,o=pD(e,p_);r=P.default.createElement(rt,pI({},o,{key:i,className:n}))}return r});var pZ=["viewBox"],pJ=["viewBox"],pQ=["ticks"];function p0(t){return(p0="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function p1(){return(p1=Object.assign.bind()).apply(this,arguments)}function p2(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function p3(t){for(var e=1;e=0)continue;r[n]=t[n]}return r}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}function p5(t,e){for(var r=0;r0?this.props:s)),n<=0||i<=0||!c||!c.length)?null:P.default.createElement(tR,{className:(0,$.default)("recharts-cartesian-axis",a),ref:function(e){t.layerReference=e}},r&&this.renderAxisLine(),this.renderTicks(c,this.state.fontSize,this.state.letterSpacing),cu.renderCallByParent(this.props))}}],r=[{key:"renderTickItem",value:function(t,e,r){var n=(0,$.default)(e.className,"recharts-cartesian-axis-tick-value");return P.default.isValidElement(t)?P.default.cloneElement(t,p3(p3({},e),{},{className:n})):(0,L.default)(t)?t(p3(p3({},e),{},{className:n})):P.default.createElement(iM,p1({},e,{className:"recharts-cartesian-axis-tick-value"}),r)}}],e&&p5(n.prototype,e),r&&p5(n,r),Object.defineProperty(n,"prototype",{writable:!1}),n}(P.Component);function hr(t){return(hr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}p9(he,"displayName","CartesianAxis"),p9(he,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});function hn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(hn=function(){return!!t})()}function hi(t){return(hi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function ho(t,e){return(ho=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function ha(t,e,r){return(e=hl(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function hl(t){var e=function(t,e){if("object"!=hr(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=hr(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==hr(e)?e:e+""}function hu(){return(hu=Object.assign.bind()).apply(this,arguments)}function hs(t){var e=t.xAxisId,r=fX(),n=fG(),i=fV(e);return null==i?null:P.createElement(he,hu({},i,{className:(0,$.default)("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:r,height:n},ticksGenerator:function(t){return sd(t,!0)}}))}var hc=function(t){var e;function r(){var t,e;if(!(this instanceof r))throw TypeError("Cannot call a class as a function");return t=r,e=arguments,t=hi(t),function(t,e){if(e&&("object"===hr(e)||"function"==typeof e))return e;if(void 0!==e)throw TypeError("Derived constructors may only return object or undefined");var r=t;if(void 0===r)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(this,hn()?Reflect.construct(t,e||[],hi(this).constructor):t.apply(this,e))}if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");return r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),t&&ho(r,t),e=[{key:"render",value:function(){return P.createElement(hs,this.props)}}],function(t,e){for(var r=0;r0&&(S=Math.min((t||0)-(k[e-1]||0),S))}),Number.isFinite(S)){var P=S/j,E="vertical"===y.layout?r.height:r.width;if("gap"===y.padding&&(u=P*E/2),"no-gap"===y.padding){var A=tt(t.barCategoryGap,P*E),M=P*E/2;u=M-A-(M-A)/E*A}}}s="xAxis"===n?[r.left+(b.left||0)+(u||0),r.left+r.width-(b.right||0)-(u||0)]:"yAxis"===n?"horizontal"===l?[r.top+r.height-(b.bottom||0),r.top+(b.top||0)]:[r.top+(b.top||0)+(u||0),r.top+r.height-(b.bottom||0)-(u||0)]:y.range,w&&(s=[s[1],s[0]]);var C=sy(y,i,f),T=C.scale,_=C.realScaleType;T.domain(v).range(s),sm(T);var N=sO(T,fy(fy({},y),{},{realScaleType:_}));"xAxis"===n?(h="top"===m&&!x||"bottom"===m&&x,d=r.left,p=c[O]-h*y.height):"yAxis"===n&&(h="left"===m&&!x||"right"===m&&x,d=c[O]-h*y.width,p=r.top);var D=fy(fy(fy({},y),N),{},{realScaleType:_,x:d,y:p,scale:T,width:"xAxis"===n?r.width:y.width,height:"yAxis"===n?r.height:y.height});return D.bandSize=sT(D,N),y.hide||"xAxis"!==n?y.hide||(c[O]+=(h?-1:1)*D.width):c[O]+=(h?-1:1)*D.height,fy(fy({},o),{},fm({},a,D))},{})}}).chartName,o=n.GraphicalChild,l=void 0===(a=n.defaultTooltipEventType)?"axis":a,s=void 0===(u=n.validateTooltipEventTypes)?["axis"]:u,c=n.axisComponents,f=n.legendContent,d=n.formatAxisMap,p=n.defaultProps,h=function(t,e){var r=e.graphicalItems,n=e.stackGroups,i=e.offset,o=e.updateId,a=e.dataStartIndex,l=e.dataEndIndex,u=t.barSize,s=t.layout,f=t.barGap,d=t.barCategoryGap,p=t.maxBarSize,h=pM(s),y=h.numericAxisName,m=h.cateAxisName,v=!!r&&!!r.length&&r.some(function(t){var e=tb(t&&t.type);return e&&e.indexOf("Bar")>=0}),g=[];return r.forEach(function(r,h){var b=px(t.data,{graphicalItems:[r],dataStartIndex:a,dataEndIndex:l}),x=void 0!==r.type.defaultProps?pd(pd({},r.type.defaultProps),r.props):r.props,w=x.dataKey,O=x.maxBarSize,j=x["".concat(y,"Id")],S=x["".concat(m,"Id")],k=c.reduce(function(t,r){var n=e["".concat(r.axisType,"Map")],i=x["".concat(r.axisType,"Id")];n&&n[i]||"zAxis"===r.axisType||F(!1);var o=n[i];return pd(pd({},t),{},pp(pp({},r.axisType,o),"".concat(r.axisType,"Ticks"),sd(o)))},{}),P=k[m],E=k["".concat(m,"Ticks")],A=n&&n[j]&&n[j].hasStack&&sP(r,n[j].stackGroups),M=tb(r.type).indexOf("Bar")>=0,C=sT(P,E),T=[],_=v&&si({barSize:u,stackGroups:n,totalSize:"xAxis"===m?k[m].width:"yAxis"===m?k[m].height:void 0});if(M){var N,D,L=(0,I.default)(O)?p:O,B=null!=(N=null!=(D=sT(P,E,!0))?D:L)?N:0;T=so({barGap:f,barCategoryGap:d,bandSize:B!==C?B:C,sizeList:_[S],maxBarSize:L}),B!==C&&(T=T.map(function(t){return pd(pd({},t),{},{position:pd(pd({},t.position),{},{offset:t.position.offset-B/2})})}))}var R=r&&r.type&&r.type.getComposedData;R&&g.push({props:pd(pd({},R(pd(pd({},k),{},{displayedData:b,props:t,dataKey:w,item:r,bandSize:C,barPosition:T,offset:i,stackedData:A,layout:s,dataStartIndex:a,dataEndIndex:l}))),{},pp(pp(pp({key:r.key||"item-".concat(h)},y,k[y]),m,k[m]),"animationId",o)),childIndex:tO(t.children).indexOf(r),item:r})}),g},y=function(t,e){var r=t.props,n=t.dataStartIndex,a=t.dataEndIndex,l=t.updateId;if(!tk({props:r}))return null;var u=r.children,s=r.layout,f=r.stackOffset,p=r.data,y=r.reverseStackOrder,m=pM(s),v=m.numericAxisName,g=m.cateAxisName,b=tj(u,o),x=sw(p,b,"".concat(v,"Id"),"".concat(g,"Id"),f,y),w=c.reduce(function(t,e){var i="".concat(e.axisType,"Map");return pd(pd({},t),{},pp({},i,pP(r,pd(pd({},e),{},{graphicalItems:b,stackGroups:e.axisType===v&&x,dataStartIndex:n,dataEndIndex:a}))))},{}),O=pC(pd(pd({},w),{},{props:r,graphicalItems:b}),null==e?void 0:e.legendBBox);Object.keys(w).forEach(function(t){w[t]=d(r,w[t],O,t.replace("Map",""),i)});var j=pE(w["".concat(g,"Map")]),S=h(r,pd(pd({},w),{},{dataStartIndex:n,dataEndIndex:a,updateId:l,graphicalItems:b,stackGroups:x,offset:O}));return pd(pd({formattedGraphicalItems:S,graphicalItems:b,offset:O,stackGroups:x},j),w)},m=function(t){var e;function r(t){var e,n,o,a,l;if(!(this instanceof r))throw TypeError("Cannot call a class as a function");return a=r,l=[t],a=pa(a),pp(o=function(t,e){if(e&&("object"===pe(e)||"function"==typeof e))return e;if(void 0!==e)throw TypeError("Derived constructors may only return object or undefined");var r=t;if(void 0===r)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(this,po()?Reflect.construct(a,l||[],pa(this).constructor):a.apply(this,l)),"eventEmitterSymbol",Symbol("rechartsEventEmitter")),pp(o,"accessibilityManager",new db),pp(o,"handleLegendBBoxUpdate",function(t){if(t){var e=o.state,r=e.dataStartIndex,n=e.dataEndIndex,i=e.updateId;o.setState(pd({legendBBox:t},y({props:o.props,dataStartIndex:r,dataEndIndex:n,updateId:i},pd(pd({},o.state),{},{legendBBox:t}))))}}),pp(o,"handleReceiveSyncEvent",function(t,e,r){o.props.syncId===t&&(r!==o.eventEmitterSymbol||"function"==typeof o.props.syncMethod)&&o.applySyncEvent(e)}),pp(o,"handleBrushChange",function(t){var e=t.startIndex,r=t.endIndex;if(e!==o.state.dataStartIndex||r!==o.state.dataEndIndex){var n=o.state.updateId;o.setState(function(){return pd({dataStartIndex:e,dataEndIndex:r},y({props:o.props,dataStartIndex:e,dataEndIndex:r,updateId:n},o.state))}),o.triggerSyncEvent({dataStartIndex:e,dataEndIndex:r})}}),pp(o,"handleMouseEnter",function(t){var e=o.getMouseInfo(t);if(e){var r=pd(pd({},e),{},{isTooltipActive:!0});o.setState(r),o.triggerSyncEvent(r);var n=o.props.onMouseEnter;(0,L.default)(n)&&n(r,t)}}),pp(o,"triggeredAfterMouseMove",function(t){var e=o.getMouseInfo(t),r=e?pd(pd({},e),{},{isTooltipActive:!0}):{isTooltipActive:!1};o.setState(r),o.triggerSyncEvent(r);var n=o.props.onMouseMove;(0,L.default)(n)&&n(r,t)}),pp(o,"handleItemMouseEnter",function(t){o.setState(function(){return{isTooltipActive:!0,activeItem:t,activePayload:t.tooltipPayload,activeCoordinate:t.tooltipPosition||{x:t.cx,y:t.cy}}})}),pp(o,"handleItemMouseLeave",function(){o.setState(function(){return{isTooltipActive:!1}})}),pp(o,"handleMouseMove",function(t){t.persist(),o.throttleTriggeredAfterMouseMove(t)}),pp(o,"handleMouseLeave",function(t){o.throttleTriggeredAfterMouseMove.cancel();var e={isTooltipActive:!1};o.setState(e),o.triggerSyncEvent(e);var r=o.props.onMouseLeave;(0,L.default)(r)&&r(e,t)}),pp(o,"handleOuterEvent",function(t){var e,r=t_(t),n=(0,R.default)(o.props,"".concat(r));r&&(0,L.default)(n)&&n(null!=(e=/.*touch.*/i.test(r)?o.getMouseInfo(t.changedTouches[0]):o.getMouseInfo(t))?e:{},t)}),pp(o,"handleClick",function(t){var e=o.getMouseInfo(t);if(e){var r=pd(pd({},e),{},{isTooltipActive:!0});o.setState(r),o.triggerSyncEvent(r);var n=o.props.onClick;(0,L.default)(n)&&n(r,t)}}),pp(o,"handleMouseDown",function(t){var e=o.props.onMouseDown;(0,L.default)(e)&&e(o.getMouseInfo(t),t)}),pp(o,"handleMouseUp",function(t){var e=o.props.onMouseUp;(0,L.default)(e)&&e(o.getMouseInfo(t),t)}),pp(o,"handleTouchMove",function(t){null!=t.changedTouches&&t.changedTouches.length>0&&o.throttleTriggeredAfterMouseMove(t.changedTouches[0])}),pp(o,"handleTouchStart",function(t){null!=t.changedTouches&&t.changedTouches.length>0&&o.handleMouseDown(t.changedTouches[0])}),pp(o,"handleTouchEnd",function(t){null!=t.changedTouches&&t.changedTouches.length>0&&o.handleMouseUp(t.changedTouches[0])}),pp(o,"handleDoubleClick",function(t){var e=o.props.onDoubleClick;(0,L.default)(e)&&e(o.getMouseInfo(t),t)}),pp(o,"handleContextMenu",function(t){var e=o.props.onContextMenu;(0,L.default)(e)&&e(o.getMouseInfo(t),t)}),pp(o,"triggerSyncEvent",function(t){void 0!==o.props.syncId&&dh.emit(dy,o.props.syncId,t,o.eventEmitterSymbol)}),pp(o,"applySyncEvent",function(t){var e=o.props,r=e.layout,n=e.syncMethod,i=o.state.updateId,a=t.dataStartIndex,l=t.dataEndIndex;if(void 0!==t.dataStartIndex||void 0!==t.dataEndIndex)o.setState(pd({dataStartIndex:a,dataEndIndex:l},y({props:o.props,dataStartIndex:a,dataEndIndex:l,updateId:i},o.state)));else if(void 0!==t.activeTooltipIndex){var u=t.chartX,s=t.chartY,c=t.activeTooltipIndex,f=o.state,d=f.offset,p=f.tooltipTicks;if(!d)return;if("function"==typeof n)c=n(p,t);else if("value"===n){c=-1;for(var h=0;h=0){if(u.dataKey&&!u.allowDuplicatedCategory){var S="function"==typeof u.dataKey?function(t){return"function"==typeof u.dataKey?u.dataKey(t.payload):null}:"payload.".concat(u.dataKey.toString());E=ti(p,S,c),A=h&&y&&ti(y,S,c)}else E=null==p?void 0:p[s],A=h&&y&&y[s];if(x||b){var k=void 0!==t.props.activeIndex?t.props.activeIndex:s;return[(0,P.cloneElement)(t,pd(pd(pd({},n.props),O),{},{activeIndex:k})),null,null]}if(!(0,I.default)(E))return[j].concat(pu(o.renderActivePoints({item:n,activePoint:E,basePoint:A,childIndex:s,isRange:h})))}else{var E,A,M,C=(null!=(M=o.getItemByXY(o.state.activeCoordinate))?M:{graphicalItem:j}).graphicalItem,T=C.item,_=void 0===T?t:T,N=C.childIndex,D=pd(pd(pd({},n.props),O),{},{activeIndex:N});return[(0,P.cloneElement)(_,D),null,null]}return h?[j,null,null]:[j,null]}),pp(o,"renderCustomized",function(t,e,r){return(0,P.cloneElement)(t,pd(pd({key:"recharts-customized-".concat(r)},o.props),o.state))}),pp(o,"renderMap",{CartesianGrid:{handler:pg,once:!0},ReferenceArea:{handler:o.renderReferenceElement},ReferenceLine:{handler:pg},ReferenceDot:{handler:o.renderReferenceElement},XAxis:{handler:pg},YAxis:{handler:pg},Brush:{handler:o.renderBrush,once:!0},Bar:{handler:o.renderGraphicChild},Line:{handler:o.renderGraphicChild},Area:{handler:o.renderGraphicChild},Radar:{handler:o.renderGraphicChild},RadialBar:{handler:o.renderGraphicChild},Scatter:{handler:o.renderGraphicChild},Pie:{handler:o.renderGraphicChild},Funnel:{handler:o.renderGraphicChild},Tooltip:{handler:o.renderCursor,once:!0},PolarGrid:{handler:o.renderPolarGrid,once:!0},PolarAngleAxis:{handler:o.renderPolarAxis},PolarRadiusAxis:{handler:o.renderPolarAxis},Customized:{handler:o.renderCustomized}}),o.clipPathId="".concat(null!=(e=t.id)?e:Q("recharts"),"-clip"),o.throttleTriggeredAfterMouseMove=(0,U.default)(o.triggeredAfterMouseMove,null!=(n=t.throttleDelay)?n:1e3/60),o.state={},o}if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");return r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),t&&pl(r,t),e=[{key:"componentDidMount",value:function(){var t,e;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:null!=(t=this.props.margin.left)?t:0,top:null!=(e=this.props.margin.top)?e:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var t=this.props,e=t.children,r=t.data,n=t.height,i=t.layout,o=tS(e,eu);if(o){var a=o.props.defaultIndex;if("number"==typeof a&&!(a<0)&&!(a>this.state.tooltipTicks.length-1)){var l=this.state.tooltipTicks[a]&&this.state.tooltipTicks[a].value,u=pO(this.state,r,a,l),s=this.state.tooltipTicks[a].coordinate,c=(this.state.offset.top+n)/2,f="horizontal"===i?{x:s,y:c}:{y:s,x:c},d=this.state.formattedGraphicalItems.find(function(t){return"Scatter"===t.item.type.name});d&&(f=pd(pd({},f),d.props.points[a].tooltipPosition),u=d.props.points[a].tooltipPayload);var p={activeTooltipIndex:a,isTooltipActive:!0,activeLabel:l,activePayload:u,activeCoordinate:f};this.setState(p),this.renderCursor(o),this.accessibilityManager.setIndex(a)}}}},{key:"getSnapshotBeforeUpdate",value:function(t,e){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==e.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==t.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==t.margin){var r,n;this.accessibilityManager.setDetails({offset:{left:null!=(r=this.props.margin.left)?r:0,top:null!=(n=this.props.margin.top)?n:0}})}return null}},{key:"componentDidUpdate",value:function(t){tM([tS(t.children,eu)],[tS(this.props.children,eu)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var t=tS(this.props.children,eu);if(t&&"boolean"==typeof t.props.shared){var e=t.props.shared?"axis":"item";return s.indexOf(e)>=0?e:l}return l}},{key:"getMouseInfo",value:function(t){if(!this.container)return null;var e=this.container,r=e.getBoundingClientRect(),n={top:r.top+window.scrollY-document.documentElement.clientTop,left:r.left+window.scrollX-document.documentElement.clientLeft},i={chartX:Math.round(t.pageX-n.left),chartY:Math.round(t.pageY-n.top)},o=r.width/e.offsetWidth||1,a=this.inRange(i.chartX,i.chartY,o);if(!a)return null;var l=this.state,u=l.xAxisMap,s=l.yAxisMap,c=this.getTooltipEventType(),f=pj(this.state,this.props.data,this.props.layout,a);if("axis"!==c&&u&&s){var d=te(u).scale,p=te(s).scale,h=d&&d.invert?d.invert(i.chartX):null,y=p&&p.invert?p.invert(i.chartY):null;return pd(pd({},i),{},{xValue:h,yValue:y},f)}return f?pd(pd({},i),f):null}},{key:"inRange",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=this.props.layout,i=t/r,o=e/r;if("horizontal"===n||"vertical"===n){var a=this.state.offset;return i>=a.left&&i<=a.left+a.width&&o>=a.top&&o<=a.top+a.height?{x:i,y:o}:null}var l=this.state,u=l.angleAxisMap,s=l.radiusAxisMap;return u&&s?s8({x:i,y:o},te(u)):null}},{key:"parseEventsOfWrapper",value:function(){var t=this.props.children,e=this.getTooltipEventType(),r=tS(t,eu),n={};return r&&"axis"===e&&(n="click"===r.props.trigger?{onClick:this.handleClick}:{onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu}),pd(pd({},td(this.props,this.handleOuterEvent)),n)}},{key:"addListener",value:function(){dh.on(dy,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){dh.removeListener(dy,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(t,e,r){for(var n=this.state.formattedGraphicalItems,i=0,o=n.length;i=0)continue;r[n]=t[n]}return r}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}var hA=function(t){var e=t.fill;if(!e||"none"===e)return null;var r=t.fillOpacity,n=t.x,i=t.y,o=t.width,a=t.height,l=t.ry;return P.default.createElement("rect",{x:n,y:i,ry:l,width:o,height:a,stroke:"none",fill:e,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function hM(t,e){var r;if(P.default.isValidElement(t))r=P.default.cloneElement(t,e);else if((0,L.default)(t))r=t(e);else{var n=e.x1,i=e.y1,o=e.x2,a=e.y2,l=e.key,u=tA(hE(e,hw),!1),s=(u.offset,hE(u,hO));r=P.default.createElement("line",hP({},s,{x1:n,y1:i,x2:o,y2:a,fill:"none",key:l}))}return r}function hC(t){var e=t.x,r=t.width,n=t.horizontal,i=void 0===n||n,o=t.horizontalPoints;if(!i||!o||!o.length)return null;var a=o.map(function(n,o){return hM(i,hk(hk({},t),{},{x1:e,y1:n,x2:e+r,y2:n,key:"line-".concat(o),index:o}))});return P.default.createElement("g",{className:"recharts-cartesian-grid-horizontal"},a)}function hT(t){var e=t.y,r=t.height,n=t.vertical,i=void 0===n||n,o=t.verticalPoints;if(!i||!o||!o.length)return null;var a=o.map(function(n,o){return hM(i,hk(hk({},t),{},{x1:n,y1:e,x2:n,y2:e+r,key:"line-".concat(o),index:o}))});return P.default.createElement("g",{className:"recharts-cartesian-grid-vertical"},a)}function h_(t){var e=t.horizontalFill,r=t.fillOpacity,n=t.x,i=t.y,o=t.width,a=t.height,l=t.horizontalPoints,u=t.horizontal;if(!(void 0===u||u)||!e||!e.length)return null;var s=l.map(function(t){return Math.round(t+i-i)}).sort(function(t,e){return t-e});i!==s[0]&&s.unshift(0);var c=s.map(function(t,l){var u=s[l+1]?s[l+1]-t:i+a-t;if(u<=0)return null;var c=l%e.length;return P.default.createElement("rect",{key:"react-".concat(l),y:t,x:n,height:u,width:o,stroke:"none",fill:e[c],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return P.default.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},c)}function hN(t){var e=t.vertical,r=t.verticalFill,n=t.fillOpacity,i=t.x,o=t.y,a=t.width,l=t.height,u=t.verticalPoints;if(!(void 0===e||e)||!r||!r.length)return null;var s=u.map(function(t){return Math.round(t+i-i)}).sort(function(t,e){return t-e});i!==s[0]&&s.unshift(0);var c=s.map(function(t,e){var u=s[e+1]?s[e+1]-t:i+a-t;if(u<=0)return null;var c=e%r.length;return P.default.createElement("rect",{key:"react-".concat(e),x:t,y:o,width:u,height:l,stroke:"none",fill:r[c],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return P.default.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},c)}var hD=function(t,e){var r=t.xAxis,n=t.width,i=t.height,o=t.offset;return sf(pK(hk(hk(hk({},he.defaultProps),r),{},{ticks:sd(r,!0),viewBox:{x:0,y:0,width:n,height:i}})),o.left,o.left+o.width,e)},hI=function(t,e){var r=t.yAxis,n=t.width,i=t.height,o=t.offset;return sf(pK(hk(hk(hk({},he.defaultProps),r),{},{ticks:sd(r,!0),viewBox:{x:0,y:0,width:n,height:i}})),o.top,o.top+o.height,e)},hL=[],hB=[];function hR(t){var e,r,n,i,o,a,l=fX(),u=fG(),s=(0,P.useContext)(fz),c=hk(hk({},t),{},{stroke:null!=(e=t.stroke)?e:"#ccc",fill:null!=(r=t.fill)?r:"none",horizontal:null==(n=t.horizontal)||n,horizontalFill:null!=(i=t.horizontalFill)?i:hB,vertical:null==(o=t.vertical)||o,verticalFill:null!=(a=t.verticalFill)?a:hL,x:K(t.x)?t.x:s.left,y:K(t.y)?t.y:s.top,width:K(t.width)?t.width:s.width,height:K(t.height)?t.height:s.height}),f=c.x,d=c.y,p=c.width,h=c.height,y=c.syncWithTicks,m=c.horizontalValues,v=c.verticalValues,g=te((0,P.useContext)(fL)),b=fW();if(!K(p)||p<=0||!K(h)||h<=0||!K(f)||f!==+f||!K(d)||d!==+d)return null;var x=c.verticalCoordinatesGenerator||hD,w=c.horizontalCoordinatesGenerator||hI,O=c.horizontalPoints,j=c.verticalPoints;if((!O||!O.length)&&(0,L.default)(w)){var S=m&&m.length,k=w({yAxis:b?hk(hk({},b),{},{ticks:S?m:b.ticks}):void 0,width:l,height:u,offset:s},!!S||y);es(Array.isArray(k),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(hj(k),"]")),Array.isArray(k)&&(O=k)}if((!j||!j.length)&&(0,L.default)(x)){var E=v&&v.length,A=x({xAxis:g?hk(hk({},g),{},{ticks:E?v:g.ticks}):void 0,width:l,height:u,offset:s},!!E||y);es(Array.isArray(A),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(hj(A),"]")),Array.isArray(A)&&(j=A)}return P.default.createElement("g",{className:"recharts-cartesian-grid"},P.default.createElement(hA,{fill:c.fill,fillOpacity:c.fillOpacity,x:c.x,y:c.y,width:c.width,height:c.height,ry:c.ry}),P.default.createElement(hC,hP({},c,{offset:s,horizontalPoints:O,xAxis:g,yAxis:b})),P.default.createElement(hT,hP({},c,{offset:s,verticalPoints:j,xAxis:g,yAxis:b})),P.default.createElement(h_,hP({},c,{horizontalPoints:O})),P.default.createElement(hN,hP({},c,{verticalPoints:j})))}function hz(t){return(hz="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function hU(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function h$(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=Array(e);rtypeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,o,a,l=[],u=!0,s=!1;try{o=(r=r.call(t)).next,!1;for(;!(u=(n=o.call(r)).done)&&(l.push(n.value),2!==l.length);u=!0);}catch(t){s=!0,i=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw i}}return l}}(r,2)||function(t,e){if(t){if("string"==typeof t)return hF(t,2);var r=Object.prototype.toString.call(t).slice(8,-1);if("Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return hF(t,2)}}(r,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),S=j[0],k=j[1],E=(0,P.useCallback)(function(t,e){k(function(r){var n=Math.round(t),i=Math.round(e);return r.containerWidth===n&&r.containerHeight===i?r:{containerWidth:n,containerHeight:i}})},[]);(0,P.useEffect)(function(){var t=function(t){var e,r=t[0].contentRect,n=r.width,i=r.height;E(n,i),null==(e=O.current)||e.call(O,n,i)};m>0&&(t=(0,U.default)(t,m,{trailing:!0,leading:!1}));var e=new ResizeObserver(t),r=w.current.getBoundingClientRect();return E(r.width,r.height),e.observe(w.current),function(){e.disconnect()}},[E,m]);var A=(0,P.useMemo)(function(){var t=S.containerWidth,e=S.containerHeight;if(t<0||e<0)return null;es(Y(l)||Y(s),"The width(%s) and height(%s) are both fixed numbers,\n maybe you don't need to use a ResponsiveContainer.",l,s),es(!n||n>0,"The aspect(%s) must be greater than zero.",n);var r=Y(l)?t:l,i=Y(s)?e:s;n&&n>0&&(r?i=r/n:i&&(r=i*n),p&&i>p&&(i=p)),es(r>0||i>0,"The width(%s) and height(%s) of chart should be greater than 0,\n please check the style of container, or the props width(%s) and height(%s),\n or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the\n height and width.",r,i,l,s,f,d,n);var o=!Array.isArray(h)&&tb(h.type).endsWith("Chart");return P.default.Children.map(h,function(t){return P.default.isValidElement(t)?(0,P.cloneElement)(t,h$({width:r,height:i},o?{style:h$({height:"100%",width:"100%",maxHeight:i,maxWidth:r},t.props.style)}:{})):t})},[n,h,s,p,d,f,S,l]);return P.default.createElement("div",{id:v?"".concat(v):void 0,className:(0,$.default)("recharts-responsive-container",g),style:h$(h$({},void 0===x?{}:x),{},{width:l,height:s,minWidth:f,minHeight:d,maxHeight:p}),ref:w},A)});function hV({messages:t,llmCalls:e,loading:r}){let{t:n}=(0,E.useTranslation)(),i=(0,P.useMemo)(()=>{let r,n;if(!t.length&&!e.length)return[];let i=[...t.map(t=>t.timestamp.getTime()),...e.map(t=>t.timestamp.getTime())];if(0===i.length)return[];let o=Math.min(...i),a=Math.max(...i),l=a-o;l<=36e5?(r=3e5,n=t=>t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})):l<=216e5?(r=9e5,n=t=>t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})):l<=864e5?(r=36e5,n=t=>t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})):l<=6048e5?(r=144e5,n=t=>`${t.toLocaleDateString([],{month:"short",day:"numeric"})} ${t.toLocaleTimeString([],{hour:"2-digit"})}`):(r=864e5,n=t=>t.toLocaleDateString([],{month:"short",day:"numeric"}));let u=new Map,s=Math.floor(o/r)*r,c=Math.ceil(a/r)*r;for(let t=s;t<=c;t+=r)u.set(t,{time:n(new Date(t)),timestamp:t,messages:0,llmCalls:0});return t.forEach(t=>{let e=Math.floor(t.timestamp.getTime()/r)*r,n=u.get(e);n&&n.messages++}),e.forEach(t=>{let e=Math.floor(t.timestamp.getTime()/r)*r,n=u.get(e);n&&n.llmCalls++}),Array.from(u.values()).sort((t,e)=>t.timestamp-e.timestamp)},[t,e]);return r?(0,k.jsxs)("div",{className:"bg-white dark:bg-[#2a2a2e] rounded-xl border border-gray-200 dark:border-gray-700 shadow-sm p-6",children:[(0,k.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,k.jsx)("div",{className:"h-5 w-32 bg-gray-200 dark:bg-gray-700 animate-pulse rounded"}),(0,k.jsxs)("div",{className:"flex gap-4",children:[(0,k.jsx)("div",{className:"h-4 w-24 bg-gray-200 dark:bg-gray-700 animate-pulse rounded"}),(0,k.jsx)("div",{className:"h-4 w-24 bg-gray-200 dark:bg-gray-700 animate-pulse rounded"})]})]}),(0,k.jsx)("div",{className:"h-[300px] flex items-center justify-center",children:(0,k.jsx)("div",{className:"animate-pulse w-full h-full bg-gray-100 dark:bg-gray-800 rounded"})})]}):0===i.length?(0,k.jsxs)("div",{className:"bg-white dark:bg-[#2a2a2e] rounded-xl border border-gray-200 dark:border-gray-700 shadow-sm p-6",children:[(0,k.jsx)("h3",{className:"text-base font-semibold text-gray-800 dark:text-gray-200 mb-4",children:n("monitoring.trafficChart.title")}),(0,k.jsxs)("div",{className:"h-[300px] flex flex-col items-center justify-center text-gray-400 dark:text-gray-500",children:[(0,k.jsx)("svg",{className:"w-16 h-16 mb-4 text-gray-300 dark:text-gray-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,k.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})}),(0,k.jsx)("p",{className:"text-sm font-medium",children:n("monitoring.trafficChart.noData")})]})]}):(0,k.jsxs)("div",{className:"bg-white dark:bg-[#2a2a2e] rounded-xl border border-gray-200 dark:border-gray-700 shadow-sm p-6 hover:shadow-md transition-shadow duration-300",children:[(0,k.jsx)("h3",{className:"text-base font-semibold text-gray-800 dark:text-gray-200 mb-6",children:n("monitoring.trafficChart.title")}),(0,k.jsx)("div",{className:"h-[300px]",children:(0,k.jsx)(hH,{width:"100%",height:"100%",children:(0,k.jsxs)(hx,{data:i,margin:{top:10,right:20,left:0,bottom:0},children:[(0,k.jsxs)("defs",{children:[(0,k.jsxs)("linearGradient",{id:"colorMessages",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,k.jsx)("stop",{offset:"5%",stopColor:"#3b82f6",stopOpacity:.4}),(0,k.jsx)("stop",{offset:"95%",stopColor:"#3b82f6",stopOpacity:.05})]}),(0,k.jsxs)("linearGradient",{id:"colorLLMCalls",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,k.jsx)("stop",{offset:"5%",stopColor:"#8b5cf6",stopOpacity:.4}),(0,k.jsx)("stop",{offset:"95%",stopColor:"#8b5cf6",stopOpacity:.05})]})]}),(0,k.jsx)(hR,{strokeDasharray:"3 3",stroke:"#e5e7eb",className:"dark:stroke-gray-700",vertical:!1}),(0,k.jsx)(hc,{dataKey:"time",tick:{fontSize:12,fill:"#9ca3af"},tickLine:!1,axisLine:{stroke:"#e5e7eb"},dy:10}),(0,k.jsx)(hb,{tick:{fontSize:12,fill:"#9ca3af"},tickLine:!1,axisLine:{stroke:"#e5e7eb"},width:40,allowDecimals:!1}),(0,k.jsx)(eu,{contentStyle:{backgroundColor:"rgba(255, 255, 255, 0.98)",border:"1px solid #e5e7eb",borderRadius:"12px",boxShadow:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",fontSize:"13px",padding:"12px"},labelStyle:{fontWeight:600,marginBottom:"8px",color:"#374151"},itemStyle:{padding:"4px 0"}}),(0,k.jsx)(e7,{wrapperStyle:{fontSize:"13px",paddingTop:"16px",fontWeight:500},iconType:"circle",iconSize:10}),(0,k.jsx)(pV,{type:"monotone",dataKey:"messages",name:n("monitoring.trafficChart.messages"),stroke:"#3b82f6",strokeWidth:2.5,fillOpacity:1,fill:"url(#colorMessages)",dot:!1,activeDot:{r:6,strokeWidth:2}}),(0,k.jsx)(pV,{type:"monotone",dataKey:"llmCalls",name:n("monitoring.trafficChart.llmCalls"),stroke:"#8b5cf6",strokeWidth:2.5,fillOpacity:1,fill:"url(#colorLLMCalls)",dot:!1,activeDot:{r:6,strokeWidth:2}})]})})})]})}function hW({metrics:t,messages:e=[],llmCalls:r=[],loading:n}){let{t:i}=(0,E.useTranslation)(),o=[{title:i("monitoring.totalMessages"),value:t?.totalMessages||0,icon:(0,k.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,k.jsx)("path",{d:"M6.45455 19L2 22.5V4C2 3.44772 2.44772 3 3 3H21C21.5523 3 22 3.44772 22 4V18C22 18.5523 21.5523 19 21 19H6.45455ZM4 18.3851L5.76282 17H20V5H4V18.3851Z"})}),trend:t?.trends?{value:t.trends.messages,direction:t.trends.messages>=0?"up":"down"}:void 0},{title:i("monitoring.modelCallsCount"),value:t?.modelCalls||0,icon:(0,k.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,k.jsx)("path",{d:"M10.6144 17.7956C10.277 18.5682 9.20776 18.5682 8.8704 17.7956L7.99275 15.7854C7.21171 13.9966 5.80589 12.5726 4.0523 11.7942L1.63658 10.7219C.868536 10.381.868537 9.26368 1.63658 8.92276L3.97685 7.88394C5.77553 7.08552 7.20657 5.60881 7.97427 3.75892L8.8633 1.61673C9.19319.821767 10.2916.821765 10.6215 1.61673L11.5105 3.75894C12.2782 5.60881 13.7092 7.08552 15.5079 7.88394L17.8482 8.92276C18.6162 9.26368 18.6162 10.381 17.8482 10.7219L15.4325 11.7942C13.6789 12.5726 12.2731 13.9966 11.492 15.7854L10.6144 17.7956ZM19.4014 22.6899 19.6482 22.1242C20.0882 21.1156 20.8807 20.3125 21.8695 19.8732L22.6299 19.5353C23.0412 19.3526 23.0412 18.7549 22.6299 18.5722L21.9121 18.2532C20.8978 17.8026 20.0911 16.9698 19.6586 15.9269L19.4052 15.3156C19.2285 14.8896 18.6395 14.8896 18.4628 15.3156L18.2094 15.9269C17.777 16.9698 16.9703 17.8026 15.956 18.2532L15.2381 18.5722C14.8269 18.7549 14.8269 19.3526 15.2381 19.5353L15.9985 19.8732C16.9874 20.3125 17.7798 21.1156 18.2198 22.1242L18.4667 22.6899C18.6473 23.104 19.2207 23.104 19.4014 22.6899Z"})}),trend:t?.trends?{value:t.trends.llmCalls,direction:t.trends.llmCalls>=0?"up":"down"}:void 0},{title:i("monitoring.successRate"),value:t?`${t.successRate}%`:"0%",icon:(0,k.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,k.jsx)("path",{d:"M10 15.172L19.192 5.979L20.607 7.393L10 18L3.636 11.636L5.05 10.222L10 15.172Z"})}),trend:t?.trends?{value:t.trends.successRate,direction:t.trends.successRate>=0?"up":"down"}:void 0},{title:i("monitoring.activeSessions"),value:t?.activeSessions||0,icon:(0,k.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,k.jsx)("path",{d:"M2 22C2 17.5817 5.58172 14 10 14C14.4183 14 18 17.5817 18 22H16C16 18.6863 13.3137 16 10 16C6.68629 16 4 18.6863 4 22H2ZM10 13C6.685 13 4 10.315 4 7C4 3.685 6.685 1 10 1C13.315 1 16 3.685 16 7C16 10.315 13.315 13 10 13ZM10 11C12.21 11 14 9.21 14 7C14 4.79 12.21 3 10 3C7.79 3 6 4.79 6 7C6 9.21 7.79 11 10 11ZM18.2837 14.7028C21.0644 15.9561 23 18.7519 23 22H21C21 19.3742 19.4041 17.1096 17.1582 16.2466L18.2837 14.7028ZM17.5962 3.41321C19.5944 4.23703 21 6.20361 21 8.5C21 11.3702 18.8042 13.7252 16 13.9776V11.9646C17.6967 11.7222 19 10.264 19 8.5C19 7.11935 18.2016 5.92603 17.041 5.35635L17.5962 3.41321Z"})}),trend:t?.trends?{value:t.trends.sessions,direction:t.trends.sessions>=0?"up":"down"}:void 0}];return(0,k.jsxs)("div",{className:"space-y-6",children:[(0,k.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-4 gap-6",children:o.map((t,e)=>(0,k.jsx)(D,{title:t.title,value:t.value,icon:t.icon,trend:t.trend,loading:n},e))}),(0,k.jsx)(hV,{messages:e,llmCalls:r,loading:n})]})}var hq=t.i(47977),hX=t.i(15742);function hG({selectedBots:t,selectedPipelines:e,timeRange:r,onBotsChange:n,onPipelinesChange:i,onTimeRangeChange:o}){let{t:a}=(0,E.useTranslation)(),[l,u]=(0,P.useState)([]),[s,c]=(0,P.useState)([]),[f,d]=(0,P.useState)(!1),[p,h]=(0,P.useState)(!1);return(0,P.useEffect)(()=>{(async()=>{d(!0);try{let t=((await hX.backendClient.getBots()).bots||[]).filter(t=>!!t.uuid).map(t=>({uuid:t.uuid,name:t.name}));u(t)}catch(t){console.error("Failed to fetch bots:",t)}finally{d(!1)}})()},[]),(0,P.useEffect)(()=>{(async()=>{h(!0);try{let t=((await hX.backendClient.getPipelines()).pipelines||[]).filter(t=>!!t.uuid).map(t=>({uuid:t.uuid,name:t.name}));c(t)}catch(t){console.error("Failed to fetch pipelines:",t)}finally{h(!1)}})()},[]),(0,k.jsxs)("div",{className:"flex flex-wrap items-center gap-6",children:[(0,k.jsxs)("div",{className:"flex items-center gap-2",children:[(0,k.jsx)("label",{className:"text-sm font-medium text-gray-700 dark:text-gray-300 whitespace-nowrap",children:a("monitoring.filters.bot")}),(0,k.jsxs)(hq.Select,{value:0===t.length?"all":t[0],onValueChange:t=>{"all"===t?n([]):n([t])},disabled:f,children:[(0,k.jsx)(hq.SelectTrigger,{className:"bg-white dark:bg-[#2a2a2e] h-9 w-[140px]",children:(0,k.jsx)(hq.SelectValue,{placeholder:a(f?"monitoring.filters.loading":"monitoring.filters.selectBot")})}),(0,k.jsxs)(hq.SelectContent,{children:[(0,k.jsx)(hq.SelectItem,{value:"all",children:a("monitoring.filters.allBots")}),l.map(t=>(0,k.jsx)(hq.SelectItem,{value:t.uuid,children:t.name},t.uuid))]})]})]}),(0,k.jsxs)("div",{className:"flex items-center gap-2",children:[(0,k.jsx)("label",{className:"text-sm font-medium text-gray-700 dark:text-gray-300 whitespace-nowrap",children:a("monitoring.filters.pipeline")}),(0,k.jsxs)(hq.Select,{value:0===e.length?"all":e[0],onValueChange:t=>{"all"===t?i([]):i([t])},disabled:p,children:[(0,k.jsx)(hq.SelectTrigger,{className:"bg-white dark:bg-[#2a2a2e] h-9 w-[140px]",children:(0,k.jsx)(hq.SelectValue,{placeholder:a(p?"monitoring.filters.loading":"monitoring.filters.selectPipeline")})}),(0,k.jsxs)(hq.SelectContent,{children:[(0,k.jsx)(hq.SelectItem,{value:"all",children:a("monitoring.filters.allPipelines")}),s.map(t=>(0,k.jsx)(hq.SelectItem,{value:t.uuid,children:t.name},t.uuid))]})]})]}),(0,k.jsxs)("div",{className:"flex items-center gap-2",children:[(0,k.jsx)("label",{className:"text-sm font-medium text-gray-700 dark:text-gray-300 whitespace-nowrap",children:a("monitoring.filters.timeRange")}),(0,k.jsxs)(hq.Select,{value:r,onValueChange:t=>{o(t)},children:[(0,k.jsx)(hq.SelectTrigger,{className:"bg-white dark:bg-[#2a2a2e] h-9 w-[150px]",children:(0,k.jsx)(hq.SelectValue,{})}),(0,k.jsxs)(hq.SelectContent,{children:[(0,k.jsx)(hq.SelectItem,{value:"lastHour",children:a("monitoring.filters.lastHour")}),(0,k.jsx)(hq.SelectItem,{value:"last6Hours",children:a("monitoring.filters.last6Hours")}),(0,k.jsx)(hq.SelectItem,{value:"last24Hours",children:a("monitoring.filters.last24Hours")}),(0,k.jsx)(hq.SelectItem,{value:"last7Days",children:a("monitoring.filters.last7Days")}),(0,k.jsx)(hq.SelectItem,{value:"last30Days",children:a("monitoring.filters.last30Days")})]})]})]})]})}var hY=t.i(3773),hK=t.i(90210),hZ=t.i(83227);let hJ=(0,hZ.default)("database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);var hQ=t.i(92784);let h0=(0,hZ.default)("users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]),h1=(0,hZ.default)("layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);var h2=t.i(32100);function h3({filterState:t}){let{t:e}=(0,E.useTranslation)(),[r,n]=(0,P.useState)(null),i=async e=>{n(e);try{let{startTime:r,endTime:n}=(()=>{let e,r=new Date,n=r;switch(t.timeRange){case"lastHour":e=new Date(r.getTime()-36e5);break;case"last6Hours":e=new Date(r.getTime()-216e5);break;case"last24Hours":default:e=new Date(r.getTime()-864e5);break;case"last7Days":e=new Date(r.getTime()-6048e5);break;case"last30Days":e=new Date(r.getTime()-2592e6);break;case"custom":t.customDateRange?(e=t.customDateRange.from,n=t.customDateRange.to):e=new Date(r.getTime()-864e5)}return{startTime:e.toISOString(),endTime:n.toISOString()}})(),i=new URLSearchParams({type:e,startTime:r,endTime:n});t.selectedBots.length>0&&t.selectedBots.forEach(t=>{i.append("botId",t)}),t.selectedPipelines.length>0&&t.selectedPipelines.forEach(t=>{i.append("pipelineId",t)});let o=await hX.backendClient.downloadFile(`/api/v1/monitoring/export?${i.toString()}`),a=o.headers["content-disposition"],l=`monitoring-${e}-${Date.now()}.csv`;if(a){let t=a.match(/filename="?([^";\n]+)"?/);t&&(l=t[1])}let u=new Blob([o.data],{type:"text/csv;charset=utf-8;"}),s=window.URL.createObjectURL(u),c=document.createElement("a");c.href=s,c.setAttribute("download",l),document.body.appendChild(c),c.click(),document.body.removeChild(c),window.URL.revokeObjectURL(s)}catch(t){console.error("Failed to export data:",t)}finally{n(null)}},o=[{type:"messages",label:e("monitoring.export.messages"),icon:(0,k.jsx)(hK.FileText,{className:"w-4 h-4 mr-2"})},{type:"llm-calls",label:e("monitoring.export.llmCalls"),icon:(0,k.jsx)(hJ,{className:"w-4 h-4 mr-2"})},{type:"embedding-calls",label:e("monitoring.export.embeddingCalls"),icon:(0,k.jsx)(h1,{className:"w-4 h-4 mr-2"})},{type:"errors",label:e("monitoring.export.errors"),icon:(0,k.jsx)(hQ.AlertCircle,{className:"w-4 h-4 mr-2"})},{type:"sessions",label:e("monitoring.export.sessions"),icon:(0,k.jsx)(h0,{className:"w-4 h-4 mr-2"})}];return(0,k.jsxs)(h2.DropdownMenu,{children:[(0,k.jsx)(h2.DropdownMenuTrigger,{asChild:!0,children:(0,k.jsx)(M.Button,{variant:"outline",size:"sm",className:"bg-white dark:bg-[#2a2a2e] hover:bg-gray-50 dark:hover:bg-gray-800 border-gray-300 dark:border-gray-600 shadow-sm flex-shrink-0",disabled:null!==r,children:r?(0,k.jsxs)(k.Fragment,{children:[(0,k.jsxs)("svg",{className:"w-4 h-4 mr-2 animate-spin",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,k.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,k.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),e("monitoring.export.exporting")]}):(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(hY.Download,{className:"w-4 h-4 mr-2"}),e("monitoring.exportData")]})})}),(0,k.jsxs)(h2.DropdownMenuContent,{align:"end",className:"w-48",children:[(0,k.jsx)(h2.DropdownMenuLabel,{children:e("monitoring.export.title")}),(0,k.jsx)(h2.DropdownMenuSeparator,{}),o.map(t=>(0,k.jsxs)(h2.DropdownMenuItem,{onClick:()=>i(t.type),disabled:null!==r,className:"cursor-pointer",children:[t.icon,t.label]},t.type))]})]})}var h4=t.i(4480),h5=t.i(55152);function h6({details:t}){let{t:e}=(0,E.useTranslation)(),r=(0,P.useMemo)(()=>{if(!t.message?.variables)return null;try{return JSON.parse(t.message.variables)}catch{return null}},[t.message?.variables]);return(0,k.jsxs)("div",{className:"space-y-4 pl-8 border-l-2 border-gray-200 dark:border-gray-700 ml-4",children:[t.message&&(0,k.jsxs)("div",{className:"bg-gray-50 dark:bg-gray-800 rounded-lg p-3",children:[(0,k.jsxs)("h4",{className:"text-sm font-semibold text-gray-700 dark:text-gray-300 mb-3 flex items-center",children:[(0,k.jsx)("svg",{className:"w-4 h-4 mr-2",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,k.jsx)("path",{d:"M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM11 7H13V9H11V7ZM11 11H13V17H11V11Z"})}),e("monitoring.messageList.viewDetails")]}),(0,k.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-2 text-xs",children:[t.message.platform&&(0,k.jsxs)("div",{className:"bg-white dark:bg-gray-900 rounded p-2",children:[(0,k.jsx)("div",{className:"text-gray-500 dark:text-gray-400",children:e("monitoring.messageList.platform")}),(0,k.jsx)("div",{className:"font-medium text-gray-900 dark:text-white",children:t.message.platform})]}),t.message.userId&&(0,k.jsxs)("div",{className:"bg-white dark:bg-gray-900 rounded p-2",children:[(0,k.jsx)("div",{className:"text-gray-500 dark:text-gray-400",children:e("monitoring.messageList.user")}),(0,k.jsx)("div",{className:"font-medium text-gray-900 dark:text-white truncate",children:t.message.userId})]}),t.message.runnerName&&(0,k.jsxs)("div",{className:"bg-white dark:bg-gray-900 rounded p-2",children:[(0,k.jsx)("div",{className:"text-gray-500 dark:text-gray-400",children:e("monitoring.messageList.runner")}),(0,k.jsx)("div",{className:"font-medium text-gray-900 dark:text-white",children:t.message.runnerName})]}),(0,k.jsxs)("div",{className:"bg-white dark:bg-gray-900 rounded p-2",children:[(0,k.jsx)("div",{className:"text-gray-500 dark:text-gray-400",children:e("monitoring.messageList.level")}),(0,k.jsx)("div",{className:`font-medium ${"error"===t.message.level?"text-red-600 dark:text-red-400":"warning"===t.message.level?"text-yellow-600 dark:text-yellow-400":"text-gray-900 dark:text-white"}`,children:t.message.level.toUpperCase()})]})]})]}),t.llmCalls&&t.llmCalls.length>0&&(0,k.jsxs)("div",{className:"bg-gray-50 dark:bg-gray-800 rounded-lg p-3",children:[(0,k.jsxs)("h4",{className:"text-sm font-semibold text-gray-700 dark:text-gray-300 mb-3 flex items-center",children:[(0,k.jsx)("svg",{className:"w-4 h-4 mr-2",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,k.jsx)("path",{d:"M12 2C17.52 2 22 6.48 22 12C22 17.52 17.52 22 12 22C6.48 22 2 17.52 2 12C2 6.48 6.48 2 12 2ZM12 20C16.42 20 20 16.42 20 12C20 7.58 16.42 4 12 4C7.58 4 4 7.58 4 12C4 16.42 7.58 20 12 20ZM13 12V7H11V14H17V12H13Z"})}),e("monitoring.llmCalls.title")," (",t.llmCalls.length,")"]}),(0,k.jsxs)("div",{className:"grid grid-cols-3 gap-2 mb-3",children:[(0,k.jsxs)("div",{className:"bg-blue-50 dark:bg-blue-900/30 rounded p-2",children:[(0,k.jsx)("div",{className:"text-xs text-blue-600 dark:text-blue-400",children:e("monitoring.llmCalls.totalTokens")}),(0,k.jsx)("div",{className:"text-lg font-semibold text-blue-900 dark:text-blue-100",children:t.llmStats.totalTokens.toLocaleString()})]}),(0,k.jsxs)("div",{className:"bg-green-50 dark:bg-green-900/30 rounded p-2",children:[(0,k.jsx)("div",{className:"text-xs text-green-600 dark:text-green-400",children:e("monitoring.llmCalls.avgDuration")}),(0,k.jsxs)("div",{className:"text-lg font-semibold text-green-900 dark:text-green-100",children:[t.llmStats.averageDurationMs,"ms"]})]}),(0,k.jsxs)("div",{className:"bg-purple-50 dark:bg-purple-900/30 rounded p-2",children:[(0,k.jsx)("div",{className:"text-xs text-purple-600 dark:text-purple-400",children:e("monitoring.llmCalls.calls")}),(0,k.jsx)("div",{className:"text-lg font-semibold text-purple-900 dark:text-purple-100",children:t.llmStats.totalCalls})]})]}),(0,k.jsx)("div",{className:"space-y-2",children:t.llmCalls.map((t,e)=>(0,k.jsxs)("div",{className:"bg-white dark:bg-gray-900 rounded p-2 text-sm",children:[(0,k.jsxs)("div",{className:"flex justify-between items-start mb-2",children:[(0,k.jsxs)("div",{children:[(0,k.jsxs)("span",{className:"font-medium text-gray-900 dark:text-white",children:["#",e+1," ",t.modelName]}),(0,k.jsx)("span",{className:`ml-2 text-xs px-2 py-0.5 rounded ${"success"===t.status?"bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200":"bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200"}`,children:t.status})]}),(0,k.jsxs)("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:[t.duration,"ms"]})]}),(0,k.jsxs)("div",{className:"grid grid-cols-3 gap-2 text-xs text-gray-600 dark:text-gray-400",children:[(0,k.jsxs)("div",{children:[(0,k.jsx)("span",{className:"text-gray-500 dark:text-gray-500",children:"In:"})," ",t.tokens.input.toLocaleString()]}),(0,k.jsxs)("div",{children:[(0,k.jsx)("span",{className:"text-gray-500 dark:text-gray-500",children:"Out:"})," ",t.tokens.output.toLocaleString()]}),(0,k.jsxs)("div",{children:[(0,k.jsx)("span",{className:"text-gray-500 dark:text-gray-500",children:"Total:"})," ",t.tokens.total.toLocaleString()]})]}),t.errorMessage&&(0,k.jsx)("div",{className:"mt-2 text-xs text-red-600 dark:text-red-400",children:t.errorMessage})]},t.id))})]}),t.errors&&t.errors.length>0&&(0,k.jsxs)("div",{className:"bg-gray-50 dark:bg-gray-800 rounded-lg p-3",children:[(0,k.jsxs)("h4",{className:"text-sm font-semibold text-red-700 dark:text-red-400 mb-3 flex items-center",children:[(0,k.jsx)("svg",{className:"w-4 h-4 mr-2",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,k.jsx)("path",{d:"M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM11 15H13V17H11V15ZM11 7H13V13H11V7Z"})}),e("monitoring.errors.title")," (",t.errors.length,")"]}),(0,k.jsx)("div",{className:"space-y-2",children:t.errors.map(t=>(0,k.jsxs)("div",{className:"bg-red-50 dark:bg-red-900/20 rounded p-2 text-sm",children:[(0,k.jsx)("div",{className:"font-medium text-red-900 dark:text-red-300 mb-1",children:t.errorType}),(0,k.jsx)("div",{className:"text-red-700 dark:text-red-400 text-xs mb-2",children:t.errorMessage}),t.stackTrace&&(0,k.jsxs)("details",{className:"text-xs",children:[(0,k.jsx)("summary",{className:"cursor-pointer text-red-600 dark:text-red-500 hover:text-red-800 dark:hover:text-red-300",children:e("monitoring.errors.stackTrace")}),(0,k.jsx)("pre",{className:"mt-2 p-2 bg-red-100 dark:bg-red-900/40 rounded overflow-x-auto text-xs",children:t.stackTrace})]})]},t.id))})]}),r&&Object.keys(r).length>0&&t.message?.runnerName!=="local-agent"&&(0,k.jsxs)("div",{className:"bg-gray-50 dark:bg-gray-800 rounded-lg p-3",children:[(0,k.jsxs)("h4",{className:"text-sm font-semibold text-gray-700 dark:text-gray-300 mb-3 flex items-center",children:[(0,k.jsx)("svg",{className:"w-4 h-4 mr-2",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,k.jsx)("path",{d:"M4 18V14.3C4 13.4716 3.32843 12.8 2.5 12.8H2V11.2H2.5C3.32843 11.2 4 10.5284 4 9.7V6C4 4.34315 5.34315 3 7 3H8V5H7C6.44772 5 6 5.44772 6 6V9.7C6 10.7065 5.41099 11.5849 4.55132 12C5.41099 12.4151 6 13.2935 6 14.3V18C6 18.5523 6.44772 19 7 19H8V21H7C5.34315 21 4 19.6569 4 18ZM20 14.3V18C20 19.6569 18.6569 21 17 21H16V19H17C17.5523 19 18 18.5523 18 18V14.3C18 13.2935 18.589 12.4151 19.4487 12C18.589 11.5849 18 10.7065 18 9.7V6C18 5.44772 17.5523 5 17 5H16V3H17C18.6569 3 20 4.34315 20 6V9.7C20 10.5284 20.6716 11.2 21.5 11.2H22V12.8H21.5C20.6716 12.8 20 13.4716 20 14.3Z"})}),e("monitoring.queryVariables.title")]}),(0,k.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-2 text-xs",children:Object.entries(r).map(([t,e])=>(0,k.jsxs)("div",{className:"bg-white dark:bg-gray-900 rounded p-2",children:[(0,k.jsx)("div",{className:"text-gray-500 dark:text-gray-400",children:t}),(0,k.jsx)("div",{className:"font-medium text-gray-900 dark:text-white truncate",title:"string"==typeof e?e:JSON.stringify(e),children:null==e?(0,k.jsx)("span",{className:"text-gray-400 italic",children:"null"}):"string"==typeof e?e||(0,k.jsx)("span",{className:"text-gray-400 italic",children:"empty"}):JSON.stringify(e)})]},t))})]}),(!t.llmCalls||0===t.llmCalls.length)&&(!t.errors||0===t.errors.length)&&(t.message?.runnerName==="local-agent"||!r||0===Object.keys(r).length)&&(0,k.jsx)("div",{className:"text-sm text-gray-500 dark:text-gray-400 text-center py-4",children:e("monitoring.messageDetails.noData")})]})}var h8=t.i(10034);t.i(56907);var h7=t.i(20317),h9=t.i(16700);function yt(){let{t}=(0,E.useTranslation)(),{filterState:e,setSelectedBots:r,setSelectedPipelines:n,setTimeRange:i}=function(){let t=(0,h4.useSearchParams)(),[e,r]=(0,P.useState)(()=>{let e=t.get("botId");return e?[e]:[]}),[n,i]=(0,P.useState)(()=>{let e=t.get("pipelineId");return e?[e]:[]}),[o,a]=(0,P.useState)("last24Hours"),[l,u]=(0,P.useState)(null);return{selectedBots:e,setSelectedBots:r,selectedPipelines:n,setSelectedPipelines:i,timeRange:o,setTimeRange:a,customDateRange:l,setCustomDateRange:u,getActiveDateRange:()=>{if("custom"===o&&l)return l;if("custom"===o)return null;let t=new Date,e=new Date;switch(o){case"lastHour":e.setHours(t.getHours()-1);break;case"last6Hours":e.setHours(t.getHours()-6);break;case"last24Hours":e.setHours(t.getHours()-24);break;case"last7Days":e.setDate(t.getDate()-7);break;case"last30Days":e.setDate(t.getDate()-30);break;default:return null}return{from:e,to:t}},resetFilters:()=>{r([]),i([]),a("last24Hours"),u(null)},filterState:{selectedBots:e,selectedPipelines:n,timeRange:o,customDateRange:l}}}(),{data:o,loading:a,refetch:l}=(0,h5.useMonitoringData)(e),[u,s]=(0,P.useState)(null),[c,f]=(0,P.useState)({}),[d,p]=(0,P.useState)({}),[h,y]=(0,P.useState)(null),[m,v]=(0,P.useState)("messages"),g=async t=>{v("messages"),setTimeout(()=>{b(t)},100)},b=async t=>{if(u===t)s(null);else if(s(t),!c[t]){p({...d,[t]:!0});try{let e=await h7.httpClient.get(`/api/v1/monitoring/messages/${t}/details`);e&&f(r=>({...r,[t]:{messageId:e.message_id,found:e.found,message:e.message?{id:e.message.id,timestamp:new Date(e.message.timestamp),botId:e.message.bot_id,botName:e.message.bot_name,pipelineId:e.message.pipeline_id,pipelineName:e.message.pipeline_name,messageContent:e.message.message_content,sessionId:e.message.session_id,status:e.message.status,level:e.message.level,platform:e.message.platform,userId:e.message.user_id,runnerName:e.message.runner_name,variables:e.message.variables}:void 0,llmCalls:e.llm_calls.map(t=>({id:t.id,timestamp:new Date(t.timestamp),modelName:t.model_name,status:t.status,duration:t.duration,errorMessage:t.error_message,tokens:{input:t.input_tokens||0,output:t.output_tokens||0,total:t.total_tokens||0}})),errors:e.errors.map(t=>({id:t.id,timestamp:new Date(t.timestamp),errorType:t.error_type,errorMessage:t.error_message,stackTrace:t.stack_trace})),llmStats:{totalCalls:e.llm_stats.total_calls,totalInputTokens:e.llm_stats.total_input_tokens,totalOutputTokens:e.llm_stats.total_output_tokens,totalTokens:e.llm_stats.total_tokens,totalDurationMs:e.llm_stats.total_duration_ms,averageDurationMs:e.llm_stats.average_duration_ms}}}))}catch(t){console.error("Failed to fetch message details:",t)}finally{p({...d,[t]:!1})}}};return(0,k.jsxs)("div",{className:"w-full h-full",children:[(0,k.jsx)("div",{className:"sticky top-[-1.5rem] z-10 -ml-[2rem] -mr-[1.5rem] -mt-[1.5rem] pt-[1.5rem] pb-4 bg-[#fafafa] dark:bg-[#151518]",children:(0,k.jsx)("div",{className:"ml-[2rem] mr-[1.5rem] px-[0.8rem]",children:(0,k.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-4 p-4 bg-white dark:bg-[#2a2a2e] rounded-xl border border-gray-200 dark:border-gray-700 shadow-sm",children:[(0,k.jsx)(hG,{selectedBots:e.selectedBots,selectedPipelines:e.selectedPipelines,timeRange:e.timeRange,onBotsChange:r,onPipelinesChange:n,onTimeRangeChange:i}),(0,k.jsxs)("div",{className:"flex items-center gap-2",children:[(0,k.jsx)(h3,{filterState:e}),(0,k.jsxs)(M.Button,{variant:"outline",size:"sm",onClick:l,className:"bg-white dark:bg-[#2a2a2e] hover:bg-gray-50 dark:hover:bg-gray-800 border-gray-300 dark:border-gray-600 shadow-sm flex-shrink-0",children:[(0,k.jsx)("svg",{className:"w-4 h-4 mr-2",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,k.jsx)("path",{d:"M5.46257 4.43262C7.21556 2.91688 9.5007 2 12 2C17.5228 2 22 6.47715 22 12C22 14.1361 21.3302 16.1158 20.1892 17.7406L17 12H20C20 7.58172 16.4183 4 12 4C9.84982 4 7.89777 4.84827 6.46023 6.22842L5.46257 4.43262ZM18.5374 19.5674C16.7844 21.0831 14.4993 22 12 22C6.47715 22 2 17.5228 2 12C2 9.86386 2.66979 7.88416 3.8108 6.25944L7 12H4C4 16.4183 7.58172 20 12 20C14.1502 20 16.1022 19.1517 17.5398 17.7716L18.5374 19.5674Z"})}),t("monitoring.refreshData")]})]})]})})}),(0,k.jsxs)("div",{className:"flex flex-col gap-6 px-[0.8rem] pb-4",children:[(0,k.jsx)(hW,{metrics:o?.overview||null,messages:o?.messages||[],llmCalls:o?.llmCalls||[],loading:a}),(0,k.jsx)("div",{className:"bg-white dark:bg-[#2a2a2e] rounded-xl border border-gray-200 dark:border-gray-700 shadow-sm overflow-hidden",children:(0,k.jsxs)(A.Tabs,{value:m,onValueChange:v,className:"w-full",children:[(0,k.jsx)("div",{className:"px-6 pt-4",children:(0,k.jsxs)(A.TabsList,{className:"bg-gray-100 dark:bg-[#1a1a1e] h-12 p-1",children:[(0,k.jsx)(A.TabsTrigger,{value:"messages",className:"px-6 py-2 text-sm font-medium cursor-pointer data-[state=active]:bg-white dark:data-[state=active]:bg-[#2a2a2e] data-[state=active]:shadow-sm",children:t("monitoring.tabs.messages")}),(0,k.jsx)(A.TabsTrigger,{value:"modelCalls",className:"px-6 py-2 text-sm font-medium cursor-pointer data-[state=active]:bg-white dark:data-[state=active]:bg-[#2a2a2e] data-[state=active]:shadow-sm",children:t("monitoring.tabs.modelCalls")}),(0,k.jsx)(A.TabsTrigger,{value:"errors",className:"px-6 py-2 text-sm font-medium cursor-pointer data-[state=active]:bg-white dark:data-[state=active]:bg-[#2a2a2e] data-[state=active]:shadow-sm",children:t("monitoring.tabs.errors")})]})}),(0,k.jsx)(A.TabsContent,{value:"messages",className:"p-6 m-0",children:(0,k.jsxs)("div",{children:[a&&(0,k.jsx)("div",{className:"py-12 flex justify-center",children:(0,k.jsx)(h9.LoadingSpinner,{text:t("monitoring.messageList.loading")})}),!a&&o&&o.messages&&o.messages.length>0&&(0,k.jsx)("div",{className:"space-y-4",children:o.messages.filter(t=>{let e=t.messageContent?.trim();return e&&"[]"!==e&&'""'!==e}).map(t=>(0,k.jsxs)("div",{className:"border border-gray-200 dark:border-gray-700 rounded-xl overflow-hidden hover:shadow-md transition-all duration-200",children:[(0,k.jsx)("div",{className:"p-5 cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800/50 transition-colors",onClick:()=>b(t.id),children:(0,k.jsxs)("div",{className:"flex items-start justify-between",children:[(0,k.jsxs)("div",{className:"flex items-start flex-1",children:[(0,k.jsx)("div",{className:"mr-3 mt-0.5",children:u===t.id?(0,k.jsx)(T.ChevronDown,{className:"w-5 h-5 text-gray-500"}):(0,k.jsx)(C.ChevronRight,{className:"w-5 h-5 text-gray-500"})}),(0,k.jsxs)("div",{className:"flex-1",children:[(0,k.jsx)("div",{className:"flex items-center gap-2 mb-1",children:(0,k.jsxs)("span",{className:"text-xs text-gray-400 dark:text-gray-500 font-mono",children:["ID: ",t.id]})}),(0,k.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,k.jsx)("span",{className:"font-medium text-sm text-gray-700 dark:text-gray-300",children:t.botName}),(0,k.jsx)("span",{className:"text-gray-400",children:"→"}),(0,k.jsx)("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:t.pipelineName}),t.runnerName&&(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)("span",{className:"text-gray-400",children:"→"}),(0,k.jsx)("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:t.runnerName})]})]}),(0,k.jsx)("div",{className:"text-base text-gray-800 dark:text-gray-200",children:(0,k.jsx)(h8.MessageContentRenderer,{content:t.messageContent,maxLines:3})})]})]}),(0,k.jsxs)("div",{className:"flex flex-col items-end gap-2 ml-4",children:[(0,k.jsx)("span",{className:"text-xs text-gray-500 dark:text-gray-400 whitespace-nowrap",children:t.timestamp.toLocaleString()}),(0,k.jsx)("span",{className:`text-xs px-2 py-1 rounded ${"error"===t.level?"bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200":"warning"===t.level?"bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200":"bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200"}`,children:t.level})]})]})}),u===t.id&&(0,k.jsxs)("div",{className:"border-t border-gray-200 dark:border-gray-700 p-4 bg-gray-50 dark:bg-gray-900",children:[d[t.id]&&(0,k.jsx)("div",{className:"py-4 flex justify-center",children:(0,k.jsx)(h9.LoadingSpinner,{size:"sm",text:""})}),!d[t.id]&&c[t.id]&&(0,k.jsx)(h6,{details:c[t.id]})]})]},t.id))}),!a&&(!o||!o.messages||0===o.messages.length)&&(0,k.jsxs)("div",{className:"text-center text-gray-500 dark:text-gray-400 py-16",children:[(0,k.jsx)("svg",{className:"w-16 h-16 mx-auto mb-4 text-gray-300 dark:text-gray-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,k.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M8 10h.01M12 10h.01M16 10h.01M9 16H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-5l-5 5v-5z"})}),(0,k.jsx)("p",{className:"text-base font-medium mb-2",children:t("monitoring.messageList.noMessages")}),(0,k.jsx)("p",{className:"text-sm",children:t("monitoring.messageList.noMessagesDescription")})]})]})}),(0,k.jsx)(A.TabsContent,{value:"modelCalls",className:"p-6 m-0",children:(0,k.jsxs)("div",{children:[a&&(0,k.jsx)("div",{className:"py-12 flex justify-center",children:(0,k.jsx)(h9.LoadingSpinner,{text:t("common.loading")})}),!a&&o&&o.modelCalls&&o.modelCalls.length>0&&(0,k.jsx)("div",{className:"space-y-4",children:o.modelCalls.map(e=>(0,k.jsx)("div",{className:"border border-gray-200 dark:border-gray-700 rounded-xl p-5 hover:shadow-md transition-all duration-200",children:(0,k.jsxs)("div",{className:"flex justify-between items-start mb-3",children:[(0,k.jsxs)("div",{className:"flex-1",children:[e.messageId&&(0,k.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,k.jsxs)("span",{className:"text-xs text-gray-400 dark:text-gray-500 font-mono",children:["Query ID: ",e.messageId]}),(0,k.jsxs)(M.Button,{variant:"ghost",size:"sm",className:"h-5 px-1.5 text-xs",onClick:()=>g(e.messageId),children:[(0,k.jsx)(_.ExternalLink,{className:"w-3 h-3 mr-1"}),t("monitoring.messageList.viewConversation")]})]}),(0,k.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,k.jsx)("span",{className:`text-xs px-2 py-1 rounded ${"llm"===e.modelType?"bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200":"bg-purple-100 text-purple-800 dark:bg-purple-900 dark:text-purple-200"}`,children:"llm"===e.modelType?t("monitoring.modelCalls.llmModel"):t("monitoring.modelCalls.embeddingModel")}),"embedding"===e.modelType&&e.callType&&(0,k.jsx)("span",{className:`text-xs px-2 py-1 rounded ${"retrieve"===e.callType?"bg-cyan-100 text-cyan-800 dark:bg-cyan-900 dark:text-cyan-200":"bg-amber-100 text-amber-800 dark:bg-amber-900 dark:text-amber-200"}`,children:"retrieve"===e.callType?t("monitoring.modelCalls.retrieveCall"):t("monitoring.modelCalls.embeddingCall")}),(0,k.jsx)("span",{className:`text-xs px-2 py-1 rounded ${"success"===e.status?"bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200":"bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200"}`,children:e.status})]}),(0,k.jsx)("div",{className:"font-medium text-sm text-gray-700 dark:text-gray-300 mb-2",children:e.modelName}),"llm"===e.modelType&&e.botName&&e.pipelineName&&(0,k.jsxs)("div",{className:"text-xs text-gray-600 dark:text-gray-400 mb-1",children:[e.botName," → ",e.pipelineName]}),(0,k.jsxs)("div",{className:"text-xs text-gray-600 dark:text-gray-400 space-y-1",children:[(0,k.jsxs)("div",{className:"flex flex-wrap gap-4",children:["llm"===e.modelType&&e.tokens&&(0,k.jsxs)(k.Fragment,{children:[(0,k.jsxs)("span",{children:[t("monitoring.llmCalls.inputTokens"),":"," ",e.tokens.input]}),(0,k.jsxs)("span",{children:[t("monitoring.llmCalls.outputTokens"),":"," ",e.tokens.output]}),(0,k.jsxs)("span",{children:[t("monitoring.llmCalls.totalTokens"),":"," ",e.tokens.total]})]}),"embedding"===e.modelType&&(0,k.jsxs)(k.Fragment,{children:[(0,k.jsxs)("span",{children:[t("monitoring.embeddingCalls.promptTokens"),": ",e.promptTokens]}),(0,k.jsxs)("span",{children:[t("monitoring.embeddingCalls.totalTokens"),": ",e.totalTokens]}),(0,k.jsxs)("span",{children:[t("monitoring.embeddingCalls.inputCount"),": ",e.inputCount]})]}),(0,k.jsxs)("span",{children:[t("monitoring.llmCalls.duration"),":"," ",e.duration,"ms"]}),e.cost&&(0,k.jsxs)("span",{children:[t("monitoring.llmCalls.cost"),": $",e.cost.toFixed(4)]})]}),"embedding"===e.modelType&&e.knowledgeBaseId&&(0,k.jsxs)("div",{children:[t("monitoring.embeddingCalls.knowledgeBase"),": ",e.knowledgeBaseId]}),"embedding"===e.modelType&&e.queryText&&(0,k.jsxs)("div",{className:"mt-2 p-2 bg-gray-50 dark:bg-gray-800 rounded text-sm",children:[(0,k.jsxs)("span",{className:"text-gray-500 dark:text-gray-400",children:[t("monitoring.embeddingCalls.queryText"),":"," "]}),(0,k.jsx)("span",{className:"text-gray-700 dark:text-gray-300",children:e.queryText.length>100?e.queryText.substring(0,100)+"...":e.queryText})]})]}),e.errorMessage&&(0,k.jsxs)("div",{className:"mt-2 text-xs text-red-600 dark:text-red-400",children:["Error: ",e.errorMessage]})]}),(0,k.jsx)("span",{className:"text-xs text-gray-500 dark:text-gray-400 whitespace-nowrap ml-4",children:e.timestamp.toLocaleString()})]})},e.id))}),!a&&(!o||!o.modelCalls||0===o.modelCalls.length)&&(0,k.jsxs)("div",{className:"text-center text-gray-500 dark:text-gray-400 py-16",children:[(0,k.jsx)("svg",{className:"w-16 h-16 mx-auto mb-4 text-gray-300 dark:text-gray-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,k.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z"})}),(0,k.jsx)("p",{className:"text-base font-medium",children:t("monitoring.modelCalls.noData")})]})]})}),(0,k.jsx)(A.TabsContent,{value:"errors",className:"p-6 m-0",children:(0,k.jsxs)("div",{children:[a&&(0,k.jsx)("div",{className:"py-12 flex justify-center",children:(0,k.jsx)(h9.LoadingSpinner,{text:t("common.loading")})}),!a&&o&&o.errors&&o.errors.length>0&&(0,k.jsx)("div",{className:"space-y-4",children:o.errors.map(e=>(0,k.jsxs)("div",{className:"border border-red-200 dark:border-red-900 rounded-xl overflow-hidden hover:shadow-md transition-all duration-200",children:[(0,k.jsx)("div",{className:"p-5 cursor-pointer hover:bg-red-50 dark:hover:bg-red-950/50 transition-colors bg-red-50/50 dark:bg-red-950/30",onClick:()=>{var t;h===(t=e.id)?y(null):y(t)},children:(0,k.jsxs)("div",{className:"flex items-start justify-between",children:[(0,k.jsxs)("div",{className:"flex items-start flex-1",children:[(0,k.jsx)("div",{className:"mr-3 mt-0.5",children:h===e.id?(0,k.jsx)(T.ChevronDown,{className:"w-5 h-5 text-red-500"}):(0,k.jsx)(C.ChevronRight,{className:"w-5 h-5 text-red-500"})}),(0,k.jsxs)("div",{className:"flex-1",children:[(0,k.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,k.jsxs)("span",{className:"text-xs text-gray-400 dark:text-gray-500 font-mono",children:["Query ID: ",e.messageId||"-"]}),e.messageId&&(0,k.jsxs)(M.Button,{variant:"ghost",size:"sm",className:"h-5 px-1.5 text-xs",onClick:t=>{t.stopPropagation(),g(e.messageId)},children:[(0,k.jsx)(_.ExternalLink,{className:"w-3 h-3 mr-1"}),t("monitoring.messageList.viewConversation")]})]}),(0,k.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,k.jsx)("span",{className:"font-medium text-sm text-red-700 dark:text-red-300",children:e.errorType}),(0,k.jsx)("span",{className:"text-red-400",children:"→"}),(0,k.jsx)("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:e.botName}),(0,k.jsx)("span",{className:"text-red-400",children:"→"}),(0,k.jsx)("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:e.pipelineName})]}),(0,k.jsx)("p",{className:"text-sm text-red-600 dark:text-red-400 line-clamp-2",children:e.errorMessage})]})]}),(0,k.jsx)("div",{className:"flex flex-col items-end gap-2 ml-4",children:(0,k.jsx)("span",{className:"text-xs text-gray-500 dark:text-gray-400 whitespace-nowrap",children:e.timestamp.toLocaleString()})})]})}),h===e.id&&(0,k.jsx)("div",{className:"border-t border-red-200 dark:border-red-900 p-5 bg-white dark:bg-gray-900",children:(0,k.jsxs)("div",{className:"space-y-4 pl-8 border-l-2 border-red-300 dark:border-red-800 ml-4",children:[(0,k.jsxs)("div",{className:"bg-red-50 dark:bg-red-900/20 rounded-lg p-3",children:[(0,k.jsx)("h4",{className:"text-sm font-semibold text-red-700 dark:text-red-400 mb-3",children:t("monitoring.errors.errorMessage")}),(0,k.jsx)("div",{className:"text-sm text-red-600 dark:text-red-400 whitespace-pre-wrap break-words",children:e.errorMessage})]}),(0,k.jsxs)("div",{className:"bg-gray-50 dark:bg-gray-800 rounded-lg p-3",children:[(0,k.jsx)("h4",{className:"text-sm font-semibold text-gray-700 dark:text-gray-300 mb-3",children:t("monitoring.messageList.viewDetails")}),(0,k.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-2 text-xs",children:[(0,k.jsxs)("div",{className:"bg-white dark:bg-gray-900 rounded p-2",children:[(0,k.jsx)("div",{className:"text-gray-500 dark:text-gray-400",children:t("monitoring.messageList.bot")}),(0,k.jsx)("div",{className:"font-medium text-gray-900 dark:text-white",children:e.botName})]}),(0,k.jsxs)("div",{className:"bg-white dark:bg-gray-900 rounded p-2",children:[(0,k.jsx)("div",{className:"text-gray-500 dark:text-gray-400",children:t("monitoring.messageList.pipeline")}),(0,k.jsx)("div",{className:"font-medium text-gray-900 dark:text-white",children:e.pipelineName})]}),e.sessionId&&(0,k.jsxs)("div",{className:"bg-white dark:bg-gray-900 rounded p-2",children:[(0,k.jsx)("div",{className:"text-gray-500 dark:text-gray-400",children:t("monitoring.sessions.sessionId")}),(0,k.jsx)("div",{className:"font-medium text-gray-900 dark:text-white truncate",children:e.sessionId})]})]})]}),e.stackTrace&&(0,k.jsxs)("div",{className:"bg-gray-50 dark:bg-gray-800 rounded-lg p-3",children:[(0,k.jsx)("h4",{className:"text-sm font-semibold text-gray-700 dark:text-gray-300 mb-3",children:t("monitoring.errors.stackTrace")}),(0,k.jsx)("pre",{className:"text-xs text-gray-600 dark:text-gray-400 overflow-auto max-h-60 bg-white dark:bg-gray-900 p-3 rounded whitespace-pre-wrap break-words",children:e.stackTrace})]})]})})]},e.id))}),!a&&(!o||!o.errors||0===o.errors.length)&&(0,k.jsxs)("div",{className:"text-center text-gray-500 dark:text-gray-400 py-16",children:[(0,k.jsx)("svg",{className:"w-16 h-16 mx-auto mb-4 text-green-300 dark:text-green-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,k.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})}),(0,k.jsx)("p",{className:"text-base font-medium text-green-600 dark:text-green-400",children:t("monitoring.errors.noErrors")})]})]})})]})})]})]})}function ye(){return(0,k.jsx)(P.Suspense,{fallback:(0,k.jsx)(h9.LoadingPage,{}),children:(0,k.jsx)(yt,{})})}t.s(["default",()=>ye],98426)}]);