@maxceem/agw 0.1.0 → 0.1.2

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.
@@ -1,4 +1,4 @@
1
- import{B as e,D as t,E as n,F as r,G as i,H as a,J as o,K as s,L as c,N as l,R as u,U as d,V as f,W as p,X as m,Y as h,_ as g,a as _,b as v,c as y,ct as b,d as x,dt as S,et as C,f as w,ft as T,g as E,h as D,i as O,j as k,l as A,lt as j,m as M,nt as N,o as ee,p as te,q as ne,r as re,rt as P,s as ie,st as ae,tt as oe,u as se,ut as ce,v as le,y as ue,z as de}from"./index-CZYi3Ga7.js";var fe=`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`.split(`.`);function pe(e){return typeof e==`string`&&fe.includes(e)}var F=T(j()),me=new Set(`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`.split(`.`));function he(e){return typeof e==`string`&&me.has(e)}function ge(e){return typeof e==`string`&&e.startsWith(`data-`)}function _e(e){if(typeof e!=`object`||!e)return{};var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(he(n)||ge(n))&&(t[n]=e[n]);return t}function ve(e){if(e==null)return null;if((0,F.isValidElement)(e)&&typeof e.props==`object`&&e.props!==null){var t=e.props;return _e(t)}return typeof e==`object`&&!Array.isArray(e)?_e(e):null}function ye(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(he(n)||ge(n)||pe(n))&&(t[n]=e[n]);return t}var be=[`children`,`width`,`height`,`viewBox`,`className`,`style`,`title`,`desc`];function xe(){return xe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xe.apply(null,arguments)}function Se(e,t){if(e==null)return{};var n,r,i=Ce(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Ce(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var we=(0,F.forwardRef)((e,t)=>{var{children:n,width:r,height:i,viewBox:a,className:o,style:s,title:c,desc:l}=e,u=Se(e,be),d=a||{width:r,height:i,x:0,y:0},f=P(`recharts-surface`,o);return F.createElement(`svg`,xe({},ye(u),{className:f,width:r,height:i,style:s,viewBox:`${d.x} ${d.y} ${d.width} ${d.height}`,ref:t}),F.createElement(`title`,null,c),F.createElement(`desc`,null,l),n)}),Te=[`children`,`className`];function Ee(){return Ee=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ee.apply(null,arguments)}function De(e,t){if(e==null)return{};var n,r,i=Oe(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Oe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var ke=F.forwardRef((e,t)=>{var{children:n,className:r}=e,i=De(e,Te),a=P(`recharts-layer`,r);return F.createElement(`g`,Ee({className:a},ye(i),{ref:t}),n)}),Ae=(0,F.createContext)(null),je=()=>(0,F.useContext)(Ae);function I(e){return function(){return e}}var Me=Math.cos,Ne=Math.sin,Pe=Math.sqrt,Fe=Math.PI;Fe/2;var Ie=2*Fe,Le=Math.PI,Re=2*Le,ze=1e-6,Be=Re-ze;function Ve(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function He(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return Ve;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}var Ue=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?Ve:He(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,i=+i,i<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(d>ze)if(!(Math.abs(u*s-c*l)>ze)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((Le-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>ze&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>ze||Math.abs(this._y1-l)>ze)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%Re+Re),d>Be?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>ze&&this._append`A${n},${n},0,${+(d>=Le)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};function We(){return new Ue}We.prototype=Ue.prototype;function Ge(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new Ue(t)}Array.prototype.slice;function Ke(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function qe(e){this._context=e}qe.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Je(e){return new qe(e)}function Ye(e){return e[0]}function Xe(e){return e[1]}function Ze(e,t){var n=I(!0),r=null,i=Je,a=null,o=Ge(s);e=typeof e==`function`?e:e===void 0?Ye:I(e),t=typeof t==`function`?t:t===void 0?Xe:I(t);function s(s){var c,l=(s=Ke(s)).length,u,d=!1,f;for(r??(a=i(f=o())),c=0;c<=l;++c)!(c<l&&n(u=s[c],c,s))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(u,c,s),+t(u,c,s));if(f)return a=null,f+``||null}return s.x=function(t){return arguments.length?(e=typeof t==`function`?t:I(+t),s):e},s.y=function(e){return arguments.length?(t=typeof e==`function`?e:I(+e),s):t},s.defined=function(e){return arguments.length?(n=typeof e==`function`?e:I(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,r!=null&&(a=i(r)),s):i},s.context=function(e){return arguments.length?(e==null?r=a=null:a=i(r=e),s):r},s}function Qe(e,t,n){var r=null,i=I(!0),a=null,o=Je,s=null,c=Ge(l);e=typeof e==`function`?e:e===void 0?Ye:I(+e),t=typeof t==`function`?t:I(t===void 0?0:+t),n=typeof n==`function`?n:n===void 0?Xe:I(+n);function l(l){var u,d,f,p=(l=Ke(l)).length,m,h=!1,g,_=Array(p),v=Array(p);for(a??(s=o(g=c())),u=0;u<=p;++u){if(!(u<p&&i(m=l[u],u,l))===h)if(h=!h)d=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=u-1;f>=d;--f)s.point(_[f],v[f]);s.lineEnd(),s.areaEnd()}h&&(_[u]=+e(m,u,l),v[u]=+t(m,u,l),s.point(r?+r(m,u,l):_[u],n?+n(m,u,l):v[u]))}if(g)return s=null,g+``||null}function u(){return Ze().defined(i).curve(o).context(a)}return l.x=function(t){return arguments.length?(e=typeof t==`function`?t:I(+t),r=null,l):e},l.x0=function(t){return arguments.length?(e=typeof t==`function`?t:I(+t),l):e},l.x1=function(e){return arguments.length?(r=e==null?null:typeof e==`function`?e:I(+e),l):r},l.y=function(e){return arguments.length?(t=typeof e==`function`?e:I(+e),n=null,l):t},l.y0=function(e){return arguments.length?(t=typeof e==`function`?e:I(+e),l):t},l.y1=function(e){return arguments.length?(n=e==null?null:typeof e==`function`?e:I(+e),l):n},l.lineX0=l.lineY0=function(){return u().x(e).y(t)},l.lineY1=function(){return u().x(e).y(n)},l.lineX1=function(){return u().x(r).y(t)},l.defined=function(e){return arguments.length?(i=typeof e==`function`?e:I(!!e),l):i},l.curve=function(e){return arguments.length?(o=e,a!=null&&(s=o(a)),l):o},l.context=function(e){return arguments.length?(e==null?a=s=null:s=o(a=e),l):a},l}var $e=class{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t);break}this._x0=e,this._y0=t}};function et(e){return new $e(e,!0)}function tt(e){return new $e(e,!1)}var nt={draw(e,t){let n=Pe(t/Fe);e.moveTo(n,0),e.arc(0,0,n,0,Ie)}},rt={draw(e,t){let n=Pe(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},it=Pe(1/3),at=it*2,ot={draw(e,t){let n=Pe(t/at),r=n*it;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},st={draw(e,t){let n=Pe(t),r=-n/2;e.rect(r,r,n,n)}},ct=.8908130915292852,lt=Ne(Fe/10)/Ne(7*Fe/10),ut=Ne(Ie/10)*lt,dt=-Me(Ie/10)*lt,ft={draw(e,t){let n=Pe(t*ct),r=ut*n,i=dt*n;e.moveTo(0,-n),e.lineTo(r,i);for(let t=1;t<5;++t){let a=Ie*t/5,o=Me(a),s=Ne(a);e.lineTo(s*n,-o*n),e.lineTo(o*r-s*i,s*r+o*i)}e.closePath()}},pt=Pe(3),mt={draw(e,t){let n=-Pe(t/(pt*3));e.moveTo(0,n*2),e.lineTo(-pt*n,-n),e.lineTo(pt*n,-n),e.closePath()}},ht=-.5,gt=Pe(3)/2,_t=1/Pe(12),vt=(_t/2+1)*3,yt={draw(e,t){let n=Pe(t/vt),r=n/2,i=n*_t,a=r,o=n*_t+n,s=-a,c=o;e.moveTo(r,i),e.lineTo(a,o),e.lineTo(s,c),e.lineTo(ht*r-gt*i,gt*r+ht*i),e.lineTo(ht*a-gt*o,gt*a+ht*o),e.lineTo(ht*s-gt*c,gt*s+ht*c),e.lineTo(ht*r+gt*i,ht*i-gt*r),e.lineTo(ht*a+gt*o,ht*o-gt*a),e.lineTo(ht*s+gt*c,ht*c-gt*s),e.closePath()}};function bt(e,t){let n=null,r=Ge(i);e=typeof e==`function`?e:I(e||nt),t=typeof t==`function`?t:I(t===void 0?64:+t);function i(){let i;if(n||=i=r(),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+``||null}return i.type=function(t){return arguments.length?(e=typeof t==`function`?t:I(t),i):e},i.size=function(e){return arguments.length?(t=typeof e==`function`?e:I(+e),i):t},i.context=function(e){return arguments.length?(n=e??null,i):n},i}function xt(){}function St(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function Ct(e){this._context=e}Ct.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:St(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:St(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function wt(e){return new Ct(e)}function Tt(e){this._context=e}Tt.prototype={areaStart:xt,areaEnd:xt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:St(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Et(e){return new Tt(e)}function Dt(e){this._context=e}Dt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:St(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Ot(e){return new Dt(e)}function kt(e){this._context=e}kt.prototype={areaStart:xt,areaEnd:xt,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function At(e){return new kt(e)}function jt(e){return e<0?-1:1}function Mt(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(jt(a)+jt(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function Nt(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Pt(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function Ft(e){this._context=e}Ft.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Pt(this,this._t0,Nt(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Pt(this,Nt(this,n=Mt(this,e,t)),n);break;default:Pt(this,this._t0,n=Mt(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function It(e){this._context=new Lt(e)}(It.prototype=Object.create(Ft.prototype)).point=function(e,t){Ft.prototype.point.call(this,t,e)};function Lt(e){this._context=e}Lt.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function Rt(e){return new Ft(e)}function zt(e){return new It(e)}function Bt(e){this._context=e}Bt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=Vt(e),i=Vt(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Vt(e){var t,n=e.length-1,r,i=Array(n),a=Array(n),o=Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function Ht(e){return new Bt(e)}function Ut(e,t){this._context=e,this._t=t}Ut.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}this._x=e,this._y=t}};function Wt(e){return new Ut(e,.5)}function Gt(e){return new Ut(e,0)}function Kt(e){return new Ut(e,1)}function qt(e,t){if((o=e.length)>1)for(var n=1,r,i,a=e[t[0]],o,s=a.length;n<o;++n)for(i=a,a=e[t[n]],r=0;r<s;++r)a[r][1]+=a[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function Jt(e){for(var t=e.length,n=Array(t);--t>=0;)n[t]=t;return n}function Yt(e,t){return e[t]}function Xt(e){let t=[];return t.key=e,t}function Zt(){var e=I([]),t=Jt,n=qt,r=Yt;function i(i){var a=Array.from(e.apply(this,arguments),Xt),o,s=a.length,c=-1,l;for(let e of i)for(o=0,++c;o<s;++o)(a[o][c]=[0,+r(e,a[o].key,c,i)]).data=e;for(o=0,l=Ke(t(a));o<s;++o)a[l[o]].index=o;return n(a,l),a}return i.keys=function(t){return arguments.length?(e=typeof t==`function`?t:I(Array.from(t)),i):e},i.value=function(e){return arguments.length?(r=typeof e==`function`?e:I(+e),i):r},i.order=function(e){return arguments.length?(t=e==null?Jt:typeof e==`function`?e:I(Array.from(e)),i):t},i.offset=function(e){return arguments.length?(n=e??qt,i):n},i}function Qt(e,t){if((r=e.length)>0){for(var n,r,i=0,a=e[0].length,o;i<a;++i){for(o=n=0;n<r;++n)o+=e[n][i][1]||0;if(o)for(n=0;n<r;++n)e[n][i][1]/=o}qt(e,t)}}function $t(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,a=r.length;n<a;++n){for(var o=0,s=0;o<i;++o)s+=e[o][n][1]||0;r[n][1]+=r[n][0]=-s/2}qt(e,t)}}function en(e,t){if(!(!((o=e.length)>0)||!((a=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,a,o;r<a;++r){for(var s=0,c=0,l=0;s<o;++s){for(var u=e[t[s]],d=u[r][1]||0,f=(d-(u[r-1][1]||0))/2,p=0;p<s;++p){var m=e[t[p]],h=m[r][1]||0,g=m[r-1][1]||0;f+=h-g}c+=d,l+=f*d}i[r-1][1]+=i[r-1][0]=n,c&&(n-=l/c)}i[r-1][1]+=i[r-1][0]=n,qt(e,t)}}function tn(e){return e===`__proto__`}var nn=/\.|(\[(?:[^[\]]*|(["'])(?:(?!\2)[^\\]|\\.)*?\2)\])/;function rn(e){switch(typeof e){case`number`:case`symbol`:return!1;case`string`:return e===``||e.startsWith(`.`)||e.endsWith(`.`)?!1:nn.test(e);default:return!1}}function an(e){return typeof e==`string`||typeof e==`symbol`?e:Object.is(e?.valueOf?.(),-0)?`-0`:String(e)}function on(e){if(e==null)return``;if(typeof e==`string`)return e;if(Array.isArray(e))return e.map(on).join(`,`);let t=String(e);return t===`0`&&Object.is(Number(e),-0)?`-0`:t}function sn(e){if(Array.isArray(e))return e.map(an);if(typeof e==`symbol`)return[e];e=on(e);let t=[],n=e.length;if(n===0)return t;let r=0,i=``,a=``,o=!1;for(e.charCodeAt(0)===46&&t.push(``);r<n;){let s=e[r];if(a)s===`\\`&&r+1<n?(r++,i+=e[r]):s===a?a=``:i+=s;else if(o)s===`"`||s===`'`?a=s:s===`]`?(o=!1,t.push(i),i=``):i+=s;else if(s===`[`)o=!0,i&&=(t.push(i),``);else if(s===`.`){i&&=(t.push(i),``);let n=e[r+1];(n===void 0||n===`.`)&&t.push(``)}else i+=s;r++}return i&&t.push(i),t}function cn(e,t,n){if(e==null)return n;switch(typeof t){case`string`:{if(tn(t))return n;let r=e[t];return r===void 0?rn(t)&&!Object.hasOwn(e,t)?cn(e,sn(t),n):n:r}case`number`:case`symbol`:{typeof t==`number`&&(t=an(t));let r=e[t];return r===void 0?n:r}default:{if(Array.isArray(t))return ln(e,t,n);if(t=Object.is(t?.valueOf(),-0)?`-0`:String(t),tn(t))return n;let r=e[t];return r===void 0?n:r}}}function ln(e,t,n){if(t.length===0)return n;let r=e;for(let e=0;e<t.length;e++){if(r==null||tn(t[e]))return n;r=r[t[e]]}return r===void 0?n:r}var un=4;function dn(e){var t=10**(arguments.length>1&&arguments[1]!==void 0?arguments[1]:un),n=Math.round(e*t)/t;return Object.is(n,-0)?0:n}function L(e){var t=[...arguments].slice(1);return e.reduce((e,n,r)=>{var i=t[r-1];return typeof i==`string`?e+i+n:i===void 0?e+n:e+dn(i)+n},``)}var fn=e=>e===0?0:e>0?1:-1,pn=e=>typeof e==`number`&&e!=+e,mn=e=>typeof e==`string`&&e.indexOf(`%`)===e.length-1,R=e=>(typeof e==`number`||e instanceof Number)&&!pn(e),hn=e=>R(e)||typeof e==`string`,gn=0,_n=e=>{var t=++gn;return`${e||``}${t}`},vn=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,r=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if(!R(e)&&typeof e!=`string`)return n;var i;if(mn(e)){if(t==null)return n;var a=e.indexOf(`%`);i=t*parseFloat(e.slice(0,a))/100}else i=+e;return pn(i)&&(i=n),r&&t!=null&&i>t&&(i=t),i},yn=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r<t;r++)if(!n[String(e[r])])n[String(e[r])]=!0;else return!0;return!1};function bn(e,t,n){return R(e)&&R(t)?dn(e+n*(t-e)):t}function xn(e,t,n){if(!(!e||!e.length))return e.find(e=>e&&(typeof t==`function`?t(e):cn(e,t))===n)}var z=e=>e==null,Sn=e=>z(e)?e:`${e.charAt(0).toUpperCase()}${e.slice(1)}`;function Cn(e){return e!=null}function wn(){}var Tn=[`type`,`size`,`sizeType`];function En(){return En=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},En.apply(null,arguments)}function Dn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function On(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Dn(Object(n),!0).forEach(function(t){kn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function kn(e,t,n){return(t=An(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function An(e){var t=jn(e,`string`);return typeof t==`symbol`?t:t+``}function jn(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Mn(e,t){if(e==null)return{};var n,r,i=Nn(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Nn(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Pn={symbolCircle:nt,symbolCross:rt,symbolDiamond:ot,symbolSquare:st,symbolStar:ft,symbolTriangle:mt,symbolWye:yt},Fn=Math.PI/180,In=e=>Pn[`symbol${Sn(e)}`]||nt,Ln=(e,t,n)=>{if(t===`area`)return e;switch(n){case`cross`:return 5*e*e/9;case`diamond`:return .5*e*e/Math.sqrt(3);case`square`:return e*e;case`star`:var r=18*Fn;return 1.25*e*e*(Math.tan(r)-Math.tan(r*2)*Math.tan(r)**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}},Rn=(e,t)=>{Pn[`symbol${Sn(e)}`]=t},zn=e=>{var{type:t=`circle`,size:n=64,sizeType:r=`area`}=e,i=On(On({},Mn(e,Tn)),{},{type:t,size:n,sizeType:r}),a=`circle`;typeof t==`string`&&(a=t);var o=()=>{var e=In(a),t=bt().type(e).size(Ln(n,r,a))();if(t!==null)return t},{className:s,cx:c,cy:l}=i,u=ye(i);return R(c)&&R(l)&&R(n)?F.createElement(`path`,En({},u,{className:P(`recharts-symbols`,s),transform:`translate(${c}, ${l})`,d:o()})):null};zn.registerSymbol=Rn;var Bn=e=>`radius`in e&&`startAngle`in e&&`endAngle`in e,Vn=(e,t)=>{if(!e||typeof e==`function`||typeof e==`boolean`)return null;var n=e;if((0,F.isValidElement)(e)&&(n=e.props),typeof n!=`object`&&typeof n!=`function`)return null;var r={};return Object.keys(n).forEach(e=>{pe(e)&&typeof n[e]==`function`&&(r[e]=t||(t=>n[e](n,t)))}),r},Hn=(e,t,n)=>r=>(e(t,n,r),null),Un=(e,t,n)=>{if(e===null||typeof e!=`object`&&typeof e!=`function`)return null;var r=null;return Object.keys(e).forEach(i=>{var a=e[i];pe(i)&&typeof a==`function`&&(r||={},r[i]=Hn(a,t,n))}),r};function Wn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Gn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Wn(Object(n),!0).forEach(function(t){Kn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Kn(e,t,n){return(t=qn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qn(e){var t=Jn(e,`string`);return typeof t==`symbol`?t:t+``}function Jn(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Yn(e,t){var n=Gn({},e),r=t;return Object.keys(t).reduce((e,t)=>(e[t]===void 0&&r[t]!==void 0&&(e[t]=r[t]),e),n)}function Xn(){return Xn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xn.apply(null,arguments)}function Zn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Qn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Zn(Object(n),!0).forEach(function(t){$n(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function $n(e,t,n){return(t=er(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function er(e){var t=tr(e,`string`);return typeof t==`symbol`?t:t+``}function tr(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var nr=32,rr={align:`center`,iconSize:14,inactiveColor:`#ccc`,layout:`horizontal`,verticalAlign:`middle`,labelStyle:{}};function ir(e){if(typeof e==`object`&&e&&`strokeDasharray`in e)return String(e.strokeDasharray)}function ar(e){var{data:t,iconType:n,inactiveColor:r}=e,i=nr/2,a=nr/6,o=nr/3,s=t.inactive?r:t.color,c=n??t.type;if(c===`none`)return null;if(c===`plainline`)return F.createElement(`line`,{strokeWidth:4,fill:`none`,stroke:s,strokeDasharray:ir(t.payload),x1:0,y1:i,x2:nr,y2:i,className:`recharts-legend-icon`});if(c===`line`)return F.createElement(`path`,{strokeWidth:4,fill:`none`,stroke:s,d:`M0,${i}h${o}
1
+ import{B as e,D as t,E as n,F as r,G as i,H as a,J as o,K as s,L as c,N as l,R as u,U as d,V as f,W as p,X as m,Y as h,_ as g,a as _,b as v,c as y,ct as b,d as x,dt as S,et as C,f as w,ft as T,g as E,h as D,i as O,j as k,l as A,lt as j,m as M,nt as N,o as ee,p as te,q as ne,r as re,rt as P,s as ie,st as ae,tt as oe,u as se,ut as ce,v as le,y as ue,z as de}from"./index-D71D9UiI.js";var fe=`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`.split(`.`);function pe(e){return typeof e==`string`&&fe.includes(e)}var F=T(j()),me=new Set(`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`.split(`.`));function he(e){return typeof e==`string`&&me.has(e)}function ge(e){return typeof e==`string`&&e.startsWith(`data-`)}function _e(e){if(typeof e!=`object`||!e)return{};var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(he(n)||ge(n))&&(t[n]=e[n]);return t}function ve(e){if(e==null)return null;if((0,F.isValidElement)(e)&&typeof e.props==`object`&&e.props!==null){var t=e.props;return _e(t)}return typeof e==`object`&&!Array.isArray(e)?_e(e):null}function ye(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(he(n)||ge(n)||pe(n))&&(t[n]=e[n]);return t}var be=[`children`,`width`,`height`,`viewBox`,`className`,`style`,`title`,`desc`];function xe(){return xe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xe.apply(null,arguments)}function Se(e,t){if(e==null)return{};var n,r,i=Ce(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Ce(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var we=(0,F.forwardRef)((e,t)=>{var{children:n,width:r,height:i,viewBox:a,className:o,style:s,title:c,desc:l}=e,u=Se(e,be),d=a||{width:r,height:i,x:0,y:0},f=P(`recharts-surface`,o);return F.createElement(`svg`,xe({},ye(u),{className:f,width:r,height:i,style:s,viewBox:`${d.x} ${d.y} ${d.width} ${d.height}`,ref:t}),F.createElement(`title`,null,c),F.createElement(`desc`,null,l),n)}),Te=[`children`,`className`];function Ee(){return Ee=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ee.apply(null,arguments)}function De(e,t){if(e==null)return{};var n,r,i=Oe(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Oe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var ke=F.forwardRef((e,t)=>{var{children:n,className:r}=e,i=De(e,Te),a=P(`recharts-layer`,r);return F.createElement(`g`,Ee({className:a},ye(i),{ref:t}),n)}),Ae=(0,F.createContext)(null),je=()=>(0,F.useContext)(Ae);function I(e){return function(){return e}}var Me=Math.cos,Ne=Math.sin,Pe=Math.sqrt,Fe=Math.PI;Fe/2;var Ie=2*Fe,Le=Math.PI,Re=2*Le,ze=1e-6,Be=Re-ze;function Ve(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function He(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return Ve;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}var Ue=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?Ve:He(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,i=+i,i<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(d>ze)if(!(Math.abs(u*s-c*l)>ze)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((Le-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>ze&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>ze||Math.abs(this._y1-l)>ze)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%Re+Re),d>Be?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>ze&&this._append`A${n},${n},0,${+(d>=Le)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};function We(){return new Ue}We.prototype=Ue.prototype;function Ge(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new Ue(t)}Array.prototype.slice;function Ke(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function qe(e){this._context=e}qe.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Je(e){return new qe(e)}function Ye(e){return e[0]}function Xe(e){return e[1]}function Ze(e,t){var n=I(!0),r=null,i=Je,a=null,o=Ge(s);e=typeof e==`function`?e:e===void 0?Ye:I(e),t=typeof t==`function`?t:t===void 0?Xe:I(t);function s(s){var c,l=(s=Ke(s)).length,u,d=!1,f;for(r??(a=i(f=o())),c=0;c<=l;++c)!(c<l&&n(u=s[c],c,s))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(u,c,s),+t(u,c,s));if(f)return a=null,f+``||null}return s.x=function(t){return arguments.length?(e=typeof t==`function`?t:I(+t),s):e},s.y=function(e){return arguments.length?(t=typeof e==`function`?e:I(+e),s):t},s.defined=function(e){return arguments.length?(n=typeof e==`function`?e:I(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,r!=null&&(a=i(r)),s):i},s.context=function(e){return arguments.length?(e==null?r=a=null:a=i(r=e),s):r},s}function Qe(e,t,n){var r=null,i=I(!0),a=null,o=Je,s=null,c=Ge(l);e=typeof e==`function`?e:e===void 0?Ye:I(+e),t=typeof t==`function`?t:I(t===void 0?0:+t),n=typeof n==`function`?n:n===void 0?Xe:I(+n);function l(l){var u,d,f,p=(l=Ke(l)).length,m,h=!1,g,_=Array(p),v=Array(p);for(a??(s=o(g=c())),u=0;u<=p;++u){if(!(u<p&&i(m=l[u],u,l))===h)if(h=!h)d=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=u-1;f>=d;--f)s.point(_[f],v[f]);s.lineEnd(),s.areaEnd()}h&&(_[u]=+e(m,u,l),v[u]=+t(m,u,l),s.point(r?+r(m,u,l):_[u],n?+n(m,u,l):v[u]))}if(g)return s=null,g+``||null}function u(){return Ze().defined(i).curve(o).context(a)}return l.x=function(t){return arguments.length?(e=typeof t==`function`?t:I(+t),r=null,l):e},l.x0=function(t){return arguments.length?(e=typeof t==`function`?t:I(+t),l):e},l.x1=function(e){return arguments.length?(r=e==null?null:typeof e==`function`?e:I(+e),l):r},l.y=function(e){return arguments.length?(t=typeof e==`function`?e:I(+e),n=null,l):t},l.y0=function(e){return arguments.length?(t=typeof e==`function`?e:I(+e),l):t},l.y1=function(e){return arguments.length?(n=e==null?null:typeof e==`function`?e:I(+e),l):n},l.lineX0=l.lineY0=function(){return u().x(e).y(t)},l.lineY1=function(){return u().x(e).y(n)},l.lineX1=function(){return u().x(r).y(t)},l.defined=function(e){return arguments.length?(i=typeof e==`function`?e:I(!!e),l):i},l.curve=function(e){return arguments.length?(o=e,a!=null&&(s=o(a)),l):o},l.context=function(e){return arguments.length?(e==null?a=s=null:s=o(a=e),l):a},l}var $e=class{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t);break}this._x0=e,this._y0=t}};function et(e){return new $e(e,!0)}function tt(e){return new $e(e,!1)}var nt={draw(e,t){let n=Pe(t/Fe);e.moveTo(n,0),e.arc(0,0,n,0,Ie)}},rt={draw(e,t){let n=Pe(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},it=Pe(1/3),at=it*2,ot={draw(e,t){let n=Pe(t/at),r=n*it;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},st={draw(e,t){let n=Pe(t),r=-n/2;e.rect(r,r,n,n)}},ct=.8908130915292852,lt=Ne(Fe/10)/Ne(7*Fe/10),ut=Ne(Ie/10)*lt,dt=-Me(Ie/10)*lt,ft={draw(e,t){let n=Pe(t*ct),r=ut*n,i=dt*n;e.moveTo(0,-n),e.lineTo(r,i);for(let t=1;t<5;++t){let a=Ie*t/5,o=Me(a),s=Ne(a);e.lineTo(s*n,-o*n),e.lineTo(o*r-s*i,s*r+o*i)}e.closePath()}},pt=Pe(3),mt={draw(e,t){let n=-Pe(t/(pt*3));e.moveTo(0,n*2),e.lineTo(-pt*n,-n),e.lineTo(pt*n,-n),e.closePath()}},ht=-.5,gt=Pe(3)/2,_t=1/Pe(12),vt=(_t/2+1)*3,yt={draw(e,t){let n=Pe(t/vt),r=n/2,i=n*_t,a=r,o=n*_t+n,s=-a,c=o;e.moveTo(r,i),e.lineTo(a,o),e.lineTo(s,c),e.lineTo(ht*r-gt*i,gt*r+ht*i),e.lineTo(ht*a-gt*o,gt*a+ht*o),e.lineTo(ht*s-gt*c,gt*s+ht*c),e.lineTo(ht*r+gt*i,ht*i-gt*r),e.lineTo(ht*a+gt*o,ht*o-gt*a),e.lineTo(ht*s+gt*c,ht*c-gt*s),e.closePath()}};function bt(e,t){let n=null,r=Ge(i);e=typeof e==`function`?e:I(e||nt),t=typeof t==`function`?t:I(t===void 0?64:+t);function i(){let i;if(n||=i=r(),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+``||null}return i.type=function(t){return arguments.length?(e=typeof t==`function`?t:I(t),i):e},i.size=function(e){return arguments.length?(t=typeof e==`function`?e:I(+e),i):t},i.context=function(e){return arguments.length?(n=e??null,i):n},i}function xt(){}function St(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function Ct(e){this._context=e}Ct.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:St(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:St(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function wt(e){return new Ct(e)}function Tt(e){this._context=e}Tt.prototype={areaStart:xt,areaEnd:xt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:St(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Et(e){return new Tt(e)}function Dt(e){this._context=e}Dt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:St(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Ot(e){return new Dt(e)}function kt(e){this._context=e}kt.prototype={areaStart:xt,areaEnd:xt,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function At(e){return new kt(e)}function jt(e){return e<0?-1:1}function Mt(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(jt(a)+jt(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function Nt(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Pt(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function Ft(e){this._context=e}Ft.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Pt(this,this._t0,Nt(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Pt(this,Nt(this,n=Mt(this,e,t)),n);break;default:Pt(this,this._t0,n=Mt(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function It(e){this._context=new Lt(e)}(It.prototype=Object.create(Ft.prototype)).point=function(e,t){Ft.prototype.point.call(this,t,e)};function Lt(e){this._context=e}Lt.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function Rt(e){return new Ft(e)}function zt(e){return new It(e)}function Bt(e){this._context=e}Bt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=Vt(e),i=Vt(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Vt(e){var t,n=e.length-1,r,i=Array(n),a=Array(n),o=Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function Ht(e){return new Bt(e)}function Ut(e,t){this._context=e,this._t=t}Ut.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}this._x=e,this._y=t}};function Wt(e){return new Ut(e,.5)}function Gt(e){return new Ut(e,0)}function Kt(e){return new Ut(e,1)}function qt(e,t){if((o=e.length)>1)for(var n=1,r,i,a=e[t[0]],o,s=a.length;n<o;++n)for(i=a,a=e[t[n]],r=0;r<s;++r)a[r][1]+=a[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function Jt(e){for(var t=e.length,n=Array(t);--t>=0;)n[t]=t;return n}function Yt(e,t){return e[t]}function Xt(e){let t=[];return t.key=e,t}function Zt(){var e=I([]),t=Jt,n=qt,r=Yt;function i(i){var a=Array.from(e.apply(this,arguments),Xt),o,s=a.length,c=-1,l;for(let e of i)for(o=0,++c;o<s;++o)(a[o][c]=[0,+r(e,a[o].key,c,i)]).data=e;for(o=0,l=Ke(t(a));o<s;++o)a[l[o]].index=o;return n(a,l),a}return i.keys=function(t){return arguments.length?(e=typeof t==`function`?t:I(Array.from(t)),i):e},i.value=function(e){return arguments.length?(r=typeof e==`function`?e:I(+e),i):r},i.order=function(e){return arguments.length?(t=e==null?Jt:typeof e==`function`?e:I(Array.from(e)),i):t},i.offset=function(e){return arguments.length?(n=e??qt,i):n},i}function Qt(e,t){if((r=e.length)>0){for(var n,r,i=0,a=e[0].length,o;i<a;++i){for(o=n=0;n<r;++n)o+=e[n][i][1]||0;if(o)for(n=0;n<r;++n)e[n][i][1]/=o}qt(e,t)}}function $t(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,a=r.length;n<a;++n){for(var o=0,s=0;o<i;++o)s+=e[o][n][1]||0;r[n][1]+=r[n][0]=-s/2}qt(e,t)}}function en(e,t){if(!(!((o=e.length)>0)||!((a=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,a,o;r<a;++r){for(var s=0,c=0,l=0;s<o;++s){for(var u=e[t[s]],d=u[r][1]||0,f=(d-(u[r-1][1]||0))/2,p=0;p<s;++p){var m=e[t[p]],h=m[r][1]||0,g=m[r-1][1]||0;f+=h-g}c+=d,l+=f*d}i[r-1][1]+=i[r-1][0]=n,c&&(n-=l/c)}i[r-1][1]+=i[r-1][0]=n,qt(e,t)}}function tn(e){return e===`__proto__`}var nn=/\.|(\[(?:[^[\]]*|(["'])(?:(?!\2)[^\\]|\\.)*?\2)\])/;function rn(e){switch(typeof e){case`number`:case`symbol`:return!1;case`string`:return e===``||e.startsWith(`.`)||e.endsWith(`.`)?!1:nn.test(e);default:return!1}}function an(e){return typeof e==`string`||typeof e==`symbol`?e:Object.is(e?.valueOf?.(),-0)?`-0`:String(e)}function on(e){if(e==null)return``;if(typeof e==`string`)return e;if(Array.isArray(e))return e.map(on).join(`,`);let t=String(e);return t===`0`&&Object.is(Number(e),-0)?`-0`:t}function sn(e){if(Array.isArray(e))return e.map(an);if(typeof e==`symbol`)return[e];e=on(e);let t=[],n=e.length;if(n===0)return t;let r=0,i=``,a=``,o=!1;for(e.charCodeAt(0)===46&&t.push(``);r<n;){let s=e[r];if(a)s===`\\`&&r+1<n?(r++,i+=e[r]):s===a?a=``:i+=s;else if(o)s===`"`||s===`'`?a=s:s===`]`?(o=!1,t.push(i),i=``):i+=s;else if(s===`[`)o=!0,i&&=(t.push(i),``);else if(s===`.`){i&&=(t.push(i),``);let n=e[r+1];(n===void 0||n===`.`)&&t.push(``)}else i+=s;r++}return i&&t.push(i),t}function cn(e,t,n){if(e==null)return n;switch(typeof t){case`string`:{if(tn(t))return n;let r=e[t];return r===void 0?rn(t)&&!Object.hasOwn(e,t)?cn(e,sn(t),n):n:r}case`number`:case`symbol`:{typeof t==`number`&&(t=an(t));let r=e[t];return r===void 0?n:r}default:{if(Array.isArray(t))return ln(e,t,n);if(t=Object.is(t?.valueOf(),-0)?`-0`:String(t),tn(t))return n;let r=e[t];return r===void 0?n:r}}}function ln(e,t,n){if(t.length===0)return n;let r=e;for(let e=0;e<t.length;e++){if(r==null||tn(t[e]))return n;r=r[t[e]]}return r===void 0?n:r}var un=4;function dn(e){var t=10**(arguments.length>1&&arguments[1]!==void 0?arguments[1]:un),n=Math.round(e*t)/t;return Object.is(n,-0)?0:n}function L(e){var t=[...arguments].slice(1);return e.reduce((e,n,r)=>{var i=t[r-1];return typeof i==`string`?e+i+n:i===void 0?e+n:e+dn(i)+n},``)}var fn=e=>e===0?0:e>0?1:-1,pn=e=>typeof e==`number`&&e!=+e,mn=e=>typeof e==`string`&&e.indexOf(`%`)===e.length-1,R=e=>(typeof e==`number`||e instanceof Number)&&!pn(e),hn=e=>R(e)||typeof e==`string`,gn=0,_n=e=>{var t=++gn;return`${e||``}${t}`},vn=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,r=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if(!R(e)&&typeof e!=`string`)return n;var i;if(mn(e)){if(t==null)return n;var a=e.indexOf(`%`);i=t*parseFloat(e.slice(0,a))/100}else i=+e;return pn(i)&&(i=n),r&&t!=null&&i>t&&(i=t),i},yn=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r<t;r++)if(!n[String(e[r])])n[String(e[r])]=!0;else return!0;return!1};function bn(e,t,n){return R(e)&&R(t)?dn(e+n*(t-e)):t}function xn(e,t,n){if(!(!e||!e.length))return e.find(e=>e&&(typeof t==`function`?t(e):cn(e,t))===n)}var z=e=>e==null,Sn=e=>z(e)?e:`${e.charAt(0).toUpperCase()}${e.slice(1)}`;function Cn(e){return e!=null}function wn(){}var Tn=[`type`,`size`,`sizeType`];function En(){return En=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},En.apply(null,arguments)}function Dn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function On(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Dn(Object(n),!0).forEach(function(t){kn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function kn(e,t,n){return(t=An(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function An(e){var t=jn(e,`string`);return typeof t==`symbol`?t:t+``}function jn(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Mn(e,t){if(e==null)return{};var n,r,i=Nn(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Nn(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Pn={symbolCircle:nt,symbolCross:rt,symbolDiamond:ot,symbolSquare:st,symbolStar:ft,symbolTriangle:mt,symbolWye:yt},Fn=Math.PI/180,In=e=>Pn[`symbol${Sn(e)}`]||nt,Ln=(e,t,n)=>{if(t===`area`)return e;switch(n){case`cross`:return 5*e*e/9;case`diamond`:return .5*e*e/Math.sqrt(3);case`square`:return e*e;case`star`:var r=18*Fn;return 1.25*e*e*(Math.tan(r)-Math.tan(r*2)*Math.tan(r)**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}},Rn=(e,t)=>{Pn[`symbol${Sn(e)}`]=t},zn=e=>{var{type:t=`circle`,size:n=64,sizeType:r=`area`}=e,i=On(On({},Mn(e,Tn)),{},{type:t,size:n,sizeType:r}),a=`circle`;typeof t==`string`&&(a=t);var o=()=>{var e=In(a),t=bt().type(e).size(Ln(n,r,a))();if(t!==null)return t},{className:s,cx:c,cy:l}=i,u=ye(i);return R(c)&&R(l)&&R(n)?F.createElement(`path`,En({},u,{className:P(`recharts-symbols`,s),transform:`translate(${c}, ${l})`,d:o()})):null};zn.registerSymbol=Rn;var Bn=e=>`radius`in e&&`startAngle`in e&&`endAngle`in e,Vn=(e,t)=>{if(!e||typeof e==`function`||typeof e==`boolean`)return null;var n=e;if((0,F.isValidElement)(e)&&(n=e.props),typeof n!=`object`&&typeof n!=`function`)return null;var r={};return Object.keys(n).forEach(e=>{pe(e)&&typeof n[e]==`function`&&(r[e]=t||(t=>n[e](n,t)))}),r},Hn=(e,t,n)=>r=>(e(t,n,r),null),Un=(e,t,n)=>{if(e===null||typeof e!=`object`&&typeof e!=`function`)return null;var r=null;return Object.keys(e).forEach(i=>{var a=e[i];pe(i)&&typeof a==`function`&&(r||={},r[i]=Hn(a,t,n))}),r};function Wn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Gn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Wn(Object(n),!0).forEach(function(t){Kn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Kn(e,t,n){return(t=qn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qn(e){var t=Jn(e,`string`);return typeof t==`symbol`?t:t+``}function Jn(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Yn(e,t){var n=Gn({},e),r=t;return Object.keys(t).reduce((e,t)=>(e[t]===void 0&&r[t]!==void 0&&(e[t]=r[t]),e),n)}function Xn(){return Xn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xn.apply(null,arguments)}function Zn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Qn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Zn(Object(n),!0).forEach(function(t){$n(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function $n(e,t,n){return(t=er(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function er(e){var t=tr(e,`string`);return typeof t==`symbol`?t:t+``}function tr(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var nr=32,rr={align:`center`,iconSize:14,inactiveColor:`#ccc`,layout:`horizontal`,verticalAlign:`middle`,labelStyle:{}};function ir(e){if(typeof e==`object`&&e&&`strokeDasharray`in e)return String(e.strokeDasharray)}function ar(e){var{data:t,iconType:n,inactiveColor:r}=e,i=nr/2,a=nr/6,o=nr/3,s=t.inactive?r:t.color,c=n??t.type;if(c===`none`)return null;if(c===`plainline`)return F.createElement(`line`,{strokeWidth:4,fill:`none`,stroke:s,strokeDasharray:ir(t.payload),x1:0,y1:i,x2:nr,y2:i,className:`recharts-legend-icon`});if(c===`line`)return F.createElement(`path`,{strokeWidth:4,fill:`none`,stroke:s,d:`M0,${i}h${o}
2
2
  A${a},${a},0,1,1,${2*o},${i}
3
3
  H${nr}M${2*o},${i}
4
4
  A${a},${a},0,1,1,${o},${i}`,className:`recharts-legend-icon`});if(c===`rect`)return F.createElement(`path`,{stroke:`none`,fill:s,d:`M0,${nr/8}h${nr}v${nr*3/4}h${-nr}z`,className:`recharts-legend-icon`});if(F.isValidElement(t.legendIcon)){var l=Qn({},t);return delete l.legendIcon,F.cloneElement(t.legendIcon,l)}return F.createElement(zn,{fill:s,cx:i,cy:i,size:nr,sizeType:`diameter`,type:c})}function or(e){var{payload:t,iconSize:n,layout:r,formatter:i,inactiveColor:a,iconType:o,labelStyle:s}=e,c={x:0,y:0,width:nr,height:nr},l={display:r===`horizontal`?`inline-block`:`block`,marginRight:10},u={display:`inline-block`,verticalAlign:`middle`,marginRight:4};return t.map((t,r)=>{var d=t.formatter||i,f=P({"recharts-legend-item":!0,[`legend-item-${r}`]:!0,inactive:t.inactive});if(t.type===`none`)return null;var p=typeof s==`object`?Qn({},s):{};p.color=t.inactive?a:p.color||t.color;var m=d?d(t.value,t,r):t.value;return F.createElement(`li`,Xn({className:f,style:l,key:`legend-item-${r}`},Un(e,t,r)),F.createElement(we,{width:n,height:n,viewBox:c,style:u,"aria-label":`${m} legend icon`},F.createElement(ar,{data:t,iconType:o,inactiveColor:a})),F.createElement(`span`,{className:`recharts-legend-item-text`,style:p},m))})}var sr=e=>{var t=Yn(e,rr),{payload:n,layout:r,align:i}=t;if(!n||!n.length)return null;var a={padding:0,margin:0,textAlign:r===`horizontal`?i:`left`};return F.createElement(`ul`,{className:`recharts-default-legend`,style:a},F.createElement(or,Xn({},t,{payload:n})))};function cr(e,t){let n=new Map;for(let r=0;r<e.length;r++){let i=e[r],a=t(i,r,e);n.has(a)||n.set(a,i)}return Array.from(n.values())}function lr(e,t){return function(...n){return e.apply(this,n.slice(0,t))}}function ur(e){return e}function dr(e){return function(t){return cn(t,e)}}function fr(e){return e==null||typeof e!=`object`&&typeof e!=`function`}function pr(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function mr(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function hr(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var gr=`[object RegExp]`,_r=`[object String]`,vr=`[object Number]`,yr=`[object Boolean]`,br=`[object Arguments]`,xr=`[object Symbol]`,Sr=`[object Date]`,Cr=`[object Map]`,wr=`[object Set]`,Tr=`[object Array]`,Er=`[object ArrayBuffer]`,Dr=`[object Object]`,Or=`[object DataView]`,kr=`[object Uint8Array]`,Ar=`[object Uint8ClampedArray]`,jr=`[object Uint16Array]`,Mr=`[object Uint32Array]`,Nr=`[object Int8Array]`,Pr=`[object Int16Array]`,Fr=`[object Int32Array]`,Ir=`[object Float32Array]`,Lr=`[object Float64Array]`,Rr=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window||typeof self==`object`&&self||typeof global==`object`&&global||(function(){return this})();function zr(e){return Rr.Buffer!==void 0&&Rr.Buffer.isBuffer(e)}function Br(e,t){return Vr(e,void 0,e,new Map,t)}function Vr(e,t,n,r=new Map,i=void 0){let a=i?.(e,t,n,r);if(a!==void 0)return a;if(fr(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){let t=Array(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=Vr(e[a],a,n,r,i);return Object.hasOwn(e,`index`)&&(t.index=e.index),Object.hasOwn(e,`input`)&&(t.input=e.input),t}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){let t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if(e instanceof Map){let t=new Map;r.set(e,t);for(let[a,o]of e)t.set(a,Vr(o,a,n,r,i));return t}if(e instanceof Set){let t=new Set;r.set(e,t);for(let a of e)t.add(Vr(a,void 0,n,r,i));return t}if(zr(e))return e.subarray();if(pr(e)){let t=new(Object.getPrototypeOf(e)).constructor(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=Vr(e[a],a,n,r,i);return t}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){let t=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return r.set(e,t),Hr(t,e,n,r,i),t}if(typeof File<`u`&&e instanceof File){let t=new File([e],e.name,{type:e.type});return r.set(e,t),Hr(t,e,n,r,i),t}if(typeof Blob<`u`&&e instanceof Blob){let t=new Blob([e],{type:e.type});return r.set(e,t),Hr(t,e,n,r,i),t}if(e instanceof Error){let t=structuredClone(e);return r.set(e,t),t.message=e.message,t.name=e.name,t.stack=e.stack,t.cause=e.cause,t.constructor=e.constructor,Hr(t,e,n,r,i),t}if(e instanceof Boolean){let t=new Boolean(e.valueOf());return r.set(e,t),Hr(t,e,n,r,i),t}if(e instanceof Number){let t=new Number(e.valueOf());return r.set(e,t),Hr(t,e,n,r,i),t}if(e instanceof String){let t=new String(e.valueOf());return r.set(e,t),Hr(t,e,n,r,i),t}if(typeof e==`object`&&Ur(e)){let t=Object.create(Object.getPrototypeOf(e));return r.set(e,t),Hr(t,e,n,r,i),t}return e}function Hr(e,t,n=e,r,i){let a=[...Object.keys(t),...mr(t)];for(let o=0;o<a.length;o++){let s=a[o],c=Object.getOwnPropertyDescriptor(e,s);(c==null||c.writable)&&(e[s]=Vr(t[s],s,n,r,i))}}function Ur(e){switch(hr(e)){case br:case Tr:case Er:case Or:case yr:case Sr:case Ir:case Lr:case Nr:case Pr:case Fr:case Cr:case vr:case Dr:case gr:case wr:case _r:case xr:case kr:case Ar:case jr:case Mr:return!0;default:return!1}}function Wr(e){return Vr(e,void 0,e,new Map,void 0)}function Gr(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}function Kr(e){return e!==null&&(typeof e==`object`||typeof e==`function`)}function qr(e,t,n){return typeof n==`function`?Jr(e,t,function e(t,r,i,a,o,s){let c=n(t,r,i,a,o,s);return c===void 0?Jr(t,r,e,s,!1):!!c},new Map,!0):qr(e,t,()=>void 0)}function Jr(e,t,n,r,i=!1){if(t===e)return!0;switch(typeof t){case`object`:return Yr(e,t,n,r);case`function`:return Object.keys(t).length>0?Jr(e,{...t},n,r,i):Gr(e,t);default:return Kr(e)&&i?typeof t!=`string`||t===``:Gr(e,t)}}function Yr(e,t,n,r){if(t==null)return!0;if(Array.isArray(t))return Zr(e,t,n,r);if(t instanceof Map)return Xr(e,t,n,r);if(t instanceof Set)return Qr(e,t,n,r);let i=Object.keys(t);if(e==null||fr(e))return i.length===0;if(i.length===0)return!0;if(r?.has(t))return r.get(t)===e;r?.set(t,e);try{for(let a=0;a<i.length;a++){let o=i[a];if(!fr(e)&&!(o in e)||t[o]===void 0&&e[o]!==void 0||t[o]===null&&e[o]!==null||!n(e[o],t[o],o,e,t,r))return!1}return!0}finally{r?.delete(t)}}function Xr(e,t,n,r){if(t.size===0)return!0;if(!(e instanceof Map))return!1;for(let[i,a]of t.entries())if(n(e.get(i),a,i,e,t,r)===!1)return!1;return!0}function Zr(e,t,n,r){if(t.length===0)return!0;if(!Array.isArray(e))return!1;let i=new Set;for(let a=0;a<t.length;a++){let o=t[a],s=!1;for(let c=0;c<e.length;c++){if(i.has(c))continue;let l=e[c],u=!1;if(n(l,o,a,e,t,r)&&(u=!0),u){i.add(c),s=!0;break}}if(!s)return!1}return!0}function Qr(e,t,n,r){return t.size===0||e instanceof Set&&Zr([...e],[...t],n,r)}function $r(e,t){return qr(e,t,()=>void 0)}function ei(e){return e=Wr(e),t=>$r(t,e)}function ti(e,t){return Br(e,(n,r,i,a)=>{let o=t?.(n,r,i,a);if(o!==void 0)return o;if(typeof e==`object`){if(hr(e)===`[object Object]`&&typeof e.constructor!=`function`){let t={};return a.set(e,t),Hr(t,e,i,a),t}switch(Object.prototype.toString.call(e)){case vr:case _r:case yr:{let t=new e.constructor(e?.valueOf());return Hr(t,e),t}case br:{let t={};return Hr(t,e),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}default:return}}})}function ni(e){return ti(e)}var ri=/^(?:0|[1-9]\d*)$/;function ii(e,t=2**53-1){switch(typeof e){case`number`:return Number.isInteger(e)&&e>=0&&e<t;case`symbol`:return!1;case`string`:return ri.test(e)}}function ai(e){return typeof e==`object`&&!!e&&hr(e)===`[object Arguments]`}function oi(e,t){let n;if(n=Array.isArray(t)?t:typeof t==`string`&&rn(t)&&!(t in Object(e))?sn(t):[t],n.length===0)return!1;let r=e;for(let e=0;e<n.length;e++){let t=n[e];if((r==null||!Object.hasOwn(r,t))&&!((Array.isArray(r)||ai(r))&&ii(t)&&t<r.length))return!1;r=r[t]}return!0}function si(e,t){switch(typeof e){case`object`:Object.is(e?.valueOf(),-0)&&(e=`-0`);break;case`number`:e=an(e);break}return t=ni(t),function(n){let r=cn(n,e);return r===void 0?oi(n,e):t===void 0?r===void 0:$r(r,t)}}function ci(e){if(e==null)return ur;switch(typeof e){case`function`:return e;case`object`:return Array.isArray(e)&&e.length===2?si(e[0],e[1]):ei(e);case`string`:case`symbol`:case`number`:return dr(e)}}function li(e){return Number.isSafeInteger(e)&&e>=0}function ui(e){return e!=null&&typeof e!=`function`&&li(e.length)}function di(e){return typeof e==`object`&&!!e}function fi(e){return di(e)&&ui(e)}function pi(e,t=ur){return fi(e)?cr(Array.from(e),lr(ci(t),1)):[]}function mi(e,t,n){return t===!0?pi(e,n):typeof t==`function`?pi(e,t):e}var hi=ce((e=>{var t=j();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore})),gi=ce(((e,t)=>{t.exports=hi()})),_i=ce((e=>{var t=j(),n=gi();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),vi=ce(((e,t)=>{t.exports=_i()})),yi=(0,F.createContext)(null),bi=vi(),xi=e=>e,B=()=>{var e=(0,F.useContext)(yi);return e?e.store.dispatch:xi},Si=()=>{},Ci=()=>Si,wi=(e,t)=>e===t;function V(e){var t=(0,F.useContext)(yi),n=(0,F.useMemo)(()=>t?t=>{if(t!=null)return e(t)}:Si,[t,e]);return(0,bi.useSyncExternalStoreWithSelector)(t?t.subscription.addNestedSub:Ci,t?t.store.getState:Si,t?t.store.getState:Si,n,wi)}function Ti(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!=`function`)throw TypeError(t)}function Ei(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!=`object`)throw TypeError(t)}function Di(e,t=`expected all items to be functions, instead received the following types: `){if(!e.every(e=>typeof e==`function`)){let n=e.map(e=>typeof e==`function`?`function ${e.name||`unnamed`}()`:typeof e).join(`, `);throw TypeError(`${t}[${n}]`)}}var Oi=e=>Array.isArray(e)?e:[e];function ki(e){let t=Array.isArray(e[0])?e[0]:e;return Di(t,`createSelector expects all input-selectors to be functions, but received the following types: `),t}function Ai(e,t){let n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}var ji=class{constructor(e){this.value=e}deref(){return this.value}},Mi=typeof WeakRef<`u`?WeakRef:ji,Ni=0,Pi=1;function Fi(){return{s:Ni,v:void 0,o:null,p:null}}function Ii(e,t={}){let n=Fi(),{resultEqualityCheck:r}=t,i,a=0;function o(){let t=n,{length:o}=arguments;for(let e=0,n=o;e<n;e++){let n=arguments[e];if(typeof n==`function`||typeof n==`object`&&n){let e=t.o;e===null&&(t.o=e=new WeakMap);let r=e.get(n);r===void 0?(t=Fi(),e.set(n,t)):t=r}else{let e=t.p;e===null&&(t.p=e=new Map);let r=e.get(n);r===void 0?(t=Fi(),e.set(n,t)):t=r}}let s=t,c;if(t.s===Pi)c=t.v;else if(c=e.apply(null,arguments),a++,r){let e=i?.deref?.()??i;e!=null&&r(e,c)&&(c=e,a!==0&&a--),i=typeof c==`object`&&c||typeof c==`function`?new Mi(c):c}return s.s=Pi,s.v=c,c}return o.clearCache=()=>{n=Fi(),o.resetResultsCount()},o.resultsCount=()=>a,o.resetResultsCount=()=>{a=0},o}function Li(e,...t){let n=typeof e==`function`?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t=0,r=0,i,a={},o=e.pop();typeof o==`object`&&(a=o,o=e.pop()),Ti(o,`createSelector expects an output function after the inputs, but received: [${typeof o}]`);let{memoize:s,memoizeOptions:c=[],argsMemoize:l=Ii,argsMemoizeOptions:u=[],devModeChecks:d={}}={...n,...a},f=Oi(c),p=Oi(u),m=ki(e),h=s(function(){return t++,o.apply(null,arguments)},...f),g=l(function(){r++;let e=Ai(m,arguments);return i=h.apply(null,e),i},...p);return Object.assign(g,{resultFunc:o,memoizedResultFunc:h,dependencies:m,dependencyRecomputations:()=>r,resetDependencyRecomputations:()=>{r=0},lastResult:()=>i,recomputations:()=>t,resetRecomputations:()=>{t=0},memoize:s,argsMemoize:l})};return Object.assign(r,{withTypes:()=>r}),r}var H=Li(Ii),Ri=Object.assign((e,t=H)=>{Ei(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);let n=Object.keys(e);return t(n.map(t=>e[t]),(...e)=>e.reduce((e,t,r)=>(e[n[r]]=t,e),{}))},{withTypes:()=>Ri});function zi(e,t=1){let n=[],r=Math.floor(t),i=(e,t)=>{for(let a=0;a<e.length;a++){let o=e[a];Array.isArray(o)&&t<r?i(o,t+1):n.push(o)}};return i(e,0),n}function Bi(e,t,n){return Kr(n)&&(typeof t==`number`&&ui(n)&&ii(t)&&t<n.length||typeof t==`string`&&t in n)?Gr(n[t],e):!1}function Vi(e){return typeof e==`symbol`?1:e===null?2:e===void 0?3:e===e?0:4}var Hi=(e,t,n)=>{if(e!==t){let r=Vi(e),i=Vi(t);if(r===i&&r===0){if(e<t)return n===`desc`?1:-1;if(e>t)return n===`desc`?-1:1}return n===`desc`?i-r:r-i}return 0};function Ui(e){return typeof e==`symbol`||e instanceof Symbol}var Wi=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Gi=/^\w*$/;function Ki(e,t){return Array.isArray(e)?!1:typeof e==`number`||typeof e==`boolean`||e==null||Ui(e)?!0:typeof e==`string`&&(Gi.test(e)||!Wi.test(e))||t!=null&&Object.hasOwn(t,e)}function qi(e,t,n,r){if(e==null)return[];n=r?void 0:n,Array.isArray(e)||(e=Object.values(e)),Array.isArray(t)||(t=t==null?[null]:[t]),t.length===0&&(t=[null]),Array.isArray(n)||(n=n==null?[]:[n]),n=n.map(e=>String(e));let i=(e,t)=>{let n=e;for(let e=0;e<t.length&&n!=null;++e)n=n[t[e]];return n},a=(e,t)=>t==null||e==null?t:typeof e==`object`&&`key`in e?Object.hasOwn(t,e.key)?t[e.key]:i(t,e.path):typeof e==`function`?e(t):Array.isArray(e)?i(t,e):typeof t==`object`?t[e]:t,o=t.map(e=>(Array.isArray(e)&&e.length===1&&(e=e[0]),e==null||typeof e==`function`||Array.isArray(e)||Ki(e)?e:{key:e,path:sn(e)}));return e.map(e=>({original:e,criteria:o.map(t=>a(t,e))})).slice().sort((e,t)=>{for(let r=0;r<o.length;r++){let i=Hi(e.criteria[r],t.criteria[r],n[r]);if(i!==0)return i}return 0}).map(e=>e.original)}function Ji(e,...t){let n=t.length;return n>1&&Bi(e,t[0],t[1])?t=[]:n>2&&Bi(t[0],t[1],t[2])&&(t=[t[0]]),qi(e,zi(t),[`asc`])}var Yi=e=>e.legend.settings,Xi=e=>e.legend.size,Zi=H([e=>e.legend.payload,Yi],(e,t)=>{var{itemSorter:n}=t,r=e.flat(1);return n?Ji(r,n):r});function Qi(){return V(Zi)}var $i=1;function ea(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[t,n]=(0,F.useState)({height:0,left:0,top:0,width:0});return[t,(0,F.useCallback)(e=>{if(e!=null){var r=e.getBoundingClientRect(),i={height:r.height,left:r.left,top:r.top,width:r.width};(Math.abs(i.height-t.height)>$i||Math.abs(i.left-t.left)>$i||Math.abs(i.top-t.top)>$i||Math.abs(i.width-t.width)>$i)&&n({height:i.height,left:i.left,top:i.top,width:i.width})}},[t.width,t.height,t.top,t.left,...e])]}function ta(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var na=typeof Symbol==`function`&&Symbol.observable||`@@observable`,ra=()=>Math.random().toString(36).substring(7).split(``).join(`.`),ia={INIT:`@@redux/INIT${ra()}`,REPLACE:`@@redux/REPLACE${ra()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${ra()}`};function aa(e){if(typeof e!=`object`||!e)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function oa(e,t,n){if(typeof e!=`function`)throw Error(ta(2));if(typeof t==`function`&&typeof n==`function`||typeof n==`function`&&typeof arguments[3]==`function`)throw Error(ta(0));if(typeof t==`function`&&n===void 0&&(n=t,t=void 0),n!==void 0){if(typeof n!=`function`)throw Error(ta(1));return n(oa)(e,t)}let r=e,i=t,a=new Map,o=a,s=0,c=!1;function l(){o===a&&(o=new Map,a.forEach((e,t)=>{o.set(t,e)}))}function u(){if(c)throw Error(ta(3));return i}function d(e){if(typeof e!=`function`)throw Error(ta(4));if(c)throw Error(ta(5));let t=!0;l();let n=s++;return o.set(n,e),function(){if(t){if(c)throw Error(ta(6));t=!1,l(),o.delete(n),a=null}}}function f(e){if(!aa(e))throw Error(ta(7));if(e.type===void 0)throw Error(ta(8));if(typeof e.type!=`string`)throw Error(ta(17));if(c)throw Error(ta(9));try{c=!0,i=r(i,e)}finally{c=!1}return(a=o).forEach(e=>{e()}),e}function p(e){if(typeof e!=`function`)throw Error(ta(10));r=e,f({type:ia.REPLACE})}function m(){let e=d;return{subscribe(t){if(typeof t!=`object`||!t)throw Error(ta(11));function n(){let e=t;e.next&&e.next(u())}return n(),{unsubscribe:e(n)}},[na](){return this}}}return f({type:ia.INIT}),{dispatch:f,subscribe:d,getState:u,replaceReducer:p,[na]:m}}function sa(e){Object.keys(e).forEach(t=>{let n=e[t];if(n(void 0,{type:ia.INIT})===void 0)throw Error(ta(12));if(n(void 0,{type:ia.PROBE_UNKNOWN_ACTION()})===void 0)throw Error(ta(13))})}function ca(e){let t=Object.keys(e),n={};for(let r=0;r<t.length;r++){let i=t[r];typeof e[i]==`function`&&(n[i]=e[i])}let r=Object.keys(n),i;try{sa(n)}catch(e){i=e}return function(e={},t){if(i)throw i;let a=!1,o={};for(let i=0;i<r.length;i++){let s=r[i],c=n[s],l=e[s],u=c(l,t);if(u===void 0)throw t&&t.type,Error(ta(14));o[s]=u,a||=u!==l}return a||=r.length!==Object.keys(e).length,a?o:e}}function la(...e){return e.length===0?e=>e:e.length===1?e[0]:e.reduce((e,t)=>(...n)=>e(t(...n)))}function ua(...e){return t=>(n,r)=>{let i=t(n,r),a=()=>{throw Error(ta(15))},o={getState:i.getState,dispatch:(e,...t)=>a(e,...t)};return a=la(...e.map(e=>e(o)))(i.dispatch),{...i,dispatch:a}}}function da(e){return aa(e)&&`type`in e&&typeof e.type==`string`}var fa=Symbol.for(`immer-nothing`),pa=Symbol.for(`immer-draftable`),ma=Symbol.for(`immer-state`);function ha(e,...t){throw Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var ga=Object,_a=ga.getPrototypeOf,va=`constructor`,ya=`prototype`,ba=`configurable`,xa=`enumerable`,Sa=`writable`,Ca=`value`,wa=e=>!!e&&!!e[ma];function Ta(e){return e?Oa(e)||Fa(e)||!!e[pa]||!!e[va]?.[pa]||Ia(e)||La(e):!1}var Ea=ga[ya][va].toString(),Da=new WeakMap;function Oa(e){if(!e||!Ra(e))return!1;let t=_a(e);if(t===null||t===ga[ya])return!0;let n=ga.hasOwnProperty.call(t,va)&&t[va];if(n===Object)return!0;if(!za(n))return!1;let r=Da.get(n);return r===void 0&&(r=Function.toString.call(n),Da.set(n,r)),r===Ea}function ka(e,t,n=!0){Aa(e)===0?(n?Reflect.ownKeys(e):ga.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Aa(e){let t=e[ma];return t?t.type_:Fa(e)?1:Ia(e)?2:La(e)?3:0}var ja=(e,t,n=Aa(e))=>n===2?e.has(t):ga[ya].hasOwnProperty.call(e,t),Ma=(e,t,n=Aa(e))=>n===2?e.get(t):e[t],Na=(e,t,n,r=Aa(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function Pa(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}var Fa=Array.isArray,Ia=e=>e instanceof Map,La=e=>e instanceof Set,Ra=e=>typeof e==`object`,za=e=>typeof e==`function`,Ba=e=>typeof e==`boolean`;function Va(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var Ha=e=>e.copy_||e.base_,Ua=e=>e.modified_?e.copy_:e.base_;function Wa(e,t){if(Ia(e))return new Map(e);if(La(e))return new Set(e);if(Fa(e))return Array[ya].slice.call(e);let n=Oa(e);if(t===!0||t===`class_only`&&!n){let t=ga.getOwnPropertyDescriptors(e);delete t[ma];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){let i=n[r],a=t[i];a[Sa]===!1&&(a[Sa]=!0,a[ba]=!0),(a.get||a.set)&&(t[i]={[ba]:!0,[Sa]:!0,[xa]:a[xa],[Ca]:e[i]})}return ga.create(_a(e),t)}else{let t=_a(e);if(t!==null&&n)return{...e};let r=ga.create(t);return ga.assign(r,e)}}function Ga(e,t=!1){return Ja(e)||wa(e)||!Ta(e)?e:(Aa(e)>1&&ga.defineProperties(e,{set:qa,add:qa,clear:qa,delete:qa}),ga.freeze(e),t&&ka(e,(e,t)=>{Ga(t,!0)},!1),e)}function Ka(){ha(2)}var qa={[Ca]:Ka};function Ja(e){return e===null||!Ra(e)||ga.isFrozen(e)}var Ya=`MapSet`,Xa=`Patches`,Za=`ArrayMethods`,Qa={};function $a(e){let t=Qa[e];return t||ha(0,e),t}var eo=e=>!!Qa[e],to,no=()=>to,ro=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:eo(Ya)?$a(Ya):void 0,arrayMethodsPlugin_:eo(Za)?$a(Za):void 0});function io(e,t){t&&(e.patchPlugin_=$a(Xa),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function ao(e){oo(e),e.drafts_.forEach(co),e.drafts_=null}function oo(e){e===to&&(to=e.parent_)}var so=e=>to=ro(to,e);function co(e){let t=e[ma];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function lo(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[ma].modified_&&(ao(t),ha(4)),Ta(e)&&(e=uo(t,e));let{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[ma].base_,e,t)}else e=uo(t,n);return fo(t,e,!0),ao(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===fa?void 0:e}function uo(e,t){if(Ja(t))return t;let n=t[ma];if(!n)return bo(t,e.handledSet_,e);if(!mo(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){let{callbacks_:t}=n;if(t)for(;t.length>0;)t.pop()(e);vo(n,e)}return n.copy_}function fo(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Ga(t,n)}function po(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var mo=(e,t)=>e.scope_===t,ho=[];function go(e,t,n,r){let i=Ha(e),a=e.type_;if(r!==void 0&&Ma(i,r,a)===t){Na(i,r,n,a);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;ka(i,(e,n)=>{if(wa(n)){let r=t.get(n)||[];r.push(e),t.set(n,r)}})}let o=e.draftLocations_.get(t)??ho;for(let e of o)Na(i,e,n,a)}function _o(e,t,n){e.callbacks_.push(function(r){let i=t;if(!i||!mo(i,r))return;r.mapSetPlugin_?.fixSetContents(i);let a=Ua(i);go(e,i.draft_??i,a,n),vo(i,r)})}function vo(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let r=n.getPath(e);r&&n.generatePatches_(e,r,t)}po(e)}}function yo(e,t,n){let{scope_:r}=e;if(wa(n)){let i=n[ma];mo(i,r)&&i.callbacks_.push(function(){ko(e),go(e,n,Ua(i),t)})}else Ta(n)&&e.callbacks_.push(function(){let i=Ha(e);e.type_===3?i.has(n)&&bo(n,r.handledSet_,r):Ma(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&bo(Ma(e.copy_,t,e.type_),r.handledSet_,r)})}function bo(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||wa(e)||t.has(e)||!Ta(e)||Ja(e)?e:(t.add(e),ka(e,(r,i)=>{if(wa(i)){let t=i[ma];mo(t,n)&&(Na(e,r,Ua(t),e.type_),po(t))}else Ta(i)&&bo(i,t,n)}),e)}function xo(e,t){let n=Fa(e),r={type_:+!!n,scope_:t?t.scope_:no(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},i=r,a=So;n&&(i=[r],a=Co);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var So={get(e,t){if(t===ma)return e;let n=e.scope_.arrayMethodsPlugin_,r=e.type_===1&&typeof t==`string`;if(r&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);let i=Ha(e);if(!ja(i,t,e.type_))return Eo(e,i,t);let a=i[t];if(e.finalized_||!Ta(a)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&Va(t))return a;if(a===wo(e.base_,t)||To(e,t,a)){ko(e);let n=e.type_===1?+t:t,r=jo(e.scope_,a,e,n);return e.copy_[n]=r}return a},has(e,t){return t in Ha(e)},ownKeys(e){return Reflect.ownKeys(Ha(e))},set(e,t,n){let r=Do(Ha(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=wo(Ha(e),t),i=r?.[ma];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(Pa(n,r)&&(n!==void 0||ja(e.base_,t,e.type_)))return!0;ko(e),Oo(e)}return e.copy_[t]===n&&(n!==void 0||ja(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])?!0:(e.copy_[t]=n,e.assigned_.set(t,!0),yo(e,t,n),!0)},deleteProperty(e,t){return ko(e),wo(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Oo(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=Ha(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[Sa]:!0,[ba]:e.type_!==1||t!==`length`,[xa]:r[xa],[Ca]:n[t]}},defineProperty(){ha(11)},getPrototypeOf(e){return _a(e.base_)},setPrototypeOf(){ha(12)}},Co={};for(let e in So){let t=So[e];Co[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}Co.deleteProperty=function(e,t){return Co.set.call(this,e,t,void 0)},Co.set=function(e,t,n){return So.set.call(this,e[0],t,n,e[0])};function wo(e,t){let n=e[ma];return(n?Ha(n):e)[t]}function To(e,t,n){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!Ta(n)||n[ma]?!1:e.baseRefs_.has(n)}function Eo(e,t,n){let r=Do(t,n);return r?Ca in r?r[Ca]:r.get?.call(e.draft_):void 0}function Do(e,t){if(!(t in e))return;let n=_a(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=_a(n)}}function Oo(e){e.modified_||(e.modified_=!0,e.parent_&&Oo(e.parent_))}function ko(e){e.copy_||=(e.assigned_=new Map,Wa(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Ao=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(za(e)&&!za(t)){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}za(t)||ha(6),n!==void 0&&!za(n)&&ha(7);let r;if(Ta(e)){let i=so(this),a=jo(i,e,void 0),o=!0;try{r=t(a),o=!1}finally{o?ao(i):oo(i)}return io(i,n),lo(r,i)}else if(!e||!Ra(e)){if(r=t(e),r===void 0&&(r=e),r===fa&&(r=void 0),this.autoFreeze_&&Ga(r,!0),n){let t=[],i=[];$a(Xa).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}else ha(1,e)},this.produceWithPatches=(e,t)=>{if(za(e))return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;return[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},Ba(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),Ba(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),Ba(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Ta(e)||ha(8),wa(e)&&(e=Mo(e));let t=so(this),n=jo(t,e,void 0);return n[ma].isManual_=!0,oo(t),n}finishDraft(e,t){let n=e&&e[ma];(!n||!n.isManual_)&&ha(9);let{scope_:r}=n;return io(r,t),lo(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let r=t[n];if(r.path.length===0&&r.op===`replace`){e=r.value;break}}n>-1&&(t=t.slice(n+1));let r=$a(Xa).applyPatches_;return wa(e)?r(e,t):this.produce(e,e=>r(e,t))}};function jo(e,t,n,r){let[i,a]=Ia(t)?$a(Ya).proxyMap_(t,n):La(t)?$a(Ya).proxySet_(t,n):xo(t,n);return(n?.scope_??no()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?_o(n,a,r):a.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(a);let{patchPlugin_:t}=e;a.modified_&&t&&t.generatePatches_(a,[],e)}),i}function Mo(e){return wa(e)||ha(10,e),No(e)}function No(e){if(!Ta(e)||Ja(e))return e;let t=e[ma],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Wa(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=Wa(e,!0);return ka(n,(e,t)=>{Na(n,e,No(t))},r),t&&(t.finalized_=!1),n}var Po=new Ao().produce;function Fo(e){return({dispatch:t,getState:n})=>r=>i=>typeof i==`function`?i(t,n,e):r(i)}var Io=Fo(),Lo=Fo,Ro=typeof window<`u`&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]==`object`?la:la.apply(null,arguments)};typeof window<`u`&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;function zo(e,t){function n(...n){if(t){let r=t(...n);if(!r)throw Error(qs(0));return{type:e,payload:r.payload,...`meta`in r&&{meta:r.meta},...`error`in r&&{error:r.error}}}return{type:e,payload:n[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=t=>da(t)&&t.type===e,n}var Bo=class e extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,e.prototype)}static get[Symbol.species](){return e}concat(...e){return super.concat.apply(this,e)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new e(...t[0].concat(this)):new e(...t.concat(this))}};function Vo(e){return Ta(e)?Po(e,()=>{}):e}function Ho(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function Uo(e){return typeof e==`boolean`}var Wo=()=>function(e){let{thunk:t=!0,immutableCheck:n=!0,serializableCheck:r=!0,actionCreatorCheck:i=!0}=e??{},a=new Bo;return t&&(Uo(t)?a.push(Io):a.push(Lo(t.extraArgument))),a},Go=`RTK_autoBatch`,U=()=>e=>({payload:e,meta:{[Go]:!0}}),Ko=e=>t=>{setTimeout(t,e)},qo=(e,t)=>n=>{let r=!1,i=()=>{r||(r=!0,cancelAnimationFrame(a),clearTimeout(o),n())},a=e(i),o=setTimeout(i,t)},Jo=(e={type:`raf`})=>t=>(...n)=>{let r=t(...n),i=!0,a=!1,o=!1,s=new Set,c=e.type===`tick`?queueMicrotask:e.type===`raf`?typeof window<`u`&&window.requestAnimationFrame?qo(window.requestAnimationFrame,100):Ko(10):e.type===`callback`?e.queueNotification:Ko(e.timeout),l=()=>{o=!1,a&&(a=!1,s.forEach(e=>e()))};return Object.assign({},r,{subscribe(e){let t=r.subscribe(()=>i&&e());return s.add(e),()=>{t(),s.delete(e)}},dispatch(e){try{return i=!e?.meta?.[Go],a=!i,a&&(o||(o=!0,c(l))),r.dispatch(e)}finally{i=!0}}})},Yo=e=>function(t){let{autoBatch:n=!0}=t??{},r=new Bo(e);return n&&r.push(Jo(typeof n==`object`?n:void 0)),r};function Xo(e){let t=Wo(),{reducer:n=void 0,middleware:r,devTools:i=!0,duplicateMiddlewareCheck:a=!0,preloadedState:o=void 0,enhancers:s=void 0}=e||{},c;if(typeof n==`function`)c=n;else if(aa(n))c=ca(n);else throw Error(qs(1));let l;l=typeof r==`function`?r(t):t();let u=la;i&&(u=Ro({trace:!1,...typeof i==`object`&&i}));let d=Yo(ua(...l)),f=typeof s==`function`?s(d):d(),p=u(...f);return oa(c,o,p)}function Zo(e){let t={},n=[],r,i={addCase(e,n){let r=typeof e==`string`?e:e.type;if(!r)throw Error(qs(28));if(r in t)throw Error(qs(29));return t[r]=n,i},addAsyncThunk(e,r){return r.pending&&(t[e.pending.type]=r.pending),r.rejected&&(t[e.rejected.type]=r.rejected),r.fulfilled&&(t[e.fulfilled.type]=r.fulfilled),r.settled&&n.push({matcher:e.settled,reducer:r.settled}),i},addMatcher(e,t){return n.push({matcher:e,reducer:t}),i},addDefaultCase(e){return r=e,i}};return e(i),[t,n,r]}function Qo(e){return typeof e==`function`}function $o(e,t){let[n,r,i]=Zo(t),a;if(Qo(e))a=()=>Vo(e());else{let t=Vo(e);a=()=>t}function o(e=a(),t){let o=[n[t.type],...r.filter(({matcher:e})=>e(t)).map(({reducer:e})=>e)];return o.filter(e=>!!e).length===0&&(o=[i]),o.reduce((e,n)=>{if(n)if(wa(e)){let r=n(e,t);return r===void 0?e:r}else if(Ta(e))return Po(e,e=>n(e,t));else{let r=n(e,t);if(r===void 0){if(e===null)return e;throw Error(`A case reducer on a non-draftable value must not return undefined`)}return r}return e},e)}return o.getInitialState=a,o}var es=`ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW`,ts=(e=21)=>{let t=``,n=e;for(;n--;)t+=es[Math.random()*64|0];return t},ns=Symbol.for(`rtk-slice-createasyncthunk`);function rs(e,t){return`${e}/${t}`}function is({creators:e}={}){let t=e?.asyncThunk?.[ns];return function(e){let{name:n,reducerPath:r=n}=e;if(!n)throw Error(qs(11));let i=(typeof e.reducers==`function`?e.reducers(ss()):e.reducers)||{},a=Object.keys(i),o={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(e,t){let n=typeof e==`string`?e:e.type;if(!n)throw Error(qs(12));if(n in o.sliceCaseReducersByType)throw Error(qs(13));return o.sliceCaseReducersByType[n]=t,s},addMatcher(e,t){return o.sliceMatchers.push({matcher:e,reducer:t}),s},exposeAction(e,t){return o.actionCreators[e]=t,s},exposeCaseReducer(e,t){return o.sliceCaseReducersByName[e]=t,s}};a.forEach(r=>{let a=i[r],o={reducerName:r,type:rs(n,r),createNotation:typeof e.reducers==`function`};ls(a)?ds(o,a,s,t):cs(o,a,s)});function c(){let[t={},n=[],r=void 0]=typeof e.extraReducers==`function`?Zo(e.extraReducers):[e.extraReducers],i={...t,...o.sliceCaseReducersByType};return $o(e.initialState,e=>{for(let t in i)e.addCase(t,i[t]);for(let t of o.sliceMatchers)e.addMatcher(t.matcher,t.reducer);for(let t of n)e.addMatcher(t.matcher,t.reducer);r&&e.addDefaultCase(r)})}let l=e=>e,u=new Map,d=new WeakMap,f;function p(e,t){return f||=c(),f(e,t)}function m(){return f||=c(),f.getInitialState()}function h(t,n=!1){function r(e){let i=e[t];return i===void 0&&n&&(i=Ho(d,r,m)),i}function i(t=l){return Ho(Ho(u,n,()=>new WeakMap),t,()=>{let r={};for(let[i,a]of Object.entries(e.selectors??{}))r[i]=as(a,t,()=>Ho(d,t,m),n);return r})}return{reducerPath:t,getSelectors:i,get selectors(){return i(r)},selectSlice:r}}let g={name:n,reducer:p,actions:o.actionCreators,caseReducers:o.sliceCaseReducersByName,getInitialState:m,...h(r),injectInto(e,{reducerPath:t,...n}={}){let i=t??r;return e.inject({reducerPath:i,reducer:p},n),{...g,...h(i,!0)}}};return g}}function as(e,t,n,r){function i(i,...a){let o=t(i);return o===void 0&&r&&(o=n()),e(o,...a)}return i.unwrapped=e,i}var os=is();function ss(){function e(e,t){return{_reducerDefinitionType:`asyncThunk`,payloadCreator:e,...t}}return e.withTypes=()=>e,{reducer(e){return Object.assign({[e.name](...t){return e(...t)}}[e.name],{_reducerDefinitionType:`reducer`})},preparedReducer(e,t){return{_reducerDefinitionType:`reducerWithPrepare`,prepare:e,reducer:t}},asyncThunk:e}}function cs({type:e,reducerName:t,createNotation:n},r,i){let a,o;if(`reducer`in r){if(n&&!us(r))throw Error(qs(17));a=r.reducer,o=r.prepare}else a=r;i.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,o?zo(e,o):zo(e))}function ls(e){return e._reducerDefinitionType===`asyncThunk`}function us(e){return e._reducerDefinitionType===`reducerWithPrepare`}function ds({type:e,reducerName:t},n,r,i){if(!i)throw Error(qs(18));let{payloadCreator:a,fulfilled:o,pending:s,rejected:c,settled:l,options:u}=n,d=i(e,a,u);r.exposeAction(t,d),o&&r.addCase(d.fulfilled,o),s&&r.addCase(d.pending,s),c&&r.addCase(d.rejected,c),l&&r.addMatcher(d.settled,l),r.exposeCaseReducer(t,{fulfilled:o||fs,pending:s||fs,rejected:c||fs,settled:l||fs})}function fs(){}var ps=`task`,ms=`listener`,hs=`completed`,gs=`cancelled`,_s=`task-${gs}`,vs=`task-${hs}`,ys=`${ms}-${gs}`,bs=`${ms}-${hs}`,xs=class{constructor(e){this.code=e,this.message=`${ps} ${gs} (reason: ${e})`}code;name=`TaskAbortError`;message},Ss=(e,t)=>{if(typeof e!=`function`)throw TypeError(qs(32))},Cs=()=>{},ws=(e,t=Cs)=>(e.catch(t),e),Ts=(e,t)=>(e.addEventListener(`abort`,t,{once:!0}),()=>e.removeEventListener(`abort`,t)),Es=e=>{if(e.aborted)throw new xs(e.reason)};function Ds(e,t){let n=Cs;return new Promise((r,i)=>{let a=()=>i(new xs(e.reason));if(e.aborted){a();return}n=Ts(e,a),t.finally(()=>n()).then(r,i)}).finally(()=>{n=Cs})}var Os=async(e,t)=>{try{return await Promise.resolve(),{status:`ok`,value:await e()}}catch(e){return{status:e instanceof xs?`cancelled`:`rejected`,error:e}}finally{t?.()}},ks=e=>t=>ws(Ds(e,t).then(t=>(Es(e),t))),As=e=>{let t=ks(e);return e=>t(new Promise(t=>setTimeout(t,e)))},{assign:js}=Object,Ms={},Ns=`listenerMiddleware`,Ps=(e,t)=>{let n=t=>Ts(e,()=>t.abort(e.reason));return(r,i)=>{Ss(r,`taskExecutor`);let a=new AbortController;n(a);let o=Os(async()=>{Es(e),Es(a.signal);let t=await r({pause:ks(a.signal),delay:As(a.signal),signal:a.signal});return Es(a.signal),t},()=>a.abort(vs));return i?.autoJoin&&t.push(o.catch(Cs)),{result:ks(e)(o),cancel(){a.abort(_s)}}}},Fs=(e,t)=>{let n=async(n,r)=>{Es(t);let i=()=>{},a=[new Promise((t,r)=>{let a=e({predicate:n,effect:(e,n)=>{n.unsubscribe(),t([e,n.getState(),n.getOriginalState()])}});i=()=>{a(),r()}})];r!=null&&a.push(new Promise(e=>setTimeout(e,r,null)));try{let e=await Ds(t,Promise.race(a));return Es(t),e}finally{i()}};return((e,t)=>ws(n(e,t)))},Is=e=>{let{type:t,actionCreator:n,matcher:r,predicate:i,effect:a}=e;if(t)i=zo(t).match;else if(n)t=n.type,i=n.match;else if(r)i=r;else if(!i)throw Error(qs(21));return Ss(a,`options.listener`),{predicate:i,type:t,effect:a}},Ls=js(e=>{let{type:t,predicate:n,effect:r}=Is(e);return{id:ts(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw Error(qs(22))}}},{withTypes:()=>Ls}),Rs=(e,t)=>{let{type:n,effect:r,predicate:i}=Is(t);return Array.from(e.values()).find(e=>(typeof n==`string`?e.type===n:e.predicate===i)&&e.effect===r)},zs=e=>{e.pending.forEach(e=>{e.abort(ys)})},Bs=(e,t)=>()=>{for(let e of t.keys())zs(e);e.clear()},Vs=(e,t,n)=>{try{e(t,n)}catch(e){setTimeout(()=>{throw e},0)}},Hs=js(zo(`${Ns}/add`),{withTypes:()=>Hs}),Us=zo(`${Ns}/removeAll`),Ws=js(zo(`${Ns}/remove`),{withTypes:()=>Ws}),Gs=(...e)=>{console.error(`${Ns}/error`,...e)},Ks=(e={})=>{let t=new Map,n=new Map,r=e=>{let t=n.get(e)??0;n.set(e,t+1)},i=e=>{let t=n.get(e)??1;t===1?n.delete(e):n.set(e,t-1)},{extra:a,onError:o=Gs}=e;Ss(o,`onError`);let s=e=>(e.unsubscribe=()=>t.delete(e.id),t.set(e.id,e),t=>{e.unsubscribe(),t?.cancelActive&&zs(e)}),c=(e=>{let n=Rs(t,e)??Ls(e);return s(n)});js(c,{withTypes:()=>c});let l=e=>{let n=Rs(t,e);return n&&(n.unsubscribe(),e.cancelActive&&zs(n)),!!n};js(l,{withTypes:()=>l});let u=async(e,n,s,l)=>{let u=new AbortController,d=Fs(c,u.signal),f=[];try{e.pending.add(u),r(e),await Promise.resolve(e.effect(n,js({},s,{getOriginalState:l,condition:(e,t)=>d(e,t).then(Boolean),take:d,delay:As(u.signal),pause:ks(u.signal),extra:a,signal:u.signal,fork:Ps(u.signal,f),unsubscribe:e.unsubscribe,subscribe:()=>{t.set(e.id,e)},cancelActiveListeners:()=>{e.pending.forEach((e,t,n)=>{e!==u&&(e.abort(ys),n.delete(e))})},cancel:()=>{u.abort(ys),e.pending.delete(u)},throwIfCancelled:()=>{Es(u.signal)}})))}catch(e){e instanceof xs||Vs(o,e,{raisedBy:`effect`})}finally{await Promise.all(f),u.abort(bs),i(e),e.pending.delete(u)}},d=Bs(t,n);return{middleware:e=>n=>r=>{if(!da(r))return n(r);if(Hs.match(r))return c(r.payload);if(Us.match(r)){d();return}if(Ws.match(r))return l(r.payload);let i=e.getState(),a=()=>{if(i===Ms)throw Error(qs(23));return i},s;try{if(s=n(r),t.size>0){let n=e.getState(),s=Array.from(t.values());for(let t of s){let s=!1;try{s=t.predicate(r,n,i)}catch(e){s=!1,Vs(o,e,{raisedBy:`predicate`})}s&&u(t,r,e,a)}}}finally{i=Ms}return s},startListening:c,stopListening:l,clearListeners:d}};function qs(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Js=os({name:`chartLayout`,initialState:{layoutType:`horizontal`,width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){e.margin.top=t.payload.top??0,e.margin.right=t.payload.right??0,e.margin.bottom=t.payload.bottom??0,e.margin.left=t.payload.left??0},setScale(e,t){e.scale=t.payload}}}),{setMargin:Ys,setLayout:Xs,setChartSize:Zs,setScale:Qs}=Js.actions,$s=Js.reducer;function ec(e,t,n){return Array.isArray(e)&&e&&t+n!==0?e.slice(t,n+1):e}function W(e){return Number.isFinite(e)}function tc(e){return typeof e==`number`&&e>0&&Number.isFinite(e)}function nc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function rc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?nc(Object(n),!0).forEach(function(t){ic(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nc(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ic(e,t,n){return(t=ac(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ac(e){var t=oc(e,`string`);return typeof t==`symbol`?t:t+``}function oc(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function sc(e,t,n){return z(e)||z(t)?n:hn(t)?cn(e,t,n):typeof t==`function`?t(e):n}var cc=(e,t,n)=>{if(t&&n){var{width:r,height:i}=n,{align:a,verticalAlign:o,layout:s}=t;if((s===`vertical`||s===`horizontal`&&o===`middle`)&&a!==`center`&&R(e[a]))return rc(rc({},e),{},{[a]:e[a]+(r||0)});if((s===`horizontal`||s===`vertical`&&a===`center`)&&o!==`middle`&&R(e[o]))return rc(rc({},e),{},{[o]:e[o]+(i||0)})}return e},lc=(e,t)=>e===`horizontal`&&t===`xAxis`||e===`vertical`&&t===`yAxis`||e===`centric`&&t===`angleAxis`||e===`radial`&&t===`radiusAxis`,uc=(e,t,n,r)=>{if(r)return e.map(e=>e.coordinate);var i,a,o=e.map(e=>(e.coordinate===t&&(i=!0),e.coordinate===n&&(a=!0),e.coordinate));return i||o.push(t),a||o.push(n),o},dc=(e,t,n)=>{if(!e)return null;var{duplicateDomain:r,type:i,range:a,scale:o,realScaleType:s,isCategorical:c,categoricalDomain:l,tickCount:u,ticks:d,niceTicks:f,axisType:p}=e;if(!o)return null;var m=s===`scaleBand`&&o.bandwidth?o.bandwidth()/2:2,h=(t||n)&&i===`category`&&o.bandwidth?o.bandwidth()/m:0;return h=p===`angleAxis`&&a&&a.length>=2?fn(a[0]-a[1])*2*h:h,t&&(d||f)?(d||f||[]).map((e,t)=>{var n=r?r.indexOf(e):e,i=o.map(n);return W(i)?{coordinate:i+h,value:e,offset:h,index:t}:null}).filter(Cn):c&&l?l.map((e,t)=>{var n=o.map(e);return W(n)?{coordinate:n+h,value:e,index:t,offset:h}:null}).filter(Cn):o.ticks&&!n&&u!=null?o.ticks(u).map((e,t)=>{var n=o.map(e);return W(n)?{coordinate:n+h,value:e,index:t,offset:h}:null}).filter(Cn):o.domain().map((e,t)=>{var n=o.map(e);return W(n)?{coordinate:n+h,value:r?r[e]:e,index:t,offset:h}:null}).filter(Cn)},fc=(e,t)=>{if(!t||t.length!==2||!R(t[0])||!R(t[1]))return e;var n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]),i=[e[0],e[1]];return(!R(e[0])||e[0]<n)&&(i[0]=n),(!R(e[1])||e[1]>r)&&(i[1]=r),i[0]>r&&(i[0]=r),i[1]<n&&(i[1]=n),i},pc={sign:e=>{var t=e.length;if(!(t<=0)){var n=e[0]?.length;if(!(n==null||n<=0))for(var r=0;r<n;++r)for(var i=0,a=0,o=0;o<t;++o){var s=e[o]?.[r];if(s!=null){var c=s[1],l=s[0],u=pn(c)?l:c;u>=0?(s[0]=i,i+=u,s[1]=i):(s[0]=a,a+=u,s[1]=a)}}}},expand:Qt,none:qt,silhouette:$t,wiggle:en,positive:e=>{var t=e.length;if(!(t<=0)){var n=e[0]?.length;if(!(n==null||n<=0))for(var r=0;r<n;++r)for(var i=0,a=0;a<t;++a){var o=e[a]?.[r];if(o!=null){var s=pn(o[1])?o[0]:o[1];s>=0?(o[0]=i,i+=s,o[1]=i):(o[0]=0,o[1]=0)}}}}},mc=(e,t,n)=>{var r=pc[n]??qt,i=Zt().keys(t).value((e,t)=>Number(sc(e,t,0))).order(Jt).offset(r)(e);return i.forEach((n,r)=>{n.forEach((n,i)=>{var a=sc(e[i],t[r],0);Array.isArray(a)&&a.length===2&&R(a[0])&&R(a[1])&&(n[0]=a[0],n[1]=a[1])})}),i};function hc(e){return e==null?void 0:String(e)}var gc=e=>{var{axis:t,ticks:n,offset:r,bandSize:i,entry:a,index:o}=e;if(t.type===`category`)return n[o]?n[o].coordinate+r:null;var s=sc(a,t.dataKey,t.scale.domain()[o]);if(z(s))return null;var c=t.scale.map(s);return R(c)?c-i/2+r:null},_c=e=>{var{numericAxis:t}=e,n=t.scale.domain();if(t.type===`number`){var r=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]);return r<=0&&i>=0?0:i<0?i:r}return n[0]},vc=e=>{var t=e.flat(2).filter(R);return[Math.min(...t),Math.max(...t)]},yc=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],bc=(e,t,n)=>{if(e!=null)return yc(Object.keys(e).reduce((r,i)=>{var a=e[i];if(!a)return r;var{stackedData:o}=a,s=o.reduce((e,r)=>{var i=vc(ec(r,t,n));return!W(i[0])||!W(i[1])?e:[Math.min(e[0],i[0]),Math.max(e[1],i[1])]},[1/0,-1/0]);return[Math.min(s[0],r[0]),Math.max(s[1],r[1])]},[1/0,-1/0]))},xc=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Sc=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Cc=(e,t,n)=>{if(e&&e.scale&&e.scale.bandwidth){var r=e.scale.bandwidth();if(!n||r>0)return r}if(e&&t&&t.length>=2){for(var i=Ji(t,e=>e.coordinate),a=1/0,o=1,s=i.length;o<s;o++){var c=i[o],l=i[o-1];a=Math.min((c?.coordinate||0)-(l?.coordinate||0),a)}return a===1/0?0:a}return n?void 0:0};function wc(e){var{tooltipEntrySettings:t,dataKey:n,payload:r,value:i,name:a}=e;return rc(rc({},t),{},{dataKey:n,payload:r,value:i,name:a})}function Tc(e,t){if(e)return String(e);if(typeof t==`string`)return t}var Ec=(e,t)=>{if(t===`horizontal`)return e.relativeX;if(t===`vertical`)return e.relativeY},Dc=(e,t)=>t===`centric`?e.angle:e.radius,Oc=e=>e.layout.width,kc=e=>e.layout.height,Ac=e=>e.layout.scale,jc=e=>e.layout.margin,Mc=H(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),Nc=H(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),Pc=`data-recharts-item-index`;function Fc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ic(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Fc(Object(n),!0).forEach(function(t){Lc(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fc(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Lc(e,t,n){return(t=Rc(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Rc(e){var t=zc(e,`string`);return typeof t==`symbol`?t:t+``}function zc(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var Bc=e=>e.brush.height;function Vc(e){return Nc(e).reduce((e,t)=>t.orientation===`left`&&!t.mirror&&!t.hide?e+(typeof t.width==`number`?t.width:60):e,0)}function Hc(e){return Nc(e).reduce((e,t)=>t.orientation===`right`&&!t.mirror&&!t.hide?e+(typeof t.width==`number`?t.width:60):e,0)}function Uc(e){return Mc(e).reduce((e,t)=>t.orientation===`top`&&!t.mirror&&!t.hide?e+t.height:e,0)}function Wc(e){return Mc(e).reduce((e,t)=>t.orientation===`bottom`&&!t.mirror&&!t.hide?e+t.height:e,0)}var Gc=H([Oc,kc,jc,Bc,Vc,Hc,Uc,Wc,Yi,Xi],(e,t,n,r,i,a,o,s,c,l)=>{var u={left:(n.left||0)+i,right:(n.right||0)+a},d=Ic(Ic({},{top:(n.top||0)+o,bottom:(n.bottom||0)+s}),u),f=d.bottom;d.bottom+=r,d=cc(d,c,l);var p=e-d.left-d.right,m=t-d.top-d.bottom;return Ic(Ic({brushBottom:f},d),{},{width:Math.max(p,0),height:Math.max(m,0)})}),Kc=H(Gc,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),qc=H(Oc,kc,(e,t)=>({x:0,y:0,width:e,height:t})),Jc=(0,F.createContext)(null),Yc=()=>(0,F.useContext)(Jc)!=null,Xc=e=>e.brush,Zc=H([Xc,Gc,jc],(e,t,n)=>({height:e.height,x:R(e.x)?e.x:t.left,y:R(e.y)?e.y:t.top+t.height+t.brushBottom-(n?.bottom||0),width:R(e.width)?e.width:t.width}));function Qc(e,t,{signal:n,edges:r}={}){let i,a=null,o=r!=null&&r.includes(`leading`),s=r==null||r.includes(`trailing`),c=()=>{a!==null&&(e.apply(i,a),i=void 0,a=null)},l=()=>{s&&c(),p()},u=null,d=()=>{u!=null&&clearTimeout(u),u=setTimeout(()=>{u=null,l()},t)},f=()=>{u!==null&&(clearTimeout(u),u=null)},p=()=>{f(),i=void 0,a=null},m=()=>{c()},h=function(...e){if(n?.aborted)return;i=this,a=e;let t=u==null;d(),o&&t&&c()};return h.schedule=d,h.cancel=p,h.flush=m,n?.addEventListener(`abort`,p,{once:!0}),h}function $c(e,t=0,n={}){typeof n!=`object`&&(n={});let{leading:r=!1,trailing:i=!0,maxWait:a}=n,o=[,,];r&&(o[0]=`leading`),i&&(o[1]=`trailing`);let s,c=null,l=Qc(function(...t){s=e.apply(this,t),c=null},t,{edges:o}),u=function(...t){return a!=null&&(c===null&&(c=Date.now()),Date.now()-c>=a)?(s=e.apply(this,t),c=Date.now(),l.cancel(),l.schedule(),s):(l.apply(this,t),s)};return u.cancel=l.cancel,u.flush=()=>(l.flush(),s),u}function el(e,t=0,n={}){let{leading:r=!0,trailing:i=!0}=n;return $c(e,t,{leading:r,maxWait:t,trailing:i})}var tl=function(e,t){var n=[...arguments].slice(2);if(typeof console<`u`&&console.warn&&(t===void 0&&console.warn(`LogUtils requires an error message argument`),!e))if(t===void 0)console.warn(`Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.`);else{var r=0;console.warn(t.replace(/%s/g,()=>n[r++]))}},nl={width:`100%`,height:`100%`,debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},rl=(e,t,n)=>{var{width:r=nl.width,height:i=nl.height,aspect:a,maxHeight:o}=n,s=mn(r)?e:Number(r),c=mn(i)?t:Number(i);return a&&a>0&&(s?c=s/a:c&&(s=c*a),o&&c!=null&&c>o&&(c=o)),{calculatedWidth:s,calculatedHeight:c}},il={width:0,height:0,overflow:`visible`},al={width:0,overflowX:`visible`},ol={height:0,overflowY:`visible`},sl={},cl=e=>{var{width:t,height:n}=e,r=mn(t),i=mn(n);return r&&i?il:r?al:i?ol:sl};function ll(e){var{width:t,height:n,aspect:r}=e,i=t,a=n;return i===void 0&&a===void 0?(i=nl.width,a=nl.height):i===void 0?i=r&&r>0?void 0:nl.width:a===void 0&&(a=r&&r>0?void 0:nl.height),{width:i,height:a}}function ul(){return ul=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ul.apply(null,arguments)}function dl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function fl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?dl(Object(n),!0).forEach(function(t){pl(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dl(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function pl(e,t,n){return(t=ml(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ml(e){var t=hl(e,`string`);return typeof t==`symbol`?t:t+``}function hl(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var gl=(0,F.createContext)(nl.initialDimension);function _l(e){return tc(e.width)&&tc(e.height)}function vl(e){var{children:t,width:n,height:r}=e,i=(0,F.useMemo)(()=>({width:n,height:r}),[n,r]);return _l(i)?F.createElement(gl.Provider,{value:i},t):null}var yl=()=>(0,F.useContext)(gl),bl=(0,F.forwardRef)((e,t)=>{var{aspect:n,initialDimension:r=nl.initialDimension,width:i,height:a,minWidth:o=nl.minWidth,minHeight:s,maxHeight:c,children:l,debounce:u=nl.debounce,id:d,className:f,onResize:p,style:m={}}=e,h=(0,F.useRef)(null),g=(0,F.useRef)();g.current=p,(0,F.useImperativeHandle)(t,()=>h.current);var[_,v]=(0,F.useState)({containerWidth:r.width,containerHeight:r.height}),y=(0,F.useCallback)((e,t)=>{v(n=>{var r=Math.round(e),i=Math.round(t);return n.containerWidth===r&&n.containerHeight===i?n:{containerWidth:r,containerHeight:i}})},[]);(0,F.useEffect)(()=>{if(h.current==null||typeof ResizeObserver>`u`)return wn;var e=e=>{var t,n=e[0];if(n!=null){var{width:r,height:i}=n.contentRect;y(r,i),(t=g.current)==null||t.call(g,r,i)}};u>0&&(e=el(e,u,{trailing:!0,leading:!1}));var t=new ResizeObserver(e),{width:n,height:r}=h.current.getBoundingClientRect();return y(n,r),t.observe(h.current),()=>{t.disconnect()}},[y,u]);var{containerWidth:b,containerHeight:x}=_;tl(!n||n>0,`The aspect(%s) must be greater than zero.`,n);var{calculatedWidth:S,calculatedHeight:C}=rl(b,x,{width:i,height:a,aspect:n,maxHeight:c});return tl(S!=null&&S>0||C!=null&&C>0,`The width(%s) and height(%s) of chart should be greater than 0,
@@ -25,7 +25,7 @@
25
25
  }
26
26
  })();
27
27
  </script>
28
- <script type="module" crossorigin src="/assets/index-CZYi3Ga7.js"></script>
28
+ <script type="module" crossorigin src="/assets/index-D71D9UiI.js"></script>
29
29
  <link rel="stylesheet" crossorigin href="/assets/index-CsWBdB28.css">
30
30
  </head>
31
31
  <body>
@@ -0,0 +1,24 @@
1
+ {
2
+ "format": 1,
3
+ "version": "0.1.2",
4
+ "node": "22.19.0",
5
+ "wrangler": "4.96.0",
6
+ "schema": 1,
7
+ "upgradeFrom": [
8
+ "0.1.2",
9
+ "0.1.1",
10
+ "0.1.0"
11
+ ],
12
+ "files": {
13
+ "console/.assetsignore": "745dcbec514c9094082e34261eb028daf5cf0b22006ec22a6be0d8b81f6344e6",
14
+ "console/assets/endpoints-Dnjjwdkn.js": "3e168b990cb15a627a9d296f8e30d42a2c287b9a2067dc07ceb7cd9f14a6b959",
15
+ "console/assets/index-CsWBdB28.css": "a42bb84fb8a8d862eeee45c7923ceaaf7e93677601b54f52a7c03a84eeef2eda",
16
+ "console/assets/index-D71D9UiI.js": "5df80242e0ca190386a15aae4c6c3d2608ce0ed67ba4dd1471f9e04bd899338b",
17
+ "console/assets/usage-DjvO6eyw.js": "6790a8f0f6bd282041ae5ef9c39eb1043a15069522ddc2be65a5c4fb94aa26a0",
18
+ "console/favicon.svg": "1b09ded3524d89d532d88c8b9f2571354be0a53fed4f11d4ec1239aade5964e4",
19
+ "console/index.html": "a8ed5d33937d9fd633ffb07449f5545ea30684b65d9b33f24c6a02d940ef4178",
20
+ "migrations/0000_initial.sql": "285d22b268edb76b284848550ce3384a0fe57630e2071759147ec2b2e5b2485d",
21
+ "worker/index.js": "c75a84c3a1bbd359ea5ff7990571166edfceedf5fe867e5bb4bbd8e9d31810fc",
22
+ "wrangler.json": "dfc41b2931dabe393091d2330855a48e46d26762232d62c6eb3b3cfe6c017d8e"
23
+ }
24
+ }
@@ -74298,26 +74298,26 @@ var createKmsClient = /* @__PURE__ */ __name((options) => {
74298
74298
  const generateDataKey = /* @__PURE__ */ __name((input) => call("/v1/generate-data-key", input, ["plaintextKey", "wrappedKey"]), "generateDataKey");
74299
74299
  const decrypt3 = /* @__PURE__ */ __name((input) => call("/v1/decrypt", input, ["plaintextKey"]), "decrypt");
74300
74300
  const reWrap = /* @__PURE__ */ __name((input) => call("/v1/re-wrap", input, ["wrappedKey"]), "reWrap");
74301
- const dataKeyFor = /* @__PURE__ */ __name(async (wrappedKey, encryptionContext2) => {
74302
- const cacheKey = cacheKeyFor(wrappedKey, encryptionContext2);
74301
+ const dataKeyFor = /* @__PURE__ */ __name(async (wrappedKey, encryptionContext) => {
74302
+ const cacheKey = cacheKeyFor(wrappedKey, encryptionContext);
74303
74303
  const cached3 = readCache(cacheKey);
74304
74304
  if (cached3) {
74305
74305
  return cached3;
74306
74306
  }
74307
- const { plaintextKey } = await decrypt3({ wrappedKey, encryptionContext: encryptionContext2 });
74307
+ const { plaintextKey } = await decrypt3({ wrappedKey, encryptionContext });
74308
74308
  const key2 = await importDataKey(decodeBase64Url(plaintextKey));
74309
74309
  writeCache(cacheKey, key2);
74310
74310
  return key2;
74311
74311
  }, "dataKeyFor");
74312
- const encryptSecret = /* @__PURE__ */ __name(async (plaintext, encryptionContext2) => {
74313
- const { plaintextKey, wrappedKey } = await generateDataKey({ encryptionContext: encryptionContext2 });
74312
+ const encryptSecret = /* @__PURE__ */ __name(async (plaintext, encryptionContext) => {
74313
+ const { plaintextKey, wrappedKey } = await generateDataKey({ encryptionContext });
74314
74314
  const key2 = await importDataKey(decodeBase64Url(plaintextKey));
74315
74315
  const iv = crypto.getRandomValues(new Uint8Array(IV_BYTE_LENGTH));
74316
- const ciphertext = new Uint8Array(await crypto.subtle.encrypt({ name: "AES-GCM", iv, additionalData: contextAad(encryptionContext2) }, key2, new TextEncoder().encode(plaintext)));
74317
- writeCache(cacheKeyFor(wrappedKey, encryptionContext2), key2);
74316
+ const ciphertext = new Uint8Array(await crypto.subtle.encrypt({ name: "AES-GCM", iv, additionalData: contextAad(encryptionContext) }, key2, new TextEncoder().encode(plaintext)));
74317
+ writeCache(cacheKeyFor(wrappedKey, encryptionContext), key2);
74318
74318
  return `${ENVELOPE_PREFIX2}.${wrappedKey}.${encodeBase64Url(iv)}.${encodeBase64Url(ciphertext)}`;
74319
74319
  }, "encryptSecret");
74320
- const decryptSecret = /* @__PURE__ */ __name(async (blob2, encryptionContext2) => {
74320
+ const decryptSecret = /* @__PURE__ */ __name(async (blob2, encryptionContext) => {
74321
74321
  const parts = blob2.split(".");
74322
74322
  if (parts.length < 4 || parts[0] !== ENVELOPE_PREFIX2) {
74323
74323
  throw new KmsClientError("invalid_envelope", 0);
@@ -74333,10 +74333,10 @@ var createKmsClient = /* @__PURE__ */ __name((options) => {
74333
74333
  if (iv.length !== IV_BYTE_LENGTH) {
74334
74334
  throw new KmsClientError("invalid_envelope", 0);
74335
74335
  }
74336
- const key2 = await dataKeyFor(wrappedKey, encryptionContext2);
74336
+ const key2 = await dataKeyFor(wrappedKey, encryptionContext);
74337
74337
  let payload;
74338
74338
  try {
74339
- payload = await crypto.subtle.decrypt({ name: "AES-GCM", iv, additionalData: contextAad(encryptionContext2) }, key2, ciphertext);
74339
+ payload = await crypto.subtle.decrypt({ name: "AES-GCM", iv, additionalData: contextAad(encryptionContext) }, key2, ciphertext);
74340
74340
  } catch {
74341
74341
  throw new KmsClientError("decrypt_failed", 0);
74342
74342
  }
@@ -74353,6 +74353,7 @@ var createKmsClient = /* @__PURE__ */ __name((options) => {
74353
74353
  }, "createKmsClient");
74354
74354
 
74355
74355
  // src/vault/types.ts
74356
+ var VAULT_SERVICE = "app-ai-gateway";
74356
74357
  var SecretVaultConfigurationError = class extends Error {
74357
74358
  static {
74358
74359
  __name(this, "SecretVaultConfigurationError");
@@ -74606,6 +74607,66 @@ function vaultStatus(env2) {
74606
74607
  }
74607
74608
  __name(vaultStatus, "vaultStatus");
74608
74609
 
74610
+ // src/vault/secrets.ts
74611
+ var SECRET_CONTEXTS = {
74612
+ providerKey: /* @__PURE__ */ __name((organizationId, providerId) => ({
74613
+ organizationId,
74614
+ providerId
74615
+ }), "providerKey"),
74616
+ providerGatewayToken: /* @__PURE__ */ __name((organizationId, providerGatewayId) => ({
74617
+ organizationId,
74618
+ providerGatewayId
74619
+ }), "providerGatewayToken"),
74620
+ cliCredential: /* @__PURE__ */ __name((operationId, pollProofHash) => ({
74621
+ purpose: "cli-credential-exchange",
74622
+ operationId,
74623
+ pollProofHash
74624
+ }), "cliCredential"),
74625
+ resourceReceipt: /* @__PURE__ */ __name((receiptId, proofHash) => ({
74626
+ purpose: "resource-create-receipt",
74627
+ receiptId,
74628
+ proofHash
74629
+ }), "resourceReceipt")
74630
+ };
74631
+ var MAX_ENTRIES = 8;
74632
+ var MAX_KEY_LENGTH = 64;
74633
+ var MAX_VALUE_LENGTH = 256;
74634
+ var KEY_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._:-]*$/u;
74635
+ function assertUsable(kind, context) {
74636
+ const entries = Object.entries(context);
74637
+ if (entries.length > MAX_ENTRIES) {
74638
+ throw new SecretVaultConfigurationError(
74639
+ `${kind} context has ${entries.length} entries; at most ${MAX_ENTRIES} are allowed`
74640
+ );
74641
+ }
74642
+ for (const [key2, value] of entries) {
74643
+ if (key2.length > MAX_KEY_LENGTH || !KEY_PATTERN.test(key2)) {
74644
+ throw new SecretVaultConfigurationError(`${kind} context key ${JSON.stringify(key2)} is not usable`);
74645
+ }
74646
+ if (value.length > MAX_VALUE_LENGTH) {
74647
+ throw new SecretVaultConfigurationError(
74648
+ `${kind} context value for ${key2} is ${value.length} characters; at most ${MAX_VALUE_LENGTH} are allowed`
74649
+ );
74650
+ }
74651
+ }
74652
+ return context;
74653
+ }
74654
+ __name(assertUsable, "assertUsable");
74655
+ function secretContext(kind, identity) {
74656
+ const build = SECRET_CONTEXTS[kind];
74657
+ return assertUsable(kind, { ...build(...identity), service: VAULT_SERVICE });
74658
+ }
74659
+ __name(secretContext, "secretContext");
74660
+ function sealSecret(env2, kind, identity, plaintext) {
74661
+ return secretVault(env2).encryptSecret(plaintext, secretContext(kind, identity));
74662
+ }
74663
+ __name(sealSecret, "sealSecret");
74664
+ function openSecret(env2, kind, identity, blob2) {
74665
+ return secretVault(env2).decryptSecret(blob2, secretContext(kind, identity));
74666
+ }
74667
+ __name(openSecret, "openSecret");
74668
+ var SECRET_KINDS = Object.keys(SECRET_CONTEXTS);
74669
+
74609
74670
  // src/routes/cli/security.ts
74610
74671
  var TTL = 15 * 6e4;
74611
74672
  var encoder3 = new TextEncoder();
@@ -74648,24 +74709,12 @@ async function proofMatches(raw2, expected) {
74648
74709
  return crypto.subtle.verify("HMAC", key2, signature, encoder3.encode(expected));
74649
74710
  }
74650
74711
  __name(proofMatches, "proofMatches");
74651
- function credentialContext(id, pollProofHash) {
74652
- return { purpose: "cli-credential-exchange", operationId: id, pollProofHash };
74653
- }
74654
- __name(credentialContext, "credentialContext");
74655
74712
  async function protectCredential(env2, id, pollHash, value) {
74656
- return secretVault(env2).encryptSecret(
74657
- JSON.stringify(value),
74658
- credentialContext(id, pollHash)
74659
- );
74713
+ return sealSecret(env2, "cliCredential", [id, pollHash], JSON.stringify(value));
74660
74714
  }
74661
74715
  __name(protectCredential, "protectCredential");
74662
74716
  async function openCredential(env2, id, pollHash, ciphertext) {
74663
- return JSON.parse(
74664
- await secretVault(env2).decryptSecret(
74665
- ciphertext,
74666
- credentialContext(id, pollHash)
74667
- )
74668
- );
74717
+ return JSON.parse(await openSecret(env2, "cliCredential", [id, pollHash], ciphertext));
74669
74718
  }
74670
74719
  __name(openCredential, "openCredential");
74671
74720
  async function cliJson(request) {
@@ -76829,23 +76878,22 @@ var ResourceReceipt = class {
76829
76878
  );
76830
76879
  }
76831
76880
  this.result = JSON.parse(
76832
- await secretVault(this.env).decryptSecret(row.protected_credential, {
76833
- purpose: "resource-create-receipt",
76834
- receiptId: this.id,
76835
- proofHash: this.proofHash
76836
- })
76881
+ await openSecret(
76882
+ this.env,
76883
+ "resourceReceipt",
76884
+ [this.id, this.proofHash],
76885
+ row.protected_credential
76886
+ )
76837
76887
  );
76838
76888
  return this.result;
76839
76889
  }
76840
76890
  async commit(statement, outcome) {
76841
76891
  const now2 = Date.now();
76842
- const protectedOutcome = await secretVault(this.env).encryptSecret(
76843
- JSON.stringify(outcome),
76844
- {
76845
- purpose: "resource-create-receipt",
76846
- receiptId: this.id,
76847
- proofHash: this.proofHash
76848
- }
76892
+ const protectedOutcome = await sealSecret(
76893
+ this.env,
76894
+ "resourceReceipt",
76895
+ [this.id, this.proofHash],
76896
+ JSON.stringify(outcome)
76849
76897
  );
76850
76898
  const complete = this.env.DB.prepare(
76851
76899
  `INSERT INTO mgmt_resource_receipt(
@@ -79371,14 +79419,6 @@ function staleSecret(key2, error52) {
79371
79419
  return { secret: cached3.secret, ageMs: now2 - (cached3.expiresAt - CACHE_TTL_MS) };
79372
79420
  }
79373
79421
  __name(staleSecret, "staleSecret");
79374
- function encryptionContext(organizationId, providerId) {
79375
- return { service: "app-ai-gateway", organizationId, providerId };
79376
- }
79377
- __name(encryptionContext, "encryptionContext");
79378
- function gatewayEncryptionContext(organizationId, providerGatewayId) {
79379
- return { service: "app-ai-gateway", organizationId, providerGatewayId };
79380
- }
79381
- __name(gatewayEncryptionContext, "gatewayEncryptionContext");
79382
79422
  function invalidateOrganizationProviders(organizationId) {
79383
79423
  rowsCache.delete(organizationId);
79384
79424
  }
@@ -79426,10 +79466,7 @@ async function plaintextSecret(env2, organizationId, row) {
79426
79466
  const cached3 = secretCache.get(key2);
79427
79467
  if (cached3 && cached3.expiresAt > Date.now()) return cached3.secret;
79428
79468
  try {
79429
- const secret = await secretVault(env2).decryptSecret(
79430
- blob2,
79431
- encryptionContext(organizationId, ownerId)
79432
- );
79469
+ const secret = await openSecret(env2, "providerKey", [organizationId, ownerId], blob2);
79433
79470
  rememberSecret(key2, secret);
79434
79471
  return secret;
79435
79472
  } catch (error52) {
@@ -79461,9 +79498,11 @@ async function decryptProviderGatewaySecret(env2, organizationId, providerGatewa
79461
79498
  const cached3 = secretCache.get(key2);
79462
79499
  if (cached3 && cached3.expiresAt > Date.now()) return cached3.secret;
79463
79500
  try {
79464
- const secret = await secretVault(env2).decryptSecret(
79465
- secretBlob,
79466
- gatewayEncryptionContext(organizationId, providerGatewayId)
79501
+ const secret = await openSecret(
79502
+ env2,
79503
+ "providerGatewayToken",
79504
+ [organizationId, providerGatewayId],
79505
+ secretBlob
79467
79506
  );
79468
79507
  rememberSecret(key2, secret);
79469
79508
  return secret;
@@ -79683,7 +79722,7 @@ async function createProvider(env2, admin, input, boundary) {
79683
79722
  type: body.type,
79684
79723
  slug,
79685
79724
  name: body.name,
79686
- secretBlob: secret === void 0 ? null : await secretVault(env2).encryptSecret(secret, encryptionContext(admin.organizationId, id)),
79725
+ secretBlob: secret === void 0 ? null : await sealSecret(env2, "providerKey", [admin.organizationId, id], secret),
79687
79726
  secretHint: secret === void 0 ? null : secretHint(secret),
79688
79727
  providerGatewayId: providerGatewayId ?? null,
79689
79728
  gatewayRoute: gatewayRoute2,
@@ -79791,9 +79830,11 @@ async function updateProvider(env2, admin, id, input, boundary, expectedUpdatedA
79791
79830
  `This provider uses a shared gateway token; rotate it at /v1/admin/provider-gateways/${row.providerGatewayId}/rotate`
79792
79831
  );
79793
79832
  }
79794
- updates.secretBlob = await secretVault(env2).encryptSecret(
79795
- body.secret,
79796
- encryptionContext(admin.organizationId, row.id)
79833
+ updates.secretBlob = await sealSecret(
79834
+ env2,
79835
+ "providerKey",
79836
+ [admin.organizationId, row.id],
79837
+ body.secret
79797
79838
  );
79798
79839
  updates.secretHint = secretHint(body.secret);
79799
79840
  }
@@ -79896,9 +79937,11 @@ async function createProviderGateway(env2, admin, input, boundary) {
79896
79937
  const body = providerSchemaBody(ProviderGatewayCreateRequestSchema, input);
79897
79938
  const gateway = requestedGateway(body);
79898
79939
  const id = crypto.randomUUID();
79899
- const secretBlob = await secretVault(env2).encryptSecret(
79900
- body.token,
79901
- gatewayEncryptionContext(admin.organizationId, id)
79940
+ const secretBlob = await sealSecret(
79941
+ env2,
79942
+ "providerGatewayToken",
79943
+ [admin.organizationId, id],
79944
+ body.token
79902
79945
  );
79903
79946
  const now2 = nextUpdatedAt();
79904
79947
  const row = {
@@ -79997,9 +80040,11 @@ async function rotateProviderGateway(env2, admin, id, input, boundary, expectedU
79997
80040
  "The provider gateway changed since this request was prepared"
79998
80041
  );
79999
80042
  requireGatewayAdapter(existing.type);
80000
- const secretBlob = await secretVault(env2).encryptSecret(
80001
- body.token,
80002
- gatewayEncryptionContext(admin.organizationId, id)
80043
+ const secretBlob = await sealSecret(
80044
+ env2,
80045
+ "providerGatewayToken",
80046
+ [admin.organizationId, id],
80047
+ body.token
80003
80048
  );
80004
80049
  const row = {
80005
80050
  ...existing,
@@ -80893,7 +80938,7 @@ GROUP BY app_id`).bind(organizationId, month).all();
80893
80938
  __name(organizationMonthUsage, "organizationMonthUsage");
80894
80939
 
80895
80940
  // package.json
80896
- var version4 = "0.1.0";
80941
+ var version4 = "0.1.2";
80897
80942
 
80898
80943
  // src/core/version.ts
80899
80944
  var SERVER_VERSION = version4;
@@ -1 +1 @@
1
- {"version":"0.1.0","sha256":"01362496bd1c71b7aa09dcbc9572217976dff220ee5e453c78153b13c9a09ce4"}
1
+ {"version":"0.1.2","sha256":"722b6a0754cf1c287320c511e9cccb276cf10f7664372f61b0b86fa252517a32"}
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "@maxceem/agw",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "type": "module",
5
5
  "description": "App AI Gateway CLI",
6
+ "upgradeFrom": ["0.1.1", "0.1.0"],
6
7
  "license": "Apache-2.0",
7
8
  "bin": {
8
9
  "agw": "dist/agw.mjs"