@rustic-ai/ui-components 0.0.1 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/chart/rechartsTimeSeries.d.ts.map +1 -1
- package/dist/components/codeSnippet/codeSnippet.d.ts +9 -0
- package/dist/components/codeSnippet/codeSnippet.d.ts.map +1 -0
- package/dist/components/helper.d.ts +2 -0
- package/dist/components/helper.d.ts.map +1 -1
- package/dist/components/image/image.d.ts +2 -3
- package/dist/components/image/image.d.ts.map +1 -1
- package/dist/components/index.d.ts +4 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/messageCanvas/messageCanvas.d.ts.map +1 -1
- package/dist/components/navBar/navBar.d.ts.map +1 -1
- package/dist/index.css +19 -0
- package/dist/index.js +1 -1
- package/dist/rusticTheme.d.ts +4 -2
- package/dist/rusticTheme.d.ts.map +1 -1
- package/package.json +8 -4
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see index.js.LICENSE.txt */
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["@rustic-ai/ui-components"]=t():e["@rustic-ai/ui-components"]=t()}(global,(()=>(()=>{var e={450:function(e){e.exports=function(){var e=[],t=[],r={},n={},i={};function o(e){return"string"==typeof e?new RegExp("^"+e+"$","i"):e}function a(e,t){return e===t?t:e===e.toLowerCase()?t.toLowerCase():e===e.toUpperCase()?t.toUpperCase():e[0]===e[0].toUpperCase()?t.charAt(0).toUpperCase()+t.substr(1).toLowerCase():t.toLowerCase()}function c(e,t){return e.replace(t[0],(function(r,n){var i,o,c=(i=t[1],o=arguments,i.replace(/\$(\d{1,2})/g,(function(e,t){return o[t]||""})));return a(""===r?e[n-1]:r,c)}))}function l(e,t,n){if(!e.length||r.hasOwnProperty(e))return t;for(var i=n.length;i--;){var o=n[i];if(o[0].test(t))return c(t,o)}return t}function s(e,t,r){return function(n){var i=n.toLowerCase();return t.hasOwnProperty(i)?a(n,i):e.hasOwnProperty(i)?a(n,e[i]):l(i,n,r)}}function u(e,t,r,n){return function(n){var i=n.toLowerCase();return!!t.hasOwnProperty(i)||!e.hasOwnProperty(i)&&l(i,i,r)===i}}function p(e,t,r){return(r?t+" ":"")+(1===t?p.singular(e):p.plural(e))}return p.plural=s(i,n,e),p.isPlural=u(i,n,e),p.singular=s(n,i,t),p.isSingular=u(n,i,t),p.addPluralRule=function(t,r){e.push([o(t),r])},p.addSingularRule=function(e,r){t.push([o(e),r])},p.addUncountableRule=function(e){"string"!=typeof e?(p.addPluralRule(e,"$0"),p.addSingularRule(e,"$0")):r[e.toLowerCase()]=!0},p.addIrregularRule=function(e,t){t=t.toLowerCase(),e=e.toLowerCase(),i[e]=t,n[t]=e},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach((function(e){return p.addIrregularRule(e[0],e[1])})),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach((function(e){return p.addPluralRule(e[0],e[1])})),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach((function(e){return p.addSingularRule(e[0],e[1])})),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(p.addUncountableRule),p}()}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{"use strict";r.r(n),r.d(n,{ElementRenderer:()=>Hl,FCCalendar:()=>g,Image:()=>Vl,MarkedMarkdown:()=>Bu,MarkedStreamingMarkdown:()=>Lu,MessageCanvas:()=>Fu,MessageSpace:()=>Wu,NavBar:()=>Xu,OpenLayersMap:()=>ps,ParticipantsContainer:()=>gp,RechartsTimeSeries:()=>ql,StreamingText:()=>Dp,Table:()=>Ip,Text:()=>Mp,TextInput:()=>Kp,Timestamp:()=>$u,YoutubeVideo:()=>Vp,rusticTheme:()=>a});const e=require("@mui/material/styles");var t="#DDD0CA",i="#C7C2C0",o=(0,e.createTheme)({shape:{borderRadius:16},palette:{mode:"light",divider:t,text:{secondary:"#4E443F",disabled:i},primary:{main:"#3D3834",contrastText:"#FFFFFF",dark:"#2D2825",light:t},secondary:{main:"#FF6928",light:"#FFDBCC",dark:"#E54500"},error:{main:"#F82A43",dark:"#B51616"},warning:{main:"#FFB800"},info:{main:"#0094FF"},success:{main:"#35A700"},background:{default:"#F4F0EF",paper:"#FFFFFF"},action:{active:"#5F5C5A",hover:"#F1ECEA",selected:i,disabledBackground:"#E5E5E5",focus:"#F4F0EF",disabled:i}},typography:{fontFamily:"Inter",h1:{fontStyle:"normal",fontWeight:400,fontSize:"96px",letterSpacing:"-1.5px"},h2:{fontStyle:"normal",fontWeight:400,fontSize:"60px",letterSpacing:"-0.5px"},h3:{fontStyle:"normal",fontWeight:400,fontSize:"48px",letterSpacing:"0px"},h4:{fontStyle:"normal",fontWeight:400,fontSize:"34px",letterSpacing:"0.25px"},h5:{fontStyle:"normal",fontWeight:400,fontSize:"24px",letterSpacing:"0px"},h6:{fontStyle:"normal",fontWeight:400,fontSize:"20px",letterSpacing:"0.15px"},body1:{fontStyle:"normal",fontWeight:700,fontSize:"16px",letterSpacing:"0.15px"},body2:{fontStyle:"normal",fontWeight:400,fontSize:"16px",letterSpacing:"0.17px"},subtitle1:{fontStyle:"normal",fontWeight:400,fontSize:"16px",letterSpacing:"0.15px",textDecoration:"none"},subtitle2:{fontStyle:"normal",fontWeight:500,fontSize:"14px",letterSpacing:"0.01px"},overline:{fontStyle:"normal",fontWeight:400,fontSize:"14px",letterSpacing:"0.15px"},caption:{fontStyle:"normal",fontWeight:500,fontSize:"12px",letterSpacing:"0.04px"}},shadows:function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}([],(0,e.createTheme)({}).shadows.map((function(e,t){return 1===t?"0 4px 5px rgba(0, 0, 0, 0.05)":2===t?"0 4px 10px rgba(0, 0, 0, 0.1)":3===t?"0 4px 15px rgba(0, 0, 0, 0.15)":"none"})),!0)});const a=o=(0,e.responsiveFontSizes)(o),c=require("react/jsx-runtime"),l=require("@fullcalendar/daygrid");var s=r.n(l);const u=require("@fullcalendar/react");var p=r.n(u);const f=require("@mui/material/Box");var d=r.n(f);const h=require("@mui/material/useMediaQuery");var y=r.n(h);const m=require("react");var v=r.n(m);function g(t){var r=(0,e.useTheme)(),n=y()(r.breakpoints.up("md"));return(0,c.jsx)(d(),{className:"rustic-fc-calendar",children:(0,c.jsx)(p(),{plugins:[s()],initialView:t.initialView||(n?"dayGridMonth":"dayGridDay"),headerToolbar:{left:"prev,next",center:"title",right:"dayGridMonth,dayGridWeek,dayGridDay"},eventTimeFormat:{hour:"2-digit",minute:"2-digit"},initialDate:t.events[0].start,events:t.events,views:{dayGridMonth:{titleFormat:{year:"numeric",month:"short"}},dayGridWeek:{},dayGridDay:{titleFormat:{year:"numeric",month:"short",day:"numeric"}}}})})}const b=require("@mui/icons-material/Crop169");var x=r.n(b);const w=require("@mui/icons-material/MoreVert");var O=r.n(w);const k=require("@mui/material/FormControl");var S=r.n(k);const j=require("@mui/material/IconButton");var A=r.n(j);const P=require("@mui/material/Menu");var E=r.n(P);const T=require("@mui/material/MenuItem");var C=r.n(T);const I=require("@mui/material/Typography");var D=r.n(I);const M=require("@mui/system/Box");var R=r.n(M);const N=require("lodash/isNil");var B=r.n(N);const L=require("lodash/isFunction");var _=r.n(L);const z=require("lodash/range");var $=r.n(z);const F=require("lodash/get");var W=r.n(F);const U=require("lodash/sortBy");var q=r.n(U);const G=require("lodash/throttle");var H=r.n(G);const X=require("lodash/find");var K=r.n(X);const V=require("lodash/every");var Y=r.n(V);const Z=require("clsx");var Q=r.n(Z);const J=require("tiny-invariant");var ee=r.n(J);function te(e){return te="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},te(e)}function re(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ne(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?re(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==te(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==te(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===te(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):re(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ie=Math.PI/180,oe=function(e){return 180*e/Math.PI},ae=function(e,t,r,n){return{x:e+Math.cos(-ie*n)*r,y:t+Math.sin(-ie*n)*r}},ce=function(e,t){var r=t.startAngle,n=t.endAngle,i=Math.floor(r/360),o=Math.floor(n/360);return e+360*Math.min(i,o)},le=function(e,t){var r=function(e,t){var r,n,i,o,a,c,l=e.x,s=e.y,u=t.cx,p=t.cy,f=(i=(r={x:l,y:s}).x,o=r.y,a=(n={x:u,y:p}).x,c=n.y,Math.sqrt(Math.pow(i-a,2)+Math.pow(o-c,2)));if(f<=0)return{radius:f};var d=(l-u)/f,h=Math.acos(d);return s>p&&(h=2*Math.PI-h),{radius:f,angle:oe(h),angleInRadian:h}}({x:e.x,y:e.y},t),n=r.radius,i=r.angle,o=t.innerRadius,a=t.outerRadius;if(n<o||n>a)return!1;if(0===n)return!0;var c,l=function(e){var t=e.startAngle,r=e.endAngle,n=Math.floor(t/360),i=Math.floor(r/360),o=Math.min(n,i);return{startAngle:t-360*o,endAngle:r-360*o}}(t),s=l.startAngle,u=l.endAngle,p=i;if(s<=u){for(;p>u;)p-=360;for(;p<s;)p+=360;c=p>=s&&p<=u}else{for(;p>s;)p-=360;for(;p<u;)p+=360;c=p>=u&&p<=s}return c?ne(ne({},t),{},{radius:n,angle:ce(p,t)}):null};function se(e){var t=e.cx,r=e.cy,n=e.radius,i=e.startAngle,o=e.endAngle;return{points:[ae(t,r,n,i),ae(t,r,n,o)],cx:t,cy:r,radius:n,startAngle:i,endAngle:o}}const ue=require("lodash/isString");var pe=r.n(ue);const fe=require("lodash/isNaN");var de=r.n(fe);const he=require("lodash/isNumber");var ye=r.n(he),me=function(e){return 0===e?0:e>0?1:-1},ve=function(e){return pe()(e)&&e.indexOf("%")===e.length-1},ge=function(e){return ye()(e)&&!de()(e)},be=function(e){return ge(e)||pe()(e)},xe=0,we=function(e){var t=++xe;return"".concat(e||"").concat(t)},Oe=function(e,t){var r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!ge(e)&&!pe()(e))return n;if(ve(e)){var o=e.indexOf("%");r=t*parseFloat(e.slice(0,o))/100}else r=+e;return de()(r)&&(r=n),i&&r>t&&(r=t),r},ke=function(e){if(!e)return null;var t=Object.keys(e);return t&&t.length?e[t[0]]:null},Se=function(e,t){return ge(e)&&ge(t)?function(r){return e+r*(t-e)}:function(){return t}};function je(e,t,r){return e&&e.length?e.find((function(e){return e&&("function"==typeof t?t(e):W()(e,t))===r})):null}var Ae={isSsr:!("undefined"!=typeof window&&window.document&&window.document.createElement&&window.setTimeout),get:function(e){return Ae[e]},set:function(e,t){if("string"==typeof e)Ae[e]=t;else{var r=Object.keys(e);r&&r.length&&r.forEach((function(t){Ae[t]=e[t]}))}}};function Pe(e){return Pe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pe(e)}function Ee(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Te(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ee(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==Pe(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Pe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Pe(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ee(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Ce={widthCache:{},cacheCount:0},Ie={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},De="recharts_measurement_span",Me=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null==e||Ae.isSsr)return{width:0,height:0};var r,n=(r=Te({},t),Object.keys(r).forEach((function(e){r[e]||delete r[e]})),r),i=JSON.stringify({text:e,copyStyle:n});if(Ce.widthCache[i])return Ce.widthCache[i];try{var o=document.getElementById(De);o||((o=document.createElement("span")).setAttribute("id",De),o.setAttribute("aria-hidden","true"),document.body.appendChild(o));var a=Te(Te({},Ie),n);Object.assign(o.style,a),o.textContent="".concat(e);var c=o.getBoundingClientRect(),l={width:c.width,height:c.height};return Ce.widthCache[i]=l,++Ce.cacheCount>2e3&&(Ce.cacheCount=0,Ce.widthCache={}),l}catch(e){return{width:0,height:0}}};const Re=require("lodash/mapValues");var Ne=r.n(Re);const Be=require("victory-vendor/d3-scale"),Le=require("victory-vendor/d3-shape"),_e=require("lodash/max");var ze=r.n(_e);const $e=require("lodash/min");var Fe=r.n($e);const We=require("lodash/flatMap");var Ue=r.n(We);const qe=require("lodash/upperFirst");var Ge=r.n(qe);const He=require("lodash/isEqual");var Xe=r.n(He);const Ke=require("recharts-scale"),Ve=require("lodash/isObject");var Ye=r.n(Ve);const Ze=require("react-is");function Qe(e,t){for(var r in e)if({}.hasOwnProperty.call(e,r)&&(!{}.hasOwnProperty.call(t,r)||e[r]!==t[r]))return!1;for(var n in t)if({}.hasOwnProperty.call(t,n)&&!{}.hasOwnProperty.call(e,n))return!1;return!0}function Je(e){return Je="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Je(e)}var et=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],tt=["points","pathLength"],rt={svg:["viewBox","children"],polygon:tt,polyline:tt},nt=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],it=function(e,t){if(!e||"function"==typeof e||"boolean"==typeof e)return null;var r=e;if((0,m.isValidElement)(e)&&(r=e.props),!Ye()(r))return null;var n={};return Object.keys(r).forEach((function(e){nt.includes(e)&&(n[e]=t||function(t){return r[e](r,t)})})),n},ot=function(e,t,r){if(!Ye()(e)||"object"!==Je(e))return null;var n=null;return Object.keys(e).forEach((function(i){var o=e[i];nt.includes(i)&&"function"==typeof o&&(n||(n={}),n[i]=function(e,t,r){return function(n){return e(t,r,n),null}}(o,t,r))})),n},at=["children"],ct=["children"];function lt(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function st(e){return st="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},st(e)}var ut={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart"},pt=function(e){return"string"==typeof e?e:e?e.displayName||e.name||"Component":""},ft=null,dt=null,ht=function e(t){if(t===ft&&Array.isArray(dt))return dt;var r=[];return m.Children.forEach(t,(function(t){B()(t)||((0,Ze.isFragment)(t)?r=r.concat(e(t.props.children)):r.push(t))})),dt=r,ft=t,r};function yt(e,t){var r=[],n=[];return n=Array.isArray(t)?t.map((function(e){return pt(e)})):[pt(t)],ht(e).forEach((function(e){var t=W()(e,"type.displayName")||W()(e,"type.name");-1!==n.indexOf(t)&&r.push(e)})),r}function mt(e,t){var r=yt(e,t);return r&&r[0]}var vt=function(e){if(!e||!e.props)return!1;var t=e.props,r=t.width,n=t.height;return!(!ge(r)||r<=0||!ge(n)||n<=0)},gt=["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"],bt=function(e){return e&&"object"===st(e)&&"cx"in e&&"cy"in e&&"r"in e},xt=function(e,t,r){if(!e||"function"==typeof e||"boolean"==typeof e)return null;var n=e;if((0,m.isValidElement)(e)&&(n=e.props),!Ye()(n))return null;var i={};return Object.keys(n).forEach((function(e){var o;(function(e,t,r,n){var i,o=null!==(i=null==rt?void 0:rt[n])&&void 0!==i?i:[];return!_()(e)&&(n&&o.includes(t)||et.includes(t))||r&&nt.includes(t)})(null===(o=n)||void 0===o?void 0:o[e],e,t,r)&&(i[e]=n[e])})),i},wt=function e(t,r){if(t===r)return!0;var n=m.Children.count(t);if(n!==m.Children.count(r))return!1;if(0===n)return!0;if(1===n)return Ot(Array.isArray(t)?t[0]:t,Array.isArray(r)?r[0]:r);for(var i=0;i<n;i++){var o=t[i],a=r[i];if(Array.isArray(o)||Array.isArray(a)){if(!e(o,a))return!1}else if(!Ot(o,a))return!1}return!0},Ot=function(e,t){if(B()(e)&&B()(t))return!0;if(!B()(e)&&!B()(t)){var r=e.props||{},n=r.children,i=lt(r,at),o=t.props||{},a=o.children,c=lt(o,ct);return n&&a?Qe(i,c)&&wt(n,a):!n&&!a&&Qe(i,c)}return!1},kt=function(e,t){var r=[],n={};return ht(e).forEach((function(e,i){if(function(e){return e&&e.type&&pe()(e.type)&>.indexOf(e.type)>=0}(e))r.push(e);else if(e){var o=pt(e.type),a=t[o]||{},c=a.handler,l=a.once;if(c&&(!l||!n[o])){var s=c(e,o,i);r.push(s),n[o]=!0}}})),r},St=["children","className"];function jt(){return jt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},jt.apply(this,arguments)}var At=v().forwardRef((function(e,t){var r=e.children,n=e.className,i=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,St),o=Q()("recharts-layer",n);return v().createElement("g",jt({className:o},xt(i,!0),{ref:t}),r)})),Pt=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function Et(){return Et=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Et.apply(this,arguments)}function Tt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Ct(e){var t=e.offset,r=e.layout,n=e.width,i=e.dataKey,o=e.data,a=e.dataPointFormatter,c=e.xAxis,l=e.yAxis,s=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,Pt),u=xt(s),p=o.map((function(e){var o=a(e,i),s=o.x,p=o.y,f=o.value,d=o.errorVal;if(!d)return null;var h,y,m,g,b=[];if(Array.isArray(d)){var x=(g=2,function(e){if(Array.isArray(e))return e}(m=d)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,c=[],l=!0,s=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){s=!0,i=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw i}}return c}}(m,g)||function(e,t){if(e){if("string"==typeof e)return Tt(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Tt(e,t):void 0}}(m,g)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());h=x[0],y=x[1]}else h=y=d;if("vertical"===r){var w=c.scale,O=p+t,k=O+n,S=O-n,j=w(f-h),A=w(f+y);b.push({x1:A,y1:k,x2:A,y2:S}),b.push({x1:j,y1:O,x2:A,y2:O}),b.push({x1:j,y1:k,x2:j,y2:S})}else if("horizontal"===r){var P=l.scale,E=s+t,T=E-n,C=E+n,I=P(f-h),D=P(f+y);b.push({x1:T,y1:D,x2:C,y2:D}),b.push({x1:E,y1:I,x2:E,y2:D}),b.push({x1:T,y1:I,x2:C,y2:I})}return v().createElement(At,Et({className:"recharts-errorBar",key:"bar-".concat(b.map((function(e){return"".concat(e.x1,"-").concat(e.x2,"-").concat(e.y1,"-").concat(e.y2)})))},u),b.map((function(e){return v().createElement("line",Et({},e,{key:"line-".concat(e.x1,"-").concat(e.x2,"-").concat(e.y1,"-").concat(e.y2)}))})))}));return v().createElement(At,{className:"recharts-errorBars"},p)}Ct.defaultProps={stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"},Ct.displayName="ErrorBar";var It=function(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),i=2;i<r;i++)n[i-2]=arguments[i]},Dt=["children","width","height","viewBox","className","style","title","desc"];function Mt(){return Mt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Mt.apply(this,arguments)}function Rt(e){var t=e.children,r=e.width,n=e.height,i=e.viewBox,o=e.className,a=e.style,c=e.title,l=e.desc,s=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,Dt),u=i||{width:r,height:n,x:0,y:0},p=Q()("recharts-surface",o);return v().createElement("svg",Mt({},xt(s,!0,"svg"),{className:p,width:r,height:n,style:a,viewBox:"".concat(u.x," ").concat(u.y," ").concat(u.width," ").concat(u.height)}),v().createElement("title",null,c),v().createElement("desc",null,l),t)}function Nt(e){return Nt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Nt(e)}var Bt=["type","size","sizeType"];function Lt(){return Lt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Lt.apply(this,arguments)}function _t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function zt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_t(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==Nt(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Nt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Nt(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_t(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var $t={symbolCircle:Le.symbolCircle,symbolCross:Le.symbolCross,symbolDiamond:Le.symbolDiamond,symbolSquare:Le.symbolSquare,symbolStar:Le.symbolStar,symbolTriangle:Le.symbolTriangle,symbolWye:Le.symbolWye},Ft=Math.PI/180,Wt=function(e){var t,r,n=e.type,i=void 0===n?"circle":n,o=e.size,a=void 0===o?64:o,c=e.sizeType,l=void 0===c?"area":c,s=zt(zt({},function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,Bt)),{},{type:i,size:a,sizeType:l}),u=s.className,p=s.cx,f=s.cy,d=xt(s,!0);return p===+p&&f===+f&&a===+a?v().createElement("path",Lt({},d,{className:Q()("recharts-symbols",u),transform:"translate(".concat(p,", ").concat(f,")"),d:(t=function(e){var t="symbol".concat(Ge()(e));return $t[t]||Le.symbolCircle}(i),r=(0,Le.symbol)().type(t).size(function(e,t,r){if("area"===t)return e;switch(r){case"cross":return 5*e*e/9;case"diamond":return.5*e*e/Math.sqrt(3);case"square":return e*e;case"star":var n=18*Ft;return 1.25*e*e*(Math.tan(n)-Math.tan(2*n)*Math.pow(Math.tan(n),2));case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}}(a,l,i)),r())})):null};function Ut(e){return Ut="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ut(e)}function qt(){return qt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},qt.apply(this,arguments)}function Gt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ht(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Yt(n.key),n)}}function Xt(e,t){return Xt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Xt(e,t)}function Kt(e){return Kt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Kt(e)}function Vt(e,t,r){return(t=Yt(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Yt(e){var t=function(e,t){if("object"!==Ut(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Ut(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Ut(t)?t:String(t)}Wt.registerSymbol=function(e,t){$t["symbol".concat(Ge()(e))]=t};var Zt=32,Qt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Xt(e,t)}(a,e);var t,r,n,i,o=(n=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Kt(n);if(i){var r=Kt(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Ut(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function a(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),o.apply(this,arguments)}return t=a,r=[{key:"renderIcon",value:function(e){var t=this.props.inactiveColor,r=16,n=Zt/6,i=Zt/3,o=e.inactive?t:e.color;if("plainline"===e.type)return v().createElement("line",{strokeWidth:4,fill:"none",stroke:o,strokeDasharray:e.payload.strokeDasharray,x1:0,y1:r,x2:Zt,y2:r,className:"recharts-legend-icon"});if("line"===e.type)return v().createElement("path",{strokeWidth:4,fill:"none",stroke:o,d:"M0,".concat(r,"h").concat(i,"\n A").concat(n,",").concat(n,",0,1,1,").concat(2*i,",").concat(r,"\n H").concat(Zt,"M").concat(2*i,",").concat(r,"\n A").concat(n,",").concat(n,",0,1,1,").concat(i,",").concat(r),className:"recharts-legend-icon"});if("rect"===e.type)return v().createElement("path",{stroke:"none",fill:o,d:"M0,".concat(4,"h").concat(Zt,"v").concat(24,"h").concat(-32,"z"),className:"recharts-legend-icon"});if(v().isValidElement(e.legendIcon)){var a=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Gt(Object(r),!0).forEach((function(t){Vt(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Gt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e);return delete a.legendIcon,v().cloneElement(e.legendIcon,a)}return v().createElement(Wt,{fill:o,cx:r,cy:r,size:Zt,sizeType:"diameter",type:e.type})}},{key:"renderItems",value:function(){var e=this,t=this.props,r=t.payload,n=t.iconSize,i=t.layout,o=t.formatter,a=t.inactiveColor,c={x:0,y:0,width:Zt,height:Zt},l={display:"horizontal"===i?"inline-block":"block",marginRight:10},s={display:"inline-block",verticalAlign:"middle",marginRight:4};return r.map((function(t,r){var i,u=t.formatter||o,p=Q()((Vt(i={"recharts-legend-item":!0},"legend-item-".concat(r),!0),Vt(i,"inactive",t.inactive),i));if("none"===t.type)return null;var f=_()(t.value)?null:t.value;It(!_()(t.value),'The name property is also required when using a function for the dataKey of a chart\'s cartesian components. Ex: <Bar name="Name of my Data"/>');var d=t.inactive?a:t.color;return v().createElement("li",qt({className:p,style:l,key:"legend-item-".concat(r)},ot(e.props,t,r)),v().createElement(Rt,{width:n,height:n,viewBox:c,style:s},e.renderIcon(t)),v().createElement("span",{className:"recharts-legend-item-text",style:{color:d}},u?u(f,t,r):f))}))}},{key:"render",value:function(){var e=this.props,t=e.payload,r=e.layout,n=e.align;if(!t||!t.length)return null;var i={padding:0,margin:0,textAlign:"horizontal"===r?n:"left"};return v().createElement("ul",{className:"recharts-default-legend",style:i},this.renderItems())}}],r&&Ht(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),a}(m.PureComponent);Vt(Qt,"displayName","Legend"),Vt(Qt,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});const Jt=require("lodash/uniqBy");var er=r.n(Jt);function tr(e,t,r){return!0===t?er()(e,r):_()(t)?er()(e,t):e}function rr(e){return rr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rr(e)}var nr=["ref"];function ir(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function or(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ir(Object(r),!0).forEach((function(t){ur(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ir(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ar(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,pr(n.key),n)}}function cr(e,t){return cr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},cr(e,t)}function lr(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function sr(e){return sr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},sr(e)}function ur(e,t,r){return(t=pr(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function pr(e){var t=function(e,t){if("object"!==rr(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==rr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===rr(t)?t:String(t)}function fr(e){return e.value}var dr=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&cr(e,t)}(c,e);var t,r,n,i,o,a=(i=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=sr(i);if(o){var r=sr(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===rr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return lr(e)}(this,e)});function c(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ur(lr(e=a.call.apply(a,[this].concat(r))),"lastBoundingBox",{width:-1,height:-1}),e}return t=c,n=[{key:"getWithHeight",value:function(e,t){var r=e.props.layout;return"vertical"===r&&ge(e.props.height)?{height:e.props.height}:"horizontal"===r?{width:e.props.width||t}:null}}],(r=[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){return this.wrapperNode&&this.wrapperNode.getBoundingClientRect?this.wrapperNode.getBoundingClientRect():null}},{key:"updateBBox",value:function(){var e=this.props.onBBoxUpdate;if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var t=this.wrapperNode.getBoundingClientRect();(Math.abs(t.width-this.lastBoundingBox.width)>1||Math.abs(t.height-this.lastBoundingBox.height)>1)&&(this.lastBoundingBox.width=t.width,this.lastBoundingBox.height=t.height,e&&e(t))}else-1===this.lastBoundingBox.width&&-1===this.lastBoundingBox.height||(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,e&&e(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?or({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(e){var t,r,n=this.props,i=n.layout,o=n.align,a=n.verticalAlign,c=n.margin,l=n.chartWidth,s=n.chartHeight;return e&&(void 0!==e.left&&null!==e.left||void 0!==e.right&&null!==e.right)||(t="center"===o&&"vertical"===i?{left:((l||0)-this.getBBoxSnapshot().width)/2}:"right"===o?{right:c&&c.right||0}:{left:c&&c.left||0}),e&&(void 0!==e.top&&null!==e.top||void 0!==e.bottom&&null!==e.bottom)||(r="middle"===a?{top:((s||0)-this.getBBoxSnapshot().height)/2}:"bottom"===a?{bottom:c&&c.bottom||0}:{top:c&&c.top||0}),or(or({},t),r)}},{key:"render",value:function(){var e=this,t=this.props,r=t.content,n=t.width,i=t.height,o=t.wrapperStyle,a=t.payloadUniqBy,c=t.payload,l=or(or({position:"absolute",width:n||"auto",height:i||"auto"},this.getDefaultPosition(o)),o);return v().createElement("div",{className:"recharts-legend-wrapper",style:l,ref:function(t){e.wrapperNode=t}},function(e,t){if(v().isValidElement(e))return v().cloneElement(e,t);if("function"==typeof e)return v().createElement(e,t);t.ref;var r=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(t,nr);return v().createElement(Qt,r)}(r,or(or({},this.props),{},{payload:tr(c,a,fr)})))}}])&&ar(t.prototype,r),n&&ar(t,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(m.PureComponent);function hr(e){return hr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},hr(e)}function yr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function mr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?yr(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==hr(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==hr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===hr(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}ur(dr,"displayName","Legend"),ur(dr,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var vr=function(e){var t,r=e.children,n=e.formattedGraphicalItems,i=e.legendWidth,o=e.legendContent,a=mt(r,dr);return a?(t=a.props&&a.props.payload?a.props&&a.props.payload:"children"===o?(n||[]).reduce((function(e,t){var r=t.item,n=t.props,i=n.sectors||n.data||[];return e.concat(i.map((function(e){return{type:a.props.iconType||r.props.legendType,value:e.name,color:e.fill,payload:e}})))}),[]):(n||[]).map((function(e){var t=e.item,r=t.props,n=r.dataKey,i=r.name,o=r.legendType;return{inactive:r.hide,dataKey:n,type:a.props.iconType||o||"square",color:Ar(t),value:i||n,payload:t.props}})),mr(mr(mr({},a.props),dr.getWithHeight(a,i)),{},{payload:t,item:a})):null};function gr(e){return gr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gr(e)}function br(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function xr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?br(Object(r),!0).forEach((function(t){wr(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):br(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function wr(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==gr(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==gr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===gr(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Or(e){return function(e){if(Array.isArray(e))return kr(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return kr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?kr(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function kr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Sr(e,t,r){return B()(e)||B()(t)?r:be(t)?W()(e,t,r):_()(t)?t(e):r}function jr(e,t,r,n){var i=Ue()(e,(function(e){return Sr(e,t)}));if("number"===r){var o=i.filter((function(e){return ge(e)||parseFloat(e)}));return o.length?[Fe()(o),ze()(o)]:[1/0,-1/0]}return(n?i.filter((function(e){return!B()(e)})):i).map((function(e){return be(e)||e instanceof Date?e:""}))}var Ar=function(e){var t,r=e.type.displayName,n=e.props,i=n.stroke,o=n.fill;switch(r){case"Line":t=i;break;case"Area":case"Radar":t=i&&"none"!==i?i:o;break;default:t=o}return t},Pr=function(e,t,r,n,i){var o=yt(t.props.children,Ct).filter((function(e){return function(e,t,r){return!!B()(t)||("horizontal"===e?"yAxis"===t:"vertical"===e||"x"===r?"xAxis"===t:"y"!==r||"yAxis"===t)}(n,i,e.props.direction)}));if(o&&o.length){var a=o.map((function(e){return e.props.dataKey}));return e.reduce((function(e,t){var n=Sr(t,r,0),i=Array.isArray(n)?[Fe()(n),ze()(n)]:[n,n],o=a.reduce((function(e,r){var n=Sr(t,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,e[0]),Math.max(a,e[1])]}),[1/0,-1/0]);return[Math.min(o[0],e[0]),Math.max(o[1],e[1])]}),[1/0,-1/0])}return null},Er=function(e,t,r,n,i){var o=t.map((function(t){var o=t.props.dataKey;return"number"===r&&o&&Pr(e,t,o,n)||jr(e,o,r,i)}));if("number"===r)return o.reduce((function(e,t){return[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}),[1/0,-1/0]);var a={};return o.reduce((function(e,t){for(var r=0,n=t.length;r<n;r++)a[t[r]]||(a[t[r]]=!0,e.push(t[r]));return e}),[])},Tr=function(e,t){return"horizontal"===e&&"xAxis"===t||"vertical"===e&&"yAxis"===t||"centric"===e&&"angleAxis"===t||"radial"===e&&"radiusAxis"===t},Cr=function(e,t,r,n){if(n)return e.map((function(e){return e.coordinate}));var i,o,a=e.map((function(e){return e.coordinate===t&&(i=!0),e.coordinate===r&&(o=!0),e.coordinate}));return i||a.push(t),o||a.push(r),a},Ir=function(e,t,r){if(!e)return null;var n=e.scale,i=e.duplicateDomain,o=e.type,a=e.range,c="scaleBand"===e.realScaleType?n.bandwidth()/2:2,l=(t||r)&&"category"===o&&n.bandwidth?n.bandwidth()/c:0;return l="angleAxis"===e.axisType&&(null==a?void 0:a.length)>=2?2*me(a[0]-a[1])*l:l,t&&(e.ticks||e.niceTicks)?(e.ticks||e.niceTicks).map((function(e){var t=i?i.indexOf(e):e;return{coordinate:n(t)+l,value:e,offset:l}})).filter((function(e){return!de()(e.coordinate)})):e.isCategorical&&e.categoricalDomain?e.categoricalDomain.map((function(e,t){return{coordinate:n(e)+l,value:e,index:t,offset:l}})):n.ticks&&!r?n.ticks(e.tickCount).map((function(e){return{coordinate:n(e)+l,value:e,offset:l}})):n.domain().map((function(e,t){return{coordinate:n(e)+l,value:i?i[e]:e,index:t,offset:l}}))},Dr=new WeakMap,Mr=function(e,t){if("function"!=typeof t)return e;Dr.has(e)||Dr.set(e,new WeakMap);var r=Dr.get(e);if(r.has(t))return r.get(t);var n=function(){e.apply(void 0,arguments),t.apply(void 0,arguments)};return r.set(t,n),n},Rr=1e-4,Nr={sign:function(e){var t=e.length;if(!(t<=0))for(var r=0,n=e[0].length;r<n;++r)for(var i=0,o=0,a=0;a<t;++a){var c=de()(e[a][r][1])?e[a][r][0]:e[a][r][1];c>=0?(e[a][r][0]=i,e[a][r][1]=i+c,i=e[a][r][1]):(e[a][r][0]=o,e[a][r][1]=o+c,o=e[a][r][1])}},expand:Le.stackOffsetExpand,none:Le.stackOffsetNone,silhouette:Le.stackOffsetSilhouette,wiggle:Le.stackOffsetWiggle,positive:function(e){var t=e.length;if(!(t<=0))for(var r=0,n=e[0].length;r<n;++r)for(var i=0,o=0;o<t;++o){var a=de()(e[o][r][1])?e[o][r][0]:e[o][r][1];a>=0?(e[o][r][0]=i,e[o][r][1]=i+a,i=e[o][r][1]):(e[o][r][0]=0,e[o][r][1]=0)}}},Br=function(e,t,r){var n=t.map((function(e){return e.props.dataKey})),i=Nr[r];return(0,Le.stack)().keys(n).value((function(e,t){return+Sr(e,t,0)})).order(Le.stackOrderNone).offset(i)(e)},Lr=function(e){var t=e.axis,r=e.ticks,n=e.bandSize,i=e.entry,o=e.index,a=e.dataKey;if("category"===t.type){if(!t.allowDuplicatedCategory&&t.dataKey&&!B()(i[t.dataKey])){var c=je(r,"value",i[t.dataKey]);if(c)return c.coordinate+n/2}return r[o]?r[o].coordinate+n/2:null}var l=Sr(i,B()(a)?t.dataKey:a);return B()(l)?null:t.scale(l)},_r=function(e){var t=e.axis,r=e.ticks,n=e.offset,i=e.bandSize,o=e.entry,a=e.index;if("category"===t.type)return r[a]?r[a].coordinate+n:null;var c=Sr(o,t.dataKey,t.domain[a]);return B()(c)?null:t.scale(c)-i/2+n},zr=function(e,t,r){return Object.keys(e).reduce((function(n,i){var o=e[i].stackedData.reduce((function(e,n){var i=n.slice(t,r+1).reduce((function(e,t){return[Fe()(t.concat([e[0]]).filter(ge)),ze()(t.concat([e[1]]).filter(ge))]}),[1/0,-1/0]);return[Math.min(e[0],i[0]),Math.max(e[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(e){return e===1/0||e===-1/0?0:e}))},$r=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Fr=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Wr=function(e,t,r){if(_()(e))return e(t,r);if(!Array.isArray(e))return t;var n=[];if(ge(e[0]))n[0]=r?e[0]:Math.min(e[0],t[0]);else if($r.test(e[0])){var i=+$r.exec(e[0])[1];n[0]=t[0]-i}else _()(e[0])?n[0]=e[0](t[0]):n[0]=t[0];if(ge(e[1]))n[1]=r?e[1]:Math.max(e[1],t[1]);else if(Fr.test(e[1])){var o=+Fr.exec(e[1])[1];n[1]=t[1]+o}else _()(e[1])?n[1]=e[1](t[1]):n[1]=t[1];return n},Ur=function(e,t,r){if(e&&e.scale&&e.scale.bandwidth){var n=e.scale.bandwidth();if(!r||n>0)return n}if(e&&t&&t.length>=2){for(var i=q()(t,(function(e){return e.coordinate})),o=1/0,a=1,c=i.length;a<c;a++){var l=i[a],s=i[a-1];o=Math.min((l.coordinate||0)-(s.coordinate||0),o)}return o===1/0?0:o}return r?void 0:0},qr=function(e,t,r){return e&&e.length?Xe()(e,W()(r,"type.defaultProps.domain"))?t:e:t},Gr=function(e,t){var r=e.props,n=r.dataKey,i=r.name,o=r.unit,a=r.formatter,c=r.tooltipType,l=r.chartType;return xr(xr({},xt(e)),{},{dataKey:n,unit:o,formatter:a,name:i||n,color:Ar(e),value:Sr(t,n),type:c,payload:t,chartType:l})};const Hr=require("react-smooth");var Xr=r.n(Hr),Kr=function(e){return null};Kr.displayName="Cell";const Vr=require("lodash/last");var Yr=r.n(Vr);function Zr(e){return Zr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Zr(e)}function Qr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,c=[],l=!0,s=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){s=!0,i=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw i}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Jr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Jr(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Jr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function en(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(void 0,i=function(e,t){if("object"!==Zr(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Zr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(n.key),"symbol"===Zr(i)?i:String(i)),n)}var i}var tn=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,rn=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,nn=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,on=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,an={cm:96/2.54,mm:96/25.4,pt:96/72,pc:16,in:96,Q:96/101.6,px:1},cn=Object.keys(an),ln="NaN",sn=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.num=t,this.unit=r,this.num=t,this.unit=r,Number.isNaN(t)&&(this.unit=""),""===r||nn.test(r)||(this.num=NaN,this.unit=""),cn.includes(r)&&(this.num=function(e,t){return e*an[t]}(t,r),this.unit="px")}var t,r,n;return t=e,n=[{key:"parse",value:function(t){var r,n=Qr(null!==(r=on.exec(t))&&void 0!==r?r:[],3),i=n[1],o=n[2];return new e(parseFloat(i),null!=o?o:"")}}],(r=[{key:"add",value:function(t){return this.unit!==t.unit?new e(NaN,""):new e(this.num+t.num,this.unit)}},{key:"subtract",value:function(t){return this.unit!==t.unit?new e(NaN,""):new e(this.num-t.num,this.unit)}},{key:"multiply",value:function(t){return""!==this.unit&&""!==t.unit&&this.unit!==t.unit?new e(NaN,""):new e(this.num*t.num,this.unit||t.unit)}},{key:"divide",value:function(t){return""!==this.unit&&""!==t.unit&&this.unit!==t.unit?new e(NaN,""):new e(this.num/t.num,this.unit||t.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}])&&en(t.prototype,r),n&&en(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function un(e){if(e.includes(ln))return ln;for(var t=e;t.includes("*")||t.includes("/");){var r,n=Qr(null!==(r=tn.exec(t))&&void 0!==r?r:[],4),i=n[1],o=n[2],a=n[3],c=sn.parse(null!=i?i:""),l=sn.parse(null!=a?a:""),s="*"===o?c.multiply(l):c.divide(l);if(s.isNaN())return ln;t=t.replace(tn,s.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var u,p=Qr(null!==(u=rn.exec(t))&&void 0!==u?u:[],4),f=p[1],d=p[2],h=p[3],y=sn.parse(null!=f?f:""),m=sn.parse(null!=h?h:""),v="+"===d?y.add(m):y.subtract(m);if(v.isNaN())return ln;t=t.replace(rn,v.toString())}return t}var pn=/\(([^()]*)\)/;function fn(e){var t=function(e){try{return function(e){var t=e.replace(/\s+/g,"");return t=function(e){for(var t=e;t.includes("(");){var r=Qr(pn.exec(t),2)[1];t=t.replace(pn,un(r))}return t}(t),un(t)}(e)}catch(e){return ln}}(e.slice(5,-1));return t===ln?"":t}var dn=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],hn=["dx","dy","angle","className","breakAll"];function yn(){return yn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},yn.apply(this,arguments)}function mn(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function vn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,c=[],l=!0,s=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){s=!0,i=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw i}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return gn(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?gn(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function gn(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var bn=/[ \f\n\r\t\v\u2028\u2029]+/,xn=function(e){var t=e.children,r=e.breakAll,n=e.style;try{var i=[];return B()(t)||(i=r?t.toString().split(""):t.toString().split(bn)),{wordsWithComputedWidth:i.map((function(e){return{word:e,width:Me(e,n).width}})),spaceWidth:r?0:Me(" ",n).width}}catch(e){return null}},wn=function(e){return[{words:B()(e)?[]:e.toString().split(bn)}]},On="#808080",kn=function(e){var t=e.x,r=void 0===t?0:t,n=e.y,i=void 0===n?0:n,o=e.lineHeight,a=void 0===o?"1em":o,c=e.capHeight,l=void 0===c?"0.71em":c,s=e.scaleToFit,u=void 0!==s&&s,p=e.textAnchor,f=void 0===p?"start":p,d=e.verticalAnchor,h=void 0===d?"end":d,y=e.fill,g=void 0===y?On:y,b=mn(e,dn),x=(0,m.useMemo)((function(){return function(e){var t=e.width,r=e.scaleToFit,n=e.children,i=e.style,o=e.breakAll,a=e.maxLines;if((t||r)&&!Ae.isSsr){var c=xn({breakAll:o,children:n,style:i});return c?function(e,t,r,n,i){var o=e.maxLines,a=e.children,c=e.style,l=e.breakAll,s=ge(o),u=a,p=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce((function(e,t){var o=t.word,a=t.width,c=e[e.length-1];if(c&&(null==n||i||c.width+a+r<Number(n)))c.words.push(o),c.width+=a+r;else{var l={words:[o],width:a};e.push(l)}return e}),[])},f=p(t);if(!s)return f;for(var d,h=function(e){var t=u.slice(0,e),r=xn({breakAll:l,style:c,children:t+"…"}).wordsWithComputedWidth,i=p(r),a=i.length>o||function(e){return e.reduce((function(e,t){return e.width>t.width?e:t}))}(i).width>Number(n);return[a,i]},y=0,m=u.length-1,v=0;y<=m&&v<=u.length-1;){var g=Math.floor((y+m)/2),b=vn(h(g-1),2),x=b[0],w=b[1],O=vn(h(g),1)[0];if(x||O||(y=g+1),x&&O&&(m=g-1),!x&&O){d=w;break}v++}return d||f}({breakAll:o,children:n,maxLines:a,style:i},c.wordsWithComputedWidth,c.spaceWidth,t,r):wn(n)}return wn(n)}({breakAll:b.breakAll,children:b.children,maxLines:b.maxLines,scaleToFit:u,style:b.style,width:b.width})}),[b.breakAll,b.children,b.maxLines,u,b.style,b.width]),w=b.dx,O=b.dy,k=b.angle,S=b.className,j=b.breakAll,A=mn(b,hn);if(!be(r)||!be(i))return null;var P,E=r+(ge(w)?w:0),T=i+(ge(O)?O:0);switch(h){case"start":P=fn("calc(".concat(l,")"));break;case"middle":P=fn("calc(".concat((x.length-1)/2," * -").concat(a," + (").concat(l," / 2))"));break;default:P=fn("calc(".concat(x.length-1," * -").concat(a,")"))}var C=[];if(u){var I=x[0].width,D=b.width;C.push("scale(".concat((ge(D)?D/I:1)/I,")"))}return k&&C.push("rotate(".concat(k,", ").concat(E,", ").concat(T,")")),C.length&&(A.transform=C.join(" ")),v().createElement("text",yn({},xt(A,!0),{x:E,y:T,className:Q()("recharts-text",S),textAnchor:f,fill:g.includes("url")?On:g}),x.map((function(e,t){var r=e.words.join(j?"":" ");return v().createElement("tspan",{x:E,dy:0===t?P:a,key:r},r)})))};function Sn(e){return Sn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Sn(e)}var jn=["offset"];function An(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Pn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function En(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Pn(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==Sn(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Sn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Sn(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Pn(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Tn(){return Tn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Tn.apply(this,arguments)}var Cn=function(e){var t=e.value,r=e.formatter,n=B()(e.children)?t:e.children;return _()(r)?r(n):n},In=function(e,t,r){var n,i,o=e.position,a=e.viewBox,c=e.offset,l=e.className,s=a,u=s.cx,p=s.cy,f=s.innerRadius,d=s.outerRadius,h=s.startAngle,y=s.endAngle,m=s.clockWise,g=(f+d)/2,b=function(e,t){return me(t-e)*Math.min(Math.abs(t-e),360)}(h,y),x=b>=0?1:-1;"insideStart"===o?(n=h+x*c,i=m):"insideEnd"===o?(n=y-x*c,i=!m):"end"===o&&(n=y+x*c,i=m),i=b<=0?i:!i;var w=ae(u,p,g,n),O=ae(u,p,g,n+359*(i?1:-1)),k="M".concat(w.x,",").concat(w.y,"\n A").concat(g,",").concat(g,",0,1,").concat(i?0:1,",\n ").concat(O.x,",").concat(O.y),S=B()(e.id)?we("recharts-radial-line-"):e.id;return v().createElement("text",Tn({},r,{dominantBaseline:"central",className:Q()("recharts-radial-bar-label",l)}),v().createElement("defs",null,v().createElement("path",{id:S,d:k})),v().createElement("textPath",{xlinkHref:"#".concat(S)},t))},Dn=function(e){var t=e.viewBox,r=e.offset,n=e.position,i=t,o=i.cx,a=i.cy,c=i.innerRadius,l=i.outerRadius,s=(i.startAngle+i.endAngle)/2;if("outside"===n){var u=ae(o,a,l+r,s),p=u.x;return{x:p,y:u.y,textAnchor:p>=o?"start":"end",verticalAnchor:"middle"}}if("center"===n)return{x:o,y:a,textAnchor:"middle",verticalAnchor:"middle"};if("centerTop"===n)return{x:o,y:a,textAnchor:"middle",verticalAnchor:"start"};if("centerBottom"===n)return{x:o,y:a,textAnchor:"middle",verticalAnchor:"end"};var f=ae(o,a,(c+l)/2,s);return{x:f.x,y:f.y,textAnchor:"middle",verticalAnchor:"middle"}},Mn=function(e){var t=e.viewBox,r=e.parentViewBox,n=e.offset,i=e.position,o=t,a=o.x,c=o.y,l=o.width,s=o.height,u=s>=0?1:-1,p=u*n,f=u>0?"end":"start",d=u>0?"start":"end",h=l>=0?1:-1,y=h*n,m=h>0?"end":"start",v=h>0?"start":"end";if("top"===i)return En(En({},{x:a+l/2,y:c-u*n,textAnchor:"middle",verticalAnchor:f}),r?{height:Math.max(c-r.y,0),width:l}:{});if("bottom"===i)return En(En({},{x:a+l/2,y:c+s+p,textAnchor:"middle",verticalAnchor:d}),r?{height:Math.max(r.y+r.height-(c+s),0),width:l}:{});if("left"===i){var g={x:a-y,y:c+s/2,textAnchor:m,verticalAnchor:"middle"};return En(En({},g),r?{width:Math.max(g.x-r.x,0),height:s}:{})}if("right"===i){var b={x:a+l+y,y:c+s/2,textAnchor:v,verticalAnchor:"middle"};return En(En({},b),r?{width:Math.max(r.x+r.width-b.x,0),height:s}:{})}var x=r?{width:l,height:s}:{};return"insideLeft"===i?En({x:a+y,y:c+s/2,textAnchor:v,verticalAnchor:"middle"},x):"insideRight"===i?En({x:a+l-y,y:c+s/2,textAnchor:m,verticalAnchor:"middle"},x):"insideTop"===i?En({x:a+l/2,y:c+p,textAnchor:"middle",verticalAnchor:d},x):"insideBottom"===i?En({x:a+l/2,y:c+s-p,textAnchor:"middle",verticalAnchor:f},x):"insideTopLeft"===i?En({x:a+y,y:c+p,textAnchor:v,verticalAnchor:d},x):"insideTopRight"===i?En({x:a+l-y,y:c+p,textAnchor:m,verticalAnchor:d},x):"insideBottomLeft"===i?En({x:a+y,y:c+s-p,textAnchor:v,verticalAnchor:f},x):"insideBottomRight"===i?En({x:a+l-y,y:c+s-p,textAnchor:m,verticalAnchor:f},x):Ye()(i)&&(ge(i.x)||ve(i.x))&&(ge(i.y)||ve(i.y))?En({x:a+Oe(i.x,l),y:c+Oe(i.y,s),textAnchor:"end",verticalAnchor:"end"},x):En({x:a+l/2,y:c+s/2,textAnchor:"middle",verticalAnchor:"middle"},x)},Rn=function(e){return"cx"in e&&ge(e.cx)};function Nn(e){var t,r=e.offset,n=En({offset:void 0===r?5:r},function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,jn)),i=n.viewBox,o=n.position,a=n.value,c=n.children,l=n.content,s=n.className,u=void 0===s?"":s,p=n.textBreakAll;if(!i||B()(a)&&B()(c)&&!(0,m.isValidElement)(l)&&!_()(l))return null;if((0,m.isValidElement)(l))return(0,m.cloneElement)(l,n);if(_()(l)){if(t=(0,m.createElement)(l,n),(0,m.isValidElement)(t))return t}else t=Cn(n);var f=Rn(i),d=xt(n,!0);if(f&&("insideStart"===o||"insideEnd"===o||"end"===o))return In(n,t,d);var h=f?Dn(n):Mn(n);return v().createElement(kn,Tn({className:Q()("recharts-label",u)},d,h,{breakAll:p}),t)}Nn.displayName="Label";var Bn=function(e){var t=e.cx,r=e.cy,n=e.angle,i=e.startAngle,o=e.endAngle,a=e.r,c=e.radius,l=e.innerRadius,s=e.outerRadius,u=e.x,p=e.y,f=e.top,d=e.left,h=e.width,y=e.height,m=e.clockWise,v=e.labelViewBox;if(v)return v;if(ge(h)&&ge(y)){if(ge(u)&&ge(p))return{x:u,y:p,width:h,height:y};if(ge(f)&&ge(d))return{x:f,y:d,width:h,height:y}}return ge(u)&&ge(p)?{x:u,y:p,width:0,height:0}:ge(t)&&ge(r)?{cx:t,cy:r,startAngle:i||n||0,endAngle:o||n||0,innerRadius:l||0,outerRadius:s||c||a||0,clockWise:m}:e.viewBox?e.viewBox:{}};function Ln(e){return Ln="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ln(e)}Nn.parseViewBox=Bn,Nn.renderCallByParent=function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!e||!e.children&&r&&!e.label)return null;var n=e.children,i=Bn(e),o=yt(n,Nn).map((function(e,r){return(0,m.cloneElement)(e,{viewBox:t||i,key:"label-".concat(r)})}));if(!r)return o;var a,c=function(e,t){return e?!0===e?v().createElement(Nn,{key:"label-implicit",viewBox:t}):be(e)?v().createElement(Nn,{key:"label-implicit",viewBox:t,value:e}):(0,m.isValidElement)(e)?e.type===Nn?(0,m.cloneElement)(e,{key:"label-implicit",viewBox:t}):v().createElement(Nn,{key:"label-implicit",content:e,viewBox:t}):_()(e)?v().createElement(Nn,{key:"label-implicit",content:e,viewBox:t}):Ye()(e)?v().createElement(Nn,Tn({viewBox:t},e,{key:"label-implicit"})):null:null}(e.label,t||i);return[c].concat(function(e){if(Array.isArray(e))return An(e)}(a=o)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(a)||function(e,t){if(e){if("string"==typeof e)return An(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?An(e,t):void 0}}(a)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())};var _n=["valueAccessor"],zn=["data","dataKey","clockWise","id","textBreakAll"];function $n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Fn(){return Fn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Fn.apply(this,arguments)}function Wn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Un(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Wn(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==Ln(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Ln(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Ln(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Wn(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function qn(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var Gn=function(e){return Array.isArray(e.value)?Yr()(e.value):e.value};function Hn(e){var t=e.valueAccessor,r=void 0===t?Gn:t,n=qn(e,_n),i=n.data,o=n.dataKey,a=n.clockWise,c=n.id,l=n.textBreakAll,s=qn(n,zn);return i&&i.length?v().createElement(At,{className:"recharts-label-list"},i.map((function(e,t){var n=B()(o)?r(e,t):Sr(e&&e.payload,o),i=B()(c)?{}:{id:"".concat(c,"-").concat(t)};return v().createElement(Nn,Fn({},xt(e,!0),s,i,{parentViewBox:e.parentViewBox,value:n,textBreakAll:l,viewBox:Nn.parseViewBox(B()(a)?e:Un(Un({},e),{},{clockWise:a})),key:"label-".concat(t),index:t}))}))):null}Hn.displayName="LabelList",Hn.renderCallByParent=function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!e||!e.children&&r&&!e.label)return null;var n,i=yt(e.children,Hn).map((function(e,r){return(0,m.cloneElement)(e,{data:t,key:"labelList-".concat(r)})}));return r?[function(e,t){return e?!0===e?v().createElement(Hn,{key:"labelList-implicit",data:t}):v().isValidElement(e)||_()(e)?v().createElement(Hn,{key:"labelList-implicit",data:t,content:e}):Ye()(e)?v().createElement(Hn,Fn({data:t},e,{key:"labelList-implicit"})):null:null}(e.label,t)].concat(function(e){if(Array.isArray(e))return $n(e)}(n=i)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,t){if(e){if("string"==typeof e)return $n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?$n(e,t):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()):i};const Xn=require("lodash/isPlainObject");var Kn=r.n(Xn);const Vn=require("lodash/isBoolean");var Yn=r.n(Vn);function Zn(e){return Zn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Zn(e)}function Qn(){return Qn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Qn.apply(this,arguments)}function Jn(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function ei(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ti(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ei(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==Zn(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Zn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Zn(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ei(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ri=function(e,t,r,n,i){var o,a=Math.min(Math.abs(r)/2,Math.abs(n)/2),c=n>=0?1:-1,l=r>=0?1:-1,s=n>=0&&r>=0||n<0&&r<0?1:0;if(a>0&&i instanceof Array){for(var u=[0,0,0,0],p=0;p<4;p++)u[p]=i[p]>a?a:i[p];o="M".concat(e,",").concat(t+c*u[0]),u[0]>0&&(o+="A ".concat(u[0],",").concat(u[0],",0,0,").concat(s,",").concat(e+l*u[0],",").concat(t)),o+="L ".concat(e+r-l*u[1],",").concat(t),u[1]>0&&(o+="A ".concat(u[1],",").concat(u[1],",0,0,").concat(s,",\n ").concat(e+r,",").concat(t+c*u[1])),o+="L ".concat(e+r,",").concat(t+n-c*u[2]),u[2]>0&&(o+="A ".concat(u[2],",").concat(u[2],",0,0,").concat(s,",\n ").concat(e+r-l*u[2],",").concat(t+n)),o+="L ".concat(e+l*u[3],",").concat(t+n),u[3]>0&&(o+="A ".concat(u[3],",").concat(u[3],",0,0,").concat(s,",\n ").concat(e,",").concat(t+n-c*u[3])),o+="Z"}else if(a>0&&i===+i&&i>0){var f=Math.min(a,i);o="M ".concat(e,",").concat(t+c*f,"\n A ").concat(f,",").concat(f,",0,0,").concat(s,",").concat(e+l*f,",").concat(t,"\n L ").concat(e+r-l*f,",").concat(t,"\n A ").concat(f,",").concat(f,",0,0,").concat(s,",").concat(e+r,",").concat(t+c*f,"\n L ").concat(e+r,",").concat(t+n-c*f,"\n A ").concat(f,",").concat(f,",0,0,").concat(s,",").concat(e+r-l*f,",").concat(t+n,"\n L ").concat(e+l*f,",").concat(t+n,"\n A ").concat(f,",").concat(f,",0,0,").concat(s,",").concat(e,",").concat(t+n-c*f," Z")}else o="M ".concat(e,",").concat(t," h ").concat(r," v ").concat(n," h ").concat(-r," Z");return o},ni=function(e,t){if(!e||!t)return!1;var r=e.x,n=e.y,i=t.x,o=t.y,a=t.width,c=t.height;if(Math.abs(a)>0&&Math.abs(c)>0){var l=Math.min(i,i+a),s=Math.max(i,i+a),u=Math.min(o,o+c),p=Math.max(o,o+c);return r>=l&&r<=s&&n>=u&&n<=p}return!1},ii={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},oi=function(e){var t,r,n=ti(ti({},ii),e),i=(0,m.useRef)(),o=(t=(0,m.useState)(-1),r=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,c=[],l=!0,s=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){s=!0,i=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw i}}return c}}(t,r)||function(e,t){if(e){if("string"==typeof e)return Jn(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Jn(e,t):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=o[0],c=o[1];(0,m.useEffect)((function(){if(i.current&&i.current.getTotalLength)try{var e=i.current.getTotalLength();e&&c(e)}catch(e){}}),[]);var l=n.x,s=n.y,u=n.width,p=n.height,f=n.radius,d=n.className,h=n.animationEasing,y=n.animationDuration,g=n.animationBegin,b=n.isAnimationActive,x=n.isUpdateAnimationActive;if(l!==+l||s!==+s||u!==+u||p!==+p||0===u||0===p)return null;var w=Q()("recharts-rectangle",d);return x?v().createElement(Xr(),{canBegin:a>0,from:{width:u,height:p,x:l,y:s},to:{width:u,height:p,x:l,y:s},duration:y,animationEasing:h,isActive:x},(function(e){var t=e.width,r=e.height,o=e.x,c=e.y;return v().createElement(Xr(),{canBegin:a>0,from:"0px ".concat(-1===a?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:g,duration:y,isActive:b,easing:h},v().createElement("path",Qn({},xt(n,!0),{className:w,d:ri(o,c,t,r,f),ref:i})))})):v().createElement("path",Qn({},xt(n,!0),{className:w,d:ri(l,s,u,p,f)}))};function ai(e){return ai="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ai(e)}function ci(){return ci=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ci.apply(this,arguments)}function li(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function si(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ui(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?si(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==ai(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==ai(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===ai(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):si(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var pi=function(e,t,r,n,i){var o,a=r-n;return o="M ".concat(e,",").concat(t),o+="L ".concat(e+r,",").concat(t),o+="L ".concat(e+r-a/2,",").concat(t+i),(o+="L ".concat(e+r-a/2-n,",").concat(t+i))+"L ".concat(e,",").concat(t," Z")},fi={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},di=function(e){var t,r,n=ui(ui({},fi),e),i=(0,m.useRef)(),o=(t=(0,m.useState)(-1),r=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,c=[],l=!0,s=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){s=!0,i=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw i}}return c}}(t,r)||function(e,t){if(e){if("string"==typeof e)return li(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?li(e,t):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=o[0],c=o[1];(0,m.useEffect)((function(){if(i.current&&i.current.getTotalLength)try{var e=i.current.getTotalLength();e&&c(e)}catch(e){}}),[]);var l=n.x,s=n.y,u=n.upperWidth,p=n.lowerWidth,f=n.height,d=n.className,h=n.animationEasing,y=n.animationDuration,g=n.animationBegin,b=n.isUpdateAnimationActive;if(l!==+l||s!==+s||u!==+u||p!==+p||f!==+f||0===u&&0===p||0===f)return null;var x=Q()("recharts-trapezoid",d);return b?v().createElement(Xr(),{canBegin:a>0,from:{upperWidth:0,lowerWidth:0,height:f,x:l,y:s},to:{upperWidth:u,lowerWidth:p,height:f,x:l,y:s},duration:y,animationEasing:h,isActive:b},(function(e){var t=e.upperWidth,r=e.lowerWidth,o=e.height,c=e.x,l=e.y;return v().createElement(Xr(),{canBegin:a>0,from:"0px ".concat(-1===a?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:g,duration:y,easing:h},v().createElement("path",ci({},xt(n,!0),{className:x,d:pi(c,l,t,r,o),ref:i})))})):v().createElement("g",null,v().createElement("path",ci({},xt(n,!0),{className:x,d:pi(l,s,u,p,f)})))};function hi(e){return hi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},hi(e)}function yi(){return yi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},yi.apply(this,arguments)}function mi(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function vi(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?mi(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==hi(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==hi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===hi(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mi(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var gi=function(e){var t=e.cx,r=e.cy,n=e.radius,i=e.angle,o=e.sign,a=e.isExternal,c=e.cornerRadius,l=e.cornerIsExternal,s=c*(a?1:-1)+n,u=Math.asin(c/s)/ie,p=l?i:i+o*u,f=l?i-o*u:i;return{center:ae(t,r,s,p),circleTangency:ae(t,r,n,p),lineTangency:ae(t,r,s*Math.cos(u*ie),f),theta:u}},bi=function(e){var t=e.cx,r=e.cy,n=e.innerRadius,i=e.outerRadius,o=e.startAngle,a=function(e,t){return me(t-e)*Math.min(Math.abs(t-e),359.999)}(o,e.endAngle),c=o+a,l=ae(t,r,i,o),s=ae(t,r,i,c),u="M ".concat(l.x,",").concat(l.y,"\n A ").concat(i,",").concat(i,",0,\n ").concat(+(Math.abs(a)>180),",").concat(+(o>c),",\n ").concat(s.x,",").concat(s.y,"\n ");if(n>0){var p=ae(t,r,n,o),f=ae(t,r,n,c);u+="L ".concat(f.x,",").concat(f.y,"\n A ").concat(n,",").concat(n,",0,\n ").concat(+(Math.abs(a)>180),",").concat(+(o<=c),",\n ").concat(p.x,",").concat(p.y," Z")}else u+="L ".concat(t,",").concat(r," Z");return u},xi={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},wi=function(e){var t=vi(vi({},xi),e),r=t.cx,n=t.cy,i=t.innerRadius,o=t.outerRadius,a=t.cornerRadius,c=t.forceCornerRadius,l=t.cornerIsExternal,s=t.startAngle,u=t.endAngle,p=t.className;if(o<i||s===u)return null;var f,d=Q()("recharts-sector",p),h=o-i,y=Oe(a,h,0,!0);return f=y>0&&Math.abs(s-u)<360?function(e){var t=e.cx,r=e.cy,n=e.innerRadius,i=e.outerRadius,o=e.cornerRadius,a=e.forceCornerRadius,c=e.cornerIsExternal,l=e.startAngle,s=e.endAngle,u=me(s-l),p=gi({cx:t,cy:r,radius:i,angle:l,sign:u,cornerRadius:o,cornerIsExternal:c}),f=p.circleTangency,d=p.lineTangency,h=p.theta,y=gi({cx:t,cy:r,radius:i,angle:s,sign:-u,cornerRadius:o,cornerIsExternal:c}),m=y.circleTangency,v=y.lineTangency,g=y.theta,b=c?Math.abs(l-s):Math.abs(l-s)-h-g;if(b<0)return a?"M ".concat(d.x,",").concat(d.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 "):bi({cx:t,cy:r,innerRadius:n,outerRadius:i,startAngle:l,endAngle:s});var x="M ".concat(d.x,",").concat(d.y,"\n A").concat(o,",").concat(o,",0,0,").concat(+(u<0),",").concat(f.x,",").concat(f.y,"\n A").concat(i,",").concat(i,",0,").concat(+(b>180),",").concat(+(u<0),",").concat(m.x,",").concat(m.y,"\n A").concat(o,",").concat(o,",0,0,").concat(+(u<0),",").concat(v.x,",").concat(v.y,"\n ");if(n>0){var w=gi({cx:t,cy:r,radius:n,angle:l,sign:u,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),O=w.circleTangency,k=w.lineTangency,S=w.theta,j=gi({cx:t,cy:r,radius:n,angle:s,sign:-u,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),A=j.circleTangency,P=j.lineTangency,E=j.theta,T=c?Math.abs(l-s):Math.abs(l-s)-S-E;if(T<0&&0===o)return"".concat(x,"L").concat(t,",").concat(r,"Z");x+="L".concat(P.x,",").concat(P.y,"\n A").concat(o,",").concat(o,",0,0,").concat(+(u<0),",").concat(A.x,",").concat(A.y,"\n A").concat(n,",").concat(n,",0,").concat(+(T>180),",").concat(+(u>0),",").concat(O.x,",").concat(O.y,"\n A").concat(o,",").concat(o,",0,0,").concat(+(u<0),",").concat(k.x,",").concat(k.y,"Z")}else x+="L".concat(t,",").concat(r,"Z");return x}({cx:r,cy:n,innerRadius:i,outerRadius:o,cornerRadius:Math.min(y,h/2),forceCornerRadius:c,cornerIsExternal:l,startAngle:s,endAngle:u}):bi({cx:r,cy:n,innerRadius:i,outerRadius:o,startAngle:s,endAngle:u}),v().createElement("path",yi({},xt(t,!0),{className:d,d:f,role:"img"}))},Oi=["option","shapeType","propTransformer","activeClassName","isActive"];function ki(e){return ki="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ki(e)}function Si(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ji(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Si(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==ki(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==ki(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===ki(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Si(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ai(e,t){return ji(ji({},t),e)}function Pi(e){var t=e.shapeType,r=e.elementProps;switch(t){case"rectangle":return v().createElement(oi,r);case"trapezoid":return v().createElement(di,r);case"sector":return v().createElement(wi,r);case"symbols":if(function(e,t){return"symbols"===e}(t))return v().createElement(Wt,r);break;default:return null}}function Ei(e){var t,r=e.option,n=e.shapeType,i=e.propTransformer,o=void 0===i?Ai:i,a=e.activeClassName,c=void 0===a?"recharts-active-shape":a,l=e.isActive,s=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,Oi);if((0,m.isValidElement)(r))t=(0,m.cloneElement)(r,ji(ji({},s),function(e){return(0,m.isValidElement)(e)?e.props:e}(r)));else if(_()(r))t=r(s);else if(Kn()(r)&&!Yn()(r)){var u=o(r,s);t=v().createElement(Pi,{shapeType:n,elementProps:u})}else{var p=s;t=v().createElement(Pi,{shapeType:n,elementProps:p})}return l?v().createElement(At,{className:c},t):t}function Ti(e,t){return null!=t&&"trapezoids"in e.props}function Ci(e,t){return null!=t&&"sectors"in e.props}function Ii(e,t){return null!=t&&"points"in e.props}function Di(e,t){var r,n,i=e.x===(null==t||null===(r=t.labelViewBox)||void 0===r?void 0:r.x)||e.x===t.x,o=e.y===(null==t||null===(n=t.labelViewBox)||void 0===n?void 0:n.y)||e.y===t.y;return i&&o}function Mi(e,t){var r=e.endAngle===t.endAngle,n=e.startAngle===t.startAngle;return r&&n}function Ri(e,t){var r=e.x===t.x,n=e.y===t.y,i=e.z===t.z;return r&&n&&i}function Ni(e){var t=e.activeTooltipItem,r=e.graphicalItem,n=e.itemData,i=function(e,t){var r;return Ti(e,t)?r="trapezoids":Ci(e,t)?r="sectors":Ii(e,t)&&(r="points"),r}(r,t),o=function(e,t){var r,n;return Ti(e,t)?null===(r=t.tooltipPayload)||void 0===r||null===(r=r[0])||void 0===r||null===(r=r.payload)||void 0===r?void 0:r.payload:Ci(e,t)?null===(n=t.tooltipPayload)||void 0===n||null===(n=n[0])||void 0===n||null===(n=n.payload)||void 0===n?void 0:n.payload:Ii(e,t)?t.payload:{}}(r,t),a=n.filter((function(e,n){var a=Xe()(o,e),c=r.props[i].filter((function(e){var n=function(e,t){var r;return Ti(e,t)?r=Di:Ci(e,t)?r=Mi:Ii(e,t)&&(r=Ri),r}(r,t);return n(e,t)})),l=r.props[i].indexOf(c[c.length-1]);return a&&n===l}));return n.indexOf(a[a.length-1])}function Bi(e){return Bi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Bi(e)}var Li=["x","y"];function _i(){return _i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},_i.apply(this,arguments)}function zi(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function $i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?zi(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==Bi(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Bi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Bi(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zi(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Fi(e,t){var r=e.x,n=e.y,i=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,Li),o="".concat(r),a=parseInt(o,10),c="".concat(n),l=parseInt(c,10),s="".concat(t.height||i.height),u=parseInt(s,10),p="".concat(t.width||i.width),f=parseInt(p,10);return $i($i($i($i($i({},t),i),a?{x:a}:{}),l?{y:l}:{}),{},{height:u,width:f,name:t.name,radius:t.radius})}function Wi(e){return v().createElement(Ei,_i({shapeType:"rectangle",propTransformer:Fi,activeClassName:"recharts-active-bar"},e))}var Ui=["value","background"];function qi(e){return qi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qi(e)}function Gi(){return Gi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Gi.apply(this,arguments)}function Hi(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Xi(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Hi(Object(r),!0).forEach((function(t){Qi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Hi(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ki(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ji(n.key),n)}}function Vi(e,t){return Vi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Vi(e,t)}function Yi(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Zi(e){return Zi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Zi(e)}function Qi(e,t,r){return(t=Ji(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ji(e){var t=function(e,t){if("object"!==qi(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==qi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===qi(t)?t:String(t)}var eo=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Vi(e,t)}(c,e);var t,r,n,i,o,a=(i=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Zi(i);if(o){var r=Zi(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===qi(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Yi(e)}(this,e)});function c(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Qi(Yi(e=a.call.apply(a,[this].concat(r))),"state",{isAnimationFinished:!1}),Qi(Yi(e),"id",we("recharts-bar-")),Qi(Yi(e),"handleAnimationEnd",(function(){var t=e.props.onAnimationEnd;e.setState({isAnimationFinished:!0}),t&&t()})),Qi(Yi(e),"handleAnimationStart",(function(){var t=e.props.onAnimationStart;e.setState({isAnimationFinished:!1}),t&&t()})),e}return t=c,n=[{key:"getDerivedStateFromProps",value:function(e,t){return e.animationId!==t.prevAnimationId?{prevAnimationId:e.animationId,curData:e.data,prevData:t.curData}:e.data!==t.curData?{curData:e.data}:null}}],(r=[{key:"renderRectanglesStatically",value:function(e){var t=this,r=this.props,n=r.shape,i=r.dataKey,o=r.activeIndex,a=r.activeBar,c=xt(this.props);return e&&e.map((function(e,r){var l=r===o,s=l?a:n,u=Xi(Xi(Xi({},c),e),{},{isActive:l,option:s,index:r,dataKey:i,onAnimationStart:t.handleAnimationStart,onAnimationEnd:t.handleAnimationEnd});return v().createElement(At,Gi({className:"recharts-bar-rectangle"},ot(t.props,e,r),{key:"rectangle-".concat(null==e?void 0:e.x,"-").concat(null==e?void 0:e.y,"-").concat(null==e?void 0:e.value)}),v().createElement(Wi,u))}))}},{key:"renderRectanglesWithAnimation",value:function(){var e=this,t=this.props,r=t.data,n=t.layout,i=t.isAnimationActive,o=t.animationBegin,a=t.animationDuration,c=t.animationEasing,l=t.animationId,s=this.state.prevData;return v().createElement(Xr(),{begin:o,duration:a,isActive:i,easing:c,from:{t:0},to:{t:1},key:"bar-".concat(l),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},(function(t){var i=t.t,o=r.map((function(e,t){var r=s&&s[t];if(r){var o=Se(r.x,e.x),a=Se(r.y,e.y),c=Se(r.width,e.width),l=Se(r.height,e.height);return Xi(Xi({},e),{},{x:o(i),y:a(i),width:c(i),height:l(i)})}if("horizontal"===n){var u=Se(0,e.height)(i);return Xi(Xi({},e),{},{y:e.y+e.height-u,height:u})}var p=Se(0,e.width)(i);return Xi(Xi({},e),{},{width:p})}));return v().createElement(At,null,e.renderRectanglesStatically(o))}))}},{key:"renderRectangles",value:function(){var e=this.props,t=e.data,r=e.isAnimationActive,n=this.state.prevData;return!(r&&t&&t.length)||n&&Xe()(n,t)?this.renderRectanglesStatically(t):this.renderRectanglesWithAnimation()}},{key:"renderBackground",value:function(){var e=this,t=this.props,r=t.data,n=t.dataKey,i=t.activeIndex,o=xt(this.props.background);return r.map((function(t,r){t.value;var a=t.background,c=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(t,Ui);if(!a)return null;var l=Xi(Xi(Xi(Xi(Xi({},c),{},{fill:"#eee"},a),o),ot(e.props,t,r)),{},{onAnimationStart:e.handleAnimationStart,onAnimationEnd:e.handleAnimationEnd,dataKey:n,index:r,key:"background-bar-".concat(r),className:"recharts-bar-background-rectangle"});return v().createElement(Wi,Gi({option:e.props.background,isActive:r===i},l))}))}},{key:"renderErrorBar",value:function(e,t){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,c=yt(r.children,Ct);if(!c)return null;var l="vertical"===a?n[0].height/2:n[0].width/2,s=function(e,t){var r=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:r,errorVal:Sr(e,t)}},u={clipPath:e?"url(#clipPath-".concat(t,")"):null};return v().createElement(At,u,c.map((function(e){return v().cloneElement(e,{key:"error-bar-".concat(t,"-").concat(e.props.dataKey),data:n,xAxis:i,yAxis:o,layout:a,offset:l,dataPointFormatter:s})})))}},{key:"render",value:function(){var e=this.props,t=e.hide,r=e.data,n=e.className,i=e.xAxis,o=e.yAxis,a=e.left,c=e.top,l=e.width,s=e.height,u=e.isAnimationActive,p=e.background,f=e.id;if(t||!r||!r.length)return null;var d=this.state.isAnimationFinished,h=Q()("recharts-bar",n),y=i&&i.allowDataOverflow,m=o&&o.allowDataOverflow,g=y||m,b=B()(f)?this.id:f;return v().createElement(At,{className:h},y||m?v().createElement("defs",null,v().createElement("clipPath",{id:"clipPath-".concat(b)},v().createElement("rect",{x:y?a:a-l/2,y:m?c:c-s/2,width:y?l:2*l,height:m?s:2*s}))):null,v().createElement(At,{className:"recharts-bar-rectangles",clipPath:g?"url(#clipPath-".concat(b,")"):null},p?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(g,b),(!u||d)&&Hn.renderCallByParent(this.props,r))}}])&&Ki(t.prototype,r),n&&Ki(t,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(m.PureComponent);function to(e){return to="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},to(e)}function ro(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ao(n.key),n)}}function no(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function io(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?no(Object(r),!0).forEach((function(t){oo(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):no(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function oo(e,t,r){return(t=ao(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ao(e){var t=function(e,t){if("object"!==to(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==to(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===to(t)?t:String(t)}Qi(eo,"displayName","Bar"),Qi(eo,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!0,isAnimationActive:!Ae.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"}),Qi(eo,"getComposedData",(function(e){var t=e.props,r=e.item,n=e.barPosition,i=e.bandSize,o=e.xAxis,a=e.yAxis,c=e.xAxisTicks,l=e.yAxisTicks,s=e.stackedData,u=e.dataStartIndex,p=e.displayedData,f=e.offset,d=function(e,t){if(!e)return null;for(var r=0,n=e.length;r<n;r++)if(e[r].item===t)return e[r].position;return null}(n,r);if(!d)return null;var h=t.layout,y=r.props,m=y.dataKey,v=y.children,g=y.minPointSize,b="horizontal"===h?a:o,x=s?b.scale.domain():null,w=function(e){var t=e.numericAxis,r=t.scale.domain();if("number"===t.type){var n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return n<=0&&i>=0?0:i<0?i:n}return r[0]}({numericAxis:b}),O=yt(v,Kr),k=p.map((function(e,t){var n,p,f,y,v,b;if(s?n=function(e,t){if(!t||2!==t.length||!ge(t[0])||!ge(t[1]))return e;var r=Math.min(t[0],t[1]),n=Math.max(t[0],t[1]),i=[e[0],e[1]];return(!ge(e[0])||e[0]<r)&&(i[0]=r),(!ge(e[1])||e[1]>n)&&(i[1]=n),i[0]>n&&(i[0]=n),i[1]<r&&(i[1]=r),i}(s[u+t],x):(n=Sr(e,m),Array.isArray(n)||(n=[w,n])),"horizontal"===h){var k,S=[a.scale(n[0]),a.scale(n[1])],j=S[0],A=S[1];p=_r({axis:o,ticks:c,bandSize:i,offset:d.offset,entry:e,index:t}),f=null!==(k=null!=A?A:j)&&void 0!==k?k:void 0,y=d.size;var P=j-A;if(v=Number.isNaN(P)?0:P,b={x:p,y:a.y,width:y,height:a.height},Math.abs(g)>0&&Math.abs(v)<Math.abs(g)){var E=me(v||g)*(Math.abs(g)-Math.abs(v));f-=E,v+=E}}else{var T=[o.scale(n[0]),o.scale(n[1])],C=T[0],I=T[1];p=C,f=_r({axis:a,ticks:l,bandSize:i,offset:d.offset,entry:e,index:t}),y=I-C,v=d.size,b={x:o.x,y:f,width:o.width,height:v},Math.abs(g)>0&&Math.abs(y)<Math.abs(g)&&(y+=me(y||g)*(Math.abs(g)-Math.abs(y)))}return Xi(Xi(Xi({},e),{},{x:p,y:f,width:y,height:v,value:s?n:n[1],payload:e,background:b},O&&O[t]&&O[t].props),{},{tooltipPayload:[Gr(r,e)],tooltipPosition:{x:p+y/2,y:f+v/2}})}));return Xi({data:k,layout:h},f)}));var co=function(e,t,r,n,i){var o=e.width,a=e.height,c=e.layout,l=e.children,s=Object.keys(t),u={left:r.left,leftMirror:r.left,right:o-r.right,rightMirror:o-r.right,top:r.top,topMirror:r.top,bottom:a-r.bottom,bottomMirror:a-r.bottom},p=!!mt(l,eo);return s.reduce((function(o,a){var l,s,f,d,h,y=t[a],m=y.orientation,v=y.domain,g=y.padding,b=void 0===g?{}:g,x=y.mirror,w=y.reversed,O="".concat(m).concat(x?"Mirror":"");if("number"===y.type&&("gap"===y.padding||"no-gap"===y.padding)){var k=v[1]-v[0],S=1/0,j=y.categoricalDomain.sort();j.forEach((function(e,t){t>0&&(S=Math.min((e||0)-(j[t-1]||0),S))}));var A=S/k,P="vertical"===y.layout?r.height:r.width;if("gap"===y.padding&&(l=A*P/2),"no-gap"===y.padding){var E=Oe(e.barCategoryGap,A*P),T=A*P/2;l=T-E-(T-E)/P*E}}s="xAxis"===n?[r.left+(b.left||0)+(l||0),r.left+r.width-(b.right||0)-(l||0)]:"yAxis"===n?"horizontal"===c?[r.top+r.height-(b.bottom||0),r.top+(b.top||0)]:[r.top+(b.top||0)+(l||0),r.top+r.height-(b.bottom||0)-(l||0)]:y.range,w&&(s=[s[1],s[0]]);var C=function(e,t,r){var n=e.scale,i=e.type,o=e.layout,a=e.axisType;if("auto"===n)return"radial"===o&&"radiusAxis"===a?{scale:Be.scaleBand(),realScaleType:"band"}:"radial"===o&&"angleAxis"===a?{scale:Be.scaleLinear(),realScaleType:"linear"}:"category"===i&&t&&(t.indexOf("LineChart")>=0||t.indexOf("AreaChart")>=0||t.indexOf("ComposedChart")>=0&&!r)?{scale:Be.scalePoint(),realScaleType:"point"}:"category"===i?{scale:Be.scaleBand(),realScaleType:"band"}:{scale:Be.scaleLinear(),realScaleType:"linear"};if(pe()(n)){var c="scale".concat(Ge()(n));return{scale:(Be[c]||Be.scalePoint)(),realScaleType:Be[c]?c:"point"}}return _()(n)?{scale:n}:{scale:Be.scalePoint(),realScaleType:"point"}}(y,i,p),I=C.scale,D=C.realScaleType;I.domain(v).range(s),function(e){var t=e.domain();if(t&&!(t.length<=2)){var r=t.length,n=e.range(),i=Math.min(n[0],n[1])-Rr,o=Math.max(n[0],n[1])+Rr,a=e(t[0]),c=e(t[r-1]);(a<i||a>o||c<i||c>o)&&e.domain([t[0],t[r-1]])}}(I);var M=function(e,t){var r=t.realScaleType,n=t.type,i=t.tickCount,o=t.originalDomain,a=t.allowDecimals,c=r||t.scale;if("auto"!==c&&"linear"!==c)return null;if(i&&"number"===n&&o&&("auto"===o[0]||"auto"===o[1])){var l=e.domain();if(!l.length)return null;var s=(0,Ke.getNiceTickValues)(l,i,a);return e.domain([Fe()(s),ze()(s)]),{niceTicks:s}}if(i&&"number"===n){var u=e.domain();return{niceTicks:(0,Ke.getTickValuesFixedDomain)(u,i,a)}}return null}(I,io(io({},y),{},{realScaleType:D}));"xAxis"===n?(h="top"===m&&!x||"bottom"===m&&x,f=r.left,d=u[O]-h*y.height):"yAxis"===n&&(h="left"===m&&!x||"right"===m&&x,f=u[O]-h*y.width,d=r.top);var R=io(io(io({},y),M),{},{realScaleType:D,x:f,y:d,scale:I,width:"xAxis"===n?r.width:y.width,height:"yAxis"===n?r.height:y.height});return R.bandSize=Ur(R,M),y.hide||"xAxis"!==n?y.hide||(u[O]+=(h?-1:1)*R.width):u[O]+=(h?-1:1)*R.height,io(io({},o),{},oo({},a,R))}),{})},lo=function(e,t){var r=e.x,n=e.y,i=t.x,o=t.y;return{x:Math.min(r,i),y:Math.min(n,o),width:Math.abs(i-r),height:Math.abs(o-n)}},so=function(e){var t=e.x1,r=e.y1,n=e.x2,i=e.y2;return lo({x:t,y:r},{x:n,y:i})},uo=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.scale=t}var t,r,n;return t=e,r=[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.bandAware,n=t.position;if(void 0!==e){if(n)switch(n){case"start":default:return this.scale(e);case"middle":var i=this.bandwidth?this.bandwidth()/2:0;return this.scale(e)+i;case"end":var o=this.bandwidth?this.bandwidth():0;return this.scale(e)+o}if(r){var a=this.bandwidth?this.bandwidth()/2:0;return this.scale(e)+a}return this.scale(e)}}},{key:"isInRange",value:function(e){var t=this.range(),r=t[0],n=t[t.length-1];return r<=n?e>=r&&e<=n:e>=n&&e<=r}}],n=[{key:"create",value:function(t){return new e(t)}}],r&&ro(t.prototype,r),n&&ro(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();oo(uo,"EPS",1e-4);var po=function(e){var t=Object.keys(e).reduce((function(t,r){return io(io({},t),{},oo({},r,uo.create(e[r])))}),{});return io(io({},t),{},{apply:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.bandAware,i=r.position;return Ne()(e,(function(e,r){return t[r].apply(e,{bandAware:n,position:i})}))},isInRange:function(e){return Y()(e,(function(e,r){return t[r].isInRange(e)}))}})};function fo(e,t,r){if(t<1)return[];if(1===t&&void 0===r)return e;for(var n=[],i=0;i<e.length;i+=t){if(void 0!==r&&!0!==r(e[i]))return;n.push(e[i])}return n}function ho(e,t,r,n,i){if(e*t<e*n||e*t>e*i)return!1;var o=r();return e*(t-e*o/2-n)>=0&&e*(t+e*o/2-i)<=0}function yo(e){return yo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},yo(e)}function mo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function vo(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?mo(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==yo(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==yo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===yo(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mo(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function go(e,t,r){var n=e.tick,i=e.ticks,o=e.viewBox,a=e.minTickGap,c=e.orientation,l=e.interval,s=e.tickFormatter,u=e.unit,p=e.angle;if(!i||!i.length||!n)return[];if(ge(l)||Ae.isSsr)return function(e,t){return fo(e,t+1)}(i,"number"==typeof l&&ge(l)?l:0);var f=[],d="top"===c||"bottom"===c?"width":"height",h=u&&"width"===d?Me(u,{fontSize:t,letterSpacing:r}):{width:0,height:0},y=function(e,n){var i=_()(s)?s(e.value,n):e.value;return"width"===d?function(e,t,r){return function(e){var t=e.width,r=e.height,n=((arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)%180+180)%180*Math.PI/180,i=Math.atan(r/t),o=n>i&&n<Math.PI-i?r/Math.sin(n):t/Math.cos(n);return Math.abs(o)}({width:e.width+t.width,height:e.height+t.height},r)}(Me(i,{fontSize:t,letterSpacing:r}),h,p):Me(i,{fontSize:t,letterSpacing:r})[d]},m=i.length>=2?me(i[1].coordinate-i[0].coordinate):1,v=function(e,t,r){var n="width"===r,i=e.x,o=e.y,a=e.width,c=e.height;return 1===t?{start:n?i:o,end:n?i+a:o+c}:{start:n?i+a:o+c,end:n?i:o}}(o,m,d);return"equidistantPreserveStart"===l?function(e,t,r,n,i){for(var o,a=(n||[]).slice(),c=t.start,l=t.end,s=0,u=1,p=c,f=function(){var t=null==n?void 0:n[s];if(void 0===t)return{v:fo(n,u)};var o,a=s,f=function(){return void 0===o&&(o=r(t,a)),o},d=t.coordinate,h=0===s||ho(e,d,f,p,l);h||(s=0,p=c,u+=1),h&&(p=d+e*(f()/2+i),s+=u)};u<=a.length;)if(o=f())return o.v;return[]}(m,v,y,i,a):(f="preserveStart"===l||"preserveStartEnd"===l?function(e,t,r,n,i,o){var a=(n||[]).slice(),c=a.length,l=t.start,s=t.end;if(o){var u=n[c-1],p=r(u,c-1),f=e*(u.coordinate+e*p/2-s);a[c-1]=u=vo(vo({},u),{},{tickCoord:f>0?u.coordinate-f*e:u.coordinate}),ho(e,u.tickCoord,(function(){return p}),l,s)&&(s=u.tickCoord-e*(p/2+i),a[c-1]=vo(vo({},u),{},{isShow:!0}))}for(var d=o?c-1:c,h=function(t){var n,o=a[t],c=function(){return void 0===n&&(n=r(o,t)),n};if(0===t){var u=e*(o.coordinate-e*c()/2-l);a[t]=o=vo(vo({},o),{},{tickCoord:u<0?o.coordinate-u*e:o.coordinate})}else a[t]=o=vo(vo({},o),{},{tickCoord:o.coordinate});ho(e,o.tickCoord,c,l,s)&&(l=o.tickCoord+e*(c()/2+i),a[t]=vo(vo({},o),{},{isShow:!0}))},y=0;y<d;y++)h(y);return a}(m,v,y,i,a,"preserveStartEnd"===l):function(e,t,r,n,i){for(var o=(n||[]).slice(),a=o.length,c=t.start,l=t.end,s=function(t){var n,s=o[t],u=function(){return void 0===n&&(n=r(s,t)),n};if(t===a-1){var p=e*(s.coordinate+e*u()/2-l);o[t]=s=vo(vo({},s),{},{tickCoord:p>0?s.coordinate-p*e:s.coordinate})}else o[t]=s=vo(vo({},s),{},{tickCoord:s.coordinate});ho(e,s.tickCoord,u,c,l)&&(l=s.tickCoord-e*(u()/2+i),o[t]=vo(vo({},s),{},{isShow:!0}))},u=a-1;u>=0;u--)s(u);return o}(m,v,y,i,a),f.filter((function(e){return e.isShow})))}function bo(e){return bo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bo(e)}function xo(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function wo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Oo(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?wo(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==bo(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==bo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===bo(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wo(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ko(e){return Array.isArray(e)&&be(e[0])&&be(e[1])?e.join(" ~ "):e}var So=function(e){var t=e.separator,r=void 0===t?" : ":t,n=e.contentStyle,i=void 0===n?{}:n,o=e.itemStyle,a=void 0===o?{}:o,c=e.labelStyle,l=void 0===c?{}:c,s=e.payload,u=e.formatter,p=e.itemSorter,f=e.wrapperClassName,d=e.labelClassName,h=e.label,y=e.labelFormatter,m=Oo({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},i),g=Oo({margin:0},l),b=!B()(h),x=b?h:"",w=Q()("recharts-default-tooltip",f),O=Q()("recharts-tooltip-label",d);return b&&y&&null!=s&&(x=y(h,s)),v().createElement("div",{className:w,style:m},v().createElement("p",{className:O,style:g},v().isValidElement(x)?x:"".concat(x)),function(){if(s&&s.length){var e=(p?q()(s,p):s).map((function(e,t){if("none"===e.type)return null;var n=Oo({display:"block",paddingTop:4,paddingBottom:4,color:e.color||"#000"},a),i=e.formatter||u||ko,o=e.value,c=e.name,l=o,p=c;if(i&&null!=l&&null!=p){var f=i(o,c,e,t,s);if(Array.isArray(f)){var d=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,c=[],l=!0,s=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){s=!0,i=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw i}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return xo(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?xo(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(f,2);l=d[0],p=d[1]}else l=f}return v().createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(t),style:n},be(p)?v().createElement("span",{className:"recharts-tooltip-item-name"},p):null,be(p)?v().createElement("span",{className:"recharts-tooltip-item-separator"},r):null,v().createElement("span",{className:"recharts-tooltip-item-value"},l),v().createElement("span",{className:"recharts-tooltip-item-unit"},e.unit||""))}));return v().createElement("ul",{className:"recharts-tooltip-item-list",style:{padding:0,margin:0}},e)}return null}())};function jo(e){return jo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},jo(e)}function Ao(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==jo(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==jo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===jo(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Po="recharts-tooltip-wrapper",Eo={visibility:"hidden"};function To(e){var t,r=e.coordinate,n=e.translateX,i=e.translateY;return Q()(Po,(Ao(t={},"".concat(Po,"-right"),ge(n)&&r&&ge(r.x)&&n>=r.x),Ao(t,"".concat(Po,"-left"),ge(n)&&r&&ge(r.x)&&n<r.x),Ao(t,"".concat(Po,"-bottom"),ge(i)&&r&&ge(r.y)&&i>=r.y),Ao(t,"".concat(Po,"-top"),ge(i)&&r&&ge(r.y)&&i<r.y),t))}function Co(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.key,i=e.offsetTopLeft,o=e.position,a=e.reverseDirection,c=e.tooltipDimension,l=e.viewBox,s=e.viewBoxDimension;if(o&&ge(o[n]))return o[n];var u=r[n]-c-i,p=r[n]+i;return t[n]?a[n]?u:p:a[n]?u<l[n]?Math.max(p,l[n]):Math.max(u,l[n]):p+c>l[n]+s?Math.max(u,l[n]):Math.max(p,l[n])}function Io(e){return Io="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Io(e)}function Do(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Mo(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Do(Object(r),!0).forEach((function(t){_o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Do(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ro(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,zo(n.key),n)}}function No(e,t){return No=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},No(e,t)}function Bo(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Lo(e){return Lo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Lo(e)}function _o(e,t,r){return(t=zo(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function zo(e){var t=function(e,t){if("object"!==Io(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Io(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Io(t)?t:String(t)}var $o=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&No(e,t)}(a,e);var t,r,n,i,o=(n=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Lo(n);if(i){var r=Lo(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Io(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Bo(e)}(this,e)});function a(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return _o(Bo(e=o.call.apply(o,[this].concat(r))),"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}),_o(Bo(e),"lastBoundingBox",{width:-1,height:-1}),_o(Bo(e),"handleKeyDown",(function(t){var r,n,i,o;"Escape"===t.key&&e.setState({dismissed:!0,dismissedAtCoordinate:{x:null!==(r=null===(n=e.props.coordinate)||void 0===n?void 0:n.x)&&void 0!==r?r:0,y:null!==(i=null===(o=e.props.coordinate)||void 0===o?void 0:o.y)&&void 0!==i?i:0}})})),e}return t=a,(r=[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var e=this.wrapperNode.getBoundingClientRect();(Math.abs(e.width-this.lastBoundingBox.width)>1||Math.abs(e.height-this.lastBoundingBox.height)>1)&&(this.lastBoundingBox.width=e.width,this.lastBoundingBox.height=e.height)}else-1===this.lastBoundingBox.width&&-1===this.lastBoundingBox.height||(this.lastBoundingBox.width=-1,this.lastBoundingBox.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 e,t;this.props.active&&this.updateBBox(),this.state.dismissed&&((null===(e=this.props.coordinate)||void 0===e?void 0:e.x)===this.state.dismissedAtCoordinate.x&&(null===(t=this.props.coordinate)||void 0===t?void 0:t.y)===this.state.dismissedAtCoordinate.y||(this.state.dismissed=!1))}},{key:"render",value:function(){var e=this,t=this.props,r=t.active,n=t.allowEscapeViewBox,i=t.animationDuration,o=t.animationEasing,a=t.children,c=t.coordinate,l=t.hasPayload,s=t.isAnimationActive,u=t.offset,p=t.position,f=t.reverseDirection,d=t.useTranslate3d,h=t.viewBox,y=t.wrapperStyle,m=function(e){var t,r,n,i=e.allowEscapeViewBox,o=e.coordinate,a=e.offsetTopLeft,c=e.position,l=e.reverseDirection,s=e.tooltipBox,u=e.useTranslate3d,p=e.viewBox;return t=s.height>0&&s.width>0&&o?function(e){var t=e.translateX,r=e.translateY,n=e.useTranslate3d;return(0,Hr.translateStyle)({transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")})}({translateX:r=Co({allowEscapeViewBox:i,coordinate:o,key:"x",offsetTopLeft:a,position:c,reverseDirection:l,tooltipDimension:s.width,viewBox:p,viewBoxDimension:p.width}),translateY:n=Co({allowEscapeViewBox:i,coordinate:o,key:"y",offsetTopLeft:a,position:c,reverseDirection:l,tooltipDimension:s.height,viewBox:p,viewBoxDimension:p.height}),useTranslate3d:u}):Eo,{cssProperties:t,cssClasses:To({translateX:r,translateY:n,coordinate:o})}}({allowEscapeViewBox:n,coordinate:c,offsetTopLeft:u,position:p,reverseDirection:f,tooltipBox:{height:this.lastBoundingBox.height,width:this.lastBoundingBox.width},useTranslate3d:d,viewBox:h}),g=m.cssClasses,b=m.cssProperties,x=Mo(Mo(Mo({},s&&r&&(0,Hr.translateStyle)({transition:"transform ".concat(i,"ms ").concat(o)})),b),{},{pointerEvents:"none",visibility:!this.state.dismissed&&r&&l?"visible":"hidden",position:"absolute",top:0,left:0},y);return v().createElement("div",{tabIndex:-1,role:"dialog",className:g,style:x,ref:function(t){e.wrapperNode=t}},a)}}])&&Ro(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),a}(m.PureComponent);function Fo(e){return Fo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Fo(e)}function Wo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Uo(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Wo(Object(r),!0).forEach((function(t){Xo(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Wo(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function qo(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ko(n.key),n)}}function Go(e,t){return Go=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Go(e,t)}function Ho(e){return Ho=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ho(e)}function Xo(e,t,r){return(t=Ko(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ko(e){var t=function(e,t){if("object"!==Fo(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Fo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Fo(t)?t:String(t)}function Vo(e){return e.dataKey}var Yo=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Go(e,t)}(a,e);var t,r,n,i,o=(n=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ho(n);if(i){var r=Ho(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Fo(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function a(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),o.apply(this,arguments)}return t=a,(r=[{key:"render",value:function(){var e=this.props,t=e.active,r=e.allowEscapeViewBox,n=e.animationDuration,i=e.animationEasing,o=e.content,a=e.coordinate,c=e.filterNull,l=e.isAnimationActive,s=e.offset,u=e.payload,p=e.payloadUniqBy,f=e.position,d=e.reverseDirection,h=e.useTranslate3d,y=e.viewBox,m=e.wrapperStyle,g=null!=u?u:[];c&&g.length&&(g=tr(u.filter((function(e){return null!=e.value})),p,Vo));var b=g.length>0;return v().createElement($o,{allowEscapeViewBox:r,animationDuration:n,animationEasing:i,isAnimationActive:l,active:t,coordinate:a,hasPayload:b,offset:s,position:f,reverseDirection:d,useTranslate3d:h,viewBox:y,wrapperStyle:m},function(e,t){return v().isValidElement(e)?v().cloneElement(e,t):"function"==typeof e?v().createElement(e,t):v().createElement(So,t)}(o,Uo(Uo({},this.props),{},{payload:g})))}}])&&qo(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),a}(m.PureComponent);function Zo(e){return Zo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Zo(e)}function Qo(){return Qo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Qo.apply(this,arguments)}function Jo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ea(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Jo(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==Zo(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Zo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Zo(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Jo(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Xo(Yo,"displayName","Tooltip"),Xo(Yo,"defaultProps",{allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Ae.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var ta={curveBasisClosed:Le.curveBasisClosed,curveBasisOpen:Le.curveBasisOpen,curveBasis:Le.curveBasis,curveBumpX:Le.curveBumpX,curveBumpY:Le.curveBumpY,curveLinearClosed:Le.curveLinearClosed,curveLinear:Le.curveLinear,curveMonotoneX:Le.curveMonotoneX,curveMonotoneY:Le.curveMonotoneY,curveNatural:Le.curveNatural,curveStep:Le.curveStep,curveStepAfter:Le.curveStepAfter,curveStepBefore:Le.curveStepBefore},ra=function(e){return e.x===+e.x&&e.y===+e.y},na=function(e){return e.x},ia=function(e){return e.y},oa=function(e){var t=e.className,r=e.points,n=e.path,i=e.pathRef;if(!(r&&r.length||n))return null;var o=r&&r.length?function(e){var t,r=e.type,n=void 0===r?"linear":r,i=e.points,o=void 0===i?[]:i,a=e.baseLine,c=e.layout,l=e.connectNulls,s=void 0!==l&&l,u=function(e,t){if(_()(e))return e;var r="curve".concat(Ge()(e));return"curveMonotone"!==r&&"curveBump"!==r||!t?ta[r]||Le.curveLinear:ta["".concat(r).concat("vertical"===t?"Y":"X")]}(n,c),p=s?o.filter((function(e){return ra(e)})):o;if(Array.isArray(a)){var f=s?a.filter((function(e){return ra(e)})):a,d=p.map((function(e,t){return ea(ea({},e),{},{base:f[t]})}));return(t="vertical"===c?(0,Le.area)().y(ia).x1(na).x0((function(e){return e.base.x})):(0,Le.area)().x(na).y1(ia).y0((function(e){return e.base.y}))).defined(ra).curve(u),t(d)}return(t="vertical"===c&&ge(a)?(0,Le.area)().y(ia).x1(na).x0(a):ge(a)?(0,Le.area)().x(na).y1(ia).y0(a):(0,Le.line)().x(na).y(ia)).defined(ra).curve(u),t(p)}(e):n;return v().createElement("path",Qo({},xt(e),it(e),{className:Q()("recharts-curve",t),d:o,ref:i}))};function aa(e){return aa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},aa(e)}var ca=["x","y","top","left","width","height","className"];function la(){return la=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},la.apply(this,arguments)}function sa(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var ua=function(e,t,r,n,i,o){return"M".concat(e,",").concat(i,"v").concat(n,"M").concat(o,",").concat(t,"h").concat(r)},pa=function(e){var t=e.x,r=void 0===t?0:t,n=e.y,i=void 0===n?0:n,o=e.top,a=void 0===o?0:o,c=e.left,l=void 0===c?0:c,s=e.width,u=void 0===s?0:s,p=e.height,f=void 0===p?0:p,d=e.className,h=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?sa(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==aa(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==aa(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===aa(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sa(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({x:r,y:i,top:a,left:l,width:u,height:f},function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,ca));return ge(r)&&ge(i)&&ge(u)&&ge(f)&&ge(a)&&ge(l)?v().createElement("path",la({},xt(h,!0),{className:Q()("recharts-cross",d),d:ua(r,i,u,f,a,l)})):null};function fa(){return fa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},fa.apply(this,arguments)}var da=function(e){var t=e.cx,r=e.cy,n=e.r,i=e.className,o=Q()("recharts-dot",i);return t===+t&&r===+r&&n===+n?v().createElement("circle",fa({},xt(e),it(e),{className:o,cx:t,cy:r,r:n})):null},ha=["viewBox"],ya=["viewBox"],ma=["ticks"];function va(e){return va="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},va(e)}function ga(){return ga=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ga.apply(this,arguments)}function ba(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function xa(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ba(Object(r),!0).forEach((function(t){ja(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ba(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function wa(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Oa(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Aa(n.key),n)}}function ka(e,t){return ka=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ka(e,t)}function Sa(e){return Sa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Sa(e)}function ja(e,t,r){return(t=Aa(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Aa(e){var t=function(e,t){if("object"!==va(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==va(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===va(t)?t:String(t)}var Pa=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ka(e,t)}(c,e);var t,r,n,i,o,a=(i=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Sa(i);if(o){var r=Sa(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===va(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function c(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),(t=a.call(this,e)).state={fontSize:"",letterSpacing:""},t}return t=c,n=[{key:"renderTickItem",value:function(e,t,r){return v().isValidElement(e)?v().cloneElement(e,t):_()(e)?e(t):v().createElement(kn,ga({},t,{className:"recharts-cartesian-axis-tick-value"}),r)}}],(r=[{key:"shouldComponentUpdate",value:function(e,t){var r=e.viewBox,n=wa(e,ha),i=this.props,o=i.viewBox,a=wa(i,ya);return!Qe(r,o)||!Qe(n,a)||!Qe(t,this.state)}},{key:"componentDidMount",value:function(){var e=this.layerReference;if(e){var t=e.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];t&&this.setState({fontSize:window.getComputedStyle(t).fontSize,letterSpacing:window.getComputedStyle(t).letterSpacing})}}},{key:"getTickLineCoord",value:function(e){var t,r,n,i,o,a,c=this.props,l=c.x,s=c.y,u=c.width,p=c.height,f=c.orientation,d=c.tickSize,h=c.mirror,y=c.tickMargin,m=h?-1:1,v=e.tickSize||d,g=ge(e.tickCoord)?e.tickCoord:e.coordinate;switch(f){case"top":t=r=e.coordinate,a=(n=(i=s+ +!h*p)-m*v)-m*y,o=g;break;case"left":n=i=e.coordinate,o=(t=(r=l+ +!h*u)-m*v)-m*y,a=g;break;case"right":n=i=e.coordinate,o=(t=(r=l+ +h*u)+m*v)+m*y,a=g;break;default:t=r=e.coordinate,a=(n=(i=s+ +h*p)+m*v)+m*y,o=g}return{line:{x1:t,y1:n,x2:r,y2:i},tick:{x:o,y:a}}}},{key:"getTickTextAnchor",value:function(){var e,t=this.props,r=t.orientation,n=t.mirror;switch(r){case"left":e=n?"start":"end";break;case"right":e=n?"end":"start";break;default:e="middle"}return e}},{key:"getTickVerticalAnchor",value:function(){var e=this.props,t=e.orientation,r=e.mirror,n="end";switch(t){case"left":case"right":n="middle";break;case"top":n=r?"start":"end";break;default:n=r?"end":"start"}return n}},{key:"renderAxisLine",value:function(){var e=this.props,t=e.x,r=e.y,n=e.width,i=e.height,o=e.orientation,a=e.mirror,c=e.axisLine,l=xa(xa(xa({},xt(this.props)),xt(c)),{},{fill:"none"});if("top"===o||"bottom"===o){var s=+("top"===o&&!a||"bottom"===o&&a);l=xa(xa({},l),{},{x1:t,y1:r+s*i,x2:t+n,y2:r+s*i})}else{var u=+("left"===o&&!a||"right"===o&&a);l=xa(xa({},l),{},{x1:t+u*n,y1:r,x2:t+u*n,y2:r+i})}return v().createElement("line",ga({},l,{className:Q()("recharts-cartesian-axis-line",W()(c,"className"))}))}},{key:"renderTicks",value:function(e,t,r){var n=this,i=this.props,o=i.tickLine,a=i.stroke,l=i.tick,s=i.tickFormatter,u=i.unit,p=go(xa(xa({},this.props),{},{ticks:e}),t,r),f=this.getTickTextAnchor(),d=this.getTickVerticalAnchor(),h=xt(this.props),y=xt(l),m=xa(xa({},h),{},{fill:"none"},xt(o)),g=p.map((function(e,t){var r=n.getTickLineCoord(e),i=r.line,g=r.tick,b=xa(xa(xa(xa({textAnchor:f,verticalAnchor:d},h),{},{stroke:"none",fill:a},y),g),{},{index:t,payload:e,visibleTicksCount:p.length,tickFormatter:s});return v().createElement(At,ga({className:"recharts-cartesian-axis-tick",key:"tick-".concat(e.value,"-").concat(e.coordinate,"-").concat(e.tickCoord)},ot(n.props,e,t)),o&&v().createElement("line",ga({},m,i,{className:Q()("recharts-cartesian-axis-tick-line",W()(o,"className"))})),l&&c.renderTickItem(l,b,"".concat(_()(s)?s(e.value,t):e.value).concat(u||"")))}));return v().createElement("g",{className:"recharts-cartesian-axis-ticks"},g)}},{key:"render",value:function(){var e=this,t=this.props,r=t.axisLine,n=t.width,i=t.height,o=t.ticksGenerator,a=t.className;if(t.hide)return null;var c=this.props,l=c.ticks,s=wa(c,ma),u=l;return _()(o)&&(u=l&&l.length>0?o(this.props):o(s)),n<=0||i<=0||!u||!u.length?null:v().createElement(At,{className:Q()("recharts-cartesian-axis",a),ref:function(t){e.layerReference=t}},r&&this.renderAxisLine(),this.renderTicks(u,this.state.fontSize,this.state.letterSpacing),Nn.renderCallByParent(this.props))}}])&&Oa(t.prototype,r),n&&Oa(t,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(m.Component);function Ea(e){return Ea="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ea(e)}function Ta(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ca(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ta(Object(r),!0).forEach((function(t){Ia(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ta(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ia(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==Ea(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Ea(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Ea(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}ja(Pa,"displayName","CartesianAxis"),ja(Pa,"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"});var Da=["Webkit","Moz","O","ms"];function Ma(e){return Ma="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ma(e)}function Ra(){return Ra=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ra.apply(this,arguments)}function Na(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ba(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Na(Object(r),!0).forEach((function(t){Fa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Na(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function La(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Wa(n.key),n)}}function _a(e,t){return _a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_a(e,t)}function za(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $a(e){return $a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},$a(e)}function Fa(e,t,r){return(t=Wa(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Wa(e){var t=function(e,t){if("object"!==Ma(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Ma(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Ma(t)?t:String(t)}var Ua=function(e){return e.changedTouches&&!!e.changedTouches.length},qa=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_a(e,t)}(c,e);var t,r,n,i,o,a=(i=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=$a(i);if(o){var r=$a(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Ma(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return za(e)}(this,e)});function c(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),Fa(za(t=a.call(this,e)),"handleDrag",(function(e){t.leaveTimer&&(clearTimeout(t.leaveTimer),t.leaveTimer=null),t.state.isTravellerMoving?t.handleTravellerMove(e):t.state.isSlideMoving&&t.handleSlideDrag(e)})),Fa(za(t),"handleTouchMove",(function(e){null!=e.changedTouches&&e.changedTouches.length>0&&t.handleDrag(e.changedTouches[0])})),Fa(za(t),"handleDragEnd",(function(){t.setState({isTravellerMoving:!1,isSlideMoving:!1},(function(){var e=t.props,r=e.endIndex,n=e.onDragEnd,i=e.startIndex;null==n||n({endIndex:r,startIndex:i})})),t.detachDragEndListener()})),Fa(za(t),"handleLeaveWrapper",(function(){(t.state.isTravellerMoving||t.state.isSlideMoving)&&(t.leaveTimer=window.setTimeout(t.handleDragEnd,t.props.leaveTimeOut))})),Fa(za(t),"handleEnterSlideOrTraveller",(function(){t.setState({isTextActive:!0})})),Fa(za(t),"handleLeaveSlideOrTraveller",(function(){t.setState({isTextActive:!1})})),Fa(za(t),"handleSlideDragStart",(function(e){var r=Ua(e)?e.changedTouches[0]:e;t.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:r.pageX}),t.attachDragEndListener()})),t.travellerDragStartHandlers={startX:t.handleTravellerDragStart.bind(za(t),"startX"),endX:t.handleTravellerDragStart.bind(za(t),"endX")},t.state={},t}return t=c,n=[{key:"renderDefaultTraveller",value:function(e){var t=e.x,r=e.y,n=e.width,i=e.height,o=e.stroke,a=Math.floor(r+i/2)-1;return v().createElement(v().Fragment,null,v().createElement("rect",{x:t,y:r,width:n,height:i,fill:o,stroke:"none"}),v().createElement("line",{x1:t+1,y1:a,x2:t+n-1,y2:a,fill:"none",stroke:"#fff"}),v().createElement("line",{x1:t+1,y1:a+2,x2:t+n-1,y2:a+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(e,t){return v().isValidElement(e)?v().cloneElement(e,t):_()(e)?e(t):c.renderDefaultTraveller(t)}},{key:"getDerivedStateFromProps",value:function(e,t){var r=e.data,n=e.width,i=e.x,o=e.travellerWidth,a=e.updateId,c=e.startIndex,l=e.endIndex;if(r!==t.prevData||a!==t.prevUpdateId)return Ba({prevData:r,prevTravellerWidth:o,prevUpdateId:a,prevX:i,prevWidth:n},r&&r.length?function(e){var t=e.data,r=e.startIndex,n=e.endIndex,i=e.x,o=e.width,a=e.travellerWidth;if(!t||!t.length)return{};var c=t.length,l=(0,Be.scalePoint)().domain($()(0,c)).range([i,i+o-a]),s=l.domain().map((function(e){return l(e)}));return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:l(r),endX:l(n),scale:l,scaleValues:s}}({data:r,width:n,x:i,travellerWidth:o,startIndex:c,endIndex:l}):{scale:null,scaleValues:null});if(t.scale&&(n!==t.prevWidth||i!==t.prevX||o!==t.prevTravellerWidth)){t.scale.range([i,i+n-o]);var s=t.scale.domain().map((function(e){return t.scale(e)}));return{prevData:r,prevTravellerWidth:o,prevUpdateId:a,prevX:i,prevWidth:n,startX:t.scale(e.startIndex),endX:t.scale(e.endIndex),scaleValues:s}}return null}},{key:"getIndexInRange",value:function(e,t){for(var r=0,n=e.length-1;n-r>1;){var i=Math.floor((r+n)/2);e[i]>t?n=i:r=i}return t>=e[n]?n:r}}],(r=[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(e){var t=e.startX,r=e.endX,n=this.state.scaleValues,i=this.props,o=i.gap,a=i.data.length-1,l=Math.min(t,r),s=Math.max(t,r),u=c.getIndexInRange(n,l),p=c.getIndexInRange(n,s);return{startIndex:u-u%o,endIndex:p===a?a:p-p%o}}},{key:"getTextOfTick",value:function(e){var t=this.props,r=t.data,n=t.tickFormatter,i=t.dataKey,o=Sr(r[e],i,e);return _()(n)?n(o,e):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(e){var t=this.state,r=t.slideMoveStartX,n=t.startX,i=t.endX,o=this.props,a=o.x,c=o.width,l=o.travellerWidth,s=o.startIndex,u=o.endIndex,p=o.onChange,f=e.pageX-r;f>0?f=Math.min(f,a+c-l-i,a+c-l-n):f<0&&(f=Math.max(f,a-n,a-i));var d=this.getIndex({startX:n+f,endX:i+f});d.startIndex===s&&d.endIndex===u||!p||p(d),this.setState({startX:n+f,endX:i+f,slideMoveStartX:e.pageX})}},{key:"handleTravellerDragStart",value:function(e,t){var r=Ua(t)?t.changedTouches[0]:t;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:e,brushMoveStartX:r.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(e){var t,r=this.state,n=r.brushMoveStartX,i=r.movingTravellerId,o=r.endX,a=r.startX,c=this.state[i],l=this.props,s=l.x,u=l.width,p=l.travellerWidth,f=l.onChange,d=l.gap,h=l.data,y={startX:this.state.startX,endX:this.state.endX},m=e.pageX-n;m>0?m=Math.min(m,s+u-p-c):m<0&&(m=Math.max(m,s-c)),y[i]=c+m;var v=this.getIndex(y),g=v.startIndex,b=v.endIndex;this.setState((Fa(t={},i,c+m),Fa(t,"brushMoveStartX",e.pageX),t),(function(){var e;f&&(e=h.length-1,("startX"===i&&(o>a?g%d==0:b%d==0)||o<a&&b===e||"endX"===i&&(o>a?b%d==0:g%d==0)||o>a&&b===e)&&f(v))}))}},{key:"handleTravellerMoveKeyboard",value:function(e,t){var r=this,n=this.state,i=n.scaleValues,o=n.startX,a=n.endX,c=this.state[t],l=i.indexOf(c);if(-1!==l){var s=l+e;if(!(-1===s||s>=i.length)){var u=i[s];"startX"===t&&u>=a||"endX"===t&&u<=o||this.setState(Fa({},t,u),(function(){r.props.onChange(r.getIndex({startX:r.state.startX,endX:r.state.endX}))}))}}}},{key:"renderBackground",value:function(){var e=this.props,t=e.x,r=e.y,n=e.width,i=e.height,o=e.fill,a=e.stroke;return v().createElement("rect",{stroke:a,fill:o,x:t,y:r,width:n,height:i})}},{key:"renderPanorama",value:function(){var e=this.props,t=e.x,r=e.y,n=e.width,i=e.height,o=e.data,a=e.children,c=e.padding,l=m.Children.only(a);return l?v().cloneElement(l,{x:t,y:r,width:n,height:i,margin:c,compact:!0,data:o}):null}},{key:"renderTravellerLayer",value:function(e,t){var r=this,n=this.props,i=n.y,o=n.travellerWidth,a=n.height,l=n.traveller,s=n.ariaLabel,u=n.data,p=n.startIndex,f=n.endIndex,d=Math.max(e,this.props.x),h=Ba(Ba({},xt(this.props)),{},{x:d,y:i,width:o,height:a}),y=s||"Min value: ".concat(u[p].name,", Max value: ").concat(u[f].name);return v().createElement(At,{tabIndex:0,role:"slider","aria-label":y,"aria-valuenow":e,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[t],onTouchStart:this.travellerDragStartHandlers[t],onKeyDown:function(e){["ArrowLeft","ArrowRight"].includes(e.key)&&(e.preventDefault(),e.stopPropagation(),r.handleTravellerMoveKeyboard("ArrowRight"===e.key?1:-1,t))},onFocus:function(){r.setState({isTravellerFocused:!0})},onBlur:function(){r.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},c.renderTraveller(l,h))}},{key:"renderSlide",value:function(e,t){var r=this.props,n=r.y,i=r.height,o=r.stroke,a=r.travellerWidth,c=Math.min(e,t)+a,l=Math.max(Math.abs(t-e)-a,0);return v().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:c,y:n,width:l,height:i})}},{key:"renderText",value:function(){var e=this.props,t=e.startIndex,r=e.endIndex,n=e.y,i=e.height,o=e.travellerWidth,a=e.stroke,c=this.state,l=c.startX,s=c.endX,u={pointerEvents:"none",fill:a};return v().createElement(At,{className:"recharts-brush-texts"},v().createElement(kn,Ra({textAnchor:"end",verticalAnchor:"middle",x:Math.min(l,s)-5,y:n+i/2},u),this.getTextOfTick(t)),v().createElement(kn,Ra({textAnchor:"start",verticalAnchor:"middle",x:Math.max(l,s)+o+5,y:n+i/2},u),this.getTextOfTick(r)))}},{key:"render",value:function(){var e=this.props,t=e.data,r=e.className,n=e.children,i=e.x,o=e.y,a=e.width,c=e.height,l=e.alwaysShowText,s=this.state,u=s.startX,p=s.endX,f=s.isTextActive,d=s.isSlideMoving,h=s.isTravellerMoving,y=s.isTravellerFocused;if(!t||!t.length||!ge(i)||!ge(o)||!ge(a)||!ge(c)||a<=0||c<=0)return null;var m,g,b,x,w=Q()("recharts-brush",r),O=1===v().Children.count(n),k=(g="none",b=(m="userSelect").replace(/(\w)/,(function(e){return e.toUpperCase()})),(x=Da.reduce((function(e,t){return Ca(Ca({},e),{},Ia({},t+b,g))}),{}))[m]=g,x);return v().createElement(At,{className:w,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:k},this.renderBackground(),O&&this.renderPanorama(),this.renderSlide(u,p),this.renderTravellerLayer(u,"startX"),this.renderTravellerLayer(p,"endX"),(f||d||h||y||l)&&this.renderText())}}])&&La(t.prototype,r),n&&La(t,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(m.PureComponent);Fa(qa,"displayName","Brush"),Fa(qa,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var Ga=function(e,t){var r=e.alwaysShow,n=e.ifOverflow;return r&&(n="extendDomain"),n===t};function Ha(e){return Ha="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ha(e)}function Xa(){return Xa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Xa.apply(this,arguments)}function Ka(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Va(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ka(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==Ha(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Ha(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Ha(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ka(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ya(e){var t=e.x,r=e.y,n=e.r,i=e.alwaysShow,o=e.clipPathId,a=be(t),c=be(r);if(It(void 0===i,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!a||!c)return null;var l=function(e){var t=e.x,r=e.y,n=e.xAxis,i=e.yAxis,o=po({x:n.scale,y:i.scale}),a=o.apply({x:t,y:r},{bandAware:!0});return Ga(e,"discard")&&!o.isInRange(a)?null:a}(e);if(!l)return null;var s=l.x,u=l.y,p=e.shape,f=e.className,d=Va(Va({clipPath:Ga(e,"hidden")?"url(#".concat(o,")"):void 0},xt(e,!0)),{},{cx:s,cy:u});return v().createElement(At,{className:Q()("recharts-reference-dot",f)},Ya.renderDot(p,d),Nn.renderCallByParent(e,{x:s-n,y:u-n,width:2*n,height:2*n}))}Ya.displayName="ReferenceDot",Ya.defaultProps={isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1},Ya.renderDot=function(e,t){return v().isValidElement(e)?v().cloneElement(e,t):_()(e)?e(t):v().createElement(da,Xa({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"}))};const Za=require("lodash/some");var Qa=r.n(Za);function Ja(e){return Ja="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ja(e)}function ec(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function tc(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ec(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==Ja(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Ja(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Ja(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ec(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function rc(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function nc(){return nc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},nc.apply(this,arguments)}var ic=function(e,t){return v().isValidElement(e)?v().cloneElement(e,t):_()(e)?e(t):v().createElement("line",nc({},t,{className:"recharts-reference-line-line"}))},oc=function(e,t,r,n,i){var o=i.viewBox,a=o.x,c=o.y,l=o.width,s=o.height,u=i.position;if(r){var p=i.y,f=i.yAxis.orientation,d=e.y.apply(p,{position:u});if(Ga(i,"discard")&&!e.y.isInRange(d))return null;var h=[{x:a+l,y:d},{x:a,y:d}];return"left"===f?h.reverse():h}if(t){var y=i.x,m=i.xAxis.orientation,v=e.x.apply(y,{position:u});if(Ga(i,"discard")&&!e.x.isInRange(v))return null;var g=[{x:v,y:c+s},{x:v,y:c}];return"top"===m?g.reverse():g}if(n){var b=i.segment.map((function(t){return e.apply(t,{position:u})}));return Ga(i,"discard")&&Qa()(b,(function(t){return!e.isInRange(t)}))?null:b}return null};function ac(e){var t=e.x,r=e.y,n=e.segment,i=e.xAxis,o=e.yAxis,a=e.shape,c=e.className,l=e.alwaysShow,s=e.clipPathId;It(void 0===l,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var u=po({x:i.scale,y:o.scale}),p=be(t),f=be(r),d=n&&2===n.length,h=oc(u,p,f,d,e);if(!h)return null;var y,m,g=(m=2,function(e){if(Array.isArray(e))return e}(y=h)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,c=[],l=!0,s=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){s=!0,i=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw i}}return c}}(y,m)||function(e,t){if(e){if("string"==typeof e)return rc(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?rc(e,t):void 0}}(y,m)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),b=g[0],x=b.x,w=b.y,O=g[1],k=O.x,S=O.y,j=tc(tc({clipPath:Ga(e,"hidden")?"url(#".concat(s,")"):void 0},xt(e,!0)),{},{x1:x,y1:w,x2:k,y2:S});return v().createElement(At,{className:Q()("recharts-reference-line",c)},ic(a,j),Nn.renderCallByParent(e,so({x1:x,y1:w,x2:k,y2:S})))}function cc(e){return cc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},cc(e)}function lc(){return lc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},lc.apply(this,arguments)}function sc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function uc(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?sc(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==cc(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==cc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===cc(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sc(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function pc(e){var t=e.x1,r=e.x2,n=e.y1,i=e.y2,o=e.className,a=e.alwaysShow,c=e.clipPathId;It(void 0===a,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var l=be(t),s=be(r),u=be(n),p=be(i),f=e.shape;if(!(l||s||u||p||f))return null;var d=function(e,t,r,n,i){var o=i.x1,a=i.x2,c=i.y1,l=i.y2,s=i.xAxis,u=i.yAxis;if(!s||!u)return null;var p=po({x:s.scale,y:u.scale}),f={x:e?p.x.apply(o,{position:"start"}):p.x.rangeMin,y:r?p.y.apply(c,{position:"start"}):p.y.rangeMin},d={x:t?p.x.apply(a,{position:"end"}):p.x.rangeMax,y:n?p.y.apply(l,{position:"end"}):p.y.rangeMax};return!Ga(i,"discard")||p.isInRange(f)&&p.isInRange(d)?lo(f,d):null}(l,s,u,p,e);if(!d&&!f)return null;var h=Ga(e,"hidden")?"url(#".concat(c,")"):void 0;return v().createElement(At,{className:Q()("recharts-reference-area",o)},pc.renderRect(f,uc(uc({clipPath:h},xt(e,!0)),d)),Nn.renderCallByParent(e,d))}function fc(e){return function(e){if(Array.isArray(e))return dc(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return dc(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?dc(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function dc(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}ac.displayName="ReferenceLine",ac.defaultProps={isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"},pc.displayName="ReferenceArea",pc.defaultProps={isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1},pc.renderRect=function(e,t){return v().isValidElement(e)?v().cloneElement(e,t):_()(e)?e(t):v().createElement(oi,lc({},t,{className:"recharts-reference-area-rect"}))};var hc=function(e,t,r,n,i){var o=yt(e,ac),a=yt(e,Ya),c=[].concat(fc(o),fc(a)),l=yt(e,pc),s="".concat(n,"Id"),u=n[0],p=t;if(c.length&&(p=c.reduce((function(e,t){if(t.props[s]===r&&Ga(t.props,"extendDomain")&&ge(t.props[u])){var n=t.props[u];return[Math.min(e[0],n),Math.max(e[1],n)]}return e}),p)),l.length){var f="".concat(u,"1"),d="".concat(u,"2");p=l.reduce((function(e,t){if(t.props[s]===r&&Ga(t.props,"extendDomain")&&ge(t.props[f])&&ge(t.props[d])){var n=t.props[f],i=t.props[d];return[Math.min(e[0],n,i),Math.max(e[1],n,i)]}return e}),p)}return i&&i.length&&(p=i.reduce((function(e,t){return ge(t)?[Math.min(e[0],t),Math.max(e[1],t)]:e}),p)),p};const yc=require("eventemitter3");var mc=new(r.n(yc)()),vc="recharts.syncMouseEvents";function gc(e){return gc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gc(e)}function bc(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,wc(n.key),n)}}function xc(e,t,r){return(t=wc(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function wc(e){var t=function(e,t){if("object"!==gc(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==gc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===gc(t)?t:String(t)}var Oc=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),xc(this,"activeIndex",0),xc(this,"coordinateList",[]),xc(this,"layout","horizontal")}var t,r;return t=e,(r=[{key:"setDetails",value:function(e){var t=e.coordinateList,r=void 0===t?[]:t,n=e.container,i=void 0===n?null:n,o=e.layout,a=void 0===o?null:o,c=e.offset,l=void 0===c?null:c,s=e.mouseHandlerCallback,u=void 0===s?null:s;this.coordinateList=null!=r?r:this.coordinateList,this.container=null!=i?i:this.container,this.layout=null!=a?a:this.layout,this.offset=null!=l?l:this.offset,this.mouseHandlerCallback=null!=u?u:this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(e){if(0!==this.coordinateList.length)switch(e.key){case"ArrowRight":if("horizontal"!==this.layout)return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break;case"ArrowLeft":if("horizontal"!==this.layout)return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse()}}},{key:"spoofMouse",value:function(){var e,t;if("horizontal"===this.layout&&0!==this.coordinateList.length){var r=this.container.getBoundingClientRect(),n=r.x,i=r.y,o=r.height,a=this.coordinateList[this.activeIndex].coordinate,c=(null===(e=window)||void 0===e?void 0:e.scrollX)||0,l=(null===(t=window)||void 0===t?void 0:t.scrollY)||0,s=n+a+c,u=i+this.offset.top+o/2+l;this.mouseHandlerCallback({pageX:s,pageY:u})}}}])&&bc(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function kc(e,t,r){var n,i,o,a;if("horizontal"===e)o=n=t.x,i=r.top,a=r.top+r.height;else if("vertical"===e)a=i=t.y,n=r.left,o=r.left+r.width;else if(null!=t.cx&&null!=t.cy){if("centric"!==e)return se(t);var c=t.cx,l=t.cy,s=t.innerRadius,u=t.outerRadius,p=t.angle,f=ae(c,l,s,p),d=ae(c,l,u,p);n=f.x,i=f.y,o=d.x,a=d.y}return[{x:n,y:i},{x:o,y:a}]}var Sc=["item"],jc=["children","className","width","height","style","compact","title","desc"];function Ac(e){return Ac="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ac(e)}function Pc(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,c=[],l=!0,s=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){s=!0,i=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw i}}return c}}(e,t)||Nc(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ec(){return Ec=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ec.apply(this,arguments)}function Tc(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Cc(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,$c(n.key),n)}}function Ic(e,t){return Ic=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ic(e,t)}function Dc(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Mc(e){return Mc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Mc(e)}function Rc(e){return function(e){if(Array.isArray(e))return Bc(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Nc(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Nc(e,t){if(e){if("string"==typeof e)return Bc(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Bc(e,t):void 0}}function Bc(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Lc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _c(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Lc(Object(r),!0).forEach((function(t){zc(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Lc(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function zc(e,t,r){return(t=$c(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $c(e){var t=function(e,t){if("object"!==Ac(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Ac(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Ac(t)?t:String(t)}var Fc={xAxis:["bottom","top"],yAxis:["left","right"]},Wc={width:"100%",height:"100%"},Uc={x:0,y:0},qc=function(e,t){var r=t.graphicalItems,n=t.dataStartIndex,i=t.dataEndIndex,o=(null!=r?r:[]).reduce((function(e,t){var r=t.props.data;return r&&r.length?[].concat(Rc(e),Rc(r)):e}),[]);return o.length>0?o:e&&e.length&&ge(n)&&ge(i)?e.slice(n,i+1):[]};function Gc(e){return"number"===e?[0,"auto"]:void 0}var Hc=function(e,t,r,n){var i=e.graphicalItems,o=e.tooltipAxis,a=qc(t,e);return r<0||!i||!i.length||r>=a.length?null:i.reduce((function(i,c){var l;if(c.props.hide)return i;var s,u=null!==(l=c.props.data)&&void 0!==l?l:t;return u&&e.dataStartIndex+e.dataEndIndex!==0&&(u=u.slice(e.dataStartIndex,e.dataEndIndex+1)),(s=o.dataKey&&!o.allowDuplicatedCategory?je(void 0===u?a:u,o.dataKey,n):u&&u[r]||a[r])?[].concat(Rc(i),[Gr(c,s)]):i}),[])},Xc=function(e,t,r,n){var i=n||{x:e.chartX,y:e.chartY},o=function(e,t){return"horizontal"===t?e.x:"vertical"===t?e.y:"centric"===t?e.angle:e.radius}(i,r),a=e.orderedTooltipTicks,c=e.tooltipAxis,l=e.tooltipTicks,s=function(e){var t,r=arguments.length>1&&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!==(t=null==r?void 0:r.length)&&void 0!==t?t:0;if(a<=1)return 0;if(i&&"angleAxis"===i.axisType&&Math.abs(Math.abs(i.range[1]-i.range[0])-360)<=1e-6)for(var c=i.range,l=0;l<a;l++){var s=l>0?n[l-1].coordinate:n[a-1].coordinate,u=n[l].coordinate,p=l>=a-1?n[0].coordinate:n[l+1].coordinate,f=void 0;if(me(u-s)!==me(p-u)){var d=[];if(me(p-u)===me(c[1]-c[0])){f=p;var h=u+c[1]-c[0];d[0]=Math.min(h,(h+s)/2),d[1]=Math.max(h,(h+s)/2)}else{f=s;var y=p+c[1]-c[0];d[0]=Math.min(u,(y+u)/2),d[1]=Math.max(u,(y+u)/2)}var m=[Math.min(u,(f+u)/2),Math.max(u,(f+u)/2)];if(e>m[0]&&e<=m[1]||e>=d[0]&&e<=d[1]){o=n[l].index;break}}else{var v=Math.min(s,p),g=Math.max(s,p);if(e>(v+u)/2&&e<=(g+u)/2){o=n[l].index;break}}}else for(var b=0;b<a;b++)if(0===b&&e<=(r[b].coordinate+r[b+1].coordinate)/2||b>0&&b<a-1&&e>(r[b].coordinate+r[b-1].coordinate)/2&&e<=(r[b].coordinate+r[b+1].coordinate)/2||b===a-1&&e>(r[b].coordinate+r[b-1].coordinate)/2){o=r[b].index;break}return o}(o,a,l,c);if(s>=0&&l){var u=l[s]&&l[s].value,p=Hc(e,t,s,u),f=function(e,t,r,n){var i=t.find((function(e){return e&&e.index===r}));if(i){if("horizontal"===e)return{x:i.coordinate,y:n.y};if("vertical"===e)return{x:n.x,y:i.coordinate};if("centric"===e){var o=i.coordinate,a=n.radius;return _c(_c(_c({},n),ae(n.cx,n.cy,a,o)),{},{angle:o,radius:a})}var c=i.coordinate,l=n.angle;return _c(_c(_c({},n),ae(n.cx,n.cy,c,l)),{},{angle:l,radius:c})}return Uc}(r,a,s,i);return{activeTooltipIndex:s,activeLabel:u,activePayload:p,activeCoordinate:f}}return null},Kc=function(e,t){var r=t.axisType,n=void 0===r?"xAxis":r,i=t.AxisComp,o=t.graphicalItems,a=t.stackGroups,c=t.dataStartIndex,l=t.dataEndIndex,s=e.children,u="".concat(n,"Id"),p=yt(s,i),f={};return p&&p.length?f=function(e,t){var r=t.axes,n=t.graphicalItems,i=t.axisType,o=t.axisIdKey,a=t.stackGroups,c=t.dataStartIndex,l=t.dataEndIndex,s=e.layout,u=e.children,p=e.stackOffset,f=Tr(s,i);return r.reduce((function(t,r){var d,h=r.props,y=h.type,m=h.dataKey,v=h.allowDataOverflow,g=h.allowDuplicatedCategory,b=h.scale,x=h.ticks,w=h.includeHidden,O=r.props[o];if(t[O])return t;var k,S,j,A=qc(e.data,{graphicalItems:n.filter((function(e){return e.props[o]===O})),dataStartIndex:c,dataEndIndex:l}),P=A.length;(function(e,t,r){if("number"===r&&!0===t&&Array.isArray(e)){var n=null==e?void 0:e[0],i=null==e?void 0:e[1];if(n&&i&&ge(n)&&ge(i))return!0}return!1})(r.props.domain,v,y)&&(k=Wr(r.props.domain,null,v),!f||"number"!==y&&"auto"===b||(j=jr(A,m,"category")));var E=Gc(y);if(!k||0===k.length){var T,C=null!==(T=r.props.domain)&&void 0!==T?T:E;if(m){if(k=jr(A,m,y),"category"===y&&f){var I=function(e){if(!Array.isArray(e))return!1;for(var t=e.length,r={},n=0;n<t;n++){if(r[e[n]])return!0;r[e[n]]=!0}return!1}(k);g&&I?(S=k,k=$()(0,P)):g||(k=qr(C,k,r).reduce((function(e,t){return e.indexOf(t)>=0?e:[].concat(Rc(e),[t])}),[]))}else if("category"===y)k=g?k.filter((function(e){return""!==e&&!B()(e)})):qr(C,k,r).reduce((function(e,t){return e.indexOf(t)>=0||""===t||B()(t)?e:[].concat(Rc(e),[t])}),[]);else if("number"===y){var D=function(e,t,r,n,i){var o=t.map((function(t){return Pr(e,t,r,i,n)})).filter((function(e){return!B()(e)}));return o&&o.length?o.reduce((function(e,t){return[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}),[1/0,-1/0]):null}(A,n.filter((function(e){return e.props[o]===O&&(w||!e.props.hide)})),m,i,s);D&&(k=D)}!f||"number"!==y&&"auto"===b||(j=jr(A,m,"category"))}else k=f?$()(0,P):a&&a[O]&&a[O].hasStack&&"number"===y?"expand"===p?[0,1]:zr(a[O].stackGroups,c,l):Er(A,n.filter((function(e){return e.props[o]===O&&(w||!e.props.hide)})),y,s,!0);if("number"===y)k=hc(u,k,O,i,x),C&&(k=Wr(C,k,v));else if("category"===y&&C){var M=C;k.every((function(e){return M.indexOf(e)>=0}))&&(k=M)}}return _c(_c({},t),{},zc({},O,_c(_c({},r.props),{},{axisType:i,domain:k,categoricalDomain:j,duplicateDomain:S,originalDomain:null!==(d=r.props.domain)&&void 0!==d?d:E,isCategorical:f,layout:s})))}),{})}(e,{axes:p,graphicalItems:o,axisType:n,axisIdKey:u,stackGroups:a,dataStartIndex:c,dataEndIndex:l}):o&&o.length&&(f=function(e,t){var r=t.graphicalItems,n=t.Axis,i=t.axisType,o=t.axisIdKey,a=t.stackGroups,c=t.dataStartIndex,l=t.dataEndIndex,s=e.layout,u=e.children,p=qc(e.data,{graphicalItems:r,dataStartIndex:c,dataEndIndex:l}),f=p.length,d=Tr(s,i),h=-1;return r.reduce((function(e,t){var y,m=t.props[o],v=Gc("number");return e[m]?e:(h++,d?y=$()(0,f):a&&a[m]&&a[m].hasStack?(y=zr(a[m].stackGroups,c,l),y=hc(u,y,m,i)):(y=Wr(v,Er(p,r.filter((function(e){return e.props[o]===m&&!e.props.hide})),"number",s),n.defaultProps.allowDataOverflow),y=hc(u,y,m,i)),_c(_c({},e),{},zc({},m,_c(_c({axisType:i},n.defaultProps),{},{hide:!0,orientation:W()(Fc,"".concat(i,".").concat(h%2),null),domain:y,originalDomain:v,isCategorical:d,layout:s}))))}),{})}(e,{Axis:i,graphicalItems:o,axisType:n,axisIdKey:u,stackGroups:a,dataStartIndex:c,dataEndIndex:l})),f},Vc=function(e){var t=e.children,r=e.defaultShowTooltip,n=mt(t,qa),i=0,o=0;return e.data&&0!==e.data.length&&(o=e.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:Boolean(r)}},Yc=function(e){return"horizontal"===e?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:"vertical"===e?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:"centric"===e?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},Zc=function(e){var t,r=e.chartName,n=e.GraphicalChild,i=e.defaultTooltipEventType,o=void 0===i?"axis":i,a=e.validateTooltipEventTypes,c=void 0===a?["axis"]:a,l=e.axisComponents,s=e.legendContent,u=e.formatAxisMap,p=e.defaultProps,f=function(e,t){var i=e.props,o=e.dataStartIndex,a=e.dataEndIndex,c=e.updateId;if(!vt({props:i}))return null;var s=i.children,p=i.layout,f=i.stackOffset,d=i.data,h=i.reverseStackOrder,y=Yc(p),m=y.numericAxisName,v=y.cateAxisName,g=yt(s,n),b=function(e,t,r,n,i,o){if(!e)return null;var a=(o?t.reverse():t).reduce((function(e,t){var i=t.props,o=i.stackId;if(i.hide)return e;var a=t.props[r],c=e[a]||{hasStack:!1,stackGroups:{}};if(be(o)){var l=c.stackGroups[o]||{numericAxisId:r,cateAxisId:n,items:[]};l.items.push(t),c.hasStack=!0,c.stackGroups[o]=l}else c.stackGroups[we("_stackId_")]={numericAxisId:r,cateAxisId:n,items:[t]};return xr(xr({},e),{},wr({},a,c))}),{});return Object.keys(a).reduce((function(t,o){var c=a[o];return c.hasStack&&(c.stackGroups=Object.keys(c.stackGroups).reduce((function(t,o){var a=c.stackGroups[o];return xr(xr({},t),{},wr({},o,{numericAxisId:r,cateAxisId:n,items:a.items,stackedData:Br(e,a.items,i)}))}),{})),xr(xr({},t),{},wr({},o,c))}),{})}(d,g,"".concat(m,"Id"),"".concat(v,"Id"),f,h),x=l.reduce((function(e,t){var r="".concat(t.axisType,"Map");return _c(_c({},e),{},zc({},r,Kc(i,_c(_c({},t),{},{graphicalItems:g,stackGroups:t.axisType===m&&b,dataStartIndex:o,dataEndIndex:a}))))}),{}),w=function(e,t){var r=e.props,n=(e.graphicalItems,e.xAxisMap),i=void 0===n?{}:n,o=e.yAxisMap,a=void 0===o?{}:o,c=r.width,l=r.height,s=r.children,u=r.margin||{},p=mt(s,qa),f=mt(s,dr),d=Object.keys(a).reduce((function(e,t){var r=a[t],n=r.orientation;return r.mirror||r.hide?e:_c(_c({},e),{},zc({},n,e[n]+r.width))}),{left:u.left||0,right:u.right||0}),h=Object.keys(i).reduce((function(e,t){var r=i[t],n=r.orientation;return r.mirror||r.hide?e:_c(_c({},e),{},zc({},n,W()(e,"".concat(n))+r.height))}),{top:u.top||0,bottom:u.bottom||0}),y=_c(_c({},h),d),m=y.bottom;p&&(y.bottom+=p.props.height||qa.defaultProps.height),f&&t&&(y=function(e,t,r,n){var i=r.children,o=r.width,a=r.margin,c=o-(a.left||0)-(a.right||0),l=vr({children:i,legendWidth:c});if(l){var s=n||{},u=s.width,p=s.height,f=l.align,d=l.verticalAlign,h=l.layout;if(("vertical"===h||"horizontal"===h&&"middle"===d)&&"center"!==f&&ge(e[f]))return xr(xr({},e),{},wr({},f,e[f]+(u||0)));if(("horizontal"===h||"vertical"===h&&"center"===f)&&"middle"!==d&&ge(e[d]))return xr(xr({},e),{},wr({},d,e[d]+(p||0)))}return e}(y,0,r,t));var v=c-y.left-y.right,g=l-y.top-y.bottom;return _c(_c({brushBottom:m},y),{},{width:Math.max(v,0),height:Math.max(g,0)})}(_c(_c({},x),{},{props:i,graphicalItems:g}),null==t?void 0:t.legendBBox);Object.keys(x).forEach((function(e){x[e]=u(i,x[e],w,e.replace("Map",""),r)}));var O,k,S=x["".concat(v,"Map")],j=(O=ke(S),{tooltipTicks:k=Ir(O,!1,!0),orderedTooltipTicks:q()(k,(function(e){return e.coordinate})),tooltipAxis:O,tooltipAxisBandSize:Ur(O,k)}),A=function(e,t){var r=t.graphicalItems,n=t.stackGroups,i=t.offset,o=t.updateId,a=t.dataStartIndex,c=t.dataEndIndex,s=e.barSize,u=e.layout,p=e.barGap,f=e.barCategoryGap,d=e.maxBarSize,h=Yc(u),y=h.numericAxisName,m=h.cateAxisName,v=function(e){return!(!e||!e.length)&&e.some((function(e){var t=pt(e&&e.type);return t&&t.indexOf("Bar")>=0}))}(r),g=v&&function(e){var t=e.barSize,r=e.stackGroups,n=void 0===r?{}:r;if(!n)return{};for(var i={},o=Object.keys(n),a=0,c=o.length;a<c;a++)for(var l=n[o[a]].stackGroups,s=Object.keys(l),u=0,p=s.length;u<p;u++){var f=l[s[u]],d=f.items,h=f.cateAxisId,y=d.filter((function(e){return pt(e.type).indexOf("Bar")>=0}));if(y&&y.length){var m=y[0].props.barSize,v=y[0].props[h];i[v]||(i[v]=[]),i[v].push({item:y[0],stackList:y.slice(1),barSize:B()(m)?t:m})}}return i}({barSize:s,stackGroups:n}),b=[];return r.forEach((function(r,s){var h=qc(e.data,{graphicalItems:[r],dataStartIndex:a,dataEndIndex:c}),v=r.props,x=v.dataKey,w=v.maxBarSize,O=r.props["".concat(y,"Id")],k=r.props["".concat(m,"Id")],S=l.reduce((function(e,n){var i,o=t["".concat(n.axisType,"Map")],a=r.props["".concat(n.axisType,"Id")];o&&o[a]||"zAxis"===n.axisType||ee()(!1);var c=o[a];return _c(_c({},e),{},(zc(i={},n.axisType,c),zc(i,"".concat(n.axisType,"Ticks"),Ir(c)),i))}),{}),j=S[m],A=S["".concat(m,"Ticks")],P=n&&n[O]&&n[O].hasStack&&function(e,t){var r=e.props.stackId;if(be(r)){var n=t[r];if(n){var i=n.items.indexOf(e);return i>=0?n.stackedData[i]:null}}return null}(r,n[O].stackGroups),E=pt(r.type).indexOf("Bar")>=0,T=Ur(j,A),C=[];if(E){var I,D,M=B()(w)?d:w,R=null!==(I=null!==(D=Ur(j,A,!0))&&void 0!==D?D:M)&&void 0!==I?I:0;C=function(e){var t=e.barGap,r=e.barCategoryGap,n=e.bandSize,i=e.sizeList,o=void 0===i?[]:i,a=e.maxBarSize,c=o.length;if(c<1)return null;var l,s=Oe(t,n,0,!0),u=[];if(o[0].barSize===+o[0].barSize){var p=!1,f=n/c,d=o.reduce((function(e,t){return e+t.barSize||0}),0);(d+=(c-1)*s)>=n&&(d-=(c-1)*s,s=0),d>=n&&f>0&&(p=!0,d=c*(f*=.9));var h={offset:((n-d)/2>>0)-s,size:0};l=o.reduce((function(e,t){var r={item:t.item,position:{offset:h.offset+h.size+s,size:p?f:t.barSize}},n=[].concat(Or(e),[r]);return h=n[n.length-1].position,t.stackList&&t.stackList.length&&t.stackList.forEach((function(e){n.push({item:e,position:h})})),n}),u)}else{var y=Oe(r,n,0,!0);n-2*y-(c-1)*s<=0&&(s=0);var m=(n-2*y-(c-1)*s)/c;m>1&&(m>>=0);var v=a===+a?Math.min(m,a):m;l=o.reduce((function(e,t,r){var n=[].concat(Or(e),[{item:t.item,position:{offset:y+(m+s)*r+(m-v)/2,size:v}}]);return t.stackList&&t.stackList.length&&t.stackList.forEach((function(e){n.push({item:e,position:n[n.length-1].position})})),n}),u)}return l}({barGap:p,barCategoryGap:f,bandSize:R!==T?R:T,sizeList:g[k],maxBarSize:M}),R!==T&&(C=C.map((function(e){return _c(_c({},e),{},{position:_c(_c({},e.position),{},{offset:e.position.offset-R/2})})})))}var N,L,_,z=r&&r.type&&r.type.getComposedData;z&&b.push({props:_c(_c({},z(_c(_c({},S),{},{displayedData:h,props:e,dataKey:x,item:r,bandSize:T,barPosition:C,offset:i,stackedData:P,layout:u,dataStartIndex:a,dataEndIndex:c}))),{},(N={key:r.key||"item-".concat(s)},zc(N,y,S[y]),zc(N,m,S[m]),zc(N,"animationId",o),N)),childIndex:(L=r,_=e.children,ht(_).indexOf(L)),item:r})})),b}(i,_c(_c({},x),{},{dataStartIndex:o,dataEndIndex:a,updateId:c,graphicalItems:g,stackGroups:b,offset:w}));return _c(_c({formattedGraphicalItems:A,graphicalItems:g,offset:w,stackGroups:b},j),x)};return t=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ic(e,t)}(u,e);var t,n,i,a,l=(i=u,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Mc(i);if(a){var r=Mc(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Ac(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Dc(e)}(this,e)});function u(e){var t,n,i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),zc(Dc(i=l.call(this,e)),"eventEmitterSymbol",Symbol("rechartsEventEmitter")),zc(Dc(i),"accessibilityManager",new Oc),zc(Dc(i),"handleLegendBBoxUpdate",(function(e){if(e){var t=i.state,r=t.dataStartIndex,n=t.dataEndIndex,o=t.updateId;i.setState(_c({legendBBox:e},f({props:i.props,dataStartIndex:r,dataEndIndex:n,updateId:o},_c(_c({},i.state),{},{legendBBox:e}))))}})),zc(Dc(i),"handleReceiveSyncEvent",(function(e,t,r){if(i.props.syncId===e){if(r===i.eventEmitterSymbol&&"function"!=typeof i.props.syncMethod)return;i.applySyncEvent(t)}})),zc(Dc(i),"handleBrushChange",(function(e){var t=e.startIndex,r=e.endIndex;if(t!==i.state.dataStartIndex||r!==i.state.dataEndIndex){var n=i.state.updateId;i.setState((function(){return _c({dataStartIndex:t,dataEndIndex:r},f({props:i.props,dataStartIndex:t,dataEndIndex:r,updateId:n},i.state))})),i.triggerSyncEvent({dataStartIndex:t,dataEndIndex:r})}})),zc(Dc(i),"handleMouseEnter",(function(e){var t=i.getMouseInfo(e);if(t){var r=_c(_c({},t),{},{isTooltipActive:!0});i.setState(r),i.triggerSyncEvent(r);var n=i.props.onMouseEnter;_()(n)&&n(r,e)}})),zc(Dc(i),"triggeredAfterMouseMove",(function(e){var t=i.getMouseInfo(e),r=t?_c(_c({},t),{},{isTooltipActive:!0}):{isTooltipActive:!1};i.setState(r),i.triggerSyncEvent(r);var n=i.props.onMouseMove;_()(n)&&n(r,e)})),zc(Dc(i),"handleItemMouseEnter",(function(e){i.setState((function(){return{isTooltipActive:!0,activeItem:e,activePayload:e.tooltipPayload,activeCoordinate:e.tooltipPosition||{x:e.cx,y:e.cy}}}))})),zc(Dc(i),"handleItemMouseLeave",(function(){i.setState((function(){return{isTooltipActive:!1}}))})),zc(Dc(i),"handleMouseMove",(function(e){e.persist(),i.throttleTriggeredAfterMouseMove(e)})),zc(Dc(i),"handleMouseLeave",(function(e){var t={isTooltipActive:!1};i.setState(t),i.triggerSyncEvent(t);var r=i.props.onMouseLeave;_()(r)&&r(t,e)})),zc(Dc(i),"handleOuterEvent",(function(e){var t,r=function(e){var t=e&&e.type;return t&&ut[t]?ut[t]:null}(e),n=W()(i.props,"".concat(r));r&&_()(n)&&n(null!==(t=/.*touch.*/i.test(r)?i.getMouseInfo(e.changedTouches[0]):i.getMouseInfo(e))&&void 0!==t?t:{},e)})),zc(Dc(i),"handleClick",(function(e){var t=i.getMouseInfo(e);if(t){var r=_c(_c({},t),{},{isTooltipActive:!0});i.setState(r),i.triggerSyncEvent(r);var n=i.props.onClick;_()(n)&&n(r,e)}})),zc(Dc(i),"handleMouseDown",(function(e){var t=i.props.onMouseDown;_()(t)&&t(i.getMouseInfo(e),e)})),zc(Dc(i),"handleMouseUp",(function(e){var t=i.props.onMouseUp;_()(t)&&t(i.getMouseInfo(e),e)})),zc(Dc(i),"handleTouchMove",(function(e){null!=e.changedTouches&&e.changedTouches.length>0&&i.throttleTriggeredAfterMouseMove(e.changedTouches[0])})),zc(Dc(i),"handleTouchStart",(function(e){null!=e.changedTouches&&e.changedTouches.length>0&&i.handleMouseDown(e.changedTouches[0])})),zc(Dc(i),"handleTouchEnd",(function(e){null!=e.changedTouches&&e.changedTouches.length>0&&i.handleMouseUp(e.changedTouches[0])})),zc(Dc(i),"triggerSyncEvent",(function(e){void 0!==i.props.syncId&&mc.emit(vc,i.props.syncId,e,i.eventEmitterSymbol)})),zc(Dc(i),"applySyncEvent",(function(e){var t=i.props,r=t.layout,n=t.syncMethod,o=i.state.updateId,a=e.dataStartIndex,c=e.dataEndIndex;if(void 0!==e.dataStartIndex||void 0!==e.dataEndIndex)i.setState(_c({dataStartIndex:a,dataEndIndex:c},f({props:i.props,dataStartIndex:a,dataEndIndex:c,updateId:o},i.state)));else if(void 0!==e.activeTooltipIndex){var l=e.chartX,s=e.chartY,u=e.activeTooltipIndex,p=i.state,d=p.offset,h=p.tooltipTicks;if(!d)return;if("function"==typeof n)u=n(h,e);else if("value"===n){u=-1;for(var y=0;y<h.length;y++)if(h[y].value===e.activeLabel){u=y;break}}var m=_c(_c({},d),{},{x:d.left,y:d.top}),v=Math.min(l,m.x+m.width),g=Math.min(s,m.y+m.height),b=h[u]&&h[u].value,x=Hc(i.state,i.props.data,u),w=h[u]?{x:"horizontal"===r?h[u].coordinate:v,y:"horizontal"===r?g:h[u].coordinate}:Uc;i.setState(_c(_c({},e),{},{activeLabel:b,activeCoordinate:w,activePayload:x,activeTooltipIndex:u}))}else i.setState(e)})),zc(Dc(i),"verticalCoordinatesGenerator",(function(e,t){var r=e.xAxis,n=e.width,i=e.height,o=e.offset;return Cr(go(_c(_c(_c({},Pa.defaultProps),r),{},{ticks:Ir(r,!0),viewBox:{x:0,y:0,width:n,height:i}})),o.left,o.left+o.width,t)})),zc(Dc(i),"horizontalCoordinatesGenerator",(function(e,t){var r=e.yAxis,n=e.width,i=e.height,o=e.offset;return Cr(go(_c(_c(_c({},Pa.defaultProps),r),{},{ticks:Ir(r,!0),viewBox:{x:0,y:0,width:n,height:i}})),o.top,o.top+o.height,t)})),zc(Dc(i),"axesTicksGenerator",(function(e){return Ir(e,!0)})),zc(Dc(i),"renderCursor",(function(e){var t,n=i.state,o=n.isTooltipActive,a=n.activeCoordinate,c=n.activePayload,l=n.offset,s=n.activeTooltipIndex,u=n.tooltipAxisBandSize,p=i.getTooltipEventType(),f=null!==(t=e.props.active)&&void 0!==t?t:o;if(!e||!e.props.cursor||!f||!a||"ScatterChart"!==r&&"axis"!==p)return null;var d,h=i.props.layout,y=oa;if("ScatterChart"===r)d=a,y=pa;else if("BarChart"===r)d=function(e,t,r,n){var i=n/2;return{stroke:"none",fill:"#ccc",x:"horizontal"===e?t.x-i:r.left+.5,y:"horizontal"===e?r.top+.5:t.y-i,width:"horizontal"===e?n:r.width-1,height:"horizontal"===e?r.height-1:n}}(h,a,l,u),y=oi;else if("radial"===h){var v=se(a),g=v.cx,b=v.cy,x=v.radius;d={cx:g,cy:b,startAngle:v.startAngle,endAngle:v.endAngle,innerRadius:x,outerRadius:x},y=wi}else d={points:kc(h,a,l)},y=oa;var w=e.key||"_recharts-cursor",O=_c(_c(_c(_c({stroke:"#ccc",pointerEvents:"none"},l),d),xt(e.props.cursor)),{},{payload:c,payloadIndex:s,key:w,className:"recharts-tooltip-cursor"});return(0,m.isValidElement)(e.props.cursor)?(0,m.cloneElement)(e.props.cursor,O):(0,m.createElement)(y,O)})),zc(Dc(i),"renderPolarAxis",(function(e,t,r){var n=W()(e,"type.axisType"),o=W()(i.state,"".concat(n,"Map")),a=o&&o[e.props["".concat(n,"Id")]];return(0,m.cloneElement)(e,_c(_c({},a),{},{className:n,key:e.key||"".concat(t,"-").concat(r),ticks:Ir(a,!0)}))})),zc(Dc(i),"renderXAxis",(function(e,t,r){var n=i.state.xAxisMap[e.props.xAxisId];return i.renderAxis(n,e,t,r)})),zc(Dc(i),"renderYAxis",(function(e,t,r){var n=i.state.yAxisMap[e.props.yAxisId];return i.renderAxis(n,e,t,r)})),zc(Dc(i),"renderGrid",(function(e){var t=i.state,r=t.xAxisMap,n=t.yAxisMap,o=t.offset,a=i.props,c=a.width,l=a.height,s=ke(r),u=K()(n,(function(e){return Y()(e.domain,Number.isFinite)}))||ke(n),p=e.props||{};return(0,m.cloneElement)(e,{key:e.key||"grid",x:ge(p.x)?p.x:o.left,y:ge(p.y)?p.y:o.top,width:ge(p.width)?p.width:o.width,height:ge(p.height)?p.height:o.height,xAxis:s,yAxis:u,offset:o,chartWidth:c,chartHeight:l,verticalCoordinatesGenerator:p.verticalCoordinatesGenerator||i.verticalCoordinatesGenerator,horizontalCoordinatesGenerator:p.horizontalCoordinatesGenerator||i.horizontalCoordinatesGenerator})})),zc(Dc(i),"renderPolarGrid",(function(e){var t=e.props,r=t.radialLines,n=t.polarAngles,o=t.polarRadius,a=i.state,c=a.radiusAxisMap,l=a.angleAxisMap,s=ke(c),u=ke(l),p=u.cx,f=u.cy,d=u.innerRadius,h=u.outerRadius;return(0,m.cloneElement)(e,{polarAngles:Array.isArray(n)?n:Ir(u,!0).map((function(e){return e.coordinate})),polarRadius:Array.isArray(o)?o:Ir(s,!0).map((function(e){return e.coordinate})),cx:p,cy:f,innerRadius:d,outerRadius:h,key:e.key||"polar-grid",radialLines:r})})),zc(Dc(i),"renderLegend",(function(){var e=i.state.formattedGraphicalItems,t=i.props,r=t.children,n=t.width,o=t.height,a=i.props.margin||{},c=n-(a.left||0)-(a.right||0),l=vr({children:r,formattedGraphicalItems:e,legendWidth:c,legendContent:s});if(!l)return null;var u=l.item,p=Tc(l,Sc);return(0,m.cloneElement)(u,_c(_c({},p),{},{chartWidth:n,chartHeight:o,margin:a,onBBoxUpdate:i.handleLegendBBoxUpdate}))})),zc(Dc(i),"renderTooltip",(function(){var e,t=mt(i.props.children,Yo);if(!t)return null;var r=i.state,n=r.isTooltipActive,o=r.activeCoordinate,a=r.activePayload,c=r.activeLabel,l=r.offset,s=null!==(e=t.props.active)&&void 0!==e?e:n;return(0,m.cloneElement)(t,{viewBox:_c(_c({},l),{},{x:l.left,y:l.top}),active:s,label:c,payload:s?a:[],coordinate:o})})),zc(Dc(i),"renderBrush",(function(e){var t=i.props,r=t.margin,n=t.data,o=i.state,a=o.offset,c=o.dataStartIndex,l=o.dataEndIndex,s=o.updateId;return(0,m.cloneElement)(e,{key:e.key||"_recharts-brush",onChange:Mr(i.handleBrushChange,e.props.onChange),data:n,x:ge(e.props.x)?e.props.x:a.left,y:ge(e.props.y)?e.props.y:a.top+a.height+a.brushBottom-(r.bottom||0),width:ge(e.props.width)?e.props.width:a.width,startIndex:c,endIndex:l,updateId:"brush-".concat(s)})})),zc(Dc(i),"renderReferenceElement",(function(e,t,r){if(!e)return null;var n=Dc(i).clipPathId,o=i.state,a=o.xAxisMap,c=o.yAxisMap,l=o.offset,s=e.props,u=s.xAxisId,p=s.yAxisId;return(0,m.cloneElement)(e,{key:e.key||"".concat(t,"-").concat(r),xAxis:a[u],yAxis:c[p],viewBox:{x:l.left,y:l.top,width:l.width,height:l.height},clipPathId:n})})),zc(Dc(i),"renderActivePoints",(function(e){var t=e.item,r=e.activePoint,n=e.basePoint,i=e.childIndex,o=e.isRange,a=[],c=t.props.key,l=t.item.props,s=l.activeDot,p=_c(_c({index:i,dataKey:l.dataKey,cx:r.x,cy:r.y,r:4,fill:Ar(t.item),strokeWidth:2,stroke:"#fff",payload:r.payload,value:r.value,key:"".concat(c,"-activePoint-").concat(i)},xt(s)),it(s));return a.push(u.renderActiveDot(s,p)),n?a.push(u.renderActiveDot(s,_c(_c({},p),{},{cx:n.x,cy:n.y,key:"".concat(c,"-basePoint-").concat(i)}))):o&&a.push(null),a})),zc(Dc(i),"renderGraphicChild",(function(e,t,r){var n=i.filterFormatItem(e,t,r);if(!n)return null;var o=i.getTooltipEventType(),a=i.state,c=a.isTooltipActive,l=a.tooltipAxis,s=a.activeTooltipIndex,u=a.activeLabel,p=mt(i.props.children,Yo),f=n.props,d=f.points,h=f.isRange,y=f.baseLine,v=n.item.props,g=v.activeDot,b=v.hide,x=v.activeBar,w=v.activeShape,O=Boolean(!b&&c&&p&&(g||x||w)),k={};"axis"!==o&&p&&"click"===p.props.trigger?k={onClick:Mr(i.handleItemMouseEnter,e.props.onClick)}:"axis"!==o&&(k={onMouseLeave:Mr(i.handleItemMouseLeave,e.props.onMouseLeave),onMouseEnter:Mr(i.handleItemMouseEnter,e.props.onMouseEnter)});var S=(0,m.cloneElement)(e,_c(_c({},n.props),k));if(O){if(!(s>=0)){var j,A=(null!==(j=i.getItemByXY(i.state.activeCoordinate))&&void 0!==j?j:{graphicalItem:S}).graphicalItem,P=A.item,E=void 0===P?e:P,T=A.childIndex,C=_c(_c(_c({},n.props),k),{},{activeIndex:T});return[(0,m.cloneElement)(E,C),null,null]}var I,D;if(l.dataKey&&!l.allowDuplicatedCategory){var M="function"==typeof l.dataKey?function(e){return"function"==typeof l.dataKey?l.dataKey(e.payload):null}:"payload.".concat(l.dataKey.toString());I=je(d,M,u),D=h&&y&&je(y,M,u)}else I=null==d?void 0:d[s],D=h&&y&&y[s];if(w||x){var R=void 0!==e.props.activeIndex?e.props.activeIndex:s;return[(0,m.cloneElement)(e,_c(_c(_c({},n.props),k),{},{activeIndex:R})),null,null]}if(!B()(I))return[S].concat(Rc(i.renderActivePoints({item:n,activePoint:I,basePoint:D,childIndex:s,isRange:h})))}return h?[S,null,null]:[S,null]})),zc(Dc(i),"renderCustomized",(function(e,t,r){return(0,m.cloneElement)(e,_c(_c({key:"recharts-customized-".concat(r)},i.props),i.state))})),zc(Dc(i),"renderMap",{CartesianGrid:{handler:i.renderGrid,once:!0},ReferenceArea:{handler:i.renderReferenceElement},ReferenceLine:{handler:i.renderReferenceElement},ReferenceDot:{handler:i.renderReferenceElement},XAxis:{handler:i.renderXAxis},YAxis:{handler:i.renderYAxis},Brush:{handler:i.renderBrush,once:!0},Bar:{handler:i.renderGraphicChild},Line:{handler:i.renderGraphicChild},Area:{handler:i.renderGraphicChild},Radar:{handler:i.renderGraphicChild},RadialBar:{handler:i.renderGraphicChild},Scatter:{handler:i.renderGraphicChild},Pie:{handler:i.renderGraphicChild},Funnel:{handler:i.renderGraphicChild},Tooltip:{handler:i.renderCursor,once:!0},PolarGrid:{handler:i.renderPolarGrid,once:!0},PolarAngleAxis:{handler:i.renderPolarAxis},PolarRadiusAxis:{handler:i.renderPolarAxis},Customized:{handler:i.renderCustomized}}),i.clipPathId="".concat(null!==(t=e.id)&&void 0!==t?t:we("recharts"),"-clip"),i.throttleTriggeredAfterMouseMove=H()(i.triggeredAfterMouseMove,null!==(n=e.throttleDelay)&&void 0!==n?n:1e3/60),i.state={},i}return t=u,n=[{key:"componentDidMount",value:function(){var e,t;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:null!==(e=this.props.margin.left)&&void 0!==e?e:0,top:null!==(t=this.props.margin.top)&&void 0!==t?t:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout})}},{key:"getSnapshotBeforeUpdate",value:function(e,t){return this.props.accessibilityLayer?(this.state.tooltipTicks!==t.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==e.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==e.margin&&this.accessibilityManager.setDetails({offset:{left:null!==(r=this.props.margin.left)&&void 0!==r?r:0,top:null!==(n=this.props.margin.top)&&void 0!==n?n:0}}),null):null;var r,n}},{key:"componentDidUpdate",value:function(){}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var e=mt(this.props.children,Yo);if(e&&"boolean"==typeof e.props.shared){var t=e.props.shared?"axis":"item";return c.indexOf(t)>=0?t:o}return o}},{key:"getMouseInfo",value:function(e){if(!this.container)return null;var t,r=this.container,n=r.getBoundingClientRect(),i=(t=n).top+window.scrollY-document.documentElement.clientTop,o=t.left+window.scrollX-document.documentElement.clientLeft,a={chartX:Math.round(e.pageX-o),chartY:Math.round(e.pageY-i)},c=n.width/r.offsetWidth||1,l=this.inRange(a.chartX,a.chartY,c);if(!l)return null;var s=this.state,u=s.xAxisMap,p=s.yAxisMap;if("axis"!==this.getTooltipEventType()&&u&&p){var f=ke(u).scale,d=ke(p).scale,h=f&&f.invert?f.invert(a.chartX):null,y=d&&d.invert?d.invert(a.chartY):null;return _c(_c({},a),{},{xValue:h,yValue:y})}var m=Xc(this.state,this.props.data,this.props.layout,l);return m?_c(_c({},a),m):null}},{key:"inRange",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=this.props.layout,i=e/r,o=t/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 c=this.state,l=c.angleAxisMap,s=c.radiusAxisMap;if(l&&s){var u=ke(l);return le({x:i,y:o},u)}return null}},{key:"parseEventsOfWrapper",value:function(){var e=this.props.children,t=this.getTooltipEventType(),r=mt(e,Yo),n={};return r&&"axis"===t&&(n="click"===r.props.trigger?{onClick:this.handleClick}:{onMouseEnter:this.handleMouseEnter,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd}),_c(_c({},it(this.props,this.handleOuterEvent)),n)}},{key:"addListener",value:function(){mc.on(vc,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){mc.removeListener(vc,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(e,t,r){for(var n=this.state.formattedGraphicalItems,i=0,o=n.length;i<o;i++){var a=n[i];if(a.item===e||a.props.key===e.key||t===pt(a.item.type)&&r===a.childIndex)return a}return null}},{key:"renderAxis",value:function(e,t,r,n){var i=this.props,o=i.width,a=i.height;return v().createElement(Pa,Ec({},e,{className:Q()("recharts-".concat(e.axisType," ").concat(e.axisType),e.className),key:t.key||"".concat(r,"-").concat(n),viewBox:{x:0,y:0,width:o,height:a},ticksGenerator:this.axesTicksGenerator}))}},{key:"renderClipPath",value:function(){var e=this.clipPathId,t=this.state.offset,r=t.left,n=t.top,i=t.height,o=t.width;return v().createElement("defs",null,v().createElement("clipPath",{id:e},v().createElement("rect",{x:r,y:n,height:i,width:o})))}},{key:"getXScales",value:function(){var e=this.state.xAxisMap;return e?Object.entries(e).reduce((function(e,t){var r=Pc(t,2),n=r[0],i=r[1];return _c(_c({},e),{},zc({},n,i.scale))}),{}):null}},{key:"getYScales",value:function(){var e=this.state.yAxisMap;return e?Object.entries(e).reduce((function(e,t){var r=Pc(t,2),n=r[0],i=r[1];return _c(_c({},e),{},zc({},n,i.scale))}),{}):null}},{key:"getXScaleByAxisId",value:function(e){var t;return null===(t=this.state.xAxisMap)||void 0===t||null===(t=t[e])||void 0===t?void 0:t.scale}},{key:"getYScaleByAxisId",value:function(e){var t;return null===(t=this.state.yAxisMap)||void 0===t||null===(t=t[e])||void 0===t?void 0:t.scale}},{key:"getItemByXY",value:function(e){var t=this.state,r=t.formattedGraphicalItems,n=t.activeItem;if(r&&r.length)for(var i=0,o=r.length;i<o;i++){var a=r[i],c=a.props,l=a.item,s=pt(l.type);if("Bar"===s){var u=(c.data||[]).find((function(t){return ni(e,t)}));if(u)return{graphicalItem:a,payload:u}}else if("RadialBar"===s){var p=(c.data||[]).find((function(t){return le(e,t)}));if(p)return{graphicalItem:a,payload:p}}else if(Ti(a,n)||Ci(a,n)||Ii(a,n)){var f=Ni({graphicalItem:a,activeTooltipItem:n,itemData:l.props.data}),d=void 0===l.props.activeIndex?f:l.props.activeIndex;return{graphicalItem:_c(_c({},a),{},{childIndex:d}),payload:Ii(a,n)?l.props.data[f]:a.props.data[f]}}}return null}},{key:"render",value:function(){var e=this;if(!vt(this))return null;var t,r,n=this.props,i=n.children,o=n.className,a=n.width,c=n.height,l=n.style,s=n.compact,u=n.title,p=n.desc,f=Tc(n,jc),d=xt(f);if(s)return v().createElement(Rt,Ec({},d,{width:a,height:c,title:u,desc:p}),this.renderClipPath(),kt(i,this.renderMap));this.props.accessibilityLayer&&(d.tabIndex=null!==(t=this.props.tabIndex)&&void 0!==t?t:0,d.role=null!==(r=this.props.role)&&void 0!==r?r:"img",d.onKeyDown=function(t){e.accessibilityManager.keyboardEvent(t)},d.onFocus=function(){e.accessibilityManager.focus()});var h=this.parseEventsOfWrapper();return v().createElement("div",Ec({className:Q()("recharts-wrapper",o),style:_c({position:"relative",cursor:"default",width:a,height:c},l)},h,{ref:function(t){e.container=t},role:"region"}),v().createElement(Rt,Ec({},d,{width:a,height:c,title:u,desc:p,style:Wc}),this.renderClipPath(),kt(i,this.renderMap)),this.renderLegend(),this.renderTooltip())}}],n&&Cc(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),u}(m.Component),zc(t,"displayName",r),zc(t,"defaultProps",_c({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},p)),zc(t,"getDerivedStateFromProps",(function(e,t){var r=e.dataKey,n=e.data,i=e.children,o=e.width,a=e.height,c=e.layout,l=e.stackOffset,s=e.margin;if(void 0===t.updateId){var u=Vc(e);return _c(_c(_c({},u),{},{updateId:0},f(_c(_c({props:e},u),{},{updateId:0}),t)),{},{prevDataKey:r,prevData:n,prevWidth:o,prevHeight:a,prevLayout:c,prevStackOffset:l,prevMargin:s,prevChildren:i})}if(r!==t.prevDataKey||n!==t.prevData||o!==t.prevWidth||a!==t.prevHeight||c!==t.prevLayout||l!==t.prevStackOffset||!Qe(s,t.prevMargin)){var p=Vc(e),d={chartX:t.chartX,chartY:t.chartY,isTooltipActive:t.isTooltipActive},h=_c(_c({},Xc(t,n,c)),{},{updateId:t.updateId+1}),y=_c(_c(_c({},p),d),h);return _c(_c(_c({},y),f(_c({props:e},y),t)),{},{prevDataKey:r,prevData:n,prevWidth:o,prevHeight:a,prevLayout:c,prevStackOffset:l,prevMargin:s,prevChildren:i})}if(!wt(i,t.prevChildren)){var m=B()(n)?t.updateId+1:t.updateId;return _c(_c({updateId:m},f(_c(_c({props:e},t),{},{updateId:m}),t)),{},{prevChildren:i})}return null})),zc(t,"renderActiveDot",(function(e,t){var r;return r=(0,m.isValidElement)(e)?(0,m.cloneElement)(e,t):_()(e)?e(t):v().createElement(da,t),v().createElement(At,{className:"recharts-active-dot",key:t.key},r)})),t},Qc=["type","layout","connectNulls","ref"];function Jc(e){return Jc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Jc(e)}function el(){return el=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},el.apply(this,arguments)}function tl(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function rl(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?tl(Object(r),!0).forEach((function(t){sl(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tl(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function nl(e){return function(e){if(Array.isArray(e))return il(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return il(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?il(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function il(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function ol(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ul(n.key),n)}}function al(e,t){return al=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},al(e,t)}function cl(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ll(e){return ll=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ll(e)}function sl(e,t,r){return(t=ul(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ul(e){var t=function(e,t){if("object"!==Jc(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Jc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Jc(t)?t:String(t)}var pl=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&al(e,t)}(c,e);var t,r,n,i,o,a=(i=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ll(i);if(o){var r=ll(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Jc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return cl(e)}(this,e)});function c(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return sl(cl(e=a.call.apply(a,[this].concat(r))),"state",{isAnimationFinished:!0,totalLength:0}),sl(cl(e),"generateSimpleStrokeDasharray",(function(e,t){return"".concat(t,"px ").concat(e-t,"px")})),sl(cl(e),"getStrokeDasharray",(function(t,r,n){var i=n.reduce((function(e,t){return e+t}));if(!i)return e.generateSimpleStrokeDasharray(r,t);for(var o=Math.floor(t/i),a=t%i,l=r-t,s=[],u=0,p=0;u<n.length;p+=n[u],++u)if(p+n[u]>a){s=[].concat(nl(n.slice(0,u)),[a-p]);break}var f=s.length%2==0?[0,l]:[l];return[].concat(nl(c.repeat(n,o)),nl(s),f).map((function(e){return"".concat(e,"px")})).join(", ")})),sl(cl(e),"id",we("recharts-line-")),sl(cl(e),"pathRef",(function(t){e.mainCurve=t})),sl(cl(e),"handleAnimationEnd",(function(){e.setState({isAnimationFinished:!0}),e.props.onAnimationEnd&&e.props.onAnimationEnd()})),sl(cl(e),"handleAnimationStart",(function(){e.setState({isAnimationFinished:!1}),e.props.onAnimationStart&&e.props.onAnimationStart()})),e}return t=c,n=[{key:"getDerivedStateFromProps",value:function(e,t){return e.animationId!==t.prevAnimationId?{prevAnimationId:e.animationId,curPoints:e.points,prevPoints:t.curPoints}:e.points!==t.curPoints?{curPoints:e.points}:null}},{key:"repeat",value:function(e,t){for(var r=e.length%2!=0?[].concat(nl(e),[0]):e,n=[],i=0;i<t;++i)n=[].concat(nl(n),nl(r));return n}},{key:"renderDotItem",value:function(e,t){var r;if(v().isValidElement(e))r=v().cloneElement(e,t);else if(_()(e))r=e(t);else{var n=Q()("recharts-line-dot",e?e.className:"");r=v().createElement(da,el({},t,{className:n}))}return r}}],(r=[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var e=this.getTotalLength();this.setState({totalLength:e})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var e=this.getTotalLength();e!==this.state.totalLength&&this.setState({totalLength:e})}}},{key:"getTotalLength",value:function(){var e=this.mainCurve;try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch(e){return 0}}},{key:"renderErrorBar",value:function(e,t){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var r=this.props,n=r.points,i=r.xAxis,o=r.yAxis,a=r.layout,c=yt(r.children,Ct);if(!c)return null;var l=function(e,t){return{x:e.x,y:e.y,value:e.value,errorVal:Sr(e.payload,t)}},s={clipPath:e?"url(#clipPath-".concat(t,")"):null};return v().createElement(At,s,c.map((function(e){return v().cloneElement(e,{key:"bar-".concat(e.props.dataKey),data:n,xAxis:i,yAxis:o,layout:a,dataPointFormatter:l})})))}},{key:"renderDots",value:function(e,t,r){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var n=this.props,i=n.dot,o=n.points,a=n.dataKey,l=xt(this.props),s=xt(i,!0),u=o.map((function(e,t){var r=rl(rl(rl({key:"dot-".concat(t),r:3},l),s),{},{value:e.value,dataKey:a,cx:e.x,cy:e.y,index:t,payload:e.payload});return c.renderDotItem(i,r)})),p={clipPath:e?"url(#clipPath-".concat(t?"":"dots-").concat(r,")"):null};return v().createElement(At,el({className:"recharts-line-dots",key:"dots"},p),u)}},{key:"renderCurveStatically",value:function(e,t,r,n){var i=this.props,o=i.type,a=i.layout,c=i.connectNulls,l=(i.ref,function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(i,Qc)),s=rl(rl(rl({},xt(l,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:t?"url(#clipPath-".concat(r,")"):null,points:e},n),{},{type:o,layout:a,connectNulls:c});return v().createElement(oa,el({},s,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(e,t){var r=this,n=this.props,i=n.points,o=n.strokeDasharray,a=n.isAnimationActive,c=n.animationBegin,l=n.animationDuration,s=n.animationEasing,u=n.animationId,p=n.animateNewValues,f=n.width,d=n.height,h=this.state,y=h.prevPoints,m=h.totalLength;return v().createElement(Xr(),{begin:c,duration:l,isActive:a,easing:s,from:{t:0},to:{t:1},key:"line-".concat(u),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},(function(n){var a=n.t;if(y){var c=y.length/i.length,l=i.map((function(e,t){var r=Math.floor(t*c);if(y[r]){var n=y[r],i=Se(n.x,e.x),o=Se(n.y,e.y);return rl(rl({},e),{},{x:i(a),y:o(a)})}if(p){var l=Se(2*f,e.x),s=Se(d/2,e.y);return rl(rl({},e),{},{x:l(a),y:s(a)})}return rl(rl({},e),{},{x:e.x,y:e.y})}));return r.renderCurveStatically(l,e,t)}var s,u=Se(0,m)(a);if(o){var h="".concat(o).split(/[,\s]+/gim).map((function(e){return parseFloat(e)}));s=r.getStrokeDasharray(u,m,h)}else s=r.generateSimpleStrokeDasharray(m,u);return r.renderCurveStatically(i,e,t,{strokeDasharray:s})}))}},{key:"renderCurve",value:function(e,t){var r=this.props,n=r.points,i=r.isAnimationActive,o=this.state,a=o.prevPoints,c=o.totalLength;return i&&n&&n.length&&(!a&&c>0||!Xe()(a,n))?this.renderCurveWithAnimation(e,t):this.renderCurveStatically(n,e,t)}},{key:"render",value:function(){var e,t=this.props,r=t.hide,n=t.dot,i=t.points,o=t.className,a=t.xAxis,c=t.yAxis,l=t.top,s=t.left,u=t.width,p=t.height,f=t.isAnimationActive,d=t.id;if(r||!i||!i.length)return null;var h=this.state.isAnimationFinished,y=1===i.length,m=Q()("recharts-line",o),g=a&&a.allowDataOverflow,b=c&&c.allowDataOverflow,x=g||b,w=B()(d)?this.id:d,O=null!==(e=xt(n))&&void 0!==e?e:{r:3,strokeWidth:2},k=O.r,S=void 0===k?3:k,j=O.strokeWidth,A=void 0===j?2:j,P=(bt(n)?n:{}).clipDot,E=void 0===P||P,T=2*S+A;return v().createElement(At,{className:m},g||b?v().createElement("defs",null,v().createElement("clipPath",{id:"clipPath-".concat(w)},v().createElement("rect",{x:g?s:s-u/2,y:b?l:l-p/2,width:g?u:2*u,height:b?p:2*p})),!E&&v().createElement("clipPath",{id:"clipPath-dots-".concat(w)},v().createElement("rect",{x:s-T/2,y:l-T/2,width:u+T,height:p+T}))):null,!y&&this.renderCurve(x,w),this.renderErrorBar(x,w),(y||n)&&this.renderDots(x,E,w),(!f||h)&&Hn.renderCallByParent(this.props,i))}}])&&ol(t.prototype,r),n&&ol(t,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(m.PureComponent);sl(pl,"displayName","Line"),sl(pl,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!Ae.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1}),sl(pl,"getComposedData",(function(e){var t=e.props,r=e.xAxis,n=e.yAxis,i=e.xAxisTicks,o=e.yAxisTicks,a=e.dataKey,c=e.bandSize,l=e.displayedData,s=e.offset,u=t.layout;return rl({points:l.map((function(e,t){var l=Sr(e,a);return"horizontal"===u?{x:Lr({axis:r,ticks:i,bandSize:c,entry:e,index:t}),y:B()(l)?null:n.scale(l),value:l,payload:e}:{x:B()(l)?null:r.scale(l),y:Lr({axis:n,ticks:o,bandSize:c,entry:e,index:t}),value:l,payload:e}})),layout:u},s)}));var fl=function(){return null};fl.displayName="XAxis",fl.defaultProps={allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0};var dl=function(){return null};dl.displayName="YAxis",dl.defaultProps={allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1};var hl,yl=Zc({chartName:"LineChart",GraphicalChild:pl,axisComponents:[{axisType:"xAxis",AxisComp:fl},{axisType:"yAxis",AxisComp:dl}],formatAxisMap:co}),ml=Zc({chartName:"BarChart",GraphicalChild:eo,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:fl},{axisType:"yAxis",AxisComp:dl}],formatAxisMap:co}),vl=["layout","type","stroke","connectNulls","isRange","ref"];function gl(e){return gl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gl(e)}function bl(){return bl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},bl.apply(this,arguments)}function xl(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function wl(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?xl(Object(r),!0).forEach((function(t){Al(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xl(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ol(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Pl(n.key),n)}}function kl(e,t){return kl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},kl(e,t)}function Sl(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function jl(e){return jl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},jl(e)}function Al(e,t,r){return(t=Pl(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Pl(e){var t=function(e,t){if("object"!==gl(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==gl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===gl(t)?t:String(t)}var El=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&kl(e,t)}(c,e);var t,r,n,i,o,a=(i=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=jl(i);if(o){var r=jl(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===gl(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Sl(e)}(this,e)});function c(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Al(Sl(e=a.call.apply(a,[this].concat(r))),"state",{isAnimationFinished:!0}),Al(Sl(e),"id",we("recharts-area-")),Al(Sl(e),"handleAnimationEnd",(function(){var t=e.props.onAnimationEnd;e.setState({isAnimationFinished:!0}),_()(t)&&t()})),Al(Sl(e),"handleAnimationStart",(function(){var t=e.props.onAnimationStart;e.setState({isAnimationFinished:!1}),_()(t)&&t()})),e}return t=c,n=[{key:"getDerivedStateFromProps",value:function(e,t){return e.animationId!==t.prevAnimationId?{prevAnimationId:e.animationId,curPoints:e.points,curBaseLine:e.baseLine,prevPoints:t.curPoints,prevBaseLine:t.curBaseLine}:e.points!==t.curPoints||e.baseLine!==t.curBaseLine?{curPoints:e.points,curBaseLine:e.baseLine}:null}}],(r=[{key:"renderDots",value:function(e,t,r){var n=this.props.isAnimationActive,i=this.state.isAnimationFinished;if(n&&!i)return null;var o=this.props,a=o.dot,l=o.points,s=o.dataKey,u=xt(this.props),p=xt(a,!0),f=l.map((function(e,t){var r=wl(wl(wl({key:"dot-".concat(t),r:3},u),p),{},{dataKey:s,cx:e.x,cy:e.y,index:t,value:e.value,payload:e.payload});return c.renderDotItem(a,r)})),d={clipPath:e?"url(#clipPath-".concat(t?"":"dots-").concat(r,")"):null};return v().createElement(At,bl({className:"recharts-area-dots"},d),f)}},{key:"renderHorizontalRect",value:function(e){var t=this.props,r=t.baseLine,n=t.points,i=t.strokeWidth,o=n[0].x,a=n[n.length-1].x,c=e*Math.abs(o-a),l=ze()(n.map((function(e){return e.y||0})));return ge(r)&&"number"==typeof r?l=Math.max(r,l):r&&Array.isArray(r)&&r.length&&(l=Math.max(ze()(r.map((function(e){return e.y||0}))),l)),ge(l)?v().createElement("rect",{x:o<a?o:o-c,y:0,width:c,height:Math.floor(l+(i?parseInt("".concat(i),10):1))}):null}},{key:"renderVerticalRect",value:function(e){var t=this.props,r=t.baseLine,n=t.points,i=t.strokeWidth,o=n[0].y,a=n[n.length-1].y,c=e*Math.abs(o-a),l=ze()(n.map((function(e){return e.x||0})));return ge(r)&&"number"==typeof r?l=Math.max(r,l):r&&Array.isArray(r)&&r.length&&(l=Math.max(ze()(r.map((function(e){return e.x||0}))),l)),ge(l)?v().createElement("rect",{x:0,y:o<a?o:o-c,width:l+(i?parseInt("".concat(i),10):1),height:Math.floor(c)}):null}},{key:"renderClipRect",value:function(e){return"vertical"===this.props.layout?this.renderVerticalRect(e):this.renderHorizontalRect(e)}},{key:"renderAreaStatically",value:function(e,t,r,n){var i=this.props,o=i.layout,a=i.type,c=i.stroke,l=i.connectNulls,s=i.isRange,u=(i.ref,function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(i,vl));return v().createElement(At,{clipPath:r?"url(#clipPath-".concat(n,")"):null},v().createElement(oa,bl({},xt(u,!0),{points:e,connectNulls:l,type:a,baseLine:t,layout:o,stroke:"none",className:"recharts-area-area"})),"none"!==c&&v().createElement(oa,bl({},xt(this.props),{className:"recharts-area-curve",layout:o,type:a,connectNulls:l,fill:"none",points:e})),"none"!==c&&s&&v().createElement(oa,bl({},xt(this.props),{className:"recharts-area-curve",layout:o,type:a,connectNulls:l,fill:"none",points:t})))}},{key:"renderAreaWithAnimation",value:function(e,t){var r=this,n=this.props,i=n.points,o=n.baseLine,a=n.isAnimationActive,c=n.animationBegin,l=n.animationDuration,s=n.animationEasing,u=n.animationId,p=this.state,f=p.prevPoints,d=p.prevBaseLine;return v().createElement(Xr(),{begin:c,duration:l,isActive:a,easing:s,from:{t:0},to:{t:1},key:"area-".concat(u),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},(function(n){var a=n.t;if(f){var c,l=f.length/i.length,s=i.map((function(e,t){var r=Math.floor(t*l);if(f[r]){var n=f[r],i=Se(n.x,e.x),o=Se(n.y,e.y);return wl(wl({},e),{},{x:i(a),y:o(a)})}return e}));return c=ge(o)&&"number"==typeof o?Se(d,o)(a):B()(o)||de()(o)?Se(d,0)(a):o.map((function(e,t){var r=Math.floor(t*l);if(d[r]){var n=d[r],i=Se(n.x,e.x),o=Se(n.y,e.y);return wl(wl({},e),{},{x:i(a),y:o(a)})}return e})),r.renderAreaStatically(s,c,e,t)}return v().createElement(At,null,v().createElement("defs",null,v().createElement("clipPath",{id:"animationClipPath-".concat(t)},r.renderClipRect(a))),v().createElement(At,{clipPath:"url(#animationClipPath-".concat(t,")")},r.renderAreaStatically(i,o,e,t)))}))}},{key:"renderArea",value:function(e,t){var r=this.props,n=r.points,i=r.baseLine,o=r.isAnimationActive,a=this.state,c=a.prevPoints,l=a.prevBaseLine,s=a.totalLength;return o&&n&&n.length&&(!c&&s>0||!Xe()(c,n)||!Xe()(l,i))?this.renderAreaWithAnimation(e,t):this.renderAreaStatically(n,i,e,t)}},{key:"render",value:function(){var e,t=this.props,r=t.hide,n=t.dot,i=t.points,o=t.className,a=t.top,c=t.left,l=t.xAxis,s=t.yAxis,u=t.width,p=t.height,f=t.isAnimationActive,d=t.id;if(r||!i||!i.length)return null;var h=this.state.isAnimationFinished,y=1===i.length,m=Q()("recharts-area",o),g=l&&l.allowDataOverflow,b=s&&s.allowDataOverflow,x=g||b,w=B()(d)?this.id:d,O=null!==(e=xt(n))&&void 0!==e?e:{r:3,strokeWidth:2},k=O.r,S=void 0===k?3:k,j=O.strokeWidth,A=void 0===j?2:j,P=(bt(n)?n:{}).clipDot,E=void 0===P||P,T=2*S+A;return v().createElement(At,{className:m},g||b?v().createElement("defs",null,v().createElement("clipPath",{id:"clipPath-".concat(w)},v().createElement("rect",{x:g?c:c-u/2,y:b?a:a-p/2,width:g?u:2*u,height:b?p:2*p})),!E&&v().createElement("clipPath",{id:"clipPath-dots-".concat(w)},v().createElement("rect",{x:c-T/2,y:a-T/2,width:u+T,height:p+T}))):null,y?null:this.renderArea(x,w),(n||y)&&this.renderDots(x,E,w),(!f||h)&&Hn.renderCallByParent(this.props,i))}}])&&Ol(t.prototype,r),n&&Ol(t,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(m.PureComponent);hl=El,Al(El,"displayName","Area"),Al(El,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!Ae.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"}),Al(El,"getBaseValue",(function(e,t,r,n){var i=e.layout,o=e.baseValue,a=t.props.baseValue,c=null!=a?a:o;if(ge(c)&&"number"==typeof c)return c;var l="horizontal"===i?n:r,s=l.scale.domain();if("number"===l.type){var u=Math.max(s[0],s[1]),p=Math.min(s[0],s[1]);return"dataMin"===c?p:"dataMax"===c||u<0?u:Math.max(Math.min(s[0],s[1]),0)}return"dataMin"===c?s[0]:"dataMax"===c?s[1]:s[0]})),Al(El,"getComposedData",(function(e){var t,r=e.props,n=e.item,i=e.xAxis,o=e.yAxis,a=e.xAxisTicks,c=e.yAxisTicks,l=e.bandSize,s=e.dataKey,u=e.stackedData,p=e.dataStartIndex,f=e.displayedData,d=e.offset,h=r.layout,y=u&&u.length,m=hl.getBaseValue(r,n,i,o),v="horizontal"===h,g=!1,b=f.map((function(e,t){var r;y?r=u[p+t]:(r=Sr(e,s),Array.isArray(r)?g=!0:r=[m,r]);var n=null==r[1]||y&&null==Sr(e,s);return v?{x:Lr({axis:i,ticks:a,bandSize:l,entry:e,index:t}),y:n?null:o.scale(r[1]),value:r,payload:e}:{x:n?null:i.scale(r[1]),y:Lr({axis:o,ticks:c,bandSize:l,entry:e,index:t}),value:r,payload:e}}));return t=y||g?b.map((function(e){var t=Array.isArray(e.value)?e.value[0]:null;return v?{x:e.x,y:null!=t&&null!=e.y?o.scale(t):null}:{x:null!=t?i.scale(t):null,y:e.y}})):v?o.scale(m):i.scale(m),wl({points:b,baseLine:t,layout:h,isRange:g},d)})),Al(El,"renderDotItem",(function(e,t){return v().isValidElement(e)?v().cloneElement(e,t):_()(e)?e(t):v().createElement(da,bl({},t,{className:"recharts-area-dot"}))}));var Tl=Zc({chartName:"AreaChart",GraphicalChild:El,axisComponents:[{axisType:"xAxis",AxisComp:fl},{axisType:"yAxis",AxisComp:dl}],formatAxisMap:co});function Cl(e){return Cl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Cl(e)}function Il(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Dl(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Il(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==Cl(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Cl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Cl(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Il(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ml(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Rl=(0,m.forwardRef)((function(e,t){var r=e.aspect,n=e.initialDimension,i=void 0===n?{width:-1,height:-1}:n,o=e.width,a=void 0===o?"100%":o,c=e.height,l=void 0===c?"100%":c,s=e.minWidth,u=void 0===s?0:s,p=e.minHeight,f=e.maxHeight,d=e.children,h=e.debounce,y=void 0===h?0:h,g=e.id,b=e.className,x=e.onResize,w=e.style,O=void 0===w?{}:w,k=(0,m.useRef)(null),S=(0,m.useRef)();S.current=x,(0,m.useImperativeHandle)(t,(function(){return k}));var j,A,P=(j=(0,m.useState)({containerWidth:i.width,containerHeight:i.height}),A=2,function(e){if(Array.isArray(e))return e}(j)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,c=[],l=!0,s=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){s=!0,i=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw i}}return c}}(j,A)||function(e,t){if(e){if("string"==typeof e)return Ml(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ml(e,t):void 0}}(j,A)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),E=P[0],T=P[1],C=(0,m.useCallback)((function(e,t){T((function(r){var n=Math.round(e),i=Math.round(t);return r.containerWidth===n&&r.containerHeight===i?r:{containerWidth:n,containerHeight:i}}))}),[]);(0,m.useEffect)((function(){var e=function(e){var t,r=e[0].contentRect,n=r.width,i=r.height;C(n,i),null===(t=S.current)||void 0===t||t.call(S,n,i)};y>0&&(e=H()(e,y,{trailing:!0,leading:!1}));var t=new ResizeObserver(e),r=k.current.getBoundingClientRect(),n=r.width,i=r.height;return C(n,i),t.observe(k.current),function(){t.disconnect()}}),[C,y]);var I=(0,m.useMemo)((function(){var e=E.containerWidth,t=E.containerHeight;if(e<0||t<0)return null;It(ve(a)||ve(l),"The width(%s) and height(%s) are both fixed numbers,\n maybe you don't need to use a ResponsiveContainer.",a,l),It(!r||r>0,"The aspect(%s) must be greater than zero.",r);var n=ve(a)?e:a,i=ve(l)?t:l;r&&r>0&&(n?i=n/r:i&&(n=i*r),f&&i>f&&(i=f)),It(n>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.",n,i,a,l,u,p,r);var o=!Array.isArray(d)&&(0,Ze.isElement)(d)&&pt(d.type).endsWith("Chart");return v().Children.map(d,(function(e){return(0,Ze.isElement)(e)?(0,m.cloneElement)(e,Dl({width:n,height:i},o?{style:Dl({height:"100%",width:"100%",maxHeight:i,maxWidth:n},e.props.style)}:{})):e}))}),[r,d,l,f,p,u,E,a]);return v().createElement("div",{id:g?"".concat(g):void 0,className:Q()("recharts-responsive-container",b),style:Dl(Dl({},O),{},{width:a,height:l,minWidth:u,minHeight:p,maxHeight:f}),ref:k},I)})),Nl=r(450),Bl=r.n(Nl);function Ll(e){var t=new Date,r=new Date(e);return Math.floor((t.getTime()-r.getTime())/1e3)}var _l,zl=function(e){return e.charAt(0).toUpperCase()+e.slice(1)};!function(e){e[e.HOUR=0]="HOUR",e[e.MONTH_DATE=1]="MONTH_DATE"}(_l||(_l={}));var $l=function(){return $l=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},$l.apply(this,arguments)},Fl={line:yl,bar:ml,area:Tl};function Wl(e){var t={};return e.forEach((function(e){t[e]=!0})),t}function Ul(e){var t=(0,m.useState)(e.defaultChartType||"line"),r=t[0],n=t[1],i=(0,m.useState)(null),o=i[0],a=i[1],l=(0,m.useState)(e.timeSeries),s=l[0],u=l[1],p=s.length>0?Object.keys(s[0]):[],f=p[0],d=p.slice(1),h=(0,m.useState)(Wl(d)),y=h[0],v=h[1];(0,m.useEffect)((function(){if(e.updatedData&&e.updatedData.length>0){var t=function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}([],e.timeSeries,!0);e.updatedData.forEach((function(e){t=t.concat(e.timeSeries),u(t)}))}}),[e.timeSeries,e.updatedData]);var g=Fl[r];function b(e){o?a(null):e&&a(e.currentTarget)}function w(t,r){return y[t]?e.chartColors[r%e.chartColors.length]:"grey"}function k(e){return y[e]?"none":"line-through"}function j(t){var r,n,i,o,a,c,l,s;return o=t,r=e.timeSeries[e.timeSeries.length-1],n=e.timeSeries[0],i=r[f]-n[f],a=(e.timeSeries.length>0?i/60/60/24:0)<=1?_l.HOUR:_l.MONTH_DATE,l=new Date(o),s=navigator.language,c=a===_l.HOUR?{hour:"numeric",minute:"2-digit",hour12:!0}:{month:"short",day:"numeric"},l.toLocaleString(s,c)}return 0===s.length?(0,c.jsx)(D(),{variant:"body2",children:"No data available"}):(0,c.jsxs)(R(),{className:"rustic-recharts-time-series","data-cy":"".concat(r,"-chart"),children:[!e.disableChartTypeToggle&&(0,c.jsxs)(S(),{className:"rustic-recharts-time-series-chart-toggle",children:[(0,c.jsx)(A(),{"aria-label":"chart options","aria-expanded":Boolean(o),"aria-haspopup":"true",onClick:b,children:(0,c.jsx)(O(),{sx:{color:"primary.main"}})}),(0,c.jsxs)(E(),{anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},anchorEl:o,open:Boolean(o),onClose:function(e){return b(e)},children:[(0,c.jsx)(D(),{className:"rustic-recharts-time-series-chart-toggle-title",children:"Chart Types:"}),Object.keys(Fl).map((function(e){return(0,c.jsxs)(C(),{value:e,selected:e===r,onClick:function(){return function(e){n(e),b()}(e)},children:[e.charAt(0).toUpperCase()+e.slice(1)," ","Chart"]},e)}))]})]}),(0,c.jsxs)(R(),{children:[e.title&&(0,c.jsx)(D(),{variant:"subtitle2",className:"rustic-recharts-time-series-title","data-cy":"time-series-title",children:e.title}),e.description&&(0,c.jsx)(D(),{variant:"caption",className:"rustic-recharts-time-series-description",children:e.description}),(0,c.jsx)(Rl,{aspect:e.aspectRatio,width:e.width,maxHeight:e.maxHeight,minWidth:e.minChartWidth,children:(0,c.jsxs)(g,{data:s,margin:e.chartContainerMargin,children:[(0,c.jsx)(fl,{dataKey:f,tickFormatter:j}),(0,c.jsx)(dl,{domain:["auto","auto"],width:e.yAxisLabelWidth,tickFormatter:e.yAxisTickFormatter}),(0,c.jsx)(Yo,{labelFormatter:function(e){return[j(e)]},formatter:e.tooltipFormatter}),(0,c.jsx)(dr,{content:function(){return(0,c.jsx)(R(),{className:"rustic-recharts-time-series-legend",children:d.map((function(e,t){return(0,c.jsxs)(R(),{className:"rustic-recharts-time-series-legend-item",onClick:function(){return function(e){var t,r=y[e]&&!d.find((function(t){return t!==e&&y[t]}));if(function(e){return Object.values(e).every((function(e){return!0===e}))}(y)){for(var n={},i=0,o=d;i<o.length;i++){var a=o[i],c=a===e;n[a]=c}v(n)}else v(r?Wl(d):$l($l({},y),((t={})[e]=!y[e],t)))}(e)},"data-cy":"legend-item",children:[(0,c.jsx)(x(),{sx:{color:w(e,t)}}),(0,c.jsx)(D(),{variant:"body2",display:"inline",sx:{color:w(e,t),textDecorationLine:k(e)},children:e})]},t)}))})}}),d.map((function(t,n){return y[t]?function(t,n){var i=n%e.chartColors.length,o=y[t]?e.chartColors[i]:"transparent",a={onClick:e.onClick,cursor:"pointer"};switch(r){case"line":return(0,c.jsx)(pl,{type:"monotone",isAnimationActive:!1,dataKey:t,name:t,dot:!1,stroke:o,activeDot:e.onClick&&a},t);case"bar":return(0,c.jsx)(eo,{dataKey:t,fill:o,onClick:e.onClick&&a.onClick,cursor:e.onClick&&a.cursor},t);case"area":return(0,c.jsxs)(m.Fragment,{children:[(0,c.jsx)("defs",{children:(0,c.jsxs)("linearGradient",{id:"color".concat(t),x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,c.jsx)("stop",{offset:"5%",stopColor:o,stopOpacity:.8}),(0,c.jsx)("stop",{offset:"95%",stopColor:o,stopOpacity:0})]})}),(0,c.jsx)(El,{isAnimationActive:!1,dataKey:t,type:"monotone",stroke:o,fillOpacity:1,fill:"url(#color".concat(t,")"),activeDot:e.onClick&&a},t)]},t)}}(t,n):null})),e.referenceLineYAxis&&e.referenceLineYAxis.map((function(t,r){return(0,c.jsx)(ac,{y:t,label:e.referenceLineLabel&&e.referenceLineLabel[r],stroke:e.referenceLineColor&&e.referenceLineColor[r],strokeDasharray:"3 3",ifOverflow:"extendDomain",strokeWidth:e.referenceLineStrokeWidth&&e.referenceLineStrokeWidth[r],isFront:!0},r)}))]})})]})]})}Ul.defaultProps={minChartWidth:200,maxHeight:600,yAxisLabelWidth:30,aspectRatio:16/9,disableChartTypeToggle:!1};const ql=Ul;var Gl=function(){return Gl=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Gl.apply(this,arguments)};const Hl=function(e){var t=e.supportedElements[e.message.format];return(0,c.jsx)(c.Fragment,{children:t?v().createElement(t,Gl(Gl({},e.message.data),e.message.threadMessagesData&&{updatedData:e.message.threadMessagesData})):(0,c.jsxs)(D(),{variant:"body2",children:["Unsupported element format: ",e.message.format]})})},Xl=require("@mui/material/CircularProgress");var Kl=r.n(Xl);function Vl(e){var t=(0,m.useState)(!0),r=t[0],n=t[1],i=(0,m.useState)(""),o=i[0],a=i[1];return o.length>0?(0,c.jsx)(D(),{variant:"body2",children:o}):(0,c.jsxs)(c.Fragment,{children:[r&&(0,c.jsx)(Kl(),{"data-cy":"spinner"}),(0,c.jsx)("img",{src:e.url,alt:e.alt,width:e.width,height:e.height,onError:function(){a("Image failed to load"),n(!1)},onLoad:function(){n(!1)}})]})}Vl.defaultProps={alt:"An image is displayed",width:200,height:200},require("ol/ol.css");const Yl=require("@mui/icons-material/Place");var Zl=r.n(Yl);const Ql=require("@mui/material/Alert");var Jl=r.n(Ql);const es=require("ol/layer/Tile.js");var ts=r.n(es);const rs=require("ol/Map.js");var ns=r.n(rs);const is=require("ol/Overlay.js");var os=r.n(is);const as=require("ol/proj.js"),cs=require("ol/source/OSM.js");var ls=r.n(cs);const ss=require("ol/View.js");var us=r.n(ss);function ps(e){var t=(0,m.useState)(""),r=t[0],n=t[1],i=(0,m.useRef)(null),o=(0,m.useRef)(null);return(0,m.useEffect)((function(){if(n(""),e.latitude<-90||e.latitude>90||e.longitude<-180||e.longitude>180)return n("Invalid coordinates");if(i.current&&o.current){var t=new(ns())({layers:[new(ts())({source:new(ls())})],view:new(us())({center:(0,as.fromLonLat)([e.longitude,e.latitude]),zoom:e.zoom}),target:i.current}),r=new(os())({element:o.current,position:(0,as.fromLonLat)([e.longitude,e.latitude]),positioning:"bottom-center",stopEvent:!1});return t.addOverlay(r),t.once("postrender",(function(){var e;if(!(null===(e=i.current)||void 0===e?void 0:e.querySelector("canvas")))return n("An error occurred while loading the map")})),function(){t.setTarget(""),t.removeOverlay(r)}}}),[e.longitude,e.latitude,e.zoom]),(0,c.jsxs)(d(),{"data-cy":"map",children:[(0,c.jsx)(d(),{children:r&&(0,c.jsx)(Jl(),{severity:"error",children:r})}),(0,c.jsx)(d(),{ref:o,children:(0,c.jsx)(Zl(),{sx:{fontSize:e.markerSize}})}),(0,c.jsx)("div",{ref:i,style:{width:"".concat(e.width,"px"),height:"".concat(e.height,"px")}})]})}ps.defaultProps={zoom:12,width:300,height:300,markerSize:50};const{entries:fs,setPrototypeOf:ds,isFrozen:hs,getPrototypeOf:ys,getOwnPropertyDescriptor:ms}=Object;let{freeze:vs,seal:gs,create:bs}=Object,{apply:xs,construct:ws}="undefined"!=typeof Reflect&&Reflect;vs||(vs=function(e){return e}),gs||(gs=function(e){return e}),xs||(xs=function(e,t,r){return e.apply(t,r)}),ws||(ws=function(e,t){return new e(...t)});const Os=Rs(Array.prototype.forEach),ks=Rs(Array.prototype.pop),Ss=Rs(Array.prototype.push),js=Rs(String.prototype.toLowerCase),As=Rs(String.prototype.toString),Ps=Rs(String.prototype.match),Es=Rs(String.prototype.replace),Ts=Rs(String.prototype.indexOf),Cs=Rs(String.prototype.trim),Is=Rs(RegExp.prototype.test),Ds=(Ms=TypeError,function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return ws(Ms,t)});var Ms;function Rs(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return xs(e,t,n)}}function Ns(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:js;ds&&ds(e,null);let n=t.length;for(;n--;){let i=t[n];if("string"==typeof i){const e=r(i);e!==i&&(hs(t)||(t[n]=e),i=e)}e[i]=!0}return e}function Bs(e){const t=bs(null);for(const[r,n]of fs(e))void 0!==ms(e,r)&&(t[r]=n);return t}function Ls(e,t){for(;null!==e;){const r=ms(e,t);if(r){if(r.get)return Rs(r.get);if("function"==typeof r.value)return Rs(r.value)}e=ys(e)}return function(e){return console.warn("fallback value for",e),null}}const _s=vs(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),zs=vs(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),$s=vs(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Fs=vs(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Ws=vs(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Us=vs(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),qs=vs(["#text"]),Gs=vs(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),Hs=vs(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Xs=vs(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Ks=vs(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Vs=gs(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Ys=gs(/<%[\w\W]*|[\w\W]*%>/gm),Zs=gs(/\${[\w\W]*}/gm),Qs=gs(/^data-[\-\w.\u00B7-\uFFFF]/),Js=gs(/^aria-[\-\w]+$/),eu=gs(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),tu=gs(/^(?:\w+script|data):/i),ru=gs(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),nu=gs(/^html$/i);var iu=Object.freeze({__proto__:null,MUSTACHE_EXPR:Vs,ERB_EXPR:Ys,TMPLIT_EXPR:Zs,DATA_ATTR:Qs,ARIA_ATTR:Js,IS_ALLOWED_URI:eu,IS_SCRIPT_OR_DATA:tu,ATTR_WHITESPACE:ru,DOCTYPE_NAME:nu});const ou=function(){return"undefined"==typeof window?null:window};var au=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ou();const r=t=>e(t);if(r.version="3.0.6",r.removed=[],!t||!t.document||9!==t.document.nodeType)return r.isSupported=!1,r;let{document:n}=t;const i=n,o=i.currentScript,{DocumentFragment:a,HTMLTemplateElement:c,Node:l,Element:s,NodeFilter:u,NamedNodeMap:p=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:f,DOMParser:d,trustedTypes:h}=t,y=s.prototype,m=Ls(y,"cloneNode"),v=Ls(y,"nextSibling"),g=Ls(y,"childNodes"),b=Ls(y,"parentNode");if("function"==typeof c){const e=n.createElement("template");e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let x,w="";const{implementation:O,createNodeIterator:k,createDocumentFragment:S,getElementsByTagName:j}=n,{importNode:A}=i;let P={};r.isSupported="function"==typeof fs&&"function"==typeof b&&O&&void 0!==O.createHTMLDocument;const{MUSTACHE_EXPR:E,ERB_EXPR:T,TMPLIT_EXPR:C,DATA_ATTR:I,ARIA_ATTR:D,IS_SCRIPT_OR_DATA:M,ATTR_WHITESPACE:R}=iu;let{IS_ALLOWED_URI:N}=iu,B=null;const L=Ns({},[..._s,...zs,...$s,...Ws,...qs]);let _=null;const z=Ns({},[...Gs,...Hs,...Xs,...Ks]);let $=Object.seal(bs(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),F=null,W=null,U=!0,q=!0,G=!1,H=!0,X=!1,K=!1,V=!1,Y=!1,Z=!1,Q=!1,J=!1,ee=!0,te=!1,re=!0,ne=!1,ie={},oe=null;const ae=Ns({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let ce=null;const le=Ns({},["audio","video","img","source","image","track"]);let se=null;const ue=Ns({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),pe="http://www.w3.org/1998/Math/MathML",fe="http://www.w3.org/2000/svg",de="http://www.w3.org/1999/xhtml";let he=de,ye=!1,me=null;const ve=Ns({},[pe,fe,de],As);let ge=null;const be=["application/xhtml+xml","text/html"];let xe=null,we=null;const Oe=n.createElement("form"),ke=function(e){return e instanceof RegExp||e instanceof Function},Se=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!we||we!==e){if(e&&"object"==typeof e||(e={}),e=Bs(e),ge=ge=-1===be.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,xe="application/xhtml+xml"===ge?As:js,B="ALLOWED_TAGS"in e?Ns({},e.ALLOWED_TAGS,xe):L,_="ALLOWED_ATTR"in e?Ns({},e.ALLOWED_ATTR,xe):z,me="ALLOWED_NAMESPACES"in e?Ns({},e.ALLOWED_NAMESPACES,As):ve,se="ADD_URI_SAFE_ATTR"in e?Ns(Bs(ue),e.ADD_URI_SAFE_ATTR,xe):ue,ce="ADD_DATA_URI_TAGS"in e?Ns(Bs(le),e.ADD_DATA_URI_TAGS,xe):le,oe="FORBID_CONTENTS"in e?Ns({},e.FORBID_CONTENTS,xe):ae,F="FORBID_TAGS"in e?Ns({},e.FORBID_TAGS,xe):{},W="FORBID_ATTR"in e?Ns({},e.FORBID_ATTR,xe):{},ie="USE_PROFILES"in e&&e.USE_PROFILES,U=!1!==e.ALLOW_ARIA_ATTR,q=!1!==e.ALLOW_DATA_ATTR,G=e.ALLOW_UNKNOWN_PROTOCOLS||!1,H=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,X=e.SAFE_FOR_TEMPLATES||!1,K=e.WHOLE_DOCUMENT||!1,Z=e.RETURN_DOM||!1,Q=e.RETURN_DOM_FRAGMENT||!1,J=e.RETURN_TRUSTED_TYPE||!1,Y=e.FORCE_BODY||!1,ee=!1!==e.SANITIZE_DOM,te=e.SANITIZE_NAMED_PROPS||!1,re=!1!==e.KEEP_CONTENT,ne=e.IN_PLACE||!1,N=e.ALLOWED_URI_REGEXP||eu,he=e.NAMESPACE||de,$=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ke(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&($.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ke(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&($.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&($.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),X&&(q=!1),Q&&(Z=!0),ie&&(B=Ns({},[...qs]),_=[],!0===ie.html&&(Ns(B,_s),Ns(_,Gs)),!0===ie.svg&&(Ns(B,zs),Ns(_,Hs),Ns(_,Ks)),!0===ie.svgFilters&&(Ns(B,$s),Ns(_,Hs),Ns(_,Ks)),!0===ie.mathMl&&(Ns(B,Ws),Ns(_,Xs),Ns(_,Ks))),e.ADD_TAGS&&(B===L&&(B=Bs(B)),Ns(B,e.ADD_TAGS,xe)),e.ADD_ATTR&&(_===z&&(_=Bs(_)),Ns(_,e.ADD_ATTR,xe)),e.ADD_URI_SAFE_ATTR&&Ns(se,e.ADD_URI_SAFE_ATTR,xe),e.FORBID_CONTENTS&&(oe===ae&&(oe=Bs(oe)),Ns(oe,e.FORBID_CONTENTS,xe)),re&&(B["#text"]=!0),K&&Ns(B,["html","head","body"]),B.table&&(Ns(B,["tbody"]),delete F.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw Ds('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw Ds('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');x=e.TRUSTED_TYPES_POLICY,w=x.createHTML("")}else void 0===x&&(x=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let r=null;const n="data-tt-policy-suffix";t&&t.hasAttribute(n)&&(r=t.getAttribute(n));const i="dompurify"+(r?"#"+r:"");try{return e.createPolicy(i,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+i+" could not be created."),null}}(h,o)),null!==x&&"string"==typeof w&&(w=x.createHTML(""));vs&&vs(e),we=e}},je=Ns({},["mi","mo","mn","ms","mtext"]),Ae=Ns({},["foreignobject","desc","title","annotation-xml"]),Pe=Ns({},["title","style","font","a","script"]),Ee=Ns({},zs);Ns(Ee,$s),Ns(Ee,Fs);const Te=Ns({},Ws);Ns(Te,Us);const Ce=function(e){Ss(r.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},Ie=function(e,t){try{Ss(r.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){Ss(r.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!_[e])if(Z||Q)try{Ce(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},De=function(e){let t=null,r=null;if(Y)e="<remove></remove>"+e;else{const t=Ps(e,/^[\r\n\t ]+/);r=t&&t[0]}"application/xhtml+xml"===ge&&he===de&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const i=x?x.createHTML(e):e;if(he===de)try{t=(new d).parseFromString(i,ge)}catch(e){}if(!t||!t.documentElement){t=O.createDocument(he,"template",null);try{t.documentElement.innerHTML=ye?w:i}catch(e){}}const o=t.body||t.documentElement;return e&&r&&o.insertBefore(n.createTextNode(r),o.childNodes[0]||null),he===de?j.call(t,K?"html":"body")[0]:K?t.documentElement:o},Me=function(e){return k.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT,null)},Re=function(e){return"function"==typeof l&&e instanceof l},Ne=function(e,t,n){P[e]&&Os(P[e],(e=>{e.call(r,t,n,we)}))},Be=function(e){let t=null;if(Ne("beforeSanitizeElements",e,null),(n=e)instanceof f&&("string"!=typeof n.nodeName||"string"!=typeof n.textContent||"function"!=typeof n.removeChild||!(n.attributes instanceof p)||"function"!=typeof n.removeAttribute||"function"!=typeof n.setAttribute||"string"!=typeof n.namespaceURI||"function"!=typeof n.insertBefore||"function"!=typeof n.hasChildNodes))return Ce(e),!0;var n;const i=xe(e.nodeName);if(Ne("uponSanitizeElement",e,{tagName:i,allowedTags:B}),e.hasChildNodes()&&!Re(e.firstElementChild)&&Is(/<[/\w]/g,e.innerHTML)&&Is(/<[/\w]/g,e.textContent))return Ce(e),!0;if(!B[i]||F[i]){if(!F[i]&&_e(i)){if($.tagNameCheck instanceof RegExp&&Is($.tagNameCheck,i))return!1;if($.tagNameCheck instanceof Function&&$.tagNameCheck(i))return!1}if(re&&!oe[i]){const t=b(e)||e.parentNode,r=g(e)||e.childNodes;if(r&&t)for(let n=r.length-1;n>=0;--n)t.insertBefore(m(r[n],!0),v(e))}return Ce(e),!0}return e instanceof s&&!function(e){let t=b(e);t&&t.tagName||(t={namespaceURI:he,tagName:"template"});const r=js(e.tagName),n=js(t.tagName);return!!me[e.namespaceURI]&&(e.namespaceURI===fe?t.namespaceURI===de?"svg"===r:t.namespaceURI===pe?"svg"===r&&("annotation-xml"===n||je[n]):Boolean(Ee[r]):e.namespaceURI===pe?t.namespaceURI===de?"math"===r:t.namespaceURI===fe?"math"===r&&Ae[n]:Boolean(Te[r]):e.namespaceURI===de?!(t.namespaceURI===fe&&!Ae[n])&&!(t.namespaceURI===pe&&!je[n])&&!Te[r]&&(Pe[r]||!Ee[r]):!("application/xhtml+xml"!==ge||!me[e.namespaceURI]))}(e)?(Ce(e),!0):"noscript"!==i&&"noembed"!==i&&"noframes"!==i||!Is(/<\/no(script|embed|frames)/i,e.innerHTML)?(X&&3===e.nodeType&&(t=e.textContent,Os([E,T,C],(e=>{t=Es(t,e," ")})),e.textContent!==t&&(Ss(r.removed,{element:e.cloneNode()}),e.textContent=t)),Ne("afterSanitizeElements",e,null),!1):(Ce(e),!0)},Le=function(e,t,r){if(ee&&("id"===t||"name"===t)&&(r in n||r in Oe))return!1;if(q&&!W[t]&&Is(I,t));else if(U&&Is(D,t));else if(!_[t]||W[t]){if(!(_e(e)&&($.tagNameCheck instanceof RegExp&&Is($.tagNameCheck,e)||$.tagNameCheck instanceof Function&&$.tagNameCheck(e))&&($.attributeNameCheck instanceof RegExp&&Is($.attributeNameCheck,t)||$.attributeNameCheck instanceof Function&&$.attributeNameCheck(t))||"is"===t&&$.allowCustomizedBuiltInElements&&($.tagNameCheck instanceof RegExp&&Is($.tagNameCheck,r)||$.tagNameCheck instanceof Function&&$.tagNameCheck(r))))return!1}else if(se[t]);else if(Is(N,Es(r,R,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==Ts(r,"data:")||!ce[e])if(G&&!Is(M,Es(r,R,"")));else if(r)return!1;return!0},_e=function(e){return e.indexOf("-")>0},ze=function(e){Ne("beforeSanitizeAttributes",e,null);const{attributes:t}=e;if(!t)return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:_};let i=t.length;for(;i--;){const o=t[i],{name:a,namespaceURI:c,value:l}=o,s=xe(a);let u="value"===a?l:Cs(l);if(n.attrName=s,n.attrValue=u,n.keepAttr=!0,n.forceKeepAttr=void 0,Ne("uponSanitizeAttribute",e,n),u=n.attrValue,n.forceKeepAttr)continue;if(Ie(a,e),!n.keepAttr)continue;if(!H&&Is(/\/>/i,u)){Ie(a,e);continue}X&&Os([E,T,C],(e=>{u=Es(u,e," ")}));const p=xe(e.nodeName);if(Le(p,s,u)){if(!te||"id"!==s&&"name"!==s||(Ie(a,e),u="user-content-"+u),x&&"object"==typeof h&&"function"==typeof h.getAttributeType)if(c);else switch(h.getAttributeType(p,s)){case"TrustedHTML":u=x.createHTML(u);break;case"TrustedScriptURL":u=x.createScriptURL(u)}try{c?e.setAttributeNS(c,a,u):e.setAttribute(a,u),ks(r.removed)}catch(e){}}}Ne("afterSanitizeAttributes",e,null)},$e=function e(t){let r=null;const n=Me(t);for(Ne("beforeSanitizeShadowDOM",t,null);r=n.nextNode();)Ne("uponSanitizeShadowNode",r,null),Be(r)||(r.content instanceof a&&e(r.content),ze(r));Ne("afterSanitizeShadowDOM",t,null)};return r.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,o=null,c=null,s=null;if(ye=!e,ye&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Re(e)){if("function"!=typeof e.toString)throw Ds("toString is not a function");if("string"!=typeof(e=e.toString()))throw Ds("dirty is not a string, aborting")}if(!r.isSupported)return e;if(V||Se(t),r.removed=[],"string"==typeof e&&(ne=!1),ne){if(e.nodeName){const t=xe(e.nodeName);if(!B[t]||F[t])throw Ds("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof l)n=De("\x3c!----\x3e"),o=n.ownerDocument.importNode(e,!0),1===o.nodeType&&"BODY"===o.nodeName||"HTML"===o.nodeName?n=o:n.appendChild(o);else{if(!Z&&!X&&!K&&-1===e.indexOf("<"))return x&&J?x.createHTML(e):e;if(n=De(e),!n)return Z?null:J?w:""}n&&Y&&Ce(n.firstChild);const u=Me(ne?e:n);for(;c=u.nextNode();)Be(c)||(c.content instanceof a&&$e(c.content),ze(c));if(ne)return e;if(Z){if(Q)for(s=S.call(n.ownerDocument);n.firstChild;)s.appendChild(n.firstChild);else s=n;return(_.shadowroot||_.shadowrootmode)&&(s=A.call(i,s,!0)),s}let p=K?n.outerHTML:n.innerHTML;return K&&B["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&Is(nu,n.ownerDocument.doctype.name)&&(p="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+p),X&&Os([E,T,C],(e=>{p=Es(p,e," ")})),x&&J?x.createHTML(p):p},r.setConfig=function(){Se(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),V=!0},r.clearConfig=function(){we=null,V=!1},r.isValidAttribute=function(e,t,r){we||Se({});const n=xe(e),i=xe(t);return Le(n,i,r)},r.addHook=function(e,t){"function"==typeof t&&(P[e]=P[e]||[],Ss(P[e],t))},r.removeHook=function(e){if(P[e])return ks(P[e])},r.removeHooks=function(e){P[e]&&(P[e]=[])},r.removeAllHooks=function(){P={}},r}();let cu={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function lu(e){cu=e}const su=/[&<>"']/,uu=new RegExp(su.source,"g"),pu=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,fu=new RegExp(pu.source,"g"),du={"&":"&","<":"<",">":">",'"':""","'":"'"},hu=e=>du[e];function yu(e,t){if(t){if(su.test(e))return e.replace(uu,hu)}else if(pu.test(e))return e.replace(fu,hu);return e}const mu=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function vu(e){return e.replace(mu,((e,t)=>"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""))}const gu=/(^|[^\[])\^/g;function bu(e,t){e="string"==typeof e?e:e.source,t=t||"";const r={replace:(t,n)=>(n=(n="object"==typeof n&&"source"in n?n.source:n).replace(gu,"$1"),e=e.replace(t,n),r),getRegex:()=>new RegExp(e,t)};return r}function xu(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch(e){return null}return e}const wu={exec:()=>null};function Ou(e,t){const r=e.replace(/\|/g,((e,t,r)=>{let n=!1,i=t;for(;--i>=0&&"\\"===r[i];)n=!n;return n?"|":" |"})).split(/ \|/);let n=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;n<r.length;n++)r[n]=r[n].trim().replace(/\\\|/g,"|");return r}function ku(e,t,r){const n=e.length;if(0===n)return"";let i=0;for(;i<n;){const o=e.charAt(n-i-1);if(o!==t||r){if(o===t||!r)break;i++}else i++}return e.slice(0,n-i)}function Su(e,t,r,n){const i=t.href,o=t.title?yu(t.title):null,a=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){n.state.inLink=!0;const e={type:"link",raw:r,href:i,title:o,text:a,tokens:n.inlineTokens(a)};return n.state.inLink=!1,e}return{type:"image",raw:r,href:i,title:o,text:yu(a)}}class ju{options;rules;lexer;constructor(e){this.options=e||cu}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:ku(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],r=function(e,t){const r=e.match(/^(\s+)(?:```)/);if(null===r)return t;const n=r[1];return t.split("\n").map((e=>{const t=e.match(/^\s+/);if(null===t)return e;const[r]=t;return r.length>=n.length?e.slice(n.length):e})).join("\n")}(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline._escapes,"$1"):t[2],text:r}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){const t=ku(e,"#");this.options.pedantic?e=t.trim():t&&!/ $/.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){const e=ku(t[0].replace(/^ *>[ \t]?/gm,""),"\n"),r=this.lexer.state.top;this.lexer.state.top=!0;const n=this.lexer.blockTokens(e);return this.lexer.state.top=r,{type:"blockquote",raw:t[0],tokens:n,text:e}}}list(e){let t=this.rules.block.list.exec(e);if(t){let r=t[1].trim();const n=r.length>1,i={type:"list",raw:"",ordered:n,start:n?+r.slice(0,-1):"",loose:!1,items:[]};r=n?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=n?r:"[*+-]");const o=new RegExp(`^( {0,3}${r})((?:[\t ][^\\n]*)?(?:\\n|$))`);let a="",c="",l=!1;for(;e;){let r=!1;if(!(t=o.exec(e)))break;if(this.rules.block.hr.test(e))break;a=t[0],e=e.substring(a.length);let n=t[2].split("\n",1)[0].replace(/^\t+/,(e=>" ".repeat(3*e.length))),s=e.split("\n",1)[0],u=0;this.options.pedantic?(u=2,c=n.trimStart()):(u=t[2].search(/[^ ]/),u=u>4?1:u,c=n.slice(u),u+=t[1].length);let p=!1;if(!n&&/^ *$/.test(s)&&(a+=s+"\n",e=e.substring(s.length+1),r=!0),!r){const t=new RegExp(`^ {0,${Math.min(3,u-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),r=new RegExp(`^ {0,${Math.min(3,u-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),i=new RegExp(`^ {0,${Math.min(3,u-1)}}(?:\`\`\`|~~~)`),o=new RegExp(`^ {0,${Math.min(3,u-1)}}#`);for(;e;){const l=e.split("\n",1)[0];if(s=l,this.options.pedantic&&(s=s.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),i.test(s))break;if(o.test(s))break;if(t.test(s))break;if(r.test(e))break;if(s.search(/[^ ]/)>=u||!s.trim())c+="\n"+s.slice(u);else{if(p)break;if(n.search(/[^ ]/)>=4)break;if(i.test(n))break;if(o.test(n))break;if(r.test(n))break;c+="\n"+s}p||s.trim()||(p=!0),a+=l+"\n",e=e.substring(l.length+1),n=s.slice(u)}}i.loose||(l?i.loose=!0:/\n *\n *$/.test(a)&&(l=!0));let f,d=null;this.options.gfm&&(d=/^\[[ xX]\] /.exec(c),d&&(f="[ ] "!==d[0],c=c.replace(/^\[[ xX]\] +/,""))),i.items.push({type:"list_item",raw:a,task:!!d,checked:f,loose:!1,text:c,tokens:[]}),i.raw+=a}i.items[i.items.length-1].raw=a.trimEnd(),i.items[i.items.length-1].text=c.trimEnd(),i.raw=i.raw.trimEnd();for(let e=0;e<i.items.length;e++)if(this.lexer.state.top=!1,i.items[e].tokens=this.lexer.blockTokens(i.items[e].text,[]),!i.loose){const t=i.items[e].tokens.filter((e=>"space"===e.type)),r=t.length>0&&t.some((e=>/\n.*\n/.test(e.raw)));i.loose=r}if(i.loose)for(let e=0;e<i.items.length;e++)i.items[e].loose=!0;return i}}html(e){const t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:"pre"===t[1]||"script"===t[1]||"style"===t[1],text:t[0]}}def(e){const t=this.rules.block.def.exec(e);if(t){const e=t[1].toLowerCase().replace(/\s+/g," "),r=t[2]?t[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline._escapes,"$1"):"",n=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline._escapes,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:r,title:n}}}table(e){const t=this.rules.block.table.exec(e);if(t){if(!/[:|]/.test(t[2]))return;const e={type:"table",raw:t[0],header:Ou(t[1]).map((e=>({text:e,tokens:[]}))),align:t[2].replace(/^\||\| *$/g,"").split("|"),rows:t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(e.header.length===e.align.length){let t,r,n,i,o=e.align.length;for(t=0;t<o;t++){const r=e.align[t];r&&(/^ *-+: *$/.test(r)?e.align[t]="right":/^ *:-+: *$/.test(r)?e.align[t]="center":/^ *:-+ *$/.test(r)?e.align[t]="left":e.align[t]=null)}for(o=e.rows.length,t=0;t<o;t++)e.rows[t]=Ou(e.rows[t],e.header.length).map((e=>({text:e,tokens:[]})));for(o=e.header.length,r=0;r<o;r++)e.header[r].tokens=this.lexer.inline(e.header[r].text);for(o=e.rows.length,r=0;r<o;r++)for(i=e.rows[r],n=0;n<i.length;n++)i[n].tokens=this.lexer.inline(i[n].text);return e}}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:yu(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^<a /i.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&/^</.test(e)){if(!/>$/.test(e))return;const t=ku(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;let r=0;for(let n=0;n<e.length;n++)if("\\"===e[n])n++;else if(e[n]===t[0])r++;else if(e[n]===t[1]&&(r--,r<0))return n;return-1}(t[2],"()");if(e>-1){const r=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,r).trim(),t[3]=""}}let r=t[2],n="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(r);e&&(r=e[1],n=e[3])}else n=t[3]?t[3].slice(1,-1):"";return r=r.trim(),/^</.test(r)&&(r=this.options.pedantic&&!/>$/.test(e)?r.slice(1):r.slice(1,-1)),Su(t,{href:r?r.replace(this.rules.inline._escapes,"$1"):r,title:n?n.replace(this.rules.inline._escapes,"$1"):n},t[0],this.lexer)}}reflink(e,t){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){let e=(r[2]||r[1]).replace(/\s+/g," ");if(e=t[e.toLowerCase()],!e){const e=r[0].charAt(0);return{type:"text",raw:e,text:e}}return Su(r,e,r[0],this.lexer)}}emStrong(e,t,r=""){let n=this.rules.inline.emStrong.lDelim.exec(e);if(n&&(!n[3]||!r.match(/[\p{L}\p{N}]/u))&&(!n[1]&&!n[2]||!r||this.rules.inline.punctuation.exec(r))){const r=[...n[0]].length-1;let i,o,a=r,c=0;const l="*"===n[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(l.lastIndex=0,t=t.slice(-1*e.length+r);null!=(n=l.exec(t));){if(i=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!i)continue;if(o=[...i].length,n[3]||n[4]){a+=o;continue}if((n[5]||n[6])&&r%3&&!((r+o)%3)){c+=o;continue}if(a-=o,a>0)continue;o=Math.min(o,o+a+c);const t=[...n[0]][0].length,l=e.slice(0,r+n.index+t+o);if(Math.min(r,o)%2){const e=l.slice(1,-1);return{type:"em",raw:l,text:e,tokens:this.lexer.inlineTokens(e)}}const s=l.slice(2,-2);return{type:"strong",raw:l,text:s,tokens:this.lexer.inlineTokens(s)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," ");const r=/[^ ]/.test(e),n=/^ /.test(e)&&/ $/.test(e);return r&&n&&(e=e.substring(1,e.length-1)),e=yu(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let e,r;return"@"===t[2]?(e=yu(t[1]),r="mailto:"+e):(e=yu(t[1]),r=e),{type:"link",raw:t[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,r;if("@"===t[2])e=yu(t[0]),r="mailto:"+e;else{let n;do{n=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])[0]}while(n!==t[0]);e=yu(t[0]),r="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){let e;return e=this.lexer.state.inRawBlock?t[0]:yu(t[0]),{type:"text",raw:t[0],text:e}}}}const Au={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:wu,lheading:/^(?!bull )((?:.|\n(?!\s*?\n|bull ))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};Au.def=bu(Au.def).replace("label",Au._label).replace("title",Au._title).getRegex(),Au.bullet=/(?:[*+-]|\d{1,9}[.)])/,Au.listItemStart=bu(/^( *)(bull) */).replace("bull",Au.bullet).getRegex(),Au.list=bu(Au.list).replace(/bull/g,Au.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Au.def.source+")").getRegex(),Au._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Au._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,Au.html=bu(Au.html,"i").replace("comment",Au._comment).replace("tag",Au._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Au.lheading=bu(Au.lheading).replace(/bull/g,Au.bullet).getRegex(),Au.paragraph=bu(Au._paragraph).replace("hr",Au.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Au._tag).getRegex(),Au.blockquote=bu(Au.blockquote).replace("paragraph",Au.paragraph).getRegex(),Au.normal={...Au},Au.gfm={...Au.normal,table:"^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"},Au.gfm.table=bu(Au.gfm.table).replace("hr",Au.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Au._tag).getRegex(),Au.gfm.paragraph=bu(Au._paragraph).replace("hr",Au.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Au.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Au._tag).getRegex(),Au.pedantic={...Au.normal,html:bu("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",Au._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:wu,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:bu(Au.normal._paragraph).replace("hr",Au.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",Au.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()};const Pu={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:wu,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,rDelimAst:/^[^_*]*?__[^_*]*?\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\*)[punct](\*+)(?=[\s]|$)|[^punct\s](\*+)(?!\*)(?=[punct\s]|$)|(?!\*)[punct\s](\*+)(?=[^punct\s])|[\s](\*+)(?!\*)(?=[punct])|(?!\*)[punct](\*+)(?!\*)(?=[punct])|[^punct\s](\*+)(?=[^punct\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?_[^_*]*?(?=\*\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\s]|$)|[^punct\s](_+)(?!_)(?=[punct\s]|$)|(?!_)[punct\s](_+)(?=[^punct\s])|[\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:wu,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^((?![*_])[\spunctuation])/,_punctuation:"\\p{P}$+<=>`^|~"};Pu.punctuation=bu(Pu.punctuation,"u").replace(/punctuation/g,Pu._punctuation).getRegex(),Pu.blockSkip=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,Pu.anyPunctuation=/\\[punct]/g,Pu._escapes=/\\([punct])/g,Pu._comment=bu(Au._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),Pu.emStrong.lDelim=bu(Pu.emStrong.lDelim,"u").replace(/punct/g,Pu._punctuation).getRegex(),Pu.emStrong.rDelimAst=bu(Pu.emStrong.rDelimAst,"gu").replace(/punct/g,Pu._punctuation).getRegex(),Pu.emStrong.rDelimUnd=bu(Pu.emStrong.rDelimUnd,"gu").replace(/punct/g,Pu._punctuation).getRegex(),Pu.anyPunctuation=bu(Pu.anyPunctuation,"gu").replace(/punct/g,Pu._punctuation).getRegex(),Pu._escapes=bu(Pu._escapes,"gu").replace(/punct/g,Pu._punctuation).getRegex(),Pu._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,Pu._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,Pu.autolink=bu(Pu.autolink).replace("scheme",Pu._scheme).replace("email",Pu._email).getRegex(),Pu._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,Pu.tag=bu(Pu.tag).replace("comment",Pu._comment).replace("attribute",Pu._attribute).getRegex(),Pu._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Pu._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,Pu._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,Pu.link=bu(Pu.link).replace("label",Pu._label).replace("href",Pu._href).replace("title",Pu._title).getRegex(),Pu.reflink=bu(Pu.reflink).replace("label",Pu._label).replace("ref",Au._label).getRegex(),Pu.nolink=bu(Pu.nolink).replace("ref",Au._label).getRegex(),Pu.reflinkSearch=bu(Pu.reflinkSearch,"g").replace("reflink",Pu.reflink).replace("nolink",Pu.nolink).getRegex(),Pu.normal={...Pu},Pu.pedantic={...Pu.normal,strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:bu(/^!?\[(label)\]\((.*?)\)/).replace("label",Pu._label).getRegex(),reflink:bu(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Pu._label).getRegex()},Pu.gfm={...Pu.normal,escape:bu(Pu.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},Pu.gfm.url=bu(Pu.gfm.url,"i").replace("email",Pu.gfm._extended_email).getRegex(),Pu.breaks={...Pu.gfm,br:bu(Pu.br).replace("{2,}","*").getRegex(),text:bu(Pu.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()};class Eu{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||cu,this.options.tokenizer=this.options.tokenizer||new ju,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const t={block:Au.normal,inline:Pu.normal};this.options.pedantic?(t.block=Au.pedantic,t.inline=Pu.pedantic):this.options.gfm&&(t.block=Au.gfm,this.options.breaks?t.inline=Pu.breaks:t.inline=Pu.gfm),this.tokenizer.rules=t}static get rules(){return{block:Au,inline:Pu}}static lex(e,t){return new Eu(t).lex(e)}static lexInline(e,t){return new Eu(t).inlineTokens(e)}lex(e){let t;for(e=e.replace(/\r\n|\r/g,"\n"),this.blockTokens(e,this.tokens);t=this.inlineQueue.shift();)this.inlineTokens(t.src,t.tokens);return this.tokens}blockTokens(e,t=[]){let r,n,i,o;for(e=this.options.pedantic?e.replace(/\t/g," ").replace(/^ +$/gm,""):e.replace(/^( *)(\t+)/gm,((e,t,r)=>t+" ".repeat(r.length)));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((n=>!!(r=n.call({lexer:this},e,t))&&(e=e.substring(r.raw.length),t.push(r),!0)))))if(r=this.tokenizer.space(e))e=e.substring(r.raw.length),1===r.raw.length&&t.length>0?t[t.length-1].raw+="\n":t.push(r);else if(r=this.tokenizer.code(e))e=e.substring(r.raw.length),n=t[t.length-1],!n||"paragraph"!==n.type&&"text"!==n.type?t.push(r):(n.raw+="\n"+r.raw,n.text+="\n"+r.text,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(r=this.tokenizer.fences(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.heading(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.hr(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.blockquote(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.list(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.html(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.def(e))e=e.substring(r.raw.length),n=t[t.length-1],!n||"paragraph"!==n.type&&"text"!==n.type?this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title}):(n.raw+="\n"+r.raw,n.text+="\n"+r.raw,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(r=this.tokenizer.table(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.lheading(e))e=e.substring(r.raw.length),t.push(r);else{if(i=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const r=e.slice(1);let n;this.options.extensions.startBlock.forEach((e=>{n=e.call({lexer:this},r),"number"==typeof n&&n>=0&&(t=Math.min(t,n))})),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i)))n=t[t.length-1],o&&"paragraph"===n.type?(n.raw+="\n"+r.raw,n.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):t.push(r),o=i.length!==e.length,e=e.substring(r.raw.length);else if(r=this.tokenizer.text(e))e=e.substring(r.raw.length),n=t[t.length-1],n&&"text"===n.type?(n.raw+="\n"+r.raw,n.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):t.push(r);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let r,n,i,o,a,c,l=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(l));)e.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(l));)l=l.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(o=this.tokenizer.rules.inline.anyPunctuation.exec(l));)l=l.slice(0,o.index)+"++"+l.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(a||(c=""),a=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((n=>!!(r=n.call({lexer:this},e,t))&&(e=e.substring(r.raw.length),t.push(r),!0)))))if(r=this.tokenizer.escape(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.tag(e))e=e.substring(r.raw.length),n=t[t.length-1],n&&"text"===r.type&&"text"===n.type?(n.raw+=r.raw,n.text+=r.text):t.push(r);else if(r=this.tokenizer.link(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(r.raw.length),n=t[t.length-1],n&&"text"===r.type&&"text"===n.type?(n.raw+=r.raw,n.text+=r.text):t.push(r);else if(r=this.tokenizer.emStrong(e,l,c))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.codespan(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.br(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.del(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.autolink(e))e=e.substring(r.raw.length),t.push(r);else if(this.state.inLink||!(r=this.tokenizer.url(e))){if(i=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const r=e.slice(1);let n;this.options.extensions.startInline.forEach((e=>{n=e.call({lexer:this},r),"number"==typeof n&&n>=0&&(t=Math.min(t,n))})),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(r=this.tokenizer.inlineText(i))e=e.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(c=r.raw.slice(-1)),a=!0,n=t[t.length-1],n&&"text"===n.type?(n.raw+=r.raw,n.text+=r.text):t.push(r);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(r.raw.length),t.push(r);return t}}class Tu{options;constructor(e){this.options=e||cu}code(e,t,r){const n=(t||"").match(/^\S*/)?.[0];return e=e.replace(/\n$/,"")+"\n",n?'<pre><code class="language-'+yu(n)+'">'+(r?e:yu(e,!0))+"</code></pre>\n":"<pre><code>"+(r?e:yu(e,!0))+"</code></pre>\n"}blockquote(e){return`<blockquote>\n${e}</blockquote>\n`}html(e,t){return e}heading(e,t,r){return`<h${t}>${e}</h${t}>\n`}hr(){return"<hr>\n"}list(e,t,r){const n=t?"ol":"ul";return"<"+n+(t&&1!==r?' start="'+r+'"':"")+">\n"+e+"</"+n+">\n"}listitem(e,t,r){return`<li>${e}</li>\n`}checkbox(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph(e){return`<p>${e}</p>\n`}table(e,t){return t&&(t=`<tbody>${t}</tbody>`),"<table>\n<thead>\n"+e+"</thead>\n"+t+"</table>\n"}tablerow(e){return`<tr>\n${e}</tr>\n`}tablecell(e,t){const r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+`</${r}>\n`}strong(e){return`<strong>${e}</strong>`}em(e){return`<em>${e}</em>`}codespan(e){return`<code>${e}</code>`}br(){return"<br>"}del(e){return`<del>${e}</del>`}link(e,t,r){const n=xu(e);if(null===n)return r;let i='<a href="'+(e=n)+'"';return t&&(i+=' title="'+t+'"'),i+=">"+r+"</a>",i}image(e,t,r){const n=xu(e);if(null===n)return r;let i=`<img src="${e=n}" alt="${r}"`;return t&&(i+=` title="${t}"`),i+=">",i}text(e){return e}}class Cu{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,r){return""+r}image(e,t,r){return""+r}br(){return""}}class Iu{options;renderer;textRenderer;constructor(e){this.options=e||cu,this.options.renderer=this.options.renderer||new Tu,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Cu}static parse(e,t){return new Iu(t).parse(e)}static parseInline(e,t){return new Iu(t).parseInline(e)}parse(e,t=!0){let r="";for(let n=0;n<e.length;n++){const i=e[n];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[i.type]){const e=i,t=this.options.extensions.renderers[e.type].call({parser:this},e);if(!1!==t||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(e.type)){r+=t||"";continue}}switch(i.type){case"space":continue;case"hr":r+=this.renderer.hr();continue;case"heading":{const e=i;r+=this.renderer.heading(this.parseInline(e.tokens),e.depth,vu(this.parseInline(e.tokens,this.textRenderer)));continue}case"code":{const e=i;r+=this.renderer.code(e.text,e.lang,!!e.escaped);continue}case"table":{const e=i;let t="",n="";for(let t=0;t<e.header.length;t++)n+=this.renderer.tablecell(this.parseInline(e.header[t].tokens),{header:!0,align:e.align[t]});t+=this.renderer.tablerow(n);let o="";for(let t=0;t<e.rows.length;t++){const r=e.rows[t];n="";for(let t=0;t<r.length;t++)n+=this.renderer.tablecell(this.parseInline(r[t].tokens),{header:!1,align:e.align[t]});o+=this.renderer.tablerow(n)}r+=this.renderer.table(t,o);continue}case"blockquote":{const e=i,t=this.parse(e.tokens);r+=this.renderer.blockquote(t);continue}case"list":{const e=i,t=e.ordered,n=e.start,o=e.loose;let a="";for(let t=0;t<e.items.length;t++){const r=e.items[t],n=r.checked,i=r.task;let c="";if(r.task){const e=this.renderer.checkbox(!!n);o?r.tokens.length>0&&"paragraph"===r.tokens[0].type?(r.tokens[0].text=e+" "+r.tokens[0].text,r.tokens[0].tokens&&r.tokens[0].tokens.length>0&&"text"===r.tokens[0].tokens[0].type&&(r.tokens[0].tokens[0].text=e+" "+r.tokens[0].tokens[0].text)):r.tokens.unshift({type:"text",text:e+" "}):c+=e+" "}c+=this.parse(r.tokens,o),a+=this.renderer.listitem(c,i,!!n)}r+=this.renderer.list(a,t,n);continue}case"html":{const e=i;r+=this.renderer.html(e.text,e.block);continue}case"paragraph":{const e=i;r+=this.renderer.paragraph(this.parseInline(e.tokens));continue}case"text":{let o=i,a=o.tokens?this.parseInline(o.tokens):o.text;for(;n+1<e.length&&"text"===e[n+1].type;)o=e[++n],a+="\n"+(o.tokens?this.parseInline(o.tokens):o.text);r+=t?this.renderer.paragraph(a):a;continue}default:{const e='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return r}parseInline(e,t){t=t||this.renderer;let r="";for(let n=0;n<e.length;n++){const i=e[n];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[i.type]){const e=this.options.extensions.renderers[i.type].call({parser:this},i);if(!1!==e||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type)){r+=e||"";continue}}switch(i.type){case"escape":{const e=i;r+=t.text(e.text);break}case"html":{const e=i;r+=t.html(e.text);break}case"link":{const e=i;r+=t.link(e.href,e.title,this.parseInline(e.tokens,t));break}case"image":{const e=i;r+=t.image(e.href,e.title,e.text);break}case"strong":{const e=i;r+=t.strong(this.parseInline(e.tokens,t));break}case"em":{const e=i;r+=t.em(this.parseInline(e.tokens,t));break}case"codespan":{const e=i;r+=t.codespan(e.text);break}case"br":r+=t.br();break;case"del":{const e=i;r+=t.del(this.parseInline(e.tokens,t));break}case"text":{const e=i;r+=t.text(e.text);break}default:{const e='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return r}}class Du{options;constructor(e){this.options=e||cu}static passThroughHooks=new Set(["preprocess","postprocess"]);preprocess(e){return e}postprocess(e){return e}}const Mu=new class{defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};options=this.setOptions;parse=this.#e(Eu.lex,Iu.parse);parseInline=this.#e(Eu.lexInline,Iu.parseInline);Parser=Iu;Renderer=Tu;TextRenderer=Cu;Lexer=Eu;Tokenizer=ju;Hooks=Du;constructor(...e){this.use(...e)}walkTokens(e,t){let r=[];for(const n of e)switch(r=r.concat(t.call(this,n)),n.type){case"table":{const e=n;for(const n of e.header)r=r.concat(this.walkTokens(n.tokens,t));for(const n of e.rows)for(const e of n)r=r.concat(this.walkTokens(e.tokens,t));break}case"list":{const e=n;r=r.concat(this.walkTokens(e.items,t));break}default:{const e=n;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach((n=>{r=r.concat(this.walkTokens(e[n],t))})):e.tokens&&(r=r.concat(this.walkTokens(e.tokens,t)))}}return r}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach((e=>{const r={...e};if(r.async=this.defaults.async||r.async||!1,e.extensions&&(e.extensions.forEach((e=>{if(!e.name)throw new Error("extension name required");if("renderer"in e){const r=t.renderers[e.name];t.renderers[e.name]=r?function(...t){let n=e.renderer.apply(this,t);return!1===n&&(n=r.apply(this,t)),n}:e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");const r=t[e.level];r?r.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)})),r.extensions=t),e.renderer){const t=this.defaults.renderer||new Tu(this.defaults);for(const r in e.renderer){const n=e.renderer[r],i=r,o=t[i];t[i]=(...e)=>{let r=n.apply(t,e);return!1===r&&(r=o.apply(t,e)),r||""}}r.renderer=t}if(e.tokenizer){const t=this.defaults.tokenizer||new ju(this.defaults);for(const r in e.tokenizer){const n=e.tokenizer[r],i=r,o=t[i];t[i]=(...e)=>{let r=n.apply(t,e);return!1===r&&(r=o.apply(t,e)),r}}r.tokenizer=t}if(e.hooks){const t=this.defaults.hooks||new Du;for(const r in e.hooks){const n=e.hooks[r],i=r,o=t[i];Du.passThroughHooks.has(r)?t[i]=e=>{if(this.defaults.async)return Promise.resolve(n.call(t,e)).then((e=>o.call(t,e)));const r=n.call(t,e);return o.call(t,r)}:t[i]=(...e)=>{let r=n.apply(t,e);return!1===r&&(r=o.apply(t,e)),r}}r.hooks=t}if(e.walkTokens){const t=this.defaults.walkTokens,n=e.walkTokens;r.walkTokens=function(e){let r=[];return r.push(n.call(this,e)),t&&(r=r.concat(t.call(this,e))),r}}this.defaults={...this.defaults,...r}})),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return Eu.lex(e,t??this.defaults)}parser(e,t){return Iu.parse(e,t??this.defaults)}#e(e,t){return(r,n)=>{const i={...n},o={...this.defaults,...i};!0===this.defaults.async&&!1===i.async&&(o.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),o.async=!0);const a=this.#t(!!o.silent,!!o.async);if(null==r)return a(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof r)return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(o.hooks&&(o.hooks.options=o),o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(r):r).then((t=>e(t,o))).then((e=>o.walkTokens?Promise.all(this.walkTokens(e,o.walkTokens)).then((()=>e)):e)).then((e=>t(e,o))).then((e=>o.hooks?o.hooks.postprocess(e):e)).catch(a);try{o.hooks&&(r=o.hooks.preprocess(r));const n=e(r,o);o.walkTokens&&this.walkTokens(n,o.walkTokens);let i=t(n,o);return o.hooks&&(i=o.hooks.postprocess(i)),i}catch(e){return a(e)}}}#t(e,t){return r=>{if(r.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="<p>An error occurred:</p><pre>"+yu(r.message+"",!0)+"</pre>";return t?Promise.resolve(e):e}if(t)return Promise.reject(r);throw r}}};function Ru(e,t){return Mu.parse(e,t)}function Nu(e){var t=e.replace(/^[\u200B-\u200F\uFEFF]/,""),r=Ru.parse(t);return au.sanitize(r)}Ru.options=Ru.setOptions=function(e){return Mu.setOptions(e),Ru.defaults=Mu.defaults,lu(Ru.defaults),Ru},Ru.getDefaults=function(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}},Ru.defaults=cu,Ru.use=function(...e){return Mu.use(...e),Ru.defaults=Mu.defaults,lu(Ru.defaults),Ru},Ru.walkTokens=function(e,t){return Mu.walkTokens(e,t)},Ru.parseInline=Mu.parseInline,Ru.Parser=Iu,Ru.parser=Iu.parse,Ru.Renderer=Tu,Ru.TextRenderer=Cu,Ru.Lexer=Eu,Ru.lexer=Eu.lex,Ru.Tokenizer=ju,Ru.Hooks=Du,Ru.parse=Ru,Ru.options,Ru.setOptions,Ru.use,Ru.walkTokens,Ru.parseInline,Iu.parse,Eu.lex;const Bu=function(e){var t=(0,m.useState)(Nu(e.text)),r=t[0],n=t[1];return(0,m.useEffect)((function(){if(e.updatedData&&e.updatedData.length>0){var t=e.updatedData[e.updatedData.length-1].text;n(Nu(t))}}),[e.text,e.updatedData]),(0,c.jsx)(D(),{variant:"body2",dangerouslySetInnerHTML:{__html:r}})},Lu=function(e){var t=(0,m.useState)(Nu(e.text)),r=t[0],n=t[1],i=(0,m.useState)(""),o=i[0],a=i[1];return(0,m.useEffect)((function(){if(e.updatedData&&e.updatedData.length>0){for(var t=e.text,r=0,i=e.updatedData;r<i.length;r++){var o=i[r];"string"!=typeof o.text?(t+=" [MISSING TEXT]",a("Some of the incoming text was not correctly formatted. Some data may be missing.")):t+=o.text}n(Nu(t))}}),[e.text,e.updatedData]),(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(D(),{variant:"body2",dangerouslySetInnerHTML:{__html:r}}),o&&(0,c.jsx)(Jl(),{severity:"error",children:o})]})},_u=require("@mui/material/Card");var zu=r.n(_u);const $u=function(e){return(0,c.jsx)(D(),{variant:"caption",color:"textSecondary",children:(t=e.timestamp,Ll(t)<86400?function(e){var t=Ll(e);if(t<60)return"".concat(Bl()("second",t,!0)," ago");if(t<3600){var r=Math.floor(t/60);return"".concat(Bl()("minute",r,!0)," ago")}var n=Math.floor(t/3600);return"".concat(Bl()("hour",n,!0)," ago")}(t):(r=t,n=new Date(r),i=navigator.language,o={month:"short",day:"numeric",hour:"numeric",minute:"2-digit",hour12:!0},Ll(r)/86400>365&&(o.year="numeric"),n.toLocaleTimeString(i,o).replace(/,/g,"")))});var t,r,n,i,o};function Fu(e){var t;return(0,c.jsxs)(R(),{id:e.message.id,"data-cy":"base-message-container",className:"rustic-message-canvas",children:[(0,c.jsxs)(D(),{variant:"body1","data-cy":"sender",children:[e.message.sender,":"]}),(0,c.jsx)(zu(),{variant:"outlined",className:"rustic-message-canvas-card",children:e.children}),e.message.lastThreadMessage&&(0,c.jsx)(D(),{variant:"caption",children:"last updated: "}),(0,c.jsx)($u,{timestamp:(null===(t=e.message.lastThreadMessage)||void 0===t?void 0:t.timestamp)||e.message.timestamp}),e.messageInteractions&&e.messageInteractions(e.message)]})}const Wu=function(e){return(0,c.jsx)(R(),{"data-cy":"currentConversation",className:"rustic-messages-space",children:e.messages&&e.messages.length>0&&e.messages.map((function(t){return(0,c.jsx)(Fu,{message:t,messageInteractions:e.messageInteractions,children:(0,c.jsx)(Hl,{message:t,supportedElements:e.supportedElements})},t.id)}))})},Uu=require("@mui/material/AppBar");var qu=r.n(Uu);const Gu=require("@mui/material/Toolbar");var Hu=r.n(Gu);const Xu=function(e){return(0,c.jsx)(qu(),{position:"fixed",color:"inherit",sx:{borderBottom:"1px solid ".concat(a.palette.divider)},"data-cy":"nav-bar",children:(0,c.jsxs)(Hu(),{className:"rustic-nav-bar",children:[e.leftDrawerIcon&&(0,c.jsx)(A(),{color:"inherit","aria-label":e.leftDrawerAriaLabel,edge:"start",onClick:e.handleLeftDrawerToggle,className:"rustic-nav-bar-button","data-cy":"left-drawer-button",children:e.leftDrawerIcon}),e.logo,e.rightDrawerIcon&&(0,c.jsx)(A(),{color:"inherit","aria-label":e.rightDrawerAriaLabel,edge:"end",onClick:e.handleRightDrawerToggle,className:"rustic-nav-bar-button","data-cy":"right-drawer-button",children:e.rightDrawerIcon})]})})},Ku=require("@mui/icons-material/AccountCircle");var Vu=r.n(Ku);const Yu=require("@mui/icons-material/KeyboardArrowDown");var Zu=r.n(Yu);const Qu=require("@mui/icons-material/SmartToy");var Ju=r.n(Qu);const ep=require("@mui/material/Button");var tp=r.n(ep);const rp=require("@mui/material/Dialog");var np=r.n(rp);const ip=require("@mui/material/DialogTitle");var op=r.n(ip);const ap=require("@mui/material/Divider");var cp=r.n(ap);const lp=require("@mui/material/List");var sp=r.n(lp);const up=require("@mui/material/ListItem");var pp=r.n(up);const fp=require("@mui/material/ListSubheader");var dp=r.n(fp);const hp=require("@mui/system");var yp,mp;!function(e){e.Owner="owner",e.Member="member"}(yp||(yp={})),function(e){e.Human="human",e.Agent="agent"}(mp||(mp={}));var vp=function(e){var t=(0,m.useState)(!1),r=t[0],n=t[1],i=e.participants.length,o=r?e.participants:e.participants.slice(0,3),a="".concat(Bl()(e.participantType,i)," (").concat(i,")"),l=r?"Show Less":"Show All ".concat(i);return 0===i?(0,c.jsx)(D(),{variant:"caption",className:"rustic-participant-list-no-participants-message",children:"There are currently no participants."}):(0,c.jsx)(sp(),{"data-cy":"participant-list",className:"rustic-participant-list",subheader:(0,c.jsxs)(dp(),{disableSticky:!0,className:"rustic-participant-list-subheader",children:[(0,c.jsxs)(hp.Box,{className:"rustic-participant-list-subheader-title",children:[e.participantTypeIcon,(0,c.jsx)(D(),{variant:"subtitle2",color:"text.secondary",children:a})]}),i>3&&(0,c.jsx)(tp(),{"data-cy":"toggle-participant-list-button",onClick:function(){return n(!r)},color:"primary",size:"small",startIcon:(0,c.jsx)(Zu(),{}),children:l})]}),children:o.map((function(e){return(0,c.jsxs)(pp(),{className:"rustic-participant-list-item","data-cy":"participant-list-item",children:[(0,c.jsx)(D(),{variant:"subtitle2",children:e.displayName}),(0,c.jsx)(D(),{variant:e.participantRole===yp.Owner?"subtitle2":"caption","data-cy":"participant-role",children:zl(e.participantRole)})]},e.id)}))})};const gp=function(e){function t(e,t){return function(e){return function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}([],e,!0).sort((function(e,t){return t.participantRole===yp.Owner?1:-1}))}(e.filter((function(e){return e.participantType===t})))}var r=t(e.participants,mp.Human),n=t(e.participants,mp.Agent),i="".concat(Bl()("Participant",e.participants.length)," (").concat(e.participants.length,")");return(0,c.jsxs)(np(),{open:e.isParticipantListOpen,onClose:e.onClose,className:"rustic-participants-container",maxWidth:"sm",fullWidth:!0,children:[(0,c.jsx)(op(),{sx:{borderBottom:"1px solid",borderColor:"divider"},component:"h6",className:"rustic-participants-container-title","data-cy":"participants-dialog-title",children:i}),(0,c.jsx)(vp,{participantType:"Human",participantTypeIcon:(0,c.jsx)(Vu(),{}),participants:r}),n.length>0&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(cp(),{className:"rustic-participants-container-divider"}),(0,c.jsx)(vp,{participantType:"Agent",participantTypeIcon:(0,c.jsx)(Ju(),{}),participants:n})]})]})},bp=require("@mui/material/Table");var xp=r.n(bp);const wp=require("@mui/material/TableBody");var Op=r.n(wp);const kp=require("@mui/material/TableCell");var Sp=r.n(kp);const jp=require("@mui/material/TableContainer");var Ap=r.n(jp);const Pp=require("@mui/material/TableHead");var Ep=r.n(Pp);const Tp=require("@mui/material/TableRow");var Cp=r.n(Tp);function Ip(e){var t=Array.from(new Set(e.data.flatMap((function(e){return Object.keys(e)})))),r=e.headers||t;return(0,c.jsxs)(d(),{className:"rustic-table",children:[e.title&&(0,c.jsx)(D(),{variant:"body1","data-cy":"table-title",className:"rustic-table-title",children:e.title}),e.description&&(0,c.jsx)(D(),{variant:"subtitle2","data-cy":"table-description",children:e.description}),(0,c.jsx)(Ap(),{children:(0,c.jsxs)(xp(),{"aria-label":e.title||"a table of data",size:"small",children:[r.length>0&&(0,c.jsx)(Ep(),{children:(0,c.jsx)(Cp(),{children:r.map((function(e,t){return(0,c.jsx)(Sp(),{children:zl(e)},"header-".concat(t))}))})}),(0,c.jsx)(Op(),{children:e.data.map((function(e,r){return(0,c.jsx)(Cp(),{children:t.map((function(t,n){return(0,c.jsx)(Sp(),{children:e[t]},"cell-".concat(r,"x").concat(n))}))},"row-".concat(r))}))})]})})]})}const Dp=function(e){var t=(0,m.useState)(au.sanitize(e.text)),r=t[0],n=t[1],i=(0,m.useState)(""),o=i[0],a=i[1];return(0,m.useEffect)((function(){if(e.updatedData&&e.updatedData.length>0){for(var t=e.text,r=0,i=e.updatedData;r<i.length;r++){var o=i[r];"string"!=typeof o.text&&(t+=" [MISSING TEXT]",a("Some of the incoming text was not correctly formatted. Some data may be missing.")),t+=o.text}n(au.sanitize(t))}}),[e.text,e.updatedData]),(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(D(),{"data-cy":"streaming-text",variant:"body2",children:r}),o&&(0,c.jsx)(Jl(),{severity:"error",children:o})]})},Mp=function(e){return(0,c.jsx)(D(),{variant:"body2",className:"rustic-text",children:au.sanitize(e.text)})},Rp=require("@mui/icons-material/Send");var Np=r.n(Rp);const Bp=require("@mui/material/InputAdornment");var Lp=r.n(Bp);const _p=require("@mui/material/TextField");var zp=r.n(_p);const $p=require("crypto");var Fp=r.n($p);const Wp={randomUUID:Fp().randomUUID},Up=new Uint8Array(256);let qp=Up.length;function Gp(){return qp>Up.length-16&&(Fp().randomFillSync(Up),qp=0),Up.slice(qp,qp+=16)}const Hp=[];for(let e=0;e<256;++e)Hp.push((e+256).toString(16).slice(1));const Xp=function(e,t,r){if(Wp.randomUUID&&!t&&!e)return Wp.randomUUID();const n=(e=e||{}).random||(e.rng||Gp)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=n[e];return t}return function(e,t=0){return Hp[e[t+0]]+Hp[e[t+1]]+Hp[e[t+2]]+Hp[e[t+3]]+"-"+Hp[e[t+4]]+Hp[e[t+5]]+"-"+Hp[e[t+6]]+Hp[e[t+7]]+"-"+Hp[e[t+8]]+Hp[e[t+9]]+"-"+Hp[e[t+10]]+Hp[e[t+11]]+Hp[e[t+12]]+Hp[e[t+13]]+Hp[e[t+14]]+Hp[e[t+15]]}(n)};function Kp(e){var t=(0,m.useState)(""),r=t[0],n=t[1],i=!r.trim().length;function o(){if(!i){var t=(new Date).toISOString(),o={id:Xp(),timestamp:t,sender:e.sender,conversationId:e.conversationId,format:"text",data:{text:r}};e.ws.send(o),n("")}}return(0,c.jsx)(zp(),{"data-cy":"text-field",className:"rustic-textfield",variant:"outlined",value:r,label:e.label,maxRows:e.maxRows,multiline:e.multiline,fullWidth:e.fullWidth,onKeyDown:function(e){"Enter"!==e.key||e.shiftKey||(e.preventDefault(),o())},onChange:function(e){n(e.target.value)},sx:{backgroundColor:"background.paper"},InputProps:{endAdornment:(0,c.jsx)(Lp(),{position:"end",children:(0,c.jsx)(A(),{"data-cy":"send-button","aria-label":"send message",onClick:o,disabled:i,color:"primary",children:(0,c.jsx)(Np(),{})})})}})}function Vp(e){var t=(0,m.useState)(!0),r=t[0],n=t[1],i=au.sanitize(e.youtubeVideoId);return(0,c.jsxs)(hp.Box,{className:"rustic-youtube-video",children:[r&&(0,c.jsx)(hp.Box,{className:"rustic-youtube-video-loading-container",children:(0,c.jsx)(Kl(),{"data-cy":"spinner"})}),(0,c.jsx)("iframe",{"data-cy":"youtube-video-iframe",height:e.height,width:e.width,src:"https://www.youtube.com/embed/".concat(i),title:e.title,onLoad:function(){n(!1)},allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; fullscreen",loading:"lazy"})]})}Kp.defaultProps={multiline:!0,fullWidth:!0,maxRows:6},Vp.defaultProps={height:300,width:400,title:"Embedded video"}})(),n})()));
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["@rustic-ai/ui-components"]=t():e["@rustic-ai/ui-components"]=t()}(global,(()=>(()=>{var e={450:function(e){e.exports=function(){var e=[],t=[],r={},n={},i={};function o(e){return"string"==typeof e?new RegExp("^"+e+"$","i"):e}function a(e,t){return e===t?t:e===e.toLowerCase()?t.toLowerCase():e===e.toUpperCase()?t.toUpperCase():e[0]===e[0].toUpperCase()?t.charAt(0).toUpperCase()+t.substr(1).toLowerCase():t.toLowerCase()}function c(e,t){return e.replace(t[0],(function(r,n){var i,o,c=(i=t[1],o=arguments,i.replace(/\$(\d{1,2})/g,(function(e,t){return o[t]||""})));return a(""===r?e[n-1]:r,c)}))}function l(e,t,n){if(!e.length||r.hasOwnProperty(e))return t;for(var i=n.length;i--;){var o=n[i];if(o[0].test(t))return c(t,o)}return t}function s(e,t,r){return function(n){var i=n.toLowerCase();return t.hasOwnProperty(i)?a(n,i):e.hasOwnProperty(i)?a(n,e[i]):l(i,n,r)}}function u(e,t,r,n){return function(n){var i=n.toLowerCase();return!!t.hasOwnProperty(i)||!e.hasOwnProperty(i)&&l(i,i,r)===i}}function p(e,t,r){return(r?t+" ":"")+(1===t?p.singular(e):p.plural(e))}return p.plural=s(i,n,e),p.isPlural=u(i,n,e),p.singular=s(n,i,t),p.isSingular=u(n,i,t),p.addPluralRule=function(t,r){e.push([o(t),r])},p.addSingularRule=function(e,r){t.push([o(e),r])},p.addUncountableRule=function(e){"string"!=typeof e?(p.addPluralRule(e,"$0"),p.addSingularRule(e,"$0")):r[e.toLowerCase()]=!0},p.addIrregularRule=function(e,t){t=t.toLowerCase(),e=e.toLowerCase(),i[e]=t,n[t]=e},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach((function(e){return p.addIrregularRule(e[0],e[1])})),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach((function(e){return p.addPluralRule(e[0],e[1])})),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach((function(e){return p.addSingularRule(e[0],e[1])})),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(p.addUncountableRule),p}()}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{"use strict";r.r(n),r.d(n,{CodeSnippet:()=>ss,ElementRenderer:()=>ps,FCCalendar:()=>w,Image:()=>ys,MarkedMarkdown:()=>rp,MarkedStreamingMarkdown:()=>np,MessageCanvas:()=>cp,MessageSpace:()=>lp,NavBar:()=>dp,OpenLayersMap:()=>Is,ParticipantRole:()=>Mp,ParticipantType:()=>Rp,ParticipantsContainer:()=>Lp,RechartsTimeSeries:()=>Vl,StreamingText:()=>Zp,Table:()=>Yp,Text:()=>Qp,TextInput:()=>af,Timestamp:()=>ap,YoutubeVideo:()=>cf,rusticDarkTheme:()=>l,rusticLightTheme:()=>c,rusticTheme:()=>s});const e=require("@mui/material/styles");var t=function(){return t=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},t.apply(this,arguments)},i="#DDD0CA",o="#C7C2C0",a={shape:{borderRadius:16},typography:{fontFamily:"Inter",h1:{fontStyle:"normal",fontWeight:400,fontSize:"96px",letterSpacing:"-1.5px"},h2:{fontStyle:"normal",fontWeight:400,fontSize:"60px",letterSpacing:"-0.5px"},h3:{fontStyle:"normal",fontWeight:400,fontSize:"48px",letterSpacing:"0px"},h4:{fontStyle:"normal",fontWeight:400,fontSize:"34px",letterSpacing:"0.25px"},h5:{fontStyle:"normal",fontWeight:400,fontSize:"24px",letterSpacing:"0px"},h6:{fontStyle:"normal",fontWeight:400,fontSize:"20px",letterSpacing:"0.15px"},body1:{fontStyle:"normal",fontWeight:700,fontSize:"16px",letterSpacing:"0.15px"},body2:{fontStyle:"normal",fontWeight:400,fontSize:"16px",letterSpacing:"0.17px"},subtitle1:{fontStyle:"normal",fontWeight:400,fontSize:"16px",letterSpacing:"0.15px",textDecoration:"none"},subtitle2:{fontStyle:"normal",fontWeight:500,fontSize:"14px",letterSpacing:"0.01px"},overline:{fontStyle:"normal",fontWeight:400,fontSize:"14px",letterSpacing:"0.15px"},caption:{fontStyle:"normal",fontWeight:500,fontSize:"12px",letterSpacing:"0.04px"}},shadows:function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}([],(0,e.createTheme)({}).shadows.map((function(e,t){return 1===t?"0 4px 5px rgba(0, 0, 0, 0.05)":2===t?"0 4px 10px rgba(0, 0, 0, 0.1)":3===t?"0 4px 15px rgba(0, 0, 0, 0.15)":"none"})),!0)},c=(0,e.createTheme)(t(t({},a),{palette:{mode:"light",divider:i,text:{secondary:"#4E443F",disabled:o},primary:{main:"#3D3834",contrastText:"#FFFFFF",dark:"#2D2825",light:i},secondary:{main:"#FF6928",light:"#FFDBCC",dark:"#E54500"},error:{main:"#F82A43",dark:"#B51616"},warning:{main:"#FFB800"},info:{main:"#0094FF"},success:{main:"#35A700"},background:{default:"#F4F0EF",paper:"#FFFFFF"},action:{active:"#5F5C5A",hover:"#F1ECEA",selected:o,disabledBackground:"#E5E5E5",focus:"#F4F0EF",disabled:o}}})),l=(0,e.createTheme)(t(t({},a),{palette:{mode:"dark",primary:{main:"#FFFCFB",dark:"#E54500",light:"#FFDBCC"},secondary:{main:"#FF6928",light:"#FFA983",dark:"#E54500"},error:{main:"#F82A43"},warning:{main:"#FFB800"},info:{main:"#0094FF"},success:{main:"#35A700"},background:{default:"#040404",paper:"#2F2F2F"},divider:"#D0C4BE",text:{primary:"#FFFFFF",secondary:"#EBEBEB",disabled:"#C1C1C1"},action:{active:"#5F5C5A",hover:"#9A9A9A",selected:"#D6D0D0",focus:"#FDFDFD",disabledBackground:"#E5E5E5",disabled:"#C7C2C0"}}}));c=(0,e.responsiveFontSizes)(c),l=(0,e.responsiveFontSizes)(l);const s=c,u=require("react/jsx-runtime"),p=require("@fullcalendar/daygrid");var f=r.n(p);const d=require("@fullcalendar/react");var h=r.n(d);const y=require("@mui/material/Box");var m=r.n(y);const v=require("@mui/material/useMediaQuery");var g=r.n(v);const b=require("react");var x=r.n(b);function w(t){var r=(0,e.useTheme)(),n=g()(r.breakpoints.up("md"));return(0,u.jsx)(m(),{className:"rustic-fc-calendar",children:(0,u.jsx)(h(),{plugins:[f()],initialView:t.initialView||(n?"dayGridMonth":"dayGridDay"),headerToolbar:{left:"prev,next",center:"title",right:"dayGridMonth,dayGridWeek,dayGridDay"},eventTimeFormat:{hour:"2-digit",minute:"2-digit"},initialDate:t.events[0].start,events:t.events,views:{dayGridMonth:{titleFormat:{year:"numeric",month:"short"}},dayGridWeek:{},dayGridDay:{titleFormat:{year:"numeric",month:"short",day:"numeric"}}}})})}const O=require("@mui/icons-material/Crop169");var k=r.n(O);const S=require("@mui/icons-material/MoreVert");var j=r.n(S);const A=require("@mui/material/FormControl");var E=r.n(A);const P=require("@mui/material/IconButton");var T=r.n(P);const C=require("@mui/material/Menu");var I=r.n(C);const D=require("@mui/material/MenuItem");var M=r.n(D);const R=require("@mui/material/Typography");var N=r.n(R);const B=require("@mui/system/Box");var L=r.n(B);const _=require("lodash/isNil");var z=r.n(_);const $=require("lodash/isFunction");var F=r.n($);const W=require("lodash/range");var U=r.n(W);const q=require("lodash/get");var G=r.n(q);const H=require("lodash/sortBy");var X=r.n(H);const V=require("lodash/throttle");var K=r.n(V);const Y=require("lodash/find");var Z=r.n(Y);const Q=require("lodash/every");var J=r.n(Q);const ee=require("clsx");var te=r.n(ee);const re=require("tiny-invariant");var ne=r.n(re);function ie(e){return ie="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ie(e)}function oe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ae(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?oe(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==ie(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==ie(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===ie(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):oe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ce=Math.PI/180,le=function(e){return 180*e/Math.PI},se=function(e,t,r,n){return{x:e+Math.cos(-ce*n)*r,y:t+Math.sin(-ce*n)*r}},ue=function(e,t){var r=t.startAngle,n=t.endAngle,i=Math.floor(r/360),o=Math.floor(n/360);return e+360*Math.min(i,o)},pe=function(e,t){var r=function(e,t){var r,n,i,o,a,c,l=e.x,s=e.y,u=t.cx,p=t.cy,f=(i=(r={x:l,y:s}).x,o=r.y,a=(n={x:u,y:p}).x,c=n.y,Math.sqrt(Math.pow(i-a,2)+Math.pow(o-c,2)));if(f<=0)return{radius:f};var d=(l-u)/f,h=Math.acos(d);return s>p&&(h=2*Math.PI-h),{radius:f,angle:le(h),angleInRadian:h}}({x:e.x,y:e.y},t),n=r.radius,i=r.angle,o=t.innerRadius,a=t.outerRadius;if(n<o||n>a)return!1;if(0===n)return!0;var c,l=function(e){var t=e.startAngle,r=e.endAngle,n=Math.floor(t/360),i=Math.floor(r/360),o=Math.min(n,i);return{startAngle:t-360*o,endAngle:r-360*o}}(t),s=l.startAngle,u=l.endAngle,p=i;if(s<=u){for(;p>u;)p-=360;for(;p<s;)p+=360;c=p>=s&&p<=u}else{for(;p>s;)p-=360;for(;p<u;)p+=360;c=p>=u&&p<=s}return c?ae(ae({},t),{},{radius:n,angle:ue(p,t)}):null};function fe(e){var t=e.cx,r=e.cy,n=e.radius,i=e.startAngle,o=e.endAngle;return{points:[se(t,r,n,i),se(t,r,n,o)],cx:t,cy:r,radius:n,startAngle:i,endAngle:o}}const de=require("lodash/isString");var he=r.n(de);const ye=require("lodash/isNaN");var me=r.n(ye);const ve=require("lodash/isNumber");var ge=r.n(ve),be=function(e){return 0===e?0:e>0?1:-1},xe=function(e){return he()(e)&&e.indexOf("%")===e.length-1},we=function(e){return ge()(e)&&!me()(e)},Oe=function(e){return we(e)||he()(e)},ke=0,Se=function(e){var t=++ke;return"".concat(e||"").concat(t)},je=function(e,t){var r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!we(e)&&!he()(e))return n;if(xe(e)){var o=e.indexOf("%");r=t*parseFloat(e.slice(0,o))/100}else r=+e;return me()(r)&&(r=n),i&&r>t&&(r=t),r},Ae=function(e){if(!e)return null;var t=Object.keys(e);return t&&t.length?e[t[0]]:null},Ee=function(e,t){return we(e)&&we(t)?function(r){return e+r*(t-e)}:function(){return t}};function Pe(e,t,r){return e&&e.length?e.find((function(e){return e&&("function"==typeof t?t(e):G()(e,t))===r})):null}var Te={isSsr:!("undefined"!=typeof window&&window.document&&window.document.createElement&&window.setTimeout),get:function(e){return Te[e]},set:function(e,t){if("string"==typeof e)Te[e]=t;else{var r=Object.keys(e);r&&r.length&&r.forEach((function(t){Te[t]=e[t]}))}}};function Ce(e){return Ce="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ce(e)}function Ie(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function De(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ie(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==Ce(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Ce(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Ce(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ie(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Me={widthCache:{},cacheCount:0},Re={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},Ne="recharts_measurement_span",Be=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null==e||Te.isSsr)return{width:0,height:0};var r,n=(r=De({},t),Object.keys(r).forEach((function(e){r[e]||delete r[e]})),r),i=JSON.stringify({text:e,copyStyle:n});if(Me.widthCache[i])return Me.widthCache[i];try{var o=document.getElementById(Ne);o||((o=document.createElement("span")).setAttribute("id",Ne),o.setAttribute("aria-hidden","true"),document.body.appendChild(o));var a=De(De({},Re),n);Object.assign(o.style,a),o.textContent="".concat(e);var c=o.getBoundingClientRect(),l={width:c.width,height:c.height};return Me.widthCache[i]=l,++Me.cacheCount>2e3&&(Me.cacheCount=0,Me.widthCache={}),l}catch(e){return{width:0,height:0}}};const Le=require("lodash/mapValues");var _e=r.n(Le);const ze=require("victory-vendor/d3-scale"),$e=require("victory-vendor/d3-shape"),Fe=require("lodash/max");var We=r.n(Fe);const Ue=require("lodash/min");var qe=r.n(Ue);const Ge=require("lodash/flatMap");var He=r.n(Ge);const Xe=require("lodash/upperFirst");var Ve=r.n(Xe);const Ke=require("lodash/isEqual");var Ye=r.n(Ke);const Ze=require("recharts-scale"),Qe=require("lodash/isObject");var Je=r.n(Qe);const et=require("react-is");function tt(e,t){for(var r in e)if({}.hasOwnProperty.call(e,r)&&(!{}.hasOwnProperty.call(t,r)||e[r]!==t[r]))return!1;for(var n in t)if({}.hasOwnProperty.call(t,n)&&!{}.hasOwnProperty.call(e,n))return!1;return!0}function rt(e){return rt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rt(e)}var nt=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],it=["points","pathLength"],ot={svg:["viewBox","children"],polygon:it,polyline:it},at=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],ct=function(e,t){if(!e||"function"==typeof e||"boolean"==typeof e)return null;var r=e;if((0,b.isValidElement)(e)&&(r=e.props),!Je()(r))return null;var n={};return Object.keys(r).forEach((function(e){at.includes(e)&&(n[e]=t||function(t){return r[e](r,t)})})),n},lt=function(e,t,r){if(!Je()(e)||"object"!==rt(e))return null;var n=null;return Object.keys(e).forEach((function(i){var o=e[i];at.includes(i)&&"function"==typeof o&&(n||(n={}),n[i]=function(e,t,r){return function(n){return e(t,r,n),null}}(o,t,r))})),n},st=["children"],ut=["children"];function pt(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function ft(e){return ft="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ft(e)}var dt={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart"},ht=function(e){return"string"==typeof e?e:e?e.displayName||e.name||"Component":""},yt=null,mt=null,vt=function e(t){if(t===yt&&Array.isArray(mt))return mt;var r=[];return b.Children.forEach(t,(function(t){z()(t)||((0,et.isFragment)(t)?r=r.concat(e(t.props.children)):r.push(t))})),mt=r,yt=t,r};function gt(e,t){var r=[],n=[];return n=Array.isArray(t)?t.map((function(e){return ht(e)})):[ht(t)],vt(e).forEach((function(e){var t=G()(e,"type.displayName")||G()(e,"type.name");-1!==n.indexOf(t)&&r.push(e)})),r}function bt(e,t){var r=gt(e,t);return r&&r[0]}var xt=function(e){if(!e||!e.props)return!1;var t=e.props,r=t.width,n=t.height;return!(!we(r)||r<=0||!we(n)||n<=0)},wt=["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"],Ot=function(e){return e&&"object"===ft(e)&&"cx"in e&&"cy"in e&&"r"in e},kt=function(e,t,r){if(!e||"function"==typeof e||"boolean"==typeof e)return null;var n=e;if((0,b.isValidElement)(e)&&(n=e.props),!Je()(n))return null;var i={};return Object.keys(n).forEach((function(e){var o;(function(e,t,r,n){var i,o=null!==(i=null==ot?void 0:ot[n])&&void 0!==i?i:[];return!F()(e)&&(n&&o.includes(t)||nt.includes(t))||r&&at.includes(t)})(null===(o=n)||void 0===o?void 0:o[e],e,t,r)&&(i[e]=n[e])})),i},St=function e(t,r){if(t===r)return!0;var n=b.Children.count(t);if(n!==b.Children.count(r))return!1;if(0===n)return!0;if(1===n)return jt(Array.isArray(t)?t[0]:t,Array.isArray(r)?r[0]:r);for(var i=0;i<n;i++){var o=t[i],a=r[i];if(Array.isArray(o)||Array.isArray(a)){if(!e(o,a))return!1}else if(!jt(o,a))return!1}return!0},jt=function(e,t){if(z()(e)&&z()(t))return!0;if(!z()(e)&&!z()(t)){var r=e.props||{},n=r.children,i=pt(r,st),o=t.props||{},a=o.children,c=pt(o,ut);return n&&a?tt(i,c)&&St(n,a):!n&&!a&&tt(i,c)}return!1},At=function(e,t){var r=[],n={};return vt(e).forEach((function(e,i){if(function(e){return e&&e.type&&he()(e.type)&&wt.indexOf(e.type)>=0}(e))r.push(e);else if(e){var o=ht(e.type),a=t[o]||{},c=a.handler,l=a.once;if(c&&(!l||!n[o])){var s=c(e,o,i);r.push(s),n[o]=!0}}})),r},Et=["children","className"];function Pt(){return Pt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Pt.apply(this,arguments)}var Tt=x().forwardRef((function(e,t){var r=e.children,n=e.className,i=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,Et),o=te()("recharts-layer",n);return x().createElement("g",Pt({className:o},kt(i,!0),{ref:t}),r)})),Ct=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function It(){return It=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},It.apply(this,arguments)}function Dt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Mt(e){var t=e.offset,r=e.layout,n=e.width,i=e.dataKey,o=e.data,a=e.dataPointFormatter,c=e.xAxis,l=e.yAxis,s=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,Ct),u=kt(s),p=o.map((function(e){var o=a(e,i),s=o.x,p=o.y,f=o.value,d=o.errorVal;if(!d)return null;var h,y,m,v,g=[];if(Array.isArray(d)){var b=(v=2,function(e){if(Array.isArray(e))return e}(m=d)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,c=[],l=!0,s=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){s=!0,i=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw i}}return c}}(m,v)||function(e,t){if(e){if("string"==typeof e)return Dt(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Dt(e,t):void 0}}(m,v)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());h=b[0],y=b[1]}else h=y=d;if("vertical"===r){var w=c.scale,O=p+t,k=O+n,S=O-n,j=w(f-h),A=w(f+y);g.push({x1:A,y1:k,x2:A,y2:S}),g.push({x1:j,y1:O,x2:A,y2:O}),g.push({x1:j,y1:k,x2:j,y2:S})}else if("horizontal"===r){var E=l.scale,P=s+t,T=P-n,C=P+n,I=E(f-h),D=E(f+y);g.push({x1:T,y1:D,x2:C,y2:D}),g.push({x1:P,y1:I,x2:P,y2:D}),g.push({x1:T,y1:I,x2:C,y2:I})}return x().createElement(Tt,It({className:"recharts-errorBar",key:"bar-".concat(g.map((function(e){return"".concat(e.x1,"-").concat(e.x2,"-").concat(e.y1,"-").concat(e.y2)})))},u),g.map((function(e){return x().createElement("line",It({},e,{key:"line-".concat(e.x1,"-").concat(e.x2,"-").concat(e.y1,"-").concat(e.y2)}))})))}));return x().createElement(Tt,{className:"recharts-errorBars"},p)}Mt.defaultProps={stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"},Mt.displayName="ErrorBar";var Rt=function(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),i=2;i<r;i++)n[i-2]=arguments[i]},Nt=["children","width","height","viewBox","className","style","title","desc"];function Bt(){return Bt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Bt.apply(this,arguments)}function Lt(e){var t=e.children,r=e.width,n=e.height,i=e.viewBox,o=e.className,a=e.style,c=e.title,l=e.desc,s=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,Nt),u=i||{width:r,height:n,x:0,y:0},p=te()("recharts-surface",o);return x().createElement("svg",Bt({},kt(s,!0,"svg"),{className:p,width:r,height:n,style:a,viewBox:"".concat(u.x," ").concat(u.y," ").concat(u.width," ").concat(u.height)}),x().createElement("title",null,c),x().createElement("desc",null,l),t)}function _t(e){return _t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_t(e)}var zt=["type","size","sizeType"];function $t(){return $t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},$t.apply(this,arguments)}function Ft(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Wt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ft(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==_t(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==_t(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===_t(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ft(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Ut={symbolCircle:$e.symbolCircle,symbolCross:$e.symbolCross,symbolDiamond:$e.symbolDiamond,symbolSquare:$e.symbolSquare,symbolStar:$e.symbolStar,symbolTriangle:$e.symbolTriangle,symbolWye:$e.symbolWye},qt=Math.PI/180,Gt=function(e){var t,r,n=e.type,i=void 0===n?"circle":n,o=e.size,a=void 0===o?64:o,c=e.sizeType,l=void 0===c?"area":c,s=Wt(Wt({},function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,zt)),{},{type:i,size:a,sizeType:l}),u=s.className,p=s.cx,f=s.cy,d=kt(s,!0);return p===+p&&f===+f&&a===+a?x().createElement("path",$t({},d,{className:te()("recharts-symbols",u),transform:"translate(".concat(p,", ").concat(f,")"),d:(t=function(e){var t="symbol".concat(Ve()(e));return Ut[t]||$e.symbolCircle}(i),r=(0,$e.symbol)().type(t).size(function(e,t,r){if("area"===t)return e;switch(r){case"cross":return 5*e*e/9;case"diamond":return.5*e*e/Math.sqrt(3);case"square":return e*e;case"star":var n=18*qt;return 1.25*e*e*(Math.tan(n)-Math.tan(2*n)*Math.pow(Math.tan(n),2));case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}}(a,l,i)),r())})):null};function Ht(e){return Ht="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ht(e)}function Xt(){return Xt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Xt.apply(this,arguments)}function Vt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Kt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Jt(n.key),n)}}function Yt(e,t){return Yt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Yt(e,t)}function Zt(e){return Zt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Zt(e)}function Qt(e,t,r){return(t=Jt(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Jt(e){var t=function(e,t){if("object"!==Ht(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Ht(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Ht(t)?t:String(t)}Gt.registerSymbol=function(e,t){Ut["symbol".concat(Ve()(e))]=t};var er=32,tr=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Yt(e,t)}(a,e);var t,r,n,i,o=(n=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Zt(n);if(i){var r=Zt(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Ht(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function a(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),o.apply(this,arguments)}return t=a,r=[{key:"renderIcon",value:function(e){var t=this.props.inactiveColor,r=16,n=er/6,i=er/3,o=e.inactive?t:e.color;if("plainline"===e.type)return x().createElement("line",{strokeWidth:4,fill:"none",stroke:o,strokeDasharray:e.payload.strokeDasharray,x1:0,y1:r,x2:er,y2:r,className:"recharts-legend-icon"});if("line"===e.type)return x().createElement("path",{strokeWidth:4,fill:"none",stroke:o,d:"M0,".concat(r,"h").concat(i,"\n A").concat(n,",").concat(n,",0,1,1,").concat(2*i,",").concat(r,"\n H").concat(er,"M").concat(2*i,",").concat(r,"\n A").concat(n,",").concat(n,",0,1,1,").concat(i,",").concat(r),className:"recharts-legend-icon"});if("rect"===e.type)return x().createElement("path",{stroke:"none",fill:o,d:"M0,".concat(4,"h").concat(er,"v").concat(24,"h").concat(-32,"z"),className:"recharts-legend-icon"});if(x().isValidElement(e.legendIcon)){var a=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Vt(Object(r),!0).forEach((function(t){Qt(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Vt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e);return delete a.legendIcon,x().cloneElement(e.legendIcon,a)}return x().createElement(Gt,{fill:o,cx:r,cy:r,size:er,sizeType:"diameter",type:e.type})}},{key:"renderItems",value:function(){var e=this,t=this.props,r=t.payload,n=t.iconSize,i=t.layout,o=t.formatter,a=t.inactiveColor,c={x:0,y:0,width:er,height:er},l={display:"horizontal"===i?"inline-block":"block",marginRight:10},s={display:"inline-block",verticalAlign:"middle",marginRight:4};return r.map((function(t,r){var i,u=t.formatter||o,p=te()((Qt(i={"recharts-legend-item":!0},"legend-item-".concat(r),!0),Qt(i,"inactive",t.inactive),i));if("none"===t.type)return null;var f=F()(t.value)?null:t.value;Rt(!F()(t.value),'The name property is also required when using a function for the dataKey of a chart\'s cartesian components. Ex: <Bar name="Name of my Data"/>');var d=t.inactive?a:t.color;return x().createElement("li",Xt({className:p,style:l,key:"legend-item-".concat(r)},lt(e.props,t,r)),x().createElement(Lt,{width:n,height:n,viewBox:c,style:s},e.renderIcon(t)),x().createElement("span",{className:"recharts-legend-item-text",style:{color:d}},u?u(f,t,r):f))}))}},{key:"render",value:function(){var e=this.props,t=e.payload,r=e.layout,n=e.align;if(!t||!t.length)return null;var i={padding:0,margin:0,textAlign:"horizontal"===r?n:"left"};return x().createElement("ul",{className:"recharts-default-legend",style:i},this.renderItems())}}],r&&Kt(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.PureComponent);Qt(tr,"displayName","Legend"),Qt(tr,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});const rr=require("lodash/uniqBy");var nr=r.n(rr);function ir(e,t,r){return!0===t?nr()(e,r):F()(t)?nr()(e,t):e}function or(e){return or="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},or(e)}var ar=["ref"];function cr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function lr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?cr(Object(r),!0).forEach((function(t){dr(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function sr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,hr(n.key),n)}}function ur(e,t){return ur=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ur(e,t)}function pr(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function fr(e){return fr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},fr(e)}function dr(e,t,r){return(t=hr(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function hr(e){var t=function(e,t){if("object"!==or(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==or(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===or(t)?t:String(t)}function yr(e){return e.value}var mr=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ur(e,t)}(c,e);var t,r,n,i,o,a=(i=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=fr(i);if(o){var r=fr(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===or(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return pr(e)}(this,e)});function c(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return dr(pr(e=a.call.apply(a,[this].concat(r))),"lastBoundingBox",{width:-1,height:-1}),e}return t=c,n=[{key:"getWithHeight",value:function(e,t){var r=e.props.layout;return"vertical"===r&&we(e.props.height)?{height:e.props.height}:"horizontal"===r?{width:e.props.width||t}:null}}],(r=[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){return this.wrapperNode&&this.wrapperNode.getBoundingClientRect?this.wrapperNode.getBoundingClientRect():null}},{key:"updateBBox",value:function(){var e=this.props.onBBoxUpdate;if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var t=this.wrapperNode.getBoundingClientRect();(Math.abs(t.width-this.lastBoundingBox.width)>1||Math.abs(t.height-this.lastBoundingBox.height)>1)&&(this.lastBoundingBox.width=t.width,this.lastBoundingBox.height=t.height,e&&e(t))}else-1===this.lastBoundingBox.width&&-1===this.lastBoundingBox.height||(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,e&&e(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?lr({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(e){var t,r,n=this.props,i=n.layout,o=n.align,a=n.verticalAlign,c=n.margin,l=n.chartWidth,s=n.chartHeight;return e&&(void 0!==e.left&&null!==e.left||void 0!==e.right&&null!==e.right)||(t="center"===o&&"vertical"===i?{left:((l||0)-this.getBBoxSnapshot().width)/2}:"right"===o?{right:c&&c.right||0}:{left:c&&c.left||0}),e&&(void 0!==e.top&&null!==e.top||void 0!==e.bottom&&null!==e.bottom)||(r="middle"===a?{top:((s||0)-this.getBBoxSnapshot().height)/2}:"bottom"===a?{bottom:c&&c.bottom||0}:{top:c&&c.top||0}),lr(lr({},t),r)}},{key:"render",value:function(){var e=this,t=this.props,r=t.content,n=t.width,i=t.height,o=t.wrapperStyle,a=t.payloadUniqBy,c=t.payload,l=lr(lr({position:"absolute",width:n||"auto",height:i||"auto"},this.getDefaultPosition(o)),o);return x().createElement("div",{className:"recharts-legend-wrapper",style:l,ref:function(t){e.wrapperNode=t}},function(e,t){if(x().isValidElement(e))return x().cloneElement(e,t);if("function"==typeof e)return x().createElement(e,t);t.ref;var r=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(t,ar);return x().createElement(tr,r)}(r,lr(lr({},this.props),{},{payload:ir(c,a,yr)})))}}])&&sr(t.prototype,r),n&&sr(t,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(b.PureComponent);function vr(e){return vr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vr(e)}function gr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function br(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?gr(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==vr(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==vr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===vr(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}dr(mr,"displayName","Legend"),dr(mr,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var xr=function(e){var t,r=e.children,n=e.formattedGraphicalItems,i=e.legendWidth,o=e.legendContent,a=bt(r,mr);return a?(t=a.props&&a.props.payload?a.props&&a.props.payload:"children"===o?(n||[]).reduce((function(e,t){var r=t.item,n=t.props,i=n.sectors||n.data||[];return e.concat(i.map((function(e){return{type:a.props.iconType||r.props.legendType,value:e.name,color:e.fill,payload:e}})))}),[]):(n||[]).map((function(e){var t=e.item,r=t.props,n=r.dataKey,i=r.name,o=r.legendType;return{inactive:r.hide,dataKey:n,type:a.props.iconType||o||"square",color:Tr(t),value:i||n,payload:t.props}})),br(br(br({},a.props),mr.getWithHeight(a,i)),{},{payload:t,item:a})):null};function wr(e){return wr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wr(e)}function Or(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function kr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Or(Object(r),!0).forEach((function(t){Sr(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Or(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Sr(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==wr(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==wr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===wr(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function jr(e){return function(e){if(Array.isArray(e))return Ar(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Ar(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ar(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ar(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Er(e,t,r){return z()(e)||z()(t)?r:Oe(t)?G()(e,t,r):F()(t)?t(e):r}function Pr(e,t,r,n){var i=He()(e,(function(e){return Er(e,t)}));if("number"===r){var o=i.filter((function(e){return we(e)||parseFloat(e)}));return o.length?[qe()(o),We()(o)]:[1/0,-1/0]}return(n?i.filter((function(e){return!z()(e)})):i).map((function(e){return Oe(e)||e instanceof Date?e:""}))}var Tr=function(e){var t,r=e.type.displayName,n=e.props,i=n.stroke,o=n.fill;switch(r){case"Line":t=i;break;case"Area":case"Radar":t=i&&"none"!==i?i:o;break;default:t=o}return t},Cr=function(e,t,r,n,i){var o=gt(t.props.children,Mt).filter((function(e){return function(e,t,r){return!!z()(t)||("horizontal"===e?"yAxis"===t:"vertical"===e||"x"===r?"xAxis"===t:"y"!==r||"yAxis"===t)}(n,i,e.props.direction)}));if(o&&o.length){var a=o.map((function(e){return e.props.dataKey}));return e.reduce((function(e,t){var n=Er(t,r,0),i=Array.isArray(n)?[qe()(n),We()(n)]:[n,n],o=a.reduce((function(e,r){var n=Er(t,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,e[0]),Math.max(a,e[1])]}),[1/0,-1/0]);return[Math.min(o[0],e[0]),Math.max(o[1],e[1])]}),[1/0,-1/0])}return null},Ir=function(e,t,r,n,i){var o=t.map((function(t){var o=t.props.dataKey;return"number"===r&&o&&Cr(e,t,o,n)||Pr(e,o,r,i)}));if("number"===r)return o.reduce((function(e,t){return[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}),[1/0,-1/0]);var a={};return o.reduce((function(e,t){for(var r=0,n=t.length;r<n;r++)a[t[r]]||(a[t[r]]=!0,e.push(t[r]));return e}),[])},Dr=function(e,t){return"horizontal"===e&&"xAxis"===t||"vertical"===e&&"yAxis"===t||"centric"===e&&"angleAxis"===t||"radial"===e&&"radiusAxis"===t},Mr=function(e,t,r,n){if(n)return e.map((function(e){return e.coordinate}));var i,o,a=e.map((function(e){return e.coordinate===t&&(i=!0),e.coordinate===r&&(o=!0),e.coordinate}));return i||a.push(t),o||a.push(r),a},Rr=function(e,t,r){if(!e)return null;var n=e.scale,i=e.duplicateDomain,o=e.type,a=e.range,c="scaleBand"===e.realScaleType?n.bandwidth()/2:2,l=(t||r)&&"category"===o&&n.bandwidth?n.bandwidth()/c:0;return l="angleAxis"===e.axisType&&(null==a?void 0:a.length)>=2?2*be(a[0]-a[1])*l:l,t&&(e.ticks||e.niceTicks)?(e.ticks||e.niceTicks).map((function(e){var t=i?i.indexOf(e):e;return{coordinate:n(t)+l,value:e,offset:l}})).filter((function(e){return!me()(e.coordinate)})):e.isCategorical&&e.categoricalDomain?e.categoricalDomain.map((function(e,t){return{coordinate:n(e)+l,value:e,index:t,offset:l}})):n.ticks&&!r?n.ticks(e.tickCount).map((function(e){return{coordinate:n(e)+l,value:e,offset:l}})):n.domain().map((function(e,t){return{coordinate:n(e)+l,value:i?i[e]:e,index:t,offset:l}}))},Nr=new WeakMap,Br=function(e,t){if("function"!=typeof t)return e;Nr.has(e)||Nr.set(e,new WeakMap);var r=Nr.get(e);if(r.has(t))return r.get(t);var n=function(){e.apply(void 0,arguments),t.apply(void 0,arguments)};return r.set(t,n),n},Lr=1e-4,_r={sign:function(e){var t=e.length;if(!(t<=0))for(var r=0,n=e[0].length;r<n;++r)for(var i=0,o=0,a=0;a<t;++a){var c=me()(e[a][r][1])?e[a][r][0]:e[a][r][1];c>=0?(e[a][r][0]=i,e[a][r][1]=i+c,i=e[a][r][1]):(e[a][r][0]=o,e[a][r][1]=o+c,o=e[a][r][1])}},expand:$e.stackOffsetExpand,none:$e.stackOffsetNone,silhouette:$e.stackOffsetSilhouette,wiggle:$e.stackOffsetWiggle,positive:function(e){var t=e.length;if(!(t<=0))for(var r=0,n=e[0].length;r<n;++r)for(var i=0,o=0;o<t;++o){var a=me()(e[o][r][1])?e[o][r][0]:e[o][r][1];a>=0?(e[o][r][0]=i,e[o][r][1]=i+a,i=e[o][r][1]):(e[o][r][0]=0,e[o][r][1]=0)}}},zr=function(e,t,r){var n=t.map((function(e){return e.props.dataKey})),i=_r[r];return(0,$e.stack)().keys(n).value((function(e,t){return+Er(e,t,0)})).order($e.stackOrderNone).offset(i)(e)},$r=function(e){var t=e.axis,r=e.ticks,n=e.bandSize,i=e.entry,o=e.index,a=e.dataKey;if("category"===t.type){if(!t.allowDuplicatedCategory&&t.dataKey&&!z()(i[t.dataKey])){var c=Pe(r,"value",i[t.dataKey]);if(c)return c.coordinate+n/2}return r[o]?r[o].coordinate+n/2:null}var l=Er(i,z()(a)?t.dataKey:a);return z()(l)?null:t.scale(l)},Fr=function(e){var t=e.axis,r=e.ticks,n=e.offset,i=e.bandSize,o=e.entry,a=e.index;if("category"===t.type)return r[a]?r[a].coordinate+n:null;var c=Er(o,t.dataKey,t.domain[a]);return z()(c)?null:t.scale(c)-i/2+n},Wr=function(e,t,r){return Object.keys(e).reduce((function(n,i){var o=e[i].stackedData.reduce((function(e,n){var i=n.slice(t,r+1).reduce((function(e,t){return[qe()(t.concat([e[0]]).filter(we)),We()(t.concat([e[1]]).filter(we))]}),[1/0,-1/0]);return[Math.min(e[0],i[0]),Math.max(e[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(e){return e===1/0||e===-1/0?0:e}))},Ur=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,qr=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Gr=function(e,t,r){if(F()(e))return e(t,r);if(!Array.isArray(e))return t;var n=[];if(we(e[0]))n[0]=r?e[0]:Math.min(e[0],t[0]);else if(Ur.test(e[0])){var i=+Ur.exec(e[0])[1];n[0]=t[0]-i}else F()(e[0])?n[0]=e[0](t[0]):n[0]=t[0];if(we(e[1]))n[1]=r?e[1]:Math.max(e[1],t[1]);else if(qr.test(e[1])){var o=+qr.exec(e[1])[1];n[1]=t[1]+o}else F()(e[1])?n[1]=e[1](t[1]):n[1]=t[1];return n},Hr=function(e,t,r){if(e&&e.scale&&e.scale.bandwidth){var n=e.scale.bandwidth();if(!r||n>0)return n}if(e&&t&&t.length>=2){for(var i=X()(t,(function(e){return e.coordinate})),o=1/0,a=1,c=i.length;a<c;a++){var l=i[a],s=i[a-1];o=Math.min((l.coordinate||0)-(s.coordinate||0),o)}return o===1/0?0:o}return r?void 0:0},Xr=function(e,t,r){return e&&e.length?Ye()(e,G()(r,"type.defaultProps.domain"))?t:e:t},Vr=function(e,t){var r=e.props,n=r.dataKey,i=r.name,o=r.unit,a=r.formatter,c=r.tooltipType,l=r.chartType;return kr(kr({},kt(e)),{},{dataKey:n,unit:o,formatter:a,name:i||n,color:Tr(e),value:Er(t,n),type:c,payload:t,chartType:l})};const Kr=require("react-smooth");var Yr=r.n(Kr),Zr=function(e){return null};Zr.displayName="Cell";const Qr=require("lodash/last");var Jr=r.n(Qr);function en(e){return en="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},en(e)}function tn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,c=[],l=!0,s=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){s=!0,i=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw i}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return rn(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?rn(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function rn(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function nn(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(void 0,i=function(e,t){if("object"!==en(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==en(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(n.key),"symbol"===en(i)?i:String(i)),n)}var i}var on=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,an=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,cn=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,ln=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,sn={cm:96/2.54,mm:96/25.4,pt:96/72,pc:16,in:96,Q:96/101.6,px:1},un=Object.keys(sn),pn="NaN",fn=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.num=t,this.unit=r,this.num=t,this.unit=r,Number.isNaN(t)&&(this.unit=""),""===r||cn.test(r)||(this.num=NaN,this.unit=""),un.includes(r)&&(this.num=function(e,t){return e*sn[t]}(t,r),this.unit="px")}var t,r,n;return t=e,n=[{key:"parse",value:function(t){var r,n=tn(null!==(r=ln.exec(t))&&void 0!==r?r:[],3),i=n[1],o=n[2];return new e(parseFloat(i),null!=o?o:"")}}],(r=[{key:"add",value:function(t){return this.unit!==t.unit?new e(NaN,""):new e(this.num+t.num,this.unit)}},{key:"subtract",value:function(t){return this.unit!==t.unit?new e(NaN,""):new e(this.num-t.num,this.unit)}},{key:"multiply",value:function(t){return""!==this.unit&&""!==t.unit&&this.unit!==t.unit?new e(NaN,""):new e(this.num*t.num,this.unit||t.unit)}},{key:"divide",value:function(t){return""!==this.unit&&""!==t.unit&&this.unit!==t.unit?new e(NaN,""):new e(this.num/t.num,this.unit||t.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}])&&nn(t.prototype,r),n&&nn(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function dn(e){if(e.includes(pn))return pn;for(var t=e;t.includes("*")||t.includes("/");){var r,n=tn(null!==(r=on.exec(t))&&void 0!==r?r:[],4),i=n[1],o=n[2],a=n[3],c=fn.parse(null!=i?i:""),l=fn.parse(null!=a?a:""),s="*"===o?c.multiply(l):c.divide(l);if(s.isNaN())return pn;t=t.replace(on,s.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var u,p=tn(null!==(u=an.exec(t))&&void 0!==u?u:[],4),f=p[1],d=p[2],h=p[3],y=fn.parse(null!=f?f:""),m=fn.parse(null!=h?h:""),v="+"===d?y.add(m):y.subtract(m);if(v.isNaN())return pn;t=t.replace(an,v.toString())}return t}var hn=/\(([^()]*)\)/;function yn(e){var t=function(e){try{return function(e){var t=e.replace(/\s+/g,"");return t=function(e){for(var t=e;t.includes("(");){var r=tn(hn.exec(t),2)[1];t=t.replace(hn,dn(r))}return t}(t),dn(t)}(e)}catch(e){return pn}}(e.slice(5,-1));return t===pn?"":t}var mn=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],vn=["dx","dy","angle","className","breakAll"];function gn(){return gn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},gn.apply(this,arguments)}function bn(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function xn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,c=[],l=!0,s=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){s=!0,i=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw i}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return wn(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?wn(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function wn(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var On=/[ \f\n\r\t\v\u2028\u2029]+/,kn=function(e){var t=e.children,r=e.breakAll,n=e.style;try{var i=[];return z()(t)||(i=r?t.toString().split(""):t.toString().split(On)),{wordsWithComputedWidth:i.map((function(e){return{word:e,width:Be(e,n).width}})),spaceWidth:r?0:Be(" ",n).width}}catch(e){return null}},Sn=function(e){return[{words:z()(e)?[]:e.toString().split(On)}]},jn="#808080",An=function(e){var t=e.x,r=void 0===t?0:t,n=e.y,i=void 0===n?0:n,o=e.lineHeight,a=void 0===o?"1em":o,c=e.capHeight,l=void 0===c?"0.71em":c,s=e.scaleToFit,u=void 0!==s&&s,p=e.textAnchor,f=void 0===p?"start":p,d=e.verticalAnchor,h=void 0===d?"end":d,y=e.fill,m=void 0===y?jn:y,v=bn(e,mn),g=(0,b.useMemo)((function(){return function(e){var t=e.width,r=e.scaleToFit,n=e.children,i=e.style,o=e.breakAll,a=e.maxLines;if((t||r)&&!Te.isSsr){var c=kn({breakAll:o,children:n,style:i});return c?function(e,t,r,n,i){var o=e.maxLines,a=e.children,c=e.style,l=e.breakAll,s=we(o),u=a,p=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce((function(e,t){var o=t.word,a=t.width,c=e[e.length-1];if(c&&(null==n||i||c.width+a+r<Number(n)))c.words.push(o),c.width+=a+r;else{var l={words:[o],width:a};e.push(l)}return e}),[])},f=p(t);if(!s)return f;for(var d,h=function(e){var t=u.slice(0,e),r=kn({breakAll:l,style:c,children:t+"…"}).wordsWithComputedWidth,i=p(r),a=i.length>o||function(e){return e.reduce((function(e,t){return e.width>t.width?e:t}))}(i).width>Number(n);return[a,i]},y=0,m=u.length-1,v=0;y<=m&&v<=u.length-1;){var g=Math.floor((y+m)/2),b=xn(h(g-1),2),x=b[0],w=b[1],O=xn(h(g),1)[0];if(x||O||(y=g+1),x&&O&&(m=g-1),!x&&O){d=w;break}v++}return d||f}({breakAll:o,children:n,maxLines:a,style:i},c.wordsWithComputedWidth,c.spaceWidth,t,r):Sn(n)}return Sn(n)}({breakAll:v.breakAll,children:v.children,maxLines:v.maxLines,scaleToFit:u,style:v.style,width:v.width})}),[v.breakAll,v.children,v.maxLines,u,v.style,v.width]),w=v.dx,O=v.dy,k=v.angle,S=v.className,j=v.breakAll,A=bn(v,vn);if(!Oe(r)||!Oe(i))return null;var E,P=r+(we(w)?w:0),T=i+(we(O)?O:0);switch(h){case"start":E=yn("calc(".concat(l,")"));break;case"middle":E=yn("calc(".concat((g.length-1)/2," * -").concat(a," + (").concat(l," / 2))"));break;default:E=yn("calc(".concat(g.length-1," * -").concat(a,")"))}var C=[];if(u){var I=g[0].width,D=v.width;C.push("scale(".concat((we(D)?D/I:1)/I,")"))}return k&&C.push("rotate(".concat(k,", ").concat(P,", ").concat(T,")")),C.length&&(A.transform=C.join(" ")),x().createElement("text",gn({},kt(A,!0),{x:P,y:T,className:te()("recharts-text",S),textAnchor:f,fill:m.includes("url")?jn:m}),g.map((function(e,t){var r=e.words.join(j?"":" ");return x().createElement("tspan",{x:P,dy:0===t?E:a,key:r},r)})))};function En(e){return En="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},En(e)}var Pn=["offset"];function Tn(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Cn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function In(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Cn(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==En(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==En(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===En(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Cn(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Dn(){return Dn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Dn.apply(this,arguments)}var Mn=function(e){var t=e.value,r=e.formatter,n=z()(e.children)?t:e.children;return F()(r)?r(n):n},Rn=function(e,t,r){var n,i,o=e.position,a=e.viewBox,c=e.offset,l=e.className,s=a,u=s.cx,p=s.cy,f=s.innerRadius,d=s.outerRadius,h=s.startAngle,y=s.endAngle,m=s.clockWise,v=(f+d)/2,g=function(e,t){return be(t-e)*Math.min(Math.abs(t-e),360)}(h,y),b=g>=0?1:-1;"insideStart"===o?(n=h+b*c,i=m):"insideEnd"===o?(n=y-b*c,i=!m):"end"===o&&(n=y+b*c,i=m),i=g<=0?i:!i;var w=se(u,p,v,n),O=se(u,p,v,n+359*(i?1:-1)),k="M".concat(w.x,",").concat(w.y,"\n A").concat(v,",").concat(v,",0,1,").concat(i?0:1,",\n ").concat(O.x,",").concat(O.y),S=z()(e.id)?Se("recharts-radial-line-"):e.id;return x().createElement("text",Dn({},r,{dominantBaseline:"central",className:te()("recharts-radial-bar-label",l)}),x().createElement("defs",null,x().createElement("path",{id:S,d:k})),x().createElement("textPath",{xlinkHref:"#".concat(S)},t))},Nn=function(e){var t=e.viewBox,r=e.offset,n=e.position,i=t,o=i.cx,a=i.cy,c=i.innerRadius,l=i.outerRadius,s=(i.startAngle+i.endAngle)/2;if("outside"===n){var u=se(o,a,l+r,s),p=u.x;return{x:p,y:u.y,textAnchor:p>=o?"start":"end",verticalAnchor:"middle"}}if("center"===n)return{x:o,y:a,textAnchor:"middle",verticalAnchor:"middle"};if("centerTop"===n)return{x:o,y:a,textAnchor:"middle",verticalAnchor:"start"};if("centerBottom"===n)return{x:o,y:a,textAnchor:"middle",verticalAnchor:"end"};var f=se(o,a,(c+l)/2,s);return{x:f.x,y:f.y,textAnchor:"middle",verticalAnchor:"middle"}},Bn=function(e){var t=e.viewBox,r=e.parentViewBox,n=e.offset,i=e.position,o=t,a=o.x,c=o.y,l=o.width,s=o.height,u=s>=0?1:-1,p=u*n,f=u>0?"end":"start",d=u>0?"start":"end",h=l>=0?1:-1,y=h*n,m=h>0?"end":"start",v=h>0?"start":"end";if("top"===i)return In(In({},{x:a+l/2,y:c-u*n,textAnchor:"middle",verticalAnchor:f}),r?{height:Math.max(c-r.y,0),width:l}:{});if("bottom"===i)return In(In({},{x:a+l/2,y:c+s+p,textAnchor:"middle",verticalAnchor:d}),r?{height:Math.max(r.y+r.height-(c+s),0),width:l}:{});if("left"===i){var g={x:a-y,y:c+s/2,textAnchor:m,verticalAnchor:"middle"};return In(In({},g),r?{width:Math.max(g.x-r.x,0),height:s}:{})}if("right"===i){var b={x:a+l+y,y:c+s/2,textAnchor:v,verticalAnchor:"middle"};return In(In({},b),r?{width:Math.max(r.x+r.width-b.x,0),height:s}:{})}var x=r?{width:l,height:s}:{};return"insideLeft"===i?In({x:a+y,y:c+s/2,textAnchor:v,verticalAnchor:"middle"},x):"insideRight"===i?In({x:a+l-y,y:c+s/2,textAnchor:m,verticalAnchor:"middle"},x):"insideTop"===i?In({x:a+l/2,y:c+p,textAnchor:"middle",verticalAnchor:d},x):"insideBottom"===i?In({x:a+l/2,y:c+s-p,textAnchor:"middle",verticalAnchor:f},x):"insideTopLeft"===i?In({x:a+y,y:c+p,textAnchor:v,verticalAnchor:d},x):"insideTopRight"===i?In({x:a+l-y,y:c+p,textAnchor:m,verticalAnchor:d},x):"insideBottomLeft"===i?In({x:a+y,y:c+s-p,textAnchor:v,verticalAnchor:f},x):"insideBottomRight"===i?In({x:a+l-y,y:c+s-p,textAnchor:m,verticalAnchor:f},x):Je()(i)&&(we(i.x)||xe(i.x))&&(we(i.y)||xe(i.y))?In({x:a+je(i.x,l),y:c+je(i.y,s),textAnchor:"end",verticalAnchor:"end"},x):In({x:a+l/2,y:c+s/2,textAnchor:"middle",verticalAnchor:"middle"},x)},Ln=function(e){return"cx"in e&&we(e.cx)};function _n(e){var t,r=e.offset,n=In({offset:void 0===r?5:r},function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,Pn)),i=n.viewBox,o=n.position,a=n.value,c=n.children,l=n.content,s=n.className,u=void 0===s?"":s,p=n.textBreakAll;if(!i||z()(a)&&z()(c)&&!(0,b.isValidElement)(l)&&!F()(l))return null;if((0,b.isValidElement)(l))return(0,b.cloneElement)(l,n);if(F()(l)){if(t=(0,b.createElement)(l,n),(0,b.isValidElement)(t))return t}else t=Mn(n);var f=Ln(i),d=kt(n,!0);if(f&&("insideStart"===o||"insideEnd"===o||"end"===o))return Rn(n,t,d);var h=f?Nn(n):Bn(n);return x().createElement(An,Dn({className:te()("recharts-label",u)},d,h,{breakAll:p}),t)}_n.displayName="Label";var zn=function(e){var t=e.cx,r=e.cy,n=e.angle,i=e.startAngle,o=e.endAngle,a=e.r,c=e.radius,l=e.innerRadius,s=e.outerRadius,u=e.x,p=e.y,f=e.top,d=e.left,h=e.width,y=e.height,m=e.clockWise,v=e.labelViewBox;if(v)return v;if(we(h)&&we(y)){if(we(u)&&we(p))return{x:u,y:p,width:h,height:y};if(we(f)&&we(d))return{x:f,y:d,width:h,height:y}}return we(u)&&we(p)?{x:u,y:p,width:0,height:0}:we(t)&&we(r)?{cx:t,cy:r,startAngle:i||n||0,endAngle:o||n||0,innerRadius:l||0,outerRadius:s||c||a||0,clockWise:m}:e.viewBox?e.viewBox:{}};function $n(e){return $n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$n(e)}_n.parseViewBox=zn,_n.renderCallByParent=function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!e||!e.children&&r&&!e.label)return null;var n=e.children,i=zn(e),o=gt(n,_n).map((function(e,r){return(0,b.cloneElement)(e,{viewBox:t||i,key:"label-".concat(r)})}));if(!r)return o;var a,c=function(e,t){return e?!0===e?x().createElement(_n,{key:"label-implicit",viewBox:t}):Oe(e)?x().createElement(_n,{key:"label-implicit",viewBox:t,value:e}):(0,b.isValidElement)(e)?e.type===_n?(0,b.cloneElement)(e,{key:"label-implicit",viewBox:t}):x().createElement(_n,{key:"label-implicit",content:e,viewBox:t}):F()(e)?x().createElement(_n,{key:"label-implicit",content:e,viewBox:t}):Je()(e)?x().createElement(_n,Dn({viewBox:t},e,{key:"label-implicit"})):null:null}(e.label,t||i);return[c].concat(function(e){if(Array.isArray(e))return Tn(e)}(a=o)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(a)||function(e,t){if(e){if("string"==typeof e)return Tn(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Tn(e,t):void 0}}(a)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())};var Fn=["valueAccessor"],Wn=["data","dataKey","clockWise","id","textBreakAll"];function Un(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function qn(){return qn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},qn.apply(this,arguments)}function Gn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Hn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Gn(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==$n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==$n(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===$n(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Gn(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Xn(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var Vn=function(e){return Array.isArray(e.value)?Jr()(e.value):e.value};function Kn(e){var t=e.valueAccessor,r=void 0===t?Vn:t,n=Xn(e,Fn),i=n.data,o=n.dataKey,a=n.clockWise,c=n.id,l=n.textBreakAll,s=Xn(n,Wn);return i&&i.length?x().createElement(Tt,{className:"recharts-label-list"},i.map((function(e,t){var n=z()(o)?r(e,t):Er(e&&e.payload,o),i=z()(c)?{}:{id:"".concat(c,"-").concat(t)};return x().createElement(_n,qn({},kt(e,!0),s,i,{parentViewBox:e.parentViewBox,value:n,textBreakAll:l,viewBox:_n.parseViewBox(z()(a)?e:Hn(Hn({},e),{},{clockWise:a})),key:"label-".concat(t),index:t}))}))):null}Kn.displayName="LabelList",Kn.renderCallByParent=function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!e||!e.children&&r&&!e.label)return null;var n,i=gt(e.children,Kn).map((function(e,r){return(0,b.cloneElement)(e,{data:t,key:"labelList-".concat(r)})}));return r?[function(e,t){return e?!0===e?x().createElement(Kn,{key:"labelList-implicit",data:t}):x().isValidElement(e)||F()(e)?x().createElement(Kn,{key:"labelList-implicit",data:t,content:e}):Je()(e)?x().createElement(Kn,qn({data:t},e,{key:"labelList-implicit"})):null:null}(e.label,t)].concat(function(e){if(Array.isArray(e))return Un(e)}(n=i)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,t){if(e){if("string"==typeof e)return Un(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Un(e,t):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()):i};const Yn=require("lodash/isPlainObject");var Zn=r.n(Yn);const Qn=require("lodash/isBoolean");var Jn=r.n(Qn);function ei(e){return ei="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ei(e)}function ti(){return ti=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ti.apply(this,arguments)}function ri(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function ni(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ii(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ni(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==ei(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==ei(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===ei(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ni(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var oi=function(e,t,r,n,i){var o,a=Math.min(Math.abs(r)/2,Math.abs(n)/2),c=n>=0?1:-1,l=r>=0?1:-1,s=n>=0&&r>=0||n<0&&r<0?1:0;if(a>0&&i instanceof Array){for(var u=[0,0,0,0],p=0;p<4;p++)u[p]=i[p]>a?a:i[p];o="M".concat(e,",").concat(t+c*u[0]),u[0]>0&&(o+="A ".concat(u[0],",").concat(u[0],",0,0,").concat(s,",").concat(e+l*u[0],",").concat(t)),o+="L ".concat(e+r-l*u[1],",").concat(t),u[1]>0&&(o+="A ".concat(u[1],",").concat(u[1],",0,0,").concat(s,",\n ").concat(e+r,",").concat(t+c*u[1])),o+="L ".concat(e+r,",").concat(t+n-c*u[2]),u[2]>0&&(o+="A ".concat(u[2],",").concat(u[2],",0,0,").concat(s,",\n ").concat(e+r-l*u[2],",").concat(t+n)),o+="L ".concat(e+l*u[3],",").concat(t+n),u[3]>0&&(o+="A ".concat(u[3],",").concat(u[3],",0,0,").concat(s,",\n ").concat(e,",").concat(t+n-c*u[3])),o+="Z"}else if(a>0&&i===+i&&i>0){var f=Math.min(a,i);o="M ".concat(e,",").concat(t+c*f,"\n A ").concat(f,",").concat(f,",0,0,").concat(s,",").concat(e+l*f,",").concat(t,"\n L ").concat(e+r-l*f,",").concat(t,"\n A ").concat(f,",").concat(f,",0,0,").concat(s,",").concat(e+r,",").concat(t+c*f,"\n L ").concat(e+r,",").concat(t+n-c*f,"\n A ").concat(f,",").concat(f,",0,0,").concat(s,",").concat(e+r-l*f,",").concat(t+n,"\n L ").concat(e+l*f,",").concat(t+n,"\n A ").concat(f,",").concat(f,",0,0,").concat(s,",").concat(e,",").concat(t+n-c*f," Z")}else o="M ".concat(e,",").concat(t," h ").concat(r," v ").concat(n," h ").concat(-r," Z");return o},ai=function(e,t){if(!e||!t)return!1;var r=e.x,n=e.y,i=t.x,o=t.y,a=t.width,c=t.height;if(Math.abs(a)>0&&Math.abs(c)>0){var l=Math.min(i,i+a),s=Math.max(i,i+a),u=Math.min(o,o+c),p=Math.max(o,o+c);return r>=l&&r<=s&&n>=u&&n<=p}return!1},ci={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},li=function(e){var t,r,n=ii(ii({},ci),e),i=(0,b.useRef)(),o=(t=(0,b.useState)(-1),r=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,c=[],l=!0,s=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){s=!0,i=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw i}}return c}}(t,r)||function(e,t){if(e){if("string"==typeof e)return ri(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ri(e,t):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=o[0],c=o[1];(0,b.useEffect)((function(){if(i.current&&i.current.getTotalLength)try{var e=i.current.getTotalLength();e&&c(e)}catch(e){}}),[]);var l=n.x,s=n.y,u=n.width,p=n.height,f=n.radius,d=n.className,h=n.animationEasing,y=n.animationDuration,m=n.animationBegin,v=n.isAnimationActive,g=n.isUpdateAnimationActive;if(l!==+l||s!==+s||u!==+u||p!==+p||0===u||0===p)return null;var w=te()("recharts-rectangle",d);return g?x().createElement(Yr(),{canBegin:a>0,from:{width:u,height:p,x:l,y:s},to:{width:u,height:p,x:l,y:s},duration:y,animationEasing:h,isActive:g},(function(e){var t=e.width,r=e.height,o=e.x,c=e.y;return x().createElement(Yr(),{canBegin:a>0,from:"0px ".concat(-1===a?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:m,duration:y,isActive:v,easing:h},x().createElement("path",ti({},kt(n,!0),{className:w,d:oi(o,c,t,r,f),ref:i})))})):x().createElement("path",ti({},kt(n,!0),{className:w,d:oi(l,s,u,p,f)}))};function si(e){return si="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},si(e)}function ui(){return ui=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ui.apply(this,arguments)}function pi(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function fi(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function di(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?fi(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==si(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==si(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===si(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fi(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var hi=function(e,t,r,n,i){var o,a=r-n;return o="M ".concat(e,",").concat(t),o+="L ".concat(e+r,",").concat(t),o+="L ".concat(e+r-a/2,",").concat(t+i),(o+="L ".concat(e+r-a/2-n,",").concat(t+i))+"L ".concat(e,",").concat(t," Z")},yi={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},mi=function(e){var t,r,n=di(di({},yi),e),i=(0,b.useRef)(),o=(t=(0,b.useState)(-1),r=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,c=[],l=!0,s=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){s=!0,i=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw i}}return c}}(t,r)||function(e,t){if(e){if("string"==typeof e)return pi(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?pi(e,t):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=o[0],c=o[1];(0,b.useEffect)((function(){if(i.current&&i.current.getTotalLength)try{var e=i.current.getTotalLength();e&&c(e)}catch(e){}}),[]);var l=n.x,s=n.y,u=n.upperWidth,p=n.lowerWidth,f=n.height,d=n.className,h=n.animationEasing,y=n.animationDuration,m=n.animationBegin,v=n.isUpdateAnimationActive;if(l!==+l||s!==+s||u!==+u||p!==+p||f!==+f||0===u&&0===p||0===f)return null;var g=te()("recharts-trapezoid",d);return v?x().createElement(Yr(),{canBegin:a>0,from:{upperWidth:0,lowerWidth:0,height:f,x:l,y:s},to:{upperWidth:u,lowerWidth:p,height:f,x:l,y:s},duration:y,animationEasing:h,isActive:v},(function(e){var t=e.upperWidth,r=e.lowerWidth,o=e.height,c=e.x,l=e.y;return x().createElement(Yr(),{canBegin:a>0,from:"0px ".concat(-1===a?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:m,duration:y,easing:h},x().createElement("path",ui({},kt(n,!0),{className:g,d:hi(c,l,t,r,o),ref:i})))})):x().createElement("g",null,x().createElement("path",ui({},kt(n,!0),{className:g,d:hi(l,s,u,p,f)})))};function vi(e){return vi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vi(e)}function gi(){return gi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},gi.apply(this,arguments)}function bi(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function xi(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?bi(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==vi(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==vi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===vi(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bi(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var wi=function(e){var t=e.cx,r=e.cy,n=e.radius,i=e.angle,o=e.sign,a=e.isExternal,c=e.cornerRadius,l=e.cornerIsExternal,s=c*(a?1:-1)+n,u=Math.asin(c/s)/ce,p=l?i:i+o*u,f=l?i-o*u:i;return{center:se(t,r,s,p),circleTangency:se(t,r,n,p),lineTangency:se(t,r,s*Math.cos(u*ce),f),theta:u}},Oi=function(e){var t=e.cx,r=e.cy,n=e.innerRadius,i=e.outerRadius,o=e.startAngle,a=function(e,t){return be(t-e)*Math.min(Math.abs(t-e),359.999)}(o,e.endAngle),c=o+a,l=se(t,r,i,o),s=se(t,r,i,c),u="M ".concat(l.x,",").concat(l.y,"\n A ").concat(i,",").concat(i,",0,\n ").concat(+(Math.abs(a)>180),",").concat(+(o>c),",\n ").concat(s.x,",").concat(s.y,"\n ");if(n>0){var p=se(t,r,n,o),f=se(t,r,n,c);u+="L ".concat(f.x,",").concat(f.y,"\n A ").concat(n,",").concat(n,",0,\n ").concat(+(Math.abs(a)>180),",").concat(+(o<=c),",\n ").concat(p.x,",").concat(p.y," Z")}else u+="L ".concat(t,",").concat(r," Z");return u},ki={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},Si=function(e){var t=xi(xi({},ki),e),r=t.cx,n=t.cy,i=t.innerRadius,o=t.outerRadius,a=t.cornerRadius,c=t.forceCornerRadius,l=t.cornerIsExternal,s=t.startAngle,u=t.endAngle,p=t.className;if(o<i||s===u)return null;var f,d=te()("recharts-sector",p),h=o-i,y=je(a,h,0,!0);return f=y>0&&Math.abs(s-u)<360?function(e){var t=e.cx,r=e.cy,n=e.innerRadius,i=e.outerRadius,o=e.cornerRadius,a=e.forceCornerRadius,c=e.cornerIsExternal,l=e.startAngle,s=e.endAngle,u=be(s-l),p=wi({cx:t,cy:r,radius:i,angle:l,sign:u,cornerRadius:o,cornerIsExternal:c}),f=p.circleTangency,d=p.lineTangency,h=p.theta,y=wi({cx:t,cy:r,radius:i,angle:s,sign:-u,cornerRadius:o,cornerIsExternal:c}),m=y.circleTangency,v=y.lineTangency,g=y.theta,b=c?Math.abs(l-s):Math.abs(l-s)-h-g;if(b<0)return a?"M ".concat(d.x,",").concat(d.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 "):Oi({cx:t,cy:r,innerRadius:n,outerRadius:i,startAngle:l,endAngle:s});var x="M ".concat(d.x,",").concat(d.y,"\n A").concat(o,",").concat(o,",0,0,").concat(+(u<0),",").concat(f.x,",").concat(f.y,"\n A").concat(i,",").concat(i,",0,").concat(+(b>180),",").concat(+(u<0),",").concat(m.x,",").concat(m.y,"\n A").concat(o,",").concat(o,",0,0,").concat(+(u<0),",").concat(v.x,",").concat(v.y,"\n ");if(n>0){var w=wi({cx:t,cy:r,radius:n,angle:l,sign:u,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),O=w.circleTangency,k=w.lineTangency,S=w.theta,j=wi({cx:t,cy:r,radius:n,angle:s,sign:-u,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),A=j.circleTangency,E=j.lineTangency,P=j.theta,T=c?Math.abs(l-s):Math.abs(l-s)-S-P;if(T<0&&0===o)return"".concat(x,"L").concat(t,",").concat(r,"Z");x+="L".concat(E.x,",").concat(E.y,"\n A").concat(o,",").concat(o,",0,0,").concat(+(u<0),",").concat(A.x,",").concat(A.y,"\n A").concat(n,",").concat(n,",0,").concat(+(T>180),",").concat(+(u>0),",").concat(O.x,",").concat(O.y,"\n A").concat(o,",").concat(o,",0,0,").concat(+(u<0),",").concat(k.x,",").concat(k.y,"Z")}else x+="L".concat(t,",").concat(r,"Z");return x}({cx:r,cy:n,innerRadius:i,outerRadius:o,cornerRadius:Math.min(y,h/2),forceCornerRadius:c,cornerIsExternal:l,startAngle:s,endAngle:u}):Oi({cx:r,cy:n,innerRadius:i,outerRadius:o,startAngle:s,endAngle:u}),x().createElement("path",gi({},kt(t,!0),{className:d,d:f,role:"img"}))},ji=["option","shapeType","propTransformer","activeClassName","isActive"];function Ai(e){return Ai="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ai(e)}function Ei(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Pi(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ei(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==Ai(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Ai(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Ai(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ei(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ti(e,t){return Pi(Pi({},t),e)}function Ci(e){var t=e.shapeType,r=e.elementProps;switch(t){case"rectangle":return x().createElement(li,r);case"trapezoid":return x().createElement(mi,r);case"sector":return x().createElement(Si,r);case"symbols":if(function(e,t){return"symbols"===e}(t))return x().createElement(Gt,r);break;default:return null}}function Ii(e){var t,r=e.option,n=e.shapeType,i=e.propTransformer,o=void 0===i?Ti:i,a=e.activeClassName,c=void 0===a?"recharts-active-shape":a,l=e.isActive,s=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,ji);if((0,b.isValidElement)(r))t=(0,b.cloneElement)(r,Pi(Pi({},s),function(e){return(0,b.isValidElement)(e)?e.props:e}(r)));else if(F()(r))t=r(s);else if(Zn()(r)&&!Jn()(r)){var u=o(r,s);t=x().createElement(Ci,{shapeType:n,elementProps:u})}else{var p=s;t=x().createElement(Ci,{shapeType:n,elementProps:p})}return l?x().createElement(Tt,{className:c},t):t}function Di(e,t){return null!=t&&"trapezoids"in e.props}function Mi(e,t){return null!=t&&"sectors"in e.props}function Ri(e,t){return null!=t&&"points"in e.props}function Ni(e,t){var r,n,i=e.x===(null==t||null===(r=t.labelViewBox)||void 0===r?void 0:r.x)||e.x===t.x,o=e.y===(null==t||null===(n=t.labelViewBox)||void 0===n?void 0:n.y)||e.y===t.y;return i&&o}function Bi(e,t){var r=e.endAngle===t.endAngle,n=e.startAngle===t.startAngle;return r&&n}function Li(e,t){var r=e.x===t.x,n=e.y===t.y,i=e.z===t.z;return r&&n&&i}function _i(e){var t=e.activeTooltipItem,r=e.graphicalItem,n=e.itemData,i=function(e,t){var r;return Di(e,t)?r="trapezoids":Mi(e,t)?r="sectors":Ri(e,t)&&(r="points"),r}(r,t),o=function(e,t){var r,n;return Di(e,t)?null===(r=t.tooltipPayload)||void 0===r||null===(r=r[0])||void 0===r||null===(r=r.payload)||void 0===r?void 0:r.payload:Mi(e,t)?null===(n=t.tooltipPayload)||void 0===n||null===(n=n[0])||void 0===n||null===(n=n.payload)||void 0===n?void 0:n.payload:Ri(e,t)?t.payload:{}}(r,t),a=n.filter((function(e,n){var a=Ye()(o,e),c=r.props[i].filter((function(e){var n=function(e,t){var r;return Di(e,t)?r=Ni:Mi(e,t)?r=Bi:Ri(e,t)&&(r=Li),r}(r,t);return n(e,t)})),l=r.props[i].indexOf(c[c.length-1]);return a&&n===l}));return n.indexOf(a[a.length-1])}function zi(e){return zi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},zi(e)}var $i=["x","y"];function Fi(){return Fi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Fi.apply(this,arguments)}function Wi(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ui(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Wi(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==zi(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==zi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===zi(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Wi(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function qi(e,t){var r=e.x,n=e.y,i=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,$i),o="".concat(r),a=parseInt(o,10),c="".concat(n),l=parseInt(c,10),s="".concat(t.height||i.height),u=parseInt(s,10),p="".concat(t.width||i.width),f=parseInt(p,10);return Ui(Ui(Ui(Ui(Ui({},t),i),a?{x:a}:{}),l?{y:l}:{}),{},{height:u,width:f,name:t.name,radius:t.radius})}function Gi(e){return x().createElement(Ii,Fi({shapeType:"rectangle",propTransformer:qi,activeClassName:"recharts-active-bar"},e))}var Hi=["value","background"];function Xi(e){return Xi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xi(e)}function Vi(){return Vi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Vi.apply(this,arguments)}function Ki(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Yi(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ki(Object(r),!0).forEach((function(t){to(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ki(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Zi(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ro(n.key),n)}}function Qi(e,t){return Qi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Qi(e,t)}function Ji(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function eo(e){return eo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},eo(e)}function to(e,t,r){return(t=ro(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ro(e){var t=function(e,t){if("object"!==Xi(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Xi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Xi(t)?t:String(t)}var no=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Qi(e,t)}(c,e);var t,r,n,i,o,a=(i=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=eo(i);if(o){var r=eo(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Xi(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Ji(e)}(this,e)});function c(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return to(Ji(e=a.call.apply(a,[this].concat(r))),"state",{isAnimationFinished:!1}),to(Ji(e),"id",Se("recharts-bar-")),to(Ji(e),"handleAnimationEnd",(function(){var t=e.props.onAnimationEnd;e.setState({isAnimationFinished:!0}),t&&t()})),to(Ji(e),"handleAnimationStart",(function(){var t=e.props.onAnimationStart;e.setState({isAnimationFinished:!1}),t&&t()})),e}return t=c,n=[{key:"getDerivedStateFromProps",value:function(e,t){return e.animationId!==t.prevAnimationId?{prevAnimationId:e.animationId,curData:e.data,prevData:t.curData}:e.data!==t.curData?{curData:e.data}:null}}],(r=[{key:"renderRectanglesStatically",value:function(e){var t=this,r=this.props,n=r.shape,i=r.dataKey,o=r.activeIndex,a=r.activeBar,c=kt(this.props);return e&&e.map((function(e,r){var l=r===o,s=l?a:n,u=Yi(Yi(Yi({},c),e),{},{isActive:l,option:s,index:r,dataKey:i,onAnimationStart:t.handleAnimationStart,onAnimationEnd:t.handleAnimationEnd});return x().createElement(Tt,Vi({className:"recharts-bar-rectangle"},lt(t.props,e,r),{key:"rectangle-".concat(null==e?void 0:e.x,"-").concat(null==e?void 0:e.y,"-").concat(null==e?void 0:e.value)}),x().createElement(Gi,u))}))}},{key:"renderRectanglesWithAnimation",value:function(){var e=this,t=this.props,r=t.data,n=t.layout,i=t.isAnimationActive,o=t.animationBegin,a=t.animationDuration,c=t.animationEasing,l=t.animationId,s=this.state.prevData;return x().createElement(Yr(),{begin:o,duration:a,isActive:i,easing:c,from:{t:0},to:{t:1},key:"bar-".concat(l),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},(function(t){var i=t.t,o=r.map((function(e,t){var r=s&&s[t];if(r){var o=Ee(r.x,e.x),a=Ee(r.y,e.y),c=Ee(r.width,e.width),l=Ee(r.height,e.height);return Yi(Yi({},e),{},{x:o(i),y:a(i),width:c(i),height:l(i)})}if("horizontal"===n){var u=Ee(0,e.height)(i);return Yi(Yi({},e),{},{y:e.y+e.height-u,height:u})}var p=Ee(0,e.width)(i);return Yi(Yi({},e),{},{width:p})}));return x().createElement(Tt,null,e.renderRectanglesStatically(o))}))}},{key:"renderRectangles",value:function(){var e=this.props,t=e.data,r=e.isAnimationActive,n=this.state.prevData;return!(r&&t&&t.length)||n&&Ye()(n,t)?this.renderRectanglesStatically(t):this.renderRectanglesWithAnimation()}},{key:"renderBackground",value:function(){var e=this,t=this.props,r=t.data,n=t.dataKey,i=t.activeIndex,o=kt(this.props.background);return r.map((function(t,r){t.value;var a=t.background,c=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(t,Hi);if(!a)return null;var l=Yi(Yi(Yi(Yi(Yi({},c),{},{fill:"#eee"},a),o),lt(e.props,t,r)),{},{onAnimationStart:e.handleAnimationStart,onAnimationEnd:e.handleAnimationEnd,dataKey:n,index:r,key:"background-bar-".concat(r),className:"recharts-bar-background-rectangle"});return x().createElement(Gi,Vi({option:e.props.background,isActive:r===i},l))}))}},{key:"renderErrorBar",value:function(e,t){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,c=gt(r.children,Mt);if(!c)return null;var l="vertical"===a?n[0].height/2:n[0].width/2,s=function(e,t){var r=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:r,errorVal:Er(e,t)}},u={clipPath:e?"url(#clipPath-".concat(t,")"):null};return x().createElement(Tt,u,c.map((function(e){return x().cloneElement(e,{key:"error-bar-".concat(t,"-").concat(e.props.dataKey),data:n,xAxis:i,yAxis:o,layout:a,offset:l,dataPointFormatter:s})})))}},{key:"render",value:function(){var e=this.props,t=e.hide,r=e.data,n=e.className,i=e.xAxis,o=e.yAxis,a=e.left,c=e.top,l=e.width,s=e.height,u=e.isAnimationActive,p=e.background,f=e.id;if(t||!r||!r.length)return null;var d=this.state.isAnimationFinished,h=te()("recharts-bar",n),y=i&&i.allowDataOverflow,m=o&&o.allowDataOverflow,v=y||m,g=z()(f)?this.id:f;return x().createElement(Tt,{className:h},y||m?x().createElement("defs",null,x().createElement("clipPath",{id:"clipPath-".concat(g)},x().createElement("rect",{x:y?a:a-l/2,y:m?c:c-s/2,width:y?l:2*l,height:m?s:2*s}))):null,x().createElement(Tt,{className:"recharts-bar-rectangles",clipPath:v?"url(#clipPath-".concat(g,")"):null},p?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(v,g),(!u||d)&&Kn.renderCallByParent(this.props,r))}}])&&Zi(t.prototype,r),n&&Zi(t,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(b.PureComponent);function io(e){return io="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},io(e)}function oo(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,so(n.key),n)}}function ao(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function co(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ao(Object(r),!0).forEach((function(t){lo(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ao(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function lo(e,t,r){return(t=so(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function so(e){var t=function(e,t){if("object"!==io(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==io(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===io(t)?t:String(t)}to(no,"displayName","Bar"),to(no,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!0,isAnimationActive:!Te.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"}),to(no,"getComposedData",(function(e){var t=e.props,r=e.item,n=e.barPosition,i=e.bandSize,o=e.xAxis,a=e.yAxis,c=e.xAxisTicks,l=e.yAxisTicks,s=e.stackedData,u=e.dataStartIndex,p=e.displayedData,f=e.offset,d=function(e,t){if(!e)return null;for(var r=0,n=e.length;r<n;r++)if(e[r].item===t)return e[r].position;return null}(n,r);if(!d)return null;var h=t.layout,y=r.props,m=y.dataKey,v=y.children,g=y.minPointSize,b="horizontal"===h?a:o,x=s?b.scale.domain():null,w=function(e){var t=e.numericAxis,r=t.scale.domain();if("number"===t.type){var n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return n<=0&&i>=0?0:i<0?i:n}return r[0]}({numericAxis:b}),O=gt(v,Zr),k=p.map((function(e,t){var n,p,f,y,v,b;if(s?n=function(e,t){if(!t||2!==t.length||!we(t[0])||!we(t[1]))return e;var r=Math.min(t[0],t[1]),n=Math.max(t[0],t[1]),i=[e[0],e[1]];return(!we(e[0])||e[0]<r)&&(i[0]=r),(!we(e[1])||e[1]>n)&&(i[1]=n),i[0]>n&&(i[0]=n),i[1]<r&&(i[1]=r),i}(s[u+t],x):(n=Er(e,m),Array.isArray(n)||(n=[w,n])),"horizontal"===h){var k,S=[a.scale(n[0]),a.scale(n[1])],j=S[0],A=S[1];p=Fr({axis:o,ticks:c,bandSize:i,offset:d.offset,entry:e,index:t}),f=null!==(k=null!=A?A:j)&&void 0!==k?k:void 0,y=d.size;var E=j-A;if(v=Number.isNaN(E)?0:E,b={x:p,y:a.y,width:y,height:a.height},Math.abs(g)>0&&Math.abs(v)<Math.abs(g)){var P=be(v||g)*(Math.abs(g)-Math.abs(v));f-=P,v+=P}}else{var T=[o.scale(n[0]),o.scale(n[1])],C=T[0],I=T[1];p=C,f=Fr({axis:a,ticks:l,bandSize:i,offset:d.offset,entry:e,index:t}),y=I-C,v=d.size,b={x:o.x,y:f,width:o.width,height:v},Math.abs(g)>0&&Math.abs(y)<Math.abs(g)&&(y+=be(y||g)*(Math.abs(g)-Math.abs(y)))}return Yi(Yi(Yi({},e),{},{x:p,y:f,width:y,height:v,value:s?n:n[1],payload:e,background:b},O&&O[t]&&O[t].props),{},{tooltipPayload:[Vr(r,e)],tooltipPosition:{x:p+y/2,y:f+v/2}})}));return Yi({data:k,layout:h},f)}));var uo=function(e,t,r,n,i){var o=e.width,a=e.height,c=e.layout,l=e.children,s=Object.keys(t),u={left:r.left,leftMirror:r.left,right:o-r.right,rightMirror:o-r.right,top:r.top,topMirror:r.top,bottom:a-r.bottom,bottomMirror:a-r.bottom},p=!!bt(l,no);return s.reduce((function(o,a){var l,s,f,d,h,y=t[a],m=y.orientation,v=y.domain,g=y.padding,b=void 0===g?{}:g,x=y.mirror,w=y.reversed,O="".concat(m).concat(x?"Mirror":"");if("number"===y.type&&("gap"===y.padding||"no-gap"===y.padding)){var k=v[1]-v[0],S=1/0,j=y.categoricalDomain.sort();j.forEach((function(e,t){t>0&&(S=Math.min((e||0)-(j[t-1]||0),S))}));var A=S/k,E="vertical"===y.layout?r.height:r.width;if("gap"===y.padding&&(l=A*E/2),"no-gap"===y.padding){var P=je(e.barCategoryGap,A*E),T=A*E/2;l=T-P-(T-P)/E*P}}s="xAxis"===n?[r.left+(b.left||0)+(l||0),r.left+r.width-(b.right||0)-(l||0)]:"yAxis"===n?"horizontal"===c?[r.top+r.height-(b.bottom||0),r.top+(b.top||0)]:[r.top+(b.top||0)+(l||0),r.top+r.height-(b.bottom||0)-(l||0)]:y.range,w&&(s=[s[1],s[0]]);var C=function(e,t,r){var n=e.scale,i=e.type,o=e.layout,a=e.axisType;if("auto"===n)return"radial"===o&&"radiusAxis"===a?{scale:ze.scaleBand(),realScaleType:"band"}:"radial"===o&&"angleAxis"===a?{scale:ze.scaleLinear(),realScaleType:"linear"}:"category"===i&&t&&(t.indexOf("LineChart")>=0||t.indexOf("AreaChart")>=0||t.indexOf("ComposedChart")>=0&&!r)?{scale:ze.scalePoint(),realScaleType:"point"}:"category"===i?{scale:ze.scaleBand(),realScaleType:"band"}:{scale:ze.scaleLinear(),realScaleType:"linear"};if(he()(n)){var c="scale".concat(Ve()(n));return{scale:(ze[c]||ze.scalePoint)(),realScaleType:ze[c]?c:"point"}}return F()(n)?{scale:n}:{scale:ze.scalePoint(),realScaleType:"point"}}(y,i,p),I=C.scale,D=C.realScaleType;I.domain(v).range(s),function(e){var t=e.domain();if(t&&!(t.length<=2)){var r=t.length,n=e.range(),i=Math.min(n[0],n[1])-Lr,o=Math.max(n[0],n[1])+Lr,a=e(t[0]),c=e(t[r-1]);(a<i||a>o||c<i||c>o)&&e.domain([t[0],t[r-1]])}}(I);var M=function(e,t){var r=t.realScaleType,n=t.type,i=t.tickCount,o=t.originalDomain,a=t.allowDecimals,c=r||t.scale;if("auto"!==c&&"linear"!==c)return null;if(i&&"number"===n&&o&&("auto"===o[0]||"auto"===o[1])){var l=e.domain();if(!l.length)return null;var s=(0,Ze.getNiceTickValues)(l,i,a);return e.domain([qe()(s),We()(s)]),{niceTicks:s}}if(i&&"number"===n){var u=e.domain();return{niceTicks:(0,Ze.getTickValuesFixedDomain)(u,i,a)}}return null}(I,co(co({},y),{},{realScaleType:D}));"xAxis"===n?(h="top"===m&&!x||"bottom"===m&&x,f=r.left,d=u[O]-h*y.height):"yAxis"===n&&(h="left"===m&&!x||"right"===m&&x,f=u[O]-h*y.width,d=r.top);var R=co(co(co({},y),M),{},{realScaleType:D,x:f,y:d,scale:I,width:"xAxis"===n?r.width:y.width,height:"yAxis"===n?r.height:y.height});return R.bandSize=Hr(R,M),y.hide||"xAxis"!==n?y.hide||(u[O]+=(h?-1:1)*R.width):u[O]+=(h?-1:1)*R.height,co(co({},o),{},lo({},a,R))}),{})},po=function(e,t){var r=e.x,n=e.y,i=t.x,o=t.y;return{x:Math.min(r,i),y:Math.min(n,o),width:Math.abs(i-r),height:Math.abs(o-n)}},fo=function(e){var t=e.x1,r=e.y1,n=e.x2,i=e.y2;return po({x:t,y:r},{x:n,y:i})},ho=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.scale=t}var t,r,n;return t=e,r=[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.bandAware,n=t.position;if(void 0!==e){if(n)switch(n){case"start":default:return this.scale(e);case"middle":var i=this.bandwidth?this.bandwidth()/2:0;return this.scale(e)+i;case"end":var o=this.bandwidth?this.bandwidth():0;return this.scale(e)+o}if(r){var a=this.bandwidth?this.bandwidth()/2:0;return this.scale(e)+a}return this.scale(e)}}},{key:"isInRange",value:function(e){var t=this.range(),r=t[0],n=t[t.length-1];return r<=n?e>=r&&e<=n:e>=n&&e<=r}}],n=[{key:"create",value:function(t){return new e(t)}}],r&&oo(t.prototype,r),n&&oo(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();lo(ho,"EPS",1e-4);var yo=function(e){var t=Object.keys(e).reduce((function(t,r){return co(co({},t),{},lo({},r,ho.create(e[r])))}),{});return co(co({},t),{},{apply:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.bandAware,i=r.position;return _e()(e,(function(e,r){return t[r].apply(e,{bandAware:n,position:i})}))},isInRange:function(e){return J()(e,(function(e,r){return t[r].isInRange(e)}))}})};function mo(e,t,r){if(t<1)return[];if(1===t&&void 0===r)return e;for(var n=[],i=0;i<e.length;i+=t){if(void 0!==r&&!0!==r(e[i]))return;n.push(e[i])}return n}function vo(e,t,r,n,i){if(e*t<e*n||e*t>e*i)return!1;var o=r();return e*(t-e*o/2-n)>=0&&e*(t+e*o/2-i)<=0}function go(e){return go="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},go(e)}function bo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function xo(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?bo(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==go(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==go(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===go(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bo(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function wo(e,t,r){var n=e.tick,i=e.ticks,o=e.viewBox,a=e.minTickGap,c=e.orientation,l=e.interval,s=e.tickFormatter,u=e.unit,p=e.angle;if(!i||!i.length||!n)return[];if(we(l)||Te.isSsr)return function(e,t){return mo(e,t+1)}(i,"number"==typeof l&&we(l)?l:0);var f=[],d="top"===c||"bottom"===c?"width":"height",h=u&&"width"===d?Be(u,{fontSize:t,letterSpacing:r}):{width:0,height:0},y=function(e,n){var i=F()(s)?s(e.value,n):e.value;return"width"===d?function(e,t,r){return function(e){var t=e.width,r=e.height,n=((arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)%180+180)%180*Math.PI/180,i=Math.atan(r/t),o=n>i&&n<Math.PI-i?r/Math.sin(n):t/Math.cos(n);return Math.abs(o)}({width:e.width+t.width,height:e.height+t.height},r)}(Be(i,{fontSize:t,letterSpacing:r}),h,p):Be(i,{fontSize:t,letterSpacing:r})[d]},m=i.length>=2?be(i[1].coordinate-i[0].coordinate):1,v=function(e,t,r){var n="width"===r,i=e.x,o=e.y,a=e.width,c=e.height;return 1===t?{start:n?i:o,end:n?i+a:o+c}:{start:n?i+a:o+c,end:n?i:o}}(o,m,d);return"equidistantPreserveStart"===l?function(e,t,r,n,i){for(var o,a=(n||[]).slice(),c=t.start,l=t.end,s=0,u=1,p=c,f=function(){var t=null==n?void 0:n[s];if(void 0===t)return{v:mo(n,u)};var o,a=s,f=function(){return void 0===o&&(o=r(t,a)),o},d=t.coordinate,h=0===s||vo(e,d,f,p,l);h||(s=0,p=c,u+=1),h&&(p=d+e*(f()/2+i),s+=u)};u<=a.length;)if(o=f())return o.v;return[]}(m,v,y,i,a):(f="preserveStart"===l||"preserveStartEnd"===l?function(e,t,r,n,i,o){var a=(n||[]).slice(),c=a.length,l=t.start,s=t.end;if(o){var u=n[c-1],p=r(u,c-1),f=e*(u.coordinate+e*p/2-s);a[c-1]=u=xo(xo({},u),{},{tickCoord:f>0?u.coordinate-f*e:u.coordinate}),vo(e,u.tickCoord,(function(){return p}),l,s)&&(s=u.tickCoord-e*(p/2+i),a[c-1]=xo(xo({},u),{},{isShow:!0}))}for(var d=o?c-1:c,h=function(t){var n,o=a[t],c=function(){return void 0===n&&(n=r(o,t)),n};if(0===t){var u=e*(o.coordinate-e*c()/2-l);a[t]=o=xo(xo({},o),{},{tickCoord:u<0?o.coordinate-u*e:o.coordinate})}else a[t]=o=xo(xo({},o),{},{tickCoord:o.coordinate});vo(e,o.tickCoord,c,l,s)&&(l=o.tickCoord+e*(c()/2+i),a[t]=xo(xo({},o),{},{isShow:!0}))},y=0;y<d;y++)h(y);return a}(m,v,y,i,a,"preserveStartEnd"===l):function(e,t,r,n,i){for(var o=(n||[]).slice(),a=o.length,c=t.start,l=t.end,s=function(t){var n,s=o[t],u=function(){return void 0===n&&(n=r(s,t)),n};if(t===a-1){var p=e*(s.coordinate+e*u()/2-l);o[t]=s=xo(xo({},s),{},{tickCoord:p>0?s.coordinate-p*e:s.coordinate})}else o[t]=s=xo(xo({},s),{},{tickCoord:s.coordinate});vo(e,s.tickCoord,u,c,l)&&(l=s.tickCoord-e*(u()/2+i),o[t]=xo(xo({},s),{},{isShow:!0}))},u=a-1;u>=0;u--)s(u);return o}(m,v,y,i,a),f.filter((function(e){return e.isShow})))}function Oo(e){return Oo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Oo(e)}function ko(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function So(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function jo(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?So(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==Oo(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Oo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Oo(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):So(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ao(e){return Array.isArray(e)&&Oe(e[0])&&Oe(e[1])?e.join(" ~ "):e}var Eo=function(e){var t=e.separator,r=void 0===t?" : ":t,n=e.contentStyle,i=void 0===n?{}:n,o=e.itemStyle,a=void 0===o?{}:o,c=e.labelStyle,l=void 0===c?{}:c,s=e.payload,u=e.formatter,p=e.itemSorter,f=e.wrapperClassName,d=e.labelClassName,h=e.label,y=e.labelFormatter,m=jo({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},i),v=jo({margin:0},l),g=!z()(h),b=g?h:"",w=te()("recharts-default-tooltip",f),O=te()("recharts-tooltip-label",d);return g&&y&&null!=s&&(b=y(h,s)),x().createElement("div",{className:w,style:m},x().createElement("p",{className:O,style:v},x().isValidElement(b)?b:"".concat(b)),function(){if(s&&s.length){var e=(p?X()(s,p):s).map((function(e,t){if("none"===e.type)return null;var n=jo({display:"block",paddingTop:4,paddingBottom:4,color:e.color||"#000"},a),i=e.formatter||u||Ao,o=e.value,c=e.name,l=o,p=c;if(i&&null!=l&&null!=p){var f=i(o,c,e,t,s);if(Array.isArray(f)){var d=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,c=[],l=!0,s=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){s=!0,i=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw i}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ko(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ko(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(f,2);l=d[0],p=d[1]}else l=f}return x().createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(t),style:n},Oe(p)?x().createElement("span",{className:"recharts-tooltip-item-name"},p):null,Oe(p)?x().createElement("span",{className:"recharts-tooltip-item-separator"},r):null,x().createElement("span",{className:"recharts-tooltip-item-value"},l),x().createElement("span",{className:"recharts-tooltip-item-unit"},e.unit||""))}));return x().createElement("ul",{className:"recharts-tooltip-item-list",style:{padding:0,margin:0}},e)}return null}())};function Po(e){return Po="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Po(e)}function To(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==Po(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Po(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Po(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Co="recharts-tooltip-wrapper",Io={visibility:"hidden"};function Do(e){var t,r=e.coordinate,n=e.translateX,i=e.translateY;return te()(Co,(To(t={},"".concat(Co,"-right"),we(n)&&r&&we(r.x)&&n>=r.x),To(t,"".concat(Co,"-left"),we(n)&&r&&we(r.x)&&n<r.x),To(t,"".concat(Co,"-bottom"),we(i)&&r&&we(r.y)&&i>=r.y),To(t,"".concat(Co,"-top"),we(i)&&r&&we(r.y)&&i<r.y),t))}function Mo(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.key,i=e.offsetTopLeft,o=e.position,a=e.reverseDirection,c=e.tooltipDimension,l=e.viewBox,s=e.viewBoxDimension;if(o&&we(o[n]))return o[n];var u=r[n]-c-i,p=r[n]+i;return t[n]?a[n]?u:p:a[n]?u<l[n]?Math.max(p,l[n]):Math.max(u,l[n]):p+c>l[n]+s?Math.max(u,l[n]):Math.max(p,l[n])}function Ro(e){return Ro="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ro(e)}function No(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Bo(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?No(Object(r),!0).forEach((function(t){Fo(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):No(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Lo(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Wo(n.key),n)}}function _o(e,t){return _o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_o(e,t)}function zo(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $o(e){return $o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},$o(e)}function Fo(e,t,r){return(t=Wo(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Wo(e){var t=function(e,t){if("object"!==Ro(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Ro(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Ro(t)?t:String(t)}var Uo=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_o(e,t)}(a,e);var t,r,n,i,o=(n=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=$o(n);if(i){var r=$o(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Ro(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return zo(e)}(this,e)});function a(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Fo(zo(e=o.call.apply(o,[this].concat(r))),"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}),Fo(zo(e),"lastBoundingBox",{width:-1,height:-1}),Fo(zo(e),"handleKeyDown",(function(t){var r,n,i,o;"Escape"===t.key&&e.setState({dismissed:!0,dismissedAtCoordinate:{x:null!==(r=null===(n=e.props.coordinate)||void 0===n?void 0:n.x)&&void 0!==r?r:0,y:null!==(i=null===(o=e.props.coordinate)||void 0===o?void 0:o.y)&&void 0!==i?i:0}})})),e}return t=a,(r=[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var e=this.wrapperNode.getBoundingClientRect();(Math.abs(e.width-this.lastBoundingBox.width)>1||Math.abs(e.height-this.lastBoundingBox.height)>1)&&(this.lastBoundingBox.width=e.width,this.lastBoundingBox.height=e.height)}else-1===this.lastBoundingBox.width&&-1===this.lastBoundingBox.height||(this.lastBoundingBox.width=-1,this.lastBoundingBox.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 e,t;this.props.active&&this.updateBBox(),this.state.dismissed&&((null===(e=this.props.coordinate)||void 0===e?void 0:e.x)===this.state.dismissedAtCoordinate.x&&(null===(t=this.props.coordinate)||void 0===t?void 0:t.y)===this.state.dismissedAtCoordinate.y||(this.state.dismissed=!1))}},{key:"render",value:function(){var e=this,t=this.props,r=t.active,n=t.allowEscapeViewBox,i=t.animationDuration,o=t.animationEasing,a=t.children,c=t.coordinate,l=t.hasPayload,s=t.isAnimationActive,u=t.offset,p=t.position,f=t.reverseDirection,d=t.useTranslate3d,h=t.viewBox,y=t.wrapperStyle,m=function(e){var t,r,n,i=e.allowEscapeViewBox,o=e.coordinate,a=e.offsetTopLeft,c=e.position,l=e.reverseDirection,s=e.tooltipBox,u=e.useTranslate3d,p=e.viewBox;return t=s.height>0&&s.width>0&&o?function(e){var t=e.translateX,r=e.translateY,n=e.useTranslate3d;return(0,Kr.translateStyle)({transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")})}({translateX:r=Mo({allowEscapeViewBox:i,coordinate:o,key:"x",offsetTopLeft:a,position:c,reverseDirection:l,tooltipDimension:s.width,viewBox:p,viewBoxDimension:p.width}),translateY:n=Mo({allowEscapeViewBox:i,coordinate:o,key:"y",offsetTopLeft:a,position:c,reverseDirection:l,tooltipDimension:s.height,viewBox:p,viewBoxDimension:p.height}),useTranslate3d:u}):Io,{cssProperties:t,cssClasses:Do({translateX:r,translateY:n,coordinate:o})}}({allowEscapeViewBox:n,coordinate:c,offsetTopLeft:u,position:p,reverseDirection:f,tooltipBox:{height:this.lastBoundingBox.height,width:this.lastBoundingBox.width},useTranslate3d:d,viewBox:h}),v=m.cssClasses,g=m.cssProperties,b=Bo(Bo(Bo({},s&&r&&(0,Kr.translateStyle)({transition:"transform ".concat(i,"ms ").concat(o)})),g),{},{pointerEvents:"none",visibility:!this.state.dismissed&&r&&l?"visible":"hidden",position:"absolute",top:0,left:0},y);return x().createElement("div",{tabIndex:-1,role:"dialog",className:v,style:b,ref:function(t){e.wrapperNode=t}},a)}}])&&Lo(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.PureComponent);function qo(e){return qo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qo(e)}function Go(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ho(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Go(Object(r),!0).forEach((function(t){Yo(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Go(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Xo(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Zo(n.key),n)}}function Vo(e,t){return Vo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Vo(e,t)}function Ko(e){return Ko=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ko(e)}function Yo(e,t,r){return(t=Zo(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Zo(e){var t=function(e,t){if("object"!==qo(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==qo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===qo(t)?t:String(t)}function Qo(e){return e.dataKey}var Jo=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Vo(e,t)}(a,e);var t,r,n,i,o=(n=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ko(n);if(i){var r=Ko(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===qo(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function a(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),o.apply(this,arguments)}return t=a,(r=[{key:"render",value:function(){var e=this.props,t=e.active,r=e.allowEscapeViewBox,n=e.animationDuration,i=e.animationEasing,o=e.content,a=e.coordinate,c=e.filterNull,l=e.isAnimationActive,s=e.offset,u=e.payload,p=e.payloadUniqBy,f=e.position,d=e.reverseDirection,h=e.useTranslate3d,y=e.viewBox,m=e.wrapperStyle,v=null!=u?u:[];c&&v.length&&(v=ir(u.filter((function(e){return null!=e.value})),p,Qo));var g=v.length>0;return x().createElement(Uo,{allowEscapeViewBox:r,animationDuration:n,animationEasing:i,isAnimationActive:l,active:t,coordinate:a,hasPayload:g,offset:s,position:f,reverseDirection:d,useTranslate3d:h,viewBox:y,wrapperStyle:m},function(e,t){return x().isValidElement(e)?x().cloneElement(e,t):"function"==typeof e?x().createElement(e,t):x().createElement(Eo,t)}(o,Ho(Ho({},this.props),{},{payload:v})))}}])&&Xo(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.PureComponent);function ea(e){return ea="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ea(e)}function ta(){return ta=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ta.apply(this,arguments)}function ra(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function na(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ra(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==ea(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==ea(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===ea(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ra(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Yo(Jo,"displayName","Tooltip"),Yo(Jo,"defaultProps",{allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Te.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var ia={curveBasisClosed:$e.curveBasisClosed,curveBasisOpen:$e.curveBasisOpen,curveBasis:$e.curveBasis,curveBumpX:$e.curveBumpX,curveBumpY:$e.curveBumpY,curveLinearClosed:$e.curveLinearClosed,curveLinear:$e.curveLinear,curveMonotoneX:$e.curveMonotoneX,curveMonotoneY:$e.curveMonotoneY,curveNatural:$e.curveNatural,curveStep:$e.curveStep,curveStepAfter:$e.curveStepAfter,curveStepBefore:$e.curveStepBefore},oa=function(e){return e.x===+e.x&&e.y===+e.y},aa=function(e){return e.x},ca=function(e){return e.y},la=function(e){var t=e.className,r=e.points,n=e.path,i=e.pathRef;if(!(r&&r.length||n))return null;var o=r&&r.length?function(e){var t,r=e.type,n=void 0===r?"linear":r,i=e.points,o=void 0===i?[]:i,a=e.baseLine,c=e.layout,l=e.connectNulls,s=void 0!==l&&l,u=function(e,t){if(F()(e))return e;var r="curve".concat(Ve()(e));return"curveMonotone"!==r&&"curveBump"!==r||!t?ia[r]||$e.curveLinear:ia["".concat(r).concat("vertical"===t?"Y":"X")]}(n,c),p=s?o.filter((function(e){return oa(e)})):o;if(Array.isArray(a)){var f=s?a.filter((function(e){return oa(e)})):a,d=p.map((function(e,t){return na(na({},e),{},{base:f[t]})}));return(t="vertical"===c?(0,$e.area)().y(ca).x1(aa).x0((function(e){return e.base.x})):(0,$e.area)().x(aa).y1(ca).y0((function(e){return e.base.y}))).defined(oa).curve(u),t(d)}return(t="vertical"===c&&we(a)?(0,$e.area)().y(ca).x1(aa).x0(a):we(a)?(0,$e.area)().x(aa).y1(ca).y0(a):(0,$e.line)().x(aa).y(ca)).defined(oa).curve(u),t(p)}(e):n;return x().createElement("path",ta({},kt(e),ct(e),{className:te()("recharts-curve",t),d:o,ref:i}))};function sa(e){return sa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},sa(e)}var ua=["x","y","top","left","width","height","className"];function pa(){return pa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},pa.apply(this,arguments)}function fa(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var da=function(e,t,r,n,i,o){return"M".concat(e,",").concat(i,"v").concat(n,"M").concat(o,",").concat(t,"h").concat(r)},ha=function(e){var t=e.x,r=void 0===t?0:t,n=e.y,i=void 0===n?0:n,o=e.top,a=void 0===o?0:o,c=e.left,l=void 0===c?0:c,s=e.width,u=void 0===s?0:s,p=e.height,f=void 0===p?0:p,d=e.className,h=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?fa(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==sa(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==sa(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===sa(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fa(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({x:r,y:i,top:a,left:l,width:u,height:f},function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,ua));return we(r)&&we(i)&&we(u)&&we(f)&&we(a)&&we(l)?x().createElement("path",pa({},kt(h,!0),{className:te()("recharts-cross",d),d:da(r,i,u,f,a,l)})):null};function ya(){return ya=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ya.apply(this,arguments)}var ma=function(e){var t=e.cx,r=e.cy,n=e.r,i=e.className,o=te()("recharts-dot",i);return t===+t&&r===+r&&n===+n?x().createElement("circle",ya({},kt(e),ct(e),{className:o,cx:t,cy:r,r:n})):null},va=["viewBox"],ga=["viewBox"],ba=["ticks"];function xa(e){return xa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xa(e)}function wa(){return wa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},wa.apply(this,arguments)}function Oa(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ka(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Oa(Object(r),!0).forEach((function(t){Pa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Oa(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Sa(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function ja(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ta(n.key),n)}}function Aa(e,t){return Aa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Aa(e,t)}function Ea(e){return Ea=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ea(e)}function Pa(e,t,r){return(t=Ta(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ta(e){var t=function(e,t){if("object"!==xa(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==xa(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===xa(t)?t:String(t)}var Ca=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Aa(e,t)}(c,e);var t,r,n,i,o,a=(i=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ea(i);if(o){var r=Ea(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===xa(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function c(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),(t=a.call(this,e)).state={fontSize:"",letterSpacing:""},t}return t=c,n=[{key:"renderTickItem",value:function(e,t,r){return x().isValidElement(e)?x().cloneElement(e,t):F()(e)?e(t):x().createElement(An,wa({},t,{className:"recharts-cartesian-axis-tick-value"}),r)}}],(r=[{key:"shouldComponentUpdate",value:function(e,t){var r=e.viewBox,n=Sa(e,va),i=this.props,o=i.viewBox,a=Sa(i,ga);return!tt(r,o)||!tt(n,a)||!tt(t,this.state)}},{key:"componentDidMount",value:function(){var e=this.layerReference;if(e){var t=e.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];t&&this.setState({fontSize:window.getComputedStyle(t).fontSize,letterSpacing:window.getComputedStyle(t).letterSpacing})}}},{key:"getTickLineCoord",value:function(e){var t,r,n,i,o,a,c=this.props,l=c.x,s=c.y,u=c.width,p=c.height,f=c.orientation,d=c.tickSize,h=c.mirror,y=c.tickMargin,m=h?-1:1,v=e.tickSize||d,g=we(e.tickCoord)?e.tickCoord:e.coordinate;switch(f){case"top":t=r=e.coordinate,a=(n=(i=s+ +!h*p)-m*v)-m*y,o=g;break;case"left":n=i=e.coordinate,o=(t=(r=l+ +!h*u)-m*v)-m*y,a=g;break;case"right":n=i=e.coordinate,o=(t=(r=l+ +h*u)+m*v)+m*y,a=g;break;default:t=r=e.coordinate,a=(n=(i=s+ +h*p)+m*v)+m*y,o=g}return{line:{x1:t,y1:n,x2:r,y2:i},tick:{x:o,y:a}}}},{key:"getTickTextAnchor",value:function(){var e,t=this.props,r=t.orientation,n=t.mirror;switch(r){case"left":e=n?"start":"end";break;case"right":e=n?"end":"start";break;default:e="middle"}return e}},{key:"getTickVerticalAnchor",value:function(){var e=this.props,t=e.orientation,r=e.mirror,n="end";switch(t){case"left":case"right":n="middle";break;case"top":n=r?"start":"end";break;default:n=r?"end":"start"}return n}},{key:"renderAxisLine",value:function(){var e=this.props,t=e.x,r=e.y,n=e.width,i=e.height,o=e.orientation,a=e.mirror,c=e.axisLine,l=ka(ka(ka({},kt(this.props)),kt(c)),{},{fill:"none"});if("top"===o||"bottom"===o){var s=+("top"===o&&!a||"bottom"===o&&a);l=ka(ka({},l),{},{x1:t,y1:r+s*i,x2:t+n,y2:r+s*i})}else{var u=+("left"===o&&!a||"right"===o&&a);l=ka(ka({},l),{},{x1:t+u*n,y1:r,x2:t+u*n,y2:r+i})}return x().createElement("line",wa({},l,{className:te()("recharts-cartesian-axis-line",G()(c,"className"))}))}},{key:"renderTicks",value:function(e,t,r){var n=this,i=this.props,o=i.tickLine,a=i.stroke,l=i.tick,s=i.tickFormatter,u=i.unit,p=wo(ka(ka({},this.props),{},{ticks:e}),t,r),f=this.getTickTextAnchor(),d=this.getTickVerticalAnchor(),h=kt(this.props),y=kt(l),m=ka(ka({},h),{},{fill:"none"},kt(o)),v=p.map((function(e,t){var r=n.getTickLineCoord(e),i=r.line,v=r.tick,g=ka(ka(ka(ka({textAnchor:f,verticalAnchor:d},h),{},{stroke:"none",fill:a},y),v),{},{index:t,payload:e,visibleTicksCount:p.length,tickFormatter:s});return x().createElement(Tt,wa({className:"recharts-cartesian-axis-tick",key:"tick-".concat(e.value,"-").concat(e.coordinate,"-").concat(e.tickCoord)},lt(n.props,e,t)),o&&x().createElement("line",wa({},m,i,{className:te()("recharts-cartesian-axis-tick-line",G()(o,"className"))})),l&&c.renderTickItem(l,g,"".concat(F()(s)?s(e.value,t):e.value).concat(u||"")))}));return x().createElement("g",{className:"recharts-cartesian-axis-ticks"},v)}},{key:"render",value:function(){var e=this,t=this.props,r=t.axisLine,n=t.width,i=t.height,o=t.ticksGenerator,a=t.className;if(t.hide)return null;var c=this.props,l=c.ticks,s=Sa(c,ba),u=l;return F()(o)&&(u=l&&l.length>0?o(this.props):o(s)),n<=0||i<=0||!u||!u.length?null:x().createElement(Tt,{className:te()("recharts-cartesian-axis",a),ref:function(t){e.layerReference=t}},r&&this.renderAxisLine(),this.renderTicks(u,this.state.fontSize,this.state.letterSpacing),_n.renderCallByParent(this.props))}}])&&ja(t.prototype,r),n&&ja(t,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(b.Component);function Ia(e){return Ia="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ia(e)}function Da(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ma(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Da(Object(r),!0).forEach((function(t){Ra(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Da(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ra(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==Ia(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Ia(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Ia(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}Pa(Ca,"displayName","CartesianAxis"),Pa(Ca,"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"});var Na=["Webkit","Moz","O","ms"];function Ba(e){return Ba="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ba(e)}function La(){return La=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},La.apply(this,arguments)}function _a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function za(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_a(Object(r),!0).forEach((function(t){qa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function $a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ga(n.key),n)}}function Fa(e,t){return Fa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Fa(e,t)}function Wa(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ua(e){return Ua=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ua(e)}function qa(e,t,r){return(t=Ga(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ga(e){var t=function(e,t){if("object"!==Ba(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Ba(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Ba(t)?t:String(t)}var Ha=function(e){return e.changedTouches&&!!e.changedTouches.length},Xa=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Fa(e,t)}(c,e);var t,r,n,i,o,a=(i=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ua(i);if(o){var r=Ua(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Ba(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Wa(e)}(this,e)});function c(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),qa(Wa(t=a.call(this,e)),"handleDrag",(function(e){t.leaveTimer&&(clearTimeout(t.leaveTimer),t.leaveTimer=null),t.state.isTravellerMoving?t.handleTravellerMove(e):t.state.isSlideMoving&&t.handleSlideDrag(e)})),qa(Wa(t),"handleTouchMove",(function(e){null!=e.changedTouches&&e.changedTouches.length>0&&t.handleDrag(e.changedTouches[0])})),qa(Wa(t),"handleDragEnd",(function(){t.setState({isTravellerMoving:!1,isSlideMoving:!1},(function(){var e=t.props,r=e.endIndex,n=e.onDragEnd,i=e.startIndex;null==n||n({endIndex:r,startIndex:i})})),t.detachDragEndListener()})),qa(Wa(t),"handleLeaveWrapper",(function(){(t.state.isTravellerMoving||t.state.isSlideMoving)&&(t.leaveTimer=window.setTimeout(t.handleDragEnd,t.props.leaveTimeOut))})),qa(Wa(t),"handleEnterSlideOrTraveller",(function(){t.setState({isTextActive:!0})})),qa(Wa(t),"handleLeaveSlideOrTraveller",(function(){t.setState({isTextActive:!1})})),qa(Wa(t),"handleSlideDragStart",(function(e){var r=Ha(e)?e.changedTouches[0]:e;t.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:r.pageX}),t.attachDragEndListener()})),t.travellerDragStartHandlers={startX:t.handleTravellerDragStart.bind(Wa(t),"startX"),endX:t.handleTravellerDragStart.bind(Wa(t),"endX")},t.state={},t}return t=c,n=[{key:"renderDefaultTraveller",value:function(e){var t=e.x,r=e.y,n=e.width,i=e.height,o=e.stroke,a=Math.floor(r+i/2)-1;return x().createElement(x().Fragment,null,x().createElement("rect",{x:t,y:r,width:n,height:i,fill:o,stroke:"none"}),x().createElement("line",{x1:t+1,y1:a,x2:t+n-1,y2:a,fill:"none",stroke:"#fff"}),x().createElement("line",{x1:t+1,y1:a+2,x2:t+n-1,y2:a+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(e,t){return x().isValidElement(e)?x().cloneElement(e,t):F()(e)?e(t):c.renderDefaultTraveller(t)}},{key:"getDerivedStateFromProps",value:function(e,t){var r=e.data,n=e.width,i=e.x,o=e.travellerWidth,a=e.updateId,c=e.startIndex,l=e.endIndex;if(r!==t.prevData||a!==t.prevUpdateId)return za({prevData:r,prevTravellerWidth:o,prevUpdateId:a,prevX:i,prevWidth:n},r&&r.length?function(e){var t=e.data,r=e.startIndex,n=e.endIndex,i=e.x,o=e.width,a=e.travellerWidth;if(!t||!t.length)return{};var c=t.length,l=(0,ze.scalePoint)().domain(U()(0,c)).range([i,i+o-a]),s=l.domain().map((function(e){return l(e)}));return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:l(r),endX:l(n),scale:l,scaleValues:s}}({data:r,width:n,x:i,travellerWidth:o,startIndex:c,endIndex:l}):{scale:null,scaleValues:null});if(t.scale&&(n!==t.prevWidth||i!==t.prevX||o!==t.prevTravellerWidth)){t.scale.range([i,i+n-o]);var s=t.scale.domain().map((function(e){return t.scale(e)}));return{prevData:r,prevTravellerWidth:o,prevUpdateId:a,prevX:i,prevWidth:n,startX:t.scale(e.startIndex),endX:t.scale(e.endIndex),scaleValues:s}}return null}},{key:"getIndexInRange",value:function(e,t){for(var r=0,n=e.length-1;n-r>1;){var i=Math.floor((r+n)/2);e[i]>t?n=i:r=i}return t>=e[n]?n:r}}],(r=[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(e){var t=e.startX,r=e.endX,n=this.state.scaleValues,i=this.props,o=i.gap,a=i.data.length-1,l=Math.min(t,r),s=Math.max(t,r),u=c.getIndexInRange(n,l),p=c.getIndexInRange(n,s);return{startIndex:u-u%o,endIndex:p===a?a:p-p%o}}},{key:"getTextOfTick",value:function(e){var t=this.props,r=t.data,n=t.tickFormatter,i=t.dataKey,o=Er(r[e],i,e);return F()(n)?n(o,e):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(e){var t=this.state,r=t.slideMoveStartX,n=t.startX,i=t.endX,o=this.props,a=o.x,c=o.width,l=o.travellerWidth,s=o.startIndex,u=o.endIndex,p=o.onChange,f=e.pageX-r;f>0?f=Math.min(f,a+c-l-i,a+c-l-n):f<0&&(f=Math.max(f,a-n,a-i));var d=this.getIndex({startX:n+f,endX:i+f});d.startIndex===s&&d.endIndex===u||!p||p(d),this.setState({startX:n+f,endX:i+f,slideMoveStartX:e.pageX})}},{key:"handleTravellerDragStart",value:function(e,t){var r=Ha(t)?t.changedTouches[0]:t;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:e,brushMoveStartX:r.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(e){var t,r=this.state,n=r.brushMoveStartX,i=r.movingTravellerId,o=r.endX,a=r.startX,c=this.state[i],l=this.props,s=l.x,u=l.width,p=l.travellerWidth,f=l.onChange,d=l.gap,h=l.data,y={startX:this.state.startX,endX:this.state.endX},m=e.pageX-n;m>0?m=Math.min(m,s+u-p-c):m<0&&(m=Math.max(m,s-c)),y[i]=c+m;var v=this.getIndex(y),g=v.startIndex,b=v.endIndex;this.setState((qa(t={},i,c+m),qa(t,"brushMoveStartX",e.pageX),t),(function(){var e;f&&(e=h.length-1,("startX"===i&&(o>a?g%d==0:b%d==0)||o<a&&b===e||"endX"===i&&(o>a?b%d==0:g%d==0)||o>a&&b===e)&&f(v))}))}},{key:"handleTravellerMoveKeyboard",value:function(e,t){var r=this,n=this.state,i=n.scaleValues,o=n.startX,a=n.endX,c=this.state[t],l=i.indexOf(c);if(-1!==l){var s=l+e;if(!(-1===s||s>=i.length)){var u=i[s];"startX"===t&&u>=a||"endX"===t&&u<=o||this.setState(qa({},t,u),(function(){r.props.onChange(r.getIndex({startX:r.state.startX,endX:r.state.endX}))}))}}}},{key:"renderBackground",value:function(){var e=this.props,t=e.x,r=e.y,n=e.width,i=e.height,o=e.fill,a=e.stroke;return x().createElement("rect",{stroke:a,fill:o,x:t,y:r,width:n,height:i})}},{key:"renderPanorama",value:function(){var e=this.props,t=e.x,r=e.y,n=e.width,i=e.height,o=e.data,a=e.children,c=e.padding,l=b.Children.only(a);return l?x().cloneElement(l,{x:t,y:r,width:n,height:i,margin:c,compact:!0,data:o}):null}},{key:"renderTravellerLayer",value:function(e,t){var r=this,n=this.props,i=n.y,o=n.travellerWidth,a=n.height,l=n.traveller,s=n.ariaLabel,u=n.data,p=n.startIndex,f=n.endIndex,d=Math.max(e,this.props.x),h=za(za({},kt(this.props)),{},{x:d,y:i,width:o,height:a}),y=s||"Min value: ".concat(u[p].name,", Max value: ").concat(u[f].name);return x().createElement(Tt,{tabIndex:0,role:"slider","aria-label":y,"aria-valuenow":e,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[t],onTouchStart:this.travellerDragStartHandlers[t],onKeyDown:function(e){["ArrowLeft","ArrowRight"].includes(e.key)&&(e.preventDefault(),e.stopPropagation(),r.handleTravellerMoveKeyboard("ArrowRight"===e.key?1:-1,t))},onFocus:function(){r.setState({isTravellerFocused:!0})},onBlur:function(){r.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},c.renderTraveller(l,h))}},{key:"renderSlide",value:function(e,t){var r=this.props,n=r.y,i=r.height,o=r.stroke,a=r.travellerWidth,c=Math.min(e,t)+a,l=Math.max(Math.abs(t-e)-a,0);return x().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:c,y:n,width:l,height:i})}},{key:"renderText",value:function(){var e=this.props,t=e.startIndex,r=e.endIndex,n=e.y,i=e.height,o=e.travellerWidth,a=e.stroke,c=this.state,l=c.startX,s=c.endX,u={pointerEvents:"none",fill:a};return x().createElement(Tt,{className:"recharts-brush-texts"},x().createElement(An,La({textAnchor:"end",verticalAnchor:"middle",x:Math.min(l,s)-5,y:n+i/2},u),this.getTextOfTick(t)),x().createElement(An,La({textAnchor:"start",verticalAnchor:"middle",x:Math.max(l,s)+o+5,y:n+i/2},u),this.getTextOfTick(r)))}},{key:"render",value:function(){var e=this.props,t=e.data,r=e.className,n=e.children,i=e.x,o=e.y,a=e.width,c=e.height,l=e.alwaysShowText,s=this.state,u=s.startX,p=s.endX,f=s.isTextActive,d=s.isSlideMoving,h=s.isTravellerMoving,y=s.isTravellerFocused;if(!t||!t.length||!we(i)||!we(o)||!we(a)||!we(c)||a<=0||c<=0)return null;var m,v,g,b,w=te()("recharts-brush",r),O=1===x().Children.count(n),k=(v="none",g=(m="userSelect").replace(/(\w)/,(function(e){return e.toUpperCase()})),(b=Na.reduce((function(e,t){return Ma(Ma({},e),{},Ra({},t+g,v))}),{}))[m]=v,b);return x().createElement(Tt,{className:w,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:k},this.renderBackground(),O&&this.renderPanorama(),this.renderSlide(u,p),this.renderTravellerLayer(u,"startX"),this.renderTravellerLayer(p,"endX"),(f||d||h||y||l)&&this.renderText())}}])&&$a(t.prototype,r),n&&$a(t,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(b.PureComponent);qa(Xa,"displayName","Brush"),qa(Xa,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var Va=function(e,t){var r=e.alwaysShow,n=e.ifOverflow;return r&&(n="extendDomain"),n===t};function Ka(e){return Ka="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ka(e)}function Ya(){return Ya=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ya.apply(this,arguments)}function Za(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Qa(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Za(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==Ka(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Ka(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Ka(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Za(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ja(e){var t=e.x,r=e.y,n=e.r,i=e.alwaysShow,o=e.clipPathId,a=Oe(t),c=Oe(r);if(Rt(void 0===i,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!a||!c)return null;var l=function(e){var t=e.x,r=e.y,n=e.xAxis,i=e.yAxis,o=yo({x:n.scale,y:i.scale}),a=o.apply({x:t,y:r},{bandAware:!0});return Va(e,"discard")&&!o.isInRange(a)?null:a}(e);if(!l)return null;var s=l.x,u=l.y,p=e.shape,f=e.className,d=Qa(Qa({clipPath:Va(e,"hidden")?"url(#".concat(o,")"):void 0},kt(e,!0)),{},{cx:s,cy:u});return x().createElement(Tt,{className:te()("recharts-reference-dot",f)},Ja.renderDot(p,d),_n.renderCallByParent(e,{x:s-n,y:u-n,width:2*n,height:2*n}))}Ja.displayName="ReferenceDot",Ja.defaultProps={isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1},Ja.renderDot=function(e,t){return x().isValidElement(e)?x().cloneElement(e,t):F()(e)?e(t):x().createElement(ma,Ya({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"}))};const ec=require("lodash/some");var tc=r.n(ec);function rc(e){return rc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rc(e)}function nc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ic(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?nc(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==rc(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==rc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===rc(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nc(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function oc(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function ac(){return ac=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ac.apply(this,arguments)}var cc=function(e,t){return x().isValidElement(e)?x().cloneElement(e,t):F()(e)?e(t):x().createElement("line",ac({},t,{className:"recharts-reference-line-line"}))},lc=function(e,t,r,n,i){var o=i.viewBox,a=o.x,c=o.y,l=o.width,s=o.height,u=i.position;if(r){var p=i.y,f=i.yAxis.orientation,d=e.y.apply(p,{position:u});if(Va(i,"discard")&&!e.y.isInRange(d))return null;var h=[{x:a+l,y:d},{x:a,y:d}];return"left"===f?h.reverse():h}if(t){var y=i.x,m=i.xAxis.orientation,v=e.x.apply(y,{position:u});if(Va(i,"discard")&&!e.x.isInRange(v))return null;var g=[{x:v,y:c+s},{x:v,y:c}];return"top"===m?g.reverse():g}if(n){var b=i.segment.map((function(t){return e.apply(t,{position:u})}));return Va(i,"discard")&&tc()(b,(function(t){return!e.isInRange(t)}))?null:b}return null};function sc(e){var t=e.x,r=e.y,n=e.segment,i=e.xAxis,o=e.yAxis,a=e.shape,c=e.className,l=e.alwaysShow,s=e.clipPathId;Rt(void 0===l,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var u=yo({x:i.scale,y:o.scale}),p=Oe(t),f=Oe(r),d=n&&2===n.length,h=lc(u,p,f,d,e);if(!h)return null;var y,m,v=(m=2,function(e){if(Array.isArray(e))return e}(y=h)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,c=[],l=!0,s=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){s=!0,i=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw i}}return c}}(y,m)||function(e,t){if(e){if("string"==typeof e)return oc(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?oc(e,t):void 0}}(y,m)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),g=v[0],b=g.x,w=g.y,O=v[1],k=O.x,S=O.y,j=ic(ic({clipPath:Va(e,"hidden")?"url(#".concat(s,")"):void 0},kt(e,!0)),{},{x1:b,y1:w,x2:k,y2:S});return x().createElement(Tt,{className:te()("recharts-reference-line",c)},cc(a,j),_n.renderCallByParent(e,fo({x1:b,y1:w,x2:k,y2:S})))}function uc(e){return uc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},uc(e)}function pc(){return pc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},pc.apply(this,arguments)}function fc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function dc(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?fc(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==uc(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==uc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===uc(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fc(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function hc(e){var t=e.x1,r=e.x2,n=e.y1,i=e.y2,o=e.className,a=e.alwaysShow,c=e.clipPathId;Rt(void 0===a,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var l=Oe(t),s=Oe(r),u=Oe(n),p=Oe(i),f=e.shape;if(!(l||s||u||p||f))return null;var d=function(e,t,r,n,i){var o=i.x1,a=i.x2,c=i.y1,l=i.y2,s=i.xAxis,u=i.yAxis;if(!s||!u)return null;var p=yo({x:s.scale,y:u.scale}),f={x:e?p.x.apply(o,{position:"start"}):p.x.rangeMin,y:r?p.y.apply(c,{position:"start"}):p.y.rangeMin},d={x:t?p.x.apply(a,{position:"end"}):p.x.rangeMax,y:n?p.y.apply(l,{position:"end"}):p.y.rangeMax};return!Va(i,"discard")||p.isInRange(f)&&p.isInRange(d)?po(f,d):null}(l,s,u,p,e);if(!d&&!f)return null;var h=Va(e,"hidden")?"url(#".concat(c,")"):void 0;return x().createElement(Tt,{className:te()("recharts-reference-area",o)},hc.renderRect(f,dc(dc({clipPath:h},kt(e,!0)),d)),_n.renderCallByParent(e,d))}function yc(e){return function(e){if(Array.isArray(e))return mc(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return mc(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?mc(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function mc(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}sc.displayName="ReferenceLine",sc.defaultProps={isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"},hc.displayName="ReferenceArea",hc.defaultProps={isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1},hc.renderRect=function(e,t){return x().isValidElement(e)?x().cloneElement(e,t):F()(e)?e(t):x().createElement(li,pc({},t,{className:"recharts-reference-area-rect"}))};var vc=function(e,t,r,n,i){var o=gt(e,sc),a=gt(e,Ja),c=[].concat(yc(o),yc(a)),l=gt(e,hc),s="".concat(n,"Id"),u=n[0],p=t;if(c.length&&(p=c.reduce((function(e,t){if(t.props[s]===r&&Va(t.props,"extendDomain")&&we(t.props[u])){var n=t.props[u];return[Math.min(e[0],n),Math.max(e[1],n)]}return e}),p)),l.length){var f="".concat(u,"1"),d="".concat(u,"2");p=l.reduce((function(e,t){if(t.props[s]===r&&Va(t.props,"extendDomain")&&we(t.props[f])&&we(t.props[d])){var n=t.props[f],i=t.props[d];return[Math.min(e[0],n,i),Math.max(e[1],n,i)]}return e}),p)}return i&&i.length&&(p=i.reduce((function(e,t){return we(t)?[Math.min(e[0],t),Math.max(e[1],t)]:e}),p)),p};const gc=require("eventemitter3");var bc=new(r.n(gc)()),xc="recharts.syncMouseEvents";function wc(e){return wc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wc(e)}function Oc(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Sc(n.key),n)}}function kc(e,t,r){return(t=Sc(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Sc(e){var t=function(e,t){if("object"!==wc(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==wc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===wc(t)?t:String(t)}var jc=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),kc(this,"activeIndex",0),kc(this,"coordinateList",[]),kc(this,"layout","horizontal")}var t,r;return t=e,(r=[{key:"setDetails",value:function(e){var t=e.coordinateList,r=void 0===t?[]:t,n=e.container,i=void 0===n?null:n,o=e.layout,a=void 0===o?null:o,c=e.offset,l=void 0===c?null:c,s=e.mouseHandlerCallback,u=void 0===s?null:s;this.coordinateList=null!=r?r:this.coordinateList,this.container=null!=i?i:this.container,this.layout=null!=a?a:this.layout,this.offset=null!=l?l:this.offset,this.mouseHandlerCallback=null!=u?u:this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(e){if(0!==this.coordinateList.length)switch(e.key){case"ArrowRight":if("horizontal"!==this.layout)return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break;case"ArrowLeft":if("horizontal"!==this.layout)return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse()}}},{key:"spoofMouse",value:function(){var e,t;if("horizontal"===this.layout&&0!==this.coordinateList.length){var r=this.container.getBoundingClientRect(),n=r.x,i=r.y,o=r.height,a=this.coordinateList[this.activeIndex].coordinate,c=(null===(e=window)||void 0===e?void 0:e.scrollX)||0,l=(null===(t=window)||void 0===t?void 0:t.scrollY)||0,s=n+a+c,u=i+this.offset.top+o/2+l;this.mouseHandlerCallback({pageX:s,pageY:u})}}}])&&Oc(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Ac(e,t,r){var n,i,o,a;if("horizontal"===e)o=n=t.x,i=r.top,a=r.top+r.height;else if("vertical"===e)a=i=t.y,n=r.left,o=r.left+r.width;else if(null!=t.cx&&null!=t.cy){if("centric"!==e)return fe(t);var c=t.cx,l=t.cy,s=t.innerRadius,u=t.outerRadius,p=t.angle,f=se(c,l,s,p),d=se(c,l,u,p);n=f.x,i=f.y,o=d.x,a=d.y}return[{x:n,y:i},{x:o,y:a}]}var Ec=["item"],Pc=["children","className","width","height","style","compact","title","desc"];function Tc(e){return Tc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Tc(e)}function Cc(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,c=[],l=!0,s=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){s=!0,i=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw i}}return c}}(e,t)||_c(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ic(){return Ic=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ic.apply(this,arguments)}function Dc(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Mc(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Uc(n.key),n)}}function Rc(e,t){return Rc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Rc(e,t)}function Nc(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Bc(e){return Bc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Bc(e)}function Lc(e){return function(e){if(Array.isArray(e))return zc(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||_c(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _c(e,t){if(e){if("string"==typeof e)return zc(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?zc(e,t):void 0}}function zc(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function $c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Fc(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?$c(Object(r),!0).forEach((function(t){Wc(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$c(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Wc(e,t,r){return(t=Uc(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Uc(e){var t=function(e,t){if("object"!==Tc(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Tc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Tc(t)?t:String(t)}var qc={xAxis:["bottom","top"],yAxis:["left","right"]},Gc={width:"100%",height:"100%"},Hc={x:0,y:0},Xc=function(e,t){var r=t.graphicalItems,n=t.dataStartIndex,i=t.dataEndIndex,o=(null!=r?r:[]).reduce((function(e,t){var r=t.props.data;return r&&r.length?[].concat(Lc(e),Lc(r)):e}),[]);return o.length>0?o:e&&e.length&&we(n)&&we(i)?e.slice(n,i+1):[]};function Vc(e){return"number"===e?[0,"auto"]:void 0}var Kc=function(e,t,r,n){var i=e.graphicalItems,o=e.tooltipAxis,a=Xc(t,e);return r<0||!i||!i.length||r>=a.length?null:i.reduce((function(i,c){var l;if(c.props.hide)return i;var s,u=null!==(l=c.props.data)&&void 0!==l?l:t;return u&&e.dataStartIndex+e.dataEndIndex!==0&&(u=u.slice(e.dataStartIndex,e.dataEndIndex+1)),(s=o.dataKey&&!o.allowDuplicatedCategory?Pe(void 0===u?a:u,o.dataKey,n):u&&u[r]||a[r])?[].concat(Lc(i),[Vr(c,s)]):i}),[])},Yc=function(e,t,r,n){var i=n||{x:e.chartX,y:e.chartY},o=function(e,t){return"horizontal"===t?e.x:"vertical"===t?e.y:"centric"===t?e.angle:e.radius}(i,r),a=e.orderedTooltipTicks,c=e.tooltipAxis,l=e.tooltipTicks,s=function(e){var t,r=arguments.length>1&&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!==(t=null==r?void 0:r.length)&&void 0!==t?t:0;if(a<=1)return 0;if(i&&"angleAxis"===i.axisType&&Math.abs(Math.abs(i.range[1]-i.range[0])-360)<=1e-6)for(var c=i.range,l=0;l<a;l++){var s=l>0?n[l-1].coordinate:n[a-1].coordinate,u=n[l].coordinate,p=l>=a-1?n[0].coordinate:n[l+1].coordinate,f=void 0;if(be(u-s)!==be(p-u)){var d=[];if(be(p-u)===be(c[1]-c[0])){f=p;var h=u+c[1]-c[0];d[0]=Math.min(h,(h+s)/2),d[1]=Math.max(h,(h+s)/2)}else{f=s;var y=p+c[1]-c[0];d[0]=Math.min(u,(y+u)/2),d[1]=Math.max(u,(y+u)/2)}var m=[Math.min(u,(f+u)/2),Math.max(u,(f+u)/2)];if(e>m[0]&&e<=m[1]||e>=d[0]&&e<=d[1]){o=n[l].index;break}}else{var v=Math.min(s,p),g=Math.max(s,p);if(e>(v+u)/2&&e<=(g+u)/2){o=n[l].index;break}}}else for(var b=0;b<a;b++)if(0===b&&e<=(r[b].coordinate+r[b+1].coordinate)/2||b>0&&b<a-1&&e>(r[b].coordinate+r[b-1].coordinate)/2&&e<=(r[b].coordinate+r[b+1].coordinate)/2||b===a-1&&e>(r[b].coordinate+r[b-1].coordinate)/2){o=r[b].index;break}return o}(o,a,l,c);if(s>=0&&l){var u=l[s]&&l[s].value,p=Kc(e,t,s,u),f=function(e,t,r,n){var i=t.find((function(e){return e&&e.index===r}));if(i){if("horizontal"===e)return{x:i.coordinate,y:n.y};if("vertical"===e)return{x:n.x,y:i.coordinate};if("centric"===e){var o=i.coordinate,a=n.radius;return Fc(Fc(Fc({},n),se(n.cx,n.cy,a,o)),{},{angle:o,radius:a})}var c=i.coordinate,l=n.angle;return Fc(Fc(Fc({},n),se(n.cx,n.cy,c,l)),{},{angle:l,radius:c})}return Hc}(r,a,s,i);return{activeTooltipIndex:s,activeLabel:u,activePayload:p,activeCoordinate:f}}return null},Zc=function(e,t){var r=t.axisType,n=void 0===r?"xAxis":r,i=t.AxisComp,o=t.graphicalItems,a=t.stackGroups,c=t.dataStartIndex,l=t.dataEndIndex,s=e.children,u="".concat(n,"Id"),p=gt(s,i),f={};return p&&p.length?f=function(e,t){var r=t.axes,n=t.graphicalItems,i=t.axisType,o=t.axisIdKey,a=t.stackGroups,c=t.dataStartIndex,l=t.dataEndIndex,s=e.layout,u=e.children,p=e.stackOffset,f=Dr(s,i);return r.reduce((function(t,r){var d,h=r.props,y=h.type,m=h.dataKey,v=h.allowDataOverflow,g=h.allowDuplicatedCategory,b=h.scale,x=h.ticks,w=h.includeHidden,O=r.props[o];if(t[O])return t;var k,S,j,A=Xc(e.data,{graphicalItems:n.filter((function(e){return e.props[o]===O})),dataStartIndex:c,dataEndIndex:l}),E=A.length;(function(e,t,r){if("number"===r&&!0===t&&Array.isArray(e)){var n=null==e?void 0:e[0],i=null==e?void 0:e[1];if(n&&i&&we(n)&&we(i))return!0}return!1})(r.props.domain,v,y)&&(k=Gr(r.props.domain,null,v),!f||"number"!==y&&"auto"===b||(j=Pr(A,m,"category")));var P=Vc(y);if(!k||0===k.length){var T,C=null!==(T=r.props.domain)&&void 0!==T?T:P;if(m){if(k=Pr(A,m,y),"category"===y&&f){var I=function(e){if(!Array.isArray(e))return!1;for(var t=e.length,r={},n=0;n<t;n++){if(r[e[n]])return!0;r[e[n]]=!0}return!1}(k);g&&I?(S=k,k=U()(0,E)):g||(k=Xr(C,k,r).reduce((function(e,t){return e.indexOf(t)>=0?e:[].concat(Lc(e),[t])}),[]))}else if("category"===y)k=g?k.filter((function(e){return""!==e&&!z()(e)})):Xr(C,k,r).reduce((function(e,t){return e.indexOf(t)>=0||""===t||z()(t)?e:[].concat(Lc(e),[t])}),[]);else if("number"===y){var D=function(e,t,r,n,i){var o=t.map((function(t){return Cr(e,t,r,i,n)})).filter((function(e){return!z()(e)}));return o&&o.length?o.reduce((function(e,t){return[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}),[1/0,-1/0]):null}(A,n.filter((function(e){return e.props[o]===O&&(w||!e.props.hide)})),m,i,s);D&&(k=D)}!f||"number"!==y&&"auto"===b||(j=Pr(A,m,"category"))}else k=f?U()(0,E):a&&a[O]&&a[O].hasStack&&"number"===y?"expand"===p?[0,1]:Wr(a[O].stackGroups,c,l):Ir(A,n.filter((function(e){return e.props[o]===O&&(w||!e.props.hide)})),y,s,!0);if("number"===y)k=vc(u,k,O,i,x),C&&(k=Gr(C,k,v));else if("category"===y&&C){var M=C;k.every((function(e){return M.indexOf(e)>=0}))&&(k=M)}}return Fc(Fc({},t),{},Wc({},O,Fc(Fc({},r.props),{},{axisType:i,domain:k,categoricalDomain:j,duplicateDomain:S,originalDomain:null!==(d=r.props.domain)&&void 0!==d?d:P,isCategorical:f,layout:s})))}),{})}(e,{axes:p,graphicalItems:o,axisType:n,axisIdKey:u,stackGroups:a,dataStartIndex:c,dataEndIndex:l}):o&&o.length&&(f=function(e,t){var r=t.graphicalItems,n=t.Axis,i=t.axisType,o=t.axisIdKey,a=t.stackGroups,c=t.dataStartIndex,l=t.dataEndIndex,s=e.layout,u=e.children,p=Xc(e.data,{graphicalItems:r,dataStartIndex:c,dataEndIndex:l}),f=p.length,d=Dr(s,i),h=-1;return r.reduce((function(e,t){var y,m=t.props[o],v=Vc("number");return e[m]?e:(h++,d?y=U()(0,f):a&&a[m]&&a[m].hasStack?(y=Wr(a[m].stackGroups,c,l),y=vc(u,y,m,i)):(y=Gr(v,Ir(p,r.filter((function(e){return e.props[o]===m&&!e.props.hide})),"number",s),n.defaultProps.allowDataOverflow),y=vc(u,y,m,i)),Fc(Fc({},e),{},Wc({},m,Fc(Fc({axisType:i},n.defaultProps),{},{hide:!0,orientation:G()(qc,"".concat(i,".").concat(h%2),null),domain:y,originalDomain:v,isCategorical:d,layout:s}))))}),{})}(e,{Axis:i,graphicalItems:o,axisType:n,axisIdKey:u,stackGroups:a,dataStartIndex:c,dataEndIndex:l})),f},Qc=function(e){var t=e.children,r=e.defaultShowTooltip,n=bt(t,Xa),i=0,o=0;return e.data&&0!==e.data.length&&(o=e.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:Boolean(r)}},Jc=function(e){return"horizontal"===e?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:"vertical"===e?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:"centric"===e?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},el=function(e){var t,r=e.chartName,n=e.GraphicalChild,i=e.defaultTooltipEventType,o=void 0===i?"axis":i,a=e.validateTooltipEventTypes,c=void 0===a?["axis"]:a,l=e.axisComponents,s=e.legendContent,u=e.formatAxisMap,p=e.defaultProps,f=function(e,t){var i=e.props,o=e.dataStartIndex,a=e.dataEndIndex,c=e.updateId;if(!xt({props:i}))return null;var s=i.children,p=i.layout,f=i.stackOffset,d=i.data,h=i.reverseStackOrder,y=Jc(p),m=y.numericAxisName,v=y.cateAxisName,g=gt(s,n),b=function(e,t,r,n,i,o){if(!e)return null;var a=(o?t.reverse():t).reduce((function(e,t){var i=t.props,o=i.stackId;if(i.hide)return e;var a=t.props[r],c=e[a]||{hasStack:!1,stackGroups:{}};if(Oe(o)){var l=c.stackGroups[o]||{numericAxisId:r,cateAxisId:n,items:[]};l.items.push(t),c.hasStack=!0,c.stackGroups[o]=l}else c.stackGroups[Se("_stackId_")]={numericAxisId:r,cateAxisId:n,items:[t]};return kr(kr({},e),{},Sr({},a,c))}),{});return Object.keys(a).reduce((function(t,o){var c=a[o];return c.hasStack&&(c.stackGroups=Object.keys(c.stackGroups).reduce((function(t,o){var a=c.stackGroups[o];return kr(kr({},t),{},Sr({},o,{numericAxisId:r,cateAxisId:n,items:a.items,stackedData:zr(e,a.items,i)}))}),{})),kr(kr({},t),{},Sr({},o,c))}),{})}(d,g,"".concat(m,"Id"),"".concat(v,"Id"),f,h),x=l.reduce((function(e,t){var r="".concat(t.axisType,"Map");return Fc(Fc({},e),{},Wc({},r,Zc(i,Fc(Fc({},t),{},{graphicalItems:g,stackGroups:t.axisType===m&&b,dataStartIndex:o,dataEndIndex:a}))))}),{}),w=function(e,t){var r=e.props,n=(e.graphicalItems,e.xAxisMap),i=void 0===n?{}:n,o=e.yAxisMap,a=void 0===o?{}:o,c=r.width,l=r.height,s=r.children,u=r.margin||{},p=bt(s,Xa),f=bt(s,mr),d=Object.keys(a).reduce((function(e,t){var r=a[t],n=r.orientation;return r.mirror||r.hide?e:Fc(Fc({},e),{},Wc({},n,e[n]+r.width))}),{left:u.left||0,right:u.right||0}),h=Object.keys(i).reduce((function(e,t){var r=i[t],n=r.orientation;return r.mirror||r.hide?e:Fc(Fc({},e),{},Wc({},n,G()(e,"".concat(n))+r.height))}),{top:u.top||0,bottom:u.bottom||0}),y=Fc(Fc({},h),d),m=y.bottom;p&&(y.bottom+=p.props.height||Xa.defaultProps.height),f&&t&&(y=function(e,t,r,n){var i=r.children,o=r.width,a=r.margin,c=o-(a.left||0)-(a.right||0),l=xr({children:i,legendWidth:c});if(l){var s=n||{},u=s.width,p=s.height,f=l.align,d=l.verticalAlign,h=l.layout;if(("vertical"===h||"horizontal"===h&&"middle"===d)&&"center"!==f&&we(e[f]))return kr(kr({},e),{},Sr({},f,e[f]+(u||0)));if(("horizontal"===h||"vertical"===h&&"center"===f)&&"middle"!==d&&we(e[d]))return kr(kr({},e),{},Sr({},d,e[d]+(p||0)))}return e}(y,0,r,t));var v=c-y.left-y.right,g=l-y.top-y.bottom;return Fc(Fc({brushBottom:m},y),{},{width:Math.max(v,0),height:Math.max(g,0)})}(Fc(Fc({},x),{},{props:i,graphicalItems:g}),null==t?void 0:t.legendBBox);Object.keys(x).forEach((function(e){x[e]=u(i,x[e],w,e.replace("Map",""),r)}));var O,k,S=x["".concat(v,"Map")],j=(O=Ae(S),{tooltipTicks:k=Rr(O,!1,!0),orderedTooltipTicks:X()(k,(function(e){return e.coordinate})),tooltipAxis:O,tooltipAxisBandSize:Hr(O,k)}),A=function(e,t){var r=t.graphicalItems,n=t.stackGroups,i=t.offset,o=t.updateId,a=t.dataStartIndex,c=t.dataEndIndex,s=e.barSize,u=e.layout,p=e.barGap,f=e.barCategoryGap,d=e.maxBarSize,h=Jc(u),y=h.numericAxisName,m=h.cateAxisName,v=function(e){return!(!e||!e.length)&&e.some((function(e){var t=ht(e&&e.type);return t&&t.indexOf("Bar")>=0}))}(r),g=v&&function(e){var t=e.barSize,r=e.stackGroups,n=void 0===r?{}:r;if(!n)return{};for(var i={},o=Object.keys(n),a=0,c=o.length;a<c;a++)for(var l=n[o[a]].stackGroups,s=Object.keys(l),u=0,p=s.length;u<p;u++){var f=l[s[u]],d=f.items,h=f.cateAxisId,y=d.filter((function(e){return ht(e.type).indexOf("Bar")>=0}));if(y&&y.length){var m=y[0].props.barSize,v=y[0].props[h];i[v]||(i[v]=[]),i[v].push({item:y[0],stackList:y.slice(1),barSize:z()(m)?t:m})}}return i}({barSize:s,stackGroups:n}),b=[];return r.forEach((function(r,s){var h=Xc(e.data,{graphicalItems:[r],dataStartIndex:a,dataEndIndex:c}),v=r.props,x=v.dataKey,w=v.maxBarSize,O=r.props["".concat(y,"Id")],k=r.props["".concat(m,"Id")],S=l.reduce((function(e,n){var i,o=t["".concat(n.axisType,"Map")],a=r.props["".concat(n.axisType,"Id")];o&&o[a]||"zAxis"===n.axisType||ne()(!1);var c=o[a];return Fc(Fc({},e),{},(Wc(i={},n.axisType,c),Wc(i,"".concat(n.axisType,"Ticks"),Rr(c)),i))}),{}),j=S[m],A=S["".concat(m,"Ticks")],E=n&&n[O]&&n[O].hasStack&&function(e,t){var r=e.props.stackId;if(Oe(r)){var n=t[r];if(n){var i=n.items.indexOf(e);return i>=0?n.stackedData[i]:null}}return null}(r,n[O].stackGroups),P=ht(r.type).indexOf("Bar")>=0,T=Hr(j,A),C=[];if(P){var I,D,M=z()(w)?d:w,R=null!==(I=null!==(D=Hr(j,A,!0))&&void 0!==D?D:M)&&void 0!==I?I:0;C=function(e){var t=e.barGap,r=e.barCategoryGap,n=e.bandSize,i=e.sizeList,o=void 0===i?[]:i,a=e.maxBarSize,c=o.length;if(c<1)return null;var l,s=je(t,n,0,!0),u=[];if(o[0].barSize===+o[0].barSize){var p=!1,f=n/c,d=o.reduce((function(e,t){return e+t.barSize||0}),0);(d+=(c-1)*s)>=n&&(d-=(c-1)*s,s=0),d>=n&&f>0&&(p=!0,d=c*(f*=.9));var h={offset:((n-d)/2|0)-s,size:0};l=o.reduce((function(e,t){var r={item:t.item,position:{offset:h.offset+h.size+s,size:p?f:t.barSize}},n=[].concat(jr(e),[r]);return h=n[n.length-1].position,t.stackList&&t.stackList.length&&t.stackList.forEach((function(e){n.push({item:e,position:h})})),n}),u)}else{var y=je(r,n,0,!0);n-2*y-(c-1)*s<=0&&(s=0);var m=(n-2*y-(c-1)*s)/c;m>1&&(m>>=0);var v=a===+a?Math.min(m,a):m;l=o.reduce((function(e,t,r){var n=[].concat(jr(e),[{item:t.item,position:{offset:y+(m+s)*r+(m-v)/2,size:v}}]);return t.stackList&&t.stackList.length&&t.stackList.forEach((function(e){n.push({item:e,position:n[n.length-1].position})})),n}),u)}return l}({barGap:p,barCategoryGap:f,bandSize:R!==T?R:T,sizeList:g[k],maxBarSize:M}),R!==T&&(C=C.map((function(e){return Fc(Fc({},e),{},{position:Fc(Fc({},e.position),{},{offset:e.position.offset-R/2})})})))}var N,B,L,_=r&&r.type&&r.type.getComposedData;_&&b.push({props:Fc(Fc({},_(Fc(Fc({},S),{},{displayedData:h,props:e,dataKey:x,item:r,bandSize:T,barPosition:C,offset:i,stackedData:E,layout:u,dataStartIndex:a,dataEndIndex:c}))),{},(N={key:r.key||"item-".concat(s)},Wc(N,y,S[y]),Wc(N,m,S[m]),Wc(N,"animationId",o),N)),childIndex:(B=r,L=e.children,vt(L).indexOf(B)),item:r})})),b}(i,Fc(Fc({},x),{},{dataStartIndex:o,dataEndIndex:a,updateId:c,graphicalItems:g,stackGroups:b,offset:w}));return Fc(Fc({formattedGraphicalItems:A,graphicalItems:g,offset:w,stackGroups:b},j),x)};return t=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Rc(e,t)}(u,e);var t,n,i,a,l=(i=u,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Bc(i);if(a){var r=Bc(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Tc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Nc(e)}(this,e)});function u(e){var t,n,i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),Wc(Nc(i=l.call(this,e)),"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Wc(Nc(i),"accessibilityManager",new jc),Wc(Nc(i),"handleLegendBBoxUpdate",(function(e){if(e){var t=i.state,r=t.dataStartIndex,n=t.dataEndIndex,o=t.updateId;i.setState(Fc({legendBBox:e},f({props:i.props,dataStartIndex:r,dataEndIndex:n,updateId:o},Fc(Fc({},i.state),{},{legendBBox:e}))))}})),Wc(Nc(i),"handleReceiveSyncEvent",(function(e,t,r){if(i.props.syncId===e){if(r===i.eventEmitterSymbol&&"function"!=typeof i.props.syncMethod)return;i.applySyncEvent(t)}})),Wc(Nc(i),"handleBrushChange",(function(e){var t=e.startIndex,r=e.endIndex;if(t!==i.state.dataStartIndex||r!==i.state.dataEndIndex){var n=i.state.updateId;i.setState((function(){return Fc({dataStartIndex:t,dataEndIndex:r},f({props:i.props,dataStartIndex:t,dataEndIndex:r,updateId:n},i.state))})),i.triggerSyncEvent({dataStartIndex:t,dataEndIndex:r})}})),Wc(Nc(i),"handleMouseEnter",(function(e){var t=i.getMouseInfo(e);if(t){var r=Fc(Fc({},t),{},{isTooltipActive:!0});i.setState(r),i.triggerSyncEvent(r);var n=i.props.onMouseEnter;F()(n)&&n(r,e)}})),Wc(Nc(i),"triggeredAfterMouseMove",(function(e){var t=i.getMouseInfo(e),r=t?Fc(Fc({},t),{},{isTooltipActive:!0}):{isTooltipActive:!1};i.setState(r),i.triggerSyncEvent(r);var n=i.props.onMouseMove;F()(n)&&n(r,e)})),Wc(Nc(i),"handleItemMouseEnter",(function(e){i.setState((function(){return{isTooltipActive:!0,activeItem:e,activePayload:e.tooltipPayload,activeCoordinate:e.tooltipPosition||{x:e.cx,y:e.cy}}}))})),Wc(Nc(i),"handleItemMouseLeave",(function(){i.setState((function(){return{isTooltipActive:!1}}))})),Wc(Nc(i),"handleMouseMove",(function(e){e.persist(),i.throttleTriggeredAfterMouseMove(e)})),Wc(Nc(i),"handleMouseLeave",(function(e){var t={isTooltipActive:!1};i.setState(t),i.triggerSyncEvent(t);var r=i.props.onMouseLeave;F()(r)&&r(t,e)})),Wc(Nc(i),"handleOuterEvent",(function(e){var t,r=function(e){var t=e&&e.type;return t&&dt[t]?dt[t]:null}(e),n=G()(i.props,"".concat(r));r&&F()(n)&&n(null!==(t=/.*touch.*/i.test(r)?i.getMouseInfo(e.changedTouches[0]):i.getMouseInfo(e))&&void 0!==t?t:{},e)})),Wc(Nc(i),"handleClick",(function(e){var t=i.getMouseInfo(e);if(t){var r=Fc(Fc({},t),{},{isTooltipActive:!0});i.setState(r),i.triggerSyncEvent(r);var n=i.props.onClick;F()(n)&&n(r,e)}})),Wc(Nc(i),"handleMouseDown",(function(e){var t=i.props.onMouseDown;F()(t)&&t(i.getMouseInfo(e),e)})),Wc(Nc(i),"handleMouseUp",(function(e){var t=i.props.onMouseUp;F()(t)&&t(i.getMouseInfo(e),e)})),Wc(Nc(i),"handleTouchMove",(function(e){null!=e.changedTouches&&e.changedTouches.length>0&&i.throttleTriggeredAfterMouseMove(e.changedTouches[0])})),Wc(Nc(i),"handleTouchStart",(function(e){null!=e.changedTouches&&e.changedTouches.length>0&&i.handleMouseDown(e.changedTouches[0])})),Wc(Nc(i),"handleTouchEnd",(function(e){null!=e.changedTouches&&e.changedTouches.length>0&&i.handleMouseUp(e.changedTouches[0])})),Wc(Nc(i),"triggerSyncEvent",(function(e){void 0!==i.props.syncId&&bc.emit(xc,i.props.syncId,e,i.eventEmitterSymbol)})),Wc(Nc(i),"applySyncEvent",(function(e){var t=i.props,r=t.layout,n=t.syncMethod,o=i.state.updateId,a=e.dataStartIndex,c=e.dataEndIndex;if(void 0!==e.dataStartIndex||void 0!==e.dataEndIndex)i.setState(Fc({dataStartIndex:a,dataEndIndex:c},f({props:i.props,dataStartIndex:a,dataEndIndex:c,updateId:o},i.state)));else if(void 0!==e.activeTooltipIndex){var l=e.chartX,s=e.chartY,u=e.activeTooltipIndex,p=i.state,d=p.offset,h=p.tooltipTicks;if(!d)return;if("function"==typeof n)u=n(h,e);else if("value"===n){u=-1;for(var y=0;y<h.length;y++)if(h[y].value===e.activeLabel){u=y;break}}var m=Fc(Fc({},d),{},{x:d.left,y:d.top}),v=Math.min(l,m.x+m.width),g=Math.min(s,m.y+m.height),b=h[u]&&h[u].value,x=Kc(i.state,i.props.data,u),w=h[u]?{x:"horizontal"===r?h[u].coordinate:v,y:"horizontal"===r?g:h[u].coordinate}:Hc;i.setState(Fc(Fc({},e),{},{activeLabel:b,activeCoordinate:w,activePayload:x,activeTooltipIndex:u}))}else i.setState(e)})),Wc(Nc(i),"verticalCoordinatesGenerator",(function(e,t){var r=e.xAxis,n=e.width,i=e.height,o=e.offset;return Mr(wo(Fc(Fc(Fc({},Ca.defaultProps),r),{},{ticks:Rr(r,!0),viewBox:{x:0,y:0,width:n,height:i}})),o.left,o.left+o.width,t)})),Wc(Nc(i),"horizontalCoordinatesGenerator",(function(e,t){var r=e.yAxis,n=e.width,i=e.height,o=e.offset;return Mr(wo(Fc(Fc(Fc({},Ca.defaultProps),r),{},{ticks:Rr(r,!0),viewBox:{x:0,y:0,width:n,height:i}})),o.top,o.top+o.height,t)})),Wc(Nc(i),"axesTicksGenerator",(function(e){return Rr(e,!0)})),Wc(Nc(i),"renderCursor",(function(e){var t,n=i.state,o=n.isTooltipActive,a=n.activeCoordinate,c=n.activePayload,l=n.offset,s=n.activeTooltipIndex,u=n.tooltipAxisBandSize,p=i.getTooltipEventType(),f=null!==(t=e.props.active)&&void 0!==t?t:o;if(!e||!e.props.cursor||!f||!a||"ScatterChart"!==r&&"axis"!==p)return null;var d,h=i.props.layout,y=la;if("ScatterChart"===r)d=a,y=ha;else if("BarChart"===r)d=function(e,t,r,n){var i=n/2;return{stroke:"none",fill:"#ccc",x:"horizontal"===e?t.x-i:r.left+.5,y:"horizontal"===e?r.top+.5:t.y-i,width:"horizontal"===e?n:r.width-1,height:"horizontal"===e?r.height-1:n}}(h,a,l,u),y=li;else if("radial"===h){var m=fe(a),v=m.cx,g=m.cy,x=m.radius;d={cx:v,cy:g,startAngle:m.startAngle,endAngle:m.endAngle,innerRadius:x,outerRadius:x},y=Si}else d={points:Ac(h,a,l)},y=la;var w=e.key||"_recharts-cursor",O=Fc(Fc(Fc(Fc({stroke:"#ccc",pointerEvents:"none"},l),d),kt(e.props.cursor)),{},{payload:c,payloadIndex:s,key:w,className:"recharts-tooltip-cursor"});return(0,b.isValidElement)(e.props.cursor)?(0,b.cloneElement)(e.props.cursor,O):(0,b.createElement)(y,O)})),Wc(Nc(i),"renderPolarAxis",(function(e,t,r){var n=G()(e,"type.axisType"),o=G()(i.state,"".concat(n,"Map")),a=o&&o[e.props["".concat(n,"Id")]];return(0,b.cloneElement)(e,Fc(Fc({},a),{},{className:n,key:e.key||"".concat(t,"-").concat(r),ticks:Rr(a,!0)}))})),Wc(Nc(i),"renderXAxis",(function(e,t,r){var n=i.state.xAxisMap[e.props.xAxisId];return i.renderAxis(n,e,t,r)})),Wc(Nc(i),"renderYAxis",(function(e,t,r){var n=i.state.yAxisMap[e.props.yAxisId];return i.renderAxis(n,e,t,r)})),Wc(Nc(i),"renderGrid",(function(e){var t=i.state,r=t.xAxisMap,n=t.yAxisMap,o=t.offset,a=i.props,c=a.width,l=a.height,s=Ae(r),u=Z()(n,(function(e){return J()(e.domain,Number.isFinite)}))||Ae(n),p=e.props||{};return(0,b.cloneElement)(e,{key:e.key||"grid",x:we(p.x)?p.x:o.left,y:we(p.y)?p.y:o.top,width:we(p.width)?p.width:o.width,height:we(p.height)?p.height:o.height,xAxis:s,yAxis:u,offset:o,chartWidth:c,chartHeight:l,verticalCoordinatesGenerator:p.verticalCoordinatesGenerator||i.verticalCoordinatesGenerator,horizontalCoordinatesGenerator:p.horizontalCoordinatesGenerator||i.horizontalCoordinatesGenerator})})),Wc(Nc(i),"renderPolarGrid",(function(e){var t=e.props,r=t.radialLines,n=t.polarAngles,o=t.polarRadius,a=i.state,c=a.radiusAxisMap,l=a.angleAxisMap,s=Ae(c),u=Ae(l),p=u.cx,f=u.cy,d=u.innerRadius,h=u.outerRadius;return(0,b.cloneElement)(e,{polarAngles:Array.isArray(n)?n:Rr(u,!0).map((function(e){return e.coordinate})),polarRadius:Array.isArray(o)?o:Rr(s,!0).map((function(e){return e.coordinate})),cx:p,cy:f,innerRadius:d,outerRadius:h,key:e.key||"polar-grid",radialLines:r})})),Wc(Nc(i),"renderLegend",(function(){var e=i.state.formattedGraphicalItems,t=i.props,r=t.children,n=t.width,o=t.height,a=i.props.margin||{},c=n-(a.left||0)-(a.right||0),l=xr({children:r,formattedGraphicalItems:e,legendWidth:c,legendContent:s});if(!l)return null;var u=l.item,p=Dc(l,Ec);return(0,b.cloneElement)(u,Fc(Fc({},p),{},{chartWidth:n,chartHeight:o,margin:a,onBBoxUpdate:i.handleLegendBBoxUpdate}))})),Wc(Nc(i),"renderTooltip",(function(){var e,t=bt(i.props.children,Jo);if(!t)return null;var r=i.state,n=r.isTooltipActive,o=r.activeCoordinate,a=r.activePayload,c=r.activeLabel,l=r.offset,s=null!==(e=t.props.active)&&void 0!==e?e:n;return(0,b.cloneElement)(t,{viewBox:Fc(Fc({},l),{},{x:l.left,y:l.top}),active:s,label:c,payload:s?a:[],coordinate:o})})),Wc(Nc(i),"renderBrush",(function(e){var t=i.props,r=t.margin,n=t.data,o=i.state,a=o.offset,c=o.dataStartIndex,l=o.dataEndIndex,s=o.updateId;return(0,b.cloneElement)(e,{key:e.key||"_recharts-brush",onChange:Br(i.handleBrushChange,e.props.onChange),data:n,x:we(e.props.x)?e.props.x:a.left,y:we(e.props.y)?e.props.y:a.top+a.height+a.brushBottom-(r.bottom||0),width:we(e.props.width)?e.props.width:a.width,startIndex:c,endIndex:l,updateId:"brush-".concat(s)})})),Wc(Nc(i),"renderReferenceElement",(function(e,t,r){if(!e)return null;var n=Nc(i).clipPathId,o=i.state,a=o.xAxisMap,c=o.yAxisMap,l=o.offset,s=e.props,u=s.xAxisId,p=s.yAxisId;return(0,b.cloneElement)(e,{key:e.key||"".concat(t,"-").concat(r),xAxis:a[u],yAxis:c[p],viewBox:{x:l.left,y:l.top,width:l.width,height:l.height},clipPathId:n})})),Wc(Nc(i),"renderActivePoints",(function(e){var t=e.item,r=e.activePoint,n=e.basePoint,i=e.childIndex,o=e.isRange,a=[],c=t.props.key,l=t.item.props,s=l.activeDot,p=Fc(Fc({index:i,dataKey:l.dataKey,cx:r.x,cy:r.y,r:4,fill:Tr(t.item),strokeWidth:2,stroke:"#fff",payload:r.payload,value:r.value,key:"".concat(c,"-activePoint-").concat(i)},kt(s)),ct(s));return a.push(u.renderActiveDot(s,p)),n?a.push(u.renderActiveDot(s,Fc(Fc({},p),{},{cx:n.x,cy:n.y,key:"".concat(c,"-basePoint-").concat(i)}))):o&&a.push(null),a})),Wc(Nc(i),"renderGraphicChild",(function(e,t,r){var n=i.filterFormatItem(e,t,r);if(!n)return null;var o=i.getTooltipEventType(),a=i.state,c=a.isTooltipActive,l=a.tooltipAxis,s=a.activeTooltipIndex,u=a.activeLabel,p=bt(i.props.children,Jo),f=n.props,d=f.points,h=f.isRange,y=f.baseLine,m=n.item.props,v=m.activeDot,g=m.hide,x=m.activeBar,w=m.activeShape,O=Boolean(!g&&c&&p&&(v||x||w)),k={};"axis"!==o&&p&&"click"===p.props.trigger?k={onClick:Br(i.handleItemMouseEnter,e.props.onClick)}:"axis"!==o&&(k={onMouseLeave:Br(i.handleItemMouseLeave,e.props.onMouseLeave),onMouseEnter:Br(i.handleItemMouseEnter,e.props.onMouseEnter)});var S=(0,b.cloneElement)(e,Fc(Fc({},n.props),k));if(O){if(!(s>=0)){var j,A=(null!==(j=i.getItemByXY(i.state.activeCoordinate))&&void 0!==j?j:{graphicalItem:S}).graphicalItem,E=A.item,P=void 0===E?e:E,T=A.childIndex,C=Fc(Fc(Fc({},n.props),k),{},{activeIndex:T});return[(0,b.cloneElement)(P,C),null,null]}var I,D;if(l.dataKey&&!l.allowDuplicatedCategory){var M="function"==typeof l.dataKey?function(e){return"function"==typeof l.dataKey?l.dataKey(e.payload):null}:"payload.".concat(l.dataKey.toString());I=Pe(d,M,u),D=h&&y&&Pe(y,M,u)}else I=null==d?void 0:d[s],D=h&&y&&y[s];if(w||x){var R=void 0!==e.props.activeIndex?e.props.activeIndex:s;return[(0,b.cloneElement)(e,Fc(Fc(Fc({},n.props),k),{},{activeIndex:R})),null,null]}if(!z()(I))return[S].concat(Lc(i.renderActivePoints({item:n,activePoint:I,basePoint:D,childIndex:s,isRange:h})))}return h?[S,null,null]:[S,null]})),Wc(Nc(i),"renderCustomized",(function(e,t,r){return(0,b.cloneElement)(e,Fc(Fc({key:"recharts-customized-".concat(r)},i.props),i.state))})),Wc(Nc(i),"renderMap",{CartesianGrid:{handler:i.renderGrid,once:!0},ReferenceArea:{handler:i.renderReferenceElement},ReferenceLine:{handler:i.renderReferenceElement},ReferenceDot:{handler:i.renderReferenceElement},XAxis:{handler:i.renderXAxis},YAxis:{handler:i.renderYAxis},Brush:{handler:i.renderBrush,once:!0},Bar:{handler:i.renderGraphicChild},Line:{handler:i.renderGraphicChild},Area:{handler:i.renderGraphicChild},Radar:{handler:i.renderGraphicChild},RadialBar:{handler:i.renderGraphicChild},Scatter:{handler:i.renderGraphicChild},Pie:{handler:i.renderGraphicChild},Funnel:{handler:i.renderGraphicChild},Tooltip:{handler:i.renderCursor,once:!0},PolarGrid:{handler:i.renderPolarGrid,once:!0},PolarAngleAxis:{handler:i.renderPolarAxis},PolarRadiusAxis:{handler:i.renderPolarAxis},Customized:{handler:i.renderCustomized}}),i.clipPathId="".concat(null!==(t=e.id)&&void 0!==t?t:Se("recharts"),"-clip"),i.throttleTriggeredAfterMouseMove=K()(i.triggeredAfterMouseMove,null!==(n=e.throttleDelay)&&void 0!==n?n:1e3/60),i.state={},i}return t=u,n=[{key:"componentDidMount",value:function(){var e,t;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:null!==(e=this.props.margin.left)&&void 0!==e?e:0,top:null!==(t=this.props.margin.top)&&void 0!==t?t:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout})}},{key:"getSnapshotBeforeUpdate",value:function(e,t){return this.props.accessibilityLayer?(this.state.tooltipTicks!==t.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==e.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==e.margin&&this.accessibilityManager.setDetails({offset:{left:null!==(r=this.props.margin.left)&&void 0!==r?r:0,top:null!==(n=this.props.margin.top)&&void 0!==n?n:0}}),null):null;var r,n}},{key:"componentDidUpdate",value:function(){}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var e=bt(this.props.children,Jo);if(e&&"boolean"==typeof e.props.shared){var t=e.props.shared?"axis":"item";return c.indexOf(t)>=0?t:o}return o}},{key:"getMouseInfo",value:function(e){if(!this.container)return null;var t,r=this.container,n=r.getBoundingClientRect(),i=(t=n).top+window.scrollY-document.documentElement.clientTop,o=t.left+window.scrollX-document.documentElement.clientLeft,a={chartX:Math.round(e.pageX-o),chartY:Math.round(e.pageY-i)},c=n.width/r.offsetWidth||1,l=this.inRange(a.chartX,a.chartY,c);if(!l)return null;var s=this.state,u=s.xAxisMap,p=s.yAxisMap;if("axis"!==this.getTooltipEventType()&&u&&p){var f=Ae(u).scale,d=Ae(p).scale,h=f&&f.invert?f.invert(a.chartX):null,y=d&&d.invert?d.invert(a.chartY):null;return Fc(Fc({},a),{},{xValue:h,yValue:y})}var m=Yc(this.state,this.props.data,this.props.layout,l);return m?Fc(Fc({},a),m):null}},{key:"inRange",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=this.props.layout,i=e/r,o=t/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 c=this.state,l=c.angleAxisMap,s=c.radiusAxisMap;if(l&&s){var u=Ae(l);return pe({x:i,y:o},u)}return null}},{key:"parseEventsOfWrapper",value:function(){var e=this.props.children,t=this.getTooltipEventType(),r=bt(e,Jo),n={};return r&&"axis"===t&&(n="click"===r.props.trigger?{onClick:this.handleClick}:{onMouseEnter:this.handleMouseEnter,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd}),Fc(Fc({},ct(this.props,this.handleOuterEvent)),n)}},{key:"addListener",value:function(){bc.on(xc,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){bc.removeListener(xc,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(e,t,r){for(var n=this.state.formattedGraphicalItems,i=0,o=n.length;i<o;i++){var a=n[i];if(a.item===e||a.props.key===e.key||t===ht(a.item.type)&&r===a.childIndex)return a}return null}},{key:"renderAxis",value:function(e,t,r,n){var i=this.props,o=i.width,a=i.height;return x().createElement(Ca,Ic({},e,{className:te()("recharts-".concat(e.axisType," ").concat(e.axisType),e.className),key:t.key||"".concat(r,"-").concat(n),viewBox:{x:0,y:0,width:o,height:a},ticksGenerator:this.axesTicksGenerator}))}},{key:"renderClipPath",value:function(){var e=this.clipPathId,t=this.state.offset,r=t.left,n=t.top,i=t.height,o=t.width;return x().createElement("defs",null,x().createElement("clipPath",{id:e},x().createElement("rect",{x:r,y:n,height:i,width:o})))}},{key:"getXScales",value:function(){var e=this.state.xAxisMap;return e?Object.entries(e).reduce((function(e,t){var r=Cc(t,2),n=r[0],i=r[1];return Fc(Fc({},e),{},Wc({},n,i.scale))}),{}):null}},{key:"getYScales",value:function(){var e=this.state.yAxisMap;return e?Object.entries(e).reduce((function(e,t){var r=Cc(t,2),n=r[0],i=r[1];return Fc(Fc({},e),{},Wc({},n,i.scale))}),{}):null}},{key:"getXScaleByAxisId",value:function(e){var t;return null===(t=this.state.xAxisMap)||void 0===t||null===(t=t[e])||void 0===t?void 0:t.scale}},{key:"getYScaleByAxisId",value:function(e){var t;return null===(t=this.state.yAxisMap)||void 0===t||null===(t=t[e])||void 0===t?void 0:t.scale}},{key:"getItemByXY",value:function(e){var t=this.state,r=t.formattedGraphicalItems,n=t.activeItem;if(r&&r.length)for(var i=0,o=r.length;i<o;i++){var a=r[i],c=a.props,l=a.item,s=ht(l.type);if("Bar"===s){var u=(c.data||[]).find((function(t){return ai(e,t)}));if(u)return{graphicalItem:a,payload:u}}else if("RadialBar"===s){var p=(c.data||[]).find((function(t){return pe(e,t)}));if(p)return{graphicalItem:a,payload:p}}else if(Di(a,n)||Mi(a,n)||Ri(a,n)){var f=_i({graphicalItem:a,activeTooltipItem:n,itemData:l.props.data}),d=void 0===l.props.activeIndex?f:l.props.activeIndex;return{graphicalItem:Fc(Fc({},a),{},{childIndex:d}),payload:Ri(a,n)?l.props.data[f]:a.props.data[f]}}}return null}},{key:"render",value:function(){var e=this;if(!xt(this))return null;var t,r,n=this.props,i=n.children,o=n.className,a=n.width,c=n.height,l=n.style,s=n.compact,u=n.title,p=n.desc,f=Dc(n,Pc),d=kt(f);if(s)return x().createElement(Lt,Ic({},d,{width:a,height:c,title:u,desc:p}),this.renderClipPath(),At(i,this.renderMap));this.props.accessibilityLayer&&(d.tabIndex=null!==(t=this.props.tabIndex)&&void 0!==t?t:0,d.role=null!==(r=this.props.role)&&void 0!==r?r:"img",d.onKeyDown=function(t){e.accessibilityManager.keyboardEvent(t)},d.onFocus=function(){e.accessibilityManager.focus()});var h=this.parseEventsOfWrapper();return x().createElement("div",Ic({className:te()("recharts-wrapper",o),style:Fc({position:"relative",cursor:"default",width:a,height:c},l)},h,{ref:function(t){e.container=t},role:"region"}),x().createElement(Lt,Ic({},d,{width:a,height:c,title:u,desc:p,style:Gc}),this.renderClipPath(),At(i,this.renderMap)),this.renderLegend(),this.renderTooltip())}}],n&&Mc(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),u}(b.Component),Wc(t,"displayName",r),Wc(t,"defaultProps",Fc({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},p)),Wc(t,"getDerivedStateFromProps",(function(e,t){var r=e.dataKey,n=e.data,i=e.children,o=e.width,a=e.height,c=e.layout,l=e.stackOffset,s=e.margin;if(void 0===t.updateId){var u=Qc(e);return Fc(Fc(Fc({},u),{},{updateId:0},f(Fc(Fc({props:e},u),{},{updateId:0}),t)),{},{prevDataKey:r,prevData:n,prevWidth:o,prevHeight:a,prevLayout:c,prevStackOffset:l,prevMargin:s,prevChildren:i})}if(r!==t.prevDataKey||n!==t.prevData||o!==t.prevWidth||a!==t.prevHeight||c!==t.prevLayout||l!==t.prevStackOffset||!tt(s,t.prevMargin)){var p=Qc(e),d={chartX:t.chartX,chartY:t.chartY,isTooltipActive:t.isTooltipActive},h=Fc(Fc({},Yc(t,n,c)),{},{updateId:t.updateId+1}),y=Fc(Fc(Fc({},p),d),h);return Fc(Fc(Fc({},y),f(Fc({props:e},y),t)),{},{prevDataKey:r,prevData:n,prevWidth:o,prevHeight:a,prevLayout:c,prevStackOffset:l,prevMargin:s,prevChildren:i})}if(!St(i,t.prevChildren)){var m=z()(n)?t.updateId+1:t.updateId;return Fc(Fc({updateId:m},f(Fc(Fc({props:e},t),{},{updateId:m}),t)),{},{prevChildren:i})}return null})),Wc(t,"renderActiveDot",(function(e,t){var r;return r=(0,b.isValidElement)(e)?(0,b.cloneElement)(e,t):F()(e)?e(t):x().createElement(ma,t),x().createElement(Tt,{className:"recharts-active-dot",key:t.key},r)})),t},tl=["type","layout","connectNulls","ref"];function rl(e){return rl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rl(e)}function nl(){return nl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},nl.apply(this,arguments)}function il(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ol(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?il(Object(r),!0).forEach((function(t){fl(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):il(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function al(e){return function(e){if(Array.isArray(e))return cl(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return cl(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?cl(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function cl(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function ll(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,dl(n.key),n)}}function sl(e,t){return sl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},sl(e,t)}function ul(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pl(e){return pl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},pl(e)}function fl(e,t,r){return(t=dl(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function dl(e){var t=function(e,t){if("object"!==rl(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==rl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===rl(t)?t:String(t)}var hl=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&sl(e,t)}(c,e);var t,r,n,i,o,a=(i=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=pl(i);if(o){var r=pl(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===rl(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return ul(e)}(this,e)});function c(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return fl(ul(e=a.call.apply(a,[this].concat(r))),"state",{isAnimationFinished:!0,totalLength:0}),fl(ul(e),"generateSimpleStrokeDasharray",(function(e,t){return"".concat(t,"px ").concat(e-t,"px")})),fl(ul(e),"getStrokeDasharray",(function(t,r,n){var i=n.reduce((function(e,t){return e+t}));if(!i)return e.generateSimpleStrokeDasharray(r,t);for(var o=Math.floor(t/i),a=t%i,l=r-t,s=[],u=0,p=0;u<n.length;p+=n[u],++u)if(p+n[u]>a){s=[].concat(al(n.slice(0,u)),[a-p]);break}var f=s.length%2==0?[0,l]:[l];return[].concat(al(c.repeat(n,o)),al(s),f).map((function(e){return"".concat(e,"px")})).join(", ")})),fl(ul(e),"id",Se("recharts-line-")),fl(ul(e),"pathRef",(function(t){e.mainCurve=t})),fl(ul(e),"handleAnimationEnd",(function(){e.setState({isAnimationFinished:!0}),e.props.onAnimationEnd&&e.props.onAnimationEnd()})),fl(ul(e),"handleAnimationStart",(function(){e.setState({isAnimationFinished:!1}),e.props.onAnimationStart&&e.props.onAnimationStart()})),e}return t=c,n=[{key:"getDerivedStateFromProps",value:function(e,t){return e.animationId!==t.prevAnimationId?{prevAnimationId:e.animationId,curPoints:e.points,prevPoints:t.curPoints}:e.points!==t.curPoints?{curPoints:e.points}:null}},{key:"repeat",value:function(e,t){for(var r=e.length%2!=0?[].concat(al(e),[0]):e,n=[],i=0;i<t;++i)n=[].concat(al(n),al(r));return n}},{key:"renderDotItem",value:function(e,t){var r;if(x().isValidElement(e))r=x().cloneElement(e,t);else if(F()(e))r=e(t);else{var n=te()("recharts-line-dot",e?e.className:"");r=x().createElement(ma,nl({},t,{className:n}))}return r}}],(r=[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var e=this.getTotalLength();this.setState({totalLength:e})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var e=this.getTotalLength();e!==this.state.totalLength&&this.setState({totalLength:e})}}},{key:"getTotalLength",value:function(){var e=this.mainCurve;try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch(e){return 0}}},{key:"renderErrorBar",value:function(e,t){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var r=this.props,n=r.points,i=r.xAxis,o=r.yAxis,a=r.layout,c=gt(r.children,Mt);if(!c)return null;var l=function(e,t){return{x:e.x,y:e.y,value:e.value,errorVal:Er(e.payload,t)}},s={clipPath:e?"url(#clipPath-".concat(t,")"):null};return x().createElement(Tt,s,c.map((function(e){return x().cloneElement(e,{key:"bar-".concat(e.props.dataKey),data:n,xAxis:i,yAxis:o,layout:a,dataPointFormatter:l})})))}},{key:"renderDots",value:function(e,t,r){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var n=this.props,i=n.dot,o=n.points,a=n.dataKey,l=kt(this.props),s=kt(i,!0),u=o.map((function(e,t){var r=ol(ol(ol({key:"dot-".concat(t),r:3},l),s),{},{value:e.value,dataKey:a,cx:e.x,cy:e.y,index:t,payload:e.payload});return c.renderDotItem(i,r)})),p={clipPath:e?"url(#clipPath-".concat(t?"":"dots-").concat(r,")"):null};return x().createElement(Tt,nl({className:"recharts-line-dots",key:"dots"},p),u)}},{key:"renderCurveStatically",value:function(e,t,r,n){var i=this.props,o=i.type,a=i.layout,c=i.connectNulls,l=(i.ref,function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(i,tl)),s=ol(ol(ol({},kt(l,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:t?"url(#clipPath-".concat(r,")"):null,points:e},n),{},{type:o,layout:a,connectNulls:c});return x().createElement(la,nl({},s,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(e,t){var r=this,n=this.props,i=n.points,o=n.strokeDasharray,a=n.isAnimationActive,c=n.animationBegin,l=n.animationDuration,s=n.animationEasing,u=n.animationId,p=n.animateNewValues,f=n.width,d=n.height,h=this.state,y=h.prevPoints,m=h.totalLength;return x().createElement(Yr(),{begin:c,duration:l,isActive:a,easing:s,from:{t:0},to:{t:1},key:"line-".concat(u),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},(function(n){var a=n.t;if(y){var c=y.length/i.length,l=i.map((function(e,t){var r=Math.floor(t*c);if(y[r]){var n=y[r],i=Ee(n.x,e.x),o=Ee(n.y,e.y);return ol(ol({},e),{},{x:i(a),y:o(a)})}if(p){var l=Ee(2*f,e.x),s=Ee(d/2,e.y);return ol(ol({},e),{},{x:l(a),y:s(a)})}return ol(ol({},e),{},{x:e.x,y:e.y})}));return r.renderCurveStatically(l,e,t)}var s,u=Ee(0,m)(a);if(o){var h="".concat(o).split(/[,\s]+/gim).map((function(e){return parseFloat(e)}));s=r.getStrokeDasharray(u,m,h)}else s=r.generateSimpleStrokeDasharray(m,u);return r.renderCurveStatically(i,e,t,{strokeDasharray:s})}))}},{key:"renderCurve",value:function(e,t){var r=this.props,n=r.points,i=r.isAnimationActive,o=this.state,a=o.prevPoints,c=o.totalLength;return i&&n&&n.length&&(!a&&c>0||!Ye()(a,n))?this.renderCurveWithAnimation(e,t):this.renderCurveStatically(n,e,t)}},{key:"render",value:function(){var e,t=this.props,r=t.hide,n=t.dot,i=t.points,o=t.className,a=t.xAxis,c=t.yAxis,l=t.top,s=t.left,u=t.width,p=t.height,f=t.isAnimationActive,d=t.id;if(r||!i||!i.length)return null;var h=this.state.isAnimationFinished,y=1===i.length,m=te()("recharts-line",o),v=a&&a.allowDataOverflow,g=c&&c.allowDataOverflow,b=v||g,w=z()(d)?this.id:d,O=null!==(e=kt(n))&&void 0!==e?e:{r:3,strokeWidth:2},k=O.r,S=void 0===k?3:k,j=O.strokeWidth,A=void 0===j?2:j,E=(Ot(n)?n:{}).clipDot,P=void 0===E||E,T=2*S+A;return x().createElement(Tt,{className:m},v||g?x().createElement("defs",null,x().createElement("clipPath",{id:"clipPath-".concat(w)},x().createElement("rect",{x:v?s:s-u/2,y:g?l:l-p/2,width:v?u:2*u,height:g?p:2*p})),!P&&x().createElement("clipPath",{id:"clipPath-dots-".concat(w)},x().createElement("rect",{x:s-T/2,y:l-T/2,width:u+T,height:p+T}))):null,!y&&this.renderCurve(b,w),this.renderErrorBar(b,w),(y||n)&&this.renderDots(b,P,w),(!f||h)&&Kn.renderCallByParent(this.props,i))}}])&&ll(t.prototype,r),n&&ll(t,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(b.PureComponent);fl(hl,"displayName","Line"),fl(hl,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!Te.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1}),fl(hl,"getComposedData",(function(e){var t=e.props,r=e.xAxis,n=e.yAxis,i=e.xAxisTicks,o=e.yAxisTicks,a=e.dataKey,c=e.bandSize,l=e.displayedData,s=e.offset,u=t.layout;return ol({points:l.map((function(e,t){var l=Er(e,a);return"horizontal"===u?{x:$r({axis:r,ticks:i,bandSize:c,entry:e,index:t}),y:z()(l)?null:n.scale(l),value:l,payload:e}:{x:z()(l)?null:r.scale(l),y:$r({axis:n,ticks:o,bandSize:c,entry:e,index:t}),value:l,payload:e}})),layout:u},s)}));var yl=function(){return null};yl.displayName="XAxis",yl.defaultProps={allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0};var ml=function(){return null};ml.displayName="YAxis",ml.defaultProps={allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1};var vl,gl=el({chartName:"LineChart",GraphicalChild:hl,axisComponents:[{axisType:"xAxis",AxisComp:yl},{axisType:"yAxis",AxisComp:ml}],formatAxisMap:uo}),bl=el({chartName:"BarChart",GraphicalChild:no,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:yl},{axisType:"yAxis",AxisComp:ml}],formatAxisMap:uo}),xl=["layout","type","stroke","connectNulls","isRange","ref"];function wl(e){return wl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wl(e)}function Ol(){return Ol=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ol.apply(this,arguments)}function kl(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Sl(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?kl(Object(r),!0).forEach((function(t){Tl(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kl(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function jl(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Cl(n.key),n)}}function Al(e,t){return Al=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Al(e,t)}function El(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Pl(e){return Pl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Pl(e)}function Tl(e,t,r){return(t=Cl(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Cl(e){var t=function(e,t){if("object"!==wl(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==wl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===wl(t)?t:String(t)}var Il=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Al(e,t)}(c,e);var t,r,n,i,o,a=(i=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Pl(i);if(o){var r=Pl(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===wl(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return El(e)}(this,e)});function c(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Tl(El(e=a.call.apply(a,[this].concat(r))),"state",{isAnimationFinished:!0}),Tl(El(e),"id",Se("recharts-area-")),Tl(El(e),"handleAnimationEnd",(function(){var t=e.props.onAnimationEnd;e.setState({isAnimationFinished:!0}),F()(t)&&t()})),Tl(El(e),"handleAnimationStart",(function(){var t=e.props.onAnimationStart;e.setState({isAnimationFinished:!1}),F()(t)&&t()})),e}return t=c,n=[{key:"getDerivedStateFromProps",value:function(e,t){return e.animationId!==t.prevAnimationId?{prevAnimationId:e.animationId,curPoints:e.points,curBaseLine:e.baseLine,prevPoints:t.curPoints,prevBaseLine:t.curBaseLine}:e.points!==t.curPoints||e.baseLine!==t.curBaseLine?{curPoints:e.points,curBaseLine:e.baseLine}:null}}],(r=[{key:"renderDots",value:function(e,t,r){var n=this.props.isAnimationActive,i=this.state.isAnimationFinished;if(n&&!i)return null;var o=this.props,a=o.dot,l=o.points,s=o.dataKey,u=kt(this.props),p=kt(a,!0),f=l.map((function(e,t){var r=Sl(Sl(Sl({key:"dot-".concat(t),r:3},u),p),{},{dataKey:s,cx:e.x,cy:e.y,index:t,value:e.value,payload:e.payload});return c.renderDotItem(a,r)})),d={clipPath:e?"url(#clipPath-".concat(t?"":"dots-").concat(r,")"):null};return x().createElement(Tt,Ol({className:"recharts-area-dots"},d),f)}},{key:"renderHorizontalRect",value:function(e){var t=this.props,r=t.baseLine,n=t.points,i=t.strokeWidth,o=n[0].x,a=n[n.length-1].x,c=e*Math.abs(o-a),l=We()(n.map((function(e){return e.y||0})));return we(r)&&"number"==typeof r?l=Math.max(r,l):r&&Array.isArray(r)&&r.length&&(l=Math.max(We()(r.map((function(e){return e.y||0}))),l)),we(l)?x().createElement("rect",{x:o<a?o:o-c,y:0,width:c,height:Math.floor(l+(i?parseInt("".concat(i),10):1))}):null}},{key:"renderVerticalRect",value:function(e){var t=this.props,r=t.baseLine,n=t.points,i=t.strokeWidth,o=n[0].y,a=n[n.length-1].y,c=e*Math.abs(o-a),l=We()(n.map((function(e){return e.x||0})));return we(r)&&"number"==typeof r?l=Math.max(r,l):r&&Array.isArray(r)&&r.length&&(l=Math.max(We()(r.map((function(e){return e.x||0}))),l)),we(l)?x().createElement("rect",{x:0,y:o<a?o:o-c,width:l+(i?parseInt("".concat(i),10):1),height:Math.floor(c)}):null}},{key:"renderClipRect",value:function(e){return"vertical"===this.props.layout?this.renderVerticalRect(e):this.renderHorizontalRect(e)}},{key:"renderAreaStatically",value:function(e,t,r,n){var i=this.props,o=i.layout,a=i.type,c=i.stroke,l=i.connectNulls,s=i.isRange,u=(i.ref,function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(i,xl));return x().createElement(Tt,{clipPath:r?"url(#clipPath-".concat(n,")"):null},x().createElement(la,Ol({},kt(u,!0),{points:e,connectNulls:l,type:a,baseLine:t,layout:o,stroke:"none",className:"recharts-area-area"})),"none"!==c&&x().createElement(la,Ol({},kt(this.props),{className:"recharts-area-curve",layout:o,type:a,connectNulls:l,fill:"none",points:e})),"none"!==c&&s&&x().createElement(la,Ol({},kt(this.props),{className:"recharts-area-curve",layout:o,type:a,connectNulls:l,fill:"none",points:t})))}},{key:"renderAreaWithAnimation",value:function(e,t){var r=this,n=this.props,i=n.points,o=n.baseLine,a=n.isAnimationActive,c=n.animationBegin,l=n.animationDuration,s=n.animationEasing,u=n.animationId,p=this.state,f=p.prevPoints,d=p.prevBaseLine;return x().createElement(Yr(),{begin:c,duration:l,isActive:a,easing:s,from:{t:0},to:{t:1},key:"area-".concat(u),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},(function(n){var a=n.t;if(f){var c,l=f.length/i.length,s=i.map((function(e,t){var r=Math.floor(t*l);if(f[r]){var n=f[r],i=Ee(n.x,e.x),o=Ee(n.y,e.y);return Sl(Sl({},e),{},{x:i(a),y:o(a)})}return e}));return c=we(o)&&"number"==typeof o?Ee(d,o)(a):z()(o)||me()(o)?Ee(d,0)(a):o.map((function(e,t){var r=Math.floor(t*l);if(d[r]){var n=d[r],i=Ee(n.x,e.x),o=Ee(n.y,e.y);return Sl(Sl({},e),{},{x:i(a),y:o(a)})}return e})),r.renderAreaStatically(s,c,e,t)}return x().createElement(Tt,null,x().createElement("defs",null,x().createElement("clipPath",{id:"animationClipPath-".concat(t)},r.renderClipRect(a))),x().createElement(Tt,{clipPath:"url(#animationClipPath-".concat(t,")")},r.renderAreaStatically(i,o,e,t)))}))}},{key:"renderArea",value:function(e,t){var r=this.props,n=r.points,i=r.baseLine,o=r.isAnimationActive,a=this.state,c=a.prevPoints,l=a.prevBaseLine,s=a.totalLength;return o&&n&&n.length&&(!c&&s>0||!Ye()(c,n)||!Ye()(l,i))?this.renderAreaWithAnimation(e,t):this.renderAreaStatically(n,i,e,t)}},{key:"render",value:function(){var e,t=this.props,r=t.hide,n=t.dot,i=t.points,o=t.className,a=t.top,c=t.left,l=t.xAxis,s=t.yAxis,u=t.width,p=t.height,f=t.isAnimationActive,d=t.id;if(r||!i||!i.length)return null;var h=this.state.isAnimationFinished,y=1===i.length,m=te()("recharts-area",o),v=l&&l.allowDataOverflow,g=s&&s.allowDataOverflow,b=v||g,w=z()(d)?this.id:d,O=null!==(e=kt(n))&&void 0!==e?e:{r:3,strokeWidth:2},k=O.r,S=void 0===k?3:k,j=O.strokeWidth,A=void 0===j?2:j,E=(Ot(n)?n:{}).clipDot,P=void 0===E||E,T=2*S+A;return x().createElement(Tt,{className:m},v||g?x().createElement("defs",null,x().createElement("clipPath",{id:"clipPath-".concat(w)},x().createElement("rect",{x:v?c:c-u/2,y:g?a:a-p/2,width:v?u:2*u,height:g?p:2*p})),!P&&x().createElement("clipPath",{id:"clipPath-dots-".concat(w)},x().createElement("rect",{x:c-T/2,y:a-T/2,width:u+T,height:p+T}))):null,y?null:this.renderArea(b,w),(n||y)&&this.renderDots(b,P,w),(!f||h)&&Kn.renderCallByParent(this.props,i))}}])&&jl(t.prototype,r),n&&jl(t,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(b.PureComponent);vl=Il,Tl(Il,"displayName","Area"),Tl(Il,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!Te.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"}),Tl(Il,"getBaseValue",(function(e,t,r,n){var i=e.layout,o=e.baseValue,a=t.props.baseValue,c=null!=a?a:o;if(we(c)&&"number"==typeof c)return c;var l="horizontal"===i?n:r,s=l.scale.domain();if("number"===l.type){var u=Math.max(s[0],s[1]),p=Math.min(s[0],s[1]);return"dataMin"===c?p:"dataMax"===c||u<0?u:Math.max(Math.min(s[0],s[1]),0)}return"dataMin"===c?s[0]:"dataMax"===c?s[1]:s[0]})),Tl(Il,"getComposedData",(function(e){var t,r=e.props,n=e.item,i=e.xAxis,o=e.yAxis,a=e.xAxisTicks,c=e.yAxisTicks,l=e.bandSize,s=e.dataKey,u=e.stackedData,p=e.dataStartIndex,f=e.displayedData,d=e.offset,h=r.layout,y=u&&u.length,m=vl.getBaseValue(r,n,i,o),v="horizontal"===h,g=!1,b=f.map((function(e,t){var r;y?r=u[p+t]:(r=Er(e,s),Array.isArray(r)?g=!0:r=[m,r]);var n=null==r[1]||y&&null==Er(e,s);return v?{x:$r({axis:i,ticks:a,bandSize:l,entry:e,index:t}),y:n?null:o.scale(r[1]),value:r,payload:e}:{x:n?null:i.scale(r[1]),y:$r({axis:o,ticks:c,bandSize:l,entry:e,index:t}),value:r,payload:e}}));return t=y||g?b.map((function(e){var t=Array.isArray(e.value)?e.value[0]:null;return v?{x:e.x,y:null!=t&&null!=e.y?o.scale(t):null}:{x:null!=t?i.scale(t):null,y:e.y}})):v?o.scale(m):i.scale(m),Sl({points:b,baseLine:t,layout:h,isRange:g},d)})),Tl(Il,"renderDotItem",(function(e,t){return x().isValidElement(e)?x().cloneElement(e,t):F()(e)?e(t):x().createElement(ma,Ol({},t,{className:"recharts-area-dot"}))}));var Dl=el({chartName:"AreaChart",GraphicalChild:Il,axisComponents:[{axisType:"xAxis",AxisComp:yl},{axisType:"yAxis",AxisComp:ml}],formatAxisMap:uo});function Ml(e){return Ml="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ml(e)}function Rl(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Nl(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Rl(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==Ml(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Ml(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Ml(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Rl(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Bl(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Ll=(0,b.forwardRef)((function(e,t){var r=e.aspect,n=e.initialDimension,i=void 0===n?{width:-1,height:-1}:n,o=e.width,a=void 0===o?"100%":o,c=e.height,l=void 0===c?"100%":c,s=e.minWidth,u=void 0===s?0:s,p=e.minHeight,f=e.maxHeight,d=e.children,h=e.debounce,y=void 0===h?0:h,m=e.id,v=e.className,g=e.onResize,w=e.style,O=void 0===w?{}:w,k=(0,b.useRef)(null),S=(0,b.useRef)();S.current=g,(0,b.useImperativeHandle)(t,(function(){return k}));var j,A,E=(j=(0,b.useState)({containerWidth:i.width,containerHeight:i.height}),A=2,function(e){if(Array.isArray(e))return e}(j)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,c=[],l=!0,s=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){s=!0,i=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw i}}return c}}(j,A)||function(e,t){if(e){if("string"==typeof e)return Bl(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Bl(e,t):void 0}}(j,A)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),P=E[0],T=E[1],C=(0,b.useCallback)((function(e,t){T((function(r){var n=Math.round(e),i=Math.round(t);return r.containerWidth===n&&r.containerHeight===i?r:{containerWidth:n,containerHeight:i}}))}),[]);(0,b.useEffect)((function(){var e=function(e){var t,r=e[0].contentRect,n=r.width,i=r.height;C(n,i),null===(t=S.current)||void 0===t||t.call(S,n,i)};y>0&&(e=K()(e,y,{trailing:!0,leading:!1}));var t=new ResizeObserver(e),r=k.current.getBoundingClientRect(),n=r.width,i=r.height;return C(n,i),t.observe(k.current),function(){t.disconnect()}}),[C,y]);var I=(0,b.useMemo)((function(){var e=P.containerWidth,t=P.containerHeight;if(e<0||t<0)return null;Rt(xe(a)||xe(l),"The width(%s) and height(%s) are both fixed numbers,\n maybe you don't need to use a ResponsiveContainer.",a,l),Rt(!r||r>0,"The aspect(%s) must be greater than zero.",r);var n=xe(a)?e:a,i=xe(l)?t:l;r&&r>0&&(n?i=n/r:i&&(n=i*r),f&&i>f&&(i=f)),Rt(n>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.",n,i,a,l,u,p,r);var o=!Array.isArray(d)&&(0,et.isElement)(d)&&ht(d.type).endsWith("Chart");return x().Children.map(d,(function(e){return(0,et.isElement)(e)?(0,b.cloneElement)(e,Nl({width:n,height:i},o?{style:Nl({height:"100%",width:"100%",maxHeight:i,maxWidth:n},e.props.style)}:{})):e}))}),[r,d,l,f,p,u,P,a]);return x().createElement("div",{id:m?"".concat(m):void 0,className:te()("recharts-responsive-container",v),style:Nl(Nl({},O),{},{width:a,height:l,minWidth:u,minHeight:p,maxHeight:f}),ref:k},I)})),_l=r(450),zl=r.n(_l);function $l(e){var t=new Date,r=new Date(e);return Math.floor((t.getTime()-r.getTime())/1e3)}var Fl,Wl=function(e){return e.charAt(0).toUpperCase()+e.slice(1)};function Ul(e,t){return function(e,t){var r,n=new Date(e),i=navigator.language;return r=t===Fl.HOUR?{hour:"numeric",minute:"2-digit",hour12:!0}:{month:"short",day:"numeric"},n.toLocaleString(i,r)}(e,t<=1?Fl.HOUR:Fl.MONTH_DATE)}!function(e){e[e.HOUR=0]="HOUR",e[e.MONTH_DATE=1]="MONTH_DATE"}(Fl||(Fl={}));var ql=function(){return ql=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},ql.apply(this,arguments)},Gl={line:gl,bar:bl,area:Dl};function Hl(e){var t={};return e.forEach((function(e){t[e]=!0})),t}function Xl(e){var t=(0,b.useState)(e.defaultChartType||"line"),r=t[0],n=t[1],i=(0,b.useState)(null),o=i[0],a=i[1],c=(0,b.useState)(e.timeSeries),l=c[0],s=c[1],p=l.length>0?Object.keys(l[0]):[],f=p[0],d=p.slice(1),h=(0,b.useState)(Hl(d)),y=h[0],m=h[1];(0,b.useEffect)((function(){if(e.updatedData&&e.updatedData.length>0){var t=function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}([],e.timeSeries,!0);e.updatedData.forEach((function(e){t=t.concat(e.timeSeries),s(t)}))}}),[e.timeSeries,e.updatedData]);var v=Gl[r];function g(e){o?a(null):e&&a(e.currentTarget)}function x(t,r){return y[t]?e.chartColors[r%e.chartColors.length]:"grey"}function w(e){return y[e]?"none":"line-through"}if(0===l.length)return(0,u.jsx)(N(),{variant:"body2",children:"No data available"});var O,S,A,P,C=e.timeSeries[e.timeSeries.length-1],D=(O=e.timeSeries[0][f],S=C[f],A=new Date(O),P=new Date(S),Math.round(Math.abs((P.getTime()-A.getTime())/864e5)));return(0,u.jsxs)(L(),{className:"rustic-recharts-time-series","data-cy":"".concat(r,"-chart"),children:[!e.disableChartTypeToggle&&(0,u.jsxs)(E(),{className:"rustic-recharts-time-series-chart-toggle",children:[(0,u.jsx)(T(),{"aria-label":"chart options","aria-expanded":Boolean(o),"aria-haspopup":"true",onClick:g,children:(0,u.jsx)(j(),{sx:{color:"primary.main"}})}),(0,u.jsxs)(I(),{anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},anchorEl:o,open:Boolean(o),onClose:function(e){return g(e)},children:[(0,u.jsx)(N(),{className:"rustic-recharts-time-series-chart-toggle-title",children:"Chart Types:"}),Object.keys(Gl).map((function(e){return(0,u.jsxs)(M(),{value:e,selected:e===r,onClick:function(){return function(e){n(e),g()}(e)},children:[e.charAt(0).toUpperCase()+e.slice(1)," ","Chart"]},e)}))]})]}),(0,u.jsxs)(L(),{children:[e.title&&(0,u.jsx)(N(),{variant:"subtitle2",className:"rustic-recharts-time-series-title","data-cy":"time-series-title",children:e.title}),e.description&&(0,u.jsx)(N(),{variant:"caption",className:"rustic-recharts-time-series-description",children:e.description}),(0,u.jsx)(Ll,{aspect:e.aspectRatio,width:e.width,maxHeight:e.maxHeight,minWidth:e.minChartWidth,children:(0,u.jsxs)(v,{data:l,margin:e.chartContainerMargin,children:[(0,u.jsx)(yl,{dataKey:f,tickFormatter:function(e){return Ul(e,D)}}),(0,u.jsx)(ml,{domain:["auto","auto"],width:e.yAxisLabelWidth,tickFormatter:e.yAxisTickFormatter}),(0,u.jsx)(Jo,{labelFormatter:function(e){return[Ul(e,D)]},formatter:e.tooltipFormatter}),(0,u.jsx)(mr,{content:function(){return(0,u.jsx)(L(),{className:"rustic-recharts-time-series-legend",children:d.map((function(e,t){return(0,u.jsxs)(L(),{className:"rustic-recharts-time-series-legend-item",onClick:function(){return function(e){var t,r=y[e]&&!d.find((function(t){return t!==e&&y[t]}));if(function(e){return Object.values(e).every((function(e){return!0===e}))}(y)){for(var n={},i=0,o=d;i<o.length;i++){var a=o[i],c=a===e;n[a]=c}m(n)}else m(r?Hl(d):ql(ql({},y),((t={})[e]=!y[e],t)))}(e)},"data-cy":"legend-item",children:[(0,u.jsx)(k(),{sx:{color:x(e,t)}}),(0,u.jsx)(N(),{variant:"body2",display:"inline",sx:{color:x(e,t),textDecorationLine:w(e)},children:e})]},t)}))})}}),d.map((function(t,n){return y[t]?function(t,n){var i=n%e.chartColors.length,o=y[t]?e.chartColors[i]:"transparent",a={onClick:e.onClick,cursor:"pointer"};switch(r){case"line":return(0,u.jsx)(hl,{type:"monotone",isAnimationActive:!1,dataKey:t,name:t,dot:!1,stroke:o,activeDot:e.onClick&&a},t);case"bar":return(0,u.jsx)(no,{dataKey:t,fill:o,onClick:e.onClick&&a.onClick,cursor:e.onClick&&a.cursor},t);case"area":return(0,u.jsxs)(b.Fragment,{children:[(0,u.jsx)("defs",{children:(0,u.jsxs)("linearGradient",{id:"color".concat(t),x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,u.jsx)("stop",{offset:"5%",stopColor:o,stopOpacity:.8}),(0,u.jsx)("stop",{offset:"95%",stopColor:o,stopOpacity:0})]})}),(0,u.jsx)(Il,{isAnimationActive:!1,dataKey:t,type:"monotone",stroke:o,fillOpacity:1,fill:"url(#color".concat(t,")"),activeDot:e.onClick&&a},t)]},t)}}(t,n):null})),e.referenceLineYAxis&&e.referenceLineYAxis.map((function(t,r){return(0,u.jsx)(sc,{y:t,label:e.referenceLineLabel&&e.referenceLineLabel[r],stroke:e.referenceLineColor&&e.referenceLineColor[r],strokeDasharray:"3 3",ifOverflow:"extendDomain",strokeWidth:e.referenceLineStrokeWidth&&e.referenceLineStrokeWidth[r],isFront:!0},r)}))]})})]})]})}Xl.defaultProps={minChartWidth:200,maxHeight:600,yAxisLabelWidth:30,aspectRatio:16/9,disableChartTypeToggle:!1};const Vl=Xl,Kl=require("codemirror"),Yl=require("@codemirror/view"),Zl=require("@codemirror/state"),Ql=require("@mui/system"),Jl=require("@mui/material"),es=require("crypto");var ts=r.n(es);const rs={randomUUID:ts().randomUUID},ns=new Uint8Array(256);let is=ns.length;function os(){return is>ns.length-16&&(ts().randomFillSync(ns),is=0),ns.slice(is,is+=16)}const as=[];for(let e=0;e<256;++e)as.push((e+256).toString(16).slice(1));const cs=function(e,t,r){if(rs.randomUUID&&!t&&!e)return rs.randomUUID();const n=(e=e||{}).random||(e.rng||os)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=n[e];return t}return function(e,t=0){return as[e[t+0]]+as[e[t+1]]+as[e[t+2]]+as[e[t+3]]+"-"+as[e[t+4]]+as[e[t+5]]+"-"+as[e[t+6]]+as[e[t+7]]+"-"+as[e[t+8]]+as[e[t+9]]+"-"+as[e[t+10]]+as[e[t+11]]+as[e[t+12]]+as[e[t+13]]+as[e[t+14]]+as[e[t+15]]}(n)},ls=require("@codemirror/language-data");function ss(e){var t=cs();return(0,b.useEffect)((function(){var r=ls.languages.find((function(t){return t.name.toLowerCase()===e.language.toLowerCase()})),n={doc:e.code,extensions:[Kl.minimalSetup,Zl.EditorState.readOnly.of(!0)],parent:document.getElementById(t)};r?r.load().then((function(e){n.extensions.push(e.extension),new Yl.EditorView(n)})):new Yl.EditorView(n)}),[]),(0,u.jsx)(Ql.Box,{sx:{backgroundColor:"background.default"},className:"rustic-code-snippet",children:(0,u.jsx)("div",{"aria-label":"code snippet",id:t,"data-cy":"code-block",children:(0,u.jsx)(Jl.Typography,{variant:"body2","aria-label":"language type","data-cy":"language-type",children:e.language})})})}var us=function(){return us=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},us.apply(this,arguments)};const ps=function(e){var t=e.supportedElements[e.message.format];return(0,u.jsx)(u.Fragment,{children:t?x().createElement(t,us(us({},e.message.data),e.message.threadMessagesData&&{updatedData:e.message.threadMessagesData})):(0,u.jsxs)(N(),{variant:"body2",children:["Unsupported element format: ",e.message.format]})})},fs=require("@mui/material/CircularProgress");var ds=r.n(fs),hs=function(){return hs=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},hs.apply(this,arguments)};function ys(e){var t=(0,b.useState)(!0),r=t[0],n=t[1],i=(0,b.useState)(""),o=i[0],a=i[1];if(o.length>0)return(0,u.jsx)(N(),{variant:"body2",children:o});var c={};return e.width&&(c={width:e.width}),e.height&&(c=hs(hs({},c),{height:e.height})),e.width||e.height||(c={className:"rustic-image-responsive"}),(0,u.jsxs)(u.Fragment,{children:[r&&(0,u.jsx)(ds(),{"data-cy":"spinner"}),(0,u.jsx)("img",hs({},c,{src:e.url,alt:e.alt,onError:function(){a("Image failed to load"),n(!1)},onLoad:function(){n(!1)}}))]})}ys.defaultProps={alt:"An image is displayed"},require("ol/ol.css");const ms=require("@mui/icons-material/Place");var vs=r.n(ms);const gs=require("@mui/material/Alert");var bs=r.n(gs);const xs=require("ol/layer/Tile.js");var ws=r.n(xs);const Os=require("ol/Map.js");var ks=r.n(Os);const Ss=require("ol/Overlay.js");var js=r.n(Ss);const As=require("ol/proj.js"),Es=require("ol/source/OSM.js");var Ps=r.n(Es);const Ts=require("ol/View.js");var Cs=r.n(Ts);function Is(e){var t=(0,b.useState)(""),r=t[0],n=t[1],i=(0,b.useRef)(null),o=(0,b.useRef)(null);return(0,b.useEffect)((function(){if(n(""),e.latitude<-90||e.latitude>90||e.longitude<-180||e.longitude>180)return n("Invalid coordinates");if(i.current&&o.current){var t=new(ks())({layers:[new(ws())({source:new(Ps())})],view:new(Cs())({center:(0,As.fromLonLat)([e.longitude,e.latitude]),zoom:e.zoom}),target:i.current}),r=new(js())({element:o.current,position:(0,As.fromLonLat)([e.longitude,e.latitude]),positioning:"bottom-center",stopEvent:!1});return t.addOverlay(r),t.once("postrender",(function(){var e;if(!(null===(e=i.current)||void 0===e?void 0:e.querySelector("canvas")))return n("An error occurred while loading the map")})),function(){t.setTarget(""),t.removeOverlay(r)}}}),[e.longitude,e.latitude,e.zoom]),(0,u.jsxs)(m(),{"data-cy":"map",children:[(0,u.jsx)(m(),{children:r&&(0,u.jsx)(bs(),{severity:"error",children:r})}),(0,u.jsx)(m(),{ref:o,children:(0,u.jsx)(vs(),{sx:{fontSize:e.markerSize}})}),(0,u.jsx)("div",{ref:i,style:{width:"".concat(e.width,"px"),height:"".concat(e.height,"px")}})]})}Is.defaultProps={zoom:12,width:300,height:300,markerSize:50};const{entries:Ds,setPrototypeOf:Ms,isFrozen:Rs,getPrototypeOf:Ns,getOwnPropertyDescriptor:Bs}=Object;let{freeze:Ls,seal:_s,create:zs}=Object,{apply:$s,construct:Fs}="undefined"!=typeof Reflect&&Reflect;Ls||(Ls=function(e){return e}),_s||(_s=function(e){return e}),$s||($s=function(e,t,r){return e.apply(t,r)}),Fs||(Fs=function(e,t){return new e(...t)});const Ws=eu(Array.prototype.forEach),Us=eu(Array.prototype.pop),qs=eu(Array.prototype.push),Gs=eu(String.prototype.toLowerCase),Hs=eu(String.prototype.toString),Xs=eu(String.prototype.match),Vs=eu(String.prototype.replace),Ks=eu(String.prototype.indexOf),Ys=eu(String.prototype.trim),Zs=eu(RegExp.prototype.test),Qs=(Js=TypeError,function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return Fs(Js,t)});var Js;function eu(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return $s(e,t,n)}}function tu(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Gs;Ms&&Ms(e,null);let n=t.length;for(;n--;){let i=t[n];if("string"==typeof i){const e=r(i);e!==i&&(Rs(t)||(t[n]=e),i=e)}e[i]=!0}return e}function ru(e){const t=zs(null);for(const[r,n]of Ds(e))void 0!==Bs(e,r)&&(t[r]=n);return t}function nu(e,t){for(;null!==e;){const r=Bs(e,t);if(r){if(r.get)return eu(r.get);if("function"==typeof r.value)return eu(r.value)}e=Ns(e)}return function(e){return console.warn("fallback value for",e),null}}const iu=Ls(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),ou=Ls(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),au=Ls(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),cu=Ls(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),lu=Ls(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),su=Ls(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),uu=Ls(["#text"]),pu=Ls(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),fu=Ls(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),du=Ls(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),hu=Ls(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),yu=_s(/\{\{[\w\W]*|[\w\W]*\}\}/gm),mu=_s(/<%[\w\W]*|[\w\W]*%>/gm),vu=_s(/\${[\w\W]*}/gm),gu=_s(/^data-[\-\w.\u00B7-\uFFFF]/),bu=_s(/^aria-[\-\w]+$/),xu=_s(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),wu=_s(/^(?:\w+script|data):/i),Ou=_s(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ku=_s(/^html$/i);var Su=Object.freeze({__proto__:null,MUSTACHE_EXPR:yu,ERB_EXPR:mu,TMPLIT_EXPR:vu,DATA_ATTR:gu,ARIA_ATTR:bu,IS_ALLOWED_URI:xu,IS_SCRIPT_OR_DATA:wu,ATTR_WHITESPACE:Ou,DOCTYPE_NAME:ku});const ju=function(){return"undefined"==typeof window?null:window};var Au=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ju();const r=t=>e(t);if(r.version="3.0.6",r.removed=[],!t||!t.document||9!==t.document.nodeType)return r.isSupported=!1,r;let{document:n}=t;const i=n,o=i.currentScript,{DocumentFragment:a,HTMLTemplateElement:c,Node:l,Element:s,NodeFilter:u,NamedNodeMap:p=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:f,DOMParser:d,trustedTypes:h}=t,y=s.prototype,m=nu(y,"cloneNode"),v=nu(y,"nextSibling"),g=nu(y,"childNodes"),b=nu(y,"parentNode");if("function"==typeof c){const e=n.createElement("template");e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let x,w="";const{implementation:O,createNodeIterator:k,createDocumentFragment:S,getElementsByTagName:j}=n,{importNode:A}=i;let E={};r.isSupported="function"==typeof Ds&&"function"==typeof b&&O&&void 0!==O.createHTMLDocument;const{MUSTACHE_EXPR:P,ERB_EXPR:T,TMPLIT_EXPR:C,DATA_ATTR:I,ARIA_ATTR:D,IS_SCRIPT_OR_DATA:M,ATTR_WHITESPACE:R}=Su;let{IS_ALLOWED_URI:N}=Su,B=null;const L=tu({},[...iu,...ou,...au,...lu,...uu]);let _=null;const z=tu({},[...pu,...fu,...du,...hu]);let $=Object.seal(zs(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),F=null,W=null,U=!0,q=!0,G=!1,H=!0,X=!1,V=!1,K=!1,Y=!1,Z=!1,Q=!1,J=!1,ee=!0,te=!1,re=!0,ne=!1,ie={},oe=null;const ae=tu({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let ce=null;const le=tu({},["audio","video","img","source","image","track"]);let se=null;const ue=tu({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),pe="http://www.w3.org/1998/Math/MathML",fe="http://www.w3.org/2000/svg",de="http://www.w3.org/1999/xhtml";let he=de,ye=!1,me=null;const ve=tu({},[pe,fe,de],Hs);let ge=null;const be=["application/xhtml+xml","text/html"];let xe=null,we=null;const Oe=n.createElement("form"),ke=function(e){return e instanceof RegExp||e instanceof Function},Se=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!we||we!==e){if(e&&"object"==typeof e||(e={}),e=ru(e),ge=ge=-1===be.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,xe="application/xhtml+xml"===ge?Hs:Gs,B="ALLOWED_TAGS"in e?tu({},e.ALLOWED_TAGS,xe):L,_="ALLOWED_ATTR"in e?tu({},e.ALLOWED_ATTR,xe):z,me="ALLOWED_NAMESPACES"in e?tu({},e.ALLOWED_NAMESPACES,Hs):ve,se="ADD_URI_SAFE_ATTR"in e?tu(ru(ue),e.ADD_URI_SAFE_ATTR,xe):ue,ce="ADD_DATA_URI_TAGS"in e?tu(ru(le),e.ADD_DATA_URI_TAGS,xe):le,oe="FORBID_CONTENTS"in e?tu({},e.FORBID_CONTENTS,xe):ae,F="FORBID_TAGS"in e?tu({},e.FORBID_TAGS,xe):{},W="FORBID_ATTR"in e?tu({},e.FORBID_ATTR,xe):{},ie="USE_PROFILES"in e&&e.USE_PROFILES,U=!1!==e.ALLOW_ARIA_ATTR,q=!1!==e.ALLOW_DATA_ATTR,G=e.ALLOW_UNKNOWN_PROTOCOLS||!1,H=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,X=e.SAFE_FOR_TEMPLATES||!1,V=e.WHOLE_DOCUMENT||!1,Z=e.RETURN_DOM||!1,Q=e.RETURN_DOM_FRAGMENT||!1,J=e.RETURN_TRUSTED_TYPE||!1,Y=e.FORCE_BODY||!1,ee=!1!==e.SANITIZE_DOM,te=e.SANITIZE_NAMED_PROPS||!1,re=!1!==e.KEEP_CONTENT,ne=e.IN_PLACE||!1,N=e.ALLOWED_URI_REGEXP||xu,he=e.NAMESPACE||de,$=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ke(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&($.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ke(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&($.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&($.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),X&&(q=!1),Q&&(Z=!0),ie&&(B=tu({},[...uu]),_=[],!0===ie.html&&(tu(B,iu),tu(_,pu)),!0===ie.svg&&(tu(B,ou),tu(_,fu),tu(_,hu)),!0===ie.svgFilters&&(tu(B,au),tu(_,fu),tu(_,hu)),!0===ie.mathMl&&(tu(B,lu),tu(_,du),tu(_,hu))),e.ADD_TAGS&&(B===L&&(B=ru(B)),tu(B,e.ADD_TAGS,xe)),e.ADD_ATTR&&(_===z&&(_=ru(_)),tu(_,e.ADD_ATTR,xe)),e.ADD_URI_SAFE_ATTR&&tu(se,e.ADD_URI_SAFE_ATTR,xe),e.FORBID_CONTENTS&&(oe===ae&&(oe=ru(oe)),tu(oe,e.FORBID_CONTENTS,xe)),re&&(B["#text"]=!0),V&&tu(B,["html","head","body"]),B.table&&(tu(B,["tbody"]),delete F.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw Qs('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw Qs('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');x=e.TRUSTED_TYPES_POLICY,w=x.createHTML("")}else void 0===x&&(x=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let r=null;const n="data-tt-policy-suffix";t&&t.hasAttribute(n)&&(r=t.getAttribute(n));const i="dompurify"+(r?"#"+r:"");try{return e.createPolicy(i,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+i+" could not be created."),null}}(h,o)),null!==x&&"string"==typeof w&&(w=x.createHTML(""));Ls&&Ls(e),we=e}},je=tu({},["mi","mo","mn","ms","mtext"]),Ae=tu({},["foreignobject","desc","title","annotation-xml"]),Ee=tu({},["title","style","font","a","script"]),Pe=tu({},ou);tu(Pe,au),tu(Pe,cu);const Te=tu({},lu);tu(Te,su);const Ce=function(e){qs(r.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},Ie=function(e,t){try{qs(r.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){qs(r.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!_[e])if(Z||Q)try{Ce(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},De=function(e){let t=null,r=null;if(Y)e="<remove></remove>"+e;else{const t=Xs(e,/^[\r\n\t ]+/);r=t&&t[0]}"application/xhtml+xml"===ge&&he===de&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const i=x?x.createHTML(e):e;if(he===de)try{t=(new d).parseFromString(i,ge)}catch(e){}if(!t||!t.documentElement){t=O.createDocument(he,"template",null);try{t.documentElement.innerHTML=ye?w:i}catch(e){}}const o=t.body||t.documentElement;return e&&r&&o.insertBefore(n.createTextNode(r),o.childNodes[0]||null),he===de?j.call(t,V?"html":"body")[0]:V?t.documentElement:o},Me=function(e){return k.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT,null)},Re=function(e){return"function"==typeof l&&e instanceof l},Ne=function(e,t,n){E[e]&&Ws(E[e],(e=>{e.call(r,t,n,we)}))},Be=function(e){let t=null;if(Ne("beforeSanitizeElements",e,null),(n=e)instanceof f&&("string"!=typeof n.nodeName||"string"!=typeof n.textContent||"function"!=typeof n.removeChild||!(n.attributes instanceof p)||"function"!=typeof n.removeAttribute||"function"!=typeof n.setAttribute||"string"!=typeof n.namespaceURI||"function"!=typeof n.insertBefore||"function"!=typeof n.hasChildNodes))return Ce(e),!0;var n;const i=xe(e.nodeName);if(Ne("uponSanitizeElement",e,{tagName:i,allowedTags:B}),e.hasChildNodes()&&!Re(e.firstElementChild)&&Zs(/<[/\w]/g,e.innerHTML)&&Zs(/<[/\w]/g,e.textContent))return Ce(e),!0;if(!B[i]||F[i]){if(!F[i]&&_e(i)){if($.tagNameCheck instanceof RegExp&&Zs($.tagNameCheck,i))return!1;if($.tagNameCheck instanceof Function&&$.tagNameCheck(i))return!1}if(re&&!oe[i]){const t=b(e)||e.parentNode,r=g(e)||e.childNodes;if(r&&t)for(let n=r.length-1;n>=0;--n)t.insertBefore(m(r[n],!0),v(e))}return Ce(e),!0}return e instanceof s&&!function(e){let t=b(e);t&&t.tagName||(t={namespaceURI:he,tagName:"template"});const r=Gs(e.tagName),n=Gs(t.tagName);return!!me[e.namespaceURI]&&(e.namespaceURI===fe?t.namespaceURI===de?"svg"===r:t.namespaceURI===pe?"svg"===r&&("annotation-xml"===n||je[n]):Boolean(Pe[r]):e.namespaceURI===pe?t.namespaceURI===de?"math"===r:t.namespaceURI===fe?"math"===r&&Ae[n]:Boolean(Te[r]):e.namespaceURI===de?!(t.namespaceURI===fe&&!Ae[n])&&!(t.namespaceURI===pe&&!je[n])&&!Te[r]&&(Ee[r]||!Pe[r]):!("application/xhtml+xml"!==ge||!me[e.namespaceURI]))}(e)?(Ce(e),!0):"noscript"!==i&&"noembed"!==i&&"noframes"!==i||!Zs(/<\/no(script|embed|frames)/i,e.innerHTML)?(X&&3===e.nodeType&&(t=e.textContent,Ws([P,T,C],(e=>{t=Vs(t,e," ")})),e.textContent!==t&&(qs(r.removed,{element:e.cloneNode()}),e.textContent=t)),Ne("afterSanitizeElements",e,null),!1):(Ce(e),!0)},Le=function(e,t,r){if(ee&&("id"===t||"name"===t)&&(r in n||r in Oe))return!1;if(q&&!W[t]&&Zs(I,t));else if(U&&Zs(D,t));else if(!_[t]||W[t]){if(!(_e(e)&&($.tagNameCheck instanceof RegExp&&Zs($.tagNameCheck,e)||$.tagNameCheck instanceof Function&&$.tagNameCheck(e))&&($.attributeNameCheck instanceof RegExp&&Zs($.attributeNameCheck,t)||$.attributeNameCheck instanceof Function&&$.attributeNameCheck(t))||"is"===t&&$.allowCustomizedBuiltInElements&&($.tagNameCheck instanceof RegExp&&Zs($.tagNameCheck,r)||$.tagNameCheck instanceof Function&&$.tagNameCheck(r))))return!1}else if(se[t]);else if(Zs(N,Vs(r,R,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==Ks(r,"data:")||!ce[e])if(G&&!Zs(M,Vs(r,R,"")));else if(r)return!1;return!0},_e=function(e){return e.indexOf("-")>0},ze=function(e){Ne("beforeSanitizeAttributes",e,null);const{attributes:t}=e;if(!t)return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:_};let i=t.length;for(;i--;){const o=t[i],{name:a,namespaceURI:c,value:l}=o,s=xe(a);let u="value"===a?l:Ys(l);if(n.attrName=s,n.attrValue=u,n.keepAttr=!0,n.forceKeepAttr=void 0,Ne("uponSanitizeAttribute",e,n),u=n.attrValue,n.forceKeepAttr)continue;if(Ie(a,e),!n.keepAttr)continue;if(!H&&Zs(/\/>/i,u)){Ie(a,e);continue}X&&Ws([P,T,C],(e=>{u=Vs(u,e," ")}));const p=xe(e.nodeName);if(Le(p,s,u)){if(!te||"id"!==s&&"name"!==s||(Ie(a,e),u="user-content-"+u),x&&"object"==typeof h&&"function"==typeof h.getAttributeType)if(c);else switch(h.getAttributeType(p,s)){case"TrustedHTML":u=x.createHTML(u);break;case"TrustedScriptURL":u=x.createScriptURL(u)}try{c?e.setAttributeNS(c,a,u):e.setAttribute(a,u),Us(r.removed)}catch(e){}}}Ne("afterSanitizeAttributes",e,null)},$e=function e(t){let r=null;const n=Me(t);for(Ne("beforeSanitizeShadowDOM",t,null);r=n.nextNode();)Ne("uponSanitizeShadowNode",r,null),Be(r)||(r.content instanceof a&&e(r.content),ze(r));Ne("afterSanitizeShadowDOM",t,null)};return r.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,o=null,c=null,s=null;if(ye=!e,ye&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Re(e)){if("function"!=typeof e.toString)throw Qs("toString is not a function");if("string"!=typeof(e=e.toString()))throw Qs("dirty is not a string, aborting")}if(!r.isSupported)return e;if(K||Se(t),r.removed=[],"string"==typeof e&&(ne=!1),ne){if(e.nodeName){const t=xe(e.nodeName);if(!B[t]||F[t])throw Qs("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof l)n=De("\x3c!----\x3e"),o=n.ownerDocument.importNode(e,!0),1===o.nodeType&&"BODY"===o.nodeName||"HTML"===o.nodeName?n=o:n.appendChild(o);else{if(!Z&&!X&&!V&&-1===e.indexOf("<"))return x&&J?x.createHTML(e):e;if(n=De(e),!n)return Z?null:J?w:""}n&&Y&&Ce(n.firstChild);const u=Me(ne?e:n);for(;c=u.nextNode();)Be(c)||(c.content instanceof a&&$e(c.content),ze(c));if(ne)return e;if(Z){if(Q)for(s=S.call(n.ownerDocument);n.firstChild;)s.appendChild(n.firstChild);else s=n;return(_.shadowroot||_.shadowrootmode)&&(s=A.call(i,s,!0)),s}let p=V?n.outerHTML:n.innerHTML;return V&&B["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&Zs(ku,n.ownerDocument.doctype.name)&&(p="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+p),X&&Ws([P,T,C],(e=>{p=Vs(p,e," ")})),x&&J?x.createHTML(p):p},r.setConfig=function(){Se(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),K=!0},r.clearConfig=function(){we=null,K=!1},r.isValidAttribute=function(e,t,r){we||Se({});const n=xe(e),i=xe(t);return Le(n,i,r)},r.addHook=function(e,t){"function"==typeof t&&(E[e]=E[e]||[],qs(E[e],t))},r.removeHook=function(e){if(E[e])return Us(E[e])},r.removeHooks=function(e){E[e]&&(E[e]=[])},r.removeAllHooks=function(){E={}},r}();let Eu={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function Pu(e){Eu=e}const Tu=/[&<>"']/,Cu=new RegExp(Tu.source,"g"),Iu=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,Du=new RegExp(Iu.source,"g"),Mu={"&":"&","<":"<",">":">",'"':""","'":"'"},Ru=e=>Mu[e];function Nu(e,t){if(t){if(Tu.test(e))return e.replace(Cu,Ru)}else if(Iu.test(e))return e.replace(Du,Ru);return e}const Bu=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function Lu(e){return e.replace(Bu,((e,t)=>"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""))}const _u=/(^|[^\[])\^/g;function zu(e,t){e="string"==typeof e?e:e.source,t=t||"";const r={replace:(t,n)=>(n=(n="object"==typeof n&&"source"in n?n.source:n).replace(_u,"$1"),e=e.replace(t,n),r),getRegex:()=>new RegExp(e,t)};return r}function $u(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch(e){return null}return e}const Fu={exec:()=>null};function Wu(e,t){const r=e.replace(/\|/g,((e,t,r)=>{let n=!1,i=t;for(;--i>=0&&"\\"===r[i];)n=!n;return n?"|":" |"})).split(/ \|/);let n=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;n<r.length;n++)r[n]=r[n].trim().replace(/\\\|/g,"|");return r}function Uu(e,t,r){const n=e.length;if(0===n)return"";let i=0;for(;i<n;){const o=e.charAt(n-i-1);if(o!==t||r){if(o===t||!r)break;i++}else i++}return e.slice(0,n-i)}function qu(e,t,r,n){const i=t.href,o=t.title?Nu(t.title):null,a=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){n.state.inLink=!0;const e={type:"link",raw:r,href:i,title:o,text:a,tokens:n.inlineTokens(a)};return n.state.inLink=!1,e}return{type:"image",raw:r,href:i,title:o,text:Nu(a)}}class Gu{options;rules;lexer;constructor(e){this.options=e||Eu}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:Uu(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],r=function(e,t){const r=e.match(/^(\s+)(?:```)/);if(null===r)return t;const n=r[1];return t.split("\n").map((e=>{const t=e.match(/^\s+/);if(null===t)return e;const[r]=t;return r.length>=n.length?e.slice(n.length):e})).join("\n")}(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline._escapes,"$1"):t[2],text:r}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){const t=Uu(e,"#");this.options.pedantic?e=t.trim():t&&!/ $/.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){const e=Uu(t[0].replace(/^ *>[ \t]?/gm,""),"\n"),r=this.lexer.state.top;this.lexer.state.top=!0;const n=this.lexer.blockTokens(e);return this.lexer.state.top=r,{type:"blockquote",raw:t[0],tokens:n,text:e}}}list(e){let t=this.rules.block.list.exec(e);if(t){let r=t[1].trim();const n=r.length>1,i={type:"list",raw:"",ordered:n,start:n?+r.slice(0,-1):"",loose:!1,items:[]};r=n?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=n?r:"[*+-]");const o=new RegExp(`^( {0,3}${r})((?:[\t ][^\\n]*)?(?:\\n|$))`);let a="",c="",l=!1;for(;e;){let r=!1;if(!(t=o.exec(e)))break;if(this.rules.block.hr.test(e))break;a=t[0],e=e.substring(a.length);let n=t[2].split("\n",1)[0].replace(/^\t+/,(e=>" ".repeat(3*e.length))),s=e.split("\n",1)[0],u=0;this.options.pedantic?(u=2,c=n.trimStart()):(u=t[2].search(/[^ ]/),u=u>4?1:u,c=n.slice(u),u+=t[1].length);let p=!1;if(!n&&/^ *$/.test(s)&&(a+=s+"\n",e=e.substring(s.length+1),r=!0),!r){const t=new RegExp(`^ {0,${Math.min(3,u-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),r=new RegExp(`^ {0,${Math.min(3,u-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),i=new RegExp(`^ {0,${Math.min(3,u-1)}}(?:\`\`\`|~~~)`),o=new RegExp(`^ {0,${Math.min(3,u-1)}}#`);for(;e;){const l=e.split("\n",1)[0];if(s=l,this.options.pedantic&&(s=s.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),i.test(s))break;if(o.test(s))break;if(t.test(s))break;if(r.test(e))break;if(s.search(/[^ ]/)>=u||!s.trim())c+="\n"+s.slice(u);else{if(p)break;if(n.search(/[^ ]/)>=4)break;if(i.test(n))break;if(o.test(n))break;if(r.test(n))break;c+="\n"+s}p||s.trim()||(p=!0),a+=l+"\n",e=e.substring(l.length+1),n=s.slice(u)}}i.loose||(l?i.loose=!0:/\n *\n *$/.test(a)&&(l=!0));let f,d=null;this.options.gfm&&(d=/^\[[ xX]\] /.exec(c),d&&(f="[ ] "!==d[0],c=c.replace(/^\[[ xX]\] +/,""))),i.items.push({type:"list_item",raw:a,task:!!d,checked:f,loose:!1,text:c,tokens:[]}),i.raw+=a}i.items[i.items.length-1].raw=a.trimEnd(),i.items[i.items.length-1].text=c.trimEnd(),i.raw=i.raw.trimEnd();for(let e=0;e<i.items.length;e++)if(this.lexer.state.top=!1,i.items[e].tokens=this.lexer.blockTokens(i.items[e].text,[]),!i.loose){const t=i.items[e].tokens.filter((e=>"space"===e.type)),r=t.length>0&&t.some((e=>/\n.*\n/.test(e.raw)));i.loose=r}if(i.loose)for(let e=0;e<i.items.length;e++)i.items[e].loose=!0;return i}}html(e){const t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:"pre"===t[1]||"script"===t[1]||"style"===t[1],text:t[0]}}def(e){const t=this.rules.block.def.exec(e);if(t){const e=t[1].toLowerCase().replace(/\s+/g," "),r=t[2]?t[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline._escapes,"$1"):"",n=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline._escapes,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:r,title:n}}}table(e){const t=this.rules.block.table.exec(e);if(t){if(!/[:|]/.test(t[2]))return;const e={type:"table",raw:t[0],header:Wu(t[1]).map((e=>({text:e,tokens:[]}))),align:t[2].replace(/^\||\| *$/g,"").split("|"),rows:t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(e.header.length===e.align.length){let t,r,n,i,o=e.align.length;for(t=0;t<o;t++){const r=e.align[t];r&&(/^ *-+: *$/.test(r)?e.align[t]="right":/^ *:-+: *$/.test(r)?e.align[t]="center":/^ *:-+ *$/.test(r)?e.align[t]="left":e.align[t]=null)}for(o=e.rows.length,t=0;t<o;t++)e.rows[t]=Wu(e.rows[t],e.header.length).map((e=>({text:e,tokens:[]})));for(o=e.header.length,r=0;r<o;r++)e.header[r].tokens=this.lexer.inline(e.header[r].text);for(o=e.rows.length,r=0;r<o;r++)for(i=e.rows[r],n=0;n<i.length;n++)i[n].tokens=this.lexer.inline(i[n].text);return e}}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:Nu(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^<a /i.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&/^</.test(e)){if(!/>$/.test(e))return;const t=Uu(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;let r=0;for(let n=0;n<e.length;n++)if("\\"===e[n])n++;else if(e[n]===t[0])r++;else if(e[n]===t[1]&&(r--,r<0))return n;return-1}(t[2],"()");if(e>-1){const r=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,r).trim(),t[3]=""}}let r=t[2],n="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(r);e&&(r=e[1],n=e[3])}else n=t[3]?t[3].slice(1,-1):"";return r=r.trim(),/^</.test(r)&&(r=this.options.pedantic&&!/>$/.test(e)?r.slice(1):r.slice(1,-1)),qu(t,{href:r?r.replace(this.rules.inline._escapes,"$1"):r,title:n?n.replace(this.rules.inline._escapes,"$1"):n},t[0],this.lexer)}}reflink(e,t){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){let e=(r[2]||r[1]).replace(/\s+/g," ");if(e=t[e.toLowerCase()],!e){const e=r[0].charAt(0);return{type:"text",raw:e,text:e}}return qu(r,e,r[0],this.lexer)}}emStrong(e,t,r=""){let n=this.rules.inline.emStrong.lDelim.exec(e);if(n&&(!n[3]||!r.match(/[\p{L}\p{N}]/u))&&(!n[1]&&!n[2]||!r||this.rules.inline.punctuation.exec(r))){const r=[...n[0]].length-1;let i,o,a=r,c=0;const l="*"===n[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(l.lastIndex=0,t=t.slice(-1*e.length+r);null!=(n=l.exec(t));){if(i=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!i)continue;if(o=[...i].length,n[3]||n[4]){a+=o;continue}if((n[5]||n[6])&&r%3&&!((r+o)%3)){c+=o;continue}if(a-=o,a>0)continue;o=Math.min(o,o+a+c);const t=[...n[0]][0].length,l=e.slice(0,r+n.index+t+o);if(Math.min(r,o)%2){const e=l.slice(1,-1);return{type:"em",raw:l,text:e,tokens:this.lexer.inlineTokens(e)}}const s=l.slice(2,-2);return{type:"strong",raw:l,text:s,tokens:this.lexer.inlineTokens(s)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," ");const r=/[^ ]/.test(e),n=/^ /.test(e)&&/ $/.test(e);return r&&n&&(e=e.substring(1,e.length-1)),e=Nu(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let e,r;return"@"===t[2]?(e=Nu(t[1]),r="mailto:"+e):(e=Nu(t[1]),r=e),{type:"link",raw:t[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,r;if("@"===t[2])e=Nu(t[0]),r="mailto:"+e;else{let n;do{n=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])[0]}while(n!==t[0]);e=Nu(t[0]),r="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){let e;return e=this.lexer.state.inRawBlock?t[0]:Nu(t[0]),{type:"text",raw:t[0],text:e}}}}const Hu={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:Fu,lheading:/^(?!bull )((?:.|\n(?!\s*?\n|bull ))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};Hu.def=zu(Hu.def).replace("label",Hu._label).replace("title",Hu._title).getRegex(),Hu.bullet=/(?:[*+-]|\d{1,9}[.)])/,Hu.listItemStart=zu(/^( *)(bull) */).replace("bull",Hu.bullet).getRegex(),Hu.list=zu(Hu.list).replace(/bull/g,Hu.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Hu.def.source+")").getRegex(),Hu._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Hu._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,Hu.html=zu(Hu.html,"i").replace("comment",Hu._comment).replace("tag",Hu._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Hu.lheading=zu(Hu.lheading).replace(/bull/g,Hu.bullet).getRegex(),Hu.paragraph=zu(Hu._paragraph).replace("hr",Hu.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Hu._tag).getRegex(),Hu.blockquote=zu(Hu.blockquote).replace("paragraph",Hu.paragraph).getRegex(),Hu.normal={...Hu},Hu.gfm={...Hu.normal,table:"^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"},Hu.gfm.table=zu(Hu.gfm.table).replace("hr",Hu.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Hu._tag).getRegex(),Hu.gfm.paragraph=zu(Hu._paragraph).replace("hr",Hu.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Hu.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Hu._tag).getRegex(),Hu.pedantic={...Hu.normal,html:zu("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",Hu._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Fu,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:zu(Hu.normal._paragraph).replace("hr",Hu.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",Hu.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()};const Xu={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Fu,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,rDelimAst:/^[^_*]*?__[^_*]*?\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\*)[punct](\*+)(?=[\s]|$)|[^punct\s](\*+)(?!\*)(?=[punct\s]|$)|(?!\*)[punct\s](\*+)(?=[^punct\s])|[\s](\*+)(?!\*)(?=[punct])|(?!\*)[punct](\*+)(?!\*)(?=[punct])|[^punct\s](\*+)(?=[^punct\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?_[^_*]*?(?=\*\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\s]|$)|[^punct\s](_+)(?!_)(?=[punct\s]|$)|(?!_)[punct\s](_+)(?=[^punct\s])|[\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:Fu,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^((?![*_])[\spunctuation])/,_punctuation:"\\p{P}$+<=>`^|~"};Xu.punctuation=zu(Xu.punctuation,"u").replace(/punctuation/g,Xu._punctuation).getRegex(),Xu.blockSkip=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,Xu.anyPunctuation=/\\[punct]/g,Xu._escapes=/\\([punct])/g,Xu._comment=zu(Hu._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),Xu.emStrong.lDelim=zu(Xu.emStrong.lDelim,"u").replace(/punct/g,Xu._punctuation).getRegex(),Xu.emStrong.rDelimAst=zu(Xu.emStrong.rDelimAst,"gu").replace(/punct/g,Xu._punctuation).getRegex(),Xu.emStrong.rDelimUnd=zu(Xu.emStrong.rDelimUnd,"gu").replace(/punct/g,Xu._punctuation).getRegex(),Xu.anyPunctuation=zu(Xu.anyPunctuation,"gu").replace(/punct/g,Xu._punctuation).getRegex(),Xu._escapes=zu(Xu._escapes,"gu").replace(/punct/g,Xu._punctuation).getRegex(),Xu._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,Xu._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,Xu.autolink=zu(Xu.autolink).replace("scheme",Xu._scheme).replace("email",Xu._email).getRegex(),Xu._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,Xu.tag=zu(Xu.tag).replace("comment",Xu._comment).replace("attribute",Xu._attribute).getRegex(),Xu._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Xu._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,Xu._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,Xu.link=zu(Xu.link).replace("label",Xu._label).replace("href",Xu._href).replace("title",Xu._title).getRegex(),Xu.reflink=zu(Xu.reflink).replace("label",Xu._label).replace("ref",Hu._label).getRegex(),Xu.nolink=zu(Xu.nolink).replace("ref",Hu._label).getRegex(),Xu.reflinkSearch=zu(Xu.reflinkSearch,"g").replace("reflink",Xu.reflink).replace("nolink",Xu.nolink).getRegex(),Xu.normal={...Xu},Xu.pedantic={...Xu.normal,strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:zu(/^!?\[(label)\]\((.*?)\)/).replace("label",Xu._label).getRegex(),reflink:zu(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Xu._label).getRegex()},Xu.gfm={...Xu.normal,escape:zu(Xu.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},Xu.gfm.url=zu(Xu.gfm.url,"i").replace("email",Xu.gfm._extended_email).getRegex(),Xu.breaks={...Xu.gfm,br:zu(Xu.br).replace("{2,}","*").getRegex(),text:zu(Xu.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()};class Vu{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Eu,this.options.tokenizer=this.options.tokenizer||new Gu,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const t={block:Hu.normal,inline:Xu.normal};this.options.pedantic?(t.block=Hu.pedantic,t.inline=Xu.pedantic):this.options.gfm&&(t.block=Hu.gfm,this.options.breaks?t.inline=Xu.breaks:t.inline=Xu.gfm),this.tokenizer.rules=t}static get rules(){return{block:Hu,inline:Xu}}static lex(e,t){return new Vu(t).lex(e)}static lexInline(e,t){return new Vu(t).inlineTokens(e)}lex(e){let t;for(e=e.replace(/\r\n|\r/g,"\n"),this.blockTokens(e,this.tokens);t=this.inlineQueue.shift();)this.inlineTokens(t.src,t.tokens);return this.tokens}blockTokens(e,t=[]){let r,n,i,o;for(e=this.options.pedantic?e.replace(/\t/g," ").replace(/^ +$/gm,""):e.replace(/^( *)(\t+)/gm,((e,t,r)=>t+" ".repeat(r.length)));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((n=>!!(r=n.call({lexer:this},e,t))&&(e=e.substring(r.raw.length),t.push(r),!0)))))if(r=this.tokenizer.space(e))e=e.substring(r.raw.length),1===r.raw.length&&t.length>0?t[t.length-1].raw+="\n":t.push(r);else if(r=this.tokenizer.code(e))e=e.substring(r.raw.length),n=t[t.length-1],!n||"paragraph"!==n.type&&"text"!==n.type?t.push(r):(n.raw+="\n"+r.raw,n.text+="\n"+r.text,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(r=this.tokenizer.fences(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.heading(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.hr(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.blockquote(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.list(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.html(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.def(e))e=e.substring(r.raw.length),n=t[t.length-1],!n||"paragraph"!==n.type&&"text"!==n.type?this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title}):(n.raw+="\n"+r.raw,n.text+="\n"+r.raw,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(r=this.tokenizer.table(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.lheading(e))e=e.substring(r.raw.length),t.push(r);else{if(i=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const r=e.slice(1);let n;this.options.extensions.startBlock.forEach((e=>{n=e.call({lexer:this},r),"number"==typeof n&&n>=0&&(t=Math.min(t,n))})),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i)))n=t[t.length-1],o&&"paragraph"===n.type?(n.raw+="\n"+r.raw,n.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):t.push(r),o=i.length!==e.length,e=e.substring(r.raw.length);else if(r=this.tokenizer.text(e))e=e.substring(r.raw.length),n=t[t.length-1],n&&"text"===n.type?(n.raw+="\n"+r.raw,n.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):t.push(r);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let r,n,i,o,a,c,l=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(l));)e.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(l));)l=l.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(o=this.tokenizer.rules.inline.anyPunctuation.exec(l));)l=l.slice(0,o.index)+"++"+l.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(a||(c=""),a=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((n=>!!(r=n.call({lexer:this},e,t))&&(e=e.substring(r.raw.length),t.push(r),!0)))))if(r=this.tokenizer.escape(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.tag(e))e=e.substring(r.raw.length),n=t[t.length-1],n&&"text"===r.type&&"text"===n.type?(n.raw+=r.raw,n.text+=r.text):t.push(r);else if(r=this.tokenizer.link(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(r.raw.length),n=t[t.length-1],n&&"text"===r.type&&"text"===n.type?(n.raw+=r.raw,n.text+=r.text):t.push(r);else if(r=this.tokenizer.emStrong(e,l,c))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.codespan(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.br(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.del(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.autolink(e))e=e.substring(r.raw.length),t.push(r);else if(this.state.inLink||!(r=this.tokenizer.url(e))){if(i=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const r=e.slice(1);let n;this.options.extensions.startInline.forEach((e=>{n=e.call({lexer:this},r),"number"==typeof n&&n>=0&&(t=Math.min(t,n))})),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(r=this.tokenizer.inlineText(i))e=e.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(c=r.raw.slice(-1)),a=!0,n=t[t.length-1],n&&"text"===n.type?(n.raw+=r.raw,n.text+=r.text):t.push(r);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(r.raw.length),t.push(r);return t}}class Ku{options;constructor(e){this.options=e||Eu}code(e,t,r){const n=(t||"").match(/^\S*/)?.[0];return e=e.replace(/\n$/,"")+"\n",n?'<pre><code class="language-'+Nu(n)+'">'+(r?e:Nu(e,!0))+"</code></pre>\n":"<pre><code>"+(r?e:Nu(e,!0))+"</code></pre>\n"}blockquote(e){return`<blockquote>\n${e}</blockquote>\n`}html(e,t){return e}heading(e,t,r){return`<h${t}>${e}</h${t}>\n`}hr(){return"<hr>\n"}list(e,t,r){const n=t?"ol":"ul";return"<"+n+(t&&1!==r?' start="'+r+'"':"")+">\n"+e+"</"+n+">\n"}listitem(e,t,r){return`<li>${e}</li>\n`}checkbox(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph(e){return`<p>${e}</p>\n`}table(e,t){return t&&(t=`<tbody>${t}</tbody>`),"<table>\n<thead>\n"+e+"</thead>\n"+t+"</table>\n"}tablerow(e){return`<tr>\n${e}</tr>\n`}tablecell(e,t){const r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+`</${r}>\n`}strong(e){return`<strong>${e}</strong>`}em(e){return`<em>${e}</em>`}codespan(e){return`<code>${e}</code>`}br(){return"<br>"}del(e){return`<del>${e}</del>`}link(e,t,r){const n=$u(e);if(null===n)return r;let i='<a href="'+(e=n)+'"';return t&&(i+=' title="'+t+'"'),i+=">"+r+"</a>",i}image(e,t,r){const n=$u(e);if(null===n)return r;let i=`<img src="${e=n}" alt="${r}"`;return t&&(i+=` title="${t}"`),i+=">",i}text(e){return e}}class Yu{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,r){return""+r}image(e,t,r){return""+r}br(){return""}}class Zu{options;renderer;textRenderer;constructor(e){this.options=e||Eu,this.options.renderer=this.options.renderer||new Ku,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Yu}static parse(e,t){return new Zu(t).parse(e)}static parseInline(e,t){return new Zu(t).parseInline(e)}parse(e,t=!0){let r="";for(let n=0;n<e.length;n++){const i=e[n];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[i.type]){const e=i,t=this.options.extensions.renderers[e.type].call({parser:this},e);if(!1!==t||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(e.type)){r+=t||"";continue}}switch(i.type){case"space":continue;case"hr":r+=this.renderer.hr();continue;case"heading":{const e=i;r+=this.renderer.heading(this.parseInline(e.tokens),e.depth,Lu(this.parseInline(e.tokens,this.textRenderer)));continue}case"code":{const e=i;r+=this.renderer.code(e.text,e.lang,!!e.escaped);continue}case"table":{const e=i;let t="",n="";for(let t=0;t<e.header.length;t++)n+=this.renderer.tablecell(this.parseInline(e.header[t].tokens),{header:!0,align:e.align[t]});t+=this.renderer.tablerow(n);let o="";for(let t=0;t<e.rows.length;t++){const r=e.rows[t];n="";for(let t=0;t<r.length;t++)n+=this.renderer.tablecell(this.parseInline(r[t].tokens),{header:!1,align:e.align[t]});o+=this.renderer.tablerow(n)}r+=this.renderer.table(t,o);continue}case"blockquote":{const e=i,t=this.parse(e.tokens);r+=this.renderer.blockquote(t);continue}case"list":{const e=i,t=e.ordered,n=e.start,o=e.loose;let a="";for(let t=0;t<e.items.length;t++){const r=e.items[t],n=r.checked,i=r.task;let c="";if(r.task){const e=this.renderer.checkbox(!!n);o?r.tokens.length>0&&"paragraph"===r.tokens[0].type?(r.tokens[0].text=e+" "+r.tokens[0].text,r.tokens[0].tokens&&r.tokens[0].tokens.length>0&&"text"===r.tokens[0].tokens[0].type&&(r.tokens[0].tokens[0].text=e+" "+r.tokens[0].tokens[0].text)):r.tokens.unshift({type:"text",text:e+" "}):c+=e+" "}c+=this.parse(r.tokens,o),a+=this.renderer.listitem(c,i,!!n)}r+=this.renderer.list(a,t,n);continue}case"html":{const e=i;r+=this.renderer.html(e.text,e.block);continue}case"paragraph":{const e=i;r+=this.renderer.paragraph(this.parseInline(e.tokens));continue}case"text":{let o=i,a=o.tokens?this.parseInline(o.tokens):o.text;for(;n+1<e.length&&"text"===e[n+1].type;)o=e[++n],a+="\n"+(o.tokens?this.parseInline(o.tokens):o.text);r+=t?this.renderer.paragraph(a):a;continue}default:{const e='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return r}parseInline(e,t){t=t||this.renderer;let r="";for(let n=0;n<e.length;n++){const i=e[n];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[i.type]){const e=this.options.extensions.renderers[i.type].call({parser:this},i);if(!1!==e||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type)){r+=e||"";continue}}switch(i.type){case"escape":{const e=i;r+=t.text(e.text);break}case"html":{const e=i;r+=t.html(e.text);break}case"link":{const e=i;r+=t.link(e.href,e.title,this.parseInline(e.tokens,t));break}case"image":{const e=i;r+=t.image(e.href,e.title,e.text);break}case"strong":{const e=i;r+=t.strong(this.parseInline(e.tokens,t));break}case"em":{const e=i;r+=t.em(this.parseInline(e.tokens,t));break}case"codespan":{const e=i;r+=t.codespan(e.text);break}case"br":r+=t.br();break;case"del":{const e=i;r+=t.del(this.parseInline(e.tokens,t));break}case"text":{const e=i;r+=t.text(e.text);break}default:{const e='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return r}}class Qu{options;constructor(e){this.options=e||Eu}static passThroughHooks=new Set(["preprocess","postprocess"]);preprocess(e){return e}postprocess(e){return e}}const Ju=new class{defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};options=this.setOptions;parse=this.#e(Vu.lex,Zu.parse);parseInline=this.#e(Vu.lexInline,Zu.parseInline);Parser=Zu;Renderer=Ku;TextRenderer=Yu;Lexer=Vu;Tokenizer=Gu;Hooks=Qu;constructor(...e){this.use(...e)}walkTokens(e,t){let r=[];for(const n of e)switch(r=r.concat(t.call(this,n)),n.type){case"table":{const e=n;for(const n of e.header)r=r.concat(this.walkTokens(n.tokens,t));for(const n of e.rows)for(const e of n)r=r.concat(this.walkTokens(e.tokens,t));break}case"list":{const e=n;r=r.concat(this.walkTokens(e.items,t));break}default:{const e=n;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach((n=>{r=r.concat(this.walkTokens(e[n],t))})):e.tokens&&(r=r.concat(this.walkTokens(e.tokens,t)))}}return r}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach((e=>{const r={...e};if(r.async=this.defaults.async||r.async||!1,e.extensions&&(e.extensions.forEach((e=>{if(!e.name)throw new Error("extension name required");if("renderer"in e){const r=t.renderers[e.name];t.renderers[e.name]=r?function(...t){let n=e.renderer.apply(this,t);return!1===n&&(n=r.apply(this,t)),n}:e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");const r=t[e.level];r?r.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)})),r.extensions=t),e.renderer){const t=this.defaults.renderer||new Ku(this.defaults);for(const r in e.renderer){const n=e.renderer[r],i=r,o=t[i];t[i]=(...e)=>{let r=n.apply(t,e);return!1===r&&(r=o.apply(t,e)),r||""}}r.renderer=t}if(e.tokenizer){const t=this.defaults.tokenizer||new Gu(this.defaults);for(const r in e.tokenizer){const n=e.tokenizer[r],i=r,o=t[i];t[i]=(...e)=>{let r=n.apply(t,e);return!1===r&&(r=o.apply(t,e)),r}}r.tokenizer=t}if(e.hooks){const t=this.defaults.hooks||new Qu;for(const r in e.hooks){const n=e.hooks[r],i=r,o=t[i];Qu.passThroughHooks.has(r)?t[i]=e=>{if(this.defaults.async)return Promise.resolve(n.call(t,e)).then((e=>o.call(t,e)));const r=n.call(t,e);return o.call(t,r)}:t[i]=(...e)=>{let r=n.apply(t,e);return!1===r&&(r=o.apply(t,e)),r}}r.hooks=t}if(e.walkTokens){const t=this.defaults.walkTokens,n=e.walkTokens;r.walkTokens=function(e){let r=[];return r.push(n.call(this,e)),t&&(r=r.concat(t.call(this,e))),r}}this.defaults={...this.defaults,...r}})),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return Vu.lex(e,t??this.defaults)}parser(e,t){return Zu.parse(e,t??this.defaults)}#e(e,t){return(r,n)=>{const i={...n},o={...this.defaults,...i};!0===this.defaults.async&&!1===i.async&&(o.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),o.async=!0);const a=this.#t(!!o.silent,!!o.async);if(null==r)return a(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof r)return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(o.hooks&&(o.hooks.options=o),o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(r):r).then((t=>e(t,o))).then((e=>o.walkTokens?Promise.all(this.walkTokens(e,o.walkTokens)).then((()=>e)):e)).then((e=>t(e,o))).then((e=>o.hooks?o.hooks.postprocess(e):e)).catch(a);try{o.hooks&&(r=o.hooks.preprocess(r));const n=e(r,o);o.walkTokens&&this.walkTokens(n,o.walkTokens);let i=t(n,o);return o.hooks&&(i=o.hooks.postprocess(i)),i}catch(e){return a(e)}}}#t(e,t){return r=>{if(r.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="<p>An error occurred:</p><pre>"+Nu(r.message+"",!0)+"</pre>";return t?Promise.resolve(e):e}if(t)return Promise.reject(r);throw r}}};function ep(e,t){return Ju.parse(e,t)}function tp(e){var t=e.replace(/^[\u200B-\u200F\uFEFF]/,""),r=ep.parse(t);return Au.sanitize(r)}ep.options=ep.setOptions=function(e){return Ju.setOptions(e),ep.defaults=Ju.defaults,Pu(ep.defaults),ep},ep.getDefaults=function(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}},ep.defaults=Eu,ep.use=function(...e){return Ju.use(...e),ep.defaults=Ju.defaults,Pu(ep.defaults),ep},ep.walkTokens=function(e,t){return Ju.walkTokens(e,t)},ep.parseInline=Ju.parseInline,ep.Parser=Zu,ep.parser=Zu.parse,ep.Renderer=Ku,ep.TextRenderer=Yu,ep.Lexer=Vu,ep.lexer=Vu.lex,ep.Tokenizer=Gu,ep.Hooks=Qu,ep.parse=ep,ep.options,ep.setOptions,ep.use,ep.walkTokens,ep.parseInline,Zu.parse,Vu.lex;const rp=function(e){var t=(0,b.useState)(tp(e.text)),r=t[0],n=t[1];return(0,b.useEffect)((function(){if(e.updatedData&&e.updatedData.length>0){var t=e.updatedData[e.updatedData.length-1].text;n(tp(t))}}),[e.text,e.updatedData]),(0,u.jsx)(N(),{variant:"body2",dangerouslySetInnerHTML:{__html:r}})},np=function(e){var t=(0,b.useState)(tp(e.text)),r=t[0],n=t[1],i=(0,b.useState)(""),o=i[0],a=i[1];return(0,b.useEffect)((function(){if(e.updatedData&&e.updatedData.length>0){for(var t=e.text,r=0,i=e.updatedData;r<i.length;r++){var o=i[r];"string"!=typeof o.text?(t+=" [MISSING TEXT]",a("Some of the incoming text was not correctly formatted. Some data may be missing.")):t+=o.text}n(tp(t))}}),[e.text,e.updatedData]),(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(N(),{variant:"body2",dangerouslySetInnerHTML:{__html:r}}),o&&(0,u.jsx)(bs(),{severity:"error",children:o})]})},ip=require("@mui/material/Card");var op=r.n(ip);const ap=function(e){return(0,u.jsx)(N(),{variant:"caption",color:"textSecondary",children:(t=e.timestamp,$l(t)<86400?function(e){var t=$l(e);if(t<60)return"".concat(zl()("second",t,!0)," ago");if(t<3600){var r=Math.floor(t/60);return"".concat(zl()("minute",r,!0)," ago")}var n=Math.floor(t/3600);return"".concat(zl()("hour",n,!0)," ago")}(t):(r=t,n=new Date(r),i=navigator.language,o={month:"short",day:"numeric",hour:"numeric",minute:"2-digit",hour12:!0},$l(r)/86400>365&&(o.year="numeric"),n.toLocaleTimeString(i,o).replace(/,/g,"")))});var t,r,n,i,o};function cp(e){var t;return(0,u.jsxs)(L(),{id:e.message.id,className:"rustic-message-canvas",children:[(0,u.jsxs)(N(),{variant:"body1","data-cy":"sender",children:[e.message.sender,":"]}),(0,u.jsx)(op(),{variant:"outlined",className:"rustic-message-canvas-card",children:e.children}),e.message.lastThreadMessage&&(0,u.jsx)(N(),{variant:"caption",children:"last updated: "}),(0,u.jsx)(ap,{timestamp:(null===(t=e.message.lastThreadMessage)||void 0===t?void 0:t.timestamp)||e.message.timestamp}),e.messageInteractions&&e.messageInteractions(e.message)]})}const lp=function(e){return(0,u.jsx)(L(),{"data-cy":"message-space",className:"rustic-messages-space",children:e.messages&&e.messages.length>0&&e.messages.map((function(t){return(0,u.jsx)(cp,{message:t,messageInteractions:e.messageInteractions,children:(0,u.jsx)(ps,{message:t,supportedElements:e.supportedElements})},t.id)}))})},sp=require("@mui/material/AppBar");var up=r.n(sp);const pp=require("@mui/material/Toolbar");var fp=r.n(pp);const dp=function(t){var r=(0,e.useTheme)();return(0,u.jsx)(up(),{position:"fixed",color:"inherit",sx:{borderBottom:"1px solid ".concat(r.palette.divider)},"data-cy":"nav-bar",children:(0,u.jsxs)(fp(),{className:"rustic-nav-bar",children:[t.leftDrawerIcon&&(0,u.jsx)(T(),{color:"inherit","aria-label":t.leftDrawerAriaLabel,edge:"start",onClick:t.handleLeftDrawerToggle,className:"rustic-nav-bar-button","data-cy":"left-drawer-button",children:t.leftDrawerIcon}),t.logo,t.rightDrawerIcon&&(0,u.jsx)(T(),{color:"inherit","aria-label":t.rightDrawerAriaLabel,edge:"end",onClick:t.handleRightDrawerToggle,className:"rustic-nav-bar-button","data-cy":"right-drawer-button",children:t.rightDrawerIcon})]})})},hp=require("@mui/icons-material/AccountCircle");var yp=r.n(hp);const mp=require("@mui/icons-material/KeyboardArrowDown");var vp=r.n(mp);const gp=require("@mui/icons-material/SmartToy");var bp=r.n(gp);const xp=require("@mui/material/Button");var wp=r.n(xp);const Op=require("@mui/material/Dialog");var kp=r.n(Op);const Sp=require("@mui/material/DialogTitle");var jp=r.n(Sp);const Ap=require("@mui/material/Divider");var Ep=r.n(Ap);const Pp=require("@mui/material/List");var Tp=r.n(Pp);const Cp=require("@mui/material/ListItem");var Ip=r.n(Cp);const Dp=require("@mui/material/ListSubheader");var Mp,Rp,Np=r.n(Dp);!function(e){e.Owner="owner",e.Member="member"}(Mp||(Mp={})),function(e){e.Human="human",e.Agent="agent"}(Rp||(Rp={}));var Bp=function(e){var t=(0,b.useState)(!1),r=t[0],n=t[1],i=e.participants.length,o=r?e.participants:e.participants.slice(0,3),a="".concat(zl()(e.participantType,i)," (").concat(i,")"),c=r?"Show Less":"Show All ".concat(i);return 0===i?(0,u.jsx)(N(),{variant:"caption",className:"rustic-participant-list-no-participants-message",children:"There are currently no participants."}):(0,u.jsx)(Tp(),{"data-cy":"participant-list",className:"rustic-participant-list",subheader:(0,u.jsxs)(Np(),{disableSticky:!0,className:"rustic-participant-list-subheader",children:[(0,u.jsxs)(Ql.Box,{className:"rustic-participant-list-subheader-title",children:[e.participantTypeIcon,(0,u.jsx)(N(),{variant:"subtitle2",color:"text.secondary",children:a})]}),i>3&&(0,u.jsx)(wp(),{"data-cy":"toggle-participant-list-button",onClick:function(){return n(!r)},color:"primary",size:"small",startIcon:(0,u.jsx)(vp(),{}),children:c})]}),children:o.map((function(e){return(0,u.jsxs)(Ip(),{className:"rustic-participant-list-item","data-cy":"participant-list-item",children:[(0,u.jsx)(N(),{variant:"subtitle2",children:e.displayName}),(0,u.jsx)(N(),{variant:e.participantRole===Mp.Owner?"subtitle2":"caption","data-cy":"participant-role",children:Wl(e.participantRole)})]},e.id)}))})};const Lp=function(e){function t(e,t){return function(e){return function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}([],e,!0).sort((function(e,t){return t.participantRole===Mp.Owner?1:-1}))}(e.filter((function(e){return e.participantType===t})))}var r=t(e.participants,Rp.Human),n=t(e.participants,Rp.Agent),i="".concat(zl()("Participant",e.participants.length)," (").concat(e.participants.length,")");return(0,u.jsxs)(kp(),{open:e.isParticipantListOpen,onClose:e.onClose,className:"rustic-participants-container",maxWidth:"sm",fullWidth:!0,children:[(0,u.jsx)(jp(),{sx:{borderBottom:"1px solid",borderColor:"divider"},component:"h6",className:"rustic-participants-container-title","data-cy":"participants-dialog-title",children:i}),(0,u.jsx)(Bp,{participantType:"Human",participantTypeIcon:(0,u.jsx)(yp(),{}),participants:r}),n.length>0&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(Ep(),{className:"rustic-participants-container-divider"}),(0,u.jsx)(Bp,{participantType:"Agent",participantTypeIcon:(0,u.jsx)(bp(),{}),participants:n})]})]})},_p=require("@mui/material/Table");var zp=r.n(_p);const $p=require("@mui/material/TableBody");var Fp=r.n($p);const Wp=require("@mui/material/TableCell");var Up=r.n(Wp);const qp=require("@mui/material/TableContainer");var Gp=r.n(qp);const Hp=require("@mui/material/TableHead");var Xp=r.n(Hp);const Vp=require("@mui/material/TableRow");var Kp=r.n(Vp);function Yp(e){var t=Array.from(new Set(e.data.flatMap((function(e){return Object.keys(e)})))),r=e.headers||t;return(0,u.jsxs)(m(),{className:"rustic-table",children:[e.title&&(0,u.jsx)(N(),{variant:"body1","data-cy":"table-title",className:"rustic-table-title",children:e.title}),e.description&&(0,u.jsx)(N(),{variant:"subtitle2","data-cy":"table-description",children:e.description}),(0,u.jsx)(Gp(),{children:(0,u.jsxs)(zp(),{"aria-label":e.title||"a table of data",size:"small",children:[r.length>0&&(0,u.jsx)(Xp(),{children:(0,u.jsx)(Kp(),{children:r.map((function(e,t){return(0,u.jsx)(Up(),{children:Wl(e)},"header-".concat(t))}))})}),(0,u.jsx)(Fp(),{children:e.data.map((function(e,r){return(0,u.jsx)(Kp(),{children:t.map((function(t,n){return(0,u.jsx)(Up(),{children:e[t]},"cell-".concat(r,"x").concat(n))}))},"row-".concat(r))}))})]})})]})}const Zp=function(e){var t=(0,b.useState)(Au.sanitize(e.text)),r=t[0],n=t[1],i=(0,b.useState)(""),o=i[0],a=i[1];return(0,b.useEffect)((function(){if(e.updatedData&&e.updatedData.length>0){for(var t=e.text,r=0,i=e.updatedData;r<i.length;r++){var o=i[r];"string"!=typeof o.text&&(t+=" [MISSING TEXT]",a("Some of the incoming text was not correctly formatted. Some data may be missing.")),t+=o.text}n(Au.sanitize(t))}}),[e.text,e.updatedData]),(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(N(),{"data-cy":"streaming-text",variant:"body2",children:r}),o&&(0,u.jsx)(bs(),{severity:"error",children:o})]})},Qp=function(e){return(0,u.jsx)(N(),{variant:"body2",className:"rustic-text",children:Au.sanitize(e.text)})},Jp=require("@mui/icons-material/Send");var ef=r.n(Jp);const tf=require("@mui/material/InputAdornment");var rf=r.n(tf);const nf=require("@mui/material/TextField");var of=r.n(nf);function af(e){var t=(0,b.useState)(""),r=t[0],n=t[1],i=!r.trim().length;function o(){if(!i){var t=(new Date).toISOString(),o={id:cs(),timestamp:t,sender:e.sender,conversationId:e.conversationId,format:"text",data:{text:r}};e.ws.send(o),n("")}}return(0,u.jsx)(of(),{"data-cy":"text-input",className:"rustic-textfield",variant:"outlined",value:r,label:e.label,maxRows:e.maxRows,multiline:e.multiline,fullWidth:e.fullWidth,onKeyDown:function(e){"Enter"!==e.key||e.shiftKey||(e.preventDefault(),o())},onChange:function(e){n(e.target.value)},sx:{backgroundColor:"background.paper"},InputProps:{endAdornment:(0,u.jsx)(rf(),{position:"end",children:(0,u.jsx)(T(),{"data-cy":"send-button","aria-label":"send message",onClick:o,disabled:i,color:"primary",children:(0,u.jsx)(ef(),{})})})}})}function cf(e){var t=(0,b.useState)(!0),r=t[0],n=t[1],i=Au.sanitize(e.youtubeVideoId);return(0,u.jsxs)(Ql.Box,{className:"rustic-youtube-video",children:[r&&(0,u.jsx)(Ql.Box,{className:"rustic-youtube-video-loading-container",children:(0,u.jsx)(ds(),{"data-cy":"spinner"})}),(0,u.jsx)("iframe",{"data-cy":"youtube-video-iframe",height:e.height,width:e.width,src:"https://www.youtube.com/embed/".concat(i),title:e.title,onLoad:function(){n(!1)},allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; fullscreen",loading:"lazy"})]})}af.defaultProps={multiline:!0,fullWidth:!0,maxRows:6},cf.defaultProps={height:300,width:400,title:"Embedded video"}})(),n})()));
|